@sveltia/ui 0.15.16 → 0.17.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.
Files changed (157) hide show
  1. package/package/components/alert/alert.svelte +22 -7
  2. package/package/components/alert/alert.svelte.d.ts +47 -31
  3. package/package/components/button/button-group.svelte +16 -6
  4. package/package/components/button/button-group.svelte.d.ts +38 -28
  5. package/package/components/button/button.svelte +41 -136
  6. package/package/components/button/button.svelte.d.ts +20 -162
  7. package/package/components/button/select-button-group.svelte +31 -37
  8. package/package/components/button/select-button-group.svelte.d.ts +91 -39
  9. package/package/components/button/select-button.svelte +19 -62
  10. package/package/components/button/select-button.svelte.d.ts +31 -65
  11. package/package/components/button/split-button.svelte +37 -47
  12. package/package/components/button/split-button.svelte.d.ts +54 -60
  13. package/package/components/calendar/calendar.svelte +80 -55
  14. package/package/components/calendar/calendar.svelte.d.ts +30 -26
  15. package/package/components/checkbox/checkbox-group.svelte +23 -20
  16. package/package/components/checkbox/checkbox-group.svelte.d.ts +64 -32
  17. package/package/components/checkbox/checkbox.svelte +57 -67
  18. package/package/components/checkbox/checkbox.svelte.d.ts +81 -53
  19. package/package/components/dialog/alert-dialog.svelte +9 -36
  20. package/package/components/dialog/alert-dialog.svelte.d.ts +20 -49
  21. package/package/components/dialog/confirmation-dialog.svelte +9 -41
  22. package/package/components/dialog/confirmation-dialog.svelte.d.ts +20 -51
  23. package/package/components/dialog/dialog.svelte +60 -105
  24. package/package/components/dialog/dialog.svelte.d.ts +19 -86
  25. package/package/components/dialog/prompt-dialog.svelte +32 -61
  26. package/package/components/dialog/prompt-dialog.svelte.d.ts +53 -65
  27. package/package/components/disclosure/disclosure.svelte +39 -34
  28. package/package/components/disclosure/disclosure.svelte.d.ts +88 -57
  29. package/package/components/divider/divider.svelte +18 -14
  30. package/package/components/divider/divider.svelte.d.ts +48 -26
  31. package/package/components/divider/spacer.svelte +13 -8
  32. package/package/components/divider/spacer.svelte.d.ts +37 -25
  33. package/package/components/drawer/drawer.svelte +63 -76
  34. package/package/components/drawer/drawer.svelte.d.ts +116 -70
  35. package/package/components/grid/grid-body.svelte +15 -10
  36. package/package/components/grid/grid-body.svelte.d.ts +45 -29
  37. package/package/components/grid/grid-cell.svelte +16 -6
  38. package/package/components/grid/grid-cell.svelte.d.ts +38 -28
  39. package/package/components/grid/grid-col-header.svelte +16 -6
  40. package/package/components/grid/grid-col-header.svelte.d.ts +38 -28
  41. package/package/components/grid/grid-foot.svelte +16 -6
  42. package/package/components/grid/grid-foot.svelte.d.ts +38 -28
  43. package/package/components/grid/grid-head.svelte +16 -6
  44. package/package/components/grid/grid-head.svelte.d.ts +38 -28
  45. package/package/components/grid/grid-row-header.svelte +16 -6
  46. package/package/components/grid/grid-row-header.svelte.d.ts +38 -28
  47. package/package/components/grid/grid-row.svelte +19 -23
  48. package/package/components/grid/grid-row.svelte.d.ts +63 -43
  49. package/package/components/grid/grid.svelte +26 -25
  50. package/package/components/grid/grid.svelte.d.ts +71 -37
  51. package/package/components/icon/icon.svelte +14 -9
  52. package/package/components/icon/icon.svelte.d.ts +37 -25
  53. package/package/components/listbox/listbox.svelte +46 -52
  54. package/package/components/listbox/listbox.svelte.d.ts +117 -45
  55. package/package/components/listbox/option-group.svelte +23 -19
  56. package/package/components/listbox/option-group.svelte.d.ts +64 -32
  57. package/package/components/listbox/option.svelte +44 -57
  58. package/package/components/listbox/option.svelte.d.ts +68 -74
  59. package/package/components/menu/menu-button.svelte +42 -63
  60. package/package/components/menu/menu-button.svelte.d.ts +35 -62
  61. package/package/components/menu/menu-item-checkbox.svelte +29 -41
  62. package/package/components/menu/menu-item-checkbox.svelte.d.ts +20 -49
  63. package/package/components/menu/menu-item-group.svelte +22 -19
  64. package/package/components/menu/menu-item-group.svelte.d.ts +56 -32
  65. package/package/components/menu/menu-item-radio.svelte +29 -41
  66. package/package/components/menu/menu-item-radio.svelte.d.ts +20 -49
  67. package/package/components/menu/menu-item.svelte +66 -75
  68. package/package/components/menu/menu-item.svelte.d.ts +19 -68
  69. package/package/components/menu/menu.svelte +25 -22
  70. package/package/components/menu/menu.svelte.d.ts +65 -35
  71. package/package/components/radio/radio-group.svelte +36 -42
  72. package/package/components/radio/radio-group.svelte.d.ts +100 -40
  73. package/package/components/radio/radio.svelte +45 -48
  74. package/package/components/radio/radio.svelte.d.ts +111 -47
  75. package/package/components/select/combobox.svelte +76 -101
  76. package/package/components/select/combobox.svelte.d.ts +19 -54
  77. package/package/components/select/select-tags.svelte +48 -59
  78. package/package/components/select/select-tags.svelte.d.ts +127 -45
  79. package/package/components/select/select.svelte +18 -37
  80. package/package/components/select/select.svelte.d.ts +20 -45
  81. package/package/components/slider/slider.svelte +71 -68
  82. package/package/components/slider/slider.svelte.d.ts +159 -47
  83. package/package/components/switch/switch.svelte +36 -46
  84. package/package/components/switch/switch.svelte.d.ts +98 -42
  85. package/package/components/table/table-body.svelte +15 -11
  86. package/package/components/table/table-body.svelte.d.ts +45 -29
  87. package/package/components/table/table-cell.svelte +16 -6
  88. package/package/components/table/table-cell.svelte.d.ts +38 -28
  89. package/package/components/table/table-col-header.svelte +16 -6
  90. package/package/components/table/table-col-header.svelte.d.ts +38 -28
  91. package/package/components/table/table-foot.svelte +16 -6
  92. package/package/components/table/table-foot.svelte.d.ts +38 -28
  93. package/package/components/table/table-head.svelte +16 -6
  94. package/package/components/table/table-head.svelte.d.ts +38 -28
  95. package/package/components/table/table-row-header.svelte +16 -6
  96. package/package/components/table/table-row-header.svelte.d.ts +38 -28
  97. package/package/components/table/table-row.svelte +16 -6
  98. package/package/components/table/table-row.svelte.d.ts +38 -28
  99. package/package/components/table/table.svelte +16 -6
  100. package/package/components/table/table.svelte.d.ts +38 -28
  101. package/package/components/tabs/tab-box.svelte +16 -9
  102. package/package/components/tabs/tab-box.svelte.d.ts +47 -27
  103. package/package/components/tabs/tab-list.svelte +36 -35
  104. package/package/components/tabs/tab-list.svelte.d.ts +80 -38
  105. package/package/components/tabs/tab-panel.svelte +16 -6
  106. package/package/components/tabs/tab-panel.svelte.d.ts +38 -28
  107. package/package/components/tabs/tab-panels.svelte +16 -6
  108. package/package/components/tabs/tab-panels.svelte.d.ts +38 -26
  109. package/package/components/tabs/tab.svelte +28 -25
  110. package/package/components/tabs/tab.svelte.d.ts +31 -55
  111. package/package/components/text-editor/lexical-root.svelte +38 -32
  112. package/package/components/text-editor/lexical-root.svelte.d.ts +91 -29
  113. package/package/components/text-editor/text-editor.svelte +63 -79
  114. package/package/components/text-editor/text-editor.svelte.d.ts +114 -36
  115. package/package/components/text-editor/toolbar/editor-toolbar.svelte +41 -24
  116. package/package/components/text-editor/toolbar/editor-toolbar.svelte.d.ts +49 -23
  117. package/package/components/text-editor/toolbar/format-text-button.svelte +15 -5
  118. package/package/components/text-editor/toolbar/format-text-button.svelte.d.ts +30 -22
  119. package/package/components/text-editor/toolbar/insert-link-button.svelte +18 -16
  120. package/package/components/text-editor/toolbar/insert-link-button.svelte.d.ts +20 -23
  121. package/package/components/text-editor/toolbar/toggle-block-menu-item.svelte +19 -7
  122. package/package/components/text-editor/toolbar/toggle-block-menu-item.svelte.d.ts +30 -22
  123. package/package/components/text-field/number-input.svelte +63 -81
  124. package/package/components/text-field/number-input.svelte.d.ts +62 -68
  125. package/package/components/text-field/password-input.svelte +38 -57
  126. package/package/components/text-field/password-input.svelte.d.ts +30 -58
  127. package/package/components/text-field/search-bar.svelte +45 -62
  128. package/package/components/text-field/search-bar.svelte.d.ts +42 -87
  129. package/package/components/text-field/text-area.svelte +38 -54
  130. package/package/components/text-field/text-area.svelte.d.ts +116 -50
  131. package/package/components/text-field/text-input.svelte +30 -86
  132. package/package/components/text-field/text-input.svelte.d.ts +20 -105
  133. package/package/components/toast/toast.svelte +36 -30
  134. package/package/components/toast/toast.svelte.d.ts +65 -33
  135. package/package/components/toolbar/toolbar.svelte +25 -25
  136. package/package/components/toolbar/toolbar.svelte.d.ts +72 -34
  137. package/package/components/util/app-shell.svelte +22 -10
  138. package/package/components/util/app-shell.svelte.d.ts +40 -34
  139. package/package/components/util/group.svelte +20 -15
  140. package/package/components/util/group.svelte.d.ts +55 -31
  141. package/package/components/util/modal.svelte +89 -105
  142. package/package/components/util/modal.svelte.d.ts +24 -82
  143. package/package/components/util/placeholder.svelte +21 -0
  144. package/package/components/util/placeholder.svelte.d.ts +34 -0
  145. package/package/components/util/popup.svelte +65 -62
  146. package/package/components/util/popup.svelte.d.ts +104 -82
  147. package/package/services/{group.js → group.svelte.js} +11 -12
  148. package/package/services/{popup.js → popup.svelte.js} +6 -5
  149. package/package/typedefs.d.ts +545 -0
  150. package/package/typedefs.js +202 -0
  151. package/package.json +16 -23
  152. package/package/components/util/portal.svelte +0 -36
  153. package/package/components/util/portal.svelte.d.ts +0 -32
  154. /package/package/services/{events.d.ts → events.svelte.d.ts} +0 -0
  155. /package/package/services/{events.js → events.svelte.js} +0 -0
  156. /package/package/services/{group.d.ts → group.svelte.d.ts} +0 -0
  157. /package/package/services/{popup.d.ts → popup.svelte.d.ts} +0 -0
