@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
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { DialogProps } from './types.js';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
type __VLS_Slots = {
|
|
3
|
+
/** The body, below the description. */
|
|
4
|
+
default?: () => unknown;
|
|
5
|
+
/** The action buttons. */
|
|
6
|
+
footer?: () => unknown;
|
|
7
|
+
/** Replaces the `<h2>` with markup of your own (an icon above the heading, a heading level the
|
|
8
|
+
* page needs). Still the dialog's accessible name; bring your own heading element. */
|
|
9
|
+
title?: () => unknown;
|
|
8
10
|
};
|
|
9
|
-
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
10
11
|
declare const __VLS_base: import('vue').DefineComponent<DialogProps, {
|
|
11
12
|
close: (returnValue?: string) => void;
|
|
12
13
|
isTop: import('vue').ComputedRef<boolean>;
|
|
@@ -19,9 +20,10 @@ declare const __VLS_base: import('vue').DefineComponent<DialogProps, {
|
|
|
19
20
|
onClose?: ((reason: string) => any) | undefined;
|
|
20
21
|
onCancel?: (() => any) | undefined;
|
|
21
22
|
}>, {
|
|
23
|
+
title: string;
|
|
22
24
|
size: import('./types.js').DialogSize;
|
|
23
|
-
classes: Partial<Record<import('./types.js').DialogPart, string>>;
|
|
24
25
|
modelValue: boolean;
|
|
26
|
+
classes: Partial<Record<import('./types.js').DialogPart, string>>;
|
|
25
27
|
messages: Partial<{
|
|
26
28
|
clear: string;
|
|
27
29
|
close: string;
|
|
@@ -40,6 +42,7 @@ declare const __VLS_base: import('vue').DefineComponent<DialogProps, {
|
|
|
40
42
|
noResults: string;
|
|
41
43
|
noResultsFor: (query: string) => string;
|
|
42
44
|
noMatchesFor: (query: string) => string;
|
|
45
|
+
createOption: (query: string) => string;
|
|
43
46
|
moreSelected: (n: number) => string;
|
|
44
47
|
removeTag: (label: string) => string;
|
|
45
48
|
selected: string;
|
|
@@ -173,6 +176,8 @@ declare const __VLS_base: import('vue').DefineComponent<DialogProps, {
|
|
|
173
176
|
}>;
|
|
174
177
|
description: string;
|
|
175
178
|
dismissable: boolean;
|
|
179
|
+
closeButton: boolean;
|
|
180
|
+
closeOnEscape: boolean;
|
|
176
181
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
177
182
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
178
183
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
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
|
-
export type DialogPart = '
|
|
3
|
+
export type DialogPart = 'panel' | 'header' | 'title' | 'close' | 'description' | 'body' | 'footer';
|
|
4
4
|
/** The spec's two panel widths: `sm` 24rem, `md` (the default) 32rem — both capped at the
|
|
5
5
|
* viewport width minus 2rem. */
|
|
6
6
|
export type DialogSize = 'sm' | 'md';
|
|
7
7
|
export interface DialogProps {
|
|
8
8
|
/** Shows the dialog with `showModal()` when `true`, closes it when `false` (two-way). */
|
|
9
9
|
modelValue?: boolean;
|
|
10
|
-
/** The `<h2>` title text; the dialog's accessible name (`aria-labelledby`).
|
|
11
|
-
|
|
10
|
+
/** The `<h2>` title text; the dialog's accessible name (`aria-labelledby`). Optional when the
|
|
11
|
+
* `title` slot draws the heading instead; with neither, name the dialog yourself through
|
|
12
|
+
* `aria-label` or `aria-labelledby` on the component (they land on the `<dialog>`). */
|
|
13
|
+
title?: string;
|
|
12
14
|
/** Body text below the title; the dialog is `aria-describedby` it. Omit when the body is a
|
|
13
15
|
* form — the spec's own Form variant carries no `description`. */
|
|
14
16
|
description?: string;
|
|
@@ -18,8 +20,18 @@ export interface DialogProps {
|
|
|
18
20
|
* `false` for a form with unsaved input, or a destructive confirm a stray click must not
|
|
19
21
|
* count as an answer for. Default `true`. */
|
|
20
22
|
dismissable?: boolean;
|
|
23
|
+
/** Whether the header's close button is drawn. Default `true`. `false` is for a dialog whose own
|
|
24
|
+
* footer already holds every way out; `Esc` still closes it unless `closeOnEscape` is `false`. */
|
|
25
|
+
closeButton?: boolean;
|
|
26
|
+
/** Whether `Esc` closes the dialog. Default `true`. `false` is for a decision the user must answer
|
|
27
|
+
* through the dialog's own actions; keep a visible way out (the close button or a footer action)
|
|
28
|
+
* whenever you turn this off. */
|
|
29
|
+
closeOnEscape?: boolean;
|
|
21
30
|
/** Message overrides (only `close` applies here). See `useMessages`. */
|
|
22
31
|
messages?: Partial<UiMessages>;
|
|
23
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the
|
|
34
|
+
* `<dialog>` itself with `class`.
|
|
35
|
+
*/
|
|
24
36
|
classes?: Partial<Record<DialogPart, string>>;
|
|
25
37
|
}
|
|
@@ -22,8 +22,8 @@ declare const __VLS_base: import('vue').DefineComponent<DrawerProps, {
|
|
|
22
22
|
onCancel?: (() => any) | undefined;
|
|
23
23
|
}>, {
|
|
24
24
|
title: string;
|
|
25
|
-
classes: Partial<Record<import('./types.js').DrawerPart, string>>;
|
|
26
25
|
modelValue: boolean;
|
|
26
|
+
classes: Partial<Record<import('./types.js').DrawerPart, string>>;
|
|
27
27
|
ariaLabel: string;
|
|
28
28
|
count: number;
|
|
29
29
|
messages: Partial<{
|
|
@@ -44,6 +44,7 @@ declare const __VLS_base: import('vue').DefineComponent<DrawerProps, {
|
|
|
44
44
|
noResults: string;
|
|
45
45
|
noResultsFor: (query: string) => string;
|
|
46
46
|
noMatchesFor: (query: string) => string;
|
|
47
|
+
createOption: (query: string) => string;
|
|
47
48
|
moreSelected: (n: number) => string;
|
|
48
49
|
removeTag: (label: string) => string;
|
|
49
50
|
selected: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
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
|
-
export type DrawerPart = '
|
|
3
|
+
export type DrawerPart = 'panel' | 'header' | 'title' | 'count' | 'close' | 'body' | 'footer';
|
|
4
4
|
/** The edge the sheet slides in from. `left` is for the mobile menu; everything else (cart,
|
|
5
5
|
* filters, quick view) is `right`, the default. */
|
|
6
6
|
export type DrawerSide = 'right' | 'left';
|
|
@@ -25,6 +25,9 @@ export interface DrawerProps {
|
|
|
25
25
|
/** Message overrides (only `close` applies here, unless a name is available — see
|
|
26
26
|
* `closeDrawer`). See `useMessages`. */
|
|
27
27
|
messages?: Partial<UiMessages>;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the drawer's
|
|
30
|
+
* `<dialog>` itself with `class`.
|
|
31
|
+
*/
|
|
29
32
|
classes?: Partial<Record<DrawerPart, string>>;
|
|
30
33
|
}
|
|
@@ -13,8 +13,8 @@ declare const __VLS_base: import('vue').DefineComponent<EmptyStateProps, {}, {},
|
|
|
13
13
|
onRetry?: (() => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
15
|
text: string | null;
|
|
16
|
-
classes: Partial<Record<import('./types.js').EmptyStatePart, string>>;
|
|
17
16
|
headingLevel: import('../../index.js').HeadingLevel;
|
|
17
|
+
classes: Partial<Record<import('./types.js').EmptyStatePart, string>>;
|
|
18
18
|
icon: import('../../index.js').IconComponent;
|
|
19
19
|
variant: EmptyStateVariant;
|
|
20
20
|
plain: boolean;
|
|
@@ -8,8 +8,8 @@ import { IconComponent } from '../icon/types.js';
|
|
|
8
8
|
*/
|
|
9
9
|
export type EmptyStateVariant = 'empty' | 'noResults' | 'error';
|
|
10
10
|
/** The parts a consumer can restyle through `classes`, named after the spec's anatomy: the icon
|
|
11
|
-
* circle (1), the title (2), the text (3) and the actions row (4). */
|
|
12
|
-
export type EmptyStatePart = '
|
|
11
|
+
* circle (1), the title (2), the text (3) and the actions row (4). The root is styled with `class`. */
|
|
12
|
+
export type EmptyStatePart = 'icon' | 'title' | 'text' | 'actions';
|
|
13
13
|
export interface EmptyStateProps {
|
|
14
14
|
/** Which state this is (spec "Empty and error states" → Variants). Defaults to `empty`. */
|
|
15
15
|
variant?: EmptyStateVariant;
|
|
@@ -36,14 +36,15 @@ export interface EmptyStateProps {
|
|
|
36
36
|
* from the slot's own scope instead (see the `actions` slot below).
|
|
37
37
|
*/
|
|
38
38
|
retrying?: boolean;
|
|
39
|
-
/** Per-part
|
|
39
|
+
/** Per-part classes, appended to the part's own (they win by cascade layer). */
|
|
40
40
|
classes?: Partial<Record<EmptyStatePart, string>>;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
43
|
* The parts a consumer can restyle through `classes`: the icon (optional), the action label
|
|
44
|
-
* (strong) and the guidance text, named after the spec's own editor-hint anatomy.
|
|
44
|
+
* (strong) and the guidance text, named after the spec's own editor-hint anatomy. The root is
|
|
45
|
+
* styled with `class`.
|
|
45
46
|
*/
|
|
46
|
-
export type EditorPlaceholderPart = '
|
|
47
|
+
export type EditorPlaceholderPart = 'icon' | 'label' | 'help';
|
|
47
48
|
export interface EditorPlaceholderProps {
|
|
48
49
|
/** E.g. `plus`, `photo`. `null` (the default) renders no icon. */
|
|
49
50
|
icon?: IconComponent | null;
|
|
@@ -54,6 +55,6 @@ export interface EditorPlaceholderProps {
|
|
|
54
55
|
help?: string | null;
|
|
55
56
|
/** Compact padding, for an empty inline field (e.g. an empty heading). Defaults to `false`. */
|
|
56
57
|
inline?: boolean;
|
|
57
|
-
/** Per-part
|
|
58
|
+
/** Per-part classes, appended to the part's own (they win by cascade layer). */
|
|
58
59
|
classes?: Partial<Record<EditorPlaceholderPart, string>>;
|
|
59
60
|
}
|
|
@@ -2,6 +2,8 @@ import { FieldWrapperProps } from './types.js';
|
|
|
2
2
|
declare const __VLS_template: () => {
|
|
3
3
|
__VLS_Slots: {
|
|
4
4
|
label?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
6
|
+
labelSuffix?: (props: {}) => any;
|
|
5
7
|
} & {
|
|
6
8
|
default?: (props: {}) => any;
|
|
7
9
|
} & {
|
|
@@ -12,8 +14,9 @@ declare const __VLS_template: () => {
|
|
|
12
14
|
};
|
|
13
15
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
14
16
|
declare const __VLS_base: import('vue').DefineComponent<FieldWrapperProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FieldWrapperProps> & Readonly<{}>, {
|
|
15
|
-
counter: import('./types.js').FieldWrapperCounter;
|
|
16
17
|
help: string;
|
|
18
|
+
label: string;
|
|
19
|
+
counter: import('./types.js').FieldWrapperCounter;
|
|
17
20
|
classes: Partial<Record<import('./types.js').FieldWrapperPart, string>>;
|
|
18
21
|
required: boolean;
|
|
19
22
|
optional: boolean;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The required mark a label or legend ends with: `*`, `danger`, a 0.125rem start margin and the
|
|
3
|
+
* label's own weight. **Internal**, like `FieldError`: it exists so `FieldWrapper` and `RadioGroup`
|
|
4
|
+
* draw one mark rather than two hand-copied ones. The `requiredMark` part and its `classes` key are
|
|
5
|
+
* the parent's, which is why the parent's `classes` object is handed straight through.
|
|
6
|
+
*
|
|
7
|
+
* The asterisk is decorative: a control's native `required` is what announces it.
|
|
8
|
+
*/
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
/** The parent's per-part overrides. Only `requiredMark` is read. */
|
|
11
|
+
classes?: Partial<Record<'requiredMark', string>>;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -21,8 +21,16 @@ export interface FieldContext {
|
|
|
21
21
|
* named with `aria-labelledby` pointing here instead. It lives on the context rather than being
|
|
22
22
|
* rebuilt from `id` by string convention in each control, so renaming it is one edit and cannot
|
|
23
23
|
* leave a control pointing at an element that no longer exists.
|
|
24
|
+
*
|
|
25
|
+
* Always set, even for a wrapper with no visible label; read `labelled` before pointing at it.
|
|
24
26
|
*/
|
|
25
27
|
labelId: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the wrapper renders its label (or legend) element, so `labelId` names something. False
|
|
30
|
+
* for a wrapper with no visible label, whose control is named with its own `aria-label`.
|
|
31
|
+
* Optional so a hand-built context still compiles; leaving it out reads as `true`.
|
|
32
|
+
*/
|
|
33
|
+
labelled?: boolean;
|
|
26
34
|
/** The `aria-describedby` value: the error id first, then help. */
|
|
27
35
|
describedBy?: string;
|
|
28
36
|
/** Whether the field is in error, which the control mirrors as `aria-invalid="true"`. */
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
2
|
-
export type FieldWrapperPart = '
|
|
2
|
+
export type FieldWrapperPart = 'label' | 'legend' | 'requiredMark' | 'optionalText' | 'help' | 'control' | 'error' | 'errorIcon' | 'foot' | 'counter';
|
|
3
3
|
/** The character counter shown at the end of the foot row. */
|
|
4
4
|
export interface FieldWrapperCounter {
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* The limit the value is counted against. Without one the counter shows the length alone
|
|
7
|
+
* ("12"), for a field that reports how much has been written but sets no limit.
|
|
8
|
+
*/
|
|
9
|
+
max?: number;
|
|
7
10
|
/** The current length. Defaults to `0`, so an empty field reads "0 / 200". */
|
|
8
11
|
value?: number;
|
|
9
12
|
}
|
|
10
13
|
export interface FieldWrapperProps {
|
|
11
|
-
/**
|
|
12
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The visible label, written as a noun ("Postcode"). Leave it out (and fill no `label` slot) for
|
|
16
|
+
* a field with no visible label: no `<label>` (or `<legend>`) renders, so name the control
|
|
17
|
+
* itself with `aria-label` (a group: the wrapper, whose attributes reach the `<fieldset>`). The
|
|
18
|
+
* required and optional marks live in the label, so they go with it.
|
|
19
|
+
*/
|
|
20
|
+
label?: string;
|
|
13
21
|
/** The control's id. Generated when it is not given, and handed to the control either way. */
|
|
14
22
|
id?: string;
|
|
15
23
|
/** Shows `*` and sets native `required` on the control. */
|
|
@@ -33,6 +41,9 @@ export interface FieldWrapperProps {
|
|
|
33
41
|
group?: boolean;
|
|
34
42
|
/** Spans both columns of a two-column `FormLayout`. */
|
|
35
43
|
full?: boolean;
|
|
36
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the root with
|
|
46
|
+
* `class`.
|
|
47
|
+
*/
|
|
37
48
|
classes?: Partial<Record<FieldWrapperPart, string>>;
|
|
38
49
|
}
|
|
@@ -54,6 +54,7 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
54
54
|
noResults: string;
|
|
55
55
|
noResultsFor: (query: string) => string;
|
|
56
56
|
noMatchesFor: (query: string) => string;
|
|
57
|
+
createOption: (query: string) => string;
|
|
57
58
|
moreSelected: (n: number) => string;
|
|
58
59
|
removeTag: (label: string) => string;
|
|
59
60
|
selected: string;
|
|
@@ -33,8 +33,8 @@ declare const __VLS_base: import('vue').DefineComponent<FilterPanelProps, {
|
|
|
33
33
|
focusTitle: typeof focusTitle;
|
|
34
34
|
focusChip: typeof focusChip;
|
|
35
35
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
|
-
clear: () => any;
|
|
37
36
|
"update:modelValue": (selection: FilterSelection) => any;
|
|
37
|
+
clear: () => any;
|
|
38
38
|
change: (selection: FilterSelection) => any;
|
|
39
39
|
remove: (removal: {
|
|
40
40
|
facetId: string;
|
|
@@ -42,8 +42,8 @@ declare const __VLS_base: import('vue').DefineComponent<FilterPanelProps, {
|
|
|
42
42
|
}) => any;
|
|
43
43
|
apply: (selection: FilterSelection) => any;
|
|
44
44
|
}, string, import('vue').PublicProps, Readonly<FilterPanelProps> & Readonly<{
|
|
45
|
-
onClear?: (() => any) | undefined;
|
|
46
45
|
"onUpdate:modelValue"?: ((selection: FilterSelection) => any) | undefined;
|
|
46
|
+
onClear?: (() => any) | undefined;
|
|
47
47
|
onChange?: ((selection: FilterSelection) => any) | undefined;
|
|
48
48
|
onRemove?: ((removal: {
|
|
49
49
|
facetId: string;
|
|
@@ -51,10 +51,12 @@ declare const __VLS_base: import('vue').DefineComponent<FilterPanelProps, {
|
|
|
51
51
|
}) => any) | undefined;
|
|
52
52
|
onApply?: ((selection: FilterSelection) => any) | undefined;
|
|
53
53
|
}>, {
|
|
54
|
-
label: string;
|
|
55
54
|
title: string;
|
|
56
|
-
|
|
55
|
+
label: string;
|
|
57
56
|
modelValue: FilterSelection;
|
|
57
|
+
classes: Partial<Record<import('./types.js').FilterPanelPart, string>>;
|
|
58
|
+
mode: import('./types.js').FilterPanelMode;
|
|
59
|
+
locale: string;
|
|
58
60
|
messages: Partial<{
|
|
59
61
|
clear: string;
|
|
60
62
|
close: string;
|
|
@@ -73,6 +75,7 @@ declare const __VLS_base: import('vue').DefineComponent<FilterPanelProps, {
|
|
|
73
75
|
noResults: string;
|
|
74
76
|
noResultsFor: (query: string) => string;
|
|
75
77
|
noMatchesFor: (query: string) => string;
|
|
78
|
+
createOption: (query: string) => string;
|
|
76
79
|
moreSelected: (n: number) => string;
|
|
77
80
|
removeTag: (label: string) => string;
|
|
78
81
|
selected: string;
|
|
@@ -204,11 +207,9 @@ declare const __VLS_base: import('vue').DefineComponent<FilterPanelProps, {
|
|
|
204
207
|
formPendingTitle: string;
|
|
205
208
|
formPendingMessage: string;
|
|
206
209
|
}>;
|
|
207
|
-
locale: string;
|
|
208
210
|
currency: string;
|
|
209
211
|
idPrefix: string;
|
|
210
212
|
dense: boolean;
|
|
211
|
-
mode: import('./types.js').FilterPanelMode;
|
|
212
213
|
facets: FilterFacet[];
|
|
213
214
|
showHead: boolean;
|
|
214
215
|
showApplied: boolean;
|
|
@@ -23,6 +23,7 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
|
|
|
23
23
|
noResults: string;
|
|
24
24
|
noResultsFor: (query: string) => string;
|
|
25
25
|
noMatchesFor: (query: string) => string;
|
|
26
|
+
createOption: (query: string) => string;
|
|
26
27
|
moreSelected: (n: number) => string;
|
|
27
28
|
removeTag: (label: string) => string;
|
|
28
29
|
selected: string;
|
|
@@ -23,6 +23,7 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
|
|
|
23
23
|
noResults: string;
|
|
24
24
|
noResultsFor: (query: string) => string;
|
|
25
25
|
noMatchesFor: (query: string) => string;
|
|
26
|
+
createOption: (query: string) => string;
|
|
26
27
|
moreSelected: (n: number) => string;
|
|
27
28
|
removeTag: (label: string) => string;
|
|
28
29
|
selected: string;
|
|
@@ -11,6 +11,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
|
|
|
11
11
|
onCommit?: ((range: [number, number]) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
13
|
classes: Partial<Record<import('../types.js').FilterPanelPart, string>>;
|
|
14
|
+
locale: string;
|
|
14
15
|
messages: Partial<{
|
|
15
16
|
clear: string;
|
|
16
17
|
close: string;
|
|
@@ -29,6 +30,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
|
|
|
29
30
|
noResults: string;
|
|
30
31
|
noResultsFor: (query: string) => string;
|
|
31
32
|
noMatchesFor: (query: string) => string;
|
|
33
|
+
createOption: (query: string) => string;
|
|
32
34
|
moreSelected: (n: number) => string;
|
|
33
35
|
removeTag: (label: string) => string;
|
|
34
36
|
selected: string;
|
|
@@ -160,7 +162,6 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
|
|
|
160
162
|
formPendingTitle: string;
|
|
161
163
|
formPendingMessage: string;
|
|
162
164
|
}>;
|
|
163
|
-
locale: string;
|
|
164
165
|
currency: string;
|
|
165
166
|
dense: boolean;
|
|
166
167
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -23,6 +23,7 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
|
|
|
23
23
|
noResults: string;
|
|
24
24
|
noResultsFor: (query: string) => string;
|
|
25
25
|
noMatchesFor: (query: string) => string;
|
|
26
|
+
createOption: (query: string) => string;
|
|
26
27
|
moreSelected: (n: number) => string;
|
|
27
28
|
removeTag: (label: string) => string;
|
|
28
29
|
selected: string;
|
|
@@ -23,6 +23,7 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
|
|
|
23
23
|
noResults: string;
|
|
24
24
|
noResultsFor: (query: string) => string;
|
|
25
25
|
noMatchesFor: (query: string) => string;
|
|
26
|
+
createOption: (query: string) => string;
|
|
26
27
|
moreSelected: (n: number) => string;
|
|
27
28
|
removeTag: (label: string) => string;
|
|
28
29
|
selected: string;
|
|
@@ -21,19 +21,19 @@ export interface FacetProps {
|
|
|
21
21
|
* the end." The same count sits at the end of a swatch row and a switch row, so it is written
|
|
22
22
|
* once.
|
|
23
23
|
*/
|
|
24
|
-
export declare const FACET_COUNT = "ms-auto shrink-0 text-caption text-muted tabular-nums";
|
|
24
|
+
export declare const FACET_COUNT = "eldra:ms-auto eldra:shrink-0 eldra:text-caption eldra:text-muted eldra:tabular-nums";
|
|
25
25
|
/**
|
|
26
26
|
* Spec → States, "Option row, hover" and "Swatch row/tile, hover": "`text` at 6%".
|
|
27
27
|
*
|
|
28
28
|
* A `color-mix` against the token rather than a tint of its own, so a store that changes `text`
|
|
29
29
|
* changes the hover with it — the same shape `Switch`'s own hover fill uses.
|
|
30
30
|
*/
|
|
31
|
-
export declare const FACET_ROW_HOVER = "hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]";
|
|
31
|
+
export declare const FACET_ROW_HOVER = "eldra:eldra-transition-colors eldra:hover:bg-[color-mix(in_oklab,var(--eldra-color-text),transparent_94%)]";
|
|
32
32
|
/**
|
|
33
33
|
* Spec → Sizes, Option row: "padding 0.25rem 0.5rem with a −0.5rem side margin (the hover tint
|
|
34
34
|
* bleeds into the gutter)". The negative margin is what lets the tint reach past the panel's own
|
|
35
35
|
* text edge, so a hovered row reads as a row rather than as a highlighted label.
|
|
36
36
|
*/
|
|
37
|
-
export declare const FACET_ROW_GUTTER = "
|
|
37
|
+
export declare const FACET_ROW_GUTTER = "eldra:-mx-2 eldra:px-2";
|
|
38
38
|
/** The same, at the swatch row's own tighter 0.375rem padding (spec → Sizes, Swatch row). */
|
|
39
|
-
export declare const FACET_SWATCH_GUTTER = "
|
|
39
|
+
export declare const FACET_SWATCH_GUTTER = "eldra:-mx-1.5 eldra:px-1.5";
|
|
@@ -140,7 +140,7 @@ export interface AppliedFilter {
|
|
|
140
140
|
* marks the `<li>` around each `Chip` rather than the chip itself. A `colour` facet's rows and a
|
|
141
141
|
* `size` facet's tiles are drawn by this package and do carry `data-part="row"`/`"tile"`.
|
|
142
142
|
*/
|
|
143
|
-
export type FilterPanelPart = '
|
|
143
|
+
export type FilterPanelPart = 'head' | 'title' | 'clear' | 'applied' | 'chip' | 'group' | 'trigger' | 'groupLabel' | 'badge' | 'summary' | 'chevron' | 'body' | 'legend' | 'search' | 'noMatches' | 'values' | 'row' | 'rowLabel' | 'count' | 'checkbox' | 'showAll' | 'swatch' | 'swatchMark' | 'swatchStrike' | 'subheading' | 'tile' | 'tileLabel' | 'sizeGuide' | 'range' | 'histogram' | 'histogramBar' | 'fields' | 'field' | 'fieldLabel' | 'separator' | 'switchRow' | 'foot';
|
|
144
144
|
export interface FilterPanelProps {
|
|
145
145
|
/**
|
|
146
146
|
* The selection (two-way), keyed by facet id. Unset, the panel manages its own — which is what
|
|
@@ -176,7 +176,10 @@ export interface FilterPanelProps {
|
|
|
176
176
|
dense?: boolean;
|
|
177
177
|
/** Namespaces every id this panel mints, so a sidebar and a drawer never collide. */
|
|
178
178
|
idPrefix?: string;
|
|
179
|
-
/**
|
|
179
|
+
/**
|
|
180
|
+
* Per-part classes, appended to the part's own (a consumer class wins by cascade layer). The
|
|
181
|
+
* root (the `<form>`) is styled with `class`.
|
|
182
|
+
*/
|
|
180
183
|
classes?: Partial<Record<FilterPanelPart, string>>;
|
|
181
184
|
/** Overrides for the strings this component renders itself. */
|
|
182
185
|
messages?: Partial<UiMessages>;
|
|
@@ -16,8 +16,8 @@ declare const __VLS_base: import('vue').DefineComponent<FormLayoutProps, {}, {},
|
|
|
16
16
|
onSubmit?: ((payload: FormLayoutSubmitPayload) => any) | undefined;
|
|
17
17
|
onInvalid?: ((ids: string[]) => any) | undefined;
|
|
18
18
|
}>, {
|
|
19
|
-
classes: Partial<Record<import('./types.js').FormLayoutPart, string>>;
|
|
20
19
|
headingLevel: import('./types.js').FormLayoutHeadingLevel;
|
|
20
|
+
classes: Partial<Record<import('./types.js').FormLayoutPart, string>>;
|
|
21
21
|
ariaLabel: string;
|
|
22
22
|
layout: FormLayoutVariant;
|
|
23
23
|
novalidate: boolean;
|
|
@@ -8,7 +8,7 @@ export type FormLayoutVariant = 'single' | 'two' | 'inline';
|
|
|
8
8
|
* if the shared type ever changes. */
|
|
9
9
|
export type FormLayoutHeadingLevel = Extract<HeadingLevel, 2 | 3 | 4>;
|
|
10
10
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
11
|
-
export type FormLayoutPart = '
|
|
11
|
+
export type FormLayoutPart = 'heading' | 'errorSummary' | 'fields' | 'actions' | 'status';
|
|
12
12
|
/** What the `submit` event carries once every field in the form is valid. */
|
|
13
13
|
export interface FormLayoutSubmitPayload {
|
|
14
14
|
/** The native event, so a scripted form can `preventDefault()` it itself. */
|
|
@@ -47,6 +47,9 @@ export interface FormLayoutProps {
|
|
|
47
47
|
* is never visible: the visible confirmation is the page's, this is what a screen reader hears.
|
|
48
48
|
*/
|
|
49
49
|
statusMessage?: string;
|
|
50
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Per-part classes, appended to the part's own (a consumer class wins by cascade layer). The
|
|
52
|
+
* root (the `<form>`) is styled with `class`.
|
|
53
|
+
*/
|
|
51
54
|
classes?: Partial<Record<FormLayoutPart, string>>;
|
|
52
55
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { IconProps } from './types.js';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<IconProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IconProps> & Readonly<{}>, {
|
|
3
|
-
size: import('./types.js').IconSize;
|
|
4
3
|
label: string;
|
|
5
|
-
|
|
4
|
+
size: import('./types.js').IconSize;
|
|
6
5
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
6
|
declare const _default: typeof __VLS_export;
|
|
8
7
|
export default _default;
|
|
@@ -11,8 +11,6 @@ export type IconComponent = Component;
|
|
|
11
11
|
* 1.5rem (feature tiles) and 2rem (empty states).
|
|
12
12
|
*/
|
|
13
13
|
export type IconSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
-
/** The parts a consumer can restyle through `classes`. */
|
|
15
|
-
export type IconPart = 'root';
|
|
16
14
|
export interface IconProps {
|
|
17
15
|
/** The icon component to render. */
|
|
18
16
|
icon: IconComponent;
|
|
@@ -24,6 +22,4 @@ export interface IconProps {
|
|
|
24
22
|
* assistive technology.
|
|
25
23
|
*/
|
|
26
24
|
label?: string;
|
|
27
|
-
/** Per-part class overrides, merged with `tailwind-merge`. */
|
|
28
|
-
classes?: Partial<Record<IconPart, string>>;
|
|
29
25
|
}
|
|
@@ -41,7 +41,7 @@ export interface ImageCrop {
|
|
|
41
41
|
sizes?: string;
|
|
42
42
|
}
|
|
43
43
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
44
|
-
export type ImagePart = '
|
|
44
|
+
export type ImagePart = 'frame' | 'media' | 'placeholder' | 'caption' | 'skeleton';
|
|
45
45
|
export interface ImageProps {
|
|
46
46
|
/** The image or video. `null`/omitted renders the live "No image" placeholder. */
|
|
47
47
|
media?: ImageMedia | null;
|
|
@@ -93,6 +93,7 @@ export interface ImageProps {
|
|
|
93
93
|
priority?: boolean;
|
|
94
94
|
/** Renders a skeleton at the frame's own ratio instead of `media`/the placeholder. */
|
|
95
95
|
loading?: boolean;
|
|
96
|
-
/** Per-part
|
|
96
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
|
|
97
|
+
* with `class`. */
|
|
97
98
|
classes?: Partial<Record<ImagePart, string>>;
|
|
98
99
|
}
|
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
import { InputProps } from './types.js';
|
|
2
2
|
declare const __VLS_template: () => {
|
|
3
3
|
__VLS_Slots: {
|
|
4
|
+
prefix?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
4
6
|
leadingIcon?: (props: {}) => any;
|
|
5
7
|
} & {
|
|
6
8
|
suffix?: (props: {}) => any;
|
|
7
9
|
};
|
|
8
10
|
};
|
|
9
11
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
10
|
-
declare const __VLS_base: import('vue').DefineComponent<InputProps, {
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
declare const __VLS_base: import('vue').DefineComponent<InputProps, {
|
|
13
|
+
control: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
14
|
+
focus: () => void | undefined;
|
|
15
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
16
|
"update:modelValue": (value: string) => any;
|
|
17
|
+
clear: () => any;
|
|
18
|
+
blur: (event: FocusEvent) => any;
|
|
14
19
|
focus: (event: FocusEvent) => any;
|
|
15
20
|
}, string, import('vue').PublicProps, Readonly<InputProps> & Readonly<{
|
|
16
|
-
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
17
|
-
onClear?: (() => any) | undefined;
|
|
18
21
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
22
|
+
onClear?: (() => any) | undefined;
|
|
23
|
+
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
19
24
|
onFocus?: ((event: FocusEvent) => any) | undefined;
|
|
20
25
|
}>, {
|
|
21
|
-
size: import('./types.js').InputSize;
|
|
22
26
|
name: string;
|
|
23
|
-
classes: Partial<Record<import('./types.js').InputPart, string>>;
|
|
24
27
|
type: import('./types.js').InputType;
|
|
25
28
|
mask: string;
|
|
29
|
+
size: import('./types.js').InputSize;
|
|
26
30
|
modelValue: string;
|
|
31
|
+
classes: Partial<Record<import('./types.js').InputPart, string>>;
|
|
27
32
|
required: boolean;
|
|
28
33
|
placeholder: string;
|
|
29
34
|
max: number;
|
|
@@ -32,7 +37,7 @@ declare const __VLS_base: import('vue').DefineComponent<InputProps, {}, {}, {},
|
|
|
32
37
|
leadingIcon: import('../../index.js').IconComponent;
|
|
33
38
|
disabled: boolean;
|
|
34
39
|
invalid: boolean;
|
|
35
|
-
inputmode: string;
|
|
40
|
+
inputmode: string | false;
|
|
36
41
|
describedBy: string;
|
|
37
42
|
min: number;
|
|
38
43
|
clearable: boolean;
|