@placeholderco/placeholder-ui 1.0.11 → 2.0.0
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/LICENSE +1 -1
- package/README.md +134 -130
- package/dist/app.css +178 -0
- package/dist/bootstrap.min.css +3600 -0
- package/dist/cards/GitCard.svelte +115 -0
- package/dist/cards/GitCard.svelte.d.ts +22 -0
- package/dist/display/Avatar.svelte +29 -17
- package/dist/display/Avatar.svelte.d.ts +12 -2
- package/dist/display/LinkCollection.svelte +40 -18
- package/dist/display/LinkCollection.svelte.d.ts +9 -2
- package/dist/display/Paper.svelte +31 -19
- package/dist/display/Paper.svelte.d.ts +12 -3
- package/dist/display/alert/Alert.svelte +129 -0
- package/dist/display/alert/Alert.svelte.d.ts +15 -0
- package/dist/display/alert/AlertVariant.d.ts +1 -0
- package/dist/display/alert/AlertVariant.js +1 -0
- package/dist/display/filetree/FileTree.svelte +259 -0
- package/dist/display/filetree/FileTree.svelte.d.ts +76 -0
- package/dist/display/filetree/FileTreeItem.svelte +396 -0
- package/dist/display/filetree/FileTreeItem.svelte.d.ts +40 -0
- package/dist/display/filetree/FileTreeNode.d.ts +46 -0
- package/dist/display/filetree/FileTreeNode.js +115 -0
- package/dist/display/filetree/index.d.ts +5 -0
- package/dist/display/filetree/index.js +3 -0
- package/dist/editors/CodeMirror.svelte +306 -0
- package/dist/editors/CodeMirror.svelte.d.ts +31 -0
- package/dist/editors/tiptap/LinkActionMenu.svelte +307 -0
- package/dist/editors/tiptap/LinkActionMenu.svelte.d.ts +8 -0
- package/dist/editors/tiptap/TipTap.svelte +856 -0
- package/dist/editors/tiptap/TipTap.svelte.d.ts +54 -0
- package/dist/editors/tiptap/TipTapBubble.svelte +790 -0
- package/dist/editors/tiptap/TipTapBubble.svelte.d.ts +44 -0
- package/dist/editors/tiptap/collaboration.d.ts +55 -0
- package/dist/editors/tiptap/collaboration.js +1 -0
- package/dist/editors/tiptap/extensions/Alert.d.ts +18 -0
- package/dist/editors/tiptap/extensions/Alert.js +72 -0
- package/dist/editors/tiptap/extensions/CodeBlockEditor.d.ts +21 -0
- package/dist/editors/tiptap/extensions/CodeBlockEditor.js +326 -0
- package/dist/editors/tiptap/extensions/Div.d.ts +19 -0
- package/dist/editors/tiptap/extensions/Div.js +89 -0
- package/dist/editors/tiptap/extensions/Span.d.ts +5 -0
- package/dist/editors/tiptap/extensions/Span.js +56 -0
- package/dist/editors/tiptap/extensions/codeBlockEditor.css +236 -0
- package/dist/editors/tiptap/extensions/codeBlockLanguages.d.ts +17 -0
- package/dist/editors/tiptap/extensions/codeBlockLanguages.js +124 -0
- package/dist/editors/tiptap/extensions/index.d.ts +7 -0
- package/dist/editors/tiptap/extensions/index.js +5 -0
- package/dist/editors/tiptap/toolbar/AlertButton.svelte +261 -0
- package/dist/editors/tiptap/toolbar/AlertButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/AlignCenterButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/AlignJustifyButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/AlignLeftButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/AlignRightButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/AlignRightButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/BoldButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/BoldButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/BulletListButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/BulletListButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/CodeBlockButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/CodeBlockButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/CodeButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/CodeButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/ColorButton.svelte +299 -0
- package/dist/editors/tiptap/toolbar/ColorButton.svelte.d.ts +20 -0
- package/dist/editors/tiptap/toolbar/DocumentButton.svelte +58 -0
- package/dist/editors/tiptap/toolbar/DocumentButton.svelte.d.ts +9 -0
- package/dist/editors/tiptap/toolbar/HeadingButton.svelte +30 -0
- package/dist/editors/tiptap/toolbar/HeadingButton.svelte.d.ts +8 -0
- package/dist/editors/tiptap/toolbar/HtmlButton.svelte +68 -0
- package/dist/editors/tiptap/toolbar/HtmlButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/ImageButton.svelte +54 -0
- package/dist/editors/tiptap/toolbar/ImageButton.svelte.d.ts +8 -0
- package/dist/editors/tiptap/toolbar/ItalicButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/ItalicButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/LinkButton.svelte +257 -0
- package/dist/editors/tiptap/toolbar/LinkButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/OrderedListButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/OrderedListButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/RedoButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/RedoButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/StrikethroughButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/SubscriptButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/SubscriptButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/SuperscriptButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/TableButton.svelte +258 -0
- package/dist/editors/tiptap/toolbar/TableButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/ToolbarButton.svelte +84 -0
- package/dist/editors/tiptap/toolbar/ToolbarButton.svelte.d.ts +10 -0
- package/dist/editors/tiptap/toolbar/UnderlineButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/UnderlineButton.svelte.d.ts +7 -0
- package/dist/editors/tiptap/toolbar/UndoButton.svelte +18 -0
- package/dist/editors/tiptap/toolbar/UndoButton.svelte.d.ts +7 -0
- package/dist/form/Autocomplete.svelte +270 -137
- package/dist/form/Autocomplete.svelte.d.ts +58 -10
- package/dist/form/AutocompleteMulti.svelte +385 -227
- package/dist/form/AutocompleteMulti.svelte.d.ts +59 -10
- package/dist/form/Checkbox.svelte +124 -43
- package/dist/form/Checkbox.svelte.d.ts +26 -2
- package/dist/form/Chips.svelte +47 -17
- package/dist/form/Chips.svelte.d.ts +24 -3
- package/dist/form/ComboBox.svelte +30 -20
- package/dist/form/ComboBox.svelte.d.ts +1 -1
- package/dist/form/ComboBoxItemBuilder.svelte +161 -188
- package/dist/form/ComboBoxItemBuilder.svelte.d.ts +19 -2
- package/dist/form/ComboBoxMulti.svelte +38 -24
- package/dist/form/ComboBoxMulti.svelte.d.ts +1 -1
- package/dist/form/CronBuilder.svelte +84 -67
- package/dist/form/CronBuilder.svelte.d.ts +16 -3
- package/dist/form/DatePicker.svelte +177 -191
- package/dist/form/DatePicker.svelte.d.ts +17 -2
- package/dist/form/DateRangePicker.svelte +775 -0
- package/dist/form/DateRangePicker.svelte.d.ts +23 -0
- package/dist/form/DateTimePicker.svelte +168 -209
- package/dist/form/DateTimePicker.svelte.d.ts +10 -2
- package/dist/form/FormGroup.svelte +33 -10
- package/dist/form/FormGroup.svelte.d.ts +12 -2
- package/dist/form/Number.svelte +71 -29
- package/dist/form/Number.svelte.d.ts +39 -6
- package/dist/form/Radio.svelte +174 -0
- package/dist/form/Radio.svelte.d.ts +21 -0
- package/dist/form/RadioGroup.svelte +52 -138
- package/dist/form/RadioGroup.svelte.d.ts +19 -2
- package/dist/form/SegmentedControl.svelte +103 -57
- package/dist/form/SegmentedControl.svelte.d.ts +12 -2
- package/dist/form/Select.svelte +160 -229
- package/dist/form/Select.svelte.d.ts +35 -6
- package/dist/form/SelectMulti.svelte +166 -277
- package/dist/form/SelectMulti.svelte.d.ts +37 -6
- package/dist/form/Slider.svelte +185 -268
- package/dist/form/Slider.svelte.d.ts +33 -16
- package/dist/form/StringArrayBuilder.svelte +249 -0
- package/dist/form/StringArrayBuilder.svelte.d.ts +15 -0
- package/dist/form/Switch.svelte +164 -106
- package/dist/form/Switch.svelte.d.ts +22 -3
- package/dist/form/TextArea.svelte +80 -45
- package/dist/form/TextArea.svelte.d.ts +35 -10
- package/dist/form/Textbox.svelte +80 -47
- package/dist/form/Textbox.svelte.d.ts +41 -8
- package/dist/form/TimePicker.svelte +42 -47
- package/dist/form/TimePicker.svelte.d.ts +12 -2
- package/dist/form/comboBoxCore.svelte.d.ts +99 -0
- package/dist/form/comboBoxCore.svelte.js +243 -0
- package/dist/icon/Icon.svelte +8 -3
- package/dist/icon/Icon.svelte.d.ts +8 -3
- package/dist/icon/cube-send.svg +1 -0
- package/dist/icon/file-type-bmp.svg +1 -0
- package/dist/icon/file-type-csv.svg +1 -0
- package/dist/icon/file-type-doc.svg +1 -0
- package/dist/icon/file-type-docx.svg +1 -0
- package/dist/icon/file-type-jpg.svg +1 -0
- package/dist/icon/file-type-pdf.svg +1 -0
- package/dist/icon/file-type-png.svg +1 -0
- package/dist/icon/file-type-ppt.svg +1 -0
- package/dist/icon/file-type-svg.svg +1 -0
- package/dist/icon/file-type-txt.svg +1 -0
- package/dist/icon/file-type-xls.svg +1 -0
- package/dist/icon/file-type-zip.svg +1 -0
- package/dist/icon/index.d.ts +166 -145
- package/dist/icon/index.js +166 -146
- package/dist/icon/layout-sidebar-left-collapse.svg +1 -0
- package/dist/icon/layout-sidebar-left-expand.svg +1 -0
- package/dist/icon/logo-placeholder.svg +6 -0
- package/dist/icon/paperclip.svg +1 -0
- package/dist/icon/source-code.svg +1 -0
- package/dist/icon/sun-moon.svg +1 -0
- package/dist/icon/table.svg +6 -0
- package/dist/icon/thumb-down.svg +1 -0
- package/dist/icon/thumb-up.svg +1 -0
- package/dist/index.d.ts +93 -22
- package/dist/index.js +28 -27
- package/dist/layout/AppShell.svelte +12 -162
- package/dist/layout/AppShell.svelte.d.ts +6 -27
- package/dist/layout/CustomNavbar.svelte +9 -7
- package/dist/layout/CustomNavbar.svelte.d.ts +4 -2
- package/dist/layout/Navbar.svelte +158 -110
- package/dist/layout/Navbar.svelte.d.ts +26 -12
- package/dist/layout/NavbarItemDisplay.svelte +2 -2
- package/dist/layout/NavbarItemView.svelte +182 -0
- package/dist/layout/NavbarItemView.svelte.d.ts +10 -0
- package/dist/layout/Sidenav.svelte +280 -341
- package/dist/layout/Sidenav.svelte.d.ts +36 -4
- package/dist/models/ComboBoxItem.d.ts +2 -0
- package/dist/models/Employee.d.ts +53 -0
- package/dist/models/Employee.js +23 -0
- package/dist/models/Hyperlink.d.ts +3 -1
- package/dist/models/LinkCollectionItem.d.ts +3 -1
- package/dist/models/NavbarItem.d.ts +6 -2
- package/dist/theme.svelte.d.ts +0 -1
- package/dist/theme.svelte.js +46 -58
- package/dist/ui/Accordion.svelte +81 -242
- package/dist/ui/Accordion.svelte.d.ts +37 -14
- package/dist/ui/AccordionItem.svelte +303 -0
- package/dist/ui/AccordionItem.svelte.d.ts +21 -0
- package/dist/ui/ActionIcon.svelte +25 -21
- package/dist/ui/ActionIcon.svelte.d.ts +15 -2
- package/dist/ui/Badge.svelte +170 -161
- package/dist/ui/Badge.svelte.d.ts +16 -4
- package/dist/ui/Button.svelte +178 -205
- package/dist/ui/Button.svelte.d.ts +19 -2
- package/dist/ui/ButtonVariant.d.ts +15 -1
- package/dist/ui/ContextMenu.svelte +146 -0
- package/dist/ui/ContextMenu.svelte.d.ts +37 -0
- package/dist/ui/ContextMenuList.svelte +188 -0
- package/dist/ui/ContextMenuList.svelte.d.ts +12 -0
- package/dist/ui/Dialog.svelte +183 -104
- package/dist/ui/Dialog.svelte.d.ts +21 -2
- package/dist/ui/Drawer.svelte +237 -184
- package/dist/ui/Drawer.svelte.d.ts +20 -2
- package/dist/ui/Dropdown.svelte +24 -14
- package/dist/ui/Dropdown.svelte.d.ts +11 -2
- package/dist/ui/Dropzone.svelte +159 -57
- package/dist/ui/Dropzone.svelte.d.ts +29 -2
- package/dist/ui/Link.svelte +12 -4
- package/dist/ui/Link.svelte.d.ts +8 -2
- package/dist/ui/Loader.svelte +23 -18
- package/dist/ui/Loader.svelte.d.ts +5 -2
- package/dist/ui/Logo.svelte +37 -0
- package/dist/ui/Logo.svelte.d.ts +16 -0
- package/dist/ui/MultiSortable.svelte +287 -0
- package/dist/ui/MultiSortable.svelte.d.ts +50 -0
- package/dist/ui/Pagination.svelte +12 -6
- package/dist/ui/Pagination.svelte.d.ts +6 -2
- package/dist/ui/Popover.svelte +43 -65
- package/dist/ui/Popover.svelte.d.ts +14 -5
- package/dist/ui/ProgressBar.svelte +169 -0
- package/dist/ui/ProgressBar.svelte.d.ts +30 -0
- package/dist/ui/ProgressBarVariant.d.ts +7 -0
- package/dist/ui/ProgressBarVariant.js +1 -0
- package/dist/ui/SegmentedControl.svelte +0 -0
- package/dist/ui/SegmentedControl.svelte.d.ts +26 -0
- package/dist/ui/Sortable.svelte +163 -0
- package/dist/ui/Sortable.svelte.d.ts +47 -0
- package/dist/ui/Table.svelte +497 -56
- package/dist/ui/Table.svelte.d.ts +64 -2
- package/dist/ui/Tabs.svelte +22 -18
- package/dist/ui/Tabs.svelte.d.ts +6 -2
- package/dist/ui/ThemeSwitcher.svelte +26 -7
- package/dist/ui/ThemeSwitcher.svelte.d.ts +4 -2
- package/dist/ui/Tooltip.svelte +312 -180
- package/dist/ui/Tooltip.svelte.d.ts +4 -3
- package/dist/uiTheme.svelte.d.ts +86 -0
- package/dist/uiTheme.svelte.js +214 -0
- package/dist/util/DateFunctions.js +1 -1
- package/dist/util/DragDrop.d.ts +50 -0
- package/dist/util/DragDrop.js +154 -0
- package/dist/util/NavigateTo.js +2 -2
- package/dist/util/dayjs.d.ts +4 -0
- package/dist/util/dayjs.js +15 -0
- package/dist/util/interceptLinkClick.d.ts +13 -0
- package/dist/util/interceptLinkClick.js +33 -0
- package/package.json +66 -26
- package/dist/display/Alert.svelte +0 -179
- package/dist/display/Alert.svelte.d.ts +0 -13
- package/dist/form/FileInput.svelte +0 -235
- package/dist/form/FileInput.svelte.d.ts +0 -23
- package/dist/form/PasswordInput.svelte +0 -252
- package/dist/form/PasswordInput.svelte.d.ts +0 -33
- package/dist/form/Rating.svelte +0 -235
- package/dist/form/Rating.svelte.d.ts +0 -21
- package/dist/styles/components.css +0 -199
- package/dist/styles/dark.css +0 -146
- package/dist/styles/index.css +0 -116
- package/dist/styles/reset.css +0 -110
- package/dist/styles/semantic.css +0 -86
- package/dist/styles/tokens.css +0 -203
- package/dist/styles/utilities.css +0 -523
- package/dist/ui/Breadcrumbs.svelte +0 -131
- package/dist/ui/Breadcrumbs.svelte.d.ts +0 -16
- package/dist/ui/LoadingOverlay.svelte +0 -53
- package/dist/ui/LoadingOverlay.svelte.d.ts +0 -11
- package/dist/ui/Progress.svelte +0 -191
- package/dist/ui/Progress.svelte.d.ts +0 -15
- package/dist/ui/RingProgress.svelte +0 -141
- package/dist/ui/RingProgress.svelte.d.ts +0 -18
- package/dist/ui/Skeleton.svelte +0 -85
- package/dist/ui/Skeleton.svelte.d.ts +0 -12
- package/dist/ui/Stepper.svelte +0 -355
- package/dist/ui/Stepper.svelte.d.ts +0 -24
- package/dist/ui/Timeline.svelte +0 -225
- package/dist/ui/Timeline.svelte.d.ts +0 -23
- /package/dist/{actions → util}/ClickOutside.d.ts +0 -0
- /package/dist/{actions → util}/ClickOutside.js +0 -0
- /package/dist/{transitions → util}/Transitions.d.ts +0 -0
- /package/dist/{transitions → util}/Transitions.js +0 -0
|
@@ -1,28 +1,77 @@
|
|
|
1
|
-
import type { ComboBoxItem, FetchFunctionType, SearchFunctionType } from
|
|
2
|
-
import {
|
|
3
|
-
interface
|
|
1
|
+
import type { ComboBoxGroup, ComboBoxItem, FetchFunctionType, RetrieveLabelFunctionType, SearchFunctionType } from '../models/ComboBoxItem.js';
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
export interface AutocompleteMultiProps {
|
|
4
|
+
/** HTML name attribute for the input */
|
|
5
|
+
name?: string;
|
|
6
|
+
/** Label text displayed above the input */
|
|
4
7
|
label?: string;
|
|
8
|
+
/** Array of selected values (bindable) */
|
|
5
9
|
values?: string[];
|
|
10
|
+
/**
|
|
11
|
+
* Array of full selected item objects (bindable). Can be passed initially to preset
|
|
12
|
+
* the selection with known labels — no `values` or retrieveLabelFunction needed.
|
|
13
|
+
*/
|
|
6
14
|
rawValues?: ComboBoxItem[];
|
|
15
|
+
/** Placeholder text when nothing is selected */
|
|
7
16
|
placeholder?: string;
|
|
17
|
+
/** Mark field as required (shows asterisk) */
|
|
18
|
+
required?: boolean;
|
|
19
|
+
/** CSS classes for the control element */
|
|
8
20
|
class?: string;
|
|
21
|
+
/** CSS classes for the container element */
|
|
22
|
+
containerClass?: string;
|
|
23
|
+
/** CSS classes for the FormGroup wrapper */
|
|
24
|
+
groupClass?: string;
|
|
25
|
+
/** Disable the input */
|
|
9
26
|
disabled?: boolean;
|
|
10
|
-
|
|
27
|
+
/** Show error state styling */
|
|
11
28
|
showError?: boolean;
|
|
29
|
+
/** Error message to display */
|
|
12
30
|
errorText?: string;
|
|
31
|
+
/** Auto-focus the input on mount */
|
|
13
32
|
autofocus?: boolean;
|
|
14
|
-
|
|
33
|
+
/** Auto-focus on every dialog open */
|
|
34
|
+
autofocusDialog?: boolean;
|
|
35
|
+
/** Hide "no results" message when search finds nothing */
|
|
36
|
+
hideNoResults?: boolean;
|
|
37
|
+
/** Close the dropdown after selecting an option */
|
|
38
|
+
closeOnSelection?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Offer to add the typed text as a new chip when it doesn't match an existing option.
|
|
41
|
+
* On by default — set to `false` to restrict selection to the provided options.
|
|
42
|
+
*/
|
|
43
|
+
allowAdd?: boolean;
|
|
44
|
+
/** Builds the label shown for the "add new value" suggestion (default: `Add "<value>"`) */
|
|
45
|
+
addItemLabel?: (value: string) => string;
|
|
46
|
+
/** Text shown while loading options */
|
|
15
47
|
loadingText?: string;
|
|
48
|
+
/** SVG icon displayed on the left side */
|
|
49
|
+
leftIconSvg?: string;
|
|
50
|
+
/** Static list of autocomplete options */
|
|
16
51
|
options?: ComboBoxItem[];
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
52
|
+
/** Options organized into groups */
|
|
53
|
+
groupedOptions?: ComboBoxGroup[];
|
|
54
|
+
/** Position of the tooltip */
|
|
55
|
+
tooltipLocation?: 'top' | 'bottom' | 'left' | 'right';
|
|
56
|
+
/** Async function to fetch all options */
|
|
57
|
+
fetchFunction?: FetchFunctionType | null;
|
|
58
|
+
/** Async function to search/filter options based on input */
|
|
59
|
+
searchFunction?: SearchFunctionType | null;
|
|
60
|
+
/** Async function to retrieve labels for values */
|
|
61
|
+
retrieveLabelFunction?: RetrieveLabelFunctionType | null;
|
|
62
|
+
/** Rich tooltip content using a Svelte snippet */
|
|
20
63
|
tooltipContent?: Snippet;
|
|
64
|
+
/** Simple tooltip text */
|
|
21
65
|
tooltipText?: string;
|
|
66
|
+
/** Callback when Enter is pressed with the current filter text */
|
|
67
|
+
enterPressed?: (e: string) => void;
|
|
68
|
+
/** Callback when selection changes (returns value strings) */
|
|
22
69
|
onchange?: (e: string[]) => void;
|
|
70
|
+
/** Callback when selection changes (returns full item objects) */
|
|
23
71
|
onchangeRaw?: (e: ComboBoxItem[]) => void;
|
|
24
|
-
|
|
72
|
+
/** Callback when the user chooses to add the typed value as a new item */
|
|
73
|
+
onItemAdded?: (value: string) => void;
|
|
25
74
|
}
|
|
26
|
-
declare const AutocompleteMulti: import("svelte").Component<
|
|
75
|
+
declare const AutocompleteMulti: import("svelte").Component<AutocompleteMultiProps, {}, "values" | "rawValues">;
|
|
27
76
|
type AutocompleteMulti = ReturnType<typeof AutocompleteMulti>;
|
|
28
77
|
export default AutocompleteMulti;
|
|
@@ -1,17 +1,48 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
|
|
1
|
+
<script module lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
export interface CheckboxProps {
|
|
5
|
+
/** HTML name attribute for the checkbox (falls back to label, then auto-generated) */
|
|
6
|
+
name?: string;
|
|
7
|
+
/** Label text displayed next to the checkbox */
|
|
3
8
|
label?: string;
|
|
9
|
+
/** Mark field as required (shows asterisk) */
|
|
4
10
|
required?: boolean;
|
|
11
|
+
/** Additional CSS classes */
|
|
5
12
|
class?: string;
|
|
13
|
+
/** Custom ID for the input element */
|
|
6
14
|
inputId?: string;
|
|
15
|
+
/** Disable the checkbox */
|
|
7
16
|
disabled?: boolean;
|
|
17
|
+
/** Show error state styling */
|
|
8
18
|
showError?: boolean;
|
|
19
|
+
/** Error message to display */
|
|
9
20
|
errorText?: string;
|
|
21
|
+
/** Whether the checkbox is checked (bindable) */
|
|
10
22
|
checked?: boolean;
|
|
23
|
+
/** When true, the checkbox state is controlled externally only. Clicking will call onchange but won't toggle the checkbox. */
|
|
24
|
+
controlled?: boolean;
|
|
25
|
+
/** Whether the checkbox is in an indeterminate state */
|
|
26
|
+
indeterminate?: boolean;
|
|
27
|
+
/** Callback when checked state changes */
|
|
11
28
|
onchange?: (e: boolean) => void;
|
|
29
|
+
/** Accessible label for screen readers (use when no visible label) */
|
|
30
|
+
ariaLabel?: string;
|
|
31
|
+
/** Simple tooltip text */
|
|
32
|
+
tooltipText?: string;
|
|
33
|
+
/** Position of the tooltip */
|
|
34
|
+
tooltipLocation?: 'top' | 'bottom' | 'left' | 'right';
|
|
35
|
+
/** Rich tooltip content using a Svelte snippet */
|
|
36
|
+
tooltipContent?: Snippet;
|
|
12
37
|
}
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<script lang="ts">
|
|
41
|
+
import { Icon, iconInfoCircle } from '../icon/index.js';
|
|
42
|
+
import Tooltip from '../ui/Tooltip.svelte';
|
|
13
43
|
|
|
14
44
|
let {
|
|
45
|
+
name,
|
|
15
46
|
label,
|
|
16
47
|
required = false,
|
|
17
48
|
class: classes = '',
|
|
@@ -20,28 +51,67 @@
|
|
|
20
51
|
showError = false,
|
|
21
52
|
errorText = '',
|
|
22
53
|
checked = $bindable(false),
|
|
23
|
-
|
|
24
|
-
|
|
54
|
+
controlled = false,
|
|
55
|
+
indeterminate = false,
|
|
56
|
+
onchange = undefined,
|
|
57
|
+
ariaLabel = undefined,
|
|
58
|
+
tooltipText = undefined,
|
|
59
|
+
tooltipLocation = 'top',
|
|
60
|
+
tooltipContent = undefined
|
|
61
|
+
}: CheckboxProps = $props();
|
|
25
62
|
|
|
63
|
+
const autoName = `checkbox-${crypto.randomUUID()}`;
|
|
26
64
|
const nonce = Math.random().toString(36).substring(2, 15);
|
|
27
65
|
|
|
66
|
+
let resolvedName = $derived(
|
|
67
|
+
(name || label || autoName).replace(/[^a-zA-Z0-9_\-:.]/g, '_')
|
|
68
|
+
);
|
|
69
|
+
|
|
28
70
|
const id = $derived(inputId ? inputId : label ? `input-${label}` : `input-${nonce}`);
|
|
71
|
+
|
|
72
|
+
let inputEl = $state<HTMLInputElement>();
|
|
73
|
+
$effect(() => { if (inputEl) inputEl.indeterminate = indeterminate; });
|
|
29
74
|
</script>
|
|
30
75
|
|
|
31
76
|
<div class="checkbox-container {disabled ? 'disabled' : ''}">
|
|
32
77
|
<label for={id}>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
78
|
+
{#if controlled}
|
|
79
|
+
<input
|
|
80
|
+
bind:this={inputEl}
|
|
81
|
+
class="checkbox text-base accent-accent mr-1 {showError && 'error'} {classes}"
|
|
82
|
+
type="checkbox"
|
|
83
|
+
{id}
|
|
84
|
+
name={resolvedName}
|
|
85
|
+
{disabled}
|
|
86
|
+
{checked}
|
|
87
|
+
aria-label={ariaLabel}
|
|
88
|
+
onchange={(e) => {
|
|
89
|
+
e.currentTarget.checked = checked;
|
|
90
|
+
onchange?.(!checked);
|
|
91
|
+
}}
|
|
92
|
+
/>
|
|
93
|
+
{:else}
|
|
94
|
+
<input
|
|
95
|
+
bind:this={inputEl}
|
|
96
|
+
class="checkbox text-base accent-accent mr-1 {showError && 'error'} {classes}"
|
|
97
|
+
type="checkbox"
|
|
98
|
+
{id}
|
|
99
|
+
name={resolvedName}
|
|
100
|
+
{disabled}
|
|
101
|
+
bind:checked
|
|
102
|
+
aria-label={ariaLabel}
|
|
103
|
+
onchange={() => onchange?.(checked)}
|
|
104
|
+
/>
|
|
105
|
+
{/if}
|
|
41
106
|
<span class="label-text"
|
|
42
107
|
>{label}
|
|
43
108
|
{#if required}
|
|
44
109
|
<span class="required">*</span>
|
|
110
|
+
{/if}
|
|
111
|
+
{#if tooltipContent || tooltipText}
|
|
112
|
+
<Tooltip {tooltipContent} location={tooltipLocation} text={tooltipText}>
|
|
113
|
+
<Icon svg={iconInfoCircle} size="1em" stroke="var(--accent-color)" />
|
|
114
|
+
</Tooltip>
|
|
45
115
|
{/if}</span
|
|
46
116
|
>
|
|
47
117
|
</label>
|
|
@@ -51,12 +121,6 @@
|
|
|
51
121
|
</div>
|
|
52
122
|
|
|
53
123
|
<style>
|
|
54
|
-
.checkbox-container {
|
|
55
|
-
display: flex;
|
|
56
|
-
align-items: center;
|
|
57
|
-
gap: var(--pui-spacing-1_5);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
124
|
label {
|
|
61
125
|
display: flex;
|
|
62
126
|
flex-direction: row;
|
|
@@ -87,28 +151,28 @@
|
|
|
87
151
|
box-sizing: content-box;
|
|
88
152
|
width: 16px;
|
|
89
153
|
height: 16px;
|
|
90
|
-
border: 2px solid
|
|
91
|
-
transition: border-color
|
|
154
|
+
border: 2px solid #ccc;
|
|
155
|
+
transition: 0.2s border-color ease;
|
|
92
156
|
}
|
|
93
157
|
:global(.dark) input:before {
|
|
94
|
-
border-color:
|
|
158
|
+
border-color: #666;
|
|
95
159
|
}
|
|
96
160
|
input:checked:before {
|
|
97
|
-
border-color: var(--
|
|
98
|
-
transition: border-color
|
|
161
|
+
border-color: var(--ui-primary);
|
|
162
|
+
transition: 0.5s border-color ease;
|
|
99
163
|
}
|
|
100
164
|
:global(.dark) input:checked:before {
|
|
101
|
-
border-color: var(--
|
|
165
|
+
border-color: var(--ui-accent);
|
|
102
166
|
}
|
|
103
167
|
|
|
104
168
|
input:disabled:before {
|
|
105
|
-
border-color:
|
|
106
|
-
background-color:
|
|
169
|
+
border-color: #ccc;
|
|
170
|
+
background-color: #ccc;
|
|
107
171
|
opacity: 0.5;
|
|
108
172
|
}
|
|
109
173
|
:global(.dark) input:disabled:before {
|
|
110
|
-
border-color:
|
|
111
|
-
background-color:
|
|
174
|
+
border-color: #666;
|
|
175
|
+
background-color: #666;
|
|
112
176
|
}
|
|
113
177
|
input:after {
|
|
114
178
|
content: '';
|
|
@@ -118,7 +182,7 @@
|
|
|
118
182
|
top: 50%;
|
|
119
183
|
left: 50%;
|
|
120
184
|
transform-origin: 50% 50%;
|
|
121
|
-
background-color: var(--
|
|
185
|
+
background-color: var(--ui-primary);
|
|
122
186
|
width: 16px;
|
|
123
187
|
height: 16px;
|
|
124
188
|
border-radius: 100vh;
|
|
@@ -128,11 +192,11 @@
|
|
|
128
192
|
opacity: 0.5;
|
|
129
193
|
}
|
|
130
194
|
:global(.dark) input:after {
|
|
131
|
-
background-color: var(--
|
|
195
|
+
background-color: var(--ui-accent);
|
|
132
196
|
}
|
|
133
197
|
|
|
134
198
|
input[type='checkbox']:before {
|
|
135
|
-
border-radius:
|
|
199
|
+
border-radius: 4px;
|
|
136
200
|
}
|
|
137
201
|
input[type='checkbox']:after {
|
|
138
202
|
width: 7px;
|
|
@@ -140,29 +204,46 @@
|
|
|
140
204
|
border-radius: 0;
|
|
141
205
|
transform: translate(-50%, -85%) scale(0) rotate(45deg);
|
|
142
206
|
background-color: transparent;
|
|
143
|
-
box-shadow: 4px 4px 0px 0px var(--
|
|
207
|
+
box-shadow: 4px 4px 0px 0px var(--ui-primary);
|
|
144
208
|
}
|
|
145
209
|
:global(.dark) input[type='checkbox']:after {
|
|
146
|
-
box-shadow: 4px 4px 0px 0px var(--
|
|
210
|
+
box-shadow: 4px 4px 0px 0px var(--ui-accent);
|
|
147
211
|
}
|
|
148
212
|
input[type='checkbox']:checked:after {
|
|
149
|
-
-webkit-animation: toggleOnCheckbox
|
|
150
|
-
animation: toggleOnCheckbox
|
|
213
|
+
-webkit-animation: toggleOnCheckbox 0.2s ease forwards;
|
|
214
|
+
animation: toggleOnCheckbox 0.2s ease forwards;
|
|
215
|
+
}
|
|
216
|
+
input[type='checkbox']:indeterminate:before {
|
|
217
|
+
border-color: var(--ui-primary);
|
|
218
|
+
}
|
|
219
|
+
:global(.dark) input[type='checkbox']:indeterminate:before {
|
|
220
|
+
border-color: var(--ui-accent);
|
|
221
|
+
}
|
|
222
|
+
input[type='checkbox']:indeterminate:after {
|
|
223
|
+
width: 10px;
|
|
224
|
+
height: 2px;
|
|
225
|
+
border-radius: 1px;
|
|
226
|
+
background-color: var(--ui-primary);
|
|
227
|
+
box-shadow: none;
|
|
228
|
+
transform: translate(-50%, -50%) scale(1);
|
|
229
|
+
}
|
|
230
|
+
:global(.dark) input[type='checkbox']:indeterminate:after {
|
|
231
|
+
background-color: var(--ui-accent);
|
|
151
232
|
}
|
|
152
233
|
input[type='checkbox'].filled:before {
|
|
153
|
-
border-radius:
|
|
234
|
+
border-radius: 4px;
|
|
154
235
|
transition:
|
|
155
|
-
border-color
|
|
156
|
-
background-color
|
|
236
|
+
0.2s border-color ease,
|
|
237
|
+
0.2s background-color ease;
|
|
157
238
|
}
|
|
158
239
|
input[type='checkbox'].filled:checked:not(:disabled):before {
|
|
159
|
-
background-color: var(--
|
|
240
|
+
background-color: var(--ui-primary);
|
|
160
241
|
}
|
|
161
242
|
:global(.dark) input[type='checkbox'].filled:checked:not(:disabled):before {
|
|
162
|
-
background-color: var(--
|
|
243
|
+
background-color: var(--ui-accent);
|
|
163
244
|
}
|
|
164
245
|
input[type='checkbox'].filled:not(:disabled):after {
|
|
165
|
-
box-shadow: 4px 4px 0px 0px
|
|
246
|
+
box-shadow: 4px 4px 0px 0px white;
|
|
166
247
|
}
|
|
167
248
|
@-webkit-keyframes toggleOnCheckbox {
|
|
168
249
|
0% {
|
|
@@ -192,10 +273,10 @@
|
|
|
192
273
|
}
|
|
193
274
|
|
|
194
275
|
input.error:before {
|
|
195
|
-
border-color: var(--
|
|
276
|
+
border-color: var(--danger-text) !important;
|
|
196
277
|
}
|
|
197
278
|
|
|
198
279
|
.error-text {
|
|
199
|
-
color: var(--
|
|
280
|
+
color: var(--danger-text);
|
|
200
281
|
}
|
|
201
282
|
</style>
|
|
@@ -1,14 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
export interface CheckboxProps {
|
|
3
|
+
/** HTML name attribute for the checkbox (falls back to label, then auto-generated) */
|
|
4
|
+
name?: string;
|
|
5
|
+
/** Label text displayed next to the checkbox */
|
|
2
6
|
label?: string;
|
|
7
|
+
/** Mark field as required (shows asterisk) */
|
|
3
8
|
required?: boolean;
|
|
9
|
+
/** Additional CSS classes */
|
|
4
10
|
class?: string;
|
|
11
|
+
/** Custom ID for the input element */
|
|
5
12
|
inputId?: string;
|
|
13
|
+
/** Disable the checkbox */
|
|
6
14
|
disabled?: boolean;
|
|
15
|
+
/** Show error state styling */
|
|
7
16
|
showError?: boolean;
|
|
17
|
+
/** Error message to display */
|
|
8
18
|
errorText?: string;
|
|
19
|
+
/** Whether the checkbox is checked (bindable) */
|
|
9
20
|
checked?: boolean;
|
|
21
|
+
/** When true, the checkbox state is controlled externally only. Clicking will call onchange but won't toggle the checkbox. */
|
|
22
|
+
controlled?: boolean;
|
|
23
|
+
/** Whether the checkbox is in an indeterminate state */
|
|
24
|
+
indeterminate?: boolean;
|
|
25
|
+
/** Callback when checked state changes */
|
|
10
26
|
onchange?: (e: boolean) => void;
|
|
27
|
+
/** Accessible label for screen readers (use when no visible label) */
|
|
28
|
+
ariaLabel?: string;
|
|
29
|
+
/** Simple tooltip text */
|
|
30
|
+
tooltipText?: string;
|
|
31
|
+
/** Position of the tooltip */
|
|
32
|
+
tooltipLocation?: 'top' | 'bottom' | 'left' | 'right';
|
|
33
|
+
/** Rich tooltip content using a Svelte snippet */
|
|
34
|
+
tooltipContent?: Snippet;
|
|
11
35
|
}
|
|
12
|
-
declare const Checkbox: import("svelte").Component<
|
|
36
|
+
declare const Checkbox: import("svelte").Component<CheckboxProps, {}, "checked">;
|
|
13
37
|
type Checkbox = ReturnType<typeof Checkbox>;
|
|
14
38
|
export default Checkbox;
|
package/dist/form/Chips.svelte
CHANGED
|
@@ -1,28 +1,52 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ComboBoxItem } from '../models/ComboBoxItem.js';
|
|
3
|
+
import type { ButtonVariant } from '../ui/ButtonVariant.js';
|
|
3
4
|
import FormGroup from './FormGroup.svelte';
|
|
4
5
|
import { iconCheck } from '../icon/index.js';
|
|
5
6
|
import Button from '../ui/Button.svelte';
|
|
6
7
|
|
|
7
|
-
interface
|
|
8
|
-
|
|
8
|
+
export interface ChipsProps {
|
|
9
|
+
/** Label text displayed above the chips */
|
|
10
|
+
label?: string;
|
|
11
|
+
/** Visual style variant for chips */
|
|
12
|
+
variant?: ButtonVariant;
|
|
13
|
+
/** Visual style variant for selected/checked chips */
|
|
14
|
+
selectedVariant?: ButtonVariant;
|
|
15
|
+
/** Visual style variant for deselected chips (overrides variant for unselected state) */
|
|
16
|
+
deselectedVariant?: ButtonVariant;
|
|
17
|
+
/** Available chip options */
|
|
9
18
|
options: ComboBoxItem[];
|
|
19
|
+
/** Mark field as required (shows asterisk) */
|
|
10
20
|
required?: boolean;
|
|
21
|
+
/** Show error state styling */
|
|
11
22
|
showError?: boolean;
|
|
23
|
+
/** Error message to display */
|
|
12
24
|
errorText?: string;
|
|
25
|
+
/** Additional CSS classes */
|
|
13
26
|
class?: string;
|
|
27
|
+
/** CSS classes for the container element */
|
|
14
28
|
containerClass?: string;
|
|
29
|
+
/** Disable all chips */
|
|
15
30
|
disabled?: boolean;
|
|
31
|
+
/** Selected value for single selection mode (bindable) */
|
|
16
32
|
value?: string;
|
|
33
|
+
/** Selected values for multiple selection mode (bindable) */
|
|
17
34
|
values?: string[];
|
|
35
|
+
/** Allow selecting multiple chips */
|
|
18
36
|
multiple?: boolean;
|
|
37
|
+
/** Allow deselecting the current selection */
|
|
19
38
|
deselectable?: boolean;
|
|
39
|
+
/** Position of the tooltip */
|
|
20
40
|
tooltipLocation?: 'top' | 'bottom' | 'left' | 'right';
|
|
41
|
+
/** Callback when selection changes */
|
|
21
42
|
onchange?: (e: string | string[] | undefined) => void;
|
|
22
43
|
}
|
|
23
44
|
|
|
24
45
|
let {
|
|
25
|
-
label,
|
|
46
|
+
label = '',
|
|
47
|
+
variant = undefined,
|
|
48
|
+
selectedVariant = undefined,
|
|
49
|
+
deselectedVariant = undefined,
|
|
26
50
|
options,
|
|
27
51
|
required = false,
|
|
28
52
|
showError = false,
|
|
@@ -36,7 +60,7 @@
|
|
|
36
60
|
multiple = false,
|
|
37
61
|
deselectable = true,
|
|
38
62
|
onchange = undefined
|
|
39
|
-
}:
|
|
63
|
+
}: ChipsProps = $props();
|
|
40
64
|
|
|
41
65
|
const nonce = Math.random().toString(36).substring(2, 15);
|
|
42
66
|
const randomName = $derived(label + nonce);
|
|
@@ -60,6 +84,8 @@
|
|
|
60
84
|
onchange?.(values.length > 0 ? values : undefined);
|
|
61
85
|
}
|
|
62
86
|
}
|
|
87
|
+
|
|
88
|
+
|
|
63
89
|
</script>
|
|
64
90
|
|
|
65
91
|
<div class="radio-container {containerClass}">
|
|
@@ -73,13 +99,17 @@
|
|
|
73
99
|
>
|
|
74
100
|
{#each options as option}
|
|
75
101
|
{@const checked = multiple ? values.includes(option.value) : option.value === value}
|
|
102
|
+
{@const hasSelection = multiple ? values.length > 0 : value !== undefined}
|
|
103
|
+
{@const chipVariant = checked
|
|
104
|
+
? (selectedVariant ?? variant)
|
|
105
|
+
: (deselectedVariant && (multiple || hasSelection) ? deselectedVariant : variant)}
|
|
76
106
|
<div class="flex">
|
|
77
107
|
{#if checked}
|
|
78
|
-
<Button class="chip checked" {disabled} onclick={() => handleChange(option)} svg={iconCheck} iconSize={'16px'}
|
|
108
|
+
<Button class="chip checked" {disabled} onclick={() => handleChange(option)} svg={iconCheck} iconSize={'16px'} variant={chipVariant}
|
|
79
109
|
>{option.label}</Button
|
|
80
110
|
>
|
|
81
111
|
{:else}
|
|
82
|
-
<Button class="chip" {disabled} onclick={() => handleChange(option)}
|
|
112
|
+
<Button class="chip" {disabled} onclick={() => handleChange(option)} variant={chipVariant}
|
|
83
113
|
>{option.label}</Button
|
|
84
114
|
>
|
|
85
115
|
{/if}
|
|
@@ -95,34 +125,34 @@
|
|
|
95
125
|
<style>
|
|
96
126
|
.radio-options {
|
|
97
127
|
display: flex;
|
|
98
|
-
gap:
|
|
99
|
-
border-radius:
|
|
128
|
+
gap: 0.5rem;
|
|
129
|
+
border-radius: 6px;
|
|
100
130
|
}
|
|
101
131
|
|
|
102
132
|
.radio-required {
|
|
103
|
-
padding:
|
|
133
|
+
padding: 0.25rem;
|
|
104
134
|
}
|
|
105
135
|
|
|
106
136
|
.error {
|
|
107
|
-
border: 1px solid var(--
|
|
137
|
+
border: 1px solid var(--danger-text);
|
|
108
138
|
}
|
|
109
139
|
|
|
110
140
|
.error-text {
|
|
111
|
-
margin-top:
|
|
112
|
-
color: var(--
|
|
141
|
+
margin-top: 0.25rem;
|
|
142
|
+
color: var(--danger-text);
|
|
113
143
|
}
|
|
114
144
|
|
|
115
145
|
:global(.chip) {
|
|
116
|
-
padding:
|
|
117
|
-
border-radius:
|
|
146
|
+
padding: 0.25rem 1rem !important;
|
|
147
|
+
border-radius: 5rem !important;
|
|
118
148
|
}
|
|
119
149
|
|
|
120
150
|
:global(.chip.checked) {
|
|
121
|
-
padding-left:
|
|
122
|
-
padding-right:
|
|
151
|
+
padding-left: 0.3rem !important;
|
|
152
|
+
padding-right: 0.5rem !important;
|
|
123
153
|
}
|
|
124
154
|
|
|
125
155
|
:global(.chip .button) {
|
|
126
|
-
gap:
|
|
156
|
+
gap: 0.25rem;
|
|
127
157
|
}
|
|
128
158
|
</style>
|
|
@@ -1,20 +1,41 @@
|
|
|
1
1
|
import type { ComboBoxItem } from '../models/ComboBoxItem.js';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import type { ButtonVariant } from '../ui/ButtonVariant.js';
|
|
3
|
+
export interface ChipsProps {
|
|
4
|
+
/** Label text displayed above the chips */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Visual style variant for chips */
|
|
7
|
+
variant?: ButtonVariant;
|
|
8
|
+
/** Visual style variant for selected/checked chips */
|
|
9
|
+
selectedVariant?: ButtonVariant;
|
|
10
|
+
/** Visual style variant for deselected chips (overrides variant for unselected state) */
|
|
11
|
+
deselectedVariant?: ButtonVariant;
|
|
12
|
+
/** Available chip options */
|
|
4
13
|
options: ComboBoxItem[];
|
|
14
|
+
/** Mark field as required (shows asterisk) */
|
|
5
15
|
required?: boolean;
|
|
16
|
+
/** Show error state styling */
|
|
6
17
|
showError?: boolean;
|
|
18
|
+
/** Error message to display */
|
|
7
19
|
errorText?: string;
|
|
20
|
+
/** Additional CSS classes */
|
|
8
21
|
class?: string;
|
|
22
|
+
/** CSS classes for the container element */
|
|
9
23
|
containerClass?: string;
|
|
24
|
+
/** Disable all chips */
|
|
10
25
|
disabled?: boolean;
|
|
26
|
+
/** Selected value for single selection mode (bindable) */
|
|
11
27
|
value?: string;
|
|
28
|
+
/** Selected values for multiple selection mode (bindable) */
|
|
12
29
|
values?: string[];
|
|
30
|
+
/** Allow selecting multiple chips */
|
|
13
31
|
multiple?: boolean;
|
|
32
|
+
/** Allow deselecting the current selection */
|
|
14
33
|
deselectable?: boolean;
|
|
34
|
+
/** Position of the tooltip */
|
|
15
35
|
tooltipLocation?: 'top' | 'bottom' | 'left' | 'right';
|
|
36
|
+
/** Callback when selection changes */
|
|
16
37
|
onchange?: (e: string | string[] | undefined) => void;
|
|
17
38
|
}
|
|
18
|
-
declare const Chips: import("svelte").Component<
|
|
39
|
+
declare const Chips: import("svelte").Component<ChipsProps, {}, "value" | "values">;
|
|
19
40
|
type Chips = ReturnType<typeof Chips>;
|
|
20
41
|
export default Chips;
|