@fest-lib/veela 0.1.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/LICENSE +21 -0
- package/README.md +533 -0
- package/dist/veela.js +878 -0
- package/package.json +83 -0
- package/src/scss/_layers.scss +16 -0
- package/src/scss/advanced/_index.scss +0 -0
- package/src/scss/advanced/animation/_motion.scss +317 -0
- package/src/scss/advanced/color/_color.scss +328 -0
- package/src/scss/advanced/color/_colorize.scss +325 -0
- package/src/scss/advanced/design/_design-tokens.scss +118 -0
- package/src/scss/advanced/design/_effects.scss +275 -0
- package/src/scss/advanced/design/_shadow.scss +359 -0
- package/src/scss/advanced/design/_surfaces.scss +76 -0
- package/src/scss/advanced/effects/_animations.scss +124 -0
- package/src/scss/advanced/effects/_shadows.scss +50 -0
- package/src/scss/advanced/font/_typography.scss +600 -0
- package/src/scss/advanced/index.scss +11 -0
- package/src/scss/advanced/index.ts +35 -0
- package/src/scss/advanced/layout/_content.scss +170 -0
- package/src/scss/advanced/layout/_index.scss +5 -0
- package/src/scss/advanced/layout/_normalize.scss +541 -0
- package/src/scss/advanced/layout/_shared-overlays.scss +162 -0
- package/src/scss/advanced/md3/_md3.scss +596 -0
- package/src/scss/advanced/md3/_utils.scss +114 -0
- package/src/scss/advanced/misc/_config.scss +119 -0
- package/src/scss/advanced/misc/_initials.scss +298 -0
- package/src/scss/advanced/misc/_mixins.scss +179 -0
- package/src/scss/advanced/misc/_queries.scss +34 -0
- package/src/scss/advanced/misc/_rendering.scss +82 -0
- package/src/scss/advanced/misc/_tokens.scss +74 -0
- package/src/scss/advanced/theme/_shared.scss +232 -0
- package/src/scss/advanced/theme/_states.scss +332 -0
- package/src/scss/advanced/theme/_variants.scss +354 -0
- package/src/scss/advanced/tokens/_material-color.scss +120 -0
- package/src/scss/advanced/tokens/_variables.scss +171 -0
- package/src/scss/basic/_layers.scss +0 -0
- package/src/scss/basic/design/_index.scss +3 -0
- package/src/scss/basic/design/_keyframes.scss +163 -0
- package/src/scss/basic/design/_shapes.scss +266 -0
- package/src/scss/basic/design/_wavy-runtime.scss +50 -0
- package/src/scss/basic/index.scss +19 -0
- package/src/scss/basic/index.ts +29 -0
- package/src/scss/basic/misc/_core-layout.scss +272 -0
- package/src/scss/basic/misc/_index.scss +18 -0
- package/src/scss/basic/misc/_layout.scss +1040 -0
- package/src/scss/basic/misc/_mixins.scss +179 -0
- package/src/scss/basic/misc/_motion.scss +28 -0
- package/src/scss/basic/misc/_normalize.scss +765 -0
- package/src/scss/basic/misc/_queries.scss +34 -0
- package/src/scss/basic/misc/_shared.scss +232 -0
- package/src/scss/basic/misc/_states.scss +135 -0
- package/src/scss/basic/misc/_tokens.scss +78 -0
- package/src/scss/basic/misc/_veela.scss +12 -0
- package/src/scss/core/index.scss +1 -0
- package/src/scss/core/interact/_draggable.scss +32 -0
- package/src/scss/core/interact/_position.scss +45 -0
- package/src/scss/core/interact/_ps-anchor.scss +28 -0
- package/src/scss/core/interact/_ps-centered.scss +28 -0
- package/src/scss/core/interact/_ps-cursor.scss +18 -0
- package/src/scss/core/interact/_ps-draggable.scss +25 -0
- package/src/scss/core/interact/_ps-mechanic.scss +0 -0
- package/src/scss/core/interact/_ps-properties.scss +54 -0
- package/src/scss/core/interact/_ps-resizable.scss +61 -0
- package/src/scss/core/interact/_resizable.scss +69 -0
- package/src/scss/core/interact/_viewport.scss +469 -0
- package/src/scss/core/misc/_color-properties.scss +64 -0
- package/src/scss/core/misc/_config.scss +110 -0
- package/src/scss/core/misc/_functions.scss +530 -0
- package/src/scss/core/misc/_icons.scss +109 -0
- package/src/scss/core/misc/_index.scss +6 -0
- package/src/scss/core/misc/_layout.scss +49 -0
- package/src/scss/core/misc/_mixins.scss +744 -0
- package/src/scss/core/misc/_properties.scss +245 -0
- package/src/scss/core/misc/_tokens.scss +947 -0
- package/src/scss/core/misc/_utilities.scss +941 -0
- package/src/scss/core/misc/_utils.scss +17 -0
- package/src/scss/index.scss +18 -0
- package/src/scss/index.ts +105 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@mixin HQRendering($importance: null) {
|
|
2
|
+
/*image-rendering: high-quality;
|
|
3
|
+
image-rendering: optimizeQuality;*/
|
|
4
|
+
font-smooth: always;
|
|
5
|
+
text-rendering: optimizeLegibility;
|
|
6
|
+
text-rendering: geometricPrecision;
|
|
7
|
+
shape-rendering: geometricPrecision;
|
|
8
|
+
-webkit-font-smoothing: subpixel-antialiased;
|
|
9
|
+
-moz-osx-font-smoothing: auto;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin LQRendering($importance: null) {
|
|
13
|
+
/*image-rendering: low-quality;
|
|
14
|
+
image-rendering: optimizeSpeed;*/
|
|
15
|
+
font-smooth: never;
|
|
16
|
+
text-rendering: optimizeSpeed;
|
|
17
|
+
shape-rendering: optimizeSpeed;
|
|
18
|
+
shape-rendering: crispEdges;
|
|
19
|
+
-webkit-font-smoothing: antialiased;
|
|
20
|
+
-moz-osx-font-smoothing: grayscale;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@mixin hw-optimize() {
|
|
24
|
+
transform: translateZ(0);
|
|
25
|
+
transform-origin: 50% 50%;
|
|
26
|
+
backface-visibility: hidden;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
overflow: hidden;
|
|
29
|
+
transition: none;
|
|
30
|
+
|
|
31
|
+
@supports (contain: layout paint) {
|
|
32
|
+
contain: layout paint;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@supports (scrollbar-width: none) {
|
|
36
|
+
scrollbar-width: none;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@supports (scrollbar-gutter: stable both-edges) {
|
|
40
|
+
scrollbar-gutter: stable both-edges;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@mixin disable-transform() {
|
|
45
|
+
rotate: none;
|
|
46
|
+
scale: none;
|
|
47
|
+
translate: none;
|
|
48
|
+
transform: none;
|
|
49
|
+
|
|
50
|
+
transform-origin: 50% 50%;
|
|
51
|
+
backface-visibility: visible;
|
|
52
|
+
|
|
53
|
+
filter: none;
|
|
54
|
+
backdrop-filter: none;
|
|
55
|
+
|
|
56
|
+
perspective: none;
|
|
57
|
+
isolation: auto;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@mixin hide-scrollbars() {
|
|
61
|
+
overflow: auto;
|
|
62
|
+
overscroll-behavior: contain;
|
|
63
|
+
scroll-behavior: smooth;
|
|
64
|
+
scrollbar-color: transparent;
|
|
65
|
+
|
|
66
|
+
@supports (scrollbar-width: none) {
|
|
67
|
+
scrollbar-width: none;
|
|
68
|
+
scrollbar-color: transparent;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@supports (scrollbar-gutter: stable both-edges) {
|
|
72
|
+
scrollbar-gutter: stable both-edges;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&::-webkit-scrollbar {
|
|
76
|
+
-webkit-appearance: none;
|
|
77
|
+
inline-size: 0px;
|
|
78
|
+
block-size: 0px;
|
|
79
|
+
display: none;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Filename: _tokens.scss
|
|
3
|
+
* FullPath: modules/projects/veela.css/src/scss/advanced/misc/_tokens.scss
|
|
4
|
+
* Change date and time: 12.30.00_06.08.2026
|
|
5
|
+
* Reason for changes: Document canonical SoT for color tokens.
|
|
6
|
+
*/
|
|
7
|
+
/*
|
|
8
|
+
* INVARIANT: Intentional per-bundle SCSS alias shim for the advanced bundle.
|
|
9
|
+
* Produces NO CSS output — only `$color-*` / `$space-*` / `$radius-*` / `$font-*` SCSS aliases.
|
|
10
|
+
* Canonical color-token source of truth: `core/misc/_tokens.scss` (full bundle).
|
|
11
|
+
* Do NOT `@forward` canonical here — would emit the full `@layer tokens` CSS into the
|
|
12
|
+
* advanced bundle and break its size semantics.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// Design tokens: SCSS aliases for CSS custom properties
|
|
16
|
+
// Keep aliases small and meaningful to encourage reuse
|
|
17
|
+
|
|
18
|
+
$space-2xs: var(--space-2xs);
|
|
19
|
+
$space-xs: var(--space-xs);
|
|
20
|
+
$space-sm: var(--space-sm);
|
|
21
|
+
$space-md: var(--space-md);
|
|
22
|
+
$space-lg: var(--space-lg);
|
|
23
|
+
$space-xl: var(--space-xl);
|
|
24
|
+
$space-2xl: var(--space-2xl);
|
|
25
|
+
|
|
26
|
+
$radius-xs: var(--radius-xs);
|
|
27
|
+
$radius-sm: var(--radius-sm);
|
|
28
|
+
$radius-md: var(--radius-md);
|
|
29
|
+
$radius-lg: var(--radius-lg);
|
|
30
|
+
$radius-xl: var(--radius-xl);
|
|
31
|
+
$radius-full: var(--radius-full);
|
|
32
|
+
|
|
33
|
+
$font-xs: var(--font-xs);
|
|
34
|
+
$font-sm: var(--font-sm);
|
|
35
|
+
$font-base: var(--font-base);
|
|
36
|
+
$font-md: var(--font-md);
|
|
37
|
+
$font-lg: var(--font-lg);
|
|
38
|
+
$font-xl: var(--font-xl);
|
|
39
|
+
$font-2xl: var(--font-2xl);
|
|
40
|
+
|
|
41
|
+
$font-weight-normal: var(--font-weight-normal);
|
|
42
|
+
$font-weight-medium: var(--font-weight-medium);
|
|
43
|
+
$font-weight-semibold: var(--font-weight-semibold);
|
|
44
|
+
$font-weight-bold: var(--font-weight-bold);
|
|
45
|
+
$font-weight-extrabold: var(--font-weight-extrabold);
|
|
46
|
+
|
|
47
|
+
$font-family-base: var(--font-family-base);
|
|
48
|
+
$font-family-mono: var(--font-family-mono);
|
|
49
|
+
|
|
50
|
+
$color-primary: var(--md3-primary);
|
|
51
|
+
$color-primary-container: var(--md3-primary-container);
|
|
52
|
+
$color-secondary: var(--md3-secondary);
|
|
53
|
+
$color-tertiary: var(--md3-tertiary);
|
|
54
|
+
$color-surface: var(--md3-surface);
|
|
55
|
+
$color-surface-variant: var(--md3-surface-variant);
|
|
56
|
+
$color-surface-container: var(--md3-surface-container);
|
|
57
|
+
$color-outline: var(--md3-outline);
|
|
58
|
+
$color-outline-variant: var(--md3-outline-variant);
|
|
59
|
+
$color-error: var(--md3-error);
|
|
60
|
+
$color-inverse-surface: var(--md3-inverse-surface);
|
|
61
|
+
$color-inverse-on-surface: var(--md3-inverse-on-surface);
|
|
62
|
+
$color-scrim: var(--md3-scrim);
|
|
63
|
+
|
|
64
|
+
// Common color variables (compat layer for reducing --c2-* usage)
|
|
65
|
+
$on-surface: var(--on-surface, currentColor);
|
|
66
|
+
$text-secondary: var(--text-secondary, color-mix(in oklch, var(--on-surface, currentColor) 74%, transparent));
|
|
67
|
+
$border-color: var(--border-color, color-mix(in oklch, var(--on-surface, currentColor) 18%, transparent));
|
|
68
|
+
$backdrop: var(--backdrop, oklch(from black l c h / 0.22));
|
|
69
|
+
|
|
70
|
+
// Scrollbar
|
|
71
|
+
$scrollbar-opacity: var(--scrollbar-opacity, 0.56);
|
|
72
|
+
$scrollbar-tint: var(--scrollbar-tint, 86%);
|
|
73
|
+
|
|
74
|
+
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Veela CSS - Core Shared Utilities
|
|
3
|
+
*
|
|
4
|
+
* Reusable mixins, placeholders, and common patterns for core layout styles.
|
|
5
|
+
* Reduces duplication across normalize, states, layout, and gridbox modules.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/* ========================================================================
|
|
9
|
+
Meta-level: Placeholders for zero-specificity selector groups
|
|
10
|
+
======================================================================== */
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Reset border and outline styles (transparent, none, 0px)
|
|
14
|
+
* Use: @extend %reset-borders; or include in selectors
|
|
15
|
+
*/
|
|
16
|
+
%reset-borders {
|
|
17
|
+
border: none 0px transparent;
|
|
18
|
+
outline: none 0px transparent;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Disable user interaction (pointer-events, touch-action, user-select)
|
|
23
|
+
* Use: @extend %disable-interaction;
|
|
24
|
+
*/
|
|
25
|
+
%disable-interaction {
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
touch-action: none;
|
|
28
|
+
user-select: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Lock interaction (pointer-events: none + touch + select disabled)
|
|
33
|
+
* Stronger version with explicit !important for state overrides
|
|
34
|
+
*/
|
|
35
|
+
%lock-interaction {
|
|
36
|
+
pointer-events: none !important;
|
|
37
|
+
touch-action: none !important;
|
|
38
|
+
user-select: none !important;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Basic box-model reset: margin, padding, box-sizing
|
|
43
|
+
*/
|
|
44
|
+
%reset-box-model {
|
|
45
|
+
margin: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* ========================================================================
|
|
51
|
+
Mixins: Common property/style groups
|
|
52
|
+
======================================================================== */
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Reset box model (margin, padding, sizing)
|
|
56
|
+
* @usage: @include reset-box-model();
|
|
57
|
+
*/
|
|
58
|
+
@mixin reset-box-model {
|
|
59
|
+
/*margin: 0;
|
|
60
|
+
padding: 0;*/
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Reset borders and outlines
|
|
66
|
+
* @usage: @include reset-borders();
|
|
67
|
+
*/
|
|
68
|
+
@mixin reset-borders {
|
|
69
|
+
border: none 0px transparent;
|
|
70
|
+
outline: none 0px transparent;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Disable interaction via pointer-events, touch-action, user-select
|
|
75
|
+
* @param $importance [false] - if true, use !important
|
|
76
|
+
* @usage: @include disable-interaction(); or @include disable-interaction(true);
|
|
77
|
+
*/
|
|
78
|
+
@mixin disable-interaction($importance: false) {
|
|
79
|
+
$imp: if(sass($importance): !important; else: null);
|
|
80
|
+
pointer-events: none if(sass($imp != null): #{$imp}; else: null);
|
|
81
|
+
touch-action: none if(sass($imp != null): #{$imp}; else: null);
|
|
82
|
+
user-select: none if(sass($imp != null): #{$imp}; else: null);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Reset form element appearance (font, line-height, margin, text-transform)
|
|
87
|
+
* @usage: @include reset-form-appearance();
|
|
88
|
+
*/
|
|
89
|
+
@mixin reset-form-appearance {
|
|
90
|
+
font: inherit;
|
|
91
|
+
color: inherit;
|
|
92
|
+
letter-spacing: inherit;
|
|
93
|
+
margin: 0;
|
|
94
|
+
border: none;
|
|
95
|
+
outline: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Scrollbar styling for webkit browsers
|
|
100
|
+
* @param $size [8px] - scrollbar width/height
|
|
101
|
+
* @param $color [var(--color-scrollbar, currentColor)] - thumb color
|
|
102
|
+
* @param $radius [var(--border-radius, 4px)] - thumb border-radius
|
|
103
|
+
* @usage: @include scrollbar-webkit(8px, var(--color-scrollbar));
|
|
104
|
+
*/
|
|
105
|
+
@mixin scrollbar-webkit($size: 8px, $color: var(--color-scrollbar, currentColor), $radius: var(--border-radius, 4px)) {
|
|
106
|
+
&::-webkit-scrollbar {
|
|
107
|
+
inline-size: $size;
|
|
108
|
+
block-size: $size;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&::-webkit-scrollbar-track {
|
|
112
|
+
background: transparent;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&::-webkit-scrollbar-thumb {
|
|
116
|
+
background-color: $color;
|
|
117
|
+
border-radius: $radius;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
121
|
+
background: var(--color-outline, #9ca3af);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Scrollbar styling (both webkit and Firefox)
|
|
127
|
+
* @param $color [var(--color-scrollbar, currentColor)] - scrollbar color
|
|
128
|
+
* @usage: @include scrollbar-styling(var(--color-scrollbar));
|
|
129
|
+
*/
|
|
130
|
+
@mixin scrollbar-styling($color: var(--color-scrollbar, currentColor)) {
|
|
131
|
+
scrollbar-width: thin;
|
|
132
|
+
scrollbar-color: $color transparent;
|
|
133
|
+
|
|
134
|
+
@include scrollbar-webkit(var(--scrollbar-size, 8px), $color);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Flex row layout with space-between and wrap
|
|
139
|
+
* Used for nav-like layouts
|
|
140
|
+
* @usage: @include flex-row-wrap();
|
|
141
|
+
*/
|
|
142
|
+
@mixin flex-row-wrap {
|
|
143
|
+
display: flex;
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: space-between;
|
|
146
|
+
flex-wrap: wrap;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Flex column centered (used for labels, stacked content)
|
|
151
|
+
* @usage: @include flex-column-center();
|
|
152
|
+
*/
|
|
153
|
+
@mixin flex-column-center {
|
|
154
|
+
display: flex;
|
|
155
|
+
flex-direction: column;
|
|
156
|
+
align-items: center;
|
|
157
|
+
justify-content: flex-start;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Stretch to viewport size (used for root/body containers)
|
|
162
|
+
* Combines inline-size, block-size with min/max constraints
|
|
163
|
+
* @usage: @include stretch-viewport();
|
|
164
|
+
*/
|
|
165
|
+
@mixin stretch-viewport {
|
|
166
|
+
inline-size: stretch;
|
|
167
|
+
block-size: stretch;
|
|
168
|
+
min-inline-size: 0px;
|
|
169
|
+
min-block-size: 0px;
|
|
170
|
+
max-inline-size: min(100%, min(100cqi, 100dvi));
|
|
171
|
+
max-block-size: min(100%, min(100cqb, 100dvb));
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Hidden state: display none + pointer/touch disabled
|
|
176
|
+
* @param $opacity [false] - if true, also apply opacity: 0
|
|
177
|
+
* @usage: @include hidden-state(); or @include hidden-state(true);
|
|
178
|
+
*/
|
|
179
|
+
@mixin hidden-state($opacity: false) {
|
|
180
|
+
display: none !important;
|
|
181
|
+
pointer-events: none !important;
|
|
182
|
+
touch-action: none !important;
|
|
183
|
+
@if $opacity {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
visibility: collapse;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Prevent dragging of element
|
|
191
|
+
* @usage: @include no-drag();
|
|
192
|
+
*/
|
|
193
|
+
@mixin no-drag {
|
|
194
|
+
-webkit-user-drag: none;
|
|
195
|
+
-moz-user-drag: none;
|
|
196
|
+
user-select: none;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Focus ring without outline (M3-style)
|
|
201
|
+
* @param $color [var(--color-primary, #0066cc)] - focus color
|
|
202
|
+
* @param $radius [var(--radius-sm, 8px)] - border radius
|
|
203
|
+
* @usage: @include focus-ring(var(--color-primary));
|
|
204
|
+
*/
|
|
205
|
+
@mixin focus-ring($color: var(--color-primary, #0066cc), $radius: var(--radius-sm, 8px)) {
|
|
206
|
+
outline: none;
|
|
207
|
+
box-shadow: 0 0 0 3px color-mix(in oklab, $color 35%, transparent);
|
|
208
|
+
border-radius: $radius;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Media element sizing (img, video, canvas, svg)
|
|
213
|
+
* @usage: @include media-sizing();
|
|
214
|
+
*/
|
|
215
|
+
@mixin media-sizing {
|
|
216
|
+
display: block;
|
|
217
|
+
max-inline-size: 100%;
|
|
218
|
+
block-size: auto;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Code element font and sizing
|
|
223
|
+
* @param $font [var(--font-family-mono, 'SF Mono', 'Monaco', 'Roboto Mono', monospace)] - monospace font
|
|
224
|
+
* @usage: @include code-styling();
|
|
225
|
+
*/
|
|
226
|
+
@mixin code-styling($font: var(--font-family-mono, 'SF Mono', 'Monaco', 'Roboto Mono', monospace)) {
|
|
227
|
+
font-family: $font;
|
|
228
|
+
background-color: var(--bgColor-muted);
|
|
229
|
+
border-radius: 0.3em;
|
|
230
|
+
padding: 0.2em 0.4em;
|
|
231
|
+
font-size: 85%;
|
|
232
|
+
}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
@use "veela-lib" as *;
|
|
2
|
+
@use "./shared" as *;
|
|
3
|
+
|
|
4
|
+
//
|
|
5
|
+
$ux-input-button-types: '[type="button"], [type="submit"], [type="reset"]';
|
|
6
|
+
$ux-textual-input-types: '[type="text"], [type="email"], [type="url"], [type="tel"], [type="password"], [type="search"], [type="number"], [type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]';
|
|
7
|
+
$ux-numeric-temporal-types: '[type="number"], [type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]';
|
|
8
|
+
|
|
9
|
+
//
|
|
10
|
+
@mixin ux-textual-interaction {
|
|
11
|
+
@include button-base();
|
|
12
|
+
@include input-base();
|
|
13
|
+
|
|
14
|
+
& {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
justify-items: stretch;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
text-align: start;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:invalid:not(:disabled) {
|
|
23
|
+
--current: var(--color-error, var(--color-danger));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:placeholder-shown {
|
|
27
|
+
--color-tint: var(--text-tint-muted);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&::placeholder {
|
|
31
|
+
color: oklch(from var(--current) l c h / calc(var(--text-tint-muted) + 0.1));
|
|
32
|
+
opacity: 0.7;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//
|
|
37
|
+
@layer ux-states {
|
|
38
|
+
:where(:root, :host, :scope, body) {
|
|
39
|
+
--ux-tone-direction: var(--interaction-tone-direction, 1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
//
|
|
43
|
+
:where(:root, :host, :scope) {
|
|
44
|
+
@include solid-colorize("&");
|
|
45
|
+
@include initial-properties();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
//
|
|
49
|
+
:where(input, option, textarea, select, button) {
|
|
50
|
+
@include solid-colorize("&");
|
|
51
|
+
@include initial-properties();
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:where(input, option, textarea, select, button):disabled {
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
//
|
|
59
|
+
ui-longtext {
|
|
60
|
+
--thumb-size: 1.25rem;
|
|
61
|
+
--track-height: 0.25rem;
|
|
62
|
+
display: inline-block;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
ui-slider[variant="slider"] {
|
|
66
|
+
block-size: 1rem;
|
|
67
|
+
border-radius: 9999px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
//
|
|
71
|
+
:where(button, input:is(#{$ux-input-button-types})) {
|
|
72
|
+
&:not([data-variant]):not([data-icon-only]) {
|
|
73
|
+
@include button-elevated(primary);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&[data-variant="filled"] {
|
|
77
|
+
@include button-filled(primary, false);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&[data-variant="tonal"] {
|
|
81
|
+
@include button-tonal(secondary-container, secondary, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&[data-variant="outlined"] {
|
|
85
|
+
@include button-outlined(primary, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&[data-variant="text"] {
|
|
89
|
+
@include button-text(primary, false);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
// =============================================================================
|
|
96
|
+
// BUTTONS
|
|
97
|
+
// =============================================================================
|
|
98
|
+
|
|
99
|
+
:where(button) {
|
|
100
|
+
@include button-filled();
|
|
101
|
+
|
|
102
|
+
& {
|
|
103
|
+
display: flex-inline;
|
|
104
|
+
place-content: center;
|
|
105
|
+
place-items: center;
|
|
106
|
+
text-align: center;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
// =============================================================================
|
|
113
|
+
// TEXT INPUTS (text, number, email, password, search, tel, url, date, time, datetime-local, month, week)
|
|
114
|
+
// =============================================================================
|
|
115
|
+
|
|
116
|
+
//
|
|
117
|
+
:where(input) {
|
|
118
|
+
&::-webkit-outer-spin-button,
|
|
119
|
+
&::-webkit-inner-spin-button {
|
|
120
|
+
-webkit-appearance: none;
|
|
121
|
+
margin: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:where(#{$ux-numeric-temporal-types}) {
|
|
125
|
+
font-variant-numeric: tabular-nums;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
//
|
|
130
|
+
:where(input:is(#{$ux-textual-input-types}), textarea) {
|
|
131
|
+
@include solid-colorize("&", ("shade": 0.05, "tint": 0.0, "scope": "selector"));
|
|
132
|
+
@include ux-textual-interaction;
|
|
133
|
+
|
|
134
|
+
& {
|
|
135
|
+
inline-size: stretch;
|
|
136
|
+
min-inline-size: 0px;
|
|
137
|
+
max-inline-size: stretch;
|
|
138
|
+
justify-content: space-between;
|
|
139
|
+
justify-items: stretch;
|
|
140
|
+
display: inline-block;
|
|
141
|
+
block-size: fit-content;
|
|
142
|
+
cursor: text;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:is(input[type="datetime-local"]) {
|
|
146
|
+
font-variant-numeric: tabular-nums;
|
|
147
|
+
padding-inline-end: calc(var(--space-lg) * 2);
|
|
148
|
+
|
|
149
|
+
// Enhanced calendar icon styling
|
|
150
|
+
&::-webkit-calendar-picker-indicator {
|
|
151
|
+
cursor: pointer; opacity: 0.8;
|
|
152
|
+
float: end; justify-self: end;
|
|
153
|
+
|
|
154
|
+
@include when-hover { opacity: 1; }
|
|
155
|
+
@include when-active { opacity: 1; }
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
//
|
|
159
|
+
&::-webkit-datetime-edit {
|
|
160
|
+
& { background-color: transparent; float: end; justify-self: end; }
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Enhanced select dropdown styling
|
|
166
|
+
:where(textarea) {
|
|
167
|
+
@include form-field-base;
|
|
168
|
+
& { display: block; inline-size: stretch; }
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
//
|
|
172
|
+
input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"], input[type="week"] {
|
|
173
|
+
&::-webkit-calendar-picker-indicator {
|
|
174
|
+
cursor: pointer; opacity: 0.8;
|
|
175
|
+
transition: filter var(--transition-normal);
|
|
176
|
+
float: end; justify-self: end;
|
|
177
|
+
|
|
178
|
+
@include when-hover { opacity: 1; }
|
|
179
|
+
@include when-active { opacity: 1; }
|
|
180
|
+
@include when-focus-visible { opacity: 1; }
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
&::-webkit-datetime-edit {
|
|
184
|
+
& { background-color: transparent; float: end; justify-self: end; }
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
// =============================================================================
|
|
191
|
+
// CHECKBOX & RADIO INPUTS
|
|
192
|
+
// =============================================================================
|
|
193
|
+
|
|
194
|
+
:where(input:is([type="checkbox"], [type="radio"]), button[data-icon-only]) {
|
|
195
|
+
@include checkbox-base();
|
|
196
|
+
|
|
197
|
+
//
|
|
198
|
+
&:is([type="radio"]) {
|
|
199
|
+
border-radius: var(--radius-full);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
// =============================================================================
|
|
206
|
+
// SELECT ELEMENT
|
|
207
|
+
// =============================================================================
|
|
208
|
+
|
|
209
|
+
:where(select) {
|
|
210
|
+
@include select-base;
|
|
211
|
+
|
|
212
|
+
//
|
|
213
|
+
&:invalid:not(:disabled) {
|
|
214
|
+
--current: var(--color-error, var(--color-danger));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
// =============================================================================
|
|
219
|
+
// RANGE INPUT
|
|
220
|
+
// =============================================================================
|
|
221
|
+
|
|
222
|
+
:where(input[type="range"]) {
|
|
223
|
+
&::-webkit-slider-thumb,
|
|
224
|
+
&::-moz-range-thumb {
|
|
225
|
+
@include solid-colorize("&", ("shade": var(--ux-thumb-base), "tint": 0.0, "scope": "selector"));
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
// =============================================================================
|
|
231
|
+
// FILE & COLOR INPUTS
|
|
232
|
+
// =============================================================================
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
// =============================================================================
|
|
237
|
+
// PROGRESS ELEMENT
|
|
238
|
+
// =============================================================================
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
// =============================================================================
|
|
243
|
+
// METER ELEMENT
|
|
244
|
+
// =============================================================================
|
|
245
|
+
|
|
246
|
+
:where(meter) {
|
|
247
|
+
//
|
|
248
|
+
&::-webkit-meter-optimum-value {
|
|
249
|
+
--current: var(--color-success);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
//
|
|
253
|
+
&::-webkit-meter-suboptimum-value {
|
|
254
|
+
--current: var(--color-warning);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
//
|
|
258
|
+
&::-webkit-meter-even-less-good-value {
|
|
259
|
+
--current: var(--color-danger);
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
//
|
|
265
|
+
@layer ux-existence {
|
|
266
|
+
//
|
|
267
|
+
*[data-hidden]:not([data-hidden="false"]):not([data-opacity-animation]) {
|
|
268
|
+
&, * {
|
|
269
|
+
display: none !important;
|
|
270
|
+
pointer-events: none !important;
|
|
271
|
+
touch-action: none !important;
|
|
272
|
+
content-visibility: auto !important;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
//
|
|
277
|
+
:host([data-hidden]:not([data-hidden="false"]:not([data-opacity-animation]))) {
|
|
278
|
+
&, *, ::slotted(*) {
|
|
279
|
+
display: none !important;
|
|
280
|
+
pointer-events: none !important;
|
|
281
|
+
touch-action: none !important;
|
|
282
|
+
content-visibility: auto !important;
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
//
|
|
287
|
+
:host([data-hidden]:not([data-hidden="false"])) {
|
|
288
|
+
&, *, ::slotted(*) {
|
|
289
|
+
pointer-events: none !important;
|
|
290
|
+
touch-action: none !important;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
//
|
|
295
|
+
*[data-hidden]:not([data-hidden="false"]) {
|
|
296
|
+
&, * {
|
|
297
|
+
pointer-events: none !important;
|
|
298
|
+
touch-action: none !important;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
//
|
|
304
|
+
@layer ux-existence {
|
|
305
|
+
//
|
|
306
|
+
*[data-hidden]:not([data-hidden="false"]):not([data-opacity-animation]) {
|
|
307
|
+
&, * {
|
|
308
|
+
@include hidden-state(true);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
//
|
|
313
|
+
:host([data-hidden]:not([data-hidden="false"]:not([data-opacity-animation]))) {
|
|
314
|
+
&, *, ::slotted(*) {
|
|
315
|
+
@include hidden-state(true);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
//
|
|
320
|
+
:host([data-hidden]:not([data-hidden="false"])) {
|
|
321
|
+
&, *, ::slotted(*) {
|
|
322
|
+
@include disable-interaction(true);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
//
|
|
327
|
+
*[data-hidden]:not([data-hidden="false"]) {
|
|
328
|
+
&, * {
|
|
329
|
+
@include disable-interaction(true);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|