@flux-ui/components 3.0.0-next.20 → 3.0.0-next.22

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.20",
4
+ "version": "3.0.0-next.22",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/basmilius",
@@ -52,8 +52,8 @@
52
52
  "sideEffects": false,
53
53
  "dependencies": {
54
54
  "@basmilius/utils": "^2.13.0",
55
- "@flux-ui/internals": "3.0.0-next.20",
56
- "@flux-ui/types": "3.0.0-next.20",
55
+ "@flux-ui/internals": "3.0.0-next.22",
56
+ "@flux-ui/types": "3.0.0-next.22",
57
57
  "@fortawesome/fontawesome-common-types": "^7.1.0",
58
58
  "clsx": "^2.1.1",
59
59
  "imask": "^7.6.1",
@@ -30,7 +30,7 @@
30
30
  <img
31
31
  :class="$style.menuItemImage"
32
32
  :src="imageSrc"
33
- alt=""/>
33
+ :alt="imageAlt ?? ''"/>
34
34
  </template>
35
35
 
36
36
  <template
@@ -74,6 +74,7 @@
74
74
  readonly command?: string;
75
75
  readonly commandIcon?: FluxIconName;
76
76
  readonly commandLoading?: boolean;
77
+ readonly imageAlt?: string;
77
78
  readonly imageSrc?: string;
78
79
  readonly isActive?: boolean;
79
80
  readonly isDestructive?: boolean;
@@ -10,12 +10,21 @@
10
10
  color === 'success' && $style.isSuccess,
11
11
  color === 'warning' && $style.isWarning
12
12
  )">
13
- <div :class="$style.statisticIcon">
13
+ <div
14
+ v-if="icon"
15
+ :class="$style.statisticIcon">
14
16
  <FluxIcon
15
17
  :name="icon"
16
18
  :size="24"/>
17
19
  </div>
18
20
 
21
+ <div v-else-if="imageSrc">
22
+ <img
23
+ :class="$style.statisticImage"
24
+ :src="imageSrc"
25
+ :alt="imageAlt"/>
26
+ </div>
27
+
19
28
  <div :class="$style.statisticData">
20
29
  <span>{{ label }}</span>
21
30
  <strong>{{ value }}</strong>
@@ -61,7 +70,9 @@
61
70
  readonly changeValue?: string;
62
71
  readonly color?: FluxColor;
63
72
  readonly direction?: FluxDirection;
64
- readonly icon: FluxIconName;
73
+ readonly icon?: FluxIconName;
74
+ readonly imageSrc?: string;
75
+ readonly imageAlt?: string;
65
76
  readonly label: string;
66
77
  readonly value: string;
67
78
  }>();
@@ -21,6 +21,8 @@
21
21
  :command="selected[0].command"
22
22
  :command-icon="selected[0].commandIcon"
23
23
  :icon-leading="selected[0].icon"
24
+ :image-alt="selected[0].imageAlt"
25
+ :image-src="selected[0].imageSrc"
24
26
  :label="selected[0].label"
25
27
  tabindex="-1"/>
26
28
  </template>
@@ -97,6 +99,8 @@
97
99
  :command="subItem.command"
98
100
  :command-icon="subItem.commandIcon"
99
101
  :icon-leading="subItem.icon"
102
+ :image-alt="subItem.imageAlt"
103
+ :image-src="subItem.imageSrc"
100
104
  :is-active="!!selected.find(so => so.value === subItem.value)"
101
105
  :is-highlighted="highlightedId === subItem.value"
102
106
  :label="subItem.label"
@@ -112,6 +116,8 @@
112
116
  :command="item.command"
113
117
  :command-icon="item.commandIcon"
114
118
  :icon-leading="item.icon"
119
+ :image-alt="item.imageAlt"
120
+ :image-src="item.imageSrc"
115
121
  :is-active="!!selected.find(so => so.value === item.value)"
116
122
  :is-highlighted="highlightedId === item.value"
117
123
  :label="item.label"
@@ -96,6 +96,12 @@
96
96
  border-radius: var(--radius);
97
97
  }
98
98
 
99
+ .statisticImage {
100
+ height: 48px;
101
+ width: 48px;
102
+ border-radius: var(--radius);
103
+ }
104
+
99
105
  .statisticHorizontal {
100
106
  composes: statistic;
101
107