@wix/form-public 0.506.0 → 0.507.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 +22 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +22 -7
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -53741,7 +53741,9 @@ var DROPDOWN_FIELD_TYPES = [
|
|
|
53741
53741
|
FIELD_TYPES.DATE_INPUT,
|
|
53742
53742
|
FIELD_TYPES.CONTACTS_BIRTHDATE,
|
|
53743
53743
|
FIELD_TYPES.DATE_TIME_INPUT,
|
|
53744
|
-
FIELD_TYPES.DEXT_DATE_TIME_INPUT
|
|
53744
|
+
FIELD_TYPES.DEXT_DATE_TIME_INPUT,
|
|
53745
|
+
FIELD_TYPES.DATE_PICKER,
|
|
53746
|
+
FIELD_TYPES.DEXT_DATE_PICKER
|
|
53745
53747
|
];
|
|
53746
53748
|
var PHONE_FIELD_TYPES = [
|
|
53747
53749
|
FIELD_TYPES.PHONE,
|
|
@@ -54098,6 +54100,8 @@ var DatePicker = ({ children }) => {
|
|
|
54098
54100
|
const { labelId } = useFieldAttributes();
|
|
54099
54101
|
const { regionalFormat } = useConfig();
|
|
54100
54102
|
const [container, setContainer] = useState(null);
|
|
54103
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
54104
|
+
const isForcedOpen = useIsForcedOpenDropdown(id6);
|
|
54101
54105
|
const handleChange = useCallback((dateValue2) => {
|
|
54102
54106
|
const stringValue = dateValueToString(dateValue2);
|
|
54103
54107
|
onChange(stringValue);
|
|
@@ -54131,8 +54135,12 @@ var DatePicker = ({ children }) => {
|
|
|
54131
54135
|
isReadOnly: readOnly,
|
|
54132
54136
|
isRequired: required,
|
|
54133
54137
|
onBlur,
|
|
54134
|
-
onFocus
|
|
54135
|
-
|
|
54138
|
+
onFocus,
|
|
54139
|
+
isOpen: isForcedOpen || isOpen,
|
|
54140
|
+
onOpenChange: isForcedOpen ? void 0 : setIsOpen
|
|
54141
|
+
}, controlElement, applyInternalProps(calendarElement, {
|
|
54142
|
+
isForcedOpen
|
|
54143
|
+
})))),
|
|
54136
54144
|
renderDescription: () => /* @__PURE__ */ React172.createElement(React172.Fragment, null, errorElement, descriptionElement)
|
|
54137
54145
|
});
|
|
54138
54146
|
};
|
|
@@ -54215,7 +54223,8 @@ var Trigger = ({ children, className }) => {
|
|
|
54215
54223
|
className
|
|
54216
54224
|
}, children);
|
|
54217
54225
|
};
|
|
54218
|
-
var Calendar = ({ children, className }) => {
|
|
54226
|
+
var Calendar = ({ children, className, ...internal }) => {
|
|
54227
|
+
const { isForcedOpen } = internal;
|
|
54219
54228
|
const { regionalFormat, isMobile: isMobile2 } = useConfig();
|
|
54220
54229
|
const { availability } = useFieldPropsV2();
|
|
54221
54230
|
const firstDayOfWeek = useMemo(() => getFirstDayOfTheWeek(regionalFormat), [
|
|
@@ -54237,7 +54246,10 @@ var Calendar = ({ children, className }) => {
|
|
|
54237
54246
|
return /* @__PURE__ */ React172.createElement(NonModalPopover, {
|
|
54238
54247
|
className,
|
|
54239
54248
|
containerPadding: 0
|
|
54240
|
-
}, /* @__PURE__ */ React172.createElement(
|
|
54249
|
+
}, /* @__PURE__ */ React172.createElement(CalendarDialog, {
|
|
54250
|
+
isForcedOpen
|
|
54251
|
+
}, /* @__PURE__ */ React172.createElement(Calendar$1, {
|
|
54252
|
+
autoFocus: isForcedOpen ? false : void 0,
|
|
54241
54253
|
firstDayOfWeek: convertFirstDayOfWeek(firstDayOfWeek),
|
|
54242
54254
|
isDateUnavailable
|
|
54243
54255
|
}, /* @__PURE__ */ React172.createElement("header", null, previousTriggerElement, /* @__PURE__ */ React172.createElement(CalendarMonthPicker, null, (aria) => applyInternalProps(monthTriggerElement, {
|
|
@@ -54260,12 +54272,15 @@ var Calendar = ({ children, className }) => {
|
|
|
54260
54272
|
date
|
|
54261
54273
|
})))));
|
|
54262
54274
|
};
|
|
54263
|
-
var
|
|
54275
|
+
var CalendarDialog = ({ isForcedOpen, children }) => isForcedOpen ? /* @__PURE__ */ React172.createElement("div", {
|
|
54276
|
+
role: "dialog"
|
|
54277
|
+
}, children) : /* @__PURE__ */ React172.createElement(Dialog, null, children);
|
|
54278
|
+
var Day3 = ({ children, className, ...internal }) => {
|
|
54264
54279
|
const { date } = internal;
|
|
54265
54280
|
return /* @__PURE__ */ React172.createElement(CalendarCell, {
|
|
54266
54281
|
className,
|
|
54267
54282
|
date
|
|
54268
|
-
});
|
|
54283
|
+
}, children);
|
|
54269
54284
|
};
|
|
54270
54285
|
var PreviousTrigger = ({ children, className }) => /* @__PURE__ */ React172.createElement(Button, {
|
|
54271
54286
|
slot: "previous",
|