@scattered-light/loomiere-base-ui 0.0.0-stage → 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/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,148 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.1 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Menu - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens. The trigger is a Button. The popup is the popup concept, rows are item rows at the
|
|
5
|
+
* dense menu height, and group labels, separators and check slots are the shared list
|
|
6
|
+
* parts, so menus and listboxes read as one family.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.MenuPositioner {
|
|
10
|
+
z-index: var(--sl-popup-z-index);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.MenuPopup {
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
background: var(--sl-popup-background);
|
|
16
|
+
border: var(--sl-popup-border-width) solid var(--sl-popup-border-color);
|
|
17
|
+
border-radius: var(--sl-popup-radius);
|
|
18
|
+
box-shadow: var(--sl-popup-shadow);
|
|
19
|
+
outline: none;
|
|
20
|
+
min-width: var(--sl-popup-min-width);
|
|
21
|
+
padding: var(--sl-popup-padding);
|
|
22
|
+
animation: menuFadeIn var(--sl-popup-animation-duration) var(--sl-popup-animation-easing);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@keyframes menuFadeIn {
|
|
26
|
+
from {
|
|
27
|
+
opacity: 0;
|
|
28
|
+
transform: scale(var(--sl-popup-scale-closed));
|
|
29
|
+
}
|
|
30
|
+
to {
|
|
31
|
+
opacity: 1;
|
|
32
|
+
transform: scale(1);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ============================================
|
|
37
|
+
ITEM (regular, checkbox, radio, submenu trigger)
|
|
38
|
+
============================================ */
|
|
39
|
+
|
|
40
|
+
.MenuItem,
|
|
41
|
+
.MenuCheckboxItem,
|
|
42
|
+
.MenuRadioItem,
|
|
43
|
+
.MenuSubmenuTrigger {
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
gap: var(--sl-item-gap);
|
|
47
|
+
padding-block: var(--sl-item-padding-block);
|
|
48
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
49
|
+
border-radius: var(--sl-item-radius);
|
|
50
|
+
color: var(--sl-item-color);
|
|
51
|
+
cursor: default;
|
|
52
|
+
user-select: none;
|
|
53
|
+
outline: none;
|
|
54
|
+
transition: var(--sl-item-transition);
|
|
55
|
+
font-family: var(--sl-font-base-font-family);
|
|
56
|
+
font-size: var(--sl-font-base-font-size);
|
|
57
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
58
|
+
line-height: var(--sl-font-base-line-height);
|
|
59
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
60
|
+
padding-block: var(--sl-item-padding-block-dense);
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
list-style: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.MenuItem:hover,
|
|
66
|
+
.MenuCheckboxItem:hover,
|
|
67
|
+
.MenuRadioItem:hover,
|
|
68
|
+
.MenuSubmenuTrigger:hover,
|
|
69
|
+
.MenuItem[data-highlighted],
|
|
70
|
+
.MenuCheckboxItem[data-highlighted],
|
|
71
|
+
.MenuRadioItem[data-highlighted],
|
|
72
|
+
.MenuSubmenuTrigger[data-highlighted] {
|
|
73
|
+
background: var(--sl-item-background-hover);
|
|
74
|
+
color: var(--sl-item-color-hover);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.MenuItem[data-disabled],
|
|
78
|
+
.MenuCheckboxItem[data-disabled],
|
|
79
|
+
.MenuRadioItem[data-disabled],
|
|
80
|
+
.MenuSubmenuTrigger[data-disabled] {
|
|
81
|
+
color: var(--sl-item-color-disabled);
|
|
82
|
+
cursor: not-allowed;
|
|
83
|
+
opacity: var(--sl-item-opacity-disabled);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/* ============================================
|
|
87
|
+
CHECKBOX & RADIO ITEM INDICATORS
|
|
88
|
+
============================================ */
|
|
89
|
+
|
|
90
|
+
.MenuCheckboxItemIndicator,
|
|
91
|
+
.MenuRadioItemIndicator {
|
|
92
|
+
display: inline-flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
justify-content: center;
|
|
95
|
+
flex-shrink: 0;
|
|
96
|
+
width: var(--sl-item-indicator-size);
|
|
97
|
+
height: var(--sl-item-indicator-size);
|
|
98
|
+
color: var(--sl-item-indicator-color);
|
|
99
|
+
line-height: 1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.MenuCheckboxItemIndicatorIcon,
|
|
103
|
+
.MenuRadioItemIndicatorIcon {
|
|
104
|
+
font-size: var(--sl-item-indicator-size);
|
|
105
|
+
line-height: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* Hide an unchecked radio's indicator when it is kept mounted */
|
|
109
|
+
.MenuRadioItemIndicator[data-unchecked] {
|
|
110
|
+
display: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* ============================================
|
|
114
|
+
GROUP, GROUP LABEL, SEPARATOR
|
|
115
|
+
============================================ */
|
|
116
|
+
|
|
117
|
+
.MenuGroup {
|
|
118
|
+
padding: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.MenuGroupLabel {
|
|
122
|
+
font-family: var(--sl-font-condense-subtitle-label-font-family);
|
|
123
|
+
font-size: var(--sl-font-condense-subtitle-label-font-size);
|
|
124
|
+
font-weight: var(--sl-font-condense-subtitle-label-font-weight);
|
|
125
|
+
line-height: var(--sl-font-condense-subtitle-label-line-height);
|
|
126
|
+
letter-spacing: var(--sl-font-condense-subtitle-label-letter-spacing);
|
|
127
|
+
text-transform: var(--sl-font-condense-subtitle-label-text-transform);
|
|
128
|
+
padding-block: var(--sl-popup-group-label-padding-top) var(--sl-popup-group-label-padding-bottom);
|
|
129
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
130
|
+
color: var(--sl-text-secondary);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.MenuSeparator {
|
|
134
|
+
height: var(--sl-stroke-default);
|
|
135
|
+
margin-block: var(--sl-popup-separator-spacing);
|
|
136
|
+
border: none;
|
|
137
|
+
background: var(--sl-popup-separator-color);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* ============================================
|
|
141
|
+
SUBMENU TRIGGER ARROW
|
|
142
|
+
============================================ */
|
|
143
|
+
|
|
144
|
+
.MenuSubmenuTrigger::after {
|
|
145
|
+
content: '→';
|
|
146
|
+
margin-left: auto;
|
|
147
|
+
color: var(--sl-text-tertiary);
|
|
148
|
+
}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.1 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Menubar - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens. A row of quiet triggers, each opening a menu. The popup is the popup concept, rows are item rows at the
|
|
5
|
+
* dense menu height, and group labels, separators and check slots are the shared list
|
|
6
|
+
* parts, so menus and listboxes read as one family.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.MenubarRoot {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
gap: var(--sl-space-1);
|
|
13
|
+
padding: var(--sl-space-1);
|
|
14
|
+
background: var(--sl-surface-base);
|
|
15
|
+
border: var(--sl-stroke-default) solid var(--sl-border-subtle);
|
|
16
|
+
border-radius: var(--sl-radius-chrome);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Triggers look like menu rows until their menu opens, then like a selected row. */
|
|
20
|
+
.MenubarTrigger {
|
|
21
|
+
font-family: var(--sl-font-condense-trigger-font-family);
|
|
22
|
+
font-size: var(--sl-font-condense-trigger-font-size);
|
|
23
|
+
font-weight: var(--sl-font-condense-trigger-font-weight);
|
|
24
|
+
line-height: var(--sl-font-condense-trigger-line-height);
|
|
25
|
+
letter-spacing: var(--sl-font-condense-trigger-letter-spacing);
|
|
26
|
+
padding-block: var(--sl-item-padding-block-dense);
|
|
27
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
28
|
+
border: none;
|
|
29
|
+
border-radius: var(--sl-item-radius);
|
|
30
|
+
background: transparent;
|
|
31
|
+
color: var(--sl-text-primary);
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
outline: none;
|
|
34
|
+
white-space: nowrap;
|
|
35
|
+
transition: var(--sl-item-transition);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.MenubarTrigger:hover {
|
|
39
|
+
background: var(--sl-fill-subtle);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.MenubarTrigger[data-popup-open] {
|
|
43
|
+
background: var(--sl-item-background-hover);
|
|
44
|
+
color: var(--sl-item-color-hover);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.MenubarTrigger:focus-visible {
|
|
48
|
+
outline: var(--sl-focus-outline);
|
|
49
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
50
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.MenubarPositioner {
|
|
54
|
+
z-index: var(--sl-popup-z-index);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.MenubarPopup {
|
|
58
|
+
box-sizing: border-box;
|
|
59
|
+
background: var(--sl-popup-background);
|
|
60
|
+
border: var(--sl-popup-border-width) solid var(--sl-popup-border-color);
|
|
61
|
+
border-radius: var(--sl-popup-radius);
|
|
62
|
+
box-shadow: var(--sl-popup-shadow);
|
|
63
|
+
outline: none;
|
|
64
|
+
min-width: var(--sl-popup-min-width);
|
|
65
|
+
padding: var(--sl-popup-padding);
|
|
66
|
+
animation: menubarFadeIn var(--sl-popup-animation-duration) var(--sl-popup-animation-easing);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@keyframes menubarFadeIn {
|
|
70
|
+
from {
|
|
71
|
+
opacity: 0;
|
|
72
|
+
transform: scale(var(--sl-popup-scale-closed));
|
|
73
|
+
}
|
|
74
|
+
to {
|
|
75
|
+
opacity: 1;
|
|
76
|
+
transform: scale(1);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/* ============================================
|
|
81
|
+
ITEM (regular, checkbox, radio, submenu trigger)
|
|
82
|
+
============================================ */
|
|
83
|
+
|
|
84
|
+
.MenubarItem,
|
|
85
|
+
.MenubarCheckboxItem,
|
|
86
|
+
.MenubarRadioItem,
|
|
87
|
+
.MenubarSubmenuTrigger {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
gap: var(--sl-item-gap);
|
|
91
|
+
padding-block: var(--sl-item-padding-block);
|
|
92
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
93
|
+
border-radius: var(--sl-item-radius);
|
|
94
|
+
color: var(--sl-item-color);
|
|
95
|
+
cursor: default;
|
|
96
|
+
user-select: none;
|
|
97
|
+
outline: none;
|
|
98
|
+
transition: var(--sl-item-transition);
|
|
99
|
+
font-family: var(--sl-font-base-font-family);
|
|
100
|
+
font-size: var(--sl-font-base-font-size);
|
|
101
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
102
|
+
line-height: var(--sl-font-base-line-height);
|
|
103
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
104
|
+
padding-block: var(--sl-item-padding-block-dense);
|
|
105
|
+
cursor: pointer;
|
|
106
|
+
list-style: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.MenubarItem:hover,
|
|
110
|
+
.MenubarCheckboxItem:hover,
|
|
111
|
+
.MenubarRadioItem:hover,
|
|
112
|
+
.MenubarSubmenuTrigger:hover,
|
|
113
|
+
.MenubarItem[data-highlighted],
|
|
114
|
+
.MenubarCheckboxItem[data-highlighted],
|
|
115
|
+
.MenubarRadioItem[data-highlighted],
|
|
116
|
+
.MenubarSubmenuTrigger[data-highlighted] {
|
|
117
|
+
background: var(--sl-item-background-hover);
|
|
118
|
+
color: var(--sl-item-color-hover);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.MenubarItem[data-disabled],
|
|
122
|
+
.MenubarCheckboxItem[data-disabled],
|
|
123
|
+
.MenubarRadioItem[data-disabled],
|
|
124
|
+
.MenubarSubmenuTrigger[data-disabled] {
|
|
125
|
+
color: var(--sl-item-color-disabled);
|
|
126
|
+
cursor: not-allowed;
|
|
127
|
+
opacity: var(--sl-item-opacity-disabled);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* ============================================
|
|
131
|
+
CHECKBOX & RADIO ITEM INDICATORS
|
|
132
|
+
============================================ */
|
|
133
|
+
|
|
134
|
+
.MenubarCheckboxItemIndicator,
|
|
135
|
+
.MenubarRadioItemIndicator {
|
|
136
|
+
display: inline-flex;
|
|
137
|
+
align-items: center;
|
|
138
|
+
justify-content: center;
|
|
139
|
+
flex-shrink: 0;
|
|
140
|
+
width: var(--sl-item-indicator-size);
|
|
141
|
+
height: var(--sl-item-indicator-size);
|
|
142
|
+
color: var(--sl-item-indicator-color);
|
|
143
|
+
line-height: 1;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.MenubarCheckboxItemIndicatorIcon,
|
|
147
|
+
.MenubarRadioItemIndicatorIcon {
|
|
148
|
+
font-size: var(--sl-item-indicator-size);
|
|
149
|
+
line-height: 1;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/* Hide an unchecked radio's indicator when it is kept mounted */
|
|
153
|
+
.MenubarRadioItemIndicator[data-unchecked] {
|
|
154
|
+
display: none;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* ============================================
|
|
158
|
+
GROUP, GROUP LABEL, SEPARATOR
|
|
159
|
+
============================================ */
|
|
160
|
+
|
|
161
|
+
.MenubarGroup {
|
|
162
|
+
padding: 0;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.MenubarGroupLabel {
|
|
166
|
+
font-family: var(--sl-font-condense-subtitle-label-font-family);
|
|
167
|
+
font-size: var(--sl-font-condense-subtitle-label-font-size);
|
|
168
|
+
font-weight: var(--sl-font-condense-subtitle-label-font-weight);
|
|
169
|
+
line-height: var(--sl-font-condense-subtitle-label-line-height);
|
|
170
|
+
letter-spacing: var(--sl-font-condense-subtitle-label-letter-spacing);
|
|
171
|
+
text-transform: var(--sl-font-condense-subtitle-label-text-transform);
|
|
172
|
+
padding-block: var(--sl-popup-group-label-padding-top) var(--sl-popup-group-label-padding-bottom);
|
|
173
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
174
|
+
color: var(--sl-text-secondary);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.MenubarSeparator {
|
|
178
|
+
height: var(--sl-stroke-default);
|
|
179
|
+
margin-block: var(--sl-popup-separator-spacing);
|
|
180
|
+
border: none;
|
|
181
|
+
background: var(--sl-popup-separator-color);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* ============================================
|
|
185
|
+
SUBMENU TRIGGER ARROW
|
|
186
|
+
============================================ */
|
|
187
|
+
|
|
188
|
+
.MenubarSubmenuTrigger::after {
|
|
189
|
+
content: '→';
|
|
190
|
+
margin-left: auto;
|
|
191
|
+
color: var(--sl-text-tertiary);
|
|
192
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.1 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Meter - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* A gauge (tokens/semantic/gauge.json). The fill is the solid color of the scope around it:
|
|
5
|
+
* the accent by default, or set data-color on the root (success, warning, error, any palette)
|
|
6
|
+
* to show a zone. Base UI doesn't map low/high/optimum, so the app picks the color.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.MeterRoot {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
gap: var(--sl-gauge-gap);
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.MeterLabel {
|
|
17
|
+
font-family: var(--sl-font-base-label-font-family);
|
|
18
|
+
font-size: var(--sl-font-base-label-font-size);
|
|
19
|
+
font-weight: var(--sl-font-base-label-font-weight);
|
|
20
|
+
line-height: var(--sl-font-base-label-line-height);
|
|
21
|
+
letter-spacing: var(--sl-font-base-label-letter-spacing);
|
|
22
|
+
color: var(--sl-gauge-label-color);
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
align-items: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.MeterTrack {
|
|
29
|
+
position: relative;
|
|
30
|
+
height: var(--sl-gauge-height);
|
|
31
|
+
background: var(--sl-gauge-track-color);
|
|
32
|
+
border-radius: var(--sl-gauge-radius);
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.MeterIndicator {
|
|
37
|
+
height: 100%;
|
|
38
|
+
background: var(--sl-scope-solid);
|
|
39
|
+
border-radius: var(--sl-gauge-radius);
|
|
40
|
+
transition: var(--sl-gauge-transition);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.MeterValue {
|
|
44
|
+
font-family: var(--sl-font-minimize-font-family);
|
|
45
|
+
font-size: var(--sl-font-minimize-font-size);
|
|
46
|
+
font-weight: var(--sl-font-minimize-font-weight);
|
|
47
|
+
line-height: var(--sl-font-minimize-line-height);
|
|
48
|
+
letter-spacing: var(--sl-font-minimize-letter-spacing);
|
|
49
|
+
color: var(--sl-gauge-value-color);
|
|
50
|
+
text-align: right;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.MeterTrack[data-size='sm'] {
|
|
54
|
+
height: var(--sl-gauge-height-sm);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.MeterTrack[data-size='lg'] {
|
|
58
|
+
height: var(--sl-gauge-height-lg);
|
|
59
|
+
}
|