@wix/form-elements 1.233.0 → 1.235.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/component/{appointment-rac-D-3m58lp.js → appointment-rac-DaJz8fBt.js} +4 -4
- package/dist/component/{bookings-address-rac-B-LoE2Qn.js → bookings-address-rac-lkvT2jFg.js} +1 -1
- package/dist/component/{bookings-email-rac-DPZwdIFG.js → bookings-email-rac-B6yDIr7X.js} +1 -1
- package/dist/component/{bookings-first-name-rac-CsVsVcvr.js → bookings-first-name-rac-BdwaASKa.js} +1 -1
- package/dist/component/{bookings-header-rac-qNe2KRzE.js → bookings-header-rac-K_4D2edM.js} +1 -1
- package/dist/component/{bookings-last-name-rac-DQL_KMg2.js → bookings-last-name-rac-z1DsE6Te.js} +1 -1
- package/dist/component/{bookings-login-bar-rac-COt6CmZt.js → bookings-login-bar-rac-DuDc27Sg.js} +1 -1
- package/dist/component/{bookings-phone-rac-L07Dr5yv.js → bookings-phone-rac-D3I57XfO.js} +1 -1
- package/dist/component/{bookings-rich-text-rac-DJaGIswi.js → bookings-rich-text-rac-Dva_0eJC.js} +1 -1
- package/dist/component/{checkbox-field-rac-hshAPjuN.js → checkbox-field-rac-CcVXm9fo.js} +4 -4
- package/dist/component/{checkbox-group-field-headless-Dz8ifQ1q.js → checkbox-group-field-headless-DIwGr5_m.js} +3 -3
- package/dist/component/{checkbox-group-field-rac-BcmVG9V9.js → checkbox-group-field-rac-Di8eepGG.js} +4 -4
- package/dist/component/{checkbox-group-rac-Dxd3xSxY.js → checkbox-group-rac-uA3X1M2J.js} +1 -1
- package/dist/component/{checkbox-rac-BWtTYFl2.js → checkbox-rac-BSYp2Yim.js} +1 -1
- package/dist/component/{contacts-address-rac-Cgi9ARvL.js → contacts-address-rac-BmITc1pA.js} +1 -1
- package/dist/component/{contacts-birthdate-rac-C5LiljQS.js → contacts-birthdate-rac-BbiTr6cp.js} +1 -1
- package/dist/component/{contacts-company-rac-DjVt6krD.js → contacts-company-rac-DUQ7fNTn.js} +1 -1
- package/dist/component/{contacts-email-rac-UUsDS-Hj.js → contacts-email-rac-CVqqMJbq.js} +1 -1
- package/dist/component/{contacts-first-name-rac-D0I06Uqj.js → contacts-first-name-rac-uv3ldXXw.js} +1 -1
- package/dist/component/{contacts-last-name-rac-DEg25NCh.js → contacts-last-name-rac-CimDHNgO.js} +1 -1
- package/dist/component/{contacts-phone-rac-CGs7LCRx.js → contacts-phone-rac-BShfAZ5U.js} +1 -1
- package/dist/component/{contacts-position-rac-6uf20AOO.js → contacts-position-rac-BENXoFz5.js} +1 -1
- package/dist/component/{contacts-subscribe-rac-OR1Tl4HS.js → contacts-subscribe-rac-CBBgFf9U.js} +1 -1
- package/dist/component/{contacts-tax-id-rac-BogsWGs4.js → contacts-tax-id-rac-B4fcviNx.js} +1 -1
- package/dist/component/{date-availability-Dc4t2XCp.js → date-availability-BrxRBFHK.js} +1 -1
- package/dist/component/date-input-field-rac-BFDOSod0.js +382 -0
- package/dist/component/{date-input-rac-D9uou8Mx.js → date-input-rac-Cd6SHUjO.js} +1 -1
- package/dist/component/{date-picker-field-rac-BKiq-iMW.js → date-picker-field-rac-BN2EjYXP.js} +8 -8
- package/dist/component/{date-picker-rac-CMroLRTz.js → date-picker-rac-BQWpqtZJ.js} +1 -1
- package/dist/component/date-time-input-field-rac-BO_3H4NG.js +526 -0
- package/dist/component/{date-time-input-rac-DBqQrjE_.js → date-time-input-rac-wgKGtEcj.js} +1 -1
- package/dist/component/{dext-checkbox-group-rac-CyReMYPe.js → dext-checkbox-group-rac-DM20MEtm.js} +2 -2
- package/dist/component/{dext-checkbox-rac-C-Ax0coQ.js → dext-checkbox-rac-DvzEyVhG.js} +1 -1
- package/dist/component/{dext-date-picker-rac-BEjVuSbf.js → dext-date-picker-rac-cof0w9i_.js} +1 -1
- package/dist/component/{dext-date-time-input-rac-xWnKBcPO.js → dext-date-time-input-rac-BiJqwZ-5.js} +1 -1
- package/dist/component/{dext-dropdown-rac-BupA5fTu.js → dext-dropdown-rac-DEq1gj7M.js} +1 -1
- package/dist/component/{dext-email-rac-D-PgibOQ.js → dext-email-rac-BDg2wBuO.js} +1 -1
- package/dist/component/{dext-number-input-rac-YGeVY6EG.js → dext-number-input-rac-BBouksMP.js} +1 -1
- package/dist/component/{dext-phone-rac-LFs2NS4p.js → dext-phone-rac-DZASm4Ft.js} +1 -1
- package/dist/component/{dext-radio-group-rac-C9GUzkeB.js → dext-radio-group-rac-DqAZs7cq.js} +2 -2
- package/dist/component/{dext-rating-input-rac-Cl0HkVM2.js → dext-rating-input-rac-BUB6w2g3.js} +1 -1
- package/dist/component/{dext-tags-rac-BYkY96bj.js → dext-tags-rac-BH6azQiT.js} +2 -2
- package/dist/component/{dext-text-area-rac-fz7UNRqD.js → dext-text-area-rac-Bm1Oi7pi.js} +1 -1
- package/dist/component/{dext-text-input-rac-Dv9HTbCt.js → dext-text-input-rac-DBSxcYp8.js} +1 -1
- package/dist/component/{dext-url-input-rac-FxdnSlVl.js → dext-url-input-rac-gJ_-qrzY.js} +1 -1
- package/dist/component/{dismiss-icon-DJmsu1VC.js → dismiss-icon-sdQDwRev.js} +1 -1
- package/dist/component/{donation-rac-Bu74Oogy.js → donation-rac-CJHcIOnk.js} +5 -5
- package/dist/component/{dropdown-field-rac-CzWkvn7h.js → dropdown-field-rac-D94vF6Um.js} +3 -3
- package/dist/component/{dropdown-rac-V6_Z9Wpm.js → dropdown-rac-EN7KMhtd.js} +1 -1
- package/dist/component/{ecom-address-rac-jXrbgGcR.js → ecom-address-rac-CYk1wXq3.js} +1 -1
- package/dist/component/{ecom-subscription-checkbox-rac-eHaOfQ88.js → ecom-subscription-checkbox-rac--cLVBIUD.js} +2 -2
- package/dist/component/{email-input-field-rac-CWVKPe92.js → email-input-field-rac-DWTQUl88.js} +3 -3
- package/dist/component/{events-repeater-rac-DYOdULgb.js → events-repeater-rac-B-CAZJsO.js} +4 -4
- package/dist/component/{events-rsvp-rac-QVCrDFMy.js → events-rsvp-rac-CkLzjZe0.js} +3 -3
- package/dist/component/{field-error-headless-NewCzOB9.js → field-error-headless-Hpn7Cjyz.js} +1 -1
- package/dist/component/{field-label-headless-Deo9dGbv.js → field-label-headless-CZaQ-q22.js} +1 -1
- package/dist/component/{file-upload-rac-aXHlyxHi.js → file-upload-rac-DelhbRzX.js} +153 -150
- package/dist/component/{fixed-payment-rac-BSZpuGK5.js → fixed-payment-rac-CGee8oWb.js} +3 -3
- package/dist/component/{form-D6g5Lhie.js → form-CKPfFL3D.js} +2347 -2341
- package/dist/component/form.css +1 -1
- package/dist/component/form.js +1 -1
- package/dist/component/{header-field-rac-PG_d2DLi.js → header-field-rac-B6vzJnaW.js} +2 -2
- package/dist/component/{header-rac-DSdtCA23.js → header-rac-Bc4WxzR1.js} +1 -1
- package/dist/component/hidden-part-label-Dc5eP4S0.js +18 -0
- package/dist/component/{image-choice-rac-Dfcq_DDp.js → image-choice-rac-BuArZj5n.js} +4 -4
- package/dist/component/{index-D4MrV_sk.js → index-CmopQE1P.js} +2 -2
- package/dist/component/{index-zP5mfEf8.js → index-yqi4FTyq.js} +4 -4
- package/dist/component/{isObjectLike-DFFmMGos.js → isObjectLike-DO4jXs__.js} +1 -1
- package/dist/component/{multiline-address-field-rac-C_Xy1nWk.js → multiline-address-field-rac-CijPzBxU.js} +8 -8
- package/dist/component/{multiline-address-rac-BqpeM7C_.js → multiline-address-rac-CchEjTwl.js} +1 -1
- package/dist/component/{number-input-field-rac-BQyjLISj.js → number-input-field-rac-CdJstTE-.js} +4 -4
- package/dist/component/{number-input-rac-DrDlS1RB.js → number-input-rac-B0V7Xy0I.js} +1 -1
- package/dist/component/{password-rac-BT58ATdC.js → password-rac-BipcyWPk.js} +4 -4
- package/dist/component/{payment-input-rac-CWalYCZA.js → payment-input-rac-ClhUNxdL.js} +4 -4
- package/dist/component/{phone-input-field-rac-D_ayc1RA.js → phone-input-field-rac-CPNMdr70.js} +7 -7
- package/dist/component/{phone-rac-p5F-E8Qq.js → phone-rac-DL5pW-cK.js} +1 -1
- package/dist/component/{product-list-rac-CPr9bYu0.js → product-list-rac-Ii0qlyiq.js} +4 -4
- package/dist/component/{quiz-radio-group-rac-OW0sqesm.js → quiz-radio-group-rac-DtO0om99.js} +1 -1
- package/dist/component/radio-button-module-classes-CY-zH0im.js +152 -0
- package/dist/component/{radio-group-field-rac-BLCsoI-r.js → radio-group-field-rac-ViY8g4gL.js} +4 -4
- package/dist/component/{radio-group-rac-BgUpj2G5.js → radio-group-rac-CjCoPD-w.js} +1 -1
- package/dist/component/rating-input-field-rac-BMFXLqfg.js +145 -0
- package/dist/component/{rating-input-rac-DSpFTPOv.js → rating-input-rac-CWGGV3Fx.js} +1 -1
- package/dist/component/{rich-content-rac.module-CLu7GcMK.js → rich-content-rac.module-CTlkS2_O.js} +1 -1
- package/dist/component/{rich-text-field-rac-ZiI_nRWE.js → rich-text-field-rac-2SQn_URM.js} +2 -2
- package/dist/component/{rich-text-rac-BsgiN5d-.js → rich-text-rac-L3m09cVp.js} +1 -1
- package/dist/component/{service-dropdown-rac-DWyhRr97.js → service-dropdown-rac-uKz9PkBj.js} +4 -4
- package/dist/component/{services-multi-choice-rac-TPWCJXw4.js → services-multi-choice-rac-sOJlp6_l.js} +5 -5
- package/dist/component/{signature-rac-D67GGPog.js → signature-rac-B1O7Ivtg.js} +4 -4
- package/dist/component/{submit-button-rac-DnVE0X13.js → submit-button-rac-iYdJFSXy.js} +60 -60
- package/dist/component/{tags-field-rac-Cr1g3IQA.js → tags-field-rac-CFSrsxw9.js} +5 -5
- package/dist/component/{tags-rac-CVMs-yMu.js → tags-rac-KW_c8m3p.js} +1 -1
- package/dist/component/{text-area-field-rac-gTMH-0ED.js → text-area-field-rac-BJEAvqCy.js} +4 -4
- package/dist/component/{text-area-rac-_s4ZWY1w.js → text-area-rac-Bk9j2e4k.js} +1 -1
- package/dist/component/{text-input-field-rac-BkHvsCqC.js → text-input-field-rac-KlrY_3qp.js} +3 -3
- package/dist/component/{text-input-headless-9zV5V5ku.js → text-input-headless-B6gzsedE.js} +3 -3
- package/dist/component/{text-input-rac-DiKyTmgL.js → text-input-rac-CSO1g0rD.js} +1 -1
- package/dist/component/{time-input-rac-DI40cFEX.js → time-input-rac-jaYI3_XV.js} +6 -6
- package/dist/component/{url-input-field-rac-BksPlayI.js → url-input-field-rac-1t5d4VjM.js} +4 -4
- package/dist/component/{url-input-rac-D7JSf8Qb.js → url-input-rac-BTQOpun9.js} +1 -1
- package/dist/component/{use-dropdown-option-class-name-DSehgOmn.js → use-dropdown-option-class-name-DEBN31l5.js} +2 -2
- package/dist/component/{use-dropdown-trigger-class-name-Bn5-sN_y.js → use-dropdown-trigger-class-name-BpcEWMWj.js} +7 -7
- package/dist/component/{use-element-state-class-name-CPvOOc0S.js → use-element-state-class-name-B0muHOx4.js} +1 -1
- package/dist/component/{use-hoverable-input-class-name-CdTBtnwn.js → use-hoverable-input-class-name-CL0sOlNu.js} +2 -2
- package/dist/component/{use-is-forced-open-dropdown-BowzktO1.js → use-is-forced-open-dropdown-BhQKJWNc.js} +1 -1
- package/dist/component/{use-native-mobile-input-FJXRhGOj.js → use-native-mobile-input-W9CS9U3u.js} +1 -1
- package/dist/component/{use-service-options-base-BIAtzpWn.js → use-service-options-base-DUgTjbHR.js} +1 -1
- package/dist/component/use-text-input-class-name-Mm_0ULVk.js +6 -0
- package/dist/form.d.ts +81 -0
- package/package.json +2 -2
- package/dist/component/date-input-field-rac-D4OlWmZn.js +0 -365
- package/dist/component/date-time-input-field-rac-Bv2fVYpg.js +0 -507
- package/dist/component/helpers-HmkkXrh2.js +0 -12
- package/dist/component/radio-button-module-classes-BZ_Hel4e.js +0 -137
- package/dist/component/rating-input-field-rac-B_HyeaML.js +0 -139
- package/dist/component/use-text-input-class-name-ChjVNdVG.js +0 -6
package/dist/form.d.ts
CHANGED
|
@@ -6662,6 +6662,81 @@ type VectorArt = {
|
|
|
6662
6662
|
svgContent: string;
|
|
6663
6663
|
};
|
|
6664
6664
|
|
|
6665
|
+
/**
|
|
6666
|
+
* Accessibility attributes.
|
|
6667
|
+
*
|
|
6668
|
+
* @example
|
|
6669
|
+
* ```tsx
|
|
6670
|
+
* import type { A11y } from '@wix/editor-react-types';
|
|
6671
|
+
*
|
|
6672
|
+
* interface MyComponentProps {
|
|
6673
|
+
* a11y?: A11y;
|
|
6674
|
+
* }
|
|
6675
|
+
*
|
|
6676
|
+
* const MyComponent = ({ a11y }: MyComponentProps) => (
|
|
6677
|
+
* <div
|
|
6678
|
+
* tabIndex={a11y?.tabIndex}
|
|
6679
|
+
* role={a11y?.role}
|
|
6680
|
+
* aria-label={a11y?.ariaLabel}
|
|
6681
|
+
* />
|
|
6682
|
+
* );
|
|
6683
|
+
* ```
|
|
6684
|
+
*/
|
|
6685
|
+
interface A11y {
|
|
6686
|
+
/** The `tabindex` attribute. Controls the component's position in keyboard focus order. */
|
|
6687
|
+
tabIndex?: number;
|
|
6688
|
+
/** The `aria-level` attribute. Defines the hierarchical level of a component within a structure. */
|
|
6689
|
+
ariaLevel?: number;
|
|
6690
|
+
/** The `aria-expanded` attribute. Indicates whether a collapsible component is expanded or collapsed. */
|
|
6691
|
+
ariaExpanded?: boolean | 'false' | 'true';
|
|
6692
|
+
/** The `aria-disabled` attribute. Indicates that the component is perceivable but disabled. */
|
|
6693
|
+
ariaDisabled?: boolean | 'false' | 'true';
|
|
6694
|
+
/** The `aria-atomic` attribute. Indicates whether assistive technologies should present the entire region as a whole. */
|
|
6695
|
+
ariaAtomic?: boolean | 'false' | 'true';
|
|
6696
|
+
/** The `aria-hidden` attribute. Hides the component from assistive technologies. */
|
|
6697
|
+
ariaHidden?: boolean | 'false' | 'true';
|
|
6698
|
+
/** The `aria-busy` attribute. Indicates the component is being modified and assistive technologies should wait. */
|
|
6699
|
+
ariaBusy?: boolean | 'false' | 'true';
|
|
6700
|
+
/** Whether the component supports multiline input. */
|
|
6701
|
+
multiline?: boolean;
|
|
6702
|
+
/** The `aria-autocomplete` attribute. Indicates the type of autocomplete behavior for an input. */
|
|
6703
|
+
ariaAutocomplete?: 'none' | 'inline' | 'list' | 'both';
|
|
6704
|
+
/** The `aria-pressed` attribute. Indicates the current "pressed" state of a toggle button. */
|
|
6705
|
+
ariaPressed?: boolean | 'false' | 'mixed' | 'true';
|
|
6706
|
+
/** The `aria-haspopup` attribute. Indicates the availability and type of an interactive popup component. */
|
|
6707
|
+
ariaHaspopup?: boolean | 'false' | 'true' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog';
|
|
6708
|
+
/** The `aria-relevant` attribute. Indicates what notifications the user agent will trigger when the accessibility tree is modified. */
|
|
6709
|
+
ariaRelevant?: 'additions' | 'additions text' | 'all' | 'removals' | 'text';
|
|
6710
|
+
/** The `role` attribute. Defines the semantic role of the component. */
|
|
6711
|
+
role?: string;
|
|
6712
|
+
/** The `aria-live` attribute. Indicates that the component will be updated and describes the types of updates. */
|
|
6713
|
+
ariaLive?: 'off' | 'assertive' | 'polite';
|
|
6714
|
+
/** The `aria-current` attribute. Indicates the component that represents the current item within a container or set. */
|
|
6715
|
+
ariaCurrent?: boolean | 'false' | 'true' | 'page' | 'step' | 'location' | 'date' | 'time';
|
|
6716
|
+
/** The `aria-label` attribute. Defines a string value that labels the component. */
|
|
6717
|
+
ariaLabel?: string;
|
|
6718
|
+
/** The `aria-roledescription` attribute. Defines a human-readable description for the role of the component. */
|
|
6719
|
+
ariaRoledescription?: string;
|
|
6720
|
+
/** The `aria-describedby` attribute. Identifies the element that describes this component. */
|
|
6721
|
+
ariaDescribedby?: string;
|
|
6722
|
+
/** The `aria-labelledby` attribute. Identifies the element that labels this component. */
|
|
6723
|
+
ariaLabelledby?: string;
|
|
6724
|
+
/** The `aria-errormessage` attribute. Identifies the element that provides an error message for this component. */
|
|
6725
|
+
ariaErrormessage?: string;
|
|
6726
|
+
/** The `aria-owns` attribute. Identifies a component to define a visual, functional, or contextual parent/child relationship. */
|
|
6727
|
+
ariaOwns?: string;
|
|
6728
|
+
/** The `aria-controls` attribute. Identifies the element whose contents or presence are controlled by this component. */
|
|
6729
|
+
ariaControls?: string;
|
|
6730
|
+
/** The HTML tag to render the component as (e.g. `'h1'`, `'button'`). */
|
|
6731
|
+
tag?: string;
|
|
6732
|
+
/** The `aria-multiline` attribute. Indicates whether a text box accepts multiple lines of input. */
|
|
6733
|
+
ariaMultiline?: boolean | 'false' | 'true';
|
|
6734
|
+
/** The `aria-invalid` attribute. Indicates the entered value does not conform to the expected format. */
|
|
6735
|
+
ariaInvalid?: boolean | 'false' | 'true' | 'grammar' | 'spelling';
|
|
6736
|
+
/** The `lang` attribute. Declares the language of the component's content (e.g. `'en'`, `'fr-CA'`). Inherited by descendant elements. */
|
|
6737
|
+
lang?: string;
|
|
6738
|
+
}
|
|
6739
|
+
|
|
6665
6740
|
type REMOVED = 'REMOVED';
|
|
6666
6741
|
/**
|
|
6667
6742
|
* Wix framework props.
|
|
@@ -7108,6 +7183,12 @@ type FormProps = {
|
|
|
7108
7183
|
className?: string;
|
|
7109
7184
|
compId?: string;
|
|
7110
7185
|
ariaLabel?: string;
|
|
7186
|
+
/**
|
|
7187
|
+
* The editor's Accessibility settings for the element. Its label, labelledby
|
|
7188
|
+
* and describedby land on the `<form>`; `ariaLabel` above wins over its label
|
|
7189
|
+
* and labelledby.
|
|
7190
|
+
*/
|
|
7191
|
+
a11y?: A11y;
|
|
7111
7192
|
form?: FormSchema;
|
|
7112
7193
|
wix?: Wix;
|
|
7113
7194
|
elementProps?: ElementProps;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/form-elements",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.235.0",
|
|
4
4
|
"description": "The Wix Forms rendering element for Builder apps, loaded at runtime as @wix/form-elements/Form",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -157,5 +157,5 @@
|
|
|
157
157
|
]
|
|
158
158
|
}
|
|
159
159
|
},
|
|
160
|
-
"falconPackageHash": "
|
|
160
|
+
"falconPackageHash": "e9a2f71457b01dc8d31e7dfa003e413ddfa060984d0f25c0acc167a1"
|
|
161
161
|
}
|
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
import { RicosViewer as oe } from "@wix/ricos/viewer";
|
|
2
|
-
import f from "classnames";
|
|
3
|
-
import t, { useMemo as T, useRef as Y, Children as se, isValidElement as le, useState as ee, useCallback as Q } from "react";
|
|
4
|
-
import { b4 as c, bN as _, bK as j, bF as G, bh as te, bu as ae, bP as k, bY as H, bb as ce, bi as ie, bC as me, u as ue, X as de, am as pe, w as W, x as Ee, M as be, I as Ne, v as fe, y as De, z as X } from "./form-D6g5Lhie.js";
|
|
5
|
-
import { mergeProps as Ie, UNSAFE_PortalProvider as Ce } from "react-aria";
|
|
6
|
-
import { ListBoxItem as _e, Select as ge, TextField as ne, SelectValue as Oe, Input as re } from "react-aria-components";
|
|
7
|
-
import { f as p, a as q } from "./find-child-C60k4CxG.js";
|
|
8
|
-
import { g as ye } from "./helpers-HmkkXrh2.js";
|
|
9
|
-
import { D as he, E as Le } from "./field-error-headless-NewCzOB9.js";
|
|
10
|
-
import { L as Fe } from "./field-label-headless-Deo9dGbv.js";
|
|
11
|
-
import { F as ve } from "./fieldset-headless-CD3fds9J.js";
|
|
12
|
-
import { u as Te, a as Ae, N as Pe, D as Re } from "./dismiss-icon-DJmsu1VC.js";
|
|
13
|
-
import { u as Me, N as Se } from "./use-native-mobile-input-FJXRhGOj.js";
|
|
14
|
-
import { N as Ye, E as Be, S as xe } from "./non-modal-popover-D-u13tmp.js";
|
|
15
|
-
import { t as He, C as Ve } from "./calendar-icon-DOeHn3jt.js";
|
|
16
|
-
import { u as Ue } from "./use-is-forced-open-dropdown-BowzktO1.js";
|
|
17
|
-
import { u as we } from "./use-native-state-class-name-B0m2ghbS.js";
|
|
18
|
-
import { V as ke, a as qe } from "./use-dropdown-option-class-name-DSehgOmn.js";
|
|
19
|
-
import { C as $e } from "./chevron-down-icon-CcpVm6B-.js";
|
|
20
|
-
import { E as ze } from "./error-icon-hZxQ6DEy.js";
|
|
21
|
-
import { H as Ke } from "./custom-focus-class-_483Pkwp.js";
|
|
22
|
-
import { s as E } from "./field-rac.module-D0QzJXUv.js";
|
|
23
|
-
import { u as V } from "./use-hoverable-input-class-name-CdTBtnwn.js";
|
|
24
|
-
const We = {
|
|
25
|
-
[c.MONTH]: "bday-month",
|
|
26
|
-
[c.DAY]: "bday-day",
|
|
27
|
-
[c.YEAR]: "bday-year"
|
|
28
|
-
}, J = (e, a) => e === "bday" ? We[a] : void 0, n = ({ children: e, className: a }) => {
|
|
29
|
-
const { id: o, required: s, onBlur: r, onFocus: l, FieldLayout: m } = _(), { inputId: i, labelId: u, ariaDescribedBy: d } = j(), { regionalFormat: b } = G(), N = Me(), D = T(() => te(b).filter(ae).map((S) => S.toUpperCase()), [
|
|
30
|
-
b
|
|
31
|
-
]), g = p(e, n.Label), P = p(e, n.Description), I = p(e, n.Error), L = p(e, n.NativeDate), C = {
|
|
32
|
-
[c.MONTH]: p(e, n.Month),
|
|
33
|
-
[c.DAY]: p(e, n.Day),
|
|
34
|
-
[c.YEAR]: p(e, n.Year)
|
|
35
|
-
}, R = N ? g : q(g, {
|
|
36
|
-
as: "div"
|
|
37
|
-
}), M = N ? L : /* @__PURE__ */ t.createElement(ve, {
|
|
38
|
-
id: i,
|
|
39
|
-
ariaLabelledBy: u,
|
|
40
|
-
ariaDescribedBy: d,
|
|
41
|
-
required: s,
|
|
42
|
-
onBlur: r,
|
|
43
|
-
onFocus: l,
|
|
44
|
-
className: a
|
|
45
|
-
}, C[D[0]], C[D[1]], C[D[2]]);
|
|
46
|
-
return /* @__PURE__ */ t.createElement(m, {
|
|
47
|
-
fieldId: o,
|
|
48
|
-
renderLabel: () => R,
|
|
49
|
-
renderInput: () => M,
|
|
50
|
-
renderDescription: () => /* @__PURE__ */ t.createElement(t.Fragment, null, I, P)
|
|
51
|
-
});
|
|
52
|
-
}, y = ({ children: e, className: a }) => {
|
|
53
|
-
const { id: o, disabled: s, readOnly: r, showDateLabels: l, hidePlaceholder: m, autoComplete: i } = _(), { labelId: u } = h(c.MONTH), { partValue: d, partError: b, onPartChange: N } = A(c.MONTH), { t: D } = H(), [g, P] = ee(!1), I = Ue(o), [L, C] = ee(null), R = m ? Be : D("field.date.placeholder.month"), M = Q((F) => {
|
|
54
|
-
r || N(typeof F == "string" ? F : "");
|
|
55
|
-
}, [
|
|
56
|
-
N,
|
|
57
|
-
r
|
|
58
|
-
]), S = Q((F) => {
|
|
59
|
-
P(F && !r);
|
|
60
|
-
}, [
|
|
61
|
-
r
|
|
62
|
-
]), $ = p(e, y.Label), z = p(e, y.Trigger), K = p(e, y.Options);
|
|
63
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
64
|
-
className: a,
|
|
65
|
-
"data-date-field": !0
|
|
66
|
-
}, l ? $ : null, /* @__PURE__ */ t.createElement("div", {
|
|
67
|
-
ref: C,
|
|
68
|
-
style: {
|
|
69
|
-
display: "contents"
|
|
70
|
-
}
|
|
71
|
-
}), /* @__PURE__ */ t.createElement(Ce, {
|
|
72
|
-
getContainer: () => L
|
|
73
|
-
}, /* @__PURE__ */ t.createElement(ge, {
|
|
74
|
-
autoComplete: J(i, c.MONTH),
|
|
75
|
-
"aria-labelledby": l ? u : void 0,
|
|
76
|
-
value: d || null,
|
|
77
|
-
onChange: M,
|
|
78
|
-
isDisabled: s,
|
|
79
|
-
isInvalid: b,
|
|
80
|
-
placeholder: R,
|
|
81
|
-
isOpen: I || g,
|
|
82
|
-
onOpenChange: I ? void 0 : S
|
|
83
|
-
}, z, q(K, {
|
|
84
|
-
isForcedOpen: I
|
|
85
|
-
}))));
|
|
86
|
-
}, Xe = ({ className: e }) => /* @__PURE__ */ t.createElement(Z, {
|
|
87
|
-
datePart: c.MONTH,
|
|
88
|
-
className: e
|
|
89
|
-
}), Qe = ({ children: e, className: a }) => {
|
|
90
|
-
const { id: o, readOnly: s } = _(), { inputId: r } = h(c.MONTH), { partError: l, isFirstPart: m } = A(c.MONTH), i = Y(null);
|
|
91
|
-
return k(() => {
|
|
92
|
-
var u;
|
|
93
|
-
m && ((u = i.current) == null || u.focus({
|
|
94
|
-
preventScroll: !0
|
|
95
|
-
}));
|
|
96
|
-
}, o), /* @__PURE__ */ t.createElement(xe, {
|
|
97
|
-
ref: i,
|
|
98
|
-
id: r,
|
|
99
|
-
className: a,
|
|
100
|
-
"data-hook": c.MONTH,
|
|
101
|
-
"data-invalid": l || void 0,
|
|
102
|
-
"data-readonly": s || void 0
|
|
103
|
-
}, /* @__PURE__ */ t.createElement(Oe, null), e);
|
|
104
|
-
}, U = ({ children: e, className: a, ...o }) => {
|
|
105
|
-
const { isForcedOpen: s } = o, { language: r } = G(), l = T(() => ye(r), [
|
|
106
|
-
r
|
|
107
|
-
]), m = p(e, U.Option) ?? /* @__PURE__ */ t.createElement(U.Option, null);
|
|
108
|
-
return /* @__PURE__ */ t.createElement(Ye, {
|
|
109
|
-
className: a,
|
|
110
|
-
containerPadding: 0,
|
|
111
|
-
offset: 0
|
|
112
|
-
}, /* @__PURE__ */ t.createElement(ke, {
|
|
113
|
-
isForcedOpen: s,
|
|
114
|
-
autoFocus: s ? !1 : void 0
|
|
115
|
-
}, l.map((i, u) => q(m, {
|
|
116
|
-
key: String(u + 1),
|
|
117
|
-
value: String(u + 1),
|
|
118
|
-
label: i
|
|
119
|
-
}))));
|
|
120
|
-
}, je = ({ className: e, ...a }) => {
|
|
121
|
-
const { value: o, label: s } = a;
|
|
122
|
-
return /* @__PURE__ */ t.createElement(_e, {
|
|
123
|
-
className: e,
|
|
124
|
-
id: o,
|
|
125
|
-
textValue: s
|
|
126
|
-
}, s);
|
|
127
|
-
};
|
|
128
|
-
y.Label = Xe;
|
|
129
|
-
y.Trigger = Qe;
|
|
130
|
-
y.Options = U;
|
|
131
|
-
U.Option = je;
|
|
132
|
-
const B = ({ children: e, className: a }) => {
|
|
133
|
-
const { disabled: o, readOnly: s, showDateLabels: r } = _(), { labelId: l } = h(c.DAY), { partValue: m, partError: i, onPartChange: u } = A(c.DAY), d = p(e, B.Label), b = p(e, B.Input);
|
|
134
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
135
|
-
className: a,
|
|
136
|
-
"data-date-field": !0
|
|
137
|
-
}, r && d, /* @__PURE__ */ t.createElement(ne, {
|
|
138
|
-
"aria-labelledby": r ? l : void 0,
|
|
139
|
-
value: m,
|
|
140
|
-
onChange: u,
|
|
141
|
-
isDisabled: o,
|
|
142
|
-
isReadOnly: s,
|
|
143
|
-
isInvalid: i
|
|
144
|
-
}, b));
|
|
145
|
-
}, Ge = ({ className: e }) => /* @__PURE__ */ t.createElement(Z, {
|
|
146
|
-
datePart: c.DAY,
|
|
147
|
-
className: e
|
|
148
|
-
}), Je = ({ className: e }) => {
|
|
149
|
-
const { id: a, hidePlaceholder: o, autoComplete: s } = _(), { inputId: r } = h(c.DAY), { isFirstPart: l } = A(c.DAY), { t: m } = H(), i = Y(null), u = o ? void 0 : m("field.date.placeholder.day");
|
|
150
|
-
return k(() => {
|
|
151
|
-
var d;
|
|
152
|
-
l && ((d = i.current) == null || d.focus({
|
|
153
|
-
preventScroll: !0
|
|
154
|
-
}));
|
|
155
|
-
}, a), /* @__PURE__ */ t.createElement(re, {
|
|
156
|
-
ref: i,
|
|
157
|
-
id: r,
|
|
158
|
-
className: e,
|
|
159
|
-
placeholder: u,
|
|
160
|
-
autoComplete: J(s, c.DAY),
|
|
161
|
-
maxLength: 2,
|
|
162
|
-
inputMode: "numeric",
|
|
163
|
-
"data-hook": c.DAY
|
|
164
|
-
});
|
|
165
|
-
};
|
|
166
|
-
B.Label = Ge;
|
|
167
|
-
B.Input = Je;
|
|
168
|
-
const x = ({ children: e, className: a }) => {
|
|
169
|
-
const { disabled: o, readOnly: s, showDateLabels: r } = _(), { labelId: l } = h(c.YEAR), { partValue: m, partError: i, onPartChange: u } = A(c.YEAR), d = p(e, x.Label), b = p(e, x.Input);
|
|
170
|
-
return /* @__PURE__ */ t.createElement("div", {
|
|
171
|
-
className: a,
|
|
172
|
-
"data-date-field": !0
|
|
173
|
-
}, r && d, /* @__PURE__ */ t.createElement(ne, {
|
|
174
|
-
"aria-labelledby": r ? l : void 0,
|
|
175
|
-
value: m,
|
|
176
|
-
onChange: u,
|
|
177
|
-
isDisabled: o,
|
|
178
|
-
isReadOnly: s,
|
|
179
|
-
isInvalid: i
|
|
180
|
-
}, b));
|
|
181
|
-
}, Ze = ({ className: e }) => /* @__PURE__ */ t.createElement(Z, {
|
|
182
|
-
datePart: c.YEAR,
|
|
183
|
-
className: e
|
|
184
|
-
}), et = ({ className: e }) => {
|
|
185
|
-
const { id: a, hidePlaceholder: o, autoComplete: s } = _(), { inputId: r } = h(c.YEAR), { isFirstPart: l } = A(c.YEAR), { t: m } = H(), i = Y(null), u = o ? void 0 : m("field.date.placeholder.year");
|
|
186
|
-
return k(() => {
|
|
187
|
-
var d;
|
|
188
|
-
l && ((d = i.current) == null || d.focus({
|
|
189
|
-
preventScroll: !0
|
|
190
|
-
}));
|
|
191
|
-
}, a), /* @__PURE__ */ t.createElement(re, {
|
|
192
|
-
ref: i,
|
|
193
|
-
id: r,
|
|
194
|
-
className: e,
|
|
195
|
-
placeholder: u,
|
|
196
|
-
autoComplete: J(s, c.YEAR),
|
|
197
|
-
maxLength: 4,
|
|
198
|
-
inputMode: "numeric",
|
|
199
|
-
"data-hook": c.YEAR
|
|
200
|
-
});
|
|
201
|
-
};
|
|
202
|
-
x.Label = Ze;
|
|
203
|
-
x.Input = et;
|
|
204
|
-
const w = ({ className: e, children: a }) => {
|
|
205
|
-
const { id: o, value: s, onChange: r, required: l, disabled: m, readOnly: i, hasError: u, autoComplete: d, onBlur: b, onFocus: N } = _(), { inputId: D, labelId: g, ariaDescribedBy: P } = j(), I = Y(null), L = Y(null);
|
|
206
|
-
k(() => {
|
|
207
|
-
var v;
|
|
208
|
-
(v = I.current) == null || v.focus({
|
|
209
|
-
preventScroll: !0
|
|
210
|
-
});
|
|
211
|
-
}, o);
|
|
212
|
-
const C = He(s), { announcement: R, announceCleared: M } = Te(!!C), S = !!C && !l && !m && !i, $ = p(a, w.Clear), z = se.map(a, (v) => /* @__PURE__ */ le(v) && v.type === w.Clear ? null : v), { className: K, stateProps: F } = we(e);
|
|
213
|
-
return /* @__PURE__ */ t.createElement(Se, {
|
|
214
|
-
ref: L,
|
|
215
|
-
groupLabelId: g,
|
|
216
|
-
announcement: R
|
|
217
|
-
}, /* @__PURE__ */ t.createElement(Ae, {
|
|
218
|
-
ref: I,
|
|
219
|
-
type: "date",
|
|
220
|
-
id: D,
|
|
221
|
-
className: K,
|
|
222
|
-
...Ie(F, {
|
|
223
|
-
onFocus: N,
|
|
224
|
-
onBlur: b
|
|
225
|
-
}),
|
|
226
|
-
"aria-labelledby": g,
|
|
227
|
-
"aria-describedby": P,
|
|
228
|
-
"aria-invalid": u || void 0,
|
|
229
|
-
autoComplete: d,
|
|
230
|
-
value: C,
|
|
231
|
-
onChange: r,
|
|
232
|
-
disabled: m,
|
|
233
|
-
readOnly: i,
|
|
234
|
-
required: l
|
|
235
|
-
}), z, S ? q($, {
|
|
236
|
-
input: I,
|
|
237
|
-
control: L,
|
|
238
|
-
labelId: g,
|
|
239
|
-
onClear: () => {
|
|
240
|
-
r(""), M();
|
|
241
|
-
}
|
|
242
|
-
}) : null);
|
|
243
|
-
};
|
|
244
|
-
w.Clear = Pe;
|
|
245
|
-
n.Label = Fe;
|
|
246
|
-
n.NativeDate = w;
|
|
247
|
-
n.Month = y;
|
|
248
|
-
n.Day = B;
|
|
249
|
-
n.Year = x;
|
|
250
|
-
n.Description = he;
|
|
251
|
-
n.Error = Le;
|
|
252
|
-
function h(e) {
|
|
253
|
-
const { inputId: a } = j();
|
|
254
|
-
return T(() => {
|
|
255
|
-
const o = e.toLowerCase();
|
|
256
|
-
return {
|
|
257
|
-
inputId: `${a}-${o}-input`,
|
|
258
|
-
labelId: `${a}-${o}-label`
|
|
259
|
-
};
|
|
260
|
-
}, [
|
|
261
|
-
a,
|
|
262
|
-
e
|
|
263
|
-
]);
|
|
264
|
-
}
|
|
265
|
-
function A(e) {
|
|
266
|
-
const { value: a, onChange: o, hasError: s = !1 } = _(), { regionalFormat: r } = G(), l = T(() => ce(a ?? ""), [
|
|
267
|
-
a
|
|
268
|
-
]), m = T(() => ie(s, a ?? ""), [
|
|
269
|
-
a,
|
|
270
|
-
s
|
|
271
|
-
]), i = l[e] || "", u = Q((b) => {
|
|
272
|
-
const N = me(b, e, l);
|
|
273
|
-
o(N);
|
|
274
|
-
}, [
|
|
275
|
-
o,
|
|
276
|
-
l,
|
|
277
|
-
e
|
|
278
|
-
]), d = T(() => te(r).filter(ae).map((D) => D.toUpperCase())[0] === e, [
|
|
279
|
-
r,
|
|
280
|
-
e
|
|
281
|
-
]);
|
|
282
|
-
return {
|
|
283
|
-
partValue: i,
|
|
284
|
-
partError: m[e],
|
|
285
|
-
onPartChange: u,
|
|
286
|
-
isFirstPart: d
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
function Z({ datePart: e, className: a }) {
|
|
290
|
-
const { inputId: o, labelId: s } = h(e), { t: r } = H(), l = `field.date.label.${e.toLowerCase()}`, m = r(l);
|
|
291
|
-
return /* @__PURE__ */ t.createElement("label", {
|
|
292
|
-
id: s,
|
|
293
|
-
htmlFor: o,
|
|
294
|
-
className: a
|
|
295
|
-
}, m);
|
|
296
|
-
}
|
|
297
|
-
const tt = "_fields_b2cgx_1", at = "_month_b2cgx_10", nt = "_day_b2cgx_11", rt = "_year_b2cgx_12", ot = "_dayInput_b2cgx_28", st = "_yearInput_b2cgx_29", lt = "_monthTrigger_b2cgx_33", ct = "_monthOption_b2cgx_53", O = {
|
|
298
|
-
fields: tt,
|
|
299
|
-
month: at,
|
|
300
|
-
day: nt,
|
|
301
|
-
year: rt,
|
|
302
|
-
dayInput: ot,
|
|
303
|
-
yearInput: st,
|
|
304
|
-
monthTrigger: lt,
|
|
305
|
-
monthOption: ct
|
|
306
|
-
}, it = ({ content: e, locale: a }) => /* @__PURE__ */ t.createElement(oe, {
|
|
307
|
-
content: e,
|
|
308
|
-
locale: a
|
|
309
|
-
}), Mt = () => {
|
|
310
|
-
const { t: e } = H(), a = V(fe, [
|
|
311
|
-
O.monthTrigger
|
|
312
|
-
]), o = qe(De, O.monthOption, Ke), s = V(X, [
|
|
313
|
-
O.dayInput
|
|
314
|
-
]), r = V(X, [
|
|
315
|
-
O.yearInput
|
|
316
|
-
]), l = V(X, [
|
|
317
|
-
E.nativeInput,
|
|
318
|
-
E.nativeWithLeadingIcon
|
|
319
|
-
]);
|
|
320
|
-
return /* @__PURE__ */ t.createElement(n, {
|
|
321
|
-
className: f(ue, O.fields)
|
|
322
|
-
}, /* @__PURE__ */ t.createElement(n.Label, {
|
|
323
|
-
className: f(de, E.label)
|
|
324
|
-
}, /* @__PURE__ */ t.createElement(n.Label.Required, {
|
|
325
|
-
className: f(pe, E.requiredMark)
|
|
326
|
-
})), /* @__PURE__ */ t.createElement(n.Month, {
|
|
327
|
-
className: O.month
|
|
328
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Label, {
|
|
329
|
-
className: f(W, E.label)
|
|
330
|
-
}), /* @__PURE__ */ t.createElement(n.Month.Trigger, {
|
|
331
|
-
className: a
|
|
332
|
-
}, /* @__PURE__ */ t.createElement($e, {
|
|
333
|
-
className: E.dropdownIcon
|
|
334
|
-
})), /* @__PURE__ */ t.createElement(n.Month.Options, {
|
|
335
|
-
className: f(Ee, E.selectPopover, E.dropdownPopover)
|
|
336
|
-
}, /* @__PURE__ */ t.createElement(n.Month.Options.Option, {
|
|
337
|
-
className: o
|
|
338
|
-
}))), /* @__PURE__ */ t.createElement(n.Day, {
|
|
339
|
-
className: O.day
|
|
340
|
-
}, /* @__PURE__ */ t.createElement(n.Day.Label, {
|
|
341
|
-
className: f(W, E.label)
|
|
342
|
-
}), /* @__PURE__ */ t.createElement(n.Day.Input, {
|
|
343
|
-
className: s
|
|
344
|
-
})), /* @__PURE__ */ t.createElement(n.Year, {
|
|
345
|
-
className: O.year
|
|
346
|
-
}, /* @__PURE__ */ t.createElement(n.Year.Label, {
|
|
347
|
-
className: f(W, E.label)
|
|
348
|
-
}), /* @__PURE__ */ t.createElement(n.Year.Input, {
|
|
349
|
-
className: r
|
|
350
|
-
})), /* @__PURE__ */ t.createElement(n.NativeDate, {
|
|
351
|
-
className: l
|
|
352
|
-
}, /* @__PURE__ */ t.createElement(Ve, {
|
|
353
|
-
className: f(E.nativeDecoration, E.nativeLeadingIcon)
|
|
354
|
-
}), /* @__PURE__ */ t.createElement(n.NativeDate.Clear, {
|
|
355
|
-
className: E.nativeClearButton,
|
|
356
|
-
"aria-label": e("date-picker.a11y.clear-button")
|
|
357
|
-
}, /* @__PURE__ */ t.createElement(Re, null))), /* @__PURE__ */ t.createElement(n.Error, {
|
|
358
|
-
className: f(be, E.error)
|
|
359
|
-
}, /* @__PURE__ */ t.createElement(ze, null), /* @__PURE__ */ t.createElement(n.Error.Text, null)), /* @__PURE__ */ t.createElement(n.Description, {
|
|
360
|
-
className: f(Ne, E.description)
|
|
361
|
-
}, it));
|
|
362
|
-
};
|
|
363
|
-
export {
|
|
364
|
-
Mt as D
|
|
365
|
-
};
|