@wix/editor-react-components 1.2775.0 → 1.2776.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 (37) hide show
  1. package/dist/site/components/AudioPlayer/component.js +5 -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/Checkbox/component.js +1 -1
  5. package/dist/site/components/CheckboxGroup/component.js +1 -1
  6. package/dist/site/components/CollapsibleText/component.js +1 -1
  7. package/dist/site/components/DatePicker/component.js +622 -7
  8. package/dist/site/components/Lottie/component.js +1 -1
  9. package/dist/site/components/Menu/component.js +1 -1
  10. package/dist/site/components/RadioButtons/component.js +1 -1
  11. package/dist/site/components/Slideshow/component.js +1 -1
  12. package/dist/site/components/TextBox/component.js +1 -1
  13. package/dist/site/components/TextInput/component.js +3 -2
  14. package/dist/site/components/TextMarquee/component.js +6 -6
  15. package/dist/site/components/TimePicker/TimePicker.types.d.ts +14 -39
  16. package/dist/site/components/TimePicker/component.js +81 -547
  17. package/dist/site/components/TimePicker/component.preview.d.ts +7 -2
  18. package/dist/site/components/TimePicker/components/TimePickerField.d.ts +1 -2
  19. package/dist/site/components/TimePicker/constants.d.ts +35 -68
  20. package/dist/site/components/TimePicker/css.css +17 -169
  21. package/dist/site/components/TimePicker/hooks/useTimePickerValue.d.ts +3 -5
  22. package/dist/site/components/TimePicker/manifest.js +246 -152
  23. package/dist/site/components/TimePicker/timePickerUtils.d.ts +8 -8
  24. package/dist/site/components/chunks/Button.js +466 -1055
  25. package/dist/site/components/chunks/Button2.js +284 -471
  26. package/dist/site/components/chunks/DateField.js +51 -673
  27. package/dist/site/components/chunks/Group.js +46 -160
  28. package/dist/site/components/chunks/I18nProvider.js +1 -1
  29. package/dist/site/components/chunks/Input.js +2 -2
  30. package/dist/site/components/chunks/constants2.js +40 -70
  31. package/dist/site/components/chunks/filterDOMProps.js +13 -13
  32. package/dist/site/components/chunks/useFocusable.js +70 -0
  33. package/dist/site/components/chunks/usePress.js +825 -0
  34. package/package.json +2 -2
  35. package/dist/site/components/TimePicker/hooks/useTimeConstraints.d.ts +0 -8
  36. package/dist/site/components/chunks/VisuallyHidden.js +0 -47
  37. package/dist/site/components/chunks/{RequiredIndicator.js → useValidatedField.js} +19 -19
@@ -4,7 +4,7 @@ import { useService } from "@wix/services-manager-react";
4
4
  import { T as TranslationsDefinition } from "../chunks/index4.js";
5
5
  import { d as directionStyles } from "../chunks/direction.module.js";
6
6
  import { g as getTranslation } from "../chunks/getTranslation.js";
7
- import { B as Button } from "../chunks/Button2.js";
7
+ import { B as Button } from "../chunks/Button.js";
8
8
  import { r as rootDataDefaults, s as semanticSelectors, A as ARIA_LABEL_NAMESPACE, t as testIds, p as pauseIconSvg, a as playIconSvg, b as showButtonOnHoverDefaults, D as DefaultTranslations, T as TranslationKeys } from "../chunks/constants29.js";
9
9
  import React__default, { useEffect, useState, useRef, useMemo } from "react";
10
10
  import { g as getDefaultExportFromCjs } from "../chunks/_commonjsHelpers.js";
@@ -16,7 +16,7 @@ import { u as useResizeObserver } from "../chunks/useResizeObserver.js";
16
16
  import { d as directionStyles } from "../chunks/direction.module.js";
17
17
  import { E as EnvironmentDefinition } from "../chunks/index2.js";
18
18
  import AnimatedIconWithReducedMotion from "../AnimatedIcon/component.js";
19
- import { B as Button } from "../chunks/Button2.js";
19
+ import { B as Button } from "../chunks/Button.js";
20
20
  import { c as convertA11yKeysToHtmlFormat } from "../chunks/a11y.js";
21
21
  const AnchorsDefinition = defineService("@wix/viewer-service-anchors");
22
22
  const EMPTY_ANCHOR_URL = "#";
