@eldrajs/ui 0.3.16 → 0.3.18

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +3 -0
  2. package/README.md +1 -0
  3. package/dist/{PhoneInput-CB9p1skb.js → PhoneInput-CHTpjbtS.js} +1 -1
  4. package/dist/{VariantPicker-CCBZXtMa.js → VariantPicker-Dein0E4i.js} +4199 -4194
  5. package/dist/componentNames.d.ts +1 -1
  6. package/dist/components/autocomplete/Autocomplete.vue.d.ts +2 -0
  7. package/dist/components/chip/Chip.vue.d.ts +2 -0
  8. package/dist/components/currency-picker/CurrencyPicker.vue.d.ts +17 -0
  9. package/dist/components/currency-picker/types.d.ts +21 -0
  10. package/dist/components/dialog/Dialog.vue.d.ts +2 -0
  11. package/dist/components/drawer/Drawer.vue.d.ts +2 -0
  12. package/dist/components/filter-panel/FilterGroup.vue.d.ts +2 -0
  13. package/dist/components/filter-panel/FilterPanel.vue.d.ts +2 -0
  14. package/dist/components/filter-panel/facets/ColourFacet.vue.d.ts +2 -0
  15. package/dist/components/filter-panel/facets/ListFacet.vue.d.ts +2 -0
  16. package/dist/components/filter-panel/facets/RangeFacet.vue.d.ts +2 -0
  17. package/dist/components/filter-panel/facets/SizeFacet.vue.d.ts +2 -0
  18. package/dist/components/filter-panel/facets/ToggleFacet.vue.d.ts +2 -0
  19. package/dist/components/lightbox/Lightbox.vue.d.ts +2 -0
  20. package/dist/components/nav-menu/NavMenu.vue.d.ts +2 -0
  21. package/dist/components/pagination/Pagination.vue.d.ts +2 -0
  22. package/dist/components/popover/Popover.vue.d.ts +1 -1
  23. package/dist/components/product-card/types.d.ts +3 -1
  24. package/dist/components/range-slider/RangeSlider.vue.d.ts +2 -0
  25. package/dist/components/search-bar/SearchBar.vue.d.ts +2 -0
  26. package/dist/components/search-modal/SearchModal.vue.d.ts +3 -1
  27. package/dist/components/section/Section.vue.d.ts +1 -1
  28. package/dist/components/select/MultiSelect.vue.d.ts +2 -0
  29. package/dist/components/select/Select.vue.d.ts +2 -0
  30. package/dist/components/site-form/SiteForm.vue.d.ts +2 -0
  31. package/dist/components/toast/Toast.vue.d.ts +2 -0
  32. package/dist/components/toast/Toaster.vue.d.ts +2 -0
  33. package/dist/index.d.ts +3 -1
  34. package/dist/index.js +798 -700
  35. package/dist/messages/en-US.d.ts +4 -0
  36. package/dist/messages/is-IS.js +2 -0
  37. package/dist/phone/PhoneInput.vue.d.ts +2 -0
  38. package/dist/phone/vee-validate.js +2 -2
  39. package/dist/phone.js +1 -1
  40. package/dist/resolver.js +1 -0
  41. package/dist/{useMessages-CrSnIuLt.js → useMessages-BdN9F1cW.js} +4 -0
  42. package/dist/utils/number-format.d.ts +2 -0
  43. package/dist/vee-validate.js +2 -2
  44. package/dist/vue-i18n.js +2 -1
  45. package/package.json +2 -2
