@fest-lib/veela 0.1.20 → 1.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/veela.js +4 -33
- package/package.json +9 -2
- package/src/scss/_layers.scss +5 -34
- package/src/scss/basic/{misc/_core-layout.scss → _core-layout.scss} +1 -1
- package/src/scss/basic/_layers.scss +1 -0
- package/src/scss/basic/{misc/_layout.scss → _layout.scss} +15 -15
- package/src/scss/basic/{misc/_normalize.scss → _normalize.scss} +5 -103
- package/src/scss/basic/{misc/_states.scss → _states.scss} +2 -2
- package/src/scss/{core/misc → basic}/_utilities.scss +4 -4
- package/src/scss/basic/design/_keyframes.scss +1 -1
- package/src/scss/basic/design/_shapes.scss +1 -1
- package/src/scss/basic/index.scss +14 -16
- package/src/scss/chrome.scss +2 -0
- package/src/scss/core/_color-mod.scss +24 -0
- package/src/scss/core/{misc/_color-properties.scss → _color-properties.scss} +1 -1
- package/src/scss/core/{misc/_tokens.scss → _tokens.scss} +10 -93
- package/src/scss/core/index.scss +13 -1
- package/src/scss/index.scss +7 -2
- package/src/scss/index.ts +1 -1
- package/src/scss/{core/interact → interact}/_viewport.scss +1 -1
- package/src/scss/interact/index.scss +18 -0
- package/src/scss/theme/_effects.scss +60 -0
- package/src/scss/theme/index.scss +8 -0
- package/src/scss/{advanced/index.ts → theme/loader.ts} +3 -4
- package/src/scss/ui/_bar.scss +268 -0
- package/src/scss/ui/_buttons.scss +215 -0
- package/src/scss/ui/_chrome-mixins.scss +104 -0
- package/src/scss/ui/_color.scss +3 -0
- package/src/scss/ui/_colorize.scss +5 -0
- package/src/scss/{advanced/layout → ui}/_content.scss +0 -1
- package/src/scss/ui/_core-layout.scss +4 -0
- package/src/scss/ui/_essentials-options.scss +2 -0
- package/src/scss/ui/_essentials.scss +707 -0
- package/src/scss/ui/_explorer-content.scss +417 -0
- package/src/scss/ui/_explorer.scss +274 -0
- package/src/scss/ui/_forms-bare-host-elements.scss +25 -0
- package/src/scss/ui/_forms-options.scss +2 -0
- package/src/scss/ui/_forms.scss +279 -0
- package/src/scss/ui/_forms_misc.scss +201 -0
- package/src/scss/ui/_gridbox.scss +298 -0
- package/src/scss/ui/_home-host.scss +192 -0
- package/src/scss/ui/_index.scss +23 -0
- package/src/scss/ui/_launcher-typography.scss +31 -0
- package/src/scss/ui/_layers.scss +48 -0
- package/src/scss/ui/_layout.scss +3 -0
- package/src/scss/ui/_markdown.scss +1634 -0
- package/src/scss/ui/_modal.scss +309 -0
- package/src/scss/ui/_motion.scss +3 -0
- package/src/scss/ui/_native-host-button-chrome.scss +31 -0
- package/src/scss/ui/_normalize.scss +5 -0
- package/src/scss/ui/_orientation-functions.scss +273 -0
- package/src/scss/ui/_orientbox.scss +97 -0
- package/src/scss/ui/_scrollbar.scss +257 -0
- package/src/scss/ui/_shared-overlays.scss +16 -0
- package/src/scss/ui/_shared.scss +4 -0
- package/src/scss/ui/_sidebar.scss +478 -0
- package/src/scss/ui/_speed-dial.scss +47 -0
- package/src/scss/ui/_states.scss +4 -0
- package/src/scss/ui/_tables.scss +28 -0
- package/src/scss/ui/_tabs.scss +405 -0
- package/src/scss/ui/_taskbar.scss +215 -0
- package/src/scss/ui/_toolbars.scss +167 -0
- package/src/scss/ui/_typography.scss +11 -0
- package/src/scss/ui/_utils.scss +8 -0
- package/src/scss/ui/_viewport.scss +470 -0
- package/src/scss/ui/_window-frame.scss +658 -0
- package/src/scss/ui/components/app-menu.scss +817 -0
- package/src/scss/ui/components/appearance-desktop.scss +14 -0
- package/src/scss/ui/components/appearance-mobile.scss +14 -0
- package/src/scss/ui/components/calendar/flyout.scss +194 -0
- package/src/scss/ui/components/calendar/index.scss +627 -0
- package/src/scss/ui/components/explorer-settings.scss +232 -0
- package/src/scss/ui/components/file-manager-content.scss +2 -0
- package/src/scss/ui/components/file-manager.scss +2 -0
- package/src/scss/ui/components/launcher-icon-mask.scss +34 -0
- package/src/scss/ui/components/navbar.scss +133 -0
- package/src/scss/ui/components/quick-settings.scss +321 -0
- package/src/scss/ui/components/scrollframe.scss +58 -0
- package/src/scss/ui/components/slider.scss +188 -0
- package/src/scss/ui/components/speed-dial.scss +2288 -0
- package/src/scss/ui/components/statusbar.scss +255 -0
- package/src/scss/ui/components/task.scss +118 -0
- package/src/scss/ui/components/taskbar.scss +514 -0
- package/src/scss/ui/components/text.scss +241 -0
- package/src/scss/ui/components/window.scss +601 -0
- package/src/scss/ui/home-host-apply.scss +10 -0
- package/src/scss/ui/index.scss +7 -0
- package/src/scss/ui/native-controls.scss +17 -0
- package/src/scss/advanced/_index.scss +0 -0
- package/src/scss/advanced/animation/_motion.scss +0 -323
- package/src/scss/advanced/color/_color.scss +0 -328
- package/src/scss/advanced/color/_colorize.scss +0 -325
- package/src/scss/advanced/design/_design-tokens.scss +0 -118
- package/src/scss/advanced/design/_effects.scss +0 -275
- package/src/scss/advanced/design/_shadow.scss +0 -359
- package/src/scss/advanced/design/_surfaces.scss +0 -76
- package/src/scss/advanced/effects/_animations.scss +0 -124
- package/src/scss/advanced/effects/_shadows.scss +0 -50
- package/src/scss/advanced/font/_typography.scss +0 -601
- package/src/scss/advanced/index.scss +0 -11
- package/src/scss/advanced/layout/_index.scss +0 -5
- package/src/scss/advanced/layout/_normalize.scss +0 -543
- package/src/scss/advanced/layout/_shared-overlays.scss +0 -162
- package/src/scss/advanced/md3/_md3.scss +0 -506
- package/src/scss/advanced/md3/_utils.scss +0 -114
- package/src/scss/advanced/misc/_config.scss +0 -119
- package/src/scss/advanced/misc/_initials.scss +0 -298
- package/src/scss/advanced/misc/_mixins.scss +0 -179
- package/src/scss/advanced/misc/_rendering.scss +0 -82
- package/src/scss/advanced/misc/_tokens.scss +0 -74
- package/src/scss/advanced/theme/_shared.scss +0 -232
- package/src/scss/advanced/theme/_states.scss +0 -332
- package/src/scss/advanced/theme/_variants.scss +0 -354
- package/src/scss/advanced/tokens/_material-color.scss +0 -120
- package/src/scss/advanced/tokens/_variables.scss +0 -171
- package/src/scss/basic/misc/_index.scss +0 -18
- package/src/scss/basic/misc/_mixins.scss +0 -179
- package/src/scss/basic/misc/_queries.scss +0 -34
- package/src/scss/basic/misc/_tokens.scss +0 -78
- package/src/scss/basic/misc/_veela.scss +0 -12
- package/src/scss/core/misc/_index.scss +0 -6
- /package/src/scss/basic/{misc/_motion.scss → _motion.scss} +0 -0
- /package/src/scss/{advanced/misc → basic}/_queries.scss +0 -0
- /package/src/scss/basic/{misc/_shared.scss → _shared.scss} +0 -0
- /package/src/scss/core/{misc/_config.scss → _config.scss} +0 -0
- /package/src/scss/core/{misc/_functions.scss → _functions.scss} +0 -0
- /package/src/scss/core/{misc/_icons.scss → _icons.scss} +0 -0
- /package/src/scss/core/{misc/_layout.scss → _layout.scss} +0 -0
- /package/src/scss/core/{misc/_mixins.scss → _mixins.scss} +0 -0
- /package/src/scss/core/{misc/_properties.scss → _properties.scss} +0 -0
- /package/src/scss/core/{misc/_utils.scss → _utils.scss} +0 -0
- /package/src/scss/{core/interact → interact}/_draggable.scss +0 -0
- /package/src/scss/{core/interact → interact}/_position.scss +0 -0
- /package/src/scss/{core/interact → interact}/_ps-anchor.scss +0 -0
- /package/src/scss/{core/interact → interact}/_ps-centered.scss +0 -0
- /package/src/scss/{core/interact → interact}/_ps-cursor.scss +0 -0
- /package/src/scss/{core/interact → interact}/_ps-draggable.scss +0 -0
- /package/src/scss/{core/interact → interact}/_ps-mechanic.scss +0 -0
- /package/src/scss/{core/interact → interact}/_ps-properties.scss +0 -0
- /package/src/scss/{core/interact → interact}/_ps-resizable.scss +0 -0
- /package/src/scss/{core/interact → interact}/_resizable.scss +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Filename: _effects.scss
|
|
3
|
+
* FullPath: modules/projects/veela.css/src/scss/theme/_effects.scss
|
|
4
|
+
* Reason for changes: Canonical opt-in motion primitives replace the legacy advanced tree.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@layer theme {
|
|
8
|
+
@keyframes fade-in {
|
|
9
|
+
from {
|
|
10
|
+
opacity: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
to {
|
|
14
|
+
opacity: 1;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@keyframes slide-up {
|
|
19
|
+
from {
|
|
20
|
+
opacity: 0;
|
|
21
|
+
transform: translateY(1rem);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
to {
|
|
25
|
+
opacity: 1;
|
|
26
|
+
transform: translateY(0);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes scale-in {
|
|
31
|
+
from {
|
|
32
|
+
opacity: 0;
|
|
33
|
+
transform: scale(0.95);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
to {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transform: scale(1);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@keyframes validation-pulse {
|
|
43
|
+
50% {
|
|
44
|
+
transform: scale(1.01);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@keyframes daylight {
|
|
49
|
+
0%,
|
|
50
|
+
100% {
|
|
51
|
+
--light-az: 210deg;
|
|
52
|
+
--light-alt: 30deg;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
50% {
|
|
56
|
+
--light-az: 270deg;
|
|
57
|
+
--light-alt: 70deg;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Veela CSS - Advanced Runtime Loader
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
* Inherits core foundation + adds comprehensive component library.
|
|
4
|
+
* Loads the opt-in Veela theme effects bundle.
|
|
6
5
|
*
|
|
7
6
|
* @example
|
|
8
7
|
* ```ts
|
|
9
|
-
* import { loadAdvancedStyles } from "@fest-lib/veela
|
|
8
|
+
* import { loadAdvancedStyles } from "@fest-lib/veela";
|
|
10
9
|
* await loadAdvancedStyles();
|
|
11
10
|
* ```
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
import { loadAsAdopted } from "@fest-lib/dom";
|
|
15
14
|
|
|
16
|
-
import advancedStyles from "
|
|
15
|
+
import advancedStyles from "../theme/index.scss?inline";
|
|
17
16
|
|
|
18
17
|
/**
|
|
19
18
|
* Load advanced veela styles
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Bar Component Styles
|
|
3
|
+
// ============================================================================
|
|
4
|
+
@mixin tabbed-bar($selector: ".bar") {
|
|
5
|
+
@at-root :host {
|
|
6
|
+
|
|
7
|
+
// ================================================================
|
|
8
|
+
// Slotted Bar Content
|
|
9
|
+
// ================================================================
|
|
10
|
+
&::slotted([slot="bar"]), ::slotted([slot="bar"]) {
|
|
11
|
+
// Grid positioning
|
|
12
|
+
grid-column: 1 / -1;
|
|
13
|
+
grid-row: 1 / -1;
|
|
14
|
+
|
|
15
|
+
// Sizing
|
|
16
|
+
inline-size: stretch;
|
|
17
|
+
block-size: stretch;
|
|
18
|
+
max-block-size: 3rem;
|
|
19
|
+
flex-grow: 1;
|
|
20
|
+
|
|
21
|
+
// Alignment
|
|
22
|
+
place-content: center;
|
|
23
|
+
place-items: center;
|
|
24
|
+
|
|
25
|
+
//
|
|
26
|
+
background-color: transparent;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//
|
|
30
|
+
#{$selector} {
|
|
31
|
+
// ================================================================
|
|
32
|
+
// Base Layout
|
|
33
|
+
// ================================================================
|
|
34
|
+
& {
|
|
35
|
+
display: grid;
|
|
36
|
+
grid-template-columns:
|
|
37
|
+
[sidebar-col] minmax(0px, 0px)
|
|
38
|
+
[button-col] minmax(0px, 3.5rem)
|
|
39
|
+
[content-col] minmax(0px, 1fr)
|
|
40
|
+
[pinned-col] minmax(0px, 3.5rem);
|
|
41
|
+
grid-template-rows: minmax(0px, 1fr);
|
|
42
|
+
grid-auto-rows: 0;
|
|
43
|
+
|
|
44
|
+
// Grid positioning
|
|
45
|
+
grid-column: 1 / -1;
|
|
46
|
+
grid-row: bar-row;
|
|
47
|
+
z-index: 3;
|
|
48
|
+
border-radius: 0px;
|
|
49
|
+
|
|
50
|
+
// Sizing
|
|
51
|
+
inline-size: stretch;
|
|
52
|
+
block-size: stretch;
|
|
53
|
+
min-block-size: stretch;
|
|
54
|
+
max-block-size: 3.5rem;
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
|
|
57
|
+
// Spacing
|
|
58
|
+
padding-block: 0.25rem;
|
|
59
|
+
padding-inline: 0.75rem;
|
|
60
|
+
gap: 0px;
|
|
61
|
+
|
|
62
|
+
// Visual
|
|
63
|
+
box-shadow: none;
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
|
|
66
|
+
// Interaction
|
|
67
|
+
pointer-events: auto;
|
|
68
|
+
background-color: oklch(from --c2-surface(0.15, var(--current, currentColor)) l c h / 0.9);
|
|
69
|
+
backdrop-filter: blur(1rem);
|
|
70
|
+
filter: none;
|
|
71
|
+
|
|
72
|
+
// Alignment
|
|
73
|
+
place-content: center;
|
|
74
|
+
place-items: center;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ================================================================
|
|
78
|
+
// Child Elements
|
|
79
|
+
// ================================================================
|
|
80
|
+
& > :where(*) {
|
|
81
|
+
grid-row: 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// ================================================================
|
|
85
|
+
// Spacing by Tab Position
|
|
86
|
+
// ================================================================
|
|
87
|
+
@at-root :host & {
|
|
88
|
+
margin-block-start: 0px;
|
|
89
|
+
margin-block-end: var(--space-md);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@at-root :host([tab-position="bottom"]) & {
|
|
93
|
+
margin-block-start: var(--space-md);
|
|
94
|
+
margin-block-end: 0px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@at-root :host([tab-position="top"]) & {
|
|
98
|
+
margin-block-start: 0px;
|
|
99
|
+
margin-block-end: var(--space-md);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//
|
|
103
|
+
.toolbar-slot {
|
|
104
|
+
padding: 0rem;
|
|
105
|
+
grid-row: 1 / 1 span;
|
|
106
|
+
grid-column: content-col;
|
|
107
|
+
max-inline-size: stretch;
|
|
108
|
+
max-block-size: 3rem;
|
|
109
|
+
inline-size: stretch;
|
|
110
|
+
block-size: stretch;
|
|
111
|
+
min-inline-size: 0px;
|
|
112
|
+
min-block-size: 3rem;
|
|
113
|
+
place-content: center;
|
|
114
|
+
place-items: center;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 0rem;
|
|
118
|
+
margin: 0px;
|
|
119
|
+
inset: 0px;
|
|
120
|
+
z-index: 99;
|
|
121
|
+
border-radius: 50cqmin;
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
opacity: 0;
|
|
124
|
+
visibility: hidden;
|
|
125
|
+
pointer-events: none;
|
|
126
|
+
transition: opacity var(--duration-normal, 160ms) var(--ease-out, ease),
|
|
127
|
+
visibility var(--duration-normal, 160ms) var(--ease-out, ease);
|
|
128
|
+
|
|
129
|
+
//
|
|
130
|
+
&[toolbar-opened="true"] {
|
|
131
|
+
opacity: 1;
|
|
132
|
+
visibility: visible;
|
|
133
|
+
pointer-events: auto;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// ================================================================
|
|
138
|
+
// Sidebar Toggle Button
|
|
139
|
+
// ================================================================
|
|
140
|
+
button.open-sidebar {
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-direction: row;
|
|
143
|
+
align-items: center;
|
|
144
|
+
justify-content: center;
|
|
145
|
+
place-content: center;
|
|
146
|
+
place-items: center;
|
|
147
|
+
gap: 0rem;
|
|
148
|
+
margin-inline-end: var(--space-sm);
|
|
149
|
+
|
|
150
|
+
// Grid positioning
|
|
151
|
+
grid-column: button-col;
|
|
152
|
+
grid-row: 1;
|
|
153
|
+
|
|
154
|
+
// Sizing
|
|
155
|
+
aspect-ratio: 1 / 1;
|
|
156
|
+
inline-size: fit-content;
|
|
157
|
+
block-size: stretch;
|
|
158
|
+
min-inline-size: 3rem;
|
|
159
|
+
min-block-size: 3rem;
|
|
160
|
+
max-inline-size: 3rem;
|
|
161
|
+
box-sizing: border-box;
|
|
162
|
+
padding: 0.25rem;
|
|
163
|
+
|
|
164
|
+
// Visual
|
|
165
|
+
background-color: transparent;
|
|
166
|
+
border: 0px none transparent;
|
|
167
|
+
outline: 0px none transparent;
|
|
168
|
+
border-radius: 50cqmin;
|
|
169
|
+
transition: background-color var(--duration-normal, 160ms) var(--ease-out, ease);
|
|
170
|
+
|
|
171
|
+
// Interaction
|
|
172
|
+
cursor: pointer;
|
|
173
|
+
pointer-events: auto;
|
|
174
|
+
touch-action: pan-x;
|
|
175
|
+
|
|
176
|
+
// Colorization
|
|
177
|
+
background-color: --c2-surface(var(--_color-shade), var(--current, currentColor));
|
|
178
|
+
|
|
179
|
+
// Icon
|
|
180
|
+
ui-icon {
|
|
181
|
+
inline-size: var(--tabbed-icon-size);
|
|
182
|
+
block-size: var(--tabbed-icon-size);
|
|
183
|
+
min-inline-size: var(--tabbed-icon-size);
|
|
184
|
+
min-block-size: var(--tabbed-icon-size);
|
|
185
|
+
max-inline-size: var(--tabbed-icon-size);
|
|
186
|
+
max-block-size: var(--tabbed-icon-size);
|
|
187
|
+
aspect-ratio: 1 / 1;
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// Label
|
|
192
|
+
span {
|
|
193
|
+
display: block;
|
|
194
|
+
font-size: 0.8rem;
|
|
195
|
+
font-weight: 400;
|
|
196
|
+
padding-inline-end: 0.333rem;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Focus state
|
|
200
|
+
&:focus-visible {
|
|
201
|
+
outline: 2px solid color-mix(in oklch, currentColor 35%, transparent);
|
|
202
|
+
outline-offset: 2px;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
// ================================================================
|
|
207
|
+
// Tab Buttons
|
|
208
|
+
// ================================================================
|
|
209
|
+
:where(.ui-tabbed-box-tab) button {
|
|
210
|
+
padding: 0.5rem;
|
|
211
|
+
touch-action: pan-x;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
// ================================================================
|
|
215
|
+
// Handle (hidden)
|
|
216
|
+
// ================================================================
|
|
217
|
+
.ui-tabbed-box-handle {
|
|
218
|
+
inline-size: 0;
|
|
219
|
+
block-size: 0;
|
|
220
|
+
visibility: hidden;
|
|
221
|
+
pointer-events: none;
|
|
222
|
+
place-content: center;
|
|
223
|
+
place-items: center;
|
|
224
|
+
overflow: visible;
|
|
225
|
+
touch-action: pan-x;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// ================================================================
|
|
229
|
+
// Icons
|
|
230
|
+
// ================================================================
|
|
231
|
+
ui-icon {
|
|
232
|
+
content-visibility: visible;
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
color: --c2-on-surface(0.0, var(--current, currentColor));
|
|
235
|
+
--icon-color: --c2-on-surface(0.0, var(--current, currentColor));
|
|
236
|
+
inline-size: var(--tabbed-icon-size);
|
|
237
|
+
block-size: var(--tabbed-icon-size);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// ================================================================
|
|
241
|
+
// Alignment by Tab Position
|
|
242
|
+
// ================================================================
|
|
243
|
+
@at-root :host([tab-position="bottom"]) #{$selector} & {
|
|
244
|
+
align-self: end;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// ================================================================
|
|
248
|
+
// Responsive Behavior
|
|
249
|
+
// ================================================================
|
|
250
|
+
// Drop menu mode: always show button
|
|
251
|
+
@at-root :host([sidebar-drop-menu]) & {
|
|
252
|
+
button.open-sidebar {
|
|
253
|
+
display: flex !important;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Desktop: hide button when sidebar is not in drop menu mode
|
|
258
|
+
@at-root :host(:not([sidebar-drop-menu])) & {
|
|
259
|
+
@container (min-inline-size: 800px) {
|
|
260
|
+
--button-inline-size: 0px;
|
|
261
|
+
& button.open-sidebar {
|
|
262
|
+
display: none;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
@use "./layout" as layout;
|
|
5
|
+
@use "./typography" as text;
|
|
6
|
+
@use "./color" as color;
|
|
7
|
+
@use "./colorize" as colorize;
|
|
8
|
+
@use "./motion" as motion;
|
|
9
|
+
@use "./utils" as utils;
|
|
10
|
+
@use "./shared-overlays" as overlays;
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
// -----------------------------------------------------------------------------
|
|
15
|
+
// Shared base styles
|
|
16
|
+
// -----------------------------------------------------------------------------
|
|
17
|
+
|
|
18
|
+
@mixin button-structure() {
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
|
|
21
|
+
//
|
|
22
|
+
place-items: center;
|
|
23
|
+
place-content: center;
|
|
24
|
+
|
|
25
|
+
//
|
|
26
|
+
gap: var(--button-gap, var(--gap-sm));
|
|
27
|
+
|
|
28
|
+
//
|
|
29
|
+
padding-block: var(--button-padding-y, var(--padding-sm));
|
|
30
|
+
padding-inline: var(--button-padding-x, var(--padding-lg));
|
|
31
|
+
min-block-size: var(--button-min-height, fit-content);
|
|
32
|
+
border-radius: var(--button-radius, var(--radius-full));
|
|
33
|
+
|
|
34
|
+
// Cursor and transition
|
|
35
|
+
cursor: pointer;
|
|
36
|
+
transition:
|
|
37
|
+
var(--transition-transform, transform var(--duration-fast) var(--ease-out)),
|
|
38
|
+
var(--transition-colors, color var(--duration-normal) var(--ease-out), background-color var(--duration-normal) var(--ease-out)),
|
|
39
|
+
var(--transition-opacity, opacity var(--duration-normal) var(--ease-out));
|
|
40
|
+
|
|
41
|
+
//
|
|
42
|
+
pointer-events: auto;
|
|
43
|
+
border: none;
|
|
44
|
+
outline: none;
|
|
45
|
+
|
|
46
|
+
//
|
|
47
|
+
position: relative;
|
|
48
|
+
font-size: text.md3-type("label-large", size);
|
|
49
|
+
|
|
50
|
+
//
|
|
51
|
+
letter-spacing: 0.01em;
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
text-overflow: ellipsis;
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
overflow: hidden;
|
|
56
|
+
user-select: none;
|
|
57
|
+
|
|
58
|
+
//
|
|
59
|
+
min-inline-size: 0px;
|
|
60
|
+
block-size: fit-content;
|
|
61
|
+
inline-size: fit-content;
|
|
62
|
+
max-block-size: stretch;
|
|
63
|
+
max-inline-size: stretch;
|
|
64
|
+
flex-wrap: nowrap;
|
|
65
|
+
|
|
66
|
+
//
|
|
67
|
+
&:disabled {
|
|
68
|
+
opacity: var(--state-opacity-disabled, 0.38);
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//
|
|
73
|
+
& > * { max-inline-size: stretch; }
|
|
74
|
+
|
|
75
|
+
//
|
|
76
|
+
& :where(span, a) {
|
|
77
|
+
display: inline;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
overflow: hidden;
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
flex-wrap: nowrap;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
//
|
|
85
|
+
&:is(input) {
|
|
86
|
+
display: inline-block;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
//
|
|
91
|
+
@mixin button-overlays($fallback-color) {
|
|
92
|
+
--md-button-state-color: var(--md-button-state-color, #{$fallback-color});
|
|
93
|
+
|
|
94
|
+
@include overlays.state-overlay(var(--md-button-state-color, #{$fallback-color}));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@mixin button-focus-ring() {
|
|
98
|
+
@include overlays.focus-ring(var(--md-button-state-color, var(--md-primary)));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@mixin button-icon($size: var(--icon-size-lg)) {
|
|
102
|
+
@include overlays.icon-button($size);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
// -----------------------------------------------------------------------------
|
|
109
|
+
// Unified variant mixin
|
|
110
|
+
// -----------------------------------------------------------------------------
|
|
111
|
+
|
|
112
|
+
@mixin button-variant(
|
|
113
|
+
$variant: filled,
|
|
114
|
+
$role: primary,
|
|
115
|
+
$container-role: secondary-container,
|
|
116
|
+
$state-role: secondary,
|
|
117
|
+
$include-base: true
|
|
118
|
+
) {
|
|
119
|
+
@include colorize.solid-colorize("&", ("shade": 0.05, "tint": 0.0, "scope": "selector", "global-targets": true));
|
|
120
|
+
@if $include-base { @include button-structure; }
|
|
121
|
+
|
|
122
|
+
// Compute the CSS variable to use for state overlays
|
|
123
|
+
$state-var: if(sass($variant == tonal): color.md3-var($state-role); else: color.md3-var($role));
|
|
124
|
+
|
|
125
|
+
// Common CSS variable setup
|
|
126
|
+
--md-button-bg: color-mix(in oklch, var(--color-surface, var(--surface-color, transparent)) 90%, var(--color-on-surface, var(--on-surface-color, transparent)));
|
|
127
|
+
--md-button-on: var(--color-on-surface, var(--on-surface-color, currentColor));
|
|
128
|
+
--md-button-outline-color: var(--border-color, transparent);
|
|
129
|
+
|
|
130
|
+
// Variant-specific styles
|
|
131
|
+
@if $variant == outlined {
|
|
132
|
+
background-color: transparent;
|
|
133
|
+
color: var(--md-button-on, var(--on-surface-color, currentColor));
|
|
134
|
+
border: 1px solid var(--md-button-outline-color, var(#{color.md3-var(outline)}));
|
|
135
|
+
} @else if $variant == text {
|
|
136
|
+
background-color: transparent;
|
|
137
|
+
color: var(--md-button-on, var(--on-surface-color, currentColor));
|
|
138
|
+
border: none;
|
|
139
|
+
} @else {
|
|
140
|
+
// filled, elevated, tonal
|
|
141
|
+
background-color: var(--color-surface, var(--surface-color, transparent));
|
|
142
|
+
color: var(--md-button-on, var(--color-on-surface, currentColor));
|
|
143
|
+
border: none;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Apply state overlays and focus ring
|
|
147
|
+
@include button-overlays(var(#{$state-var}));
|
|
148
|
+
@include button-focus-ring;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
// -----------------------------------------------------------------------------
|
|
153
|
+
// Variant mixins (backward compatibility wrappers)
|
|
154
|
+
// -----------------------------------------------------------------------------
|
|
155
|
+
|
|
156
|
+
@mixin button-filled($role: primary, $include-base: true) {
|
|
157
|
+
@include button-variant(filled, $role, $include-base: $include-base);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@mixin button-elevated($role: primary, $include-base: true) {
|
|
161
|
+
@include button-variant(elevated, $role, $include-base: $include-base);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
@mixin button-tonal($container-role: secondary-container, $state-role: secondary, $include-base: true) {
|
|
165
|
+
@include button-variant(tonal, $state-role, $container-role, $state-role, $include-base: $include-base);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
@mixin button-outlined($role: primary, $include-base: true) {
|
|
169
|
+
@include button-variant(outlined, $role, $include-base: $include-base);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@mixin button-text($role: primary, $include-base: true) {
|
|
173
|
+
@include button-variant(text, $role, $include-base: $include-base);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
// -----------------------------------------------------------------------------
|
|
181
|
+
// Button base mixins
|
|
182
|
+
// -----------------------------------------------------------------------------
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@mixin button-base {
|
|
186
|
+
@include button-structure;
|
|
187
|
+
@include button-filled;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
//
|
|
191
|
+
@mixin button-interactions($transition: var(--transition-base, var(--duration-normal))) {
|
|
192
|
+
@include motion.transition(all, $transition);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
//
|
|
196
|
+
@mixin button-colors() {
|
|
197
|
+
@include button-structure;
|
|
198
|
+
@include button-filled;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
//
|
|
202
|
+
@mixin button-base-variant() {
|
|
203
|
+
// Reuse unified structure with alternate sizing tokens
|
|
204
|
+
@include button-structure;
|
|
205
|
+
@include button-interactions;
|
|
206
|
+
@include button-colors;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
//
|
|
210
|
+
@mixin toolbar-button {
|
|
211
|
+
font-size: var(--font-size-sm);
|
|
212
|
+
|
|
213
|
+
//
|
|
214
|
+
@include layout.container-query("md") { span { display: none; } }
|
|
215
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* FIND:veela-ui
|
|
3
|
+
* TAG:veela,fl-ui
|
|
4
|
+
* WHY: Chrome mixins used by modal/sidebar/toolbars. SoT is veela, not fl.ui/library.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@mixin vstack($gap: var(--space-md)) {
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
gap: $gap;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin inline-toolbar($gap: var(--space-sm)) {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: $gap;
|
|
17
|
+
flex-wrap: nowrap;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
@mixin nav-item {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
gap: var(--space-sm);
|
|
24
|
+
min-block-size: var(--touch-min);
|
|
25
|
+
padding-inline: var(--space-md);
|
|
26
|
+
border-radius: var(--radius-md);
|
|
27
|
+
color: var(--color-on-surface);
|
|
28
|
+
transition: background-color var(--transition-fast), color var(--transition-fast);
|
|
29
|
+
|
|
30
|
+
&:where(:hover, :focus-visible) {
|
|
31
|
+
background: var(--color-surface-hover);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@mixin tonal-surface($role: surface, $opacity: var(--surface-opacity-subtle), $radius: var(--radius-md), $border: null, $shadow: 0, $clip: false) {
|
|
36
|
+
background-color: color-mix(in oklch, var(--color-#{$role}, var(--#{$role}-color, var(--color-surface, transparent))) calc(100% * #{$opacity}), transparent);
|
|
37
|
+
border-radius: $radius;
|
|
38
|
+
|
|
39
|
+
@if $border != null {
|
|
40
|
+
border: $border solid var(--border-color, transparent);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@if $shadow != 0 {
|
|
44
|
+
box-shadow: var(--shadow-#{$shadow}, none);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@if $clip {
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@mixin tonal-list($role: surface, $opacity: var(--surface-opacity-subtle), $radius: var(--radius-md), $border: 0) {
|
|
53
|
+
@include tonal-surface($role, $opacity, $radius, $border);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin glass-backdrop() {
|
|
57
|
+
backdrop-filter: blur(var(--backdrop-blur, 16px));
|
|
58
|
+
background-color: var(--backdrop-color, color-mix(in oklch, var(--color-surface, var(--surface-color, black)) 40%, transparent));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@mixin backdrop-blur($strength: "default") {
|
|
62
|
+
$blur: if(sass($strength == "subtle"): 10px; else: 18px);
|
|
63
|
+
backdrop-filter: blur($blur);
|
|
64
|
+
-webkit-backdrop-filter: blur($blur);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@mixin container-inline() {
|
|
68
|
+
inline-size: min(100%, var(--container-inline-size, 100%));
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@mixin text-heading($role: "headline-small", $align: start) {
|
|
72
|
+
font: var(--type-#{$role}, inherit);
|
|
73
|
+
text-align: $align;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@mixin text-body($role: "body-medium") {
|
|
77
|
+
font: var(--type-#{$role}, inherit);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@mixin text-label($role: "label-medium", $strong: false) {
|
|
81
|
+
font: var(--type-#{$role}, inherit);
|
|
82
|
+
|
|
83
|
+
@if $strong {
|
|
84
|
+
font-weight: var(--font-weight-semibold, 600);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@mixin section-stack($gap: var(--space-md)) {
|
|
89
|
+
@include vstack($gap);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@mixin field-stack($gap: var(--space-sm)) {
|
|
93
|
+
@include vstack($gap);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@mixin scrollbars($size: 8px, $color: currentColor) {
|
|
97
|
+
scrollbar-width: thin;
|
|
98
|
+
scrollbar-color: $color transparent;
|
|
99
|
+
|
|
100
|
+
&::-webkit-scrollbar {
|
|
101
|
+
inline-size: $size;
|
|
102
|
+
block-size: $size;
|
|
103
|
+
}
|
|
104
|
+
}
|