@marianmeres/stuic 3.0.0 → 3.0.1
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/actions/index.d.ts +1 -0
- package/dist/actions/index.js +1 -0
- package/dist/actions/typeahead.svelte.d.ts +53 -0
- package/dist/actions/typeahead.svelte.js +328 -0
- package/dist/base.css +17 -0
- package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte +4 -3
- package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte.d.ts +4 -3
- package/dist/components/AlertConfirmPrompt/Current.svelte +1 -2
- package/dist/components/AlertConfirmPrompt/Current.svelte.d.ts +0 -1
- package/dist/components/AlertConfirmPrompt/index.css +47 -43
- package/dist/components/AssetsPreview/AssetsPreview.svelte +0 -1
- package/dist/components/AssetsPreview/AssetsPreview.svelte.d.ts +0 -1
- package/dist/components/AssetsPreview/index.css +31 -29
- package/dist/components/Avatar/Avatar.svelte +0 -1
- package/dist/components/Avatar/Avatar.svelte.d.ts +0 -1
- package/dist/components/Avatar/index.css +87 -85
- package/dist/components/Backdrop/Backdrop.svelte +0 -1
- package/dist/components/Backdrop/Backdrop.svelte.d.ts +0 -1
- package/dist/components/Backdrop/index.css +15 -13
- package/dist/components/Button/Button.svelte +0 -1
- package/dist/components/Button/Button.svelte.d.ts +0 -1
- package/dist/components/Button/index.css +431 -429
- package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte +0 -1
- package/dist/components/ButtonGroupRadio/ButtonGroupRadio.svelte.d.ts +0 -1
- package/dist/components/ButtonGroupRadio/index.css +123 -117
- package/dist/components/Collapsible/index.css +17 -15
- package/dist/components/CommandMenu/CommandMenu.svelte +7 -4
- package/dist/components/CommandMenu/CommandMenu.svelte.d.ts +0 -1
- package/dist/components/CommandMenu/index.css +27 -25
- package/dist/components/DismissibleMessage/DismissibleMessage.svelte +0 -1
- package/dist/components/DismissibleMessage/DismissibleMessage.svelte.d.ts +0 -1
- package/dist/components/DismissibleMessage/index.css +116 -110
- package/dist/components/DropdownMenu/DropdownMenu.svelte +0 -1
- package/dist/components/DropdownMenu/DropdownMenu.svelte.d.ts +0 -1
- package/dist/components/DropdownMenu/index.css +179 -177
- package/dist/components/Input/FieldInput.svelte +8 -0
- package/dist/components/Input/FieldInput.svelte.d.ts +2 -0
- package/dist/components/Input/FieldOptions.svelte +1 -1
- package/dist/components/Input/index.css +411 -398
- package/dist/components/KbdShortcut/KbdShortcut.svelte +4 -12
- package/dist/components/KbdShortcut/README.md +34 -0
- package/dist/components/KbdShortcut/index.css +55 -0
- package/dist/components/ListItemButton/ListItemButton.svelte +0 -1
- package/dist/components/ListItemButton/ListItemButton.svelte.d.ts +0 -1
- package/dist/components/ListItemButton/index.css +118 -116
- package/dist/components/Modal/Modal.svelte +0 -1
- package/dist/components/Modal/Modal.svelte.d.ts +0 -1
- package/dist/components/Modal/index.css +18 -16
- package/dist/components/ModalDialog/index.css +29 -27
- package/dist/components/Nav/Nav.svelte +732 -0
- package/dist/components/Nav/Nav.svelte.d.ts +110 -0
- package/dist/components/Nav/README.md +334 -0
- package/dist/components/Nav/index.css +318 -0
- package/dist/components/Nav/index.d.ts +1 -0
- package/dist/components/Nav/index.js +1 -0
- package/dist/components/Notifications/Notifications.svelte +2 -3
- package/dist/components/Notifications/Notifications.svelte.d.ts +0 -1
- package/dist/components/Notifications/index.css +158 -158
- package/dist/components/Notifications/notifications-stack.svelte.d.ts +4 -0
- package/dist/components/Notifications/notifications-stack.svelte.js +8 -0
- package/dist/components/Progress/Progress.svelte +4 -2
- package/dist/components/Progress/Progress.svelte.d.ts +1 -0
- package/dist/components/Progress/README.md +86 -15
- package/dist/components/Progress/_internal/Bar.svelte +4 -15
- package/dist/components/Progress/_internal/Bar.svelte.d.ts +1 -1
- package/dist/components/Progress/_internal/Circle.svelte +30 -2
- package/dist/components/Progress/_internal/Circle.svelte.d.ts +1 -0
- package/dist/components/Progress/index.css +47 -1
- package/dist/components/Skeleton/README.md +152 -0
- package/dist/components/Skeleton/Skeleton.svelte +6 -7
- package/dist/components/Skeleton/Skeleton.svelte.d.ts +0 -1
- package/dist/components/Skeleton/index.css +73 -43
- package/dist/components/Spinner/README.md +149 -37
- package/dist/components/Spinner/Spinner.svelte +14 -38
- package/dist/components/Spinner/Spinner.svelte.d.ts +2 -1
- package/dist/components/Spinner/SpinnerCircle.svelte +6 -34
- package/dist/components/Spinner/SpinnerCircle.svelte.d.ts +1 -0
- package/dist/components/Spinner/SpinnerCircleOscillate.svelte +10 -5
- package/dist/components/Spinner/SpinnerUnicode.svelte +3 -1
- package/dist/components/Spinner/SpinnerUnicode.svelte.d.ts +1 -0
- package/dist/components/Spinner/index.css +104 -0
- package/dist/components/Switch/README.md +34 -18
- package/dist/components/Switch/Switch.svelte +24 -46
- package/dist/components/Switch/Switch.svelte.d.ts +4 -2
- package/dist/components/Switch/index.css +120 -2
- package/dist/components/Switch/index.d.ts +1 -2
- package/dist/components/Switch/index.js +1 -2
- package/dist/components/TabbedMenu/README.md +28 -17
- package/dist/components/TabbedMenu/TabbedMenu.svelte +5 -46
- package/dist/components/TabbedMenu/TabbedMenu.svelte.d.ts +0 -1
- package/dist/components/TabbedMenu/index.css +85 -3
- package/dist/components/ThemePreview/ThemePreview.svelte +76 -23
- package/dist/components/ThemePreview/ThemePreview.svelte.d.ts +3 -1
- package/dist/components/ThemePreview/index.css +17 -1
- package/dist/components/TwCheck/README.md +32 -13
- package/dist/components/TwCheck/TwCheck.svelte +11 -9
- package/dist/components/TwCheck/TwCheck.svelte.d.ts +0 -1
- package/dist/components/TwCheck/index.css +14 -0
- package/dist/components/TypeaheadInput/TypeaheadInput.svelte +19 -187
- package/dist/components/TypeaheadInput/TypeaheadInput.svelte.d.ts +4 -2
- package/dist/index.css +44 -39
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/themes/blue-orange.css +202 -148
- package/dist/themes/blue-orange.js +24 -0
- package/dist/themes/cyan-red.css +202 -148
- package/dist/themes/cyan-red.js +24 -0
- package/dist/themes/cyan-slate.css +202 -148
- package/dist/themes/cyan-slate.js +25 -1
- package/dist/themes/emerald-pink.css +202 -148
- package/dist/themes/emerald-pink.js +25 -1
- package/dist/themes/fuchsia-emerald.css +202 -148
- package/dist/themes/fuchsia-emerald.js +25 -1
- package/dist/themes/gray.css +202 -148
- package/dist/themes/gray.js +24 -0
- package/dist/themes/indigo-amber.css +202 -148
- package/dist/themes/indigo-amber.js +26 -2
- package/dist/themes/neutral.css +202 -148
- package/dist/themes/neutral.js +24 -0
- package/dist/themes/pink-emerald.css +202 -148
- package/dist/themes/pink-emerald.js +25 -1
- package/dist/themes/purple-yellow.css +202 -148
- package/dist/themes/purple-yellow.js +24 -0
- package/dist/themes/rainbow.css +202 -148
- package/dist/themes/rainbow.js +25 -1
- package/dist/themes/red-blue.css +202 -148
- package/dist/themes/red-blue.js +24 -0
- package/dist/themes/red-cyan.css +202 -148
- package/dist/themes/red-cyan.js +24 -0
- package/dist/themes/rose-teal.css +202 -148
- package/dist/themes/rose-teal.js +24 -0
- package/dist/themes/sky-amber.css +202 -148
- package/dist/themes/sky-amber.js +26 -2
- package/dist/themes/slate-cyan.css +202 -148
- package/dist/themes/slate-cyan.js +25 -1
- package/dist/themes/teal-rose.css +202 -148
- package/dist/themes/teal-rose.js +24 -0
- package/dist/themes/violet-lime.css +202 -148
- package/dist/themes/violet-lime.js +27 -3
- package/dist/utils/design-tokens.js +29 -2
- package/dist/utils/storage-abstraction.js +1 -1
- package/package.json +11 -28
- package/dist/components/Switch/SwitchButton.svelte +0 -134
- package/dist/components/Switch/SwitchButton.svelte.d.ts +0 -21
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
/* =============================================================================
|
|
2
|
+
NAV COMPONENT TOKENS
|
|
3
|
+
Override globally: :root { --stuic-nav-radius: 0; }
|
|
4
|
+
Override locally: <Nav style="--stuic-nav-radius: 9999px;">
|
|
5
|
+
============================================================================= */
|
|
6
|
+
|
|
7
|
+
:root {
|
|
8
|
+
/* Structure tokens */
|
|
9
|
+
--stuic-nav-radius: var(--radius-md);
|
|
10
|
+
--stuic-nav-transition: 150ms;
|
|
11
|
+
--stuic-nav-gap: 0.5rem;
|
|
12
|
+
|
|
13
|
+
/* Children indent */
|
|
14
|
+
--stuic-nav-children-indent: 1rem;
|
|
15
|
+
--stuic-nav-children-gap: 0.25rem;
|
|
16
|
+
|
|
17
|
+
/* Section title (static header above group) */
|
|
18
|
+
--stuic-nav-section-title-padding-x: 0.5rem;
|
|
19
|
+
--stuic-nav-section-title-padding-y: 0.25rem;
|
|
20
|
+
--stuic-nav-section-title-font-size: var(--text-xs);
|
|
21
|
+
--stuic-nav-section-title-font-weight: 600;
|
|
22
|
+
--stuic-nav-section-title-opacity: 0.5;
|
|
23
|
+
--stuic-nav-section-title-letter-spacing: 0.05em;
|
|
24
|
+
|
|
25
|
+
/* Title/header (collapsible group header) */
|
|
26
|
+
--stuic-nav-group-title-padding-x: 0.5rem;
|
|
27
|
+
--stuic-nav-group-title-padding-y: 0.5rem;
|
|
28
|
+
--stuic-nav-group-title-font-size: var(--text-sm);
|
|
29
|
+
--stuic-nav-group-title-font-weight: 700;
|
|
30
|
+
--stuic-nav-group-title-opacity: 0.75;
|
|
31
|
+
--stuic-nav-group-title-height: 2.125rem; /* 34px */
|
|
32
|
+
|
|
33
|
+
/* Item sizing */
|
|
34
|
+
--stuic-nav-item-padding-x: 0.5rem;
|
|
35
|
+
--stuic-nav-item-padding-y: 0.5rem;
|
|
36
|
+
--stuic-nav-item-height: 2.125rem; /* 34px */
|
|
37
|
+
--stuic-nav-item-font-size: var(--text-sm);
|
|
38
|
+
|
|
39
|
+
/* Touch-friendly modifier */
|
|
40
|
+
--stuic-nav-item-height-touch: 2.75rem; /* 44px */
|
|
41
|
+
--stuic-nav-item-padding-y-touch: 0.75rem;
|
|
42
|
+
--stuic-nav-group-title-height-touch: 2.75rem;
|
|
43
|
+
|
|
44
|
+
/* Collapsed mode */
|
|
45
|
+
--stuic-nav-item-size-collapsed: 2.125rem;
|
|
46
|
+
--stuic-nav-item-size-collapsed-touch: 2.75rem; /* 44px */
|
|
47
|
+
|
|
48
|
+
/* Icon */
|
|
49
|
+
--stuic-nav-icon-opacity: 0.75;
|
|
50
|
+
|
|
51
|
+
/* Chevron */
|
|
52
|
+
--stuic-nav-chevron-opacity: 0.5;
|
|
53
|
+
|
|
54
|
+
/* Color tokens: Base state */
|
|
55
|
+
--stuic-nav-item-bg: transparent;
|
|
56
|
+
--stuic-nav-item-text: inherit;
|
|
57
|
+
|
|
58
|
+
/* Color tokens: Hover state */
|
|
59
|
+
--stuic-nav-item-bg-hover: rgb(0 0 0 / 0.1);
|
|
60
|
+
--stuic-nav-item-text-hover: inherit;
|
|
61
|
+
|
|
62
|
+
/* Color tokens: Active state */
|
|
63
|
+
--stuic-nav-item-bg-active: var(--stuic-color-primary);
|
|
64
|
+
--stuic-nav-item-text-active: var(--stuic-color-primary-foreground);
|
|
65
|
+
|
|
66
|
+
/* Color tokens: Focused state (keyboard navigation) */
|
|
67
|
+
--stuic-nav-item-bg-focus: var(--stuic-color-primary);
|
|
68
|
+
--stuic-nav-item-text-focus: var(--stuic-color-primary-foreground);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@layer components {
|
|
72
|
+
/* =============================================================================
|
|
73
|
+
BASE CONTAINER
|
|
74
|
+
============================================================================= */
|
|
75
|
+
|
|
76
|
+
.stuic-nav {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-direction: column;
|
|
79
|
+
gap: var(--stuic-nav-children-gap);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Center items horizontally when collapsed */
|
|
83
|
+
.stuic-nav[data-collapsed] {
|
|
84
|
+
align-items: center;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* =============================================================================
|
|
88
|
+
SECTION TITLE (static header above group)
|
|
89
|
+
============================================================================= */
|
|
90
|
+
|
|
91
|
+
.stuic-nav-section-title {
|
|
92
|
+
/* Layout */
|
|
93
|
+
display: block;
|
|
94
|
+
width: 100%;
|
|
95
|
+
|
|
96
|
+
/* Padding */
|
|
97
|
+
padding: var(--stuic-nav-section-title-padding-y)
|
|
98
|
+
var(--stuic-nav-section-title-padding-x);
|
|
99
|
+
|
|
100
|
+
/* Typography */
|
|
101
|
+
font-size: var(--stuic-nav-section-title-font-size);
|
|
102
|
+
font-weight: var(--stuic-nav-section-title-font-weight);
|
|
103
|
+
letter-spacing: var(--stuic-nav-section-title-letter-spacing);
|
|
104
|
+
line-height: 1;
|
|
105
|
+
|
|
106
|
+
/* Visual */
|
|
107
|
+
opacity: var(--stuic-nav-section-title-opacity);
|
|
108
|
+
|
|
109
|
+
/* Non-interactive */
|
|
110
|
+
user-select: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Collapsed mode: hide title but preserve space */
|
|
114
|
+
.stuic-nav-section-title[data-collapsed] {
|
|
115
|
+
visibility: hidden;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* =============================================================================
|
|
119
|
+
GROUP TITLE/HEADER (collapsible)
|
|
120
|
+
============================================================================= */
|
|
121
|
+
|
|
122
|
+
.stuic-nav-group-title {
|
|
123
|
+
/* Layout */
|
|
124
|
+
display: flex;
|
|
125
|
+
align-items: center;
|
|
126
|
+
gap: var(--stuic-nav-gap);
|
|
127
|
+
width: 100%;
|
|
128
|
+
height: var(--stuic-nav-group-title-height);
|
|
129
|
+
|
|
130
|
+
/* Padding */
|
|
131
|
+
padding: var(--stuic-nav-group-title-padding-y)
|
|
132
|
+
var(--stuic-nav-group-title-padding-x);
|
|
133
|
+
|
|
134
|
+
/* Typography */
|
|
135
|
+
font-size: var(--stuic-nav-group-title-font-size);
|
|
136
|
+
font-weight: var(--stuic-nav-group-title-font-weight);
|
|
137
|
+
text-align: left;
|
|
138
|
+
line-height: 1;
|
|
139
|
+
|
|
140
|
+
/* Visual */
|
|
141
|
+
opacity: var(--stuic-nav-group-title-opacity);
|
|
142
|
+
border-radius: var(--stuic-nav-radius);
|
|
143
|
+
background: transparent;
|
|
144
|
+
border: none;
|
|
145
|
+
|
|
146
|
+
/* Interaction */
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
user-select: none;
|
|
149
|
+
-webkit-tap-highlight-color: transparent;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.stuic-nav-group-title:hover {
|
|
153
|
+
background: var(--stuic-nav-item-bg-hover);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.stuic-nav-group-title:focus {
|
|
157
|
+
outline: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.stuic-nav-group-title:focus-visible {
|
|
161
|
+
background: var(--stuic-nav-item-bg-hover);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Touch-friendly title */
|
|
165
|
+
.stuic-nav-group-title[data-touch-friendly] {
|
|
166
|
+
height: var(--stuic-nav-group-title-height-touch);
|
|
167
|
+
padding-top: var(--stuic-nav-item-padding-y-touch);
|
|
168
|
+
padding-bottom: var(--stuic-nav-item-padding-y-touch);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* =============================================================================
|
|
172
|
+
CHILDREN CONTAINER
|
|
173
|
+
============================================================================= */
|
|
174
|
+
|
|
175
|
+
.stuic-nav-children {
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-direction: column;
|
|
178
|
+
gap: var(--stuic-nav-children-gap);
|
|
179
|
+
padding-left: var(--stuic-nav-children-indent);
|
|
180
|
+
list-style: none;
|
|
181
|
+
margin: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* No indent in collapsed mode */
|
|
185
|
+
.stuic-nav[data-collapsed] .stuic-nav-children {
|
|
186
|
+
padding-left: 0;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/* =============================================================================
|
|
190
|
+
ITEM STYLES
|
|
191
|
+
============================================================================= */
|
|
192
|
+
|
|
193
|
+
.stuic-nav-item {
|
|
194
|
+
/* Layout */
|
|
195
|
+
display: flex;
|
|
196
|
+
align-items: center;
|
|
197
|
+
gap: var(--stuic-nav-gap);
|
|
198
|
+
width: 100%;
|
|
199
|
+
height: var(--stuic-nav-item-height);
|
|
200
|
+
|
|
201
|
+
/* Padding */
|
|
202
|
+
padding: var(--stuic-nav-item-padding-y)
|
|
203
|
+
var(--stuic-nav-item-padding-x);
|
|
204
|
+
|
|
205
|
+
/* Typography */
|
|
206
|
+
font-size: var(--stuic-nav-item-font-size);
|
|
207
|
+
text-align: left;
|
|
208
|
+
text-decoration: none;
|
|
209
|
+
line-height: 1;
|
|
210
|
+
|
|
211
|
+
/* Visual */
|
|
212
|
+
border-radius: var(--stuic-nav-radius);
|
|
213
|
+
background: var(--stuic-nav-item-bg);
|
|
214
|
+
color: var(--stuic-nav-item-text);
|
|
215
|
+
border: none;
|
|
216
|
+
|
|
217
|
+
/* Interaction */
|
|
218
|
+
cursor: pointer;
|
|
219
|
+
user-select: none;
|
|
220
|
+
-webkit-tap-highlight-color: transparent;
|
|
221
|
+
transition:
|
|
222
|
+
background var(--stuic-nav-transition),
|
|
223
|
+
color var(--stuic-nav-transition);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* Icon opacity */
|
|
227
|
+
.stuic-nav-item > span:first-child {
|
|
228
|
+
opacity: var(--stuic-nav-icon-opacity);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/* =============================================================================
|
|
232
|
+
ITEM STATE STYLES
|
|
233
|
+
============================================================================= */
|
|
234
|
+
|
|
235
|
+
/* Hover state */
|
|
236
|
+
.stuic-nav-item:hover:not(:disabled):not([data-active]) {
|
|
237
|
+
background: var(--stuic-nav-item-bg-hover);
|
|
238
|
+
color: var(--stuic-nav-item-text-hover);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/* Focus styles */
|
|
242
|
+
.stuic-nav-item:focus {
|
|
243
|
+
outline: none;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.stuic-nav-item:focus-visible:not([data-active]) {
|
|
247
|
+
background: var(--stuic-nav-item-bg-focus);
|
|
248
|
+
color: var(--stuic-nav-item-text-focus);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
/* Active/Selected state */
|
|
252
|
+
.stuic-nav-item[data-active] {
|
|
253
|
+
background: var(--stuic-nav-item-bg-active);
|
|
254
|
+
color: var(--stuic-nav-item-text-active);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/* Active state: make icon full opacity */
|
|
258
|
+
.stuic-nav-item[data-active] > span:first-child {
|
|
259
|
+
opacity: 1;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
/* Focused state (keyboard navigation) */
|
|
263
|
+
.stuic-nav-item[data-focused]:not([data-active]) {
|
|
264
|
+
background: var(--stuic-nav-item-bg-focus);
|
|
265
|
+
color: var(--stuic-nav-item-text-focus);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/* Disabled state */
|
|
269
|
+
.stuic-nav-item:disabled,
|
|
270
|
+
.stuic-nav-item[data-disabled] {
|
|
271
|
+
opacity: 0.5;
|
|
272
|
+
cursor: not-allowed;
|
|
273
|
+
pointer-events: none;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/* =============================================================================
|
|
277
|
+
TOUCH-FRIENDLY MODIFIER
|
|
278
|
+
============================================================================= */
|
|
279
|
+
|
|
280
|
+
.stuic-nav-item[data-touch-friendly] {
|
|
281
|
+
height: var(--stuic-nav-item-height-touch);
|
|
282
|
+
padding-top: var(--stuic-nav-item-padding-y-touch);
|
|
283
|
+
padding-bottom: var(--stuic-nav-item-padding-y-touch);
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/* =============================================================================
|
|
287
|
+
COLLAPSED MODE
|
|
288
|
+
============================================================================= */
|
|
289
|
+
|
|
290
|
+
.stuic-nav-item[data-collapsed] {
|
|
291
|
+
/* Center content */
|
|
292
|
+
justify-content: center;
|
|
293
|
+
width: var(--stuic-nav-item-size-collapsed);
|
|
294
|
+
height: var(--stuic-nav-item-size-collapsed);
|
|
295
|
+
padding: 0.375rem;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* Collapsed + touch-friendly: minimum 44x44 */
|
|
299
|
+
.stuic-nav-item[data-collapsed][data-touch-friendly] {
|
|
300
|
+
width: var(--stuic-nav-item-size-collapsed-touch);
|
|
301
|
+
height: var(--stuic-nav-item-size-collapsed-touch);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/* Expanding transition state - shift content left */
|
|
305
|
+
.stuic-nav-item[data-expanding] {
|
|
306
|
+
padding-left: var(--stuic-nav-item-padding-x);
|
|
307
|
+
justify-content: flex-start;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* =============================================================================
|
|
311
|
+
CHEVRON STYLES
|
|
312
|
+
============================================================================= */
|
|
313
|
+
|
|
314
|
+
.stuic-nav-group-title > span:first-child,
|
|
315
|
+
.stuic-nav-item[data-collapsed] > span:first-child {
|
|
316
|
+
opacity: var(--stuic-nav-chevron-opacity);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Nav, type Props as NavProps, type NavItem, type NavGroup, NAV_BASE_CLASSES, NAV_SECTION_TITLE_CLASSES, NAV_GROUP_TITLE_CLASSES, NAV_ITEM_CLASSES, NAV_CHILDREN_CLASSES, } from "./Nav.svelte";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Nav, NAV_BASE_CLASSES, NAV_SECTION_TITLE_CLASSES, NAV_GROUP_TITLE_CLASSES, NAV_ITEM_CLASSES, NAV_CHILDREN_CLASSES, } from "./Nav.svelte";
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
import Button from "../Button/Button.svelte";
|
|
41
41
|
import Thc from "../Thc/Thc.svelte";
|
|
42
42
|
import X from "../X/X.svelte";
|
|
43
|
-
import "./index.css";
|
|
44
43
|
import type { Notification } from "./notifications-stack.svelte.js";
|
|
45
44
|
import Progress from "../Progress/Progress.svelte";
|
|
46
45
|
|
|
@@ -167,8 +166,8 @@
|
|
|
167
166
|
{#if n.ttl && !noProgress}
|
|
168
167
|
<Progress
|
|
169
168
|
progress={100 - n._ttlProgress * 100}
|
|
170
|
-
class={twMerge("progress", classProgress)}
|
|
171
|
-
classBar={twMerge("progress-bar", classProgressBar)}
|
|
169
|
+
class={twMerge("progress h-full", classProgress)}
|
|
170
|
+
classBar={twMerge("progress-bar bg-black/5", classProgressBar)}
|
|
172
171
|
styleBar="transition-duration: {notifications.options.disposeInterval}ms;"
|
|
173
172
|
/>
|
|
174
173
|
{/if}
|
|
@@ -27,7 +27,6 @@ export interface Props {
|
|
|
27
27
|
classProgressBar?: string;
|
|
28
28
|
el?: HTMLDivElement;
|
|
29
29
|
}
|
|
30
|
-
import "./index.css";
|
|
31
30
|
declare const Notifications: import("svelte").Component<Props, {}, "el">;
|
|
32
31
|
type Notifications = ReturnType<typeof Notifications>;
|
|
33
32
|
export default Notifications;
|
|
@@ -35,183 +35,183 @@
|
|
|
35
35
|
--stuic-notification-badge-text: var(--color-neutral-50);
|
|
36
36
|
|
|
37
37
|
/* Progress bar */
|
|
38
|
-
--stuic-notification-progress-opacity: 0.1;
|
|
38
|
+
/* --stuic-notification-progress-opacity: 0.1; */
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
/* Default / info */
|
|
47
|
-
.stuic-notification {
|
|
48
|
-
--_bg: var(--stuic-color-info);
|
|
49
|
-
--_text: var(--stuic-color-info-foreground);
|
|
50
|
-
--_border: var(--stuic-color-info-hover);
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.stuic-notification[data-type="success"] {
|
|
54
|
-
--_bg: var(--stuic-color-success);
|
|
55
|
-
--_text: var(--stuic-color-success-foreground);
|
|
56
|
-
--_border: var(--stuic-color-success-hover);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.stuic-notification[data-type="warn"] {
|
|
60
|
-
--_bg: var(--stuic-color-warning);
|
|
61
|
-
--_text: var(--stuic-color-warning-foreground);
|
|
62
|
-
--_border: var(--stuic-color-warning-hover);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.stuic-notification[data-type="error"] {
|
|
66
|
-
--_bg: var(--stuic-color-destructive);
|
|
67
|
-
--_text: var(--stuic-color-destructive-foreground);
|
|
68
|
-
--_border: var(--stuic-color-destructive-hover);
|
|
69
|
-
}
|
|
41
|
+
@layer components {
|
|
42
|
+
/* ============================================================================
|
|
43
|
+
TYPE-BASED COLOR MAPPING
|
|
44
|
+
Each type sets the color palette via internal CSS vars.
|
|
45
|
+
============================================================================ */
|
|
70
46
|
|
|
71
|
-
/*
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
position: relative;
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
width: 100%;
|
|
81
|
-
max-width: 100%;
|
|
47
|
+
/* Default / info */
|
|
48
|
+
.stuic-notification {
|
|
49
|
+
--_bg: var(--stuic-color-info);
|
|
50
|
+
--_text: var(--stuic-color-info-foreground);
|
|
51
|
+
--_border: var(--stuic-color-info-hover);
|
|
52
|
+
}
|
|
82
53
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
54
|
+
.stuic-notification[data-type="success"] {
|
|
55
|
+
--_bg: var(--stuic-color-success);
|
|
56
|
+
--_text: var(--stuic-color-success-foreground);
|
|
57
|
+
--_border: var(--stuic-color-success-hover);
|
|
58
|
+
}
|
|
87
59
|
|
|
88
|
-
|
|
89
|
-
|
|
60
|
+
.stuic-notification[data-type="warn"] {
|
|
61
|
+
--_bg: var(--stuic-color-warning);
|
|
62
|
+
--_text: var(--stuic-color-warning-foreground);
|
|
63
|
+
--_border: var(--stuic-color-warning-hover);
|
|
64
|
+
}
|
|
90
65
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
66
|
+
.stuic-notification[data-type="error"] {
|
|
67
|
+
--_bg: var(--stuic-color-destructive);
|
|
68
|
+
--_text: var(--stuic-color-destructive-foreground);
|
|
69
|
+
--_border: var(--stuic-color-destructive-hover);
|
|
70
|
+
}
|
|
95
71
|
|
|
96
|
-
/*
|
|
97
|
-
|
|
98
|
-
|
|
72
|
+
/* ============================================================================
|
|
73
|
+
BASE STYLES
|
|
74
|
+
============================================================================ */
|
|
99
75
|
|
|
100
|
-
@media (min-width: 40rem) {
|
|
101
76
|
.stuic-notification {
|
|
102
|
-
|
|
77
|
+
/* Layout */
|
|
78
|
+
position: relative;
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
width: 100%;
|
|
82
|
+
max-width: 100%;
|
|
83
|
+
|
|
84
|
+
/* Box model */
|
|
85
|
+
border-width: 1px;
|
|
86
|
+
border-style: solid;
|
|
87
|
+
border-radius: var(--stuic-notification-radius);
|
|
88
|
+
|
|
89
|
+
/* Shadow */
|
|
90
|
+
box-shadow: var(--stuic-notification-shadow);
|
|
91
|
+
|
|
92
|
+
/* Colors - use internal vars set by type */
|
|
93
|
+
background: var(--_bg);
|
|
94
|
+
color: var(--_text);
|
|
95
|
+
border-color: var(--_border);
|
|
96
|
+
|
|
97
|
+
/* Interaction */
|
|
98
|
+
pointer-events: auto;
|
|
103
99
|
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/* ============================================================================
|
|
107
|
-
ICON
|
|
108
|
-
============================================================================ */
|
|
109
|
-
|
|
110
|
-
.stuic-notification .icon {
|
|
111
|
-
display: flex;
|
|
112
|
-
align-items: center;
|
|
113
|
-
justify-content: center;
|
|
114
|
-
padding-top: var(--stuic-notification-padding-y);
|
|
115
|
-
padding-bottom: var(--stuic-notification-padding-y);
|
|
116
|
-
padding-left: var(--stuic-notification-padding-x);
|
|
117
|
-
padding-right: 0;
|
|
118
|
-
color: var(--_text);
|
|
119
|
-
opacity: 0.85;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.stuic-notification .icon svg {
|
|
123
|
-
width: var(--stuic-notification-icon-size);
|
|
124
|
-
height: var(--stuic-notification-icon-size);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/* ============================================================================
|
|
128
|
-
CONTENT
|
|
129
|
-
============================================================================ */
|
|
130
100
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
padding: var(--stuic-notification-padding-y) calc(var(--spacing) * 1)
|
|
137
|
-
var(--stuic-notification-padding-y) var(--stuic-notification-padding-x);
|
|
138
|
-
font-size: var(--stuic-notification-font-size);
|
|
139
|
-
letter-spacing: var(--tracking-tight);
|
|
140
|
-
}
|
|
101
|
+
@media (min-width: 40rem) {
|
|
102
|
+
.stuic-notification {
|
|
103
|
+
width: var(--stuic-notification-max-width);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
141
106
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
107
|
+
/* ============================================================================
|
|
108
|
+
ICON
|
|
109
|
+
============================================================================ */
|
|
110
|
+
|
|
111
|
+
.stuic-notification .icon {
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
padding-top: var(--stuic-notification-padding-y);
|
|
116
|
+
padding-bottom: var(--stuic-notification-padding-y);
|
|
117
|
+
padding-left: var(--stuic-notification-padding-x);
|
|
118
|
+
padding-right: 0;
|
|
119
|
+
color: var(--_text);
|
|
120
|
+
opacity: 0.85;
|
|
121
|
+
}
|
|
145
122
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
123
|
+
.stuic-notification .icon svg {
|
|
124
|
+
width: var(--stuic-notification-icon-size);
|
|
125
|
+
height: var(--stuic-notification-icon-size);
|
|
126
|
+
}
|
|
149
127
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
128
|
+
/* ============================================================================
|
|
129
|
+
CONTENT
|
|
130
|
+
============================================================================ */
|
|
131
|
+
|
|
132
|
+
.stuic-notification .content {
|
|
133
|
+
flex: 1;
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
136
|
+
justify-content: center;
|
|
137
|
+
padding: var(--stuic-notification-padding-y) calc(var(--spacing) * 1)
|
|
138
|
+
var(--stuic-notification-padding-y) var(--stuic-notification-padding-x);
|
|
139
|
+
font-size: var(--stuic-notification-font-size);
|
|
140
|
+
letter-spacing: var(--tracking-tight);
|
|
141
|
+
}
|
|
163
142
|
|
|
164
|
-
.stuic-notification .close-button
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}
|
|
143
|
+
.stuic-notification .content.no-close-button {
|
|
144
|
+
padding-right: var(--stuic-notification-padding-x);
|
|
145
|
+
}
|
|
168
146
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
147
|
+
/* ============================================================================
|
|
148
|
+
CLOSE BUTTON
|
|
149
|
+
============================================================================ */
|
|
150
|
+
|
|
151
|
+
.stuic-notification .close-button {
|
|
152
|
+
align-self: stretch;
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
align-items: center;
|
|
156
|
+
justify-content: center;
|
|
157
|
+
padding: 0 calc(var(--spacing) * 3);
|
|
158
|
+
border-top-right-radius: var(--stuic-notification-radius);
|
|
159
|
+
border-bottom-right-radius: var(--stuic-notification-radius);
|
|
160
|
+
color: var(--_text);
|
|
161
|
+
opacity: 0.75;
|
|
162
|
+
transition: opacity var(--stuic-notification-transition);
|
|
163
|
+
}
|
|
174
164
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
165
|
+
.stuic-notification .close-button:hover {
|
|
166
|
+
opacity: 1;
|
|
167
|
+
background: rgb(0 0 0 / 0.1);
|
|
168
|
+
}
|
|
178
169
|
|
|
179
|
-
.stuic-notification .
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
align-items: center;
|
|
185
|
-
justify-content: center;
|
|
186
|
-
padding: var(--stuic-notification-badge-padding-y)
|
|
187
|
-
var(--stuic-notification-badge-padding-x);
|
|
188
|
-
border-radius: var(--stuic-notification-badge-radius);
|
|
189
|
-
font-size: var(--stuic-notification-badge-font-size);
|
|
190
|
-
line-height: 1;
|
|
191
|
-
background: var(--stuic-notification-badge-bg);
|
|
192
|
-
color: var(--stuic-notification-badge-text);
|
|
193
|
-
}
|
|
170
|
+
.stuic-notification .close-button:focus-visible {
|
|
171
|
+
opacity: 1;
|
|
172
|
+
outline: none;
|
|
173
|
+
background: rgb(0 0 0 / 0.1);
|
|
174
|
+
}
|
|
194
175
|
|
|
195
|
-
/* ============================================================================
|
|
196
|
-
|
|
197
|
-
|
|
176
|
+
/* ============================================================================
|
|
177
|
+
COUNTER BADGE
|
|
178
|
+
============================================================================ */
|
|
179
|
+
|
|
180
|
+
.stuic-notification .count {
|
|
181
|
+
position: absolute;
|
|
182
|
+
top: calc(var(--spacing) * -2);
|
|
183
|
+
right: calc(var(--spacing) * -2);
|
|
184
|
+
display: flex;
|
|
185
|
+
align-items: center;
|
|
186
|
+
justify-content: center;
|
|
187
|
+
padding: var(--stuic-notification-badge-padding-y)
|
|
188
|
+
var(--stuic-notification-badge-padding-x);
|
|
189
|
+
border-radius: var(--stuic-notification-badge-radius);
|
|
190
|
+
font-size: var(--stuic-notification-badge-font-size);
|
|
191
|
+
line-height: 1;
|
|
192
|
+
background: var(--stuic-notification-badge-bg);
|
|
193
|
+
color: var(--stuic-notification-badge-text);
|
|
194
|
+
}
|
|
198
195
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
196
|
+
/* ============================================================================
|
|
197
|
+
PROGRESS BAR
|
|
198
|
+
============================================================================ */
|
|
199
|
+
|
|
200
|
+
.stuic-notification .progress {
|
|
201
|
+
position: absolute;
|
|
202
|
+
inset: 0;
|
|
203
|
+
background: transparent;
|
|
204
|
+
border-bottom-left-radius: var(--stuic-notification-radius);
|
|
205
|
+
border-bottom-right-radius: var(--stuic-notification-radius);
|
|
206
|
+
overflow: hidden;
|
|
207
|
+
pointer-events: none;
|
|
208
|
+
}
|
|
210
209
|
|
|
211
|
-
.stuic-notification .progress-bar {
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
210
|
+
.stuic-notification .progress-bar {
|
|
211
|
+
width: 100%;
|
|
212
|
+
height: 100%;
|
|
213
|
+
/* background: rgb(255 255 255 / 0.5); */
|
|
214
|
+
border-bottom-left-radius: var(--stuic-notification-radius);
|
|
215
|
+
border-bottom-right-radius: var(--stuic-notification-radius);
|
|
216
|
+
}
|
|
217
217
|
}
|