@wix/editor-react-components 1.2309.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.
Files changed (33) hide show
  1. package/dist/site/components/AudioPlayer/component.js +3 -4
  2. package/dist/site/components/Breadcrumbs/component.js +1 -1
  3. package/dist/site/components/Button/component.js +1 -1
  4. package/dist/site/components/CollapsibleText/component.js +1 -1
  5. package/dist/site/components/DatePicker/component.js +8 -965
  6. package/dist/site/components/Image3/css.css +3 -1
  7. package/dist/site/components/Lottie/component.js +1 -1
  8. package/dist/site/components/Menu/component.js +1 -1
  9. package/dist/site/components/SiteLogo/css.css +9 -1
  10. package/dist/site/components/Slideshow/component.js +1 -1
  11. package/dist/site/components/SvgImage/css.css +6 -0
  12. package/dist/site/components/TextInput/component.js +2 -3
  13. package/dist/site/components/TextMarquee/component.js +6 -6
  14. package/dist/site/components/TimePicker/TimePicker.types.d.ts +31 -0
  15. package/dist/site/components/TimePicker/component.js +119 -17
  16. package/dist/site/components/TimePicker/constants.d.ts +63 -1
  17. package/dist/site/components/TimePicker/css.css +126 -0
  18. package/dist/site/components/TimePicker/hooks/useTimeConstraints.d.ts +8 -0
  19. package/dist/site/components/TimePicker/hooks/useTimePickerValue.d.ts +2 -1
  20. package/dist/site/components/TimePicker/manifest.js +142 -3
  21. package/dist/site/components/TimePicker/timePickerUtils.d.ts +2 -0
  22. package/dist/site/components/chunks/Button.js +1057 -347
  23. package/dist/site/components/chunks/Button2.js +351 -285
  24. package/dist/site/components/chunks/Group.js +160 -47
  25. package/dist/site/components/chunks/Input.js +14 -14
  26. package/dist/site/components/chunks/SvgImageTint.js +7 -5
  27. package/dist/site/components/chunks/{DateField.js → Tooltip.js} +1017 -52
  28. package/dist/site/components/chunks/VisuallyHidden.js +47 -0
  29. package/dist/site/components/chunks/constants2.js +62 -4
  30. package/dist/site/components/chunks/filterDOMProps.js +3 -3
  31. package/package.json +2 -2
  32. package/dist/site/components/chunks/useFocusable.js +0 -118
  33. package/dist/site/components/chunks/usePress.js +0 -825
