@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/input.css
CHANGED
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Input, textarea, select
|
|
3
|
-
* <input class="input" type="text" aria-label="Name">
|
|
4
|
-
* <textarea class="textarea"></textarea>
|
|
5
|
-
* <select class="select"><option>One</option></select>
|
|
6
|
-
* Colors: *-primary | *-secondary | *-success | *-warning | *-info | *-danger (border)
|
|
7
|
-
* Sizes: *-sm | (default) | *-lg Style: input-ghost
|
|
8
|
-
* States: :disabled, :user-invalid (danger border)
|
|
9
|
-
* `.select` uses appearance: base-select (progressive enhancement), else the native control.
|
|
10
|
-
*/
|
|
11
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
12
|
-
|
|
13
|
-
@layer poppy.components {
|
|
14
|
-
.input,
|
|
15
|
-
.textarea,
|
|
16
|
-
.select {
|
|
17
|
-
--input-border: var(--color-border);
|
|
18
|
-
--input-h: 2.5rem;
|
|
19
|
-
--input-px: var(--space-3);
|
|
20
|
-
--input-text: var(--text-md);
|
|
21
|
-
|
|
22
|
-
inline-size: 100%;
|
|
23
|
-
min-block-size: var(--input-h);
|
|
24
|
-
padding-inline: var(--input-px);
|
|
25
|
-
border: 1px solid var(--input-border);
|
|
26
|
-
border-radius: var(--radius-md);
|
|
27
|
-
background: var(--color-base-100);
|
|
28
|
-
color: var(--color-base-content);
|
|
29
|
-
font: inherit;
|
|
30
|
-
font-size: var(--input-text);
|
|
31
|
-
transition:
|
|
32
|
-
border-color var(--duration-fast) var(--ease-out),
|
|
33
|
-
background-color var(--duration-fast) var(--ease-out);
|
|
34
|
-
|
|
35
|
-
&::placeholder {
|
|
36
|
-
color: var(--color-muted);
|
|
37
|
-
opacity: 1;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:hover:not(:disabled) {
|
|
41
|
-
border-color: color-mix(in oklch, var(--input-border), var(--color-base-content) 25%);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&:focus-visible {
|
|
45
|
-
outline: var(--focus-width) solid var(--color-focus);
|
|
46
|
-
outline-offset: 1px;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&:disabled {
|
|
50
|
-
opacity: 0.5;
|
|
51
|
-
cursor: not-allowed;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.textarea {
|
|
56
|
-
padding-block: var(--space-2);
|
|
57
|
-
min-block-size: 5rem;
|
|
58
|
-
line-height: var(--leading);
|
|
59
|
-
resize: vertical;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.input-ghost,
|
|
63
|
-
.textarea-ghost,
|
|
64
|
-
.select-ghost {
|
|
65
|
-
--input-border: transparent;
|
|
66
|
-
background: var(--color-base-200);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.input-primary, .textarea-primary, .select-primary { --input-border: var(--color-primary); }
|
|
70
|
-
.input-secondary, .textarea-secondary, .select-secondary { --input-border: var(--color-secondary); }
|
|
71
|
-
.input-success, .textarea-success, .select-success { --input-border: var(--color-success); }
|
|
72
|
-
.input-warning, .textarea-warning, .select-warning { --input-border: var(--color-warning); }
|
|
73
|
-
.input-info, .textarea-info, .select-info { --input-border: var(--color-info); }
|
|
74
|
-
.input-danger, .textarea-danger, .select-danger { --input-border: var(--color-danger); }
|
|
75
|
-
|
|
76
|
-
.input-sm,
|
|
77
|
-
.textarea-sm,
|
|
78
|
-
.select-sm {
|
|
79
|
-
--input-h: 2rem;
|
|
80
|
-
--input-px: var(--space-2);
|
|
81
|
-
--input-text: var(--text-sm);
|
|
82
|
-
border-radius: var(--radius-sm);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.input-lg,
|
|
86
|
-
.textarea-lg,
|
|
87
|
-
.select-lg {
|
|
88
|
-
--input-h: 3rem;
|
|
89
|
-
--input-px: var(--space-4);
|
|
90
|
-
--input-text: var(--text-lg);
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Declared last so a failed validation beats any color modifier. */
|
|
94
|
-
:is(.input, .textarea, .select):user-invalid {
|
|
95
|
-
--input-border: var(--color-danger);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
@supports (appearance: base-select) {
|
|
99
|
-
.select,
|
|
100
|
-
.select::picker(select) {
|
|
101
|
-
appearance: base-select;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.select::picker(select) {
|
|
105
|
-
border: 1px solid var(--color-border);
|
|
106
|
-
border-radius: var(--radius-md);
|
|
107
|
-
background: var(--color-base-100);
|
|
108
|
-
color: var(--color-base-content);
|
|
109
|
-
box-shadow: var(--shadow-md);
|
|
110
|
-
padding: var(--space-1);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.select option {
|
|
114
|
-
padding: var(--space-2) var(--space-3);
|
|
115
|
-
border-radius: var(--radius-sm);
|
|
116
|
-
|
|
117
|
-
&:hover,
|
|
118
|
-
&:focus-visible {
|
|
119
|
-
background: var(--color-base-200);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
&:checked {
|
|
123
|
-
font-weight: var(--weight-semibold);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Input, textarea, select
|
|
3
|
+
* <input class="input" type="text" aria-label="Name">
|
|
4
|
+
* <textarea class="textarea"></textarea>
|
|
5
|
+
* <select class="select"><option>One</option></select>
|
|
6
|
+
* Colors: *-primary | *-secondary | *-success | *-warning | *-info | *-danger (border)
|
|
7
|
+
* Sizes: *-sm | (default) | *-lg Style: input-ghost
|
|
8
|
+
* States: :disabled, :user-invalid (danger border)
|
|
9
|
+
* `.select` uses appearance: base-select (progressive enhancement), else the native control.
|
|
10
|
+
*/
|
|
11
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
12
|
+
|
|
13
|
+
@layer poppy.components {
|
|
14
|
+
.input,
|
|
15
|
+
.textarea,
|
|
16
|
+
.select {
|
|
17
|
+
--input-border: var(--color-border);
|
|
18
|
+
--input-h: 2.5rem;
|
|
19
|
+
--input-px: var(--space-3);
|
|
20
|
+
--input-text: var(--text-md);
|
|
21
|
+
|
|
22
|
+
inline-size: 100%;
|
|
23
|
+
min-block-size: var(--input-h);
|
|
24
|
+
padding-inline: var(--input-px);
|
|
25
|
+
border: 1px solid var(--input-border);
|
|
26
|
+
border-radius: var(--radius-md);
|
|
27
|
+
background: var(--color-base-100);
|
|
28
|
+
color: var(--color-base-content);
|
|
29
|
+
font: inherit;
|
|
30
|
+
font-size: var(--input-text);
|
|
31
|
+
transition:
|
|
32
|
+
border-color var(--duration-fast) var(--ease-out),
|
|
33
|
+
background-color var(--duration-fast) var(--ease-out);
|
|
34
|
+
|
|
35
|
+
&::placeholder {
|
|
36
|
+
color: var(--color-muted);
|
|
37
|
+
opacity: 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:hover:not(:disabled) {
|
|
41
|
+
border-color: color-mix(in oklch, var(--input-border), var(--color-base-content) 25%);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:focus-visible {
|
|
45
|
+
outline: var(--focus-width) solid var(--color-focus);
|
|
46
|
+
outline-offset: 1px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:disabled {
|
|
50
|
+
opacity: 0.5;
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.textarea {
|
|
56
|
+
padding-block: var(--space-2);
|
|
57
|
+
min-block-size: 5rem;
|
|
58
|
+
line-height: var(--leading);
|
|
59
|
+
resize: vertical;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.input-ghost,
|
|
63
|
+
.textarea-ghost,
|
|
64
|
+
.select-ghost {
|
|
65
|
+
--input-border: transparent;
|
|
66
|
+
background: var(--color-base-200);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.input-primary, .textarea-primary, .select-primary { --input-border: var(--color-primary); }
|
|
70
|
+
.input-secondary, .textarea-secondary, .select-secondary { --input-border: var(--color-secondary); }
|
|
71
|
+
.input-success, .textarea-success, .select-success { --input-border: var(--color-success); }
|
|
72
|
+
.input-warning, .textarea-warning, .select-warning { --input-border: var(--color-warning); }
|
|
73
|
+
.input-info, .textarea-info, .select-info { --input-border: var(--color-info); }
|
|
74
|
+
.input-danger, .textarea-danger, .select-danger { --input-border: var(--color-danger); }
|
|
75
|
+
|
|
76
|
+
.input-sm,
|
|
77
|
+
.textarea-sm,
|
|
78
|
+
.select-sm {
|
|
79
|
+
--input-h: 2rem;
|
|
80
|
+
--input-px: var(--space-2);
|
|
81
|
+
--input-text: var(--text-sm);
|
|
82
|
+
border-radius: var(--radius-sm);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.input-lg,
|
|
86
|
+
.textarea-lg,
|
|
87
|
+
.select-lg {
|
|
88
|
+
--input-h: 3rem;
|
|
89
|
+
--input-px: var(--space-4);
|
|
90
|
+
--input-text: var(--text-lg);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Declared last so a failed validation beats any color modifier. */
|
|
94
|
+
:is(.input, .textarea, .select):user-invalid {
|
|
95
|
+
--input-border: var(--color-danger);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@supports (appearance: base-select) {
|
|
99
|
+
.select,
|
|
100
|
+
.select::picker(select) {
|
|
101
|
+
appearance: base-select;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.select::picker(select) {
|
|
105
|
+
border: 1px solid var(--color-border);
|
|
106
|
+
border-radius: var(--radius-md);
|
|
107
|
+
background: var(--color-base-100);
|
|
108
|
+
color: var(--color-base-content);
|
|
109
|
+
box-shadow: var(--shadow-md);
|
|
110
|
+
padding: var(--space-1);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.select option {
|
|
114
|
+
padding: var(--space-2) var(--space-3);
|
|
115
|
+
border-radius: var(--radius-sm);
|
|
116
|
+
|
|
117
|
+
&:hover,
|
|
118
|
+
&:focus-visible {
|
|
119
|
+
background: var(--color-base-200);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&:checked {
|
|
123
|
+
font-weight: var(--weight-semibold);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
package/src/components/join.css
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Join: zero JS. Groups adjacent buttons/inputs flush, sharing one outer radius.
|
|
3
|
-
*
|
|
4
|
-
* <div class="join">
|
|
5
|
-
* <input class="input" placeholder="Email">
|
|
6
|
-
* <button class="btn btn-primary">Subscribe</button>
|
|
7
|
-
* </div>
|
|
8
|
-
*
|
|
9
|
-
* Modifier: .join-vertical.
|
|
10
|
-
*/
|
|
11
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
12
|
-
|
|
13
|
-
@layer poppy.components {
|
|
14
|
-
/* Doubled class: must outrank the children's own .btn / .input radius regardless of file order. */
|
|
15
|
-
.join.join {
|
|
16
|
-
display: inline-flex;
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
--join-radius: var(--radius-md);
|
|
19
|
-
|
|
20
|
-
& > * {
|
|
21
|
-
border-radius: 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/* Collapse the inner borders. */
|
|
25
|
-
& > * + * {
|
|
26
|
-
margin-inline-start: -1px;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
& > :first-child {
|
|
30
|
-
border-start-start-radius: var(--join-radius);
|
|
31
|
-
border-end-start-radius: var(--join-radius);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
& > :last-child {
|
|
35
|
-
border-start-end-radius: var(--join-radius);
|
|
36
|
-
border-end-end-radius: var(--join-radius);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/* Keep the focused/hovered item's full border above its neighbours. */
|
|
40
|
-
& > :is(:hover, :focus-visible) {
|
|
41
|
-
z-index: 1;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
& > * {
|
|
45
|
-
position: relative;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&.join-vertical {
|
|
49
|
-
flex-direction: column;
|
|
50
|
-
|
|
51
|
-
& > * + * {
|
|
52
|
-
margin-inline-start: 0;
|
|
53
|
-
margin-block-start: -1px;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
& > :first-child {
|
|
57
|
-
border-radius: var(--join-radius) var(--join-radius) 0 0;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
& > :last-child {
|
|
61
|
-
border-radius: 0 0 var(--join-radius) var(--join-radius);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
&.join-vertical > :only-child,
|
|
66
|
-
& > :only-child {
|
|
67
|
-
border-radius: var(--join-radius);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Join: zero JS. Groups adjacent buttons/inputs flush, sharing one outer radius.
|
|
3
|
+
*
|
|
4
|
+
* <div class="join">
|
|
5
|
+
* <input class="input" placeholder="Email">
|
|
6
|
+
* <button class="btn btn-primary">Subscribe</button>
|
|
7
|
+
* </div>
|
|
8
|
+
*
|
|
9
|
+
* Modifier: .join-vertical.
|
|
10
|
+
*/
|
|
11
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
12
|
+
|
|
13
|
+
@layer poppy.components {
|
|
14
|
+
/* Doubled class: must outrank the children's own .btn / .input radius regardless of file order. */
|
|
15
|
+
.join.join {
|
|
16
|
+
display: inline-flex;
|
|
17
|
+
align-items: stretch;
|
|
18
|
+
--join-radius: var(--radius-md);
|
|
19
|
+
|
|
20
|
+
& > * {
|
|
21
|
+
border-radius: 0;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* Collapse the inner borders. */
|
|
25
|
+
& > * + * {
|
|
26
|
+
margin-inline-start: -1px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
& > :first-child {
|
|
30
|
+
border-start-start-radius: var(--join-radius);
|
|
31
|
+
border-end-start-radius: var(--join-radius);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
& > :last-child {
|
|
35
|
+
border-start-end-radius: var(--join-radius);
|
|
36
|
+
border-end-end-radius: var(--join-radius);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Keep the focused/hovered item's full border above its neighbours. */
|
|
40
|
+
& > :is(:hover, :focus-visible) {
|
|
41
|
+
z-index: 1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
& > * {
|
|
45
|
+
position: relative;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.join-vertical {
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
|
|
51
|
+
& > * + * {
|
|
52
|
+
margin-inline-start: 0;
|
|
53
|
+
margin-block-start: -1px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
& > :first-child {
|
|
57
|
+
border-radius: var(--join-radius) var(--join-radius) 0 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
& > :last-child {
|
|
61
|
+
border-radius: 0 0 var(--join-radius) var(--join-radius);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&.join-vertical > :only-child,
|
|
66
|
+
& > :only-child {
|
|
67
|
+
border-radius: var(--join-radius);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
package/src/components/kbd.css
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Kbd
|
|
3
|
-
* <kbd class="kbd">Ctrl</kbd> + <kbd class="kbd">K</kbd>
|
|
4
|
-
* Sizes: kbd-sm | (default) | kbd-lg
|
|
5
|
-
*/
|
|
6
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
7
|
-
|
|
8
|
-
@layer poppy.components {
|
|
9
|
-
.kbd {
|
|
10
|
-
--kbd-text: var(--text-sm);
|
|
11
|
-
|
|
12
|
-
display: inline-flex;
|
|
13
|
-
align-items: center;
|
|
14
|
-
justify-content: center;
|
|
15
|
-
min-inline-size: 1.75em;
|
|
16
|
-
padding-inline: 0.5em;
|
|
17
|
-
padding-block: 0.125em;
|
|
18
|
-
border: 1px solid var(--color-border);
|
|
19
|
-
border-block-end-width: 2px;
|
|
20
|
-
border-radius: var(--radius-sm);
|
|
21
|
-
background: var(--color-base-200);
|
|
22
|
-
color: var(--color-base-content);
|
|
23
|
-
font-family: var(--font-mono);
|
|
24
|
-
font-size: var(--kbd-text);
|
|
25
|
-
line-height: 1.5;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.kbd-sm {
|
|
29
|
-
--kbd-text: 0.75rem;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.kbd-lg {
|
|
33
|
-
--kbd-text: var(--text-md);
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Kbd
|
|
3
|
+
* <kbd class="kbd">Ctrl</kbd> + <kbd class="kbd">K</kbd>
|
|
4
|
+
* Sizes: kbd-sm | (default) | kbd-lg
|
|
5
|
+
*/
|
|
6
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
7
|
+
|
|
8
|
+
@layer poppy.components {
|
|
9
|
+
.kbd {
|
|
10
|
+
--kbd-text: var(--text-sm);
|
|
11
|
+
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
min-inline-size: 1.75em;
|
|
16
|
+
padding-inline: 0.5em;
|
|
17
|
+
padding-block: 0.125em;
|
|
18
|
+
border: 1px solid var(--color-border);
|
|
19
|
+
border-block-end-width: 2px;
|
|
20
|
+
border-radius: var(--radius-sm);
|
|
21
|
+
background: var(--color-base-200);
|
|
22
|
+
color: var(--color-base-content);
|
|
23
|
+
font-family: var(--font-mono);
|
|
24
|
+
font-size: var(--kbd-text);
|
|
25
|
+
line-height: 1.5;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.kbd-sm {
|
|
29
|
+
--kbd-text: 0.75rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.kbd-lg {
|
|
33
|
+
--kbd-text: var(--text-md);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Loading
|
|
3
|
-
* <span class="loading" role="status">Loading</span>
|
|
4
|
-
* Keep a plain text label inside: the box clips it visually (font-size 0) but assistive tech still reads it.
|
|
5
|
-
* Variants: (default ring spinner) | loading-ring | loading-dots
|
|
6
|
-
* Sizes: loading-sm | (default) | loading-lg
|
|
7
|
-
* Color comes from currentColor, so set `color` on the element or a parent.
|
|
8
|
-
*/
|
|
9
|
-
@layer poppy.tokens, poppy.base, poppy.components;
|
|
10
|
-
|
|
11
|
-
@layer poppy.components {
|
|
12
|
-
.loading {
|
|
13
|
-
--loading-size: 1.5rem;
|
|
14
|
-
|
|
15
|
-
display: inline-block;
|
|
16
|
-
inline-size: var(--loading-size);
|
|
17
|
-
block-size: var(--loading-size);
|
|
18
|
-
border: calc(var(--loading-size) / 8) solid currentColor;
|
|
19
|
-
border-inline-end-color: transparent;
|
|
20
|
-
border-radius: var(--radius-full);
|
|
21
|
-
vertical-align: middle;
|
|
22
|
-
overflow: hidden;
|
|
23
|
-
font-size: 0;
|
|
24
|
-
animation: poppy-loading-spin 0.7s linear infinite;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.loading-ring {
|
|
28
|
-
/* Explicit name for the default ring. */
|
|
29
|
-
border-inline-end-color: transparent;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.loading-dots {
|
|
33
|
-
inline-size: calc(var(--loading-size) * 2);
|
|
34
|
-
block-size: calc(var(--loading-size) / 3);
|
|
35
|
-
border: 0;
|
|
36
|
-
border-radius: 0;
|
|
37
|
-
background:
|
|
38
|
-
radial-gradient(circle closest-side, currentColor 90%, transparent) 0 50% / 33.33% 100% no-repeat,
|
|
39
|
-
radial-gradient(circle closest-side, currentColor 90%, transparent) 50% 50% / 33.33% 100% no-repeat,
|
|
40
|
-
radial-gradient(circle closest-side, currentColor 90%, transparent) 100% 50% / 33.33% 100% no-repeat;
|
|
41
|
-
animation: poppy-loading-dots 1s ease-in-out infinite;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.loading-sm {
|
|
45
|
-
--loading-size: 1rem;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.loading-lg {
|
|
49
|
-
--loading-size: 2.5rem;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@keyframes poppy-loading-spin {
|
|
53
|
-
to {
|
|
54
|
-
rotate: 1turn;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@keyframes poppy-loading-dots {
|
|
59
|
-
0%,
|
|
60
|
-
100% {
|
|
61
|
-
opacity: 1;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
50% {
|
|
65
|
-
opacity: 0.3;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
@media (prefers-reduced-motion: reduce) {
|
|
70
|
-
.loading {
|
|
71
|
-
animation-duration: 2s;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
1
|
+
/*
|
|
2
|
+
* Loading
|
|
3
|
+
* <span class="loading" role="status">Loading</span>
|
|
4
|
+
* Keep a plain text label inside: the box clips it visually (font-size 0) but assistive tech still reads it.
|
|
5
|
+
* Variants: (default ring spinner) | loading-ring | loading-dots
|
|
6
|
+
* Sizes: loading-sm | (default) | loading-lg
|
|
7
|
+
* Color comes from currentColor, so set `color` on the element or a parent.
|
|
8
|
+
*/
|
|
9
|
+
@layer poppy.tokens, poppy.base, poppy.components;
|
|
10
|
+
|
|
11
|
+
@layer poppy.components {
|
|
12
|
+
.loading {
|
|
13
|
+
--loading-size: 1.5rem;
|
|
14
|
+
|
|
15
|
+
display: inline-block;
|
|
16
|
+
inline-size: var(--loading-size);
|
|
17
|
+
block-size: var(--loading-size);
|
|
18
|
+
border: calc(var(--loading-size) / 8) solid currentColor;
|
|
19
|
+
border-inline-end-color: transparent;
|
|
20
|
+
border-radius: var(--radius-full);
|
|
21
|
+
vertical-align: middle;
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
font-size: 0;
|
|
24
|
+
animation: poppy-loading-spin 0.7s linear infinite;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.loading-ring {
|
|
28
|
+
/* Explicit name for the default ring. */
|
|
29
|
+
border-inline-end-color: transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.loading-dots {
|
|
33
|
+
inline-size: calc(var(--loading-size) * 2);
|
|
34
|
+
block-size: calc(var(--loading-size) / 3);
|
|
35
|
+
border: 0;
|
|
36
|
+
border-radius: 0;
|
|
37
|
+
background:
|
|
38
|
+
radial-gradient(circle closest-side, currentColor 90%, transparent) 0 50% / 33.33% 100% no-repeat,
|
|
39
|
+
radial-gradient(circle closest-side, currentColor 90%, transparent) 50% 50% / 33.33% 100% no-repeat,
|
|
40
|
+
radial-gradient(circle closest-side, currentColor 90%, transparent) 100% 50% / 33.33% 100% no-repeat;
|
|
41
|
+
animation: poppy-loading-dots 1s ease-in-out infinite;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.loading-sm {
|
|
45
|
+
--loading-size: 1rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.loading-lg {
|
|
49
|
+
--loading-size: 2.5rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@keyframes poppy-loading-spin {
|
|
53
|
+
to {
|
|
54
|
+
rotate: 1turn;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes poppy-loading-dots {
|
|
59
|
+
0%,
|
|
60
|
+
100% {
|
|
61
|
+
opacity: 1;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
50% {
|
|
65
|
+
opacity: 0.3;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@media (prefers-reduced-motion: reduce) {
|
|
70
|
+
.loading {
|
|
71
|
+
animation-duration: 2s;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|