mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 03:26:36 +00:00
Some fixes
This commit is contained in:
parent
fe5c571b13
commit
184c3d9219
13 changed files with 95 additions and 32710 deletions
|
@ -2697,8 +2697,8 @@ None.
|
||||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||||
| :-------------- | :--------------- | :------- | :---------------------------------------- | ------------------------------------------------ | -------------------------------------------------------- |
|
| :-------------- | :--------------- | :------- | :---------------------------------------- | ------------------------------------------------ | -------------------------------------------------------- |
|
||||||
| ref | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
| ref | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
||||||
| light | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
|
||||||
| checked | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to check the tile |
|
| checked | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to check the tile |
|
||||||
|
| light | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
||||||
| value | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the value of the radio input |
|
| value | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the value of the radio input |
|
||||||
| title | <code>let</code> | No | <code>string</code> | <code>"title"</code> | Specify the title of the selectable tile |
|
| title | <code>let</code> | No | <code>string</code> | <code>"title"</code> | Specify the title of the selectable tile |
|
||||||
| tabindex | <code>let</code> | No | <code>string</code> | <code>"0"</code> | Specify the tabindex |
|
| tabindex | <code>let</code> | No | <code>string</code> | <code>"0"</code> | Specify the tabindex |
|
||||||
|
@ -2727,12 +2727,11 @@ None.
|
||||||
|
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||||
| :------------ | :--------------- | :------- | :------------------- | ------------------ | ----------------------------------------- |
|
| :------------ | :--------------- | :------- | :------------------- | ------------------ | --------------------------------------- |
|
||||||
| selectedValue | <code>let</code> | Yes | <code>string</code> | -- | Specify the selected tile value |
|
| selectedValue | <code>let</code> | Yes | <code>string</code> | -- | Specify the selected tile value |
|
||||||
| disabled | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the tile group |
|
| disabled | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to disable the tile group |
|
||||||
| light | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
| legend | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the legend text |
|
||||||
| legend | <code>let</code> | No | <code>string</code> | <code>""</code> | Specify the legend text |
|
|
||||||
|
|
||||||
### Slots
|
### Slots
|
||||||
|
|
||||||
|
@ -2931,8 +2930,8 @@ None.
|
||||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||||
| :-------------- | :--------------- | :------- | :---------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------- |
|
| :-------------- | :--------------- | :------- | :---------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------- |
|
||||||
| ref | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
| ref | <code>let</code> | Yes | <code>null | HTMLInputElement</code> | <code>null</code> | Obtain a reference to the input HTML element |
|
||||||
| light | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
|
||||||
| selected | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to select the tile |
|
| selected | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to select the tile |
|
||||||
|
| light | <code>let</code> | No | <code>boolean</code> | <code>false</code> | Set to `true` to enable the light variant |
|
||||||
| title | <code>let</code> | No | <code>string</code> | <code>"title"</code> | Specify the title of the selectable tile |
|
| title | <code>let</code> | No | <code>string</code> | <code>"title"</code> | Specify the title of the selectable tile |
|
||||||
| value | <code>let</code> | No | <code>string</code> | <code>"value"</code> | Specify the value of the selectable tile |
|
| value | <code>let</code> | No | <code>string</code> | <code>"value"</code> | Specify the value of the selectable tile |
|
||||||
| tabindex | <code>let</code> | No | <code>string</code> | <code>"0"</code> | Specify the tabindex |
|
| tabindex | <code>let</code> | No | <code>string</code> | <code>"0"</code> | Specify the tabindex |
|
||||||
|
|
|
@ -3356,7 +3356,7 @@
|
||||||
{ "type": "forwarded", "name": "mouseleave", "element": "table" }
|
{ "type": "forwarded", "name": "mouseleave", "element": "table" }
|
||||||
],
|
],
|
||||||
"typedefs": [],
|
"typedefs": [],
|
||||||
"rest_props": { "type": "Element", "name": "div" },
|
"rest_props": { "type": "Element", "name": "table" },
|
||||||
"extends": {
|
"extends": {
|
||||||
"interface": "DataTableHeader",
|
"interface": "DataTableHeader",
|
||||||
"import": "\"../DataTable/DataTable\""
|
"import": "\"../DataTable/DataTable\""
|
||||||
|
@ -8534,7 +8534,7 @@
|
||||||
"value": "false",
|
"value": "false",
|
||||||
"isFunction": false,
|
"isFunction": false,
|
||||||
"constant": false,
|
"constant": false,
|
||||||
"reactive": true
|
"reactive": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "title",
|
"name": "title",
|
||||||
|
@ -8640,7 +8640,7 @@
|
||||||
"value": "false",
|
"value": "false",
|
||||||
"isFunction": false,
|
"isFunction": false,
|
||||||
"constant": false,
|
"constant": false,
|
||||||
"reactive": true
|
"reactive": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "value",
|
"name": "value",
|
||||||
|
@ -8787,16 +8787,6 @@
|
||||||
"constant": false,
|
"constant": false,
|
||||||
"reactive": false
|
"reactive": false
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"name": "light",
|
|
||||||
"kind": "let",
|
|
||||||
"description": "Set to `true` to enable the light variant",
|
|
||||||
"type": "boolean",
|
|
||||||
"value": "false",
|
|
||||||
"isFunction": false,
|
|
||||||
"constant": false,
|
|
||||||
"reactive": false
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "legend",
|
"name": "legend",
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
|
|
|
@ -29,14 +29,14 @@ components: ["RadioTileGroup", "RadioTile"]
|
||||||
|
|
||||||
### Light variant
|
### Light variant
|
||||||
|
|
||||||
<RadioTileGroup light legend="Service pricing tiers">
|
<RadioTileGroup legend="Service pricing tiers">
|
||||||
<RadioTile value="0" checked>
|
<RadioTile light value="0" checked>
|
||||||
Lite plan
|
Lite plan
|
||||||
</RadioTile>
|
</RadioTile>
|
||||||
<RadioTile value="1">
|
<RadioTile light value="1">
|
||||||
Standard plan
|
Standard plan
|
||||||
</RadioTile>
|
</RadioTile>
|
||||||
<RadioTile value="2">
|
<RadioTile light value="2">
|
||||||
Plus plan
|
Plus plan
|
||||||
</RadioTile>
|
</RadioTile>
|
||||||
</TileGroup>
|
</TileGroup>
|
|
@ -9,34 +9,34 @@ components: ["SelectableTile", "SelectableTileGroup"]
|
||||||
|
|
||||||
### Multi-selectable tiles
|
### Multi-selectable tiles
|
||||||
|
|
||||||
<SelectableTileGroup legend="Select the options you require" light>
|
<SelectableTileGroup legend="Select the options you require">
|
||||||
<SelectableTile title="Option 1" selected>
|
<SelectableTile title="Option 1" selected>
|
||||||
Option 1
|
Option 1
|
||||||
</SelectableTile>
|
</SelectableTile>
|
||||||
<SelectableTile title="Option 2" selected>
|
<SelectableTile title="Option 2" selected>
|
||||||
Option 2
|
Option 2
|
||||||
</SelectableTile>
|
</SelectableTile>
|
||||||
<SelectableTile title="Option 3£>
|
<SelectableTile title="Option 3">
|
||||||
Option 3
|
Option 3
|
||||||
</SelectableTile>
|
</SelectableTile>
|
||||||
<SelectableTile light title="Option 4£>
|
<SelectableTile light title="Option 4">
|
||||||
Option 4 (light variant)
|
Option 4 (light variant)
|
||||||
</SelectableTile>
|
</SelectableTile>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
### Multi-selectable tiles with light variant
|
### Multi-selectable tiles with light variant
|
||||||
|
|
||||||
<SelectableTileGroup light legend="Select the options you require" light>
|
<SelectableTileGroup legend="Select the options you require" light>
|
||||||
<SelectableTile title="Option 1" selected>
|
<SelectableTile light title="Option 1" selected>
|
||||||
Option 1
|
Option 1
|
||||||
</SelectableTile>
|
</SelectableTile>
|
||||||
<SelectableTile title="Option 2" selected>
|
<SelectableTile light title="Option 2" selected>
|
||||||
Option 2
|
Option 2
|
||||||
</SelectableTile>
|
</SelectableTile>
|
||||||
<SelectableTile title="Option 3£>
|
<SelectableTile light title="Option 3">
|
||||||
Option 3
|
Option 3
|
||||||
</SelectableTile>
|
</SelectableTile>
|
||||||
<SelectableTile title="Option 4£>
|
<SelectableTile light title="Option 4">
|
||||||
Option 4
|
Option 4
|
||||||
</SelectableTile>
|
</SelectableTile>
|
||||||
</div>
|
</div>
|
||||||
|
|
4136
package-lock.json
generated
4136
package-lock.json
generated
File diff suppressed because it is too large
Load diff
28525
palimpsest/package-lock.json
generated
28525
palimpsest/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -41,11 +41,7 @@
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div class:bx--skeleton="{true}" class:bx--data-table-container="{true}">
|
||||||
class:bx--skeleton="{true}"
|
|
||||||
class:bx--data-table-container="{true}"
|
|
||||||
{...$$restProps}
|
|
||||||
>
|
|
||||||
{#if showHeader}
|
{#if showHeader}
|
||||||
<div class:bx--data-table-header="{true}">
|
<div class:bx--data-table-header="{true}">
|
||||||
<div class:bx--data-table-header__title="{true}"></div>
|
<div class:bx--data-table-header__title="{true}"></div>
|
||||||
|
@ -64,6 +60,7 @@
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
<table
|
<table
|
||||||
|
{...$$restProps}
|
||||||
class:bx--skeleton="{true}"
|
class:bx--skeleton="{true}"
|
||||||
class:bx--data-table="{true}"
|
class:bx--data-table="{true}"
|
||||||
class:bx--data-table--compact="{size === 'compact'}"
|
class:bx--data-table--compact="{size === 'compact'}"
|
||||||
|
@ -74,6 +71,7 @@
|
||||||
on:mouseover
|
on:mouseover
|
||||||
on:mouseenter
|
on:mouseenter
|
||||||
on:mouseleave
|
on:mouseleave
|
||||||
|
{...$$restProps}
|
||||||
>
|
>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
|
@ -29,9 +29,7 @@
|
||||||
import { getContext } from "svelte";
|
import { getContext } from "svelte";
|
||||||
import CheckmarkFilled16 from "carbon-icons-svelte/lib/CheckmarkFilled16";
|
import CheckmarkFilled16 from "carbon-icons-svelte/lib/CheckmarkFilled16";
|
||||||
|
|
||||||
const { _light, add, update, selectedValue } = getContext("RadioTileGroup");
|
const { add, update, selectedValue } = getContext("RadioTileGroup");
|
||||||
|
|
||||||
light = light || _light;
|
|
||||||
|
|
||||||
add({ value, checked });
|
add({ value, checked });
|
||||||
|
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
/** Set to `true` to disable the tile group */
|
/** Set to `true` to disable the tile group */
|
||||||
export let disabled = false;
|
export let disabled = false;
|
||||||
|
|
||||||
/** Set to `true` to enable the light variant */
|
|
||||||
export let light = false;
|
|
||||||
|
|
||||||
/** Specify the legend text */
|
/** Specify the legend text */
|
||||||
export let legend = "";
|
export let legend = "";
|
||||||
|
|
||||||
|
@ -21,7 +18,6 @@
|
||||||
const _selectedValue = writable(selectedValue);
|
const _selectedValue = writable(selectedValue);
|
||||||
|
|
||||||
setContext("RadioTileGroup", {
|
setContext("RadioTileGroup", {
|
||||||
_light: light,
|
|
||||||
selectedValue: _selectedValue,
|
selectedValue: _selectedValue,
|
||||||
add: ({ checked, value }) => {
|
add: ({ checked, value }) => {
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
|
|
@ -32,9 +32,7 @@
|
||||||
import { getContext } from "svelte";
|
import { getContext } from "svelte";
|
||||||
import CheckmarkFilled16 from "carbon-icons-svelte/lib/CheckmarkFilled16";
|
import CheckmarkFilled16 from "carbon-icons-svelte/lib/CheckmarkFilled16";
|
||||||
|
|
||||||
const { _light, update, selectedValues } = getContext("SelectableTileGroup");
|
const { update, selectedValues } = getContext("SelectableTileGroup");
|
||||||
|
|
||||||
light = light || _light;
|
|
||||||
|
|
||||||
update({ value, selected });
|
update({ value, selected });
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { DataTableHeader } from "../DataTable/DataTable";
|
||||||
|
|
||||||
export interface DataTableSkeletonProps
|
export interface DataTableSkeletonProps
|
||||||
extends DataTableHeader,
|
extends DataTableHeader,
|
||||||
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["table"]> {
|
||||||
/**
|
/**
|
||||||
* Specify the number of columns
|
* Specify the number of columns
|
||||||
* Superseded by `headers` if `headers` is a non-empty array
|
* Superseded by `headers` if `headers` is a non-empty array
|
||||||
|
|
30
types/Tile/RadioTileGroup.d.ts
vendored
Normal file
30
types/Tile/RadioTileGroup.d.ts
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
/// <reference types="svelte" />
|
||||||
|
|
||||||
|
export interface RadioTileGroupProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["fieldset"]> {
|
||||||
|
/**
|
||||||
|
* Specify the selected tile value
|
||||||
|
*/
|
||||||
|
selectedValue?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to disable the tile group
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
|
disabled?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify the legend text
|
||||||
|
* @default ""
|
||||||
|
*/
|
||||||
|
legend?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class RadioTileGroup {
|
||||||
|
$$prop_def: RadioTileGroupProps;
|
||||||
|
$$slot_def: {
|
||||||
|
default: {};
|
||||||
|
};
|
||||||
|
|
||||||
|
$on(eventname: "select", cb: (event: CustomEvent<any>) => void): () => void;
|
||||||
|
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||||
|
}
|
37
types/Tile/SelectableTileGroup.d.ts
vendored
Normal file
37
types/Tile/SelectableTileGroup.d.ts
vendored
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
/// <reference types="svelte" />
|
||||||
|
|
||||||
|
export interface SelectableTileGroupProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["fieldset"]> {
|
||||||
|
/**
|
||||||
|
* Specify the selected tile's
|
||||||
|
* @default []
|
||||||
|
*/
|
||||||
|
selectedValues?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to disable the tile group
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
|
disabled?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set to `true` to enable the light variant
|
||||||
|
* @default false
|
||||||
|
*/
|
||||||
|
light?: boolean;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specify the legend text
|
||||||
|
* @default ""
|
||||||
|
*/
|
||||||
|
legend?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default class SelectableTileGroup {
|
||||||
|
$$prop_def: SelectableTileGroupProps;
|
||||||
|
$$slot_def: {
|
||||||
|
default: {};
|
||||||
|
};
|
||||||
|
|
||||||
|
$on(eventname: "select", cb: (event: CustomEvent<any>) => void): () => void;
|
||||||
|
$on(eventname: string, cb: (event: Event) => void): () => void;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue