@warp-ds/elements 2.1.1 → 2.2.0-next.10

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 (233) hide show
  1. package/README.md +27 -17
  2. package/dist/.storybook/utilities.d.ts +28 -0
  3. package/dist/api.js +1 -49
  4. package/dist/api.js.map +4 -4
  5. package/dist/custom-elements.json +4282 -0
  6. package/dist/index.css +2 -0
  7. package/dist/index.css.map +7 -0
  8. package/dist/index.js +4561 -6638
  9. package/dist/index.js.map +4 -4
  10. package/dist/packages/affix/affix.stories.d.ts +10 -0
  11. package/dist/packages/affix/affix.test.d.ts +1 -0
  12. package/dist/packages/affix/index.d.ts +52 -24
  13. package/dist/packages/affix/index.js +2571 -2240
  14. package/dist/packages/affix/index.js.map +4 -4
  15. package/dist/packages/affix/react.d.ts +2 -0
  16. package/dist/packages/affix/styles.d.ts +1 -0
  17. package/dist/packages/alert/alert.stories.d.ts +15 -0
  18. package/dist/packages/alert/alert.test.d.ts +1 -0
  19. package/dist/packages/alert/index.d.ts +27 -17
  20. package/dist/packages/alert/index.js +2568 -2446
  21. package/dist/packages/alert/index.js.map +4 -4
  22. package/dist/packages/alert/react.d.ts +2 -0
  23. package/dist/packages/alert/styles.d.ts +1 -0
  24. package/dist/packages/attention/attention.stories.d.ts +15 -0
  25. package/dist/packages/attention/attention.test.d.ts +1 -0
  26. package/dist/packages/attention/index.d.ts +62 -90
  27. package/dist/packages/attention/index.js +3497 -3984
  28. package/dist/packages/attention/index.js.map +4 -4
  29. package/dist/packages/attention/layout-styles.d.ts +1 -0
  30. package/dist/packages/attention/react.d.ts +1 -0
  31. package/dist/packages/attention/styles.d.ts +1 -0
  32. package/dist/packages/badge/badge.stories.d.ts +17 -0
  33. package/dist/packages/badge/badge.test.d.ts +1 -0
  34. package/dist/packages/badge/index.d.ts +17 -11
  35. package/dist/packages/badge/index.js +2550 -300
  36. package/dist/packages/badge/index.js.map +4 -4
  37. package/dist/packages/badge/react.d.ts +2 -0
  38. package/dist/packages/badge/styles.d.ts +1 -0
  39. package/dist/packages/box/box.stories.d.ts +14 -0
  40. package/dist/packages/box/box.test.d.ts +1 -0
  41. package/dist/packages/box/index.d.ts +22 -20
  42. package/dist/packages/box/index.js +2550 -304
  43. package/dist/packages/box/index.js.map +4 -4
  44. package/dist/packages/box/react.d.ts +2 -0
  45. package/dist/packages/box/slot.test.d.ts +1 -0
  46. package/dist/packages/box/styles.d.ts +1 -0
  47. package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +12 -0
  48. package/dist/packages/breadcrumbs/breadcrumbs.test.d.ts +1 -0
  49. package/dist/packages/breadcrumbs/index.d.ts +24 -16
  50. package/dist/packages/breadcrumbs/index.js +2511 -2051
  51. package/dist/packages/breadcrumbs/index.js.map +4 -4
  52. package/dist/packages/breadcrumbs/react.d.ts +2 -0
  53. package/dist/packages/breadcrumbs/styles.d.ts +1 -0
  54. package/dist/packages/button/button.stories.d.ts +21 -0
  55. package/dist/packages/button/button.test.d.ts +1 -0
  56. package/dist/packages/button/index.d.ts +111 -56
  57. package/dist/packages/button/index.js +2735 -2130
  58. package/dist/packages/button/index.js.map +4 -4
  59. package/dist/packages/button/react.d.ts +2 -0
  60. package/dist/packages/button/styles.d.ts +1 -0
  61. package/dist/packages/card/card.stories.d.ts +15 -0
  62. package/dist/packages/card/card.test.d.ts +1 -0
  63. package/dist/packages/card/index.d.ts +33 -16
  64. package/dist/packages/card/index.js +2530 -2078
  65. package/dist/packages/card/index.js.map +4 -4
  66. package/dist/packages/card/react.d.ts +2 -0
  67. package/dist/packages/card/styles.d.ts +1 -0
  68. package/dist/packages/datepicker/DatePicker.test.d.ts +1 -0
  69. package/dist/packages/datepicker/datepicker.d.ts +107 -0
  70. package/dist/packages/datepicker/datepicker.js +2929 -0
  71. package/dist/packages/datepicker/datepicker.js.map +7 -0
  72. package/dist/packages/datepicker/datepicker.stories.d.ts +11 -0
  73. package/dist/packages/datepicker/datepicker.test.d.ts +2 -0
  74. package/dist/packages/datepicker/index.d.ts +1 -0
  75. package/dist/packages/datepicker/index.js +2929 -0
  76. package/dist/packages/datepicker/index.js.map +7 -0
  77. package/dist/packages/datepicker/locales/da/messages.d.mts +1 -0
  78. package/dist/packages/datepicker/locales/en/messages.d.mts +1 -0
  79. package/dist/packages/datepicker/locales/fi/messages.d.mts +1 -0
  80. package/dist/packages/datepicker/locales/nb/messages.d.mts +1 -0
  81. package/dist/packages/datepicker/locales/sv/messages.d.mts +1 -0
  82. package/dist/packages/datepicker/react.d.ts +2 -0
  83. package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +1 -0
  84. package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +1 -0
  85. package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +1 -0
  86. package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +1 -0
  87. package/dist/packages/datepicker/utils.d.ts +13 -0
  88. package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +10 -0
  89. package/dist/packages/dead-toggle/dead-toggle.test.d.ts +1 -0
  90. package/dist/packages/dead-toggle/index.d.ts +21 -0
  91. package/dist/packages/dead-toggle/index.js +2610 -0
  92. package/dist/packages/dead-toggle/index.js.map +7 -0
  93. package/dist/packages/dead-toggle/react.d.ts +2 -0
  94. package/dist/packages/expandable/expandable.stories.d.ts +19 -0
  95. package/dist/packages/expandable/expandable.test.d.ts +1 -0
  96. package/dist/packages/expandable/index.d.ts +55 -50
  97. package/dist/packages/expandable/index.js +2545 -2293
  98. package/dist/packages/expandable/index.js.map +4 -4
  99. package/dist/packages/expandable/react.d.ts +2 -0
  100. package/dist/packages/expandable/styles.d.ts +1 -0
  101. package/dist/packages/link/index.d.ts +39 -0
  102. package/dist/packages/link/index.js +2769 -0
  103. package/dist/packages/link/index.js.map +7 -0
  104. package/dist/packages/link/link.stories.d.ts +20 -0
  105. package/dist/packages/link/link.test.d.ts +1 -0
  106. package/dist/packages/link/react.d.ts +2 -0
  107. package/dist/packages/link/styles.d.ts +1 -0
  108. package/dist/packages/modal/index.d.ts +4 -5
  109. package/dist/packages/modal/index.js +2765 -2569
  110. package/dist/packages/modal/index.js.map +4 -4
  111. package/dist/packages/modal/modal-footer.d.ts +18 -11
  112. package/dist/packages/modal/modal-footer.js +2499 -0
  113. package/dist/packages/modal/modal-footer.js.map +7 -0
  114. package/dist/packages/modal/modal-header.d.ts +30 -31
  115. package/dist/packages/modal/modal-header.js +2700 -0
  116. package/dist/packages/modal/modal-header.js.map +7 -0
  117. package/dist/packages/modal/modal-main.d.ts +32 -31
  118. package/dist/packages/modal/modal-main.js +2681 -0
  119. package/dist/packages/modal/modal-main.js.map +7 -0
  120. package/dist/packages/modal/modal.stories.d.ts +19 -0
  121. package/dist/packages/modal/react.d.ts +4 -0
  122. package/dist/packages/modal/util.d.ts +7 -17
  123. package/dist/packages/pageindicator/index.d.ts +14 -0
  124. package/dist/packages/pageindicator/index.js +169 -0
  125. package/dist/packages/pageindicator/index.js.map +7 -0
  126. package/dist/packages/pageindicator/pageindicator.stories.d.ts +32 -0
  127. package/dist/packages/pageindicator/react.d.ts +2 -0
  128. package/dist/packages/pageindicator/style.d.ts +1 -0
  129. package/dist/packages/pagination/index.d.ts +37 -0
  130. package/dist/packages/pagination/index.js +2610 -0
  131. package/dist/packages/pagination/index.js.map +7 -0
  132. package/dist/packages/pagination/locales/da/messages.d.mts +1 -0
  133. package/dist/packages/pagination/locales/en/messages.d.mts +1 -0
  134. package/dist/packages/pagination/locales/fi/messages.d.mts +1 -0
  135. package/dist/packages/pagination/locales/nb/messages.d.mts +1 -0
  136. package/dist/packages/pagination/locales/sv/messages.d.mts +1 -0
  137. package/dist/packages/pagination/pagination.stories.d.ts +14 -0
  138. package/dist/packages/pagination/pagination.test.d.ts +1 -0
  139. package/dist/packages/pagination/react.d.ts +2 -0
  140. package/dist/packages/pagination/styles.d.ts +1 -0
  141. package/dist/packages/pill/index.d.ts +44 -23
  142. package/dist/packages/pill/index.js +2524 -2175
  143. package/dist/packages/pill/index.js.map +4 -4
  144. package/dist/packages/pill/pill.stories.d.ts +12 -0
  145. package/dist/packages/pill/pill.test.d.ts +1 -0
  146. package/dist/packages/pill/styles.d.ts +1 -0
  147. package/dist/packages/rip-and-tear-checkbox/checkbox.d.ts +64 -0
  148. package/dist/packages/rip-and-tear-checkbox/index.css +2 -0
  149. package/dist/packages/rip-and-tear-checkbox/index.css.map +7 -0
  150. package/dist/packages/rip-and-tear-checkbox/index.d.ts +6 -0
  151. package/dist/packages/rip-and-tear-checkbox/index.js +187 -0
  152. package/dist/packages/rip-and-tear-checkbox/index.js.map +7 -0
  153. package/dist/packages/rip-and-tear-radio/base-element.d.ts +46 -0
  154. package/dist/packages/rip-and-tear-radio/custom-error-validator.d.ts +6 -0
  155. package/dist/packages/rip-and-tear-radio/form-associated-element.d.ts +103 -0
  156. package/dist/packages/rip-and-tear-radio/index.css +2 -0
  157. package/dist/packages/rip-and-tear-radio/index.css.map +7 -0
  158. package/dist/packages/rip-and-tear-radio/index.d.ts +8 -0
  159. package/dist/packages/rip-and-tear-radio/index.js +157 -0
  160. package/dist/packages/rip-and-tear-radio/index.js.map +7 -0
  161. package/dist/packages/rip-and-tear-radio/invalid.d.ts +8 -0
  162. package/dist/packages/rip-and-tear-radio/math.d.ts +1 -0
  163. package/dist/packages/rip-and-tear-radio/radio-group.d.ts +72 -0
  164. package/dist/packages/rip-and-tear-radio/radio.d.ts +38 -0
  165. package/dist/packages/rip-and-tear-radio/required-validator.d.ts +11 -0
  166. package/dist/packages/rip-and-tear-radio/slot.d.ts +20 -0
  167. package/dist/packages/rip-and-tear-radio/watch.d.ts +26 -0
  168. package/dist/packages/select/index.d.ts +59 -48
  169. package/dist/packages/select/index.js +2565 -2236
  170. package/dist/packages/select/index.js.map +4 -4
  171. package/dist/packages/select/react.d.ts +2 -0
  172. package/dist/packages/select/select.stories.d.ts +10 -0
  173. package/dist/packages/select/select.test.d.ts +1 -0
  174. package/dist/packages/select/styles.d.ts +1 -0
  175. package/dist/packages/steps/index.d.ts +43 -0
  176. package/dist/packages/steps/index.js +2581 -0
  177. package/dist/packages/steps/index.js.map +7 -0
  178. package/dist/packages/steps/locales/da/messages.d.mts +1 -0
  179. package/dist/packages/steps/locales/en/messages.d.mts +1 -0
  180. package/dist/packages/steps/locales/fi/messages.d.mts +1 -0
  181. package/dist/packages/steps/locales/nb/messages.d.mts +1 -0
  182. package/dist/packages/steps/locales/sv/messages.d.mts +1 -0
  183. package/dist/packages/steps/react.d.ts +3 -0
  184. package/dist/packages/steps/steps.stories.d.ts +12 -0
  185. package/dist/packages/steps/styles.d.ts +1 -0
  186. package/dist/packages/styles.d.ts +2 -0
  187. package/dist/packages/switch/index.d.ts +20 -0
  188. package/dist/packages/switch/index.js +2564 -0
  189. package/dist/packages/switch/index.js.map +7 -0
  190. package/dist/packages/switch/react.d.ts +2 -0
  191. package/dist/packages/switch/styles.d.ts +1 -0
  192. package/dist/packages/switch/switch.stories.d.ts +9 -0
  193. package/dist/packages/tabs/index.d.ts +4 -0
  194. package/dist/packages/tabs/index.js +2579 -0
  195. package/dist/packages/tabs/index.js.map +7 -0
  196. package/dist/packages/tabs/react.d.ts +4 -0
  197. package/dist/packages/tabs/styles.d.ts +1 -0
  198. package/dist/packages/tabs/tab-panel.d.ts +20 -0
  199. package/dist/packages/tabs/tab.d.ts +23 -0
  200. package/dist/packages/tabs/tabs.d.ts +38 -0
  201. package/dist/packages/tabs/tabs.stories.d.ts +8 -0
  202. package/dist/packages/textfield/index.d.ts +72 -74
  203. package/dist/packages/textfield/index.js +2572 -413
  204. package/dist/packages/textfield/index.js.map +4 -4
  205. package/dist/packages/textfield/react.d.ts +2 -0
  206. package/dist/packages/textfield/styles.d.ts +1 -0
  207. package/dist/packages/textfield/textfield.stories.d.ts +17 -0
  208. package/dist/packages/textfield/textfield.test.d.ts +1 -0
  209. package/dist/packages/toast/api.d.ts +4 -45
  210. package/dist/packages/toast/index.d.ts +3 -0
  211. package/dist/packages/toast/index.js +2610 -2787
  212. package/dist/packages/toast/index.js.map +4 -4
  213. package/dist/packages/toast/styles.d.ts +1 -0
  214. package/dist/packages/toast/toast-container.d.ts +12 -63
  215. package/dist/packages/toast/toast.d.ts +34 -29
  216. package/dist/packages/toast/toast.stories.d.ts +12 -0
  217. package/dist/packages/toast/types.d.ts +15 -0
  218. package/dist/packages/utils/expand-transition.d.ts +3 -2
  219. package/dist/packages/utils/index.d.ts +1 -1
  220. package/dist/packages/utils/index.js +27 -0
  221. package/dist/packages/utils/index.js.map +7 -0
  222. package/dist/packages/utils/unstyled-heading.d.ts +4 -3
  223. package/dist/setup-tests.d.ts +1 -0
  224. package/dist/styles.css +1 -0
  225. package/dist/vscode.css-custom-data.json +6 -0
  226. package/dist/vscode.html-custom-data.json +421 -0
  227. package/dist/web-types.json +949 -0
  228. package/package.json +74 -28
  229. package/dist/index.d.ts +0 -19
  230. package/dist/packages/broadcast/component.d.ts +0 -36
  231. package/dist/packages/broadcast/index.d.ts +0 -2
  232. package/dist/packages/broadcast/index.js +0 -87
  233. package/dist/packages/broadcast/index.js.map +0 -7
