@infonomic/uikit 5.2.1 → 5.4.0
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/dist/astro.d.ts +45 -0
- package/dist/astro.js +45 -0
- package/dist/components/accordion/accordion.module.css +60 -0
- package/dist/components/avatar/avatar.module.css +54 -0
- package/dist/components/badge/badge.module.css +61 -0
- package/dist/components/button/button-group.module.css +19 -0
- package/dist/components/button/button.astro +86 -0
- package/dist/components/button/button.module.css +431 -0
- package/dist/components/button/control-buttons.module.css +132 -0
- package/dist/components/button/copy-button.module.css +56 -0
- package/dist/components/button/icon-button.astro +47 -0
- package/dist/components/card/card-content.astro +14 -0
- package/dist/components/card/card-description.astro +14 -0
- package/dist/components/card/card-footer.astro +14 -0
- package/dist/components/card/card-header.astro +14 -0
- package/dist/components/card/card-title.astro +14 -0
- package/dist/components/card/card.astro +41 -0
- package/dist/components/card/card.module.css +77 -0
- package/dist/components/container/container.astro +13 -0
- package/dist/components/container/container.module.css +36 -0
- package/dist/components/dropdown/dropdown.module.css +120 -0
- package/dist/components/forms/calendar.module.css +269 -0
- package/dist/components/forms/checkbox.module.css +211 -0
- package/dist/components/forms/error-text.astro +14 -0
- package/dist/components/forms/error-text.module.css +9 -0
- package/dist/components/forms/help-text.astro +13 -0
- package/dist/components/forms/help-text.module.css +9 -0
- package/dist/components/forms/input-adornment.astro +26 -0
- package/dist/components/forms/input-adornment.module.css +21 -0
- package/dist/components/forms/input.astro +99 -0
- package/dist/components/forms/input.module.css +278 -0
- package/dist/components/forms/label.astro +24 -0
- package/dist/components/forms/label.module.css +15 -0
- package/dist/components/forms/radio-group.module.css +163 -0
- package/dist/components/forms/select.module.css +68 -0
- package/dist/components/forms/text-area.module.css +10 -0
- package/dist/components/hamburger/hamburger.astro +30 -0
- package/dist/components/notifications/alert.module.css +110 -0
- package/dist/components/notifications/toast.module.css +237 -0
- package/dist/components/overlay/overlay.module.css +41 -0
- package/dist/components/pager/pagination.module.css +149 -0
- package/dist/components/scroll-area/scroll-area.module.css +64 -0
- package/dist/components/scroll-to-top/scroll-to-top.astro +75 -0
- package/dist/components/scroll-to-top/scroll-to-top.d.ts +12 -7
- package/dist/components/scroll-to-top/scroll-to-top.d.ts.map +1 -1
- package/dist/components/scroll-to-top/scroll-to-top.js +24 -14
- package/dist/components/scroll-to-top/scroll-to-top.module.css +86 -0
- package/dist/components/section/section.astro +13 -0
- package/dist/components/section/section.module.css +9 -0
- package/dist/components/shimmer/shimmer.module.css +53 -0
- package/dist/components/table/table.module.css +100 -0
- package/dist/components/tabs/tabs.module.css +66 -0
- package/dist/components/tooltip/tooltip.module.css +45 -0
- package/dist/icons/close-icon.astro +38 -0
- package/dist/icons/icon-element.astro +27 -0
- package/dist/icons/icons.module.css +155 -0
- package/dist/icons/light-icon.astro +36 -0
- package/dist/icons/moon-icon.astro +38 -0
- package/dist/icons/search-icon.astro +40 -0
- package/dist/widgets/datepicker/datepicker.module.css +189 -0
- package/dist/widgets/drawer/drawer.module.css +112 -0
- package/dist/widgets/modal/modal.module.css +81 -0
- package/dist/widgets/timeline/timeline.module.css +87 -0
- package/package.json +5 -4
- package/src/astro.d.ts +2 -0
- package/src/astro.js +3 -0
- package/src/components/scroll-to-top/scroll-to-top.astro +75 -0
- package/src/components/scroll-to-top/scroll-to-top.tsx +52 -33
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
|
+
|
|
3
|
+
@layer infonomic-components {
|
|
4
|
+
.label,
|
|
5
|
+
:global(.label) {
|
|
6
|
+
display: block;
|
|
7
|
+
font-weight: 500;
|
|
8
|
+
color: var(--text)
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.required,
|
|
12
|
+
:global(.label-required) {
|
|
13
|
+
color: var(--error);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
|
+
|
|
3
|
+
/* 'border-collapse w-full text-sm text-left text-gray-700 dark:text-gray-400 m-0', */
|
|
4
|
+
@layer infonomic-components {
|
|
5
|
+
|
|
6
|
+
.column {
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
gap: var(--gap-2);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.row {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: row;
|
|
15
|
+
gap: var(--gap-2);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.item-container {
|
|
19
|
+
display: flex;
|
|
20
|
+
align-items: center;
|
|
21
|
+
gap: var(--gap-2);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.item {
|
|
25
|
+
all: unset;
|
|
26
|
+
width: 18px;
|
|
27
|
+
height: 18px;
|
|
28
|
+
border-radius: var(--border-radius-full);
|
|
29
|
+
border: 2px solid var(--radio-border);
|
|
30
|
+
transition: all var(--transition-normal);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.item[data-state="checked"] {
|
|
34
|
+
--ring-offset-color: var(--background);
|
|
35
|
+
--ring-offset-shadow: var(--ring-inset) 0 0 0 var(--ring-offset-width) var(--ring-offset-color);
|
|
36
|
+
--ring-shadow: var(--ring-inset) 0 0 0 calc(1px + var(--ring-offset-width)) var(--ring-color);
|
|
37
|
+
box-shadow: var(--ring-offset-shadow), var(--ring-shadow), var(--shadow, 0 0 #0000);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.item:disabled,
|
|
41
|
+
.item[disabled] {
|
|
42
|
+
pointer-events: none;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Style for the "checked" state */
|
|
46
|
+
.indicator[data-state="checked"] {
|
|
47
|
+
animation: radioIn 0.3s cubic-bezier(0.25, 1.5, 0.5, 1) forwards;
|
|
48
|
+
opacity: 1;
|
|
49
|
+
transform: scale(1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Style for the "unchecked" state */
|
|
53
|
+
.indicator[data-state="unchecked"] {
|
|
54
|
+
animation: radioOut 0.2s ease-in;
|
|
55
|
+
opacity: 0;
|
|
56
|
+
transform: scale(0.8);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.indicator {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: 100%;
|
|
65
|
+
position: relative;
|
|
66
|
+
|
|
67
|
+
&::after {
|
|
68
|
+
content: "";
|
|
69
|
+
display: block;
|
|
70
|
+
width: 11px;
|
|
71
|
+
height: 11px;
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
background-color: var(--radio-indicator-color);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.label {
|
|
78
|
+
color: var(--foreground);
|
|
79
|
+
font-size: 15px;
|
|
80
|
+
line-height: 1;
|
|
81
|
+
padding-left: var(--spacing-8);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.row .label {
|
|
85
|
+
padding-left: 0;
|
|
86
|
+
padding-right: var(--spacing-16)
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
/* Intents */
|
|
91
|
+
.primary {
|
|
92
|
+
--radio-border: var(--fill-primary-strong);
|
|
93
|
+
--radio-indicator-color: var(--fill-primary-strong);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.secondary {
|
|
97
|
+
--radio-border: var(--fill-secondary-strong);
|
|
98
|
+
--radio-indicator-color: var(--fill-secondary-strong);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.noeffect {
|
|
102
|
+
--radio-border: var(--fill-noeffect-strong);
|
|
103
|
+
--radio-indicator-color: var(--fill-noeffect-strong);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.success {
|
|
107
|
+
--radio-border: var(--fill-success-strong);
|
|
108
|
+
--radio-indicator-color: var(--fill-success-strong);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.info {
|
|
112
|
+
--radio-border: var(--fill-info-strong);
|
|
113
|
+
--radio-indicator-color: var(--fill-info-strong);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.warning {
|
|
117
|
+
--radio-border: var(--fill-warning-strong);
|
|
118
|
+
--radio-indicator-color: var(--fill-warning-strong);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.danger {
|
|
122
|
+
--radio-border: var(--fill-danger-strong);
|
|
123
|
+
--radio-indicator-color: var(--fill-danger-strong);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Dark mode handled by semantic tokens in theme layer */
|
|
127
|
+
|
|
128
|
+
@keyframes radioIn {
|
|
129
|
+
0% {
|
|
130
|
+
opacity: 0;
|
|
131
|
+
transform: scale(0.8);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
50% {
|
|
135
|
+
opacity: 1;
|
|
136
|
+
transform: scale(1.2);
|
|
137
|
+
/* Overshoot */
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
80% {
|
|
141
|
+
transform: scale(0.9);
|
|
142
|
+
/* Slight bounce back */
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
100% {
|
|
146
|
+
transform: scale(1);
|
|
147
|
+
/* Settle */
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Define keyframes for the "unchecked" state */
|
|
152
|
+
@keyframes radioOut {
|
|
153
|
+
from {
|
|
154
|
+
opacity: 1;
|
|
155
|
+
transform: scale(1);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
to {
|
|
159
|
+
opacity: 0;
|
|
160
|
+
transform: scale(0.8);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
|
+
|
|
3
|
+
@layer infonomic-components {
|
|
4
|
+
.content {
|
|
5
|
+
z-index: 50;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.viewport {
|
|
9
|
+
z-index: 50;
|
|
10
|
+
margin-top: 2px;
|
|
11
|
+
border: 1px solid var(--surface-panel-border);
|
|
12
|
+
box-shadow: var(--shadow-md);
|
|
13
|
+
border-radius: var(--border-radius-md);
|
|
14
|
+
background-color: var(--surface-panel-elevated);
|
|
15
|
+
padding: 6px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.group {
|
|
19
|
+
z-index: 50;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.scroll-button {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
color: var(--surface-item-text);
|
|
27
|
+
border: 1px solid var(--surface-panel-border);
|
|
28
|
+
box-shadow: var(--shadow-md);
|
|
29
|
+
border-radius: var(--border-radius-md);
|
|
30
|
+
background-color: var(--surface-panel-elevated);
|
|
31
|
+
padding: 2px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.select-item {
|
|
35
|
+
position: relative;
|
|
36
|
+
user-select: none;
|
|
37
|
+
color: var(--surface-item-text);
|
|
38
|
+
background-color: var(--surface-item);
|
|
39
|
+
font-size: 1rem;
|
|
40
|
+
line-height: 1;
|
|
41
|
+
padding-right: 35px;
|
|
42
|
+
padding-left: 25px;
|
|
43
|
+
height: 32px;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
border-radius: 6px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.select-item[data-disabled] {
|
|
50
|
+
color: var(--surface-item-text-disabled);
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.select-item[data-highlighted] {
|
|
55
|
+
outline: none;
|
|
56
|
+
background-color: var(--surface-item-hover);
|
|
57
|
+
color: var(--surface-item-text-hover);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.select-item-indicator {
|
|
61
|
+
position: absolute;
|
|
62
|
+
left: 0;
|
|
63
|
+
width: 25px;
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
|
+
|
|
3
|
+
@layer infonomic-components {
|
|
4
|
+
.text-area,
|
|
5
|
+
:global(.text-area) {
|
|
6
|
+
font-size: 1.1rem;
|
|
7
|
+
width: 100%;
|
|
8
|
+
padding: 0.5rem;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
// SEE: uikit/src/styles/components/hamburger.css
|
|
3
|
+
|
|
4
|
+
// NOTE: we don't use open or color props in Astro.
|
|
5
|
+
// Instead we set open / closed state via nanostores.
|
|
6
|
+
// and then apply global classes according.
|
|
7
|
+
// Class overrides for inner span colors are set in
|
|
8
|
+
// Astro app.css
|
|
9
|
+
|
|
10
|
+
interface HamburgerProps {
|
|
11
|
+
class?: string
|
|
12
|
+
ariaLabel?: string
|
|
13
|
+
ariaControls?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const { class: className, ariaLabel, ariaControls } = Astro.props as HamburgerProps
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<button
|
|
20
|
+
id="component--hamburger"
|
|
21
|
+
class:list={['component--hamburger', className]}
|
|
22
|
+
tabindex="0"
|
|
23
|
+
aria-label={ariaLabel}
|
|
24
|
+
aria-controls={ariaControls}
|
|
25
|
+
aria-haspopup="true"
|
|
26
|
+
>
|
|
27
|
+
<span class="box" aria-hidden="true">
|
|
28
|
+
<span class="inner"></span>
|
|
29
|
+
</span>
|
|
30
|
+
</button>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
|
+
|
|
3
|
+
@layer infonomic-components {
|
|
4
|
+
.alert {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: start;
|
|
7
|
+
width: 100%;
|
|
8
|
+
gap: var(--gap-2);
|
|
9
|
+
border-radius: var(--border-radius-md);
|
|
10
|
+
padding: 16px;
|
|
11
|
+
font-family: inherit;
|
|
12
|
+
font-weight: normal;
|
|
13
|
+
transition: all 0.3s ease-in-out;
|
|
14
|
+
border: 1px solid var(--alert-border);
|
|
15
|
+
background-color: var(--alert-background);
|
|
16
|
+
margin-bottom: 1rem;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.alert-with-title {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
width: 100%;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.icon {
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.close {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
padding: 0;
|
|
36
|
+
min-width: 24px;
|
|
37
|
+
min-height: 24px;
|
|
38
|
+
width: 24px;
|
|
39
|
+
height: 24px;
|
|
40
|
+
border-radius: 100%;
|
|
41
|
+
margin-left: auto;
|
|
42
|
+
margin-top: -2px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.fade {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
transition: opacity 0.4s ease-in-out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.header {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: start;
|
|
53
|
+
width: 100%;
|
|
54
|
+
margin-bottom: var(--spacing-8);
|
|
55
|
+
gap: var(--gap-2);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.title {
|
|
59
|
+
display: flex;
|
|
60
|
+
font-weight: bold;
|
|
61
|
+
font-size: 1.2rem;
|
|
62
|
+
line-height: 1;
|
|
63
|
+
padding-top: 1px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.content {
|
|
67
|
+
padding-top: 1px;
|
|
68
|
+
font-size: var(--font-size-sm);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.content:first-child {
|
|
72
|
+
margin-top: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Intents */
|
|
76
|
+
.primary {
|
|
77
|
+
--alert-border: var(--stroke-primary);
|
|
78
|
+
--alert-background: var(--fill-primary-weak);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.secondary {
|
|
82
|
+
--alert-border: var(--stroke-secondary);
|
|
83
|
+
--alert-background: var(--fill-secondary-weak);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.noeffect {
|
|
87
|
+
--alert-border: var(--stroke-noeffect);
|
|
88
|
+
--alert-background: var(--fill-noeffect-weak);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.success {
|
|
92
|
+
--alert-border: var(--stroke-success);
|
|
93
|
+
--alert-background: var(--fill-success-weak);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.info {
|
|
97
|
+
--alert-border: var(--stroke-info);
|
|
98
|
+
--alert-background: var(--fill-info-weak);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.warning {
|
|
102
|
+
--alert-border: var(--stroke-warning);
|
|
103
|
+
--alert-background: var(--fill-warning-weak);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.danger {
|
|
107
|
+
--alert-border: var(--stroke-danger);
|
|
108
|
+
--alert-background: var(--fill-danger-weak);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
@layer infonomic-base, infonomic-functional, infonomic-utilities, infonomic-theme, infonomic-typography, infonomic-components;
|
|
2
|
+
|
|
3
|
+
@layer infonomic-components {
|
|
4
|
+
/* Positions are relative to the toast viewport which is set
|
|
5
|
+
globally in components/toast.css */
|
|
6
|
+
|
|
7
|
+
.root {
|
|
8
|
+
position: absolute;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
gap: var(--gap-1);
|
|
12
|
+
padding-top: 12px;
|
|
13
|
+
padding-bottom: 16px;
|
|
14
|
+
background: var(--gray-25);
|
|
15
|
+
border-width: var(--border-width-thin);
|
|
16
|
+
border-color: var(--border-color);
|
|
17
|
+
border-style: var(--border-style-solid);
|
|
18
|
+
border-radius: var(--border-radius-md);
|
|
19
|
+
box-shadow: var(--shadow-sm);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.root:is(:global(.dark) *) {
|
|
23
|
+
background: var(--canvas-800);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.root[data-state="open"] {
|
|
27
|
+
animation: slideInFromBottom 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.root[data-state="closed"] {
|
|
31
|
+
animation: hide 100ms ease-in;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.root[data-swipe="move"] {
|
|
35
|
+
transform: translateX(var(--radix-toast-swipe-move-x));
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.root[data-swipe="cancel"] {
|
|
39
|
+
transform: translateX(0);
|
|
40
|
+
transition: transform 200ms ease-out;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.root.top-right[data-swipe="end"],
|
|
44
|
+
.root.bottom-right[data-swipe="end"] {
|
|
45
|
+
animation: swipeOutToRight 100ms ease-out;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.root.top-left[data-swipe="end"],
|
|
49
|
+
.root.bottom-left[data-swipe="end"] {
|
|
50
|
+
animation: swipeOutToLeft 100ms ease-out;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.header {
|
|
54
|
+
display: flex;
|
|
55
|
+
padding: 0 16px 0 12px;
|
|
56
|
+
align-items: start;
|
|
57
|
+
gap: var(--gap-2);
|
|
58
|
+
justify-content: space-between;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.close {
|
|
62
|
+
display: flex;
|
|
63
|
+
align-items: center;
|
|
64
|
+
justify-content: center;
|
|
65
|
+
padding: 0;
|
|
66
|
+
min-width: 24px;
|
|
67
|
+
min-height: 24px;
|
|
68
|
+
width: 24px;
|
|
69
|
+
height: 24px;
|
|
70
|
+
border-radius: 100%;
|
|
71
|
+
margin-left: auto;
|
|
72
|
+
margin-top: -2px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.close svg {
|
|
76
|
+
fill: white;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
.title {
|
|
81
|
+
display: flex;
|
|
82
|
+
padding: 0 12px 0 8px;
|
|
83
|
+
align-items: start;
|
|
84
|
+
gap: var(--gap-2);
|
|
85
|
+
margin-bottom: 5px;
|
|
86
|
+
font-weight: 500;
|
|
87
|
+
font-size: 15px;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.description {
|
|
91
|
+
margin: 0;
|
|
92
|
+
padding: 0 8px 0 12px;
|
|
93
|
+
font-size: var(--font-size-sm);
|
|
94
|
+
line-height: 1.3;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.action {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: end;
|
|
100
|
+
padding: 0 12px 0 12px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* Positions are relative to the toast viewport which is set
|
|
104
|
+
globally in components/toast.css */
|
|
105
|
+
|
|
106
|
+
.top-left {
|
|
107
|
+
top: 88px;
|
|
108
|
+
right: 16px;
|
|
109
|
+
left: 16px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.top-right {
|
|
113
|
+
top: 88px;
|
|
114
|
+
right: 16px;
|
|
115
|
+
left: 16px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.bottom-left {
|
|
119
|
+
bottom: 16px;
|
|
120
|
+
right: 16px;
|
|
121
|
+
left: 16px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.bottom-right {
|
|
125
|
+
bottom: 16px;
|
|
126
|
+
right: 16px;
|
|
127
|
+
left: 16px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@media (min-width: 48rem) {
|
|
131
|
+
|
|
132
|
+
.root.top-right[data-state="open"],
|
|
133
|
+
.root.bottom-right[data-state="open"] {
|
|
134
|
+
animation: slideInFromRight 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.root.top-left[data-state="open"],
|
|
138
|
+
.root.bottom-left[data-state="open"] {
|
|
139
|
+
animation: slideInFromLeft 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.bottom-right {
|
|
143
|
+
bottom: 16px;
|
|
144
|
+
right: 16px;
|
|
145
|
+
left: auto;
|
|
146
|
+
width: 100%;
|
|
147
|
+
max-width: 390px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.bottom-left {
|
|
151
|
+
bottom: 16px;
|
|
152
|
+
left: 16px;
|
|
153
|
+
right: auto;
|
|
154
|
+
width: 100%;
|
|
155
|
+
max-width: 390px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.top-left {
|
|
159
|
+
top: 88px;
|
|
160
|
+
left: 16px;
|
|
161
|
+
right: auto;
|
|
162
|
+
bottom: auto;
|
|
163
|
+
width: 100%;
|
|
164
|
+
max-width: 390px;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.top-right {
|
|
168
|
+
top: 88px;
|
|
169
|
+
right: 16px;
|
|
170
|
+
bottom: auto;
|
|
171
|
+
left: auto;
|
|
172
|
+
width: 100%;
|
|
173
|
+
max-width: 390px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@keyframes slideInFromRight {
|
|
179
|
+
from {
|
|
180
|
+
transform: translateX(calc(100% + var(--viewport-padding)));
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
to {
|
|
184
|
+
transform: translateX(0);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@keyframes slideInFromLeft {
|
|
189
|
+
from {
|
|
190
|
+
transform: translateX(calc(-100% - var(--viewport-padding)));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
to {
|
|
194
|
+
transform: translateX(0);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@keyframes slideInFromBottom {
|
|
199
|
+
from {
|
|
200
|
+
transform: translateY(calc(100% + var(--viewport-padding)));
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
to {
|
|
204
|
+
transform: translateY(0);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes swipeOutToRight {
|
|
209
|
+
from {
|
|
210
|
+
transform: translateX(var(--radix-toast-swipe-end-x));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
to {
|
|
214
|
+
transform: translateX(calc(100% + var(--viewport-padding)));
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@keyframes swipeOutToLeft {
|
|
219
|
+
from {
|
|
220
|
+
transform: translateX(var(--radix-toast-swipe-end-x));
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
to {
|
|
224
|
+
transform: translateX(calc(-100% - var(--viewport-padding)));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@keyframes hide {
|
|
229
|
+
from {
|
|
230
|
+
opacity: 1;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
to {
|
|
234
|
+
opacity: 0;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.overlay {
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
background-color: rgba(245, 245, 245, 0.35);
|
|
8
|
+
z-index: 20;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.overlay:is(:global(.dark) *) {
|
|
12
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.animate-fade-in {
|
|
16
|
+
animation: fade-in 0.3s ease-in-out;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.animate-fade-out {
|
|
20
|
+
animation: fade-out 0.3s ease-in-out;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@keyframes fade-in {
|
|
24
|
+
from {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
to {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes fade-out {
|
|
34
|
+
from {
|
|
35
|
+
opacity: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
to {
|
|
39
|
+
opacity: 0;
|
|
40
|
+
}
|
|
41
|
+
}
|