@soyfri/shared-library 4.0.4 → 4.1.1-beta.1
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/LICENSE +15 -0
- package/README.md +393 -0
- package/chunks/ActionMenu-D81Xb35f.cjs.map +1 -0
- package/chunks/ActionMenu-co4b8doH.mjs +106 -0
- package/chunks/ActionMenu-co4b8doH.mjs.map +1 -0
- package/chunks/Alert-6Wiwby6L.mjs +53 -0
- package/chunks/Alert-6Wiwby6L.mjs.map +1 -0
- package/chunks/Alert-CLBHE4sH.cjs +52 -0
- package/chunks/Alert-CLBHE4sH.cjs.map +1 -0
- package/chunks/AppBarMenuToggle-BsN5zZTv.cjs +134 -0
- package/chunks/AppBarMenuToggle-BsN5zZTv.cjs.map +1 -0
- package/chunks/AppBarMenuToggle-DN_dFthr.mjs +135 -0
- package/chunks/AppBarMenuToggle-DN_dFthr.mjs.map +1 -0
- package/chunks/Autocomplete-BKuHgS8H.mjs +361 -0
- package/chunks/Autocomplete-BKuHgS8H.mjs.map +1 -0
- package/chunks/Autocomplete-CxZhdrSA.cjs +360 -0
- package/chunks/Autocomplete-CxZhdrSA.cjs.map +1 -0
- package/chunks/Avatar-BTEyuYXI.mjs +184 -0
- package/chunks/Avatar-BTEyuYXI.mjs.map +1 -0
- package/chunks/Avatar-CJlBSdDl.cjs +183 -0
- package/chunks/Avatar-CJlBSdDl.cjs.map +1 -0
- package/chunks/Breadcrumbs-DH0KAc8w.cjs +41 -0
- package/chunks/Breadcrumbs-DH0KAc8w.cjs.map +1 -0
- package/chunks/Breadcrumbs-Du_7W4gr.mjs +42 -0
- package/chunks/Breadcrumbs-Du_7W4gr.mjs.map +1 -0
- package/chunks/Button-BCNhPNKU.cjs +51 -0
- package/chunks/Button-BCNhPNKU.cjs.map +1 -0
- package/chunks/Button-DbqDgTAR.mjs +52 -0
- package/chunks/Button-DbqDgTAR.mjs.map +1 -0
- package/chunks/ButtonGroup-B9AnoOt_.cjs +64 -0
- package/chunks/ButtonGroup-B9AnoOt_.cjs.map +1 -0
- package/chunks/ButtonGroup-DFPzal0z.mjs +65 -0
- package/chunks/ButtonGroup-DFPzal0z.mjs.map +1 -0
- package/chunks/Card-DfueKp5e.mjs +155 -0
- package/chunks/Card-DfueKp5e.mjs.map +1 -0
- package/chunks/Card-DpKG8AOc.cjs +154 -0
- package/chunks/Card-DpKG8AOc.cjs.map +1 -0
- package/chunks/Checkbox-BaVffFaF.cjs +192 -0
- package/chunks/Checkbox-BaVffFaF.cjs.map +1 -0
- package/chunks/Checkbox-Bvky878D.mjs +193 -0
- package/chunks/Checkbox-Bvky878D.mjs.map +1 -0
- package/chunks/Chip-5QNjzffa.cjs +75 -0
- package/chunks/Chip-5QNjzffa.cjs.map +1 -0
- package/chunks/Chip-5ZYwvVc1.mjs +76 -0
- package/chunks/Chip-5ZYwvVc1.mjs.map +1 -0
- package/chunks/DataRow-6oYxHTYF.cjs +123 -0
- package/chunks/DataRow-6oYxHTYF.cjs.map +1 -0
- package/chunks/DataRow-B8SZkwHB.mjs +124 -0
- package/chunks/DataRow-B8SZkwHB.mjs.map +1 -0
- package/chunks/DatePicker-BEwQDuPy.mjs +187 -0
- package/chunks/DatePicker-BEwQDuPy.mjs.map +1 -0
- package/chunks/DatePicker-Dl46Ae5T.cjs +186 -0
- package/chunks/DatePicker-Dl46Ae5T.cjs.map +1 -0
- package/chunks/DateTimePicker-BDlUoDyR.cjs +230 -0
- package/chunks/DateTimePicker-BDlUoDyR.cjs.map +1 -0
- package/chunks/DateTimePicker-BXghtoRm.mjs +231 -0
- package/chunks/DateTimePicker-BXghtoRm.mjs.map +1 -0
- package/chunks/Divider-CSDEVgHL.cjs +41 -0
- package/chunks/Divider-CSDEVgHL.cjs.map +1 -0
- package/chunks/Divider-LWjGO0ja.mjs +42 -0
- package/chunks/Divider-LWjGO0ja.mjs.map +1 -0
- package/chunks/DrawerItem-BX8llYa3.cjs +274 -0
- package/chunks/DrawerItem-BX8llYa3.cjs.map +1 -0
- package/chunks/DrawerItem-BaLZe-DV.mjs +275 -0
- package/chunks/DrawerItem-BaLZe-DV.mjs.map +1 -0
- package/chunks/EmptyState-C3G5C0DO.cjs +91 -0
- package/chunks/EmptyState-C3G5C0DO.cjs.map +1 -0
- package/chunks/EmptyState-CVaRjXkT.mjs +92 -0
- package/chunks/EmptyState-CVaRjXkT.mjs.map +1 -0
- package/chunks/Flyout-BSaOisD7.mjs +118 -0
- package/chunks/Flyout-BSaOisD7.mjs.map +1 -0
- package/chunks/Flyout-CVH3IASy.cjs +117 -0
- package/chunks/Flyout-CVH3IASy.cjs.map +1 -0
- package/chunks/Gallery-B5XDZBRu.mjs +494 -0
- package/chunks/Gallery-B5XDZBRu.mjs.map +1 -0
- package/chunks/Gallery-BJ3O0SEf.cjs +493 -0
- package/chunks/Gallery-BJ3O0SEf.cjs.map +1 -0
- package/chunks/Icon-C4laDiIR.cjs +158 -0
- package/chunks/Icon-C4laDiIR.cjs.map +1 -0
- package/chunks/Icon-C5vYo9Is.mjs +159 -0
- package/chunks/Icon-C5vYo9Is.mjs.map +1 -0
- package/chunks/Input-BOt_sv7B.mjs +206 -0
- package/chunks/Input-BOt_sv7B.mjs.map +1 -0
- package/chunks/Input-Bcm7XRHs.cjs +205 -0
- package/chunks/Input-Bcm7XRHs.cjs.map +1 -0
- package/chunks/InputGroup-CSQ4zpAf.cjs +160 -0
- package/chunks/InputGroup-CSQ4zpAf.cjs.map +1 -0
- package/chunks/InputGroup-DIMk8yiS.mjs +161 -0
- package/chunks/InputGroup-DIMk8yiS.mjs.map +1 -0
- package/chunks/MenuButton-BqCkrXmM.cjs +79 -0
- package/chunks/MenuButton-BqCkrXmM.cjs.map +1 -0
- package/chunks/MenuButton-DUlSw-sF.mjs +80 -0
- package/chunks/MenuButton-DUlSw-sF.mjs.map +1 -0
- package/chunks/Modal-E1V8hyFI.mjs +362 -0
- package/chunks/Modal-E1V8hyFI.mjs.map +1 -0
- package/chunks/Modal-KRUDCrlp.cjs +361 -0
- package/chunks/Modal-KRUDCrlp.cjs.map +1 -0
- package/chunks/PageHeader-C5tVfSvH.cjs +88 -0
- package/chunks/PageHeader-C5tVfSvH.cjs.map +1 -0
- package/chunks/PageHeader-DAYz1_fF.mjs +89 -0
- package/chunks/PageHeader-DAYz1_fF.mjs.map +1 -0
- package/chunks/RadioGroup-DT5IaA5K.cjs +202 -0
- package/chunks/RadioGroup-DT5IaA5K.cjs.map +1 -0
- package/chunks/RadioGroup-atKq1EWA.mjs +203 -0
- package/chunks/RadioGroup-atKq1EWA.mjs.map +1 -0
- package/chunks/Select-CWZJnddP.mjs +389 -0
- package/chunks/Select-CWZJnddP.mjs.map +1 -0
- package/chunks/Select-CjiKx_1z.cjs +388 -0
- package/chunks/Select-CjiKx_1z.cjs.map +1 -0
- package/chunks/Spinner-ColidLuW.mjs +100 -0
- package/chunks/Spinner-ColidLuW.mjs.map +1 -0
- package/chunks/Spinner-D3Klgy3Z.cjs +99 -0
- package/chunks/Spinner-D3Klgy3Z.cjs.map +1 -0
- package/chunks/Stat-BYqc3PFf.cjs +149 -0
- package/chunks/Stat-BYqc3PFf.cjs.map +1 -0
- package/chunks/Stat-DX2kcT36.mjs +150 -0
- package/chunks/Stat-DX2kcT36.mjs.map +1 -0
- package/chunks/StatusMessage-Bl_E83nN.cjs +108 -0
- package/chunks/StatusMessage-Bl_E83nN.cjs.map +1 -0
- package/chunks/StatusMessage-Pa5IutUR.mjs +109 -0
- package/chunks/StatusMessage-Pa5IutUR.mjs.map +1 -0
- package/chunks/Step-BdgcmiDk.mjs +301 -0
- package/chunks/Step-BdgcmiDk.mjs.map +1 -0
- package/chunks/Step-fng1hpkt.cjs +300 -0
- package/chunks/Step-fng1hpkt.cjs.map +1 -0
- package/chunks/Switch-9zvnchC7.cjs +201 -0
- package/chunks/Switch-9zvnchC7.cjs.map +1 -0
- package/chunks/Switch-CsYwGxu5.mjs +185 -0
- package/chunks/Switch-CsYwGxu5.mjs.map +1 -0
- package/chunks/Tab-BXTh3QSn.mjs +138 -0
- package/chunks/Tab-BXTh3QSn.mjs.map +1 -0
- package/chunks/Tab-CjCGp0aH.cjs +137 -0
- package/chunks/Tab-CjCGp0aH.cjs.map +1 -0
- package/chunks/Table-BcI9uvYg.cjs +539 -0
- package/chunks/Table-BcI9uvYg.cjs.map +1 -0
- package/chunks/Table-DGmx3UyH.mjs +540 -0
- package/chunks/Table-DGmx3UyH.mjs.map +1 -0
- package/chunks/TimelineItem-BWFnies7.mjs +72 -0
- package/chunks/TimelineItem-BWFnies7.mjs.map +1 -0
- package/chunks/TimelineItem-CceZABwX.cjs +88 -0
- package/chunks/TimelineItem-CceZABwX.cjs.map +1 -0
- package/chunks/Tooltip-BWffoOtY.mjs +59 -0
- package/chunks/Tooltip-BWffoOtY.mjs.map +1 -0
- package/chunks/Tooltip-BtEsQB-y.cjs +58 -0
- package/chunks/Tooltip-BtEsQB-y.cjs.map +1 -0
- package/chunks/formField.sx-BLA6rq1F.mjs +109 -0
- package/chunks/formField.sx-BLA6rq1F.mjs.map +1 -0
- package/chunks/formField.sx-DEDuTUQS.cjs +108 -0
- package/chunks/formField.sx-DEDuTUQS.cjs.map +1 -0
- package/chunks/mergeSlotProps-D-7l6IPd.mjs +32 -0
- package/chunks/mergeSlotProps-D-7l6IPd.mjs.map +1 -0
- package/chunks/mergeSlotProps-DixXUzK1.cjs +31 -0
- package/chunks/mergeSlotProps-DixXUzK1.cjs.map +1 -0
- package/chunks/mergeSx-BXoNZjB_.mjs +10 -0
- package/chunks/mergeSx-BXoNZjB_.mjs.map +1 -0
- package/chunks/mergeSx-Dbccoo_H.cjs.map +1 -0
- package/chunks/resolvePreset-CxTI6_Ln.cjs.map +1 -0
- package/chunks/resolvePreset-K6_BfWHD.mjs +15 -0
- package/chunks/resolvePreset-K6_BfWHD.mjs.map +1 -0
- package/chunks/tokens-B5kmy5Gy.cjs +36 -0
- package/chunks/tokens-B5kmy5Gy.cjs.map +1 -0
- package/chunks/tokens-C2AKLGbM.mjs +37 -0
- package/chunks/tokens-C2AKLGbM.mjs.map +1 -0
- package/components/ActionMenu/ActionMenu.d.cts +44 -0
- package/components/ActionMenu/ActionMenu.d.mts +44 -0
- package/components/ActionMenu/index.cjs +7 -0
- package/components/ActionMenu/index.cjs.map +1 -0
- package/components/ActionMenu/index.d.cts +2 -0
- package/components/ActionMenu/index.d.mts +2 -0
- package/components/ActionMenu/index.mjs +7 -0
- package/components/ActionMenu/index.mjs.map +1 -0
- package/components/ActionMenu.d.cts +6 -0
- package/components/ActionMenu.d.mts +6 -0
- package/components/Alert/Alert.d.cts +26 -0
- package/components/Alert/Alert.d.mts +26 -0
- package/components/Alert/Alert.d.ts +3 -8
- package/components/Alert/index.cjs +6 -0
- package/components/Alert/index.cjs.map +1 -0
- package/components/Alert/index.d.cts +2 -0
- package/components/Alert/index.d.mts +2 -0
- package/components/Alert/index.mjs +6 -0
- package/components/Alert/index.mjs.map +1 -0
- package/components/Alert.d.cts +6 -0
- package/components/Alert.d.mts +6 -0
- package/components/AppBar/AppBar.d.cts +38 -0
- package/components/AppBar/AppBar.d.mts +38 -0
- package/components/AppBar/AppBar.d.ts +2 -19
- package/components/AppBar/AppBar.sx.d.cts +21 -0
- package/components/AppBar/AppBar.sx.d.mts +21 -0
- package/components/AppBar/AppBar.sx.d.ts +12 -3
- package/components/AppBar/AppBarContext.d.cts +18 -0
- package/components/AppBar/AppBarContext.d.mts +18 -0
- package/components/AppBar/AppBarMenuToggle.d.cts +39 -0
- package/components/AppBar/AppBarMenuToggle.d.mts +39 -0
- package/components/AppBar/index.cjs +9 -0
- package/components/AppBar/index.cjs.map +1 -0
- package/components/AppBar/index.d.cts +6 -0
- package/components/AppBar/index.d.mts +6 -0
- package/components/AppBar/index.mjs +9 -0
- package/components/AppBar/index.mjs.map +1 -0
- package/components/AppBar.d.cts +6 -0
- package/components/AppBar.d.mts +6 -0
- package/components/Autocomplete/Autocomplete.d.cts +102 -0
- package/components/Autocomplete/Autocomplete.d.mts +102 -0
- package/components/Autocomplete/Autocomplete.helpers.d.cts +22 -0
- package/components/Autocomplete/Autocomplete.helpers.d.mts +22 -0
- package/components/Autocomplete/Autocomplete.sx.d.cts +12 -0
- package/components/Autocomplete/Autocomplete.sx.d.mts +12 -0
- package/components/Autocomplete/Autocomplete.sx.d.ts +8 -3
- package/components/Autocomplete/_parts/AutocompleteChips.d.cts +20 -0
- package/components/Autocomplete/_parts/AutocompleteChips.d.mts +20 -0
- package/components/Autocomplete/_parts/AutocompleteLoader.d.cts +9 -0
- package/components/Autocomplete/_parts/AutocompleteLoader.d.mts +9 -0
- package/components/Autocomplete/_parts/AutocompleteOption.d.cts +16 -0
- package/components/Autocomplete/_parts/AutocompleteOption.d.mts +16 -0
- package/components/Autocomplete/index.cjs +7 -0
- package/components/Autocomplete/index.cjs.map +1 -0
- package/components/Autocomplete/index.d.cts +2 -0
- package/components/Autocomplete/index.d.mts +2 -0
- package/components/Autocomplete/index.mjs +7 -0
- package/components/Autocomplete/index.mjs.map +1 -0
- package/components/Autocomplete.d.cts +6 -0
- package/components/Autocomplete.d.mts +6 -0
- package/components/Avatar/Avatar.d.cts +48 -0
- package/components/Avatar/Avatar.d.mts +48 -0
- package/components/Avatar/Avatar.d.ts +3 -3
- package/components/Avatar/index.cjs +5 -0
- package/components/Avatar/index.cjs.map +1 -0
- package/components/Avatar/index.d.cts +2 -0
- package/components/Avatar/index.d.mts +2 -0
- package/components/Avatar/index.mjs +5 -0
- package/components/Avatar/index.mjs.map +1 -0
- package/components/Avatar.d.cts +2 -0
- package/components/Avatar.d.mts +2 -0
- package/components/Breadcrumbs/Breadcrumbs.d.cts +9 -0
- package/components/Breadcrumbs/Breadcrumbs.d.mts +9 -0
- package/components/Breadcrumbs/Breadcrumbs.d.ts +3 -10
- package/components/Breadcrumbs/index.cjs +6 -0
- package/components/Breadcrumbs/index.cjs.map +1 -0
- package/components/Breadcrumbs/index.d.cts +2 -0
- package/components/Breadcrumbs/index.d.mts +2 -0
- package/components/Breadcrumbs/index.mjs +6 -0
- package/components/Breadcrumbs/index.mjs.map +1 -0
- package/components/Breadcrumbs.d.cts +6 -0
- package/components/Breadcrumbs.d.mts +6 -0
- package/components/Button/Button.d.cts +17 -0
- package/components/Button/Button.d.mts +17 -0
- package/components/Button/Button.d.ts +16 -21
- package/components/Button/index.cjs +5 -0
- package/components/Button/index.cjs.map +1 -0
- package/components/Button/index.d.cts +2 -0
- package/components/Button/index.d.mts +2 -0
- package/components/Button/index.mjs +5 -0
- package/components/Button/index.mjs.map +1 -0
- package/components/Button.d.cts +2 -0
- package/components/Button.d.mts +2 -0
- package/components/ButtonGroup/ButtonGroup.d.cts +9 -0
- package/components/ButtonGroup/ButtonGroup.d.mts +9 -0
- package/components/ButtonGroup/ButtonGroup.d.ts +3 -12
- package/components/ButtonGroup/index.cjs +6 -0
- package/components/ButtonGroup/index.cjs.map +1 -0
- package/components/ButtonGroup/index.d.cts +2 -0
- package/components/ButtonGroup/index.d.mts +2 -0
- package/components/ButtonGroup/index.mjs +6 -0
- package/components/ButtonGroup/index.mjs.map +1 -0
- package/components/ButtonGroup.d.cts +6 -0
- package/components/ButtonGroup.d.mts +6 -0
- package/components/Card/Card.d.cts +72 -0
- package/components/Card/Card.d.mts +72 -0
- package/components/Card/Card.d.ts +25 -7
- package/components/Card/Card.sx.d.cts +25 -0
- package/components/Card/Card.sx.d.mts +25 -0
- package/components/Card/Card.sx.d.ts +16 -5
- package/components/Card/index.cjs +8 -0
- package/components/Card/index.cjs.map +1 -0
- package/components/Card/index.d.cts +4 -0
- package/components/Card/index.d.mts +4 -0
- package/components/Card/index.d.ts +1 -1
- package/components/Card/index.mjs +8 -0
- package/components/Card/index.mjs.map +1 -0
- package/components/Card.d.cts +6 -0
- package/components/Card.d.mts +6 -0
- package/components/Checkbox/Checkbox.d.cts +54 -0
- package/components/Checkbox/Checkbox.d.mts +54 -0
- package/components/Checkbox/Checkbox.d.ts +1 -2
- package/components/Checkbox/Checkbox.sx.d.cts +19 -0
- package/components/Checkbox/Checkbox.sx.d.mts +19 -0
- package/components/Checkbox/Checkbox.sx.d.ts +10 -4
- package/components/Checkbox/index.cjs +6 -0
- package/components/Checkbox/index.cjs.map +1 -0
- package/components/Checkbox/index.d.cts +2 -0
- package/components/Checkbox/index.d.mts +2 -0
- package/components/Checkbox/index.mjs +6 -0
- package/components/Checkbox/index.mjs.map +1 -0
- package/components/Checkbox.d.cts +6 -0
- package/components/Checkbox.d.mts +6 -0
- package/components/Chip/Chip.d.cts +20 -0
- package/components/Chip/Chip.d.mts +20 -0
- package/components/Chip/Chip.d.ts +1 -1
- package/components/Chip/index.cjs +6 -0
- package/components/Chip/index.cjs.map +1 -0
- package/components/Chip/index.d.cts +2 -0
- package/components/Chip/index.d.mts +2 -0
- package/components/Chip/index.mjs +6 -0
- package/components/Chip/index.mjs.map +1 -0
- package/components/Chip.d.cts +6 -0
- package/components/Chip.d.mts +6 -0
- package/components/Column/Column.d.cts +12 -0
- package/components/Column/Column.d.mts +12 -0
- package/components/Column/index.cjs +8 -0
- package/components/Column/index.cjs.map +1 -0
- package/components/Column/index.d.cts +2 -0
- package/components/Column/index.d.mts +2 -0
- package/components/Column/index.mjs +8 -0
- package/components/Column/index.mjs.map +1 -0
- package/components/Column.d.cts +2 -0
- package/components/Column.d.mts +2 -0
- package/components/DataRow/DataRow.d.cts +62 -0
- package/components/DataRow/DataRow.d.mts +62 -0
- package/components/DataRow/DataRow.d.ts +30 -12
- package/components/DataRow/index.cjs +6 -0
- package/components/DataRow/index.cjs.map +1 -0
- package/components/DataRow/index.d.cts +2 -0
- package/components/DataRow/index.d.mts +2 -0
- package/components/DataRow/index.mjs +6 -0
- package/components/DataRow/index.mjs.map +1 -0
- package/components/DataRow.d.cts +6 -0
- package/components/DataRow.d.mts +6 -0
- package/components/DatePicker/DatePicker.d.cts +44 -0
- package/components/DatePicker/DatePicker.d.mts +44 -0
- package/components/DatePicker/DatePicker.d.ts +1 -1
- package/components/DatePicker/DatePicker.helpers.d.cts +7 -0
- package/components/DatePicker/DatePicker.helpers.d.mts +7 -0
- package/components/DatePicker/DatePicker.sx.d.cts +16 -0
- package/components/DatePicker/DatePicker.sx.d.mts +16 -0
- package/components/DatePicker/DatePicker.sx.d.ts +11 -4
- package/components/DatePicker/index.cjs +6 -0
- package/components/DatePicker/index.cjs.map +1 -0
- package/components/DatePicker/index.d.cts +2 -0
- package/components/DatePicker/index.d.mts +2 -0
- package/components/DatePicker/index.mjs +6 -0
- package/components/DatePicker/index.mjs.map +1 -0
- package/components/DatePicker.d.cts +6 -0
- package/components/DatePicker.d.mts +6 -0
- package/components/DateTimePicker/DateTimePicker.d.cts +78 -0
- package/components/DateTimePicker/DateTimePicker.d.mts +78 -0
- package/components/DateTimePicker/DateTimePicker.d.ts +1 -1
- package/components/DateTimePicker/DateTimePicker.helpers.d.cts +13 -0
- package/components/DateTimePicker/DateTimePicker.helpers.d.mts +13 -0
- package/components/DateTimePicker/DateTimePicker.sx.d.cts +10 -0
- package/components/DateTimePicker/DateTimePicker.sx.d.mts +10 -0
- package/components/DateTimePicker/DateTimePicker.sx.d.ts +5 -2
- package/components/DateTimePicker/index.cjs +6 -0
- package/components/DateTimePicker/index.cjs.map +1 -0
- package/components/DateTimePicker/index.d.cts +2 -0
- package/components/DateTimePicker/index.d.mts +2 -0
- package/components/DateTimePicker/index.mjs +6 -0
- package/components/DateTimePicker/index.mjs.map +1 -0
- package/components/DateTimePicker.d.cts +6 -0
- package/components/DateTimePicker.d.mts +6 -0
- package/components/Divider/Divider.d.cts +9 -0
- package/components/Divider/Divider.d.mts +9 -0
- package/components/Divider/Divider.d.ts +3 -11
- package/components/Divider/index.cjs +6 -0
- package/components/Divider/index.cjs.map +1 -0
- package/components/Divider/index.d.cts +2 -0
- package/components/Divider/index.d.mts +2 -0
- package/components/Divider/index.mjs +6 -0
- package/components/Divider/index.mjs.map +1 -0
- package/components/Divider.d.cts +6 -0
- package/components/Divider.d.mts +6 -0
- package/components/Drawer/Drawer.d.cts +58 -0
- package/components/Drawer/Drawer.d.mts +58 -0
- package/components/Drawer/Drawer.d.ts +1 -1
- package/components/Drawer/Drawer.sx.d.cts +28 -0
- package/components/Drawer/Drawer.sx.d.mts +28 -0
- package/components/Drawer/Drawer.sx.d.ts +9 -4
- package/components/Drawer/DrawerContext.d.cts +18 -0
- package/components/Drawer/DrawerContext.d.mts +18 -0
- package/components/Drawer/DrawerItem.d.cts +40 -0
- package/components/Drawer/DrawerItem.d.mts +40 -0
- package/components/Drawer/index.cjs +8 -0
- package/components/Drawer/index.cjs.map +1 -0
- package/components/Drawer/index.d.cts +6 -0
- package/components/Drawer/index.d.mts +6 -0
- package/components/Drawer/index.mjs +8 -0
- package/components/Drawer/index.mjs.map +1 -0
- package/components/Drawer.d.cts +6 -0
- package/components/Drawer.d.mts +6 -0
- package/components/EmptyState/EmptyState.d.cts +37 -0
- package/components/EmptyState/EmptyState.d.mts +37 -0
- package/components/EmptyState/EmptyState.d.ts +18 -5
- package/components/EmptyState/index.cjs +6 -0
- package/components/EmptyState/index.cjs.map +1 -0
- package/components/EmptyState/index.d.cts +2 -0
- package/components/EmptyState/index.d.mts +2 -0
- package/components/EmptyState/index.mjs +6 -0
- package/components/EmptyState/index.mjs.map +1 -0
- package/components/EmptyState.d.cts +6 -0
- package/components/EmptyState.d.mts +6 -0
- package/components/Flyout/Flyout.d.cts +13 -0
- package/components/Flyout/Flyout.d.mts +13 -0
- package/components/Flyout/Flyout.d.ts +1 -1
- package/components/Flyout/index.cjs +5 -0
- package/components/Flyout/index.cjs.map +1 -0
- package/components/Flyout/index.d.cts +1 -0
- package/components/Flyout/index.d.mts +1 -0
- package/components/Flyout/index.mjs +5 -0
- package/components/Flyout/index.mjs.map +1 -0
- package/components/Flyout.d.cts +2 -0
- package/components/Flyout.d.mts +2 -0
- package/components/Gallery/Gallery.d.cts +28 -0
- package/components/Gallery/Gallery.d.mts +28 -0
- package/components/Gallery/Gallery.d.ts +1 -1
- package/components/Gallery/Gallery.definition.d.cts +1 -0
- package/components/Gallery/Gallery.definition.d.mts +1 -0
- package/components/Gallery/GalleryLightbox.d.cts +16 -0
- package/components/Gallery/GalleryLightbox.d.mts +16 -0
- package/components/Gallery/GalleryMain.d.cts +8 -0
- package/components/Gallery/GalleryMain.d.mts +8 -0
- package/components/Gallery/GalleryThumbnails.d.cts +13 -0
- package/components/Gallery/GalleryThumbnails.d.mts +13 -0
- package/components/Gallery/index.cjs +6 -0
- package/components/Gallery/index.cjs.map +1 -0
- package/components/Gallery/index.d.cts +2 -0
- package/components/Gallery/index.d.mts +2 -0
- package/components/Gallery/index.mjs +6 -0
- package/components/Gallery/index.mjs.map +1 -0
- package/components/Gallery.d.cts +6 -0
- package/components/Gallery.d.mts +6 -0
- package/components/Icon/Icon.d.cts +48 -0
- package/components/Icon/Icon.d.mts +48 -0
- package/components/Icon/Icon.d.ts +2 -2
- package/components/Icon/index.cjs +6 -0
- package/components/Icon/index.cjs.map +1 -0
- package/components/Icon/index.d.cts +2 -0
- package/components/Icon/index.d.mts +2 -0
- package/components/Icon/index.mjs +6 -0
- package/components/Icon/index.mjs.map +1 -0
- package/components/Icon.d.cts +6 -0
- package/components/Icon.d.mts +6 -0
- package/components/Input/Input.d.cts +48 -0
- package/components/Input/Input.d.mts +48 -0
- package/components/Input/Input.d.ts +1 -1
- package/components/Input/Input.helpers.d.cts +14 -0
- package/components/Input/Input.helpers.d.mts +14 -0
- package/components/Input/Input.sx.d.cts +11 -0
- package/components/Input/Input.sx.d.mts +11 -0
- package/components/Input/Input.sx.d.ts +6 -3
- package/components/Input/index.cjs +6 -0
- package/components/Input/index.cjs.map +1 -0
- package/components/Input/index.d.cts +2 -0
- package/components/Input/index.d.mts +2 -0
- package/components/Input/index.mjs +6 -0
- package/components/Input/index.mjs.map +1 -0
- package/components/Input.d.cts +6 -0
- package/components/Input.d.mts +6 -0
- package/components/InputGroup/InputGroup.d.cts +41 -0
- package/components/InputGroup/InputGroup.d.mts +41 -0
- package/components/InputGroup/InputGroup.d.ts +3 -4
- package/components/InputGroup/index.cjs +6 -0
- package/components/InputGroup/index.cjs.map +1 -0
- package/components/InputGroup/index.d.cts +2 -0
- package/components/InputGroup/index.d.mts +2 -0
- package/components/InputGroup/index.mjs +6 -0
- package/components/InputGroup/index.mjs.map +1 -0
- package/components/InputGroup.d.cts +6 -0
- package/components/InputGroup.d.mts +6 -0
- package/components/MenuButton/MenuButton.d.cts +24 -0
- package/components/MenuButton/MenuButton.d.mts +24 -0
- package/components/MenuButton/MenuButton.d.ts +4 -1
- package/components/MenuButton/index.cjs +5 -0
- package/components/MenuButton/index.cjs.map +1 -0
- package/components/MenuButton/index.d.cts +2 -0
- package/components/MenuButton/index.d.mts +2 -0
- package/components/MenuButton/index.d.ts +1 -0
- package/components/MenuButton/index.mjs +5 -0
- package/components/MenuButton/index.mjs.map +1 -0
- package/components/MenuButton.d.cts +2 -0
- package/components/MenuButton.d.mts +2 -0
- package/components/Modal/Modal.d.cts +87 -0
- package/components/Modal/Modal.d.mts +87 -0
- package/components/Modal/ModalBody.d.cts +11 -0
- package/components/Modal/ModalBody.d.mts +11 -0
- package/components/Modal/ModalFooter.d.cts +27 -0
- package/components/Modal/ModalFooter.d.mts +27 -0
- package/components/Modal/ModalHeader.d.cts +11 -0
- package/components/Modal/ModalHeader.d.mts +11 -0
- package/components/Modal/index.cjs +9 -0
- package/components/Modal/index.cjs.map +1 -0
- package/components/Modal/index.d.cts +8 -0
- package/components/Modal/index.d.mts +8 -0
- package/components/Modal/index.mjs +9 -0
- package/components/Modal/index.mjs.map +1 -0
- package/components/Modal.d.cts +6 -0
- package/components/Modal.d.mts +6 -0
- package/components/PageHeader/PageHeader.d.cts +36 -0
- package/components/PageHeader/PageHeader.d.mts +36 -0
- package/components/PageHeader/PageHeader.d.ts +16 -5
- package/components/PageHeader/index.cjs +6 -0
- package/components/PageHeader/index.cjs.map +1 -0
- package/components/PageHeader/index.d.cts +2 -0
- package/components/PageHeader/index.d.mts +2 -0
- package/components/PageHeader/index.mjs +6 -0
- package/components/PageHeader/index.mjs.map +1 -0
- package/components/PageHeader.d.cts +6 -0
- package/components/PageHeader.d.mts +6 -0
- package/components/RadioGroup/RadioGroup.d.cts +58 -0
- package/components/RadioGroup/RadioGroup.d.mts +58 -0
- package/components/RadioGroup/RadioGroup.d.ts +1 -2
- package/components/RadioGroup/RadioGroup.sx.d.cts +25 -0
- package/components/RadioGroup/RadioGroup.sx.d.mts +25 -0
- package/components/RadioGroup/RadioGroup.sx.d.ts +6 -1
- package/components/RadioGroup/index.cjs +6 -0
- package/components/RadioGroup/index.cjs.map +1 -0
- package/components/RadioGroup/index.d.cts +2 -0
- package/components/RadioGroup/index.d.mts +2 -0
- package/components/RadioGroup/index.mjs +6 -0
- package/components/RadioGroup/index.mjs.map +1 -0
- package/components/RadioGroup.d.cts +6 -0
- package/components/RadioGroup.d.mts +6 -0
- package/components/Select/Select.d.cts +99 -0
- package/components/Select/Select.d.mts +99 -0
- package/components/Select/Select.helpers.d.cts +14 -0
- package/components/Select/Select.helpers.d.mts +14 -0
- package/components/Select/Select.sx.d.cts +10 -0
- package/components/Select/Select.sx.d.mts +10 -0
- package/components/Select/Select.sx.d.ts +5 -2
- package/components/Select/_parts/SelectMenuItem.d.cts +20 -0
- package/components/Select/_parts/SelectMenuItem.d.mts +20 -0
- package/components/Select/_parts/SelectValue.d.cts +22 -0
- package/components/Select/_parts/SelectValue.d.mts +22 -0
- package/components/Select/index.cjs +7 -0
- package/components/Select/index.cjs.map +1 -0
- package/components/Select/index.d.cts +2 -0
- package/components/Select/index.d.mts +2 -0
- package/components/Select/index.mjs +7 -0
- package/components/Select/index.mjs.map +1 -0
- package/components/Select.d.cts +6 -0
- package/components/Select.d.mts +6 -0
- package/components/Spinner/Spinner.d.cts +27 -0
- package/components/Spinner/Spinner.d.mts +27 -0
- package/components/Spinner/Spinner.d.ts +3 -2
- package/components/Spinner/index.cjs +6 -0
- package/components/Spinner/index.cjs.map +1 -0
- package/components/Spinner/index.d.cts +2 -0
- package/components/Spinner/index.d.mts +2 -0
- package/components/Spinner/index.mjs +6 -0
- package/components/Spinner/index.mjs.map +1 -0
- package/components/Spinner.d.cts +6 -0
- package/components/Spinner.d.mts +6 -0
- package/components/Stat/Stat.d.cts +58 -0
- package/components/Stat/Stat.d.mts +58 -0
- package/components/Stat/Stat.d.ts +48 -10
- package/components/Stat/index.cjs +6 -0
- package/components/Stat/index.cjs.map +1 -0
- package/components/Stat/index.d.cts +2 -0
- package/components/Stat/index.d.mts +2 -0
- package/components/Stat/index.mjs +6 -0
- package/components/Stat/index.mjs.map +1 -0
- package/components/Stat.d.cts +6 -0
- package/components/Stat.d.mts +6 -0
- package/components/StatusMessage/StatusMessage.d.cts +35 -0
- package/components/StatusMessage/StatusMessage.d.mts +35 -0
- package/components/StatusMessage/StatusMessage.d.ts +9 -2
- package/components/StatusMessage/StatusMessageContext.d.cts +18 -0
- package/components/StatusMessage/StatusMessageContext.d.mts +18 -0
- package/components/StatusMessage/StatusMessageContext.d.ts +3 -1
- package/components/StatusMessage/StatusMessageRenderer.d.cts +1 -0
- package/components/StatusMessage/StatusMessageRenderer.d.mts +1 -0
- package/components/StatusMessage/StatusMessageRenderer.d.ts +1 -0
- package/components/StatusMessage/index.cjs +86 -0
- package/components/StatusMessage/index.cjs.map +1 -0
- package/components/StatusMessage/index.d.cts +6 -0
- package/components/StatusMessage/index.d.mts +6 -0
- package/components/StatusMessage/index.d.ts +2 -0
- package/components/StatusMessage/index.mjs +86 -0
- package/components/StatusMessage/index.mjs.map +1 -0
- package/components/StatusMessage/useStatusMessage.d.cts +6 -0
- package/components/StatusMessage/useStatusMessage.d.mts +6 -0
- package/components/StatusMessage/useStatusMessage.d.ts +6 -0
- package/components/StatusMessage.d.cts +6 -0
- package/components/StatusMessage.d.mts +6 -0
- package/components/Stepper/Step.d.cts +18 -0
- package/components/Stepper/Step.d.mts +18 -0
- package/components/Stepper/Stepper.d.cts +18 -0
- package/components/Stepper/Stepper.d.mts +18 -0
- package/components/Stepper/Stepper.d.ts +4 -3
- package/components/Stepper/StepperContext.d.cts +73 -0
- package/components/Stepper/StepperContext.d.mts +73 -0
- package/components/Stepper/_hooks/useHorizontalScroll.d.cts +19 -0
- package/components/Stepper/_hooks/useHorizontalScroll.d.mts +19 -0
- package/components/Stepper/_parts/StepperScrollArrow.d.cts +19 -0
- package/components/Stepper/_parts/StepperScrollArrow.d.mts +19 -0
- package/components/Stepper/index.cjs +10 -0
- package/components/Stepper/index.cjs.map +1 -0
- package/components/Stepper/index.d.cts +6 -0
- package/components/Stepper/index.d.mts +6 -0
- package/components/Stepper/index.mjs +10 -0
- package/components/Stepper/index.mjs.map +1 -0
- package/components/Stepper.d.cts +6 -0
- package/components/Stepper.d.mts +6 -0
- package/components/Switch/Switch.d.cts +49 -0
- package/components/Switch/Switch.d.mts +49 -0
- package/components/Switch/Switch.d.ts +2 -1
- package/components/Switch/Switch.sx.d.cts +27 -0
- package/components/Switch/Switch.sx.d.mts +27 -0
- package/components/Switch/Switch.sx.d.ts +6 -1
- package/components/Switch/Switch.types.d.cts +1 -0
- package/components/Switch/Switch.types.d.mts +1 -0
- package/components/Switch/index.cjs +6 -0
- package/components/Switch/index.cjs.map +1 -0
- package/components/Switch/index.d.cts +2 -0
- package/components/Switch/index.d.mts +2 -0
- package/components/Switch/index.mjs +6 -0
- package/components/Switch/index.mjs.map +1 -0
- package/components/Switch.d.cts +6 -0
- package/components/Switch.d.mts +6 -0
- package/components/Table/Table.d.cts +41 -0
- package/components/Table/Table.d.mts +41 -0
- package/components/Table/data.d.cts +3 -0
- package/components/Table/data.d.mts +3 -0
- package/components/Table/exportsUtils.d.cts +24 -0
- package/components/Table/exportsUtils.d.mts +24 -0
- package/components/Table/index.cjs +5 -0
- package/components/Table/index.cjs.map +1 -0
- package/components/Table/index.d.cts +1 -0
- package/components/Table/index.d.mts +1 -0
- package/components/Table/index.mjs +5 -0
- package/components/Table/index.mjs.map +1 -0
- package/components/Table/types.d.cts +31 -0
- package/components/Table/types.d.mts +31 -0
- package/components/Table.d.cts +2 -0
- package/components/Table.d.mts +2 -0
- package/components/Tabs/Tab.d.cts +24 -0
- package/components/Tabs/Tab.d.mts +24 -0
- package/components/Tabs/Tabs.d.cts +36 -0
- package/components/Tabs/Tabs.d.mts +36 -0
- package/components/Tabs/Tabs.d.ts +2 -2
- package/components/Tabs/_tabUtils.d.cts +4 -0
- package/components/Tabs/_tabUtils.d.mts +4 -0
- package/components/Tabs/index.cjs +7 -0
- package/components/Tabs/index.cjs.map +1 -0
- package/components/Tabs/index.d.cts +4 -0
- package/components/Tabs/index.d.mts +4 -0
- package/components/Tabs/index.mjs +7 -0
- package/components/Tabs/index.mjs.map +1 -0
- package/components/Tabs.d.cts +6 -0
- package/components/Tabs.d.mts +6 -0
- package/components/Timeline/Timeline.d.cts +8 -0
- package/components/Timeline/Timeline.d.mts +8 -0
- package/components/Timeline/Timeline.d.ts +3 -4
- package/components/Timeline/TimelineItem.d.cts +9 -0
- package/components/Timeline/TimelineItem.d.mts +9 -0
- package/components/Timeline/TimelineItem.d.ts +4 -2
- package/components/Timeline/index.cjs +7 -0
- package/components/Timeline/index.cjs.map +1 -0
- package/components/Timeline/index.d.cts +4 -0
- package/components/Timeline/index.d.mts +4 -0
- package/components/Timeline/index.mjs +7 -0
- package/components/Timeline/index.mjs.map +1 -0
- package/components/Timeline.d.cts +6 -0
- package/components/Timeline.d.mts +6 -0
- package/components/Tooltip/Tooltip.d.cts +24 -0
- package/components/Tooltip/Tooltip.d.mts +24 -0
- package/components/Tooltip/Tooltip.d.ts +12 -11
- package/components/Tooltip/index.cjs +6 -0
- package/components/Tooltip/index.cjs.map +1 -0
- package/components/Tooltip/index.d.cts +2 -0
- package/components/Tooltip/index.d.mts +2 -0
- package/components/Tooltip/index.d.ts +2 -1
- package/components/Tooltip/index.mjs +6 -0
- package/components/Tooltip/index.mjs.map +1 -0
- package/components/Tooltip.d.cts +6 -0
- package/components/Tooltip.d.mts +6 -0
- package/components/Tooltip.d.ts +4 -0
- package/components/_shared/formField.sx.d.cts +62 -0
- package/components/_shared/formField.sx.d.mts +62 -0
- package/components/_shared/formField.sx.d.ts +30 -1
- package/components/_shared/mergeSlotProps.d.cts +19 -0
- package/components/_shared/mergeSlotProps.d.mts +19 -0
- package/components/_shared/mergeSlotProps.d.ts +19 -0
- package/components/_shared/mergeSx.d.cts +7 -0
- package/components/_shared/mergeSx.d.mts +7 -0
- package/components/_shared/resolvePreset.d.cts +22 -0
- package/components/_shared/resolvePreset.d.mts +22 -0
- package/hooks/ClipBoard/ClipBoard.d.cts +30 -0
- package/hooks/ClipBoard/ClipBoard.d.mts +30 -0
- package/hooks/ClipBoard/ClipboardUnifiedDemo.d.cts +14 -0
- package/hooks/ClipBoard/ClipboardUnifiedDemo.d.mts +14 -0
- package/hooks/ClipBoard/index.cjs +100 -0
- package/hooks/ClipBoard/index.cjs.map +1 -0
- package/hooks/ClipBoard/index.d.cts +1 -0
- package/hooks/ClipBoard/index.d.mts +1 -0
- package/hooks/ClipBoard/index.mjs +100 -0
- package/hooks/ClipBoard/index.mjs.map +1 -0
- package/hooks/ClipBoard.d.cts +2 -0
- package/hooks/ClipBoard.d.mts +2 -0
- package/index.cjs +90 -88
- package/index.cjs.map +1 -1
- package/index.d.cts +63 -0
- package/index.d.mts +63 -0
- package/index.d.ts +1 -0
- package/index.mjs +148 -0
- package/index.mjs.map +1 -0
- package/mui.d.cts +8 -0
- package/mui.d.mts +8 -0
- package/package.json +404 -143
- package/theme/componentStyles.d.cts +33 -0
- package/theme/componentStyles.d.mts +33 -0
- package/theme/componentStyles.d.ts +3 -2
- package/theme/friComponents.d.cts +138 -0
- package/theme/friComponents.d.mts +138 -0
- package/theme/friComponents.d.ts +138 -0
- package/theme/tokens.d.cts +38 -0
- package/theme/tokens.d.mts +38 -0
- package/utils/index.d.cts +2 -0
- package/utils/index.d.mts +2 -0
- package/utils/scrollToTop.d.cts +28 -0
- package/utils/scrollToTop.d.mts +28 -0
- package/ActionMenu-D81Xb35f.cjs.map +0 -1
- package/ActionMenu-DYPA_tYk.js +0 -106
- package/ActionMenu-DYPA_tYk.js.map +0 -1
- package/Alert-B3SMPD1s.cjs +0 -31
- package/Alert-B3SMPD1s.cjs.map +0 -1
- package/Alert-YsPScpSE.js +0 -32
- package/Alert-YsPScpSE.js.map +0 -1
- package/AppBarMenuToggle-BpXBMeca.js +0 -128
- package/AppBarMenuToggle-BpXBMeca.js.map +0 -1
- package/AppBarMenuToggle-D_RJGtHO.cjs +0 -127
- package/AppBarMenuToggle-D_RJGtHO.cjs.map +0 -1
- package/Autocomplete-Baqwboth.cjs +0 -362
- package/Autocomplete-Baqwboth.cjs.map +0 -1
- package/Autocomplete-Cvf16lFk.js +0 -363
- package/Autocomplete-Cvf16lFk.js.map +0 -1
- package/Avatar-BjyfSNvP.cjs +0 -162
- package/Avatar-BjyfSNvP.cjs.map +0 -1
- package/Avatar-C_C4bcb9.js +0 -163
- package/Avatar-C_C4bcb9.js.map +0 -1
- package/Breadcrumbs-B9I3vxPb.cjs +0 -25
- package/Breadcrumbs-B9I3vxPb.cjs.map +0 -1
- package/Breadcrumbs-C41SPbtX.js +0 -26
- package/Breadcrumbs-C41SPbtX.js.map +0 -1
- package/Button-C17mExpd.cjs +0 -63
- package/Button-C17mExpd.cjs.map +0 -1
- package/Button-UkkP-bNw.js +0 -64
- package/Button-UkkP-bNw.js.map +0 -1
- package/ButtonGroup-CNunDofQ.cjs +0 -33
- package/ButtonGroup-CNunDofQ.cjs.map +0 -1
- package/ButtonGroup-CcKUZ-lT.js +0 -34
- package/ButtonGroup-CcKUZ-lT.js.map +0 -1
- package/Card-DYKGY-NG.js +0 -116
- package/Card-DYKGY-NG.js.map +0 -1
- package/Card-Dr1-ATRY.cjs +0 -115
- package/Card-Dr1-ATRY.cjs.map +0 -1
- package/Checkbox-BL4kvHFB.js +0 -189
- package/Checkbox-BL4kvHFB.js.map +0 -1
- package/Checkbox-Bx4Asmg7.cjs +0 -188
- package/Checkbox-Bx4Asmg7.cjs.map +0 -1
- package/Chip-OPYQ1uQ_.js +0 -74
- package/Chip-OPYQ1uQ_.js.map +0 -1
- package/Chip-qoJLDiva.cjs +0 -73
- package/Chip-qoJLDiva.cjs.map +0 -1
- package/DataRow-B7fJ5taA.js +0 -55
- package/DataRow-B7fJ5taA.js.map +0 -1
- package/DataRow-CfCaSdaJ.cjs +0 -54
- package/DataRow-CfCaSdaJ.cjs.map +0 -1
- package/DatePicker-D5BH4v1p.js +0 -182
- package/DatePicker-D5BH4v1p.js.map +0 -1
- package/DatePicker-mz7CYtVw.cjs +0 -181
- package/DatePicker-mz7CYtVw.cjs.map +0 -1
- package/DateTimePicker-ZCf0Wh4r.js +0 -226
- package/DateTimePicker-ZCf0Wh4r.js.map +0 -1
- package/DateTimePicker-ejQDpjgX.cjs +0 -225
- package/DateTimePicker-ejQDpjgX.cjs.map +0 -1
- package/Divider-BApcM5CV.js +0 -28
- package/Divider-BApcM5CV.js.map +0 -1
- package/Divider-CIY0JK4U.cjs +0 -27
- package/Divider-CIY0JK4U.cjs.map +0 -1
- package/DrawerItem-DlnG_NdY.cjs +0 -272
- package/DrawerItem-DlnG_NdY.cjs.map +0 -1
- package/DrawerItem-at1lsEo9.js +0 -273
- package/DrawerItem-at1lsEo9.js.map +0 -1
- package/EmptyState-DJj9KOEy.cjs +0 -47
- package/EmptyState-DJj9KOEy.cjs.map +0 -1
- package/EmptyState-kEoDkg1B.js +0 -48
- package/EmptyState-kEoDkg1B.js.map +0 -1
- package/Flyout-DCcDBYKT.js +0 -117
- package/Flyout-DCcDBYKT.js.map +0 -1
- package/Flyout-fycujUVf.cjs +0 -116
- package/Flyout-fycujUVf.cjs.map +0 -1
- package/Gallery-ClBJxCMc.js +0 -491
- package/Gallery-ClBJxCMc.js.map +0 -1
- package/Gallery-Cn1Bj_ao.cjs +0 -490
- package/Gallery-Cn1Bj_ao.cjs.map +0 -1
- package/Icon-CUwK2c8z.js +0 -108
- package/Icon-CUwK2c8z.js.map +0 -1
- package/Icon-ChnAivGo.cjs +0 -107
- package/Icon-ChnAivGo.cjs.map +0 -1
- package/Input-CmvuMwXZ.js +0 -194
- package/Input-CmvuMwXZ.js.map +0 -1
- package/Input-hnQ7g6b7.cjs +0 -193
- package/Input-hnQ7g6b7.cjs.map +0 -1
- package/InputGroup-BZ7cmAcg.cjs +0 -140
- package/InputGroup-BZ7cmAcg.cjs.map +0 -1
- package/InputGroup-D5pXKGjZ.js +0 -141
- package/InputGroup-D5pXKGjZ.js.map +0 -1
- package/MenuButton-C4s8rG05.cjs +0 -79
- package/MenuButton-C4s8rG05.cjs.map +0 -1
- package/MenuButton-CZRN4P6x.js +0 -80
- package/MenuButton-CZRN4P6x.js.map +0 -1
- package/Modal-BqW0Nk3l.js +0 -362
- package/Modal-BqW0Nk3l.js.map +0 -1
- package/Modal-Cfyr-RsW.cjs +0 -361
- package/Modal-Cfyr-RsW.cjs.map +0 -1
- package/PageHeader-BQZOqjNr.cjs +0 -37
- package/PageHeader-BQZOqjNr.cjs.map +0 -1
- package/PageHeader-DDYi6Nhy.js +0 -38
- package/PageHeader-DDYi6Nhy.js.map +0 -1
- package/RadioGroup-DVvmmDs3.cjs +0 -203
- package/RadioGroup-DVvmmDs3.cjs.map +0 -1
- package/RadioGroup-cKCpag8W.js +0 -204
- package/RadioGroup-cKCpag8W.js.map +0 -1
- package/Select-CZ0BiKVN.js +0 -383
- package/Select-CZ0BiKVN.js.map +0 -1
- package/Select-ZhFf4SBp.cjs +0 -382
- package/Select-ZhFf4SBp.cjs.map +0 -1
- package/Spinner-B6sThC1p.js +0 -74
- package/Spinner-B6sThC1p.js.map +0 -1
- package/Spinner-D7qRmNS9.cjs +0 -73
- package/Spinner-D7qRmNS9.cjs.map +0 -1
- package/Stat-BUcFCGrz.cjs +0 -83
- package/Stat-BUcFCGrz.cjs.map +0 -1
- package/Stat-C06A_izS.js +0 -84
- package/Stat-C06A_izS.js.map +0 -1
- package/StatusMessageContext-BMsbLKRq.cjs +0 -106
- package/StatusMessageContext-BMsbLKRq.cjs.map +0 -1
- package/StatusMessageContext-DgYiObYE.js +0 -107
- package/StatusMessageContext-DgYiObYE.js.map +0 -1
- package/Step-BArsou1V.js +0 -301
- package/Step-BArsou1V.js.map +0 -1
- package/Step-Nd7SJbRZ.cjs +0 -300
- package/Step-Nd7SJbRZ.cjs.map +0 -1
- package/Switch-B4ex7yKR.cjs +0 -183
- package/Switch-B4ex7yKR.cjs.map +0 -1
- package/Switch-CY1Dd2ff.js +0 -184
- package/Switch-CY1Dd2ff.js.map +0 -1
- package/Tab-D1S7kxXI.cjs +0 -137
- package/Tab-D1S7kxXI.cjs.map +0 -1
- package/Tab-DycIMXmQ.js +0 -138
- package/Tab-DycIMXmQ.js.map +0 -1
- package/Table-BpnAkCgd.cjs +0 -528
- package/Table-BpnAkCgd.cjs.map +0 -1
- package/Table-BuALBQWX.js +0 -529
- package/Table-BuALBQWX.js.map +0 -1
- package/TimelineItem-0jRPFT11.js +0 -68
- package/TimelineItem-0jRPFT11.js.map +0 -1
- package/TimelineItem-BbhUWJhU.cjs +0 -84
- package/TimelineItem-BbhUWJhU.cjs.map +0 -1
- package/Tooltip-B15a34_o.js +0 -40
- package/Tooltip-B15a34_o.js.map +0 -1
- package/Tooltip-CEEDkwds.cjs +0 -39
- package/Tooltip-CEEDkwds.cjs.map +0 -1
- package/components/ActionMenu/ActionMenu.cjs +0 -7
- package/components/ActionMenu/ActionMenu.cjs.map +0 -1
- package/components/ActionMenu/ActionMenu.js +0 -7
- package/components/ActionMenu/ActionMenu.js.map +0 -1
- package/components/Alert/Alert.cjs +0 -6
- package/components/Alert/Alert.cjs.map +0 -1
- package/components/Alert/Alert.js +0 -6
- package/components/Alert/Alert.js.map +0 -1
- package/components/AppBar/AppBar.cjs +0 -9
- package/components/AppBar/AppBar.cjs.map +0 -1
- package/components/AppBar/AppBar.js +0 -9
- package/components/AppBar/AppBar.js.map +0 -1
- package/components/Autocomplete/Autocomplete.cjs +0 -7
- package/components/Autocomplete/Autocomplete.cjs.map +0 -1
- package/components/Autocomplete/Autocomplete.js +0 -7
- package/components/Autocomplete/Autocomplete.js.map +0 -1
- package/components/Avatar/Avatar.cjs +0 -5
- package/components/Avatar/Avatar.cjs.map +0 -1
- package/components/Avatar/Avatar.js +0 -5
- package/components/Avatar/Avatar.js.map +0 -1
- package/components/Breadcrumbs/Breadcrumbs.cjs +0 -6
- package/components/Breadcrumbs/Breadcrumbs.cjs.map +0 -1
- package/components/Breadcrumbs/Breadcrumbs.js +0 -6
- package/components/Breadcrumbs/Breadcrumbs.js.map +0 -1
- package/components/Button/Button.cjs +0 -5
- package/components/Button/Button.cjs.map +0 -1
- package/components/Button/Button.js +0 -5
- package/components/Button/Button.js.map +0 -1
- package/components/ButtonGroup/ButtonGroup.cjs +0 -6
- package/components/ButtonGroup/ButtonGroup.cjs.map +0 -1
- package/components/ButtonGroup/ButtonGroup.js +0 -6
- package/components/ButtonGroup/ButtonGroup.js.map +0 -1
- package/components/Card/Card.cjs +0 -7
- package/components/Card/Card.cjs.map +0 -1
- package/components/Card/Card.js +0 -7
- package/components/Card/Card.js.map +0 -1
- package/components/Checkbox/Checkbox.cjs +0 -6
- package/components/Checkbox/Checkbox.cjs.map +0 -1
- package/components/Checkbox/Checkbox.js +0 -6
- package/components/Checkbox/Checkbox.js.map +0 -1
- package/components/Chip/Chip.cjs +0 -6
- package/components/Chip/Chip.cjs.map +0 -1
- package/components/Chip/Chip.js +0 -6
- package/components/Chip/Chip.js.map +0 -1
- package/components/Column/Column.cjs +0 -8
- package/components/Column/Column.cjs.map +0 -1
- package/components/Column/Column.js +0 -8
- package/components/Column/Column.js.map +0 -1
- package/components/DataRow/DataRow.cjs +0 -6
- package/components/DataRow/DataRow.cjs.map +0 -1
- package/components/DataRow/DataRow.js +0 -6
- package/components/DataRow/DataRow.js.map +0 -1
- package/components/DatePicker/DatePicker.cjs +0 -6
- package/components/DatePicker/DatePicker.cjs.map +0 -1
- package/components/DatePicker/DatePicker.js +0 -6
- package/components/DatePicker/DatePicker.js.map +0 -1
- package/components/DateTimePicker/DateTimePicker.cjs +0 -6
- package/components/DateTimePicker/DateTimePicker.cjs.map +0 -1
- package/components/DateTimePicker/DateTimePicker.js +0 -6
- package/components/DateTimePicker/DateTimePicker.js.map +0 -1
- package/components/Divider/Divider.cjs +0 -6
- package/components/Divider/Divider.cjs.map +0 -1
- package/components/Divider/Divider.js +0 -6
- package/components/Divider/Divider.js.map +0 -1
- package/components/Drawer/Drawer.cjs +0 -8
- package/components/Drawer/Drawer.cjs.map +0 -1
- package/components/Drawer/Drawer.js +0 -8
- package/components/Drawer/Drawer.js.map +0 -1
- package/components/EmptyState/EmptyState.cjs +0 -6
- package/components/EmptyState/EmptyState.cjs.map +0 -1
- package/components/EmptyState/EmptyState.js +0 -6
- package/components/EmptyState/EmptyState.js.map +0 -1
- package/components/Flyout/Flyout.cjs +0 -5
- package/components/Flyout/Flyout.cjs.map +0 -1
- package/components/Flyout/Flyout.js +0 -5
- package/components/Flyout/Flyout.js.map +0 -1
- package/components/Gallery/Gallery.cjs +0 -6
- package/components/Gallery/Gallery.cjs.map +0 -1
- package/components/Gallery/Gallery.js +0 -6
- package/components/Gallery/Gallery.js.map +0 -1
- package/components/Icon/Icon.cjs +0 -6
- package/components/Icon/Icon.cjs.map +0 -1
- package/components/Icon/Icon.js +0 -6
- package/components/Icon/Icon.js.map +0 -1
- package/components/Input/Input.cjs +0 -6
- package/components/Input/Input.cjs.map +0 -1
- package/components/Input/Input.js +0 -6
- package/components/Input/Input.js.map +0 -1
- package/components/InputGroup/InputGroup.cjs +0 -6
- package/components/InputGroup/InputGroup.cjs.map +0 -1
- package/components/InputGroup/InputGroup.js +0 -6
- package/components/InputGroup/InputGroup.js.map +0 -1
- package/components/MenuButton/MenuButton.cjs +0 -5
- package/components/MenuButton/MenuButton.cjs.map +0 -1
- package/components/MenuButton/MenuButton.js +0 -5
- package/components/MenuButton/MenuButton.js.map +0 -1
- package/components/Modal/Modal.cjs +0 -9
- package/components/Modal/Modal.cjs.map +0 -1
- package/components/Modal/Modal.js +0 -9
- package/components/Modal/Modal.js.map +0 -1
- package/components/PageHeader/PageHeader.cjs +0 -6
- package/components/PageHeader/PageHeader.cjs.map +0 -1
- package/components/PageHeader/PageHeader.js +0 -6
- package/components/PageHeader/PageHeader.js.map +0 -1
- package/components/RadioGroup/RadioGroup.cjs +0 -6
- package/components/RadioGroup/RadioGroup.cjs.map +0 -1
- package/components/RadioGroup/RadioGroup.js +0 -6
- package/components/RadioGroup/RadioGroup.js.map +0 -1
- package/components/Select/Select.cjs +0 -7
- package/components/Select/Select.cjs.map +0 -1
- package/components/Select/Select.js +0 -7
- package/components/Select/Select.js.map +0 -1
- package/components/Spinner/Spinner.cjs +0 -6
- package/components/Spinner/Spinner.cjs.map +0 -1
- package/components/Spinner/Spinner.js +0 -6
- package/components/Spinner/Spinner.js.map +0 -1
- package/components/Stat/Stat.cjs +0 -6
- package/components/Stat/Stat.cjs.map +0 -1
- package/components/Stat/Stat.js +0 -6
- package/components/Stat/Stat.js.map +0 -1
- package/components/StatusMessage/StatusMessage.cjs +0 -8
- package/components/StatusMessage/StatusMessage.cjs.map +0 -1
- package/components/StatusMessage/StatusMessage.js +0 -8
- package/components/StatusMessage/StatusMessage.js.map +0 -1
- package/components/Stepper/Stepper.cjs +0 -10
- package/components/Stepper/Stepper.cjs.map +0 -1
- package/components/Stepper/Stepper.js +0 -10
- package/components/Stepper/Stepper.js.map +0 -1
- package/components/Switch/Switch.cjs +0 -6
- package/components/Switch/Switch.cjs.map +0 -1
- package/components/Switch/Switch.js +0 -6
- package/components/Switch/Switch.js.map +0 -1
- package/components/Table/Table.cjs +0 -5
- package/components/Table/Table.cjs.map +0 -1
- package/components/Table/Table.js +0 -5
- package/components/Table/Table.js.map +0 -1
- package/components/Tabs/Tabs.cjs +0 -7
- package/components/Tabs/Tabs.cjs.map +0 -1
- package/components/Tabs/Tabs.js +0 -7
- package/components/Tabs/Tabs.js.map +0 -1
- package/components/Timeline/Timeline.cjs +0 -7
- package/components/Timeline/Timeline.cjs.map +0 -1
- package/components/Timeline/Timeline.js +0 -7
- package/components/Timeline/Timeline.js.map +0 -1
- package/components/Tooltip/Tooltip.cjs +0 -5
- package/components/Tooltip/Tooltip.cjs.map +0 -1
- package/components/Tooltip/Tooltip.js +0 -5
- package/components/Tooltip/Tooltip.js.map +0 -1
- package/demos/themes.d.ts +0 -29
- package/formField.sx-BZj7TaMa.cjs +0 -92
- package/formField.sx-BZj7TaMa.cjs.map +0 -1
- package/formField.sx-DD1sxwWH.js +0 -93
- package/formField.sx-DD1sxwWH.js.map +0 -1
- package/hooks/ClipBoard/ClipBoard.cjs +0 -100
- package/hooks/ClipBoard/ClipBoard.cjs.map +0 -1
- package/hooks/ClipBoard/ClipBoard.js +0 -100
- package/hooks/ClipBoard/ClipBoard.js.map +0 -1
- package/index.css +0 -3
- package/index.js +0 -146
- package/index.js.map +0 -1
- package/mergeSx-BXoNZjB_.js +0 -10
- package/mergeSx-BXoNZjB_.js.map +0 -1
- package/mergeSx-Dbccoo_H.cjs.map +0 -1
- package/resolvePreset-CxTI6_Ln.cjs.map +0 -1
- package/resolvePreset-K6_BfWHD.js +0 -15
- package/resolvePreset-K6_BfWHD.js.map +0 -1
- package/tokens-BGPazVFO.cjs +0 -22
- package/tokens-BGPazVFO.cjs.map +0 -1
- package/tokens-DE2fV3a9.js +0 -23
- package/tokens-DE2fV3a9.js.map +0 -1
- /package/{ActionMenu-D81Xb35f.cjs → chunks/ActionMenu-D81Xb35f.cjs} +0 -0
- /package/{mergeSx-Dbccoo_H.cjs → chunks/mergeSx-Dbccoo_H.cjs} +0 -0
- /package/{resolvePreset-CxTI6_Ln.cjs → chunks/resolvePreset-CxTI6_Ln.cjs} +0 -0
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
34
|
+
const React = require("react");
|
|
35
|
+
const material = require("@mui/material");
|
|
36
|
+
const styles = require("@mui/material/styles");
|
|
37
|
+
const reactHookForm = require("react-hook-form");
|
|
38
|
+
const formField_sx = require("./formField.sx-DEDuTUQS.cjs");
|
|
39
|
+
const tokens = require("./tokens-B5kmy5Gy.cjs");
|
|
40
|
+
const mergeSx = require("./mergeSx-Dbccoo_H.cjs");
|
|
41
|
+
const resolvePreset = require("./resolvePreset-CxTI6_Ln.cjs");
|
|
42
|
+
const parseValue = (raw, type) => {
|
|
43
|
+
if (type !== "number") return raw;
|
|
44
|
+
if (raw === "" || raw === "-") return raw;
|
|
45
|
+
const n = parseFloat(raw);
|
|
46
|
+
return isNaN(n) ? raw : n;
|
|
47
|
+
};
|
|
48
|
+
const buildSlotProps = (type, min, max, maxLength, customSlotProps, customInputProps, readOnly, startAdornment, endAdornment) => {
|
|
49
|
+
const numberAttrs = type === "number" ? __spreadValues({ min: min != null ? min : Number.NEGATIVE_INFINITY }, max !== void 0 && { max }) : {};
|
|
50
|
+
const customInputSlot = customSlotProps == null ? void 0 : customSlotProps.input;
|
|
51
|
+
const inputSlot = __spreadValues(__spreadValues(__spreadValues({}, startAdornment !== void 0 && { startAdornment }), endAdornment !== void 0 && { endAdornment }), customInputSlot);
|
|
52
|
+
const hasInputSlot = Object.keys(inputSlot).length > 0;
|
|
53
|
+
return __spreadProps(__spreadValues(__spreadValues({}, customSlotProps), hasInputSlot && { input: inputSlot }), {
|
|
54
|
+
htmlInput: __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, customInputProps), customSlotProps == null ? void 0 : customSlotProps.htmlInput), numberAttrs), maxLength !== void 0 && { maxLength }), readOnly && { readOnly: true }),
|
|
55
|
+
// Dejamos que MUI maneje el shrink nativamente (animación inside → up).
|
|
56
|
+
// El consumidor puede forzar shrink con slotProps.inputLabel.shrink=true si lo necesita.
|
|
57
|
+
inputLabel: __spreadValues({}, customSlotProps == null ? void 0 : customSlotProps.inputLabel)
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const buildInputOptions = (borderRadius, labelPosition) => {
|
|
61
|
+
const radius = typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius;
|
|
62
|
+
return {
|
|
63
|
+
borderRadius,
|
|
64
|
+
labelPosition,
|
|
65
|
+
extraOutsideSx: {
|
|
66
|
+
// El padding vertical del input base lo fija `buildFormFieldSx`
|
|
67
|
+
// (misma altura para los cinco campos). Acá solo van las variantes.
|
|
68
|
+
// Filled: quitar el padding-top reservado para el label flotante dentro.
|
|
69
|
+
"& .MuiFilledInput-root": {
|
|
70
|
+
paddingTop: 0,
|
|
71
|
+
borderRadius: `${radius} ${radius} 0 0`
|
|
72
|
+
},
|
|
73
|
+
"& .MuiFilledInput-input": {
|
|
74
|
+
paddingTop: tokens.FIELD_INPUT_PADDING_Y
|
|
75
|
+
},
|
|
76
|
+
// Standard: quitar el margin-top reservado para el label flotante.
|
|
77
|
+
"& .MuiInput-root": {
|
|
78
|
+
marginTop: 0
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
const buildInputStyles = (theme, borderRadius, labelPosition) => formField_sx.buildFormFieldStyles(theme, buildInputOptions(borderRadius, labelPosition));
|
|
84
|
+
const InputRoot = styles.styled(material.TextField, {
|
|
85
|
+
name: "FriInput",
|
|
86
|
+
slot: "Root",
|
|
87
|
+
shouldForwardProp: (prop) => prop !== "ownerState"
|
|
88
|
+
})(
|
|
89
|
+
({ theme, ownerState }) => buildInputStyles(theme, ownerState.borderRadius, ownerState.labelPosition)
|
|
90
|
+
);
|
|
91
|
+
const Input = React.forwardRef(function Input2(inProps, ref) {
|
|
92
|
+
const props = styles.useThemeProps({ props: inProps, name: "FriInput" });
|
|
93
|
+
const _a = props, {
|
|
94
|
+
type = "text",
|
|
95
|
+
variant = "outlined",
|
|
96
|
+
size = "small",
|
|
97
|
+
borderRadius = tokens.FIELD_BORDER_RADIUS,
|
|
98
|
+
labelPosition = "outside",
|
|
99
|
+
preset,
|
|
100
|
+
min,
|
|
101
|
+
max,
|
|
102
|
+
maxLength,
|
|
103
|
+
readOnly,
|
|
104
|
+
inputProps,
|
|
105
|
+
slotProps,
|
|
106
|
+
startAdornment,
|
|
107
|
+
endAdornment,
|
|
108
|
+
sx,
|
|
109
|
+
onBlur
|
|
110
|
+
} = _a, rest = __objRest(_a, [
|
|
111
|
+
"type",
|
|
112
|
+
"variant",
|
|
113
|
+
"size",
|
|
114
|
+
"borderRadius",
|
|
115
|
+
"labelPosition",
|
|
116
|
+
"preset",
|
|
117
|
+
"min",
|
|
118
|
+
"max",
|
|
119
|
+
"maxLength",
|
|
120
|
+
"readOnly",
|
|
121
|
+
"inputProps",
|
|
122
|
+
"slotProps",
|
|
123
|
+
"startAdornment",
|
|
124
|
+
"endAdornment",
|
|
125
|
+
"sx",
|
|
126
|
+
"onBlur"
|
|
127
|
+
]);
|
|
128
|
+
const theme = styles.useTheme();
|
|
129
|
+
const presetSx = resolvePreset.resolvePreset("Input", preset, theme);
|
|
130
|
+
const finalSlotProps = buildSlotProps(
|
|
131
|
+
type,
|
|
132
|
+
min,
|
|
133
|
+
max,
|
|
134
|
+
maxLength,
|
|
135
|
+
slotProps,
|
|
136
|
+
inputProps,
|
|
137
|
+
readOnly,
|
|
138
|
+
startAdornment,
|
|
139
|
+
endAdornment
|
|
140
|
+
);
|
|
141
|
+
const ownerState = { borderRadius, labelPosition };
|
|
142
|
+
const mergedSx = mergeSx.mergeSx(presetSx != null ? presetSx : {}, sx);
|
|
143
|
+
if ("control" in props && props.control) {
|
|
144
|
+
const { name, control, validation, onValueChange } = props;
|
|
145
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
146
|
+
reactHookForm.Controller,
|
|
147
|
+
{
|
|
148
|
+
name,
|
|
149
|
+
control,
|
|
150
|
+
rules: validation,
|
|
151
|
+
render: ({ field, fieldState: { error } }) => {
|
|
152
|
+
var _a2, _b;
|
|
153
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
154
|
+
InputRoot,
|
|
155
|
+
__spreadProps(__spreadValues({
|
|
156
|
+
ref,
|
|
157
|
+
ownerState,
|
|
158
|
+
fullWidth: true
|
|
159
|
+
}, rest), {
|
|
160
|
+
name: field.name,
|
|
161
|
+
value: (_a2 = field.value) != null ? _a2 : "",
|
|
162
|
+
onChange: (e) => {
|
|
163
|
+
const parsed = parseValue(e.target.value, type);
|
|
164
|
+
field.onChange(parsed);
|
|
165
|
+
onValueChange == null ? void 0 : onValueChange(parsed);
|
|
166
|
+
},
|
|
167
|
+
onBlur: (e) => {
|
|
168
|
+
field.onBlur();
|
|
169
|
+
onBlur == null ? void 0 : onBlur(e);
|
|
170
|
+
},
|
|
171
|
+
inputRef: field.ref,
|
|
172
|
+
type,
|
|
173
|
+
variant,
|
|
174
|
+
size,
|
|
175
|
+
slotProps: finalSlotProps,
|
|
176
|
+
sx: mergedSx,
|
|
177
|
+
error: !!error || rest.error,
|
|
178
|
+
helperText: (_b = error == null ? void 0 : error.message) != null ? _b : rest.helperText
|
|
179
|
+
})
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
);
|
|
184
|
+
}
|
|
185
|
+
const { value, onChange } = props;
|
|
186
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
187
|
+
InputRoot,
|
|
188
|
+
__spreadProps(__spreadValues({
|
|
189
|
+
ref,
|
|
190
|
+
ownerState,
|
|
191
|
+
fullWidth: true
|
|
192
|
+
}, rest), {
|
|
193
|
+
value: value != null ? value : "",
|
|
194
|
+
onChange: (e) => onChange(parseValue(e.target.value, type)),
|
|
195
|
+
onBlur,
|
|
196
|
+
type,
|
|
197
|
+
variant,
|
|
198
|
+
size,
|
|
199
|
+
slotProps: finalSlotProps,
|
|
200
|
+
sx: mergedSx
|
|
201
|
+
})
|
|
202
|
+
);
|
|
203
|
+
});
|
|
204
|
+
exports.Input = Input;
|
|
205
|
+
//# sourceMappingURL=Input-Bcm7XRHs.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input-Bcm7XRHs.cjs","sources":["../../src/components/Input/Input.helpers.ts","../../src/components/Input/Input.sx.ts","../../src/components/Input/Input.tsx"],"sourcesContent":["import type { InputHTMLAttributes, ReactNode } from 'react';\nimport type { TextFieldProps } from '@mui/material';\nimport type { InputType } from './Input';\n\n/**\n * Convierte el valor raw del evento al tipo apropiado.\n * Para type=\"number\" intenta parsear a número; si falla, devuelve el raw\n * (permite estados intermedios como \"\" o \"-\" mientras el usuario tipea).\n */\nexport const parseValue = (raw: string, type: InputType): string | number => {\n if (type !== 'number') return raw;\n if (raw === '' || raw === '-') return raw;\n const n = parseFloat(raw);\n return isNaN(n) ? raw : n;\n};\n\n/**\n * Construye los slotProps del TextField consolidando htmlInput + inputLabel.\n * Maneja los atributos min/max cuando type=\"number\", maxLength y readOnly.\n */\nexport const buildSlotProps = (\n type: InputType,\n min: number | undefined,\n max: number | undefined,\n maxLength: number | undefined,\n customSlotProps: TextFieldProps['slotProps'],\n customInputProps: InputHTMLAttributes<HTMLInputElement> | undefined,\n readOnly?: boolean,\n startAdornment?: ReactNode,\n endAdornment?: ReactNode,\n): TextFieldProps['slotProps'] => {\n const numberAttrs =\n type === 'number'\n ? { min: min ?? Number.NEGATIVE_INFINITY, ...(max !== undefined && { max }) }\n : {};\n\n // Atajos `startAdornment`/`endAdornment` → slot `input` (OutlinedInput).\n // Lo que el consumidor pase en `slotProps.input` gana (no lo pisamos).\n const customInputSlot = (customSlotProps as any)?.input;\n const inputSlot = {\n ...(startAdornment !== undefined && { startAdornment }),\n ...(endAdornment !== undefined && { endAdornment }),\n ...customInputSlot,\n };\n const hasInputSlot = Object.keys(inputSlot).length > 0;\n\n return {\n ...customSlotProps,\n ...(hasInputSlot && { input: inputSlot }),\n htmlInput: {\n ...customInputProps,\n ...(customSlotProps as any)?.htmlInput,\n ...numberAttrs,\n ...(maxLength !== undefined && { maxLength }),\n ...(readOnly && { readOnly: true }),\n },\n // Dejamos que MUI maneje el shrink nativamente (animación inside → up).\n // El consumidor puede forzar shrink con slotProps.inputLabel.shrink=true si lo necesita.\n inputLabel: {\n ...(customSlotProps as any)?.inputLabel,\n },\n };\n};\n","import type { TextFieldProps } from '@mui/material';\nimport type { CSSObject, Theme } from '@mui/material/styles';\n\nimport { buildFormFieldSx, buildFormFieldStyles } from '../_shared/formField.sx';\nimport { FIELD_INPUT_PADDING_Y } from '../../theme/tokens';\nimport type { LabelPosition } from './Input';\n\nconst buildInputOptions = (\n borderRadius: number | string,\n labelPosition: LabelPosition,\n) => {\n const radius = typeof borderRadius === 'number' ? `${borderRadius}px` : borderRadius;\n\n return {\n borderRadius,\n labelPosition,\n extraOutsideSx: {\n // El padding vertical del input base lo fija `buildFormFieldSx`\n // (misma altura para los cinco campos). Acá solo van las variantes.\n\n // Filled: quitar el padding-top reservado para el label flotante dentro.\n '& .MuiFilledInput-root': {\n paddingTop: 0,\n borderRadius: `${radius} ${radius} 0 0`,\n },\n '& .MuiFilledInput-input': {\n paddingTop: FIELD_INPUT_PADDING_Y,\n },\n\n // Standard: quitar el margin-top reservado para el label flotante.\n '& .MuiInput-root': {\n marginTop: 0,\n },\n },\n };\n};\n\n/** Estilo de fábrica del Input, en CSS real (para `styled()`). */\nexport const buildInputStyles = (\n theme: Theme,\n borderRadius: number | string,\n labelPosition: LabelPosition,\n): CSSObject => buildFormFieldStyles(theme, buildInputOptions(borderRadius, labelPosition));\n\n/**\n * @deprecated El Input ya no lo usa: su estilo de fábrica vive en el `styled()`\n * del componente para que `theme.components.FriInput.styleOverrides` pueda\n * ganarle. Preferir `buildInputStyles(theme, borderRadius, labelPosition)`.\n */\nexport const buildInputSx = (\n borderRadius: number | string,\n labelPosition: LabelPosition,\n): TextFieldProps['sx'] =>\n buildFormFieldSx(buildInputOptions(borderRadius, labelPosition));\n","import { forwardRef } from 'react';\nimport { TextField, type TextFieldProps } from '@mui/material';\nimport { styled, useTheme, useThemeProps } from '@mui/material/styles';\nimport { Controller, type Control, type RegisterOptions } from 'react-hook-form';\n\nimport { parseValue, buildSlotProps } from './Input.helpers';\nimport { buildInputStyles } from './Input.sx';\nimport { mergeSx } from '../_shared/mergeSx';\nimport { resolvePreset } from '../_shared/resolvePreset';\nimport { FIELD_BORDER_RADIUS } from '../../theme/tokens';\n\n// ── Tipos de dominio ─────────────────────────────────────────────────────\nexport type InputType =\n | 'text' | 'number' | 'email' | 'password' | 'tel'\n | 'url' | 'search' | 'date' | 'datetime-local'\n | 'month' | 'week' | 'time' | 'color';\n\nexport type LabelPosition = 'outside' | 'floating';\n\n// ── Props base (todo lo común entre RHF y controlado) ────────────────────\nexport interface BaseInputProps\n extends Omit<TextFieldProps, 'value' | 'onChange' | 'type'> {\n type?: InputType;\n min?: number;\n max?: number;\n maxLength?: number;\n /** Border radius del input. Default: 10 */\n borderRadius?: number | string;\n /** \"outside\" = label arriba del campo (default). \"floating\" = label clásico MUI dentro del borde */\n labelPosition?: LabelPosition;\n readOnly?: boolean;\n /** Contenido al inicio del input (ej. icono de búsqueda). Atajo de `slotProps.input.startAdornment`. */\n startAdornment?: React.ReactNode;\n /** Contenido al final del input (ej. botón clear). Atajo de `slotProps.input.endAdornment`. */\n endAdornment?: React.ReactNode;\n /**\n * Nombre del preset de estilo registrado en `theme.styles.Input`.\n * - `\"default\"` (o ausente) = estilo built-in del paquete.\n * - Cualquier otro string = mergea el preset encima del estilo built-in.\n */\n preset?: string;\n}\n\n// ── Variantes discriminadas (RHF vs controlado) ──────────────────────────\nexport interface RHFInputProps extends BaseInputProps {\n name: string;\n // `any` plano (no `Control<any>`): RHF tipa `Control<T>` con generics en\n // posiciones tanto contravariantes como covariantes (ej. `_subjects.state`).\n // Cuando el componente o su uso involucra generics adicionales, TS se\n // confunde narroweando el discriminated union y `Control<any>` no logra\n // absorber `Control<MyForm>` en la comparación estructural profunda. El\n // `any` plano elimina ese ruido. RHF adentro sigue teniendo sus tipos\n // fuertes — solo degradamos la superficie del prop del componente.\n control: any;\n validation?: RegisterOptions;\n /**\n * Side-effect que corre después de que RHF actualiza el form state.\n * Útil para cascadas entre campos (ej. reset de municipio al cambiar\n * departamento). NO reemplaza al handler de RHF.\n */\n onValueChange?: (value: string | number) => void;\n value?: never;\n onChange?: never;\n}\n\nexport interface ControlledInputProps extends BaseInputProps {\n name?: string;\n control?: never;\n validation?: never;\n value: string | number;\n onChange: (value: string | number) => void;\n}\n\n// ── API pública final ────────────────────────────────────────────────────\nexport type InputProps = RHFInputProps | ControlledInputProps;\n\n/** Estado que decide el estilo de fábrica del campo. */\ninterface InputOwnerState {\n borderRadius: number | string;\n labelPosition: LabelPosition;\n}\n\n/**\n * Root themeable vía `theme.components.FriInput`.\n *\n * El estilo de fábrica sale como selector descendiente\n * (`.FriInput-root .MuiInputBase-input`), así que sigue ganándole a un\n * `MuiOutlinedInput.styleOverrides.input` del consumidor — que es lo que\n * mantiene los cinco campos a la misma altura. Un override apuntado a\n * `FriInput` sí le gana, que es justo lo que se quiere.\n */\nconst InputRoot = styled(TextField, {\n name: 'FriInput',\n slot: 'Root',\n shouldForwardProp: (prop) => prop !== 'ownerState',\n})<{ ownerState: InputOwnerState }>(({ theme, ownerState }) =>\n buildInputStyles(theme, ownerState.borderRadius, ownerState.labelPosition),\n);\n\nexport const Input = forwardRef<HTMLDivElement, InputProps>(function Input(inProps, ref) {\n const props = useThemeProps({ props: inProps, name: 'FriInput' }) as InputProps;\n const {\n type = 'text',\n variant = 'outlined',\n size = 'small',\n borderRadius = FIELD_BORDER_RADIUS,\n labelPosition = 'outside',\n preset,\n min,\n max,\n maxLength,\n readOnly,\n inputProps,\n slotProps,\n startAdornment,\n endAdornment,\n sx,\n onBlur,\n ...rest\n } = props as ControlledInputProps & {\n control?: Control<any>;\n validation?: RegisterOptions;\n };\n\n const theme = useTheme();\n const presetSx = resolvePreset('Input', preset, theme);\n\n const finalSlotProps = buildSlotProps(\n type,\n min,\n max,\n maxLength,\n slotProps,\n inputProps,\n readOnly,\n startAdornment,\n endAdornment,\n );\n // El estilo de fábrica ya no viaja en `sx` — vive en `InputRoot` (styled),\n // que es lo que permite tematizar el componente. Acá sólo queda el preset\n // deprecado + el sx del call-site.\n const ownerState: InputOwnerState = { borderRadius, labelPosition };\n const mergedSx = mergeSx(presetSx ?? {}, sx);\n\n if ('control' in props && props.control) {\n const { name, control, validation, onValueChange } = props as RHFInputProps;\n return (\n <Controller\n name={name}\n control={control}\n rules={validation}\n render={({ field, fieldState: { error } }) => (\n <InputRoot\n ref={ref}\n ownerState={ownerState}\n fullWidth\n {...rest}\n name={field.name}\n value={field.value ?? ''}\n onChange={(e) => {\n const parsed = parseValue(e.target.value, type);\n field.onChange(parsed);\n onValueChange?.(parsed);\n }}\n onBlur={(e) => {\n field.onBlur();\n onBlur?.(e);\n }}\n inputRef={field.ref}\n type={type}\n variant={variant}\n size={size}\n slotProps={finalSlotProps}\n sx={mergedSx}\n error={!!error || rest.error}\n helperText={error?.message ?? rest.helperText}\n />\n )}\n />\n );\n }\n\n const { value, onChange } = props as ControlledInputProps;\n return (\n <InputRoot\n ref={ref}\n ownerState={ownerState}\n fullWidth\n {...rest}\n value={value ?? ''}\n onChange={(e) => onChange(parseValue(e.target.value, type))}\n onBlur={onBlur}\n type={type}\n variant={variant}\n size={size}\n slotProps={finalSlotProps}\n sx={mergedSx}\n />\n );\n});\n\nexport default Input;\n"],"names":["FIELD_INPUT_PADDING_Y","buildFormFieldStyles","styled","TextField","forwardRef","Input","useThemeProps","FIELD_BORDER_RADIUS","useTheme","resolvePreset","mergeSx","jsx","Controller","_a"],"mappings":"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"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
34
|
+
const React = require("react");
|
|
35
|
+
const material = require("@mui/material");
|
|
36
|
+
const mergeSx = require("./mergeSx-Dbccoo_H.cjs");
|
|
37
|
+
const tokens = require("./tokens-B5kmy5Gy.cjs");
|
|
38
|
+
const InputGroup = React.forwardRef(function InputGroup2(_a, ref) {
|
|
39
|
+
var _b = _a, {
|
|
40
|
+
children,
|
|
41
|
+
sx,
|
|
42
|
+
slotSx,
|
|
43
|
+
borderRadius = tokens.FIELD_BORDER_RADIUS,
|
|
44
|
+
disabled,
|
|
45
|
+
orientation = "horizontal"
|
|
46
|
+
} = _b, rest = __objRest(_b, [
|
|
47
|
+
"children",
|
|
48
|
+
"sx",
|
|
49
|
+
"slotSx",
|
|
50
|
+
"borderRadius",
|
|
51
|
+
"disabled",
|
|
52
|
+
"orientation"
|
|
53
|
+
]);
|
|
54
|
+
const radius = typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius;
|
|
55
|
+
const slots = React.Children.toArray(children).filter(React.isValidElement);
|
|
56
|
+
const isHorizontal = orientation === "horizontal";
|
|
57
|
+
const baseSx = {
|
|
58
|
+
// Respeta el label "outside" de Input/Select: los hijos pierden su marginTop
|
|
59
|
+
// (ver más abajo) y el grupo reserva el mismo espacio arriba para que los
|
|
60
|
+
// labels floten por encima del borde del grupo.
|
|
61
|
+
marginTop: tokens.LABEL_MARGIN_TOP,
|
|
62
|
+
display: "flex",
|
|
63
|
+
flexDirection: isHorizontal ? "row" : "column",
|
|
64
|
+
alignItems: "stretch",
|
|
65
|
+
width: "100%",
|
|
66
|
+
border: (theme) => `1px solid ${theme.palette.divider}`,
|
|
67
|
+
borderRadius: radius,
|
|
68
|
+
backgroundColor: "background.paper",
|
|
69
|
+
transition: "border-color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, box-shadow 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms",
|
|
70
|
+
"&:focus-within": {
|
|
71
|
+
borderColor: "primary.main",
|
|
72
|
+
boxShadow: (theme) => `0 0 0 1px ${theme.palette.primary.main}`
|
|
73
|
+
},
|
|
74
|
+
opacity: disabled ? 0.6 : 1,
|
|
75
|
+
pointerEvents: disabled ? "none" : "auto",
|
|
76
|
+
// Cancelar el marginTop que Input/Select reservan en labelPosition="outside".
|
|
77
|
+
// El grupo ya lo reservó en su nivel externo.
|
|
78
|
+
"& .MuiFormControl-root, & .MuiPickersTextField-root, & > [data-input-group-slot] > .MuiTextField-root, & > [data-input-group-slot] > .MuiFormControl-root": {
|
|
79
|
+
marginTop: 0
|
|
80
|
+
},
|
|
81
|
+
// Quitar el borde del notched outline interno: el borde visible es el del
|
|
82
|
+
// grupo, los separadores son los borderRight/borderBottom de cada slot.
|
|
83
|
+
// Incluye la API nueva de MUI X Pickers (v8) para que DatePicker/DateTimePicker
|
|
84
|
+
// no pinten su propio outline dentro del grupo.
|
|
85
|
+
"& .MuiOutlinedInput-notchedOutline, & .MuiPickersOutlinedInput-notchedOutline": {
|
|
86
|
+
border: "none"
|
|
87
|
+
},
|
|
88
|
+
// Forzar que todos los campos pinten sus esquinas cuadradas (las esquinas
|
|
89
|
+
// redondeadas se aplican solo al primer/último slot más abajo).
|
|
90
|
+
"& .MuiInputBase-root, & .MuiPickersInputBase-root, & .MuiChip-root": {
|
|
91
|
+
borderRadius: 0
|
|
92
|
+
},
|
|
93
|
+
// Botones integrados: sin radius propio, altura completa, sin sombra.
|
|
94
|
+
"& .MuiButton-root": {
|
|
95
|
+
borderRadius: 0,
|
|
96
|
+
height: "100%",
|
|
97
|
+
boxShadow: "none",
|
|
98
|
+
border: "none"
|
|
99
|
+
},
|
|
100
|
+
// Slots: cada hijo vive en un slot neutro que lo centra verticalmente.
|
|
101
|
+
"& > [data-input-group-slot]": __spreadProps(__spreadValues({
|
|
102
|
+
flex: 1,
|
|
103
|
+
display: "flex",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
minWidth: 0
|
|
106
|
+
}, isHorizontal ? { borderRight: (theme) => `1px solid ${theme.palette.divider}` } : { borderBottom: (theme) => `1px solid ${theme.palette.divider}` }), {
|
|
107
|
+
"&:last-of-type": {
|
|
108
|
+
borderRight: "none",
|
|
109
|
+
borderBottom: "none"
|
|
110
|
+
}
|
|
111
|
+
}),
|
|
112
|
+
// Esquinas redondeadas: primer slot (izquierda o arriba).
|
|
113
|
+
"& > [data-input-group-slot]:first-of-type .MuiInputBase-root, & > [data-input-group-slot]:first-of-type .MuiPickersInputBase-root, & > [data-input-group-slot]:first-of-type .MuiButton-root, & > [data-input-group-slot]:first-of-type .MuiChip-root": isHorizontal ? {
|
|
114
|
+
borderTopLeftRadius: radius,
|
|
115
|
+
borderBottomLeftRadius: radius
|
|
116
|
+
} : {
|
|
117
|
+
borderTopLeftRadius: radius,
|
|
118
|
+
borderTopRightRadius: radius
|
|
119
|
+
},
|
|
120
|
+
// Esquinas redondeadas: último slot (derecha o abajo).
|
|
121
|
+
"& > [data-input-group-slot]:last-of-type .MuiInputBase-root, & > [data-input-group-slot]:last-of-type .MuiPickersInputBase-root, & > [data-input-group-slot]:last-of-type .MuiButton-root, & > [data-input-group-slot]:last-of-type .MuiChip-root": isHorizontal ? {
|
|
122
|
+
borderTopRightRadius: radius,
|
|
123
|
+
borderBottomRightRadius: radius
|
|
124
|
+
} : {
|
|
125
|
+
borderBottomLeftRadius: radius,
|
|
126
|
+
borderBottomRightRadius: radius
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
const baseSlotSx = {
|
|
130
|
+
flex: 1,
|
|
131
|
+
display: "flex",
|
|
132
|
+
alignItems: "center",
|
|
133
|
+
minWidth: 0
|
|
134
|
+
};
|
|
135
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
136
|
+
material.Box,
|
|
137
|
+
__spreadProps(__spreadValues({
|
|
138
|
+
ref,
|
|
139
|
+
"data-testid": "input-group",
|
|
140
|
+
"aria-disabled": disabled ? "true" : void 0
|
|
141
|
+
}, rest), {
|
|
142
|
+
sx: mergeSx.mergeSx(baseSx, sx),
|
|
143
|
+
children: slots.map((child, i) => {
|
|
144
|
+
var _a2;
|
|
145
|
+
const slotKey = (_a2 = child.key) != null ? _a2 : i;
|
|
146
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
147
|
+
material.Box,
|
|
148
|
+
{
|
|
149
|
+
"data-input-group-slot": true,
|
|
150
|
+
sx: mergeSx.mergeSx(baseSlotSx, slotSx),
|
|
151
|
+
children: child
|
|
152
|
+
},
|
|
153
|
+
slotKey
|
|
154
|
+
);
|
|
155
|
+
})
|
|
156
|
+
})
|
|
157
|
+
);
|
|
158
|
+
});
|
|
159
|
+
exports.InputGroup = InputGroup;
|
|
160
|
+
//# sourceMappingURL=InputGroup-CSQ4zpAf.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputGroup-CSQ4zpAf.cjs","sources":["../../src/components/InputGroup/InputGroup.tsx"],"sourcesContent":["import React, { Children, forwardRef, isValidElement } from 'react';\nimport { Box, type BoxProps, type SxProps, type Theme } from '@mui/material';\n\nimport { mergeSx } from '../_shared/mergeSx';\nimport { FIELD_BORDER_RADIUS, LABEL_MARGIN_TOP } from '../../theme/tokens';\n\nexport interface InputGroupProps extends Omit<BoxProps, 'children'> {\n children: React.ReactNode;\n /**\n * sx aplicado al contenedor raíz del grupo. Se mergea sobre los defaults.\n */\n sx?: SxProps<Theme>;\n /**\n * sx aplicado a cada slot individual. Útil para controlar flex/gap entre\n * los hijos del grupo.\n */\n slotSx?: SxProps<Theme>;\n /**\n * Radio del borde del grupo. Default: 10.\n */\n borderRadius?: number | string;\n /**\n * Desactiva visualmente el grupo (no cascada lógica — los hijos deben\n * manejar su propio `disabled`).\n */\n disabled?: boolean;\n /**\n * Orientación del grupo. Default: 'horizontal'.\n */\n orientation?: 'horizontal' | 'vertical';\n}\n\n/**\n * Agrupa visualmente varios componentes de entrada (Input / Select / DatePicker /\n * Button, etc.) compartiendo un solo borde y con separadores internos.\n *\n * El grupo respeta el espacio que Input/Select reservan para su label `outside`\n * (`LABEL_MARGIN_TOP`) moviendo ese reservado al contenedor externo y\n * cancelándolo en los hijos. Los labels siguen flotando por encima del borde\n * del grupo con la misma animación que fuera del grupo.\n *\n * No inspecciona el tipo de cada hijo; aplica los overrides a través de\n * descendant selectors por CSS para funcionar con cualquier wrapper / memoizado.\n */\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n children,\n sx,\n slotSx,\n borderRadius = FIELD_BORDER_RADIUS,\n disabled,\n orientation = 'horizontal',\n ...rest\n },\n ref,\n) {\n const radius = typeof borderRadius === 'number' ? `${borderRadius}px` : borderRadius;\n const slots = Children.toArray(children).filter(isValidElement);\n const isHorizontal = orientation === 'horizontal';\n\n const baseSx: SxProps<Theme> = {\n // Respeta el label \"outside\" de Input/Select: los hijos pierden su marginTop\n // (ver más abajo) y el grupo reserva el mismo espacio arriba para que los\n // labels floten por encima del borde del grupo.\n marginTop: LABEL_MARGIN_TOP,\n\n display: 'flex',\n flexDirection: isHorizontal ? 'row' : 'column',\n alignItems: 'stretch',\n width: '100%',\n border: (theme) => `1px solid ${theme.palette.divider}`,\n borderRadius: radius,\n backgroundColor: 'background.paper',\n transition:\n 'border-color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, box-shadow 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms',\n '&:focus-within': {\n borderColor: 'primary.main',\n boxShadow: (theme) => `0 0 0 1px ${theme.palette.primary.main}`,\n },\n opacity: disabled ? 0.6 : 1,\n pointerEvents: disabled ? 'none' : 'auto',\n\n // Cancelar el marginTop que Input/Select reservan en labelPosition=\"outside\".\n // El grupo ya lo reservó en su nivel externo.\n '& .MuiFormControl-root, & .MuiPickersTextField-root, & > [data-input-group-slot] > .MuiTextField-root, & > [data-input-group-slot] > .MuiFormControl-root':\n {\n marginTop: 0,\n },\n\n // Quitar el borde del notched outline interno: el borde visible es el del\n // grupo, los separadores son los borderRight/borderBottom de cada slot.\n // Incluye la API nueva de MUI X Pickers (v8) para que DatePicker/DateTimePicker\n // no pinten su propio outline dentro del grupo.\n '& .MuiOutlinedInput-notchedOutline, & .MuiPickersOutlinedInput-notchedOutline': {\n border: 'none',\n },\n\n // Forzar que todos los campos pinten sus esquinas cuadradas (las esquinas\n // redondeadas se aplican solo al primer/último slot más abajo).\n '& .MuiInputBase-root, & .MuiPickersInputBase-root, & .MuiChip-root': {\n borderRadius: 0,\n },\n\n // Botones integrados: sin radius propio, altura completa, sin sombra.\n '& .MuiButton-root': {\n borderRadius: 0,\n height: '100%',\n boxShadow: 'none',\n border: 'none',\n },\n\n // Slots: cada hijo vive en un slot neutro que lo centra verticalmente.\n '& > [data-input-group-slot]': {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n minWidth: 0,\n // Separador entre slots (horizontal: borderRight / vertical: borderBottom),\n // usando el color de divider del theme.\n ...(isHorizontal\n ? { borderRight: (theme: Theme) => `1px solid ${theme.palette.divider}` }\n : { borderBottom: (theme: Theme) => `1px solid ${theme.palette.divider}` }),\n '&:last-of-type': {\n borderRight: 'none',\n borderBottom: 'none',\n },\n },\n\n // Esquinas redondeadas: primer slot (izquierda o arriba).\n '& > [data-input-group-slot]:first-of-type .MuiInputBase-root, & > [data-input-group-slot]:first-of-type .MuiPickersInputBase-root, & > [data-input-group-slot]:first-of-type .MuiButton-root, & > [data-input-group-slot]:first-of-type .MuiChip-root':\n isHorizontal\n ? {\n borderTopLeftRadius: radius,\n borderBottomLeftRadius: radius,\n }\n : {\n borderTopLeftRadius: radius,\n borderTopRightRadius: radius,\n },\n\n // Esquinas redondeadas: último slot (derecha o abajo).\n '& > [data-input-group-slot]:last-of-type .MuiInputBase-root, & > [data-input-group-slot]:last-of-type .MuiPickersInputBase-root, & > [data-input-group-slot]:last-of-type .MuiButton-root, & > [data-input-group-slot]:last-of-type .MuiChip-root':\n isHorizontal\n ? {\n borderTopRightRadius: radius,\n borderBottomRightRadius: radius,\n }\n : {\n borderBottomLeftRadius: radius,\n borderBottomRightRadius: radius,\n },\n };\n\n const baseSlotSx: SxProps<Theme> = {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n minWidth: 0,\n };\n\n return (\n <Box\n ref={ref}\n data-testid=\"input-group\"\n aria-disabled={disabled ? 'true' : undefined}\n {...rest}\n sx={mergeSx(baseSx, sx)}\n >\n {slots.map((child, i) => {\n const slotKey = (child as React.ReactElement).key ?? i;\n return (\n <Box\n key={slotKey}\n data-input-group-slot\n sx={mergeSx(baseSlotSx, slotSx)}\n >\n {child}\n </Box>\n );\n })}\n </Box>\n );\n});\n\nexport default InputGroup;\n"],"names":["forwardRef","InputGroup","FIELD_BORDER_RADIUS","Children","isValidElement","LABEL_MARGIN_TOP","jsx","Box","mergeSx","_a"],"mappings":"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"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
import { jsx } from "react/jsx-runtime";
|
|
33
|
+
import { forwardRef, Children, isValidElement } from "react";
|
|
34
|
+
import { Box } from "@mui/material";
|
|
35
|
+
import { m as mergeSx } from "./mergeSx-BXoNZjB_.mjs";
|
|
36
|
+
import { F as FIELD_BORDER_RADIUS, L as LABEL_MARGIN_TOP } from "./tokens-C2AKLGbM.mjs";
|
|
37
|
+
const InputGroup = forwardRef(function InputGroup2(_a, ref) {
|
|
38
|
+
var _b = _a, {
|
|
39
|
+
children,
|
|
40
|
+
sx,
|
|
41
|
+
slotSx,
|
|
42
|
+
borderRadius = FIELD_BORDER_RADIUS,
|
|
43
|
+
disabled,
|
|
44
|
+
orientation = "horizontal"
|
|
45
|
+
} = _b, rest = __objRest(_b, [
|
|
46
|
+
"children",
|
|
47
|
+
"sx",
|
|
48
|
+
"slotSx",
|
|
49
|
+
"borderRadius",
|
|
50
|
+
"disabled",
|
|
51
|
+
"orientation"
|
|
52
|
+
]);
|
|
53
|
+
const radius = typeof borderRadius === "number" ? `${borderRadius}px` : borderRadius;
|
|
54
|
+
const slots = Children.toArray(children).filter(isValidElement);
|
|
55
|
+
const isHorizontal = orientation === "horizontal";
|
|
56
|
+
const baseSx = {
|
|
57
|
+
// Respeta el label "outside" de Input/Select: los hijos pierden su marginTop
|
|
58
|
+
// (ver más abajo) y el grupo reserva el mismo espacio arriba para que los
|
|
59
|
+
// labels floten por encima del borde del grupo.
|
|
60
|
+
marginTop: LABEL_MARGIN_TOP,
|
|
61
|
+
display: "flex",
|
|
62
|
+
flexDirection: isHorizontal ? "row" : "column",
|
|
63
|
+
alignItems: "stretch",
|
|
64
|
+
width: "100%",
|
|
65
|
+
border: (theme) => `1px solid ${theme.palette.divider}`,
|
|
66
|
+
borderRadius: radius,
|
|
67
|
+
backgroundColor: "background.paper",
|
|
68
|
+
transition: "border-color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, box-shadow 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms",
|
|
69
|
+
"&:focus-within": {
|
|
70
|
+
borderColor: "primary.main",
|
|
71
|
+
boxShadow: (theme) => `0 0 0 1px ${theme.palette.primary.main}`
|
|
72
|
+
},
|
|
73
|
+
opacity: disabled ? 0.6 : 1,
|
|
74
|
+
pointerEvents: disabled ? "none" : "auto",
|
|
75
|
+
// Cancelar el marginTop que Input/Select reservan en labelPosition="outside".
|
|
76
|
+
// El grupo ya lo reservó en su nivel externo.
|
|
77
|
+
"& .MuiFormControl-root, & .MuiPickersTextField-root, & > [data-input-group-slot] > .MuiTextField-root, & > [data-input-group-slot] > .MuiFormControl-root": {
|
|
78
|
+
marginTop: 0
|
|
79
|
+
},
|
|
80
|
+
// Quitar el borde del notched outline interno: el borde visible es el del
|
|
81
|
+
// grupo, los separadores son los borderRight/borderBottom de cada slot.
|
|
82
|
+
// Incluye la API nueva de MUI X Pickers (v8) para que DatePicker/DateTimePicker
|
|
83
|
+
// no pinten su propio outline dentro del grupo.
|
|
84
|
+
"& .MuiOutlinedInput-notchedOutline, & .MuiPickersOutlinedInput-notchedOutline": {
|
|
85
|
+
border: "none"
|
|
86
|
+
},
|
|
87
|
+
// Forzar que todos los campos pinten sus esquinas cuadradas (las esquinas
|
|
88
|
+
// redondeadas se aplican solo al primer/último slot más abajo).
|
|
89
|
+
"& .MuiInputBase-root, & .MuiPickersInputBase-root, & .MuiChip-root": {
|
|
90
|
+
borderRadius: 0
|
|
91
|
+
},
|
|
92
|
+
// Botones integrados: sin radius propio, altura completa, sin sombra.
|
|
93
|
+
"& .MuiButton-root": {
|
|
94
|
+
borderRadius: 0,
|
|
95
|
+
height: "100%",
|
|
96
|
+
boxShadow: "none",
|
|
97
|
+
border: "none"
|
|
98
|
+
},
|
|
99
|
+
// Slots: cada hijo vive en un slot neutro que lo centra verticalmente.
|
|
100
|
+
"& > [data-input-group-slot]": __spreadProps(__spreadValues({
|
|
101
|
+
flex: 1,
|
|
102
|
+
display: "flex",
|
|
103
|
+
alignItems: "center",
|
|
104
|
+
minWidth: 0
|
|
105
|
+
}, isHorizontal ? { borderRight: (theme) => `1px solid ${theme.palette.divider}` } : { borderBottom: (theme) => `1px solid ${theme.palette.divider}` }), {
|
|
106
|
+
"&:last-of-type": {
|
|
107
|
+
borderRight: "none",
|
|
108
|
+
borderBottom: "none"
|
|
109
|
+
}
|
|
110
|
+
}),
|
|
111
|
+
// Esquinas redondeadas: primer slot (izquierda o arriba).
|
|
112
|
+
"& > [data-input-group-slot]:first-of-type .MuiInputBase-root, & > [data-input-group-slot]:first-of-type .MuiPickersInputBase-root, & > [data-input-group-slot]:first-of-type .MuiButton-root, & > [data-input-group-slot]:first-of-type .MuiChip-root": isHorizontal ? {
|
|
113
|
+
borderTopLeftRadius: radius,
|
|
114
|
+
borderBottomLeftRadius: radius
|
|
115
|
+
} : {
|
|
116
|
+
borderTopLeftRadius: radius,
|
|
117
|
+
borderTopRightRadius: radius
|
|
118
|
+
},
|
|
119
|
+
// Esquinas redondeadas: último slot (derecha o abajo).
|
|
120
|
+
"& > [data-input-group-slot]:last-of-type .MuiInputBase-root, & > [data-input-group-slot]:last-of-type .MuiPickersInputBase-root, & > [data-input-group-slot]:last-of-type .MuiButton-root, & > [data-input-group-slot]:last-of-type .MuiChip-root": isHorizontal ? {
|
|
121
|
+
borderTopRightRadius: radius,
|
|
122
|
+
borderBottomRightRadius: radius
|
|
123
|
+
} : {
|
|
124
|
+
borderBottomLeftRadius: radius,
|
|
125
|
+
borderBottomRightRadius: radius
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
const baseSlotSx = {
|
|
129
|
+
flex: 1,
|
|
130
|
+
display: "flex",
|
|
131
|
+
alignItems: "center",
|
|
132
|
+
minWidth: 0
|
|
133
|
+
};
|
|
134
|
+
return /* @__PURE__ */ jsx(
|
|
135
|
+
Box,
|
|
136
|
+
__spreadProps(__spreadValues({
|
|
137
|
+
ref,
|
|
138
|
+
"data-testid": "input-group",
|
|
139
|
+
"aria-disabled": disabled ? "true" : void 0
|
|
140
|
+
}, rest), {
|
|
141
|
+
sx: mergeSx(baseSx, sx),
|
|
142
|
+
children: slots.map((child, i) => {
|
|
143
|
+
var _a2;
|
|
144
|
+
const slotKey = (_a2 = child.key) != null ? _a2 : i;
|
|
145
|
+
return /* @__PURE__ */ jsx(
|
|
146
|
+
Box,
|
|
147
|
+
{
|
|
148
|
+
"data-input-group-slot": true,
|
|
149
|
+
sx: mergeSx(baseSlotSx, slotSx),
|
|
150
|
+
children: child
|
|
151
|
+
},
|
|
152
|
+
slotKey
|
|
153
|
+
);
|
|
154
|
+
})
|
|
155
|
+
})
|
|
156
|
+
);
|
|
157
|
+
});
|
|
158
|
+
export {
|
|
159
|
+
InputGroup as I
|
|
160
|
+
};
|
|
161
|
+
//# sourceMappingURL=InputGroup-DIMk8yiS.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputGroup-DIMk8yiS.mjs","sources":["../../src/components/InputGroup/InputGroup.tsx"],"sourcesContent":["import React, { Children, forwardRef, isValidElement } from 'react';\nimport { Box, type BoxProps, type SxProps, type Theme } from '@mui/material';\n\nimport { mergeSx } from '../_shared/mergeSx';\nimport { FIELD_BORDER_RADIUS, LABEL_MARGIN_TOP } from '../../theme/tokens';\n\nexport interface InputGroupProps extends Omit<BoxProps, 'children'> {\n children: React.ReactNode;\n /**\n * sx aplicado al contenedor raíz del grupo. Se mergea sobre los defaults.\n */\n sx?: SxProps<Theme>;\n /**\n * sx aplicado a cada slot individual. Útil para controlar flex/gap entre\n * los hijos del grupo.\n */\n slotSx?: SxProps<Theme>;\n /**\n * Radio del borde del grupo. Default: 10.\n */\n borderRadius?: number | string;\n /**\n * Desactiva visualmente el grupo (no cascada lógica — los hijos deben\n * manejar su propio `disabled`).\n */\n disabled?: boolean;\n /**\n * Orientación del grupo. Default: 'horizontal'.\n */\n orientation?: 'horizontal' | 'vertical';\n}\n\n/**\n * Agrupa visualmente varios componentes de entrada (Input / Select / DatePicker /\n * Button, etc.) compartiendo un solo borde y con separadores internos.\n *\n * El grupo respeta el espacio que Input/Select reservan para su label `outside`\n * (`LABEL_MARGIN_TOP`) moviendo ese reservado al contenedor externo y\n * cancelándolo en los hijos. Los labels siguen flotando por encima del borde\n * del grupo con la misma animación que fuera del grupo.\n *\n * No inspecciona el tipo de cada hijo; aplica los overrides a través de\n * descendant selectors por CSS para funcionar con cualquier wrapper / memoizado.\n */\nexport const InputGroup = forwardRef<HTMLDivElement, InputGroupProps>(function InputGroup(\n {\n children,\n sx,\n slotSx,\n borderRadius = FIELD_BORDER_RADIUS,\n disabled,\n orientation = 'horizontal',\n ...rest\n },\n ref,\n) {\n const radius = typeof borderRadius === 'number' ? `${borderRadius}px` : borderRadius;\n const slots = Children.toArray(children).filter(isValidElement);\n const isHorizontal = orientation === 'horizontal';\n\n const baseSx: SxProps<Theme> = {\n // Respeta el label \"outside\" de Input/Select: los hijos pierden su marginTop\n // (ver más abajo) y el grupo reserva el mismo espacio arriba para que los\n // labels floten por encima del borde del grupo.\n marginTop: LABEL_MARGIN_TOP,\n\n display: 'flex',\n flexDirection: isHorizontal ? 'row' : 'column',\n alignItems: 'stretch',\n width: '100%',\n border: (theme) => `1px solid ${theme.palette.divider}`,\n borderRadius: radius,\n backgroundColor: 'background.paper',\n transition:\n 'border-color 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms, box-shadow 200ms cubic-bezier(0.0, 0, 0.2, 1) 0ms',\n '&:focus-within': {\n borderColor: 'primary.main',\n boxShadow: (theme) => `0 0 0 1px ${theme.palette.primary.main}`,\n },\n opacity: disabled ? 0.6 : 1,\n pointerEvents: disabled ? 'none' : 'auto',\n\n // Cancelar el marginTop que Input/Select reservan en labelPosition=\"outside\".\n // El grupo ya lo reservó en su nivel externo.\n '& .MuiFormControl-root, & .MuiPickersTextField-root, & > [data-input-group-slot] > .MuiTextField-root, & > [data-input-group-slot] > .MuiFormControl-root':\n {\n marginTop: 0,\n },\n\n // Quitar el borde del notched outline interno: el borde visible es el del\n // grupo, los separadores son los borderRight/borderBottom de cada slot.\n // Incluye la API nueva de MUI X Pickers (v8) para que DatePicker/DateTimePicker\n // no pinten su propio outline dentro del grupo.\n '& .MuiOutlinedInput-notchedOutline, & .MuiPickersOutlinedInput-notchedOutline': {\n border: 'none',\n },\n\n // Forzar que todos los campos pinten sus esquinas cuadradas (las esquinas\n // redondeadas se aplican solo al primer/último slot más abajo).\n '& .MuiInputBase-root, & .MuiPickersInputBase-root, & .MuiChip-root': {\n borderRadius: 0,\n },\n\n // Botones integrados: sin radius propio, altura completa, sin sombra.\n '& .MuiButton-root': {\n borderRadius: 0,\n height: '100%',\n boxShadow: 'none',\n border: 'none',\n },\n\n // Slots: cada hijo vive en un slot neutro que lo centra verticalmente.\n '& > [data-input-group-slot]': {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n minWidth: 0,\n // Separador entre slots (horizontal: borderRight / vertical: borderBottom),\n // usando el color de divider del theme.\n ...(isHorizontal\n ? { borderRight: (theme: Theme) => `1px solid ${theme.palette.divider}` }\n : { borderBottom: (theme: Theme) => `1px solid ${theme.palette.divider}` }),\n '&:last-of-type': {\n borderRight: 'none',\n borderBottom: 'none',\n },\n },\n\n // Esquinas redondeadas: primer slot (izquierda o arriba).\n '& > [data-input-group-slot]:first-of-type .MuiInputBase-root, & > [data-input-group-slot]:first-of-type .MuiPickersInputBase-root, & > [data-input-group-slot]:first-of-type .MuiButton-root, & > [data-input-group-slot]:first-of-type .MuiChip-root':\n isHorizontal\n ? {\n borderTopLeftRadius: radius,\n borderBottomLeftRadius: radius,\n }\n : {\n borderTopLeftRadius: radius,\n borderTopRightRadius: radius,\n },\n\n // Esquinas redondeadas: último slot (derecha o abajo).\n '& > [data-input-group-slot]:last-of-type .MuiInputBase-root, & > [data-input-group-slot]:last-of-type .MuiPickersInputBase-root, & > [data-input-group-slot]:last-of-type .MuiButton-root, & > [data-input-group-slot]:last-of-type .MuiChip-root':\n isHorizontal\n ? {\n borderTopRightRadius: radius,\n borderBottomRightRadius: radius,\n }\n : {\n borderBottomLeftRadius: radius,\n borderBottomRightRadius: radius,\n },\n };\n\n const baseSlotSx: SxProps<Theme> = {\n flex: 1,\n display: 'flex',\n alignItems: 'center',\n minWidth: 0,\n };\n\n return (\n <Box\n ref={ref}\n data-testid=\"input-group\"\n aria-disabled={disabled ? 'true' : undefined}\n {...rest}\n sx={mergeSx(baseSx, sx)}\n >\n {slots.map((child, i) => {\n const slotKey = (child as React.ReactElement).key ?? i;\n return (\n <Box\n key={slotKey}\n data-input-group-slot\n sx={mergeSx(baseSlotSx, slotSx)}\n >\n {child}\n </Box>\n );\n })}\n </Box>\n );\n});\n\nexport default InputGroup;\n"],"names":["InputGroup","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CO,MAAM,aAAa,WAA4C,SAASA,YAC7E,IASA,KACA;AAVA,eACE;AAAA;AAAA,IACA;AAAA,IACA;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA,cAAc;AAAA,MANhB,IAOK,iBAPL,IAOK;AAAA,IANH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAKF,QAAM,SAAS,OAAO,iBAAiB,WAAW,GAAG,YAAY,OAAO;AACxE,QAAM,QAAQ,SAAS,QAAQ,QAAQ,EAAE,OAAO,cAAc;AAC9D,QAAM,eAAe,gBAAgB;AAErC,QAAM,SAAyB;AAAA;AAAA;AAAA;AAAA,IAI7B,WAAW;AAAA,IAEX,SAAS;AAAA,IACT,eAAe,eAAe,QAAQ;AAAA,IACtC,YAAY;AAAA,IACZ,OAAO;AAAA,IACP,QAAQ,CAAC,UAAU,aAAa,MAAM,QAAQ,OAAO;AAAA,IACrD,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,YACE;AAAA,IACF,kBAAkB;AAAA,MAChB,aAAa;AAAA,MACb,WAAW,CAAC,UAAU,aAAa,MAAM,QAAQ,QAAQ,IAAI;AAAA,IAAA;AAAA,IAE/D,SAAS,WAAW,MAAM;AAAA,IAC1B,eAAe,WAAW,SAAS;AAAA;AAAA;AAAA,IAInC,6JACE;AAAA,MACE,WAAW;AAAA,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAOf,iFAAiF;AAAA,MAC/E,QAAQ;AAAA,IAAA;AAAA;AAAA;AAAA,IAKV,sEAAsE;AAAA,MACpE,cAAc;AAAA,IAAA;AAAA;AAAA,IAIhB,qBAAqB;AAAA,MACnB,cAAc;AAAA,MACd,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,QAAQ;AAAA,IAAA;AAAA;AAAA,IAIV,+BAA+B;AAAA,MAC7B,MAAM;AAAA,MACN,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,UAAU;AAAA,OAGN,eACA,EAAE,aAAa,CAAC,UAAiB,aAAa,MAAM,QAAQ,OAAO,OACnE,EAAE,cAAc,CAAC,UAAiB,aAAa,MAAM,QAAQ,OAAO,GAAA,IAT3C;AAAA,MAU7B,kBAAkB;AAAA,QAChB,aAAa;AAAA,QACb,cAAc;AAAA,MAAA;AAAA,IAChB;AAAA;AAAA,IAIF,yPACE,eACI;AAAA,MACE,qBAAqB;AAAA,MACrB,wBAAwB;AAAA,IAAA,IAE1B;AAAA,MACE,qBAAqB;AAAA,MACrB,sBAAsB;AAAA,IAAA;AAAA;AAAA,IAI9B,qPACE,eACI;AAAA,MACE,sBAAsB;AAAA,MACtB,yBAAyB;AAAA,IAAA,IAE3B;AAAA,MACE,wBAAwB;AAAA,MACxB,yBAAyB;AAAA,IAAA;AAAA,EAC3B;AAGR,QAAM,aAA6B;AAAA,IACjC,MAAM;AAAA,IACN,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,UAAU;AAAA,EAAA;AAGZ,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC;AAAA,MACA,eAAY;AAAA,MACZ,iBAAe,WAAW,SAAS;AAAA,OAC/B,OAJL;AAAA,MAKC,IAAI,QAAQ,QAAQ,EAAE;AAAA,MAErB,UAAA,MAAM,IAAI,CAAC,OAAO,MAAM;;AACvB,cAAM,WAAWC,MAAA,MAA6B,QAA7B,OAAAA,MAAoC;AACrD,eACE;AAAA,UAAC;AAAA,UAAA;AAAA,YAEC,yBAAqB;AAAA,YACrB,IAAI,QAAQ,YAAY,MAAM;AAAA,YAE7B,UAAA;AAAA,UAAA;AAAA,UAJI;AAAA,QAAA;AAAA,MAOX,CAAC;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|