@wix/editor-react-components 1.2345.0 → 1.2347.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.
Files changed (55) hide show
  1. package/dist/site/components/AnimatedIcon/types.d.ts +1 -1
  2. package/dist/site/components/AudioPlayer/component.js +3 -4
  3. package/dist/site/components/Breadcrumbs/component.js +1 -1
  4. package/dist/site/components/Button/component.js +1 -1
  5. package/dist/site/components/Checkbox/css.css +4 -4
  6. package/dist/site/components/CheckboxGroup/css.css +4 -4
  7. package/dist/site/components/CollapsibleText/component.js +1 -1
  8. package/dist/site/components/DatePicker/DatePicker.types.d.ts +6 -1
  9. package/dist/site/components/DatePicker/component.js +61 -11
  10. package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +2 -1
  11. package/dist/site/components/DatePicker/constants.d.ts +8 -0
  12. package/dist/site/components/DatePicker/css.css +13 -0
  13. package/dist/site/components/DatePicker/hooks/useDatePickerValue.d.ts +1 -1
  14. package/dist/site/components/DatePicker/manifest.js +12 -1
  15. package/dist/site/components/Lottie/component.js +1 -1
  16. package/dist/site/components/Menu/Menu.types.d.ts +1 -33
  17. package/dist/site/components/Menu/component.js +8 -160
  18. package/dist/site/components/Menu/constants.d.ts +0 -18
  19. package/dist/site/components/Menu/css.css +21 -34
  20. package/dist/site/components/Menu/manifest.js +4 -68
  21. package/dist/site/components/Menu/manifestConfigs/itemConfig.d.ts +1 -4
  22. package/dist/site/components/Menu/manifestConfigs/overrides/horizontalHugNavbarConfig.d.ts +0 -2
  23. package/dist/site/components/Menu/manifestConfigs/overrides/horizontalScrollNavbarConfig.d.ts +0 -2
  24. package/dist/site/components/Menu/manifestConfigs/overrides/verticalNavbarConfig.d.ts +1 -3
  25. package/dist/site/components/Slideshow/component.js +1 -1
  26. package/dist/site/components/TextInput/TextInput.types.d.ts +3 -1
  27. package/dist/site/components/TextInput/component.js +86 -19
  28. package/dist/site/components/TextInput/constants.d.ts +13 -0
  29. package/dist/site/components/TextInput/css.css +47 -4
  30. package/dist/site/components/TextInput/manifest.js +8 -1
  31. package/dist/site/components/TimePicker/TimePicker.types.d.ts +7 -1
  32. package/dist/site/components/TimePicker/component.js +61 -11
  33. package/dist/site/components/TimePicker/constants.d.ts +7 -0
  34. package/dist/site/components/TimePicker/css.css +13 -0
  35. package/dist/site/components/TimePicker/hooks/useTimePickerValue.d.ts +1 -1
  36. package/dist/site/components/TimePicker/manifest.js +8 -1
  37. package/dist/site/components/chunks/Button.js +347 -1057
  38. package/dist/site/components/chunks/{Tooltip.js → DateField.js} +52 -1018
  39. package/dist/site/components/chunks/Group.js +970 -46
  40. package/dist/site/components/chunks/NumberFormatter.js +140 -0
  41. package/dist/site/components/chunks/VisuallyHidden.js +1 -1
  42. package/dist/site/components/chunks/constants2.js +9 -2
  43. package/dist/site/components/chunks/constants26.js +4 -23
  44. package/dist/site/components/chunks/constants3.js +10 -1
  45. package/dist/site/components/chunks/constants33.js +10 -2
  46. package/dist/site/components/chunks/filterDOMProps.js +139 -18
  47. package/dist/site/components/chunks/manifest2.js +73 -0
  48. package/dist/site/components/chunks/useLocalizedStringFormatter.js +1 -1
  49. package/dist/site/components/chunks/useValidatedField.js +1411 -0
  50. package/package.json +2 -2
  51. package/dist/site/components/Menu/components/MenuContent/MenuItem/useIconAnimation.d.ts +0 -17
  52. package/dist/site/components/Menu/manifestConfigs/animatedIconConfig.d.ts +0 -2
  53. package/dist/site/components/chunks/Button2.js +0 -365
  54. package/dist/site/components/chunks/I18nProvider.js +0 -125
  55. package/dist/site/components/chunks/Input.js +0 -341