@@ -1,5 +1,5 @@
1
- import React__default, { useRef, useCallback, useEffect, useState, useReducer, useMemo, createContext, forwardRef } from "react";
2
- import { k as $c7eafbbe1ea5834e$export$619500959fc48b26, a as $f39a9eba43920ace$export$86427a43e3e48ebb, b as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "./filterDOMProps.js";
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
- $0c4a58759813079a$export$4e328f61c538687f as A,
1232
- $e969f22b6713ca4a$export$ae780daf29e6d456 as B,
1233
- $8f5a2122b0992be3$export$8397ddfc504fdb9a as C,
1234
- $0beb20c9744a2065$export$8467354a121f1b9f as D,
1235
- $390e54f620492c70$export$b4cc09c592e8fdb8 as E,
1236
- $081cb5757e08788e$export$24490316f764c430 as F,
1237
- $a92dc41f639950be$export$c2b7abe5d61ec696 as G,
1238
- $a92dc41f639950be$export$525bc4921d56d4a as H,
1239
- $b5c62b033c25b96d$export$29bf1b5f2c56cf63 as I,
1240
- $a92dc41f639950be$export$cabe61c495ee3649 as J,
1241
- $1969ac565cfec8d0$export$de79e2c695e052f3 as K,
1242
- $b5c62b033c25b96d$export$60278871457622de as L,
1243
- $b7115c395c64f7b5$export$4debdb1a3f0fa79e as M,
1244
- $caaf0dd3060ed57c$export$95185d699e05d4d7 as N,
1245
- $a4e76a5424781910$export$e08e3b67e392101e as O,
1246
- $1e74c67db218ce67$export$f8168d8dd8fd66e6 as P,
1247
- $23f2114a1b82827e$export$b4f377a2b6254582 as Q,
1248
- $2add3ce32c6007eb$export$78551043582a6a98 as R,
1249
- $8f5a2122b0992be3$export$b9b3dfddab17db27 as S,
1250
- $3e6197669829fe11$export$40bfa8c7b0832715 as a,
1251
- $3274bf1495747a7b$export$5add1d006293d136 as b,
1252
- $bbaa08b3cd72f041$export$9d1611c77c2fe928 as c,
1253
- $23f2114a1b82827e$export$e58f029f0fbfdb29 as d,
1254
- $01b77f81d0f07f68$export$75b6ee27786ba447 as e,
1255
- $a049562f99e7db0e$export$f9c6924e160136d1 as f,
1256
- $01b77f81d0f07f68$export$b04be29aa201d4f5 as g,
1257
- $6a20a7989e6c817a$export$98658e8c59125e6a as h,
1258
- $23f2114a1b82827e$export$4282f70798064fe0 as i,
1259
- $23f2114a1b82827e$export$cd4e5573fbe2b576 as j,
1260
- $d447af545b77c9f1$export$b204af158042fbac as k,
1261
- $3b8b240c1bf84ab9$export$bebd5a1431fec25d as l,
1262
- $3b8b240c1bf84ab9$export$4c063cf1350e6fed as m,
1263
- $f192c2f16961cbe0$export$80f3e147d781571c as n,
1264
- $c4867b2f328c2698$export$e5c5a5f917a5871c as o,
1265
- $d447af545b77c9f1$export$f21a1ffae260145a as p,
1266
- $2add3ce32c6007eb$export$a11b0059900ceec8 as q,
1267
- $2add3ce32c6007eb$export$6446a186d09e379e as r,
1268
- $8f5a2122b0992be3$export$630ff653c5ada6a9 as s,
1269
- $fe16bffc7a557bf0$export$7f54fc3180508a52 as t,
1270
- $2add3ce32c6007eb$export$fedb369cb70207f1 as u,
1271
- $48a7d519b337145d$export$4eaf04e54aa8eed6 as v,
1272
- $2c9edc598a03d523$export$420e68273165f4ec as w,
1273
- $390e54f620492c70$export$f680877a34711e37 as x,
1274
- $e8ac3c3f5d4bae7f$export$d6875122194c7b44 as y,
1275
- $2add3ce32c6007eb$export$9ac100e40613ea10 as z
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 { o as $c4867b2f328c2698$export$e5c5a5f917a5871c, t as $fe16bffc7a557bf0$export$7f54fc3180508a52, C as $8f5a2122b0992be3$export$8397ddfc504fdb9a, d as $23f2114a1b82827e$export$e58f029f0fbfdb29, D as $0beb20c9744a2065$export$8467354a121f1b9f, E as $390e54f620492c70$export$b4cc09c592e8fdb8, c as $bbaa08b3cd72f041$export$9d1611c77c2fe928, B as $e969f22b6713ca4a$export$ae780daf29e6d456, A as $0c4a58759813079a$export$4e328f61c538687f } from "./Group.js";
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
- $fd2148440a13ec26$export$fc1a364ae1f3ff10 as $,
329
- $191c9b6d48a0a4e2$export$294aa081a6c6f55d as a,
330
- $860f7da480e22816$export$b8473d3665f3a75a as b,
331
- $d3e0e05bdfcf66bd$export$c24727297075ec6a as c,
332
- $3985021b0ad6602f$export$37fb8590cf2c088c as d,
333
- $514c0188e459b4c0$export$9afb8bc826b033ea as e,
334
- $ee014567cb39d3f0$export$ff05c3ac10437e03 as f,
335
- $3985021b0ad6602f$export$f5b8910cec6cf069 as g,
336
- $fd2148440a13ec26$export$75ee7c75d68f5b0e as h,
337
- $fd2148440a13ec26$export$aca958c65c314e6c as i,
338
- $fd2148440a13ec26$export$a763b9476acd3eb as j,
339
- $fd2148440a13ec26$export$dad6ae84456c676a as k,
340
- $514c0188e459b4c0$export$5f1af8db9871e1d6 as l
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
  };
@@ -77,25 +77,27 @@ function processSvgProps(props, svgInfo) {
77
77
  const semanticClassNames = {
78
78
  root: "svg-image"
79
79
  };
80
+ const link = "link__UCcRC";
80
81
  const svgImageSource = "svgImageSource__g-ESq";
81
82
  const svgImageRoot = "svgImageRoot__XFDeg";
82
83
  const styles = {
84
+ link,
83
85
  svgImageSource,
84
86
  svgImageRoot
85
87
  };
86
88
  const ConditionalLink = ({
87
- link,
89
+ link: link2,
88
90
  children
89
91
  }) => {
90
- const hasLink = !isEmptyObject(link);
92
+ const hasLink = !isEmptyObject(link2);
91
93
  if (!hasLink) {
92
94
  return /* @__PURE__ */ jsx(Fragment, { children });
93
95
  }
94
- return /* @__PURE__ */ jsx(Link, { ...link, children });
96
+ return /* @__PURE__ */ jsx(Link, { className: styles.link, ...link2, children });
95
97
  };
96
98
  const SvgImageBase = ({
97
99
  id,
98
- link,
100
+ link: link2,
99
101
  alt = "",
100
102
  svgString,
101
103
  svgType,
@@ -121,7 +123,7 @@ const SvgImageBase = ({
121
123
  className ?? ""
122
124
  )
123
125
  ),
124
- children: /* @__PURE__ */ jsx(ConditionalLink, { link, children: /* @__PURE__ */ jsx(
126
+ children: /* @__PURE__ */ jsx(ConditionalLink, { link: link2, children: /* @__PURE__ */ jsx(
125
127
  "div",
126
128
  {
127
129
  "data-testid": `svgRoot-${id}`,