@flux-ui/components 3.0.0-next.73 → 3.0.0-next.74
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/FluxKanbanColumn.vue.d.ts +1 -1
- package/dist/component/FluxSegmentedControl.vue.d.ts +18 -8
- package/dist/component/FluxSegmentedControlItem.vue.d.ts +20 -0
- package/dist/component/FluxSpacing.vue.d.ts +2 -1
- package/dist/component/index.d.ts +1 -1
- package/dist/component/primitive/FilterMenuRenderer.d.ts +3 -3
- package/dist/composable/index.d.ts +1 -0
- package/dist/composable/useSegmentedControlInjection.d.ts +2 -0
- package/dist/data/di.d.ts +10 -1
- package/dist/index.css +55 -25
- package/dist/index.js +375 -312
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/component/FluxBoxedIcon.vue +1 -1
- package/src/component/FluxCalendar.vue +6 -6
- package/src/component/FluxColorPicker.vue +5 -5
- package/src/component/FluxDropZone.vue +0 -1
- package/src/component/FluxDynamicView.vue +2 -2
- package/src/component/FluxExpandableGroup.vue +0 -1
- package/src/component/FluxFilterBase.vue +11 -11
- package/src/component/FluxFormFieldAddition.vue +2 -2
- package/src/component/FluxInfo.vue +2 -2
- package/src/component/FluxInfoStack.vue +2 -2
- package/src/component/FluxKanbanColumn.vue +2 -4
- package/src/component/FluxLayerPane.vue +1 -1
- package/src/component/FluxPagination.vue +4 -4
- package/src/component/FluxSegmentedControl.vue +64 -67
- package/src/component/FluxSegmentedControlItem.vue +98 -0
- package/src/component/FluxSpacing.vue +5 -1
- package/src/component/FluxSplitButton.vue +2 -2
- package/src/component/FluxTable.vue +3 -1
- package/src/component/FluxToolbar.vue +1 -1
- package/src/component/index.ts +1 -1
- package/src/component/primitive/FilterBadge.vue +11 -2
- package/src/component/primitive/FilterMenuRenderer.ts +4 -4
- package/src/composable/index.ts +1 -0
- package/src/composable/useSegmentedControlInjection.ts +13 -0
- package/src/css/component/Form.module.scss +2 -2
- package/src/css/component/SegmentedControl.module.scss +53 -24
- package/src/css/component/Spinner.module.scss +1 -0
- package/src/css/component/Visual.module.scss +1 -0
- package/src/css/mixin/tree-node.scss +3 -3
- package/src/data/di.ts +13 -1
- package/src/data/iconRegistry.ts +1 -1
- package/src/util/createDialogRenderer.ts +1 -1
- package/dist/component/FluxSegmentedView.vue.d.ts +0 -9
- package/src/component/FluxSegmentedView.vue +0 -15
|
@@ -2,7 +2,7 @@ import { FluxIconName } from '@flux-ui/types';
|
|
|
2
2
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
readonly columnId: string | number;
|
|
5
|
-
readonly count
|
|
5
|
+
readonly count?: string | number;
|
|
6
6
|
readonly disabled?: boolean;
|
|
7
7
|
readonly icon?: FluxIconName;
|
|
8
8
|
readonly label: string;
|
|
@@ -1,17 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { FluxSize } from '@flux-ui/types';
|
|
2
|
+
import { VNode, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { FluxSegmentedControlValue } from '../data';
|
|
3
4
|
type __VLS_Props = {
|
|
4
5
|
readonly ariaLabel?: string;
|
|
5
6
|
readonly isFill?: boolean;
|
|
6
|
-
readonly
|
|
7
|
+
readonly size?: FluxSize;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_Slots = {
|
|
10
|
+
default(): VNode[];
|
|
7
11
|
};
|
|
8
12
|
type __VLS_ModelProps = {
|
|
9
|
-
modelValue?:
|
|
13
|
+
modelValue?: FluxSegmentedControlValue;
|
|
10
14
|
};
|
|
11
15
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
-
declare const
|
|
13
|
-
"update:modelValue": (value:
|
|
16
|
+
declare const __VLS_base: DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
17
|
+
"update:modelValue": (value: FluxSegmentedControlValue) => any;
|
|
14
18
|
}, string, PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
-
"onUpdate:modelValue"?: (value:
|
|
16
|
-
}>, {}, {}, {}, {}, string, ComponentProvideOptions,
|
|
19
|
+
"onUpdate:modelValue"?: (value: FluxSegmentedControlValue) => any;
|
|
20
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
21
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
17
22
|
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FluxIconName } from '@flux-ui/types';
|
|
2
|
+
import { FluxSegmentedControlValue } from '../data';
|
|
3
|
+
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
readonly value: FluxSegmentedControlValue;
|
|
6
|
+
readonly disabled?: boolean;
|
|
7
|
+
readonly icon?: FluxIconName;
|
|
8
|
+
readonly label?: string;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Slots = {
|
|
11
|
+
default(): any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
declare const spacings: readonly [0, 3, 6, 9, 12, 15, 18, 24, 30, 36, 42, 48, 54, 60, 72, 84, 90, 120];
|
|
3
|
+
type Enumerate<N extends number, Acc extends number[] = []> = Acc['length'] extends N ? Acc[number] : Enumerate<N, [...Acc, Acc['length']]>;
|
|
3
4
|
type __VLS_Props = {
|
|
4
|
-
readonly size:
|
|
5
|
+
readonly size: Enumerate<typeof spacings['length']>;
|
|
5
6
|
};
|
|
6
7
|
declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
|
|
7
8
|
export default _default;
|
|
@@ -130,7 +130,7 @@ export { default as FluxScroller } from './FluxScroller.vue';
|
|
|
130
130
|
export { default as FluxSecondaryButton } from './FluxSecondaryButton.vue';
|
|
131
131
|
export { default as FluxSecondaryLinkButton } from './FluxSecondaryLinkButton.vue';
|
|
132
132
|
export { default as FluxSegmentedControl } from './FluxSegmentedControl.vue';
|
|
133
|
-
export { default as
|
|
133
|
+
export { default as FluxSegmentedControlItem } from './FluxSegmentedControlItem.vue';
|
|
134
134
|
export { default as FluxSeparator } from './FluxSeparator.vue';
|
|
135
135
|
export { default as FluxSlideOver } from './FluxSlideOver.vue';
|
|
136
136
|
export { default as FluxSnackbar } from './FluxSnackbar.vue';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { VNode, DefineComponent, ExtractPropTypes, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
1
|
+
import { PropType, VNode, DefineComponent, ExtractPropTypes, RendererNode, RendererElement, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
|
|
2
2
|
export declare const FilterMenuRenderer: DefineComponent<ExtractPropTypes<{
|
|
3
3
|
menuItems: {
|
|
4
4
|
required: true;
|
|
@@ -6,7 +6,7 @@ export declare const FilterMenuRenderer: DefineComponent<ExtractPropTypes<{
|
|
|
6
6
|
};
|
|
7
7
|
navigate: {
|
|
8
8
|
required: true;
|
|
9
|
-
type:
|
|
9
|
+
type: PropType<(name: string) => void>;
|
|
10
10
|
};
|
|
11
11
|
}>, () => VNode< RendererNode, RendererElement, {
|
|
12
12
|
[key: string]: any;
|
|
@@ -17,6 +17,6 @@ export declare const FilterMenuRenderer: DefineComponent<ExtractPropTypes<{
|
|
|
17
17
|
};
|
|
18
18
|
navigate: {
|
|
19
19
|
required: true;
|
|
20
|
-
type:
|
|
20
|
+
type: PropType<(name: string) => void>;
|
|
21
21
|
};
|
|
22
22
|
}>> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
|
|
@@ -8,6 +8,7 @@ export { default as useFilterInjection } from './useFilterInjection';
|
|
|
8
8
|
export { default as useFlyoutInjection } from './useFlyoutInjection';
|
|
9
9
|
export { default as useFormFieldInjection } from './useFormFieldInjection';
|
|
10
10
|
export { default as useKanbanInjection } from './useKanbanInjection';
|
|
11
|
+
export { default as useSegmentedControlInjection } from './useSegmentedControlInjection';
|
|
11
12
|
export { default as useTabBarInjection } from './useTabBarInjection';
|
|
12
13
|
export { default as useTableInjection } from './useTableInjection';
|
|
13
14
|
export { default as useTooltipInjection } from './useTooltipInjection';
|
package/dist/data/di.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FluxFilterDefinition, FluxFilterState, FluxFilterValue } from '@flux-ui/types';
|
|
1
|
+
import { FluxFilterDefinition, FluxFilterState, FluxFilterValue, FluxSize } from '@flux-ui/types';
|
|
2
2
|
import { DateTime } from 'luxon';
|
|
3
3
|
import { ComponentInternalInstance, ComputedRef, InjectionKey, Ref, VNode } from 'vue';
|
|
4
4
|
export declare const FluxAdaptiveGroupInjectionKey: InjectionKey<FluxAdaptiveGroupInjection>;
|
|
@@ -9,6 +9,7 @@ export declare const FluxExpandableGroupInjectionKey: InjectionKey<FluxExpandabl
|
|
|
9
9
|
export declare const FluxFlyoutInjectionKey: InjectionKey<FluxFlyoutInjection>;
|
|
10
10
|
export declare const FluxFilterInjectionKey: InjectionKey<FluxFilterInjection>;
|
|
11
11
|
export declare const FluxFormFieldInjectionKey: InjectionKey<FluxFormFieldInjection>;
|
|
12
|
+
export declare const FluxSegmentedControlInjectionKey: InjectionKey<FluxSegmentedControlInjection>;
|
|
12
13
|
export declare const FluxSplitViewInjectionKey: InjectionKey<FluxSplitViewInjection>;
|
|
13
14
|
export declare const FluxTabBarInjectionKey: InjectionKey<FluxTabBarInjection>;
|
|
14
15
|
export declare const FluxTableInjectionKey: InjectionKey<FluxTableInjection>;
|
|
@@ -142,6 +143,14 @@ export type FluxSplitViewInjection = {
|
|
|
142
143
|
unregisterPane(id: number): void;
|
|
143
144
|
getPaneIndex(id: number): number;
|
|
144
145
|
};
|
|
146
|
+
export type FluxSegmentedControlValue = string | number;
|
|
147
|
+
export type FluxSegmentedControlInjection = {
|
|
148
|
+
readonly modelValue: Ref<FluxSegmentedControlValue | undefined>;
|
|
149
|
+
readonly size: Ref<FluxSize>;
|
|
150
|
+
select(value: FluxSegmentedControlValue): void;
|
|
151
|
+
registerItem(element: HTMLElement, value: FluxSegmentedControlValue): void;
|
|
152
|
+
unregisterItem(element: HTMLElement): void;
|
|
153
|
+
};
|
|
145
154
|
export type FluxTabBarInjection = {
|
|
146
155
|
readonly isPills: Ref<boolean>;
|
|
147
156
|
registerItem(element: Element, isActive: Ref<boolean>): void;
|
package/dist/index.css
CHANGED
|
@@ -2723,8 +2723,8 @@
|
|
|
2723
2723
|
|
|
2724
2724
|
.form-field-header {
|
|
2725
2725
|
display: flex;
|
|
2726
|
-
margin-bottom: 0;
|
|
2727
2726
|
width: 100%;
|
|
2727
|
+
margin-bottom: 0;
|
|
2728
2728
|
align-items: center;
|
|
2729
2729
|
align-self: flex-start;
|
|
2730
2730
|
gap: 6px;
|
|
@@ -2889,9 +2889,9 @@
|
|
|
2889
2889
|
border-radius: var(--radius-half);
|
|
2890
2890
|
}
|
|
2891
2891
|
.form-input-native::-webkit-color-swatch-wrapper {
|
|
2892
|
+
width: calc(100% + 24px);
|
|
2892
2893
|
margin: 0 -12px;
|
|
2893
2894
|
padding: 3px;
|
|
2894
|
-
width: calc(100% + 24px);
|
|
2895
2895
|
}
|
|
2896
2896
|
|
|
2897
2897
|
.form-input-native-has-icon-leading {
|
|
@@ -4468,12 +4468,12 @@
|
|
|
4468
4468
|
pointer-events: none;
|
|
4469
4469
|
}
|
|
4470
4470
|
.tree-indent.has-line::before {
|
|
4471
|
-
content: "";
|
|
4472
4471
|
position: absolute;
|
|
4473
4472
|
top: 0;
|
|
4474
4473
|
bottom: 0;
|
|
4475
4474
|
left: 9px;
|
|
4476
4475
|
width: 1px;
|
|
4476
|
+
content: "";
|
|
4477
4477
|
background: var(--surface-stroke);
|
|
4478
4478
|
}
|
|
4479
4479
|
|
|
@@ -4485,21 +4485,21 @@
|
|
|
4485
4485
|
pointer-events: none;
|
|
4486
4486
|
}
|
|
4487
4487
|
.tree-connector:not(.is-last)::before {
|
|
4488
|
-
content: "";
|
|
4489
4488
|
position: absolute;
|
|
4490
4489
|
top: 0;
|
|
4491
4490
|
bottom: 0;
|
|
4492
4491
|
left: 9px;
|
|
4493
4492
|
width: 1px;
|
|
4493
|
+
content: "";
|
|
4494
4494
|
background: var(--surface-stroke);
|
|
4495
4495
|
}
|
|
4496
4496
|
.tree-connector::after {
|
|
4497
|
-
content: "";
|
|
4498
4497
|
position: absolute;
|
|
4499
4498
|
top: 0;
|
|
4500
4499
|
bottom: 50%;
|
|
4501
4500
|
left: 9px;
|
|
4502
4501
|
right: 0;
|
|
4502
|
+
content: "";
|
|
4503
4503
|
border-left: 1px solid var(--surface-stroke);
|
|
4504
4504
|
border-bottom: 1px solid var(--surface-stroke);
|
|
4505
4505
|
border-bottom-left-radius: 6px;
|
|
@@ -6645,10 +6645,11 @@ tfoot .table-cell {
|
|
|
6645
6645
|
}.segmented-control {
|
|
6646
6646
|
position: relative;
|
|
6647
6647
|
align-items: center;
|
|
6648
|
-
gap:
|
|
6648
|
+
gap: 3px;
|
|
6649
|
+
padding: 3px;
|
|
6649
6650
|
background: var(--gray-50);
|
|
6650
6651
|
border: 1px solid var(--surface-stroke);
|
|
6651
|
-
border-radius: var(--radius);
|
|
6652
|
+
border-radius: var(--radius-full);
|
|
6652
6653
|
}
|
|
6653
6654
|
|
|
6654
6655
|
.segmented-control-fill {
|
|
@@ -6662,60 +6663,89 @@ tfoot .table-cell {
|
|
|
6662
6663
|
|
|
6663
6664
|
.segmented-control-highlight {
|
|
6664
6665
|
position: absolute;
|
|
6665
|
-
top:
|
|
6666
|
-
bottom:
|
|
6666
|
+
top: 3px;
|
|
6667
|
+
bottom: 3px;
|
|
6667
6668
|
background: var(--surface);
|
|
6668
|
-
border-radius:
|
|
6669
|
-
box-shadow: var(--shadow-
|
|
6669
|
+
border-radius: var(--radius-full);
|
|
6670
|
+
box-shadow: var(--shadow-md);
|
|
6670
6671
|
outline: 1px solid var(--surface-stroke);
|
|
6671
6672
|
pointer-events: none;
|
|
6672
6673
|
transition: 300ms var(--swift-out);
|
|
6673
6674
|
transition-property: left, width;
|
|
6674
|
-
translate: -1px 0;
|
|
6675
6675
|
}
|
|
6676
6676
|
|
|
6677
6677
|
.segmented-control-item {
|
|
6678
|
+
position: relative;
|
|
6678
6679
|
display: flex;
|
|
6679
|
-
height: 36px;
|
|
6680
|
-
padding-left: 12px;
|
|
6681
|
-
padding-right: 12px;
|
|
6682
6680
|
align-items: center;
|
|
6683
6681
|
flex: 1 1 0;
|
|
6684
|
-
gap: 9px;
|
|
6685
6682
|
justify-content: center;
|
|
6686
6683
|
background: none;
|
|
6687
6684
|
border: 0;
|
|
6688
|
-
border-radius: var(--radius);
|
|
6685
|
+
border-radius: var(--radius-full);
|
|
6689
6686
|
color: var(--foreground);
|
|
6690
6687
|
cursor: pointer;
|
|
6691
6688
|
font-weight: 500;
|
|
6692
6689
|
text-align: center;
|
|
6693
|
-
transition: 300ms var(--swift-out);
|
|
6694
|
-
|
|
6690
|
+
transition: color 300ms var(--swift-out);
|
|
6691
|
+
white-space: nowrap;
|
|
6695
6692
|
}
|
|
6696
6693
|
@media (hover: hover) {
|
|
6697
6694
|
.segmented-control-item:hover {
|
|
6698
|
-
|
|
6695
|
+
color: var(--foreground-prominent);
|
|
6699
6696
|
}
|
|
6700
6697
|
}
|
|
6698
|
+
.segmented-control-item {
|
|
6699
|
+
outline: 2px solid rgb(from var(--primary-600) r g b/0);
|
|
6700
|
+
outline-offset: 0;
|
|
6701
|
+
}
|
|
6702
|
+
.segmented-control-item:focus-visible {
|
|
6703
|
+
outline-color: var(--primary-600);
|
|
6704
|
+
outline-offset: 3px;
|
|
6705
|
+
}
|
|
6701
6706
|
.segmented-control-item.is-active {
|
|
6702
|
-
background: none;
|
|
6703
6707
|
color: var(--foreground-prominent);
|
|
6704
6708
|
cursor: default;
|
|
6705
6709
|
}
|
|
6710
|
+
.segmented-control-item:disabled {
|
|
6711
|
+
opacity: 0.5;
|
|
6712
|
+
pointer-events: none;
|
|
6713
|
+
}
|
|
6706
6714
|
.segmented-control-item > * {
|
|
6707
6715
|
position: relative;
|
|
6716
|
+
z-index: 1;
|
|
6708
6717
|
}
|
|
6709
|
-
|
|
6710
|
-
|
|
6718
|
+
.segmented-control-item + .segmented-control-item::before {
|
|
6719
|
+
content: "";
|
|
6720
|
+
position: absolute;
|
|
6721
|
+
top: 50%;
|
|
6722
|
+
left: -2px;
|
|
6711
6723
|
height: 15px;
|
|
6712
6724
|
width: 1px;
|
|
6713
|
-
flex-shrink: 0;
|
|
6714
6725
|
background: var(--surface-stroke);
|
|
6715
6726
|
transition: opacity 300ms var(--swift-out);
|
|
6727
|
+
translate: 0 -50%;
|
|
6716
6728
|
}
|
|
6717
|
-
.segmented-control-
|
|
6729
|
+
.segmented-control-item.is-active::before, .segmented-control-item.is-active + .segmented-control-item::before {
|
|
6718
6730
|
opacity: 0;
|
|
6731
|
+
}
|
|
6732
|
+
|
|
6733
|
+
.is-small {
|
|
6734
|
+
height: 30px;
|
|
6735
|
+
padding: 0 12px;
|
|
6736
|
+
gap: 9px;
|
|
6737
|
+
}
|
|
6738
|
+
|
|
6739
|
+
.is-medium {
|
|
6740
|
+
height: 36px;
|
|
6741
|
+
padding: 0 15px;
|
|
6742
|
+
gap: 9px;
|
|
6743
|
+
}
|
|
6744
|
+
|
|
6745
|
+
.is-large {
|
|
6746
|
+
height: 48px;
|
|
6747
|
+
padding: 0 21px;
|
|
6748
|
+
gap: 12px;
|
|
6719
6749
|
}.split-view {
|
|
6720
6750
|
display: grid;
|
|
6721
6751
|
width: 100%;
|