@midas-ds/components 16.6.2 → 16.6.3
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/CHANGELOG.md +14 -0
- package/assets/Dialog.css +1 -1
- package/assets/ProgressBar.css +1 -1
- package/assets/Skeleton.css +1 -1
- package/assets/Spinner.css +1 -1
- package/assets/Toast.css +1 -1
- package/chunks/Toast-PDCyyP45.js +157 -0
- package/index.js +1 -1
- package/package.json +2 -2
- package/toast/index.js +1 -1
- package/chunks/Toast-DGvPi4rb.js +0 -157
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 16.6.3 (2026-01-30)
|
|
2
|
+
|
|
3
|
+
### 🩹 Fixes
|
|
4
|
+
|
|
5
|
+
- **components:** revert pure css modules comments ([ec0ab554dc](https://github.com/migrationsverket/midas/commit/ec0ab554dc))
|
|
6
|
+
|
|
7
|
+
### 🔙 Rollback changes
|
|
8
|
+
|
|
9
|
+
- **components:** Revert "chore(components): install postcss-modules-local-by-default" ([101cac9975](https://github.com/migrationsverket/midas/commit/101cac9975))
|
|
10
|
+
|
|
11
|
+
### 🧱 Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated theme to 3.10.2
|
|
14
|
+
|
|
1
15
|
## 16.6.2 (2026-01-30)
|
|
2
16
|
|
|
3
17
|
### 🩹 Fixes
|
package/assets/Dialog.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._modal_nxs78_1{font-family:var(--midas-typography-font-family);position:fixed;max-width:75%;min-width:300px;max-height:90vh;overflow-y:auto;background-color:var(--midas-background-base);color:var(--midas-text-primary);border:none;padding:0;margin:auto}._modal_nxs78_1[data-entering]{animation:none}@media(forced-colors:active){._modal_nxs78_1{outline:2px solid}}._overlay_nxs78_24{position:fixed;top:0;left:0;z-index:var(--midas-z-index-modal);width:100vw;background:#2d00004d;display:flex;align-items:center;justify-content:center;height:var(--visual-viewport-height)}._overlay_nxs78_24[data-entering]{animation
|
|
1
|
+
._modal_nxs78_1{font-family:var(--midas-typography-font-family);position:fixed;max-width:75%;min-width:300px;max-height:90vh;overflow-y:auto;background-color:var(--midas-background-base);color:var(--midas-text-primary);border:none;padding:0;margin:auto}._modal_nxs78_1[data-entering]{animation:none}@media(forced-colors:active){._modal_nxs78_1{outline:2px solid}}._overlay_nxs78_24{position:fixed;top:0;left:0;z-index:var(--midas-z-index-modal);width:100vw;background:#2d00004d;display:flex;align-items:center;justify-content:center;height:var(--visual-viewport-height)}._overlay_nxs78_24[data-entering]{animation:_modal-fade_nxs78_1 .15s}._overlay_nxs78_24[data-exiting]{animation:_modal-fade_nxs78_1 .15s reverse}._modalHeader_nxs78_48{min-height:var(--midas-size-150);background-color:var(--midas-layer-01-base);display:flex;justify-content:space-between;align-items:flex-start;position:sticky;top:0;z-index:var(--midas-z-index-above)}._modalTitle_nxs78_59{flex-grow:1;place-self:center;padding-left:1rem}._modalBody_nxs78_65{position:relative;padding:1rem 2rem 2rem;font-family:var(--midas-typography-font-family);display:flex;flex-direction:column;gap:1rem}@keyframes _modal-fade_nxs78_1{0%{opacity:0}to{opacity:1}}@keyframes _modal-zoom_nxs78_1{0%{transform:scale(.8)}to{transform:scale(1)}}@media(prefers-reduced-motion){._overlay_nxs78_24[data-entering],._overlay_nxs78_24[data-exiting]{animation:none}}
|
package/assets/ProgressBar.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._progressBar_1a2ad_1{display:grid;gap:.5rem;grid-template-areas:"label value" "bar bar";grid-template-columns:1fr auto}._progressBar_1a2ad_1 ._label_1a2ad_9{grid-area:label;margin:0}._progressBar_1a2ad_1 ._value_1a2ad_14{grid-area:value;margin:0}._progressBar_1a2ad_1 ._bar_1a2ad_19{background:var(--midas-layer-accent-01-base);grid-area:bar;height:.25rem;overflow:hidden}@media(forced-colors:active){._progressBar_1a2ad_1 ._bar_1a2ad_19{border:1px solid}}._progressBar_1a2ad_1 ._bar_1a2ad_19 ._fill_1a2ad_29{background:var(--midas-color-signal-green-100);height:100%}@media(forced-colors:active){._progressBar_1a2ad_1 ._bar_1a2ad_19 ._fill_1a2ad_29{background:highlight}}._progressBar_1a2ad_1:not([aria-valuenow]) ._fill_1a2ad_29{will-change:transform;background:var(--midas-color-signal-green-100);height:100%;animation:2s ease-in-out infinite
|
|
1
|
+
._progressBar_1a2ad_1{display:grid;gap:.5rem;grid-template-areas:"label value" "bar bar";grid-template-columns:1fr auto}._progressBar_1a2ad_1 ._label_1a2ad_9{grid-area:label;margin:0}._progressBar_1a2ad_1 ._value_1a2ad_14{grid-area:value;margin:0}._progressBar_1a2ad_1 ._bar_1a2ad_19{background:var(--midas-layer-accent-01-base);grid-area:bar;height:.25rem;overflow:hidden}@media(forced-colors:active){._progressBar_1a2ad_1 ._bar_1a2ad_19{border:1px solid}}._progressBar_1a2ad_1 ._bar_1a2ad_19 ._fill_1a2ad_29{background:var(--midas-color-signal-green-100);height:100%}@media(forced-colors:active){._progressBar_1a2ad_1 ._bar_1a2ad_19 ._fill_1a2ad_29{background:highlight}}._progressBar_1a2ad_1:not([aria-valuenow]) ._fill_1a2ad_29{will-change:transform;background:var(--midas-color-signal-green-100);height:100%;animation:2s ease-in-out infinite _indeterminate_1a2ad_1}@media(forced-colors:active){._progressBar_1a2ad_1:not([aria-valuenow]) ._fill_1a2ad_29{background:highlight}}@keyframes _indeterminate_1a2ad_1{0%{transform:translate(-100%)}to{transform:translate(200%)}}@media(prefers-reduced-motion){._progressBar_1a2ad_1:not([aria-valuenow]) ._fill_1a2ad_29{animation-duration:6s}}
|
package/assets/Skeleton.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes _wave_wia11_30{0%{transform:translate(-100%)}to{transform:translate(100%)}}._skeleton_wia11_11{background:var(--midas-skeleton-01);display:inline-block;position:relative;overflow:hidden;min-height:1rem;width:100%;height:100%}@media(forced-colors:active){._skeleton_wia11_11{background-color:graytext}}._skeleton_wia11_11._circle_wia11_25{border-radius:50%;aspect-ratio:1 / 1}._skeleton_wia11_11._wave_wia11_30:after{content:"";position:absolute;top:0;left:0;width:200%;height:100%;opacity:.1;background:linear-gradient(90deg,transparent,var(--midas-background-inverse),transparent);animation
|
|
1
|
+
@keyframes _wave_wia11_30{0%{transform:translate(-100%)}to{transform:translate(100%)}}._skeleton_wia11_11{background:var(--midas-skeleton-01);display:inline-block;position:relative;overflow:hidden;min-height:1rem;width:100%;height:100%}@media(forced-colors:active){._skeleton_wia11_11{background-color:graytext}}._skeleton_wia11_11._circle_wia11_25{border-radius:50%;aspect-ratio:1 / 1}._skeleton_wia11_11._wave_wia11_30:after{content:"";position:absolute;top:0;left:0;width:200%;height:100%;opacity:.1;background:linear-gradient(90deg,transparent,var(--midas-background-inverse),transparent);animation:_wave_wia11_30 2s infinite ease-in-out}@media(prefers-reduced-motion){._skeleton_wia11_11._wave_wia11_30:after{display:none;animation:none}}._onLayer01_wia11_54{background-color:var(--midas-skeleton-02)}._form_wia11_58{display:flex;flex-direction:column;width:100%}._formLabel_wia11_64{height:var(--midas-size-90);width:40%;margin-bottom:var(--midas-spacing-20)}._formDescription_wia11_70{height:1.125rem;width:60%;margin-bottom:var(--midas-spacing-30)}._formInput_wia11_76{height:var(--midas-size-150);width:100%}._form_wia11_58._medium_wia11_81 ._formInput_wia11_76{height:var(--midas-size-130)}
|
package/assets/Spinner.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._container_1qexx_1{display:inline-flex}._spinner_1qexx_5{animation
|
|
1
|
+
._container_1qexx_1{display:inline-flex}._spinner_1qexx_5{animation:_rotating_1qexx_1 1s linear infinite;stroke-linecap:square}@media(prefers-reduced-motion){._spinner_1qexx_5{animation-duration:2s}}@media(forced-colors:active){._spinner_1qexx_5{color:CanvasText}}._large_1qexx_18{color:var(--midas-icon-tertiary)}@keyframes _rotating_1qexx_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
package/assets/Toast.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes
|
|
1
|
+
@keyframes _slideInEnd_16lmz_1{0%{transform:translate(calc(100% + 1rem));opacity:0}to{transform:translate(0);opacity:1}}@keyframes _slideOutEnd_16lmz_1{0%{transform:translate(0);opacity:1}to{transform:translate(calc(100% + 1rem));opacity:0}}@keyframes _slideInTop_16lmz_1{0%{transform:translateY(-100%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes _slideOutTop_16lmz_1{0%{transform:translateY(0);opacity:1}to{transform:translateY(-100%);opacity:0}}._toastRegion_16lmz_49{position:fixed;left:50%;top:calc(92px + 1rem);transform:translate(-50%);display:flex;flex-direction:column;gap:8px;border:none;width:calc(100% - 2rem);z-index:var(--midas-z-index-toast)}._toastRegion_16lmz_49:focus-visible{outline:none}@media(min-width:768px){._toastRegion_16lmz_49{width:unset;left:unset;transform:unset;top:calc(80px + 1rem);right:1rem}}._toast_16lmz_49{font-family:var(--midas-typography-font-family);display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;color:var(--midas-text-primary);padding-left:calc(1rem - 3px);border-left:3px solid transparent;width:calc(100% - 1rem);font-size:.875rem}@media(forced-colors:active){._toast_16lmz_49{border:1px solid;border-left:3px solid}}._toast_16lmz_49[data-focus-visible],._toast_16lmz_49:focus-visible{outline:none;box-shadow:var(--midas-state-focus)}._toast_16lmz_49._success_16lmz_97{--bg: var(--midas-support-background-success);--border: var(--midas-support-border-success);background:var(--bg);border-left-color:var(--border)}._toast_16lmz_49._info_16lmz_105{--bg: var(--midas-support-background-info);--border: var(--midas-support-border-info);background:var(--bg);border-left-color:var(--border)}._toast_16lmz_49._important_16lmz_113{--border: var(--midas-support-border-important);--bg: var(--midas-support-background-important);background:var(--bg);border-left-color:var(--border)}._toast_16lmz_49._warning_16lmz_121{--border: var(--midas-support-border-warning);--bg: var(--midas-support-background-warning);background:var(--bg);border-left-color:var(--border)}._toast_16lmz_49 ._icon_16lmz_129{color:var(--midas-icon-primary);flex:0 0 auto}@media(forced-colors:active){._toast_16lmz_49 ._icon_16lmz_129{stroke:mark}}@media(min-width:768px){._toast_16lmz_49{width:18rem}}._toastContent_16lmz_143{padding:.875rem 0;display:flex;align-items:flex-start;gap:1rem}._toastMessage_16lmz_150{padding:.125rem 0 0;margin:0;line-height:1.2}::view-transition-new(._viewTransition_16lmz_156):only-child{animation-name:_slideInTop_16lmz_1;animation-duration:.5s;animation-timing-function:cubic-bezier(.16,1,.3,1);animation-direction:normal;animation-fill-mode:both}@media(min-width:768px){::view-transition-new(._viewTransition_16lmz_156):only-child{animation-name:_slideInEnd_16lmz_1}}::view-transition-old(._viewTransition_16lmz_156):only-child{animation-name:_slideOutTop_16lmz_1;animation-duration:.5s;animation-timing-function:cubic-bezier(.16,1,.3,1);animation-direction:normal;animation-fill-mode:both}@media(min-width:768px){::view-transition-old(._viewTransition_16lmz_156):only-child{animation-name:_slideOutEnd_16lmz_1}}@media(prefers-reduced-motion){::view-transition-new(._viewTransition_16lmz_156):only-child,::view-transition-old(._viewTransition_16lmz_156):only-child{animation:none}}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { jsx as n, jsxs as c, Fragment as f } from "react/jsx-runtime";
|
|
2
|
+
import { B as p } from "./Button-BGu-SRi7.js";
|
|
3
|
+
import { useToastRegion as g, useToast as v } from "react-aria";
|
|
4
|
+
import { ToastQueue as z, useToastQueue as w, useToastState as h } from "react-stately";
|
|
5
|
+
import m from "react";
|
|
6
|
+
import { createPortal as R, flushSync as y } from "react-dom";
|
|
7
|
+
import { c as l } from "./clsx-AexbMWKp.js";
|
|
8
|
+
import { F as b } from "./FeedbackStatusIcon-YJaUAfjp.js";
|
|
9
|
+
import { X as P } from "./x-BXShoIAM.js";
|
|
10
|
+
import '../assets/Toast.css';const I = "_toastRegion_16lmz_49", N = "_toast_16lmz_49", E = "_success_16lmz_97", O = "_info_16lmz_105", x = "_important_16lmz_113", C = "_warning_16lmz_121", M = "_icon_16lmz_129", S = "_toastContent_16lmz_143", k = "_toastMessage_16lmz_150", B = "_viewTransition_16lmz_156", F = "_slideInTop_16lmz_1", Q = "_slideInEnd_16lmz_1", V = "_slideOutTop_16lmz_1", j = "_slideOutEnd_16lmz_1", e = {
|
|
11
|
+
toastRegion: I,
|
|
12
|
+
toast: N,
|
|
13
|
+
success: E,
|
|
14
|
+
info: O,
|
|
15
|
+
important: x,
|
|
16
|
+
warning: C,
|
|
17
|
+
icon: M,
|
|
18
|
+
toastContent: S,
|
|
19
|
+
toastMessage: k,
|
|
20
|
+
viewTransition: B,
|
|
21
|
+
slideInTop: F,
|
|
22
|
+
slideInEnd: Q,
|
|
23
|
+
slideOutTop: V,
|
|
24
|
+
slideOutEnd: j
|
|
25
|
+
}, _ = {
|
|
26
|
+
wrapUpdate(t) {
|
|
27
|
+
"startViewTransition" in document ? document.startViewTransition(() => {
|
|
28
|
+
y(t);
|
|
29
|
+
}) : t();
|
|
30
|
+
},
|
|
31
|
+
maxVisibleToasts: 5
|
|
32
|
+
}, G = new z(_), Y = (t) => {
|
|
33
|
+
const o = w(G);
|
|
34
|
+
return o.visibleToasts.length > 0 ? R(
|
|
35
|
+
/* @__PURE__ */ n(
|
|
36
|
+
u,
|
|
37
|
+
{
|
|
38
|
+
...t,
|
|
39
|
+
state: o
|
|
40
|
+
}
|
|
41
|
+
),
|
|
42
|
+
document.body
|
|
43
|
+
) : null;
|
|
44
|
+
}, Z = ({ children: t, ...o }) => {
|
|
45
|
+
const s = h(_);
|
|
46
|
+
return /* @__PURE__ */ c(f, { children: [
|
|
47
|
+
typeof t == "function" ? t(s) : t,
|
|
48
|
+
s.visibleToasts.length > 0 && /* @__PURE__ */ n(
|
|
49
|
+
u,
|
|
50
|
+
{
|
|
51
|
+
...o,
|
|
52
|
+
state: s
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] });
|
|
56
|
+
};
|
|
57
|
+
function u({
|
|
58
|
+
state: t,
|
|
59
|
+
className: o,
|
|
60
|
+
...s
|
|
61
|
+
}) {
|
|
62
|
+
const a = m.useRef(null), { regionProps: r } = g(s, t, a);
|
|
63
|
+
return /* @__PURE__ */ n(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
...r,
|
|
67
|
+
ref: a,
|
|
68
|
+
className: l(e.toastRegion, o),
|
|
69
|
+
children: t.visibleToasts.map((i) => /* @__PURE__ */ n(
|
|
70
|
+
U,
|
|
71
|
+
{
|
|
72
|
+
toast: i,
|
|
73
|
+
state: t
|
|
74
|
+
},
|
|
75
|
+
i.key
|
|
76
|
+
))
|
|
77
|
+
}
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
function U({
|
|
81
|
+
state: t,
|
|
82
|
+
className: o,
|
|
83
|
+
...s
|
|
84
|
+
}) {
|
|
85
|
+
const a = m.useRef(null), { toastProps: r, contentProps: i, titleProps: d, closeButtonProps: T } = v(
|
|
86
|
+
s,
|
|
87
|
+
t,
|
|
88
|
+
a
|
|
89
|
+
);
|
|
90
|
+
return /* @__PURE__ */ c(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
...r,
|
|
94
|
+
ref: a,
|
|
95
|
+
className: l(
|
|
96
|
+
e.toast,
|
|
97
|
+
e[s.toast.content.type],
|
|
98
|
+
o
|
|
99
|
+
),
|
|
100
|
+
style: {
|
|
101
|
+
viewTransitionName: s.toast.key,
|
|
102
|
+
viewTransitionClass: e.viewTransition
|
|
103
|
+
},
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ c(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
...i,
|
|
109
|
+
className: l(e.toastContent, i.className),
|
|
110
|
+
children: [
|
|
111
|
+
/* @__PURE__ */ n(
|
|
112
|
+
b,
|
|
113
|
+
{
|
|
114
|
+
"aria-hidden": !0,
|
|
115
|
+
className: e.icon,
|
|
116
|
+
status: s.toast.content.type
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ c("div", { children: [
|
|
120
|
+
/* @__PURE__ */ n(
|
|
121
|
+
"p",
|
|
122
|
+
{
|
|
123
|
+
className: e.toastMessage,
|
|
124
|
+
...d,
|
|
125
|
+
children: s.toast.content.message
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
s.toast.content.children
|
|
129
|
+
] })
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
),
|
|
133
|
+
/* @__PURE__ */ n(
|
|
134
|
+
p,
|
|
135
|
+
{
|
|
136
|
+
variant: "icon",
|
|
137
|
+
...T,
|
|
138
|
+
children: /* @__PURE__ */ n(
|
|
139
|
+
P,
|
|
140
|
+
{
|
|
141
|
+
size: 20,
|
|
142
|
+
"aria-hidden": !0
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
export {
|
|
152
|
+
Y as G,
|
|
153
|
+
Z as T,
|
|
154
|
+
u as a,
|
|
155
|
+
U as b,
|
|
156
|
+
G as t
|
|
157
|
+
};
|
package/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import { a as Oo, c as Uo, b as Vo, T as Wo } from "./chunks/TabList-D2XV5ixe.js
|
|
|
38
38
|
import { T as Yo, a as _o } from "./chunks/Tag-CZrQBEgv.js";
|
|
39
39
|
import { T as oa } from "./chunks/Text-Bxww8mmL.js";
|
|
40
40
|
import { I as ra, b as ea, a as ta, T as sa } from "./chunks/TextArea-Dudj2zg4.js";
|
|
41
|
-
import { G as xa, b as ma, T as ia, a as fa, t as na } from "./chunks/Toast-
|
|
41
|
+
import { G as xa, b as ma, T as ia, a as fa, t as na } from "./chunks/Toast-PDCyyP45.js";
|
|
42
42
|
import { T as Ta, a as la } from "./chunks/ToggleButtonGroup-CXKTrLbb.js";
|
|
43
43
|
import { T as Ca, a as ga } from "./chunks/Tooltip-rDmOkGmX.js";
|
|
44
44
|
import { L as ca } from "./chunks/ListBox-D5BBeZWL.js";
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"description": "Midas Components",
|
|
15
15
|
"homepage": "https://designsystem.migrationsverket.se/",
|
|
16
16
|
"license": "CC0-1.0",
|
|
17
|
-
"version": "16.6.
|
|
17
|
+
"version": "16.6.3",
|
|
18
18
|
"module": "./index.js",
|
|
19
19
|
"type": "module",
|
|
20
20
|
"main": "./index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"./*": "./*/index.js"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@midas-ds/theme": "3.10.
|
|
44
|
+
"@midas-ds/theme": "3.10.2",
|
|
45
45
|
"react-aria-components": "1.14.0"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/toast/index.js
CHANGED
package/chunks/Toast-DGvPi4rb.js
DELETED
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
import { jsx as o, jsxs as c, Fragment as T } from "react/jsx-runtime";
|
|
2
|
-
import { B as h } from "./Button-BGu-SRi7.js";
|
|
3
|
-
import { useToastRegion as f, useToast as p } from "react-aria";
|
|
4
|
-
import { ToastQueue as g, useToastQueue as w, useToastState as R } from "react-stately";
|
|
5
|
-
import _ from "react";
|
|
6
|
-
import { createPortal as y, flushSync as b } from "react-dom";
|
|
7
|
-
import { c as l } from "./clsx-AexbMWKp.js";
|
|
8
|
-
import { F as P } from "./FeedbackStatusIcon-YJaUAfjp.js";
|
|
9
|
-
import { X as I } from "./x-BXShoIAM.js";
|
|
10
|
-
import '../assets/Toast.css';const N = "_toastRegion_1shnv_49", E = "_toast_1shnv_49", O = "_success_1shnv_97", x = "_info_1shnv_105", C = "_important_1shnv_113", M = "_warning_1shnv_121", S = "_icon_1shnv_129", k = "_toastContent_1shnv_143", B = "_toastMessage_1shnv_150", F = "_viewTransition_1shnv_157", Q = "_slideInTop_1shnv_1", V = "_slideInEnd_1shnv_1", j = "_slideOutTop_1shnv_1", G = "_slideOutEnd_1shnv_1", e = {
|
|
11
|
-
toastRegion: N,
|
|
12
|
-
toast: E,
|
|
13
|
-
success: O,
|
|
14
|
-
info: x,
|
|
15
|
-
important: C,
|
|
16
|
-
warning: M,
|
|
17
|
-
icon: S,
|
|
18
|
-
toastContent: k,
|
|
19
|
-
toastMessage: B,
|
|
20
|
-
viewTransition: F,
|
|
21
|
-
slideInTop: Q,
|
|
22
|
-
slideInEnd: V,
|
|
23
|
-
slideOutTop: j,
|
|
24
|
-
slideOutEnd: G
|
|
25
|
-
}, u = {
|
|
26
|
-
wrapUpdate(t) {
|
|
27
|
-
"startViewTransition" in document ? document.startViewTransition(() => {
|
|
28
|
-
b(t);
|
|
29
|
-
}) : t();
|
|
30
|
-
},
|
|
31
|
-
maxVisibleToasts: 5
|
|
32
|
-
}, z = new g(u), Y = (t) => {
|
|
33
|
-
const n = w(z);
|
|
34
|
-
return n.visibleToasts.length > 0 ? y(
|
|
35
|
-
/* @__PURE__ */ o(
|
|
36
|
-
d,
|
|
37
|
-
{
|
|
38
|
-
...t,
|
|
39
|
-
state: n
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
document.body
|
|
43
|
-
) : null;
|
|
44
|
-
}, Z = ({ children: t, ...n }) => {
|
|
45
|
-
const s = R(u);
|
|
46
|
-
return /* @__PURE__ */ c(T, { children: [
|
|
47
|
-
typeof t == "function" ? t(s) : t,
|
|
48
|
-
s.visibleToasts.length > 0 && /* @__PURE__ */ o(
|
|
49
|
-
d,
|
|
50
|
-
{
|
|
51
|
-
...n,
|
|
52
|
-
state: s
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
] });
|
|
56
|
-
};
|
|
57
|
-
function d({
|
|
58
|
-
state: t,
|
|
59
|
-
className: n,
|
|
60
|
-
...s
|
|
61
|
-
}) {
|
|
62
|
-
const a = _.useRef(null), { regionProps: r } = f(s, t, a);
|
|
63
|
-
return /* @__PURE__ */ o(
|
|
64
|
-
"div",
|
|
65
|
-
{
|
|
66
|
-
...r,
|
|
67
|
-
ref: a,
|
|
68
|
-
className: l(e.toastRegion, n),
|
|
69
|
-
children: t.visibleToasts.map((i) => /* @__PURE__ */ o(
|
|
70
|
-
U,
|
|
71
|
-
{
|
|
72
|
-
toast: i,
|
|
73
|
-
state: t
|
|
74
|
-
},
|
|
75
|
-
i.key
|
|
76
|
-
))
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
}
|
|
80
|
-
function U({
|
|
81
|
-
state: t,
|
|
82
|
-
className: n,
|
|
83
|
-
...s
|
|
84
|
-
}) {
|
|
85
|
-
const a = _.useRef(null), { toastProps: r, contentProps: i, titleProps: m, closeButtonProps: v } = p(
|
|
86
|
-
s,
|
|
87
|
-
t,
|
|
88
|
-
a
|
|
89
|
-
);
|
|
90
|
-
return /* @__PURE__ */ c(
|
|
91
|
-
"div",
|
|
92
|
-
{
|
|
93
|
-
...r,
|
|
94
|
-
ref: a,
|
|
95
|
-
className: l(
|
|
96
|
-
e.toast,
|
|
97
|
-
e[s.toast.content.type],
|
|
98
|
-
n
|
|
99
|
-
),
|
|
100
|
-
style: {
|
|
101
|
-
viewTransitionName: s.toast.key,
|
|
102
|
-
viewTransitionClass: e.viewTransition
|
|
103
|
-
},
|
|
104
|
-
children: [
|
|
105
|
-
/* @__PURE__ */ c(
|
|
106
|
-
"div",
|
|
107
|
-
{
|
|
108
|
-
...i,
|
|
109
|
-
className: l(e.toastContent, i.className),
|
|
110
|
-
children: [
|
|
111
|
-
/* @__PURE__ */ o(
|
|
112
|
-
P,
|
|
113
|
-
{
|
|
114
|
-
"aria-hidden": !0,
|
|
115
|
-
className: e.icon,
|
|
116
|
-
status: s.toast.content.type
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
/* @__PURE__ */ c("div", { children: [
|
|
120
|
-
/* @__PURE__ */ o(
|
|
121
|
-
"p",
|
|
122
|
-
{
|
|
123
|
-
className: e.toastMessage,
|
|
124
|
-
...m,
|
|
125
|
-
children: s.toast.content.message
|
|
126
|
-
}
|
|
127
|
-
),
|
|
128
|
-
s.toast.content.children
|
|
129
|
-
] })
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
),
|
|
133
|
-
/* @__PURE__ */ o(
|
|
134
|
-
h,
|
|
135
|
-
{
|
|
136
|
-
variant: "icon",
|
|
137
|
-
...v,
|
|
138
|
-
children: /* @__PURE__ */ o(
|
|
139
|
-
I,
|
|
140
|
-
{
|
|
141
|
-
size: 20,
|
|
142
|
-
"aria-hidden": !0
|
|
143
|
-
}
|
|
144
|
-
)
|
|
145
|
-
}
|
|
146
|
-
)
|
|
147
|
-
]
|
|
148
|
-
}
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
export {
|
|
152
|
-
Y as G,
|
|
153
|
-
Z as T,
|
|
154
|
-
d as a,
|
|
155
|
-
U as b,
|
|
156
|
-
z as t
|
|
157
|
-
};
|