@eldrajs/ui 0.3.6 → 0.3.8
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 +10 -0
- package/LICENSE-country-flag-icons +25 -0
- package/README.md +380 -79
- package/dist/PhoneInput-CYGpERg4.js +749 -0
- package/dist/{VariantPicker-BB-2Cj32.js → VariantPicker-D_Gg80So.js} +163 -2307
- package/dist/componentNames.d.ts +1 -1
- package/dist/components/badge/StockBadge.vue.d.ts +1 -1
- package/dist/components/chip/Chip.vue.d.ts +10 -0
- package/dist/components/dialog/Dialog.vue.d.ts +10 -0
- package/dist/components/drawer/Drawer.vue.d.ts +10 -0
- package/dist/components/filter-panel/FilterGroup.vue.d.ts +10 -0
- package/dist/components/filter-panel/FilterPanel.vue.d.ts +10 -0
- package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +10 -0
- package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +10 -0
- package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +10 -0
- package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +10 -0
- package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +10 -0
- package/dist/components/lightbox/Lightbox.vue.d.ts +10 -0
- package/dist/components/nav-menu/NavMenu.vue.d.ts +10 -0
- package/dist/components/notice/Notice.vue.d.ts +28 -0
- package/dist/components/notice/types.d.ts +38 -0
- package/dist/components/pagination/Pagination.vue.d.ts +10 -0
- package/dist/components/price/Price.vue.d.ts +1 -1
- package/dist/components/product-card/ProductCard.vue.d.ts +1 -1
- package/dist/components/radio/RadioGroup.vue.d.ts +4 -0
- package/dist/components/radio/recipes.d.ts +4 -2
- package/dist/components/radio/types.d.ts +8 -1
- package/dist/components/range-slider/RangeSlider.vue.d.ts +10 -0
- package/dist/components/search-bar/SearchBar.vue.d.ts +10 -0
- package/dist/components/search-modal/SearchModal.vue.d.ts +10 -0
- package/dist/components/select/MultiSelect.vue.d.ts +10 -0
- package/dist/components/select/Select.vue.d.ts +10 -0
- package/dist/components/site-form/SiteForm.vue.d.ts +10 -0
- package/dist/components/spinner/Spinner.vue.d.ts +4 -1
- package/dist/components/spinner/types.d.ts +9 -0
- package/dist/components/step-indicator/StepIndicator.vue.d.ts +7 -0
- package/dist/components/step-indicator/types.d.ts +30 -0
- package/dist/components/toast/Toast.vue.d.ts +10 -0
- package/dist/components/toast/Toaster.vue.d.ts +10 -0
- package/dist/components.css +153 -0
- package/dist/icons/paths.d.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +621 -302
- package/dist/messages/en-US.d.ts +27 -0
- package/dist/messages/is-IS.js +11 -1
- package/dist/phone/PhoneFlag.vue.d.ts +6 -0
- package/dist/phone/PhoneInput.vue.d.ts +220 -0
- package/dist/phone/caret.d.ts +14 -0
- package/dist/phone/examples.d.ts +2 -0
- package/dist/phone/flags.d.ts +8 -0
- package/dist/phone/index.d.ts +13 -0
- package/dist/phone/phone.d.ts +62 -0
- package/dist/phone/phoneFlagData.d.ts +2 -0
- package/dist/phone/rule.d.ts +22 -0
- package/dist/phone/types.d.ts +63 -0
- package/dist/phone/vee-validate/FieldPhoneInput.vue.d.ts +24 -0
- package/dist/phone/vee-validate/index.d.ts +3 -0
- package/dist/phone/vee-validate/types.d.ts +3 -0
- package/dist/phone/vee-validate.js +96 -0
- package/dist/phone.js +1 -0
- package/dist/phoneFlagData-D9dDT2uC.js +261 -0
- package/dist/resolver.d.ts +9 -2
- package/dist/resolver.js +18 -4
- package/dist/style.css +153 -0
- package/dist/useFieldControl-D_b9SC9s.js +273 -0
- package/dist/{useMessages-B5nzZghs.js → useMessages-DQQPh1P_.js} +28 -1
- package/dist/usePopover-4CQR2hB5.js +2228 -0
- package/dist/utilities.css +37 -0
- package/dist/vee-validate/FieldCheckbox.vue.d.ts +5 -1
- package/dist/vee-validate/FieldCheckboxGroup.vue.d.ts +5 -1
- package/dist/vee-validate/FieldCurrencyInput.vue.d.ts +5 -1
- package/dist/vee-validate/FieldInput.vue.d.ts +5 -1
- package/dist/vee-validate/FieldMultiSelect.vue.d.ts +5 -1
- package/dist/vee-validate/FieldQuantityStepper.vue.d.ts +5 -1
- package/dist/vee-validate/FieldRadioGroup.vue.d.ts +5 -1
- package/dist/vee-validate/FieldSearchBar.vue.d.ts +5 -1
- package/dist/vee-validate/FieldSelect.vue.d.ts +5 -1
- package/dist/vee-validate/FieldSwitch.vue.d.ts +5 -1
- package/dist/vee-validate/FieldTextarea.vue.d.ts +5 -1
- package/dist/vee-validate/FieldUnitInput.vue.d.ts +5 -1
- package/dist/vee-validate/FieldVariantPicker.vue.d.ts +5 -1
- package/dist/vee-validate/context.d.ts +32 -7
- package/dist/vee-validate/index.d.ts +8 -5
- package/dist/vee-validate/types.d.ts +26 -0
- package/dist/vee-validate/useFieldControl.d.ts +59 -10
- package/dist/vee-validate.js +114 -197
- package/dist/vue-i18n.js +4 -1
- package/package.json +20 -3
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", "Radio", "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", "Notice", "Pagination", "Popover", "Price", "ProductCard", "QuantityStepper", "Radio", "RadioGroup", "RangeSlider", "Rating", "SearchBar", "SearchModal", "Section", "Select", "SiteForm", "Skeleton", "Spinner", "StepIndicator", "StockBadge", "Switch", "Tab", "TabPanel", "TablerIcon", "Tabs", "Textarea", "Toast", "Toaster", "Tooltip", "UnitInput", "VariantPicker", "VisuallyHidden"];
|
|
19
19
|
export type ComponentName = (typeof componentNames)[number];
|
|
@@ -3,8 +3,8 @@ declare const __VLS_export: import('vue').DefineComponent<StockBadgeProps, {}, {
|
|
|
3
3
|
classes: Partial<Record<import('./types.js').StockBadgePart, string>>;
|
|
4
4
|
quantity: number | null;
|
|
5
5
|
message: string;
|
|
6
|
-
revalidating: boolean;
|
|
7
6
|
announce: boolean;
|
|
7
|
+
revalidating: boolean;
|
|
8
8
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
9
|
declare const _default: typeof __VLS_export;
|
|
10
10
|
export default _default;
|
|
@@ -173,6 +173,16 @@ declare const __VLS_base: import('vue').DefineComponent<ChipProps, {}, {}, {}, {
|
|
|
173
173
|
formSuccessTitle: string;
|
|
174
174
|
formPendingTitle: string;
|
|
175
175
|
formPendingMessage: string;
|
|
176
|
+
stepCompleted: string;
|
|
177
|
+
stepNotStarted: string;
|
|
178
|
+
phoneCountry: (name: string, code: string) => string;
|
|
179
|
+
phoneCountryList: string;
|
|
180
|
+
phoneSearch: string;
|
|
181
|
+
phoneSuggested: string;
|
|
182
|
+
phoneAllCountries: string;
|
|
183
|
+
phoneNoMatch: (query: string) => string;
|
|
184
|
+
phoneInvalid: (country: string) => string;
|
|
185
|
+
phoneInvalidNumber: string;
|
|
176
186
|
}>;
|
|
177
187
|
avatar: string | import('../../index.js').ImageMedia | null;
|
|
178
188
|
removable: boolean;
|
|
@@ -173,6 +173,16 @@ declare const __VLS_base: import('vue').DefineComponent<DialogProps, {
|
|
|
173
173
|
formSuccessTitle: string;
|
|
174
174
|
formPendingTitle: string;
|
|
175
175
|
formPendingMessage: string;
|
|
176
|
+
stepCompleted: string;
|
|
177
|
+
stepNotStarted: string;
|
|
178
|
+
phoneCountry: (name: string, code: string) => string;
|
|
179
|
+
phoneCountryList: string;
|
|
180
|
+
phoneSearch: string;
|
|
181
|
+
phoneSuggested: string;
|
|
182
|
+
phoneAllCountries: string;
|
|
183
|
+
phoneNoMatch: (query: string) => string;
|
|
184
|
+
phoneInvalid: (country: string) => string;
|
|
185
|
+
phoneInvalidNumber: string;
|
|
176
186
|
}>;
|
|
177
187
|
description: string;
|
|
178
188
|
dismissable: boolean;
|
|
@@ -175,6 +175,16 @@ declare const __VLS_base: import('vue').DefineComponent<DrawerProps, {
|
|
|
175
175
|
formSuccessTitle: string;
|
|
176
176
|
formPendingTitle: string;
|
|
177
177
|
formPendingMessage: string;
|
|
178
|
+
stepCompleted: string;
|
|
179
|
+
stepNotStarted: string;
|
|
180
|
+
phoneCountry: (name: string, code: string) => string;
|
|
181
|
+
phoneCountryList: string;
|
|
182
|
+
phoneSearch: string;
|
|
183
|
+
phoneSuggested: string;
|
|
184
|
+
phoneAllCountries: string;
|
|
185
|
+
phoneNoMatch: (query: string) => string;
|
|
186
|
+
phoneInvalid: (country: string) => string;
|
|
187
|
+
phoneInvalidNumber: string;
|
|
178
188
|
}>;
|
|
179
189
|
width: string;
|
|
180
190
|
side: import('./types.js').DrawerSide;
|
|
@@ -185,6 +185,16 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
|
|
|
185
185
|
formSuccessTitle: string;
|
|
186
186
|
formPendingTitle: string;
|
|
187
187
|
formPendingMessage: string;
|
|
188
|
+
stepCompleted: string;
|
|
189
|
+
stepNotStarted: string;
|
|
190
|
+
phoneCountry: (name: string, code: string) => string;
|
|
191
|
+
phoneCountryList: string;
|
|
192
|
+
phoneSearch: string;
|
|
193
|
+
phoneSuggested: string;
|
|
194
|
+
phoneAllCountries: string;
|
|
195
|
+
phoneNoMatch: (query: string) => string;
|
|
196
|
+
phoneInvalid: (country: string) => string;
|
|
197
|
+
phoneInvalidNumber: string;
|
|
188
198
|
}>;
|
|
189
199
|
topRule: boolean;
|
|
190
200
|
escCollapses: boolean;
|
|
@@ -206,6 +206,16 @@ declare const __VLS_base: import('vue').DefineComponent<FilterPanelProps, {
|
|
|
206
206
|
formSuccessTitle: string;
|
|
207
207
|
formPendingTitle: string;
|
|
208
208
|
formPendingMessage: string;
|
|
209
|
+
stepCompleted: string;
|
|
210
|
+
stepNotStarted: string;
|
|
211
|
+
phoneCountry: (name: string, code: string) => string;
|
|
212
|
+
phoneCountryList: string;
|
|
213
|
+
phoneSearch: string;
|
|
214
|
+
phoneSuggested: string;
|
|
215
|
+
phoneAllCountries: string;
|
|
216
|
+
phoneNoMatch: (query: string) => string;
|
|
217
|
+
phoneInvalid: (country: string) => string;
|
|
218
|
+
phoneInvalidNumber: string;
|
|
209
219
|
}>;
|
|
210
220
|
currency: string;
|
|
211
221
|
idPrefix: string;
|
|
@@ -154,6 +154,16 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
|
|
|
154
154
|
formSuccessTitle: string;
|
|
155
155
|
formPendingTitle: string;
|
|
156
156
|
formPendingMessage: string;
|
|
157
|
+
stepCompleted: string;
|
|
158
|
+
stepNotStarted: string;
|
|
159
|
+
phoneCountry: (name: string, code: string) => string;
|
|
160
|
+
phoneCountryList: string;
|
|
161
|
+
phoneSearch: string;
|
|
162
|
+
phoneSuggested: string;
|
|
163
|
+
phoneAllCountries: string;
|
|
164
|
+
phoneNoMatch: (query: string) => string;
|
|
165
|
+
phoneInvalid: (country: string) => string;
|
|
166
|
+
phoneInvalidNumber: string;
|
|
157
167
|
}>;
|
|
158
168
|
dense: boolean;
|
|
159
169
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -154,6 +154,16 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
|
|
|
154
154
|
formSuccessTitle: string;
|
|
155
155
|
formPendingTitle: string;
|
|
156
156
|
formPendingMessage: string;
|
|
157
|
+
stepCompleted: string;
|
|
158
|
+
stepNotStarted: string;
|
|
159
|
+
phoneCountry: (name: string, code: string) => string;
|
|
160
|
+
phoneCountryList: string;
|
|
161
|
+
phoneSearch: string;
|
|
162
|
+
phoneSuggested: string;
|
|
163
|
+
phoneAllCountries: string;
|
|
164
|
+
phoneNoMatch: (query: string) => string;
|
|
165
|
+
phoneInvalid: (country: string) => string;
|
|
166
|
+
phoneInvalidNumber: string;
|
|
157
167
|
}>;
|
|
158
168
|
dense: boolean;
|
|
159
169
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -161,6 +161,16 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {
|
|
|
161
161
|
formSuccessTitle: string;
|
|
162
162
|
formPendingTitle: string;
|
|
163
163
|
formPendingMessage: string;
|
|
164
|
+
stepCompleted: string;
|
|
165
|
+
stepNotStarted: string;
|
|
166
|
+
phoneCountry: (name: string, code: string) => string;
|
|
167
|
+
phoneCountryList: string;
|
|
168
|
+
phoneSearch: string;
|
|
169
|
+
phoneSuggested: string;
|
|
170
|
+
phoneAllCountries: string;
|
|
171
|
+
phoneNoMatch: (query: string) => string;
|
|
172
|
+
phoneInvalid: (country: string) => string;
|
|
173
|
+
phoneInvalidNumber: string;
|
|
164
174
|
}>;
|
|
165
175
|
currency: string;
|
|
166
176
|
dense: boolean;
|
|
@@ -154,6 +154,16 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
|
|
|
154
154
|
formSuccessTitle: string;
|
|
155
155
|
formPendingTitle: string;
|
|
156
156
|
formPendingMessage: string;
|
|
157
|
+
stepCompleted: string;
|
|
158
|
+
stepNotStarted: string;
|
|
159
|
+
phoneCountry: (name: string, code: string) => string;
|
|
160
|
+
phoneCountryList: string;
|
|
161
|
+
phoneSearch: string;
|
|
162
|
+
phoneSuggested: string;
|
|
163
|
+
phoneAllCountries: string;
|
|
164
|
+
phoneNoMatch: (query: string) => string;
|
|
165
|
+
phoneInvalid: (country: string) => string;
|
|
166
|
+
phoneInvalidNumber: string;
|
|
157
167
|
}>;
|
|
158
168
|
dense: boolean;
|
|
159
169
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -154,6 +154,16 @@ declare const __VLS_export: import('vue').DefineComponent<FacetProps, {}, {}, {}
|
|
|
154
154
|
formSuccessTitle: string;
|
|
155
155
|
formPendingTitle: string;
|
|
156
156
|
formPendingMessage: string;
|
|
157
|
+
stepCompleted: string;
|
|
158
|
+
stepNotStarted: string;
|
|
159
|
+
phoneCountry: (name: string, code: string) => string;
|
|
160
|
+
phoneCountryList: string;
|
|
161
|
+
phoneSearch: string;
|
|
162
|
+
phoneSuggested: string;
|
|
163
|
+
phoneAllCountries: string;
|
|
164
|
+
phoneNoMatch: (query: string) => string;
|
|
165
|
+
phoneInvalid: (country: string) => string;
|
|
166
|
+
phoneInvalidNumber: string;
|
|
157
167
|
}>;
|
|
158
168
|
dense: boolean;
|
|
159
169
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -161,6 +161,16 @@ declare const __VLS_export: import('vue').DefineComponent<LightboxProps, {
|
|
|
161
161
|
formSuccessTitle: string;
|
|
162
162
|
formPendingTitle: string;
|
|
163
163
|
formPendingMessage: string;
|
|
164
|
+
stepCompleted: string;
|
|
165
|
+
stepNotStarted: string;
|
|
166
|
+
phoneCountry: (name: string, code: string) => string;
|
|
167
|
+
phoneCountryList: string;
|
|
168
|
+
phoneSearch: string;
|
|
169
|
+
phoneSuggested: string;
|
|
170
|
+
phoneAllCountries: string;
|
|
171
|
+
phoneNoMatch: (query: string) => string;
|
|
172
|
+
phoneInvalid: (country: string) => string;
|
|
173
|
+
phoneInvalidNumber: string;
|
|
164
174
|
}>;
|
|
165
175
|
thumbnails: boolean;
|
|
166
176
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -193,6 +193,16 @@ declare const __VLS_base: import('vue').DefineComponent<NavMenuProps, {
|
|
|
193
193
|
formSuccessTitle: string;
|
|
194
194
|
formPendingTitle: string;
|
|
195
195
|
formPendingMessage: string;
|
|
196
|
+
stepCompleted: string;
|
|
197
|
+
stepNotStarted: string;
|
|
198
|
+
phoneCountry: (name: string, code: string) => string;
|
|
199
|
+
phoneCountryList: string;
|
|
200
|
+
phoneSearch: string;
|
|
201
|
+
phoneSuggested: string;
|
|
202
|
+
phoneAllCountries: string;
|
|
203
|
+
phoneNoMatch: (query: string) => string;
|
|
204
|
+
phoneInvalid: (country: string) => string;
|
|
205
|
+
phoneInvalidNumber: string;
|
|
196
206
|
}>;
|
|
197
207
|
drawerOpen: boolean;
|
|
198
208
|
collapseBelow: NavMenuCollapse;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NoticeProps, NoticeTone } from './types.js';
|
|
2
|
+
declare const __VLS_template: () => {
|
|
3
|
+
__VLS_Slots: {
|
|
4
|
+
title?: (props: {}) => any;
|
|
5
|
+
} & {
|
|
6
|
+
default?: (props: {}) => any;
|
|
7
|
+
} & {
|
|
8
|
+
actions?: (props: {}) => any;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type __VLS_Slots = ReturnType<typeof __VLS_template>['__VLS_Slots'];
|
|
12
|
+
declare const __VLS_base: import('vue').DefineComponent<NoticeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NoticeProps> & Readonly<{}>, {
|
|
13
|
+
title: string;
|
|
14
|
+
text: string;
|
|
15
|
+
headingLevel: import('../../index.js').HeadingLevel;
|
|
16
|
+
classes: Partial<Record<import('./types.js').NoticePart, string>>;
|
|
17
|
+
icon: import('../../index.js').IconComponent | null;
|
|
18
|
+
tone: NoticeTone;
|
|
19
|
+
announce: boolean;
|
|
20
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { HeadingLevel } from '../../composables/useHeadingTag.js';
|
|
2
|
+
import { IconComponent } from '../icon/types.js';
|
|
3
|
+
/**
|
|
4
|
+
* What kind of news the notice is. `info` (the default) is neutral guidance; `success`, `warning`
|
|
5
|
+
* and `danger` each bring their own colour and default icon. The same four names `Toast`'s
|
|
6
|
+
* `variant` takes.
|
|
7
|
+
*/
|
|
8
|
+
export type NoticeTone = 'info' | 'success' | 'warning' | 'danger';
|
|
9
|
+
/** The parts a consumer can restyle through `classes`. The root is styled with `class`. */
|
|
10
|
+
export type NoticePart = 'icon' | 'content' | 'title' | 'text' | 'actions';
|
|
11
|
+
export interface NoticeProps {
|
|
12
|
+
/** Colour, default icon and live-region role. Also on the root as `data-tone`. */
|
|
13
|
+
tone?: NoticeTone;
|
|
14
|
+
/** An optional heading line. The `title` slot overrides it. */
|
|
15
|
+
title?: string;
|
|
16
|
+
/** The message. The default slot overrides it, for a body with links or more than one paragraph. */
|
|
17
|
+
text?: string;
|
|
18
|
+
/**
|
|
19
|
+
* The leading icon, decorative (`aria-hidden`). Left out, the tone's own icon is drawn
|
|
20
|
+
* (`info-circle`, `circle-check`, `alert-triangle`, `alert-circle`); `null` draws none. A
|
|
21
|
+
* `success`, `warning` or `danger` notice should keep one, so colour is never the only signal.
|
|
22
|
+
*/
|
|
23
|
+
icon?: IconComponent | null;
|
|
24
|
+
/**
|
|
25
|
+
* Renders the title as a heading of this level instead of a `<p>`, for a notice that opens a
|
|
26
|
+
* part of the page ("Thank you for your order"). Left out, the title is not a heading.
|
|
27
|
+
*/
|
|
28
|
+
headingLevel?: HeadingLevel;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the notice is a live region: `role="status"` (polite) for `info`, `success` and
|
|
31
|
+
* `warning`, `role="alert"` (assertive) for `danger`. `true` by default, so a notice that
|
|
32
|
+
* appears after the page has loaded is announced. Set it to `false` for a notice inside an
|
|
33
|
+
* element that is already a live region, or one that is plain page content from the start.
|
|
34
|
+
*/
|
|
35
|
+
announce?: boolean;
|
|
36
|
+
/** Per-part classes, appended to the part's own (they win by cascade layer). */
|
|
37
|
+
classes?: Partial<Record<NoticePart, string>>;
|
|
38
|
+
}
|
|
@@ -157,6 +157,16 @@ declare const __VLS_export: import('vue').DefineComponent<PaginationProps, {}, {
|
|
|
157
157
|
formSuccessTitle: string;
|
|
158
158
|
formPendingTitle: string;
|
|
159
159
|
formPendingMessage: string;
|
|
160
|
+
stepCompleted: string;
|
|
161
|
+
stepNotStarted: string;
|
|
162
|
+
phoneCountry: (name: string, code: string) => string;
|
|
163
|
+
phoneCountryList: string;
|
|
164
|
+
phoneSearch: string;
|
|
165
|
+
phoneSuggested: string;
|
|
166
|
+
phoneAllCountries: string;
|
|
167
|
+
phoneNoMatch: (query: string) => string;
|
|
168
|
+
phoneInvalid: (country: string) => string;
|
|
169
|
+
phoneInvalidNumber: string;
|
|
160
170
|
}>;
|
|
161
171
|
compact: boolean;
|
|
162
172
|
siblings: number;
|
|
@@ -8,6 +8,7 @@ declare const __VLS_export: import('vue').DefineComponent<PriceProps, {}, {}, {}
|
|
|
8
8
|
locale: string;
|
|
9
9
|
currency: string;
|
|
10
10
|
narrowSymbol: boolean;
|
|
11
|
+
announce: boolean;
|
|
11
12
|
compareAt: number | null;
|
|
12
13
|
unitPrice: {
|
|
13
14
|
amount: number;
|
|
@@ -19,7 +20,6 @@ declare const __VLS_export: import('vue').DefineComponent<PriceProps, {}, {}, {}
|
|
|
19
20
|
from: string;
|
|
20
21
|
}>;
|
|
21
22
|
revalidating: boolean;
|
|
22
|
-
announce: boolean;
|
|
23
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
24
24
|
declare const _default: typeof __VLS_export;
|
|
25
25
|
export default _default;
|
|
@@ -12,8 +12,8 @@ declare const __VLS_export: import('vue').DefineComponent<ProductCardProps, {},
|
|
|
12
12
|
locale: string;
|
|
13
13
|
ratio: import('./types.js').ProductCardRatio;
|
|
14
14
|
currency: string;
|
|
15
|
-
revalidating: boolean;
|
|
16
15
|
announce: boolean;
|
|
16
|
+
revalidating: boolean;
|
|
17
17
|
showVendor: boolean;
|
|
18
18
|
showRating: boolean;
|
|
19
19
|
showSwatches: boolean;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { RadioGroupOption, RadioGroupProps, RadioGroupSize } from './types.js';
|
|
2
2
|
declare const __VLS_template: () => {
|
|
3
3
|
__VLS_Slots: {
|
|
4
|
+
leading?: (props: {
|
|
5
|
+
option: RadioGroupOption;
|
|
6
|
+
}) => any;
|
|
7
|
+
} & {
|
|
4
8
|
label?: (props: {
|
|
5
9
|
option: RadioGroupOption;
|
|
6
10
|
}) => any;
|
|
@@ -37,5 +37,7 @@ export declare const INPUT = "eldra:absolute eldra:inset-0 eldra:m-0 eldra:size-
|
|
|
37
37
|
* `text-card-title` utility (see `tailwind.css`) already give those numbers.
|
|
38
38
|
*/
|
|
39
39
|
export declare function labelRecipe(card: boolean, disabled: boolean | undefined): string[];
|
|
40
|
-
/** Spec "Radio group" → Sizes: the hint is `muted` in every layout
|
|
41
|
-
export declare const
|
|
40
|
+
/** Spec "Radio group" → Sizes: the hint is `muted` in every layout. */
|
|
41
|
+
export declare const HINT_TEXT = "eldra:text-body-sm eldra:text-muted eldra:min-w-0";
|
|
42
|
+
/** The hint under the label's column: column 2, after the radio. */
|
|
43
|
+
export declare const HINT = "eldra:text-body-sm eldra:text-muted eldra:min-w-0 eldra:col-start-2";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { IconComponent } from '../icon/types.js';
|
|
1
2
|
/** The parts a consumer can restyle through `classes`, named as the spec's anatomy names them. */
|
|
2
|
-
export type RadioGroupPart = 'legend' | 'requiredMark' | 'options' | 'option' | 'radio' | 'input' | 'dot' | 'label' | 'hint' | 'meta' | 'help' | 'error' | 'errorIcon';
|
|
3
|
+
export type RadioGroupPart = 'legend' | 'requiredMark' | 'options' | 'option' | 'radio' | 'leading' | 'input' | 'dot' | 'label' | 'hint' | 'meta' | 'help' | 'error' | 'errorIcon';
|
|
3
4
|
/** The spec's two radio sizes: 1.125rem or 1.5rem. Plain layouts only — a card's radio is fixed. */
|
|
4
5
|
export type RadioGroupSize = 'md' | 'lg';
|
|
5
6
|
/** `vertical` (default), `row` (wraps, for short labels) or `cards` (the whole option is a card). */
|
|
@@ -14,6 +15,12 @@ export interface RadioGroupOption {
|
|
|
14
15
|
hint?: string;
|
|
15
16
|
/** Cards only: a price or note, end-aligned, tabular numerals ("Free", "$12.00"). */
|
|
16
17
|
meta?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Cards only: a decorative icon between the radio and the title (a truck, a credit card), drawn
|
|
20
|
+
* at 1.25rem and hidden from assistive technology. For a logo or any other image, use the
|
|
21
|
+
* `leading` slot instead.
|
|
22
|
+
*/
|
|
23
|
+
icon?: IconComponent;
|
|
17
24
|
/** Native `disabled` for this option alone. Say why in `hint`. */
|
|
18
25
|
disabled?: boolean;
|
|
19
26
|
/**
|
|
@@ -177,6 +177,16 @@ declare const __VLS_base: import('vue').DefineComponent<RangeSliderProps, {}, {}
|
|
|
177
177
|
formSuccessTitle: string;
|
|
178
178
|
formPendingTitle: string;
|
|
179
179
|
formPendingMessage: string;
|
|
180
|
+
stepCompleted: string;
|
|
181
|
+
stepNotStarted: string;
|
|
182
|
+
phoneCountry: (name: string, code: string) => string;
|
|
183
|
+
phoneCountryList: string;
|
|
184
|
+
phoneSearch: string;
|
|
185
|
+
phoneSuggested: string;
|
|
186
|
+
phoneAllCountries: string;
|
|
187
|
+
phoneNoMatch: (query: string) => string;
|
|
188
|
+
phoneInvalid: (country: string) => string;
|
|
189
|
+
phoneInvalidNumber: string;
|
|
180
190
|
}>;
|
|
181
191
|
min: number;
|
|
182
192
|
formatValue: (value: number, end?: RangeSliderEnd) => string;
|
|
@@ -179,6 +179,16 @@ declare const __VLS_base: import('vue').DefineComponent<SearchBarProps, {}, {},
|
|
|
179
179
|
formSuccessTitle: string;
|
|
180
180
|
formPendingTitle: string;
|
|
181
181
|
formPendingMessage: string;
|
|
182
|
+
stepCompleted: string;
|
|
183
|
+
stepNotStarted: string;
|
|
184
|
+
phoneCountry: (name: string, code: string) => string;
|
|
185
|
+
phoneCountryList: string;
|
|
186
|
+
phoneSearch: string;
|
|
187
|
+
phoneSuggested: string;
|
|
188
|
+
phoneAllCountries: string;
|
|
189
|
+
phoneNoMatch: (query: string) => string;
|
|
190
|
+
phoneInvalid: (country: string) => string;
|
|
191
|
+
phoneInvalidNumber: string;
|
|
182
192
|
}>;
|
|
183
193
|
action: string;
|
|
184
194
|
teleport: string | boolean;
|
|
@@ -185,6 +185,16 @@ declare const __VLS_base: import('vue').DefineComponent<SearchModalProps, {
|
|
|
185
185
|
formSuccessTitle: string;
|
|
186
186
|
formPendingTitle: string;
|
|
187
187
|
formPendingMessage: string;
|
|
188
|
+
stepCompleted: string;
|
|
189
|
+
stepNotStarted: string;
|
|
190
|
+
phoneCountry: (name: string, code: string) => string;
|
|
191
|
+
phoneCountryList: string;
|
|
192
|
+
phoneSearch: string;
|
|
193
|
+
phoneSuggested: string;
|
|
194
|
+
phoneAllCountries: string;
|
|
195
|
+
phoneNoMatch: (query: string) => string;
|
|
196
|
+
phoneInvalid: (country: string) => string;
|
|
197
|
+
phoneInvalidNumber: string;
|
|
188
198
|
}>;
|
|
189
199
|
action: string;
|
|
190
200
|
query: string;
|
|
@@ -236,6 +236,16 @@ declare const __VLS_base: import('vue').DefineComponent<MultiSelectProps, {}, {}
|
|
|
236
236
|
formSuccessTitle: string;
|
|
237
237
|
formPendingTitle: string;
|
|
238
238
|
formPendingMessage: string;
|
|
239
|
+
stepCompleted: string;
|
|
240
|
+
stepNotStarted: string;
|
|
241
|
+
phoneCountry: (name: string, code: string) => string;
|
|
242
|
+
phoneCountryList: string;
|
|
243
|
+
phoneSearch: string;
|
|
244
|
+
phoneSuggested: string;
|
|
245
|
+
phoneAllCountries: string;
|
|
246
|
+
phoneNoMatch: (query: string) => string;
|
|
247
|
+
phoneInvalid: (country: string) => string;
|
|
248
|
+
phoneInvalidNumber: string;
|
|
239
249
|
}>;
|
|
240
250
|
readonly: boolean;
|
|
241
251
|
searchable: boolean;
|
|
@@ -207,6 +207,16 @@ declare const __VLS_base: import('vue').DefineComponent<SelectProps, {}, {}, {},
|
|
|
207
207
|
formSuccessTitle: string;
|
|
208
208
|
formPendingTitle: string;
|
|
209
209
|
formPendingMessage: string;
|
|
210
|
+
stepCompleted: string;
|
|
211
|
+
stepNotStarted: string;
|
|
212
|
+
phoneCountry: (name: string, code: string) => string;
|
|
213
|
+
phoneCountryList: string;
|
|
214
|
+
phoneSearch: string;
|
|
215
|
+
phoneSuggested: string;
|
|
216
|
+
phoneAllCountries: string;
|
|
217
|
+
phoneNoMatch: (query: string) => string;
|
|
218
|
+
phoneInvalid: (country: string) => string;
|
|
219
|
+
phoneInvalidNumber: string;
|
|
210
220
|
}>;
|
|
211
221
|
clearable: boolean;
|
|
212
222
|
readonly: boolean;
|
|
@@ -172,6 +172,16 @@ declare const __VLS_base: import('vue').DefineComponent<SiteFormProps, {}, {}, {
|
|
|
172
172
|
formSuccessTitle: string;
|
|
173
173
|
formPendingTitle: string;
|
|
174
174
|
formPendingMessage: string;
|
|
175
|
+
stepCompleted: string;
|
|
176
|
+
stepNotStarted: string;
|
|
177
|
+
phoneCountry: (name: string, code: string) => string;
|
|
178
|
+
phoneCountryList: string;
|
|
179
|
+
phoneSearch: string;
|
|
180
|
+
phoneSuggested: string;
|
|
181
|
+
phoneAllCountries: string;
|
|
182
|
+
phoneNoMatch: (query: string) => string;
|
|
183
|
+
phoneInvalid: (country: string) => string;
|
|
184
|
+
phoneInvalidNumber: string;
|
|
175
185
|
}>;
|
|
176
186
|
layout: import('./types.js').SiteFormLayout;
|
|
177
187
|
heading: string;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { SpinnerProps } from './types.js';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<SpinnerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SpinnerProps> & Readonly<{}>, {
|
|
3
|
+
label: string;
|
|
4
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
2
5
|
declare const _default: typeof __VLS_export;
|
|
3
6
|
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface SpinnerProps {
|
|
2
|
+
/**
|
|
3
|
+
* An accessible name ("Loading", "Confirming your payment"). Give it only when nothing around
|
|
4
|
+
* the spinner already says what is happening: without it the spinner is decorative and hidden
|
|
5
|
+
* from assistive technology, which is right inside a region that is itself `aria-busy` or a
|
|
6
|
+
* live region. With it the spinner is `role="img"` — a name, never an announcement.
|
|
7
|
+
*/
|
|
8
|
+
label?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { StepIndicatorProps } from './types.js';
|
|
2
|
+
declare const __VLS_export: import('vue').DefineComponent<StepIndicatorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<StepIndicatorProps> & Readonly<{}>, {
|
|
3
|
+
classes: Partial<Record<import('./types.js').StepIndicatorPart, string>>;
|
|
4
|
+
orientation: import('./types.js').StepIndicatorOrientation;
|
|
5
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** One step of a `StepIndicator`. */
|
|
2
|
+
export interface StepIndicatorStep {
|
|
3
|
+
/** The step's name ("Packed"). */
|
|
4
|
+
label: string;
|
|
5
|
+
/** A secondary line under the label: a date, a place, a short note. */
|
|
6
|
+
description?: string;
|
|
7
|
+
}
|
|
8
|
+
/** `horizontal` (the default) lays the steps out in equal columns; `vertical` stacks them. */
|
|
9
|
+
export type StepIndicatorOrientation = 'horizontal' | 'vertical';
|
|
10
|
+
/** Where a step stands against `current`. Also on each step as `data-state`. */
|
|
11
|
+
export type StepIndicatorState = 'done' | 'current' | 'upcoming';
|
|
12
|
+
/**
|
|
13
|
+
* The parts a consumer can restyle through `classes`. The root (the `<ol>`) is styled with
|
|
14
|
+
* `class`. `status` is the visually hidden "(completed)" / "(not started)" after a label.
|
|
15
|
+
*/
|
|
16
|
+
export type StepIndicatorPart = 'step' | 'marker' | 'content' | 'label' | 'labelIcon' | 'status' | 'description';
|
|
17
|
+
export interface StepIndicatorProps {
|
|
18
|
+
/** The steps, in order. */
|
|
19
|
+
steps: StepIndicatorStep[];
|
|
20
|
+
/**
|
|
21
|
+
* The index of the current step, from 0. Every step before it is done and every step after it
|
|
22
|
+
* is upcoming. `steps.length` (or more) marks every step done, with none current; a negative
|
|
23
|
+
* number marks every step upcoming.
|
|
24
|
+
*/
|
|
25
|
+
current: number;
|
|
26
|
+
/** `horizontal` (default) or `vertical`. Also on the root as `data-orientation`. */
|
|
27
|
+
orientation?: StepIndicatorOrientation;
|
|
28
|
+
/** Per-part classes, appended to the part's own (they win by cascade layer). */
|
|
29
|
+
classes?: Partial<Record<StepIndicatorPart, string>>;
|
|
30
|
+
}
|
|
@@ -158,6 +158,16 @@ declare const __VLS_export: import('vue').DefineComponent<ToastProps, {}, {}, {}
|
|
|
158
158
|
formSuccessTitle: string;
|
|
159
159
|
formPendingTitle: string;
|
|
160
160
|
formPendingMessage: string;
|
|
161
|
+
stepCompleted: string;
|
|
162
|
+
stepNotStarted: string;
|
|
163
|
+
phoneCountry: (name: string, code: string) => string;
|
|
164
|
+
phoneCountryList: string;
|
|
165
|
+
phoneSearch: string;
|
|
166
|
+
phoneSuggested: string;
|
|
167
|
+
phoneAllCountries: string;
|
|
168
|
+
phoneNoMatch: (query: string) => string;
|
|
169
|
+
phoneInvalid: (country: string) => string;
|
|
170
|
+
phoneInvalidNumber: string;
|
|
161
171
|
}>;
|
|
162
172
|
action: import('./types.js').ToastAction;
|
|
163
173
|
closable: boolean;
|
|
@@ -157,6 +157,16 @@ declare const __VLS_export: import('vue').DefineComponent<ToasterProps, {}, {},
|
|
|
157
157
|
formSuccessTitle: string;
|
|
158
158
|
formPendingTitle: string;
|
|
159
159
|
formPendingMessage: string;
|
|
160
|
+
stepCompleted: string;
|
|
161
|
+
stepNotStarted: string;
|
|
162
|
+
phoneCountry: (name: string, code: string) => string;
|
|
163
|
+
phoneCountryList: string;
|
|
164
|
+
phoneSearch: string;
|
|
165
|
+
phoneSuggested: string;
|
|
166
|
+
phoneAllCountries: string;
|
|
167
|
+
phoneNoMatch: (query: string) => string;
|
|
168
|
+
phoneInvalid: (country: string) => string;
|
|
169
|
+
phoneInvalidNumber: string;
|
|
160
170
|
}>;
|
|
161
171
|
teleportTo: string | HTMLElement;
|
|
162
172
|
toasts: ToasterToast[];
|