@wix/editor-react-components 1.2765.0 → 1.2767.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/component.js +80 -3
- package/dist/site/components/AudioPlayer/manifest.js +1 -1
- package/dist/site/components/Checkbox/component.js +1 -2
- package/dist/site/components/CheckboxGroup/component.js +1 -2
- package/dist/site/components/DatePicker/component.js +2 -4
- package/dist/site/components/Dropdown/Dropdown.d.ts +1 -1
- package/dist/site/components/Dropdown/Dropdown.types.d.ts +22 -89
- package/dist/site/components/Dropdown/component.js +205 -873
- package/dist/site/components/Dropdown/constants.d.ts +26 -168
- package/dist/site/components/Dropdown/css.css +52 -462
- package/dist/site/components/Dropdown/manifest.js +338 -441
- package/dist/site/components/Line/manifest.js +39 -3
- package/dist/site/components/RadioButtons/component.js +1 -2
- package/dist/site/components/TextBox/component.js +1 -2
- package/dist/site/components/TimePicker/component.js +2 -4
- package/dist/site/components/chunks/DismissSmall.js +7727 -1
- package/dist/site/components/chunks/RequiredIndicator.js +4 -0
- package/dist/site/components/chunks/constants36.js +31 -148
- package/dist/site/components/chunks/index11.js +0 -66
- package/dist/site/components/chunks/isObjectLike.js +15 -5
- package/dist/site/components/chunks/manifestSdkMixins.js +1 -14
- package/dist/site/components/chunks/types.impl.js +26 -1
- package/package.json +3 -3
- package/dist/site/components/Dropdown/component.preview.d.ts +0 -9
- package/dist/site/components/Dropdown/components/DropdownChips.d.ts +0 -8
- package/dist/site/components/Dropdown/components/DropdownList.d.ts +0 -20
- package/dist/site/components/Dropdown/components/DropdownTrigger.d.ts +0 -22
- package/dist/site/components/Dropdown/dropdownUtils.d.ts +0 -22
- package/dist/site/components/Dropdown/hooks/useChipOverflow.d.ts +0 -9
- package/dist/site/components/Dropdown/hooks/useDropdownQuery.d.ts +0 -15
- package/dist/site/components/Dropdown/hooks/useDropdownSelection.d.ts +0 -16
- package/dist/site/components/chunks/InfoCircleSmall.js +0 -7
- package/dist/site/components/chunks/Tooltip.js +0 -7728
- package/dist/site/components/chunks/_baseSlice.js +0 -43
- package/dist/site/components/chunks/isArray.js +0 -12
- package/dist/site/components/chunks/isArrayLike.js +0 -88
|
@@ -6,10 +6,20 @@ import { c as clsx } from "../chunks/clsx.js";
|
|
|
6
6
|
import AnimatedIconWithReducedMotion from "../AnimatedIcon/component.js";
|
|
7
7
|
import { D as DesignStates, a as DEFAULT_PROPS } from "../chunks/constants43.js";
|
|
8
8
|
import { g as getDefaultExportFromCjs } from "../chunks/_commonjsHelpers.js";
|
|
9
|
-
import {
|
|
10
|
-
import { c as require_root, r as require_Symbol, a as require_baseGetTag, b as requireIsObjectLike, d as require_freeGlobal } from "../chunks/isObjectLike.js";
|
|
11
|
-
import { r as requireIsArray } from "../chunks/isArray.js";
|
|
9
|
+
import { r as require_baseGetTag, d as require_root, b as require_Symbol, c as requireIsArray, a as requireIsObjectLike, e as require_freeGlobal } from "../chunks/isObjectLike.js";
|
|
12
10
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
11
|
+
var isObject_1;
|
|
12
|
+
var hasRequiredIsObject;
|
|
13
|
+
function requireIsObject() {
|
|
14
|
+
if (hasRequiredIsObject) return isObject_1;
|
|
15
|
+
hasRequiredIsObject = 1;
|
|
16
|
+
function isObject(value) {
|
|
17
|
+
var type = typeof value;
|
|
18
|
+
return value != null && (type == "object" || type == "function");
|
|
19
|
+
}
|
|
20
|
+
isObject_1 = isObject;
|
|
21
|
+
return isObject_1;
|
|
22
|
+
}
|
|
13
23
|
var _overArg;
|
|
14
24
|
var hasRequired_overArg;
|
|
15
25
|
function require_overArg() {
|
|
@@ -50,6 +60,17 @@ function require_listCacheClear() {
|
|
|
50
60
|
_listCacheClear = listCacheClear;
|
|
51
61
|
return _listCacheClear;
|
|
52
62
|
}
|
|
63
|
+
var eq_1;
|
|
64
|
+
var hasRequiredEq;
|
|
65
|
+
function requireEq() {
|
|
66
|
+
if (hasRequiredEq) return eq_1;
|
|
67
|
+
hasRequiredEq = 1;
|
|
68
|
+
function eq(value, other) {
|
|
69
|
+
return value === other || value !== value && other !== other;
|
|
70
|
+
}
|
|
71
|
+
eq_1 = eq;
|
|
72
|
+
return eq_1;
|
|
73
|
+
}
|
|
53
74
|
var _assocIndexOf;
|
|
54
75
|
var hasRequired_assocIndexOf;
|
|
55
76
|
function require_assocIndexOf() {
|
|
@@ -207,6 +228,23 @@ function require_stackHas() {
|
|
|
207
228
|
_stackHas = stackHas;
|
|
208
229
|
return _stackHas;
|
|
209
230
|
}
|
|
231
|
+
var isFunction_1;
|
|
232
|
+
var hasRequiredIsFunction;
|
|
233
|
+
function requireIsFunction() {
|
|
234
|
+
if (hasRequiredIsFunction) return isFunction_1;
|
|
235
|
+
hasRequiredIsFunction = 1;
|
|
236
|
+
var baseGetTag = require_baseGetTag(), isObject = requireIsObject();
|
|
237
|
+
var asyncTag = "[object AsyncFunction]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]";
|
|
238
|
+
function isFunction2(value) {
|
|
239
|
+
if (!isObject(value)) {
|
|
240
|
+
return false;
|
|
241
|
+
}
|
|
242
|
+
var tag = baseGetTag(value);
|
|
243
|
+
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
|
|
244
|
+
}
|
|
245
|
+
isFunction_1 = isFunction2;
|
|
246
|
+
return isFunction_1;
|
|
247
|
+
}
|
|
210
248
|
var _coreJsData;
|
|
211
249
|
var hasRequired_coreJsData;
|
|
212
250
|
function require_coreJsData() {
|
|
@@ -942,6 +980,33 @@ function requireIsBuffer() {
|
|
|
942
980
|
})(isBuffer, isBuffer.exports);
|
|
943
981
|
return isBuffer.exports;
|
|
944
982
|
}
|
|
983
|
+
var _isIndex;
|
|
984
|
+
var hasRequired_isIndex;
|
|
985
|
+
function require_isIndex() {
|
|
986
|
+
if (hasRequired_isIndex) return _isIndex;
|
|
987
|
+
hasRequired_isIndex = 1;
|
|
988
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
989
|
+
var reIsUint = /^(?:0|[1-9]\d*)$/;
|
|
990
|
+
function isIndex(value, length) {
|
|
991
|
+
var type = typeof value;
|
|
992
|
+
length = length == null ? MAX_SAFE_INTEGER : length;
|
|
993
|
+
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
|
|
994
|
+
}
|
|
995
|
+
_isIndex = isIndex;
|
|
996
|
+
return _isIndex;
|
|
997
|
+
}
|
|
998
|
+
var isLength_1;
|
|
999
|
+
var hasRequiredIsLength;
|
|
1000
|
+
function requireIsLength() {
|
|
1001
|
+
if (hasRequiredIsLength) return isLength_1;
|
|
1002
|
+
hasRequiredIsLength = 1;
|
|
1003
|
+
var MAX_SAFE_INTEGER = 9007199254740991;
|
|
1004
|
+
function isLength(value) {
|
|
1005
|
+
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
|
|
1006
|
+
}
|
|
1007
|
+
isLength_1 = isLength;
|
|
1008
|
+
return isLength_1;
|
|
1009
|
+
}
|
|
945
1010
|
var _baseIsTypedArray;
|
|
946
1011
|
var hasRequired_baseIsTypedArray;
|
|
947
1012
|
function require_baseIsTypedArray() {
|
|
@@ -1079,6 +1144,18 @@ function require_baseKeys() {
|
|
|
1079
1144
|
_baseKeys = baseKeys;
|
|
1080
1145
|
return _baseKeys;
|
|
1081
1146
|
}
|
|
1147
|
+
var isArrayLike_1;
|
|
1148
|
+
var hasRequiredIsArrayLike;
|
|
1149
|
+
function requireIsArrayLike() {
|
|
1150
|
+
if (hasRequiredIsArrayLike) return isArrayLike_1;
|
|
1151
|
+
hasRequiredIsArrayLike = 1;
|
|
1152
|
+
var isFunction2 = requireIsFunction(), isLength = requireIsLength();
|
|
1153
|
+
function isArrayLike(value) {
|
|
1154
|
+
return value != null && isLength(value.length) && !isFunction2(value);
|
|
1155
|
+
}
|
|
1156
|
+
isArrayLike_1 = isArrayLike;
|
|
1157
|
+
return isArrayLike_1;
|
|
1158
|
+
}
|
|
1082
1159
|
var keys_1;
|
|
1083
1160
|
var hasRequiredKeys;
|
|
1084
1161
|
function requireKeys() {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { b as DISPLAY_GROUPS, N as NativeStateType, C as CSS_PROPERTIES, E as ELEMENTS, D as DATA, I as INTERACTIONS, L as LAYOUT, A as Archetype } from "../chunks/chunk-EVX7ZUBD.js";
|
|
2
|
-
import { b as manifestMouseHover,
|
|
2
|
+
import { b as manifestMouseHover, e as manifestMediaProgress, d as manifestPlayable } from "../chunks/manifestSdkMixins.js";
|
|
3
3
|
import { D as DesignStates, a as DisplayNames, s as selectors, b as borderDefaultValue } from "../chunks/constants42.js";
|
|
4
4
|
import manifest$1 from "../Image3/manifest.js";
|
|
5
5
|
import { w as withSpec } from "../chunks/manifest.js";
|
|
@@ -6,12 +6,11 @@ import { useService } from "@wix/services-manager-react";
|
|
|
6
6
|
import { E as EnvironmentDefinition } from "../chunks/index2.js";
|
|
7
7
|
import { f as formatClassNames } from "../chunks/classNames.js";
|
|
8
8
|
import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
9
|
-
import { u as useValidatedField, R as RequiredIndicator } from "../chunks/RequiredIndicator.js";
|
|
9
|
+
import { u as useValidatedField, R as RequiredIndicator, I as InfoCircleSmall_default } from "../chunks/RequiredIndicator.js";
|
|
10
10
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
11
11
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
12
12
|
import { a as accessibilityStyles } from "../chunks/accessibility.module.js";
|
|
13
13
|
import { d as defaultValues, s as selectors, T as TestIds, V as VALUE_MISSING_MESSAGE, a as semanticClassNames } from "../chunks/constants40.js";
|
|
14
|
-
import { I as InfoCircleSmall_default } from "../chunks/InfoCircleSmall.js";
|
|
15
14
|
const root = "root__0DpH8";
|
|
16
15
|
const field = "field__R0D8f";
|
|
17
16
|
const item = "item__EzhwB";
|
|
@@ -6,11 +6,10 @@ import { useService } from "@wix/services-manager-react";
|
|
|
6
6
|
import { E as EnvironmentDefinition } from "../chunks/index2.js";
|
|
7
7
|
import { f as formatClassNames } from "../chunks/classNames.js";
|
|
8
8
|
import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
9
|
-
import { u as useValidatedField, R as RequiredIndicator } from "../chunks/RequiredIndicator.js";
|
|
9
|
+
import { u as useValidatedField, R as RequiredIndicator, I as InfoCircleSmall_default } from "../chunks/RequiredIndicator.js";
|
|
10
10
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
11
11
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
12
12
|
import { d as defaultValues, a as defaultOptions, s as selectors, T as TestIds, V as VALUE_MISSING_MESSAGE, b as semanticClassNames } from "../chunks/constants39.js";
|
|
13
|
-
import { I as InfoCircleSmall_default } from "../chunks/InfoCircleSmall.js";
|
|
14
13
|
const root = "root__raraS";
|
|
15
14
|
const fieldset = "fieldset__pDERL";
|
|
16
15
|
const labelRow = "labelRow__CTw2X";
|
|
@@ -5,7 +5,7 @@ import { c as clsx } from "../chunks/clsx.js";
|
|
|
5
5
|
import { b as $d27d541f9569d26d$export$45712eceda6fad21, d as $24f9a20f226ad820$export$5165eccb35aaadb5, e as $2b2d34ff061957fb$export$2b85b721e524d74b, f as $d2b4bc8c273e7be6$export$24d547caef80ccd1, $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../chunks/Button.js";
|
|
6
6
|
import { $ as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, j as $c7eafbbe1ea5834e$export$535bd6ca7f90a273, b as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$4d86445c2cf5e3, g as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, h as $64fa3d84918910a7$export$2881499e37b75b9a, c as $64fa3d84918910a7$export$fabf2dc03a41866e, m as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, i as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, n as $3ef42575df84b30b$export$9d1611c77c2fe928, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, d as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, e as $64fa3d84918910a7$export$ef03459518577ad4 } from "../chunks/filterDOMProps.js";
|
|
7
7
|
import { c as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, l as $fd2148440a13ec26$export$a763b9476acd3eb, m as $fd2148440a13ec26$export$dad6ae84456c676a, j as $fd2148440a13ec26$export$75ee7c75d68f5b0e, b as $fd2148440a13ec26$export$fc1a364ae1f3ff10, g as $514c0188e459b4c0$export$9afb8bc826b033ea, e as $d3e0e05bdfcf66bd$export$c24727297075ec6a, h as $ee014567cb39d3f0$export$ff05c3ac10437e03, $ as $514c0188e459b4c0$export$5f1af8db9871e1d6, a as $ee014567cb39d3f0$export$f551688fc98f2e09 } from "../chunks/Input.js";
|
|
8
|
-
import { f as $60f33508b4cd9d3b$export$85fd5fdf27bacc79, g as $ad063034c8620db8$export$ea39ec197993aef0, h as $ad063034c8620db8$export$a5a3b454ada2268e, i as $ad063034c8620db8$export$a2258d9c4118825c, j as $a46cf152bb926da5$export$a9b970dcc4ae71a9, k as $9c268ab73a5d55e5$export$722debc0e56fea39, l as $ad063034c8620db8$export$91b62ebf2ba703ee, m as $ad063034c8620db8$export$629b0a497aa65267, n as $121970af65029459$export$f8aeda7b10753fa1, o as $51a3e22a5186a962$export$c826860796309d1b, p as $3578607fe3d4b096$export$cfa2225e87938781, q as $ad063034c8620db8$export$42c81a444fbfb5d4, r as $ad063034c8620db8$export$d0bdf45af03a6ea3, s as $ad063034c8620db8$export$ccc1b2479e7dd654, t as $600b3cf69ae46262$export$90fc3a17d93f704c, u as $654b97e09f2a30c1$export$4d0f8be8b12a7ef6, v as $6a440d0e2d99dd46$export$4a931266a3838b86, w as $535772f9d2c1f38d$export$c5251b9e124bf29, x as $7541913c0284d84b$export$300019f83c56d282, y as $0014db39426443c5$exports, z as $7541913c0284d84b$export$7b3062cd49e80452, A as $72abaeab4d80592f$export$9fc1347d4195ccb3, B as $535772f9d2c1f38d$export$20e40289641fbbb6, C as $535772f9d2c1f38d$export$1258395f99bf9cbf,
|
|
8
|
+
import { f as $60f33508b4cd9d3b$export$85fd5fdf27bacc79, g as $ad063034c8620db8$export$ea39ec197993aef0, h as $ad063034c8620db8$export$a5a3b454ada2268e, i as $ad063034c8620db8$export$a2258d9c4118825c, j as $a46cf152bb926da5$export$a9b970dcc4ae71a9, k as $9c268ab73a5d55e5$export$722debc0e56fea39, l as $ad063034c8620db8$export$91b62ebf2ba703ee, m as $ad063034c8620db8$export$629b0a497aa65267, n as $121970af65029459$export$f8aeda7b10753fa1, o as $51a3e22a5186a962$export$c826860796309d1b, p as $3578607fe3d4b096$export$cfa2225e87938781, q as $ad063034c8620db8$export$42c81a444fbfb5d4, r as $ad063034c8620db8$export$d0bdf45af03a6ea3, s as $ad063034c8620db8$export$ccc1b2479e7dd654, t as $600b3cf69ae46262$export$90fc3a17d93f704c, u as $654b97e09f2a30c1$export$4d0f8be8b12a7ef6, v as $6a440d0e2d99dd46$export$4a931266a3838b86, w as $535772f9d2c1f38d$export$c5251b9e124bf29, x as $7541913c0284d84b$export$300019f83c56d282, y as $0014db39426443c5$exports, z as $7541913c0284d84b$export$7b3062cd49e80452, A as $72abaeab4d80592f$export$9fc1347d4195ccb3, B as $535772f9d2c1f38d$export$20e40289641fbbb6, C as $535772f9d2c1f38d$export$1258395f99bf9cbf, E as $901761b40e390936$export$2bb74740c4e19def, F as $b3526bc71400be8d$export$d39e1813b3bdd0e1, G as $ad063034c8620db8$export$a75f2bff57811055, H as $d07e34cce18680fd$export$93522d1a439f3617, I as $ad063034c8620db8$export$5c333a116e949cdd, J as $ad063034c8620db8$export$f91e89d3d0406102, K as $12a3c853105e5a70$export$ad991b66133851cf, L as $d07e34cce18680fd$export$b4a036af3fc0b032, M as $ad063034c8620db8$export$dbc69fd56b53d5e, N as $ad063034c8620db8$export$2061056d06d7cdf7, O as $ad063034c8620db8$export$ef8b6d9133084f4e, P as $93635573935797de$export$80ee6245ec4f29ec, Q as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, R as $8b141f2f71e88f85$export$2440da353cedad43, S as $8b141f2f71e88f85$export$f18627323ab57ac0, T as $8b141f2f71e88f85$export$7e319ea407e63bc0, U as $8b141f2f71e88f85$export$c5221a78ef73c5e9, V as $d07e34cce18680fd$export$b21e0b124e224484, W as $8b141f2f71e88f85$export$80ff8fc0ae339c13, X as $84102b64e5ca022f$export$dd0bbc9b26defe37, Y as $ad063034c8620db8$export$a18c89cbd24170ff, Z as $d3f049242431219c$export$45fda7c47f93fd48, _ as $d3f049242431219c$export$6d3443f2c48bfc20, a0 as $44f671af83e7d9e0$export$2de4954e8ae13b9f, a1 as $58246871e4652552$export$588937bcd60ade55, a2 as $58246871e4652552$export$6b862160d295c8e, a3 as $40825cdb76e74f70$export$7b3e670c86da5fe8, a4 as $ad063034c8620db8$export$aa8b41735afcabd2, a5 as $2aaf608024c21ca1$export$680ea196effce5f, a as $40825cdb76e74f70$export$7edc06cf1783b30f, b as $40825cdb76e74f70$export$336ab7fa954c4b5f, d as $4e3b923658d69c60$export$8c610744efcf8a1d, e as $4e3b923658d69c60$export$28c660c63b792dea, D as DismissSmall_default } from "../chunks/DismissSmall.js";
|
|
9
9
|
import { $ as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "../chunks/useLocalizedStringFormatter.js";
|
|
10
10
|
import { n as $fe16bffc7a557bf0$export$7f54fc3180508a52, T as $390e54f620492c70$export$b4cc09c592e8fdb8, M as $e8ac3c3f5d4bae7f$export$d6875122194c7b44, e as $bbaa08b3cd72f041$export$9d1611c77c2fe928, t as $1969ac565cfec8d0$export$de79e2c695e052f3, K as $8f5a2122b0992be3$export$630ff653c5ada6a9, D as $23f2114a1b82827e$export$cd4e5573fbe2b576, f as $23f2114a1b82827e$export$e58f029f0fbfdb29, q as $23f2114a1b82827e$export$4282f70798064fe0, O as $23f2114a1b82827e$export$b4f377a2b6254582, l as $d447af545b77c9f1$export$f21a1ffae260145a, C as $6a20a7989e6c817a$export$98658e8c59125e6a, j as $d447af545b77c9f1$export$b204af158042fbac, B as $390e54f620492c70$export$f680877a34711e37, L as $2c9edc598a03d523$export$420e68273165f4ec, H as $c4867b2f328c2698$export$e5c5a5f917a5871c, G as $f192c2f16961cbe0$export$80f3e147d781571c, i as $2add3ce32c6007eb$export$fedb369cb70207f1, x as $a4e76a5424781910$export$e08e3b67e392101e, b as $3e6197669829fe11$export$40bfa8c7b0832715, A as $e969f22b6713ca4a$export$ae780daf29e6d456, z as $0c4a58759813079a$export$4e328f61c538687f, h as $a049562f99e7db0e$export$f9c6924e160136d1, g as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, a as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../chunks/Group.js";
|
|
11
11
|
import { a as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, $ as $2eb8e6d23f3d0cb0$export$a54013f0d02a8f82 } from "../chunks/I18nProvider.js";
|
|
@@ -18,9 +18,7 @@ import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
|
18
18
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
19
19
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
20
20
|
import { E as EMPTY_VALUE, T as TestIds, D as DesignStates, s as selectors, A as ARIA_LABEL_NAMESPACE, d as defaultValues, S as SelectionModeValues, G as GranularityValues, V as VALUE_MISSING_MESSAGE, a as AriaLabels } from "../chunks/constants37.js";
|
|
21
|
-
import { R as RequiredIndicator, u as useValidatedField } from "../chunks/RequiredIndicator.js";
|
|
22
|
-
import { I as InfoCircleSmall_default } from "../chunks/InfoCircleSmall.js";
|
|
23
|
-
import { D as DismissSmall_default } from "../chunks/DismissSmall.js";
|
|
21
|
+
import { I as InfoCircleSmall_default, R as RequiredIndicator, u as useValidatedField } from "../chunks/RequiredIndicator.js";
|
|
24
22
|
createContext(null);
|
|
25
23
|
createContext(null);
|
|
26
24
|
createContext(null);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { DropdownProps } from './Dropdown.types';
|
|
3
|
-
export default function Dropdown(
|
|
3
|
+
export default function Dropdown({ a11y, className, direction, disabled, elementProps, errorMessage, helperText, id, label, onValueChange, options, placeholder, previewError, previewList, readOnly, value, wix, ...rest }: DropdownProps): React.JSX.Element;
|
|
@@ -1,22 +1,10 @@
|
|
|
1
1
|
import { A11y, Direction } from '@wix/editor-react-types';
|
|
2
|
-
import { SdkFunctionChangeableProps, SdkFunctionFocusableProps, SdkFunctionInputableProps } from '../../../utils/functions/sdkFunctionCallbackProps';
|
|
3
|
-
import { FieldValidationProps } from '../../../utils/validation/types';
|
|
4
2
|
export type DropdownOption = {
|
|
5
3
|
/** Text shown to the visitor in the list. */
|
|
6
4
|
label: string;
|
|
7
5
|
/** Underlying value emitted when the option is selected. */
|
|
8
6
|
value: string;
|
|
9
7
|
};
|
|
10
|
-
/** When the filter value is committed: immediately on pick, or only on an Apply click. */
|
|
11
|
-
export type DropdownTriggerMode = 'onSelection' | 'onApply';
|
|
12
|
-
/** Legacy multi-select item shape; still accepted on read for back-compat. */
|
|
13
|
-
export type DropdownValueItem = {
|
|
14
|
-
value: string;
|
|
15
|
-
};
|
|
16
|
-
/** The selection emitted/validated: a value string (single) or `string[]` (multi). */
|
|
17
|
-
export type DropdownValue = string | Array<string>;
|
|
18
|
-
/** Match rule for searchable mode; defaults to case-insensitive "contains". */
|
|
19
|
-
export type DropdownFilter = (item: DropdownOption, query: string) => boolean;
|
|
20
8
|
export type DropdownElementProps = {
|
|
21
9
|
label?: {
|
|
22
10
|
className?: string;
|
|
@@ -24,104 +12,49 @@ export type DropdownElementProps = {
|
|
|
24
12
|
input?: {
|
|
25
13
|
className?: string;
|
|
26
14
|
};
|
|
27
|
-
trigger?: {
|
|
28
|
-
className?: string;
|
|
29
|
-
};
|
|
30
|
-
clearButton?: {
|
|
31
|
-
className?: string;
|
|
32
|
-
};
|
|
33
15
|
list?: {
|
|
34
16
|
className?: string;
|
|
35
17
|
};
|
|
36
18
|
option?: {
|
|
37
19
|
className?: string;
|
|
38
20
|
};
|
|
39
|
-
|
|
21
|
+
helperText?: {
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
24
|
+
errorMessage?: {
|
|
40
25
|
className?: string;
|
|
41
26
|
};
|
|
42
27
|
};
|
|
43
|
-
export type DropdownProps =
|
|
28
|
+
export type DropdownProps = {
|
|
44
29
|
/** DOM `id` on the root `.dropdown` wrapper. */
|
|
45
30
|
id: string;
|
|
46
31
|
/** Appended to the root `.dropdown`. Use this for CSS-variable and per-element overrides. */
|
|
47
32
|
className: string;
|
|
48
33
|
/** The selectable options (static from the editor or from a bound data source). */
|
|
49
|
-
options
|
|
50
|
-
/**
|
|
51
|
-
value
|
|
52
|
-
/**
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
values?: Array<string> | Array<DropdownValueItem>;
|
|
57
|
-
/**
|
|
58
|
-
* Uncontrolled initial single-select selection. Used only when `value`
|
|
59
|
-
* is not provided (component owns its state).
|
|
60
|
-
*/
|
|
61
|
-
defaultValue?: string;
|
|
62
|
-
/**
|
|
63
|
-
* Uncontrolled initial multi-select selection. Used only when `values`
|
|
64
|
-
* is not provided.
|
|
65
|
-
*/
|
|
66
|
-
defaultValues?: Array<string> | Array<DropdownValueItem>;
|
|
67
|
-
/** Bindable filter for searchable mode; defaults to case-insensitive "contains". */
|
|
68
|
-
filter?: DropdownFilter;
|
|
69
|
-
/** Live typed search query, separate from `value`; two-way bindable via `onInput`. */
|
|
70
|
-
inputValue?: string;
|
|
71
|
-
/**
|
|
72
|
-
* Fires with the new selection so the bound field's setter stores it: a
|
|
73
|
-
* value string (single-select) or `string[]` (multi-select). The value
|
|
74
|
-
* is passed plainly (not a DOM change event) — the binding wires
|
|
75
|
-
* `onChange → <field>.setValue`.
|
|
76
|
-
*/
|
|
77
|
-
onChange?: (value: string | Array<string>) => void;
|
|
78
|
-
/** Fires with the new typed query string (bound via `onInput → <field>.setValue`). */
|
|
79
|
-
onInput?: (value: string) => void;
|
|
80
|
-
/** Text shown on the trigger when nothing is selected. */
|
|
81
|
-
placeholder: string;
|
|
34
|
+
options?: Array<DropdownOption>;
|
|
35
|
+
/** The current selection: a value string. `undefined` means no selection. */
|
|
36
|
+
value?: string;
|
|
37
|
+
/** Fires with the value of the newly selected option. */
|
|
38
|
+
onValueChange?: (value: string) => void;
|
|
39
|
+
/** Text shown on the input when nothing is selected. */
|
|
40
|
+
placeholder?: string;
|
|
82
41
|
/** Field label shown above the control and associated with it for assistive tech. */
|
|
83
|
-
label
|
|
84
|
-
/** When `true`, renders a searchable Combobox (type to filter) instead of the plain Select. */
|
|
85
|
-
searchable: boolean;
|
|
86
|
-
/** When `true`, allows selecting multiple options (rendered as chips); `value` becomes an array. */
|
|
87
|
-
multiple: boolean;
|
|
88
|
-
/** When `true`, shows a clear (×) control that resets the selection to empty. */
|
|
89
|
-
clearable: boolean;
|
|
90
|
-
/** When `true`, auto-highlights the first matching option while typing (searchable mode). */
|
|
91
|
-
autoHighlight: boolean;
|
|
92
|
-
/** When `true`, opens the option list when the input is clicked (searchable mode). */
|
|
93
|
-
openOnInputClick: boolean;
|
|
94
|
-
/** When `true`, renders the option list inline (always visible) instead of in a popup. */
|
|
95
|
-
inline: boolean;
|
|
96
|
-
/** When `true`, lays the option list out as a multi-column grid with 2D arrow-key navigation. */
|
|
97
|
-
grid: boolean;
|
|
98
|
-
/** Number of columns when `grid` is enabled (values ≤ 1 render a single column). */
|
|
99
|
-
columns: number;
|
|
100
|
-
/** Max number of options shown at once; `-1` (or any value ≤ 0) means unlimited. Bindable. */
|
|
101
|
-
limit: number;
|
|
102
|
-
/** Forces a selection before the surrounding form can submit. */
|
|
103
|
-
required: boolean;
|
|
42
|
+
label?: string;
|
|
104
43
|
/** Shows the current selection but blocks editing it. */
|
|
105
|
-
readOnly
|
|
44
|
+
readOnly?: boolean;
|
|
45
|
+
/** Helper text shown under the field (and as the field's accessible description). */
|
|
46
|
+
helperText?: string;
|
|
106
47
|
/**
|
|
107
|
-
*
|
|
108
|
-
* `
|
|
109
|
-
* the shared validation contract in `utils/validation`.
|
|
48
|
+
* Error message shown under the field, turning it into the error state. A
|
|
49
|
+
* `undefined` or empty string hides the message and clears the error state.
|
|
110
50
|
*/
|
|
111
|
-
|
|
112
|
-
name: string;
|
|
113
|
-
/** Helper text shown under the field (and as the field's accessible description). */
|
|
114
|
-
description: string;
|
|
115
|
-
/** `'onSelection'` commits on pick; `'onApply'` commits only when the Apply button is clicked. */
|
|
116
|
-
triggerMode: DropdownTriggerMode;
|
|
117
|
-
/** Label for the Apply button. Used only when `triggerMode='onApply'`. */
|
|
118
|
-
applyButtonLabel: string;
|
|
51
|
+
errorMessage?: string;
|
|
119
52
|
/** Disables interaction with the dropdown. */
|
|
120
|
-
|
|
121
|
-
/** Controls whether the option list is open. No effect in `inline` mode. */
|
|
122
|
-
open?: boolean;
|
|
53
|
+
disabled?: boolean;
|
|
123
54
|
/** Preview-only: forces the option list open while the List part is being designed. */
|
|
124
55
|
previewList?: boolean;
|
|
56
|
+
/** Preview-only: forces the error message to render while the Error message part is being designed. */
|
|
57
|
+
previewError?: boolean;
|
|
125
58
|
/** Writing direction applied to the root. */
|
|
126
59
|
direction?: Direction;
|
|
127
60
|
/** Accessibility attributes. `ariaLabel` labels the dropdown for assistive tech. */
|