@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
package/dist/componentNames.d.ts
CHANGED
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
* it from `@eldrajs/ui`, where it does not exist, and would pull an optional peer into a project
|
|
16
16
|
* that never installed it. `src/__tests__/veeValidateIsolation.spec.ts` asserts both halves.
|
|
17
17
|
*/
|
|
18
|
-
export declare const componentNames: readonly ["Accordion", "AccordionItem", "Avatar", "AvatarGroup", "Badge", "Breadcrumb", "Button", "ButtonGroup", "Carousel", "Checkbox", "CheckboxGroup", "Chip", "ChipGroup", "Container", "ContentCard", "CurrencyInput", "Dialog", "Drawer", "EditorPlaceholder", "EmptyState", "FeatureCard", "FieldWrapper", "FilterPanel", "FormLayout", "Icon", "Image", "Input", "Lightbox", "Link", "LoadMore", "LogoItem", "MultiSelect", "NavMenu", "Pagination", "Popover", "Price", "ProductCard", "QuantityStepper", "RadioGroup", "RangeSlider", "Rating", "SearchBar", "SearchModal", "Section", "Select", "SiteForm", "Skeleton", "StockBadge", "Switch", "Tab", "TabPanel", "TablerIcon", "Tabs", "Textarea", "Toast", "Toaster", "Tooltip", "UnitInput", "VariantPicker", "VisuallyHidden"];
|
|
18
|
+
export declare const componentNames: readonly ["Accordion", "AccordionItem", "Avatar", "AvatarGroup", "Badge", "Breadcrumb", "Button", "ButtonGroup", "Carousel", "Checkbox", "CheckboxGroup", "Chip", "ChipGroup", "Container", "ContentCard", "CurrencyInput", "Dialog", "Drawer", "EditorPlaceholder", "EmptyState", "FeatureCard", "FieldWrapper", "FilterPanel", "FormLayout", "Icon", "Image", "Input", "Lightbox", "Link", "LoadMore", "LogoItem", "MultiSelect", "NavMenu", "Pagination", "Popover", "Price", "ProductCard", "QuantityStepper", "Radio", "RadioGroup", "RangeSlider", "Rating", "SearchBar", "SearchModal", "Section", "Select", "SiteForm", "Skeleton", "StockBadge", "Switch", "Tab", "TabPanel", "TablerIcon", "Tabs", "Textarea", "Toast", "Toaster", "Tooltip", "UnitInput", "VariantPicker", "VisuallyHidden"];
|
|
19
19
|
export type ComponentName = (typeof componentNames)[number];
|
|
@@ -6,9 +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<AccordionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AccordionProps> & Readonly<{}>, {
|
|
9
|
-
name: string;
|
|
10
9
|
multiple: boolean;
|
|
11
|
-
|
|
10
|
+
name: string;
|
|
12
11
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
12
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
13
|
declare const _default: typeof __VLS_export;
|
|
@@ -13,10 +13,10 @@ declare const __VLS_base: import('vue').DefineComponent<AccordionItemProps, {},
|
|
|
13
13
|
onToggle?: ((open: boolean) => any) | undefined;
|
|
14
14
|
}>, {
|
|
15
15
|
help: string;
|
|
16
|
-
classes: Partial<Record<import('./types.js').AccordionItemPart, string>>;
|
|
17
16
|
modelValue: boolean;
|
|
18
17
|
headingLevel: import('./types.js').AccordionItemHeadingLevel;
|
|
19
18
|
href: string;
|
|
19
|
+
classes: Partial<Record<import('./types.js').AccordionItemPart, string>>;
|
|
20
20
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
21
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
22
|
declare const _default: typeof __VLS_export;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
export type AccordionPart =
|
|
1
|
+
/** `Accordion` has no inner parts: style the list itself with `class`. */
|
|
2
|
+
export type AccordionPart = never;
|
|
3
3
|
export interface AccordionProps {
|
|
4
4
|
/**
|
|
5
5
|
* `true` (default): any number of items open at once, each an independent `<details>`. `false`:
|
|
@@ -9,8 +9,6 @@ export interface AccordionProps {
|
|
|
9
9
|
multiple?: boolean;
|
|
10
10
|
/** The shared `name` used while `multiple` is `false`. Generated when not given. */
|
|
11
11
|
name?: string;
|
|
12
|
-
/** Per-part class overrides, merged with `tailwind-merge`. */
|
|
13
|
-
classes?: Partial<Record<AccordionPart, string>>;
|
|
14
12
|
}
|
|
15
13
|
/** The heading levels `AccordionItem`'s `title` can wrap in, when the page outline needs one
|
|
16
14
|
* (spec "Accordion" → Properties, `headingLevel` row). Undefined by default: plain text. */
|
|
@@ -18,9 +16,10 @@ export type AccordionItemHeadingLevel = 2 | 3 | 4;
|
|
|
18
16
|
/**
|
|
19
17
|
* The parts a consumer can restyle through `classes`, named after the spec's own anatomy. A link
|
|
20
18
|
* row (`href` set) renders none of `summary`, `chevron` or `panel`: a plain `<a>` has no
|
|
21
|
-
* disclosure trigger distinct from its own root and no panel.
|
|
19
|
+
* disclosure trigger distinct from its own root and no panel. The root (`<details>`, or the link
|
|
20
|
+
* row's `<a>`) takes `class`.
|
|
22
21
|
*/
|
|
23
|
-
export type AccordionItemPart = '
|
|
22
|
+
export type AccordionItemPart = 'summary' | 'title' | 'help' | 'chevron' | 'panel';
|
|
24
23
|
export interface AccordionItemProps {
|
|
25
24
|
/** The row's label. Also part of the accessible name. */
|
|
26
25
|
title: string;
|
|
@@ -35,6 +34,6 @@ export interface AccordionItemProps {
|
|
|
35
34
|
/** Renders a plain `<a>` styled as a trigger instead of `<details>`/`<summary>` plus panel — a
|
|
36
35
|
* menu entry with no children (spec "Accordion" → Variants, "Link row"). No panel, no chevron. */
|
|
37
36
|
href?: string;
|
|
38
|
-
/** Per-part
|
|
37
|
+
/** Per-part classes, appended to the part's own (they win by cascade layer). */
|
|
39
38
|
classes?: Partial<Record<AccordionItemPart, string>>;
|
|
40
39
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AvatarProps, AvatarSize } from './types.js';
|
|
2
2
|
declare const __VLS_export: import('vue').DefineComponent<AvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{}>, {
|
|
3
|
-
size: AvatarSize;
|
|
4
3
|
name: string | null;
|
|
4
|
+
size: AvatarSize;
|
|
5
5
|
classes: Partial<Record<import('./types.js').AvatarPart, string>>;
|
|
6
6
|
src: string | import('../../index.js').ImageMedia | null;
|
|
7
7
|
decorative: boolean;
|
|
@@ -2,7 +2,7 @@ import { ImageMedia } from '../image/types.js';
|
|
|
2
2
|
/** The design spec's four sizes (spec "Avatar" → Sizes): 2rem, 2.5rem, 3.5rem, 6rem diameter. */
|
|
3
3
|
export type AvatarSize = 'sm' | 'md' | 'lg' | 'xl';
|
|
4
4
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
5
|
-
export type AvatarPart = '
|
|
5
|
+
export type AvatarPart = 'image' | 'initials' | 'icon';
|
|
6
6
|
export interface AvatarProps {
|
|
7
7
|
/**
|
|
8
8
|
* The person's photo. A bare `string` is treated as the asset URL directly (the same shorthand
|
|
@@ -26,7 +26,8 @@ export interface AvatarProps {
|
|
|
26
26
|
* instead (spec "Avatar" → Properties, `decorative` row; → Accessibility, 1.1.1/4.1.2).
|
|
27
27
|
*/
|
|
28
28
|
decorative?: boolean;
|
|
29
|
-
/** Per-part
|
|
29
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
|
|
30
|
+
* with `class`. */
|
|
30
31
|
classes?: Partial<Record<AvatarPart, string>>;
|
|
31
32
|
}
|
|
32
33
|
/** One person in an `AvatarGroup` (spec "Avatar" → Properties, Avatar group `people` row). */
|
|
@@ -41,7 +42,7 @@ export interface AvatarGroupPerson {
|
|
|
41
42
|
* plus `srText` — the visually hidden element that carries the group's one accessible sentence
|
|
42
43
|
* (spec "Avatar" → Accessibility: "A group gets one name … the individual avatars and '+4' are
|
|
43
44
|
* hidden"). */
|
|
44
|
-
export type AvatarGroupPart = '
|
|
45
|
+
export type AvatarGroupPart = 'item' | 'more' | 'srText';
|
|
45
46
|
export interface AvatarGroupProps {
|
|
46
47
|
/** The people to show, in the order they stack. */
|
|
47
48
|
people: AvatarGroupPerson[];
|
|
@@ -56,6 +57,7 @@ export interface AvatarGroupProps {
|
|
|
56
57
|
/** The group's own label, e.g. `"Makers"` — prefixes the accessible sentence: `"Makers: Ingrid,
|
|
57
58
|
* Tomas, Maya and 4 more"` (spec "Avatar" → Properties, Avatar group `label` row). */
|
|
58
59
|
label: string;
|
|
59
|
-
/** Per-part
|
|
60
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
|
|
61
|
+
* with `class`. */
|
|
60
62
|
classes?: Partial<Record<AvatarGroupPart, string>>;
|
|
61
63
|
}
|
|
@@ -10,7 +10,7 @@ export type BadgeTone = 'neutral' | 'primary' | 'accent' | 'success' | 'warning'
|
|
|
10
10
|
*/
|
|
11
11
|
export type BadgeVariant = 'none' | 'sale' | 'new';
|
|
12
12
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
13
|
-
export type BadgePart = '
|
|
13
|
+
export type BadgePart = 'icon' | 'label' | 'hiddenSuffix';
|
|
14
14
|
export interface BadgeProps {
|
|
15
15
|
/** Visible text (content). Sentence case. Also the fallback for the default slot. */
|
|
16
16
|
label?: string;
|
|
@@ -34,7 +34,8 @@ export interface BadgeProps {
|
|
|
34
34
|
hiddenSuffix?: string | null;
|
|
35
35
|
/** Render a different root element than the default `<span>`. */
|
|
36
36
|
as?: string;
|
|
37
|
-
/** Per-part
|
|
37
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
|
|
38
|
+
* with `class`. */
|
|
38
39
|
classes?: Partial<Record<BadgePart, string>>;
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
@@ -47,7 +48,7 @@ export type StockLevel = 'in' | 'low' | 'out' | 'preorder';
|
|
|
47
48
|
* words inside `label`: it exists so the refresh dim (on `label`) and the fade a changed stock
|
|
48
49
|
* line plays (on the span) are not one element fighting over `opacity`. It adds no box of its
|
|
49
50
|
* own. */
|
|
50
|
-
export type StockBadgePart = '
|
|
51
|
+
export type StockBadgePart = 'icon' | 'label' | 'labelValue' | 'spinner' | 'srStatus';
|
|
51
52
|
export interface StockBadgeProps {
|
|
52
53
|
/** Picks the colour, icon and default message. */
|
|
53
54
|
level: StockLevel;
|
|
@@ -74,6 +75,7 @@ export interface StockBadgeProps {
|
|
|
74
75
|
* region per card. `aria-busy`, the dim and the spinner are unaffected; only the region goes.
|
|
75
76
|
*/
|
|
76
77
|
announce?: boolean;
|
|
77
|
-
/** Per-part
|
|
78
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
|
|
79
|
+
* with `class`. */
|
|
78
80
|
classes?: Partial<Record<StockBadgePart, string>>;
|
|
79
81
|
}
|
|
@@ -21,7 +21,7 @@ export interface BreadcrumbItem {
|
|
|
21
21
|
href?: string;
|
|
22
22
|
}
|
|
23
23
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
24
|
-
export type BreadcrumbPart = '
|
|
24
|
+
export type BreadcrumbPart = 'list' | 'item' | 'link' | 'current' | 'separator' | 'ellipsis';
|
|
25
25
|
export interface BreadcrumbProps {
|
|
26
26
|
/** The trail, root first. The last entry is always rendered as the current page — see
|
|
27
27
|
* `BreadcrumbItem`'s own comment. */
|
|
@@ -54,6 +54,9 @@ export interface BreadcrumbProps {
|
|
|
54
54
|
* page-level structured data), because two `BreadcrumbList`s on one page are duplicate markup.
|
|
55
55
|
*/
|
|
56
56
|
structuredData?: boolean;
|
|
57
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the `<nav>`
|
|
59
|
+
* itself with `class`.
|
|
60
|
+
*/
|
|
58
61
|
classes?: Partial<Record<BreadcrumbPart, string>>;
|
|
59
62
|
}
|
|
@@ -14,17 +14,20 @@ declare const __VLS_base: import('vue').DefineComponent<ButtonProps, {}, {}, {},
|
|
|
14
14
|
}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
15
15
|
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
size: ButtonSize;
|
|
18
|
-
label: string;
|
|
19
|
-
classes: Partial<Record<import('./types.js').ButtonPart, string>>;
|
|
20
17
|
type: "button" | "submit" | "reset";
|
|
18
|
+
label: string;
|
|
19
|
+
size: ButtonSize;
|
|
21
20
|
href: string;
|
|
21
|
+
classes: Partial<Record<import('./types.js').ButtonPart, string>>;
|
|
22
22
|
icon: import('../../index.js').IconComponent;
|
|
23
|
+
to: string | Record<string, unknown>;
|
|
23
24
|
loading: boolean;
|
|
24
25
|
as: string | import('vue').Component;
|
|
25
26
|
iconLeft: import('../../index.js').IconComponent;
|
|
26
27
|
iconRight: import('../../index.js').IconComponent;
|
|
27
28
|
iconOnly: boolean;
|
|
29
|
+
spinnerPlacement: import('./types.js').ButtonSpinnerPlacement;
|
|
30
|
+
keepNameWhileLoading: boolean;
|
|
28
31
|
block: boolean;
|
|
29
32
|
pressed: boolean;
|
|
30
33
|
disabled: boolean;
|
|
@@ -6,7 +6,6 @@ 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<ButtonGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
|
|
9
|
-
classes: Partial<Record<"root", string>>;
|
|
10
9
|
attached: boolean;
|
|
11
10
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
12
11
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -10,8 +10,10 @@ import { IconComponent } from '../icon/types.js';
|
|
|
10
10
|
export type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'link' | 'danger';
|
|
11
11
|
/** The spec's three button heights: 2rem, 2.5rem and 3rem. */
|
|
12
12
|
export type ButtonSize = 'sm' | 'md' | 'lg';
|
|
13
|
+
/** Where `Button`'s loading spinner is drawn. */
|
|
14
|
+
export type ButtonSpinnerPlacement = 'overlay' | 'start';
|
|
13
15
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
14
|
-
export type ButtonPart = '
|
|
16
|
+
export type ButtonPart = 'leadingIcon' | 'label' | 'trailingIcon' | 'spinner';
|
|
15
17
|
export interface ButtonProps {
|
|
16
18
|
/** Visual weight and meaning. Required: there is no neutral default in the spec. */
|
|
17
19
|
variant: ButtonVariant;
|
|
@@ -26,10 +28,22 @@ export interface ButtonProps {
|
|
|
26
28
|
* link component, for example `resolveComponent('NuxtLink')`, so an in-app destination routes
|
|
27
29
|
* instead of reloading the document. A string is used as the tag directly and still receives
|
|
28
30
|
* `href`; a component receives the destination as its `to` prop instead, matching Vue Router /
|
|
29
|
-
* NuxtLink's own contract.
|
|
30
|
-
* `<button>`,
|
|
31
|
+
* NuxtLink's own contract. With neither `href` nor `to`, a component `as` (or `'a'`/`'button'`)
|
|
32
|
+
* is ignored and this is a `<button>`, the same rule as `Link`'s `as`; any other string (`'span'`,
|
|
33
|
+
* `'div'`) renders that tag with the button look and nothing interactive — no `type`,
|
|
34
|
+
* `disabled`, `tabindex`, `aria-pressed`, `aria-disabled` or `aria-label` — for a part that only
|
|
35
|
+
* looks like a button inside another control (a row that is itself the button). Its name is its
|
|
36
|
+
* own text; an icon-only one is decorative.
|
|
31
37
|
*/
|
|
32
38
|
as?: string | Component;
|
|
39
|
+
/**
|
|
40
|
+
* A router destination (a path or a route object) for an `as` component, handed to it as its
|
|
41
|
+
* `to` prop, for a destination `href` cannot hold. Ignored without a component `as`. No `type`,
|
|
42
|
+
* `disabled` or `aria-pressed` is set on the component; while disabled it is
|
|
43
|
+
* `aria-disabled="true"`, out of the tab order, and its clicks are cancelled before the router
|
|
44
|
+
* link's own handler sees them.
|
|
45
|
+
*/
|
|
46
|
+
to?: string | Record<string, unknown>;
|
|
33
47
|
/** Leading icon component, for example `IconShoppingBag`. */
|
|
34
48
|
iconLeft?: IconComponent;
|
|
35
49
|
/** Trailing icon component, for example `IconArrowRight` on "Continue to checkout". */
|
|
@@ -46,23 +60,39 @@ export interface ButtonProps {
|
|
|
46
60
|
label?: string;
|
|
47
61
|
/** Shows the spinner, sets `aria-busy="true"` and keeps the button's width and focus. */
|
|
48
62
|
loading?: boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Where the spinner goes while `loading`. `"overlay"` (the default) centres it over the hidden
|
|
65
|
+
* label and icons, and `label` becomes the accessible name. `"start"` draws it in the leading
|
|
66
|
+
* icon's place, before the label, which stays visible and keeps naming the button.
|
|
67
|
+
*/
|
|
68
|
+
spinnerPlacement?: ButtonSpinnerPlacement;
|
|
69
|
+
/**
|
|
70
|
+
* While `loading` with the overlay spinner, keep the hidden label in the accessibility tree
|
|
71
|
+
* (transparent rather than `visibility: hidden`), so slot content keeps naming the button when
|
|
72
|
+
* there is no `label`. A `label` still wins as the name. Default `false`.
|
|
73
|
+
*/
|
|
74
|
+
keepNameWhileLoading?: boolean;
|
|
49
75
|
/** Full width of its container. */
|
|
50
76
|
block?: boolean;
|
|
51
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Toggle buttons only: sets `aria-pressed`. Leave it undefined for ordinary buttons. `true` draws
|
|
79
|
+
* the pressed fill (`surface-strong`, `border-strong` boundary) on `outline` and `ghost`.
|
|
80
|
+
*/
|
|
52
81
|
pressed?: boolean;
|
|
53
82
|
/** Native `disabled`. A disabled link button loses its `href` so it is not focusable either. */
|
|
54
83
|
disabled?: boolean;
|
|
55
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the button
|
|
86
|
+
* itself with `class`.
|
|
87
|
+
*/
|
|
56
88
|
classes?: Partial<Record<ButtonPart, string>>;
|
|
57
89
|
}
|
|
58
|
-
/**
|
|
59
|
-
export type ButtonGroupPart =
|
|
90
|
+
/** ButtonGroup has no inner parts: style the group itself with `class`. */
|
|
91
|
+
export type ButtonGroupPart = never;
|
|
60
92
|
export interface ButtonGroupProps {
|
|
61
93
|
/**
|
|
62
94
|
* Renders the group as a segmented control: no gap, square inner corners, neighbours overlapping
|
|
63
95
|
* by 1px and `role="group"`. Give it an `aria-label` ("View"), which falls through to the root.
|
|
64
96
|
*/
|
|
65
97
|
attached?: boolean;
|
|
66
|
-
/** Per-part class overrides, merged with `tailwind-merge`. */
|
|
67
|
-
classes?: Partial<Record<ButtonGroupPart, string>>;
|
|
68
98
|
}
|
|
@@ -14,19 +14,19 @@ declare const __VLS_template: () => {
|
|
|
14
14
|
};
|
|
15
15
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
16
16
|
declare const __VLS_base: import('vue').DefineComponent<ContentCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContentCardProps> & Readonly<{}>, {
|
|
17
|
-
classes: Partial<Record<import('./types.js').ContentCardPart, string>>;
|
|
18
17
|
meta: string | null;
|
|
19
18
|
image: import('../../index.js').ImageMedia | null;
|
|
20
19
|
headingLevel: import('../../index.js').HeadingLevel;
|
|
20
|
+
classes: Partial<Record<import('./types.js').ContentCardPart, string>>;
|
|
21
21
|
loading: boolean;
|
|
22
22
|
variant: ContentCardVariant;
|
|
23
23
|
linkAs: string | import('vue').Component;
|
|
24
24
|
date: string | null;
|
|
25
|
+
locale: string;
|
|
25
26
|
ratio: import('./types.js').ContentCardRatio;
|
|
26
27
|
eyebrow: string | null;
|
|
27
28
|
excerpt: string | null;
|
|
28
29
|
cue: string | null;
|
|
29
|
-
locale: string;
|
|
30
30
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
31
31
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
@@ -12,9 +12,9 @@ declare const __VLS_template: () => {
|
|
|
12
12
|
};
|
|
13
13
|
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
14
14
|
declare const __VLS_base: import('vue').DefineComponent<FeatureCardProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FeatureCardProps> & Readonly<{}>, {
|
|
15
|
-
classes: Partial<Record<import('./types.js').FeatureCardPart, string>>;
|
|
16
15
|
headingLevel: import('../../index.js').HeadingLevel;
|
|
17
16
|
href: string | null;
|
|
17
|
+
classes: Partial<Record<import('./types.js').FeatureCardPart, string>>;
|
|
18
18
|
variant: FeatureCardVariant;
|
|
19
19
|
linkAs: string | import('vue').Component;
|
|
20
20
|
cue: string;
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
* title, `group-hover:translate-x-0.5` on a cue arrow) from the root's `group` rather than from the
|
|
41
41
|
* `<a>` directly: a cue is a sibling of the `<a>`, not a descendant of it.
|
|
42
42
|
*/
|
|
43
|
-
export declare const CARD_FOCUS_PROXY = "group relative rounded-lg eldra-focus eldra-focus-proxy";
|
|
44
|
-
export declare const STRETCHED_LINK = "after:absolute after:inset-0";
|
|
45
|
-
export declare const STRETCHED_LINK_OUTLINE = "outline-none";
|
|
43
|
+
export declare const CARD_FOCUS_PROXY = "eldra:group eldra:relative eldra:rounded-lg eldra:eldra-focus eldra:eldra-focus-proxy";
|
|
44
|
+
export declare const STRETCHED_LINK = "eldra:after:absolute eldra:after:inset-0";
|
|
45
|
+
export declare const STRETCHED_LINK_OUTLINE = "eldra:outline-none";
|
|
@@ -15,7 +15,7 @@ export type ContentCardVariant = 'plain' | 'surface' | 'outlined';
|
|
|
15
15
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them:
|
|
16
16
|
* the media frame (1), the body wrapper (2) and its eyebrow/title/titleLink/excerpt/meta, the
|
|
17
17
|
* surface variant's link cue (3) and the outlined variant's count meta, which reuses `meta`. */
|
|
18
|
-
export type ContentCardPart = '
|
|
18
|
+
export type ContentCardPart = 'media' | 'body' | 'eyebrow' | 'title' | 'titleLink' | 'excerpt' | 'meta' | 'cue';
|
|
19
19
|
export interface ContentCardProps {
|
|
20
20
|
/** Card title; also the link text (spec → Properties). */
|
|
21
21
|
title: string;
|
|
@@ -57,7 +57,8 @@ export interface ContentCardProps {
|
|
|
57
57
|
* README "as vs linkAs" note.
|
|
58
58
|
*/
|
|
59
59
|
linkAs?: string | Component;
|
|
60
|
-
/** Per-part
|
|
60
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
|
|
61
|
+
* with `class`. */
|
|
61
62
|
classes?: Partial<Record<ContentCardPart, string>>;
|
|
62
63
|
}
|
|
63
64
|
/** `plain` (the default, no padding/border/container), `surface` (`surface` fill, padding, a
|
|
@@ -67,7 +68,7 @@ export type FeatureCardVariant = 'plain' | 'surface' | 'outlined';
|
|
|
67
68
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them:
|
|
68
69
|
* the icon tile (1), the title (2) and its titleLink when linked, the body (3), and the linked-only
|
|
69
70
|
* link cue (4). */
|
|
70
|
-
export type FeatureCardPart = '
|
|
71
|
+
export type FeatureCardPart = 'iconTile' | 'title' | 'titleLink' | 'body' | 'cue';
|
|
71
72
|
export interface FeatureCardProps {
|
|
72
73
|
/** A decorative icon component (e.g. `import { IconTruck } from '@tabler/icons-vue'`). */
|
|
73
74
|
icon: IconComponent;
|
|
@@ -87,6 +88,7 @@ export interface FeatureCardProps {
|
|
|
87
88
|
/** Render the title link through a different element/component than the default `<a>` — see
|
|
88
89
|
* `ContentCardProps.linkAs`. Linked only. */
|
|
89
90
|
linkAs?: string | Component;
|
|
90
|
-
/** Per-part
|
|
91
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
|
|
92
|
+
* with `class`. */
|
|
91
93
|
classes?: Partial<Record<FeatureCardPart, string>>;
|
|
92
94
|
}
|
|
@@ -20,7 +20,8 @@ export interface CarouselPerViewBreakpoints {
|
|
|
20
20
|
export type CarouselControls = 'header' | 'below';
|
|
21
21
|
/**
|
|
22
22
|
* The parts a consumer can restyle through `Carousel`'s `classes`, named after the spec's own
|
|
23
|
-
* anatomy (`
|
|
23
|
+
* anatomy (`track`, `slide`, `prev`, `next`, `dots`, `dot`, `counter`, `pause`; the root takes
|
|
24
|
+
* `class`), plus
|
|
24
25
|
* `header` — the row `controls: 'header'` renders for the arrows and the `header` slot, which the
|
|
25
26
|
* spec's own numbered anatomy does not name but this component does render and style through the
|
|
26
27
|
* same prop as everything else. `slide` is not an element `Carousel` renders itself: it is applied
|
|
@@ -32,7 +33,7 @@ export type CarouselControls = 'header' | 'below';
|
|
|
32
33
|
* either, and restyling it is almost always a mistake, but a consumer replacing the sentence's own
|
|
33
34
|
* `sr-only` treatment (a visible instruction line, say) should not have to fork the component.
|
|
34
35
|
*/
|
|
35
|
-
export type CarouselPart = '
|
|
36
|
+
export type CarouselPart = 'header' | 'instructions' | 'track' | 'slide' | 'prev' | 'next' | 'dots' | 'dot' | 'counter' | 'pause';
|
|
36
37
|
export interface CarouselProps {
|
|
37
38
|
/**
|
|
38
39
|
* The carousel's accessible name (spec "Carousel" → Properties, `label` row: "Accessible name
|
|
@@ -70,6 +71,9 @@ export interface CarouselProps {
|
|
|
70
71
|
* `useCarousel`'s own drag state machine for the mechanics.
|
|
71
72
|
*/
|
|
72
73
|
draggable?: boolean;
|
|
73
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Per-part classes, appended to the part's own (they win by cascade layer). Style the root
|
|
76
|
+
* itself with `class`.
|
|
77
|
+
*/
|
|
74
78
|
classes?: Partial<Record<CarouselPart, string>>;
|
|
75
79
|
}
|
|
@@ -14,16 +14,18 @@ declare const __VLS_base: import('vue').DefineComponent<CheckboxProps, {}, {}, {
|
|
|
14
14
|
"onUpdate:modelValue"?: ((checked: boolean) => any) | undefined;
|
|
15
15
|
onChange?: ((checked: boolean) => any) | undefined;
|
|
16
16
|
}>, {
|
|
17
|
-
size: CheckboxSize;
|
|
18
|
-
name: string;
|
|
19
17
|
value: string;
|
|
20
|
-
|
|
18
|
+
name: string;
|
|
19
|
+
size: CheckboxSize;
|
|
21
20
|
modelValue: boolean;
|
|
21
|
+
classes: Partial<Record<import('./types.js').CheckboxPart, string>>;
|
|
22
22
|
required: boolean;
|
|
23
|
+
error: string;
|
|
23
24
|
id: string;
|
|
24
25
|
disabled: boolean;
|
|
25
26
|
invalid: boolean;
|
|
26
27
|
controls: string;
|
|
28
|
+
requiredMark: boolean;
|
|
27
29
|
hint: string;
|
|
28
30
|
indeterminate: boolean;
|
|
29
31
|
describedBy: string;
|
|
@@ -7,8 +7,8 @@ declare const __VLS_export: import('vue').DefineComponent<CheckboxGroupProps, {}
|
|
|
7
7
|
onChange?: ((values: string[]) => any) | undefined;
|
|
8
8
|
}>, {
|
|
9
9
|
name: string;
|
|
10
|
-
classes: Partial<Record<import('./types.js').CheckboxGroupPart, string>>;
|
|
11
10
|
modelValue: string[];
|
|
11
|
+
classes: Partial<Record<import('./types.js').CheckboxGroupPart, string>>;
|
|
12
12
|
error: string;
|
|
13
13
|
layout: import('./types.js').CheckboxGroupLayout;
|
|
14
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
2
|
-
export type CheckboxPart = '
|
|
2
|
+
export type CheckboxPart = 'box' | 'check' | 'label' | 'hint' | 'requiredMark' | 'field' | 'error' | 'errorIcon';
|
|
3
3
|
/** The spec's two box sizes: 1.125rem and 1.5rem. */
|
|
4
4
|
export type CheckboxSize = 'md' | 'lg';
|
|
5
5
|
export interface CheckboxProps {
|
|
@@ -23,6 +23,17 @@ export interface CheckboxProps {
|
|
|
23
23
|
invalid?: boolean;
|
|
24
24
|
/** Native `required`. Comes from the `FieldWrapper` otherwise. */
|
|
25
25
|
required?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Shows `FieldWrapper`'s `*` after the label text. Without native `required` the label also ends
|
|
28
|
+
* with the visually hidden "Required" message, so the mark is announced. Default `false`.
|
|
29
|
+
*/
|
|
30
|
+
requiredMark?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* An error message drawn under the box in `FieldWrapper`'s error row, linked first in
|
|
33
|
+
* `aria-describedby`. Implies `invalid`. The row and the box are then wrapped in one element
|
|
34
|
+
* (the `field` part), which receives the root's place in the layout.
|
|
35
|
+
*/
|
|
36
|
+
error?: string;
|
|
26
37
|
/** Native `disabled`. */
|
|
27
38
|
disabled?: boolean;
|
|
28
39
|
/**
|
|
@@ -36,11 +47,14 @@ export interface CheckboxProps {
|
|
|
36
47
|
* notes). Comes from the `FieldWrapper` otherwise.
|
|
37
48
|
*/
|
|
38
49
|
describedBy?: string;
|
|
39
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Per-part classes, appended to the part's own (a consumer class wins by cascade layer). The
|
|
52
|
+
* root (the `<label>`) is styled with `class`.
|
|
53
|
+
*/
|
|
40
54
|
classes?: Partial<Record<CheckboxPart, string>>;
|
|
41
55
|
}
|
|
42
56
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
43
|
-
export type CheckboxGroupPart = '
|
|
57
|
+
export type CheckboxGroupPart = 'legend' | 'options' | 'error' | 'errorIcon';
|
|
44
58
|
/** Vertical is the default; a row is for short labels (sizes) and wraps. */
|
|
45
59
|
export type CheckboxGroupLayout = 'vertical' | 'row';
|
|
46
60
|
/** One option of a checkbox group. */
|
|
@@ -73,6 +87,9 @@ export interface CheckboxGroupProps {
|
|
|
73
87
|
error?: string;
|
|
74
88
|
/** The native form field name every option shares. */
|
|
75
89
|
name?: string;
|
|
76
|
-
/**
|
|
90
|
+
/**
|
|
91
|
+
* Per-part classes, appended to the part's own (a consumer class wins by cascade layer). The
|
|
92
|
+
* root (the `<fieldset>`) is styled with `class`.
|
|
93
|
+
*/
|
|
77
94
|
classes?: Partial<Record<CheckboxGroupPart, string>>;
|
|
78
95
|
}
|
|
@@ -18,15 +18,12 @@ declare const __VLS_base: import('vue').DefineComponent<ChipProps, {}, {}, {}, {
|
|
|
18
18
|
onRemove?: (() => any) | undefined;
|
|
19
19
|
"onUpdate:selected"?: ((selected: boolean) => any) | undefined;
|
|
20
20
|
}>, {
|
|
21
|
-
size: ChipSize;
|
|
22
21
|
value: string;
|
|
22
|
+
size: ChipSize;
|
|
23
23
|
classes: Partial<Record<import('./types.js').ChipPart, string>>;
|
|
24
24
|
icon: import('../../index.js').IconComponent;
|
|
25
25
|
selected: boolean;
|
|
26
26
|
disabled: boolean;
|
|
27
|
-
avatar: string | import('../../index.js').ImageMedia | null;
|
|
28
|
-
removable: boolean;
|
|
29
|
-
selectable: boolean;
|
|
30
27
|
messages: Partial<{
|
|
31
28
|
clear: string;
|
|
32
29
|
close: string;
|
|
@@ -45,6 +42,7 @@ declare const __VLS_base: import('vue').DefineComponent<ChipProps, {}, {}, {}, {
|
|
|
45
42
|
noResults: string;
|
|
46
43
|
noResultsFor: (query: string) => string;
|
|
47
44
|
noMatchesFor: (query: string) => string;
|
|
45
|
+
createOption: (query: string) => string;
|
|
48
46
|
moreSelected: (n: number) => string;
|
|
49
47
|
removeTag: (label: string) => string;
|
|
50
48
|
selected: string;
|
|
@@ -176,6 +174,9 @@ declare const __VLS_base: import('vue').DefineComponent<ChipProps, {}, {}, {}, {
|
|
|
176
174
|
formPendingTitle: string;
|
|
177
175
|
formPendingMessage: string;
|
|
178
176
|
}>;
|
|
177
|
+
avatar: string | import('../../index.js').ImageMedia | null;
|
|
178
|
+
removable: boolean;
|
|
179
|
+
selectable: boolean;
|
|
179
180
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
180
181
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
181
182
|
declare const _default: typeof __VLS_export;
|
|
@@ -10,7 +10,6 @@ declare const __VLS_base: import('vue').DefineComponent<ChipGroupProps, {}, {},
|
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<ChipGroupProps> & Readonly<{
|
|
11
11
|
"onUpdate:modelValue"?: ((values: string[]) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
|
-
classes: Partial<Record<"root", string>>;
|
|
14
13
|
disabled: boolean;
|
|
15
14
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
15
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
@@ -8,7 +8,7 @@ import { ImageMedia } from '../image/types.js';
|
|
|
8
8
|
* row (`## Multi-select` → Sizes, Tags row), which is also where `Chip`'s `sm` size and its remove
|
|
9
9
|
* button come from directly — see `src/utils/tagRecipe.ts`, shared with `MultiSelect.vue`.
|
|
10
10
|
*/
|
|
11
|
-
export type ChipPart = '
|
|
11
|
+
export type ChipPart = 'icon' | 'avatar' | 'label' | 'removeButton';
|
|
12
12
|
/**
|
|
13
13
|
* `sm` is the exact "small chip" `MultiSelect`'s own tag row draws (1.75rem min height, 0.8125rem
|
|
14
14
|
* text). `md` is this component's own, larger recipe: 2.25rem min height, 0.875rem text — a chip
|
|
@@ -53,7 +53,8 @@ export interface ChipProps {
|
|
|
53
53
|
avatar?: ImageMedia | string | null;
|
|
54
54
|
/** This chip's value inside a `ChipGroup` — see `selected` and `ChipGroup`'s own docs. */
|
|
55
55
|
value?: string;
|
|
56
|
-
/** Per-part
|
|
56
|
+
/** Per-part classes, appended to the kit's own (they win by cascade layer). The root is styled
|
|
57
|
+
* with `class`. */
|
|
57
58
|
classes?: Partial<Record<ChipPart, string>>;
|
|
58
59
|
/**
|
|
59
60
|
* Overrides for the one string this component renders itself: `removeTag`, the remove button's
|
|
@@ -66,8 +67,8 @@ export interface ChipProps {
|
|
|
66
67
|
*/
|
|
67
68
|
messages?: Partial<UiMessages>;
|
|
68
69
|
}
|
|
69
|
-
/**
|
|
70
|
-
export type ChipGroupPart =
|
|
70
|
+
/** ChipGroup has no inner parts: style the group itself with `class`. */
|
|
71
|
+
export type ChipGroupPart = never;
|
|
71
72
|
export interface ChipGroupProps {
|
|
72
73
|
/** The selected chips' values (two-way, `update:modelValue`). */
|
|
73
74
|
modelValue: string[];
|
|
@@ -79,6 +80,4 @@ export interface ChipGroupProps {
|
|
|
79
80
|
ariaLabel: string;
|
|
80
81
|
/** Disables every member `Chip`, in addition to whatever each one says on its own. */
|
|
81
82
|
disabled?: boolean;
|
|
82
|
-
/** Per-part class overrides, merged with `tailwind-merge`. */
|
|
83
|
-
classes?: Partial<Record<ChipGroupPart, string>>;
|
|
84
83
|
}
|
|
@@ -6,7 +6,6 @@ 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<ContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ContainerProps> & Readonly<{}>, {
|
|
9
|
-
classes: Partial<Record<"root", string>>;
|
|
10
9
|
as: string;
|
|
11
10
|
width: ContainerWidth;
|
|
12
11
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** The spec's four content widths (spec "Container and section" → Sizes). */
|
|
2
2
|
export type ContainerWidth = 'narrow' | 'content' | 'wide' | 'full';
|
|
3
|
-
/** The parts a consumer can restyle through `classes`. Container has only the one. */
|
|
4
|
-
export type ContainerPart = 'root';
|
|
5
3
|
export interface ContainerProps {
|
|
6
4
|
/**
|
|
7
5
|
* Maximum content width. `narrow` (40rem: FAQ, rich text, newsletter, quote), `content` (64rem:
|
|
@@ -10,8 +8,6 @@ export interface ContainerProps {
|
|
|
10
8
|
* carousel). Defaults to `content`.
|
|
11
9
|
*/
|
|
12
10
|
width?: ContainerWidth;
|
|
13
|
-
/** Per-part class overrides, merged with `tailwind-merge`. */
|
|
14
|
-
classes?: Partial<Record<ContainerPart, string>>;
|
|
15
11
|
/** Render as a different tag instead of a native `<div>` — a `<figure>` around full-bleed media. */
|
|
16
12
|
as?: string;
|
|
17
13
|
}
|