@wix/editor-react-components 1.2763.0 → 1.2765.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.
- package/dist/site/components/AccordionComponent/manifest.js +1 -1
- package/dist/site/components/AudioPlayer/component.js +4 -3
- package/dist/site/components/AudioPlayer/manifest.js +1 -1
- package/dist/site/components/BoxContainer/component.js +2 -2
- package/dist/site/components/Breadcrumbs/component.js +3 -3
- package/dist/site/components/Breadcrumbs/manifest.js +1 -1
- package/dist/site/components/Button/component.js +1 -1
- package/dist/site/components/Button/manifest.js +1 -1
- package/dist/site/components/Checkbox/component.js +2 -2
- package/dist/site/components/CheckboxGroup/component.js +2 -2
- package/dist/site/components/CollapsibleText/component.js +2 -2
- package/dist/site/components/CollapsibleText/manifest.js +1 -1
- package/dist/site/components/DatePicker/component.js +6 -4
- package/dist/site/components/Dropdown/component.js +1 -1
- package/dist/site/components/Dropdown/manifest.js +1 -1
- package/dist/site/components/GoogleMap/manifest.js +1 -1
- package/dist/site/components/HTMLComponent/manifest.js +1 -1
- package/dist/site/components/HeadingTextBlock/component.js +2 -2
- package/dist/site/components/HipaaIcon/component.js +1 -1
- package/dist/site/components/Image3/component.js +1 -1
- package/dist/site/components/Image3/component.preview.d.ts +1 -3
- package/dist/site/components/Image3/manifest.js +1 -4
- package/dist/site/components/ImageReveal/component.js +2 -2
- package/dist/site/components/LegacyAppWidget/component.js +1 -1
- package/dist/site/components/LegacyContainer/component.js +1 -1
- package/dist/site/components/LegacyMultiStateBox/component.js +2 -2
- package/dist/site/components/Line/component.js +1 -1
- package/dist/site/components/LinkBar/manifest.js +1 -1
- package/dist/site/components/Lottie/component.js +1 -1
- package/dist/site/components/Lottie/manifest.js +1 -1
- package/dist/site/components/MarkdownBlock/component.js +1 -1
- package/dist/site/components/Menu/component.js +3 -3
- package/dist/site/components/Menu/manifest.js +1 -1
- package/dist/site/components/MultiStateBox/manifest.js +1 -1
- package/dist/site/components/RadioButtons/component.js +2 -2
- package/dist/site/components/ShareButtons/component.js +1 -1
- package/dist/site/components/ShareButtons/manifest.js +1 -1
- package/dist/site/components/Slideshow/component.js +1 -1
- package/dist/site/components/Slideshow/manifest.js +1 -1
- package/dist/site/components/Tabs/manifest.js +1 -1
- package/dist/site/components/TestComp/manifest.js +1 -1
- package/dist/site/components/TextBox/component.js +1 -1
- package/dist/site/components/TextEffects3d/component.js +1 -1
- package/dist/site/components/TextEffectsBauhaus/component.js +1 -1
- package/dist/site/components/TextEffectsGlass/component.js +1 -1
- package/dist/site/components/TextEffectsGlitch/component.js +1 -1
- package/dist/site/components/TextEffectsLetterPress/component.js +1 -1
- package/dist/site/components/TextEffectsMatrix/component.js +1 -1
- package/dist/site/components/TextEffectsNeonSign/component.js +1 -1
- package/dist/site/components/TextEffectsNoisy/component.js +1 -1
- package/dist/site/components/TextEffectsOutlineOut/component.js +1 -1
- package/dist/site/components/TextEffectsRetro/component.js +1 -1
- package/dist/site/components/TextEffectsShook/component.js +1 -1
- package/dist/site/components/TextEffectsSticker/component.js +1 -1
- package/dist/site/components/TextEffectsStriped/component.js +1 -1
- package/dist/site/components/TextInput/TextInput.d.ts +3 -7
- package/dist/site/components/TextInput/TextInput.types.d.ts +38 -105
- package/dist/site/components/TextInput/component.js +104 -780
- package/dist/site/components/TextInput/component.preview.d.ts +1 -4
- package/dist/site/components/TextInput/constants.d.ts +17 -65
- package/dist/site/components/TextInput/css.css +25 -223
- package/dist/site/components/TextInput/manifest.js +181 -367
- package/dist/site/components/TimePicker/component.js +6 -5
- package/dist/site/components/chunks/AnimatedIcon.js +1 -1
- package/dist/site/components/chunks/Button.js +1055 -466
- package/dist/site/components/chunks/Button2.js +486 -0
- package/dist/site/components/chunks/Group.js +46 -970
- package/dist/site/components/chunks/I18nProvider.js +125 -0
- package/dist/site/components/chunks/Input.js +369 -0
- package/dist/site/components/chunks/Link.js +1 -1
- package/dist/site/components/chunks/ResponsiveBox.js +1 -1
- package/dist/site/components/chunks/ResponsiveContainer.js +1 -1
- package/dist/site/components/chunks/TextEffectsShared.js +1 -1
- package/dist/site/components/chunks/Tooltip.js +6745 -351
- package/dist/site/components/chunks/VisuallyHidden.js +1 -1
- package/dist/site/components/chunks/a11y.js +4 -5
- package/dist/site/components/chunks/constants3.js +23 -63
- package/dist/site/components/chunks/filterDOMProps.js +18 -139
- package/dist/site/components/chunks/index10.js +3 -2020
- package/dist/site/components/chunks/index11.js +31184 -232
- package/dist/site/components/chunks/index12.js +3 -31191
- package/dist/site/components/chunks/index13.js +44 -3
- package/dist/site/components/chunks/index3.js +1 -1
- package/dist/site/components/chunks/index4.js +1 -1
- package/dist/site/components/chunks/index5.js +1 -1
- package/dist/site/components/chunks/index7.js +67 -3
- package/dist/site/components/chunks/index8.js +2020 -3
- package/dist/site/components/chunks/index9.js +232 -60
- package/dist/site/components/chunks/manifestSdkMixins.js +4 -4
- package/dist/site/components/chunks/parseHtml.js +1 -1
- package/dist/site/components/chunks/parseSvg.js +1 -1
- package/dist/site/components/chunks/staticService.js +1 -1
- package/dist/site/components/chunks/useConsentPolicyProps.js +1 -1
- package/dist/site/components/chunks/useLocalizedStringFormatter.js +1 -1
- package/package.json +2 -2
- package/dist/site/components/TextInput/TextInput.viewer.constants.d.ts +0 -24
- package/dist/site/components/TextInput/sdk.d.ts +0 -4
- package/dist/site/components/TextInput/sdk.js +0 -91
- package/dist/site/components/TextInput/utils.d.ts +0 -9
- package/dist/site/components/chunks/DateField.js +0 -6762
- package/dist/site/components/chunks/NumberFormatter.js +0 -140
- package/dist/site/components/chunks/index14.js +0 -46
|
@@ -1,140 +0,0 @@
|
|
|
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,46 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as clsx } from "./clsx.js";
|
|
3
|
-
import * as React from "react";
|
|
4
|
-
const Typography_module = {
|
|
5
|
-
h1: "h1-go2_mI",
|
|
6
|
-
h2: "h2-dAyvwd",
|
|
7
|
-
h3: "h3-LClqyK",
|
|
8
|
-
h4: "h4-pzBHGr",
|
|
9
|
-
h5: "h5-HOx5Wp",
|
|
10
|
-
h6: "h6-zCNm1M",
|
|
11
|
-
p1: "p1-pY02jM",
|
|
12
|
-
p2: "p2-TsZIq5",
|
|
13
|
-
p3: "p3-N6QdAQ"
|
|
14
|
-
};
|
|
15
|
-
const variantToElementTagMap = {
|
|
16
|
-
h1: "h1",
|
|
17
|
-
h2: "h2",
|
|
18
|
-
h3: "h3",
|
|
19
|
-
h4: "h4",
|
|
20
|
-
h5: "h5",
|
|
21
|
-
h6: "h6",
|
|
22
|
-
p1: "p",
|
|
23
|
-
p2: "p",
|
|
24
|
-
p3: "p"
|
|
25
|
-
};
|
|
26
|
-
const Typography = /* @__PURE__ */ React.forwardRef(({ variant = "p2", render: renderProp, className, ...props }, ref) => {
|
|
27
|
-
const variantClass = Typography_module[variant];
|
|
28
|
-
if (renderProp) {
|
|
29
|
-
const { className: renderClassName, ...renderElementProps } = renderProp.props;
|
|
30
|
-
return /* @__PURE__ */ React.cloneElement(renderProp, {
|
|
31
|
-
...renderElementProps,
|
|
32
|
-
...props,
|
|
33
|
-
ref,
|
|
34
|
-
className: clsx(variantClass, renderClassName, className)
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
const Tag = variantToElementTagMap[variant];
|
|
38
|
-
return /* @__PURE__ */ jsx(Tag, {
|
|
39
|
-
ref,
|
|
40
|
-
className: clsx(variantClass, className),
|
|
41
|
-
...props
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
export {
|
|
45
|
-
Typography as T
|
|
46
|
-
};
|