@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,201 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Autocomplete - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens. The input is Input (Input.css), the clear button is an icon
|
|
5
|
+
* button, and the list is a popup of item rows with the shared group label,
|
|
6
|
+
* separator and empty message.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.AutocompleteRoot {
|
|
10
|
+
position: relative;
|
|
11
|
+
width: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Room for the clear button at the end of the input. Scoped to the root so it wins
|
|
15
|
+
over Input.css, which loads later. */
|
|
16
|
+
.AutocompleteRoot .AutocompleteInput {
|
|
17
|
+
padding-inline-end: calc(var(--sl-control-padding-inline) + var(--sl-icon-button-size));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* ============================================
|
|
21
|
+
CLEAR BUTTON
|
|
22
|
+
============================================ */
|
|
23
|
+
|
|
24
|
+
.AutocompleteClear {
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
width: var(--sl-icon-button-size);
|
|
30
|
+
height: var(--sl-icon-button-size);
|
|
31
|
+
padding: 0;
|
|
32
|
+
border: none;
|
|
33
|
+
border-radius: var(--sl-icon-button-radius);
|
|
34
|
+
background: transparent;
|
|
35
|
+
color: var(--sl-icon-button-color);
|
|
36
|
+
cursor: pointer;
|
|
37
|
+
outline: none;
|
|
38
|
+
transition: var(--sl-icon-button-transition);
|
|
39
|
+
position: absolute;
|
|
40
|
+
inset-inline-end: var(--sl-space-3);
|
|
41
|
+
inset-block-start: 50%;
|
|
42
|
+
transform: translateY(-50%);
|
|
43
|
+
font-size: var(--sl-icon-size-magnify);
|
|
44
|
+
line-height: 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.AutocompleteClear:hover {
|
|
48
|
+
background: var(--sl-icon-button-background-hover);
|
|
49
|
+
color: var(--sl-icon-button-color-hover);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.AutocompleteClear: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
|
+
/* ============================================
|
|
59
|
+
POSITIONER AND POPUP
|
|
60
|
+
============================================ */
|
|
61
|
+
|
|
62
|
+
.AutocompletePositioner {
|
|
63
|
+
z-index: var(--sl-popup-z-index);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.AutocompletePopup {
|
|
67
|
+
box-sizing: border-box;
|
|
68
|
+
background: var(--sl-popup-background);
|
|
69
|
+
border: var(--sl-popup-border-width) solid var(--sl-popup-border-color);
|
|
70
|
+
border-radius: var(--sl-popup-radius);
|
|
71
|
+
box-shadow: var(--sl-popup-shadow);
|
|
72
|
+
outline: none;
|
|
73
|
+
width: var(--anchor-width); /* Base UI's own variable */
|
|
74
|
+
max-width: var(--available-width); /* Base UI's own variable */
|
|
75
|
+
margin-block-start: var(--sl-space-1);
|
|
76
|
+
border-radius: var(--sl-popup-radius-field);
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
animation: slideDown var(--sl-popup-animation-duration) var(--sl-popup-animation-easing);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@keyframes slideDown {
|
|
82
|
+
from {
|
|
83
|
+
opacity: 0;
|
|
84
|
+
transform: translateY(calc(-1 * var(--sl-space-2)));
|
|
85
|
+
}
|
|
86
|
+
to {
|
|
87
|
+
opacity: 1;
|
|
88
|
+
transform: translateY(0);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.AutocompletePopup[data-ending-style] {
|
|
93
|
+
animation: slideUp var(--sl-popup-animation-duration) var(--sl-popup-animation-easing);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
@keyframes slideUp {
|
|
97
|
+
from {
|
|
98
|
+
opacity: 1;
|
|
99
|
+
transform: translateY(0);
|
|
100
|
+
}
|
|
101
|
+
to {
|
|
102
|
+
opacity: 0;
|
|
103
|
+
transform: translateY(calc(-1 * var(--sl-space-2)));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.AutocompleteList {
|
|
108
|
+
max-height: var(--sl-popup-list-max-height);
|
|
109
|
+
overflow-y: auto;
|
|
110
|
+
margin: 0;
|
|
111
|
+
padding: var(--sl-popup-padding);
|
|
112
|
+
list-style: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* ============================================
|
|
116
|
+
ITEM
|
|
117
|
+
============================================ */
|
|
118
|
+
|
|
119
|
+
.AutocompleteItem {
|
|
120
|
+
display: flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
gap: var(--sl-item-gap);
|
|
123
|
+
padding-block: var(--sl-item-padding-block);
|
|
124
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
125
|
+
border-radius: var(--sl-item-radius);
|
|
126
|
+
color: var(--sl-item-color);
|
|
127
|
+
cursor: default;
|
|
128
|
+
user-select: none;
|
|
129
|
+
outline: none;
|
|
130
|
+
transition: var(--sl-item-transition);
|
|
131
|
+
font-family: var(--sl-font-base-font-family);
|
|
132
|
+
font-size: var(--sl-font-base-font-size);
|
|
133
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
134
|
+
line-height: var(--sl-font-base-line-height);
|
|
135
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
136
|
+
cursor: pointer;
|
|
137
|
+
list-style: none;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.AutocompleteItem:hover,
|
|
141
|
+
.AutocompleteItem[data-highlighted] {
|
|
142
|
+
background: var(--sl-item-background-hover);
|
|
143
|
+
color: var(--sl-item-color-hover);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.AutocompleteItem[data-selected] {
|
|
147
|
+
font-family: var(--sl-font-base-selected-font-family);
|
|
148
|
+
font-size: var(--sl-font-base-selected-font-size);
|
|
149
|
+
font-weight: var(--sl-font-base-selected-font-weight);
|
|
150
|
+
line-height: var(--sl-font-base-selected-line-height);
|
|
151
|
+
letter-spacing: var(--sl-font-base-selected-letter-spacing);
|
|
152
|
+
background: var(--sl-item-background-selected);
|
|
153
|
+
color: var(--sl-item-color-selected);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.AutocompleteItem[data-disabled] {
|
|
157
|
+
color: var(--sl-item-color-disabled);
|
|
158
|
+
cursor: not-allowed;
|
|
159
|
+
opacity: var(--sl-item-opacity-disabled);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* ============================================
|
|
163
|
+
GROUP, SEPARATOR, EMPTY
|
|
164
|
+
============================================ */
|
|
165
|
+
|
|
166
|
+
.AutocompleteGroupLabel {
|
|
167
|
+
font-family: var(--sl-font-condense-subtitle-label-font-family);
|
|
168
|
+
font-size: var(--sl-font-condense-subtitle-label-font-size);
|
|
169
|
+
font-weight: var(--sl-font-condense-subtitle-label-font-weight);
|
|
170
|
+
line-height: var(--sl-font-condense-subtitle-label-line-height);
|
|
171
|
+
letter-spacing: var(--sl-font-condense-subtitle-label-letter-spacing);
|
|
172
|
+
text-transform: var(--sl-font-condense-subtitle-label-text-transform);
|
|
173
|
+
padding-block: var(--sl-popup-group-label-padding-top) var(--sl-popup-group-label-padding-bottom);
|
|
174
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
175
|
+
color: var(--sl-text-secondary);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.AutocompleteSeparator {
|
|
179
|
+
height: var(--sl-stroke-default);
|
|
180
|
+
margin-block: var(--sl-popup-separator-spacing);
|
|
181
|
+
border: none;
|
|
182
|
+
background: var(--sl-popup-separator-color);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.AutocompleteEmpty {
|
|
186
|
+
font-family: var(--sl-font-condense-font-family);
|
|
187
|
+
font-size: var(--sl-font-condense-font-size);
|
|
188
|
+
font-weight: var(--sl-font-condense-font-weight);
|
|
189
|
+
line-height: var(--sl-font-condense-line-height);
|
|
190
|
+
letter-spacing: var(--sl-font-condense-letter-spacing);
|
|
191
|
+
padding-block: var(--sl-popup-empty-padding-block);
|
|
192
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
193
|
+
color: var(--sl-text-tertiary);
|
|
194
|
+
text-align: center;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/* ============================================
|
|
198
|
+
STATUS (for screen readers)
|
|
199
|
+
Give Autocomplete.Status the shared .visually-hidden class
|
|
200
|
+
(reset-accessibility.css).
|
|
201
|
+
============================================ */
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Avatar - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* A round picture with a ring in the page color, so avatars in a group cut out of each other in
|
|
5
|
+
* both themes. Initials sit on the scope's solid fill in its on-solid text (the bold emphasis
|
|
6
|
+
* colors), so data-color re-colors them. Initials use the heading text style one tier per size.
|
|
7
|
+
* Only the sizes are avatar tokens.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.AvatarRoot {
|
|
11
|
+
--avatar-size: var(--sl-avatar-size-md);
|
|
12
|
+
box-sizing: border-box;
|
|
13
|
+
display: inline-flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
justify-content: center;
|
|
16
|
+
flex-shrink: 0;
|
|
17
|
+
width: var(--avatar-size);
|
|
18
|
+
height: var(--avatar-size);
|
|
19
|
+
border-radius: var(--sl-radius-pill);
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
background: var(--sl-fill-subtle);
|
|
22
|
+
border: var(--sl-stroke-emphasis) solid var(--sl-surface-canvas);
|
|
23
|
+
box-shadow: var(--sl-elevation-sm);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.AvatarImage {
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
object-fit: cover;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.AvatarFallback {
|
|
33
|
+
font-family: var(--sl-font-maximize-md-font-family);
|
|
34
|
+
font-size: var(--sl-font-maximize-md-font-size);
|
|
35
|
+
font-weight: var(--sl-font-maximize-md-font-weight);
|
|
36
|
+
line-height: var(--sl-font-maximize-md-line-height);
|
|
37
|
+
letter-spacing: var(--sl-font-maximize-md-letter-spacing);
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
justify-content: center;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
background: var(--sl-scope-solid);
|
|
44
|
+
color: var(--sl-scope-on-solid);
|
|
45
|
+
text-transform: uppercase;
|
|
46
|
+
user-select: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ============================================
|
|
50
|
+
SIZES
|
|
51
|
+
============================================ */
|
|
52
|
+
|
|
53
|
+
.AvatarRoot[data-size='xs'] {
|
|
54
|
+
--avatar-size: var(--sl-avatar-size-xs);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.AvatarRoot[data-size='xs'] .AvatarFallback {
|
|
58
|
+
font-family: var(--sl-font-maximize-xs-font-family);
|
|
59
|
+
font-size: var(--sl-font-maximize-xs-font-size);
|
|
60
|
+
font-weight: var(--sl-font-maximize-xs-font-weight);
|
|
61
|
+
line-height: var(--sl-font-maximize-xs-line-height);
|
|
62
|
+
letter-spacing: var(--sl-font-maximize-xs-letter-spacing);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.AvatarRoot[data-size='sm'] {
|
|
66
|
+
--avatar-size: var(--sl-avatar-size-sm);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.AvatarRoot[data-size='sm'] .AvatarFallback {
|
|
70
|
+
font-family: var(--sl-font-maximize-sm-font-family);
|
|
71
|
+
font-size: var(--sl-font-maximize-sm-font-size);
|
|
72
|
+
font-weight: var(--sl-font-maximize-sm-font-weight);
|
|
73
|
+
line-height: var(--sl-font-maximize-sm-line-height);
|
|
74
|
+
letter-spacing: var(--sl-font-maximize-sm-letter-spacing);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.AvatarRoot[data-size='lg'] {
|
|
78
|
+
--avatar-size: var(--sl-avatar-size-lg);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.AvatarRoot[data-size='lg'] .AvatarFallback {
|
|
82
|
+
font-family: var(--sl-font-maximize-lg-font-family);
|
|
83
|
+
font-size: var(--sl-font-maximize-lg-font-size);
|
|
84
|
+
font-weight: var(--sl-font-maximize-lg-font-weight);
|
|
85
|
+
line-height: var(--sl-font-maximize-lg-line-height);
|
|
86
|
+
letter-spacing: var(--sl-font-maximize-lg-letter-spacing);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.AvatarRoot[data-size='xl'] {
|
|
90
|
+
--avatar-size: var(--sl-avatar-size-xl);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.AvatarRoot[data-size='xl'] .AvatarFallback {
|
|
94
|
+
font-family: var(--sl-font-maximize-2xl-font-family);
|
|
95
|
+
font-size: var(--sl-font-maximize-2xl-font-size);
|
|
96
|
+
font-weight: var(--sl-font-maximize-2xl-font-weight);
|
|
97
|
+
line-height: var(--sl-font-maximize-2xl-line-height);
|
|
98
|
+
letter-spacing: var(--sl-font-maximize-2xl-letter-spacing);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* ============================================
|
|
102
|
+
AVATAR GROUP
|
|
103
|
+
============================================ */
|
|
104
|
+
|
|
105
|
+
/* Each avatar tucks a third of itself under the one before it */
|
|
106
|
+
.AvatarGroup {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.AvatarGroup .AvatarRoot {
|
|
112
|
+
margin-inline-start: calc(var(--avatar-size) * -0.33);
|
|
113
|
+
transition: transform var(--sl-duration-normal) var(--sl-easing-default);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.AvatarGroup .AvatarRoot:first-child {
|
|
117
|
+
margin-inline-start: 0;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.AvatarGroup .AvatarRoot:hover {
|
|
121
|
+
z-index: 1;
|
|
122
|
+
transform: translateY(calc(var(--sl-stroke-emphasis) * -1));
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/* ============================================
|
|
126
|
+
REDUCED MOTION
|
|
127
|
+
The reset already stops transitions and animations; this only removes movement.
|
|
128
|
+
============================================ */
|
|
129
|
+
|
|
130
|
+
@media (prefers-reduced-motion: reduce) {
|
|
131
|
+
.AvatarGroup .AvatarRoot:hover {
|
|
132
|
+
transform: none;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Button - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* Colors are the brand's emphasis levels, sizes are control.*, text is the trigger
|
|
5
|
+
* text style of each tier, and icons fill the button line (icon-size one tier up).
|
|
6
|
+
* Only the pill shape and disabled fade are Button's own (tokens/component/button.json).
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/* ============================================
|
|
10
|
+
BASE BUTTON (md)
|
|
11
|
+
============================================ */
|
|
12
|
+
|
|
13
|
+
.Button {
|
|
14
|
+
font-family: var(--sl-font-base-trigger-font-family);
|
|
15
|
+
font-size: var(--sl-font-base-trigger-font-size);
|
|
16
|
+
font-weight: var(--sl-font-base-trigger-font-weight);
|
|
17
|
+
line-height: var(--sl-font-base-trigger-line-height);
|
|
18
|
+
letter-spacing: var(--sl-font-base-trigger-letter-spacing);
|
|
19
|
+
display: inline-flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
gap: var(--sl-gap-control);
|
|
23
|
+
height: var(--sl-control-height-md);
|
|
24
|
+
padding-inline: var(--sl-control-padding-inline);
|
|
25
|
+
border: var(--sl-stroke-default) solid transparent;
|
|
26
|
+
border-radius: var(--sl-button-radius);
|
|
27
|
+
transition: var(--sl-transition-button);
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
outline: none;
|
|
30
|
+
text-decoration: none;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
user-select: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.Button svg {
|
|
36
|
+
width: var(--sl-icon-size-magnify);
|
|
37
|
+
height: var(--sl-icon-size-magnify);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ============================================
|
|
41
|
+
EMPHASIS (data-emphasis="bold | standard | subtle | quiet")
|
|
42
|
+
The brand's roles decide each level's style and color (tokens/semantic/emphasis.json);
|
|
43
|
+
data-color="<palette>" re-colors any level. data-variant is an alias:
|
|
44
|
+
solid = bold (also the default), outline = standard, ghost = quiet. The aliases are
|
|
45
|
+
written with the levels in tokens.css, so data-emphasis wins when both are set.
|
|
46
|
+
============================================ */
|
|
47
|
+
|
|
48
|
+
.Button {
|
|
49
|
+
background: var(--sl-e-bg);
|
|
50
|
+
color: var(--sl-e-fg);
|
|
51
|
+
border-color: var(--sl-e-border);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.Button:hover:not(:disabled):not([aria-disabled='true']) {
|
|
55
|
+
background: var(--sl-e-bg-hover);
|
|
56
|
+
border-color: var(--sl-e-border-hover);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.Button:active:not(:disabled):not([aria-disabled='true']) {
|
|
60
|
+
background: var(--sl-e-bg-active);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/* Focus: a solid ring in the scope's focus color with a soft glow outside it. */
|
|
64
|
+
.Button:focus-visible {
|
|
65
|
+
outline: var(--sl-a11y-focus-outline-width) solid var(--sl-scope-focus);
|
|
66
|
+
outline-offset: var(--sl-a11y-focus-outline-offset);
|
|
67
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-scope-soft-hover);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* ============================================
|
|
71
|
+
DISABLED STATE
|
|
72
|
+
============================================ */
|
|
73
|
+
|
|
74
|
+
.Button:disabled,
|
|
75
|
+
.Button[aria-disabled='true'] {
|
|
76
|
+
opacity: var(--sl-button-opacity-disabled);
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* ============================================
|
|
81
|
+
SIZE VARIANTS: control size, the trigger text of the same tier, icons one tier up
|
|
82
|
+
============================================ */
|
|
83
|
+
|
|
84
|
+
.Button[data-size='xs'] {
|
|
85
|
+
font-family: var(--sl-font-minimize-trigger-font-family);
|
|
86
|
+
font-size: var(--sl-font-minimize-trigger-font-size);
|
|
87
|
+
font-weight: var(--sl-font-minimize-trigger-font-weight);
|
|
88
|
+
line-height: var(--sl-font-minimize-trigger-line-height);
|
|
89
|
+
letter-spacing: var(--sl-font-minimize-trigger-letter-spacing);
|
|
90
|
+
gap: var(--sl-gap-control-xs);
|
|
91
|
+
height: var(--sl-control-height-xs);
|
|
92
|
+
padding-inline: var(--sl-control-padding-inline-xs);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.Button[data-size='xs'] svg {
|
|
96
|
+
width: var(--sl-icon-size-condense);
|
|
97
|
+
height: var(--sl-icon-size-condense);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.Button[data-size='sm'] {
|
|
101
|
+
font-family: var(--sl-font-condense-trigger-font-family);
|
|
102
|
+
font-size: var(--sl-font-condense-trigger-font-size);
|
|
103
|
+
font-weight: var(--sl-font-condense-trigger-font-weight);
|
|
104
|
+
line-height: var(--sl-font-condense-trigger-line-height);
|
|
105
|
+
letter-spacing: var(--sl-font-condense-trigger-letter-spacing);
|
|
106
|
+
gap: var(--sl-gap-control-sm);
|
|
107
|
+
height: var(--sl-control-height-sm);
|
|
108
|
+
padding-inline: var(--sl-control-padding-inline-sm);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.Button[data-size='sm'] svg {
|
|
112
|
+
width: var(--sl-icon-size-base);
|
|
113
|
+
height: var(--sl-icon-size-base);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.Button[data-size='lg'] {
|
|
117
|
+
font-family: var(--sl-font-magnify-trigger-font-family);
|
|
118
|
+
font-size: var(--sl-font-magnify-trigger-font-size);
|
|
119
|
+
font-weight: var(--sl-font-magnify-trigger-font-weight);
|
|
120
|
+
line-height: var(--sl-font-magnify-trigger-line-height);
|
|
121
|
+
letter-spacing: var(--sl-font-magnify-trigger-letter-spacing);
|
|
122
|
+
height: var(--sl-control-height-lg);
|
|
123
|
+
padding-inline: var(--sl-control-padding-inline-lg);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.Button[data-size='lg'] svg {
|
|
127
|
+
width: var(--sl-icon-size-maximize);
|
|
128
|
+
height: var(--sl-icon-size-maximize);
|
|
129
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Checkbox - Mojave Theme
|
|
3
|
+
* Sizes follow the label: the box is the icon size one tier above the label's text
|
|
4
|
+
* tier (like a button's icon) and the check mark one tier below it.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* ============================================
|
|
8
|
+
LABEL WRAPPER
|
|
9
|
+
============================================ */
|
|
10
|
+
|
|
11
|
+
.CheckboxLabel {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--sl-gap-control);
|
|
15
|
+
color: var(--sl-text-primary);
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
user-select: none;
|
|
18
|
+
font-family: var(--sl-font-base-font-family);
|
|
19
|
+
font-size: var(--sl-font-base-font-size);
|
|
20
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
21
|
+
line-height: var(--sl-font-base-line-height);
|
|
22
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
23
|
+
min-height: var(--sl-control-height-md); /* Tap target */
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.CheckboxLabel:has(.CheckboxRoot[data-size='sm']) {
|
|
27
|
+
font-family: var(--sl-font-condense-font-family);
|
|
28
|
+
font-size: var(--sl-font-condense-font-size);
|
|
29
|
+
font-weight: var(--sl-font-condense-font-weight);
|
|
30
|
+
line-height: var(--sl-font-condense-line-height);
|
|
31
|
+
letter-spacing: var(--sl-font-condense-letter-spacing);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.CheckboxLabel:has(.CheckboxRoot[data-size='lg']) {
|
|
35
|
+
font-family: var(--sl-font-magnify-font-family);
|
|
36
|
+
font-size: var(--sl-font-magnify-font-size);
|
|
37
|
+
font-weight: var(--sl-font-magnify-font-weight);
|
|
38
|
+
line-height: var(--sl-font-magnify-line-height);
|
|
39
|
+
letter-spacing: var(--sl-font-magnify-letter-spacing);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.CheckboxLabel:has(.CheckboxRoot[data-disabled]) {
|
|
43
|
+
color: var(--sl-text-disabled);
|
|
44
|
+
cursor: not-allowed;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ============================================
|
|
48
|
+
CHECKBOX ROOT (the box)
|
|
49
|
+
============================================ */
|
|
50
|
+
|
|
51
|
+
.CheckboxRoot {
|
|
52
|
+
box-sizing: border-box;
|
|
53
|
+
display: inline-flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
flex-shrink: 0;
|
|
57
|
+
margin: 0;
|
|
58
|
+
padding: 0;
|
|
59
|
+
border: var(--sl-check-border-width) solid var(--sl-check-border-color);
|
|
60
|
+
background: var(--sl-check-background);
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
outline: none;
|
|
63
|
+
transition: var(--sl-check-transition);
|
|
64
|
+
width: var(--sl-icon-size-magnify);
|
|
65
|
+
height: var(--sl-icon-size-magnify);
|
|
66
|
+
border-radius: var(--sl-check-radius);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.CheckboxRoot[data-size='sm'] {
|
|
70
|
+
width: var(--sl-icon-size-base);
|
|
71
|
+
height: var(--sl-icon-size-base);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.CheckboxRoot[data-size='lg'] {
|
|
75
|
+
width: var(--sl-icon-size-maximize);
|
|
76
|
+
height: var(--sl-icon-size-maximize);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.CheckboxRoot:hover {
|
|
80
|
+
border-color: var(--sl-check-border-color-hover);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.CheckboxRoot:focus-visible {
|
|
84
|
+
outline: var(--sl-focus-outline);
|
|
85
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
86
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.CheckboxRoot[data-checked],
|
|
90
|
+
.CheckboxRoot[data-indeterminate] {
|
|
91
|
+
background: var(--sl-check-background-checked);
|
|
92
|
+
border-color: var(--sl-check-border-color-checked);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.CheckboxRoot[data-disabled] {
|
|
96
|
+
opacity: var(--sl-check-opacity-disabled);
|
|
97
|
+
cursor: not-allowed;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* ============================================
|
|
101
|
+
INDICATOR AND ICON (the mark)
|
|
102
|
+
============================================ */
|
|
103
|
+
|
|
104
|
+
.CheckboxIndicator {
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
flex-shrink: 0;
|
|
109
|
+
line-height: 1;
|
|
110
|
+
width: 100%;
|
|
111
|
+
height: 100%;
|
|
112
|
+
color: var(--sl-check-mark-color);
|
|
113
|
+
line-height: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.CheckboxIcon {
|
|
117
|
+
display: block;
|
|
118
|
+
width: var(--sl-icon-size-condense);
|
|
119
|
+
height: var(--sl-icon-size-condense);
|
|
120
|
+
fill: currentColor;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.CheckboxRoot[data-size='sm'] .CheckboxIcon {
|
|
124
|
+
width: var(--sl-icon-size-minimize);
|
|
125
|
+
height: var(--sl-icon-size-minimize);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.CheckboxRoot[data-size='lg'] .CheckboxIcon {
|
|
129
|
+
width: var(--sl-icon-size-base);
|
|
130
|
+
height: var(--sl-icon-size-base);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/* ============================================
|
|
134
|
+
STYLE VARIANTS
|
|
135
|
+
============================================ */
|
|
136
|
+
|
|
137
|
+
/* Outline: the box stays empty and only the mark takes the color. */
|
|
138
|
+
.CheckboxRoot[data-variant='outline'][data-checked],
|
|
139
|
+
.CheckboxRoot[data-variant='circular-outline'][data-checked] {
|
|
140
|
+
background: transparent;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.CheckboxRoot[data-variant='outline'][data-checked] .CheckboxIndicator,
|
|
144
|
+
.CheckboxRoot[data-variant='circular-outline'][data-checked] .CheckboxIndicator {
|
|
145
|
+
color: var(--sl-check-mark-color-outline);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.CheckboxRoot[data-variant='outline'][data-disabled][data-checked] .CheckboxIndicator,
|
|
149
|
+
.CheckboxRoot[data-variant='circular-outline'][data-disabled][data-checked] .CheckboxIndicator {
|
|
150
|
+
color: var(--sl-check-mark-color-disabled);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.CheckboxRoot[data-variant='circular'],
|
|
154
|
+
.CheckboxRoot[data-variant='circular-outline'] {
|
|
155
|
+
border-radius: var(--sl-radius-pill);
|
|
156
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Checkbox Group - Mojave Theme */
|
|
3
|
+
|
|
4
|
+
/* Each checkbox row is already a full tap target tall, so the rows sit close. */
|
|
5
|
+
.CheckboxGroup {
|
|
6
|
+
display: flex;
|
|
7
|
+
flex-direction: column;
|
|
8
|
+
gap: var(--sl-space-0-5);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.CheckboxGroup[data-disabled] {
|
|
12
|
+
opacity: var(--sl-check-opacity-disabled);
|
|
13
|
+
cursor: not-allowed;
|
|
14
|
+
pointer-events: none;
|
|
15
|
+
}
|