@flux-ui/components 3.0.0-next.35 → 3.0.0-next.39
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/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/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/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 +7 -2
- 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/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 +372 -331
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7105 -6275
- 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/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/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 +2 -1
- 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 +5 -1
- 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 +7 -2
- 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 +1 -1
- 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 +4 -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/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
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
default
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
default(): VNode[];
|
|
6
|
+
}> & {
|
|
7
|
+
default(): VNode[];
|
|
6
8
|
};
|
|
7
9
|
refs: {};
|
|
8
10
|
rootEl: any;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
declare function __VLS_template(): {
|
|
3
3
|
attrs: Partial<{}>;
|
|
4
|
-
slots: {
|
|
5
|
-
default
|
|
4
|
+
slots: Readonly<{
|
|
5
|
+
default(): VNode[];
|
|
6
|
+
}> & {
|
|
7
|
+
default(): VNode[];
|
|
6
8
|
};
|
|
7
9
|
refs: {};
|
|
8
10
|
rootEl: any;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
readonly isBack?: boolean;
|
|
4
4
|
readonly mode?: 'in-out' | 'out-in';
|
|
5
5
|
};
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
7
|
attrs: Partial<{}>;
|
|
8
|
-
slots: {
|
|
9
|
-
default
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
default(): VNode[];
|
|
10
|
+
}> & {
|
|
11
|
+
default(): VNode[];
|
|
10
12
|
};
|
|
11
13
|
refs: {};
|
|
12
14
|
rootEl: any;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
readonly mode?: 'in-out' | 'out-in';
|
|
4
4
|
};
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
default
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
default(): VNode[];
|
|
9
|
+
}> & {
|
|
10
|
+
default(): VNode[];
|
|
9
11
|
};
|
|
10
12
|
refs: {};
|
|
11
13
|
rootEl: any;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
readonly mode?: 'in-out' | 'out-in';
|
|
4
4
|
};
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
default
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
default(): VNode[];
|
|
9
|
+
}> & {
|
|
10
|
+
default(): VNode[];
|
|
9
11
|
};
|
|
10
12
|
refs: {};
|
|
11
13
|
rootEl: any;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
readonly isBack?: boolean;
|
|
4
4
|
readonly mode?: 'in-out' | 'out-in';
|
|
5
5
|
};
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
7
|
attrs: Partial<{}>;
|
|
8
|
-
slots: {
|
|
9
|
-
default
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
default(): VNode[];
|
|
10
|
+
}> & {
|
|
11
|
+
default(): VNode[];
|
|
10
12
|
};
|
|
11
13
|
refs: {};
|
|
12
14
|
rootEl: any;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
readonly mode?: 'in-out' | 'out-in';
|
|
4
4
|
};
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
default
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
default(): VNode[];
|
|
9
|
+
}> & {
|
|
10
|
+
default(): VNode[];
|
|
9
11
|
};
|
|
10
12
|
refs: {};
|
|
11
13
|
rootEl: any;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
readonly mode?: 'in-out' | 'out-in';
|
|
4
4
|
};
|
|
5
5
|
declare function __VLS_template(): {
|
|
6
6
|
attrs: Partial<{}>;
|
|
7
|
-
slots: {
|
|
8
|
-
default
|
|
7
|
+
slots: Readonly<{
|
|
8
|
+
default(): VNode[];
|
|
9
|
+
}> & {
|
|
10
|
+
default(): VNode[];
|
|
9
11
|
};
|
|
10
12
|
refs: {};
|
|
11
13
|
rootEl: any;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
readonly isBack?: boolean;
|
|
4
4
|
readonly mode?: 'in-out' | 'out-in';
|
|
5
5
|
};
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
7
|
attrs: Partial<{}>;
|
|
8
|
-
slots: {
|
|
9
|
-
default
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
default(): VNode[];
|
|
10
|
+
}> & {
|
|
11
|
+
default(): VNode[];
|
|
10
12
|
};
|
|
11
13
|
refs: {};
|
|
12
14
|
rootEl: any;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
readonly isBack?: boolean;
|
|
4
4
|
readonly mode?: 'in-out' | 'out-in';
|
|
5
5
|
};
|
|
6
6
|
declare function __VLS_template(): {
|
|
7
7
|
attrs: Partial<{}>;
|
|
8
|
-
slots: {
|
|
9
|
-
default
|
|
8
|
+
slots: Readonly<{
|
|
9
|
+
default(): VNode[];
|
|
10
|
+
}> & {
|
|
11
|
+
default(): VNode[];
|
|
10
12
|
};
|
|
11
13
|
refs: {};
|
|
12
14
|
rootEl: any;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flux-ui/components",
|
|
3
3
|
"description": "A set of opiniated UI components.",
|
|
4
|
-
"version": "3.0.0-next.
|
|
4
|
+
"version": "3.0.0-next.39",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"funding": "https://github.com/sponsors/basmilius",
|
|
8
|
-
"homepage": "https://flux.
|
|
8
|
+
"homepage": "https://flux-ui.dev",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
11
|
"url": "git+https://github.com/basmilius/flux.git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
25
|
"build": "vue-tsc && vite build",
|
|
26
|
-
"dev": "vite build --mode
|
|
26
|
+
"dev": "vite build --watch --mode development"
|
|
27
27
|
},
|
|
28
28
|
"engines": {
|
|
29
29
|
"node": ">=23"
|
|
@@ -33,8 +33,7 @@
|
|
|
33
33
|
"types": "./dist/index.d.ts",
|
|
34
34
|
"default": "./dist/index.js"
|
|
35
35
|
},
|
|
36
|
-
"./style.css": "./dist/index.css"
|
|
37
|
-
"./*": "./*"
|
|
36
|
+
"./style.css": "./dist/index.css"
|
|
38
37
|
},
|
|
39
38
|
"publishConfig": {
|
|
40
39
|
"access": "public",
|
|
@@ -42,37 +41,34 @@
|
|
|
42
41
|
},
|
|
43
42
|
"files": [
|
|
44
43
|
"dist",
|
|
45
|
-
"src"
|
|
46
|
-
"tsconfig.json"
|
|
44
|
+
"src"
|
|
47
45
|
],
|
|
48
46
|
"main": "./dist/index.js",
|
|
49
47
|
"module": "./dist/index.js",
|
|
50
48
|
"types": "./dist/index.d.ts",
|
|
51
|
-
"typings": "./dist/index.d.ts",
|
|
52
|
-
"sideEffects": false,
|
|
53
49
|
"dependencies": {
|
|
54
|
-
"@basmilius/common": "^3.
|
|
55
|
-
"@basmilius/utils": "^3.
|
|
56
|
-
"@flux-ui/internals": "3.0.0-next.
|
|
57
|
-
"@flux-ui/types": "3.0.0-next.
|
|
50
|
+
"@basmilius/common": "^3.19.0",
|
|
51
|
+
"@basmilius/utils": "^3.19.0",
|
|
52
|
+
"@flux-ui/internals": "3.0.0-next.39",
|
|
53
|
+
"@flux-ui/types": "3.0.0-next.39",
|
|
58
54
|
"@fortawesome/fontawesome-common-types": "^7.2.0",
|
|
59
55
|
"clsx": "^2.1.1",
|
|
60
56
|
"imask": "^7.6.1",
|
|
61
|
-
"lodash-es": "^4.
|
|
57
|
+
"lodash-es": "^4.18.1",
|
|
62
58
|
"luxon": "^3.7.2",
|
|
63
|
-
"vue": "^3.6.0-beta.
|
|
59
|
+
"vue": "^3.6.0-beta.10"
|
|
64
60
|
},
|
|
65
61
|
"devDependencies": {
|
|
66
|
-
"@basmilius/vite-preset": "^3.
|
|
62
|
+
"@basmilius/vite-preset": "^3.19.0",
|
|
67
63
|
"@types/lodash-es": "^4.17.12",
|
|
68
64
|
"@types/luxon": "^3.7.1",
|
|
69
|
-
"@types/node": "^25.
|
|
70
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
71
|
-
"@vue/tsconfig": "^0.9.
|
|
65
|
+
"@types/node": "^25.6.0",
|
|
66
|
+
"@vitejs/plugin-vue": "^6.0.6",
|
|
67
|
+
"@vue/tsconfig": "^0.9.1",
|
|
72
68
|
"pinia": "^3.0.4",
|
|
73
|
-
"sass-embedded": "^1.
|
|
74
|
-
"typescript": "^
|
|
75
|
-
"vite": "^8.0.
|
|
76
|
-
"vue-tsc": "^3.2.
|
|
69
|
+
"sass-embedded": "^1.99.0",
|
|
70
|
+
"typescript": "^6.0.3",
|
|
71
|
+
"vite": "^8.0.10",
|
|
72
|
+
"vue-tsc": "^3.2.7"
|
|
77
73
|
}
|
|
78
74
|
}
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
<script
|
|
49
49
|
lang="ts"
|
|
50
50
|
setup>
|
|
51
|
+
import type { VNode } from 'vue';
|
|
51
52
|
import { useTranslate } from '$flux/composable/private';
|
|
52
53
|
import FluxButtonGroup from './FluxButtonGroup.vue';
|
|
53
54
|
import FluxDestructiveButton from './FluxDestructiveButton.vue';
|
|
@@ -67,12 +68,12 @@
|
|
|
67
68
|
}>();
|
|
68
69
|
|
|
69
70
|
const slots = defineSlots<{
|
|
70
|
-
primary?():
|
|
71
|
-
actionsEnd?():
|
|
72
|
-
actionsStart?():
|
|
73
|
-
actionsAfterSearch?():
|
|
74
|
-
actionsBeforeSearch?():
|
|
75
|
-
search?():
|
|
71
|
+
primary?(): VNode[];
|
|
72
|
+
actionsEnd?(): VNode[];
|
|
73
|
+
actionsStart?(): VNode[];
|
|
74
|
+
actionsAfterSearch?(): VNode[];
|
|
75
|
+
actionsBeforeSearch?(): VNode[];
|
|
76
|
+
search?(): VNode[];
|
|
76
77
|
|
|
77
78
|
filter?(props: {
|
|
78
79
|
close(): void;
|
|
@@ -81,13 +82,13 @@
|
|
|
81
82
|
readonly paneY: number;
|
|
82
83
|
readonly openerWidth: number;
|
|
83
84
|
readonly openerHeight: number;
|
|
84
|
-
}):
|
|
85
|
+
}): VNode[];
|
|
85
86
|
|
|
86
87
|
filterOpener?(props: {
|
|
87
88
|
close(): void;
|
|
88
89
|
open(): void;
|
|
89
90
|
toggle(): void;
|
|
90
|
-
}):
|
|
91
|
+
}): VNode[];
|
|
91
92
|
}>();
|
|
92
93
|
|
|
93
94
|
const translate = useTranslate();
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
<script
|
|
24
24
|
lang="ts"
|
|
25
25
|
setup>
|
|
26
|
+
import type { VNode } from 'vue';
|
|
26
27
|
import FluxButtonStack from './FluxButtonStack.vue';
|
|
27
28
|
import FluxPane from './FluxPane.vue';
|
|
28
29
|
import FluxPaneBody from './FluxPaneBody.vue';
|
|
@@ -33,8 +34,8 @@
|
|
|
33
34
|
}>();
|
|
34
35
|
|
|
35
36
|
const slots = defineSlots<{
|
|
36
|
-
default?():
|
|
37
|
-
buttons?():
|
|
38
|
-
base?():
|
|
37
|
+
default?(): VNode[];
|
|
38
|
+
buttons?(): VNode[];
|
|
39
|
+
base?(): VNode[];
|
|
39
40
|
}>();
|
|
40
41
|
</script>
|
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
lang="ts"
|
|
13
13
|
setup>
|
|
14
14
|
import { useFocusZone } from '@flux-ui/internals';
|
|
15
|
-
import { useTemplateRef } from 'vue';
|
|
15
|
+
import { useTemplateRef, type VNode } from 'vue';
|
|
16
16
|
import FluxStack from './FluxStack.vue';
|
|
17
17
|
|
|
18
18
|
defineSlots<{
|
|
19
|
-
default():
|
|
19
|
+
default(): VNode[];
|
|
20
20
|
}>();
|
|
21
21
|
|
|
22
22
|
const elementRef = useTemplateRef('element');
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="element"
|
|
4
|
+
:class="$style.adaptiveGroup"
|
|
5
|
+
:style="{'--gap': `${gap}px`}">
|
|
6
|
+
<slot/>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script
|
|
11
|
+
lang="ts"
|
|
12
|
+
setup>
|
|
13
|
+
import { animationFrameDebounce, unrefTemplateElement } from '@flux-ui/internals';
|
|
14
|
+
import { provide, shallowReactive, useTemplateRef, watch, watchEffect } from 'vue';
|
|
15
|
+
import { type FluxAdaptiveGroupChild, FluxAdaptiveGroupInjectionKey } from '$flux/data';
|
|
16
|
+
import $style from '$flux/css/component/AdaptiveSlot.module.scss';
|
|
17
|
+
|
|
18
|
+
const {
|
|
19
|
+
gap = 9
|
|
20
|
+
} = defineProps<{
|
|
21
|
+
readonly gap?: number;
|
|
22
|
+
}>();
|
|
23
|
+
|
|
24
|
+
defineSlots<{
|
|
25
|
+
default(): any;
|
|
26
|
+
}>();
|
|
27
|
+
|
|
28
|
+
const elementRef = useTemplateRef('element');
|
|
29
|
+
const children = shallowReactive(new Map<number, FluxAdaptiveGroupChild>());
|
|
30
|
+
|
|
31
|
+
const reflow = animationFrameDebounce(() => {
|
|
32
|
+
const element = unrefTemplateElement(elementRef);
|
|
33
|
+
|
|
34
|
+
if (!element) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const available = element.clientWidth;
|
|
39
|
+
const entries = Array.from(children.entries());
|
|
40
|
+
const states = new Map<number, boolean>(entries.map(([uid]) => [uid, true]));
|
|
41
|
+
|
|
42
|
+
const sorted = [...entries].sort(([, a], [, b]) => a.priority.value - b.priority.value);
|
|
43
|
+
|
|
44
|
+
const currentTotal = () => {
|
|
45
|
+
let total = 0;
|
|
46
|
+
let visible = 0;
|
|
47
|
+
|
|
48
|
+
for (const [uid, child] of entries) {
|
|
49
|
+
const width = states.get(uid)
|
|
50
|
+
? child.desiredDefaultWidth.value
|
|
51
|
+
: child.desiredFallbackWidth.value;
|
|
52
|
+
|
|
53
|
+
if (width === 0) {
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
total += width;
|
|
58
|
+
visible++;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return total + Math.max(0, visible - 1) * gap;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
while (currentTotal() > available) {
|
|
65
|
+
const victim = sorted.find(([uid]) => states.get(uid));
|
|
66
|
+
|
|
67
|
+
if (!victim) {
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
states.set(victim[0], false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
for (const [uid, child] of entries) {
|
|
75
|
+
child.isDefaultVisible.value = !!states.get(uid);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
watchEffect(() => {
|
|
80
|
+
for (const child of children.values()) {
|
|
81
|
+
// Touch reactive refs so this effect tracks them.
|
|
82
|
+
void child.priority.value;
|
|
83
|
+
void child.desiredDefaultWidth.value;
|
|
84
|
+
void child.desiredFallbackWidth.value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
reflow();
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
provide(FluxAdaptiveGroupInjectionKey, {
|
|
91
|
+
register(uid, child) {
|
|
92
|
+
children.set(uid, child);
|
|
93
|
+
},
|
|
94
|
+
unregister(uid) {
|
|
95
|
+
children.delete(uid);
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
watch(elementRef, (element, _, onCleanup) => {
|
|
100
|
+
if (!element) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const observer = new ResizeObserver(reflow);
|
|
105
|
+
observer.observe(element);
|
|
106
|
+
observer.observe(document.documentElement);
|
|
107
|
+
|
|
108
|
+
onCleanup(() => {
|
|
109
|
+
observer.disconnect();
|
|
110
|
+
});
|
|
111
|
+
}, {immediate: true});
|
|
112
|
+
</script>
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
ref="element"
|
|
4
|
+
:class="$style.adaptiveSlot"
|
|
5
|
+
:style="group ? 'flex-shrink: 0' : undefined">
|
|
6
|
+
<slot v-if="isDefaultVisible"/>
|
|
7
|
+
<slot
|
|
8
|
+
v-else
|
|
9
|
+
name="fallback"/>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div
|
|
13
|
+
ref="defaultMeasurer"
|
|
14
|
+
:class="$style.adaptiveSlotMeasurer"
|
|
15
|
+
aria-hidden="true">
|
|
16
|
+
<slot/>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div
|
|
20
|
+
ref="fallbackMeasurer"
|
|
21
|
+
:class="$style.adaptiveSlotMeasurer"
|
|
22
|
+
aria-hidden="true">
|
|
23
|
+
<slot name="fallback"/>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script
|
|
28
|
+
lang="ts"
|
|
29
|
+
setup>
|
|
30
|
+
import { animationFrameDebounce, unrefTemplateElement } from '@flux-ui/internals';
|
|
31
|
+
import { getCurrentInstance, onMounted, onUnmounted, ref, toRef, useTemplateRef, watch } from 'vue';
|
|
32
|
+
import { useAdaptiveGroupInjection } from '$flux/composable';
|
|
33
|
+
import $style from '$flux/css/component/AdaptiveSlot.module.scss';
|
|
34
|
+
|
|
35
|
+
const props = withDefaults(defineProps<{
|
|
36
|
+
readonly priority?: number;
|
|
37
|
+
}>(), {
|
|
38
|
+
priority: 1
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
defineSlots<{
|
|
42
|
+
default(): any;
|
|
43
|
+
fallback?(): any;
|
|
44
|
+
}>();
|
|
45
|
+
|
|
46
|
+
const group = useAdaptiveGroupInjection();
|
|
47
|
+
const instance = getCurrentInstance()!;
|
|
48
|
+
|
|
49
|
+
const elementRef = useTemplateRef('element');
|
|
50
|
+
const defaultMeasurerRef = useTemplateRef('defaultMeasurer');
|
|
51
|
+
const fallbackMeasurerRef = useTemplateRef('fallbackMeasurer');
|
|
52
|
+
|
|
53
|
+
const isDefaultVisible = ref(true);
|
|
54
|
+
const desiredDefaultWidth = ref(0);
|
|
55
|
+
const desiredFallbackWidth = ref(0);
|
|
56
|
+
|
|
57
|
+
const priorityRef = toRef(props, 'priority');
|
|
58
|
+
|
|
59
|
+
// Keep both desired widths in sync with the hidden measurers.
|
|
60
|
+
watch([defaultMeasurerRef, fallbackMeasurerRef], ([def, fb], _, onCleanup) => {
|
|
61
|
+
if (!def) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
const update = () => {
|
|
66
|
+
desiredDefaultWidth.value = def.offsetWidth;
|
|
67
|
+
desiredFallbackWidth.value = fb?.offsetWidth ?? 0;
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const observer = new ResizeObserver(update);
|
|
71
|
+
observer.observe(def);
|
|
72
|
+
|
|
73
|
+
if (fb) {
|
|
74
|
+
observer.observe(fb);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
observer.observe(document.documentElement);
|
|
78
|
+
|
|
79
|
+
update();
|
|
80
|
+
|
|
81
|
+
onCleanup(() => {
|
|
82
|
+
observer.disconnect();
|
|
83
|
+
});
|
|
84
|
+
}, {immediate: true});
|
|
85
|
+
|
|
86
|
+
if (group) {
|
|
87
|
+
onMounted(() => {
|
|
88
|
+
group.register(instance.uid, {
|
|
89
|
+
priority: priorityRef,
|
|
90
|
+
desiredDefaultWidth,
|
|
91
|
+
desiredFallbackWidth,
|
|
92
|
+
isDefaultVisible
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
onUnmounted(() => {
|
|
97
|
+
group.unregister(instance.uid);
|
|
98
|
+
});
|
|
99
|
+
} else {
|
|
100
|
+
// Standalone: self-measurement with parent-observer hysteresis.
|
|
101
|
+
let lastFailedParentWidth = -1;
|
|
102
|
+
|
|
103
|
+
const reflow = animationFrameDebounce(() => {
|
|
104
|
+
const element = unrefTemplateElement(elementRef);
|
|
105
|
+
|
|
106
|
+
if (!element || !isDefaultVisible.value) {
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const desired = desiredDefaultWidth.value;
|
|
111
|
+
const available = element.clientWidth;
|
|
112
|
+
|
|
113
|
+
if (desired > available) {
|
|
114
|
+
lastFailedParentWidth = element.parentElement?.clientWidth ?? -1;
|
|
115
|
+
isDefaultVisible.value = false;
|
|
116
|
+
} else {
|
|
117
|
+
lastFailedParentWidth = -1;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
watch(elementRef, (element, _, onCleanup) => {
|
|
122
|
+
if (!element) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const parent = element.parentElement;
|
|
127
|
+
|
|
128
|
+
const observer = new ResizeObserver(entries => {
|
|
129
|
+
for (const entry of entries) {
|
|
130
|
+
if (entry.target === parent && !isDefaultVisible.value) {
|
|
131
|
+
if (parent.clientWidth > lastFailedParentWidth) {
|
|
132
|
+
isDefaultVisible.value = true;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
reflow();
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
observer.observe(element);
|
|
141
|
+
|
|
142
|
+
if (parent) {
|
|
143
|
+
observer.observe(parent);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
observer.observe(document.documentElement);
|
|
147
|
+
|
|
148
|
+
onCleanup(() => {
|
|
149
|
+
observer.disconnect();
|
|
150
|
+
});
|
|
151
|
+
}, {immediate: true});
|
|
152
|
+
|
|
153
|
+
// Default content size changed: forget failure history and retry.
|
|
154
|
+
watch(desiredDefaultWidth, () => {
|
|
155
|
+
lastFailedParentWidth = -1;
|
|
156
|
+
isDefaultVisible.value = true;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
</script>
|
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<FluxPaneBody v-html="alert.message"/>
|
|
8
|
-
|
|
9
|
-
<FluxPaneFooter>
|
|
10
|
-
<FluxSpacer/>
|
|
11
|
-
|
|
2
|
+
<DialogLayout
|
|
3
|
+
:icon="alert.icon"
|
|
4
|
+
:message="alert.message"
|
|
5
|
+
:title="alert.title">
|
|
6
|
+
<template #footer>
|
|
12
7
|
<FluxPrimaryButton
|
|
13
8
|
icon-leading="circle-check"
|
|
14
9
|
:label="translate('flux.ok')"
|
|
15
10
|
@click="alert.onClose()"/>
|
|
16
|
-
</
|
|
17
|
-
</
|
|
11
|
+
</template>
|
|
12
|
+
</DialogLayout>
|
|
18
13
|
</template>
|
|
19
14
|
|
|
20
15
|
<script
|
|
@@ -22,12 +17,8 @@
|
|
|
22
17
|
setup>
|
|
23
18
|
import type { FluxAlertObject } from '@flux-ui/types';
|
|
24
19
|
import { useTranslate } from '$flux/composable/private';
|
|
25
|
-
import FluxPane from './FluxPane.vue';
|
|
26
|
-
import FluxPaneBody from './FluxPaneBody.vue';
|
|
27
|
-
import FluxPaneFooter from './FluxPaneFooter.vue';
|
|
28
|
-
import FluxPaneHeader from './FluxPaneHeader.vue';
|
|
29
20
|
import FluxPrimaryButton from './FluxPrimaryButton.vue';
|
|
30
|
-
import
|
|
21
|
+
import { DialogLayout } from './primitive';
|
|
31
22
|
|
|
32
23
|
defineProps<{
|
|
33
24
|
readonly alert: FluxAlertObject;
|