@scattered-light/loomiere-base-ui 0.6.1 → 0.7.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 +135 -5
- package/dist/chunk-JUUPOOQQ.js +3723 -0
- package/dist/chunk-JUUPOOQQ.js.map +1 -0
- package/dist/chunk-M7KJASGK.js +802 -0
- package/dist/chunk-M7KJASGK.js.map +1 -0
- package/dist/chunk-Y2CPBMFJ.js +147 -0
- package/dist/chunk-Y2CPBMFJ.js.map +1 -0
- package/dist/custom/collection/index.d.ts +534 -0
- package/dist/custom/collection/index.js +1471 -0
- package/dist/custom/collection/index.js.map +1 -0
- package/dist/custom/index.d.ts +5 -0
- package/dist/custom/index.js +4 -0
- package/dist/custom/index.js.map +1 -0
- package/dist/design-system/components/Badge/README.md +35 -0
- package/dist/design-system/components/Badge/preview.html +19 -0
- package/dist/design-system/components/Collection/README.md +14 -0
- package/dist/design-system/components/CollectionPagination/README.md +15 -0
- package/dist/design-system/components/CollectionToolbar/README.md +24 -0
- package/dist/design-system/components/DataList/README.md +39 -0
- package/dist/design-system/components/DataList/preview.html +475 -0
- package/dist/design-system/components/DataTable/README.md +41 -0
- package/dist/design-system/components/DataTable/preview.html +475 -0
- package/dist/design-system/components/DatePicker/README.md +55 -0
- package/dist/design-system/components/DatePicker/preview.html +475 -0
- package/dist/design-system/components/EditableList/README.md +33 -0
- package/dist/design-system/components/EditableList/preview.html +475 -0
- package/dist/design-system/components/EmptyState/README.md +60 -0
- package/dist/design-system/components/EmptyState/preview.html +475 -0
- package/dist/design-system/components/ListDetail/README.md +43 -0
- package/dist/design-system/components/ListDetail/preview.html +475 -0
- package/dist/design-system/components/MoneyField/README.md +52 -0
- package/dist/design-system/components/MoneyField/preview.html +475 -0
- package/dist/design-system/components/Splitter/README.md +42 -0
- package/dist/design-system/components/Splitter/preview.html +475 -0
- package/dist/design-system/components/Table/README.md +2 -1
- package/dist/design-system/components/Table/preview.html +1 -1
- package/dist/design-system/components/bundle.js +7 -5
- package/dist/design-system/components/index.d.ts +3 -21
- package/dist/design-system/components/styles.css +2266 -186
- package/dist/index-ChJXlxzq.d.ts +809 -0
- package/dist/index.d.ts +3 -21
- package/dist/index.js +176 -891
- package/dist/index.js.map +1 -1
- package/dist/styles/components/Accordion.css +1 -1
- package/dist/styles/components/AlertDialog.css +1 -1
- package/dist/styles/components/Autocomplete.css +1 -1
- package/dist/styles/components/Avatar.css +1 -1
- package/dist/styles/components/Button.css +1 -1
- package/dist/styles/components/Checkbox.css +1 -1
- package/dist/styles/components/CheckboxGroup.css +1 -1
- package/dist/styles/components/Collapsible.css +1 -1
- package/dist/styles/components/Combobox.css +1 -1
- package/dist/styles/components/ContextMenu.css +1 -1
- package/dist/styles/components/Dialog.css +1 -1
- package/dist/styles/components/Drawer.css +1 -1
- package/dist/styles/components/Field.css +1 -1
- package/dist/styles/components/Fieldset.css +1 -1
- package/dist/styles/components/Form.css +1 -1
- package/dist/styles/components/Input.css +1 -1
- package/dist/styles/components/Menu.css +1 -1
- package/dist/styles/components/Menubar.css +1 -1
- package/dist/styles/components/Meter.css +1 -1
- package/dist/styles/components/NavigationMenu.css +1 -1
- package/dist/styles/components/NumberField.css +1 -1
- package/dist/styles/components/OTPField.css +1 -1
- package/dist/styles/components/Popover.css +1 -1
- package/dist/styles/components/PreviewCard.css +1 -1
- package/dist/styles/components/Progress.css +1 -1
- package/dist/styles/components/Radio.css +1 -1
- package/dist/styles/components/ScrollArea.css +1 -1
- package/dist/styles/components/Select.css +1 -1
- package/dist/styles/components/Separator.css +1 -1
- package/dist/styles/components/Slider.css +1 -1
- package/dist/styles/components/Switch.css +1 -1
- package/dist/styles/components/Tabs.css +1 -1
- package/dist/styles/components/Toast.css +1 -1
- package/dist/styles/components/Toggle.css +1 -1
- package/dist/styles/components/ToggleGroup.css +1 -1
- package/dist/styles/components/Toolbar.css +1 -1
- package/dist/styles/components/Tooltip.css +1 -1
- package/dist/styles/custom/Badge.css +104 -0
- package/dist/styles/custom/Collection.css +15 -0
- package/dist/styles/custom/CollectionPagination.css +24 -0
- package/dist/styles/custom/CollectionToolbar.css +57 -0
- package/dist/styles/custom/DataList.css +123 -0
- package/dist/styles/custom/DataTable.css +120 -0
- package/dist/styles/custom/DatePicker.css +572 -0
- package/dist/styles/custom/EditableList.css +98 -0
- package/dist/styles/custom/EmptyState.css +255 -0
- package/dist/styles/custom/ListDetail.css +126 -0
- package/dist/styles/custom/MoneyField.css +344 -0
- package/dist/styles/custom/Splitter.css +207 -0
- package/dist/styles/{components → custom}/Table.css +31 -4
- package/dist/styles/index.css +12 -2
- package/dist/styles/reset/accessibility.css +1 -1
- package/dist/styles/reset/reset-accessibility.css +1 -1
- package/dist/styles/reset/reset-tailwind.css +1 -1
- package/dist/styles/reset/reset.css +1 -1
- package/dist/styles/tailwind.css +12 -2
- package/package.json +35 -7
|
@@ -0,0 +1,572 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.7.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/*
|
|
3
|
+
* DatePicker: a field that opens a calendar for one date or a period.
|
|
4
|
+
* Not a Base UI part. The popup is Popover on a wide viewport and Drawer
|
|
5
|
+
* below the md breakpoint. Calendar is the grid on its own; DatePresets is
|
|
6
|
+
* the quick-selection list. Both are usable without the field.
|
|
7
|
+
*
|
|
8
|
+
* Concepts: calendar (day cell, range band, today ring), item (preset rows),
|
|
9
|
+
* field (the trigger), emphasis bold (the selected day, via the default
|
|
10
|
+
* emphasis level, so it follows data-color).
|
|
11
|
+
*
|
|
12
|
+
* Text styles, one whole style each: day numbers are trigger-condense and
|
|
13
|
+
* selected days are selected-condense, weekday initials are eyebrow-minimize,
|
|
14
|
+
* the month title is subtitle-base, a preset label is trigger-condense with
|
|
15
|
+
* its hint in body-minimize, and the footer summary is body-condense.
|
|
16
|
+
* The trigger text is text-body-base, the same style as Input.
|
|
17
|
+
*
|
|
18
|
+
* How many months are on screen is measured on the panel (40rem two months,
|
|
19
|
+
* 32rem one, and one month in a drawer or for a coarse pointer under 48rem).
|
|
20
|
+
* Those lengths are layout, not tokens. CSS only switches the preset row and
|
|
21
|
+
* the sticky footer, from data-layout and data-compact.
|
|
22
|
+
*
|
|
23
|
+
* Keyboard (WAI-ARIA APG date picker dialog): Left/Right one day (they swap
|
|
24
|
+
* in RTL), Up/Down one week, Home/End the week, PageUp/PageDown one month,
|
|
25
|
+
* Shift+PageUp/PageDown one year, Enter/Space pick. With two months showing,
|
|
26
|
+
* paging forward lands the focused day in the last column, so the view shifts
|
|
27
|
+
* by one month. Delete or Backspace clears the draft. Escape drops a
|
|
28
|
+
* half-picked range first, then closes. Escape in the month or year chooser
|
|
29
|
+
* returns to the days. A range is a start click, then an end click; an end
|
|
30
|
+
* before the start swaps. Hover or focus previews the band until the end is
|
|
31
|
+
* chosen. Direction is read when the picker opens; a dir change while it is
|
|
32
|
+
* open is not picked up.
|
|
33
|
+
*
|
|
34
|
+
* Day state: data-selected, data-range-start, data-range-end, data-in-range,
|
|
35
|
+
* data-preview, data-today, data-outside-month, data-disabled, data-focused.
|
|
36
|
+
* aria-selected is only the real value (the day, or the start and end).
|
|
37
|
+
*/
|
|
38
|
+
|
|
39
|
+
/* CALENDAR */
|
|
40
|
+
|
|
41
|
+
.Calendar {
|
|
42
|
+
display: flex;
|
|
43
|
+
flex-direction: column;
|
|
44
|
+
gap: var(--sl-calendar-month-gap);
|
|
45
|
+
min-width: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.DatePickerMonths {
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-wrap: wrap;
|
|
51
|
+
gap: var(--sl-calendar-month-gap);
|
|
52
|
+
min-width: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.DatePickerNav {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
gap: var(--sl-calendar-header-gap);
|
|
59
|
+
flex: 1 0 100%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.DatePickerNav .DatePickerMonthTitle {
|
|
63
|
+
flex: 1 1 auto;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.DatePickerMonth {
|
|
67
|
+
display: flex;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
gap: var(--sl-calendar-header-gap);
|
|
70
|
+
min-width: 0;
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.DatePickerMonthBar {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: space-between;
|
|
78
|
+
gap: var(--sl-calendar-header-gap);
|
|
79
|
+
min-height: var(--sl-control-height-sm);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.DatePickerMonthSpacer {
|
|
83
|
+
inline-size: var(--sl-control-height-sm);
|
|
84
|
+
flex: 0 0 auto;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.DatePickerMonthTitle {
|
|
88
|
+
font-family: var(--sl-font-subtitle-base-font-family);
|
|
89
|
+
font-size: var(--sl-font-subtitle-base-font-size);
|
|
90
|
+
font-weight: var(--sl-font-subtitle-base-font-weight);
|
|
91
|
+
line-height: var(--sl-font-subtitle-base-line-height);
|
|
92
|
+
letter-spacing: var(--sl-font-subtitle-base-letter-spacing);
|
|
93
|
+
outline: none;
|
|
94
|
+
margin: 0;
|
|
95
|
+
padding: var(--sl-space-1) var(--sl-space-2);
|
|
96
|
+
border: 0;
|
|
97
|
+
border-radius: var(--sl-radius-control);
|
|
98
|
+
background: transparent;
|
|
99
|
+
color: var(--sl-text-primary);
|
|
100
|
+
cursor: pointer;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.DatePickerMonthTitle:hover {
|
|
104
|
+
background: var(--sl-item-background-hover);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.DatePickerMonthTitle:focus-visible {
|
|
108
|
+
outline: var(--sl-focus-outline);
|
|
109
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
110
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.CalendarGrid {
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: var(--sl-calendar-grid-gap);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.Calendar,
|
|
120
|
+
.DatePickerPanel {
|
|
121
|
+
--sl-calendar-cell: var(--sl-calendar-day-size);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.DatePickerPanel[data-touch] {
|
|
125
|
+
--sl-calendar-cell: max(var(--sl-calendar-day-size), var(--sl-a11y-min-touch-target));
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (pointer: coarse) {
|
|
129
|
+
.Calendar {
|
|
130
|
+
--sl-calendar-cell: max(var(--sl-calendar-day-size), var(--sl-a11y-min-touch-target));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.CalendarWeek {
|
|
135
|
+
display: grid;
|
|
136
|
+
grid-template-columns: repeat(7, var(--sl-calendar-cell));
|
|
137
|
+
column-gap: 0;
|
|
138
|
+
row-gap: var(--sl-calendar-grid-gap);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.CalendarGrid:has(.CalendarWeekNumber) .CalendarWeek {
|
|
142
|
+
grid-template-columns: auto repeat(7, var(--sl-calendar-cell));
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.CalendarWeekday,
|
|
146
|
+
.CalendarWeekNumber {
|
|
147
|
+
font-family: var(--sl-font-eyebrow-minimize-font-family);
|
|
148
|
+
font-size: var(--sl-font-eyebrow-minimize-font-size);
|
|
149
|
+
font-weight: var(--sl-font-eyebrow-minimize-font-weight);
|
|
150
|
+
line-height: var(--sl-font-eyebrow-minimize-line-height);
|
|
151
|
+
letter-spacing: var(--sl-font-eyebrow-minimize-letter-spacing);
|
|
152
|
+
text-transform: var(--sl-font-eyebrow-minimize-text-transform);
|
|
153
|
+
display: grid;
|
|
154
|
+
place-items: center;
|
|
155
|
+
min-block-size: var(--sl-space-6);
|
|
156
|
+
color: var(--sl-calendar-weekday-color);
|
|
157
|
+
text-decoration: none;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.CalendarWeekNumber {
|
|
161
|
+
padding-inline: var(--sl-space-1);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.CalendarDay {
|
|
165
|
+
font-family: var(--sl-font-trigger-condense-font-family);
|
|
166
|
+
font-size: var(--sl-font-trigger-condense-font-size);
|
|
167
|
+
font-weight: var(--sl-font-trigger-condense-font-weight);
|
|
168
|
+
line-height: var(--sl-font-trigger-condense-line-height);
|
|
169
|
+
letter-spacing: var(--sl-font-trigger-condense-letter-spacing);
|
|
170
|
+
position: relative;
|
|
171
|
+
display: grid;
|
|
172
|
+
place-items: center;
|
|
173
|
+
box-sizing: border-box;
|
|
174
|
+
inline-size: 100%;
|
|
175
|
+
aspect-ratio: 1;
|
|
176
|
+
min-inline-size: 0;
|
|
177
|
+
min-block-size: 0;
|
|
178
|
+
padding: 0;
|
|
179
|
+
border: 0;
|
|
180
|
+
border-radius: var(--sl-calendar-day-radius);
|
|
181
|
+
outline: none;
|
|
182
|
+
background: transparent;
|
|
183
|
+
color: var(--sl-calendar-day-color);
|
|
184
|
+
cursor: pointer;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.CalendarDay:focus-visible {
|
|
188
|
+
outline: var(--sl-focus-outline);
|
|
189
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
190
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.CalendarDay--empty {
|
|
194
|
+
cursor: default;
|
|
195
|
+
pointer-events: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.CalendarDayNumber {
|
|
199
|
+
position: relative;
|
|
200
|
+
z-index: 1;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.CalendarDay:hover:not([data-disabled]):not([data-selected]) {
|
|
204
|
+
background: var(--sl-calendar-day-background-hover);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.CalendarDay[data-outside-month] {
|
|
208
|
+
color: var(--sl-calendar-day-color-outside);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.CalendarDay[data-disabled] {
|
|
212
|
+
color: var(--sl-calendar-day-color-disabled);
|
|
213
|
+
cursor: default;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.CalendarDay[data-selected] {
|
|
217
|
+
font-family: var(--sl-font-selected-condense-font-family);
|
|
218
|
+
font-size: var(--sl-font-selected-condense-font-size);
|
|
219
|
+
font-weight: var(--sl-font-selected-condense-font-weight);
|
|
220
|
+
line-height: var(--sl-font-selected-condense-line-height);
|
|
221
|
+
letter-spacing: var(--sl-font-selected-condense-letter-spacing);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.CalendarDay[data-selected]:not([data-range-start]):not([data-range-end]) {
|
|
225
|
+
background: var(--sl-e-bg);
|
|
226
|
+
color: var(--sl-e-fg);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.CalendarDay[data-range-start],
|
|
230
|
+
.CalendarDay[data-range-end] {
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
background: transparent;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.CalendarDay[data-range-start] .CalendarDayNumber,
|
|
236
|
+
.CalendarDay[data-range-end] .CalendarDayNumber {
|
|
237
|
+
display: grid;
|
|
238
|
+
place-items: center;
|
|
239
|
+
inline-size: 100%;
|
|
240
|
+
block-size: 100%;
|
|
241
|
+
border-radius: var(--sl-calendar-day-radius);
|
|
242
|
+
background: var(--sl-e-bg);
|
|
243
|
+
color: var(--sl-e-fg);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
.CalendarDay[data-in-range],
|
|
247
|
+
.CalendarDay[data-preview]:not([data-selected]) {
|
|
248
|
+
border-radius: 0;
|
|
249
|
+
background: var(--sl-calendar-range-background);
|
|
250
|
+
color: var(--sl-calendar-range-color);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.CalendarDay[data-range-start]::before,
|
|
254
|
+
.CalendarDay[data-range-end]::before {
|
|
255
|
+
content: '';
|
|
256
|
+
position: absolute;
|
|
257
|
+
inset: 0;
|
|
258
|
+
z-index: 0;
|
|
259
|
+
background: linear-gradient(to right, transparent 50%, var(--sl-calendar-range-background) 50%);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.CalendarDay[data-range-end]::before {
|
|
263
|
+
background: linear-gradient(to left, transparent 50%, var(--sl-calendar-range-background) 50%);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
[dir='rtl'] .CalendarDay[data-range-start]::before {
|
|
267
|
+
background: linear-gradient(to left, transparent 50%, var(--sl-calendar-range-background) 50%);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
[dir='rtl'] .CalendarDay[data-range-end]::before {
|
|
271
|
+
background: linear-gradient(to right, transparent 50%, var(--sl-calendar-range-background) 50%);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.CalendarDay[data-range-start][data-range-end]::before {
|
|
275
|
+
content: none;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
.CalendarDay[data-focused] {
|
|
279
|
+
z-index: 1;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.CalendarDay[data-today] .CalendarDayNumber {
|
|
283
|
+
box-shadow: inset 0 0 0 var(--sl-stroke-default) var(--sl-calendar-today-ring);
|
|
284
|
+
border-radius: var(--sl-calendar-day-radius);
|
|
285
|
+
padding-inline: var(--sl-space-1);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/* The selected fill is the bold accent, the same hue as the today ring, so the ring switches to the text color. */
|
|
289
|
+
.CalendarDay[data-today][data-selected] .CalendarDayNumber {
|
|
290
|
+
box-shadow: inset 0 0 0 var(--sl-stroke-default) var(--sl-e-fg);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
[data-theme$='high-contrast'] .CalendarDay[data-in-range],
|
|
294
|
+
[data-theme$='high-contrast'] .CalendarDay[data-preview]:not([data-selected]) {
|
|
295
|
+
box-shadow: inset 0 calc(var(--sl-stroke-default) * -1) 0 var(--sl-border-accent);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.CalendarChooser {
|
|
299
|
+
display: flex;
|
|
300
|
+
flex-direction: column;
|
|
301
|
+
gap: var(--sl-calendar-header-gap);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.CalendarChooserGrid {
|
|
305
|
+
display: grid;
|
|
306
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
307
|
+
gap: var(--sl-calendar-grid-gap);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.CalendarChoice {
|
|
311
|
+
font-family: var(--sl-font-trigger-condense-font-family);
|
|
312
|
+
font-size: var(--sl-font-trigger-condense-font-size);
|
|
313
|
+
font-weight: var(--sl-font-trigger-condense-font-weight);
|
|
314
|
+
line-height: var(--sl-font-trigger-condense-line-height);
|
|
315
|
+
letter-spacing: var(--sl-font-trigger-condense-letter-spacing);
|
|
316
|
+
outline: none;
|
|
317
|
+
min-block-size: var(--sl-control-height-sm);
|
|
318
|
+
padding: var(--sl-space-1) var(--sl-space-2);
|
|
319
|
+
border: 0;
|
|
320
|
+
border-radius: var(--sl-radius-control);
|
|
321
|
+
background: transparent;
|
|
322
|
+
color: var(--sl-text-primary);
|
|
323
|
+
cursor: pointer;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.CalendarChoice:hover:not([aria-disabled='true']) {
|
|
327
|
+
background: var(--sl-item-background-hover);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
.CalendarChoice:focus-visible {
|
|
331
|
+
outline: var(--sl-focus-outline);
|
|
332
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
333
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.CalendarChoice[aria-disabled='true'] {
|
|
337
|
+
color: var(--sl-calendar-day-color-disabled);
|
|
338
|
+
cursor: default;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
/* PRESETS */
|
|
342
|
+
|
|
343
|
+
.DatePickerPresets {
|
|
344
|
+
display: flex;
|
|
345
|
+
flex-direction: column;
|
|
346
|
+
gap: var(--sl-space-1);
|
|
347
|
+
min-width: 0;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
.DatePickerPresets[data-layout='row'] {
|
|
351
|
+
flex-direction: row;
|
|
352
|
+
overflow-x: auto;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.DatePickerPreset {
|
|
356
|
+
font-family: var(--sl-font-trigger-condense-font-family);
|
|
357
|
+
font-size: var(--sl-font-trigger-condense-font-size);
|
|
358
|
+
font-weight: var(--sl-font-trigger-condense-font-weight);
|
|
359
|
+
line-height: var(--sl-font-trigger-condense-line-height);
|
|
360
|
+
letter-spacing: var(--sl-font-trigger-condense-letter-spacing);
|
|
361
|
+
outline: none;
|
|
362
|
+
display: flex;
|
|
363
|
+
flex-direction: column;
|
|
364
|
+
align-items: flex-start;
|
|
365
|
+
gap: var(--sl-space-0-5);
|
|
366
|
+
inline-size: 100%;
|
|
367
|
+
padding: var(--sl-item-padding-block) var(--sl-item-padding-inline);
|
|
368
|
+
border: 0;
|
|
369
|
+
border-radius: var(--sl-item-radius);
|
|
370
|
+
background: transparent;
|
|
371
|
+
color: var(--sl-item-color);
|
|
372
|
+
text-align: start;
|
|
373
|
+
cursor: pointer;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.DatePickerPresets[data-layout='row'] .DatePickerPreset {
|
|
377
|
+
flex-direction: row;
|
|
378
|
+
align-items: baseline;
|
|
379
|
+
inline-size: auto;
|
|
380
|
+
white-space: nowrap;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.DatePickerPreset:hover:not([data-disabled]) {
|
|
384
|
+
background: var(--sl-item-background-hover);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.DatePickerPreset:focus-visible {
|
|
388
|
+
outline: var(--sl-focus-outline);
|
|
389
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
390
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
.DatePickerPreset[data-checked] {
|
|
394
|
+
background: var(--sl-item-background-selected);
|
|
395
|
+
color: var(--sl-item-color-selected);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.DatePickerPreset[data-disabled] {
|
|
399
|
+
color: var(--sl-text-disabled);
|
|
400
|
+
cursor: default;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.DatePickerPresetHint {
|
|
404
|
+
font-family: var(--sl-font-body-minimize-font-family);
|
|
405
|
+
font-size: var(--sl-font-body-minimize-font-size);
|
|
406
|
+
font-weight: var(--sl-font-body-minimize-font-weight);
|
|
407
|
+
line-height: var(--sl-font-body-minimize-line-height);
|
|
408
|
+
letter-spacing: var(--sl-font-body-minimize-letter-spacing);
|
|
409
|
+
color: var(--sl-text-tertiary);
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.DatePickerPreset[data-checked] .DatePickerPresetHint {
|
|
413
|
+
color: var(--sl-item-color-selected);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
/* PICKER */
|
|
417
|
+
|
|
418
|
+
.DatePickerField {
|
|
419
|
+
position: relative;
|
|
420
|
+
display: flex;
|
|
421
|
+
align-items: center;
|
|
422
|
+
min-width: 0;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.DatePickerField .DatePickerTrigger {
|
|
426
|
+
box-sizing: border-box;
|
|
427
|
+
color: var(--sl-field-color);
|
|
428
|
+
background: var(--sl-field-background);
|
|
429
|
+
border: var(--sl-field-border-width) solid var(--sl-field-border-color);
|
|
430
|
+
border-radius: var(--sl-field-radius);
|
|
431
|
+
transition: var(--sl-field-transition);
|
|
432
|
+
outline: none;
|
|
433
|
+
font-family: var(--sl-font-body-base-font-family);
|
|
434
|
+
font-size: var(--sl-font-body-base-font-size);
|
|
435
|
+
font-weight: var(--sl-font-body-base-font-weight);
|
|
436
|
+
line-height: var(--sl-font-body-base-line-height);
|
|
437
|
+
letter-spacing: var(--sl-font-body-base-letter-spacing);
|
|
438
|
+
outline: none;
|
|
439
|
+
display: inline-flex;
|
|
440
|
+
align-items: center;
|
|
441
|
+
gap: var(--sl-gap-control);
|
|
442
|
+
inline-size: 100%;
|
|
443
|
+
block-size: var(--sl-control-height-md);
|
|
444
|
+
padding-inline: var(--sl-control-padding-inline);
|
|
445
|
+
text-align: start;
|
|
446
|
+
cursor: pointer;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
.DatePickerTrigger:disabled {
|
|
450
|
+
color: var(--sl-text-disabled);
|
|
451
|
+
cursor: default;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.DatePickerField .DatePickerTrigger:focus-visible {
|
|
455
|
+
outline: var(--sl-focus-outline);
|
|
456
|
+
outline-offset: var(--sl-focus-outline-offset);
|
|
457
|
+
box-shadow: 0 0 0 var(--sl-focus-halo-spread) var(--sl-focus-halo-color);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.DatePickerValue[data-placeholder] {
|
|
461
|
+
color: var(--sl-text-tertiary);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.DatePickerClear {
|
|
465
|
+
position: absolute;
|
|
466
|
+
inset-inline-end: var(--sl-space-1);
|
|
467
|
+
z-index: 1;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.DatePickerTrigger:has(~ .DatePickerClear) {
|
|
471
|
+
padding-inline-end: var(--sl-control-height-sm);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
.DatePickerPopup {
|
|
475
|
+
/* 52rem fits two months and the preset column; three months ask for 64rem. Layout, not a brand size. */
|
|
476
|
+
inline-size: min(var(--available-width, 100vw), 52rem);
|
|
477
|
+
max-inline-size: var(--available-width, 100vw);
|
|
478
|
+
padding: 0;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.DatePickerPopup[data-months='3'] {
|
|
482
|
+
inline-size: min(var(--available-width, 100vw), 64rem);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.DatePickerPanel {
|
|
486
|
+
display: grid;
|
|
487
|
+
/* 11rem is the preset column. Layout, not a brand size: wide enough for "Year to date" and a hint. */
|
|
488
|
+
grid-template-columns: 11rem minmax(0, 1fr);
|
|
489
|
+
align-items: start;
|
|
490
|
+
gap: var(--sl-calendar-month-gap);
|
|
491
|
+
padding: var(--sl-calendar-panel-padding);
|
|
492
|
+
min-width: 0;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.DatePickerPanel .DatePickerPresets {
|
|
496
|
+
grid-column: 1;
|
|
497
|
+
grid-row: 1 / span 2;
|
|
498
|
+
inline-size: auto;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
.DatePickerPanel .Calendar {
|
|
502
|
+
grid-column: 2;
|
|
503
|
+
grid-row: 1;
|
|
504
|
+
min-width: 0;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.DatePickerPanel:not(:has(.DatePickerPresets)) {
|
|
508
|
+
grid-template-columns: minmax(0, 1fr);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
.DatePickerPanel:not(:has(.DatePickerPresets)) .Calendar,
|
|
512
|
+
.DatePickerPanel:not(:has(.DatePickerPresets)) .DatePickerFooter {
|
|
513
|
+
grid-column: 1;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.DatePickerFooter {
|
|
517
|
+
display: flex;
|
|
518
|
+
align-items: center;
|
|
519
|
+
justify-content: space-between;
|
|
520
|
+
gap: var(--sl-space-3);
|
|
521
|
+
grid-column: 2;
|
|
522
|
+
grid-row: 2;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
.DatePickerSummary {
|
|
526
|
+
font-family: var(--sl-font-body-condense-font-family);
|
|
527
|
+
font-size: var(--sl-font-body-condense-font-size);
|
|
528
|
+
font-weight: var(--sl-font-body-condense-font-weight);
|
|
529
|
+
line-height: var(--sl-font-body-condense-line-height);
|
|
530
|
+
letter-spacing: var(--sl-font-body-condense-letter-spacing);
|
|
531
|
+
margin: 0;
|
|
532
|
+
color: var(--sl-text-secondary);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.DatePickerActions {
|
|
536
|
+
display: flex;
|
|
537
|
+
gap: var(--sl-space-2);
|
|
538
|
+
margin-inline-start: auto;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/* Presets become a row once the measured panel is under 40rem, or the popup is a drawer. */
|
|
542
|
+
.DatePickerPanel[data-layout='row'],
|
|
543
|
+
.DatePickerPanel[data-layout='row']:not(:has(.DatePickerPresets)) {
|
|
544
|
+
grid-template-columns: minmax(0, 1fr);
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.DatePickerPanel[data-layout='row'] .DatePickerPresets,
|
|
548
|
+
.DatePickerPanel[data-layout='row'] .Calendar,
|
|
549
|
+
.DatePickerPanel[data-layout='row'] .DatePickerFooter {
|
|
550
|
+
grid-column: 1;
|
|
551
|
+
grid-row: auto;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
.DatePickerPanel[data-compact] .DatePickerFooter {
|
|
555
|
+
position: sticky;
|
|
556
|
+
inset-block-end: 0;
|
|
557
|
+
flex-wrap: wrap;
|
|
558
|
+
background: var(--sl-popup-background);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
/* The action row shrinks to its buttons, so a percentage width on Apply never
|
|
562
|
+
resolves. A 100% basis wraps Apply onto its own row of the footer. */
|
|
563
|
+
.DatePickerPanel[data-compact] .DatePickerActions {
|
|
564
|
+
flex-basis: 100%;
|
|
565
|
+
flex-wrap: wrap;
|
|
566
|
+
justify-content: flex-end;
|
|
567
|
+
margin-inline-start: 0;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
.DatePickerPanel[data-compact] .DatePickerApply {
|
|
571
|
+
flex-basis: 100%;
|
|
572
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/* @scattered-light/loomiere-base-ui 0.7.0 · styles for @base-ui/react 1.9.0 */
|
|
2
|
+
/* EditableList
|
|
3
|
+
*
|
|
4
|
+
* One table at every width, so a field is not submitted twice. Under the stack width each
|
|
5
|
+
* field shows its own label, so the lost header association does not matter: the input's
|
|
6
|
+
* name comes from that label, not from the column header.
|
|
7
|
+
*
|
|
8
|
+
* Move up / Move down would be quiet buttons in the last cell, ahead of any future drag handle.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.EditableList {
|
|
12
|
+
container-type: inline-size;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.EditableListAdd,
|
|
16
|
+
.EditableListError,
|
|
17
|
+
.EditableListBalance {
|
|
18
|
+
margin-block-start: var(--sl-collection-toolbar-gap);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.EditableListFieldLabel {
|
|
22
|
+
display: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.EditableListBalance {
|
|
26
|
+
font-family: var(--sl-font-body-condense-font-family);
|
|
27
|
+
font-size: var(--sl-font-body-condense-font-size);
|
|
28
|
+
font-weight: var(--sl-font-body-condense-font-weight);
|
|
29
|
+
line-height: var(--sl-font-body-condense-line-height);
|
|
30
|
+
letter-spacing: var(--sl-font-body-condense-letter-spacing);
|
|
31
|
+
padding: var(--sl-space-2) var(--sl-space-3);
|
|
32
|
+
border-radius: var(--sl-radius-control);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.EditableListBalance[data-color] {
|
|
36
|
+
background: var(--sl-scope-soft);
|
|
37
|
+
color: var(--sl-scope-on-soft);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.EditableListStackedTitle {
|
|
41
|
+
display: none;
|
|
42
|
+
font-family: var(--sl-font-subtitle-condense-font-family);
|
|
43
|
+
font-size: var(--sl-font-subtitle-condense-font-size);
|
|
44
|
+
font-weight: var(--sl-font-subtitle-condense-font-weight);
|
|
45
|
+
line-height: var(--sl-font-subtitle-condense-line-height);
|
|
46
|
+
letter-spacing: var(--sl-font-subtitle-condense-letter-spacing);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.EditableList[data-stacked] .EditableListStackedTitle {
|
|
50
|
+
display: block;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.EditableListRowLead {
|
|
54
|
+
width: 0;
|
|
55
|
+
padding: 0;
|
|
56
|
+
border: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.EditableList td .Input,
|
|
60
|
+
.EditableList td input,
|
|
61
|
+
.EditableList td select {
|
|
62
|
+
width: 100%;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* The width token is measured in JS. data-stacked is that measurement. */
|
|
66
|
+
.EditableList[data-stacked] {
|
|
67
|
+
.EditableListTable,
|
|
68
|
+
.EditableListTable thead,
|
|
69
|
+
.EditableListTable tbody,
|
|
70
|
+
.EditableListTable tr,
|
|
71
|
+
.EditableListTable td {
|
|
72
|
+
display: block;
|
|
73
|
+
width: 100%;
|
|
74
|
+
height: auto;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.EditableListTable thead {
|
|
78
|
+
position: absolute;
|
|
79
|
+
width: var(--sl-space-px);
|
|
80
|
+
height: var(--sl-space-px);
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
clip: rect(0, 0, 0, 0);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.EditableListTable tr {
|
|
86
|
+
padding-block: var(--sl-collection-list-row-padding-block);
|
|
87
|
+
border-bottom: var(--sl-stroke-default) solid var(--sl-table-row-border-color);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.EditableListFieldLabel {
|
|
91
|
+
display: block;
|
|
92
|
+
font-family: var(--sl-font-subtitle-condense-font-family);
|
|
93
|
+
font-size: var(--sl-font-subtitle-condense-font-size);
|
|
94
|
+
font-weight: var(--sl-font-subtitle-condense-font-weight);
|
|
95
|
+
line-height: var(--sl-font-subtitle-condense-line-height);
|
|
96
|
+
letter-spacing: var(--sl-font-subtitle-condense-letter-spacing);
|
|
97
|
+
}
|
|
98
|
+
}
|