@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,10 +1,10 @@
|
|
1
1
|
import { isDate, isValid } from 'date-fns';
|
2
2
|
|
3
|
-
|
3
|
+
var isWeakEqual = function isWeakEqual(leftDate, rightDate) {
|
4
4
|
return leftDate.getFullYear() === rightDate.getFullYear() && leftDate.getMonth() === rightDate.getMonth() && leftDate.getDate() === rightDate.getDate();
|
5
5
|
};
|
6
6
|
function parse(date) {
|
7
|
-
|
7
|
+
var value;
|
8
8
|
if (isDate(date)) {
|
9
9
|
value = date;
|
10
10
|
} else if (typeof date === 'string') {
|
@@ -15,39 +15,63 @@ function parse(date) {
|
|
15
15
|
}
|
16
16
|
return value;
|
17
17
|
}
|
18
|
-
function format(date, mask
|
18
|
+
function format(date, mask) {
|
19
|
+
if (mask === void 0) {
|
20
|
+
mask = 'dd.mm.yy';
|
21
|
+
}
|
19
22
|
if (date === undefined) {
|
20
23
|
return undefined;
|
21
24
|
}
|
22
|
-
|
25
|
+
var value = parse(date);
|
23
26
|
if (!isValid(value) || value === undefined) {
|
24
27
|
return undefined;
|
25
28
|
}
|
26
|
-
|
29
|
+
var pad = function pad(v) {
|
30
|
+
return String(v).length === 1 ? "0" + v : v.toString();
|
31
|
+
};
|
27
32
|
return mask.replace('dd', pad(value.getDate())).replace('mm', pad(value.getMonth() + 1)).replace('yy', String(value.getFullYear()).slice(2));
|
28
33
|
}
|
29
|
-
|
34
|
+
var parseFromCustomString = function parseFromCustomString(date, mask, defaultMonth, defaultYear) {
|
35
|
+
var _defaultYear, _defaultMonth;
|
36
|
+
if (date === void 0) {
|
37
|
+
date = '';
|
38
|
+
}
|
39
|
+
if (mask === void 0) {
|
40
|
+
mask = 'dd.mm.yy';
|
41
|
+
}
|
42
|
+
if (defaultMonth === void 0) {
|
43
|
+
defaultMonth = undefined;
|
44
|
+
}
|
45
|
+
if (defaultYear === void 0) {
|
46
|
+
defaultYear = undefined;
|
47
|
+
}
|
30
48
|
if (!date || !date.length) {
|
31
49
|
return undefined;
|
32
50
|
}
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
51
|
+
var sanitizedMask = mask.split(/[^dmy]/);
|
52
|
+
var dd = sanitizedMask.findIndex(function (x) {
|
53
|
+
return x === 'dd';
|
54
|
+
});
|
55
|
+
var mm = sanitizedMask.findIndex(function (x) {
|
56
|
+
return x === 'mm';
|
57
|
+
});
|
58
|
+
var yy = sanitizedMask.findIndex(function (x) {
|
59
|
+
return x === 'yy' || x === 'yyyy';
|
60
|
+
});
|
61
|
+
var day;
|
62
|
+
var month;
|
63
|
+
var year;
|
64
|
+
var getFullYear = function getFullYear(y) {
|
41
65
|
if (y && y.length === 2) {
|
42
|
-
|
43
|
-
return z > 50 ?
|
66
|
+
var z = Number.parseInt(y, 10);
|
67
|
+
return z > 50 ? "19" + y : "20" + y;
|
44
68
|
}
|
45
69
|
return y;
|
46
70
|
};
|
47
|
-
|
71
|
+
var inputParts = date.split(/\D/);
|
48
72
|
if (inputParts.length === 1) {
|
49
|
-
|
50
|
-
|
73
|
+
var fullDate = inputParts[0];
|
74
|
+
var unseparatedMask = mask.replace(/[^dmy]/g, '');
|
51
75
|
day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);
|
52
76
|
month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);
|
53
77
|
year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years
|
@@ -59,15 +83,15 @@ const parseFromCustomString = (date = '', mask = 'dd.mm.yy', defaultMonth = unde
|
|
59
83
|
day = Number.parseInt(day, 10);
|
60
84
|
month = Number.parseInt(month, 10);
|
61
85
|
year = Number.parseInt(year, 10);
|
62
|
-
|
63
|
-
return new Date(/* year */Object.is(year, NaN) ? defaultYear !== null &&
|
86
|
+
var currentDate = new Date();
|
87
|
+
return new Date(/* year */Object.is(year, NaN) ? (_defaultYear = defaultYear) !== null && _defaultYear !== void 0 ? _defaultYear : currentDate.getFullYear() : year, /* month */Object.is(month, NaN) ? (_defaultMonth = defaultMonth) !== null && _defaultMonth !== void 0 ? _defaultMonth : currentDate.getMonth() : month - 1,
|
64
88
|
// months are zero based in javascript, so subtract a day
|
65
89
|
/* day */
|
66
90
|
Object.is(day, NaN) ? currentDate.getDate() : day, /* hours */12, /* minutes */0 // set to midday to avoid UTC offset causing dates to be mismatched server side
|
67
91
|
);
|
68
92
|
};
|
69
|
-
|
70
|
-
|
93
|
+
var parseFromISOString = function parseFromISOString(date) {
|
94
|
+
var tempDate = new Date(date);
|
71
95
|
return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;
|
72
96
|
};
|
73
97
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"date.js","sources":["../../../../../../src/utils/date.ts"],"sourcesContent":["import { isDate, isValid } from 'date-fns';\n\nexport const isWeakEqual = (leftDate: Date, rightDate: Date) => {\n return (\n leftDate.getFullYear() === rightDate.getFullYear() &&\n leftDate.getMonth() === rightDate.getMonth() &&\n leftDate.getDate() === rightDate.getDate()\n );\n};\n\nexport function parse(date: string | Date | undefined) {\n let value: Date | undefined;\n\n if (isDate(date)) {\n value = date as Date;\n } else if (typeof date === 'string') {\n value = parseFromISOString(date as string);\n }\n\n if (!isValid(value)) {\n return undefined;\n }\n\n return value;\n}\n\nexport function format(date: string | Date | undefined, mask = 'dd.mm.yy'): string | undefined {\n if (date === undefined) {\n return undefined;\n }\n\n const value = parse(date);\n\n if (!isValid(value) || value === undefined) {\n return undefined;\n }\n\n const pad = (v: number): string => (String(v).length === 1 ? `0${v}` : v.toString());\n\n return mask\n .replace('dd', pad(value.getDate()))\n .replace('mm', pad(value.getMonth() + 1))\n .replace('yy', String(value.getFullYear()).slice(2));\n}\n\nexport const parseFromCustomString = (\n date = '',\n mask = 'dd.mm.yy',\n defaultMonth: number | undefined = undefined,\n defaultYear: number | undefined = undefined\n): Date | undefined => {\n if (!date || !date.length) {\n return undefined;\n }\n\n const sanitizedMask = mask.split(/[^dmy]/);\n const dd = sanitizedMask.findIndex(x => x === 'dd');\n const mm = sanitizedMask.findIndex(x => x === 'mm');\n const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');\n\n let day;\n let month;\n let year;\n\n const getFullYear = (y: string): string => {\n if (y && y.length === 2) {\n const z = Number.parseInt(y, 10);\n\n return z > 50 ? `19${y}` : `20${y}`;\n }\n\n return y;\n };\n\n const inputParts = date.split(/\\D/);\n\n if (inputParts.length === 1) {\n const fullDate = inputParts[0];\n const unseparatedMask = mask.replace(/[^dmy]/g, '');\n\n day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);\n month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);\n year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years\n } else {\n day = inputParts[dd];\n month = inputParts[mm];\n year = getFullYear(inputParts[yy]);\n }\n\n day = Number.parseInt(day, 10);\n month = Number.parseInt(month, 10);\n year = Number.parseInt(year, 10);\n\n const currentDate = new Date();\n\n return new Date(\n /* year */ Object.is(year, NaN) ? defaultYear ?? currentDate.getFullYear() : year,\n /* month */ Object.is(month, NaN) ? defaultMonth ?? currentDate.getMonth() : month - 1, // months are zero based in javascript, so subtract a day\n /* day */ Object.is(day, NaN) ? currentDate.getDate() : day,\n /* hours */ 12,\n /* minutes */ 0 // set to midday to avoid UTC offset causing dates to be mismatched server side\n );\n};\n\nexport const parseFromISOString = (date: string): Date | undefined => {\n const tempDate = new Date(date);\n return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;\n};\n"],"names":["isWeakEqual","leftDate","rightDate","getFullYear","getMonth","getDate","parse","date","value","isDate","parseFromISOString","isValid","undefined","format","mask","pad","v","String","length","toString","replace","slice","parseFromCustomString","defaultMonth","defaultYear","sanitizedMask","split","dd","findIndex","x","mm","yy","day","month","year","y","z","Number","parseInt","inputParts","fullDate","unseparatedMask","indexOf","lastIndexOf","currentDate","Date","Object","is","NaN","tempDate"],"mappings":";;
|
1
|
+
{"version":3,"file":"date.js","sources":["../../../../../../src/utils/date.ts"],"sourcesContent":["import { isDate, isValid } from 'date-fns';\n\nexport const isWeakEqual = (leftDate: Date, rightDate: Date) => {\n return (\n leftDate.getFullYear() === rightDate.getFullYear() &&\n leftDate.getMonth() === rightDate.getMonth() &&\n leftDate.getDate() === rightDate.getDate()\n );\n};\n\nexport function parse(date: string | Date | undefined) {\n let value: Date | undefined;\n\n if (isDate(date)) {\n value = date as Date;\n } else if (typeof date === 'string') {\n value = parseFromISOString(date as string);\n }\n\n if (!isValid(value)) {\n return undefined;\n }\n\n return value;\n}\n\nexport function format(date: string | Date | undefined, mask = 'dd.mm.yy'): string | undefined {\n if (date === undefined) {\n return undefined;\n }\n\n const value = parse(date);\n\n if (!isValid(value) || value === undefined) {\n return undefined;\n }\n\n const pad = (v: number): string => (String(v).length === 1 ? `0${v}` : v.toString());\n\n return mask\n .replace('dd', pad(value.getDate()))\n .replace('mm', pad(value.getMonth() + 1))\n .replace('yy', String(value.getFullYear()).slice(2));\n}\n\nexport const parseFromCustomString = (\n date = '',\n mask = 'dd.mm.yy',\n defaultMonth: number | undefined = undefined,\n defaultYear: number | undefined = undefined\n): Date | undefined => {\n if (!date || !date.length) {\n return undefined;\n }\n\n const sanitizedMask = mask.split(/[^dmy]/);\n const dd = sanitizedMask.findIndex(x => x === 'dd');\n const mm = sanitizedMask.findIndex(x => x === 'mm');\n const yy = sanitizedMask.findIndex(x => x === 'yy' || x === 'yyyy');\n\n let day;\n let month;\n let year;\n\n const getFullYear = (y: string): string => {\n if (y && y.length === 2) {\n const z = Number.parseInt(y, 10);\n\n return z > 50 ? `19${y}` : `20${y}`;\n }\n\n return y;\n };\n\n const inputParts = date.split(/\\D/);\n\n if (inputParts.length === 1) {\n const fullDate = inputParts[0];\n const unseparatedMask = mask.replace(/[^dmy]/g, '');\n\n day = fullDate.slice(unseparatedMask.indexOf('d'), unseparatedMask.lastIndexOf('d') + 1);\n month = fullDate.slice(unseparatedMask.indexOf('m'), unseparatedMask.lastIndexOf('m') + 1);\n year = getFullYear(fullDate.slice(unseparatedMask.indexOf('y'), unseparatedMask.lastIndexOf('y') + 3)); // account for full years\n } else {\n day = inputParts[dd];\n month = inputParts[mm];\n year = getFullYear(inputParts[yy]);\n }\n\n day = Number.parseInt(day, 10);\n month = Number.parseInt(month, 10);\n year = Number.parseInt(year, 10);\n\n const currentDate = new Date();\n\n return new Date(\n /* year */ Object.is(year, NaN) ? defaultYear ?? currentDate.getFullYear() : year,\n /* month */ Object.is(month, NaN) ? defaultMonth ?? currentDate.getMonth() : month - 1, // months are zero based in javascript, so subtract a day\n /* day */ Object.is(day, NaN) ? currentDate.getDate() : day,\n /* hours */ 12,\n /* minutes */ 0 // set to midday to avoid UTC offset causing dates to be mismatched server side\n );\n};\n\nexport const parseFromISOString = (date: string): Date | undefined => {\n const tempDate = new Date(date);\n return isValid(tempDate) ? parseFromCustomString(format(new Date(date))) : undefined;\n};\n"],"names":["isWeakEqual","leftDate","rightDate","getFullYear","getMonth","getDate","parse","date","value","isDate","parseFromISOString","isValid","undefined","format","mask","pad","v","String","length","toString","replace","slice","parseFromCustomString","defaultMonth","defaultYear","sanitizedMask","split","dd","findIndex","x","mm","yy","day","month","year","y","z","Number","parseInt","inputParts","fullDate","unseparatedMask","indexOf","lastIndexOf","currentDate","Date","Object","is","NaN","_defaultYear","_defaultMonth","tempDate"],"mappings":"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"}
|
@@ -1,8 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
return function (
|
1
|
+
var debounce = function debounce(fn, delay) {
|
2
|
+
var timeoutId;
|
3
|
+
return function () {
|
4
|
+
var _this = this;
|
5
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
6
|
+
args[_key] = arguments[_key];
|
7
|
+
}
|
4
8
|
clearTimeout(timeoutId);
|
5
|
-
timeoutId = setTimeout(
|
9
|
+
timeoutId = setTimeout(function () {
|
10
|
+
return fn.apply(_this, args);
|
11
|
+
}, delay);
|
6
12
|
};
|
7
13
|
};
|
8
14
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"debounce.js","sources":["../../../../../../src/utils/debounce.ts"],"sourcesContent":["export const debounce = (fn: Function, delay: number) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n return function (this: any, ...args: any[]) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn.apply(this, args), delay);\n };\n};\n"],"names":["debounce","fn","delay","timeoutId","args","clearTimeout","setTimeout","apply"],"mappings":"
|
1
|
+
{"version":3,"file":"debounce.js","sources":["../../../../../../src/utils/debounce.ts"],"sourcesContent":["export const debounce = (fn: Function, delay: number) => {\n let timeoutId: ReturnType<typeof setTimeout>;\n\n return function (this: any, ...args: any[]) {\n clearTimeout(timeoutId);\n timeoutId = setTimeout(() => fn.apply(this, args), delay);\n };\n};\n"],"names":["debounce","fn","delay","timeoutId","args","Array","_len","_key","arguments","clearTimeout","setTimeout","apply","_this"],"mappings":"IAAaA,QAAQ,GAAG,SAAXA,QAAQA,CAAIC,EAAY,EAAEC,KAAa;EAChD,IAAIC,SAAwC;EAE5C,OAAO;;sCAAwBC,IAAW,OAAAC,KAAA,CAAAC,IAAA,GAAAC,IAAA,MAAAA,IAAA,GAAAD,IAAA,EAAAC,IAAA;MAAXH,IAAW,CAAAG,IAAA,IAAAC,SAAA,CAAAD,IAAA;;IACtCE,YAAY,CAACN,SAAS,CAAC;IACvBA,SAAS,GAAGO,UAAU,CAAC;MAAA,OAAMT,EAAE,CAACU,KAAK,CAACC,KAAI,EAAER,IAAI,CAAC;OAAEF,KAAK,CAAC;GAC5D;AACL;;;;"}
|
@@ -1,5 +1,7 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
var mobiles = /iPhone|iPad|iPod|Android/i;
|
2
|
+
var isMobileDevice = function isMobileDevice(navigator) {
|
3
|
+
return !!(navigator !== null && navigator !== void 0 && navigator.userAgent) && mobiles.test(navigator.userAgent);
|
4
|
+
};
|
3
5
|
|
4
6
|
export { isMobileDevice };
|
5
7
|
//# sourceMappingURL=device.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"device.js","sources":["../../../../../../src/utils/device.ts"],"sourcesContent":["const mobiles = /iPhone|iPad|iPod|Android/i;\n\nexport const isMobileDevice = (navigator: Navigator | undefined) => !!navigator?.userAgent && mobiles.test(navigator.userAgent);\n"],"names":["mobiles","isMobileDevice","navigator","userAgent","test"],"mappings":"AAAA,
|
1
|
+
{"version":3,"file":"device.js","sources":["../../../../../../src/utils/device.ts"],"sourcesContent":["const mobiles = /iPhone|iPad|iPod|Android/i;\n\nexport const isMobileDevice = (navigator: Navigator | undefined) => !!navigator?.userAgent && mobiles.test(navigator.userAgent);\n"],"names":["mobiles","isMobileDevice","navigator","userAgent","test"],"mappings":"AAAA,IAAMA,OAAO,GAAG,2BAA2B;IAE9BC,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,SAAgC;EAAA,OAAK,CAAC,EAACA,SAAS,aAATA,SAAS,eAATA,SAAS,CAAEC,SAAS,KAAIH,OAAO,CAACI,IAAI,CAACF,SAAS,CAACC,SAAS,CAAC;AAAA;;;;"}
|
@@ -1,18 +1,22 @@
|
|
1
1
|
// taken from react-aria
|
2
|
-
|
3
|
-
|
2
|
+
var FOCUSABLE_ELEMENTS = ['[tabindex]:not([disabled])', 'input:not([disabled])', 'select:not([disabled])', 'textarea:not([disabled])', 'button:not([disabled])', 'a[href]', 'area[href]', 'summary', 'iframe', 'object', 'embed', 'audio[controls]', 'video[controls]', '[contenteditable]', 'details:not([disabled])', 'summary:not(:disabled)'];
|
3
|
+
var hasFocusableElement = function hasFocusableElement(element) {
|
4
4
|
if (!element) {
|
5
5
|
return null;
|
6
6
|
}
|
7
7
|
return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));
|
8
8
|
};
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
var getIndexOfFirstChildOverflowingParent = function getIndexOfFirstChildOverflowingParent(element, overscan) {
|
10
|
+
if (overscan === void 0) {
|
11
|
+
overscan = 0;
|
12
|
+
}
|
13
|
+
var index = 0;
|
14
|
+
var boundaryChildIndex = null;
|
15
|
+
var clientRect = element.getBoundingClientRect();
|
16
|
+
for (var _i = 0, _Array$from = Array.from(element.children); _i < _Array$from.length; _i++) {
|
17
|
+
var child = _Array$from[_i];
|
18
|
+
var right = child.getBoundingClientRect().right - clientRect.left;
|
19
|
+
var width = clientRect.width - overscan;
|
16
20
|
if (right > width) {
|
17
21
|
boundaryChildIndex = index;
|
18
22
|
break;
|
@@ -21,17 +25,19 @@ const getIndexOfFirstChildOverflowingParent = (element, overscan = 0) => {
|
|
21
25
|
}
|
22
26
|
return boundaryChildIndex;
|
23
27
|
};
|
24
|
-
|
28
|
+
var getNextFocussableElement = function getNextFocussableElement(currentElement) {
|
25
29
|
if (!currentElement) {
|
26
30
|
return null;
|
27
31
|
}
|
28
|
-
|
29
|
-
|
32
|
+
var focussableElements = [].concat(document.querySelectorAll(FOCUSABLE_ELEMENTS.join(',')));
|
33
|
+
var currentElementIndex = focussableElements.indexOf(currentElement);
|
30
34
|
if (currentElementIndex > -1) {
|
31
|
-
focussableElements = focussableElements.slice(currentElementIndex + 1).filter(
|
35
|
+
focussableElements = focussableElements.slice(currentElementIndex + 1).filter(function (element) {
|
36
|
+
return element.getAttribute('tabindex') !== '-1';
|
37
|
+
});
|
32
38
|
if (focussableElements.length) {
|
33
39
|
var _focussableElements$;
|
34
|
-
focussableElements = focussableElements.filter(element
|
40
|
+
focussableElements = focussableElements.filter(function (element) {
|
35
41
|
var _element$checkVisibil, _element$checkVisibil2;
|
36
42
|
return (_element$checkVisibil = (_element$checkVisibil2 = element.checkVisibility) === null || _element$checkVisibil2 === void 0 ? void 0 : _element$checkVisibil2.call(element)) !== null && _element$checkVisibil !== void 0 ? _element$checkVisibil : true;
|
37
43
|
});
|
@@ -40,24 +46,24 @@ const getNextFocussableElement = currentElement => {
|
|
40
46
|
}
|
41
47
|
return null;
|
42
48
|
};
|
43
|
-
|
49
|
+
var getOverlaySelector = function getOverlaySelector(element) {
|
44
50
|
switch (element === null || element === void 0 ? void 0 : element.getAttribute('role')) {
|
45
51
|
case 'dialog':
|
46
|
-
return
|
52
|
+
return "[aria-controls='" + element.id + "']";
|
47
53
|
case 'menu':
|
48
|
-
return
|
54
|
+
return "#" + element.getAttribute('aria-labelledby');
|
49
55
|
default:
|
50
56
|
return undefined;
|
51
57
|
}
|
52
58
|
};
|
53
59
|
function isElementTriggeredFromContainer(element, container) {
|
54
60
|
var _getOverlaySelector, _element$closest;
|
55
|
-
|
61
|
+
var selector = (_getOverlaySelector = getOverlaySelector(element)) !== null && _getOverlaySelector !== void 0 ? _getOverlaySelector : getOverlaySelector((_element$closest = element === null || element === void 0 ? void 0 : element.closest('[role=dialog],[role=menu]')) !== null && _element$closest !== void 0 ? _element$closest : null);
|
56
62
|
if (selector) {
|
57
63
|
if (container !== null && container !== void 0 && container.querySelector(selector)) {
|
58
64
|
return true;
|
59
65
|
}
|
60
|
-
|
66
|
+
var elementInDocument = document.querySelector(selector);
|
61
67
|
// if the element does exist, see if it is itself connected to somethng that was triggered from the container
|
62
68
|
if (elementInDocument) {
|
63
69
|
return isElementTriggeredFromContainer(elementInDocument, container);
|
@@ -87,7 +93,7 @@ function isElementInsideTable3OrReport(element) {
|
|
87
93
|
}
|
88
94
|
function setDataFocusAttribute(target) {
|
89
95
|
target.setAttribute('data-focus', 'programmatic');
|
90
|
-
|
96
|
+
var cleanup = function cleanup() {
|
91
97
|
target.removeAttribute('data-focus');
|
92
98
|
target.removeEventListener('blur', cleanup);
|
93
99
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dom.js","sources":["../../../../../../src/utils/dom.ts"],"sourcesContent":["// taken from react-aria\nconst FOCUSABLE_ELEMENTS = [\n '[tabindex]:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]',\n 'details:not([disabled])',\n 'summary:not(:disabled)',\n];\n\nexport const hasFocusableElement = (element: HTMLElement | null) => {\n if (!element) {\n return null;\n }\n\n return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));\n};\n\nexport const isOverflowing = (element: HTMLElement | null) =>\n element !== null ? element.scrollWidth > element.offsetWidth : false;\n\nexport const getIndexOfFirstChildOverflowingParent = (element: HTMLElement, overscan = 0) => {\n let index = 0;\n let boundaryChildIndex: number | null = null;\n const clientRect = element.getBoundingClientRect();\n\n for (const child of Array.from(element.children)) {\n const right = child.getBoundingClientRect().right - clientRect.left;\n const width = clientRect.width - overscan;\n\n if (right > width) {\n boundaryChildIndex = index;\n break;\n }\n index++;\n }\n\n return boundaryChildIndex;\n};\n\nexport const getNextFocussableElement = (currentElement: HTMLElement | null) => {\n if (!currentElement) {\n return null;\n }\n\n let focussableElements = [...document.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS.join(','))];\n const currentElementIndex = focussableElements.indexOf(currentElement);\n\n if (currentElementIndex > -1) {\n focussableElements = focussableElements\n .slice(currentElementIndex + 1)\n .filter(element => element.getAttribute('tabindex') !== '-1');\n\n if (focussableElements.length) {\n focussableElements = focussableElements.filter(element => (element as any).checkVisibility?.() ?? true);\n return focussableElements[0] ?? null;\n }\n }\n\n return null;\n};\n\nconst getOverlaySelector = (element: Element | null) => {\n switch (element?.getAttribute('role')) {\n case 'dialog':\n return `[aria-controls='${element.id}']`;\n\n case 'menu':\n return `#${element.getAttribute('aria-labelledby')}`;\n\n default:\n return undefined;\n }\n};\n\nexport function isElementTriggeredFromContainer(element: Element | null, container: Element | null) {\n const selector = getOverlaySelector(element) ?? getOverlaySelector(element?.closest('[role=dialog],[role=menu]') ?? null);\n\n if (selector) {\n if (container?.querySelector(selector)) {\n return true;\n }\n\n const elementInDocument = document.querySelector(selector);\n\n // if the element does exist, see if it is itself connected to somethng that was triggered from the container\n if (elementInDocument) {\n return isElementTriggeredFromContainer(elementInDocument, container);\n }\n\n return false;\n }\n\n return false;\n}\n\nexport function isElementInsideOrTriggeredFromContainer(element: Element | null, container: Element | null) {\n return isElementTriggeredFromContainer(element, container) || !!container?.contains(element);\n}\n\nexport function isElementInsideOverlay(element: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]');\n}\n\nexport function isSiblingElementInsideSameParentOverlay(element: Element | null, sibling: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]')?.contains(sibling);\n}\n\nexport function isElementInteractive(element: Element | null) {\n if (!element) {\n return false;\n }\n\n return (\n ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'LABEL', 'OPTION'].includes(element.tagName) &&\n !(element as HTMLElement).hidden &&\n !(element as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement).disabled &&\n !(element as HTMLInputElement | HTMLTextAreaElement).readOnly\n );\n}\n\nexport function isElementInsideTable3OrReport(element: Element | null) {\n return !!element?.closest('[data-taco^=table]');\n}\n\nexport function setDataFocusAttribute(target: Element) {\n target.setAttribute('data-focus', 'programmatic');\n\n const cleanup = () => {\n target.removeAttribute('data-focus');\n target.removeEventListener('blur', cleanup);\n };\n\n target.addEventListener('blur', cleanup);\n}\n"],"names":["FOCUSABLE_ELEMENTS","hasFocusableElement","element","querySelector","join","getIndexOfFirstChildOverflowingParent","overscan","index","boundaryChildIndex","clientRect","getBoundingClientRect","
|
1
|
+
{"version":3,"file":"dom.js","sources":["../../../../../../src/utils/dom.ts"],"sourcesContent":["// taken from react-aria\nconst FOCUSABLE_ELEMENTS = [\n '[tabindex]:not([disabled])',\n 'input:not([disabled])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]',\n 'details:not([disabled])',\n 'summary:not(:disabled)',\n];\n\nexport const hasFocusableElement = (element: HTMLElement | null) => {\n if (!element) {\n return null;\n }\n\n return !!element.querySelector(FOCUSABLE_ELEMENTS.join(','));\n};\n\nexport const isOverflowing = (element: HTMLElement | null) =>\n element !== null ? element.scrollWidth > element.offsetWidth : false;\n\nexport const getIndexOfFirstChildOverflowingParent = (element: HTMLElement, overscan = 0) => {\n let index = 0;\n let boundaryChildIndex: number | null = null;\n const clientRect = element.getBoundingClientRect();\n\n for (const child of Array.from(element.children)) {\n const right = child.getBoundingClientRect().right - clientRect.left;\n const width = clientRect.width - overscan;\n\n if (right > width) {\n boundaryChildIndex = index;\n break;\n }\n index++;\n }\n\n return boundaryChildIndex;\n};\n\nexport const getNextFocussableElement = (currentElement: HTMLElement | null) => {\n if (!currentElement) {\n return null;\n }\n\n let focussableElements = [...document.querySelectorAll<HTMLElement>(FOCUSABLE_ELEMENTS.join(','))];\n const currentElementIndex = focussableElements.indexOf(currentElement);\n\n if (currentElementIndex > -1) {\n focussableElements = focussableElements\n .slice(currentElementIndex + 1)\n .filter(element => element.getAttribute('tabindex') !== '-1');\n\n if (focussableElements.length) {\n focussableElements = focussableElements.filter(element => (element as any).checkVisibility?.() ?? true);\n return focussableElements[0] ?? null;\n }\n }\n\n return null;\n};\n\nconst getOverlaySelector = (element: Element | null) => {\n switch (element?.getAttribute('role')) {\n case 'dialog':\n return `[aria-controls='${element.id}']`;\n\n case 'menu':\n return `#${element.getAttribute('aria-labelledby')}`;\n\n default:\n return undefined;\n }\n};\n\nexport function isElementTriggeredFromContainer(element: Element | null, container: Element | null) {\n const selector = getOverlaySelector(element) ?? getOverlaySelector(element?.closest('[role=dialog],[role=menu]') ?? null);\n\n if (selector) {\n if (container?.querySelector(selector)) {\n return true;\n }\n\n const elementInDocument = document.querySelector(selector);\n\n // if the element does exist, see if it is itself connected to somethng that was triggered from the container\n if (elementInDocument) {\n return isElementTriggeredFromContainer(elementInDocument, container);\n }\n\n return false;\n }\n\n return false;\n}\n\nexport function isElementInsideOrTriggeredFromContainer(element: Element | null, container: Element | null) {\n return isElementTriggeredFromContainer(element, container) || !!container?.contains(element);\n}\n\nexport function isElementInsideOverlay(element: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]');\n}\n\nexport function isSiblingElementInsideSameParentOverlay(element: Element | null, sibling: Element | null) {\n return !!element?.closest('[role=dialog],[role=menu]')?.contains(sibling);\n}\n\nexport function isElementInteractive(element: Element | null) {\n if (!element) {\n return false;\n }\n\n return (\n ['A', 'BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'LABEL', 'OPTION'].includes(element.tagName) &&\n !(element as HTMLElement).hidden &&\n !(element as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement | HTMLButtonElement).disabled &&\n !(element as HTMLInputElement | HTMLTextAreaElement).readOnly\n );\n}\n\nexport function isElementInsideTable3OrReport(element: Element | null) {\n return !!element?.closest('[data-taco^=table]');\n}\n\nexport function setDataFocusAttribute(target: Element) {\n target.setAttribute('data-focus', 'programmatic');\n\n const cleanup = () => {\n target.removeAttribute('data-focus');\n target.removeEventListener('blur', cleanup);\n };\n\n target.addEventListener('blur', cleanup);\n}\n"],"names":["FOCUSABLE_ELEMENTS","hasFocusableElement","element","querySelector","join","getIndexOfFirstChildOverflowingParent","overscan","index","boundaryChildIndex","clientRect","getBoundingClientRect","_i","_Array$from","Array","from","children","length","child","right","left","width","getNextFocussableElement","currentElement","focussableElements","concat","document","querySelectorAll","currentElementIndex","indexOf","slice","filter","getAttribute","_focussableElements$","_element$checkVisibil","_element$checkVisibil2","checkVisibility","call","getOverlaySelector","id","undefined","isElementTriggeredFromContainer","container","selector","_getOverlaySelector","_element$closest","closest","elementInDocument","isElementInsideOrTriggeredFromContainer","contains","isElementInsideOverlay","isSiblingElementInsideSameParentOverlay","sibling","_element$closest2","isElementInteractive","includes","tagName","hidden","disabled","readOnly","isElementInsideTable3OrReport","setDataFocusAttribute","target","setAttribute","cleanup","removeAttribute","removeEventListener","addEventListener"],"mappings":"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"}
|
@@ -1,52 +1,54 @@
|
|
1
1
|
import React__default from 'react';
|
2
2
|
import { useMove } from '@react-aria/interactions';
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
4
|
+
var useDraggable = function useDraggable(ref) {
|
5
|
+
var _React$useState = React__default.useState({
|
6
|
+
x: 0,
|
7
|
+
y: 0
|
8
|
+
}),
|
9
|
+
position = _React$useState[0],
|
10
|
+
setPosition = _React$useState[1];
|
11
|
+
var _React$useState2 = React__default.useState(false),
|
12
|
+
dragging = _React$useState2[0],
|
13
|
+
setDragging = _React$useState2[1];
|
14
|
+
var _useMove = useMove({
|
15
|
+
onMoveStart: function onMoveStart() {
|
16
|
+
setDragging(true);
|
17
|
+
},
|
18
|
+
onMove: function onMove(event) {
|
19
|
+
var _ref$current;
|
20
|
+
var rect = (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current.getBoundingClientRect();
|
21
|
+
// Prevent dragging out of bounds
|
22
|
+
if (rect && (rect.left + event.deltaX < 0 || rect.right + event.deltaX > window.innerWidth || rect.top + event.deltaY < 0 || rect.bottom + event.deltaY > window.innerHeight)) {
|
23
|
+
return;
|
24
|
+
}
|
25
|
+
setPosition(function (_ref) {
|
26
|
+
var x = _ref.x,
|
27
|
+
y = _ref.y;
|
28
|
+
x += event.deltaX;
|
29
|
+
y += event.deltaY;
|
30
|
+
return {
|
31
|
+
x: x,
|
32
|
+
y: y
|
33
|
+
};
|
34
|
+
});
|
35
|
+
},
|
36
|
+
onMoveEnd: function onMoveEnd() {
|
37
|
+
setDragging(false);
|
22
38
|
}
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
}) => {
|
27
|
-
x += event.deltaX;
|
28
|
-
y += event.deltaY;
|
29
|
-
return {
|
30
|
-
x,
|
31
|
-
y
|
32
|
-
};
|
33
|
-
});
|
34
|
-
},
|
35
|
-
onMoveEnd() {
|
36
|
-
setDragging(false);
|
37
|
-
}
|
38
|
-
});
|
39
|
-
const resetPosition = () => {
|
39
|
+
}),
|
40
|
+
moveProps = _useMove.moveProps;
|
41
|
+
var resetPosition = function resetPosition() {
|
40
42
|
setPosition({
|
41
43
|
x: 0,
|
42
44
|
y: 0
|
43
45
|
});
|
44
46
|
};
|
45
47
|
return {
|
46
|
-
position,
|
47
|
-
dragging,
|
48
|
+
position: position,
|
49
|
+
dragging: dragging,
|
48
50
|
handleProps: moveProps,
|
49
|
-
resetPosition
|
51
|
+
resetPosition: resetPosition
|
50
52
|
};
|
51
53
|
};
|
52
54
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDraggable.js","sources":["../../../../../../../src/utils/hooks/useDraggable.tsx"],"sourcesContent":["import React from 'react';\nimport { useMove } from '@react-aria/interactions';\n\nexport const useDraggable = (ref: React.MutableRefObject<HTMLDivElement | null>): any => {\n const [position, setPosition] = React.useState({\n x: 0,\n y: 0,\n });\n\n const [dragging, setDragging] = React.useState(false);\n\n const { moveProps } = useMove({\n onMoveStart() {\n setDragging(true);\n },\n onMove(event) {\n const rect = ref.current?.getBoundingClientRect();\n\n // Prevent dragging out of bounds\n if (\n rect &&\n (rect.left + event.deltaX < 0 ||\n rect.right + event.deltaX > window.innerWidth ||\n rect.top + event.deltaY < 0 ||\n rect.bottom + event.deltaY > window.innerHeight)\n ) {\n return;\n }\n\n setPosition(({ x, y }) => {\n x += event.deltaX;\n y += event.deltaY;\n return { x, y };\n });\n },\n onMoveEnd() {\n setDragging(false);\n },\n });\n\n const resetPosition = () => {\n setPosition({\n x: 0,\n y: 0,\n });\n };\n\n return {\n position,\n dragging,\n handleProps: moveProps,\n resetPosition,\n };\n};\n"],"names":["useDraggable","ref","
|
1
|
+
{"version":3,"file":"useDraggable.js","sources":["../../../../../../../src/utils/hooks/useDraggable.tsx"],"sourcesContent":["import React from 'react';\nimport { useMove } from '@react-aria/interactions';\n\nexport const useDraggable = (ref: React.MutableRefObject<HTMLDivElement | null>): any => {\n const [position, setPosition] = React.useState({\n x: 0,\n y: 0,\n });\n\n const [dragging, setDragging] = React.useState(false);\n\n const { moveProps } = useMove({\n onMoveStart() {\n setDragging(true);\n },\n onMove(event) {\n const rect = ref.current?.getBoundingClientRect();\n\n // Prevent dragging out of bounds\n if (\n rect &&\n (rect.left + event.deltaX < 0 ||\n rect.right + event.deltaX > window.innerWidth ||\n rect.top + event.deltaY < 0 ||\n rect.bottom + event.deltaY > window.innerHeight)\n ) {\n return;\n }\n\n setPosition(({ x, y }) => {\n x += event.deltaX;\n y += event.deltaY;\n return { x, y };\n });\n },\n onMoveEnd() {\n setDragging(false);\n },\n });\n\n const resetPosition = () => {\n setPosition({\n x: 0,\n y: 0,\n });\n };\n\n return {\n position,\n dragging,\n handleProps: moveProps,\n resetPosition,\n };\n};\n"],"names":["useDraggable","ref","_React$useState","React","useState","x","y","position","setPosition","_React$useState2","dragging","setDragging","_useMove","useMove","onMoveStart","onMove","event","rect","_ref$current","current","getBoundingClientRect","left","deltaX","right","window","innerWidth","top","deltaY","bottom","innerHeight","_ref","onMoveEnd","moveProps","resetPosition","handleProps"],"mappings":";;;IAGaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,GAAkD;EAC3E,IAAAC,eAAA,GAAgCC,cAAK,CAACC,QAAQ,CAAC;MAC3CC,CAAC,EAAE,CAAC;MACJC,CAAC,EAAE;KACN,CAAC;IAHKC,QAAQ,GAAAL,eAAA;IAAEM,WAAW,GAAAN,eAAA;EAK5B,IAAAO,gBAAA,GAAgCN,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;IAA9CM,QAAQ,GAAAD,gBAAA;IAAEE,WAAW,GAAAF,gBAAA;EAE5B,IAAAG,QAAA,GAAsBC,OAAO,CAAC;MAC1BC,WAAW,WAAAA;QACPH,WAAW,CAAC,IAAI,CAAC;OACpB;MACDI,MAAM,WAAAA,OAACC,KAAK;;QACR,IAAMC,IAAI,IAAAC,YAAA,GAAGjB,GAAG,CAACkB,OAAO,cAAAD,YAAA,uBAAXA,YAAA,CAAaE,qBAAqB,EAAE;;QAGjD,IACIH,IAAI,KACHA,IAAI,CAACI,IAAI,GAAGL,KAAK,CAACM,MAAM,GAAG,CAAC,IACzBL,IAAI,CAACM,KAAK,GAAGP,KAAK,CAACM,MAAM,GAAGE,MAAM,CAACC,UAAU,IAC7CR,IAAI,CAACS,GAAG,GAAGV,KAAK,CAACW,MAAM,GAAG,CAAC,IAC3BV,IAAI,CAACW,MAAM,GAAGZ,KAAK,CAACW,MAAM,GAAGH,MAAM,CAACK,WAAW,CAAC,EACtD;UACE;;QAGJrB,WAAW,CAAC,UAAAsB,IAAA;cAAGzB,CAAC,GAAAyB,IAAA,CAADzB,CAAC;YAAEC,CAAC,GAAAwB,IAAA,CAADxB,CAAC;UACfD,CAAC,IAAIW,KAAK,CAACM,MAAM;UACjBhB,CAAC,IAAIU,KAAK,CAACW,MAAM;UACjB,OAAO;YAAEtB,CAAC,EAADA,CAAC;YAAEC,CAAC,EAADA;WAAG;SAClB,CAAC;OACL;MACDyB,SAAS,WAAAA;QACLpB,WAAW,CAAC,KAAK,CAAC;;KAEzB,CAAC;IA3BMqB,SAAS,GAAApB,QAAA,CAAToB,SAAS;EA6BjB,IAAMC,aAAa,GAAG,SAAhBA,aAAaA;IACfzB,WAAW,CAAC;MACRH,CAAC,EAAE,CAAC;MACJC,CAAC,EAAE;KACN,CAAC;GACL;EAED,OAAO;IACHC,QAAQ,EAARA,QAAQ;IACRG,QAAQ,EAARA,QAAQ;IACRwB,WAAW,EAAEF,SAAS;IACtBC,aAAa,EAAbA;GACH;AACL;;;;"}
|
@@ -1,21 +1,23 @@
|
|
1
1
|
import React__default from 'react';
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
var useDropTarget = function useDropTarget(onDrop) {
|
4
|
+
var _React$useState = React__default.useState(false),
|
5
|
+
isDraggedOver = _React$useState[0],
|
6
|
+
setDraggedOver = _React$useState[1];
|
7
|
+
var handleDragEnter = React__default.useCallback(function (event) {
|
6
8
|
event.preventDefault();
|
7
9
|
setDraggedOver(true);
|
8
10
|
}, []);
|
9
|
-
|
11
|
+
var handleDragLeave = React__default.useCallback(function (event) {
|
10
12
|
event.preventDefault();
|
11
13
|
if (event.target === event.currentTarget || event.relatedTarget && !event.currentTarget.contains(event.relatedTarget)) {
|
12
14
|
setDraggedOver(false);
|
13
15
|
}
|
14
16
|
}, []);
|
15
|
-
|
17
|
+
var handleDragOver = React__default.useCallback(function (event) {
|
16
18
|
event.preventDefault();
|
17
19
|
}, []);
|
18
|
-
|
20
|
+
var handleDrop = React__default.useCallback(function (event) {
|
19
21
|
event.preventDefault();
|
20
22
|
event.persist();
|
21
23
|
setDraggedOver(false);
|
@@ -23,7 +25,7 @@ const useDropTarget = onDrop => {
|
|
23
25
|
onDrop(event);
|
24
26
|
}
|
25
27
|
}, [onDrop]);
|
26
|
-
|
28
|
+
var props = onDrop ? {
|
27
29
|
onDragEnter: handleDragEnter,
|
28
30
|
onDragLeave: handleDragLeave,
|
29
31
|
onDragOver: handleDragOver,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useDropTarget.js","sources":["../../../../../../../src/utils/hooks/useDropTarget.ts"],"sourcesContent":["import React from 'react';\n\nexport type useDropTarget = [\n boolean,\n (\n | undefined\n | {\n onDragEnter: React.DragEventHandler;\n onDragLeave: React.DragEventHandler;\n onDragOver: React.DragEventHandler;\n onDrop: React.DragEventHandler;\n }\n )\n];\n\nexport const useDropTarget = (onDrop: React.DragEventHandler | undefined): useDropTarget => {\n const [isDraggedOver, setDraggedOver] = React.useState(false);\n\n const handleDragEnter = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n setDraggedOver(true);\n }, []);\n\n const handleDragLeave = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n\n if (\n event.target === event.currentTarget ||\n (event.relatedTarget && !event.currentTarget.contains(event.relatedTarget as HTMLElement))\n ) {\n setDraggedOver(false);\n }\n }, []);\n\n const handleDragOver = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n }, []);\n\n const handleDrop = React.useCallback(\n (event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n event.persist();\n\n setDraggedOver(false);\n\n if (onDrop) {\n onDrop(event);\n }\n },\n [onDrop]\n );\n\n const props = onDrop\n ? {\n onDragEnter: handleDragEnter,\n onDragLeave: handleDragLeave,\n onDragOver: handleDragOver,\n onDrop: handleDrop,\n }\n : undefined;\n\n return [isDraggedOver, props];\n};\n"],"names":["useDropTarget","onDrop","
|
1
|
+
{"version":3,"file":"useDropTarget.js","sources":["../../../../../../../src/utils/hooks/useDropTarget.ts"],"sourcesContent":["import React from 'react';\n\nexport type useDropTarget = [\n boolean,\n (\n | undefined\n | {\n onDragEnter: React.DragEventHandler;\n onDragLeave: React.DragEventHandler;\n onDragOver: React.DragEventHandler;\n onDrop: React.DragEventHandler;\n }\n )\n];\n\nexport const useDropTarget = (onDrop: React.DragEventHandler | undefined): useDropTarget => {\n const [isDraggedOver, setDraggedOver] = React.useState(false);\n\n const handleDragEnter = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n setDraggedOver(true);\n }, []);\n\n const handleDragLeave = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n\n if (\n event.target === event.currentTarget ||\n (event.relatedTarget && !event.currentTarget.contains(event.relatedTarget as HTMLElement))\n ) {\n setDraggedOver(false);\n }\n }, []);\n\n const handleDragOver = React.useCallback((event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n }, []);\n\n const handleDrop = React.useCallback(\n (event: React.DragEvent<HTMLElement>) => {\n event.preventDefault();\n event.persist();\n\n setDraggedOver(false);\n\n if (onDrop) {\n onDrop(event);\n }\n },\n [onDrop]\n );\n\n const props = onDrop\n ? {\n onDragEnter: handleDragEnter,\n onDragLeave: handleDragLeave,\n onDragOver: handleDragOver,\n onDrop: handleDrop,\n }\n : undefined;\n\n return [isDraggedOver, props];\n};\n"],"names":["useDropTarget","onDrop","_React$useState","React","useState","isDraggedOver","setDraggedOver","handleDragEnter","useCallback","event","preventDefault","handleDragLeave","target","currentTarget","relatedTarget","contains","handleDragOver","handleDrop","persist","props","onDragEnter","onDragLeave","onDragOver","undefined"],"mappings":";;IAeaA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,MAA0C;EACpE,IAAAC,eAAA,GAAwCC,cAAK,CAACC,QAAQ,CAAC,KAAK,CAAC;IAAtDC,aAAa,GAAAH,eAAA;IAAEI,cAAc,GAAAJ,eAAA;EAEpC,IAAMK,eAAe,GAAGJ,cAAK,CAACK,WAAW,CAAC,UAACC,KAAmC;IAC1EA,KAAK,CAACC,cAAc,EAAE;IACtBJ,cAAc,CAAC,IAAI,CAAC;GACvB,EAAE,EAAE,CAAC;EAEN,IAAMK,eAAe,GAAGR,cAAK,CAACK,WAAW,CAAC,UAACC,KAAmC;IAC1EA,KAAK,CAACC,cAAc,EAAE;IAEtB,IACID,KAAK,CAACG,MAAM,KAAKH,KAAK,CAACI,aAAa,IACnCJ,KAAK,CAACK,aAAa,IAAI,CAACL,KAAK,CAACI,aAAa,CAACE,QAAQ,CAACN,KAAK,CAACK,aAA4B,CAAE,EAC5F;MACER,cAAc,CAAC,KAAK,CAAC;;GAE5B,EAAE,EAAE,CAAC;EAEN,IAAMU,cAAc,GAAGb,cAAK,CAACK,WAAW,CAAC,UAACC,KAAmC;IACzEA,KAAK,CAACC,cAAc,EAAE;GACzB,EAAE,EAAE,CAAC;EAEN,IAAMO,UAAU,GAAGd,cAAK,CAACK,WAAW,CAChC,UAACC,KAAmC;IAChCA,KAAK,CAACC,cAAc,EAAE;IACtBD,KAAK,CAACS,OAAO,EAAE;IAEfZ,cAAc,CAAC,KAAK,CAAC;IAErB,IAAIL,MAAM,EAAE;MACRA,MAAM,CAACQ,KAAK,CAAC;;GAEpB,EACD,CAACR,MAAM,CAAC,CACX;EAED,IAAMkB,KAAK,GAAGlB,MAAM,GACd;IACImB,WAAW,EAAEb,eAAe;IAC5Bc,WAAW,EAAEV,eAAe;IAC5BW,UAAU,EAAEN,cAAc;IAC1Bf,MAAM,EAAEgB;GACX,GACDM,SAAS;EAEf,OAAO,CAAClB,aAAa,EAAEc,KAAK,CAAC;AACjC;;;;"}
|
@@ -1,8 +1,11 @@
|
|
1
1
|
import React__default from 'react';
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
var getNextIndexFromKey = function getNextIndexFromKey(key, length, index, direction) {
|
4
|
+
if (direction === void 0) {
|
5
|
+
direction = 'vertical';
|
6
|
+
}
|
7
|
+
var previousKey = direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
|
8
|
+
var nextKey = direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
|
6
9
|
switch (key) {
|
7
10
|
case previousKey:
|
8
11
|
return index !== undefined ? index - 1 < 0 ? 0 : index - 1 : index;
|
@@ -16,12 +19,20 @@ const getNextIndexFromKey = (key, length, index, direction = 'vertical') => {
|
|
16
19
|
return;
|
17
20
|
}
|
18
21
|
};
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
var useListKeyboardNavigation = function useListKeyboardNavigation(length, options) {
|
23
|
+
if (length === void 0) {
|
24
|
+
length = 0;
|
25
|
+
}
|
26
|
+
if (options === void 0) {
|
27
|
+
options = {
|
28
|
+
direction: 'vertical'
|
29
|
+
};
|
30
|
+
}
|
31
|
+
var _React$useState = React__default.useState(options.initialIndex),
|
32
|
+
index = _React$useState[0],
|
33
|
+
setIndex = _React$useState[1];
|
34
|
+
var getNextIndex = function getNextIndex(event) {
|
35
|
+
var nextIndex = getNextIndexFromKey(event.key, length, index, options.direction);
|
25
36
|
if (nextIndex !== undefined) {
|
26
37
|
event.preventDefault();
|
27
38
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useListKeyboardNavigation.js","sources":["../../../../../../../src/utils/hooks/useListKeyboardNavigation.ts"],"sourcesContent":["import React from 'react';\nimport { Orientation } from '../../types';\n\nexport const getNextIndexFromKey = (\n key: string,\n length: number,\n index: number | undefined,\n direction: Orientation = 'vertical'\n): number | undefined => {\n const previousKey = direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown';\n\n switch (key) {\n case previousKey:\n return index !== undefined ? (index - 1 < 0 ? 0 : index - 1) : index;\n\n case nextKey:\n return index !== undefined ? (index + 1 >= length ? index : index + 1) : index;\n\n case 'Home':\n return 0;\n\n case 'End':\n return length - 1;\n\n default:\n return;\n }\n};\n\nexport type useListKeyboardNavigationOptions = {\n direction?: Orientation;\n initialIndex?: number;\n};\n\nexport const useListKeyboardNavigation = (\n length = 0,\n options: useListKeyboardNavigationOptions = {\n direction: 'vertical',\n }\n): [number | undefined, (index: number | undefined) => void, (event: React.KeyboardEvent<HTMLElement>) => number | undefined] => {\n const [index, setIndex] = React.useState<number | undefined>(options.initialIndex);\n\n const getNextIndex = (event: React.KeyboardEvent<HTMLElement>): number | undefined => {\n const nextIndex = getNextIndexFromKey(event.key, length, index, options.direction);\n\n if (nextIndex !== undefined) {\n event.preventDefault();\n }\n\n return nextIndex;\n };\n\n return [index, setIndex, getNextIndex];\n};\n"],"names":["getNextIndexFromKey","key","length","index","direction","previousKey","nextKey","undefined","useListKeyboardNavigation","options","
|
1
|
+
{"version":3,"file":"useListKeyboardNavigation.js","sources":["../../../../../../../src/utils/hooks/useListKeyboardNavigation.ts"],"sourcesContent":["import React from 'react';\nimport { Orientation } from '../../types';\n\nexport const getNextIndexFromKey = (\n key: string,\n length: number,\n index: number | undefined,\n direction: Orientation = 'vertical'\n): number | undefined => {\n const previousKey = direction === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';\n const nextKey = direction === 'horizontal' ? 'ArrowRight' : 'ArrowDown';\n\n switch (key) {\n case previousKey:\n return index !== undefined ? (index - 1 < 0 ? 0 : index - 1) : index;\n\n case nextKey:\n return index !== undefined ? (index + 1 >= length ? index : index + 1) : index;\n\n case 'Home':\n return 0;\n\n case 'End':\n return length - 1;\n\n default:\n return;\n }\n};\n\nexport type useListKeyboardNavigationOptions = {\n direction?: Orientation;\n initialIndex?: number;\n};\n\nexport const useListKeyboardNavigation = (\n length = 0,\n options: useListKeyboardNavigationOptions = {\n direction: 'vertical',\n }\n): [number | undefined, (index: number | undefined) => void, (event: React.KeyboardEvent<HTMLElement>) => number | undefined] => {\n const [index, setIndex] = React.useState<number | undefined>(options.initialIndex);\n\n const getNextIndex = (event: React.KeyboardEvent<HTMLElement>): number | undefined => {\n const nextIndex = getNextIndexFromKey(event.key, length, index, options.direction);\n\n if (nextIndex !== undefined) {\n event.preventDefault();\n }\n\n return nextIndex;\n };\n\n return [index, setIndex, getNextIndex];\n};\n"],"names":["getNextIndexFromKey","key","length","index","direction","previousKey","nextKey","undefined","useListKeyboardNavigation","options","_React$useState","React","useState","initialIndex","setIndex","getNextIndex","event","nextIndex","preventDefault"],"mappings":";;IAGaA,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAC5BC,GAAW,EACXC,MAAc,EACdC,KAAyB,EACzBC;MAAAA;IAAAA,YAAyB,UAAU;;EAEnC,IAAMC,WAAW,GAAGD,SAAS,KAAK,YAAY,GAAG,WAAW,GAAG,SAAS;EACxE,IAAME,OAAO,GAAGF,SAAS,KAAK,YAAY,GAAG,YAAY,GAAG,WAAW;EAEvE,QAAQH,GAAG;IACP,KAAKI,WAAW;MACZ,OAAOF,KAAK,KAAKI,SAAS,GAAIJ,KAAK,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAGA,KAAK,GAAG,CAAC,GAAIA,KAAK;IAExE,KAAKG,OAAO;MACR,OAAOH,KAAK,KAAKI,SAAS,GAAIJ,KAAK,GAAG,CAAC,IAAID,MAAM,GAAGC,KAAK,GAAGA,KAAK,GAAG,CAAC,GAAIA,KAAK;IAElF,KAAK,MAAM;MACP,OAAO,CAAC;IAEZ,KAAK,KAAK;MACN,OAAOD,MAAM,GAAG,CAAC;IAErB;MACI;;AAEZ;IAOaM,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAClCN,MAAM,EACNO;MADAP,MAAM;IAANA,MAAM,GAAG,CAAC;;EAAA,IACVO;IAAAA,UAA4C;MACxCL,SAAS,EAAE;KACd;;EAED,IAAAM,eAAA,GAA0BC,cAAK,CAACC,QAAQ,CAAqBH,OAAO,CAACI,YAAY,CAAC;IAA3EV,KAAK,GAAAO,eAAA;IAAEI,QAAQ,GAAAJ,eAAA;EAEtB,IAAMK,YAAY,GAAG,SAAfA,YAAYA,CAAIC,KAAuC;IACzD,IAAMC,SAAS,GAAGjB,mBAAmB,CAACgB,KAAK,CAACf,GAAG,EAAEC,MAAM,EAAEC,KAAK,EAAEM,OAAO,CAACL,SAAS,CAAC;IAElF,IAAIa,SAAS,KAAKV,SAAS,EAAE;MACzBS,KAAK,CAACE,cAAc,EAAE;;IAG1B,OAAOD,SAAS;GACnB;EAED,OAAO,CAACd,KAAK,EAAEW,QAAQ,EAAEC,YAAY,CAAC;AAC1C;;;;"}
|