@eldrajs/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 (205) hide show
  1. package/CHANGELOG.md +1724 -0
  2. package/LICENSE +21 -0
  3. package/README.md +3177 -2
  4. package/dist/VariantPicker-CKw8hmxt.js +9009 -0
  5. package/dist/componentNames.d.ts +19 -0
  6. package/dist/components/accordion/Accordion.vue.d.ts +18 -0
  7. package/dist/components/accordion/AccordionItem.vue.d.ts +26 -0
  8. package/dist/components/accordion/context.d.ts +20 -0
  9. package/dist/components/accordion/detailsExclusivity.d.ts +3 -0
  10. package/dist/components/accordion/heightTransition.d.ts +59 -0
  11. package/dist/components/accordion/types.d.ts +40 -0
  12. package/dist/components/avatar/Avatar.vue.d.ts +10 -0
  13. package/dist/components/avatar/AvatarGroup.vue.d.ts +7 -0
  14. package/dist/components/avatar/types.d.ts +61 -0
  15. package/dist/components/badge/Badge.vue.d.ts +24 -0
  16. package/dist/components/badge/StockBadge.vue.d.ts +10 -0
  17. package/dist/components/badge/types.d.ts +79 -0
  18. package/dist/components/breadcrumb/Breadcrumb.vue.d.ts +10 -0
  19. package/dist/components/breadcrumb/types.d.ts +53 -0
  20. package/dist/components/button/Button.vue.d.ts +37 -0
  21. package/dist/components/button/ButtonGroup.vue.d.ts +17 -0
  22. package/dist/components/button/types.d.ts +68 -0
  23. package/dist/components/card/ContentCard.vue.d.ts +36 -0
  24. package/dist/components/card/FeatureCard.vue.d.ts +27 -0
  25. package/dist/components/card/cueArrow.d.ts +10 -0
  26. package/dist/components/card/stretchedLink.d.ts +45 -0
  27. package/dist/components/card/types.d.ts +92 -0
  28. package/dist/components/carousel/Carousel.vue.d.ts +39 -0
  29. package/dist/components/carousel/types.d.ts +75 -0
  30. package/dist/components/carousel/useCarousel.d.ts +152 -0
  31. package/dist/components/checkbox/Checkbox.vue.d.ts +36 -0
  32. package/dist/components/checkbox/CheckboxGroup.vue.d.ts +16 -0
  33. package/dist/components/checkbox/types.d.ts +78 -0
  34. package/dist/components/chip/Chip.vue.d.ts +37 -0
  35. package/dist/components/chip/ChipGroup.vue.d.ts +21 -0
  36. package/dist/components/chip/context.d.ts +22 -0
  37. package/dist/components/chip/types.d.ts +84 -0
  38. package/dist/components/container/Container.vue.d.ts +18 -0
  39. package/dist/components/container/types.d.ts +17 -0
  40. package/dist/components/currency-input/CurrencyInput.vue.d.ts +17 -0
  41. package/dist/components/currency-input/types.d.ts +8 -0
  42. package/dist/components/dialog/Dialog.vue.d.ts +34 -0
  43. package/dist/components/dialog/types.d.ts +25 -0
  44. package/dist/components/drawer/Drawer.vue.d.ts +36 -0
  45. package/dist/components/drawer/types.d.ts +30 -0
  46. package/dist/components/empty-state/EditorPlaceholder.vue.d.ts +9 -0
  47. package/dist/components/empty-state/EmptyState.vue.d.ts +28 -0
  48. package/dist/components/empty-state/types.d.ts +59 -0
  49. package/dist/components/field-wrapper/FieldError.vue.d.ts +37 -0
  50. package/dist/components/field-wrapper/FieldWrapper.vue.d.ts +30 -0
  51. package/dist/components/field-wrapper/context.d.ts +44 -0
  52. package/dist/components/field-wrapper/types.d.ts +38 -0
  53. package/dist/components/filter-panel/FilterGroup.vue.d.ts +48 -0
  54. package/dist/components/filter-panel/FilterPanel.vue.d.ts +77 -0
  55. package/dist/components/filter-panel/Histogram.vue.d.ts +15 -0
  56. package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +12 -0
  57. package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +12 -0
  58. package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +20 -0
  59. package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +12 -0
  60. package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +12 -0
  61. package/dist/components/filter-panel/facets/shared.d.ts +39 -0
  62. package/dist/components/filter-panel/northwind.d.ts +32 -0
  63. package/dist/components/filter-panel/swatchInk.d.ts +50 -0
  64. package/dist/components/filter-panel/types.d.ts +183 -0
  65. package/dist/components/filter-panel/useFilterPanel.d.ts +230 -0
  66. package/dist/components/form-layout/FormLayout.vue.d.ts +36 -0
  67. package/dist/components/form-layout/context.d.ts +33 -0
  68. package/dist/components/form-layout/focusInvalid.d.ts +18 -0
  69. package/dist/components/form-layout/types.d.ts +52 -0
  70. package/dist/components/icon/Icon.vue.d.ts +8 -0
  71. package/dist/components/icon/types.d.ts +29 -0
  72. package/dist/components/image/Image.vue.d.ts +21 -0
  73. package/dist/components/image/types.d.ts +81 -0
  74. package/dist/components/input/Input.vue.d.ts +47 -0
  75. package/dist/components/input/classes.d.ts +110 -0
  76. package/dist/components/input/types.d.ts +55 -0
  77. package/dist/components/internal/ValueText.vue.d.ts +7 -0
  78. package/dist/components/lightbox/Lightbox.vue.d.ts +19 -0
  79. package/dist/components/lightbox/types.d.ts +47 -0
  80. package/dist/components/link/Link.vue.d.ts +23 -0
  81. package/dist/components/link/types.d.ts +40 -0
  82. package/dist/components/load-more/LoadMore.vue.d.ts +12 -0
  83. package/dist/components/load-more/types.d.ts +21 -0
  84. package/dist/components/logo-item/LogoItem.vue.d.ts +10 -0
  85. package/dist/components/logo-item/types.d.ts +37 -0
  86. package/dist/components/pagination/Pagination.vue.d.ts +15 -0
  87. package/dist/components/pagination/types.d.ts +51 -0
  88. package/dist/components/popover/Popover.vue.d.ts +31 -0
  89. package/dist/components/popover/types.d.ts +53 -0
  90. package/dist/components/price/Price.vue.d.ts +25 -0
  91. package/dist/components/price/types.d.ts +104 -0
  92. package/dist/components/product-card/ProductCard.vue.d.ts +22 -0
  93. package/dist/components/product-card/types.d.ts +123 -0
  94. package/dist/components/quantity-stepper/QuantityStepper.vue.d.ts +26 -0
  95. package/dist/components/quantity-stepper/types.d.ts +35 -0
  96. package/dist/components/radio/RadioGroup.vue.d.ts +38 -0
  97. package/dist/components/radio/types.d.ts +39 -0
  98. package/dist/components/range-slider/RangeSlider.vue.d.ts +70 -0
  99. package/dist/components/range-slider/types.d.ts +151 -0
  100. package/dist/components/range-slider/useRangeSlider.d.ts +106 -0
  101. package/dist/components/rating/Rating.vue.d.ts +22 -0
  102. package/dist/components/rating/RatingStars.vue.d.ts +16 -0
  103. package/dist/components/rating/types.d.ts +45 -0
  104. package/dist/components/search-bar/SearchBar.vue.d.ts +47 -0
  105. package/dist/components/search-bar/SearchResultsPanel.vue.d.ts +93 -0
  106. package/dist/components/search-bar/shortcutOwner.d.ts +39 -0
  107. package/dist/components/search-bar/types.d.ts +122 -0
  108. package/dist/components/search-modal/SearchModal.vue.d.ts +53 -0
  109. package/dist/components/search-modal/types.d.ts +59 -0
  110. package/dist/components/section/Section.vue.d.ts +21 -0
  111. package/dist/components/section/context.d.ts +23 -0
  112. package/dist/components/section/types.d.ts +34 -0
  113. package/dist/components/select/MultiSelect.vue.d.ts +62 -0
  114. package/dist/components/select/Select.vue.d.ts +57 -0
  115. package/dist/components/select/SelectPanel.vue.d.ts +97 -0
  116. package/dist/components/select/openRegistry.d.ts +11 -0
  117. package/dist/components/select/panelParts.d.ts +91 -0
  118. package/dist/components/select/types.d.ts +129 -0
  119. package/dist/components/select/useListbox.d.ts +106 -0
  120. package/dist/components/select/useOptionList.d.ts +61 -0
  121. package/dist/components/select/usePopover.d.ts +147 -0
  122. package/dist/components/skeleton/Skeleton.vue.d.ts +12 -0
  123. package/dist/components/skeleton/types.d.ts +38 -0
  124. package/dist/components/spinner/Spinner.vue.d.ts +3 -0
  125. package/dist/components/switch/Switch.vue.d.ts +30 -0
  126. package/dist/components/switch/types.d.ts +20 -0
  127. package/dist/components/tabs/Tab.vue.d.ts +17 -0
  128. package/dist/components/tabs/TabPanel.vue.d.ts +16 -0
  129. package/dist/components/tabs/Tabs.vue.d.ts +28 -0
  130. package/dist/components/tabs/context.d.ts +48 -0
  131. package/dist/components/tabs/types.d.ts +63 -0
  132. package/dist/components/textarea/Textarea.vue.d.ts +27 -0
  133. package/dist/components/textarea/supportsFieldSizing.d.ts +10 -0
  134. package/dist/components/textarea/types.d.ts +32 -0
  135. package/dist/components/toast/Toast.vue.d.ts +16 -0
  136. package/dist/components/toast/Toaster.vue.d.ts +13 -0
  137. package/dist/components/toast/types.d.ts +44 -0
  138. package/dist/components/tooltip/Tooltip.vue.d.ts +9 -0
  139. package/dist/components/tooltip/supportsFocusVisible.d.ts +17 -0
  140. package/dist/components/tooltip/types.d.ts +46 -0
  141. package/dist/components/unit-input/UnitInput.vue.d.ts +55 -0
  142. package/dist/components/unit-input/types.d.ts +68 -0
  143. package/dist/components/unit-input/undo-redo.d.ts +6 -0
  144. package/dist/components/variant-picker/VariantPicker.vue.d.ts +15 -0
  145. package/dist/components/variant-picker/types.d.ts +49 -0
  146. package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts +18 -0
  147. package/dist/components/visually-hidden/types.d.ts +14 -0
  148. package/dist/composables/dialogStack.d.ts +52 -0
  149. package/dist/composables/teleportTarget.d.ts +79 -0
  150. package/dist/composables/useControllableModel.d.ts +16 -0
  151. package/dist/composables/useDialog.d.ts +84 -0
  152. package/dist/composables/useFloating.d.ts +82 -0
  153. package/dist/composables/useHeadingTag.d.ts +24 -0
  154. package/dist/composables/useLocale.d.ts +81 -0
  155. package/dist/composables/useMessages.d.ts +30 -0
  156. package/dist/composables/useOverlay.d.ts +88 -0
  157. package/dist/composables/useSlotPresence.d.ts +29 -0
  158. package/dist/composables/useToast.d.ts +53 -0
  159. package/dist/icons/paths.d.ts +10 -0
  160. package/dist/index.d.ts +135 -0
  161. package/dist/index.js +12586 -0
  162. package/dist/listFormat-1UrH38f2.js +39 -0
  163. package/dist/messages/en-US.d.ts +485 -0
  164. package/dist/messages/index.d.ts +2 -0
  165. package/dist/messages/is-IS.d.ts +16 -0
  166. package/dist/messages/is-IS.js +169 -0
  167. package/dist/resolver.d.ts +43 -0
  168. package/dist/resolver.js +121 -0
  169. package/dist/style.css +5251 -0
  170. package/dist/tailwind.css +2057 -0
  171. package/dist/tokens.css +134 -0
  172. package/dist/utils/avatar.d.ts +15 -0
  173. package/dist/utils/color.d.ts +11 -0
  174. package/dist/utils/cssTiming.d.ts +40 -0
  175. package/dist/utils/cx.d.ts +31 -0
  176. package/dist/utils/date.d.ts +45 -0
  177. package/dist/utils/id.d.ts +36 -0
  178. package/dist/utils/listFormat.d.ts +22 -0
  179. package/dist/utils/mask.d.ts +48 -0
  180. package/dist/utils/number-format.d.ts +250 -0
  181. package/dist/utils/numeric-input.d.ts +42 -0
  182. package/dist/utils/rating.d.ts +26 -0
  183. package/dist/utils/ratio.d.ts +18 -0
  184. package/dist/utils/tagRecipe.d.ts +24 -0
  185. package/dist/utils/valueFade.d.ts +42 -0
  186. package/dist/vee-validate/FieldCheckbox.vue.d.ts +14 -0
  187. package/dist/vee-validate/FieldCheckboxGroup.vue.d.ts +14 -0
  188. package/dist/vee-validate/FieldCurrencyInput.vue.d.ts +14 -0
  189. package/dist/vee-validate/FieldInput.vue.d.ts +14 -0
  190. package/dist/vee-validate/FieldMultiSelect.vue.d.ts +14 -0
  191. package/dist/vee-validate/FieldQuantityStepper.vue.d.ts +14 -0
  192. package/dist/vee-validate/FieldRadioGroup.vue.d.ts +14 -0
  193. package/dist/vee-validate/FieldSearchBar.vue.d.ts +14 -0
  194. package/dist/vee-validate/FieldSelect.vue.d.ts +14 -0
  195. package/dist/vee-validate/FieldSwitch.vue.d.ts +14 -0
  196. package/dist/vee-validate/FieldTextarea.vue.d.ts +14 -0
  197. package/dist/vee-validate/FieldUnitInput.vue.d.ts +14 -0
  198. package/dist/vee-validate/FieldVariantPicker.vue.d.ts +14 -0
  199. package/dist/vee-validate/Form.vue.d.ts +27 -0
  200. package/dist/vee-validate/context.d.ts +48 -0
  201. package/dist/vee-validate/index.d.ts +27 -0
  202. package/dist/vee-validate/types.d.ts +115 -0
  203. package/dist/vee-validate/useFieldControl.d.ts +67 -0
  204. package/dist/vee-validate.js +1154 -0
  205. package/package.json +105 -3
