@persona/design-system 0.1.8 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +20 -1
- package/dist/{Action-CVtzREhU.d.mts → Action-B25g4O9p.d.mts} +3 -3
- package/dist/Action.d.mts +1 -1
- package/dist/AdvancedFilterRuleRow.d.mts +3 -3
- package/dist/AdvancedFilterRulesPopover.d.mts +3 -3
- package/dist/ArrayValueControl.d.mts +1 -1
- package/dist/Attribute.d.mts +5 -5
- package/dist/AttributeGrid.d.mts +1 -1
- package/dist/{Badge-DortWowZ.mjs → Badge-Bd_k492g.mjs} +2 -2
- package/dist/{Badge-DortWowZ.mjs.map → Badge-Bd_k492g.mjs.map} +1 -1
- package/dist/Banner.d.mts +1 -1
- package/dist/BooleanValueControl.d.mts +1 -1
- package/dist/{Breadcrumb-lziQ1FX9.d.mts → Breadcrumb-DEwZFJHF.d.mts} +10 -2
- package/dist/Breadcrumb.d.mts +1 -1
- package/dist/{Breadcrumbs-DJ5qqqRD.d.mts → Breadcrumbs-0e_3v9FF.d.mts} +2 -2
- package/dist/{Breadcrumbs-CDZ_Mrcg.mjs → Breadcrumbs-C9udlH48.mjs} +44 -27
- package/dist/Breadcrumbs-C9udlH48.mjs.map +1 -0
- package/dist/Breadcrumbs.d.mts +1 -1
- package/dist/{Button-9p469xA1.d.mts → Button-KCl4uRtU.d.mts} +6 -6
- package/dist/Button.d.mts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/Calendar.d.mts +1 -1
- package/dist/CalendarBase.d.mts +1 -1
- package/dist/{Card-CqnG--CU.d.mts → Card-8DuhHQIk.d.mts} +4 -4
- package/dist/{Card-BMCB9eFC.mjs → Card-CLTkZLKr.mjs} +4 -4
- package/dist/{Card-BMCB9eFC.mjs.map → Card-CLTkZLKr.mjs.map} +1 -1
- package/dist/Card.d.mts +1 -1
- package/dist/Card2.d.mts +2 -2
- package/dist/{CardV2-C9z0Hr-c.mjs → CardV2-_GfXFd3d.mjs} +16 -16
- package/dist/{CardV2-C9z0Hr-c.mjs.map → CardV2-_GfXFd3d.mjs.map} +1 -1
- package/dist/{Checkbox-Bm8exUfH.d.mts → Checkbox-Bmm-r5ei.d.mts} +1 -1
- package/dist/{Checkbox-B0bjZbji.mjs → Checkbox-D77Rg7La.mjs} +7 -7
- package/dist/{Checkbox-B0bjZbji.mjs.map → Checkbox-D77Rg7La.mjs.map} +1 -1
- package/dist/Checkbox.d.mts +1 -1
- package/dist/CheckboxGroupField.d.mts +2 -2
- package/dist/ChoicesValueControl.d.mts +1 -1
- package/dist/{Combobox-BdqU5WLG.mjs → Combobox-BzqlrMK0.mjs} +62 -32
- package/dist/Combobox-BzqlrMK0.mjs.map +1 -0
- package/dist/{Combobox-C99xluaM.d.mts → Combobox-DVI8PoKx.d.mts} +3 -3
- package/dist/Combobox.d.mts +2 -2
- package/dist/{ComboboxBase-BsY7CYoB.d.mts → ComboboxBase-B8evOZpf.d.mts} +13 -8
- package/dist/ComboboxBase.d.mts +1 -1
- package/dist/{ComboboxMultiSelect-dNuETspL.d.mts → ComboboxMultiSelect-KJarhRm4.d.mts} +2 -2
- package/dist/ComboboxMultiSelect.d.mts +1 -1
- package/dist/{ComboboxSingleSelect-C8KvIJ43.d.mts → ComboboxSingleSelect-CcIGaphR.d.mts} +4 -4
- package/dist/ComboboxSingleSelect.d.mts +1 -1
- package/dist/{CompactBar-CXqlVKy7.d.mts → CompactBar-DfP7Wu1l.d.mts} +3 -3
- package/dist/CompactBar.d.mts +1 -1
- package/dist/{ConfigFormGroup-yhb2jldT.mjs → ConfigFormGroup-D1Qma23p.mjs} +2 -2
- package/dist/{ConfigFormGroup-yhb2jldT.mjs.map → ConfigFormGroup-D1Qma23p.mjs.map} +1 -1
- package/dist/{ControlBar-tOCQnbAl.d.mts → ControlBar-DYrjBDzu.d.mts} +2 -2
- package/dist/ControlBar.d.mts +1 -1
- package/dist/DataTable.d.mts +13 -4
- package/dist/DateField.d.mts +1 -1
- package/dist/{DatePicker-DY1YA_Fu.mjs → DatePicker-CK2D9jvG.mjs} +24 -24
- package/dist/DatePicker-CK2D9jvG.mjs.map +1 -0
- package/dist/DatePicker.d.mts +1 -1
- package/dist/DateRangePicker.d.mts +2 -1
- package/dist/DateValueControl.d.mts +1 -1
- package/dist/{DropdownButton-DKLjJylQ.mjs → DropdownButton-CaM0itat.mjs} +3 -3
- package/dist/{DropdownButton-DKLjJylQ.mjs.map → DropdownButton-CaM0itat.mjs.map} +1 -1
- package/dist/DropdownButton.d.mts +2 -2
- package/dist/{DropdownMenu-DGYexb7s.mjs → DropdownMenu-B4f3LNoW.mjs} +3 -3
- package/dist/{DropdownMenu-DGYexb7s.mjs.map → DropdownMenu-B4f3LNoW.mjs.map} +1 -1
- package/dist/{DropdownMenu-CVPanvKA.d.mts → DropdownMenu-Bgho2AsJ.d.mts} +3 -3
- package/dist/DropdownMenu.d.mts +1 -1
- package/dist/{ErrorProps-CN2XjaOX.d.mts → ErrorProps-DX50vo-U.d.mts} +1 -1
- package/dist/ErrorProps.d.mts +1 -1
- package/dist/{FieldRegistry-OX60T3hr.d.cts → FieldRegistry-COyIA4VU.d.mts} +2 -2
- package/dist/FieldRegistry.d.mts +1 -1
- package/dist/{FilterBar-D3LiIy1-.d.mts → FilterBar-CS2YjiTr.d.mts} +8 -5
- package/dist/FilterBar.d.mts +1 -1
- package/dist/FilterPickerMenu.d.mts +3 -3
- package/dist/FilterPill.d.mts +1 -1
- package/dist/FilterPopover.d.mts +13 -3
- package/dist/FloatValueControl.d.mts +1 -1
- package/dist/{FormControl-B28qa7aQ.mjs → FormControl-CFYlkv7E.mjs} +3 -3
- package/dist/{FormControl-B28qa7aQ.mjs.map → FormControl-CFYlkv7E.mjs.map} +1 -1
- package/dist/{FormControl-DH3bgqaB.d.mts → FormControl-iPeOOlFb.d.mts} +4 -4
- package/dist/FormControl.d.mts +1 -1
- package/dist/FormControlLabel.d.mts +2 -2
- package/dist/{FormField-PeYYRO4s.mjs → FormField-Bol8gzNt.mjs} +25 -22
- package/dist/FormField-Bol8gzNt.mjs.map +1 -0
- package/dist/{FormField-BugkBvN4.d.mts → FormField-BruK7Des.d.mts} +2 -2
- package/dist/FormField.d.mts +1 -1
- package/dist/{Header-CDTYK1XJ.d.mts → Header-BxTdWg0Q.d.mts} +2 -2
- package/dist/Header.d.mts +1 -1
- package/dist/{HelperTooltip-B7Ysh8B3.d.mts → HelperTooltip-Z5NdrLCT.d.mts} +3 -3
- package/dist/HelperTooltip.d.mts +1 -1
- package/dist/{HoverCopyableField-ClXBg_ld.mjs → HoverCopyableField-C8AdtVrT.mjs} +7 -7
- package/dist/{HoverCopyableField-ClXBg_ld.mjs.map → HoverCopyableField-C8AdtVrT.mjs.map} +1 -1
- package/dist/HoverCopyableField.d.mts +1 -1
- package/dist/{IconButton-CIWiEsS-.mjs → IconButton-Bi4kdsbV.mjs} +9 -9
- package/dist/{IconButton-CIWiEsS-.mjs.map → IconButton-Bi4kdsbV.mjs.map} +1 -1
- package/dist/{IconButton-BSES_-6g.d.mts → IconButton-BycIGS3p.d.mts} +2 -2
- package/dist/IconButton.d.mts +1 -1
- package/dist/ImageTile.d.mts +2 -2
- package/dist/InlineCombobox.d.mts +2 -2
- package/dist/InlineInput.d.mts +1 -1
- package/dist/{Input-BM0DzWEf.d.cts → Input-CEcoDtTu.d.mts} +5 -5
- package/dist/{Input-BFI_e7aU.mjs → Input-CSOxMzlt.mjs} +4 -4
- package/dist/Input-CSOxMzlt.mjs.map +1 -0
- package/dist/Input.d.mts +1 -1
- package/dist/{InputProps-CoVNpQSj.d.cts → InputProps-Buxtnz77.d.mts} +2 -2
- package/dist/InputProps.d.mts +1 -1
- package/dist/IntegerValueControl.d.mts +1 -1
- package/dist/LayoutLoadingShimmer.d.mts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/{ListBox-BwID8jpk.mjs → ListBox-CSMVAgHm.mjs} +20 -14
- package/dist/ListBox-CSMVAgHm.mjs.map +1 -0
- package/dist/{ListBox-_fcSPynx.d.mts → ListBox-CajNIX9P.d.mts} +10 -5
- package/dist/ListBox.d.mts +1 -1
- package/dist/ListBoxField.d.mts +3 -3
- package/dist/LoadingShimmer.d.mts +2 -2
- package/dist/{LogicRow-BtCKGX_j.d.mts → LogicRow-DK1NcP2a.d.mts} +4 -4
- package/dist/LogicRow.d.mts +1 -1
- package/dist/MaskedInput.d.mts +2 -2
- package/dist/MatchHighlight.d.mts +1 -1
- package/dist/{Menu-CUp_9HgC.d.mts → Menu-BLtjpLst.d.mts} +4 -4
- package/dist/{Menu-CPYXo61N.mjs → Menu-DDXR9uHy.mjs} +6 -6
- package/dist/{Menu-CPYXo61N.mjs.map → Menu-DDXR9uHy.mjs.map} +1 -1
- package/dist/Menu.d.mts +1 -1
- package/dist/{MiddleTruncatedText-GXI-CPvs.mjs → MiddleTruncatedText-DjsUk8HM.mjs} +4 -4
- package/dist/{MiddleTruncatedText-GXI-CPvs.mjs.map → MiddleTruncatedText-DjsUk8HM.mjs.map} +1 -1
- package/dist/Modal.d.mts +3 -3
- package/dist/{PageHeader-D-6W61E_.mjs → PageHeader-BI2gxol5.mjs} +6 -5
- package/dist/PageHeader-BI2gxol5.mjs.map +1 -0
- package/dist/PageHeader.d.mts +9 -4
- package/dist/PageLayout.d.mts +16 -0
- package/dist/{PageSelector-vay4jpMp.d.mts → PageSelector-BDo3ge1E.d.mts} +3 -3
- package/dist/PageSelector.d.mts +1 -1
- package/dist/{Pagination-ygLutOst.d.mts → Pagination-Dcmv7bVe.d.mts} +2 -2
- package/dist/{Pagination-ztqhywAP.mjs → Pagination-DiaJX5Da.mjs} +8 -8
- package/dist/{Pagination-ztqhywAP.mjs.map → Pagination-DiaJX5Da.mjs.map} +1 -1
- package/dist/Pagination.d.mts +1 -1
- package/dist/{Pii-DrrtEz7U.mjs → Pii-CSBV5Is7.mjs} +2 -2
- package/dist/{Pii-DrrtEz7U.mjs.map → Pii-CSBV5Is7.mjs.map} +1 -1
- package/dist/Pii.d.mts +1 -1
- package/dist/PillShell.d.mts +1 -1
- package/dist/{Popover-BkDpDdaO.mjs → Popover-5y0p85Sw.mjs} +6 -6
- package/dist/{Popover-BkDpDdaO.mjs.map → Popover-5y0p85Sw.mjs.map} +1 -1
- package/dist/Popover.d.mts +1 -1
- package/dist/ProgressBar.d.mts +1 -1
- package/dist/ProgressIndicator.d.mts +1 -1
- package/dist/{PseudoClassProps-C5jpj6Rp.d.cts → PseudoClassProps-CcSlKNev.d.mts} +1 -1
- package/dist/PseudoClassProps.d.mts +1 -1
- package/dist/{Radio-CSX2eO-O.mjs → Radio-aMjdUp4K.mjs} +3 -3
- package/dist/{Radio-CSX2eO-O.mjs.map → Radio-aMjdUp4K.mjs.map} +1 -1
- package/dist/{RadioGroup-CnK0opBd.mjs → RadioGroup-BpoKyoi3.mjs} +3 -3
- package/dist/{RadioGroup-CnK0opBd.mjs.map → RadioGroup-BpoKyoi3.mjs.map} +1 -1
- package/dist/{RadioGroup-DKqbSfju.d.mts → RadioGroup-Xn46ovrV.d.mts} +1 -1
- package/dist/RadioGroup.d.mts +1 -1
- package/dist/RangeCalendar.d.mts +3 -1
- package/dist/RangeCalendarPresets.d.mts +1 -1
- package/dist/RuleEditorFields.d.mts +3 -3
- package/dist/RulesPill.d.mts +1 -1
- package/dist/{SearchInput-Bp2yjaE1.d.mts → SearchInput-Try11aJD.d.mts} +10 -3
- package/dist/SearchInput.d.mts +1 -1
- package/dist/Section.d.mts +1 -1
- package/dist/{SectionHeading-C6hjGdK-.d.cts → SectionHeading-BxKNuU2m.d.mts} +2 -2
- package/dist/SectionHeading.d.mts +1 -1
- package/dist/{SegmentedControl-CgDQIVll.mjs → SegmentedControl-Cgs6qlhN.mjs} +3 -3
- package/dist/{SegmentedControl-CgDQIVll.mjs.map → SegmentedControl-Cgs6qlhN.mjs.map} +1 -1
- package/dist/{SegmentedControl-DrjdUOU9.d.mts → SegmentedControl-DckAdhcD.d.mts} +2 -2
- package/dist/SegmentedControl.d.mts +1 -1
- package/dist/{Select-BH3hXMxp.d.cts → Select-COT4bkPb.d.mts} +5 -5
- package/dist/{Select-cPEORy70.mjs → Select-CmJEiYXU.mjs} +11 -11
- package/dist/{Select-cPEORy70.mjs.map → Select-CmJEiYXU.mjs.map} +1 -1
- package/dist/Select.d.mts +1 -1
- package/dist/Slider.d.mts +1 -1
- package/dist/SliderRHF.d.mts +1 -1
- package/dist/SliderThumb.d.mts +1 -1
- package/dist/{Spacer-CJp0lwkL.mjs → Spacer-Ln3KChb5.mjs} +1 -1
- package/dist/{Spacer-CJp0lwkL.mjs.map → Spacer-Ln3KChb5.mjs.map} +1 -1
- package/dist/{Spinner-BEPF42RW.mjs → Spinner-BXfYWjC_.mjs} +2 -2
- package/dist/{Spinner-BEPF42RW.mjs.map → Spinner-BXfYWjC_.mjs.map} +1 -1
- package/dist/{Stack-CkV7k7TE.d.mts → Stack-DHaK1-dw.d.mts} +2 -2
- package/dist/{Stack-Bl54WmhY.mjs → Stack-ckRN7LrP.mjs} +1 -1
- package/dist/{Stack-Bl54WmhY.mjs.map → Stack-ckRN7LrP.mjs.map} +1 -1
- package/dist/Stack.d.mts +1 -1
- package/dist/StatusIndicator.d.mts +1 -1
- package/dist/{Sticker-DbqKLe33.mjs → Sticker-BOlAy2TE.mjs} +5 -5
- package/dist/{Sticker-DbqKLe33.mjs.map → Sticker-BOlAy2TE.mjs.map} +1 -1
- package/dist/{Sticker-Bs25ISz7.d.mts → Sticker-C8rvpu7M.d.mts} +6 -6
- package/dist/Sticker.d.mts +1 -1
- package/dist/StringValueControl.d.mts +1 -1
- package/dist/SwatchPicker.d.mts +1 -1
- package/dist/Tab.d.mts +15 -6
- package/dist/{TabBar-zSA8kyE6.mjs → TabBar-DX1Spi6D.mjs} +18 -12
- package/dist/TabBar-DX1Spi6D.mjs.map +1 -0
- package/dist/TabBarIconButton.d.mts +2 -2
- package/dist/{Table-DXqyNohc.d.cts → Table-8jXlKYLy.d.mts} +1 -1
- package/dist/{Table-D8IcpACv.mjs → Table-BnYZVCLj.mjs} +12 -10
- package/dist/{Table-D8IcpACv.mjs.map → Table-BnYZVCLj.mjs.map} +1 -1
- package/dist/Table.d.mts +1 -1
- package/dist/{TableBody-CrDNMyT8.d.mts → TableBody-ByEcFueE.d.mts} +1 -1
- package/dist/TableBody.d.mts +1 -1
- package/dist/{TableBox-luasMC73.mjs → TableBox-BC5l3UMT.mjs} +145 -84
- package/dist/TableBox-BC5l3UMT.mjs.map +1 -0
- package/dist/TableBox.d.mts +2 -2
- package/dist/{TableBoxCell-By1xE6_Q.d.mts → TableBoxCell-CWh_riC8.d.mts} +25 -11
- package/dist/TableBoxCell.d.mts +1 -1
- package/dist/TableBoxField.d.mts +8 -5
- package/dist/{TableBoxRow-CsRPRPQ-.d.mts → TableBoxRow-JnJXVqMr.d.mts} +4 -4
- package/dist/TableBoxRow.d.mts +1 -1
- package/dist/{TableBoxRowActions-DMYOI8Do.d.mts → TableBoxRowActions-CfEE1r4C.d.mts} +2 -2
- package/dist/TableBoxRowActions.d.mts +1 -1
- package/dist/TableCell.d.mts +1 -1
- package/dist/{TableControls-DHMs7o58.mjs → TableControls-51NYgFvI.mjs} +133 -61
- package/dist/TableControls-51NYgFvI.mjs.map +1 -0
- package/dist/{TableControls-BehR7CKS.d.mts → TableControls-DscP6fyt.d.mts} +4 -4
- package/dist/TableControls.d.mts +1 -1
- package/dist/{TableControlsContext-DAZx6Rrj.d.cts → TableControlsContext-BeJ7GHPN.d.mts} +2 -2
- package/dist/TableControlsContext.d.mts +1 -1
- package/dist/{TableHead-Ch4Ho3LW.d.cts → TableHead-g3afLl5B.d.mts} +1 -1
- package/dist/TableHead.d.mts +1 -1
- package/dist/{TableHeaderCell-Crsa2R2g.d.cts → TableHeaderCell-CWTMf2Fe.d.mts} +1 -1
- package/dist/TableHeaderCell.d.mts +1 -1
- package/dist/{TableLayout-nwy094C_.d.mts → TableLayout-hPlVO3dD.d.mts} +7 -1
- package/dist/TableLayout.d.mts +1 -1
- package/dist/{TableRow-BvS4yjo6.d.mts → TableRow-lvjbVccA.d.mts} +2 -2
- package/dist/TableRow.d.mts +1 -1
- package/dist/TableTH.d.mts +1 -1
- package/dist/{TableViewConfigurationDropdown-BYPh4dIP.d.mts → TableViewConfigurationDropdown-Ccxtk5dA.d.mts} +2 -2
- package/dist/TableViewConfigurationDropdown.d.mts +1 -1
- package/dist/{components/TechnicalSticker/index.cjs → TechnicalSticker-D7viw4H5.mjs} +95 -68
- package/dist/TechnicalSticker-D7viw4H5.mjs.map +1 -0
- package/dist/TechnicalSticker.d.mts +7 -1
- package/dist/{Text-DNPbAuUG.d.mts → Text-CEisq2at.d.mts} +4 -4
- package/dist/{Text-RcEfNFLx.mjs → Text-hEoPeOc9.mjs} +1 -1
- package/dist/{Text-RcEfNFLx.mjs.map → Text-hEoPeOc9.mjs.map} +1 -1
- package/dist/Text.d.mts +1 -1
- package/dist/{TextArea-B89wtTsF.d.mts → TextArea-DiKEhpfD.d.mts} +2 -2
- package/dist/{TextArea-NCLsW-03.mjs → TextArea-DjmlpCdJ.mjs} +2 -2
- package/dist/{TextArea-NCLsW-03.mjs.map → TextArea-DjmlpCdJ.mjs.map} +1 -1
- package/dist/TextArea.d.mts +1 -1
- package/dist/{TextUnderlineTooltip-5-0D8s4z.d.mts → TextUnderlineTooltip-BKE4peKI.d.mts} +3 -3
- package/dist/TextUnderlineTooltip.d.mts +1 -1
- package/dist/Tile.d.mts +2 -2
- package/dist/Toast.d.mts +1 -1
- package/dist/{Toggle-Bie9zCem.mjs → Toggle-D1rEjYoN.mjs} +5 -5
- package/dist/{Toggle-Bie9zCem.mjs.map → Toggle-D1rEjYoN.mjs.map} +1 -1
- package/dist/{Toggle-DzYLgxGk.d.mts → Toggle-oukvAn6V.d.mts} +1 -1
- package/dist/Toggle.d.mts +1 -1
- package/dist/{Tooltip-C6AR1xT-.mjs → Tooltip-B-DDlRMw.mjs} +4 -4
- package/dist/{Tooltip-C6AR1xT-.mjs.map → Tooltip-B-DDlRMw.mjs.map} +1 -1
- package/dist/{Tooltip-CUC-JuRL.d.mts → Tooltip-DZVPqxai.d.mts} +3 -3
- package/dist/Tooltip.d.mts +1 -1
- package/dist/{TruncatedText-BJnowVTx.d.mts → TruncatedText-D2R7uy_y.d.mts} +2 -2
- package/dist/components/Attribute/index.mjs +7 -7
- package/dist/components/Attribute/index.mjs.map +1 -1
- package/dist/components/Badge/index.mjs +1 -1
- package/dist/components/Banner/index.mjs +2 -2
- package/dist/components/Breadcrumbs/index.d.mts +1 -1
- package/dist/components/Breadcrumbs/index.mjs +1 -1
- package/dist/components/Button/index.d.mts +2 -2
- package/dist/components/Button/index.mjs +1 -1
- package/dist/components/ButtonGroup/index.mjs +2 -2
- package/dist/components/Card/index.d.mts +2 -2
- package/dist/components/Card/index.mjs +1 -1
- package/dist/components/CardV2/index.d.mts +1 -1
- package/dist/components/CardV2/index.mjs +1 -1
- package/dist/components/Checkbox/index.d.mts +1 -1
- package/dist/components/Checkbox/index.mjs +1 -1
- package/dist/components/Combobox/index.d.mts +2 -2
- package/dist/components/Combobox/index.mjs +1 -1
- package/dist/components/ConfigFormGroup/index.mjs +1 -1
- package/dist/components/DataTable/TableControls/index.d.mts +15 -15
- package/dist/components/DataTable/TableControls/index.mjs +1 -1
- package/dist/components/DataTable/index.mjs +28 -26
- package/dist/components/DataTable/index.mjs.map +1 -1
- package/dist/components/DataTable/types.d.mts +2 -2
- package/dist/components/DatePicker/index.mjs +1 -1
- package/dist/components/DropdownButton/index.mjs +1 -1
- package/dist/components/DropdownMenu/index.d.mts +1 -1
- package/dist/components/DropdownMenu/index.mjs +1 -1
- package/dist/components/FormControl/index.d.mts +2 -2
- package/dist/components/FormControl/index.mjs +1 -1
- package/dist/components/FormField/index.d.mts +3 -3
- package/dist/components/FormField/index.mjs +2 -2
- package/dist/components/HoverCopyableField/index.mjs +1 -1
- package/dist/components/ImageTile/index.mjs +8 -8
- package/dist/components/Input/index.d.mts +1 -1
- package/dist/components/Input/index.mjs +1 -1
- package/dist/components/Link/index.mjs +3 -3
- package/dist/components/ListBox/index.d.mts +3 -3
- package/dist/components/ListBox/index.mjs +1 -1
- package/dist/components/MaskedInput/index.mjs +2 -2
- package/dist/components/Menu/index.d.mts +1 -1
- package/dist/components/Menu/index.mjs +1 -1
- package/dist/components/Modal/index.mjs +7 -7
- package/dist/components/PageHeader/index.mjs +1 -1
- package/dist/components/Pagination/index.d.mts +3 -3
- package/dist/components/Pagination/index.mjs +1 -1
- package/dist/components/Pii/index.mjs +1 -1
- package/dist/components/Popover/index.mjs +1 -1
- package/dist/components/ProgressBar/index.mjs +1 -1
- package/dist/components/ProgressIndicator/index.mjs +1 -1
- package/dist/components/Radio/index.mjs +1 -1
- package/dist/components/RadioGroup/index.d.mts +1 -1
- package/dist/components/RadioGroup/index.mjs +1 -1
- package/dist/components/SegmentedControl/index.d.mts +1 -1
- package/dist/components/SegmentedControl/index.mjs +1 -1
- package/dist/components/Select/index.d.mts +1 -1
- package/dist/components/Select/index.mjs +1 -1
- package/dist/components/Slider/index.mjs +3 -3
- package/dist/components/Spacer/index.mjs +1 -1
- package/dist/components/Spinner/index.mjs +1 -1
- package/dist/components/Stack/index.d.mts +1 -1
- package/dist/components/Stack/index.mjs +1 -1
- package/dist/components/StatusIndicator/index.mjs +1 -1
- package/dist/components/Sticker/index.d.mts +1 -1
- package/dist/components/Sticker/index.mjs +1 -1
- package/dist/components/TabBar/index.mjs +1 -1
- package/dist/components/Table/index.d.mts +7 -7
- package/dist/components/Table/index.mjs +1 -1
- package/dist/components/TableBox/index.d.mts +2 -2
- package/dist/components/TableBox/index.mjs +1 -1
- package/dist/components/TechnicalSticker/index.mjs +1 -231
- package/dist/components/Text/index.d.mts +1 -1
- package/dist/components/Text/index.mjs +1 -1
- package/dist/components/TextArea/index.d.mts +1 -1
- package/dist/components/TextArea/index.mjs +1 -1
- package/dist/components/Tile/index.mjs +4 -4
- package/dist/components/Toast/index.mjs +4 -4
- package/dist/components/Toggle/index.d.mts +1 -1
- package/dist/components/Toggle/index.mjs +1 -1
- package/dist/components/Tooltip/index.d.mts +3 -3
- package/dist/components/Tooltip/index.mjs +1 -1
- package/dist/compound-expression.d.mts +1 -1
- package/dist/{constants-B6c8S033.d.cts → constants-bA9kCzRQ.d.mts} +1 -1
- package/dist/constants.d.mts +1 -1
- package/dist/containers.d.mts +1 -1
- package/dist/display.d.mts +1 -1
- package/dist/fieldPickerOptions.d.mts +2 -2
- package/dist/{filter-size-context-Blw6Sd69.d.mts → filter-size-context-C1TvrE_O.d.mts} +2 -2
- package/dist/filter-size-context.d.mts +1 -1
- package/dist/helpers.d.mts +1 -1
- package/dist/{index-4_B2yRzD.d.mts → index-BC4edEsD.d.mts} +2 -2
- package/dist/{index-IlwGkCAe2.d.mts → index-DLV1eMsr.d.mts} +6 -5
- package/dist/{index-DDbjWdk0.d.mts → index-Doptc4HI.d.mts} +5 -5
- package/dist/index.d.mts +1 -1
- package/dist/index2.d.mts +1 -1
- package/dist/index3.d.mts +3 -3
- package/dist/index4.d.mts +10 -10
- package/dist/{input-Bv5fKt5J.d.mts → input-D3Qd6dI8.d.mts} +3 -3
- package/dist/inputFields.d.mts +11 -11
- package/dist/lib/MiddleTruncatedText.mjs +1 -1
- package/dist/lib/PDSProvider.d.mts +1 -1
- package/dist/lib/TruncatedText.d.mts +1 -1
- package/dist/lib/TruncatedText.mjs +1 -1
- package/dist/lib/TruncatedTextWithTooltip.d.mts +1 -1
- package/dist/lib/TruncatedTextWithTooltip.mjs +2 -2
- package/dist/lib/message.d.mts +1 -1
- package/dist/lib/pseudoClass.d.mts +1 -1
- package/dist/lib/useScrollOverflow.d.mts +7 -0
- package/dist/lib/useScrollOverflow.mjs +22 -1
- package/dist/lib/useScrollOverflow.mjs.map +1 -1
- package/dist/{message-BEgtEjQC.d.cts → message-CsK3sIq0.d.mts} +1 -1
- package/dist/mixins/focus.d.mts +1 -1
- package/dist/mixins/hoverable.d.mts +2 -2
- package/dist/mixins/hoverable.mjs +1 -1
- package/dist/mixins/input.d.mts +1 -1
- package/dist/mixins/input.mjs +1 -1
- package/dist/mixins/menuItem.d.mts +2 -2
- package/dist/mixins/text.d.mts +1 -1
- package/dist/{operators-1qE2GpC7.d.cts → operators-C_xPzItk.d.mts} +2 -2
- package/dist/operators.d.mts +1 -1
- package/dist/{layouts → patterns}/LayoutLoadingShimmer/index.mjs +6 -6
- package/dist/patterns/LayoutLoadingShimmer/index.mjs.map +1 -0
- package/dist/patterns/PageLayout/index.d.mts +2 -0
- package/dist/patterns/PageLayout/index.mjs +35 -0
- package/dist/patterns/PageLayout/index.mjs.map +1 -0
- package/dist/{text-B21s9mRZ.d.mts → text-BaQdW8qa.d.mts} +1 -1
- package/dist/{theme-BzBpJXhO.d.mts → theme-D9Y6NOzb.d.mts} +1 -1
- package/dist/theme.d.mts +1 -1
- package/dist/{types-CCvc590y.d.cts → types-BKEwt0uq.d.mts} +2 -2
- package/dist/{types-DEh_pXgS.d.mts → types-CjHuZoVJ.d.mts} +1 -1
- package/dist/{types-CkiXVJeR.d.cts → types-DVsBRqjZ.d.mts} +1 -1
- package/dist/{types-B_HHNlia.d.cts → types-mb3woqzE.d.mts} +6 -7
- package/dist/types.d.mts +1 -1
- package/dist/types2.d.mts +1 -1
- package/dist/types3.d.mts +1 -1
- package/dist/types4.d.mts +1 -1
- package/dist/useComboboxFooterAction.d.mts +1 -1
- package/dist/{useFilterStateV2-DCQghouq.d.mts → useFilterStateV2-CGzRyv0i.d.mts} +3 -3
- package/dist/useFilterStateV2.d.mts +1 -1
- package/dist/{useFormField-D8mLsiQc.d.mts → useFormField-DhwEi45-.d.mts} +2 -2
- package/dist/useFormField.d.mts +1 -1
- package/dist/{useTableBoxDragAndDrop-DnbUToce.d.cts → useTableBoxDragAndDrop-CsnN52lx.d.mts} +1 -1
- package/dist/useTableBoxDragAndDrop.d.mts +1 -1
- package/dist/{useToggle-Bo3yd14Y.mjs → useToggle-3k3EkV8V.mjs} +1 -1
- package/dist/{useToggle-Bo3yd14Y.mjs.map → useToggle-3k3EkV8V.mjs.map} +1 -1
- package/dist/useTruncation.d.mts +1 -1
- package/dist/{utilities-mSlaTrjB.d.cts → utilities-DnSIlR1i.d.mts} +1 -1
- package/dist/utilities.d.mts +1 -1
- package/dist/utils/storybook.mjs +1 -1
- package/dist/utils/testing.d.mts +1 -1
- package/dist/utils/testing.mjs +1 -1
- package/dist/utils.d.mts +1 -1
- package/dist/{validation-CJymv6JE.d.cts → validation-BdP2vajF.d.mts} +3 -3
- package/dist/validation.d.mts +1 -1
- package/dist/{value-control-resolver-CE-bqdAl.d.mts → value-control-resolver-CiGEHQAc.d.mts} +2 -2
- package/dist/value-control-resolver.d.mts +1 -1
- package/llms.txt +43 -0
- package/package.json +206 -747
- package/skills/ui-authoring/COMPONENTS.md +331 -0
- package/skills/ui-authoring/EXAMPLES.md +370 -0
- package/skills/ui-authoring/REFERENCE.md +293 -0
- package/skills/ui-authoring/SKILL.md +263 -0
- package/dist/Action-E90Wvqmc.d.cts +0 -35
- package/dist/Action.d.cts +0 -2
- package/dist/Attribute.d.cts +0 -107
- package/dist/AttributeGrid.d.cts +0 -40
- package/dist/Badge-ADPloFsd.cjs +0 -38
- package/dist/Badge-ADPloFsd.cjs.map +0 -1
- package/dist/Badge.d.cts +0 -25
- package/dist/Banner.d.cts +0 -48
- package/dist/Breadcrumb-VH-Mwo-M.d.cts +0 -44
- package/dist/Breadcrumb.d.cts +0 -2
- package/dist/Breadcrumbs-BBREROrw.d.cts +0 -26
- package/dist/Breadcrumbs-CDZ_Mrcg.mjs.map +0 -1
- package/dist/Breadcrumbs-tR49JqAS.cjs +0 -295
- package/dist/Breadcrumbs-tR49JqAS.cjs.map +0 -1
- package/dist/Breadcrumbs.d.cts +0 -2
- package/dist/Button-C_3p5Xfi.d.cts +0 -101
- package/dist/Button.d.cts +0 -2
- package/dist/ButtonGroup.d.cts +0 -20
- package/dist/Calendar.d.cts +0 -11
- package/dist/Card-CJPEmUvg.d.cts +0 -52
- package/dist/Card-Csz-PxX0.cjs +0 -248
- package/dist/Card-Csz-PxX0.cjs.map +0 -1
- package/dist/Card.d.cts +0 -2
- package/dist/Card2.d.cts +0 -95
- package/dist/CardV2-DJXgFomd.cjs +0 -419
- package/dist/CardV2-DJXgFomd.cjs.map +0 -1
- package/dist/Checkbox-CmCujC1W.cjs +0 -183
- package/dist/Checkbox-CmCujC1W.cjs.map +0 -1
- package/dist/Checkbox-Cr8ifm10.d.cts +0 -46
- package/dist/Checkbox.d.cts +0 -2
- package/dist/CheckboxGroupField.d.cts +0 -24
- package/dist/Combobox-BdqU5WLG.mjs.map +0 -1
- package/dist/Combobox-COXvmxlM.cjs +0 -1877
- package/dist/Combobox-COXvmxlM.cjs.map +0 -1
- package/dist/Combobox-DBWMHwUt.d.cts +0 -11
- package/dist/Combobox.d.cts +0 -3
- package/dist/ComboboxBase-zZ3tE-dH.d.cts +0 -361
- package/dist/ComboboxBase.d.cts +0 -2
- package/dist/ComboboxMultiSelect-ioB4Jx7_.d.cts +0 -47
- package/dist/ComboboxMultiSelect.d.cts +0 -2
- package/dist/ComboboxSingleSelect-Fn80tdhz.d.cts +0 -35
- package/dist/ComboboxSingleSelect.d.cts +0 -2
- package/dist/CompactBar-BEAK55kh.d.cts +0 -21
- package/dist/CompactBar.d.cts +0 -2
- package/dist/ConfigFormGroup-m5YdVa9n.cjs +0 -35
- package/dist/ConfigFormGroup-m5YdVa9n.cjs.map +0 -1
- package/dist/ConfigFormGroup.d.cts +0 -7
- package/dist/ControlBar-D8CirAyZ.d.cts +0 -151
- package/dist/ControlBar.d.cts +0 -2
- package/dist/DataTable.d.cts +0 -372
- package/dist/DateField.d.cts +0 -23
- package/dist/DatePicker-BlCgFb7g.cjs +0 -948
- package/dist/DatePicker-BlCgFb7g.cjs.map +0 -1
- package/dist/DatePicker-DY1YA_Fu.mjs.map +0 -1
- package/dist/DatePicker.d.cts +0 -19
- package/dist/DateRangePicker.d.cts +0 -52
- package/dist/DropdownButton-Dl7IEzAc.cjs +0 -32
- package/dist/DropdownButton-Dl7IEzAc.cjs.map +0 -1
- package/dist/DropdownButton.d.cts +0 -26
- package/dist/DropdownMenu-DnlQqTjs.cjs +0 -74
- package/dist/DropdownMenu-DnlQqTjs.cjs.map +0 -1
- package/dist/DropdownMenu-FkiManPP.d.cts +0 -75
- package/dist/DropdownMenu.d.cts +0 -2
- package/dist/ErrorProps-Dxqb4gw_.d.cts +0 -8
- package/dist/ErrorProps.d.cts +0 -2
- package/dist/FieldRegistry-rqSkjchY.d.mts +0 -122
- package/dist/FieldRegistry.d.cts +0 -2
- package/dist/FilterBar-YzOh02f9.d.cts +0 -103
- package/dist/FilterBar.d.cts +0 -2
- package/dist/FloatingActionBar.d.cts +0 -40
- package/dist/FormControl-DFp_qcW1.d.cts +0 -60
- package/dist/FormControl-MkBXuUF6.cjs +0 -212
- package/dist/FormControl-MkBXuUF6.cjs.map +0 -1
- package/dist/FormControl.d.cts +0 -2
- package/dist/FormField-D3XhxTMg.cjs +0 -550
- package/dist/FormField-D3XhxTMg.cjs.map +0 -1
- package/dist/FormField-PeYYRO4s.mjs.map +0 -1
- package/dist/FormField-idNLw5PW.d.cts +0 -69
- package/dist/FormField.d.cts +0 -2
- package/dist/Header-C-WhPOin.d.cts +0 -35
- package/dist/Header.d.cts +0 -2
- package/dist/HelperTooltip-T-sTGGLD.d.cts +0 -20
- package/dist/HelperTooltip.d.cts +0 -2
- package/dist/HoverCopyableField-CRkM7o4B.cjs +0 -110
- package/dist/HoverCopyableField-CRkM7o4B.cjs.map +0 -1
- package/dist/HoverCopyableField.d.cts +0 -16
- package/dist/IconButton-ZcyTFjPn.d.cts +0 -24
- package/dist/IconButton-nlgjJQCS.cjs +0 -372
- package/dist/IconButton-nlgjJQCS.cjs.map +0 -1
- package/dist/IconButton.d.cts +0 -2
- package/dist/ImageTile.d.cts +0 -60
- package/dist/Input-BFI_e7aU.mjs.map +0 -1
- package/dist/Input-BPClVzwD.d.mts +0 -65
- package/dist/Input-OJPQ07TW.cjs +0 -209
- package/dist/Input-OJPQ07TW.cjs.map +0 -1
- package/dist/Input.d.cts +0 -2
- package/dist/InputProps-BnjxrdWQ.d.mts +0 -16
- package/dist/InputProps.d.cts +0 -2
- package/dist/Inserter.d.cts +0 -12
- package/dist/LayoutLoadingShimmer.d.cts +0 -20
- package/dist/Link.d.cts +0 -43
- package/dist/ListBox-BP1eaG7L.cjs +0 -448
- package/dist/ListBox-BP1eaG7L.cjs.map +0 -1
- package/dist/ListBox-BwID8jpk.mjs.map +0 -1
- package/dist/ListBox-QaeRQBSC.d.cts +0 -138
- package/dist/ListBox.d.cts +0 -2
- package/dist/ListBoxField.d.cts +0 -46
- package/dist/LoadingShimmer-Dx6ncVUV.cjs +0 -92
- package/dist/LoadingShimmer-Dx6ncVUV.cjs.map +0 -1
- package/dist/LoadingShimmer.d.cts +0 -38
- package/dist/LogicRow-C6lrFIq0.d.cts +0 -40
- package/dist/LogicRow.d.cts +0 -2
- package/dist/MaskedInput.d.cts +0 -10
- package/dist/MatchHighlight.d.cts +0 -11
- package/dist/Menu-fUnbIYr5.d.cts +0 -70
- package/dist/Menu-t2q8NrV0.cjs +0 -217
- package/dist/Menu-t2q8NrV0.cjs.map +0 -1
- package/dist/Menu.d.cts +0 -2
- package/dist/MiddleTruncatedText-CO76xIqP.cjs +0 -178
- package/dist/MiddleTruncatedText-CO76xIqP.cjs.map +0 -1
- package/dist/Modal.d.cts +0 -146
- package/dist/PageHeader-CUDnarkt.cjs +0 -77
- package/dist/PageHeader-CUDnarkt.cjs.map +0 -1
- package/dist/PageHeader-D-6W61E_.mjs.map +0 -1
- package/dist/PageHeader.d.cts +0 -35
- package/dist/PageSelector-CNnVp3Al.d.cts +0 -30
- package/dist/PageSelector.d.cts +0 -2
- package/dist/Pagination-2Yo1vRJZ.cjs +0 -236
- package/dist/Pagination-2Yo1vRJZ.cjs.map +0 -1
- package/dist/Pagination-D04tn-tf.d.cts +0 -39
- package/dist/Pagination.d.cts +0 -2
- package/dist/Pii-DHTb3ewO.cjs +0 -25
- package/dist/Pii-DHTb3ewO.cjs.map +0 -1
- package/dist/Pii.d.cts +0 -16
- package/dist/Popover-BzgMAhsX.cjs +0 -168
- package/dist/Popover-BzgMAhsX.cjs.map +0 -1
- package/dist/Popover.d.cts +0 -90
- package/dist/ProgressBar.d.cts +0 -83
- package/dist/ProgressIndicator.d.cts +0 -64
- package/dist/PseudoClassProps-DLxPxo7T.d.mts +0 -12
- package/dist/PseudoClassProps.d.cts +0 -2
- package/dist/Radio-BrTzy7-C.cjs +0 -154
- package/dist/Radio-BrTzy7-C.cjs.map +0 -1
- package/dist/Radio.d.cts +0 -21
- package/dist/RadioGroup-CriF2InQ.cjs +0 -57
- package/dist/RadioGroup-CriF2InQ.cjs.map +0 -1
- package/dist/RadioGroup-XYWjprsv.d.cts +0 -21
- package/dist/RadioGroup.d.cts +0 -2
- package/dist/SearchInput-CTI59-NW.d.cts +0 -46
- package/dist/SearchInput.d.cts +0 -2
- package/dist/SectionHeading-Q-rx2LEd.d.mts +0 -71
- package/dist/SectionHeading.d.cts +0 -2
- package/dist/SegmentedControl-C2XZF0ys.cjs +0 -125
- package/dist/SegmentedControl-C2XZF0ys.cjs.map +0 -1
- package/dist/SegmentedControl-nHIK1ZvR.d.cts +0 -59
- package/dist/SegmentedControl.d.cts +0 -2
- package/dist/Select-2KbtKawr.d.mts +0 -83
- package/dist/Select-BurtT6bN.cjs +0 -265
- package/dist/Select-BurtT6bN.cjs.map +0 -1
- package/dist/Select.d.cts +0 -2
- package/dist/Slider.d.cts +0 -51
- package/dist/SliderRHF.d.cts +0 -18
- package/dist/Spacer-B2CerL6e.cjs +0 -20
- package/dist/Spacer-B2CerL6e.cjs.map +0 -1
- package/dist/Spacer.d.cts +0 -17
- package/dist/Spinner-B6bx70yR.cjs +0 -48
- package/dist/Spinner-B6bx70yR.cjs.map +0 -1
- package/dist/Spinner.d.cts +0 -26
- package/dist/Stack-BzVkf3cz.d.cts +0 -47
- package/dist/Stack-UeifHn3c.cjs +0 -53
- package/dist/Stack-UeifHn3c.cjs.map +0 -1
- package/dist/Stack.d.cts +0 -2
- package/dist/StatusIndicator.d.cts +0 -82
- package/dist/Sticker-CI-XxUmM.d.cts +0 -68
- package/dist/Sticker-CIoseh9f.cjs +0 -244
- package/dist/Sticker-CIoseh9f.cjs.map +0 -1
- package/dist/Sticker.d.cts +0 -2
- package/dist/SwatchPicker.d.cts +0 -18
- package/dist/Tab.d.cts +0 -26
- package/dist/TabBar-PFaDNRw0.cjs +0 -298
- package/dist/TabBar-PFaDNRw0.cjs.map +0 -1
- package/dist/TabBar-zSA8kyE6.mjs.map +0 -1
- package/dist/TabBar.d.cts +0 -33
- package/dist/TabBarIconButton.d.cts +0 -10
- package/dist/Table-BNScLj9g.d.mts +0 -13
- package/dist/Table-DxLvJYWK.cjs +0 -478
- package/dist/Table-DxLvJYWK.cjs.map +0 -1
- package/dist/Table.d.cts +0 -2
- package/dist/TableBody-CxwHmdNb.d.cts +0 -9
- package/dist/TableBody.d.cts +0 -2
- package/dist/TableBox-CiuXCXyv.cjs +0 -1370
- package/dist/TableBox-CiuXCXyv.cjs.map +0 -1
- package/dist/TableBox-luasMC73.mjs.map +0 -1
- package/dist/TableBox.d.cts +0 -3
- package/dist/TableBoxCell-DIMenSwX.d.cts +0 -259
- package/dist/TableBoxCell.d.cts +0 -2
- package/dist/TableBoxField.d.cts +0 -99
- package/dist/TableBoxRow-RNQ6wJLh.d.cts +0 -86
- package/dist/TableBoxRow.d.cts +0 -2
- package/dist/TableBoxRowActions-CYpoPhYZ.d.cts +0 -57
- package/dist/TableBoxRowActions.d.cts +0 -2
- package/dist/TableCell.d.cts +0 -2
- package/dist/TableControls-BtXK7Ils.cjs +0 -3995
- package/dist/TableControls-BtXK7Ils.cjs.map +0 -1
- package/dist/TableControls-CLNF0AJG.d.cts +0 -70
- package/dist/TableControls-DHMs7o58.mjs.map +0 -1
- package/dist/TableControls.d.cts +0 -2
- package/dist/TableControlsContext-D_SBFZN1.d.mts +0 -21
- package/dist/TableControlsContext.d.cts +0 -2
- package/dist/TableHead-LxvG0e9k.d.mts +0 -12
- package/dist/TableHead.d.cts +0 -2
- package/dist/TableHeaderCell-Br8ZE3Xe.d.mts +0 -17
- package/dist/TableHeaderCell.d.cts +0 -2
- package/dist/TableLayout-Ct0kepcA.d.cts +0 -19
- package/dist/TableLayout.d.cts +0 -2
- package/dist/TableRow-DVTPqT4w.d.cts +0 -13
- package/dist/TableRow.d.cts +0 -2
- package/dist/TableTH.d.cts +0 -2
- package/dist/TableViewConfigurationDropdown-CaiOGyrU.d.cts +0 -32
- package/dist/TableViewConfigurationDropdown.d.cts +0 -2
- package/dist/TechnicalSticker.d.cts +0 -51
- package/dist/Text-CrGiWG2E.d.cts +0 -42
- package/dist/Text-G9QmYf0P.cjs +0 -95
- package/dist/Text-G9QmYf0P.cjs.map +0 -1
- package/dist/Text.d.cts +0 -2
- package/dist/TextArea-BNiipQDb.cjs +0 -40
- package/dist/TextArea-BNiipQDb.cjs.map +0 -1
- package/dist/TextArea-CHW9FKM4.d.cts +0 -10
- package/dist/TextArea.d.cts +0 -2
- package/dist/TextUnderlineTooltip-DMEyOu8C.d.cts +0 -18
- package/dist/TextUnderlineTooltip.d.cts +0 -2
- package/dist/Tile.d.cts +0 -63
- package/dist/Toast.d.cts +0 -23
- package/dist/Toggle-Ce-rF8Xp.cjs +0 -174
- package/dist/Toggle-Ce-rF8Xp.cjs.map +0 -1
- package/dist/Toggle-tbIebQWC.d.cts +0 -54
- package/dist/Toggle.d.cts +0 -2
- package/dist/Tooltip--eDrrk2r.d.cts +0 -100
- package/dist/Tooltip-olP3rdUO.cjs +0 -152
- package/dist/Tooltip-olP3rdUO.cjs.map +0 -1
- package/dist/Tooltip.d.cts +0 -2
- package/dist/TruncatedText-Dit2NJI6.d.cts +0 -18
- package/dist/chunk-CKQMccvm.cjs +0 -28
- package/dist/components/Attribute/index.cjs +0 -210
- package/dist/components/Attribute/index.cjs.map +0 -1
- package/dist/components/Attribute/index.d.cts +0 -3
- package/dist/components/Badge/index.cjs +0 -7
- package/dist/components/Badge/index.d.cts +0 -2
- package/dist/components/Banner/index.cjs +0 -99
- package/dist/components/Banner/index.cjs.map +0 -1
- package/dist/components/Banner/index.d.cts +0 -2
- package/dist/components/Breadcrumbs/index.cjs +0 -7
- package/dist/components/Breadcrumbs/index.d.cts +0 -2
- package/dist/components/Button/index.cjs +0 -11
- package/dist/components/Button/index.d.cts +0 -3
- package/dist/components/ButtonGroup/index.cjs +0 -112
- package/dist/components/ButtonGroup/index.cjs.map +0 -1
- package/dist/components/ButtonGroup/index.d.cts +0 -2
- package/dist/components/Card/index.cjs +0 -12
- package/dist/components/Card/index.d.cts +0 -3
- package/dist/components/CardV2/index.cjs +0 -7
- package/dist/components/CardV2/index.d.cts +0 -3
- package/dist/components/Checkbox/index.cjs +0 -7
- package/dist/components/Checkbox/index.d.cts +0 -2
- package/dist/components/Combobox/index.cjs +0 -9
- package/dist/components/Combobox/index.d.cts +0 -3
- package/dist/components/ConfigFormGroup/index.cjs +0 -10
- package/dist/components/ConfigFormGroup/index.d.cts +0 -3
- package/dist/components/DataTable/TableControls/index.cjs +0 -27
- package/dist/components/DataTable/TableControls/index.d.cts +0 -16
- package/dist/components/DataTable/index.cjs +0 -1434
- package/dist/components/DataTable/index.cjs.map +0 -1
- package/dist/components/DataTable/index.d.cts +0 -8
- package/dist/components/DataTable/types.cjs +0 -0
- package/dist/components/DataTable/types.d.cts +0 -159
- package/dist/components/DatePicker/index.cjs +0 -10
- package/dist/components/DatePicker/index.d.cts +0 -5
- package/dist/components/DropdownButton/index.cjs +0 -7
- package/dist/components/DropdownButton/index.d.cts +0 -2
- package/dist/components/DropdownMenu/index.cjs +0 -7
- package/dist/components/DropdownMenu/index.d.cts +0 -2
- package/dist/components/FormControl/index.cjs +0 -15
- package/dist/components/FormControl/index.d.cts +0 -3
- package/dist/components/FormField/index.cjs +0 -19
- package/dist/components/FormField/index.d.cts +0 -6
- package/dist/components/HoverCopyableField/index.cjs +0 -2
- package/dist/components/HoverCopyableField/index.d.cts +0 -2
- package/dist/components/ImageTile/index.cjs +0 -225
- package/dist/components/ImageTile/index.cjs.map +0 -1
- package/dist/components/ImageTile/index.d.cts +0 -2
- package/dist/components/Input/index.cjs +0 -14
- package/dist/components/Input/index.cjs.map +0 -1
- package/dist/components/Input/index.d.cts +0 -2
- package/dist/components/Link/index.cjs +0 -87
- package/dist/components/Link/index.cjs.map +0 -1
- package/dist/components/Link/index.d.cts +0 -2
- package/dist/components/ListBox/index.cjs +0 -8
- package/dist/components/ListBox/index.d.cts +0 -4
- package/dist/components/LoadingShimmer/index.cjs +0 -6
- package/dist/components/LoadingShimmer/index.d.cts +0 -2
- package/dist/components/MaskedInput/index.cjs +0 -29
- package/dist/components/MaskedInput/index.cjs.map +0 -1
- package/dist/components/MaskedInput/index.d.cts +0 -2
- package/dist/components/MatchHighlight/index.cjs +0 -31
- package/dist/components/MatchHighlight/index.cjs.map +0 -1
- package/dist/components/MatchHighlight/index.d.cts +0 -2
- package/dist/components/Menu/index.cjs +0 -14
- package/dist/components/Menu/index.d.cts +0 -2
- package/dist/components/Modal/index.cjs +0 -290
- package/dist/components/Modal/index.cjs.map +0 -1
- package/dist/components/Modal/index.d.cts +0 -2
- package/dist/components/PageHeader/index.cjs +0 -7
- package/dist/components/PageHeader/index.d.cts +0 -2
- package/dist/components/Pagination/index.cjs +0 -10
- package/dist/components/Pagination/index.d.cts +0 -4
- package/dist/components/Pii/index.cjs +0 -2
- package/dist/components/Pii/index.d.cts +0 -2
- package/dist/components/Popover/index.cjs +0 -12
- package/dist/components/Popover/index.d.cts +0 -2
- package/dist/components/ProgressBar/index.cjs +0 -177
- package/dist/components/ProgressBar/index.cjs.map +0 -1
- package/dist/components/ProgressBar/index.d.cts +0 -2
- package/dist/components/ProgressIndicator/index.cjs +0 -185
- package/dist/components/ProgressIndicator/index.cjs.map +0 -1
- package/dist/components/ProgressIndicator/index.d.cts +0 -2
- package/dist/components/Radio/index.cjs +0 -7
- package/dist/components/Radio/index.d.cts +0 -2
- package/dist/components/RadioGroup/index.cjs +0 -7
- package/dist/components/RadioGroup/index.d.cts +0 -2
- package/dist/components/SegmentedControl/index.cjs +0 -8
- package/dist/components/SegmentedControl/index.d.cts +0 -2
- package/dist/components/Select/index.cjs +0 -9
- package/dist/components/Select/index.d.cts +0 -2
- package/dist/components/Slider/index.cjs +0 -245
- package/dist/components/Slider/index.cjs.map +0 -1
- package/dist/components/Slider/index.d.cts +0 -3
- package/dist/components/Spacer/index.cjs +0 -2
- package/dist/components/Spacer/index.d.cts +0 -2
- package/dist/components/Spinner/index.cjs +0 -7
- package/dist/components/Spinner/index.d.cts +0 -2
- package/dist/components/Stack/index.cjs +0 -8
- package/dist/components/Stack/index.d.cts +0 -2
- package/dist/components/StatusIndicator/index.cjs +0 -224
- package/dist/components/StatusIndicator/index.cjs.map +0 -1
- package/dist/components/StatusIndicator/index.d.cts +0 -2
- package/dist/components/Sticker/index.cjs +0 -11
- package/dist/components/Sticker/index.d.cts +0 -2
- package/dist/components/SwatchPicker/index.cjs +0 -63
- package/dist/components/SwatchPicker/index.cjs.map +0 -1
- package/dist/components/SwatchPicker/index.d.cts +0 -2
- package/dist/components/TabBar/index.cjs +0 -11
- package/dist/components/TabBar/index.d.cts +0 -4
- package/dist/components/Table/index.cjs +0 -21
- package/dist/components/Table/index.d.cts +0 -8
- package/dist/components/TableBox/index.cjs +0 -7
- package/dist/components/TableBox/index.d.cts +0 -3
- package/dist/components/TechnicalSticker/index.cjs.map +0 -1
- package/dist/components/TechnicalSticker/index.d.cts +0 -2
- package/dist/components/TechnicalSticker/index.mjs.map +0 -1
- package/dist/components/Text/index.cjs +0 -8
- package/dist/components/Text/index.d.cts +0 -2
- package/dist/components/TextArea/index.cjs +0 -7
- package/dist/components/TextArea/index.d.cts +0 -2
- package/dist/components/Tile/index.cjs +0 -102
- package/dist/components/Tile/index.cjs.map +0 -1
- package/dist/components/Tile/index.d.cts +0 -2
- package/dist/components/Toast/index.cjs +0 -134
- package/dist/components/Toast/index.cjs.map +0 -1
- package/dist/components/Toast/index.d.cts +0 -2
- package/dist/components/Toggle/index.cjs +0 -7
- package/dist/components/Toggle/index.d.cts +0 -2
- package/dist/components/Tooltip/index.cjs +0 -11
- package/dist/components/Tooltip/index.d.cts +0 -4
- package/dist/constants-BASogfT_.d.mts +0 -6
- package/dist/constants.d.cts +0 -2
- package/dist/constants2.d.cts +0 -10
- package/dist/filter-size-context-CIw0Zi6r.d.cts +0 -52
- package/dist/filter-size-context.d.cts +0 -2
- package/dist/helpers.d.cts +0 -76
- package/dist/index-Bw8QVu_o.d.cts +0 -75
- package/dist/index-C9EIpBh8.d.cts +0 -7
- package/dist/index-CzItj62a.d.mts +0 -1
- package/dist/index-D-BciAtf.d.cts +0 -1
- package/dist/index-D34XP8vp.d.cts +0 -54
- package/dist/index-D4DUvwPf.d.mts +0 -1
- package/dist/index-D5tSVhTd.d.mts +0 -1
- package/dist/index-D6CnpA_r.d.cts +0 -1
- package/dist/index-D9IqtUDs.d.cts +0 -1
- package/dist/index-DFKoAoY2.d.cts +0 -1
- package/dist/index-DGsJdI5l.d.mts +0 -1
- package/dist/index-DM6vVDZD.d.mts +0 -1
- package/dist/index-DWfPppPU.d.mts +0 -1
- package/dist/index-DXJd7-2Z.d.mts +0 -1
- package/dist/index-DkrC-i1D.d.mts +0 -1
- package/dist/index-DpEKQcoR.d.cts +0 -1
- package/dist/index-DvuJXuAN.d.mts +0 -1
- package/dist/index-Iujpc9_6.d.mts +0 -1
- package/dist/index-PWQavSPf.d.mts +0 -1
- package/dist/index-_wQ5ClJU.d.cts +0 -1
- package/dist/index-dC-i2r_u.d.cts +0 -1
- package/dist/index-e6k85DKM.d.mts +0 -1
- package/dist/index-lIMqGGJz.d.mts +0 -1
- package/dist/index-sQecLSpR.d.cts +0 -1
- package/dist/index-sViox9YW.d.mts +0 -1
- package/dist/index.cjs +0 -0
- package/dist/index.d.cts +0 -2
- package/dist/index2.d.cts +0 -2
- package/dist/index3.d.cts +0 -4
- package/dist/index4.d.cts +0 -11
- package/dist/index5.d.cts +0 -1
- package/dist/input-DPB0cX2m.d.cts +0 -17
- package/dist/inputFields.d.cts +0 -83
- package/dist/intersperse-_0nQM5Rb.cjs +0 -26
- package/dist/intersperse-_0nQM5Rb.cjs.map +0 -1
- package/dist/layouts/LayoutLoadingShimmer/index.cjs +0 -139
- package/dist/layouts/LayoutLoadingShimmer/index.cjs.map +0 -1
- package/dist/layouts/LayoutLoadingShimmer/index.d.cts +0 -2
- package/dist/layouts/LayoutLoadingShimmer/index.mjs.map +0 -1
- package/dist/lib/ConfigContext.cjs +0 -15
- package/dist/lib/ConfigContext.cjs.map +0 -1
- package/dist/lib/ConfigContext.d.cts +0 -16
- package/dist/lib/GlobalStyles.cjs +0 -57
- package/dist/lib/GlobalStyles.cjs.map +0 -1
- package/dist/lib/GlobalStyles.d.cts +0 -8
- package/dist/lib/HeadlessAriaButton.cjs +0 -33
- package/dist/lib/HeadlessAriaButton.cjs.map +0 -1
- package/dist/lib/HeadlessAriaButton.d.cts +0 -12
- package/dist/lib/MiddleTruncatedText.cjs +0 -7
- package/dist/lib/MiddleTruncatedText.d.cts +0 -14
- package/dist/lib/PDSProvider.cjs +0 -13
- package/dist/lib/PDSProvider.cjs.map +0 -1
- package/dist/lib/PDSProvider.d.cts +0 -10
- package/dist/lib/TruncatedText.cjs +0 -39
- package/dist/lib/TruncatedText.cjs.map +0 -1
- package/dist/lib/TruncatedText.d.cts +0 -2
- package/dist/lib/TruncatedTextWithTooltip.cjs +0 -34
- package/dist/lib/TruncatedTextWithTooltip.cjs.map +0 -1
- package/dist/lib/TruncatedTextWithTooltip.d.cts +0 -15
- package/dist/lib/comboboxHelper.cjs +0 -46
- package/dist/lib/comboboxHelper.cjs.map +0 -1
- package/dist/lib/comboboxHelper.d.cts +0 -24
- package/dist/lib/copyTextToClipboard.cjs +0 -33
- package/dist/lib/copyTextToClipboard.cjs.map +0 -1
- package/dist/lib/copyTextToClipboard.d.cts +0 -4
- package/dist/lib/datePickerHelper.cjs +0 -36
- package/dist/lib/datePickerHelper.cjs.map +0 -1
- package/dist/lib/datePickerHelper.d.cts +0 -19
- package/dist/lib/message.cjs +0 -12
- package/dist/lib/message.cjs.map +0 -1
- package/dist/lib/message.d.cts +0 -2
- package/dist/lib/pseudoClass.cjs +0 -31
- package/dist/lib/pseudoClass.cjs.map +0 -1
- package/dist/lib/pseudoClass.d.cts +0 -45
- package/dist/lib/reorderItems.cjs +0 -38
- package/dist/lib/reorderItems.cjs.map +0 -1
- package/dist/lib/reorderItems.d.cts +0 -26
- package/dist/lib/selectHelper.cjs +0 -22
- package/dist/lib/selectHelper.cjs.map +0 -1
- package/dist/lib/selectHelper.d.cts +0 -14
- package/dist/lib/useControlled.cjs +0 -20
- package/dist/lib/useControlled.cjs.map +0 -1
- package/dist/lib/useControlled.d.cts +0 -16
- package/dist/lib/useIsOverflow.cjs +0 -58
- package/dist/lib/useIsOverflow.cjs.map +0 -1
- package/dist/lib/useIsOverflow.d.cts +0 -11
- package/dist/lib/useOutsideClick.cjs +0 -19
- package/dist/lib/useOutsideClick.cjs.map +0 -1
- package/dist/lib/useOutsideClick.d.cts +0 -13
- package/dist/lib/useScrollOverflow.cjs +0 -61
- package/dist/lib/useScrollOverflow.cjs.map +0 -1
- package/dist/lib/useScrollOverflow.d.cts +0 -36
- package/dist/lib/zindex.cjs +0 -26
- package/dist/lib/zindex.cjs.map +0 -1
- package/dist/lib/zindex.d.cts +0 -25
- package/dist/message-CMHvlPGn.d.mts +0 -9
- package/dist/mixins/focus.cjs +0 -39
- package/dist/mixins/focus.cjs.map +0 -1
- package/dist/mixins/focus.d.cts +0 -11
- package/dist/mixins/hoverable.cjs +0 -38
- package/dist/mixins/hoverable.cjs.map +0 -1
- package/dist/mixins/hoverable.d.cts +0 -16
- package/dist/mixins/input.cjs +0 -95
- package/dist/mixins/input.cjs.map +0 -1
- package/dist/mixins/input.d.cts +0 -2
- package/dist/mixins/menuItem.cjs +0 -110
- package/dist/mixins/menuItem.cjs.map +0 -1
- package/dist/mixins/menuItem.d.cts +0 -30
- package/dist/mixins/print/index.cjs +0 -25
- package/dist/mixins/print/index.cjs.map +0 -1
- package/dist/mixins/print/index.d.cts +0 -11
- package/dist/mixins/text.cjs +0 -93
- package/dist/mixins/text.cjs.map +0 -1
- package/dist/mixins/text.d.cts +0 -2
- package/dist/operators-Bo31xlc2.d.mts +0 -43
- package/dist/operators.d.cts +0 -2
- package/dist/text-PmH5oc61.d.cts +0 -14
- package/dist/theme-Cadb1xzQ.d.cts +0 -154
- package/dist/theme.cjs +0 -353
- package/dist/theme.cjs.map +0 -1
- package/dist/theme.d.cts +0 -2
- package/dist/types-D58IoRx6.d.mts +0 -158
- package/dist/types-D7ppqnNj.d.mts +0 -45
- package/dist/types-SYSKcZKW.d.cts +0 -25
- package/dist/types-TV9nVfSe.d.mts +0 -10
- package/dist/types.d.cts +0 -2
- package/dist/types2.d.cts +0 -2
- package/dist/types3.d.cts +0 -2
- package/dist/types4.d.cts +0 -2
- package/dist/useFilterStateV2-DbPwX5N1.d.cts +0 -93
- package/dist/useFilterStateV2.d.cts +0 -2
- package/dist/useFormField--Q8ZdpW5.d.cts +0 -30
- package/dist/useFormField-BZlArnsI.cjs +0 -37
- package/dist/useFormField-BZlArnsI.cjs.map +0 -1
- package/dist/useFormField.d.cts +0 -2
- package/dist/useFormGroup-Bmnzgq0S.cjs +0 -26
- package/dist/useFormGroup-Bmnzgq0S.cjs.map +0 -1
- package/dist/useFormGroup.d.cts +0 -18
- package/dist/useTableBoxDragAndDrop-BMo-iaUF.d.mts +0 -69
- package/dist/useTableBoxDragAndDrop.d.cts +0 -2
- package/dist/useTableColumns.d.cts +0 -72
- package/dist/useToggle-DARO917w.cjs +0 -27
- package/dist/useToggle-DARO917w.cjs.map +0 -1
- package/dist/utilities-BO_95qFA.d.mts +0 -9
- package/dist/utilities.d.cts +0 -2
- package/dist/utils/storybook.cjs +0 -12
- package/dist/utils/storybook.cjs.map +0 -1
- package/dist/utils/testing.cjs +0 -50
- package/dist/utils/testing.cjs.map +0 -1
- package/dist/utils/testing.d.cts +0 -18
- package/dist/validation-vLh3t2dk.d.mts +0 -51
- package/dist/validation.d.cts +0 -2
- package/dist/value-control-resolver-B9p25q3G.d.cts +0 -46
- package/dist/value-control-resolver.d.cts +0 -2
- package/dist/variables/color.cjs +0 -22
- package/dist/variables/color.cjs.map +0 -1
- package/dist/variables/color.d.cts +0 -19
- package/dist/variables/effect.cjs +0 -27
- package/dist/variables/effect.cjs.map +0 -1
- package/dist/variables/effect.d.cts +0 -21
- package/dist/variables/keyframes.cjs +0 -22
- package/dist/variables/keyframes.cjs.map +0 -1
- package/dist/variables/keyframes.d.cts +0 -8
- package/dist/variables/spacing.cjs +0 -10
- package/dist/variables/spacing.cjs.map +0 -1
- package/dist/variables/spacing.d.cts +0 -8
- package/dist/variables/text.cjs +0 -13
- package/dist/variables/text.cjs.map +0 -1
- package/dist/variables/text.d.cts +0 -10
- package/dist/variables/transitions.cjs +0 -24
- package/dist/variables/transitions.cjs.map +0 -1
- package/dist/variables/transitions.d.cts +0 -19
- /package/dist/{index--p6oQT9I.d.mts → index-0-W_aPej.d.mts} +0 -0
- /package/dist/{index-BIAn8oQh.d.cts → index-7in8TPrM.d.mts} +0 -0
- /package/dist/{index-BL32-cvv.d.cts → index-7rWKHdox.d.mts} +0 -0
- /package/dist/{index-BPSCxsMC.d.cts → index-B4woaFSm.d.mts} +0 -0
- /package/dist/{index-BR1oNnaF.d.cts → index-BINnViIh.d.mts} +0 -0
- /package/dist/{index-BXpMZvwA.d.cts → index-BNRXMhlr.d.mts} +0 -0
- /package/dist/{index-BYd3Btr1.d.mts → index-BO_854F2.d.mts} +0 -0
- /package/dist/{index-BhY1qu3m.d.cts → index-BOn0AAue.d.mts} +0 -0
- /package/dist/{index-BlwcRiXv.d.cts → index-CCt0lwyI.d.mts} +0 -0
- /package/dist/{index-C0NRIDsj2.d.cts → index-CREkvfw9.d.mts} +0 -0
- /package/dist/{index-C1ihAKnV.d.cts → index-CRo77wc3.d.mts} +0 -0
- /package/dist/{index-CDAfh8Ew.d.cts → index-Ci-uuV07.d.mts} +0 -0
- /package/dist/{index-CDGG7lCB.d.mts → index-CsuikFeJ.d.mts} +0 -0
- /package/dist/{index-CFG0_wK4.d.cts → index-CzUpNo0e.d.mts} +0 -0
- /package/dist/{index-CMuRFTR3.d.mts → index-DDdPqD_H.d.mts} +0 -0
- /package/dist/{index-CNxS4Tlu.d.mts → index-DeVKzGce.d.mts} +0 -0
- /package/dist/{index-CQ25UCod.d.cts → index-Es5nKSSL.d.mts} +0 -0
- /package/dist/{index-CWB6exYm.d.mts → index-FtE8MXJ_.d.mts} +0 -0
- /package/dist/{index-Cv0jeUQf2.d.cts → index-ehD5GjMH.d.mts} +0 -0
- /package/dist/{index-CwSIy_W-.d.cts → index-uMNhmxEh.d.mts} +0 -0
- /package/dist/{layouts → patterns}/LayoutLoadingShimmer/index.d.mts +0 -0
|
@@ -1,1370 +0,0 @@
|
|
|
1
|
-
const require_chunk = require("./chunk-CKQMccvm.cjs");
|
|
2
|
-
const require_mixins_focus = require("./mixins/focus.cjs");
|
|
3
|
-
require("./variables/effect.cjs");
|
|
4
|
-
require("./variables/transitions.cjs");
|
|
5
|
-
const require_mixins_text = require("./mixins/text.cjs");
|
|
6
|
-
const require_Stack = require("./Stack-UeifHn3c.cjs");
|
|
7
|
-
const require_Tooltip = require("./Tooltip-olP3rdUO.cjs");
|
|
8
|
-
const require_lib_reorderItems = require("./lib/reorderItems.cjs");
|
|
9
|
-
const require_lib_useScrollOverflow = require("./lib/useScrollOverflow.cjs");
|
|
10
|
-
const require_lib_zindex = require("./lib/zindex.cjs");
|
|
11
|
-
const require_IconButton = require("./IconButton-nlgjJQCS.cjs");
|
|
12
|
-
const require_DropdownMenu = require("./DropdownMenu-DnlQqTjs.cjs");
|
|
13
|
-
const require_useFormGroup = require("./useFormGroup-Bmnzgq0S.cjs");
|
|
14
|
-
const require_Table = require("./Table-DxLvJYWK.cjs");
|
|
15
|
-
const require_Combobox = require("./Combobox-COXvmxlM.cjs");
|
|
16
|
-
const require_Popover = require("./Popover-BzgMAhsX.cjs");
|
|
17
|
-
const require_FormControl = require("./FormControl-MkBXuUF6.cjs");
|
|
18
|
-
let _persona_design_tokens = require("@persona/design-tokens");
|
|
19
|
-
let styled_components = require("styled-components");
|
|
20
|
-
styled_components = require_chunk.__toESM(styled_components);
|
|
21
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
22
|
-
let react = require("react");
|
|
23
|
-
let _persona_icons = require("@persona/icons");
|
|
24
|
-
let _persona_icons_12px = require("@persona/icons/12px");
|
|
25
|
-
let lodash_fp_uniqueId_js = require("lodash/fp/uniqueId.js");
|
|
26
|
-
lodash_fp_uniqueId_js = require_chunk.__toESM(lodash_fp_uniqueId_js);
|
|
27
|
-
let _dnd_kit_core = require("@dnd-kit/core");
|
|
28
|
-
let _dnd_kit_sortable = require("@dnd-kit/sortable");
|
|
29
|
-
//#region components/TableBox/tableBoxKeyboardNavigation.ts
|
|
30
|
-
const INLINE_EDITOR_SELECTOR = "[data-tablebox-inline-edit-trigger], input[role=\"combobox\"]";
|
|
31
|
-
const findInlineEditor = (cell) => cell?.querySelector(INLINE_EDITOR_SELECTOR) ?? null;
|
|
32
|
-
const isCaretAtNavigationBoundary = (input, direction) => {
|
|
33
|
-
const { selectionStart, selectionEnd, value } = input;
|
|
34
|
-
if (selectionStart == null || selectionEnd == null || selectionStart !== selectionEnd) return false;
|
|
35
|
-
return direction === "left" ? selectionStart === 0 : selectionEnd === value.length;
|
|
36
|
-
};
|
|
37
|
-
const focusAdjacentInlineEditor = (target, direction) => {
|
|
38
|
-
const currentCell = target.closest("td");
|
|
39
|
-
const currentRow = currentCell?.closest("tr");
|
|
40
|
-
if (!(currentCell instanceof HTMLTableCellElement) || currentRow == null) return false;
|
|
41
|
-
if (direction === "up" || direction === "down") {
|
|
42
|
-
const adjacentRow = direction === "up" ? currentRow.previousElementSibling : currentRow.nextElementSibling;
|
|
43
|
-
if (!(adjacentRow instanceof HTMLTableRowElement)) return false;
|
|
44
|
-
const adjacentEditor = findInlineEditor(adjacentRow.cells.item(currentCell.cellIndex));
|
|
45
|
-
adjacentEditor?.focus();
|
|
46
|
-
return adjacentEditor != null;
|
|
47
|
-
}
|
|
48
|
-
let adjacentCell = direction === "left" ? currentCell.previousElementSibling : currentCell.nextElementSibling;
|
|
49
|
-
while (adjacentCell instanceof HTMLTableCellElement) {
|
|
50
|
-
const adjacentEditor = findInlineEditor(adjacentCell);
|
|
51
|
-
if (adjacentEditor != null) {
|
|
52
|
-
adjacentEditor.focus();
|
|
53
|
-
return true;
|
|
54
|
-
}
|
|
55
|
-
adjacentCell = direction === "left" ? adjacentCell.previousElementSibling : adjacentCell.nextElementSibling;
|
|
56
|
-
}
|
|
57
|
-
return false;
|
|
58
|
-
};
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region components/TableBox/InlineCombobox.tsx
|
|
61
|
-
const StyledCombobox = (0, styled_components.default)(require_Combobox.Combobox)`
|
|
62
|
-
border: none;
|
|
63
|
-
background-color: transparent;
|
|
64
|
-
|
|
65
|
-
/* Suppress the focus outline — it extends outside the input and is clipped
|
|
66
|
-
by the scroll container. Use && for specificity. */
|
|
67
|
-
&& input,
|
|
68
|
-
&& input:focus-visible:not(:disabled) {
|
|
69
|
-
outline: none;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
${({ $hideText }) => $hideText && `
|
|
73
|
-
input {
|
|
74
|
-
color: transparent;
|
|
75
|
-
caret-color: transparent;
|
|
76
|
-
}
|
|
77
|
-
input::placeholder {
|
|
78
|
-
color: transparent;
|
|
79
|
-
}
|
|
80
|
-
`}
|
|
81
|
-
`;
|
|
82
|
-
const ChildrenOverlay = styled_components.default.div`
|
|
83
|
-
position: absolute;
|
|
84
|
-
left: ${({ $hasLeadingError }) => $hasLeadingError ? _persona_design_tokens.Spacing[1] : _persona_design_tokens.Spacing[2]};
|
|
85
|
-
top: 50%;
|
|
86
|
-
transform: translateY(-50%);
|
|
87
|
-
z-index: 1;
|
|
88
|
-
pointer-events: none;
|
|
89
|
-
|
|
90
|
-
// ${_persona_design_tokens.Spacing[5]} matches the sm ComboboxInput padding-right, keeping the text clear of the caret.
|
|
91
|
-
${({ $truncate }) => $truncate && `
|
|
92
|
-
right: ${_persona_design_tokens.Spacing[5]};
|
|
93
|
-
`}
|
|
94
|
-
`;
|
|
95
|
-
const ComboboxWrapper = styled_components.default.div`
|
|
96
|
-
position: relative;
|
|
97
|
-
width: 100%;
|
|
98
|
-
`;
|
|
99
|
-
const InlineCombobox = ({ itemId, value, columnKey, inlineEditConfig, children, rowRef, hasLeadingError }) => {
|
|
100
|
-
const [isOpen, setIsOpen] = (0, react.useState)(false);
|
|
101
|
-
const context = (0, react.useContext)(TableBoxContext);
|
|
102
|
-
const setColumnWidthsLocked = context?.setColumnWidthsLocked;
|
|
103
|
-
const currentColumn = context?.columns?.find((c) => c.key === columnKey);
|
|
104
|
-
const placeholder = inlineEditConfig?.placeholder || currentColumn?.title || "";
|
|
105
|
-
const portalContainerRef = (inlineEditConfig?.fullWidthComboboxDropdown || false) && rowRef ? rowRef : void 0;
|
|
106
|
-
const showOverlay = !isOpen && !!children;
|
|
107
|
-
const handleOpenChange = (0, react.useCallback)((open) => {
|
|
108
|
-
setIsOpen(open);
|
|
109
|
-
setColumnWidthsLocked?.(open);
|
|
110
|
-
}, [setColumnWidthsLocked]);
|
|
111
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ComboboxWrapper, {
|
|
112
|
-
onKeyDownCapture: (event) => {
|
|
113
|
-
if (isOpen || event.key !== "ArrowLeft" && event.key !== "ArrowRight") return;
|
|
114
|
-
const direction = event.key === "ArrowLeft" ? "left" : "right";
|
|
115
|
-
if (!(event.target instanceof HTMLInputElement) || !isCaretAtNavigationBoundary(event.target, direction)) return;
|
|
116
|
-
if (focusAdjacentInlineEditor(event.currentTarget, direction)) {
|
|
117
|
-
event.preventDefault();
|
|
118
|
-
event.stopPropagation();
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
children: [showOverlay && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ChildrenOverlay, {
|
|
122
|
-
$hasLeadingError: hasLeadingError,
|
|
123
|
-
$truncate: inlineEditConfig?.truncateDisplay,
|
|
124
|
-
children
|
|
125
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledCombobox, {
|
|
126
|
-
$hideText: showOverlay,
|
|
127
|
-
value,
|
|
128
|
-
options: inlineEditConfig?.options || [],
|
|
129
|
-
onChange: (newValue) => {
|
|
130
|
-
if (inlineEditConfig?.onChange && newValue !== value && typeof newValue === "string") inlineEditConfig.onChange(itemId, newValue);
|
|
131
|
-
},
|
|
132
|
-
onOpenChange: handleOpenChange,
|
|
133
|
-
placeholder,
|
|
134
|
-
size: "sm",
|
|
135
|
-
portal: inlineEditConfig?.useComboboxPortal || false,
|
|
136
|
-
portalContainerRef
|
|
137
|
-
})]
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
//#endregion
|
|
141
|
-
//#region components/TableBox/TableBoxRowContext.ts
|
|
142
|
-
const TableBoxRowContext = (0, react.createContext)(null);
|
|
143
|
-
//#endregion
|
|
144
|
-
//#region components/TableBox/InlineInput.tsx
|
|
145
|
-
const sharedInputStyles = styled_components.css`
|
|
146
|
-
font: inherit;
|
|
147
|
-
color: inherit;
|
|
148
|
-
outline: none;
|
|
149
|
-
border: none;
|
|
150
|
-
padding: 0;
|
|
151
|
-
pointer-events: auto;
|
|
152
|
-
width: 100%;
|
|
153
|
-
background: transparent;
|
|
154
|
-
line-height: ${_persona_design_tokens.Typography.TextSmall.lineHeight};
|
|
155
|
-
`;
|
|
156
|
-
const InlineEditInput = styled_components.default.input`
|
|
157
|
-
${sharedInputStyles}
|
|
158
|
-
`;
|
|
159
|
-
const InlineEditTextarea = styled_components.default.textarea`
|
|
160
|
-
${sharedInputStyles}
|
|
161
|
-
resize: none;
|
|
162
|
-
overflow-y: auto;
|
|
163
|
-
min-height: ${_persona_design_tokens.Typography.TextSmall.lineHeight};
|
|
164
|
-
scrollbar-width: none;
|
|
165
|
-
`;
|
|
166
|
-
const InlineEditDisplay = styled_components.default.div`
|
|
167
|
-
cursor: text;
|
|
168
|
-
outline: none;
|
|
169
|
-
width: 100%;
|
|
170
|
-
height: 100%;
|
|
171
|
-
min-height: ${_persona_design_tokens.Typography.TextSmall.lineHeight};
|
|
172
|
-
line-height: ${_persona_design_tokens.Typography.TextSmall.lineHeight};
|
|
173
|
-
|
|
174
|
-
${({ $multiline }) => $multiline ? styled_components.css`
|
|
175
|
-
display: -webkit-box;
|
|
176
|
-
-webkit-line-clamp: 2;
|
|
177
|
-
-webkit-box-orient: vertical;
|
|
178
|
-
overflow: hidden;
|
|
179
|
-
text-overflow: ellipsis;
|
|
180
|
-
white-space: pre-wrap;
|
|
181
|
-
word-break: break-word;
|
|
182
|
-
` : styled_components.css`
|
|
183
|
-
white-space: nowrap;
|
|
184
|
-
overflow: hidden;
|
|
185
|
-
text-overflow: ellipsis;
|
|
186
|
-
`}
|
|
187
|
-
`;
|
|
188
|
-
const InlineInput = ({ itemId, value, columnKey, inlineEditConfig, onEditingEnd, children }) => {
|
|
189
|
-
const { columns, newRowId, setColumnWidthsLocked, scheduleCreateNewRowAfterCommit } = (0, react.useContext)(TableBoxContext) ?? {};
|
|
190
|
-
const rowContext = (0, react.useContext)(TableBoxRowContext);
|
|
191
|
-
const [isInlineEditing, setIsInlineEditing] = (0, react.useState)(itemId === newRowId && columnKey === columns?.[0]?.key);
|
|
192
|
-
const [editValue, setEditValue] = (0, react.useState)(value);
|
|
193
|
-
const inputRef = (0, react.useRef)(null);
|
|
194
|
-
const textareaRef = (0, react.useRef)(null);
|
|
195
|
-
const cancelledRef = (0, react.useRef)(false);
|
|
196
|
-
const isMultiline = inlineEditConfig?.multiline === true;
|
|
197
|
-
(0, react.useEffect)(() => {
|
|
198
|
-
return () => {
|
|
199
|
-
cancelledRef.current = false;
|
|
200
|
-
};
|
|
201
|
-
}, []);
|
|
202
|
-
(0, react.useLayoutEffect)(() => {
|
|
203
|
-
if (isInlineEditing && isMultiline && textareaRef.current) {
|
|
204
|
-
const textarea = textareaRef.current;
|
|
205
|
-
textarea.style.height = "auto";
|
|
206
|
-
textarea.style.height = `${textarea.scrollHeight}px`;
|
|
207
|
-
}
|
|
208
|
-
}, [
|
|
209
|
-
isInlineEditing,
|
|
210
|
-
editValue,
|
|
211
|
-
isMultiline
|
|
212
|
-
]);
|
|
213
|
-
(0, react.useEffect)(() => {
|
|
214
|
-
if (isInlineEditing && isMultiline && textareaRef.current) {
|
|
215
|
-
const length = textareaRef.current.value.length;
|
|
216
|
-
textareaRef.current.setSelectionRange(length, length);
|
|
217
|
-
}
|
|
218
|
-
}, [isInlineEditing, isMultiline]);
|
|
219
|
-
const placeholder = (0, react.useMemo)(() => {
|
|
220
|
-
const column = columns?.find((c) => c.key === columnKey);
|
|
221
|
-
return column?.inlineEditConfig?.placeholder || column?.title || "";
|
|
222
|
-
}, [columns, columnKey]);
|
|
223
|
-
const notifyEditingEnd = () => {
|
|
224
|
-
onEditingEnd?.();
|
|
225
|
-
rowContext?.onEditingEnd();
|
|
226
|
-
setColumnWidthsLocked?.(false);
|
|
227
|
-
};
|
|
228
|
-
const handleInlineEditKeyDown = (e) => {
|
|
229
|
-
const isFirstCell = columnKey === columns?.[0]?.key;
|
|
230
|
-
if ((e.key === "Delete" || e.key === "Backspace") && isFirstCell && editValue === "" && rowContext?.areOtherCellsBlank && rowContext.onDelete) {
|
|
231
|
-
e.preventDefault();
|
|
232
|
-
e.stopPropagation();
|
|
233
|
-
cancelledRef.current = true;
|
|
234
|
-
setColumnWidthsLocked?.(false);
|
|
235
|
-
if (!(focusAdjacentInlineEditor(e.currentTarget, "down") || focusAdjacentInlineEditor(e.currentTarget, "up"))) e.currentTarget.closest("table")?.focus();
|
|
236
|
-
rowContext.onDelete();
|
|
237
|
-
} else if (!isMultiline && (e.key === "ArrowUp" || e.key === "ArrowDown" || e.key === "ArrowLeft" || e.key === "ArrowRight")) {
|
|
238
|
-
const direction = e.key === "ArrowUp" ? "up" : e.key === "ArrowDown" ? "down" : e.key === "ArrowLeft" ? "left" : "right";
|
|
239
|
-
if ((direction === "up" || direction === "down" || e.currentTarget instanceof HTMLInputElement && isCaretAtNavigationBoundary(e.currentTarget, direction)) && focusAdjacentInlineEditor(e.currentTarget, direction)) {
|
|
240
|
-
e.preventDefault();
|
|
241
|
-
e.stopPropagation();
|
|
242
|
-
}
|
|
243
|
-
} else if (e.key === "Enter") if (isMultiline) {
|
|
244
|
-
if (e.ctrlKey || e.metaKey) {
|
|
245
|
-
e.preventDefault();
|
|
246
|
-
e.stopPropagation();
|
|
247
|
-
handleInlineEditConfirm();
|
|
248
|
-
notifyEditingEnd();
|
|
249
|
-
setIsInlineEditing(false);
|
|
250
|
-
}
|
|
251
|
-
} else {
|
|
252
|
-
e.preventDefault();
|
|
253
|
-
e.stopPropagation();
|
|
254
|
-
handleInlineEditConfirm();
|
|
255
|
-
notifyEditingEnd();
|
|
256
|
-
setIsInlineEditing(false);
|
|
257
|
-
const isLastCell = columnKey === columns?.at(-1)?.key;
|
|
258
|
-
const currentRow = e.currentTarget.closest("tr");
|
|
259
|
-
const isLastRow = currentRow != null && currentRow.nextElementSibling == null;
|
|
260
|
-
if (isLastCell && isLastRow) scheduleCreateNewRowAfterCommit?.();
|
|
261
|
-
}
|
|
262
|
-
else if (e.key === "Tab") handleInlineEditConfirm();
|
|
263
|
-
else if (e.key === "Escape") {
|
|
264
|
-
e.preventDefault();
|
|
265
|
-
e.stopPropagation();
|
|
266
|
-
handleInlineEditCancel();
|
|
267
|
-
}
|
|
268
|
-
};
|
|
269
|
-
const handleInlineEditConfirm = () => {
|
|
270
|
-
if (inlineEditConfig?.onChange && editValue !== value) inlineEditConfig.onChange(itemId, editValue);
|
|
271
|
-
};
|
|
272
|
-
const handleInlineEditCancel = () => {
|
|
273
|
-
cancelledRef.current = true;
|
|
274
|
-
setEditValue(value);
|
|
275
|
-
notifyEditingEnd();
|
|
276
|
-
setIsInlineEditing(false);
|
|
277
|
-
};
|
|
278
|
-
const handleInlineEditBlur = () => {
|
|
279
|
-
if (!cancelledRef.current) handleInlineEditConfirm();
|
|
280
|
-
cancelledRef.current = false;
|
|
281
|
-
setIsInlineEditing(false);
|
|
282
|
-
setColumnWidthsLocked?.(false);
|
|
283
|
-
};
|
|
284
|
-
return isInlineEditing ? isMultiline ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineEditTextarea, {
|
|
285
|
-
ref: textareaRef,
|
|
286
|
-
value: editValue,
|
|
287
|
-
onChange: (e) => setEditValue(e.target.value),
|
|
288
|
-
onBlur: handleInlineEditBlur,
|
|
289
|
-
onKeyDown: handleInlineEditKeyDown,
|
|
290
|
-
placeholder,
|
|
291
|
-
autoFocus: true,
|
|
292
|
-
rows: 1
|
|
293
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineEditInput, {
|
|
294
|
-
ref: inputRef,
|
|
295
|
-
value: editValue,
|
|
296
|
-
onChange: (e) => setEditValue(e.target.value),
|
|
297
|
-
onBlur: handleInlineEditBlur,
|
|
298
|
-
onKeyDown: handleInlineEditKeyDown,
|
|
299
|
-
placeholder,
|
|
300
|
-
autoFocus: true
|
|
301
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineEditDisplay, {
|
|
302
|
-
tabIndex: 0,
|
|
303
|
-
"data-tablebox-inline-edit-trigger": true,
|
|
304
|
-
$multiline: isMultiline,
|
|
305
|
-
onFocus: () => {
|
|
306
|
-
setEditValue(value);
|
|
307
|
-
setColumnWidthsLocked?.(true);
|
|
308
|
-
setIsInlineEditing(true);
|
|
309
|
-
},
|
|
310
|
-
children: children || value
|
|
311
|
-
});
|
|
312
|
-
};
|
|
313
|
-
//#endregion
|
|
314
|
-
//#region components/TableBox/TableBoxRowActions.tsx
|
|
315
|
-
const IconButtonWidth = 16;
|
|
316
|
-
const BackgroundFadeWidth = 12;
|
|
317
|
-
const RowActionsContainerWithFadeWidth = BackgroundFadeWidth + (parseInt(_persona_design_tokens.Spacing[1]) + IconButtonWidth + parseInt(_persona_design_tokens.Spacing[2]));
|
|
318
|
-
/**
|
|
319
|
-
* Container for row-level actions (`actions` menu and/or delete `X`). Used
|
|
320
|
-
* in two layouts:
|
|
321
|
-
*
|
|
322
|
-
* - **Dedicated trailing column** (`$inDedicatedColumn=true`, the default
|
|
323
|
-
* for horizontal-scroll mode): laid out in normal flow inside
|
|
324
|
-
* `PinnedActionsCell`.
|
|
325
|
-
* - **Overlaid in last data cell** (`$inDedicatedColumn=false`,
|
|
326
|
-
* `disableHorizontalScroll` mode): absolutely positioned on top of the
|
|
327
|
-
* last cell's content with a fade gradient so it overlaps text on hover.
|
|
328
|
-
*
|
|
329
|
-
* Other variant props:
|
|
330
|
-
* - `$hasCombobox` — last data column is an inline combobox; we use auto
|
|
331
|
-
* width so the caret↔first-action gap matches the action↔delete gap, and
|
|
332
|
-
* we drop the gradient so there's no fade running over the caret.
|
|
333
|
-
* - `$hasDelete` — fade the container in only on hover, mirroring the
|
|
334
|
-
* legacy "show delete on hover" behavior.
|
|
335
|
-
*/
|
|
336
|
-
const RowActionsContainer = styled_components.default.div`
|
|
337
|
-
width: ${({ $hasCombobox }) => $hasCombobox ? "auto" : `${RowActionsContainerWithFadeWidth}px`};
|
|
338
|
-
position: ${({ $hasCombobox, $inDedicatedColumn }) => $hasCombobox || $inDedicatedColumn ? "static" : "absolute"};
|
|
339
|
-
right: ${_persona_design_tokens.Spacing[2]};
|
|
340
|
-
top: 0;
|
|
341
|
-
height: 100%;
|
|
342
|
-
display: flex;
|
|
343
|
-
gap: ${_persona_design_tokens.Spacing[1]};
|
|
344
|
-
align-items: center;
|
|
345
|
-
justify-content: end;
|
|
346
|
-
transition: opacity ${"200ms"} ease-out;
|
|
347
|
-
background: linear-gradient(
|
|
348
|
-
to right,
|
|
349
|
-
transparent,
|
|
350
|
-
${_persona_design_tokens.Color.BackgroundPrimary} ${BackgroundFadeWidth}px
|
|
351
|
-
);
|
|
352
|
-
|
|
353
|
-
/* Combobox cells render actions inline next to the caret. The padding-left
|
|
354
|
-
keeps the caret↔first-action gap visually balanced with the gap between
|
|
355
|
-
the actions themselves. */
|
|
356
|
-
${({ $hasCombobox }) => $hasCombobox && styled_components.css`
|
|
357
|
-
background: none;
|
|
358
|
-
padding-right: ${_persona_design_tokens.Spacing[2]};
|
|
359
|
-
padding-left: ${_persona_design_tokens.Spacing[1]};
|
|
360
|
-
`}
|
|
361
|
-
|
|
362
|
-
/* PinnedActionsCell is transparent (so scrolling content can pass under it);
|
|
363
|
-
owning the right gutter here keeps the container's opaque gradient flush
|
|
364
|
-
to the cell's right edge. */
|
|
365
|
-
${({ $inDedicatedColumn, $hasCombobox }) => $inDedicatedColumn && !$hasCombobox && styled_components.css`
|
|
366
|
-
padding-right: ${_persona_design_tokens.Spacing[2]};
|
|
367
|
-
`}
|
|
368
|
-
|
|
369
|
-
/* Hide on hover only when delete is present (matches legacy behavior). */
|
|
370
|
-
${({ $hasDelete }) => $hasDelete && styled_components.css`
|
|
371
|
-
opacity: 0;
|
|
372
|
-
`}
|
|
373
|
-
|
|
374
|
-
/* Make room for both buttons; combobox cells use auto width so they can sit
|
|
375
|
-
inline next to the caret. */
|
|
376
|
-
${({ $hasActions, $hasDelete, $hasCombobox }) => $hasActions && $hasDelete && !$hasCombobox && styled_components.css`
|
|
377
|
-
width: ${RowActionsContainerWithFadeWidth + parseInt(_persona_design_tokens.Spacing[1]) + IconButtonWidth}px;
|
|
378
|
-
`}
|
|
379
|
-
`;
|
|
380
|
-
/**
|
|
381
|
-
* Renders the actions menu and/or delete icon button inside a
|
|
382
|
-
* `RowActionsContainer`. Used both as an absolute overlay inside the
|
|
383
|
-
* last data cell (fixed-layout mode) and as static content inside the
|
|
384
|
-
* dedicated sticky trailing column (horizontal scroll mode).
|
|
385
|
-
*/
|
|
386
|
-
const RowActions = ({ actions, onDelete, inDedicatedColumn, inCombobox }) => {
|
|
387
|
-
const hasActions = !!actions?.length;
|
|
388
|
-
if (!hasActions && !onDelete) return null;
|
|
389
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(RowActionsContainer, {
|
|
390
|
-
$hasActions: hasActions,
|
|
391
|
-
$hasDelete: !!onDelete,
|
|
392
|
-
$hasCombobox: inCombobox,
|
|
393
|
-
$inDedicatedColumn: inDedicatedColumn,
|
|
394
|
-
onClick: (e) => e.stopPropagation(),
|
|
395
|
-
children: [hasActions && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DropdownMenu.DropdownMenu_default, {
|
|
396
|
-
portal: true,
|
|
397
|
-
trigger: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_IconButton.IconButton, {
|
|
398
|
-
"aria-label": "Actions",
|
|
399
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_persona_icons_12px.MoreIcon, {})
|
|
400
|
-
}),
|
|
401
|
-
children: actions?.map(({ label, onClick, ...rest }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_DropdownMenu.DropdownMenu_default.Item, {
|
|
402
|
-
...rest,
|
|
403
|
-
onClick,
|
|
404
|
-
size: "sm",
|
|
405
|
-
children: label
|
|
406
|
-
}, label))
|
|
407
|
-
}), onDelete && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_IconButton.IconButton, {
|
|
408
|
-
"aria-label": "Delete",
|
|
409
|
-
onClick: onDelete,
|
|
410
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_persona_icons_12px.XIcon, {})
|
|
411
|
-
})]
|
|
412
|
-
});
|
|
413
|
-
};
|
|
414
|
-
//#endregion
|
|
415
|
-
//#region components/TableBox/useDelayedInlineEditError.ts
|
|
416
|
-
const ERROR_DELAY_MS = 500;
|
|
417
|
-
const isEditableTarget = (target) => target instanceof HTMLElement && (target.matches("input, textarea") || target.isContentEditable);
|
|
418
|
-
const useDelayedInlineEditError = (errorText) => {
|
|
419
|
-
const errorTimerRef = (0, react.useRef)(null);
|
|
420
|
-
const lastEditingEndAtRef = (0, react.useRef)(null);
|
|
421
|
-
const isEditingRef = (0, react.useRef)(false);
|
|
422
|
-
const errorTextRef = (0, react.useRef)(errorText);
|
|
423
|
-
errorTextRef.current = errorText;
|
|
424
|
-
const [isErrorVisible, setIsErrorVisible] = (0, react.useState)(Boolean(errorText));
|
|
425
|
-
const clearErrorTimer = (0, react.useCallback)(() => {
|
|
426
|
-
if (errorTimerRef.current != null) {
|
|
427
|
-
clearTimeout(errorTimerRef.current);
|
|
428
|
-
errorTimerRef.current = null;
|
|
429
|
-
}
|
|
430
|
-
}, []);
|
|
431
|
-
const scheduleError = (0, react.useCallback)((delay = ERROR_DELAY_MS) => {
|
|
432
|
-
clearErrorTimer();
|
|
433
|
-
if (!errorTextRef.current) return;
|
|
434
|
-
errorTimerRef.current = setTimeout(() => {
|
|
435
|
-
if (errorTextRef.current && !isEditingRef.current) setIsErrorVisible(true);
|
|
436
|
-
errorTimerRef.current = null;
|
|
437
|
-
}, delay);
|
|
438
|
-
}, [clearErrorTimer]);
|
|
439
|
-
(0, react.useEffect)(() => {
|
|
440
|
-
if (!errorText) {
|
|
441
|
-
clearErrorTimer();
|
|
442
|
-
setIsErrorVisible(false);
|
|
443
|
-
return;
|
|
444
|
-
}
|
|
445
|
-
if (isEditingRef.current) {
|
|
446
|
-
setIsErrorVisible(false);
|
|
447
|
-
return;
|
|
448
|
-
}
|
|
449
|
-
if (lastEditingEndAtRef.current == null) {
|
|
450
|
-
clearErrorTimer();
|
|
451
|
-
setIsErrorVisible(true);
|
|
452
|
-
} else if (!isErrorVisible) {
|
|
453
|
-
const elapsed = Date.now() - lastEditingEndAtRef.current;
|
|
454
|
-
scheduleError(Math.max(0, ERROR_DELAY_MS - elapsed));
|
|
455
|
-
}
|
|
456
|
-
}, [
|
|
457
|
-
clearErrorTimer,
|
|
458
|
-
errorText,
|
|
459
|
-
isErrorVisible,
|
|
460
|
-
scheduleError
|
|
461
|
-
]);
|
|
462
|
-
(0, react.useEffect)(() => clearErrorTimer, [clearErrorTimer]);
|
|
463
|
-
const onFocus = (0, react.useCallback)((event) => {
|
|
464
|
-
if (!isEditableTarget(event.target)) return;
|
|
465
|
-
isEditingRef.current = true;
|
|
466
|
-
lastEditingEndAtRef.current = null;
|
|
467
|
-
clearErrorTimer();
|
|
468
|
-
setIsErrorVisible(false);
|
|
469
|
-
}, [clearErrorTimer]);
|
|
470
|
-
const onEditingEnd = (0, react.useCallback)(() => {
|
|
471
|
-
if (!isEditingRef.current) return;
|
|
472
|
-
isEditingRef.current = false;
|
|
473
|
-
lastEditingEndAtRef.current = Date.now();
|
|
474
|
-
scheduleError();
|
|
475
|
-
}, [scheduleError]);
|
|
476
|
-
return {
|
|
477
|
-
isErrorVisible,
|
|
478
|
-
onBlur: (0, react.useCallback)((event) => {
|
|
479
|
-
if (!isEditableTarget(event.target)) return;
|
|
480
|
-
onEditingEnd();
|
|
481
|
-
}, [onEditingEnd]),
|
|
482
|
-
onEditingEnd,
|
|
483
|
-
onFocus
|
|
484
|
-
};
|
|
485
|
-
};
|
|
486
|
-
//#endregion
|
|
487
|
-
//#region components/TableBox/TableBoxCell.tsx
|
|
488
|
-
const CELL_VERTICAL_PADDING = _persona_design_tokens.Spacing[1];
|
|
489
|
-
const CELL_HEIGHT = `calc(${_persona_design_tokens.Typography.TextSmall.lineHeight} + (${CELL_VERTICAL_PADDING} * 2))`;
|
|
490
|
-
const StyledCell = (0, styled_components.default)(require_Table.TableCell)`
|
|
491
|
-
${require_mixins_text.paragraphMixins.sm};
|
|
492
|
-
// height acts as min-height for table cells
|
|
493
|
-
height: ${CELL_HEIGHT};
|
|
494
|
-
padding: ${({ $noPadding }) => $noPadding ? _persona_design_tokens.Spacing[0] : `${CELL_VERTICAL_PADDING} ${_persona_design_tokens.Spacing[2]}`};
|
|
495
|
-
border-bottom: 1px solid ${_persona_design_tokens.Color.BorderHairline};
|
|
496
|
-
position: relative;
|
|
497
|
-
`;
|
|
498
|
-
const StyledCellContent = styled_components.default.div`
|
|
499
|
-
white-space: nowrap;
|
|
500
|
-
overflow: hidden;
|
|
501
|
-
text-overflow: ellipsis;
|
|
502
|
-
flex-grow: 1;
|
|
503
|
-
min-width: 0;
|
|
504
|
-
`;
|
|
505
|
-
const CellErrorContainer = styled_components.default.span`
|
|
506
|
-
display: inline-block;
|
|
507
|
-
line-height: ${_persona_design_tokens.Typography.TextSmall.lineHeight};
|
|
508
|
-
margin-right: ${({ $inset }) => $inset ? _persona_design_tokens.Spacing[0] : _persona_design_tokens.Spacing[1]};
|
|
509
|
-
padding-left: ${({ $inset }) => $inset ? _persona_design_tokens.Spacing[2] : _persona_design_tokens.Spacing[0]};
|
|
510
|
-
position: relative;
|
|
511
|
-
/* Optically center the 12px alert glyph against the text's visual bounds. */
|
|
512
|
-
top: 1px;
|
|
513
|
-
`;
|
|
514
|
-
const TableBoxCell = ({ children, itemId = "", value = "", columnKey, errorText, isLastCell = false, actions, onDelete, inlineEditConfigOverride, rowErrorText, onBlur, onFocus, ...props }) => {
|
|
515
|
-
const context = (0, react.useContext)(TableBoxContext);
|
|
516
|
-
const rowContext = (0, react.useContext)(TableBoxRowContext);
|
|
517
|
-
const { isErrorVisible, onBlur: handleDelayedErrorBlur, onEditingEnd: handleDelayedErrorEditingEnd, onFocus: handleDelayedErrorFocus } = useDelayedInlineEditError(errorText);
|
|
518
|
-
if (context == null) throw new Error("TableBox context is not set");
|
|
519
|
-
const columnConfig = context.columns.find((c) => c.key === columnKey)?.inlineEditConfig;
|
|
520
|
-
let inlineEditConfig = context.disabled || columnConfig == null ? void 0 : inlineEditConfigOverride ? {
|
|
521
|
-
...columnConfig,
|
|
522
|
-
...inlineEditConfigOverride
|
|
523
|
-
} : columnConfig;
|
|
524
|
-
if (inlineEditConfig?.type === "combobox" && (context.hasHorizontalOverflow || inlineEditConfig?.fullWidthComboboxDropdown)) inlineEditConfig = {
|
|
525
|
-
...inlineEditConfig,
|
|
526
|
-
useComboboxPortal: true
|
|
527
|
-
};
|
|
528
|
-
const handleDelete = () => {
|
|
529
|
-
if (onDelete && itemId) onDelete(itemId);
|
|
530
|
-
};
|
|
531
|
-
const handleFocus = (event) => {
|
|
532
|
-
handleDelayedErrorFocus(event);
|
|
533
|
-
onFocus?.(event);
|
|
534
|
-
};
|
|
535
|
-
const handleBlur = (event) => {
|
|
536
|
-
handleDelayedErrorBlur(event);
|
|
537
|
-
onBlur?.(event);
|
|
538
|
-
};
|
|
539
|
-
const visibleErrorText = isErrorVisible && errorText ? errorText : rowErrorText;
|
|
540
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledCell, {
|
|
541
|
-
...props,
|
|
542
|
-
$noPadding: inlineEditConfig?.type === "combobox",
|
|
543
|
-
tabIndex: -1,
|
|
544
|
-
onBlur: handleBlur,
|
|
545
|
-
onFocus: handleFocus,
|
|
546
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Stack.HStack, {
|
|
547
|
-
align: "center",
|
|
548
|
-
spacing: _persona_design_tokens.Spacing[0],
|
|
549
|
-
children: [
|
|
550
|
-
visibleErrorText != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CellErrorContainer, {
|
|
551
|
-
$inset: inlineEditConfig?.type === "combobox",
|
|
552
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Tooltip.Tooltip, {
|
|
553
|
-
"aria-label": `Error: ${visibleErrorText}`,
|
|
554
|
-
iconTrigger: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_persona_icons_12px.CircleAlertIcon, {
|
|
555
|
-
color: _persona_design_tokens.Color.BorderIconDanger,
|
|
556
|
-
size: "12"
|
|
557
|
-
}),
|
|
558
|
-
side: "top",
|
|
559
|
-
size: "sm",
|
|
560
|
-
children: visibleErrorText
|
|
561
|
-
})
|
|
562
|
-
}),
|
|
563
|
-
inlineEditConfig ? inlineEditConfig.type === "combobox" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineCombobox, {
|
|
564
|
-
itemId,
|
|
565
|
-
value,
|
|
566
|
-
columnKey,
|
|
567
|
-
inlineEditConfig,
|
|
568
|
-
rowRef: rowContext?.rowRef,
|
|
569
|
-
hasLeadingError: visibleErrorText != null,
|
|
570
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledCellContent, { children })
|
|
571
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InlineInput, {
|
|
572
|
-
itemId,
|
|
573
|
-
value,
|
|
574
|
-
columnKey,
|
|
575
|
-
inlineEditConfig,
|
|
576
|
-
onEditingEnd: handleDelayedErrorEditingEnd,
|
|
577
|
-
children
|
|
578
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledCellContent, { children }),
|
|
579
|
-
isLastCell && !context.disabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActions, {
|
|
580
|
-
actions,
|
|
581
|
-
onDelete: onDelete ? handleDelete : void 0,
|
|
582
|
-
inCombobox: inlineEditConfig?.type === "combobox"
|
|
583
|
-
})
|
|
584
|
-
]
|
|
585
|
-
})
|
|
586
|
-
});
|
|
587
|
-
};
|
|
588
|
-
//#endregion
|
|
589
|
-
//#region components/TableBox/TableBoxRow.tsx
|
|
590
|
-
const StyledRow = (0, styled_components.default)(require_Table.TableRow)`
|
|
591
|
-
cursor: ${({ $isSelectable }) => $isSelectable ? "pointer" : "default"};
|
|
592
|
-
position: relative;
|
|
593
|
-
/* Give every row a solid background so sticky first-column cells (which
|
|
594
|
-
inherit the row's background) remain opaque during horizontal scroll. */
|
|
595
|
-
background-color: ${_persona_design_tokens.Color.BackgroundPrimary};
|
|
596
|
-
|
|
597
|
-
/* Dim the dragged row in place. A floating clone rendered by @dnd-kit's
|
|
598
|
-
DragOverlay provides the fully-opaque representation that follows the
|
|
599
|
-
pointer. */
|
|
600
|
-
${({ $isDragging }) => $isDragging && styled_components.css`
|
|
601
|
-
opacity: 0.5;
|
|
602
|
-
`}
|
|
603
|
-
|
|
604
|
-
/* 2px brand-colored drop indicator applied to each cell via inset
|
|
605
|
-
box-shadow so the line spans the full row width without affecting
|
|
606
|
-
layout. box-shadow on <td> renders reliably across modern browsers,
|
|
607
|
-
unlike pseudo-elements on <tr>. */
|
|
608
|
-
${({ $dropIndicatorPosition, theme }) => $dropIndicatorPosition === "top" && styled_components.css`
|
|
609
|
-
td {
|
|
610
|
-
box-shadow: inset 0 2px 0 ${theme.color.text.brand};
|
|
611
|
-
}
|
|
612
|
-
`}
|
|
613
|
-
|
|
614
|
-
${({ $dropIndicatorPosition, theme }) => $dropIndicatorPosition === "bottom" && styled_components.css`
|
|
615
|
-
td {
|
|
616
|
-
box-shadow: inset 0 -2px 0 ${theme.color.text.brand};
|
|
617
|
-
}
|
|
618
|
-
`}
|
|
619
|
-
|
|
620
|
-
${require_Combobox.CaretButton} {
|
|
621
|
-
opacity: 0;
|
|
622
|
-
transition: opacity ${"200ms"} ease-out;
|
|
623
|
-
|
|
624
|
-
/* Allow button to shrink to caret SVG height and width, and adjust alignment to remain vertically centered */
|
|
625
|
-
width: auto;
|
|
626
|
-
height: auto;
|
|
627
|
-
top: 50%;
|
|
628
|
-
transform: translateY(-50%);
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
&:last-child {
|
|
632
|
-
td {
|
|
633
|
-
border-bottom: none;
|
|
634
|
-
&:first-child {
|
|
635
|
-
border-bottom-left-radius: ${_persona_design_tokens.BorderRadius.Md};
|
|
636
|
-
}
|
|
637
|
-
&:last-child {
|
|
638
|
-
border-bottom-right-radius: ${_persona_design_tokens.BorderRadius.Md};
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
&[aria-selected='true'] {
|
|
644
|
-
background: ${({ theme }) => theme.color.background.highlight};
|
|
645
|
-
color: ${({ theme }) => theme.color.text.brand};
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
&:hover:not([aria-selected='true']) {
|
|
649
|
-
cursor: ${({ $isSelectable }) => $isSelectable ? "pointer" : "default"};
|
|
650
|
-
color: ${({ theme }) => theme.color.text.primary};
|
|
651
|
-
background: ${_persona_design_tokens.Color.BackgroundSecondary};
|
|
652
|
-
|
|
653
|
-
${RowActionsContainer} {
|
|
654
|
-
opacity: 1;
|
|
655
|
-
background: linear-gradient(to right, transparent, ${_persona_design_tokens.Color.BackgroundSecondary} 12px);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
${require_Combobox.CaretButton} {
|
|
659
|
-
opacity: 1;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
&:has(input:focus),
|
|
664
|
-
&:has(textarea:focus),
|
|
665
|
-
&:has(input[role='combobox'][aria-expanded='true']),
|
|
666
|
-
&:has(input:focus):hover,
|
|
667
|
-
&:has(textarea:focus):hover,
|
|
668
|
-
&:has(input[role='combobox'][aria-expanded='true']):hover,
|
|
669
|
-
&:has(button:focus),
|
|
670
|
-
&:has(button:focus):hover {
|
|
671
|
-
color: ${({ theme }) => theme.color.text.brand};
|
|
672
|
-
background-color: ${({ theme }) => theme.color.background.highlight};
|
|
673
|
-
|
|
674
|
-
${RowActionsContainer} {
|
|
675
|
-
opacity: 1;
|
|
676
|
-
background: linear-gradient(
|
|
677
|
-
to right,
|
|
678
|
-
transparent,
|
|
679
|
-
${({ theme }) => theme.color.background.highlight} ${parseInt(_persona_design_tokens.Spacing[3])}px
|
|
680
|
-
);
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
${require_Combobox.CaretButton} {
|
|
684
|
-
opacity: 1;
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
|
|
688
|
-
/* In fixed-layout mode the actions overlay lives inside the furthest-right
|
|
689
|
-
column's cell, so revealing the delete (X) on focus would park it on top
|
|
690
|
-
of the text being edited. While that column's inline input holds focus,
|
|
691
|
-
keep it hidden; hovering the row still brings it back. */
|
|
692
|
-
&:not(:hover):has(
|
|
693
|
-
td:last-child :is(input:not([role='combobox']), textarea):focus
|
|
694
|
-
) {
|
|
695
|
-
${RowActionsContainer} {
|
|
696
|
-
opacity: 0;
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
`;
|
|
700
|
-
const DragHandleCell = (0, styled_components.default)(require_Table.TableCell)`
|
|
701
|
-
width: 24px;
|
|
702
|
-
padding: ${_persona_design_tokens.Spacing[0]} ${_persona_design_tokens.Spacing[1]};
|
|
703
|
-
border-bottom: 1px solid ${_persona_design_tokens.Color.BorderHairline};
|
|
704
|
-
vertical-align: middle;
|
|
705
|
-
text-align: center;
|
|
706
|
-
`;
|
|
707
|
-
const DragHandleButton = styled_components.default.button.attrs({ type: "button" })`
|
|
708
|
-
background: none;
|
|
709
|
-
border: none;
|
|
710
|
-
padding: 0;
|
|
711
|
-
display: inline-flex;
|
|
712
|
-
align-items: center;
|
|
713
|
-
justify-content: center;
|
|
714
|
-
cursor: grab;
|
|
715
|
-
touch-action: none;
|
|
716
|
-
color: ${_persona_design_tokens.Color.TextSecondary};
|
|
717
|
-
${require_mixins_focus.focusOutline}
|
|
718
|
-
|
|
719
|
-
&:hover {
|
|
720
|
-
color: ${_persona_design_tokens.Color.TextPrimary};
|
|
721
|
-
}
|
|
722
|
-
|
|
723
|
-
&:active {
|
|
724
|
-
cursor: grabbing;
|
|
725
|
-
}
|
|
726
|
-
`;
|
|
727
|
-
const DropdownPopoverHeading = styled_components.default.div`
|
|
728
|
-
${_persona_design_tokens.Typography.TextSmallBold};
|
|
729
|
-
border-bottom: 1px solid ${_persona_design_tokens.Color.BorderHairline};
|
|
730
|
-
padding: ${_persona_design_tokens.Spacing[2]} ${_persona_design_tokens.Spacing[3]} ${_persona_design_tokens.Spacing[1]};
|
|
731
|
-
`;
|
|
732
|
-
const DropdownPopoverContent = (0, styled_components.default)(require_Stack.Stack)`
|
|
733
|
-
min-width: var(--radix-popover-trigger-width);
|
|
734
|
-
padding: ${_persona_design_tokens.Spacing[3]};
|
|
735
|
-
|
|
736
|
-
${require_FormControl.Container} {
|
|
737
|
-
min-width: 0;
|
|
738
|
-
}
|
|
739
|
-
`;
|
|
740
|
-
const DropdownPopoverFooter = styled_components.default.div`
|
|
741
|
-
border-top: 1px solid ${_persona_design_tokens.Color.BorderHairline};
|
|
742
|
-
padding: ${_persona_design_tokens.Spacing[1]};
|
|
743
|
-
`;
|
|
744
|
-
/**
|
|
745
|
-
* Computes the drop-indicator position for a sortable row. Direction mirrors
|
|
746
|
-
* `HoverCardPropertiesEditTable` / `ListBox`: dragging from above places the
|
|
747
|
-
* line on the hovered row's bottom edge, dragging from below places it on the
|
|
748
|
-
* top edge. The dragged row itself never shows an indicator.
|
|
749
|
-
*
|
|
750
|
-
* `closestCenter` has a "dead zone" while the pointer is still over the
|
|
751
|
-
* dragged row's own slot (`overIndex === activeIndex`). We use the drag
|
|
752
|
-
* direction to show the indicator on the immediate neighbor so the
|
|
753
|
-
* "immediately before/after original" positions still get feedback.
|
|
754
|
-
*/
|
|
755
|
-
const getDropIndicatorPosition = ({ isDragging, index, activeIndex, overIndex, draggedDirection }) => {
|
|
756
|
-
if (isDragging || activeIndex === -1) return;
|
|
757
|
-
if (overIndex === index && overIndex !== activeIndex) return activeIndex < index ? "bottom" : "top";
|
|
758
|
-
if (overIndex === activeIndex) {
|
|
759
|
-
if (draggedDirection === "up" && index === activeIndex - 1) return "bottom";
|
|
760
|
-
if (draggedDirection === "down" && index === activeIndex + 1) return "top";
|
|
761
|
-
}
|
|
762
|
-
};
|
|
763
|
-
/**
|
|
764
|
-
* Inner row component used when drag-and-drop is enabled on the parent
|
|
765
|
-
* TableBox. Subscribes to the surrounding SortableContext via useSortable and
|
|
766
|
-
* renders a leading drag-handle cell.
|
|
767
|
-
*/
|
|
768
|
-
const SortableTableBoxRowContent = ({ id, isSelected, isSelectable, onClick, rowRef, draggedDirection, children, ...props }) => {
|
|
769
|
-
const { attributes, listeners, setNodeRef, isDragging, activeIndex, overIndex, index } = (0, _dnd_kit_sortable.useSortable)({ id: String(id) });
|
|
770
|
-
const setRefs = (element) => {
|
|
771
|
-
rowRef.current = element;
|
|
772
|
-
setNodeRef(element);
|
|
773
|
-
};
|
|
774
|
-
const dropIndicatorPosition = getDropIndicatorPosition({
|
|
775
|
-
isDragging,
|
|
776
|
-
index,
|
|
777
|
-
activeIndex,
|
|
778
|
-
overIndex,
|
|
779
|
-
draggedDirection
|
|
780
|
-
});
|
|
781
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledRow, {
|
|
782
|
-
...props,
|
|
783
|
-
ref: setRefs,
|
|
784
|
-
id: String(id),
|
|
785
|
-
onClick,
|
|
786
|
-
disableHoverBackground: true,
|
|
787
|
-
"aria-selected": isSelected,
|
|
788
|
-
$isSelectable: isSelectable,
|
|
789
|
-
$isDragging: isDragging,
|
|
790
|
-
$dropIndicatorPosition: dropIndicatorPosition,
|
|
791
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DragHandleCell, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DragHandleButton, {
|
|
792
|
-
"aria-label": "Drag to reorder",
|
|
793
|
-
...attributes,
|
|
794
|
-
...listeners,
|
|
795
|
-
onClick: (e) => e.stopPropagation(),
|
|
796
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_persona_icons.DragIcon, {})
|
|
797
|
-
}) }), children]
|
|
798
|
-
});
|
|
799
|
-
};
|
|
800
|
-
const TableBoxRow = ({ children, actions, onDelete, errorText, id, dropdownFormFields, dropdownContent, dropdownHeadingText, dropdownFooter, onBlur, onFocus, ...props }) => {
|
|
801
|
-
const context = (0, react.useContext)(TableBoxContext);
|
|
802
|
-
const isSelected = context?.selectedKey === id;
|
|
803
|
-
const isSelectable = context?.selectionMode === "single";
|
|
804
|
-
const isReorderable = context?.isReorderable ?? false;
|
|
805
|
-
const rowRegistry = context?.rowRegistry ?? null;
|
|
806
|
-
const draggedDirection = context?.draggedDirection ?? null;
|
|
807
|
-
const hasActionsColumn = context?.hasActionsColumn ?? false;
|
|
808
|
-
const isDisabled = context?.disabled ?? false;
|
|
809
|
-
const rowRef = (0, react.useRef)(null);
|
|
810
|
-
const { isErrorVisible, onBlur: handleDelayedErrorBlur, onEditingEnd: handleDelayedErrorEditingEnd, onFocus: handleDelayedErrorFocus } = useDelayedInlineEditError(errorText);
|
|
811
|
-
const effectiveActions = isDisabled ? void 0 : actions;
|
|
812
|
-
const effectiveOnDelete = isDisabled ? void 0 : onDelete;
|
|
813
|
-
const areOtherCellsBlank = react.Children.toArray(children).filter((child) => (0, react.isValidElement)(child)).slice(1).every((cell) => cell.props.value === "");
|
|
814
|
-
const handleFocus = (event) => {
|
|
815
|
-
handleDelayedErrorFocus(event);
|
|
816
|
-
onFocus?.(event);
|
|
817
|
-
};
|
|
818
|
-
const handleBlur = (event) => {
|
|
819
|
-
handleDelayedErrorBlur(event);
|
|
820
|
-
onBlur?.(event);
|
|
821
|
-
};
|
|
822
|
-
const handleClick = () => {
|
|
823
|
-
if (context?.onRowClick && id && isSelectable) context.onRowClick(id);
|
|
824
|
-
};
|
|
825
|
-
const handleDelete = (0, react.useCallback)(() => {
|
|
826
|
-
if (effectiveOnDelete && id != null) effectiveOnDelete(id);
|
|
827
|
-
}, [effectiveOnDelete, id]);
|
|
828
|
-
const rowContextValue = (0, react.useMemo)(() => ({
|
|
829
|
-
rowRef,
|
|
830
|
-
onDelete: effectiveOnDelete && id != null ? handleDelete : void 0,
|
|
831
|
-
onEditingEnd: handleDelayedErrorEditingEnd,
|
|
832
|
-
areOtherCellsBlank
|
|
833
|
-
}), [
|
|
834
|
-
areOtherCellsBlank,
|
|
835
|
-
effectiveOnDelete,
|
|
836
|
-
handleDelayedErrorEditingEnd,
|
|
837
|
-
handleDelete,
|
|
838
|
-
id
|
|
839
|
-
]);
|
|
840
|
-
const lastColumnIsCombobox = context?.columns?.at(-1)?.inlineEditConfig?.type === "combobox";
|
|
841
|
-
const trailingActionsCell = (0, react.useMemo)(() => hasActionsColumn ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PinnedActionsCell, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowActions, {
|
|
842
|
-
actions: effectiveActions,
|
|
843
|
-
onDelete: effectiveOnDelete ? handleDelete : void 0,
|
|
844
|
-
inDedicatedColumn: true,
|
|
845
|
-
inCombobox: lastColumnIsCombobox
|
|
846
|
-
}) }) : null, [
|
|
847
|
-
hasActionsColumn,
|
|
848
|
-
effectiveActions,
|
|
849
|
-
effectiveOnDelete,
|
|
850
|
-
handleDelete,
|
|
851
|
-
lastColumnIsCombobox
|
|
852
|
-
]);
|
|
853
|
-
const renderedChildren = (0, react.useMemo)(() => {
|
|
854
|
-
if (hasActionsColumn && !isErrorVisible) return children;
|
|
855
|
-
const childrenArray = react.Children.toArray(children);
|
|
856
|
-
const firstChildIndex = isErrorVisible ? childrenArray.findIndex(react.isValidElement) : -1;
|
|
857
|
-
const lastChildIndex = childrenArray.length - 1;
|
|
858
|
-
return childrenArray.map((child, index) => {
|
|
859
|
-
if (!(0, react.isValidElement)(child)) return child;
|
|
860
|
-
const isFirstCell = index === firstChildIndex;
|
|
861
|
-
const isLastCell = !hasActionsColumn && index === lastChildIndex;
|
|
862
|
-
if (!isFirstCell && !isLastCell) return child;
|
|
863
|
-
return (0, react.cloneElement)(child, {
|
|
864
|
-
...isFirstCell && { rowErrorText: errorText },
|
|
865
|
-
...isLastCell && {
|
|
866
|
-
isLastCell: true,
|
|
867
|
-
actions: effectiveActions,
|
|
868
|
-
onDelete: effectiveOnDelete
|
|
869
|
-
},
|
|
870
|
-
...isLastCell && id != null && { itemId: String(id) }
|
|
871
|
-
});
|
|
872
|
-
});
|
|
873
|
-
}, [
|
|
874
|
-
hasActionsColumn,
|
|
875
|
-
children,
|
|
876
|
-
effectiveActions,
|
|
877
|
-
effectiveOnDelete,
|
|
878
|
-
errorText,
|
|
879
|
-
id,
|
|
880
|
-
isErrorVisible
|
|
881
|
-
]);
|
|
882
|
-
const rowChildrenWithContext = (0, react.useMemo)(() => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(TableBoxRowContext.Provider, {
|
|
883
|
-
value: rowContextValue,
|
|
884
|
-
children: [renderedChildren, trailingActionsCell]
|
|
885
|
-
}), [
|
|
886
|
-
renderedChildren,
|
|
887
|
-
trailingActionsCell,
|
|
888
|
-
rowContextValue
|
|
889
|
-
]);
|
|
890
|
-
(0, react.useEffect)(() => {
|
|
891
|
-
if (!rowRegistry || id == null) return;
|
|
892
|
-
const key = String(id);
|
|
893
|
-
const registry = rowRegistry.current;
|
|
894
|
-
registry.set(key, rowChildrenWithContext);
|
|
895
|
-
return () => {
|
|
896
|
-
registry.delete(key);
|
|
897
|
-
};
|
|
898
|
-
}, [
|
|
899
|
-
id,
|
|
900
|
-
rowChildrenWithContext,
|
|
901
|
-
rowRegistry
|
|
902
|
-
]);
|
|
903
|
-
const shouldRenderDropdown = dropdownFormFields || dropdownContent;
|
|
904
|
-
const rowContent = isReorderable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SortableTableBoxRowContent, {
|
|
905
|
-
...props,
|
|
906
|
-
id,
|
|
907
|
-
isSelected,
|
|
908
|
-
isSelectable,
|
|
909
|
-
onClick: handleClick,
|
|
910
|
-
onBlur: handleBlur,
|
|
911
|
-
onFocus: handleFocus,
|
|
912
|
-
rowRef,
|
|
913
|
-
draggedDirection,
|
|
914
|
-
children: rowChildrenWithContext
|
|
915
|
-
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledRow, {
|
|
916
|
-
...props,
|
|
917
|
-
ref: rowRef,
|
|
918
|
-
id,
|
|
919
|
-
onClick: handleClick,
|
|
920
|
-
onBlur: handleBlur,
|
|
921
|
-
onFocus: handleFocus,
|
|
922
|
-
disableHoverBackground: true,
|
|
923
|
-
"aria-selected": isSelected,
|
|
924
|
-
$isSelectable: isSelectable,
|
|
925
|
-
children: rowChildrenWithContext
|
|
926
|
-
});
|
|
927
|
-
if (shouldRenderDropdown) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Popover.Popover_default, {
|
|
928
|
-
trigger: rowContent,
|
|
929
|
-
open: isSelected,
|
|
930
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Popover.Popover_default.Card, {
|
|
931
|
-
id: context?.rowDropdownId,
|
|
932
|
-
noPadding: true,
|
|
933
|
-
style: { zIndex: require_lib_zindex.Z_INDICES.modalDropdown },
|
|
934
|
-
children: [
|
|
935
|
-
dropdownHeadingText && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownPopoverHeading, { children: dropdownHeadingText }),
|
|
936
|
-
dropdownFormFields && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownPopoverContent, {
|
|
937
|
-
spacing: _persona_design_tokens.Spacing[2],
|
|
938
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_useFormGroup.FormGroupContext.Provider, {
|
|
939
|
-
value: {
|
|
940
|
-
configField: true,
|
|
941
|
-
labelTooltipZIndex: require_lib_zindex.Z_INDICES.modalDropdownTooltip
|
|
942
|
-
},
|
|
943
|
-
children: dropdownFormFields
|
|
944
|
-
})
|
|
945
|
-
}),
|
|
946
|
-
dropdownContent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownPopoverContent, {
|
|
947
|
-
spacing: _persona_design_tokens.Spacing[3],
|
|
948
|
-
children: dropdownContent
|
|
949
|
-
}),
|
|
950
|
-
dropdownFooter && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DropdownPopoverFooter, { children: dropdownFooter })
|
|
951
|
-
]
|
|
952
|
-
})
|
|
953
|
-
});
|
|
954
|
-
return rowContent;
|
|
955
|
-
};
|
|
956
|
-
const OverlayTable = styled_components.default.table`
|
|
957
|
-
width: 100%;
|
|
958
|
-
table-layout: fixed;
|
|
959
|
-
border-collapse: separate;
|
|
960
|
-
border-spacing: 0;
|
|
961
|
-
border: 1px solid ${_persona_design_tokens.Color.BorderDivider};
|
|
962
|
-
border-radius: ${_persona_design_tokens.BorderRadius.Md};
|
|
963
|
-
background: ${_persona_design_tokens.Color.BackgroundPrimary};
|
|
964
|
-
box-shadow: ${"0px 2px 10px 0px rgba(0, 0, 0, 0.04), 0px 5px 20px 0px rgba(0, 0, 0, 0.06), 0px 10px 40px 0px rgba(0, 0, 0, 0.08)"};
|
|
965
|
-
`;
|
|
966
|
-
/**
|
|
967
|
-
* Visual clone of a `TableBoxRow` used inside `@dnd-kit`'s `DragOverlay`.
|
|
968
|
-
* Renders a minimal table wrapper with a static drag-handle cell followed by
|
|
969
|
-
* the original row's cells, so the portaled overlay looks identical to the
|
|
970
|
-
* dragged row while it follows the pointer.
|
|
971
|
-
*
|
|
972
|
-
* `cellWidths` is the measured width (in px) of each `<td>` in the source
|
|
973
|
-
* row at drag start, in source order (drag handle cell first, then content
|
|
974
|
-
* cells). Applied via a `<colgroup>` with `table-layout: fixed` so the
|
|
975
|
-
* overlay's columns align 1:1 with the source table instead of re-flowing
|
|
976
|
-
* to the single row's content.
|
|
977
|
-
*/
|
|
978
|
-
const TableBoxRowOverlay = ({ children, cellWidths }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(OverlayTable, {
|
|
979
|
-
"aria-hidden": "true",
|
|
980
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("colgroup", { children: cellWidths.map((width, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("col", { style: { width: `${width}px` } }, i)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledRow, {
|
|
981
|
-
disableHoverBackground: true,
|
|
982
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DragHandleCell, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DragHandleButton, {
|
|
983
|
-
tabIndex: -1,
|
|
984
|
-
"aria-hidden": "true",
|
|
985
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_persona_icons.DragIcon, {})
|
|
986
|
-
}) }), children]
|
|
987
|
-
}) })]
|
|
988
|
-
});
|
|
989
|
-
//#endregion
|
|
990
|
-
//#region components/TableBox/useColumnWidthLock.ts
|
|
991
|
-
/**
|
|
992
|
-
* Captures the live `<th>` widths of a table the moment inline editing starts
|
|
993
|
-
* and clears them when editing ends.
|
|
994
|
-
*
|
|
995
|
-
* Consumers render a `<colgroup>` from `lockedColWidths` and switch the table
|
|
996
|
-
* to `table-layout: fixed` for the duration of the edit so the input swap
|
|
997
|
-
* doesn't reflow the columns.
|
|
998
|
-
*/
|
|
999
|
-
const useColumnWidthLock = (tableRef, { enabled = true } = {}) => {
|
|
1000
|
-
const [lockedColWidths, setLockedColWidths] = (0, react.useState)(null);
|
|
1001
|
-
return {
|
|
1002
|
-
lockedColWidths,
|
|
1003
|
-
setColumnWidthsLocked: (0, react.useCallback)((isLocked) => {
|
|
1004
|
-
if (!enabled) return;
|
|
1005
|
-
if (!isLocked) {
|
|
1006
|
-
setLockedColWidths(null);
|
|
1007
|
-
return;
|
|
1008
|
-
}
|
|
1009
|
-
const ths = Array.from(tableRef.current?.querySelectorAll(":scope > thead > tr > th") ?? []);
|
|
1010
|
-
if (ths.length > 0) setLockedColWidths(ths.map((th) => th.getBoundingClientRect().width));
|
|
1011
|
-
}, [tableRef, enabled])
|
|
1012
|
-
};
|
|
1013
|
-
};
|
|
1014
|
-
//#endregion
|
|
1015
|
-
//#region components/TableBox/useTableBoxDragAndDrop.ts
|
|
1016
|
-
const DRAG_DIRECTION_THRESHOLD = 4;
|
|
1017
|
-
/**
|
|
1018
|
-
* Bundles the `@dnd-kit` wiring TableBox needs to support row reordering:
|
|
1019
|
-
* sensors, lifecycle handlers, the dragged row's overlay content, and the
|
|
1020
|
-
* pointer direction used by rows to position drop indicators in dnd-kit's
|
|
1021
|
-
* "dead zone" (overIndex === activeIndex).
|
|
1022
|
-
*
|
|
1023
|
-
* Also forces a `grabbing` cursor on `<body>` while a row is active so the
|
|
1024
|
-
* cursor persists when the pointer leaves the drag handle.
|
|
1025
|
-
*/
|
|
1026
|
-
const useTableBoxDragAndDrop = ({ tableRef, reorderConfig }) => {
|
|
1027
|
-
const sensors = (0, _dnd_kit_core.useSensors)((0, _dnd_kit_core.useSensor)(_dnd_kit_core.PointerSensor), (0, _dnd_kit_core.useSensor)(_dnd_kit_core.KeyboardSensor, { coordinateGetter: _dnd_kit_sortable.sortableKeyboardCoordinates }));
|
|
1028
|
-
const rowRegistry = (0, react.useRef)(/* @__PURE__ */ new Map());
|
|
1029
|
-
const [activeId, setActiveId] = (0, react.useState)(null);
|
|
1030
|
-
const [draggedDirection, setDraggedDirection] = (0, react.useState)(null);
|
|
1031
|
-
const [overlayCellWidths, setOverlayCellWidths] = (0, react.useState)(null);
|
|
1032
|
-
(0, react.useEffect)(() => {
|
|
1033
|
-
if (activeId == null) return;
|
|
1034
|
-
const previous = document.body.style.cursor;
|
|
1035
|
-
document.body.style.cursor = "grabbing";
|
|
1036
|
-
return () => {
|
|
1037
|
-
document.body.style.cursor = previous;
|
|
1038
|
-
};
|
|
1039
|
-
}, [activeId]);
|
|
1040
|
-
const sortableIds = (0, react.useMemo)(() => {
|
|
1041
|
-
if (!reorderConfig) return [];
|
|
1042
|
-
return reorderConfig.items.map((item) => String(item[reorderConfig.itemKeyPath]));
|
|
1043
|
-
}, [reorderConfig]);
|
|
1044
|
-
const handleDragStart = (0, react.useCallback)((event) => {
|
|
1045
|
-
const id = String(event.active.id);
|
|
1046
|
-
setActiveId(id);
|
|
1047
|
-
setDraggedDirection(null);
|
|
1048
|
-
const rowElement = tableRef.current?.querySelector(`tr[id="${CSS.escape(id)}"]`);
|
|
1049
|
-
if (rowElement) setOverlayCellWidths(Array.from(rowElement.children).filter((child) => child.tagName === "TD").map((td) => td.getBoundingClientRect().width));
|
|
1050
|
-
else setOverlayCellWidths(null);
|
|
1051
|
-
}, [tableRef]);
|
|
1052
|
-
const handleDragMove = (0, react.useCallback)((event) => {
|
|
1053
|
-
const { y } = event.delta;
|
|
1054
|
-
const next = y < -DRAG_DIRECTION_THRESHOLD ? "up" : y > DRAG_DIRECTION_THRESHOLD ? "down" : null;
|
|
1055
|
-
setDraggedDirection((prev) => prev === next ? prev : next);
|
|
1056
|
-
}, []);
|
|
1057
|
-
const resetDragState = (0, react.useCallback)(() => {
|
|
1058
|
-
setActiveId(null);
|
|
1059
|
-
setDraggedDirection(null);
|
|
1060
|
-
setOverlayCellWidths(null);
|
|
1061
|
-
}, []);
|
|
1062
|
-
return {
|
|
1063
|
-
activeId,
|
|
1064
|
-
overlayCellWidths,
|
|
1065
|
-
draggedDirection,
|
|
1066
|
-
sortableIds,
|
|
1067
|
-
rowRegistry,
|
|
1068
|
-
dndContextProps: {
|
|
1069
|
-
sensors,
|
|
1070
|
-
collisionDetection: _dnd_kit_core.closestCenter,
|
|
1071
|
-
onDragStart: handleDragStart,
|
|
1072
|
-
onDragMove: handleDragMove,
|
|
1073
|
-
onDragEnd: (0, react.useCallback)((event) => {
|
|
1074
|
-
resetDragState();
|
|
1075
|
-
if (!reorderConfig) return;
|
|
1076
|
-
const { active, over } = event;
|
|
1077
|
-
if (!over || active.id === over.id) return;
|
|
1078
|
-
const { items, itemKeyPath, onReorder } = reorderConfig;
|
|
1079
|
-
const fromIndex = require_lib_reorderItems.findIndexByKey(items, itemKeyPath, String(active.id));
|
|
1080
|
-
const toIndex = require_lib_reorderItems.findIndexByKey(items, itemKeyPath, String(over.id));
|
|
1081
|
-
if (fromIndex === -1 || toIndex === -1) return;
|
|
1082
|
-
onReorder(require_lib_reorderItems.moveItemByIndex(items, fromIndex, toIndex));
|
|
1083
|
-
}, [reorderConfig, resetDragState]),
|
|
1084
|
-
onDragCancel: resetDragState
|
|
1085
|
-
}
|
|
1086
|
-
};
|
|
1087
|
-
};
|
|
1088
|
-
//#endregion
|
|
1089
|
-
//#region components/TableBox/TableBox.tsx
|
|
1090
|
-
const TableBoxContext = (0, react.createContext)(null);
|
|
1091
|
-
const DRAG_HANDLE_CELL_WIDTH = 24;
|
|
1092
|
-
const RIGHT_FADE_WIDTH = 48;
|
|
1093
|
-
const HEADER_HEIGHT_PX = parseInt(_persona_design_tokens.Spacing[1], 10) * 2 + parseInt(_persona_design_tokens.Typography.TextSmall.lineHeight, 10) + 1;
|
|
1094
|
-
const TableScrollContainer = styled_components.default.div`
|
|
1095
|
-
border: 1px solid ${_persona_design_tokens.Color.BorderDivider};
|
|
1096
|
-
border-radius: ${_persona_design_tokens.BorderRadius.Md};
|
|
1097
|
-
overflow-x: ${({ $fixedLayout, $hasHorizontalOverflow }) => $fixedLayout ? "visible" : $hasHorizontalOverflow ? "auto" : "visible"};
|
|
1098
|
-
overscroll-behavior-x: none;
|
|
1099
|
-
`;
|
|
1100
|
-
const ScrollAffordanceWrapper = styled_components.default.div`
|
|
1101
|
-
position: relative;
|
|
1102
|
-
`;
|
|
1103
|
-
const RightFadeOverlay = styled_components.default.div`
|
|
1104
|
-
position: absolute;
|
|
1105
|
-
top: 1px;
|
|
1106
|
-
right: 1px;
|
|
1107
|
-
bottom: 1px;
|
|
1108
|
-
width: ${RIGHT_FADE_WIDTH}px;
|
|
1109
|
-
/* Sits above the sticky first column (z-index 2) but below the pinned
|
|
1110
|
-
row actions (z-index 4) so action buttons stay legible. */
|
|
1111
|
-
z-index: 3;
|
|
1112
|
-
pointer-events: none;
|
|
1113
|
-
background:
|
|
1114
|
-
linear-gradient(to right, transparent, ${_persona_design_tokens.Color.BackgroundSecondary}) top left / 100%
|
|
1115
|
-
${Math.max(0, HEADER_HEIGHT_PX - 1)}px no-repeat,
|
|
1116
|
-
linear-gradient(to right, transparent, ${_persona_design_tokens.Color.BackgroundPrimary}) bottom left / 100%
|
|
1117
|
-
calc(100% - ${HEADER_HEIGHT_PX}px) no-repeat;
|
|
1118
|
-
border-top-right-radius: ${_persona_design_tokens.BorderRadius.Md};
|
|
1119
|
-
border-bottom-right-radius: ${_persona_design_tokens.BorderRadius.Md};
|
|
1120
|
-
opacity: ${({ $visible }) => $visible ? 1 : 0};
|
|
1121
|
-
transition: opacity ${"200ms"} ease-out;
|
|
1122
|
-
`;
|
|
1123
|
-
const stickyContentColumn = (isReorderable) => styled_components.css`
|
|
1124
|
-
&& thead th:first-child,
|
|
1125
|
-
&& tbody td:first-child {
|
|
1126
|
-
position: sticky;
|
|
1127
|
-
left: 0;
|
|
1128
|
-
z-index: 2;
|
|
1129
|
-
}
|
|
1130
|
-
|
|
1131
|
-
&& tbody td:first-child {
|
|
1132
|
-
background-color: inherit;
|
|
1133
|
-
}
|
|
1134
|
-
|
|
1135
|
-
${isReorderable && styled_components.css`
|
|
1136
|
-
&& thead th:nth-child(2),
|
|
1137
|
-
&& tbody td:nth-child(2) {
|
|
1138
|
-
position: sticky;
|
|
1139
|
-
left: ${DRAG_HANDLE_CELL_WIDTH}px;
|
|
1140
|
-
z-index: 2;
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
&& tbody td:nth-child(2) {
|
|
1144
|
-
background-color: inherit;
|
|
1145
|
-
}
|
|
1146
|
-
`}
|
|
1147
|
-
`;
|
|
1148
|
-
const StyledTable = (0, styled_components.default)(require_Table.Table)`
|
|
1149
|
-
caret-color: ${_persona_design_tokens.Color.BorderFocus};
|
|
1150
|
-
|
|
1151
|
-
&::selection {
|
|
1152
|
-
background: ${_persona_design_tokens.Color.BackgroundLabelPurple};
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
${({ $fixedLayout, $isReorderable }) => $fixedLayout ? styled_components.css`
|
|
1156
|
-
/* Legacy: truncate long cell content to container width. */
|
|
1157
|
-
table-layout: fixed;
|
|
1158
|
-
` : stickyContentColumn($isReorderable)}
|
|
1159
|
-
|
|
1160
|
-
/* Lock column widths while inline editing to prevent layout reflow. */
|
|
1161
|
-
${({ $fixedLayout, $lockedWidth }) => !$fixedLayout && $lockedWidth != null && styled_components.css`
|
|
1162
|
-
table-layout: fixed;
|
|
1163
|
-
width: ${$lockedWidth}px;
|
|
1164
|
-
`}
|
|
1165
|
-
|
|
1166
|
-
/* Subtle right border on the sticky column when content extends off-screen
|
|
1167
|
-
— inset shadow keeps it layout-neutral. */
|
|
1168
|
-
${({ $hasHorizontalOverflow, $isReorderable, $fixedLayout }) => $hasHorizontalOverflow && !$fixedLayout && styled_components.css`
|
|
1169
|
-
${$isReorderable ? `&& thead th:nth-child(2), && tbody td:nth-child(2)` : `&& thead th:first-child, && tbody td:first-child`} {
|
|
1170
|
-
box-shadow: inset -1px 0 0 ${_persona_design_tokens.Color.BorderDivider};
|
|
1171
|
-
}
|
|
1172
|
-
`}
|
|
1173
|
-
|
|
1174
|
-
/* When the header is hidden, round the first body row's outer corners so
|
|
1175
|
-
they line up with the surrounding container's rounded border. */
|
|
1176
|
-
${({ $hideHeader }) => $hideHeader && styled_components.css`
|
|
1177
|
-
&& tbody tr:first-child td:first-child {
|
|
1178
|
-
border-top-left-radius: ${_persona_design_tokens.BorderRadius.Md};
|
|
1179
|
-
}
|
|
1180
|
-
&& tbody tr:first-child td:last-child {
|
|
1181
|
-
border-top-right-radius: ${_persona_design_tokens.BorderRadius.Md};
|
|
1182
|
-
}
|
|
1183
|
-
`}
|
|
1184
|
-
`;
|
|
1185
|
-
const StyledTableHeaderCell = (0, styled_components.default)(require_Table.TableHeaderCell)`
|
|
1186
|
-
padding: ${_persona_design_tokens.Spacing[1]} ${_persona_design_tokens.Spacing[2]};
|
|
1187
|
-
border-bottom: 1px solid ${_persona_design_tokens.Color.BorderDivider};
|
|
1188
|
-
${require_mixins_text.paragraphMixins.sm};
|
|
1189
|
-
|
|
1190
|
-
/* Border radius for corner cells */
|
|
1191
|
-
&:first-child {
|
|
1192
|
-
border-radius: ${_persona_design_tokens.BorderRadius.Md} 0 0 0;
|
|
1193
|
-
}
|
|
1194
|
-
|
|
1195
|
-
&:last-child {
|
|
1196
|
-
border-radius: 0 ${_persona_design_tokens.BorderRadius.Md} 0 0;
|
|
1197
|
-
}
|
|
1198
|
-
`;
|
|
1199
|
-
const DragHandleHeaderCell = (0, styled_components.default)(StyledTableHeaderCell)`
|
|
1200
|
-
width: 24px;
|
|
1201
|
-
padding: ${_persona_design_tokens.Spacing[1]} ${_persona_design_tokens.Spacing[0]};
|
|
1202
|
-
`;
|
|
1203
|
-
const PinnedActionsCell = (0, styled_components.default)(require_Table.TableCell)`
|
|
1204
|
-
position: sticky;
|
|
1205
|
-
right: 0;
|
|
1206
|
-
z-index: 4;
|
|
1207
|
-
background: transparent;
|
|
1208
|
-
border-bottom: 1px solid ${_persona_design_tokens.Color.BorderHairline};
|
|
1209
|
-
padding: 0;
|
|
1210
|
-
width: ${RowActionsContainerWithFadeWidth}px;
|
|
1211
|
-
height: 1px; /* dummy height lets the child use height: 100% */
|
|
1212
|
-
`;
|
|
1213
|
-
const EmptyStateCell = (0, styled_components.default)(require_Table.TableCell)`
|
|
1214
|
-
${require_mixins_text.paragraphMixins.sm};
|
|
1215
|
-
padding: ${_persona_design_tokens.Spacing[2]};
|
|
1216
|
-
color: ${_persona_design_tokens.Color.TextSecondary};
|
|
1217
|
-
border-bottom: none;
|
|
1218
|
-
`;
|
|
1219
|
-
const EmptyStateButton = styled_components.default.button`
|
|
1220
|
-
${require_mixins_text.paragraphMixins.sm};
|
|
1221
|
-
padding: 0;
|
|
1222
|
-
color: inherit;
|
|
1223
|
-
background: none;
|
|
1224
|
-
border: none;
|
|
1225
|
-
cursor: pointer;
|
|
1226
|
-
${require_mixins_focus.focusOutline}
|
|
1227
|
-
`;
|
|
1228
|
-
const TableBox = ({ children, emptyText, selectedKey, defaultSelectedKey, columns, onSelectionChange, selectionMode = "none", newRowId, onCreateNewRow: onCreateNewRowProp, disabled = false, reorderConfig, disableHorizontalScroll: disableHorizontalScrollProp = false, hideHeader = false, "aria-label": ariaLabel, ...props }) => {
|
|
1229
|
-
const tableRef = (0, react.useRef)(null);
|
|
1230
|
-
const scrollContainerRef = (0, react.useRef)(null);
|
|
1231
|
-
const tableBoxId = (0, react.useMemo)(() => (0, lodash_fp_uniqueId_js.default)("tablebox-"), []);
|
|
1232
|
-
const rowDropdownId = `${tableBoxId}-row-dropdown`;
|
|
1233
|
-
const hasInlineEditableColumn = columns.some((c) => c.inlineEditConfig != null);
|
|
1234
|
-
const disableHorizontalScroll = disableHorizontalScrollProp || hasInlineEditableColumn;
|
|
1235
|
-
const { hasHorizontalOverflow, hasMoreScrollRight } = require_lib_useScrollOverflow.useScrollOverflow(scrollContainerRef, { enabled: !disableHorizontalScroll });
|
|
1236
|
-
const { lockedColWidths, setColumnWidthsLocked } = useColumnWidthLock(tableRef, { enabled: !disableHorizontalScroll });
|
|
1237
|
-
const [internalSelectedKey, setInternalSelectedKey] = (0, react.useState)(defaultSelectedKey ?? null);
|
|
1238
|
-
const [shouldCreateNewRowAfterCommit, setShouldCreateNewRowAfterCommit] = (0, react.useState)(false);
|
|
1239
|
-
const currentSelectedKey = selectedKey ?? internalSelectedKey;
|
|
1240
|
-
const scheduleCreateNewRowAfterCommit = () => {
|
|
1241
|
-
setShouldCreateNewRowAfterCommit(true);
|
|
1242
|
-
};
|
|
1243
|
-
const handleRowClick = (0, react.useCallback)((rowId) => {
|
|
1244
|
-
if (selectionMode === "none") return;
|
|
1245
|
-
if (!onSelectionChange) setInternalSelectedKey(rowId);
|
|
1246
|
-
else onSelectionChange(rowId);
|
|
1247
|
-
}, [onSelectionChange, selectionMode]);
|
|
1248
|
-
const handleOutsideClick = (0, react.useCallback)((event) => {
|
|
1249
|
-
if (!document.querySelector(`[id="${rowDropdownId}"][data-state="open"]`)) return;
|
|
1250
|
-
const target = event.target;
|
|
1251
|
-
const isOutsideTableBox = tableRef.current && !tableRef.current.contains(target);
|
|
1252
|
-
const isOnRowDropdownContent = target.closest(`[id="${rowDropdownId}"]`);
|
|
1253
|
-
if (isOutsideTableBox && !isOnRowDropdownContent && currentSelectedKey != null) if (!onSelectionChange) setInternalSelectedKey(null);
|
|
1254
|
-
else onSelectionChange(null);
|
|
1255
|
-
}, [
|
|
1256
|
-
currentSelectedKey,
|
|
1257
|
-
onSelectionChange,
|
|
1258
|
-
rowDropdownId
|
|
1259
|
-
]);
|
|
1260
|
-
(0, react.useEffect)(() => {
|
|
1261
|
-
document.addEventListener("mousedown", handleOutsideClick);
|
|
1262
|
-
return () => {
|
|
1263
|
-
document.removeEventListener("mousedown", handleOutsideClick);
|
|
1264
|
-
};
|
|
1265
|
-
}, [handleOutsideClick]);
|
|
1266
|
-
(0, react.useEffect)(() => {
|
|
1267
|
-
if (!shouldCreateNewRowAfterCommit) return;
|
|
1268
|
-
setShouldCreateNewRowAfterCommit(false);
|
|
1269
|
-
onCreateNewRowProp?.();
|
|
1270
|
-
}, [onCreateNewRowProp, shouldCreateNewRowAfterCommit]);
|
|
1271
|
-
const { activeId, overlayCellWidths, draggedDirection, sortableIds, rowRegistry, dndContextProps } = useTableBoxDragAndDrop({
|
|
1272
|
-
tableRef,
|
|
1273
|
-
reorderConfig: disabled ? void 0 : reorderConfig
|
|
1274
|
-
});
|
|
1275
|
-
const isReorderable = !disabled && reorderConfig != null;
|
|
1276
|
-
const hasActionsColumn = !disableHorizontalScroll;
|
|
1277
|
-
const contextValue = {
|
|
1278
|
-
disabled,
|
|
1279
|
-
newRowId,
|
|
1280
|
-
columns,
|
|
1281
|
-
selectedKey: currentSelectedKey,
|
|
1282
|
-
selectionMode,
|
|
1283
|
-
onRowClick: handleRowClick,
|
|
1284
|
-
tableBoxId,
|
|
1285
|
-
rowDropdownId,
|
|
1286
|
-
isReorderable,
|
|
1287
|
-
rowRegistry: isReorderable ? rowRegistry : null,
|
|
1288
|
-
draggedDirection,
|
|
1289
|
-
hasActionsColumn,
|
|
1290
|
-
hasHorizontalOverflow,
|
|
1291
|
-
setColumnWidthsLocked,
|
|
1292
|
-
scheduleCreateNewRowAfterCommit: onCreateNewRowProp ? scheduleCreateNewRowAfterCommit : void 0
|
|
1293
|
-
};
|
|
1294
|
-
const isEmpty = Array.isArray(children) ? children.length === 0 : children == null;
|
|
1295
|
-
const totalColumnCount = columns.length + (isReorderable ? 1 : 0) + (hasActionsColumn ? 1 : 0);
|
|
1296
|
-
const activeRowContent = activeId ? rowRegistry.current.get(activeId) ?? null : null;
|
|
1297
|
-
const tableContent = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(ScrollAffordanceWrapper, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableScrollContainer, {
|
|
1298
|
-
ref: scrollContainerRef,
|
|
1299
|
-
$fixedLayout: disableHorizontalScroll,
|
|
1300
|
-
$hasHorizontalOverflow: hasHorizontalOverflow,
|
|
1301
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledTable, {
|
|
1302
|
-
ref: tableRef,
|
|
1303
|
-
size: "md",
|
|
1304
|
-
"aria-label": ariaLabel,
|
|
1305
|
-
tabIndex: -1,
|
|
1306
|
-
$isReorderable: isReorderable,
|
|
1307
|
-
$hasHorizontalOverflow: hasHorizontalOverflow,
|
|
1308
|
-
$fixedLayout: disableHorizontalScroll,
|
|
1309
|
-
$hideHeader: hideHeader,
|
|
1310
|
-
$lockedWidth: lockedColWidths != null ? lockedColWidths.reduce((sum, w) => sum + w, 0) : void 0,
|
|
1311
|
-
...props,
|
|
1312
|
-
children: [
|
|
1313
|
-
lockedColWidths && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("colgroup", { children: lockedColWidths.map((w, i) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("col", { style: { width: `${w}px` } }, i)) }),
|
|
1314
|
-
!hideHeader && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Table.TableHead, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_Table.TableRow, { children: [
|
|
1315
|
-
isReorderable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DragHandleHeaderCell, { "aria-hidden": "true" }),
|
|
1316
|
-
columns.map((column) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledTableHeaderCell, { children: column.title }, column.key)),
|
|
1317
|
-
hasActionsColumn && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledTableHeaderCell, {
|
|
1318
|
-
"aria-hidden": "true",
|
|
1319
|
-
style: { padding: 0 }
|
|
1320
|
-
})
|
|
1321
|
-
] }) }),
|
|
1322
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Table.TableBody, { children: isEmpty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Table.TableRow, {
|
|
1323
|
-
disableHoverBackground: true,
|
|
1324
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyStateCell, {
|
|
1325
|
-
colSpan: totalColumnCount,
|
|
1326
|
-
children: onCreateNewRowProp && !disabled ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyStateButton, {
|
|
1327
|
-
type: "button",
|
|
1328
|
-
onClick: onCreateNewRowProp,
|
|
1329
|
-
children: emptyText || "No data available."
|
|
1330
|
-
}) : emptyText || "No data available."
|
|
1331
|
-
})
|
|
1332
|
-
}) : children })
|
|
1333
|
-
]
|
|
1334
|
-
})
|
|
1335
|
-
}), !disableHorizontalScroll && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RightFadeOverlay, {
|
|
1336
|
-
"aria-hidden": "true",
|
|
1337
|
-
$visible: hasMoreScrollRight
|
|
1338
|
-
})] });
|
|
1339
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBoxContext.Provider, {
|
|
1340
|
-
value: contextValue,
|
|
1341
|
-
children: isReorderable ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_dnd_kit_core.DndContext, {
|
|
1342
|
-
...dndContextProps,
|
|
1343
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_dnd_kit_sortable.SortableContext, {
|
|
1344
|
-
items: sortableIds,
|
|
1345
|
-
strategy: _dnd_kit_sortable.verticalListSortingStrategy,
|
|
1346
|
-
children: tableContent
|
|
1347
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_dnd_kit_core.DragOverlay, { children: activeRowContent && overlayCellWidths && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TableBoxRowOverlay, {
|
|
1348
|
-
cellWidths: overlayCellWidths,
|
|
1349
|
-
children: activeRowContent
|
|
1350
|
-
}) })]
|
|
1351
|
-
}) : tableContent
|
|
1352
|
-
});
|
|
1353
|
-
};
|
|
1354
|
-
TableBox.Row = TableBoxRow;
|
|
1355
|
-
TableBox.Cell = TableBoxCell;
|
|
1356
|
-
//#endregion
|
|
1357
|
-
Object.defineProperty(exports, "TableBox", {
|
|
1358
|
-
enumerable: true,
|
|
1359
|
-
get: function() {
|
|
1360
|
-
return TableBox;
|
|
1361
|
-
}
|
|
1362
|
-
});
|
|
1363
|
-
Object.defineProperty(exports, "TableBoxContext", {
|
|
1364
|
-
enumerable: true,
|
|
1365
|
-
get: function() {
|
|
1366
|
-
return TableBoxContext;
|
|
1367
|
-
}
|
|
1368
|
-
});
|
|
1369
|
-
|
|
1370
|
-
//# sourceMappingURL=TableBox-CiuXCXyv.cjs.map
|