@@ -0,0 +1,8 @@
1
+ export declare class WInvalidEvent extends Event {
2
+ constructor();
3
+ }
4
+ declare global {
5
+ interface GlobalEventHandlersEventMap {
6
+ 'wa-invalid': WInvalidEvent;
7
+ }
8
+ }
@@ -0,0 +1 @@
1
+ export declare function uniqueId(prefix?: string): string;
@@ -0,0 +1,72 @@
1
+ import type { PropertyValues } from 'lit';
2
+ import { BaseFormAssociatedElement } from './form-associated-element';
3
+ import './radio';
4
+ import type { WRadio } from './radio';
5
+ /**
6
+ * @slot label - Alternative to the `label` attribute should you need custom HTML.
7
+ */
8
+ export declare class WRadioGroup extends BaseFormAssociatedElement {
9
+ static css: any[];
10
+ static get validators(): import("./form-associated-element").Validator<BaseFormAssociatedElement>[];
11
+ private readonly hasSlotController;
12
+ hasRadioButtons: boolean;
13
+ defaultSlot: HTMLSlotElement;
14
+ /**
15
+ * The radio group's label. Required for proper accessibility. If you need to display HTML, use the `label` slot
16
+ * instead.
17
+ */
18
+ label: string;
19
+ /** The radio groups's hint. If you need to display HTML, use the `hint` slot instead. */
20
+ hint: string;
21
+ /** The name of the radio group, submitted as a name/value pair with form data. */
22
+ name: string | null;
23
+ /** Disables the radio group and all child radios. */
24
+ disabled: boolean;
25
+ /** The orientation in which to show radio items. */
26
+ orientation: 'horizontal' | 'vertical';
27
+ private _value;
28
+ get value(): string | number | null;
29
+ /** The current value of the radio group, submitted as a name/value pair with form data. */
30
+ set value(val: string | number | null);
31
+ /** The default value of the form control. Primarily used for resetting the form control. */
32
+ defaultValue: string | null;
33
+ /** The radio group's size. This size will be applied to all child radios and radio buttons, except when explicitly overridden. */
34
+ size: 'small' | 'medium' | 'large';
35
+ /** Ensures a child radio is checked before allowing the containing form to submit. */
36
+ required: boolean;
37
+ /**
38
+ * Used for SSR. if true, will show slotted label on initial render.
39
+ */
40
+ withLabel: boolean;
41
+ /**
42
+ * Used for SSR. if true, will show slotted hint on initial render.
43
+ */
44
+ withHint: boolean;
45
+ static shadowRootOptions: {
46
+ delegatesFocus: boolean;
47
+ mode: ShadowRootMode;
48
+ serializable?: boolean;
49
+ slotAssignment?: SlotAssignmentMode;
50
+ };
51
+ constructor();
52
+ /**
53
+ * We use the first available radio as the validationTarget similar to native HTML that shows the validation popup on
54
+ * the first radio element.
55
+ */
56
+ get validationTarget(): WRadio;
57
+ updated(changedProperties: PropertyValues<this>): void;
58
+ formResetCallback(...args: Parameters<BaseFormAssociatedElement['formResetCallback']>): void;
59
+ private handleRadioClick;
60
+ private getAllRadios;
61
+ private handleLabelClick;
62
+ private syncRadioElements;
63
+ private handleKeyDown;
64
+ /** Sets focus on the radio group. */
65
+ focus(options?: FocusOptions): void;
66
+ render(): import("lit").TemplateResult<1>;
67
+ }
68
+ declare global {
69
+ interface HTMLElementTagNameMap {
70
+ 'w-radio-group': WRadioGroup;
71
+ }
72
+ }
@@ -0,0 +1,38 @@
1
+ import type { PropertyValues } from 'lit';
2
+ import { BaseFormAssociatedElement } from './form-associated-element';
3
+ export declare class WRadio extends BaseFormAssociatedElement {
4
+ static css: any[];
5
+ checked: boolean;
6
+ /** @internal Used by radio group to force disable radios while preserving their original disabled state. */
7
+ forceDisabled: boolean;
8
+ /**
9
+ * The string pointing to a form's id.
10
+ */
11
+ form: string | null;
12
+ /** The radio's value. When selected, the radio group will receive this value. */
13
+ value: string;
14
+ /** The radio's value. When selected, the radio group will receive this value. */
15
+ appearance: 'default' | 'button' | 'clickable';
16
+ /**
17
+ * The radio's size. When used inside a radio group, the size will be determined by the radio group's size so this
18
+ * attribute can typically be omitted.
19
+ */
20
+ size: 'small' | 'medium' | 'large';
21
+ /** Disables the radio. */
22
+ disabled: boolean;
23
+ constructor();
24
+ connectedCallback(): void;
25
+ private setInitialAttributes;
26
+ updated(changedProperties: PropertyValues<this>): void;
27
+ /**
28
+ * @override
29
+ */
30
+ setValue(): void;
31
+ private handleClick;
32
+ render(): import("lit").TemplateResult<1>;
33
+ }
34
+ declare global {
35
+ interface HTMLElementTagNameMap {
36
+ 'w-radio': WRadio;
37
+ }
38
+ }
@@ -0,0 +1,11 @@
1
+ import type { Validator } from './form-associated-element';
2
+ export interface RequiredValidatorOptions {
3
+ /** This is a cheap way for us to get translation strings for the user without having proper translations. */
4
+ validationElement?: HTMLSelectElement | HTMLInputElement;
5
+ /**
6
+ * The property to check if its not null-ish. For most elements this will be "value".
7
+ * For "checkbox" for example it will be "checked"
8
+ */
9
+ validationProperty?: string;
10
+ }
11
+ export declare const RequiredValidator: (options?: RequiredValidatorOptions) => Validator;
@@ -0,0 +1,20 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ /** A reactive controller that determines when slots exist. */
3
+ export declare class HasSlotController implements ReactiveController {
4
+ host: ReactiveControllerHost & Element;
5
+ slotNames: string[];
6
+ constructor(host: ReactiveControllerHost & Element, ...slotNames: string[]);
7
+ private hasDefaultSlot;
8
+ private hasNamedSlot;
9
+ test(slotName: string): boolean;
10
+ hostConnected(): void;
11
+ hostDisconnected(): void;
12
+ private handleSlotChange;
13
+ }
14
+ /**
15
+ * Given a list of nodes, this function iterates over all of them and returns the concatenated
16
+ * HTML as a string. This is useful for getting the HTML that corresponds to a slot’s assigned nodes (since we can't use slot.innerHTML as an alternative).
17
+ * @param nodes - The list of nodes to iterate over.
18
+ * @param callback - A function that can be used to customize the HTML output for specific types of nodes. If the function returns undefined, the default HTML output will be used.
19
+ */
20
+ export declare function getInnerHTML(nodes: Iterable<Node>, callback?: (node: Node) => string | undefined): string;
@@ -0,0 +1,26 @@
1
+ import type { LitElement } from 'lit';
2
+ type UpdateHandler = (prev?: unknown, next?: unknown) => void;
3
+ type NonUndefined<A> = A extends undefined ? never : A;
4
+ type UpdateHandlerFunctionKeys<T extends object> = {
5
+ [K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;
6
+ }[keyof T];
7
+ interface WatchOptions {
8
+ /**
9
+ * If true, will only start watching after the initial update/render
10
+ */
11
+ waitUntilFirstUpdate?: boolean;
12
+ }
13
+ /**
14
+ * Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an
15
+ * update to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the
16
+ * initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.
17
+ *
18
+ * Usage:
19
+ *
20
+ * @watch('propName')
21
+ * handlePropChange(oldValue, newValue) {
22
+ * ...
23
+ * }
24
+ */
25
+ export declare function watch(propertyName: string | string[], options?: WatchOptions): <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>) => void;
26
+ export {};
@@ -1,56 +1,67 @@
1
- declare const WarpSelect_base: {
2
- new (): {
3
- [x: string]: any;
4
- };
5
- [x: string]: any;
6
- createProperty(name: any, options: any): void;
1
+ import { LitElement } from 'lit';
2
+ import '@warp-ds/icons/elements/chevron-down-16';
3
+ export declare const ccSelect: {
4
+ base: string;
5
+ default: string;
6
+ disabled: string;
7
+ invalid: string;
8
+ readOnly: string;
9
+ wrapper: string;
10
+ selectWrapper: string;
11
+ chevron: string;
12
+ chevronDisabled: string;
7
13
  };
8
- export class WarpSelect extends WarpSelect_base {
9
- static properties: {
10
- autoFocus: {
11
- type: BooleanConstructor;
12
- reflect: boolean;
13
- };
14
- invalid: {
15
- type: BooleanConstructor;
16
- reflect: boolean;
17
- };
18
- always: {
19
- type: BooleanConstructor;
20
- reflect: boolean;
21
- };
22
- hint: {
23
- type: StringConstructor;
24
- reflect: boolean;
25
- };
26
- label: {
27
- type: StringConstructor;
28
- reflect: boolean;
29
- };
30
- optional: {
31
- type: BooleanConstructor;
32
- reflect: boolean;
33
- };
34
- disabled: {
35
- type: BooleanConstructor;
36
- reflect: boolean;
37
- };
38
- readOnly: {
39
- type: BooleanConstructor;
40
- relfect: boolean;
41
- };
42
- _options: {
43
- state: boolean;
44
- };
45
- };
46
- static styles: any[];
47
- _options: any;
14
+ export declare const ccLabel: {
15
+ base: string;
16
+ optional: string;
17
+ };
18
+ export declare const ccHelpText: {
19
+ base: string;
20
+ color: string;
21
+ colorInvalid: string;
22
+ };
23
+ declare const WarpSelect_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
24
+ /**
25
+ * A dropdown component for selecting a single value.
26
+ *
27
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/forms-select--docs)
28
+ */
29
+ export declare class WarpSelect extends WarpSelect_base {
30
+ #private;
31
+ /** Whether the element should receive focus on render */
32
+ autoFocus: boolean;
33
+ /** Renders the field in an invalid state. Often paired with `hint` to provide feedback about the error */
34
+ invalid: boolean;
35
+ /** Whether to always show a hint */
36
+ always: boolean;
37
+ /** The content displayed as the help text */
38
+ hint: string;
39
+ /** The content to disply as the label */
40
+ label: string;
41
+ /** Whether to show optional text */
42
+ optional: boolean;
43
+ /** Renders the field in a disabled state. */
44
+ disabled: boolean;
45
+ /** Renders the field in a readonly state. */
46
+ readOnly: boolean;
47
+ /** @internal */
48
+ _options: string;
49
+ name: string;
50
+ value: string;
51
+ static styles: import("lit").CSSResult[];
52
+ constructor();
53
+ /** @internal */
54
+ _setValue: (value: string) => void;
48
55
  firstUpdated(): void;
49
- handleKeyDown(event: any): void;
56
+ handleKeyDown(event: KeyboardEvent): void;
50
57
  onChange({ target }: {
51
58
  target: any;
52
59
  }): void;
53
60
  render(): import("lit").TemplateResult<1>;
54
- #private;
61
+ }
62
+ declare global {
63
+ interface HTMLElementTagNameMap {
64
+ 'w-select': WarpSelect;
65
+ }
55
66
  }
56
67
  export {};