@@ -0,0 +1,44 @@
1
+ import { UiMessages } from '../../composables/useMessages.js';
2
+ /** Spec "Toast" -> Variants: icon, colour and timing all key off this. */
3
+ export type ToastVariant = 'success' | 'warning' | 'danger';
4
+ /**
5
+ * One action a toast offers (spec "Toast" -> Properties, `action` row): "One action: a link
6
+ * ('View cart (3)') or a button ('Try again')." A discriminated union rather than one interface
7
+ * with two optional fields, matching the API contract's own type verbatim — `href` and `onActivate` are
8
+ * mutually exclusive, never both given for the same toast.
9
+ */
10
+ export type ToastAction = {
11
+ label: string;
12
+ href: string;
13
+ } | {
14
+ label: string;
15
+ onActivate: () => void;
16
+ };
17
+ /** The parts a consumer can restyle through `classes` (spec "Toast" -> Anatomy). */
18
+ export type ToastPart = 'root' | 'icon' | 'title' | 'text' | 'action' | 'close';
19
+ export interface ToastProps {
20
+ /** Icon, colour and auto-dismiss timing (see `useToast`'s `DEFAULT_DURATION`). Default
21
+ * `"success"`. */
22
+ variant?: ToastVariant;
23
+ /** The message. The meaning is always in this text — colour and icon are extras (1.4.1). */
24
+ title: string;
25
+ /** One supporting line, below the title. */
26
+ text?: string;
27
+ /** One action: a link or a link-style button. */
28
+ action?: ToastAction;
29
+ /** Message overrides (only `dismissNotification` applies here). See `useMessages`. */
30
+ messages?: Partial<UiMessages>;
31
+ /** Per-part class overrides, merged with `tailwind-merge`. */
32
+ classes?: Partial<Record<ToastPart, string>>;
33
+ }
34
+ /** The parts a consumer can restyle through `classes` (`Toaster`'s own anatomy: the fixed region
35
+ * and the polite status list inside it — see `Toaster.vue`'s own doc comment for why a danger
36
+ * toast is not inside `list`). */
37
+ export type ToasterPart = 'root' | 'list';
38
+ export interface ToasterProps {
39
+ /** Message overrides, passed through to every `Toast` this renders and to the region's own
40
+ * `aria-label`. See `useMessages`. */
41
+ messages?: Partial<UiMessages>;
42
+ /** Per-part class overrides, merged with `tailwind-merge`. */
43
+ classes?: Partial<Record<ToasterPart, string>>;
44
+ }
@@ -0,0 +1,9 @@
1
+ import { TooltipProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<TooltipProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TooltipProps> & Readonly<{}>, {
3
+ classes: Partial<Record<import('./types.js').TooltipPart, string>>;
4
+ role: import('./types.js').TooltipRole;
5
+ placement: import('./types.js').TooltipPlacement;
6
+ align: import('./types.js').TooltipAlign;
7
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
+ declare const _default: typeof __VLS_export;
9
+ export default _default;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Whether this runtime tells a keyboard focus apart from a mouse/touch one through
3
+ * `:focus-visible` — the browser's own answer to `Tooltip`'s "focus holds it open" rule (spec →
4
+ * States, Shown: "focus within it"), which the operator report and the controller's decision on it
5
+ * narrowed to *keyboard* focus: a mouse click also focuses its target, and treating that as "focus
6
+ * within" is exactly what left the bubble stuck open after a click.
7
+ *
8
+ * A named export of its own, mirroring `Textarea`'s `supportsFieldSizing`, so a test can stub it
9
+ * directly (`vi.spyOn`) to exercise `Tooltip`'s keyboard-flag fallback deterministically. Feature
10
+ * detection alone cannot pick this environment out: happy-dom (this package's own test
11
+ * environment) both parses the selector and answers `CSS.supports('selector(:focus-visible)')`
12
+ * `true`, but implements `:focus-visible` as a synonym for `:focus` — matching *any* focused
13
+ * element, keyboard or not — so a probe run against it reports "supported" and would still hand
14
+ * back exactly the wrong answer for a mouse-focused trigger. Stubbing this function is what lets a
15
+ * spec exercise the fallback on purpose instead of relying on that quirk by accident.
16
+ */
17
+ export declare function supportsFocusVisible(): boolean;
@@ -0,0 +1,46 @@
1
+ /** Above or below the trigger. Combines with `align` (spec "Tooltip" → Variants). */
2
+ export type TooltipPlacement = 'top' | 'bottom';
3
+ /** Centred on the trigger, or aligned to its start / end edge (a trigger near a screen edge). */
4
+ export type TooltipAlign = 'start' | 'center' | 'end';
5
+ /**
6
+ * `label`: the tooltip **is** the trigger's accessible name (`aria-labelledby`) — for an icon-only
7
+ * button, which otherwise has none. `description`: an extra hint added to a trigger that already
8
+ * has a visible label (`aria-describedby`).
9
+ */
10
+ export type TooltipRole = 'label' | 'description';
11
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
12
+ export type TooltipPart = 'root' | 'bubble' | 'arrow';
13
+ /**
14
+ * The default slot's first element is the trigger `Tooltip` names or describes. **It must be a
15
+ * plain element, or a component whose focusable root receives `$attrs`** — an `aria-labelledby` or
16
+ * `aria-describedby` is grafted onto it (`cloneVNode`), and that graft only reaches the DOM when
17
+ * the vnode's own attrs land on a real element. `Button` works: it lets `$attrs` fall through
18
+ * undisturbed. A component declared `inheritAttrs: false` whose own template binds its *own*
19
+ * `aria-describedby` after spreading `$attrs` (`Input`, `Textarea`, `Select`, `Switch`, and this
20
+ * package's other form controls) silently overwrites the grafted attribute instead — a dev-only
21
+ * warning fires when this happens (checked against the rendered DOM, not `inheritAttrs` itself, so
22
+ * it also catches an unrelated `$attrs`-ordering issue with the same symptom). Wrap such a control
23
+ * in a plain element the tooltip can attach to instead.
24
+ */
25
+ export interface TooltipProps {
26
+ /** The label text, a few words. Never essential information, an error, a price or a link. */
27
+ text: string;
28
+ /**
29
+ * Above or below the trigger. Defaults to `top`. Read once, like every `useFloating` placement —
30
+ * a tooltip that has to change it at runtime re-keys the component instead.
31
+ */
32
+ placement?: TooltipPlacement;
33
+ /**
34
+ * Centred, or aligned to the trigger's start / end edge for a trigger near a screen edge.
35
+ * Defaults to `center`. Read once, the same as `placement`.
36
+ */
37
+ align?: TooltipAlign;
38
+ /**
39
+ * Whether the tooltip names the trigger (`label`, for an icon-only button with no other name) or
40
+ * only describes it (`description`, for a trigger that already has a visible label). Defaults to
41
+ * `label`.
42
+ */
43
+ role?: TooltipRole;
44
+ /** Per-part class overrides, merged with `tailwind-merge`. */
45
+ classes?: Partial<Record<TooltipPart, string>>;
46
+ }
@@ -0,0 +1,55 @@
1
+ import { UnitInputProps } from './types.js';
2
+ declare function formatValue(value: number): string;
3
+ declare var __VLS_1: {}, __VLS_8: {};
4
+ type __VLS_Slots = {} & {
5
+ leadingIcon?: (props: typeof __VLS_1) => any;
6
+ } & {
7
+ suffix?: (props: typeof __VLS_8) => any;
8
+ };
9
+ declare const __VLS_base: import('vue').DefineComponent<UnitInputProps, {
10
+ formatValue: typeof formatValue;
11
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ blur: (event: FocusEvent) => any;
13
+ clear: () => any;
14
+ "update:modelValue": (value: number | null) => any;
15
+ focus: (event: FocusEvent) => any;
16
+ "update:formattedValue": (value: string) => any;
17
+ }, string, import('vue').PublicProps, Readonly<UnitInputProps> & Readonly<{
18
+ onBlur?: ((event: FocusEvent) => any) | undefined;
19
+ onClear?: (() => any) | undefined;
20
+ "onUpdate:modelValue"?: ((value: number | null) => any) | undefined;
21
+ onFocus?: ((event: FocusEvent) => any) | undefined;
22
+ "onUpdate:formattedValue"?: ((value: string) => any) | undefined;
23
+ }>, {
24
+ size: import('../../index.js').InputSize;
25
+ label: string;
26
+ name: string;
27
+ classes: Partial<Record<import('./types.js').UnitInputPart, string>>;
28
+ modelValue: number | string | null;
29
+ required: boolean;
30
+ unit: string;
31
+ max: number;
32
+ id: string;
33
+ step: number;
34
+ leadingIcon: import('../../index.js').IconComponent;
35
+ disabled: boolean;
36
+ invalid: boolean;
37
+ describedBy: string;
38
+ locale: string;
39
+ currency: string;
40
+ narrowSymbol: boolean;
41
+ maxFraction: number;
42
+ isCurrency: boolean;
43
+ min: number;
44
+ enableDragAdjust: boolean;
45
+ clearable: boolean;
46
+ readonly: boolean;
47
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
48
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
49
+ declare const _default: typeof __VLS_export;
50
+ export default _default;
51
+ type __VLS_WithSlots<T, S> = T & {
52
+ new (): {
53
+ $slots: S;
54
+ };
55
+ };
@@ -0,0 +1,68 @@
1
+ import { IconComponent } from '../icon/types.js';
2
+ import { InputSize } from '../input/types.js';
3
+ /**
4
+ * The parts a consumer can restyle through `classes`.
5
+ *
6
+ * `label` and `field` are this control's own: it draws a label when nothing above it does (see
7
+ * `UnitInputProps.label`), so the field box is one element deeper than `Input`'s — the decorations
8
+ * are positioned against `field`, never against a `root` that may also hold a label.
9
+ */
10
+ export type UnitInputPart = 'root' | 'label' | 'field' | 'leadingIcon' | 'control' | 'suffix' | 'dragHandle' | 'clearButton';
11
+ export interface UnitInputProps {
12
+ /**
13
+ * The value (two-way), as a **number** — never the string in the field. A numeric string is
14
+ * accepted and normalised, `''` and `null` are an empty field, and `0` is a value like any
15
+ * other. What comes back out of `update:modelValue` is always `number | null`.
16
+ */
17
+ modelValue?: number | string | null;
18
+ /** An `Intl` unit identifier, e.g. `kilometer`, `kilogram`, `percent`. Ignored for a currency. */
19
+ unit?: string;
20
+ /** A BCP 47 tag. Defaults to whatever `provideEldraUiLocale` set, else `en-US`. */
21
+ locale?: string;
22
+ /**
23
+ * A label drawn by the control itself — **only** when nothing above it names the field. Inside a
24
+ * `FieldWrapper` the wrapper owns the label, and this is ignored rather than said twice.
25
+ */
26
+ label?: string;
27
+ /** The most fraction digits the formatted value keeps. Defaults to `2`. */
28
+ maxFraction?: number;
29
+ /** The highest value the field accepts. Typing past it is refused. Defaults to `2 ** 53 - 1`. */
30
+ max?: number;
31
+ /** The lowest value the field accepts, and what an emptied field falls back to. Defaults to `0`. */
32
+ min?: number;
33
+ /** What `ArrowUp`/`ArrowDown` and one drag step move by. Defaults to `1`. */
34
+ step?: number;
35
+ /** Adds a suffix handle that changes the value by `step` per few pixels of vertical drag. */
36
+ enableDragAdjust?: boolean;
37
+ /** Shows a control that clears the numeric value to `null`. */
38
+ clearable?: boolean;
39
+ /** Format the value as money rather than as a unit. `CurrencyInput` is this, always on. */
40
+ isCurrency?: boolean;
41
+ /** ISO 4217, e.g. `USD`, `ISK`. Only read when `isCurrency`. Defaults to `USD`. */
42
+ currency?: string;
43
+ /** `$` rather than `US$` where the two differ (`currencyDisplay: 'narrowSymbol'`). Default `false`. */
44
+ narrowSymbol?: boolean;
45
+ /** One of the spec's three field sizes. Defaults to `md`. */
46
+ size?: InputSize;
47
+ /** The control's id. Comes from the `FieldWrapper` when there is one; this wins over it. */
48
+ id?: string;
49
+ /**
50
+ * The form field name. It is posted by a hidden input carrying the **raw** number, so a form
51
+ * receives `1234.5` and never the locale string the customer read.
52
+ */
53
+ name?: string;
54
+ /** A decorative icon at the start of the field. */
55
+ leadingIcon?: IconComponent;
56
+ /** Sets `aria-invalid="true"` and the error boundary. Comes from the `FieldWrapper` otherwise. */
57
+ invalid?: boolean;
58
+ /** `aria-describedby` ids, own ids first. Composed with the `FieldWrapper`'s. */
59
+ describedBy?: string;
60
+ /** Native `required`. Comes from the `FieldWrapper` otherwise. */
61
+ required?: boolean;
62
+ /** Native `readonly`. The value stays focusable and selectable, and nothing edits it. */
63
+ readonly?: boolean;
64
+ /** Native `disabled`. */
65
+ disabled?: boolean;
66
+ /** Per-part class overrides, merged with `tailwind-merge`. */
67
+ classes?: Partial<Record<UnitInputPart, string>>;
68
+ }
@@ -0,0 +1,6 @@
1
+ import { Ref, WritableComputedRef } from 'vue';
2
+ export interface UseUndoRedoReturn {
3
+ /** Call first from the field's own `keydown` handler. Handles Ctrl/Cmd+Z and Ctrl/Cmd+Shift+Z. */
4
+ onKeydown: (event: KeyboardEvent) => void;
5
+ }
6
+ export declare function useUndoRedo(value: WritableComputedRef<string> | Ref<string>): UseUndoRedoReturn;
@@ -0,0 +1,15 @@
1
+ import { VariantPickerProps } from './types.js';
2
+ declare const __VLS_export: import('vue').DefineComponent<VariantPickerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
3
+ "update:modelValue": (value: string) => any;
4
+ change: (value: string) => any;
5
+ }, string, import('vue').PublicProps, Readonly<VariantPickerProps> & Readonly<{
6
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
7
+ onChange?: ((value: string) => any) | undefined;
8
+ }>, {
9
+ classes: Partial<Record<import('./types.js').VariantPickerPart, string>>;
10
+ legend: string;
11
+ type: import('./types.js').VariantPickerType;
12
+ modelValue: string;
13
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
14
+ declare const _default: typeof __VLS_export;
15
+ export default _default;
@@ -0,0 +1,49 @@
1
+ /** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
2
+ export type VariantPickerPart = 'root' | 'legend' | 'legendValue' | 'options' | 'option' | 'radio' | 'label' | 'swatch' | 'soldOutLine';
3
+ /** Pills for text values (sizes, capacities), swatches for colours and glazes. */
4
+ export type VariantPickerType = 'pills' | 'swatches';
5
+ /**
6
+ * One product option. `swatch` is a colour from product data — the spec's "only per-item colour"
7
+ * — applied as an inline style, never a class. `available: false` marks sold out, or a combination
8
+ * that is sold out given the other variant already chosen; either way it stays selectable (spec
9
+ * "Variant picker" → Do/Don't: "Don't disable or hide sold-out options").
10
+ */
11
+ export interface VariantPickerOption {
12
+ value: string;
13
+ label: string;
14
+ swatch?: string;
15
+ available: boolean;
16
+ }
17
+ export interface VariantPickerProps {
18
+ /** The selected value (two-way). Defaults to the first available option (spec Properties table). */
19
+ modelValue?: string;
20
+ /**
21
+ * The radios' shared native `name`, and — unless `legend` is given — the visible option name in
22
+ * the legend too ("Size", "Colour"): exactly what the spec's Properties table asks for. A page
23
+ * with more than one picker sharing an option name (two product cards each with their own
24
+ * "Size", a product-detail form rendered twice) must give each picker its own `name`
25
+ * ("size-<productId>", or a `useUiId()` value); this component does not namespace it for you.
26
+ */
27
+ name: string;
28
+ /**
29
+ * The human legend, when it must differ from `name` (added 2026-09-27).
30
+ *
31
+ * `name` does two jobs, and a page that needs unique radio-group names could not do the first
32
+ * without breaking the second: giving a picker `name: "size-sku-4471"` so its radios don't join
33
+ * the neighbouring card's group also printed "size-sku-4471:" above the pills. With `legend`
34
+ * the two separate — `name` stays the grouping key, `legend` is what a shopper reads — and
35
+ * `name`'s own behaviour is unchanged whenever `legend` is absent, so every existing caller
36
+ * keeps the spec's single-prop shape. The starter's `product-detail` block is the consumer.
37
+ *
38
+ * It is also what the picker's `aria` wiring uses: the `<fieldset>`'s own `<legend>` is the
39
+ * accessible name of the radio group, so a unique-`name` picker with no `legend` would read its
40
+ * internal grouping key out to a screen reader.
41
+ */
42
+ legend?: string;
43
+ /** Pills for text values, swatches for colours. Defaults to `"pills"`. */
44
+ type?: VariantPickerType;
45
+ /** The options. `swatch` colours are the one allowed per-item colour, set as an inline style. */
46
+ options: VariantPickerOption[];
47
+ /** Per-part class overrides, merged with `tailwind-merge`. */
48
+ classes?: Partial<Record<VariantPickerPart, string>>;
49
+ }
@@ -0,0 +1,18 @@
1
+ import { VisuallyHiddenProps } from './types.js';
2
+ declare var __VLS_8: {};
3
+ type __VLS_Slots = {} & {
4
+ default?: (props: typeof __VLS_8) => any;
5
+ };
6
+ declare const __VLS_base: import('vue').DefineComponent<VisuallyHiddenProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<VisuallyHiddenProps> & Readonly<{}>, {
7
+ classes: Partial<Record<import('./types.js').VisuallyHiddenPart, string>>;
8
+ focusable: boolean;
9
+ as: string;
10
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
14
+ type __VLS_WithSlots<T, S> = T & {
15
+ new (): {
16
+ $slots: S;
17
+ };
18
+ };
@@ -0,0 +1,14 @@
1
+ /** The parts a consumer can restyle through `classes`. */
2
+ export type VisuallyHiddenPart = 'root';
3
+ export interface VisuallyHiddenProps {
4
+ /** The element to render. Defaults to `span`. */
5
+ as?: string;
6
+ /**
7
+ * Reveal the content while it has focus — the skip-link pattern. Leave it
8
+ * off for text that is only ever read aloud (a live region, an icon-only
9
+ * control's name).
10
+ */
11
+ focusable?: boolean;
12
+ /** Per-part class overrides, merged with `tailwind-merge`. */
13
+ classes?: Partial<Record<VisuallyHiddenPart, string>>;
14
+ }
@@ -0,0 +1,52 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * The DOM element a `Toaster` should render its live region into while a modal dialog is open, or
4
+ * `null` while none is — **the topmost one** when more than one is open (design spec, shared modal
5
+ * rules: "a toast raised while a modal is open is rendered inside the open dialog, so it isn't
6
+ * inert" — with more than one open, the toast has to land in the one that is not itself covered).
7
+ *
8
+ * **Not a Vue injection key**, despite the name matching this package's `*_KEY` convention
9
+ * (`FIELD_KEY`, `MESSAGES_KEY`, …) — those all connect a provider to its own *descendants*, and a
10
+ * `Toaster` is not one: the design spec's own toast region "lives outside the dialog" (shared modal
11
+ * rules), which in practice means an app mounts one `<Toaster />` near its root, a sibling of
12
+ * whatever page content opens a `Dialog` somewhere else in the tree. `provide`/`inject` cannot
13
+ * connect two siblings, so the hand-off has to be a plain shared reference both sides read and
14
+ * write independently — exactly what a module-level `Ref` is, and exactly the same reasoning
15
+ * `usePopover`'s `topLayerDialog()` already leans on to teleport a non-modal panel into a modal
16
+ * dialog it did not render.
17
+ *
18
+ * It holds the open dialog's own root element — the `Dialog` anatomy has no separate "toast host"
19
+ * part to render (`DialogPart` is `root | panel | header | title | close | description | body |
20
+ * footer`), so `Toaster` renders its live region as an appended child of this element (a
21
+ * `<dialog>` accepts ordinary children anywhere in its box) rather than one this package declares
22
+ * a slot or a `data-part` for.
23
+ */
24
+ export declare const TOAST_HOST_KEY: Ref<HTMLDialogElement | null>;
25
+ /**
26
+ * Push `dialog` onto the stack, making it the new top.
27
+ *
28
+ * Idempotent for a dialog that is already in the stack (a spurious re-open is a no-op, not a
29
+ * duplicate entry) — every other dialog is simply pushed on top, no refusal, no warning: nested
30
+ * modals are allowed.
31
+ *
32
+ * The *first* claim (the stack going from empty to non-empty) locks the page's scroll (`<html>`
33
+ * gets `overflow: hidden`, the shared modal rule: "While any modal surface is open … the root
34
+ * element does not scroll") — later pushes leave it locked, already true. `TOAST_HOST_KEY` always
35
+ * points at the new top.
36
+ */
37
+ export declare function openDialog(dialog: HTMLDialogElement): void;
38
+ /**
39
+ * Pop `dialog` off the stack, wherever it sits in it. Safe to call on a dialog that is not in the
40
+ * stack (already closed, or never opened).
41
+ *
42
+ * `TOAST_HOST_KEY` falls back to whatever is now on top (`null` once the stack is empty), and the
43
+ * scroll lock is released only once the stack actually *is* empty — one modal closing while another
44
+ * is still open must leave the page exactly as locked as it was.
45
+ */
46
+ export declare function closeDialog(dialog: HTMLDialogElement): void;
47
+ /** Whether `dialog` is the **topmost** entry in the stack — what `Esc` and a backdrop click are
48
+ * gated on (`useDialog`'s own `isTop`). A dialog lower in the stack answers `false`: it is open,
49
+ * but not the one those routes may act on. */
50
+ export declare function isOpenDialog(dialog: HTMLDialogElement): boolean;
51
+ /** The topmost dialog's element, or `null` while the stack is empty. Exposed for tests. */
52
+ export declare function currentDialog(): HTMLDialogElement | null;
@@ -0,0 +1,79 @@
1
+ import { ComputedRef, Ref } from 'vue';
2
+ /**
3
+ * The `<dialog>` a popup anchored to `anchor` has to be teleported *into* rather than escape, or
4
+ * `null` when there is none.
5
+ *
6
+ * A **modal** dialog is the one place `document.body` is the wrong target: the dialog is in the top
7
+ * layer, so a popup on the body would be painted behind it and no `z-index` could raise it. So the
8
+ * nearest open ancestor dialog that is actually in the top layer wins — which is not always the
9
+ * nearest one, since a non-modal `<dialog open>` may sit inside a modal one.
10
+ *
11
+ * When **no** ancestor dialog claims the top layer, the nearest open one is still the answer. That
12
+ * case is ambiguous — either they really are all non-modal, or the engine does not implement
13
+ * `:modal` and cannot say — and the two mistakes are not equally bad. Teleporting into a dialog
14
+ * that did not need it still escapes everything between the control and that dialog, and the
15
+ * dialog is a box the popup had no business overflowing anyway; teleporting to `body` out of a
16
+ * dialog that *was* modal puts the popup behind it, invisibly, which is the very bug this whole
17
+ * mechanism exists to fix. There is no engine-independent probe to break the tie —
18
+ * `CSS.supports('selector(:modal)')` answers `true` for nonsense in happy-dom — so the safe
19
+ * mistake is the one taken. A non-modal `<dialog open>` is in any case close to hypothetical here:
20
+ * the design spec's non-negotiable 2 opens every modal surface with `showModal()`, and says the
21
+ * non-modal popups are not dialogs at all.
22
+ */
23
+ export declare function topLayerDialog(anchor: HTMLElement): HTMLElement | null;
24
+ export interface UseTeleportTargetOptions {
25
+ /** The element the popup is anchored to. */
26
+ trigger: Ref<HTMLElement | null>;
27
+ /**
28
+ * Where the popup is rendered. Read once, like every `useFloating` option.
29
+ *
30
+ * - `true` — through a `<Teleport>` to `document.body`, or to the nearest **open native
31
+ * `<dialog>`** above the trigger when there is one (see `topLayerDialog`).
32
+ * - a string — a CSS selector, passed to `<Teleport to>` verbatim.
33
+ * - `false` — no teleport: `teleportDisabled` is `true` for good.
34
+ */
35
+ teleport: boolean | string;
36
+ /**
37
+ * Re-resolve the target whenever this changes — typically the popup's own open/visible state.
38
+ * `closest()` answers about the DOM as it is, not reactively, so the lookup has to be re-run on
39
+ * every open: a dialog that was closed the last time this popup opened may be open now.
40
+ */
41
+ isOpen: Ref<boolean>;
42
+ }
43
+ export interface UseTeleportTargetReturn {
44
+ /**
45
+ * `<Teleport to>`: the open `<dialog>` the trigger sits in, or `document.body`, or the
46
+ * consumer's own selector. An **element** rather than a selector wherever one is known, so two
47
+ * open dialogs cannot both answer the same query.
48
+ */
49
+ teleportTo: ComputedRef<HTMLElement | string>;
50
+ /**
51
+ * `<Teleport disabled>`: `true` until this component is mounted, and for good when
52
+ * `teleport: false`.
53
+ *
54
+ * The mounted flag is what makes the teleport SSR-safe. `<Teleport>` renders its content into a
55
+ * separate buffer on the server, and hydration then has to find it somewhere the server never
56
+ * put it; `disabled` renders in place on both sides instead, and the real teleport happens once,
57
+ * after mount, when Vue simply moves the nodes.
58
+ */
59
+ teleportDisabled: ComputedRef<boolean>;
60
+ }
61
+ /**
62
+ * Where a teleported popup is rendered: `usePopover`'s and `Tooltip`'s shared answer to "escape
63
+ * clipping and stacking, but not the browser's own top layer."
64
+ *
65
+ * A panel (or bubble) rendered inside its own control is at the mercy of everything above it: an
66
+ * ancestor with `overflow: hidden` (a card, a table cell, a carousel track) clips it, and any later
67
+ * sibling that starts a stacking context (a sticky header with a `z-index`, a section with
68
+ * `isolate`) paints over it however high its own `z-index` is. On `body` neither can happen — except
69
+ * for a native `<dialog>` opened with `showModal()`, which renders in the top layer above every
70
+ * `z-index` on the page, so a popup teleported to `body` out from under one would be invisible
71
+ * behind it. `topLayerDialog` is the one exception that rule needs.
72
+ *
73
+ * ```ts
74
+ * const isOpen = ref(false);
75
+ * const trigger = ref<HTMLElement | null>(null);
76
+ * const { teleportTo, teleportDisabled } = useTeleportTarget({ trigger, teleport: true, isOpen });
77
+ * ```
78
+ */
79
+ export declare function useTeleportTarget(options: UseTeleportTargetOptions): UseTeleportTargetReturn;
@@ -0,0 +1,16 @@
1
+ import { Ref } from 'vue';
2
+ /**
3
+ * A model that works both ways round: controlled when the parent passes
4
+ * `modelValue`, self-managing when it does not.
5
+ *
6
+ * Every stateful component in this package uses it, so a consumer can drop a
7
+ * `Select` in with no `v-model` and still get a working control, while a
8
+ * consumer that does bind `v-model` stays the single source of truth — writes
9
+ * are emitted and never applied locally, so a parent that refuses a value
10
+ * actually refuses it.
11
+ *
12
+ * `fallback` supplies the uncontrolled starting value and is called once.
13
+ */
14
+ export declare function useControllableModel<T>(props: {
15
+ modelValue?: T;
16
+ }, emit: (event: 'update:modelValue', value: T) => void, fallback: () => T): Ref<T>;
@@ -0,0 +1,84 @@
1
+ import { ComputedRef, MaybeRefOrGetter, Ref } from 'vue';
2
+ export interface UseDialogOptions {
3
+ /** Whether the dialog should be showing. Owned by the consumer; this composable only reads it. */
4
+ open: Ref<boolean>;
5
+ /** Asked to change `open`, on every route that closes the dialog (never to open it). */
6
+ setOpen: (open: boolean) => void;
7
+ /** The `<dialog>` element itself. Must be a real `<dialog>`; every part of this composable is
8
+ * built on `HTMLDialogElement`'s own `showModal()`/`close()`/`cancel`/`close` contract. */
9
+ dialog: Ref<HTMLDialogElement | null>;
10
+ /** Whether a backdrop click closes the dialog. `Esc` and `close()` always do. Default `true`. */
11
+ dismissable?: MaybeRefOrGetter<boolean>;
12
+ /** Focused once the dialog opens, instead of the first meaningful control. */
13
+ initialFocus?: Ref<HTMLElement | null>;
14
+ /** Ran when `Esc` is pressed (the native `cancel` event), before the dialog actually closes. */
15
+ onCancel?: () => void;
16
+ }
17
+ export interface UseDialogReturn {
18
+ /** Closes the dialog, the same way a `<button value>` inside `<form method="dialog">` would:
19
+ * `returnValue` becomes the reason a consumer's own `close` handler reads back. No-op if the
20
+ * dialog is not open. */
21
+ close(returnValue?: string): void;
22
+ /** Whether this dialog is the **topmost** one — `dialogStack`'s own top of stack. `true` for a
23
+ * modal opened alone; `false` for one still open but covered by another opened on top of it. */
24
+ isTop: ComputedRef<boolean>;
25
+ }
26
+ /**
27
+ * The lifecycle of one **modal surface**: the design spec's shared "Modal dialogs" rules, applied
28
+ * to whichever native `<dialog>` a component hands this composable. `Dialog` is the first consumer;
29
+ * `Drawer`, `Lightbox` and `SearchModal` are built on the same contract rather than reimplementing
30
+ * it, which is why every rule below lives here instead of in `Dialog.vue`.
31
+ *
32
+ * What it owns, entirely through the native element — **no custom focus trap, no `role="dialog"`**
33
+ * (the design spec's own non-negotiable 2, and this file's whole reason to exist):
34
+ *
35
+ * - **Open/close**, synced to `open`: `showModal()` when it becomes `true`, `.close()` when it
36
+ * becomes `false`. A native modal `<dialog>` already makes the rest of the page `inert` (nothing
37
+ * outside it is focusable or reachable by a screen reader's virtual cursor) and already contains
38
+ * `Tab`/`Shift+Tab` to its own controls for free — that is the entire point of using one, so
39
+ * nothing here re-implements either.
40
+ * - **Nested modals** (`dialogStack`, operator override, 2026-09-26 — see the README's Deviations
41
+ * entry): opening a dialog pushes it onto the shared stack; a dialog already open when another
42
+ * one opens is left open, underneath — no refusal, no warning. `Esc` and a backdrop click,
43
+ * though, only ever act on the **topmost** dialog (`isTop` below): a lower one ignores both,
44
+ * even if one somehow reaches its own listeners directly (native top-layer stacking already
45
+ * routes `Esc` to the top only; this is defence in depth, not the primary mechanism).
46
+ * - **Scroll lock and the toast host** (`dialogStack`, shared with every future modal built on this
47
+ * composable): the page behind does not scroll while the stack is non-empty (released only once
48
+ * every open modal has closed), and `TOAST_HOST_KEY` tracks the **topmost** dialog a `Toaster`
49
+ * should render into.
50
+ * - **Initial focus**: `initialFocus`, else the first meaningful control (never the close button —
51
+ * see `firstMeaningfulControl` above), else the close button itself as a last resort, else
52
+ * whatever the platform already focused. Applied a tick after `showModal()`, so slot content that
53
+ * mounts alongside the dialog (a form's first field) already exists in the DOM to focus.
54
+ * - **Focus return**: whatever had focus immediately before `showModal()` gets it back the moment
55
+ * the dialog actually closes, by any route — the page's own opener for the bottom of the stack,
56
+ * or, for a modal opened from inside another one, whichever control still had focus in the modal
57
+ * underneath (captured the same way, just a tick earlier), so closing the top one lands focus
58
+ * back in the modal below rather than on the page.
59
+ * - **`Esc`** (the native `cancel` event): closes the dialog, never `dismissable`-gated (the shared
60
+ * rule: "`Esc` … always closes it") — but only while this dialog is the top of the stack; a lower
61
+ * one ignores it outright (`preventDefault()`ed, so even the platform's own default action cannot
62
+ * close it). `onCancel` is a notification, not a guard — it cannot prevent the close, matching
63
+ * the interface below (`() => void`, nothing to call `preventDefault()` on).
64
+ * - **Backdrop click**: a `click` whose `target` is the `<dialog>` element itself — not a
65
+ * descendant, which stops the target at that descendant — closes it when `dismissable` is `true`
66
+ * (default) **and** this dialog is the top of the stack; a lower dialog's own backdrop click
67
+ * (unreachable in a real browser, where the topmost modal's full-viewport surface covers it, but
68
+ * reachable from a test dispatching the event directly) does nothing. `dismissable` is read on
69
+ * every click, so a consumer can flip it while the dialog is open (a form that becomes dirty
70
+ * part-way through).
71
+ *
72
+ * ```ts
73
+ * const open = ref(false);
74
+ * const dialog = ref<HTMLDialogElement | null>(null);
75
+ * const { close, isTop } = useDialog({
76
+ * open,
77
+ * setOpen: (next) => (open.value = next),
78
+ * dialog,
79
+ * dismissable: () => !formIsDirty.value,
80
+ * onCancel: () => emit('cancel'),
81
+ * });
82
+ * ```
83
+ */
84
+ export declare function useDialog(options: UseDialogOptions): UseDialogReturn;