@@ -6,7 +6,7 @@ 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, I as InfoCircleSmall_default } from "../chunks/RequiredIndicator.js";
9
+ import { u as useValidatedField, R as RequiredIndicator, I as InfoCircleSmall_default } from "../chunks/useValidatedField.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";
@@ -3,7 +3,7 @@ import { useState, useRef, useEffect, useCallback, useMemo } from "react";
3
3
  import { c as clsx } from "../chunks/clsx.js";
4
4
  import { M as MOVEMENT_DIRECTION, A as AUTOPLAY_STATE, P as PAUSE_BUTTON_VISIBILITY, s as slideshowDataDefaults, a as semanticClassNames, b as ARIA_LABEL_NAMESPACE, S as SLIDESHOW_SLIDE_LTR_DIRECTION_EXPERIMENT, D as DefaultTranslations, T as TranslationKeys } from "../chunks/Slideshow.semanticClassNames.js";
5
5
  import { u as useHasDisplayedElement } from "../chunks/useHasDisplayedElement.js";
6
- import { B as Button } from "../chunks/Button2.js";
6
+ import { B as Button } from "../chunks/Button.js";
7
7
  import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
8
8
  import { d as directionStyles } from "../chunks/direction.module.js";
9
9
  import { useService } from "@wix/services-manager-react";
@@ -6,7 +6,7 @@ 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, I as InfoCircleSmall_default } from "../chunks/RequiredIndicator.js";
9
+ import { u as useValidatedField, R as RequiredIndicator, I as InfoCircleSmall_default } from "../chunks/useValidatedField.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";
@@ -10,8 +10,9 @@ import { a as accessibilityStyles } from "../chunks/accessibility.module.js";
10
10
  import { c as componentClassNames, D as DesignStates, E as ERROR_MESSAGE_PREVIEW_TEXT } from "../chunks/constants3.js";
11
11
  import { useService } from "@wix/services-manager-react";
12
12
  import { b as $fd2148440a13ec26$export$fc1a364ae1f3ff10, c as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, d as $860f7da480e22816$export$b8473d3665f3a75a, e as $d3e0e05bdfcf66bd$export$c24727297075ec6a, f as $3985021b0ad6602f$export$37fb8590cf2c088c, g as $514c0188e459b4c0$export$9afb8bc826b033ea, h as $ee014567cb39d3f0$export$ff05c3ac10437e03, i as $3985021b0ad6602f$export$f5b8910cec6cf069 } from "../chunks/Input.js";
