@wix/form-public 0.476.0 → 0.477.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/index.cjs +8 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -59648,10 +59648,13 @@ var Period = ({ className, ...internal }) => {
|
|
|
59648
59648
|
const { hidePlaceholder } = useFieldPropsV2();
|
|
59649
59649
|
const { segment } = internal;
|
|
59650
59650
|
const { t } = useTranslation2();
|
|
59651
|
+
const timeFieldState = React171.useContext(reactAriaComponents.TimeFieldStateContext);
|
|
59651
59652
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.period");
|
|
59653
|
+
const toggleAmPm = () => timeFieldState?.increment("dayPeriod");
|
|
59652
59654
|
return /* @__PURE__ */ React171__default.default.createElement(reactAriaComponents.DateSegment, {
|
|
59653
59655
|
segment,
|
|
59654
59656
|
className,
|
|
59657
|
+
onClick: toggleAmPm,
|
|
59655
59658
|
...placeholder && {
|
|
59656
59659
|
placeholder
|
|
59657
59660
|
}
|
|
@@ -66888,7 +66891,7 @@ TextInput.Input;
|
|
|
66888
66891
|
TextInput.Description;
|
|
66889
66892
|
TextInput.Error;
|
|
66890
66893
|
var TimeInput2 = ({ children }) => {
|
|
66891
|
-
const { id: id6, value, onChange, disabled, required, onBlur, onFocus, use24HourFormat, FieldLayout, hasError } = useFieldPropsV2();
|
|
66894
|
+
const { id: id6, value, onChange, disabled, readOnly, required, onBlur, onFocus, use24HourFormat, FieldLayout, hasError } = useFieldPropsV2();
|
|
66892
66895
|
const { inputId, ariaDescribedBy, labelId } = useFieldAttributes2();
|
|
66893
66896
|
const handleChange = React171.useCallback((timeValue2) => {
|
|
66894
66897
|
const stringValue = timeValueToString2(timeValue2);
|
|
@@ -66911,6 +66914,7 @@ var TimeInput2 = ({ children }) => {
|
|
|
66911
66914
|
value: timeValue,
|
|
66912
66915
|
onChange: handleChange,
|
|
66913
66916
|
isDisabled: disabled,
|
|
66917
|
+
isReadOnly: readOnly,
|
|
66914
66918
|
isInvalid: hasError,
|
|
66915
66919
|
isRequired: required,
|
|
66916
66920
|
onBlur,
|
|
@@ -66986,10 +66990,13 @@ var Period2 = ({ className, ...internal }) => {
|
|
|
66986
66990
|
const { hidePlaceholder } = useFieldPropsV2();
|
|
66987
66991
|
const { segment } = internal;
|
|
66988
66992
|
const { t } = useTranslation2();
|
|
66993
|
+
const timeFieldState = React171.useContext(reactAriaComponents.TimeFieldStateContext);
|
|
66989
66994
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.period");
|
|
66995
|
+
const toggleAmPm = () => timeFieldState?.increment("dayPeriod");
|
|
66990
66996
|
return /* @__PURE__ */ React171__default.default.createElement(reactAriaComponents.DateSegment, {
|
|
66991
66997
|
segment,
|
|
66992
66998
|
className,
|
|
66999
|
+
onClick: toggleAmPm,
|
|
66993
67000
|
...placeholder && {
|
|
66994
67001
|
placeholder
|
|
66995
67002
|
}
|