opui-css 3.3.5 → 4.0.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/CHANGELOG.md +235 -0
- package/LICENSE +21 -21
- package/MIGRATING.md +105 -0
- package/README.md +66 -29
- package/astro/index.ts +46 -0
- package/components/AGENTS.md +247 -0
- package/components/Accordion/Accordion.astro +42 -0
- package/components/Anchor/Anchor.astro +51 -0
- package/components/Avatar/Avatar.astro +44 -0
- package/components/Badge/Badge.astro +54 -0
- package/components/Button/Button.astro +45 -0
- package/components/ButtonGroup/ButtonGroup.astro +29 -0
- package/components/Callout/Callout.astro +75 -0
- package/components/Card/Card.astro +38 -0
- package/components/Checkbox/Checkbox.astro +76 -0
- package/components/Checkbox/CheckboxInput.astro +32 -0
- package/components/Chip/Chip.astro +37 -0
- package/components/ClassicSelect/ClassicSelect.astro +83 -0
- package/components/DescriptionList/Description.astro +12 -0
- package/components/DescriptionList/DescriptionList.astro +22 -0
- package/components/DescriptionList/Item.astro +12 -0
- package/components/DescriptionList/Term.astro +12 -0
- package/components/DescriptionList/index.ts +12 -0
- package/components/Dialog/Dialog.astro +43 -0
- package/components/Divider/Divider.astro +14 -0
- package/components/Drawer/Drawer.astro +49 -0
- package/components/Drawer/DrawerFooter.astro +14 -0
- package/components/Drawer/DrawerHeader.astro +31 -0
- package/components/FieldDescription/FieldDescription.astro +13 -0
- package/components/FieldGroup/FieldGroup.astro +31 -0
- package/components/FieldLegend/FieldLegend.astro +15 -0
- package/components/FieldSet/FieldSet.astro +15 -0
- package/components/Form/Form.astro +15 -0
- package/components/IconButton/IconButton.astro +26 -0
- package/components/List/List.astro +36 -0
- package/components/ListItem/ListItem.astro +118 -0
- package/components/Progress/Progress.astro +40 -0
- package/components/Radio/Radio.astro +70 -0
- package/components/Radio/RadioInput.astro +24 -0
- package/components/Range/Range.astro +136 -0
- package/components/Select/Select.astro +106 -0
- package/components/Switch/Switch.astro +101 -0
- package/components/Switch/SwitchInput.astro +25 -0
- package/components/Table/Body.astro +13 -0
- package/components/Table/Cell.astro +13 -0
- package/components/Table/Column.astro +15 -0
- package/components/Table/ColumnGroup.astro +13 -0
- package/components/Table/Head.astro +13 -0
- package/components/Table/HeaderCell.astro +13 -0
- package/components/Table/Row.astro +13 -0
- package/components/Table/Table.astro +15 -0
- package/components/Table/index.ts +20 -0
- package/components/Tabs/Tabs.astro +28 -0
- package/components/Tabs/TabsItem.astro +47 -0
- package/components/Tabs/TabsPanel.astro +21 -0
- package/components/Tabs/TabsTab.astro +19 -0
- package/components/Tabs/index.ts +14 -0
- package/components/TextField/TextField.astro +128 -0
- package/components/Textarea/Textarea.astro +106 -0
- package/components/Toast/Toast.astro +42 -0
- package/components/ToggleButton/ToggleButton.astro +53 -0
- package/components/ToggleGroup/ToggleGroup.astro +49 -0
- package/components/Tooltip/Tooltip.astro +30 -0
- package/{src/core → core}/normalize.css +194 -196
- package/core/palette.css +59 -0
- package/{src/core → core}/utils.css +71 -60
- package/css/components/accordion.css +174 -0
- package/css/components/anchor.css +27 -0
- package/{src/themes/theme-two → css}/components/avatar.css +65 -68
- package/css/components/badge.css +107 -0
- package/css/components/button-group.css +179 -0
- package/css/components/button.css +215 -0
- package/css/components/callout.css +109 -0
- package/css/components/card.css +117 -0
- package/css/components/checkbox.css +205 -0
- package/{src/themes/theme-one → css}/components/chip.css +87 -135
- package/{src/themes/theme-two/components/definition-list.css → css/components/description-list.css} +77 -68
- package/{src/themes/theme-two → css}/components/dialog.css +68 -59
- package/css/components/divider.css +20 -0
- package/css/components/drawer.css +171 -0
- package/css/components/form.css +146 -0
- package/css/components/icon-button.css +139 -0
- package/{src/themes/theme-two → css}/components/link.css +21 -21
- package/{src/themes/theme-two → css}/components/list.css +345 -318
- package/{src/themes/theme-one → css}/components/progress.css +97 -83
- package/css/components/radio.css +172 -0
- package/css/components/range.css +337 -0
- package/{src/themes/theme-two → css}/components/select.css +169 -162
- package/{src/themes/theme-two → css}/components/spinner.css +37 -38
- package/{src/themes/theme-two → css}/components/switch.css +268 -225
- package/css/components/table.css +179 -0
- package/css/components/tabs.css +77 -0
- package/css/components/text-field.css +450 -0
- package/css/components/text-input.css +53 -0
- package/{src/themes/theme-two → css}/components/textarea.css +24 -25
- package/css/components/toast.css +161 -0
- package/css/components/toggle-button.css +87 -0
- package/css/components/toggle-group.css +56 -0
- package/css/components/tooltip.css +67 -0
- package/css/components/typography.css +585 -0
- package/{src/themes/theme-two → css}/components.css +41 -37
- package/{src/themes/theme-two → css}/imports.css +16 -16
- package/css/js/checkbox.js +21 -0
- package/css/js/toast.js +94 -0
- package/css/theme.css +132 -0
- package/dist/op.css +1001 -32
- package/dist/op.css.map +1 -0
- package/dist/opui.components.css +5135 -0
- package/dist/opui.components.css.map +1 -0
- package/dist/opui.css +6604 -0
- package/dist/opui.css.map +1 -0
- package/env.d.ts +14 -0
- package/open-props.css +9 -0
- package/package.json +64 -56
- package/dist/theme-one/components.css +0 -3869
- package/dist/theme-one/theme-one.css +0 -4424
- package/dist/theme-two/components.css +0 -3591
- package/dist/theme-two/theme-two.css +0 -4141
- package/src/open-props.css +0 -10
- package/src/themes/theme-one/components/accordion.css +0 -172
- package/src/themes/theme-one/components/alert.css +0 -85
- package/src/themes/theme-one/components/avatar.css +0 -68
- package/src/themes/theme-one/components/badge.css +0 -101
- package/src/themes/theme-one/components/button-group.css +0 -69
- package/src/themes/theme-one/components/button.css +0 -281
- package/src/themes/theme-one/components/card.css +0 -82
- package/src/themes/theme-one/components/checkbox-radio.css +0 -123
- package/src/themes/theme-one/components/definition-list.css +0 -68
- package/src/themes/theme-one/components/dialog.css +0 -59
- package/src/themes/theme-one/components/divider.css +0 -7
- package/src/themes/theme-one/components/field-group.css +0 -83
- package/src/themes/theme-one/components/field.css +0 -494
- package/src/themes/theme-one/components/icon-button.css +0 -40
- package/src/themes/theme-one/components/link.css +0 -21
- package/src/themes/theme-one/components/list.css +0 -318
- package/src/themes/theme-one/components/range.css +0 -121
- package/src/themes/theme-one/components/rich-text.css +0 -210
- package/src/themes/theme-one/components/select.css +0 -163
- package/src/themes/theme-one/components/snackbar.css +0 -148
- package/src/themes/theme-one/components/spinner.css +0 -38
- package/src/themes/theme-one/components/switch.css +0 -225
- package/src/themes/theme-one/components/tab-buttons.css +0 -120
- package/src/themes/theme-one/components/table.css +0 -92
- package/src/themes/theme-one/components/text-field.css +0 -57
- package/src/themes/theme-one/components/textarea.css +0 -25
- package/src/themes/theme-one/components/toggle-button-group.css +0 -135
- package/src/themes/theme-one/components/tooltip.css +0 -94
- package/src/themes/theme-one/components/typography.css +0 -209
- package/src/themes/theme-one/components.css +0 -37
- package/src/themes/theme-one/imports.css +0 -16
- package/src/themes/theme-one/theme.css +0 -163
- package/src/themes/theme-two/components/accordion.css +0 -172
- package/src/themes/theme-two/components/alert.css +0 -85
- package/src/themes/theme-two/components/badge.css +0 -101
- package/src/themes/theme-two/components/button-group.css +0 -50
- package/src/themes/theme-two/components/button.css +0 -229
- package/src/themes/theme-two/components/card.css +0 -82
- package/src/themes/theme-two/components/checkbox-radio.css +0 -123
- package/src/themes/theme-two/components/chip.css +0 -135
- package/src/themes/theme-two/components/divider.css +0 -7
- package/src/themes/theme-two/components/field-group.css +0 -83
- package/src/themes/theme-two/components/field.css +0 -281
- package/src/themes/theme-two/components/icon-button.css +0 -40
- package/src/themes/theme-two/components/progress.css +0 -83
- package/src/themes/theme-two/components/range.css +0 -121
- package/src/themes/theme-two/components/rich-text.css +0 -210
- package/src/themes/theme-two/components/snackbar.css +0 -148
- package/src/themes/theme-two/components/tab-buttons.css +0 -120
- package/src/themes/theme-two/components/table.css +0 -99
- package/src/themes/theme-two/components/text-field.css +0 -57
- package/src/themes/theme-two/components/toggle-button-group.css +0 -135
- package/src/themes/theme-two/components/tooltip.css +0 -94
- package/src/themes/theme-two/components/typography.css +0 -209
- package/src/themes/theme-two/theme.css +0 -158
|
@@ -0,0 +1,585 @@
|
|
|
1
|
+
@layer components.root {
|
|
2
|
+
|
|
3
|
+
:where(.p) {
|
|
4
|
+
text-wrap: pretty;
|
|
5
|
+
|
|
6
|
+
&.small {
|
|
7
|
+
font-size: var(--font-size-1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&.large {
|
|
11
|
+
font-size: var(--font-size-3);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:where(.h1, .h2, .h3, .h4, .h5, .h6) {
|
|
16
|
+
color: var(--text-primary);
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
text-wrap: pretty;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
:where(.h1) {
|
|
22
|
+
font-size: var(--font-size-h1, var(--font-size-7));
|
|
23
|
+
letter-spacing: -0.02em;
|
|
24
|
+
line-height: 1.15;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
:where(.h2) {
|
|
28
|
+
font-size: var(--font-size-h2, var(--font-size-5, 2rem));
|
|
29
|
+
letter-spacing: -0.02em;
|
|
30
|
+
line-height: 1.2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.h3) {
|
|
34
|
+
font-size: var(--font-size-h3, var(--font-size-4, 1.5rem));
|
|
35
|
+
letter-spacing: -0.01em;
|
|
36
|
+
line-height: 1.167;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
:where(.h4) {
|
|
40
|
+
font-size: var(--font-size-h4, var(--font-size-3, 1.25rem));
|
|
41
|
+
letter-spacing: -0.01em;
|
|
42
|
+
line-height: 1.235;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:where(.h5) {
|
|
46
|
+
font-size: var(--font-size-h5, var(--font-size-2, 1.1rem));
|
|
47
|
+
line-height: 1.334;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:where(.h6) {
|
|
51
|
+
font-size: var(--font-size-h6, var(--font-size-1, 1rem));
|
|
52
|
+
line-height: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Overline */
|
|
56
|
+
:where(.overline) {
|
|
57
|
+
color: light-dark(oklch(from var(--text-muted) calc(l * 1.25) c h),
|
|
58
|
+
oklch(from var(--text-muted) calc(l * 0.75) c h));
|
|
59
|
+
font-size: var(--font-size-0);
|
|
60
|
+
font-weight: 500;
|
|
61
|
+
letter-spacing: 0.06em;
|
|
62
|
+
text-transform: uppercase;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
:where(.hgroup) {
|
|
66
|
+
&>p {
|
|
67
|
+
margin: 0;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&> :where(h1, h2, h3, h4, h5, h6) {
|
|
71
|
+
margin-block: 0 0.4em;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* First p element (overline) */
|
|
75
|
+
&>p:first-of-type:first-child {
|
|
76
|
+
color: light-dark(oklch(from var(--text-muted) calc(l * 1.25) c h),
|
|
77
|
+
oklch(from var(--text-muted) calc(l * 0.75) c h));
|
|
78
|
+
font-size: var(--font-size-0);
|
|
79
|
+
font-weight: 500;
|
|
80
|
+
letter-spacing: 0.06em;
|
|
81
|
+
text-transform: uppercase;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* Body paragraphs after the heading */
|
|
85
|
+
&>p:not(:first-of-type:first-child) {
|
|
86
|
+
color: oklch(from currentColor l c h / 75%);
|
|
87
|
+
font-size: var(--font-size-3);
|
|
88
|
+
line-height: 1.6;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&>p+p {
|
|
92
|
+
margin-block-start: 0.75em;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Caption */
|
|
97
|
+
:where(.caption) {
|
|
98
|
+
color: var(--text-muted);
|
|
99
|
+
font-size: var(--font-size-0);
|
|
100
|
+
line-height: 1.6;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
/* Inline text elements — class utilities (work anywhere) */
|
|
106
|
+
:where(.u, .abbr, .dfn) {
|
|
107
|
+
text-decoration: underline;
|
|
108
|
+
text-underline-offset: 1px;
|
|
109
|
+
|
|
110
|
+
@supports (-moz-appearance: none) {
|
|
111
|
+
text-underline-offset: 2px;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
:where(.abbr, .dfn) {
|
|
116
|
+
font-style: normal;
|
|
117
|
+
text-decoration: var(--color-9) underline dotted;
|
|
118
|
+
|
|
119
|
+
&[title] {
|
|
120
|
+
cursor: help;
|
|
121
|
+
text-underline-offset: 1px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@supports (-moz-appearance: none) {
|
|
125
|
+
text-underline-offset: 2px;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:where(.sup) {
|
|
130
|
+
font-size: 0.5em;
|
|
131
|
+
vertical-align: super;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
:where(p, span).small {
|
|
135
|
+
font-size: max(0.5em, var(--font-size-0, 0.75rem));
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:where(.cite) {
|
|
139
|
+
font-style: italic;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
/* Code */
|
|
143
|
+
:where(.kbd) {
|
|
144
|
+
font-family: var(--font-mono);
|
|
145
|
+
background-color: var(--text-muted);
|
|
146
|
+
border-color: var(--text-muted);
|
|
147
|
+
border-radius: var(--radius-2);
|
|
148
|
+
border-width: var(--border-size-1);
|
|
149
|
+
color: var(--text-muted-contrast);
|
|
150
|
+
padding: 0.1ex 0.3ex;
|
|
151
|
+
word-break: break-word;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:where(.mark) {
|
|
155
|
+
border-radius: var(--radius-2);
|
|
156
|
+
box-decoration-break: clone;
|
|
157
|
+
padding: .1ex .3ex;
|
|
158
|
+
vertical-align: baseline;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
:where(.s) {
|
|
162
|
+
text-decoration: line-through;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
:where(.sub) {
|
|
166
|
+
font-size: 0.75em;
|
|
167
|
+
vertical-align: sub;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
:where(.del) {
|
|
171
|
+
color: var(--color-9);
|
|
172
|
+
text-decoration: line-through;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:where(.ins) {
|
|
176
|
+
color: var(--color-9);
|
|
177
|
+
text-decoration: underline;
|
|
178
|
+
text-underline-offset: 1px;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
:where(.var) {
|
|
182
|
+
font-family: var(--font-mono);
|
|
183
|
+
background-color: var(--text-muted);
|
|
184
|
+
border-color: var(--text-muted);
|
|
185
|
+
border-radius: var(--radius-2);
|
|
186
|
+
border-width: var(--border-size-1);
|
|
187
|
+
color: var(--text-muted-contrast);
|
|
188
|
+
padding: 0.1ex 0.3ex;
|
|
189
|
+
word-break: break-word;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
:where(.samp) {
|
|
193
|
+
font-family: var(--font-mono);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Blockquote */
|
|
197
|
+
:where(.blockquote) {
|
|
198
|
+
border-inline-start: var(--border-size-3) solid currentColor;
|
|
199
|
+
padding-block: var(--size-3);
|
|
200
|
+
padding-inline: var(--size-4);
|
|
201
|
+
|
|
202
|
+
:first-child {
|
|
203
|
+
margin-block-start: 0;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
:last-child {
|
|
207
|
+
margin-block-end: 0;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
footer {
|
|
211
|
+
color: var(--text-muted);
|
|
212
|
+
margin-block-start: var(--size-3);
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/* Code block */
|
|
217
|
+
:where(pre.code-block) {
|
|
218
|
+
background-color: var(--color-15);
|
|
219
|
+
border-radius: var(--border-radius);
|
|
220
|
+
color: var(--color-1);
|
|
221
|
+
font-family: var(--font-mono);
|
|
222
|
+
font-size: var(--font-size-05);
|
|
223
|
+
max-inline-size: 100%;
|
|
224
|
+
overflow-x: auto;
|
|
225
|
+
padding-block: var(--size-3);
|
|
226
|
+
padding-inline: var(--size-4);
|
|
227
|
+
scrollbar-width: thin;
|
|
228
|
+
white-space: pre;
|
|
229
|
+
|
|
230
|
+
>code {
|
|
231
|
+
background: none;
|
|
232
|
+
border-radius: 0;
|
|
233
|
+
color: inherit;
|
|
234
|
+
font-size: inherit;
|
|
235
|
+
padding: 0;
|
|
236
|
+
word-break: normal;
|
|
237
|
+
writing-mode: inherit;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* Rich text */
|
|
244
|
+
@layer components.extended {
|
|
245
|
+
@scope (.rich-text) to (.not-rich-text) {
|
|
246
|
+
a {
|
|
247
|
+
color: var(--primary);
|
|
248
|
+
cursor: pointer;
|
|
249
|
+
font-size: inherit;
|
|
250
|
+
font-weight: 700;
|
|
251
|
+
line-height: inherit;
|
|
252
|
+
text-decoration: underline;
|
|
253
|
+
text-decoration-color: var(--primary);
|
|
254
|
+
text-underline-offset: 2px;
|
|
255
|
+
|
|
256
|
+
&[href] {
|
|
257
|
+
|
|
258
|
+
&:hover,
|
|
259
|
+
&:focus-visible {
|
|
260
|
+
color: var(--primary-light);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/* Blockquote */
|
|
266
|
+
blockquote {
|
|
267
|
+
border-inline-start: var(--border-size-3) solid currentColor;
|
|
268
|
+
font-size: inherit;
|
|
269
|
+
line-height: inherit;
|
|
270
|
+
padding-block: var(--size-3);
|
|
271
|
+
padding-inline: var(--size-4);
|
|
272
|
+
|
|
273
|
+
:first-child {
|
|
274
|
+
margin-block-start: 0;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
:last-child {
|
|
278
|
+
margin-block-end: 0;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
footer {
|
|
282
|
+
color: var(--text-muted);
|
|
283
|
+
margin-block-start: var(--size-3);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Code */
|
|
288
|
+
pre {
|
|
289
|
+
border-radius: var(--border-radius);
|
|
290
|
+
font-size: var(--font-size-05);
|
|
291
|
+
margin-block: var(--size-6);
|
|
292
|
+
max-inline-size: max-content;
|
|
293
|
+
min-inline-size: 0;
|
|
294
|
+
padding-block: var(--size-3);
|
|
295
|
+
padding-inline: var(--size-4);
|
|
296
|
+
white-space: pre;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
pre:has(> code) {
|
|
300
|
+
background-color: var(--color-15);
|
|
301
|
+
border-radius: var(--border-radius);
|
|
302
|
+
color: var(--color-1);
|
|
303
|
+
max-inline-size: 100%;
|
|
304
|
+
overflow-x: auto;
|
|
305
|
+
scrollbar-width: thin;
|
|
306
|
+
|
|
307
|
+
>code {
|
|
308
|
+
background: none;
|
|
309
|
+
border-radius: 0;
|
|
310
|
+
color: inherit;
|
|
311
|
+
font-size: inherit;
|
|
312
|
+
padding: 0;
|
|
313
|
+
word-break: normal;
|
|
314
|
+
writing-mode: inherit;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
/* Text */
|
|
320
|
+
p {
|
|
321
|
+
font-size: inherit;
|
|
322
|
+
line-height: inherit;
|
|
323
|
+
margin-block: 1.25em;
|
|
324
|
+
text-wrap: pretty;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
:is(h1, h2, h3, h4, h5, h6) {
|
|
328
|
+
color: var(--text-primary);
|
|
329
|
+
font-weight: 700;
|
|
330
|
+
text-wrap: pretty;
|
|
331
|
+
|
|
332
|
+
&+*:not(&) {
|
|
333
|
+
margin-block-start: 0;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
h1 {
|
|
338
|
+
font-size: var(--font-size-h1, var(--font-size-7));
|
|
339
|
+
letter-spacing: -0.02em;
|
|
340
|
+
line-height: 1.1111111;
|
|
341
|
+
margin-block: 0 0.8888889em;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
h2 {
|
|
345
|
+
font-size: var(--font-size-h2, var(--font-size-5, 2rem));
|
|
346
|
+
letter-spacing: -0.02em;
|
|
347
|
+
line-height: 1.3333333;
|
|
348
|
+
margin-block: 2em 1em;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
h3 {
|
|
352
|
+
font-size: var(--font-size-h3, var(--font-size-4, 1.5rem));
|
|
353
|
+
letter-spacing: -0.01em;
|
|
354
|
+
line-height: 1.6;
|
|
355
|
+
margin-block: 1.6em 0.6em;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
h4 {
|
|
359
|
+
font-size: var(--font-size-h4, var(--font-size-3, 1.25rem));
|
|
360
|
+
letter-spacing: -0.01em;
|
|
361
|
+
line-height: 1.5;
|
|
362
|
+
margin-block: 1.5em 0.5em;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
h5 {
|
|
366
|
+
font-size: var(--font-size-h5, var(--font-size-2, 1.1rem));
|
|
367
|
+
line-height: 1;
|
|
368
|
+
margin-block: 0 var(--size-1);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
h6 {
|
|
372
|
+
font-size: var(--font-size-h6, var(--font-size-1, 1rem));
|
|
373
|
+
line-height: 1;
|
|
374
|
+
margin-block: 0 var(--size-1);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
/** Overline */
|
|
378
|
+
:is(.overline, hgroup p:first-of-type:first-child) {
|
|
379
|
+
color: light-dark(oklch(from var(--text-muted) calc(l * 1.25) c h),
|
|
380
|
+
oklch(from var(--text-muted) calc(l * 0.75) c h));
|
|
381
|
+
font-size: var(--font-size-0);
|
|
382
|
+
font-weight: 500;
|
|
383
|
+
letter-spacing: 0.06em;
|
|
384
|
+
text-transform: uppercase;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
hgroup {
|
|
388
|
+
&>p {
|
|
389
|
+
margin: 0;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
&> :where(h1, h2, h3, h4, h5, h6) {
|
|
393
|
+
margin-block: 0 0.4em;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
&+* {
|
|
397
|
+
margin-block-start: 3em;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
/* Body paragraphs after the heading */
|
|
401
|
+
&>p:not(:first-of-type:first-child) {
|
|
402
|
+
color: oklch(from currentColor l c h / 75%);
|
|
403
|
+
font-size: var(--font-size-3);
|
|
404
|
+
line-height: 1.6;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
&>p+p {
|
|
408
|
+
margin-block-start: 0.75em;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/* Lists */
|
|
413
|
+
ul:not([class]) {
|
|
414
|
+
list-style-type: disc;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
ol:not([class]) {
|
|
418
|
+
list-style-type: decimal;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
:where(ul, ol):not([class]) {
|
|
422
|
+
display: grid;
|
|
423
|
+
font-size: inherit;
|
|
424
|
+
gap: 0.5em;
|
|
425
|
+
line-height: inherit;
|
|
426
|
+
margin-block-end: 1.25em;
|
|
427
|
+
margin-block-start: 1.25em;
|
|
428
|
+
padding-inline-start: 1.625em;
|
|
429
|
+
|
|
430
|
+
li {
|
|
431
|
+
padding-inline-start: 0.375em;
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/* Nested lists */
|
|
436
|
+
:where(ul ul),
|
|
437
|
+
:where(ul ol),
|
|
438
|
+
:where(ol ul),
|
|
439
|
+
:where(ol ol) {
|
|
440
|
+
margin-block-end: 0.75em;
|
|
441
|
+
margin-block-start: 0.75em;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
/* Description lists */
|
|
445
|
+
:where(dl) {
|
|
446
|
+
font-size: inherit;
|
|
447
|
+
line-height: inherit;
|
|
448
|
+
margin-block-end: 1.25em;
|
|
449
|
+
margin-block-start: 1.25em;
|
|
450
|
+
|
|
451
|
+
dt {
|
|
452
|
+
font-weight: 700;
|
|
453
|
+
margin-block-start: 1.25em;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
dd {
|
|
457
|
+
margin-block-start: 0.5em;
|
|
458
|
+
padding-inline-start: 1.625em;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
/* Figures */
|
|
463
|
+
figure {
|
|
464
|
+
display: grid;
|
|
465
|
+
gap: var(--size-2);
|
|
466
|
+
margin-block: var(--size-7);
|
|
467
|
+
place-items: center;
|
|
468
|
+
|
|
469
|
+
&>* {
|
|
470
|
+
margin-block: 0;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
& figcaption {
|
|
474
|
+
font-size: var(--font-size-0);
|
|
475
|
+
text-wrap: pretty;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/* Remove top margin from first child */
|
|
480
|
+
&> :first-child {
|
|
481
|
+
margin-block-start: 0;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/* Remove bottom margin from last child */
|
|
485
|
+
&> :last-child {
|
|
486
|
+
margin-block-end: 0;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/* Horizontal rules */
|
|
490
|
+
hr {
|
|
491
|
+
&+* {
|
|
492
|
+
margin-block-start: 0;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
/* Inline text elements */
|
|
497
|
+
:where(ins, u, abbr, dfn) {
|
|
498
|
+
text-decoration: underline;
|
|
499
|
+
text-underline-offset: 1px;
|
|
500
|
+
|
|
501
|
+
@supports (-moz-appearance: none) {
|
|
502
|
+
text-underline-offset: 2px;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
:where(abbr, dfn) {
|
|
507
|
+
font-style: normal;
|
|
508
|
+
text-decoration: var(--color-9) underline dotted;
|
|
509
|
+
|
|
510
|
+
&[title] {
|
|
511
|
+
cursor: help;
|
|
512
|
+
text-underline-offset: 1px;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
@supports (-moz-appearance: none) {
|
|
516
|
+
text-underline-offset: 2px;
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
sup {
|
|
521
|
+
font-size: 0.5em;
|
|
522
|
+
vertical-align: super;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
:where(del, ins) {
|
|
526
|
+
color: var(--color-9);
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
small {
|
|
530
|
+
font-size: max(0.5em, var(--font-size-0, 0.75rem));
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
cite {
|
|
534
|
+
font-style: italic;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/* Code */
|
|
538
|
+
:where(code, kbd, samp, pre) {
|
|
539
|
+
font-family: var(--font-mono);
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
code {
|
|
543
|
+
background-color: oklch(0 0 0 / 18%);
|
|
544
|
+
border-radius: var(--border-size-3);
|
|
545
|
+
font-size: 0.9em;
|
|
546
|
+
padding: 0.1ex 0.3ex;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
:where(kbd, var) {
|
|
550
|
+
background-color: var(--text-muted);
|
|
551
|
+
border-color: var(--text-muted);
|
|
552
|
+
border-radius: var(--radius-2);
|
|
553
|
+
border-width: var(--border-size-1);
|
|
554
|
+
color: var(--text-muted-contrast);
|
|
555
|
+
padding: 0.1ex 0.3ex;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
:not(pre) code,
|
|
559
|
+
kbd {
|
|
560
|
+
word-break: break-word;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
:not(pre) code {
|
|
564
|
+
border-radius: var(--border-radius, var(--radius-2));
|
|
565
|
+
padding: 0.5ex;
|
|
566
|
+
writing-mode: lr;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
mark {
|
|
570
|
+
border-radius: var(--radius-2);
|
|
571
|
+
box-decoration-break: clone;
|
|
572
|
+
padding: .1ex .3ex;
|
|
573
|
+
vertical-align: baseline;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
s {
|
|
577
|
+
text-decoration: line-through;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
sub {
|
|
581
|
+
font-size: 0.75em;
|
|
582
|
+
vertical-align: sub;
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
}
|
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Components are divided into two categories - if they are stand-alone (root) or if they are built on top of others (extended).
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/*** Root components (no dependencies) */
|
|
6
|
-
@import "./components/button.css";
|
|
7
|
-
@import "./components/
|
|
8
|
-
@import "./components/
|
|
9
|
-
@import "./components/
|
|
10
|
-
@import "./components/
|
|
11
|
-
@import "./components/
|
|
12
|
-
@import "./components/
|
|
13
|
-
@import "./components/
|
|
14
|
-
@import "./components/
|
|
15
|
-
@import "./components/
|
|
16
|
-
@import "./components/
|
|
17
|
-
@import "./components/
|
|
18
|
-
@import "./components/
|
|
19
|
-
@import "./components/
|
|
20
|
-
@import "./components/
|
|
21
|
-
@import "./components/
|
|
22
|
-
@import "./components/
|
|
23
|
-
@import "./components/
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
@import "./components/
|
|
27
|
-
@import "./components/
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
@import "./components/
|
|
31
|
-
@import "./components/
|
|
32
|
-
@import "./components/
|
|
33
|
-
@import "./components/
|
|
34
|
-
@import "./components/
|
|
35
|
-
@import "./components/
|
|
36
|
-
@import "./components/
|
|
37
|
-
@import "./components/
|
|
1
|
+
/*
|
|
2
|
+
* Components are divided into two categories - if they are stand-alone (root) or if they are built on top of others (extended).
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/*** Root components (no dependencies) */
|
|
6
|
+
@import "./components/button.css";
|
|
7
|
+
@import "./components/callout.css";
|
|
8
|
+
@import "./components/icon-button.css";
|
|
9
|
+
@import "./components/tabs.css";
|
|
10
|
+
@import "./components/toggle-group.css";
|
|
11
|
+
@import "./components/toggle-button.css";
|
|
12
|
+
@import "./components/anchor.css";
|
|
13
|
+
@import "./components/avatar.css";
|
|
14
|
+
@import "./components/card.css";
|
|
15
|
+
@import "./components/chip.css";
|
|
16
|
+
@import "./components/description-list.css";
|
|
17
|
+
@import "./components/divider.css";
|
|
18
|
+
@import "./components/link.css";
|
|
19
|
+
@import "./components/table.css";
|
|
20
|
+
@import "./components/progress.css";
|
|
21
|
+
@import "./components/spinner.css";
|
|
22
|
+
@import "./components/checkbox.css";
|
|
23
|
+
@import "./components/radio.css";
|
|
24
|
+
@import "./components/range.css";
|
|
25
|
+
@import "./components/switch.css";
|
|
26
|
+
@import "./components/toast.css";
|
|
27
|
+
@import "./components/typography.css";
|
|
28
|
+
|
|
29
|
+
/*** Extended components (has dependencies) */
|
|
30
|
+
@import "./components/badge.css";
|
|
31
|
+
@import "./components/button-group.css";
|
|
32
|
+
@import "./components/accordion.css";
|
|
33
|
+
@import "./components/list.css";
|
|
34
|
+
@import "./components/dialog.css";
|
|
35
|
+
@import "./components/drawer.css";
|
|
36
|
+
@import "./components/form.css";
|
|
37
|
+
@import "./components/text-field.css";
|
|
38
|
+
@import "./components/select.css";
|
|
39
|
+
@import "./components/text-input.css";
|
|
40
|
+
@import "./components/textarea.css";
|
|
41
|
+
@import "./components/tooltip.css";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
@layer openprops, normalize, theme, components.root, components.extended, utils;
|
|
2
|
-
|
|
3
|
-
/* Open Props */
|
|
4
|
-
@import "
|
|
5
|
-
|
|
6
|
-
/* Normalize */
|
|
7
|
-
@import "
|
|
8
|
-
|
|
9
|
-
/* Theme */
|
|
10
|
-
@import "./theme.css";
|
|
11
|
-
|
|
12
|
-
/* Components */
|
|
13
|
-
@import "./components.css";
|
|
14
|
-
|
|
15
|
-
/* Utils */
|
|
16
|
-
@import "
|
|
1
|
+
@layer openprops, normalize, theme, components.root, components.extended, utils;
|
|
2
|
+
|
|
3
|
+
/* Open Props */
|
|
4
|
+
@import "../open-props.css";
|
|
5
|
+
|
|
6
|
+
/* Normalize */
|
|
7
|
+
@import "../core/normalize.css";
|
|
8
|
+
|
|
9
|
+
/* Theme */
|
|
10
|
+
@import "./theme.css";
|
|
11
|
+
|
|
12
|
+
/* Components */
|
|
13
|
+
@import "./components.css";
|
|
14
|
+
|
|
15
|
+
/* Utils */
|
|
16
|
+
@import "../core/utils.css";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checkbox runtime helpers.
|
|
3
|
+
*
|
|
4
|
+
* `indeterminate` is a JavaScript-only property on HTMLInputElement — the
|
|
5
|
+
* attribute alone has no effect. We mark inputs with `data-indeterminate` at
|
|
6
|
+
* render time and apply the property here, both on initial load and after
|
|
7
|
+
* Astro's view transitions swap the DOM.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
export function activateIndeterminate(root = document) {
|
|
11
|
+
root
|
|
12
|
+
.querySelectorAll('input[type="checkbox"][data-indeterminate]')
|
|
13
|
+
.forEach((el) => {
|
|
14
|
+
el.indeterminate = true
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function initCheckbox() {
|
|
19
|
+
activateIndeterminate()
|
|
20
|
+
document.addEventListener("astro:after-swap", () => activateIndeterminate())
|
|
21
|
+
}
|