@vuu-ui/vuu-ui-controls 2.1.19-beta.2 → 2.1.19-beta.4
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/calendar/Calendar.css.js +6 -0
- package/cjs/calendar/Calendar.css.js.map +1 -0
- package/cjs/calendar/Calendar.js +93 -0
- package/cjs/calendar/Calendar.js.map +1 -0
- package/cjs/calendar/internal/CalendarCarousel.css.js +6 -0
- package/cjs/calendar/internal/CalendarCarousel.css.js.map +1 -0
- package/cjs/calendar/internal/CalendarCarousel.js +75 -0
- package/cjs/calendar/internal/CalendarCarousel.js.map +1 -0
- package/cjs/calendar/internal/CalendarContext.js +19 -0
- package/cjs/calendar/internal/CalendarContext.js.map +1 -0
- package/cjs/calendar/internal/CalendarDay.css.js +6 -0
- package/cjs/calendar/internal/CalendarDay.css.js.map +1 -0
- package/cjs/calendar/internal/CalendarDay.js +86 -0
- package/cjs/calendar/internal/CalendarDay.js.map +1 -0
- package/cjs/calendar/internal/CalendarMonth.css.js +6 -0
- package/cjs/calendar/internal/CalendarMonth.css.js.map +1 -0
- package/cjs/calendar/internal/CalendarMonth.js +71 -0
- package/cjs/calendar/internal/CalendarMonth.js.map +1 -0
- package/cjs/calendar/internal/CalendarNavigation.css.js +6 -0
- package/cjs/calendar/internal/CalendarNavigation.css.js.map +1 -0
- package/cjs/calendar/internal/CalendarNavigation.js +236 -0
- package/cjs/calendar/internal/CalendarNavigation.js.map +1 -0
- package/cjs/calendar/internal/CalendarWeekHeader.css.js +6 -0
- package/cjs/calendar/internal/CalendarWeekHeader.css.js.map +1 -0
- package/cjs/calendar/internal/CalendarWeekHeader.js +43 -0
- package/cjs/calendar/internal/CalendarWeekHeader.js.map +1 -0
- package/cjs/calendar/internal/useFocusManagement.js +66 -0
- package/cjs/calendar/internal/useFocusManagement.js.map +1 -0
- package/cjs/calendar/internal/utils.js +64 -0
- package/cjs/calendar/internal/utils.js.map +1 -0
- package/cjs/calendar/useCalendar.js +163 -0
- package/cjs/calendar/useCalendar.js.map +1 -0
- package/cjs/calendar/useCalendarDay.js +80 -0
- package/cjs/calendar/useCalendarDay.js.map +1 -0
- package/cjs/calendar/useSelection.js +248 -0
- package/cjs/calendar/useSelection.js.map +1 -0
- package/cjs/column-picker/ColumnPicker.css.js +6 -0
- package/cjs/column-picker/ColumnPicker.css.js.map +1 -0
- package/cjs/column-picker/ColumnPicker.js +128 -0
- package/cjs/column-picker/ColumnPicker.js.map +1 -0
- package/cjs/column-picker/ColumnSearch.css.js +6 -0
- package/cjs/column-picker/ColumnSearch.css.js.map +1 -0
- package/cjs/column-picker/ColumnSearch.js +82 -0
- package/cjs/column-picker/ColumnSearch.js.map +1 -0
- package/cjs/common-hooks/selectionTypes.js +18 -0
- package/cjs/common-hooks/selectionTypes.js.map +1 -0
- package/cjs/common-hooks/use-resize-observer.js +123 -0
- package/cjs/common-hooks/use-resize-observer.js.map +1 -0
- package/cjs/common-hooks/useControlled.js +58 -0
- package/cjs/common-hooks/useControlled.js.map +1 -0
- package/cjs/context-panel-provider/ContextPanelProvider.js +99 -0
- package/cjs/context-panel-provider/ContextPanelProvider.js.map +1 -0
- package/cjs/cycle-state-button/CycleStateButton.js +50 -0
- package/cjs/cycle-state-button/CycleStateButton.js.map +1 -0
- package/cjs/date-input/DateInput.css.js +6 -0
- package/cjs/date-input/DateInput.css.js.map +1 -0
- package/cjs/date-input/DateInput.js +277 -0
- package/cjs/date-input/DateInput.js.map +1 -0
- package/cjs/date-picker/DatePicker.js +169 -0
- package/cjs/date-picker/DatePicker.js.map +1 -0
- package/cjs/date-picker/DatePickerContext.js +26 -0
- package/cjs/date-picker/DatePickerContext.js.map +1 -0
- package/cjs/date-picker/DatePickerPanel.css.js +6 -0
- package/cjs/date-picker/DatePickerPanel.css.js.map +1 -0
- package/cjs/date-picker/DatePickerPanel.js +146 -0
- package/cjs/date-picker/DatePickerPanel.js.map +1 -0
- package/cjs/drag-drop/DragDropProvider.js +145 -0
- package/cjs/drag-drop/DragDropProvider.js.map +1 -0
- package/cjs/drag-drop/DragDropState.js +36 -0
- package/cjs/drag-drop/DragDropState.js.map +1 -0
- package/cjs/drag-drop/Draggable.css.js +6 -0
- package/cjs/drag-drop/Draggable.css.js.map +1 -0
- package/cjs/drag-drop/Draggable.js +90 -0
- package/cjs/drag-drop/Draggable.js.map +1 -0
- package/cjs/drag-drop/dragDropTypes.js +8 -0
- package/cjs/drag-drop/dragDropTypes.js.map +1 -0
- package/cjs/drag-drop/drop-target-utils.js +245 -0
- package/cjs/drag-drop/drop-target-utils.js.map +1 -0
- package/cjs/drag-drop/useAutoScroll.js +71 -0
- package/cjs/drag-drop/useAutoScroll.js.map +1 -0
- package/cjs/drag-drop/useDragDisplacers.js +160 -0
- package/cjs/drag-drop/useDragDisplacers.js.map +1 -0
- package/cjs/drag-drop/useDragDrop.js +504 -0
- package/cjs/drag-drop/useDragDrop.js.map +1 -0
- package/cjs/drag-drop/useDragDropCopy.js +34 -0
- package/cjs/drag-drop/useDragDropCopy.js.map +1 -0
- package/cjs/drag-drop/useDragDropIndicator.js +251 -0
- package/cjs/drag-drop/useDragDropIndicator.js.map +1 -0
- package/cjs/drag-drop/useDragDropNaturalMovement.js +265 -0
- package/cjs/drag-drop/useDragDropNaturalMovement.js.map +1 -0
- package/cjs/drag-drop/useDropIndicator.js +27 -0
- package/cjs/drag-drop/useDropIndicator.js.map +1 -0
- package/cjs/drag-drop/useGlobalDragDrop.js +89 -0
- package/cjs/drag-drop/useGlobalDragDrop.js.map +1 -0
- package/cjs/editable/useEditableText.js +211 -0
- package/cjs/editable/useEditableText.js.map +1 -0
- package/cjs/editable-label/EditableLabel.css.js +6 -0
- package/cjs/editable-label/EditableLabel.css.js.map +1 -0
- package/cjs/editable-label/EditableLabel.js +143 -0
- package/cjs/editable-label/EditableLabel.js.map +1 -0
- package/cjs/expando-input/ExpandoInput.css.js +6 -0
- package/cjs/expando-input/ExpandoInput.css.js.map +1 -0
- package/cjs/expando-input/ExpandoInput.js +53 -0
- package/cjs/expando-input/ExpandoInput.js.map +1 -0
- package/cjs/hover-overlay/HoverOverlay.js +96 -0
- package/cjs/hover-overlay/HoverOverlay.js.map +1 -0
- package/cjs/icon-button/Icon.css.js +6 -0
- package/cjs/icon-button/Icon.css.js.map +1 -0
- package/cjs/icon-button/Icon.js +37 -0
- package/cjs/icon-button/Icon.js.map +1 -0
- package/cjs/icon-button/IconButton.css.js +6 -0
- package/cjs/icon-button/IconButton.css.js.map +1 -0
- package/cjs/icon-button/IconButton.js +26 -0
- package/cjs/icon-button/IconButton.js.map +1 -0
- package/cjs/icon-button/ToggleIconButton.css.js +6 -0
- package/cjs/icon-button/ToggleIconButton.css.js.map +1 -0
- package/cjs/icon-button/ToggleIconButton.js +39 -0
- package/cjs/icon-button/ToggleIconButton.js.map +1 -0
- package/cjs/index.js +170 -0
- package/cjs/index.js.map +1 -0
- package/cjs/instrument-picker/TablePicker.css.js +6 -0
- package/cjs/instrument-picker/TablePicker.css.js.map +1 -0
- package/cjs/instrument-picker/TablePicker.js +130 -0
- package/cjs/instrument-picker/TablePicker.js.map +1 -0
- package/cjs/instrument-picker/useTablePicker.js +150 -0
- package/cjs/instrument-picker/useTablePicker.js.map +1 -0
- package/cjs/measured-container/MeasuredContainer.css.js +6 -0
- package/cjs/measured-container/MeasuredContainer.css.js.map +1 -0
- package/cjs/measured-container/MeasuredContainer.js +72 -0
- package/cjs/measured-container/MeasuredContainer.js.map +1 -0
- package/cjs/measured-container/useMeasuredContainer.js +167 -0
- package/cjs/measured-container/useMeasuredContainer.js.map +1 -0
- package/cjs/modal-provider/ModalProvider.js +143 -0
- package/cjs/modal-provider/ModalProvider.js.map +1 -0
- package/cjs/overflow-container/OverflowContainer.css.js +6 -0
- package/cjs/overflow-container/OverflowContainer.css.js.map +1 -0
- package/cjs/overflow-container/OverflowContainer.js +143 -0
- package/cjs/overflow-container/OverflowContainer.js.map +1 -0
- package/cjs/overflow-container/overflow-utils.js +286 -0
- package/cjs/overflow-container/overflow-utils.js.map +1 -0
- package/cjs/overflow-container/useOverflowContainer.js +143 -0
- package/cjs/overflow-container/useOverflowContainer.js.map +1 -0
- package/cjs/price-ticker/PriceTicker.css.js +6 -0
- package/cjs/price-ticker/PriceTicker.css.js.map +1 -0
- package/cjs/price-ticker/PriceTicker.js +50 -0
- package/cjs/price-ticker/PriceTicker.js.map +1 -0
- package/cjs/prompt/Prompt.css.js +6 -0
- package/cjs/prompt/Prompt.css.js.map +1 -0
- package/cjs/prompt/Prompt.js +142 -0
- package/cjs/prompt/Prompt.js.map +1 -0
- package/cjs/sortable-list/SortableList.js +37 -0
- package/cjs/sortable-list/SortableList.js.map +1 -0
- package/cjs/split-button/SplitButton.css.js +6 -0
- package/cjs/split-button/SplitButton.css.js.map +1 -0
- package/cjs/split-button/SplitButton.js +84 -0
- package/cjs/split-button/SplitButton.js.map +1 -0
- package/cjs/split-button/SplitStateButton.css.js +6 -0
- package/cjs/split-button/SplitStateButton.css.js.map +1 -0
- package/cjs/split-button/SplitStateButton.js +31 -0
- package/cjs/split-button/SplitStateButton.js.map +1 -0
- package/cjs/split-button/useSplitButton.js +84 -0
- package/cjs/split-button/useSplitButton.js.map +1 -0
- package/cjs/table-search/SearchCell.css.js +6 -0
- package/cjs/table-search/SearchCell.css.js.map +1 -0
- package/cjs/table-search/SearchCell.js +32 -0
- package/cjs/table-search/SearchCell.js.map +1 -0
- package/cjs/table-search/TableSearch.css.js +6 -0
- package/cjs/table-search/TableSearch.css.js.map +1 -0
- package/cjs/table-search/TableSearch.js +89 -0
- package/cjs/table-search/TableSearch.js.map +1 -0
- package/cjs/table-search/useTableSearch.js +39 -0
- package/cjs/table-search/useTableSearch.js.map +1 -0
- package/cjs/tabs-next/TabBar.css.js +6 -0
- package/cjs/tabs-next/TabBar.css.js.map +1 -0
- package/cjs/tabs-next/TabBar.js +41 -0
- package/cjs/tabs-next/TabBar.js.map +1 -0
- package/cjs/tabs-next/TabListNext.css.js +6 -0
- package/cjs/tabs-next/TabListNext.css.js.map +1 -0
- package/cjs/tabs-next/TabListNext.js +124 -0
- package/cjs/tabs-next/TabListNext.js.map +1 -0
- package/cjs/tabs-next/TabNext.css.js +6 -0
- package/cjs/tabs-next/TabNext.css.js.map +1 -0
- package/cjs/tabs-next/TabNext.js +110 -0
- package/cjs/tabs-next/TabNext.js.map +1 -0
- package/cjs/tabs-next/TabNextAction.js +35 -0
- package/cjs/tabs-next/TabNextAction.js.map +1 -0
- package/cjs/tabs-next/TabNextContext.js +23 -0
- package/cjs/tabs-next/TabNextContext.js.map +1 -0
- package/cjs/tabs-next/TabNextPanel.css.js +6 -0
- package/cjs/tabs-next/TabNextPanel.css.js.map +1 -0
- package/cjs/tabs-next/TabNextPanel.js +77 -0
- package/cjs/tabs-next/TabNextPanel.js.map +1 -0
- package/cjs/tabs-next/TabNextTrigger.css.js +6 -0
- package/cjs/tabs-next/TabNextTrigger.css.js.map +1 -0
- package/cjs/tabs-next/TabNextTrigger.js +74 -0
- package/cjs/tabs-next/TabNextTrigger.js.map +1 -0
- package/cjs/tabs-next/TabOverflowList.css.js +6 -0
- package/cjs/tabs-next/TabOverflowList.css.js.map +1 -0
- package/cjs/tabs-next/TabOverflowList.js +130 -0
- package/cjs/tabs-next/TabOverflowList.js.map +1 -0
- package/cjs/tabs-next/TabsNext.js +174 -0
- package/cjs/tabs-next/TabsNext.js.map +1 -0
- package/cjs/tabs-next/TabsNextContext.js +33 -0
- package/cjs/tabs-next/TabsNextContext.js.map +1 -0
- package/cjs/tabs-next/hooks/useCollection.js +91 -0
- package/cjs/tabs-next/hooks/useCollection.js.map +1 -0
- package/cjs/tabs-next/hooks/useFocusOutside.js +24 -0
- package/cjs/tabs-next/hooks/useFocusOutside.js.map +1 -0
- package/cjs/tabs-next/hooks/useOverflow.js +138 -0
- package/cjs/tabs-next/hooks/useOverflow.js.map +1 -0
- package/cjs/tabstrip/Tab.css.js +6 -0
- package/cjs/tabstrip/Tab.css.js.map +1 -0
- package/cjs/tabstrip/Tab.js +153 -0
- package/cjs/tabstrip/Tab.js.map +1 -0
- package/cjs/tabstrip/TabMenu.css.js +6 -0
- package/cjs/tabstrip/TabMenu.css.js.map +1 -0
- package/cjs/tabstrip/TabMenu.js +72 -0
- package/cjs/tabstrip/TabMenu.js.map +1 -0
- package/cjs/tabstrip/TabMenuOptions.js +20 -0
- package/cjs/tabstrip/TabMenuOptions.js.map +1 -0
- package/cjs/tabstrip/Tabstrip.css.js +6 -0
- package/cjs/tabstrip/Tabstrip.css.js.map +1 -0
- package/cjs/tabstrip/Tabstrip.js +160 -0
- package/cjs/tabstrip/Tabstrip.js.map +1 -0
- package/cjs/tabstrip/tabstrip-dom-utils.js +19 -0
- package/cjs/tabstrip/tabstrip-dom-utils.js.map +1 -0
- package/cjs/tabstrip/useAnimatedSelectionThumb.js +85 -0
- package/cjs/tabstrip/useAnimatedSelectionThumb.js.map +1 -0
- package/cjs/tabstrip/useKeyboardNavigation.js +247 -0
- package/cjs/tabstrip/useKeyboardNavigation.js.map +1 -0
- package/cjs/tabstrip/useSelection.js +60 -0
- package/cjs/tabstrip/useSelection.js.map +1 -0
- package/cjs/tabstrip/useTabstrip.js +233 -0
- package/cjs/tabstrip/useTabstrip.js.map +1 -0
- package/cjs/time-input/MaskedInput.js +377 -0
- package/cjs/time-input/MaskedInput.js.map +1 -0
- package/cjs/time-input/TimeInput.css.js +6 -0
- package/cjs/time-input/TimeInput.css.js.map +1 -0
- package/cjs/time-input/TimeInput.js +56 -0
- package/cjs/time-input/TimeInput.js.map +1 -0
- package/cjs/time-input/useTimeInput.js +121 -0
- package/cjs/time-input/useTimeInput.js.map +1 -0
- package/cjs/toolbar/Toolbar.css.js +6 -0
- package/cjs/toolbar/Toolbar.css.js.map +1 -0
- package/cjs/toolbar/Toolbar.js +90 -0
- package/cjs/toolbar/Toolbar.js.map +1 -0
- package/cjs/toolbar/toolbar-dom-utils.js +18 -0
- package/cjs/toolbar/toolbar-dom-utils.js.map +1 -0
- package/cjs/toolbar/useKeyboardNavigation.js +305 -0
- package/cjs/toolbar/useKeyboardNavigation.js.map +1 -0
- package/cjs/toolbar/useSelection.js +93 -0
- package/cjs/toolbar/useSelection.js.map +1 -0
- package/cjs/toolbar/useToolbar.js +100 -0
- package/cjs/toolbar/useToolbar.js.map +1 -0
- package/cjs/utils/escapeRegExp.js +9 -0
- package/cjs/utils/escapeRegExp.js.map +1 -0
- package/cjs/utils/forwardCallbackProps.js +22 -0
- package/cjs/utils/forwardCallbackProps.js.map +1 -0
- package/cjs/utils/isOverflowElement.js +8 -0
- package/cjs/utils/isOverflowElement.js.map +1 -0
- package/cjs/utils/isPlainObject.js +6 -0
- package/cjs/utils/isPlainObject.js.map +1 -0
- package/cjs/vuu-date-picker/VuuDatePicker.js +122 -0
- package/cjs/vuu-date-picker/VuuDatePicker.js.map +1 -0
- package/cjs/vuu-input/VuuInput.css.js +6 -0
- package/cjs/vuu-input/VuuInput.css.js.map +1 -0
- package/cjs/vuu-input/VuuInput.js +102 -0
- package/cjs/vuu-input/VuuInput.js.map +1 -0
- package/cjs/vuu-time-picker/VuuTimePicker.css.js +6 -0
- package/cjs/vuu-time-picker/VuuTimePicker.css.js.map +1 -0
- package/cjs/vuu-time-picker/VuuTimePicker.js +37 -0
- package/cjs/vuu-time-picker/VuuTimePicker.js.map +1 -0
- package/cjs/vuu-typeahead-input/VuuTypeaheadInput.css.js +6 -0
- package/cjs/vuu-typeahead-input/VuuTypeaheadInput.css.js.map +1 -0
- package/cjs/vuu-typeahead-input/VuuTypeaheadInput.js +80 -0
- package/cjs/vuu-typeahead-input/VuuTypeaheadInput.js.map +1 -0
- package/cjs/vuu-typeahead-input/useVuuTypeaheadInput.js +176 -0
- package/cjs/vuu-typeahead-input/useVuuTypeaheadInput.js.map +1 -0
- package/esm/calendar/Calendar.css.js +4 -0
- package/esm/calendar/Calendar.css.js.map +1 -0
- package/esm/calendar/Calendar.js +91 -0
- package/esm/calendar/Calendar.js.map +1 -0
- package/esm/calendar/internal/CalendarCarousel.css.js +4 -0
- package/esm/calendar/internal/CalendarCarousel.css.js.map +1 -0
- package/esm/calendar/internal/CalendarCarousel.js +73 -0
- package/esm/calendar/internal/CalendarCarousel.js.map +1 -0
- package/esm/calendar/internal/CalendarContext.js +16 -0
- package/esm/calendar/internal/CalendarContext.js.map +1 -0
- package/esm/calendar/internal/CalendarDay.css.js +4 -0
- package/esm/calendar/internal/CalendarDay.css.js.map +1 -0
- package/{src → esm}/calendar/internal/CalendarDay.js +53 -33
- package/esm/calendar/internal/CalendarDay.js.map +1 -0
- package/esm/calendar/internal/CalendarMonth.css.js +4 -0
- package/esm/calendar/internal/CalendarMonth.css.js.map +1 -0
- package/esm/calendar/internal/CalendarMonth.js +69 -0
- package/esm/calendar/internal/CalendarMonth.js.map +1 -0
- package/esm/calendar/internal/CalendarNavigation.css.js +4 -0
- package/esm/calendar/internal/CalendarNavigation.css.js.map +1 -0
- package/esm/calendar/internal/CalendarNavigation.js +234 -0
- package/esm/calendar/internal/CalendarNavigation.js.map +1 -0
- package/esm/calendar/internal/CalendarWeekHeader.css.js +4 -0
- package/esm/calendar/internal/CalendarWeekHeader.css.js.map +1 -0
- package/esm/calendar/internal/CalendarWeekHeader.js +41 -0
- package/esm/calendar/internal/CalendarWeekHeader.js.map +1 -0
- package/esm/calendar/internal/useFocusManagement.js +64 -0
- package/esm/calendar/internal/useFocusManagement.js.map +1 -0
- package/esm/calendar/internal/utils.js +55 -0
- package/esm/calendar/internal/utils.js.map +1 -0
- package/esm/calendar/useCalendar.js +161 -0
- package/esm/calendar/useCalendar.js.map +1 -0
- package/esm/calendar/useCalendarDay.js +78 -0
- package/esm/calendar/useCalendarDay.js.map +1 -0
- package/esm/calendar/useSelection.js +243 -0
- package/esm/calendar/useSelection.js.map +1 -0
- package/esm/column-picker/ColumnPicker.css.js +4 -0
- package/esm/column-picker/ColumnPicker.css.js.map +1 -0
- package/esm/column-picker/ColumnPicker.js +126 -0
- package/esm/column-picker/ColumnPicker.js.map +1 -0
- package/esm/column-picker/ColumnSearch.css.js +4 -0
- package/esm/column-picker/ColumnSearch.css.js.map +1 -0
- package/esm/column-picker/ColumnSearch.js +80 -0
- package/esm/column-picker/ColumnSearch.js.map +1 -0
- package/esm/common-hooks/selectionTypes.js +10 -0
- package/esm/common-hooks/selectionTypes.js.map +1 -0
- package/esm/common-hooks/use-resize-observer.js +118 -0
- package/esm/common-hooks/use-resize-observer.js.map +1 -0
- package/esm/common-hooks/useControlled.js +56 -0
- package/esm/common-hooks/useControlled.js.map +1 -0
- package/esm/context-panel-provider/ContextPanelProvider.js +94 -0
- package/esm/context-panel-provider/ContextPanelProvider.js.map +1 -0
- package/esm/cycle-state-button/CycleStateButton.js +48 -0
- package/esm/cycle-state-button/CycleStateButton.js.map +1 -0
- package/esm/date-input/DateInput.css.js +4 -0
- package/esm/date-input/DateInput.css.js.map +1 -0
- package/esm/date-input/DateInput.js +275 -0
- package/esm/date-input/DateInput.js.map +1 -0
- package/esm/date-picker/DatePicker.js +167 -0
- package/esm/date-picker/DatePicker.js.map +1 -0
- package/esm/date-picker/DatePickerContext.js +23 -0
- package/esm/date-picker/DatePickerContext.js.map +1 -0
- package/esm/date-picker/DatePickerPanel.css.js +4 -0
- package/esm/date-picker/DatePickerPanel.css.js.map +1 -0
- package/esm/date-picker/DatePickerPanel.js +144 -0
- package/esm/date-picker/DatePickerPanel.js.map +1 -0
- package/esm/drag-drop/DragDropProvider.js +142 -0
- package/esm/drag-drop/DragDropProvider.js.map +1 -0
- package/esm/drag-drop/DragDropState.js +34 -0
- package/esm/drag-drop/DragDropState.js.map +1 -0
- package/esm/drag-drop/Draggable.css.js +4 -0
- package/esm/drag-drop/Draggable.css.js.map +1 -0
- package/esm/drag-drop/Draggable.js +85 -0
- package/esm/drag-drop/Draggable.js.map +1 -0
- package/{src → esm}/drag-drop/dragDropTypes.js +2 -0
- package/esm/drag-drop/dragDropTypes.js.map +1 -0
- package/esm/drag-drop/drop-target-utils.js +228 -0
- package/esm/drag-drop/drop-target-utils.js.map +1 -0
- package/esm/drag-drop/useAutoScroll.js +69 -0
- package/esm/drag-drop/useAutoScroll.js.map +1 -0
- package/esm/drag-drop/useDragDisplacers.js +158 -0
- package/esm/drag-drop/useDragDisplacers.js.map +1 -0
- package/esm/drag-drop/useDragDrop.js +502 -0
- package/esm/drag-drop/useDragDrop.js.map +1 -0
- package/esm/drag-drop/useDragDropCopy.js +31 -0
- package/esm/drag-drop/useDragDropCopy.js.map +1 -0
- package/esm/drag-drop/useDragDropIndicator.js +249 -0
- package/esm/drag-drop/useDragDropIndicator.js.map +1 -0
- package/esm/drag-drop/useDragDropNaturalMovement.js +263 -0
- package/esm/drag-drop/useDragDropNaturalMovement.js.map +1 -0
- package/esm/drag-drop/useDropIndicator.js +25 -0
- package/esm/drag-drop/useDropIndicator.js.map +1 -0
- package/esm/drag-drop/useGlobalDragDrop.js +87 -0
- package/esm/drag-drop/useGlobalDragDrop.js.map +1 -0
- package/esm/editable/useEditableText.js +209 -0
- package/esm/editable/useEditableText.js.map +1 -0
- package/esm/editable-label/EditableLabel.css.js +4 -0
- package/esm/editable-label/EditableLabel.css.js.map +1 -0
- package/esm/editable-label/EditableLabel.js +140 -0
- package/esm/editable-label/EditableLabel.js.map +1 -0
- package/esm/expando-input/ExpandoInput.css.js +4 -0
- package/esm/expando-input/ExpandoInput.css.js.map +1 -0
- package/esm/expando-input/ExpandoInput.js +51 -0
- package/esm/expando-input/ExpandoInput.js.map +1 -0
- package/esm/hover-overlay/HoverOverlay.js +94 -0
- package/esm/hover-overlay/HoverOverlay.js.map +1 -0
- package/esm/icon-button/Icon.css.js +4 -0
- package/esm/icon-button/Icon.css.js.map +1 -0
- package/esm/icon-button/Icon.js +35 -0
- package/esm/icon-button/Icon.js.map +1 -0
- package/esm/icon-button/IconButton.css.js +4 -0
- package/esm/icon-button/IconButton.css.js.map +1 -0
- package/esm/icon-button/IconButton.js +24 -0
- package/esm/icon-button/IconButton.js.map +1 -0
- package/esm/icon-button/ToggleIconButton.css.js +4 -0
- package/esm/icon-button/ToggleIconButton.css.js.map +1 -0
- package/esm/icon-button/ToggleIconButton.js +37 -0
- package/esm/icon-button/ToggleIconButton.js.map +1 -0
- package/esm/index.js +59 -0
- package/esm/index.js.map +1 -0
- package/esm/instrument-picker/TablePicker.css.js +4 -0
- package/esm/instrument-picker/TablePicker.css.js.map +1 -0
- package/esm/instrument-picker/TablePicker.js +128 -0
- package/esm/instrument-picker/TablePicker.js.map +1 -0
- package/esm/instrument-picker/useTablePicker.js +148 -0
- package/esm/instrument-picker/useTablePicker.js.map +1 -0
- package/esm/measured-container/MeasuredContainer.css.js +4 -0
- package/esm/measured-container/MeasuredContainer.css.js.map +1 -0
- package/esm/measured-container/MeasuredContainer.js +70 -0
- package/esm/measured-container/MeasuredContainer.js.map +1 -0
- package/esm/measured-container/useMeasuredContainer.js +164 -0
- package/esm/measured-container/useMeasuredContainer.js.map +1 -0
- package/esm/modal-provider/ModalProvider.js +140 -0
- package/esm/modal-provider/ModalProvider.js.map +1 -0
- package/esm/overflow-container/OverflowContainer.css.js +4 -0
- package/esm/overflow-container/OverflowContainer.css.js.map +1 -0
- package/esm/overflow-container/OverflowContainer.js +141 -0
- package/esm/overflow-container/OverflowContainer.js.map +1 -0
- package/esm/overflow-container/overflow-utils.js +272 -0
- package/esm/overflow-container/overflow-utils.js.map +1 -0
- package/esm/overflow-container/useOverflowContainer.js +141 -0
- package/esm/overflow-container/useOverflowContainer.js.map +1 -0
- package/esm/price-ticker/PriceTicker.css.js +4 -0
- package/esm/price-ticker/PriceTicker.css.js.map +1 -0
- package/esm/price-ticker/PriceTicker.js +48 -0
- package/esm/price-ticker/PriceTicker.js.map +1 -0
- package/esm/prompt/Prompt.css.js +4 -0
- package/esm/prompt/Prompt.css.js.map +1 -0
- package/esm/prompt/Prompt.js +140 -0
- package/esm/prompt/Prompt.js.map +1 -0
- package/esm/sortable-list/SortableList.js +34 -0
- package/esm/sortable-list/SortableList.js.map +1 -0
- package/esm/split-button/SplitButton.css.js +4 -0
- package/esm/split-button/SplitButton.css.js.map +1 -0
- package/esm/split-button/SplitButton.js +82 -0
- package/esm/split-button/SplitButton.js.map +1 -0
- package/esm/split-button/SplitStateButton.css.js +4 -0
- package/esm/split-button/SplitStateButton.css.js.map +1 -0
- package/esm/split-button/SplitStateButton.js +29 -0
- package/esm/split-button/SplitStateButton.js.map +1 -0
- package/esm/split-button/useSplitButton.js +82 -0
- package/esm/split-button/useSplitButton.js.map +1 -0
- package/esm/table-search/SearchCell.css.js +4 -0
- package/esm/table-search/SearchCell.css.js.map +1 -0
- package/esm/table-search/SearchCell.js +30 -0
- package/esm/table-search/SearchCell.js.map +1 -0
- package/esm/table-search/TableSearch.css.js +4 -0
- package/esm/table-search/TableSearch.css.js.map +1 -0
- package/esm/table-search/TableSearch.js +87 -0
- package/esm/table-search/TableSearch.js.map +1 -0
- package/esm/table-search/useTableSearch.js +37 -0
- package/esm/table-search/useTableSearch.js.map +1 -0
- package/esm/tabs-next/TabBar.css.js +4 -0
- package/esm/tabs-next/TabBar.css.js.map +1 -0
- package/esm/tabs-next/TabBar.js +39 -0
- package/esm/tabs-next/TabBar.js.map +1 -0
- package/esm/tabs-next/TabListNext.css.js +4 -0
- package/esm/tabs-next/TabListNext.css.js.map +1 -0
- package/esm/tabs-next/TabListNext.js +122 -0
- package/esm/tabs-next/TabListNext.js.map +1 -0
- package/esm/tabs-next/TabNext.css.js +4 -0
- package/esm/tabs-next/TabNext.css.js.map +1 -0
- package/esm/tabs-next/TabNext.js +108 -0
- package/esm/tabs-next/TabNext.js.map +1 -0
- package/esm/tabs-next/TabNextAction.js +33 -0
- package/esm/tabs-next/TabNextAction.js.map +1 -0
- package/esm/tabs-next/TabNextContext.js +20 -0
- package/esm/tabs-next/TabNextContext.js.map +1 -0
- package/esm/tabs-next/TabNextPanel.css.js +4 -0
- package/esm/tabs-next/TabNextPanel.css.js.map +1 -0
- package/esm/tabs-next/TabNextPanel.js +75 -0
- package/esm/tabs-next/TabNextPanel.js.map +1 -0
- package/esm/tabs-next/TabNextTrigger.css.js +4 -0
- package/esm/tabs-next/TabNextTrigger.css.js.map +1 -0
- package/esm/tabs-next/TabNextTrigger.js +72 -0
- package/esm/tabs-next/TabNextTrigger.js.map +1 -0
- package/esm/tabs-next/TabOverflowList.css.js +4 -0
- package/esm/tabs-next/TabOverflowList.css.js.map +1 -0
- package/esm/tabs-next/TabOverflowList.js +128 -0
- package/esm/tabs-next/TabOverflowList.js.map +1 -0
- package/esm/tabs-next/TabsNext.js +172 -0
- package/esm/tabs-next/TabsNext.js.map +1 -0
- package/esm/tabs-next/TabsNextContext.js +30 -0
- package/esm/tabs-next/TabsNextContext.js.map +1 -0
- package/esm/tabs-next/hooks/useCollection.js +89 -0
- package/esm/tabs-next/hooks/useCollection.js.map +1 -0
- package/esm/tabs-next/hooks/useFocusOutside.js +22 -0
- package/esm/tabs-next/hooks/useFocusOutside.js.map +1 -0
- package/esm/tabs-next/hooks/useOverflow.js +136 -0
- package/esm/tabs-next/hooks/useOverflow.js.map +1 -0
- package/esm/tabstrip/Tab.css.js +4 -0
- package/esm/tabstrip/Tab.css.js.map +1 -0
- package/esm/tabstrip/Tab.js +151 -0
- package/esm/tabstrip/Tab.js.map +1 -0
- package/esm/tabstrip/TabMenu.css.js +4 -0
- package/esm/tabstrip/TabMenu.css.js.map +1 -0
- package/esm/tabstrip/TabMenu.js +70 -0
- package/esm/tabstrip/TabMenu.js.map +1 -0
- package/esm/tabstrip/TabMenuOptions.js +16 -0
- package/esm/tabstrip/TabMenuOptions.js.map +1 -0
- package/esm/tabstrip/Tabstrip.css.js +4 -0
- package/esm/tabstrip/Tabstrip.css.js.map +1 -0
- package/esm/tabstrip/Tabstrip.js +158 -0
- package/esm/tabstrip/Tabstrip.js.map +1 -0
- package/esm/tabstrip/tabstrip-dom-utils.js +16 -0
- package/esm/tabstrip/tabstrip-dom-utils.js.map +1 -0
- package/esm/tabstrip/useAnimatedSelectionThumb.js +83 -0
- package/esm/tabstrip/useAnimatedSelectionThumb.js.map +1 -0
- package/esm/tabstrip/useKeyboardNavigation.js +245 -0
- package/esm/tabstrip/useKeyboardNavigation.js.map +1 -0
- package/esm/tabstrip/useSelection.js +58 -0
- package/esm/tabstrip/useSelection.js.map +1 -0
- package/esm/tabstrip/useTabstrip.js +231 -0
- package/esm/tabstrip/useTabstrip.js.map +1 -0
- package/esm/time-input/MaskedInput.js +375 -0
- package/esm/time-input/MaskedInput.js.map +1 -0
- package/esm/time-input/TimeInput.css.js +4 -0
- package/esm/time-input/TimeInput.css.js.map +1 -0
- package/esm/time-input/TimeInput.js +54 -0
- package/esm/time-input/TimeInput.js.map +1 -0
- package/esm/time-input/useTimeInput.js +119 -0
- package/esm/time-input/useTimeInput.js.map +1 -0
- package/esm/toolbar/Toolbar.css.js +4 -0
- package/esm/toolbar/Toolbar.css.js.map +1 -0
- package/esm/toolbar/Toolbar.js +88 -0
- package/esm/toolbar/Toolbar.js.map +1 -0
- package/esm/toolbar/toolbar-dom-utils.js +15 -0
- package/esm/toolbar/toolbar-dom-utils.js.map +1 -0
- package/esm/toolbar/useKeyboardNavigation.js +303 -0
- package/esm/toolbar/useKeyboardNavigation.js.map +1 -0
- package/esm/toolbar/useSelection.js +91 -0
- package/esm/toolbar/useSelection.js.map +1 -0
- package/esm/toolbar/useToolbar.js +98 -0
- package/esm/toolbar/useToolbar.js.map +1 -0
- package/{src → esm}/utils/escapeRegExp.js +3 -1
- package/esm/utils/escapeRegExp.js.map +1 -0
- package/esm/utils/forwardCallbackProps.js +20 -0
- package/esm/utils/forwardCallbackProps.js.map +1 -0
- package/esm/utils/isOverflowElement.js +6 -0
- package/esm/utils/isOverflowElement.js.map +1 -0
- package/esm/utils/isPlainObject.js +4 -0
- package/esm/utils/isPlainObject.js.map +1 -0
- package/esm/vuu-date-picker/VuuDatePicker.js +120 -0
- package/esm/vuu-date-picker/VuuDatePicker.js.map +1 -0
- package/esm/vuu-input/VuuInput.css.js +4 -0
- package/esm/vuu-input/VuuInput.css.js.map +1 -0
- package/esm/vuu-input/VuuInput.js +100 -0
- package/esm/vuu-input/VuuInput.js.map +1 -0
- package/esm/vuu-time-picker/VuuTimePicker.css.js +4 -0
- package/esm/vuu-time-picker/VuuTimePicker.css.js.map +1 -0
- package/esm/vuu-time-picker/VuuTimePicker.js +35 -0
- package/esm/vuu-time-picker/VuuTimePicker.js.map +1 -0
- package/esm/vuu-typeahead-input/VuuTypeaheadInput.css.js +4 -0
- package/esm/vuu-typeahead-input/VuuTypeaheadInput.css.js.map +1 -0
- package/esm/vuu-typeahead-input/VuuTypeaheadInput.js +78 -0
- package/esm/vuu-typeahead-input/VuuTypeaheadInput.js.map +1 -0
- package/esm/vuu-typeahead-input/useVuuTypeaheadInput.js +174 -0
- package/esm/vuu-typeahead-input/useVuuTypeaheadInput.js.map +1 -0
- package/package.json +17 -14
- package/types/calendar/useCalendar.d.ts +3 -3
- package/types/calendar/useSelection.d.ts +1 -1
- package/types/date-input/DateInput.d.ts +1 -1
- package/types/date-picker/DatePicker.d.ts +1 -1
- package/types/date-picker/DatePickerContext.d.ts +2 -2
- package/types/date-picker/DatePickerPanel.d.ts +1 -1
- package/types/instrument-picker/useTablePicker.d.ts +4 -4
- package/types/split-button/useSplitButton.d.ts +120 -120
- package/types/tabs-next/hooks/useOverflow.d.ts +1 -1
- package/types/tabstrip/Tab.d.ts +1 -1
- package/types/tabstrip/useTabstrip.d.ts +1 -1
- package/types/toolbar/useToolbar.d.ts +1 -1
- package/src/calendar/Calendar.css.js +0 -10
- package/src/calendar/Calendar.js +0 -70
- package/src/calendar/index.js +0 -4
- package/src/calendar/internal/CalendarCarousel.css.js +0 -19
- package/src/calendar/internal/CalendarCarousel.js +0 -73
- package/src/calendar/internal/CalendarContext.js +0 -9
- package/src/calendar/internal/CalendarDay.css.js +0 -116
- package/src/calendar/internal/CalendarMonth.css.js +0 -13
- package/src/calendar/internal/CalendarMonth.js +0 -43
- package/src/calendar/internal/CalendarNavigation.css.js +0 -24
- package/src/calendar/internal/CalendarNavigation.js +0 -185
- package/src/calendar/internal/CalendarWeekHeader.css.js +0 -23
- package/src/calendar/internal/CalendarWeekHeader.js +0 -31
- package/src/calendar/internal/useFocusManagement.js +0 -66
- package/src/calendar/internal/utils.js +0 -57
- package/src/calendar/useCalendar.js +0 -116
- package/src/calendar/useCalendarDay.js +0 -74
- package/src/calendar/useSelection.js +0 -202
- package/src/column-picker/ColumnPicker.css.js +0 -8
- package/src/column-picker/ColumnPicker.js +0 -108
- package/src/column-picker/ColumnSearch.css.js +0 -61
- package/src/column-picker/ColumnSearch.js +0 -66
- package/src/column-picker/index.js +0 -2
- package/src/column-picker/moving-window.js +0 -49
- package/src/common-hooks/index.js +0 -3
- package/src/common-hooks/selectionTypes.js +0 -8
- package/src/common-hooks/use-resize-observer.js +0 -122
- package/src/common-hooks/useControlled.js +0 -45
- package/src/context-panel-provider/ContextPanelProvider.js +0 -80
- package/src/cycle-state-button/CycleStateButton.js +0 -30
- package/src/cycle-state-button/index.js +0 -1
- package/src/date-input/DateInput.css.js +0 -195
- package/src/date-input/DateInput.js +0 -210
- package/src/date-input/index.js +0 -1
- package/src/date-picker/DatePicker.js +0 -137
- package/src/date-picker/DatePickerContext.js +0 -20
- package/src/date-picker/DatePickerPanel.css.js +0 -25
- package/src/date-picker/DatePickerPanel.js +0 -124
- package/src/date-picker/index.js +0 -1
- package/src/drag-drop/DragDropProvider.js +0 -123
- package/src/drag-drop/DragDropState.js +0 -25
- package/src/drag-drop/Draggable.css.js +0 -57
- package/src/drag-drop/Draggable.js +0 -77
- package/src/drag-drop/DropIndicator.css.js +0 -11
- package/src/drag-drop/DropIndicator.js +0 -28
- package/src/drag-drop/drop-target-utils.js +0 -199
- package/src/drag-drop/index.js +0 -6
- package/src/drag-drop/useAutoScroll.js +0 -53
- package/src/drag-drop/useDragDisplacers.js +0 -126
- package/src/drag-drop/useDragDrop.js +0 -435
- package/src/drag-drop/useDragDropCopy.js +0 -22
- package/src/drag-drop/useDragDropIndicator.js +0 -182
- package/src/drag-drop/useDragDropNaturalMovement.js +0 -205
- package/src/drag-drop/useDropIndicator.js +0 -21
- package/src/drag-drop/useGlobalDragDrop.js +0 -67
- package/src/drag-drop/useTransition.js +0 -11
- package/src/editable/index.js +0 -1
- package/src/editable/useEditableText.js +0 -199
- package/src/editable-label/EditableLabel.css.js +0 -81
- package/src/editable-label/EditableLabel.js +0 -125
- package/src/editable-label/index.js +0 -1
- package/src/expando-input/ExpandoInput.css.js +0 -67
- package/src/expando-input/ExpandoInput.js +0 -40
- package/src/expando-input/index.js +0 -1
- package/src/highlighter/Highlighter.css.js +0 -8
- package/src/highlighter/Highlighter.js +0 -27
- package/src/highlighter/index.js +0 -1
- package/src/hover-overlay/HoverOverlay.js +0 -92
- package/src/icon-button/Icon.css.js +0 -8
- package/src/icon-button/Icon.js +0 -26
- package/src/icon-button/IconButton.css.js +0 -10
- package/src/icon-button/IconButton.js +0 -28
- package/src/icon-button/ToggleIconButton.css.js +0 -47
- package/src/icon-button/ToggleIconButton.js +0 -26
- package/src/icon-button/index.js +0 -3
- package/src/index.js +0 -31
- package/src/instrument-picker/SearchCell.css.js +0 -17
- package/src/instrument-picker/SearchCell.js +0 -29
- package/src/instrument-picker/TablePicker.css.js +0 -23
- package/src/instrument-picker/TablePicker.js +0 -89
- package/src/instrument-picker/index.js +0 -1
- package/src/instrument-picker/moving-window.js +0 -49
- package/src/instrument-picker/useDataSource.js +0 -38
- package/src/instrument-picker/useTablePicker.js +0 -136
- package/src/measured-container/MeasuredContainer.css.js +0 -11
- package/src/measured-container/MeasuredContainer.js +0 -50
- package/src/measured-container/index.js +0 -2
- package/src/measured-container/useMeasuredContainer.js +0 -156
- package/src/modal-provider/ModalProvider.js +0 -147
- package/src/overflow-container/OverflowContainer.css.js +0 -135
- package/src/overflow-container/OverflowContainer.js +0 -87
- package/src/overflow-container/index.js +0 -2
- package/src/overflow-container/overflow-utils.js +0 -211
- package/src/overflow-container/useOverflowContainer.js +0 -108
- package/src/price-ticker/PriceTicker.css.js +0 -32
- package/src/price-ticker/PriceTicker.js +0 -51
- package/src/price-ticker/index.js +0 -1
- package/src/prompt/Prompt.css.js +0 -48
- package/src/prompt/Prompt.js +0 -112
- package/src/sortable-list/SortableList.js +0 -39
- package/src/split-button/SplitButton.css.js +0 -117
- package/src/split-button/SplitButton.js +0 -60
- package/src/split-button/SplitStateButton.css.js +0 -66
- package/src/split-button/SplitStateButton.js +0 -23
- package/src/split-button/index.js +0 -2
- package/src/split-button/useSplitButton.js +0 -61
- package/src/table-search/SearchCell.css.js +0 -20
- package/src/table-search/SearchCell.js +0 -26
- package/src/table-search/TableSearch.css.js +0 -27
- package/src/table-search/TableSearch.js +0 -81
- package/src/table-search/index.js +0 -1
- package/src/table-search/moving-window.js +0 -49
- package/src/table-search/useTableSearch.js +0 -30
- package/src/tabs-next/TabBar.css.js +0 -26
- package/src/tabs-next/TabBar.js +0 -27
- package/src/tabs-next/TabListNext.css.js +0 -36
- package/src/tabs-next/TabListNext.js +0 -94
- package/src/tabs-next/TabNext.css.js +0 -76
- package/src/tabs-next/TabNext.js +0 -91
- package/src/tabs-next/TabNextAction.js +0 -26
- package/src/tabs-next/TabNextContext.js +0 -14
- package/src/tabs-next/TabNextPanel.css.js +0 -17
- package/src/tabs-next/TabNextPanel.js +0 -69
- package/src/tabs-next/TabNextTrigger.css.js +0 -22
- package/src/tabs-next/TabNextTrigger.js +0 -66
- package/src/tabs-next/TabOverflowList.css.js +0 -77
- package/src/tabs-next/TabOverflowList.js +0 -115
- package/src/tabs-next/TabsNext.js +0 -149
- package/src/tabs-next/TabsNextContext.js +0 -28
- package/src/tabs-next/hooks/useCollection.js +0 -80
- package/src/tabs-next/hooks/useFocusOutside.js +0 -23
- package/src/tabs-next/hooks/useOverflow.js +0 -118
- package/src/tabs-next/index.js +0 -7
- package/src/tabstrip/Tab.css.js +0 -148
- package/src/tabstrip/Tab.js +0 -107
- package/src/tabstrip/TabMenu.css.js +0 -8
- package/src/tabstrip/TabMenu.js +0 -48
- package/src/tabstrip/TabMenuOptions.js +0 -14
- package/src/tabstrip/TabsTypes.js +0 -0
- package/src/tabstrip/Tabstrip.css.js +0 -121
- package/src/tabstrip/Tabstrip.js +0 -106
- package/src/tabstrip/ThemeTabstrip.css.js +0 -20
- package/src/tabstrip/index.js +0 -4
- package/src/tabstrip/tabstrip-dom-utils.js +0 -11
- package/src/tabstrip/useAnimatedSelectionThumb.js +0 -68
- package/src/tabstrip/useKeyboardNavigation.js +0 -191
- package/src/tabstrip/useSelection.js +0 -50
- package/src/tabstrip/useTabstrip.js +0 -181
- package/src/time-input/MaskedInput.js +0 -285
- package/src/time-input/TimeInput.css.js +0 -39
- package/src/time-input/TimeInput.js +0 -37
- package/src/time-input/useTimeInput.js +0 -82
- package/src/toolbar/Toolbar.css.js +0 -46
- package/src/toolbar/Toolbar.js +0 -62
- package/src/toolbar/index.js +0 -1
- package/src/toolbar/toolbar-dom-utils.js +0 -11
- package/src/toolbar/useKeyboardNavigation.js +0 -240
- package/src/toolbar/useSelection.js +0 -82
- package/src/toolbar/useToolbar.js +0 -73
- package/src/utils/deprecated-types.js +0 -0
- package/src/utils/forwardCallbackProps.js +0 -15
- package/src/utils/index.js +0 -5
- package/src/utils/isOverflowElement.js +0 -2
- package/src/utils/isPlainObject.js +0 -2
- package/src/vuu-date-picker/VuuDatePicker.js +0 -92
- package/src/vuu-date-picker/index.js +0 -1
- package/src/vuu-input/VuuInput.css.js +0 -13
- package/src/vuu-input/VuuInput.js +0 -85
- package/src/vuu-input/index.js +0 -1
- package/src/vuu-time-picker/TimeRangePicker.js +0 -0
- package/src/vuu-time-picker/VuuTimePicker.css.js +0 -14
- package/src/vuu-time-picker/VuuTimePicker.js +0 -26
- package/src/vuu-typeahead-input/VuuTypeaheadInput.css.js +0 -49
- package/src/vuu-typeahead-input/VuuTypeaheadInput.js +0 -46
- package/src/vuu-typeahead-input/index.js +0 -1
- package/src/vuu-typeahead-input/useVuuTypeaheadInput.js +0 -140
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
const css = `
|
|
2
|
-
.vuuDraggable {
|
|
3
|
-
box-shadow: var(--salt-overlayable-shadow-drag);
|
|
4
|
-
cursor: var(--salt-draggable-grab-cursor-active);
|
|
5
|
-
opacity: .95;
|
|
6
|
-
z-index: 2000;
|
|
7
|
-
background: none;
|
|
8
|
-
position: absolute;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.vuuDraggable-spacer {
|
|
12
|
-
display: var(--vuuDraggable-display, inline-block);
|
|
13
|
-
height: var(--vuuDraggable-spacer-height, var(--tabstrip-height));
|
|
14
|
-
transition: var(--vuuDraggable-transitionProp, width) .3s ease;
|
|
15
|
-
width: var(--vuuDraggable-spacer-width, 0);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.vuuDraggable-dropIndicatorPosition {
|
|
19
|
-
display: var(--saltDraggable-display, inline-block);
|
|
20
|
-
width: 100%;
|
|
21
|
-
height: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
.vuuDraggable-dropIndicatorContainer {
|
|
25
|
-
transition: var(--vuuDraggable-transitionProp, top) .2s ease;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.vuuDraggable-dropIndicator {
|
|
29
|
-
background-color: var(--salt-palette-accent-background);
|
|
30
|
-
width: 100%;
|
|
31
|
-
height: 2px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.vuuDraggable-dropIndicator:before {
|
|
35
|
-
content: "";
|
|
36
|
-
background-color: var(--salt-palette-accent-background);
|
|
37
|
-
border-radius: 3px;
|
|
38
|
-
width: 6px;
|
|
39
|
-
height: 6px;
|
|
40
|
-
position: absolute;
|
|
41
|
-
top: -2px;
|
|
42
|
-
left: -3px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.vuuDraggable-settling {
|
|
46
|
-
transition-property: left, top;
|
|
47
|
-
transition-duration: .15s;
|
|
48
|
-
transition-timing-function: ease-out;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.vuuDraggable-spacer {
|
|
52
|
-
order: 1;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
`;
|
|
57
|
-
export default css;
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useForkRef } from "@salt-ds/core";
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { useComponentCssInjection } from "@salt-ds/styles";
|
|
5
|
-
import { useWindow } from "@salt-ds/window";
|
|
6
|
-
import { forwardRef, useCallback, useMemo } from "react";
|
|
7
|
-
import { PopupComponent, Portal } from "@vuu-ui/vuu-popups";
|
|
8
|
-
import Draggable_0 from "./Draggable.css";
|
|
9
|
-
const makeClassNames = (classNames)=>classNames.split(" ").map((className)=>`vuuDraggable-${className}`);
|
|
10
|
-
const Draggable_Draggable = /*#__PURE__*/ forwardRef(function({ wrapperClassName, element, onDropped, onTransitionEnd, style, scale = 1 }, forwardedRef) {
|
|
11
|
-
const targetWindow = useWindow();
|
|
12
|
-
useComponentCssInjection({
|
|
13
|
-
testId: "vuu-draggable",
|
|
14
|
-
css: Draggable_0,
|
|
15
|
-
window: targetWindow
|
|
16
|
-
});
|
|
17
|
-
const handleVuuDrop = useCallback(()=>{
|
|
18
|
-
onDropped?.();
|
|
19
|
-
}, [
|
|
20
|
-
onDropped
|
|
21
|
-
]);
|
|
22
|
-
const callbackRef = useCallback((el)=>{
|
|
23
|
-
if (el) {
|
|
24
|
-
el.innerHTML = "";
|
|
25
|
-
el.appendChild(element);
|
|
26
|
-
if (1 !== scale) el.style.transform = `scale(${scale},${scale})`;
|
|
27
|
-
el.addEventListener("vuu-dropped", handleVuuDrop);
|
|
28
|
-
}
|
|
29
|
-
}, [
|
|
30
|
-
element,
|
|
31
|
-
handleVuuDrop,
|
|
32
|
-
scale
|
|
33
|
-
]);
|
|
34
|
-
const forkedRef = useForkRef(forwardedRef, callbackRef);
|
|
35
|
-
const position = useMemo(()=>({
|
|
36
|
-
left: 0,
|
|
37
|
-
top: 0
|
|
38
|
-
}), []);
|
|
39
|
-
return /*#__PURE__*/ jsx(Portal, {
|
|
40
|
-
children: /*#__PURE__*/ jsx(PopupComponent, {
|
|
41
|
-
anchorElement: {
|
|
42
|
-
current: document.body
|
|
43
|
-
},
|
|
44
|
-
className: "vuuPopup",
|
|
45
|
-
placement: "absolute",
|
|
46
|
-
position: position,
|
|
47
|
-
children: /*#__PURE__*/ jsx("div", {
|
|
48
|
-
className: clsx("vuuDraggable", ...makeClassNames(wrapperClassName)),
|
|
49
|
-
ref: forkedRef,
|
|
50
|
-
onTransitionEnd: onTransitionEnd,
|
|
51
|
-
style: style
|
|
52
|
-
})
|
|
53
|
-
})
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
const createDragSpacer = (transitioning)=>{
|
|
57
|
-
const spacer = document.createElement("div");
|
|
58
|
-
spacer.className = "vuuDraggable-spacer";
|
|
59
|
-
if (transitioning) spacer.addEventListener("transitionend", ()=>{
|
|
60
|
-
transitioning.current = false;
|
|
61
|
-
});
|
|
62
|
-
return spacer;
|
|
63
|
-
};
|
|
64
|
-
const createDropIndicatorPosition = ()=>{
|
|
65
|
-
const spacer = document.createElement("div");
|
|
66
|
-
spacer.className = "vuuDraggable-dropIndicatorPosition";
|
|
67
|
-
return spacer;
|
|
68
|
-
};
|
|
69
|
-
const createDropIndicator = (transitioning)=>{
|
|
70
|
-
const spacer = document.createElement("div");
|
|
71
|
-
spacer.className = "vuuDraggable-dropIndicator";
|
|
72
|
-
if (transitioning) spacer.addEventListener("transitionend", ()=>{
|
|
73
|
-
transitioning.current = false;
|
|
74
|
-
});
|
|
75
|
-
return spacer;
|
|
76
|
-
};
|
|
77
|
-
export { Draggable_Draggable as Draggable, createDragSpacer, createDropIndicator, createDropIndicatorPosition };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Portal } from "@vuu-ui/vuu-popups";
|
|
3
|
-
import { useComponentCssInjection } from "@salt-ds/styles";
|
|
4
|
-
import { useWindow } from "@salt-ds/window";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import DropIndicator_0 from "./DropIndicator.css";
|
|
7
|
-
const DropIndicator_DropIndicator = /*#__PURE__*/ forwardRef(function({ rect }, forwardedRef) {
|
|
8
|
-
const targetWindow = useWindow();
|
|
9
|
-
useComponentCssInjection({
|
|
10
|
-
testId: "vuu-drop-indicator",
|
|
11
|
-
css: DropIndicator_0,
|
|
12
|
-
window: targetWindow
|
|
13
|
-
});
|
|
14
|
-
const { left, top, width, height } = rect;
|
|
15
|
-
return /*#__PURE__*/ jsx(Portal, {
|
|
16
|
-
children: /*#__PURE__*/ jsx("div", {
|
|
17
|
-
className: "vuuDropIndicator",
|
|
18
|
-
ref: forwardedRef,
|
|
19
|
-
style: {
|
|
20
|
-
left,
|
|
21
|
-
top,
|
|
22
|
-
width,
|
|
23
|
-
height
|
|
24
|
-
}
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
export { DropIndicator_DropIndicator as DropIndicator };
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
const LEFT_RIGHT = [
|
|
2
|
-
"left",
|
|
3
|
-
"right"
|
|
4
|
-
];
|
|
5
|
-
const TOP_BOTTOM = [
|
|
6
|
-
"top",
|
|
7
|
-
"bottom"
|
|
8
|
-
];
|
|
9
|
-
const NOT_OVERFLOWED = ":not(.wrapped)";
|
|
10
|
-
const NOT_HIDDEN = ':not([aria-hidden="true"])';
|
|
11
|
-
const cloneElement = (element)=>{
|
|
12
|
-
const dolly = element.cloneNode(true);
|
|
13
|
-
dolly.removeAttribute("id");
|
|
14
|
-
dolly.dataset.index = "-1";
|
|
15
|
-
return dolly;
|
|
16
|
-
};
|
|
17
|
-
const measureElementSizeAndPosition = (element, dimension = "width", includeAutoMargin = false)=>{
|
|
18
|
-
const pos = "width" === dimension ? "left" : "top";
|
|
19
|
-
const { [dimension]: size, [pos]: position } = element.getBoundingClientRect();
|
|
20
|
-
const { padEnd = false, padStart = false } = element.dataset;
|
|
21
|
-
const style = getComputedStyle(element);
|
|
22
|
-
const [start, end] = "width" === dimension ? LEFT_RIGHT : TOP_BOTTOM;
|
|
23
|
-
const marginStart = padStart && !includeAutoMargin ? 0 : parseInt(style.getPropertyValue(`margin-${start}`), 10);
|
|
24
|
-
const marginEnd = padEnd && !includeAutoMargin ? 0 : parseInt(style.getPropertyValue(`margin-${end}`), 10);
|
|
25
|
-
let minWidth = size;
|
|
26
|
-
const flexShrink = parseInt(style.getPropertyValue("flex-shrink"), 10);
|
|
27
|
-
if (flexShrink > 0) {
|
|
28
|
-
const flexBasis = parseInt(style.getPropertyValue("flex-basis"), 10);
|
|
29
|
-
if (!isNaN(flexBasis) && flexBasis > 0) minWidth = flexBasis;
|
|
30
|
-
}
|
|
31
|
-
return [
|
|
32
|
-
position,
|
|
33
|
-
marginStart + minWidth + marginEnd
|
|
34
|
-
];
|
|
35
|
-
};
|
|
36
|
-
const DIMENSIONS = {
|
|
37
|
-
horizontal: {
|
|
38
|
-
CLIENT_POS: "clientX",
|
|
39
|
-
CLIENT_SIZE: "clientWidth",
|
|
40
|
-
CONTRA: "top",
|
|
41
|
-
CONTRA_CLIENT_POS: "clientY",
|
|
42
|
-
CONTRA_END: "bottom",
|
|
43
|
-
CONTRA_POS: "y",
|
|
44
|
-
DIMENSION: "width",
|
|
45
|
-
END: "right",
|
|
46
|
-
POS: "x",
|
|
47
|
-
SCROLL_POS: "scrollLeft",
|
|
48
|
-
SCROLL_SIZE: "scrollWidth",
|
|
49
|
-
START: "left"
|
|
50
|
-
},
|
|
51
|
-
vertical: {
|
|
52
|
-
CLIENT_POS: "clientY",
|
|
53
|
-
CLIENT_SIZE: "clientHeight",
|
|
54
|
-
CONTRA: "left",
|
|
55
|
-
CONTRA_CLIENT_POS: "clientX",
|
|
56
|
-
CONTRA_END: "right",
|
|
57
|
-
CONTRA_POS: "x",
|
|
58
|
-
DIMENSION: "height",
|
|
59
|
-
END: "bottom",
|
|
60
|
-
POS: "y",
|
|
61
|
-
SCROLL_POS: "scrollTop",
|
|
62
|
-
SCROLL_SIZE: "scrollHeight",
|
|
63
|
-
START: "top"
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
const dimensions = (orientation)=>DIMENSIONS[orientation];
|
|
67
|
-
const getItemById = (measuredItems, id)=>{
|
|
68
|
-
const result = measuredItems.find((item)=>item.id === id);
|
|
69
|
-
if (result) return result;
|
|
70
|
-
};
|
|
71
|
-
const removeDraggedItem = (measuredItems, index)=>{
|
|
72
|
-
measuredItems.splice(index, 1);
|
|
73
|
-
for(let i = index; i < measuredItems.length; i++)measuredItems[i].currentIndex -= 1;
|
|
74
|
-
};
|
|
75
|
-
const measureDropTargets = (container, orientation, itemQuery, viewportRange, draggedItemId)=>{
|
|
76
|
-
const dragThresholds = [];
|
|
77
|
-
const { DIMENSION } = dimensions(orientation);
|
|
78
|
-
const children = Array.from(itemQuery ? container.querySelectorAll(itemQuery) : container.children);
|
|
79
|
-
const itemCount = children.length;
|
|
80
|
-
const start = "number" == typeof viewportRange?.from ? viewportRange.atEnd ? Math.max(0, viewportRange.from - 1) : viewportRange.from : 0;
|
|
81
|
-
const end = "number" == typeof viewportRange?.to ? Math.min(viewportRange.to + 2, itemCount - 1) : itemCount - 1;
|
|
82
|
-
for(let index = start; index <= end; index++){
|
|
83
|
-
const element = children[index];
|
|
84
|
-
const [start, size] = measureElementSizeAndPosition(element, DIMENSION);
|
|
85
|
-
const isLast = index === itemCount - 1;
|
|
86
|
-
const id = element.id;
|
|
87
|
-
dragThresholds.push({
|
|
88
|
-
currentIndex: index,
|
|
89
|
-
id,
|
|
90
|
-
index,
|
|
91
|
-
isDraggedItem: draggedItemId === id,
|
|
92
|
-
isLast,
|
|
93
|
-
isOverflowIndicator: "overflow" === element.dataset.index,
|
|
94
|
-
element: element,
|
|
95
|
-
start,
|
|
96
|
-
end: start + size,
|
|
97
|
-
size,
|
|
98
|
-
mid: start + size / 2
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
return dragThresholds;
|
|
102
|
-
};
|
|
103
|
-
const getIndexOfDraggedItem = (dropTargets)=>dropTargets.findIndex((d)=>d.isDraggedItem);
|
|
104
|
-
const mutateDropTargetsSwitchDropTargetPosition = (dropTargets, direction)=>{
|
|
105
|
-
const indexOfDraggedItem = getIndexOfDraggedItem(dropTargets);
|
|
106
|
-
const indexOfTarget = "fwd" === direction ? indexOfDraggedItem + 1 : indexOfDraggedItem - 1;
|
|
107
|
-
if (indexOfTarget < 0 || indexOfTarget >= dropTargets.length) throw Error("switchDropTargetPosition index out of range");
|
|
108
|
-
const draggedItem = dropTargets.at(indexOfDraggedItem);
|
|
109
|
-
const targetItem = dropTargets.at(indexOfTarget);
|
|
110
|
-
const diff = targetItem.size - draggedItem.size;
|
|
111
|
-
if ("fwd" === direction) {
|
|
112
|
-
const draggedStart = targetItem.start + diff;
|
|
113
|
-
const draggedEnd = targetItem.end;
|
|
114
|
-
const newDraggedItem = {
|
|
115
|
-
...draggedItem,
|
|
116
|
-
start: draggedStart,
|
|
117
|
-
mid: Math.floor(draggedStart + (draggedEnd - draggedStart) / 2),
|
|
118
|
-
end: draggedEnd
|
|
119
|
-
};
|
|
120
|
-
const targetStart = draggedItem.start;
|
|
121
|
-
const targetEnd = draggedItem.end + diff;
|
|
122
|
-
const newTargetItem = {
|
|
123
|
-
...targetItem,
|
|
124
|
-
start: targetStart,
|
|
125
|
-
mid: Math.floor(targetStart + (targetEnd - targetStart) / 2),
|
|
126
|
-
end: targetEnd
|
|
127
|
-
};
|
|
128
|
-
dropTargets.splice(indexOfDraggedItem, 2, newTargetItem, newDraggedItem);
|
|
129
|
-
} else {
|
|
130
|
-
const draggedStart = targetItem.start;
|
|
131
|
-
const draggedEnd = targetItem.end - diff;
|
|
132
|
-
const newDraggedItem = {
|
|
133
|
-
...draggedItem,
|
|
134
|
-
start: draggedStart,
|
|
135
|
-
mid: Math.floor(draggedStart + (draggedEnd - draggedStart) / 2),
|
|
136
|
-
end: draggedEnd
|
|
137
|
-
};
|
|
138
|
-
const targetStart = draggedItem.start - diff;
|
|
139
|
-
const targetEnd = draggedItem.end;
|
|
140
|
-
const newTargetItem = {
|
|
141
|
-
...targetItem,
|
|
142
|
-
start: targetStart,
|
|
143
|
-
mid: Math.floor(targetStart + (targetEnd - targetStart) / 2),
|
|
144
|
-
end: targetEnd
|
|
145
|
-
};
|
|
146
|
-
dropTargets.splice(indexOfTarget, 2, newDraggedItem, newTargetItem);
|
|
147
|
-
}
|
|
148
|
-
};
|
|
149
|
-
const getNextDropTarget = (dropTargets, pos, draggedItemSize, mouseMoveDirection)=>{
|
|
150
|
-
const len = dropTargets.length;
|
|
151
|
-
const indexOfDraggedItem = getIndexOfDraggedItem(dropTargets);
|
|
152
|
-
const draggedItem = dropTargets[indexOfDraggedItem];
|
|
153
|
-
if ("fwd" === mouseMoveDirection) {
|
|
154
|
-
const leadingEdge = Math.round(pos + draggedItemSize);
|
|
155
|
-
for(let index = len - 1; index >= 0; index--){
|
|
156
|
-
const dropTarget = dropTargets[index];
|
|
157
|
-
if (leadingEdge > dropTarget.mid) if (draggedItem && index < indexOfDraggedItem) return draggedItem;
|
|
158
|
-
else return dropTarget;
|
|
159
|
-
}
|
|
160
|
-
} else {
|
|
161
|
-
const leadingEdge = Math.round(pos);
|
|
162
|
-
for(let index = 0; index < len; index++){
|
|
163
|
-
const dropTarget = dropTargets[index];
|
|
164
|
-
if (leadingEdge < dropTarget.mid) if (index > indexOfDraggedItem) return draggedItem;
|
|
165
|
-
else return dropTarget;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
throw Error("no dropTarget identified");
|
|
169
|
-
};
|
|
170
|
-
function constrainRect(targetRect, constraintRect) {
|
|
171
|
-
const { height, left, top, width } = targetRect;
|
|
172
|
-
const { height: constrainedHeight, width: constrainedWidth } = constraintRect;
|
|
173
|
-
return {
|
|
174
|
-
height: Math.min(height, constrainedHeight),
|
|
175
|
-
left,
|
|
176
|
-
top,
|
|
177
|
-
width: Math.min(width, constrainedWidth)
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
const dropTargetsDebugString = (dropTargets)=>dropTargets.map((d, i)=>`\n${d.isDraggedItem ? "*" : " "}[${i}] width : ${Math.floor(d.size)} ${Math.floor(d.start)} - ${Math.floor(d.end)} (mid ${Math.floor(d.mid)}) ${d.element?.textContent} `).join("");
|
|
181
|
-
const getItemParentContainer = (container, itemQuery)=>{
|
|
182
|
-
const firstItem = container?.querySelector(`${itemQuery}:not([aria-hidden="true"])`);
|
|
183
|
-
if (firstItem) return firstItem.parentElement;
|
|
184
|
-
return null;
|
|
185
|
-
};
|
|
186
|
-
const getScrollableContainer = (container, itemQuery)=>{
|
|
187
|
-
const immediateParent = getItemParentContainer(container, itemQuery);
|
|
188
|
-
if (immediateParent === container) return container;
|
|
189
|
-
return immediateParent?.parentElement;
|
|
190
|
-
};
|
|
191
|
-
const isContainerScrollable = (scrollableContainer, orientation)=>{
|
|
192
|
-
if (null === scrollableContainer) return false;
|
|
193
|
-
{
|
|
194
|
-
const { SCROLL_SIZE, CLIENT_SIZE } = dimensions(orientation);
|
|
195
|
-
const { [SCROLL_SIZE]: scrollSize, [CLIENT_SIZE]: clientSize } = scrollableContainer;
|
|
196
|
-
return scrollSize > clientSize;
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
export { NOT_HIDDEN, NOT_OVERFLOWED, cloneElement, constrainRect, dimensions, dropTargetsDebugString, getIndexOfDraggedItem, getItemById, getItemParentContainer, getNextDropTarget, getScrollableContainer, isContainerScrollable, measureDropTargets, measureElementSizeAndPosition, mutateDropTargetsSwitchDropTargetPosition, removeDraggedItem };
|
package/src/drag-drop/index.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { useCallback, useRef } from "react";
|
|
2
|
-
import { dimensions } from "./drop-target-utils.js";
|
|
3
|
-
const useAutoScroll = ({ containerRef, onScrollingStopped, orientation = "vertical" })=>{
|
|
4
|
-
const scrollTimer = useRef(null);
|
|
5
|
-
const isScrolling = useRef(false);
|
|
6
|
-
const scrollPosRef = useRef(0);
|
|
7
|
-
const lastScrollDirectionRef = useRef("fwd");
|
|
8
|
-
const stopScrolling = useCallback((atEnd = false)=>{
|
|
9
|
-
if (null !== scrollTimer.current) {
|
|
10
|
-
clearTimeout(scrollTimer.current);
|
|
11
|
-
scrollTimer.current = null;
|
|
12
|
-
}
|
|
13
|
-
isScrolling.current = false;
|
|
14
|
-
onScrollingStopped?.(lastScrollDirectionRef.current, scrollPosRef.current, atEnd);
|
|
15
|
-
}, [
|
|
16
|
-
onScrollingStopped
|
|
17
|
-
]);
|
|
18
|
-
const startScrolling = useCallback((direction, scrollRate, scrollUnit = 100)=>{
|
|
19
|
-
const { current: container } = containerRef;
|
|
20
|
-
if (container) {
|
|
21
|
-
const { SCROLL_POS, SCROLL_SIZE, CLIENT_SIZE } = dimensions(orientation);
|
|
22
|
-
const { [SCROLL_POS]: scrollPos, [SCROLL_SIZE]: scrollSize, [CLIENT_SIZE]: clientSize } = container;
|
|
23
|
-
const maxScroll = "fwd" === direction ? scrollSize - clientSize - scrollPos : scrollPos;
|
|
24
|
-
const nextScroll = Math.min(maxScroll, scrollUnit);
|
|
25
|
-
if ("fwd" === direction) {
|
|
26
|
-
lastScrollDirectionRef.current = "fwd";
|
|
27
|
-
container[SCROLL_POS] = scrollPosRef.current = scrollPos + nextScroll;
|
|
28
|
-
} else {
|
|
29
|
-
lastScrollDirectionRef.current = "bwd";
|
|
30
|
-
container[SCROLL_POS] = scrollPosRef.current = scrollPos - nextScroll;
|
|
31
|
-
}
|
|
32
|
-
if (nextScroll === maxScroll) requestAnimationFrame(()=>{
|
|
33
|
-
stopScrolling(true);
|
|
34
|
-
});
|
|
35
|
-
else {
|
|
36
|
-
isScrolling.current = true;
|
|
37
|
-
scrollTimer.current = window.setTimeout(()=>{
|
|
38
|
-
startScrolling(direction, scrollRate, scrollUnit);
|
|
39
|
-
}, 100);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}, [
|
|
43
|
-
containerRef,
|
|
44
|
-
orientation,
|
|
45
|
-
stopScrolling
|
|
46
|
-
]);
|
|
47
|
-
return {
|
|
48
|
-
isScrolling,
|
|
49
|
-
startScrolling,
|
|
50
|
-
stopScrolling
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
export { useAutoScroll };
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import { useCallback, useMemo, useRef } from "react";
|
|
2
|
-
import { createDragSpacer } from "./Draggable.js";
|
|
3
|
-
import { mutateDropTargetsSwitchDropTargetPosition } from "./drop-target-utils.js";
|
|
4
|
-
const useDragDisplacers = (orientation = "horizontal")=>{
|
|
5
|
-
const animationFrame = useRef(0);
|
|
6
|
-
const transitioning = useRef(false);
|
|
7
|
-
const spacers = useMemo(()=>[
|
|
8
|
-
createDragSpacer(transitioning),
|
|
9
|
-
createDragSpacer()
|
|
10
|
-
], []);
|
|
11
|
-
const animateTransition = useCallback((size, propertyName = "width")=>{
|
|
12
|
-
const [spacer1, spacer2] = spacers;
|
|
13
|
-
animationFrame.current = requestAnimationFrame(()=>{
|
|
14
|
-
transitioning.current = true;
|
|
15
|
-
spacer1.style.cssText = `${propertyName}: 0px`;
|
|
16
|
-
spacer2.style.cssText = `${propertyName}: ${size}px`;
|
|
17
|
-
spacers[0] = spacer2;
|
|
18
|
-
spacers[1] = spacer1;
|
|
19
|
-
});
|
|
20
|
-
}, [
|
|
21
|
-
spacers
|
|
22
|
-
]);
|
|
23
|
-
const clearSpacers = useCallback((useTransition = false)=>{
|
|
24
|
-
if (true === useTransition) {
|
|
25
|
-
const [spacer] = spacers;
|
|
26
|
-
const cleanup = ()=>{
|
|
27
|
-
spacer.removeEventListener("transitionend", cleanup);
|
|
28
|
-
clearSpacers();
|
|
29
|
-
};
|
|
30
|
-
const propertyName = "horizontal" === orientation ? "width" : "height";
|
|
31
|
-
spacer.addEventListener("transitionend", cleanup);
|
|
32
|
-
animateTransition(0, propertyName);
|
|
33
|
-
} else spacers.forEach((spacer)=>spacer.remove());
|
|
34
|
-
}, [
|
|
35
|
-
animateTransition,
|
|
36
|
-
orientation,
|
|
37
|
-
spacers
|
|
38
|
-
]);
|
|
39
|
-
const setTerminalSpacer = useCallback((container, position, size)=>{
|
|
40
|
-
clearSpacers();
|
|
41
|
-
const propertyName = "horizontal" === orientation ? "width" : "height";
|
|
42
|
-
const [spacer] = spacers;
|
|
43
|
-
spacer.style.cssText = `${propertyName}: ${size}px`;
|
|
44
|
-
if ("start" === position) container.firstChild?.before(spacer);
|
|
45
|
-
else container.lastChild?.after(spacer);
|
|
46
|
-
}, [
|
|
47
|
-
clearSpacers,
|
|
48
|
-
orientation,
|
|
49
|
-
spacers
|
|
50
|
-
]);
|
|
51
|
-
const cancelAnyPendingAnimation = useCallback(()=>{
|
|
52
|
-
if (animationFrame.current) {
|
|
53
|
-
cancelAnimationFrame(animationFrame.current);
|
|
54
|
-
animationFrame.current = 0;
|
|
55
|
-
}
|
|
56
|
-
}, []);
|
|
57
|
-
const displaceItem = useCallback((dropTargets, dropTarget, size, useTransition = false, direction = "static")=>{
|
|
58
|
-
if (dropTarget) {
|
|
59
|
-
const propertyName = "horizontal" === orientation ? "width" : "height";
|
|
60
|
-
const [spacer1, spacer2] = spacers;
|
|
61
|
-
cancelAnyPendingAnimation();
|
|
62
|
-
if (useTransition) {
|
|
63
|
-
if (transitioning.current) {
|
|
64
|
-
clearSpacers();
|
|
65
|
-
spacer1.style.cssText = `${propertyName}: ${size}px`;
|
|
66
|
-
spacer2.style.cssText = `${propertyName}: 0px`;
|
|
67
|
-
if ("fwd" === direction) {
|
|
68
|
-
dropTarget.element.before(spacer1);
|
|
69
|
-
dropTarget.element.after(spacer2);
|
|
70
|
-
} else {
|
|
71
|
-
dropTarget.element.after(spacer1);
|
|
72
|
-
dropTarget.element.before(spacer2);
|
|
73
|
-
}
|
|
74
|
-
} else if ("fwd" === direction) dropTarget.element.after(spacer2);
|
|
75
|
-
else dropTarget.element.before(spacer2);
|
|
76
|
-
animateTransition(size, propertyName);
|
|
77
|
-
} else if ("static" === direction) {
|
|
78
|
-
spacer1.style.cssText = `${propertyName}: ${size}px`;
|
|
79
|
-
dropTarget.element.before(spacer1);
|
|
80
|
-
} else throw Error("useDragDisplacers currently only supports noTransition for static displacement");
|
|
81
|
-
if ("static" !== direction) mutateDropTargetsSwitchDropTargetPosition(dropTargets, direction);
|
|
82
|
-
return "bwd" === direction ? dropTarget.index : dropTarget.index + 1;
|
|
83
|
-
}
|
|
84
|
-
return -1;
|
|
85
|
-
}, [
|
|
86
|
-
animateTransition,
|
|
87
|
-
cancelAnyPendingAnimation,
|
|
88
|
-
clearSpacers,
|
|
89
|
-
orientation,
|
|
90
|
-
spacers
|
|
91
|
-
]);
|
|
92
|
-
const displaceLastItem = useCallback((dropTargets, dropTarget, size, useTransition = false, direction = "static")=>{
|
|
93
|
-
const propertyName = "horizontal" === orientation ? "width" : "height";
|
|
94
|
-
const [spacer1, spacer2] = spacers;
|
|
95
|
-
cancelAnyPendingAnimation();
|
|
96
|
-
if (useTransition) {
|
|
97
|
-
if (transitioning.current) {
|
|
98
|
-
clearSpacers();
|
|
99
|
-
spacer1.style.cssText = `${propertyName}: ${size}px`;
|
|
100
|
-
spacer2.style.cssText = `${propertyName}: 0px`;
|
|
101
|
-
dropTarget.element.before(spacer1);
|
|
102
|
-
dropTarget.element.after(spacer2);
|
|
103
|
-
} else if ("fwd" === direction) dropTarget.element.after(spacer2);
|
|
104
|
-
else dropTarget.element.before(spacer2);
|
|
105
|
-
animateTransition(size, propertyName);
|
|
106
|
-
} else {
|
|
107
|
-
spacer1.style.cssText = `${propertyName}: ${size}px`;
|
|
108
|
-
dropTarget.element.after(spacer1);
|
|
109
|
-
}
|
|
110
|
-
if ("static" !== direction) mutateDropTargetsSwitchDropTargetPosition(dropTargets, direction);
|
|
111
|
-
return dropTarget.index;
|
|
112
|
-
}, [
|
|
113
|
-
animateTransition,
|
|
114
|
-
cancelAnyPendingAnimation,
|
|
115
|
-
clearSpacers,
|
|
116
|
-
orientation,
|
|
117
|
-
spacers
|
|
118
|
-
]);
|
|
119
|
-
return {
|
|
120
|
-
displaceItem,
|
|
121
|
-
displaceLastItem,
|
|
122
|
-
clearSpacers,
|
|
123
|
-
setTerminalSpacer
|
|
124
|
-
};
|
|
125
|
-
};
|
|
126
|
-
export { useDragDisplacers };
|