13
- import { i as $3e6197669829fe11$export$40bfa8c7b0832715, c as $d1116acdf220c2da$export$4c014de7c8940b4c, j as $3274bf1495747a7b$export$5add1d006293d136, a as $bbaa08b3cd72f041$export$9d1611c77c2fe928, k as $23f2114a1b82827e$export$e58f029f0fbfdb29, l as $01b77f81d0f07f68$export$75b6ee27786ba447, m as $a049562f99e7db0e$export$f9c6924e160136d1, h as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../chunks/Group.js";
14
- import { a as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, f as $f39a9eba43920ace$export$86427a43e3e48ebb, c as $64fa3d84918910a7$export$29f1550f4b0d4415, g as $64fa3d84918910a7$export$fabf2dc03a41866e, h as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, i as $64fa3d84918910a7$export$ef03459518577ad4, d as $64fa3d84918910a7$export$4d86445c2cf5e3, e as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, b as $64fa3d84918910a7$export$2881499e37b75b9a } from "../chunks/filterDOMProps.js";
13
+ import { b as $3e6197669829fe11$export$40bfa8c7b0832715, c as $3274bf1495747a7b$export$5add1d006293d136, d as $bbaa08b3cd72f041$export$9d1611c77c2fe928, e as $23f2114a1b82827e$export$e58f029f0fbfdb29, f as $01b77f81d0f07f68$export$75b6ee27786ba447, g as $a049562f99e7db0e$export$f9c6924e160136d1, a as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../chunks/Group.js";
14
+ import { $ as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, a as $f39a9eba43920ace$export$86427a43e3e48ebb, b as $64fa3d84918910a7$export$29f1550f4b0d4415, c as $64fa3d84918910a7$export$fabf2dc03a41866e, d as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, e as $64fa3d84918910a7$export$ef03459518577ad4, f as $64fa3d84918910a7$export$4d86445c2cf5e3, g as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, h as $64fa3d84918910a7$export$2881499e37b75b9a } from "../chunks/filterDOMProps.js";
15
+ import { $ as $d1116acdf220c2da$export$4c014de7c8940b4c } from "../chunks/useFocusable.js";
15
16
  const $8e6cc465cc68f603$export$698f465ec27e93df = /* @__PURE__ */ createContext(null);
16
17
  function $054f71d2330da2e3$export$712718f7aec83d5(props, ref) {
17
18
  let { inputElementType = "input", isDisabled = false, isRequired = false, isReadOnly = false, type = "text", validationBehavior = "aria" } = props;
@@ -9,12 +9,6 @@ import { L as Link } from "../chunks/Link.js";
9
9
  import { f as formatClassNames } from "../chunks/classNames.js";
10
10
  import { p as parseSvg } from "../chunks/parseSvg.js";
11
11
  import { g as getTranslation } from "../chunks/getTranslation.js";
12
- const PauseSmall = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M7.5,5 C8.32842712,5 9,5.67157288 9,6.5 L9,11.5 C9,12.3284271 8.32842712,13 7.5,13 C6.67157288,13 6,12.3284271 6,11.5 L6,6.5 C6,5.67157288 6.67157288,5 7.5,5 Z M11.5,5 C12.3284271,5 13,5.67157288 13,6.5 L13,11.5 C13,12.3284271 12.3284271,13 11.5,13 C10.6715729,13 10,12.3284271 10,11.5 L10,6.5 C10,5.67157288 10.6715729,5 11.5,5 Z M7.5,6 C7.22385763,6 7,6.22385763 7,6.5 L7,11.5 C7,11.7761424 7.22385763,12 7.5,12 C7.77614237,12 8,11.7761424 8,11.5 L8,6.5 C8,6.22385763 7.77614237,6 7.5,6 Z M11.5,6 C11.2238576,6 11,6.22385763 11,6.5 L11,11.5 C11,11.7761424 11.2238576,12 11.5,12 C11.7761424,12 12,11.7761424 12,11.5 L12,6.5 C12,6.22385763 11.7761424,6 11.5,6 Z" }));
13
- PauseSmall.displayName = "PauseSmall";
14
- var PauseSmall_default = PauseSmall;
15
- const PlaySmall = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M6.87468837,5.45041947 L12.7318793,8.46657119 C13.20163,8.68731241 13.20163,9.26940918 12.7318793,9.53342881 L6.87468837,12.5495805 C6.58008377,12.7012867 6.00070071,12.5801226 6,12.0161517 L6,5.98384828 C6,5.65247743 6.35266876,5.20682168 6.87468837,5.45041947 Z M7,11.3602529 L11.5834735,9 L7,6.63974714 L7,11.3602529 Z" }));
16
- PlaySmall.displayName = "PlaySmall";
17
- var PlaySmall_default = PlaySmall;
18
12
  const semanticClassNames = {
19
13
  root: "text-marquee",
20
14
  text: "text-marquee__text"
@@ -67,6 +61,12 @@ const DefaultTranslations = {
67
61
  playAnimation: "Play animation",
68
62
  pauseAnimation: "Pause animation"
69
63
  };
64
+ const PauseSmall = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M7.5,5 C8.32842712,5 9,5.67157288 9,6.5 L9,11.5 C9,12.3284271 8.32842712,13 7.5,13 C6.67157288,13 6,12.3284271 6,11.5 L6,6.5 C6,5.67157288 6.67157288,5 7.5,5 Z M11.5,5 C12.3284271,5 13,5.67157288 13,6.5 L13,11.5 C13,12.3284271 12.3284271,13 11.5,13 C10.6715729,13 10,12.3284271 10,11.5 L10,6.5 C10,5.67157288 10.6715729,5 11.5,5 Z M7.5,6 C7.22385763,6 7,6.22385763 7,6.5 L7,11.5 C7,11.7761424 7.22385763,12 7.5,12 C7.77614237,12 8,11.7761424 8,11.5 L8,6.5 C8,6.22385763 7.77614237,6 7.5,6 Z M11.5,6 C11.2238576,6 11,6.22385763 11,6.5 L11,11.5 C11,11.7761424 11.2238576,12 11.5,12 C11.7761424,12 12,11.7761424 12,11.5 L12,6.5 C12,6.22385763 11.7761424,6 11.5,6 Z" }));
65
+ PauseSmall.displayName = "PauseSmall";
66
+ var PauseSmall_default = PauseSmall;
67
+ const PlaySmall = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M6.87468837,5.45041947 L12.7318793,8.46657119 C13.20163,8.68731241 13.20163,9.26940918 12.7318793,9.53342881 L6.87468837,12.5495805 C6.58008377,12.7012867 6.00070071,12.5801226 6,12.0161517 L6,5.98384828 C6,5.65247743 6.35266876,5.20682168 6.87468837,5.45041947 Z M7,11.3602529 L11.5834735,9 L7,6.63974714 L7,11.3602529 Z" }));
68
+ PlaySmall.displayName = "PlaySmall";
69
+ var PlaySmall_default = PlaySmall;
70
70
  const PlayPauseButton = ({
71
71
  isPlaying,
72
72
  onToggle,
@@ -1,13 +1,4 @@
1
1
  import { A11y, Direction } from '@wix/editor-react-types';
2
- import { SdkFunctionChangeableProps, SdkFunctionFocusableProps } from '../../../utils/functions/sdkFunctionCallbackProps';
3
- import { FieldValidationProps } from '../../../utils/validation/types';
4
- import { TranslationKeys } from './constants';
5
- /** A viewer-facing translatable string key. */
6
- export type TranslationKey = keyof typeof TranslationKeys;
7
- /** Smallest editable time unit (React Aria `granularity`). */
8
- export type TimePickerGranularity = 'hour' | 'minute' | 'second';
9
- /** `auto` defers to the locale; `12`/`24` force the hour cycle. */
10
- export type TimePickerHourCycle = 'auto' | '12' | '24';
11
2
  export type TimePickerElementProps = {
12
3
  label?: {
13
4
  className?: string;
@@ -15,54 +6,38 @@ export type TimePickerElementProps = {
15
6
  timeInput?: {
16
7
  className?: string;
17
8
  };
18
- description?: {
9
+ helperText?: {
10
+ className?: string;
11
+ };
12
+ errorMessage?: {
19
13
  className?: string;
20
14
  };
21
15
  segment?: {
22
16
  className?: string;
23
17
  };
24
18
  };
25
- export type TimePickerProps = Omit<SdkFunctionChangeableProps, 'onChange'> & SdkFunctionFocusableProps & FieldValidationProps<string> & {
26
- /** Fires with the selected ISO time string (`HH:MM[:SS]`), or `''` when cleared. */
27
- onChange?: (value: string) => void;
19
+ export type TimePickerProps = {
20
+ /** Fires with the selected local-time value, or `undefined` when cleared. */
21
+ onValueChange?: (value: string | undefined) => void;
28
22
  /** DOM `id` on the root `.timePicker` wrapper. */
29
23
  id: string;
30
24
  /** Appended to the root `.timePicker`. Use this for CSS-variable and per-element overrides. */
31
25
  className: string;
32
- /** Smallest editable unit: hour-only, hour+minute, or hour+minute+second segments. */
33
- granularity?: TimePickerGranularity;
34
- /** Forces a 12- or 24-hour clock; `auto` follows the locale. */
35
- hourCycle?: TimePickerHourCycle;
36
- /** Pads single-digit segments with a leading zero (locale default when off). */
37
- shouldForceLeadingZeros?: boolean;
38
- /**
39
- * The selected time as an ISO 24h `HH:MM[:SS]` string. The empty string
40
- * means no time is selected.
41
- */
42
- value: string;
43
26
  /**
44
- * Uncontrolled initial selected time (ISO string, e.g. '14:30'). Used
45
- * only when `value` is not provided (component owns its state).
27
+ * The selected time as a local-time value. `undefined` means no time is
28
+ * selected. The component normalizes selected values to minute precision.
46
29
  */
47
- defaultValue?: string;
30
+ value?: string;
48
31
  /** Optional text label rendered above the field. */
49
32
  label: string;
50
33
  /** Site-facing helper text rendered under the field. */
51
- description?: string;
52
- /** Hint text revealed from an info icon next to the label. */
53
- tooltip?: string;
54
- /** Earliest selectable time as an ISO `HH:MM` string. */
55
- minTime?: string;
56
- /** Latest selectable time as an ISO `HH:MM` string. */
57
- maxTime?: string;
58
- /** Marks the field required for form submission. */
59
- required?: boolean;
34
+ helperText?: string;
35
+ /** Message shown below the field when the selected value is invalid. */
36
+ errorMessage?: string;
60
37
  /** Shows the time but blocks editing. */
61
38
  readOnly?: boolean;
62
- /** Renders a clear (✕) control that empties the value. */
63
- clearable?: boolean;
64
39
  /** Disables interaction with the time picker. */
65
- isDisabled?: boolean;
40
+ disabled?: boolean;
66
41
  /** Writing direction applied to the root. */
67
42
  direction?: Direction;
68
43
  /** Accessibility attributes. `ariaLabel` labels the time picker for assistive tech. */