@flux-ui/components 3.0.0-next.74 → 3.0.0-next.75

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@flux-ui/components",
3
3
  "description": "A set of opiniated UI components.",
4
- "version": "3.0.0-next.74",
4
+ "version": "3.0.0-next.75",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/basmilius",
@@ -57,8 +57,8 @@
57
57
  "dependencies": {
58
58
  "@basmilius/common": "^3.40.0",
59
59
  "@basmilius/utils": "^3.40.0",
60
- "@flux-ui/internals": "3.0.0-next.74",
61
- "@flux-ui/types": "3.0.0-next.74",
60
+ "@flux-ui/internals": "3.0.0-next.75",
61
+ "@flux-ui/types": "3.0.0-next.75",
62
62
  "@fortawesome/fontawesome-common-types": "^7.2.0",
63
63
  "clsx": "^2.1.1",
64
64
  "imask": "^7.6.1",
@@ -92,7 +92,6 @@ export { default as FluxItemMedia } from './FluxItemMedia.vue';
92
92
  export { default as FluxItemStack } from './FluxItemStack.vue';
93
93
  export { default as FluxLayerPane } from './FluxLayerPane.vue';
94
94
  export { default as FluxLayerPaneSecondary } from './FluxLayerPaneSecondary.vue';
95
- export { default as FluxLegend } from './FluxLegend.vue';
96
95
  export { default as FluxLink } from './FluxLink.vue';
97
96
  export { default as FluxMenu } from './FluxMenu.vue';
98
97
  export { default as FluxMenuCollapsible } from './FluxMenuCollapsible.vue';
@@ -115,7 +114,6 @@ export { default as FluxPaneGroup } from './FluxPaneGroup.vue';
115
114
  export { default as FluxPaneHeader } from './FluxPaneHeader.vue';
116
115
  export { default as FluxPaneIllustration } from './FluxPaneIllustration.vue';
117
116
  export { default as FluxPaneMedia } from './FluxPaneMedia.vue';
118
- export { default as FluxPercentageBar } from './FluxPercentageBar.vue';
119
117
  export { default as FluxPersona } from './FluxPersona.vue';
120
118
  export { default as FluxPlaceholder } from './FluxPlaceholder.vue';
121
119
  export { default as FluxPressable } from './FluxPressable.vue';
@@ -141,7 +139,6 @@ export { default as FluxSpinner } from './FluxSpinner.vue';
141
139
  export { default as FluxSplitButton } from './FluxSplitButton.vue';
142
140
  export { default as FluxSplitView } from './FluxSplitView.vue';
143
141
  export { default as FluxSplitViewPane } from './FluxSplitViewPane.vue';
144
- export { default as FluxStatistic } from './FluxStatistic.vue';
145
142
  export { default as FluxStepper } from './FluxStepper.vue';
146
143
  export { default as FluxStepperStep } from './FluxStepperStep.vue';
147
144
  export { default as FluxStepperSteps } from './FluxStepperSteps.vue';
@@ -7,7 +7,7 @@
7
7
  padding: 3px;
8
8
  background: var(--gray-50);
9
9
  border: 1px solid var(--surface-stroke);
10
- border-radius: var(--radius-full);
10
+ border-radius: var(--radius);
11
11
  }
12
12
 
13
13
  .segmentedControlFill {
@@ -28,7 +28,7 @@
28
28
  top: 3px;
29
29
  bottom: 3px;
30
30
  background: var(--surface);
31
- border-radius: var(--radius-full);
31
+ border-radius: calc(var(--radius) - 3px);
32
32
  box-shadow: var(--shadow-md);
33
33
  outline: 1px solid var(--surface-stroke);
34
34
  pointer-events: none;
@@ -68,21 +68,20 @@
68
68
  pointer-events: none;
69
69
  }
70
70
 
71
- // Houd de inhoud boven de zwevende highlight.
72
71
  > * {
73
72
  position: relative;
74
73
  z-index: 1;
75
74
  }
76
75
 
77
- // Verticale divider tussen twee aangrenzende inactieve items.
78
76
  & + &::before {
79
77
  content: '';
80
78
  position: absolute;
81
79
  top: 50%;
82
80
  left: -2px;
83
81
  height: 15px;
84
- width: 1px;
85
- background: var(--surface-stroke);
82
+ width: 2px;
83
+ background: var(--gray-100);
84
+ border-radius: 1px;
86
85
  transition: opacity 300ms var(--swift-out);
87
86
  translate: 0 -50%;
88
87
  }
