@eldrajs/ui 0.2.8 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -0
- package/README.md +324 -161
- package/dist/{VariantPicker-CjWUVhlm.js → VariantPicker-C-9sMXGI.js} +3275 -2040
- package/dist/componentNames.d.ts +1 -1
- package/dist/components/accordion/Accordion.vue.d.ts +1 -2
- package/dist/components/accordion/AccordionItem.vue.d.ts +1 -1
- package/dist/components/accordion/types.d.ts +6 -7
- package/dist/components/avatar/Avatar.vue.d.ts +1 -1
- package/dist/components/avatar/types.d.ts +6 -4
- package/dist/components/badge/types.d.ts +6 -4
- package/dist/components/breadcrumb/types.d.ts +5 -2
- package/dist/components/button/Button.vue.d.ts +6 -3
- package/dist/components/button/ButtonGroup.vue.d.ts +0 -1
- package/dist/components/button/types.d.ts +39 -9
- package/dist/components/card/ContentCard.vue.d.ts +2 -2
- package/dist/components/card/FeatureCard.vue.d.ts +1 -1
- package/dist/components/card/stretchedLink.d.ts +3 -3
- package/dist/components/card/types.d.ts +6 -4
- package/dist/components/carousel/types.d.ts +7 -3
- package/dist/components/checkbox/Checkbox.vue.d.ts +5 -3
- package/dist/components/checkbox/CheckboxGroup.vue.d.ts +1 -1
- package/dist/components/checkbox/types.d.ts +21 -4
- package/dist/components/chip/Chip.vue.d.ts +5 -4
- package/dist/components/chip/ChipGroup.vue.d.ts +0 -1
- package/dist/components/chip/types.d.ts +5 -6
- package/dist/components/container/Container.vue.d.ts +0 -1
- package/dist/components/container/types.d.ts +0 -4
- package/dist/components/dialog/Dialog.vue.d.ts +13 -8
- package/dist/components/dialog/types.d.ts +16 -4
- package/dist/components/drawer/Drawer.vue.d.ts +2 -1
- package/dist/components/drawer/types.d.ts +5 -2
- package/dist/components/empty-state/EmptyState.vue.d.ts +1 -1
- package/dist/components/empty-state/types.d.ts +7 -6
- package/dist/components/field-wrapper/FieldWrapper.vue.d.ts +4 -1
- package/dist/components/field-wrapper/RequiredMark.vue.d.ts +15 -0
- package/dist/components/field-wrapper/context.d.ts +8 -0
- package/dist/components/field-wrapper/types.d.ts +17 -6
- package/dist/components/filter-panel/FilterGroup.vue.d.ts +1 -0
- package/dist/components/filter-panel/FilterPanel.vue.d.ts +7 -6
- package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +1 -0
- package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +1 -0
- package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +2 -1
- package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +1 -0
- package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +1 -0
- package/dist/components/filter-panel/facets/shared.d.ts +4 -4
- package/dist/components/filter-panel/types.d.ts +5 -2
- package/dist/components/form-layout/FormLayout.vue.d.ts +1 -1
- package/dist/components/form-layout/types.d.ts +5 -2
- package/dist/components/icon/Icon.vue.d.ts +1 -2
- package/dist/components/icon/types.d.ts +0 -4
- package/dist/components/image/types.d.ts +3 -2
- package/dist/components/input/Input.vue.d.ts +13 -8
- package/dist/components/input/classes.d.ts +33 -18
- package/dist/components/input/reassertValue.d.ts +13 -0
- package/dist/components/input/types.d.ts +18 -6
- package/dist/components/input/useAdornmentRoom.d.ts +15 -0
- package/dist/components/lightbox/Lightbox.vue.d.ts +2 -1
- package/dist/components/lightbox/types.d.ts +5 -2
- package/dist/components/link/Link.vue.d.ts +1 -1
- package/dist/components/link/types.d.ts +5 -2
- package/dist/components/load-more/types.d.ts +4 -3
- package/dist/components/logo-item/LogoItem.vue.d.ts +1 -1
- package/dist/components/logo-item/types.d.ts +2 -1
- package/dist/components/nav-menu/NavMenu.vue.d.ts +2 -1
- package/dist/components/nav-menu/navLinks.d.ts +1 -1
- package/dist/components/nav-menu/types.d.ts +3 -3
- package/dist/components/pagination/Pagination.vue.d.ts +154 -0
- package/dist/components/pagination/types.d.ts +36 -2
- package/dist/components/popover/Popover.vue.d.ts +29 -2
- package/dist/components/popover/types.d.ts +62 -9
- package/dist/components/price/types.d.ts +3 -2
- package/dist/components/product-card/ProductCard.vue.d.ts +2 -2
- package/dist/components/product-card/types.d.ts +3 -2
- package/dist/components/quantity-stepper/QuantityStepper.vue.d.ts +4 -4
- package/dist/components/quantity-stepper/types.d.ts +5 -2
- package/dist/components/radio/Radio.vue.d.ts +33 -0
- package/dist/components/radio/RadioGroup.vue.d.ts +6 -2
- package/dist/components/radio/recipes.d.ts +41 -0
- package/dist/components/radio/types.d.ts +71 -4
- package/dist/components/range-slider/RangeSlider.vue.d.ts +2 -1
- package/dist/components/range-slider/types.d.ts +5 -2
- package/dist/components/rating/Rating.vue.d.ts +1 -1
- package/dist/components/rating/types.d.ts +3 -2
- package/dist/components/search-bar/SearchBar.vue.d.ts +4 -3
- package/dist/components/search-bar/SearchResultsPanel.vue.d.ts +1 -1
- package/dist/components/search-bar/types.d.ts +5 -2
- package/dist/components/search-modal/SearchModal.vue.d.ts +3 -2
- package/dist/components/search-modal/types.d.ts +7 -4
- package/dist/components/section/Section.vue.d.ts +0 -1
- package/dist/components/section/types.d.ts +0 -4
- package/dist/components/select/MultiSelect.vue.d.ts +53 -6
- package/dist/components/select/Select.vue.d.ts +24 -4
- package/dist/components/select/SelectPanel.vue.d.ts +25 -2
- package/dist/components/select/SelectTags.vue.d.ts +50 -0
- package/dist/components/select/openRegistry.d.ts +14 -4
- package/dist/components/select/panelParts.d.ts +45 -18
- package/dist/components/select/types.d.ts +54 -10
- package/dist/components/select/useOptionList.d.ts +31 -4
- package/dist/components/select/usePopover.d.ts +36 -39
- package/dist/components/select/useSummaryFit.d.ts +21 -0
- package/dist/components/select/useTagRows.d.ts +17 -0
- package/dist/components/site-form/SiteForm.vue.d.ts +3 -2
- package/dist/components/site-form/types.d.ts +6 -2
- package/dist/components/skeleton/Skeleton.vue.d.ts +2 -2
- package/dist/components/skeleton/types.d.ts +4 -4
- package/dist/components/switch/Switch.vue.d.ts +17 -10
- package/dist/components/switch/types.d.ts +29 -2
- package/dist/components/tabler-icon/TablerIcon.vue.d.ts +2 -3
- package/dist/components/tabler-icon/types.d.ts +0 -4
- package/dist/components/tabs/Tab.vue.d.ts +2 -1
- package/dist/components/tabs/TabPanel.vue.d.ts +1 -3
- package/dist/components/tabs/Tabs.vue.d.ts +1 -1
- package/dist/components/tabs/context.d.ts +6 -2
- package/dist/components/tabs/types.d.ts +22 -11
- package/dist/components/textarea/Textarea.vue.d.ts +23 -3
- package/dist/components/textarea/types.d.ts +15 -3
- package/dist/components/toast/Toast.vue.d.ts +2 -0
- package/dist/components/toast/Toaster.vue.d.ts +7 -1
- package/dist/components/toast/types.d.ts +52 -5
- package/dist/components/tooltip/types.d.ts +4 -3
- package/dist/components/unit-input/UnitInput.vue.d.ts +7 -7
- package/dist/components/unit-input/types.d.ts +5 -2
- package/dist/components/variant-picker/VariantPicker.vue.d.ts +1 -1
- package/dist/components/variant-picker/types.d.ts +3 -2
- package/dist/components/visually-hidden/VisuallyHidden.vue.d.ts +0 -1
- package/dist/components/visually-hidden/types.d.ts +0 -4
- package/dist/components.css +1556 -2145
- package/dist/composables/useDialog.d.ts +7 -3
- package/dist/composables/useEldraScope.d.ts +24 -0
- package/dist/composables/useFloating.d.ts +21 -8
- package/dist/composables/useOverlay.d.ts +10 -5
- package/dist/composables/useToast.d.ts +3 -0
- package/dist/index.d.ts +12 -10
- package/dist/index.js +2553 -1185
- package/dist/messages/en-US.d.ts +2 -0
- package/dist/messages/is-IS.js +1 -0
- package/dist/resolver.js +1 -0
- package/dist/style.css +1561 -2150
- package/dist/tailwind.css +11 -2203
- package/dist/theme.css +108 -0
- package/dist/tokens.css +1 -0
- package/dist/useMessages-B5nzZghs.js +592 -0
- package/dist/utilities.css +2160 -0
- package/dist/utils/mergeClass.d.ts +3 -0
- package/dist/utils/tagRecipe.d.ts +3 -3
- package/dist/vee-validate.js +42 -6
- package/dist/vue-i18n/index.d.ts +50 -0
- package/dist/vue-i18n/shapes.d.ts +40 -0
- package/dist/vue-i18n.js +289 -0
- package/package.json +17 -3
- package/dist/utils/cx.d.ts +0 -31
|
@@ -14,7 +14,7 @@ import { InputSize } from './types.js';
|
|
|
14
14
|
* own **delta** — a pill radius, a different padding for an icon it draws itself — never a second
|
|
15
15
|
* copy of the box.
|
|
16
16
|
*
|
|
17
|
-
* Nothing here is exported from the package: a consumer restyles through `classes`, tokens and
|
|
17
|
+
* Nothing here is exported from the package: a consumer restyles through `class`, `classes`, tokens and
|
|
18
18
|
* the per-component CSS variables (see the README's Customisation section), not by importing our
|
|
19
19
|
* class strings, which are not a stable API.
|
|
20
20
|
*/
|
|
@@ -30,7 +30,10 @@ import { InputSize } from './types.js';
|
|
|
30
30
|
* list, including the `duration-fast` border-colour change the spec's Behaviour section asks for.
|
|
31
31
|
* See `src/styles/tailwind.css` and `src/__tests__/focus-transition.spec.ts`.
|
|
32
32
|
*/
|
|
33
|
-
export declare const
|
|
33
|
+
export declare const FIELD_BOX: string;
|
|
34
|
+
/** The box's radius, apart so a field with a radius of its own (`SearchBar`'s pill) takes one. */
|
|
35
|
+
export declare const FIELD_RADIUS = "eldra:rounded-[var(--eldra-input-radius,var(--eldra-radius-md))]";
|
|
36
|
+
export declare const FIELD_BASE = "eldra:block eldra:w-full eldra:min-w-0 eldra:eldra-field-border eldra:placeholder:text-muted eldra:eldra-focus eldra:eldra-focus-always eldra:rounded-[var(--eldra-input-radius,var(--eldra-radius-md))]";
|
|
34
37
|
/**
|
|
35
38
|
* The type style per size (spec "Input" → Sizes). Its own constant because `SearchBar`'s two sizes
|
|
36
39
|
* take exactly these rules while its paddings are its own — the `max-md:text-control-mobile`
|
|
@@ -52,7 +55,7 @@ export declare const FIELD_SIZE: Record<InputSize, string>;
|
|
|
52
55
|
* not fit a 2rem sm box, so sm uses a 1.5rem button (still the 2.5.8 target minimum) and 2rem of
|
|
53
56
|
* end padding to match.
|
|
54
57
|
*/
|
|
55
|
-
export declare const FIELD_LEADING_PAD = "ps-9";
|
|
58
|
+
export declare const FIELD_LEADING_PAD = "eldra:ps-9";
|
|
56
59
|
export declare const FIELD_TRAILING_PAD: Record<InputSize, string>;
|
|
57
60
|
export declare const FIELD_CLEAR_SIZE: Record<InputSize, string>;
|
|
58
61
|
/**
|
|
@@ -70,16 +73,17 @@ export declare const FIELD_CLEAR_SIZE: Record<InputSize, string>;
|
|
|
70
73
|
*/
|
|
71
74
|
export declare const FIELD_TRAILING_PAD_PAIR: Record<InputSize, string>;
|
|
72
75
|
export declare const FIELD_ACTION_PAIR_SIZE: Record<InputSize, string>;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
*/
|
|
79
|
-
export declare
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
76
|
+
export declare const FIELD_LIVE = "eldra:bg-background eldra:text-text eldra:border-border-strong eldra:hover:border-text eldra:focus:border-text";
|
|
77
|
+
/** The error boundary alone; `fieldState` pairs it with the live or the read-only fill. */
|
|
78
|
+
export declare const FIELD_INVALID = "eldra:border-danger eldra:hover:border-danger eldra:focus:border-danger";
|
|
79
|
+
export declare const FIELD_DISABLED = "eldra:bg-surface-strong eldra:border-border eldra:border-dashed eldra:text-muted eldra:cursor-not-allowed";
|
|
80
|
+
export declare const FIELD_READONLY = "eldra:bg-surface eldra:text-text eldra:border-border";
|
|
81
|
+
/** The one state recipe a field box is in. `invalid` is the shown error, never set while disabled. */
|
|
82
|
+
export declare function fieldState(state: {
|
|
83
|
+
disabled: boolean;
|
|
84
|
+
readonly: boolean;
|
|
85
|
+
invalid: boolean;
|
|
86
|
+
}): string;
|
|
83
87
|
/** Spec "Input" → Variants, `search`: "The browser's own clear button is hidden." */
|
|
84
88
|
export declare const FIELD_SEARCH_APPEARANCE: string;
|
|
85
89
|
/**
|
|
@@ -89,7 +93,9 @@ export declare const FIELD_SEARCH_APPEARANCE: string;
|
|
|
89
93
|
* package — `Input`'s, `SearchBar`'s and `UnitInput`'s (`CurrencyInput` wraps the last) — showed
|
|
90
94
|
* the default arrow rather than a pointer.
|
|
91
95
|
*/
|
|
92
|
-
export declare const
|
|
96
|
+
export declare const FIELD_CLEAR_BUTTON_BOX: string;
|
|
97
|
+
/** The whole button. A field that shows or rounds it its own way takes `FIELD_CLEAR_BUTTON_BOX`. */
|
|
98
|
+
export declare const FIELD_CLEAR_BUTTON = "eldra:inline-flex eldra:shrink-0 eldra:items-center eldra:justify-center eldra:text-muted eldra:hover:text-text eldra:cursor-pointer eldra:hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)] eldra:eldra-focus eldra:rounded-[var(--eldra-radius-sm)]";
|
|
93
99
|
/** 1.125rem, `muted`, 0.6875rem from the start edge, and out of the pointer's way. */
|
|
94
100
|
export declare const FIELD_LEADING_ICON: string;
|
|
95
101
|
/**
|
|
@@ -103,8 +109,17 @@ export declare const FIELD_LEADING_ICON: string;
|
|
|
103
109
|
* so a field with both keeps them on one row"), and this constant is `Input`'s and `SearchBar`'s
|
|
104
110
|
* row too — dropping the gap here would silently change `Input`'s rendered output for that
|
|
105
111
|
* combination, which an early review caught. Only `UnitInput`'s two-action pair (see
|
|
106
|
-
* `FIELD_TRAILING_PAD_PAIR` above) wants flush icons, and it
|
|
107
|
-
*
|
|
108
|
-
|
|
112
|
+
* `FIELD_TRAILING_PAD_PAIR` above) wants flush icons, and it builds its row from
|
|
113
|
+
* `FIELD_SUFFIX_ROW_BASE` with `gap-0` rather than changing the shared default.
|
|
114
|
+
*/
|
|
115
|
+
export declare const FIELD_SUFFIX_ROW_BASE = "eldra:absolute eldra:end-1 eldra:inset-y-0 eldra:my-auto eldra:flex eldra:items-center";
|
|
116
|
+
export declare const FIELD_SUFFIX_ROW = "eldra:absolute eldra:end-1 eldra:inset-y-0 eldra:my-auto eldra:flex eldra:items-center eldra:gap-1";
|
|
117
|
+
/**
|
|
118
|
+
* The start-edge mirror of `FIELD_SUFFIX_ROW`, for the `prefix` slot: interactive content (a
|
|
119
|
+
* calendar button) 0.25rem from the start edge, so unlike `FIELD_LEADING_ICON` it keeps the pointer.
|
|
109
120
|
*/
|
|
110
|
-
export declare const
|
|
121
|
+
export declare const FIELD_PREFIX_ROW = "eldra:absolute eldra:start-1 eldra:inset-y-0 eldra:my-auto eldra:flex eldra:items-center eldra:gap-1";
|
|
122
|
+
/** The start padding a `prefix` row reserves: the trailing action's room, mirrored. */
|
|
123
|
+
export declare const FIELD_PREFIX_PAD: Record<InputSize, string>;
|
|
124
|
+
/** `FIELD_TRAILING_PAD`/`FIELD_PREFIX_PAD` in rem, for `useAdornmentRoom`'s comparison. */
|
|
125
|
+
export declare const FIELD_ACTION_ROOM_REM: Record<InputSize, number>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Writes `value` onto a text control whose DOM value has drifted from it, keeping the caret.
|
|
3
|
+
*
|
|
4
|
+
* Vue patches `value` only when the bound value changes. A controlled parent that refuses a
|
|
5
|
+
* keystroke, or formats it back to what it already had (`'12a'` → `'12'`), leaves the bound value
|
|
6
|
+
* exactly as it was, so Vue patches nothing and the field keeps showing what was typed against a
|
|
7
|
+
* model that says otherwise. `Checkbox` and `RadioGroup` re-assert `checked` for the same reason.
|
|
8
|
+
*
|
|
9
|
+
* The caret keeps its distance from the end of the value, which is where it lands after a refused
|
|
10
|
+
* or stripped character wherever in the value it was typed. It is moved only on a focused control
|
|
11
|
+
* whose type has a selection API (`selectable`), so this never steals focus or throws.
|
|
12
|
+
*/
|
|
13
|
+
export declare function reassertValue(el: HTMLInputElement | HTMLTextAreaElement | null, value: string, selectable?: boolean): void;
|
|
@@ -4,7 +4,7 @@ export type InputType = 'text' | 'email' | 'tel' | 'number' | 'search' | 'url' |
|
|
|
4
4
|
/** The spec's three compact-control heights: 2rem, 2.5rem and 3rem. */
|
|
5
5
|
export type InputSize = 'sm' | 'md' | 'lg';
|
|
6
6
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
7
|
-
export type InputPart = '
|
|
7
|
+
export type InputPart = 'leadingIcon' | 'prefix' | 'control' | 'clearButton' | 'suffix';
|
|
8
8
|
export interface InputProps {
|
|
9
9
|
/**
|
|
10
10
|
* The value (two-way). With `mask` set this is the **raw** value — the digits and letters the
|
|
@@ -23,19 +23,28 @@ export interface InputProps {
|
|
|
23
23
|
placeholder?: string;
|
|
24
24
|
/** Always set it for personal data: `name`, `email`, `address-line1`, `postal-code`… */
|
|
25
25
|
autocomplete?: string;
|
|
26
|
-
/**
|
|
27
|
-
|
|
26
|
+
/**
|
|
27
|
+
* For example `numeric`. A `number` field defaults to `numeric`; `false` renders no `inputmode`
|
|
28
|
+
* at all, for a number field that needs the full keyboard (a decimal point or a minus sign).
|
|
29
|
+
*/
|
|
30
|
+
inputmode?: string | false;
|
|
28
31
|
/** For `type="number"`. */
|
|
29
32
|
min?: number;
|
|
30
33
|
/** For `type="number"`. */
|
|
31
34
|
max?: number;
|
|
32
35
|
/** For `type="number"`. */
|
|
33
36
|
step?: number;
|
|
34
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* A decorative icon at the start of the field (`search`, `mail`, `discount`). Not drawn when the
|
|
39
|
+
* `prefix` slot is given, which takes the start edge.
|
|
40
|
+
*/
|
|
35
41
|
leadingIcon?: IconComponent;
|
|
36
42
|
/** Shows the clear button while there is a value. Defaults to `true` for `type="search"`. */
|
|
37
43
|
clearable?: boolean;
|
|
38
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Sets `aria-invalid="true"` and the error boundary. Comes from the `FieldWrapper` otherwise.
|
|
46
|
+
* While it is not invalid, an `aria-invalid` attribute the caller passes is kept.
|
|
47
|
+
*/
|
|
39
48
|
invalid?: boolean;
|
|
40
49
|
/** `aria-describedby` ids, error id first. Comes from the `FieldWrapper` otherwise. */
|
|
41
50
|
describedBy?: string;
|
|
@@ -50,6 +59,9 @@ export interface InputProps {
|
|
|
50
59
|
* everything else a separator. The field displays the formatted value; `modelValue` stays raw.
|
|
51
60
|
*/
|
|
52
61
|
mask?: string;
|
|
53
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the root with
|
|
64
|
+
* `class`.
|
|
65
|
+
*/
|
|
54
66
|
classes?: Partial<Record<InputPart, string>>;
|
|
55
67
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* The room an absolutely positioned prefix or suffix row needs on a text field.
|
|
4
|
+
*
|
|
5
|
+
* The field's padding classes reserve room for **one** action (a 2rem button 0.25rem from the
|
|
6
|
+
* edge, plus 0.25rem before the text). A row holding more than that — a spinner, a clear button
|
|
7
|
+
* and a password toggle side by side — would sit over the text. So the row is measured, and only
|
|
8
|
+
* when it is wider than what the class reserves does this return a `padding-inline-*` value: the
|
|
9
|
+
* row's width plus the same 0.5rem the one-action case leaves (0.25rem inset, 0.25rem before the
|
|
10
|
+
* text). A field with no row or one action keeps exactly the padding its classes give it.
|
|
11
|
+
*
|
|
12
|
+
* Client only: the row is measured once mounted and again whenever a `ResizeObserver` reports it
|
|
13
|
+
* changed. On the server, and before the first measurement, the class padding applies.
|
|
14
|
+
*/
|
|
15
|
+
export declare function useAdornmentRoom(row: Ref<HTMLElement | null>, reservedRem: () => number): ComputedRef<string | undefined>;
|
|
@@ -9,8 +9,8 @@ declare const __VLS_export: import('vue').DefineComponent<LightboxProps, {
|
|
|
9
9
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
10
10
|
"onUpdate:index"?: ((value: number) => any) | undefined;
|
|
11
11
|
}>, {
|
|
12
|
-
classes: Partial<Record<import('./types.js').LightboxPart, string>>;
|
|
13
12
|
modelValue: boolean;
|
|
13
|
+
classes: Partial<Record<import('./types.js').LightboxPart, string>>;
|
|
14
14
|
index: number;
|
|
15
15
|
messages: Partial<{
|
|
16
16
|
clear: string;
|
|
@@ -30,6 +30,7 @@ declare const __VLS_export: import('vue').DefineComponent<LightboxProps, {
|
|
|
30
30
|
noResults: string;
|
|
31
31
|
noResultsFor: (query: string) => string;
|
|
32
32
|
noMatchesFor: (query: string) => string;
|
|
33
|
+
createOption: (query: string) => string;
|
|
33
34
|
moreSelected: (n: number) => string;
|
|
34
35
|
removeTag: (label: string) => string;
|
|
35
36
|
selected: string;
|
|
@@ -2,7 +2,7 @@ import { UiMessages } from '../../composables/useMessages.js';
|
|
|
2
2
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them
|
|
3
3
|
* (spec "Lightbox" → Anatomy) plus the API contract's own `thumbnails`/`thumbnail` pair, which the
|
|
4
4
|
* spec describes ("With thumbnails" variant) but does not number. */
|
|
5
|
-
export type LightboxPart = '
|
|
5
|
+
export type LightboxPart = 'panel' | 'close' | 'track' | 'slide' | 'image' | 'caption' | 'prev' | 'next' | 'counter' | 'thumbnails' | 'thumbnail';
|
|
6
6
|
/**
|
|
7
7
|
* One image in the gallery (spec "Lightbox" → Properties, `images` row). `width`/`height` are the
|
|
8
8
|
* asset's real intrinsic pixel size — passed straight through to `Image` as `ratio="auto"`'s own
|
|
@@ -42,6 +42,9 @@ export interface LightboxProps {
|
|
|
42
42
|
thumbnails?: boolean;
|
|
43
43
|
/** Message overrides. See `useMessages`. */
|
|
44
44
|
messages?: Partial<UiMessages>;
|
|
45
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the viewer's
|
|
47
|
+
* `<dialog>` itself with `class`.
|
|
48
|
+
*/
|
|
46
49
|
classes?: Partial<Record<LightboxPart, string>>;
|
|
47
50
|
}
|
|
@@ -6,8 +6,8 @@ declare const __VLS_template: () => {
|
|
|
6
6
|
};
|
|
7
7
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
8
8
|
declare const __VLS_base: import('vue').DefineComponent<LinkProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LinkProps> & Readonly<{}>, {
|
|
9
|
-
classes: Partial<Record<import('./types.js').LinkPart, string>>;
|
|
10
9
|
href: string;
|
|
10
|
+
classes: Partial<Record<import('./types.js').LinkPart, string>>;
|
|
11
11
|
tone: LinkTone;
|
|
12
12
|
variant: import('./types.js').LinkVariant;
|
|
13
13
|
as: string | import('vue').Component;
|
|
@@ -4,7 +4,7 @@ export type LinkVariant = 'inline' | 'standalone';
|
|
|
4
4
|
/** Default is `text`; `muted` is for footer and meta-line links ("Size guide", "Privacy"). */
|
|
5
5
|
export type LinkTone = 'default' | 'muted';
|
|
6
6
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
7
|
-
export type LinkPart = '
|
|
7
|
+
export type LinkPart = 'label' | 'arrow' | 'externalIcon';
|
|
8
8
|
export interface LinkProps {
|
|
9
9
|
/**
|
|
10
10
|
* Destination. With no destination the spec says to "render plain text instead of a link": the
|
|
@@ -28,7 +28,10 @@ export interface LinkProps {
|
|
|
28
28
|
* same as before this default changed.
|
|
29
29
|
*/
|
|
30
30
|
underline?: boolean;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the link
|
|
33
|
+
* itself with `class`.
|
|
34
|
+
*/
|
|
32
35
|
classes?: Partial<Record<LinkPart, string>>;
|
|
33
36
|
/**
|
|
34
37
|
* Render as a different tag or component instead of a native `<a>` — a router link component,
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* The parts a consumer can restyle through `classes`, named as the spec's anatomy names them
|
|
3
3
|
* (spec "Pagination" → Anatomy, "load more" rows 7 and 9). The decorative meter (row 8) has no
|
|
4
4
|
* part of its own — it is `aria-hidden`, purely visual, and never independently restyled, the
|
|
5
|
-
* same shape `Rating`'s half-star clip or `Skeleton`'s shimmer are drawn without one.
|
|
5
|
+
* same shape `Rating`'s half-star clip or `Skeleton`'s shimmer are drawn without one. The root is
|
|
6
|
+
* styled with `class`.
|
|
6
7
|
*/
|
|
7
|
-
export type LoadMorePart = '
|
|
8
|
+
export type LoadMorePart = 'status' | 'button';
|
|
8
9
|
export interface LoadMoreProps {
|
|
9
10
|
/** Items currently shown. */
|
|
10
11
|
shown: number;
|
|
@@ -16,6 +17,6 @@ export interface LoadMoreProps {
|
|
|
16
17
|
noun?: string;
|
|
17
18
|
/** Loading state of the button: busy, spinner, `aria-busy`. Defaults to `false`. */
|
|
18
19
|
pending?: boolean;
|
|
19
|
-
/** Per-part
|
|
20
|
+
/** Per-part classes, appended to the part's own (they win by cascade layer). */
|
|
20
21
|
classes?: Partial<Record<LoadMorePart, string>>;
|
|
21
22
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LogoItemProps } from './types.js';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<LogoItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LogoItemProps> & Readonly<{}>, {
|
|
3
|
-
classes: Partial<Record<import('./types.js').LogoItemPart, string>>;
|
|
4
3
|
href: string | null;
|
|
4
|
+
classes: Partial<Record<import('./types.js').LogoItemPart, string>>;
|
|
5
5
|
as: string | import('vue').Component;
|
|
6
6
|
logo: import('../../index.js').ImageMedia | null;
|
|
7
7
|
linkContext: string | null;
|
|
@@ -32,6 +32,7 @@ export interface LogoItemProps {
|
|
|
32
32
|
* destination as its `to` prop instead. Ignored when there is no `href`.
|
|
33
33
|
*/
|
|
34
34
|
as?: string | Component;
|
|
35
|
-
/** Per-part
|
|
35
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). `root` is the cell
|
|
36
|
+
* (the link when linked); `class` lands on the `<li>`. */
|
|
36
37
|
classes?: Partial<Record<LogoItemPart, string>>;
|
|
37
38
|
}
|
|
@@ -39,8 +39,8 @@ declare const __VLS_base: import('vue').DefineComponent<NavMenuProps, {
|
|
|
39
39
|
"onUpdate:modelValue"?: ((index: number | null) => any) | undefined;
|
|
40
40
|
"onUpdate:drawerOpen"?: ((open: boolean) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
|
-
classes: Partial<Record<import('./types.js').NavMenuPart, string>>;
|
|
43
42
|
modelValue: number | null;
|
|
43
|
+
classes: Partial<Record<import('./types.js').NavMenuPart, string>>;
|
|
44
44
|
variant: NavMenuVariant;
|
|
45
45
|
linkAs: string | import('vue').Component;
|
|
46
46
|
ariaLabel: string;
|
|
@@ -62,6 +62,7 @@ declare const __VLS_base: import('vue').DefineComponent<NavMenuProps, {
|
|
|
62
62
|
noResults: string;
|
|
63
63
|
noResultsFor: (query: string) => string;
|
|
64
64
|
noMatchesFor: (query: string) => string;
|
|
65
|
+
createOption: (query: string) => string;
|
|
65
66
|
moreSelected: (n: number) => string;
|
|
66
67
|
removeTag: (label: string) => string;
|
|
67
68
|
selected: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
2
|
import { NavMenuItem, NavMenuLink, NavMenuPanelLayout } from './types.js';
|
|
3
3
|
/** How the page the visitor is on is marked, on every kind of link the menu draws. */
|
|
4
|
-
export declare const CURRENT_PAGE = "aria-[current=page]:underline aria-[current=page]:decoration-2 aria-[current=page]:underline-offset-[0.2em]";
|
|
4
|
+
export declare const CURRENT_PAGE = "eldra:aria-[current=page]:underline eldra:aria-[current=page]:decoration-2 eldra:aria-[current=page]:underline-offset-[0.2em]";
|
|
5
5
|
/** A run of panel entries under one column heading; `group` is `null` for entries without one. */
|
|
6
6
|
export interface NavMenuLinkRun {
|
|
7
7
|
group: string | null;
|
|
@@ -68,8 +68,8 @@ export interface NavMenuGroupHeadingSlotProps {
|
|
|
68
68
|
item: NavMenuItem;
|
|
69
69
|
placement: NavMenuPlacement;
|
|
70
70
|
}
|
|
71
|
-
/** The parts a consumer can restyle through `classes`. */
|
|
72
|
-
export type NavMenuPart = '
|
|
71
|
+
/** The parts a consumer can restyle through `classes`. The root is styled with `class`. */
|
|
72
|
+
export type NavMenuPart = 'nav' | 'list' | 'item' | 'link' | 'trigger' | 'triggerIcon' | 'panel' | 'content' | NavMenuPanelPart | 'footer' | 'toggle' | 'toggleIcon' | 'drawerRoot' | 'drawer' | 'drawerHeader' | 'drawerClose' | 'drawerBody' | 'drawerList' | 'drawerItem' | 'drawerLink' | 'drawerTrigger' | 'drawerPanel' | 'drawerSectionHeading' | 'drawerNest' | NavMenuDrawerPanelPart | 'drawerFooter';
|
|
73
73
|
export interface NavMenuProps {
|
|
74
74
|
/** The top-level entries, in order. */
|
|
75
75
|
items: readonly NavMenuItem[];
|
|
@@ -98,6 +98,6 @@ export interface NavMenuProps {
|
|
|
98
98
|
linkAs?: string | Component;
|
|
99
99
|
/** Message overrides. See `useMessages`. */
|
|
100
100
|
messages?: Partial<UiMessages>;
|
|
101
|
-
/** Per-part class
|
|
101
|
+
/** Per-part classes, appended to the part's own (a consumer class wins by cascade layer). */
|
|
102
102
|
classes?: Partial<Record<NavMenuPart, string>>;
|
|
103
103
|
}
|
|
@@ -6,10 +6,164 @@ declare const __VLS_export: import('vue').DefineComponent<PaginationProps, {}, {
|
|
|
6
6
|
}>, {
|
|
7
7
|
classes: Partial<Record<import('./types.js').PaginationPart, string>>;
|
|
8
8
|
linkAs: string | import('vue').Component;
|
|
9
|
+
disabled: boolean;
|
|
9
10
|
ariaLabel: string;
|
|
11
|
+
messages: Partial<{
|
|
12
|
+
clear: string;
|
|
13
|
+
close: string;
|
|
14
|
+
closeDrawer: (name: string) => string;
|
|
15
|
+
closeSearch: string;
|
|
16
|
+
cancel: string;
|
|
17
|
+
clearSearch: string;
|
|
18
|
+
dismissNotification: string;
|
|
19
|
+
notifications: string;
|
|
20
|
+
loading: string;
|
|
21
|
+
optional: string;
|
|
22
|
+
required: string;
|
|
23
|
+
search: string;
|
|
24
|
+
selectPlaceholder: string;
|
|
25
|
+
multiSelectPlaceholder: string;
|
|
26
|
+
noResults: string;
|
|
27
|
+
noResultsFor: (query: string) => string;
|
|
28
|
+
noMatchesFor: (query: string) => string;
|
|
29
|
+
createOption: (query: string) => string;
|
|
30
|
+
moreSelected: (n: number) => string;
|
|
31
|
+
removeTag: (label: string) => string;
|
|
32
|
+
selected: string;
|
|
33
|
+
selectedCount: (n: number) => string;
|
|
34
|
+
noneSelected: string;
|
|
35
|
+
done: string;
|
|
36
|
+
decrease: string;
|
|
37
|
+
increase: string;
|
|
38
|
+
quantity: string;
|
|
39
|
+
quantityUpdated: (n: number) => string;
|
|
40
|
+
minimum: string;
|
|
41
|
+
maximum: string;
|
|
42
|
+
minimumOf: (name: string) => string;
|
|
43
|
+
maximumOf: (name: string) => string;
|
|
44
|
+
to: string;
|
|
45
|
+
opensInNewTab: string;
|
|
46
|
+
counter: (n: number, max: number) => string;
|
|
47
|
+
previous: string;
|
|
48
|
+
next: string;
|
|
49
|
+
pause: string;
|
|
50
|
+
play: string;
|
|
51
|
+
slideOf: (position: number, total: number) => string;
|
|
52
|
+
goToSlide: (n: number) => string;
|
|
53
|
+
slides: string;
|
|
54
|
+
slideInstructions: string;
|
|
55
|
+
closeLightbox: string;
|
|
56
|
+
previousImage: string;
|
|
57
|
+
nextImage: string;
|
|
58
|
+
imageOf: (position: number, total: number) => string;
|
|
59
|
+
goToImage: (n: number) => string;
|
|
60
|
+
lightboxImages: string;
|
|
61
|
+
charactersLeft: (n: number) => string;
|
|
62
|
+
overLimit: (n: number) => string;
|
|
63
|
+
soldOut: string;
|
|
64
|
+
newBadge: string;
|
|
65
|
+
quickAddLabel: string;
|
|
66
|
+
quickAdd: (title: string) => string;
|
|
67
|
+
loadingProduct: string;
|
|
68
|
+
swatchesAvailable: (n: number) => string;
|
|
69
|
+
noImage: string;
|
|
70
|
+
noImageAvailable: string;
|
|
71
|
+
stockistSite: string;
|
|
72
|
+
stockIn: string;
|
|
73
|
+
stockLow: (n: number | null) => string;
|
|
74
|
+
stockPreorder: (date?: string) => string;
|
|
75
|
+
salePrice: string;
|
|
76
|
+
regularPrice: string;
|
|
77
|
+
from: string;
|
|
78
|
+
perUnit: (per: string) => string;
|
|
79
|
+
updatingPrice: string;
|
|
80
|
+
updatingStock: string;
|
|
81
|
+
rating: (value: number, count: number) => string;
|
|
82
|
+
noReviews: string;
|
|
83
|
+
reviewCount: (n: number) => string;
|
|
84
|
+
searchTheShop: string;
|
|
85
|
+
searchSuggestions: string;
|
|
86
|
+
searchProducts: string;
|
|
87
|
+
searchCollections: string;
|
|
88
|
+
searchJournal: string;
|
|
89
|
+
searchAdvice: string;
|
|
90
|
+
recentSearches: string;
|
|
91
|
+
popularSearches: string;
|
|
92
|
+
clearRecent: string;
|
|
93
|
+
resultsCount: (n: number, query?: string) => string;
|
|
94
|
+
viewAllResults: (n: number, query?: string) => string;
|
|
95
|
+
searchLoading: string;
|
|
96
|
+
shortcutHint: string;
|
|
97
|
+
searchMoveHint: string;
|
|
98
|
+
searchOpenHint: string;
|
|
99
|
+
searchEscHint: string;
|
|
100
|
+
error: string;
|
|
101
|
+
tryAgain: string;
|
|
102
|
+
formErrors: (n: number) => string;
|
|
103
|
+
avatarGroup: (label: string, names: string[], more: number) => string;
|
|
104
|
+
learnMore: string;
|
|
105
|
+
breadcrumbLabel: string;
|
|
106
|
+
showMoreLevels: (n: number) => string;
|
|
107
|
+
navMenuLabel: string;
|
|
108
|
+
navMenuOpen: string;
|
|
109
|
+
navMenuDrawer: string;
|
|
110
|
+
navMenuOverview: (label: string) => string;
|
|
111
|
+
pagination: string;
|
|
112
|
+
previousPage: string;
|
|
113
|
+
nextPage: string;
|
|
114
|
+
pageN: (n: number, current?: boolean) => string;
|
|
115
|
+
pageOfTotal: (page: number, total: number) => string;
|
|
116
|
+
showingOf: (shown: number, total: number, noun: string) => string;
|
|
117
|
+
loadMore: string;
|
|
118
|
+
filterPanelTitle: string;
|
|
119
|
+
filterPanelLabel: string;
|
|
120
|
+
filterPanelClearAll: string;
|
|
121
|
+
filterPanelApplied: string;
|
|
122
|
+
filterPanelRemoveFilter: (facet: string, value: string) => string;
|
|
123
|
+
filterPanelShowAll: (n: number) => string;
|
|
124
|
+
filterPanelShowFewer: string;
|
|
125
|
+
filterPanelSearchLabel: (facet: string) => string;
|
|
126
|
+
filterPanelSearchPlaceholder: (facet: string) => string;
|
|
127
|
+
filterPanelValueName: (label: string, count: number) => string;
|
|
128
|
+
filterPanelSizeName: (system: string, label: string, count: number) => string;
|
|
129
|
+
filterPanelNoneAvailable: string;
|
|
130
|
+
filterPanelImpliedBy: (parent: string) => string;
|
|
131
|
+
filterPanelUnder: (parent: string) => string;
|
|
132
|
+
filterPanelSizeGuide: string;
|
|
133
|
+
filterPanelMin: string;
|
|
134
|
+
filterPanelMax: string;
|
|
135
|
+
filterPanelOrMore: string;
|
|
136
|
+
filterPanelShowResults: (n: number) => string;
|
|
137
|
+
filterPanelShowProducts: string;
|
|
138
|
+
formSubmit: string;
|
|
139
|
+
formSubmitting: string;
|
|
140
|
+
formLoading: string;
|
|
141
|
+
formLoadFailed: string;
|
|
142
|
+
formRequired: string;
|
|
143
|
+
formRequiredCheckbox: string;
|
|
144
|
+
formInvalidEmail: string;
|
|
145
|
+
formInvalidNumber: string;
|
|
146
|
+
formInvalidUrl: string;
|
|
147
|
+
formInvalidOption: string;
|
|
148
|
+
formInvalidFormat: string;
|
|
149
|
+
formTooShort: (min: number) => string;
|
|
150
|
+
formTooLong: (max: number) => string;
|
|
151
|
+
formRefused: string;
|
|
152
|
+
formRateLimited: string;
|
|
153
|
+
formTooLarge: string;
|
|
154
|
+
formUnavailable: string;
|
|
155
|
+
formSpamCheckRequired: string;
|
|
156
|
+
formSpamCheckFailed: string;
|
|
157
|
+
formSuccessTitle: string;
|
|
158
|
+
formPendingTitle: string;
|
|
159
|
+
formPendingMessage: string;
|
|
160
|
+
}>;
|
|
10
161
|
compact: boolean;
|
|
11
162
|
siblings: number;
|
|
12
163
|
hrefForPage: (page: number) => string;
|
|
164
|
+
fixedLength: boolean;
|
|
165
|
+
responsive: boolean;
|
|
166
|
+
showSinglePage: boolean;
|
|
13
167
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
168
|
declare const _default: typeof __VLS_export;
|
|
15
169
|
export default _default;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Component } from 'vue';
|
|
2
|
+
import { UiMessages } from '../../composables/useMessages.js';
|
|
2
3
|
/**
|
|
3
4
|
* The parts a consumer can restyle through `classes`, named as the spec's anatomy names them
|
|
4
5
|
* (spec "Pagination" → Anatomy, numbered 1–4 plus the shared wrapper parts). `item` is the `<li>`
|
|
@@ -9,7 +10,7 @@ import { Component } from 'vue';
|
|
|
9
10
|
* `Tooltip`'s hover bridge or `Skeleton`'s shimmer are drawn without one (see the README's
|
|
10
11
|
* Deviations entry).
|
|
11
12
|
*/
|
|
12
|
-
export type PaginationPart = '
|
|
13
|
+
export type PaginationPart = 'list' | 'item' | 'page' | 'current' | 'ellipsis' | 'prev' | 'next';
|
|
13
14
|
export interface PaginationProps {
|
|
14
15
|
/** Current page, 1-based. */
|
|
15
16
|
page: number;
|
|
@@ -46,6 +47,39 @@ export interface PaginationProps {
|
|
|
46
47
|
* Defaults to the `pagination` message ("Pagination").
|
|
47
48
|
*/
|
|
48
49
|
ariaLabel?: string;
|
|
49
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Keep the numbered row the same length on every page. The window of `2 × siblings + 1` pages
|
|
52
|
+
* slides against the ends instead of shrinking near them, the slot next to the first and the last
|
|
53
|
+
* page shows that page or "…", and a "…" always stands for two or more pages. So `siblings: 1`
|
|
54
|
+
* always draws seven items once there are more than seven pages (`1 2 3 [4] 5 … 12`,
|
|
55
|
+
* `1 … 5 [6] 7 … 12`), and the controls do not move under the pointer as the page changes.
|
|
56
|
+
* Defaults to `false`: the window is the current page ± `siblings`, plus the first and last.
|
|
57
|
+
*/
|
|
58
|
+
fixedLength?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Renders every control inert: pages and previous/next in the disabled previous/next form (a
|
|
61
|
+
* `<span aria-disabled="true">`, `muted` at 60%, no link, not focusable), the current page still
|
|
62
|
+
* marked with `aria-current="page"`. Nothing emits `update:page`. Defaults to `false`.
|
|
63
|
+
*/
|
|
64
|
+
disabled?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Defaults to `true`: below 48rem of its own width the numbered form gives way to the compact
|
|
67
|
+
* one. `false` keeps the numbered form at every width (it wraps) and never renders the compact
|
|
68
|
+
* row, for a layout where jumping straight to any page matters more than one line. `compact`
|
|
69
|
+
* still wins when set.
|
|
70
|
+
*/
|
|
71
|
+
responsive?: boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Render with a single page too: previous and next disabled around page 1, so a paged list keeps
|
|
74
|
+
* its footer while it holds one page. Defaults to `false`: nothing renders below two pages.
|
|
75
|
+
*/
|
|
76
|
+
showSinglePage?: boolean;
|
|
77
|
+
/** Message overrides (`pagination`, `previousPage`, `nextPage`, `pageN`, `pageOfTotal`), per
|
|
78
|
+
* instance; a shorter visible "Previous"/"Next" goes here. See `useMessages`. */
|
|
79
|
+
messages?: Partial<UiMessages>;
|
|
80
|
+
/**
|
|
81
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the `<nav>`
|
|
82
|
+
* itself with `class`.
|
|
83
|
+
*/
|
|
50
84
|
classes?: Partial<Record<PaginationPart, string>>;
|
|
51
85
|
}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import { PopoverProps } from './types.js';
|
|
2
|
+
/** Close, returning focus to the trigger unless `returnFocus` is off. */
|
|
3
|
+
declare function close(): void;
|
|
4
|
+
declare function toggle(): void;
|
|
2
5
|
declare const __VLS_template: () => {
|
|
3
6
|
__VLS_Slots: {
|
|
4
7
|
default?: (props: {
|
|
5
8
|
close: () => void;
|
|
9
|
+
open: true;
|
|
10
|
+
toggle: typeof toggle;
|
|
6
11
|
}) => any;
|
|
7
12
|
};
|
|
8
13
|
};
|
|
9
14
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
10
|
-
declare const __VLS_base: import('vue').DefineComponent<PopoverProps, {
|
|
15
|
+
declare const __VLS_base: import('vue').DefineComponent<PopoverProps, {
|
|
16
|
+
/** Open the panel, as a trigger click would. */
|
|
17
|
+
open: () => void;
|
|
18
|
+
/** Close the panel, as the default slot's `close` would. */
|
|
19
|
+
close: typeof close;
|
|
20
|
+
toggle: typeof toggle;
|
|
21
|
+
/** Reposition now — after a virtual `reference` has moved. */
|
|
22
|
+
update: () => void;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
24
|
"update:modelValue": (value: boolean) => any;
|
|
12
25
|
open: () => any;
|
|
13
26
|
close: () => any;
|
|
@@ -16,12 +29,26 @@ declare const __VLS_base: import('vue').DefineComponent<PopoverProps, {}, {}, {}
|
|
|
16
29
|
onOpen?: (() => any) | undefined;
|
|
17
30
|
onClose?: (() => any) | undefined;
|
|
18
31
|
}>, {
|
|
19
|
-
classes: Partial<Record<import('./types.js').PopoverPart, string>>;
|
|
20
32
|
modelValue: boolean;
|
|
33
|
+
classes: Partial<Record<import('./types.js').PopoverPart, string>>;
|
|
34
|
+
disabled: boolean;
|
|
21
35
|
ariaLabel: string;
|
|
36
|
+
closeOnEscape: boolean;
|
|
22
37
|
placement: import('../../index.js').FloatingPlacement;
|
|
23
38
|
teleport: boolean;
|
|
39
|
+
reference: import('@floating-ui/vue').ReferenceElement | null;
|
|
40
|
+
offset: number;
|
|
24
41
|
matchWidth: boolean | "exact";
|
|
42
|
+
viewportPadding: number;
|
|
43
|
+
haspopup: "dialog" | "menu" | "true" | "grid" | "listbox" | "tree";
|
|
44
|
+
labelledByTrigger: boolean;
|
|
45
|
+
openOnArrowDown: boolean;
|
|
46
|
+
focusOnOpen: boolean;
|
|
47
|
+
closeOnOutsideClick: boolean;
|
|
48
|
+
closeOnFocusOutside: boolean;
|
|
49
|
+
returnFocus: boolean;
|
|
50
|
+
closeWhenTriggerHidden: boolean;
|
|
51
|
+
exclusive: boolean;
|
|
25
52
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
53
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
27
54
|
declare const _default: typeof __VLS_export;
|