@flux-ui/components 3.0.0-next.57 → 3.0.0-next.59
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/dist/component/FluxButtonStack.vue.d.ts +1 -1
- package/dist/component/FluxCalendar.vue.d.ts +63 -2
- package/dist/component/{FluxCalendarEvent.vue.d.ts → FluxCalendarItem.vue.d.ts} +9 -7
- package/dist/component/FluxClickablePane.vue.d.ts +1 -1
- package/dist/component/FluxDivider.vue.d.ts +1 -1
- package/dist/component/FluxFilter.vue.d.ts +1 -1
- package/dist/component/FluxFilterBar.vue.d.ts +1 -1
- package/dist/component/FluxFormInput.vue.d.ts +2 -2
- package/dist/component/FluxFormInputAddition.vue.d.ts +1 -1
- package/dist/component/FluxFormTreeViewSelect.vue.d.ts +3 -3
- package/dist/component/FluxGallery.vue.d.ts +1 -1
- package/dist/component/FluxInfo.vue.d.ts +1 -1
- package/dist/component/FluxKanban.vue.d.ts +17 -5
- package/dist/component/FluxKanbanColumn.vue.d.ts +13 -2
- package/dist/component/{FluxKanbanCard.vue.d.ts → FluxKanbanItem.vue.d.ts} +2 -1
- package/dist/component/FluxMenuItem.vue.d.ts +1 -1
- package/dist/component/FluxNotice.vue.d.ts +1 -1
- package/dist/component/FluxPaneHeader.vue.d.ts +1 -1
- package/dist/component/FluxPressable.vue.d.ts +1 -1
- package/dist/component/FluxPrompt.vue.d.ts +3 -3
- package/dist/component/FluxSplitButton.vue.d.ts +1 -1
- package/dist/component/FluxStack.vue.d.ts +1 -1
- package/dist/component/FluxTab.vue.d.ts +1 -1
- package/dist/component/FluxTabBar.vue.d.ts +4 -1
- package/dist/component/FluxTabs.vue.d.ts +4 -1
- package/dist/component/FluxTimelineItem.vue.d.ts +1 -1
- package/dist/component/calendar/FluxCalendarItemDisplay.vue.d.ts +9 -0
- package/dist/component/calendar/FluxCalendarMonthView.vue.d.ts +19 -0
- package/dist/component/calendar/FluxCalendarTimeGridView.vue.d.ts +36 -0
- package/dist/component/calendar/index.d.ts +3 -0
- package/dist/component/index.d.ts +2 -2
- package/dist/component/primitive/DialogLayout.vue.d.ts +1 -1
- package/dist/component/primitive/SelectBase.vue.d.ts +3 -3
- package/dist/composable/index.d.ts +3 -0
- package/dist/composable/private/index.d.ts +5 -8
- package/dist/composable/private/useAsyncFilterOptions.d.ts +1 -1
- package/dist/composable/private/useKanban.d.ts +14 -4
- package/dist/composable/private/useKanbanAutoScroll.d.ts +13 -0
- package/dist/composable/useCalendarInjection.d.ts +2 -0
- package/dist/composable/useKanbanInjection.d.ts +2 -0
- package/dist/composable/useTabBarInjection.d.ts +2 -0
- package/dist/data/di.d.ts +80 -9
- package/dist/data/i18n.d.ts +4 -0
- package/dist/index.css +1603 -1204
- package/dist/index.js +4567 -2819
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
- package/src/component/FluxAction.vue +1 -1
- package/src/component/FluxActionBar.vue +2 -2
- package/src/component/FluxActionPane.vue +1 -1
- package/src/component/FluxAdaptiveGroup.vue +2 -2
- package/src/component/FluxAdaptiveSlot.vue +2 -2
- package/src/component/FluxAlert.vue +1 -1
- package/src/component/FluxAnimatedColors.vue +1 -1
- package/src/component/FluxAspectRatio.vue +1 -1
- package/src/component/FluxAvatar.vue +2 -2
- package/src/component/FluxBadge.vue +2 -2
- package/src/component/FluxBorderShine.vue +1 -1
- package/src/component/FluxBoxedIcon.vue +1 -1
- package/src/component/FluxButton.vue +2 -2
- package/src/component/FluxButtonGroup.vue +1 -1
- package/src/component/FluxButtonStack.vue +1 -1
- package/src/component/FluxCalendar.vue +588 -179
- package/src/component/FluxCalendarItem.vue +79 -0
- package/src/component/FluxCheckbox.vue +2 -2
- package/src/component/FluxChip.vue +2 -2
- package/src/component/FluxClickablePane.vue +2 -2
- package/src/component/FluxColorPicker.vue +2 -2
- package/src/component/FluxColorSelect.vue +3 -3
- package/src/component/FluxColumn.vue +1 -1
- package/src/component/FluxCommandPalette.vue +4 -4
- package/src/component/FluxCommandPaletteGroup.vue +1 -1
- package/src/component/FluxCommandPaletteItem.vue +1 -1
- package/src/component/FluxComment.vue +2 -2
- package/src/component/FluxConfirm.vue +1 -1
- package/src/component/FluxContainer.vue +1 -1
- package/src/component/FluxDataTable.vue +1 -2
- package/src/component/FluxDatePicker.vue +3 -3
- package/src/component/FluxDestructiveButton.vue +1 -1
- package/src/component/FluxDisabled.vue +1 -1
- package/src/component/FluxDivider.vue +2 -2
- package/src/component/FluxDotPattern.vue +1 -1
- package/src/component/FluxDropZone.vue +4 -4
- package/src/component/FluxExpandable.vue +3 -3
- package/src/component/FluxExpandableGroup.vue +2 -2
- package/src/component/FluxFader.vue +1 -1
- package/src/component/FluxFaderItem.vue +1 -1
- package/src/component/FluxFilter.vue +2 -2
- package/src/component/FluxFilterBar.vue +5 -6
- package/src/component/FluxFilterBase.vue +2 -2
- package/src/component/FluxFilterDate.vue +2 -2
- package/src/component/FluxFilterDateRange.vue +2 -2
- package/src/component/FluxFilterOption.vue +2 -2
- package/src/component/FluxFilterOptionAsync.vue +1 -1
- package/src/component/FluxFilterOptions.vue +2 -2
- package/src/component/FluxFilterOptionsAsync.vue +1 -1
- package/src/component/FluxFilterRange.vue +2 -2
- package/src/component/FluxFilterWindow.vue +3 -3
- package/src/component/FluxFlickeringGrid.vue +1 -1
- package/src/component/FluxFlyout.vue +2 -2
- package/src/component/FluxFocalPointEditor.vue +3 -3
- package/src/component/FluxFocalPointImage.vue +1 -1
- package/src/component/FluxForm.vue +1 -1
- package/src/component/FluxFormColumn.vue +1 -1
- package/src/component/FluxFormDateInput.vue +3 -3
- package/src/component/FluxFormDateRangeInput.vue +4 -4
- package/src/component/FluxFormDateTimeInput.vue +3 -3
- package/src/component/FluxFormField.vue +3 -3
- package/src/component/FluxFormFieldAddition.vue +1 -1
- package/src/component/FluxFormGrid.vue +1 -1
- package/src/component/FluxFormInput.vue +3 -3
- package/src/component/FluxFormInputAddition.vue +2 -2
- package/src/component/FluxFormInputGroup.vue +2 -2
- package/src/component/FluxFormPinInput.vue +3 -3
- package/src/component/FluxFormRangeSlider.vue +3 -3
- package/src/component/FluxFormRow.vue +1 -1
- package/src/component/FluxFormSection.vue +1 -1
- package/src/component/FluxFormSelect.vue +4 -4
- package/src/component/FluxFormSelectAsync.vue +6 -6
- package/src/component/FluxFormSlider.vue +2 -2
- package/src/component/FluxFormTextArea.vue +2 -2
- package/src/component/FluxFormTimeZonePicker.vue +4 -4
- package/src/component/FluxFormTreeViewSelect.vue +9 -12
- package/src/component/FluxGallery.vue +3 -3
- package/src/component/FluxGalleryItem.vue +1 -1
- package/src/component/FluxGrid.vue +1 -1
- package/src/component/FluxGridColumn.vue +1 -1
- package/src/component/FluxGridPattern.vue +1 -1
- package/src/component/FluxIcon.vue +2 -2
- package/src/component/FluxInfo.vue +2 -2
- package/src/component/FluxItem.vue +1 -1
- package/src/component/FluxItemActions.vue +1 -1
- package/src/component/FluxItemContent.vue +1 -1
- package/src/component/FluxItemMedia.vue +1 -1
- package/src/component/FluxItemStack.vue +1 -1
- package/src/component/FluxKanban.vue +78 -7
- package/src/component/FluxKanbanColumn.vue +225 -32
- package/src/component/FluxKanbanItem.vue +162 -0
- package/src/component/FluxLayerPane.vue +1 -1
- package/src/component/FluxLayerPaneSecondary.vue +1 -1
- package/src/component/FluxLegend.vue +1 -1
- package/src/component/FluxLink.vue +1 -1
- package/src/component/FluxMenu.vue +1 -1
- package/src/component/FluxMenuCollapsible.vue +3 -3
- package/src/component/FluxMenuGroup.vue +1 -1
- package/src/component/FluxMenuItem.vue +2 -2
- package/src/component/FluxMenuSubHeader.vue +1 -1
- package/src/component/FluxMenuTitle.vue +1 -1
- package/src/component/FluxNotice.vue +3 -3
- package/src/component/FluxOverflowBar.vue +1 -1
- package/src/component/FluxOverlay.vue +3 -3
- package/src/component/FluxOverlayProvider.vue +2 -2
- package/src/component/FluxPagination.vue +3 -3
- package/src/component/FluxPaginationBar.vue +2 -2
- package/src/component/FluxPaginationButton.vue +1 -1
- package/src/component/FluxPane.vue +1 -1
- package/src/component/FluxPaneBody.vue +1 -1
- package/src/component/FluxPaneFooter.vue +1 -1
- package/src/component/FluxPaneGroup.vue +1 -1
- package/src/component/FluxPaneHeader.vue +2 -2
- package/src/component/FluxPaneIllustration.vue +1 -1
- package/src/component/FluxPaneMedia.vue +1 -1
- package/src/component/FluxPercentageBar.vue +1 -1
- package/src/component/FluxPersona.vue +1 -1
- package/src/component/FluxPlaceholder.vue +1 -1
- package/src/component/FluxPressable.vue +1 -1
- package/src/component/FluxPrimaryButton.vue +1 -1
- package/src/component/FluxPrimaryLinkButton.vue +1 -1
- package/src/component/FluxProgressBar.vue +2 -2
- package/src/component/FluxPrompt.vue +1 -1
- package/src/component/FluxPublishButton.vue +1 -1
- package/src/component/FluxQuantitySelector.vue +2 -2
- package/src/component/FluxRemove.vue +2 -2
- package/src/component/FluxRoot.vue +2 -2
- package/src/component/FluxRow.vue +1 -1
- package/src/component/FluxSecondaryButton.vue +1 -1
- package/src/component/FluxSecondaryLinkButton.vue +1 -1
- package/src/component/FluxSegmentedControl.vue +1 -1
- package/src/component/FluxSeparator.vue +1 -1
- package/src/component/FluxSlideOver.vue +3 -3
- package/src/component/FluxSnackbar.vue +2 -2
- package/src/component/FluxSnackbarProvider.vue +2 -2
- package/src/component/FluxSpacer.vue +1 -1
- package/src/component/FluxSpinner.vue +1 -1
- package/src/component/FluxSplitButton.vue +2 -2
- package/src/component/FluxStack.vue +2 -2
- package/src/component/FluxStatistic.vue +2 -2
- package/src/component/FluxStepper.vue +1 -1
- package/src/component/FluxStepperStep.vue +1 -1
- package/src/component/FluxStepperSteps.vue +2 -2
- package/src/component/FluxTab.vue +2 -2
- package/src/component/FluxTabBar.vue +75 -7
- package/src/component/FluxTabBarItem.vue +35 -4
- package/src/component/FluxTable.vue +3 -4
- package/src/component/FluxTableActions.vue +1 -1
- package/src/component/FluxTableBar.vue +3 -3
- package/src/component/FluxTableCell.vue +3 -3
- package/src/component/FluxTableHeader.vue +3 -3
- package/src/component/FluxTableRow.vue +1 -1
- package/src/component/FluxTabs.vue +10 -4
- package/src/component/FluxTag.vue +2 -2
- package/src/component/FluxTicks.vue +1 -1
- package/src/component/FluxTimeline.vue +1 -1
- package/src/component/FluxTimelineItem.vue +2 -2
- package/src/component/FluxToggle.vue +2 -2
- package/src/component/FluxToolbar.vue +2 -2
- package/src/component/FluxTooltip.vue +1 -1
- package/src/component/FluxTooltipProvider.vue +3 -3
- package/src/component/FluxTreeView.vue +3 -4
- package/src/component/FluxWindow.vue +1 -1
- package/src/component/calendar/FluxCalendarItemDisplay.vue +117 -0
- package/src/component/calendar/FluxCalendarMonthView.vue +134 -0
- package/src/component/calendar/FluxCalendarTimeGridView.vue +550 -0
- package/src/component/calendar/index.ts +3 -0
- package/src/component/index.ts +2 -2
- package/src/component/primitive/CoordinatePicker.vue +2 -2
- package/src/component/primitive/CoordinatePickerThumb.vue +2 -2
- package/src/component/primitive/DialogLayout.vue +1 -1
- package/src/component/primitive/FilterBadge.vue +2 -2
- package/src/component/primitive/FilterItem.vue +1 -1
- package/src/component/primitive/FilterMenuRenderer.ts +2 -2
- package/src/component/primitive/FilterOptionBase.vue +6 -6
- package/src/component/primitive/SelectBase.vue +13 -13
- package/src/component/primitive/SliderBase.vue +3 -3
- package/src/component/primitive/SliderThumb.vue +2 -2
- package/src/component/primitive/SliderTrack.vue +1 -1
- package/src/component/primitive/TreeNodeRenderer.vue +3 -4
- package/src/component/primitive/VNodeRenderer.ts +1 -2
- package/src/composable/index.ts +3 -0
- package/src/composable/private/index.ts +5 -8
- package/src/composable/private/useAsyncFilterOptions.ts +9 -15
- package/src/composable/private/useCommandPalette.ts +2 -2
- package/src/composable/private/useDateFlyout.ts +1 -1
- package/src/composable/private/useDropdownPopup.ts +1 -1
- package/src/composable/private/useFilterOption.ts +2 -2
- package/src/composable/private/useFormSelect.ts +2 -3
- package/src/composable/private/useKanban.ts +528 -25
- package/src/composable/private/useKanbanAutoScroll.ts +95 -0
- package/src/composable/private/useTranslate.ts +1 -2
- package/src/composable/private/useTreeView.ts +1 -1
- package/src/composable/useAdaptiveGroupInjection.ts +1 -1
- package/src/composable/useBreakpoints.ts +1 -2
- package/src/composable/useCalendarInjection.ts +6 -0
- package/src/composable/useDisabled.ts +1 -2
- package/src/composable/useDisabledInjection.ts +1 -1
- package/src/composable/useExpandableGroupInjection.ts +1 -1
- package/src/composable/useFilterInjection.ts +1 -1
- package/src/composable/useFlyoutInjection.ts +1 -1
- package/src/composable/useFormFieldInjection.ts +1 -1
- package/src/composable/useKanbanInjection.ts +12 -0
- package/src/composable/useTabBarInjection.ts +10 -0
- package/src/composable/useTableInjection.ts +1 -1
- package/src/composable/useTooltipInjection.ts +1 -1
- package/src/css/component/Action.module.scss +1 -1
- package/src/css/component/AdaptiveSlot.module.scss +5 -7
- package/src/css/component/Avatar.module.scss +1 -1
- package/src/css/component/Badge.module.scss +1 -1
- package/src/css/component/Button.module.scss +1 -1
- package/src/css/component/Calendar.module.scss +274 -44
- package/src/css/component/Chip.module.scss +1 -1
- package/src/css/component/Color.module.scss +1 -1
- package/src/css/component/CommandPalette.module.scss +1 -1
- package/src/css/component/DatePicker.module.scss +1 -1
- package/src/css/component/Expandable.module.scss +1 -1
- package/src/css/component/Form.module.scss +1 -1
- package/src/css/component/Gallery.module.scss +1 -1
- package/src/css/component/Grid.module.scss +1 -1
- package/src/css/component/Item.module.scss +1 -1
- package/src/css/component/Kanban.module.scss +189 -0
- package/src/css/component/Layout.module.scss +1 -1
- package/src/css/component/Menu.module.scss +1 -1
- package/src/css/component/Notice.module.scss +1 -1
- package/src/css/component/Overlay.module.scss +4 -4
- package/src/css/component/Pagination.module.scss +1 -1
- package/src/css/component/Pane.module.scss +2 -1
- package/src/css/component/Placeholder.module.scss +1 -1
- package/src/css/component/Remove.module.scss +1 -1
- package/src/css/component/SegmentedControl.module.scss +1 -1
- package/src/css/component/Snackbar.module.scss +1 -1
- package/src/css/component/Tab.module.scss +138 -34
- package/src/css/component/Table.module.scss +1 -1
- package/src/css/component/TreeView.module.scss +1 -1
- package/src/css/component/TreeViewSelect.module.scss +1 -1
- package/src/css/component/base/Button.module.scss +1 -1
- package/src/css/component/primitive/Slider.module.scss +1 -1
- package/src/css/component/primitive/TreeNode.module.scss +1 -1
- package/src/css/variables.scss +2 -2
- package/src/data/di.ts +94 -8
- package/src/data/filter.ts +4 -4
- package/src/data/i18n.ts +4 -0
- package/src/data/store.ts +1 -2
- package/src/transition/FluxBreakthroughTransition.vue +1 -1
- package/src/transition/FluxFadeTransition.vue +1 -1
- package/src/transition/FluxOverlayTransition.vue +1 -1
- package/src/transition/FluxRouteTransition.vue +1 -1
- package/src/transition/FluxSlideOverTransition.vue +1 -1
- package/src/transition/FluxTooltipTransition.vue +1 -1
- package/src/transition/FluxVerticalWindowTransition.vue +1 -1
- package/src/transition/FluxWindowTransition.vue +1 -1
- package/src/util/createDialogRenderer.ts +3 -4
- package/src/util/createLabelForDateRange.ts +1 -1
- package/src/component/FluxCalendarEvent.vue +0 -42
- package/src/component/FluxKanbanCard.vue +0 -105
- package/src/css/component/FluxKanban.module.scss +0 -7
- package/src/css/component/FluxKanbanCard.module.scss +0 -35
- package/src/css/component/FluxKanbanColumn.module.scss +0 -49
package/src/data/di.ts
CHANGED
|
@@ -1,34 +1,76 @@
|
|
|
1
1
|
import type { FluxFilterState, FluxFilterValue } from '@flux-ui/types';
|
|
2
|
-
import type {
|
|
2
|
+
import type { DateTime } from 'luxon';
|
|
3
|
+
import type { ComponentInternalInstance, ComputedRef, InjectionKey, Ref, VNode } from 'vue';
|
|
3
4
|
|
|
4
5
|
export const FluxAdaptiveGroupInjectionKey: InjectionKey<FluxAdaptiveGroupInjection> = Symbol();
|
|
6
|
+
export const FluxCalendarInjectionKey: InjectionKey<FluxCalendarInjection> = Symbol();
|
|
5
7
|
export const FluxDisabledInjectionKey: InjectionKey<Ref<boolean>> = Symbol();
|
|
6
8
|
export const FluxKanbanInjectionKey: InjectionKey<FluxKanbanInjection> = Symbol();
|
|
7
9
|
export const FluxExpandableGroupInjectionKey: InjectionKey<FluxExpandableGroupInjection> = Symbol();
|
|
8
10
|
export const FluxFlyoutInjectionKey: InjectionKey<FluxFlyoutInjection> = Symbol();
|
|
9
11
|
export const FluxFilterInjectionKey: InjectionKey<FluxFilterInjection> = Symbol();
|
|
10
12
|
export const FluxFormFieldInjectionKey: InjectionKey<FluxFormFieldInjection> = Symbol();
|
|
13
|
+
export const FluxTabBarInjectionKey: InjectionKey<FluxTabBarInjection> = Symbol();
|
|
11
14
|
export const FluxTableInjectionKey: InjectionKey<FluxTableInjection> = Symbol();
|
|
12
15
|
export const FluxTooltipInjectionKey: InjectionKey<FluxTooltipInjection> = Symbol();
|
|
13
16
|
|
|
17
|
+
export type FluxKanbanDragMode = 'pointer' | 'keyboard';
|
|
18
|
+
|
|
14
19
|
export type FluxKanbanDragState = {
|
|
15
|
-
readonly
|
|
20
|
+
readonly mode: FluxKanbanDragMode;
|
|
21
|
+
readonly itemId: string | number;
|
|
16
22
|
readonly fromColumnId: string | number;
|
|
17
23
|
readonly dropColumnId: string | number | null;
|
|
18
|
-
readonly
|
|
24
|
+
readonly beforeItemId: string | number | null;
|
|
25
|
+
readonly originBeforeItemId?: string | number | null;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export type FluxKanbanColumnDragState = {
|
|
29
|
+
readonly columnId: string | number;
|
|
30
|
+
readonly dropBeforeColumnId: string | number | null;
|
|
19
31
|
};
|
|
20
32
|
|
|
33
|
+
export type FluxKanbanKeyboardDirection = 'up' | 'down' | 'left' | 'right';
|
|
34
|
+
|
|
21
35
|
export type FluxKanbanInjection = {
|
|
36
|
+
readonly disabled: Ref<boolean>;
|
|
37
|
+
readonly reorderableColumns: Ref<boolean>;
|
|
22
38
|
readonly dragState: Ref<FluxKanbanDragState | null>;
|
|
39
|
+
readonly columnDragState: Ref<FluxKanbanColumnDragState | null>;
|
|
40
|
+
readonly grabbedId: Ref<string | number | null>;
|
|
41
|
+
readonly isOverColumnId: Ref<string | number | null>;
|
|
42
|
+
readonly isDropAllowed: Ref<boolean>;
|
|
43
|
+
|
|
44
|
+
registerItem(element: Element, itemId: string | number): void;
|
|
45
|
+
unregisterItem(element: Element): void;
|
|
46
|
+
getItemInfo(element: Element): { readonly itemId: string | number } | undefined;
|
|
47
|
+
registerColumn(element: Element, columnId: string | number): void;
|
|
48
|
+
unregisterColumn(element: Element): void;
|
|
49
|
+
getColumnInfo(element: Element): { readonly columnId: string | number } | undefined;
|
|
50
|
+
setBoardElement(element: Element | null): void;
|
|
51
|
+
setColumnBodyElement(columnId: string | number, element: Element | null): void;
|
|
52
|
+
enterColumn(columnId: string | number): void;
|
|
53
|
+
leaveColumn(columnId: string | number): void;
|
|
23
54
|
|
|
24
|
-
|
|
25
|
-
unregisterCard(element: Element): void;
|
|
26
|
-
getCardInfo(element: Element): { readonly cardId: string | number } | undefined;
|
|
27
|
-
startDrag(cardId: string | number, fromColumnId: string | number): void;
|
|
55
|
+
startDrag(itemId: string | number, fromColumnId: string | number): void;
|
|
28
56
|
endDrag(): void;
|
|
29
|
-
updateDropTarget(columnId: string | number,
|
|
57
|
+
updateDropTarget(columnId: string | number, beforeItemId: string | number | null): void;
|
|
30
58
|
clearDropTarget(): void;
|
|
31
59
|
commitDrop(): void;
|
|
60
|
+
|
|
61
|
+
grabItem(itemId: string | number, fromColumnId: string | number): void;
|
|
62
|
+
moveKeyboard(direction: FluxKanbanKeyboardDirection): void;
|
|
63
|
+
commitKeyboardDrop(): void;
|
|
64
|
+
cancelKeyboardDrop(): void;
|
|
65
|
+
isItemGrabbed(itemId: string | number): boolean;
|
|
66
|
+
|
|
67
|
+
startColumnDrag(columnId: string | number): void;
|
|
68
|
+
endColumnDrag(): void;
|
|
69
|
+
updateColumnDropTarget(beforeColumnId: string | number | null): void;
|
|
70
|
+
commitColumnDrop(): void;
|
|
71
|
+
|
|
72
|
+
cancelAll(): void;
|
|
73
|
+
onPointerMove(clientX: number, clientY: number): void;
|
|
32
74
|
};
|
|
33
75
|
|
|
34
76
|
export type FluxAdaptiveGroupChild = {
|
|
@@ -43,6 +85,43 @@ export type FluxAdaptiveGroupInjection = {
|
|
|
43
85
|
unregister(uid: number): void;
|
|
44
86
|
};
|
|
45
87
|
|
|
88
|
+
export type FluxCalendarView = 'month' | 'week' | 'two-days' | 'day';
|
|
89
|
+
|
|
90
|
+
export type FluxCalendarKeyboardDirection = 'up' | 'down' | 'left' | 'right';
|
|
91
|
+
|
|
92
|
+
export type FluxCalendarItemData = {
|
|
93
|
+
readonly id: string | number;
|
|
94
|
+
readonly date: DateTime;
|
|
95
|
+
readonly duration?: number;
|
|
96
|
+
readonly allDay: boolean;
|
|
97
|
+
readonly isClickable: boolean;
|
|
98
|
+
renderContent(): VNode[];
|
|
99
|
+
handleClick(evt: MouseEvent): void;
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
export type FluxCalendarInjection = {
|
|
103
|
+
readonly isDraggable: ComputedRef<boolean>;
|
|
104
|
+
readonly resolvedView: ComputedRef<FluxCalendarView>;
|
|
105
|
+
readonly hourRange: ComputedRef<readonly [number, number]>;
|
|
106
|
+
readonly pixelsPerMinute: ComputedRef<number>;
|
|
107
|
+
readonly snapMinutes: ComputedRef<number>;
|
|
108
|
+
readonly grabbedId: Ref<string | number | null>;
|
|
109
|
+
|
|
110
|
+
registerItem(id: string | number, data: FluxCalendarItemData): void;
|
|
111
|
+
unregisterItem(id: string | number): void;
|
|
112
|
+
|
|
113
|
+
registerItemElement(element: Element, id: string | number): void;
|
|
114
|
+
unregisterItemElement(element: Element): void;
|
|
115
|
+
|
|
116
|
+
onItemDragStart(id: string | number, fromDate: DateTime, evt: DragEvent): void;
|
|
117
|
+
onItemDragEnd(id: string | number): void;
|
|
118
|
+
|
|
119
|
+
onItemKeyboardGrab(id: string | number, fromDate: DateTime): void;
|
|
120
|
+
onItemKeyboardMove(direction: FluxCalendarKeyboardDirection): void;
|
|
121
|
+
onItemKeyboardCommit(): void;
|
|
122
|
+
onItemKeyboardCancel(): void;
|
|
123
|
+
};
|
|
124
|
+
|
|
46
125
|
export type FluxExpandableGroupInjection = {
|
|
47
126
|
closeAll(): void;
|
|
48
127
|
register(uid: number, expandable: ComponentInternalInstance): void;
|
|
@@ -69,6 +148,13 @@ export type FluxFormFieldInjection = {
|
|
|
69
148
|
readonly id?: string;
|
|
70
149
|
};
|
|
71
150
|
|
|
151
|
+
export type FluxTabBarInjection = {
|
|
152
|
+
readonly isPills: Ref<boolean>;
|
|
153
|
+
|
|
154
|
+
registerItem(element: Element, isActive: Ref<boolean>): void;
|
|
155
|
+
unregisterItem(element: Element): void;
|
|
156
|
+
};
|
|
157
|
+
|
|
72
158
|
export type FluxTableInjection = {
|
|
73
159
|
readonly isBordered: boolean;
|
|
74
160
|
readonly isHoverable: boolean;
|
package/src/data/filter.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { formatNumber } from '@basmilius/utils';
|
|
2
|
-
import type { FluxFilterDateEntry, FluxFilterDateRangeEntry, FluxFilterDateRangeSpec, FluxFilterDateSpec, FluxFilterEntryMap, FluxFilterOptionAsyncSpec, FluxFilterOptionEntry, FluxFilterOptionHeader, FluxFilterOptionItem,
|
|
2
|
+
import type { FluxFilterDateEntry, FluxFilterDateRangeEntry, FluxFilterDateRangeSpec, FluxFilterDateSpec, FluxFilterEntryMap, FluxFilterOptionAsyncSpec, FluxFilterOptionEntry, FluxFilterOptionHeader, FluxFilterOptionItem, FluxFilterOptionsAsyncSpec, FluxFilterOptionsEntry, FluxFilterOptionSpec, FluxFilterOptionsSpec, FluxFilterRangeEntry, FluxFilterRangeSpec, FluxFilterSpecMap, FluxFilterValueSingle } from '@flux-ui/types';
|
|
3
3
|
import { DateTime } from 'luxon';
|
|
4
|
-
import { useTranslate } from '
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import { useTranslate } from '~flux/components/composable/private';
|
|
5
|
+
import { createLabelForDateRange } from '~flux/components/util';
|
|
6
|
+
import type { FluxTranslate } from './i18n';
|
|
7
7
|
|
|
8
8
|
function parseDate(base: FluxFilterDateSpec): FluxFilterDateEntry {
|
|
9
9
|
return {
|
package/src/data/i18n.ts
CHANGED
|
@@ -36,10 +36,14 @@ export const english = {
|
|
|
36
36
|
'flux.today': 'Today',
|
|
37
37
|
'flux.selectMonth': 'Select month',
|
|
38
38
|
'flux.selectYear': 'Select year',
|
|
39
|
+
'flux.selectDate': 'Select date',
|
|
39
40
|
'flux.previousMonth': 'Previous month',
|
|
40
41
|
'flux.nextMonth': 'Next month',
|
|
41
42
|
'flux.previousYears': 'Previous years',
|
|
42
43
|
'flux.nextYears': 'Next years',
|
|
44
|
+
'flux.allDay': 'All day',
|
|
45
|
+
'flux.grabbedAnnounce': 'Item grabbed. Use arrow keys to move, Enter to drop, Escape to cancel.',
|
|
46
|
+
'flux.releasedAnnounce': 'Item released.',
|
|
43
47
|
'flux.goToPage': 'Go to page {page}',
|
|
44
48
|
'flux.pinDigit': 'Digit {index} of {total}',
|
|
45
49
|
'flux.dropFilesOrClick': 'Drop files here or click to upload',
|
package/src/data/store.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { FluxAlertObject, FluxConfirmObject, FluxPromptObject, FluxSnackbarObject, FluxTooltipObject } from '@flux-ui/types';
|
|
2
|
-
import type
|
|
3
|
-
import { computed, reactive } from 'vue';
|
|
2
|
+
import { computed, reactive, type ComputedRef } from 'vue';
|
|
4
3
|
|
|
5
4
|
export type FluxState = {
|
|
6
5
|
dialogCount: number;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { flattenVNodeTree, useFocusTrap } from '@flux-ui/internals';
|
|
2
|
-
import type
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import $style from '$flux/css/component/Overlay.module.scss';
|
|
2
|
+
import { Comment, h, onUnmounted, ref, Teleport, watch, type Component, type RenderFunction, type SetupContext, type Slots, type VNode } from 'vue';
|
|
3
|
+
import { registerDialog, useFluxStore } from '~flux/components/data';
|
|
4
|
+
import $style from '~flux/components/css/component/Overlay.module.scss';
|
|
6
5
|
|
|
7
6
|
type Emit = SetupContext<['close']>['emit'];
|
|
8
7
|
type Props = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DateTime } from 'luxon';
|
|
2
|
-
import { useTranslate } from '
|
|
2
|
+
import { useTranslate } from '~flux/components/composable/private';
|
|
3
3
|
|
|
4
4
|
export default function (start: DateTime, end: DateTime, preventCustom: boolean = false): string {
|
|
5
5
|
const translate = useTranslate();
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FluxTooltip>
|
|
3
|
-
<template #content>
|
|
4
|
-
<slot name="tooltip">
|
|
5
|
-
{{ label }}
|
|
6
|
-
</slot>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<button
|
|
10
|
-
:class="$style.calendarEvent"
|
|
11
|
-
type="button"
|
|
12
|
-
@click="onClick">
|
|
13
|
-
<span>{{ label }}</span>
|
|
14
|
-
</button>
|
|
15
|
-
</FluxTooltip>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script
|
|
19
|
-
lang="ts"
|
|
20
|
-
setup>
|
|
21
|
-
import type { VNode } from 'vue';
|
|
22
|
-
import type { DateTime } from 'luxon';
|
|
23
|
-
import FluxTooltip from './FluxTooltip.vue';
|
|
24
|
-
import $style from '$flux/css/component/Calendar.module.scss';
|
|
25
|
-
|
|
26
|
-
const emit = defineEmits<{
|
|
27
|
-
click: [MouseEvent];
|
|
28
|
-
}>();
|
|
29
|
-
|
|
30
|
-
defineProps<{
|
|
31
|
-
readonly date: DateTime | [DateTime, DateTime];
|
|
32
|
-
readonly label: string;
|
|
33
|
-
}>();
|
|
34
|
-
|
|
35
|
-
defineSlots<{
|
|
36
|
-
tooltip(): VNode[];
|
|
37
|
-
}>();
|
|
38
|
-
|
|
39
|
-
function onClick(evt: MouseEvent): void {
|
|
40
|
-
emit('click', evt);
|
|
41
|
-
}
|
|
42
|
-
</script>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div
|
|
3
|
-
ref="root"
|
|
4
|
-
data-kanban-card
|
|
5
|
-
:class="[
|
|
6
|
-
$style.kanbanCard,
|
|
7
|
-
isDragging && $style.isDragging,
|
|
8
|
-
isDropBefore && $style.isDropBefore
|
|
9
|
-
]"
|
|
10
|
-
draggable="true"
|
|
11
|
-
@dragstart="onDragStart"
|
|
12
|
-
@dragend="onDragEnd"
|
|
13
|
-
@dragover.prevent.stop="onDragOver">
|
|
14
|
-
<slot/>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script
|
|
19
|
-
lang="ts"
|
|
20
|
-
setup>
|
|
21
|
-
import { computed, inject, onMounted, onUnmounted, unref, useTemplateRef } from 'vue';
|
|
22
|
-
import { FluxKanbanInjectionKey } from '$flux/data/di';
|
|
23
|
-
import $style from '$flux/css/component/FluxKanbanCard.module.scss';
|
|
24
|
-
|
|
25
|
-
const {cardId, columnId} = defineProps<{
|
|
26
|
-
readonly cardId: string | number;
|
|
27
|
-
readonly columnId: string | number;
|
|
28
|
-
}>();
|
|
29
|
-
|
|
30
|
-
defineSlots<{
|
|
31
|
-
default?(): any;
|
|
32
|
-
}>();
|
|
33
|
-
|
|
34
|
-
const kanban = inject(FluxKanbanInjectionKey)!;
|
|
35
|
-
const root = useTemplateRef('root');
|
|
36
|
-
|
|
37
|
-
const isDragging = computed(() => unref(kanban.dragState)?.cardId === cardId);
|
|
38
|
-
|
|
39
|
-
const isDropBefore = computed(() => {
|
|
40
|
-
const state = unref(kanban.dragState);
|
|
41
|
-
|
|
42
|
-
if (!state || state.dropColumnId === null || state.beforeCardId === null) {
|
|
43
|
-
return false;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
return state.beforeCardId === cardId && state.cardId !== cardId;
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
onMounted(() => {
|
|
50
|
-
if (root.value) {
|
|
51
|
-
kanban.registerCard(root.value, cardId);
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
onUnmounted(() => {
|
|
56
|
-
if (root.value) {
|
|
57
|
-
kanban.unregisterCard(root.value);
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
function onDragStart(evt: DragEvent): void {
|
|
62
|
-
kanban.startDrag(cardId, columnId);
|
|
63
|
-
|
|
64
|
-
if (evt.dataTransfer) {
|
|
65
|
-
evt.dataTransfer.effectAllowed = 'move';
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
function onDragEnd(): void {
|
|
70
|
-
kanban.endDrag();
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
function onDragOver(evt: DragEvent): void {
|
|
74
|
-
const state = unref(kanban.dragState);
|
|
75
|
-
|
|
76
|
-
if (!state) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
const cardEl = evt.currentTarget as Element;
|
|
81
|
-
const rect = cardEl.getBoundingClientRect();
|
|
82
|
-
|
|
83
|
-
if (evt.clientY < rect.top + rect.height / 2) {
|
|
84
|
-
// Drop before this card
|
|
85
|
-
kanban.updateDropTarget(columnId, cardId);
|
|
86
|
-
} else {
|
|
87
|
-
// Drop after this card = before the next sibling card
|
|
88
|
-
let next = cardEl.nextElementSibling;
|
|
89
|
-
|
|
90
|
-
while (next) {
|
|
91
|
-
const info = kanban.getCardInfo(next);
|
|
92
|
-
|
|
93
|
-
if (info) {
|
|
94
|
-
kanban.updateDropTarget(columnId, info.cardId);
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
next = next.nextElementSibling;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// No next sibling → append to end of column
|
|
102
|
-
kanban.updateDropTarget(columnId, null);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
</script>
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
.kanbanCard {
|
|
2
|
-
position: relative;
|
|
3
|
-
padding: 12px;
|
|
4
|
-
background: var(--gray-25);
|
|
5
|
-
border: 1px solid var(--gray-200);
|
|
6
|
-
border-radius: var(--radius);
|
|
7
|
-
cursor: grab;
|
|
8
|
-
transition: opacity 180ms var(--swift-out), box-shadow 180ms var(--swift-out);
|
|
9
|
-
user-select: none;
|
|
10
|
-
|
|
11
|
-
&:active {
|
|
12
|
-
cursor: grabbing;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
&:hover {
|
|
16
|
-
box-shadow: 0 1px 4px rgb(0 0 0 / .08);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.isDragging {
|
|
21
|
-
opacity: .4;
|
|
22
|
-
cursor: grabbing;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.isDropBefore {
|
|
26
|
-
&::before {
|
|
27
|
-
content: '';
|
|
28
|
-
position: absolute;
|
|
29
|
-
inset-inline: 0;
|
|
30
|
-
top: -6px;
|
|
31
|
-
height: 2px;
|
|
32
|
-
border-radius: 999px;
|
|
33
|
-
background: var(--primary-500);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
.kanbanColumn {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-flow: column;
|
|
4
|
-
flex-shrink: 0;
|
|
5
|
-
width: 280px;
|
|
6
|
-
background: var(--gray-100);
|
|
7
|
-
border: 1px solid var(--gray-200);
|
|
8
|
-
border-radius: var(--radius);
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.kanbanColumnHeader {
|
|
13
|
-
display: flex;
|
|
14
|
-
align-items: center;
|
|
15
|
-
gap: 9px;
|
|
16
|
-
padding: 12px 15px;
|
|
17
|
-
border-bottom: 1px solid var(--gray-200);
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.kanbanColumnLabel {
|
|
21
|
-
flex: 1;
|
|
22
|
-
font-size: .8125rem;
|
|
23
|
-
font-weight: 600;
|
|
24
|
-
color: var(--foreground);
|
|
25
|
-
letter-spacing: .01em;
|
|
26
|
-
text-transform: uppercase;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.kanbanColumnBody {
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-flow: column;
|
|
32
|
-
gap: 9px;
|
|
33
|
-
padding: 9px;
|
|
34
|
-
min-height: 60px;
|
|
35
|
-
flex: 1;
|
|
36
|
-
overflow-y: auto;
|
|
37
|
-
transition: background 180ms var(--swift-out);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.isOver .kanbanColumnBody {
|
|
41
|
-
background: rgb(from var(--primary-500) r g b / .06);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.kanbanDropIndicator {
|
|
45
|
-
height: 2px;
|
|
46
|
-
border-radius: 999px;
|
|
47
|
-
background: var(--primary-500);
|
|
48
|
-
flex-shrink: 0;
|
|
49
|
-
}
|