@navikt/ds-react 8.9.0 → 8.10.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/content/BaseAlertContent.js +4 -1
- package/cjs/alert/base-alert/content/BaseAlertContent.js.map +1 -1
- package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.d.ts +3 -0
- package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js +41 -20
- package/cjs/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js.map +1 -1
- package/cjs/data/drag-and-drop/item/DragAndDropItem.d.ts +7 -2
- package/cjs/data/drag-and-drop/item/DragAndDropItem.js +6 -8
- package/cjs/data/drag-and-drop/item/DragAndDropItem.js.map +1 -1
- package/cjs/data/drag-and-drop/root/DragAndDrop.context.d.ts +2 -1
- package/cjs/data/drag-and-drop/root/DragAndDrop.context.js.map +1 -1
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.d.ts +7 -30
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.js +124 -65
- package/cjs/data/drag-and-drop/root/DragAndDropRoot.js.map +1 -1
- package/cjs/data/drag-and-drop/types.d.ts +4 -0
- package/cjs/data/table/base-cell/DataTableBaseCell.d.ts +46 -0
- package/cjs/data/table/base-cell/DataTableBaseCell.js +63 -0
- package/cjs/data/table/base-cell/DataTableBaseCell.js.map +1 -0
- package/cjs/data/table/column-header/DataTableColumnHeader.d.ts +32 -0
- package/cjs/data/table/column-header/DataTableColumnHeader.js +108 -0
- package/cjs/data/table/column-header/DataTableColumnHeader.js.map +1 -0
- package/cjs/data/table/column-header/useTableColumnResize.js.map +1 -0
- package/cjs/data/table/empty-state/DataTableEmptyState.d.ts +6 -2
- package/cjs/data/table/empty-state/DataTableEmptyState.js +2 -2
- package/cjs/data/table/empty-state/DataTableEmptyState.js.map +1 -1
- package/cjs/data/table/helpers/selection/getMultipleSelectProps.d.ts +10 -10
- package/cjs/data/table/helpers/selection/getMultipleSelectProps.js +29 -28
- package/cjs/data/table/helpers/selection/getMultipleSelectProps.js.map +1 -1
- package/cjs/data/table/helpers/selection/getSingleSelectProps.d.ts +7 -5
- package/cjs/data/table/helpers/selection/getSingleSelectProps.js +8 -9
- package/cjs/data/table/helpers/selection/getSingleSelectProps.js.map +1 -1
- package/cjs/data/table/helpers/selection/selection.types.d.ts +44 -21
- package/cjs/data/table/hooks/useColumnOptions.d.ts +19 -0
- package/cjs/data/table/hooks/useColumnOptions.js +19 -0
- package/cjs/data/table/hooks/useColumnOptions.js.map +1 -0
- package/cjs/data/table/hooks/useTableExpansion.d.ts +26 -0
- package/cjs/data/table/hooks/useTableExpansion.js +68 -0
- package/cjs/data/table/hooks/useTableExpansion.js.map +1 -0
- package/cjs/data/table/hooks/useTableKeyboardNav.d.ts +2 -1
- package/cjs/data/table/hooks/useTableKeyboardNav.js +3 -1
- package/cjs/data/table/hooks/useTableKeyboardNav.js.map +1 -1
- package/cjs/data/table/hooks/useTableSelection.d.ts +14 -7
- package/cjs/data/table/hooks/useTableSelection.js +40 -27
- package/cjs/data/table/hooks/useTableSelection.js.map +1 -1
- package/cjs/data/table/hooks/useTableSort.d.ts +37 -0
- package/cjs/data/table/hooks/useTableSort.js +49 -0
- package/cjs/data/table/hooks/useTableSort.js.map +1 -0
- package/cjs/data/table/loading-state/DataTableLoadingState.d.ts +6 -2
- package/cjs/data/table/loading-state/DataTableLoadingState.js +2 -2
- package/cjs/data/table/loading-state/DataTableLoadingState.js.map +1 -1
- package/cjs/data/table/root/DataTable.types.d.ts +55 -4
- package/cjs/data/table/root/DataTableAuto.d.ts +97 -1
- package/cjs/data/table/root/DataTableAuto.js +92 -41
- package/cjs/data/table/root/DataTableAuto.js.map +1 -1
- package/cjs/data/table/root/DataTableRoot.context.d.ts +22 -1
- package/cjs/data/table/root/DataTableRoot.context.js +7 -1
- package/cjs/data/table/root/DataTableRoot.context.js.map +1 -1
- package/cjs/data/table/root/DataTableRoot.d.ts +0 -6
- package/cjs/data/table/root/DataTableRoot.js +5 -4
- package/cjs/data/table/root/DataTableRoot.js.map +1 -1
- package/cjs/data/table/tbody/DataTableTbody.js +7 -1
- package/cjs/data/table/tbody/DataTableTbody.js.map +1 -1
- package/cjs/data/table/td/DataTableTd.d.ts +3 -19
- package/cjs/data/table/td/DataTableTd.js +3 -5
- package/cjs/data/table/td/DataTableTd.js.map +1 -1
- package/cjs/data/table/tfoot/DataTableTfoot.js +3 -1
- package/cjs/data/table/tfoot/DataTableTfoot.js.map +1 -1
- package/cjs/data/table/th/DataTableTh.d.ts +3 -44
- package/cjs/data/table/th/DataTableTh.js +3 -54
- package/cjs/data/table/th/DataTableTh.js.map +1 -1
- package/cjs/data/table/thead/DataTableThead.js +2 -2
- package/cjs/data/table/thead/DataTableThead.js.map +1 -1
- package/cjs/data/table/tr/DataTableTr.d.ts +8 -0
- package/cjs/data/table/tr/DataTableTr.js +131 -9
- package/cjs/data/table/tr/DataTableTr.js.map +1 -1
- package/cjs/data/token-filter/FilterChip.d.ts +10 -0
- package/cjs/data/token-filter/FilterChip.js +65 -0
- package/cjs/data/token-filter/FilterChip.js.map +1 -0
- package/cjs/data/token-filter/TokenFilter.js +3 -10
- package/cjs/data/token-filter/TokenFilter.js.map +1 -1
- package/cjs/date/datepicker/hooks/useRangeDatepicker.js +1 -1
- package/cjs/date/datepicker/hooks/useRangeDatepicker.js.map +1 -1
- package/cjs/date/datepicker/parts/DatePicker.DayButton.js +3 -1
- package/cjs/date/datepicker/parts/DatePicker.DayButton.js.map +1 -1
- package/cjs/date/datepicker/parts/DatePicker.RDP.d.ts +1 -1
- package/cjs/date/datepicker/parts/DatePicker.RDP.js +26 -11
- package/cjs/date/datepicker/parts/DatePicker.RDP.js.map +1 -1
- package/cjs/date/monthpicker/parts/MonthPicker.Button.js +7 -5
- package/cjs/date/monthpicker/parts/MonthPicker.Button.js.map +1 -1
- package/cjs/date/monthpicker/parts/MonthPicker.Standalone.d.ts +1 -1
- package/cjs/dialog/popup/DialogPopupInternal.js +1 -1
- package/cjs/dialog/popup/DialogPopupInternal.js.map +1 -1
- package/cjs/form/checkbox/Checkbox.js +19 -33
- package/cjs/form/checkbox/Checkbox.js.map +1 -1
- package/cjs/form/checkbox/CheckboxGroup.context.d.ts +6 -0
- package/cjs/form/checkbox/CheckboxGroup.context.js +6 -0
- package/cjs/form/checkbox/CheckboxGroup.context.js.map +1 -0
- package/cjs/form/checkbox/CheckboxGroup.d.ts +0 -6
- package/cjs/form/checkbox/CheckboxGroup.js +8 -8
- package/cjs/form/checkbox/CheckboxGroup.js.map +1 -1
- package/cjs/form/checkbox/checkbox-input/CheckboxInput.d.ts +21 -0
- package/cjs/form/checkbox/checkbox-input/CheckboxInput.js +65 -0
- package/cjs/form/checkbox/checkbox-input/CheckboxInput.js.map +1 -0
- package/cjs/form/checkbox/types.d.ts +1 -1
- package/cjs/form/checkbox/useCheckbox.js +2 -2
- package/cjs/form/checkbox/useCheckbox.js.map +1 -1
- package/cjs/form/combobox/ComboboxWrapper.js +1 -3
- package/cjs/form/combobox/ComboboxWrapper.js.map +1 -1
- package/cjs/form/error-summary/ErrorSummary.js +1 -3
- package/cjs/form/error-summary/ErrorSummary.js.map +1 -1
- package/cjs/form/fieldset/Fieldset.d.ts +0 -4
- package/cjs/form/fieldset/Fieldset.js +5 -9
- package/cjs/form/fieldset/Fieldset.js.map +1 -1
- package/cjs/form/fieldset/useFieldset.d.ts +5 -3
- package/cjs/form/fieldset/useFieldset.js +9 -4
- package/cjs/form/fieldset/useFieldset.js.map +1 -1
- package/cjs/form/radio/Radio.js +9 -7
- package/cjs/form/radio/Radio.js.map +1 -1
- package/cjs/form/radio/RadioGroup.context.d.ts +8 -0
- package/cjs/form/radio/RadioGroup.context.js +6 -0
- package/cjs/form/radio/RadioGroup.context.js.map +1 -0
- package/cjs/form/radio/RadioGroup.d.ts +0 -8
- package/cjs/form/radio/RadioGroup.js +10 -10
- package/cjs/form/radio/RadioGroup.js.map +1 -1
- package/cjs/form/radio/radio-input/RadioInput.d.ts +19 -0
- package/cjs/{data/table/thead/DataTableThead.context.js → form/radio/radio-input/RadioInput.js} +19 -9
- package/cjs/form/radio/radio-input/RadioInput.js.map +1 -0
- package/cjs/form/radio/useRadio.js +2 -2
- package/cjs/form/radio/useRadio.js.map +1 -1
- package/cjs/form/search/Search.js +1 -3
- package/cjs/form/search/Search.js.map +1 -1
- package/cjs/inline-message/root/InlineMessage.js +2 -5
- package/cjs/inline-message/root/InlineMessage.js.map +1 -1
- package/cjs/modal/Modal.js +1 -3
- package/cjs/modal/Modal.js.map +1 -1
- package/cjs/modal/ModalUtils.js +1 -1
- package/cjs/modal/ModalUtils.js.map +1 -1
- package/cjs/primitives/box/Box.d.ts +1 -1
- package/cjs/process/Process.js +1 -5
- package/cjs/process/Process.js.map +1 -1
- package/cjs/tabs/useTabs.js +3 -7
- package/cjs/tabs/useTabs.js.map +1 -1
- package/cjs/timeline/Timeline.js +25 -62
- package/cjs/timeline/Timeline.js.map +1 -1
- package/cjs/timeline/TimelineRow.js +10 -14
- package/cjs/timeline/TimelineRow.js.map +1 -1
- package/cjs/timeline/hooks/TimelineKeyboardNavProvider.d.ts +16 -0
- package/cjs/timeline/hooks/TimelineKeyboardNavProvider.js +179 -0
- package/cjs/timeline/hooks/TimelineKeyboardNavProvider.js.map +1 -0
- package/cjs/timeline/hooks/usePeriodContext.d.ts +0 -1
- package/cjs/timeline/hooks/usePeriodContext.js +0 -1
- package/cjs/timeline/hooks/usePeriodContext.js.map +1 -1
- package/cjs/timeline/hooks/useRowContext.d.ts +0 -1
- package/cjs/timeline/hooks/useRowContext.js +0 -1
- package/cjs/timeline/hooks/useRowContext.js.map +1 -1
- package/cjs/timeline/hooks/useTimelineContext.d.ts +0 -4
- package/cjs/timeline/hooks/useTimelineContext.js +0 -4
- package/cjs/timeline/hooks/useTimelineContext.js.map +1 -1
- package/cjs/timeline/period/ClickablePeriod.js +6 -20
- package/cjs/timeline/period/ClickablePeriod.js.map +1 -1
- package/cjs/timeline/period/NonClickablePeriod.js +1 -1
- package/cjs/timeline/period/NonClickablePeriod.js.map +1 -1
- package/cjs/timeline/pin/PinInternal.js +9 -10
- package/cjs/timeline/pin/PinInternal.js.map +1 -1
- package/cjs/toggle-group/useToggleGroup.js +1 -1
- package/cjs/toggle-group/useToggleGroup.js.map +1 -1
- package/cjs/utils/components/HighlightText/HighlightText.js +1 -4
- package/cjs/utils/components/HighlightText/HighlightText.js.map +1 -1
- package/cjs/utils/components/dismissablelayer/DismissableLayer.js +1 -1
- package/cjs/utils/components/dismissablelayer/DismissableLayer.js.map +1 -1
- package/cjs/utils/helpers/create-strict-context.js +1 -1
- package/cjs/utils/helpers/create-strict-context.js.map +1 -1
- package/cjs/utils/hooks/useEventCallback.js +1 -1
- package/cjs/utils/hooks/useEventCallback.js.map +1 -1
- package/cjs/utils/hooks/useMedia.js +1 -1
- package/cjs/utils/hooks/useMedia.js.map +1 -1
- package/esm/alert/base-alert/content/BaseAlertContent.js +4 -1
- package/esm/alert/base-alert/content/BaseAlertContent.js.map +1 -1
- package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.d.ts +3 -0
- package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js +41 -20
- package/esm/data/drag-and-drop/drag-handler/DragAndDropDragHandler.js.map +1 -1
- package/esm/data/drag-and-drop/item/DragAndDropItem.d.ts +7 -2
- package/esm/data/drag-and-drop/item/DragAndDropItem.js +6 -8
- package/esm/data/drag-and-drop/item/DragAndDropItem.js.map +1 -1
- package/esm/data/drag-and-drop/root/DragAndDrop.context.d.ts +2 -1
- package/esm/data/drag-and-drop/root/DragAndDrop.context.js.map +1 -1
- package/esm/data/drag-and-drop/root/DragAndDropRoot.d.ts +7 -30
- package/esm/data/drag-and-drop/root/DragAndDropRoot.js +125 -66
- package/esm/data/drag-and-drop/root/DragAndDropRoot.js.map +1 -1
- package/esm/data/drag-and-drop/types.d.ts +4 -0
- package/esm/data/table/base-cell/DataTableBaseCell.d.ts +46 -0
- package/esm/data/table/base-cell/DataTableBaseCell.js +27 -0
- package/esm/data/table/base-cell/DataTableBaseCell.js.map +1 -0
- package/esm/data/table/column-header/DataTableColumnHeader.d.ts +32 -0
- package/esm/data/table/column-header/DataTableColumnHeader.js +72 -0
- package/esm/data/table/column-header/DataTableColumnHeader.js.map +1 -0
- package/esm/data/table/column-header/useTableColumnResize.js.map +1 -0
- package/esm/data/table/empty-state/DataTableEmptyState.d.ts +6 -2
- package/esm/data/table/empty-state/DataTableEmptyState.js +2 -2
- package/esm/data/table/empty-state/DataTableEmptyState.js.map +1 -1
- package/esm/data/table/helpers/selection/getMultipleSelectProps.d.ts +10 -10
- package/esm/data/table/helpers/selection/getMultipleSelectProps.js +29 -28
- package/esm/data/table/helpers/selection/getMultipleSelectProps.js.map +1 -1
- package/esm/data/table/helpers/selection/getSingleSelectProps.d.ts +7 -5
- package/esm/data/table/helpers/selection/getSingleSelectProps.js +8 -9
- package/esm/data/table/helpers/selection/getSingleSelectProps.js.map +1 -1
- package/esm/data/table/helpers/selection/selection.types.d.ts +44 -21
- package/esm/data/table/hooks/useColumnOptions.d.ts +19 -0
- package/esm/data/table/hooks/useColumnOptions.js +17 -0
- package/esm/data/table/hooks/useColumnOptions.js.map +1 -0
- package/esm/data/table/hooks/useTableExpansion.d.ts +26 -0
- package/esm/data/table/hooks/useTableExpansion.js +31 -0
- package/esm/data/table/hooks/useTableExpansion.js.map +1 -0
- package/esm/data/table/hooks/useTableKeyboardNav.d.ts +2 -1
- package/esm/data/table/hooks/useTableKeyboardNav.js +4 -2
- package/esm/data/table/hooks/useTableKeyboardNav.js.map +1 -1
- package/esm/data/table/hooks/useTableSelection.d.ts +14 -7
- package/esm/data/table/hooks/useTableSelection.js +40 -29
- package/esm/data/table/hooks/useTableSelection.js.map +1 -1
- package/esm/data/table/hooks/useTableSort.d.ts +37 -0
- package/esm/data/table/hooks/useTableSort.js +47 -0
- package/esm/data/table/hooks/useTableSort.js.map +1 -0
- package/esm/data/table/loading-state/DataTableLoadingState.d.ts +6 -2
- package/esm/data/table/loading-state/DataTableLoadingState.js +2 -2
- package/esm/data/table/loading-state/DataTableLoadingState.js.map +1 -1
- package/esm/data/table/root/DataTable.types.d.ts +55 -4
- package/esm/data/table/root/DataTableAuto.d.ts +97 -1
- package/esm/data/table/root/DataTableAuto.js +94 -43
- package/esm/data/table/root/DataTableAuto.js.map +1 -1
- package/esm/data/table/root/DataTableRoot.context.d.ts +22 -1
- package/esm/data/table/root/DataTableRoot.context.js +5 -1
- package/esm/data/table/root/DataTableRoot.context.js.map +1 -1
- package/esm/data/table/root/DataTableRoot.d.ts +0 -6
- package/esm/data/table/root/DataTableRoot.js +6 -5
- package/esm/data/table/root/DataTableRoot.js.map +1 -1
- package/esm/data/table/tbody/DataTableTbody.js +8 -2
- package/esm/data/table/tbody/DataTableTbody.js.map +1 -1
- package/esm/data/table/td/DataTableTd.d.ts +3 -19
- package/esm/data/table/td/DataTableTd.js +3 -5
- package/esm/data/table/td/DataTableTd.js.map +1 -1
- package/esm/data/table/tfoot/DataTableTfoot.js +3 -1
- package/esm/data/table/tfoot/DataTableTfoot.js.map +1 -1
- package/esm/data/table/th/DataTableTh.d.ts +3 -44
- package/esm/data/table/th/DataTableTh.js +4 -55
- package/esm/data/table/th/DataTableTh.js.map +1 -1
- package/esm/data/table/thead/DataTableThead.js +2 -2
- package/esm/data/table/thead/DataTableThead.js.map +1 -1
- package/esm/data/table/tr/DataTableTr.d.ts +8 -0
- package/esm/data/table/tr/DataTableTr.js +134 -12
- package/esm/data/table/tr/DataTableTr.js.map +1 -1
- package/esm/data/token-filter/FilterChip.d.ts +10 -0
- package/esm/data/token-filter/FilterChip.js +30 -0
- package/esm/data/token-filter/FilterChip.js.map +1 -0
- package/esm/data/token-filter/TokenFilter.js +3 -10
- package/esm/data/token-filter/TokenFilter.js.map +1 -1
- package/esm/date/datepicker/hooks/useRangeDatepicker.js +1 -1
- package/esm/date/datepicker/hooks/useRangeDatepicker.js.map +1 -1
- package/esm/date/datepicker/parts/DatePicker.DayButton.js +3 -1
- package/esm/date/datepicker/parts/DatePicker.DayButton.js.map +1 -1
- package/esm/date/datepicker/parts/DatePicker.RDP.d.ts +1 -1
- package/esm/date/datepicker/parts/DatePicker.RDP.js +27 -12
- package/esm/date/datepicker/parts/DatePicker.RDP.js.map +1 -1
- package/esm/date/monthpicker/parts/MonthPicker.Button.js +7 -5
- package/esm/date/monthpicker/parts/MonthPicker.Button.js.map +1 -1
- package/esm/date/monthpicker/parts/MonthPicker.Standalone.d.ts +1 -1
- package/esm/dialog/popup/DialogPopupInternal.js +1 -1
- package/esm/dialog/popup/DialogPopupInternal.js.map +1 -1
- package/esm/form/checkbox/Checkbox.js +19 -33
- package/esm/form/checkbox/Checkbox.js.map +1 -1
- package/esm/form/checkbox/CheckboxGroup.context.d.ts +6 -0
- package/esm/form/checkbox/CheckboxGroup.context.js +3 -0
- package/esm/form/checkbox/CheckboxGroup.context.js.map +1 -0
- package/esm/form/checkbox/CheckboxGroup.d.ts +0 -6
- package/esm/form/checkbox/CheckboxGroup.js +8 -8
- package/esm/form/checkbox/CheckboxGroup.js.map +1 -1
- package/esm/form/checkbox/checkbox-input/CheckboxInput.d.ts +21 -0
- package/esm/form/checkbox/checkbox-input/CheckboxInput.js +29 -0
- package/esm/form/checkbox/checkbox-input/CheckboxInput.js.map +1 -0
- package/esm/form/checkbox/types.d.ts +1 -1
- package/esm/form/checkbox/useCheckbox.js +1 -1
- package/esm/form/checkbox/useCheckbox.js.map +1 -1
- package/esm/form/combobox/ComboboxWrapper.js +1 -3
- package/esm/form/combobox/ComboboxWrapper.js.map +1 -1
- package/esm/form/error-summary/ErrorSummary.js +1 -3
- package/esm/form/error-summary/ErrorSummary.js.map +1 -1
- package/esm/form/fieldset/Fieldset.d.ts +0 -4
- package/esm/form/fieldset/Fieldset.js +5 -9
- package/esm/form/fieldset/Fieldset.js.map +1 -1
- package/esm/form/fieldset/useFieldset.d.ts +5 -3
- package/esm/form/fieldset/useFieldset.js +10 -5
- package/esm/form/fieldset/useFieldset.js.map +1 -1
- package/esm/form/radio/Radio.js +9 -7
- package/esm/form/radio/Radio.js.map +1 -1
- package/esm/form/radio/RadioGroup.context.d.ts +8 -0
- package/esm/form/radio/RadioGroup.context.js +3 -0
- package/esm/form/radio/RadioGroup.context.js.map +1 -0
- package/esm/form/radio/RadioGroup.d.ts +0 -8
- package/esm/form/radio/RadioGroup.js +9 -9
- package/esm/form/radio/RadioGroup.js.map +1 -1
- package/esm/form/radio/radio-input/RadioInput.d.ts +19 -0
- package/esm/form/radio/radio-input/RadioInput.js +19 -0
- package/esm/form/radio/radio-input/RadioInput.js.map +1 -0
- package/esm/form/radio/useRadio.js +1 -1
- package/esm/form/radio/useRadio.js.map +1 -1
- package/esm/form/search/Search.js +1 -3
- package/esm/form/search/Search.js.map +1 -1
- package/esm/inline-message/root/InlineMessage.js +2 -5
- package/esm/inline-message/root/InlineMessage.js.map +1 -1
- package/esm/modal/Modal.js +1 -3
- package/esm/modal/Modal.js.map +1 -1
- package/esm/modal/ModalUtils.js +1 -1
- package/esm/modal/ModalUtils.js.map +1 -1
- package/esm/primitives/box/Box.d.ts +1 -1
- package/esm/process/Process.js +1 -5
- package/esm/process/Process.js.map +1 -1
- package/esm/tabs/useTabs.js +3 -7
- package/esm/tabs/useTabs.js.map +1 -1
- package/esm/timeline/Timeline.js +26 -63
- package/esm/timeline/Timeline.js.map +1 -1
- package/esm/timeline/TimelineRow.js +10 -14
- package/esm/timeline/TimelineRow.js.map +1 -1
- package/esm/timeline/hooks/TimelineKeyboardNavProvider.d.ts +16 -0
- package/esm/timeline/hooks/TimelineKeyboardNavProvider.js +141 -0
- package/esm/timeline/hooks/TimelineKeyboardNavProvider.js.map +1 -0
- package/esm/timeline/hooks/usePeriodContext.d.ts +0 -1
- package/esm/timeline/hooks/usePeriodContext.js +0 -1
- package/esm/timeline/hooks/usePeriodContext.js.map +1 -1
- package/esm/timeline/hooks/useRowContext.d.ts +0 -1
- package/esm/timeline/hooks/useRowContext.js +0 -1
- package/esm/timeline/hooks/useRowContext.js.map +1 -1
- package/esm/timeline/hooks/useTimelineContext.d.ts +0 -4
- package/esm/timeline/hooks/useTimelineContext.js +0 -4
- package/esm/timeline/hooks/useTimelineContext.js.map +1 -1
- package/esm/timeline/period/ClickablePeriod.js +7 -21
- package/esm/timeline/period/ClickablePeriod.js.map +1 -1
- package/esm/timeline/period/NonClickablePeriod.js +1 -1
- package/esm/timeline/period/NonClickablePeriod.js.map +1 -1
- package/esm/timeline/pin/PinInternal.js +10 -11
- package/esm/timeline/pin/PinInternal.js.map +1 -1
- package/esm/toggle-group/useToggleGroup.js +1 -1
- package/esm/toggle-group/useToggleGroup.js.map +1 -1
- package/esm/utils/components/HighlightText/HighlightText.js +1 -4
- package/esm/utils/components/HighlightText/HighlightText.js.map +1 -1
- package/esm/utils/components/dismissablelayer/DismissableLayer.js +1 -1
- package/esm/utils/components/dismissablelayer/DismissableLayer.js.map +1 -1
- package/esm/utils/helpers/create-strict-context.js +1 -1
- package/esm/utils/helpers/create-strict-context.js.map +1 -1
- package/esm/utils/hooks/useEventCallback.js +1 -1
- package/esm/utils/hooks/useEventCallback.js.map +1 -1
- package/esm/utils/hooks/useMedia.js +1 -1
- package/esm/utils/hooks/useMedia.js.map +1 -1
- package/package.json +9 -7
- package/src/alert/base-alert/content/BaseAlertContent.tsx +7 -2
- package/src/data/drag-and-drop/drag-handler/DragAndDropDragHandler.tsx +73 -29
- package/src/data/drag-and-drop/item/DragAndDropItem.tsx +28 -18
- package/src/data/drag-and-drop/root/DragAndDrop.context.tsx +4 -2
- package/src/data/drag-and-drop/root/DragAndDropRoot.tsx +303 -209
- package/src/data/drag-and-drop/types.ts +5 -0
- package/src/data/table/base-cell/DataTableBaseCell.tsx +92 -0
- package/src/data/table/column-header/DataTableColumnHeader.tsx +180 -0
- package/src/data/table/empty-state/DataTableEmptyState.tsx +5 -3
- package/src/data/table/helpers/selection/getMultipleSelectProps.ts +49 -45
- package/src/data/table/helpers/selection/getSingleSelectProps.ts +15 -13
- package/src/data/table/helpers/selection/selection.types.ts +46 -21
- package/src/data/table/hooks/__tests__/useTableSelection.test.ts +93 -56
- package/src/data/table/hooks/useColumnOptions.ts +48 -0
- package/src/data/table/hooks/useTableExpansion.tsx +100 -0
- package/src/data/table/hooks/useTableKeyboardNav.ts +7 -5
- package/src/data/table/hooks/useTableSelection.ts +77 -46
- package/src/data/table/hooks/useTableSort.ts +103 -0
- package/src/data/table/loading-state/DataTableLoadingState.tsx +5 -3
- package/src/data/table/root/DataTable.types.ts +64 -5
- package/src/data/table/root/DataTableAuto.tsx +383 -95
- package/src/data/table/root/DataTableRoot.context.ts +30 -1
- package/src/data/table/root/DataTableRoot.tsx +14 -11
- package/src/data/table/tbody/DataTableTbody.tsx +17 -6
- package/src/data/table/td/DataTableTd.tsx +10 -33
- package/src/data/table/tfoot/DataTableTfoot.tsx +10 -7
- package/src/data/table/th/DataTableTh.tsx +11 -172
- package/src/data/table/thead/DataTableThead.tsx +3 -3
- package/src/data/table/tr/DataTableTr.tsx +300 -11
- package/src/data/token-filter/FilterChip.tsx +100 -0
- package/src/data/token-filter/TokenFilter.tsx +8 -24
- package/src/date/datepicker/hooks/useRangeDatepicker.tsx +1 -1
- package/src/date/datepicker/parts/DatePicker.DayButton.tsx +2 -1
- package/src/date/datepicker/parts/DatePicker.RDP.tsx +34 -15
- package/src/date/monthpicker/parts/MonthPicker.Button.tsx +11 -9
- package/src/date/monthpicker/parts/MonthPicker.Standalone.tsx +1 -1
- package/src/dialog/popup/DialogPopupInternal.tsx +1 -1
- package/src/form/checkbox/Checkbox.tsx +37 -64
- package/src/form/checkbox/CheckboxGroup.context.ts +10 -0
- package/src/form/checkbox/CheckboxGroup.tsx +18 -28
- package/src/form/checkbox/checkbox-input/CheckboxInput.tsx +69 -0
- package/src/form/checkbox/types.ts +1 -1
- package/src/form/checkbox/useCheckbox.ts +1 -1
- package/src/form/fieldset/Fieldset.tsx +8 -14
- package/src/form/fieldset/useFieldset.ts +13 -6
- package/src/form/radio/Radio.tsx +43 -38
- package/src/form/radio/RadioGroup.context.ts +13 -0
- package/src/form/radio/RadioGroup.tsx +22 -31
- package/src/form/radio/radio-input/RadioInput.tsx +32 -0
- package/src/form/radio/useRadio.ts +1 -1
- package/src/inline-message/root/InlineMessage.tsx +3 -13
- package/src/modal/ModalUtils.ts +1 -1
- package/src/primitives/box/Box.tsx +1 -1
- package/src/tabs/useTabs.ts +3 -7
- package/src/timeline/Timeline.tsx +62 -91
- package/src/timeline/TimelineRow.tsx +19 -17
- package/src/timeline/hooks/TimelineKeyboardNavProvider.tsx +237 -0
- package/src/timeline/hooks/usePeriodContext.tsx +0 -2
- package/src/timeline/hooks/useRowContext.tsx +0 -2
- package/src/timeline/hooks/useTimelineContext.tsx +0 -8
- package/src/timeline/period/ClickablePeriod.tsx +8 -19
- package/src/timeline/period/NonClickablePeriod.tsx +2 -0
- package/src/timeline/pin/PinInternal.tsx +10 -13
- package/src/toggle-group/useToggleGroup.ts +1 -1
- package/src/utils/components/dismissablelayer/DismissableLayer.tsx +1 -1
- package/src/utils/helpers/create-strict-context.tsx +1 -1
- package/src/utils/hooks/useEventCallback.ts +1 -1
- package/src/utils/hooks/useMedia.ts +1 -1
- package/cjs/data/table/th/DataTableThActions.d.ts +0 -5
- package/cjs/data/table/th/DataTableThActions.js +0 -23
- package/cjs/data/table/th/DataTableThActions.js.map +0 -1
- package/cjs/data/table/th/useTableColumnResize.js.map +0 -1
- package/cjs/data/table/thead/DataTableThead.context.d.ts +0 -4
- package/cjs/data/table/thead/DataTableThead.context.js.map +0 -1
- package/esm/data/table/th/DataTableThActions.d.ts +0 -5
- package/esm/data/table/th/DataTableThActions.js +0 -18
- package/esm/data/table/th/DataTableThActions.js.map +0 -1
- package/esm/data/table/th/useTableColumnResize.js.map +0 -1
- package/esm/data/table/thead/DataTableThead.context.d.ts +0 -4
- package/esm/data/table/thead/DataTableThead.context.js +0 -8
- package/esm/data/table/thead/DataTableThead.context.js.map +0 -1
- package/src/data/table/th/DataTableThActions.tsx +0 -32
- package/src/data/table/thead/DataTableThead.context.ts +0 -10
- /package/cjs/data/table/{th → column-header}/useTableColumnResize.d.ts +0 -0
- /package/cjs/data/table/{th → column-header}/useTableColumnResize.js +0 -0
- /package/esm/data/table/{th → column-header}/useTableColumnResize.d.ts +0 -0
- /package/esm/data/table/{th → column-header}/useTableColumnResize.js +0 -0
- /package/src/data/table/{th → column-header}/useTableColumnResize.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/ds-react",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"description": "React components from the Norwegian Labour and Welfare Administration.",
|
|
5
5
|
"author": "Aksel, a team part of the Norwegian Labour and Welfare Administration.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -698,24 +698,26 @@
|
|
|
698
698
|
"clean": "rimraf cjs esm",
|
|
699
699
|
"build": "yarn i18n-jsdoc && concurrently \"tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json\" \"tsc -p tsconfig.esm.json && tsc-alias -p tsconfig.esm.json && yarn write-packagejson\" && yarn i18n-jsdoc --cleanup && yarn copy-types",
|
|
700
700
|
"watch": "tsc --watch -p tsconfig.esm.json",
|
|
701
|
-
"test": "TZ=UTC vitest run -c tests/vitest.config.ts",
|
|
701
|
+
"test": "concurrently \"TZ=UTC vitest run -c tests/vitest.config.ts\" \"yarn test-sb-build\"",
|
|
702
|
+
"test-sb-build": "tsc -p tsconfig.sb.json",
|
|
702
703
|
"test:watch": "TZ=UTC vitest watch -c tests/vitest.config.ts",
|
|
703
704
|
"copy-types": "copyfiles -f ./src/types/theme.d.ts ./esm/types"
|
|
704
705
|
},
|
|
705
706
|
"dependencies": {
|
|
706
707
|
"@floating-ui/react": "0.27.8",
|
|
707
708
|
"@floating-ui/react-dom": "^2.1.8",
|
|
708
|
-
"@navikt/aksel-icons": "^8.
|
|
709
|
-
"@navikt/ds-tokens": "^8.
|
|
709
|
+
"@navikt/aksel-icons": "^8.10.0",
|
|
710
|
+
"@navikt/ds-tokens": "^8.10.0",
|
|
710
711
|
"date-fns": "^4.0.0",
|
|
711
|
-
"react-day-picker": "9.
|
|
712
|
+
"react-day-picker": "9.14.0"
|
|
712
713
|
},
|
|
713
714
|
"devDependencies": {
|
|
714
715
|
"@testing-library/dom": "10.4.1",
|
|
715
716
|
"@testing-library/jest-dom": "^6.6.3",
|
|
716
717
|
"@testing-library/react": "^16.3.0",
|
|
717
718
|
"@testing-library/user-event": "^14.5.2",
|
|
718
|
-
"@types/jscodeshift": "
|
|
719
|
+
"@types/jscodeshift": "17.3.0",
|
|
720
|
+
"@types/node": "^24.10.9",
|
|
719
721
|
"@types/react": "19.2.14",
|
|
720
722
|
"@types/react-dom": "19.2.3",
|
|
721
723
|
"aksel": "workspace:^",
|
|
@@ -731,7 +733,7 @@
|
|
|
731
733
|
"swr": "^2.3.6",
|
|
732
734
|
"tsc-alias": "1.8.16",
|
|
733
735
|
"tsx": "^4.20.6",
|
|
734
|
-
"typescript": "
|
|
736
|
+
"typescript": "6.0.2",
|
|
735
737
|
"vitest": "4.1.0"
|
|
736
738
|
},
|
|
737
739
|
"peerDependencies": {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import { useThemeInternal } from "../../../theme/Theme";
|
|
3
|
+
import { BodyLong } from "../../../typography";
|
|
3
4
|
import { cl } from "../../../utils/helpers";
|
|
5
|
+
import { useBaseAlert } from "../root/BaseAlertRoot.context";
|
|
4
6
|
|
|
5
7
|
interface BaseAlertContentProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
8
|
children: React.ReactNode;
|
|
@@ -25,16 +27,19 @@ const BaseAlertContent = forwardRef<HTMLDivElement, BaseAlertContentProps>(
|
|
|
25
27
|
forwardedRef,
|
|
26
28
|
) => {
|
|
27
29
|
const themeContext = useThemeInternal();
|
|
30
|
+
const { size } = useBaseAlert();
|
|
28
31
|
|
|
29
32
|
return (
|
|
30
|
-
<
|
|
33
|
+
<BodyLong
|
|
34
|
+
as="div"
|
|
31
35
|
ref={forwardedRef}
|
|
32
36
|
data-color={themeContext?.color}
|
|
37
|
+
size={size}
|
|
33
38
|
{...restProps}
|
|
34
39
|
className={cl(className, "aksel-base-alert__content")}
|
|
35
40
|
>
|
|
36
41
|
{children}
|
|
37
|
-
</
|
|
42
|
+
</BodyLong>
|
|
38
43
|
);
|
|
39
44
|
},
|
|
40
45
|
);
|
|
@@ -9,6 +9,9 @@ import { DragAndDropElement } from "../types";
|
|
|
9
9
|
|
|
10
10
|
export interface DragAndDropDragHandlerProps {
|
|
11
11
|
item: DragAndDropElement;
|
|
12
|
+
itemRef: React.RefObject<HTMLLIElement | null>;
|
|
13
|
+
isOverlay: boolean;
|
|
14
|
+
itemLabel: string;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
/**
|
|
@@ -20,70 +23,111 @@ export interface DragAndDropDragHandlerProps {
|
|
|
20
23
|
export const DragAndDropDragHandler = React.forwardRef<
|
|
21
24
|
HTMLDivElement,
|
|
22
25
|
DragAndDropDragHandlerProps
|
|
23
|
-
>(({ item }, forwardedRef) => {
|
|
26
|
+
>(({ item, itemRef, isOverlay, itemLabel }, forwardedRef) => {
|
|
24
27
|
const context = useDragAndDropContext();
|
|
25
|
-
const active =
|
|
28
|
+
const active =
|
|
29
|
+
context?.dragHandlerActive &&
|
|
30
|
+
item &&
|
|
31
|
+
context?.dragHandlerActive?.id === item.id;
|
|
32
|
+
|
|
33
|
+
if (isOverlay) {
|
|
34
|
+
// Render a simple drag icon for the overlay, which is used as a visual representation of the item being dragged
|
|
35
|
+
return (
|
|
36
|
+
<div
|
|
37
|
+
className="aksel-data-drag-and-drop__drag-handler"
|
|
38
|
+
ref={forwardedRef}
|
|
39
|
+
aria-hidden
|
|
40
|
+
>
|
|
41
|
+
<DragVerticalIcon fontSize="1.5rem" />
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
26
45
|
|
|
27
46
|
return (
|
|
28
47
|
<div className="aksel-data-drag-and-drop__drag-handler" ref={forwardedRef}>
|
|
29
48
|
{active && (
|
|
30
|
-
<
|
|
49
|
+
<button
|
|
31
50
|
className="aksel-data-drag-and-drop__drag-handler__arrow"
|
|
32
51
|
data-direction="up"
|
|
52
|
+
onClick={() => context?.onKeyboardDragEnd(-1)}
|
|
53
|
+
onMouseDown={(e) => e.preventDefault()}
|
|
54
|
+
disabled={context?.dragHandlerActive?.index === 0}
|
|
55
|
+
type="button"
|
|
33
56
|
>
|
|
34
|
-
<CaretUpCircleFillIcon aria-hidden fontSize="1.
|
|
35
|
-
</
|
|
57
|
+
<CaretUpCircleFillIcon aria-hidden fontSize="1.8rem" />
|
|
58
|
+
</button>
|
|
36
59
|
)}
|
|
37
60
|
<button
|
|
38
|
-
|
|
61
|
+
// TODO - Bedre formulering av aria-label?
|
|
62
|
+
//aria-label={`Flytt element ${item.index + 1}. Trykk Enter eller Mellomrom for å aktivere, deretter piltastene for å flytte elementet.`}
|
|
63
|
+
aria-label={
|
|
64
|
+
active
|
|
65
|
+
? `Flytt element ${itemLabel || item.index + 1}. Bruk piltastene for å flytte elementet.`
|
|
66
|
+
: `Flytt element ${itemLabel || item.index + 1}. Trykk Enter eller Mellomrom for å aktivere flytting.`
|
|
67
|
+
}
|
|
68
|
+
aria-pressed={Boolean(active)}
|
|
69
|
+
aria-roledescription="draggable"
|
|
70
|
+
type="button"
|
|
39
71
|
className="aksel-data-drag-and-drop__drag-handler__button"
|
|
40
72
|
data-drag-handler-active={active}
|
|
41
73
|
onPointerDown={(event) => {
|
|
74
|
+
if (active) return;
|
|
42
75
|
event.stopPropagation();
|
|
43
|
-
context?.
|
|
76
|
+
context?.startPendingDrag(event, item, itemRef?.current || null);
|
|
77
|
+
}}
|
|
78
|
+
onClick={(event) => {
|
|
79
|
+
if (!active) {
|
|
80
|
+
context?.setDragHandlerActive(item);
|
|
81
|
+
event.currentTarget.focus();
|
|
82
|
+
} else {
|
|
83
|
+
context?.setDragHandlerActive(null);
|
|
84
|
+
}
|
|
44
85
|
}}
|
|
45
|
-
|
|
86
|
+
onBlur={() => context?.setDragHandlerActive(null)}
|
|
46
87
|
onKeyDown={(event) => {
|
|
47
|
-
if (
|
|
48
|
-
(event.key === "Enter" || event.key === " ") &&
|
|
49
|
-
context?.dragHandlerActive
|
|
50
|
-
) {
|
|
88
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
51
89
|
// Enter or space, currently active item - end keyboard dragging
|
|
52
90
|
event.preventDefault();
|
|
53
|
-
context?.setDragHandlerActive(null);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
)
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
context?.setDragHandlerActive(item);
|
|
61
|
-
} else if (event.key === "Escape") {
|
|
91
|
+
context?.setDragHandlerActive(active ? null : item);
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (!active) return;
|
|
96
|
+
|
|
97
|
+
if (event.key === "Escape") {
|
|
62
98
|
// Cancel dragging
|
|
63
99
|
// TODO Handle reset
|
|
100
|
+
event.preventDefault();
|
|
64
101
|
context?.setDragHandlerActive(null);
|
|
102
|
+
return;
|
|
65
103
|
} else if (event.key === "ArrowUp") {
|
|
66
104
|
// Move item up
|
|
105
|
+
event.preventDefault();
|
|
67
106
|
context?.onKeyboardDragEnd(-1);
|
|
107
|
+
return;
|
|
68
108
|
} else if (event.key === "ArrowDown") {
|
|
69
109
|
// Move item down
|
|
110
|
+
event.preventDefault();
|
|
70
111
|
context?.onKeyboardDragEnd(1);
|
|
112
|
+
return;
|
|
71
113
|
}
|
|
72
114
|
}}
|
|
73
115
|
>
|
|
74
|
-
<DragVerticalIcon
|
|
75
|
-
aria-hidden
|
|
76
|
-
title="Dra for å flytte"
|
|
77
|
-
fontSize="1.5rem"
|
|
78
|
-
/>
|
|
116
|
+
<DragVerticalIcon aria-hidden fontSize="1.5rem" />
|
|
79
117
|
</button>
|
|
80
118
|
{active && (
|
|
81
|
-
<
|
|
119
|
+
<button
|
|
82
120
|
className="aksel-data-drag-and-drop__drag-handler__arrow"
|
|
83
121
|
data-direction="down"
|
|
122
|
+
type="button"
|
|
123
|
+
onClick={() => context?.onKeyboardDragEnd(1)}
|
|
124
|
+
onMouseDown={(e) => e.preventDefault()}
|
|
125
|
+
disabled={
|
|
126
|
+
context?.dragHandlerActive?.index === context?.itemAmount - 1
|
|
127
|
+
}
|
|
84
128
|
>
|
|
85
|
-
<CaretDownCircleFillIcon aria-hidden fontSize="1.
|
|
86
|
-
</
|
|
129
|
+
<CaretDownCircleFillIcon aria-hidden fontSize="1.8rem" />
|
|
130
|
+
</button>
|
|
87
131
|
)}
|
|
88
132
|
</div>
|
|
89
133
|
);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { HStack } from "../../../primitives/stack";
|
|
3
3
|
import { cl } from "../../../utils/helpers";
|
|
4
|
+
import { useMergeRefs } from "../../../utils/hooks";
|
|
4
5
|
import { DragAndDropDragHandler } from "../drag-handler/DragAndDropDragHandler";
|
|
5
6
|
import { useDragAndDropContext } from "../root/DragAndDrop.context";
|
|
6
7
|
|
|
7
|
-
interface DragAndDropItemProps extends React.HTMLAttributes<
|
|
8
|
+
interface DragAndDropItemProps extends React.HTMLAttributes<HTMLLIElement> {
|
|
8
9
|
children: React.ReactNode;
|
|
9
10
|
/**
|
|
10
11
|
* Unique id
|
|
@@ -14,6 +15,11 @@ interface DragAndDropItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
14
15
|
* Index of the item being dragged
|
|
15
16
|
*/
|
|
16
17
|
index: number;
|
|
18
|
+
/**
|
|
19
|
+
* Indicates if the item is an overlay
|
|
20
|
+
*/
|
|
21
|
+
isOverlay?: boolean;
|
|
22
|
+
itemLabel: string;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
/**
|
|
@@ -27,9 +33,13 @@ interface DragAndDropItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
27
33
|
* </DragAndDrop.Item>
|
|
28
34
|
* ```
|
|
29
35
|
*/
|
|
30
|
-
const DragAndDropItem = React.forwardRef<
|
|
31
|
-
(
|
|
32
|
-
|
|
36
|
+
const DragAndDropItem = React.forwardRef<HTMLLIElement, DragAndDropItemProps>(
|
|
37
|
+
(
|
|
38
|
+
{ children, id, index, className, isOverlay = false, itemLabel, ...rest },
|
|
39
|
+
forwardedRef,
|
|
40
|
+
) => {
|
|
41
|
+
const ref = React.useRef<HTMLLIElement>(null);
|
|
42
|
+
const mergedRef = useMergeRefs(forwardedRef, ref);
|
|
33
43
|
const context = useDragAndDropContext();
|
|
34
44
|
const item = { id, index };
|
|
35
45
|
const isDropTarget = context?.dropTarget?.id === id;
|
|
@@ -40,27 +50,27 @@ const DragAndDropItem = React.forwardRef<HTMLDivElement, DragAndDropItemProps>(
|
|
|
40
50
|
align="center"
|
|
41
51
|
wrap={false}
|
|
42
52
|
asChild
|
|
43
|
-
ref={forwardedRef}
|
|
44
53
|
padding="space-4"
|
|
45
54
|
>
|
|
46
55
|
{/* TODO Should this be a <li>? */}
|
|
47
|
-
<
|
|
48
|
-
id={id}
|
|
49
|
-
ref={ref}
|
|
56
|
+
<li
|
|
57
|
+
id={isOverlay ? undefined : id}
|
|
50
58
|
{...rest}
|
|
51
|
-
|
|
52
|
-
data-dnd-
|
|
53
|
-
|
|
59
|
+
ref={mergedRef}
|
|
60
|
+
data-dnd-id={isOverlay ? undefined : id}
|
|
61
|
+
data-dnd-index={isOverlay ? undefined : index}
|
|
54
62
|
className={cl("aksel-data-table__drag-and-drop-item", className)}
|
|
55
|
-
data-drop-target={isDropTarget}
|
|
56
|
-
|
|
57
|
-
data-keyboard-dragging={keyboardDragging}
|
|
58
|
-
*/
|
|
59
|
-
tabIndex={-1}
|
|
63
|
+
data-drop-target={isOverlay ? undefined : isDropTarget}
|
|
64
|
+
data-overlay={isOverlay}
|
|
60
65
|
>
|
|
61
|
-
<DragAndDropDragHandler
|
|
66
|
+
<DragAndDropDragHandler
|
|
67
|
+
item={item}
|
|
68
|
+
itemRef={ref}
|
|
69
|
+
isOverlay={isOverlay}
|
|
70
|
+
itemLabel={itemLabel}
|
|
71
|
+
/>
|
|
62
72
|
<div>{children}</div>
|
|
63
|
-
</
|
|
73
|
+
</li>
|
|
64
74
|
</HStack>
|
|
65
75
|
);
|
|
66
76
|
},
|
|
@@ -9,10 +9,12 @@ interface DragAndDropContextType {
|
|
|
9
9
|
dragHandlerActive: DragAndDropElement | null;
|
|
10
10
|
setDragHandlerActive: (active: DragAndDropElement | null) => void;
|
|
11
11
|
onKeyboardDragEnd: (diff: number) => void;
|
|
12
|
-
|
|
13
|
-
event: React.PointerEvent
|
|
12
|
+
startPendingDrag: (
|
|
13
|
+
event: React.PointerEvent,
|
|
14
14
|
item: DragAndDropElement,
|
|
15
|
+
element?: HTMLElement | null,
|
|
15
16
|
) => void;
|
|
17
|
+
itemAmount: number;
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
export const {
|