@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,135 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Tabs - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens. The divider, the selected line and color, hover and the disabled
|
|
5
|
+
* fade are the disclosure concept (tokens/semantic/disclosure.json). Tabs use the text
|
|
6
|
+
* style of their tier and switch to that tier's selected style when chosen, like a
|
|
7
|
+
* selected row in a list.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.TabsRoot {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.TabsRoot[data-orientation='vertical'] {
|
|
16
|
+
flex-direction: row;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Tab list: a divider along the edge the tabs sit on. */
|
|
20
|
+
.TabsList {
|
|
21
|
+
display: flex;
|
|
22
|
+
border-bottom: var(--sl-stroke-default) solid var(--sl-disclosure-divider-color);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.TabsRoot[data-orientation='vertical'] .TabsList {
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
border-bottom: none;
|
|
28
|
+
border-right: var(--sl-stroke-default) solid var(--sl-disclosure-divider-color);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Tab: a transparent line under it that turns accent when selected. */
|
|
32
|
+
.TabsTab {
|
|
33
|
+
all: unset;
|
|
34
|
+
font-family: var(--sl-font-base-font-family);
|
|
35
|
+
font-size: var(--sl-font-base-font-size);
|
|
36
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
37
|
+
line-height: var(--sl-font-base-line-height);
|
|
38
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
padding: var(--sl-space-2) var(--sl-space-4);
|
|
44
|
+
color: var(--sl-text-secondary);
|
|
45
|
+
border-bottom: var(--sl-disclosure-indicator-width) solid transparent;
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
cursor: pointer;
|
|
48
|
+
transition: var(--sl-transition-button);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.TabsTab:hover:not([data-disabled]) {
|
|
52
|
+
color: var(--sl-text-primary);
|
|
53
|
+
background: var(--sl-disclosure-trigger-background-hover);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.TabsTab[data-active] {
|
|
57
|
+
font-family: var(--sl-font-base-selected-font-family);
|
|
58
|
+
font-size: var(--sl-font-base-selected-font-size);
|
|
59
|
+
font-weight: var(--sl-font-base-selected-font-weight);
|
|
60
|
+
line-height: var(--sl-font-base-selected-line-height);
|
|
61
|
+
letter-spacing: var(--sl-font-base-selected-letter-spacing);
|
|
62
|
+
color: var(--sl-disclosure-selected-color);
|
|
63
|
+
border-bottom-color: var(--sl-disclosure-indicator-color);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.TabsTab:focus-visible {
|
|
67
|
+
outline: var(--sl-focus-outline);
|
|
68
|
+
outline-offset: var(--sl-focus-outline-offset-inset);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.TabsTab[data-disabled] {
|
|
72
|
+
color: var(--sl-text-disabled);
|
|
73
|
+
opacity: var(--sl-disclosure-opacity-disabled);
|
|
74
|
+
cursor: not-allowed;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.TabsRoot[data-orientation='vertical'] .TabsTab {
|
|
78
|
+
border-bottom: none;
|
|
79
|
+
border-right: var(--sl-disclosure-indicator-width) solid transparent;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.TabsRoot[data-orientation='vertical'] .TabsTab[data-active] {
|
|
83
|
+
border-right-color: var(--sl-disclosure-indicator-color);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* Panel */
|
|
87
|
+
.TabsPanel {
|
|
88
|
+
font-family: var(--sl-font-base-font-family);
|
|
89
|
+
font-size: var(--sl-font-base-font-size);
|
|
90
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
91
|
+
line-height: var(--sl-font-base-line-height);
|
|
92
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
93
|
+
padding: var(--sl-space-4);
|
|
94
|
+
color: var(--sl-text-primary);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.TabsPanel:focus-visible {
|
|
98
|
+
outline: var(--sl-focus-outline);
|
|
99
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/* Sizes: the minimize tier for small tabs, more room for large ones. */
|
|
103
|
+
.TabsRoot[data-size='sm'] .TabsTab {
|
|
104
|
+
font-family: var(--sl-font-minimize-font-family);
|
|
105
|
+
font-size: var(--sl-font-minimize-font-size);
|
|
106
|
+
font-weight: var(--sl-font-minimize-font-weight);
|
|
107
|
+
line-height: var(--sl-font-minimize-line-height);
|
|
108
|
+
letter-spacing: var(--sl-font-minimize-letter-spacing);
|
|
109
|
+
padding: var(--sl-space-1-5) var(--sl-space-3);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.TabsRoot[data-size='sm'] .TabsTab[data-active] {
|
|
113
|
+
font-family: var(--sl-font-minimize-selected-font-family);
|
|
114
|
+
font-size: var(--sl-font-minimize-selected-font-size);
|
|
115
|
+
font-weight: var(--sl-font-minimize-selected-font-weight);
|
|
116
|
+
line-height: var(--sl-font-minimize-selected-line-height);
|
|
117
|
+
letter-spacing: var(--sl-font-minimize-selected-letter-spacing);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.TabsRoot[data-size='sm'] .TabsPanel {
|
|
121
|
+
font-family: var(--sl-font-minimize-font-family);
|
|
122
|
+
font-size: var(--sl-font-minimize-font-size);
|
|
123
|
+
font-weight: var(--sl-font-minimize-font-weight);
|
|
124
|
+
line-height: var(--sl-font-minimize-line-height);
|
|
125
|
+
letter-spacing: var(--sl-font-minimize-letter-spacing);
|
|
126
|
+
padding: var(--sl-space-3);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.TabsRoot[data-size='lg'] .TabsTab {
|
|
130
|
+
padding: var(--sl-space-3) var(--sl-space-6);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.TabsRoot[data-size='lg'] .TabsPanel {
|
|
134
|
+
padding: var(--sl-space-6);
|
|
135
|
+
}
|
|
@@ -0,0 +1,235 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Toast - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* A toast is a notice (tokens/semantic/notice.json) on the popup surface. A toast whose type
|
|
5
|
+
* is success, warning, error or info takes that palette (the build points the scope at it);
|
|
6
|
+
* data-color picks any other palette. Toast tokens hold only the stack's place and width.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/* ============================================
|
|
10
|
+
VIEWPORT
|
|
11
|
+
============================================ */
|
|
12
|
+
|
|
13
|
+
.Viewport {
|
|
14
|
+
position: fixed;
|
|
15
|
+
z-index: var(--sl-notice-z-index);
|
|
16
|
+
width: var(--sl-toast-viewport-width);
|
|
17
|
+
margin: 0 auto;
|
|
18
|
+
bottom: var(--sl-toast-viewport-margin);
|
|
19
|
+
right: var(--sl-toast-viewport-margin);
|
|
20
|
+
left: auto;
|
|
21
|
+
top: auto;
|
|
22
|
+
outline: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media (min-width: 500px) {
|
|
26
|
+
.Viewport {
|
|
27
|
+
bottom: var(--sl-toast-viewport-margin-md);
|
|
28
|
+
right: var(--sl-toast-viewport-margin-md);
|
|
29
|
+
width: var(--sl-toast-viewport-width-md);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* ============================================
|
|
34
|
+
TOAST ROOT
|
|
35
|
+
============================================ */
|
|
36
|
+
|
|
37
|
+
.Toast {
|
|
38
|
+
/* Stacking: each toast behind the front one shrinks and peeks out above it */
|
|
39
|
+
--gap: var(--sl-notice-gap);
|
|
40
|
+
--peek: var(--sl-notice-peek);
|
|
41
|
+
--scale: calc(max(0, 1 - (var(--toast-index) * 0.1)));
|
|
42
|
+
--shrink: calc(1 - var(--scale));
|
|
43
|
+
--height: var(--toast-frontmost-height, var(--toast-height));
|
|
44
|
+
--offset-y: calc(
|
|
45
|
+
var(--toast-offset-y) * -1 + (var(--toast-index) * var(--gap) * -1) +
|
|
46
|
+
var(--toast-swipe-movement-y)
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
box-sizing: border-box;
|
|
50
|
+
background: var(--sl-popup-background);
|
|
51
|
+
border: var(--sl-popup-border-width) solid var(--sl-popup-border-color);
|
|
52
|
+
border-radius: var(--sl-popup-radius);
|
|
53
|
+
box-shadow: var(--sl-popup-shadow);
|
|
54
|
+
outline: none;
|
|
55
|
+
position: absolute;
|
|
56
|
+
right: 0;
|
|
57
|
+
bottom: 0;
|
|
58
|
+
left: auto;
|
|
59
|
+
margin: 0 auto;
|
|
60
|
+
margin-right: 0;
|
|
61
|
+
width: 100%;
|
|
62
|
+
color: var(--sl-text-primary);
|
|
63
|
+
padding: var(--sl-notice-padding);
|
|
64
|
+
background-clip: padding-box;
|
|
65
|
+
transform-origin: bottom center;
|
|
66
|
+
user-select: none;
|
|
67
|
+
cursor: default;
|
|
68
|
+
|
|
69
|
+
z-index: calc(1000 - var(--toast-index));
|
|
70
|
+
height: var(--height);
|
|
71
|
+
|
|
72
|
+
transform: translateX(var(--toast-swipe-movement-x))
|
|
73
|
+
translateY(
|
|
74
|
+
calc(
|
|
75
|
+
var(--toast-swipe-movement-y) - (var(--toast-index) * var(--peek)) -
|
|
76
|
+
(var(--shrink) * var(--height))
|
|
77
|
+
)
|
|
78
|
+
)
|
|
79
|
+
scale(var(--scale));
|
|
80
|
+
|
|
81
|
+
transition:
|
|
82
|
+
transform var(--sl-notice-animation-duration) var(--sl-notice-animation-easing),
|
|
83
|
+
opacity var(--sl-notice-animation-duration),
|
|
84
|
+
height var(--sl-duration-fast);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* A tinted toast: the palette's soft fill, edge and text */
|
|
88
|
+
.Toast:is([data-color], [data-type='success'], [data-type='warning'], [data-type='error'], [data-type='info']) {
|
|
89
|
+
--notice-text: var(--sl-scope-on-soft);
|
|
90
|
+
--notice-close-hover: var(--sl-scope-soft-hover);
|
|
91
|
+
background: var(--sl-scope-soft);
|
|
92
|
+
border-color: var(--sl-scope-border);
|
|
93
|
+
color: var(--notice-text);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Expanded state - when hovering viewport */
|
|
97
|
+
.Toast[data-expanded] {
|
|
98
|
+
transform: translateX(var(--toast-swipe-movement-x))
|
|
99
|
+
translateY(var(--offset-y));
|
|
100
|
+
height: var(--toast-height);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.Toast[data-starting-style],
|
|
104
|
+
.Toast[data-ending-style] {
|
|
105
|
+
transform: translateY(150%);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.Toast[data-ending-style] {
|
|
109
|
+
opacity: 0;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.Toast[data-ending-style][data-swipe-direction='up'] {
|
|
113
|
+
transform: translateY(calc(var(--toast-swipe-movement-y) - 150%));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.Toast[data-ending-style][data-swipe-direction='down'] {
|
|
117
|
+
transform: translateY(calc(var(--toast-swipe-movement-y) + 150%));
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.Toast[data-ending-style][data-swipe-direction='left'] {
|
|
121
|
+
transform: translateX(calc(var(--toast-swipe-movement-x) - 150%))
|
|
122
|
+
translateY(var(--offset-y));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.Toast[data-ending-style][data-swipe-direction='right'] {
|
|
126
|
+
transform: translateX(calc(var(--toast-swipe-movement-x) + 150%))
|
|
127
|
+
translateY(var(--offset-y));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Limited (removed due to exceeding limit) */
|
|
131
|
+
.Toast[data-limited] {
|
|
132
|
+
opacity: 0;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/* Keeps the pointer inside the stack across the gaps between toasts */
|
|
136
|
+
.Toast::after {
|
|
137
|
+
content: '';
|
|
138
|
+
position: absolute;
|
|
139
|
+
top: 100%;
|
|
140
|
+
width: 100%;
|
|
141
|
+
left: 0;
|
|
142
|
+
height: calc(var(--gap) + 1px);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* ============================================
|
|
146
|
+
CONTENT
|
|
147
|
+
============================================ */
|
|
148
|
+
|
|
149
|
+
.Content {
|
|
150
|
+
overflow: hidden;
|
|
151
|
+
transition: opacity var(--sl-notice-animation-duration);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.Content[data-behind] {
|
|
155
|
+
opacity: 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.Content[data-expanded] {
|
|
159
|
+
opacity: 1;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* ============================================
|
|
163
|
+
TITLE AND DESCRIPTION
|
|
164
|
+
============================================ */
|
|
165
|
+
|
|
166
|
+
.Title {
|
|
167
|
+
font-family: var(--sl-font-maximize-md-font-family);
|
|
168
|
+
font-size: var(--sl-font-maximize-md-font-size);
|
|
169
|
+
font-weight: var(--sl-font-maximize-md-font-weight);
|
|
170
|
+
line-height: var(--sl-font-maximize-md-line-height);
|
|
171
|
+
letter-spacing: var(--sl-font-maximize-md-letter-spacing);
|
|
172
|
+
margin: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.Description {
|
|
176
|
+
font-family: var(--sl-font-base-font-family);
|
|
177
|
+
font-size: var(--sl-font-base-font-size);
|
|
178
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
179
|
+
line-height: var(--sl-font-base-line-height);
|
|
180
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
181
|
+
color: var(--notice-text, var(--sl-notice-description-color));
|
|
182
|
+
margin: 0;
|
|
183
|
+
margin-top: var(--sl-notice-text-gap);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/* ============================================
|
|
187
|
+
CLOSE BUTTON
|
|
188
|
+
============================================ */
|
|
189
|
+
|
|
190
|
+
.Close {
|
|
191
|
+
display: flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
justify-content: center;
|
|
194
|
+
flex-shrink: 0;
|
|
195
|
+
width: var(--sl-icon-button-size);
|
|
196
|
+
height: var(--sl-icon-button-size);
|
|
197
|
+
padding: 0;
|
|
198
|
+
border: none;
|
|
199
|
+
border-radius: var(--sl-icon-button-radius);
|
|
200
|
+
background: transparent;
|
|
201
|
+
color: var(--sl-icon-button-color);
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
outline: none;
|
|
204
|
+
transition: var(--sl-icon-button-transition);
|
|
205
|
+
position: absolute;
|
|
206
|
+
top: var(--sl-icon-button-inset);
|
|
207
|
+
right: var(--sl-icon-button-inset);
|
|
208
|
+
color: var(--notice-text, var(--sl-icon-button-color));
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.Close:hover {
|
|
212
|
+
background-color: var(--notice-close-hover, var(--sl-icon-button-background-hover));
|
|
213
|
+
color: var(--notice-text, var(--sl-icon-button-color-hover));
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.Close:focus-visible {
|
|
217
|
+
outline: var(--sl-focus-outline);
|
|
218
|
+
outline-offset: var(--sl-focus-outline-offset-inset);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.Close .Icon {
|
|
222
|
+
width: var(--sl-icon-size-base);
|
|
223
|
+
height: var(--sl-icon-size-base);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* ============================================
|
|
227
|
+
ICON
|
|
228
|
+
============================================ */
|
|
229
|
+
|
|
230
|
+
/* One tier above the description, the same rule as a button icon */
|
|
231
|
+
.Icon {
|
|
232
|
+
width: var(--sl-icon-size-magnify);
|
|
233
|
+
height: var(--sl-icon-size-magnify);
|
|
234
|
+
flex-shrink: 0;
|
|
235
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Toggle - Mojave Theme
|
|
3
|
+
* A toggle is a button that stays pressed: the same heights, padding, gap and
|
|
4
|
+
* trigger text style as a button of the same size.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* ============================================
|
|
8
|
+
ROOT
|
|
9
|
+
============================================ */
|
|
10
|
+
|
|
11
|
+
.Toggle {
|
|
12
|
+
all: unset;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
gap: var(--sl-gap-control);
|
|
18
|
+
height: var(--sl-control-height-md);
|
|
19
|
+
padding-inline: var(--sl-control-padding-inline);
|
|
20
|
+
font-family: var(--sl-font-base-trigger-font-family);
|
|
21
|
+
font-size: var(--sl-font-base-trigger-font-size);
|
|
22
|
+
font-weight: var(--sl-font-base-trigger-font-weight);
|
|
23
|
+
line-height: var(--sl-font-base-trigger-line-height);
|
|
24
|
+
letter-spacing: var(--sl-font-base-trigger-letter-spacing);
|
|
25
|
+
color: var(--sl-text-primary);
|
|
26
|
+
background: var(--sl-surface-base);
|
|
27
|
+
border: var(--sl-stroke-default) solid var(--sl-border-default);
|
|
28
|
+
border-radius: var(--sl-radius-chrome);
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
user-select: none;
|
|
31
|
+
transition: var(--sl-transition-button);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.Toggle:hover:not([data-disabled]):not(:disabled) {
|
|
35
|
+
background: var(--sl-surface-raised);
|
|
36
|
+
border-color: var(--sl-border-strong);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.Toggle[data-pressed],
|
|
40
|
+
.Toggle[aria-pressed='true'] {
|
|
41
|
+
background: var(--sl-interactive-tint-hover);
|
|
42
|
+
color: var(--sl-interactive-default);
|
|
43
|
+
border-color: var(--sl-border-accent);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.Toggle[data-pressed]:hover:not([data-disabled]):not(:disabled),
|
|
47
|
+
.Toggle[aria-pressed='true']:hover:not([data-disabled]):not(:disabled) {
|
|
48
|
+
background: var(--sl-interactive-tint-strong);
|
|
49
|
+
border-color: var(--sl-interactive-hover);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.Toggle:focus-visible {
|
|
53
|
+
outline: var(--sl-focus-outline);
|
|
54
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
55
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.Toggle[data-disabled],
|
|
59
|
+
.Toggle:disabled {
|
|
60
|
+
opacity: var(--sl-toggle-opacity-disabled);
|
|
61
|
+
cursor: not-allowed;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ============================================
|
|
65
|
+
SIZE VARIANTS
|
|
66
|
+
============================================ */
|
|
67
|
+
|
|
68
|
+
.Toggle[data-size='sm'] {
|
|
69
|
+
gap: var(--sl-gap-control-sm);
|
|
70
|
+
height: var(--sl-control-height-sm);
|
|
71
|
+
padding-inline: var(--sl-control-padding-inline-sm);
|
|
72
|
+
font-family: var(--sl-font-condense-trigger-font-family);
|
|
73
|
+
font-size: var(--sl-font-condense-trigger-font-size);
|
|
74
|
+
font-weight: var(--sl-font-condense-trigger-font-weight);
|
|
75
|
+
line-height: var(--sl-font-condense-trigger-line-height);
|
|
76
|
+
letter-spacing: var(--sl-font-condense-trigger-letter-spacing);
|
|
77
|
+
border-radius: var(--sl-radius-item);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.Toggle[data-size='lg'] {
|
|
81
|
+
height: var(--sl-control-height-lg);
|
|
82
|
+
padding-inline: var(--sl-control-padding-inline-lg);
|
|
83
|
+
font-family: var(--sl-font-magnify-trigger-font-family);
|
|
84
|
+
font-size: var(--sl-font-magnify-trigger-font-size);
|
|
85
|
+
font-weight: var(--sl-font-magnify-trigger-font-weight);
|
|
86
|
+
line-height: var(--sl-font-magnify-trigger-line-height);
|
|
87
|
+
letter-spacing: var(--sl-font-magnify-trigger-letter-spacing);
|
|
88
|
+
border-radius: var(--sl-radius-surface);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* ============================================
|
|
92
|
+
ICON (one tier above the text, like a button)
|
|
93
|
+
============================================ */
|
|
94
|
+
|
|
95
|
+
.Toggle svg {
|
|
96
|
+
width: var(--sl-icon-size-magnify);
|
|
97
|
+
height: var(--sl-icon-size-magnify);
|
|
98
|
+
flex-shrink: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.Toggle[data-size='sm'] svg {
|
|
102
|
+
width: var(--sl-icon-size-base);
|
|
103
|
+
height: var(--sl-icon-size-base);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.Toggle[data-size='lg'] svg {
|
|
107
|
+
width: var(--sl-icon-size-maximize);
|
|
108
|
+
height: var(--sl-icon-size-maximize);
|
|
109
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Toggle Group - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens. The strip is the bar concept (tokens/semantic/bar.json); the
|
|
5
|
+
* toggles are Toggle, with item corners so they nest inside the strip's.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.ToggleGroup {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
padding: var(--sl-bar-padding);
|
|
11
|
+
background: var(--sl-bar-background);
|
|
12
|
+
border: var(--sl-bar-border-width) solid var(--sl-bar-border-color);
|
|
13
|
+
border-radius: var(--sl-bar-radius);
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
gap: var(--sl-bar-gap);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ToggleGroup .Toggle {
|
|
19
|
+
border-radius: var(--sl-radius-item);
|
|
20
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Toolbar - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* The strip is the bar concept (tokens/semantic/bar.json). Buttons, toggles, selects
|
|
5
|
+
* and inputs inside it keep their own styles; only the field's width is the toolbar's.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.Toolbar {
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
padding: var(--sl-bar-padding);
|
|
11
|
+
background: var(--sl-bar-background);
|
|
12
|
+
border: var(--sl-bar-border-width) solid var(--sl-bar-border-color);
|
|
13
|
+
border-radius: var(--sl-bar-radius);
|
|
14
|
+
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
gap: var(--sl-bar-group-gap);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ToolbarGroup {
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
gap: var(--sl-bar-gap);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ToolbarSeparator {
|
|
26
|
+
width: var(--sl-bar-border-width);
|
|
27
|
+
height: var(--sl-bar-separator-length);
|
|
28
|
+
margin-inline: var(--sl-bar-separator-spacing);
|
|
29
|
+
background: var(--sl-bar-separator-color);
|
|
30
|
+
border: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/* Link: secondary text that darkens on hover. */
|
|
34
|
+
.ToolbarLink {
|
|
35
|
+
font-family: var(--sl-font-base-font-family);
|
|
36
|
+
font-size: var(--sl-font-base-font-size);
|
|
37
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
38
|
+
line-height: var(--sl-font-base-line-height);
|
|
39
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
40
|
+
display: inline-flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
padding-inline: var(--sl-control-padding-inline-sm);
|
|
43
|
+
color: var(--sl-text-secondary);
|
|
44
|
+
text-decoration: none;
|
|
45
|
+
transition: var(--sl-transition-button);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.ToolbarLink:hover {
|
|
49
|
+
color: var(--sl-text-primary);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.ToolbarLink:focus-visible {
|
|
53
|
+
outline: var(--sl-focus-outline);
|
|
54
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
55
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
56
|
+
border-radius: var(--sl-radius-item);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.Toolbar .ToolbarInput {
|
|
60
|
+
max-width: var(--sl-toolbar-input-max-width);
|
|
61
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Tooltip - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* The inverse surface (surface.inverse, text.on-inverse-surface) with condense text, so a tooltip
|
|
5
|
+
* reads as a label laid over the page. Motion is the popup's; only the width limit is
|
|
6
|
+
* the tooltip's own (tokens/component/tooltip.json).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.TooltipTrigger {
|
|
10
|
+
cursor: help;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.TooltipPositioner {
|
|
14
|
+
z-index: var(--sl-z-index-tooltip);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.TooltipPopup {
|
|
18
|
+
font-family: var(--sl-font-condense-font-family);
|
|
19
|
+
font-size: var(--sl-font-condense-font-size);
|
|
20
|
+
font-weight: var(--sl-font-condense-font-weight);
|
|
21
|
+
line-height: var(--sl-font-condense-line-height);
|
|
22
|
+
letter-spacing: var(--sl-font-condense-letter-spacing);
|
|
23
|
+
transform-origin: var(--transform-origin);
|
|
24
|
+
transition:
|
|
25
|
+
opacity var(--sl-popup-animation-duration) var(--sl-popup-animation-easing),
|
|
26
|
+
transform var(--sl-popup-animation-duration) var(--sl-popup-animation-easing);
|
|
27
|
+
max-width: var(--sl-tooltip-max-width);
|
|
28
|
+
padding: var(--sl-space-1-5) var(--sl-space-2-5);
|
|
29
|
+
border-radius: var(--sl-radius-chrome);
|
|
30
|
+
background: var(--sl-surface-inverse);
|
|
31
|
+
color: var(--sl-text-on-inverse-surface);
|
|
32
|
+
box-shadow: var(--sl-popup-shadow);
|
|
33
|
+
overflow-wrap: break-word;
|
|
34
|
+
user-select: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.TooltipPopup[data-starting-style],
|
|
38
|
+
.TooltipPopup[data-ending-style] {
|
|
39
|
+
opacity: 0;
|
|
40
|
+
transform: scale(var(--sl-popup-scale-closed));
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Arrow: as wide as three spacing steps and half as tall, in the tooltip's fill. */
|
|
44
|
+
.TooltipArrow {
|
|
45
|
+
width: var(--sl-space-3);
|
|
46
|
+
height: calc(var(--sl-space-3) / 2);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.TooltipArrow svg {
|
|
50
|
+
fill: var(--sl-surface-inverse);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* The reset already stops transitions; this only removes the grow. */
|
|
54
|
+
@media (prefers-reduced-motion: reduce) {
|
|
55
|
+
.TooltipPopup[data-starting-style],
|
|
56
|
+
.TooltipPopup[data-ending-style] {
|
|
57
|
+
transform: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Loomiere for Base UI: component styles. Brand-free: every value is a --sl- variable from a
|
|
3
|
+
Loomiere theme. Load the theme first:
|
|
4
|
+
@import '<your theme>/tokens.css';
|
|
5
|
+
@import '<your theme>/utilities.css';
|
|
6
|
+
@import '@scattered-light/loomiere-base-ui/styles.css'; */
|
|
7
|
+
@import '@material-symbols/font-400/outlined.css';
|
|
8
|
+
|
|
9
|
+
/* Document defaults, in the reset layer so any unlayered rule wins over them, and so layered
|
|
10
|
+
frameworks (Chakra's recipes, Tailwind's utilities) are not undone by them. */
|
|
11
|
+
@import './reset/reset.css' layer(reset);
|
|
12
|
+
@import './reset/reset-accessibility.css' layer(reset);
|
|
13
|
+
@import './reset/accessibility.css' layer(reset);
|
|
14
|
+
|
|
15
|
+
/* Component styles */
|
|
16
|
+
@import './components/Accordion.css';
|
|
17
|
+
@import './components/AlertDialog.css';
|
|
18
|
+
@import './components/Autocomplete.css';
|
|
19
|
+
@import './components/Avatar.css';
|
|
20
|
+
@import './components/Button.css';
|
|
21
|
+
@import './components/Checkbox.css';
|
|
22
|
+
@import './components/CheckboxGroup.css';
|
|
23
|
+
@import './components/Collapsible.css';
|
|
24
|
+
@import './components/Combobox.css';
|
|
25
|
+
@import './components/ContextMenu.css';
|
|
26
|
+
@import './components/Dialog.css';
|
|
27
|
+
@import './components/Drawer.css';
|
|
28
|
+
@import './components/Field.css';
|
|
29
|
+
@import './components/Fieldset.css';
|
|
30
|
+
@import './components/Form.css';
|
|
31
|
+
@import './components/Input.css';
|
|
32
|
+
@import './components/Menu.css';
|
|
33
|
+
@import './components/Menubar.css';
|
|
34
|
+
@import './components/Meter.css';
|
|
35
|
+
@import './components/NavigationMenu.css';
|
|
36
|
+
@import './components/NumberField.css';
|
|
37
|
+
@import './components/OTPField.css';
|
|
38
|
+
@import './components/Popover.css';
|
|
39
|
+
@import './components/PreviewCard.css';
|
|
40
|
+
@import './components/Progress.css';
|
|
41
|
+
@import './components/Radio.css';
|
|
42
|
+
@import './components/ScrollArea.css';
|
|
43
|
+
@import './components/Select.css';
|
|
44
|
+
@import './components/Separator.css';
|
|
45
|
+
@import './components/Slider.css';
|
|
46
|
+
@import './components/Switch.css';
|
|
47
|
+
@import './components/Tabs.css';
|
|
48
|
+
@import './components/Toast.css';
|
|
49
|
+
@import './components/Toggle.css';
|
|
50
|
+
@import './components/ToggleGroup.css';
|
|
51
|
+
@import './components/Toolbar.css';
|
|
52
|
+
@import './components/Tooltip.css';
|