@wix/form-public 0.99.0 → 0.101.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 +41 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +41 -30
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -21497,6 +21497,7 @@ var require_messages_en = __commonJS({
|
|
|
21497
21497
|
"field.mla-apartment.label": "Apartment",
|
|
21498
21498
|
"text-area.input.error.message.required-error": "Enter an answer.",
|
|
21499
21499
|
"field.phone.country-search-input.placeholder": "Search",
|
|
21500
|
+
"submission-table.appointment.meeting-tool-tip": "Go to Scheduled Meetings",
|
|
21500
21501
|
"search.keyword.layout-elements.header": "header, page header, top bar",
|
|
21501
21502
|
"search.keyword.ecom.additional-info": "additional info, notes, instructions",
|
|
21502
21503
|
"donation.other-option.placeholder": "Enter an amount",
|
|
@@ -21533,7 +21534,6 @@ var require_messages_en = __commonJS({
|
|
|
21533
21534
|
"search.keyword.quiz.multi-choice": "quiz multiple choice, multi select",
|
|
21534
21535
|
"search.keyword.address.address-line-2": "address line 2, apt, suite, unit",
|
|
21535
21536
|
"bookings-last-name.input.error.message.required-error": "Enter a last name.",
|
|
21536
|
-
"actions.rules.button.label_DELETE_THIS": "Rules",
|
|
21537
21537
|
"search.keyword.transaction.product": "product, item, sku, purchase",
|
|
21538
21538
|
"appointment.input.error.message.required-error": "This field is required.",
|
|
21539
21539
|
"field-context-menu.make-required": "Make required",
|
|
@@ -37067,10 +37067,6 @@ var PhoneInput = (_ref2) => {
|
|
|
37067
37067
|
id,
|
|
37068
37068
|
value,
|
|
37069
37069
|
onChange,
|
|
37070
|
-
disabled,
|
|
37071
|
-
required,
|
|
37072
|
-
onBlur,
|
|
37073
|
-
onFocus,
|
|
37074
37070
|
FieldLayout,
|
|
37075
37071
|
defaultCountry,
|
|
37076
37072
|
validation
|
|
@@ -37091,9 +37087,7 @@ var PhoneInput = (_ref2) => {
|
|
|
37091
37087
|
onChange
|
|
37092
37088
|
});
|
|
37093
37089
|
const labelElement = findChildOfType(children, PhoneInput.Label);
|
|
37094
|
-
const
|
|
37095
|
-
const countryOptionsElement = findChildOfType(children, PhoneInput.CountryOptions);
|
|
37096
|
-
const phoneNumberElement = findChildOfType(children, PhoneInput.PhoneNumber);
|
|
37090
|
+
const controlElement = findChildOfType(children, PhoneInput.Control);
|
|
37097
37091
|
const descriptionElement = findChildOfType(children, PhoneInput.Description);
|
|
37098
37092
|
const errorElement = findChildOfType(children, PhoneInput.Error);
|
|
37099
37093
|
const contextValue = {
|
|
@@ -37109,19 +37103,7 @@ var PhoneInput = (_ref2) => {
|
|
|
37109
37103
|
}, /* @__PURE__ */ React40__namespace.default.createElement(FieldLayout, {
|
|
37110
37104
|
fieldId: id,
|
|
37111
37105
|
renderLabel: () => labelElement,
|
|
37112
|
-
renderInput: () =>
|
|
37113
|
-
style: {
|
|
37114
|
-
display: "flex",
|
|
37115
|
-
gap: "8px"
|
|
37116
|
-
}
|
|
37117
|
-
}, /* @__PURE__ */ React40__namespace.default.createElement(reactAriaComponents.Select, {
|
|
37118
|
-
value: selectedCountryCode ?? null,
|
|
37119
|
-
onChange: (key) => handleCountryCodeChange(key),
|
|
37120
|
-
isDisabled: disabled,
|
|
37121
|
-
isRequired: required,
|
|
37122
|
-
onBlur,
|
|
37123
|
-
onFocus
|
|
37124
|
-
}, countryButtonElement, countryOptionsElement), phoneNumberElement),
|
|
37106
|
+
renderInput: () => controlElement,
|
|
37125
37107
|
renderDescription: () => /* @__PURE__ */ React40__namespace.default.createElement(React40__namespace.default.Fragment, null, descriptionElement, errorElement)
|
|
37126
37108
|
}));
|
|
37127
37109
|
};
|
|
@@ -37296,23 +37278,52 @@ var PhoneNumber2 = (_ref1) => {
|
|
|
37296
37278
|
var _ref$current2;
|
|
37297
37279
|
(_ref$current2 = ref.current) == null || _ref$current2.focus();
|
|
37298
37280
|
}, id);
|
|
37299
|
-
return /* @__PURE__ */ React40__namespace.default.createElement(reactAriaComponents.
|
|
37300
|
-
value: currentValue,
|
|
37301
|
-
onChange: handlePhoneChange,
|
|
37302
|
-
isDisabled: disabled,
|
|
37303
|
-
isRequired: required,
|
|
37304
|
-
onBlur,
|
|
37305
|
-
onFocus
|
|
37306
|
-
}, /* @__PURE__ */ React40__namespace.default.createElement(reactAriaComponents.Input, {
|
|
37281
|
+
return /* @__PURE__ */ React40__namespace.default.createElement(reactAriaComponents.Input, {
|
|
37307
37282
|
ref,
|
|
37308
37283
|
id: inputId,
|
|
37309
37284
|
type: "tel",
|
|
37285
|
+
value: currentValue,
|
|
37286
|
+
onChange: (e2) => handlePhoneChange(e2.target.value),
|
|
37287
|
+
disabled,
|
|
37288
|
+
required,
|
|
37289
|
+
onBlur,
|
|
37290
|
+
onFocus,
|
|
37310
37291
|
"aria-describedby": ariaDescribedBy,
|
|
37311
37292
|
placeholder,
|
|
37312
37293
|
className
|
|
37313
|
-
})
|
|
37294
|
+
});
|
|
37295
|
+
};
|
|
37296
|
+
var Control3 = (_ref10) => {
|
|
37297
|
+
let {
|
|
37298
|
+
children,
|
|
37299
|
+
className
|
|
37300
|
+
} = _ref10;
|
|
37301
|
+
const {
|
|
37302
|
+
disabled,
|
|
37303
|
+
required,
|
|
37304
|
+
onBlur,
|
|
37305
|
+
onFocus
|
|
37306
|
+
} = useFieldPropsV2();
|
|
37307
|
+
const {
|
|
37308
|
+
selectedCountryCode,
|
|
37309
|
+
handleCountryCodeChange
|
|
37310
|
+
} = usePhoneInputContext();
|
|
37311
|
+
const countryButtonElement = findChildOfType(children, PhoneInput.CountryButton);
|
|
37312
|
+
const countryOptionsElement = findChildOfType(children, PhoneInput.CountryOptions);
|
|
37313
|
+
const phoneNumberElement = findChildOfType(children, PhoneInput.PhoneNumber);
|
|
37314
|
+
return /* @__PURE__ */ React40__namespace.default.createElement("div", {
|
|
37315
|
+
className
|
|
37316
|
+
}, /* @__PURE__ */ React40__namespace.default.createElement(reactAriaComponents.Select, {
|
|
37317
|
+
value: selectedCountryCode ?? null,
|
|
37318
|
+
onChange: (key) => handleCountryCodeChange(key),
|
|
37319
|
+
isDisabled: disabled,
|
|
37320
|
+
isRequired: required,
|
|
37321
|
+
onBlur,
|
|
37322
|
+
onFocus
|
|
37323
|
+
}, countryButtonElement, countryOptionsElement), phoneNumberElement);
|
|
37314
37324
|
};
|
|
37315
37325
|
PhoneInput.Label = Label;
|
|
37326
|
+
PhoneInput.Control = Control3;
|
|
37316
37327
|
PhoneInput.CountryButton = CountryButton;
|
|
37317
37328
|
PhoneInput.CountryOptions = CountryOptions;
|
|
37318
37329
|
PhoneInput.PhoneNumber = PhoneNumber2;
|