@@ -1,52 +1,112 @@
1
- /** @typedef {typeof __propDef.props} RadioGroupProps */
2
- /** @typedef {typeof __propDef.events} RadioGroupEvents */
3
- /** @typedef {typeof __propDef.slots} RadioGroupSlots */
1
+ export default RadioGroup;
2
+ type RadioGroup = SvelteComponent<Props & Record<string, any>, {
3
+ [evt: string]: CustomEvent<any>;
4
+ }, {}> & {
5
+ $$bindings?: "" | undefined;
6
+ };
4
7
  /**
5
8
  * The container of `<Radio>`s.
6
9
  * @see https://w3c.github.io/aria/#radiogroup
7
10
  * @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/
8
11
  */
9
- export default class RadioGroup extends SvelteComponent<{
10
- [x: string]: any;
12
+ declare const RadioGroup: $$__sveltets_2_IsomorphicComponent<{
13
+ /**
14
+ * - The `class` attribute on the wrapper element.
15
+ */
11
16
  class?: string | undefined;
17
+ /**
18
+ * - Whether to hide the widget.
19
+ */
20
+ hidden?: boolean | undefined;
21
+ /**
22
+ * - Whether to disable the widget. An alias of the `aria-disabled`
23
+ * attribute.
24
+ */
12
25
  disabled?: boolean | undefined;
13
- invalid?: boolean | undefined;
26
+ /**
27
+ * - Whether to make the widget read-only. An alias of the
28
+ * `aria-readonly` attribute.
29
+ */
30
+ readonly?: boolean | undefined;
31
+ /**
32
+ * - Whether to mark the widget required. An alias of the
33
+ * `aria-required` attribute.
34
+ */
14
35
  required?: boolean | undefined;
36
+ /**
37
+ * - Whether to mark the widget invalid. An alias of the
38
+ * `aria-invalid` attribute.
39
+ */
40
+ invalid?: boolean | undefined;
41
+ /**
42
+ * - Orientation of the widget. An alias of the
43
+ * `aria-orientation` attribute.
44
+ */
45
+ orientation?: "vertical" | "horizontal" | undefined;
46
+ /**
47
+ * - Primary slot content.
48
+ */
49
+ children?: import("svelte").Snippet<[]> | undefined;
50
+ /**
51
+ * - Custom `Change` event handler.
52
+ */
53
+ onChange?: ((event: CustomEvent) => void) | undefined;
54
+ } & Record<string, any>, {
55
+ [evt: string]: CustomEvent<any>;
56
+ }, {}, {}, "">;
57
+ type Props = {
58
+ /**
59
+ * - The `class` attribute on the wrapper element.
60
+ */
61
+ class?: string | undefined;
62
+ /**
63
+ * - Whether to hide the widget.
64
+ */
15
65
  hidden?: boolean | undefined;
66
+ /**
67
+ * - Whether to disable the widget. An alias of the `aria-disabled`
68
+ * attribute.
69
+ */
70
+ disabled?: boolean | undefined;
71
+ /**
72
+ * - Whether to make the widget read-only. An alias of the
73
+ * `aria-readonly` attribute.
74
+ */
16
75
  readonly?: boolean | undefined;
76
+ /**
77
+ * - Whether to mark the widget required. An alias of the
78
+ * `aria-required` attribute.
79
+ */
80
+ required?: boolean | undefined;
81
+ /**
82
+ * - Whether to mark the widget invalid. An alias of the
83
+ * `aria-invalid` attribute.
84
+ */
85
+ invalid?: boolean | undefined;
86
+ /**
87
+ * - Orientation of the widget. An alias of the
88
+ * `aria-orientation` attribute.
89
+ */
17
90
  orientation?: "vertical" | "horizontal" | undefined;
18
- }, {
19
- change: CustomEvent<any>;
20
- } & {
21
- [evt: string]: CustomEvent<any>;
22
- }, {
23
- default: {};
24
- }> {
25
- }
26
- export type RadioGroupProps = typeof __propDef.props;
27
- export type RadioGroupEvents = typeof __propDef.events;
28
- export type RadioGroupSlots = typeof __propDef.slots;
29
- import { SvelteComponent } from "svelte";
30
- declare const __propDef: {
31
- props: {
32
- [x: string]: any;
33
- class?: string | undefined;
34
- disabled?: boolean | undefined;
35
- invalid?: boolean | undefined;
36
- required?: boolean | undefined;
37
- hidden?: boolean | undefined;
38
- readonly?: boolean | undefined;
39
- orientation?: "vertical" | "horizontal" | undefined;
40
- };
41
- events: {
42
- change: CustomEvent<any>;
43
- } & {
44
- [evt: string]: CustomEvent<any>;
45
- };
46
- slots: {
47
- default: {};
48
- };
49
- exports?: undefined;
50
- bindings?: undefined;
91
+ /**
92
+ * - Primary slot content.
93
+ */
94
+ children?: import("svelte").Snippet<[]> | undefined;
95
+ /**
96
+ * - Custom `Change` event handler.
97
+ */
98
+ onChange?: ((event: CustomEvent) => void) | undefined;
51
99
  };
52
- export {};
100
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
101
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
102
+ $$bindings?: Bindings;
103
+ } & Exports;
104
+ (internal: unknown, props: Props & {
105
+ $$events?: Events;
106
+ $$slots?: Slots;
107
+ }): Exports & {
108
+ $set?: any;
109
+ $on?: any;
110
+ };
111
+ z_$$bindings?: Bindings;
112
+ }
@@ -10,64 +10,64 @@
10
10
  import Button from '../button/button.svelte';
