@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,258 @@
|
|
|
1
|
+
@use "veela-lib" as *;
|
|
2
|
+
@use "../../library/mixins" as ui;
|
|
3
|
+
|
|
4
|
+
//
|
|
5
|
+
@mixin modal {
|
|
6
|
+
|
|
7
|
+
//
|
|
8
|
+
.rs-modal-backdrop {
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset: 0;
|
|
11
|
+
display: grid;
|
|
12
|
+
place-content: center;
|
|
13
|
+
place-items: center;
|
|
14
|
+
padding: var(--space-xl);
|
|
15
|
+
z-index: 9999;
|
|
16
|
+
line-height: normal;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
max-inline-size: min(100cqi, 100dvi);
|
|
19
|
+
max-block-size: min(100cqb, 100dvb);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
perspective: 1000;
|
|
22
|
+
|
|
23
|
+
@include ui.glass-backdrop();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
//
|
|
27
|
+
ui-modal, .modal-form {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
gap: var(--gap-xs);
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
|
|
34
|
+
// Responsive sizing
|
|
35
|
+
inline-size: fit-content;
|
|
36
|
+
min-inline-size: min(calc(100cqi - 1rem), 40rem);
|
|
37
|
+
max-inline-size: stretch;
|
|
38
|
+
|
|
39
|
+
block-size: max-content;
|
|
40
|
+
min-block-size: max(calc(90dvb - 1rem), 20rem);
|
|
41
|
+
max-block-size: max(95dvb, 50rem);
|
|
42
|
+
|
|
43
|
+
line-height: normal;
|
|
44
|
+
background-color: var(--surface-color);
|
|
45
|
+
color: var(--on-surface-color);
|
|
46
|
+
padding: var(--padding-lg);
|
|
47
|
+
padding-block-end: var(--space-md);
|
|
48
|
+
border-radius: var(--radius-lg);
|
|
49
|
+
|
|
50
|
+
backface-visibility: hidden;
|
|
51
|
+
transform: translateZ(0px);
|
|
52
|
+
perspective: 1000;
|
|
53
|
+
content-visibility: auto;
|
|
54
|
+
contain: strict;
|
|
55
|
+
|
|
56
|
+
// Mobile overrides
|
|
57
|
+
@media (max-width: 600px) {
|
|
58
|
+
inline-size: fit-content;
|
|
59
|
+
min-inline-size: min(calc(100cqi - 1rem), 40rem);
|
|
60
|
+
max-inline-size: stretch;
|
|
61
|
+
|
|
62
|
+
//
|
|
63
|
+
min-block-size: max(calc(90dvb - 1rem), 20rem);
|
|
64
|
+
max-block-size: max(95dvb, 50rem);
|
|
65
|
+
border-radius: var(--radius-lg) var(--radius-lg) 0 0; // If bottom sheet
|
|
66
|
+
// But generic modal:
|
|
67
|
+
border-radius: var(--radius-lg);
|
|
68
|
+
padding: var(--padding-md);
|
|
69
|
+
margin: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
//
|
|
73
|
+
@include ui.tonal-surface(surface-container-low, var(--surface-opacity-subtle), var(--radius-md));
|
|
74
|
+
@include ui.vstack(var(--space-lg));
|
|
75
|
+
@include ui.container-inline;
|
|
76
|
+
@include scrollable("y");
|
|
77
|
+
|
|
78
|
+
//
|
|
79
|
+
&, & :where(button, input, textarea, select) {
|
|
80
|
+
touch-action: pan-y;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
//
|
|
84
|
+
&, & :where(*) { box-sizing: border-box; touch-action: pan-y; }
|
|
85
|
+
&, &:focus-visible, &:focus { overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; pointer-events: auto; touch-action: pan-y; }
|
|
86
|
+
|
|
87
|
+
& {
|
|
88
|
+
contain: strict;
|
|
89
|
+
content-visibility: auto;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
//
|
|
93
|
+
.modal-title {
|
|
94
|
+
margin: 0;
|
|
95
|
+
line-height: 1.2;
|
|
96
|
+
place-content: center;
|
|
97
|
+
place-items: center;
|
|
98
|
+
text-align: center;
|
|
99
|
+
|
|
100
|
+
//
|
|
101
|
+
justify-content: safe center;
|
|
102
|
+
justify-items: safe center;
|
|
103
|
+
|
|
104
|
+
//
|
|
105
|
+
inline-size: stretch;
|
|
106
|
+
min-inline-size: 0px;
|
|
107
|
+
|
|
108
|
+
//
|
|
109
|
+
@include ui.text-heading("headline-small", center);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
//
|
|
113
|
+
.modal-description {
|
|
114
|
+
margin: 0;
|
|
115
|
+
background: transparent;
|
|
116
|
+
place-content: center;
|
|
117
|
+
place-items: center;
|
|
118
|
+
text-align: center;
|
|
119
|
+
|
|
120
|
+
//
|
|
121
|
+
justify-content: safe center;
|
|
122
|
+
justify-items: safe center;
|
|
123
|
+
|
|
124
|
+
//
|
|
125
|
+
inline-size: stretch;
|
|
126
|
+
min-inline-size: 0px;
|
|
127
|
+
|
|
128
|
+
//
|
|
129
|
+
@include ui.text-body("body-medium");
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
//
|
|
133
|
+
.modal-section {
|
|
134
|
+
@include ui.section-stack(var(--space-sm));
|
|
135
|
+
|
|
136
|
+
//
|
|
137
|
+
padding-block: var(--space-sm);
|
|
138
|
+
background: transparent;
|
|
139
|
+
overflow: visible;
|
|
140
|
+
block-size: max-content;
|
|
141
|
+
|
|
142
|
+
//
|
|
143
|
+
inline-size: stretch;
|
|
144
|
+
min-inline-size: 0px;
|
|
145
|
+
|
|
146
|
+
//
|
|
147
|
+
grid-template-columns: minmax(0px, 1fr);
|
|
148
|
+
place-content: center;
|
|
149
|
+
place-items: center;
|
|
150
|
+
|
|
151
|
+
//
|
|
152
|
+
&:last-of-type {
|
|
153
|
+
border-block-end: none;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
//
|
|
157
|
+
.modal-section-title {
|
|
158
|
+
margin: 0;
|
|
159
|
+
place-content: center;
|
|
160
|
+
place-items: center;
|
|
161
|
+
text-align: center;
|
|
162
|
+
|
|
163
|
+
//
|
|
164
|
+
inline-size: stretch;
|
|
165
|
+
min-inline-size: 0px;
|
|
166
|
+
|
|
167
|
+
//
|
|
168
|
+
justify-content: safe center;
|
|
169
|
+
justify-items: safe center;
|
|
170
|
+
|
|
171
|
+
//
|
|
172
|
+
@include ui.text-label("title-small", true);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
//
|
|
176
|
+
.modal-section-fields {
|
|
177
|
+
@include ui.field-stack(var(--space-sm));
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
//
|
|
182
|
+
.modal-actions {
|
|
183
|
+
@include ui.inline-toolbar(var(--space-md));
|
|
184
|
+
justify-content: space-between;
|
|
185
|
+
inline-size: stretch;
|
|
186
|
+
min-inline-size: 0px;
|
|
187
|
+
overflow: visible;
|
|
188
|
+
background: transparent;
|
|
189
|
+
border: none 0px transparent;
|
|
190
|
+
outline: none 0px transparent;
|
|
191
|
+
|
|
192
|
+
//
|
|
193
|
+
.modal-actions-right {
|
|
194
|
+
@include ui.inline-toolbar(var(--space-sm));
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
//
|
|
199
|
+
.modal-fields {
|
|
200
|
+
inline-size: stretch;
|
|
201
|
+
min-inline-size: fit-content;
|
|
202
|
+
max-inline-size: stretch;
|
|
203
|
+
padding-inline: var(--space-sm);
|
|
204
|
+
max-block-size: stretch;
|
|
205
|
+
block-size: fit-content;
|
|
206
|
+
overflow-y: auto;
|
|
207
|
+
overflow-x: hidden;
|
|
208
|
+
display: grid;
|
|
209
|
+
pointer-events: auto;
|
|
210
|
+
|
|
211
|
+
//
|
|
212
|
+
grid-template-columns: minmax(0px, 1fr);
|
|
213
|
+
grid-auto-rows: minmax(0px, max-content);
|
|
214
|
+
|
|
215
|
+
//
|
|
216
|
+
@include ui.field-stack(var(--space-md));
|
|
217
|
+
@include ui.container-inline;
|
|
218
|
+
@include ui.scrollbars(6px, var(--surface-opacity-emphasis));
|
|
219
|
+
|
|
220
|
+
//
|
|
221
|
+
text-align: start;
|
|
222
|
+
justify-content: start;
|
|
223
|
+
justify-items: start;
|
|
224
|
+
pointer-events: auto;
|
|
225
|
+
|
|
226
|
+
//
|
|
227
|
+
.contacts-group, .modal-field {
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
gap: var(--space-sm);
|
|
231
|
+
|
|
232
|
+
//
|
|
233
|
+
place-content: center;
|
|
234
|
+
place-items: center;
|
|
235
|
+
|
|
236
|
+
//
|
|
237
|
+
align-content: safe center;
|
|
238
|
+
align-items: safe center;
|
|
239
|
+
|
|
240
|
+
//
|
|
241
|
+
inline-size: stretch;
|
|
242
|
+
min-inline-size: fit-content;
|
|
243
|
+
max-inline-size: stretch;
|
|
244
|
+
|
|
245
|
+
//
|
|
246
|
+
pointer-events: auto;
|
|
247
|
+
|
|
248
|
+
//
|
|
249
|
+
label {
|
|
250
|
+
text-align: start;
|
|
251
|
+
align-content: start;
|
|
252
|
+
align-items: start;
|
|
253
|
+
align-self: start;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Shared native `<button>` chrome (host opt-in patch uses this without affecting `.btn` twice).
|
|
2
|
+
@mixin essentials-native-host-button-chrome-base() {
|
|
3
|
+
display: inline-flex;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
gap: var(--space-sm);
|
|
7
|
+
padding-block: 0px;
|
|
8
|
+
padding-inline: 0px;
|
|
9
|
+
font-size: var(--font-size-sm);
|
|
10
|
+
font-weight: 500;
|
|
11
|
+
border-radius: var(--radius-md);
|
|
12
|
+
background: var(--color-bg-alt);
|
|
13
|
+
color: var(--color-fg);
|
|
14
|
+
border: 1px solid var(--color-border);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
transition: all var(--transition-fast);
|
|
17
|
+
|
|
18
|
+
&:hover:not(:disabled) {
|
|
19
|
+
background: var(--color-border);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&:focus-visible {
|
|
23
|
+
outline: 2px solid var(--color-primary);
|
|
24
|
+
outline-offset: 2px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:disabled {
|
|
28
|
+
opacity: 0.5;
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
@use "sass:string";
|
|
2
|
+
/* NOTE: `make-func` lives in Veela (not `src/lib`); the old path was invalid. */
|
|
3
|
+
@use "../../../../projects/veela.css/src/scss/core/misc/functions" as func;
|
|
4
|
+
|
|
5
|
+
//
|
|
6
|
+
@function css-rem($value, $mod) {
|
|
7
|
+
@return string.unquote("rem(#{$value}, #{$mod})");
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
//
|
|
11
|
+
@function css-mod($value, $mod) {
|
|
12
|
+
@return string.unquote("mod(#{$value}, #{$mod})");
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
//
|
|
18
|
+
@include func.make-func("@function --get-oriented-size-num(\
|
|
19
|
+
--orient <number>: 0, \
|
|
20
|
+
--osx <number>: 0, \
|
|
21
|
+
--osy <number>: 0, \
|
|
22
|
+
--axis-to-return <number>: 0 \
|
|
23
|
+
) returns <number>") {
|
|
24
|
+
--go-orient: round(nearest, var(--orient, 0), 1);
|
|
25
|
+
--go-axis: clamp(0, round(nearest, var(--axis-to-return, 0), 1), 1);
|
|
26
|
+
--go-axis-inline: calc(1 - var(--go-axis, 0));
|
|
27
|
+
--go-axis-block: var(--go-axis, 0);
|
|
28
|
+
|
|
29
|
+
--go-swap-raw: #{css-mod(var(--go-orient), 2)};
|
|
30
|
+
--go-swap: clamp(0, round(nearest, var(--go-swap-raw), 1), 1);
|
|
31
|
+
--go-swap-inline: calc(1 - var(--go-swap, 0));
|
|
32
|
+
|
|
33
|
+
--go-primary: var(--osx, 0);
|
|
34
|
+
--go-secondary: var(--osy, 0);
|
|
35
|
+
|
|
36
|
+
--go-inline: calc(
|
|
37
|
+
var(--go-primary) * var(--go-swap-inline) +
|
|
38
|
+
var(--go-secondary) * var(--go-swap)
|
|
39
|
+
);
|
|
40
|
+
--go-block: calc(
|
|
41
|
+
var(--go-secondary) * var(--go-swap-inline) +
|
|
42
|
+
var(--go-primary) * var(--go-swap)
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
result: calc(
|
|
46
|
+
var(--go-inline) * var(--go-axis-inline) +
|
|
47
|
+
var(--go-block) * var(--go-axis-block)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
//
|
|
54
|
+
@include func.make-func("@function --get-oriented-size(\
|
|
55
|
+
--orient <number>: 0, \
|
|
56
|
+
--osx <length-percentage>: 0px, \
|
|
57
|
+
--osy <length-percentage>: 0px, \
|
|
58
|
+
--axis-to-return <number>: 0 \
|
|
59
|
+
) returns <length-percentage>") {
|
|
60
|
+
--go-orient: mod(round(nearest, var(--orient, 0), 1), 4);
|
|
61
|
+
--go-axis: clamp(0, round(nearest, var(--axis-to-return, 0), 1), 1);
|
|
62
|
+
--go-axis-inline: calc(1 - var(--go-axis, 0));
|
|
63
|
+
--go-axis-block: var(--go-axis, 0);
|
|
64
|
+
|
|
65
|
+
--go-swap-raw: #{css-mod(var(--go-orient, 0), 2)};
|
|
66
|
+
--go-swap: clamp(0, round(nearest, var(--go-swap-raw, 0), 1), 1);
|
|
67
|
+
--go-swap-inline: calc(1 - var(--go-swap, 0));
|
|
68
|
+
|
|
69
|
+
--go-primary: var(--osx, 0px);
|
|
70
|
+
--go-secondary: var(--osy, 0px);
|
|
71
|
+
|
|
72
|
+
--go-inline: calc(var(--go-primary) * var(--go-swap-inline) + var(--go-secondary) * var(--go-swap));
|
|
73
|
+
--go-block: calc(var(--go-secondary) * var(--go-swap-inline) + var(--go-primary) * var(--go-swap));
|
|
74
|
+
|
|
75
|
+
result: calc(
|
|
76
|
+
var(--go-inline) * var(--go-axis-inline) +
|
|
77
|
+
var(--go-block) * var(--go-axis-block)
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
//
|
|
84
|
+
@include func.make-func("@function --get-oriented-vector(\
|
|
85
|
+
--orient <number>: 0, \
|
|
86
|
+
--ocx <length-percentage>: 0px, \
|
|
87
|
+
--ocy <length-percentage>: 0px, \
|
|
88
|
+
--axis-to-return <number>: 0 \
|
|
89
|
+
) returns <length-percentage>") {
|
|
90
|
+
--go-orient: mod(round(nearest, var(--orient, 0), 1), 4);
|
|
91
|
+
--go-axis: clamp(0, round(nearest, var(--axis-to-return, 0), 1), 1);
|
|
92
|
+
--go-axis-inline: calc(1 - var(--go-axis, 0));
|
|
93
|
+
--go-axis-block: var(--go-axis, 0);
|
|
94
|
+
|
|
95
|
+
--go-swap-raw: #{css-mod(var(--go-orient, 0), 2)};
|
|
96
|
+
--go-swap: clamp(0, round(nearest, var(--go-swap-raw, 0), 1), 1);
|
|
97
|
+
--go-swap-inline: calc(1 - var(--go-swap, 0));
|
|
98
|
+
|
|
99
|
+
--go-primary-direct: var(--ocx, 0px);
|
|
100
|
+
--go-secondary-direct: var(--ocy, 0px);
|
|
101
|
+
|
|
102
|
+
--go-inline-direct: calc(
|
|
103
|
+
var(--go-primary-direct) * var(--go-swap-inline) +
|
|
104
|
+
var(--go-secondary-direct) * var(--go-swap)
|
|
105
|
+
);
|
|
106
|
+
--go-block-direct: calc(
|
|
107
|
+
var(--go-secondary-direct) * var(--go-swap-inline) +
|
|
108
|
+
var(--go-primary-direct) * var(--go-swap)
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
//
|
|
112
|
+
--go-inline-inverted: calc(0px - var(--go-inline-direct));
|
|
113
|
+
--go-block-inverted: calc(0px - var(--go-block-direct));
|
|
114
|
+
--go-rev-inline: clamp(0, calc(var(--go-orient) - 1), 1);
|
|
115
|
+
|
|
116
|
+
//
|
|
117
|
+
--go-rev-block: clamp(0, calc((1 - abs(calc(var(--go-orient) - 1.5))) * 2), 1);
|
|
118
|
+
--go-inline: calc(var(--go-inline-direct) * (1 - var(--go-rev-inline)) + var(--go-inline-inverted) * var(--go-rev-inline));
|
|
119
|
+
--go-block: calc(var(--go-block-direct) * (1 - var(--go-rev-block)) + var(--go-block-inverted) * var(--go-rev-block));
|
|
120
|
+
|
|
121
|
+
//
|
|
122
|
+
result: calc(
|
|
123
|
+
var(--go-inline) * var(--go-axis-inline) +
|
|
124
|
+
var(--go-block) * var(--go-axis-block)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
//
|
|
131
|
+
@include func.make-func("@function --get-oriented-coord-num(\
|
|
132
|
+
--orient <number>: 0, \
|
|
133
|
+
--ocx <number>: 0, \
|
|
134
|
+
--ocy <number>: 0, \
|
|
135
|
+
--osx <number>: 0, \
|
|
136
|
+
--osy <number>: 0, \
|
|
137
|
+
--axis-to-return <number>: 0 \
|
|
138
|
+
) returns <number>") {
|
|
139
|
+
--go-orient: mod(round(nearest, var(--orient, 0), 1), 4);
|
|
140
|
+
--go-axis: clamp(0, round(nearest, var(--axis-to-return, 0), 1), 1);
|
|
141
|
+
--go-axis-inline: calc(1 - var(--go-axis, 0));
|
|
142
|
+
--go-axis-block: var(--go-axis, 0);
|
|
143
|
+
|
|
144
|
+
--go-swap-raw: #{css-mod(var(--go-orient, 0), 2)};
|
|
145
|
+
--go-swap: clamp(0, round(nearest, var(--go-swap-raw, 0), 1), 1);
|
|
146
|
+
--go-swap-inline: calc(1 - var(--go-swap, 0));
|
|
147
|
+
|
|
148
|
+
--go-primary-direct: var(--ocx, 0);
|
|
149
|
+
--go-secondary-direct: var(--ocy, 0);
|
|
150
|
+
--go-primary-size: var(--osx, 0);
|
|
151
|
+
--go-secondary-size: var(--osy, 0);
|
|
152
|
+
|
|
153
|
+
--go-inline-direct: calc(
|
|
154
|
+
var(--go-primary-direct) * var(--go-swap-inline) +
|
|
155
|
+
var(--go-secondary-direct) * var(--go-swap)
|
|
156
|
+
);
|
|
157
|
+
--go-block-direct: calc(
|
|
158
|
+
var(--go-secondary-direct) * var(--go-swap-inline) +
|
|
159
|
+
var(--go-primary-direct) * var(--go-swap)
|
|
160
|
+
);
|
|
161
|
+
|
|
162
|
+
--go-inline-size: calc(
|
|
163
|
+
var(--go-primary-size) * var(--go-swap-inline) +
|
|
164
|
+
var(--go-secondary-size) * var(--go-swap)
|
|
165
|
+
);
|
|
166
|
+
--go-block-size: calc(
|
|
167
|
+
var(--go-secondary-size) * var(--go-swap-inline) +
|
|
168
|
+
var(--go-primary-size) * var(--go-swap)
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
--go-inline-inverted: calc(
|
|
172
|
+
var(--go-inline-size, calc(var(--go-inline-direct) + var(--go-inline-direct))) -
|
|
173
|
+
var(--go-inline-direct)
|
|
174
|
+
);
|
|
175
|
+
--go-block-inverted: calc(
|
|
176
|
+
var(--go-block-size, calc(var(--go-block-direct) + var(--go-block-direct))) -
|
|
177
|
+
var(--go-block-direct)
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
--go-rev-inline: clamp(0, calc(var(--go-orient) - 1), 1);
|
|
181
|
+
--go-rev-block: clamp(
|
|
182
|
+
0,
|
|
183
|
+
calc((1 - abs(calc(var(--go-orient) - 1.5))) * 2),
|
|
184
|
+
1
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
--go-inline: calc(
|
|
188
|
+
var(--go-inline-direct) * (1 - var(--go-rev-inline)) +
|
|
189
|
+
var(--go-inline-inverted) * var(--go-rev-inline)
|
|
190
|
+
);
|
|
191
|
+
--go-block: calc(
|
|
192
|
+
var(--go-block-direct) * (1 - var(--go-rev-block)) +
|
|
193
|
+
var(--go-block-inverted) * var(--go-rev-block)
|
|
194
|
+
);
|
|
195
|
+
|
|
196
|
+
result: calc(
|
|
197
|
+
var(--go-inline) * var(--go-axis-inline) +
|
|
198
|
+
var(--go-block) * var(--go-axis-block)
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
//
|
|
205
|
+
@include func.make-func("@function --get-oriented-coordinate(\
|
|
206
|
+
--orient <number>: 0, \
|
|
207
|
+
--ocx <length-percentage>: 0px, \
|
|
208
|
+
--ocy <length-percentage>: 0px, \
|
|
209
|
+
--osx <length-percentage>: 0px, \
|
|
210
|
+
--osy <length-percentage>: 0px, \
|
|
211
|
+
--axis-to-return <number>: 0 \
|
|
212
|
+
) returns <length-percentage>") {
|
|
213
|
+
--go-orient: mod(round(nearest, var(--orient, 0), 1), 4);
|
|
214
|
+
--go-axis: clamp(0, round(nearest, var(--axis-to-return, 0), 1), 1);
|
|
215
|
+
--go-axis-inline: calc(1 - var(--go-axis, 0));
|
|
216
|
+
--go-axis-block: var(--go-axis, 0);
|
|
217
|
+
|
|
218
|
+
--go-swap-raw: #{css-mod(var(--go-orient, 0), 2)};
|
|
219
|
+
--go-swap: clamp(0, round(nearest, var(--go-swap-raw, 0), 1), 1);
|
|
220
|
+
--go-swap-inline: calc(1 - var(--go-swap, 0));
|
|
221
|
+
|
|
222
|
+
--go-primary-direct: var(--ocx, 0px);
|
|
223
|
+
--go-secondary-direct: var(--ocy, 0px);
|
|
224
|
+
--go-primary-size: var(--osx, 0px);
|
|
225
|
+
--go-secondary-size: var(--osy, 0px);
|
|
226
|
+
|
|
227
|
+
--go-inline-direct: calc(
|
|
228
|
+
var(--go-primary-direct) * var(--go-swap-inline) +
|
|
229
|
+
var(--go-secondary-direct) * var(--go-swap)
|
|
230
|
+
);
|
|
231
|
+
--go-block-direct: calc(
|
|
232
|
+
var(--go-secondary-direct) * var(--go-swap-inline) +
|
|
233
|
+
var(--go-primary-direct) * var(--go-swap)
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
--go-inline-size: calc(
|
|
237
|
+
var(--go-primary-size) * var(--go-swap-inline) +
|
|
238
|
+
var(--go-secondary-size) * var(--go-swap)
|
|
239
|
+
);
|
|
240
|
+
--go-block-size: calc(
|
|
241
|
+
var(--go-secondary-size) * var(--go-swap-inline) +
|
|
242
|
+
var(--go-primary-size) * var(--go-swap)
|
|
243
|
+
);
|
|
244
|
+
|
|
245
|
+
--go-inline-inverted: calc(
|
|
246
|
+
var(--go-inline-size, calc(var(--go-inline-direct) + var(--go-inline-direct))) -
|
|
247
|
+
var(--go-inline-direct)
|
|
248
|
+
);
|
|
249
|
+
--go-block-inverted: calc(
|
|
250
|
+
var(--go-block-size, calc(var(--go-block-direct) + var(--go-block-direct))) -
|
|
251
|
+
var(--go-block-direct)
|
|
252
|
+
);
|
|
253
|
+
|
|
254
|
+
--go-rev-inline: clamp(0, calc(var(--go-orient) - 1), 1);
|
|
255
|
+
--go-rev-block: clamp(
|
|
256
|
+
0,
|
|
257
|
+
calc((1 - abs(calc(var(--go-orient) - 1.5))) * 2),
|
|
258
|
+
1
|
|
259
|
+
);
|
|
260
|
+
|
|
261
|
+
--go-inline: calc(
|
|
262
|
+
var(--go-inline-direct) * (1 - var(--go-rev-inline)) +
|
|
263
|
+
var(--go-inline-inverted) * var(--go-rev-inline)
|
|
264
|
+
);
|
|
265
|
+
--go-block: calc(
|
|
266
|
+
var(--go-block-direct) * (1 - var(--go-rev-block)) +
|
|
267
|
+
var(--go-block-inverted) * var(--go-rev-block)
|
|
268
|
+
);
|
|
269
|
+
|
|
270
|
+
result: calc(
|
|
271
|
+
var(--go-inline) * var(--go-axis-inline) +
|
|
272
|
+
var(--go-block) * var(--go-axis-block)
|
|
273
|
+
);
|
|
274
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Filename: _orientbox.scss
|
|
3
|
+
* FullPath: modules/projects/fl.ui/src/styles/ui/_orientbox.scss
|
|
4
|
+
* Reason for changes: Restore Veela viewport import (typo viewrt→interact/viewport) and fix stray brace after merge mess.
|
|
5
|
+
*/
|
|
6
|
+
@use "../lib/core/interact/viewport" as *;
|
|
7
|
+
|
|
8
|
+
//
|
|
9
|
+
@layer ux-orientbox {
|
|
10
|
+
|
|
11
|
+
//
|
|
12
|
+
.ui-orientbox {
|
|
13
|
+
@include init-cs-size;
|
|
14
|
+
@include compute_os_conditions;
|
|
15
|
+
@include compute_cs_size_to_os;
|
|
16
|
+
@include compute_from_os_to_cs;
|
|
17
|
+
|
|
18
|
+
//
|
|
19
|
+
& {
|
|
20
|
+
--cs-size-x: 100cqi;
|
|
21
|
+
--cs-size-y: 100cqb;
|
|
22
|
+
|
|
23
|
+
//
|
|
24
|
+
position: relative;
|
|
25
|
+
container-type: size !important;
|
|
26
|
+
contain: strict !important;
|
|
27
|
+
background-color: transparent;
|
|
28
|
+
inset: 0px;
|
|
29
|
+
|
|
30
|
+
//
|
|
31
|
+
grid-column: 1 / -1;
|
|
32
|
+
grid-row: 1 / -1;
|
|
33
|
+
place-self: start;
|
|
34
|
+
|
|
35
|
+
//
|
|
36
|
+
min-inline-size: 0px;
|
|
37
|
+
min-block-size: 0px;
|
|
38
|
+
inline-size: stretch;
|
|
39
|
+
block-size: stretch;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
|
|
42
|
+
//
|
|
43
|
+
zoom: max(var(--zoom, 1), 0.125);
|
|
44
|
+
font-size: 16px;
|
|
45
|
+
|
|
46
|
+
//
|
|
47
|
+
writing-mode: horizontal-tb !important;
|
|
48
|
+
direction: ltr !important;
|
|
49
|
+
|
|
50
|
+
//
|
|
51
|
+
// Cap by dynamic viewport and by JS visual viewport (--vv-* from fest/dom updateVP) for mobile browser chrome / keyboard.
|
|
52
|
+
max-inline-size: min(100%, min(100cqi, 100dvi), var(--vv-width, 100dvi)) !important;
|
|
53
|
+
max-block-size: min(100%, min(100cqb, 100dvb), var(--vv-height, 100dvb)) !important;
|
|
54
|
+
|
|
55
|
+
//
|
|
56
|
+
/*outline-color: oklch(from var(--on-surface-color) l c h / 0.1);
|
|
57
|
+
outline-width: 1px;
|
|
58
|
+
outline-style: solid;
|
|
59
|
+
outline-offset: -1px;*/
|
|
60
|
+
|
|
61
|
+
//
|
|
62
|
+
border-radius: var(--radius-lg);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//
|
|
66
|
+
& {
|
|
67
|
+
//
|
|
68
|
+
--zoom: max(var(--scaling, 1), 0.125);
|
|
69
|
+
--zpx: calc(1px / max(var(--zoom, 1), 0.125));
|
|
70
|
+
--ppx: calc(1px / max(var(--pixel-ratio, 1), 0.125));
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
//
|
|
74
|
+
& > :where(*),
|
|
75
|
+
& :where(ui-frame, .u2-grid-item, ui-modal, [is="ui-orientbox"], [is="ui-gridbox"], [is="ui-orientbox"] > :where(*), [is="ui-gridbox"] > :where(*), .ui-gridlayout, .ui-gridlayout > :where(*))
|
|
76
|
+
{
|
|
77
|
+
@include compute_os_conditions;
|
|
78
|
+
@include compute_cs_size_to_os;
|
|
79
|
+
@include compute_from_os_to_cs;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
//
|
|
83
|
+
.center-self {
|
|
84
|
+
@include use-inset;
|
|
85
|
+
@include centered-with-offset();
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
//
|
|
89
|
+
.fixed { @include use-inset; position: fixed !important; }
|
|
90
|
+
.absolute { @include use-inset; position: absolute !important; }
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//
|
|
94
|
+
.native-portrait-optimized {
|
|
95
|
+
@include oriented(--in-swap-cond, 0, 1);
|
|
96
|
+
}
|
|
97
|
+
}
|