oat-glassed 0.1.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +235 -20
- package/css/00-base.css +14 -14
- package/css/01-theme.css +64 -96
- package/css/accordion.css +9 -9
- package/css/alert.css +4 -32
- package/css/animations.css +38 -5
- package/css/avatar.css +2 -3
- package/css/badge.css +4 -20
- package/css/button.css +13 -30
- package/css/card.css +1 -2
- package/css/command.css +61 -16
- package/css/dialog.css +2 -4
- package/css/dropdown.css +5 -8
- package/css/empty-state.css +2 -3
- package/css/form.css +79 -31
- package/css/nav.css +5 -6
- package/css/progress.css +4 -4
- package/css/sidebar.css +69 -11
- package/css/skeleton.css +4 -9
- package/css/spinner.css +1 -3
- package/css/table.css +6 -13
- package/css/tabs.css +3 -7
- package/css/tag.css +4 -19
- package/css/toast.css +2 -3
- package/css/tooltip.css +6 -10
- package/js/command.js +11 -0
- package/js/index.js +1 -0
- package/js/password.js +48 -0
- package/js/sidebar.js +16 -0
- package/oat-glassed.min.css +1 -1
- package/oat-glassed.min.js +1 -1
- package/package.json +1 -1
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,41 +1,256 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
See [CHANGELOG](CHANGELOG.md) for changes and updates.
|
|
3
|
+
# Oat Glassed
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
**Ultra-lightweight, zero-dependency, semantic UI component library with glassmorphism design.**
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/oat-glassed)
|
|
8
|
+
[](https://www.npmjs.com/package/oat-glassed)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](#)
|
|
9
11
|
|
|
10
|
-
|
|
12
|
+
[Live Demo & Docs](https://good-lly.github.io/oat-glassed) • [Changelog](CHANGELOG.md) • [Contributing](CONTRIBUTING.md) • [npm](https://www.npmjs.com/package/oat-glassed)
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
<br />
|
|
13
15
|
|
|
14
|
-
|
|
16
|
+
<img width="739" alt="Oat Glassed screenshot" src="https://github.com/good-lly/oat-glassed/blob/main/docs/static/screenshot.png?raw=true" />
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
</div>
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
<br />
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
## Why Oat Glassed?
|
|
23
|
+
|
|
24
|
+
- **Zero dependencies** — pure HTML, CSS, and vanilla JS. No framework lock-in.
|
|
25
|
+
- **~11KB total** — 8KB CSS + 3KB JS (gzipped). Smaller than most single components in other libraries.
|
|
26
|
+
- **Semantic first** — styles apply to native HTML elements and ARIA attributes, not utility classes. Write clean markup, get beautiful UI.
|
|
27
|
+
- **Glassmorphism design** — modern frosted-glass aesthetic with automatic light/dark mode.
|
|
28
|
+
- **WebComponents** — interactive elements use native `<ot-*>` custom elements with proper lifecycle, keyboard nav, and accessibility.
|
|
29
|
+
- **Progressive enhancement** — everything works without JavaScript where possible. JS enhances, never gates.
|
|
30
|
+
- **Performance-optimized** — `contain: paint`, `will-change` hints, reduced blur/saturate for smooth 60fps glassmorphism.
|
|
31
|
+
|
|
32
|
+
<br />
|
|
33
|
+
|
|
34
|
+
## Quick Start
|
|
35
|
+
|
|
36
|
+
### CDN (fastest)
|
|
21
37
|
|
|
22
38
|
```html
|
|
23
|
-
<link
|
|
24
|
-
|
|
25
|
-
href="https://cdn.jsdelivr.net/npm/oat-glassed@1.0.0/dist/oat-glassed.min.css"
|
|
26
|
-
/>
|
|
27
|
-
<script src="https://cdn.jsdelivr.net/npm/oat-glassed@1.0.0/dist/oat-glassed.min.js"></script>
|
|
39
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/oat-glassed@latest/oat-glassed.min.css" />
|
|
40
|
+
<script src="https://cdn.jsdelivr.net/npm/oat-glassed@latest/oat-glassed.min.js"></script>
|
|
28
41
|
```
|
|
29
42
|
|
|
30
|
-
|
|
43
|
+
<details>
|
|
44
|
+
<summary>unpkg alternative</summary>
|
|
45
|
+
|
|
46
|
+
```html
|
|
47
|
+
<link rel="stylesheet" href="https://unpkg.com/oat-glassed@latest/oat-glassed.min.css" />
|
|
48
|
+
<script src="https://unpkg.com/oat-glassed@latest/oat-glassed.min.js"></script>
|
|
49
|
+
```
|
|
50
|
+
</details>
|
|
51
|
+
|
|
52
|
+
### npm
|
|
31
53
|
|
|
32
54
|
```bash
|
|
33
55
|
npm install oat-glassed
|
|
34
56
|
```
|
|
35
57
|
|
|
36
58
|
```js
|
|
37
|
-
import "oat-glassed/
|
|
38
|
-
import "oat-glassed/
|
|
59
|
+
import "oat-glassed/oat-glassed.min.css";
|
|
60
|
+
import "oat-glassed/oat-glassed.min.js";
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then just write semantic HTML:
|
|
64
|
+
|
|
65
|
+
```html
|
|
66
|
+
<button>Default</button>
|
|
67
|
+
<button class="primary">Primary</button>
|
|
68
|
+
<button class="danger">Danger</button>
|
|
69
|
+
|
|
70
|
+
<dialog open>
|
|
71
|
+
<h3>Glassmorphism dialog</h3>
|
|
72
|
+
<p>No classes needed. Just semantic HTML.</p>
|
|
73
|
+
</dialog>
|
|
39
74
|
```
|
|
40
75
|
|
|
41
|
-
|
|
76
|
+
<br />
|
|
77
|
+
|
|
78
|
+
## Components
|
|
79
|
+
|
|
80
|
+
### CSS Components (no JS required)
|
|
81
|
+
|
|
82
|
+
| Component | Element / Selector | Description |
|
|
83
|
+
| :--- | :--- | :--- |
|
|
84
|
+
| **Accordion** | `<details>` / `<summary>` | Collapsible sections using native HTML |
|
|
85
|
+
| **Alert** | `<output>` | Contextual feedback messages |
|
|
86
|
+
| **Avatar** | `.avatar` | User profile images with fallbacks |
|
|
87
|
+
| **Badge** | `<sup>`, `.badge` | Status indicators and counts |
|
|
88
|
+
| **Breadcrumb** | `<nav>` with `<ol>` | Navigation path indicator |
|
|
89
|
+
| **Button** | `<button>`, `<a role="button">` | Multiple variants: primary, secondary, danger, outline |
|
|
90
|
+
| **Card** | `<article>`, `.card` | Glass-effect content containers |
|
|
91
|
+
| **Dialog** | `<dialog>` | Modal windows with glassmorphism backdrop |
|
|
92
|
+
| **Empty State** | `.empty-state` | Placeholder for empty content areas |
|
|
93
|
+
| **Form** | `<form>`, `<input>`, `<select>`, `<textarea>` | Inputs, checkboxes, radios, selects — all semantic |
|
|
94
|
+
| **Grid** | `.grid` | Responsive layout system |
|
|
95
|
+
| **Meter** | `<meter>` | Gauge / measurement display |
|
|
96
|
+
| **Nav** | `<nav>`, `[data-topnav]` | Side nav and responsive top navbar with mobile hamburger collapse |
|
|
97
|
+
| **Progress** | `<progress>` | Progress bars |
|
|
98
|
+
| **Sidebar** | `.sidebar` | Collapsible sidebar layout |
|
|
99
|
+
| **Skeleton** | `.skeleton` | Loading placeholder animations |
|
|
100
|
+
| **Spinner** | `.spinner` | Loading indicators |
|
|
101
|
+
| **Switch** | `<input type="checkbox" role="switch">` | Toggle switches |
|
|
102
|
+
| **Table** | `<table>` | Styled data tables |
|
|
103
|
+
| **Tag** | `.tag` | Categorization labels |
|
|
104
|
+
| **Typography** | `<h1>`–`<h6>`, `<p>`, `<blockquote>`, etc. | Styled out of the box |
|
|
105
|
+
| **Utilities** | Various | Text, spacing, visibility, and layout helpers |
|
|
106
|
+
|
|
107
|
+
### Interactive WebComponents (JS)
|
|
108
|
+
|
|
109
|
+
| Component | Element | Features |
|
|
110
|
+
| :--- | :--- | :--- |
|
|
111
|
+
| **Tabs** | `<ot-tabs>` | Arrow key navigation, ARIA states, `ot-tab-change` event |
|
|
112
|
+
| **Dropdown** | `<ot-dropdown>` | Auto-flip positioning, keyboard nav, popover API |
|
|
113
|
+
| **Command Palette** | `<ot-command>` | `Cmd/Ctrl+K` global shortcut, real-time search, sections |
|
|
114
|
+
| **Toast** | `window.ot.toast()` | Configurable placement, duration, pause-on-hover, variants |
|
|
115
|
+
| **Tooltip** | `title` attribute | Progressive enhancement of native `title` to styled tooltips |
|
|
116
|
+
| **Sidebar Toggle** | Sidebar JS | Auto-dismiss on outside click (mobile), responsive |
|
|
117
|
+
|
|
118
|
+
<br />
|
|
119
|
+
|
|
120
|
+
## Theming
|
|
121
|
+
|
|
122
|
+
Oat Glassed uses CSS custom properties for full theme control. Override any variable on `:root`:
|
|
123
|
+
|
|
124
|
+
```css
|
|
125
|
+
:root {
|
|
126
|
+
--primary: oklch(0.65 0.25 270);
|
|
127
|
+
--background: oklch(0.15 0.02 260);
|
|
128
|
+
--glass-blur: 16px;
|
|
129
|
+
--glass-saturate: 140%;
|
|
130
|
+
--radius-medium: 8px;
|
|
131
|
+
--space-4: 1.5rem;
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Key design tokens
|
|
136
|
+
|
|
137
|
+
| Token | Default | Description |
|
|
138
|
+
| :--- | :--- | :--- |
|
|
139
|
+
| `--primary` | Brand blue | Primary action color |
|
|
140
|
+
| `--danger` | Red | Destructive action color |
|
|
141
|
+
| `--success` | Green | Positive feedback color |
|
|
142
|
+
| `--warning` | Yellow | Warning color |
|
|
143
|
+
| `--glass-blur` | `12px` | Backdrop blur intensity |
|
|
144
|
+
| `--glass-saturate` | `120%` | Backdrop saturation |
|
|
145
|
+
| `--radius-medium` | Border radius for components |
|
|
146
|
+
| `--space-1` – `--space-8` | Spacing scale |
|
|
147
|
+
| `--text-1` – `--text-7` | Type scale |
|
|
148
|
+
|
|
149
|
+
Light and dark modes are automatic via `prefers-color-scheme` using CSS `light-dark()`.
|
|
150
|
+
|
|
151
|
+
<br />
|
|
152
|
+
|
|
153
|
+
## Toast API
|
|
154
|
+
|
|
155
|
+
```js
|
|
156
|
+
// Simple text toast
|
|
157
|
+
window.ot.toast("File saved successfully", {
|
|
158
|
+
variant: "success", // "info" | "success" | "danger" | "warning"
|
|
159
|
+
duration: 4000, // ms, 0 = persistent
|
|
160
|
+
placement: "top-right", // "top-right" | "top-center" | "bottom-right" | "bottom-center" | "bottom-left"
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// Custom element toast
|
|
164
|
+
window.ot.toast.el(myElement, { placement: "bottom-center" });
|
|
165
|
+
|
|
166
|
+
// Clear all toasts
|
|
167
|
+
window.ot.toast.clear();
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
<br />
|
|
171
|
+
|
|
172
|
+
## Bundle Size
|
|
173
|
+
|
|
174
|
+
| File | Raw | Gzipped |
|
|
175
|
+
| :--- | ---: | ---: |
|
|
176
|
+
| `oat-glassed.min.css` | 41.8 KB | **8.2 KB** |
|
|
177
|
+
| `oat-glassed.min.js` | 7.8 KB | **2.9 KB** |
|
|
178
|
+
| **Total** | **49.6 KB** | **~11.1 KB** |
|
|
179
|
+
|
|
180
|
+
Individual source files are also available in the `css/` and `js/` directories if you prefer to import only what you need.
|
|
181
|
+
|
|
182
|
+
<br />
|
|
183
|
+
|
|
184
|
+
## Browser Support
|
|
185
|
+
|
|
186
|
+
Oat Glassed targets modern evergreen browsers:
|
|
187
|
+
|
|
188
|
+
- Chrome / Edge 110+
|
|
189
|
+
- Firefox 115+
|
|
190
|
+
- Safari 16.4+
|
|
191
|
+
|
|
192
|
+
Uses modern CSS features: `@layer`, `light-dark()`, `oklch()`, `backdrop-filter`, Popover API.
|
|
193
|
+
|
|
194
|
+
<br />
|
|
195
|
+
|
|
196
|
+
## Development
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
# Build CSS + JS
|
|
200
|
+
make dist
|
|
201
|
+
|
|
202
|
+
# Build CSS only
|
|
203
|
+
make css
|
|
204
|
+
|
|
205
|
+
# Build JS only
|
|
206
|
+
make js
|
|
207
|
+
|
|
208
|
+
# Show bundle sizes
|
|
209
|
+
make size
|
|
210
|
+
|
|
211
|
+
# Clean build artifacts
|
|
212
|
+
make clean
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
Build tooling is intentionally minimal — just `esbuild` via `npx` and `gzip`. No webpack, no PostCSS, no config files.
|
|
216
|
+
|
|
217
|
+
<br />
|
|
218
|
+
|
|
219
|
+
## Accessibility
|
|
220
|
+
|
|
221
|
+
- Keyboard navigation for all interactive components (Arrow keys, Home, End, Enter, Escape)
|
|
222
|
+
- ARIA attributes managed automatically (`aria-selected`, `aria-expanded`, `aria-controls`, `aria-labelledby`)
|
|
223
|
+
- Semantic HTML elements used wherever possible (`<dialog>`, `<details>`, `<output>`, `<meter>`, `<progress>`)
|
|
224
|
+
- Progressive enhancement — tooltips fall back to native `title`, accordions work without JS
|
|
225
|
+
- Screen reader tested
|
|
226
|
+
|
|
227
|
+
<br />
|
|
228
|
+
|
|
229
|
+
## What's Different from Upstream Oat
|
|
230
|
+
|
|
231
|
+
Oat Glassed builds on [Oat UI](https://github.com/knadh/oat) with a frosted-glass aesthetic inspired by shadcn defaults and Tailwind conventions, optimised for smooth 60fps rendering — `--glass-blur` is tuned to 18px, `--glass-saturate` to 140%, glass components use `contain: paint`, and fixed/sticky surfaces carry `will-change` hints for GPU compositing. Five new components are added: **Nav**, **Tag**, **Avatar**, **Empty State**, and **Command Palette**. An `index.js` entry point bundles all modules, the build uses `npx esbuild` instead of a global install, and docs are updated to reflect the Oat Glassed identity.
|
|
232
|
+
|
|
233
|
+
<br />
|
|
234
|
+
|
|
235
|
+
## Contributing
|
|
236
|
+
|
|
237
|
+
Contributions are welcome! Please read the [Contributing Guide](CONTRIBUTING.md) before opening a PR.
|
|
238
|
+
|
|
239
|
+
- **Bug fixes** — open an issue first to confirm, then send a PR with screenshots of visual changes.
|
|
240
|
+
- **New features** — open an issue to discuss before sending a PR. The library aims to stay minimal (~10KB gzipped).
|
|
241
|
+
- **Typos & minor fixes** — go straight to a PR.
|
|
242
|
+
|
|
243
|
+
## Support Upstream
|
|
244
|
+
|
|
245
|
+
Oat Glassed is a fork of [Oat UI](https://github.com/knadh/oat) by [Kailash Nadh](https://github.com/knadh). If you find this project useful, please also consider:
|
|
246
|
+
|
|
247
|
+
- Starring and contributing to the [upstream Oat repository](https://github.com/knadh/oat)
|
|
248
|
+
- Following the [upstream PR guidelines](https://github.com/knadh/oat/issues/74) when your contribution applies to the base library as well
|
|
249
|
+
|
|
250
|
+
## Credits
|
|
251
|
+
|
|
252
|
+
Forked from [Oat UI](https://github.com/knadh/oat) by [Kailash Nadh](https://github.com/knadh). Glassmorphism redesign and additional components by [good-lly](https://github.com/good-lly).
|
|
253
|
+
|
|
254
|
+
## License
|
|
255
|
+
|
|
256
|
+
[MIT](LICENSE)
|
package/css/00-base.css
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
tab-size: 4;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
/* Top-layer elements don't inherit from body. Set explicitly. */
|
|
18
17
|
body, dialog, [popover] {
|
|
19
18
|
font-family: var(--font-sans);
|
|
20
19
|
font-size: var(--text-regular);
|
|
@@ -43,8 +42,10 @@
|
|
|
43
42
|
}
|
|
44
43
|
|
|
45
44
|
h1, h2, h3, h4, h5, h6 {
|
|
45
|
+
font-family: var(--font-display);
|
|
46
46
|
font-weight: var(--font-semibold);
|
|
47
|
-
line-height: 1.
|
|
47
|
+
line-height: 1.2;
|
|
48
|
+
letter-spacing: -0.01em;
|
|
48
49
|
|
|
49
50
|
&:first-child {
|
|
50
51
|
margin-block-start: 0;
|
|
@@ -93,10 +94,10 @@
|
|
|
93
94
|
color: var(--link);
|
|
94
95
|
text-decoration: underline;
|
|
95
96
|
text-underline-offset: 2px;
|
|
96
|
-
transition:
|
|
97
|
+
transition: opacity var(--transition-fast);
|
|
97
98
|
|
|
98
99
|
&:hover {
|
|
99
|
-
|
|
100
|
+
opacity: 0.8;
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
|
|
@@ -109,27 +110,25 @@
|
|
|
109
110
|
}
|
|
110
111
|
|
|
111
112
|
small {
|
|
112
|
-
font-size: var(--text-
|
|
113
|
+
font-size: var(--text-8);
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
code {
|
|
116
117
|
font-family: var(--font-mono);
|
|
117
118
|
font-size: 0.875em;
|
|
118
119
|
padding: calc(var(--space-1) / 2) var(--space-2);
|
|
119
|
-
background-color: var(--
|
|
120
|
-
border: 1px solid var(--border);
|
|
120
|
+
background-color: var(--surface-high);
|
|
121
121
|
border-radius: var(--radius-small);
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
pre {
|
|
125
125
|
font-family: var(--font-mono);
|
|
126
126
|
padding: var(--space-5);
|
|
127
|
-
background-color:
|
|
128
|
-
border: 1px solid var(--
|
|
127
|
+
background-color: var(--surface-lowest);
|
|
128
|
+
border: 1px solid var(--border);
|
|
129
129
|
border-radius: var(--radius-medium);
|
|
130
130
|
overflow-x: auto;
|
|
131
131
|
margin-block-end: var(--space-4);
|
|
132
|
-
box-shadow: var(--glass-edge);
|
|
133
132
|
|
|
134
133
|
code {
|
|
135
134
|
padding: 0;
|
|
@@ -140,18 +139,19 @@
|
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
blockquote {
|
|
143
|
-
border-inline-start: 3px solid
|
|
142
|
+
border-inline-start: 3px solid rgb(from var(--primary) r g b / 0.4);
|
|
144
143
|
padding: var(--space-3) var(--space-4);
|
|
145
144
|
margin: var(--space-4) 0;
|
|
146
145
|
color: var(--muted-foreground);
|
|
147
146
|
font-style: italic;
|
|
148
|
-
background-color: var(--
|
|
147
|
+
background-color: var(--surface-low);
|
|
149
148
|
border-radius: 0 var(--radius-small) var(--radius-small) 0;
|
|
150
149
|
}
|
|
151
150
|
|
|
152
151
|
hr {
|
|
153
152
|
border: none;
|
|
154
|
-
|
|
153
|
+
height: 1px;
|
|
154
|
+
background-color: var(--border);
|
|
155
155
|
margin: var(--space-2) 0;
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
mark {
|
|
176
|
-
background-color: rgb(from var(--warning) r g b / 0.
|
|
176
|
+
background-color: rgb(from var(--warning) r g b / 0.25);
|
|
177
177
|
padding: calc(var(--space-1) / 2) var(--space-1);
|
|
178
178
|
border-radius: var(--radius-small);
|
|
179
179
|
}
|
package/css/01-theme.css
CHANGED
|
@@ -1,64 +1,51 @@
|
|
|
1
1
|
@layer theme {
|
|
2
2
|
:root {
|
|
3
|
-
color-scheme:
|
|
4
|
-
|
|
5
|
-
/* Surface
|
|
6
|
-
--background:
|
|
7
|
-
--foreground:
|
|
8
|
-
--card:
|
|
9
|
-
--card-foreground:
|
|
10
|
-
--primary:
|
|
11
|
-
--primary-foreground:
|
|
12
|
-
--secondary:
|
|
13
|
-
--secondary-foreground:
|
|
14
|
-
--muted:
|
|
15
|
-
--muted-foreground:
|
|
16
|
-
--faint:
|
|
17
|
-
--faint-foreground:
|
|
18
|
-
--accent:
|
|
19
|
-
--link:
|
|
20
|
-
|
|
21
|
-
/* Semantic —
|
|
22
|
-
--danger:
|
|
23
|
-
--danger-foreground:
|
|
24
|
-
--success:
|
|
25
|
-
--success-foreground:
|
|
26
|
-
--warning:
|
|
27
|
-
--warning-foreground: #
|
|
28
|
-
|
|
29
|
-
/*
|
|
30
|
-
--border:
|
|
31
|
-
--input:
|
|
32
|
-
--ring:
|
|
33
|
-
|
|
34
|
-
/*
|
|
35
|
-
--
|
|
36
|
-
--
|
|
37
|
-
--
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
135deg,
|
|
50
|
-
rgb(255 255 255 / 0.1) 0%,
|
|
51
|
-
rgb(255 255 255 / 0.03) 40%,
|
|
52
|
-
rgb(255 255 255 / 0) 60%
|
|
53
|
-
)
|
|
54
|
-
);
|
|
55
|
-
/* Faux glass edge — Tier 2 (inset highlights simulate glass reflection) */
|
|
56
|
-
--glass-edge: light-dark(
|
|
57
|
-
inset 0 0 0 1px rgb(255 255 255 / 0.12), inset 0 1px 0 rgb(255 255 255 / 0.15), 0 8px 32px rgb(0 0 0 / 0.08),
|
|
58
|
-
inset 0 0 0 1px rgb(255 255 255 / 0.08), inset 0 1px 0 rgb(255 255 255 / 0.1), 0 8px 32px rgb(0 0 0 / 0.25)
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
/* ==================== */
|
|
3
|
+
color-scheme: dark;
|
|
4
|
+
|
|
5
|
+
/* Surface hierarchy — "Deep Code" tonal architecture */
|
|
6
|
+
--background: #131317;
|
|
7
|
+
--foreground: #e8eaed;
|
|
8
|
+
--card: #1f1f23;
|
|
9
|
+
--card-foreground: #e8eaed;
|
|
10
|
+
--primary: #4a9eff;
|
|
11
|
+
--primary-foreground: #0e0e12;
|
|
12
|
+
--secondary: #2a2a2e;
|
|
13
|
+
--secondary-foreground: #c0c7d4;
|
|
14
|
+
--muted: #1f1f23;
|
|
15
|
+
--muted-foreground: #8b95a5;
|
|
16
|
+
--faint: #191920;
|
|
17
|
+
--faint-foreground: #6b7280;
|
|
18
|
+
--accent: #2a2a2e;
|
|
19
|
+
--link: #a4c9ff;
|
|
20
|
+
|
|
21
|
+
/* Semantic — tuned for dark-charcoal legibility */
|
|
22
|
+
--danger: #ff6b6b;
|
|
23
|
+
--danger-foreground: #0e0e12;
|
|
24
|
+
--success: #4ade80;
|
|
25
|
+
--success-foreground: #0e0e12;
|
|
26
|
+
--warning: #fbbf24;
|
|
27
|
+
--warning-foreground: #131317;
|
|
28
|
+
|
|
29
|
+
/* Ghost borders — the only permitted edges */
|
|
30
|
+
--border: rgb(255 255 255 / 0.06);
|
|
31
|
+
--input: rgb(255 255 255 / 0.08);
|
|
32
|
+
--ring: #a4c9ff;
|
|
33
|
+
|
|
34
|
+
/* Tonal surface layers for nesting depth */
|
|
35
|
+
--surface-lowest: #0e0e12;
|
|
36
|
+
--surface-low: #191920;
|
|
37
|
+
--surface: #1f1f23;
|
|
38
|
+
--surface-high: #2a2a2e;
|
|
39
|
+
--surface-highest: #35353a;
|
|
40
|
+
|
|
41
|
+
/* Glass — 20px blur for command palettes & floating UI */
|
|
42
|
+
--glass-blur: 20px;
|
|
43
|
+
--glass-saturate: 130%;
|
|
44
|
+
--glass-border: rgb(255 255 255 / 0.08);
|
|
45
|
+
--glass-highlight: none;
|
|
46
|
+
--glass-edge: none;
|
|
47
|
+
|
|
48
|
+
/* Spacing — strict 4px grid */
|
|
62
49
|
--space-1: 0.25rem;
|
|
63
50
|
--space-2: 0.5rem;
|
|
64
51
|
--space-3: 0.75rem;
|
|
@@ -72,15 +59,17 @@
|
|
|
72
59
|
--space-16: 4rem;
|
|
73
60
|
--space-18: 4.5rem;
|
|
74
61
|
|
|
75
|
-
--radius-small: 0.
|
|
76
|
-
--radius-medium: 0.
|
|
77
|
-
--radius-large:
|
|
62
|
+
--radius-small: 0.375rem;
|
|
63
|
+
--radius-medium: 0.75rem;
|
|
64
|
+
--radius-large: 1rem;
|
|
78
65
|
--radius-full: 9999px;
|
|
79
66
|
|
|
80
|
-
--bar-height: 0.
|
|
67
|
+
--bar-height: 0.375rem;
|
|
81
68
|
|
|
82
|
-
|
|
83
|
-
--font-
|
|
69
|
+
/* Dual-type system */
|
|
70
|
+
--font-display: 'Space Grotesk', system-ui, sans-serif;
|
|
71
|
+
--font-sans: 'Inter', system-ui, sans-serif;
|
|
72
|
+
--font-mono: 'Space Mono', ui-monospace, 'SF Mono', Consolas, monospace;
|
|
84
73
|
|
|
85
74
|
--text-1: clamp(1.75rem, 1.5rem + 1.1vw, 2.25rem);
|
|
86
75
|
--text-2: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
|
|
@@ -90,31 +79,20 @@
|
|
|
90
79
|
--text-6: 1rem;
|
|
91
80
|
--text-7: 0.875rem;
|
|
92
81
|
--text-8: 0.75rem;
|
|
93
|
-
--text-regular: var(--text-
|
|
82
|
+
--text-regular: var(--text-7);
|
|
94
83
|
|
|
95
|
-
--leading-normal: 1.
|
|
84
|
+
--leading-normal: 1.5;
|
|
96
85
|
|
|
97
86
|
--font-normal: 400;
|
|
98
87
|
--font-medium: 500;
|
|
99
88
|
--font-semibold: 600;
|
|
100
|
-
--font-bold:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
--shadow-
|
|
107
|
-
0 4px 20px -4px rgb(0 0 0 / 0.06), 0 1px 4px rgb(0 0 0 / 0.03),
|
|
108
|
-
0 4px 20px -4px rgb(0 0 0 / 0.35), 0 1px 4px rgb(0 0 0 / 0.2)
|
|
109
|
-
);
|
|
110
|
-
--shadow-large: light-dark(
|
|
111
|
-
0 16px 48px -8px rgb(0 0 0 / 0.07), 0 4px 16px -4px rgb(0 0 0 / 0.03),
|
|
112
|
-
0 16px 48px -8px rgb(0 0 0 / 0.45), 0 4px 16px -4px rgb(0 0 0 / 0.2)
|
|
113
|
-
);
|
|
114
|
-
--shadow-glow: light-dark(
|
|
115
|
-
0 0 0 0.5px rgb(0 0 0 / 0.02), 0 4px 24px -4px rgb(0 0 0 / 0.05),
|
|
116
|
-
0 0 0 0.5px rgb(255 255 255 / 0.05), 0 4px 28px -4px rgb(0 0 0 / 0.4)
|
|
117
|
-
);
|
|
89
|
+
--font-bold: 700;
|
|
90
|
+
|
|
91
|
+
/* No drop shadows — tonal layering only */
|
|
92
|
+
--shadow-small: none;
|
|
93
|
+
--shadow-medium: none;
|
|
94
|
+
--shadow-large: none;
|
|
95
|
+
--shadow-glow: none;
|
|
118
96
|
|
|
119
97
|
--transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
120
98
|
--transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -128,19 +106,9 @@
|
|
|
128
106
|
:root {
|
|
129
107
|
--glass-blur: 0px;
|
|
130
108
|
--glass-saturate: 100%;
|
|
131
|
-
--card: light-dark(rgb(243 244 246 / 0.95), rgb(17 24 39 / 0.95));
|
|
132
|
-
--secondary: light-dark(rgb(229 231 235 / 0.95), rgb(31 41 55 / 0.92));
|
|
133
|
-
--muted: light-dark(rgb(229 231 235 / 0.92), rgb(31 41 55 / 0.88));
|
|
134
|
-
--faint: light-dark(rgb(243 244 246 / 0.9), rgb(17 24 39 / 0.85));
|
|
135
|
-
--accent: light-dark(rgb(229 231 235 / 0.95), rgb(31 41 55 / 0.92));
|
|
136
|
-
--glass-highlight: none;
|
|
137
|
-
--glass-edge: none;
|
|
138
109
|
}
|
|
139
110
|
|
|
140
|
-
*,
|
|
141
|
-
*::before,
|
|
142
|
-
*::after,
|
|
143
|
-
*::backdrop {
|
|
111
|
+
*, *::before, *::after, *::backdrop {
|
|
144
112
|
backdrop-filter: none !important;
|
|
145
113
|
-webkit-backdrop-filter: none !important;
|
|
146
114
|
}
|
package/css/accordion.css
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
details {
|
|
3
|
-
|
|
3
|
+
background-color: var(--surface);
|
|
4
4
|
border-radius: var(--radius-medium);
|
|
5
5
|
overflow: hidden;
|
|
6
|
-
background-color: light-dark(rgb(255 255 255 / 0.35), rgb(255 255 255 / 0.02));
|
|
7
|
-
background-image: var(--glass-highlight);
|
|
8
|
-
box-shadow: var(--glass-edge);
|
|
9
6
|
contain: paint;
|
|
10
7
|
content-visibility: auto;
|
|
11
8
|
|
|
12
9
|
& + details {
|
|
13
|
-
margin-top: -
|
|
14
|
-
border-start-start-radius: 0;
|
|
15
|
-
border-start-end-radius: 0;
|
|
10
|
+
margin-top: var(--space-1);
|
|
16
11
|
}
|
|
17
12
|
|
|
18
13
|
&:has(+ details) {
|
|
@@ -20,8 +15,13 @@
|
|
|
20
15
|
border-end-end-radius: 0;
|
|
21
16
|
}
|
|
22
17
|
|
|
18
|
+
& + details {
|
|
19
|
+
border-start-start-radius: 0;
|
|
20
|
+
border-start-end-radius: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
23
|
&[open] summary {
|
|
24
|
-
|
|
24
|
+
background-color: var(--surface-high);
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
transition: background-color var(--transition-fast);
|
|
38
38
|
|
|
39
39
|
&:hover {
|
|
40
|
-
background-color: var(--
|
|
40
|
+
background-color: var(--surface-high);
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&::-webkit-details-marker, &::marker {
|