@@ -204,6 +204,8 @@ export declare const enUS: {
204
204
  * draws for English is honoured without constraining every locale to the same shape.
205
205
  */
206
206
  quickAdd: (title: string) => string;
207
+ /** `ProductCard`'s line in place of the price for a product with no price in the chosen currency. */
208
+ notSoldInCurrency: (currency: string) => string;
207
209
  /**
208
210
  * `ProductCard`'s loading skeleton's accessible name (spec "Product card" → Variants, Loading
209
211
  * row: `aria-label="Loading product"`).
@@ -218,6 +220,8 @@ export declare const enUS: {
218
220
  /** `Image`'s live placeholder text, shown next to the photo icon when there is no `media` (spec
219
221
  * "Image" → Variants, "Placeholder (live)" row). */
220
222
  noImage: string;
223
+ /** `CurrencyPicker`'s label: visually hidden in a header, shown in a menu. */
224
+ currencyPickerLabel: string;
221
225
  /** `Image`'s live placeholder's accessible name (spec "Image" → Accessibility: 'otherwise it
222
226
  * gets `role="img"` and `aria-label="No image available"`'), omitted when `decorative` is on. */
223
227
  noImageAvailable: string;
@@ -92,9 +92,11 @@ var isIS = {
92
92
  newBadge: "Nýtt",
93
93
  quickAddLabel: "Setja í körfu",
94
94
  quickAdd: (title) => `Setja ${title} í körfu`,
95
+ notSoldInCurrency: (currency) => `Ekki til sölu í ${currency}`,
95
96
  loadingProduct: "Hleður…",
96
97
  swatchesAvailable: (n) => `Til í ${n} ${singular(n) ? "lit" : "litum"}`,
97
98
  noImage: "Engin mynd",
99
+ currencyPickerLabel: "Gjaldmiðill",
98
100
  noImageAvailable: "Engin mynd í boði",
99
101
  stockistSite: " (síða söluaðila)",
100
102
  stockIn: "Til á lager, sent út á 1–2 dögum",
@@ -104,9 +104,11 @@ declare const __VLS_base: import('vue').DefineComponent<PhoneInputProps, {
104
104
  newBadge: string;
105
105
  quickAddLabel: string;
106
106
  quickAdd: (title: string) => string;
107
+ notSoldInCurrency: (currency: string) => string;
107
108
  loadingProduct: string;
108
109
  swatchesAvailable: (n: number) => string;
109
110
  noImage: string;
111
+ currencyPickerLabel: string;
110
112
  noImageAvailable: string;
111
113
  stockistSite: string;
112
114
  stockIn: string;
@@ -1,7 +1,7 @@
1
1
  import { d as useEldraUiLocale } from "../useOptionList-UMUMayec.js";
2
- import { r as useMessages } from "../useMessages-CrSnIuLt.js";
2
+ import { r as useMessages } from "../useMessages-BdN9F1cW.js";
3
3
  import { a as useControlProps, n as FIELD_ONLY, o as useFieldControl, r as FIELD_VALIDATION_DEFAULTS } from "../useFieldControl-B1JvPEeM.js";
4
- import { r as phoneRule, t as PhoneInput_default } from "../PhoneInput-CB9p1skb.js";
4
+ import { r as phoneRule, t as PhoneInput_default } from "../PhoneInput-CHTpjbtS.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,3 +1,3 @@
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-CB9p1skb.js";
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-CHTpjbtS.js";
2
2
  import { n as preloadCountryFlags } from "./CountryFlag-DOa8lOHp.js";
3
3
  export { PhoneInput_default as PhoneInput, isValidPhone, parsePhone, phoneCallingCode, phoneCountries, phoneCountryName, phoneExample, phoneRule, preloadCountryFlags as preloadPhoneFlags };
package/dist/resolver.js CHANGED
@@ -34,6 +34,7 @@ var componentNames = [
34
34
  "Container",
35
35
  "ContentCard",
36
36
  "CurrencyInput",
37
+ "CurrencyPicker",
37
38
  "Dialog",
38
39
  "Drawer",
39
40
  "EditorPlaceholder",
@@ -227,6 +227,8 @@ var enUS = {
227
227
  * draws for English is honoured without constraining every locale to the same shape.
228
228
  */
229
229
  quickAdd: (title) => `Quick add ${title}`,
230
+ /** `ProductCard`'s line in place of the price for a product with no price in the chosen currency. */
231
+ notSoldInCurrency: (currency) => `Not available in ${currency}`,
230
232
  /**
231
233
  * `ProductCard`'s loading skeleton's accessible name (spec "Product card" → Variants, Loading
232
234
  * row: `aria-label="Loading product"`).
@@ -241,6 +243,8 @@ var enUS = {
241
243
  /** `Image`'s live placeholder text, shown next to the photo icon when there is no `media` (spec
242
244
  * "Image" → Variants, "Placeholder (live)" row). */
243
245
  noImage: "No image",
246
+ /** `CurrencyPicker`'s label: visually hidden in a header, shown in a menu. */
247
+ currencyPickerLabel: "Currency",
244
248
  /** `Image`'s live placeholder's accessible name (spec "Image" → Accessibility: 'otherwise it
245
249
  * gets `role="img"` and `aria-label="No image available"`'), omitted when `decorative` is on. */
246
250
  noImageAvailable: "No image available",
@@ -95,6 +95,8 @@ export declare function parseLocaleNumber(text: string, locale: string): number
95
95
  * `ISK` is 0 under `en-US` too.
96
96
  */
97
97
  export declare function currencyFractionDigits(currency: string, locale?: string): number;
98
+ /** A major-unit amount (`28.5`) as the minor units `Price` reads, by the currency's own decimals; no currency counts two. */
99
+ export declare function toMinorUnits(amount: number, currency: string | undefined, locale?: string): number;
98
100
  /**
99
101
  * The options the private library's `formatUnit` takes, mirrored name for name (its own
100
102
  * `UnitFormatProps`) so that library can alias this module's function in place of its copy.
@@ -1,5 +1,5 @@
1
- import { B as CheckboxGroup_default, C as Switch_default, E as UnitInput_default, S as focusInvalid, T as CurrencyInput_default, V as Checkbox_default, X as Input_default, Y as Autocomplete_default, b as MultiSelect_default, i as SearchBar_default, l as RadioGroup_default, n as Textarea_default, r as Select_default, t as VariantPicker_default, x as FormLayout_default, y as QuantityStepper_default } from "./VariantPicker-CCBZXtMa.js";
2
- import { r as useMessages } from "./useMessages-CrSnIuLt.js";
1
+ import { E as UnitInput_default, H as Checkbox_default, S as Switch_default, T as CurrencyInput_default, V as CheckboxGroup_default, X as Autocomplete_default, Z as Input_default, b as FormLayout_default, c as RadioGroup_default, n as Textarea_default, r as SearchBar_default, t as VariantPicker_default, v as QuantityStepper_default, w as Select_default, x as focusInvalid, y as MultiSelect_default } from "./VariantPicker-Dein0E4i.js";
2
+ import { r as useMessages } from "./useMessages-BdN9F1cW.js";
3
3
  import { a as useControlProps, c as FIELD_ANCHORS_KEY, i as FIELD_VALIDATION_PROPS, l as FIELD_MESSAGES_KEY, n as FIELD_ONLY, o as useFieldControl, r as FIELD_VALIDATION_DEFAULTS, s as API_ERRORS_KEY, t as FIELD_CHOICE_VALIDATION_DEFAULTS } from "./useFieldControl-B1JvPEeM.js";
4
4
  import { r as useEldraScope } from "./useEldraScope-BDbGzt7R.js";
5
5
  import { Fragment, computed, createBlock, createElementBlock, createElementVNode, createSlots, createTextVNode, defineComponent, guardReactiveProps, isRef, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, onMounted, openBlock, provide, ref, renderList, renderSlot, toDisplayString, unref, watch, withCtx } from "vue";
package/dist/vue-i18n.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as enUS, n as provideEldraUiMessages } from "./useMessages-CrSnIuLt.js";
1
+ import { i as enUS, n as provideEldraUiMessages } from "./useMessages-BdN9F1cW.js";
2
2
  import { t as formatConjunctionList } from "./listFormat-D9ecpDMT.js";
3
3
  import { numberFormat } from "@eldrajs/sdk/format";
4
4
  import { useI18n } from "vue-i18n";
@@ -54,6 +54,7 @@ var SHAPES = {
54
54
  charactersLeft: counted(),
55
55
  overLimit: counted(),
56
56
  quickAdd: text("title"),
57
+ notSoldInCurrency: text("currency"),
57
58
  swatchesAvailable: counted(),
58
59
  stockLow: {
59
60
  params: ["n"],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eldrajs/ui",
3
- "version": "0.3.16",
3
+ "version": "0.3.18",
4
4
  "description": "Accessible Vue 3 core components for Eldra storefronts: buttons, forms, selects, cards, overlays and navigation, themed through CSS design tokens.",
5
5
  "keywords": [
6
6
  "accessible",
@@ -77,7 +77,7 @@
77
77
  "dependencies": {
78
78
  "@floating-ui/vue": "^1.1.5",
79
79
  "tailwind-merge": "^3.0.0",
80
- "@eldrajs/sdk": "^0.5.2"
80
+ "@eldrajs/sdk": "^0.5.4"
81
81
  },
82
82
  "devDependencies": {
83
83
  "@playwright/test": "1.62.1",