@@ -0,0 +1,140 @@
1
+ let $1dfb119a85e764e5$var$formatterCache = /* @__PURE__ */ new Map();
2
+ let $1dfb119a85e764e5$var$supportsSignDisplay = false;
3
+ try {
4
+ $1dfb119a85e764e5$var$supportsSignDisplay = new Intl.NumberFormat("de-DE", {
5
+ signDisplay: "exceptZero"
6
+ }).resolvedOptions().signDisplay === "exceptZero";
7
+ } catch {
8
+ }
9
+ let $1dfb119a85e764e5$var$supportsUnit = false;
10
+ try {
11
+ $1dfb119a85e764e5$var$supportsUnit = new Intl.NumberFormat("de-DE", {
12
+ style: "unit",
13
+ unit: "degree"
14
+ }).resolvedOptions().style === "unit";
15
+ } catch {
16
+ }
17
+ const $1dfb119a85e764e5$var$UNITS = {
18
+ degree: {
19
+ narrow: {
20
+ default: "°",
21
+ "ja-JP": " 度",
22
+ "zh-TW": "度",
23
+ "sl-SI": " °"
24
+ }
25
+ }
26
+ };
27
+ class $1dfb119a85e764e5$export$cc77c4ff7e8673c5 {
28
+ constructor(locale, options = {}) {
29
+ this.numberFormatter = $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options);
30
+ this.options = options;
31
+ }
32
+ /** Formats a number value as a string, according to the locale and options provided to the constructor. */
33
+ format(value) {
34
+ var _a;
35
+ let res = "";
36
+ if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) res = $1dfb119a85e764e5$export$711b50b3c525e0f2(this.numberFormatter, this.options.signDisplay, value);
37
+ else res = this.numberFormatter.format(value);
38
+ if (this.options.style === "unit" && !$1dfb119a85e764e5$var$supportsUnit) {
39
+ let { unit, unitDisplay = "short", locale } = this.resolvedOptions();
40
+ if (!unit) return res;
41
+ let values = (_a = $1dfb119a85e764e5$var$UNITS[unit]) == null ? void 0 : _a[unitDisplay];
42
+ res += values[locale] || values.default;
43
+ }
44
+ return res;
45
+ }
46
+ /** Formats a number to an array of parts such as separators, digits, punctuation, and more. */
47
+ formatToParts(value) {
48
+ return this.numberFormatter.formatToParts(value);
49
+ }
50
+ /** Formats a number range as a string. */
51
+ formatRange(start, end) {
52
+ if (typeof this.numberFormatter.formatRange === "function") return this.numberFormatter.formatRange(start, end);
53
+ if (end < start) throw new RangeError("End date must be >= start date");
54
+ return `${this.format(start)} – ${this.format(end)}`;
55
+ }
56
+ /** Formats a number range as an array of parts. */
57
+ formatRangeToParts(start, end) {
58
+ if (typeof this.numberFormatter.formatRangeToParts === "function") return this.numberFormatter.formatRangeToParts(start, end);
59
+ if (end < start) throw new RangeError("End date must be >= start date");
60
+ let startParts = this.numberFormatter.formatToParts(start);
61
+ let endParts = this.numberFormatter.formatToParts(end);
62
+ return [
63
+ ...startParts.map((p) => ({
64
+ ...p,
65
+ source: "startRange"
66
+ })),
67
+ {
68
+ type: "literal",
69
+ value: " – ",
70
+ source: "shared"
71
+ },
72
+ ...endParts.map((p) => ({
73
+ ...p,
74
+ source: "endRange"
75
+ }))
76
+ ];
77
+ }
78
+ /** Returns the resolved formatting options based on the values passed to the constructor. */
79
+ resolvedOptions() {
80
+ let options = this.numberFormatter.resolvedOptions();
81
+ if (!$1dfb119a85e764e5$var$supportsSignDisplay && this.options.signDisplay != null) options = {
82
+ ...options,
83
+ signDisplay: this.options.signDisplay
84
+ };
85
+ if (!$1dfb119a85e764e5$var$supportsUnit && this.options.style === "unit") options = {
86
+ ...options,
87
+ style: "unit",
88
+ unit: this.options.unit,
89
+ unitDisplay: this.options.unitDisplay
90
+ };
91
+ return options;
92
+ }
93
+ }
94
+ function $1dfb119a85e764e5$var$getCachedNumberFormatter(locale, options = {}) {
95
+ var _a;
96
+ let { numberingSystem } = options;
97
+ if (numberingSystem && locale.includes("-nu-")) {
98
+ if (!locale.includes("-u-")) locale += "-u-";
99
+ locale += `-nu-${numberingSystem}`;
100
+ }
101
+ if (options.style === "unit" && !$1dfb119a85e764e5$var$supportsUnit) {
102
+ let { unit, unitDisplay = "short" } = options;
103
+ if (!unit) throw new Error('unit option must be provided with style: "unit"');
104
+ if (!((_a = $1dfb119a85e764e5$var$UNITS[unit]) == null ? void 0 : _a[unitDisplay])) throw new Error(`Unsupported unit ${unit} with unitDisplay = ${unitDisplay}`);
105
+ options = {
106
+ ...options,
107
+ style: "decimal"
108
+ };
109
+ }
110
+ let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : "");
111
+ if ($1dfb119a85e764e5$var$formatterCache.has(cacheKey)) return $1dfb119a85e764e5$var$formatterCache.get(cacheKey);
112
+ let numberFormatter = new Intl.NumberFormat(locale, options);
113
+ $1dfb119a85e764e5$var$formatterCache.set(cacheKey, numberFormatter);
114
+ return numberFormatter;
115
+ }
116
+ function $1dfb119a85e764e5$export$711b50b3c525e0f2(numberFormat, signDisplay, num) {
117
+ if (signDisplay === "auto") return numberFormat.format(num);
118
+ else if (signDisplay === "never") return numberFormat.format(Math.abs(num));
119
+ else {
120
+ let needsPositiveSign = false;
121
+ if (signDisplay === "always") needsPositiveSign = num > 0 || Object.is(num, 0);
122
+ else if (signDisplay === "exceptZero") {
123
+ if (Object.is(num, -0) || Object.is(num, 0)) num = Math.abs(num);
124
+ else needsPositiveSign = num > 0;
125
+ }
126
+ if (needsPositiveSign) {
127
+ let negative = numberFormat.format(-num);
128
+ let noSign = numberFormat.format(num);
129
+ let minus = negative.replace(noSign, "").replace(/\u200e|\u061C/, "");
130
+ if ([
131
+ ...minus
132
+ ].length !== 1) console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case");
133
+ let positive = negative.replace(noSign, "!!!").replace(minus, "+").replace("!!!", noSign);
134
+ return positive;
135
+ } else return numberFormat.format(num);
136
+ }
137
+ }
138
+ export {
139
+ $1dfb119a85e764e5$export$cc77c4ff7e8673c5 as $
140
+ };
@@ -1,4 +1,4 @@
1
- import { e as $bbaa08b3cd72f041$export$9d1611c77c2fe928, L as $2c9edc598a03d523$export$420e68273165f4ec } from "./Group.js";
1
+ import { f as $bbaa08b3cd72f041$export$9d1611c77c2fe928, z as $2c9edc598a03d523$export$420e68273165f4ec } from "./Group.js";
2
2
  import React__default, { useState, useMemo } from "react";
