@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,5 +1,6 @@
|
|
1
1
|
import React__default from 'react';
|
2
2
|
import cn from 'clsx';
|
3
|
+
import { extends as _extends } from '../../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
3
4
|
import { Tooltip } from '../../../../../components/Tooltip/Tooltip.js';
|
4
5
|
import { flexRender } from '@tanstack/react-table';
|
5
6
|
import { TableFilterComparator } from '../../../types.js';
|
@@ -11,75 +12,72 @@ import { getIsPinned, useSetInitialColumnSizing } from './util.js';
|
|
11
12
|
|
12
13
|
function Header(props) {
|
13
14
|
var _header$column$column;
|
14
|
-
|
15
|
-
|
16
|
-
scrollToIndex
|
17
|
-
} = props;
|
15
|
+
var header = props.header,
|
16
|
+
scrollToIndex = props.scrollToIndex;
|
18
17
|
if (header.column.getIsGrouped()) {
|
19
18
|
return null;
|
20
19
|
}
|
21
|
-
|
22
|
-
table
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
const search = table.getState().globalFilter;
|
20
|
+
var _header$getContext = header.getContext(),
|
21
|
+
table = _header$getContext.table;
|
22
|
+
var tableMeta = table.options.meta;
|
23
|
+
var columnMeta = (_header$column$column = header.column.columnDef.meta) !== null && _header$column$column !== void 0 ? _header$column$column : {};
|
24
|
+
var isGroup = !!header.subHeaders.length;
|
25
|
+
var isPinned = getIsPinned(header);
|
26
|
+
var canFilter = !header.isPlaceholder && header.column.getCanFilter() && !!table.options.enableColumnFilters;
|
27
|
+
var canHide = !header.isPlaceholder && !isGroup && header.column.getCanHide();
|
28
|
+
var canMeasureSize = !!table.getRowModel().rows.length;
|
29
|
+
var canPin = !header.isPlaceholder && !isGroup && header.column.getCanPin();
|
30
|
+
var canResize = !header.isPlaceholder && !isGroup && header.column.getCanResize();
|
31
|
+
var canSort = !header.isPlaceholder && !isGroup && header.column.getCanSort();
|
32
|
+
var canGoto = canSort && !header.isPlaceholder && !isGroup && tableMeta.rowGoto.isEnabled && !!header.column.getIsSorted();
|
33
|
+
var hasMenu = !isInternalColumn(header.id) && (canHide || canGoto || canPin || canSort || !!columnMeta.menu);
|
34
|
+
var sorting = table.getState().sorting;
|
35
|
+
var filters = table.getState().columnFilters;
|
36
|
+
var search = table.getState().globalFilter;
|
39
37
|
// passing header or column results in re-renders on scroll, so anything from those objects as memoed props
|
40
|
-
|
38
|
+
var memoedProps = {
|
41
39
|
align: columnMeta.align,
|
42
|
-
canFilter,
|
43
|
-
canHide,
|
44
|
-
canGoto,
|
45
|
-
canMeasureSize,
|
46
|
-
canPin,
|
47
|
-
canResize,
|
48
|
-
canSort,
|
40
|
+
canFilter: canFilter,
|
41
|
+
canHide: canHide,
|
42
|
+
canGoto: canGoto,
|
43
|
+
canMeasureSize: canMeasureSize,
|
44
|
+
canPin: canPin,
|
45
|
+
canResize: canResize,
|
46
|
+
canSort: canSort,
|
49
47
|
className: cn('group/header', columnMeta.headerClassName),
|
50
48
|
children: flexRender(header.column.columnDef.header, header.getContext()),
|
51
49
|
colSpan: header.colSpan,
|
52
50
|
customMenu: columnMeta.menu,
|
53
51
|
defaultWidth: columnMeta.defaultWidth,
|
54
|
-
hasMenu,
|
52
|
+
hasMenu: hasMenu,
|
55
53
|
id: header.id,
|
56
54
|
isFiltered: header.column.getIsFiltered(),
|
57
55
|
index: header.index,
|
58
|
-
isGroup,
|
59
|
-
isPinned,
|
56
|
+
isGroup: isGroup,
|
57
|
+
isPinned: isPinned,
|
60
58
|
isPlaceholder: header.isPlaceholder,
|
61
59
|
offset: header.column.getStart(isPinned),
|
62
|
-
scrollToIndex,
|
60
|
+
scrollToIndex: scrollToIndex,
|
63
61
|
setRowActiveIndex: tableMeta.rowActive.setRowActiveIndex,
|
64
62
|
setColumnSizing: table.setColumnSizing,
|
65
63
|
tooltip: columnMeta.tooltip,
|
66
64
|
width: table.getState().columnSizing[header.id]
|
67
65
|
};
|
68
66
|
if (header.isPlaceholder) {
|
69
|
-
|
67
|
+
var nextHeader = header.headerGroup.headers[header.index + 1];
|
70
68
|
memoedProps.className = cn('!bg-white before:!content-none', memoedProps.className, {
|
71
69
|
'after:!content-none': nextHeader === null || nextHeader === void 0 ? void 0 : nextHeader.isPlaceholder
|
72
70
|
});
|
73
71
|
}
|
74
72
|
if (canFilter) {
|
75
|
-
memoedProps.onFilter = ()
|
73
|
+
memoedProps.onFilter = function () {
|
76
74
|
header.column.setFilterValue({
|
77
75
|
comparator: TableFilterComparator.Contains
|
78
76
|
});
|
79
77
|
};
|
80
78
|
}
|
81
79
|
if (canGoto) {
|
82
|
-
memoedProps.onGoto = query
|
80
|
+
memoedProps.onGoto = function (query) {
|
83
81
|
var _tableMeta$rowGoto$ha, _tableMeta$rowGoto;
|
84
82
|
return (_tableMeta$rowGoto$ha = (_tableMeta$rowGoto = tableMeta.rowGoto).handleGoto) === null || _tableMeta$rowGoto$ha === void 0 ? void 0 : _tableMeta$rowGoto$ha.call(_tableMeta$rowGoto, header.id, query, sorting, filters, search);
|
85
83
|
};
|
@@ -88,13 +86,14 @@ function Header(props) {
|
|
88
86
|
memoedProps.onHide = header.column.getToggleVisibilityHandler();
|
89
87
|
}
|
90
88
|
if (canPin) {
|
91
|
-
memoedProps.onPin = index
|
89
|
+
memoedProps.onPin = function (index) {
|
92
90
|
// TODO: this can probably be moved to a feature hook
|
93
|
-
table.setColumnPinning(pinningState
|
94
|
-
return {
|
95
|
-
|
96
|
-
|
97
|
-
|
91
|
+
table.setColumnPinning(function (pinningState) {
|
92
|
+
return _extends({}, pinningState, {
|
93
|
+
left: index === undefined ? unfreezeAllExternalColumns(pinningState.left) : freezeUptoExternalColumn(index, table.getAllLeafColumns().map(function (column) {
|
94
|
+
return column.id;
|
95
|
+
}))
|
96
|
+
});
|
98
97
|
});
|
99
98
|
};
|
100
99
|
}
|
@@ -104,7 +103,7 @@ function Header(props) {
|
|
104
103
|
memoedProps.resetSize = header.column.resetSize;
|
105
104
|
}
|
106
105
|
if (canSort) {
|
107
|
-
|
106
|
+
var handleSortToggle = function handleSortToggle(sortDirection) {
|
108
107
|
if (sortDirection === false) {
|
109
108
|
header.column.clearSorting();
|
110
109
|
} else {
|
@@ -119,57 +118,57 @@ function Header(props) {
|
|
119
118
|
key: header.id
|
120
119
|
}, memoedProps));
|
121
120
|
}
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
121
|
+
var MemoedHeader = /*#__PURE__*/React__default.memo(function MemoedHeader(props) {
|
122
|
+
var align = props.align,
|
123
|
+
canFilter = props.canFilter,
|
124
|
+
canGoto = props.canGoto,
|
125
|
+
canHide = props.canHide,
|
126
|
+
canMeasureSize = props.canMeasureSize,
|
127
|
+
canPin = props.canPin,
|
128
|
+
canResize = props.canResize,
|
129
|
+
canSort = props.canSort,
|
130
|
+
children = props.children,
|
131
|
+
className = props.className,
|
132
|
+
colSpan = props.colSpan,
|
133
|
+
customMenu = props.customMenu,
|
134
|
+
defaultWidth = props.defaultWidth,
|
135
|
+
hasMenu = props.hasMenu,
|
136
|
+
id = props.id,
|
137
|
+
index = props.index,
|
138
|
+
isFiltered = props.isFiltered,
|
139
|
+
isGroup = props.isGroup,
|
140
|
+
isPinned = props.isPinned,
|
141
|
+
isPlaceholder = props.isPlaceholder,
|
142
|
+
isResizing = props.isResizing,
|
143
|
+
offset = props.offset,
|
144
|
+
handleFilter = props.onFilter,
|
145
|
+
handleGoto = props.onGoto,
|
146
|
+
handleHide = props.onHide,
|
147
|
+
handlePin = props.onPin,
|
148
|
+
handleResize = props.onResize,
|
149
|
+
handleSort = props.onSort,
|
150
|
+
handleSortToggle = props.onSortToggle,
|
151
|
+
handleResetSize = props.resetSize,
|
152
|
+
scrollToIndex = props.scrollToIndex,
|
153
|
+
setRowActiveIndex = props.setRowActiveIndex,
|
154
|
+
setColumnSizing = props.setColumnSizing,
|
155
|
+
sortDirection = props.sortDirection,
|
156
|
+
tooltip = props.tooltip,
|
157
|
+
width = props.width;
|
158
|
+
var _React$useState = React__default.useState(null),
|
159
|
+
ref = _React$useState[0],
|
160
|
+
setRef = _React$useState[1];
|
162
161
|
// save column width if none is set
|
163
162
|
useSetInitialColumnSizing(id, defaultWidth, width, ref, canMeasureSize, setColumnSizing);
|
164
163
|
// feature specific styles
|
165
|
-
|
164
|
+
var style = {};
|
166
165
|
// column groups often span multiple columns
|
167
166
|
if (colSpan > 1) {
|
168
|
-
style.gridColumn =
|
167
|
+
style.gridColumn = "span " + colSpan;
|
169
168
|
}
|
170
169
|
// pinned columns should be offset from either the left or right
|
171
170
|
if (isPinned) {
|
172
|
-
style[isPinned] =
|
171
|
+
style[isPinned] = offset + "px";
|
173
172
|
}
|
174
173
|
return /*#__PURE__*/React__default.createElement("th", Object.assign({}, getSortAttributes(canSort, handleSort, sortDirection), {
|
175
174
|
className: className,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Header.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Header/Header.tsx"],"sourcesContent":["import React from 'react';\nimport {\n TableMeta as ReactTableMeta,\n ColumnMeta as ReactTableColumnMeta,\n Header as ReactTableHeader,\n ColumnPinningPosition as ReactTableColumnPinningPosition,\n flexRender,\n} from '@tanstack/react-table';\nimport cn from 'clsx';\nimport { freezeUptoExternalColumn, isInternalColumn, unfreezeAllExternalColumns } from '../../../useTableManager/util/columns';\nimport { Tooltip } from '../../../../../components/Tooltip/Tooltip';\nimport { SortIndicator, getSortAttributes } from './components/SortIndicator';\nimport {\n TableColumnAlignment,\n TableColumnMenu,\n TableColumnSortDirection,\n TableColumnWidth,\n TableFilterComparator,\n} from '../../../types';\nimport { Resizer } from './components/Resizer';\nimport { HeaderMenu } from './components/Menu';\nimport { getIsPinned, useSetInitialColumnSizing } from './util';\n\nexport type HeaderProps<TType = unknown> = {\n header: ReactTableHeader<TType, unknown>;\n scrollToIndex: (index: number) => void;\n};\n\nexport function Header<TType = unknown>(props: HeaderProps<TType>) {\n const { header, scrollToIndex } = props;\n\n if (header.column.getIsGrouped()) {\n return null;\n }\n\n const { table } = header.getContext();\n\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const columnMeta = (header.column.columnDef.meta ?? {}) as ReactTableColumnMeta<TType, unknown>;\n\n const isGroup = !!header.subHeaders.length;\n const isPinned = getIsPinned(header);\n\n const canFilter = !header.isPlaceholder && header.column.getCanFilter() && !!table.options.enableColumnFilters;\n const canHide = !header.isPlaceholder && !isGroup && header.column.getCanHide();\n const canMeasureSize = !!table.getRowModel().rows.length;\n const canPin = !header.isPlaceholder && !isGroup && header.column.getCanPin();\n const canResize = !header.isPlaceholder && !isGroup && header.column.getCanResize();\n const canSort = !header.isPlaceholder && !isGroup && header.column.getCanSort();\n const canGoto = canSort && !header.isPlaceholder && !isGroup && tableMeta.rowGoto.isEnabled && !!header.column.getIsSorted();\n\n const hasMenu = !isInternalColumn(header.id) && (canHide || canGoto || canPin || canSort || !!columnMeta.menu);\n\n const sorting = table.getState().sorting;\n const filters = table.getState().columnFilters;\n const search = table.getState().globalFilter;\n\n // passing header or column results in re-renders on scroll, so anything from those objects as memoed props\n const memoedProps: MemoedHeaderProps = {\n align: columnMeta.align,\n canFilter,\n canHide,\n canGoto,\n canMeasureSize,\n canPin,\n canResize,\n canSort,\n className: cn('group/header', columnMeta.headerClassName),\n children: flexRender(header.column.columnDef.header, header.getContext()),\n colSpan: header.colSpan,\n customMenu: columnMeta.menu,\n defaultWidth: columnMeta.defaultWidth,\n hasMenu,\n id: header.id,\n isFiltered: header.column.getIsFiltered(),\n index: header.index,\n isGroup,\n isPinned,\n isPlaceholder: header.isPlaceholder,\n offset: header.column.getStart(isPinned),\n scrollToIndex,\n setRowActiveIndex: tableMeta.rowActive.setRowActiveIndex,\n setColumnSizing: table.setColumnSizing,\n tooltip: columnMeta.tooltip,\n width: table.getState().columnSizing[header.id],\n };\n\n if (header.isPlaceholder) {\n const nextHeader = header.headerGroup.headers[header.index + 1];\n memoedProps.className = cn('!bg-white before:!content-none', memoedProps.className, {\n 'after:!content-none': nextHeader?.isPlaceholder,\n });\n }\n\n if (canFilter) {\n memoedProps.onFilter = () => {\n header.column.setFilterValue({ comparator: TableFilterComparator.Contains });\n };\n }\n\n if (canGoto) {\n memoedProps.onGoto = ((query: string) => tableMeta.rowGoto.handleGoto?.(header.id, query, sorting, filters, search)) as (\n query: string\n ) => Promise<number>;\n }\n\n if (canHide) {\n memoedProps.onHide = header.column.getToggleVisibilityHandler();\n }\n\n if (canPin) {\n memoedProps.onPin = (index: number | undefined) => {\n // TODO: this can probably be moved to a feature hook\n table.setColumnPinning(pinningState => {\n return {\n ...pinningState,\n left:\n index === undefined\n ? unfreezeAllExternalColumns(pinningState.left)\n : freezeUptoExternalColumn(\n index,\n table.getAllLeafColumns().map(column => column.id)\n ),\n };\n });\n };\n }\n\n if (canResize) {\n memoedProps.isResizing = header.column.getIsResizing();\n memoedProps.onResize = header.getResizeHandler();\n memoedProps.resetSize = header.column.resetSize;\n }\n\n if (canSort) {\n const handleSortToggle = (sortDirection: TableColumnSortDirection | false) => {\n if (sortDirection === false) {\n header.column.clearSorting();\n } else {\n header.column.toggleSorting(sortDirection === 'desc');\n }\n };\n\n memoedProps.onSort = header.column.getToggleSortingHandler();\n memoedProps.onSortToggle = handleSortToggle;\n memoedProps.sortDirection = header.column.getIsSorted();\n }\n\n return <MemoedHeader key={header.id} {...memoedProps} />;\n}\n\nexport type MemoedHeaderProps = {\n align?: TableColumnAlignment;\n canFilter: boolean;\n canHide: boolean;\n canGoto: boolean;\n canMeasureSize: boolean;\n canPin: boolean;\n canResize: boolean;\n canSort: boolean;\n children: JSX.Element | React.ReactNode;\n className?: string;\n colSpan: number;\n customMenu?: TableColumnMenu;\n defaultWidth?: TableColumnWidth;\n hasMenu: boolean;\n id: string;\n index: number;\n isFiltered: boolean;\n isGroup: boolean;\n isPinned?: ReactTableColumnPinningPosition;\n isPlaceholder: boolean;\n isResizing?: boolean;\n offset?: number;\n onFilter?: () => void;\n onGoto?: (query: string) => Promise<number>;\n onHide?: (event: unknown) => void;\n onPin?: (index: number | undefined) => void;\n onResize?: (event: unknown) => void;\n onSort?: (event: unknown) => void;\n onSortToggle?: (sortDirection: TableColumnSortDirection | false) => void;\n resetSize?: () => void;\n scrollToIndex: (index: number) => void;\n setRowActiveIndex: (index: number) => void;\n setColumnSizing: any;\n sortDirection?: TableColumnSortDirection | false;\n tooltip?: string;\n width?: TableColumnWidth;\n};\n\nconst MemoedHeader = React.memo(function MemoedHeader(props: MemoedHeaderProps) {\n const {\n align,\n canFilter,\n canGoto,\n canHide,\n canMeasureSize,\n canPin,\n canResize,\n canSort,\n children,\n className,\n colSpan,\n customMenu,\n defaultWidth,\n hasMenu,\n id,\n index,\n isFiltered,\n isGroup,\n isPinned,\n isPlaceholder,\n isResizing,\n offset,\n onFilter: handleFilter,\n onGoto: handleGoto,\n onHide: handleHide,\n onPin: handlePin,\n onResize: handleResize,\n onSort: handleSort,\n onSortToggle: handleSortToggle,\n resetSize: handleResetSize,\n scrollToIndex,\n setRowActiveIndex,\n setColumnSizing,\n sortDirection,\n tooltip,\n width,\n } = props;\n const [ref, setRef] = React.useState<HTMLTableCellElement | null>(null);\n\n // save column width if none is set\n useSetInitialColumnSizing(id, defaultWidth, width, ref, canMeasureSize, setColumnSizing);\n\n // feature specific styles\n const style: React.CSSProperties = {};\n\n // column groups often span multiple columns\n if (colSpan > 1) {\n style.gridColumn = `span ${colSpan}`;\n }\n\n // pinned columns should be offset from either the left or right\n if (isPinned) {\n style[isPinned] = `${offset}px`;\n }\n\n return (\n <th\n {...getSortAttributes(canSort, handleSort, sortDirection)}\n className={className}\n data-cell-align={isGroup ? 'center' : align}\n data-cell-id={id}\n data-cell-pinned={isPinned ? isPinned : undefined}\n style={style}\n ref={setRef}>\n {isPlaceholder ? null : isInternalColumn(id) ? (\n children\n ) : (\n <Tooltip title={String(tooltip ?? children)} placement=\"top\">\n <span className=\"truncate\">{children}</span>\n </Tooltip>\n )}\n {sortDirection ? <SortIndicator direction={sortDirection} /> : null}\n {hasMenu ? (\n <HeaderMenu\n canFilter={canFilter}\n canGoto={canGoto}\n canHide={canHide}\n canPin={canPin}\n canSort={canSort}\n className={cn({\n 'ml-auto': align !== 'right',\n 'ml-0': align === 'right',\n })}\n customMenu={customMenu}\n index={index}\n isFiltered={isFiltered}\n onFilter={handleFilter}\n onGoto={handleGoto}\n onHide={handleHide}\n onPin={handlePin}\n onSortToggle={handleSortToggle}\n scrollToIndex={scrollToIndex}\n setRowActiveIndex={setRowActiveIndex}\n sortDirection={sortDirection}\n columnId={id}\n />\n ) : null}\n {canResize ? (\n <Resizer\n headerRef={ref}\n id={id}\n isResizing={isResizing as boolean}\n onResize={handleResize as (event: unknown) => void}\n onResetSize={handleResetSize as () => void}\n setColumnSizing={setColumnSizing}\n width={width}\n />\n ) : null}\n </th>\n );\n});\n"],"names":["Header","props","header","scrollToIndex","column","getIsGrouped","table","getContext","tableMeta","options","meta","columnMeta","_header$column$column","columnDef","isGroup","subHeaders","length","isPinned","getIsPinned","canFilter","isPlaceholder","getCanFilter","enableColumnFilters","canHide","getCanHide","canMeasureSize","getRowModel","rows","canPin","getCanPin","canResize","getCanResize","canSort","getCanSort","canGoto","rowGoto","isEnabled","getIsSorted","hasMenu","isInternalColumn","id","menu","sorting","getState","filters","columnFilters","search","globalFilter","memoedProps","align","className","cn","headerClassName","children","flexRender","colSpan","customMenu","defaultWidth","isFiltered","getIsFiltered","index","offset","getStart","setRowActiveIndex","rowActive","setColumnSizing","tooltip","width","columnSizing","nextHeader","headerGroup","headers","onFilter","setFilterValue","comparator","TableFilterComparator","Contains","onGoto","query","_tableMeta$rowGoto$ha","_tableMeta$rowGoto","handleGoto","call","onHide","getToggleVisibilityHandler","onPin","setColumnPinning","pinningState","left","undefined","unfreezeAllExternalColumns","freezeUptoExternalColumn","getAllLeafColumns","map","isResizing","getIsResizing","onResize","getResizeHandler","resetSize","handleSortToggle","sortDirection","clearSorting","toggleSorting","onSort","getToggleSortingHandler","onSortToggle","React","MemoedHeader","key","memo","handleFilter","handleHide","handlePin","handleResize","handleSort","handleResetSize","ref","setRef","useState","useSetInitialColumnSizing","style","gridColumn","getSortAttributes","Tooltip","title","String","placement","SortIndicator","direction","HeaderMenu","columnId","Resizer","headerRef","onResetSize"],"mappings":";;;;;;;;;;;SA4BgBA,MAAMA,CAAkBC,KAAyB;;EAC7D,MAAM;IAAEC,MAAM;IAAEC;GAAe,GAAGF,KAAK;EAEvC,IAAIC,MAAM,CAACE,MAAM,CAACC,YAAY,EAAE,EAAE;IAC9B,OAAO,IAAI;;EAGf,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IAACC,KAAK,EAAEC,MAAM,CAAC3D,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAIb,QAAQ,CAAC;IAAEyE,SAAS,EAAC;kBACnDpB;IAAMxD,SAAS,EAAC;KAAYG,QAAQ,CAAQ,CACtC,CACb,EACA+C,aAAa,gBAAGM,6BAACqB,aAAa;IAACC,SAAS,EAAE5B;IAAiB,GAAG,IAAI,EAClE9D,OAAO,iBACJoE,6BAACuB,UAAU;IACP9G,SAAS,EAAEA,SAAS;IACpBe,OAAO,EAAEA,OAAO;IAChBX,OAAO,EAAEA,OAAO;IAChBK,MAAM,EAAEA,MAAM;IACdI,OAAO,EAAEA,OAAO;IAChBkB,SAAS,EAAEC,EAAE,CAAC;MACV,SAAS,EAAEF,KAAK,KAAK,OAAO;MAC5B,MAAM,EAAEA,KAAK,KAAK;KACrB,CAAC;IACFO,UAAU,EAAEA,UAAU;IACtBI,KAAK,EAAEA,KAAK;IACZF,UAAU,EAAEA,UAAU;IACtBc,QAAQ,EAAEsC,YAAY;IACtBjC,MAAM,EAAEI,UAAU;IAClBE,MAAM,EAAE4B,UAAU;IAClB1B,KAAK,EAAE2B,SAAS;IAChBP,YAAY,EAAEN,gBAAgB;IAC9BhG,aAAa,EAAEA,aAAa;IAC5B4D,iBAAiB,EAAEA,iBAAiB;IACpCqC,aAAa,EAAEA,aAAa;IAC5B8B,QAAQ,EAAE1F;IACZ,IACF,IAAI,EACPV,SAAS,iBACN4E,6BAACyB,OAAO;IACJC,SAAS,EAAEhB,GAAG;IACd5E,EAAE,EAAEA,EAAE;IACNsD,UAAU,EAAEA,UAAqB;IACjCE,QAAQ,EAAEiB,YAAwC;IAClDoB,WAAW,EAAElB,eAA6B;IAC1ClD,eAAe,EAAEA,eAAe;IAChCE,KAAK,EAAEA;IACT,IACF,IAAI,CACP;AAEb,CAAC,CAAC;;;;"}
|
1
|
+
{"version":3,"file":"Header.js","sources":["../../../../../../../../../../src/primitives/Table/Core/components/Header/Header.tsx"],"sourcesContent":["import React from 'react';\nimport {\n TableMeta as ReactTableMeta,\n ColumnMeta as ReactTableColumnMeta,\n Header as ReactTableHeader,\n ColumnPinningPosition as ReactTableColumnPinningPosition,\n flexRender,\n} from '@tanstack/react-table';\nimport cn from 'clsx';\nimport { freezeUptoExternalColumn, isInternalColumn, unfreezeAllExternalColumns } from '../../../useTableManager/util/columns';\nimport { Tooltip } from '../../../../../components/Tooltip/Tooltip';\nimport { SortIndicator, getSortAttributes } from './components/SortIndicator';\nimport {\n TableColumnAlignment,\n TableColumnMenu,\n TableColumnSortDirection,\n TableColumnWidth,\n TableFilterComparator,\n} from '../../../types';\nimport { Resizer } from './components/Resizer';\nimport { HeaderMenu } from './components/Menu';\nimport { getIsPinned, useSetInitialColumnSizing } from './util';\n\nexport type HeaderProps<TType = unknown> = {\n header: ReactTableHeader<TType, unknown>;\n scrollToIndex: (index: number) => void;\n};\n\nexport function Header<TType = unknown>(props: HeaderProps<TType>) {\n const { header, scrollToIndex } = props;\n\n if (header.column.getIsGrouped()) {\n return null;\n }\n\n const { table } = header.getContext();\n\n const tableMeta = table.options.meta as ReactTableMeta<TType>;\n const columnMeta = (header.column.columnDef.meta ?? {}) as ReactTableColumnMeta<TType, unknown>;\n\n const isGroup = !!header.subHeaders.length;\n const isPinned = getIsPinned(header);\n\n const canFilter = !header.isPlaceholder && header.column.getCanFilter() && !!table.options.enableColumnFilters;\n const canHide = !header.isPlaceholder && !isGroup && header.column.getCanHide();\n const canMeasureSize = !!table.getRowModel().rows.length;\n const canPin = !header.isPlaceholder && !isGroup && header.column.getCanPin();\n const canResize = !header.isPlaceholder && !isGroup && header.column.getCanResize();\n const canSort = !header.isPlaceholder && !isGroup && header.column.getCanSort();\n const canGoto = canSort && !header.isPlaceholder && !isGroup && tableMeta.rowGoto.isEnabled && !!header.column.getIsSorted();\n\n const hasMenu = !isInternalColumn(header.id) && (canHide || canGoto || canPin || canSort || !!columnMeta.menu);\n\n const sorting = table.getState().sorting;\n const filters = table.getState().columnFilters;\n const search = table.getState().globalFilter;\n\n // passing header or column results in re-renders on scroll, so anything from those objects as memoed props\n const memoedProps: MemoedHeaderProps = {\n align: columnMeta.align,\n canFilter,\n canHide,\n canGoto,\n canMeasureSize,\n canPin,\n canResize,\n canSort,\n className: cn('group/header', columnMeta.headerClassName),\n children: flexRender(header.column.columnDef.header, header.getContext()),\n colSpan: header.colSpan,\n customMenu: columnMeta.menu,\n defaultWidth: columnMeta.defaultWidth,\n hasMenu,\n id: header.id,\n isFiltered: header.column.getIsFiltered(),\n index: header.index,\n isGroup,\n isPinned,\n isPlaceholder: header.isPlaceholder,\n offset: header.column.getStart(isPinned),\n scrollToIndex,\n setRowActiveIndex: tableMeta.rowActive.setRowActiveIndex,\n setColumnSizing: table.setColumnSizing,\n tooltip: columnMeta.tooltip,\n width: table.getState().columnSizing[header.id],\n };\n\n if (header.isPlaceholder) {\n const nextHeader = header.headerGroup.headers[header.index + 1];\n memoedProps.className = cn('!bg-white before:!content-none', memoedProps.className, {\n 'after:!content-none': nextHeader?.isPlaceholder,\n });\n }\n\n if (canFilter) {\n memoedProps.onFilter = () => {\n header.column.setFilterValue({ comparator: TableFilterComparator.Contains });\n };\n }\n\n if (canGoto) {\n memoedProps.onGoto = ((query: string) => tableMeta.rowGoto.handleGoto?.(header.id, query, sorting, filters, search)) as (\n query: string\n ) => Promise<number>;\n }\n\n if (canHide) {\n memoedProps.onHide = header.column.getToggleVisibilityHandler();\n }\n\n if (canPin) {\n memoedProps.onPin = (index: number | undefined) => {\n // TODO: this can probably be moved to a feature hook\n table.setColumnPinning(pinningState => {\n return {\n ...pinningState,\n left:\n index === undefined\n ? unfreezeAllExternalColumns(pinningState.left)\n : freezeUptoExternalColumn(\n index,\n table.getAllLeafColumns().map(column => column.id)\n ),\n };\n });\n };\n }\n\n if (canResize) {\n memoedProps.isResizing = header.column.getIsResizing();\n memoedProps.onResize = header.getResizeHandler();\n memoedProps.resetSize = header.column.resetSize;\n }\n\n if (canSort) {\n const handleSortToggle = (sortDirection: TableColumnSortDirection | false) => {\n if (sortDirection === false) {\n header.column.clearSorting();\n } else {\n header.column.toggleSorting(sortDirection === 'desc');\n }\n };\n\n memoedProps.onSort = header.column.getToggleSortingHandler();\n memoedProps.onSortToggle = handleSortToggle;\n memoedProps.sortDirection = header.column.getIsSorted();\n }\n\n return <MemoedHeader key={header.id} {...memoedProps} />;\n}\n\nexport type MemoedHeaderProps = {\n align?: TableColumnAlignment;\n canFilter: boolean;\n canHide: boolean;\n canGoto: boolean;\n canMeasureSize: boolean;\n canPin: boolean;\n canResize: boolean;\n canSort: boolean;\n children: JSX.Element | React.ReactNode;\n className?: string;\n colSpan: number;\n customMenu?: TableColumnMenu;\n defaultWidth?: TableColumnWidth;\n hasMenu: boolean;\n id: string;\n index: number;\n isFiltered: boolean;\n isGroup: boolean;\n isPinned?: ReactTableColumnPinningPosition;\n isPlaceholder: boolean;\n isResizing?: boolean;\n offset?: number;\n onFilter?: () => void;\n onGoto?: (query: string) => Promise<number>;\n onHide?: (event: unknown) => void;\n onPin?: (index: number | undefined) => void;\n onResize?: (event: unknown) => void;\n onSort?: (event: unknown) => void;\n onSortToggle?: (sortDirection: TableColumnSortDirection | false) => void;\n resetSize?: () => void;\n scrollToIndex: (index: number) => void;\n setRowActiveIndex: (index: number) => void;\n setColumnSizing: any;\n sortDirection?: TableColumnSortDirection | false;\n tooltip?: string;\n width?: TableColumnWidth;\n};\n\nconst MemoedHeader = React.memo(function MemoedHeader(props: MemoedHeaderProps) {\n const {\n align,\n canFilter,\n canGoto,\n canHide,\n canMeasureSize,\n canPin,\n canResize,\n canSort,\n children,\n className,\n colSpan,\n customMenu,\n defaultWidth,\n hasMenu,\n id,\n index,\n isFiltered,\n isGroup,\n isPinned,\n isPlaceholder,\n isResizing,\n offset,\n onFilter: handleFilter,\n onGoto: handleGoto,\n onHide: handleHide,\n onPin: handlePin,\n onResize: handleResize,\n onSort: handleSort,\n onSortToggle: handleSortToggle,\n resetSize: handleResetSize,\n scrollToIndex,\n setRowActiveIndex,\n setColumnSizing,\n sortDirection,\n tooltip,\n width,\n } = props;\n const [ref, setRef] = React.useState<HTMLTableCellElement | null>(null);\n\n // save column width if none is set\n useSetInitialColumnSizing(id, defaultWidth, width, ref, canMeasureSize, setColumnSizing);\n\n // feature specific styles\n const style: React.CSSProperties = {};\n\n // column groups often span multiple columns\n if (colSpan > 1) {\n style.gridColumn = `span ${colSpan}`;\n }\n\n // pinned columns should be offset from either the left or right\n if (isPinned) {\n style[isPinned] = `${offset}px`;\n }\n\n return (\n <th\n {...getSortAttributes(canSort, handleSort, sortDirection)}\n className={className}\n data-cell-align={isGroup ? 'center' : align}\n data-cell-id={id}\n data-cell-pinned={isPinned ? isPinned : undefined}\n style={style}\n ref={setRef}>\n {isPlaceholder ? null : isInternalColumn(id) ? (\n children\n ) : (\n <Tooltip title={String(tooltip ?? children)} placement=\"top\">\n <span className=\"truncate\">{children}</span>\n </Tooltip>\n )}\n {sortDirection ? <SortIndicator direction={sortDirection} /> : null}\n {hasMenu ? (\n <HeaderMenu\n canFilter={canFilter}\n canGoto={canGoto}\n canHide={canHide}\n canPin={canPin}\n canSort={canSort}\n className={cn({\n 'ml-auto': align !== 'right',\n 'ml-0': align === 'right',\n })}\n customMenu={customMenu}\n index={index}\n isFiltered={isFiltered}\n onFilter={handleFilter}\n onGoto={handleGoto}\n onHide={handleHide}\n onPin={handlePin}\n onSortToggle={handleSortToggle}\n scrollToIndex={scrollToIndex}\n setRowActiveIndex={setRowActiveIndex}\n sortDirection={sortDirection}\n columnId={id}\n />\n ) : null}\n {canResize ? (\n <Resizer\n headerRef={ref}\n id={id}\n isResizing={isResizing as boolean}\n onResize={handleResize as (event: unknown) => void}\n onResetSize={handleResetSize as () => void}\n setColumnSizing={setColumnSizing}\n width={width}\n />\n ) : null}\n </th>\n );\n});\n"],"names":["Header","props","header","scrollToIndex","column","getIsGrouped","_header$getContext","getContext","table","tableMeta","options","meta","columnMeta","_header$column$column","columnDef","isGroup","subHeaders","length","isPinned","getIsPinned","canFilter","isPlaceholder","getCanFilter","enableColumnFilters","canHide","getCanHide","canMeasureSize","getRowModel","rows","canPin","getCanPin","canResize","getCanResize","canSort","getCanSort","canGoto","rowGoto","isEnabled","getIsSorted","hasMenu","isInternalColumn","id","menu","sorting","getState","filters","columnFilters","search","globalFilter","memoedProps","align","className","cn","headerClassName","children","flexRender","colSpan","customMenu","defaultWidth","isFiltered","getIsFiltered","index","offset","getStart","setRowActiveIndex","rowActive","setColumnSizing","tooltip","width","columnSizing","nextHeader","headerGroup","headers","onFilter","setFilterValue","comparator","TableFilterComparator","Contains","onGoto","query","_tableMeta$rowGoto$ha","_tableMeta$rowGoto","handleGoto","call","onHide","getToggleVisibilityHandler","onPin","setColumnPinning","pinningState","_extends","left","undefined","unfreezeAllExternalColumns","freezeUptoExternalColumn","getAllLeafColumns","map","isResizing","getIsResizing","onResize","getResizeHandler","resetSize","handleSortToggle","sortDirection","clearSorting","toggleSorting","onSort","getToggleSortingHandler","onSortToggle","React","MemoedHeader","key","memo","handleFilter","handleHide","handlePin","handleResize","handleSort","handleResetSize","_React$useState","useState","ref","setRef","useSetInitialColumnSizing","style","gridColumn","getSortAttributes","Tooltip","title","String","placement","SortIndicator","direction","HeaderMenu","columnId","Resizer","headerRef","onResetSize"],"mappings":";;;;;;;;;;;;SA4BgBA,MAAMA,CAAkBC,KAAyB;;EAC7D,IAAQC,MAAM,GAAoBD,KAAK,CAA/BC,MAAM;IAAEC,aAAa,GAAKF,KAAK,CAAvBE,aAAa;EAE7B,IAAID,MAAM,CAACE,MAAM,CAACC,YAAY,EAAE,EAAE;IAC9B,OAAO,IAAI;;EAGf,IAAAC,kBAAA,GAAkBJ,MAAM,CAACK,UAAU,EAAE;IAA7BC,KAAK,GAAAF,kBAAA,CAALE,KAAK;EAEb,IAAMC,SAAS,GAAGD,KAAK,CAACE,OAAO,CAACC,IAA6B;EAC7D,IAAMC,UAAU,IAAAC,qBAAA,GAAIX,MAAM,CAACE,MAAM,CA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OAAO,iBACJqE,6BAACwB,UAAU;IACPhH,SAAS,EAAEA,SAAS;IACpBe,OAAO,EAAEA,OAAO;IAChBX,OAAO,EAAEA,OAAO;IAChBK,MAAM,EAAEA,MAAM;IACdI,OAAO,EAAEA,OAAO;IAChBkB,SAAS,EAAEC,EAAE,CAAC;MACV,SAAS,EAAEF,KAAK,KAAK,OAAO;MAC5B,MAAM,EAAEA,KAAK,KAAK;KACrB,CAAC;IACFO,UAAU,EAAEA,UAAU;IACtBI,KAAK,EAAEA,KAAK;IACZF,UAAU,EAAEA,UAAU;IACtBc,QAAQ,EAAEuC,YAAY;IACtBlC,MAAM,EAAEI,UAAU;IAClBE,MAAM,EAAE6B,UAAU;IAClB3B,KAAK,EAAE4B,SAAS;IAChBP,YAAY,EAAEN,gBAAgB;IAC9BlG,aAAa,EAAEA,aAAa;IAC5B6D,iBAAiB,EAAEA,iBAAiB;IACpCsC,aAAa,EAAEA,aAAa;IAC5B+B,QAAQ,EAAE5F;IACZ,IACF,IAAI,EACPV,SAAS,iBACN6E,6BAAC0B,OAAO;IACJC,SAAS,EAAEf,GAAG;IACd/E,EAAE,EAAEA,EAAE;IACNuD,UAAU,EAAEA,UAAqB;IACjCE,QAAQ,EAAEiB,YAAwC;IAClDqB,WAAW,EAAEnB,eAA6B;IAC1CnD,eAAe,EAAEA,eAAe;IAChCE,KAAK,EAAEA;IACT,IACF,IAAI,CACP;AAEb,CAAC,CAAC;;;;"}
|
package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js
CHANGED
@@ -1,26 +1,29 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { useLocalization } from '../../../../../../components/Provider/Localization.js';
|
3
4
|
import { Popover } from '../../../../../../components/Popover/Popover.js';
|
4
5
|
import { SearchInput } from '../../../../../../components/SearchInput/SearchInput.js';
|
5
6
|
|
7
|
+
var _excluded = ["onGoto", "trigger"];
|
6
8
|
function GotoPopover(props) {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
}
|
15
|
-
const handleSearch = value => handleGoto(value);
|
9
|
+
var handleGoto = props.onGoto,
|
10
|
+
trigger = props.trigger,
|
11
|
+
popoverProps = _objectWithoutPropertiesLoose(props, _excluded);
|
12
|
+
var _useLocalization = useLocalization(),
|
13
|
+
texts = _useLocalization.texts;
|
14
|
+
var handleSearch = function handleSearch(value) {
|
15
|
+
return handleGoto(value);
|
16
|
+
};
|
16
17
|
return /*#__PURE__*/React__default.createElement(Popover, Object.assign({}, popoverProps, {
|
17
18
|
anchor: trigger
|
18
19
|
}), /*#__PURE__*/React__default.createElement(Popover.Content, null, /*#__PURE__*/React__default.createElement(SearchInput, {
|
19
20
|
"aria-label": texts.table.columns.menu.gotoRow,
|
20
21
|
name: "query",
|
21
22
|
onSearch: handleSearch,
|
22
|
-
onKeyDown:
|
23
|
-
|
23
|
+
onKeyDown: function onKeyDown(event) {
|
24
|
+
return event.stopPropagation();
|
25
|
+
},
|
26
|
+
placeholder: texts.table.columns.menu.gotoRow + "..."
|
24
27
|
})));
|
25
28
|
}
|
26
29
|
|
package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Goto.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Goto.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Header/components/Goto.tsx"],"sourcesContent":["import React from 'react';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { Popover, PopoverProps } from '../../../../../../components/Popover/Popover';\nimport { SearchInput } from '../../../../../../components/SearchInput/SearchInput';\n\nexport type GotoProps = PopoverProps & {\n onGoto: (query: string) => Promise<void>;\n};\n\nexport function GotoPopover(props: GotoProps) {\n const { onGoto: handleGoto, trigger, ...popoverProps } = props;\n const { texts } = useLocalization();\n\n const handleSearch = value => handleGoto(value);\n\n return (\n <Popover {...popoverProps} anchor={trigger}>\n <Popover.Content>\n <SearchInput\n aria-label={texts.table.columns.menu.gotoRow}\n name=\"query\"\n onSearch={handleSearch}\n onKeyDown={event => event.stopPropagation()}\n placeholder={`${texts.table.columns.menu.gotoRow}...`}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["GotoPopover","props","
|
1
|
+
{"version":3,"file":"Goto.js","sources":["../../../../../../../../../../../src/primitives/Table/Core/components/Header/components/Goto.tsx"],"sourcesContent":["import React from 'react';\nimport { useLocalization } from '../../../../../../components/Provider/Localization';\nimport { Popover, PopoverProps } from '../../../../../../components/Popover/Popover';\nimport { SearchInput } from '../../../../../../components/SearchInput/SearchInput';\n\nexport type GotoProps = PopoverProps & {\n onGoto: (query: string) => Promise<void>;\n};\n\nexport function GotoPopover(props: GotoProps) {\n const { onGoto: handleGoto, trigger, ...popoverProps } = props;\n const { texts } = useLocalization();\n\n const handleSearch = value => handleGoto(value);\n\n return (\n <Popover {...popoverProps} anchor={trigger}>\n <Popover.Content>\n <SearchInput\n aria-label={texts.table.columns.menu.gotoRow}\n name=\"query\"\n onSearch={handleSearch}\n onKeyDown={event => event.stopPropagation()}\n placeholder={`${texts.table.columns.menu.gotoRow}...`}\n />\n </Popover.Content>\n </Popover>\n );\n}\n"],"names":["GotoPopover","props","handleGoto","onGoto","trigger","popoverProps","_objectWithoutPropertiesLoose","_excluded","_useLocalization","useLocalization","texts","handleSearch","value","React","Popover","anchor","Content","SearchInput","table","columns","menu","gotoRow","name","onSearch","onKeyDown","event","stopPropagation","placeholder"],"mappings":";;;;;;;SASgBA,WAAWA,CAACC,KAAgB;EACxC,IAAgBC,UAAU,GAA+BD,KAAK,CAAtDE,MAAM;IAAcC,OAAO,GAAsBH,KAAK,CAAlCG,OAAO;IAAKC,YAAY,GAAAC,6BAAA,CAAKL,KAAK,EAAAM,SAAA;EAC9D,IAAAC,gBAAA,GAAkBC,eAAe,EAAE;IAA3BC,KAAK,GAAAF,gBAAA,CAALE,KAAK;EAEb,IAAMC,YAAY,GAAG,SAAfA,YAAYA,CAAGC,KAAK;IAAA,OAAIV,UAAU,CAACU,KAAK,CAAC;;EAE/C,oBACIC,6BAACC,OAAO,oBAAKT,YAAY;IAAEU,MAAM,EAAEX;mBAC/BS,6BAACC,OAAO,CAACE,OAAO,qBACZH,6BAACI,WAAW;kBACIP,KAAK,CAACQ,KAAK,CAACC,OAAO,CAACC,IAAI,CAACC,OAAO;IAC5CC,IAAI,EAAC,OAAO;IACZC,QAAQ,EAAEZ,YAAY;IACtBa,SAAS,EAAE,SAAAA,UAAAC,KAAK;MAAA,OAAIA,KAAK,CAACC,eAAe,EAAE;;IAC3CC,WAAW,EAAKjB,KAAK,CAACQ,KAAK,CAACC,OAAO,CAACC,IAAI,CAACC,OAAO;IAClD,CACY,CACZ;AAElB;;;;"}
|
package/dist/esm/packages/taco/src/primitives/Table/Core/components/Header/components/Menu.js
CHANGED
@@ -7,39 +7,40 @@ import { _finallyRethrows, _catch } from '../../../../../../../../../node_module
|
|
7
7
|
import { GotoPopover } from './Goto.js';
|
8
8
|
|
9
9
|
function HeaderMenu(props) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
let popoverElement;
|
10
|
+
var canFilter = props.canFilter,
|
11
|
+
canGoto = props.canGoto,
|
12
|
+
canHide = props.canHide,
|
13
|
+
canPin = props.canPin,
|
14
|
+
canSort = props.canSort,
|
15
|
+
columnId = props.columnId,
|
16
|
+
customMenu = props.customMenu,
|
17
|
+
index = props.index,
|
18
|
+
isFiltered = props.isFiltered,
|
19
|
+
handleFilter = props.onFilter,
|
20
|
+
handleGoto = props.onGoto,
|
21
|
+
handleHide = props.onHide,
|
22
|
+
handlePin = props.onPin,
|
23
|
+
handleSortToggle = props.onSortToggle,
|
24
|
+
scrollToIndex = props.scrollToIndex,
|
25
|
+
setRowActiveIndex = props.setRowActiveIndex,
|
26
|
+
sortDirection = props.sortDirection;
|
27
|
+
var _useLocalization = useLocalization(),
|
28
|
+
texts = _useLocalization.texts;
|
29
|
+
var _React$useState = React__default.useState(undefined),
|
30
|
+
popover = _React$useState[0],
|
31
|
+
setPopover = _React$useState[1];
|
32
|
+
var popoverElement;
|
34
33
|
if (popover) {
|
35
|
-
|
34
|
+
var handleClosePopover = function handleClosePopover() {
|
35
|
+
return setPopover(undefined);
|
36
|
+
};
|
36
37
|
switch (popover) {
|
37
38
|
case 'goto':
|
38
39
|
{
|
39
40
|
if (handleGoto) {
|
40
|
-
|
41
|
+
var _goto = function _goto(query) {
|
41
42
|
try {
|
42
|
-
|
43
|
+
var _temp = _finallyRethrows(function () {
|
43
44
|
return _catch(function () {
|
44
45
|
return Promise.resolve(handleGoto(query)).then(function (index) {
|
45
46
|
setRowActiveIndex(index);
|
@@ -59,20 +60,26 @@ function HeaderMenu(props) {
|
|
59
60
|
return Promise.reject(e);
|
60
61
|
}
|
61
62
|
};
|
62
|
-
popoverElement =
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
63
|
+
popoverElement = function popoverElement(props) {
|
64
|
+
return /*#__PURE__*/React__default.createElement(GotoPopover, Object.assign({}, props, {
|
65
|
+
open: true,
|
66
|
+
onChange: handleClosePopover,
|
67
|
+
onGoto: _goto
|
68
|
+
}));
|
69
|
+
};
|
67
70
|
}
|
68
71
|
}
|
69
72
|
}
|
70
73
|
}
|
71
|
-
|
72
|
-
|
74
|
+
var memoedMenuItems = React__default.useMemo(function () {
|
75
|
+
var menuItems = [];
|
73
76
|
if (canHide && handleHide) {
|
74
77
|
// we do this in the next tick, otherwise the menu closes and react throws a "state update on unmounted component" error
|
75
|
-
|
78
|
+
var handleClick = function handleClick(event) {
|
79
|
+
return setTimeout(function () {
|
80
|
+
return handleHide(event);
|
81
|
+
}, 1);
|
82
|
+
};
|
76
83
|
menuItems.push(/*#__PURE__*/React__default.createElement(Menu.Item, {
|
77
84
|
icon: "eye-off",
|
78
85
|
onClick: handleClick
|
@@ -81,56 +88,72 @@ function HeaderMenu(props) {
|
|
81
88
|
if (canSort) {
|
82
89
|
menuItems.push(/*#__PURE__*/React__default.createElement(Menu.Item, {
|
83
90
|
icon: "sort-by",
|
84
|
-
subMenu: ()
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
91
|
+
subMenu: function subMenu() {
|
92
|
+
return /*#__PURE__*/React__default.createElement(Menu.SubMenu, null, /*#__PURE__*/React__default.createElement(Menu.RadioGroup, {
|
93
|
+
onChange: handleSortToggle,
|
94
|
+
value: sortDirection
|
95
|
+
}, /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
|
96
|
+
value: "asc"
|
97
|
+
}, texts.table.columns.menu.sortingOrder.ascending), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
|
98
|
+
value: "desc"
|
99
|
+
}, texts.table.columns.menu.sortingOrder.descending), /*#__PURE__*/React__default.createElement(Menu.RadioGroup.Item, {
|
100
|
+
value: false
|
101
|
+
}, texts.table.columns.menu.sortingOrder.unsorted)));
|
102
|
+
}
|
94
103
|
}, texts.table.columns.menu.sorting));
|
95
104
|
}
|
96
105
|
if (canGoto) {
|
97
106
|
menuItems.push(/*#__PURE__*/React__default.createElement(Menu.Item, {
|
98
107
|
icon: "move",
|
99
|
-
onClick: ()
|
108
|
+
onClick: function onClick() {
|
109
|
+
return setPopover('goto');
|
110
|
+
},
|
100
111
|
shortcut: "g"
|
101
112
|
}, texts.table.columns.menu.gotoRow, "..."));
|
102
113
|
}
|
103
114
|
if (canPin && handlePin) {
|
104
115
|
menuItems.push(/*#__PURE__*/React__default.createElement(Menu.Item, {
|
105
116
|
icon: "column-freeze",
|
106
|
-
onClick: ()
|
117
|
+
onClick: function onClick() {
|
118
|
+
return handlePin(index);
|
119
|
+
}
|
107
120
|
}, index === 0 ? texts.table.columns.menu.freezeFirstColumn : texts.table.columns.menu.freezeUptoColumn.replace('[TOTAL]', String(index + 1))));
|
108
121
|
menuItems.push(/*#__PURE__*/React__default.createElement(Menu.Item, {
|
109
122
|
icon: "column-unfreeze",
|
110
|
-
onClick: ()
|
123
|
+
onClick: function onClick() {
|
124
|
+
return handlePin(undefined);
|
125
|
+
}
|
111
126
|
}, texts.table.columns.menu.unfreezeColumns));
|
112
127
|
}
|
113
128
|
if (canFilter && handleFilter) {
|
114
129
|
menuItems.push(/*#__PURE__*/React__default.createElement(Menu.Item, {
|
115
130
|
icon: isFiltered ? 'filter-solid' : 'filter',
|
116
|
-
onClick: ()
|
131
|
+
onClick: function onClick() {
|
132
|
+
return handleFilter();
|
133
|
+
}
|
117
134
|
}, isFiltered ? texts.table.columns.menu.editFilter : texts.table.columns.menu.filter));
|
118
135
|
}
|
119
136
|
if (customMenu) {
|
120
|
-
|
137
|
+
var customItems = customMenu.map(function (menuItem) {
|
138
|
+
return menuItem(columnId);
|
139
|
+
}).filter(function (action) {
|
140
|
+
return !!action;
|
141
|
+
});
|
121
142
|
if (customItems.length) {
|
122
143
|
if (menuItems.length) {
|
123
144
|
menuItems.push(/*#__PURE__*/React__default.createElement(Menu.Separator, null));
|
124
145
|
}
|
125
|
-
menuItems.push(
|
146
|
+
menuItems.push.apply(menuItems, customItems);
|
126
147
|
}
|
127
148
|
}
|
128
|
-
return menuItems.map((item, key)
|
129
|
-
|
130
|
-
|
149
|
+
return menuItems.map(function (item, key) {
|
150
|
+
return /*#__PURE__*/React__default.cloneElement(item, {
|
151
|
+
key: key
|
152
|
+
});
|
153
|
+
});
|
131
154
|
}, [canFilter, canGoto, canHide, canPin, canSort, customMenu, handleGoto, handleSortToggle, index, isFiltered, sortDirection]);
|
132
155
|
// can't use display: none because the button needs to be focusable
|
133
|
-
|
156
|
+
var className = cn(
|
134
157
|
// positioning
|
135
158
|
'justify-end overflow-hidden',
|
136
159
|
// sizing
|
@@ -146,10 +169,14 @@ function HeaderMenu(props) {
|
|
146
169
|
return /*#__PURE__*/React__default.createElement(IconButton, {
|
147
170
|
className: className,
|
148
171
|
icon: "more",
|
149
|
-
menu: popoverElement ? undefined :
|
172
|
+
menu: popoverElement ? undefined : function (menuProps) {
|
173
|
+
return /*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, null, memoedMenuItems));
|
174
|
+
},
|
150
175
|
popover: popoverElement,
|
151
|
-
onClickCapture:
|
152
|
-
|
176
|
+
onClickCapture: function onClickCapture(event) {
|
177
|
+
return event.preventDefault();
|
178
|
+
},
|
179
|
+
onKeyDown: function onKeyDown(event) {
|
153
180
|
// Removes focus from the column header menu button so that active row shortcuts execute when Tab,
|
154
181
|
// Shift+Tab, or any other keydown event occurs.
|
155
182
|
if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {
|