@poppyui/core 0.1.0 → 0.1.2-next.0c371f0
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 +21 -21
- package/README.md +225 -166
- package/dist/components/accordion.css +1 -1
- package/dist/components/button.css +3 -3
- package/dist/components/checkbox.css +2 -2
- package/dist/components/drawer.css +4 -4
- package/dist/components/dropdown.css +3 -3
- package/dist/components/input.css +2 -2
- package/dist/components/modal.css +6 -6
- package/dist/components/progress.css +1 -1
- package/dist/components/radio.css +1 -1
- package/dist/components/skeleton.css +1 -1
- package/dist/components/stat.css +1 -1
- package/dist/components/tabs.css +2 -2
- package/dist/components/toast.css +2 -2
- package/dist/components/toggle.css +1 -1
- package/dist/core.css +2 -0
- package/dist/poppy.css +32 -30
- package/dist/poppy.min.css +1 -1
- package/package.json +53 -53
- package/src/base/base.css +40 -40
- package/src/components/accordion.css +98 -98
- package/src/components/alert.css +58 -58
- package/src/components/avatar.css +67 -67
- package/src/components/badge.css +87 -87
- package/src/components/breadcrumbs.css +68 -68
- package/src/components/button.css +139 -139
- package/src/components/card.css +87 -87
- package/src/components/checkbox.css +77 -77
- package/src/components/divider.css +46 -46
- package/src/components/drawer.css +84 -84
- package/src/components/dropdown.css +100 -100
- package/src/components/field.css +71 -71
- package/src/components/input.css +127 -127
- package/src/components/join.css +70 -70
- package/src/components/kbd.css +35 -35
- package/src/components/loading.css +74 -74
- package/src/components/menu.css +147 -147
- package/src/components/modal.css +83 -83
- package/src/components/navbar.css +54 -54
- package/src/components/progress.css +91 -91
- package/src/components/radio.css +65 -65
- package/src/components/range.css +83 -83
- package/src/components/skeleton.css +43 -43
- package/src/components/stat.css +54 -54
- package/src/components/steps.css +100 -100
- package/src/components/table.css +65 -65
- package/src/components/tabs.css +125 -125
- package/src/components/toast.css +80 -80
- package/src/components/toggle.css +76 -76
- package/src/components/tooltip.css +59 -59
- package/src/core.css +7 -7
- package/src/poppy.css +34 -34
- package/src/themes/dark.css +33 -31
- package/src/themes/light.css +33 -32
- package/src/tokens/tokens.css +52 -52
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Shashikanth Kota
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shashikanth Kota
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,166 +1,225 @@
|
|
|
1
|
-
# PoppyUI
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
|
114
|
-
|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
|
124
|
-
|
|
|
125
|
-
|
|
|
126
|
-
|
|
|
127
|
-
|
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
|
|
|
138
|
-
|
|
|
139
|
-
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
##
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
1
|
+
# PoppyUI
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@poppyui/core)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+
|
|
8
|
+
**[Docs & live demo → poppyui.com](https://poppyui.com)**
|
|
9
|
+
|
|
10
|
+
A framework-agnostic, CSS-first design system. You put semantic classes on plain HTML (`.btn`, `.modal`, `.tabs`), and the browser supplies the behavior: `<dialog>`, `popover`, Invoker Commands, `<details>` and CSS anchor positioning. PoppyUI ships **zero JavaScript** and has **no runtime dependencies**.
|
|
11
|
+
|
|
12
|
+
<!-- TODO: add a screenshot or GIF here, e.g.  -->
|
|
13
|
+
|
|
14
|
+
## Why PoppyUI
|
|
15
|
+
|
|
16
|
+
- **Zero JS, really.** Modals, drawers, dropdowns, tabs, accordions and toasts all open and close through platform features. Nothing has to hydrate, and there are no event listeners to leak.
|
|
17
|
+
- **Any stack, no build step.** One stylesheet works in plain HTML, React, Angular, Vue, Svelte and SSR. You don't need Tailwind, PostCSS or a plugin.
|
|
18
|
+
- **Your CSS always wins.** Everything lives in `@layer poppy.*`, so a plain `.btn { … }` overrides it without `!important`.
|
|
19
|
+
- **Accessible by default.** It uses native elements, so focus trapping, Esc to close and keyboard navigation come from the browser. Tested with axe in light and dark themes.
|
|
20
|
+
- **Small.** ~7 kB gzipped for all 30 components. You can also import only the ones you use.
|
|
21
|
+
|
|
22
|
+
## 30-second quickstart
|
|
23
|
+
|
|
24
|
+
### Plain HTML (CDN)
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@poppyui/core@0.1/dist/poppy.min.css" />
|
|
28
|
+
|
|
29
|
+
<button class="btn btn-primary" commandfor="hello" command="show-modal">Say hi</button>
|
|
30
|
+
|
|
31
|
+
<dialog id="hello" class="modal" aria-labelledby="hello-title" closedby="any">
|
|
32
|
+
<h2 id="hello-title" class="modal-title">Hi 👋</h2>
|
|
33
|
+
<p>No JavaScript was harmed in the making of this modal.</p>
|
|
34
|
+
<div class="modal-actions">
|
|
35
|
+
<button class="btn" commandfor="hello" command="close">Close</button>
|
|
36
|
+
</div>
|
|
37
|
+
</dialog>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Pin the major/minor version (`@0.1`) so a future release can't break your page.
|
|
41
|
+
|
|
42
|
+
### React
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
pnpm add @poppyui/core # or npm i / yarn add
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```jsx
|
|
49
|
+
import "@poppyui/core";
|
|
50
|
+
|
|
51
|
+
export function DeleteButton() {
|
|
52
|
+
return (
|
|
53
|
+
<>
|
|
54
|
+
<button className="btn btn-danger" commandfor="confirm" command="show-modal">Delete</button>
|
|
55
|
+
<dialog id="confirm" className="modal" aria-labelledby="confirm-title">
|
|
56
|
+
<h2 id="confirm-title" className="modal-title">Are you sure?</h2>
|
|
57
|
+
<div className="modal-actions">
|
|
58
|
+
<button className="btn" commandfor="confirm" command="close">Cancel</button>
|
|
59
|
+
</div>
|
|
60
|
+
</dialog>
|
|
61
|
+
</>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
React 19 passes unknown lowercase attributes like `commandfor` straight to the DOM. If TypeScript complains, add a declaration file:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
// src/poppy.d.ts
|
|
70
|
+
import "react";
|
|
71
|
+
|
|
72
|
+
declare module "react" {
|
|
73
|
+
interface ButtonHTMLAttributes<T> {
|
|
74
|
+
commandfor?: string;
|
|
75
|
+
command?: string;
|
|
76
|
+
}
|
|
77
|
+
interface DialogHTMLAttributes<T> {
|
|
78
|
+
closedby?: "any" | "closerequest" | "none";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Angular
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
pnpm add @poppyui/core
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Add the CSS in `angular.json` under `projects.<app>.architect.build.options.styles`:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
"styles": ["node_modules/@poppyui/core/dist/poppy.css", "src/styles.css"]
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<button class="btn btn-primary" popovertarget="menu">Options</button>
|
|
97
|
+
<div id="menu" class="dropdown" popover>
|
|
98
|
+
<ul class="dropdown-menu">
|
|
99
|
+
<li><button type="button">Edit</button></li>
|
|
100
|
+
</ul>
|
|
101
|
+
</div>
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Angular binds unknown attributes as-is in templates. For dynamic values, use `[attr.commandfor]="id"`.
|
|
105
|
+
|
|
106
|
+
## Components
|
|
107
|
+
|
|
108
|
+
Full examples for every component are on **[poppyui.com](https://poppyui.com)**.
|
|
109
|
+
|
|
110
|
+
| Group | Component | Base class | Modifiers |
|
|
111
|
+
| --- | --- | --- | --- |
|
|
112
|
+
| **Actions** | Button | `.btn` | `-primary` `-secondary` `-ghost` `-outline` `-danger` · `-sm` `-lg` · `-loading` |
|
|
113
|
+
| | Dropdown | `.dropdown` + `popover` | `.dropdown-menu` |
|
|
114
|
+
| | Modal | `<dialog class="modal">` | `.modal-title` `.modal-actions` · `closedby="any"` |
|
|
115
|
+
| | Drawer | `<dialog class="drawer">` | `.drawer-end` |
|
|
116
|
+
| **Navigation** | Navbar | `.navbar` | `-start` `-center` `-end` · `-sticky` |
|
|
117
|
+
| | Menu | `.menu` | `.menu-title` |
|
|
118
|
+
| | Tabs | `.tabs` (radio-driven) | `.tab` `.tab-input` `.tab-panel` · `.tabs-boxed` |
|
|
119
|
+
| | Breadcrumbs | `.breadcrumbs` | |
|
|
120
|
+
| | Steps | `.steps` | `.step` · `.steps-vertical` |
|
|
121
|
+
| **Data display** | Card | `.card` | `-body` `-title` `-media` `-actions` · `-bordered` `-side` |
|
|
122
|
+
| | Accordion | `.accordion` + `<details>` | `.accordion-item` `.accordion-content` |
|
|
123
|
+
| | Table | `.table` | `-zebra` `-hover` `-sm` · `.table-wrap` |
|
|
124
|
+
| | Stat | `.stats` / `.stat` | `-title` `-value` `-desc` |
|
|
125
|
+
| | Badge | `.badge` | colors · `-outline` `-soft` · `-sm` `-lg` |
|
|
126
|
+
| | Avatar | `.avatar` | `-sm` `-lg` `-square` `-online` · `.avatar-group` |
|
|
127
|
+
| | Kbd | `.kbd` | `-sm` `-lg` |
|
|
128
|
+
| | Tooltip | `.tooltip` + `data-tip` | `-bottom` `-start` `-end` |
|
|
129
|
+
| **Feedback** | Alert | `.alert` | `-info` `-success` `-warning` `-danger` · `.alert-title` |
|
|
130
|
+
| | Toast | `.toast` + `popover="manual"` | wraps `.alert` |
|
|
131
|
+
| | Progress | `<progress class="progress">` | colors |
|
|
132
|
+
| | Loading | `.loading` | `-dots` `-ring` · `-sm` `-lg` |
|
|
133
|
+
| | Skeleton | `.skeleton` | `-text` `-circle` |
|
|
134
|
+
| **Forms** | Input | `.input` | colors · `-ghost` · `-sm` `-lg` |
|
|
135
|
+
| | Select / Textarea | `.select` / `.textarea` | `-ghost` · `-sm` `-lg` |
|
|
136
|
+
| | Checkbox / Radio / Toggle / Range | `.checkbox` `.radio` `.toggle` `.range` | colors · `-sm` `-lg` |
|
|
137
|
+
| | Field | `.field` / `.fieldset` | `.field-label` `.field-hint` `.field-error` `.fieldset-legend` `.label-inline` |
|
|
138
|
+
| **Layout** | Join | `.join` | groups buttons/inputs |
|
|
139
|
+
| | Divider | `.divider` | `-vertical` |
|
|
140
|
+
|
|
141
|
+
**Colors** are `-primary` `-secondary` `-info` `-success` `-warning` `-danger`.
|
|
142
|
+
|
|
143
|
+
## Cherry-picking components
|
|
144
|
+
|
|
145
|
+
```css
|
|
146
|
+
@import "@poppyui/core/core.css"; /* tokens, themes, base */
|
|
147
|
+
@import "@poppyui/core/components/button.css"; /* only what you use */
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Themes
|
|
151
|
+
|
|
152
|
+
Light is the default. Set `data-theme="dark"` (or `"light"`) on **any** element, and that subtree switches theme. Themes nest.
|
|
153
|
+
|
|
154
|
+
```html
|
|
155
|
+
<html data-theme="dark">…</html>
|
|
156
|
+
<section data-theme="light">…</section>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## Overriding styles
|
|
160
|
+
|
|
161
|
+
Every PoppyUI rule lives in the `@layer poppy.*` layers (`poppy.tokens`, `poppy.base`, `poppy.components`). Any unlayered CSS you write wins without `!important`:
|
|
162
|
+
|
|
163
|
+
```css
|
|
164
|
+
.btn { border-radius: 0; } /* beats PoppyUI */
|
|
165
|
+
:root { --color-primary: oklch(55% 0.2 150); } /* rebrand */
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Font: Poppins
|
|
169
|
+
|
|
170
|
+
PoppyUI's font stack starts with [Poppins](https://fonts.google.com/specimen/Poppins). The font is **not bundled**, so the shipped CSS makes no third-party requests. Load it yourself:
|
|
171
|
+
|
|
172
|
+
```html
|
|
173
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
174
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
175
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" />
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
You can also self-host it. Without Poppins, text falls back to the system UI font. To use another font, override `--font-sans`.
|
|
179
|
+
|
|
180
|
+
## Browser support
|
|
181
|
+
|
|
182
|
+
Statuses are from [web.dev Baseline](https://web.dev/baseline) / MDN, checked November 2026.
|
|
183
|
+
|
|
184
|
+
| Feature | Used for | Baseline status |
|
|
185
|
+
| --- | --- | --- |
|
|
186
|
+
| `<dialog>`, `showModal()`, `::backdrop` | Modal, focus trap, Esc | ✅ Widely available |
|
|
187
|
+
| Cascade layers (`@layer`) | Consumer CSS wins without `!important` | ✅ Widely available |
|
|
188
|
+
| `oklch()` | Color tokens | ✅ Widely available |
|
|
189
|
+
| `color-mix()` | Button hover | ✅ Widely available |
|
|
190
|
+
| CSS nesting | Source authoring (shipped as-is) | ✅ Widely available |
|
|
191
|
+
| Individual transforms (`translate`, `scale`) | Animations | ✅ Widely available |
|
|
192
|
+
| `:has()` | Field error messages, inline labels | ✅ Widely available |
|
|
193
|
+
| `:user-invalid` | Input and field validation styling | ✅ Widely available |
|
|
194
|
+
| Popover API (`popover`, `popovertarget`) | Dropdown, toast, light dismiss | 🟦 Newly available (2025) |
|
|
195
|
+
| `@starting-style` | Enter animations | 🟦 Newly available (2024) |
|
|
196
|
+
| `transition-behavior: allow-discrete` | Exit animations | 🟦 Newly available (2024) |
|
|
197
|
+
| Exclusive `<details name>` | Accordion | 🟦 Newly available (2024) |
|
|
198
|
+
| Invoker Commands (`commandfor` / `command`) | Opening the modal, drawer and dropdown with no JS | 🟦 Newly available (Dec 2025) |
|
|
199
|
+
| CSS anchor positioning | Dropdown placement | 🟦 Newly available (Jan 2026) |
|
|
200
|
+
| `::details-content`, `interpolate-size` | Accordion open/close animation | ⚠️ Limited (Chromium). Optional: without it the accordion opens instantly. |
|
|
201
|
+
| `appearance: base-select` | Customizable `.select` | ⚠️ Limited (Chromium). Optional: other browsers keep the native select with token colors. |
|
|
202
|
+
| `closedby` on `<dialog>` | Click outside to close the modal | ⚠️ Limited (not in Safari yet). Optional: Esc and close buttons still work. |
|
|
203
|
+
| `overlay` transition | Keeps the top layer during exit animations | ⚠️ Limited (Chromium). Optional: without it the exit animation is cut short. |
|
|
204
|
+
|
|
205
|
+
**Graceful degradation:**
|
|
206
|
+
|
|
207
|
+
- **No anchor positioning:** the dropdown opens as a sheet pinned to the bottom of the viewport. A top-layer popover cannot be placed relative to its trigger without JavaScript.
|
|
208
|
+
- **No Invoker Commands:** `commandfor` buttons do nothing. If you need older browsers, use `popovertarget` for dropdowns, or load an invokers polyfill yourself.
|
|
209
|
+
- **No `@starting-style`:** components appear without animating.
|
|
210
|
+
|
|
211
|
+
## Contributing
|
|
212
|
+
|
|
213
|
+
```sh
|
|
214
|
+
pnpm install
|
|
215
|
+
pnpm dev # test page at http://localhost:5173
|
|
216
|
+
pnpm build # dist/poppy.css, dist/poppy.min.css, dist/core.css, dist/components/*.css
|
|
217
|
+
pnpm test:install # once: Playwright Chromium
|
|
218
|
+
pnpm test # axe (light + dark) and keyboard tests
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The Angular demo app lives in the separate repo `poppyui-dev/app`. See [AGENTS.md](AGENTS.md) for contribution rules and [CHANGELOG.md](CHANGELOG.md) for changes.
|
|
222
|
+
|
|
223
|
+
## License
|
|
224
|
+
|
|
225
|
+
[MIT](LICENSE)
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
|
|
70
70
|
&::details-content {
|
|
71
71
|
block-size: 0;
|
|
72
|
-
transition: block-size var(--duration-normal) var(--ease-out),
|
|
72
|
+
transition: block-size var(--duration-normal) var(--ease-out),
|
|
73
73
|
content-visibility var(--duration-normal) allow-discrete;
|
|
74
74
|
overflow: clip;
|
|
75
75
|
}
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
white-space: nowrap;
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
user-select: none;
|
|
25
|
-
transition: background-color var(--duration-fast) var(--ease-out),
|
|
26
|
-
border-color var(--duration-fast) var(--ease-out),
|
|
27
|
-
color var(--duration-fast) var(--ease-out),
|
|
25
|
+
transition: background-color var(--duration-fast) var(--ease-out),
|
|
26
|
+
border-color var(--duration-fast) var(--ease-out),
|
|
27
|
+
color var(--duration-fast) var(--ease-out),
|
|
28
28
|
scale var(--duration-fast) var(--ease-out);
|
|
29
29
|
line-height: 1;
|
|
30
30
|
text-decoration: none;
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
block-size: var(--chk-size);
|
|
11
11
|
border: 2px solid var(--color-border);
|
|
12
12
|
border-radius: var(--radius-sm);
|
|
13
|
-
background: var(--color-
|
|
13
|
+
background: var(--color-field);
|
|
14
14
|
color: var(--chk-fg);
|
|
15
15
|
cursor: pointer;
|
|
16
|
-
transition: background-color var(--duration-fast) var(--ease-out),
|
|
16
|
+
transition: background-color var(--duration-fast) var(--ease-out),
|
|
17
17
|
border-color var(--duration-fast) var(--ease-out);
|
|
18
18
|
flex: none;
|
|
19
19
|
place-content: center;
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
box-shadow: var(--shadow-lg);
|
|
17
17
|
overscroll-behavior: contain;
|
|
18
18
|
translate: var(--drawer-shift) 0;
|
|
19
|
-
transition: translate var(--duration-normal) var(--ease-out),
|
|
20
|
-
overlay var(--duration-normal) allow-discrete,
|
|
19
|
+
transition: translate var(--duration-normal) var(--ease-out),
|
|
20
|
+
overlay var(--duration-normal) allow-discrete,
|
|
21
21
|
display var(--duration-normal) allow-discrete;
|
|
22
22
|
margin-inline-end: auto;
|
|
23
23
|
overflow: auto;
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
&::backdrop {
|
|
38
|
-
transition: background-color var(--duration-normal) var(--ease-out),
|
|
39
|
-
overlay var(--duration-normal) allow-discrete,
|
|
38
|
+
transition: background-color var(--duration-normal) var(--ease-out),
|
|
39
|
+
overlay var(--duration-normal) allow-discrete,
|
|
40
40
|
display var(--duration-normal) allow-discrete;
|
|
41
41
|
background-color: #0000;
|
|
42
42
|
}
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
box-shadow: var(--shadow-md);
|
|
13
13
|
opacity: 0;
|
|
14
14
|
translate: 0 calc(-1 * var(--space-1));
|
|
15
|
-
transition: opacity var(--duration-fast) var(--ease-out),
|
|
16
|
-
translate var(--duration-fast) var(--ease-out),
|
|
17
|
-
overlay var(--duration-fast) allow-discrete,
|
|
15
|
+
transition: opacity var(--duration-fast) var(--ease-out),
|
|
16
|
+
translate var(--duration-fast) var(--ease-out),
|
|
17
|
+
overlay var(--duration-fast) allow-discrete,
|
|
18
18
|
display var(--duration-fast) allow-discrete;
|
|
19
19
|
margin: 0;
|
|
20
20
|
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
padding-inline: var(--input-px);
|
|
12
12
|
border: 1px solid var(--input-border);
|
|
13
13
|
border-radius: var(--radius-md);
|
|
14
|
-
background: var(--color-
|
|
14
|
+
background: var(--color-field);
|
|
15
15
|
color: var(--color-base-content);
|
|
16
16
|
font: inherit;
|
|
17
17
|
font-size: var(--input-text);
|
|
18
|
-
transition: border-color var(--duration-fast) var(--ease-out),
|
|
18
|
+
transition: border-color var(--duration-fast) var(--ease-out),
|
|
19
19
|
background-color var(--duration-fast) var(--ease-out);
|
|
20
20
|
|
|
21
21
|
&::placeholder {
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
overscroll-behavior: contain;
|
|
14
14
|
opacity: 0;
|
|
15
15
|
translate: 0 var(--space-2);
|
|
16
|
-
transition: opacity var(--duration-normal) var(--ease-out),
|
|
17
|
-
translate var(--duration-normal) var(--ease-out),
|
|
18
|
-
scale var(--duration-normal) var(--ease-out),
|
|
19
|
-
overlay var(--duration-normal) allow-discrete,
|
|
16
|
+
transition: opacity var(--duration-normal) var(--ease-out),
|
|
17
|
+
translate var(--duration-normal) var(--ease-out),
|
|
18
|
+
scale var(--duration-normal) var(--ease-out),
|
|
19
|
+
overlay var(--duration-normal) allow-discrete,
|
|
20
20
|
display var(--duration-normal) allow-discrete;
|
|
21
21
|
overflow: auto;
|
|
22
22
|
scale: .96;
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&::backdrop {
|
|
37
|
-
transition: background-color var(--duration-normal) var(--ease-out),
|
|
38
|
-
overlay var(--duration-normal) allow-discrete,
|
|
37
|
+
transition: background-color var(--duration-normal) var(--ease-out),
|
|
38
|
+
overlay var(--duration-normal) allow-discrete,
|
|
39
39
|
display var(--duration-normal) allow-discrete;
|
|
40
40
|
background-color: #0000;
|
|
41
41
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
&:indeterminate {
|
|
32
|
-
background: linear-gradient(90deg, transparent 0 30%, var(--progress-color) 30% 70%, transparent 70% 100%) 0 0 / 200% 100%
|
|
32
|
+
background: linear-gradient(90deg, transparent 0 30%, var(--progress-color) 30% 70%, transparent 70% 100%) 0 0 / 200% 100%
|
|
33
33
|
no-repeat var(--color-base-300);
|
|
34
34
|
animation: 1.4s linear infinite poppy-progress-slide;
|
|
35
35
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
block-size: var(--radio-size);
|
|
10
10
|
border: 2px solid var(--color-border);
|
|
11
11
|
border-radius: var(--radius-full);
|
|
12
|
-
background: var(--color-
|
|
12
|
+
background: var(--color-field);
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
transition: border-color var(--duration-fast) var(--ease-out);
|
|
15
15
|
flex: none;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
@layer poppy.components {
|
|
4
4
|
.skeleton {
|
|
5
5
|
border-radius: var(--radius-md);
|
|
6
|
-
background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--color-base-100) 60%, transparent), transparent) -100% 0 /
|
|
6
|
+
background: linear-gradient(90deg, transparent, color-mix(in oklch, var(--color-base-100) 60%, transparent), transparent) -100% 0 /
|
|
7
7
|
50% 100% no-repeat var(--color-base-300);
|
|
8
8
|
animation: 1.5s ease-in-out infinite poppy-skeleton-shimmer;
|
|
9
9
|
display: block;
|
package/dist/components/stat.css
CHANGED
package/dist/components/tabs.css
CHANGED
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
font-size: var(--tabs-font);
|
|
41
41
|
font-weight: var(--weight-medium);
|
|
42
42
|
cursor: pointer;
|
|
43
|
-
transition: color var(--duration-fast) var(--ease-out),
|
|
44
|
-
border-color var(--duration-fast) var(--ease-out),
|
|
43
|
+
transition: color var(--duration-fast) var(--ease-out),
|
|
44
|
+
border-color var(--duration-fast) var(--ease-out),
|
|
45
45
|
background-color var(--duration-fast) var(--ease-out);
|
|
46
46
|
border-block-end: 2px solid #0000;
|
|
47
47
|
order: 1;
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
|
|
47
47
|
.toast[popover] {
|
|
48
48
|
opacity: 0;
|
|
49
|
-
transition: opacity var(--duration-normal) var(--ease-out),
|
|
50
|
-
overlay var(--duration-normal) allow-discrete,
|
|
49
|
+
transition: opacity var(--duration-normal) var(--ease-out),
|
|
50
|
+
overlay var(--duration-normal) allow-discrete,
|
|
51
51
|
display var(--duration-normal) allow-discrete;
|
|
52
52
|
|
|
53
53
|
&:popover-open {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
border-radius: var(--radius-full);
|
|
16
16
|
background: var(--color-base-300);
|
|
17
17
|
cursor: pointer;
|
|
18
|
-
transition: background-color var(--duration-normal) var(--ease-out),
|
|
18
|
+
transition: background-color var(--duration-normal) var(--ease-out),
|
|
19
19
|
border-color var(--duration-normal) var(--ease-out);
|
|
20
20
|
flex: none;
|
|
21
21
|
align-items: center;
|