@eldrajs/ui 0.3.8 → 0.3.10
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 +5 -0
- package/LICENSE-country-flag-icons +1 -1
- package/README.md +93 -4
- package/dist/CountryFlag-DOa8lOHp.js +71 -0
- package/dist/{PhoneInput-CYGpERg4.js → PhoneInput-BVH32MEg.js} +8 -62
- package/dist/{VariantPicker-D_Gg80So.js → VariantPicker-CKDdeFmV.js} +2962 -2531
- package/dist/componentNames.d.ts +1 -1
- package/dist/components/autocomplete/Autocomplete.vue.d.ts +216 -0
- package/dist/components/autocomplete/types.d.ts +50 -0
- package/dist/components/button/Button.vue.d.ts +4 -4
- package/dist/components/card/ContentCard.vue.d.ts +1 -1
- package/dist/components/carousel/Carousel.vue.d.ts +1 -1
- package/dist/components/checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/components/chip/Chip.vue.d.ts +3 -1
- package/dist/components/container/Container.vue.d.ts +1 -1
- package/dist/components/dialog/Dialog.vue.d.ts +2 -0
- package/dist/components/drawer/Drawer.vue.d.ts +5 -3
- package/dist/components/field-wrapper/FieldWrapper.vue.d.ts +1 -1
- package/dist/components/filter-panel/FilterGroup.vue.d.ts +2 -0
- package/dist/components/filter-panel/FilterPanel.vue.d.ts +6 -4
- package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +2 -0
- package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +2 -0
- package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +3 -1
- package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +2 -0
- package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +2 -0
- package/dist/components/form-layout/FormLayout.vue.d.ts +2 -2
- package/dist/components/image/Image.vue.d.ts +3 -3
- package/dist/components/input/Input.vue.d.ts +7 -7
- package/dist/components/lightbox/Lightbox.vue.d.ts +3 -1
- package/dist/components/nav-menu/NavMenu.vue.d.ts +5 -3
- package/dist/components/pagination/Pagination.vue.d.ts +4 -2
- package/dist/components/popover/Popover.vue.d.ts +3 -3
- package/dist/components/quantity-stepper/QuantityStepper.vue.d.ts +2 -2
- package/dist/components/radio/Radio.vue.d.ts +1 -1
- package/dist/components/range-slider/RangeSlider.vue.d.ts +3 -1
- package/dist/components/search-bar/SearchBar.vue.d.ts +5 -3
- package/dist/components/search-bar/SearchResultsPanel.vue.d.ts +1 -1
- package/dist/components/search-modal/SearchModal.vue.d.ts +4 -2
- package/dist/components/select/MultiSelect.vue.d.ts +13 -10
- package/dist/components/select/Select.vue.d.ts +13 -11
- package/dist/components/select/SelectPanel.vue.d.ts +1 -1
- package/dist/components/select/types.d.ts +7 -1
- package/dist/components/site-form/SiteForm.vue.d.ts +2 -0
- package/dist/components/skeleton/Skeleton.vue.d.ts +1 -1
- package/dist/components/switch/Switch.vue.d.ts +1 -1
- package/dist/components/textarea/Textarea.vue.d.ts +3 -3
- package/dist/components/toast/Toast.vue.d.ts +3 -1
- package/dist/components/toast/Toaster.vue.d.ts +2 -0
- package/dist/components/unit-input/UnitInput.vue.d.ts +6 -6
- package/dist/{phone/PhoneFlag.vue.d.ts → flag/CountryFlag.vue.d.ts} +3 -0
- package/dist/flag/flags.d.ts +8 -0
- package/dist/flag/index.d.ts +9 -0
- package/dist/flag.js +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -4
- package/dist/messages/en-US.d.ts +4 -0
- package/dist/messages/is-IS.js +2 -0
- package/dist/phone/PhoneInput.vue.d.ts +8 -6
- package/dist/phone/index.d.ts +1 -1
- package/dist/phone/vee-validate.js +4 -4
- package/dist/phone.js +3 -1
- package/dist/resolver.d.ts +8 -2
- package/dist/resolver.js +14 -2
- package/dist/useEldraScope-BDbGzt7R.js +32 -0
- package/dist/{useFieldControl-D_b9SC9s.js → useFieldControl-CGH6GEWM.js} +2 -2
- package/dist/{useMessages-DQQPh1P_.js → useMessages-CYnyGVRG.js} +4 -0
- package/dist/{usePopover-4CQR2hB5.js → useOptionList-CPHHDvPF.js} +1477 -1506
- package/dist/vee-validate/FieldAutocomplete.vue.d.ts +20 -0
- package/dist/vee-validate/Form.vue.d.ts +2 -2
- package/dist/vee-validate/index.d.ts +3 -2
- package/dist/vee-validate/types.d.ts +4 -1
- package/dist/vee-validate/useFieldControl.d.ts +1 -1
- package/dist/vee-validate.js +73 -5
- package/dist/vue-i18n.js +1 -1
- package/package.json +6 -2
- package/dist/phone/flags.d.ts +0 -8
package/dist/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import { $ as
|
|
1
|
+
import { $ as FIELD_KEY, A as ICON_STROKE_WIDTH$6, G as FIELD_SEARCH_APPEARANCE, I as FIELD_CLEAR_BUTTON_BOX, K as FIELD_SIZE, N as FIELD_BASE, R as FIELD_DISABLED, V as FIELD_LIVE, _ as useFloating, a as CURRENCY_KEY, c as provideEldraUiCurrency, d as useEldraUiLocale, et as mergeClass, f as Spinner_default, g as useTeleportTarget, h as topLayerDialog, k as ICON_SIZE_CLASS, l as provideEldraUiLocale, m as useOverlay, n as matchRange, nt as joinIds, o as DEFAULT_UI_LOCALE, p as usePopover, rt as useUiId, s as LOCALE_KEY, tt as useControllableModel, u as useEldraUiCurrency, v as normalizeText, y as useListbox } from "./useOptionList-CPHHDvPF.js";
|
|
2
|
+
import { n as provideEldraScope, r as useEldraScope, t as ELDRA_SCOPE_KEY } from "./useEldraScope-BDbGzt7R.js";
|
|
3
|
+
import { $ as defaultCharacterMeaning, A as defaultUnitFormat, B as CheckboxGroup_default, C as Switch_default, D as createNumberFormat, E as UnitInput_default, F as parseLocaleNumber, G as Button_default, H as VisuallyHidden_default, I as useHeadingTag, J as FORM_SUBMITTING_KEY, K as Icon_default, L as TAG_FILL, M as formatNumber, N as formatUnit, O as currencyFractionDigits, P as localeSeparators, Q as applyMask, R as TAG_SHAPE, S as focusInvalid, T as CurrencyInput_default, U as RequiredMark_default, V as Checkbox_default, W as FieldError_default, X as Input_default, Y as Autocomplete_default, Z as useSlotPresence, _ as optionCursor, a as claimShortcut, b as MultiSelect_default, c as SearchResultsPanel_default, d as INPUT, et as stripMask, f as PLAIN_BOX_ONLY, g as labelRecipe, h as dotRecipe, i as SearchBar_default, j as formatCurrency, k as currencySymbol, l as RadioGroup_default, m as PLAIN_OPTION, n as Textarea_default, o as ownsShortcut, p as PLAIN_COLUMNS, q as FORM_LAYOUT_KEY, r as Select_default, s as releaseShortcut, t as VariantPicker_default, u as HINT, v as radioRecipe, w as filterNumericBeforeInput, x as FormLayout_default, y as QuantityStepper_default, z as tagPadding } from "./VariantPicker-CKDdeFmV.js";
|
|
4
|
+
import { i as enUS, n as provideEldraUiMessages, r as useMessages, t as MESSAGES_KEY } from "./useMessages-CYnyGVRG.js";
|
|
4
5
|
import { Comment, Fragment, Teleport, Text, Transition, cloneVNode, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, guardReactiveProps, h, inject, isRef, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onBeforeUnmount, onMounted, onServerPrefetch, onUnmounted, onUpdated, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, toRef, toValue, unref, useAttrs, useId, useSlots, useTemplateRef, vModelText, vShow, watch, withCtx, withDirectives, withKeys, withModifiers } from "vue";
|
|
5
6
|
import { dateTimeFormat } from "@eldrajs/sdk/format/date";
|
|
6
7
|
// src/components/accordion/context.ts
|
|
@@ -16398,4 +16399,4 @@ var Tooltip_default = /* @__PURE__ */ defineComponent({
|
|
|
16398
16399
|
function mixToward(color, toward, percent) {
|
|
16399
16400
|
return `color-mix(in oklab, ${color}, ${toward} ${percent}%)`;
|
|
16400
16401
|
}
|
|
16401
|
-
export { ACCORDION_KEY, Accordion_default as Accordion, AccordionItem_default as AccordionItem, Avatar_default as Avatar, AvatarGroup_default as AvatarGroup, Badge_default as Badge, Breadcrumb_default as Breadcrumb, Button_default as Button, ButtonGroup_default as ButtonGroup, CHIP_GROUP_KEY, CURRENCY_KEY, Carousel_default as Carousel, Checkbox_default as Checkbox, CheckboxGroup_default as CheckboxGroup, Chip_default as Chip, ChipGroup_default as ChipGroup, Container_default as Container, ContentCard_default as ContentCard, CurrencyInput_default as CurrencyInput, DEFAULT_UI_LOCALE, Dialog_default as Dialog, Drawer_default as Drawer, ELDRA_SCOPE_KEY, EditorPlaceholder_default as EditorPlaceholder, EmptyState_default as EmptyState, FIELD_KEY, FILTER_SEARCH_FROM, FILTER_VALUES_SHOWN, FORM_LAYOUT_KEY, FORM_SUBMITTING_KEY, FeatureCard_default as FeatureCard, FieldWrapper_default as FieldWrapper, FilterPanel_default as FilterPanel, FormLayout_default as FormLayout, Icon_default as Icon, Image_default as Image, Input_default as Input, LOCALE_KEY, Lightbox_default as Lightbox, Link_default as Link, LoadMore_default as LoadMore, LogoItem_default as LogoItem, MESSAGES_KEY, MultiSelect_default as MultiSelect, NavMenu_default as NavMenu, Notice_default as Notice, Pagination_default as Pagination, Popover_default as Popover, Price_default as Price, ProductCard_default as ProductCard, QuantityStepper_default as QuantityStepper, Radio_default as Radio, RadioGroup_default as RadioGroup, RangeSlider_default as RangeSlider, Rating_default as Rating, SECTION_KEY, SWATCH_INK_LUMINANCE_THRESHOLD, SearchBar_default as SearchBar, SearchModal_default as SearchModal, Section_default as Section, Select_default as Select, SiteForm_default as SiteForm, Skeleton_default as Skeleton, Spinner_default as Spinner, StepIndicator_default as StepIndicator, StockBadge_default as StockBadge, Switch_default as Switch, TABS_KEY, TOAST_HOST_KEY, Tab_default as Tab, TabPanel_default as TabPanel, TablerIcon_default as TablerIcon, Tabs_default as Tabs, Textarea_default as Textarea, Toast_default as Toast, Toaster_default as Toaster, Tooltip_default as Tooltip, UnitInput_default as UnitInput, VariantPicker_default as VariantPicker, VisuallyHidden_default as VisuallyHidden, appliedFilters, applyMask, carouselPerViewStyle, clampRangeThumb, clearedSelection, closeDialog, createNumberFormat, currencyFractionDigits, currencySymbol, currentDialog, defaultCharacterMeaning, enUS as defaultMessages, enUS, defaultUnitFormat, dropOmittedFacets, facetCanShowAll, facetHasHiddenValues, facetIsRenderable, facetIsSearchable, facetRows, facetSelectedCount, facetStartsOpen, facetSummaryLabels, facetValues, filterNumericBeforeInput, foldForSearch, formatCurrency, formatDate, formatNumber, formatUnit, fractionDigits, frameAspectRatio, hasSelection, histogramBarInRange, initialsFromName, isOpenDialog, isRangeAtLimits, isRangeSelection, isValueDisabled, isValueSelected, joinIds, localeSeparators, matchesSearch, mixToward, nearestRangeThumb, normalizeRangeValue, normalizeText, openDialog, parseLocaleNumber, prefersReducedMotion, preloadTablerIcons, provideEldraScope, provideEldraUiCurrency, provideEldraUiLocale, provideEldraUiMessages, rangeKeyTransition, rangeLimits, rangeOf, rangePositionToValue, rangeStepDigits, rangeThumbLimits, rangeValueToPercent, ratingStarStates, removeValue, renderableFacets, resolveCarouselPerView, roundRatingToHalf, selectedValues, setRange, sizeSystemGroups, snapToRangeStep, stripMask, swatchInk, swatchLuminance, tablerIconName, toggleValue, topLayerDialog, useCarousel, useControllableModel, useDialog, useEldraUiCurrency, useEldraUiLocale, useFloating, useHeadingTag, useListbox, useMessages, useOverlay, usePopover, useSiteForm, useSlotPresence, useToast, useUiId, visibleFacetValues, zoomSizes };
|
|
16402
|
+
export { ACCORDION_KEY, Accordion_default as Accordion, AccordionItem_default as AccordionItem, Autocomplete_default as Autocomplete, Avatar_default as Avatar, AvatarGroup_default as AvatarGroup, Badge_default as Badge, Breadcrumb_default as Breadcrumb, Button_default as Button, ButtonGroup_default as ButtonGroup, CHIP_GROUP_KEY, CURRENCY_KEY, Carousel_default as Carousel, Checkbox_default as Checkbox, CheckboxGroup_default as CheckboxGroup, Chip_default as Chip, ChipGroup_default as ChipGroup, Container_default as Container, ContentCard_default as ContentCard, CurrencyInput_default as CurrencyInput, DEFAULT_UI_LOCALE, Dialog_default as Dialog, Drawer_default as Drawer, ELDRA_SCOPE_KEY, EditorPlaceholder_default as EditorPlaceholder, EmptyState_default as EmptyState, FIELD_KEY, FILTER_SEARCH_FROM, FILTER_VALUES_SHOWN, FORM_LAYOUT_KEY, FORM_SUBMITTING_KEY, FeatureCard_default as FeatureCard, FieldWrapper_default as FieldWrapper, FilterPanel_default as FilterPanel, FormLayout_default as FormLayout, Icon_default as Icon, Image_default as Image, Input_default as Input, LOCALE_KEY, Lightbox_default as Lightbox, Link_default as Link, LoadMore_default as LoadMore, LogoItem_default as LogoItem, MESSAGES_KEY, MultiSelect_default as MultiSelect, NavMenu_default as NavMenu, Notice_default as Notice, Pagination_default as Pagination, Popover_default as Popover, Price_default as Price, ProductCard_default as ProductCard, QuantityStepper_default as QuantityStepper, Radio_default as Radio, RadioGroup_default as RadioGroup, RangeSlider_default as RangeSlider, Rating_default as Rating, SECTION_KEY, SWATCH_INK_LUMINANCE_THRESHOLD, SearchBar_default as SearchBar, SearchModal_default as SearchModal, Section_default as Section, Select_default as Select, SiteForm_default as SiteForm, Skeleton_default as Skeleton, Spinner_default as Spinner, StepIndicator_default as StepIndicator, StockBadge_default as StockBadge, Switch_default as Switch, TABS_KEY, TOAST_HOST_KEY, Tab_default as Tab, TabPanel_default as TabPanel, TablerIcon_default as TablerIcon, Tabs_default as Tabs, Textarea_default as Textarea, Toast_default as Toast, Toaster_default as Toaster, Tooltip_default as Tooltip, UnitInput_default as UnitInput, VariantPicker_default as VariantPicker, VisuallyHidden_default as VisuallyHidden, appliedFilters, applyMask, carouselPerViewStyle, clampRangeThumb, clearedSelection, closeDialog, createNumberFormat, currencyFractionDigits, currencySymbol, currentDialog, defaultCharacterMeaning, enUS as defaultMessages, enUS, defaultUnitFormat, dropOmittedFacets, facetCanShowAll, facetHasHiddenValues, facetIsRenderable, facetIsSearchable, facetRows, facetSelectedCount, facetStartsOpen, facetSummaryLabels, facetValues, filterNumericBeforeInput, foldForSearch, formatCurrency, formatDate, formatNumber, formatUnit, fractionDigits, frameAspectRatio, hasSelection, histogramBarInRange, initialsFromName, isOpenDialog, isRangeAtLimits, isRangeSelection, isValueDisabled, isValueSelected, joinIds, localeSeparators, matchesSearch, mixToward, nearestRangeThumb, normalizeRangeValue, normalizeText, openDialog, parseLocaleNumber, prefersReducedMotion, preloadTablerIcons, provideEldraScope, provideEldraUiCurrency, provideEldraUiLocale, provideEldraUiMessages, rangeKeyTransition, rangeLimits, rangeOf, rangePositionToValue, rangeStepDigits, rangeThumbLimits, rangeValueToPercent, ratingStarStates, removeValue, renderableFacets, resolveCarouselPerView, roundRatingToHalf, selectedValues, setRange, sizeSystemGroups, snapToRangeStep, stripMask, swatchInk, swatchLuminance, tablerIconName, toggleValue, topLayerDialog, useCarousel, useControllableModel, useDialog, useEldraUiCurrency, useEldraUiLocale, useFloating, useHeadingTag, useListbox, useMessages, useOverlay, usePopover, useSiteForm, useSlotPresence, useToast, useUiId, visibleFacetValues, zoomSizes };
|
package/dist/messages/en-US.d.ts
CHANGED
|
@@ -82,6 +82,8 @@ export declare const enUS: {
|
|
|
82
82
|
noneSelected: string;
|
|
83
83
|
/** Closes a `MultiSelect`'s popover. It commits nothing: every toggle already applied. */
|
|
84
84
|
done: string;
|
|
85
|
+
/** A `MultiSelect` footer's button that selects every option shown (`selectAll`). */
|
|
86
|
+
selectAll: string;
|
|
85
87
|
/** The accessible name of a `QuantityStepper`'s minus button. */
|
|
86
88
|
decrease: string;
|
|
87
89
|
/** The accessible name of a `QuantityStepper`'s plus button. */
|
|
@@ -520,6 +522,8 @@ export declare const enUS: {
|
|
|
520
522
|
stepCompleted: string;
|
|
521
523
|
/** `StepIndicator`: the same, for a step after the current one. */
|
|
522
524
|
stepNotStarted: string;
|
|
525
|
+
/** `Autocomplete`: the accessible name of the list of suggestions under the field. */
|
|
526
|
+
suggestions: string;
|
|
523
527
|
/**
|
|
524
528
|
* `PhoneInput` (`@eldrajs/ui/phone`): the country button's accessible name, the chosen country
|
|
525
529
|
* and its dialling code ("Country: Iceland, +354").
|
package/dist/messages/is-IS.js
CHANGED
|
@@ -58,6 +58,7 @@ var isIS = {
|
|
|
58
58
|
selectedCount: (n) => `${n} valin`,
|
|
59
59
|
noneSelected: "Ekkert valið",
|
|
60
60
|
done: "Lokið",
|
|
61
|
+
selectAll: "Velja allt",
|
|
61
62
|
decrease: "Minnka",
|
|
62
63
|
increase: "Auka",
|
|
63
64
|
quantity: "Magn",
|
|
@@ -193,6 +194,7 @@ var isIS = {
|
|
|
193
194
|
formPendingMessage: "Við sendum þér tölvupóst. Smelltu á hlekkinn í honum til að staðfesta.",
|
|
194
195
|
stepCompleted: "lokið",
|
|
195
196
|
stepNotStarted: "ekki hafið",
|
|
197
|
+
suggestions: "Tillögur",
|
|
196
198
|
phoneCountry: (name, code) => `Land: ${name}, ${code}`,
|
|
197
199
|
phoneCountryList: "Land",
|
|
198
200
|
phoneSearch: "Leita að landi eða landsnúmeri",
|
|
@@ -37,12 +37,14 @@ declare const __VLS_base: import('vue').DefineComponent<PhoneInputProps, {
|
|
|
37
37
|
modelValue: string;
|
|
38
38
|
classes: Partial<Record<import('./types.js').PhoneInputPart, string>>;
|
|
39
39
|
required: boolean;
|
|
40
|
-
placeholder: string | false;
|
|
41
40
|
id: string;
|
|
42
|
-
|
|
41
|
+
placeholder: string | false;
|
|
42
|
+
autocomplete: string;
|
|
43
43
|
invalid: boolean;
|
|
44
44
|
describedBy: string;
|
|
45
|
-
|
|
45
|
+
readonly: boolean;
|
|
46
|
+
disabled: boolean;
|
|
47
|
+
country: string;
|
|
46
48
|
messages: Partial<{
|
|
47
49
|
clear: string;
|
|
48
50
|
close: string;
|
|
@@ -68,6 +70,7 @@ declare const __VLS_base: import('vue').DefineComponent<PhoneInputProps, {
|
|
|
68
70
|
selectedCount: (n: number) => string;
|
|
69
71
|
noneSelected: string;
|
|
70
72
|
done: string;
|
|
73
|
+
selectAll: string;
|
|
71
74
|
decrease: string;
|
|
72
75
|
increase: string;
|
|
73
76
|
quantity: string;
|
|
@@ -194,6 +197,7 @@ declare const __VLS_base: import('vue').DefineComponent<PhoneInputProps, {
|
|
|
194
197
|
formPendingMessage: string;
|
|
195
198
|
stepCompleted: string;
|
|
196
199
|
stepNotStarted: string;
|
|
200
|
+
suggestions: string;
|
|
197
201
|
phoneCountry: (name: string, code: string) => string;
|
|
198
202
|
phoneCountryList: string;
|
|
199
203
|
phoneSearch: string;
|
|
@@ -203,9 +207,7 @@ declare const __VLS_base: import('vue').DefineComponent<PhoneInputProps, {
|
|
|
203
207
|
phoneInvalid: (country: string) => string;
|
|
204
208
|
phoneInvalidNumber: string;
|
|
205
209
|
}>;
|
|
206
|
-
|
|
207
|
-
country: string;
|
|
208
|
-
autocomplete: string;
|
|
210
|
+
locale: string;
|
|
209
211
|
defaultCountry: string;
|
|
210
212
|
preferredCountries: string[];
|
|
211
213
|
countries: string[];
|
package/dist/phone/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { default as PhoneInput } from './PhoneInput.vue.js';
|
|
9
9
|
export { phoneExample } from './examples.js';
|
|
10
|
-
export { preloadPhoneFlags } from '
|
|
10
|
+
export { preloadCountryFlags as preloadPhoneFlags } from '../flag/flags.js';
|
|
11
11
|
export { isValidPhone, parsePhone, phoneCallingCode, phoneCountries, type PhoneParts, } from './phone.js';
|
|
12
12
|
export { phoneCountryName, phoneRule, type PhoneRuleOptions } from './rule.js';
|
|
13
13
|
export type { PhoneInputChange, PhoneInputPart, PhoneInputProps, PhoneInputSize } from './types.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as useMessages } from "../useMessages-
|
|
3
|
-
import { a as useControlProps, n as FIELD_ONLY, o as useFieldControl, r as FIELD_VALIDATION_DEFAULTS } from "../useFieldControl-
|
|
4
|
-
import { r as phoneRule, t as PhoneInput_default } from "../PhoneInput-
|
|
1
|
+
import { d as useEldraUiLocale } from "../useOptionList-CPHHDvPF.js";
|
|
2
|
+
import { r as useMessages } from "../useMessages-CYnyGVRG.js";
|
|
3
|
+
import { a as useControlProps, n as FIELD_ONLY, o as useFieldControl, r as FIELD_VALIDATION_DEFAULTS } from "../useFieldControl-CGH6GEWM.js";
|
|
4
|
+
import { r as phoneRule, t as PhoneInput_default } from "../PhoneInput-BVH32MEg.js";
|
|
5
5
|
import { computed, createBlock, createSlots, defineComponent, guardReactiveProps, isRef, mergeDefaults, mergeProps, normalizeProps, openBlock, reactive, ref, renderList, renderSlot, toRefs, unref, withCtx } from "vue";
|
|
6
6
|
// src/phone/vee-validate/FieldPhoneInput.vue
|
|
7
7
|
var FieldPhoneInput_default = /* @__PURE__ */ defineComponent({
|
package/dist/phone.js
CHANGED
|
@@ -1 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { a as parsePhone, c as phoneExample, i as isValidPhone, n as phoneCountryName, o as phoneCallingCode, r as phoneRule, s as phoneCountries, t as PhoneInput_default } from "./PhoneInput-BVH32MEg.js";
|
|
2
|
+
import { n as preloadCountryFlags } from "./CountryFlag-DOa8lOHp.js";
|
|
3
|
+
export { PhoneInput_default as PhoneInput, isValidPhone, parsePhone, phoneCallingCode, phoneCountries, phoneCountryName, phoneExample, phoneRule, preloadCountryFlags as preloadPhoneFlags };
|
package/dist/resolver.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export interface EldraUiResolverOptions {
|
|
|
4
4
|
}
|
|
5
5
|
interface ResolvedComponent {
|
|
6
6
|
name: string;
|
|
7
|
-
from: '@eldrajs/ui' | '@eldrajs/ui/phone';
|
|
7
|
+
from: '@eldrajs/ui' | '@eldrajs/ui/phone' | '@eldrajs/ui/flag';
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* The components of `@eldrajs/ui/phone`, which the root entry does not export: that entry needs
|
|
@@ -12,6 +12,11 @@ interface ResolvedComponent {
|
|
|
12
12
|
* the phone one.
|
|
13
13
|
*/
|
|
14
14
|
export declare const phoneComponentNames: readonly ["PhoneInput"];
|
|
15
|
+
/**
|
|
16
|
+
* The components of `@eldrajs/ui/flag`, which the root entry does not export either: its artwork
|
|
17
|
+
* is a chunk the root entry must never reach.
|
|
18
|
+
*/
|
|
19
|
+
export declare const flagComponentNames: readonly ["CountryFlag"];
|
|
15
20
|
/**
|
|
16
21
|
* Resolver for [`unplugin-vue-components`](https://github.com/unplugin/unplugin-vue-components):
|
|
17
22
|
*
|
|
@@ -27,7 +32,8 @@ export declare const phoneComponentNames: readonly ["PhoneInput"];
|
|
|
27
32
|
* A template can then use `<EldraButton>`, `<EldraSelect>`, and so on, with no explicit import —
|
|
28
33
|
* the plugin rewrites the tag into `import { Button } from '@eldrajs/ui'` (auto-imported, not
|
|
29
34
|
* globally registered) the first time it sees it. `<EldraPhoneInput>` resolves the same way from
|
|
30
|
-
* `@eldrajs/ui/phone` (`phoneComponentNames`), the entry that needs `libphonenumber-js
|
|
35
|
+
* `@eldrajs/ui/phone` (`phoneComponentNames`), the entry that needs `libphonenumber-js`, and
|
|
36
|
+
* `<EldraCountryFlag>` from `@eldrajs/ui/flag` (`flagComponentNames`). `EldraUiResolver` resolves against exactly the
|
|
31
37
|
* names in `componentNames` (`src/index.ts`'s component exports — see
|
|
32
38
|
* `src/__tests__/componentNames.spec.ts` for the guard that keeps the two in sync); anything else,
|
|
33
39
|
* including the private library's own `Ui*` names, resolves to `undefined` and is left for another
|
package/dist/resolver.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
var componentNames = [
|
|
20
20
|
"Accordion",
|
|
21
21
|
"AccordionItem",
|
|
22
|
+
"Autocomplete",
|
|
22
23
|
"Avatar",
|
|
23
24
|
"AvatarGroup",
|
|
24
25
|
"Badge",
|
|
@@ -92,6 +93,12 @@ var componentNameSet = new Set(componentNames);
|
|
|
92
93
|
var phoneComponentNames = ["PhoneInput"];
|
|
93
94
|
var phoneComponentNameSet = new Set(phoneComponentNames);
|
|
94
95
|
/**
|
|
96
|
+
* The components of `@eldrajs/ui/flag`, which the root entry does not export either: its artwork
|
|
97
|
+
* is a chunk the root entry must never reach.
|
|
98
|
+
*/
|
|
99
|
+
var flagComponentNames = ["CountryFlag"];
|
|
100
|
+
var flagComponentNameSet = new Set(flagComponentNames);
|
|
101
|
+
/**
|
|
95
102
|
* Resolver for [`unplugin-vue-components`](https://github.com/unplugin/unplugin-vue-components):
|
|
96
103
|
*
|
|
97
104
|
* ```ts
|
|
@@ -106,7 +113,8 @@ var phoneComponentNameSet = new Set(phoneComponentNames);
|
|
|
106
113
|
* A template can then use `<EldraButton>`, `<EldraSelect>`, and so on, with no explicit import —
|
|
107
114
|
* the plugin rewrites the tag into `import { Button } from '@eldrajs/ui'` (auto-imported, not
|
|
108
115
|
* globally registered) the first time it sees it. `<EldraPhoneInput>` resolves the same way from
|
|
109
|
-
* `@eldrajs/ui/phone` (`phoneComponentNames`), the entry that needs `libphonenumber-js
|
|
116
|
+
* `@eldrajs/ui/phone` (`phoneComponentNames`), the entry that needs `libphonenumber-js`, and
|
|
117
|
+
* `<EldraCountryFlag>` from `@eldrajs/ui/flag` (`flagComponentNames`). `EldraUiResolver` resolves against exactly the
|
|
110
118
|
* names in `componentNames` (`src/index.ts`'s component exports — see
|
|
111
119
|
* `src/__tests__/componentNames.spec.ts` for the guard that keeps the two in sync); anything else,
|
|
112
120
|
* including the private library's own `Ui*` names, resolves to `undefined` and is left for another
|
|
@@ -131,7 +139,11 @@ function EldraUiResolver(options = {}) {
|
|
|
131
139
|
name: componentName,
|
|
132
140
|
from: "@eldrajs/ui/phone"
|
|
133
141
|
};
|
|
142
|
+
if (flagComponentNameSet.has(componentName)) return {
|
|
143
|
+
name: componentName,
|
|
144
|
+
from: "@eldrajs/ui/flag"
|
|
145
|
+
};
|
|
134
146
|
}
|
|
135
147
|
};
|
|
136
148
|
}
|
|
137
|
-
export { EldraUiResolver, componentNames, phoneComponentNames };
|
|
149
|
+
export { EldraUiResolver, componentNames, flagComponentNames, phoneComponentNames };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { inject, provide, useSlots } from "vue";
|
|
2
|
+
// src/composables/useEldraScope.ts
|
|
3
|
+
/** The injection key `provideEldraScope` provides under. */
|
|
4
|
+
var ELDRA_SCOPE_KEY = Symbol("eldra-scope");
|
|
5
|
+
/**
|
|
6
|
+
* Names a theming scope for every component of this package rendered below the caller (see the
|
|
7
|
+
* README, "Theming a subtree"). Call it in `setup()` of a wrapper or an app root.
|
|
8
|
+
*
|
|
9
|
+
* Each component then renders `data-eldra-scope="<name>"` on its root and on every part it
|
|
10
|
+
* teleports (panels, dialogs, toasts). The name is free; the consumer's own variable overrides
|
|
11
|
+
* target it (`[data-eldra-scope='studio'] { --eldra-color-primary: … }`). Without a provider the
|
|
12
|
+
* attribute is not rendered, so the output is unchanged.
|
|
13
|
+
*/
|
|
14
|
+
function provideEldraScope(name = "default") {
|
|
15
|
+
provide(ELDRA_SCOPE_KEY, name || "default");
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Internal: the theming hooks a component of this package binds. `scope` goes on every root,
|
|
19
|
+
* teleported root and kit-owned element sitting directly in a slot host, so a scope's variables
|
|
20
|
+
* reach it; it is `undefined` without a provider. `slotHost(...names)` is `data-eldra-slot`, on
|
|
21
|
+
* the element holding those slots, a hook for consumer CSS. It renders whenever one of the slots
|
|
22
|
+
* has content, provider or not, and never for a fallback, which is the kit's own markup.
|
|
23
|
+
*/
|
|
24
|
+
function useEldraScope() {
|
|
25
|
+
const scope = inject(ELDRA_SCOPE_KEY, void 0);
|
|
26
|
+
const slots = useSlots();
|
|
27
|
+
return {
|
|
28
|
+
scope,
|
|
29
|
+
slotHost: (...names) => names.some((name) => slots[name] !== void 0) ? "" : void 0
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export { provideEldraScope as n, useEldraScope as r, ELDRA_SCOPE_KEY as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { $ as FIELD_KEY, rt as useUiId } from "./useOptionList-CPHHDvPF.js";
|
|
2
2
|
import { computed, inject, onMounted, onScopeDispose, shallowRef, watch } from "vue";
|
|
3
3
|
import { FormContextKey, useField } from "vee-validate";
|
|
4
4
|
// src/vee-validate/context.ts
|
|
@@ -85,7 +85,7 @@ var FIELD_ONLY = [
|
|
|
85
85
|
* Each `Field*` is a thin SFC over this: `useField(name, rules, { label })` for the value and the
|
|
86
86
|
* validation, the message the field **shows**, the `id` the form's error summary links to, and the
|
|
87
87
|
* server error that stops being true as soon as the value changes. Keeping it here is what makes
|
|
88
|
-
* the
|
|
88
|
+
* the fourteen components agree on all of that rather than fourteen files drifting apart.
|
|
89
89
|
*
|
|
90
90
|
* **When a field validates, and when its message changes.** The spec's rule (Form layout →
|
|
91
91
|
* Behaviour & motion) is "Validate on submit, then on blur for fields that were invalid after the
|
|
@@ -105,6 +105,8 @@ var enUS = {
|
|
|
105
105
|
noneSelected: "None selected",
|
|
106
106
|
/** Closes a `MultiSelect`'s popover. It commits nothing: every toggle already applied. */
|
|
107
107
|
done: "Done",
|
|
108
|
+
/** A `MultiSelect` footer's button that selects every option shown (`selectAll`). */
|
|
109
|
+
selectAll: "Select all",
|
|
108
110
|
/** The accessible name of a `QuantityStepper`'s minus button. */
|
|
109
111
|
decrease: "Decrease",
|
|
110
112
|
/** The accessible name of a `QuantityStepper`'s plus button. */
|
|
@@ -549,6 +551,8 @@ var enUS = {
|
|
|
549
551
|
stepCompleted: "completed",
|
|
550
552
|
/** `StepIndicator`: the same, for a step after the current one. */
|
|
551
553
|
stepNotStarted: "not started",
|
|
554
|
+
/** `Autocomplete`: the accessible name of the list of suggestions under the field. */
|
|
555
|
+
suggestions: "Suggestions",
|
|
552
556
|
/**
|
|
553
557
|
* `PhoneInput` (`@eldrajs/ui/phone`): the country button's accessible name, the chosen country
|
|
554
558
|
* and its dialling code ("Country: Iceland, +354").
|