@fest-lib/fl-ui 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 +3 -0
- package/dist/assets/OPFS.uniform.worker-Ddx6J_37.js +2982 -0
- package/dist/fl-ui.js +16004 -0
- package/dist/font-registry-BWosB92f.js +271 -0
- package/package.json +104 -0
- package/src/styles/font-loader.ts +224 -0
- package/src/styles/font-registry.ts +275 -0
- package/src/styles/fonts/_index.scss +8 -0
- package/src/styles/fonts/_inter.scss +171 -0
- package/src/styles/index.scss +2 -0
- package/src/styles/index.ts +33 -0
- package/src/styles/layers.scss +1 -0
- package/src/styles/patch-global-native-controls.scss +13 -0
- package/src/styles/scripts/encode-fonts.ts +172 -0
- package/src/styles/skins/thin/Thin.ts +13 -0
- package/src/styles/ui/_bar.scss +271 -0
- package/src/styles/ui/_buttons.scss +215 -0
- package/src/styles/ui/_color.scss +3 -0
- package/src/styles/ui/_colorize.scss +5 -0
- package/src/styles/ui/_content.scss +169 -0
- package/src/styles/ui/_essentials-options.scss +2 -0
- package/src/styles/ui/_essentials.scss +705 -0
- package/src/styles/ui/_explorer-content.scss +362 -0
- package/src/styles/ui/_explorer.scss +237 -0
- package/src/styles/ui/_forms-bare-host-elements.scss +25 -0
- package/src/styles/ui/_forms-options.scss +2 -0
- package/src/styles/ui/_forms.scss +280 -0
- package/src/styles/ui/_forms_misc.scss +201 -0
- package/src/styles/ui/_gridbox.scss +298 -0
- package/src/styles/ui/_home-host.scss +179 -0
- package/src/styles/ui/_index.scss +22 -0
- package/src/styles/ui/_launcher-typography.scss +31 -0
- package/src/styles/ui/_layers.scss +48 -0
- package/src/styles/ui/_layout.scss +3 -0
- package/src/styles/ui/_markdown.scss +1636 -0
- package/src/styles/ui/_modal.scss +258 -0
- package/src/styles/ui/_motion.scss +3 -0
- package/src/styles/ui/_native-host-button-chrome.scss +31 -0
- package/src/styles/ui/_orientation-functions.scss +274 -0
- package/src/styles/ui/_orientbox.scss +97 -0
- package/src/styles/ui/_scrollbar.scss +257 -0
- package/src/styles/ui/_shared-overlays.scss +16 -0
- package/src/styles/ui/_sidebar.scss +477 -0
- package/src/styles/ui/_speed-dial.scss +47 -0
- package/src/styles/ui/_tables.scss +28 -0
- package/src/styles/ui/_tabs.scss +406 -0
- package/src/styles/ui/_taskbar.scss +215 -0
- package/src/styles/ui/_toolbars.scss +165 -0
- package/src/styles/ui/_typography.scss +11 -0
- package/src/styles/ui/_utils.scss +8 -0
- package/src/styles/ui/_variables.scss +45 -0
- package/src/styles/ui/_viewport.scss +469 -0
- package/src/styles/ui/_window-frame.scss +658 -0
- package/src/styles/ui/home-host-apply.scss +10 -0
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
@use "sass:string";
|
|
2
|
+
|
|
3
|
+
//
|
|
4
|
+
@mixin anchor($name: "ux-scrollbox") { & { anchor-name: --#{$name}; } }
|
|
5
|
+
@mixin anchor-bind($name: "ux-scrollbox") {
|
|
6
|
+
& {
|
|
7
|
+
position-area: span-all !important;
|
|
8
|
+
position-visibility: always !important;
|
|
9
|
+
position: absolute !important;
|
|
10
|
+
inline-size: anchor-size(inline, 100%) !important;
|
|
11
|
+
block-size: anchor-size(block, 100%) !important;
|
|
12
|
+
inset-inline-start: anchor(start, 0px) !important;
|
|
13
|
+
inset-block-start: anchor(start, 0px) !important;
|
|
14
|
+
inset-inline-end: anchor(end, 0px) !important;
|
|
15
|
+
inset-block-end: anchor(end, 0px) !important;
|
|
16
|
+
min-inline-size: 0px;
|
|
17
|
+
min-block-size: 0px;
|
|
18
|
+
max-inline-size: none;
|
|
19
|
+
max-block-size: none;
|
|
20
|
+
overflow: hidden !important;
|
|
21
|
+
pointer-events: none !important;
|
|
22
|
+
scrollbar-width: none !important;
|
|
23
|
+
scrollbar-color: transparent transparent !important;
|
|
24
|
+
scrollbar-gutter: auto !important;
|
|
25
|
+
z-index: 99 !important;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
//
|
|
30
|
+
@mixin scroll-tm($source: "", $name: "ux-scrollbox", $axis: "block") {
|
|
31
|
+
& #{$source} { scroll-timeline-axis : #{$axis}; }
|
|
32
|
+
& #{$source} { scroll-timeline-name : --#{$name}; }
|
|
33
|
+
& { timeline-scope: --#{$name}; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//
|
|
37
|
+
@mixin scroll-tm-2-axis($source: "", $name: "ux-scrollbox") {
|
|
38
|
+
& #{$source} { scroll-timeline-axis : inline, block; }
|
|
39
|
+
& #{$source} { scroll-timeline-name : --#{$name}-x, --#{$name}-y; }
|
|
40
|
+
& { timeline-scope: --#{$name}-x, --#{$name}-y; }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//
|
|
44
|
+
@mixin view-tm($source: "", $name: "ux-viewbox", $axis: "block") {
|
|
45
|
+
& #{$source} { view-timeline-axis : #{$axis}; }
|
|
46
|
+
& #{$source} { view-timeline-name : --#{$name}; }
|
|
47
|
+
& { timeline-scope: --#{$name}; }
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//
|
|
51
|
+
@function lerp($a, $b, $i: "var(--percent, 0)") { @return calc(#{$a} * #{$i} + #{$b} * (1 - #{$i})); }
|
|
52
|
+
@function starts-with ($string, $prefix) { @return string.slice($string, 1, string.length($prefix)) == $prefix; }
|
|
53
|
+
@function strip-prefix($string, $prefix) { @if starts-with($string, $prefix) { @return string.slice($string, string.length($prefix) + 1); }; @return $string; }
|
|
54
|
+
|
|
55
|
+
//
|
|
56
|
+
@mixin with-timeline($timeline: "ux-scrollbox", $name: "percent-coef", $prop: "percent") {
|
|
57
|
+
$is-custom: starts-with($prop, "var("); $strip-prop: strip-prefix($prop, "--");
|
|
58
|
+
$css-prop : sass(if(sass($is-custom): $prop; else: "--#{$strip-prop}"));
|
|
59
|
+
& {
|
|
60
|
+
animation-name: #{$name};
|
|
61
|
+
animation-timeline: --#{$timeline};
|
|
62
|
+
animation-duration: 1ms;
|
|
63
|
+
animation-direction: alternate;
|
|
64
|
+
animation-fill-mode: both;
|
|
65
|
+
animation-timing-function: linear;
|
|
66
|
+
}}
|
|
67
|
+
|
|
68
|
+
//
|
|
69
|
+
@mixin inner-property($name: "percent-coef", $prop: "percent") {
|
|
70
|
+
$is-custom: starts-with($prop, "--"); $strip-prop: strip-prefix($prop, "--");
|
|
71
|
+
$css-prop : sass(if(sass($is-custom): $prop; else: "--#{$strip-prop}"));
|
|
72
|
+
@at-root {
|
|
73
|
+
@if $is-custom { @property --#{$strip-prop} { initial-value: 0; syntax: "<number>"; inherits: true; } }
|
|
74
|
+
@keyframes #{$name} { from { #{$css-prop}: 0.0; }; to { #{$css-prop}: 1.0; }}
|
|
75
|
+
}}
|
|
76
|
+
|
|
77
|
+
//
|
|
78
|
+
$counter: 0;
|
|
79
|
+
@mixin timeline-interpol-coef($property: "percent", $timeline: "ux-scrollbox", $name: "percent-coef-A" + $counter) {
|
|
80
|
+
@include inner-property($name, $property);
|
|
81
|
+
@include with-timeline($timeline, $name);
|
|
82
|
+
$counter: $counter+1;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
//
|
|
86
|
+
@position-try --just-block { inset-block-end: 0px; }
|
|
87
|
+
@position-try --just-inline { inset-inline-end: 0px; }
|
|
88
|
+
|
|
89
|
+
//
|
|
90
|
+
@include inner-property("percent-coef-x", "percent-x");
|
|
91
|
+
@include inner-property("percent-coef-y", "percent-y");
|
|
92
|
+
|
|
93
|
+
// TODO: use CSS if() for hiding these scrollbar
|
|
94
|
+
@mixin axis-scrollbar($selector, $fit: "inline", $thumb: ".thumb", $timeline-name: "ux-scrollbox") {
|
|
95
|
+
$cqf: 100cqi; @if $fit == 'block' { $cqf: 100cqb; };
|
|
96
|
+
$inv: block ; @if $fit == 'block' { $inv: inline; };
|
|
97
|
+
$axe: x; ; @if $fit == 'block' { $axe: y; };
|
|
98
|
+
|
|
99
|
+
//
|
|
100
|
+
& :is(#{$selector}[axis="#{$axe}"]) {
|
|
101
|
+
& { #{$inv}-size: 0.5rem; #{$fit}-size: calc(#{$cqf} - 1rem);
|
|
102
|
+
@if $fit == 'block' {
|
|
103
|
+
grid-column: scrollbar-x !important;
|
|
104
|
+
grid-row: content-h !important;
|
|
105
|
+
} @else {
|
|
106
|
+
grid-column: content-w !important;
|
|
107
|
+
grid-row: scrollbar-y !important;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/*inset-#{$fit}-end : auto;
|
|
111
|
+
inset-#{$inv}-start: auto;
|
|
112
|
+
inset-#{$fit}-start: 0.5rem;
|
|
113
|
+
inset-#{$inv}-end : 1px;*/
|
|
114
|
+
--content-size: calc(#{$cqf} * 1); //--scroll-size: calc(var(--content-size, 0) / var(--scroll-coef, 1));
|
|
115
|
+
--clamped-size: calc(#{$cqf} - 1rem); --max-size: min(100%, var(--clamped-size, #{$cqf}));
|
|
116
|
+
--scroll-coef: clamp(0, calc(var(--content-size, 0.0001px) / var(--scroll-size, 0.0001px)), 1); //! new CSS calc feature
|
|
117
|
+
--determinant: clamp(0, round(up, calc(1 - (var(--scroll-coef, 1) + 0.001)), 1), 1);
|
|
118
|
+
//inset-#{$fit}-start: calc(anchor(--ux-scrollbox start, 0px) + 0.5rem);
|
|
119
|
+
//inset-#{$inv}-end : calc(anchor(--ux-scrollbox end , 0px) + 1px);
|
|
120
|
+
//position-try-fallbacks: --just-inline, --just-block;
|
|
121
|
+
//@include timeline-interpol-coef("--percent-#{$axe}", "#{$timeline-name}-#{$axe}");
|
|
122
|
+
|
|
123
|
+
pointer-events: none !important;
|
|
124
|
+
pointer-events: if(style(--determinant: 0): none; else: auto) !important;
|
|
125
|
+
|
|
126
|
+
//! new CSS if feature
|
|
127
|
+
visibility: collapse !important;
|
|
128
|
+
visibility: if(style(--determinant: 0): collapse; else: visible) !important;
|
|
129
|
+
@include timeline-interpol-coef("--percent-#{$axe}", "#{$timeline-name}-#{$axe}");
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
//
|
|
133
|
+
& :where(#{$thumb})
|
|
134
|
+
{
|
|
135
|
+
#{$inv}-size: 100%; #{$fit}-size: min(calc(var(--max-size, 100%) * var(--scroll-coef, 1)), var(--max-size, 100%));
|
|
136
|
+
--thumb-size: calc(var(--clamped-size, #{$cqf}) * var(--scroll-coef, 0));
|
|
137
|
+
--max-offset: calc(var(--clamped-size, #{$cqf}) - var(--thumb-size, 0));
|
|
138
|
+
@if $fit == block
|
|
139
|
+
{ translate: 0px calc(var(--max-offset, 0) * var(--percent-y, 0)) 0px; } @else
|
|
140
|
+
{ translate: calc(var(--max-offset, 0) * var(--percent-x, 0)) 0px 0px; }
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// TODO: use CSS if() for hiding these scrollbar
|
|
146
|
+
@mixin scrollbar ($selector: ".ui-scrollbar", $anchor: "ux-scrollbox", $thumb: ".ui-thumb") { :where(#{$selector}) {
|
|
147
|
+
& { --fit-unit: calc((var(--content-size, 1) * 1px - 1rem) / var(--content-size, 1)); };
|
|
148
|
+
& { --scroll-coef: 0; }
|
|
149
|
+
& { //
|
|
150
|
+
pointer-events: none;
|
|
151
|
+
touch-action: none;
|
|
152
|
+
user-select: none;
|
|
153
|
+
|
|
154
|
+
//
|
|
155
|
+
background-color: transparent !important;
|
|
156
|
+
position-anchor: --#{$anchor};
|
|
157
|
+
container-type: normal;
|
|
158
|
+
writing-mode: horizontal-tb !important;
|
|
159
|
+
line-height: 0px;
|
|
160
|
+
visibility: collapse;
|
|
161
|
+
box-sizing: border-box;
|
|
162
|
+
direction: ltr !important;
|
|
163
|
+
//overflow: hidden;
|
|
164
|
+
position: relative;
|
|
165
|
+
//position: fixed;
|
|
166
|
+
display: block flow;
|
|
167
|
+
z-index: 9999;
|
|
168
|
+
inset: 0px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
//
|
|
172
|
+
& :where(#{$thumb}) {
|
|
173
|
+
background-color: oklch(from var(--scrollbar-color, #101010F0) l c h / 0.6) !important;
|
|
174
|
+
position-anchor: --#{$anchor};
|
|
175
|
+
pointer-events: auto;
|
|
176
|
+
border-radius: 0.25rem;
|
|
177
|
+
touch-action: none;
|
|
178
|
+
writing-mode: horizontal-tb !important;
|
|
179
|
+
user-select: none;
|
|
180
|
+
line-height: 0px;
|
|
181
|
+
box-sizing: border-box;
|
|
182
|
+
visibility: auto;
|
|
183
|
+
direction: ltr !important;
|
|
184
|
+
position: relative;
|
|
185
|
+
overflow: hidden;
|
|
186
|
+
display: block flow;
|
|
187
|
+
}
|
|
188
|
+
}}
|
|
189
|
+
|
|
190
|
+
//
|
|
191
|
+
@mixin scrollbox($timeline: "ux-scrollbox") {
|
|
192
|
+
& {
|
|
193
|
+
content-visibility: visible !important;
|
|
194
|
+
container-type: size;
|
|
195
|
+
//contain: layout;
|
|
196
|
+
isolation: isolate;
|
|
197
|
+
overflow: hidden;
|
|
198
|
+
position: static;
|
|
199
|
+
scrollbar-color: transparent transparent !important;
|
|
200
|
+
scrollbar-width: none !important;
|
|
201
|
+
scrollbar-gutter: auto !important;
|
|
202
|
+
pointer-events: none !important;
|
|
203
|
+
z-index: 1;
|
|
204
|
+
|
|
205
|
+
//
|
|
206
|
+
display: grid !important;
|
|
207
|
+
grid-template-columns: [content-w] minmax(0px, 1fr) [scrollbar-y] minmax(0px, max-content) !important;
|
|
208
|
+
grid-template-rows: [content-h] minmax(0px, 1fr) [scrollbar-x] minmax(0px, max-content) !important;
|
|
209
|
+
//position: relative;
|
|
210
|
+
//position: fixed !important;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
//
|
|
214
|
+
&, & * {
|
|
215
|
+
interpolate-size: allow-keywords;
|
|
216
|
+
transition-behavior: allow-discrete;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
//
|
|
220
|
+
@include scroll-tm-2-axis("", $timeline);
|
|
221
|
+
@include anchor($timeline);
|
|
222
|
+
@include scrollbar();
|
|
223
|
+
@include anchor-bind();
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
// Scrollbar mixins - veela-independent fallbacks
|
|
227
|
+
// (scrollbar / custom-scrollbar / hide-scrollbar: core/_mixins.scss)
|
|
228
|
+
|
|
229
|
+
@mixin scrollbox {
|
|
230
|
+
overflow: auto;
|
|
231
|
+
overscroll-behavior: contain;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
@mixin scroll-tm-2-axis {
|
|
235
|
+
overflow: auto;
|
|
236
|
+
scroll-behavior: smooth;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
@mixin axis-scrollbar($selector, $axis, $thumb-selector, $timeline-name) {
|
|
240
|
+
// Simplified scrollbar axis handling
|
|
241
|
+
#{$selector}[axis="#{$axis}"] {
|
|
242
|
+
@if $axis == "x" or $axis == "inline" {
|
|
243
|
+
overflow-x: auto;
|
|
244
|
+
overflow-y: hidden;
|
|
245
|
+
} @else {
|
|
246
|
+
overflow-x: hidden;
|
|
247
|
+
overflow-y: auto;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
@mixin with-timeline($name) {
|
|
253
|
+
// Scroll timeline support (progressive enhancement)
|
|
254
|
+
@supports (animation-timeline: scroll()) {
|
|
255
|
+
animation-timeline: scroll();
|
|
256
|
+
}
|
|
257
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
@mixin state-overlay($color: currentColor) {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
@mixin focus-ring($color: currentColor) {
|
|
6
|
+
&:focus-visible {
|
|
7
|
+
outline: 2px solid #{$color};
|
|
8
|
+
outline-offset: 2px;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@mixin icon-button($size: var(--icon-size-lg)) {
|
|
13
|
+
inline-size: #{$size};
|
|
14
|
+
block-size: #{$size};
|
|
15
|
+
padding: 0;
|
|
16
|
+
}
|