@povio/ui 6.0.0-rc.12 → 6.0.0-rc.14
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/README.md +523 -42
- package/dist/{Accordion-ORBin0EZ.js → Accordion-BNHpv7Zj.js} +42 -42
- package/dist/{Accordion-Cup5eRZz.d.ts → Accordion-CR9oomZY.d.ts} +29 -17
- package/dist/Alert-xHGPLUpt.d.ts +36 -0
- package/dist/AlertDialog-CKcUZ6l9.d.ts +70 -0
- package/dist/Autocomplete-CkWTSFoj.d.ts +123 -0
- package/dist/Autocomplete-CrNDRxvg.js +319 -0
- package/dist/Badge-B25YEMEw.d.ts +67 -0
- package/dist/BottomSheet-CtcPZG82.d.ts +65 -0
- package/dist/{BottomSheet-CGipksM_.js → BottomSheet-tUXH3NjS.js} +9 -9
- package/dist/{BottomSheet.lazy-CuJMUeJP.d.ts → BottomSheet.lazy-DuwAJSaI.d.ts} +1 -1
- package/dist/{Breadcrumbs-CcB0oOF8.d.ts → Breadcrumbs-BrtRh_dX.d.ts} +6 -3
- package/dist/{Breadcrumbs-a1-q_he0.js → Breadcrumbs-D8WXqOLN.js} +36 -20
- package/dist/{Button-BaODzvZd.js → Button-C1Jv1Plk.js} +1 -1
- package/dist/{Button-0SswSdDg.d.ts → Button-DDuk3hJ3.d.ts} +2 -2
- package/dist/{Button-C1YB5dOw.js → Button-DF6sbTuF.js} +3 -7
- package/dist/{ButtonBase-s-VV7oCa.js → ButtonBase-BYJz1JkH.js} +12 -20
- package/dist/ButtonBase-Bn_FT89h.d.ts +47 -0
- package/dist/{ButtonContent-Dztbuz3q.js → ButtonContent-2KsbdWRO.js} +5 -5
- package/dist/{Calendar-yaQubCWK.js → Calendar-DdneUEhM.js} +71 -35
- package/dist/{Calendar.lazy-DcVss9Bk.js → Calendar.lazy-BY0kLoYH.js} +7 -7
- package/dist/Checkbox-Bwl6MA-V.d.ts +49 -0
- package/dist/{Checkbox-Bjsbx-wK.js → Checkbox-E2bns_n0.js} +40 -14
- package/dist/CheckboxCheckmark-Beu8T1g9.js +42 -0
- package/dist/CheckboxGroup-0rzsn-bA.d.ts +52 -0
- package/dist/{CheckboxGroup-B3O3IUiu.js → CheckboxGroup-C7epIEpW.js} +75 -35
- package/dist/ColumnConfigContent-LNq-6Brf.js +1025 -0
- package/dist/ColumnListContent-Dzze5R7T.js +133 -0
- package/dist/DatePicker-B70SCKfT.d.ts +80 -0
- package/dist/{DatePicker-bme8zGBo.js → DatePicker-BU-34fCk.js} +117 -46
- package/dist/{DatePickerInput-vLlL5ATh.d.ts → DatePickerInput-BCuz08Ws.d.ts} +3 -3
- package/dist/{DatePickerInput-C2881tvS.js → DatePickerInput-CMEJmZSQ.js} +41 -30
- package/dist/{DateRangePicker-Blg158JD.js → DateRangePicker-D0RtqeBM.js} +90 -162
- package/dist/DateRangePicker-jovxcWGk.d.ts +102 -0
- package/dist/{DateTimePicker-CdRFt8WM.js → DateTimePicker-Cbdt76CL.js} +94 -40
- package/dist/DateTimePicker-Cfi3ruFy.d.ts +83 -0
- package/dist/Dialog-BWNQjIgo.d.ts +66 -0
- package/dist/{Dialog-C9H9_BmK.js → Dialog-Bpwr1nuy.js} +15 -15
- package/dist/{Dialog-DN5703sy.js → Dialog-ebjPH22i.js} +23 -19
- package/dist/{Disclosure-BRSkMbZQ.js → Disclosure-D_aym2zh.js} +3 -3
- package/dist/Drawer-o018RqIt.d.ts +42 -0
- package/dist/DropdownMenu-3V-G7fZ7.d.ts +51 -0
- package/dist/{DropdownMenu-DS0RaEfH.js → DropdownMenu-C4WitobV.js} +33 -21
- package/dist/{DropdownMenuDesktop-DGPIfex-.js → DropdownMenuDesktop-BM7659Sk.js} +14 -8
- package/dist/{FileInput-BUwtAF2-.js → FileInput-Bc_E1M1X.js} +76 -81
- package/dist/FileInput-CWRW7OzZ.d.ts +61 -0
- package/dist/{FileTrigger-DlryDp2T.js → FileTrigger-tGSUFrb2.js} +6 -6
- package/dist/FileUpload-DVnp9xxv.d.ts +181 -0
- package/dist/FileUpload-Dk6ZmgWF.js +1105 -0
- package/dist/{Form-CqF1SaVw.js → Form-4jZarkjk.js} +2 -2
- package/dist/FormField-BgiWLGjf.d.ts +70 -0
- package/dist/{FormField-dduTMkNH.js → FormField-DOZ7eXjA.js} +11 -11
- package/dist/{FormFieldError-BT4uxbKY.d.ts → FormFieldError-C7yOdjzQ.d.ts} +1 -0
- package/dist/FormFieldHeaderTooltip-DW9sqJWl.js +22 -0
- package/dist/{Heading-D4XFYv__.js → Heading-B9G3z6Es.js} +2 -2
- package/dist/HiddenFormValue-DZ2d9eoA.js +20 -0
- package/dist/IconButton-Bjjf5cQL.d.ts +24 -0
- package/dist/{IconSlot-CqNuZl0E.js → IconSlot-TAWTJ6iK.js} +2 -4
- package/dist/{InlineTooltipWrapper-CKTiFpZn.js → InlineTooltipWrapper-CcdpMJa6.js} +1 -1
- package/dist/{Input-BG0Xjw5X.js → Input-BkR3jkvt.js} +2 -2
- package/dist/{Input-CG5LQ0zs.js → Input-CvYyjMWx.js} +95 -60
- package/dist/Input-lppNS8wM.d.ts +56 -0
- package/dist/{InputContent-Fx2E4UXl.js → InputContent-B5YjsLDE.js} +15 -13
- package/dist/InputContent-Bgalf6R1.d.ts +39 -0
- package/dist/{Label-BGvF9vWx.js → Label-VTcaaLO8.js} +2 -2
- package/dist/{Link-Chux-Clm.js → Link-8zP_NC_c.js} +2 -2
- package/dist/Link-HJ4y-xiW.d.ts +15 -0
- package/dist/{ListBox-DhR5kojP.js → ListBox-Ck-B1Jae.js} +9 -9
- package/dist/{Modal-DcLWF9cB.js → Modal-xT-Wz5GH.js} +3 -3
- package/dist/{NumberField-DxuikBcr.js → NumberField-BXLzNb2T.js} +92 -63
- package/dist/NumberField-Q-4y3jpb.d.ts +41 -0
- package/dist/{NumberFormatter-DYarfm5F.js → NumberFormatter-D5csbNXm.js} +1 -1
- package/dist/{NumberRangeInput-8bOjNEnS.js → NumberRangeInput-BBzZCC54.js} +153 -102
- package/dist/NumberRangeInput-DuWOdSdU.d.ts +89 -0
- package/dist/{OverlayArrow-DF0jMwul.js → OverlayArrow-BptI-A_7.js} +2 -2
- package/dist/{PageHeader-DTfzf-dA.d.ts → PageHeader-jVaC3Z9L.d.ts} +6 -5
- package/dist/PasswordInput-DtTnGHRD.d.ts +16 -0
- package/dist/{PasswordInput.bound-Dfq5c3JQ.js → PasswordInput-U0QhNsMp.js} +6 -6
- package/dist/Popover-ClCEOP3e.d.ts +51 -0
- package/dist/Progress-DlXY0dv_.js +180 -0
- package/dist/Progress-VkkXbIh7.d.ts +26 -0
- package/dist/ProgressBar-mpNpV7ow.js +46 -0
- package/dist/{RadioGroup-IL4Y8XHO.js → RadioGroup-BPPJyA1s.js} +72 -32
- package/dist/RadioGroup-BbcrP56w.d.ts +52 -0
- package/dist/{RangeCalendar-DT63UD8K.js → RangeCalendar-DIVjIl0T.js} +12 -10
- package/dist/Select-D1qIWZCv.d.ts +248 -0
- package/dist/{Select-BM8PNrjC.js → Select-DlbVDCz8.js} +452 -191
- package/dist/{SelectListBox-BFSZxDSi.js → SelectListBox-CCr5YY86.js} +55 -43
- package/dist/{SelectionIndicator-C3hniBa2.js → SelectionIndicator-CvuKjZRP.js} +3 -3
- package/dist/{SharedElementTransition-CZ2bE7yo.js → SharedElementTransition-BkyYit3Q.js} +2 -2
- package/dist/{SidebarWorkspaces-DJknAfS9.js → SidebarWorkspaces-CIpFJGOa.js} +283 -366
- package/dist/{SidebarWorkspaces-DDHJAdNH.d.ts → SidebarWorkspaces-DcwA_jv7.d.ts} +31 -17
- package/dist/Slider-CLViwkE1.d.ts +57 -0
- package/dist/{Slider-DCsCCPFx.js → Slider-_RsgBJcg.js} +72 -15
- package/dist/Spinner-GMEauCHv.d.ts +13 -0
- package/dist/SplitButton-BdP4xjFQ.d.ts +25 -0
- package/dist/{Stepper-Dyhxp0Tl.js → Stepper-D4z7JNsD.js} +116 -88
- package/dist/Stepper-DBb0qfla.d.ts +49 -0
- package/dist/{Switch-BfpSMMpv.js → Switch-Bi3_bUw1.js} +56 -14
- package/dist/Switch-DCxONL2Q.d.ts +42 -0
- package/dist/TableDnd-CG1yOlxh.js +238 -0
- package/dist/TableDragHandle-CXApnuUm.js +51 -0
- package/dist/{TabsFilters-DybNturW.js → TabsFilters-BPogry73.js} +46 -35
- package/dist/TabsFilters-CPfGBODw.d.ts +59 -0
- package/dist/Tag-xhcJOv_X.d.ts +26 -0
- package/dist/{Text-D72yc4S6.js → Text-D7Nqkw1l.js} +1 -1
- package/dist/TextArea-BYX9Kk_v.d.ts +33 -0
- package/dist/{TextArea-Blsip3ZC.js → TextArea-CuJS3-Nv.js} +62 -35
- package/dist/{TimePicker-4hV5zbgd.js → TimePicker-ByfjqkLp.js} +120 -56
- package/dist/TimePicker-UTo9C6gz.d.ts +64 -0
- package/dist/TimePickerForm-CaIHR0PV.js +532 -0
- package/dist/{ToastContainer-Dd0LPykL.js → ToastContainer-tr7Zxahc.js} +4 -4
- package/dist/{ToggleButton-HUZ8ij6i.d.ts → ToggleButton-BX8o7ECO.d.ts} +2 -2
- package/dist/{ToggleButton-P1z1pxzT.js → ToggleButton-D8BT67FO.js} +5 -5
- package/dist/ToggleGroup-18c-FZ_r.js +500 -0
- package/dist/ToggleGroup-UazUtgU1.d.ts +95 -0
- package/dist/{Tooltip-DRB6lo0U.js → Tooltip-Dl3sf8fq.js} +5 -5
- package/dist/Tooltip-FcJ29dhq.d.ts +33 -0
- package/dist/TooltipEllipsis-7QF00kXk.d.ts +21 -0
- package/dist/{TooltipWrapper-BSY31JMc.js → TooltipWrapper-bvNpM6ku.js} +6 -6
- package/dist/{Typography-DJojwiXV.d.ts → Typography-auHWN282.d.ts} +5 -1
- package/dist/{badgeButton.cva-t5PQOH4M.js → badge.cva-C9mE8CMf.js} +23 -24
- package/dist/{button.cva-Ciga0rdG.js → button.cva-C2aoXMh-.js} +10 -16
- package/dist/{buttonContent.cva-BapnODby.d.ts → buttonContent.cva-CeGnrjoA.d.ts} +2 -2
- package/dist/calendarHeader.cva-D3sXR7ox.js +23 -0
- package/dist/{checkbox.cva-aLJS7v4z.js → checkbox.cva-qU_q0lSX.js} +14 -14
- package/dist/columnConfig.cva-CERwSZRN.js +29 -0
- package/dist/components/accordion.d.ts +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.d.ts +2 -2
- package/dist/components/alert-dialog.js +174 -128
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/alert.js +17 -15
- package/dist/components/autocomplete.d.ts +2 -2
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.d.ts +2 -2
- package/dist/components/badge.js +166 -81
- package/dist/components/bottom-sheet-header.d.ts +1 -1
- package/dist/components/bottom-sheet-header.js +25 -21
- package/dist/components/bottom-sheet.d.ts +2 -2
- package/dist/components/bottom-sheet.js +2 -2
- 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 +2 -2
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.d.ts +2 -2
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.d.ts +4 -41
- package/dist/components/date-range-picker.js +4 -2
- package/dist/components/date-range-presets.d.ts +2 -0
- package/dist/components/date-range-presets.js +3 -0
- package/dist/components/date-time-picker.d.ts +2 -2
- 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.d.ts +1 -1
- package/dist/components/drawer.js +16 -80
- package/dist/components/dropdown-menu.d.ts +2 -3
- package/dist/components/dropdown-menu.js +2 -3
- package/dist/components/file-input.d.ts +2 -2
- package/dist/components/file-input.js +1 -1
- package/dist/components/file-upload.d.ts +2 -3
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.d.ts +3 -2
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.d.ts +1 -1
- package/dist/components/icon-button.js +22 -25
- package/dist/components/icon-slot.d.ts +1 -2
- package/dist/components/icon-slot.js +2 -2
- package/dist/components/input-frame.d.ts +6 -10
- package/dist/components/input-frame.js +31 -28
- package/dist/components/input.d.ts +2 -2
- package/dist/components/input.js +2 -2
- package/dist/components/link.d.ts +1 -1
- package/dist/components/link.js +2 -2
- package/dist/components/number-field.d.ts +2 -2
- package/dist/components/number-field.js +2 -2
- package/dist/components/number-range-input.d.ts +2 -2
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/page-header.d.ts +1 -1
- package/dist/components/page-header.js +5 -5
- package/dist/components/password-input.d.ts +2 -2
- package/dist/components/password-input.js +1 -22
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +105 -87
- package/dist/components/progress.d.ts +2 -2
- package/dist/components/progress.js +1 -1
- package/dist/components/radio-group.d.ts +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/slider.js +1 -1
- package/dist/components/spinner.d.ts +1 -1
- package/dist/components/spinner.js +71 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +15 -4
- package/dist/components/stepper.d.ts +1 -1
- package/dist/components/stepper.js +1 -1
- package/dist/components/style-definitions.d.ts +3 -3
- package/dist/components/style-definitions.js +62 -20
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/tabs-filters.d.ts +1 -1
- package/dist/components/tabs-filters.js +1 -1
- package/dist/components/tag.d.ts +1 -1
- package/dist/components/tag.js +50 -64
- package/dist/components/text-area.d.ts +2 -2
- package/dist/components/text-area.js +1 -1
- package/dist/components/time-picker.d.ts +2 -2
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +3 -3
- package/dist/components/toast.js +4 -3
- package/dist/components/toggle-button.d.ts +1 -1
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle-group.d.ts +2 -2
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip-ellipsis.d.ts +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- 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/use-toast.d.ts +2 -2
- package/dist/components/use-toast.js +1 -41
- package/dist/config/component-configuration.d.ts +2 -2
- package/dist/config/component-configuration.js +53 -2
- package/dist/config/confirmation.d.ts +1 -1
- package/dist/config/confirmation.js +1 -1
- package/dist/config/link-context.d.ts +3 -3
- 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/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-router.d.ts +1 -1
- package/dist/config/ui-router.js +1 -1
- package/dist/confirmation.context-C_-uADGJ.js +93 -0
- package/dist/confirmation.context-DkWyR2aT.d.ts +32 -0
- package/dist/{datePickerInput.cva-Du0Zn04v.js → datePickerInput.cva-CWkV2fut.js} +1 -1
- package/dist/dateRangePreset.utils-Bnb-rjTt.js +116 -0
- package/dist/{dialog.cva-BIpz6HcA.js → dialog.cva-BjVggO5l.js} +1 -1
- package/dist/{dist-DEZzXa0W.js → dist-CP6vV22I.js} +68 -39
- package/dist/{dom.utils-BPooTXtC.js → dom.utils-CqejLWIQ.js} +1 -1
- package/dist/{dropdownMenu.cva-DwSOcbmR.js → dropdownMenu.cva-BopsvbOy.js} +19 -7
- package/dist/{exports-BNrTn8Tj.js → exports-DeBGRThC.js} +3 -3
- package/dist/{file.utils-Crb-mIHs.d.ts → file.utils-DUADtzdt.d.ts} +3 -3
- package/dist/{file.utils-DqQxnuAm.js → file.utils-X6tkeWaz.js} +2 -6
- package/dist/fileInputButton.cva-gbqRUf1g.js +39 -0
- package/dist/{fileUpload.cva-BYzXGc9C.js → fileUpload.cva-SrF6v406.js} +3 -3
- package/dist/form-field-C735uXsi.d.ts +1 -0
- package/dist/form.binding-Brdjq2yr.js +161 -0
- package/dist/form.binding-DSXB2AOD.d.ts +127 -0
- package/dist/form.types-a2WVJDQX.d.ts +43 -0
- package/dist/formReset-CnZl_yze.js +35 -0
- package/dist/hints-B09_WDhL.d.ts +17 -0
- package/dist/hooks/use-async-list.d.ts +1 -1
- package/dist/hooks/use-async-list.js +1 -1
- package/dist/hooks/use-breakpoint.d.ts +3 -0
- package/dist/hooks/use-breakpoint.js +2 -0
- package/dist/hooks/use-filters.d.ts +2 -2
- package/dist/hooks/use-filters.js +1 -1
- package/dist/{i18n-D8vXIoiq.js → i18n-DaIHnR2n.js} +123 -9
- package/dist/{i18n-DM-PUcxQ.d.ts → i18n-xXkHgzet.d.ts} +124 -4
- package/dist/iconSlot.cva-DyhOI7EK.js +5 -0
- package/dist/{import-C7W0Wv2r.js → import-Cz8NlFqm.js} +40 -16
- package/dist/index.d.ts +66 -84
- package/dist/index.js +57 -92
- package/dist/{input.cva-DZii82eS.js → input.cva-mm1dnfKP.js} +27 -23
- package/dist/inputLayout-CIVpuUBq.js +7 -0
- package/dist/inputRow.clsx-BbcaXVta.js +6 -0
- package/dist/{intlStrings-Cu1YN1tA.js → intlStrings-ClpdCJmU.js} +35 -35
- package/dist/{isEqual-LFw0W5rU.js → isEqual-BdJdNr5O.js} +1 -1
- package/dist/{label.cva-DTfT6FrX.js → label.cva-DJ5Dmbz5.js} +7 -7
- package/dist/link.context-BxVK2yQ5.d.ts +20 -0
- package/dist/{link.context-TPjDtjw3.js → link.context-CD5h_b5O.js} +12 -11
- package/dist/link.cva-ZhpQz3P0.d.ts +2277 -0
- package/dist/{progress.cva-CsGaGVJ-.js → progress.cva-mkJxrrac.js} +2 -2
- package/dist/{radio.cva-DistaZtZ.js → radio.cva-Dt5N2ul2.js} +7 -7
- package/dist/rich-text-editor.d.ts +44 -2
- package/dist/rich-text-editor.js +733 -1
- package/dist/router.context-B6j_M4cN.js +151 -0
- package/dist/router.context-CSd9JYQ4.d.ts +33 -0
- package/dist/{selectDesktop.cva-DStkOdwm.js → selectDesktop.cva-30JAvtgB.js} +1 -1
- package/dist/{selectItem.cva-B6vxey2R.js → selectItem.cva-DsOZSSPx.js} +2 -1
- package/dist/sidebar.cva-BgxTCejU.js +150 -0
- package/dist/spinner.cva-j4kGmIWC.js +17 -0
- package/dist/{staticDateTimeSegments-CVuAhDDl.js → staticDateTimeSegments-BgUrcqXD.js} +379 -94
- package/dist/{status.cva-CYgi3Htz.js → status.cva-WLEqUAjH.js} +9 -9
- package/dist/styles/input.d.ts +1 -1
- package/dist/{table.cva-DkcsOmZG.js → table.cva-n9TO_vu1.js} +68 -17
- package/dist/tableCells.cva-Br0_kgRM.js +18 -0
- package/dist/tableColumnConfigStorage-Cciq8gVe.js +215 -0
- package/dist/tableVirtualStore-whSmFzTV.js +67 -0
- package/dist/tanstack/form.d.ts +3 -3
- package/dist/tanstack/form.js +3 -3
- package/dist/tanstack/table-context.d.ts +2 -0
- package/dist/tanstack/table-context.js +2 -0
- package/dist/tanstack/table-types.d.ts +55 -0
- package/dist/tanstack/table.d.ts +5 -3
- package/dist/tanstack/table.js +3 -2
- package/dist/tanstack-JB8VmS9j.js +73 -0
- package/dist/tanstack-cQOW9-Q2.d.ts +165 -0
- package/dist/tanstack-table-DdWYwCZM.d.ts +858 -0
- package/dist/tanstack-table-M1M26UQJ.js +5299 -0
- package/dist/tanstack.d.ts +66 -84
- package/dist/tanstack.js +57 -92
- package/dist/{toast.cva-B6NXTwbZ.js → toast.cva-DusQwZw-.js} +13 -9
- package/dist/toast.runtime-ZN5q4T9X.js +25 -0
- package/dist/{toggleGroup.cva-CJ-3Ps7j.js → toggleGroup.cva-CvNS5QO1.js} +2 -2
- package/dist/{uiConfig.context-3DN9w6oU.js → uiConfig.context-NWmBJ2Hc.js} +72 -10
- package/dist/uiConfig.context-ykH4E2js.d.ts +19 -0
- package/dist/uiConfig.types-BsyPKepP.d.ts +291 -0
- package/dist/{uiOverrides.context-DHHzLSnq.d.ts → uiOverrides.context-C5Maic5Q.d.ts} +106 -0
- package/dist/{useAsyncList-Ct74ve3i.js → useAsyncList-DkIjhlce.js} +142 -37
- package/dist/useAsyncList-F-328rtE.d.ts +25 -0
- package/dist/useAutoFocus-K-bfNxa2.js +16 -0
- package/dist/useBreakpoint-BPrZNuNl.d.ts +9 -0
- package/dist/{useBreakpoint-CJ3mx7UF.js → useBreakpoint-DtYSRweq.js} +6 -2
- package/dist/{useControlledState-CuU1VIh1.js → useControlledState-C1-Mt2i0.js} +1 -1
- package/dist/useDebounceCallback-C7YKfjXW.js +96 -0
- package/dist/useFilters-CybBXUAA.js +217 -0
- package/dist/useFilters-DrfBFNLw.d.ts +57 -0
- package/dist/useFormAutosave-BzCGqFqi.js +419 -0
- package/dist/{useFormAutosave-BBLm3Ujo.d.ts → useFormAutosave-ClMnzVE7.d.ts} +1 -1
- package/dist/{useIntersectionObserver-DFAhTsV0.js → useIntersectionObserver-B8msnQTR.js} +15 -3
- package/dist/{numberStatic.utils-BIyZuILs.js → useLiveNumberFieldState-npiqOvyB.js} +107 -6
- package/dist/useRemoveButton-zhlA1Pbc.js +98 -0
- package/dist/useResolveDateRangePreset-DOSzJR-N.d.ts +64 -0
- package/dist/useResolveDateRangePreset-k_h_XJBG.js +26 -0
- package/dist/{useScrollableListBox-oYKqU3Hp.js → useScrollableListBox-4pieApqz.js} +1 -1
- package/dist/{useStaticInputHandoff-BN0fOerH.js → useStaticInputHandoff-DrNFrvD7.js} +6 -1
- package/dist/useTableVirtualizer-sFInQiH-.d.ts +162 -0
- package/dist/useToast-BHqkSByv.d.ts +78 -0
- package/dist/useToast-DgqC6Ta_.js +63 -0
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +1 -1
- package/dist/{utils-BkLF-JA3.js → utils-Q5Oc6oX2.js} +1 -1
- package/llms.txt +3201 -0
- package/package.json +22 -118
- package/MIGRATION.md +0 -655
- package/dist/Alert-D4X7OWiv.d.ts +0 -34
- package/dist/AlertDialog-DklLDjmw.d.ts +0 -26
- package/dist/Autocomplete-BgFz3kuR.d.ts +0 -23
- package/dist/Autocomplete-Bn13u0zu.js +0 -145
- package/dist/Autocomplete.bound-CpHZZ3C9.d.ts +0 -9
- package/dist/Autocomplete.bound-Dwh__y-Z.js +0 -28
- package/dist/Badge-Db1ndK67.d.ts +0 -30
- package/dist/BadgeButton-BPhWDAnc.d.ts +0 -15
- package/dist/BottomSheet-BZmDJBR-.d.ts +0 -33
- package/dist/ButtonBase-CZuEy3Pk.d.ts +0 -32
- package/dist/Checkbox-w2j5hLOQ.d.ts +0 -27
- package/dist/Checkbox.bound-D2nBglJz.js +0 -33
- package/dist/Checkbox.bound-DD_RCjVm.d.ts +0 -9
- package/dist/CheckboxCheckmark-DWsYVZuu.js +0 -25
- package/dist/CheckboxGroup-BYI15Y09.d.ts +0 -30
- package/dist/CheckboxGroup.bound-DY0HKGSh.js +0 -32
- package/dist/CheckboxGroup.bound-QiJ-P0KR.d.ts +0 -9
- package/dist/ComboBox-ChsdI0lt.js +0 -212
- package/dist/DatePicker-QzfQf21b.d.ts +0 -56
- package/dist/DatePicker.bound-DoCAqhM4.d.ts +0 -9
- package/dist/DatePicker.bound-M2cjR37s.js +0 -36
- package/dist/DateRangePicker-32D4pWJg.d.ts +0 -97
- package/dist/DateRangePicker.bound-CVtoVsho.d.ts +0 -9
- package/dist/DateRangePicker.bound-CkIDsAUf.js +0 -35
- package/dist/DateTimePicker-BTRIUagV.d.ts +0 -55
- package/dist/DateTimePicker.bound-X4DTyQ1b.d.ts +0 -9
- package/dist/DateTimePicker.bound-nSCVUqd0.js +0 -32
- package/dist/Dialog-CO9xljD3.d.ts +0 -21
- package/dist/Drawer-D1cHiBFO.d.ts +0 -18
- package/dist/DropdownMenu-D_9z9ond.d.ts +0 -25
- package/dist/FileInput-BEaECoBS.d.ts +0 -75
- package/dist/FileInput.bound-C12mOKpg.js +0 -30
- package/dist/FileInput.bound-D2HuuqSb.d.ts +0 -8
- package/dist/FileUpload-BUTSqHVk.d.ts +0 -11
- package/dist/FileUpload-D7FMYm-k.js +0 -749
- package/dist/FileUpload.bound-CGQXb4iT.d.ts +0 -16
- package/dist/FileUpload.bound-DmkuulOi.js +0 -30
- package/dist/FileUploadContainer-Dzg5aXXZ.d.ts +0 -5
- package/dist/FormField-DGyCDxOp.d.ts +0 -42
- package/dist/FormFieldHeaderTooltip-Dt-g40Tc.js +0 -17
- package/dist/IconButton-shH_9wcl.d.ts +0 -25
- package/dist/Input-CTp_9mS9.d.ts +0 -34
- package/dist/Input.bound-B9a62ylL.d.ts +0 -9
- package/dist/Input.bound-DYoXyRGy.js +0 -31
- package/dist/InputContent-BCNkN4Fx.d.ts +0 -27
- package/dist/Link-PvYB_M-j.d.ts +0 -30
- package/dist/MenuItem-U3-pu1j5.d.ts +0 -6
- package/dist/NumberField-WXebfxjK.d.ts +0 -34
- package/dist/NumberField.bound-ChJnNyJS.js +0 -32
- package/dist/NumberField.bound-Dy0A5iVc.d.ts +0 -9
- package/dist/NumberRangeInput-BCKQaGpy.d.ts +0 -50
- package/dist/NumberRangeInput.bound-BF6P_ega.js +0 -32
- package/dist/NumberRangeInput.bound-BNXxIQ0b.d.ts +0 -9
- package/dist/PasswordInput-EhQjYyJS.d.ts +0 -11
- package/dist/PasswordInput.bound-CK5GwKL4.d.ts +0 -9
- package/dist/Popover-D_t1XDPA.d.ts +0 -20
- package/dist/Progress-Ckfpi_-M.d.ts +0 -45
- package/dist/Progress-RiEGGxNG.js +0 -119
- package/dist/RadioGroup-6e-Z6jW8.d.ts +0 -26
- package/dist/RadioGroup.bound-BFWSq-on.js +0 -32
- package/dist/RadioGroup.bound-w3SZqSkH.d.ts +0 -9
- package/dist/RichTextEditor-DHhuBeT6.d.ts +0 -28
- package/dist/RichTextEditor-DfwVdm45.js +0 -651
- package/dist/Select-C34ENdjq.d.ts +0 -119
- package/dist/Select.bound--Az1Xwgm.js +0 -34
- package/dist/Select.bound-qOihchei.d.ts +0 -17
- package/dist/Slider-DRg8zKRM.d.ts +0 -23
- package/dist/Slider.bound-CByTXPTr.js +0 -31
- package/dist/Slider.bound-CaEF19um.d.ts +0 -9
- package/dist/Spinner-Cvy_6zgD.d.ts +0 -30
- package/dist/Spinner-DqjP06T1.js +0 -101
- package/dist/SplitButton-V1f2NWfh.d.ts +0 -15
- package/dist/Stepper-k91x_m-E.d.ts +0 -114
- package/dist/Switch-ELVPkPx0.d.ts +0 -24
- package/dist/Switch.bound-DeEdVvZV.d.ts +0 -9
- package/dist/Switch.bound-Dv0cHsMM.js +0 -33
- package/dist/TableDnd-CuHxANWh.js +0 -133
- package/dist/TableRowDetails-D8HFTghI.d.ts +0 -109
- package/dist/TabsFilters-DePddjCk.d.ts +0 -30
- package/dist/Tag-B2_ZiSE-.d.ts +0 -44
- package/dist/TextArea-iqUeB2QY.d.ts +0 -26
- package/dist/TextArea.bound-BJHyCogp.d.ts +0 -9
- package/dist/TextArea.bound-DeaskY6r.js +0 -28
- package/dist/TimePicker-BZ1ocsBX.d.ts +0 -45
- package/dist/TimePicker.bound-8DmjMXuE.d.ts +0 -9
- package/dist/TimePicker.bound-BFSXJvE_.js +0 -32
- package/dist/TimePickerForm-DD9VA_td.js +0 -225
- package/dist/Toast-D9pdadZ4.d.ts +0 -16
- package/dist/ToggleGroup-CrDoeLN0.js +0 -333
- package/dist/ToggleGroup-DvjnSinl.d.ts +0 -42
- package/dist/ToggleGroup.bound-B03ISHQ8.d.ts +0 -9
- package/dist/ToggleGroup.bound-DCnYwmBt.js +0 -67
- package/dist/Tooltip-B8DTURLQ.d.ts +0 -16
- package/dist/TooltipEllipsis-Di9Dvd4x.d.ts +0 -11
- package/dist/badgeButton.cva-CBFIhr1S.d.ts +0 -41
- package/dist/button.cva-C8LGtNJ3.d.ts +0 -94
- package/dist/checkbox.cva-CCh_UlrC.d.ts +0 -76
- package/dist/components/badge-button.d.ts +0 -2
- package/dist/components/badge-button.js +0 -74
- package/dist/components/file-upload-container.d.ts +0 -3
- package/dist/components/file-upload-container.js +0 -15
- package/dist/confirmation.context-Bc2yEVp_.js +0 -114
- package/dist/confirmation.context-C_GDRn3a.d.ts +0 -23
- package/dist/fileUpload.types-C-ke21yY.d.ts +0 -110
- package/dist/form.binding-DOR5gIQf.js +0 -49
- package/dist/form.types-C8P4sznq.d.ts +0 -22
- package/dist/formFieldHelper.cva-DRmSyRZN.js +0 -14
- package/dist/iconSlot.cva-CLB5Tlsr.d.ts +0 -9
- package/dist/icons.d.ts +0 -4
- package/dist/icons.js +0 -3
- package/dist/input.cva-BjuHsDGy.d.ts +0 -80
- package/dist/inputLayout-KdAtunGk.js +0 -5
- package/dist/link.context-BCHn7NSy.d.ts +0 -12
- package/dist/radio.cva-D7M1hqLe.d.ts +0 -56
- package/dist/router.context-CtafjXV7.d.ts +0 -16
- package/dist/router.context-MckTbHw9.js +0 -63
- package/dist/routing.utils-DfxEt0_Y.js +0 -30
- package/dist/style-definitions-Dx6aFDiR.d.ts +0 -1038
- package/dist/switch.cva-r6vcS25Q.d.ts +0 -16
- package/dist/tanstack/autocomplete.d.ts +0 -3
- package/dist/tanstack/autocomplete.js +0 -2
- package/dist/tanstack/checkbox-group.d.ts +0 -3
- package/dist/tanstack/checkbox-group.js +0 -2
- package/dist/tanstack/checkbox.d.ts +0 -3
- package/dist/tanstack/checkbox.js +0 -2
- package/dist/tanstack/date-picker.d.ts +0 -3
- package/dist/tanstack/date-picker.js +0 -2
- package/dist/tanstack/date-range-picker.d.ts +0 -3
- package/dist/tanstack/date-range-picker.js +0 -2
- package/dist/tanstack/date-time-picker.d.ts +0 -3
- package/dist/tanstack/date-time-picker.js +0 -2
- package/dist/tanstack/file-input.d.ts +0 -3
- package/dist/tanstack/file-input.js +0 -2
- package/dist/tanstack/file-upload.d.ts +0 -4
- package/dist/tanstack/file-upload.js +0 -2
- package/dist/tanstack/input.d.ts +0 -3
- package/dist/tanstack/input.js +0 -2
- package/dist/tanstack/number-field.d.ts +0 -3
- package/dist/tanstack/number-field.js +0 -2
- package/dist/tanstack/number-range-input.d.ts +0 -3
- package/dist/tanstack/number-range-input.js +0 -2
- package/dist/tanstack/password-input.d.ts +0 -2
- package/dist/tanstack/password-input.js +0 -2
- package/dist/tanstack/radio-group.d.ts +0 -3
- package/dist/tanstack/radio-group.js +0 -2
- package/dist/tanstack/rich-text-editor.d.ts +0 -9
- package/dist/tanstack/rich-text-editor.js +0 -28
- package/dist/tanstack/select.d.ts +0 -3
- package/dist/tanstack/select.js +0 -2
- package/dist/tanstack/slider.d.ts +0 -3
- package/dist/tanstack/slider.js +0 -2
- package/dist/tanstack/switch.d.ts +0 -3
- package/dist/tanstack/switch.js +0 -2
- package/dist/tanstack/text-area.d.ts +0 -3
- package/dist/tanstack/text-area.js +0 -2
- package/dist/tanstack/time-picker.d.ts +0 -3
- package/dist/tanstack/time-picker.js +0 -2
- package/dist/tanstack/toggle-group.d.ts +0 -3
- package/dist/tanstack/toggle-group.js +0 -2
- package/dist/tanstack-Bgdv0qU1.js +0 -19
- package/dist/tanstack-wNbE6b-h.d.ts +0 -566
- package/dist/toast.cva-AmLw6Cf5.d.ts +0 -61
- package/dist/toast.runtime-Drd2IJ_j.js +0 -17
- package/dist/toastActivation.store-BELtcr76.js +0 -16
- package/dist/toggleGroup.cva-DA4U21gn.d.ts +0 -26
- package/dist/typography.cva-BCHlTHdM.d.ts +0 -36
- package/dist/uiConfig.context-BnCORTNm.d.ts +0 -132
- package/dist/useAsyncList-Cu-Y8If2.d.ts +0 -9
- package/dist/useFilters-BxRScJdn.d.ts +0 -11
- package/dist/useFilters-DMi94RZK.js +0 -190
- package/dist/useForm-Cb7KWLds.js +0 -217
- package/dist/useForm-I6z23FXf.d.ts +0 -51
- package/dist/useFormAutosave-BPGlChiY.js +0 -216
- package/dist/useTableColumnConfig-CXYgj5xi.js +0 -1906
- package/dist/useTableNav-BusSFEVC.d.ts +0 -197
- package/dist/useToast-DsA8CVoY.d.ts +0 -16
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createContext } from "react";
|
|
2
2
|
import "react-aria/filterDOMProps";
|
|
3
3
|
import "react-stately/private/form/useFormValidationState";
|
|
4
|
-
//#region ../../node_modules/.bun/react-aria-components@1.22.1+
|
|
4
|
+
//#region ../../node_modules/.bun/react-aria-components@1.22.1+6f4b9a1cfb20c0ae/node_modules/react-aria-components/dist/private/FieldError.mjs
|
|
5
5
|
const $1f3c3b1a70cec653$export$ff05c3ac10437e03 = /*#__PURE__*/ createContext(null);
|
|
6
6
|
//#endregion
|
|
7
|
-
//#region ../../node_modules/.bun/react-aria-components@1.22.1+
|
|
7
|
+
//#region ../../node_modules/.bun/react-aria-components@1.22.1+6f4b9a1cfb20c0ae/node_modules/react-aria-components/dist/private/Form.mjs
|
|
8
8
|
const $cdaed739b1139372$export$c24727297075ec6a = /*#__PURE__*/ createContext(null);
|
|
9
9
|
//#endregion
|
|
10
10
|
export { $1f3c3b1a70cec653$export$ff05c3ac10437e03 as n, $cdaed739b1139372$export$c24727297075ec6a as t };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { rn as InputLayout } from "./link.cva-ZhpQz3P0.js";
|
|
2
|
+
import { n as Removed } from "./hints-B09_WDhL.js";
|
|
3
|
+
import { t as FormFieldErrorProps } from "./FormFieldError-C7yOdjzQ.js";
|
|
4
|
+
import { FocusEventHandler, LabelHTMLAttributes, MouseEventHandler, PropsWithChildren, ReactNode, Ref } from "react";
|
|
5
|
+
import { DOMAttributes } from "@react-types/shared";
|
|
6
|
+
//#region src/components/inputs/FormField/FormFieldHeader.d.ts
|
|
7
|
+
interface FormFieldHeaderProps {
|
|
8
|
+
/** The field's visible label and accessible name. Hide it visually with `hideLabel`; do not pass an empty string. */
|
|
9
|
+
label: string;
|
|
10
|
+
/** Text for an info tooltip next to the label. */
|
|
11
|
+
tooltipText?: string;
|
|
12
|
+
/** Hint shown with the field and linked to the control as its description. */
|
|
13
|
+
helperText?: string;
|
|
14
|
+
/** Id of the helper text, for the control's `aria-describedby`. Library inputs generate it themselves. */
|
|
15
|
+
helperTextId?: string;
|
|
16
|
+
/** Marks the field required in the label and on the control. */
|
|
17
|
+
isRequired?: boolean;
|
|
18
|
+
/** Content at the end of the label row, such as a link or counter. */
|
|
19
|
+
rightContent?: ReactNode;
|
|
20
|
+
isHeaderHidden?: boolean;
|
|
21
|
+
isDisabled?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
labelProps?: DOMAttributes<HTMLLabelElement> & LabelHTMLAttributes<HTMLLabelElement>;
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
//#region src/components/inputs/FormField/FormField.d.ts
|
|
27
|
+
interface FormFieldProps extends Omit<FormFieldHeaderProps, "className" | "labelProps" | "isHeaderHidden">, Omit<FormFieldErrorProps, "className" | "isHidden"> {
|
|
28
|
+
/** Id of the error text, for the control's `aria-errormessage`. Library inputs generate it themselves. */
|
|
29
|
+
errorMessageId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Use `error`. Intersected with `string` so input props still spread into React Aria hooks, which
|
|
32
|
+
* declare their own `errorMessage`.
|
|
33
|
+
*/
|
|
34
|
+
errorMessage?: string & Removed<"Use `error` instead of `errorMessage`">;
|
|
35
|
+
/** @deprecated Use `helperText`. Intersected with `string` for the same reason as `errorMessage`. */
|
|
36
|
+
description?: string & Removed<"Use `helperText`; `description` is not rendered">;
|
|
37
|
+
/** @deprecated Use `onChange`, or `field.onValueChange` on a bound input. */
|
|
38
|
+
onValueChange?: Removed<"Use `onChange`, or `field.onValueChange` when the input is bound with `field`">;
|
|
39
|
+
/** @deprecated Use `hideLabel`. */
|
|
40
|
+
isHeaderHidden?: Removed<"Use `hideLabel`">;
|
|
41
|
+
/** @deprecated Never had an effect. */
|
|
42
|
+
isHidden?: Removed<"Render the input conditionally to hide it; `hideLabel` hides only the label">;
|
|
43
|
+
/** Hides the label visually while keeping it as the accessible name. Defaults to `UIConfig.input.hideLabel`. */
|
|
44
|
+
hideLabel?: boolean;
|
|
45
|
+
headerClassName?: string;
|
|
46
|
+
errorClassName?: string;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
/** Everything `FormField` takes; `@povio/ui/form-field` publishes it as `FormFieldProps`. */
|
|
50
|
+
interface FormFieldComponentProps extends PropsWithChildren<FormFieldProps> {
|
|
51
|
+
ref?: Ref<HTMLDivElement>;
|
|
52
|
+
labelProps?: FormFieldHeaderProps["labelProps"];
|
|
53
|
+
/**
|
|
54
|
+
* The input layout this field wraps. `floating` and `filter` render no header because the control draws its own
|
|
55
|
+
* label. Defaults to `default`.
|
|
56
|
+
*/
|
|
57
|
+
layout?: InputLayout | null;
|
|
58
|
+
/** @deprecated Use `layout`. */
|
|
59
|
+
as?: Removed<"Use `layout` instead of `as`">;
|
|
60
|
+
tabIndex?: number;
|
|
61
|
+
/** A list of radios or checkboxes; with side labels a faint line runs under it. */
|
|
62
|
+
isChoiceList?: boolean;
|
|
63
|
+
onMouseEnter?: MouseEventHandler<HTMLDivElement>;
|
|
64
|
+
onMouseLeave?: MouseEventHandler<HTMLDivElement>;
|
|
65
|
+
onFocusCapture?: FocusEventHandler<HTMLDivElement>;
|
|
66
|
+
onBlurCapture?: FocusEventHandler<HTMLDivElement>;
|
|
67
|
+
}
|
|
68
|
+
declare const FormField: ({ ref, layout, label, tooltipText, helperText, helperTextId, isRequired, rightContent, isDisabled, error, errorMessageId, hideLabel, headerClassName, errorClassName, children, className, labelProps, tabIndex, isChoiceList, onMouseEnter, onMouseLeave, onFocusCapture, onBlurCapture }: FormFieldComponentProps) => import("react").JSX.Element;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { FormFieldHeaderProps as i, FormFieldComponentProps as n, FormFieldProps as r, FormField as t };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
-
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "./Label-
|
|
3
|
+
import { n as $43a3b93638fe5db9$export$b04be29aa201d4f5 } from "./Label-VTcaaLO8.js";
|
|
4
4
|
import { t as typographyDefinition } from "./typography.cva-CHsHX_Wp.js";
|
|
5
5
|
import { t as Typography } from "./Typography-DCLnPa3P.js";
|
|
6
6
|
import { t as FormFieldError } from "./FormFieldError-DTT5TUQ1.js";
|
|
7
|
-
import { n as labelTypography, r as formFieldHeaderDefinition, t as labelDefinition } from "./label.cva-
|
|
7
|
+
import { n as labelTypography, r as formFieldHeaderDefinition, t as labelDefinition } from "./label.cva-DJ5Dmbz5.js";
|
|
8
8
|
import { n as formLayoutChoicesLineClass, r as formLayoutSideGridClass, t as FormLayoutContext } from "./formLayout.context--CN08Mtb.js";
|
|
9
9
|
import { Suspense, lazy } from "react";
|
|
10
10
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
11
|
//#region src/components/inputs/FormField/FormFieldLabel.tsx
|
|
12
|
-
const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, className }) => {
|
|
12
|
+
const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, isHeaderHidden, labelProps, className }) => {
|
|
13
13
|
const typographyCva = UIOverrides.useCva("typography.cva", typographyDefinition);
|
|
14
14
|
const labelTypographyMap = UIOverrides.useMapper("label.typography", labelTypography);
|
|
15
15
|
const labelBaseCva = UIOverrides.useCva("label.cva", labelDefinition);
|
|
@@ -20,8 +20,8 @@ const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, cl
|
|
|
20
20
|
size: "body",
|
|
21
21
|
sizeMobile: "body",
|
|
22
22
|
className: "font-medium leading-none",
|
|
23
|
-
...labelTypographyMap({ as })
|
|
24
|
-
}), labelBaseCva({ as }), className, labelProps?.className),
|
|
23
|
+
...labelTypographyMap({ layout: as })
|
|
24
|
+
}), labelBaseCva({ layout: as }), className, labelProps?.className, isHeaderHidden && "sr-only"),
|
|
25
25
|
children: [label, isRequired && /* @__PURE__ */ jsx("span", {
|
|
26
26
|
className: clsx("-ml-1", !isDisabled && "text-destructive"),
|
|
27
27
|
children: "*"
|
|
@@ -30,7 +30,7 @@ const FormFieldLabel = ({ ref, as, label, isRequired, isDisabled, labelProps, cl
|
|
|
30
30
|
};
|
|
31
31
|
//#endregion
|
|
32
32
|
//#region src/components/inputs/FormField/FormFieldHeader.tsx
|
|
33
|
-
const FormFieldHeaderTooltip = lazy(() => import("./FormFieldHeaderTooltip-
|
|
33
|
+
const FormFieldHeaderTooltip = lazy(() => import("./FormFieldHeaderTooltip-DW9sqJWl.js"));
|
|
34
34
|
const FormFieldHeader = ({ label, tooltipText, helperText, helperTextId, isRequired, rightContent, isHeaderHidden, isDisabled, className, labelProps }) => {
|
|
35
35
|
const formFieldHeaderCva = UIOverrides.useCva("formField.headerCva", formFieldHeaderDefinition);
|
|
36
36
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -66,10 +66,10 @@ const FormFieldHeader = ({ label, tooltipText, helperText, helperTextId, isRequi
|
|
|
66
66
|
};
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region src/components/inputs/FormField/FormField.tsx
|
|
69
|
-
const FormField = ({ ref,
|
|
69
|
+
const FormField = ({ ref, layout, label, tooltipText, helperText, helperTextId, isRequired, rightContent, isDisabled, error, errorMessageId, hideLabel, headerClassName, errorClassName, children, className, labelProps, tabIndex, isChoiceList, onMouseEnter, onMouseLeave, onFocusCapture, onBlurCapture }) => {
|
|
70
70
|
const { labelPosition } = FormLayoutContext.useFormLayout();
|
|
71
|
-
const isHeaderVisible = !hideLabel
|
|
72
|
-
const isSide = labelPosition === "side" && (
|
|
71
|
+
const isHeaderVisible = !hideLabel;
|
|
72
|
+
const isSide = labelPosition === "side" && (layout ?? "default") === "default" && isHeaderVisible;
|
|
73
73
|
const headerProps = {
|
|
74
74
|
label,
|
|
75
75
|
tooltipText,
|
|
@@ -125,8 +125,8 @@ const FormField = ({ ref, as, label, tooltipText, helperText, helperTextId, isRe
|
|
|
125
125
|
onFocusCapture,
|
|
126
126
|
onBlurCapture,
|
|
127
127
|
children: [
|
|
128
|
-
!["filter", "floating"].includes(
|
|
129
|
-
helperText && ["filter", "floating"].includes(
|
|
128
|
+
!["filter", "floating"].includes(layout ?? "") && /* @__PURE__ */ jsx(FormFieldHeader, { ...headerProps }),
|
|
129
|
+
helperText && ["filter", "floating"].includes(layout ?? "") && /* @__PURE__ */ jsx(Typography, {
|
|
130
130
|
id: helperTextId,
|
|
131
131
|
slot: "description",
|
|
132
132
|
size: "small",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
//#region src/components/inputs/FormField/FormFieldError.d.ts
|
|
2
2
|
interface FormFieldErrorProps {
|
|
3
3
|
id?: string;
|
|
4
|
+
/** Error text. Marks the field invalid; a form-bound input fills it from the field's validation errors. */
|
|
4
5
|
error?: string;
|
|
5
6
|
isDisabled?: boolean;
|
|
6
7
|
isHidden?: boolean;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
|
+
import { t as IconSlot } from "./IconSlot-TAWTJ6iK.js";
|
|
3
|
+
import { n as $7705c033048f6da7$export$353f5b6fc5456de1 } from "./Button-DF6sbTuF.js";
|
|
4
|
+
import { t as Tooltip } from "./Tooltip-Dl3sf8fq.js";
|
|
5
|
+
import "./i18n-DaIHnR2n.js";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Info } from "lucide-react";
|
|
8
|
+
import { useTranslation } from "react-i18next";
|
|
9
|
+
//#region src/components/inputs/FormField/FormFieldHeaderTooltip.tsx
|
|
10
|
+
const FormFieldHeaderTooltip = ({ text, isDisabled }) => {
|
|
11
|
+
const { t } = useTranslation("ui");
|
|
12
|
+
return /* @__PURE__ */ jsx(Tooltip, {
|
|
13
|
+
text,
|
|
14
|
+
children: /* @__PURE__ */ jsx($7705c033048f6da7$export$353f5b6fc5456de1, {
|
|
15
|
+
"aria-label": t(($) => $.ui.moreInfoAlt),
|
|
16
|
+
className: clsx("inline-flex cursor-default rounded-sm text-muted-foreground outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50", !isDisabled && "hover:text-foreground"),
|
|
17
|
+
children: /* @__PURE__ */ jsx(IconSlot, { icon: Info })
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { FormFieldHeaderTooltip as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e } from "./utils-
|
|
1
|
+
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e } from "./utils-Q5Oc6oX2.js";
|
|
2
2
|
import $ahdqC$react, { createContext, forwardRef } from "react";
|
|
3
|
-
//#region ../../node_modules/.bun/react-aria-components@1.22.1+
|
|
3
|
+
//#region ../../node_modules/.bun/react-aria-components@1.22.1+6f4b9a1cfb20c0ae/node_modules/react-aria-components/dist/private/Heading.mjs
|
|
4
4
|
const $2ec61d1d4f780267$export$d688439359537581 = /*#__PURE__*/ createContext({});
|
|
5
5
|
const $2ec61d1d4f780267$export$a8a3e93435678ff9 = /*#__PURE__*/ forwardRef(function Heading(props, ref) {
|
|
6
6
|
[props, ref] = $7230ffa83bc0c2cf$export$29f1550f4b0d4415(props, ref, $2ec61d1d4f780267$export$d688439359537581);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
//#region src/components/inputs/Input/shared/HiddenFormValue.tsx
|
|
3
|
+
/**
|
|
4
|
+
* Submits a field's value with a native `<form>` when its visible control does not carry it: a static stand-in
|
|
5
|
+
* shows masked or formatted text, and a number field's text is formatted.
|
|
6
|
+
*/
|
|
7
|
+
const HiddenFormValue = ({ name, form, value, isDisabled, type = "hidden" }) => name ? /* @__PURE__ */ jsx("input", {
|
|
8
|
+
type,
|
|
9
|
+
hidden: type === "password" || void 0,
|
|
10
|
+
name,
|
|
11
|
+
form,
|
|
12
|
+
value,
|
|
13
|
+
disabled: isDisabled,
|
|
14
|
+
readOnly: true,
|
|
15
|
+
tabIndex: -1,
|
|
16
|
+
"aria-hidden": true,
|
|
17
|
+
autoComplete: "off"
|
|
18
|
+
}) : null;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { HiddenFormValue as t };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { n as ButtonProps } from "./Button-DDuk3hJ3.js";
|
|
2
|
+
//#region src/components/buttons/IconButton/IconButton.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* `label` names the button and is shown as its tooltip; `aria-label` / `aria-labelledby` also satisfy the name.
|
|
5
|
+
* `label` is listed last because the compiler reports the last member when no name is given.
|
|
6
|
+
*/
|
|
7
|
+
type IconButtonName = {
|
|
8
|
+
label?: string;
|
|
9
|
+
"aria-label": string;
|
|
10
|
+
} | {
|
|
11
|
+
label?: string;
|
|
12
|
+
"aria-labelledby": string;
|
|
13
|
+
} | {
|
|
14
|
+
label: string;
|
|
15
|
+
};
|
|
16
|
+
/** An icon-only action with a required accessible name. */
|
|
17
|
+
type IconButtonProps = Omit<ButtonProps, "children" | "icon" | "iconOnly"> & Required<Pick<ButtonProps, "icon">> & IconButtonName & {
|
|
18
|
+
/** Hides the tooltip that shows the accessible name on hover and focus. */
|
|
19
|
+
disableTooltip?: boolean;
|
|
20
|
+
iconOnly?: never;
|
|
21
|
+
};
|
|
22
|
+
declare const IconButton: ({ label, disableTooltip, ...props }: IconButtonProps) => import("react").JSX.Element;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { IconButtonProps as n, IconButton as t };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
+
import { t as iconSlotDefinition } from "./iconSlot.cva-DyhOI7EK.js";
|
|
3
4
|
import { c } from "react/compiler-runtime";
|
|
4
5
|
import { cloneElement, isValidElement } from "react";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
//#region src/components/shared/IconSlot/iconSlot.cva.ts
|
|
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
|
-
//#endregion
|
|
9
7
|
//#region src/components/shared/IconSlot/IconSlot.tsx
|
|
10
8
|
/** Reserves a size-4 slot and centers the SVG inside it. */
|
|
11
9
|
const IconSlot = (t0) => {
|
|
@@ -76,4 +74,4 @@ const IconSlot = (t0) => {
|
|
|
76
74
|
return t2;
|
|
77
75
|
};
|
|
78
76
|
//#endregion
|
|
79
|
-
export {
|
|
77
|
+
export { IconSlot as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
2
|
-
import { t as Tooltip } from "./Tooltip-
|
|
2
|
+
import { t as Tooltip } from "./Tooltip-Dl3sf8fq.js";
|
|
3
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
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e } from "./utils-
|
|
1
|
+
import { n as $7230ffa83bc0c2cf$export$29f1550f4b0d4415, r as $7230ffa83bc0c2cf$export$4d86445c2cf5e3, s as $7230ffa83bc0c2cf$export$df3a06d6289f983e } from "./utils-Q5Oc6oX2.js";
|
|
2
2
|
import $ahdqC$react, { createContext } from "react";
|
|
3
3
|
import { mergeProps } from "react-aria/mergeProps";
|
|
4
4
|
import { useFocusRing } from "react-aria/useFocusRing";
|
|
5
5
|
import { useHover } from "react-aria/useHover";
|
|
6
6
|
import { createHideableComponent } from "react-aria/private/collections/Hidden";
|
|
7
|
-
//#region ../../node_modules/.bun/react-aria-components@1.22.1+
|
|
7
|
+
//#region ../../node_modules/.bun/react-aria-components@1.22.1+6f4b9a1cfb20c0ae/node_modules/react-aria-components/dist/private/Input.mjs
|
|
8
8
|
const $41fb335299a4a39e$export$37fb8590cf2c088c = /*#__PURE__*/ createContext({});
|
|
9
9
|
let $41fb335299a4a39e$var$filterHoverProps = (props) => {
|
|
10
10
|
let { onHoverStart, onHoverChange, onHoverEnd, ...otherProps } = props;
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import { t as UIOverrides } from "./uiOverrides.context-DNEQlTx0.js";
|
|
3
|
-
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./Input-
|
|
4
|
-
import { t as UIConfig } from "./uiConfig.context-
|
|
3
|
+
import { n as $41fb335299a4a39e$export$f5b8910cec6cf069 } from "./Input-BkR3jkvt.js";
|
|
4
|
+
import { t as UIConfig } from "./uiConfig.context-NWmBJ2Hc.js";
|
|
5
|
+
import { i as skipBrowserValidation, n as FieldController } from "./form.binding-Brdjq2yr.js";
|
|
5
6
|
import { r as $a8ea2faf2ebe4d2f$re_export$mergeRefs } from "./import-D_3dPATF.js";
|
|
6
7
|
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-
|
|
11
|
-
import {
|
|
8
|
+
import { t as FormField } from "./FormField-DOZ7eXjA.js";
|
|
9
|
+
import { t as inputBaseDefinition } from "./input.cva-mm1dnfKP.js";
|
|
10
|
+
import { n as resolveInputLayout, t as isFieldHeaderHiddenByLayout } from "./inputLayout-CIVpuUBq.js";
|
|
11
|
+
import { t as TooltipWrapper } from "./TooltipWrapper-bvNpM6ku.js";
|
|
12
|
+
import { r as inputTrailingRowInsetClass } from "./inputRow.clsx-BbcaXVta.js";
|
|
13
|
+
import { n as shouldRenderInputOnMount, r as useStaticInputHandoff } from "./useStaticInputHandoff-DrNFrvD7.js";
|
|
12
14
|
import { InputFrame } from "./components/input-frame.js";
|
|
13
|
-
import { n as clearInput, t as InputContent } from "./InputContent-
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
15
|
+
import { n as clearInput, t as InputContent } from "./InputContent-B5YjsLDE.js";
|
|
16
|
+
import { t as HiddenFormValue } from "./HiddenFormValue-DZ2d9eoA.js";
|
|
17
|
+
import { t as useAutoFocus } from "./useAutoFocus-K-bfNxa2.js";
|
|
18
|
+
import { memo, useRef, useState } from "react";
|
|
19
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
16
20
|
import { useFocusVisible } from "@react-aria/interactions";
|
|
17
21
|
import { useTextField } from "@react-aria/textfield";
|
|
18
22
|
//#region src/components/inputs/Input/Input.tsx
|
|
@@ -21,59 +25,52 @@ const InputBase = (props) => {
|
|
|
21
25
|
const ui = UIConfig.useConfig();
|
|
22
26
|
const inputBaseCva = UIOverrides.useCva("input.baseCva", inputBaseDefinition);
|
|
23
27
|
const inputRef = useRef(null);
|
|
24
|
-
const { ref, inputClassName, label, tooltipText, helperText, isRequired,
|
|
25
|
-
const as = resolveInputLayout(layoutProp,
|
|
26
|
-
const resolvedIsDisabled = isDisabled ?? disabled;
|
|
27
|
-
const resolvedIsReadOnly = isReadOnly ?? readOnly;
|
|
28
|
-
const resolvedIsRequired = isRequired ?? required;
|
|
29
|
-
const resolvedError = errorMessage ?? error;
|
|
28
|
+
const { ref, inputClassName, label, tooltipText, helperText, isRequired, rightContent, isDisabled, isReadOnly, isDirty, headerClassName, errorClassName, error, isInvalid, className, unit, isLoading, action, leadingIcon, trailingIcon, value, onChange, onBlur, layout: layoutProp, hideLabel: hideLabelProp, variant: variantProp, size: sizeProp, isClearable: isClearableProp, isClearableIfDisabled, type, ...rest } = props;
|
|
29
|
+
const as = resolveInputLayout(layoutProp, ui.input.layout);
|
|
30
30
|
const hideLabel = hideLabelProp ?? ui.input.hideLabel;
|
|
31
31
|
const variant = variantProp ?? ui.input.variant;
|
|
32
32
|
const size = sizeProp ?? ui.input.size;
|
|
33
33
|
const isClearable = isClearableProp ?? ui.input.isClearable;
|
|
34
34
|
const { isFocusVisible } = useFocusVisible();
|
|
35
35
|
const inputValue = value ?? "";
|
|
36
|
-
const textFieldRef = useRef(null);
|
|
37
36
|
const textFieldProps = {
|
|
38
37
|
...rest,
|
|
38
|
+
type,
|
|
39
39
|
label,
|
|
40
|
-
isDisabled
|
|
41
|
-
isReadOnly
|
|
42
|
-
isInvalid: !!
|
|
43
|
-
isRequired
|
|
40
|
+
isDisabled,
|
|
41
|
+
isReadOnly,
|
|
42
|
+
isInvalid: isInvalid || !!error,
|
|
43
|
+
isRequired,
|
|
44
44
|
value: inputValue,
|
|
45
45
|
onChange,
|
|
46
46
|
onBlur
|
|
47
47
|
};
|
|
48
|
+
const textFieldRef = useRef(null);
|
|
48
49
|
const { labelProps, inputProps } = useTextField(textFieldProps, textFieldRef);
|
|
50
|
+
useAutoFocus(inputRef, rest.autoFocus);
|
|
49
51
|
const { describedBy, errorMessageId, helperTextId } = useFieldAccessibility({
|
|
50
52
|
describedBy: inputProps["aria-describedby"],
|
|
51
|
-
error
|
|
53
|
+
error,
|
|
52
54
|
helperText
|
|
53
55
|
});
|
|
54
|
-
useEffect(() => {
|
|
55
|
-
if (!autoFocusOnMount || resolvedIsDisabled) return;
|
|
56
|
-
requestAnimationFrame(() => inputRef.current?.focus());
|
|
57
|
-
}, [autoFocusOnMount, resolvedIsDisabled]);
|
|
58
56
|
const formFieldProps = {
|
|
59
57
|
errorMessageId,
|
|
60
|
-
error
|
|
58
|
+
error,
|
|
61
59
|
label,
|
|
62
60
|
tooltipText,
|
|
63
61
|
helperText,
|
|
64
62
|
helperTextId,
|
|
65
|
-
isRequired
|
|
63
|
+
isRequired,
|
|
66
64
|
rightContent,
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
isDisabled: resolvedIsDisabled,
|
|
65
|
+
hideLabel: hideLabel || isFieldHeaderHiddenByLayout(as),
|
|
66
|
+
isDisabled,
|
|
70
67
|
headerClassName,
|
|
71
68
|
errorClassName
|
|
72
69
|
};
|
|
73
70
|
const inputContentProps = {
|
|
74
71
|
unit,
|
|
75
72
|
isLoading,
|
|
76
|
-
isDisabled
|
|
73
|
+
isDisabled,
|
|
77
74
|
action,
|
|
78
75
|
leadingIcon,
|
|
79
76
|
trailingIcon,
|
|
@@ -87,40 +84,40 @@ const InputBase = (props) => {
|
|
|
87
84
|
label,
|
|
88
85
|
tooltipText,
|
|
89
86
|
helperText,
|
|
90
|
-
isRequired
|
|
87
|
+
isRequired,
|
|
91
88
|
rightContent,
|
|
92
|
-
isHeaderHidden: hideLabel
|
|
93
|
-
isDisabled
|
|
89
|
+
isHeaderHidden: hideLabel,
|
|
90
|
+
isDisabled,
|
|
94
91
|
className: headerClassName,
|
|
95
92
|
labelProps
|
|
96
93
|
};
|
|
97
|
-
const dataIsDisabled =
|
|
94
|
+
const dataIsDisabled = isDisabled || void 0;
|
|
98
95
|
return /* @__PURE__ */ jsx(TooltipWrapper, {
|
|
99
96
|
as,
|
|
100
|
-
error
|
|
97
|
+
error,
|
|
101
98
|
triggerTabIndex: as === "inline" ? -1 : void 0,
|
|
102
99
|
children: /* @__PURE__ */ jsx(FormField, {
|
|
103
100
|
...formFieldProps,
|
|
104
|
-
as,
|
|
101
|
+
layout: as,
|
|
105
102
|
labelProps,
|
|
106
103
|
className: clsx("group w-full", as === "inline" && "h-full", className),
|
|
107
104
|
tabIndex: as === "inline" ? -1 : void 0,
|
|
108
105
|
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
109
|
-
"data-is-required":
|
|
106
|
+
"data-is-required": isRequired || void 0,
|
|
110
107
|
children: /* @__PURE__ */ jsx("div", {
|
|
111
108
|
className: clsx("relative flex cursor-text", inputBaseCva({
|
|
109
|
+
...rest,
|
|
112
110
|
variant,
|
|
113
|
-
as
|
|
114
|
-
...rest
|
|
111
|
+
layout: as
|
|
115
112
|
}), inputClassName),
|
|
116
113
|
onClick: () => inputRef.current?.focus(),
|
|
117
114
|
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
118
|
-
"data-is-required":
|
|
115
|
+
"data-is-required": isRequired || void 0,
|
|
119
116
|
"data-is-disabled": dataIsDisabled,
|
|
120
117
|
children: /* @__PURE__ */ jsx(InputContent, {
|
|
121
118
|
...inputContentProps,
|
|
122
119
|
inputRef,
|
|
123
|
-
isReadOnly
|
|
120
|
+
isReadOnly,
|
|
124
121
|
headerProps,
|
|
125
122
|
as,
|
|
126
123
|
size,
|
|
@@ -132,7 +129,7 @@ const InputBase = (props) => {
|
|
|
132
129
|
"data-is-empty": value === "" || value === null || value === void 0 || void 0,
|
|
133
130
|
"data-is-filled": !(value === "" || value === null || value === void 0) || void 0,
|
|
134
131
|
"data-is-dirty": isDirty || void 0,
|
|
135
|
-
"data-is-required":
|
|
132
|
+
"data-is-required": isRequired || void 0,
|
|
136
133
|
"data-is-disabled": dataIsDisabled,
|
|
137
134
|
placeholder: as === "floating" ? "\xA0" : inputProps.placeholder,
|
|
138
135
|
className: "min-w-0 w-full bg-transparent outline-none",
|
|
@@ -146,10 +143,10 @@ const InputBase = (props) => {
|
|
|
146
143
|
})
|
|
147
144
|
});
|
|
148
145
|
};
|
|
149
|
-
const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
146
|
+
const InputInner = ({ renderStaticInput, isFormControlDisabled, isFormBound, ...props }) => {
|
|
150
147
|
"use no memo";
|
|
151
148
|
const ui = UIConfig.useConfig();
|
|
152
|
-
const [renderInput, setRenderInput] = useState(
|
|
149
|
+
const [renderInput, setRenderInput] = useState(() => shouldRenderInputOnMount(renderStaticInput, ui.renderStaticInput, props.autoFocus));
|
|
153
150
|
const inputRef = useRef(null);
|
|
154
151
|
const { renderRealInput, replayStaticInputChange, replayStaticInputPress } = useStaticInputHandoff({
|
|
155
152
|
inputRef,
|
|
@@ -168,10 +165,10 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
168
165
|
if (!renderInput) {
|
|
169
166
|
const staticValue = props.value ?? props.defaultValue ?? "";
|
|
170
167
|
const inputType = props.type;
|
|
171
|
-
const as = resolveInputLayout(props.layout,
|
|
172
|
-
const isRequired = props.isRequired
|
|
173
|
-
const isReadOnly = props.isReadOnly
|
|
174
|
-
let isDisabled = !!
|
|
168
|
+
const as = resolveInputLayout(props.layout, ui.input.layout);
|
|
169
|
+
const isRequired = props.isRequired;
|
|
170
|
+
const isReadOnly = props.isReadOnly;
|
|
171
|
+
let isDisabled = !!props.isDisabled;
|
|
175
172
|
if (isFormControlDisabled) isDisabled = true;
|
|
176
173
|
const maskedPasswordValue = inputType === "password" && `${staticValue}`.length > 0 ? "•".repeat(`${staticValue}`.length) : staticValue;
|
|
177
174
|
const displayValue = maskedPasswordValue == null ? "" : `${maskedPasswordValue}`;
|
|
@@ -183,14 +180,13 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
183
180
|
dataIsRequired: isRequired,
|
|
184
181
|
dataIsDisabled: isDisabled,
|
|
185
182
|
dataDisabled: isDisabled,
|
|
186
|
-
dataInvalid:
|
|
183
|
+
dataInvalid: props.isInvalid || !!props.error,
|
|
187
184
|
dataHasSelection: hasValue
|
|
188
185
|
};
|
|
189
186
|
return /* @__PURE__ */ jsx(InputFrame, {
|
|
190
187
|
...props,
|
|
191
|
-
as,
|
|
192
188
|
isRequired,
|
|
193
|
-
error: props.
|
|
189
|
+
error: props.error,
|
|
194
190
|
isDisabled,
|
|
195
191
|
className: clsx("group w-full", as === "inline" && "h-full", props.className),
|
|
196
192
|
dataAttributes,
|
|
@@ -205,11 +201,11 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
205
201
|
staticPressTarget: "action",
|
|
206
202
|
inputClassName: props.inputClassName,
|
|
207
203
|
contentClassName: clsx(as === "inline" && "h-full", "pr-0!"),
|
|
208
|
-
trailingClassName:
|
|
204
|
+
trailingClassName: inputTrailingRowInsetClass,
|
|
209
205
|
wrapContentAndTrailing: true,
|
|
210
206
|
reserveTrailingContent: true,
|
|
211
|
-
children: (dataAttributeProps) => /* @__PURE__ */ jsx("input", {
|
|
212
|
-
ref: inputRef,
|
|
207
|
+
children: (dataAttributeProps) => /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("input", {
|
|
208
|
+
ref: isFormBound ? $a8ea2faf2ebe4d2f$re_export$mergeRefs(inputRef, skipBrowserValidation) : inputRef,
|
|
213
209
|
type: inputType === "hidden" ? "password" : inputType,
|
|
214
210
|
disabled: isDisabled,
|
|
215
211
|
readOnly: isReadOnly,
|
|
@@ -219,8 +215,16 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
219
215
|
className: "min-w-0 w-full bg-transparent outline-none",
|
|
220
216
|
onChange: (event) => replayStaticInputChange(event.target.value),
|
|
221
217
|
...dataAttributeProps,
|
|
218
|
+
"aria-invalid": dataAttributes.dataInvalid || void 0,
|
|
219
|
+
"aria-required": isRequired || void 0,
|
|
222
220
|
"data-rac": true
|
|
223
|
-
})
|
|
221
|
+
}), /* @__PURE__ */ jsx(HiddenFormValue, {
|
|
222
|
+
name: props.name,
|
|
223
|
+
form: props.form,
|
|
224
|
+
value: `${staticValue}`,
|
|
225
|
+
isDisabled,
|
|
226
|
+
type: inputType === "password" || inputType === "hidden" ? "password" : void 0
|
|
227
|
+
})] })
|
|
224
228
|
});
|
|
225
229
|
}
|
|
226
230
|
return /* @__PURE__ */ jsx(InputBase, {
|
|
@@ -228,8 +232,7 @@ const InputInner = ({ renderStaticInput, isFormControlDisabled, ...props }) => {
|
|
|
228
232
|
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(props.ref, inputRef)
|
|
229
233
|
});
|
|
230
234
|
};
|
|
231
|
-
|
|
232
|
-
const InputComponent = ({ defaultValue, value, onChange, ...props }) => {
|
|
235
|
+
const StandaloneInput = ({ defaultValue, value, onChange, ...props }) => {
|
|
233
236
|
const [internalValue, setInternalValue] = useState(defaultValue ?? "");
|
|
234
237
|
return /* @__PURE__ */ jsx(InputInner, {
|
|
235
238
|
...props,
|
|
@@ -240,6 +243,38 @@ const InputComponent = ({ defaultValue, value, onChange, ...props }) => {
|
|
|
240
243
|
}
|
|
241
244
|
});
|
|
242
245
|
};
|
|
246
|
+
const ControlledInput = ({ renderStaticInput, ...props }) => {
|
|
247
|
+
"use no memo";
|
|
248
|
+
const { field, ref, ...innerProps } = props;
|
|
249
|
+
return /* @__PURE__ */ jsx(FieldController, {
|
|
250
|
+
control: field.form,
|
|
251
|
+
name: field.name,
|
|
252
|
+
onValueChange: field.onValueChange,
|
|
253
|
+
onBlur: field.onBlur,
|
|
254
|
+
render: ({ field, fieldState: { error, isDirty } }) => /* @__PURE__ */ jsx(InputInner, {
|
|
255
|
+
...innerProps,
|
|
256
|
+
ref: $a8ea2faf2ebe4d2f$re_export$mergeRefs(ref, field.ref),
|
|
257
|
+
value: field.value,
|
|
258
|
+
onChange: field.onChange,
|
|
259
|
+
onBlur: field.onBlur,
|
|
260
|
+
isDirty,
|
|
261
|
+
isDisabled: field.disabled || props.isDisabled,
|
|
262
|
+
isFormControlDisabled: field.disabled,
|
|
263
|
+
isFormBound: true,
|
|
264
|
+
error: props.error ?? error?.message,
|
|
265
|
+
renderStaticInput
|
|
266
|
+
})
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
const InputComponent = (props) => props.field ? /* @__PURE__ */ jsx(ControlledInput, { ...props }) : /* @__PURE__ */ jsx(StandaloneInput, { ...props });
|
|
270
|
+
/**
|
|
271
|
+
* Single-line text input.
|
|
272
|
+
*
|
|
273
|
+
* @example
|
|
274
|
+
* <Input label="Email" type="email" value={email} onChange={setEmail} />
|
|
275
|
+
* @example
|
|
276
|
+
* <Input label="Email" type="email" field={{ form, name: "email" }} />
|
|
277
|
+
*/
|
|
243
278
|
const Input = memo(InputComponent);
|
|
244
279
|
//#endregion
|
|
245
|
-
export {
|
|
280
|
+
export { Input as t };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { an as InputVariantProps } from "./link.cva-ZhpQz3P0.js";
|
|
2
|
+
import { n as Removed, t as Hint } from "./hints-B09_WDhL.js";
|
|
3
|
+
import { r as FormFieldProps } from "./FormField-BgiWLGjf.js";
|
|
4
|
+
import { n as InputContentProps } from "./InputContent-Bgalf6R1.js";
|
|
5
|
+
import { i as FieldValues } from "./form.binding-DSXB2AOD.js";
|
|
6
|
+
import { n as UnsupportedAriaFieldProps, t as FormControlProps } from "./form.types-a2WVJDQX.js";
|
|
7
|
+
import { Ref } from "react";
|
|
8
|
+
import { AriaTextFieldProps } from "@react-aria/textfield";
|
|
9
|
+
//#region src/components/inputs/Input/Input.d.ts
|
|
10
|
+
interface InputBaseProps extends FormFieldProps, InputVariantProps, Omit<InputContentProps, "value" | "onChange" | "onBlur">, Omit<AriaTextFieldProps<HTMLInputElement>, "label" | "type" | UnsupportedAriaFieldProps> {
|
|
11
|
+
ref?: Ref<HTMLInputElement>;
|
|
12
|
+
inputClassName?: string;
|
|
13
|
+
/** Text-like types only. Defaults to `text`. */
|
|
14
|
+
type?: "email" | "hidden" | "tel" | "text" | "url" | Hint<"Use `PasswordInput` for passwords and `NumberField` for numbers">;
|
|
15
|
+
/** Marks the field as changed; only sets `data-is-dirty` for styling. Filled in automatically when bound with `field`. */
|
|
16
|
+
isDirty?: boolean;
|
|
17
|
+
/** @deprecated Use `autoFocus`. */
|
|
18
|
+
autoFocusOnMount?: Removed<"Use `autoFocus`">;
|
|
19
|
+
/** @deprecated Never had an effect. */
|
|
20
|
+
todayIcon?: Removed<"Only the date pickers have a today button">;
|
|
21
|
+
/** @deprecated The field forwards no click handler. */
|
|
22
|
+
onClick?: Removed<"Inputs take no `onClick`: use `onFocus`, or `action` for a button at the end of the field">;
|
|
23
|
+
/** @deprecated Use `className`. */
|
|
24
|
+
style?: Removed<"Use `className` (field root) or `inputClassName` (bordered box)">;
|
|
25
|
+
/** @deprecated Numbers use `NumberField`. */
|
|
26
|
+
min?: Removed<"Use `NumberField` with `minValue` for numbers">;
|
|
27
|
+
/** @deprecated Numbers use `NumberField`. */
|
|
28
|
+
max?: Removed<"Use `NumberField` with `maxValue` for numbers">;
|
|
29
|
+
}
|
|
30
|
+
/** Props for an `Input` that owns its value through `value`/`defaultValue`/`onChange`. */
|
|
31
|
+
interface StandaloneInputProps extends InputBaseProps {
|
|
32
|
+
field?: never;
|
|
33
|
+
/**
|
|
34
|
+
* Defer the interactive control until hover/focus/interaction. Defaults to UIConfig.renderStaticInput (true).
|
|
35
|
+
* `autoFocus` mounts the control immediately; set false for an immediately available ref. Not a read-only mode.
|
|
36
|
+
*/
|
|
37
|
+
renderStaticInput?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/** Props for an `Input` bound to a form field; the form owns the value, change, and blur handling. */
|
|
40
|
+
type ControlledInputProps<TFieldValues extends FieldValues = FieldValues> = FormControlProps<StandaloneInputProps, TFieldValues, "value", "a string">;
|
|
41
|
+
/**
|
|
42
|
+
* Props for `Input`. Pass either `value`/`defaultValue`/`onChange`, or `field={{ form, name }}` to bind a form field.
|
|
43
|
+
*/
|
|
44
|
+
type InputProps<TFieldValues extends FieldValues = FieldValues> = StandaloneInputProps | ControlledInputProps<TFieldValues>;
|
|
45
|
+
declare const InputComponent: <TFieldValues extends FieldValues = FieldValues>(props: InputProps<TFieldValues>) => import("react").JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* Single-line text input.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* <Input label="Email" type="email" value={email} onChange={setEmail} />
|
|
51
|
+
* @example
|
|
52
|
+
* <Input label="Email" type="email" field={{ form, name: "email" }} />
|
|
53
|
+
*/
|
|
54
|
+
declare const Input: typeof InputComponent;
|
|
55
|
+
//#endregion
|
|
56
|
+
export { StandaloneInputProps as i, Input as n, InputProps as r, ControlledInputProps as t };
|