@wix/editor-react-components 1.2288.0 → 1.2290.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 (155) hide show
  1. package/dist/site/components/AccordionComponent/component.js +1 -1
  2. package/dist/site/components/AccordionComponent/manifest.js +1 -1
  3. package/dist/site/components/AnimatedIcon/manifest.js +1 -1
  4. package/dist/site/components/AudioPlayer/component.js +14 -1112
  5. package/dist/site/components/AudioPlayer/manifest.js +1 -1
  6. package/dist/site/components/BoxContainer/component.js +1 -1
  7. package/dist/site/components/BoxContainer/manifest.js +1 -1
  8. package/dist/site/components/Breadcrumbs/component.js +3 -117
  9. package/dist/site/components/Breadcrumbs/manifest.js +1 -1
  10. package/dist/site/components/Button/manifest.js +1 -1
  11. package/dist/site/components/CollapsibleText/component.js +1 -1
  12. package/dist/site/components/CollapsibleText/manifest.js +1 -1
  13. package/dist/site/components/DatePicker/DatePicker.d.ts +3 -0
  14. package/dist/site/components/DatePicker/DatePicker.types.d.ts +91 -0
  15. package/dist/site/components/DatePicker/component.d.ts +2 -0
  16. package/dist/site/components/DatePicker/component.js +5644 -0
  17. package/dist/site/components/DatePicker/component.preview.d.ts +2 -0
  18. package/dist/site/components/DatePicker/components/DatePickerCalendar.d.ts +5 -0
  19. package/dist/site/components/DatePicker/components/DatePickerField.d.ts +6 -0
  20. package/dist/site/components/DatePicker/components/DatePickerLabel.d.ts +6 -0
  21. package/dist/site/components/DatePicker/components/DatePickerTooltip.d.ts +5 -0
  22. package/dist/site/components/DatePicker/constants.d.ts +177 -0
  23. package/dist/site/components/DatePicker/css.css +349 -0
  24. package/dist/site/components/DatePicker/datePickerUtils.d.ts +26 -0
  25. package/dist/site/components/DatePicker/hooks/useDateConstraints.d.ts +12 -0
  26. package/dist/site/components/DatePicker/hooks/useDatePickerValue.d.ts +15 -0
  27. package/dist/site/components/DatePicker/hooks/useUnavailableDates.d.ts +3 -0
  28. package/dist/site/components/DatePicker/index.d.ts +2 -0
  29. package/dist/site/components/DatePicker/index.js +6 -0
  30. package/dist/site/components/DatePicker/manifest.d.ts +5 -0
  31. package/dist/site/components/DatePicker/manifest.js +370 -0
  32. package/dist/site/components/Dropdown/component.js +2 -4
  33. package/dist/site/components/Dropdown/manifest.js +1 -1
  34. package/dist/site/components/HTMLComponent/component.js +1 -1
  35. package/dist/site/components/HipaaIcon/component.js +1 -1
  36. package/dist/site/components/HipaaIcon/manifest.js +1 -1
  37. package/dist/site/components/LinkBar/component.js +1 -1
  38. package/dist/site/components/LinkBar/manifest.js +1 -1
  39. package/dist/site/components/Logo/component.js +1 -1
  40. package/dist/site/components/Logo/manifest.js +1 -1
  41. package/dist/site/components/Logo/sdk.js +1 -1
  42. package/dist/site/components/Lottie/component.js +1 -1
  43. package/dist/site/components/Lottie/manifest.js +1 -1
  44. package/dist/site/components/Menu/component.js +1 -1
  45. package/dist/site/components/Menu/manifest.js +1 -1
  46. package/dist/site/components/MultiStateBox/component.js +1 -1
  47. package/dist/site/components/MultiStateBox/manifest.js +1 -1
  48. package/dist/site/components/ProgressBar/component.js +1 -1
  49. package/dist/site/components/ProgressBar/manifest.js +1 -1
  50. package/dist/site/components/ProgressBar/sdk.js +1 -1
  51. package/dist/site/components/Repeater/component.js +1 -1
  52. package/dist/site/components/Repeater/manifest.js +1 -1
  53. package/dist/site/components/ShareButtons/component.js +1 -1
  54. package/dist/site/components/ShareButtons/manifest.js +1 -1
  55. package/dist/site/components/Tabs/component.js +1 -1
  56. package/dist/site/components/Tabs/manifest.js +1 -1
  57. package/dist/site/components/TextBox/component.js +2 -5
  58. package/dist/site/components/TextBox/manifest.js +1 -1
  59. package/dist/site/components/TextEffects3d/component.js +1 -1
  60. package/dist/site/components/TextEffects3d/manifest.js +1 -1
  61. package/dist/site/components/TextEffectsBauhaus/component.js +1 -1
  62. package/dist/site/components/TextEffectsBauhaus/manifest.js +1 -1
  63. package/dist/site/components/TextEffectsGlass/component.js +1 -1
  64. package/dist/site/components/TextEffectsGlass/manifest.js +1 -1
  65. package/dist/site/components/TextEffectsGlitch/component.js +1 -1
  66. package/dist/site/components/TextEffectsGlitch/manifest.js +1 -1
  67. package/dist/site/components/TextEffectsLetterPress/component.js +1 -1
  68. package/dist/site/components/TextEffectsLetterPress/manifest.js +1 -1
  69. package/dist/site/components/TextEffectsMatrix/component.js +1 -1
  70. package/dist/site/components/TextEffectsMatrix/manifest.js +1 -1
  71. package/dist/site/components/TextEffectsNeonSign/component.js +1 -1
  72. package/dist/site/components/TextEffectsNeonSign/manifest.js +1 -1
  73. package/dist/site/components/TextEffectsNoisy/component.js +1 -1
  74. package/dist/site/components/TextEffectsNoisy/manifest.js +1 -1
  75. package/dist/site/components/TextEffectsOutlineOut/component.js +2 -2
  76. package/dist/site/components/TextEffectsOutlineOut/manifest.js +1 -1
  77. package/dist/site/components/TextEffectsRetro/component.js +1 -1
  78. package/dist/site/components/TextEffectsRetro/manifest.js +1 -1
  79. package/dist/site/components/TextEffectsShook/component.js +1 -1
  80. package/dist/site/components/TextEffectsShook/manifest.js +1 -1
  81. package/dist/site/components/TextEffectsSticker/component.js +1 -1
  82. package/dist/site/components/TextEffectsSticker/manifest.js +2 -2
  83. package/dist/site/components/TextEffectsStriped/component.js +1 -1
  84. package/dist/site/components/TextEffectsStriped/manifest.js +1 -1
  85. package/dist/site/components/TextInput/component.js +173 -465
  86. package/dist/site/components/TextInput/manifest.js +1 -1
  87. package/dist/site/components/TimePicker/TimePicker.d.ts +3 -0
  88. package/dist/site/components/TimePicker/TimePicker.types.d.ts +29 -0
  89. package/dist/site/components/TimePicker/component.d.ts +2 -0
  90. package/dist/site/components/TimePicker/component.js +146 -0
  91. package/dist/site/components/TimePicker/component.preview.d.ts +2 -0
  92. package/dist/site/components/TimePicker/components/TimePickerField.d.ts +4 -0
  93. package/dist/site/components/TimePicker/constants.d.ts +32 -0
  94. package/dist/site/components/TimePicker/css.css +64 -0
  95. package/dist/site/components/TimePicker/hooks/useTimePickerValue.d.ts +10 -0
  96. package/dist/site/components/TimePicker/index.d.ts +2 -0
  97. package/dist/site/components/TimePicker/index.js +6 -0
  98. package/dist/site/components/TimePicker/manifest.d.ts +5 -0
  99. package/dist/site/components/TimePicker/manifest.js +113 -0
  100. package/dist/site/components/TimePicker/timePickerUtils.d.ts +15 -0
  101. package/dist/site/components/chunks/AnimatedIcon.js +1 -1
  102. package/dist/site/components/chunks/Button.js +1 -1
  103. package/dist/site/components/chunks/Button2.js +299 -0
  104. package/dist/site/components/chunks/DateField.js +6763 -0
  105. package/dist/site/components/chunks/DismissSmall.js +7 -0
  106. package/dist/site/components/chunks/Group.js +60 -101
  107. package/dist/site/components/chunks/I18nProvider.js +32 -2
  108. package/dist/site/components/chunks/InfoCircleSmall.js +7 -0
  109. package/dist/site/components/chunks/Input.js +341 -0
  110. package/dist/site/components/chunks/Patterns.js +1 -1
  111. package/dist/site/components/chunks/TextEffectsShared.js +1 -1
  112. package/dist/site/components/chunks/constants10.js +14 -12
  113. package/dist/site/components/chunks/constants11.js +9 -9
  114. package/dist/site/components/chunks/constants12.js +10 -8
  115. package/dist/site/components/chunks/constants13.js +9 -13
  116. package/dist/site/components/chunks/constants14.js +14 -17
  117. package/dist/site/components/chunks/constants15.js +17 -12
  118. package/dist/site/components/chunks/constants16.js +11 -13
  119. package/dist/site/components/chunks/constants17.js +20 -66
  120. package/dist/site/components/chunks/constants18.js +67 -17
  121. package/dist/site/components/chunks/constants19.js +15 -50
  122. package/dist/site/components/chunks/constants2.js +30 -50
  123. package/dist/site/components/chunks/constants20.js +43 -45
  124. package/dist/site/components/chunks/constants21.js +48 -297
  125. package/dist/site/components/chunks/constants22.js +299 -41
  126. package/dist/site/components/chunks/constants23.js +44 -29
  127. package/dist/site/components/chunks/constants24.js +32 -17
  128. package/dist/site/components/chunks/constants25.js +16 -402
  129. package/dist/site/components/chunks/constants26.js +393 -73
  130. package/dist/site/components/chunks/constants27.js +80 -15
  131. package/dist/site/components/chunks/constants28.js +11 -42
  132. package/dist/site/components/chunks/constants29.js +44 -23
  133. package/dist/site/components/chunks/constants3.js +49 -14
  134. package/dist/site/components/chunks/constants30.js +28 -10
  135. package/dist/site/components/chunks/constants31.js +10 -132
  136. package/dist/site/components/chunks/constants32.js +114 -46
  137. package/dist/site/components/chunks/constants33.js +154 -69
  138. package/dist/site/components/chunks/constants34.js +59 -81
  139. package/dist/site/components/chunks/constants35.js +73 -58
  140. package/dist/site/components/chunks/constants36.js +91 -0
  141. package/dist/site/components/chunks/constants37.js +72 -0
  142. package/dist/site/components/chunks/constants4.js +10 -19
  143. package/dist/site/components/chunks/constants5.js +14 -14
  144. package/dist/site/components/chunks/constants6.js +11 -10
  145. package/dist/site/components/chunks/constants7.js +14 -14
  146. package/dist/site/components/chunks/constants8.js +22 -65
  147. package/dist/site/components/chunks/constants9.js +65 -20
  148. package/dist/site/components/chunks/filterDOMProps.js +15 -9
  149. package/dist/site/components/chunks/manifestBase.js +1 -1
  150. package/dist/site/components/chunks/useFocusable.js +118 -0
  151. package/dist/site/components/chunks/useLocalizedStringFormatter.js +122 -0
  152. package/dist/site/components/chunks/usePress.js +825 -0
  153. package/dist/site/components/chunks/utils.js +1 -1
  154. package/dist/site/components/extensions.js +59 -49
  155. package/package.json +4 -3
