@swell/swell-ui 0.0.0-stage → 0.1.1

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 (225) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +165 -2
  3. package/custom-elements.json +8274 -0
  4. package/dist/chunks/badge-Dt6q8Cqa.js +11 -0
  5. package/dist/chunks/button-C7nCiu-t.js +123 -0
  6. package/dist/chunks/card-CvSQEug8.js +10 -0
  7. package/dist/chunks/checkbox-BRI_A1TP.js +99 -0
  8. package/dist/chunks/chip-BtnufSMG.js +48 -0
  9. package/dist/chunks/config-C-FYxOaJ.js +588 -0
  10. package/dist/chunks/define-BlQTa1g4.js +19 -0
  11. package/dist/chunks/description-BHfQ8meK.js +19 -0
  12. package/dist/chunks/disclosure-CET8-H6f.js +56 -0
  13. package/dist/chunks/divider-BfkO0c1j.js +27 -0
  14. package/dist/chunks/element-B4-_7TLZ.js +138 -0
  15. package/dist/chunks/input-Uun-ls2_.js +53 -0
  16. package/dist/chunks/link-8qHFEKQE.js +53 -0
  17. package/dist/chunks/link-D4NC86oc.js +24 -0
  18. package/dist/chunks/lookup-5icr_T6o.js +205 -0
  19. package/dist/chunks/lookup-list-Bw6OJoDS.js +19 -0
  20. package/dist/chunks/lookup-option-Mn3k8W2M.js +26 -0
  21. package/dist/chunks/popover-D3Ob6slA.js +92 -0
  22. package/dist/chunks/popup-Dbh2fchP.js +21 -0
  23. package/dist/chunks/quantity-h3wqn8tC.js +140 -0
  24. package/dist/chunks/radio-BhFDL3pO.js +192 -0
  25. package/dist/chunks/radio-option-hT29S8Zl.js +88 -0
  26. package/dist/chunks/select-DS1n_htj.js +331 -0
  27. package/dist/chunks/select-option-DoM9GAe0.js +66 -0
  28. package/dist/chunks/skeleton-DfPjhls9.js +13 -0
  29. package/dist/chunks/status-B23JZ5RQ.js +71 -0
  30. package/dist/chunks/tab-BpjFUbFO.js +107 -0
  31. package/dist/chunks/tabs-aWKq1Iaz.js +122 -0
  32. package/dist/chunks/text-ZWPy-iB3.js +26 -0
  33. package/dist/chunks/text-field-BB_MRt5h.js +158 -0
  34. package/dist/chunks/textarea-L6_OJ2IN.js +18 -0
  35. package/dist/chunks/thumbnail-CLe9AsFg.js +21 -0
  36. package/dist/chunks/toggle-C7-oPgWR.js +22 -0
  37. package/dist/chunks/ui-HcyMKwzs.js +11 -0
  38. package/dist/editors/vscode.css-custom-data.json +824 -0
  39. package/dist/editors/vscode.html-custom-data.json +1156 -0
  40. package/dist/editors/web-types.json +1706 -0
  41. package/dist/elements/badge.d.ts +1 -0
  42. package/dist/elements/badge.js +1 -0
  43. package/dist/elements/button.d.ts +1 -0
  44. package/dist/elements/button.js +1 -0
  45. package/dist/elements/card.d.ts +1 -0
  46. package/dist/elements/card.js +1 -0
  47. package/dist/elements/checkbox.d.ts +1 -0
  48. package/dist/elements/checkbox.js +1 -0
  49. package/dist/elements/chip.d.ts +1 -0
  50. package/dist/elements/chip.js +1 -0
  51. package/dist/elements/disclosure.d.ts +1 -0
  52. package/dist/elements/disclosure.js +1 -0
  53. package/dist/elements/divider.d.ts +1 -0
  54. package/dist/elements/divider.js +1 -0
  55. package/dist/elements/input.d.ts +1 -0
  56. package/dist/elements/input.js +1 -0
  57. package/dist/elements/link.d.ts +1 -0
  58. package/dist/elements/link.js +1 -0
  59. package/dist/elements/lookup-list.d.ts +1 -0
  60. package/dist/elements/lookup-list.js +1 -0
  61. package/dist/elements/lookup-option.d.ts +1 -0
  62. package/dist/elements/lookup-option.js +1 -0
  63. package/dist/elements/lookup.d.ts +1 -0
  64. package/dist/elements/lookup.js +1 -0
  65. package/dist/elements/popover.d.ts +1 -0
  66. package/dist/elements/popover.js +1 -0
  67. package/dist/elements/quantity.d.ts +1 -0
  68. package/dist/elements/quantity.js +1 -0
  69. package/dist/elements/radio-option.d.ts +1 -0
  70. package/dist/elements/radio-option.js +1 -0
  71. package/dist/elements/radio.d.ts +1 -0
  72. package/dist/elements/radio.js +1 -0
  73. package/dist/elements/select-option.d.ts +1 -0
  74. package/dist/elements/select-option.js +1 -0
  75. package/dist/elements/select.d.ts +1 -0
  76. package/dist/elements/select.js +1 -0
  77. package/dist/elements/skeleton.d.ts +1 -0
  78. package/dist/elements/skeleton.js +1 -0
  79. package/dist/elements/status.d.ts +1 -0
  80. package/dist/elements/status.js +1 -0
  81. package/dist/elements/tab.d.ts +1 -0
  82. package/dist/elements/tab.js +1 -0
  83. package/dist/elements/tabs.d.ts +1 -0
  84. package/dist/elements/tabs.js +1 -0
  85. package/dist/elements/text.d.ts +1 -0
  86. package/dist/elements/text.js +1 -0
  87. package/dist/elements/textarea.d.ts +1 -0
  88. package/dist/elements/textarea.js +1 -0
  89. package/dist/elements/thumbnail.d.ts +1 -0
  90. package/dist/elements/thumbnail.js +1 -0
  91. package/dist/elements/ui.d.ts +1 -0
  92. package/dist/elements/ui.js +1 -0
  93. package/dist/frameworks/jsx.d.ts +3589 -0
  94. package/dist/frameworks/preact.d.ts +9 -0
  95. package/dist/frameworks/solid.d.ts +7 -0
  96. package/dist/frameworks/svelte.d.ts +1676 -0
  97. package/dist/frameworks/vue.d.ts +827 -0
  98. package/dist/index.js +80 -0
  99. package/dist/react/badge.d.ts +12 -0
  100. package/dist/react/badge.js +4 -0
  101. package/dist/react/button.d.ts +16 -0
  102. package/dist/react/button.js +4 -0
  103. package/dist/react/card.d.ts +11 -0
  104. package/dist/react/card.js +4 -0
  105. package/dist/react/checkbox.d.ts +14 -0
  106. package/dist/react/checkbox.js +4 -0
  107. package/dist/react/chip.d.ts +12 -0
  108. package/dist/react/chip.js +4 -0
  109. package/dist/react/create.js +49 -0
  110. package/dist/react/disclosure.d.ts +11 -0
  111. package/dist/react/disclosure.js +4 -0
  112. package/dist/react/divider.d.ts +9 -0
  113. package/dist/react/divider.js +4 -0
  114. package/dist/react/index.d.ts +26 -0
  115. package/dist/react/index.js +26 -0
  116. package/dist/react/input.d.ts +28 -0
  117. package/dist/react/input.js +4 -0
  118. package/dist/react/link.d.ts +15 -0
  119. package/dist/react/link.js +4 -0
  120. package/dist/react/lookup-list.d.ts +9 -0
  121. package/dist/react/lookup-list.js +4 -0
  122. package/dist/react/lookup-option.d.ts +11 -0
  123. package/dist/react/lookup-option.js +4 -0
  124. package/dist/react/lookup.d.ts +28 -0
  125. package/dist/react/lookup.js +4 -0
  126. package/dist/react/popover.d.ts +11 -0
  127. package/dist/react/popover.js +4 -0
  128. package/dist/react/quantity.d.ts +15 -0
  129. package/dist/react/quantity.js +4 -0
  130. package/dist/react/radio-option.d.ts +11 -0
  131. package/dist/react/radio-option.js +4 -0
  132. package/dist/react/radio.d.ts +18 -0
  133. package/dist/react/radio.js +4 -0
  134. package/dist/react/select-option.d.ts +11 -0
  135. package/dist/react/select-option.js +4 -0
  136. package/dist/react/select.d.ts +20 -0
  137. package/dist/react/select.js +4 -0
  138. package/dist/react/skeleton.d.ts +11 -0
  139. package/dist/react/skeleton.js +4 -0
  140. package/dist/react/status.d.ts +12 -0
  141. package/dist/react/status.js +4 -0
  142. package/dist/react/tab.d.ts +10 -0
  143. package/dist/react/tab.js +4 -0
  144. package/dist/react/tabs.d.ts +17 -0
  145. package/dist/react/tabs.js +4 -0
  146. package/dist/react/text.d.ts +12 -0
  147. package/dist/react/text.js +4 -0
  148. package/dist/react/textarea.d.ts +23 -0
  149. package/dist/react/textarea.js +4 -0
  150. package/dist/react/thumbnail.d.ts +13 -0
  151. package/dist/react/thumbnail.js +4 -0
  152. package/dist/react/ui.d.ts +10 -0
  153. package/dist/react/ui.js +4 -0
  154. package/dist/types/components/core/badge/badge.d.ts +25 -0
  155. package/dist/types/components/core/button/button.d.ts +60 -0
  156. package/dist/types/components/core/card/card.d.ts +21 -0
  157. package/dist/types/components/core/checkbox/checkbox.d.ts +46 -0
  158. package/dist/types/components/core/chip/chip.d.ts +36 -0
  159. package/dist/types/components/core/disclosure/disclosure.d.ts +37 -0
  160. package/dist/types/components/core/divider/divider.d.ts +21 -0
  161. package/dist/types/components/core/index.d.ts +21 -0
  162. package/dist/types/components/core/input/input.d.ts +57 -0
  163. package/dist/types/components/core/link/link.d.ts +42 -0
  164. package/dist/types/components/core/lookup/lookup-list.d.ts +21 -0
  165. package/dist/types/components/core/lookup/lookup-option.d.ts +27 -0
  166. package/dist/types/components/core/lookup/lookup.d.ts +32 -0
  167. package/dist/types/components/core/popover/popover.d.ts +33 -0
  168. package/dist/types/components/core/quantity/quantity.d.ts +47 -0
  169. package/dist/types/components/core/radio/radio-option.d.ts +82 -0
  170. package/dist/types/components/core/radio/radio.d.ts +65 -0
  171. package/dist/types/components/core/select/select-option.d.ts +69 -0
  172. package/dist/types/components/core/select/select.d.ts +70 -0
  173. package/dist/types/components/core/skeleton/skeleton.d.ts +23 -0
  174. package/dist/types/components/core/status/status.d.ts +38 -0
  175. package/dist/types/components/core/tabs/tab.d.ts +76 -0
  176. package/dist/types/components/core/tabs/tabs.d.ts +46 -0
  177. package/dist/types/components/core/text/text.d.ts +23 -0
  178. package/dist/types/components/core/textarea/textarea.d.ts +45 -0
  179. package/dist/types/components/core/thumbnail/thumbnail.d.ts +27 -0
  180. package/dist/types/components/core/ui/ui.d.ts +16 -0
  181. package/dist/types/components/elements.d.ts +1 -0
  182. package/dist/types/react/create.d.ts +8 -0
  183. package/dist/types/runtime/config.d.ts +25 -0
  184. package/dist/types/runtime/css.d.ts +12 -0
  185. package/dist/types/runtime/define.d.ts +4 -0
  186. package/dist/types/runtime/description.d.ts +12 -0
  187. package/dist/types/runtime/element.d.ts +61 -0
  188. package/dist/types/runtime/focus.d.ts +5 -0
  189. package/dist/types/runtime/form.d.ts +5 -0
  190. package/dist/types/runtime/index.d.ts +2 -0
  191. package/dist/types/runtime/link.d.ts +17 -0
  192. package/dist/types/runtime/loader.d.ts +21 -0
  193. package/dist/types/runtime/popup.d.ts +8 -0
  194. package/dist/types/runtime/sheet.d.ts +31 -0
  195. package/dist/types/runtime/text-field.d.ts +47 -0
  196. package/dist/types/runtime/toggle.d.ts +8 -0
  197. package/dist/types/runtime/tokens.generated.d.ts +492 -0
  198. package/dist/types/runtime/values.d.ts +6 -0
  199. package/dist/types/runtime/variants.d.ts +4 -0
  200. package/package.json +136 -4
  201. package/resolver.json +111 -0
  202. package/src/components/core/badge/tokens.json +152 -0
  203. package/src/components/core/button/tokens.dark.json +16 -0
  204. package/src/components/core/button/tokens.json +232 -0
  205. package/src/components/core/card/tokens.json +35 -0
  206. package/src/components/core/checkbox/tokens.json +15 -0
  207. package/src/components/core/chip/tokens.json +144 -0
  208. package/src/components/core/link/tokens.json +24 -0
  209. package/src/components/core/radio/tokens.dark.json +17 -0
  210. package/src/components/core/radio/tokens.json +114 -0
  211. package/src/components/core/status/tokens.dark.json +71 -0
  212. package/src/components/core/status/tokens.json +135 -0
  213. package/src/components/core/tabs/tokens.json +80 -0
  214. package/src/components/core/text/tokens.json +222 -0
  215. package/src/components/core/thumbnail/tokens.json +46 -0
  216. package/tokens/border.json +38 -0
  217. package/tokens/color.dark.json +88 -0
  218. package/tokens/color.json +115 -0
  219. package/tokens/control.json +115 -0
  220. package/tokens/field.dark.json +65 -0
  221. package/tokens/field.json +158 -0
  222. package/tokens/focus.json +26 -0
  223. package/tokens/font.json +117 -0
  224. package/tokens/motion.json +49 -0
  225. package/tokens/overlay.json +81 -0
