@scattered-light/loomiere-base-ui 0.0.0-stage → 0.1.0
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/README.md +26 -2
- package/dist/index.d.ts +107 -0
- package/dist/index.js +315 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/components/Accordion.css +120 -0
- package/dist/styles/components/AlertDialog.css +8 -0
- package/dist/styles/components/Autocomplete.css +201 -0
- package/dist/styles/components/Avatar.css +134 -0
- package/dist/styles/components/Button.css +129 -0
- package/dist/styles/components/Checkbox.css +156 -0
- package/dist/styles/components/CheckboxGroup.css +15 -0
- package/dist/styles/components/Collapsible.css +115 -0
- package/dist/styles/components/Combobox.css +484 -0
- package/dist/styles/components/ContextMenu.css +168 -0
- package/dist/styles/components/Dialog.css +145 -0
- package/dist/styles/components/Drawer.css +126 -0
- package/dist/styles/components/Field.css +60 -0
- package/dist/styles/components/Fieldset.css +41 -0
- package/dist/styles/components/Form.css +19 -0
- package/dist/styles/components/Input.css +136 -0
- package/dist/styles/components/Menu.css +148 -0
- package/dist/styles/components/Menubar.css +192 -0
- package/dist/styles/components/Meter.css +59 -0
- package/dist/styles/components/NavigationMenu.css +419 -0
- package/dist/styles/components/NumberField.css +90 -0
- package/dist/styles/components/OTPField.css +62 -0
- package/dist/styles/components/Popover.css +161 -0
- package/dist/styles/components/PreviewCard.css +116 -0
- package/dist/styles/components/Progress.css +76 -0
- package/dist/styles/components/Radio.css +151 -0
- package/dist/styles/components/ScrollArea.css +81 -0
- package/dist/styles/components/Select.css +273 -0
- package/dist/styles/components/Separator.css +27 -0
- package/dist/styles/components/Slider.css +165 -0
- package/dist/styles/components/Switch.css +165 -0
- package/dist/styles/components/Tabs.css +135 -0
- package/dist/styles/components/Toast.css +235 -0
- package/dist/styles/components/Toggle.css +109 -0
- package/dist/styles/components/ToggleGroup.css +20 -0
- package/dist/styles/components/Toolbar.css +61 -0
- package/dist/styles/components/Tooltip.css +59 -0
- package/dist/styles/index.css +52 -0
- package/dist/styles/reset/accessibility.css +65 -0
- package/dist/styles/reset/reset-accessibility.css +110 -0
- package/dist/styles/reset/reset.css +442 -0
- package/package.json +50 -4
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Navigation Menu - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* The strip is the bar concept, the panel is the popup concept and each link is an item
|
|
5
|
+
* row with a title and description. Only the panel sizes are its own
|
|
6
|
+
* (tokens/component/navigation-menu.json). The panel slides between triggers on the
|
|
7
|
+
* slow duration with the out easing.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* ============================================
|
|
11
|
+
ROOT AND LIST
|
|
12
|
+
============================================ */
|
|
13
|
+
|
|
14
|
+
.NavigationMenuRoot {
|
|
15
|
+
box-sizing: border-box;
|
|
16
|
+
padding: var(--sl-bar-padding);
|
|
17
|
+
background: var(--sl-bar-background);
|
|
18
|
+
border: var(--sl-bar-border-width) solid var(--sl-bar-border-color);
|
|
19
|
+
border-radius: var(--sl-bar-radius);
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--sl-bar-gap);
|
|
23
|
+
min-width: max-content;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.NavigationMenuList {
|
|
27
|
+
display: flex;
|
|
28
|
+
position: relative;
|
|
29
|
+
align-items: center;
|
|
30
|
+
gap: var(--sl-bar-gap);
|
|
31
|
+
list-style: none;
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.NavigationMenuList > li {
|
|
37
|
+
margin: 0;
|
|
38
|
+
padding: 0;
|
|
39
|
+
list-style: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/* ============================================
|
|
43
|
+
TRIGGER: a control-height button on the strip
|
|
44
|
+
============================================ */
|
|
45
|
+
|
|
46
|
+
.NavigationMenuTrigger {
|
|
47
|
+
font-family: var(--sl-font-base-trigger-font-family);
|
|
48
|
+
font-size: var(--sl-font-base-trigger-font-size);
|
|
49
|
+
font-weight: var(--sl-font-base-trigger-font-weight);
|
|
50
|
+
line-height: var(--sl-font-base-trigger-line-height);
|
|
51
|
+
letter-spacing: var(--sl-font-base-trigger-letter-spacing);
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
gap: var(--sl-gap-control);
|
|
57
|
+
height: var(--sl-control-height-md);
|
|
58
|
+
padding-inline: var(--sl-control-padding-inline);
|
|
59
|
+
margin: 0;
|
|
60
|
+
outline: 0;
|
|
61
|
+
border: none;
|
|
62
|
+
border-radius: var(--sl-radius-item);
|
|
63
|
+
color: var(--sl-text-primary);
|
|
64
|
+
background: transparent;
|
|
65
|
+
cursor: pointer;
|
|
66
|
+
user-select: none;
|
|
67
|
+
text-decoration: none;
|
|
68
|
+
transition: var(--sl-transition-button);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (hover: hover) {
|
|
72
|
+
.NavigationMenuTrigger:hover {
|
|
73
|
+
background: var(--sl-fill-subtle);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.NavigationMenuTrigger[data-popup-open] {
|
|
78
|
+
background: var(--sl-item-background-hover);
|
|
79
|
+
color: var(--sl-item-color-hover);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.NavigationMenuTrigger:focus-visible {
|
|
83
|
+
position: relative;
|
|
84
|
+
outline: var(--sl-focus-outline);
|
|
85
|
+
outline-offset: var(--sl-focus-outline-offset-inset);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Chevron: the same size and turn as a select's. */
|
|
89
|
+
.NavigationMenuIcon {
|
|
90
|
+
display: inline-flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
flex-shrink: 0;
|
|
94
|
+
line-height: 1;
|
|
95
|
+
width: var(--sl-icon-size-base);
|
|
96
|
+
height: var(--sl-icon-size-base);
|
|
97
|
+
transition: transform var(--sl-duration-normal) var(--sl-easing-default);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.NavigationMenuIcon[data-popup-open] {
|
|
101
|
+
transform: rotate(180deg);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* ============================================
|
|
105
|
+
POSITIONER
|
|
106
|
+
============================================ */
|
|
107
|
+
|
|
108
|
+
.NavigationMenuPositioner {
|
|
109
|
+
--easing: var(--sl-easing-out);
|
|
110
|
+
--duration: var(--sl-duration-slow);
|
|
111
|
+
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
z-index: var(--sl-popup-z-index);
|
|
114
|
+
transition-property: top, left, right, bottom;
|
|
115
|
+
transition-duration: var(--duration);
|
|
116
|
+
transition-timing-function: var(--easing);
|
|
117
|
+
width: var(--positioner-width);
|
|
118
|
+
height: var(--positioner-height);
|
|
119
|
+
max-width: var(--available-width);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* A safe zone between trigger and panel, so moving the pointer across the gap keeps it open. */
|
|
123
|
+
.NavigationMenuPositioner::before {
|
|
124
|
+
content: '';
|
|
125
|
+
position: absolute;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.NavigationMenuPositioner[data-side='top']::before {
|
|
129
|
+
left: 0;
|
|
130
|
+
right: 0;
|
|
131
|
+
bottom: calc(-1 * var(--sl-space-2-5));
|
|
132
|
+
height: var(--sl-space-2-5);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.NavigationMenuPositioner[data-side='bottom']::before {
|
|
136
|
+
left: 0;
|
|
137
|
+
right: 0;
|
|
138
|
+
top: calc(-1 * var(--sl-space-2-5));
|
|
139
|
+
height: var(--sl-space-2-5);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.NavigationMenuPositioner[data-side='left']::before {
|
|
143
|
+
top: 0;
|
|
144
|
+
bottom: 0;
|
|
145
|
+
right: calc(-1 * var(--sl-space-2-5));
|
|
146
|
+
width: var(--sl-space-2-5);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.NavigationMenuPositioner[data-side='right']::before {
|
|
150
|
+
top: 0;
|
|
151
|
+
bottom: 0;
|
|
152
|
+
left: calc(-1 * var(--sl-space-2-5));
|
|
153
|
+
width: var(--sl-space-2-5);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.NavigationMenuPositioner[data-instant] {
|
|
157
|
+
transition: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* ============================================
|
|
161
|
+
POPUP: the popup surface. Its edge is an outline so it doesn't change the size
|
|
162
|
+
Base UI measures.
|
|
163
|
+
============================================ */
|
|
164
|
+
|
|
165
|
+
.NavigationMenuPopup {
|
|
166
|
+
position: relative;
|
|
167
|
+
box-sizing: border-box;
|
|
168
|
+
background: var(--sl-popup-background);
|
|
169
|
+
border-radius: var(--sl-popup-radius);
|
|
170
|
+
outline: var(--sl-popup-border-width) solid var(--sl-popup-border-color);
|
|
171
|
+
outline-offset: calc(-1 * var(--sl-popup-border-width));
|
|
172
|
+
box-shadow: var(--sl-popup-shadow);
|
|
173
|
+
color: var(--sl-text-primary);
|
|
174
|
+
transform-origin: var(--transform-origin);
|
|
175
|
+
transition-property: opacity, transform, width, height;
|
|
176
|
+
transition-duration: var(--duration);
|
|
177
|
+
transition-timing-function: var(--easing);
|
|
178
|
+
width: var(--popup-width);
|
|
179
|
+
height: var(--popup-height);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.NavigationMenuPopup[data-starting-style],
|
|
183
|
+
.NavigationMenuPopup[data-ending-style] {
|
|
184
|
+
opacity: 0;
|
|
185
|
+
transform: scale(var(--sl-popup-scale-closed));
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.NavigationMenuPopup[data-ending-style] {
|
|
189
|
+
transition-timing-function: var(--sl-easing-default);
|
|
190
|
+
transition-duration: var(--sl-duration-fast);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* ============================================
|
|
194
|
+
VIEWPORT (content container)
|
|
195
|
+
============================================ */
|
|
196
|
+
|
|
197
|
+
.NavigationMenuViewport {
|
|
198
|
+
position: relative;
|
|
199
|
+
overflow: hidden;
|
|
200
|
+
width: 100%;
|
|
201
|
+
height: 100%;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* ============================================
|
|
205
|
+
CONTENT
|
|
206
|
+
============================================ */
|
|
207
|
+
|
|
208
|
+
.NavigationMenuContent {
|
|
209
|
+
box-sizing: border-box;
|
|
210
|
+
transition:
|
|
211
|
+
opacity calc(var(--duration) * 0.5) ease,
|
|
212
|
+
transform var(--duration) var(--easing);
|
|
213
|
+
padding: var(--sl-popup-padding-panel);
|
|
214
|
+
width: calc(100vw - 2 * var(--sl-space-5));
|
|
215
|
+
height: 100%;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@media (min-width: 500px) {
|
|
219
|
+
.NavigationMenuContent {
|
|
220
|
+
width: max-content;
|
|
221
|
+
min-width: var(--sl-navigation-menu-popup-min-width);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.NavigationMenuContent[data-starting-style],
|
|
226
|
+
.NavigationMenuContent[data-ending-style] {
|
|
227
|
+
opacity: 0;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.NavigationMenuContent[data-starting-style][data-activation-direction='left'] {
|
|
231
|
+
transform: translateX(-50%);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.NavigationMenuContent[data-starting-style][data-activation-direction='right'] {
|
|
235
|
+
transform: translateX(50%);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.NavigationMenuContent[data-ending-style][data-activation-direction='left'] {
|
|
239
|
+
transform: translateX(50%);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.NavigationMenuContent[data-ending-style][data-activation-direction='right'] {
|
|
243
|
+
transform: translateX(-50%);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* ============================================
|
|
247
|
+
LINK LIST
|
|
248
|
+
============================================ */
|
|
249
|
+
|
|
250
|
+
.NavigationMenuLinkList {
|
|
251
|
+
display: grid;
|
|
252
|
+
gap: var(--sl-space-2);
|
|
253
|
+
list-style: none;
|
|
254
|
+
margin: 0;
|
|
255
|
+
padding: 0;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.NavigationMenuLinkList > li {
|
|
259
|
+
margin: 0;
|
|
260
|
+
padding: 0;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.NavigationMenuLinkList[data-columns='1'] {
|
|
264
|
+
grid-template-columns: 1fr;
|
|
265
|
+
max-width: var(--sl-navigation-menu-popup-min-width);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.NavigationMenuLinkList[data-columns='2'] {
|
|
269
|
+
grid-template-columns: repeat(2, var(--sl-navigation-menu-column-width));
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
@media (max-width: 500px) {
|
|
273
|
+
.NavigationMenuLinkList[data-columns='2'] {
|
|
274
|
+
grid-template-columns: 1fr;
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.NavigationMenuLinkList[data-columns='3'] {
|
|
279
|
+
grid-template-columns: repeat(3, 1fr);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* ============================================
|
|
283
|
+
SECTIONS CONTAINER
|
|
284
|
+
============================================ */
|
|
285
|
+
|
|
286
|
+
.NavigationMenuSections {
|
|
287
|
+
display: grid;
|
|
288
|
+
gap: var(--sl-space-2);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.NavigationMenuSections[data-columns='2'] {
|
|
292
|
+
grid-template-columns: repeat(2, 1fr);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
.NavigationMenuSections[data-columns='3'] {
|
|
296
|
+
grid-template-columns: repeat(3, 1fr);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/* ============================================
|
|
300
|
+
LINK: an item row with a title over a description
|
|
301
|
+
============================================ */
|
|
302
|
+
|
|
303
|
+
.NavigationMenuLink {
|
|
304
|
+
box-sizing: border-box;
|
|
305
|
+
display: flex;
|
|
306
|
+
flex-direction: column;
|
|
307
|
+
gap: var(--sl-space-1);
|
|
308
|
+
padding: var(--sl-space-2);
|
|
309
|
+
border-radius: var(--sl-radius-item);
|
|
310
|
+
border: none;
|
|
311
|
+
background-color: transparent;
|
|
312
|
+
color: inherit;
|
|
313
|
+
text-decoration: none;
|
|
314
|
+
transition: var(--sl-transition-button);
|
|
315
|
+
outline: none;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@media (hover: hover) {
|
|
319
|
+
.NavigationMenuLink:hover {
|
|
320
|
+
background: var(--sl-fill-subtle);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.NavigationMenuLink:focus-visible {
|
|
325
|
+
position: relative;
|
|
326
|
+
outline: var(--sl-focus-outline);
|
|
327
|
+
outline-offset: var(--sl-focus-outline-offset-inset);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.NavigationMenuLinkTitle {
|
|
331
|
+
font-family: var(--sl-font-base-trigger-font-family);
|
|
332
|
+
font-size: var(--sl-font-base-trigger-font-size);
|
|
333
|
+
font-weight: var(--sl-font-base-trigger-font-weight);
|
|
334
|
+
line-height: var(--sl-font-base-trigger-line-height);
|
|
335
|
+
letter-spacing: var(--sl-font-base-trigger-letter-spacing);
|
|
336
|
+
margin: 0 0 var(--sl-space-1) 0;
|
|
337
|
+
color: var(--sl-text-primary);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.NavigationMenuLinkDescription {
|
|
341
|
+
font-family: var(--sl-font-condense-font-family);
|
|
342
|
+
font-size: var(--sl-font-condense-font-size);
|
|
343
|
+
font-weight: var(--sl-font-condense-font-weight);
|
|
344
|
+
line-height: var(--sl-font-condense-line-height);
|
|
345
|
+
letter-spacing: var(--sl-font-condense-letter-spacing);
|
|
346
|
+
margin: 0;
|
|
347
|
+
color: var(--sl-text-secondary);
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
/* ============================================
|
|
351
|
+
SECTION
|
|
352
|
+
============================================ */
|
|
353
|
+
|
|
354
|
+
.NavigationMenuSection {
|
|
355
|
+
display: flex;
|
|
356
|
+
flex-direction: column;
|
|
357
|
+
gap: var(--sl-space-2);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.NavigationMenuSectionHeading {
|
|
361
|
+
font-family: var(--sl-font-condense-subtitle-label-font-family);
|
|
362
|
+
font-size: var(--sl-font-condense-subtitle-label-font-size);
|
|
363
|
+
font-weight: var(--sl-font-condense-subtitle-label-font-weight);
|
|
364
|
+
line-height: var(--sl-font-condense-subtitle-label-line-height);
|
|
365
|
+
letter-spacing: var(--sl-font-condense-subtitle-label-letter-spacing);
|
|
366
|
+
text-transform: var(--sl-font-condense-subtitle-label-text-transform);
|
|
367
|
+
margin: 0 0 var(--sl-space-2) 0;
|
|
368
|
+
color: var(--sl-text-secondary);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/* ============================================
|
|
372
|
+
ARROW: part of the popup, in its fill and edge
|
|
373
|
+
============================================ */
|
|
374
|
+
|
|
375
|
+
.NavigationMenuArrow {
|
|
376
|
+
display: flex;
|
|
377
|
+
transition: left var(--duration) var(--easing);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
.NavigationMenuArrow[data-side='top'] {
|
|
381
|
+
bottom: -8px;
|
|
382
|
+
rotate: 180deg;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
.NavigationMenuArrow[data-side='bottom'] {
|
|
386
|
+
top: -8px;
|
|
387
|
+
rotate: 0deg;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.NavigationMenuArrow[data-side='left'] {
|
|
391
|
+
right: -13px;
|
|
392
|
+
rotate: 90deg;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.NavigationMenuArrow[data-side='right'] {
|
|
396
|
+
left: -13px;
|
|
397
|
+
rotate: -90deg;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.NavigationMenuArrowFill {
|
|
401
|
+
fill: var(--sl-popup-arrow-fill);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.NavigationMenuArrowOuterStroke,
|
|
405
|
+
.NavigationMenuArrowInnerStroke {
|
|
406
|
+
fill: var(--sl-popup-arrow-stroke);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/* ============================================
|
|
410
|
+
SEPARATOR
|
|
411
|
+
============================================ */
|
|
412
|
+
|
|
413
|
+
.NavigationMenuSeparator {
|
|
414
|
+
height: var(--sl-stroke-default);
|
|
415
|
+
margin-block: var(--sl-popup-separator-spacing);
|
|
416
|
+
border: none;
|
|
417
|
+
background: var(--sl-popup-separator-color);
|
|
418
|
+
width: 100%;
|
|
419
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Number Field - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens. The input is Input (Input.css) and the label, description and
|
|
5
|
+
* error are Field's parts (Field.css). Only the stepper buttons are drawn here: two
|
|
6
|
+
* stacked halves of the field's height, as wide as the smallest control.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.NumberFieldRoot {
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: var(--sl-field-gap);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.NumberFieldGroup {
|
|
16
|
+
position: relative;
|
|
17
|
+
display: flex;
|
|
18
|
+
width: 100%;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Room for the steppers at the end of the input */
|
|
22
|
+
.NumberFieldInput {
|
|
23
|
+
padding-inline-end: calc(var(--sl-control-padding-inline) + var(--sl-control-height-xs));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* ============================================
|
|
27
|
+
INCREMENT/DECREMENT BUTTONS
|
|
28
|
+
============================================ */
|
|
29
|
+
|
|
30
|
+
.NumberFieldIncrement,
|
|
31
|
+
.NumberFieldDecrement {
|
|
32
|
+
display: inline-flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
line-height: 1;
|
|
37
|
+
position: absolute;
|
|
38
|
+
right: calc(var(--sl-field-border-width) + var(--sl-space-0-5));
|
|
39
|
+
width: var(--sl-control-height-xs);
|
|
40
|
+
height: calc(50% - var(--sl-field-border-width) - var(--sl-space-0-5));
|
|
41
|
+
padding: 0;
|
|
42
|
+
border: none;
|
|
43
|
+
border-radius: var(--sl-radius-item);
|
|
44
|
+
background: transparent;
|
|
45
|
+
color: var(--sl-text-secondary);
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
outline: none;
|
|
48
|
+
transition: var(--sl-transition-button);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.NumberFieldIncrement {
|
|
52
|
+
top: calc(var(--sl-field-border-width) + var(--sl-space-0-5));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.NumberFieldDecrement {
|
|
56
|
+
bottom: calc(var(--sl-field-border-width) + var(--sl-space-0-5));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.NumberFieldIncrement:hover:not(:disabled),
|
|
60
|
+
.NumberFieldDecrement:hover:not(:disabled) {
|
|
61
|
+
background: var(--sl-fill-subtle);
|
|
62
|
+
color: var(--sl-text-primary);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.NumberFieldIncrement:active:not(:disabled),
|
|
66
|
+
.NumberFieldDecrement:active:not(:disabled) {
|
|
67
|
+
background: var(--sl-fill-default);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.NumberFieldIncrement:focus-visible,
|
|
71
|
+
.NumberFieldDecrement:focus-visible {
|
|
72
|
+
outline: var(--sl-focus-outline);
|
|
73
|
+
outline-offset: var(--sl-focus-outline-offset-inset);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.NumberFieldIncrement:disabled,
|
|
77
|
+
.NumberFieldDecrement:disabled {
|
|
78
|
+
opacity: var(--sl-field-opacity-disabled);
|
|
79
|
+
cursor: not-allowed;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* ============================================
|
|
83
|
+
SCRUB AREA
|
|
84
|
+
============================================ */
|
|
85
|
+
|
|
86
|
+
.NumberFieldScrubArea,
|
|
87
|
+
.NumberFieldScrubArea[data-scrubbing] {
|
|
88
|
+
cursor: ns-resize;
|
|
89
|
+
user-select: none;
|
|
90
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* OTP Field - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* One-time code entry: a row of single-character inputs. Each slot is the same control as Input
|
|
5
|
+
* (Input.css styles .OTPFieldInput with the field pattern, hover, focus, disabled and error), cut
|
|
6
|
+
* into a square as tall as a control of the same size. data-size on the root picks the control
|
|
7
|
+
* size and the text tier of the same name, as on Input. No component tokens.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.OTPFieldRoot {
|
|
11
|
+
--otp-size: var(--sl-control-height-md);
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--sl-space-2);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.OTPFieldInput {
|
|
18
|
+
width: var(--otp-size);
|
|
19
|
+
height: var(--otp-size);
|
|
20
|
+
margin: 0;
|
|
21
|
+
padding: 0;
|
|
22
|
+
text-align: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* A short dash between groups, in the control border color so it reads at 3:1 */
|
|
26
|
+
.OTPFieldSeparator {
|
|
27
|
+
flex-shrink: 0;
|
|
28
|
+
width: var(--sl-space-3);
|
|
29
|
+
height: var(--sl-stroke-medium);
|
|
30
|
+
border-radius: var(--sl-radius-pill);
|
|
31
|
+
background: var(--sl-border-control);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* ============================================
|
|
35
|
+
SIZE VARIANTS: control size plus the text tier of the same name
|
|
36
|
+
============================================ */
|
|
37
|
+
|
|
38
|
+
.OTPFieldRoot[data-size='sm'] {
|
|
39
|
+
--otp-size: var(--sl-control-height-sm);
|
|
40
|
+
gap: var(--sl-space-1-5);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.OTPFieldRoot[data-size='sm'] .OTPFieldInput {
|
|
44
|
+
font-family: var(--sl-font-condense-font-family);
|
|
45
|
+
font-size: var(--sl-font-condense-font-size);
|
|
46
|
+
font-weight: var(--sl-font-condense-font-weight);
|
|
47
|
+
line-height: var(--sl-font-condense-line-height);
|
|
48
|
+
letter-spacing: var(--sl-font-condense-letter-spacing);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.OTPFieldRoot[data-size='lg'] {
|
|
52
|
+
--otp-size: var(--sl-control-height-lg);
|
|
53
|
+
gap: var(--sl-space-3);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.OTPFieldRoot[data-size='lg'] .OTPFieldInput {
|
|
57
|
+
font-family: var(--sl-font-magnify-font-family);
|
|
58
|
+
font-size: var(--sl-font-magnify-font-size);
|
|
59
|
+
font-weight: var(--sl-font-magnify-font-weight);
|
|
60
|
+
line-height: var(--sl-font-magnify-line-height);
|
|
61
|
+
letter-spacing: var(--sl-font-magnify-letter-spacing);
|
|
62
|
+
}
|