@povio/ui 6.0.0-rc.1 → 6.0.0-rc.10
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/MIGRATION.md +28 -0
- package/README.md +10 -37
- package/dist/{Accordion-DQRdeDs1.js → Accordion-ORBin0EZ.js} +12 -118
- package/dist/{Alert-Cee_nKWj.d.ts → Alert-D4X7OWiv.d.ts} +3 -3
- package/dist/{AlertDialog-uNDUIyng.d.ts → AlertDialog-DklLDjmw.d.ts} +3 -3
- package/dist/{Autocomplete-D_4gEL7D.d.ts → Autocomplete-BgFz3kuR.d.ts} +1 -1
- package/dist/{Autocomplete-CWU9Ev3J.js → Autocomplete-CsJAU233.js} +15 -12
- package/dist/{Autocomplete.bound-D0pgmsHB.js → Autocomplete.bound-CGC8m4dK.js} +2 -2
- package/dist/{Autocomplete.bound-CqhZtdd8.d.ts → Autocomplete.bound-CpHZZ3C9.d.ts} +1 -1
- package/dist/{Badge-C4HI9XX4.d.ts → Badge-Db1ndK67.d.ts} +2 -2
- package/dist/{BadgeButton-h3MeQYcp.d.ts → BadgeButton-BPhWDAnc.d.ts} +2 -2
- package/dist/{BottomSheet-BQXSdxoX.d.ts → BottomSheet-BZmDJBR-.d.ts} +1 -1
- package/dist/{BottomSheet-z5brMtDt.js → BottomSheet-CGipksM_.js} +10 -10
- package/dist/{BottomSheet.lazy-BzvLg8Ea.d.ts → BottomSheet.lazy-CuJMUeJP.d.ts} +1 -1
- package/dist/{Breadcrumbs-B9O0_VSN.d.ts → Breadcrumbs-CcB0oOF8.d.ts} +1 -1
- package/dist/{Breadcrumbs-AbUBqBTq.js → Breadcrumbs-a1-q_he0.js} +15 -12
- package/dist/{Button-f7FPTaiN.d.ts → Button-0SswSdDg.d.ts} +1 -1
- package/dist/{Button-DER_6cxv.js → Button-BaODzvZd.js} +1 -1
- package/dist/{ButtonBase-CYTFS-xK.d.ts → ButtonBase-CZuEy3Pk.d.ts} +3 -3
- package/dist/{ButtonBase-CeFSNcVs.js → ButtonBase-s-VV7oCa.js} +8 -7
- package/dist/{ButtonContent-c7lJayVQ.js → ButtonContent-Dztbuz3q.js} +5 -14
- package/dist/{Calendar-DRQ536wk.js → Calendar-Cr6B7SDx.js} +25 -181
- package/dist/Calendar.lazy-MJisXRJK.js +131 -0
- package/dist/{CheckContent-D7sZPmzx.js → CheckContent-BKLnTPZr.js} +2 -2
- package/dist/{Checkbox-BI3DQPLa.js → Checkbox-Bjsbx-wK.js} +6 -6
- package/dist/{Checkbox-CCvC7OVT.d.ts → Checkbox-w2j5hLOQ.d.ts} +1 -1
- package/dist/{Checkbox.bound-CMZnF2_d.js → Checkbox.bound-D2nBglJz.js} +2 -2
- package/dist/{Checkbox.bound-DBt33Inx.d.ts → Checkbox.bound-DD_RCjVm.d.ts} +1 -1
- package/dist/CheckboxCheckmark-DWsYVZuu.js +25 -0
- package/dist/{CheckboxGroup-DQw4hsFa.js → CheckboxGroup-B3O3IUiu.js} +10 -8
- package/dist/{CheckboxGroup-MJ6crCZk.d.ts → CheckboxGroup-BYI15Y09.d.ts} +3 -3
- package/dist/{CheckboxGroup.bound-CTCdezUN.js → CheckboxGroup.bound-DY0HKGSh.js} +2 -2
- package/dist/{CheckboxGroup.bound-j2Sc8QtU.d.ts → CheckboxGroup.bound-QiJ-P0KR.d.ts} +1 -1
- package/dist/{ComboBox-DFlz6HJ8.js → ComboBox-ChsdI0lt.js} +2 -2
- package/dist/{DatePicker-CSm9c37c.js → DatePicker-D-YXdY2z.js} +17 -14
- package/dist/{DatePicker-umTISfvn.d.ts → DatePicker-QzfQf21b.d.ts} +3 -3
- package/dist/{DatePicker.bound-KLyoWNcX.d.ts → DatePicker.bound-DoCAqhM4.d.ts} +1 -1
- package/dist/{DatePicker.bound-Yqckg7Mk.js → DatePicker.bound-a-6NJTgy.js} +2 -2
- package/dist/{DatePickerInput-Cs9RwZfy.js → DatePickerInput-2CZtsxdK.js} +41 -288
- package/dist/{DatePickerInput-DwHQvLzi.d.ts → DatePickerInput-vLlL5ATh.d.ts} +3 -3
- package/dist/{DateRangePicker-hV_U1IK0.d.ts → DateRangePicker-3pPW0ZBV.d.ts} +3 -3
- package/dist/{DateRangePicker-s_4n-F_P.js → DateRangePicker-tuM8Qyvp.js} +45 -306
- package/dist/{DateRangePicker.bound-C1klxYW0.js → DateRangePicker.bound-B5SKOkVM.js} +2 -2
- package/dist/{DateRangePicker.bound-D-GPENNe.d.ts → DateRangePicker.bound-vFyFw4wA.d.ts} +1 -1
- package/dist/{DateTimePicker-411pU7VF.js → DateTimePicker-8BVP2qeR.js} +17 -14
- package/dist/{DateTimePicker-wgV0SUeZ.d.ts → DateTimePicker-BTRIUagV.d.ts} +3 -3
- package/dist/{DateTimePicker.bound-BDyUzidV.js → DateTimePicker.bound-C3y8TqPk.js} +2 -2
- package/dist/{DateTimePicker.bound-cF2X_ncj.d.ts → DateTimePicker.bound-X4DTyQ1b.d.ts} +1 -1
- package/dist/{Dialog-DSl1Fkqi.js → Dialog-Bn43feu0.js} +9 -9
- package/dist/{Dialog-lFYX-7Ax.js → Dialog-C9H9_BmK.js} +35 -6
- package/dist/{Dialog-V-2cgGk1.d.ts → Dialog-CO9xljD3.d.ts} +1 -1
- package/dist/Disclosure-BRSkMbZQ.js +109 -0
- package/dist/{DropdownMenu-DH7E2aXb.js → DropdownMenu-DS0RaEfH.js} +11 -29
- package/dist/{DropdownMenu-Bl_C5W_E.d.ts → DropdownMenu-D_9z9ond.d.ts} +2 -2
- package/dist/{DropdownMenuDesktop-nMoCa6N5.js → DropdownMenuDesktop-DGPIfex-.js} +6 -27
- package/dist/{FileInput-Q72yXorH.d.ts → FileInput-BEaECoBS.d.ts} +7 -7
- package/dist/{FileInput-CqRrQRM-.js → FileInput-DNCKhAq-.js} +20 -19
- package/dist/{FileInput.bound-CG2G5E2K.d.ts → FileInput.bound-D2HuuqSb.d.ts} +1 -1
- package/dist/{FileInput.bound-BZ7-g-dq.js → FileInput.bound-DCSair97.js} +2 -2
- package/dist/{FileTrigger-DBX1Io6E.js → FileTrigger-DlryDp2T.js} +1 -30
- package/dist/{FileUpload-B4ibHWQn.d.ts → FileUpload-BUTSqHVk.d.ts} +1 -1
- package/dist/{FileUpload-CG60c6wM.js → FileUpload-CQFCrvCI.js} +53 -134
- package/dist/{FileUpload.bound-DQ6uuH2W.js → FileUpload.bound-BwetBdi7.js} +2 -2
- package/dist/{FileUpload.bound-C-Zy1n5Y.d.ts → FileUpload.bound-CGQXb4iT.d.ts} +2 -2
- package/dist/{FileUploadContainer-CtUhDntB.d.ts → FileUploadContainer-Dzg5aXXZ.d.ts} +1 -1
- package/dist/{FormField-BIRMlgu4.d.ts → FormField-DGyCDxOp.d.ts} +5 -2
- package/dist/{FormField-D7KKJ6kG.js → FormField-dduTMkNH.js} +58 -37
- package/dist/{FormFieldError-Bqjg9cMb.js → FormFieldError-DTT5TUQ1.js} +2 -2
- package/dist/FormFieldHeaderTooltip-Dt-g40Tc.js +17 -0
- package/dist/FormLayout-CBYgWvwW.d.ts +47 -0
- package/dist/{IconButton-BM2DUNtN.d.ts → IconButton-shH_9wcl.d.ts} +1 -1
- package/dist/{IconSlot-DSK7qNxc.js → IconSlot-CqNuZl0E.js} +4 -4
- package/dist/{iconSlot.cva-BA9NahZH.d.ts → IconSlot-DcEDPaNb.d.ts} +3 -11
- package/dist/{InlineTooltipWrapper-DBuQX2yo.js → InlineTooltipWrapper-CKTiFpZn.js} +3 -3
- package/dist/{Input-CG4Irgae.js → Input-BIuNQb5u.js} +29 -13
- package/dist/{Input-BX3sZBEp.d.ts → Input-CTp_9mS9.d.ts} +3 -3
- package/dist/{Input.bound-BE-espm0.d.ts → Input.bound-B9a62ylL.d.ts} +1 -1
- package/dist/{Input.bound-jZx8gJro.js → Input.bound-QpE3qJqT.js} +2 -2
- package/dist/{InputContent-DDFr0kml.d.ts → InputContent-BCNkN4Fx.d.ts} +4 -4
- package/dist/{InputContent-KhD4_YvO.js → InputContent-C5JlwN5b.js} +35 -22
- package/dist/{Link-Bw2m9W4B.d.ts → Link-PvYB_M-j.d.ts} +5 -3
- package/dist/{ListBox-CoUk0kkt.js → ListBox-DhR5kojP.js} +3 -3
- package/dist/{MenuItem-DPZzOqp2.d.ts → MenuItem-U3-pu1j5.d.ts} +1 -1
- package/dist/{Modal-B4p1zFqi.js → Modal-DcLWF9cB.js} +1 -1
- package/dist/{NumberField-CxwTlqud.js → NumberField-CpkLBjIM.js} +38 -14
- package/dist/{NumberField-qjvHhCfN.d.ts → NumberField-WXebfxjK.d.ts} +4 -4
- package/dist/{NumberField.bound-zySl-v_q.js → NumberField.bound-BbZLqewF.js} +2 -2
- package/dist/{NumberField.bound-DXPGF5YK.d.ts → NumberField.bound-Dy0A5iVc.d.ts} +1 -1
- package/dist/{NumberRangeInput-BrW03wC6.js → NumberRangeInput-47xOaSXq.js} +18 -17
- package/dist/{NumberRangeInput-CS4Kn427.d.ts → NumberRangeInput-BCKQaGpy.d.ts} +2 -2
- package/dist/{NumberRangeInput.bound-CKywKEKI.js → NumberRangeInput.bound-B21y7xkb.js} +2 -2
- package/dist/{NumberRangeInput.bound-C8I7m1cW.d.ts → NumberRangeInput.bound-BNXxIQ0b.d.ts} +1 -1
- package/dist/PageHeader-BwzxymWY.d.ts +58 -0
- package/dist/{Pagination-DkpAg2x6.d.ts → Pagination-BCGUVYOF.d.ts} +1 -1
- package/dist/{PaginationList-PjOxNQwB.js → PaginationList-BTmrmOGl.js} +75 -74
- package/dist/{PaginationList-DNmZRcS6.d.ts → PaginationList-CvlSkJGn.d.ts} +1 -1
- package/dist/{PasswordInput-BHPFkVbM.d.ts → PasswordInput-EhQjYyJS.d.ts} +1 -1
- package/dist/{PasswordInput.bound-DC57m4NT.d.ts → PasswordInput.bound-CK5GwKL4.d.ts} +1 -1
- package/dist/{PasswordInput.bound-CrXKvfil.js → PasswordInput.bound-DVkRv16z.js} +3 -3
- package/dist/{Popover-pjd0Hu61.d.ts → Popover-D_t1XDPA.d.ts} +2 -2
- package/dist/{Progress-1WGRZE8l.d.ts → Progress-Ckfpi_-M.d.ts} +4 -4
- package/dist/{Progress-De76pCfX.js → Progress-RiEGGxNG.js} +3 -3
- package/dist/{RadioGroup-DEwQ6B1F.d.ts → RadioGroup-6e-Z6jW8.d.ts} +3 -3
- package/dist/{RadioGroup-BPSvcre6.js → RadioGroup-IL4Y8XHO.js} +11 -9
- package/dist/{RadioGroup.bound-CN4K9dV2.js → RadioGroup.bound-BFWSq-on.js} +2 -2
- package/dist/{RadioGroup.bound-Dj6CEG6M.d.ts → RadioGroup.bound-w3SZqSkH.d.ts} +1 -1
- package/dist/RangeCalendar-CAWTz3pq.js +288 -0
- package/dist/{RichTextEditor-BYIQW8QA.js → RichTextEditor-16feWcDW.js} +32 -409
- package/dist/{RichTextEditor-hJtuB7Y6.d.ts → RichTextEditor-DHhuBeT6.d.ts} +1 -1
- package/dist/{Select-DHYddedn.d.ts → Select-C34ENdjq.d.ts} +5 -3
- package/dist/{Select-Br_3eecr.js → Select-CSdr0OcD.js} +217 -468
- package/dist/{Select.bound-CgLKMzLn.js → Select.bound-D-Wl7nLz.js} +2 -2
- package/dist/{Select.bound-CJ-tCsmX.d.ts → Select.bound-qOihchei.d.ts} +1 -1
- package/dist/SelectListBox-DeiPWhOP.js +390 -0
- package/dist/SelectionIndicator-C3hniBa2.js +18 -0
- package/dist/SharedElementTransition-CZ2bE7yo.js +96 -0
- package/dist/SidebarWorkspaces-DDHJAdNH.d.ts +132 -0
- package/dist/SidebarWorkspaces-DJknAfS9.js +1298 -0
- package/dist/{Slider-CqB2TPTR.js → Slider-DCsCCPFx.js} +10 -11
- package/dist/{Slider-CcoNTFVN.d.ts → Slider-DRg8zKRM.d.ts} +1 -1
- package/dist/{Slider.bound-Bp7Zrs9_.js → Slider.bound-CByTXPTr.js} +2 -2
- package/dist/{Slider.bound-8B5qzQ-8.d.ts → Slider.bound-CaEF19um.d.ts} +1 -1
- package/dist/{Spinner-B-crRcdG.d.ts → Spinner-Cvy_6zgD.d.ts} +5 -5
- package/dist/{Spinner-BeVTUzzx.js → Spinner-DqjP06T1.js} +29 -41
- package/dist/{SplitButton-BzhbtpFA.d.ts → SplitButton-V1f2NWfh.d.ts} +3 -3
- package/dist/{Stepper-CMw6QnCu.js → Stepper-Dyhxp0Tl.js} +13 -12
- package/dist/{Stepper-LORgYAJr.d.ts → Stepper-k91x_m-E.d.ts} +18 -18
- package/dist/{Switch-R0kAicgM.js → Switch-BfpSMMpv.js} +6 -6
- package/dist/{Switch-CSitpm4o.d.ts → Switch-ELVPkPx0.d.ts} +1 -1
- package/dist/{Switch.bound-DVjqsum1.d.ts → Switch.bound-DeEdVvZV.d.ts} +1 -1
- package/dist/{Switch.bound-Dk-BmxJd.js → Switch.bound-Dv0cHsMM.js} +2 -2
- package/dist/TableRowDetails-D8HFTghI.d.ts +109 -0
- package/dist/TabsFilters-CvYxvrud.js +223 -0
- package/dist/TabsFilters-DePddjCk.d.ts +30 -0
- package/dist/Tag-B2_ZiSE-.d.ts +44 -0
- package/dist/{TextArea-DCnqXuHC.js → TextArea-ciY0kt-D.js} +8 -7
- package/dist/{TextArea-e8sQm205.d.ts → TextArea-iqUeB2QY.d.ts} +2 -2
- package/dist/{TextArea.bound-DEZuRYm_.d.ts → TextArea.bound-BJHyCogp.d.ts} +1 -1
- package/dist/{TextArea.bound-BJZ9m_FE.js → TextArea.bound-DQ_ULvue.js} +2 -2
- package/dist/{TextArea.cva-Bb73hriz.js → TextArea.cva-ENXI55ec.js} +1 -1
- package/dist/{TimePicker-BwF-Crbg.js → TimePicker-BKRPMduC.js} +20 -18
- package/dist/{TimePicker-Zi7B6VTr.d.ts → TimePicker-BZ1ocsBX.d.ts} +2 -2
- package/dist/{TimePicker.bound-Bxtb6uJL.d.ts → TimePicker.bound-8DmjMXuE.d.ts} +1 -1
- package/dist/{TimePicker.bound-B-BVLNbk.js → TimePicker.bound-PtJTz6s3.js} +2 -2
- package/dist/{datePickerValue.utils-OAQBDk1R.js → TimePickerForm-itDjoV7V.js} +12 -16
- package/dist/{Toast-Dl6KMa58.d.ts → Toast-D9pdadZ4.d.ts} +1 -1
- package/dist/{ToastContainer-BDvta6st.js → ToastContainer-Dd0LPykL.js} +5 -5
- package/dist/{ToggleButton-Cce9bnBw.d.ts → ToggleButton-HUZ8ij6i.d.ts} +1 -1
- package/dist/{ToggleButton-DUQ8nwKY.js → ToggleButton-P1z1pxzT.js} +2 -2
- package/dist/{ToggleGroup-s5sDSB6l.js → ToggleGroup-CrDoeLN0.js} +127 -114
- package/dist/{ToggleGroup-BJ8cqXaO.d.ts → ToggleGroup-DvjnSinl.d.ts} +5 -23
- package/dist/{ToggleGroup.bound-Cv09n91n.d.ts → ToggleGroup.bound-B03ISHQ8.d.ts} +1 -1
- package/dist/{ToggleGroup.bound-DEc7rdNF.js → ToggleGroup.bound-DCnYwmBt.js} +2 -2
- package/dist/{Tooltip-BiS7isYB.d.ts → Tooltip-B8DTURLQ.d.ts} +1 -1
- package/dist/{Tooltip-CMigoyri.js → Tooltip-DRB6lo0U.js} +8 -44
- package/dist/{TooltipWrapper-D7HUZLsP.js → TooltipWrapper-BvGO_LUx.js} +21 -10
- package/dist/{Typography-LU4z2pR1.js → Typography-DCLnPa3P.js} +2 -2
- package/dist/{Typography-D2FfZr7a.d.ts → Typography-DJojwiXV.d.ts} +2 -2
- package/dist/{accordion.cva-CeBWV9EO.js → accordion.cva-DwxY-k1e.js} +17 -25
- package/dist/{badgeButton.cva-B8EQLwPv.d.ts → badgeButton.cva-CBFIhr1S.d.ts} +8 -8
- package/dist/badgeButton.cva-t5PQOH4M.js +138 -0
- package/dist/{breadcrumbs.cva-DPwJJK_D.js → breadcrumbs.cva-CnBIZUB3.js} +9 -9
- package/dist/{button.cva-CBckM91c.d.ts → button.cva-C8LGtNJ3.d.ts} +21 -16
- package/dist/button.cva-Ciga0rdG.js +267 -0
- package/dist/{buttonContent.cva-DG-4lRz4.d.ts → buttonContent.cva-BapnODby.d.ts} +2 -2
- package/dist/{checkbox.cva-CJy87xUo.d.ts → checkbox.cva-CCh_UlrC.d.ts} +6 -6
- package/dist/{checkbox.cva-D-D9Qgaf.js → checkbox.cva-aLJS7v4z.js} +24 -33
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +98 -103
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +11 -11
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge-button.d.ts +1 -1
- package/dist/components/badge-button.js +5 -5
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/badge.js +9 -9
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +13 -12
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +3 -3
- package/dist/components/breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.d.ts +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.d.ts +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.js +4 -4
- package/dist/components/dropdown-menu.d.ts +2 -2
- package/dist/components/dropdown-menu.js +2 -2
- package/dist/components/file-input.d.ts +1 -1
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload-container.d.ts +2 -2
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.d.ts +2 -2
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/form-layout.d.ts +2 -0
- package/dist/components/form-layout.js +80 -0
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +2 -2
- package/dist/components/icon-slot.d.ts +2 -1
- package/dist/components/icon-slot.js +1 -1
- package/dist/components/input-frame.d.ts +5 -4
- package/dist/components/input-frame.js +48 -33
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +1 -1
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +3 -3
- package/dist/components/number-field.d.ts +1 -1
- package/dist/components/number-field.js +1 -1
- package/dist/components/number-range-input.d.ts +1 -1
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +2 -0
- package/dist/components/page-header.js +205 -0
- package/dist/components/pagination-list.d.ts +1 -1
- package/dist/components/pagination-list.js +1 -1
- package/dist/components/pagination.d.ts +1 -1
- package/dist/components/pagination.js +8 -8
- package/dist/components/password-input.d.ts +1 -1
- package/dist/components/password-input.js +3 -3
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +4 -4
- package/dist/components/progress.d.ts +1 -1
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +1 -1
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +2 -0
- package/dist/components/slider.d.ts +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +3 -3
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +2 -2
- package/dist/components/style-definitions.js +31 -30
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +2 -0
- package/dist/components/tabs-filters.js +2 -0
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +8 -8
- package/dist/components/text-area.d.ts +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +1 -1
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +2 -2
- package/dist/components/toast.js +2 -2
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.d.ts +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.js +2 -2
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/typography.d.ts +2 -2
- package/dist/components/typography.js +1 -1
- package/dist/components/use-toast.d.ts +1 -1
- package/dist/components/use-toast.js +2 -2
- package/dist/config/component-configuration.d.ts +2 -2
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +2 -2
- package/dist/config/link-context.js +1 -1
- package/dist/config/resources.d.ts +1 -1
- package/dist/config/resources.js +1 -1
- package/dist/config/theme-context.js +1 -1
- package/dist/config/ui-config.d.ts +2 -2
- package/dist/config/ui-config.js +1 -1
- package/dist/config/ui-overrides.d.ts +1 -1
- package/dist/config/ui-overrides.js +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/{confirmation.context-BSn1s-ip.js → confirmation.context-CByUxDcn.js} +2 -2
- package/dist/{confirmation.context-B2z9A1v3.d.ts → confirmation.context-C_GDRn3a.d.ts} +1 -1
- package/dist/{datePickerInput.cva-Cd7UUN61.js → datePickerInput.cva-Du0Zn04v.js} +2 -2
- package/dist/datePickerValue.utils-CkmPaD6I.js +4 -0
- package/dist/{dialog.cva-sioU_5R7.js → dialog.cva-BIpz6HcA.js} +7 -7
- package/dist/{dist-CAFUM34b.js → dist-DEZzXa0W.js} +15 -14
- package/dist/dropdownMenu.cva-DwSOcbmR.js +31 -0
- package/dist/{fileUpload.cva-ujmStxB1.js → fileUpload.cva-BYzXGc9C.js} +11 -11
- package/dist/{fileUpload.types-BT8P1o7a.d.ts → fileUpload.types-C-ke21yY.d.ts} +2 -2
- package/dist/{form.binding-B-2id68q.js → form.binding-DOR5gIQf.js} +1 -1
- package/dist/{formFieldError.cva-CTl0VeyG.js → formFieldError.cva-BB6Ghqwq.js} +3 -3
- package/dist/formFieldHelper.cva-DRmSyRZN.js +14 -0
- package/dist/formLayout.context--CN08Mtb.js +14 -0
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-filters.js +1 -1
- package/dist/hooks/use-local-storage.js +1 -1
- package/dist/{i18n-BjNKHh_D.js → i18n-D1FWVTPi.js} +4 -2
- package/dist/{i18n-2z5on9No.d.ts → i18n-DE45mOCM.d.ts} +6 -0
- package/dist/iconSlot.cva-CLB5Tlsr.d.ts +9 -0
- package/dist/icons.d.ts +2 -1
- package/dist/icons.js +3 -3
- package/dist/import-C14g8ng0.js +251 -0
- package/dist/index.d.ts +78 -73
- package/dist/index.js +95 -91
- package/dist/{input.cva-L7jKDv6q.d.ts → input.cva-BjuHsDGy.d.ts} +11 -11
- package/dist/input.cva-DZii82eS.js +185 -0
- package/dist/inputLayout-KdAtunGk.js +5 -0
- package/dist/label.cva-DTfT6FrX.js +85 -0
- package/dist/{link.context-C4fE_aMo.d.ts → link.context-BCHn7NSy.d.ts} +1 -1
- package/dist/link.cva-C24YVAsJ.js +16 -0
- package/dist/outline.clsx-DGGQQRkM.js +6 -0
- package/dist/popover.cva-DAbfSma6.js +5 -0
- package/dist/{progress.cva-D7iiX6Lh.js → progress.cva-CsGaGVJ-.js} +7 -7
- package/dist/{radio.cva-DO3UEac-.d.ts → radio.cva-D7M1hqLe.d.ts} +9 -5
- package/dist/{radio.cva-Ctdop1xV.js → radio.cva-DistaZtZ.js} +33 -19
- package/dist/rich-text-editor.d.ts +1 -1
- package/dist/rich-text-editor.js +1 -1
- package/dist/{selectDesktop.cva-RzxvSBkd.js → selectDesktop.cva-DStkOdwm.js} +2 -2
- package/dist/selectItem.cva-B6vxey2R.js +27 -0
- package/dist/{staticDateTimeSegments-Bt5wCZvg.js → staticDateTimeSegments-bPuA-a2Y.js} +12 -12
- package/dist/{status.cva-BFGMKZO_.js → status.cva-CYgi3Htz.js} +21 -21
- package/dist/{stepper.cva-CpRi0fGb.js → stepper.cva-Cecphqeo.js} +23 -35
- package/dist/{style-definitions-_RXJdSk-.d.ts → style-definitions-Dx6aFDiR.d.ts} +159 -144
- package/dist/styles/editor.css +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/styles/outline.js +1 -1
- package/dist/switch.cva-BT0kGRIk.js +24 -0
- package/dist/switch.cva-r6vcS25Q.d.ts +16 -0
- package/dist/table.cva-DkcsOmZG.js +147 -0
- package/dist/tag.cva-ExMNsTN-.js +24 -0
- package/dist/tanstack/autocomplete.d.ts +2 -2
- package/dist/tanstack/autocomplete.js +1 -1
- package/dist/tanstack/checkbox-group.d.ts +2 -2
- package/dist/tanstack/checkbox-group.js +1 -1
- package/dist/tanstack/checkbox.d.ts +2 -2
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.d.ts +2 -2
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.d.ts +2 -2
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.d.ts +2 -2
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-input.d.ts +2 -2
- package/dist/tanstack/file-input.js +1 -1
- package/dist/tanstack/file-upload.d.ts +3 -3
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.js +2 -2
- package/dist/tanstack/input.d.ts +2 -2
- package/dist/tanstack/input.js +1 -1
- package/dist/tanstack/number-field.d.ts +2 -2
- package/dist/tanstack/number-field.js +1 -1
- package/dist/tanstack/number-range-input.d.ts +2 -2
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/password-input.d.ts +1 -1
- package/dist/tanstack/password-input.js +1 -1
- package/dist/tanstack/radio-group.d.ts +2 -2
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/rich-text-editor.d.ts +1 -1
- package/dist/tanstack/rich-text-editor.js +2 -2
- package/dist/tanstack/select.d.ts +2 -2
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.d.ts +2 -2
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/switch.d.ts +2 -2
- package/dist/tanstack/switch.js +1 -1
- package/dist/tanstack/table.d.ts +3 -3
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.d.ts +2 -2
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/time-picker.d.ts +2 -2
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle-group.d.ts +2 -2
- package/dist/tanstack/toggle-group.js +1 -1
- package/dist/{tanstack-CmbhAoHU.js → tanstack-Bgdv0qU1.js} +2 -1
- package/dist/{tanstack-DQu9PNjn.d.ts → tanstack-zusJduSB.d.ts} +195 -96
- package/dist/tanstack.d.ts +78 -73
- package/dist/tanstack.js +95 -91
- package/dist/{theme.context-B3wQDJ-i.js → theme.context--VEyStJB.js} +2 -2
- package/dist/{toast.cva-L0k_TBiW.d.ts → toast.cva-AmLw6Cf5.d.ts} +10 -10
- package/dist/{toast.cva-aC4NMpLb.js → toast.cva-B6NXTwbZ.js} +22 -38
- package/dist/{toast.runtime-DKOeUnk6.js → toast.runtime-Drd2IJ_j.js} +1 -1
- package/dist/toggleGroup.cva-CJ-3Ps7j.js +35 -0
- package/dist/toggleGroup.cva-DA4U21gn.d.ts +26 -0
- package/dist/{tooltip.cva-ClcaR72U.js → tooltip.cva-BEyxvcG2.js} +11 -11
- package/dist/{tooltipWrapper.cva-BBQ4ic3D.js → tooltipWrapper.cva-t4NQ9zz9.js} +1 -1
- package/dist/typography.cva-BCHlTHdM.d.ts +36 -0
- package/dist/typography.cva-CHsHX_Wp.js +31 -0
- package/dist/{uiConfig.context-CT9EVqC5.js → uiConfig.context-3DN9w6oU.js} +19 -114
- package/dist/{uiConfig.context-CQU9Tzq_.d.ts → uiConfig.context-BnCORTNm.d.ts} +22 -9
- package/dist/{uiOverrides.context-Dmev7iRS.d.ts → uiOverrides.context-DHHzLSnq.d.ts} +23 -0
- package/dist/{useBreakpoint-BzYqQEBO.js → useBreakpoint-CJ3mx7UF.js} +6 -6
- package/dist/{useFilters-HIngImwn.js → useFilters-DMi94RZK.js} +2 -2
- package/dist/{useFormAutosave-XEQqk1lK.js → useFormAutosave-BPGlChiY.js} +1 -1
- package/dist/useScrollableListBox-oYKqU3Hp.js +47 -0
- package/dist/{useStaticInputHandoff-DyYxfwv6.js → useStaticInputHandoff-BN0fOerH.js} +9 -10
- package/dist/useTableColumnConfig-D5NxR1Co.js +2060 -0
- package/dist/{useTableNav-rU9WmCj6.d.ts → useTableNav-H5DrogZU.d.ts} +29 -44
- package/dist/{useToast-DfQif03I.d.ts → useToast-DsA8CVoY.d.ts} +1 -1
- package/package.json +22 -5
- package/dist/CheckboxCheckmark-BzT6MwH5.js +0 -47
- package/dist/FormFieldHeaderTooltip-k8Snf_oM.js +0 -47
- package/dist/SelectionIndicator-B7C5Y0JM.js +0 -5
- package/dist/SharedElementTransition-DJ9CCbEa.js +0 -12
- package/dist/Tag-CoqCTZRm.d.ts +0 -44
- package/dist/badgeButton.cva-BPyVejxO.js +0 -300
- package/dist/button.cva-vO0fPUTn.js +0 -423
- package/dist/check-DYMBkp_Z.js +0 -20
- package/dist/chevron-down-B4Pr8bD3.js +0 -20
- package/dist/chevron-right-3nKJR5Bb.js +0 -20
- package/dist/chevrons-right-DJPPn2fD.js +0 -44
- package/dist/createLucideIcon-LcezOE4z.js +0 -240
- package/dist/dropdownMenu.cva-Bi3a21lO.js +0 -34
- package/dist/eye-BA4nRlMX.js +0 -57
- package/dist/formFieldHelper.cva-CxAmrG2H.js +0 -97
- package/dist/input.cva-w7ZEVQAM.js +0 -227
- package/dist/link.cva-D3XRgcAv.js +0 -12
- package/dist/outline.clsx-50W_vNDl.js +0 -6
- package/dist/popover.cva-Bhud1wnp.js +0 -5
- package/dist/selectItem.cva-BWfEkNs_.js +0 -36
- package/dist/styles/color-utilities.css +0 -20
- package/dist/switch.cva-BsJ4iAFl.js +0 -27
- package/dist/switch.cva-psw67dK9.d.ts +0 -16
- package/dist/table.cva-CmfeWLyW.d.ts +0 -84
- package/dist/table.cva-DFQM8VbM.js +0 -111
- package/dist/tag.cva-BCCH7ku3.js +0 -55
- package/dist/toggleGroup.cva-CEhjMT4j.js +0 -35
- package/dist/typography.cva-GpC6QQNx.d.ts +0 -36
- package/dist/typography.cva-iD15k56p.js +0 -51
- package/dist/useTableColumnConfig-CUINwVTR.js +0 -1348
- package/dist/x-B6vfz8Ps.js +0 -23
- package/dist/{dom.utils-BbfrA6RP.js → dom.utils-BPooTXtC.js} +1 -1
- package/dist/{link.context-J7aQtMOr.js → link.context-TPjDtjw3.js} +1 -1
- package/dist/{router.context-B4FvsTim.js → router.context-MckTbHw9.js} +1 -1
- package/dist/{uiOverrides.context-BTCH9y5a.js → uiOverrides.context-DNEQlTx0.js} +1 -1
- package/dist/{useAsyncList-yHz7twsj.js → useAsyncList-Ct74ve3i.js} +1 -1
- package/dist/{useForm-eW4KpH1u.js → useForm-Cb7KWLds.js} +1 -1
- package/dist/{useIntersectionObserver-DYfHnGGU.js → useIntersectionObserver-DFAhTsV0.js} +1 -1
- package/dist/{useLocalStorage-PlcaJ1tP.js → useLocalStorage-CctQvyqD.js} +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/components/inputs/FormField/formLayout.context.d.ts
|
|
3
|
+
/** Where a form's labels sit: above their fields, or in a column beside them. */
|
|
4
|
+
type FormLabelPosition = "top" | "side";
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/components/inputs/FormField/FormLayout.d.ts
|
|
7
|
+
interface FormLayoutProps {
|
|
8
|
+
/**
|
|
9
|
+
* `side` for long forms people use day to day; `top` for short forms (signing up, logging in) and places with
|
|
10
|
+
* no horizontal space to spare. Side labels move above their fields below 480px of the form's own width.
|
|
11
|
+
*/
|
|
12
|
+
labelPosition?: FormLabelPosition;
|
|
13
|
+
className?: string;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* One column of fields, each with a visible label, then the actions. Every @povio/ui field inside follows the
|
|
18
|
+
* label position, so it is set once for the whole form.
|
|
19
|
+
*/
|
|
20
|
+
declare const FormLayout: ({ labelPosition, className, children }: FormLayoutProps) => import("react").JSX.Element;
|
|
21
|
+
interface FormLayoutSectionProps {
|
|
22
|
+
title: string;
|
|
23
|
+
className?: string;
|
|
24
|
+
}
|
|
25
|
+
/** Starts a group of fields. With side labels it sits in the label column. */
|
|
26
|
+
declare const FormLayoutSection: ({ title, className }: FormLayoutSectionProps) => import("react").JSX.Element;
|
|
27
|
+
interface FormLayoutRowProps {
|
|
28
|
+
label: string;
|
|
29
|
+
helperText?: string;
|
|
30
|
+
/** A list of checkboxes; with side labels a faint line runs under it. */
|
|
31
|
+
isChoiceList?: boolean;
|
|
32
|
+
className?: string;
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
}
|
|
35
|
+
/** A labelled row for content that brings no label of its own, such as a single checkbox or a list of rows. */
|
|
36
|
+
declare const FormLayoutRow: ({ label, helperText, isChoiceList, className, children }: FormLayoutRowProps) => import("react").JSX.Element;
|
|
37
|
+
interface FormLayoutActionsProps {
|
|
38
|
+
className?: string;
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The form's actions, in line with the labels: the primary action first, the way out quieter after it. With side
|
|
43
|
+
* labels a line as wide as the label and field columns sets them apart.
|
|
44
|
+
*/
|
|
45
|
+
declare const FormLayoutActions: ({ className, children }: FormLayoutActionsProps) => import("react").JSX.Element;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { FormLayoutRow as a, FormLayoutSectionProps as c, FormLayoutProps as i, FormLabelPosition as l, FormLayoutActions as n, FormLayoutRowProps as o, FormLayoutActionsProps as r, FormLayoutSection as s, FormLayout as t };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
|
-
import { t as UIOverrides } from "./uiOverrides.context-
|
|
3
|
-
import { cloneElement, isValidElement } from "react";
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
4
3
|
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { cloneElement, isValidElement } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/shared/IconSlot/iconSlot.cva.ts
|
|
7
|
-
const iconSlotDefinition = UIOverrides.defineConfig({ base: ["inline-flex size-
|
|
7
|
+
const iconSlotDefinition = UIOverrides.defineConfig({ base: ["inline-flex size-4 shrink-0 items-center justify-center", "[&>svg]:size-[calc(var(--icons-scale,1)*100%)] [&>svg]:shrink-0"] });
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/components/shared/IconSlot/IconSlot.tsx
|
|
10
|
-
/** Reserves
|
|
10
|
+
/** Reserves a size-4 slot and centers the SVG inside it. */
|
|
11
11
|
const IconSlot = (t0) => {
|
|
12
12
|
const $ = c(17);
|
|
13
13
|
const { icon, scale, iconClassName, className, style, ...props } = t0;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
import { n as StyleMergeUtils } from "./uiOverrides.context-Dmev7iRS.js";
|
|
2
|
-
import "./style-definitions-_RXJdSk-.js";
|
|
3
1
|
import { ComponentPropsWithRef, FC, ReactElement, SVGProps } from "react";
|
|
4
2
|
//#region src/components/shared/IconSlot/IconSlot.d.ts
|
|
5
3
|
type IconSlotIcon = FC<SVGProps<SVGSVGElement>> | ReactElement;
|
|
6
4
|
interface IconSlotProps extends Omit<ComponentPropsWithRef<"span">, "children"> {
|
|
7
5
|
icon: IconSlotIcon;
|
|
8
|
-
/** Fraction of the slot occupied by the SVG. Defaults to --icons-scale, or
|
|
6
|
+
/** Fraction of the slot occupied by the SVG. Defaults to --icons-scale, or 1. */
|
|
9
7
|
scale?: number;
|
|
10
8
|
/** Classes for the SVG; className styles the outer slot. */
|
|
11
9
|
iconClassName?: string;
|
|
12
10
|
}
|
|
13
|
-
/** Reserves
|
|
11
|
+
/** Reserves a size-4 slot and centers the SVG inside it. */
|
|
14
12
|
declare const IconSlot: ({ icon, scale, iconClassName, className, style, ...props }: IconSlotProps) => import("react").JSX.Element;
|
|
15
13
|
//#endregion
|
|
16
|
-
|
|
17
|
-
declare const iconSlotDefinition: {
|
|
18
|
-
base: string[];
|
|
19
|
-
config?: StyleMergeUtils.Config<Record<never, never>>;
|
|
20
|
-
};
|
|
21
|
-
//#endregion
|
|
22
|
-
export { IconSlotProps as i, IconSlot as n, IconSlotIcon as r, iconSlotDefinition as t };
|
|
14
|
+
export { IconSlotIcon as n, IconSlotProps as r, IconSlot as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as tooltipWrapperTriggerDefinition } from "./tooltipWrapper.cva-
|
|
1
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
2
|
+
import { t as Tooltip } from "./Tooltip-DRB6lo0U.js";
|
|
3
|
+
import { t as tooltipWrapperTriggerDefinition } from "./tooltipWrapper.cva-t4NQ9zz9.js";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/inputs/shared/InlineTooltipWrapper.tsx
|
|
6
6
|
const InlineTooltipWrapper = ({ children, error, triggerClassName, triggerTabIndex }) => {
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { t as UIConfig } from "./uiConfig.context-CT9EVqC5.js";
|
|
2
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
3
|
-
import { t as UIOverrides } from "./uiOverrides.context-
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
4
3
|
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./Input-BG0Xjw5X.js";
|
|
4
|
+
import { t as UIConfig } from "./uiConfig.context-3DN9w6oU.js";
|
|
5
5
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
6
6
|
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
7
|
-
import { t as FormField } from "./FormField-
|
|
8
|
-
import { t as inputBaseDefinition } from "./input.cva-
|
|
9
|
-
import {
|
|
10
|
-
import { t as TooltipWrapper } from "./TooltipWrapper-
|
|
7
|
+
import { t as FormField } from "./FormField-dduTMkNH.js";
|
|
8
|
+
import { t as inputBaseDefinition } from "./input.cva-DZii82eS.js";
|
|
9
|
+
import { t as resolveInputLayout } from "./inputLayout-KdAtunGk.js";
|
|
10
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-BvGO_LUx.js";
|
|
11
|
+
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-BN0fOerH.js";
|
|
11
12
|
import { InputFrame } from "./components/input-frame.js";
|
|
12
|
-
import { t as InputContent } from "./InputContent-
|
|
13
|
+
import { n as clearInput, t as InputContent } from "./InputContent-C5JlwN5b.js";
|
|
13
14
|
import { memo, useEffect, useRef, useState } from "react";
|
|
14
15
|
import { jsx } from "react/jsx-runtime";
|
|
15
16
|
import { useFocusVisible } from "@react-aria/interactions";
|
|
@@ -20,9 +21,10 @@ const InputBase = (props) => {
|
|
|
20
21
|
const ui = UIConfig.useConfig();
|
|
21
22
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
22
23
|
const inputRef = useRef(null);
|
|
23
|
-
const { ref, inputClassName, label, tooltipText, helperText, isRequired, required, rightContent, isDisabled, disabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, errorMessage, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, as: asProp, layout: layoutProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, autoFocusOnMount, ...rest } = props;
|
|
24
|
-
const as = layoutProp
|
|
24
|
+
const { ref, inputClassName, label, tooltipText, helperText, isRequired, required, rightContent, isDisabled, disabled, isReadOnly, readOnly, isDirty, headerClassName, errorClassName, isHeaderHidden, error, errorMessage, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, as: asProp, layout: layoutProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, autoFocusOnMount, ...rest } = props;
|
|
25
|
+
const as = resolveInputLayout(layoutProp, asProp, ui.input.as);
|
|
25
26
|
const resolvedIsDisabled = isDisabled ?? disabled;
|
|
27
|
+
const resolvedIsReadOnly = isReadOnly ?? readOnly;
|
|
26
28
|
const resolvedIsRequired = isRequired ?? required;
|
|
27
29
|
const resolvedError = errorMessage ?? error;
|
|
28
30
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
@@ -36,6 +38,7 @@ const InputBase = (props) => {
|
|
|
36
38
|
...rest,
|
|
37
39
|
label,
|
|
38
40
|
isDisabled: resolvedIsDisabled,
|
|
41
|
+
isReadOnly: resolvedIsReadOnly,
|
|
39
42
|
isInvalid: !!resolvedError,
|
|
40
43
|
isRequired: resolvedIsRequired,
|
|
41
44
|
value: inputValue,
|
|
@@ -105,7 +108,7 @@ const InputBase = (props) => {
|
|
|
105
108
|
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
106
109
|
"data-is-required": resolvedIsRequired || void 0,
|
|
107
110
|
children: /* @__PURE__ */ jsx("div", {
|
|
108
|
-
className: clsx("relative flex cursor-text
|
|
111
|
+
className: clsx("relative flex cursor-text", inputBaseCva({
|
|
109
112
|
variant,
|
|
110
113
|
as,
|
|
111
114
|
...rest
|
|
@@ -116,6 +119,8 @@ const InputBase = (props) => {
|
|
|
116
119
|
"data-is-disabled": dataIsDisabled,
|
|
117
120
|
children: /* @__PURE__ */ jsx(InputContent, {
|
|
118
121
|
...inputContentProps,
|
|
122
|
+
inputRef,
|
|
123
|
+
isReadOnly: resolvedIsReadOnly,
|
|
119
124
|
headerProps,
|
|
120
125
|
as,
|
|
121
126
|
size,
|
|
@@ -163,8 +168,10 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
163
168
|
if (!renderInput) {
|
|
164
169
|
const staticValue = props.value ?? props.defaultValue ?? "";
|
|
165
170
|
const inputType = props.type;
|
|
166
|
-
const as = props.as
|
|
167
|
-
|
|
171
|
+
const as = resolveInputLayout(props.layout, props.as, ui.input.as);
|
|
172
|
+
const isRequired = props.isRequired ?? props.required;
|
|
173
|
+
const isReadOnly = props.isReadOnly ?? props.readOnly;
|
|
174
|
+
let isDisabled = !!(props.isDisabled ?? props.disabled);
|
|
168
175
|
if (isFormControlDisabled) isDisabled = true;
|
|
169
176
|
const maskedPasswordValue = inputType === "password" && `${staticValue}`.length > 0 ? "•".repeat(`${staticValue}`.length) : staticValue;
|
|
170
177
|
const displayValue = maskedPasswordValue == null ? "" : `${maskedPasswordValue}`;
|
|
@@ -173,7 +180,7 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
173
180
|
dataIsEmpty: !hasValue,
|
|
174
181
|
dataIsFilled: hasValue,
|
|
175
182
|
dataIsDirty: props.isDirty,
|
|
176
|
-
dataIsRequired:
|
|
183
|
+
dataIsRequired: isRequired,
|
|
177
184
|
dataIsDisabled: isDisabled,
|
|
178
185
|
dataDisabled: isDisabled,
|
|
179
186
|
dataInvalid: !!(props.errorMessage ?? props.error),
|
|
@@ -181,10 +188,18 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
181
188
|
};
|
|
182
189
|
return /* @__PURE__ */ jsx(InputFrame, {
|
|
183
190
|
...props,
|
|
191
|
+
as,
|
|
192
|
+
isRequired,
|
|
184
193
|
error: props.errorMessage ?? props.error,
|
|
185
194
|
isDisabled,
|
|
186
195
|
className: clsx("group w-full", as === "inline" && "h-full", props.className),
|
|
187
196
|
dataAttributes,
|
|
197
|
+
isClearable: (props.isClearable ?? ui.input.isClearable) && !isReadOnly,
|
|
198
|
+
showClear: hasValue && !isReadOnly,
|
|
199
|
+
onClear: () => {
|
|
200
|
+
if (isReadOnly) return;
|
|
201
|
+
clearInput(inputRef.current, () => props.onChange?.(""), props.onBlur);
|
|
202
|
+
},
|
|
188
203
|
onStaticInteract: renderRealInput,
|
|
189
204
|
onStaticPress: props.action ? replayStaticInputPress : void 0,
|
|
190
205
|
staticPressTarget: "action",
|
|
@@ -197,6 +212,7 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
197
212
|
ref: inputRef,
|
|
198
213
|
type: inputType === "hidden" ? "password" : inputType,
|
|
199
214
|
disabled: isDisabled,
|
|
215
|
+
readOnly: isReadOnly,
|
|
200
216
|
tabIndex: -1,
|
|
201
217
|
value: displayValue,
|
|
202
218
|
placeholder: as === "floating" ? "" : props.placeholder,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as FormFieldProps } from "./FormField-
|
|
2
|
-
import { n as InputVariantProps } from "./input.cva-
|
|
3
|
-
import { t as InputContentProps } from "./InputContent-
|
|
1
|
+
import { n as FormFieldProps } from "./FormField-DGyCDxOp.js";
|
|
2
|
+
import { n as InputVariantProps } from "./input.cva-BjuHsDGy.js";
|
|
3
|
+
import { t as InputContentProps } from "./InputContent-BCNkN4Fx.js";
|
|
4
4
|
import { Ref } from "react";
|
|
5
5
|
import { InputProps } from "react-aria-components";
|
|
6
6
|
import { AriaTextFieldProps } from "@react-aria/textfield";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as InputProps$1 } from "./Input-
|
|
1
|
+
import { i as InputProps$1 } from "./Input-CTp_9mS9.js";
|
|
2
2
|
import { n as FieldValues, t as FormControlProps } from "./form.types-C8P4sznq.js";
|
|
3
3
|
//#region src/components/inputs/Input/Input.bound.d.ts
|
|
4
4
|
type ControlledInputProps<TFieldValues extends Record<string, unknown>> = FormControlProps<InputProps$1, TFieldValues>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
2
|
-
import { t as FieldController } from "./form.binding-
|
|
3
|
-
import { r as InputInner } from "./Input-
|
|
2
|
+
import { t as FieldController } from "./form.binding-DOR5gIQf.js";
|
|
3
|
+
import { r as InputInner } from "./Input-BIuNQb5u.js";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/inputs/Input/Input.bound.tsx
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as IconButtonProps } from "./IconButton-
|
|
2
|
-
import { r as FormFieldHeaderProps } from "./FormField-
|
|
3
|
-
import "./input.cva-
|
|
4
|
-
import { FC, FocusEvent, ReactElement, ReactNode, SVGProps } from "react";
|
|
1
|
+
import { n as IconButtonProps } from "./IconButton-shH_9wcl.js";
|
|
2
|
+
import { r as FormFieldHeaderProps } from "./FormField-DGyCDxOp.js";
|
|
3
|
+
import "./input.cva-BjuHsDGy.js";
|
|
4
|
+
import { FC, FocusEvent, ReactElement, ReactNode, RefObject, SVGProps } from "react";
|
|
5
5
|
//#region src/components/inputs/Input/shared/InputContent.d.ts
|
|
6
6
|
interface InputContentProps {
|
|
7
7
|
className?: string;
|
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
|
-
import { t as UIOverrides } from "./uiOverrides.context-
|
|
3
|
-
import { t as IconSlot } from "./IconSlot-
|
|
4
|
-
import { t as typographyDefinition } from "./typography.cva-
|
|
5
|
-
import { t as Spinner } from "./Spinner-
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
+
import { t as IconSlot } from "./IconSlot-CqNuZl0E.js";
|
|
4
|
+
import { t as typographyDefinition } from "./typography.cva-CHsHX_Wp.js";
|
|
5
|
+
import { t as Spinner } from "./Spinner-DqjP06T1.js";
|
|
6
6
|
import { IconButton } from "./components/icon-button.js";
|
|
7
|
-
import { n as FormFieldLabel } from "./FormField-
|
|
8
|
-
import { a as inputSizeDefinition, r as inputContentWrapperDefinition } from "./input.cva-
|
|
9
|
-
import { n as InputClear } from "./TooltipWrapper-
|
|
7
|
+
import { n as FormFieldLabel } from "./FormField-dduTMkNH.js";
|
|
8
|
+
import { a as inputSizeDefinition, r as inputContentWrapperDefinition } from "./input.cva-DZii82eS.js";
|
|
9
|
+
import { n as InputClear } from "./TooltipWrapper-BvGO_LUx.js";
|
|
10
10
|
import { isValidElement } from "react";
|
|
11
11
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { flushSync } from "react-dom";
|
|
13
|
+
//#region src/components/inputs/Input/shared/clearInput.ts
|
|
14
|
+
/** Commit the cleared value before blur consumers inspect the real input's validity. */
|
|
15
|
+
const clearInput = (input, onClear, onBlur) => {
|
|
16
|
+
if (!input || input.readOnly) return;
|
|
17
|
+
flushSync(onClear);
|
|
18
|
+
onBlur?.({
|
|
19
|
+
target: input,
|
|
20
|
+
currentTarget: input
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
12
24
|
//#region src/components/inputs/Input/shared/InputContent.tsx
|
|
13
|
-
const InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, action, isClearable, isClearableIfDisabled, value, onChange, onBlur, children, headerProps, as, size }) => {
|
|
25
|
+
const InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, unit, isLoading, isDisabled, isReadOnly, inputRef, action, isClearable, isClearableIfDisabled, value, onChange, onBlur, children, headerProps, as, size }) => {
|
|
14
26
|
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
15
27
|
const inputSizeCva = UIOverrides.useCva("input.sizeCva", inputSizeDefinition);
|
|
16
28
|
const inputContentWrapperCva = UIOverrides.useCva("input.contentWrapperCva", inputContentWrapperDefinition);
|
|
17
29
|
const isLeadingIconElement = LeadingIcon && isValidElement(LeadingIcon);
|
|
18
30
|
const isTrailingIconElement = TrailingIcon && isValidElement(TrailingIcon);
|
|
19
|
-
const
|
|
31
|
+
const canClear = !isReadOnly && (!isDisabled || isClearableIfDisabled === true);
|
|
32
|
+
const showClear = value != null && value !== "" && canClear;
|
|
20
33
|
return /* @__PURE__ */ jsxs("div", {
|
|
21
|
-
className: "flex w-full items-center gap-
|
|
34
|
+
className: "flex w-full items-center gap-2",
|
|
22
35
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23
|
-
className: clsx("group/input-content flex w-full items-center gap-
|
|
36
|
+
className: clsx("group/input-content flex w-full items-center gap-2 pr-0!", as === "inline" && "h-full", inputSizeCva({
|
|
24
37
|
size,
|
|
25
38
|
as
|
|
26
39
|
})),
|
|
27
40
|
children: [LeadingIcon && /* @__PURE__ */ jsx("div", {
|
|
28
|
-
className: clsx(!isLeadingIconElement && "pointer-events-none"),
|
|
41
|
+
className: clsx("flex shrink-0", !isLeadingIconElement && "pointer-events-none"),
|
|
29
42
|
children: /* @__PURE__ */ jsx(IconSlot, {
|
|
30
43
|
icon: LeadingIcon,
|
|
31
|
-
className: "text-
|
|
44
|
+
className: "text-muted-foreground"
|
|
32
45
|
})
|
|
33
46
|
}), /* @__PURE__ */ jsxs("div", {
|
|
34
47
|
className: inputContentWrapperCva({ as }),
|
|
@@ -39,23 +52,23 @@ const InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, un
|
|
|
39
52
|
}), children]
|
|
40
53
|
})]
|
|
41
54
|
}), /* @__PURE__ */ jsxs("div", {
|
|
42
|
-
className: clsx("flex items-center gap-
|
|
55
|
+
className: clsx("flex items-center gap-1 py-0! pl-0!", inputSizeCva({
|
|
43
56
|
size,
|
|
44
57
|
as
|
|
45
58
|
}), !isTrailingIconElement && !action && !(isClearable && showClear) && "pointer-events-none"),
|
|
46
59
|
children: [
|
|
47
|
-
isClearable &&
|
|
60
|
+
isClearable && canClear && /* @__PURE__ */ jsx(InputClear, {
|
|
48
61
|
onClear: () => {
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
if (!canClear) return;
|
|
63
|
+
clearInput(inputRef.current, () => onChange?.(""), onBlur);
|
|
51
64
|
},
|
|
52
65
|
show: showClear
|
|
53
66
|
}),
|
|
54
67
|
unit && /* @__PURE__ */ jsx("span", {
|
|
55
68
|
className: typographyCva({
|
|
56
|
-
size: "
|
|
57
|
-
sizeMobile: "
|
|
58
|
-
className: "text-
|
|
69
|
+
size: "body",
|
|
70
|
+
sizeMobile: "body",
|
|
71
|
+
className: "text-muted-foreground"
|
|
59
72
|
}),
|
|
60
73
|
children: unit
|
|
61
74
|
}),
|
|
@@ -79,11 +92,11 @@ const InputContent = ({ leadingIcon: LeadingIcon, trailingIcon: TrailingIcon, un
|
|
|
79
92
|
}),
|
|
80
93
|
!isLoading && !action && TrailingIcon && /* @__PURE__ */ jsx(IconSlot, {
|
|
81
94
|
icon: TrailingIcon,
|
|
82
|
-
className: "text-
|
|
95
|
+
className: "text-muted-foreground"
|
|
83
96
|
})
|
|
84
97
|
]
|
|
85
98
|
})]
|
|
86
99
|
});
|
|
87
100
|
};
|
|
88
101
|
//#endregion
|
|
89
|
-
export { InputContent as t };
|
|
102
|
+
export { clearInput as n, InputContent as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as StyleMergeUtils, t as UIOverrides } from "./uiOverrides.context-
|
|
2
|
-
import "./style-definitions-
|
|
1
|
+
import { n as StyleMergeUtils, t as UIOverrides } from "./uiOverrides.context-DHHzLSnq.js";
|
|
2
|
+
import "./style-definitions-Dx6aFDiR.js";
|
|
3
3
|
import { AnchorHTMLAttributes, PropsWithChildren } from "react";
|
|
4
4
|
import { LinkProps } from "react-aria-components";
|
|
5
5
|
//#region src/components/text/Link/link.cva.d.ts
|
|
@@ -7,7 +7,9 @@ declare const linkDefinition: {
|
|
|
7
7
|
base: string[];
|
|
8
8
|
config: StyleMergeUtils.Config<{
|
|
9
9
|
readonly variant: {
|
|
10
|
-
default:
|
|
10
|
+
readonly default: "underline text-primary hover:text-primary/80";
|
|
11
|
+
readonly subtle: "no-underline text-muted-foreground hover:text-foreground";
|
|
12
|
+
readonly plain: "no-underline";
|
|
11
13
|
};
|
|
12
14
|
}>;
|
|
13
15
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as $7230ffa83bc0c2cf$export$9d4c57ee4c6ffdd8, n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, o as $7230ffa83bc0c2cf$export$c62b8e45d58ddad9, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a } from "./utils-BkLF-JA3.js";
|
|
2
|
-
import {
|
|
2
|
+
import { d as $e28ab3efe3e87743$export$6615d83f6de245ce, f as $53e61d82d8b8611d$export$e0e4026c12a8bdbb, h as $263ab7fc0f95ccdb$export$d40e14dec8b060a8, m as $263ab7fc0f95ccdb$export$4feb769f8ddf26c5, v as $4b38b5b75ecc6208$export$b0d3ecf7112093a7 } from "./Dialog-C9H9_BmK.js";
|
|
3
3
|
import { t as $efe09c6d1c304b50$export$9afb8bc826b033ea } from "./Text-D72yc4S6.js";
|
|
4
|
-
import { t as $792f28e438b9ad5f$export$758399f318e6385a } from "./SharedElementTransition-
|
|
5
|
-
import {
|
|
4
|
+
import { t as $792f28e438b9ad5f$export$758399f318e6385a } from "./SharedElementTransition-CZ2bE7yo.js";
|
|
5
|
+
import { n as $91fe5e721c7f36c1$export$c9549807523555e0 } from "./SelectionIndicator-C3hniBa2.js";
|
|
6
6
|
import $ahdqC$react, { createContext, forwardRef, useCallback, useContext, useEffect, useMemo, useRef } from "react";
|
|
7
7
|
import { mergeProps } from "react-aria/mergeProps";
|
|
8
8
|
import { useObjectRef } from "react-aria/useObjectRef";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as MenuItem$1 } from "./DropdownMenu-
|
|
1
|
+
import { r as MenuItem$1 } from "./DropdownMenu-D_9z9ond.js";
|
|
2
2
|
//#region src/components/DropdownMenu/MenuItem.d.ts
|
|
3
3
|
type MenuListItemProps = MenuItem$1;
|
|
4
4
|
declare const MenuItem: ({ label, content, children, className, ...item }: MenuListItemProps) => import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e, t as $7230ffa83bc0c2cf$export$2881499e37b75b9a } from "./utils-BkLF-JA3.js";
|
|
2
|
-
import { i as $f2ff30fde7b014be$export$d2f961adcb0afbe, r as $f2ff30fde7b014be$export$8b93a07348a7730c } from "./Dialog-
|
|
2
|
+
import { i as $f2ff30fde7b014be$export$d2f961adcb0afbe, r as $f2ff30fde7b014be$export$8b93a07348a7730c } from "./Dialog-C9H9_BmK.js";
|
|
3
3
|
import $ahdqC$react, { createContext, forwardRef, useContext, useMemo, useRef, useState } from "react";
|
|
4
4
|
import { mergeProps } from "react-aria/mergeProps";
|
|
5
5
|
import { mergeRefs } from "react-aria/mergeRefs";
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import { t as UIConfig } from "./uiConfig.context-CT9EVqC5.js";
|
|
2
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
3
|
-
import { t as UIOverrides } from "./uiOverrides.context-
|
|
2
|
+
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
4
3
|
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./Input-BG0Xjw5X.js";
|
|
5
4
|
import { a as $a3be900807531178$re_export$useLocale } from "./exports-BNrTn8Tj.js";
|
|
5
|
+
import { t as UIConfig } from "./uiConfig.context-3DN9w6oU.js";
|
|
6
6
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
7
7
|
import { t as useFieldAccessibility } from "./useFieldAccessibility-eZIMECmG.js";
|
|
8
|
-
import { t as FormField } from "./FormField-
|
|
9
|
-
import { t as inputBaseDefinition } from "./input.cva-
|
|
8
|
+
import { t as FormField } from "./FormField-dduTMkNH.js";
|
|
9
|
+
import { t as inputBaseDefinition } from "./input.cva-DZii82eS.js";
|
|
10
|
+
import { t as resolveInputLayout } from "./inputLayout-KdAtunGk.js";
|
|
10
11
|
import { n as $3d0ee518c6f3d04f$export$7f629e9dc1ecf37c, t as getStaticNumberDisplayValue } from "./numberStatic.utils-BIyZuILs.js";
|
|
11
|
-
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-DyYxfwv6.js";
|
|
12
12
|
import { t as IntlUtils } from "./intl.utils-zwAFoZ0U.js";
|
|
13
|
-
import { t as TooltipWrapper } from "./TooltipWrapper-
|
|
13
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-BvGO_LUx.js";
|
|
14
|
+
import { n as useStaticInputHandoff } from "./useStaticInputHandoff-BN0fOerH.js";
|
|
14
15
|
import { InputFrame } from "./components/input-frame.js";
|
|
15
|
-
import { t as InputContent } from "./InputContent-
|
|
16
|
+
import { n as clearInput, t as InputContent } from "./InputContent-C5JlwN5b.js";
|
|
16
17
|
import { memo, useCallback, useEffect, useRef, useState } from "react";
|
|
17
18
|
import { jsx } from "react/jsx-runtime";
|
|
18
19
|
import { useNumberField } from "react-aria";
|
|
@@ -27,7 +28,7 @@ const NumberFieldBase = (props) => {
|
|
|
27
28
|
const { ref, inputClassName, label, tooltipText, helperText, isRequired, required, rightContent, isDisabled, disabled, isDirty, headerClassName, errorClassName, isHeaderHidden, error, errorMessage, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, formatOptions: formatOptionsProp, variant: variantProp, as: asProp, layout: layoutProp, size: sizeProp, hideLabel: hideLabelProp, isClearable: isClearableProp, isClearableIfDisabled, autoFocusOnMount, ...rest } = props;
|
|
28
29
|
const formatOptions = formatOptionsProp ?? ui.numberField.formatOptions;
|
|
29
30
|
const variant = variantProp ?? ui.input.variant;
|
|
30
|
-
const as = layoutProp
|
|
31
|
+
const as = resolveInputLayout(layoutProp, asProp, ui.input.as);
|
|
31
32
|
const resolvedIsDisabled = isDisabled ?? disabled;
|
|
32
33
|
const resolvedIsRequired = isRequired ?? required;
|
|
33
34
|
const resolvedError = errorMessage ?? error;
|
|
@@ -121,7 +122,7 @@ const NumberFieldBase = (props) => {
|
|
|
121
122
|
className: clsx("group w-full", className),
|
|
122
123
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
123
124
|
children: /* @__PURE__ */ jsx("div", {
|
|
124
|
-
className: clsx("relative flex cursor-text
|
|
125
|
+
className: clsx("relative flex cursor-text", inputBaseCva({
|
|
125
126
|
variant,
|
|
126
127
|
as,
|
|
127
128
|
...rest
|
|
@@ -132,6 +133,8 @@ const NumberFieldBase = (props) => {
|
|
|
132
133
|
"data-is-disabled": dataIsDisabled,
|
|
133
134
|
children: /* @__PURE__ */ jsx(InputContent, {
|
|
134
135
|
...inputContentProps,
|
|
136
|
+
inputRef,
|
|
137
|
+
isReadOnly: props.isReadOnly,
|
|
135
138
|
headerProps,
|
|
136
139
|
as,
|
|
137
140
|
size,
|
|
@@ -169,18 +172,19 @@ const NumberFieldInner = ({ renderStaticInput, isFormControlDisabled, ...props }
|
|
|
169
172
|
setRenderInput
|
|
170
173
|
});
|
|
171
174
|
if (!renderInput) {
|
|
172
|
-
const staticValue = props.value
|
|
175
|
+
const staticValue = props.value === void 0 ? props.defaultValue : props.value;
|
|
173
176
|
const formatOptions = props.formatOptions ?? ui.numberField.formatOptions;
|
|
174
177
|
const displayValue = getStaticNumberDisplayValue(staticValue, IntlUtils.getNumberFormatter(locale, formatOptions)) ?? "";
|
|
175
178
|
const hasValue = displayValue !== "";
|
|
176
|
-
const as = props.as
|
|
177
|
-
|
|
179
|
+
const as = resolveInputLayout(props.layout, props.as, ui.input.as);
|
|
180
|
+
const isRequired = props.isRequired ?? props.required;
|
|
181
|
+
let isDisabled = !!(props.isDisabled ?? props.disabled);
|
|
178
182
|
if (isFormControlDisabled) isDisabled = true;
|
|
179
183
|
const dataAttributes = {
|
|
180
184
|
dataIsEmpty: !hasValue,
|
|
181
185
|
dataIsFilled: hasValue,
|
|
182
186
|
dataIsDirty: props.isDirty,
|
|
183
|
-
dataIsRequired:
|
|
187
|
+
dataIsRequired: isRequired,
|
|
184
188
|
dataIsDisabled: isDisabled,
|
|
185
189
|
dataDisabled: isDisabled,
|
|
186
190
|
dataInvalid: !!(props.errorMessage ?? props.error),
|
|
@@ -188,10 +192,18 @@ const NumberFieldInner = ({ renderStaticInput, isFormControlDisabled, ...props }
|
|
|
188
192
|
};
|
|
189
193
|
return /* @__PURE__ */ jsx(InputFrame, {
|
|
190
194
|
...props,
|
|
195
|
+
as,
|
|
196
|
+
isRequired,
|
|
191
197
|
error: props.errorMessage ?? props.error,
|
|
192
198
|
isDisabled,
|
|
193
199
|
className: clsx("group w-full", as === "inline" && "h-full", props.className),
|
|
194
200
|
dataAttributes,
|
|
201
|
+
isClearable: (props.isClearable ?? ui.input.isClearable) && !props.isReadOnly,
|
|
202
|
+
showClear: hasValue && !props.isReadOnly,
|
|
203
|
+
onClear: () => {
|
|
204
|
+
if (props.isReadOnly) return;
|
|
205
|
+
clearInput(inputRef.current, () => props.onChange?.(null), props.onBlur);
|
|
206
|
+
},
|
|
195
207
|
onStaticInteract: renderRealInput,
|
|
196
208
|
inputClassName: props.inputClassName,
|
|
197
209
|
contentClassName: clsx(as === "inline" && "h-full", "pr-0!"),
|
|
@@ -202,6 +214,7 @@ const NumberFieldInner = ({ renderStaticInput, isFormControlDisabled, ...props }
|
|
|
202
214
|
type: "text",
|
|
203
215
|
ref: inputRef,
|
|
204
216
|
disabled: isDisabled,
|
|
217
|
+
readOnly: props.isReadOnly,
|
|
205
218
|
inputMode: "numeric",
|
|
206
219
|
tabIndex: -1,
|
|
207
220
|
value: displayValue,
|
|
@@ -219,7 +232,18 @@ const NumberFieldInner = ({ renderStaticInput, isFormControlDisabled, ...props }
|
|
|
219
232
|
});
|
|
220
233
|
};
|
|
221
234
|
/** @internal Exported for production render benchmarks. */
|
|
222
|
-
const NumberFieldComponent = (
|
|
235
|
+
const NumberFieldComponent = ({ defaultValue, value, onChange, ...props }) => {
|
|
236
|
+
const [internalValue, setInternalValue] = useState(defaultValue ?? null);
|
|
237
|
+
return /* @__PURE__ */ jsx(NumberFieldInner, {
|
|
238
|
+
...props,
|
|
239
|
+
defaultValue,
|
|
240
|
+
value: value === void 0 ? internalValue : value,
|
|
241
|
+
onChange: (nextValue) => {
|
|
242
|
+
if (value === void 0) setInternalValue(nextValue);
|
|
243
|
+
onChange?.(nextValue);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
};
|
|
223
247
|
const NumberField = memo(NumberFieldComponent);
|
|
224
248
|
//#endregion
|
|
225
249
|
export { NumberFieldComponent as n, NumberFieldInner as r, NumberField as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as FormFieldProps } from "./FormField-
|
|
2
|
-
import { n as InputVariantProps } from "./input.cva-
|
|
3
|
-
import { t as InputContentProps } from "./InputContent-
|
|
1
|
+
import { n as FormFieldProps } from "./FormField-DGyCDxOp.js";
|
|
2
|
+
import { n as InputVariantProps } from "./input.cva-BjuHsDGy.js";
|
|
3
|
+
import { t as InputContentProps } from "./InputContent-BCNkN4Fx.js";
|
|
4
4
|
import { FocusEvent, Ref } from "react";
|
|
5
5
|
import { NumberFieldProps } from "react-aria-components";
|
|
6
6
|
//#region src/components/inputs/Input/NumberField/NumberField.d.ts
|
|
@@ -26,7 +26,7 @@ type NumberFieldInnerProps = NumberFieldProps$1 & {
|
|
|
26
26
|
};
|
|
27
27
|
declare const NumberFieldInner: ({ renderStaticInput, isFormControlDisabled, ...props }: NumberFieldInnerProps) => import("react").JSX.Element;
|
|
28
28
|
/** @internal Exported for production render benchmarks. */
|
|
29
|
-
declare const NumberFieldComponent: (props: NumberFieldProps$1 & {
|
|
29
|
+
declare const NumberFieldComponent: ({ defaultValue, value, onChange, ...props }: NumberFieldProps$1 & {
|
|
30
30
|
field?: never;
|
|
31
31
|
}) => import("react").JSX.Element;
|
|
32
32
|
declare const NumberField: import("react").MemoExoticComponent<typeof NumberFieldComponent>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
2
|
-
import { t as FieldController } from "./form.binding-
|
|
3
|
-
import { r as NumberFieldInner } from "./NumberField-
|
|
2
|
+
import { t as FieldController } from "./form.binding-DOR5gIQf.js";
|
|
3
|
+
import { r as NumberFieldInner } from "./NumberField-CpkLBjIM.js";
|
|
4
4
|
import { memo } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/inputs/Input/NumberField/NumberField.bound.tsx
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as NumberFieldProps$1 } from "./NumberField-
|
|
1
|
+
import { i as NumberFieldProps$1 } from "./NumberField-WXebfxjK.js";
|
|
2
2
|
import { n as FieldValues, t as FormControlProps } from "./form.types-C8P4sznq.js";
|
|
3
3
|
//#region src/components/inputs/Input/NumberField/NumberField.bound.d.ts
|
|
4
4
|
type ControlledNumberFieldProps<TFieldValues extends FieldValues> = FormControlProps<NumberFieldProps$1, TFieldValues>;
|