@navikt/ds-react 8.7.0 → 8.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cjs/alert/base-alert/root/BaseAlertRoot.js +1 -2
- package/cjs/alert/base-alert/root/BaseAlertRoot.js.map +1 -1
- package/cjs/alert/info-card/index.d.ts +2 -2
- package/cjs/alert/info-card/index.js +2 -1
- package/cjs/alert/info-card/index.js.map +1 -1
- package/cjs/alert/info-card/message/InfoCardMessage.d.ts +23 -0
- package/cjs/alert/info-card/message/InfoCardMessage.js +73 -0
- package/cjs/alert/info-card/message/InfoCardMessage.js.map +1 -0
- package/cjs/alert/info-card/root/InfoCardRoot.d.ts +15 -2
- package/cjs/alert/info-card/root/InfoCardRoot.js +4 -1
- package/cjs/alert/info-card/root/InfoCardRoot.js.map +1 -1
- package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.d.ts +12 -0
- package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js +57 -0
- package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js.map +1 -0
- package/cjs/data/drag-and-drop/item/DragAndDropItem.d.ts +27 -0
- package/cjs/data/drag-and-drop/item/DragAndDropItem.js +52 -0
- package/cjs/data/drag-and-drop/item/DragAndDropItem.js.map +1 -0
- package/cjs/data/drag-and-drop/root/DragAndDrop.context.d.ts +16 -0
- package/cjs/data/drag-and-drop/root/DragAndDrop.context.js +10 -0
- package/cjs/data/drag-and-drop/root/DragAndDrop.context.js.map +1 -0
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.d.ts +36 -0
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.js +187 -0
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.js.map +1 -0
- package/cjs/data/drag-and-drop/types.d.ts +4 -0
- package/cjs/data/drag-and-drop/types.js +3 -0
- package/cjs/data/drag-and-drop/types.js.map +1 -0
- package/cjs/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.d.ts +22 -0
- package/cjs/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js +35 -0
- package/cjs/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js.map +1 -0
- package/cjs/data/{drag-and-drop → drag-and-drop-old}/item/DataDragAndDropItem.js +2 -7
- package/cjs/data/drag-and-drop-old/item/DataDragAndDropItem.js.map +1 -0
- package/cjs/data/drag-and-drop-old/root/DataDragAndDrop.context.js.map +1 -0
- package/cjs/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDropRoot.d.ts +2 -2
- package/cjs/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDropRoot.js +5 -8
- package/cjs/data/drag-and-drop-old/root/DataDragAndDropRoot.js.map +1 -0
- package/cjs/data/table/empty-state/DataTableEmptyState.d.ts +5 -0
- package/cjs/data/table/empty-state/DataTableEmptyState.js +57 -0
- package/cjs/data/table/empty-state/DataTableEmptyState.js.map +1 -0
- package/cjs/data/table/helpers/selection/getMultipleSelectProps.d.ts +14 -0
- package/cjs/data/table/helpers/selection/getMultipleSelectProps.js +48 -0
- package/cjs/data/table/helpers/selection/getMultipleSelectProps.js.map +1 -0
- package/cjs/data/table/helpers/selection/getSingleSelectProps.d.ts +10 -0
- package/cjs/data/table/helpers/selection/getSingleSelectProps.js +23 -0
- package/cjs/data/table/helpers/selection/getSingleSelectProps.js.map +1 -0
- package/cjs/data/table/helpers/selection/selection.types.d.ts +42 -0
- package/cjs/data/table/helpers/selection/selection.types.js +3 -0
- package/cjs/data/table/helpers/selection/selection.types.js.map +1 -0
- package/cjs/data/table/helpers/table-focus.js +7 -1
- package/cjs/data/table/helpers/table-focus.js.map +1 -1
- package/cjs/data/table/helpers/table-keyboard.d.ts +0 -1
- package/cjs/data/table/helpers/table-keyboard.js +2 -4
- package/cjs/data/table/helpers/table-keyboard.js.map +1 -1
- package/cjs/data/table/{root → hooks}/useTableKeyboardNav.js +2 -1
- package/cjs/data/table/hooks/useTableKeyboardNav.js.map +1 -0
- package/cjs/data/table/hooks/useTableSelection.d.ts +8 -0
- package/cjs/data/table/hooks/useTableSelection.js +49 -0
- package/cjs/data/table/hooks/useTableSelection.js.map +1 -0
- package/cjs/data/table/loading-state/DataTableLoadingState.d.ts +5 -0
- package/cjs/data/table/loading-state/DataTableLoadingState.js +57 -0
- package/cjs/data/table/loading-state/DataTableLoadingState.js.map +1 -0
- package/cjs/data/table/root/DataTable.types.d.ts +13 -0
- package/cjs/data/table/root/DataTable.types.js +3 -0
- package/cjs/data/table/root/DataTable.types.js.map +1 -0
- package/cjs/data/table/root/DataTableAuto.d.ts +60 -0
- package/cjs/data/table/root/DataTableAuto.js +113 -0
- package/cjs/data/table/root/DataTableAuto.js.map +1 -0
- package/cjs/data/table/root/DataTableRoot.context.d.ts +3 -2
- package/cjs/data/table/root/DataTableRoot.context.js.map +1 -1
- package/cjs/data/table/root/DataTableRoot.d.ts +30 -3
- package/cjs/data/table/root/DataTableRoot.js +9 -3
- package/cjs/data/table/root/DataTableRoot.js.map +1 -1
- package/cjs/data/table/td/DataTableTd.d.ts +10 -0
- package/cjs/data/table/td/DataTableTd.js +4 -2
- package/cjs/data/table/td/DataTableTd.js.map +1 -1
- package/cjs/data/table/th/DataTableTh.d.ts +10 -4
- package/cjs/data/table/th/DataTableTh.js +24 -22
- package/cjs/data/table/th/DataTableTh.js.map +1 -1
- package/cjs/data/table/th/useTableColumnResize.d.ts +64 -0
- package/cjs/data/table/th/useTableColumnResize.js +144 -0
- package/cjs/data/table/th/useTableColumnResize.js.map +1 -0
- package/cjs/data/table/thead/DataTableThead.context.d.ts +4 -0
- package/cjs/data/table/thead/DataTableThead.context.js +45 -0
- package/cjs/data/table/thead/DataTableThead.context.js.map +1 -0
- package/cjs/data/table/thead/DataTableThead.js +3 -1
- package/cjs/data/table/thead/DataTableThead.js.map +1 -1
- package/cjs/data/table/tr/DataTableTr.js +4 -3
- package/cjs/data/table/tr/DataTableTr.js.map +1 -1
- package/cjs/data/token-filter/AutoSuggest.js +40 -9
- package/cjs/data/token-filter/AutoSuggest.js.map +1 -1
- package/cjs/data/token-filter/TokenFilter.d.ts +1 -0
- package/cjs/data/token-filter/TokenFilter.js +1 -0
- package/cjs/data/token-filter/TokenFilter.js.map +1 -1
- package/cjs/data/toolbar/root/DataToolbarRoot.d.ts +6 -23
- package/cjs/data/toolbar/root/DataToolbarRoot.js +42 -7
- package/cjs/data/toolbar/root/DataToolbarRoot.js.map +1 -1
- package/cjs/date/Date.Input.js +8 -9
- package/cjs/date/Date.Input.js.map +1 -1
- package/cjs/date/datepicker/hooks/useDatepicker.d.ts +12 -1
- package/cjs/date/datepicker/hooks/useDatepicker.js +4 -3
- package/cjs/date/datepicker/hooks/useDatepicker.js.map +1 -1
- package/cjs/date/monthpicker/hooks/useMonthPicker.d.ts +11 -1
- package/cjs/date/monthpicker/hooks/useMonthPicker.js +3 -2
- package/cjs/date/monthpicker/hooks/useMonthPicker.js.map +1 -1
- package/cjs/form/checkbox/CheckboxGroup.js +1 -1
- package/cjs/form/checkbox/CheckboxGroup.js.map +1 -1
- package/cjs/form/fieldset/Fieldset.d.ts +25 -5
- package/cjs/form/fieldset/Fieldset.js +19 -2
- package/cjs/form/fieldset/Fieldset.js.map +1 -1
- package/cjs/form/radio/RadioGroup.js +1 -1
- package/cjs/form/radio/RadioGroup.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js.map +1 -1
- package/cjs/internal-header/InternalHeaderButton.d.ts +5 -0
- package/cjs/internal-header/InternalHeaderButton.js +2 -2
- package/cjs/internal-header/InternalHeaderButton.js.map +1 -1
- package/cjs/read-more/ReadMore.d.ts +10 -0
- package/cjs/read-more/ReadMore.js +4 -6
- package/cjs/read-more/ReadMore.js.map +1 -1
- package/cjs/types/index.d.ts +1 -1
- package/cjs/types/index.js +0 -15
- package/cjs/types/index.js.map +1 -1
- package/cjs/utils/components/Listbox/group/ListboxGroup.js +2 -1
- package/cjs/utils/components/Listbox/group/ListboxGroup.js.map +1 -1
- package/cjs/utils/components/Listbox/input-slot/ListboxInputSlot.js +1 -1
- package/cjs/utils/components/Listbox/input-slot/ListboxInputSlot.js.map +1 -1
- package/cjs/utils/components/Listbox/option/ListboxOption.d.ts +24 -0
- package/cjs/utils/components/Listbox/{item/ListboxItem.js → option/ListboxOption.js} +8 -8
- package/cjs/utils/components/Listbox/option/ListboxOption.js.map +1 -0
- package/cjs/utils/components/Listbox/options/ListboxOptions.d.ts +8 -0
- package/cjs/utils/components/Listbox/{list/ListboxList.js → options/ListboxOptions.js} +8 -8
- package/cjs/utils/components/Listbox/options/ListboxOptions.js.map +1 -0
- package/cjs/utils/components/Listbox/root/ListboxRoot.d.ts +6 -6
- package/cjs/utils/components/Listbox/root/ListboxRoot.js +28 -28
- package/cjs/utils/components/Listbox/root/ListboxRoot.js.map +1 -1
- package/cjs/utils/components/Listbox/root/domHelpers.d.ts +3 -3
- package/cjs/utils/components/Listbox/root/domHelpers.js +8 -8
- package/cjs/utils/components/Listbox/root/domHelpers.js.map +1 -1
- package/cjs/utils/components/floating/Floating.d.ts +1 -1
- package/cjs/utils/components/floating/Floating.js +1 -1
- package/cjs/utils/components/floating/Floating.js.map +1 -1
- package/cjs/utils/components/focus-boundary/FocusBoundary.d.ts +0 -1
- package/cjs/utils/components/focus-boundary/FocusBoundary.js +1 -1
- package/cjs/utils/components/focus-boundary/FocusBoundary.js.map +1 -1
- package/cjs/utils/components/link-anchor/LinkAnchor.js +10 -0
- package/cjs/utils/components/link-anchor/LinkAnchor.js.map +1 -1
- package/cjs/utils/helpers/className.js +1 -1
- package/cjs/utils/helpers/className.js.map +1 -1
- package/cjs/utils/helpers/focus.d.ts +3 -1
- package/cjs/utils/helpers/focus.js +2 -2
- package/cjs/utils/helpers/focus.js.map +1 -1
- package/cjs/utils/helpers/index.d.ts +9 -9
- package/cjs/utils/helpers/index.js +22 -23
- package/cjs/utils/helpers/index.js.map +1 -1
- package/cjs/utils/hooks/index.d.ts +13 -13
- package/cjs/utils/hooks/index.js +31 -28
- package/cjs/utils/hooks/index.js.map +1 -1
- package/cjs/utils/hooks/useScrollLock.js +41 -11
- package/cjs/utils/hooks/useScrollLock.js.map +1 -1
- package/esm/alert/base-alert/root/BaseAlertRoot.js +1 -2
- package/esm/alert/base-alert/root/BaseAlertRoot.js.map +1 -1
- package/esm/alert/info-card/index.d.ts +2 -2
- package/esm/alert/info-card/index.js +1 -1
- package/esm/alert/info-card/index.js.map +1 -1
- package/esm/alert/info-card/message/InfoCardMessage.d.ts +23 -0
- package/esm/alert/info-card/message/InfoCardMessage.js +37 -0
- package/esm/alert/info-card/message/InfoCardMessage.js.map +1 -0
- package/esm/alert/info-card/root/InfoCardRoot.d.ts +15 -2
- package/esm/alert/info-card/root/InfoCardRoot.js +3 -1
- package/esm/alert/info-card/root/InfoCardRoot.js.map +1 -1
- package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.d.ts +12 -0
- package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js +51 -0
- package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js.map +1 -0
- package/esm/data/drag-and-drop/item/DragAndDropItem.d.ts +27 -0
- package/esm/data/drag-and-drop/item/DragAndDropItem.js +46 -0
- package/esm/data/drag-and-drop/item/DragAndDropItem.js.map +1 -0
- package/esm/data/drag-and-drop/root/DragAndDrop.context.d.ts +16 -0
- package/esm/data/drag-and-drop/root/DragAndDrop.context.js +6 -0
- package/esm/data/drag-and-drop/root/DragAndDrop.context.js.map +1 -0
- package/esm/data/drag-and-drop/root/DragAndDropRoot.d.ts +36 -0
- package/esm/data/drag-and-drop/root/DragAndDropRoot.js +147 -0
- package/esm/data/drag-and-drop/root/DragAndDropRoot.js.map +1 -0
- package/esm/data/drag-and-drop/types.d.ts +4 -0
- package/esm/data/drag-and-drop/types.js +2 -0
- package/esm/data/drag-and-drop/types.js.map +1 -0
- package/esm/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.d.ts +22 -0
- package/esm/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js +29 -0
- package/esm/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.js.map +1 -0
- package/esm/data/{drag-and-drop → drag-and-drop-old}/item/DataDragAndDropItem.js +2 -7
- package/esm/data/drag-and-drop-old/item/DataDragAndDropItem.js.map +1 -0
- package/esm/data/drag-and-drop-old/root/DataDragAndDrop.context.js.map +1 -0
- package/esm/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDropRoot.d.ts +2 -2
- package/esm/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDropRoot.js +5 -8
- package/esm/data/drag-and-drop-old/root/DataDragAndDropRoot.js.map +1 -0
- package/esm/data/table/empty-state/DataTableEmptyState.d.ts +5 -0
- package/esm/data/table/empty-state/DataTableEmptyState.js +21 -0
- package/esm/data/table/empty-state/DataTableEmptyState.js.map +1 -0
- package/esm/data/table/helpers/selection/getMultipleSelectProps.d.ts +14 -0
- package/esm/data/table/helpers/selection/getMultipleSelectProps.js +46 -0
- package/esm/data/table/helpers/selection/getMultipleSelectProps.js.map +1 -0
- package/esm/data/table/helpers/selection/getSingleSelectProps.d.ts +10 -0
- package/esm/data/table/helpers/selection/getSingleSelectProps.js +21 -0
- package/esm/data/table/helpers/selection/getSingleSelectProps.js.map +1 -0
- package/esm/data/table/helpers/selection/selection.types.d.ts +42 -0
- package/esm/data/table/helpers/selection/selection.types.js +2 -0
- package/esm/data/table/helpers/selection/selection.types.js.map +1 -0
- package/esm/data/table/helpers/table-focus.js +7 -1
- package/esm/data/table/helpers/table-focus.js.map +1 -1
- package/esm/data/table/helpers/table-keyboard.d.ts +0 -1
- package/esm/data/table/helpers/table-keyboard.js +2 -4
- package/esm/data/table/helpers/table-keyboard.js.map +1 -1
- package/esm/data/table/{root → hooks}/useTableKeyboardNav.js +2 -1
- package/esm/data/table/hooks/useTableKeyboardNav.js.map +1 -0
- package/esm/data/table/hooks/useTableSelection.d.ts +8 -0
- package/esm/data/table/hooks/useTableSelection.js +47 -0
- package/esm/data/table/hooks/useTableSelection.js.map +1 -0
- package/esm/data/table/loading-state/DataTableLoadingState.d.ts +5 -0
- package/esm/data/table/loading-state/DataTableLoadingState.js +21 -0
- package/esm/data/table/loading-state/DataTableLoadingState.js.map +1 -0
- package/esm/data/table/root/DataTable.types.d.ts +13 -0
- package/esm/data/table/root/DataTable.types.js +2 -0
- package/esm/data/table/root/DataTable.types.js.map +1 -0
- package/esm/data/table/root/DataTableAuto.d.ts +60 -0
- package/esm/data/table/root/DataTableAuto.js +77 -0
- package/esm/data/table/root/DataTableAuto.js.map +1 -0
- package/esm/data/table/root/DataTableRoot.context.d.ts +3 -2
- package/esm/data/table/root/DataTableRoot.context.js.map +1 -1
- package/esm/data/table/root/DataTableRoot.d.ts +30 -3
- package/esm/data/table/root/DataTableRoot.js +7 -3
- package/esm/data/table/root/DataTableRoot.js.map +1 -1
- package/esm/data/table/td/DataTableTd.d.ts +10 -0
- package/esm/data/table/td/DataTableTd.js +4 -2
- package/esm/data/table/td/DataTableTd.js.map +1 -1
- package/esm/data/table/th/DataTableTh.d.ts +10 -4
- package/esm/data/table/th/DataTableTh.js +25 -23
- package/esm/data/table/th/DataTableTh.js.map +1 -1
- package/esm/data/table/th/useTableColumnResize.d.ts +64 -0
- package/esm/data/table/th/useTableColumnResize.js +142 -0
- package/esm/data/table/th/useTableColumnResize.js.map +1 -0
- package/esm/data/table/thead/DataTableThead.context.d.ts +4 -0
- package/esm/data/table/thead/DataTableThead.context.js +8 -0
- package/esm/data/table/thead/DataTableThead.context.js.map +1 -0
- package/esm/data/table/thead/DataTableThead.js +3 -1
- package/esm/data/table/thead/DataTableThead.js.map +1 -1
- package/esm/data/table/tr/DataTableTr.js +4 -3
- package/esm/data/table/tr/DataTableTr.js.map +1 -1
- package/esm/data/token-filter/AutoSuggest.js +41 -10
- package/esm/data/token-filter/AutoSuggest.js.map +1 -1
- package/esm/data/token-filter/TokenFilter.d.ts +1 -0
- package/esm/data/token-filter/TokenFilter.js +1 -0
- package/esm/data/token-filter/TokenFilter.js.map +1 -1
- package/esm/data/toolbar/root/DataToolbarRoot.d.ts +6 -23
- package/esm/data/toolbar/root/DataToolbarRoot.js +9 -7
- package/esm/data/toolbar/root/DataToolbarRoot.js.map +1 -1
- package/esm/date/Date.Input.js +9 -10
- package/esm/date/Date.Input.js.map +1 -1
- package/esm/date/datepicker/hooks/useDatepicker.d.ts +12 -1
- package/esm/date/datepicker/hooks/useDatepicker.js +4 -3
- package/esm/date/datepicker/hooks/useDatepicker.js.map +1 -1
- package/esm/date/monthpicker/hooks/useMonthPicker.d.ts +11 -1
- package/esm/date/monthpicker/hooks/useMonthPicker.js +3 -2
- package/esm/date/monthpicker/hooks/useMonthPicker.js.map +1 -1
- package/esm/form/checkbox/CheckboxGroup.js +1 -1
- package/esm/form/checkbox/CheckboxGroup.js.map +1 -1
- package/esm/form/fieldset/Fieldset.d.ts +25 -5
- package/esm/form/fieldset/Fieldset.js +19 -2
- package/esm/form/fieldset/Fieldset.js.map +1 -1
- package/esm/form/radio/RadioGroup.js +1 -1
- package/esm/form/radio/RadioGroup.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js.map +1 -1
- package/esm/internal-header/InternalHeaderButton.d.ts +5 -0
- package/esm/internal-header/InternalHeaderButton.js +2 -2
- package/esm/internal-header/InternalHeaderButton.js.map +1 -1
- package/esm/read-more/ReadMore.d.ts +10 -0
- package/esm/read-more/ReadMore.js +4 -6
- package/esm/read-more/ReadMore.js.map +1 -1
- package/esm/types/index.d.ts +1 -1
- package/esm/types/index.js +1 -1
- package/esm/types/index.js.map +1 -1
- package/esm/utils/components/Listbox/group/ListboxGroup.js +2 -1
- package/esm/utils/components/Listbox/group/ListboxGroup.js.map +1 -1
- package/esm/utils/components/Listbox/input-slot/ListboxInputSlot.js +1 -1
- package/esm/utils/components/Listbox/input-slot/ListboxInputSlot.js.map +1 -1
- package/esm/utils/components/Listbox/option/ListboxOption.d.ts +24 -0
- package/esm/utils/components/Listbox/{item/ListboxItem.js → option/ListboxOption.js} +7 -7
- package/esm/utils/components/Listbox/option/ListboxOption.js.map +1 -0
- package/esm/utils/components/Listbox/options/ListboxOptions.d.ts +8 -0
- package/esm/utils/components/Listbox/{list/ListboxList.js → options/ListboxOptions.js} +8 -8
- package/esm/utils/components/Listbox/options/ListboxOptions.js.map +1 -0
- package/esm/utils/components/Listbox/root/ListboxRoot.d.ts +6 -6
- package/esm/utils/components/Listbox/root/ListboxRoot.js +29 -29
- package/esm/utils/components/Listbox/root/ListboxRoot.js.map +1 -1
- package/esm/utils/components/Listbox/root/domHelpers.d.ts +3 -3
- package/esm/utils/components/Listbox/root/domHelpers.js +7 -7
- package/esm/utils/components/Listbox/root/domHelpers.js.map +1 -1
- package/esm/utils/components/floating/Floating.d.ts +1 -1
- package/esm/utils/components/floating/Floating.js +1 -1
- package/esm/utils/components/floating/Floating.js.map +1 -1
- package/esm/utils/components/focus-boundary/FocusBoundary.d.ts +0 -1
- package/esm/utils/components/focus-boundary/FocusBoundary.js +1 -1
- package/esm/utils/components/focus-boundary/FocusBoundary.js.map +1 -1
- package/esm/utils/components/link-anchor/LinkAnchor.js +10 -0
- package/esm/utils/components/link-anchor/LinkAnchor.js.map +1 -1
- package/esm/utils/helpers/className.js +1 -1
- package/esm/utils/helpers/className.js.map +1 -1
- package/esm/utils/helpers/focus.d.ts +3 -1
- package/esm/utils/helpers/focus.js +2 -2
- package/esm/utils/helpers/focus.js.map +1 -1
- package/esm/utils/helpers/index.d.ts +9 -9
- package/esm/utils/helpers/index.js +9 -9
- package/esm/utils/helpers/index.js.map +1 -1
- package/esm/utils/hooks/index.d.ts +13 -13
- package/esm/utils/hooks/index.js +13 -13
- package/esm/utils/hooks/index.js.map +1 -1
- package/esm/utils/hooks/useScrollLock.js +41 -11
- package/esm/utils/hooks/useScrollLock.js.map +1 -1
- package/package.json +6 -6
- package/src/alert/base-alert/root/BaseAlertRoot.tsx +1 -1
- package/src/alert/info-card/index.ts +2 -0
- package/src/alert/info-card/message/InfoCardMessage.tsx +48 -0
- package/src/alert/info-card/root/InfoCardRoot.tsx +20 -1
- package/src/data/drag-and-drop/drag-handler/DragAndDropDragHandler.tsx +90 -0
- package/src/data/drag-and-drop/item/DragAndDropItem.tsx +71 -0
- package/src/data/drag-and-drop/root/DragAndDrop.context.tsx +25 -0
- package/src/data/drag-and-drop/root/DragAndDropRoot.tsx +245 -0
- package/src/data/drag-and-drop/types.ts +4 -0
- package/src/data/drag-and-drop-old/drag-handler/DataDragAndDropDragHandler.tsx +104 -0
- package/src/data/{drag-and-drop → drag-and-drop-old}/item/DataDragAndDropItem.tsx +6 -33
- package/src/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDrop.context.tsx +2 -0
- package/src/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDropRoot.tsx +6 -8
- package/src/data/table/empty-state/DataTableEmptyState.tsx +26 -0
- package/src/data/table/helpers/selection/getMultipleSelectProps.ts +70 -0
- package/src/data/table/helpers/selection/getSingleSelectProps.ts +33 -0
- package/src/data/table/helpers/selection/selection.types.ts +56 -0
- package/src/data/table/helpers/table-focus.ts +10 -1
- package/src/data/table/helpers/table-keyboard.ts +2 -6
- package/src/data/table/hooks/__tests__/useTableSelection.test.ts +327 -0
- package/src/data/table/{root → hooks}/useTableKeyboardNav.ts +2 -1
- package/src/data/table/hooks/useTableSelection.ts +78 -0
- package/src/data/table/loading-state/DataTableLoadingState.tsx +26 -0
- package/src/data/table/root/DataTable.types.ts +16 -0
- package/src/data/table/root/DataTableAuto.tsx +205 -0
- package/src/data/table/root/DataTableRoot.context.ts +3 -2
- package/src/data/table/root/DataTableRoot.tsx +46 -3
- package/src/data/table/td/DataTableTd.tsx +14 -1
- package/src/data/table/th/DataTableTh.tsx +48 -36
- package/src/data/table/th/useTableColumnResize.ts +276 -0
- package/src/data/table/thead/DataTableThead.context.ts +10 -0
- package/src/data/table/thead/DataTableThead.tsx +8 -5
- package/src/data/table/tr/DataTableTr.tsx +8 -3
- package/src/data/token-filter/AutoSuggest.tsx +76 -15
- package/src/data/token-filter/TokenFilter.tsx +1 -0
- package/src/data/toolbar/root/DataToolbarRoot.tsx +29 -32
- package/src/date/Date.Input.tsx +18 -17
- package/src/date/datepicker/hooks/useDatepicker.tsx +16 -6
- package/src/date/monthpicker/hooks/useMonthPicker.tsx +14 -5
- package/src/form/checkbox/CheckboxGroup.tsx +1 -1
- package/src/form/fieldset/Fieldset.tsx +31 -7
- package/src/form/radio/RadioGroup.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/internal-header/InternalHeaderButton.tsx +18 -9
- package/src/read-more/ReadMore.tsx +15 -16
- package/src/types/index.ts +1 -1
- package/src/utils/components/Listbox/group/ListboxGroup.tsx +9 -2
- package/src/utils/components/Listbox/input-slot/ListboxInputSlot.tsx +1 -1
- package/src/utils/components/Listbox/{item/ListboxItem.tsx → option/ListboxOption.tsx} +14 -14
- package/src/utils/components/Listbox/{list/ListboxList.tsx → options/ListboxOptions.tsx} +10 -10
- package/src/utils/components/Listbox/root/ListboxRoot.tsx +31 -31
- package/src/utils/components/Listbox/root/domHelpers.ts +8 -7
- package/src/utils/components/floating/Floating.tsx +2 -2
- package/src/utils/components/focus-boundary/FocusBoundary.tsx +1 -2
- package/src/utils/components/link-anchor/LinkAnchor.tsx +11 -0
- package/src/utils/helpers/className.ts +1 -1
- package/src/utils/helpers/focus.ts +5 -2
- package/src/utils/helpers/index.ts +9 -9
- package/src/utils/hooks/index.ts +20 -13
- package/src/utils/hooks/useScrollLock.ts +57 -13
- package/cjs/data/action-bar/root/DataActionBarRoot.d.ts +0 -27
- package/cjs/data/action-bar/root/DataActionBarRoot.js +0 -49
- package/cjs/data/action-bar/root/DataActionBarRoot.js.map +0 -1
- package/cjs/data/drag-and-drop/item/DataDragAndDropItem.js.map +0 -1
- package/cjs/data/drag-and-drop/root/DataDragAndDrop.context.js.map +0 -1
- package/cjs/data/drag-and-drop/root/DataDragAndDropRoot.js.map +0 -1
- package/cjs/data/table/root/useTableKeyboardNav.js.map +0 -1
- package/cjs/utils/components/Listbox/item/ListboxItem.d.ts +0 -24
- package/cjs/utils/components/Listbox/item/ListboxItem.js.map +0 -1
- package/cjs/utils/components/Listbox/list/ListboxList.d.ts +0 -8
- package/cjs/utils/components/Listbox/list/ListboxList.js.map +0 -1
- package/esm/data/action-bar/root/DataActionBarRoot.d.ts +0 -27
- package/esm/data/action-bar/root/DataActionBarRoot.js +0 -43
- package/esm/data/action-bar/root/DataActionBarRoot.js.map +0 -1
- package/esm/data/drag-and-drop/item/DataDragAndDropItem.js.map +0 -1
- package/esm/data/drag-and-drop/root/DataDragAndDrop.context.js.map +0 -1
- package/esm/data/drag-and-drop/root/DataDragAndDropRoot.js.map +0 -1
- package/esm/data/table/root/useTableKeyboardNav.js.map +0 -1
- package/esm/utils/components/Listbox/item/ListboxItem.d.ts +0 -24
- package/esm/utils/components/Listbox/item/ListboxItem.js.map +0 -1
- package/esm/utils/components/Listbox/list/ListboxList.d.ts +0 -8
- package/esm/utils/components/Listbox/list/ListboxList.js.map +0 -1
- package/src/data/action-bar/root/DataActionBarRoot.tsx +0 -59
- /package/cjs/data/{drag-and-drop → drag-and-drop-old}/item/DataDragAndDropItem.d.ts +0 -0
- /package/cjs/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDrop.context.d.ts +0 -0
- /package/cjs/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDrop.context.js +0 -0
- /package/cjs/data/table/{root → hooks}/useTableKeyboardNav.d.ts +0 -0
- /package/esm/data/{drag-and-drop → drag-and-drop-old}/item/DataDragAndDropItem.d.ts +0 -0
- /package/esm/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDrop.context.d.ts +0 -0
- /package/esm/data/{drag-and-drop → drag-and-drop-old}/root/DataDragAndDrop.context.js +0 -0
- /package/esm/data/table/{root → hooks}/useTableKeyboardNav.d.ts +0 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
1
|
+
export { useControllableState, type UseControllableStateProps, } from "./useControllableState";
|
|
2
|
+
export { useMergeRefs, useMergeRefsN } from "./useMergeRefs";
|
|
3
|
+
export { noMatchMedia, useMedia } from "./useMedia";
|
|
4
|
+
export { usePrevious } from "./usePrevious";
|
|
5
|
+
export { useAnimationsFinished } from "./useAnimationsFinished";
|
|
6
|
+
export { useEventCallback } from "./useEventCallback";
|
|
7
|
+
export { useOpenChangeAnimationComplete } from "./useOpenChangeAnimationComplete";
|
|
8
|
+
export { useRefWithInit } from "./useRefWithInit";
|
|
9
|
+
export { useScrollLock } from "./useScrollLock";
|
|
10
|
+
export { Timeout, useTimeout } from "./useTimeout";
|
|
11
|
+
export { type TransitionStatus, createTransitionStatusAttribute, useTransitionStatus, } from "./useTransitionStatus";
|
|
12
|
+
export { useValueAsRef } from "./useValueAsRef";
|
|
13
|
+
export { createDescendantContext } from "./descendants/useDescendant";
|
|
14
14
|
export { DescendantsManager } from "./descendants/descendant";
|
package/cjs/utils/hooks/index.js
CHANGED
|
@@ -1,33 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.DescendantsManager = void 0;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
3
|
+
exports.DescendantsManager = exports.createDescendantContext = exports.useValueAsRef = exports.useTransitionStatus = exports.createTransitionStatusAttribute = exports.useTimeout = exports.Timeout = exports.useScrollLock = exports.useRefWithInit = exports.useOpenChangeAnimationComplete = exports.useEventCallback = exports.useAnimationsFinished = exports.usePrevious = exports.useMedia = exports.noMatchMedia = exports.useMergeRefsN = exports.useMergeRefs = exports.useControllableState = void 0;
|
|
4
|
+
var useControllableState_1 = require("./useControllableState");
|
|
5
|
+
Object.defineProperty(exports, "useControllableState", { enumerable: true, get: function () { return useControllableState_1.useControllableState; } });
|
|
6
|
+
var useMergeRefs_1 = require("./useMergeRefs");
|
|
7
|
+
Object.defineProperty(exports, "useMergeRefs", { enumerable: true, get: function () { return useMergeRefs_1.useMergeRefs; } });
|
|
8
|
+
Object.defineProperty(exports, "useMergeRefsN", { enumerable: true, get: function () { return useMergeRefs_1.useMergeRefsN; } });
|
|
9
|
+
var useMedia_1 = require("./useMedia");
|
|
10
|
+
Object.defineProperty(exports, "noMatchMedia", { enumerable: true, get: function () { return useMedia_1.noMatchMedia; } });
|
|
11
|
+
Object.defineProperty(exports, "useMedia", { enumerable: true, get: function () { return useMedia_1.useMedia; } });
|
|
12
|
+
var usePrevious_1 = require("./usePrevious");
|
|
13
|
+
Object.defineProperty(exports, "usePrevious", { enumerable: true, get: function () { return usePrevious_1.usePrevious; } });
|
|
14
|
+
var useAnimationsFinished_1 = require("./useAnimationsFinished");
|
|
15
|
+
Object.defineProperty(exports, "useAnimationsFinished", { enumerable: true, get: function () { return useAnimationsFinished_1.useAnimationsFinished; } });
|
|
16
|
+
var useEventCallback_1 = require("./useEventCallback");
|
|
17
|
+
Object.defineProperty(exports, "useEventCallback", { enumerable: true, get: function () { return useEventCallback_1.useEventCallback; } });
|
|
18
|
+
var useOpenChangeAnimationComplete_1 = require("./useOpenChangeAnimationComplete");
|
|
19
|
+
Object.defineProperty(exports, "useOpenChangeAnimationComplete", { enumerable: true, get: function () { return useOpenChangeAnimationComplete_1.useOpenChangeAnimationComplete; } });
|
|
20
|
+
var useRefWithInit_1 = require("./useRefWithInit");
|
|
21
|
+
Object.defineProperty(exports, "useRefWithInit", { enumerable: true, get: function () { return useRefWithInit_1.useRefWithInit; } });
|
|
22
|
+
var useScrollLock_1 = require("./useScrollLock");
|
|
23
|
+
Object.defineProperty(exports, "useScrollLock", { enumerable: true, get: function () { return useScrollLock_1.useScrollLock; } });
|
|
24
|
+
var useTimeout_1 = require("./useTimeout");
|
|
25
|
+
Object.defineProperty(exports, "Timeout", { enumerable: true, get: function () { return useTimeout_1.Timeout; } });
|
|
26
|
+
Object.defineProperty(exports, "useTimeout", { enumerable: true, get: function () { return useTimeout_1.useTimeout; } });
|
|
27
|
+
var useTransitionStatus_1 = require("./useTransitionStatus");
|
|
28
|
+
Object.defineProperty(exports, "createTransitionStatusAttribute", { enumerable: true, get: function () { return useTransitionStatus_1.createTransitionStatusAttribute; } });
|
|
29
|
+
Object.defineProperty(exports, "useTransitionStatus", { enumerable: true, get: function () { return useTransitionStatus_1.useTransitionStatus; } });
|
|
30
|
+
var useValueAsRef_1 = require("./useValueAsRef");
|
|
31
|
+
Object.defineProperty(exports, "useValueAsRef", { enumerable: true, get: function () { return useValueAsRef_1.useValueAsRef; } });
|
|
32
|
+
var useDescendant_1 = require("./descendants/useDescendant");
|
|
33
|
+
Object.defineProperty(exports, "createDescendantContext", { enumerable: true, get: function () { return useDescendant_1.createDescendantContext; } });
|
|
31
34
|
var descendant_1 = require("./descendants/descendant");
|
|
32
35
|
Object.defineProperty(exports, "DescendantsManager", { enumerable: true, get: function () { return descendant_1.DescendantsManager; } });
|
|
33
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/hooks/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/hooks/index.ts"],"names":[],"mappings":";;;AAAA,+DAGgC;AAF9B,4HAAA,oBAAoB,OAAA;AAGtB,+CAA6D;AAApD,4GAAA,YAAY,OAAA;AAAE,6GAAA,aAAa,OAAA;AACpC,uCAAoD;AAA3C,wGAAA,YAAY,OAAA;AAAE,oGAAA,QAAQ,OAAA;AAC/B,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AACpB,iEAAgE;AAAvD,8HAAA,qBAAqB,OAAA;AAC9B,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,mFAAkF;AAAzE,gJAAA,8BAA8B,OAAA;AACvC,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AACvB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,2CAAmD;AAA1C,qGAAA,OAAO,OAAA;AAAE,wGAAA,UAAU,OAAA;AAC5B,6DAI+B;AAF7B,sIAAA,+BAA+B,OAAA;AAC/B,0HAAA,mBAAmB,OAAA;AAErB,iDAAgD;AAAvC,8GAAA,aAAa,OAAA;AACtB,6DAAsE;AAA7D,wHAAA,uBAAuB,OAAA;AAChC,uDAA8D;AAArD,gHAAA,kBAAkB,OAAA"}
|
|
@@ -7,6 +7,34 @@ const useTimeout_1 = require("./useTimeout");
|
|
|
7
7
|
let originalHtmlStyles = {};
|
|
8
8
|
let originalBodyStyles = {};
|
|
9
9
|
let originalHtmlScrollBehavior = "";
|
|
10
|
+
function supportsStableScrollbarGutter(referenceElement) {
|
|
11
|
+
const supported = typeof CSS !== "undefined" &&
|
|
12
|
+
CSS.supports &&
|
|
13
|
+
CSS.supports("scrollbar-gutter", "stable");
|
|
14
|
+
if (!supported || typeof document === "undefined") {
|
|
15
|
+
return false;
|
|
16
|
+
}
|
|
17
|
+
/*
|
|
18
|
+
* We need to do aditional checks since the scenario:
|
|
19
|
+
* - Scrollbar is edited with `::-webkit-scrollbar`
|
|
20
|
+
* - MacOS setting: Show scroll bars -> Automatically based on mouse or tracked
|
|
21
|
+
* Causes the calculation of scrollbar width to be incorrect, and thus the scrollbar gutter to not work as intended.
|
|
22
|
+
*/
|
|
23
|
+
const doc = (0, helpers_1.ownerDocument)(referenceElement);
|
|
24
|
+
const html = doc.documentElement;
|
|
25
|
+
const body = doc.body;
|
|
26
|
+
const scrollContainer = isOverflowElement(html) ? html : body;
|
|
27
|
+
const originalScrollContainerOverflowY = scrollContainer.style.overflowY;
|
|
28
|
+
const originalHtmlStyleGutter = html.style.scrollbarGutter;
|
|
29
|
+
html.style.scrollbarGutter = "stable";
|
|
30
|
+
scrollContainer.style.overflowY = "scroll";
|
|
31
|
+
const before = scrollContainer.offsetWidth;
|
|
32
|
+
scrollContainer.style.overflowY = "hidden";
|
|
33
|
+
const after = scrollContainer.offsetWidth;
|
|
34
|
+
scrollContainer.style.overflowY = originalScrollContainerOverflowY;
|
|
35
|
+
html.style.scrollbarGutter = originalHtmlStyleGutter;
|
|
36
|
+
return before === after;
|
|
37
|
+
}
|
|
10
38
|
function hasInsetScrollbars(referenceElement) {
|
|
11
39
|
if (typeof document === "undefined") {
|
|
12
40
|
return false;
|
|
@@ -51,9 +79,11 @@ function preventScrollStandard(referenceElement) {
|
|
|
51
79
|
*/
|
|
52
80
|
function lockScroll() {
|
|
53
81
|
/* DOM reads: */
|
|
54
|
-
var _a;
|
|
55
82
|
const htmlStyles = win.getComputedStyle(html);
|
|
56
83
|
const bodyStyles = win.getComputedStyle(body);
|
|
84
|
+
const htmlScrollbarGutterValue = htmlStyles.scrollbarGutter || "";
|
|
85
|
+
const hasBothEdges = htmlScrollbarGutterValue.includes("both-edges");
|
|
86
|
+
const scrollbarGutterValue = hasBothEdges ? "stable both-edges" : "stable";
|
|
57
87
|
scrollTop = html.scrollTop;
|
|
58
88
|
scrollLeft = html.scrollLeft;
|
|
59
89
|
originalHtmlStyles = {
|
|
@@ -87,22 +117,22 @@ function preventScrollStandard(referenceElement) {
|
|
|
87
117
|
/**
|
|
88
118
|
* Check support for stable scrollbar gutter to avoid layout shift when scrollbars appear/disappear.
|
|
89
119
|
*/
|
|
90
|
-
const
|
|
91
|
-
((_a = CSS.supports) === null || _a === void 0 ? void 0 : _a.call(CSS, "scrollbar-gutter", "stable"));
|
|
120
|
+
const supportsScrollbarGutter = supportsStableScrollbarGutter(referenceElement);
|
|
92
121
|
/*
|
|
93
122
|
* DOM writes:
|
|
94
123
|
* Do not read the DOM past this point!
|
|
95
124
|
*/
|
|
125
|
+
if (supportsScrollbarGutter) {
|
|
126
|
+
const elementToLock = isOverflowElement(html) ? html : body;
|
|
127
|
+
html.style.scrollbarGutter = scrollbarGutterValue;
|
|
128
|
+
elementToLock.style.overflowY = "hidden";
|
|
129
|
+
elementToLock.style.overflowX = "hidden";
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
96
132
|
Object.assign(html.style, {
|
|
97
133
|
scrollbarGutter: "stable",
|
|
98
|
-
overflowY:
|
|
99
|
-
|
|
100
|
-
? "scroll"
|
|
101
|
-
: "hidden",
|
|
102
|
-
overflowX: !supportsStableScrollbarGutter &&
|
|
103
|
-
(isScrollableX || hasConstantOverflowX)
|
|
104
|
-
? "scroll"
|
|
105
|
-
: "hidden",
|
|
134
|
+
overflowY: isScrollableY || hasConstantOverflowY ? "scroll" : "hidden",
|
|
135
|
+
overflowX: isScrollableX || hasConstantOverflowX ? "scroll" : "hidden",
|
|
106
136
|
});
|
|
107
137
|
Object.assign(body.style, {
|
|
108
138
|
/*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useScrollLock.js","sourceRoot":"","sources":["../../../src/utils/hooks/useScrollLock.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useScrollLock.js","sourceRoot":"","sources":["../../../src/utils/hooks/useScrollLock.ts"],"names":[],"mappings":";;AAyXS,sCAAa;AAzXtB,yDAA6D;AAC7D,wCAAyE;AACzE,6CAAuC;AAEvC,IAAI,kBAAkB,GAAiC,EAAE,CAAC;AAC1D,IAAI,kBAAkB,GAAiC,EAAE,CAAC;AAC1D,IAAI,0BAA0B,GAAG,EAAE,CAAC;AAEpC,SAAS,6BAA6B,CAAC,gBAAgC;IACrE,MAAM,SAAS,GACb,OAAO,GAAG,KAAK,WAAW;QAC1B,GAAG,CAAC,QAAQ;QACZ,GAAG,CAAC,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAAC;IAE7C,IAAI,CAAC,SAAS,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE,CAAC;QAClD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;;;;OAKG;IAEH,MAAM,GAAG,GAAG,IAAA,uBAAa,EAAC,gBAAgB,CAAC,CAAC;IAC5C,MAAM,IAAI,GAAG,GAAG,CAAC,eAAe,CAAC;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;IAEtB,MAAM,eAAe,GAAG,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAE9D,MAAM,gCAAgC,GAAG,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC;IACzE,MAAM,uBAAuB,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC;IAE3D,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,QAAQ,CAAC;IAEtC,eAAe,CAAC,KAAK,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC3C,MAAM,MAAM,GAAG,eAAe,CAAC,WAAW,CAAC;IAE3C,eAAe,CAAC,KAAK,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AAC;QACJ,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAE/C,IAAA,sCAAqB,EAAC,GAAG,EAAE;QACzB,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAO,SAAS,CAAC;QACnB,CAAC;QAED,OAAO,aAAa,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IACjD,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAClC,CAAC;AAED,MAAM,4BAA4B,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AAErE,SAAS,iBAAiB,CAAC,OAAgB;IACzC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC9E,OAAO,CACL,iCAAiC,CAAC,IAAI,CAAC,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;QACxE,CAAC,4BAA4B,CAAC,GAAG,CAAC,OAAO,CAAC,CAC3C,CAAC;AACJ,CAAC"}
|
|
@@ -21,8 +21,7 @@ const BaseAlert = forwardRef((_a, forwardedRef) => {
|
|
|
21
21
|
const translate = useI18n("global");
|
|
22
22
|
const alertColor = status ? baseAlertStatusToDataColor(status) : dataColor;
|
|
23
23
|
return (React.createElement(BaseAlertProvider, { size: size, status: status, color: alertColor, statusId: type === "strong" ? statusId : undefined },
|
|
24
|
-
React.createElement(Component, Object.assign({ "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : (!status || Component === "div" ? undefined : translate(status)), ref: forwardedRef }, restProps, { className: cl(className, "aksel-base-alert"), "data-size": size, "data-color": alertColor, "data-variant": type, "data-global": global }),
|
|
25
|
-
React.createElement("div", { role: role }, children))));
|
|
24
|
+
React.createElement(Component, Object.assign({ "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : (!status || Component === "div" ? undefined : translate(status)), ref: forwardedRef }, restProps, { className: cl(className, "aksel-base-alert"), "data-size": size, "data-color": alertColor, "data-variant": type, "data-global": global }), role ? React.createElement("div", { role: role }, children) : children)));
|
|
26
25
|
});
|
|
27
26
|
export { BaseAlert };
|
|
28
27
|
//# sourceMappingURL=BaseAlertRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAlertRoot.js","sourceRoot":"","sources":["../../../../src/alert/base-alert/root/BaseAlertRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAChD,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AACzD,OAAO,EAEL,iBAAiB,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AA0CnE,MAAM,SAAS,GAAG,UAAU,CAC1B,CACE,EAYiB,EACjB,YAAY,EACZ,EAAE;QAdF,EACE,QAAQ,EACR,SAAS,EACT,IAAI,GAAG,QAAQ,EACf,YAAY,EAAE,SAAS,EACvB,IAAI,EACJ,MAAM,GAAG,KAAK,EACd,MAAM,EACN,EAAE,EAAE,SAAS,GAAG,SAAS,EACzB,YAAY,EAAE,SAAS,EACvB,IAAI,OAEW,EADZ,SAAS,cAXd,uGAYC,CADa;IAId,MAAM,QAAQ,GAAG,KAAK,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEpC,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE3E,OAAO,CACL,o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,MAAM,QAAQ,GAAG,KAAK,EAAE,CAAC;IACzB,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAEpC,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,0BAA0B,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE3E,OAAO,CACL,oBAAC,iBAAiB,IAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;QAElD,oBAAC,SAAS,gCAEN,SAAS,aAAT,SAAS,cAAT,SAAS,GACT,CAAC,CAAC,MAAM,IAAI,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,EAElE,GAAG,EAAE,YAAY,IACb,SAAS,IACb,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,kBAAkB,CAAC,eACjC,IAAI,gBACH,UAAU,kBACR,IAAI,iBACL,MAAM,KAElB,IAAI,CAAC,CAAC,CAAC,6BAAK,IAAI,EAAE,IAAI,IAAG,QAAQ,CAAO,CAAC,CAAC,CAAC,QAAQ,CAC1C,CACM,CACrB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { InfoCard, InfoCardHeader, InfoCardTitle, InfoCardContent, } from "./root/InfoCardRoot.js";
|
|
2
|
-
export type { InfoCardProps, InfoCardHeaderProps, InfoCardTitleProps, InfoCardContentProps, } from "./root/InfoCardRoot.js";
|
|
1
|
+
export { InfoCard, InfoCardHeader, InfoCardTitle, InfoCardContent, InfoCardMessage, } from "./root/InfoCardRoot.js";
|
|
2
|
+
export type { InfoCardProps, InfoCardHeaderProps, InfoCardTitleProps, InfoCardContentProps, InfoCardMessageProps, } from "./root/InfoCardRoot.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/info-card/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EACL,QAAQ,EACR,cAAc,EACd,aAAa,EACb,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/alert/info-card/index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,OAAO,EACL,QAAQ,EACR,cAAc,EACd,aAAa,EACb,eAAe,EACf,eAAe,GAChB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface InfoCardMessageProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/**
|
|
4
|
+
* Icon to display in message.
|
|
5
|
+
*/
|
|
6
|
+
icon: React.ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* A component for displaying informational messages.
|
|
10
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/infocard)
|
|
11
|
+
* @see 🏷️ {@link InfoCardMessageProps}
|
|
12
|
+
* @example
|
|
13
|
+
* ```jsx
|
|
14
|
+
* <InfoCard data-color="info">
|
|
15
|
+
* <InfoCard.Message icon={<InformationSquareIcon aria-hidden />}>
|
|
16
|
+
* Message contents
|
|
17
|
+
* </InfoCard.Message>
|
|
18
|
+
* </InfoCard>
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
declare const InfoCardMessage: React.ForwardRefExoticComponent<InfoCardMessageProps & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export { InfoCardMessage };
|
|
23
|
+
export type { InfoCardMessageProps };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React, { forwardRef } from "react";
|
|
13
|
+
import { BodyLong } from "../../../typography/index.js";
|
|
14
|
+
import { cl } from "../../../utils/helpers/index.js";
|
|
15
|
+
import { useBaseAlert } from "../../base-alert/root/BaseAlertRoot.context.js";
|
|
16
|
+
/**
|
|
17
|
+
* A component for displaying informational messages.
|
|
18
|
+
* @see [📝 Documentation](https://aksel.nav.no/komponenter/core/infocard)
|
|
19
|
+
* @see 🏷️ {@link InfoCardMessageProps}
|
|
20
|
+
* @example
|
|
21
|
+
* ```jsx
|
|
22
|
+
* <InfoCard data-color="info">
|
|
23
|
+
* <InfoCard.Message icon={<InformationSquareIcon aria-hidden />}>
|
|
24
|
+
* Message contents
|
|
25
|
+
* </InfoCard.Message>
|
|
26
|
+
* </InfoCard>
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
const InfoCardMessage = forwardRef((_a, forwardedRef) => {
|
|
30
|
+
var { children, className, icon } = _a, restProps = __rest(_a, ["children", "className", "icon"]);
|
|
31
|
+
const context = useBaseAlert();
|
|
32
|
+
return (React.createElement("div", Object.assign({ ref: forwardedRef, className: cl(className, "aksel-base-alert__message") }, restProps),
|
|
33
|
+
React.createElement("div", { className: "aksel-base-alert__icon" }, icon),
|
|
34
|
+
React.createElement(BodyLong, { size: context.size, as: "div", textColor: "default" }, children)));
|
|
35
|
+
});
|
|
36
|
+
export { InfoCardMessage };
|
|
37
|
+
//# sourceMappingURL=InfoCardMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoCardMessage.js","sourceRoot":"","sources":["../../../../src/alert/info-card/message/InfoCardMessage.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAS3E;;;;;;;;;;;;GAYG;AACH,MAAM,eAAe,GAAG,UAAU,CAChC,CACE,EAAiE,EACjE,YAAY,EACZ,EAAE;QAFF,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,OAAsC,EAAjC,SAAS,cAAzC,iCAA2C,CAAF;IAGzC,MAAM,OAAO,GAAG,YAAY,EAAE,CAAC;IAC/B,OAAO,CACL,2CACE,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,2BAA2B,CAAC,IACjD,SAAS;QAEb,6BAAK,SAAS,EAAC,wBAAwB,IAAE,IAAI,CAAO;QACpD,oBAAC,QAAQ,IAAC,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,EAAE,EAAC,KAAK,EAAC,SAAS,EAAC,SAAS,IACvD,QAAQ,CACA,CACP,CACP,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { BaseAlert } from "../../base-alert/index.js";
|
|
3
3
|
import { InfoCardContent, type InfoCardContentProps } from "../content/InfoCardContent.js";
|
|
4
4
|
import { InfoCardHeader, type InfoCardHeaderProps } from "../header/InfoCardHeader.js";
|
|
5
|
+
import { InfoCardMessage, type InfoCardMessageProps } from "../message/InfoCardMessage.js";
|
|
5
6
|
import { InfoCardTitle, type InfoCardTitleProps } from "../title/InfoCardTitle.js";
|
|
6
7
|
type InfoCardProps = Omit<BaseAlert.RootProps, "type" | "global" | "status" | "as"> & {
|
|
7
8
|
/**
|
|
@@ -55,6 +56,18 @@ interface InfoCardComponent extends React.ForwardRefExoticComponent<InfoCardProp
|
|
|
55
56
|
* ```
|
|
56
57
|
*/
|
|
57
58
|
Content: typeof InfoCardContent;
|
|
59
|
+
/**
|
|
60
|
+
* @see 🏷️ {@link InfoCardMessageProps}
|
|
61
|
+
* @example
|
|
62
|
+
* ```jsx
|
|
63
|
+
* <InfoCard data-color="info">
|
|
64
|
+
* <InfoCard.Message icon={<InformationSquareIcon aria-hidden />}>
|
|
65
|
+
* Message contents
|
|
66
|
+
* </InfoCard.Message>
|
|
67
|
+
* </InfoCard>
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
Message: typeof InfoCardMessage;
|
|
58
71
|
}
|
|
59
72
|
/**
|
|
60
73
|
* A component for displaying informational content in a card format.
|
|
@@ -72,5 +85,5 @@ interface InfoCardComponent extends React.ForwardRefExoticComponent<InfoCardProp
|
|
|
72
85
|
*/
|
|
73
86
|
export declare const InfoCard: InfoCardComponent;
|
|
74
87
|
export default InfoCard;
|
|
75
|
-
export { InfoCardContent, InfoCardHeader, InfoCardTitle };
|
|
76
|
-
export type { InfoCardProps, InfoCardHeaderProps, InfoCardTitleProps, InfoCardContentProps, };
|
|
88
|
+
export { InfoCardContent, InfoCardHeader, InfoCardTitle, InfoCardMessage };
|
|
89
|
+
export type { InfoCardProps, InfoCardHeaderProps, InfoCardTitleProps, InfoCardContentProps, InfoCardMessageProps, };
|
|
@@ -13,6 +13,7 @@ import React, { forwardRef } from "react";
|
|
|
13
13
|
import { BaseAlert } from "../../base-alert/index.js";
|
|
14
14
|
import { InfoCardContent, } from "../content/InfoCardContent.js";
|
|
15
15
|
import { InfoCardHeader, } from "../header/InfoCardHeader.js";
|
|
16
|
+
import { InfoCardMessage, } from "../message/InfoCardMessage.js";
|
|
16
17
|
import { InfoCardTitle } from "../title/InfoCardTitle.js";
|
|
17
18
|
/**
|
|
18
19
|
* A component for displaying informational content in a card format.
|
|
@@ -35,6 +36,7 @@ export const InfoCard = forwardRef((_a, forwardedRef) => {
|
|
|
35
36
|
InfoCard.Header = InfoCardHeader;
|
|
36
37
|
InfoCard.Title = InfoCardTitle;
|
|
37
38
|
InfoCard.Content = InfoCardContent;
|
|
39
|
+
InfoCard.Message = InfoCardMessage;
|
|
38
40
|
export default InfoCard;
|
|
39
|
-
export { InfoCardContent, InfoCardHeader, InfoCardTitle };
|
|
41
|
+
export { InfoCardContent, InfoCardHeader, InfoCardTitle, InfoCardMessage };
|
|
40
42
|
//# sourceMappingURL=InfoCardRoot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoCardRoot.js","sourceRoot":"","sources":["../../../../src/alert/info-card/root/InfoCardRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,eAAe,GAEhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,cAAc,GAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,aAAa,EAA2B,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"InfoCardRoot.js","sourceRoot":"","sources":["../../../../src/alert/info-card/root/InfoCardRoot.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EACL,eAAe,GAEhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,cAAc,GAEf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,eAAe,GAEhB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,aAAa,EAA2B,MAAM,wBAAwB,CAAC;AA6EhF;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,UAAU,CAChC,CACE,EAIgB,EAChB,YAAY,EACZ,EAAE;QANF,EACE,YAAY,EAAE,SAAS,GAAG,MAAM,EAChC,EAAE,GAAG,KAAK,OAEI,EADX,SAAS,cAHd,oBAIC,CADa;IAId,OAAO,CACL,oBAAC,SAAS,CAAC,IAAI,kBACb,GAAG,EAAE,YAAY,gBACL,SAAS,IACjB,SAAS,IACb,IAAI,EAAC,UAAU,EACf,MAAM,EAAE,KAAK,EACb,EAAE,EAAE,EAAE,IACN,CACH,CAAC;AACJ,CAAC,CACmB,CAAC;AAEvB,QAAQ,CAAC,MAAM,GAAG,cAAc,CAAC;AACjC,QAAQ,CAAC,KAAK,GAAG,aAAa,CAAC;AAC/B,QAAQ,CAAC,OAAO,GAAG,eAAe,CAAC;AACnC,QAAQ,CAAC,OAAO,GAAG,eAAe,CAAC;AAEnC,eAAe,QAAQ,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { DragAndDropElement } from "../types.js";
|
|
3
|
+
export interface DragAndDropDragHandlerProps {
|
|
4
|
+
item: DragAndDropElement;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* DragAndDropDragHandler
|
|
8
|
+
*
|
|
9
|
+
* A button component that serves as a drag handle for drag and drop operations.
|
|
10
|
+
* Can be used to initiate dragging of elements in a data table or list.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DragAndDropDragHandler: React.ForwardRefExoticComponent<DragAndDropDragHandlerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CaretDownCircleFillIcon, CaretUpCircleFillIcon, DragVerticalIcon, } from "@navikt/aksel-icons";
|
|
3
|
+
import { useDragAndDropContext } from "../root/DragAndDrop.context.js";
|
|
4
|
+
/**
|
|
5
|
+
* DragAndDropDragHandler
|
|
6
|
+
*
|
|
7
|
+
* A button component that serves as a drag handle for drag and drop operations.
|
|
8
|
+
* Can be used to initiate dragging of elements in a data table or list.
|
|
9
|
+
*/
|
|
10
|
+
export const DragAndDropDragHandler = React.forwardRef(({ item }, forwardedRef) => {
|
|
11
|
+
var _a;
|
|
12
|
+
const context = useDragAndDropContext();
|
|
13
|
+
const active = ((_a = context === null || context === void 0 ? void 0 : context.dragHandlerActive) === null || _a === void 0 ? void 0 : _a.id) === item.id;
|
|
14
|
+
return (React.createElement("div", { className: "aksel-data-drag-and-drop__drag-handler", ref: forwardedRef },
|
|
15
|
+
active && (React.createElement("span", { className: "aksel-data-drag-and-drop__drag-handler__arrow", "data-direction": "up" },
|
|
16
|
+
React.createElement(CaretUpCircleFillIcon, { "aria-hidden": true, fontSize: "1.2rem" }))),
|
|
17
|
+
React.createElement("button", { "aria-label": "Dra for \u00E5 flytte", className: "aksel-data-drag-and-drop__drag-handler__button", "data-drag-handler-active": active, onPointerDown: (event) => {
|
|
18
|
+
event.stopPropagation();
|
|
19
|
+
context === null || context === void 0 ? void 0 : context.onDragStart(event, item);
|
|
20
|
+
}, onClick: () => context === null || context === void 0 ? void 0 : context.setDragHandlerActive(item), onKeyDown: (event) => {
|
|
21
|
+
if ((event.key === "Enter" || event.key === " ") &&
|
|
22
|
+
(context === null || context === void 0 ? void 0 : context.dragHandlerActive)) {
|
|
23
|
+
// Enter or space, currently active item - end keyboard dragging
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
context === null || context === void 0 ? void 0 : context.setDragHandlerActive(null);
|
|
26
|
+
}
|
|
27
|
+
else if ((event.key === "Enter" || event.key === " ") &&
|
|
28
|
+
!(context === null || context === void 0 ? void 0 : context.dragHandlerActive)) {
|
|
29
|
+
// Enter or space, not currently active item - start keyboard dragging
|
|
30
|
+
event.preventDefault();
|
|
31
|
+
context === null || context === void 0 ? void 0 : context.setDragHandlerActive(item);
|
|
32
|
+
}
|
|
33
|
+
else if (event.key === "Escape") {
|
|
34
|
+
// Cancel dragging
|
|
35
|
+
// TODO Handle reset
|
|
36
|
+
context === null || context === void 0 ? void 0 : context.setDragHandlerActive(null);
|
|
37
|
+
}
|
|
38
|
+
else if (event.key === "ArrowUp") {
|
|
39
|
+
// Move item up
|
|
40
|
+
context === null || context === void 0 ? void 0 : context.onKeyboardDragEnd(-1);
|
|
41
|
+
}
|
|
42
|
+
else if (event.key === "ArrowDown") {
|
|
43
|
+
// Move item down
|
|
44
|
+
context === null || context === void 0 ? void 0 : context.onKeyboardDragEnd(1);
|
|
45
|
+
}
|
|
46
|
+
} },
|
|
47
|
+
React.createElement(DragVerticalIcon, { "aria-hidden": true, title: "Dra for \u00E5 flytte", fontSize: "1.5rem" })),
|
|
48
|
+
active && (React.createElement("span", { className: "aksel-data-drag-and-drop__drag-handler__arrow", "data-direction": "down" },
|
|
49
|
+
React.createElement(CaretDownCircleFillIcon, { "aria-hidden": true, fontSize: "1.2rem" })))));
|
|
50
|
+
});
|
|
51
|
+
//# sourceMappingURL=DragAndDropDragHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragAndDropDragHandler.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop/drag-handler/DragAndDropDragHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAOpE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,CAAC,UAAU,CAGpD,CAAC,EAAE,IAAI,EAAE,EAAE,YAAY,EAAE,EAAE;;IAC3B,MAAM,OAAO,GAAG,qB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CAAC,cAAc,EAAE,CAAC;oBACvB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;gBACtC,CAAC;qBAAM,IAAI,KAAK,CAAC,GAAG,KAAK,QAAQ,EAAE,CAAC;oBAClC,kBAAkB;oBAClB,oBAAoB;oBACpB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB,CAAC,IAAI,CAAC,CAAC;gBACtC,CAAC;qBAAM,IAAI,KAAK,CAAC,GAAG,KAAK,SAAS,EAAE,CAAC;oBACnC,eAAe;oBACf,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;gBACjC,CAAC;qBAAM,IAAI,KAAK,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;oBACrC,iBAAiB;oBACjB,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,oBAAC,gBAAgB,yBAEf,KAAK,EAAC,uBAAkB,EACxB,QAAQ,EAAC,QAAQ,GACjB,CACK;QACR,MAAM,IAAI,CACT,8BACE,SAAS,EAAC,+CAA+C,oBAC1C,MAAM;YAErB,oBAAC,uBAAuB,yBAAa,QAAQ,EAAC,QAAQ,GAAG,CACpD,CACR,CACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface DragAndDropItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Unique id
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* Index of the item being dragged
|
|
10
|
+
*/
|
|
11
|
+
index: number;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* TODO
|
|
15
|
+
*
|
|
16
|
+
* @see 🏷️ {@link DragAndDropItemProps}
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <DragAndDrop.Item numOfSelectedRows={selectedRows.length} onClear={handleClear}>
|
|
20
|
+
* TODO
|
|
21
|
+
* </DragAndDrop.Item>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const DragAndDropItem: React.ForwardRefExoticComponent<DragAndDropItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
export default DragAndDropItem;
|
|
26
|
+
export { DragAndDropItem };
|
|
27
|
+
export type { DragAndDropItemProps };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
+
t[p] = s[p];
|
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
+
t[p[i]] = s[p[i]];
|
|
9
|
+
}
|
|
10
|
+
return t;
|
|
11
|
+
};
|
|
12
|
+
import React from "react";
|
|
13
|
+
import { HStack } from "../../../primitives/stack/index.js";
|
|
14
|
+
import { cl } from "../../../utils/helpers/index.js";
|
|
15
|
+
import { DragAndDropDragHandler } from "../drag-handler/DragAndDropDragHandler.js";
|
|
16
|
+
import { useDragAndDropContext } from "../root/DragAndDrop.context.js";
|
|
17
|
+
/**
|
|
18
|
+
* TODO
|
|
19
|
+
*
|
|
20
|
+
* @see 🏷️ {@link DragAndDropItemProps}
|
|
21
|
+
* @example
|
|
22
|
+
* ```tsx
|
|
23
|
+
* <DragAndDrop.Item numOfSelectedRows={selectedRows.length} onClear={handleClear}>
|
|
24
|
+
* TODO
|
|
25
|
+
* </DragAndDrop.Item>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
const DragAndDropItem = React.forwardRef((_a, forwardedRef) => {
|
|
29
|
+
var _b;
|
|
30
|
+
var { children, id, index, className } = _a, rest = __rest(_a, ["children", "id", "index", "className"]);
|
|
31
|
+
const ref = React.useRef(null);
|
|
32
|
+
const context = useDragAndDropContext();
|
|
33
|
+
const item = { id, index };
|
|
34
|
+
const isDropTarget = ((_b = context === null || context === void 0 ? void 0 : context.dropTarget) === null || _b === void 0 ? void 0 : _b.id) === id;
|
|
35
|
+
return (React.createElement(HStack, { gap: "space-8", align: "center", wrap: false, asChild: true, ref: forwardedRef, padding: "space-4" },
|
|
36
|
+
React.createElement("div", Object.assign({ id: id, ref: ref }, rest, { "data-dnd-id": id, "data-dnd-index": index, role: "button", className: cl("aksel-data-table__drag-and-drop-item", className), "data-drop-target": isDropTarget,
|
|
37
|
+
/*
|
|
38
|
+
data-keyboard-dragging={keyboardDragging}
|
|
39
|
+
*/
|
|
40
|
+
tabIndex: -1 }),
|
|
41
|
+
React.createElement(DragAndDropDragHandler, { item: item }),
|
|
42
|
+
React.createElement("div", null, children))));
|
|
43
|
+
});
|
|
44
|
+
export default DragAndDropItem;
|
|
45
|
+
export { DragAndDropItem };
|
|
46
|
+
//# sourceMappingURL=DragAndDropItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragAndDropItem.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop/item/DragAndDropItem.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAcpE;;;;;;;;;;GAUG;AACH,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CACtC,CAAC,EAA2C,EAAE,YAAY,EAAE,EAAE;;QAA7D,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,OAAW,EAAN,IAAI,cAAzC,wCAA2C,CAAF;IACxC,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC/C,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,MAAM,IAAI,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,CAAC;IAC3B,MAAM,YAAY,GAAG,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,UAAU,0CAAE,EAAE,MAAK,EAAE,CAAC;IAEpD,OAAO,CACL,oBAAC,MAAM,IACL,GAAG,EAAC,SAAS,EACb,KAAK,EAAC,QAAQ,EACd,IAAI,EAAE,KAAK,EACX,OAAO,QACP,GAAG,EAAE,YAAY,EACjB,OAAO,EAAC,SAAS;QAGjB,2CACE,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,GAAG,IACJ,IAAI,mBACK,EAAE,oBACC,KAAK,EACrB,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,EAAE,CAAC,sCAAsC,EAAE,SAAS,CAAC,sBAC9C,YAAY;YAC9B;;cAEE;YACF,QAAQ,EAAE,CAAC,CAAC;YAEZ,oBAAC,sBAAsB,IAAC,IAAI,EAAE,IAAI,GAAI;YACtC,iCAAM,QAAQ,CAAO,CACjB,CACC,CACV,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DragAndDropElement } from "../types.js";
|
|
2
|
+
interface DragAndDropContextType {
|
|
3
|
+
activeItem: DragAndDropElement | null;
|
|
4
|
+
setActiveItem: (id: DragAndDropElement | null) => void;
|
|
5
|
+
dropTarget: DragAndDropElement | null;
|
|
6
|
+
setDropTarget: (id: DragAndDropElement | null) => void;
|
|
7
|
+
dragHandlerActive: DragAndDropElement | null;
|
|
8
|
+
setDragHandlerActive: (active: DragAndDropElement | null) => void;
|
|
9
|
+
onKeyboardDragEnd: (diff: number) => void;
|
|
10
|
+
onDragStart: (event: React.PointerEvent | React.MouseEvent, item: DragAndDropElement) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const DragAndDropProvider: import("react").FC<DragAndDropContextType & {
|
|
13
|
+
children: React.ReactNode;
|
|
14
|
+
ref?: never;
|
|
15
|
+
}>, useDragAndDropContext: <S extends boolean = true>(strict?: S | undefined) => S extends true ? DragAndDropContextType | undefined : DragAndDropContextType | undefined;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createStrictContext } from "../../../utils/helpers/index.js";
|
|
2
|
+
export const { Provider: DragAndDropProvider, useContext: useDragAndDropContext, } = createStrictContext({
|
|
3
|
+
errorMessage: "useDragAndDropContext must be used within a DragAndDropProvider",
|
|
4
|
+
name: "DragAndDropContext",
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=DragAndDrop.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DragAndDrop.context.js","sourceRoot":"","sources":["../../../../src/data/drag-and-drop/root/DragAndDrop.context.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAiB7D,MAAM,CAAC,MAAM,EACX,QAAQ,EAAE,mBAAmB,EAC7B,UAAU,EAAE,qBAAqB,GAClC,GAAG,mBAAmB,CAAqC;IAC1D,YAAY,EACV,iEAAiE;IACnE,IAAI,EAAE,oBAAoB;CAC3B,CAAC,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import DragAndDropItem, { DragAndDropItemProps } from "../item/DragAndDropItem.js";
|
|
3
|
+
interface DragAndDropProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children: any[];
|
|
5
|
+
setItems: React.Dispatch<React.SetStateAction<any[]>>;
|
|
6
|
+
}
|
|
7
|
+
interface DataDragAndDropRootComponent extends React.ForwardRefExoticComponent<DragAndDropProps & React.RefAttributes<HTMLDivElement>> {
|
|
8
|
+
/**
|
|
9
|
+
* @see 🏷️ {@link DragAndDropItemProps}
|
|
10
|
+
* * @example
|
|
11
|
+
* ```jsx
|
|
12
|
+
* <DragAndDrop>
|
|
13
|
+
* <DragAndDrop.Item id="1" index={0}>
|
|
14
|
+
* ...
|
|
15
|
+
* </DragAndDrop.Item>
|
|
16
|
+
* </DragAndDrop>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
Item: typeof DragAndDropItem;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* TODO
|
|
23
|
+
* setItems on root
|
|
24
|
+
* state : active element
|
|
25
|
+
* pointer over listener / state, onPointerEnter, onPointerLeave
|
|
26
|
+
* Overlay - Use floating component
|
|
27
|
+
* Keyboard navigation
|
|
28
|
+
* Handle - button, arrows also button
|
|
29
|
+
* UU - announce on drag start, item moved, drag end
|
|
30
|
+
*
|
|
31
|
+
* []
|
|
32
|
+
*/
|
|
33
|
+
declare const DragAndDrop: DataDragAndDropRootComponent;
|
|
34
|
+
export { DragAndDrop, DragAndDropItem };
|
|
35
|
+
export default DragAndDrop;
|
|
36
|
+
export type { DragAndDropItemProps, DragAndDropProps };
|