@flux-ui/dashboard 3.0.0-next.0 → 3.0.0-next.2

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.
@@ -0,0 +1,259 @@
1
+ @use '../../../../components/src/css/mixin';
2
+
3
+ .dashboardNavigation {
4
+ position: fixed;
5
+ display: flex;
6
+ top: 0;
7
+ left: 0;
8
+ background: var(--dashboard-navigation-background);
9
+ color: var(--dashboard-navigation-foreground);
10
+ z-index: 750;
11
+
12
+ .divider {
13
+ margin: 3px 15px;
14
+ }
15
+
16
+ .dividerLine {
17
+ background: rgb(var(--primary-10));
18
+ }
19
+
20
+ .menu {
21
+ flex-grow: 1;
22
+ }
23
+
24
+ .menuItem {
25
+ height: 54px;
26
+ min-width: 54px;
27
+ padding: 15px;
28
+ gap: 21px;
29
+ color: var(--dashboard-navigation-foreground);
30
+ overflow: hidden;
31
+
32
+ @media (hover: hover) {
33
+ &:hover {
34
+ background: rgb(var(--primary-10));
35
+ }
36
+ }
37
+
38
+ &:active {
39
+ background: rgb(var(--primary-9));
40
+ }
41
+ }
42
+
43
+ .menuItemHighlighted {
44
+ background: rgb(var(--primary-10) / .5);
45
+ }
46
+
47
+ .menuItemIcon {
48
+ color: var(--dashboard-navigation-foreground);
49
+ font-size: 24px;
50
+ }
51
+
52
+ .menuItemLabel {
53
+ transition: var(--dashboard-duration) var(--swift-out);
54
+ transition-property: filter, opacity, translate;
55
+ white-space: nowrap;
56
+ }
57
+ }
58
+
59
+ .dashboardNavigationCollapsed {
60
+ composes: dashboardNavigation;
61
+ }
62
+
63
+ [dark] .dashboardNavigation {
64
+ .dividerLine {
65
+ background: rgb(var(--gray-2));
66
+ }
67
+
68
+ .menuItem {
69
+ @media (hover: hover) {
70
+ &:hover {
71
+ background: rgb(var(--gray-2));
72
+ }
73
+ }
74
+
75
+ &:active {
76
+ background: rgb(var(--gray-3));
77
+ }
78
+ }
79
+
80
+ .menuItemHighlighted {
81
+ background: rgb(var(--gray-1));
82
+ }
83
+ }
84
+
85
+ .dashboardNavigationLogo {
86
+ display: flex;
87
+ height: 54px;
88
+ width: 54px;
89
+ align-items: center;
90
+ justify-content: center;
91
+
92
+ :is(svg) {
93
+ max-height: 48px;
94
+ max-width: 48px;
95
+ width: 100%;
96
+ }
97
+ }
98
+
99
+ .dashboardNavigationRoundingFix {
100
+ position: absolute;
101
+ display: block;
102
+ height: var(--radius);
103
+ width: var(--radius);
104
+ content: '';
105
+ background: var(--dashboard-navigation-background);
106
+ transition: left var(--dashboard-duration) var(--swift-out);
107
+
108
+ &::before {
109
+ position: absolute;
110
+ display: block;
111
+ inset: 0;
112
+ content: '';
113
+ background: rgb(var(--gray-1));
114
+ }
115
+ }
116
+
117
+ .dashboard:not(:has(.dashboardMenu)) .dashboardNavigationRoundingFix::before {
118
+ background: rgb(var(--gray-0));
119
+ }
120
+
121
+ @include mixin.breakpoint-up(lg) {
122
+ .dashboardNavigation {
123
+ height: 100dvh;
124
+ width: 300px;
125
+ padding: 15px;
126
+ flex-flow: column;
127
+ gap: 15px;
128
+ transition: width var(--dashboard-duration) var(--swift-out);
129
+ }
130
+
131
+ .dashboardNavigationCollapsed {
132
+ width: 84px;
133
+
134
+ .menuItemLabel {
135
+ filter: blur(6px);
136
+ opacity: 0;
137
+ translate: -12px 0;
138
+ }
139
+ }
140
+
141
+ .dashboardNavigationHeader {
142
+ display: flex;
143
+
144
+ .menuItem {
145
+ display: none;
146
+ }
147
+ }
148
+
149
+ .dashboardNavigationNav {
150
+ display: flex;
151
+ flex-flow: column;
152
+ flex-grow: 1;
153
+ }
154
+
155
+ .dashboardNavigationRoundingFix {
156
+ left: 100%;
157
+
158
+ &:first-of-type {
159
+ top: 0;
160
+
161
+ &::before {
162
+ border-top-left-radius: var(--radius);
163
+ }
164
+ }
165
+
166
+ &:not(:first-of-type) {
167
+ bottom: 0;
168
+
169
+ &::before {
170
+ border-bottom-left-radius: var(--radius);
171
+ }
172
+ }
173
+ }
174
+ }
175
+
176
+ @include mixin.breakpoint-down(md) {
177
+ .dashboardNavigation {
178
+ width: 100dvw;
179
+ height: 84px;
180
+
181
+ &::after {
182
+ position: fixed;
183
+ display: block;
184
+ inset: 0;
185
+ width: 100dvw;
186
+ height: 100dvh;
187
+ content: '';
188
+ background: rgb(var(--gray-3) / .5);
189
+ backdrop-filter: blur(3px) saturate(180%);
190
+ transition: var(--dashboard-duration) var(--swift-out);
191
+ transition-property: background, backdrop-filter;
192
+ z-index: 1900;
193
+ }
194
+ }
195
+
196
+ .dashboardNavigationHeader {
197
+ display: flex;
198
+ width: inherit;
199
+ height: inherit;
200
+ padding: 0 15px;
201
+ align-items: center;
202
+ flex-flow: row;
203
+ justify-content: space-between;
204
+
205
+ .menuItem {
206
+ align-self: center;
207
+ justify-content: center;
208
+ }
209
+ }
210
+
211
+ .dashboardNavigationNav {
212
+ position: fixed;
213
+ display: flex;
214
+ top: 0;
215
+ left: 0;
216
+ width: min(300px, calc(100dvw - 42px));
217
+ height: 100dvh;
218
+ padding: 15px;
219
+ flex-flow: column;
220
+ background: var(--dashboard-navigation-background);
221
+ transition: translate var(--dashboard-duration) var(--swift-out);
222
+ z-index: 2000;
223
+ }
224
+
225
+ .dashboardNavigationRoundingFix {
226
+ position: fixed;
227
+ top: 84px;
228
+ z-index: 750;
229
+
230
+ &:first-of-type {
231
+ left: 0;
232
+
233
+ &::before {
234
+ border-top-left-radius: var(--radius);
235
+ }
236
+ }
237
+
238
+ &:not(:first-of-type) {
239
+ right: 0;
240
+
241
+ &::before {
242
+ border-top-right-radius: var(--radius);
243
+ }
244
+ }
245
+ }
246
+
247
+ .dashboardNavigationCollapsed {
248
+ &::after {
249
+ background: transparent;
250
+ backdrop-filter: none;
251
+ pointer-events: none;
252
+ }
253
+
254
+ .dashboardNavigationNav {
255
+ pointer-events: none;
256
+ translate: -100% 0;
257
+ }
258
+ }
259
+ }
@@ -0,0 +1,83 @@
1
+ @use '../../../../components/src/css/mixin';
2
+
3
+ .dashboardPane {
4
+ background: rgb(var(--gray-1));
5
+ overflow: auto;
6
+ z-index: 200;
7
+
8
+ .menuSubHeader {
9
+ background: linear-gradient(to bottom, rgb(var(--gray-1)) 75%, transparent);
10
+ }
11
+
12
+ .dashboardTopBar {
13
+ background: rgb(var(--gray-1) / .9);
14
+ }
15
+
16
+ .filter {
17
+ --background: rgb(var(--gray-1));
18
+
19
+ max-height: calc(100dvh - 84px);
20
+ margin-top: -9px;
21
+ padding: 9px 18px 18px;
22
+ width: 100%;
23
+
24
+ .filterHeader {
25
+ margin-left: -18px;
26
+ margin-right: -18px;
27
+ padding-left: 18px;
28
+ padding-right: 18px;
29
+ }
30
+
31
+ .menu {
32
+ font-size: 14px;
33
+ }
34
+
35
+ .menuItemCommand {
36
+ font-size: 12px;
37
+ }
38
+
39
+ .menuItemIcon {
40
+ font-size: 16px;
41
+ }
42
+
43
+ .menu > :where(.divider, .separator) {
44
+ margin-left: -18px;
45
+ margin-right: -18px;
46
+ }
47
+ }
48
+ }
49
+
50
+ .dashboardMenu {
51
+ composes: dashboardPane;
52
+
53
+ border-right: 1px solid rgb(var(--gray-2));
54
+ }
55
+
56
+ .dashboardMenuBody {
57
+ padding: 0 18px 30px;
58
+ }
59
+
60
+ .dashboardSide {
61
+ composes: dashboardPane;
62
+
63
+ border-left: 1px solid rgb(var(--gray-2));
64
+ }
65
+
66
+ @include mixin.breakpoint-up(lg) {
67
+ .dashboardPane {
68
+ position: sticky;
69
+ top: 0;
70
+ height: 100dvh;
71
+ grid-row: 1 / span 2;
72
+ }
73
+ }
74
+
75
+ @include mixin.breakpoint-down(md) {
76
+ .dashboardMenu {
77
+ height: calc(100dvh - 84px);
78
+ }
79
+
80
+ .dashboardMenuCollapsed {
81
+ display: none;
82
+ }
83
+ }
@@ -0,0 +1,55 @@
1
+ @use '../../../../components/src/css/mixin';
2
+
3
+ .dashboardTopBar {
4
+ position: sticky;
5
+ display: flex;
6
+ top: 0;
7
+ height: 84px;
8
+ padding-left: 30px;
9
+ padding-right: 30px;
10
+ align-items: center;
11
+ flex-flow: row;
12
+ gap: 15px;
13
+ background: rgb(var(--gray-0) / .9);
14
+ backdrop-filter: blur(10px) saturate(180%);
15
+ z-index: 100;
16
+
17
+ > h1 {
18
+ font-size: 18px;
19
+ overflow: hidden;
20
+ text-overflow: ellipsis;
21
+ white-space: nowrap;
22
+ }
23
+
24
+ > .icon {
25
+ color: var(--foreground-prominent);
26
+ }
27
+
28
+ > .separator {
29
+ height: 24px;
30
+ }
31
+ }
32
+
33
+ .dashboardHeader:not(.routeTransitionEnterActive):not(.routeTransitionLeaveActive) {
34
+ transition: box-shadow var(--dashboard-duration) var(--swift-out);
35
+ }
36
+
37
+ .dashboardHeaderScrolled {
38
+ composes: dashboardHeader;
39
+
40
+ box-shadow: var(--shadow-md);
41
+ }
42
+
43
+ [dark] .dashboardHeaderScrolled {
44
+ box-shadow: 0 1px 0 rgb(var(--gray-1)), var(--shadow-md);
45
+ }
46
+
47
+ @include mixin.breakpoint-down(md) {
48
+ .dashboard > .dashboardTopBar {
49
+ top: 84px;
50
+ }
51
+
52
+ .dashboard > .dashboardTopBarCollapsed {
53
+ display: none;
54
+ }
55
+ }
package/src/data/index.ts CHANGED
@@ -3,5 +3,6 @@ import type { InjectionKey, Ref } from 'vue';
3
3
  export const FluxDashboardInjectionKey: InjectionKey<FluxDashboardInjection> = Symbol();
4
4
 
5
5
  export type FluxDashboardInjection = {
6
+ readonly isMenuCollapsed: Ref<boolean>;
6
7
  readonly isNavigationCollapsed: Ref<boolean>;
7
8
  };