@@ -1,8 +0,0 @@
1
- import { FluxDirection, FluxLegendObject } from '@flux-ui/types';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- type __VLS_Props = {
4
- readonly direction?: FluxDirection;
5
- readonly items: FluxLegendObject[];
6
- };
7
- declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
8
- export default _default;
@@ -1,8 +0,0 @@
1
- import { FluxPercentageBarItemObject } from '@flux-ui/types';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- type __VLS_Props = {
4
- readonly isLegendVisible?: boolean;
5
- readonly items: FluxPercentageBarItemObject[];
6
- };
7
- declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
8
- export default _default;
@@ -1,17 +0,0 @@
1
- import { FluxColor, FluxDirection, FluxIconName } from '@flux-ui/types';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
- type __VLS_Props = {
4
- readonly changeColor?: FluxColor;
5
- readonly changeIcon?: FluxIconName;
6
- readonly changeValue?: string | number | null;
7
- readonly color?: FluxColor;
8
- readonly direction?: FluxDirection;
9
- readonly icon?: FluxIconName;
10
- readonly imageSrc?: string;
11
- readonly imageAlt?: string;
12
- readonly isLoading?: boolean;
13
- readonly label: string;
14
- readonly value?: string | number | null;
15
- };
16
- declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
17
- export default _default;
@@ -1,27 +0,0 @@
1
- <template>
2
- <div :class="direction === 'horizontal' ? $style.legendHorizontal : $style.legendVertical">
3
- <span
4
- v-for="(item, index) of items"
5
- :key="index"
6
- :class="$style.legendItem"
7
- :style="{
8
- '--color': item.color
9
- }">
10
- {{ item.label }}
11
- </span>
12
- </div>
13
- </template>
14
-
15
- <script
16
- lang="ts"
17
- setup>
18
- import type { FluxDirection, FluxLegendObject } from '@flux-ui/types';
19
- import $style from '~flux/components/css/component/Legend.module.scss';
20
-
21
- const {
22
- direction = 'horizontal'
23
- } = defineProps<{
24
- readonly direction?: FluxDirection;
25
- readonly items: FluxLegendObject[];
26
- }>();
27
- </script>
@@ -1,47 +0,0 @@
1
- <template>
2
- <div :class="$style.percentageBar">
3
- <div :class="$style.percentageBarTrack">
4
- <FluxTooltip
5
- v-for="(item, index) of items"
6
- :key="index">
7
- <template #content>
8
- <div :class="$style.percentageBarTooltip">
9
- <FluxIcon
10
- v-if="item.icon"
11
- :name="item.icon"
12
- :size="16"/>
13
-
14
- <span>{{ formatPercentage(item.value) }} {{ item.label }}</span>
15
- </div>
16
- </template>
17
-
18
- <div
19
- :class="$style.percentageBarSegment"
20
- :style="{
21
- backgroundColor: item.color,
22
- flexGrow: item.value
23
- }"/>
24
- </FluxTooltip>
25
- </div>
26
-
27
- <FluxLegend
28
- v-if="isLegendVisible"
29
- :items="items"/>
30
- </div>
31
- </template>
32
-
33
- <script
34
- lang="ts"
35
- setup>
36
- import { formatPercentage } from '@basmilius/utils';
37
- import type { FluxPercentageBarItemObject } from '@flux-ui/types';
38
- import FluxIcon from './FluxIcon.vue';
39
- import FluxLegend from './FluxLegend.vue';
40
- import FluxTooltip from './FluxTooltip.vue';
41
- import $style from '~flux/components/css/component/PercentageBar.module.scss';
42
-
43
- defineProps<{
44
- readonly isLegendVisible?: boolean;
45
- readonly items: FluxPercentageBarItemObject[];
46
- }>();
47
- </script>
@@ -1,82 +0,0 @@
1
- <template>
2
- <FluxPane
3
- :class="clsx(
4
- direction === 'horizontal' && $style.statisticHorizontal,
5
- direction === 'vertical' && $style.statisticVertical,
6
- color === 'gray' && $style.isGray,
7
- color === 'primary' && $style.isPrimary,
8
- color === 'danger' && $style.isDanger,
9
- color === 'info' && $style.isInfo,
10
- color === 'success' && $style.isSuccess,
11
- color === 'warning' && $style.isWarning
12
- )"
13
- :is-loading="isLoading">
14
- <FluxBoxedIcon
15
- v-if="icon"
16
- :class="$style.statisticIcon"
17
- :color="color"
18
- :name="icon"
19
- :size="48"/>
20
-
21
- <div v-else-if="imageSrc">
22
- <img
23
- :class="$style.statisticImage"
24
- :src="imageSrc"
25
- :alt="imageAlt"/>
26
- </div>
27
-
28
- <div :class="$style.statisticData">
29
- <span>{{ label }}</span>
30
- <strong>{{ value ?? MDASH }}</strong>
31
- </div>
32
-
33
- <div
34
- v-if="changeIcon || changeValue"
35
- :class="clsx(
36
- $style.statisticChange,
37
- changeColor === 'gray' && $style.isGray,
38
- changeColor === 'primary' && $style.isPrimary,
39
- changeColor === 'danger' && $style.isDanger,
40
- changeColor === 'info' && $style.isInfo,
41
- changeColor === 'success' && $style.isSuccess,
42
- changeColor === 'warning' && $style.isWarning
43
- )">
44
- <span v-if="changeValue">{{ changeValue }}</span>
45
-
46
- <FluxIcon
47
- v-if="changeIcon"
48
- :name="changeIcon"
49
- :size="14"/>
50
- </div>
51
- </FluxPane>
52
- </template>
53
-
54
- <script
55
- lang="ts"
56
- setup>
57
- import { MDASH } from '@basmilius/utils';
58
- import type { FluxColor, FluxDirection, FluxIconName } from '@flux-ui/types';
59
- import { clsx } from 'clsx';
60
- import FluxBoxedIcon from './FluxBoxedIcon.vue';
61
- import FluxIcon from './FluxIcon.vue';
62
- import FluxPane from './FluxPane.vue';
63
- import $style from '~flux/components/css/component/Statistic.module.scss';
64
-
65
- const {
66
- changeColor = 'gray',
67
- color = 'gray',
68
- direction = 'horizontal'
69
- } = defineProps<{
70
- readonly changeColor?: FluxColor;
71
- readonly changeIcon?: FluxIconName;
72
- readonly changeValue?: string | number | null;
73
- readonly color?: FluxColor;
74
- readonly direction?: FluxDirection;
75
- readonly icon?: FluxIconName;
76
- readonly imageSrc?: string;
77
- readonly imageAlt?: string;
78
- readonly isLoading?: boolean;
79
- readonly label: string;
80
- readonly value?: string | number | null;
81
- }>();
82
- </script>
@@ -1,29 +0,0 @@
1
- .legendHorizontal {
2
- display: flex;
3
- gap: 12px 18px;
4
- }
5
-
6
- .legendVertical {
7
- display: flex;
8
- flex-flow: column;
9
- gap: 12px;
10
- }
11
-
12
- .legendItem {
13
- display: flex;
14
- flex-flow: row nowrap;
15
- gap: 6px;
16
- font-size: 14px;
17
- line-height: 1;
18
-
19
- &::before {
20
- display: block;
21
- margin-top: 1px;
22
- height: 12px;
23
- width: 12px;
24
- content: '';
25
- flex: 0 0 12px;
26
- background: var(--color);
27
- border-radius: var(--radius-full);
28
- }
29
- }
@@ -1,31 +0,0 @@
1
- .percentageBar {
2
- display: flex;
3
- flex-flow: column;
4
- gap: 12px;
5
- }
6
-
7
- .percentageBarSegment {
8
- height: 12px;
9
- border-radius: calc(var(--radius) / 3);
10
- transition: var(--transition-default);
11
- transition-property: height, margin, flex-grow;
12
-
13
- &:hover {
14
- height: 16px;
15
- margin-top: -2px;
16
- margin-bottom: -2px;
17
- }
18
- }
19
-
20
- .percentageBarTooltip {
21
- display: flex;
22
- align-items: center;
23
- flex-flow: row nowrap;
24
- gap: 9px;
25
- }
26
-
27
- .percentageBarTrack {
28
- display: flex;
29
- flex-flow: row nowrap;
30
- gap: 3px;
31
- }
@@ -1,91 +0,0 @@
1
- .statistic {
2
- padding: 18px;
3
- flex-basis: 0;
4
- flex-grow: 1;
5
- gap: 18px;
6
- }
7
-
8
- .statisticChange {
9
- display: flex;
10
- align-items: center;
11
- align-self: flex-end;
12
- gap: 6px;
13
- font-size: 12px;
14
- font-weight: 600;
15
- line-height: 1;
16
-
17
- &.isGray {
18
- color: var(--foreground-prominent);
19
- }
20
-
21
- &.isPrimary {
22
- color: var(--primary-600);
23
- }
24
-
25
- &.isDanger {
26
- color: var(--danger-600);
27
- }
28
-
29
- &.isInfo {
30
- color: var(--info-600);
31
- }
32
-
33
- &.isSuccess {
34
- color: var(--success-600);
35
- }
36
-
37
- &.isWarning {
38
- color: var(--warning-600);
39
- }
40
- }
41
-
42
- .statisticData {
43
- display: flex;
44
- flex-flow: column;
45
- flex-grow: 1;
46
- gap: 9px;
47
- line-height: 1;
48
-
49
- :is(span) {
50
- color: var(--foreground-secondary);
51
- }
52
-
53
- :is(strong) {
54
- color: var(--foreground-prominent);
55
- font-size: 24px;
56
- font-weight: 700;
57
- }
58
- }
59
-
60
- .statisticIcon :local(.icon) {
61
- font-size: .45em;
62
- }
63
-
64
- .statisticImage {
65
- height: 48px;
66
- width: 48px;
67
- border-radius: var(--radius);
68
- }
69
-
70
- .statisticHorizontal {
71
- composes: statistic;
72
-
73
- display: flex;
74
- }
75
-
76
- .statisticVertical {
77
- composes: statistic;
78
-
79
- display: flex;
80
- align-items: center;
81
- flex-flow: column;
82
- text-align: center;
83
-
84
- .statisticChange {
85
- align-self: center;
86
- }
87
-
88
- .statisticData {
89
- align-items: center;
90
- }
91
- }