11
11
 
12
12
  /**
13
- * The `class` attribute on the wrapper element.
14
- * @type {string}
13
+ * @typedef {object} Props
14
+ * @property {string} [class] - The `class` attribute on the wrapper element.
15
+ * @property {boolean} [hidden] - Whether to hide the widget.
16
+ * @property {boolean} [disabled] - Whether to disable the widget. An alias of the `aria-disabled`
17
+ * attribute.
18
+ * @property {boolean} [checked] - Whether to check the widget. An alias of the `aria-checked`
19
+ * attribute.
20
+ * @property {string | undefined} [name] - The `name` attribute on the `<button>` element.
21
+ * @property {string | undefined} [value] - The `value` attribute on the `<button>` element.
22
+ * @property {string | undefined} [label] - Text label displayed next to the checkbox.
23
+ * @property {import('svelte').Snippet} [children] - Primary slot content.
24
+ * @property {import('svelte').Snippet} [default] - Default slot content.
25
+ * @property {(event: CustomEvent) => void} [onChange] - Custom `Change` event handler.
26
+ * @property {(event: CustomEvent) => void} [onSelect] - Custom `Select` event handler.
15
27
  */
16
- let className = '';
17
- export { className as class };
18
- /**
19
- * Whether to hide the widget. An alias of the `aria-hidden` attribute.
20
- * @type {boolean | undefined}
21
- */
22
- export let hidden = undefined;
23
- /**
24
- * Whether to disable the widget. An alias of the `aria-disabled` attribute.
25
- * @type {boolean}
26
- */
27
- export let disabled = false;
28
- /**
29
- * Whether to check the widget. An alias of the `aria-checked` attribute.
30
- * @type {boolean}
31
- */
32
- export let checked = false;
33
- /**
34
- * The `name` attribute on the `<button>` element.
35
- * @type {string | undefined}
36
- */
37
- export let name = undefined;
38
- /**
39
- * The `value` attribute on the `<button>` element.
40
- * @type {string | undefined}
41
- */
42
- export let value = undefined;
28
+
43
29
  /**
44
- * Text label displayed next to the checkbox.
45
- * @type {string | undefined}
30
+ * @type {Props & Record<string, any>}
46
31
  */
