@poppyui/core 0.1.0 → 0.1.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 +21 -21
- package/README.md +166 -166
- package/dist/components/accordion.css +1 -1
- package/dist/components/button.css +3 -3
- package/dist/components/checkbox.css +1 -1
- package/dist/components/drawer.css +4 -4
- package/dist/components/dropdown.css +3 -3
- package/dist/components/input.css +1 -1
- package/dist/components/modal.css +6 -6
- package/dist/components/progress.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/poppy.css +27 -27
- 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 +31 -31
- package/src/themes/light.css +32 -32
- package/src/tokens/tokens.css +52 -52
package/src/components/toast.css
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Toast: a stacking container for .alert elements, pinned to a viewport corner.
|
|
3
|
-
*
|
|
4
|
-
* Showing and hiding is the app's job: add/remove the elements, or make each toast a
|
|
5
|
-
* manual popover so the platform does it with zero JS:
|
|
6
|
-
*
|
|
7
|
-
* <button class="btn" popovertarget="t1">Save</button>
|
|
8
|
-
* <div id="t1" class="toast" popover="manual" role="status">
|
|
9
|
-
* <div class="alert alert-success">
|
|
10
|
-
* Saved
|
|
11
|
-
* <button class="btn btn-ghost btn-sm" popovertarget="t1" popovertargetaction="hide">Close</button>
|
|
12
|
-
* </div>
|
|
13
|
-
* </div>
|
|
14
|
-
*
|
|
15
|
-
* Positions: bottom-end (default), .toast-top, .toast-start, .toast-center.
|
|
16
|
-
* .toast-static keeps the container in normal flow (for docs / inline previews).
|
|
17
|
-
*/
|
|
18
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
19
|
-
|
|
20
|
-
@layer poppy.components {
|
|
21
|
-
.toast {
|
|
22
|
-
position: fixed;
|
|
23
|
-
inset: auto;
|
|
24
|
-
inset-block-end: var(--space-4);
|
|
25
|
-
inset-inline-end: var(--space-4);
|
|
26
|
-
z-index: 50;
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column;
|
|
29
|
-
gap: var(--space-2);
|
|
30
|
-
inline-size: max-content;
|
|
31
|
-
max-inline-size: calc(100vw - 2 * var(--space-4));
|
|
32
|
-
margin: 0;
|
|
33
|
-
padding: 0;
|
|
34
|
-
border: 0;
|
|
35
|
-
background: transparent;
|
|
36
|
-
color: inherit;
|
|
37
|
-
overflow: visible;
|
|
38
|
-
|
|
39
|
-
&.toast-top {
|
|
40
|
-
inset-block: var(--space-4) auto;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&.toast-start {
|
|
44
|
-
inset-inline: var(--space-4) auto;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
&.toast-center {
|
|
48
|
-
inset-inline: 50% auto;
|
|
49
|
-
translate: -50% 0;
|
|
50
|
-
|
|
51
|
-
&:dir(rtl) {
|
|
52
|
-
translate: 50% 0;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&.toast-static {
|
|
57
|
-
position: static;
|
|
58
|
-
inset: auto;
|
|
59
|
-
translate: none;
|
|
60
|
-
inline-size: auto;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/* Popover variant: only apply the display/transition when it is a popover. */
|
|
65
|
-
.toast[popover] {
|
|
66
|
-
opacity: 0;
|
|
67
|
-
transition:
|
|
68
|
-
opacity var(--duration-normal) var(--ease-out),
|
|
69
|
-
overlay var(--duration-normal) allow-discrete,
|
|
70
|
-
display var(--duration-normal) allow-discrete;
|
|
71
|
-
|
|
72
|
-
&:popover-open {
|
|
73
|
-
opacity: 1;
|
|
74
|
-
|
|
75
|
-
@starting-style {
|
|
76
|
-
opacity: 0;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Toast: a stacking container for .alert elements, pinned to a viewport corner.
|
|
3
|
+
*
|
|
4
|
+
* Showing and hiding is the app's job: add/remove the elements, or make each toast a
|
|
5
|
+
* manual popover so the platform does it with zero JS:
|
|
6
|
+
*
|
|
7
|
+
* <button class="btn" popovertarget="t1">Save</button>
|
|
8
|
+
* <div id="t1" class="toast" popover="manual" role="status">
|
|
9
|
+
* <div class="alert alert-success">
|
|
10
|
+
* Saved
|
|
11
|
+
* <button class="btn btn-ghost btn-sm" popovertarget="t1" popovertargetaction="hide">Close</button>
|
|
12
|
+
* </div>
|
|
13
|
+
* </div>
|
|
14
|
+
*
|
|
15
|
+
* Positions: bottom-end (default), .toast-top, .toast-start, .toast-center.
|
|
16
|
+
* .toast-static keeps the container in normal flow (for docs / inline previews).
|
|
17
|
+
*/
|
|
18
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
19
|
+
|
|
20
|
+
@layer poppy.components {
|
|
21
|
+
.toast {
|
|
22
|
+
position: fixed;
|
|
23
|
+
inset: auto;
|
|
24
|
+
inset-block-end: var(--space-4);
|
|
25
|
+
inset-inline-end: var(--space-4);
|
|
26
|
+
z-index: 50;
|
|
27
|
+
display: flex;
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
gap: var(--space-2);
|
|
30
|
+
inline-size: max-content;
|
|
31
|
+
max-inline-size: calc(100vw - 2 * var(--space-4));
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0;
|
|
34
|
+
border: 0;
|
|
35
|
+
background: transparent;
|
|
36
|
+
color: inherit;
|
|
37
|
+
overflow: visible;
|
|
38
|
+
|
|
39
|
+
&.toast-top {
|
|
40
|
+
inset-block: var(--space-4) auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.toast-start {
|
|
44
|
+
inset-inline: var(--space-4) auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.toast-center {
|
|
48
|
+
inset-inline: 50% auto;
|
|
49
|
+
translate: -50% 0;
|
|
50
|
+
|
|
51
|
+
&:dir(rtl) {
|
|
52
|
+
translate: 50% 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.toast-static {
|
|
57
|
+
position: static;
|
|
58
|
+
inset: auto;
|
|
59
|
+
translate: none;
|
|
60
|
+
inline-size: auto;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Popover variant: only apply the display/transition when it is a popover. */
|
|
65
|
+
.toast[popover] {
|
|
66
|
+
opacity: 0;
|
|
67
|
+
transition:
|
|
68
|
+
opacity var(--duration-normal) var(--ease-out),
|
|
69
|
+
overlay var(--duration-normal) allow-discrete,
|
|
70
|
+
display var(--duration-normal) allow-discrete;
|
|
71
|
+
|
|
72
|
+
&:popover-open {
|
|
73
|
+
opacity: 1;
|
|
74
|
+
|
|
75
|
+
@starting-style {
|
|
76
|
+
opacity: 0;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Toggle (switch)
|
|
3
|
-
* <label class="label-inline"><input type="checkbox" role="switch" class="toggle"> Wi-Fi</label>
|
|
4
|
-
* Colors: toggle-primary | -secondary | -success | -warning | -info | -danger
|
|
5
|
-
* Sizes: toggle-sm | (default) | toggle-lg
|
|
6
|
-
*/
|
|
7
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
8
|
-
|
|
9
|
-
@layer poppy.components {
|
|
10
|
-
.toggle {
|
|
11
|
-
--toggle-color: var(--color-primary);
|
|
12
|
-
--toggle-h: 1.5rem;
|
|
13
|
-
--toggle-pad: 3px;
|
|
14
|
-
--toggle-knob: calc(var(--toggle-h) - 2 * var(--toggle-pad) - 2px);
|
|
15
|
-
|
|
16
|
-
appearance: none;
|
|
17
|
-
display: inline-flex;
|
|
18
|
-
align-items: center;
|
|
19
|
-
flex: none;
|
|
20
|
-
box-sizing: border-box;
|
|
21
|
-
inline-size: calc(var(--toggle-h) * 1.75);
|
|
22
|
-
block-size: var(--toggle-h);
|
|
23
|
-
margin: 0;
|
|
24
|
-
padding: var(--toggle-pad);
|
|
25
|
-
border: 1px solid var(--color-border);
|
|
26
|
-
border-radius: var(--radius-full);
|
|
27
|
-
background: var(--color-base-300);
|
|
28
|
-
cursor: pointer;
|
|
29
|
-
transition:
|
|
30
|
-
background-color var(--duration-normal) var(--ease-out),
|
|
31
|
-
border-color var(--duration-normal) var(--ease-out);
|
|
32
|
-
|
|
33
|
-
&::before {
|
|
34
|
-
content: "";
|
|
35
|
-
inline-size: var(--toggle-knob);
|
|
36
|
-
block-size: var(--toggle-knob);
|
|
37
|
-
border-radius: var(--radius-full);
|
|
38
|
-
background: var(--color-base-100);
|
|
39
|
-
box-shadow: var(--shadow-md);
|
|
40
|
-
transition: translate var(--duration-normal) var(--ease-out);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&:checked {
|
|
44
|
-
background: var(--toggle-color);
|
|
45
|
-
border-color: var(--toggle-color);
|
|
46
|
-
|
|
47
|
-
&::before {
|
|
48
|
-
translate: calc(var(--toggle-h) * 0.75) 0;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&:dir(rtl)::before {
|
|
52
|
-
translate: calc(var(--toggle-h) * -0.75) 0;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&:focus-visible {
|
|
57
|
-
outline: var(--focus-width) solid var(--color-focus);
|
|
58
|
-
outline-offset: var(--focus-offset);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&:disabled {
|
|
62
|
-
opacity: 0.5;
|
|
63
|
-
cursor: not-allowed;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.toggle-primary { --toggle-color: var(--color-primary); }
|
|
68
|
-
.toggle-secondary { --toggle-color: var(--color-secondary); }
|
|
69
|
-
.toggle-success { --toggle-color: var(--color-success); }
|
|
70
|
-
.toggle-warning { --toggle-color: var(--color-warning); }
|
|
71
|
-
.toggle-info { --toggle-color: var(--color-info); }
|
|
72
|
-
.toggle-danger { --toggle-color: var(--color-danger); }
|
|
73
|
-
|
|
74
|
-
.toggle-sm { --toggle-h: 1.25rem; }
|
|
75
|
-
.toggle-lg { --toggle-h: 2rem; }
|
|
76
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Toggle (switch)
|
|
3
|
+
* <label class="label-inline"><input type="checkbox" role="switch" class="toggle"> Wi-Fi</label>
|
|
4
|
+
* Colors: toggle-primary | -secondary | -success | -warning | -info | -danger
|
|
5
|
+
* Sizes: toggle-sm | (default) | toggle-lg
|
|
6
|
+
*/
|
|
7
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
8
|
+
|
|
9
|
+
@layer poppy.components {
|
|
10
|
+
.toggle {
|
|
11
|
+
--toggle-color: var(--color-primary);
|
|
12
|
+
--toggle-h: 1.5rem;
|
|
13
|
+
--toggle-pad: 3px;
|
|
14
|
+
--toggle-knob: calc(var(--toggle-h) - 2 * var(--toggle-pad) - 2px);
|
|
15
|
+
|
|
16
|
+
appearance: none;
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
flex: none;
|
|
20
|
+
box-sizing: border-box;
|
|
21
|
+
inline-size: calc(var(--toggle-h) * 1.75);
|
|
22
|
+
block-size: var(--toggle-h);
|
|
23
|
+
margin: 0;
|
|
24
|
+
padding: var(--toggle-pad);
|
|
25
|
+
border: 1px solid var(--color-border);
|
|
26
|
+
border-radius: var(--radius-full);
|
|
27
|
+
background: var(--color-base-300);
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
transition:
|
|
30
|
+
background-color var(--duration-normal) var(--ease-out),
|
|
31
|
+
border-color var(--duration-normal) var(--ease-out);
|
|
32
|
+
|
|
33
|
+
&::before {
|
|
34
|
+
content: "";
|
|
35
|
+
inline-size: var(--toggle-knob);
|
|
36
|
+
block-size: var(--toggle-knob);
|
|
37
|
+
border-radius: var(--radius-full);
|
|
38
|
+
background: var(--color-base-100);
|
|
39
|
+
box-shadow: var(--shadow-md);
|
|
40
|
+
transition: translate var(--duration-normal) var(--ease-out);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&:checked {
|
|
44
|
+
background: var(--toggle-color);
|
|
45
|
+
border-color: var(--toggle-color);
|
|
46
|
+
|
|
47
|
+
&::before {
|
|
48
|
+
translate: calc(var(--toggle-h) * 0.75) 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:dir(rtl)::before {
|
|
52
|
+
translate: calc(var(--toggle-h) * -0.75) 0;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:focus-visible {
|
|
57
|
+
outline: var(--focus-width) solid var(--color-focus);
|
|
58
|
+
outline-offset: var(--focus-offset);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&:disabled {
|
|
62
|
+
opacity: 0.5;
|
|
63
|
+
cursor: not-allowed;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.toggle-primary { --toggle-color: var(--color-primary); }
|
|
68
|
+
.toggle-secondary { --toggle-color: var(--color-secondary); }
|
|
69
|
+
.toggle-success { --toggle-color: var(--color-success); }
|
|
70
|
+
.toggle-warning { --toggle-color: var(--color-warning); }
|
|
71
|
+
.toggle-info { --toggle-color: var(--color-info); }
|
|
72
|
+
.toggle-danger { --toggle-color: var(--color-danger); }
|
|
73
|
+
|
|
74
|
+
.toggle-sm { --toggle-h: 1.25rem; }
|
|
75
|
+
.toggle-lg { --toggle-h: 2rem; }
|
|
76
|
+
}
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Tooltip (CSS-only)
|
|
3
|
-
* <span class="tooltip" data-tip="Copy link">
|
|
4
|
-
* <button type="button" class="btn" aria-label="Copy link">…</button>
|
|
5
|
-
* </span>
|
|
6
|
-
* ACCESSIBILITY: text rendered from ::after is not reliably announced. Also wire
|
|
7
|
-
* aria-label on the trigger, or aria-describedby pointing at (visually hidden) text with the same content.
|
|
8
|
-
* The trigger must be focusable (button/link) so :focus-within can show the tip.
|
|
9
|
-
* Position: tooltip-top (default) | tooltip-bottom | tooltip-start | tooltip-end
|
|
10
|
-
*/
|
|
11
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
12
|
-
|
|
13
|
-
@layer poppy.components {
|
|
14
|
-
.tooltip {
|
|
15
|
-
position: relative;
|
|
16
|
-
display: inline-flex;
|
|
17
|
-
|
|
18
|
-
&::after {
|
|
19
|
-
content: attr(data-tip);
|
|
20
|
-
position: absolute;
|
|
21
|
-
z-index: 10;
|
|
22
|
-
inset-block-end: calc(100% + var(--space-2));
|
|
23
|
-
inset-inline-start: 50%;
|
|
24
|
-
translate: -50% 0;
|
|
25
|
-
inline-size: max-content;
|
|
26
|
-
max-inline-size: 16rem;
|
|
27
|
-
padding: var(--space-1) var(--space-2);
|
|
28
|
-
border-radius: var(--radius-sm);
|
|
29
|
-
background: var(--color-base-content);
|
|
30
|
-
color: var(--color-base-100);
|
|
31
|
-
font-size: var(--text-sm);
|
|
32
|
-
line-height: 1.4;
|
|
33
|
-
pointer-events: none;
|
|
34
|
-
opacity: 0;
|
|
35
|
-
transition: opacity var(--duration-fast) var(--ease-out);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&:hover::after,
|
|
39
|
-
&:focus-within::after {
|
|
40
|
-
opacity: 1;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.tooltip-bottom::after {
|
|
45
|
-
inset-block: calc(100% + var(--space-2)) auto;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.tooltip-start::after {
|
|
49
|
-
inset-block: 50% auto;
|
|
50
|
-
inset-inline: auto calc(100% + var(--space-2));
|
|
51
|
-
translate: 0 -50%;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.tooltip-end::after {
|
|
55
|
-
inset-block: 50% auto;
|
|
56
|
-
inset-inline: calc(100% + var(--space-2)) auto;
|
|
57
|
-
translate: 0 -50%;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Tooltip (CSS-only)
|
|
3
|
+
* <span class="tooltip" data-tip="Copy link">
|
|
4
|
+
* <button type="button" class="btn" aria-label="Copy link">…</button>
|
|
5
|
+
* </span>
|
|
6
|
+
* ACCESSIBILITY: text rendered from ::after is not reliably announced. Also wire
|
|
7
|
+
* aria-label on the trigger, or aria-describedby pointing at (visually hidden) text with the same content.
|
|
8
|
+
* The trigger must be focusable (button/link) so :focus-within can show the tip.
|
|
9
|
+
* Position: tooltip-top (default) | tooltip-bottom | tooltip-start | tooltip-end
|
|
10
|
+
*/
|
|
11
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
12
|
+
|
|
13
|
+
@layer poppy.components {
|
|
14
|
+
.tooltip {
|
|
15
|
+
position: relative;
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
|
|
18
|
+
&::after {
|
|
19
|
+
content: attr(data-tip);
|
|
20
|
+
position: absolute;
|
|
21
|
+
z-index: 10;
|
|
22
|
+
inset-block-end: calc(100% + var(--space-2));
|
|
23
|
+
inset-inline-start: 50%;
|
|
24
|
+
translate: -50% 0;
|
|
25
|
+
inline-size: max-content;
|
|
26
|
+
max-inline-size: 16rem;
|
|
27
|
+
padding: var(--space-1) var(--space-2);
|
|
28
|
+
border-radius: var(--radius-sm);
|
|
29
|
+
background: var(--color-base-content);
|
|
30
|
+
color: var(--color-base-100);
|
|
31
|
+
font-size: var(--text-sm);
|
|
32
|
+
line-height: 1.4;
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transition: opacity var(--duration-fast) var(--ease-out);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:hover::after,
|
|
39
|
+
&:focus-within::after {
|
|
40
|
+
opacity: 1;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.tooltip-bottom::after {
|
|
45
|
+
inset-block: calc(100% + var(--space-2)) auto;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.tooltip-start::after {
|
|
49
|
+
inset-block: 50% auto;
|
|
50
|
+
inset-inline: auto calc(100% + var(--space-2));
|
|
51
|
+
translate: 0 -50%;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.tooltip-end::after {
|
|
55
|
+
inset-block: 50% auto;
|
|
56
|
+
inset-inline: calc(100% + var(--space-2)) auto;
|
|
57
|
+
translate: 0 -50%;
|
|
58
|
+
}
|
|
59
|
+
}
|
package/src/core.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/* Tokens, themes and base without components; import this before cherry-picked components. */
|
|
2
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
3
|
-
|
|
4
|
-
@import "./tokens/tokens.css";
|
|
5
|
-
@import "./themes/light.css";
|
|
6
|
-
@import "./themes/dark.css";
|
|
7
|
-
@import "./base/base.css";
|
|
1
|
+
/* Tokens, themes and base without components; import this before cherry-picked components. */
|
|
2
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
3
|
+
|
|
4
|
+
@import "./tokens/tokens.css";
|
|
5
|
+
@import "./themes/light.css";
|
|
6
|
+
@import "./themes/dark.css";
|
|
7
|
+
@import "./base/base.css";
|
package/src/poppy.css
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
/* PoppyUI entry. Every rule sits in a poppy.* layer so unlayered consumer CSS always wins. */
|
|
2
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
3
|
-
|
|
4
|
-
@import "./core.css";
|
|
5
|
-
@import "./components/button.css";
|
|
6
|
-
@import "./components/modal.css";
|
|
7
|
-
@import "./components/dropdown.css";
|
|
8
|
-
@import "./components/alert.css";
|
|
9
|
-
@import "./components/avatar.css";
|
|
10
|
-
@import "./components/badge.css";
|
|
11
|
-
@import "./components/card.css";
|
|
12
|
-
@import "./components/divider.css";
|
|
13
|
-
@import "./components/kbd.css";
|
|
14
|
-
@import "./components/loading.css";
|
|
15
|
-
@import "./components/progress.css";
|
|
16
|
-
@import "./components/skeleton.css";
|
|
17
|
-
@import "./components/stat.css";
|
|
18
|
-
@import "./components/table.css";
|
|
19
|
-
@import "./components/tooltip.css";
|
|
20
|
-
@import "./components/input.css";
|
|
21
|
-
@import "./components/checkbox.css";
|
|
22
|
-
@import "./components/radio.css";
|
|
23
|
-
@import "./components/toggle.css";
|
|
24
|
-
@import "./components/range.css";
|
|
25
|
-
@import "./components/field.css";
|
|
26
|
-
@import "./components/accordion.css";
|
|
27
|
-
@import "./components/tabs.css";
|
|
28
|
-
@import "./components/breadcrumbs.css";
|
|
29
|
-
@import "./components/menu.css";
|
|
30
|
-
@import "./components/steps.css";
|
|
31
|
-
@import "./components/drawer.css";
|
|
32
|
-
@import "./components/join.css";
|
|
33
|
-
@import "./components/navbar.css";
|
|
34
|
-
@import "./components/toast.css";
|
|
1
|
+
/* PoppyUI entry. Every rule sits in a poppy.* layer so unlayered consumer CSS always wins. */
|
|
2
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
3
|
+
|
|
4
|
+
@import "./core.css";
|
|
5
|
+
@import "./components/button.css";
|
|
6
|
+
@import "./components/modal.css";
|
|
7
|
+
@import "./components/dropdown.css";
|
|
8
|
+
@import "./components/alert.css";
|
|
9
|
+
@import "./components/avatar.css";
|
|
10
|
+
@import "./components/badge.css";
|
|
11
|
+
@import "./components/card.css";
|
|
12
|
+
@import "./components/divider.css";
|
|
13
|
+
@import "./components/kbd.css";
|
|
14
|
+
@import "./components/loading.css";
|
|
15
|
+
@import "./components/progress.css";
|
|
16
|
+
@import "./components/skeleton.css";
|
|
17
|
+
@import "./components/stat.css";
|
|
18
|
+
@import "./components/table.css";
|
|
19
|
+
@import "./components/tooltip.css";
|
|
20
|
+
@import "./components/input.css";
|
|
21
|
+
@import "./components/checkbox.css";
|
|
22
|
+
@import "./components/radio.css";
|
|
23
|
+
@import "./components/toggle.css";
|
|
24
|
+
@import "./components/range.css";
|
|
25
|
+
@import "./components/field.css";
|
|
26
|
+
@import "./components/accordion.css";
|
|
27
|
+
@import "./components/tabs.css";
|
|
28
|
+
@import "./components/breadcrumbs.css";
|
|
29
|
+
@import "./components/menu.css";
|
|
30
|
+
@import "./components/steps.css";
|
|
31
|
+
@import "./components/drawer.css";
|
|
32
|
+
@import "./components/join.css";
|
|
33
|
+
@import "./components/navbar.css";
|
|
34
|
+
@import "./components/toast.css";
|
package/src/themes/dark.css
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
/* Dark theme: applied by [data-theme="dark"] on any ancestor. */
|
|
2
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
3
|
-
|
|
4
|
-
@layer poppy.tokens {
|
|
5
|
-
[data-theme="dark"] {
|
|
6
|
-
color-scheme: dark;
|
|
7
|
-
|
|
8
|
-
--color-base-100: oklch(21% 0.015 280);
|
|
9
|
-
--color-base-200: oklch(25% 0.018 280);
|
|
10
|
-
--color-base-300: oklch(31% 0.02 280);
|
|
11
|
-
--color-base-content: oklch(94% 0.01 280);
|
|
12
|
-
--color-muted: oklch(76% 0.02 280);
|
|
13
|
-
--color-border: oklch(40% 0.02 280);
|
|
14
|
-
|
|
15
|
-
--color-primary: oklch(76% 0.15 350);
|
|
16
|
-
--color-primary-content: oklch(20% 0.04 350);
|
|
17
|
-
--color-secondary: oklch(80% 0.09 265);
|
|
18
|
-
--color-secondary-content: oklch(20% 0.04 265);
|
|
19
|
-
--color-danger: oklch(72% 0.16 27);
|
|
20
|
-
--color-danger-content: oklch(20% 0.04 27);
|
|
21
|
-
--color-success: oklch(76% 0.14 155);
|
|
22
|
-
--color-success-content: oklch(20% 0.04 155);
|
|
23
|
-
--color-warning: oklch(83% 0.14 80);
|
|
24
|
-
--color-warning-content: oklch(22% 0.04 80);
|
|
25
|
-
--color-info: oklch(76% 0.12 240);
|
|
26
|
-
--color-info-content: oklch(20% 0.04 240);
|
|
27
|
-
|
|
28
|
-
--color-focus: oklch(76% 0.15 350);
|
|
29
|
-
--color-backdrop: oklch(5% 0 0 / 0.6);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
/* Dark theme: applied by [data-theme="dark"] on any ancestor. */
|
|
2
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
3
|
+
|
|
4
|
+
@layer poppy.tokens {
|
|
5
|
+
[data-theme="dark"] {
|
|
6
|
+
color-scheme: dark;
|
|
7
|
+
|
|
8
|
+
--color-base-100: oklch(21% 0.015 280);
|
|
9
|
+
--color-base-200: oklch(25% 0.018 280);
|
|
10
|
+
--color-base-300: oklch(31% 0.02 280);
|
|
11
|
+
--color-base-content: oklch(94% 0.01 280);
|
|
12
|
+
--color-muted: oklch(76% 0.02 280);
|
|
13
|
+
--color-border: oklch(40% 0.02 280);
|
|
14
|
+
|
|
15
|
+
--color-primary: oklch(76% 0.15 350);
|
|
16
|
+
--color-primary-content: oklch(20% 0.04 350);
|
|
17
|
+
--color-secondary: oklch(80% 0.09 265);
|
|
18
|
+
--color-secondary-content: oklch(20% 0.04 265);
|
|
19
|
+
--color-danger: oklch(72% 0.16 27);
|
|
20
|
+
--color-danger-content: oklch(20% 0.04 27);
|
|
21
|
+
--color-success: oklch(76% 0.14 155);
|
|
22
|
+
--color-success-content: oklch(20% 0.04 155);
|
|
23
|
+
--color-warning: oklch(83% 0.14 80);
|
|
24
|
+
--color-warning-content: oklch(22% 0.04 80);
|
|
25
|
+
--color-info: oklch(76% 0.12 240);
|
|
26
|
+
--color-info-content: oklch(20% 0.04 240);
|
|
27
|
+
|
|
28
|
+
--color-focus: oklch(76% 0.15 350);
|
|
29
|
+
--color-backdrop: oklch(5% 0 0 / 0.6);
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/themes/light.css
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
/* Light theme: the default, and applied by [data-theme="light"] on any ancestor. */
|
|
2
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
3
|
-
|
|
4
|
-
@layer poppy.tokens {
|
|
5
|
-
:root,
|
|
6
|
-
[data-theme="light"] {
|
|
7
|
-
color-scheme: light;
|
|
8
|
-
|
|
9
|
-
--color-base-100: oklch(100% 0 0);
|
|
10
|
-
--color-base-200: oklch(96.5% 0.006 280);
|
|
11
|
-
--color-base-300: oklch(91% 0.012 280);
|
|
12
|
-
--color-base-content: oklch(24% 0.02 280);
|
|
13
|
-
--color-muted: oklch(46% 0.02 280);
|
|
14
|
-
--color-border: oklch(84% 0.015 280);
|
|
15
|
-
|
|
16
|
-
--color-primary: oklch(52% 0.2 350);
|
|
17
|
-
--color-primary-content: oklch(100% 0 0);
|
|
18
|
-
--color-secondary: oklch(44% 0.12 265);
|
|
19
|
-
--color-secondary-content: oklch(100% 0 0);
|
|
20
|
-
--color-danger: oklch(50% 0.19 27);
|
|
21
|
-
--color-danger-content: oklch(100% 0 0);
|
|
22
|
-
--color-success: oklch(50% 0.13 155);
|
|
23
|
-
--color-success-content: oklch(100% 0 0);
|
|
24
|
-
--color-warning: oklch(80% 0.15 80);
|
|
25
|
-
--color-warning-content: oklch(25% 0.05 80);
|
|
26
|
-
--color-info: oklch(52% 0.14 240);
|
|
27
|
-
--color-info-content: oklch(100% 0 0);
|
|
28
|
-
|
|
29
|
-
--color-focus: oklch(52% 0.2 350);
|
|
30
|
-
--color-backdrop: oklch(20% 0.02 280 / 0.45);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
1
|
+
/* Light theme: the default, and applied by [data-theme="light"] on any ancestor. */
|
|
2
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
3
|
+
|
|
4
|
+
@layer poppy.tokens {
|
|
5
|
+
:root,
|
|
6
|
+
[data-theme="light"] {
|
|
7
|
+
color-scheme: light;
|
|
8
|
+
|
|
9
|
+
--color-base-100: oklch(100% 0 0);
|
|
10
|
+
--color-base-200: oklch(96.5% 0.006 280);
|
|
11
|
+
--color-base-300: oklch(91% 0.012 280);
|
|
12
|
+
--color-base-content: oklch(24% 0.02 280);
|
|
13
|
+
--color-muted: oklch(46% 0.02 280);
|
|
14
|
+
--color-border: oklch(84% 0.015 280);
|
|
15
|
+
|
|
16
|
+
--color-primary: oklch(52% 0.2 350);
|
|
17
|
+
--color-primary-content: oklch(100% 0 0);
|
|
18
|
+
--color-secondary: oklch(44% 0.12 265);
|
|
19
|
+
--color-secondary-content: oklch(100% 0 0);
|
|
20
|
+
--color-danger: oklch(50% 0.19 27);
|
|
21
|
+
--color-danger-content: oklch(100% 0 0);
|
|
22
|
+
--color-success: oklch(50% 0.13 155);
|
|
23
|
+
--color-success-content: oklch(100% 0 0);
|
|
24
|
+
--color-warning: oklch(80% 0.15 80);
|
|
25
|
+
--color-warning-content: oklch(25% 0.05 80);
|
|
26
|
+
--color-info: oklch(52% 0.14 240);
|
|
27
|
+
--color-info-content: oklch(100% 0 0);
|
|
28
|
+
|
|
29
|
+
--color-focus: oklch(52% 0.2 350);
|
|
30
|
+
--color-backdrop: oklch(20% 0.02 280 / 0.45);
|
|
31
|
+
}
|
|
32
|
+
}
|