@economic/taco 2.47.0-server.4 → 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 +2 -2
- 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/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 +21 -25
- 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 +29 -30
- 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 +136 -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 +12 -10
- 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 +12 -12
- 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 +34 -29
- 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 +1 -1
- package/dist/esm/packages/taco/src/primitives/Table/Core/components/Toolbar/components/Filters/FilterContext.js.map +1 -1
- 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 +54 -39
- 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 -37
- 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 +20 -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 +50 -41
- 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/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 -24
- 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/taco.cjs.development.js +7857 -6877
- 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 -1
@@ -1,10 +1,12 @@
|
|
1
1
|
import React__default from 'react';
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
var Group = /*#__PURE__*/React__default.forwardRef(function Listbox2Group(props, ref) {
|
4
|
+
var _React$useState = React__default.useState(),
|
5
|
+
labelledById = _React$useState[0],
|
6
|
+
setLabelledById = _React$useState[1];
|
5
7
|
return /*#__PURE__*/React__default.createElement(Listbox2GroupContext.Provider, {
|
6
8
|
value: {
|
7
|
-
setLabelledById
|
9
|
+
setLabelledById: setLabelledById
|
8
10
|
}
|
9
11
|
}, /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
10
12
|
"aria-labelledby": labelledById,
|
@@ -12,8 +14,10 @@ const Group = /*#__PURE__*/React__default.forwardRef(function Listbox2Group(prop
|
|
12
14
|
role: "group"
|
13
15
|
})));
|
14
16
|
});
|
15
|
-
|
16
|
-
|
17
|
+
var Listbox2GroupContext = /*#__PURE__*/React__default.createContext({});
|
18
|
+
var useListbox2GroupContext = function useListbox2GroupContext() {
|
19
|
+
return React__default.useContext(Listbox2GroupContext);
|
20
|
+
};
|
17
21
|
|
18
22
|
export { Group, Listbox2GroupContext, useListbox2GroupContext };
|
19
23
|
//# sourceMappingURL=Group.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Group.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Group.tsx"],"sourcesContent":["import React from 'react';\n\nexport type Listbox2GroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Group = React.forwardRef<HTMLDivElement, Listbox2GroupProps>(function Listbox2Group(props, ref) {\n const [labelledById, setLabelledById] = React.useState<string>();\n\n return (\n <Listbox2GroupContext.Provider value={{ setLabelledById }}>\n <div {...props} aria-labelledby={labelledById} ref={ref} role=\"group\" />\n </Listbox2GroupContext.Provider>\n );\n});\n\nexport type Listbox2GroupContextProps = {\n setLabelledById: (id: string) => void;\n};\n\nexport const Listbox2GroupContext = React.createContext({} as Listbox2GroupContextProps);\nexport const useListbox2GroupContext = () => React.useContext(Listbox2GroupContext);\n"],"names":["Group","React","forwardRef","Listbox2Group","props","ref","
|
1
|
+
{"version":3,"file":"Group.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Group.tsx"],"sourcesContent":["import React from 'react';\n\nexport type Listbox2GroupProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Group = React.forwardRef<HTMLDivElement, Listbox2GroupProps>(function Listbox2Group(props, ref) {\n const [labelledById, setLabelledById] = React.useState<string>();\n\n return (\n <Listbox2GroupContext.Provider value={{ setLabelledById }}>\n <div {...props} aria-labelledby={labelledById} ref={ref} role=\"group\" />\n </Listbox2GroupContext.Provider>\n );\n});\n\nexport type Listbox2GroupContextProps = {\n setLabelledById: (id: string) => void;\n};\n\nexport const Listbox2GroupContext = React.createContext({} as Listbox2GroupContextProps);\nexport const useListbox2GroupContext = () => React.useContext(Listbox2GroupContext);\n"],"names":["Group","React","forwardRef","Listbox2Group","props","ref","_React$useState","useState","labelledById","setLabelledById","Listbox2GroupContext","Provider","value","role","createContext","useListbox2GroupContext","useContext"],"mappings":";;IAIaA,KAAK,gBAAGC,cAAK,CAACC,UAAU,CAAqC,SAASC,aAAaA,CAACC,KAAK,EAAEC,GAAG;EACvG,IAAAC,eAAA,GAAwCL,cAAK,CAACM,QAAQ,EAAU;IAAzDC,YAAY,GAAAF,eAAA;IAAEG,eAAe,GAAAH,eAAA;EAEpC,oBACIL,6BAACS,oBAAoB,CAACC,QAAQ;IAACC,KAAK,EAAE;MAAEH,eAAe,EAAfA;;kBACpCR,sDAASG,KAAK;uBAAmBI,YAAY;IAAEH,GAAG,EAAEA,GAAG;IAAEQ,IAAI,EAAC;KAAU,CAC5C;AAExC,CAAC;IAMYH,oBAAoB,gBAAGT,cAAK,CAACa,aAAa,CAAC,EAA+B;IAC1EC,uBAAuB,GAAG,SAA1BA,uBAAuBA;EAAA,OAASd,cAAK,CAACe,UAAU,CAACN,oBAAoB,CAAC;AAAA;;;;"}
|
@@ -1,27 +1,25 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { useId } from '../../../hooks/useId.js';
|
3
4
|
import { isAriaSelectionKey } from '../../../utils/aria.js';
|
4
5
|
import { useListbox2Context } from './Context.js';
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
id
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
setValue,
|
18
|
-
value: currentValue
|
19
|
-
} = useListbox2Context();
|
7
|
+
var _excluded = ["disabled", "id", "title", "value"];
|
8
|
+
var Option = /*#__PURE__*/React__default.forwardRef(function Listbox2Option(props, ref) {
|
9
|
+
var disabled = props.disabled,
|
10
|
+
nativeId = props.id,
|
11
|
+
value = props.value,
|
12
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
13
|
+
var _useListbox2Context = useListbox2Context(),
|
14
|
+
listboxDisabled = _useListbox2Context.disabled,
|
15
|
+
listboxReadOnly = _useListbox2Context.readOnly,
|
16
|
+
setValue = _useListbox2Context.setValue,
|
17
|
+
currentValue = _useListbox2Context.value;
|
20
18
|
// The id name cannot start with a number, otherwise unit tests will fail when trying to querry element with such id.
|
21
19
|
// That's why adding prefix.
|
22
|
-
|
23
|
-
|
24
|
-
|
20
|
+
var id = 'option-' + useId(nativeId);
|
21
|
+
var selected = Array.isArray(currentValue) ? currentValue.includes(value) : currentValue === value;
|
22
|
+
var handleClick = function handleClick(event) {
|
25
23
|
if (disabled || listboxDisabled || listboxReadOnly) {
|
26
24
|
event.stopPropagation();
|
27
25
|
return;
|
@@ -32,7 +30,7 @@ const Option = /*#__PURE__*/React__default.forwardRef(function Listbox2Option(pr
|
|
32
30
|
props.onClick(event);
|
33
31
|
}
|
34
32
|
};
|
35
|
-
|
33
|
+
var handleKeyDown = function handleKeyDown(event) {
|
36
34
|
if (disabled || listboxDisabled || listboxReadOnly) {
|
37
35
|
event.stopPropagation();
|
38
36
|
return;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Option.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Option.tsx"],"sourcesContent":["import React from 'react';\nimport { useId } from '../../../hooks/useId';\nimport { isAriaSelectionKey } from '../../../utils/aria';\nimport { Listbox2OptionValue } from '../types';\nimport { useListbox2Context } from './Context';\n\nexport type Listbox2OptionProps = React.HTMLAttributes<HTMLDivElement> & {\n disabled?: boolean;\n value: Listbox2OptionValue;\n};\n\nexport const Option = React.forwardRef<HTMLDivElement, Listbox2OptionProps>(function Listbox2Option(props, ref) {\n const { disabled, id: nativeId, title, value, ...otherProps } = props;\n const { disabled: listboxDisabled, readOnly: listboxReadOnly, setValue, value: currentValue } = useListbox2Context();\n // The id name cannot start with a number, otherwise unit tests will fail when trying to querry element with such id.\n // That's why adding prefix.\n const id = 'option-' + useId(nativeId);\n const selected = Array.isArray(currentValue) ? currentValue.includes(value) : currentValue === value;\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled || listboxDisabled || listboxReadOnly) {\n event.stopPropagation();\n return;\n } else {\n setValue(value);\n }\n\n if (typeof props.onClick === 'function') {\n props.onClick(event);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (disabled || listboxDisabled || listboxReadOnly) {\n event.stopPropagation();\n return;\n } else if (isAriaSelectionKey(event)) {\n setValue(value);\n }\n\n if (typeof props.onKeyDown === 'function') {\n props.onKeyDown(event);\n }\n };\n\n return (\n <div\n {...otherProps}\n aria-disabled={listboxDisabled || disabled ? 'true' : undefined}\n aria-selected={selected ? 'true' : undefined}\n id={id}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n ref={ref}\n role=\"option\"\n />\n );\n});\n"],"names":["Option","React","forwardRef","Listbox2Option","props","ref","disabled","id","
|
1
|
+
{"version":3,"file":"Option.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Option.tsx"],"sourcesContent":["import React from 'react';\nimport { useId } from '../../../hooks/useId';\nimport { isAriaSelectionKey } from '../../../utils/aria';\nimport { Listbox2OptionValue } from '../types';\nimport { useListbox2Context } from './Context';\n\nexport type Listbox2OptionProps = React.HTMLAttributes<HTMLDivElement> & {\n disabled?: boolean;\n value: Listbox2OptionValue;\n};\n\nexport const Option = React.forwardRef<HTMLDivElement, Listbox2OptionProps>(function Listbox2Option(props, ref) {\n const { disabled, id: nativeId, title, value, ...otherProps } = props;\n const { disabled: listboxDisabled, readOnly: listboxReadOnly, setValue, value: currentValue } = useListbox2Context();\n // The id name cannot start with a number, otherwise unit tests will fail when trying to querry element with such id.\n // That's why adding prefix.\n const id = 'option-' + useId(nativeId);\n const selected = Array.isArray(currentValue) ? currentValue.includes(value) : currentValue === value;\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (disabled || listboxDisabled || listboxReadOnly) {\n event.stopPropagation();\n return;\n } else {\n setValue(value);\n }\n\n if (typeof props.onClick === 'function') {\n props.onClick(event);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (disabled || listboxDisabled || listboxReadOnly) {\n event.stopPropagation();\n return;\n } else if (isAriaSelectionKey(event)) {\n setValue(value);\n }\n\n if (typeof props.onKeyDown === 'function') {\n props.onKeyDown(event);\n }\n };\n\n return (\n <div\n {...otherProps}\n aria-disabled={listboxDisabled || disabled ? 'true' : undefined}\n aria-selected={selected ? 'true' : undefined}\n id={id}\n onClick={handleClick}\n onKeyDown={handleKeyDown}\n ref={ref}\n role=\"option\"\n />\n );\n});\n"],"names":["Option","React","forwardRef","Listbox2Option","props","ref","disabled","nativeId","id","value","otherProps","_objectWithoutPropertiesLoose","_excluded","_useListbox2Context","useListbox2Context","listboxDisabled","listboxReadOnly","readOnly","setValue","currentValue","useId","selected","Array","isArray","includes","handleClick","event","stopPropagation","onClick","handleKeyDown","isAriaSelectionKey","onKeyDown","undefined","role"],"mappings":";;;;;;;IAWaA,MAAM,gBAAGC,cAAK,CAACC,UAAU,CAAsC,SAASC,cAAcA,CAACC,KAAK,EAAEC,GAAG;MAClGC,QAAQ,GAAgDF,KAAK,CAA7DE,QAAQ;IAAMC,QAAQ,GAAkCH,KAAK,CAAnDI,EAAE;IAAmBC,KAAK,GAAoBL,KAAK,CAA9BK,KAAK;IAAKC,UAAU,GAAAC,6BAAA,CAAKP,KAAK,EAAAQ,SAAA;EACrE,IAAAC,mBAAA,GAAgGC,kBAAkB,EAAE;IAAlGC,eAAe,GAAAF,mBAAA,CAAzBP,QAAQ;IAA6BU,eAAe,GAAAH,mBAAA,CAAzBI,QAAQ;IAAmBC,QAAQ,GAAAL,mBAAA,CAARK,QAAQ;IAASC,YAAY,GAAAN,mBAAA,CAAnBJ,KAAK;;;EAG7E,IAAMD,EAAE,GAAG,SAAS,GAAGY,KAAK,CAACb,QAAQ,CAAC;EACtC,IAAMc,QAAQ,GAAGC,KAAK,CAACC,OAAO,CAACJ,YAAY,CAAC,GAAGA,YAAY,CAACK,QAAQ,CAACf,KAAK,CAAC,GAAGU,YAAY,KAAKV,KAAK;EAEpG,IAAMgB,WAAW,GAAG,SAAdA,WAAWA,CAAIC,KAAuC;IACxD,IAAIpB,QAAQ,IAAIS,eAAe,IAAIC,eAAe,EAAE;MAChDU,KAAK,CAACC,eAAe,EAAE;MACvB;KACH,MAAM;MACHT,QAAQ,CAACT,KAAK,CAAC;;IAGnB,IAAI,OAAOL,KAAK,CAACwB,OAAO,KAAK,UAAU,EAAE;MACrCxB,KAAK,CAACwB,OAAO,CAACF,KAAK,CAAC;;GAE3B;EAED,IAAMG,aAAa,GAAG,SAAhBA,aAAaA,CAAIH,KAA0C;IAC7D,IAAIpB,QAAQ,IAAIS,eAAe,IAAIC,eAAe,EAAE;MAChDU,KAAK,CAACC,eAAe,EAAE;MACvB;KACH,MAAM,IAAIG,kBAAkB,CAACJ,KAAK,CAAC,EAAE;MAClCR,QAAQ,CAACT,KAAK,CAAC;;IAGnB,IAAI,OAAOL,KAAK,CAAC2B,SAAS,KAAK,UAAU,EAAE;MACvC3B,KAAK,CAAC2B,SAAS,CAACL,KAAK,CAAC;;GAE7B;EAED,oBACIzB,sDACQS,UAAU;qBACCK,eAAe,IAAIT,QAAQ,GAAG,MAAM,GAAG0B,SAAS;qBAChDX,QAAQ,GAAG,MAAM,GAAGW,SAAS;IAC5CxB,EAAE,EAAEA,EAAE;IACNoB,OAAO,EAAEH,WAAW;IACpBM,SAAS,EAAEF,aAAa;IACxBxB,GAAG,EAAEA,GAAG;IACR4B,IAAI,EAAC;KACP;AAEV,CAAC;;;;"}
|
@@ -1,32 +1,35 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { useId } from '../../../hooks/useId.js';
|
3
4
|
import { Root as Root$1 } from '../../Collection/components/Root.js';
|
4
5
|
import '../../Collection/Collection.js';
|
5
6
|
import { Listbox2Context } from './Context.js';
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
customSelector,
|
12
|
-
disabled =
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
8
|
+
var _excluded = ["children", "customSelector", "disabled", "id", "multiple", "readOnly", "setValue", "title", "value"];
|
9
|
+
var DEFAULT_SELECTOR = '[role="option"]';
|
10
|
+
var Root = /*#__PURE__*/React__default.forwardRef(function Listbox2(props, ref) {
|
11
|
+
var children = props.children,
|
12
|
+
customSelector = props.customSelector,
|
13
|
+
_props$disabled = props.disabled,
|
14
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
15
|
+
nativeId = props.id,
|
16
|
+
multiple = props.multiple,
|
17
|
+
_props$readOnly = props.readOnly,
|
18
|
+
readOnly = _props$readOnly === void 0 ? false : _props$readOnly,
|
19
|
+
setValue = props.setValue,
|
20
|
+
value = props.value,
|
21
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
21
22
|
// The id name cannot start with a number, otherwise unit tests will fail when trying to querry element with such id.
|
22
23
|
// That's why adding prefix.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
24
|
+
var id = 'listbox2-' + useId(nativeId);
|
25
|
+
var context = React__default.useMemo(function () {
|
26
|
+
return {
|
27
|
+
disabled: disabled,
|
28
|
+
readOnly: readOnly,
|
29
|
+
setValue: setValue,
|
30
|
+
value: value
|
31
|
+
};
|
32
|
+
}, [disabled, readOnly, value]);
|
30
33
|
return /*#__PURE__*/React__default.createElement(Listbox2Context.Provider, {
|
31
34
|
value: context
|
32
35
|
}, /*#__PURE__*/React__default.createElement("div", {
|
@@ -34,32 +37,36 @@ const Root = /*#__PURE__*/React__default.forwardRef(function Listbox2(props, ref
|
|
34
37
|
}, /*#__PURE__*/React__default.createElement(Root$1, Object.assign({}, otherProps, {
|
35
38
|
"aria-multiselectable": multiple ? true : undefined,
|
36
39
|
id: id,
|
37
|
-
querySelector: customSelector ?
|
40
|
+
querySelector: customSelector ? DEFAULT_SELECTOR + ", " + customSelector : DEFAULT_SELECTOR,
|
38
41
|
ref: ref,
|
39
42
|
resetOnChange: value,
|
40
43
|
role: "listbox"
|
41
44
|
}), children)));
|
42
45
|
});
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
if (
|
50
|
-
|
51
|
-
|
52
|
-
if (
|
53
|
-
|
46
|
+
var createListboxValueSetter = function createListboxValueSetter(multiple, setValue) {
|
47
|
+
return function (nextValue) {
|
48
|
+
setValue(function (value) {
|
49
|
+
if (Array.isArray(nextValue)) {
|
50
|
+
return nextValue;
|
51
|
+
}
|
52
|
+
if (multiple) {
|
53
|
+
if (value === undefined) {
|
54
|
+
return [nextValue];
|
55
|
+
} else if (Array.isArray(value)) {
|
56
|
+
if (value.includes(nextValue)) {
|
57
|
+
return value.filter(function (v) {
|
58
|
+
return v !== nextValue;
|
59
|
+
});
|
60
|
+
}
|
61
|
+
return [].concat(value, [nextValue]);
|
62
|
+
} else if (value === nextValue) {
|
63
|
+
return [];
|
54
64
|
}
|
55
|
-
return [
|
56
|
-
} else if (value === nextValue) {
|
57
|
-
return [];
|
65
|
+
return [value, nextValue];
|
58
66
|
}
|
59
|
-
return
|
60
|
-
}
|
61
|
-
|
62
|
-
});
|
67
|
+
return nextValue;
|
68
|
+
});
|
69
|
+
};
|
63
70
|
};
|
64
71
|
|
65
72
|
export { Root, createListboxValueSetter };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Root.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Root.tsx"],"sourcesContent":["import React from 'react';\nimport { useId } from '../../../hooks/useId';\nimport * as CollectionPrimitive from '../../Collection/Collection';\nimport { Listbox2Value } from '../types';\nimport { Listbox2Context } from './Context';\n\nexport type Listbox2Props = React.HTMLAttributes<HTMLDivElement> & {\n customSelector?: string;\n disabled?: boolean;\n multiple?: boolean;\n readOnly?: boolean;\n setValue: (value: Listbox2Value) => void;\n value?: Listbox2Value;\n};\n\nconst DEFAULT_SELECTOR = '[role=\"option\"]';\n\nexport const Root = React.forwardRef<CollectionPrimitive.CollectionRef, Listbox2Props>(function Listbox2(props, ref) {\n const {\n children,\n customSelector,\n disabled = false,\n id: nativeId,\n multiple,\n readOnly = false,\n setValue,\n title,\n value,\n ...otherProps\n } = props;\n // The id name cannot start with a number, otherwise unit tests will fail when trying to querry element with such id.\n // That's why adding prefix.\n const id = 'listbox2-' + useId(nativeId);\n\n const context = React.useMemo(\n () => ({\n disabled,\n readOnly,\n setValue,\n value,\n }),\n [disabled, readOnly, value]\n );\n\n return (\n <Listbox2Context.Provider value={context}>\n <div data-taco=\"listbox2\">\n <CollectionPrimitive.Root\n {...otherProps}\n aria-multiselectable={multiple ? true : undefined}\n id={id}\n querySelector={customSelector ? `${DEFAULT_SELECTOR}, ${customSelector}` : DEFAULT_SELECTOR}\n ref={ref}\n resetOnChange={value}\n role=\"listbox\">\n {children}\n </CollectionPrimitive.Root>\n </div>\n </Listbox2Context.Provider>\n );\n});\n\nexport const createListboxValueSetter =\n (multiple: boolean, setValue: React.Dispatch<React.SetStateAction<Listbox2Value | undefined>>) =>\n (nextValue: Listbox2Value) => {\n setValue(value => {\n if (Array.isArray(nextValue)) {\n return nextValue;\n }\n\n if (multiple) {\n if (value === undefined) {\n return [nextValue];\n } else if (Array.isArray(value)) {\n if (value.includes(nextValue)) {\n return value.filter(v => v !== nextValue);\n }\n\n return [...value, nextValue];\n } else if (value === nextValue) {\n return [];\n }\n\n return [value, nextValue];\n }\n\n return nextValue;\n });\n };\n"],"names":["DEFAULT_SELECTOR","Root","React","forwardRef","Listbox2","props","ref","children","customSelector","disabled","
|
1
|
+
{"version":3,"file":"Root.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Root.tsx"],"sourcesContent":["import React from 'react';\nimport { useId } from '../../../hooks/useId';\nimport * as CollectionPrimitive from '../../Collection/Collection';\nimport { Listbox2Value } from '../types';\nimport { Listbox2Context } from './Context';\n\nexport type Listbox2Props = React.HTMLAttributes<HTMLDivElement> & {\n customSelector?: string;\n disabled?: boolean;\n multiple?: boolean;\n readOnly?: boolean;\n setValue: (value: Listbox2Value) => void;\n value?: Listbox2Value;\n};\n\nconst DEFAULT_SELECTOR = '[role=\"option\"]';\n\nexport const Root = React.forwardRef<CollectionPrimitive.CollectionRef, Listbox2Props>(function Listbox2(props, ref) {\n const {\n children,\n customSelector,\n disabled = false,\n id: nativeId,\n multiple,\n readOnly = false,\n setValue,\n title,\n value,\n ...otherProps\n } = props;\n // The id name cannot start with a number, otherwise unit tests will fail when trying to querry element with such id.\n // That's why adding prefix.\n const id = 'listbox2-' + useId(nativeId);\n\n const context = React.useMemo(\n () => ({\n disabled,\n readOnly,\n setValue,\n value,\n }),\n [disabled, readOnly, value]\n );\n\n return (\n <Listbox2Context.Provider value={context}>\n <div data-taco=\"listbox2\">\n <CollectionPrimitive.Root\n {...otherProps}\n aria-multiselectable={multiple ? true : undefined}\n id={id}\n querySelector={customSelector ? `${DEFAULT_SELECTOR}, ${customSelector}` : DEFAULT_SELECTOR}\n ref={ref}\n resetOnChange={value}\n role=\"listbox\">\n {children}\n </CollectionPrimitive.Root>\n </div>\n </Listbox2Context.Provider>\n );\n});\n\nexport const createListboxValueSetter =\n (multiple: boolean, setValue: React.Dispatch<React.SetStateAction<Listbox2Value | undefined>>) =>\n (nextValue: Listbox2Value) => {\n setValue(value => {\n if (Array.isArray(nextValue)) {\n return nextValue;\n }\n\n if (multiple) {\n if (value === undefined) {\n return [nextValue];\n } else if (Array.isArray(value)) {\n if (value.includes(nextValue)) {\n return value.filter(v => v !== nextValue);\n }\n\n return [...value, nextValue];\n } else if (value === nextValue) {\n return [];\n }\n\n return [value, nextValue];\n }\n\n return nextValue;\n });\n };\n"],"names":["DEFAULT_SELECTOR","Root","React","forwardRef","Listbox2","props","ref","children","customSelector","_props$disabled","disabled","nativeId","id","multiple","_props$readOnly","readOnly","setValue","value","otherProps","_objectWithoutPropertiesLoose","_excluded","useId","context","useMemo","Listbox2Context","Provider","CollectionPrimitive","undefined","querySelector","resetOnChange","role","createListboxValueSetter","nextValue","Array","isArray","includes","filter","v","concat"],"mappings":";;;;;;;;AAeA,IAAMA,gBAAgB,GAAG,iBAAiB;IAE7BC,IAAI,gBAAGC,cAAK,CAACC,UAAU,CAAmD,SAASC,QAAQA,CAACC,KAAK,EAAEC,GAAG;MAE3GC,QAAQ,GAURF,KAAK,CAVLE,QAAQ;IACRC,cAAc,GASdH,KAAK,CATLG,cAAc;IAAAC,eAAA,GASdJ,KAAK,CARLK,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IACZE,QAAQ,GAOZN,KAAK,CAPLO,EAAE;IACFC,QAAQ,GAMRR,KAAK,CANLQ,QAAQ;IAAAC,eAAA,GAMRT,KAAK,CALLU,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IAChBE,QAAQ,GAIRX,KAAK,CAJLW,QAAQ;IAERC,KAAK,GAELZ,KAAK,CAFLY,KAAK;IACFC,UAAU,GAAAC,6BAAA,CACbd,KAAK,EAAAe,SAAA;;;EAGT,IAAMR,EAAE,GAAG,WAAW,GAAGS,KAAK,CAACV,QAAQ,CAAC;EAExC,IAAMW,OAAO,GAAGpB,cAAK,CAACqB,OAAO,CACzB;IAAA,OAAO;MACHb,QAAQ,EAARA,QAAQ;MACRK,QAAQ,EAARA,QAAQ;MACRC,QAAQ,EAARA,QAAQ;MACRC,KAAK,EAALA;KACH;GAAC,EACF,CAACP,QAAQ,EAAEK,QAAQ,EAAEE,KAAK,CAAC,CAC9B;EAED,oBACIf,6BAACsB,eAAe,CAACC,QAAQ;IAACR,KAAK,EAAEK;kBAC7BpB;iBAAe;kBACXA,6BAACwB,MAAwB,oBACjBR,UAAU;4BACQL,QAAQ,GAAG,IAAI,GAAGc,SAAS;IACjDf,EAAE,EAAEA,EAAE;IACNgB,aAAa,EAAEpB,cAAc,GAAMR,gBAAgB,UAAKQ,cAAc,GAAKR,gBAAgB;IAC3FM,GAAG,EAAEA,GAAG;IACRuB,aAAa,EAAEZ,KAAK;IACpBa,IAAI,EAAC;MACJvB,QAAQ,CACc,CACzB,CACiB;AAEnC,CAAC;IAEYwB,wBAAwB,GACjC,SADSA,wBAAwBA,CAChClB,QAAiB,EAAEG,QAAyE;EAAA,OAC7F,UAACgB,SAAwB;IACrBhB,QAAQ,CAAC,UAAAC,KAAK;MACV,IAAIgB,KAAK,CAACC,OAAO,CAACF,SAAS,CAAC,EAAE;QAC1B,OAAOA,SAAS;;MAGpB,IAAInB,QAAQ,EAAE;QACV,IAAII,KAAK,KAAKU,SAAS,EAAE;UACrB,OAAO,CAACK,SAAS,CAAC;SACrB,MAAM,IAAIC,KAAK,CAACC,OAAO,CAACjB,KAAK,CAAC,EAAE;UAC7B,IAAIA,KAAK,CAACkB,QAAQ,CAACH,SAAS,CAAC,EAAE;YAC3B,OAAOf,KAAK,CAACmB,MAAM,CAAC,UAAAC,CAAC;cAAA,OAAIA,CAAC,KAAKL,SAAS;cAAC;;UAG7C,UAAAM,MAAA,CAAWrB,KAAK,GAAEe,SAAS;SAC9B,MAAM,IAAIf,KAAK,KAAKe,SAAS,EAAE;UAC5B,OAAO,EAAE;;QAGb,OAAO,CAACf,KAAK,EAAEe,SAAS,CAAC;;MAG7B,OAAOA,SAAS;KACnB,CAAC;GACL;AAAA;;;;"}
|
@@ -1,17 +1,16 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { useId } from '../../../hooks/useId.js';
|
3
4
|
import { useListbox2GroupContext } from './Group.js';
|
4
5
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
const id = useId(nativeId);
|
14
|
-
React__default.useEffect(() => {
|
6
|
+
var _excluded = ["id"];
|
7
|
+
var Title = /*#__PURE__*/React__default.forwardRef(function Listbox2Group(props, ref) {
|
8
|
+
var nativeId = props.id,
|
9
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
10
|
+
var _useListbox2GroupCont = useListbox2GroupContext(),
|
11
|
+
setLabelledById = _useListbox2GroupCont.setLabelledById;
|
12
|
+
var id = useId(nativeId);
|
13
|
+
React__default.useEffect(function () {
|
15
14
|
setLabelledById(id);
|
16
15
|
}, [id]);
|
17
16
|
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, otherProps, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Title.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Title.tsx"],"sourcesContent":["import React from 'react';\nimport { useId } from '../../../hooks/useId';\nimport { useListbox2GroupContext } from './Group';\n\nexport type Listbox2TitleProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Title = React.forwardRef<HTMLDivElement, Listbox2TitleProps>(function Listbox2Group(props, ref) {\n const { id: nativeId, ...otherProps } = props;\n const { setLabelledById } = useListbox2GroupContext();\n const id = useId(nativeId);\n\n React.useEffect(() => {\n setLabelledById(id);\n }, [id]);\n\n return <div {...otherProps} id={id} ref={ref} role=\"presentation\" />;\n});\n"],"names":["Title","React","forwardRef","Listbox2Group","props","ref","
|
1
|
+
{"version":3,"file":"Title.js","sources":["../../../../../../../../src/primitives/Listbox2/components/Title.tsx"],"sourcesContent":["import React from 'react';\nimport { useId } from '../../../hooks/useId';\nimport { useListbox2GroupContext } from './Group';\n\nexport type Listbox2TitleProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Title = React.forwardRef<HTMLDivElement, Listbox2TitleProps>(function Listbox2Group(props, ref) {\n const { id: nativeId, ...otherProps } = props;\n const { setLabelledById } = useListbox2GroupContext();\n const id = useId(nativeId);\n\n React.useEffect(() => {\n setLabelledById(id);\n }, [id]);\n\n return <div {...otherProps} id={id} ref={ref} role=\"presentation\" />;\n});\n"],"names":["Title","React","forwardRef","Listbox2Group","props","ref","nativeId","id","otherProps","_objectWithoutPropertiesLoose","_excluded","_useListbox2GroupCont","useListbox2GroupContext","setLabelledById","useId","useEffect","role"],"mappings":";;;;;;IAMaA,KAAK,gBAAGC,cAAK,CAACC,UAAU,CAAqC,SAASC,aAAaA,CAACC,KAAK,EAAEC,GAAG;EACvG,IAAYC,QAAQ,GAAoBF,KAAK,CAArCG,EAAE;IAAeC,UAAU,GAAAC,6BAAA,CAAKL,KAAK,EAAAM,SAAA;EAC7C,IAAAC,qBAAA,GAA4BC,uBAAuB,EAAE;IAA7CC,eAAe,GAAAF,qBAAA,CAAfE,eAAe;EACvB,IAAMN,EAAE,GAAGO,KAAK,CAACR,QAAQ,CAAC;EAE1BL,cAAK,CAACc,SAAS,CAAC;IACZF,eAAe,CAACN,EAAE,CAAC;GACtB,EAAE,CAACA,EAAE,CAAC,CAAC;EAER,oBAAON,sDAASO,UAAU;IAAED,EAAE,EAAEA,EAAE;IAAEF,GAAG,EAAEA,GAAG;IAAEW,IAAI,EAAC;KAAiB;AACxE,CAAC;;;;"}
|
@@ -4,44 +4,46 @@ import { restrictToVerticalAxis } from '@dnd-kit/modifiers';
|
|
4
4
|
|
5
5
|
function getContainerById(children, id) {
|
6
6
|
var _lists$find;
|
7
|
-
|
8
|
-
|
7
|
+
var lists = React__default.Children.toArray(children).filter(function (child) {
|
8
|
+
return child.type.displayName === 'SortableList';
|
9
|
+
});
|
10
|
+
var list = lists.find(function (list) {
|
11
|
+
return list.props.id === id;
|
12
|
+
});
|
9
13
|
if (list) {
|
10
14
|
return list === null || list === void 0 ? void 0 : list.props;
|
11
15
|
}
|
12
|
-
return (_lists$find = lists.find(
|
16
|
+
return (_lists$find = lists.find(function (l) {
|
17
|
+
return React__default.Children.toArray(l.props.children).findIndex(function (child) {
|
18
|
+
return child.props.id === id;
|
19
|
+
}) > -1;
|
20
|
+
})) === null || _lists$find === void 0 ? void 0 : _lists$find.props;
|
13
21
|
}
|
14
22
|
function Container(externalProps) {
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
move
|
19
|
-
} = externalProps;
|
23
|
+
var children = externalProps.children,
|
24
|
+
reorder = externalProps.reorder,
|
25
|
+
move = externalProps.move;
|
20
26
|
function handleDragOver(event) {
|
21
|
-
|
22
|
-
|
23
|
-
over
|
24
|
-
} = event;
|
27
|
+
var active = event.active,
|
28
|
+
over = event.over;
|
25
29
|
if (!(active !== null && active !== void 0 && active.id) || !(over !== null && over !== void 0 && over.id)) {
|
26
30
|
return;
|
27
31
|
}
|
28
|
-
|
29
|
-
|
32
|
+
var activeList = getContainerById(children, active.id);
|
33
|
+
var overList = getContainerById(children, over.id);
|
30
34
|
if (!(activeList !== null && activeList !== void 0 && activeList.id) || !(overList !== null && overList !== void 0 && overList.id) || activeList.id === overList.id) {
|
31
35
|
return;
|
32
36
|
}
|
33
37
|
move(active.id, activeList === null || activeList === void 0 ? void 0 : activeList.id, overList.id);
|
34
38
|
}
|
35
39
|
function handleDragEnd(event) {
|
36
|
-
|
37
|
-
|
38
|
-
over
|
39
|
-
} = event;
|
40
|
+
var active = event.active,
|
41
|
+
over = event.over;
|
40
42
|
if (!(active !== null && active !== void 0 && active.id) || !(over !== null && over !== void 0 && over.id)) {
|
41
43
|
return;
|
42
44
|
}
|
43
|
-
|
44
|
-
|
45
|
+
var activeList = getContainerById(children, active.id);
|
46
|
+
var overList = getContainerById(children, over.id);
|
45
47
|
if (!(activeList !== null && activeList !== void 0 && activeList.id) || !(overList !== null && overList !== void 0 && overList.id) || activeList.id !== overList.id) {
|
46
48
|
return;
|
47
49
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Container.js","sources":["../../../../../../../../src/primitives/Sortable/components/Container.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { DndContext, closestCenter } from '@dnd-kit/core';\nimport { SortableListProps } from './List';\nimport { SortableItemId } from './Item';\nimport { restrictToVerticalAxis } from '@dnd-kit/modifiers';\n\nexport type SortableContainerProps = {\n children: ReactNode;\n move?: (activeId: SortableItemId, overId: SortableItemId, listId: string) => void;\n reorder: (activeId: SortableItemId, oldListId: string, listId: string) => void;\n};\n\nfunction getContainerById(children, id): SortableListProps | undefined {\n const lists = React.Children.toArray(children).filter(\n (child: any) => child.type.displayName === 'SortableList'\n ) as React.ReactElement<SortableListProps>[];\n const list: React.ReactElement<SortableListProps> | undefined = lists.find(\n (list: React.ReactElement<SortableListProps>) => list.props.id === id\n );\n\n if (list) {\n return list?.props;\n }\n\n return lists.find(l => React.Children.toArray(l.props.children).findIndex((child: any) => child.props.id === id) > -1)?.props;\n}\n\nexport function Container(externalProps) {\n const { children, reorder, move } = externalProps;\n\n function handleDragOver(event): void {\n const { active, over } = event;\n\n if (!active?.id || !over?.id) {\n return;\n }\n\n const activeList = getContainerById(children, active.id);\n const overList = getContainerById(children, over.id);\n\n if (!activeList?.id || !overList?.id || activeList.id === overList.id) {\n return;\n }\n\n move(active.id, activeList?.id, overList.id);\n }\n\n function handleDragEnd(event): void {\n const { active, over } = event;\n\n if (!active?.id || !over?.id) {\n return;\n }\n\n const activeList = getContainerById(children, active.id);\n const overList = getContainerById(children, over.id);\n\n if (!activeList?.id || !overList?.id || activeList.id !== overList.id) {\n return;\n }\n\n reorder(active.id, over.id, overList.id);\n }\n\n return (\n <DndContext\n collisionDetection={closestCenter}\n {...externalProps}\n modifiers={[restrictToVerticalAxis]}\n onDragOver={handleDragOver}\n onDragEnd={handleDragEnd}>\n {children}\n </DndContext>\n );\n}\nContainer.displayName = 'SortableContainer';\n"],"names":["getContainerById","children","id","lists","React","Children","toArray","filter","child","type","displayName","list","find","props","_lists$find","l","findIndex","Container","externalProps","reorder","move","handleDragOver","event","active","over","activeList","overList","handleDragEnd","DndContext","collisionDetection","closestCenter","modifiers","restrictToVerticalAxis","onDragOver","onDragEnd"],"mappings":";;;;AAYA,SAASA,gBAAgBA,CAACC,QAAQ,EAAEC,EAAE;;EAClC,
|
1
|
+
{"version":3,"file":"Container.js","sources":["../../../../../../../../src/primitives/Sortable/components/Container.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { DndContext, closestCenter } from '@dnd-kit/core';\nimport { SortableListProps } from './List';\nimport { SortableItemId } from './Item';\nimport { restrictToVerticalAxis } from '@dnd-kit/modifiers';\n\nexport type SortableContainerProps = {\n children: ReactNode;\n move?: (activeId: SortableItemId, overId: SortableItemId, listId: string) => void;\n reorder: (activeId: SortableItemId, oldListId: string, listId: string) => void;\n};\n\nfunction getContainerById(children, id): SortableListProps | undefined {\n const lists = React.Children.toArray(children).filter(\n (child: any) => child.type.displayName === 'SortableList'\n ) as React.ReactElement<SortableListProps>[];\n const list: React.ReactElement<SortableListProps> | undefined = lists.find(\n (list: React.ReactElement<SortableListProps>) => list.props.id === id\n );\n\n if (list) {\n return list?.props;\n }\n\n return lists.find(l => React.Children.toArray(l.props.children).findIndex((child: any) => child.props.id === id) > -1)?.props;\n}\n\nexport function Container(externalProps) {\n const { children, reorder, move } = externalProps;\n\n function handleDragOver(event): void {\n const { active, over } = event;\n\n if (!active?.id || !over?.id) {\n return;\n }\n\n const activeList = getContainerById(children, active.id);\n const overList = getContainerById(children, over.id);\n\n if (!activeList?.id || !overList?.id || activeList.id === overList.id) {\n return;\n }\n\n move(active.id, activeList?.id, overList.id);\n }\n\n function handleDragEnd(event): void {\n const { active, over } = event;\n\n if (!active?.id || !over?.id) {\n return;\n }\n\n const activeList = getContainerById(children, active.id);\n const overList = getContainerById(children, over.id);\n\n if (!activeList?.id || !overList?.id || activeList.id !== overList.id) {\n return;\n }\n\n reorder(active.id, over.id, overList.id);\n }\n\n return (\n <DndContext\n collisionDetection={closestCenter}\n {...externalProps}\n modifiers={[restrictToVerticalAxis]}\n onDragOver={handleDragOver}\n onDragEnd={handleDragEnd}>\n {children}\n </DndContext>\n );\n}\nContainer.displayName = 'SortableContainer';\n"],"names":["getContainerById","children","id","lists","React","Children","toArray","filter","child","type","displayName","list","find","props","_lists$find","l","findIndex","Container","externalProps","reorder","move","handleDragOver","event","active","over","activeList","overList","handleDragEnd","DndContext","collisionDetection","closestCenter","modifiers","restrictToVerticalAxis","onDragOver","onDragEnd"],"mappings":";;;;AAYA,SAASA,gBAAgBA,CAACC,QAAQ,EAAEC,EAAE;;EAClC,IAAMC,KAAK,GAAGC,cAAK,CAACC,QAAQ,CAACC,OAAO,CAACL,QAAQ,CAAC,CAACM,MAAM,CACjD,UAACC,KAAU;IAAA,OAAKA,KAAK,CAACC,IAAI,CAACC,WAAW,KAAK,cAAc;IACjB;EAC5C,IAAMC,IAAI,GAAsDR,KAAK,CAACS,IAAI,CACtE,UAACD,IAA2C;IAAA,OAAKA,IAAI,CAACE,KAAK,CAACX,EAAE,KAAKA,EAAE;IACxE;EAED,IAAIS,IAAI,EAAE;IACN,OAAOA,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEE,KAAK;;EAGtB,QAAAC,WAAA,GAAOX,KAAK,CAACS,IAAI,CAAC,UAAAG,CAAC;IAAA,OAAIX,cAAK,CAACC,QAAQ,CAACC,OAAO,CAACS,CAAC,CAACF,KAAK,CAACZ,QAAQ,CAAC,CAACe,SAAS,CAAC,UAACR,KAAU;MAAA,OAAKA,KAAK,CAACK,KAAK,CAACX,EAAE,KAAKA,EAAE;MAAC,GAAG,CAAC,CAAC;IAAC,cAAAY,WAAA,uBAA/GA,WAAA,CAAiHD,KAAK;AACjI;SAEgBI,SAASA,CAACC,aAAa;EACnC,IAAQjB,QAAQ,GAAoBiB,aAAa,CAAzCjB,QAAQ;IAAEkB,OAAO,GAAWD,aAAa,CAA/BC,OAAO;IAAEC,IAAI,GAAKF,aAAa,CAAtBE,IAAI;EAE/B,SAASC,cAAcA,CAACC,KAAK;IACzB,IAAQC,MAAM,GAAWD,KAAK,CAAtBC,MAAM;MAAEC,IAAI,GAAKF,KAAK,CAAdE,IAAI;IAEpB,IAAI,EAACD,MAAM,aAANA,MAAM,eAANA,MAAM,CAAErB,EAAE,KAAI,EAACsB,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEtB,EAAE,GAAE;MAC1B;;IAGJ,IAAMuB,UAAU,GAAGzB,gBAAgB,CAACC,QAAQ,EAAEsB,MAAM,CAACrB,EAAE,CAAC;IACxD,IAAMwB,QAAQ,GAAG1B,gBAAgB,CAACC,QAAQ,EAAEuB,IAAI,CAACtB,EAAE,CAAC;IAEpD,IAAI,EAACuB,UAAU,aAAVA,UAAU,eAAVA,UAAU,CAAEvB,EAAE,KAAI,EAACwB,QAAQ,aAARA,QAAQ,eAARA,QAAQ,CAAExB,EAAE,KAAIuB,UAAU,CAACvB,EAAE,KAAKwB,QAAQ,CAACxB,EAAE,EAAE;MACnE;;IAGJkB,IAAI,CAACG,MAAM,CAACrB,EAAE,EAAEuB,UAAU,aAAVA,UAAU,uBAAVA,UAAU,CAAEvB,EAAE,EAAEwB,QAAQ,CAACxB,EAAE,CAAC;;EAGhD,SAASyB,aAAaA,CAACL,KAAK;IACxB,IAAQC,MAAM,GAAWD,KAAK,CAAtBC,MAAM;MAAEC,IAAI,GAAKF,KAAK,CAAdE,IAAI;IAEpB,IAAI,EAACD,MAAM,aAANA,MAAM,eAANA,MAAM,CAAErB,EAAE,KAAI,EAACsB,IAAI,aAAJA,IAAI,eAAJA,IAAI,CAAEtB,EAAE,GAAE;MAC1B;;IAGJ,IAAMuB,UAAU,GAAGzB,gBAAgB,CAACC,QAAQ,EAAEsB,MAAM,CAACrB,EAAE,CAAC;IACxD,IAAMwB,QAAQ,GAAG1B,gBAAgB,CAACC,QAAQ,EAAEuB,IAAI,CAACtB,EAAE,CAAC;IAEpD,IAAI,EAACuB,UAAU,aAAVA,UAAU,eAAVA,UAAU,CAAEvB,EAAE,KAAI,EAACwB,QAAQ,aAARA,QAAQ,eAARA,QAAQ,CAAExB,EAAE,KAAIuB,UAAU,CAACvB,EAAE,KAAKwB,QAAQ,CAACxB,EAAE,EAAE;MACnE;;IAGJiB,OAAO,CAACI,MAAM,CAACrB,EAAE,EAAEsB,IAAI,CAACtB,EAAE,EAAEwB,QAAQ,CAACxB,EAAE,CAAC;;EAG5C,oBACIE,6BAACwB,UAAU;IACPC,kBAAkB,EAAEC;KAChBZ,aAAa;IACjBa,SAAS,EAAE,CAACC,sBAAsB,CAAC;IACnCC,UAAU,EAAEZ,cAAc;IAC1Ba,SAAS,EAAEP;MACV1B,QAAQ,CACA;AAErB;AACAgB,SAAS,CAACP,WAAW,GAAG,mBAAmB;;;;"}
|
@@ -1,45 +1,42 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { extends as _extends } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { useSortable } from '@dnd-kit/sortable';
|
3
4
|
import { CSS } from '@dnd-kit/utilities';
|
4
5
|
|
5
|
-
|
6
|
-
|
6
|
+
var isFormElement = function isFormElement(element) {
|
7
|
+
var formElementNodeNames = ['BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'FIELDSET'];
|
7
8
|
return formElementNodeNames.includes(element.nodeName);
|
8
9
|
};
|
9
10
|
function Item(props) {
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
disabled = false,
|
14
|
-
id
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
});
|
26
|
-
const style = {
|
11
|
+
var asChild = props.asChild,
|
12
|
+
children = props.children,
|
13
|
+
_props$disabled = props.disabled,
|
14
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
15
|
+
id = props.id;
|
16
|
+
var _useSortable = useSortable({
|
17
|
+
disabled: disabled,
|
18
|
+
id: id
|
19
|
+
}),
|
20
|
+
attributes = _useSortable.attributes,
|
21
|
+
listeners = _useSortable.listeners,
|
22
|
+
setNodeRef = _useSortable.setNodeRef,
|
23
|
+
transform = _useSortable.transform,
|
24
|
+
transition = _useSortable.transition;
|
25
|
+
var style = {
|
27
26
|
transform: CSS.Transform.toString(transform),
|
28
|
-
transition
|
27
|
+
transition: transition
|
29
28
|
};
|
30
|
-
|
29
|
+
var onPointerDown = function onPointerDown(event) {
|
31
30
|
// allow form components, like checkboxes, to be active
|
32
31
|
if (event.currentTarget.contains(event.target) && !isFormElement(event.target)) {
|
33
32
|
listeners === null || listeners === void 0 ? void 0 : listeners.onPointerDown(event);
|
34
33
|
}
|
35
34
|
};
|
36
|
-
|
37
|
-
|
38
|
-
...listeners,
|
39
|
-
onPointerDown,
|
35
|
+
var elProps = _extends({}, attributes, listeners, {
|
36
|
+
onPointerDown: onPointerDown,
|
40
37
|
ref: setNodeRef,
|
41
|
-
style
|
42
|
-
};
|
38
|
+
style: style
|
39
|
+
});
|
43
40
|
if (asChild) {
|
44
41
|
return /*#__PURE__*/React__default.cloneElement(children, elProps);
|
45
42
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Item.js","sources":["../../../../../../../../src/primitives/Sortable/components/Item.tsx"],"sourcesContent":["import React from 'react';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\n\nexport type SortableItemId = string | number;\n\nexport type SortableListItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'id'> & {\n disabled?: boolean;\n id: SortableItemId;\n};\n\nconst isFormElement = (element: HTMLElement) => {\n const formElementNodeNames = ['BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'FIELDSET'];\n\n return formElementNodeNames.includes(element.nodeName);\n};\n\nexport function Item(props) {\n const { asChild, children, disabled = false, id } = props;\n const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ disabled, id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const onPointerDown = event => {\n // allow form components, like checkboxes, to be active\n if (event.currentTarget.contains(event.target) && !isFormElement(event.target)) {\n listeners?.onPointerDown(event);\n }\n };\n\n const elProps = { ...attributes, ...listeners, onPointerDown, ref: setNodeRef, style };\n\n if (asChild) {\n return React.cloneElement(children, elProps);\n }\n\n return <div {...elProps}>{children}</div>;\n}\nItem.displayName = 'SortableListItem';\n"],"names":["isFormElement","element","formElementNodeNames","includes","nodeName","Item","props","asChild","children","disabled","id","attributes","listeners","setNodeRef","transform","transition","
|
1
|
+
{"version":3,"file":"Item.js","sources":["../../../../../../../../src/primitives/Sortable/components/Item.tsx"],"sourcesContent":["import React from 'react';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\n\nexport type SortableItemId = string | number;\n\nexport type SortableListItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'id'> & {\n disabled?: boolean;\n id: SortableItemId;\n};\n\nconst isFormElement = (element: HTMLElement) => {\n const formElementNodeNames = ['BUTTON', 'INPUT', 'TEXTAREA', 'SELECT', 'FIELDSET'];\n\n return formElementNodeNames.includes(element.nodeName);\n};\n\nexport function Item(props) {\n const { asChild, children, disabled = false, id } = props;\n const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ disabled, id });\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n };\n\n const onPointerDown = event => {\n // allow form components, like checkboxes, to be active\n if (event.currentTarget.contains(event.target) && !isFormElement(event.target)) {\n listeners?.onPointerDown(event);\n }\n };\n\n const elProps = { ...attributes, ...listeners, onPointerDown, ref: setNodeRef, style };\n\n if (asChild) {\n return React.cloneElement(children, elProps);\n }\n\n return <div {...elProps}>{children}</div>;\n}\nItem.displayName = 'SortableListItem';\n"],"names":["isFormElement","element","formElementNodeNames","includes","nodeName","Item","props","asChild","children","_props$disabled","disabled","id","_useSortable","useSortable","attributes","listeners","setNodeRef","transform","transition","style","CSS","Transform","toString","onPointerDown","event","currentTarget","contains","target","elProps","_extends","ref","React","cloneElement","displayName"],"mappings":";;;;;AAWA,IAAMA,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,OAAoB;EACvC,IAAMC,oBAAoB,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;EAElF,OAAOA,oBAAoB,CAACC,QAAQ,CAACF,OAAO,CAACG,QAAQ,CAAC;AAC1D,CAAC;SAEeC,IAAIA,CAACC,KAAK;EACtB,IAAQC,OAAO,GAAqCD,KAAK,CAAjDC,OAAO;IAAEC,QAAQ,GAA2BF,KAAK,CAAxCE,QAAQ;IAAAC,eAAA,GAA2BH,KAAK,CAA9BI,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IAAEE,EAAE,GAAKL,KAAK,CAAZK,EAAE;EAC/C,IAAAC,YAAA,GAAqEC,WAAW,CAAC;MAAEH,QAAQ,EAARA,QAAQ;MAAEC,EAAE,EAAFA;KAAI,CAAC;IAA1FG,UAAU,GAAAF,YAAA,CAAVE,UAAU;IAAEC,SAAS,GAAAH,YAAA,CAATG,SAAS;IAAEC,UAAU,GAAAJ,YAAA,CAAVI,UAAU;IAAEC,SAAS,GAAAL,YAAA,CAATK,SAAS;IAAEC,UAAU,GAAAN,YAAA,CAAVM,UAAU;EAEhE,IAAMC,KAAK,GAAG;IACVF,SAAS,EAAEG,GAAG,CAACC,SAAS,CAACC,QAAQ,CAACL,SAAS,CAAC;IAC5CC,UAAU,EAAVA;GACH;EAED,IAAMK,aAAa,GAAG,SAAhBA,aAAaA,CAAGC,KAAK;;IAEvB,IAAIA,KAAK,CAACC,aAAa,CAACC,QAAQ,CAACF,KAAK,CAACG,MAAM,CAAC,IAAI,CAAC3B,aAAa,CAACwB,KAAK,CAACG,MAAM,CAAC,EAAE;MAC5EZ,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEQ,aAAa,CAACC,KAAK,CAAC;;GAEtC;EAED,IAAMI,OAAO,GAAAC,QAAA,KAAQf,UAAU,EAAKC,SAAS;IAAEQ,aAAa,EAAbA,aAAa;IAAEO,GAAG,EAAEd,UAAU;IAAEG,KAAK,EAALA;IAAO;EAEtF,IAAIZ,OAAO,EAAE;IACT,oBAAOwB,cAAK,CAACC,YAAY,CAACxB,QAAQ,EAAEoB,OAAO,CAAC;;EAGhD,oBAAOG,sDAASH,OAAO,GAAGpB,QAAQ,CAAO;AAC7C;AACAH,IAAI,CAAC4B,WAAW,GAAG,kBAAkB;;;;"}
|
@@ -1,19 +1,20 @@
|
|
1
1
|
import React__default from 'react';
|
2
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
3
|
import { useDroppable } from '@dnd-kit/core';
|
3
4
|
import { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';
|
4
5
|
|
6
|
+
var _excluded = ["children", "id"];
|
5
7
|
function List(externalProps) {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
setNodeRef
|
13
|
-
|
14
|
-
|
8
|
+
var children = externalProps.children,
|
9
|
+
id = externalProps.id,
|
10
|
+
props = _objectWithoutPropertiesLoose(externalProps, _excluded);
|
11
|
+
var _useDroppable = useDroppable({
|
12
|
+
id: id
|
13
|
+
}),
|
14
|
+
setNodeRef = _useDroppable.setNodeRef;
|
15
|
+
var items = React__default.Children.toArray(children).map(function (child) {
|
16
|
+
return child.props;
|
15
17
|
});
|
16
|
-
const items = React__default.Children.toArray(children).map(child => child.props);
|
17
18
|
return /*#__PURE__*/React__default.createElement(SortableContext, {
|
18
19
|
id: id,
|
19
20
|
items: items,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"List.js","sources":["../../../../../../../../src/primitives/Sortable/components/List.tsx"],"sourcesContent":["import React from 'react';\nimport { useDroppable } from '@dnd-kit/core';\nimport { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';\n\nexport type SortableListProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'id'> & {\n id: string;\n};\n\nexport function List(externalProps: SortableListProps) {\n const { children, id, ...props } = externalProps;\n const { setNodeRef } = useDroppable({ id });\n const items = React.Children.toArray(children).map((child: any) => child.props);\n\n return (\n <SortableContext id={id} items={items} strategy={verticalListSortingStrategy}>\n <div {...props} ref={id ? setNodeRef : undefined}>\n {children}\n </div>\n </SortableContext>\n );\n}\nList.displayName = 'SortableList';\n"],"names":["List","externalProps","children","id","props","
|
1
|
+
{"version":3,"file":"List.js","sources":["../../../../../../../../src/primitives/Sortable/components/List.tsx"],"sourcesContent":["import React from 'react';\nimport { useDroppable } from '@dnd-kit/core';\nimport { SortableContext, verticalListSortingStrategy } from '@dnd-kit/sortable';\n\nexport type SortableListProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'id'> & {\n id: string;\n};\n\nexport function List(externalProps: SortableListProps) {\n const { children, id, ...props } = externalProps;\n const { setNodeRef } = useDroppable({ id });\n const items = React.Children.toArray(children).map((child: any) => child.props);\n\n return (\n <SortableContext id={id} items={items} strategy={verticalListSortingStrategy}>\n <div {...props} ref={id ? setNodeRef : undefined}>\n {children}\n </div>\n </SortableContext>\n );\n}\nList.displayName = 'SortableList';\n"],"names":["List","externalProps","children","id","props","_objectWithoutPropertiesLoose","_excluded","_useDroppable","useDroppable","setNodeRef","items","React","Children","toArray","map","child","SortableContext","strategy","verticalListSortingStrategy","ref","undefined","displayName"],"mappings":";;;;;;SAQgBA,IAAIA,CAACC,aAAgC;EACjD,IAAQC,QAAQ,GAAmBD,aAAa,CAAxCC,QAAQ;IAAEC,EAAE,GAAeF,aAAa,CAA9BE,EAAE;IAAKC,KAAK,GAAAC,6BAAA,CAAKJ,aAAa,EAAAK,SAAA;EAChD,IAAAC,aAAA,GAAuBC,YAAY,CAAC;MAAEL,EAAE,EAAFA;KAAI,CAAC;IAAnCM,UAAU,GAAAF,aAAA,CAAVE,UAAU;EAClB,IAAMC,KAAK,GAAGC,cAAK,CAACC,QAAQ,CAACC,OAAO,CAACX,QAAQ,CAAC,CAACY,GAAG,CAAC,UAACC,KAAU;IAAA,OAAKA,KAAK,CAACX,KAAK;IAAC;EAE/E,oBACIO,6BAACK,eAAe;IAACb,EAAE,EAAEA,EAAE;IAAEO,KAAK,EAAEA,KAAK;IAAEO,QAAQ,EAAEC;kBAC7CP,sDAASP,KAAK;IAAEe,GAAG,EAAEhB,EAAE,GAAGM,UAAU,GAAGW;MAClClB,QAAQ,CACP,CACQ;AAE1B;AACAF,IAAI,CAACqB,WAAW,GAAG,cAAc;;;;"}
|