@sveltia/ui 0.25.7 → 0.25.9
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/dist/components/alert/alert.svelte +7 -3
- package/dist/components/alert/alert.svelte.d.ts +11 -10
- package/dist/components/alert/infobar.svelte +9 -5
- package/dist/components/alert/infobar.svelte.d.ts +15 -14
- package/dist/components/button/button-group.svelte +6 -2
- package/dist/components/button/button-group.svelte.d.ts +7 -6
- package/dist/components/button/button.svelte +5 -2
- package/dist/components/button/button.svelte.d.ts +2 -1
- package/dist/components/button/select-button-group.svelte +12 -8
- package/dist/components/button/select-button-group.svelte.d.ts +19 -18
- package/dist/components/button/select-button.svelte +6 -3
- package/dist/components/button/select-button.svelte.d.ts +4 -3
- package/dist/components/button/split-button.svelte +10 -7
- package/dist/components/button/split-button.svelte.d.ts +18 -17
- package/dist/components/calendar/calendar.svelte +1 -1
- package/dist/components/calendar/calendar.svelte.d.ts +2 -2
- package/dist/components/checkbox/checkbox-group.svelte +9 -5
- package/dist/components/checkbox/checkbox-group.svelte.d.ts +13 -12
- package/dist/components/checkbox/checkbox.svelte +13 -9
- package/dist/components/checkbox/checkbox.svelte.d.ts +19 -17
- package/dist/components/dialog/alert-dialog.svelte +5 -2
- package/dist/components/dialog/alert-dialog.svelte.d.ts +3 -1
- package/dist/components/dialog/confirmation-dialog.svelte +5 -2
- package/dist/components/dialog/confirmation-dialog.svelte.d.ts +3 -1
- package/dist/components/dialog/dialog.svelte +5 -2
- package/dist/components/dialog/dialog.svelte.d.ts +3 -1
- package/dist/components/dialog/prompt-dialog.svelte +16 -7
- package/dist/components/dialog/prompt-dialog.svelte.d.ts +17 -13
- package/dist/components/disclosure/disclosure.svelte +12 -8
- package/dist/components/disclosure/disclosure.svelte.d.ts +21 -20
- package/dist/components/divider/divider.svelte +3 -3
- package/dist/components/divider/divider.svelte.d.ts +6 -6
- package/dist/components/divider/spacer.svelte +2 -2
- package/dist/components/divider/spacer.svelte.d.ts +4 -4
- package/dist/components/drawer/drawer.svelte +18 -13
- package/dist/components/drawer/drawer.svelte.d.ts +39 -37
- package/dist/components/grid/grid-body.svelte +7 -3
- package/dist/components/grid/grid-body.svelte.d.ts +9 -8
- package/dist/components/grid/grid-cell.svelte +6 -2
- package/dist/components/grid/grid-cell.svelte.d.ts +7 -6
- package/dist/components/grid/grid-col-header.svelte +6 -2
- package/dist/components/grid/grid-col-header.svelte.d.ts +7 -6
- package/dist/components/grid/grid-foot.svelte +6 -2
- package/dist/components/grid/grid-foot.svelte.d.ts +7 -6
- package/dist/components/grid/grid-head.svelte +6 -2
- package/dist/components/grid/grid-head.svelte.d.ts +7 -6
- package/dist/components/grid/grid-row-header.svelte +6 -2
- package/dist/components/grid/grid-row-header.svelte.d.ts +7 -6
- package/dist/components/grid/grid-row.svelte +9 -5
- package/dist/components/grid/grid-row.svelte.d.ts +13 -12
- package/dist/components/grid/grid.svelte +10 -6
- package/dist/components/grid/grid.svelte.d.ts +15 -14
- package/dist/components/icon/icon.svelte +2 -2
- package/dist/components/icon/icon.svelte.d.ts +4 -4
- package/dist/components/listbox/listbox.svelte +18 -13
- package/dist/components/listbox/listbox.svelte.d.ts +27 -26
- package/dist/components/listbox/option-group.svelte +9 -5
- package/dist/components/listbox/option-group.svelte.d.ts +13 -12
- package/dist/components/listbox/option.svelte +12 -8
- package/dist/components/listbox/option.svelte.d.ts +17 -15
- package/dist/components/menu/menu-button.svelte +7 -4
- package/dist/components/menu/menu-button.svelte.d.ts +6 -5
- package/dist/components/menu/menu-item-checkbox.svelte +5 -2
- package/dist/components/menu/menu-item-checkbox.svelte.d.ts +3 -1
- package/dist/components/menu/menu-item-group.svelte +9 -5
- package/dist/components/menu/menu-item-group.svelte.d.ts +8 -8
- package/dist/components/menu/menu-item-radio.svelte +5 -2
- package/dist/components/menu/menu-item-radio.svelte.d.ts +3 -1
- package/dist/components/menu/menu-item.svelte +5 -2
- package/dist/components/menu/menu-item.svelte.d.ts +3 -1
- package/dist/components/menu/menu.svelte +9 -5
- package/dist/components/menu/menu.svelte.d.ts +13 -12
- package/dist/components/progressbar/progressbar.svelte +5 -5
- package/dist/components/progressbar/progressbar.svelte.d.ts +10 -10
- package/dist/components/radio/radio-group.svelte +13 -9
- package/dist/components/radio/radio-group.svelte.d.ts +21 -20
- package/dist/components/radio/radio.svelte +15 -11
- package/dist/components/radio/radio.svelte.d.ts +27 -26
- package/dist/components/select/combobox.svelte +6 -3
- package/dist/components/select/combobox.svelte.d.ts +3 -1
- package/dist/components/select/select-tags.svelte +16 -13
- package/dist/components/select/select-tags.svelte.d.ts +27 -28
- package/dist/components/select/select.svelte +5 -1
- package/dist/components/select/select.svelte.d.ts +2 -1
- package/dist/components/slider/slider.svelte +27 -25
- package/dist/components/slider/slider.svelte.d.ts +35 -34
- package/dist/components/switch/switch.svelte +13 -9
- package/dist/components/switch/switch.svelte.d.ts +21 -20
- package/dist/components/table/table-body.svelte +7 -3
- package/dist/components/table/table-body.svelte.d.ts +9 -8
- package/dist/components/table/table-cell.svelte +6 -2
- package/dist/components/table/table-cell.svelte.d.ts +7 -6
- package/dist/components/table/table-col-header.svelte +6 -2
- package/dist/components/table/table-col-header.svelte.d.ts +7 -6
- package/dist/components/table/table-foot.svelte +6 -2
- package/dist/components/table/table-foot.svelte.d.ts +7 -6
- package/dist/components/table/table-head.svelte +6 -2
- package/dist/components/table/table-head.svelte.d.ts +7 -6
- package/dist/components/table/table-row-header.svelte +6 -2
- package/dist/components/table/table-row-header.svelte.d.ts +7 -6
- package/dist/components/table/table-row.svelte +6 -2
- package/dist/components/table/table-row.svelte.d.ts +7 -6
- package/dist/components/table/table.svelte +6 -2
- package/dist/components/table/table.svelte.d.ts +7 -6
- package/dist/components/tabs/tab-box.svelte +7 -3
- package/dist/components/tabs/tab-box.svelte.d.ts +9 -8
- package/dist/components/tabs/tab-list.svelte +12 -8
- package/dist/components/tabs/tab-list.svelte.d.ts +19 -18
- package/dist/components/tabs/tab-panel.svelte +6 -2
- package/dist/components/tabs/tab-panel.svelte.d.ts +7 -6
- package/dist/components/tabs/tab-panels.svelte +6 -2
- package/dist/components/tabs/tab-panels.svelte.d.ts +7 -6
- package/dist/components/tabs/tab.svelte +6 -3
- package/dist/components/tabs/tab.svelte.d.ts +4 -3
- package/dist/components/text-editor/code-editor.svelte +16 -18
- package/dist/components/text-editor/code-editor.svelte.d.ts +25 -24
- package/dist/components/text-editor/core.d.ts +5 -3
- package/dist/components/text-editor/core.js +26 -15
- package/dist/components/text-editor/index.d.ts +12 -6
- package/dist/components/text-editor/index.js +7 -3
- package/dist/components/text-editor/lexical-root.svelte +27 -30
- package/dist/components/text-editor/lexical-root.svelte.d.ts +17 -16
- package/dist/components/text-editor/store.svelte.d.ts +2 -1
- package/dist/components/text-editor/store.svelte.js +10 -5
- package/dist/components/text-editor/text-editor.svelte +22 -13
- package/dist/components/text-editor/text-editor.svelte.d.ts +37 -32
- package/dist/components/text-editor/toolbar/code-editor-toolbar.svelte +3 -3
- package/dist/components/text-editor/toolbar/code-editor-toolbar.svelte.d.ts +6 -6
- package/dist/components/text-editor/toolbar/code-language-switcher.svelte +6 -2
- package/dist/components/text-editor/toolbar/code-language-switcher.svelte.d.ts +2 -2
- package/dist/components/text-editor/toolbar/format-text-button.svelte +6 -2
- package/dist/components/text-editor/toolbar/format-text-button.svelte.d.ts +5 -4
- package/dist/components/text-editor/toolbar/insert-image-button.svelte +6 -2
- package/dist/components/text-editor/toolbar/insert-image-button.svelte.d.ts +5 -4
- package/dist/components/text-editor/toolbar/insert-link-button.svelte +9 -4
- package/dist/components/text-editor/toolbar/insert-menu-button.svelte +6 -2
- package/dist/components/text-editor/toolbar/insert-menu-button.svelte.d.ts +5 -4
- package/dist/components/text-editor/toolbar/text-editor-toolbar.svelte +10 -6
- package/dist/components/text-editor/toolbar/text-editor-toolbar.svelte.d.ts +6 -6
- package/dist/components/text-editor/toolbar/toggle-block-menu-item.svelte +8 -5
- package/dist/components/text-editor/toolbar/toggle-block-menu-item.svelte.d.ts +5 -4
- package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +7 -3
- package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte.d.ts +9 -8
- package/dist/components/text-editor/transformers/table.d.ts +3 -2
- package/dist/components/text-editor/transformers/table.js +5 -1
- package/dist/components/text-field/number-input.svelte +12 -8
- package/dist/components/text-field/number-input.svelte.d.ts +20 -17
- package/dist/components/text-field/password-input.svelte +8 -4
- package/dist/components/text-field/password-input.svelte.d.ts +10 -7
- package/dist/components/text-field/search-bar.svelte +9 -5
- package/dist/components/text-field/search-bar.svelte.d.ts +14 -11
- package/dist/components/text-field/text-area.svelte +18 -14
- package/dist/components/text-field/text-area.svelte.d.ts +29 -27
- package/dist/components/text-field/text-input.svelte +7 -3
- package/dist/components/text-field/text-input.svelte.d.ts +5 -3
- package/dist/components/toast/toast.svelte +10 -5
- package/dist/components/toast/toast.svelte.d.ts +16 -14
- package/dist/components/toolbar/toolbar.svelte +11 -7
- package/dist/components/toolbar/toolbar.svelte.d.ts +17 -16
- package/dist/components/util/app-shell.svelte +6 -3
- package/dist/components/util/app-shell.svelte.d.ts +7 -8
- package/dist/components/util/group.svelte +8 -4
- package/dist/components/util/group.svelte.d.ts +11 -10
- package/dist/components/util/modal.svelte +7 -3
- package/dist/components/util/modal.svelte.d.ts +2 -1
- package/dist/components/util/placeholder.svelte +5 -1
- package/dist/components/util/placeholder.svelte.d.ts +5 -4
- package/dist/components/util/popup.svelte +23 -17
- package/dist/components/util/popup.svelte.d.ts +36 -33
- package/dist/index.js +3 -3
- package/dist/services/events.svelte.d.ts +2 -1
- package/dist/services/events.svelte.js +12 -8
- package/dist/services/group.svelte.d.ts +2 -1
- package/dist/services/group.svelte.js +16 -12
- package/dist/services/popup.svelte.d.ts +16 -10
- package/dist/services/popup.svelte.js +14 -13
- package/dist/typedefs.d.ts +191 -189
- package/dist/typedefs.js +168 -164
- package/package.json +18 -18
package/dist/typedefs.js
CHANGED
|
@@ -1,193 +1,197 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @import { Snippet } from 'svelte';
|
|
3
|
+
* @import { Transformer } from '@lexical/markdown';
|
|
4
|
+
* @import { LexicalEditor, LexicalNode } from 'lexical';
|
|
5
|
+
*/
|
|
6
|
+
|
|
1
7
|
/**
|
|
2
8
|
* @typedef {object} ButtonProps
|
|
3
|
-
* @property {HTMLButtonElement} [element]
|
|
4
|
-
* @property {string} [class]
|
|
5
|
-
* @property {'button' | 'submit' | 'reset'} [type]
|
|
6
|
-
* element.
|
|
7
|
-
* @property {string} [
|
|
8
|
-
* @property {string} [
|
|
9
|
-
* @property {
|
|
10
|
-
* @property {boolean} [
|
|
9
|
+
* @property {HTMLButtonElement} [element] Reference to the `<button>` element.
|
|
10
|
+
* @property {string} [class] The `class` attribute on the `<button>` element.
|
|
11
|
+
* @property {'button' | 'submit' | 'reset'} [type] The `type` attribute on the `<button>` element.
|
|
12
|
+
* @property {string} [role] The `role` attribute on the `<button>` element.
|
|
13
|
+
* @property {string} [name] The `name` attribute on the `<button>` element.
|
|
14
|
+
* @property {string} [value] The `value` attribute on the `<button>` element.
|
|
15
|
+
* @property {boolean} [hidden] Whether to hide the widget. An alias of the `aria-hidden` attribute.
|
|
16
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
11
17
|
* attribute.
|
|
12
|
-
* @property {boolean} [
|
|
13
|
-
* attribute.
|
|
14
|
-
* @property {boolean} [readonly] - Whether to make the widget read-only. An alias of the
|
|
18
|
+
* @property {boolean} [readonly] Whether to make the widget read-only. An alias of the
|
|
15
19
|
* `aria-readonly` attribute used in certain roles, including `checkbox`, `listbox`, `slider` and
|
|
16
20
|
* `textbox`.
|
|
17
|
-
* @property {boolean | 'mixed'} [pressed]
|
|
18
|
-
*
|
|
19
|
-
* @property {string} [keyShortcuts]
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* @property {string} [label]
|
|
23
|
-
* @property {'primary' | 'secondary' | 'tertiary' | 'ghost' | 'link'} [variant]
|
|
24
|
-
*
|
|
25
|
-
* @property {'small' | 'medium' | 'large'} [size]
|
|
26
|
-
* @property {boolean} [iconic]
|
|
27
|
-
* @property {boolean} [pill]
|
|
28
|
-
* @property {boolean} [flex]
|
|
29
|
-
* @property {PopupPosition} [popupPosition]
|
|
30
|
-
* @property {boolean} [showPopupBackdrop]
|
|
31
|
-
* @property {
|
|
32
|
-
* @property {
|
|
33
|
-
* @property {
|
|
34
|
-
* @property {
|
|
35
|
-
* @property {(event: CustomEvent) => void} [onChange]
|
|
36
|
-
* @property {(event: CustomEvent) => void} [onSelect]
|
|
37
|
-
* @property {(event: CustomEvent) => void} [onToggle]
|
|
21
|
+
* @property {boolean | 'mixed'} [pressed] Whether to mark the widget pressed. An alias of the
|
|
22
|
+
* `aria-pressed` attribute.
|
|
23
|
+
* @property {string} [keyShortcuts] Keyboard shortcuts. An alias of the `aria-keyshortcuts`
|
|
24
|
+
* attribute. Accepts the special `Accel` key, which will be replaced with `Control` or `Meta`
|
|
25
|
+
* depending on the user’s operating system.
|
|
26
|
+
* @property {string} [label] Text label displayed on the button.
|
|
27
|
+
* @property {'primary' | 'secondary' | 'tertiary' | 'ghost' | 'link'} [variant] The style variant
|
|
28
|
+
* of the button.
|
|
29
|
+
* @property {'small' | 'medium' | 'large'} [size] The size of the button.
|
|
30
|
+
* @property {boolean} [iconic] Whether to only show an icon on the button and trim the padding.
|
|
31
|
+
* @property {boolean} [pill] Whether to make the button rounded.
|
|
32
|
+
* @property {boolean} [flex] Make the button width flexible.
|
|
33
|
+
* @property {PopupPosition} [popupPosition] Where to show the dropdown menu.
|
|
34
|
+
* @property {boolean} [showPopupBackdrop] Whether to show the backdrop for the popup.
|
|
35
|
+
* @property {Snippet} [children] Primary slot content.
|
|
36
|
+
* @property {Snippet} [startIcon] Start icon slot content.
|
|
37
|
+
* @property {Snippet} [endIcon] End icon slot content.
|
|
38
|
+
* @property {Snippet} [popup] Popup slot content.
|
|
39
|
+
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
40
|
+
* @property {(event: CustomEvent) => void} [onSelect] Custom `Select` event handler.
|
|
41
|
+
* @property {(event: CustomEvent) => void} [onToggle] Custom `Toggle` event handler.
|
|
38
42
|
*/
|
|
39
43
|
|
|
40
44
|
/**
|
|
41
45
|
* @typedef {object} ModalProps
|
|
42
|
-
* @property {string} [class]
|
|
43
|
-
* @property {'dialog' | 'alertdialog' | 'none'} [role]
|
|
46
|
+
* @property {string} [class] The `class` attribute on the content element.
|
|
47
|
+
* @property {'dialog' | 'alertdialog' | 'none'} [role] The `role` attribute on the `<dialog>`
|
|
44
48
|
* element.
|
|
45
|
-
* @property {boolean} [open]
|
|
46
|
-
* @property {boolean} [showBackdrop]
|
|
47
|
-
* @property {boolean} [lightDismiss]
|
|
48
|
-
*
|
|
49
|
-
* @property {boolean} [escapeDismiss]
|
|
50
|
-
* @property {boolean} [keepContent]
|
|
49
|
+
* @property {boolean} [open] Whether to show the modal.
|
|
50
|
+
* @property {boolean} [showBackdrop] Whether to show the backdrop.
|
|
51
|
+
* @property {boolean} [lightDismiss] Whether to close the modal when the backdrop (outside of the
|
|
52
|
+
* modal) is clicked.
|
|
53
|
+
* @property {boolean} [escapeDismiss] Whether to close the modal when the Escape key is pressed.
|
|
54
|
+
* @property {boolean} [keepContent] Whether to keep the content in the DOM tree when the modal is
|
|
51
55
|
* not displayed.
|
|
52
|
-
* @property {HTMLDialogElement} [dialog]
|
|
53
|
-
* @property {
|
|
54
|
-
* @property {
|
|
55
|
-
* @property {(event: CustomEvent) => void} [onOpening]
|
|
56
|
-
* @property {(event: CustomEvent) => void} [onOpen]
|
|
57
|
-
* @property {(event: CustomEvent) => void} [onOk]
|
|
58
|
-
* @property {(event: CustomEvent) => void} [onCancel]
|
|
59
|
-
* @property {(event: CustomEvent) => void} [onClosing]
|
|
60
|
-
* @property {(event: CustomEvent) => void} [onClose]
|
|
56
|
+
* @property {HTMLDialogElement} [dialog] A reference to the `<dialog>` element.
|
|
57
|
+
* @property {Snippet} [children] Primary slot content.
|
|
58
|
+
* @property {Snippet} [extraContent] Extra slot content.
|
|
59
|
+
* @property {(event: CustomEvent) => void} [onOpening] Custom `Opening` event handler.
|
|
60
|
+
* @property {(event: CustomEvent) => void} [onOpen] Custom `Open` event handler.
|
|
61
|
+
* @property {(event: CustomEvent) => void} [onOk] Custom `Ok` event handler.
|
|
62
|
+
* @property {(event: CustomEvent) => void} [onCancel] Custom `Cancel` event handler.
|
|
63
|
+
* @property {(event: CustomEvent) => void} [onClosing] Custom `Closing` event handler.
|
|
64
|
+
* @property {(event: CustomEvent) => void} [onClose] Custom `Close` event handler.
|
|
61
65
|
*/
|
|
62
66
|
|
|
63
67
|
/**
|
|
64
68
|
* @typedef {object} DialogProps
|
|
65
|
-
* @property {string} [title]
|
|
66
|
-
* @property {'dialog' | 'alertdialog'} [role]
|
|
67
|
-
* @property {'small' | 'medium' | 'large' | 'x-large'} [size]
|
|
68
|
-
* @property {string} [class]
|
|
69
|
-
* @property {boolean} [open]
|
|
70
|
-
* @property {boolean} [showClose]
|
|
71
|
-
* @property {boolean} [showOk]
|
|
72
|
-
* @property {boolean} [showCancel]
|
|
73
|
-
* @property {string} [okLabel]
|
|
74
|
-
* @property {boolean} [okDisabled]
|
|
75
|
-
* @property {string} [cancelLabel]
|
|
76
|
-
* @property {boolean} [cancelDisabled]
|
|
77
|
-
* @property {boolean} [lightDismiss]
|
|
69
|
+
* @property {string} [title] Text label displayed on the header. Required.
|
|
70
|
+
* @property {'dialog' | 'alertdialog'} [role] The `role` attribute on the `<dialog>` element.
|
|
71
|
+
* @property {'small' | 'medium' | 'large' | 'x-large'} [size] Width of the dialog.
|
|
72
|
+
* @property {string} [class] The `class` attribute on the `<dialog>` element.
|
|
73
|
+
* @property {boolean} [open] Whether to open the dialog.
|
|
74
|
+
* @property {boolean} [showClose] Whether to show the Close button on the header.
|
|
75
|
+
* @property {boolean} [showOk] Whether to show the OK button on the footer.
|
|
76
|
+
* @property {boolean} [showCancel] Whether to show the Cancel button on the footer.
|
|
77
|
+
* @property {string} [okLabel] Text label displayed on the OK button.
|
|
78
|
+
* @property {boolean} [okDisabled] Whether to disable the OK button.
|
|
79
|
+
* @property {string} [cancelLabel] Text label displayed on the Cancel button.
|
|
80
|
+
* @property {boolean} [cancelDisabled] Whether to disable the Cancel button.
|
|
81
|
+
* @property {boolean} [lightDismiss] Whether to close the modal when the backdrop (outside of the
|
|
78
82
|
* modal) is clicked.
|
|
79
|
-
* @property {string} [value]
|
|
80
|
-
* @property {
|
|
81
|
-
* @property {
|
|
82
|
-
* @property {
|
|
83
|
-
* @property {
|
|
84
|
-
* @property {
|
|
85
|
-
* @property {
|
|
86
|
-
* @property {
|
|
83
|
+
* @property {string} [value] Value entered on the textbox.
|
|
84
|
+
* @property {Snippet} [children] Primary slot content.
|
|
85
|
+
* @property {Snippet} [header] Header slot content.
|
|
86
|
+
* @property {Snippet} [headerExtra] Header extra slot content.
|
|
87
|
+
* @property {Snippet} [footer] Footer slot content.
|
|
88
|
+
* @property {Snippet} [footerExtra] Footer extra slot content.
|
|
89
|
+
* @property {Snippet} [closeIcon] Close icon slot content.
|
|
90
|
+
* @property {Snippet} [extraContent] Extra content slot content.
|
|
87
91
|
*/
|
|
88
92
|
|
|
89
93
|
/**
|
|
90
94
|
* @typedef {object} MenuItemProps
|
|
91
|
-
* @property {string} [class]
|
|
92
|
-
* @property {'menuitem' | 'menuitemcheckbox' | 'menuitemradio'} [role]
|
|
93
|
-
*
|
|
94
|
-
* @property {boolean} [hidden]
|
|
95
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
96
|
+
* @property {'menuitem' | 'menuitemcheckbox' | 'menuitemradio'} [role] The `role` attribute on the
|
|
97
|
+
* `<button>` element.
|
|
98
|
+
* @property {boolean} [hidden] Whether to hide the widget. An alias of the `aria-hidden`
|
|
95
99
|
* attribute.
|
|
96
|
-
* @property {boolean} [disabled]
|
|
100
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
97
101
|
* attribute.
|
|
98
|
-
* @property {boolean} [checked]
|
|
102
|
+
* @property {boolean} [checked] Whether to check the widget. An alias of the `aria-checked`
|
|
99
103
|
* attribute.
|
|
100
|
-
* @property {string} [label]
|
|
101
|
-
* @property {
|
|
102
|
-
* @property {
|
|
103
|
-
* @property {
|
|
104
|
-
* @property {
|
|
105
|
-
* @property {
|
|
106
|
-
* @property {(event: CustomEvent) => void} [onChange]
|
|
107
|
-
* @property {(event: CustomEvent) => void} [onSelect]
|
|
104
|
+
* @property {string} [label] Text label displayed on the item.
|
|
105
|
+
* @property {Snippet} [children] Primary slot content.
|
|
106
|
+
* @property {Snippet} [startIcon] Start icon slot content.
|
|
107
|
+
* @property {Snippet} [endIcon] End icon slot content.
|
|
108
|
+
* @property {Snippet} [chevronIcon] Chevron icon slot content.
|
|
109
|
+
* @property {Snippet} [items] Items slot content.
|
|
110
|
+
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
111
|
+
* @property {(event: CustomEvent) => void} [onSelect] Custom `Select` event handler.
|
|
108
112
|
*/
|
|
109
113
|
|
|
110
114
|
/**
|
|
111
115
|
* @typedef {object} ComboboxProps
|
|
112
|
-
* @property {string} [class]
|
|
113
|
-
* @property {boolean} [hidden]
|
|
114
|
-
* @property {boolean} [disabled]
|
|
116
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
117
|
+
* @property {boolean} [hidden] Whether to hide the widget.
|
|
118
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
115
119
|
* attribute.
|
|
116
|
-
* @property {boolean} [readonly]
|
|
120
|
+
* @property {boolean} [readonly] Whether to make the widget read-only. An alias of the
|
|
117
121
|
* `aria-readonly` attribute.
|
|
118
|
-
* @property {boolean} [required]
|
|
122
|
+
* @property {boolean} [required] Whether to mark the widget required. An alias of the
|
|
119
123
|
* `aria-required` attribute.
|
|
120
|
-
* @property {boolean} [invalid]
|
|
121
|
-
*
|
|
122
|
-
* @property {string} [value]
|
|
123
|
-
* @property {boolean} [editable]
|
|
124
|
-
* @property {PopupPosition} [position]
|
|
125
|
-
* @property {
|
|
126
|
-
* @property {
|
|
127
|
-
* @property {(event: CustomEvent) => void} [onChange]
|
|
124
|
+
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the `aria-invalid`
|
|
125
|
+
* attribute.
|
|
126
|
+
* @property {string} [value] Selected option’s value.
|
|
127
|
+
* @property {boolean} [editable] Whether to make the `combobox` editable.
|
|
128
|
+
* @property {PopupPosition} [position] Where to show the dropdown menu.
|
|
129
|
+
* @property {Snippet} [children] Primary slot content.
|
|
130
|
+
* @property {Snippet} [chevronIcon] Chevron icon slot content.
|
|
131
|
+
* @property {(event: CustomEvent) => void} [onChange] Custom `change` event handler.
|
|
128
132
|
*/
|
|
129
133
|
|
|
130
134
|
/**
|
|
131
135
|
* @typedef {object} TextInputProps
|
|
132
|
-
* @property {HTMLInputElement} [element]
|
|
133
|
-
* @property {'textbox' | 'searchbox' | 'combobox' | 'spinbutton' | 'gridcell'} [role]
|
|
136
|
+
* @property {HTMLInputElement} [element] Reference to the `<input>` element.
|
|
137
|
+
* @property {'textbox' | 'searchbox' | 'combobox' | 'spinbutton' | 'gridcell'} [role] The `role`
|
|
134
138
|
* attribute on the `<input>` element.
|
|
135
|
-
* @property {string} [keyShortcuts]
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
* @property {string} [name]
|
|
139
|
-
* @property {boolean} [showInlineLabel]
|
|
140
|
-
*
|
|
141
|
-
* @property {'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'} [inputmode]
|
|
139
|
+
* @property {string} [keyShortcuts] Keyboard shortcuts. An alias of the `aria-keyshortcuts`
|
|
140
|
+
* attribute. Accepts the special `Accel` key, which will be replaced with `Control` or `Meta`
|
|
141
|
+
* depending on the user’s operating system.
|
|
142
|
+
* @property {string} [name] The `name` attribute on the `<input>` element.
|
|
143
|
+
* @property {boolean} [showInlineLabel] Whether to display `aria-label` over the `<input>` element
|
|
144
|
+
* if it’s empty, just like how the HTML `placeholder` attribute works.
|
|
145
|
+
* @property {'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'} [inputmode] The
|
|
142
146
|
* `inputmode` attribute on the `<input>`.
|
|
143
|
-
* @property {boolean} [flex]
|
|
144
|
-
* @property {string} [class]
|
|
145
|
-
* @property {boolean} [hidden]
|
|
146
|
-
* @property {boolean} [disabled]
|
|
147
|
+
* @property {boolean} [flex] Make the text input container flexible.
|
|
148
|
+
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
149
|
+
* @property {boolean} [hidden] Whether to hide the widget.
|
|
150
|
+
* @property {boolean} [disabled] Whether to disable the widget. An alias of the `aria-disabled`
|
|
147
151
|
* attribute.
|
|
148
|
-
* @property {boolean} [readonly]
|
|
152
|
+
* @property {boolean} [readonly] Whether to make the widget read-only. An alias of the
|
|
149
153
|
* `aria-readonly` attribute.
|
|
150
|
-
* @property {boolean} [required]
|
|
154
|
+
* @property {boolean} [required] Whether to mark the widget required. An alias of the
|
|
151
155
|
* `aria-required` attribute.
|
|
152
|
-
* @property {boolean} [invalid]
|
|
153
|
-
*
|
|
154
|
-
* @property {string} [aria-label]
|
|
155
|
-
* @property {
|
|
156
|
+
* @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the `aria-invalid`
|
|
157
|
+
* attribute.
|
|
158
|
+
* @property {string} [aria-label] `aria-label` attribute.
|
|
159
|
+
* @property {Snippet} [children] Primary slot content.
|
|
156
160
|
*/
|
|
157
161
|
|
|
158
162
|
/**
|
|
159
163
|
* @typedef {object} KeyboardEventHandlers
|
|
160
|
-
* @property {(event: KeyboardEvent) => void} [onkeydown]
|
|
161
|
-
* @property {(event: KeyboardEvent) => void} [onkeyup]
|
|
162
|
-
* @property {(event: KeyboardEvent) => void} [onkeypress]
|
|
164
|
+
* @property {(event: KeyboardEvent) => void} [onkeydown] `keydown` event handler.
|
|
165
|
+
* @property {(event: KeyboardEvent) => void} [onkeyup] `keyup` event handler.
|
|
166
|
+
* @property {(event: KeyboardEvent) => void} [onkeypress] `keypress` event handler.
|
|
163
167
|
*/
|
|
164
168
|
|
|
165
169
|
/**
|
|
166
170
|
* @typedef {object} MouseEventHandlers
|
|
167
|
-
* @property {(event: MouseEvent) => void} [onmouseenter]
|
|
168
|
-
* @property {(event: MouseEvent) => void} [onmouseleave]
|
|
169
|
-
* @property {(event: MouseEvent) => void} [onmouseover]
|
|
170
|
-
* @property {(event: MouseEvent) => void} [onmousedown]
|
|
171
|
-
* @property {(event: MouseEvent) => void} [onmouseup]
|
|
172
|
-
* @property {(event: MouseEvent) => void} [onclick]
|
|
173
|
-
* @property {(event: MouseEvent) => void} [ondblclick]
|
|
171
|
+
* @property {(event: MouseEvent) => void} [onmouseenter] `mouseenter` event handler.
|
|
172
|
+
* @property {(event: MouseEvent) => void} [onmouseleave] `mouseleave` event handler.
|
|
173
|
+
* @property {(event: MouseEvent) => void} [onmouseover] `mouseover` event handler.
|
|
174
|
+
* @property {(event: MouseEvent) => void} [onmousedown] `mousedown` event handler.
|
|
175
|
+
* @property {(event: MouseEvent) => void} [onmouseup] `mouseup` event handler.
|
|
176
|
+
* @property {(event: MouseEvent) => void} [onclick] `click` event handler.
|
|
177
|
+
* @property {(event: MouseEvent) => void} [ondblclick] `dblclick` event handler.
|
|
174
178
|
*/
|
|
175
179
|
|
|
176
180
|
/**
|
|
177
181
|
* @typedef {object} FocusEventHandlers
|
|
178
|
-
* @property {(event: FocusEvent) => void} [onfocus]
|
|
179
|
-
* @property {(event: FocusEvent) => void} [onblur]
|
|
182
|
+
* @property {(event: FocusEvent) => void} [onfocus] `focus` event handler.
|
|
183
|
+
* @property {(event: FocusEvent) => void} [onblur] `blur` event handler.
|
|
180
184
|
*/
|
|
181
185
|
|
|
182
186
|
/**
|
|
183
187
|
* @typedef {object} DragEventHandlers
|
|
184
|
-
* @property {(event: DragEvent) => void} [ondragstart]
|
|
185
|
-
* @property {(event: DragEvent) => void} [ondrag]
|
|
186
|
-
* @property {(event: DragEvent) => void} [ondragenter]
|
|
187
|
-
* @property {(event: DragEvent) => void} [ondragleave]
|
|
188
|
-
* @property {(event: DragEvent) => void} [ondragover]
|
|
189
|
-
* @property {(event: DragEvent) => void} [ondrop]
|
|
190
|
-
* @property {(event: DragEvent) => void} [ondragend]
|
|
188
|
+
* @property {(event: DragEvent) => void} [ondragstart] `dragstart` event handler.
|
|
189
|
+
* @property {(event: DragEvent) => void} [ondrag] `drag` event handler.
|
|
190
|
+
* @property {(event: DragEvent) => void} [ondragenter] `dragenter` event handler.
|
|
191
|
+
* @property {(event: DragEvent) => void} [ondragleave] `dragleave` event handler.
|
|
192
|
+
* @property {(event: DragEvent) => void} [ondragover] `dragover` event handler.
|
|
193
|
+
* @property {(event: DragEvent) => void} [ondrop] `drop` event handler.
|
|
194
|
+
* @property {(event: DragEvent) => void} [ondragend] `dragend` event handler.
|
|
191
195
|
*/
|
|
192
196
|
|
|
193
197
|
/**
|
|
@@ -197,9 +201,9 @@
|
|
|
197
201
|
|
|
198
202
|
/**
|
|
199
203
|
* @typedef {object} InputEventHandlers
|
|
200
|
-
* @property {(event: Event) => void} [oninput]
|
|
201
|
-
* @property {(event: Event) => void} [onbeforeinput]
|
|
202
|
-
* @property {(event: Event) => void} [onchange]
|
|
204
|
+
* @property {(event: Event) => void} [oninput] `input` event handler.
|
|
205
|
+
* @property {(event: Event) => void} [onbeforeinput] `beforeinput` event handler.
|
|
206
|
+
* @property {(event: Event) => void} [onchange] `change` event handler.
|
|
203
207
|
*/
|
|
204
208
|
|
|
205
209
|
/**
|
|
@@ -232,46 +236,46 @@
|
|
|
232
236
|
|
|
233
237
|
/**
|
|
234
238
|
* @typedef {object} TextEditorComponent
|
|
235
|
-
* @property {string} id
|
|
236
|
-
* @property {string} label
|
|
237
|
-
* @property {string} [icon]
|
|
238
|
-
* @property {
|
|
239
|
-
* @property {(props?: Record<string, any>) =>
|
|
240
|
-
*
|
|
241
|
-
* @property {
|
|
239
|
+
* @property {string} id Component ID.
|
|
240
|
+
* @property {string} label Component label.
|
|
241
|
+
* @property {string} [icon] Material Symbols icon name.
|
|
242
|
+
* @property {LexicalNode} node Lexical node class implementation.
|
|
243
|
+
* @property {(props?: Record<string, any>) => LexicalNode} createNode Function to create a new node
|
|
244
|
+
* instance.
|
|
245
|
+
* @property {Transformer} transformer Node transformer.
|
|
242
246
|
*/
|
|
243
247
|
|
|
244
248
|
/**
|
|
245
249
|
* @typedef {object} TextEditorConfig
|
|
246
|
-
* @property {TextEditorMode[]} modes
|
|
247
|
-
* @property {(TextEditorBlockType | TextEditorInlineType)[]} enabledButtons
|
|
248
|
-
*
|
|
249
|
-
* @property {TextEditorComponent[]} components
|
|
250
|
-
* @property {boolean} isCodeEditor
|
|
251
|
-
* @property {string} [defaultLanguage]
|
|
250
|
+
* @property {TextEditorMode[]} modes Enabled modes.
|
|
251
|
+
* @property {(TextEditorBlockType | TextEditorInlineType)[]} enabledButtons Enabled buttons for the
|
|
252
|
+
* editor.
|
|
253
|
+
* @property {TextEditorComponent[]} components Editor components.
|
|
254
|
+
* @property {boolean} isCodeEditor Whether the editor is used as a code editor.
|
|
255
|
+
* @property {string} [defaultLanguage] Default language for the code editor.
|
|
252
256
|
*/
|
|
253
257
|
|
|
254
258
|
/**
|
|
255
259
|
* @typedef {object} TextEditorSelectionState
|
|
256
|
-
* @property {?string} blockNodeKey
|
|
257
|
-
* @property {TextEditorBlockType} blockType
|
|
258
|
-
* @property {TextEditorInlineType[]} inlineTypes
|
|
260
|
+
* @property {?string} blockNodeKey Block level node key.
|
|
261
|
+
* @property {TextEditorBlockType} blockType Block level type of the current selection.
|
|
262
|
+
* @property {TextEditorInlineType[]} inlineTypes Inline level types of the current selection.
|
|
259
263
|
*/
|
|
260
264
|
|
|
261
265
|
/**
|
|
262
266
|
* @typedef {object} TextEditorStore
|
|
263
|
-
* @property {
|
|
264
|
-
* @property {boolean} initialized
|
|
265
|
-
* @property {string} editorId
|
|
266
|
-
* @property {TextEditorConfig} config
|
|
267
|
-
* @property {string} inputValue
|
|
268
|
-
* @property {TextEditorSelectionState} selection
|
|
269
|
-
* @property {boolean} useRichText
|
|
267
|
+
* @property {LexicalEditor | undefined} editor Lexical editor instance.
|
|
268
|
+
* @property {boolean} initialized Whether the Lexical editor is initialized.
|
|
269
|
+
* @property {string} editorId Random ID assigned to the editor.
|
|
270
|
+
* @property {TextEditorConfig} config Editor configuration.
|
|
271
|
+
* @property {string} inputValue Value entered the Lexical editor.
|
|
272
|
+
* @property {TextEditorSelectionState} selection Current selection state.
|
|
273
|
+
* @property {boolean} useRichText Whether to use rich text mode. If `false`, the editor shows the
|
|
270
274
|
* plain text editor.
|
|
271
|
-
* @property {boolean} hasConverterError
|
|
275
|
+
* @property {boolean} hasConverterError Whether there was an error while converting Markdown to
|
|
272
276
|
* Lexical nodes.
|
|
273
|
-
* @property {boolean} showConverterError
|
|
274
|
-
* @property {() => Promise<void>} convertMarkdown
|
|
277
|
+
* @property {boolean} showConverterError Whether to show a converter error in the UI.
|
|
278
|
+
* @property {() => Promise<void>} convertMarkdown Function to trigger the Lexical converter.
|
|
275
279
|
*/
|
|
276
280
|
|
|
277
281
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.9",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -28,27 +28,27 @@
|
|
|
28
28
|
"test:unit": "vitest"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@lexical/code": "^0.
|
|
32
|
-
"@lexical/dragon": "^0.
|
|
33
|
-
"@lexical/history": "^0.
|
|
34
|
-
"@lexical/link": "^0.
|
|
35
|
-
"@lexical/list": "^0.
|
|
36
|
-
"@lexical/markdown": "^0.
|
|
37
|
-
"@lexical/rich-text": "^0.
|
|
38
|
-
"@lexical/selection": "^0.
|
|
39
|
-
"@lexical/table": "^0.
|
|
40
|
-
"@lexical/utils": "^0.
|
|
31
|
+
"@lexical/code": "^0.28.0",
|
|
32
|
+
"@lexical/dragon": "^0.28.0",
|
|
33
|
+
"@lexical/history": "^0.28.0",
|
|
34
|
+
"@lexical/link": "^0.28.0",
|
|
35
|
+
"@lexical/list": "^0.28.0",
|
|
36
|
+
"@lexical/markdown": "^0.28.0",
|
|
37
|
+
"@lexical/rich-text": "^0.28.0",
|
|
38
|
+
"@lexical/selection": "^0.28.0",
|
|
39
|
+
"@lexical/table": "^0.28.0",
|
|
40
|
+
"@lexical/utils": "^0.28.0",
|
|
41
41
|
"@sveltia/utils": "^0.7.0",
|
|
42
|
-
"lexical": "^0.
|
|
42
|
+
"lexical": "^0.28.0",
|
|
43
43
|
"prismjs": "^1.30.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"svelte": "^5.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@playwright/test": "^1.51.
|
|
49
|
+
"@playwright/test": "^1.51.1",
|
|
50
50
|
"@sveltejs/adapter-auto": "^4.0.0",
|
|
51
|
-
"@sveltejs/kit": "^2.
|
|
51
|
+
"@sveltejs/kit": "^2.20.1",
|
|
52
52
|
"@sveltejs/package": "^2.3.10",
|
|
53
53
|
"@sveltejs/vite-plugin-svelte": "5.0.3",
|
|
54
54
|
"cspell": "^8.17.5",
|
|
@@ -56,23 +56,23 @@
|
|
|
56
56
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
57
57
|
"eslint-config-prettier": "^10.1.1",
|
|
58
58
|
"eslint-plugin-import": "^2.31.0",
|
|
59
|
-
"eslint-plugin-jsdoc": "^50.6.
|
|
59
|
+
"eslint-plugin-jsdoc": "^50.6.8",
|
|
60
60
|
"eslint-plugin-svelte": "^2.46.1",
|
|
61
61
|
"postcss": "^8.5.3",
|
|
62
62
|
"postcss-html": "^1.8.0",
|
|
63
63
|
"prettier": "^3.5.3",
|
|
64
64
|
"prettier-plugin-svelte": "^3.3.3",
|
|
65
|
-
"sass": "^1.
|
|
65
|
+
"sass": "^1.86.0",
|
|
66
66
|
"stylelint": "^16.16.0",
|
|
67
67
|
"stylelint-config-recommended-scss": "^14.1.0",
|
|
68
68
|
"stylelint-scss": "^6.11.1",
|
|
69
|
-
"svelte": "5.23.
|
|
69
|
+
"svelte": "5.23.2",
|
|
70
70
|
"svelte-check": "^4.1.5",
|
|
71
71
|
"svelte-i18n": "^4.0.1",
|
|
72
72
|
"svelte-preprocess": "^6.0.3",
|
|
73
73
|
"tslib": "^2.8.1",
|
|
74
74
|
"vite": "^6.2.2",
|
|
75
|
-
"vitest": "^3.0.
|
|
75
|
+
"vitest": "^3.0.9"
|
|
76
76
|
},
|
|
77
77
|
"exports": {
|
|
78
78
|
".": {
|