@economic/taco 2.47.0-server.3 → 2.47.0-server.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Icon/components/Autopay.d.ts +3 -0
- package/dist/components/Icon/components/AutopayPaused.d.ts +3 -0
- package/dist/components/Icon/components/Person.d.ts +3 -0
- package/dist/components/Icon/components/PersonSolid.d.ts +3 -0
- package/dist/components/Icon/components/Wallet.d.ts +3 -0
- package/dist/components/Icon/components/index.d.ts +1 -1
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Menu/components/Item.d.ts +1 -1
- package/dist/components/Menu/components/Link.d.ts +1 -1
- package/dist/components/Navigation2/components/Link.d.ts +1 -1
- package/dist/components/Select2/components/Option.d.ts +4 -4
- package/dist/components/Select2/components/Search.d.ts +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js +32 -0
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/dist/esm/index.css +11 -2
- package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js +32 -24
- package/dist/esm/packages/taco/src/charts/components/Area/AreaChart.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js +84 -61
- package/dist/esm/packages/taco/src/charts/components/Bar/BarChart.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js +16 -15
- package/dist/esm/packages/taco/src/charts/components/Donut/ActiveShape.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js +12 -13
- package/dist/esm/packages/taco/src/charts/components/Donut/CenteredLabel.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js +104 -68
- package/dist/esm/packages/taco/src/charts/components/Donut/DonutChart.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js +38 -29
- package/dist/esm/packages/taco/src/charts/components/Donut/Legend.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Donut/util.js +2 -2
- package/dist/esm/packages/taco/src/charts/components/Donut/util.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Legend.js +45 -37
- package/dist/esm/packages/taco/src/charts/components/Legend.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js +32 -24
- package/dist/esm/packages/taco/src/charts/components/Line/LineChart.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js +5 -3
- package/dist/esm/packages/taco/src/charts/components/ResponsiveContainer.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/components/Tooltip.js +26 -25
- package/dist/esm/packages/taco/src/charts/components/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/utils/color.js +13 -12
- package/dist/esm/packages/taco/src/charts/utils/color.js.map +1 -1
- package/dist/esm/packages/taco/src/charts/utils/common.js +39 -26
- package/dist/esm/packages/taco/src/charts/utils/common.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +30 -31
- package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Alert/Alert.js +7 -9
- package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js +14 -13
- package/dist/esm/packages/taco/src/components/AlertDialog/AlertDialog.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/Context.js +2 -2
- package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js +10 -9
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js +4 -4
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Footer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js +5 -6
- package/dist/esm/packages/taco/src/components/AlertDialog/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +2 -2
- package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Badge/Badge.js +26 -27
- package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
- package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +12 -14
- package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Banner/Banner.js +7 -10
- package/dist/esm/packages/taco/src/components/Banner/Banner.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Banner/util.js +3 -3
- package/dist/esm/packages/taco/src/components/Banner/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Button/Button.js +28 -29
- package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Button/util.js +25 -24
- package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +75 -71
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Card/Card.js +14 -15
- package/dist/esm/packages/taco/src/components/Card/Card.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +24 -22
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +21 -23
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +76 -64
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +60 -57
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js +27 -28
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/Context.js +4 -4
- package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +54 -39
- package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +36 -38
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js +3 -3
- package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +2 -2
- package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js +5 -6
- package/dist/esm/packages/taco/src/components/Dialog/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/util.js +7 -3
- package/dist/esm/packages/taco/src/components/Dialog/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/Context.js +5 -5
- package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +61 -51
- package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +134 -145
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/util.js +5 -5
- package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Field/Field.js +14 -12
- package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Form/Form.js +7 -6
- package/dist/esm/packages/taco/src/components/Form/Form.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Group/Group.js +9 -7
- package/dist/esm/packages/taco/src/components/Group/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +37 -36
- package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/Header.js +2 -2
- package/dist/esm/packages/taco/src/components/Header/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js +14 -10
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Avatar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js +5 -4
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Badge.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js +7 -9
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Display.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js +9 -9
- package/dist/esm/packages/taco/src/components/Header/components/Agreement/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +66 -46
- package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Button.js +12 -8
- package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Link.js +22 -18
- package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Logo.js +4 -4
- package/dist/esm/packages/taco/src/components/Header/components/Logo.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +2 -2
- package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +10 -9
- package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
- package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js +5 -7
- package/dist/esm/packages/taco/src/components/HoverCard/HoverCard.js.map +1 -1
- package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
- package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/Icon.js +7 -7
- package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Autopay.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/AutopayPaused.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Person.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Person.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/PersonSolid.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js +19 -0
- package/dist/esm/packages/taco/src/components/Icon/components/Wallet.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Icon/components/index.js +14 -4
- package/dist/esm/packages/taco/src/components/Icon/components/index.js.map +1 -1
- package/dist/esm/packages/taco/src/components/IconButton/IconButton.js +22 -23
- package/dist/esm/packages/taco/src/components/IconButton/IconButton.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Input/Input.js +45 -44
- package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Input/util.js +8 -5
- package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Layout/Layout.js +7 -5
- package/dist/esm/packages/taco/src/components/Layout/Layout.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Layout/components/Content.js +2 -2
- package/dist/esm/packages/taco/src/components/Layout/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Layout/components/Context.js +4 -2
- package/dist/esm/packages/taco/src/components/Layout/components/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Layout/components/Page.js +2 -2
- package/dist/esm/packages/taco/src/components/Layout/components/Page.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js +34 -27
- package/dist/esm/packages/taco/src/components/Layout/components/Sidebar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Layout/components/Top.js +9 -6
- package/dist/esm/packages/taco/src/components/Layout/components/Top.js.map +1 -1
- package/dist/esm/packages/taco/src/components/List/components/Button.js +1 -1
- package/dist/esm/packages/taco/src/components/List/components/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/components/List/components/Collapsible.js +10 -7
- package/dist/esm/packages/taco/src/components/List/components/Collapsible.js.map +1 -1
- package/dist/esm/packages/taco/src/components/List/components/Group.js +1 -1
- package/dist/esm/packages/taco/src/components/List/components/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/components/List/components/Item.js +15 -13
- package/dist/esm/packages/taco/src/components/List/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/List/components/Link.js +3 -3
- package/dist/esm/packages/taco/src/components/List/components/Link.js.map +1 -1
- package/dist/esm/packages/taco/src/components/List/components/Toggle.js +29 -27
- package/dist/esm/packages/taco/src/components/List/components/Toggle.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/Listbox.js +21 -26
- package/dist/esm/packages/taco/src/components/Listbox/Listbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +82 -70
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +56 -51
- package/dist/esm/packages/taco/src/components/Listbox/useListbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +83 -65
- package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js +9 -10
- package/dist/esm/packages/taco/src/components/Listbox/useTypeahead.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/util.js +78 -48
- package/dist/esm/packages/taco/src/components/Listbox/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/Context.js +2 -2
- package/dist/esm/packages/taco/src/components/Menu/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/Menu.js +42 -26
- package/dist/esm/packages/taco/src/components/Menu/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js +8 -8
- package/dist/esm/packages/taco/src/components/Menu/components/Checkbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Content.js +27 -21
- package/dist/esm/packages/taco/src/components/Menu/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Header.js +3 -3
- package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js +32 -32
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Link.js +10 -10
- package/dist/esm/packages/taco/src/components/Menu/components/Link.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js +15 -16
- package/dist/esm/packages/taco/src/components/Menu/components/RadioGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js +7 -7
- package/dist/esm/packages/taco/src/components/Menu/components/SubMenu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +5 -5
- package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js +6 -6
- package/dist/esm/packages/taco/src/components/ModeSwitch/ModeSwitch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +41 -36
- package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +6 -6
- package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +6 -6
- package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +14 -11
- package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +31 -24
- package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +7 -7
- package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +9 -7
- package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +48 -51
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js +26 -23
- package/dist/esm/packages/taco/src/components/Pagination/PageNumbers.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/Pagination.js +53 -39
- package/dist/esm/packages/taco/src/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/usePagination.js +17 -7
- package/dist/esm/packages/taco/src/components/Pagination/usePagination.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js +8 -9
- package/dist/esm/packages/taco/src/components/Pagination/usePaginationShortcuts.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Popover.js +45 -43
- package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/util.js +3 -1
- package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Progress/Progress.js +13 -11
- package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +13 -12
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Provider.js +8 -8
- package/dist/esm/packages/taco/src/components/Provider/Provider.js.map +1 -1
- package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +54 -47
- package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/RadioGroup/util.js +7 -1
- package/dist/esm/packages/taco/src/components/RadioGroup/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Report/Report.js +7 -5
- package/dist/esm/packages/taco/src/components/Report/Report.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Report/useReport.js +1 -1
- package/dist/esm/packages/taco/src/components/Report/useReport.js.map +1 -1
- package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +17 -13
- package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +11 -11
- package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js +44 -39
- package/dist/esm/packages/taco/src/components/SearchInput2/SearchInput2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/Select.js +28 -31
- package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/useSelect.js +79 -70
- package/dist/esm/packages/taco/src/components/Select/useSelect.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +154 -121
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +2 -4
- package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Context.js +4 -2
- package/dist/esm/packages/taco/src/components/Select2/components/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Create.js +45 -41
- package/dist/esm/packages/taco/src/components/Select2/components/Create.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +145 -129
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Group.js +8 -8
- package/dist/esm/packages/taco/src/components/Select2/components/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js +36 -35
- package/dist/esm/packages/taco/src/components/Select2/components/Option.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Search.js +9 -10
- package/dist/esm/packages/taco/src/components/Select2/components/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Title.js +2 -2
- package/dist/esm/packages/taco/src/components/Select2/components/Title.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +173 -128
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +32 -23
- package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/utilities.js +13 -6
- package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js +16 -13
- package/dist/esm/packages/taco/src/components/Shortcut/Shortcut.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Spinner/Spinner.js +17 -12
- package/dist/esm/packages/taco/src/components/Spinner/Spinner.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Switch/Switch.js +14 -14
- package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +28 -23
- package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js +7 -3
- package/dist/esm/packages/taco/src/components/Table/components/PaginatedTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/Table.js +22 -18
- package/dist/esm/packages/taco/src/components/Table/components/Table.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +100 -92
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js +136 -118
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +55 -55
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js +35 -41
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowEditing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js +77 -71
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js +56 -30
- package/dist/esm/packages/taco/src/components/Table/hooks/useRowCreation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js +151 -142
- package/dist/esm/packages/taco/src/components/Table/hooks/useTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +22 -20
- package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +9 -12
- package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +41 -41
- package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js +16 -14
- package/dist/esm/packages/taco/src/components/Table/util/rowIndexPath.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +32 -26
- package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util.js +37 -30
- package/dist/esm/packages/taco/src/components/Table/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/Table3.js +23 -23
- package/dist/esm/packages/taco/src/components/Table3/Table3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js +13 -14
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Cell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js +21 -23
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/RowMoveIndicator.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js +20 -17
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/Editing/TextareaWithAutosizing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js +67 -73
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingControlCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js +2 -2
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/EditingDisplayCell.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js +19 -20
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Cell/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js +26 -25
- package/dist/esm/packages/taco/src/components/Table3/components/Columns/Internal/EditingActionsMenu.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js +45 -40
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/Alert.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js +7 -8
- package/dist/esm/packages/taco/src/components/Table3/components/Editing/DiscardChangesConfirmationDialog.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js +18 -19
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/CreateNewRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js +7 -10
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/SaveStatus.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js +38 -36
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Editing/TemporaryRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js +15 -15
- package/dist/esm/packages/taco/src/components/Table3/components/Row/Row.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js +8 -11
- package/dist/esm/packages/taco/src/components/Table3/components/Toolbar/Editing/Editing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js +164 -201
- package/dist/esm/packages/taco/src/components/Table3/features/useEditingState.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js +40 -27
- package/dist/esm/packages/taco/src/components/Table3/features/useTableEditing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js +18 -16
- package/dist/esm/packages/taco/src/components/Table3/listeners/useTableEditingListener.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js +25 -19
- package/dist/esm/packages/taco/src/components/Table3/useTable3.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js +29 -35
- package/dist/esm/packages/taco/src/components/Table3/util/editing.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +34 -35
- package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tag/Tag.js +18 -16
- package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Textarea/Textarea.js +8 -11
- package/dist/esm/packages/taco/src/components/Textarea/Textarea.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/Toast.js +19 -20
- package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/Toaster.js +117 -96
- package/dist/esm/packages/taco/src/components/Toast/Toaster.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/util.js +6 -4
- package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +10 -9
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tour/Tour.js +49 -46
- package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Treeview/Treeview.js +33 -27
- package/dist/esm/packages/taco/src/components/Treeview/Treeview.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Truncate/Truncate.js +15 -13
- package/dist/esm/packages/taco/src/components/Truncate/Truncate.js.map +1 -1
- package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/esm/packages/taco/src/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js +11 -6
- package/dist/esm/packages/taco/src/hooks/useBoundaryOverflowDetection.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js +19 -13
- package/dist/esm/packages/taco/src/hooks/useBoundingClientRectListener.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js +4 -4
- package/dist/esm/packages/taco/src/hooks/useGlobalKeyDown.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useId.js +4 -2
- package/dist/esm/packages/taco/src/hooks/useId.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +20 -18
- package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useIsFormControl.js +7 -5
- package/dist/esm/packages/taco/src/hooks/useIsFormControl.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js +9 -5
- package/dist/esm/packages/taco/src/hooks/useIsHoverStatePaused.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js +3 -1
- package/dist/esm/packages/taco/src/hooks/useIsLargeScreen.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useLazyEffect.js +2 -2
- package/dist/esm/packages/taco/src/hooks/useLazyEffect.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useLocalStorage.js +24 -22
- package/dist/esm/packages/taco/src/hooks/useLocalStorage.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useMatchMedia.js +13 -6
- package/dist/esm/packages/taco/src/hooks/useMatchMedia.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useMergedRef.js +3 -3
- package/dist/esm/packages/taco/src/hooks/useMergedRef.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/usePrevious.js +2 -2
- package/dist/esm/packages/taco/src/hooks/usePrevious.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/BubbleSelect.js +14 -14
- package/dist/esm/packages/taco/src/primitives/BubbleSelect.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Button.js +16 -13
- package/dist/esm/packages/taco/src/primitives/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js +50 -44
- package/dist/esm/packages/taco/src/primitives/Collection/components/Root.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js +4 -2
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js +9 -5
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Group.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js +16 -18
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Option.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js +47 -40
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Root.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js +9 -10
- package/dist/esm/packages/taco/src/primitives/Listbox2/components/Title.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js +22 -20
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Container.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js +24 -27
- package/dist/esm/packages/taco/src/primitives/Sortable/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js +11 -10
- package/dist/esm/packages/taco/src/primitives/Sortable/components/List.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js +22 -19
- package/dist/esm/packages/taco/src/primitives/Table/Core/Table.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js +25 -22
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/Body.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js +6 -6
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js +30 -14
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/util.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js +18 -19
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js +34 -34
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/BuiltIns/GroupedCell.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js +10 -12
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/Cell.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js +19 -18
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Cell/util.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js +42 -40
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Actions.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js +5 -7
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Drag.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js +19 -24
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Expansion.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js +56 -55
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Columns/Internal/Selection.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js +27 -23
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Footer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js +13 -16
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Footer/Summary.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js +86 -87
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js +14 -11
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js +85 -58
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js +18 -20
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Resizer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js +3 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/SortIndicator.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js +11 -6
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/util.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js +58 -49
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/DisplayRow.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js +28 -32
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/BuiltIns/SkeletonRow.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js +44 -37
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/Row.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Row/RowContext.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js +11 -11
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/Toolbar.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js +6 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -0
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js +23 -22
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/Filters.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js +59 -42
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/ManageFiltersPopover.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js +39 -39
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js +21 -16
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js +16 -15
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterComparator.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js +51 -40
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterValue.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js +13 -9
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/util.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js +57 -51
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/Print.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js +71 -67
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Print/PrintDialog.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js +40 -37
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Search/Search.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js +64 -44
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/HideOrOrderPopover.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js +62 -51
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Settings/Settings.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js +6 -6
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableGlobalShortcuts.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js +13 -5
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRef.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js +93 -77
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableRenderer.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js +15 -15
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyle.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js +31 -41
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleColumnFreezing.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js +31 -30
- package/dist/esm/packages/taco/src/primitives/Table/Core/features/useTableStyleGrid.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js +3 -3
- package/dist/esm/packages/taco/src/primitives/Table/Core/listeners/useTableRowActiveListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js +14 -15
- package/dist/esm/packages/taco/src/primitives/Table/Core/useTable.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js +2 -2
- package/dist/esm/packages/taco/src/primitives/Table/Core/util/rows.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/types.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js +42 -36
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js +67 -74
- package/dist/esm/packages/taco/src/primitives/Table/useTableDataLoader2.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js +11 -6
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnFreezing.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js +5 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableColumnOrdering.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js +15 -5
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFontSize.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js +5 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableFooter.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js +26 -16
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTablePrinting.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js +9 -3
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActions.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js +42 -23
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowActive.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js +9 -6
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowClick.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js +9 -4
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrag.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js +5 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowDrop.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js +9 -3
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowExpansion.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js +5 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGoto.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowGroups.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js +15 -5
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowHeight.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js +14 -9
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableRowSelection.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js +25 -13
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSearch.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js +43 -22
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableServerLoading.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js +34 -24
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/features/useTableSettings.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js +4 -4
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableDataListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js +3 -3
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFilterListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js +18 -16
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableFontSizeListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js +2 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowHeightListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js +6 -4
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableRowSelectionListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js +8 -8
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSearchListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js +6 -6
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableServerLoadingListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js +8 -6
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSettingsListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js +17 -17
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableShortcutsListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js +2 -2
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/listeners/useTableSortingListener.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js +55 -55
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/useTableManager.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js +59 -30
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/columns.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js +4 -4
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/dataTypes.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js +33 -19
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/filtering.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js +11 -11
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/presets.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js +21 -19
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/search.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js +6 -7
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/settings.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js +138 -106
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/setup.js.map +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js +3 -1
- package/dist/esm/packages/taco/src/primitives/Table/useTableManager/util/sorting.js.map +1 -1
- package/dist/esm/packages/taco/src/types.js +1 -1
- package/dist/esm/packages/taco/src/types.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/aria.js +2 -2
- package/dist/esm/packages/taco/src/utils/aria.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/date.js +47 -23
- package/dist/esm/packages/taco/src/utils/date.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/debounce.js +10 -4
- package/dist/esm/packages/taco/src/utils/debounce.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/device.js +4 -2
- package/dist/esm/packages/taco/src/utils/device.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/dom.js +26 -20
- package/dist/esm/packages/taco/src/utils/dom.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +40 -38
- package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js +9 -7
- package/dist/esm/packages/taco/src/utils/hooks/useDropTarget.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js +20 -9
- package/dist/esm/packages/taco/src/utils/hooks/useListKeyboardNavigation.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js +9 -9
- package/dist/esm/packages/taco/src/utils/hooks/useListScrollTo.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js +8 -6
- package/dist/esm/packages/taco/src/utils/hooks/useOnClickOutside.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useTimer.js +16 -11
- package/dist/esm/packages/taco/src/utils/hooks/useTimer.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js +11 -6
- package/dist/esm/packages/taco/src/utils/hooks/useTruncated.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/input.js +10 -7
- package/dist/esm/packages/taco/src/utils/input.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/keyboard.js +8 -5
- package/dist/esm/packages/taco/src/utils/keyboard.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/mergeRefs.js +2 -2
- package/dist/esm/packages/taco/src/utils/mergeRefs.js.map +1 -1
- package/dist/esm/packages/taco/src/utils/tailwind.js +5 -5
- package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -1
- package/dist/esm/packages/taco/tailwind.colors.js +1 -1
- package/dist/esm/packages/taco/tailwind.colors.js.map +1 -1
- package/dist/index.css +11 -2
- package/dist/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.d.ts +3 -0
- package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/Filter.d.ts +0 -1
- package/dist/primitives/Table/Core/components/Toolbar/components/Filters/components/FilterColumn.d.ts +0 -3
- package/dist/primitives/Table/types.d.ts +1 -1
- package/dist/primitives/Table/useTableManager/features/useTableServerLoading.d.ts +2 -1
- package/dist/taco.cjs.development.js +7944 -6916
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +1 -2
@@ -1,4 +1,5 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { FocusScope } from '@react-aria/focus';
|
3
4
|
import { ROW_HEIGHT_ESTIMATES } from './util/rows.js';
|
4
5
|
import { Header } from './components/Header/Header.js';
|
@@ -7,6 +8,7 @@ import { Foot } from './components/Footer/Footer.js';
|
|
7
8
|
import { EmptyStateBody } from './components/Body/EmptyStateBody.js';
|
8
9
|
import { TableToolbar } from './components/Toolbar/Toolbar.js';
|
9
10
|
|
11
|
+
var _excluded = ["enableHorizontalArrowKeyNavigation", "footerRows", "table"];
|
10
12
|
function Table(props) {
|
11
13
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, props.children);
|
12
14
|
}
|
@@ -14,7 +16,7 @@ Table.Toolbar = TableToolbar;
|
|
14
16
|
Table.Grid = TableGrid;
|
15
17
|
function getEmptyStateReason(table) {
|
16
18
|
if (table.instance.getFilteredRowModel().rows.length === 0 && table.instance.getCoreRowModel().rows.length !== 0) {
|
17
|
-
|
19
|
+
var state = table.instance.getState();
|
18
20
|
if (table.meta.search.enableGlobalFilter && !!state.globalFilter) {
|
19
21
|
return 'searching';
|
20
22
|
}
|
@@ -27,16 +29,14 @@ function getEmptyStateReason(table) {
|
|
27
29
|
}
|
28
30
|
function TableGrid(props) {
|
29
31
|
var _table$state$grouping;
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
} = props;
|
36
|
-
const handleFocus = table.meta.rowActive.rowActiveIndex === undefined ? event => {
|
32
|
+
var enableHorizontalArrowKeyNavigation = props.enableHorizontalArrowKeyNavigation,
|
33
|
+
footerRows = props.footerRows,
|
34
|
+
table = props.table,
|
35
|
+
attributes = _objectWithoutPropertiesLoose(props, _excluded);
|
36
|
+
var handleFocus = table.meta.rowActive.rowActiveIndex === undefined ? function (event) {
|
37
37
|
table.meta.rowActive.handleFocus(event, table.meta.length, table.renderer.scrollToIndex);
|
38
38
|
} : undefined;
|
39
|
-
|
39
|
+
var emptyStateReason = getEmptyStateReason(table);
|
40
40
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("style", null, table.stylesheet), /*#__PURE__*/React__default.createElement(FocusScope, null, /*#__PURE__*/React__default.createElement("table", Object.assign({}, attributes, {
|
41
41
|
id: table.id,
|
42
42
|
"data-table-font-size": table.meta.fontSize.size,
|
@@ -51,13 +51,17 @@ function TableGrid(props) {
|
|
51
51
|
ref: table.ref,
|
52
52
|
style: table.style,
|
53
53
|
tabIndex: -1
|
54
|
-
}), /*#__PURE__*/React__default.createElement("thead", null, table.instance.getHeaderGroups().map(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
54
|
+
}), /*#__PURE__*/React__default.createElement("thead", null, table.instance.getHeaderGroups().map(function (headerGroup) {
|
55
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
56
|
+
key: headerGroup.id
|
57
|
+
}, headerGroup.headers.map(function (props) {
|
58
|
+
return /*#__PURE__*/React__default.createElement(Header, {
|
59
|
+
key: props.id,
|
60
|
+
header: props,
|
61
|
+
scrollToIndex: table.renderer.scrollToIndex
|
62
|
+
});
|
63
|
+
}));
|
64
|
+
})), emptyStateReason ? (/*#__PURE__*/React__default.createElement(EmptyStateBody, {
|
61
65
|
emptyState: props.table.props.emptyState,
|
62
66
|
isReady: table.meta.server.isEnabled ? table.meta.server.isReady : true,
|
63
67
|
reason: emptyStateReason
|
@@ -66,10 +70,9 @@ function TableGrid(props) {
|
|
66
70
|
table: table.instance,
|
67
71
|
tableElement: table.ref.current,
|
68
72
|
scrollToIndex: table.renderer.scrollToIndex,
|
69
|
-
style: props.children ? {
|
70
|
-
...table.renderer.style,
|
73
|
+
style: props.children ? _extends({}, table.renderer.style, {
|
71
74
|
height: table.renderer.style.height + ROW_HEIGHT_ESTIMATES[table.meta.rowHeight.height]
|
72
|
-
} : table.renderer.style
|
75
|
+
}) : table.renderer.style
|
73
76
|
}, table.renderer.rows, props.children), table.meta.footer.isEnabled ? /*#__PURE__*/React__default.createElement(Foot, {
|
74
77
|
table: table.instance
|
75
78
|
}, footerRows) : null)))));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../../../../../../../src/primitives/Table/Core/Table.tsx"],"sourcesContent":["import React from 'react';\nimport { FocusScope } from '@react-aria/focus';\nimport { Header } from './components/Header/Header';\nimport { Body } from './components/Body/Body';\nimport { Foot } from './components/Footer/Footer';\nimport { EmptyStateBody } from './components/Body/EmptyStateBody';\nimport { useTableReturnValue } from './useTable';\nimport { TableToolbar } from './components/Toolbar/Toolbar';\nimport { TableEmptyStateReason } from '../types';\nimport { ROW_HEIGHT_ESTIMATES } from './util/rows';\nimport './style.css';\n\ntype TableProps = {\n children: JSX.Element | Array<JSX.Element | null>;\n};\n\nexport function Table(props: TableProps) {\n return <>{props.children}</>;\n}\nTable.Toolbar = TableToolbar;\nTable.Grid = TableGrid;\n\nexport type TableGridProps<TType = unknown> = React.TableHTMLAttributes<HTMLTableElement> & {\n 'data-taco': string;\n enableHorizontalArrowKeyNavigation?: boolean;\n footerRows?: null | JSX.Element | JSX.Element[];\n table: useTableReturnValue<TType>;\n};\n\nfunction getEmptyStateReason<TType = unknown>(table: useTableReturnValue<TType>): TableEmptyStateReason | null {\n if (table.instance.getFilteredRowModel().rows.length === 0 && table.instance.getCoreRowModel().rows.length !== 0) {\n const state = table.instance.getState();\n\n if (table.meta.search.enableGlobalFilter && !!state.globalFilter) {\n return 'searching';\n }\n\n return 'filtering';\n }\n if (table.instance.getCoreRowModel().rows.length === 0) {\n return 'empty';\n }\n\n return null;\n}\n\nexport function TableGrid<TType = unknown>(props: TableGridProps<TType>) {\n const { enableHorizontalArrowKeyNavigation, footerRows, table, ...attributes } = props;\n const handleFocus =\n table.meta.rowActive.rowActiveIndex === undefined\n ? (event: React.FocusEvent) => {\n table.meta.rowActive.handleFocus(event, table.meta.length, table.renderer.scrollToIndex);\n }\n : undefined;\n const emptyStateReason = getEmptyStateReason(table);\n\n return (\n <>\n <style>{table.stylesheet}</style>\n <FocusScope>\n <table\n {...attributes}\n id={table.id}\n data-table-font-size={table.meta.fontSize.size}\n data-table-grouped={!!table.state.grouping?.length}\n data-table-horizontally-scrolled={table.meta.columnFreezing.isHorizontallyScrolled ? true : undefined}\n data-table-status={table.meta.server.isEnabled ? (table.meta.server.isReady ? 'ready' : undefined) : 'ready'}\n data-table-pause-hover={table.meta.rowActive.isHoverStatePaused ? true : undefined}\n data-table-resizing={table.state.columnSizingInfo.isResizingColumn ? true : undefined}\n data-table-row-height={table.meta.rowHeight.height}\n onFocus={handleFocus}\n onScroll={table.meta.columnFreezing.handleScroll}\n ref={table.ref}\n style={table.style}\n tabIndex={-1}>\n <thead>\n {table.instance.getHeaderGroups().map(headerGroup => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map(props => (\n <Header key={props.id} header={props} scrollToIndex={table.renderer.scrollToIndex} />\n ))}\n </tr>\n ))}\n </thead>\n {emptyStateReason ? (\n <EmptyStateBody\n emptyState={props.table.props.emptyState}\n isReady={table.meta.server.isEnabled ? table.meta.server.isReady : true}\n reason={emptyStateReason}\n />\n ) : (\n <>\n <Body\n enableHorizontalArrowKeyNavigation={enableHorizontalArrowKeyNavigation}\n table={table.instance}\n tableElement={table.ref.current}\n scrollToIndex={table.renderer.scrollToIndex}\n style={\n props.children\n ? {\n ...table.renderer.style,\n height:\n (table.renderer.style.height as number) +\n ROW_HEIGHT_ESTIMATES[table.meta.rowHeight.height],\n }\n : table.renderer.style\n }>\n {table.renderer.rows}\n {props.children}\n </Body>\n {table.meta.footer.isEnabled ? <Foot table={table.instance}>{footerRows}</Foot> : null}\n </>\n )}\n </table>\n </FocusScope>\n </>\n );\n}\n"],"names":["Table","props","React","children","Toolbar","TableToolbar","Grid","TableGrid","getEmptyStateReason","table","instance","getFilteredRowModel","rows","length","getCoreRowModel","state","getState","meta","search","enableGlobalFilter","globalFilter","enableHorizontalArrowKeyNavigation","footerRows","attributes","handleFocus","rowActive","rowActiveIndex","undefined","event","renderer","scrollToIndex","emptyStateReason","stylesheet","FocusScope","id","fontSize","size","_table$state$grouping","grouping","columnFreezing","isHorizontallyScrolled","server","isEnabled","isReady","isHoverStatePaused","columnSizingInfo","isResizingColumn","rowHeight","height","onFocus","onScroll","handleScroll","ref","style","tabIndex","getHeaderGroups","map","headerGroup","key","headers","Header","header","EmptyStateBody","emptyState","reason","Body","tableElement","current","ROW_HEIGHT_ESTIMATES","footer","Foot"],"mappings":"
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../../../../../../src/primitives/Table/Core/Table.tsx"],"sourcesContent":["import React from 'react';\nimport { FocusScope } from '@react-aria/focus';\nimport { Header } from './components/Header/Header';\nimport { Body } from './components/Body/Body';\nimport { Foot } from './components/Footer/Footer';\nimport { EmptyStateBody } from './components/Body/EmptyStateBody';\nimport { useTableReturnValue } from './useTable';\nimport { TableToolbar } from './components/Toolbar/Toolbar';\nimport { TableEmptyStateReason } from '../types';\nimport { ROW_HEIGHT_ESTIMATES } from './util/rows';\nimport './style.css';\n\ntype TableProps = {\n children: JSX.Element | Array<JSX.Element | null>;\n};\n\nexport function Table(props: TableProps) {\n return <>{props.children}</>;\n}\nTable.Toolbar = TableToolbar;\nTable.Grid = TableGrid;\n\nexport type TableGridProps<TType = unknown> = React.TableHTMLAttributes<HTMLTableElement> & {\n 'data-taco': string;\n enableHorizontalArrowKeyNavigation?: boolean;\n footerRows?: null | JSX.Element | JSX.Element[];\n table: useTableReturnValue<TType>;\n};\n\nfunction getEmptyStateReason<TType = unknown>(table: useTableReturnValue<TType>): TableEmptyStateReason | null {\n if (table.instance.getFilteredRowModel().rows.length === 0 && table.instance.getCoreRowModel().rows.length !== 0) {\n const state = table.instance.getState();\n\n if (table.meta.search.enableGlobalFilter && !!state.globalFilter) {\n return 'searching';\n }\n\n return 'filtering';\n }\n if (table.instance.getCoreRowModel().rows.length === 0) {\n return 'empty';\n }\n\n return null;\n}\n\nexport function TableGrid<TType = unknown>(props: TableGridProps<TType>) {\n const { enableHorizontalArrowKeyNavigation, footerRows, table, ...attributes } = props;\n const handleFocus =\n table.meta.rowActive.rowActiveIndex === undefined\n ? (event: React.FocusEvent) => {\n table.meta.rowActive.handleFocus(event, table.meta.length, table.renderer.scrollToIndex);\n }\n : undefined;\n const emptyStateReason = getEmptyStateReason(table);\n\n return (\n <>\n <style>{table.stylesheet}</style>\n <FocusScope>\n <table\n {...attributes}\n id={table.id}\n data-table-font-size={table.meta.fontSize.size}\n data-table-grouped={!!table.state.grouping?.length}\n data-table-horizontally-scrolled={table.meta.columnFreezing.isHorizontallyScrolled ? true : undefined}\n data-table-status={table.meta.server.isEnabled ? (table.meta.server.isReady ? 'ready' : undefined) : 'ready'}\n data-table-pause-hover={table.meta.rowActive.isHoverStatePaused ? true : undefined}\n data-table-resizing={table.state.columnSizingInfo.isResizingColumn ? true : undefined}\n data-table-row-height={table.meta.rowHeight.height}\n onFocus={handleFocus}\n onScroll={table.meta.columnFreezing.handleScroll}\n ref={table.ref}\n style={table.style}\n tabIndex={-1}>\n <thead>\n {table.instance.getHeaderGroups().map(headerGroup => (\n <tr key={headerGroup.id}>\n {headerGroup.headers.map(props => (\n <Header key={props.id} header={props} scrollToIndex={table.renderer.scrollToIndex} />\n ))}\n </tr>\n ))}\n </thead>\n {emptyStateReason ? (\n <EmptyStateBody\n emptyState={props.table.props.emptyState}\n isReady={table.meta.server.isEnabled ? table.meta.server.isReady : true}\n reason={emptyStateReason}\n />\n ) : (\n <>\n <Body\n enableHorizontalArrowKeyNavigation={enableHorizontalArrowKeyNavigation}\n table={table.instance}\n tableElement={table.ref.current}\n scrollToIndex={table.renderer.scrollToIndex}\n style={\n props.children\n ? {\n ...table.renderer.style,\n height:\n (table.renderer.style.height as number) +\n ROW_HEIGHT_ESTIMATES[table.meta.rowHeight.height],\n }\n : table.renderer.style\n }>\n {table.renderer.rows}\n {props.children}\n </Body>\n {table.meta.footer.isEnabled ? <Foot table={table.instance}>{footerRows}</Foot> : null}\n </>\n )}\n </table>\n </FocusScope>\n </>\n );\n}\n"],"names":["Table","props","React","children","Toolbar","TableToolbar","Grid","TableGrid","getEmptyStateReason","table","instance","getFilteredRowModel","rows","length","getCoreRowModel","state","getState","meta","search","enableGlobalFilter","globalFilter","enableHorizontalArrowKeyNavigation","footerRows","attributes","_objectWithoutPropertiesLoose","_excluded","handleFocus","rowActive","rowActiveIndex","undefined","event","renderer","scrollToIndex","emptyStateReason","stylesheet","FocusScope","id","fontSize","size","_table$state$grouping","grouping","columnFreezing","isHorizontallyScrolled","server","isEnabled","isReady","isHoverStatePaused","columnSizingInfo","isResizingColumn","rowHeight","height","onFocus","onScroll","handleScroll","ref","style","tabIndex","getHeaderGroups","map","headerGroup","key","headers","Header","header","EmptyStateBody","emptyState","reason","Body","tableElement","current","_extends","ROW_HEIGHT_ESTIMATES","footer","Foot"],"mappings":"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"}
|
@@ -1,33 +1,34 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { hasFocusableElement } from '../../../../../utils/dom.js';
|
3
4
|
import { isPressingMetaKey } from '../../../../../utils/keyboard.js';
|
4
5
|
import { useAugmentedFocusManager } from './util.js';
|
5
6
|
|
7
|
+
var _excluded = ["enableHorizontalArrowKeyNavigation", "scrollToIndex", "table", "tableElement"];
|
6
8
|
function Body(props) {
|
7
|
-
|
8
|
-
enableHorizontalArrowKeyNavigation = false,
|
9
|
-
scrollToIndex,
|
10
|
-
table,
|
11
|
-
tableElement,
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
const handleKeyDown = event => {
|
9
|
+
var _props$enableHorizont = props.enableHorizontalArrowKeyNavigation,
|
10
|
+
enableHorizontalArrowKeyNavigation = _props$enableHorizont === void 0 ? false : _props$enableHorizont,
|
11
|
+
scrollToIndex = props.scrollToIndex,
|
12
|
+
table = props.table,
|
13
|
+
tableElement = props.tableElement,
|
14
|
+
attributes = _objectWithoutPropertiesLoose(props, _excluded);
|
15
|
+
var ref = React__default.useRef(null);
|
16
|
+
var focusManager = useAugmentedFocusManager();
|
17
|
+
var tableMeta = table.options.meta;
|
18
|
+
var handleKeyDown = function handleKeyDown(event) {
|
18
19
|
if (event.isDefaultPrevented() || event.isPropagationStopped()) {
|
19
20
|
return;
|
20
21
|
}
|
21
22
|
if (tableMeta.rowActive.rowActiveIndex !== undefined) {
|
22
|
-
|
23
|
-
|
23
|
+
var isFirstRow = tableMeta.rowActive.rowActiveIndex === 0;
|
24
|
+
var isLastRow = tableMeta.rowActive.rowActiveIndex === tableMeta.length - 1;
|
24
25
|
if (event.key === 'Tab' || enableHorizontalArrowKeyNavigation && (event.key === 'ArrowLeft' || event.key === 'ArrowRight')) {
|
25
26
|
if (event.key === 'Tab' && !hasFocusableElement(event.target.closest('tr[data-row-id]'))) {
|
26
27
|
return;
|
27
28
|
}
|
28
29
|
tableMeta.rowActive.setHoverStatePaused(true);
|
29
|
-
|
30
|
-
|
30
|
+
var isMetaKeyPressed = isPressingMetaKey(event);
|
31
|
+
var focusedElement;
|
31
32
|
switch (event.key) {
|
32
33
|
case 'ArrowLeft':
|
33
34
|
focusedElement = isMetaKeyPressed ? focusManager.focusFirst() : focusManager.focusPrevious(true);
|
@@ -55,9 +56,9 @@ function Body(props) {
|
|
55
56
|
// there are no previous elements to focus, go up a row or go outside the table
|
56
57
|
// but only if there are actually any focusable elements in the row
|
57
58
|
event.preventDefault();
|
58
|
-
|
59
|
+
var prevIndex = tableMeta.rowActive.rowActiveIndex - 1;
|
59
60
|
tableMeta.rowActive.setRowActiveIndex(prevIndex);
|
60
|
-
requestAnimationFrame(()
|
61
|
+
requestAnimationFrame(function () {
|
61
62
|
focusManager.focusLast();
|
62
63
|
scrollToIndex(prevIndex);
|
63
64
|
});
|
@@ -67,9 +68,9 @@ function Body(props) {
|
|
67
68
|
// there are no next elements to focus, go down a row or go outside the table
|
68
69
|
// but only if there are actually any focusable elements in the row
|
69
70
|
event.preventDefault();
|
70
|
-
|
71
|
+
var nextIndex = tableMeta.rowActive.rowActiveIndex + 1;
|
71
72
|
tableMeta.rowActive.setRowActiveIndex(nextIndex);
|
72
|
-
requestAnimationFrame(()
|
73
|
+
requestAnimationFrame(function () {
|
73
74
|
focusManager.focusFirst();
|
74
75
|
scrollToIndex(nextIndex);
|
75
76
|
});
|
@@ -78,16 +79,18 @@ function Body(props) {
|
|
78
79
|
}
|
79
80
|
}
|
80
81
|
};
|
81
|
-
|
82
|
+
var handleMouseMove = React__default.useCallback(function (event) {
|
82
83
|
var _event$target, _event$target$closest;
|
83
|
-
|
84
|
+
var index = (_event$target = event.target) === null || _event$target === void 0 ? void 0 : (_event$target$closest = _event$target.closest('tr')) === null || _event$target$closest === void 0 ? void 0 : _event$target$closest.getAttribute('data-row-index');
|
84
85
|
if (index) {
|
85
86
|
tableMeta.rowActive.setRowHoverIndex(Number.parseInt(index));
|
86
87
|
}
|
87
88
|
}, []);
|
88
89
|
// Sometimes this event does not trigger if the mouse leaves the window without leaving boundary of the table
|
89
90
|
// this is a browser level bug and there's not much to be done about it
|
90
|
-
|
91
|
+
var handleMouseLeave = React__default.useCallback(function () {
|
92
|
+
return tableMeta.rowActive.setRowHoverIndex(undefined);
|
93
|
+
}, []);
|
91
94
|
return /*#__PURE__*/React__default.createElement("tbody", Object.assign({}, attributes, {
|
92
95
|
onKeyDown: handleKeyDown,
|
93
96
|
onMouseLeave: handleMouseLeave,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Body.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Body/Body.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useAugmentedFocusManager } from './util';\nimport { hasFocusableElement } from '../../../../../utils/dom';\nimport { isPressingMetaKey } from '../../../../../utils/keyboard';\nimport { TableRef } from '../../../types';\n\ntype BodyProps<TType = unknown> = React.HTMLAttributes<HTMLTableSectionElement> & {\n enableHorizontalArrowKeyNavigation?: boolean;\n scrollToIndex: (index: number) => void;\n table: ReactTable<TType>;\n tableElement: TableRef | null;\n};\n\nexport function Body<TType = unknown>(props: BodyProps<TType>) {\n const { enableHorizontalArrowKeyNavigation = false, scrollToIndex, table, tableElement, ...attributes } = props;\n const ref = React.useRef<HTMLTableSectionElement>(null);\n const focusManager = useAugmentedFocusManager();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.isDefaultPrevented() || event.isPropagationStopped()) {\n return;\n }\n\n if (tableMeta.rowActive.rowActiveIndex !== undefined) {\n const isFirstRow = tableMeta.rowActive.rowActiveIndex === 0;\n const isLastRow = tableMeta.rowActive.rowActiveIndex === tableMeta.length - 1;\n if (\n event.key === 'Tab' ||\n (enableHorizontalArrowKeyNavigation && (event.key === 'ArrowLeft' || event.key === 'ArrowRight'))\n ) {\n if (event.key === 'Tab' && !hasFocusableElement((event.target as HTMLElement).closest('tr[data-row-id]'))) {\n return;\n }\n\n tableMeta.rowActive.setHoverStatePaused(true);\n\n const isMetaKeyPressed = isPressingMetaKey(event);\n let focusedElement;\n\n switch (event.key) {\n case 'ArrowLeft':\n focusedElement = isMetaKeyPressed ? focusManager.focusFirst() : focusManager.focusPrevious(true);\n break;\n case 'ArrowRight':\n focusedElement = isMetaKeyPressed ? focusManager.focusLast() : focusManager.focusNext(true);\n\n // Scrolls table all the way to the right\n if (isMetaKeyPressed && tableElement) {\n tableElement.scrollLeft = tableElement.scrollWidth;\n }\n\n break;\n default:\n focusedElement = event.shiftKey ? focusManager.focusPrevious() : focusManager.focusNext();\n break;\n }\n\n if (focusedElement) {\n // override default behaviour, since we're handling focus internally now\n event.preventDefault();\n return;\n }\n\n // The code below only executes when focusedElement was undefined/null. This happens only when arrow-left/shift+tab\n // is pressed on the first cell or arrow-right/tab is pressed on the last cell.\n if (event.shiftKey || event.key === 'ArrowLeft') {\n if (!isFirstRow) {\n // there are no previous elements to focus, go up a row or go outside the table\n // but only if there are actually any focusable elements in the row\n event.preventDefault();\n const prevIndex = tableMeta.rowActive.rowActiveIndex - 1;\n tableMeta.rowActive.setRowActiveIndex(prevIndex);\n requestAnimationFrame(() => {\n focusManager.focusLast();\n scrollToIndex(prevIndex);\n });\n }\n } else {\n if (!isLastRow) {\n // there are no next elements to focus, go down a row or go outside the table\n // but only if there are actually any focusable elements in the row\n event.preventDefault();\n const nextIndex = tableMeta.rowActive.rowActiveIndex + 1;\n tableMeta.rowActive.setRowActiveIndex(nextIndex);\n requestAnimationFrame(() => {\n focusManager.focusFirst();\n scrollToIndex(nextIndex);\n });\n }\n }\n }\n }\n };\n const handleMouseMove = React.useCallback((event: React.MouseEvent<HTMLTableSectionElement>) => {\n const index = (event.target as HTMLElement)?.closest('tr')?.getAttribute('data-row-index');\n\n if (index) {\n tableMeta.rowActive.setRowHoverIndex(Number.parseInt(index));\n }\n }, []);\n\n // Sometimes this event does not trigger if the mouse leaves the window without leaving boundary of the table\n // this is a browser level bug and there's not much to be done about it\n const handleMouseLeave = React.useCallback(() => tableMeta.rowActive.setRowHoverIndex(undefined), []);\n\n return (\n <tbody\n {...attributes}\n onKeyDown={handleKeyDown}\n onMouseLeave={handleMouseLeave}\n onMouseMove={handleMouseMove}\n ref={ref}\n />\n );\n}\n"],"names":["Body","props","enableHorizontalArrowKeyNavigation","scrollToIndex","table","tableElement","attributes","ref","React","useRef","focusManager","useAugmentedFocusManager","tableMeta","options","meta","handleKeyDown","event","isDefaultPrevented","isPropagationStopped","rowActive","rowActiveIndex","undefined","isFirstRow","isLastRow","length","key","hasFocusableElement","target","closest","setHoverStatePaused","isMetaKeyPressed","isPressingMetaKey","focusedElement","focusFirst","focusPrevious","focusLast","focusNext","scrollLeft","scrollWidth","shiftKey","preventDefault","prevIndex","setRowActiveIndex","requestAnimationFrame","nextIndex","handleMouseMove","useCallback","index","_event$target","_event$target$closest","getAttribute","setRowHoverIndex","Number","parseInt","handleMouseLeave","onKeyDown","onMouseLeave","onMouseMove"],"mappings":"
|
1
|
+
{"version":3,"file":"Body.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Body/Body.tsx"],"sourcesContent":["import React from 'react';\nimport { Table as ReactTable, TableMeta as ReactTableMeta } from '@tanstack/react-table';\nimport { useAugmentedFocusManager } from './util';\nimport { hasFocusableElement } from '../../../../../utils/dom';\nimport { isPressingMetaKey } from '../../../../../utils/keyboard';\nimport { TableRef } from '../../../types';\n\ntype BodyProps<TType = unknown> = React.HTMLAttributes<HTMLTableSectionElement> & {\n enableHorizontalArrowKeyNavigation?: boolean;\n scrollToIndex: (index: number) => void;\n table: ReactTable<TType>;\n tableElement: TableRef | null;\n};\n\nexport function Body<TType = unknown>(props: BodyProps<TType>) {\n const { enableHorizontalArrowKeyNavigation = false, scrollToIndex, table, tableElement, ...attributes } = props;\n const ref = React.useRef<HTMLTableSectionElement>(null);\n const focusManager = useAugmentedFocusManager();\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n\n const handleKeyDown = (event: React.KeyboardEvent) => {\n if (event.isDefaultPrevented() || event.isPropagationStopped()) {\n return;\n }\n\n if (tableMeta.rowActive.rowActiveIndex !== undefined) {\n const isFirstRow = tableMeta.rowActive.rowActiveIndex === 0;\n const isLastRow = tableMeta.rowActive.rowActiveIndex === tableMeta.length - 1;\n if (\n event.key === 'Tab' ||\n (enableHorizontalArrowKeyNavigation && (event.key === 'ArrowLeft' || event.key === 'ArrowRight'))\n ) {\n if (event.key === 'Tab' && !hasFocusableElement((event.target as HTMLElement).closest('tr[data-row-id]'))) {\n return;\n }\n\n tableMeta.rowActive.setHoverStatePaused(true);\n\n const isMetaKeyPressed = isPressingMetaKey(event);\n let focusedElement;\n\n switch (event.key) {\n case 'ArrowLeft':\n focusedElement = isMetaKeyPressed ? focusManager.focusFirst() : focusManager.focusPrevious(true);\n break;\n case 'ArrowRight':\n focusedElement = isMetaKeyPressed ? focusManager.focusLast() : focusManager.focusNext(true);\n\n // Scrolls table all the way to the right\n if (isMetaKeyPressed && tableElement) {\n tableElement.scrollLeft = tableElement.scrollWidth;\n }\n\n break;\n default:\n focusedElement = event.shiftKey ? focusManager.focusPrevious() : focusManager.focusNext();\n break;\n }\n\n if (focusedElement) {\n // override default behaviour, since we're handling focus internally now\n event.preventDefault();\n return;\n }\n\n // The code below only executes when focusedElement was undefined/null. This happens only when arrow-left/shift+tab\n // is pressed on the first cell or arrow-right/tab is pressed on the last cell.\n if (event.shiftKey || event.key === 'ArrowLeft') {\n if (!isFirstRow) {\n // there are no previous elements to focus, go up a row or go outside the table\n // but only if there are actually any focusable elements in the row\n event.preventDefault();\n const prevIndex = tableMeta.rowActive.rowActiveIndex - 1;\n tableMeta.rowActive.setRowActiveIndex(prevIndex);\n requestAnimationFrame(() => {\n focusManager.focusLast();\n scrollToIndex(prevIndex);\n });\n }\n } else {\n if (!isLastRow) {\n // there are no next elements to focus, go down a row or go outside the table\n // but only if there are actually any focusable elements in the row\n event.preventDefault();\n const nextIndex = tableMeta.rowActive.rowActiveIndex + 1;\n tableMeta.rowActive.setRowActiveIndex(nextIndex);\n requestAnimationFrame(() => {\n focusManager.focusFirst();\n scrollToIndex(nextIndex);\n });\n }\n }\n }\n }\n };\n const handleMouseMove = React.useCallback((event: React.MouseEvent<HTMLTableSectionElement>) => {\n const index = (event.target as HTMLElement)?.closest('tr')?.getAttribute('data-row-index');\n\n if (index) {\n tableMeta.rowActive.setRowHoverIndex(Number.parseInt(index));\n }\n }, []);\n\n // Sometimes this event does not trigger if the mouse leaves the window without leaving boundary of the table\n // this is a browser level bug and there's not much to be done about it\n const handleMouseLeave = React.useCallback(() => tableMeta.rowActive.setRowHoverIndex(undefined), []);\n\n return (\n <tbody\n {...attributes}\n onKeyDown={handleKeyDown}\n onMouseLeave={handleMouseLeave}\n onMouseMove={handleMouseMove}\n ref={ref}\n />\n );\n}\n"],"names":["Body","props","_props$enableHorizont","enableHorizontalArrowKeyNavigation","scrollToIndex","table","tableElement","attributes","_objectWithoutPropertiesLoose","_excluded","ref","React","useRef","focusManager","useAugmentedFocusManager","tableMeta","options","meta","handleKeyDown","event","isDefaultPrevented","isPropagationStopped","rowActive","rowActiveIndex","undefined","isFirstRow","isLastRow","length","key","hasFocusableElement","target","closest","setHoverStatePaused","isMetaKeyPressed","isPressingMetaKey","focusedElement","focusFirst","focusPrevious","focusLast","focusNext","scrollLeft","scrollWidth","shiftKey","preventDefault","prevIndex","setRowActiveIndex","requestAnimationFrame","nextIndex","handleMouseMove","useCallback","index","_event$target","_event$target$closest","getAttribute","setRowHoverIndex","Number","parseInt","handleMouseLeave","onKeyDown","onMouseLeave","onMouseMove"],"mappings":"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"}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
|
4
|
+
var _excluded = ["emptyState", "isReady", "reason"];
|
3
5
|
function EmptyStateBody(props) {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
...attributes
|
9
|
-
} = props;
|
6
|
+
var Placeholder = props.emptyState,
|
7
|
+
isReady = props.isReady,
|
8
|
+
reason = props.reason,
|
9
|
+
attributes = _objectWithoutPropertiesLoose(props, _excluded);
|
10
10
|
if (!isReady) {
|
11
11
|
return /*#__PURE__*/React__default.createElement("tbody", Object.assign({}, attributes, {
|
12
12
|
className: "!auto-rows-fr"
|
package/dist/esm/packages/taco/src/primitives/Table/Core/components/Body/EmptyStateBody.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"EmptyStateBody.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Body/EmptyStateBody.tsx"],"sourcesContent":["import React from 'react';\nimport { TableEmptyStateReason, TableEmptyStateRenderer } from '../../../types';\n\ntype EmptyStateProps = React.HTMLAttributes<HTMLTableSectionElement> & {\n emptyState?: TableEmptyStateRenderer;\n isReady: boolean;\n reason: TableEmptyStateReason;\n};\n\nexport function EmptyStateBody(props: EmptyStateProps) {\n const { emptyState: Placeholder, isReady, reason, ...attributes } = props;\n\n if (!isReady) {\n return <tbody {...attributes} className=\"!auto-rows-fr\" />;\n }\n\n return (\n <tbody {...attributes} className=\"!auto-rows-fr\">\n <tr className=\"!auto-rows-fr\">\n <td className=\"col-span-full !border-0 !p-0 hover:!bg-white\">\n {Placeholder ? <Placeholder reason={reason} /> : undefined}\n </td>\n </tr>\n </tbody>\n );\n}\n"],"names":["EmptyStateBody","props","
|
1
|
+
{"version":3,"file":"EmptyStateBody.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Body/EmptyStateBody.tsx"],"sourcesContent":["import React from 'react';\nimport { TableEmptyStateReason, TableEmptyStateRenderer } from '../../../types';\n\ntype EmptyStateProps = React.HTMLAttributes<HTMLTableSectionElement> & {\n emptyState?: TableEmptyStateRenderer;\n isReady: boolean;\n reason: TableEmptyStateReason;\n};\n\nexport function EmptyStateBody(props: EmptyStateProps) {\n const { emptyState: Placeholder, isReady, reason, ...attributes } = props;\n\n if (!isReady) {\n return <tbody {...attributes} className=\"!auto-rows-fr\" />;\n }\n\n return (\n <tbody {...attributes} className=\"!auto-rows-fr\">\n <tr className=\"!auto-rows-fr\">\n <td className=\"col-span-full !border-0 !p-0 hover:!bg-white\">\n {Placeholder ? <Placeholder reason={reason} /> : undefined}\n </td>\n </tr>\n </tbody>\n );\n}\n"],"names":["EmptyStateBody","props","Placeholder","emptyState","isReady","reason","attributes","_objectWithoutPropertiesLoose","_excluded","React","className","undefined"],"mappings":";;;;SASgBA,cAAcA,CAACC,KAAsB;EACjD,IAAoBC,WAAW,GAAqCD,KAAK,CAAjEE,UAAU;IAAeC,OAAO,GAA4BH,KAAK,CAAxCG,OAAO;IAAEC,MAAM,GAAoBJ,KAAK,CAA/BI,MAAM;IAAKC,UAAU,GAAAC,6BAAA,CAAKN,KAAK,EAAAO,SAAA;EAEzE,IAAI,CAACJ,OAAO,EAAE;IACV,oBAAOK,wDAAWH,UAAU;MAAEI,SAAS,EAAC;OAAkB;;EAG9D,oBACID,wDAAWH,UAAU;IAAEI,SAAS,EAAC;mBAC7BD;IAAIC,SAAS,EAAC;kBACVD;IAAIC,SAAS,EAAC;KACTR,WAAW,gBAAGO,6BAACP,WAAW;IAACG,MAAM,EAAEA;IAAU,GAAGM,SAAS,CACzD,CACJ,CACD;AAEhB;;;;"}
|
@@ -1,27 +1,43 @@
|
|
1
1
|
import { isElementInteractive, hasFocusableElement } from '../../../../../utils/dom.js';
|
2
2
|
import { useFocusManager } from '@react-aria/focus';
|
3
3
|
|
4
|
-
|
5
|
-
accept:
|
4
|
+
var FOCUS_MANAGER_OPTIONS_TAB = {
|
5
|
+
accept: function accept(element) {
|
6
|
+
return !!element.closest('tr[data-row-active="true"]');
|
7
|
+
},
|
6
8
|
tabbable: true
|
7
9
|
};
|
8
|
-
|
9
|
-
accept: element
|
10
|
-
|
10
|
+
var FOCUS_MANAGER_OPTIONS_ARROW_KEYS = {
|
11
|
+
accept: function accept(element) {
|
12
|
+
var acceptTabbable = isElementInteractive(element) ? element.getAttribute('tabindex') !== '-1' : true;
|
11
13
|
return !!element.closest('tr[data-row-active="true"]') && !hasFocusableElement(element) && acceptTabbable;
|
12
14
|
}
|
13
15
|
};
|
14
16
|
function useAugmentedFocusManager() {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
var focusManager = useFocusManager();
|
18
|
+
var focusPrevious = function focusPrevious(arrowNavigation) {
|
19
|
+
if (arrowNavigation === void 0) {
|
20
|
+
arrowNavigation = false;
|
21
|
+
}
|
22
|
+
return focusManager.focusPrevious(arrowNavigation ? FOCUS_MANAGER_OPTIONS_ARROW_KEYS : FOCUS_MANAGER_OPTIONS_TAB);
|
23
|
+
};
|
24
|
+
var focusNext = function focusNext(arrowNavigation) {
|
25
|
+
if (arrowNavigation === void 0) {
|
26
|
+
arrowNavigation = false;
|
27
|
+
}
|
28
|
+
return focusManager.focusNext(arrowNavigation ? FOCUS_MANAGER_OPTIONS_ARROW_KEYS : FOCUS_MANAGER_OPTIONS_TAB);
|
29
|
+
};
|
30
|
+
var focusFirst = function focusFirst() {
|
31
|
+
return focusManager.focusFirst(FOCUS_MANAGER_OPTIONS_TAB);
|
32
|
+
};
|
33
|
+
var focusLast = function focusLast() {
|
34
|
+
return focusManager.focusLast(FOCUS_MANAGER_OPTIONS_TAB);
|
35
|
+
};
|
20
36
|
return {
|
21
|
-
focusPrevious,
|
22
|
-
focusNext,
|
23
|
-
focusFirst,
|
24
|
-
focusLast
|
37
|
+
focusPrevious: focusPrevious,
|
38
|
+
focusNext: focusNext,
|
39
|
+
focusFirst: focusFirst,
|
40
|
+
focusLast: focusLast
|
25
41
|
};
|
26
42
|
}
|
27
43
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"util.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Body/util.ts"],"sourcesContent":["import { useFocusManager } from '@react-aria/focus';\nimport { hasFocusableElement, isElementInteractive } from '../../../../../utils/dom';\n\nconst FOCUS_MANAGER_OPTIONS_TAB = {\n accept: (element: Element) => !!element.closest('tr[data-row-active=\"true\"]'),\n tabbable: true,\n};\n\nconst FOCUS_MANAGER_OPTIONS_ARROW_KEYS = {\n accept: (element: Element) => {\n const acceptTabbable = isElementInteractive(element) ? element.getAttribute('tabindex') !== '-1' : true;\n return !!element.closest('tr[data-row-active=\"true\"]') && !hasFocusableElement(element as HTMLElement) && acceptTabbable;\n },\n};\n\nexport function useAugmentedFocusManager() {\n const focusManager = useFocusManager();\n\n const focusPrevious = (arrowNavigation = false) =>\n focusManager.focusPrevious(arrowNavigation ? FOCUS_MANAGER_OPTIONS_ARROW_KEYS : FOCUS_MANAGER_OPTIONS_TAB);\n const focusNext = (arrowNavigation = false) =>\n focusManager.focusNext(arrowNavigation ? FOCUS_MANAGER_OPTIONS_ARROW_KEYS : FOCUS_MANAGER_OPTIONS_TAB);\n const focusFirst = () => focusManager.focusFirst(FOCUS_MANAGER_OPTIONS_TAB);\n const focusLast = () => focusManager.focusLast(FOCUS_MANAGER_OPTIONS_TAB);\n\n return {\n focusPrevious,\n focusNext,\n focusFirst,\n focusLast,\n };\n}\n"],"names":["FOCUS_MANAGER_OPTIONS_TAB","accept","element","closest","tabbable","FOCUS_MANAGER_OPTIONS_ARROW_KEYS","acceptTabbable","isElementInteractive","getAttribute","hasFocusableElement","useAugmentedFocusManager","focusManager","useFocusManager","focusPrevious","arrowNavigation","focusNext","focusFirst","focusLast"],"mappings":";;;AAGA,
|
1
|
+
{"version":3,"file":"util.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Body/util.ts"],"sourcesContent":["import { useFocusManager } from '@react-aria/focus';\nimport { hasFocusableElement, isElementInteractive } from '../../../../../utils/dom';\n\nconst FOCUS_MANAGER_OPTIONS_TAB = {\n accept: (element: Element) => !!element.closest('tr[data-row-active=\"true\"]'),\n tabbable: true,\n};\n\nconst FOCUS_MANAGER_OPTIONS_ARROW_KEYS = {\n accept: (element: Element) => {\n const acceptTabbable = isElementInteractive(element) ? element.getAttribute('tabindex') !== '-1' : true;\n return !!element.closest('tr[data-row-active=\"true\"]') && !hasFocusableElement(element as HTMLElement) && acceptTabbable;\n },\n};\n\nexport function useAugmentedFocusManager() {\n const focusManager = useFocusManager();\n\n const focusPrevious = (arrowNavigation = false) =>\n focusManager.focusPrevious(arrowNavigation ? FOCUS_MANAGER_OPTIONS_ARROW_KEYS : FOCUS_MANAGER_OPTIONS_TAB);\n const focusNext = (arrowNavigation = false) =>\n focusManager.focusNext(arrowNavigation ? FOCUS_MANAGER_OPTIONS_ARROW_KEYS : FOCUS_MANAGER_OPTIONS_TAB);\n const focusFirst = () => focusManager.focusFirst(FOCUS_MANAGER_OPTIONS_TAB);\n const focusLast = () => focusManager.focusLast(FOCUS_MANAGER_OPTIONS_TAB);\n\n return {\n focusPrevious,\n focusNext,\n focusFirst,\n focusLast,\n };\n}\n"],"names":["FOCUS_MANAGER_OPTIONS_TAB","accept","element","closest","tabbable","FOCUS_MANAGER_OPTIONS_ARROW_KEYS","acceptTabbable","isElementInteractive","getAttribute","hasFocusableElement","useAugmentedFocusManager","focusManager","useFocusManager","focusPrevious","arrowNavigation","focusNext","focusFirst","focusLast"],"mappings":";;;AAGA,IAAMA,yBAAyB,GAAG;EAC9BC,MAAM,EAAE,SAAAA,OAACC,OAAgB;IAAA,OAAK,CAAC,CAACA,OAAO,CAACC,OAAO,CAAC,4BAA4B,CAAC;;EAC7EC,QAAQ,EAAE;CACb;AAED,IAAMC,gCAAgC,GAAG;EACrCJ,MAAM,EAAE,SAAAA,OAACC,OAAgB;IACrB,IAAMI,cAAc,GAAGC,oBAAoB,CAACL,OAAO,CAAC,GAAGA,OAAO,CAACM,YAAY,CAAC,UAAU,CAAC,KAAK,IAAI,GAAG,IAAI;IACvG,OAAO,CAAC,CAACN,OAAO,CAACC,OAAO,CAAC,4BAA4B,CAAC,IAAI,CAACM,mBAAmB,CAACP,OAAsB,CAAC,IAAII,cAAc;;CAE/H;SAEeI,wBAAwBA;EACpC,IAAMC,YAAY,GAAGC,eAAe,EAAE;EAEtC,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,eAAe;IAAA,IAAfA,eAAe;MAAfA,eAAe,GAAG,KAAK;;IAAA,OAC1CH,YAAY,CAACE,aAAa,CAACC,eAAe,GAAGT,gCAAgC,GAAGL,yBAAyB,CAAC;;EAC9G,IAAMe,SAAS,GAAG,SAAZA,SAASA,CAAID,eAAe;IAAA,IAAfA,eAAe;MAAfA,eAAe,GAAG,KAAK;;IAAA,OACtCH,YAAY,CAACI,SAAS,CAACD,eAAe,GAAGT,gCAAgC,GAAGL,yBAAyB,CAAC;;EAC1G,IAAMgB,UAAU,GAAG,SAAbA,UAAUA;IAAA,OAASL,YAAY,CAACK,UAAU,CAAChB,yBAAyB,CAAC;;EAC3E,IAAMiB,SAAS,GAAG,SAAZA,SAASA;IAAA,OAASN,YAAY,CAACM,SAAS,CAACjB,yBAAyB,CAAC;;EAEzE,OAAO;IACHa,aAAa,EAAbA,aAAa;IACbE,SAAS,EAATA,SAAS;IACTC,UAAU,EAAVA,UAAU;IACVC,SAAS,EAATA;GACH;AACL;;;;"}
|
@@ -1,21 +1,22 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { flexRender } from '@tanstack/react-table';
|
3
4
|
import { isInternalColumn } from '../../../../../useTableManager/util/columns.js';
|
4
5
|
import { getCellAttributes } from '../util.js';
|
5
6
|
|
7
|
+
var _excluded = ["cell", "cellRef", "index", "isHighlighted"],
|
8
|
+
_excluded2 = ["cellRef", "children", "isTruncated"];
|
6
9
|
function DisplayCell(props) {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
const value = cell.getValue();
|
18
|
-
let content;
|
10
|
+
var cell = props.cell,
|
11
|
+
cellRef = props.cellRef,
|
12
|
+
index = props.index,
|
13
|
+
isHighlighted = props.isHighlighted,
|
14
|
+
cellAttributes = _objectWithoutPropertiesLoose(props, _excluded);
|
15
|
+
var columnMeta = cell.column.columnDef.meta;
|
16
|
+
var attributes = getCellAttributes(cell, index, isHighlighted);
|
17
|
+
var isTruncated = !!columnMeta.enableTruncate;
|
18
|
+
var value = cell.getValue();
|
19
|
+
var content;
|
19
20
|
if (isInternalColumn(cell.column.id)) {
|
20
21
|
content = flexRender(cell.column.columnDef.cell, cell.getContext());
|
21
22
|
} else {
|
@@ -27,13 +28,11 @@ function DisplayCell(props) {
|
|
27
28
|
isTruncated: isTruncated
|
28
29
|
}), content);
|
29
30
|
}
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
...cellAttributes
|
36
|
-
} = props;
|
31
|
+
var MemoedDisplayCell = /*#__PURE__*/React__default.memo(function MemoedDisplayCell(props) {
|
32
|
+
var cellRef = props.cellRef,
|
33
|
+
children = props.children,
|
34
|
+
isTruncated = props.isTruncated,
|
35
|
+
cellAttributes = _objectWithoutPropertiesLoose(props, _excluded2);
|
37
36
|
return /*#__PURE__*/React__default.createElement("td", Object.assign({}, cellAttributes, {
|
38
37
|
ref: cellRef
|
39
38
|
}), isTruncated ? /*#__PURE__*/React__default.createElement("span", {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DisplayCell.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.tsx"],"sourcesContent":["import React from 'react';\nimport { ColumnMeta as ReactTableColumnMeta, flexRender } from '@tanstack/react-table';\nimport { getCellAttributes } from '../util';\nimport { TableCellRendererProps } from '../../../../types';\nimport { isInternalColumn } from '../../../../../useTableManager/util/columns';\n\nexport function DisplayCell<TType = unknown>(props: TableCellRendererProps<TType>) {\n const { cell, cellRef, index, isHighlighted, ...cellAttributes } = props;\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n const attributes = getCellAttributes(cell, index, isHighlighted);\n const isTruncated = !!columnMeta.enableTruncate;\n const value = cell.getValue<TType>();\n\n let content;\n\n if (isInternalColumn(cell.column.id)) {\n content = flexRender(cell.column.columnDef.cell, cell.getContext());\n } else {\n content = columnMeta.renderer?.(value, cell.row.original) ?? value ?? null;\n }\n\n return (\n <MemoedDisplayCell {...cellAttributes} {...attributes} cellRef={cellRef} isTruncated={isTruncated}>\n {content}\n </MemoedDisplayCell>\n );\n}\n\ntype MemoedDisplayCellProps = React.TdHTMLAttributes<HTMLTableCellElement> & {\n cellRef: any;\n isTruncated: boolean;\n};\n\nconst MemoedDisplayCell = React.memo(function MemoedDisplayCell(props: MemoedDisplayCellProps) {\n const { cellRef, children, isTruncated, ...cellAttributes } = props;\n\n return (\n <td {...cellAttributes} ref={cellRef}>\n {isTruncated ? <span className=\"truncate print:overflow-visible print:whitespace-normal\">{children}</span> : children}\n </td>\n );\n});\n"],"names":["DisplayCell","props","cell","cellRef","index","isHighlighted","cellAttributes","columnMeta","column","columnDef","meta","attributes","getCellAttributes","isTruncated","enableTruncate","value","getValue","content","isInternalColumn","id","flexRender","getContext","_ref","_columnMeta$renderer","_columnMeta$renderer2","renderer","call","row","original","React","MemoedDisplayCell","memo","children","ref","className"],"mappings":"
|
1
|
+
{"version":3,"file":"DisplayCell.js","sources":["../../../../../../../../../../../../src/primitives/Table/Core/components/Columns/Cell/BuiltIns/DisplayCell.tsx"],"sourcesContent":["import React from 'react';\nimport { ColumnMeta as ReactTableColumnMeta, flexRender } from '@tanstack/react-table';\nimport { getCellAttributes } from '../util';\nimport { TableCellRendererProps } from '../../../../types';\nimport { isInternalColumn } from '../../../../../useTableManager/util/columns';\n\nexport function DisplayCell<TType = unknown>(props: TableCellRendererProps<TType>) {\n const { cell, cellRef, index, isHighlighted, ...cellAttributes } = props;\n const columnMeta = cell.column.columnDef.meta as ReactTableColumnMeta<TType, unknown>;\n const attributes = getCellAttributes(cell, index, isHighlighted);\n const isTruncated = !!columnMeta.enableTruncate;\n const value = cell.getValue<TType>();\n\n let content;\n\n if (isInternalColumn(cell.column.id)) {\n content = flexRender(cell.column.columnDef.cell, cell.getContext());\n } else {\n content = columnMeta.renderer?.(value, cell.row.original) ?? value ?? null;\n }\n\n return (\n <MemoedDisplayCell {...cellAttributes} {...attributes} cellRef={cellRef} isTruncated={isTruncated}>\n {content}\n </MemoedDisplayCell>\n );\n}\n\ntype MemoedDisplayCellProps = React.TdHTMLAttributes<HTMLTableCellElement> & {\n cellRef: any;\n isTruncated: boolean;\n};\n\nconst MemoedDisplayCell = React.memo(function MemoedDisplayCell(props: MemoedDisplayCellProps) {\n const { cellRef, children, isTruncated, ...cellAttributes } = props;\n\n return (\n <td {...cellAttributes} ref={cellRef}>\n {isTruncated ? <span className=\"truncate print:overflow-visible print:whitespace-normal\">{children}</span> : children}\n </td>\n );\n});\n"],"names":["DisplayCell","props","cell","cellRef","index","isHighlighted","cellAttributes","_objectWithoutPropertiesLoose","_excluded","columnMeta","column","columnDef","meta","attributes","getCellAttributes","isTruncated","enableTruncate","value","getValue","content","isInternalColumn","id","flexRender","getContext","_ref","_columnMeta$renderer","_columnMeta$renderer2","renderer","call","row","original","React","MemoedDisplayCell","memo","children","_excluded2","ref","className"],"mappings":";;;;;;;;SAMgBA,WAAWA,CAAkBC,KAAoC;EAC7E,IAAQC,IAAI,GAAuDD,KAAK,CAAhEC,IAAI;IAAEC,OAAO,GAA8CF,KAAK,CAA1DE,OAAO;IAAEC,KAAK,GAAuCH,KAAK,CAAjDG,KAAK;IAAEC,aAAa,GAAwBJ,KAAK,CAA1CI,aAAa;IAAKC,cAAc,GAAAC,6BAAA,CAAKN,KAAK,EAAAO,SAAA;EACxE,IAAMC,UAAU,GAAGP,IAAI,CAACQ,MAAM,CAACC,SAAS,CAACC,IAA4C;EACrF,IAAMC,UAAU,GAAGC,iBAAiB,CAACZ,IAAI,EAAEE,KAAK,EAAEC,aAAa,CAAC;EAChE,IAAMU,WAAW,GAAG,CAAC,CAACN,UAAU,CAACO,cAAc;EAC/C,IAAMC,KAAK,GAAGf,IAAI,CAACgB,QAAQ,EAAS;EAEpC,IAAIC,OAAO;EAEX,IAAIC,gBAAgB,CAAClB,IAAI,CAACQ,MAAM,CAACW,EAAE,CAAC,EAAE;IAClCF,OAAO,GAAGG,UAAU,CAACpB,IAAI,CAACQ,MAAM,CAACC,SAAS,CAACT,IAAI,EAAEA,IAAI,CAACqB,UAAU,EAAE,CAAC;GACtE,MAAM;IAAA,IAAAC,IAAA,EAAAC,oBAAA,EAAAC,qBAAA;IACHP,OAAO,IAAAK,IAAA,IAAAC,oBAAA,IAAAC,qBAAA,GAAGjB,UAAU,CAACkB,QAAQ,cAAAD,qBAAA,uBAAnBA,qBAAA,CAAAE,IAAA,CAAAnB,UAAU,EAAYQ,KAAK,EAAEf,IAAI,CAAC2B,GAAG,CAACC,QAAQ,CAAC,cAAAL,oBAAA,cAAAA,oBAAA,GAAIR,KAAK,cAAAO,IAAA,cAAAA,IAAA,GAAI,IAAI;;EAG9E,oBACIO,6BAACC,iBAAiB,oBAAK1B,cAAc,EAAMO,UAAU;IAAEV,OAAO,EAAEA,OAAO;IAAEY,WAAW,EAAEA;MACjFI,OAAO,CACQ;AAE5B;AAOA,IAAMa,iBAAiB,gBAAGD,cAAK,CAACE,IAAI,CAAC,SAASD,iBAAiBA,CAAC/B,KAA6B;EACzF,IAAQE,OAAO,GAA+CF,KAAK,CAA3DE,OAAO;IAAE+B,QAAQ,GAAqCjC,KAAK,CAAlDiC,QAAQ;IAAEnB,WAAW,GAAwBd,KAAK,CAAxCc,WAAW;IAAKT,cAAc,GAAAC,6BAAA,CAAKN,KAAK,EAAAkC,UAAA;EAEnE,oBACIJ,qDAAQzB,cAAc;IAAE8B,GAAG,EAAEjC;MACxBY,WAAW,gBAAGgB;IAAMM,SAAS,EAAC;KAA2DH,QAAQ,CAAQ,GAAGA,QAAQ,CACpH;AAEb,CAAC,CAAC;;;;"}
|
@@ -1,34 +1,36 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { isInternalColumn } from '../../../../../useTableManager/util/columns.js';
|
3
4
|
import { RowContext } from '../../../Row/RowContext.js';
|
4
5
|
import { Actions } from '../../Internal/Actions.js';
|
5
6
|
import { getCellAttributes } from '../util.js';
|
6
7
|
|
8
|
+
var _excluded = ["canShowActions", "cellRef", "children", "colSpan", "rowActions", "rowId", "subRows", "table"];
|
7
9
|
function GroupedCell(props) {
|
8
10
|
var _ref, _columnMeta$renderer, _columnMeta$renderer2;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
rowIndex
|
24
|
-
} = React__default.useContext(RowContext);
|
25
|
-
const isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
|
26
|
-
const canShowActions = isActiveRow || isHovered && !tableMeta.rowActive.isHoverStatePaused;
|
11
|
+
var cell = props.cell,
|
12
|
+
cellRef = props.cellRef,
|
13
|
+
index = props.index,
|
14
|
+
isHighlighted = props.isHighlighted;
|
15
|
+
var _cell$getContext = cell.getContext(),
|
16
|
+
table = _cell$getContext.table;
|
17
|
+
var tableMeta = table.options.meta;
|
18
|
+
var columnMeta = cell.column.columnDef.meta;
|
19
|
+
var attributes = getCellAttributes(cell, index, isHighlighted);
|
20
|
+
var _React$useContext = React__default.useContext(RowContext),
|
21
|
+
isHovered = _React$useContext.isHovered,
|
22
|
+
rowIndex = _React$useContext.rowIndex;
|
23
|
+
var isActiveRow = tableMeta.rowActive.rowActiveIndex === rowIndex;
|
24
|
+
var canShowActions = isActiveRow || isHovered && !tableMeta.rowActive.isHoverStatePaused;
|
27
25
|
// Set colSpan based on the count of visible cells, including '__actions' and non-internal columns, so that
|
28
26
|
// rowGroupActions aligns with rowActions.
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
var colSpan = cell.row.getVisibleCells().filter(function (c) {
|
28
|
+
return c.column.id === '__actions' || !isInternalColumn(c.column.id);
|
29
|
+
}).length - 1;
|
30
|
+
var content = (_ref = (_columnMeta$renderer = (_columnMeta$renderer2 = columnMeta.renderer) === null || _columnMeta$renderer2 === void 0 ? void 0 : _columnMeta$renderer2.call(columnMeta, cell.getValue(), cell.row.original)) !== null && _columnMeta$renderer !== void 0 ? _columnMeta$renderer : cell.getValue()) !== null && _ref !== void 0 ? _ref : null;
|
31
|
+
var subRows = cell.getContext().row.subRows.map(function (row) {
|
32
|
+
return row.original;
|
33
|
+
});
|
32
34
|
return /*#__PURE__*/React__default.createElement(MemoedGroupedCell, Object.assign({}, attributes, {
|
33
35
|
canShowActions: canShowActions,
|
34
36
|
cellRef: cellRef,
|
@@ -39,18 +41,16 @@ function GroupedCell(props) {
|
|
39
41
|
table: table
|
40
42
|
}), content);
|
41
43
|
}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
...attributes
|
53
|
-
} = props;
|
44
|
+
var MemoedGroupedCell = /*#__PURE__*/React__default.memo(function MemoedGroupedCell(props) {
|
45
|
+
var canShowActions = props.canShowActions,
|
46
|
+
cellRef = props.cellRef,
|
47
|
+
children = props.children,
|
48
|
+
colSpan = props.colSpan,
|
49
|
+
rowActions = props.rowActions,
|
50
|
+
rowId = props.rowId,
|
51
|
+
subRows = props.subRows,
|
52
|
+
table = props.table,
|
53
|
+
attributes = _objectWithoutPropertiesLoose(props, _excluded);
|
54
54
|
return (
|
55
55
|
/*#__PURE__*/
|
56
56
|
// pr-1 is needed to align group row actions with row actions in sibling rows, if present
|
@@ -58,7 +58,7 @@ const MemoedGroupedCell = /*#__PURE__*/React__default.memo(function MemoedGroupe
|
|
58
58
|
className: "!pr-1",
|
59
59
|
ref: cellRef,
|
60
60
|
style: {
|
61
|
-
gridColumn:
|
61
|
+
gridColumn: "span " + colSpan + " / span " + colSpan
|
62
62
|
}
|
63
63
|
}), /*#__PURE__*/React__default.createElement("span", {
|
64
64
|
className: "grow"
|