47
- export let label = undefined;
32
+ let {
33
+ /* eslint-disable prefer-const */
34
+ checked = false,
35
+ class: className,
36
+ hidden = false,
37
+ disabled = false,
38
+ name = undefined,
39
+ value = undefined,
40
+ label = undefined,
41
+ children,
42
+ onChange,
43
+ onSelect,
44
+ ...restProps
45
+ /* eslint-enable prefer-const */
46
+ } = $props();
48
47
 
49
48
  const id = generateElementId('checkbox');
50
49
 
51
50
  /**
52
- * Reference to the `Button` component.
53
- * @type {Button | undefined}
51
+ * Reference to the `<button>` element.
52
+ * @type {HTMLButtonElement | undefined}
54
53
  */
55
- let buttonComponent;
54
+ let buttonElement = $state();
56
55
  </script>
57
56
 
58
57
  <span
58
+ {...restProps}
59
59
  role="none"
60
60
  class="sui radio {className}"
61
61
  class:disabled
62
- hidden={hidden || undefined}
63
- {...$$restProps}
64
- on:click={(event) => {
62
+ {hidden}
63
+ onclick={(event) => {
65
64
  if (!(/** @type {HTMLElement} */ (event.target).matches('button'))) {
66
- buttonComponent?.element?.click();
65
+ buttonElement?.click();
67
66
  }
68
67
  }}
69
68
  >
70
69
  <Button
70
+ bind:element={buttonElement}
71
71
  role="radio"
72
72
  {id}
73
73
  {hidden}
@@ -76,20 +76,17 @@
76
76
  {value}
77
77
  aria-checked={checked}
78
78
  aria-labelledby="{id}-label"
79
- bind:this={buttonComponent}
80
- on:click={(event) => {
79
+ onclick={(event) => {
81
80
  event.preventDefault();
82
81
  checked = true;
83
82
  }}
84
- on:focus
85
- on:blur
86
- on:select
87
- on:change
83
+ {onChange}
84
+ {onSelect}
88
85
  />
89
- {#if $$slots.default || label}
86
+ {#if children || label}
90
87
  <label id="{id}-label">
91
- {#if $$slots.default}
92
- <slot />
88
+ {#if children}
89
+ {@render children?.()}
93
90
  {:else}
94
91
  {label}
95
92
  {/if}
@@ -1,59 +1,123 @@
1
- /** @typedef {typeof __propDef.props} RadioProps */
2
- /** @typedef {typeof __propDef.events} RadioEvents */
3
- /** @typedef {typeof __propDef.slots} RadioSlots */
1
+ export default Radio;
2
+ type Radio = SvelteComponent<Props & Record<string, any>, {
3
+ [evt: string]: CustomEvent<any>;
4
+ }, {}> & {
5
+ $$bindings?: "" | undefined;
6
+ };
4
7
  /**
5
8
  * The equivalent of the HTML `<input type="radio">` element.
6
9
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio
7
10
  * @see https://w3c.github.io/aria/#radio
8
11
  * @see https://www.w3.org/WAI/ARIA/apg/patterns/radio/
9
12
  */
10
- export default class Radio extends SvelteComponent<{
11
- [x: string]: any;
13
+ declare const Radio: $$__sveltets_2_IsomorphicComponent<{
14
+ /**
15
+ * - The `class` attribute on the wrapper element.
16
+ */
12
17
  class?: string | undefined;
13
- name?: string | undefined;
18
+ /**
19
+ * - Whether to hide the widget.
20
+ */
21
+ hidden?: boolean | undefined;
22
+ /**
23
+ * - Whether to disable the widget. An alias of the `aria-disabled`
24
+ * attribute.
25
+ */
14
26
  disabled?: boolean | undefined;
15
- label?: string | undefined;
27
+ /**
28
+ * - Whether to check the widget. An alias of the `aria-checked`
29
+ * attribute.
30
+ */
16
31
  checked?: boolean | undefined;
32
+ /**
33
+ * - The `name` attribute on the `<button>` element.
34
+ */
35
+ name?: string | undefined;
36
+ /**
37
+ * - The `value` attribute on the `<button>` element.
38
+ */
17
39
  value?: string | undefined;
18
- hidden?: boolean | undefined;
19
- }, {
20
- focus: FocusEvent;
21
- blur: FocusEvent;
22
- select: CustomEvent<any>;
23
- change: CustomEvent<any>;
24
- } & {
40
+ /**
41
+ * - Text label displayed next to the checkbox.
42
+ */
43
+ label?: string | undefined;
44
+ /**
45
+ * - Primary slot content.
46
+ */
47
+ children?: import("svelte").Snippet<[]> | undefined;
48
+ /**
49
+ * - Default slot content.
50
+ */
51
+ default?: import("svelte").Snippet<[]> | undefined;
52
+ /**
53
+ * - Custom `Change` event handler.
54
+ */
55
+ onChange?: ((event: CustomEvent) => void) | undefined;
56
+ /**
57
+ * - Custom `Select` event handler.
58
+ */
59
+ onSelect?: ((event: CustomEvent) => void) | undefined;
60
+ } & Record<string, any>, {
25
61
  [evt: string]: CustomEvent<any>;
26
- }, {
27
- default: {};
28
- }> {
29
- }
30
- export type RadioProps = typeof __propDef.props;
31
- export type RadioEvents = typeof __propDef.events;
32
- export type RadioSlots = typeof __propDef.slots;
33
- import { SvelteComponent } from "svelte";
34
- declare const __propDef: {
35
- props: {
36
- [x: string]: any;
37
- class?: string | undefined;
38
- name?: string | undefined;
39
- disabled?: boolean | undefined;
40
- label?: string | undefined;
41
- checked?: boolean | undefined;
42
- value?: string | undefined;
43
- hidden?: boolean | undefined;
44
- };
45
- events: {
46
- focus: FocusEvent;
47
- blur: FocusEvent;
48
- select: CustomEvent<any>;
49
- change: CustomEvent<any>;
50
- } & {
51
- [evt: string]: CustomEvent<any>;
52
- };
53
- slots: {
54
- default: {};
55
- };
56
- exports?: undefined;
57
- bindings?: undefined;
62
+ }, {}, {}, "">;
63
+ type Props = {
64
+ /**
65
+ * - The `class` attribute on the wrapper element.
66
+ */
67
+ class?: string | undefined;
68
+ /**
69
+ * - Whether to hide the widget.
70
+ */
71
+ hidden?: boolean | undefined;
72
+ /**
73
+ * - Whether to disable the widget. An alias of the `aria-disabled`
74
+ * attribute.
75
+ */
76
+ disabled?: boolean | undefined;
77
+ /**
78
+ * - Whether to check the widget. An alias of the `aria-checked`
79
+ * attribute.
80
+ */
81
+ checked?: boolean | undefined;
82
+ /**
83
+ * - The `name` attribute on the `<button>` element.
84
+ */
85
+ name?: string | undefined;
86
+ /**
87
+ * - The `value` attribute on the `<button>` element.
88
+ */
89
+ value?: string | undefined;
90
+ /**
91
+ * - Text label displayed next to the checkbox.
92
+ */
93
+ label?: string | undefined;
94
+ /**
95
+ * - Primary slot content.
96
+ */
97
+ children?: import("svelte").Snippet<[]> | undefined;
98
+ /**
99
+ * - Default slot content.
100
+ */
101
+ default?: import("svelte").Snippet<[]> | undefined;
102
+ /**
103
+ * - Custom `Change` event handler.
104
+ */
105
+ onChange?: ((event: CustomEvent) => void) | undefined;
106
+ /**
107
+ * - Custom `Select` event handler.
108
+ */
109
+ onSelect?: ((event: CustomEvent) => void) | undefined;
58
110
  };
59
- export {};
111
+ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
112
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
113
+ $$bindings?: Bindings;
114
+ } & Exports;
115
+ (internal: unknown, props: Props & {
116
+ $$events?: Events;
117
+ $$slots?: Slots;
118
+ }): Exports & {
119
+ $set?: any;
120
+ $on?: any;
121
+ };
122
+ z_$$bindings?: Bindings;
123
+ }