@pimolu/web-styles 0.1.0-beta.3.1 → 0.1.0-beta.4
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/README.fr.md +1 -1
- package/README.md +1 -1
- package/dist/button.css +6 -0
- package/dist/input-group.css +10 -0
- package/dist/input.css +10 -0
- package/dist/layered.css +406 -183
- package/dist/password-input.css +10 -0
- package/dist/pimolu.css +404 -181
- package/dist/pimolu.min.css +1 -1
- package/dist/segmented-control.css +70 -3
- package/dist/tabs.css +93 -4
- package/dist/toast.css +225 -8
- package/package.json +2 -2
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
/* src/segmented-control.css */
|
|
2
|
+
:root {
|
|
3
|
+
--pimolu-segmented-indicator-duration: 240ms;
|
|
4
|
+
--pimolu-segmented-indicator-easing: cubic-bezier(0.22, 1, 0.36, 1);
|
|
5
|
+
}
|
|
2
6
|
.pimolu-segmented-control {
|
|
3
7
|
--pimolu-segmented-height: 32px;
|
|
4
8
|
--pimolu-segmented-padding-x: 12px;
|
|
5
9
|
--pimolu-segmented-font-size: 0.875rem;
|
|
6
10
|
display: inline-flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
isolation: isolate;
|
|
13
|
+
flex-wrap: nowrap;
|
|
7
14
|
align-items: center;
|
|
8
15
|
gap: 0;
|
|
9
16
|
box-sizing: border-box;
|
|
10
17
|
max-width: 100%;
|
|
18
|
+
min-width: 0;
|
|
11
19
|
padding: 4px;
|
|
12
20
|
border: var(--pimolu-control-border-width, 1px) solid var(--pimolu-border);
|
|
13
21
|
border-radius: 999px;
|
|
@@ -22,13 +30,16 @@
|
|
|
22
30
|
flex-direction: column;
|
|
23
31
|
align-items: stretch;
|
|
24
32
|
width: fit-content;
|
|
25
|
-
min-width: 12rem;
|
|
33
|
+
min-width: min(12rem, 100%);
|
|
26
34
|
border-radius: var(--pimolu-radius-lg, 12px);
|
|
27
35
|
}
|
|
28
36
|
.pimolu-segmented-control--full-width.pimolu-segmented-control--vertical {
|
|
29
37
|
width: 100%;
|
|
30
38
|
}
|
|
31
39
|
.pimolu-segmented-control__item {
|
|
40
|
+
position: relative;
|
|
41
|
+
z-index: 1;
|
|
42
|
+
flex-shrink: 0;
|
|
32
43
|
display: inline-flex;
|
|
33
44
|
align-items: center;
|
|
34
45
|
justify-content: center;
|
|
@@ -54,7 +65,7 @@
|
|
|
54
65
|
}
|
|
55
66
|
.pimolu-segmented-control--full-width .pimolu-segmented-control__item {
|
|
56
67
|
flex: 1 1 0;
|
|
57
|
-
min-width:
|
|
68
|
+
min-width: max-content;
|
|
58
69
|
}
|
|
59
70
|
.pimolu-segmented-control--vertical .pimolu-segmented-control__item {
|
|
60
71
|
flex: 0 0 auto;
|
|
@@ -93,12 +104,68 @@
|
|
|
93
104
|
--pimolu-segmented-padding-x: 16px;
|
|
94
105
|
--pimolu-segmented-font-size: 1rem;
|
|
95
106
|
}
|
|
107
|
+
.pimolu-segmented-control__indicator {
|
|
108
|
+
position: absolute;
|
|
109
|
+
left: 0;
|
|
110
|
+
top: 0;
|
|
111
|
+
z-index: 0;
|
|
112
|
+
border-radius: 999px;
|
|
113
|
+
pointer-events: none;
|
|
114
|
+
background: color-mix(in srgb, var(--pimolu-foreground) 10%, var(--pimolu-muted));
|
|
115
|
+
box-shadow: var(--pimolu-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.12));
|
|
116
|
+
}
|
|
117
|
+
.pimolu-segmented-control__indicator[hidden] {
|
|
118
|
+
display: none;
|
|
119
|
+
}
|
|
120
|
+
.pimolu-segmented-control__indicator[data-ready=true] {
|
|
121
|
+
transition-property:
|
|
122
|
+
transform,
|
|
123
|
+
width,
|
|
124
|
+
height;
|
|
125
|
+
transition-duration: var(--pimolu-segmented-indicator-duration, 240ms);
|
|
126
|
+
transition-timing-function: var(--pimolu-segmented-indicator-easing, cubic-bezier(0.22, 1, 0.36, 1));
|
|
127
|
+
}
|
|
128
|
+
.pimolu-segmented-control[data-indicator=true] > .pimolu-segmented-control__item[data-state=active] {
|
|
129
|
+
background: transparent;
|
|
130
|
+
box-shadow: none;
|
|
131
|
+
}
|
|
132
|
+
.pimolu-segmented-control[data-animated=false] > :is(.pimolu-segmented-control__indicator, .pimolu-segmented-control__item) {
|
|
133
|
+
transition: none;
|
|
134
|
+
}
|
|
135
|
+
.pimolu-segmented-control {
|
|
136
|
+
flex-wrap: nowrap;
|
|
137
|
+
overflow-x: auto;
|
|
138
|
+
overflow-y: hidden;
|
|
139
|
+
overscroll-behavior: contain;
|
|
140
|
+
}
|
|
141
|
+
.pimolu-segmented-control--vertical {
|
|
142
|
+
overflow-x: hidden;
|
|
143
|
+
overflow-y: auto;
|
|
144
|
+
}
|
|
145
|
+
.pimolu-segmented-control:not([data-show-scrollbar=true]) {
|
|
146
|
+
scrollbar-width: none;
|
|
147
|
+
}
|
|
148
|
+
.pimolu-segmented-control:not([data-show-scrollbar=true])::-webkit-scrollbar {
|
|
149
|
+
display: none;
|
|
150
|
+
}
|
|
151
|
+
.pimolu-segmented-control[data-show-scrollbar=true] {
|
|
152
|
+
scrollbar-width: thin;
|
|
153
|
+
}
|
|
154
|
+
.pimolu-segmented-control[data-show-scrollbar=true]::-webkit-scrollbar {
|
|
155
|
+
display: block;
|
|
156
|
+
width: 8px;
|
|
157
|
+
height: 8px;
|
|
158
|
+
}
|
|
96
159
|
@media (prefers-reduced-motion: reduce) {
|
|
97
|
-
.pimolu-segmented-control__item
|
|
160
|
+
.pimolu-segmented-control__item,
|
|
161
|
+
.pimolu-segmented-control__indicator[data-ready=true] {
|
|
98
162
|
transition: none;
|
|
99
163
|
}
|
|
100
164
|
}
|
|
101
165
|
@media (forced-colors: active) {
|
|
166
|
+
.pimolu-segmented-control__indicator {
|
|
167
|
+
display: none;
|
|
168
|
+
}
|
|
102
169
|
.pimolu-segmented-control__item[data-state=active] {
|
|
103
170
|
border: 1px solid Highlight;
|
|
104
171
|
color: Highlight;
|
package/dist/tabs.css
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
/* src/tabs.css */
|
|
2
|
+
:root {
|
|
3
|
+
--pimolu-tabs-indicator-duration: 240ms;
|
|
4
|
+
--pimolu-tabs-indicator-easing: cubic-bezier(0.22, 1, 0.36, 1);
|
|
5
|
+
}
|
|
2
6
|
.pimolu-tabs {
|
|
3
7
|
--pimolu-tabs-height: 40px;
|
|
4
8
|
--pimolu-tabs-padding-x: 14px;
|
|
@@ -64,18 +68,26 @@
|
|
|
64
68
|
flex: 1 1 auto;
|
|
65
69
|
flex-wrap: nowrap;
|
|
66
70
|
overflow-x: auto;
|
|
71
|
+
overflow-y: hidden;
|
|
67
72
|
overscroll-behavior-inline: contain;
|
|
68
73
|
}
|
|
69
74
|
.pimolu-tabs__list[data-scrollable=true] .pimolu-tabs__trigger {
|
|
70
75
|
flex: 0 0 auto;
|
|
71
76
|
}
|
|
72
|
-
.pimolu-tabs__list[data-scrollable=true] {
|
|
77
|
+
.pimolu-tabs__list[data-scrollable=true]:not([data-show-scrollbar=true]) {
|
|
73
78
|
scrollbar-width: none;
|
|
74
79
|
-ms-overflow-style: none;
|
|
75
80
|
}
|
|
76
|
-
.pimolu-tabs__list[data-scrollable=true]::-webkit-scrollbar {
|
|
81
|
+
.pimolu-tabs__list[data-scrollable=true]:not([data-show-scrollbar=true])::-webkit-scrollbar {
|
|
77
82
|
display: none;
|
|
78
83
|
}
|
|
84
|
+
.pimolu-tabs__list[data-scrollable=true][data-show-scrollbar=true] {
|
|
85
|
+
scrollbar-width: thin;
|
|
86
|
+
}
|
|
87
|
+
.pimolu-tabs__list[data-scrollable=true][data-show-scrollbar=true]::-webkit-scrollbar {
|
|
88
|
+
display: block;
|
|
89
|
+
height: 8px;
|
|
90
|
+
}
|
|
79
91
|
.pimolu-tabs__scroll {
|
|
80
92
|
display: inline-grid;
|
|
81
93
|
flex: none;
|
|
@@ -224,7 +236,7 @@
|
|
|
224
236
|
.pimolu-tabs--segmented .pimolu-tabs__trigger {
|
|
225
237
|
position: relative;
|
|
226
238
|
flex: 1 1 0;
|
|
227
|
-
min-width:
|
|
239
|
+
min-width: max-content;
|
|
228
240
|
padding-inline: var(--pimolu-spacing-3, 12px);
|
|
229
241
|
border-radius: 999px;
|
|
230
242
|
color: var(--pimolu-muted-foreground);
|
|
@@ -315,8 +327,82 @@
|
|
|
315
327
|
box-shadow: inset 2px 0 0 var(--pimolu-primary);
|
|
316
328
|
}
|
|
317
329
|
}
|
|
330
|
+
.pimolu-tabs__list {
|
|
331
|
+
position: relative;
|
|
332
|
+
isolation: isolate;
|
|
333
|
+
}
|
|
334
|
+
.pimolu-tabs__list > .pimolu-tabs__trigger {
|
|
335
|
+
position: relative;
|
|
336
|
+
z-index: 1;
|
|
337
|
+
}
|
|
338
|
+
.pimolu-tabs__indicator {
|
|
339
|
+
position: absolute;
|
|
340
|
+
top: 0;
|
|
341
|
+
left: 0;
|
|
342
|
+
z-index: 0;
|
|
343
|
+
pointer-events: none;
|
|
344
|
+
border-radius: var(--pimolu-radius-sm, 4px);
|
|
345
|
+
}
|
|
346
|
+
.pimolu-tabs__indicator[hidden] {
|
|
347
|
+
display: none;
|
|
348
|
+
}
|
|
349
|
+
.pimolu-tabs__indicator[data-ready=true] {
|
|
350
|
+
transition-property:
|
|
351
|
+
transform,
|
|
352
|
+
width,
|
|
353
|
+
height;
|
|
354
|
+
transition-duration: var(--pimolu-tabs-indicator-duration, 240ms);
|
|
355
|
+
transition-timing-function: var(--pimolu-tabs-indicator-easing, cubic-bezier(0.22, 1, 0.36, 1));
|
|
356
|
+
}
|
|
357
|
+
.pimolu-tabs__indicator::before {
|
|
358
|
+
content: "";
|
|
359
|
+
position: absolute;
|
|
360
|
+
inset: 0;
|
|
361
|
+
border-radius: inherit;
|
|
362
|
+
}
|
|
363
|
+
.pimolu-tabs--line > .pimolu-tabs__list-wrap > .pimolu-tabs__list > .pimolu-tabs__indicator::before {
|
|
364
|
+
inset-block-start: auto;
|
|
365
|
+
height: 2px;
|
|
366
|
+
background: var(--pimolu-primary);
|
|
367
|
+
}
|
|
368
|
+
.pimolu-tabs--vertical.pimolu-tabs--line > .pimolu-tabs__list-wrap > .pimolu-tabs__list > .pimolu-tabs__indicator::before {
|
|
369
|
+
inset-block: 0;
|
|
370
|
+
inset-inline-start: auto;
|
|
371
|
+
width: 2px;
|
|
372
|
+
height: auto;
|
|
373
|
+
}
|
|
374
|
+
.pimolu-tabs--solid > .pimolu-tabs__list-wrap > .pimolu-tabs__list > .pimolu-tabs__indicator::before {
|
|
375
|
+
background: var(--pimolu-primary);
|
|
376
|
+
}
|
|
377
|
+
.pimolu-tabs--soft > .pimolu-tabs__list-wrap > .pimolu-tabs__list > .pimolu-tabs__indicator::before {
|
|
378
|
+
background: color-mix(in srgb, var(--pimolu-primary) 12%, transparent);
|
|
379
|
+
}
|
|
380
|
+
.pimolu-tabs--segmented > .pimolu-tabs__list-wrap > .pimolu-tabs__list > .pimolu-tabs__indicator {
|
|
381
|
+
border-radius: 999px;
|
|
382
|
+
}
|
|
383
|
+
.pimolu-tabs--segmented > .pimolu-tabs__list-wrap > .pimolu-tabs__list > .pimolu-tabs__indicator::before {
|
|
384
|
+
background: color-mix(in srgb, var(--pimolu-foreground) 10%, var(--pimolu-muted));
|
|
385
|
+
box-shadow: var(--pimolu-shadow-sm, 0 1px 2px rgba(15, 23, 42, 0.12));
|
|
386
|
+
}
|
|
387
|
+
.pimolu-tabs__list[data-indicator=true] > .pimolu-tabs__trigger[data-state=active] {
|
|
388
|
+
background: transparent;
|
|
389
|
+
box-shadow: none;
|
|
390
|
+
}
|
|
391
|
+
@media (max-width: 600px) {
|
|
392
|
+
.pimolu-tabs--vertical.pimolu-tabs--line > .pimolu-tabs__list-wrap > .pimolu-tabs__list > .pimolu-tabs__indicator::before {
|
|
393
|
+
inset-inline-start: 0;
|
|
394
|
+
inset-inline-end: auto;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
.pimolu-tabs[data-animated=false] > .pimolu-tabs__list-wrap > .pimolu-tabs__list > :is(.pimolu-tabs__indicator, .pimolu-tabs__trigger) {
|
|
398
|
+
transition: none;
|
|
399
|
+
}
|
|
400
|
+
.pimolu-tabs[data-animated=false] > .pimolu-tabs__panel {
|
|
401
|
+
animation: none;
|
|
402
|
+
}
|
|
318
403
|
@media (prefers-reduced-motion: reduce) {
|
|
319
|
-
.pimolu-tabs__trigger
|
|
404
|
+
.pimolu-tabs__trigger,
|
|
405
|
+
.pimolu-tabs__indicator[data-ready=true] {
|
|
320
406
|
transition: none;
|
|
321
407
|
}
|
|
322
408
|
.pimolu-tabs__panel[data-state=active] {
|
|
@@ -324,6 +410,9 @@
|
|
|
324
410
|
}
|
|
325
411
|
}
|
|
326
412
|
@media (forced-colors: active) {
|
|
413
|
+
.pimolu-tabs__indicator {
|
|
414
|
+
display: none;
|
|
415
|
+
}
|
|
327
416
|
.pimolu-tabs__trigger[data-state=active] {
|
|
328
417
|
border: 1px solid Highlight;
|
|
329
418
|
color: Highlight;
|
package/dist/toast.css
CHANGED
|
@@ -1,19 +1,200 @@
|
|
|
1
|
+
/* src/spinner.css */
|
|
2
|
+
.pimolu-spinner {
|
|
3
|
+
--pimolu-spinner-size: 20px;
|
|
4
|
+
--pimolu-spinner-dot-size: calc(var(--pimolu-spinner-size) * 0.27);
|
|
5
|
+
--pimolu-spinner-color: currentColor;
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
flex: 0 0 auto;
|
|
10
|
+
box-sizing: border-box;
|
|
11
|
+
min-width: 0;
|
|
12
|
+
color: var(--pimolu-spinner-color);
|
|
13
|
+
line-height: 1;
|
|
14
|
+
vertical-align: middle;
|
|
15
|
+
user-select: none;
|
|
16
|
+
}
|
|
17
|
+
.pimolu-spinner--xs {
|
|
18
|
+
--pimolu-spinner-size: 12px;
|
|
19
|
+
}
|
|
20
|
+
.pimolu-spinner--sm {
|
|
21
|
+
--pimolu-spinner-size: 16px;
|
|
22
|
+
}
|
|
23
|
+
.pimolu-spinner--md {
|
|
24
|
+
--pimolu-spinner-size: 20px;
|
|
25
|
+
}
|
|
26
|
+
.pimolu-spinner--lg {
|
|
27
|
+
--pimolu-spinner-size: 24px;
|
|
28
|
+
}
|
|
29
|
+
.pimolu-spinner--xl {
|
|
30
|
+
--pimolu-spinner-size: 32px;
|
|
31
|
+
}
|
|
32
|
+
.pimolu-spinner--inherit {
|
|
33
|
+
--pimolu-spinner-color: currentColor;
|
|
34
|
+
}
|
|
35
|
+
.pimolu-spinner--neutral {
|
|
36
|
+
--pimolu-spinner-color: var(--pimolu-foreground, currentColor);
|
|
37
|
+
}
|
|
38
|
+
.pimolu-spinner--primary {
|
|
39
|
+
--pimolu-spinner-color: var(--pimolu-primary, currentColor);
|
|
40
|
+
}
|
|
41
|
+
.pimolu-spinner--secondary {
|
|
42
|
+
--pimolu-spinner-color: var(--pimolu-secondary, currentColor);
|
|
43
|
+
}
|
|
44
|
+
.pimolu-spinner--success {
|
|
45
|
+
--pimolu-spinner-color: var(--pimolu-success, currentColor);
|
|
46
|
+
}
|
|
47
|
+
.pimolu-spinner--warning {
|
|
48
|
+
--pimolu-spinner-color: var(--pimolu-warning, currentColor);
|
|
49
|
+
}
|
|
50
|
+
.pimolu-spinner--danger {
|
|
51
|
+
--pimolu-spinner-color: var(--pimolu-danger, currentColor);
|
|
52
|
+
}
|
|
53
|
+
.pimolu-spinner__visual {
|
|
54
|
+
display: inline-flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
flex: 0 0 auto;
|
|
58
|
+
width: var(--pimolu-spinner-size);
|
|
59
|
+
height: var(--pimolu-spinner-size);
|
|
60
|
+
}
|
|
61
|
+
.pimolu-spinner__svg {
|
|
62
|
+
display: block;
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
overflow: visible;
|
|
66
|
+
transform-origin: center;
|
|
67
|
+
animation: pimolu-spinner-rotate 1s linear infinite;
|
|
68
|
+
}
|
|
69
|
+
.pimolu-spinner__track,
|
|
70
|
+
.pimolu-spinner__indicator {
|
|
71
|
+
fill: none;
|
|
72
|
+
stroke: currentColor;
|
|
73
|
+
stroke-width: 2.5;
|
|
74
|
+
}
|
|
75
|
+
.pimolu-spinner__track {
|
|
76
|
+
opacity: 0.18;
|
|
77
|
+
}
|
|
78
|
+
.pimolu-spinner__indicator {
|
|
79
|
+
stroke-linecap: round;
|
|
80
|
+
}
|
|
81
|
+
.pimolu-spinner--circular .pimolu-spinner__indicator {
|
|
82
|
+
stroke-dasharray: 16 57;
|
|
83
|
+
}
|
|
84
|
+
.pimolu-spinner--arc .pimolu-spinner__indicator {
|
|
85
|
+
stroke-dasharray: 42 57;
|
|
86
|
+
}
|
|
87
|
+
.pimolu-spinner--arc .pimolu-spinner__track {
|
|
88
|
+
opacity: 0;
|
|
89
|
+
}
|
|
90
|
+
.pimolu-spinner--arc .pimolu-spinner__svg {
|
|
91
|
+
animation-duration: 1.3s;
|
|
92
|
+
}
|
|
93
|
+
@keyframes pimolu-spinner-rotate {
|
|
94
|
+
from {
|
|
95
|
+
transform: rotate(0deg);
|
|
96
|
+
}
|
|
97
|
+
to {
|
|
98
|
+
transform: rotate(360deg);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
.pimolu-spinner--dots .pimolu-spinner__visual {
|
|
102
|
+
width: calc(var(--pimolu-spinner-size) * 1.5);
|
|
103
|
+
gap: calc(var(--pimolu-spinner-size) * 0.14);
|
|
104
|
+
}
|
|
105
|
+
.pimolu-spinner__dot {
|
|
106
|
+
display: block;
|
|
107
|
+
flex: 0 0 auto;
|
|
108
|
+
width: var(--pimolu-spinner-dot-size);
|
|
109
|
+
height: var(--pimolu-spinner-dot-size);
|
|
110
|
+
border-radius: 50%;
|
|
111
|
+
background: currentColor;
|
|
112
|
+
animation: pimolu-spinner-dot 1.1s ease-in-out infinite;
|
|
113
|
+
}
|
|
114
|
+
.pimolu-spinner__dot:nth-child(1) {
|
|
115
|
+
animation-delay: -0.32s;
|
|
116
|
+
}
|
|
117
|
+
.pimolu-spinner__dot:nth-child(2) {
|
|
118
|
+
animation-delay: -0.16s;
|
|
119
|
+
}
|
|
120
|
+
.pimolu-spinner__dot:nth-child(3) {
|
|
121
|
+
animation-delay: 0s;
|
|
122
|
+
}
|
|
123
|
+
@keyframes pimolu-spinner-dot {
|
|
124
|
+
0%, 80%, 100% {
|
|
125
|
+
opacity: 0.35;
|
|
126
|
+
transform: translateY(0);
|
|
127
|
+
}
|
|
128
|
+
40% {
|
|
129
|
+
opacity: 1;
|
|
130
|
+
transform: translateY(-25%);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.pimolu-spinner__label {
|
|
134
|
+
position: absolute;
|
|
135
|
+
width: 1px;
|
|
136
|
+
height: 1px;
|
|
137
|
+
padding: 0;
|
|
138
|
+
margin: -1px;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
clip: rect(0, 0, 0, 0);
|
|
141
|
+
clip-path: inset(50%);
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
border: 0;
|
|
144
|
+
}
|
|
145
|
+
@media (prefers-reduced-motion: reduce) {
|
|
146
|
+
.pimolu-spinner__svg,
|
|
147
|
+
.pimolu-spinner__dot {
|
|
148
|
+
animation: none;
|
|
149
|
+
}
|
|
150
|
+
.pimolu-spinner__dot {
|
|
151
|
+
opacity: 1;
|
|
152
|
+
transform: none;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
@media (forced-colors: active) {
|
|
156
|
+
.pimolu-spinner {
|
|
157
|
+
color: CanvasText;
|
|
158
|
+
}
|
|
159
|
+
.pimolu-spinner__track {
|
|
160
|
+
opacity: 0.4;
|
|
161
|
+
}
|
|
162
|
+
.pimolu-spinner__dot {
|
|
163
|
+
background: currentColor;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
1
167
|
/* src/toast.css */
|
|
2
168
|
.pimolu-toaster {
|
|
169
|
+
--pimolu-toast-width: 24rem;
|
|
170
|
+
--pimolu-toast-padding: 14px;
|
|
171
|
+
--pimolu-toast-duration: 180ms;
|
|
172
|
+
--pimolu-toast-easing: cubic-bezier(0.16, 1, 0.3, 1);
|
|
3
173
|
position: fixed;
|
|
4
174
|
z-index: 60;
|
|
5
175
|
display: grid;
|
|
6
|
-
gap:
|
|
7
|
-
width: min(
|
|
176
|
+
gap: var(--pimolu-spacing-3, 12px);
|
|
177
|
+
width: min(var(--pimolu-toast-width, 24rem), calc(100vw - 32px));
|
|
178
|
+
max-height: calc(100dvh - 32px);
|
|
179
|
+
overflow-y: auto;
|
|
180
|
+
overscroll-behavior: contain;
|
|
8
181
|
pointer-events: none;
|
|
9
182
|
}
|
|
183
|
+
.pimolu-toaster[data-position=top-left] {
|
|
184
|
+
inset-block-start: 16px;
|
|
185
|
+
inset-inline-start: 16px;
|
|
186
|
+
}
|
|
187
|
+
.pimolu-toaster[data-position=bottom-left] {
|
|
188
|
+
inset-block-end: 16px;
|
|
189
|
+
inset-inline-start: 16px;
|
|
190
|
+
}
|
|
10
191
|
.pimolu-toaster[data-position=top-right] {
|
|
11
192
|
inset-block-start: 16px;
|
|
12
193
|
inset-inline-end: 16px;
|
|
13
194
|
}
|
|
14
195
|
.pimolu-toaster[data-position=top-center] {
|
|
15
196
|
inset-block-start: 16px;
|
|
16
|
-
|
|
197
|
+
left: 50%;
|
|
17
198
|
transform: translateX(-50%);
|
|
18
199
|
}
|
|
19
200
|
.pimolu-toaster[data-position=bottom-right] {
|
|
@@ -22,7 +203,7 @@
|
|
|
22
203
|
}
|
|
23
204
|
.pimolu-toaster[data-position=bottom-center] {
|
|
24
205
|
inset-block-end: 16px;
|
|
25
|
-
|
|
206
|
+
left: 50%;
|
|
26
207
|
transform: translateX(-50%);
|
|
27
208
|
}
|
|
28
209
|
.pimolu-toast {
|
|
@@ -32,7 +213,7 @@
|
|
|
32
213
|
justify-content: space-between;
|
|
33
214
|
gap: 12px;
|
|
34
215
|
box-sizing: border-box;
|
|
35
|
-
padding:
|
|
216
|
+
padding: var(--pimolu-toast-padding, 14px);
|
|
36
217
|
border: var(--pimolu-control-border-width, 1px) solid var(--pimolu-border);
|
|
37
218
|
border-inline-start: 3px solid var(--pimolu-toast-tone);
|
|
38
219
|
border-radius: var(--pimolu-radius-md, 8px);
|
|
@@ -41,7 +222,23 @@
|
|
|
41
222
|
box-shadow: var( --pimolu-shadow-raised, none );
|
|
42
223
|
font-family: var(--pimolu-font-body, inherit);
|
|
43
224
|
pointer-events: auto;
|
|
44
|
-
animation: pimolu-toast-in
|
|
225
|
+
animation: pimolu-toast-in var(--pimolu-toast-duration, 180ms) var(--pimolu-toast-easing, cubic-bezier(0.16, 1, 0.3, 1));
|
|
226
|
+
}
|
|
227
|
+
.pimolu-toast--info,
|
|
228
|
+
.pimolu-toast--loading {
|
|
229
|
+
--pimolu-toast-tone: var(--pimolu-primary);
|
|
230
|
+
}
|
|
231
|
+
.pimolu-toast__icon {
|
|
232
|
+
display: inline-grid;
|
|
233
|
+
place-items: center;
|
|
234
|
+
flex: none;
|
|
235
|
+
width: 20px;
|
|
236
|
+
height: 20px;
|
|
237
|
+
margin-block-start: 1px;
|
|
238
|
+
color: var(--pimolu-toast-tone);
|
|
239
|
+
}
|
|
240
|
+
.pimolu-toast--default .pimolu-toast__icon {
|
|
241
|
+
color: var(--pimolu-muted-foreground);
|
|
45
242
|
}
|
|
46
243
|
.pimolu-toast--success {
|
|
47
244
|
--pimolu-toast-tone: var(--pimolu-success, #15803d);
|
|
@@ -56,6 +253,7 @@
|
|
|
56
253
|
display: grid;
|
|
57
254
|
gap: 2px;
|
|
58
255
|
min-width: 0;
|
|
256
|
+
flex: 1;
|
|
59
257
|
}
|
|
60
258
|
.pimolu-toast__title {
|
|
61
259
|
margin: 0;
|
|
@@ -76,6 +274,9 @@
|
|
|
76
274
|
align-items: center;
|
|
77
275
|
gap: 4px;
|
|
78
276
|
flex: none;
|
|
277
|
+
flex-wrap: wrap;
|
|
278
|
+
justify-content: flex-end;
|
|
279
|
+
max-width: 45%;
|
|
79
280
|
}
|
|
80
281
|
.pimolu-toast__action {
|
|
81
282
|
padding: 2px 6px;
|
|
@@ -87,15 +288,21 @@
|
|
|
87
288
|
font-size: 0.8125rem;
|
|
88
289
|
font-weight: 600;
|
|
89
290
|
cursor: pointer;
|
|
291
|
+
overflow-wrap: anywhere;
|
|
90
292
|
}
|
|
91
293
|
.pimolu-toast__action:hover {
|
|
92
294
|
background: var(--pimolu-muted);
|
|
93
295
|
}
|
|
296
|
+
.pimolu-toast__action:disabled {
|
|
297
|
+
opacity: 0.5;
|
|
298
|
+
cursor: not-allowed;
|
|
299
|
+
}
|
|
94
300
|
.pimolu-toast__close {
|
|
95
301
|
display: inline-grid;
|
|
96
302
|
place-items: center;
|
|
97
|
-
width:
|
|
98
|
-
height:
|
|
303
|
+
width: 28px;
|
|
304
|
+
height: 28px;
|
|
305
|
+
flex: none;
|
|
99
306
|
padding: 0;
|
|
100
307
|
border: 0;
|
|
101
308
|
border-radius: var(--pimolu-radius-sm, 4px);
|
|
@@ -104,6 +311,16 @@
|
|
|
104
311
|
line-height: 0;
|
|
105
312
|
cursor: pointer;
|
|
106
313
|
}
|
|
314
|
+
@media (pointer: coarse) {
|
|
315
|
+
.pimolu-toast__action,
|
|
316
|
+
.pimolu-toast__close {
|
|
317
|
+
min-width: 44px;
|
|
318
|
+
min-height: 44px;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
.pimolu-toaster:empty {
|
|
322
|
+
pointer-events: none;
|
|
323
|
+
}
|
|
107
324
|
.pimolu-toast__close:hover {
|
|
108
325
|
background: var(--pimolu-muted);
|
|
109
326
|
color: var(--pimolu-foreground);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pimolu/web-styles",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.4",
|
|
4
4
|
"description": "Pimolu UI component stylesheets and CSS bundles.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
},
|
|
162
162
|
|
|
163
163
|
"dependencies": {
|
|
164
|
-
"@pimolu/themes": "0.1.0-beta.
|
|
164
|
+
"@pimolu/themes": "0.1.0-beta.4"
|
|
165
165
|
},
|
|
166
166
|
|
|
167
167
|
"devDependencies": {
|