@@ -0,0 +1,827 @@
1
+ import type { SwellBadge } from "../types/components/core/badge/badge.js";
2
+ import type { SwellButton } from "../types/components/core/button/button.js";
3
+ import type { SwellCard } from "../types/components/core/card/card.js";
4
+ import type { SwellCheckbox } from "../types/components/core/checkbox/checkbox.js";
5
+ import type { SwellChip } from "../types/components/core/chip/chip.js";
6
+ import type { SwellDisclosure } from "../types/components/core/disclosure/disclosure.js";
7
+ import type { SwellDivider } from "../types/components/core/divider/divider.js";
8
+ import type { SwellLink } from "../types/components/core/link/link.js";
9
+ import type { SwellInput } from "../types/components/core/input/input.js";
10
+ import type { ownId, SwellLookupList } from "../types/components/core/lookup/lookup-list.js";
11
+ import type { activate, SwellLookupOption } from "../types/components/core/lookup/lookup-option.js";
12
+ import type { SwellLookup } from "../types/components/core/lookup/lookup.js";
13
+ import type { SwellPopover } from "../types/components/core/popover/popover.js";
14
+ import type { SwellQuantity } from "../types/components/core/quantity/quantity.js";
15
+ import type { radioGroup, SwellRadioOption } from "../types/components/core/radio/radio-option.js";
16
+ import type { SwellRadio } from "../types/components/core/radio/radio.js";
17
+ import type { optionList, SwellOptionElement, SwellSelectOption } from "../types/components/core/select/select-option.js";
18
+ import type { SwellSelect } from "../types/components/core/select/select.js";
19
+ import type { SwellSkeleton } from "../types/components/core/skeleton/skeleton.js";
20
+ import type { SwellStatus } from "../types/components/core/status/status.js";
21
+ import type { tabGroup, CHECK, SwellTab } from "../types/components/core/tabs/tab.js";
22
+ import type { SwellTabs } from "../types/components/core/tabs/tabs.js";
23
+ import type { SwellText } from "../types/components/core/text/text.js";
24
+ import type { SwellTextarea } from "../types/components/core/textarea/textarea.js";
25
+ import type { SwellThumbnail } from "../types/components/core/thumbnail/thumbnail.js";
26
+ import type { SwellUi } from "../types/components/core/ui/ui.js";
27
+ import type { HTMLAttributes, PublicProps, EmitFn, EmitsToProps } from "vue";
28
+
29
+ /** This file was autogenerated by @wc-toolkit/vuejs-types */
30
+ /**
31
+ * A generic type for strongly typing custom events with their targets
32
+ * @template T - The type of the event target (extends EventTarget)
33
+ * @template D - The type of the detail payload for the custom event
34
+ */
35
+ type TypedEvent<T extends EventTarget, E = Event> = E & {
36
+ target: T;
37
+ };
38
+
39
+ export type EventMap = {
40
+ [event: string]: Event;
41
+ };
42
+
43
+ // Vue's template type-checking reads props from $props and events from $emit.
44
+ // See: https://vuejs.org/guide/extras/web-components.html#non-vue-web-components-and-typescript
45
+ export type VueEmitsOptions<T extends EventMap> = {
46
+ [K in keyof T]: (event: T[K]) => void;
47
+ };
48
+
49
+ export type VueEmit<T extends EventMap> = EmitFn<VueEmitsOptions<T>>;
50
+
51
+ // Helps Volar autocomplete "@event" by providing "onXxx" props.
52
+ export type VueOnProps<T extends EventMap> = EmitsToProps<VueEmitsOptions<T>>;
53
+
54
+ export type DefineCustomElement<
55
+ ElementType extends HTMLElement,
56
+ Props = {},
57
+ Events extends EventMap = {},
58
+ > = new () => ElementType & {
59
+ /** @deprecated Do not use the $props property on a Custom Element ref; this is for template prop types only. */
60
+ $props: HTMLAttributes & Props & PublicProps & VueOnProps<Events>;
61
+
62
+ /** @deprecated Do not use the $emit property on a Custom Element ref; this is for template event types only. */
63
+ $emit: VueEmit<Events>;
64
+ };
65
+
66
+ export type SwellBadgeVueProps = {
67
+ /** Which palette of `color` the badge takes its colors from: `secondary`, quiet, or a variant of the host's own; without it, the badge's own. */
68
+ variant?: string;
69
+ /** How the badge is drawn; the configured setting by default. */
70
+ appearance?: "filled" | "outline";
71
+ /** How large the badge is; `medium` by default. A small one fits a count, an extra small one a count on an icon. */
72
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
73
+ };
74
+
75
+ export type SwellBadgeVueEvents = {};
76
+
77
+ export type SwellButtonVueProps = {
78
+ /** Removes the button from the tab order and ignores clicks. */
79
+ disabled?: boolean;
80
+ /** Shows a spinner, marks the button busy and ignores clicks; the button stays in the tab order. */
81
+ loading?: boolean;
82
+ /** Fills the button with the success color, draws a check and makes the button inactive; it keeps its tab stop and isn't busy. */
83
+ success?: boolean;
84
+ /** Which palette of `color` the button takes its colors from: `secondary`, or a variant of the host's own; without it, the button's own. */
85
+ variant?: string;
86
+ /** How the button is drawn; the variant's setting by default. */
87
+ appearance?: "filled" | "outline" | "plain";
88
+ /** How large the button is; `medium` by default. `xsmall` fits an action inside a status message. */
89
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
90
+ /** Rounds the corners fully, in every variant, appearance and size, whatever the corner radius of the host's buttons. */
91
+ shape?: "pill";
92
+ /** Where the button leads; with it the element is a link, named by its own `aria-label`, or else by its content. */
93
+ href?: string;
94
+ /** Where to open the link. */
95
+ target?: string;
96
+ /** How the link's target relates to the page. */
97
+ rel?: string;
98
+ /** What the button does in a form; `submit` by default. */
99
+ type?: "submit" | "reset" | "button";
100
+ };
101
+
102
+ export type SwellButtonVueEvents = {};
103
+
104
+ export type SwellCardVueProps = {
105
+ /** How the card is drawn: with a border, or filled with the quiet background; the configured setting by default. */
106
+ appearance?: "outline" | "filled";
107
+ /** How large the padding is: it follows the text of the size; `medium` by default. */
108
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
109
+ };
110
+
111
+ export type SwellCardVueEvents = {};
112
+
113
+ /** `SwellCheckbox` component event */
114
+ export type SwellCheckboxElementEvent<E = Event> = TypedEvent<SwellCheckbox, E>;
115
+
116
+ export type SwellCheckboxVueProps = {
117
+ /** The label beside the box. */
118
+ label?: string;
119
+ /** Help text under the checkbox. */
120
+ hint?: string;
121
+ /** The error shown while the checkbox is invalid. */
122
+ error?: string;
123
+ /** Marks the checkbox invalid and shows the error. */
124
+ invalid?: boolean;
125
+ /** The default state. */
126
+ checked?: boolean;
127
+ /** The value sent with the form; `on` by default. */
128
+ value?: string;
129
+ /** Disables the checkbox. */
130
+ disabled?: boolean;
131
+ /** Makes the checkbox required. */
132
+ required?: boolean;
133
+ /** The name sent with the form. */
134
+ name?: string;
135
+ /** How large the checkbox is: the label takes the text of the size and the box grows with it; `medium` by default. The target stays at least 24px. */
136
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
137
+ };
138
+
139
+ export type SwellCheckboxVueEvents = {
140
+ /** The user checks or unchecks the box; it bubbles from the native input. */
141
+ change: SwellCheckboxElementEvent;
142
+ };
143
+
144
+ /** `SwellChip` component event */
145
+ export type SwellChipElementEvent<E = Event> = TypedEvent<SwellChip, E>;
146
+
147
+ export type SwellChipVueProps = {
148
+ /** Disables the remove button. */
149
+ disabled?: boolean;
150
+ /** The name of the remove button in the host's language, such as `Remove WELCOME10`; every chip needs one. */
151
+ "remove-label"?: string;
152
+ /** How large the chip is; `medium` by default. Its remove button is as high as the chip, at least 24px. */
153
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
154
+ };
155
+
156
+ export type SwellChipVueEvents = {
157
+ /** The shopper pressed the remove button; it bubbles, and the chip stays in the page. A disabled chip fires none. */
158
+ remove: SwellChipElementEvent;
159
+ };
160
+
161
+ /** `SwellDisclosure` component event */
162
+ export type SwellDisclosureElementEvent<E = Event> = TypedEvent<
163
+ SwellDisclosure,
164
+ E
165
+ >;
166
+ /** `toggle` event type */
167
+ export type SwellDisclosureToggleElementEvent =
168
+ SwellDisclosureElementEvent<ToggleEvent>;
169
+
170
+ export type SwellDisclosureVueProps = {
171
+ /** Shows the content and hides the trigger. Set on connect, the content shows at once. */
172
+ open?: boolean;
173
+ /** Keeps the trigger while the content is open: it closes the content too and carries `aria-expanded`. */
174
+ toggle?: boolean;
175
+ };
176
+
177
+ export type SwellDisclosureVueEvents = {
178
+ /** The content opened or closed: by the trigger or by script, also as it starts open. A `ToggleEvent` with `oldState` and `newState`, fired once the script that changed `open` has run; it doesn't bubble and can't be cancelled. */
179
+ toggle: SwellDisclosureToggleElementEvent;
180
+ };
181
+
182
+ export type SwellDividerVueProps = {};
183
+
184
+ export type SwellDividerVueEvents = {};
185
+
186
+ export type SwellLinkVueProps = {
187
+ /** Where the link goes; without it the element is a button. With it, the anchor is named by the element's own `aria-label`, as a link of an icon alone needs, or else by its content. */
188
+ href?: string;
189
+ /** Where to open the link. */
190
+ target?: string;
191
+ /** How the target relates to the page. */
192
+ rel?: string;
193
+ /** Which palette of `color` the link takes its color from: `secondary`, quiet text, or a variant of the host's own; without it, the link color. */
194
+ variant?: string;
195
+ /** How the link is drawn: `underline`, the default, in the font of the text around it; `plain`, for a link on its own, without an underline, in the text of a field hint, at least 24px high. Only the attribute sets it. */
196
+ appearance?: "underline" | "plain";
197
+ /** How large a plain link is: its text is one step smaller than the text of the size, at least 12px; `medium` by default. A link in text takes the font around it. */
198
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
199
+ };
200
+
201
+ export type SwellLinkVueEvents = {};
202
+
203
+ /** `SwellInput` component event */
204
+ export type SwellInputElementEvent<E = Event> = TypedEvent<SwellInput, E>;
205
+
206
+ export type SwellInputVueProps = {
207
+ /** The label of the field. */
208
+ label?: string;
209
+ /** A marker after the label, such as `(optional)`, in the host's language; it joins the field's name. */
210
+ optional?: string;
211
+ /** Help text under the field. */
212
+ hint?: string;
213
+ /** The error shown while the field is invalid. */
214
+ error?: string;
215
+ /** Marks the field invalid and shows the error. */
216
+ invalid?: boolean;
217
+ /** The default value. */
218
+ value?: string;
219
+ /** The kind of value; `text` by default. */
220
+ type?: "text" | "email" | "tel" | "password" | "number" | "search" | "url";
221
+ /** How the field is drawn; the configured setting by default. */
222
+ appearance?: "outline" | "filled" | "underline";
223
+ /** How large the field is; `medium` by default. At `xsmall` the label sits above the field. */
224
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
225
+ /** Disables the field. */
226
+ disabled?: boolean;
227
+ /** Makes the field read-only. */
228
+ readonly?: boolean;
229
+ /** Makes the field required. */
230
+ required?: boolean;
231
+ /** The name sent with the form. */
232
+ name?: string;
233
+ /** Text shown while the field is empty. */
234
+ placeholder?: string;
235
+ /** The autofill hint of the native input. */
236
+ autocomplete?: string;
237
+ /** The virtual keyboard to show. */
238
+ inputmode?: string;
239
+ /** The shortest allowed value. */
240
+ minlength?: number;
241
+ /** The longest allowed value. */
242
+ maxlength?: number;
243
+ /** The pattern the value matches. */
244
+ pattern?: string;
245
+ /** The smallest allowed value. */
246
+ min?: string;
247
+ /** The largest allowed value. */
248
+ max?: string;
249
+ /** The step between allowed values. */
250
+ step?: string;
251
+ /** */
252
+ readOnly?: boolean;
253
+ };
254
+
255
+ export type SwellInputVueEvents = {
256
+ /** The value changes as the user types; it bubbles from the native input. */
257
+ input: SwellInputElementEvent;
258
+ /** The user commits a new value; it bubbles from the native input. */
259
+ change: SwellInputElementEvent;
260
+ };
261
+
262
+ export type SwellLookupListVueProps = {};
263
+
264
+ export type SwellLookupListVueEvents = {};
265
+
266
+ export type SwellLookupOptionVueProps = {
267
+ /** The value of the suggestion, such as the id of a place; the label by default. */
268
+ value?: string;
269
+ /** A second line under the label. */
270
+ hint?: string;
271
+ /** Disables the suggestion. */
272
+ disabled?: boolean;
273
+ /** */
274
+ hidden?: unknown;
275
+ };
276
+
277
+ export type SwellLookupOptionVueEvents = {};
278
+
279
+ /** `SwellLookup` component event */
280
+ export type SwellLookupElementEvent<E = Event> = TypedEvent<SwellLookup, E>;
281
+
282
+ export type SwellLookupVueProps = {
283
+ /** The label of the field. */
284
+ label?: string;
285
+ /** A marker after the label, such as `(optional)`, in the host's language; it joins the field's name. */
286
+ optional?: string;
287
+ /** Help text under the field. */
288
+ hint?: string;
289
+ /** The error shown while the field is invalid. */
290
+ error?: string;
291
+ /** Marks the field invalid and shows the error. */
292
+ invalid?: boolean;
293
+ /** The default value. */
294
+ value?: string;
295
+ /** The kind of value; `text` by default. */
296
+ type?: "text" | "email" | "tel" | "password" | "number" | "search" | "url";
297
+ /** How the field is drawn; the configured setting by default. */
298
+ appearance?: "outline" | "filled" | "underline";
299
+ /** How large the field is; `medium` by default. At `xsmall` the label sits above the field. */
300
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
301
+ /** Disables the field. */
302
+ disabled?: boolean;
303
+ /** Makes the field read-only. */
304
+ readonly?: boolean;
305
+ /** Makes the field required. */
306
+ required?: boolean;
307
+ /** The name sent with the form. */
308
+ name?: string;
309
+ /** Text shown while the field is empty. */
310
+ placeholder?: string;
311
+ /** The autofill hint of the native input. */
312
+ autocomplete?: string;
313
+ /** The virtual keyboard to show. */
314
+ inputmode?: string;
315
+ /** The shortest allowed value. */
316
+ minlength?: number;
317
+ /** The longest allowed value. */
318
+ maxlength?: number;
319
+ /** The pattern the value matches. */
320
+ pattern?: string;
321
+ /** The smallest allowed value. */
322
+ min?: string;
323
+ /** The largest allowed value. */
324
+ max?: string;
325
+ /** The step between allowed values. */
326
+ step?: string;
327
+ /** */
328
+ readOnly?: boolean;
329
+ };
330
+
331
+ export type SwellLookupVueEvents = {
332
+ /** The value changes as the user types; it bubbles from the native input. */
333
+ input: SwellLookupElementEvent;
334
+ /** The user commits a new value; it bubbles from the native input. */
335
+ change: SwellLookupElementEvent;
336
+ };
337
+
338
+ /** `SwellPopover` component event */
339
+ export type SwellPopoverElementEvent<E = Event> = TypedEvent<SwellPopover, E>;
340
+ /** `toggle` event type */
341
+ export type SwellPopoverToggleElementEvent =
342
+ SwellPopoverElementEvent<ToggleEvent>;
343
+
344
+ export type SwellPopoverVueProps = {
345
+ /** The panel is open. Set it to open the panel without moving the focus; remove it to close the panel, which gives the focus back to the trigger when the focus is inside. */
346
+ open?: boolean;
347
+ /** */
348
+ "aria-label"?: unknown;
349
+ };
350
+
351
+ export type SwellPopoverVueEvents = {
352
+ /** The panel opened or closed: by the trigger, Escape, a press outside, the focus leaving it or script, also as it starts open or leaves the page open. A `ToggleEvent` with `oldState` and `newState`, fired once the script that changed `open` has run; it doesn't bubble and can't be cancelled. */
353
+ toggle: SwellPopoverToggleElementEvent;
354
+ };
355
+
356
+ /** `SwellQuantity` component event */
357
+ export type SwellQuantityElementEvent<E = Event> = TypedEvent<SwellQuantity, E>;
358
+
359
+ export type SwellQuantityVueProps = {
360
+ /** The starting count, a whole number; `min` by default. A count outside the limits is clamped, and a count the user or a script set stays at the limit that clamped it. */
361
+ value?: number;
362
+ /** The least count, a whole number; 1 by default. */
363
+ min?: number;
364
+ /** The greatest count, a whole number; no limit by default. A `max` below `min` counts as `min`. */
365
+ max?: number;
366
+ /** How much each step changes the count, a whole number above 0; 1 by default. */
367
+ step?: number;
368
+ /** Removes the quantity from the tab order and ignores steps. */
369
+ disabled?: boolean;
370
+ /** The quantity waits, such as while the cart updates: it keeps the focus, its count and its tab stop, ignores steps, fades and tells screen readers it is busy; a script can still set its count. */
371
+ busy?: boolean;
372
+ /** The name sent with the form. */
373
+ name?: string;
374
+ /** How large the quantity is: it shares a height with buttons and fields of its size; `medium` by default. A cart line takes `xsmall`. */
375
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
376
+ };
377
+
378
+ export type SwellQuantityVueEvents = {
379
+ /** The user changed the count. */
380
+ input: SwellQuantityElementEvent;
381
+ /** The user changed the count, after `input`. */
382
+ change: SwellQuantityElementEvent;
383
+ };
384
+
385
+ export type SwellRadioOptionVueProps = {
386
+ /** The value the group takes when the option is chosen; `on` by default. */
387
+ value?: string;
388
+ /** Help text under the label. */
389
+ hint?: string;
390
+ /** Disables the option. */
391
+ disabled?: boolean;
392
+ /** */
393
+ hidden?: unknown;
394
+ };
395
+
396
+ export type SwellRadioOptionVueEvents = {};
397
+
398
+ /** `SwellRadio` component event */
399
+ export type SwellRadioElementEvent<E = Event> = TypedEvent<SwellRadio, E>;
400
+
401
+ export type SwellRadioVueProps = {
402
+ /** The question. Without it, the group takes its name from its own `aria-label`. */
403
+ label?: string;
404
+ /** Help text under the options. */
405
+ hint?: string;
406
+ /** The error shown while the group is invalid. */
407
+ error?: string;
408
+ /** Marks the group invalid and shows the error. */
409
+ invalid?: boolean;
410
+ /** The name sent with the form. */
411
+ name?: string;
412
+ /** The value of the option chosen by default. */
413
+ value?: string;
414
+ /** The form can't be sent until an option is chosen. */
415
+ required?: boolean;
416
+ /** Disables every option. */
417
+ disabled?: boolean;
418
+ /** */
419
+ "aria-label"?: unknown;
420
+ /** Where the circle sits in the row of each option; the `radio.indicator.position` setting gives the default. A segmented group draws no circle. */
421
+ "indicator-position"?: "start" | "end";
422
+ /** How large the options are: their text, circle and padding follow the text of the size, and a segmented track takes the height of a control; `medium` by default. */
423
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
424
+ /** How the options are drawn: the circle and the label, each option in a frame, the options sharing a track like a switch, or each option as a button in equal columns. `segmented` suits two or three short options, `button` short options such as languages or sizes; both are set with this attribute only. The `radio.appearance` setting gives the default. */
425
+ appearance?: "plain" | "outline" | "segmented" | "button";
426
+ };
427
+
428
+ export type SwellRadioVueEvents = {
429
+ /** The user chose another option. */
430
+ input: SwellRadioElementEvent;
431
+ /** The user chose another option, after `input`. Events of fields in the options' details bubble through the group too: the group's own have it as their `target`. */
432
+ change: SwellRadioElementEvent;
433
+ };
434
+
435
+ export type SwellSelectOptionVueProps = {
436
+ /** The value the select takes when the option is chosen; the option's label by default. */
437
+ value?: string;
438
+ /** A second line under the label. */
439
+ hint?: string;
440
+ /** Disables the option. */
441
+ disabled?: boolean;
442
+ /** */
443
+ hidden?: unknown;
444
+ };
445
+
446
+ export type SwellSelectOptionVueEvents = {};
447
+
448
+ /** `SwellSelect` component event */
449
+ export type SwellSelectElementEvent<E = Event> = TypedEvent<SwellSelect, E>;
450
+
451
+ export type SwellSelectVueProps = {
452
+ /** The label of the field. Without it, the select takes its name from its own `aria-label`. */
453
+ label?: string;
454
+ /** A marker after the label, such as `(optional)`, in the host's language; it joins the select's name. */
455
+ optional?: string;
456
+ /** Help text under the field. */
457
+ hint?: string;
458
+ /** The error shown while the select is invalid. */
459
+ error?: string;
460
+ /** Marks the select invalid and shows the error. */
461
+ invalid?: boolean;
462
+ /** The name sent with the form. */
463
+ name?: string;
464
+ /** The value of the option chosen by default. */
465
+ value?: string;
466
+ /** Text shown while nothing is chosen. */
467
+ placeholder?: string;
468
+ /** The form can't be sent until an option is chosen. */
469
+ required?: boolean;
470
+ /** Disables the select. */
471
+ disabled?: boolean;
472
+ /** The browser's autofill hint, such as `country` or `address-level1`, as on a native select: autofill picks the enabled option whose value or label matches the saved one, which counts as the user's choice and fires `input` and `change`. */
473
+ autocomplete?: string;
474
+ /** */
475
+ "aria-label"?: unknown;
476
+ /** How the field is drawn; the configured setting by default. */
477
+ appearance?: "outline" | "filled" | "underline";
478
+ /** How large the field is; `medium` by default. At `xsmall` the label sits above the field. */
479
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
480
+ };
481
+
482
+ export type SwellSelectVueEvents = {
483
+ /** The user chose another option. */
484
+ input: SwellSelectElementEvent;
485
+ /** The user chose another option, after `input`. */
486
+ change: SwellSelectElementEvent;
487
+ };
488
+
489
+ export type SwellSkeletonVueProps = {
490
+ /** How large the skeleton is: a bar is 4px lower than the text of the size, a card as high as a control; `medium` by default. The bars of a card keep their own size, so give them the card's. */
491
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
492
+ /** `card` draws the empty frame of an option card with its bars at its ends; only the attribute sets it. Without it, the skeleton is a bar. */
493
+ appearance?: "card";
494
+ };
495
+
496
+ export type SwellSkeletonVueEvents = {};
497
+
498
+ export type SwellStatusVueProps = {
499
+ /** What the message means: its color, icon and how it is announced. */
500
+ type?: "danger" | "success" | "warning";
501
+ /** How large the message is: its text, padding and icon follow the text of the size; `medium` by default. */
502
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
503
+ /** How the message is drawn; the configured setting by default. `quiet`, for a note, comes from the attribute only. */
504
+ appearance?: "filled" | "outline" | "plain" | "quiet";
505
+ };
506
+
507
+ export type SwellStatusVueEvents = {};
508
+
509
+ export type SwellTabVueProps = {
510
+ /** The group's value while the tab is chosen; the label by default. */
511
+ value?: string;
512
+ /** The text of the tab or of the step's heading. */
513
+ label?: string;
514
+ /** Marks a step as done: its number becomes a check, and the line to the next step fills. */
515
+ done?: boolean;
516
+ /** The tab can't be chosen, such as a step that isn't open yet. */
517
+ disabled?: boolean;
518
+ /** */
519
+ hidden?: unknown;
520
+ };
521
+
522
+ export type SwellTabVueEvents = {};
523
+
524
+ /** `SwellTabs` component event */
525
+ export type SwellTabsElementEvent<E = Event> = TypedEvent<SwellTabs, E>;
526
+ /** `request` event type */
527
+ export type SwellTabsRequestElementEvent = SwellTabsElementEvent<
528
+ CustomEvent<{ value: string }>
529
+ >;
530
+
531
+ export type SwellTabsVueProps = {
532
+ /** The value of the chosen tab; the first tab that isn't disabled by default. */
533
+ value?: string;
534
+ /** */
535
+ "aria-label"?: unknown;
536
+ /** How steps line up: in a row above the chosen step's content, by default, or one under another, each a heading with its content under it. Other appearances stay in a row. */
537
+ orientation?: "horizontal" | "vertical";
538
+ /** The heading level of vertical steps, 1 to 6; 2 by default. */
539
+ level?: number;
540
+ /** The word a screen reader hears after the label of a done step, in the host's language, such as `Completed`; the check shows it to the eye. */
541
+ "done-label"?: string;
542
+ /** How the tabs are drawn: a line under the chosen tab, a track with a marker under it, or numbered steps joined by lines, each a check once done. `steps` is set with this attribute only; the `tabs.appearance` setting gives the default. */
543
+ appearance?: "underline" | "segmented" | "steps";
544
+ /** How large the tabs are: they take the height and the text of a control of the size; `medium` by default. */
545
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
546
+ };
547
+
548
+ export type SwellTabsVueEvents = {
549
+ /** The user chose another tab. A listener that cancels the click on a tab, also a framework's handler on the page, keeps the choice. */
550
+ change: SwellTabsElementEvent;
551
+ /** The user asks for another tab, by a press or an arrow, with its value in `detail.value`, before the group chooses it; it bubbles. Cancelling it keeps the choice. It fires for a disabled tab too, which stays unchosen, so a host can answer a press on a locked step, such as by checking the open one. */
552
+ request: SwellTabsRequestElementEvent;
553
+ };
554
+
555
+ export type SwellTextVueProps = {
556
+ /** The heading level, 1 to 6: it makes text of any type a heading. A title, a heading and a subheading are headings of level 1, 2 and 3 by default. */
557
+ level?: number;
558
+ /** Which palette of `color` the text takes its color from: `secondary`, quiet text, or a variant of the host's own; without it, the text color. */
559
+ variant?: string;
560
+ /** What the text is; body text by default. An eyebrow is uppercase. */
561
+ type?:
562
+ | "title"
563
+ | "heading"
564
+ | "subheading"
565
+ | "strong"
566
+ | "body"
567
+ | "caption"
568
+ | "footnote"
569
+ | "eyebrow";
570
+ };
571
+
572
+ export type SwellTextVueEvents = {};
573
+
574
+ /** `SwellTextarea` component event */
575
+ export type SwellTextareaElementEvent<E = Event> = TypedEvent<SwellTextarea, E>;
576
+
577
+ export type SwellTextareaVueProps = {
578
+ /** The label of the field. */
579
+ label?: string;
580
+ /** A marker after the label, such as `(optional)`, in the host's language; it joins the field's name. */
581
+ optional?: string;
582
+ /** Help text under the field. */
583
+ hint?: string;
584
+ /** The error shown while the field is invalid. */
585
+ error?: string;
586
+ /** Marks the field invalid and shows the error. */
587
+ invalid?: boolean;
588
+ /** The default value. */
589
+ value?: string;
590
+ /** How the field is drawn; the configured setting by default. */
591
+ appearance?: "outline" | "filled" | "underline";
592
+ /** How large the field is; `medium` by default. At `xsmall` the label sits above the field. */
593
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
594
+ /** Disables the field. */
595
+ disabled?: boolean;
596
+ /** Makes the field read-only. */
597
+ readonly?: boolean;
598
+ /** Makes the field required. */
599
+ required?: boolean;
600
+ /** The name sent with the form. */
601
+ name?: string;
602
+ /** Text shown while the field is empty. */
603
+ placeholder?: string;
604
+ /** The autofill hint of the native textarea. */
605
+ autocomplete?: string;
606
+ /** The shortest allowed value. */
607
+ minlength?: number;
608
+ /** The longest allowed value. */
609
+ maxlength?: number;
610
+ /** The visible lines; 2 by default. */
611
+ rows?: number;
612
+ /** */
613
+ readOnly?: boolean;
614
+ };
615
+
616
+ export type SwellTextareaVueEvents = {
617
+ /** The value changes as the user types; it bubbles from the native textarea. */
618
+ input: SwellTextareaElementEvent;
619
+ /** The user commits a new value; it bubbles from the native textarea. */
620
+ change: SwellTextareaElementEvent;
621
+ };
622
+
623
+ export type SwellThumbnailVueProps = {
624
+ /** */
625
+ "aria-label"?: unknown;
626
+ /** Which palette of `color` the box takes its colors from: `secondary`, the quiet colors with a border, as for a product without a photo, or a variant of the host's own; without it, the accent, as for an avatar. */
627
+ variant?: string;
628
+ /** How large the box is: the height of a control of the size; `medium` by default. */
629
+ size?: "xsmall" | "small" | "medium" | "large" | "xlarge";
630
+ /** Rounds the box fully, as for an avatar. */
631
+ shape?: "circle";
632
+ };
633
+
634
+ export type SwellThumbnailVueEvents = {};
635
+
636
+ export type SwellUiVueProps = {
637
+ /** The id of the area's configuration. An id without a configuration yet applies once the host registers one. */
638
+ config?: string;
639
+ };
640
+
641
+ export type SwellUiVueEvents = {};
642
+
643
+ export type CustomCssProperties = {};
644
+
645
+ // Vue SFC template type-checking (GlobalComponents) for non-Vue custom elements.
646
+ // Note: Some tooling expects this augmentation under "@vue/runtime-core", while
647
+ // other docs/examples use "vue". We emit both for compatibility.
648
+ export interface WcToolkitVueGlobalComponents {
649
+ /** A badge: a short label or a count, such as a subscription's interval, a discount or a quantity. It is text only: screen readers read it in place, so a count needs its context in the host's markup, such as hidden text next to it. */
650
+ "swell-badge": DefineCustomElement<
651
+ SwellBadge,
652
+ SwellBadgeVueProps,
653
+ SwellBadgeVueEvents
654
+ >;
655
+ /** A button. It submits or resets the form it belongs to, like a native button. With 'href' it is a link that looks like the button: an anchor in its shadow root fills it inside the border, takes the focus and follows the link, named by the element's own 'aria-label', or else by its content; 'type', 'disabled', 'loading' and 'success' belong to the button without 'href'. 'role="button"' and 'tabindex="0"' count as the kit's and leave when 'href' comes; any other role or tabindex is the host's and stays. While 'loading', the button shows a spinner in place of its 'start' content, hides its 'end' content and ignores clicks; it keeps its focus. With 'success', it is filled with the success color and shows a check in place of its icons and its spinner. It is inactive, as after a payment, but keeps its focus and doesn't fade. */
656
+ "swell-button": DefineCustomElement<
657
+ SwellButton,
658
+ SwellButtonVueProps,
659
+ SwellButtonVueEvents
660
+ >;
661
+ /** A card: a box that groups content, such as the details of an order or a note under a choice. */
662
+ "swell-card": DefineCustomElement<
663
+ SwellCard,
664
+ SwellCardVueProps,
665
+ SwellCardVueEvents
666
+ >;
667
+ /** A checkbox: a native checkbox with its label, hint and error, rendered into light DOM. */
668
+ "swell-checkbox": DefineCustomElement<
669
+ SwellCheckbox,
670
+ SwellCheckboxVueProps,
671
+ SwellCheckboxVueEvents
672
+ >;
673
+ /** A chip: a short value the shopper can remove, such as an applied discount code or gift card. Its remove button fires 'remove'; the host removes the chip and moves the focus, for example to the code field. A disabled chip, by its own attribute or a disabled fieldset around it, keeps its value legible and fades its remove button, which takes neither the focus nor presses, so a host can lock a form while it is sent. */
674
+ "swell-chip": DefineCustomElement<
675
+ SwellChip,
676
+ SwellChipVueProps,
677
+ SwellChipVueEvents
678
+ >;
679
+ /** A disclosure: content that stays hidden until the shopper presses its trigger, such as "Add apartment, suite, etc." and the field it reveals. The trigger opens it and leaves; the focus moves to the first control of the content. With 'toggle', such as a collapsible order summary, the trigger stays, closes the content too and tells whether it is open with 'aria-expanded'; the focus stays on it. The host can also set 'open' itself, for example from a checkbox, and remove it to close the content and bring the trigger back; without a trigger, the host moves the focus out first. Closed content stays in the page and in the form: render it only while open, or disable its fields, so a required field doesn't block the submit. */
680
+ "swell-disclosure": DefineCustomElement<
681
+ SwellDisclosure,
682
+ SwellDisclosureVueProps,
683
+ SwellDisclosureVueEvents
684
+ >;
685
+ /** A divider: a line across its width, or two lines with a label between them, such as "or pay another way". Without a label it is a separator for screen readers; with one, they read the label and skip the lines. The host sets the space around it. */
686
+ "swell-divider": DefineCustomElement<
687
+ SwellDivider,
688
+ SwellDividerVueProps,
689
+ SwellDividerVueEvents
690
+ >;
691
+ /** A link. With 'href', its anchor lives in the shadow root and takes the focus for the element. Without 'href' the element itself is a button that looks like the link: it takes the button role and the tab stop, fires 'click' on Enter and Space, and never submits a form. Its own 'aria-label', 'aria-expanded' and 'aria-controls' name and describe that button, so it can open a popover or a disclosure. 'role="button"' and 'tabindex="0"' count as the kit's and leave when 'href' comes; any other role or tabindex is the host's and stays. */
692
+ "swell-link": DefineCustomElement<
693
+ SwellLink,
694
+ SwellLinkVueProps,
695
+ SwellLinkVueEvents
696
+ >;
697
+ /** A text field: a native input with its label, hint and error, rendered into light DOM. */
698
+ "swell-input": DefineCustomElement<
699
+ SwellInput,
700
+ SwellInputVueProps,
701
+ SwellInputVueEvents
702
+ >;
703
+ /** The list of a lookup's suggestions. It lives only as a child of '<swell-lookup>', which shows it under the field while it opens. */
704
+ "swell-lookup-list": DefineCustomElement<
705
+ SwellLookupList,
706
+ SwellLookupListVueProps,
707
+ SwellLookupListVueEvents
708
+ >;
709
+ /** One suggestion of a lookup. It lives only as a child of '<swell-lookup-list>'. Choosing it clicks it: the host reads the option from the 'click'. A click on a disabled suggestion reaches the host's handlers too, and the field ignores it. */
710
+ "swell-lookup-option": DefineCustomElement<
711
+ SwellLookupOption,
712
+ SwellLookupOptionVueProps,
713
+ SwellLookupOptionVueEvents
714
+ >;
715
+ /** A text field with suggestions: a combobox in ARIA terms. The host loads the suggestions, such as addresses, and puts them into a '<swell-lookup-list>' child as '<swell-lookup-option>' elements; the field shows them under itself. It is a '<swell-input>' in everything else: its native input stays in light DOM, so autofill works as in any field. The list opens while the user types and it has something to show, and closes on a choice, on Escape and when the focus leaves the field. Choosing a suggestion clicks it. After the click, unless a handler prevented its default, the field writes the suggestion's label into the input and fires 'input', with 'inputType' 'insertReplacementText', and 'change'; the list stays closed until the user types again. */
716
+ "swell-lookup": DefineCustomElement<
717
+ SwellLookup,
718
+ SwellLookupVueProps,
719
+ SwellLookupVueEvents
720
+ >;
721
+ /** A popover: a small dialog that floats at the host's trigger, such as the language and currency picker of a checkout. The trigger opens and closes it; opened by the trigger, it moves the focus to its first control. Escape closes it and gives the focus back to the trigger; a press outside it and the focus leaving it close it too. A choice inside keeps it open. The panel sits under the trigger, or above it when there is more room there, at the trigger's start edge, or at its end edge when it would leave the window there. Its content sets its width, at least the trigger's and at most the window's less 16px. Name it with 'aria-label', such as 'Language and currency'. */
722
+ "swell-popover": DefineCustomElement<
723
+ SwellPopover,
724
+ SwellPopoverVueProps,
725
+ SwellPopoverVueEvents
726
+ >;
727
+ /** A quantity: a count the shopper changes with − and +, such as the quantity of a cart line or of a product before it goes into the cart. It is a spinbutton with one tab stop: the up and down arrows change the count by 'step', and Home and End move it to 'min' and 'max'. Name it with 'aria-label', such as 'Quantity, House Blend', or with 'aria-labelledby'. It holds the count and takes part in its form. While the cart updates, set 'busy' rather than 'disabled': a disabled quantity leaves the tab order, so disabling the focused one drops the focus to the page. */
728
+ "swell-quantity": DefineCustomElement<
729
+ SwellQuantity,
730
+ SwellQuantityVueProps,
731
+ SwellQuantityVueEvents
732
+ >;
733
+ /** One option of a radio group. It lives only as a direct child of '<swell-radio>', which holds the choice. In a segmented group and as a button an option shows its 'start' and its label; its hint, 'end' and 'details' are not drawn. An option with the 'hidden' attribute is left out of its group. */
734
+ "swell-radio-option": DefineCustomElement<
735
+ SwellRadioOption,
736
+ SwellRadioOptionVueProps,
737
+ SwellRadioOptionVueEvents
738
+ >;
739
+ /** A radio group: a question with one answer, chosen from its '<swell-radio-option>' children. It holds the choice and takes part in its form. */
740
+ "swell-radio": DefineCustomElement<
741
+ SwellRadio,
742
+ SwellRadioVueProps,
743
+ SwellRadioVueEvents
744
+ >;
745
+ /** One option of a select. It lives only as a direct child of '<swell-select>', which holds the choice. */
746
+ "swell-select-option": DefineCustomElement<
747
+ SwellSelectOption,
748
+ SwellSelectOptionVueProps,
749
+ SwellSelectOptionVueEvents
750
+ >;
751
+ /** A select: a field that opens a list of its '<swell-select-option>' children and shows the chosen one, with its start content; an svg there is drawn 4px larger than the text, in the quiet color. It holds the choice and takes part in its form. Typing goes to the option whose label starts with the typed text, as on a native select: keys typed within half a second, spaces included, form one search. */
752
+ "swell-select": DefineCustomElement<
753
+ SwellSelect,
754
+ SwellSelectVueProps,
755
+ SwellSelectVueEvents
756
+ >;
757
+ /** A skeleton: a shimmering bar that stands in for content while it loads, such as a delivery option's name and price. The host sets its width through 'style' and marks the region it fills with 'aria-busy="true"'; the skeleton itself is hidden from screen readers. Screen readers don't all announce 'aria-busy', so a host can also say what is loading in a polite message, such as a visually hidden '<swell-status>'. */
758
+ "swell-skeleton": DefineCustomElement<
759
+ SwellSkeleton,
760
+ SwellSkeletonVueProps,
761
+ SwellSkeletonVueEvents
762
+ >;
763
+ /** A status message: an error, a success or a warning. Screen readers announce it when it is added after the page has loaded and when its text or type changes: each message goes into a fresh visually hidden region, an alert for danger and a status otherwise. */
764
+ "swell-status": DefineCustomElement<
765
+ SwellStatus,
766
+ SwellStatusVueProps,
767
+ SwellStatusVueEvents
768
+ >;
769
+ /** A tab of a '<swell-tabs>' group: its label and its content, shown while it is chosen. In a tab list the group draws the tab and the element is its panel, named by the label; 'role="tabpanel"' and that name count as the kit's. A step of vertical steps draws its own heading at the group's level, holding a button that opens it, tells whether it is open and controls its content under the heading. */
770
+ "swell-tab": DefineCustomElement<
771
+ SwellTab,
772
+ SwellTabVueProps,
773
+ SwellTabVueEvents
774
+ >;
775
+ /** Tabs: a set of '<swell-tab>' children, one of them chosen, with its content shown. The group draws a tab list: a tab per child, named by its label. The arrows move between the tabs and Home and End to the ends; underlined and segmented tabs are chosen as the focus moves, steps with Enter or Space. Vertical steps draw no tab list: each step is a heading with a button that opens it, and Tab moves between the buttons. */
776
+ "swell-tabs": DefineCustomElement<
777
+ SwellTabs,
778
+ SwellTabsVueProps,
779
+ SwellTabsVueEvents
780
+ >;
781
+ /** Text: a title, a heading, a subheading, strong text, body text, a caption, a footnote or an eyebrow. */
782
+ "swell-text": DefineCustomElement<
783
+ SwellText,
784
+ SwellTextVueProps,
785
+ SwellTextVueEvents
786
+ >;
787
+ /** A text field for several lines: a native textarea with its label, hint and error, rendered into light DOM. Enter adds a line; the field grows only when the user drags its corner. */
788
+ "swell-textarea": DefineCustomElement<
789
+ SwellTextarea,
790
+ SwellTextareaVueProps,
791
+ SwellTextareaVueEvents
792
+ >;
793
+ /** A thumbnail: a picture, an icon or initials in a small box, such as the photo of a cart line or a person's avatar. It is decoration, hidden from screen readers, with its badge; with 'aria-label' it is an image with that name, which then carries what the badge says, such as the quantity. 'aria-hidden="true"' and 'role="img"' count as the kit's; any other value is the host's and stays. */
794
+ "swell-thumbnail": DefineCustomElement<
795
+ SwellThumbnail,
796
+ SwellThumbnailVueProps,
797
+ SwellThumbnailVueEvents
798
+ >;
799
+ /** An area of the page with token values of its own, such as an order summary in the colors of the brand. The host registers the area's configuration with 'configure(config, id)'; its tokens and theme apply to everything inside the element, the host's own markup included, and every value it leaves out comes from the page. The element keeps the layout of its content: it renders nothing of its own. */
800
+ "swell-ui": DefineCustomElement<SwellUi, SwellUiVueProps, SwellUiVueEvents>;
801
+ }
802
+
803
+ declare module "@vue/runtime-core" {
804
+ interface GlobalComponents extends WcToolkitVueGlobalComponents {}
805
+ }
806
+
807
+ declare module "@vue/runtime-dom" {
808
+ interface GlobalComponents extends WcToolkitVueGlobalComponents {}
809
+
810
+ // Needed for named slots on native elements when using Web Components.
811
+ // Vue templates otherwise reject: <span slot="icon" />
812
+ interface HTMLAttributes {
813
+ slot?: string;
814
+ }
815
+ }
816
+
817
+ declare module "vue" {
818
+ interface GlobalComponents extends WcToolkitVueGlobalComponents {}
819
+
820
+ // Some package managers (notably pnpm) may not make "@vue/runtime-dom" directly
821
+ // resolvable from the consuming project, so we also augment via "vue".
822
+ interface HTMLAttributes {
823
+ slot?: string;
824
+ }
825
+
826
+ interface CSSProperties extends CustomCssProperties {}
827
+ }