@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.js
CHANGED
|
@@ -21471,6 +21471,7 @@ var require_messages_en = __commonJS({
|
|
|
21471
21471
|
"field.mla-apartment.label": "Apartment",
|
|
21472
21472
|
"text-area.input.error.message.required-error": "Enter an answer.",
|
|
21473
21473
|
"field.phone.country-search-input.placeholder": "Search",
|
|
21474
|
+
"submission-table.appointment.meeting-tool-tip": "Go to Scheduled Meetings",
|
|
21474
21475
|
"search.keyword.layout-elements.header": "header, page header, top bar",
|
|
21475
21476
|
"search.keyword.ecom.additional-info": "additional info, notes, instructions",
|
|
21476
21477
|
"donation.other-option.placeholder": "Enter an amount",
|
|
@@ -21507,7 +21508,6 @@ var require_messages_en = __commonJS({
|
|
|
21507
21508
|
"search.keyword.quiz.multi-choice": "quiz multiple choice, multi select",
|
|
21508
21509
|
"search.keyword.address.address-line-2": "address line 2, apt, suite, unit",
|
|
21509
21510
|
"bookings-last-name.input.error.message.required-error": "Enter a last name.",
|
|
21510
|
-
"actions.rules.button.label_DELETE_THIS": "Rules",
|
|
21511
21511
|
"search.keyword.transaction.product": "product, item, sku, purchase",
|
|
21512
21512
|
"appointment.input.error.message.required-error": "This field is required.",
|
|
21513
21513
|
"field-context-menu.make-required": "Make required",
|
|
@@ -37041,10 +37041,6 @@ var PhoneInput = (_ref2) => {
|
|
|
37041
37041
|
id,
|
|
37042
37042
|
value,
|
|
37043
37043
|
onChange,
|
|
37044
|
-
disabled,
|
|
37045
|
-
required,
|
|
37046
|
-
onBlur,
|
|
37047
|
-
onFocus,
|
|
37048
37044
|
FieldLayout,
|
|
37049
37045
|
defaultCountry,
|
|
37050
37046
|
validation
|
|
@@ -37065,9 +37061,7 @@ var PhoneInput = (_ref2) => {
|
|
|
37065
37061
|
onChange
|
|
37066
37062
|
});
|
|
37067
37063
|
const labelElement = findChildOfType(children, PhoneInput.Label);
|
|
37068
|
-
const
|
|
37069
|
-
const countryOptionsElement = findChildOfType(children, PhoneInput.CountryOptions);
|
|
37070
|
-
const phoneNumberElement = findChildOfType(children, PhoneInput.PhoneNumber);
|
|
37064
|
+
const controlElement = findChildOfType(children, PhoneInput.Control);
|
|
37071
37065
|
const descriptionElement = findChildOfType(children, PhoneInput.Description);
|
|
37072
37066
|
const errorElement = findChildOfType(children, PhoneInput.Error);
|
|
37073
37067
|
const contextValue = {
|
|
@@ -37083,19 +37077,7 @@ var PhoneInput = (_ref2) => {
|
|
|
37083
37077
|
}, /* @__PURE__ */ React40__default.createElement(FieldLayout, {
|
|
37084
37078
|
fieldId: id,
|
|
37085
37079
|
renderLabel: () => labelElement,
|
|
37086
|
-
renderInput: () =>
|
|
37087
|
-
style: {
|
|
37088
|
-
display: "flex",
|
|
37089
|
-
gap: "8px"
|
|
37090
|
-
}
|
|
37091
|
-
}, /* @__PURE__ */ React40__default.createElement(Select, {
|
|
37092
|
-
value: selectedCountryCode ?? null,
|
|
37093
|
-
onChange: (key) => handleCountryCodeChange(key),
|
|
37094
|
-
isDisabled: disabled,
|
|
37095
|
-
isRequired: required,
|
|
37096
|
-
onBlur,
|
|
37097
|
-
onFocus
|
|
37098
|
-
}, countryButtonElement, countryOptionsElement), phoneNumberElement),
|
|
37080
|
+
renderInput: () => controlElement,
|
|
37099
37081
|
renderDescription: () => /* @__PURE__ */ React40__default.createElement(React40__default.Fragment, null, descriptionElement, errorElement)
|
|
37100
37082
|
}));
|
|
37101
37083
|
};
|
|
@@ -37270,23 +37252,52 @@ var PhoneNumber2 = (_ref1) => {
|
|
|
37270
37252
|
var _ref$current2;
|
|
37271
37253
|
(_ref$current2 = ref.current) == null || _ref$current2.focus();
|
|
37272
37254
|
}, id);
|
|
37273
|
-
return /* @__PURE__ */ React40__default.createElement(
|
|
37274
|
-
value: currentValue,
|
|
37275
|
-
onChange: handlePhoneChange,
|
|
37276
|
-
isDisabled: disabled,
|
|
37277
|
-
isRequired: required,
|
|
37278
|
-
onBlur,
|
|
37279
|
-
onFocus
|
|
37280
|
-
}, /* @__PURE__ */ React40__default.createElement(Input$1, {
|
|
37255
|
+
return /* @__PURE__ */ React40__default.createElement(Input$1, {
|
|
37281
37256
|
ref,
|
|
37282
37257
|
id: inputId,
|
|
37283
37258
|
type: "tel",
|
|
37259
|
+
value: currentValue,
|
|
37260
|
+
onChange: (e2) => handlePhoneChange(e2.target.value),
|
|
37261
|
+
disabled,
|
|
37262
|
+
required,
|
|
37263
|
+
onBlur,
|
|
37264
|
+
onFocus,
|
|
37284
37265
|
"aria-describedby": ariaDescribedBy,
|
|
37285
37266
|
placeholder,
|
|
37286
37267
|
className
|
|
37287
|
-
})
|
|
37268
|
+
});
|
|
37269
|
+
};
|
|
37270
|
+
var Control3 = (_ref10) => {
|
|
37271
|
+
let {
|
|
37272
|
+
children,
|
|
37273
|
+
className
|
|
37274
|
+
} = _ref10;
|
|
37275
|
+
const {
|
|
37276
|
+
disabled,
|
|
37277
|
+
required,
|
|
37278
|
+
onBlur,
|
|
37279
|
+
onFocus
|
|
37280
|
+
} = useFieldPropsV2();
|
|
37281
|
+
const {
|
|
37282
|
+
selectedCountryCode,
|
|
37283
|
+
handleCountryCodeChange
|
|
37284
|
+
} = usePhoneInputContext();
|
|
37285
|
+
const countryButtonElement = findChildOfType(children, PhoneInput.CountryButton);
|
|
37286
|
+
const countryOptionsElement = findChildOfType(children, PhoneInput.CountryOptions);
|
|
37287
|
+
const phoneNumberElement = findChildOfType(children, PhoneInput.PhoneNumber);
|
|
37288
|
+
return /* @__PURE__ */ React40__default.createElement("div", {
|
|
37289
|
+
className
|
|
37290
|
+
}, /* @__PURE__ */ React40__default.createElement(Select, {
|
|
37291
|
+
value: selectedCountryCode ?? null,
|
|
37292
|
+
onChange: (key) => handleCountryCodeChange(key),
|
|
37293
|
+
isDisabled: disabled,
|
|
37294
|
+
isRequired: required,
|
|
37295
|
+
onBlur,
|
|
37296
|
+
onFocus
|
|
37297
|
+
}, countryButtonElement, countryOptionsElement), phoneNumberElement);
|
|
37288
37298
|
};
|
|
37289
37299
|
PhoneInput.Label = Label;
|
|
37300
|
+
PhoneInput.Control = Control3;
|
|
37290
37301
|
PhoneInput.CountryButton = CountryButton;
|
|
37291
37302
|
PhoneInput.CountryOptions = CountryOptions;
|
|
37292
37303
|
PhoneInput.PhoneNumber = PhoneNumber2;
|