@@ -0,0 +1,122 @@
1
+ import { a as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7 } from "./I18nProvider.js";
2
+ import { useMemo } from "react";
3
+ const $a747a10fe70a57da$var$localeSymbol = Symbol.for("react-aria.i18n.locale");
4
+ const $a747a10fe70a57da$var$stringsSymbol = Symbol.for("react-aria.i18n.strings");
5
+ let $a747a10fe70a57da$var$cachedGlobalStrings = void 0;
6
+ class $a747a10fe70a57da$export$c17fa47878dc55b6 {
7
+ constructor(messages, defaultLocale = "en-US") {
8
+ this.strings = Object.fromEntries(Object.entries(messages).filter(([, v]) => v));
9
+ this.defaultLocale = defaultLocale;
10
+ }
11
+ /** Returns a localized string for the given key and locale. */
12
+ getStringForLocale(key, locale) {
13
+ let strings = this.getStringsForLocale(locale);
14
+ let string = strings[key];
15
+ if (!string) throw new Error(`Could not find intl message ${key} in ${locale} locale`);
16
+ return string;
17
+ }
18
+ /** Returns all localized strings for the given locale. */
19
+ getStringsForLocale(locale) {
20
+ let strings = this.strings[locale];
21
+ if (!strings) {
22
+ strings = $a747a10fe70a57da$var$getStringsForLocale(locale, this.strings, this.defaultLocale);
23
+ this.strings[locale] = strings;
24
+ }
25
+ return strings;
26
+ }
27
+ static getGlobalDictionaryForPackage(packageName) {
28
+ if (typeof window === "undefined") return null;
29
+ let locale = window[$a747a10fe70a57da$var$localeSymbol];
30
+ if ($a747a10fe70a57da$var$cachedGlobalStrings === void 0) {
31
+ let globalStrings = window[$a747a10fe70a57da$var$stringsSymbol];
32
+ if (!globalStrings) return null;
33
+ $a747a10fe70a57da$var$cachedGlobalStrings = {};
34
+ for (let pkg in globalStrings) $a747a10fe70a57da$var$cachedGlobalStrings[pkg] = new $a747a10fe70a57da$export$c17fa47878dc55b6({
35
+ [locale]: globalStrings[pkg]
36
+ }, locale);
37
+ }
38
+ let dictionary = $a747a10fe70a57da$var$cachedGlobalStrings == null ? void 0 : $a747a10fe70a57da$var$cachedGlobalStrings[packageName];
39
+ if (!dictionary) throw new Error(`Strings for package "${packageName}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);
40
+ return dictionary;
41
+ }
42
+ }
43
+ function $a747a10fe70a57da$var$getStringsForLocale(locale, strings, defaultLocale = "en-US") {
44
+ if (strings[locale]) return strings[locale];
45
+ let language = $a747a10fe70a57da$var$getLanguage(locale);
46
+ if (strings[language]) return strings[language];
47
+ for (let key in strings) {
48
+ if (key.startsWith(language + "-")) return strings[key];
49
+ }
50
+ return strings[defaultLocale];
51
+ }
52
+ function $a747a10fe70a57da$var$getLanguage(locale) {
53
+ if (Intl.Locale)
54
+ return new Intl.Locale(locale).language;
55
+ return locale.split("-")[0];
56
+ }
57
+ const $b27c684a33948c64$var$pluralRulesCache = /* @__PURE__ */ new Map();
58
+ const $b27c684a33948c64$var$numberFormatCache = /* @__PURE__ */ new Map();
59
+ class $b27c684a33948c64$export$2f817fcdc4b89ae0 {
60
+ constructor(locale, strings) {
61
+ this.locale = locale;
62
+ this.strings = strings;
63
+ }
64
+ /** Formats a localized string for the given key with the provided variables. */
65
+ format(key, variables) {
66
+ let message = this.strings.getStringForLocale(key, this.locale);
67
+ return typeof message === "function" ? message(variables, this) : message;
68
+ }
69
+ plural(count, options, type = "cardinal") {
70
+ let opt = options["=" + count];
71
+ if (opt) return typeof opt === "function" ? opt() : opt;
72
+ let key = this.locale + ":" + type;
73
+ let pluralRules = $b27c684a33948c64$var$pluralRulesCache.get(key);
74
+ if (!pluralRules) {
75
+ pluralRules = new Intl.PluralRules(this.locale, {
76
+ type
77
+ });
78
+ $b27c684a33948c64$var$pluralRulesCache.set(key, pluralRules);
79
+ }
80
+ let selected = pluralRules.select(count);
81
+ opt = options[selected] || options.other;
82
+ return typeof opt === "function" ? opt() : opt;
83
+ }
84
+ number(value) {
85
+ let numberFormat = $b27c684a33948c64$var$numberFormatCache.get(this.locale);
86
+ if (!numberFormat) {
87
+ numberFormat = new Intl.NumberFormat(this.locale);
88
+ $b27c684a33948c64$var$numberFormatCache.set(this.locale, numberFormat);
89
+ }
90
+ return numberFormat.format(value);
91
+ }
92
+ select(options, value) {
93
+ let opt = options[value] || options.other;
94
+ return typeof opt === "function" ? opt() : opt;
95
+ }
96
+ }
97
+ const $cf2482eff2eeeec2$var$cache = /* @__PURE__ */ new WeakMap();
98
+ function $cf2482eff2eeeec2$var$getCachedDictionary(strings) {
99
+ let dictionary = $cf2482eff2eeeec2$var$cache.get(strings);
100
+ if (!dictionary) {
101
+ dictionary = new $a747a10fe70a57da$export$c17fa47878dc55b6(strings);
102
+ $cf2482eff2eeeec2$var$cache.set(strings, dictionary);
103
+ }
104
+ return dictionary;
105
+ }
106
+ function $cf2482eff2eeeec2$export$87b761675e8eaa10(strings, packageName) {
107
+ return packageName && $a747a10fe70a57da$export$c17fa47878dc55b6.getGlobalDictionaryForPackage(packageName) || $cf2482eff2eeeec2$var$getCachedDictionary(strings);
108
+ }
109
+ function $cf2482eff2eeeec2$export$f12b703ca79dfbb1(strings, packageName) {
110
+ let { locale } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
111
+ let dictionary = $cf2482eff2eeeec2$export$87b761675e8eaa10(strings, packageName);
112
+ return useMemo(() => new $b27c684a33948c64$export$2f817fcdc4b89ae0(locale, dictionary), [
113
+ locale,
114
+ dictionary
115
+ ]);
116
+ }
117
+ export {
118
+ $cf2482eff2eeeec2$export$f12b703ca79dfbb1 as $,
119
+ $cf2482eff2eeeec2$export$87b761675e8eaa10 as a,
120
+ $a747a10fe70a57da$export$c17fa47878dc55b6 as b,
121
+ $b27c684a33948c64$export$2f817fcdc4b89ae0 as c
122
+ };