@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.js
CHANGED
|
@@ -7,7 +7,7 @@ import ReactDOM from 'react-dom';
|
|
|
7
7
|
import camelCase2 from 'lodash.camelcase';
|
|
8
8
|
import mapKeys from 'lodash.mapkeys';
|
|
9
9
|
import { jsx } from 'react/jsx-runtime';
|
|
10
|
-
import { CheckboxField, CheckboxButton, TextField, Input, ListBoxItem, ListBox, Dialog, OverlayTriggerStateContext, ModalOverlay, Modal, SearchField, RadioGroup as RadioGroup$1, Button, useSlottedContext, PopoverContext, Popover, Autocomplete, RadioField, RadioButton, CheckboxGroup as CheckboxGroup$1, I18nProvider, DatePicker as DatePicker$1, Select, NumberField, TimeField, SelectValue, CalendarCell, Calendar as Calendar$1, CalendarMonthPicker, CalendarYearPicker, CalendarGrid, DatePickerStateContext, Group, DateInput as DateInput$1, DateSegment, FileTrigger, DropZone as DropZone$1, Text as Text$1, ProgressBar, ComboBox, DialogTrigger, TextArea as TextArea$1, ComboBoxStateContext } from 'react-aria-components';
|
|
10
|
+
import { CheckboxField, CheckboxButton, TextField, Input, ListBoxItem, ListBox, Dialog, OverlayTriggerStateContext, ModalOverlay, Modal, SearchField, RadioGroup as RadioGroup$1, Button, useSlottedContext, PopoverContext, Popover, Autocomplete, RadioField, RadioButton, CheckboxGroup as CheckboxGroup$1, I18nProvider, DatePicker as DatePicker$1, Select, NumberField, TimeField, SelectValue, CalendarCell, Calendar as Calendar$1, CalendarMonthPicker, CalendarYearPicker, CalendarGrid, DatePickerStateContext, Group, DateInput as DateInput$1, DateSegment, TimeFieldStateContext, FileTrigger, DropZone as DropZone$1, Text as Text$1, ProgressBar, ComboBox, DialogTrigger, TextArea as TextArea$1, ComboBoxStateContext } from 'react-aria-components';
|
|
11
11
|
|
|
12
12
|
var __create = Object.create;
|
|
13
13
|
var __defProp = Object.defineProperty;
|
|
@@ -59638,10 +59638,13 @@ var Period = ({ className, ...internal }) => {
|
|
|
59638
59638
|
const { hidePlaceholder } = useFieldPropsV2();
|
|
59639
59639
|
const { segment } = internal;
|
|
59640
59640
|
const { t } = useTranslation2();
|
|
59641
|
+
const timeFieldState = useContext(TimeFieldStateContext);
|
|
59641
59642
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.period");
|
|
59643
|
+
const toggleAmPm = () => timeFieldState?.increment("dayPeriod");
|
|
59642
59644
|
return /* @__PURE__ */ React171.createElement(DateSegment, {
|
|
59643
59645
|
segment,
|
|
59644
59646
|
className,
|
|
59647
|
+
onClick: toggleAmPm,
|
|
59645
59648
|
...placeholder && {
|
|
59646
59649
|
placeholder
|
|
59647
59650
|
}
|
|
@@ -66878,7 +66881,7 @@ TextInput.Input;
|
|
|
66878
66881
|
TextInput.Description;
|
|
66879
66882
|
TextInput.Error;
|
|
66880
66883
|
var TimeInput2 = ({ children }) => {
|
|
66881
|
-
const { id: id6, value, onChange, disabled, required, onBlur, onFocus, use24HourFormat, FieldLayout, hasError } = useFieldPropsV2();
|
|
66884
|
+
const { id: id6, value, onChange, disabled, readOnly, required, onBlur, onFocus, use24HourFormat, FieldLayout, hasError } = useFieldPropsV2();
|
|
66882
66885
|
const { inputId, ariaDescribedBy, labelId } = useFieldAttributes2();
|
|
66883
66886
|
const handleChange = useCallback((timeValue2) => {
|
|
66884
66887
|
const stringValue = timeValueToString2(timeValue2);
|
|
@@ -66901,6 +66904,7 @@ var TimeInput2 = ({ children }) => {
|
|
|
66901
66904
|
value: timeValue,
|
|
66902
66905
|
onChange: handleChange,
|
|
66903
66906
|
isDisabled: disabled,
|
|
66907
|
+
isReadOnly: readOnly,
|
|
66904
66908
|
isInvalid: hasError,
|
|
66905
66909
|
isRequired: required,
|
|
66906
66910
|
onBlur,
|
|
@@ -66976,10 +66980,13 @@ var Period2 = ({ className, ...internal }) => {
|
|
|
66976
66980
|
const { hidePlaceholder } = useFieldPropsV2();
|
|
66977
66981
|
const { segment } = internal;
|
|
66978
66982
|
const { t } = useTranslation2();
|
|
66983
|
+
const timeFieldState = useContext(TimeFieldStateContext);
|
|
66979
66984
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.period");
|
|
66985
|
+
const toggleAmPm = () => timeFieldState?.increment("dayPeriod");
|
|
66980
66986
|
return /* @__PURE__ */ React171.createElement(DateSegment, {
|
|
66981
66987
|
segment,
|
|
66982
66988
|
className,
|
|
66989
|
+
onClick: toggleAmPm,
|
|
66983
66990
|
...placeholder && {
|
|
66984
66991
|
placeholder
|
|
66985
66992
|
}
|