@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,168 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Context Menu - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens. Opens on right-click; the trigger area only sets the cursor. 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
|
+
.ContextMenuTrigger {
|
|
10
|
+
cursor: context-menu;
|
|
11
|
+
user-select: none;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ContextMenuPositioner {
|
|
15
|
+
z-index: var(--sl-popup-z-index);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ContextMenuPopup {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
background: var(--sl-popup-background);
|
|
21
|
+
border: var(--sl-popup-border-width) solid var(--sl-popup-border-color);
|
|
22
|
+
border-radius: var(--sl-popup-radius);
|
|
23
|
+
box-shadow: var(--sl-popup-shadow);
|
|
24
|
+
outline: none;
|
|
25
|
+
min-width: var(--sl-popup-min-width);
|
|
26
|
+
padding: var(--sl-popup-padding);
|
|
27
|
+
animation: contextMenuFadeIn var(--sl-popup-animation-duration) var(--sl-popup-animation-easing);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@keyframes contextMenuFadeIn {
|
|
31
|
+
from {
|
|
32
|
+
opacity: 0;
|
|
33
|
+
transform: scale(var(--sl-popup-scale-closed));
|
|
34
|
+
}
|
|
35
|
+
to {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
transform: scale(1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* ============================================
|
|
42
|
+
ITEM (regular, checkbox, radio, submenu trigger)
|
|
43
|
+
============================================ */
|
|
44
|
+
|
|
45
|
+
.ContextMenuItem,
|
|
46
|
+
.ContextMenuCheckboxItem,
|
|
47
|
+
.ContextMenuRadioItem,
|
|
48
|
+
.ContextMenuSubmenuTrigger {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: var(--sl-item-gap);
|
|
52
|
+
padding-block: var(--sl-item-padding-block);
|
|
53
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
54
|
+
border-radius: var(--sl-item-radius);
|
|
55
|
+
color: var(--sl-item-color);
|
|
56
|
+
cursor: default;
|
|
57
|
+
user-select: none;
|
|
58
|
+
outline: none;
|
|
59
|
+
transition: var(--sl-item-transition);
|
|
60
|
+
font-family: var(--sl-font-base-font-family);
|
|
61
|
+
font-size: var(--sl-font-base-font-size);
|
|
62
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
63
|
+
line-height: var(--sl-font-base-line-height);
|
|
64
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
65
|
+
padding-block: var(--sl-item-padding-block-dense);
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
list-style: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.ContextMenuItem:hover,
|
|
71
|
+
.ContextMenuCheckboxItem:hover,
|
|
72
|
+
.ContextMenuRadioItem:hover,
|
|
73
|
+
.ContextMenuSubmenuTrigger:hover,
|
|
74
|
+
.ContextMenuItem[data-highlighted],
|
|
75
|
+
.ContextMenuCheckboxItem[data-highlighted],
|
|
76
|
+
.ContextMenuRadioItem[data-highlighted],
|
|
77
|
+
.ContextMenuSubmenuTrigger[data-highlighted] {
|
|
78
|
+
background: var(--sl-item-background-hover);
|
|
79
|
+
color: var(--sl-item-color-hover);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ContextMenuItem[data-disabled],
|
|
83
|
+
.ContextMenuCheckboxItem[data-disabled],
|
|
84
|
+
.ContextMenuRadioItem[data-disabled],
|
|
85
|
+
.ContextMenuSubmenuTrigger[data-disabled] {
|
|
86
|
+
color: var(--sl-item-color-disabled);
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
opacity: var(--sl-item-opacity-disabled);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* ============================================
|
|
92
|
+
CHECKBOX & RADIO ITEM INDICATORS
|
|
93
|
+
============================================ */
|
|
94
|
+
|
|
95
|
+
.ContextMenuCheckboxItemIndicator,
|
|
96
|
+
.ContextMenuRadioItemIndicator {
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
width: var(--sl-item-indicator-size);
|
|
102
|
+
height: var(--sl-item-indicator-size);
|
|
103
|
+
color: var(--sl-item-indicator-color);
|
|
104
|
+
line-height: 1;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.ContextMenuCheckboxItemIndicatorIcon,
|
|
108
|
+
.ContextMenuRadioItemIndicatorIcon {
|
|
109
|
+
font-size: var(--sl-item-indicator-size);
|
|
110
|
+
line-height: 1;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* Unchecked radios show an empty circle; it hides once the item's checked indicator appears */
|
|
114
|
+
.ContextMenuRadioItem:has(.ContextMenuRadioItemIndicator:not([data-unchecked])) [data-unchecked] {
|
|
115
|
+
display: none;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/* ============================================
|
|
119
|
+
GROUP, GROUP LABEL, SEPARATOR
|
|
120
|
+
============================================ */
|
|
121
|
+
|
|
122
|
+
.ContextMenuGroup {
|
|
123
|
+
padding: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.ContextMenuGroupLabel {
|
|
127
|
+
font-family: var(--sl-font-condense-subtitle-label-font-family);
|
|
128
|
+
font-size: var(--sl-font-condense-subtitle-label-font-size);
|
|
129
|
+
font-weight: var(--sl-font-condense-subtitle-label-font-weight);
|
|
130
|
+
line-height: var(--sl-font-condense-subtitle-label-line-height);
|
|
131
|
+
letter-spacing: var(--sl-font-condense-subtitle-label-letter-spacing);
|
|
132
|
+
text-transform: var(--sl-font-condense-subtitle-label-text-transform);
|
|
133
|
+
padding-block: var(--sl-popup-group-label-padding-top) var(--sl-popup-group-label-padding-bottom);
|
|
134
|
+
padding-inline: var(--sl-item-padding-inline);
|
|
135
|
+
color: var(--sl-text-secondary);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.ContextMenuSeparator {
|
|
139
|
+
height: var(--sl-stroke-default);
|
|
140
|
+
margin-block: var(--sl-popup-separator-spacing);
|
|
141
|
+
border: none;
|
|
142
|
+
background: var(--sl-popup-separator-color);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* ============================================
|
|
146
|
+
SUBMENU TRIGGER ARROW
|
|
147
|
+
============================================ */
|
|
148
|
+
|
|
149
|
+
.ContextMenuSubmenuTrigger::after {
|
|
150
|
+
content: '→';
|
|
151
|
+
margin-left: auto;
|
|
152
|
+
color: var(--sl-text-tertiary);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* ============================================
|
|
156
|
+
ARROW
|
|
157
|
+
============================================ */
|
|
158
|
+
|
|
159
|
+
.ContextMenuArrow {
|
|
160
|
+
width: var(--sl-space-2-5);
|
|
161
|
+
height: var(--sl-space-2-5);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.ContextMenuArrow > svg {
|
|
165
|
+
fill: var(--sl-popup-arrow-fill);
|
|
166
|
+
stroke: var(--sl-popup-arrow-stroke);
|
|
167
|
+
stroke-width: var(--sl-stroke-default);
|
|
168
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Dialog and Alert dialog - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* Both are centered modals built from the modal concept (tokens/semantic/modal.json):
|
|
5
|
+
* the modal-surface and modal-backdrop patterns, the maximize-xl heading and base
|
|
6
|
+
* description. Alert dialog shares every rule here; AlertDialog.css adds nothing of
|
|
7
|
+
* its own. Action buttons are plain .Button elements, so they follow the emphasis levels.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* Backdrop */
|
|
11
|
+
.DialogBackdrop,
|
|
12
|
+
.AlertDialogBackdrop {
|
|
13
|
+
position: fixed;
|
|
14
|
+
inset: 0;
|
|
15
|
+
z-index: var(--sl-modal-backdrop-z-index);
|
|
16
|
+
background: var(--sl-modal-backdrop);
|
|
17
|
+
transition: opacity var(--sl-modal-animation-duration) var(--sl-modal-animation-easing);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.DialogBackdrop[data-starting-style],
|
|
21
|
+
.DialogBackdrop[data-ending-style],
|
|
22
|
+
.AlertDialogBackdrop[data-starting-style],
|
|
23
|
+
.AlertDialogBackdrop[data-ending-style] {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Popup: centered, growing from just under full size as it opens. */
|
|
28
|
+
.DialogPopup,
|
|
29
|
+
.AlertDialogPopup {
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: var(--sl-modal-gap);
|
|
34
|
+
padding: var(--sl-modal-padding);
|
|
35
|
+
background: var(--sl-modal-background);
|
|
36
|
+
border: var(--sl-modal-border-width) solid var(--sl-modal-border-color);
|
|
37
|
+
border-radius: var(--sl-modal-radius);
|
|
38
|
+
box-shadow: var(--sl-modal-shadow);
|
|
39
|
+
position: fixed;
|
|
40
|
+
top: 50%;
|
|
41
|
+
left: 50%;
|
|
42
|
+
z-index: var(--sl-modal-z-index);
|
|
43
|
+
width: var(--sl-modal-width);
|
|
44
|
+
max-width: var(--sl-modal-max-width);
|
|
45
|
+
max-height: var(--sl-modal-max-height);
|
|
46
|
+
transform: translate(-50%, -50%);
|
|
47
|
+
outline: none;
|
|
48
|
+
transition:
|
|
49
|
+
opacity var(--sl-modal-animation-duration) var(--sl-modal-animation-easing),
|
|
50
|
+
transform var(--sl-modal-animation-duration) var(--sl-modal-animation-easing);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.DialogPopup[data-starting-style],
|
|
54
|
+
.DialogPopup[data-ending-style],
|
|
55
|
+
.AlertDialogPopup[data-starting-style],
|
|
56
|
+
.AlertDialogPopup[data-ending-style] {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
transform: translate(-50%, -48%) scale(var(--sl-modal-scale-closed));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/* Close button: the X in the corner. */
|
|
62
|
+
.DialogClose {
|
|
63
|
+
display: flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
flex-shrink: 0;
|
|
67
|
+
width: var(--sl-icon-button-size);
|
|
68
|
+
height: var(--sl-icon-button-size);
|
|
69
|
+
padding: 0;
|
|
70
|
+
border: none;
|
|
71
|
+
border-radius: var(--sl-icon-button-radius);
|
|
72
|
+
background: transparent;
|
|
73
|
+
color: var(--sl-icon-button-color);
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
outline: none;
|
|
76
|
+
transition: var(--sl-icon-button-transition);
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: var(--sl-icon-button-inset);
|
|
79
|
+
right: var(--sl-icon-button-inset);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.DialogClose:hover {
|
|
83
|
+
background: var(--sl-icon-button-background-hover);
|
|
84
|
+
color: var(--sl-icon-button-color-hover);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.DialogClose:focus-visible {
|
|
88
|
+
outline: var(--sl-focus-outline);
|
|
89
|
+
outline-offset: var(--sl-focus-outline-offset-inset);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/* Title */
|
|
93
|
+
.DialogTitle,
|
|
94
|
+
.AlertDialogTitle {
|
|
95
|
+
font-family: var(--sl-font-maximize-xl-font-family);
|
|
96
|
+
font-size: var(--sl-font-maximize-xl-font-size);
|
|
97
|
+
font-weight: var(--sl-font-maximize-xl-font-weight);
|
|
98
|
+
line-height: var(--sl-font-maximize-xl-line-height);
|
|
99
|
+
letter-spacing: var(--sl-font-maximize-xl-letter-spacing);
|
|
100
|
+
color: var(--sl-modal-title-color);
|
|
101
|
+
margin: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Description */
|
|
105
|
+
.DialogDescription,
|
|
106
|
+
.AlertDialogDescription {
|
|
107
|
+
font-family: var(--sl-font-base-font-family);
|
|
108
|
+
font-size: var(--sl-font-base-font-size);
|
|
109
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
110
|
+
line-height: var(--sl-font-base-line-height);
|
|
111
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
112
|
+
color: var(--sl-modal-description-color);
|
|
113
|
+
margin: 0;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/* Content: scrolls when it is taller than the dialog, with room for the scrollbar. */
|
|
117
|
+
.DialogContent {
|
|
118
|
+
flex: 1;
|
|
119
|
+
overflow-y: auto;
|
|
120
|
+
margin-block: var(--sl-modal-gap);
|
|
121
|
+
padding-right: var(--sl-space-2);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.DialogContent p {
|
|
125
|
+
margin: 0 0 var(--sl-modal-gap) 0;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.DialogContent p:last-child {
|
|
129
|
+
margin-bottom: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* A form inside a dialog keeps the dialog's rhythm. */
|
|
133
|
+
.DialogPopup .Form {
|
|
134
|
+
gap: var(--sl-modal-gap);
|
|
135
|
+
margin-block: var(--sl-modal-gap);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Actions */
|
|
139
|
+
.DialogActions,
|
|
140
|
+
.AlertDialogActions {
|
|
141
|
+
display: flex;
|
|
142
|
+
justify-content: flex-end;
|
|
143
|
+
gap: var(--sl-modal-actions-gap);
|
|
144
|
+
margin-top: var(--sl-modal-actions-spacing);
|
|
145
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Drawer - a panel that slides in from an edge and can be swiped away.
|
|
3
|
+
The surface, scrim, heading and motion are the modal concept's (--sl-modal-*), so a
|
|
4
|
+
drawer reads as a dialog's sibling; only its size and grab bar are its own
|
|
5
|
+
(--sl-drawer-*). Base UI supplies the swipe through
|
|
6
|
+
--drawer-swipe-movement-x/y and data-swipe-direction on the popup. */
|
|
7
|
+
|
|
8
|
+
.DrawerBackdrop {
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset: 0;
|
|
11
|
+
z-index: var(--sl-modal-backdrop-z-index);
|
|
12
|
+
background: var(--sl-modal-backdrop);
|
|
13
|
+
transition: opacity var(--sl-modal-animation-duration) var(--sl-modal-animation-easing);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.DrawerBackdrop[data-starting-style],
|
|
17
|
+
.DrawerBackdrop[data-ending-style] {
|
|
18
|
+
opacity: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.DrawerViewport {
|
|
22
|
+
position: fixed;
|
|
23
|
+
inset: 0;
|
|
24
|
+
z-index: var(--sl-modal-z-index);
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.DrawerPopup {
|
|
29
|
+
--drawer-slide: translateY(100%);
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: var(--sl-modal-gap);
|
|
34
|
+
padding: var(--sl-modal-padding);
|
|
35
|
+
background: var(--sl-modal-background);
|
|
36
|
+
border: var(--sl-modal-border-width) solid var(--sl-modal-border-color);
|
|
37
|
+
border-radius: var(--sl-modal-radius);
|
|
38
|
+
box-shadow: var(--sl-modal-shadow);
|
|
39
|
+
position: fixed;
|
|
40
|
+
overflow-y: auto;
|
|
41
|
+
overscroll-behavior: contain;
|
|
42
|
+
pointer-events: auto;
|
|
43
|
+
transform: translate(var(--drawer-swipe-movement-x, 0px), var(--drawer-swipe-movement-y, 0px));
|
|
44
|
+
transition: transform calc(var(--sl-modal-animation-duration) * var(--drawer-swipe-strength, 1)) var(--sl-modal-animation-easing);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Bottom (the default): full width, rounded on top, with a grab bar. */
|
|
48
|
+
.DrawerPopup,
|
|
49
|
+
.DrawerPopup[data-swipe-direction='down'] {
|
|
50
|
+
inset: auto 0 0 0;
|
|
51
|
+
max-height: var(--sl-drawer-popup-max-size);
|
|
52
|
+
border-bottom: 0;
|
|
53
|
+
border-radius: var(--sl-modal-radius) var(--sl-modal-radius) 0 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.DrawerPopup[data-swipe-direction='down']::before,
|
|
57
|
+
.DrawerPopup:not([data-swipe-direction])::before {
|
|
58
|
+
content: '';
|
|
59
|
+
align-self: center;
|
|
60
|
+
flex: none;
|
|
61
|
+
width: var(--sl-drawer-handle-width);
|
|
62
|
+
height: var(--sl-drawer-handle-height);
|
|
63
|
+
border-radius: var(--sl-radius-pill);
|
|
64
|
+
background: var(--sl-drawer-handle-color);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.DrawerPopup[data-swipe-direction='up'] {
|
|
68
|
+
--drawer-slide: translateY(-100%);
|
|
69
|
+
inset: 0 0 auto 0;
|
|
70
|
+
max-height: var(--sl-drawer-popup-max-size);
|
|
71
|
+
border-top: 0;
|
|
72
|
+
border-radius: 0 0 var(--sl-modal-radius) var(--sl-modal-radius);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.DrawerPopup[data-swipe-direction='right'] {
|
|
76
|
+
--drawer-slide: translateX(100%);
|
|
77
|
+
inset: 0 0 0 auto;
|
|
78
|
+
width: var(--sl-drawer-popup-size);
|
|
79
|
+
max-height: none;
|
|
80
|
+
border-right: 0;
|
|
81
|
+
border-radius: var(--sl-modal-radius) 0 0 var(--sl-modal-radius);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.DrawerPopup[data-swipe-direction='left'] {
|
|
85
|
+
--drawer-slide: translateX(-100%);
|
|
86
|
+
inset: 0 auto 0 0;
|
|
87
|
+
width: var(--sl-drawer-popup-size);
|
|
88
|
+
max-height: none;
|
|
89
|
+
border-left: 0;
|
|
90
|
+
border-radius: 0 var(--sl-modal-radius) var(--sl-modal-radius) 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.DrawerPopup[data-starting-style],
|
|
94
|
+
.DrawerPopup[data-ending-style] {
|
|
95
|
+
transform: var(--drawer-slide);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Follow the finger while swiping. */
|
|
99
|
+
.DrawerPopup[data-swiping] {
|
|
100
|
+
transition: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.DrawerContent {
|
|
104
|
+
flex: 1;
|
|
105
|
+
min-height: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.DrawerTitle {
|
|
109
|
+
font-family: var(--sl-font-maximize-xl-font-family);
|
|
110
|
+
font-size: var(--sl-font-maximize-xl-font-size);
|
|
111
|
+
font-weight: var(--sl-font-maximize-xl-font-weight);
|
|
112
|
+
line-height: var(--sl-font-maximize-xl-line-height);
|
|
113
|
+
letter-spacing: var(--sl-font-maximize-xl-letter-spacing);
|
|
114
|
+
margin: 0;
|
|
115
|
+
color: var(--sl-modal-title-color);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.DrawerDescription {
|
|
119
|
+
font-family: var(--sl-font-base-font-family);
|
|
120
|
+
font-size: var(--sl-font-base-font-size);
|
|
121
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
122
|
+
line-height: var(--sl-font-base-line-height);
|
|
123
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
124
|
+
margin: 0;
|
|
125
|
+
color: var(--sl-modal-description-color);
|
|
126
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Field - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* Label, control, description and error. No component tokens: spacing is the field
|
|
5
|
+
* concept (tokens/semantic/field.json) and text is whole text styles.
|
|
6
|
+
* Field.Control is styled with Input (Input.css). Number field's label, description and
|
|
7
|
+
* error are the same parts, so they share these rules.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.FieldRoot {
|
|
11
|
+
display: flex;
|
|
12
|
+
flex-direction: column;
|
|
13
|
+
gap: var(--sl-field-gap);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.FieldRoot[data-disabled] {
|
|
17
|
+
opacity: var(--sl-field-opacity-disabled);
|
|
18
|
+
pointer-events: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.FieldLabel,
|
|
22
|
+
.NumberFieldLabel {
|
|
23
|
+
font-family: var(--sl-font-base-label-font-family);
|
|
24
|
+
font-size: var(--sl-font-base-label-font-size);
|
|
25
|
+
font-weight: var(--sl-font-base-label-font-weight);
|
|
26
|
+
line-height: var(--sl-font-base-label-line-height);
|
|
27
|
+
letter-spacing: var(--sl-font-base-label-letter-spacing);
|
|
28
|
+
display: block;
|
|
29
|
+
margin-bottom: var(--sl-field-label-spacing);
|
|
30
|
+
color: var(--sl-text-primary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.FieldDescription,
|
|
34
|
+
.NumberFieldDescription {
|
|
35
|
+
font-family: var(--sl-font-condense-font-family);
|
|
36
|
+
font-size: var(--sl-font-condense-font-size);
|
|
37
|
+
font-weight: var(--sl-font-condense-font-weight);
|
|
38
|
+
line-height: var(--sl-font-condense-line-height);
|
|
39
|
+
letter-spacing: var(--sl-font-condense-letter-spacing);
|
|
40
|
+
margin: var(--sl-field-message-spacing) 0 0;
|
|
41
|
+
color: var(--sl-text-secondary);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.FieldError,
|
|
45
|
+
.NumberFieldError {
|
|
46
|
+
font-family: var(--sl-font-base-label-font-family);
|
|
47
|
+
font-size: var(--sl-font-base-label-font-size);
|
|
48
|
+
font-weight: var(--sl-font-base-label-font-weight);
|
|
49
|
+
line-height: var(--sl-font-base-label-line-height);
|
|
50
|
+
letter-spacing: var(--sl-font-base-label-letter-spacing);
|
|
51
|
+
margin: var(--sl-field-message-spacing) 0 0;
|
|
52
|
+
color: var(--sl-status-error);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/* Multi-line Field.Control */
|
|
56
|
+
textarea.FieldControl {
|
|
57
|
+
resize: vertical;
|
|
58
|
+
min-height: 80px;
|
|
59
|
+
height: auto;
|
|
60
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Fieldset - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens: a titled group of fields, spaced by the stack gaps, with
|
|
5
|
+
* whole text styles.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.Fieldset {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: var(--sl-gap-stack-lg);
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
border: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.Fieldset[disabled] {
|
|
18
|
+
opacity: var(--sl-field-opacity-disabled);
|
|
19
|
+
pointer-events: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.FieldsetLegend {
|
|
23
|
+
font-family: var(--sl-font-maximize-lg-font-family);
|
|
24
|
+
font-size: var(--sl-font-maximize-lg-font-size);
|
|
25
|
+
font-weight: var(--sl-font-maximize-lg-font-weight);
|
|
26
|
+
line-height: var(--sl-font-maximize-lg-line-height);
|
|
27
|
+
letter-spacing: var(--sl-font-maximize-lg-letter-spacing);
|
|
28
|
+
margin-bottom: var(--sl-space-block-sm);
|
|
29
|
+
padding: 0;
|
|
30
|
+
color: var(--sl-text-primary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.FieldsetDescription {
|
|
34
|
+
font-family: var(--sl-font-condense-font-family);
|
|
35
|
+
font-size: var(--sl-font-condense-font-size);
|
|
36
|
+
font-weight: var(--sl-font-condense-font-weight);
|
|
37
|
+
line-height: var(--sl-font-condense-line-height);
|
|
38
|
+
letter-spacing: var(--sl-font-condense-letter-spacing);
|
|
39
|
+
margin-bottom: var(--sl-space-block-sm);
|
|
40
|
+
color: var(--sl-text-secondary);
|
|
41
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Form - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens: fields stack with the large block space, and the action
|
|
5
|
+
* buttons sit in a row after them.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.Form {
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: var(--sl-space-block-lg);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.FormActions {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: flex-start;
|
|
17
|
+
gap: var(--sl-space-3);
|
|
18
|
+
margin-top: var(--sl-space-block-md);
|
|
19
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.1.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* Input - Mojave Theme
|
|
3
|
+
*
|
|
4
|
+
* No component tokens: the look is the field concept (tokens/semantic/field.json),
|
|
5
|
+
* sizes are control.*, and text is a whole text style. Field.Control is the same
|
|
6
|
+
* control inside a Field, and Number field's, Autocomplete's and Combobox's inputs are the same
|
|
7
|
+
* control with buttons at the end, and an OTP field's slots are the same control cut into
|
|
8
|
+
* squares (OTPField.css sizes them), so they share these rules.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* ============================================
|
|
12
|
+
BASE INPUT
|
|
13
|
+
============================================ */
|
|
14
|
+
|
|
15
|
+
.Input,
|
|
16
|
+
.FieldControl,
|
|
17
|
+
.NumberFieldInput,
|
|
18
|
+
.AutocompleteInput,
|
|
19
|
+
.ComboboxInput,
|
|
20
|
+
.OTPFieldInput {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
color: var(--sl-field-color);
|
|
23
|
+
background: var(--sl-field-background);
|
|
24
|
+
border: var(--sl-field-border-width) solid var(--sl-field-border-color);
|
|
25
|
+
border-radius: var(--sl-field-radius);
|
|
26
|
+
transition: var(--sl-field-transition);
|
|
27
|
+
outline: none;
|
|
28
|
+
font-family: var(--sl-font-base-font-family);
|
|
29
|
+
font-size: var(--sl-font-base-font-size);
|
|
30
|
+
font-weight: var(--sl-font-base-font-weight);
|
|
31
|
+
line-height: var(--sl-font-base-line-height);
|
|
32
|
+
letter-spacing: var(--sl-font-base-letter-spacing);
|
|
33
|
+
width: 100%;
|
|
34
|
+
height: var(--sl-control-height-md);
|
|
35
|
+
padding-block: var(--sl-control-padding-block);
|
|
36
|
+
padding-inline: var(--sl-control-padding-inline);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.Input::placeholder,
|
|
40
|
+
.FieldControl::placeholder,
|
|
41
|
+
.NumberFieldInput::placeholder,
|
|
42
|
+
.AutocompleteInput::placeholder,
|
|
43
|
+
.ComboboxInput::placeholder,
|
|
44
|
+
.OTPFieldInput::placeholder {
|
|
45
|
+
color: var(--sl-field-placeholder-color);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.Input:hover:not(:disabled):not(:focus),
|
|
49
|
+
.FieldControl:hover:not(:disabled):not(:focus),
|
|
50
|
+
.NumberFieldInput:hover:not(:disabled):not(:focus),
|
|
51
|
+
.AutocompleteInput:hover:not(:disabled):not(:focus),
|
|
52
|
+
.ComboboxInput:hover:not(:disabled):not(:focus),
|
|
53
|
+
.OTPFieldInput:hover:not(:disabled):not(:focus) {
|
|
54
|
+
border-color: var(--sl-field-border-color-hover);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.Input:focus,
|
|
58
|
+
.FieldControl:focus,
|
|
59
|
+
.NumberFieldInput:focus,
|
|
60
|
+
.AutocompleteInput:focus,
|
|
61
|
+
.ComboboxInput:focus,
|
|
62
|
+
.OTPFieldInput:focus {
|
|
63
|
+
border-color: var(--sl-field-border-color-focus);
|
|
64
|
+
box-shadow: var(--sl-field-shadow-focus);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.Input:disabled,
|
|
68
|
+
.FieldControl:disabled,
|
|
69
|
+
.NumberFieldInput:disabled,
|
|
70
|
+
.AutocompleteInput:disabled,
|
|
71
|
+
.ComboboxInput:disabled,
|
|
72
|
+
.OTPFieldInput:disabled {
|
|
73
|
+
background: var(--sl-field-background-disabled);
|
|
74
|
+
color: var(--sl-field-color-disabled);
|
|
75
|
+
cursor: not-allowed;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* ============================================
|
|
79
|
+
ERROR STATE
|
|
80
|
+
============================================ */
|
|
81
|
+
|
|
82
|
+
.Input[data-error],
|
|
83
|
+
.Input[aria-invalid='true'],
|
|
84
|
+
.FieldRoot[data-invalid] .FieldControl,
|
|
85
|
+
.FieldControl[aria-invalid='true'],
|
|
86
|
+
.NumberFieldRoot[data-invalid] .NumberFieldInput,
|
|
87
|
+
.OTPFieldInput[data-invalid] {
|
|
88
|
+
border-color: var(--sl-field-border-color-error);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.Input[data-error]:focus,
|
|
92
|
+
.Input[aria-invalid='true']:focus,
|
|
93
|
+
.FieldRoot[data-invalid] .FieldControl:focus,
|
|
94
|
+
.FieldControl[aria-invalid='true']:focus,
|
|
95
|
+
.NumberFieldRoot[data-invalid] .NumberFieldInput:focus,
|
|
96
|
+
.OTPFieldInput[data-invalid]:focus {
|
|
97
|
+
border-color: var(--sl-field-border-color-error);
|
|
98
|
+
box-shadow: var(--sl-field-shadow-focus-error);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/* ============================================
|
|
102
|
+
SIZE VARIANTS: control size plus the text tier of the same name
|
|
103
|
+
============================================ */
|
|
104
|
+
|
|
105
|
+
.Input[data-size='xs'] {
|
|
106
|
+
font-family: var(--sl-font-minimize-font-family);
|
|
107
|
+
font-size: var(--sl-font-minimize-font-size);
|
|
108
|
+
font-weight: var(--sl-font-minimize-font-weight);
|
|
109
|
+
line-height: var(--sl-font-minimize-line-height);
|
|
110
|
+
letter-spacing: var(--sl-font-minimize-letter-spacing);
|
|
111
|
+
height: var(--sl-control-height-xs);
|
|
112
|
+
padding-block: var(--sl-control-padding-block-xs);
|
|
113
|
+
padding-inline: var(--sl-control-padding-inline-xs);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.Input[data-size='sm'] {
|
|
117
|
+
font-family: var(--sl-font-condense-font-family);
|
|
118
|
+
font-size: var(--sl-font-condense-font-size);
|
|
119
|
+
font-weight: var(--sl-font-condense-font-weight);
|
|
120
|
+
line-height: var(--sl-font-condense-line-height);
|
|
121
|
+
letter-spacing: var(--sl-font-condense-letter-spacing);
|
|
122
|
+
height: var(--sl-control-height-sm);
|
|
123
|
+
padding-block: var(--sl-control-padding-block-sm);
|
|
124
|
+
padding-inline: var(--sl-control-padding-inline-sm);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.Input[data-size='lg'] {
|
|
128
|
+
font-family: var(--sl-font-magnify-font-family);
|
|
129
|
+
font-size: var(--sl-font-magnify-font-size);
|
|
130
|
+
font-weight: var(--sl-font-magnify-font-weight);
|
|
131
|
+
line-height: var(--sl-font-magnify-line-height);
|
|
132
|
+
letter-spacing: var(--sl-font-magnify-letter-spacing);
|
|
133
|
+
height: var(--sl-control-height-lg);
|
|
134
|
+
padding-block: var(--sl-control-padding-block-lg);
|
|
135
|
+
padding-inline: var(--sl-control-padding-inline-lg);
|
|
136
|
+
}
|