carbon-components-svelte 0.98.1 → 0.98.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/Checkbox/Checkbox.svelte +1 -1
- package/src/Checkbox/InlineCheckbox.svelte +1 -1
- package/src/CodeSnippet/CodeSnippet.svelte +2 -2
- package/src/ComboBox/ComboBox.svelte +3 -4
- package/src/ContainedList/ContainedList.svelte +1 -1
- package/src/ContentSwitcher/Switch.svelte +1 -1
- package/src/ContextMenu/ContextMenuOption.svelte +1 -1
- package/src/DataTable/DataTable.svelte +3 -3
- package/src/DataTable/TableHeader.svelte +1 -1
- package/src/DatePicker/DatePicker.svelte +1 -1
- package/src/DatePicker/DatePickerInput.svelte +1 -1
- package/src/DatePicker/DatePickerSkeleton.svelte +1 -1
- package/src/Dropdown/Dropdown.svelte +1 -1
- package/src/FileUploader/FileUploaderButton.svelte +1 -1
- package/src/FileUploader/FileUploaderDropContainer.svelte +1 -1
- package/src/FileUploader/FileUploaderItem.svelte +1 -1
- package/src/FormLabel/FormLabel.svelte +1 -1
- package/src/ImageLoader/ImageLoader.svelte +2 -2
- package/src/ListBox/ListBoxField.svelte +1 -1
- package/src/ListBox/ListBoxMenu.svelte +1 -1
- package/src/Modal/Modal.svelte +1 -1
- package/src/MultiSelect/MultiSelect.svelte +2 -1
- package/src/Notification/InlineNotification.svelte +1 -1
- package/src/Notification/NotificationQueue.svelte +4 -4
- package/src/Notification/ToastNotification.svelte +1 -1
- package/src/NumberInput/NumberInput.svelte +1 -1
- package/src/OverflowMenu/OverflowMenu.svelte +6 -6
- package/src/OverflowMenu/OverflowMenuItem.svelte +1 -1
- package/src/Pagination/Pagination.svelte +1 -1
- package/src/ProgressBar/ProgressBar.svelte +2 -2
- package/src/ProgressIndicator/ProgressStep.svelte +1 -1
- package/src/RadioButton/RadioButton.svelte +1 -1
- package/src/Search/Search.svelte +1 -1
- package/src/Select/Select.svelte +1 -1
- package/src/Select/SelectItem.svelte +1 -1
- package/src/Slider/Slider.svelte +1 -1
- package/src/StructuredList/StructuredListInput.svelte +1 -1
- package/src/Tabs/Tab.svelte +1 -1
- package/src/Tabs/TabContent.svelte +1 -1
- package/src/Tag/Tag.svelte +1 -1
- package/src/TextArea/TextArea.svelte +1 -1
- package/src/TextInput/PasswordInput.svelte +1 -1
- package/src/TextInput/TextInput.svelte +1 -1
- package/src/Tile/ExpandableTile.svelte +1 -1
- package/src/Tile/RadioTile.svelte +1 -1
- package/src/Tile/SelectableTile.svelte +1 -1
- package/src/TimePicker/TimePicker.svelte +1 -1
- package/src/TimePicker/TimePickerSelect.svelte +1 -1
- package/src/Toggle/Toggle.svelte +1 -1
- package/src/Toggle/ToggleSkeleton.svelte +1 -1
- package/src/Tooltip/Tooltip.svelte +4 -4
- package/src/TooltipDefinition/TooltipDefinition.svelte +1 -1
- package/src/TooltipIcon/TooltipIcon.svelte +1 -1
- package/src/TreeView/TreeView.svelte +4 -9
- package/src/TreeView/TreeViewNode.svelte +3 -3
- package/src/UIShell/Header.svelte +2 -2
- package/src/UIShell/HeaderNavItem.svelte +1 -1
- package/types/Checkbox/Checkbox.svelte.d.ts +3 -1
- package/types/Checkbox/InlineCheckbox.svelte.d.ts +1 -1
- package/types/CodeSnippet/CodeSnippet.svelte.d.ts +1 -1
- package/types/ComboBox/ComboBox.svelte.d.ts +5 -2
- package/types/ContainedList/ContainedList.svelte.d.ts +5 -1
- package/types/ContainedList/ContainedListItem.svelte.d.ts +2 -0
- package/types/ContentSwitcher/Switch.svelte.d.ts +1 -1
- package/types/ContextMenu/ContextMenuOption.svelte.d.ts +3 -1
- package/types/DataTable/DataTable.svelte.d.ts +11 -1
- package/types/DataTable/TableHeader.svelte.d.ts +1 -1
- package/types/DataTable/ToolbarBatchActions.svelte.d.ts +2 -0
- package/types/DatePicker/DatePicker.svelte.d.ts +1 -1
- package/types/DatePicker/DatePickerInput.svelte.d.ts +3 -1
- package/types/DatePicker/DatePickerSkeleton.svelte.d.ts +1 -1
- package/types/Dropdown/Dropdown.svelte.d.ts +1 -1
- package/types/FileUploader/FileUploaderButton.svelte.d.ts +3 -1
- package/types/FileUploader/FileUploaderDropContainer.svelte.d.ts +3 -1
- package/types/FileUploader/FileUploaderItem.svelte.d.ts +1 -1
- package/types/FormLabel/FormLabel.svelte.d.ts +1 -1
- package/types/ImageLoader/ImageLoader.svelte.d.ts +2 -1
- package/types/ListBox/ListBoxField.svelte.d.ts +1 -1
- package/types/ListBox/ListBoxMenu.svelte.d.ts +1 -1
- package/types/Modal/Modal.svelte.d.ts +5 -1
- package/types/MultiSelect/MultiSelect.svelte.d.ts +3 -1
- package/types/Notification/InlineNotification.svelte.d.ts +7 -1
- package/types/Notification/NotificationQueue.svelte.d.ts +2 -0
- package/types/Notification/ToastNotification.svelte.d.ts +7 -1
- package/types/NumberInput/NumberInput.svelte.d.ts +3 -1
- package/types/OverflowMenu/OverflowMenu.svelte.d.ts +3 -1
- package/types/OverflowMenu/OverflowMenuItem.svelte.d.ts +1 -1
- package/types/Pagination/Pagination.svelte.d.ts +1 -1
- package/types/ProgressBar/ProgressBar.svelte.d.ts +3 -1
- package/types/ProgressIndicator/ProgressStep.svelte.d.ts +1 -1
- package/types/RadioButton/RadioButton.svelte.d.ts +3 -1
- package/types/RadioButtonGroup/RadioButtonGroup.svelte.d.ts +2 -0
- package/types/Search/Search.svelte.d.ts +3 -1
- package/types/Select/Select.svelte.d.ts +3 -1
- package/types/Slider/Slider.svelte.d.ts +3 -1
- package/types/StructuredList/StructuredListInput.svelte.d.ts +1 -1
- package/types/Tabs/Tab.svelte.d.ts +1 -1
- package/types/Tabs/TabContent.svelte.d.ts +1 -1
- package/types/Tabs/Tabs.svelte.d.ts +2 -0
- package/types/Tag/Tag.svelte.d.ts +1 -1
- package/types/TextArea/TextArea.svelte.d.ts +3 -1
- package/types/TextInput/PasswordInput.svelte.d.ts +3 -1
- package/types/TextInput/TextInput.svelte.d.ts +3 -1
- package/types/Tile/ExpandableTile.svelte.d.ts +5 -1
- package/types/Tile/RadioTile.svelte.d.ts +1 -1
- package/types/Tile/SelectableTile.svelte.d.ts +1 -1
- package/types/Tile/SelectableTileGroup.svelte.d.ts +2 -0
- package/types/Tile/TileGroup.svelte.d.ts +2 -0
- package/types/TimePicker/TimePicker.svelte.d.ts +3 -1
- package/types/TimePicker/TimePickerSelect.svelte.d.ts +3 -1
- package/types/Toggle/Toggle.svelte.d.ts +3 -1
- package/types/Toggle/ToggleSkeleton.svelte.d.ts +3 -1
- package/types/Tooltip/Tooltip.svelte.d.ts +2 -2
- package/types/TooltipDefinition/TooltipDefinition.svelte.d.ts +3 -1
- package/types/TooltipIcon/TooltipIcon.svelte.d.ts +1 -1
- package/types/TreeView/TreeView.svelte.d.ts +6 -2
- package/types/TreeView/TreeViewNode.svelte.d.ts +2 -1
- package/types/UIShell/Header.svelte.d.ts +6 -0
- package/types/UIShell/HeaderAction.svelte.d.ts +2 -0
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
export let title = undefined;
|
|
54
54
|
|
|
55
55
|
/** Set an id for the input label */
|
|
56
|
-
export let id =
|
|
56
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
57
57
|
|
|
58
58
|
/** Obtain a reference to the input HTML element */
|
|
59
59
|
export let ref = null;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
export let title = undefined;
|
|
13
13
|
|
|
14
14
|
/** Set an id for the input label */
|
|
15
|
-
export let id =
|
|
15
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
16
16
|
|
|
17
17
|
/** Obtain a reference to the input HTML element */
|
|
18
18
|
export let ref = null;
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
export let showMoreLess = true;
|
|
104
104
|
|
|
105
105
|
/** Set an id for the code element */
|
|
106
|
-
export let id =
|
|
106
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
107
107
|
|
|
108
108
|
/** Obtain a reference to the pre HTML element */
|
|
109
109
|
export let ref = null;
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
|
|
128
128
|
$: expandText = expanded ? showLessText : showMoreText;
|
|
129
129
|
$: minHeight = expanded ? 16 * 15 : 48;
|
|
130
|
-
$: maxHeight = expanded ? "none" : 16 * 15
|
|
130
|
+
$: maxHeight = expanded ? "none" : `${16 * 15}px`;
|
|
131
131
|
|
|
132
132
|
// Show more/less only applies to multi-line code snippets
|
|
133
133
|
$: if (type !== "multi") showMoreLess = false;
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
export let translateWithIdSelection = undefined;
|
|
121
121
|
|
|
122
122
|
/** Set an id for the list box component */
|
|
123
|
-
export let id =
|
|
123
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* Specify a name attribute for the input.
|
|
@@ -200,10 +200,9 @@
|
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
|
-
* Clear the combo box programmatically
|
|
203
|
+
* Clear the combo box programmatically.
|
|
204
|
+
* By default, focuses the combo box after clearing. Set `options.focus` to `false` to prevent focusing.
|
|
204
205
|
* @type {(options?: { focus?: boolean; }) => Promise<void>}
|
|
205
|
-
* @param {object} [options] - Configuration options for clearing
|
|
206
|
-
* @param {boolean} [options.focus=true] - Whether to focus the combo box after clearing
|
|
207
206
|
* @example
|
|
208
207
|
* ```svelte
|
|
209
208
|
* <ComboBox bind:this={comboBox} items={items} />
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
export let disabled = false;
|
|
19
19
|
|
|
20
20
|
/** Set an id for the button element */
|
|
21
|
-
export let id =
|
|
21
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
22
22
|
|
|
23
23
|
/** Obtain a reference to the button HTML element */
|
|
24
24
|
export let ref = null;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
* Specify the id.
|
|
56
56
|
* It's recommended to provide an id as a value to bind to within a selectable/radio menu group.
|
|
57
57
|
*/
|
|
58
|
-
export let id =
|
|
58
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
59
59
|
|
|
60
60
|
/** Obtain a reference to the list item HTML element */
|
|
61
61
|
export let ref = null;
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
* When the table is inside a form, this name will
|
|
103
103
|
* be included in the form data on submit.
|
|
104
104
|
*/
|
|
105
|
-
export let inputName =
|
|
105
|
+
export let inputName = `ccs-${Math.random().toString(36)}`;
|
|
106
106
|
|
|
107
107
|
/** Set to `true` to use zebra styles */
|
|
108
108
|
export let zebra = false;
|
|
@@ -223,7 +223,7 @@
|
|
|
223
223
|
|
|
224
224
|
// Internal ID prefix for radio buttons, checkboxes, etc.
|
|
225
225
|
// since there may be multiple `DataTable` instances that have overlapping row ids.
|
|
226
|
-
const id =
|
|
226
|
+
const id = `ccs-${Math.random().toString(36)}`;
|
|
227
227
|
|
|
228
228
|
// Store a copy of the original rows for filter restoration.
|
|
229
229
|
$: originalRows = [...rows];
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
return searchableKeys.some((key) => {
|
|
273
273
|
const _value = resolvePath(row, key);
|
|
274
274
|
if (typeof _value === "string" || typeof _value === "number") {
|
|
275
|
-
return
|
|
275
|
+
return `${_value}`?.toLowerCase().includes(value);
|
|
276
276
|
}
|
|
277
277
|
return false;
|
|
278
278
|
});
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
export let translateWithId = (id) => defaultTranslations[id];
|
|
32
32
|
|
|
33
33
|
/** Set an id for the top-level element */
|
|
34
|
-
export let id =
|
|
34
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
35
35
|
|
|
36
36
|
import ArrowsVertical from "../icons/ArrowsVertical.svelte";
|
|
37
37
|
import ArrowUp from "../icons/ArrowUp.svelte";
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
export let light = false;
|
|
58
58
|
|
|
59
59
|
/** Set an id for the date picker element */
|
|
60
|
-
export let id =
|
|
60
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Override the options passed to the Flatpickr instance.
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
export let translateWithId = undefined;
|
|
96
96
|
|
|
97
97
|
/** Set an id for the list box component */
|
|
98
|
-
export let id =
|
|
98
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* Specify a name attribute for the list box.
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
export let labelText = "Add file";
|
|
41
41
|
|
|
42
42
|
/** Set an id for the input element */
|
|
43
|
-
export let id =
|
|
43
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
44
44
|
|
|
45
45
|
/** Specify a name attribute for the input */
|
|
46
46
|
export let name = "";
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
export let tabindex = "0";
|
|
40
40
|
|
|
41
41
|
/** Set an id for the input element */
|
|
42
|
-
export let id =
|
|
42
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
43
43
|
|
|
44
44
|
/** Specify a name attribute for the input */
|
|
45
45
|
export let name = "";
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
export let fadeIn = false;
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
|
-
* Method invoked to load the image provided a `src` value
|
|
45
|
+
* Method invoked to load the image provided a `src` value.
|
|
46
|
+
* If no URL is provided, uses the component's `src` prop.
|
|
46
47
|
* @type {(url?: string) => void}
|
|
47
|
-
* @param {string} [url] - Optional URL to load. If not provided, uses the component's `src` prop
|
|
48
48
|
* @example
|
|
49
49
|
* ```svelte
|
|
50
50
|
* <ImageLoader bind:this={loader} src="default.jpg" />
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
export let translateWithId = (id) => defaultTranslations[id];
|
|
23
23
|
|
|
24
24
|
/** Set an id for the top-level element */
|
|
25
|
-
export let id =
|
|
25
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
26
26
|
|
|
27
27
|
/** Obtain a reference to the top-level HTML element */
|
|
28
28
|
export let ref = null;
|
package/src/Modal/Modal.svelte
CHANGED
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
export let preventCloseOnClickOutside = false;
|
|
99
99
|
|
|
100
100
|
/** Set an id for the top-level element */
|
|
101
|
-
export let id =
|
|
101
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
102
102
|
|
|
103
103
|
/** Obtain a reference to the top-level HTML element */
|
|
104
104
|
export let ref = null;
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
export let hideLabel = false;
|
|
146
146
|
|
|
147
147
|
/** Set an id for the list box component */
|
|
148
|
-
export let id =
|
|
148
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
* Specify a name attribute for the select.
|
|
@@ -546,6 +546,7 @@
|
|
|
546
546
|
role="option"
|
|
547
547
|
aria-labelledby="checkbox-{item.id}"
|
|
548
548
|
aria-selected={item.checked}
|
|
549
|
+
aria-checked={item.checked}
|
|
549
550
|
active={item.checked}
|
|
550
551
|
highlighted={highlightedIndex === i}
|
|
551
552
|
disabled={item.disabled}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* Specify the ARIA label for the status icon.
|
|
33
33
|
* @type {string}
|
|
34
34
|
* */
|
|
35
|
-
export let statusIconDescription = kind
|
|
35
|
+
export let statusIconDescription = `${kind} icon`;
|
|
36
36
|
|
|
37
37
|
/** Specify the ARIA label for the close button */
|
|
38
38
|
export let closeButtonDescription = "Close notification";
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
/**
|
|
53
53
|
* Add a notification to the queue.
|
|
54
54
|
* If a notification with the same id exists, the call is ignored.
|
|
55
|
-
*
|
|
56
|
-
* @
|
|
55
|
+
* Returns the notification id (either the provided id or a generated one).
|
|
56
|
+
* @type {(notification: NotificationData) => string}
|
|
57
57
|
*/
|
|
58
58
|
export function add(notification) {
|
|
59
59
|
const id = notification.id ?? generateId();
|
|
@@ -83,8 +83,8 @@
|
|
|
83
83
|
|
|
84
84
|
/**
|
|
85
85
|
* Remove a notification by id.
|
|
86
|
-
*
|
|
87
|
-
* @
|
|
86
|
+
* Returns true if the notification was found and removed, false otherwise.
|
|
87
|
+
* @type {(id: string) => boolean}
|
|
88
88
|
*/
|
|
89
89
|
export function remove(id) {
|
|
90
90
|
const index = notifications.findIndex((n) => n.id === id);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
* Specify the ARIA label for the status icon.
|
|
33
33
|
* @type {string}
|
|
34
34
|
* */
|
|
35
|
-
export let statusIconDescription = kind
|
|
35
|
+
export let statusIconDescription = `${kind} icon`;
|
|
36
36
|
|
|
37
37
|
/** Specify the ARIA label for the close button */
|
|
38
38
|
export let closeButtonDescription = "Close notification";
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
export let iconDescription = "Open and close list of options";
|
|
49
49
|
|
|
50
50
|
/** Set an id for the button element */
|
|
51
|
-
export let id =
|
|
51
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
52
52
|
|
|
53
53
|
/** Obtain a reference to the trigger button element */
|
|
54
54
|
export let buttonRef = null;
|
|
@@ -170,14 +170,14 @@
|
|
|
170
170
|
|
|
171
171
|
if (direction === "top") {
|
|
172
172
|
menuRef.style.top = "auto";
|
|
173
|
-
menuRef.style.bottom = height
|
|
173
|
+
menuRef.style.bottom = `${height}px`;
|
|
174
174
|
} else if (direction === "bottom") {
|
|
175
|
-
menuRef.style.top = height
|
|
175
|
+
menuRef.style.top = `${height}px`;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
if (ctxBreadcrumbItem) {
|
|
179
|
-
menuRef.style.top = height + 10
|
|
180
|
-
menuRef.style.left = -11
|
|
179
|
+
menuRef.style.top = `${height + 10}px`;
|
|
180
|
+
menuRef.style.left = `${-11}px`;
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
183
|
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
// Use CSS custom properties instead of dynamic style injection for better
|
|
199
199
|
// performance. The previous approach created individual `style` tags per
|
|
200
200
|
// instance, causing overhead when many OverflowMenu components are rendered.
|
|
201
|
-
$: overflowMenuOptionsAfterWidth = buttonWidth ? buttonWidth
|
|
201
|
+
$: overflowMenuOptionsAfterWidth = buttonWidth ? `${buttonWidth}px` : "2rem";
|
|
202
202
|
</script>
|
|
203
203
|
|
|
204
204
|
<svelte:window
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
export let requireTitle = true;
|
|
35
35
|
|
|
36
36
|
/** Set an id for the top-level element */
|
|
37
|
-
export let id =
|
|
37
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
38
38
|
|
|
39
39
|
/** Obtain a reference to the HTML element */
|
|
40
40
|
export let ref = null;
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
`of ${total.toLocaleString()} page${total === 1 ? "" : "s"}`;
|
|
95
95
|
|
|
96
96
|
/** Set an id for the top-level element */
|
|
97
|
-
export let id =
|
|
97
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
98
98
|
|
|
99
99
|
import { createEventDispatcher } from "svelte";
|
|
100
100
|
import Button from "../Button/Button.svelte";
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
export let helperText = "";
|
|
37
37
|
|
|
38
38
|
/** Set an id for the progress bar element */
|
|
39
|
-
export let id =
|
|
39
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
40
40
|
|
|
41
41
|
import CheckmarkFilled from "../icons/CheckmarkFilled.svelte";
|
|
42
42
|
import ErrorFilled from "../icons/ErrorFilled.svelte";
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
finished: CheckmarkFilled,
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
let helperId =
|
|
49
|
+
let helperId = `ccs-${Math.random().toString(36)}`;
|
|
50
50
|
|
|
51
51
|
$: indeterminate = value === undefined && status === "active";
|
|
52
52
|
let capped;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
export let secondaryLabel = "";
|
|
22
22
|
|
|
23
23
|
/** Set an id for the top-level element */
|
|
24
|
-
export let id =
|
|
24
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
25
25
|
|
|
26
26
|
import { getContext, onMount } from "svelte";
|
|
27
27
|
import CheckmarkOutline from "../icons/CheckmarkOutline.svelte";
|
package/src/Search/Search.svelte
CHANGED
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
export let icon = IconSearch;
|
|
61
61
|
|
|
62
62
|
/** Set an id for the input element */
|
|
63
|
-
export let id =
|
|
63
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
64
64
|
|
|
65
65
|
/** Obtain a reference to the input HTML element */
|
|
66
66
|
export let ref = null;
|
package/src/Select/Select.svelte
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
import { getContext, onMount } from "svelte";
|
|
36
36
|
|
|
37
|
-
const id =
|
|
37
|
+
const id = `ccs-${Math.random().toString(36)}`;
|
|
38
38
|
const ctx = getContext("Select") || getContext("TimePickerSelect");
|
|
39
39
|
|
|
40
40
|
$: ctx?.setDefaultValue?.(id, value);
|
package/src/Slider/Slider.svelte
CHANGED
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
export let fullWidth = false;
|
|
51
51
|
|
|
52
52
|
/** Set an id for the slider div element */
|
|
53
|
-
export let id =
|
|
53
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
54
54
|
|
|
55
55
|
/** Set to `true` to indicate an invalid state */
|
|
56
56
|
export let invalid = false;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
export let value = "value";
|
|
10
10
|
|
|
11
11
|
/** Set an id for the input element */
|
|
12
|
-
export let id =
|
|
12
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
13
13
|
|
|
14
14
|
/** Specify a name attribute for the input */
|
|
15
15
|
export let name = "";
|
package/src/Tabs/Tab.svelte
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
export let tabindex = "0";
|
|
22
22
|
|
|
23
23
|
/** Set an id for the top-level element */
|
|
24
|
-
export let id =
|
|
24
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
25
25
|
|
|
26
26
|
/** Obtain a reference to the anchor HTML element */
|
|
27
27
|
export let ref = null;
|
package/src/Tag/Tag.svelte
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
export let icon = undefined;
|
|
33
33
|
|
|
34
34
|
/** Set an id for the filterable tag */
|
|
35
|
-
export let id =
|
|
35
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
36
36
|
|
|
37
37
|
import { createEventDispatcher } from "svelte";
|
|
38
38
|
import Close from "../icons/Close.svelte";
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
export let tabindex = "0";
|
|
28
28
|
|
|
29
29
|
/** Set an id for the top-level div element */
|
|
30
|
-
export let id =
|
|
30
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
31
31
|
|
|
32
32
|
/** Obtain a reference to the top-level element */
|
|
33
33
|
export let ref = null;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
export let iconDescription = "Tile checkmark";
|
|
26
26
|
|
|
27
27
|
/** Set an id for the input element */
|
|
28
|
-
export let id =
|
|
28
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* Specify a name attribute for the radio tile input.
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
export let iconDescription = "Tile checkmark";
|
|
27
27
|
|
|
28
28
|
/** Set an id for the input element */
|
|
29
|
-
export let id =
|
|
29
|
+
export let id = `ccs-${Math.random().toString(36)}`;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Specify a name attribute for the input.
|
package/src/Toggle/Toggle.svelte
CHANGED