3
3
  const $ea3928288112382f$var$styles = {
4
4
  border: 0,
@@ -3,6 +3,7 @@ const DisplayNames = {
3
3
  elementDisplayName: "Time Picker",
4
4
  data: {
5
5
  value: "Selected time",
6
+ defaultValue: "Default time",
6
7
  granularity: {
7
8
  displayName: "Time precision",
8
9
  options: {
@@ -95,18 +96,24 @@ const TestIds = {
95
96
  group: "timepicker-group",
96
97
  field: "timepicker-field",
97
98
  clearButton: "timepicker-clear-button",
98
- tooltipButton: "timepicker-tooltip-button"
99
+ tooltipButton: "timepicker-tooltip-button",
100
+ errorMessage: "timepicker-error-message",
101
+ requiredIndicator: "timepicker-required-indicator"
99
102
  };
100
103
  const selectors = {
101
104
  root: "timePicker",
102
105
  label: "timePicker__label",
103
- group: "timePicker__group"
106
+ requiredIndicator: "timePicker__required-indicator",
107
+ group: "timePicker__group",
108
+ errorMessage: "timePicker__error-message"
104
109
  };
110
+ const VALUE_MISSING_MESSAGE = "This field is required";
105
111
  export {
106
112
  DefaultTranslations as D,
107
113
  EMPTY_VALUE as E,
108
114
  HourCycleValues as H,
109
115
  TestIds as T,
116
+ VALUE_MISSING_MESSAGE as V,
110
117
  TRANSLATIONS_NAMESPACE as a,
111
118
  TranslationKeys as b,
112
119
  DisplayNames as c,
@@ -204,11 +204,8 @@ const DisplayNames = {
204
204
  cssProperties: {
205
205
  justifyContent: "Text alignment",
206
206
  background: "Background",
207
- columnGap: "Space between items and chevrons"
208
- },
209
- cssCustomProperties: {
210
- "item-icon-size": "Size",
211
- "item-icon-gap": "Space between items and icons"
207
+ columnGap: "Space between menu items and icons",
208
+ "item-icon-size": "Size"
212
209
  },
213
210
  displayGroups: {
214
211
  iconGroup: "Icons"
@@ -218,12 +215,6 @@ const DisplayNames = {
218
215
  selected: "Selected"
219
216
  }
220
217
  },
221
- itemLabel: {
222
- elementDisplayName: "Item's text"
223
- },
224
- itemIcon: {
225
- elementDisplayName: "Item's icon"
226
- },
227
218
  dropdown: {
228
219
  elementDisplayName: "Dropdowns",
229
220
  cssCustomProperties: {
@@ -299,10 +290,6 @@ const DisplayNames = {
299
290
  elementDisplayName: "Close Button"
300
291
  }
301
292
  };
302
- const menuBuiltInActions = {
303
- elements: "elements"
304
- };
305
- const MENU_ANIMATED_ICON_SPEC = "sp.erc.menuAnimatedIcon";
306
293
  const selectors = {
307
294
  menu: "menu",
308
295
  navbar: "navbar",
@@ -311,8 +298,6 @@ const selectors = {
311
298
  dropdownItem: "dropdown-item",
312
299
  dropdownSubItem: "dropdown-sub-item",
313
300
  scrollButton: "scroll-button",
314
- animatedIcon: "animated-icon",
315
- itemLabel: "item-label",
316
301
  hamburgerMenu: "hamburger-menu",
317
302
  hamburgerMenuContent: "hamburger-menu-content",
318
303
  hamburgerMenuHeaderContent: "hamburger-menu-header-content",
@@ -327,9 +312,7 @@ const elementKeys = {
327
312
  item: "item",
328
313
  subItem: "subItem",
329
314
  scrollButton: "scrollButton",
330
- dropdown: "dropdown",
331
- animatedIcon: "animatedIcon",
332
- itemLabel: "itemLabel"
315
+ dropdown: "dropdown"
333
316
  };
334
317
  const presets = {
335
318
  horizontalScrollNavbar: "horizontalScrollNavbar",
@@ -432,9 +415,7 @@ export {
432
415
  DropdownAnchorPositions as g,
433
416
  DropdownAppliedStyleProperties as h,
434
417
  elementKeys as i,
435
- MENU_ANIMATED_ICON_SPEC as j,
436
- states as k,
437
- menuBuiltInActions as m,
418
+ states as j,
438
419
  presets as p,
439
420
  selectors as s,
440
421
  translationsKeys as t,
@@ -1,6 +1,12 @@
1
1
  const selectors = {
2
- root: "textInput"
2
+ root: "textInput",
3
+ requiredIndicator: "textInput__required-indicator"
3
4
  };
5
+ const TestIds = {
6
+ requiredIndicator: "text-input-required-indicator",
7
+ tooltipButton: "text-input-tooltip-button"
8
+ };
9
+ const VALUE_MISSING_MESSAGE = "This field is required";
4
10
  const DesignStates = {
5
11
  root: {
6
12
  hover: { displayName: "Hover", className: "textInput--hover" },
@@ -29,6 +35,7 @@ const DisplayNames = {
29
35
  },
30
36
  data: {
31
37
  value: "Value",
38
+ defaultValue: "Default value",
32
39
  isDisabled: "Disabled",
33
40
  name: "Name",
34
41
  minLength: "Minimum length",
@@ -68,6 +75,8 @@ const DisplayNames = {
68
75
  };
69
76
  export {
70
77
  DesignStates as D,
78
+ TestIds as T,
79
+ VALUE_MISSING_MESSAGE as V,
71
80
  DisplayNames as a,
72
81
  selectors as s
73
82
  };
@@ -4,6 +4,8 @@ const DisplayNames = {
4
4
  data: {
5
5
  value: "Selected date",
6
6
  endValue: "Selected end date",
7
+ defaultValue: "Default date",
8
+ defaultEndValue: "Default end date",
7
9
  onEndChange: "On End Change",
8
10
  selectionMode: {
9
11
  displayName: "Selection",
@@ -146,17 +148,22 @@ const TestIds = {
146
148
  calendarButton: "datepicker-calendar-button",
147
149
  clearButton: "datepicker-clear-button",
148
150
  calendar: "datepicker-calendar",
149
- tooltipButton: "datepicker-tooltip-button"
151
+ tooltipButton: "datepicker-tooltip-button",
152
+ errorMessage: "datepicker-error-message",
153
+ requiredIndicator: "datepicker-required-indicator"
150
154
  };
151
155
  const selectors = {
152
156
  root: "datePicker",
153
157
  label: "datePicker__label",
158
+ requiredIndicator: "datePicker__required-indicator",
154
159
  group: "datePicker__group",
155
160
  calendarButton: "datePicker__calendar-button",
156
161
  popover: "datePicker__popover",
157
162
  calendar: "datePicker__calendar",
158
- day: "datePicker__day"
163
+ day: "datePicker__day",
164
+ errorMessage: "datePicker__error-message"
159
165
  };
166
+ const VALUE_MISSING_MESSAGE = "This field is required";
160
167
  export {
161
168
  ARIA_LABEL_NAMESPACE as A,
162
169
  DesignStates as D,
@@ -165,6 +172,7 @@ export {
165
172
  PREVIEW_CALENDAR_OPEN as P,
166
173
  SelectionModeValues as S,
167
174
  TestIds as T,
175
+ VALUE_MISSING_MESSAGE as V,
168
176
  AriaLabels as a,
169
177
  DisplayNames as b,
170
178
  defaultValues as d,
@@ -1,4 +1,4 @@
1
- import React__default, { useRef, useCallback, useMemo, useContext, useState, forwardRef, createContext } from "react";
1
+ import React__default, { useRef, useCallback, useMemo, useContext, useState, forwardRef, createContext, useEffect } from "react";
2
2
  const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? React__default.useLayoutEffect : () => {
3
3
  };
4
4
  let $bdb11010cef70236$export$d41a04c74483c6ef = /* @__PURE__ */ new Map();
@@ -396,6 +396,125 @@ function $f39a9eba43920ace$export$86427a43e3e48ebb(fn) {
396
396
  function $f39a9eba43920ace$export$b5d7cc18bb8d2b59() {
397
397
  return useContext($f39a9eba43920ace$export$94b6d0abf7d33e8c);
398
398
  }
399
+ const $d805ff57cab8bee2$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
400
+ "Arab",
401
+ "Syrc",
402
+ "Samr",
403
+ "Mand",
404
+ "Thaa",
405
+ "Mend",
406
+ "Nkoo",
407
+ "Adlm",
408
+ "Rohg",
409
+ "Hebr"
410
+ ]);
411
+ const $d805ff57cab8bee2$var$RTL_LANGS = /* @__PURE__ */ new Set([
412
+ "ae",
413
+ "ar",
414
+ "arc",
415
+ "bcc",
416
+ "bqi",
417
+ "ckb",
418
+ "dv",
419
+ "fa",
420
+ "glk",
421
+ "he",
422
+ "ku",
423
+ "mzn",
424
+ "nqo",
425
+ "pnb",
426
+ "ps",
427
+ "sd",
428
+ "ug",
429
+ "ur",
430
+ "yi"
431
+ ]);
432
+ function $d805ff57cab8bee2$export$702d680b21cbd764(localeString) {
433
+ if (Intl.Locale) {
434
+ let locale = new Intl.Locale(localeString).maximize();
435
+ let textInfo = typeof locale.getTextInfo === "function" ? locale.getTextInfo() : locale.textInfo;
436
+ if (textInfo) return textInfo.direction === "rtl";
437
+ if (locale.script) return $d805ff57cab8bee2$var$RTL_SCRIPTS.has(locale.script);
438
+ }
439
+ let lang = localeString.split("-")[0];
440
+ return $d805ff57cab8bee2$var$RTL_LANGS.has(lang);
441
+ }
442
+ const $520a025cdb0d710d$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
443
+ function $520a025cdb0d710d$export$f09106e7c6677ec5() {
444
+ let locale = typeof window !== "undefined" && window[$520a025cdb0d710d$var$localeSymbol] || typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
445
+ try {
446
+ Intl.DateTimeFormat.supportedLocalesOf([
447
+ locale
448
+ ]);
449
+ } catch {
450
+ locale = "en-US";
451
+ }
452
+ return {
453
+ locale,
454
+ direction: $d805ff57cab8bee2$export$702d680b21cbd764(locale) ? "rtl" : "ltr"
455
+ };
456
+ }
457
+ let $520a025cdb0d710d$var$currentLocale = $520a025cdb0d710d$export$f09106e7c6677ec5();
458
+ let $520a025cdb0d710d$var$listeners = /* @__PURE__ */ new Set();
459
+ function $520a025cdb0d710d$var$updateLocale() {
460
+ $520a025cdb0d710d$var$currentLocale = $520a025cdb0d710d$export$f09106e7c6677ec5();
461
+ for (let listener of $520a025cdb0d710d$var$listeners) listener($520a025cdb0d710d$var$currentLocale);
462
+ }
463
+ function $520a025cdb0d710d$export$188ec29ebc2bdc3a() {
464
+ let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
465
+ let [defaultLocale, setDefaultLocale] = useState($520a025cdb0d710d$var$currentLocale);
466
+ useEffect(() => {
467
+ if ($520a025cdb0d710d$var$listeners.size === 0) window.addEventListener("languagechange", $520a025cdb0d710d$var$updateLocale);
468
+ $520a025cdb0d710d$var$listeners.add(setDefaultLocale);
469
+ return () => {
470
+ $520a025cdb0d710d$var$listeners.delete(setDefaultLocale);
471
+ if ($520a025cdb0d710d$var$listeners.size === 0) window.removeEventListener("languagechange", $520a025cdb0d710d$var$updateLocale);
472
+ };
473
+ }, []);
474
+ if (isSSR) {
475
+ let locale = typeof window !== "undefined" && window[$520a025cdb0d710d$var$localeSymbol];
476
+ return {
477
+ locale: locale || "en-US",
478
+ direction: "ltr"
479
+ };
480
+ }
481
+ return defaultLocale;
482
+ }
483
+ const $2eb8e6d23f3d0cb0$var$I18nContext = /* @__PURE__ */ React__default.createContext(null);
484
+ function $2eb8e6d23f3d0cb0$var$I18nProviderWithLocale(props) {
485
+ let { locale, children } = props;
486
+ let value = React__default.useMemo(() => ({
487
+ locale,
488
+ direction: $d805ff57cab8bee2$export$702d680b21cbd764(locale) ? "rtl" : "ltr"
489
+ }), [
490
+ locale
491
+ ]);
492
+ return /* @__PURE__ */ React__default.createElement($2eb8e6d23f3d0cb0$var$I18nContext.Provider, {
493
+ value
494
+ }, children);
495
+ }
496
+ function $2eb8e6d23f3d0cb0$var$I18nProviderWithDefaultLocale(props) {
497
+ let { children } = props;
498
+ let defaultLocale = $520a025cdb0d710d$export$188ec29ebc2bdc3a();
499
+ return /* @__PURE__ */ React__default.createElement($2eb8e6d23f3d0cb0$var$I18nContext.Provider, {
500
+ value: defaultLocale
501
+ }, children);
502
+ }
503
+ function $2eb8e6d23f3d0cb0$export$a54013f0d02a8f82(props) {
504
+ let { locale, children } = props;
505
+ if (locale) return /* @__PURE__ */ React__default.createElement($2eb8e6d23f3d0cb0$var$I18nProviderWithLocale, {
506
+ locale,
507
+ children
508
+ });
509
+ return /* @__PURE__ */ React__default.createElement($2eb8e6d23f3d0cb0$var$I18nProviderWithDefaultLocale, {
510
+ children
511
+ });
512
+ }
513
+ function $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7() {
514
+ let defaultLocale = $520a025cdb0d710d$export$188ec29ebc2bdc3a();
515
+ let context = useContext($2eb8e6d23f3d0cb0$var$I18nContext);
516
+ return context || defaultLocale;
517
+ }
399
518
  const $8e9d2fae0ecb9001$var$DOMPropNames = /* @__PURE__ */ new Set([
400
519
  "id"
401
520
  ]);
@@ -465,21 +584,23 @@ function $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, opts = {}) {
465
584
  return filteredProps;
466
585
  }
467
586
  export {
468
- $8e9d2fae0ecb9001$export$457c3d6518dd4c6f as $,
469
- $f39a9eba43920ace$export$86427a43e3e48ebb as a,
470
- $64fa3d84918910a7$export$29f1550f4b0d4415 as b,
471
- $64fa3d84918910a7$export$fabf2dc03a41866e as c,
472
- $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as d,
473
- $64fa3d84918910a7$export$ef03459518577ad4 as e,
474
- $64fa3d84918910a7$export$4d86445c2cf5e3 as f,
475
- $65484d02dcb7eb3e$export$457c3d6518dd4c6f as g,
476
- $64fa3d84918910a7$export$2881499e37b75b9a as h,
477
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as i,
478
- $c7eafbbe1ea5834e$export$535bd6ca7f90a273 as j,
479
- $df56164dff5785e2$export$4338b53315abf666 as k,
480
- $c7eafbbe1ea5834e$export$619500959fc48b26 as l,
481
- $f39a9eba43920ace$export$b5d7cc18bb8d2b59 as m,
482
- $3ef42575df84b30b$export$9d1611c77c2fe928 as n,
483
- $64fa3d84918910a7$export$c62b8e45d58ddad9 as o,
484
- $f39a9eba43920ace$export$8dc98ba7eadeaa56 as p
587
+ $2eb8e6d23f3d0cb0$export$a54013f0d02a8f82 as $,
588
+ $8e9d2fae0ecb9001$export$457c3d6518dd4c6f as a,
589
+ $f39a9eba43920ace$export$86427a43e3e48ebb as b,
590
+ $64fa3d84918910a7$export$29f1550f4b0d4415 as c,
591
+ $64fa3d84918910a7$export$fabf2dc03a41866e as d,
592
+ $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as e,
593
+ $64fa3d84918910a7$export$ef03459518577ad4 as f,
594
+ $64fa3d84918910a7$export$4d86445c2cf5e3 as g,
595
+ $65484d02dcb7eb3e$export$457c3d6518dd4c6f as h,
596
+ $64fa3d84918910a7$export$2881499e37b75b9a as i,
597
+ $c7eafbbe1ea5834e$export$619500959fc48b26 as j,
598
+ $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 as k,
599
+ $df56164dff5785e2$export$4338b53315abf666 as l,
600
+ $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as m,
601
+ $c7eafbbe1ea5834e$export$535bd6ca7f90a273 as n,
602
+ $f39a9eba43920ace$export$b5d7cc18bb8d2b59 as o,
603
+ $3ef42575df84b30b$export$9d1611c77c2fe928 as p,
604
+ $64fa3d84918910a7$export$c62b8e45d58ddad9 as q,
605
+ $f39a9eba43920ace$export$8dc98ba7eadeaa56 as r
485
606
  };
@@ -0,0 +1,73 @@
1
+ import { D as DATA } from "./chunk-JPMZBG44.js";
2
+ const MANIFEST_DEFAULT_VALIDATION_DISPLAY_NAMES = {
3
+ fieldValidity: "Field validity",
4
+ fieldValidityValid: "Valid",
5
+ fieldValidityValidationMessage: "Validation message",
6
+ showValidityIndication: "Show validity indication",
7
+ onValidate: "On Validate",
8
+ onValidityChange: "On Validity Change"
9
+ };
10
+ function manifestValidation({
11
+ valueDataType = DATA.DATA_TYPE.text,
12
+ displayNames = {}
13
+ } = {}) {
14
+ const names = {
15
+ ...MANIFEST_DEFAULT_VALIDATION_DISPLAY_NAMES,
16
+ ...displayNames
17
+ };
18
+ const fieldValidityItems = {
19
+ valid: {
20
+ dataType: DATA.DATA_TYPE.booleanValue,
21
+ displayName: names.fieldValidityValid
22
+ },
23
+ validationMessage: {
24
+ dataType: DATA.DATA_TYPE.text,
25
+ displayName: names.fieldValidityValidationMessage
26
+ }
27
+ // `flags` intentionally omitted — out of scope for phase 1.
28
+ };
29
+ return {
30
+ // ── injected validity (consumer/context-bound "verdict" channel) ──
31
+ fieldValidity: {
32
+ dataType: DATA.DATA_TYPE.data,
33
+ displayName: names.fieldValidity,
34
+ [DATA.DATA_TYPE.data]: {
35
+ items: fieldValidityItems
36
+ }
37
+ },
38
+ // ── display gate (controlled ⇒ form owns show/hide; omit ⇒ self-reveal on blur) ──
39
+ showValidityIndication: {
40
+ dataType: DATA.DATA_TYPE.booleanValue,
41
+ displayName: names.showValidityIndication
42
+ },
43
+ // ── validation callbacks (up) ──
44
+ onValidate: {
45
+ dataType: DATA.DATA_TYPE.function,
46
+ displayName: names.onValidate,
47
+ [DATA.DATA_TYPE.function]: {
48
+ parameters: [
49
+ { dataType: valueDataType },
50
+ // value
51
+ { dataType: DATA.DATA_TYPE.text }
52
+ // cause: 'mount' | 'change' | 'blur'
53
+ ]
54
+ }
55
+ },
56
+ onValidityChange: {
57
+ dataType: DATA.DATA_TYPE.function,
58
+ displayName: names.onValidityChange,
59
+ [DATA.DATA_TYPE.function]: {
60
+ parameters: [
61
+ {
62
+ dataType: DATA.DATA_TYPE.data,
63
+ // FieldValidity
64
+ [DATA.DATA_TYPE.data]: { items: fieldValidityItems }
65
+ }
66
+ ]
67
+ }
68
+ }
69
+ };
70
+ }
71
+ export {
72
+ manifestValidation as m
73
+ };
@@ -1,4 +1,4 @@
1
- import { a as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider.js";
1
+ import { k as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./filterDOMProps.js";
2
2
  import { useMemo } from "react";
3
3
  const $a747a10fe70a57da$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
4
4
  const $a747a10fe70a57da$var$stringsSymbol = Symbol.for("react-aria.i18n.strings");