@flux-ui/components 3.0.0-next.34 → 3.0.0-next.38
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/FluxActionBar.vue.d.ts +17 -17
- package/dist/component/FluxActionPane.vue.d.ts +7 -7
- package/dist/component/{FluxActions.vue.d.ts → FluxActionStack.vue.d.ts} +11 -15
- package/dist/component/{FluxAutoGrid.vue.d.ts → FluxAdaptiveGroup.vue.d.ts} +6 -3
- package/dist/component/FluxAdaptiveSlot.vue.d.ts +35 -0
- package/dist/component/FluxAspectRatio.vue.d.ts +3 -3
- package/dist/component/FluxBadgeStack.vue.d.ts +3 -3
- package/dist/component/FluxButtonGroup.vue.d.ts +3 -3
- package/dist/component/FluxButtonStack.vue.d.ts +3 -3
- package/dist/component/FluxCalendar.vue.d.ts +3 -3
- package/dist/component/FluxCalendarEvent.vue.d.ts +3 -3
- package/dist/component/FluxCheckbox.vue.d.ts +2 -1
- package/dist/component/FluxClickablePane.vue.d.ts +5 -5
- package/dist/component/FluxColorSelect.vue.d.ts +1 -0
- package/dist/component/{FluxPaneDeck.vue.d.ts → FluxColumn.vue.d.ts} +5 -5
- package/dist/component/FluxCommandPalette.vue.d.ts +52 -0
- package/dist/component/FluxCommandPaletteGroup.vue.d.ts +8 -0
- package/dist/component/FluxCommandPaletteItem.vue.d.ts +18 -0
- package/dist/component/FluxComment.vue.d.ts +3 -3
- package/dist/component/FluxContainer.vue.d.ts +3 -3
- package/dist/component/FluxDivider.vue.d.ts +5 -3
- package/dist/component/FluxDropZone.vue.d.ts +8 -7
- package/dist/component/FluxExpandableGroup.vue.d.ts +3 -3
- package/dist/component/FluxFader.vue.d.ts +3 -3
- package/dist/component/FluxFaderItem.vue.d.ts +3 -3
- package/dist/component/FluxFilter.vue.d.ts +3 -3
- package/dist/component/FluxFilterBar.vue.d.ts +3 -3
- package/dist/component/FluxFilterBase.vue.d.ts +4 -4
- package/dist/component/FluxFilterWindow.vue.d.ts +13 -17
- package/dist/component/FluxFlyout.vue.d.ts +19 -21
- package/dist/component/FluxForm.vue.d.ts +3 -3
- package/dist/component/FluxFormColumn.vue.d.ts +3 -3
- package/dist/component/FluxFormDateInput.vue.d.ts +18 -24
- package/dist/component/FluxFormDateRangeInput.vue.d.ts +18 -21
- package/dist/component/FluxFormDateTimeInput.vue.d.ts +18 -24
- package/dist/component/FluxFormField.vue.d.ts +7 -7
- package/dist/component/FluxFormGrid.vue.d.ts +3 -3
- package/dist/component/FluxFormInput.vue.d.ts +2 -9
- package/dist/component/FluxFormInputAddition.vue.d.ts +3 -3
- package/dist/component/FluxFormInputGroup.vue.d.ts +3 -3
- package/dist/component/FluxFormPinInput.vue.d.ts +2 -4
- package/dist/component/FluxFormRangeSlider.vue.d.ts +18 -2
- package/dist/component/FluxFormRow.vue.d.ts +3 -3
- package/dist/component/FluxFormSection.vue.d.ts +3 -3
- package/dist/component/FluxFormSelect.vue.d.ts +2 -4
- package/dist/component/FluxFormSelectAsync.vue.d.ts +2 -4
- package/dist/component/FluxFormSlider.vue.d.ts +11 -2
- package/dist/component/FluxFormTextArea.vue.d.ts +2 -6
- package/dist/component/FluxFormTimeZonePicker.vue.d.ts +2 -4
- package/dist/component/FluxFormTreeViewSelect.vue.d.ts +15 -37
- package/dist/component/FluxGallery.vue.d.ts +3 -3
- package/dist/component/FluxGrid.vue.d.ts +3 -3
- package/dist/component/FluxGridColumn.vue.d.ts +3 -3
- package/dist/component/FluxIcon.vue.d.ts +1 -0
- package/dist/component/FluxInfo.vue.d.ts +3 -3
- package/dist/component/FluxInfoStack.vue.d.ts +3 -3
- package/dist/component/FluxLayerPane.vue.d.ts +20 -0
- package/dist/component/FluxLayerPaneSecondary.vue.d.ts +20 -0
- package/dist/component/FluxMenu.vue.d.ts +3 -3
- package/dist/component/FluxMenuCollapsible.vue.d.ts +47 -0
- package/dist/component/FluxMenuGroup.vue.d.ts +3 -3
- package/dist/component/FluxMenuItem.vue.d.ts +5 -3
- package/dist/component/FluxMenuOptions.vue.d.ts +3 -3
- package/dist/component/FluxNotice.vue.d.ts +5 -5
- package/dist/component/FluxNoticeStack.vue.d.ts +3 -3
- package/dist/component/FluxOverflowBar.vue.d.ts +4 -4
- package/dist/component/FluxPane.vue.d.ts +5 -5
- package/dist/component/FluxPaneBody.vue.d.ts +3 -3
- package/dist/component/FluxPaneFooter.vue.d.ts +3 -3
- package/dist/component/FluxPaneGroup.vue.d.ts +3 -3
- package/dist/component/FluxPaneHeader.vue.d.ts +6 -6
- package/dist/component/FluxPaneIllustration.vue.d.ts +5 -5
- package/dist/component/FluxPressable.vue.d.ts +3 -3
- package/dist/component/FluxPrompt.vue.d.ts +3 -17
- package/dist/component/FluxRoot.vue.d.ts +3 -3
- package/dist/component/FluxRow.vue.d.ts +23 -0
- package/dist/component/FluxSegmentedControl.vue.d.ts +3 -2
- package/dist/component/FluxSplitButton.vue.d.ts +5 -5
- package/dist/component/FluxStack.vue.d.ts +3 -3
- package/dist/component/FluxStepper.vue.d.ts +6 -6
- package/dist/component/FluxStepperStep.vue.d.ts +3 -3
- package/dist/component/FluxTab.vue.d.ts +3 -3
- package/dist/component/FluxTabBar.vue.d.ts +3 -3
- package/dist/component/FluxTabBarItem.vue.d.ts +5 -7
- package/dist/component/FluxTableActions.vue.d.ts +3 -3
- package/dist/component/FluxTableBar.vue.d.ts +3 -3
- package/dist/component/FluxTableCell.vue.d.ts +5 -5
- package/dist/component/FluxTableHeader.vue.d.ts +3 -3
- package/dist/component/FluxTableRow.vue.d.ts +3 -3
- package/dist/component/FluxTabs.vue.d.ts +6 -6
- package/dist/component/FluxTag.vue.d.ts +1 -0
- package/dist/component/FluxTagStack.vue.d.ts +3 -3
- package/dist/component/FluxTimeline.vue.d.ts +3 -3
- package/dist/component/FluxTimelineItem.vue.d.ts +3 -3
- package/dist/component/FluxToggle.vue.d.ts +2 -3
- package/dist/component/FluxToolbar.vue.d.ts +3 -3
- package/dist/component/FluxToolbarGroup.vue.d.ts +3 -3
- package/dist/component/FluxWindow.vue.d.ts +3 -3
- package/dist/component/index.d.ts +11 -3
- package/dist/component/primitive/Anchor.vue.d.ts +3 -3
- package/dist/component/primitive/AnchorPopup.vue.d.ts +3 -3
- package/dist/component/primitive/CoordinatePicker.vue.d.ts +1 -0
- package/dist/component/primitive/DialogLayout.vue.d.ts +28 -0
- package/dist/component/primitive/FilterOptionBase.vue.d.ts +2 -2
- package/dist/component/primitive/SelectBase.vue.d.ts +19 -37
- package/dist/component/primitive/SliderThumb.vue.d.ts +4 -0
- package/dist/component/primitive/TreeNodeRenderer.vue.d.ts +30 -0
- package/dist/component/primitive/index.d.ts +2 -0
- package/dist/composable/index.d.ts +1 -0
- package/dist/composable/private/index.d.ts +8 -0
- package/dist/composable/private/useAsyncFilterOptions.d.ts +14 -0
- package/dist/composable/private/useCommandPalette.d.ts +38 -0
- package/dist/composable/private/useDateFlyout.d.ts +10 -0
- package/dist/composable/private/useDropdownPopup.d.ts +27 -0
- package/dist/composable/private/useFilterOption.d.ts +12 -0
- package/dist/composable/useAdaptiveGroupInjection.d.ts +2 -0
- package/dist/data/di.d.ts +11 -0
- package/dist/data/filter.d.ts +4 -17
- package/dist/data/i18n.d.ts +17 -0
- package/dist/data/timeZones.d.ts +3 -0
- package/dist/index.css +710 -349
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6936 -5537
- package/dist/index.js.map +1 -1
- package/dist/transition/FluxAutoHeightTransition.vue.d.ts +5 -3
- package/dist/transition/FluxAutoWidthTransition.vue.d.ts +5 -3
- package/dist/transition/FluxBreakthroughTransition.vue.d.ts +5 -3
- package/dist/transition/FluxFadeTransition.vue.d.ts +5 -3
- package/dist/transition/FluxOverlayTransition.vue.d.ts +5 -3
- package/dist/transition/FluxRouteTransition.vue.d.ts +5 -3
- package/dist/transition/FluxSlideOverTransition.vue.d.ts +5 -3
- package/dist/transition/FluxTooltipTransition.vue.d.ts +5 -3
- package/dist/transition/FluxVerticalWindowTransition.vue.d.ts +5 -3
- package/dist/transition/FluxWindowTransition.vue.d.ts +5 -3
- package/package.json +19 -23
- package/src/component/FluxActionBar.vue +9 -8
- package/src/component/FluxActionPane.vue +4 -3
- package/src/component/{FluxActions.vue → FluxActionStack.vue} +2 -2
- package/src/component/FluxAdaptiveGroup.vue +112 -0
- package/src/component/FluxAdaptiveSlot.vue +159 -0
- package/src/component/FluxAlert.vue +8 -17
- package/src/component/FluxAnimatedColors.vue +1 -1
- package/src/component/FluxAspectRatio.vue +2 -1
- package/src/component/FluxBadge.vue +5 -1
- package/src/component/FluxBadgeStack.vue +2 -1
- package/src/component/FluxButtonGroup.vue +2 -1
- package/src/component/FluxButtonStack.vue +2 -1
- package/src/component/FluxCalendar.vue +8 -1
- package/src/component/FluxCalendarEvent.vue +2 -1
- package/src/component/FluxCheckbox.vue +33 -6
- package/src/component/FluxChip.vue +1 -0
- package/src/component/FluxClickablePane.vue +3 -2
- package/src/component/FluxColorPicker.vue +8 -1
- package/src/component/FluxColorSelect.vue +25 -4
- package/src/component/{FluxAutoGrid.vue → FluxColumn.vue} +5 -8
- package/src/component/FluxCommandPalette.vue +290 -0
- package/src/component/FluxCommandPaletteGroup.vue +23 -0
- package/src/component/FluxCommandPaletteItem.vue +60 -0
- package/src/component/FluxComment.vue +2 -2
- package/src/component/FluxConfirm.vue +8 -17
- package/src/component/FluxContainer.vue +3 -2
- package/src/component/FluxDataTable.vue +3 -1
- package/src/component/FluxDivider.vue +7 -3
- package/src/component/FluxDropZone.vue +22 -8
- package/src/component/FluxExpandable.vue +3 -2
- package/src/component/FluxExpandableGroup.vue +2 -2
- package/src/component/FluxFader.vue +2 -2
- package/src/component/FluxFaderItem.vue +2 -1
- package/src/component/FluxFilter.vue +2 -1
- package/src/component/FluxFilterBar.vue +3 -2
- package/src/component/FluxFilterBase.vue +17 -9
- package/src/component/FluxFilterOption.vue +3 -14
- package/src/component/FluxFilterOptionAsync.vue +17 -60
- package/src/component/FluxFilterOptions.vue +3 -25
- package/src/component/FluxFilterOptionsAsync.vue +9 -73
- package/src/component/FluxFilterWindow.vue +1 -1
- package/src/component/FluxFlyout.vue +13 -11
- package/src/component/FluxForm.vue +2 -1
- package/src/component/FluxFormColumn.vue +2 -1
- package/src/component/FluxFormDateInput.vue +9 -22
- package/src/component/FluxFormDateRangeInput.vue +20 -15
- package/src/component/FluxFormDateTimeInput.vue +17 -20
- package/src/component/FluxFormField.vue +4 -4
- package/src/component/FluxFormGrid.vue +2 -1
- package/src/component/FluxFormInput.vue +11 -10
- package/src/component/FluxFormInputAddition.vue +2 -1
- package/src/component/FluxFormInputGroup.vue +3 -2
- package/src/component/FluxFormPinInput.vue +14 -6
- package/src/component/FluxFormRangeSlider.vue +12 -2
- package/src/component/FluxFormRow.vue +2 -1
- package/src/component/FluxFormSection.vue +4 -3
- package/src/component/FluxFormSelect.vue +11 -4
- package/src/component/FluxFormSelectAsync.vue +14 -8
- package/src/component/FluxFormSlider.vue +8 -2
- package/src/component/FluxFormTextArea.vue +12 -7
- package/src/component/FluxFormTimeZonePicker.vue +13 -626
- package/src/component/FluxFormTreeViewSelect.vue +51 -79
- package/src/component/FluxGallery.vue +2 -1
- package/src/component/FluxGrid.vue +3 -2
- package/src/component/FluxGridColumn.vue +2 -1
- package/src/component/FluxIcon.vue +4 -2
- package/src/component/FluxInfo.vue +2 -1
- package/src/component/FluxInfoStack.vue +3 -2
- package/src/component/FluxLayerPane.vue +16 -0
- package/src/component/FluxLayerPaneSecondary.vue +16 -0
- package/src/component/FluxLegend.vue +9 -9
- package/src/component/FluxMenu.vue +2 -2
- package/src/component/FluxMenuCollapsible.vue +187 -0
- package/src/component/FluxMenuGroup.vue +2 -1
- package/src/component/FluxMenuItem.vue +9 -1
- package/src/component/FluxMenuOptions.vue +1 -1
- package/src/component/FluxNotice.vue +7 -2
- package/src/component/FluxNoticeStack.vue +2 -1
- package/src/component/FluxOverflowBar.vue +3 -3
- package/src/component/FluxPagination.vue +1 -0
- package/src/component/FluxPane.vue +3 -2
- package/src/component/FluxPaneBody.vue +2 -1
- package/src/component/FluxPaneFooter.vue +2 -1
- package/src/component/FluxPaneGroup.vue +2 -1
- package/src/component/FluxPaneHeader.vue +7 -6
- package/src/component/FluxPaneIllustration.vue +3 -3
- package/src/component/FluxPaneMedia.vue +1 -1
- package/src/component/FluxPercentageBar.vue +3 -1
- package/src/component/FluxPressable.vue +2 -1
- package/src/component/FluxProgressBar.vue +2 -1
- package/src/component/FluxPrompt.vue +16 -27
- package/src/component/FluxRemove.vue +4 -0
- package/src/component/FluxRoot.vue +2 -2
- package/src/component/FluxRow.vue +24 -0
- package/src/component/FluxSegmentedControl.vue +51 -4
- package/src/component/FluxSnackbar.vue +36 -12
- package/src/component/FluxSplitButton.vue +3 -2
- package/src/component/FluxStack.vue +4 -3
- package/src/component/FluxStepper.vue +3 -3
- package/src/component/FluxStepperStep.vue +2 -1
- package/src/component/FluxTab.vue +2 -1
- package/src/component/FluxTabBar.vue +3 -3
- package/src/component/FluxTableActions.vue +5 -4
- package/src/component/FluxTableBar.vue +2 -1
- package/src/component/FluxTableCell.vue +4 -3
- package/src/component/FluxTableHeader.vue +4 -2
- package/src/component/FluxTableRow.vue +2 -1
- package/src/component/FluxTabs.vue +15 -6
- package/src/component/FluxTag.vue +8 -2
- package/src/component/FluxTagStack.vue +2 -1
- package/src/component/FluxTimeline.vue +2 -1
- package/src/component/FluxTimelineItem.vue +2 -1
- package/src/component/FluxToggle.vue +20 -5
- package/src/component/FluxToolbar.vue +2 -1
- package/src/component/FluxToolbarGroup.vue +2 -1
- package/src/component/FluxTooltip.vue +1 -1
- package/src/component/FluxTreeView.vue +9 -35
- package/src/component/FluxWindow.vue +2 -2
- package/src/component/index.ts +11 -3
- package/src/component/primitive/Anchor.vue +3 -1
- package/src/component/primitive/AnchorPopup.vue +3 -3
- package/src/component/primitive/CoordinatePicker.vue +2 -1
- package/src/component/primitive/CoordinatePickerThumb.vue +2 -0
- package/src/component/primitive/DialogLayout.vue +44 -0
- package/src/component/primitive/SelectBase.vue +22 -28
- package/src/component/primitive/SliderBase.vue +0 -1
- package/src/component/primitive/SliderThumb.vue +9 -0
- package/src/component/primitive/TreeNodeRenderer.vue +77 -0
- package/src/component/primitive/index.ts +2 -0
- package/src/composable/index.ts +1 -0
- package/src/composable/private/index.ts +8 -0
- package/src/composable/private/useAsyncFilterOptions.ts +70 -0
- package/src/composable/private/useCommandPalette.ts +405 -0
- package/src/composable/private/useDateFlyout.ts +34 -0
- package/src/composable/private/useDropdownPopup.ts +99 -0
- package/src/composable/private/useFilterOption.ts +59 -0
- package/src/composable/useAdaptiveGroupInjection.ts +6 -0
- package/src/css/component/Action.module.scss +2 -2
- package/src/css/component/AdaptiveSlot.module.scss +25 -0
- package/src/css/component/Avatar.module.scss +10 -11
- package/src/css/component/Badge.module.scss +11 -4
- package/src/css/component/Button.module.scss +4 -16
- package/src/css/component/Calendar.module.scss +4 -4
- package/src/css/component/Chip.module.scss +6 -10
- package/src/css/component/Color.module.scss +1 -1
- package/src/css/component/CommandPalette.module.scss +332 -0
- package/src/css/component/DatePicker.module.scss +1 -1
- package/src/css/component/Expandable.module.scss +5 -5
- package/src/css/component/Fader.module.scss +2 -1
- package/src/css/component/Flyout.module.scss +1 -1
- package/src/css/component/FocalPoint.module.scss +1 -1
- package/src/css/component/Form.module.scss +56 -10
- package/src/css/component/Item.module.scss +4 -4
- package/src/css/component/LayerPane.module.scss +40 -0
- package/src/css/component/Layout.module.scss +11 -4
- package/src/css/component/Legend.module.scss +2 -2
- package/src/css/component/Menu.module.scss +59 -11
- package/src/css/component/Notice.module.scss +7 -7
- package/src/css/component/Overlay.module.scss +2 -2
- package/src/css/component/Pane.module.scss +10 -23
- package/src/css/component/PercentageBar.module.scss +1 -1
- package/src/css/component/Remove.module.scss +1 -1
- package/src/css/component/SegmentedControl.module.scss +1 -0
- package/src/css/component/Snackbar.module.scss +1 -1
- package/src/css/component/Statistic.module.scss +2 -2
- package/src/css/component/Stepper.module.scss +1 -1
- package/src/css/component/Tab.module.scss +11 -15
- package/src/css/component/Table.module.scss +13 -13
- package/src/css/component/Timeline.module.scss +2 -2
- package/src/css/component/Toolbar.module.scss +3 -3
- package/src/css/component/Tooltip.module.scss +3 -4
- package/src/css/component/Transition.module.scss +1 -1
- package/src/css/component/TreeView.module.scss +2 -15
- package/src/css/component/TreeViewSelect.module.scss +1 -15
- package/src/css/component/base/Button.module.scss +6 -7
- package/src/css/component/base/Effect.module.scss +2 -1
- package/src/css/component/primitive/Slider.module.scss +6 -7
- package/src/css/component/primitive/TreeNode.module.scss +19 -0
- package/src/css/mixin/button-active.scss +6 -0
- package/src/css/mixin/focus-ring.scss +1 -1
- package/src/css/mixin/index.scss +1 -0
- package/src/css/typography.scss +3 -2
- package/src/css/variables.scss +7 -2
- package/src/data/di.ts +13 -0
- package/src/data/filter.ts +24 -28
- package/src/data/i18n.ts +17 -0
- package/src/data/store.ts +46 -11
- package/src/data/timeZones.ts +619 -0
- package/src/index.ts +2 -0
- package/src/transition/FluxAutoHeightTransition.vue +5 -0
- package/src/transition/FluxAutoWidthTransition.vue +5 -0
- package/src/transition/FluxBreakthroughTransition.vue +5 -0
- package/src/transition/FluxFadeTransition.vue +5 -0
- package/src/transition/FluxOverlayTransition.vue +5 -0
- package/src/transition/FluxRouteTransition.vue +5 -0
- package/src/transition/FluxSlideOverTransition.vue +5 -0
- package/src/transition/FluxTooltipTransition.vue +5 -0
- package/src/transition/FluxVerticalWindowTransition.vue +5 -0
- package/src/transition/FluxWindowTransition.vue +5 -0
- package/dist/0db98648.svg +0 -3
- package/src/component/FluxPaneDeck.vue +0 -24
- package/src/css/component/base/Grid.module.scss +0 -8
- package/src/image/avatar-mask.svg +0 -3
- package/tsconfig.json +0 -7
|
@@ -43,16 +43,16 @@
|
|
|
43
43
|
import { useMutationObserver } from '@basmilius/common';
|
|
44
44
|
import { unrefTemplateElement, useEventListener } from '@flux-ui/internals';
|
|
45
45
|
import { clsx } from 'clsx';
|
|
46
|
-
import { onMounted, ref, useTemplateRef } from 'vue';
|
|
46
|
+
import { onMounted, ref, useTemplateRef, type VNode } from 'vue';
|
|
47
47
|
import { FluxFadeTransition } from '$flux/transition';
|
|
48
48
|
import FluxIcon from './FluxIcon.vue';
|
|
49
49
|
import $style from '$flux/css/component/Tab.module.scss';
|
|
50
50
|
|
|
51
51
|
defineSlots<{
|
|
52
|
-
default():
|
|
52
|
+
default(): VNode[];
|
|
53
53
|
}>();
|
|
54
54
|
|
|
55
|
-
const tabBarRef = useTemplateRef('tabBar');
|
|
55
|
+
const tabBarRef = useTemplateRef<HTMLElement>('tabBar');
|
|
56
56
|
|
|
57
57
|
useEventListener(tabBarRef, 'scroll', () => checkScroll());
|
|
58
58
|
useMutationObserver(tabBarRef, () => checkScroll(), {childList: true});
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FluxActionStack :class="$style.tableActions">
|
|
3
3
|
<slot/>
|
|
4
|
-
</
|
|
4
|
+
</FluxActionStack>
|
|
5
5
|
</template>
|
|
6
6
|
|
|
7
7
|
<script
|
|
8
8
|
lang="ts"
|
|
9
9
|
setup>
|
|
10
|
-
import
|
|
10
|
+
import type { VNode } from 'vue';
|
|
11
|
+
import FluxActionStack from './FluxActionStack.vue';
|
|
11
12
|
import $style from '$flux/css/component/Table.module.scss';
|
|
12
13
|
|
|
13
14
|
defineSlots<{
|
|
14
|
-
default():
|
|
15
|
+
default(): VNode[];
|
|
15
16
|
}>();
|
|
16
17
|
</script>
|
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
<script
|
|
21
21
|
lang="ts"
|
|
22
22
|
setup>
|
|
23
|
+
import type { VNode } from 'vue';
|
|
23
24
|
import { useTableInjection } from '$flux/composable';
|
|
24
25
|
import { clsx } from 'clsx';
|
|
25
26
|
import $style from '$flux/css/component/Table.module.scss';
|
|
26
27
|
|
|
27
28
|
defineSlots<{
|
|
28
|
-
default():
|
|
29
|
+
default(): VNode[];
|
|
29
30
|
}>();
|
|
30
31
|
|
|
31
32
|
const {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
:class="$style.tableCellContent"
|
|
14
14
|
:style="{
|
|
15
15
|
flexFlow: contentDirection,
|
|
16
|
-
gap: contentGap
|
|
16
|
+
gap: contentGap != null ? `${contentGap}px` : undefined
|
|
17
17
|
}">
|
|
18
18
|
<slot/>
|
|
19
19
|
</div>
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
<script
|
|
25
25
|
lang="ts"
|
|
26
26
|
setup>
|
|
27
|
+
import type { VNode } from 'vue';
|
|
27
28
|
import { clsx } from 'clsx';
|
|
28
29
|
import { useTableInjection } from '$flux/composable';
|
|
29
30
|
import $style from '$flux/css/component/Table.module.scss';
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
}>();
|
|
37
38
|
|
|
38
39
|
defineSlots<{
|
|
39
|
-
default():
|
|
40
|
-
content():
|
|
40
|
+
default(): VNode[];
|
|
41
|
+
content(): VNode[];
|
|
41
42
|
}>();
|
|
42
43
|
|
|
43
44
|
const {
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
isShrinking && $style.isShrinking,
|
|
7
7
|
isSticky && $style.isSticky
|
|
8
8
|
)"
|
|
9
|
+
scope="col"
|
|
10
|
+
:aria-sort="isSortable ? (sort ?? 'none') : undefined"
|
|
9
11
|
:style="{
|
|
10
12
|
minWidth: `${minWidth}px`
|
|
11
13
|
}">
|
|
@@ -63,7 +65,7 @@
|
|
|
63
65
|
setup>
|
|
64
66
|
import type { FluxIconName } from '@flux-ui/types';
|
|
65
67
|
import { clsx } from 'clsx';
|
|
66
|
-
import { computed } from 'vue';
|
|
68
|
+
import { computed, type VNode } from 'vue';
|
|
67
69
|
import { useTableInjection } from '$flux/composable';
|
|
68
70
|
import { useTranslate } from '$flux/composable/private';
|
|
69
71
|
import FluxFlyout from './FluxFlyout.vue';
|
|
@@ -90,7 +92,7 @@
|
|
|
90
92
|
}>();
|
|
91
93
|
|
|
92
94
|
defineSlots<{
|
|
93
|
-
default():
|
|
95
|
+
default(): VNode[];
|
|
94
96
|
}>();
|
|
95
97
|
|
|
96
98
|
const {isBordered} = useTableInjection();
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
v-for="(tab, index) of tabs"
|
|
9
9
|
:key="index">
|
|
10
10
|
<FluxTabBarItem
|
|
11
|
+
:id="`${baseId}-tab-${index}`"
|
|
12
|
+
:aria-controls="`${baseId}-panel-${index}`"
|
|
11
13
|
:icon="tab.icon"
|
|
12
14
|
:is-active="modelValue === index"
|
|
13
15
|
:label="tab.label"
|
|
@@ -33,7 +35,7 @@
|
|
|
33
35
|
setup>
|
|
34
36
|
import { flattenVNodeTree, getComponentProps } from '@flux-ui/internals';
|
|
35
37
|
import type { FluxIconName } from '@flux-ui/types';
|
|
36
|
-
import { computed, ref, unref, type VNode, watch } from 'vue';
|
|
38
|
+
import { cloneVNode, computed, ref, unref, useId, type VNode, watch } from 'vue';
|
|
37
39
|
import { FluxWindowTransition } from '$flux/transition';
|
|
38
40
|
import { VNodeRenderer } from './primitive';
|
|
39
41
|
import FluxTabBar from './FluxTabBar.vue';
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
});
|
|
46
48
|
|
|
47
49
|
const slots = defineSlots<{
|
|
48
|
-
default():
|
|
50
|
+
default(): VNode[];
|
|
49
51
|
|
|
50
52
|
content(props: {
|
|
51
53
|
activate(index: number): void;
|
|
@@ -56,7 +58,7 @@
|
|
|
56
58
|
readonly icon?: FluxIconName;
|
|
57
59
|
readonly label?: string;
|
|
58
60
|
}[];
|
|
59
|
-
}):
|
|
61
|
+
}): VNode[];
|
|
60
62
|
|
|
61
63
|
tabs(props: {
|
|
62
64
|
activate(index: number): void;
|
|
@@ -67,13 +69,20 @@
|
|
|
67
69
|
readonly icon?: FluxIconName;
|
|
68
70
|
readonly label?: string;
|
|
69
71
|
}[];
|
|
70
|
-
}):
|
|
72
|
+
}): VNode[];
|
|
71
73
|
}>();
|
|
72
74
|
|
|
75
|
+
const baseId = useId();
|
|
73
76
|
const isTransitioningBack = ref(false);
|
|
74
77
|
|
|
75
|
-
const
|
|
76
|
-
|
|
78
|
+
const rawChildren = computed(() => flattenVNodeTree(slots.default?.() ?? []));
|
|
79
|
+
|
|
80
|
+
const children = computed(() => unref(rawChildren).map((child, index) => cloneVNode(child, {
|
|
81
|
+
id: `${baseId}-panel-${index}`,
|
|
82
|
+
'aria-labelledby': `${baseId}-tab-${index}`
|
|
83
|
+
})));
|
|
84
|
+
|
|
85
|
+
const tabs = computed<{ icon?: FluxIconName; label?: string; }[]>(() => unref(rawChildren)
|
|
77
86
|
.filter((child: VNode) => getComponentProps<any>(child).icon || getComponentProps<any>(child).label)
|
|
78
87
|
.map((child: VNode) => ({
|
|
79
88
|
icon: getComponentProps<any>(child).icon,
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
color === 'danger' && $style.tagDanger,
|
|
7
7
|
color === 'info' && $style.tagInfo,
|
|
8
8
|
color === 'success' && $style.tagSuccess,
|
|
9
|
-
color === 'warning' && $style.tagWarning
|
|
9
|
+
color === 'warning' && $style.tagWarning,
|
|
10
|
+
isKeyboardShortcut && $style.tagKeyboardShortcut
|
|
10
11
|
)"
|
|
11
12
|
:component-type="type"
|
|
12
13
|
:tabindex="tabindex"
|
|
@@ -40,7 +41,8 @@
|
|
|
40
41
|
v-if="!isClickable && isDeletable"
|
|
41
42
|
:class="$style.tagClose"
|
|
42
43
|
type="button"
|
|
43
|
-
|
|
44
|
+
:aria-label="translate('flux.delete')"
|
|
45
|
+
@click.stop="onDeleteClick()">
|
|
44
46
|
<FluxIcon name="xmark"/>
|
|
45
47
|
</button>
|
|
46
48
|
</FluxPressable>
|
|
@@ -51,6 +53,7 @@
|
|
|
51
53
|
setup>
|
|
52
54
|
import type { FluxButtonEmits, FluxColor, FluxIconName, FluxPressableType, FluxTo } from '@flux-ui/types';
|
|
53
55
|
import { clsx } from 'clsx';
|
|
56
|
+
import { useTranslate } from '$flux/composable/private';
|
|
54
57
|
import FluxIcon from './FluxIcon.vue';
|
|
55
58
|
import FluxPressable from './FluxPressable.vue';
|
|
56
59
|
import FluxSpinner from './FluxSpinner.vue';
|
|
@@ -69,6 +72,7 @@
|
|
|
69
72
|
readonly icon?: FluxIconName;
|
|
70
73
|
readonly isClickable?: boolean;
|
|
71
74
|
readonly isDeletable?: boolean;
|
|
75
|
+
readonly isKeyboardShortcut?: boolean;
|
|
72
76
|
readonly isLoading?: boolean;
|
|
73
77
|
readonly label: string;
|
|
74
78
|
readonly type?: FluxPressableType;
|
|
@@ -79,6 +83,8 @@
|
|
|
79
83
|
readonly to?: FluxTo;
|
|
80
84
|
}>();
|
|
81
85
|
|
|
86
|
+
const translate = useTranslate();
|
|
87
|
+
|
|
82
88
|
function onDeleteClick(): void {
|
|
83
89
|
emit('delete');
|
|
84
90
|
}
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
<script
|
|
53
53
|
lang="ts"
|
|
54
54
|
setup>
|
|
55
|
+
import type { VNode } from 'vue';
|
|
55
56
|
import type { FluxColor, FluxIconName } from '@flux-ui/types';
|
|
56
57
|
import { clsx } from 'clsx';
|
|
57
58
|
import FluxIcon from './FluxIcon.vue';
|
|
@@ -68,6 +69,6 @@
|
|
|
68
69
|
}>();
|
|
69
70
|
|
|
70
71
|
defineSlots<{
|
|
71
|
-
default():
|
|
72
|
+
default(): VNode[];
|
|
72
73
|
}>();
|
|
73
74
|
</script>
|
|
@@ -4,10 +4,14 @@
|
|
|
4
4
|
$style.toggle,
|
|
5
5
|
modelValue && $style.isChecked,
|
|
6
6
|
disabled && $style.isDisabled,
|
|
7
|
+
isReadonly && $style.isReadonly,
|
|
8
|
+
error && $style.isInvalid,
|
|
7
9
|
isSwitch && $style.isSwitch
|
|
8
10
|
)"
|
|
9
11
|
:for="id"
|
|
10
|
-
:aria-disabled="disabled ? true : undefined"
|
|
12
|
+
:aria-disabled="disabled ? true : undefined"
|
|
13
|
+
:aria-readonly="isReadonly ? true : undefined"
|
|
14
|
+
:aria-invalid="error ? true : undefined">
|
|
11
15
|
<FluxIcon
|
|
12
16
|
v-if="iconOff"
|
|
13
17
|
:class="$style.toggleIconOff"
|
|
@@ -28,6 +32,7 @@
|
|
|
28
32
|
:checked="modelValue"
|
|
29
33
|
role="switch"
|
|
30
34
|
:aria-checked="modelValue"
|
|
35
|
+
@click="onClick"
|
|
31
36
|
@input="toggle"/>
|
|
32
37
|
</label>
|
|
33
38
|
</template>
|
|
@@ -35,7 +40,7 @@
|
|
|
35
40
|
<script
|
|
36
41
|
lang="ts"
|
|
37
42
|
setup>
|
|
38
|
-
import type { FluxIconName } from '@flux-ui/types';
|
|
43
|
+
import type { FluxFormInputBaseProps, FluxIconName } from '@flux-ui/types';
|
|
39
44
|
import { clsx } from 'clsx';
|
|
40
45
|
import { toRef } from 'vue';
|
|
41
46
|
import { useDisabled, useFormFieldInjection } from '$flux/composable';
|
|
@@ -47,18 +52,28 @@
|
|
|
47
52
|
});
|
|
48
53
|
|
|
49
54
|
const {
|
|
50
|
-
disabled: componentDisabled
|
|
51
|
-
|
|
55
|
+
disabled: componentDisabled,
|
|
56
|
+
isReadonly
|
|
57
|
+
} = defineProps<Pick<FluxFormInputBaseProps, 'disabled' | 'error' | 'isReadonly'> & {
|
|
52
58
|
readonly iconOff?: FluxIconName;
|
|
53
59
|
readonly iconOn?: FluxIconName;
|
|
54
|
-
readonly disabled?: boolean;
|
|
55
60
|
readonly isSwitch?: boolean;
|
|
56
61
|
}>();
|
|
57
62
|
|
|
58
63
|
const disabled = useDisabled(toRef(() => componentDisabled));
|
|
59
64
|
const {id} = useFormFieldInjection();
|
|
60
65
|
|
|
66
|
+
function onClick(evt: MouseEvent): void {
|
|
67
|
+
if (isReadonly) {
|
|
68
|
+
evt.preventDefault();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
61
72
|
function toggle(evt: Event): void {
|
|
73
|
+
if (isReadonly) {
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
62
77
|
modelValue.value = (evt.target as HTMLInputElement).checked;
|
|
63
78
|
}
|
|
64
79
|
</script>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
<script
|
|
19
19
|
lang="ts"
|
|
20
20
|
setup>
|
|
21
|
+
import type { VNode } from 'vue';
|
|
21
22
|
import { clsx } from 'clsx';
|
|
22
23
|
import FluxStack from './FluxStack.vue';
|
|
23
24
|
import $style from '$flux/css/component/Toolbar.module.scss';
|
|
@@ -27,6 +28,6 @@
|
|
|
27
28
|
}>();
|
|
28
29
|
|
|
29
30
|
defineSlots<{
|
|
30
|
-
default():
|
|
31
|
+
default(): VNode[];
|
|
31
32
|
}>();
|
|
32
33
|
</script>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
const elm = instance.proxy!.$el;
|
|
28
28
|
elm.removeEventListener('mouseenter', onHover);
|
|
29
29
|
elm.removeEventListener('mouseleave', onLeave);
|
|
30
|
-
window.removeEventListener('scroll', onLeave);
|
|
30
|
+
window.removeEventListener('scroll', onLeave, {capture: true});
|
|
31
31
|
onLeave();
|
|
32
32
|
});
|
|
33
33
|
|
|
@@ -16,41 +16,15 @@
|
|
|
16
16
|
role="treeitem"
|
|
17
17
|
tabindex="-1"
|
|
18
18
|
:aria-expanded="node.children?.length ? expandedIds.has(node.id) : undefined"
|
|
19
|
+
:aria-level="node.depth + 1"
|
|
19
20
|
@click="onNodeClick(node)"
|
|
20
21
|
@dblclick="onNodeDblClick(node)">
|
|
21
22
|
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<span
|
|
29
|
-
v-if="node.depth > 0"
|
|
30
|
-
:class="[$style.treeConnector, node.isLast && $style.isLast]"/>
|
|
31
|
-
|
|
32
|
-
<span
|
|
33
|
-
:class="$style.treeNodeExpand"
|
|
34
|
-
@click="onExpandClick(node, $event)">
|
|
35
|
-
<FluxIcon
|
|
36
|
-
v-if="node.children?.length"
|
|
37
|
-
:name="expandedIds.has(node.id) ? 'angle-down' : 'angle-right'"
|
|
38
|
-
:size="12"/>
|
|
39
|
-
</span>
|
|
40
|
-
</div>
|
|
41
|
-
|
|
42
|
-
<span
|
|
43
|
-
v-if="getLevelColor(node.depth, levelColors)"
|
|
44
|
-
:class="$style.treeNodeColorDot"
|
|
45
|
-
:style="{ background: getLevelColor(node.depth, levelColors) }"/>
|
|
46
|
-
|
|
47
|
-
<FluxIcon
|
|
48
|
-
v-if="node.icon"
|
|
49
|
-
:class="$style.treeNodeIcon"
|
|
50
|
-
:name="node.icon"
|
|
51
|
-
:size="16"/>
|
|
52
|
-
|
|
53
|
-
<span :class="$style.treeNodeLabel">{{ node.label }}</span>
|
|
23
|
+
<TreeNodeRenderer
|
|
24
|
+
:node="node"
|
|
25
|
+
:expanded="expandedIds.has(node.id)"
|
|
26
|
+
:level-colors="levelColors"
|
|
27
|
+
@expand-click="onExpandClick(node, $event)"/>
|
|
54
28
|
</div>
|
|
55
29
|
</div>
|
|
56
30
|
</template>
|
|
@@ -61,9 +35,9 @@
|
|
|
61
35
|
import type { FluxColor, FluxTreeViewOption } from '@flux-ui/types';
|
|
62
36
|
import { clsx } from 'clsx';
|
|
63
37
|
import { computed, ref, unref, useTemplateRef } from 'vue';
|
|
64
|
-
import { flattenVisible, getLevelColor, useTreeView } from '$flux/composable/private';
|
|
65
38
|
import type { TreeFlatNode } from '$flux/composable/private';
|
|
66
|
-
import
|
|
39
|
+
import { flattenVisible, useTreeView } from '$flux/composable/private';
|
|
40
|
+
import TreeNodeRenderer from '$flux/component/primitive/TreeNodeRenderer.vue';
|
|
67
41
|
import $style from '$flux/css/component/TreeView.module.scss';
|
|
68
42
|
|
|
69
43
|
type FlatNode = TreeFlatNode<FluxTreeViewOption>;
|
|
@@ -90,7 +64,7 @@
|
|
|
90
64
|
const {highlightedIndex, toggleExpand, onExpandClick, onKeyNavigate} = useTreeView({
|
|
91
65
|
expandedIds,
|
|
92
66
|
nodeElementRefs,
|
|
93
|
-
visibleNodes
|
|
67
|
+
visibleNodes
|
|
94
68
|
});
|
|
95
69
|
|
|
96
70
|
function onNodeClick(node: FlatNode): void {
|
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
<script
|
|
13
13
|
lang="ts"
|
|
14
14
|
setup>
|
|
15
|
-
import { ref } from 'vue';
|
|
15
|
+
import { ref, type VNode } from 'vue';
|
|
16
16
|
import { FluxWindowTransition } from '$flux/transition';
|
|
17
17
|
|
|
18
18
|
const slots = defineSlots<{
|
|
19
19
|
default(props: {
|
|
20
20
|
back(to?: string): void;
|
|
21
21
|
navigate(to: string): void;
|
|
22
|
-
}):
|
|
22
|
+
}): VNode[];
|
|
23
23
|
|
|
24
24
|
[key: string]: (props: {
|
|
25
25
|
back(to?: string): void;
|
package/src/component/index.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { default as FluxAction } from './FluxAction.vue';
|
|
2
2
|
export { default as FluxActionBar } from './FluxActionBar.vue';
|
|
3
3
|
export { default as FluxActionPane } from './FluxActionPane.vue';
|
|
4
|
-
export { default as
|
|
4
|
+
export { default as FluxActionStack } from './FluxActionStack.vue';
|
|
5
|
+
export { default as FluxAdaptiveGroup } from './FluxAdaptiveGroup.vue';
|
|
6
|
+
export { default as FluxAdaptiveSlot } from './FluxAdaptiveSlot.vue';
|
|
5
7
|
export { default as FluxAnimatedColors } from './FluxAnimatedColors.vue';
|
|
6
8
|
export { default as FluxAspectRatio } from './FluxAspectRatio.vue';
|
|
7
|
-
export { default as FluxAutoGrid } from './FluxAutoGrid.vue';
|
|
8
9
|
export { default as FluxAvatar } from './FluxAvatar.vue';
|
|
9
10
|
export { default as FluxBadge } from './FluxBadge.vue';
|
|
10
11
|
export { default as FluxBadgeStack } from './FluxBadgeStack.vue';
|
|
@@ -18,9 +19,13 @@ export { default as FluxCalendarEvent } from './FluxCalendarEvent.vue';
|
|
|
18
19
|
export { default as FluxCheckbox } from './FluxCheckbox.vue';
|
|
19
20
|
export { default as FluxChip } from './FluxChip.vue';
|
|
20
21
|
export { default as FluxClickablePane } from './FluxClickablePane.vue';
|
|
22
|
+
export { default as FluxCommandPalette } from './FluxCommandPalette.vue';
|
|
23
|
+
export { default as FluxCommandPaletteGroup } from './FluxCommandPaletteGroup.vue';
|
|
24
|
+
export { default as FluxCommandPaletteItem } from './FluxCommandPaletteItem.vue';
|
|
21
25
|
export { default as FluxComment } from './FluxComment.vue';
|
|
22
26
|
export { default as FluxColorPicker } from './FluxColorPicker.vue';
|
|
23
27
|
export { default as FluxColorSelect } from './FluxColorSelect.vue';
|
|
28
|
+
export { default as FluxColumn } from './FluxColumn.vue';
|
|
24
29
|
export { default as FluxContainer } from './FluxContainer.vue';
|
|
25
30
|
export { default as FluxDataTable } from './FluxDataTable.vue';
|
|
26
31
|
export { default as FluxDatePicker } from './FluxDatePicker.vue';
|
|
@@ -81,9 +86,12 @@ export { default as FluxItemActions } from './FluxItemActions.vue';
|
|
|
81
86
|
export { default as FluxItemContent } from './FluxItemContent.vue';
|
|
82
87
|
export { default as FluxItemMedia } from './FluxItemMedia.vue';
|
|
83
88
|
export { default as FluxItemStack } from './FluxItemStack.vue';
|
|
89
|
+
export { default as FluxLayerPane } from './FluxLayerPane.vue';
|
|
90
|
+
export { default as FluxLayerPaneSecondary } from './FluxLayerPaneSecondary.vue';
|
|
84
91
|
export { default as FluxLegend } from './FluxLegend.vue';
|
|
85
92
|
export { default as FluxLink } from './FluxLink.vue';
|
|
86
93
|
export { default as FluxMenu } from './FluxMenu.vue';
|
|
94
|
+
export { default as FluxMenuCollapsible } from './FluxMenuCollapsible.vue';
|
|
87
95
|
export { default as FluxMenuGroup } from './FluxMenuGroup.vue';
|
|
88
96
|
export { default as FluxMenuItem } from './FluxMenuItem.vue';
|
|
89
97
|
export { default as FluxMenuOptions } from './FluxMenuOptions.vue';
|
|
@@ -98,7 +106,6 @@ export { default as FluxPagination } from './FluxPagination.vue';
|
|
|
98
106
|
export { default as FluxPaginationBar } from './FluxPaginationBar.vue';
|
|
99
107
|
export { default as FluxPane } from './FluxPane.vue';
|
|
100
108
|
export { default as FluxPaneBody } from './FluxPaneBody.vue';
|
|
101
|
-
export { default as FluxPaneDeck } from './FluxPaneDeck.vue';
|
|
102
109
|
export { default as FluxPaneFooter } from './FluxPaneFooter.vue';
|
|
103
110
|
export { default as FluxPaneGroup } from './FluxPaneGroup.vue';
|
|
104
111
|
export { default as FluxPaneHeader } from './FluxPaneHeader.vue';
|
|
@@ -115,6 +122,7 @@ export { default as FluxPublishButton } from './FluxPublishButton.vue';
|
|
|
115
122
|
export { default as FluxQuantitySelector } from './FluxQuantitySelector.vue';
|
|
116
123
|
export { default as FluxRemove } from './FluxRemove.vue';
|
|
117
124
|
export { default as FluxRoot } from './FluxRoot.vue';
|
|
125
|
+
export { default as FluxRow } from './FluxRow.vue';
|
|
118
126
|
export { default as FluxSecondaryButton } from './FluxSecondaryButton.vue';
|
|
119
127
|
export { default as FluxSecondaryLinkButton } from './FluxSecondaryLinkButton.vue';
|
|
120
128
|
export { default as FluxSegmentedControl } from './FluxSegmentedControl.vue';
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import { useMutationObserver } from '@basmilius/common';
|
|
17
17
|
import { isHtmlElement } from '@basmilius/utils';
|
|
18
18
|
import type { FluxDirection } from '@flux-ui/types';
|
|
19
|
-
import { type ComponentPublicInstance, onMounted, onUnmounted, reactive, ref, unref, useTemplateRef, watchEffect } from 'vue';
|
|
19
|
+
import { type ComponentPublicInstance, onMounted, onUnmounted, reactive, ref, unref, useTemplateRef, type VNode, watchEffect } from 'vue';
|
|
20
20
|
|
|
21
21
|
const {
|
|
22
22
|
anchor,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
}>();
|
|
38
38
|
|
|
39
39
|
defineSlots<{
|
|
40
|
-
default():
|
|
40
|
+
default(): VNode[];
|
|
41
41
|
}>();
|
|
42
42
|
|
|
43
43
|
const anchorRef = ref<HTMLElement>();
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
onUnmounted(() => {
|
|
58
58
|
window.removeEventListener('resize', onResize);
|
|
59
|
-
window.removeEventListener('scroll', onScroll);
|
|
59
|
+
window.removeEventListener('scroll', onScroll, {capture: true});
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
useMutationObserver(popupRef, () => {
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="root"
|
|
4
4
|
:class="$style.coordinatePicker"
|
|
5
|
-
role="slider"
|
|
6
5
|
:aria-disabled="disabled ? true : undefined"
|
|
6
|
+
:aria-label="ariaLabel"
|
|
7
7
|
@pointerdown="onPointerDown">
|
|
8
8
|
<CoordinatePickerThumb
|
|
9
9
|
:disabled="disabled"
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
min: minProp = 0,
|
|
39
39
|
step: stepProp = 1
|
|
40
40
|
} = defineProps<{
|
|
41
|
+
readonly ariaLabel?: string;
|
|
41
42
|
readonly disabled?: boolean;
|
|
42
43
|
readonly max?: number | [number, number];
|
|
43
44
|
readonly min?: number | [number, number];
|
|
@@ -9,7 +9,9 @@
|
|
|
9
9
|
top: `${position[1] * 100}%`,
|
|
10
10
|
left: `${position[0] * 100}%`
|
|
11
11
|
}"
|
|
12
|
+
role="slider"
|
|
12
13
|
:aria-disabled="disabled ? true : undefined"
|
|
14
|
+
:aria-valuetext="`X: ${Math.round(position[0] * 100)}%, Y: ${Math.round(position[1] * 100)}%`"
|
|
13
15
|
:tabindex="disabled ? -1 : 0"
|
|
14
16
|
type="button"
|
|
15
17
|
@keydown="onKeyDown"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FluxPane>
|
|
3
|
+
<FluxPaneHeader
|
|
4
|
+
:icon="icon"
|
|
5
|
+
:title="title"/>
|
|
6
|
+
|
|
7
|
+
<FluxPaneBody
|
|
8
|
+
v-if="message"
|
|
9
|
+
v-html="message"/>
|
|
10
|
+
|
|
11
|
+
<FluxPaneBody v-if="$slots.default">
|
|
12
|
+
<slot/>
|
|
13
|
+
</FluxPaneBody>
|
|
14
|
+
|
|
15
|
+
<FluxPaneFooter>
|
|
16
|
+
<FluxSpacer/>
|
|
17
|
+
|
|
18
|
+
<slot name="footer"/>
|
|
19
|
+
</FluxPaneFooter>
|
|
20
|
+
</FluxPane>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<script
|
|
24
|
+
lang="ts"
|
|
25
|
+
setup>
|
|
26
|
+
import type { VNode } from 'vue';
|
|
27
|
+
import type { FluxIconName } from '@flux-ui/types';
|
|
28
|
+
import FluxPane from '../FluxPane.vue';
|
|
29
|
+
import FluxPaneBody from '../FluxPaneBody.vue';
|
|
30
|
+
import FluxPaneFooter from '../FluxPaneFooter.vue';
|
|
31
|
+
import FluxPaneHeader from '../FluxPaneHeader.vue';
|
|
32
|
+
import FluxSpacer from '../FluxSpacer.vue';
|
|
33
|
+
|
|
34
|
+
defineProps<{
|
|
35
|
+
readonly icon?: FluxIconName;
|
|
36
|
+
readonly message?: string;
|
|
37
|
+
readonly title: string;
|
|
38
|
+
}>();
|
|
39
|
+
|
|
40
|
+
defineSlots<{
|
|
41
|
+
default?(): VNode[];
|
|
42
|
+
footer(): VNode[];
|
|
43
|
+
}>();
|
|
44
|
+
</script>
|