@wix/editor-react-components 1.2310.0 → 1.2311.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/AudioPlayer/component.js +3 -4
- package/dist/site/components/Breadcrumbs/component.js +1 -1
- package/dist/site/components/Button/component.js +1 -1
- package/dist/site/components/CollapsibleText/component.js +1 -1
- package/dist/site/components/DatePicker/component.js +8 -965
- package/dist/site/components/Lottie/component.js +1 -1
- package/dist/site/components/Menu/component.js +1 -1
- package/dist/site/components/Slideshow/component.js +1 -1
- package/dist/site/components/TextInput/component.js +2 -3
- package/dist/site/components/TextMarquee/component.js +6 -6
- package/dist/site/components/TimePicker/TimePicker.types.d.ts +31 -0
- package/dist/site/components/TimePicker/component.js +119 -17
- package/dist/site/components/TimePicker/constants.d.ts +63 -1
- package/dist/site/components/TimePicker/css.css +126 -0
- package/dist/site/components/TimePicker/hooks/useTimeConstraints.d.ts +8 -0
- package/dist/site/components/TimePicker/hooks/useTimePickerValue.d.ts +2 -1
- package/dist/site/components/TimePicker/manifest.js +142 -3
- package/dist/site/components/TimePicker/timePickerUtils.d.ts +2 -0
- package/dist/site/components/chunks/Button.js +1057 -347
- package/dist/site/components/chunks/Button2.js +351 -285
- package/dist/site/components/chunks/Group.js +160 -47
- package/dist/site/components/chunks/Input.js +14 -14
- package/dist/site/components/chunks/{DateField.js → Tooltip.js} +1017 -52
- package/dist/site/components/chunks/VisuallyHidden.js +47 -0
- package/dist/site/components/chunks/constants2.js +62 -4
- package/dist/site/components/chunks/filterDOMProps.js +3 -3
- package/package.json +2 -2
- package/dist/site/components/chunks/useFocusable.js +0 -118
- package/dist/site/components/chunks/usePress.js +0 -825
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React__default, { useRef, useCallback, useEffect, useState,
|
|
2
|
-
import {
|
|
1
|
+
import React__default, { useRef, useCallback, useEffect, useState, useMemo, useContext, useReducer, createContext, forwardRef } from "react";
|
|
2
|
+
import { l as $c7eafbbe1ea5834e$export$619500959fc48b26, a as $f39a9eba43920ace$export$86427a43e3e48ebb, b as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./filterDOMProps.js";
|
|
3
3
|
const $d447af545b77c9f1$export$b204af158042fbac = (el) => {
|
|
4
4
|
return (el == null ? void 0 : el.ownerDocument) ?? document;
|
|
5
5
|
};
|
|
@@ -944,6 +944,77 @@ function $0c4a58759813079a$export$4e328f61c538687f(props = {}) {
|
|
|
944
944
|
focusProps: within ? focusWithinProps : focusProps
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
+
function $8dba16319206abb6$export$48d1ea6320830260(handler) {
|
|
948
|
+
if (!handler) return void 0;
|
|
949
|
+
let shouldStopPropagation = true;
|
|
950
|
+
return (e) => {
|
|
951
|
+
let event = {
|
|
952
|
+
...e,
|
|
953
|
+
preventDefault() {
|
|
954
|
+
e.preventDefault();
|
|
955
|
+
},
|
|
956
|
+
isDefaultPrevented() {
|
|
957
|
+
return e.isDefaultPrevented();
|
|
958
|
+
},
|
|
959
|
+
stopPropagation() {
|
|
960
|
+
if (shouldStopPropagation && process.env.NODE_ENV !== "production") console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.");
|
|
961
|
+
else shouldStopPropagation = true;
|
|
962
|
+
},
|
|
963
|
+
continuePropagation() {
|
|
964
|
+
shouldStopPropagation = false;
|
|
965
|
+
},
|
|
966
|
+
isPropagationStopped() {
|
|
967
|
+
return shouldStopPropagation;
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
handler(event);
|
|
971
|
+
if (shouldStopPropagation) e.stopPropagation();
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
function $8296dad1a4c5e0dc$export$8f71654801c2f7cd(props) {
|
|
975
|
+
return {
|
|
976
|
+
keyboardProps: props.isDisabled ? {} : {
|
|
977
|
+
onKeyDown: $8dba16319206abb6$export$48d1ea6320830260(props.onKeyDown),
|
|
978
|
+
onKeyUp: $8dba16319206abb6$export$48d1ea6320830260(props.onKeyUp)
|
|
979
|
+
}
|
|
980
|
+
};
|
|
981
|
+
}
|
|
982
|
+
function $03e8ab2d84d7657a$export$4338b53315abf666(ref) {
|
|
983
|
+
const objRef = useRef(null);
|
|
984
|
+
const cleanupRef = useRef(void 0);
|
|
985
|
+
const refEffect = useCallback((instance) => {
|
|
986
|
+
if (typeof ref === "function") {
|
|
987
|
+
const refCallback = ref;
|
|
988
|
+
const refCleanup = refCallback(instance);
|
|
989
|
+
return () => {
|
|
990
|
+
if (typeof refCleanup === "function") refCleanup();
|
|
991
|
+
else refCallback(null);
|
|
992
|
+
};
|
|
993
|
+
} else if (ref) {
|
|
994
|
+
ref.current = instance;
|
|
995
|
+
return () => {
|
|
996
|
+
ref.current = null;
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
}, [
|
|
1000
|
+
ref
|
|
1001
|
+
]);
|
|
1002
|
+
return useMemo(() => ({
|
|
1003
|
+
get current() {
|
|
1004
|
+
return objRef.current;
|
|
1005
|
+
},
|
|
1006
|
+
set current(value) {
|
|
1007
|
+
objRef.current = value;
|
|
1008
|
+
if (cleanupRef.current) {
|
|
1009
|
+
cleanupRef.current();
|
|
1010
|
+
cleanupRef.current = void 0;
|
|
1011
|
+
}
|
|
1012
|
+
if (value != null) cleanupRef.current = refEffect(value);
|
|
1013
|
+
}
|
|
1014
|
+
}), [
|
|
1015
|
+
refEffect
|
|
1016
|
+
]);
|
|
1017
|
+
}
|
|
947
1018
|
function $b7115c395c64f7b5$export$4debdb1a3f0fa79e(context, ref) {
|
|
948
1019
|
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
949
1020
|
if (context && context.ref && ref) {
|
|
@@ -954,6 +1025,46 @@ function $b7115c395c64f7b5$export$4debdb1a3f0fa79e(context, ref) {
|
|
|
954
1025
|
}
|
|
955
1026
|
});
|
|
956
1027
|
}
|
|
1028
|
+
let $d1116acdf220c2da$export$f9762fab77588ecb = /* @__PURE__ */ React__default.createContext(null);
|
|
1029
|
+
function $d1116acdf220c2da$var$useFocusableContext(ref) {
|
|
1030
|
+
let context = useContext($d1116acdf220c2da$export$f9762fab77588ecb) || {};
|
|
1031
|
+
$b7115c395c64f7b5$export$4debdb1a3f0fa79e(context, ref);
|
|
1032
|
+
let { ref: _, ...otherProps } = context;
|
|
1033
|
+
return otherProps;
|
|
1034
|
+
}
|
|
1035
|
+
const $d1116acdf220c2da$export$13f3202a3e5ddd5 = /* @__PURE__ */ React__default.forwardRef(function FocusableProvider(props, ref) {
|
|
1036
|
+
let { children, ...otherProps } = props;
|
|
1037
|
+
let objRef = $03e8ab2d84d7657a$export$4338b53315abf666(ref);
|
|
1038
|
+
let context = {
|
|
1039
|
+
...otherProps,
|
|
1040
|
+
ref: objRef
|
|
1041
|
+
};
|
|
1042
|
+
return /* @__PURE__ */ React__default.createElement($d1116acdf220c2da$export$f9762fab77588ecb.Provider, {
|
|
1043
|
+
value: context
|
|
1044
|
+
}, children);
|
|
1045
|
+
});
|
|
1046
|
+
function $d1116acdf220c2da$export$4c014de7c8940b4c(props, domRef) {
|
|
1047
|
+
let { focusProps } = $1e74c67db218ce67$export$f8168d8dd8fd66e6(props);
|
|
1048
|
+
let { keyboardProps } = $8296dad1a4c5e0dc$export$8f71654801c2f7cd(props);
|
|
1049
|
+
let interactions = $bbaa08b3cd72f041$export$9d1611c77c2fe928(focusProps, keyboardProps);
|
|
1050
|
+
let domProps = $d1116acdf220c2da$var$useFocusableContext(domRef);
|
|
1051
|
+
let interactionProps = props.isDisabled ? {} : domProps;
|
|
1052
|
+
let autoFocusRef = useRef(props.autoFocus);
|
|
1053
|
+
useEffect(() => {
|
|
1054
|
+
if (autoFocusRef.current && domRef.current) $f192c2f16961cbe0$export$80f3e147d781571c(domRef.current);
|
|
1055
|
+
autoFocusRef.current = false;
|
|
1056
|
+
}, [
|
|
1057
|
+
domRef
|
|
1058
|
+
]);
|
|
1059
|
+
let tabIndex = props.excludeFromTabOrder ? -1 : 0;
|
|
1060
|
+
if (props.isDisabled) tabIndex = void 0;
|
|
1061
|
+
return {
|
|
1062
|
+
focusableProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928({
|
|
1063
|
+
...interactions,
|
|
1064
|
+
tabIndex
|
|
1065
|
+
}, interactionProps)
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
957
1068
|
const $fe16bffc7a557bf0$var$useEarlyEffect = React__default["useInsertionEffect"] ?? $c4867b2f328c2698$export$e5c5a5f917a5871c;
|
|
958
1069
|
function $fe16bffc7a557bf0$export$7f54fc3180508a52(fn) {
|
|
959
1070
|
const ref = useRef(null);
|
|
@@ -1228,49 +1339,51 @@ const $a049562f99e7db0e$export$eb2fcfdbd7ba97d4 = /* @__PURE__ */ forwardRef(fun
|
|
|
1228
1339
|
});
|
|
1229
1340
|
export {
|
|
1230
1341
|
$a049562f99e7db0e$export$eb2fcfdbd7ba97d4 as $,
|
|
1231
|
-
$
|
|
1232
|
-
$
|
|
1233
|
-
$
|
|
1234
|
-
$
|
|
1235
|
-
$
|
|
1236
|
-
$
|
|
1237
|
-
$
|
|
1238
|
-
$
|
|
1239
|
-
$
|
|
1240
|
-
$
|
|
1241
|
-
$
|
|
1242
|
-
$
|
|
1243
|
-
$
|
|
1244
|
-
$
|
|
1245
|
-
$
|
|
1246
|
-
$
|
|
1247
|
-
$
|
|
1248
|
-
$
|
|
1249
|
-
$
|
|
1250
|
-
$
|
|
1251
|
-
$
|
|
1252
|
-
$
|
|
1253
|
-
$
|
|
1254
|
-
$
|
|
1255
|
-
$
|
|
1256
|
-
$
|
|
1257
|
-
$
|
|
1258
|
-
$
|
|
1259
|
-
$
|
|
1260
|
-
$
|
|
1261
|
-
$
|
|
1262
|
-
$
|
|
1263
|
-
$
|
|
1264
|
-
$
|
|
1265
|
-
$
|
|
1266
|
-
$
|
|
1267
|
-
$
|
|
1268
|
-
$
|
|
1269
|
-
$
|
|
1270
|
-
$
|
|
1271
|
-
$
|
|
1272
|
-
$
|
|
1273
|
-
$
|
|
1274
|
-
$
|
|
1275
|
-
$
|
|
1342
|
+
$e969f22b6713ca4a$export$ae780daf29e6d456 as A,
|
|
1343
|
+
$390e54f620492c70$export$f680877a34711e37 as B,
|
|
1344
|
+
$6a20a7989e6c817a$export$98658e8c59125e6a as C,
|
|
1345
|
+
$23f2114a1b82827e$export$cd4e5573fbe2b576 as D,
|
|
1346
|
+
$3b8b240c1bf84ab9$export$bebd5a1431fec25d as E,
|
|
1347
|
+
$3b8b240c1bf84ab9$export$4c063cf1350e6fed as F,
|
|
1348
|
+
$f192c2f16961cbe0$export$80f3e147d781571c as G,
|
|
1349
|
+
$c4867b2f328c2698$export$e5c5a5f917a5871c as H,
|
|
1350
|
+
$2add3ce32c6007eb$export$a11b0059900ceec8 as I,
|
|
1351
|
+
$2add3ce32c6007eb$export$6446a186d09e379e as J,
|
|
1352
|
+
$8f5a2122b0992be3$export$630ff653c5ada6a9 as K,
|
|
1353
|
+
$2c9edc598a03d523$export$420e68273165f4ec as L,
|
|
1354
|
+
$e8ac3c3f5d4bae7f$export$d6875122194c7b44 as M,
|
|
1355
|
+
$2add3ce32c6007eb$export$78551043582a6a98 as N,
|
|
1356
|
+
$23f2114a1b82827e$export$b4f377a2b6254582 as O,
|
|
1357
|
+
$8f5a2122b0992be3$export$b9b3dfddab17db27 as P,
|
|
1358
|
+
$d1116acdf220c2da$export$13f3202a3e5ddd5 as Q,
|
|
1359
|
+
$8f5a2122b0992be3$export$8397ddfc504fdb9a as R,
|
|
1360
|
+
$0beb20c9744a2065$export$8467354a121f1b9f as S,
|
|
1361
|
+
$390e54f620492c70$export$b4cc09c592e8fdb8 as T,
|
|
1362
|
+
$8296dad1a4c5e0dc$export$8f71654801c2f7cd as U,
|
|
1363
|
+
$01b77f81d0f07f68$export$b04be29aa201d4f5 as a,
|
|
1364
|
+
$3e6197669829fe11$export$40bfa8c7b0832715 as b,
|
|
1365
|
+
$d1116acdf220c2da$export$4c014de7c8940b4c as c,
|
|
1366
|
+
$3274bf1495747a7b$export$5add1d006293d136 as d,
|
|
1367
|
+
$bbaa08b3cd72f041$export$9d1611c77c2fe928 as e,
|
|
1368
|
+
$23f2114a1b82827e$export$e58f029f0fbfdb29 as f,
|
|
1369
|
+
$01b77f81d0f07f68$export$75b6ee27786ba447 as g,
|
|
1370
|
+
$a049562f99e7db0e$export$f9c6924e160136d1 as h,
|
|
1371
|
+
$2add3ce32c6007eb$export$fedb369cb70207f1 as i,
|
|
1372
|
+
$d447af545b77c9f1$export$b204af158042fbac as j,
|
|
1373
|
+
$081cb5757e08788e$export$24490316f764c430 as k,
|
|
1374
|
+
$d447af545b77c9f1$export$f21a1ffae260145a as l,
|
|
1375
|
+
$48a7d519b337145d$export$4eaf04e54aa8eed6 as m,
|
|
1376
|
+
$fe16bffc7a557bf0$export$7f54fc3180508a52 as n,
|
|
1377
|
+
$a92dc41f639950be$export$c2b7abe5d61ec696 as o,
|
|
1378
|
+
$a92dc41f639950be$export$525bc4921d56d4a as p,
|
|
1379
|
+
$23f2114a1b82827e$export$4282f70798064fe0 as q,
|
|
1380
|
+
$b5c62b033c25b96d$export$29bf1b5f2c56cf63 as r,
|
|
1381
|
+
$a92dc41f639950be$export$cabe61c495ee3649 as s,
|
|
1382
|
+
$1969ac565cfec8d0$export$de79e2c695e052f3 as t,
|
|
1383
|
+
$b5c62b033c25b96d$export$60278871457622de as u,
|
|
1384
|
+
$b7115c395c64f7b5$export$4debdb1a3f0fa79e as v,
|
|
1385
|
+
$caaf0dd3060ed57c$export$95185d699e05d4d7 as w,
|
|
1386
|
+
$a4e76a5424781910$export$e08e3b67e392101e as x,
|
|
1387
|
+
$2add3ce32c6007eb$export$9ac100e40613ea10 as y,
|
|
1388
|
+
$0c4a58759813079a$export$4e328f61c538687f as z
|
|
1276
1389
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { H as $c4867b2f328c2698$export$e5c5a5f917a5871c, n as $fe16bffc7a557bf0$export$7f54fc3180508a52, R as $8f5a2122b0992be3$export$8397ddfc504fdb9a, f as $23f2114a1b82827e$export$e58f029f0fbfdb29, S as $0beb20c9744a2065$export$8467354a121f1b9f, T as $390e54f620492c70$export$b4cc09c592e8fdb8, e as $bbaa08b3cd72f041$export$9d1611c77c2fe928, A as $e969f22b6713ca4a$export$ae780daf29e6d456, z as $0c4a58759813079a$export$4e328f61c538687f } from "./Group.js";
|
|
2
2
|
import React__default, { useRef, useEffect, useMemo, useContext, useState, createContext, forwardRef } from "react";
|
|
3
3
|
import { b as $64fa3d84918910a7$export$29f1550f4b0d4415, a as $f39a9eba43920ace$export$86427a43e3e48ebb, f as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./filterDOMProps.js";
|
|
4
4
|
function $860f7da480e22816$export$b8473d3665f3a75a(props, state, ref) {
|
|
@@ -325,17 +325,17 @@ const $3985021b0ad6602f$export$f5b8910cec6cf069 = /* @__PURE__ */ $f39a9eba43920
|
|
|
325
325
|
});
|
|
326
326
|
});
|
|
327
327
|
export {
|
|
328
|
-
$
|
|
329
|
-
$
|
|
330
|
-
$
|
|
331
|
-
$
|
|
332
|
-
$
|
|
333
|
-
$
|
|
334
|
-
$
|
|
335
|
-
$
|
|
336
|
-
$
|
|
337
|
-
$fd2148440a13ec26$export$
|
|
338
|
-
$fd2148440a13ec26$export$
|
|
339
|
-
$fd2148440a13ec26$export$
|
|
340
|
-
$
|
|
328
|
+
$514c0188e459b4c0$export$5f1af8db9871e1d6 as $,
|
|
329
|
+
$fd2148440a13ec26$export$fc1a364ae1f3ff10 as a,
|
|
330
|
+
$191c9b6d48a0a4e2$export$294aa081a6c6f55d as b,
|
|
331
|
+
$860f7da480e22816$export$b8473d3665f3a75a as c,
|
|
332
|
+
$d3e0e05bdfcf66bd$export$c24727297075ec6a as d,
|
|
333
|
+
$3985021b0ad6602f$export$37fb8590cf2c088c as e,
|
|
334
|
+
$514c0188e459b4c0$export$9afb8bc826b033ea as f,
|
|
335
|
+
$ee014567cb39d3f0$export$ff05c3ac10437e03 as g,
|
|
336
|
+
$3985021b0ad6602f$export$f5b8910cec6cf069 as h,
|
|
337
|
+
$fd2148440a13ec26$export$75ee7c75d68f5b0e as i,
|
|
338
|
+
$fd2148440a13ec26$export$aca958c65c314e6c as j,
|
|
339
|
+
$fd2148440a13ec26$export$a763b9476acd3eb as k,
|
|
340
|
+
$fd2148440a13ec26$export$dad6ae84456c676a as l
|
|
341
341
|
};
|