@wix/form-public 0.148.0 → 0.149.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 +806 -787
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +460 -441
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
1
|
+
import * as React42 from 'react';
|
|
2
|
+
import React42__default, { createContext, useMemo, useRef, useCallback, useState, useEffect, Children, isValidElement, cloneElement, useContext, useImperativeHandle, useLayoutEffect } from 'react';
|
|
3
3
|
import camelCase from 'lodash.camelcase';
|
|
4
4
|
import mapKeys from 'lodash.mapkeys';
|
|
5
5
|
import i18next from 'i18next';
|
|
@@ -1530,7 +1530,7 @@ var require_classnames = __commonJS({
|
|
|
1530
1530
|
var AddSmall, AddSmall_default;
|
|
1531
1531
|
var init_AddSmall = __esm({
|
|
1532
1532
|
"../../node_modules/@wix/wix-ui-icons-common/dist/esm/default/general/dist/components/AddSmall.js"() {
|
|
1533
|
-
AddSmall = ({ size, ...props }) => /* @__PURE__ */
|
|
1533
|
+
AddSmall = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React42.createElement("path", { d: "M10 9 10 5 9 5 9 9 5 9 5 10 9 10 9 14 10 14 10 10 14 10 14 9z" }));
|
|
1534
1534
|
AddSmall.displayName = "AddSmall";
|
|
1535
1535
|
AddSmall_default = AddSmall;
|
|
1536
1536
|
}
|
|
@@ -1538,7 +1538,7 @@ var init_AddSmall = __esm({
|
|
|
1538
1538
|
var DeleteSmall, DeleteSmall_default;
|
|
1539
1539
|
var init_DeleteSmall = __esm({
|
|
1540
1540
|
"../../node_modules/@wix/wix-ui-icons-common/dist/esm/default/general/dist/components/DeleteSmall.js"() {
|
|
1541
|
-
DeleteSmall = ({ size, ...props }) => /* @__PURE__ */
|
|
1541
|
+
DeleteSmall = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 18 18", fill: "currentColor", width: size || "18", height: size || "18", ...props }, /* @__PURE__ */ React42.createElement("path", { d: "M13,6 L13,13 C13,14.1045695 12.1045695,15 11,15 L7,15 C5.8954305,15 5,14.1045695 5,13 L5,6 L4,6 L4,5 L7,5 L7,4 C7,3.44771525 7.44771525,3 8,3 L10,3 C10.5522847,3 11,3.44771525 11,4 L11,5 L14,5 L14,6 L13,6 Z M6,6 L6,13 C6,13.5522847 6.44771525,14 7,14 L11,14 C11.5522847,14 12,13.5522847 12,13 L12,6 L6,6 Z M8,4 L8,5 L10,5 L10,4 L8,4 Z" }));
|
|
1542
1542
|
DeleteSmall.displayName = "DeleteSmall";
|
|
1543
1543
|
DeleteSmall_default = DeleteSmall;
|
|
1544
1544
|
}
|
|
@@ -1546,7 +1546,7 @@ var init_DeleteSmall = __esm({
|
|
|
1546
1546
|
var Globe, Globe_default;
|
|
1547
1547
|
var init_Globe = __esm({
|
|
1548
1548
|
"../../node_modules/@wix/wix-ui-icons-common/dist/esm/default/general/dist/components/Globe.js"() {
|
|
1549
|
-
Globe = ({ size, ...props }) => /* @__PURE__ */
|
|
1549
|
+
Globe = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React42.createElement("path", { d: "M4.427 15h2.77C7.07 14.21 7 13.37 7 12.5c0-.87.07-1.71.198-2.5H4.427A7.488 7.488 0 0 0 4 12.5c0 .877.15 1.718.427 2.5Zm.438 1a7.524 7.524 0 0 0 4.14 3.575c-.698-.88-1.258-2.118-1.607-3.575H4.865Zm13.708-1A7.487 7.487 0 0 0 19 12.5a7.47 7.47 0 0 0-.427-2.5h-2.77c.128.79.197 1.63.197 2.5 0 .87-.07 1.71-.198 2.5h2.771Zm-.438 1h-2.533c-.349 1.457-.91 2.695-1.607 3.575A7.525 7.525 0 0 0 18.135 16Zm-9.923-1h6.576c.136-.778.212-1.619.212-2.5s-.076-1.722-.212-2.5H8.212A14.535 14.535 0 0 0 8 12.5c0 .881.076 1.722.212 2.5Zm.217 1c.624 2.4 1.842 4 3.071 4 1.23 0 2.447-1.6 3.071-4H8.43ZM4.865 9h2.533c.349-1.457.91-2.695 1.607-3.575A7.524 7.524 0 0 0 4.865 9Zm13.27 0a7.525 7.525 0 0 0-4.14-3.575c.698.88 1.258 2.118 1.607 3.575h2.533ZM8.429 9h6.142c-.624-2.4-1.842-4-3.071-4-1.23 0-2.447 1.6-3.071 4ZM11.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17Z" }));
|
|
1550
1550
|
Globe.displayName = "Globe";
|
|
1551
1551
|
Globe_default = Globe;
|
|
1552
1552
|
}
|
|
@@ -1554,7 +1554,7 @@ var init_Globe = __esm({
|
|
|
1554
1554
|
var StatusAlert, StatusAlert_default;
|
|
1555
1555
|
var init_StatusAlert = __esm({
|
|
1556
1556
|
"../../node_modules/@wix/wix-ui-icons-common/dist/esm/default/general/dist/components/StatusAlert.js"() {
|
|
1557
|
-
StatusAlert = ({ size, ...props }) => /* @__PURE__ */
|
|
1557
|
+
StatusAlert = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React42.createElement("path", { d: "M12,21 C7.02943725,21 3,16.9705627 3,12 C3,7.02943725 7.02943725,3 12,3 C16.9705627,3 21,7.02943725 21,12 C21,16.9705627 16.9705627,21 12,21 Z M12,20 C16.418278,20 20,16.418278 20,12 C20,7.581722 16.418278,4 12,4 C7.581722,4 4,7.581722 4,12 C4,16.418278 7.581722,20 12,20 Z M12.7287834,7.27532214 C12.9203342,7.46687299 13.0199347,7.73174979 13.0020527,8.00205275 L13.0020527,12.0020527 C13.0199347,12.2723557 12.9203342,12.5372325 12.7287834,12.7287834 C12.5372325,12.9203342 12.2723557,13.0199347 12.0020527,13.0020527 C11.7317498,13.0199347 11.466873,12.9203342 11.2753221,12.7287834 C11.0837713,12.5372325 10.9841708,12.2723557 11.0020527,12.0020527 L11.0020527,8.00205275 C10.9841708,7.73174979 11.0837713,7.46687299 11.2753221,7.27532214 C11.466873,7.08377129 11.7317498,6.98417081 12.0020527,7.00205275 C12.2723557,6.98417081 12.5372325,7.08377129 12.7287834,7.27532214 Z M12.7287834,15.2753221 C12.9203342,15.466873 13.0199347,15.7317498 13.0020527,16.0020527 C13.0199347,16.2723557 12.9203342,16.5372325 12.7287834,16.7287834 C12.5372325,16.9203342 12.2723557,17.0199347 12.0020527,17.0020527 C11.7317498,17.0199347 11.466873,16.9203342 11.2753221,16.7287834 C11.0837713,16.5372325 10.9841708,16.2723557 11.0020527,16.0020527 C10.9841708,15.7317498 11.0837713,15.466873 11.2753221,15.2753221 C11.466873,15.0837713 11.7317498,14.9841708 12.0020527,15.0020527 C12.2723557,14.9841708 12.5372325,15.0837713 12.7287834,15.2753221 Z" }));
|
|
1558
1558
|
StatusAlert.displayName = "StatusAlert";
|
|
1559
1559
|
StatusAlert_default = StatusAlert;
|
|
1560
1560
|
}
|
|
@@ -25196,7 +25196,7 @@ var FormStatusProvider = (_ref) => {
|
|
|
25196
25196
|
setFormStatus
|
|
25197
25197
|
};
|
|
25198
25198
|
}, [currentFormStatus, setFormStatus]);
|
|
25199
|
-
return /* @__PURE__ */
|
|
25199
|
+
return /* @__PURE__ */ React42__default.createElement(FormStatusContext.Provider, {
|
|
25200
25200
|
value: contextValue
|
|
25201
25201
|
}, children);
|
|
25202
25202
|
};
|
|
@@ -25211,23 +25211,42 @@ var WixRicosViewerContext = /* @__PURE__ */ createContext(void 0);
|
|
|
25211
25211
|
|
|
25212
25212
|
// ../../node_modules/@wix/ricos/dist/es/index.js
|
|
25213
25213
|
init_v1();
|
|
25214
|
+
var DEFAULT_CONFIG = {
|
|
25215
|
+
language: "en",
|
|
25216
|
+
accountLanguage: "en",
|
|
25217
|
+
regionalFormat: "en",
|
|
25218
|
+
accountRegionalFormat: "en"
|
|
25219
|
+
};
|
|
25214
25220
|
var ConfigContext = /* @__PURE__ */ createContext(null);
|
|
25221
|
+
function ConfigContextProvider(_ref) {
|
|
25222
|
+
let {
|
|
25223
|
+
value: configInput,
|
|
25224
|
+
children
|
|
25225
|
+
} = _ref;
|
|
25226
|
+
const config = {
|
|
25227
|
+
...configInput,
|
|
25228
|
+
language: configInput.language ?? DEFAULT_CONFIG.language,
|
|
25229
|
+
accountLanguage: configInput.accountLanguage ?? DEFAULT_CONFIG.accountLanguage,
|
|
25230
|
+
regionalFormat: configInput.regionalFormat ?? DEFAULT_CONFIG.regionalFormat,
|
|
25231
|
+
accountRegionalFormat: configInput.accountRegionalFormat ?? DEFAULT_CONFIG.accountRegionalFormat
|
|
25232
|
+
};
|
|
25233
|
+
return /* @__PURE__ */ React42__default.createElement(ConfigContext.Provider, {
|
|
25234
|
+
value: config
|
|
25235
|
+
}, children);
|
|
25236
|
+
}
|
|
25215
25237
|
function useConfig() {
|
|
25216
25238
|
const context = useContext(ConfigContext);
|
|
25217
25239
|
if (context === void 0) {
|
|
25218
25240
|
throw new Error("useConfig must be used within a ConfigContext.Provider");
|
|
25219
25241
|
}
|
|
25220
|
-
return context ||
|
|
25221
|
-
locale: "en",
|
|
25222
|
-
regionalFormat: "en"
|
|
25223
|
-
};
|
|
25242
|
+
return context || DEFAULT_CONFIG;
|
|
25224
25243
|
}
|
|
25225
25244
|
var htmlAttributesPlugin = (_) => ({
|
|
25226
25245
|
config: {},
|
|
25227
25246
|
type: "",
|
|
25228
25247
|
nodeViewDecorators: [htmlAttributesDecorator],
|
|
25229
25248
|
nodeViewRenderers: {
|
|
25230
|
-
[Node_Type.EXTERNAL]: (__) => /* @__PURE__ */
|
|
25249
|
+
[Node_Type.EXTERNAL]: (__) => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null)
|
|
25231
25250
|
}
|
|
25232
25251
|
});
|
|
25233
25252
|
var htmlAttributesDecorator = {
|
|
@@ -25238,13 +25257,13 @@ var htmlAttributesDecorator = {
|
|
|
25238
25257
|
node
|
|
25239
25258
|
} = _ref;
|
|
25240
25259
|
if (((_node$textData = node.textData) == null ? void 0 : _node$textData.text) == null) {
|
|
25241
|
-
return /* @__PURE__ */
|
|
25260
|
+
return /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
25242
25261
|
}
|
|
25243
25262
|
const props = Object.fromEntries(Object.entries(((_node$externalData = node.externalData) == null ? void 0 : _node$externalData.fields) ?? []).map((_ref2) => {
|
|
25244
25263
|
let [k, v] = _ref2;
|
|
25245
25264
|
return [k, v.stringValue];
|
|
25246
25265
|
}));
|
|
25247
|
-
return /* @__PURE__ */
|
|
25266
|
+
return /* @__PURE__ */ React42__default.createElement("span", props, (_node$textData2 = node.textData) == null ? void 0 : _node$textData2.text);
|
|
25248
25267
|
}
|
|
25249
25268
|
};
|
|
25250
25269
|
var UniqueFieldSuffixContext = /* @__PURE__ */ createContext(void 0);
|
|
@@ -25257,7 +25276,7 @@ var UniqueFieldSuffixContextProvider = (_ref) => {
|
|
|
25257
25276
|
compId = "comp"
|
|
25258
25277
|
} = useConfig();
|
|
25259
25278
|
const uniqueId = `${compId}-${parentId.split("-").at(0)}`;
|
|
25260
|
-
return /* @__PURE__ */
|
|
25279
|
+
return /* @__PURE__ */ React42__default.createElement(UniqueFieldSuffixContext.Provider, {
|
|
25261
25280
|
value: uniqueId
|
|
25262
25281
|
}, children);
|
|
25263
25282
|
};
|
|
@@ -25273,14 +25292,14 @@ var FocusedFieldProvider = (_ref) => {
|
|
|
25273
25292
|
let {
|
|
25274
25293
|
children
|
|
25275
25294
|
} = _ref;
|
|
25276
|
-
const [focusedFieldId, setFocusedFieldId] =
|
|
25295
|
+
const [focusedFieldId, setFocusedFieldId] = React42__default.useState(void 0);
|
|
25277
25296
|
const contextValue = useMemo(() => {
|
|
25278
25297
|
return {
|
|
25279
25298
|
focusedFieldId,
|
|
25280
25299
|
setFocusedFieldId
|
|
25281
25300
|
};
|
|
25282
25301
|
}, [focusedFieldId, setFocusedFieldId]);
|
|
25283
|
-
return /* @__PURE__ */
|
|
25302
|
+
return /* @__PURE__ */ React42__default.createElement(FocusedFieldContext.Provider, {
|
|
25284
25303
|
value: contextValue
|
|
25285
25304
|
}, children);
|
|
25286
25305
|
};
|
|
@@ -25308,7 +25327,7 @@ var EventsProvider = (_ref) => {
|
|
|
25308
25327
|
setSubmittedValues(values || {});
|
|
25309
25328
|
}
|
|
25310
25329
|
}), [submitSuccessCounter, submittedValues]);
|
|
25311
|
-
return /* @__PURE__ */
|
|
25330
|
+
return /* @__PURE__ */ React42__default.createElement(EventsContext.Provider, {
|
|
25312
25331
|
value
|
|
25313
25332
|
}, children);
|
|
25314
25333
|
};
|
|
@@ -25388,9 +25407,9 @@ var ScrollProvider = (_ref) => {
|
|
|
25388
25407
|
}
|
|
25389
25408
|
}
|
|
25390
25409
|
}), []);
|
|
25391
|
-
return /* @__PURE__ */
|
|
25410
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
25392
25411
|
ref: scrollViewRef
|
|
25393
|
-
}, /* @__PURE__ */
|
|
25412
|
+
}, /* @__PURE__ */ React42__default.createElement(ScrollContext.Provider, {
|
|
25394
25413
|
value
|
|
25395
25414
|
}, children));
|
|
25396
25415
|
};
|
|
@@ -25591,7 +25610,7 @@ var ExternalDataProvider = (_ref) => {
|
|
|
25591
25610
|
children,
|
|
25592
25611
|
externalData
|
|
25593
25612
|
} = _ref;
|
|
25594
|
-
return /* @__PURE__ */
|
|
25613
|
+
return /* @__PURE__ */ React42__default.createElement(ExternalDataContext.Provider, {
|
|
25595
25614
|
value: externalData ?? FALLBACK
|
|
25596
25615
|
}, children);
|
|
25597
25616
|
};
|
|
@@ -26442,9 +26461,9 @@ var InputField = (_ref) => {
|
|
|
26442
26461
|
if (!FieldComponent) {
|
|
26443
26462
|
return null;
|
|
26444
26463
|
}
|
|
26445
|
-
return /* @__PURE__ */
|
|
26464
|
+
return /* @__PURE__ */ React42__default.createElement(FieldAttributesContext.Provider, {
|
|
26446
26465
|
value: fieldAttributes
|
|
26447
|
-
}, /* @__PURE__ */
|
|
26466
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldPropsContext.Provider, {
|
|
26448
26467
|
value: {
|
|
26449
26468
|
...propsMapper({
|
|
26450
26469
|
...field.properties,
|
|
@@ -26466,7 +26485,7 @@ var InputField = (_ref) => {
|
|
|
26466
26485
|
errorMessage,
|
|
26467
26486
|
v2: fieldProps
|
|
26468
26487
|
}
|
|
26469
|
-
}, /* @__PURE__ */
|
|
26488
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldComponent, fieldProps)));
|
|
26470
26489
|
};
|
|
26471
26490
|
var ReadOnlyField = (_ref) => {
|
|
26472
26491
|
let {
|
|
@@ -26494,7 +26513,7 @@ var ReadOnlyField = (_ref) => {
|
|
|
26494
26513
|
requiredIndicatorType: requiredIndicator,
|
|
26495
26514
|
requiredIndicatorPlacement
|
|
26496
26515
|
};
|
|
26497
|
-
return /* @__PURE__ */
|
|
26516
|
+
return /* @__PURE__ */ React42__default.createElement(FieldPropsContext.Provider, {
|
|
26498
26517
|
value: {
|
|
26499
26518
|
...propsMapper({
|
|
26500
26519
|
...field.properties,
|
|
@@ -26506,7 +26525,7 @@ var ReadOnlyField = (_ref) => {
|
|
|
26506
26525
|
}),
|
|
26507
26526
|
v2: fieldProps
|
|
26508
26527
|
}
|
|
26509
|
-
}, /* @__PURE__ */
|
|
26528
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldComponent, fieldProps));
|
|
26510
26529
|
};
|
|
26511
26530
|
|
|
26512
26531
|
// ../form-fields/dist/esm/ui/form/components/form/nested-form-field.js
|
|
@@ -26556,7 +26575,7 @@ var NestedFormField = (_ref) => {
|
|
|
26556
26575
|
requiredIndicatorType: requiredIndicator,
|
|
26557
26576
|
requiredIndicatorPlacement
|
|
26558
26577
|
};
|
|
26559
|
-
return /* @__PURE__ */
|
|
26578
|
+
return /* @__PURE__ */ React42__default.createElement(FieldPropsContext.Provider, {
|
|
26560
26579
|
value: {
|
|
26561
26580
|
...propsMapper({
|
|
26562
26581
|
...field.properties,
|
|
@@ -26574,7 +26593,7 @@ var NestedFormField = (_ref) => {
|
|
|
26574
26593
|
onChange: handleChange,
|
|
26575
26594
|
v2: fieldProps
|
|
26576
26595
|
}
|
|
26577
|
-
}, /* @__PURE__ */
|
|
26596
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldComponent, fieldProps));
|
|
26578
26597
|
};
|
|
26579
26598
|
var FieldActionsContext = /* @__PURE__ */ createContext({});
|
|
26580
26599
|
function useFieldActions() {
|
|
@@ -26702,7 +26721,7 @@ var SubmitButtonField = (_ref) => {
|
|
|
26702
26721
|
onPreviousClick: () => actions == null ? void 0 : actions.setPreviousStep(),
|
|
26703
26722
|
onNextClick: () => actions == null ? void 0 : actions.setNextStep()
|
|
26704
26723
|
};
|
|
26705
|
-
return /* @__PURE__ */
|
|
26724
|
+
return /* @__PURE__ */ React42__default.createElement(FieldPropsContext.Provider, {
|
|
26706
26725
|
value: {
|
|
26707
26726
|
...propsMapper({
|
|
26708
26727
|
...field.properties,
|
|
@@ -26724,7 +26743,7 @@ var SubmitButtonField = (_ref) => {
|
|
|
26724
26743
|
}),
|
|
26725
26744
|
v2: fieldProps
|
|
26726
26745
|
}
|
|
26727
|
-
}, /* @__PURE__ */
|
|
26746
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldComponent, fieldProps));
|
|
26728
26747
|
};
|
|
26729
26748
|
|
|
26730
26749
|
// ../form-fields/dist/esm/services/multiline-address.js
|
|
@@ -26741,24 +26760,24 @@ var FormField = (_ref) => {
|
|
|
26741
26760
|
...rest
|
|
26742
26761
|
} = _ref;
|
|
26743
26762
|
if (!isMultilineAddressField(field) && isNestedFormField(field)) {
|
|
26744
|
-
return /* @__PURE__ */
|
|
26763
|
+
return /* @__PURE__ */ React42__default.createElement(NestedFormField, _extends({}, rest, {
|
|
26745
26764
|
field,
|
|
26746
26765
|
FieldLayout
|
|
26747
26766
|
}));
|
|
26748
26767
|
}
|
|
26749
26768
|
if (isInputField(field)) {
|
|
26750
|
-
return /* @__PURE__ */
|
|
26769
|
+
return /* @__PURE__ */ React42__default.createElement(InputField, _extends({}, rest, {
|
|
26751
26770
|
field,
|
|
26752
26771
|
FieldLayout
|
|
26753
26772
|
}));
|
|
26754
26773
|
}
|
|
26755
26774
|
if (field.fieldType === "SUBMIT_BUTTON") {
|
|
26756
|
-
return /* @__PURE__ */
|
|
26775
|
+
return /* @__PURE__ */ React42__default.createElement(SubmitButtonField, _extends({}, rest, {
|
|
26757
26776
|
field,
|
|
26758
26777
|
FieldLayout
|
|
26759
26778
|
}));
|
|
26760
26779
|
}
|
|
26761
|
-
return /* @__PURE__ */
|
|
26780
|
+
return /* @__PURE__ */ React42__default.createElement(ReadOnlyField, _extends({}, rest, {
|
|
26762
26781
|
field,
|
|
26763
26782
|
FieldLayout
|
|
26764
26783
|
}));
|
|
@@ -26791,19 +26810,19 @@ var createFormFields = (_ref) => {
|
|
|
26791
26810
|
fieldActions
|
|
26792
26811
|
} = _ref;
|
|
26793
26812
|
return form.fields.map((formField) => {
|
|
26794
|
-
const component = /* @__PURE__ */
|
|
26813
|
+
const component = /* @__PURE__ */ React42__default.createElement(FormContext.Provider, {
|
|
26795
26814
|
value: formSchema
|
|
26796
|
-
}, /* @__PURE__ */
|
|
26815
|
+
}, /* @__PURE__ */ React42__default.createElement(FormFieldsContext.Provider, {
|
|
26797
26816
|
value: fields
|
|
26798
|
-
}, /* @__PURE__ */
|
|
26817
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldActionsContext.Provider, {
|
|
26799
26818
|
value: fieldActions
|
|
26800
|
-
}, /* @__PURE__ */
|
|
26819
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldValidationContext.Provider, {
|
|
26801
26820
|
value: {
|
|
26802
26821
|
validateFields: validateFields2
|
|
26803
26822
|
}
|
|
26804
|
-
}, /* @__PURE__ */
|
|
26823
|
+
}, /* @__PURE__ */ React42__default.createElement(FormViewContext.Provider, {
|
|
26805
26824
|
value: form
|
|
26806
|
-
}, /* @__PURE__ */
|
|
26825
|
+
}, /* @__PURE__ */ React42__default.createElement(FormField, {
|
|
26807
26826
|
key: formField.id,
|
|
26808
26827
|
field: formField,
|
|
26809
26828
|
values,
|
|
@@ -26852,7 +26871,7 @@ var Focusable = (_ref) => {
|
|
|
26852
26871
|
scrollTo(viewRef.current);
|
|
26853
26872
|
}
|
|
26854
26873
|
}, [scrollTo, fieldId, focusedFieldId]);
|
|
26855
|
-
return /* @__PURE__ */
|
|
26874
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
26856
26875
|
ref: viewRef
|
|
26857
26876
|
}, children);
|
|
26858
26877
|
};
|
|
@@ -26875,16 +26894,16 @@ var Grid = (_ref) => {
|
|
|
26875
26894
|
enableAnimations
|
|
26876
26895
|
} = useConfig();
|
|
26877
26896
|
const reactElementsByRow = getReactElementsByRow(items);
|
|
26878
|
-
return /* @__PURE__ */
|
|
26897
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
26879
26898
|
className: grid_module_default.container,
|
|
26880
26899
|
dir: isRTL ? "rtl" : ""
|
|
26881
26900
|
}, reactElementsByRow.map((rowData, index) => {
|
|
26882
26901
|
const fieldId = rowData.firstFieldId;
|
|
26883
26902
|
const key = isMobile2 && fieldId || index;
|
|
26884
|
-
return /* @__PURE__ */
|
|
26903
|
+
return /* @__PURE__ */ React42__default.createElement(Focusable, {
|
|
26885
26904
|
key: fieldId,
|
|
26886
26905
|
fieldId
|
|
26887
|
-
}, /* @__PURE__ */
|
|
26906
|
+
}, /* @__PURE__ */ React42__default.createElement("div", {
|
|
26888
26907
|
key,
|
|
26889
26908
|
style: getGridStyle({
|
|
26890
26909
|
layout
|
|
@@ -26898,7 +26917,7 @@ var Grid = (_ref) => {
|
|
|
26898
26917
|
function getReactElementsByRow(items) {
|
|
26899
26918
|
const reactElementsByRow = items.reduce((result2, item) => {
|
|
26900
26919
|
const row = item.layout.row;
|
|
26901
|
-
const element = /* @__PURE__ */
|
|
26920
|
+
const element = /* @__PURE__ */ React42__default.cloneElement(item.component, {
|
|
26902
26921
|
key: item.id
|
|
26903
26922
|
});
|
|
26904
26923
|
if (result2[row]) {
|
|
@@ -26964,7 +26983,7 @@ var DefaultFieldLayout = (_ref) => {
|
|
|
26964
26983
|
layout
|
|
26965
26984
|
});
|
|
26966
26985
|
if ("children" in rest) {
|
|
26967
|
-
return /* @__PURE__ */
|
|
26986
|
+
return /* @__PURE__ */ React42__default.createElement("div", _extends({
|
|
26968
26987
|
style: gridStyles.container
|
|
26969
26988
|
}, dataAttributes), rest.children);
|
|
26970
26989
|
}
|
|
@@ -26973,9 +26992,9 @@ var DefaultFieldLayout = (_ref) => {
|
|
|
26973
26992
|
renderInput,
|
|
26974
26993
|
renderDescription
|
|
26975
26994
|
} = rest;
|
|
26976
|
-
return /* @__PURE__ */
|
|
26995
|
+
return /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, /* @__PURE__ */ React42__default.createElement("div", {
|
|
26977
26996
|
style: gridStyles.label
|
|
26978
|
-
}, renderLabel()), /* @__PURE__ */
|
|
26997
|
+
}, renderLabel()), /* @__PURE__ */ React42__default.createElement("div", _extends({
|
|
26979
26998
|
style: gridStyles.input
|
|
26980
26999
|
}, dataAttributes), renderInput(), renderDescription()));
|
|
26981
27000
|
};
|
|
@@ -27006,18 +27025,18 @@ var FormRoot = (_ref) => {
|
|
|
27006
27025
|
fields,
|
|
27007
27026
|
fieldActions
|
|
27008
27027
|
});
|
|
27009
|
-
return /* @__PURE__ */
|
|
27028
|
+
return /* @__PURE__ */ React42__default.createElement(Grid, {
|
|
27010
27029
|
isRTL,
|
|
27011
27030
|
items: formFields,
|
|
27012
27031
|
layout: form.grid
|
|
27013
27032
|
});
|
|
27014
27033
|
};
|
|
27015
27034
|
var Form = (props) => {
|
|
27016
|
-
return /* @__PURE__ */
|
|
27035
|
+
return /* @__PURE__ */ React42__default.createElement(FormViewContext.Provider, {
|
|
27017
27036
|
value: props.form
|
|
27018
|
-
}, /* @__PURE__ */
|
|
27037
|
+
}, /* @__PURE__ */ React42__default.createElement(UniqueFieldSuffixContextProvider, {
|
|
27019
27038
|
parentId: props.form.parentId
|
|
27020
|
-
}, /* @__PURE__ */
|
|
27039
|
+
}, /* @__PURE__ */ React42__default.createElement(FormRoot, props)));
|
|
27021
27040
|
};
|
|
27022
27041
|
|
|
27023
27042
|
// ../form-fields/dist/esm/services/get-image-url.js
|
|
@@ -30087,19 +30106,19 @@ var useValidation = ({ form, errorsRef, setErrors, validationMode }) => {
|
|
|
30087
30106
|
}, [form, setErrors, handleFieldValidation]);
|
|
30088
30107
|
return { validateFields: validateFields2, validateStep, handleFieldValidation };
|
|
30089
30108
|
};
|
|
30090
|
-
var Delete = ({ size, ...props }) => /* @__PURE__ */
|
|
30109
|
+
var Delete = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React42.createElement("path", { fillRule: "evenodd", d: "M13.5,3 C14.327,3 15,3.673 15,4.5 L15,4.5 L15,5 L19,5 L19,6 L18,6 L18,17.5 C18,18.879 16.878,20 15.5,20 L15.5,20 L7.5,20 C6.122,20 5,18.879 5,17.5 L5,17.5 L5,6 L4,6 L4,5 L8,5 L8,4.5 C8,3.673 8.673,3 9.5,3 L9.5,3 Z M17,6 L6,6 L6,17.5 C6,18.327 6.673,19 7.5,19 L7.5,19 L15.5,19 C16.327,19 17,18.327 17,17.5 L17,17.5 L17,6 Z M10,9 L10,16 L9,16 L9,9 L10,9 Z M14,9 L14,16 L13,16 L13,9 L14,9 Z M13.5,4 L9.5,4 C9.224,4 9,4.225 9,4.5 L9,4.5 L9,5 L14,5 L14,4.5 C14,4.225 13.776,4 13.5,4 L13.5,4 Z" }));
|
|
30091
30110
|
Delete.displayName = "Delete";
|
|
30092
30111
|
var Delete_default = Delete;
|
|
30093
|
-
var Download = ({ size, ...props }) => /* @__PURE__ */
|
|
30112
|
+
var Download = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React42.createElement("path", { fillRule: "evenodd", d: "M4.9937,15.9971 L4.9937,18.4971 C4.9937,18.7721 5.2177,18.9971 5.4937,18.9971 L5.4937,18.9971 L17.4937,18.9971 C17.7697,18.9971 17.9937,18.7721 17.9937,18.4971 L17.9937,18.4971 L17.9937,15.9971 L18.9937,15.9971 L18.9937,18.4971 C18.9937,19.3241 18.3207,19.9971 17.4937,19.9971 L17.4937,19.9971 L5.4937,19.9971 C4.6657,19.9971 3.9937,19.3241 3.9937,18.4971 L3.9937,18.4971 L3.9937,15.9971 L4.9937,15.9971 Z M11.9933,4 L11.9933,14.078 L15.0293,11.043 L15.7363,11.75 L11.4933,15.992 L7.2513,11.75 L7.9583,11.043 L10.9933,14.078 L10.9933,4 L11.9933,4 Z" }));
|
|
30094
30113
|
Download.displayName = "Download";
|
|
30095
30114
|
var Download_default = Download;
|
|
30096
|
-
var Edit = ({ size, ...props }) => /* @__PURE__ */
|
|
30115
|
+
var Edit = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React42.createElement("path", { fillRule: "evenodd", d: "M18.8525,7.543 L17.7515,8.644 L15.3565,6.248 L16.4575,5.147 C16.5555,5.05 16.6835,5.001 16.8105,5.001 C16.9385,5.001 17.0665,5.05 17.1645,5.147 L18.8525,6.835 C19.0475,7.03 19.0475,7.348 18.8525,7.543 L18.8525,7.543 Z M8.1895,18.206 C8.1185,18.276 8.0275,18.324 7.9295,18.344 L5.1275,18.873 L5.6575,16.07 C5.6755,15.972 5.7225,15.882 5.7945,15.811 L14.6495,6.955 L17.0445,9.351 L8.1895,18.206 Z M19.5595,6.128 L17.8715,4.44 C17.2865,3.856 16.3355,3.856 15.7505,4.44 L5.0875,15.103 C4.8735,15.317 4.7295,15.588 4.6745,15.886 L4.0085,19.407 C3.9775,19.569 4.0295,19.736 4.1465,19.854 C4.2415,19.948 4.3685,20 4.4995,20 C4.5305,20 4.5615,19.997 4.5925,19.991 L8.1165,19.326 C8.4145,19.269 8.6855,19.125 8.8965,18.912 L19.5595,8.25 C20.1445,7.665 20.1445,6.713 19.5595,6.128 L19.5595,6.128 Z" }));
|
|
30097
30116
|
Edit.displayName = "Edit";
|
|
30098
30117
|
var Edit_default = Edit;
|
|
30099
|
-
var ErrorSmall = ({ size, ...props }) => /* @__PURE__ */
|
|
30118
|
+
var ErrorSmall = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: size || "20", height: size || "20", ...props }, /* @__PURE__ */ React42.createElement("path", { fillRule: "evenodd", d: "M9.5,3 C13.084,3 16,5.916 16,9.5 C16,13.084 13.084,16 9.5,16 C5.916,16 3,13.084 3,9.5 C3,5.916 5.916,3 9.5,3 Z M9.5,4 C6.467,4 4,6.467 4,9.5 C4,12.533 6.467,15 9.5,15 C12.533,15 15,12.533 15,9.5 C15,6.467 12.533,4 9.5,4 Z M10,11 L10,12 L9,12 L9,11 L10,11 Z M10,7 L10,10 L9,10 L9,7 L10,7 Z" }));
|
|
30100
30119
|
ErrorSmall.displayName = "ErrorSmall";
|
|
30101
30120
|
var ErrorSmall_default = ErrorSmall;
|
|
30102
|
-
var TextStyleSmall = ({ size, ...props }) => /* @__PURE__ */
|
|
30121
|
+
var TextStyleSmall = ({ size, ...props }) => /* @__PURE__ */ React42.createElement("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: size || "20", height: size || "20", ...props }, /* @__PURE__ */ React42.createElement("path", { fillRule: "evenodd", d: "M12,4 L12,5 L8,5 L8,16 L7,16 L7,5 L3,5 L3,4 L12,4 Z M18,8 L18,9 L15,9 L15,16 L14,16 L14,9 L11,9 L11,8 L18,8 Z" }));
|
|
30103
30122
|
TextStyleSmall.displayName = "TextStyleSmall";
|
|
30104
30123
|
var TextStyleSmall_default = TextStyleSmall;
|
|
30105
30124
|
var SubmitStatusContext = createContext(void 0);
|
|
@@ -30115,7 +30134,7 @@ var SubmitStatusProvider = ({ children }) => {
|
|
|
30115
30134
|
setSubmitFailureCode,
|
|
30116
30135
|
setSubmitFailureMessage
|
|
30117
30136
|
}), [submitSuccessMessage, submitFailureCode, submitFailureMessage]);
|
|
30118
|
-
return
|
|
30137
|
+
return React42__default.createElement(SubmitStatusContext.Provider, { value }, children);
|
|
30119
30138
|
};
|
|
30120
30139
|
var useSubmitStatus = () => {
|
|
30121
30140
|
const context = useContext(SubmitStatusContext);
|
|
@@ -31998,21 +32017,21 @@ var useFormBi = (form, bi, biFormFillSessionId) => {
|
|
|
31998
32017
|
formEditSessionId
|
|
31999
32018
|
]);
|
|
32000
32019
|
};
|
|
32001
|
-
var HostContext =
|
|
32002
|
-
|
|
32003
|
-
return
|
|
32020
|
+
var HostContext = React42__default.createContext(void 0);
|
|
32021
|
+
React42__default.memo(({ children, host }) => {
|
|
32022
|
+
return React42__default.createElement(HostContext.Provider, { value: host }, children);
|
|
32004
32023
|
});
|
|
32005
32024
|
|
|
32006
32025
|
// ../form-viewer/dist/esm/components/root/form-viewer-provider.js
|
|
32007
|
-
var FormViewerProvider = ({ i18n, bi, biFormFillSessionId, form, isMobile: isMobile2, isEditor, isComposer, isRTL, compId,
|
|
32026
|
+
var FormViewerProvider = ({ i18n, bi, biFormFillSessionId, form, isMobile: isMobile2, isEditor, isComposer, isRTL, compId, language, regionalFormat, externalData, forcedState, instance, children, httpClient, panorama, experiments, translationNamespace, currency, userData, WixRicosViewer, addressTemplates, atlasBaseUrl, fieldInitialData, enableAnimations }) => {
|
|
32008
32027
|
const translations = useMemo(() => ({
|
|
32009
|
-
t: i18n.getFixedT(
|
|
32028
|
+
t: i18n.getFixedT(language, translationNamespace),
|
|
32010
32029
|
i18n
|
|
32011
|
-
}), [
|
|
32030
|
+
}), [language, i18n, translationNamespace]);
|
|
32012
32031
|
const formBi = useFormBi(form, bi, biFormFillSessionId);
|
|
32013
32032
|
const host = useContext(HostContext) ?? {};
|
|
32014
32033
|
const config = useMemo(() => ({
|
|
32015
|
-
|
|
32034
|
+
language,
|
|
32016
32035
|
regionalFormat,
|
|
32017
32036
|
instance,
|
|
32018
32037
|
isMobile: isMobile2,
|
|
@@ -32026,7 +32045,7 @@ var FormViewerProvider = ({ i18n, bi, biFormFillSessionId, form, isMobile: isMob
|
|
|
32026
32045
|
enableAnimations,
|
|
32027
32046
|
style: host?.style
|
|
32028
32047
|
}), [
|
|
32029
|
-
|
|
32048
|
+
language,
|
|
32030
32049
|
regionalFormat,
|
|
32031
32050
|
instance,
|
|
32032
32051
|
isMobile2,
|
|
@@ -32041,55 +32060,55 @@ var FormViewerProvider = ({ i18n, bi, biFormFillSessionId, form, isMobile: isMob
|
|
|
32041
32060
|
host?.style
|
|
32042
32061
|
]);
|
|
32043
32062
|
const forcedViewState = useMemo(() => forcedState ?? [], [forcedState]);
|
|
32044
|
-
return
|
|
32063
|
+
return React42__default.createElement(
|
|
32045
32064
|
HttpClientContext.Provider,
|
|
32046
32065
|
{ value: { httpClient } },
|
|
32047
|
-
|
|
32066
|
+
React42__default.createElement(
|
|
32048
32067
|
PanoramaContext.Provider,
|
|
32049
32068
|
{ value: { panorama } },
|
|
32050
|
-
|
|
32069
|
+
React42__default.createElement(
|
|
32051
32070
|
TranslationContext.Provider,
|
|
32052
32071
|
{ value: translations },
|
|
32053
|
-
|
|
32072
|
+
React42__default.createElement(
|
|
32054
32073
|
ScrollProvider,
|
|
32055
32074
|
null,
|
|
32056
|
-
|
|
32075
|
+
React42__default.createElement(
|
|
32057
32076
|
FocusedFieldProvider,
|
|
32058
32077
|
null,
|
|
32059
|
-
|
|
32078
|
+
React42__default.createElement(
|
|
32060
32079
|
FieldInitialDataContext.Provider,
|
|
32061
32080
|
{ value: fieldInitialData },
|
|
32062
|
-
|
|
32081
|
+
React42__default.createElement(
|
|
32063
32082
|
BiContext.Provider,
|
|
32064
32083
|
{ value: formBi },
|
|
32065
|
-
|
|
32084
|
+
React42__default.createElement(
|
|
32066
32085
|
ExternalDataProvider,
|
|
32067
32086
|
{ externalData },
|
|
32068
|
-
|
|
32069
|
-
|
|
32087
|
+
React42__default.createElement(
|
|
32088
|
+
ConfigContextProvider,
|
|
32070
32089
|
{ value: config },
|
|
32071
|
-
|
|
32090
|
+
React42__default.createElement(
|
|
32072
32091
|
ForcedStateContext.Provider,
|
|
32073
32092
|
{ value: forcedViewState },
|
|
32074
|
-
|
|
32093
|
+
React42__default.createElement(
|
|
32075
32094
|
FormContext.Provider,
|
|
32076
32095
|
{ value: form },
|
|
32077
|
-
|
|
32096
|
+
React42__default.createElement(
|
|
32078
32097
|
AddressFormsContext.Provider,
|
|
32079
32098
|
{ value: {
|
|
32080
32099
|
getCountryAddressForm: (country) => getAddressForm(addressTemplates, country),
|
|
32081
32100
|
addressTemplates
|
|
32082
32101
|
} },
|
|
32083
|
-
|
|
32102
|
+
React42__default.createElement(
|
|
32084
32103
|
ExperimentsContext.Provider,
|
|
32085
32104
|
{ value: experiments },
|
|
32086
|
-
|
|
32105
|
+
React42__default.createElement(
|
|
32087
32106
|
EventsProvider,
|
|
32088
32107
|
null,
|
|
32089
|
-
|
|
32108
|
+
React42__default.createElement(
|
|
32090
32109
|
WixRicosViewerContext.Provider,
|
|
32091
32110
|
{ value: WixRicosViewer },
|
|
32092
|
-
|
|
32111
|
+
React42__default.createElement(SubmitStatusProvider, null, children)
|
|
32093
32112
|
)
|
|
32094
32113
|
)
|
|
32095
32114
|
)
|
|
@@ -32293,7 +32312,7 @@ var useForm3 = ({
|
|
|
32293
32312
|
if (!fieldsByRow.has(row)) {
|
|
32294
32313
|
fieldsByRow.set(row, []);
|
|
32295
32314
|
}
|
|
32296
|
-
fieldsByRow.get(row).push(
|
|
32315
|
+
fieldsByRow.get(row).push(React42__default.cloneElement(component, { key: field.id }));
|
|
32297
32316
|
});
|
|
32298
32317
|
return Array.from(fieldsByRow.entries()).sort(([rowA], [rowB]) => rowA - rowB).map(([_, elements]) => elements);
|
|
32299
32318
|
}, [formFields, currentView.fields]);
|
|
@@ -32415,7 +32434,7 @@ var FormProvider = ({
|
|
|
32415
32434
|
{
|
|
32416
32435
|
i18n: i18nInstance,
|
|
32417
32436
|
form: {},
|
|
32418
|
-
locale,
|
|
32437
|
+
language: locale,
|
|
32419
32438
|
regionalFormat,
|
|
32420
32439
|
currency,
|
|
32421
32440
|
translationNamespace: FORM_VIEWER_NAMESPACE,
|
|
@@ -32443,17 +32462,17 @@ var Description = (_ref) => {
|
|
|
32443
32462
|
descriptionId
|
|
32444
32463
|
} = useFieldAttributes2();
|
|
32445
32464
|
const {
|
|
32446
|
-
|
|
32465
|
+
language
|
|
32447
32466
|
} = useConfig();
|
|
32448
32467
|
if (!description) {
|
|
32449
32468
|
return null;
|
|
32450
32469
|
}
|
|
32451
|
-
return /* @__PURE__ */
|
|
32470
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
32452
32471
|
className,
|
|
32453
32472
|
id: descriptionId
|
|
32454
32473
|
}, children({
|
|
32455
32474
|
content: description,
|
|
32456
|
-
locale
|
|
32475
|
+
locale: language
|
|
32457
32476
|
}));
|
|
32458
32477
|
};
|
|
32459
32478
|
var Error2 = (_ref) => {
|
|
@@ -32471,11 +32490,11 @@ var Error2 = (_ref) => {
|
|
|
32471
32490
|
if (!hasError) {
|
|
32472
32491
|
return null;
|
|
32473
32492
|
}
|
|
32474
|
-
return /* @__PURE__ */
|
|
32493
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
32475
32494
|
id: errorId,
|
|
32476
32495
|
"data-hook": getErrorDataHook(target),
|
|
32477
32496
|
className
|
|
32478
|
-
}, /* @__PURE__ */
|
|
32497
|
+
}, /* @__PURE__ */ React42__default.createElement(ErrorSmall_default, {
|
|
32479
32498
|
"aria-hidden": true
|
|
32480
32499
|
}), errorMessage ?? "");
|
|
32481
32500
|
};
|
|
@@ -32550,7 +32569,7 @@ var RichTextLabel = (_ref) => {
|
|
|
32550
32569
|
t
|
|
32551
32570
|
} = useTranslation();
|
|
32552
32571
|
const {
|
|
32553
|
-
|
|
32572
|
+
language
|
|
32554
32573
|
} = useConfig();
|
|
32555
32574
|
const labelWithIndicator = useMemo(() => {
|
|
32556
32575
|
if (!required || requiredIndicatorHidden || !label) {
|
|
@@ -32559,11 +32578,11 @@ var RichTextLabel = (_ref) => {
|
|
|
32559
32578
|
const indicatorNode = createIndicatorNode(requiredIndicatorType, t, requiredClassName);
|
|
32560
32579
|
return injectRequiredIndicator(label, requiredIndicatorPlacement, indicatorNode);
|
|
32561
32580
|
}, [required, requiredIndicatorHidden, label, requiredIndicatorType, requiredIndicatorPlacement, t, requiredClassName]);
|
|
32562
|
-
return /* @__PURE__ */
|
|
32581
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
32563
32582
|
className
|
|
32564
32583
|
}, children({
|
|
32565
32584
|
content: labelWithIndicator,
|
|
32566
|
-
locale,
|
|
32585
|
+
locale: language,
|
|
32567
32586
|
htmlAttributesPlugin
|
|
32568
32587
|
}));
|
|
32569
32588
|
};
|
|
@@ -32580,11 +32599,11 @@ var Checkbox = (_ref) => {
|
|
|
32580
32599
|
const checkboxElement = findChildOfType(children, Checkbox.Checkbox);
|
|
32581
32600
|
const descriptionElement = findChildOfType(children, Checkbox.Description);
|
|
32582
32601
|
const errorElement = findChildOfType(children, Checkbox.Error);
|
|
32583
|
-
return /* @__PURE__ */
|
|
32602
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
32584
32603
|
fieldId: id,
|
|
32585
32604
|
renderLabel: () => null,
|
|
32586
32605
|
renderInput: () => checkboxElement,
|
|
32587
|
-
renderDescription: () => /* @__PURE__ */
|
|
32606
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
32588
32607
|
});
|
|
32589
32608
|
};
|
|
32590
32609
|
var CheckboxContainer = (_ref2) => {
|
|
@@ -32616,7 +32635,7 @@ var CheckboxContainer = (_ref2) => {
|
|
|
32616
32635
|
const handleChange = useCallback((isSelected) => {
|
|
32617
32636
|
onChange(isSelected);
|
|
32618
32637
|
}, [onChange]);
|
|
32619
|
-
return /* @__PURE__ */
|
|
32638
|
+
return /* @__PURE__ */ React42__default.createElement(Checkbox$1, {
|
|
32620
32639
|
ref,
|
|
32621
32640
|
id: inputId,
|
|
32622
32641
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -32628,13 +32647,13 @@ var CheckboxContainer = (_ref2) => {
|
|
|
32628
32647
|
onBlur,
|
|
32629
32648
|
onFocus,
|
|
32630
32649
|
className
|
|
32631
|
-
}, () => /* @__PURE__ */
|
|
32650
|
+
}, () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, inputElement, labelElement));
|
|
32632
32651
|
};
|
|
32633
32652
|
var Input = (_ref3) => {
|
|
32634
32653
|
let {
|
|
32635
32654
|
className
|
|
32636
32655
|
} = _ref3;
|
|
32637
|
-
return /* @__PURE__ */
|
|
32656
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
32638
32657
|
"aria-hidden": "true",
|
|
32639
32658
|
className
|
|
32640
32659
|
});
|
|
@@ -32682,12 +32701,12 @@ var Label = (_ref) => {
|
|
|
32682
32701
|
const labelAfterRequiredIndicator = requiredIndicatorType === RequiredIndicator.ASTERISK && requiredIndicatorPlacement === RequiredIndicatorPlacement.BEFORE_FIELD_TITLE;
|
|
32683
32702
|
const label = internalLabel ?? propsLabel;
|
|
32684
32703
|
const labelContent = label || ZERO_WIDTH_SPACE;
|
|
32685
|
-
return /* @__PURE__ */
|
|
32704
|
+
return /* @__PURE__ */ React42__default.createElement(Tag5, {
|
|
32686
32705
|
id: labelId,
|
|
32687
32706
|
htmlFor: as === "label" ? inputId : void 0,
|
|
32688
32707
|
className,
|
|
32689
32708
|
style: hideLabel ? HIDDEN_LABEL_STYLE : void 0
|
|
32690
|
-
}, labelAfterRequiredIndicator ? /* @__PURE__ */
|
|
32709
|
+
}, labelAfterRequiredIndicator ? /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, requiredElement, labelContent) : /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, labelContent, requiredElement));
|
|
32691
32710
|
};
|
|
32692
32711
|
var Required = (_ref2) => {
|
|
32693
32712
|
let {
|
|
@@ -32700,12 +32719,12 @@ var Required = (_ref2) => {
|
|
|
32700
32719
|
requiredIndicatorType
|
|
32701
32720
|
} = useFieldPropsV2();
|
|
32702
32721
|
if (requiredIndicatorType === RequiredIndicator.TEXT) {
|
|
32703
|
-
return /* @__PURE__ */
|
|
32722
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
32704
32723
|
className,
|
|
32705
32724
|
"aria-hidden": "true"
|
|
32706
32725
|
}, t("settings.required-indicator-text"));
|
|
32707
32726
|
}
|
|
32708
|
-
return /* @__PURE__ */
|
|
32727
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
32709
32728
|
className,
|
|
32710
32729
|
"aria-hidden": "true"
|
|
32711
32730
|
}, "*");
|
|
@@ -32772,7 +32791,7 @@ var FieldsetHeadless = (_ref) => {
|
|
|
32772
32791
|
onBlur,
|
|
32773
32792
|
onFocus
|
|
32774
32793
|
});
|
|
32775
|
-
return /* @__PURE__ */
|
|
32794
|
+
return /* @__PURE__ */ React42__default.createElement("fieldset", {
|
|
32776
32795
|
ref: containerRef,
|
|
32777
32796
|
id,
|
|
32778
32797
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -32867,24 +32886,24 @@ var CheckboxGroup = (_ref) => {
|
|
|
32867
32886
|
const handleChange = useCallback((newValue) => {
|
|
32868
32887
|
onChange == null || onChange(newValue);
|
|
32869
32888
|
}, [onChange]);
|
|
32870
|
-
return /* @__PURE__ */
|
|
32889
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
32871
32890
|
fieldId: id,
|
|
32872
32891
|
renderLabel: () => labelElement,
|
|
32873
|
-
renderInput: () => /* @__PURE__ */
|
|
32892
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(FieldsetHeadless, {
|
|
32874
32893
|
id: inputId,
|
|
32875
32894
|
ariaLabelledBy: labelId,
|
|
32876
32895
|
ariaDescribedBy,
|
|
32877
32896
|
required,
|
|
32878
32897
|
onBlur,
|
|
32879
32898
|
onFocus
|
|
32880
|
-
}, /* @__PURE__ */
|
|
32899
|
+
}, /* @__PURE__ */ React42__default.createElement(CheckboxGroup$1, {
|
|
32881
32900
|
value: _value,
|
|
32882
32901
|
onChange: handleChange,
|
|
32883
32902
|
isDisabled: disabled,
|
|
32884
32903
|
isRequired: required,
|
|
32885
32904
|
isInvalid: hasError
|
|
32886
32905
|
}, optionsElement)),
|
|
32887
|
-
renderDescription: () => /* @__PURE__ */
|
|
32906
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
32888
32907
|
});
|
|
32889
32908
|
};
|
|
32890
32909
|
var Options = (_ref2) => {
|
|
@@ -32905,7 +32924,7 @@ var Options = (_ref2) => {
|
|
|
32905
32924
|
} = useTranslation();
|
|
32906
32925
|
const optionElement = findChildOfType(children, Options.Option);
|
|
32907
32926
|
const otherLabel = getOtherLabel(addOtherLabel, t);
|
|
32908
|
-
return /* @__PURE__ */
|
|
32927
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
32909
32928
|
className,
|
|
32910
32929
|
"data-columns": numberOfColumns
|
|
32911
32930
|
}, options == null ? void 0 : options.map((option, index) => {
|
|
@@ -32928,7 +32947,7 @@ var OptionInput = (_ref3) => {
|
|
|
32928
32947
|
let {
|
|
32929
32948
|
className
|
|
32930
32949
|
} = _ref3;
|
|
32931
|
-
return /* @__PURE__ */
|
|
32950
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
32932
32951
|
"aria-hidden": "true",
|
|
32933
32952
|
className
|
|
32934
32953
|
});
|
|
@@ -32941,7 +32960,7 @@ var OptionLabel = (_ref4) => {
|
|
|
32941
32960
|
const {
|
|
32942
32961
|
label
|
|
32943
32962
|
} = internal;
|
|
32944
|
-
return /* @__PURE__ */
|
|
32963
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
32945
32964
|
className
|
|
32946
32965
|
}, label);
|
|
32947
32966
|
};
|
|
@@ -32994,7 +33013,7 @@ var Checkbox2 = (_ref5) => {
|
|
|
32994
33013
|
const newValue = isSelected ? [...removedOther, label] : removedOther;
|
|
32995
33014
|
onChange == null || onChange(newValue);
|
|
32996
33015
|
}, [isOther, label, onChange, options, _value]);
|
|
32997
|
-
return /* @__PURE__ */
|
|
33016
|
+
return /* @__PURE__ */ React42__default.createElement(Checkbox$1, {
|
|
32998
33017
|
ref: checkboxRef,
|
|
32999
33018
|
value: actualValue,
|
|
33000
33019
|
onChange: isOther ? handleOtherCheckboxChange : void 0,
|
|
@@ -33041,7 +33060,7 @@ var Option = (_ref6) => {
|
|
|
33041
33060
|
const optionsValues = getOptionsValues(options || []);
|
|
33042
33061
|
return getIsOtherOptionSelected(_value, optionsValues);
|
|
33043
33062
|
}, [isOther, _value, options]);
|
|
33044
|
-
return /* @__PURE__ */
|
|
33063
|
+
return /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, applyInternalProps(checkboxElement, {
|
|
33045
33064
|
value,
|
|
33046
33065
|
label,
|
|
33047
33066
|
isFirst,
|
|
@@ -33100,13 +33119,13 @@ var OtherInput = (_ref7) => {
|
|
|
33100
33119
|
setOtherValue(input);
|
|
33101
33120
|
debouncedHandleChange(input);
|
|
33102
33121
|
}, [debouncedHandleChange]);
|
|
33103
|
-
return /* @__PURE__ */
|
|
33122
|
+
return /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
33104
33123
|
value: otherValue,
|
|
33105
33124
|
onChange: handleInputChange,
|
|
33106
33125
|
isDisabled: disabled,
|
|
33107
33126
|
isInvalid: hasError,
|
|
33108
33127
|
className
|
|
33109
|
-
}, /* @__PURE__ */
|
|
33128
|
+
}, /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
33110
33129
|
placeholder,
|
|
33111
33130
|
maxLength,
|
|
33112
33131
|
"aria-label": ariaLabel
|
|
@@ -33160,12 +33179,12 @@ var DateInput = (_ref) => {
|
|
|
33160
33179
|
[SupportedDateParts.DAY]: findChildOfType(children, DateInput.Day),
|
|
33161
33180
|
[SupportedDateParts.YEAR]: findChildOfType(children, DateInput.Year)
|
|
33162
33181
|
};
|
|
33163
|
-
return /* @__PURE__ */
|
|
33182
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
33164
33183
|
fieldId: id,
|
|
33165
33184
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
33166
33185
|
as: "div"
|
|
33167
33186
|
}),
|
|
33168
|
-
renderInput: () => /* @__PURE__ */
|
|
33187
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(FieldsetHeadless, {
|
|
33169
33188
|
id: inputId,
|
|
33170
33189
|
ariaLabelledBy: labelId,
|
|
33171
33190
|
ariaDescribedBy,
|
|
@@ -33173,7 +33192,7 @@ var DateInput = (_ref) => {
|
|
|
33173
33192
|
onBlur,
|
|
33174
33193
|
onFocus
|
|
33175
33194
|
}, dateElementsByPart[dateFormat[0]], dateElementsByPart[dateFormat[1]], dateElementsByPart[dateFormat[2]]),
|
|
33176
|
-
renderDescription: () => /* @__PURE__ */
|
|
33195
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
33177
33196
|
});
|
|
33178
33197
|
};
|
|
33179
33198
|
var Month = (_ref2) => {
|
|
@@ -33207,26 +33226,26 @@ var Month = (_ref2) => {
|
|
|
33207
33226
|
}, id);
|
|
33208
33227
|
const labelElement = findChildOfType(children, Month.Label);
|
|
33209
33228
|
const optionsElement = findChildOfType(children, Month.Options);
|
|
33210
|
-
return /* @__PURE__ */
|
|
33229
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
33211
33230
|
className,
|
|
33212
33231
|
"data-date-field": true
|
|
33213
|
-
}, showDateLabels ? labelElement : null, /* @__PURE__ */
|
|
33232
|
+
}, showDateLabels ? labelElement : null, /* @__PURE__ */ React42__default.createElement(Select, {
|
|
33214
33233
|
value: partValue || null,
|
|
33215
33234
|
onChange: handleMonthChange,
|
|
33216
33235
|
isDisabled: disabled,
|
|
33217
33236
|
isInvalid: partError
|
|
33218
|
-
}, /* @__PURE__ */
|
|
33237
|
+
}, /* @__PURE__ */ React42__default.createElement(Button, {
|
|
33219
33238
|
ref: buttonRef,
|
|
33220
33239
|
id: inputId,
|
|
33221
33240
|
"data-hook": SupportedDateParts.MONTH,
|
|
33222
33241
|
"data-invalid": partError
|
|
33223
|
-
}, /* @__PURE__ */
|
|
33242
|
+
}, /* @__PURE__ */ React42__default.createElement(SelectValue, null)), optionsElement));
|
|
33224
33243
|
};
|
|
33225
33244
|
var MonthLabel = (_ref3) => {
|
|
33226
33245
|
let {
|
|
33227
33246
|
className
|
|
33228
33247
|
} = _ref3;
|
|
33229
|
-
return /* @__PURE__ */
|
|
33248
|
+
return /* @__PURE__ */ React42__default.createElement(DateLabel, {
|
|
33230
33249
|
datePart: SupportedDateParts.MONTH,
|
|
33231
33250
|
className
|
|
33232
33251
|
});
|
|
@@ -33237,13 +33256,13 @@ var MonthOptions = (_ref4) => {
|
|
|
33237
33256
|
className
|
|
33238
33257
|
} = _ref4;
|
|
33239
33258
|
const {
|
|
33240
|
-
|
|
33259
|
+
language
|
|
33241
33260
|
} = useConfig();
|
|
33242
|
-
const months = useMemo(() => getMonthList(
|
|
33243
|
-
const optionElement = findChildOfType(children, MonthOptions.Option) ?? /* @__PURE__ */
|
|
33244
|
-
return /* @__PURE__ */
|
|
33261
|
+
const months = useMemo(() => getMonthList(language), [language]);
|
|
33262
|
+
const optionElement = findChildOfType(children, MonthOptions.Option) ?? /* @__PURE__ */ React42__default.createElement(MonthOptions.Option, null);
|
|
33263
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
33245
33264
|
className
|
|
33246
|
-
}, /* @__PURE__ */
|
|
33265
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, null, months.map((month, index) => applyInternalProps(optionElement, {
|
|
33247
33266
|
key: String(index + 1),
|
|
33248
33267
|
value: String(index + 1),
|
|
33249
33268
|
label: month
|
|
@@ -33258,7 +33277,7 @@ var MonthOption = (_ref5) => {
|
|
|
33258
33277
|
value,
|
|
33259
33278
|
label
|
|
33260
33279
|
} = internal;
|
|
33261
|
-
return /* @__PURE__ */
|
|
33280
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
33262
33281
|
className,
|
|
33263
33282
|
id: value,
|
|
33264
33283
|
textValue: label
|
|
@@ -33283,10 +33302,10 @@ var Day = (_ref6) => {
|
|
|
33283
33302
|
} = useDatePart(SupportedDateParts.DAY);
|
|
33284
33303
|
const labelElement = findChildOfType(children, Day.Label);
|
|
33285
33304
|
const inputElement = findChildOfType(children, Day.Input);
|
|
33286
|
-
return /* @__PURE__ */
|
|
33305
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
33287
33306
|
className,
|
|
33288
33307
|
"data-date-field": true
|
|
33289
|
-
}, showDateLabels && labelElement, /* @__PURE__ */
|
|
33308
|
+
}, showDateLabels && labelElement, /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
33290
33309
|
value: partValue,
|
|
33291
33310
|
onChange: onPartChange,
|
|
33292
33311
|
isDisabled: disabled,
|
|
@@ -33297,7 +33316,7 @@ var DayLabel = (_ref7) => {
|
|
|
33297
33316
|
let {
|
|
33298
33317
|
className
|
|
33299
33318
|
} = _ref7;
|
|
33300
|
-
return /* @__PURE__ */
|
|
33319
|
+
return /* @__PURE__ */ React42__default.createElement(DateLabel, {
|
|
33301
33320
|
datePart: SupportedDateParts.DAY,
|
|
33302
33321
|
className
|
|
33303
33322
|
});
|
|
@@ -33327,7 +33346,7 @@ var DayInput = (_ref8) => {
|
|
|
33327
33346
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
33328
33347
|
}
|
|
33329
33348
|
}, id);
|
|
33330
|
-
return /* @__PURE__ */
|
|
33349
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
33331
33350
|
ref: inputRef,
|
|
33332
33351
|
id: inputId,
|
|
33333
33352
|
className,
|
|
@@ -33355,10 +33374,10 @@ var Year = (_ref9) => {
|
|
|
33355
33374
|
} = useDatePart(SupportedDateParts.YEAR);
|
|
33356
33375
|
const labelElement = findChildOfType(children, Year.Label);
|
|
33357
33376
|
const inputElement = findChildOfType(children, Year.Input);
|
|
33358
|
-
return /* @__PURE__ */
|
|
33377
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
33359
33378
|
className,
|
|
33360
33379
|
"data-date-field": true
|
|
33361
|
-
}, showDateLabels && labelElement, /* @__PURE__ */
|
|
33380
|
+
}, showDateLabels && labelElement, /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
33362
33381
|
value: partValue,
|
|
33363
33382
|
onChange: onPartChange,
|
|
33364
33383
|
isDisabled: disabled,
|
|
@@ -33369,7 +33388,7 @@ var YearLabel = (_ref0) => {
|
|
|
33369
33388
|
let {
|
|
33370
33389
|
className
|
|
33371
33390
|
} = _ref0;
|
|
33372
|
-
return /* @__PURE__ */
|
|
33391
|
+
return /* @__PURE__ */ React42__default.createElement(DateLabel, {
|
|
33373
33392
|
datePart: SupportedDateParts.YEAR,
|
|
33374
33393
|
className
|
|
33375
33394
|
});
|
|
@@ -33399,7 +33418,7 @@ var YearInput = (_ref1) => {
|
|
|
33399
33418
|
(_inputRef$current2 = inputRef.current) == null || _inputRef$current2.focus();
|
|
33400
33419
|
}
|
|
33401
33420
|
}, id);
|
|
33402
|
-
return /* @__PURE__ */
|
|
33421
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
33403
33422
|
ref: inputRef,
|
|
33404
33423
|
id: inputId,
|
|
33405
33424
|
className,
|
|
@@ -33471,7 +33490,7 @@ function DateLabel(_ref10) {
|
|
|
33471
33490
|
} = useTranslation();
|
|
33472
33491
|
const translationKey = `field.date.label.${datePart.toLowerCase()}`;
|
|
33473
33492
|
const label = t(translationKey);
|
|
33474
|
-
return /* @__PURE__ */
|
|
33493
|
+
return /* @__PURE__ */ React42__default.createElement("label", {
|
|
33475
33494
|
id: labelId,
|
|
33476
33495
|
htmlFor: inputId,
|
|
33477
33496
|
className
|
|
@@ -34204,10 +34223,10 @@ var DatePicker = (_ref) => {
|
|
|
34204
34223
|
const descriptionElement = findChildOfType(children, DatePicker.Description);
|
|
34205
34224
|
const errorElement = findChildOfType(children, DatePicker.Error);
|
|
34206
34225
|
const dateValue = stringToDateValue(value);
|
|
34207
|
-
return /* @__PURE__ */
|
|
34226
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
34208
34227
|
fieldId: id,
|
|
34209
34228
|
renderLabel: () => labelElement,
|
|
34210
|
-
renderInput: () => /* @__PURE__ */
|
|
34229
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(DatePicker$1, {
|
|
34211
34230
|
value: dateValue,
|
|
34212
34231
|
onChange: handleChange,
|
|
34213
34232
|
isDisabled: disabled,
|
|
@@ -34217,7 +34236,7 @@ var DatePicker = (_ref) => {
|
|
|
34217
34236
|
onBlur,
|
|
34218
34237
|
onFocus
|
|
34219
34238
|
}, controlElement, calendarElement),
|
|
34220
|
-
renderDescription: () => /* @__PURE__ */
|
|
34239
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
34221
34240
|
});
|
|
34222
34241
|
};
|
|
34223
34242
|
var Control = (_ref2) => {
|
|
@@ -34232,7 +34251,7 @@ var Control = (_ref2) => {
|
|
|
34232
34251
|
const {
|
|
34233
34252
|
hasError
|
|
34234
34253
|
} = useFieldPropsV2();
|
|
34235
|
-
return /* @__PURE__ */
|
|
34254
|
+
return /* @__PURE__ */ React42__default.createElement(Group, {
|
|
34236
34255
|
id: inputId,
|
|
34237
34256
|
"aria-describedby": ariaDescribedBy,
|
|
34238
34257
|
className,
|
|
@@ -34252,9 +34271,9 @@ var Input2 = (_ref3) => {
|
|
|
34252
34271
|
var _firstSegmentRef$curr;
|
|
34253
34272
|
(_firstSegmentRef$curr = firstSegmentRef.current) == null || _firstSegmentRef$curr.focus();
|
|
34254
34273
|
}, id);
|
|
34255
|
-
return /* @__PURE__ */
|
|
34274
|
+
return /* @__PURE__ */ React42__default.createElement(DateInput$1, {
|
|
34256
34275
|
className
|
|
34257
|
-
}, (segment) => /* @__PURE__ */
|
|
34276
|
+
}, (segment) => /* @__PURE__ */ React42__default.createElement(DateSegment, {
|
|
34258
34277
|
segment,
|
|
34259
34278
|
ref: (node) => {
|
|
34260
34279
|
if (!node && hasAssignedRef.current) {
|
|
@@ -34274,7 +34293,7 @@ var Trigger = (_ref4) => {
|
|
|
34274
34293
|
let {
|
|
34275
34294
|
className
|
|
34276
34295
|
} = _ref4;
|
|
34277
|
-
return /* @__PURE__ */
|
|
34296
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
34278
34297
|
className
|
|
34279
34298
|
});
|
|
34280
34299
|
};
|
|
@@ -34286,16 +34305,16 @@ var Calendar = (_ref5) => {
|
|
|
34286
34305
|
const {
|
|
34287
34306
|
firstDayOfWeek
|
|
34288
34307
|
} = useFieldPropsV2();
|
|
34289
|
-
const dayElement = findChildOfType(children, Calendar.Day) ?? /* @__PURE__ */
|
|
34290
|
-
return /* @__PURE__ */
|
|
34308
|
+
const dayElement = findChildOfType(children, Calendar.Day) ?? /* @__PURE__ */ React42__default.createElement(Calendar.Day, null);
|
|
34309
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
34291
34310
|
className
|
|
34292
|
-
}, /* @__PURE__ */
|
|
34311
|
+
}, /* @__PURE__ */ React42__default.createElement(Dialog, null, /* @__PURE__ */ React42__default.createElement(Calendar$1, {
|
|
34293
34312
|
firstDayOfWeek: convertFirstDayOfWeek(firstDayOfWeek)
|
|
34294
|
-
}, /* @__PURE__ */
|
|
34313
|
+
}, /* @__PURE__ */ React42__default.createElement("header", null, /* @__PURE__ */ React42__default.createElement(Button, {
|
|
34295
34314
|
slot: "previous"
|
|
34296
|
-
}, "\u2039"), /* @__PURE__ */
|
|
34315
|
+
}, "\u2039"), /* @__PURE__ */ React42__default.createElement(Heading, null), /* @__PURE__ */ React42__default.createElement(Button, {
|
|
34297
34316
|
slot: "next"
|
|
34298
|
-
}, "\u203A")), /* @__PURE__ */
|
|
34317
|
+
}, "\u203A")), /* @__PURE__ */ React42__default.createElement(CalendarGrid, null, (date) => applyInternalProps(dayElement, {
|
|
34299
34318
|
date
|
|
34300
34319
|
})))));
|
|
34301
34320
|
};
|
|
@@ -34307,7 +34326,7 @@ var Day2 = (_ref6) => {
|
|
|
34307
34326
|
const {
|
|
34308
34327
|
date
|
|
34309
34328
|
} = internal;
|
|
34310
|
-
return /* @__PURE__ */
|
|
34329
|
+
return /* @__PURE__ */ React42__default.createElement(CalendarCell, {
|
|
34311
34330
|
className,
|
|
34312
34331
|
date
|
|
34313
34332
|
});
|
|
@@ -34377,12 +34396,12 @@ var DateTimeInput = (_ref) => {
|
|
|
34377
34396
|
[SupportedDateParts.YEAR]: findChildOfType(children, DateTimeInput.Year)
|
|
34378
34397
|
};
|
|
34379
34398
|
const timeElement = findChildOfType(children, DateTimeInput.Time);
|
|
34380
|
-
return /* @__PURE__ */
|
|
34399
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
34381
34400
|
fieldId: id,
|
|
34382
34401
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
34383
34402
|
as: "div"
|
|
34384
34403
|
}),
|
|
34385
|
-
renderInput: () => /* @__PURE__ */
|
|
34404
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(FieldsetHeadless, {
|
|
34386
34405
|
id: inputId,
|
|
34387
34406
|
ariaLabelledBy: labelId,
|
|
34388
34407
|
ariaDescribedBy,
|
|
@@ -34390,7 +34409,7 @@ var DateTimeInput = (_ref) => {
|
|
|
34390
34409
|
onBlur,
|
|
34391
34410
|
onFocus
|
|
34392
34411
|
}, dateElementsByPart[dateFormat[0]], dateElementsByPart[dateFormat[1]], dateElementsByPart[dateFormat[2]], timeElement),
|
|
34393
|
-
renderDescription: () => /* @__PURE__ */
|
|
34412
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
34394
34413
|
});
|
|
34395
34414
|
};
|
|
34396
34415
|
var Month2 = (_ref2) => {
|
|
@@ -34424,26 +34443,26 @@ var Month2 = (_ref2) => {
|
|
|
34424
34443
|
}, id);
|
|
34425
34444
|
const labelElement = findChildOfType(children, Month2.Label);
|
|
34426
34445
|
const optionsElement = findChildOfType(children, Month2.Options);
|
|
34427
|
-
return /* @__PURE__ */
|
|
34446
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
34428
34447
|
className,
|
|
34429
34448
|
"data-date-field": true
|
|
34430
|
-
}, showDateLabels ? labelElement : null, /* @__PURE__ */
|
|
34449
|
+
}, showDateLabels ? labelElement : null, /* @__PURE__ */ React42__default.createElement(Select, {
|
|
34431
34450
|
value: partValue || null,
|
|
34432
34451
|
onChange: handleMonthChange,
|
|
34433
34452
|
isDisabled: disabled,
|
|
34434
34453
|
isInvalid: partError
|
|
34435
|
-
}, /* @__PURE__ */
|
|
34454
|
+
}, /* @__PURE__ */ React42__default.createElement(Button, {
|
|
34436
34455
|
ref: buttonRef,
|
|
34437
34456
|
id: inputId,
|
|
34438
34457
|
"data-hook": SupportedDateParts.MONTH,
|
|
34439
34458
|
"data-invalid": partError
|
|
34440
|
-
}, /* @__PURE__ */
|
|
34459
|
+
}, /* @__PURE__ */ React42__default.createElement(SelectValue, null)), optionsElement));
|
|
34441
34460
|
};
|
|
34442
34461
|
var MonthLabel2 = (_ref3) => {
|
|
34443
34462
|
let {
|
|
34444
34463
|
className
|
|
34445
34464
|
} = _ref3;
|
|
34446
|
-
return /* @__PURE__ */
|
|
34465
|
+
return /* @__PURE__ */ React42__default.createElement(DateTimeLabel, {
|
|
34447
34466
|
datePart: SupportedDateParts.MONTH,
|
|
34448
34467
|
className
|
|
34449
34468
|
});
|
|
@@ -34454,13 +34473,13 @@ var MonthOptions2 = (_ref4) => {
|
|
|
34454
34473
|
className
|
|
34455
34474
|
} = _ref4;
|
|
34456
34475
|
const {
|
|
34457
|
-
|
|
34476
|
+
language
|
|
34458
34477
|
} = useConfig();
|
|
34459
|
-
const months = useMemo(() => getMonthList(
|
|
34460
|
-
const optionElement = findChildOfType(children, MonthOptions2.Option) ?? /* @__PURE__ */
|
|
34461
|
-
return /* @__PURE__ */
|
|
34478
|
+
const months = useMemo(() => getMonthList(language), [language]);
|
|
34479
|
+
const optionElement = findChildOfType(children, MonthOptions2.Option) ?? /* @__PURE__ */ React42__default.createElement(MonthOptions2.Option, null);
|
|
34480
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
34462
34481
|
className
|
|
34463
|
-
}, /* @__PURE__ */
|
|
34482
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, null, months.map((month, index) => applyInternalProps(optionElement, {
|
|
34464
34483
|
key: String(index + 1),
|
|
34465
34484
|
value: String(index + 1),
|
|
34466
34485
|
label: month
|
|
@@ -34475,7 +34494,7 @@ var MonthOption2 = (_ref5) => {
|
|
|
34475
34494
|
value,
|
|
34476
34495
|
label
|
|
34477
34496
|
} = internal;
|
|
34478
|
-
return /* @__PURE__ */
|
|
34497
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
34479
34498
|
className,
|
|
34480
34499
|
id: value,
|
|
34481
34500
|
textValue: label
|
|
@@ -34500,10 +34519,10 @@ var Day3 = (_ref6) => {
|
|
|
34500
34519
|
} = useFieldPart(SupportedDateParts.DAY);
|
|
34501
34520
|
const labelElement = findChildOfType(children, Day3.Label);
|
|
34502
34521
|
const inputElement = findChildOfType(children, Day3.Input);
|
|
34503
|
-
return /* @__PURE__ */
|
|
34522
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
34504
34523
|
className,
|
|
34505
34524
|
"data-date-field": true
|
|
34506
|
-
}, showDateLabels && labelElement, /* @__PURE__ */
|
|
34525
|
+
}, showDateLabels && labelElement, /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
34507
34526
|
value: partValue,
|
|
34508
34527
|
onChange: onPartChange,
|
|
34509
34528
|
isDisabled: disabled,
|
|
@@ -34514,7 +34533,7 @@ var DayLabel2 = (_ref7) => {
|
|
|
34514
34533
|
let {
|
|
34515
34534
|
className
|
|
34516
34535
|
} = _ref7;
|
|
34517
|
-
return /* @__PURE__ */
|
|
34536
|
+
return /* @__PURE__ */ React42__default.createElement(DateTimeLabel, {
|
|
34518
34537
|
datePart: SupportedDateParts.DAY,
|
|
34519
34538
|
className
|
|
34520
34539
|
});
|
|
@@ -34544,7 +34563,7 @@ var DayInput2 = (_ref8) => {
|
|
|
34544
34563
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
34545
34564
|
}
|
|
34546
34565
|
}, id);
|
|
34547
|
-
return /* @__PURE__ */
|
|
34566
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
34548
34567
|
ref: inputRef,
|
|
34549
34568
|
id: inputId,
|
|
34550
34569
|
className,
|
|
@@ -34572,10 +34591,10 @@ var Year2 = (_ref9) => {
|
|
|
34572
34591
|
} = useFieldPart(SupportedDateParts.YEAR);
|
|
34573
34592
|
const labelElement = findChildOfType(children, Year2.Label);
|
|
34574
34593
|
const inputElement = findChildOfType(children, Year2.Input);
|
|
34575
|
-
return /* @__PURE__ */
|
|
34594
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
34576
34595
|
className,
|
|
34577
34596
|
"data-date-field": true
|
|
34578
|
-
}, showDateLabels && labelElement, /* @__PURE__ */
|
|
34597
|
+
}, showDateLabels && labelElement, /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
34579
34598
|
value: partValue,
|
|
34580
34599
|
onChange: onPartChange,
|
|
34581
34600
|
isDisabled: disabled,
|
|
@@ -34586,7 +34605,7 @@ var YearLabel2 = (_ref0) => {
|
|
|
34586
34605
|
let {
|
|
34587
34606
|
className
|
|
34588
34607
|
} = _ref0;
|
|
34589
|
-
return /* @__PURE__ */
|
|
34608
|
+
return /* @__PURE__ */ React42__default.createElement(DateTimeLabel, {
|
|
34590
34609
|
datePart: SupportedDateParts.YEAR,
|
|
34591
34610
|
className
|
|
34592
34611
|
});
|
|
@@ -34616,7 +34635,7 @@ var YearInput2 = (_ref1) => {
|
|
|
34616
34635
|
(_inputRef$current2 = inputRef.current) == null || _inputRef$current2.focus();
|
|
34617
34636
|
}
|
|
34618
34637
|
}, id);
|
|
34619
|
-
return /* @__PURE__ */
|
|
34638
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
34620
34639
|
ref: inputRef,
|
|
34621
34640
|
id: inputId,
|
|
34622
34641
|
className,
|
|
@@ -34645,10 +34664,10 @@ var Time = (_ref10) => {
|
|
|
34645
34664
|
} = useFieldPart("time");
|
|
34646
34665
|
const labelElement = findChildOfType(children, Time.Label);
|
|
34647
34666
|
const inputElement = findChildOfType(children, Time.Input);
|
|
34648
|
-
return /* @__PURE__ */
|
|
34667
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
34649
34668
|
className,
|
|
34650
34669
|
"data-date-field": true
|
|
34651
|
-
}, showDateLabels && labelElement, /* @__PURE__ */
|
|
34670
|
+
}, showDateLabels && labelElement, /* @__PURE__ */ React42__default.createElement(TimeField, {
|
|
34652
34671
|
value: partValue,
|
|
34653
34672
|
onChange: onPartChange,
|
|
34654
34673
|
isDisabled: disabled,
|
|
@@ -34668,7 +34687,7 @@ var TimeLabel = (_ref11) => {
|
|
|
34668
34687
|
t
|
|
34669
34688
|
} = useTranslation();
|
|
34670
34689
|
const label = t("field.date.label.time");
|
|
34671
|
-
return /* @__PURE__ */
|
|
34690
|
+
return /* @__PURE__ */ React42__default.createElement("label", {
|
|
34672
34691
|
id: labelId,
|
|
34673
34692
|
htmlFor: inputId,
|
|
34674
34693
|
className
|
|
@@ -34682,28 +34701,28 @@ var TimeInput = (_ref12) => {
|
|
|
34682
34701
|
const hourElement = findChildOfType(children, Time.Hour);
|
|
34683
34702
|
const minuteElement = findChildOfType(children, Time.Minute);
|
|
34684
34703
|
const periodElement = findChildOfType(children, Time.Period);
|
|
34685
|
-
return /* @__PURE__ */
|
|
34704
|
+
return /* @__PURE__ */ React42__default.createElement(DateInput$1, {
|
|
34686
34705
|
className
|
|
34687
34706
|
}, (segment) => {
|
|
34688
34707
|
switch (segment.type) {
|
|
34689
34708
|
case "hour":
|
|
34690
34709
|
return applyInternalProps(hourElement, {
|
|
34691
34710
|
segment
|
|
34692
|
-
}) || /* @__PURE__ */
|
|
34711
|
+
}) || /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
34693
34712
|
case "minute":
|
|
34694
34713
|
return applyInternalProps(minuteElement, {
|
|
34695
34714
|
segment
|
|
34696
|
-
}) || /* @__PURE__ */
|
|
34715
|
+
}) || /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
34697
34716
|
case "dayPeriod":
|
|
34698
34717
|
return applyInternalProps(periodElement, {
|
|
34699
34718
|
segment
|
|
34700
|
-
}) || /* @__PURE__ */
|
|
34719
|
+
}) || /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
34701
34720
|
case "literal":
|
|
34702
|
-
return /* @__PURE__ */
|
|
34721
|
+
return /* @__PURE__ */ React42__default.createElement(DateSegment, {
|
|
34703
34722
|
segment
|
|
34704
34723
|
});
|
|
34705
34724
|
default:
|
|
34706
|
-
return /* @__PURE__ */
|
|
34725
|
+
return /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
34707
34726
|
}
|
|
34708
34727
|
});
|
|
34709
34728
|
};
|
|
@@ -34722,7 +34741,7 @@ var Hour = (_ref13) => {
|
|
|
34722
34741
|
t
|
|
34723
34742
|
} = useTranslation();
|
|
34724
34743
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.hour");
|
|
34725
|
-
return /* @__PURE__ */
|
|
34744
|
+
return /* @__PURE__ */ React42__default.createElement(DateSegment, _extends({
|
|
34726
34745
|
segment,
|
|
34727
34746
|
className
|
|
34728
34747
|
}, placeholder && {
|
|
@@ -34744,7 +34763,7 @@ var Minute = (_ref14) => {
|
|
|
34744
34763
|
t
|
|
34745
34764
|
} = useTranslation();
|
|
34746
34765
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.minute");
|
|
34747
|
-
return /* @__PURE__ */
|
|
34766
|
+
return /* @__PURE__ */ React42__default.createElement(DateSegment, _extends({
|
|
34748
34767
|
segment,
|
|
34749
34768
|
className
|
|
34750
34769
|
}, placeholder && {
|
|
@@ -34766,7 +34785,7 @@ var Period = (_ref15) => {
|
|
|
34766
34785
|
t
|
|
34767
34786
|
} = useTranslation();
|
|
34768
34787
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.period");
|
|
34769
|
-
return /* @__PURE__ */
|
|
34788
|
+
return /* @__PURE__ */ React42__default.createElement(DateSegment, _extends({
|
|
34770
34789
|
segment,
|
|
34771
34790
|
className
|
|
34772
34791
|
}, placeholder && {
|
|
@@ -34859,7 +34878,7 @@ function DateTimeLabel(_ref16) {
|
|
|
34859
34878
|
} = useTranslation();
|
|
34860
34879
|
const translationKey = `field.date.label.${datePart.toLowerCase()}`;
|
|
34861
34880
|
const label = t(translationKey);
|
|
34862
|
-
return /* @__PURE__ */
|
|
34881
|
+
return /* @__PURE__ */ React42__default.createElement("label", {
|
|
34863
34882
|
id: labelId,
|
|
34864
34883
|
htmlFor: inputId,
|
|
34865
34884
|
className
|
|
@@ -34908,10 +34927,10 @@ var Dropdown = (_ref) => {
|
|
|
34908
34927
|
const optionsElement = findChildOfType(children, Dropdown.Options);
|
|
34909
34928
|
const descriptionElement = findChildOfType(children, Dropdown.Description);
|
|
34910
34929
|
const errorElement = findChildOfType(children, Dropdown.Error);
|
|
34911
|
-
return /* @__PURE__ */
|
|
34930
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
34912
34931
|
fieldId: id,
|
|
34913
34932
|
renderLabel: () => labelElement,
|
|
34914
|
-
renderInput: () => /* @__PURE__ */
|
|
34933
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(Select, {
|
|
34915
34934
|
value: value ?? null,
|
|
34916
34935
|
onChange: handleChange,
|
|
34917
34936
|
isDisabled: disabled,
|
|
@@ -34921,7 +34940,7 @@ var Dropdown = (_ref) => {
|
|
|
34921
34940
|
onBlur,
|
|
34922
34941
|
onFocus
|
|
34923
34942
|
}, triggerElement, optionsElement),
|
|
34924
|
-
renderDescription: () => /* @__PURE__ */
|
|
34943
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
34925
34944
|
});
|
|
34926
34945
|
};
|
|
34927
34946
|
var Trigger2 = (_ref2) => {
|
|
@@ -34941,13 +34960,13 @@ var Trigger2 = (_ref2) => {
|
|
|
34941
34960
|
var _ref$current;
|
|
34942
34961
|
(_ref$current = ref.current) == null || _ref$current.focus();
|
|
34943
34962
|
}, id);
|
|
34944
|
-
return /* @__PURE__ */
|
|
34963
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
34945
34964
|
ref,
|
|
34946
34965
|
id: inputId,
|
|
34947
34966
|
"aria-describedby": ariaDescribedBy,
|
|
34948
34967
|
className,
|
|
34949
34968
|
"data-invalid": hasError
|
|
34950
|
-
}, /* @__PURE__ */
|
|
34969
|
+
}, /* @__PURE__ */ React42__default.createElement(SelectValue, null));
|
|
34951
34970
|
};
|
|
34952
34971
|
var Options2 = (_ref3) => {
|
|
34953
34972
|
let {
|
|
@@ -34958,9 +34977,9 @@ var Options2 = (_ref3) => {
|
|
|
34958
34977
|
options
|
|
34959
34978
|
} = useFieldPropsV2();
|
|
34960
34979
|
const optionElement = findChildOfType(children, Options2.Option);
|
|
34961
|
-
return /* @__PURE__ */
|
|
34980
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
34962
34981
|
className
|
|
34963
|
-
}, /* @__PURE__ */
|
|
34982
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, null, options.map((option) => applyInternalProps(optionElement, {
|
|
34964
34983
|
key: option.value,
|
|
34965
34984
|
value: option.value,
|
|
34966
34985
|
label: option.label
|
|
@@ -34975,7 +34994,7 @@ var Option2 = (_ref4) => {
|
|
|
34975
34994
|
value,
|
|
34976
34995
|
label
|
|
34977
34996
|
} = internal;
|
|
34978
|
-
return /* @__PURE__ */
|
|
34997
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
34979
34998
|
className,
|
|
34980
34999
|
id: value,
|
|
34981
35000
|
textValue: label
|
|
@@ -35017,7 +35036,7 @@ var DropZone = (_ref) => {
|
|
|
35017
35036
|
const titleElement = findChildOfType(children, DropZone.Title);
|
|
35018
35037
|
const subtitleElement = findChildOfType(children, DropZone.Subtitle);
|
|
35019
35038
|
const buttonElement = findChildOfType(children, DropZone.Button);
|
|
35020
|
-
return /* @__PURE__ */
|
|
35039
|
+
return /* @__PURE__ */ React42__default.createElement(DropZone$1, {
|
|
35021
35040
|
"aria-describedby": ariaDescribedBy,
|
|
35022
35041
|
className,
|
|
35023
35042
|
"data-invalid": hasError,
|
|
@@ -35038,7 +35057,7 @@ var DropZone = (_ref) => {
|
|
|
35038
35057
|
handleFileChange(dataTransfer.files);
|
|
35039
35058
|
}
|
|
35040
35059
|
}
|
|
35041
|
-
}, /* @__PURE__ */
|
|
35060
|
+
}, /* @__PURE__ */ React42__default.createElement(Text, {
|
|
35042
35061
|
slot: "label"
|
|
35043
35062
|
}, titleElement, subtitleElement), !limitReached && buttonElement);
|
|
35044
35063
|
};
|
|
@@ -35053,7 +35072,7 @@ var DropZoneTitle = (_ref2) => {
|
|
|
35053
35072
|
limitReached
|
|
35054
35073
|
} = useFileUploadContext();
|
|
35055
35074
|
const title = useMemo(() => limitReached ? t("file-upload.dropzone.limit-reached.title") : t("file-upload.dropzone.title"), [t, limitReached]);
|
|
35056
|
-
return /* @__PURE__ */
|
|
35075
|
+
return /* @__PURE__ */ React42__default.createElement("p", {
|
|
35057
35076
|
className
|
|
35058
35077
|
}, title);
|
|
35059
35078
|
};
|
|
@@ -35068,7 +35087,7 @@ var DropZoneSubtitle = (_ref3) => {
|
|
|
35068
35087
|
limitReached
|
|
35069
35088
|
} = useFileUploadContext();
|
|
35070
35089
|
const subtitle = useMemo(() => limitReached ? t("file-upload.dropzone.limit-reached.subtitle") : t("file-upload.dropzone.subtitle"), [t, limitReached]);
|
|
35071
|
-
return /* @__PURE__ */
|
|
35090
|
+
return /* @__PURE__ */ React42__default.createElement("p", {
|
|
35072
35091
|
className
|
|
35073
35092
|
}, subtitle);
|
|
35074
35093
|
};
|
|
@@ -35104,7 +35123,7 @@ var DropZoneButton = (_ref4) => {
|
|
|
35104
35123
|
} = useFileUploadContext();
|
|
35105
35124
|
const hasFileErrors = (files == null ? void 0 : files.some((file) => file.errorMessage)) ?? false;
|
|
35106
35125
|
const hasAnyError = Boolean(hasError || errorMessage || _error || hasFileErrors);
|
|
35107
|
-
return /* @__PURE__ */
|
|
35126
|
+
return /* @__PURE__ */ React42__default.createElement(FileTrigger, {
|
|
35108
35127
|
acceptedFileTypes: accept ? accept.split(",") : void 0,
|
|
35109
35128
|
allowsMultiple: multiple,
|
|
35110
35129
|
onSelect: (fileList) => {
|
|
@@ -35115,7 +35134,7 @@ var DropZoneButton = (_ref4) => {
|
|
|
35115
35134
|
handleFileChange(dataTransfer.files);
|
|
35116
35135
|
}
|
|
35117
35136
|
}
|
|
35118
|
-
}, /* @__PURE__ */
|
|
35137
|
+
}, /* @__PURE__ */ React42__default.createElement(Button, {
|
|
35119
35138
|
ref: buttonRef,
|
|
35120
35139
|
id: inputId,
|
|
35121
35140
|
"aria-labelledby": labelId,
|
|
@@ -35127,7 +35146,7 @@ var DropZoneButton = (_ref4) => {
|
|
|
35127
35146
|
className,
|
|
35128
35147
|
onFocus,
|
|
35129
35148
|
onBlur: handleBlur
|
|
35130
|
-
}, /* @__PURE__ */
|
|
35149
|
+
}, /* @__PURE__ */ React42__default.createElement(AddSmall_default, {
|
|
35131
35150
|
"aria-hidden": "true"
|
|
35132
35151
|
}), buttonText));
|
|
35133
35152
|
};
|
|
@@ -35143,23 +35162,23 @@ init_extends();
|
|
|
35143
35162
|
function ProgressCircle(props) {
|
|
35144
35163
|
const strokeWidth = 4;
|
|
35145
35164
|
const radius = `calc(50% - ${strokeWidth / 2}px)`;
|
|
35146
|
-
return /* @__PURE__ */
|
|
35165
|
+
return /* @__PURE__ */ React42__default.createElement(ProgressBar, _extends({}, props, {
|
|
35147
35166
|
isIndeterminate: true
|
|
35148
35167
|
}), (_ref) => {
|
|
35149
35168
|
let {
|
|
35150
35169
|
percentage,
|
|
35151
35170
|
isIndeterminate
|
|
35152
35171
|
} = _ref;
|
|
35153
|
-
return /* @__PURE__ */
|
|
35172
|
+
return /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, /* @__PURE__ */ React42__default.createElement("svg", {
|
|
35154
35173
|
fill: "none",
|
|
35155
35174
|
width: "100%",
|
|
35156
35175
|
height: "100%",
|
|
35157
35176
|
viewBox: "0 0 32 32"
|
|
35158
|
-
}, /* @__PURE__ */
|
|
35177
|
+
}, /* @__PURE__ */ React42__default.createElement("circle", {
|
|
35159
35178
|
cx: "50%",
|
|
35160
35179
|
cy: "50%",
|
|
35161
35180
|
r: radius
|
|
35162
|
-
}), /* @__PURE__ */
|
|
35181
|
+
}), /* @__PURE__ */ React42__default.createElement("circle", {
|
|
35163
35182
|
cx: "50%",
|
|
35164
35183
|
cy: "50%",
|
|
35165
35184
|
r: radius,
|
|
@@ -35171,7 +35190,7 @@ function ProgressCircle(props) {
|
|
|
35171
35190
|
rotate: "-90deg",
|
|
35172
35191
|
transformOrigin: "center center"
|
|
35173
35192
|
}
|
|
35174
|
-
}, isIndeterminate && /* @__PURE__ */
|
|
35193
|
+
}, isIndeterminate && /* @__PURE__ */ React42__default.createElement("animateTransform", {
|
|
35175
35194
|
attributeName: "transform",
|
|
35176
35195
|
type: "rotate",
|
|
35177
35196
|
dur: "0.75s",
|
|
@@ -35198,7 +35217,7 @@ var File2 = (_ref) => {
|
|
|
35198
35217
|
const removeElement = findChildOfType(children, File2.Remove);
|
|
35199
35218
|
const spinnerElement = findChildOfType(children, File2.Spinner);
|
|
35200
35219
|
const errorElement = findChildOfType(children, File2.Error);
|
|
35201
|
-
return /* @__PURE__ */
|
|
35220
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
35202
35221
|
className
|
|
35203
35222
|
}, applyInternalProps(nameElement, {
|
|
35204
35223
|
fileName
|
|
@@ -35218,7 +35237,7 @@ var FileName = (_ref2) => {
|
|
|
35218
35237
|
const {
|
|
35219
35238
|
fileName
|
|
35220
35239
|
} = internal;
|
|
35221
|
-
return /* @__PURE__ */
|
|
35240
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
35222
35241
|
className
|
|
35223
35242
|
}, fileName);
|
|
35224
35243
|
};
|
|
@@ -35262,7 +35281,7 @@ var FileRemove = (_ref3) => {
|
|
|
35262
35281
|
const handleClick = () => {
|
|
35263
35282
|
handleDelete(index);
|
|
35264
35283
|
};
|
|
35265
|
-
return /* @__PURE__ */
|
|
35284
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
35266
35285
|
ref: buttonRef,
|
|
35267
35286
|
"aria-disabled": disabled,
|
|
35268
35287
|
"aria-label": t("file-upload.delete-file.aria-label"),
|
|
@@ -35270,7 +35289,7 @@ var FileRemove = (_ref3) => {
|
|
|
35270
35289
|
onClick: handleClick,
|
|
35271
35290
|
className,
|
|
35272
35291
|
isDisabled: disabled
|
|
35273
|
-
}, /* @__PURE__ */
|
|
35292
|
+
}, /* @__PURE__ */ React42__default.createElement(DeleteSmall_default, null));
|
|
35274
35293
|
};
|
|
35275
35294
|
var FileError = (_ref4) => {
|
|
35276
35295
|
let {
|
|
@@ -35283,10 +35302,10 @@ var FileError = (_ref4) => {
|
|
|
35283
35302
|
if (!errorMessage) {
|
|
35284
35303
|
return null;
|
|
35285
35304
|
}
|
|
35286
|
-
return /* @__PURE__ */
|
|
35305
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
35287
35306
|
className,
|
|
35288
35307
|
role: "alert"
|
|
35289
|
-
}, /* @__PURE__ */
|
|
35308
|
+
}, /* @__PURE__ */ React42__default.createElement(StatusAlert_default, {
|
|
35290
35309
|
"aria-hidden": "true"
|
|
35291
35310
|
}), errorMessage);
|
|
35292
35311
|
};
|
|
@@ -35297,7 +35316,7 @@ var FileSpinner = (_ref5) => {
|
|
|
35297
35316
|
const {
|
|
35298
35317
|
t
|
|
35299
35318
|
} = useTranslation();
|
|
35300
|
-
return /* @__PURE__ */
|
|
35319
|
+
return /* @__PURE__ */ React42__default.createElement(ProgressCircle, {
|
|
35301
35320
|
"aria-label": t("file-upload.file.uploading-spinner.aria-label"),
|
|
35302
35321
|
className
|
|
35303
35322
|
});
|
|
@@ -35320,7 +35339,7 @@ var Files = (_ref) => {
|
|
|
35320
35339
|
if (!files || files.length === 0) {
|
|
35321
35340
|
return null;
|
|
35322
35341
|
}
|
|
35323
|
-
return /* @__PURE__ */
|
|
35342
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
35324
35343
|
className
|
|
35325
35344
|
}, files.map((fileUploadFile, index) => applyInternalProps(fileElement, {
|
|
35326
35345
|
key: fileUploadFile.file.name || index,
|
|
@@ -35615,13 +35634,13 @@ var FileUpload = (_ref) => {
|
|
|
35615
35634
|
var _buttonRef$current2;
|
|
35616
35635
|
(_buttonRef$current2 = buttonRef.current) == null || _buttonRef$current2.focus();
|
|
35617
35636
|
}, id);
|
|
35618
|
-
return /* @__PURE__ */
|
|
35637
|
+
return /* @__PURE__ */ React42__default.createElement(FileUploadContext.Provider, {
|
|
35619
35638
|
value: contextValue
|
|
35620
|
-
}, /* @__PURE__ */
|
|
35639
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
35621
35640
|
fieldId: id,
|
|
35622
35641
|
renderLabel: () => labelElement,
|
|
35623
35642
|
renderInput: () => dropZoneElement,
|
|
35624
|
-
renderDescription: () => /* @__PURE__ */
|
|
35643
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, errorElement, descriptionElement, explanationElement, filesElement)
|
|
35625
35644
|
}));
|
|
35626
35645
|
};
|
|
35627
35646
|
var Explanation = (_ref2) => {
|
|
@@ -35635,7 +35654,7 @@ var Explanation = (_ref2) => {
|
|
|
35635
35654
|
if (!displayText) {
|
|
35636
35655
|
return null;
|
|
35637
35656
|
}
|
|
35638
|
-
return /* @__PURE__ */
|
|
35657
|
+
return /* @__PURE__ */ React42__default.createElement("p", {
|
|
35639
35658
|
className
|
|
35640
35659
|
}, displayText);
|
|
35641
35660
|
};
|
|
@@ -35709,7 +35728,7 @@ var AddressAutofillProvider = (_ref) => {
|
|
|
35709
35728
|
onAddressSelect,
|
|
35710
35729
|
autocompleteEnabled
|
|
35711
35730
|
}), [onAddressSelect, autocompleteEnabled]);
|
|
35712
|
-
return /* @__PURE__ */
|
|
35731
|
+
return /* @__PURE__ */ React42__default.createElement(AddressAutofillContext.Provider, {
|
|
35713
35732
|
value
|
|
35714
35733
|
}, children);
|
|
35715
35734
|
};
|
|
@@ -35725,7 +35744,7 @@ var CountryCodeProvider = (_ref) => {
|
|
|
35725
35744
|
const value = useMemo(() => ({
|
|
35726
35745
|
countryCode
|
|
35727
35746
|
}), [countryCode]);
|
|
35728
|
-
return /* @__PURE__ */
|
|
35747
|
+
return /* @__PURE__ */ React42__default.createElement(CountryCodeContext.Provider, {
|
|
35729
35748
|
value
|
|
35730
35749
|
}, children);
|
|
35731
35750
|
};
|
|
@@ -35827,7 +35846,7 @@ var AddressFieldsProvider = (_ref) => {
|
|
|
35827
35846
|
const value = useMemo(() => ({
|
|
35828
35847
|
fields
|
|
35829
35848
|
}), [fields]);
|
|
35830
|
-
return /* @__PURE__ */
|
|
35849
|
+
return /* @__PURE__ */ React42__default.createElement(AddressFieldsContext.Provider, {
|
|
35831
35850
|
value
|
|
35832
35851
|
}, children);
|
|
35833
35852
|
};
|
|
@@ -35877,7 +35896,7 @@ var Country = (_ref) => {
|
|
|
35877
35896
|
t
|
|
35878
35897
|
} = useTranslation();
|
|
35879
35898
|
const {
|
|
35880
|
-
|
|
35899
|
+
language
|
|
35881
35900
|
} = useConfig();
|
|
35882
35901
|
const countryOptions = useMemo(() => (options || []).reduce((result2, option) => {
|
|
35883
35902
|
if (option.value && COUNTRY_CODES.hasOwnProperty(option.value)) {
|
|
@@ -35887,7 +35906,7 @@ var Country = (_ref) => {
|
|
|
35887
35906
|
});
|
|
35888
35907
|
}
|
|
35889
35908
|
return result2;
|
|
35890
|
-
}, []).sort((a, b) => a.label.localeCompare(b.label,
|
|
35909
|
+
}, []).sort((a, b) => a.label.localeCompare(b.label, language)), [options, t, language]);
|
|
35891
35910
|
const [inputValue, setInputValue] = useState("");
|
|
35892
35911
|
const selectedLabel = useMemo(() => {
|
|
35893
35912
|
if (!value) {
|
|
@@ -35915,12 +35934,12 @@ var Country = (_ref) => {
|
|
|
35915
35934
|
const optionsElement = findChildOfType(children, Country.Options);
|
|
35916
35935
|
const descriptionElement = findChildOfType(children, Country.Description);
|
|
35917
35936
|
const errorElement = findChildOfType(children, Country.Error);
|
|
35918
|
-
return /* @__PURE__ */
|
|
35937
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
35919
35938
|
fieldId: id,
|
|
35920
35939
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
35921
35940
|
label: countryLabel
|
|
35922
35941
|
}),
|
|
35923
|
-
renderInput: () => /* @__PURE__ */
|
|
35942
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(ComboBox, {
|
|
35924
35943
|
selectedKey: value ?? null,
|
|
35925
35944
|
inputValue: inputValue || selectedLabel,
|
|
35926
35945
|
onSelectionChange: handleSelectionChange,
|
|
@@ -35934,7 +35953,7 @@ var Country = (_ref) => {
|
|
|
35934
35953
|
}, controlElement, applyInternalProps(optionsElement, {
|
|
35935
35954
|
options: countryOptions
|
|
35936
35955
|
})),
|
|
35937
|
-
renderDescription: () => /* @__PURE__ */
|
|
35956
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
35938
35957
|
});
|
|
35939
35958
|
};
|
|
35940
35959
|
var Control2 = (_ref2) => {
|
|
@@ -35948,7 +35967,7 @@ var Control2 = (_ref2) => {
|
|
|
35948
35967
|
} = useFieldPropsV2();
|
|
35949
35968
|
const inputElement = findChildOfType(children, Control2.Input);
|
|
35950
35969
|
const triggerElement = findChildOfType(children, Control2.Trigger);
|
|
35951
|
-
return /* @__PURE__ */
|
|
35970
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
35952
35971
|
className,
|
|
35953
35972
|
"data-disabled": disabled || void 0,
|
|
35954
35973
|
"data-invalid": hasError || void 0
|
|
@@ -35970,7 +35989,7 @@ var Input3 = (_ref3) => {
|
|
|
35970
35989
|
var _inputRef$current;
|
|
35971
35990
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
35972
35991
|
}, id);
|
|
35973
|
-
return /* @__PURE__ */
|
|
35992
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
35974
35993
|
ref: inputRef,
|
|
35975
35994
|
id: inputId,
|
|
35976
35995
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -35981,7 +36000,7 @@ var Trigger3 = (_ref4) => {
|
|
|
35981
36000
|
let {
|
|
35982
36001
|
className
|
|
35983
36002
|
} = _ref4;
|
|
35984
|
-
return /* @__PURE__ */
|
|
36003
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
35985
36004
|
className
|
|
35986
36005
|
});
|
|
35987
36006
|
};
|
|
@@ -35997,9 +36016,9 @@ var Options3 = (_ref5) => {
|
|
|
35997
36016
|
options
|
|
35998
36017
|
} = internal;
|
|
35999
36018
|
const optionElement = findChildOfType(children, Options3.Option);
|
|
36000
|
-
return /* @__PURE__ */
|
|
36019
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
36001
36020
|
className
|
|
36002
|
-
}, /* @__PURE__ */
|
|
36021
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, null, options.map((option) => applyInternalProps(optionElement, {
|
|
36003
36022
|
key: option.value,
|
|
36004
36023
|
value: option.value,
|
|
36005
36024
|
label: option.label
|
|
@@ -36014,7 +36033,7 @@ var Option3 = (_ref6) => {
|
|
|
36014
36033
|
value,
|
|
36015
36034
|
label
|
|
36016
36035
|
} = internal;
|
|
36017
|
-
return /* @__PURE__ */
|
|
36036
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
36018
36037
|
className,
|
|
36019
36038
|
id: value,
|
|
36020
36039
|
textValue: label
|
|
@@ -36067,12 +36086,12 @@ var Subdivision = (_ref) => {
|
|
|
36067
36086
|
const optionsElement = findChildOfType(children, Subdivision.Options);
|
|
36068
36087
|
const descriptionElement = findChildOfType(children, Subdivision.Description);
|
|
36069
36088
|
const errorElement = findChildOfType(children, Subdivision.Error);
|
|
36070
|
-
return /* @__PURE__ */
|
|
36089
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
36071
36090
|
fieldId: id,
|
|
36072
36091
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
36073
36092
|
label: subdivisionLabel
|
|
36074
36093
|
}),
|
|
36075
|
-
renderInput: () => /* @__PURE__ */
|
|
36094
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(Select, {
|
|
36076
36095
|
value: value ?? null,
|
|
36077
36096
|
onChange: handleChange,
|
|
36078
36097
|
isDisabled: disabled,
|
|
@@ -36082,7 +36101,7 @@ var Subdivision = (_ref) => {
|
|
|
36082
36101
|
}, triggerElement, applyInternalProps(optionsElement, {
|
|
36083
36102
|
options: subdivisionOptions
|
|
36084
36103
|
})),
|
|
36085
|
-
renderDescription: () => /* @__PURE__ */
|
|
36104
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
36086
36105
|
});
|
|
36087
36106
|
};
|
|
36088
36107
|
var Trigger4 = (_ref2) => {
|
|
@@ -36101,12 +36120,12 @@ var Trigger4 = (_ref2) => {
|
|
|
36101
36120
|
var _ref$current;
|
|
36102
36121
|
(_ref$current = ref.current) == null || _ref$current.focus();
|
|
36103
36122
|
}, id);
|
|
36104
|
-
return /* @__PURE__ */
|
|
36123
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
36105
36124
|
ref,
|
|
36106
36125
|
id: inputId,
|
|
36107
36126
|
"aria-describedby": ariaDescribedBy,
|
|
36108
36127
|
className
|
|
36109
|
-
}, /* @__PURE__ */
|
|
36128
|
+
}, /* @__PURE__ */ React42__default.createElement(SelectValue, null));
|
|
36110
36129
|
};
|
|
36111
36130
|
var Options4 = (_ref3) => {
|
|
36112
36131
|
let {
|
|
@@ -36118,9 +36137,9 @@ var Options4 = (_ref3) => {
|
|
|
36118
36137
|
options
|
|
36119
36138
|
} = internal;
|
|
36120
36139
|
const optionElement = findChildOfType(children, Options4.Option);
|
|
36121
|
-
return /* @__PURE__ */
|
|
36140
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
36122
36141
|
className
|
|
36123
|
-
}, /* @__PURE__ */
|
|
36142
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, null, options.map((option) => applyInternalProps(optionElement, {
|
|
36124
36143
|
key: option.value,
|
|
36125
36144
|
value: option.value,
|
|
36126
36145
|
label: option.label
|
|
@@ -36135,7 +36154,7 @@ var Option4 = (_ref4) => {
|
|
|
36135
36154
|
value,
|
|
36136
36155
|
label
|
|
36137
36156
|
} = internal;
|
|
36138
|
-
return /* @__PURE__ */
|
|
36157
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
36139
36158
|
className,
|
|
36140
36159
|
id: value,
|
|
36141
36160
|
textValue: label
|
|
@@ -36167,12 +36186,12 @@ var City = (_ref) => {
|
|
|
36167
36186
|
const inputElement = findChildOfType(children, City.Input);
|
|
36168
36187
|
const descriptionElement = findChildOfType(children, City.Description);
|
|
36169
36188
|
const errorElement = findChildOfType(children, City.Error);
|
|
36170
|
-
return /* @__PURE__ */
|
|
36189
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
36171
36190
|
fieldId: id,
|
|
36172
36191
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
36173
36192
|
label: cityLabel
|
|
36174
36193
|
}),
|
|
36175
|
-
renderInput: () => /* @__PURE__ */
|
|
36194
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
36176
36195
|
value: value ?? "",
|
|
36177
36196
|
onChange,
|
|
36178
36197
|
isDisabled: disabled,
|
|
@@ -36181,7 +36200,7 @@ var City = (_ref) => {
|
|
|
36181
36200
|
onBlur,
|
|
36182
36201
|
onFocus
|
|
36183
36202
|
}, inputElement),
|
|
36184
|
-
renderDescription: () => /* @__PURE__ */
|
|
36203
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
36185
36204
|
});
|
|
36186
36205
|
};
|
|
36187
36206
|
var Input4 = (_ref2) => {
|
|
@@ -36200,7 +36219,7 @@ var Input4 = (_ref2) => {
|
|
|
36200
36219
|
var _inputRef$current;
|
|
36201
36220
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
36202
36221
|
}, id);
|
|
36203
|
-
return /* @__PURE__ */
|
|
36222
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
36204
36223
|
ref: inputRef,
|
|
36205
36224
|
id: inputId,
|
|
36206
36225
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -37287,12 +37306,12 @@ var AddressLine = (_ref) => {
|
|
|
37287
37306
|
const descriptionElement = findChildOfType(children, AddressLine.Description);
|
|
37288
37307
|
const errorElement = findChildOfType(children, AddressLine.Error);
|
|
37289
37308
|
if (isAutocomplete) {
|
|
37290
|
-
return /* @__PURE__ */
|
|
37309
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
37291
37310
|
fieldId: id,
|
|
37292
37311
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
37293
37312
|
label: addressLineLabel
|
|
37294
37313
|
}),
|
|
37295
|
-
renderInput: () => /* @__PURE__ */
|
|
37314
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(AddressLineAutocomplete, {
|
|
37296
37315
|
value,
|
|
37297
37316
|
onChange,
|
|
37298
37317
|
disabled,
|
|
@@ -37301,15 +37320,15 @@ var AddressLine = (_ref) => {
|
|
|
37301
37320
|
onBlur,
|
|
37302
37321
|
onFocus
|
|
37303
37322
|
}, inputElement, optionsElement),
|
|
37304
|
-
renderDescription: () => /* @__PURE__ */
|
|
37323
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
37305
37324
|
});
|
|
37306
37325
|
}
|
|
37307
|
-
return /* @__PURE__ */
|
|
37326
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
37308
37327
|
fieldId: id,
|
|
37309
37328
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
37310
37329
|
label: addressLineLabel
|
|
37311
37330
|
}),
|
|
37312
|
-
renderInput: () => /* @__PURE__ */
|
|
37331
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
37313
37332
|
value: value ?? "",
|
|
37314
37333
|
onChange,
|
|
37315
37334
|
isDisabled: disabled,
|
|
@@ -37318,7 +37337,7 @@ var AddressLine = (_ref) => {
|
|
|
37318
37337
|
onBlur,
|
|
37319
37338
|
onFocus
|
|
37320
37339
|
}, inputElement),
|
|
37321
|
-
renderDescription: () => /* @__PURE__ */
|
|
37340
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
37322
37341
|
});
|
|
37323
37342
|
};
|
|
37324
37343
|
var AddressLineAutocomplete = (_ref2) => {
|
|
@@ -37378,7 +37397,7 @@ var AddressLineAutocomplete = (_ref2) => {
|
|
|
37378
37397
|
}, [onFocus]);
|
|
37379
37398
|
const inputElement = findChildOfType(children, AddressLine.Input);
|
|
37380
37399
|
const optionsElement = findChildOfType(children, AddressLine.Options);
|
|
37381
|
-
return /* @__PURE__ */
|
|
37400
|
+
return /* @__PURE__ */ React42__default.createElement(ComboBox, {
|
|
37382
37401
|
inputValue: value ?? "",
|
|
37383
37402
|
onInputChange: handleInputChange,
|
|
37384
37403
|
selectedKey: null,
|
|
@@ -37417,7 +37436,7 @@ var Input5 = (_ref3) => {
|
|
|
37417
37436
|
var _inputRef$current;
|
|
37418
37437
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
37419
37438
|
}, id);
|
|
37420
|
-
return /* @__PURE__ */
|
|
37439
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
37421
37440
|
ref: inputRef,
|
|
37422
37441
|
id: inputId,
|
|
37423
37442
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -37431,9 +37450,9 @@ var Options5 = (_ref4) => {
|
|
|
37431
37450
|
className
|
|
37432
37451
|
} = _ref4;
|
|
37433
37452
|
const optionElement = findChildOfType(children, Options5.Option);
|
|
37434
|
-
return /* @__PURE__ */
|
|
37453
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
37435
37454
|
className
|
|
37436
|
-
}, /* @__PURE__ */
|
|
37455
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, {
|
|
37437
37456
|
renderEmptyState: () => null
|
|
37438
37457
|
}, (item) => applyInternalProps(optionElement, {
|
|
37439
37458
|
id: item.id,
|
|
@@ -37449,7 +37468,7 @@ var Option5 = (_ref5) => {
|
|
|
37449
37468
|
id,
|
|
37450
37469
|
label
|
|
37451
37470
|
} = internal;
|
|
37452
|
-
return /* @__PURE__ */
|
|
37471
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
37453
37472
|
className,
|
|
37454
37473
|
id,
|
|
37455
37474
|
textValue: label
|
|
@@ -37481,12 +37500,12 @@ var AddressLine2 = (_ref) => {
|
|
|
37481
37500
|
const inputElement = findChildOfType(children, AddressLine2.Input);
|
|
37482
37501
|
const descriptionElement = findChildOfType(children, AddressLine2.Description);
|
|
37483
37502
|
const errorElement = findChildOfType(children, AddressLine2.Error);
|
|
37484
|
-
return /* @__PURE__ */
|
|
37503
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
37485
37504
|
fieldId: id,
|
|
37486
37505
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
37487
37506
|
label: addressLine2Label
|
|
37488
37507
|
}),
|
|
37489
|
-
renderInput: () => /* @__PURE__ */
|
|
37508
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
37490
37509
|
value: value ?? "",
|
|
37491
37510
|
onChange,
|
|
37492
37511
|
isDisabled: disabled,
|
|
@@ -37495,7 +37514,7 @@ var AddressLine2 = (_ref) => {
|
|
|
37495
37514
|
onBlur,
|
|
37496
37515
|
onFocus
|
|
37497
37516
|
}, inputElement),
|
|
37498
|
-
renderDescription: () => /* @__PURE__ */
|
|
37517
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
37499
37518
|
});
|
|
37500
37519
|
};
|
|
37501
37520
|
var Input6 = (_ref2) => {
|
|
@@ -37514,7 +37533,7 @@ var Input6 = (_ref2) => {
|
|
|
37514
37533
|
var _inputRef$current;
|
|
37515
37534
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
37516
37535
|
}, id);
|
|
37517
|
-
return /* @__PURE__ */
|
|
37536
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
37518
37537
|
ref: inputRef,
|
|
37519
37538
|
id: inputId,
|
|
37520
37539
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -37583,13 +37602,13 @@ function useJapanAutocomplete(_ref) {
|
|
|
37583
37602
|
});
|
|
37584
37603
|
const {
|
|
37585
37604
|
instance,
|
|
37586
|
-
|
|
37605
|
+
language,
|
|
37587
37606
|
atlasBaseUrl
|
|
37588
37607
|
} = useConfig();
|
|
37589
37608
|
const atlas = useAtlas({
|
|
37590
37609
|
enabled: isAutocompleteEnabled,
|
|
37591
37610
|
getInstance: () => instance ?? "",
|
|
37592
|
-
language
|
|
37611
|
+
language,
|
|
37593
37612
|
atlasBaseUrl
|
|
37594
37613
|
});
|
|
37595
37614
|
const searchByPostalCode = useCallback(async (text) => {
|
|
@@ -37654,12 +37673,12 @@ var PostalCode = (_ref) => {
|
|
|
37654
37673
|
const descriptionElement = findChildOfType(children, PostalCode.Description);
|
|
37655
37674
|
const errorElement = findChildOfType(children, PostalCode.Error);
|
|
37656
37675
|
if (isAutocomplete) {
|
|
37657
|
-
return /* @__PURE__ */
|
|
37676
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
37658
37677
|
fieldId: id,
|
|
37659
37678
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
37660
37679
|
label: postalCodeLabel
|
|
37661
37680
|
}),
|
|
37662
|
-
renderInput: () => /* @__PURE__ */
|
|
37681
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(PostalCodeAutocomplete, {
|
|
37663
37682
|
value,
|
|
37664
37683
|
onChange,
|
|
37665
37684
|
disabled,
|
|
@@ -37668,15 +37687,15 @@ var PostalCode = (_ref) => {
|
|
|
37668
37687
|
onBlur,
|
|
37669
37688
|
onFocus
|
|
37670
37689
|
}, inputElement, optionsElement),
|
|
37671
|
-
renderDescription: () => /* @__PURE__ */
|
|
37690
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
37672
37691
|
});
|
|
37673
37692
|
}
|
|
37674
|
-
return /* @__PURE__ */
|
|
37693
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
37675
37694
|
fieldId: id,
|
|
37676
37695
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
37677
37696
|
label: postalCodeLabel
|
|
37678
37697
|
}),
|
|
37679
|
-
renderInput: () => /* @__PURE__ */
|
|
37698
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
37680
37699
|
value: value ?? "",
|
|
37681
37700
|
onChange,
|
|
37682
37701
|
isDisabled: disabled,
|
|
@@ -37685,7 +37704,7 @@ var PostalCode = (_ref) => {
|
|
|
37685
37704
|
onBlur,
|
|
37686
37705
|
onFocus
|
|
37687
37706
|
}, inputElement),
|
|
37688
|
-
renderDescription: () => /* @__PURE__ */
|
|
37707
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
37689
37708
|
});
|
|
37690
37709
|
};
|
|
37691
37710
|
var PostalCodeAutocomplete = (_ref2) => {
|
|
@@ -37737,7 +37756,7 @@ var PostalCodeAutocomplete = (_ref2) => {
|
|
|
37737
37756
|
}, [onFocus]);
|
|
37738
37757
|
const inputElement = findChildOfType(children, PostalCode.Input);
|
|
37739
37758
|
const optionsElement = findChildOfType(children, PostalCode.Options);
|
|
37740
|
-
return /* @__PURE__ */
|
|
37759
|
+
return /* @__PURE__ */ React42__default.createElement(ComboBox, {
|
|
37741
37760
|
inputValue: value ?? "",
|
|
37742
37761
|
onInputChange: handleInputChange,
|
|
37743
37762
|
selectedKey: null,
|
|
@@ -37777,7 +37796,7 @@ var Input7 = (_ref3) => {
|
|
|
37777
37796
|
var _inputRef$current;
|
|
37778
37797
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
37779
37798
|
}, id);
|
|
37780
|
-
return /* @__PURE__ */
|
|
37799
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
37781
37800
|
ref: inputRef,
|
|
37782
37801
|
id: inputId,
|
|
37783
37802
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -37792,9 +37811,9 @@ var Options6 = (_ref4) => {
|
|
|
37792
37811
|
className
|
|
37793
37812
|
} = _ref4;
|
|
37794
37813
|
const optionElement = findChildOfType(children, Options6.Option);
|
|
37795
|
-
return /* @__PURE__ */
|
|
37814
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
37796
37815
|
className
|
|
37797
|
-
}, /* @__PURE__ */
|
|
37816
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, {
|
|
37798
37817
|
renderEmptyState: () => null
|
|
37799
37818
|
}, (item) => applyInternalProps(optionElement, {
|
|
37800
37819
|
id: item.id,
|
|
@@ -37810,7 +37829,7 @@ var Option6 = (_ref5) => {
|
|
|
37810
37829
|
id,
|
|
37811
37830
|
label
|
|
37812
37831
|
} = internal;
|
|
37813
|
-
return /* @__PURE__ */
|
|
37832
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
37814
37833
|
className,
|
|
37815
37834
|
id,
|
|
37816
37835
|
textValue: label
|
|
@@ -37849,12 +37868,12 @@ var StreetName = (_ref) => {
|
|
|
37849
37868
|
const descriptionElement = findChildOfType(children, StreetName.Description);
|
|
37850
37869
|
const errorElement = findChildOfType(children, StreetName.Error);
|
|
37851
37870
|
if (isAutocomplete) {
|
|
37852
|
-
return /* @__PURE__ */
|
|
37871
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
37853
37872
|
fieldId: id,
|
|
37854
37873
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
37855
37874
|
label: streetNameLabel
|
|
37856
37875
|
}),
|
|
37857
|
-
renderInput: () => /* @__PURE__ */
|
|
37876
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(StreetNameAutocomplete, {
|
|
37858
37877
|
value,
|
|
37859
37878
|
onChange,
|
|
37860
37879
|
disabled,
|
|
@@ -37863,15 +37882,15 @@ var StreetName = (_ref) => {
|
|
|
37863
37882
|
onBlur,
|
|
37864
37883
|
onFocus
|
|
37865
37884
|
}, inputElement, optionsElement),
|
|
37866
|
-
renderDescription: () => /* @__PURE__ */
|
|
37885
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
37867
37886
|
});
|
|
37868
37887
|
}
|
|
37869
|
-
return /* @__PURE__ */
|
|
37888
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
37870
37889
|
fieldId: id,
|
|
37871
37890
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
37872
37891
|
label: streetNameLabel
|
|
37873
37892
|
}),
|
|
37874
|
-
renderInput: () => /* @__PURE__ */
|
|
37893
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
37875
37894
|
value: value ?? "",
|
|
37876
37895
|
onChange,
|
|
37877
37896
|
isDisabled: disabled,
|
|
@@ -37880,7 +37899,7 @@ var StreetName = (_ref) => {
|
|
|
37880
37899
|
onBlur,
|
|
37881
37900
|
onFocus
|
|
37882
37901
|
}, inputElement),
|
|
37883
|
-
renderDescription: () => /* @__PURE__ */
|
|
37902
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
37884
37903
|
});
|
|
37885
37904
|
};
|
|
37886
37905
|
var StreetNameAutocomplete = (_ref2) => {
|
|
@@ -37945,7 +37964,7 @@ var StreetNameAutocomplete = (_ref2) => {
|
|
|
37945
37964
|
setSessionToken(generateUUID());
|
|
37946
37965
|
onFocus == null || onFocus();
|
|
37947
37966
|
}, [onFocus]);
|
|
37948
|
-
return /* @__PURE__ */
|
|
37967
|
+
return /* @__PURE__ */ React42__default.createElement(ComboBox, {
|
|
37949
37968
|
inputValue: value ?? "",
|
|
37950
37969
|
onInputChange: handleInputChange,
|
|
37951
37970
|
selectedKey: null,
|
|
@@ -37984,7 +38003,7 @@ var Input8 = (_ref3) => {
|
|
|
37984
38003
|
var _inputRef$current;
|
|
37985
38004
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
37986
38005
|
}, id);
|
|
37987
|
-
return /* @__PURE__ */
|
|
38006
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
37988
38007
|
ref: inputRef,
|
|
37989
38008
|
id: inputId,
|
|
37990
38009
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -37998,9 +38017,9 @@ var Options7 = (_ref4) => {
|
|
|
37998
38017
|
className
|
|
37999
38018
|
} = _ref4;
|
|
38000
38019
|
const optionElement = findChildOfType(children, Options7.Option);
|
|
38001
|
-
return /* @__PURE__ */
|
|
38020
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
38002
38021
|
className
|
|
38003
|
-
}, /* @__PURE__ */
|
|
38022
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, {
|
|
38004
38023
|
renderEmptyState: () => null
|
|
38005
38024
|
}, (item) => applyInternalProps(optionElement, {
|
|
38006
38025
|
value: item.id,
|
|
@@ -38016,7 +38035,7 @@ var Option7 = (_ref5) => {
|
|
|
38016
38035
|
value,
|
|
38017
38036
|
label
|
|
38018
38037
|
} = internal;
|
|
38019
|
-
return /* @__PURE__ */
|
|
38038
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
38020
38039
|
className,
|
|
38021
38040
|
id: value,
|
|
38022
38041
|
textValue: label
|
|
@@ -38048,12 +38067,12 @@ var StreetNumber = (_ref) => {
|
|
|
38048
38067
|
const inputElement = findChildOfType(children, StreetNumber.Input);
|
|
38049
38068
|
const descriptionElement = findChildOfType(children, StreetNumber.Description);
|
|
38050
38069
|
const errorElement = findChildOfType(children, StreetNumber.Error);
|
|
38051
|
-
return /* @__PURE__ */
|
|
38070
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
38052
38071
|
fieldId: id,
|
|
38053
38072
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
38054
38073
|
label: streetNumberLabel
|
|
38055
38074
|
}),
|
|
38056
|
-
renderInput: () => /* @__PURE__ */
|
|
38075
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
38057
38076
|
value: value ?? "",
|
|
38058
38077
|
onChange,
|
|
38059
38078
|
isDisabled: disabled,
|
|
@@ -38062,7 +38081,7 @@ var StreetNumber = (_ref) => {
|
|
|
38062
38081
|
onBlur,
|
|
38063
38082
|
onFocus
|
|
38064
38083
|
}, inputElement),
|
|
38065
|
-
renderDescription: () => /* @__PURE__ */
|
|
38084
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
38066
38085
|
});
|
|
38067
38086
|
};
|
|
38068
38087
|
var Input9 = (_ref2) => {
|
|
@@ -38081,7 +38100,7 @@ var Input9 = (_ref2) => {
|
|
|
38081
38100
|
var _inputRef$current;
|
|
38082
38101
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
38083
38102
|
}, id);
|
|
38084
|
-
return /* @__PURE__ */
|
|
38103
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
38085
38104
|
ref: inputRef,
|
|
38086
38105
|
id: inputId,
|
|
38087
38106
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -38238,23 +38257,23 @@ var MultilineAddress = (_ref) => {
|
|
|
38238
38257
|
if (!form) {
|
|
38239
38258
|
return null;
|
|
38240
38259
|
}
|
|
38241
|
-
return /* @__PURE__ */
|
|
38260
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
38242
38261
|
fieldId: id
|
|
38243
|
-
}, /* @__PURE__ */
|
|
38262
|
+
}, /* @__PURE__ */ React42__default.createElement(CountryCodeProvider, {
|
|
38244
38263
|
countryCode: value == null ? void 0 : value.country
|
|
38245
|
-
}, /* @__PURE__ */
|
|
38264
|
+
}, /* @__PURE__ */ React42__default.createElement(AddressAutofillProvider, {
|
|
38246
38265
|
autocompleteEnabled,
|
|
38247
38266
|
onAddressSelect: handleAddressSelect
|
|
38248
|
-
}, /* @__PURE__ */
|
|
38267
|
+
}, /* @__PURE__ */ React42__default.createElement(AddressFieldsProvider, {
|
|
38249
38268
|
fields: addressFields
|
|
38250
|
-
}, /* @__PURE__ */
|
|
38269
|
+
}, /* @__PURE__ */ React42__default.createElement("fieldset", {
|
|
38251
38270
|
style: {
|
|
38252
38271
|
border: "none",
|
|
38253
38272
|
padding: 0,
|
|
38254
38273
|
margin: 0,
|
|
38255
38274
|
minWidth: 0
|
|
38256
38275
|
}
|
|
38257
|
-
}, /* @__PURE__ */
|
|
38276
|
+
}, /* @__PURE__ */ React42__default.createElement("legend", {
|
|
38258
38277
|
style: {
|
|
38259
38278
|
position: "absolute",
|
|
38260
38279
|
width: "1px",
|
|
@@ -38266,7 +38285,7 @@ var MultilineAddress = (_ref) => {
|
|
|
38266
38285
|
whiteSpace: "nowrap",
|
|
38267
38286
|
border: 0
|
|
38268
38287
|
}
|
|
38269
|
-
}, label), /* @__PURE__ */
|
|
38288
|
+
}, label), /* @__PURE__ */ React42__default.createElement(Form, {
|
|
38270
38289
|
formSchema,
|
|
38271
38290
|
form,
|
|
38272
38291
|
values: value ?? NO_VALUES,
|
|
@@ -38350,10 +38369,10 @@ var NumberInput = (_ref) => {
|
|
|
38350
38369
|
setInternalValue(newValue);
|
|
38351
38370
|
}
|
|
38352
38371
|
}, [internalValue, value]);
|
|
38353
|
-
return /* @__PURE__ */
|
|
38372
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
38354
38373
|
fieldId: id,
|
|
38355
38374
|
renderLabel: () => labelElement,
|
|
38356
|
-
renderInput: () => /* @__PURE__ */
|
|
38375
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(NumberField, {
|
|
38357
38376
|
value: internalValue,
|
|
38358
38377
|
onChange: handleChange,
|
|
38359
38378
|
isDisabled: disabled,
|
|
@@ -38365,7 +38384,7 @@ var NumberInput = (_ref) => {
|
|
|
38365
38384
|
minValue: minimum ?? void 0,
|
|
38366
38385
|
maxValue: maximum ?? void 0
|
|
38367
38386
|
}, inputElement),
|
|
38368
|
-
renderDescription: () => /* @__PURE__ */
|
|
38387
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
38369
38388
|
});
|
|
38370
38389
|
};
|
|
38371
38390
|
var Input10 = (_ref2) => {
|
|
@@ -38393,7 +38412,7 @@ var Input10 = (_ref2) => {
|
|
|
38393
38412
|
var _ref$current;
|
|
38394
38413
|
(_ref$current = ref.current) == null || _ref$current.focus();
|
|
38395
38414
|
}, id);
|
|
38396
|
-
return /* @__PURE__ */
|
|
38415
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
38397
38416
|
ref,
|
|
38398
38417
|
id: inputId,
|
|
38399
38418
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -38513,7 +38532,7 @@ function useCountries() {
|
|
|
38513
38532
|
t
|
|
38514
38533
|
} = useTranslation();
|
|
38515
38534
|
const {
|
|
38516
|
-
|
|
38535
|
+
language
|
|
38517
38536
|
} = useConfig();
|
|
38518
38537
|
const countries = useMemo(() => {
|
|
38519
38538
|
return Object.keys(CALLING_COUNTRY_CODES).reduce((result2, shortCountryCode) => {
|
|
@@ -38529,8 +38548,8 @@ function useCountries() {
|
|
|
38529
38548
|
});
|
|
38530
38549
|
}
|
|
38531
38550
|
return result2;
|
|
38532
|
-
}, []).sort((a, b) => a.countryName.localeCompare(b.countryName,
|
|
38533
|
-
}, [t,
|
|
38551
|
+
}, []).sort((a, b) => a.countryName.localeCompare(b.countryName, language));
|
|
38552
|
+
}, [t, language]);
|
|
38534
38553
|
return countries;
|
|
38535
38554
|
}
|
|
38536
38555
|
function filterCountries(countries, allowedCountryCodes) {
|
|
@@ -38567,7 +38586,7 @@ var Flag = (_ref) => {
|
|
|
38567
38586
|
}
|
|
38568
38587
|
const flag1x = getFlagUrl(longCountryCode, "1x");
|
|
38569
38588
|
const flag2x = getFlagUrl(longCountryCode, "2x");
|
|
38570
|
-
return /* @__PURE__ */
|
|
38589
|
+
return /* @__PURE__ */ React42__default.createElement("img", {
|
|
38571
38590
|
src: flag1x,
|
|
38572
38591
|
srcSet: `${flag1x} 1x, ${flag2x} 2x`,
|
|
38573
38592
|
alt: "",
|
|
@@ -38620,13 +38639,13 @@ var PhoneInput = (_ref2) => {
|
|
|
38620
38639
|
countryCodes,
|
|
38621
38640
|
countries
|
|
38622
38641
|
};
|
|
38623
|
-
return /* @__PURE__ */
|
|
38642
|
+
return /* @__PURE__ */ React42__default.createElement(PhoneInputContext.Provider, {
|
|
38624
38643
|
value: contextValue
|
|
38625
|
-
}, /* @__PURE__ */
|
|
38644
|
+
}, /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
38626
38645
|
fieldId: id,
|
|
38627
38646
|
renderLabel: () => labelElement,
|
|
38628
38647
|
renderInput: () => controlElement,
|
|
38629
|
-
renderDescription: () => /* @__PURE__ */
|
|
38648
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
38630
38649
|
}));
|
|
38631
38650
|
};
|
|
38632
38651
|
var CountryButton = (_ref3) => {
|
|
@@ -38659,7 +38678,7 @@ var CountryButton = (_ref3) => {
|
|
|
38659
38678
|
const dialingCode = selectedCountry ? getCallingCode2(selectedCountry.longCountryCode) || "" : "";
|
|
38660
38679
|
const countryCodeLabel = t("field.phone.country-code.aria-label");
|
|
38661
38680
|
const ariaLabel = selectedCountry ? `${countryCodeLabel}, ${selectedCountry.countryName}, ${dialingCode}` : countryCodeLabel;
|
|
38662
|
-
return /* @__PURE__ */
|
|
38681
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
38663
38682
|
ref,
|
|
38664
38683
|
id: buttonId,
|
|
38665
38684
|
"aria-label": ariaLabel,
|
|
@@ -38680,7 +38699,7 @@ var CountryButtonFlag = (_ref4) => {
|
|
|
38680
38699
|
if (!selectedCountry) {
|
|
38681
38700
|
return null;
|
|
38682
38701
|
}
|
|
38683
|
-
return /* @__PURE__ */
|
|
38702
|
+
return /* @__PURE__ */ React42__default.createElement(Flag, {
|
|
38684
38703
|
className,
|
|
38685
38704
|
longCountryCode: selectedCountry.longCountryCode
|
|
38686
38705
|
});
|
|
@@ -38695,7 +38714,7 @@ var CountryButtonEmptyState = (_ref5) => {
|
|
|
38695
38714
|
if (selectedCountryCode) {
|
|
38696
38715
|
return null;
|
|
38697
38716
|
}
|
|
38698
|
-
return /* @__PURE__ */
|
|
38717
|
+
return /* @__PURE__ */ React42__default.createElement(Globe_default, {
|
|
38699
38718
|
className,
|
|
38700
38719
|
width: 22,
|
|
38701
38720
|
height: 22
|
|
@@ -38712,9 +38731,9 @@ var CountryOptions = (_ref6) => {
|
|
|
38712
38731
|
countries
|
|
38713
38732
|
} = usePhoneInputContext();
|
|
38714
38733
|
const optionElement = findChildOfType(children, CountryOptions.Option);
|
|
38715
|
-
return /* @__PURE__ */
|
|
38734
|
+
return /* @__PURE__ */ React42__default.createElement(Popover, {
|
|
38716
38735
|
className
|
|
38717
|
-
}, /* @__PURE__ */
|
|
38736
|
+
}, /* @__PURE__ */ React42__default.createElement(ListBox, null, countries.map((country) => {
|
|
38718
38737
|
const dialingCode = getCallingCode2(country.longCountryCode) || "";
|
|
38719
38738
|
return applyInternalProps(optionElement, {
|
|
38720
38739
|
key: country.shortCountryCode,
|
|
@@ -38743,12 +38762,12 @@ var Option8 = (_ref7) => {
|
|
|
38743
38762
|
countryName,
|
|
38744
38763
|
longCountryCode
|
|
38745
38764
|
};
|
|
38746
|
-
const content = children || /* @__PURE__ */
|
|
38747
|
-
return /* @__PURE__ */
|
|
38765
|
+
const content = children || /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, /* @__PURE__ */ React42__default.createElement(OptionFlag, null), /* @__PURE__ */ React42__default.createElement(OptionName, null), /* @__PURE__ */ React42__default.createElement(OptionCode, null));
|
|
38766
|
+
return /* @__PURE__ */ React42__default.createElement(ListBoxItem, {
|
|
38748
38767
|
className,
|
|
38749
38768
|
id: countryCode,
|
|
38750
38769
|
textValue: `${countryName} ${dialingCode}`
|
|
38751
|
-
}, /* @__PURE__ */
|
|
38770
|
+
}, /* @__PURE__ */ React42__default.createElement(OptionDataContext.Provider, {
|
|
38752
38771
|
value: optionData
|
|
38753
38772
|
}, content));
|
|
38754
38773
|
};
|
|
@@ -38759,7 +38778,7 @@ var OptionFlag = (_ref8) => {
|
|
|
38759
38778
|
const {
|
|
38760
38779
|
longCountryCode
|
|
38761
38780
|
} = useOptionDataContext();
|
|
38762
|
-
return /* @__PURE__ */
|
|
38781
|
+
return /* @__PURE__ */ React42__default.createElement(Flag, {
|
|
38763
38782
|
className,
|
|
38764
38783
|
longCountryCode
|
|
38765
38784
|
});
|
|
@@ -38771,7 +38790,7 @@ var OptionName = (_ref9) => {
|
|
|
38771
38790
|
const {
|
|
38772
38791
|
countryName
|
|
38773
38792
|
} = useOptionDataContext();
|
|
38774
|
-
return /* @__PURE__ */
|
|
38793
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
38775
38794
|
className
|
|
38776
38795
|
}, countryName);
|
|
38777
38796
|
};
|
|
@@ -38782,7 +38801,7 @@ var OptionCode = (_ref0) => {
|
|
|
38782
38801
|
const {
|
|
38783
38802
|
dialingCode
|
|
38784
38803
|
} = useOptionDataContext();
|
|
38785
|
-
return /* @__PURE__ */
|
|
38804
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
38786
38805
|
className
|
|
38787
38806
|
}, dialingCode);
|
|
38788
38807
|
};
|
|
@@ -38820,7 +38839,7 @@ var PhoneNumber2 = (_ref1) => {
|
|
|
38820
38839
|
var _ref$current2;
|
|
38821
38840
|
(_ref$current2 = ref.current) == null || _ref$current2.focus();
|
|
38822
38841
|
}, id);
|
|
38823
|
-
return /* @__PURE__ */
|
|
38842
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
38824
38843
|
ref,
|
|
38825
38844
|
id: inputId,
|
|
38826
38845
|
type: "tel",
|
|
@@ -38854,9 +38873,9 @@ var Control3 = (_ref10) => {
|
|
|
38854
38873
|
const countryButtonElement = findChildOfType(children, PhoneInput.CountryButton);
|
|
38855
38874
|
const countryOptionsElement = findChildOfType(children, PhoneInput.CountryOptions);
|
|
38856
38875
|
const phoneNumberElement = findChildOfType(children, PhoneInput.PhoneNumber);
|
|
38857
|
-
return /* @__PURE__ */
|
|
38876
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
38858
38877
|
className
|
|
38859
|
-
}, /* @__PURE__ */
|
|
38878
|
+
}, /* @__PURE__ */ React42__default.createElement(Select, {
|
|
38860
38879
|
value: selectedCountryCode ?? null,
|
|
38861
38880
|
onChange: (key) => handleCountryCodeChange(key),
|
|
38862
38881
|
isDisabled: disabled,
|
|
@@ -38908,12 +38927,12 @@ var RadioGroup = (_ref) => {
|
|
|
38908
38927
|
const optionsElement = findChildOfType(children, RadioGroup.Options);
|
|
38909
38928
|
const descriptionElement = findChildOfType(children, RadioGroup.Description);
|
|
38910
38929
|
const errorElement = findChildOfType(children, RadioGroup.Error);
|
|
38911
|
-
return /* @__PURE__ */
|
|
38930
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
38912
38931
|
fieldId: id,
|
|
38913
38932
|
renderLabel: () => applyInternalProps(labelElement, {
|
|
38914
38933
|
as: "div"
|
|
38915
38934
|
}),
|
|
38916
|
-
renderInput: () => /* @__PURE__ */
|
|
38935
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(RadioGroup$1, {
|
|
38917
38936
|
id: inputId,
|
|
38918
38937
|
"aria-labelledby": labelId,
|
|
38919
38938
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -38925,7 +38944,7 @@ var RadioGroup = (_ref) => {
|
|
|
38925
38944
|
onBlur,
|
|
38926
38945
|
onFocus
|
|
38927
38946
|
}, optionsElement),
|
|
38928
|
-
renderDescription: () => /* @__PURE__ */
|
|
38947
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
38929
38948
|
});
|
|
38930
38949
|
};
|
|
38931
38950
|
var Options8 = (_ref2) => {
|
|
@@ -38951,7 +38970,7 @@ var Options8 = (_ref2) => {
|
|
|
38951
38970
|
var _firstRadioRef$curren;
|
|
38952
38971
|
(_firstRadioRef$curren = firstRadioRef.current) == null || _firstRadioRef$curren.focus();
|
|
38953
38972
|
}, id);
|
|
38954
|
-
return /* @__PURE__ */
|
|
38973
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
38955
38974
|
className,
|
|
38956
38975
|
"data-columns": numberOfColumns,
|
|
38957
38976
|
"data-invalid": hasError
|
|
@@ -38989,9 +39008,9 @@ var Option9 = (_ref3) => {
|
|
|
38989
39008
|
const otherInputElement = findChildOfType(children, Option9.OtherInput);
|
|
38990
39009
|
const isThisOptionSelected = selectedValue === value;
|
|
38991
39010
|
const radioClassName = inputElement == null || (_inputElement$props = inputElement.props) == null ? void 0 : _inputElement$props.className;
|
|
38992
|
-
return /* @__PURE__ */
|
|
39011
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
38993
39012
|
className
|
|
38994
|
-
}, /* @__PURE__ */
|
|
39013
|
+
}, /* @__PURE__ */ React42__default.createElement(Radio, {
|
|
38995
39014
|
value,
|
|
38996
39015
|
ref: radioRef,
|
|
38997
39016
|
className: radioClassName
|
|
@@ -39007,7 +39026,7 @@ var OptionLabel2 = (_ref4) => {
|
|
|
39007
39026
|
const {
|
|
39008
39027
|
label
|
|
39009
39028
|
} = internal;
|
|
39010
|
-
return /* @__PURE__ */
|
|
39029
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
39011
39030
|
className
|
|
39012
39031
|
}, label);
|
|
39013
39032
|
};
|
|
@@ -39050,11 +39069,11 @@ var OptionOtherInput = (_ref5) => {
|
|
|
39050
39069
|
onChange(_otherValue);
|
|
39051
39070
|
setOtherValue(input);
|
|
39052
39071
|
}, [onChange, addOtherLabel, otherLabel]);
|
|
39053
|
-
return /* @__PURE__ */
|
|
39072
|
+
return /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
39054
39073
|
value: otherValue,
|
|
39055
39074
|
onChange: handleOtherChange,
|
|
39056
39075
|
isDisabled: disabled
|
|
39057
|
-
}, /* @__PURE__ */
|
|
39076
|
+
}, /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
39058
39077
|
ref: inputRef,
|
|
39059
39078
|
className,
|
|
39060
39079
|
placeholder: addOtherPlaceholder,
|
|
@@ -39090,10 +39109,10 @@ var RatingInput = (_ref) => {
|
|
|
39090
39109
|
const starsElement = findChildOfType(children, RatingInput.Stars);
|
|
39091
39110
|
const descriptionElement = findChildOfType(children, RatingInput.Description);
|
|
39092
39111
|
const errorElement = findChildOfType(children, RatingInput.Error);
|
|
39093
|
-
return /* @__PURE__ */
|
|
39112
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
39094
39113
|
fieldId: id,
|
|
39095
39114
|
renderLabel: () => labelElement,
|
|
39096
|
-
renderInput: () => /* @__PURE__ */
|
|
39115
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(RadioGroup$1, {
|
|
39097
39116
|
value: value ? String(value) : void 0,
|
|
39098
39117
|
onChange: handleChange,
|
|
39099
39118
|
isDisabled: disabled,
|
|
@@ -39103,7 +39122,7 @@ var RatingInput = (_ref) => {
|
|
|
39103
39122
|
onFocus,
|
|
39104
39123
|
orientation: "horizontal"
|
|
39105
39124
|
}, starsElement),
|
|
39106
|
-
renderDescription: () => /* @__PURE__ */
|
|
39125
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
39107
39126
|
});
|
|
39108
39127
|
};
|
|
39109
39128
|
var Stars = (_ref2) => {
|
|
@@ -39124,7 +39143,7 @@ var Stars = (_ref2) => {
|
|
|
39124
39143
|
const starElement = findChildOfType(children, Stars.Star);
|
|
39125
39144
|
const starValues = ["1", "2", "3", "4", "5"];
|
|
39126
39145
|
const isFilled = (starValue) => hovered ? hovered >= starValue : !!value && value >= Number(starValue);
|
|
39127
|
-
return /* @__PURE__ */
|
|
39146
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
39128
39147
|
ref: containerRef,
|
|
39129
39148
|
id: inputId,
|
|
39130
39149
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -39147,7 +39166,7 @@ var Star = (_ref3) => {
|
|
|
39147
39166
|
isFilled,
|
|
39148
39167
|
onHoverChange
|
|
39149
39168
|
} = internal;
|
|
39150
|
-
return /* @__PURE__ */
|
|
39169
|
+
return /* @__PURE__ */ React42__default.createElement(Radio, {
|
|
39151
39170
|
value,
|
|
39152
39171
|
className,
|
|
39153
39172
|
"data-filled": isFilled || void 0,
|
|
@@ -39179,7 +39198,7 @@ var OptionLabel3 = (_ref) => {
|
|
|
39179
39198
|
const {
|
|
39180
39199
|
label
|
|
39181
39200
|
} = internal;
|
|
39182
|
-
return /* @__PURE__ */
|
|
39201
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
39183
39202
|
className
|
|
39184
39203
|
}, label);
|
|
39185
39204
|
};
|
|
@@ -39212,11 +39231,11 @@ var OtherInput2 = (_ref2) => {
|
|
|
39212
39231
|
const formattedOtherValue = newValue ? `${otherLabel}: ${newValue}` : otherLabel;
|
|
39213
39232
|
onChangeRef.current([...regularOptions, formattedOtherValue]);
|
|
39214
39233
|
}, [fieldValue, otherLabel]);
|
|
39215
|
-
return /* @__PURE__ */
|
|
39234
|
+
return /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
39216
39235
|
value: inputValue,
|
|
39217
39236
|
onChange: handleInputChange,
|
|
39218
39237
|
"aria-label": otherLabel
|
|
39219
|
-
}, /* @__PURE__ */
|
|
39238
|
+
}, /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
39220
39239
|
placeholder: addOtherPlaceholder,
|
|
39221
39240
|
maxLength: otherInputCharacterLimit,
|
|
39222
39241
|
className
|
|
@@ -39245,7 +39264,7 @@ var Option10 = (_ref3) => {
|
|
|
39245
39264
|
}
|
|
39246
39265
|
}, id);
|
|
39247
39266
|
const labelElement = findChildOfType(children, OptionLabel3);
|
|
39248
|
-
return /* @__PURE__ */
|
|
39267
|
+
return /* @__PURE__ */ React42__default.createElement(Tag$1, {
|
|
39249
39268
|
ref,
|
|
39250
39269
|
id: value,
|
|
39251
39270
|
textValue: label,
|
|
@@ -39286,7 +39305,7 @@ var Options9 = (_ref4) => {
|
|
|
39286
39305
|
}
|
|
39287
39306
|
return regularOptions;
|
|
39288
39307
|
}, [options, addOther, otherLabel]);
|
|
39289
|
-
return /* @__PURE__ */
|
|
39308
|
+
return /* @__PURE__ */ React42__default.createElement(TagList, {
|
|
39290
39309
|
"aria-describedby": ariaDescribedBy,
|
|
39291
39310
|
className
|
|
39292
39311
|
}, allOptions.map((option, index) => {
|
|
@@ -39323,7 +39342,7 @@ var Control4 = (_ref5) => {
|
|
|
39323
39342
|
}
|
|
39324
39343
|
return fieldValue.some((val) => val === otherLabel || val.startsWith(`${otherLabel}:`));
|
|
39325
39344
|
}, [addOther, fieldValue, otherLabel]);
|
|
39326
|
-
return /* @__PURE__ */
|
|
39345
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
39327
39346
|
className,
|
|
39328
39347
|
"data-invalid": hasError
|
|
39329
39348
|
}, optionsElement, isOtherSelected && otherInputElement);
|
|
@@ -39378,22 +39397,22 @@ var Tags = (_ref6) => {
|
|
|
39378
39397
|
const controlElement = findChildOfType(children, Control4);
|
|
39379
39398
|
const descriptionElement = findChildOfType(children, Description);
|
|
39380
39399
|
const errorElement = findChildOfType(children, Error2);
|
|
39381
|
-
return /* @__PURE__ */
|
|
39400
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
39382
39401
|
fieldId: id,
|
|
39383
39402
|
renderLabel: () => labelElement,
|
|
39384
|
-
renderInput: () => /* @__PURE__ */
|
|
39403
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(FieldsetHeadless, {
|
|
39385
39404
|
id: inputId,
|
|
39386
39405
|
ariaLabelledBy: labelId,
|
|
39387
39406
|
ariaDescribedBy,
|
|
39388
39407
|
required,
|
|
39389
39408
|
onBlur,
|
|
39390
39409
|
onFocus
|
|
39391
|
-
}, /* @__PURE__ */
|
|
39410
|
+
}, /* @__PURE__ */ React42__default.createElement(TagGroup, {
|
|
39392
39411
|
selectionMode: "multiple",
|
|
39393
39412
|
selectedKeys,
|
|
39394
39413
|
onSelectionChange: handleSelectionChange
|
|
39395
39414
|
}, controlElement)),
|
|
39396
|
-
renderDescription: () => /* @__PURE__ */
|
|
39415
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
39397
39416
|
});
|
|
39398
39417
|
};
|
|
39399
39418
|
Options9.Option = Option10;
|
|
@@ -39426,10 +39445,10 @@ var TextArea = (_ref) => {
|
|
|
39426
39445
|
const inputElement = findChildOfType(children, TextArea.Input);
|
|
39427
39446
|
const descriptionElement = findChildOfType(children, TextArea.Description);
|
|
39428
39447
|
const errorElement = findChildOfType(children, TextArea.Error);
|
|
39429
|
-
return /* @__PURE__ */
|
|
39448
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
39430
39449
|
fieldId: id,
|
|
39431
39450
|
renderLabel: () => labelElement,
|
|
39432
|
-
renderInput: () => /* @__PURE__ */
|
|
39451
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
39433
39452
|
value: value ?? "",
|
|
39434
39453
|
onChange: handleChange,
|
|
39435
39454
|
isDisabled: disabled,
|
|
@@ -39438,7 +39457,7 @@ var TextArea = (_ref) => {
|
|
|
39438
39457
|
onBlur,
|
|
39439
39458
|
onFocus
|
|
39440
39459
|
}, inputElement),
|
|
39441
|
-
renderDescription: () => /* @__PURE__ */
|
|
39460
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
39442
39461
|
});
|
|
39443
39462
|
};
|
|
39444
39463
|
var Input11 = (_ref2) => {
|
|
@@ -39458,7 +39477,7 @@ var Input11 = (_ref2) => {
|
|
|
39458
39477
|
var _ref$current;
|
|
39459
39478
|
(_ref$current = ref.current) == null || _ref$current.focus();
|
|
39460
39479
|
}, id);
|
|
39461
|
-
return /* @__PURE__ */
|
|
39480
|
+
return /* @__PURE__ */ React42__default.createElement(TextArea$1, {
|
|
39462
39481
|
ref,
|
|
39463
39482
|
id: inputId,
|
|
39464
39483
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -39489,10 +39508,10 @@ var TextInput = (_ref) => {
|
|
|
39489
39508
|
const inputElement = findChildOfType(children, TextInput.Input);
|
|
39490
39509
|
const descriptionElement = findChildOfType(children, TextInput.Description);
|
|
39491
39510
|
const errorElement = findChildOfType(children, TextInput.Error);
|
|
39492
|
-
return /* @__PURE__ */
|
|
39511
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
39493
39512
|
fieldId: id,
|
|
39494
39513
|
renderLabel: () => labelElement,
|
|
39495
|
-
renderInput: () => /* @__PURE__ */
|
|
39514
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
39496
39515
|
value: value ?? "",
|
|
39497
39516
|
onChange,
|
|
39498
39517
|
isDisabled: disabled,
|
|
@@ -39501,7 +39520,7 @@ var TextInput = (_ref) => {
|
|
|
39501
39520
|
onBlur,
|
|
39502
39521
|
onFocus
|
|
39503
39522
|
}, inputElement),
|
|
39504
|
-
renderDescription: () => /* @__PURE__ */
|
|
39523
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
39505
39524
|
});
|
|
39506
39525
|
};
|
|
39507
39526
|
var Input12 = (_ref2) => {
|
|
@@ -39521,7 +39540,7 @@ var Input12 = (_ref2) => {
|
|
|
39521
39540
|
var _inputRef$current;
|
|
39522
39541
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
39523
39542
|
}, id);
|
|
39524
|
-
return /* @__PURE__ */
|
|
39543
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
39525
39544
|
ref: inputRef,
|
|
39526
39545
|
id: inputId,
|
|
39527
39546
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -39565,10 +39584,10 @@ var TimeInput2 = (_ref) => {
|
|
|
39565
39584
|
const descriptionElement = findChildOfType(children, TimeInput2.Description);
|
|
39566
39585
|
const errorElement = findChildOfType(children, TimeInput2.Error);
|
|
39567
39586
|
const timeValue = stringToTimeValue2(value);
|
|
39568
|
-
return /* @__PURE__ */
|
|
39587
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
39569
39588
|
fieldId: id,
|
|
39570
39589
|
renderLabel: () => labelElement,
|
|
39571
|
-
renderInput: () => /* @__PURE__ */
|
|
39590
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TimeField, {
|
|
39572
39591
|
id: inputId,
|
|
39573
39592
|
"aria-describedby": ariaDescribedBy,
|
|
39574
39593
|
value: timeValue,
|
|
@@ -39580,7 +39599,7 @@ var TimeInput2 = (_ref) => {
|
|
|
39580
39599
|
onFocus,
|
|
39581
39600
|
hourCycle: use24HourFormat ? 24 : 12
|
|
39582
39601
|
}, timeElement),
|
|
39583
|
-
renderDescription: () => /* @__PURE__ */
|
|
39602
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
39584
39603
|
});
|
|
39585
39604
|
};
|
|
39586
39605
|
var Time2 = (_ref2) => {
|
|
@@ -39594,7 +39613,7 @@ var Time2 = (_ref2) => {
|
|
|
39594
39613
|
const hourElement = findChildOfType(children, Time2.Hour);
|
|
39595
39614
|
const minuteElement = findChildOfType(children, Time2.Minute);
|
|
39596
39615
|
const periodElement = findChildOfType(children, Time2.Period);
|
|
39597
|
-
return /* @__PURE__ */
|
|
39616
|
+
return /* @__PURE__ */ React42__default.createElement(DateInput$1, {
|
|
39598
39617
|
className,
|
|
39599
39618
|
"data-invalid": hasError
|
|
39600
39619
|
}, (segment) => {
|
|
@@ -39602,21 +39621,21 @@ var Time2 = (_ref2) => {
|
|
|
39602
39621
|
case "hour":
|
|
39603
39622
|
return applyInternalProps(hourElement, {
|
|
39604
39623
|
segment
|
|
39605
|
-
}) || /* @__PURE__ */
|
|
39624
|
+
}) || /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
39606
39625
|
case "minute":
|
|
39607
39626
|
return applyInternalProps(minuteElement, {
|
|
39608
39627
|
segment
|
|
39609
|
-
}) || /* @__PURE__ */
|
|
39628
|
+
}) || /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
39610
39629
|
case "dayPeriod":
|
|
39611
39630
|
return applyInternalProps(periodElement, {
|
|
39612
39631
|
segment
|
|
39613
|
-
}) || /* @__PURE__ */
|
|
39632
|
+
}) || /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
39614
39633
|
case "literal":
|
|
39615
|
-
return /* @__PURE__ */
|
|
39634
|
+
return /* @__PURE__ */ React42__default.createElement(DateSegment, {
|
|
39616
39635
|
segment
|
|
39617
39636
|
});
|
|
39618
39637
|
default:
|
|
39619
|
-
return /* @__PURE__ */
|
|
39638
|
+
return /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null);
|
|
39620
39639
|
}
|
|
39621
39640
|
});
|
|
39622
39641
|
};
|
|
@@ -39641,7 +39660,7 @@ var Hour2 = (_ref3) => {
|
|
|
39641
39660
|
(_ref$current = ref.current) == null || _ref$current.focus();
|
|
39642
39661
|
}, id);
|
|
39643
39662
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.hour");
|
|
39644
|
-
return /* @__PURE__ */
|
|
39663
|
+
return /* @__PURE__ */ React42__default.createElement(DateSegment, _extends({
|
|
39645
39664
|
ref,
|
|
39646
39665
|
segment,
|
|
39647
39666
|
className
|
|
@@ -39664,7 +39683,7 @@ var Minute2 = (_ref4) => {
|
|
|
39664
39683
|
t
|
|
39665
39684
|
} = useTranslation();
|
|
39666
39685
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.minute");
|
|
39667
|
-
return /* @__PURE__ */
|
|
39686
|
+
return /* @__PURE__ */ React42__default.createElement(DateSegment, _extends({
|
|
39668
39687
|
segment,
|
|
39669
39688
|
className
|
|
39670
39689
|
}, placeholder && {
|
|
@@ -39686,7 +39705,7 @@ var Period2 = (_ref5) => {
|
|
|
39686
39705
|
t
|
|
39687
39706
|
} = useTranslation();
|
|
39688
39707
|
const placeholder = hidePlaceholder ? void 0 : t("field.date.placeholder.period");
|
|
39689
|
-
return /* @__PURE__ */
|
|
39708
|
+
return /* @__PURE__ */ React42__default.createElement(DateSegment, _extends({
|
|
39690
39709
|
segment,
|
|
39691
39710
|
className
|
|
39692
39711
|
}, placeholder && {
|
|
@@ -39727,10 +39746,10 @@ var LoginBar = (_ref) => {
|
|
|
39727
39746
|
id,
|
|
39728
39747
|
FieldLayout
|
|
39729
39748
|
} = useFieldPropsV2();
|
|
39730
|
-
return /* @__PURE__ */
|
|
39749
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
39731
39750
|
fieldId: id,
|
|
39732
39751
|
renderLabel: () => null,
|
|
39733
|
-
renderInput: () => /* @__PURE__ */
|
|
39752
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, children),
|
|
39734
39753
|
renderDescription: () => null
|
|
39735
39754
|
});
|
|
39736
39755
|
};
|
|
@@ -39754,9 +39773,9 @@ var LoginBarInner = (_ref2) => {
|
|
|
39754
39773
|
buttonElement,
|
|
39755
39774
|
email
|
|
39756
39775
|
}) : labelElement;
|
|
39757
|
-
return /* @__PURE__ */
|
|
39776
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
39758
39777
|
className
|
|
39759
|
-
}, email ? /* @__PURE__ */
|
|
39778
|
+
}, email ? /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, labelElement, buttonElement) : labelWithButton);
|
|
39760
39779
|
};
|
|
39761
39780
|
var LoginBarText = (_ref3) => {
|
|
39762
39781
|
let {
|
|
@@ -39773,7 +39792,7 @@ var LoginBarText = (_ref3) => {
|
|
|
39773
39792
|
const labelText = email ? t("form.login-bar.title.logged-in-state", {
|
|
39774
39793
|
user: email
|
|
39775
39794
|
}) : t("form.login-bar.title.logged-out-state");
|
|
39776
|
-
return /* @__PURE__ */
|
|
39795
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
39777
39796
|
className
|
|
39778
39797
|
}, labelText, !email && buttonElement);
|
|
39779
39798
|
};
|
|
@@ -39792,7 +39811,7 @@ var LoginBarButton = (_ref4) => {
|
|
|
39792
39811
|
} = internal;
|
|
39793
39812
|
const buttonText = email ? t("form.login-bar.action.logout") : t("form.login-bar.actions.login");
|
|
39794
39813
|
const handleClick = () => email ? logout == null ? void 0 : logout() : login == null ? void 0 : login();
|
|
39795
|
-
return /* @__PURE__ */
|
|
39814
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
39796
39815
|
className,
|
|
39797
39816
|
onPress: handleClick
|
|
39798
39817
|
}, buttonText);
|
|
@@ -39806,23 +39825,23 @@ init_extends();
|
|
|
39806
39825
|
function ProgressCircle2(props) {
|
|
39807
39826
|
const strokeWidth = 4;
|
|
39808
39827
|
const radius = `calc(50% - ${strokeWidth / 2}px)`;
|
|
39809
|
-
return /* @__PURE__ */
|
|
39828
|
+
return /* @__PURE__ */ React42__default.createElement(ProgressBar, _extends({}, props, {
|
|
39810
39829
|
isIndeterminate: true
|
|
39811
39830
|
}), (_ref) => {
|
|
39812
39831
|
let {
|
|
39813
39832
|
percentage,
|
|
39814
39833
|
isIndeterminate
|
|
39815
39834
|
} = _ref;
|
|
39816
|
-
return /* @__PURE__ */
|
|
39835
|
+
return /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, /* @__PURE__ */ React42__default.createElement("svg", {
|
|
39817
39836
|
fill: "none",
|
|
39818
39837
|
width: "100%",
|
|
39819
39838
|
height: "100%",
|
|
39820
39839
|
viewBox: "0 0 32 32"
|
|
39821
|
-
}, /* @__PURE__ */
|
|
39840
|
+
}, /* @__PURE__ */ React42__default.createElement("circle", {
|
|
39822
39841
|
cx: "50%",
|
|
39823
39842
|
cy: "50%",
|
|
39824
39843
|
r: radius
|
|
39825
|
-
}), /* @__PURE__ */
|
|
39844
|
+
}), /* @__PURE__ */ React42__default.createElement("circle", {
|
|
39826
39845
|
cx: "50%",
|
|
39827
39846
|
cy: "50%",
|
|
39828
39847
|
r: radius,
|
|
@@ -39830,7 +39849,7 @@ function ProgressCircle2(props) {
|
|
|
39830
39849
|
strokeDasharray: "100 200",
|
|
39831
39850
|
strokeDashoffset: 100 - (isIndeterminate || percentage == null ? 25 : percentage),
|
|
39832
39851
|
strokeLinecap: "round"
|
|
39833
|
-
}, isIndeterminate && /* @__PURE__ */
|
|
39852
|
+
}, isIndeterminate && /* @__PURE__ */ React42__default.createElement("animateTransform", {
|
|
39834
39853
|
attributeName: "transform",
|
|
39835
39854
|
type: "rotate",
|
|
39836
39855
|
dur: "0.75s",
|
|
@@ -39850,10 +39869,10 @@ var SubmitButton = (_ref) => {
|
|
|
39850
39869
|
FieldLayout
|
|
39851
39870
|
} = useFieldPropsV2();
|
|
39852
39871
|
const buttonsContainerElement = findChildOfType(children, SubmitButton.SubmitButton);
|
|
39853
|
-
return /* @__PURE__ */
|
|
39872
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
39854
39873
|
fieldId: id,
|
|
39855
39874
|
renderLabel: () => null,
|
|
39856
|
-
renderInput: () => /* @__PURE__ */
|
|
39875
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, buttonsContainerElement),
|
|
39857
39876
|
renderDescription: () => null
|
|
39858
39877
|
});
|
|
39859
39878
|
};
|
|
@@ -39865,7 +39884,7 @@ var ButtonsContainer = (_ref2) => {
|
|
|
39865
39884
|
const previousButtonElement = findChildOfType(children, PreviousButton);
|
|
39866
39885
|
const nextButtonElement = findChildOfType(children, NextButton);
|
|
39867
39886
|
const submitButtonElement = findChildOfType(children, SubmitButtonComponent);
|
|
39868
|
-
return /* @__PURE__ */
|
|
39887
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
39869
39888
|
className
|
|
39870
39889
|
}, previousButtonElement, nextButtonElement, submitButtonElement);
|
|
39871
39890
|
};
|
|
@@ -39881,7 +39900,7 @@ var PreviousButton = (_ref3) => {
|
|
|
39881
39900
|
if (!showPreviousButton) {
|
|
39882
39901
|
return null;
|
|
39883
39902
|
}
|
|
39884
|
-
return /* @__PURE__ */
|
|
39903
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
39885
39904
|
className,
|
|
39886
39905
|
onPress: onPreviousClick
|
|
39887
39906
|
}, previousText);
|
|
@@ -39898,7 +39917,7 @@ var NextButton = (_ref4) => {
|
|
|
39898
39917
|
if (!showNextButton) {
|
|
39899
39918
|
return null;
|
|
39900
39919
|
}
|
|
39901
|
-
return /* @__PURE__ */
|
|
39920
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
39902
39921
|
className,
|
|
39903
39922
|
onPress: onNextClick
|
|
39904
39923
|
}, nextText);
|
|
@@ -39919,7 +39938,7 @@ var SubmitButtonComponent = (_ref5) => {
|
|
|
39919
39938
|
return null;
|
|
39920
39939
|
}
|
|
39921
39940
|
const loaderElement = findChildOfType(children, SubmitButtonComponent.Loader);
|
|
39922
|
-
return /* @__PURE__ */
|
|
39941
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
39923
39942
|
className,
|
|
39924
39943
|
onPress: onSubmitClick,
|
|
39925
39944
|
isDisabled: isDisabled || isInProgress,
|
|
@@ -39930,9 +39949,9 @@ var Loader = (_ref6) => {
|
|
|
39930
39949
|
let {
|
|
39931
39950
|
className
|
|
39932
39951
|
} = _ref6;
|
|
39933
|
-
return /* @__PURE__ */
|
|
39952
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
39934
39953
|
className
|
|
39935
|
-
}, /* @__PURE__ */
|
|
39954
|
+
}, /* @__PURE__ */ React42__default.createElement(ProgressCircle2, null));
|
|
39936
39955
|
};
|
|
39937
39956
|
SubmitButtonComponent.Loader = Loader;
|
|
39938
39957
|
ButtonsContainer.PreviousButton = PreviousButton;
|
|
@@ -39962,7 +39981,7 @@ var FixedPayment = (_ref) => {
|
|
|
39962
39981
|
const amountElement = findChildOfType(children, FixedPayment.Amount);
|
|
39963
39982
|
const descriptionElement = findChildOfType(children, FixedPayment.Description);
|
|
39964
39983
|
const errorElement = findChildOfType(children, FixedPayment.Error);
|
|
39965
|
-
return /* @__PURE__ */
|
|
39984
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
39966
39985
|
fieldId: id,
|
|
39967
39986
|
renderLabel: () => labelElement,
|
|
39968
39987
|
renderInput: () => applyInternalProps(amountElement, {
|
|
@@ -39970,7 +39989,7 @@ var FixedPayment = (_ref) => {
|
|
|
39970
39989
|
currencyCode: currency == null ? void 0 : currency.code,
|
|
39971
39990
|
locale: regionalFormat
|
|
39972
39991
|
}),
|
|
39973
|
-
renderDescription: () => /* @__PURE__ */
|
|
39992
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
39974
39993
|
});
|
|
39975
39994
|
};
|
|
39976
39995
|
var Amount = (_ref2) => {
|
|
@@ -39992,7 +40011,7 @@ var Amount = (_ref2) => {
|
|
|
39992
40011
|
currency: currencyCode,
|
|
39993
40012
|
locale
|
|
39994
40013
|
});
|
|
39995
|
-
return /* @__PURE__ */
|
|
40014
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
39996
40015
|
id: inputId,
|
|
39997
40016
|
"aria-describedby": ariaDescribedBy,
|
|
39998
40017
|
className,
|
|
@@ -40003,7 +40022,7 @@ var FixedPaymentLabel = (_ref3) => {
|
|
|
40003
40022
|
let {
|
|
40004
40023
|
className
|
|
40005
40024
|
} = _ref3;
|
|
40006
|
-
return /* @__PURE__ */
|
|
40025
|
+
return /* @__PURE__ */ React42__default.createElement(Label, {
|
|
40007
40026
|
className
|
|
40008
40027
|
}, null);
|
|
40009
40028
|
};
|
|
@@ -40088,10 +40107,10 @@ var ProductList = (_ref) => {
|
|
|
40088
40107
|
const newProductValues = isChecked ? [...restProductValues, productValue] : restProductValues;
|
|
40089
40108
|
onChange == null || onChange(newProductValues);
|
|
40090
40109
|
}, [_value, onChange]);
|
|
40091
|
-
return /* @__PURE__ */
|
|
40110
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
40092
40111
|
fieldId: id,
|
|
40093
40112
|
renderLabel: () => labelElement,
|
|
40094
|
-
renderInput: () => /* @__PURE__ */
|
|
40113
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(FieldsetHeadless, {
|
|
40095
40114
|
id: inputId,
|
|
40096
40115
|
ariaLabelledBy: labelId,
|
|
40097
40116
|
ariaDescribedBy,
|
|
@@ -40105,7 +40124,7 @@ var ProductList = (_ref) => {
|
|
|
40105
40124
|
disabled,
|
|
40106
40125
|
hasError
|
|
40107
40126
|
}) : null),
|
|
40108
|
-
renderDescription: () => /* @__PURE__ */
|
|
40127
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, errorElement, descriptionElement)
|
|
40109
40128
|
});
|
|
40110
40129
|
};
|
|
40111
40130
|
var Options10 = (_ref2) => {
|
|
@@ -40141,7 +40160,7 @@ var Options10 = (_ref2) => {
|
|
|
40141
40160
|
preventScroll: true
|
|
40142
40161
|
});
|
|
40143
40162
|
}, id);
|
|
40144
|
-
return /* @__PURE__ */
|
|
40163
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
40145
40164
|
className
|
|
40146
40165
|
}, options == null ? void 0 : options.map((option, index) => {
|
|
40147
40166
|
var _validation$predefine2;
|
|
@@ -40205,7 +40224,7 @@ var ProductOption = (_ref3) => {
|
|
|
40205
40224
|
}, [onProductChange, option.value, price]);
|
|
40206
40225
|
const ariaLabel = `${option.label} ${currencyAriaLabel} ${price}`;
|
|
40207
40226
|
if (allowMany) {
|
|
40208
|
-
return /* @__PURE__ */
|
|
40227
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
40209
40228
|
className,
|
|
40210
40229
|
"data-hook": "product"
|
|
40211
40230
|
}, imageElement ? applyInternalProps(imageElement, {
|
|
@@ -40223,7 +40242,7 @@ var ProductOption = (_ref3) => {
|
|
|
40223
40242
|
ariaLabel
|
|
40224
40243
|
}) : null);
|
|
40225
40244
|
}
|
|
40226
|
-
return /* @__PURE__ */
|
|
40245
|
+
return /* @__PURE__ */ React42__default.createElement(Checkbox$1, {
|
|
40227
40246
|
ref: checkboxRef,
|
|
40228
40247
|
isSelected,
|
|
40229
40248
|
onChange: handleCheckboxChange,
|
|
@@ -40258,7 +40277,7 @@ var OptionImage = (_ref4) => {
|
|
|
40258
40277
|
return null;
|
|
40259
40278
|
}
|
|
40260
40279
|
const imageAlt = option.media.image.altText || option.label || "";
|
|
40261
|
-
return /* @__PURE__ */
|
|
40280
|
+
return /* @__PURE__ */ React42__default.createElement("img", {
|
|
40262
40281
|
className,
|
|
40263
40282
|
src: imageURL,
|
|
40264
40283
|
alt: imageAlt,
|
|
@@ -40273,7 +40292,7 @@ var OptionLabel4 = (_ref5) => {
|
|
|
40273
40292
|
const {
|
|
40274
40293
|
label
|
|
40275
40294
|
} = internal;
|
|
40276
|
-
return /* @__PURE__ */
|
|
40295
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
40277
40296
|
className,
|
|
40278
40297
|
"data-hook": "product-label"
|
|
40279
40298
|
}, label || "");
|
|
@@ -40295,7 +40314,7 @@ var OptionPrice = (_ref6) => {
|
|
|
40295
40314
|
currency: currency == null ? void 0 : currency.code,
|
|
40296
40315
|
locale: regionalFormat
|
|
40297
40316
|
});
|
|
40298
|
-
return /* @__PURE__ */
|
|
40317
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
40299
40318
|
className,
|
|
40300
40319
|
"data-hook": "product-price"
|
|
40301
40320
|
}, formattedPrice);
|
|
@@ -40304,7 +40323,7 @@ var OptionInput3 = (_ref7) => {
|
|
|
40304
40323
|
let {
|
|
40305
40324
|
className
|
|
40306
40325
|
} = _ref7;
|
|
40307
|
-
return /* @__PURE__ */
|
|
40326
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
40308
40327
|
"aria-hidden": "true",
|
|
40309
40328
|
className
|
|
40310
40329
|
});
|
|
@@ -40330,7 +40349,7 @@ var OptionQuantity = (_ref8) => {
|
|
|
40330
40349
|
handleChange(0);
|
|
40331
40350
|
}
|
|
40332
40351
|
}, [handleChange]);
|
|
40333
|
-
return /* @__PURE__ */
|
|
40352
|
+
return /* @__PURE__ */ React42__default.createElement(NumberField, {
|
|
40334
40353
|
value: quantity,
|
|
40335
40354
|
onChange: handleChange,
|
|
40336
40355
|
minValue: 0,
|
|
@@ -40340,11 +40359,11 @@ var OptionQuantity = (_ref8) => {
|
|
|
40340
40359
|
"aria-label": ariaLabel,
|
|
40341
40360
|
className,
|
|
40342
40361
|
"data-hook": "product-quantity"
|
|
40343
|
-
}, /* @__PURE__ */
|
|
40362
|
+
}, /* @__PURE__ */ React42__default.createElement(Group, {
|
|
40344
40363
|
onKeyDown
|
|
40345
|
-
}, /* @__PURE__ */
|
|
40364
|
+
}, /* @__PURE__ */ React42__default.createElement(Button, {
|
|
40346
40365
|
slot: "decrement"
|
|
40347
|
-
}, "-"), /* @__PURE__ */
|
|
40366
|
+
}, "-"), /* @__PURE__ */ React42__default.createElement(Input$1, null), /* @__PURE__ */ React42__default.createElement(Button, {
|
|
40348
40367
|
slot: "increment"
|
|
40349
40368
|
}, "+")));
|
|
40350
40369
|
};
|
|
@@ -40430,10 +40449,10 @@ var Donation = (_ref) => {
|
|
|
40430
40449
|
const controlElement = findChildOfType(children, Donation.Control);
|
|
40431
40450
|
const descriptionElement = findChildOfType(children, Donation.Description);
|
|
40432
40451
|
const errorElement = findChildOfType(children, Donation.Error);
|
|
40433
|
-
return /* @__PURE__ */
|
|
40452
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
40434
40453
|
fieldId: id,
|
|
40435
40454
|
renderLabel: () => labelElement,
|
|
40436
|
-
renderInput: () => /* @__PURE__ */
|
|
40455
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(RadioGroup$1, {
|
|
40437
40456
|
value: selectedValue,
|
|
40438
40457
|
onChange: handleRadioChange,
|
|
40439
40458
|
isDisabled: disabled,
|
|
@@ -40452,7 +40471,7 @@ var Donation = (_ref) => {
|
|
|
40452
40471
|
customAmountProductId: customAmountProduct == null ? void 0 : customAmountProduct.id,
|
|
40453
40472
|
onFocusCustomInput: handleFocusCustomInput
|
|
40454
40473
|
}) : null),
|
|
40455
|
-
renderDescription: () => /* @__PURE__ */
|
|
40474
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
40456
40475
|
});
|
|
40457
40476
|
};
|
|
40458
40477
|
var Control5 = (_ref2) => {
|
|
@@ -40477,7 +40496,7 @@ var Control5 = (_ref2) => {
|
|
|
40477
40496
|
} = useFieldPropsV2();
|
|
40478
40497
|
const optionsElement = findChildOfType(children, Donation.Options);
|
|
40479
40498
|
const otherInputElement = findChildOfType(children, Donation.OtherInput);
|
|
40480
|
-
return /* @__PURE__ */
|
|
40499
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
40481
40500
|
className,
|
|
40482
40501
|
"data-invalid": hasError
|
|
40483
40502
|
}, optionsElement ? applyInternalProps(optionsElement, {
|
|
@@ -40511,7 +40530,7 @@ var Options11 = (_ref3) => {
|
|
|
40511
40530
|
options
|
|
40512
40531
|
} = useFieldPropsV2();
|
|
40513
40532
|
const optionElement = findChildOfType(children, Options11.Option);
|
|
40514
|
-
return /* @__PURE__ */
|
|
40533
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
40515
40534
|
className
|
|
40516
40535
|
}, options.map((option) => {
|
|
40517
40536
|
var _product$fixedPriceOp;
|
|
@@ -40522,7 +40541,7 @@ var Options11 = (_ref3) => {
|
|
|
40522
40541
|
value: option.value,
|
|
40523
40542
|
price: price || "0"
|
|
40524
40543
|
});
|
|
40525
|
-
}), addOther && customAmountProductId && /* @__PURE__ */
|
|
40544
|
+
}), addOther && customAmountProductId && /* @__PURE__ */ React42__default.createElement(Radio, {
|
|
40526
40545
|
value: customAmountProductId,
|
|
40527
40546
|
style: {
|
|
40528
40547
|
position: "absolute",
|
|
@@ -40558,11 +40577,11 @@ var Option11 = (_ref4) => {
|
|
|
40558
40577
|
var _ref$current;
|
|
40559
40578
|
(_ref$current = ref.current) == null || (_ref$current = _ref$current.querySelector("input")) == null || _ref$current.focus();
|
|
40560
40579
|
}, id);
|
|
40561
|
-
return /* @__PURE__ */
|
|
40580
|
+
return /* @__PURE__ */ React42__default.createElement(Radio, {
|
|
40562
40581
|
value,
|
|
40563
40582
|
className,
|
|
40564
40583
|
ref
|
|
40565
|
-
}, /* @__PURE__ */
|
|
40584
|
+
}, /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, valueElement ? applyInternalProps(valueElement, {
|
|
40566
40585
|
price
|
|
40567
40586
|
}) : null, currencyElement));
|
|
40568
40587
|
};
|
|
@@ -40581,7 +40600,7 @@ var OptionValue = (_ref5) => {
|
|
|
40581
40600
|
amount: price,
|
|
40582
40601
|
locale: regionalFormat
|
|
40583
40602
|
});
|
|
40584
|
-
return /* @__PURE__ */
|
|
40603
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
40585
40604
|
className
|
|
40586
40605
|
}, formattedPrice);
|
|
40587
40606
|
};
|
|
@@ -40592,7 +40611,7 @@ var OptionCurrency = (_ref6) => {
|
|
|
40592
40611
|
const {
|
|
40593
40612
|
currency
|
|
40594
40613
|
} = useConfig();
|
|
40595
|
-
return /* @__PURE__ */
|
|
40614
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
40596
40615
|
className
|
|
40597
40616
|
}, (currency == null ? void 0 : currency.sign) || (currency == null ? void 0 : currency.code) || "");
|
|
40598
40617
|
};
|
|
@@ -40631,7 +40650,7 @@ var OtherInput3 = (_ref7) => {
|
|
|
40631
40650
|
onFocusCustomInput();
|
|
40632
40651
|
}, [onFocusCustomInput]);
|
|
40633
40652
|
const hasValue = customAmount && customAmount.trim() !== "";
|
|
40634
|
-
return /* @__PURE__ */
|
|
40653
|
+
return /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
40635
40654
|
value: customAmount,
|
|
40636
40655
|
onChange: handleChange,
|
|
40637
40656
|
onFocus: handleFocus,
|
|
@@ -40659,7 +40678,7 @@ var OtherInputCurrency = (_ref8) => {
|
|
|
40659
40678
|
const {
|
|
40660
40679
|
prefixId
|
|
40661
40680
|
} = useFieldAttributes2();
|
|
40662
|
-
return /* @__PURE__ */
|
|
40681
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
40663
40682
|
id: prefixId,
|
|
40664
40683
|
"aria-hidden": false,
|
|
40665
40684
|
"aria-label": getCurrencyAriaLabel(t, currency),
|
|
@@ -40680,7 +40699,7 @@ var OtherInputValue = (_ref9) => {
|
|
|
40680
40699
|
labelId,
|
|
40681
40700
|
prefixId
|
|
40682
40701
|
} = useFieldAttributes2();
|
|
40683
|
-
return /* @__PURE__ */
|
|
40702
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
40684
40703
|
id: customAmountProductId,
|
|
40685
40704
|
"aria-labelledby": `${labelId} ${prefixId}`,
|
|
40686
40705
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -40740,10 +40759,10 @@ var PaymentInput = (_ref) => {
|
|
|
40740
40759
|
const inputElement = findChildOfType(children, PaymentInput.Input);
|
|
40741
40760
|
const descriptionElement = findChildOfType(children, PaymentInput.Description);
|
|
40742
40761
|
const errorElement = findChildOfType(children, PaymentInput.Error);
|
|
40743
|
-
return /* @__PURE__ */
|
|
40762
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
40744
40763
|
fieldId: id,
|
|
40745
40764
|
renderLabel: () => labelElement,
|
|
40746
|
-
renderInput: () => /* @__PURE__ */
|
|
40765
|
+
renderInput: () => /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
40747
40766
|
value: value ? paymentValue : "",
|
|
40748
40767
|
onChange: handleOnChange,
|
|
40749
40768
|
isDisabled: disabled,
|
|
@@ -40752,7 +40771,7 @@ var PaymentInput = (_ref) => {
|
|
|
40752
40771
|
onBlur: handleOnBlur,
|
|
40753
40772
|
onFocus
|
|
40754
40773
|
}, inputElement),
|
|
40755
|
-
renderDescription: () => /* @__PURE__ */
|
|
40774
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, descriptionElement, errorElement)
|
|
40756
40775
|
});
|
|
40757
40776
|
};
|
|
40758
40777
|
var Input13 = (_ref2) => {
|
|
@@ -40766,7 +40785,7 @@ var Input13 = (_ref2) => {
|
|
|
40766
40785
|
} = useFieldAttributes2();
|
|
40767
40786
|
const currencyElement = findChildOfType(children, Input13.Currency);
|
|
40768
40787
|
const valueElement = findChildOfType(children, Input13.Value);
|
|
40769
|
-
return /* @__PURE__ */
|
|
40788
|
+
return /* @__PURE__ */ React42__default.createElement(Group, {
|
|
40770
40789
|
id: inputId,
|
|
40771
40790
|
"aria-describedby": ariaDescribedBy,
|
|
40772
40791
|
className
|
|
@@ -40788,7 +40807,7 @@ var Currency = (_ref3) => {
|
|
|
40788
40807
|
if (!currency) {
|
|
40789
40808
|
return null;
|
|
40790
40809
|
}
|
|
40791
|
-
return /* @__PURE__ */
|
|
40810
|
+
return /* @__PURE__ */ React42__default.createElement("span", {
|
|
40792
40811
|
id: prefixId,
|
|
40793
40812
|
"aria-hidden": false,
|
|
40794
40813
|
"aria-label": getCurrencyAriaLabel(t, currency),
|
|
@@ -40813,7 +40832,7 @@ var Value = (_ref4) => {
|
|
|
40813
40832
|
var _inputRef$current;
|
|
40814
40833
|
(_inputRef$current = inputRef.current) == null || _inputRef$current.focus();
|
|
40815
40834
|
}, id);
|
|
40816
|
-
return /* @__PURE__ */
|
|
40835
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
40817
40836
|
ref: inputRef,
|
|
40818
40837
|
className,
|
|
40819
40838
|
placeholder,
|
|
@@ -42133,11 +42152,11 @@ var Signature = (_ref) => {
|
|
|
42133
42152
|
const inputElement = findChildOfType(children, Signature.Input);
|
|
42134
42153
|
const descriptionElement = findChildOfType(children, Signature.Description);
|
|
42135
42154
|
const errorElement = findChildOfType(children, Signature.Error);
|
|
42136
|
-
return /* @__PURE__ */
|
|
42155
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
42137
42156
|
fieldId: id,
|
|
42138
42157
|
renderLabel: () => labelElement,
|
|
42139
42158
|
renderInput: () => inputElement,
|
|
42140
|
-
renderDescription: () => /* @__PURE__ */
|
|
42159
|
+
renderDescription: () => /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, errorElement, descriptionElement)
|
|
42141
42160
|
});
|
|
42142
42161
|
};
|
|
42143
42162
|
var Input14 = (_ref2) => {
|
|
@@ -42165,7 +42184,7 @@ var Input14 = (_ref2) => {
|
|
|
42165
42184
|
});
|
|
42166
42185
|
const headerElement = findChildOfType(children, Input14.Header);
|
|
42167
42186
|
const valueElement = findChildOfType(children, Input14.Value);
|
|
42168
|
-
return /* @__PURE__ */
|
|
42187
|
+
return /* @__PURE__ */ React42__default.createElement(React42__default.Fragment, null, applyInternalProps(headerElement, {
|
|
42169
42188
|
signatureMode,
|
|
42170
42189
|
setSignatureMode,
|
|
42171
42190
|
handleClear,
|
|
@@ -42217,9 +42236,9 @@ var Header = (_ref3) => {
|
|
|
42217
42236
|
return "";
|
|
42218
42237
|
}
|
|
42219
42238
|
}, [signatureMode, t]);
|
|
42220
|
-
return /* @__PURE__ */
|
|
42239
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
42221
42240
|
className
|
|
42222
|
-
}, /* @__PURE__ */
|
|
42241
|
+
}, /* @__PURE__ */ React42__default.createElement("div", {
|
|
42223
42242
|
role: "status",
|
|
42224
42243
|
"aria-live": "polite",
|
|
42225
42244
|
style: {
|
|
@@ -42262,7 +42281,7 @@ var Tabs = (_ref4) => {
|
|
|
42262
42281
|
return allModes;
|
|
42263
42282
|
}, [uploadEnabled]);
|
|
42264
42283
|
const tabElement = findChildOfType(children, Tabs.Tab);
|
|
42265
|
-
return /* @__PURE__ */
|
|
42284
|
+
return /* @__PURE__ */ React42__default.createElement(RadioGroup$1, {
|
|
42266
42285
|
value: signatureMode,
|
|
42267
42286
|
onChange: handleChange,
|
|
42268
42287
|
"aria-labelledby": labelId,
|
|
@@ -42297,7 +42316,7 @@ var Tab = (_ref5) => {
|
|
|
42297
42316
|
return "";
|
|
42298
42317
|
}
|
|
42299
42318
|
}, [mode, t]);
|
|
42300
|
-
return /* @__PURE__ */
|
|
42319
|
+
return /* @__PURE__ */ React42__default.createElement(Radio, {
|
|
42301
42320
|
value: mode,
|
|
42302
42321
|
"aria-label": ariaLabel,
|
|
42303
42322
|
className
|
|
@@ -42328,7 +42347,7 @@ var TabIcon = (_ref6) => {
|
|
|
42328
42347
|
if (!IconComponent) {
|
|
42329
42348
|
return null;
|
|
42330
42349
|
}
|
|
42331
|
-
return /* @__PURE__ */
|
|
42350
|
+
return /* @__PURE__ */ React42__default.createElement(IconComponent, {
|
|
42332
42351
|
className,
|
|
42333
42352
|
size: "24",
|
|
42334
42353
|
"aria-hidden": "true"
|
|
@@ -42348,12 +42367,12 @@ var Clear = (_ref7) => {
|
|
|
42348
42367
|
const {
|
|
42349
42368
|
inputId
|
|
42350
42369
|
} = useFieldAttributes2();
|
|
42351
|
-
return /* @__PURE__ */
|
|
42370
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
42352
42371
|
onPress: handleClear,
|
|
42353
42372
|
"aria-label": t("field.signature.clear-button.label"),
|
|
42354
42373
|
"aria-controls": inputId,
|
|
42355
42374
|
className
|
|
42356
|
-
}, /* @__PURE__ */
|
|
42375
|
+
}, /* @__PURE__ */ React42__default.createElement(Delete_default, {
|
|
42357
42376
|
size: "24",
|
|
42358
42377
|
"aria-hidden": "true"
|
|
42359
42378
|
}));
|
|
@@ -42382,7 +42401,7 @@ var Value2 = (_ref8) => {
|
|
|
42382
42401
|
const canvasElement = findChildOfType(children, Value2.Canvas);
|
|
42383
42402
|
const typeElement = findChildOfType(children, Value2.Type);
|
|
42384
42403
|
const uploadElement = findChildOfType(children, Value2.Upload);
|
|
42385
|
-
return /* @__PURE__ */
|
|
42404
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
42386
42405
|
className,
|
|
42387
42406
|
role: "region",
|
|
42388
42407
|
"aria-label": t("field.signature.input-area") || "Signature input area",
|
|
@@ -42510,9 +42529,9 @@ var Canvas = (_ref9) => {
|
|
|
42510
42529
|
pad.current.on();
|
|
42511
42530
|
}
|
|
42512
42531
|
}, [readOnly]);
|
|
42513
|
-
return /* @__PURE__ */
|
|
42532
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
42514
42533
|
className
|
|
42515
|
-
}, /* @__PURE__ */
|
|
42534
|
+
}, /* @__PURE__ */ React42__default.createElement("canvas", {
|
|
42516
42535
|
ref: mountCanvas,
|
|
42517
42536
|
id: inputId,
|
|
42518
42537
|
"data-input-id": inputId,
|
|
@@ -42583,7 +42602,7 @@ var Type6 = (_ref0) => {
|
|
|
42583
42602
|
}
|
|
42584
42603
|
}, [onBeforeChange, onChange]);
|
|
42585
42604
|
const valueElement = findChildOfType(children, Type6.Value);
|
|
42586
|
-
return /* @__PURE__ */
|
|
42605
|
+
return /* @__PURE__ */ React42__default.createElement(TextField, {
|
|
42587
42606
|
value: signatureText,
|
|
42588
42607
|
onChange: handleChange,
|
|
42589
42608
|
isReadOnly: readOnly,
|
|
@@ -42607,7 +42626,7 @@ var TypeValue = (_ref1) => {
|
|
|
42607
42626
|
const {
|
|
42608
42627
|
label
|
|
42609
42628
|
} = useFieldPropsV2();
|
|
42610
|
-
return /* @__PURE__ */
|
|
42629
|
+
return /* @__PURE__ */ React42__default.createElement(Input$1, {
|
|
42611
42630
|
id: inputId,
|
|
42612
42631
|
"aria-describedby": ariaDescribedBy,
|
|
42613
42632
|
"aria-label": label,
|
|
@@ -42645,9 +42664,9 @@ var Upload = (_ref10) => {
|
|
|
42645
42664
|
const {
|
|
42646
42665
|
t
|
|
42647
42666
|
} = useTranslation();
|
|
42648
|
-
return /* @__PURE__ */
|
|
42667
|
+
return /* @__PURE__ */ React42__default.createElement("div", {
|
|
42649
42668
|
className
|
|
42650
|
-
}, /* @__PURE__ */
|
|
42669
|
+
}, /* @__PURE__ */ React42__default.createElement("input", {
|
|
42651
42670
|
ref: fileInputRef,
|
|
42652
42671
|
type: "file",
|
|
42653
42672
|
accept: "image/*",
|
|
@@ -42660,7 +42679,7 @@ var Upload = (_ref10) => {
|
|
|
42660
42679
|
}), !hasUploadedImage && applyInternalProps(buttonElement, {
|
|
42661
42680
|
fileInputRef,
|
|
42662
42681
|
readOnly
|
|
42663
|
-
}), hasUploadedImage && value.url && /* @__PURE__ */
|
|
42682
|
+
}), hasUploadedImage && value.url && /* @__PURE__ */ React42__default.createElement("img", {
|
|
42664
42683
|
src: value.url,
|
|
42665
42684
|
alt: t("field.signature.uploaded-image.alt") || "Uploaded signature image",
|
|
42666
42685
|
style: {
|
|
@@ -42690,7 +42709,7 @@ var UploadButton = (_ref11) => {
|
|
|
42690
42709
|
var _fileInputRef$current;
|
|
42691
42710
|
(_fileInputRef$current = fileInputRef.current) == null || _fileInputRef$current.click();
|
|
42692
42711
|
}, [fileInputRef]);
|
|
42693
|
-
return /* @__PURE__ */
|
|
42712
|
+
return /* @__PURE__ */ React42__default.createElement(Button, {
|
|
42694
42713
|
id: inputId,
|
|
42695
42714
|
onPress: handlePress,
|
|
42696
42715
|
isDisabled: readOnly,
|
|
@@ -42724,14 +42743,14 @@ var RichText = (_ref) => {
|
|
|
42724
42743
|
content
|
|
42725
42744
|
} = useFieldPropsV2();
|
|
42726
42745
|
const {
|
|
42727
|
-
|
|
42746
|
+
language
|
|
42728
42747
|
} = useConfig();
|
|
42729
|
-
return /* @__PURE__ */
|
|
42748
|
+
return /* @__PURE__ */ React42__default.createElement(FieldLayout, {
|
|
42730
42749
|
fieldId: id,
|
|
42731
42750
|
renderLabel: () => null,
|
|
42732
42751
|
renderInput: () => children({
|
|
42733
42752
|
content,
|
|
42734
|
-
locale
|
|
42753
|
+
locale: language
|
|
42735
42754
|
}),
|
|
42736
42755
|
renderDescription: () => null
|
|
42737
42756
|
});
|