@stihl-design-system/components 1.0.0-RC.5 → 1.0.0-RC.7
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/{arialiveregions.BvZhV6hb.js → arialiveregions.BK4T7Vhk.js} +1 -1
- package/assets/skiptocontent.DGVJ77cj.css +1 -0
- package/assets/spinner.D_Nnf1ZG.css +1 -0
- package/{button.DlFWwHuA.js → button.L1lgCuM9.js} +1 -1
- package/{buttonround.eYOQM994.js → buttonround.ddSqXjYf.js} +1 -1
- package/chunks/AriaLiveRegions.utils.D2ni4Yrf.js +34 -0
- package/chunks/{Input.utils.AKWCNkpA.js → Input.utils.BGUhXCNP.js} +14 -13
- package/chunks/{InputPassword.DTqI58Z4.js → InputPassword.a7zHKrmM.js} +1 -1
- package/chunks/{InputSearch.IwQATLKh.js → InputSearch.DITRiB92.js} +1 -1
- package/chunks/{InputStepper.Jew1ETB6.js → InputStepper.Bf8NZ9pb.js} +2 -2
- package/chunks/{Notification.DbflCBIL.js → Notification.DVVuSOqG.js} +1 -1
- package/chunks/{Toast.BLGKvAvZ.js → Toast.RON4bFPY.js} +1 -1
- package/chunks/has-document.r9i9TxKV.js +5 -0
- package/components/SkipToContent/SkipToContent.d.ts +12 -0
- package/components/SkipToContent/SkipToContent.test.d.ts +1 -0
- package/components/Toast/ToastManager.d.ts +7 -3
- package/{dialog.qd2pOyVc.js → dialog.0qPUVJha.js} +1 -1
- package/{floatingactionbutton.CGV3YFQq.js → floatingactionbutton.D_e4vz2G.js} +1 -1
- package/index.d.ts +2 -0
- package/index.es.js +43 -38
- package/{input.BAxvG272.js → input.DqSOhSMX.js} +2 -2
- package/{inputpassword.mn9qFlfs.js → inputpassword.Ba9SUUIK.js} +2 -2
- package/{inputsearch.qQJj9yFd.js → inputsearch.BK-0OTwA.js} +2 -2
- package/{inputstepper.DhbHujiM.js → inputstepper.DFQ4zC15.js} +3 -3
- package/{notification.CnJOdQza.js → notification.Csn5QCR2.js} +2 -2
- package/package.json +1 -1
- package/skiptocontent._YZRKxnc.js +44 -0
- package/skiptocontent.d.ts +1 -0
- package/spinner.DVa112nj.js +58 -0
- package/{switch.BezS5z0Y.js → switch.rd7PdLc9.js} +1 -1
- package/{toast.BR7QuHOG.js → toast.r_yhGYEe.js} +2 -2
- package/toastmanager.BncH_rUP.js +117 -0
- package/assets/spinner.LuV09jaU.css +0 -1
- package/chunks/AriaLiveRegions.utils.DzWI5KCU.js +0 -31
- package/spinner.DEtbkdfi.js +0 -58
- package/toastmanager.DBp8B1e3.js +0 -96
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { j as s } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { v as r, A as n, a } from "./chunks/AriaLiveRegions.utils.
|
|
3
|
+
import { v as r, A as n, a } from "./chunks/AriaLiveRegions.utils.D2ni4Yrf.js";
|
|
4
4
|
import './assets/arialiveregions.GsGx2USO.css';const l = "_sr-only_echuy_76", e = {
|
|
5
5
|
"sr-only": "_sr-only_echuy_76",
|
|
6
6
|
srOnly: l
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._skip-to-content_4ockd_76{position:absolute;left:-9999px;z-index:999;opacity:0;box-shadow:0 0 0 2px #fff}._skip-to-content--dark_4ockd_83{box-shadow:0 0 0 2px #252525}._skip-to-content_4ockd_76._skip-to-content_4ockd_76{text-decoration-line:underline;text-underline-offset:2px;text-decoration-thickness:1px;text-decoration-color:currentColor}._skip-to-content_4ockd_76:focus{left:8px;top:8px;opacity:1}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._root_11iwi_76{display:inline-flex;vertical-align:top;margin:0;padding:0}._root-size-small_11iwi_82{height:1rem;width:1rem}._root-size-medium_11iwi_86{height:2rem;width:2rem}._root-size-large_11iwi_90{height:2.5rem;width:2.5rem}._root-size-x-large_11iwi_94{height:4rem;width:4rem}._root-size-inherit_11iwi_98{height:inherit;width:inherit}._root_11iwi_76>svg{position:relative;transform:translateZ(0);animation:_rotate_11iwi_1 var(--ds-animation-duration, 1.1s) linear infinite;width:inherit;height:inherit}@media (prefers-reduced-motion: reduce){._root_11iwi_76>svg{animation-duration:0s}}@keyframes _rotate_11iwi_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._screenReaderOnly_11iwi_123{border:0;clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;text-indent:-999999px;white-space:nowrap}
|
|
@@ -3,7 +3,7 @@ import { j as _ } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
|
3
3
|
import { c as a } from "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import { u as e } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
5
5
|
import { D as I } from "./chunks/Icon.n4XZrQ4N.js";
|
|
6
|
-
import { DSSpinner as F } from "./spinner.
|
|
6
|
+
import { DSSpinner as F } from "./spinner.DVa112nj.js";
|
|
7
7
|
import './assets/button.BdxtFZKx.css';const S = "_root_1jptm_151", x = "_root--highlight_1jptm_219", L = "_root--dark-highlight_1jptm_219", C = "_root--filled_1jptm_297", N = "_root--outline_1jptm_325", B = "_root--ghost_1jptm_352", E = "_root--ghost-flush_1jptm_377", R = "_root--small_1jptm_383", T = "_root--dark-filled_1jptm_460", V = "_root--dark-outline_1jptm_519", q = "_root--dark-ghost_1jptm_577", w = "_root--dark-ghost-flush_1jptm_633", A = "_root--icon-left_1jptm_692", J = "_root--icon-only_1jptm_708", K = "_root--icon-only-small_1jptm_717", M = "_loader_1jptm_732", P = "_icon--hidden_1jptm_744", Q = "_label--hidden_1jptm_748", U = "_label--loading_1jptm_760", o = {
|
|
8
8
|
root: S,
|
|
9
9
|
"root--highlight": "_root--highlight_1jptm_219",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as r } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as h } from "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import { D as H } from "./chunks/Icon.n4XZrQ4N.js";
|
|
5
|
-
import { DSSpinner as p } from "./spinner.
|
|
5
|
+
import { DSSpinner as p } from "./spinner.DVa112nj.js";
|
|
6
6
|
import './assets/buttonround.pR4StXA7.css';const F = "_root_lfeh_151", O = "_root--highlight_lfeh_219", G = "_root--dark-highlight_lfeh_219", I = "_root--filled_lfeh_297", S = "_root--outline_lfeh_325", x = "_root--ghost_lfeh_352", j = "_root--ghost-flush_lfeh_377", L = "_root--small_lfeh_383", C = "_root--dark-filled_lfeh_460", N = "_root--dark-outline_lfeh_519", R = "_root--dark-ghost_lfeh_577", B = "_root--dark-ghost-flush_lfeh_633", E = "_root--icon-left_lfeh_692", T = "_root--icon-only_lfeh_708", q = "_root--icon-only-small_lfeh_717", w = "_loader_lfeh_734", z = "_icon--hidden_lfeh_746", A = "_label--hidden_lfeh_750", J = "_label--loading_lfeh_762", o = {
|
|
7
7
|
root: F,
|
|
8
8
|
"root--highlight": "_root--highlight_lfeh_219",
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { g as i } from "./helpers.B1JT5ShS.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { h as s } from "./has-document.r9i9TxKV.js";
|
|
5
|
+
const e = "ds-alert-live-region", t = "ds-status-live-region", g = () => document.getElementById(e), c = () => document.getElementById(t), m = () => {
|
|
6
|
+
if (!s)
|
|
7
|
+
return;
|
|
8
|
+
const n = document.querySelectorAll(
|
|
9
|
+
`#${e}`
|
|
10
|
+
), o = document.querySelectorAll(
|
|
11
|
+
`#${t}`
|
|
12
|
+
);
|
|
13
|
+
if (n.length > 1)
|
|
14
|
+
throw new Error(
|
|
15
|
+
i(
|
|
16
|
+
"DSAriaLiveRegions",
|
|
17
|
+
`The DSAriaLiveRegions component with id="${e}" should only be present once on the page. Found ${n.length} instances.`
|
|
18
|
+
)
|
|
19
|
+
);
|
|
20
|
+
if (o.length > 1)
|
|
21
|
+
throw new Error(
|
|
22
|
+
i(
|
|
23
|
+
"DSAriaLiveRegions",
|
|
24
|
+
`The DSAriaLiveRegions component with id="${t}" should only be present once on the page. Found ${o.length} instances.`
|
|
25
|
+
)
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
export {
|
|
29
|
+
e as A,
|
|
30
|
+
t as a,
|
|
31
|
+
c as b,
|
|
32
|
+
g,
|
|
33
|
+
m as v
|
|
34
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { g as t } from "./helpers.B1JT5ShS.js";
|
|
3
3
|
import "react";
|
|
4
|
-
|
|
4
|
+
import { h as p } from "./has-document.r9i9TxKV.js";
|
|
5
|
+
const a = 8, i = 5, T = ["medium", "small"], u = [
|
|
5
6
|
"color",
|
|
6
7
|
"date",
|
|
7
8
|
"datetime-local",
|
|
@@ -26,15 +27,15 @@ const p = typeof document < "u", a = 8, i = 5, I = ["medium", "small"], u = [
|
|
|
26
27
|
"submit",
|
|
27
28
|
"image",
|
|
28
29
|
"datetime"
|
|
29
|
-
],
|
|
30
|
+
], b = ({
|
|
30
31
|
id: e,
|
|
31
32
|
label: n,
|
|
32
33
|
prefix: o,
|
|
33
34
|
suffix: s,
|
|
34
35
|
leadingIconName: r,
|
|
35
36
|
leadingIconSource: d,
|
|
36
|
-
actionButtonIconName:
|
|
37
|
-
actionButtonIconSource:
|
|
37
|
+
actionButtonIconName: m,
|
|
38
|
+
actionButtonIconSource: c
|
|
38
39
|
}) => {
|
|
39
40
|
if (!e)
|
|
40
41
|
throw new Error(
|
|
@@ -65,13 +66,13 @@ const p = typeof document < "u", a = 8, i = 5, I = ["medium", "small"], u = [
|
|
|
65
66
|
"DSInput",
|
|
66
67
|
"Prefix and a leading Icon cannot be used at the same time."
|
|
67
68
|
)
|
|
68
|
-
), s && (
|
|
69
|
+
), s && (m || c) && console.warn(
|
|
69
70
|
t(
|
|
70
71
|
"DSInput",
|
|
71
72
|
"Suffix and an action button cannot be used at the same time."
|
|
72
73
|
)
|
|
73
74
|
);
|
|
74
|
-
},
|
|
75
|
+
}, D = (e) => {
|
|
75
76
|
if (!u.includes(e) && !l.includes(e))
|
|
76
77
|
throw new Error(
|
|
77
78
|
t(
|
|
@@ -94,17 +95,17 @@ const p = typeof document < "u", a = 8, i = 5, I = ["medium", "small"], u = [
|
|
|
94
95
|
hidden: 'Type hidden is not supported by DSInput component. Use a default <input type="hidden" /> element instead.'
|
|
95
96
|
};
|
|
96
97
|
n[e] && console.warn(t("DSInput", n[e]));
|
|
97
|
-
}, h = () => p && "showPicker" in HTMLInputElement.prototype && !!window.navigator.userAgent.match(/chrome|chromium|crios|edg/i),
|
|
98
|
+
}, h = () => p && "showPicker" in HTMLInputElement.prototype && !!window.navigator.userAgent.match(/chrome|chromium|crios|edg/i), y = (e, n) => h() && (e || n), U = (e) => e === "date" || e === "datetime-local" || e === "month", P = (e) => e === "time";
|
|
98
99
|
export {
|
|
99
|
-
I,
|
|
100
|
+
T as I,
|
|
100
101
|
a as M,
|
|
101
102
|
u as S,
|
|
102
103
|
l as U,
|
|
103
104
|
i as a,
|
|
104
|
-
b,
|
|
105
|
-
|
|
105
|
+
D as b,
|
|
106
|
+
P as c,
|
|
106
107
|
h,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
U as i,
|
|
109
|
+
y as s,
|
|
110
|
+
b as v
|
|
110
111
|
};
|
|
@@ -4,7 +4,7 @@ import { c as i } from "./index.CvOaL64Y.js";
|
|
|
4
4
|
import { useState as D } from "react";
|
|
5
5
|
import { u as C } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
6
|
import { Asterisk as L } from "../asterisk.Cjbk-xZi.js";
|
|
7
|
-
import { DSButton as $ } from "../button.
|
|
7
|
+
import { DSButton as $ } from "../button.L1lgCuM9.js";
|
|
8
8
|
import { DSSystemFeedback as E } from "../systemfeedback.CUWch42u.js";
|
|
9
9
|
import { g as b } from "./helpers.B1JT5ShS.js";
|
|
10
10
|
import '../assets/InputPassword.VCNO8ANM.css';const q = "_input_1s7sy_226", R = "_input--invalid_1s7sy_336", V = "_input--small_1s7sy_343", O = "_input--has-leading-icon_1s7sy_395", F = "_input--has-action-button_1s7sy_398", M = "_input--has-second-action-button_1s7sy_401", T = "_input--has-affix_1s7sy_413", G = "_input--is-ready_1s7sy_427", J = "_root_1s7sy_434", K = "_hint_1s7sy_442", Q = "_label_1s7sy_442", U = "_wrapper_1s7sy_446", W = "_action-button_1s7sy_452", X = "_label--hidden_1s7sy_469", Y = "_feedback_1s7sy_496", s = {
|
|
@@ -5,7 +5,7 @@ import { useState as G, useRef as N, useEffect as w } from "react";
|
|
|
5
5
|
import { g as S, a as J } from "./helpers.B1JT5ShS.js";
|
|
6
6
|
import { u as K } from "./useBreakpoint.5xBNDiCf.js";
|
|
7
7
|
import { Asterisk as Q } from "../asterisk.Cjbk-xZi.js";
|
|
8
|
-
import { DSButton as D } from "../button.
|
|
8
|
+
import { DSButton as D } from "../button.L1lgCuM9.js";
|
|
9
9
|
import { DSSystemFeedback as U } from "../systemfeedback.CUWch42u.js";
|
|
10
10
|
import '../assets/InputSearch.BMRAb95l.css';const X = "_input_12zpu_226", Y = "_input--invalid_12zpu_336", Z = "_input--small_12zpu_343", tt = "_input--has-leading-icon_12zpu_395", nt = "_input--has-action-button_12zpu_398", et = "_input--has-second-action-button_12zpu_401", at = "_input--has-affix_12zpu_413", st = "_input--is-ready_12zpu_427", ot = "_root_12zpu_434", it = "_hint_12zpu_442", ut = "_label_12zpu_442", ct = "_wrapper_12zpu_446", lt = "_action-button_12zpu_452", pt = "_second-action-button_12zpu_456", rt = "_label--hidden_12zpu_473", _t = "_feedback_12zpu_500", t = {
|
|
11
11
|
input: X,
|
|
@@ -4,8 +4,8 @@ import { c } from "./index.CvOaL64Y.js";
|
|
|
4
4
|
import { useState as _, useRef as N, useEffect as w, useLayoutEffect as M } from "react";
|
|
5
5
|
import { u as _t } from "./useBreakpoint.5xBNDiCf.js";
|
|
6
6
|
import { Asterisk as ft } from "../asterisk.Cjbk-xZi.js";
|
|
7
|
-
import { DSButton as X } from "../button.
|
|
8
|
-
import { M as E, a as H } from "./Input.utils.
|
|
7
|
+
import { DSButton as X } from "../button.L1lgCuM9.js";
|
|
8
|
+
import { M as E, a as H } from "./Input.utils.BGUhXCNP.js";
|
|
9
9
|
import { DSSystemFeedback as ht } from "../systemfeedback.CUWch42u.js";
|
|
10
10
|
import { g as y } from "./helpers.B1JT5ShS.js";
|
|
11
11
|
import '../assets/InputStepper.BKjqNi-i.css';const mt = "_input_xdphx_226", bt = "_input--invalid_xdphx_336", St = "_input--small_xdphx_343", yt = "_input--has-leading-icon_xdphx_395", vt = "_input--has-action-button_xdphx_398", It = "_input--has-second-action-button_xdphx_401", gt = "_input--has-affix_xdphx_413", At = "_input--is-ready_xdphx_427", Bt = "_root_xdphx_437", Dt = "_hint_xdphx_445", Nt = "_label_xdphx_445", wt = "_wrapper_xdphx_449", Et = "_affix_xdphx_455", Ht = "_affix--small_xdphx_475", Lt = "_affix--disabled_xdphx_487", jt = "_prefix_xdphx_490", Rt = "_affix--readonly_xdphx_493", kt = "_suffix_xdphx_503", Ct = "_action-button_xdphx_510", $t = "_label--hidden_xdphx_527", Ft = "_feedback_xdphx_554", Vt = "_second-action-button_xdphx_568", Pt = "_value-announcer_xdphx_572", n = {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as e } from "./jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as s } from "./index.CvOaL64Y.js";
|
|
4
4
|
import { D as p } from "./Icon.n4XZrQ4N.js";
|
|
5
|
-
import { DSButton as g } from "../button.
|
|
5
|
+
import { DSButton as g } from "../button.L1lgCuM9.js";
|
|
6
6
|
import '../assets/Notification.Bg63cvs4.css';const N = "_root_l12pe_76", f = "_root--success_l12pe_100", h = "_root--error_l12pe_104", I = "_root--warning_l12pe_108", x = "_root--hide-icon_l12pe_112", A = "_content_l12pe_126", C = "_content--hide-close-button_l12pe_133", H = "_content--hide-icon_l12pe_136", j = "_icon_l12pe_140", S = "_message_l12pe_144", w = "_custom-action-area_l12pe_157", o = {
|
|
7
7
|
root: N,
|
|
8
8
|
"root--success": "_root--success_l12pe_100",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as n } from "./jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c } from "./index.CvOaL64Y.js";
|
|
4
4
|
import { forwardRef as u } from "react";
|
|
5
|
-
import { DSButton as g } from "../button.
|
|
5
|
+
import { DSButton as g } from "../button.L1lgCuM9.js";
|
|
6
6
|
import { D as h } from "./Icon.n4XZrQ4N.js";
|
|
7
7
|
import '../assets/Toast.BzVaebc0.css';const p = "_root_127fr_80", x = "_root--closing_127fr_89", I = "_fade-out_127fr_1", S = "_move-in_127fr_1", N = "_root--success_127fr_124", j = "_root--info_127fr_128", v = "_root--warning_127fr_132", w = "_content_127fr_137", C = "_content--hide-icon_127fr_144", D = "_icon_127fr_148", O = "_message_127fr_152", o = {
|
|
8
8
|
root: p,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { LinkProps } from '../Link/Link';
|
|
2
|
+
|
|
3
|
+
export type SkipToContentProps = {
|
|
4
|
+
children?: string;
|
|
5
|
+
targetElementId?: string;
|
|
6
|
+
} & Pick<LinkProps, 'className' | 'theme'>;
|
|
7
|
+
/**
|
|
8
|
+
* The `<DSSkipToContent />` component is an accessibility feature that allows users, especially those using screen readers or keyboard navigation, to quickly jump to the targeted content of a webpage without having to focus all the navigation items first. This improves the user experience by making it easier and faster to access important information.
|
|
9
|
+
*
|
|
10
|
+
* Focus the section below by using the tab key to see the "Skip To Content" component in action.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DSSkipToContent: ({ children, className, targetElementId, theme, }: SkipToContentProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { ToastOptions } from './Toast.utils';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
queueToastMessage: (message: string, options?: ToastOptions) => void;
|
|
3
|
+
type ToastContextType = {
|
|
4
|
+
queueDSToastMessage: (message: string, options?: ToastOptions) => void;
|
|
6
5
|
};
|
|
6
|
+
export declare const useDSToast: () => ToastContextType;
|
|
7
|
+
export declare const DSToastProvider: ({ children, }: {
|
|
8
|
+
children: React.ReactNode;
|
|
9
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as e } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as u } from "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import { useRef as f, useEffect as l } from "react";
|
|
5
|
-
import { DSButton as m } from "./button.
|
|
5
|
+
import { DSButton as m } from "./button.L1lgCuM9.js";
|
|
6
6
|
import './assets/dialog.CKwM2EBH.css';const _ = "_root_4piiz_76", p = "_success_4piiz_80", d = "_info_4piiz_84", g = "_warning_4piiz_88", h = {
|
|
7
7
|
root: _,
|
|
8
8
|
success: p,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { j as a } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import { c as t } from "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import { D as k } from "./chunks/Icon.n4XZrQ4N.js";
|
|
5
|
-
import { DSSpinner as D } from "./spinner.
|
|
5
|
+
import { DSSpinner as D } from "./spinner.DVa112nj.js";
|
|
6
6
|
import './assets/floatingactionbutton.CUvMbEMf.css';const x = "_root_qplp0_76", S = "_root--dark_qplp0_135", j = "_root--small_qplp0_175", H = "_loader_qplp0_194", y = "_icon--hidden_qplp0_206", N = "_label--hidden_qplp0_210", o = {
|
|
7
7
|
root: x,
|
|
8
8
|
"root--dark": "_root--dark_qplp0_135",
|
package/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export * from './components/RadioGroup/RadioGroup';
|
|
|
35
35
|
export * from './components/RadioGroup/RadioGroup.utils';
|
|
36
36
|
export * from './components/Select/Select';
|
|
37
37
|
export * from './components/Select/Select.utils';
|
|
38
|
+
export * from './components/SkipToContent/SkipToContent';
|
|
38
39
|
export * from './components/Spinner/Spinner';
|
|
39
40
|
export * from './components/Spinner/Spinner.utils';
|
|
40
41
|
export * from './components/Switch/Switch';
|
|
@@ -45,3 +46,4 @@ export * from './components/Textarea/Textarea';
|
|
|
45
46
|
export * from './components/Textarea/Textarea.utils';
|
|
46
47
|
export * from './components/Title/Title';
|
|
47
48
|
export * from './components/Title/Title.utils';
|
|
49
|
+
export * from './components/Toast/ToastManager';
|
package/index.es.js
CHANGED
|
@@ -1,37 +1,39 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { DSAriaLiveRegions as x } from "./arialiveregions.
|
|
3
|
-
import { DSButton as
|
|
4
|
-
import { DSButtonRound as
|
|
5
|
-
import { DSCheckbox as
|
|
6
|
-
import { D as
|
|
2
|
+
import { DSAriaLiveRegions as x } from "./arialiveregions.BK4T7Vhk.js";
|
|
3
|
+
import { DSButton as u } from "./button.L1lgCuM9.js";
|
|
4
|
+
import { DSButtonRound as c } from "./buttonround.ddSqXjYf.js";
|
|
5
|
+
import { DSCheckbox as f } from "./checkbox.DNHdo6_n.js";
|
|
6
|
+
import { D as E, v as A } from "./chunks/CheckboxGroup.DsQ6lI5a.js";
|
|
7
7
|
import { DSCombobox as g } from "./combobox.CRlhqmuO.js";
|
|
8
8
|
import { C as P, b as C, a as R, D as L, v as B } from "./chunks/CustomReactSelect.5dHi6PEO.js";
|
|
9
9
|
import { D as X, v as b } from "./chunks/Fieldset.B1vsrHNv.js";
|
|
10
|
-
import { DSFloatingActionButton as Z } from "./floatingactionbutton.
|
|
10
|
+
import { DSFloatingActionButton as Z } from "./floatingactionbutton.D_e4vz2G.js";
|
|
11
11
|
import { DSHeading as H } from "./heading.BTNroD1E.js";
|
|
12
12
|
import { D as M, I as w, u as V } from "./chunks/Icon.n4XZrQ4N.js";
|
|
13
|
-
import { DSInput as y } from "./input.
|
|
14
|
-
import { I as Y, M as q, a as j, S as z, U as J, h as Q, i as $, c as oo, s as
|
|
15
|
-
import { D as so, v as po } from "./chunks/InputPassword.
|
|
16
|
-
import { D as So, i as lo, v as mo } from "./chunks/InputSearch.
|
|
17
|
-
import { D as Io, v as To } from "./chunks/InputStepper.
|
|
13
|
+
import { DSInput as y } from "./input.DqSOhSMX.js";
|
|
14
|
+
import { I as Y, M as q, a as j, S as z, U as J, h as Q, i as $, c as oo, s as eo, v as ao, b as to } from "./chunks/Input.utils.BGUhXCNP.js";
|
|
15
|
+
import { D as so, v as po } from "./chunks/InputPassword.a7zHKrmM.js";
|
|
16
|
+
import { D as So, i as lo, v as mo } from "./chunks/InputSearch.DITRiB92.js";
|
|
17
|
+
import { D as Io, v as To } from "./chunks/InputStepper.Bf8NZ9pb.js";
|
|
18
18
|
import { DSLink as xo } from "./link.SAcKvzJ3.js";
|
|
19
|
-
import { DSLinkStandalone as
|
|
19
|
+
import { DSLinkStandalone as No } from "./linkstandalone.DNe0Nydm.js";
|
|
20
20
|
import { DSLogo as _o } from "./logo.BR_CUXFl.js";
|
|
21
|
-
import { D as
|
|
21
|
+
import { D as ho, a as Eo, N as Ao } from "./chunks/Notification.DVVuSOqG.js";
|
|
22
22
|
import { D as go, a as vo, o as Po, v as Co } from "./chunks/RadioGroup.BO4pbAJw.js";
|
|
23
23
|
import { D as Lo, S as Bo, g as Uo, v as Xo } from "./chunks/Select.COdS787F.js";
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
|
|
24
|
+
import { DSSkipToContent as Go } from "./skiptocontent._YZRKxnc.js";
|
|
25
|
+
import { DSSpinner as Fo } from "./spinner.DVa112nj.js";
|
|
26
|
+
import { DSSwitch as ko } from "./switch.rd7PdLc9.js";
|
|
27
|
+
import { DSText as wo } from "./text.CrYUewrP.js";
|
|
28
|
+
import { D as Ko, T as yo, v as Wo } from "./chunks/Textarea.oqCrSopu.js";
|
|
29
|
+
import { DSTitle as qo } from "./title.Dvp8LKJt.js";
|
|
30
|
+
import { DSToastProvider as zo, useDSToast as Jo } from "./toastmanager.BncH_rUP.js";
|
|
31
|
+
const o = ["medium", "small"], e = [
|
|
30
32
|
"filled",
|
|
31
33
|
"highlight",
|
|
32
34
|
"outline",
|
|
33
35
|
"ghost"
|
|
34
|
-
],
|
|
36
|
+
], a = ["filled", "highlight"], t = [
|
|
35
37
|
"x-large",
|
|
36
38
|
"x-large-uppercase",
|
|
37
39
|
"large",
|
|
@@ -69,15 +71,15 @@ const o = ["medium", "small"], a = [
|
|
|
69
71
|
"xx-small"
|
|
70
72
|
], n = ["bold", "normal"], I = ["x-large", "large"];
|
|
71
73
|
export {
|
|
72
|
-
|
|
74
|
+
a as BUTTON_ROUND_VARIANT,
|
|
73
75
|
o as BUTTON_SIZE,
|
|
74
|
-
|
|
76
|
+
e as BUTTON_VARIANT,
|
|
75
77
|
P as COMBOBOX_SIZE,
|
|
76
78
|
x as DSAriaLiveRegions,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
u as DSButton,
|
|
80
|
+
c as DSButtonRound,
|
|
81
|
+
f as DSCheckbox,
|
|
82
|
+
E as DSCheckboxGroup,
|
|
81
83
|
g as DSCombobox,
|
|
82
84
|
X as DSFieldset,
|
|
83
85
|
Z as DSFloatingActionButton,
|
|
@@ -88,16 +90,18 @@ export {
|
|
|
88
90
|
So as DSInputSearch,
|
|
89
91
|
Io as DSInputStepper,
|
|
90
92
|
xo as DSLink,
|
|
91
|
-
|
|
93
|
+
No as DSLinkStandalone,
|
|
92
94
|
_o as DSLogo,
|
|
93
|
-
|
|
95
|
+
ho as DSNotification,
|
|
94
96
|
go as DSRadioGroup,
|
|
95
97
|
Lo as DSSelect,
|
|
96
|
-
Go as
|
|
97
|
-
Fo as
|
|
98
|
-
ko as
|
|
99
|
-
wo as
|
|
100
|
-
|
|
98
|
+
Go as DSSkipToContent,
|
|
99
|
+
Fo as DSSpinner,
|
|
100
|
+
ko as DSSwitch,
|
|
101
|
+
wo as DSText,
|
|
102
|
+
Ko as DSTextarea,
|
|
103
|
+
qo as DSTitle,
|
|
104
|
+
zo as DSToastProvider,
|
|
101
105
|
C as DS_COMBOBOX_TRANSLATIONS,
|
|
102
106
|
R as DS_COMBOBOX_TRANSLATIONS_DE,
|
|
103
107
|
L as DS_COMBOBOX_TRANSLATIONS_EN,
|
|
@@ -110,12 +114,12 @@ export {
|
|
|
110
114
|
p as LINK_VARIANT,
|
|
111
115
|
q as MAX_PREFIX_LENGTH,
|
|
112
116
|
j as MAX_SUFFIX_LENGTH,
|
|
113
|
-
|
|
117
|
+
Eo as NOTIFICATION_ICONS,
|
|
114
118
|
Ao as NOTIFICATION_VARIANT,
|
|
115
119
|
Bo as SELECT_SIZE,
|
|
116
120
|
S as SPINNER_SIZE,
|
|
117
121
|
z as SUPPORTED_INPUT_TYPES,
|
|
118
|
-
|
|
122
|
+
yo as TEXTAREA_SIZE,
|
|
119
123
|
m as TEXT_SIZE,
|
|
120
124
|
l as TEXT_TAG,
|
|
121
125
|
n as TEXT_WEIGHT,
|
|
@@ -128,17 +132,18 @@ export {
|
|
|
128
132
|
lo as isWithinForm,
|
|
129
133
|
vo as optionsHaveCustomArea,
|
|
130
134
|
Po as optionsHaveHint,
|
|
131
|
-
|
|
135
|
+
eo as showCustomCalendarOrTimeIndicator,
|
|
136
|
+
Jo as useDSToast,
|
|
132
137
|
V as useDynamicSvgImport,
|
|
133
138
|
A as validateCheckboxGroupProps,
|
|
134
139
|
B as validateComboboxProps,
|
|
135
140
|
b as validateFieldsetProps,
|
|
136
141
|
po as validateInputPasswordProps,
|
|
137
|
-
|
|
142
|
+
ao as validateInputProps,
|
|
138
143
|
mo as validateInputSearchProps,
|
|
139
144
|
To as validateInputStepperProps,
|
|
140
145
|
Co as validateRadioGroupProps,
|
|
141
146
|
Xo as validateSelectProps,
|
|
142
|
-
|
|
147
|
+
Wo as validateTextareaProps,
|
|
143
148
|
to as validateType
|
|
144
149
|
};
|
|
@@ -4,10 +4,10 @@ import { c as l } from "./chunks/index.CvOaL64Y.js";
|
|
|
4
4
|
import { useState as x, useRef as k, useLayoutEffect as w, useEffect as ia } from "react";
|
|
5
5
|
import { u as sa } from "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
6
|
import { Asterisk as ea } from "./asterisk.Cjbk-xZi.js";
|
|
7
|
-
import { DSButton as E } from "./button.
|
|
7
|
+
import { DSButton as E } from "./button.L1lgCuM9.js";
|
|
8
8
|
import { D as la } from "./chunks/Icon.n4XZrQ4N.js";
|
|
9
9
|
import { DSSystemFeedback as oa } from "./systemfeedback.CUWch42u.js";
|
|
10
|
-
import { v as da, b as ca, M as _a, a as ua, s as fa, c as ra, i as v } from "./chunks/Input.utils.
|
|
10
|
+
import { v as da, b as ca, M as _a, a as ua, s as fa, c as ra, i as v } from "./chunks/Input.utils.BGUhXCNP.js";
|
|
11
11
|
import './assets/input.71tOIrpp.css';const pa = "_input_1jdyx_226", xa = "_input--invalid_1jdyx_336", ma = "_input--small_1jdyx_343", ya = "_input--has-leading-icon_1jdyx_395", ja = "_input--has-action-button_1jdyx_398", ha = "_input--has-second-action-button_1jdyx_401", ba = "_input--has-affix_1jdyx_413", ga = "_input--is-ready_1jdyx_427", Ia = "_root_1jdyx_434", Sa = "_hint_1jdyx_442", Ha = "_label_1jdyx_442", ka = "_wrapper_1jdyx_446", va = "_affix_1jdyx_452", Ca = "_affix--small_1jdyx_472", Ra = "_affix--disabled_1jdyx_484", Da = "_prefix_1jdyx_487", La = "_affix--readonly_1jdyx_490", Aa = "_suffix_1jdyx_500", Na = "_leading-icon_1jdyx_507", Ba = "_leading-icon--small_1jdyx_519", wa = "_leading-icon--disabled_1jdyx_522", Ea = "_action-button_1jdyx_531", Ta = "_label--hidden_1jdyx_548", Fa = "_feedback_1jdyx_575", a = {
|
|
12
12
|
input: pa,
|
|
13
13
|
"input--invalid": "_input--invalid_1jdyx_336",
|
|
@@ -4,9 +4,9 @@ import "./chunks/index.CvOaL64Y.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
6
|
import "./asterisk.Cjbk-xZi.js";
|
|
7
|
-
import "./button.
|
|
7
|
+
import "./button.L1lgCuM9.js";
|
|
8
8
|
import "./systemfeedback.CUWch42u.js";
|
|
9
|
-
import { D as n } from "./chunks/InputPassword.
|
|
9
|
+
import { D as n } from "./chunks/InputPassword.a7zHKrmM.js";
|
|
10
10
|
export {
|
|
11
11
|
n as DSInputPassword
|
|
12
12
|
};
|
|
@@ -5,9 +5,9 @@ import "react";
|
|
|
5
5
|
import "./chunks/helpers.B1JT5ShS.js";
|
|
6
6
|
import "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
7
7
|
import "./asterisk.Cjbk-xZi.js";
|
|
8
|
-
import "./button.
|
|
8
|
+
import "./button.L1lgCuM9.js";
|
|
9
9
|
import "./systemfeedback.CUWch42u.js";
|
|
10
|
-
import { D as s } from "./chunks/InputSearch.
|
|
10
|
+
import { D as s } from "./chunks/InputSearch.DITRiB92.js";
|
|
11
11
|
export {
|
|
12
12
|
s as DSInputSearch
|
|
13
13
|
};
|
|
@@ -4,10 +4,10 @@ import "./chunks/index.CvOaL64Y.js";
|
|
|
4
4
|
import "react";
|
|
5
5
|
import "./chunks/useBreakpoint.5xBNDiCf.js";
|
|
6
6
|
import "./asterisk.Cjbk-xZi.js";
|
|
7
|
-
import "./button.
|
|
8
|
-
import "./chunks/Input.utils.
|
|
7
|
+
import "./button.L1lgCuM9.js";
|
|
8
|
+
import "./chunks/Input.utils.BGUhXCNP.js";
|
|
9
9
|
import "./systemfeedback.CUWch42u.js";
|
|
10
|
-
import { D } from "./chunks/InputStepper.
|
|
10
|
+
import { D } from "./chunks/InputStepper.Bf8NZ9pb.js";
|
|
11
11
|
export {
|
|
12
12
|
D as DSInputStepper
|
|
13
13
|
};
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import "./chunks/Icon.n4XZrQ4N.js";
|
|
5
|
-
import { D as e } from "./chunks/Notification.
|
|
6
|
-
import "./button.
|
|
5
|
+
import { D as e } from "./chunks/Notification.DVVuSOqG.js";
|
|
6
|
+
import "./button.L1lgCuM9.js";
|
|
7
7
|
export {
|
|
8
8
|
e as DSNotification
|
|
9
9
|
};
|
package/package.json
CHANGED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as a } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as k } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import { DSLink as p } from "./link.SAcKvzJ3.js";
|
|
5
|
+
import { g as n } from "./chunks/helpers.B1JT5ShS.js";
|
|
6
|
+
import "react";
|
|
7
|
+
import './assets/skiptocontent.DGVJ77cj.css';const c = "_skip-to-content_4ockd_76", h = "_skip-to-content--dark_4ockd_83", s = {
|
|
8
|
+
"skip-to-content": "_skip-to-content_4ockd_76",
|
|
9
|
+
skipToContent: c,
|
|
10
|
+
"skip-to-content--dark": "_skip-to-content--dark_4ockd_83",
|
|
11
|
+
skipToContentDark: h
|
|
12
|
+
}, C = ({
|
|
13
|
+
children: e = "Skip to main content",
|
|
14
|
+
className: i,
|
|
15
|
+
targetElementId: t = "main",
|
|
16
|
+
theme: o = "light"
|
|
17
|
+
}) => {
|
|
18
|
+
t.startsWith("#") && console.warn(
|
|
19
|
+
n(
|
|
20
|
+
"DSSkipToContent",
|
|
21
|
+
'The targetElementId should not start with a "#" character. Please provide the id of the element you want to skip to.'
|
|
22
|
+
)
|
|
23
|
+
), (t.startsWith("http") || t.startsWith(".")) && console.warn(
|
|
24
|
+
n(
|
|
25
|
+
"DSSkipToContent",
|
|
26
|
+
'The targetElementId should not start with "http" or ".". Please provide the id of the element you want to skip to.'
|
|
27
|
+
)
|
|
28
|
+
);
|
|
29
|
+
const r = k(s.skipToContent, i, {
|
|
30
|
+
[s.skipToContentDark]: o === "dark"
|
|
31
|
+
});
|
|
32
|
+
return /* @__PURE__ */ a.jsx(
|
|
33
|
+
p,
|
|
34
|
+
{
|
|
35
|
+
className: r,
|
|
36
|
+
href: `#${t}`,
|
|
37
|
+
theme: o,
|
|
38
|
+
children: e
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
export {
|
|
43
|
+
C as DSSkipToContent
|
|
44
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './components/SkipToContent/SkipToContent'
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as r } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { c as n } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
+
import { D as _ } from "./chunks/Icon.n4XZrQ4N.js";
|
|
5
|
+
import './assets/spinner.D_Nnf1ZG.css';const m = "_root_11iwi_76", z = "_root-size-small_11iwi_82", c = "_root-size-medium_11iwi_86", S = "_root-size-large_11iwi_90", d = "_root-size-x-large_11iwi_94", g = "_root-size-inherit_11iwi_98", w = "_rotate_11iwi_1", u = "_screenReaderOnly_11iwi_123", e = {
|
|
6
|
+
root: m,
|
|
7
|
+
"root-size-small": "_root-size-small_11iwi_82",
|
|
8
|
+
rootSizeSmall: z,
|
|
9
|
+
"root-size-medium": "_root-size-medium_11iwi_86",
|
|
10
|
+
rootSizeMedium: c,
|
|
11
|
+
"root-size-large": "_root-size-large_11iwi_90",
|
|
12
|
+
rootSizeLarge: S,
|
|
13
|
+
"root-size-x-large": "_root-size-x-large_11iwi_94",
|
|
14
|
+
rootSizeXLarge: d,
|
|
15
|
+
"root-size-inherit": "_root-size-inherit_11iwi_98",
|
|
16
|
+
rootSizeInherit: g,
|
|
17
|
+
rotate: w,
|
|
18
|
+
screenReaderOnly: u
|
|
19
|
+
}, L = ({
|
|
20
|
+
aria: i,
|
|
21
|
+
className: t,
|
|
22
|
+
size: o = "small",
|
|
23
|
+
theme: s = "light",
|
|
24
|
+
...a
|
|
25
|
+
}) => {
|
|
26
|
+
const l = n(e.root, t, {
|
|
27
|
+
[e.rootSizeSmall]: o === "small",
|
|
28
|
+
[e.rootSizeMedium]: o === "medium",
|
|
29
|
+
[e.rootSizeLarge]: o === "large",
|
|
30
|
+
[e.rootSizeXLarge]: o === "x-large",
|
|
31
|
+
[e.rootSizeInherit]: o === "inherit"
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ r.jsxs(
|
|
34
|
+
"span",
|
|
35
|
+
{
|
|
36
|
+
className: l,
|
|
37
|
+
role: "alert",
|
|
38
|
+
"aria-live": "assertive",
|
|
39
|
+
"aria-label": (i == null ? void 0 : i["aria-label"]) || void 0,
|
|
40
|
+
...a,
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ r.jsx("span", { className: e.screenReaderOnly, children: " " }),
|
|
43
|
+
/* @__PURE__ */ r.jsx(
|
|
44
|
+
_,
|
|
45
|
+
{
|
|
46
|
+
name: "loading-spinner",
|
|
47
|
+
theme: s,
|
|
48
|
+
focusable: "false",
|
|
49
|
+
"aria-hidden": "true"
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
L as DSSpinner
|
|
58
|
+
};
|
|
@@ -3,7 +3,7 @@ import { j as t } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
|
3
3
|
import { c as b } from "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import { D as p } from "./chunks/Icon.n4XZrQ4N.js";
|
|
6
|
-
import { DSSpinner as f } from "./spinner.
|
|
6
|
+
import { DSSpinner as f } from "./spinner.DVa112nj.js";
|
|
7
7
|
import './assets/switch.Ds-I_ybT.css';const v = "_root_vzlrg_76", x = "_root--label-right_vzlrg_114", z = "_root--stretched_vzlrg_117", j = "_loader_vzlrg_127", k = "_thumb_vzlrg_180", S = "_root--checked_vzlrg_195", r = {
|
|
8
8
|
root: v,
|
|
9
9
|
"root--label-right": "_root--label-right_vzlrg_114",
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
3
|
import "./chunks/index.CvOaL64Y.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./button.
|
|
5
|
+
import "./button.L1lgCuM9.js";
|
|
6
6
|
import "./chunks/Icon.n4XZrQ4N.js";
|
|
7
|
-
import { D as s } from "./chunks/Toast.
|
|
7
|
+
import { D as s } from "./chunks/Toast.RON4bFPY.js";
|
|
8
8
|
export {
|
|
9
9
|
s as DSToast
|
|
10
10
|
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { j as h } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
+
import { createContext as C, useContext as P, useState as S, useRef as O, useEffect as A, useMemo as j } from "react";
|
|
4
|
+
import { g as a } from "./chunks/helpers.B1JT5ShS.js";
|
|
5
|
+
import { g as E, b as x } from "./chunks/AriaLiveRegions.utils.D2ni4Yrf.js";
|
|
6
|
+
import { D as _, s as U } from "./chunks/Toast.RON4bFPY.js";
|
|
7
|
+
import { h as q } from "./chunks/has-document.r9i9TxKV.js";
|
|
8
|
+
const Q = () => {
|
|
9
|
+
if (!E() || !x())
|
|
10
|
+
throw new Error(
|
|
11
|
+
a(
|
|
12
|
+
"DSToast",
|
|
13
|
+
'The DSAriaLiveRegions component has to be placed at the root of your application, as close to the "body" as possible, e.g. in your "App.tsx" or "layout.tsx".'
|
|
14
|
+
)
|
|
15
|
+
);
|
|
16
|
+
}, k = () => {
|
|
17
|
+
if (!q)
|
|
18
|
+
return;
|
|
19
|
+
if (document.querySelectorAll("[data-ds-toast]").length > 1)
|
|
20
|
+
throw new Error(
|
|
21
|
+
a(
|
|
22
|
+
"DSToast",
|
|
23
|
+
'The destructured "toast" element should only be used once in the DOM.'
|
|
24
|
+
)
|
|
25
|
+
);
|
|
26
|
+
}, i = "data-ds-toast-timeout-id", D = "closing", B = 1e4, w = C(void 0), J = () => {
|
|
27
|
+
const n = P(w);
|
|
28
|
+
if (!n)
|
|
29
|
+
throw new Error(
|
|
30
|
+
a(
|
|
31
|
+
"DSToastProvider",
|
|
32
|
+
"useDSToast must be used within a <DSToastProvider />, which wraps around your root component."
|
|
33
|
+
)
|
|
34
|
+
);
|
|
35
|
+
return n;
|
|
36
|
+
}, K = ({
|
|
37
|
+
children: n
|
|
38
|
+
}) => {
|
|
39
|
+
const [u, c] = S([]), [s, l] = S(null), o = O(null);
|
|
40
|
+
A(() => {
|
|
41
|
+
!s && u.length > 0 && setTimeout(() => {
|
|
42
|
+
l(u[0]);
|
|
43
|
+
});
|
|
44
|
+
}, [u]), A(() => {
|
|
45
|
+
s && (M(s.message, s.variant), I());
|
|
46
|
+
}, [s]);
|
|
47
|
+
const m = () => {
|
|
48
|
+
var e;
|
|
49
|
+
return ((e = o.current) == null ? void 0 : e.getAttribute(i)) || null;
|
|
50
|
+
}, T = (e) => {
|
|
51
|
+
var t;
|
|
52
|
+
(t = o.current) == null || t.setAttribute(i, e);
|
|
53
|
+
}, L = () => {
|
|
54
|
+
var e;
|
|
55
|
+
return (e = o.current) == null ? void 0 : e.removeAttribute(i);
|
|
56
|
+
}, M = (e, t) => {
|
|
57
|
+
if (t === "warning") {
|
|
58
|
+
const r = E();
|
|
59
|
+
r && (r.innerText = e);
|
|
60
|
+
} else if (t === "success" || t === "info") {
|
|
61
|
+
const r = x();
|
|
62
|
+
r && (r.innerText = e);
|
|
63
|
+
}
|
|
64
|
+
}, d = (e, t) => {
|
|
65
|
+
Q();
|
|
66
|
+
const r = {
|
|
67
|
+
message: e,
|
|
68
|
+
hideIcon: t == null ? void 0 : t.hideIcon,
|
|
69
|
+
variant: (t == null ? void 0 : t.variant) || "info",
|
|
70
|
+
onClick: () => {
|
|
71
|
+
g();
|
|
72
|
+
},
|
|
73
|
+
onMouseEnter: R,
|
|
74
|
+
onMouseLeave: p
|
|
75
|
+
};
|
|
76
|
+
c((y) => [...y, r]);
|
|
77
|
+
}, R = () => {
|
|
78
|
+
f();
|
|
79
|
+
}, f = () => {
|
|
80
|
+
var t;
|
|
81
|
+
const e = m();
|
|
82
|
+
e && (clearTimeout(e), (t = o.current) == null || t.removeAttribute(i));
|
|
83
|
+
}, v = () => {
|
|
84
|
+
const e = setTimeout(() => {
|
|
85
|
+
g();
|
|
86
|
+
}, B);
|
|
87
|
+
T(String(e));
|
|
88
|
+
}, p = () => {
|
|
89
|
+
m() !== D && o.current && v();
|
|
90
|
+
}, I = () => {
|
|
91
|
+
k(), o.current && s && (o.current.showPopover(), v());
|
|
92
|
+
}, g = () => {
|
|
93
|
+
f(), T(D), o.current && (o.current.addEventListener(
|
|
94
|
+
"animationend",
|
|
95
|
+
() => {
|
|
96
|
+
o.current && (o.current.hidePopover(), L(), o.current = null, c((e) => e.slice(1)), l(null));
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
once: !0
|
|
100
|
+
// removes event listener after being called once
|
|
101
|
+
}
|
|
102
|
+
), o.current.classList.add(U.rootClosing));
|
|
103
|
+
}, b = j(
|
|
104
|
+
() => ({
|
|
105
|
+
queueDSToastMessage: d
|
|
106
|
+
}),
|
|
107
|
+
[d]
|
|
108
|
+
);
|
|
109
|
+
return /* @__PURE__ */ h.jsxs(w.Provider, { value: b, children: [
|
|
110
|
+
s ? /* @__PURE__ */ h.jsx(_, { ...s, ref: o }) : void 0,
|
|
111
|
+
n
|
|
112
|
+
] });
|
|
113
|
+
};
|
|
114
|
+
export {
|
|
115
|
+
K as DSToastProvider,
|
|
116
|
+
J as useDSToast
|
|
117
|
+
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._root_9ofhu_76{display:inline-flex;vertical-align:top;margin:0;padding:0}._root-size-small_9ofhu_82{height:1rem;width:1rem}._root-size-medium_9ofhu_86{height:2rem;width:2rem}._root-size-large_9ofhu_90{height:2.5rem;width:2.5rem}._root-size-x-large_9ofhu_94{height:4rem;width:4rem}._root-size-inherit_9ofhu_98{height:inherit;width:inherit}._root_9ofhu_76>svg{position:relative;transform:translateZ(0);animation:_rotate_9ofhu_1 var(--ds-animation-duration, 1.1s) linear infinite;width:inherit;height:inherit}@keyframes _rotate_9ofhu_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._screenReaderOnly_9ofhu_118{border:0;clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;text-indent:-999999px;white-space:nowrap}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { g as i } from "./helpers.B1JT5ShS.js";
|
|
3
|
-
import "react";
|
|
4
|
-
const e = "ds-alert-live-region", n = "ds-status-live-region", r = () => document.getElementById(e), a = () => document.getElementById(n), g = () => {
|
|
5
|
-
const t = document.querySelectorAll(
|
|
6
|
-
`#${e}`
|
|
7
|
-
), o = document.querySelectorAll(
|
|
8
|
-
`#${n}`
|
|
9
|
-
);
|
|
10
|
-
if (t.length > 1)
|
|
11
|
-
throw new Error(
|
|
12
|
-
i(
|
|
13
|
-
"DSAriaLiveRegions",
|
|
14
|
-
`The DSAriaLiveRegions component with id="${e}" should only be present once on the page. Found ${t.length} instances.`
|
|
15
|
-
)
|
|
16
|
-
);
|
|
17
|
-
if (o.length > 1)
|
|
18
|
-
throw new Error(
|
|
19
|
-
i(
|
|
20
|
-
"DSAriaLiveRegions",
|
|
21
|
-
`The DSAriaLiveRegions component with id="${n}" should only be present once on the page. Found ${o.length} instances.`
|
|
22
|
-
)
|
|
23
|
-
);
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
e as A,
|
|
27
|
-
n as a,
|
|
28
|
-
a as b,
|
|
29
|
-
r as g,
|
|
30
|
-
g as v
|
|
31
|
-
};
|
package/spinner.DEtbkdfi.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as t } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { c as n } from "./chunks/index.CvOaL64Y.js";
|
|
4
|
-
import { D as _ } from "./chunks/Icon.n4XZrQ4N.js";
|
|
5
|
-
import './assets/spinner.LuV09jaU.css';const m = "_root_9ofhu_76", z = "_root-size-small_9ofhu_82", u = "_root-size-medium_9ofhu_86", c = "_root-size-large_9ofhu_90", h = "_root-size-x-large_9ofhu_94", S = "_root-size-inherit_9ofhu_98", f = "_rotate_9ofhu_1", d = "_screenReaderOnly_9ofhu_118", o = {
|
|
6
|
-
root: m,
|
|
7
|
-
"root-size-small": "_root-size-small_9ofhu_82",
|
|
8
|
-
rootSizeSmall: z,
|
|
9
|
-
"root-size-medium": "_root-size-medium_9ofhu_86",
|
|
10
|
-
rootSizeMedium: u,
|
|
11
|
-
"root-size-large": "_root-size-large_9ofhu_90",
|
|
12
|
-
rootSizeLarge: c,
|
|
13
|
-
"root-size-x-large": "_root-size-x-large_9ofhu_94",
|
|
14
|
-
rootSizeXLarge: h,
|
|
15
|
-
"root-size-inherit": "_root-size-inherit_9ofhu_98",
|
|
16
|
-
rootSizeInherit: S,
|
|
17
|
-
rotate: f,
|
|
18
|
-
screenReaderOnly: d
|
|
19
|
-
}, L = ({
|
|
20
|
-
aria: r,
|
|
21
|
-
className: i,
|
|
22
|
-
size: e = "small",
|
|
23
|
-
theme: s = "light",
|
|
24
|
-
...a
|
|
25
|
-
}) => {
|
|
26
|
-
const l = n(o.root, i, {
|
|
27
|
-
[o.rootSizeSmall]: e === "small",
|
|
28
|
-
[o.rootSizeMedium]: e === "medium",
|
|
29
|
-
[o.rootSizeLarge]: e === "large",
|
|
30
|
-
[o.rootSizeXLarge]: e === "x-large",
|
|
31
|
-
[o.rootSizeInherit]: e === "inherit"
|
|
32
|
-
});
|
|
33
|
-
return /* @__PURE__ */ t.jsxs(
|
|
34
|
-
"span",
|
|
35
|
-
{
|
|
36
|
-
className: l,
|
|
37
|
-
role: "alert",
|
|
38
|
-
"aria-live": "assertive",
|
|
39
|
-
"aria-label": (r == null ? void 0 : r["aria-label"]) || void 0,
|
|
40
|
-
...a,
|
|
41
|
-
children: [
|
|
42
|
-
/* @__PURE__ */ t.jsx("span", { className: o.screenReaderOnly, children: " " }),
|
|
43
|
-
/* @__PURE__ */ t.jsx(
|
|
44
|
-
_,
|
|
45
|
-
{
|
|
46
|
-
name: "loading-spinner",
|
|
47
|
-
theme: s,
|
|
48
|
-
focusable: "false",
|
|
49
|
-
"aria-hidden": "true"
|
|
50
|
-
}
|
|
51
|
-
)
|
|
52
|
-
]
|
|
53
|
-
}
|
|
54
|
-
);
|
|
55
|
-
};
|
|
56
|
-
export {
|
|
57
|
-
L as DSSpinner
|
|
58
|
-
};
|
package/toastmanager.DBp8B1e3.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { j as w } from "./chunks/jsx-runtime.C115EyI4.js";
|
|
3
|
-
import { useState as f, useRef as x, useEffect as g } from "react";
|
|
4
|
-
import { g as h, b as A } from "./chunks/AriaLiveRegions.utils.DzWI5KCU.js";
|
|
5
|
-
import { D, s as y } from "./chunks/Toast.BLGKvAvZ.js";
|
|
6
|
-
import { g as E } from "./chunks/helpers.B1JT5ShS.js";
|
|
7
|
-
const O = () => {
|
|
8
|
-
if (!h() || !A())
|
|
9
|
-
throw new Error(
|
|
10
|
-
E(
|
|
11
|
-
"DSToast",
|
|
12
|
-
'The DSAriaLiveRegions component has to be placed at the root of your application, as close to the "body" as possible, e.g. in your "App.tsx" or "layout.tsx".'
|
|
13
|
-
)
|
|
14
|
-
);
|
|
15
|
-
}, C = () => {
|
|
16
|
-
if (document.querySelectorAll("[data-ds-toast]").length > 1)
|
|
17
|
-
throw new Error(
|
|
18
|
-
E(
|
|
19
|
-
"DSToast",
|
|
20
|
-
'The destructured "toast" element should only be used once in the DOM.'
|
|
21
|
-
)
|
|
22
|
-
);
|
|
23
|
-
}, i = "data-ds-toast-timeout-id", v = "closing", P = 1e4, k = () => {
|
|
24
|
-
const [r, u] = f([]), [s, a] = f(null), o = x(null);
|
|
25
|
-
g(() => {
|
|
26
|
-
!s && r.length > 0 && setTimeout(() => {
|
|
27
|
-
a(r[0]);
|
|
28
|
-
});
|
|
29
|
-
}, [r]), g(() => {
|
|
30
|
-
s && (R(s.message, s.variant), b());
|
|
31
|
-
}, [s]);
|
|
32
|
-
const c = () => {
|
|
33
|
-
var e;
|
|
34
|
-
return ((e = o.current) == null ? void 0 : e.getAttribute(i)) || null;
|
|
35
|
-
}, l = (e) => {
|
|
36
|
-
var t;
|
|
37
|
-
(t = o.current) == null || t.setAttribute(i, e);
|
|
38
|
-
}, L = () => {
|
|
39
|
-
var e;
|
|
40
|
-
return (e = o.current) == null ? void 0 : e.removeAttribute(i);
|
|
41
|
-
}, R = (e, t) => {
|
|
42
|
-
if (t === "warning") {
|
|
43
|
-
const n = h();
|
|
44
|
-
n && (n.innerText = e);
|
|
45
|
-
} else if (t === "success" || t === "info") {
|
|
46
|
-
const n = A();
|
|
47
|
-
n && (n.innerText = e);
|
|
48
|
-
}
|
|
49
|
-
}, S = (e, t) => {
|
|
50
|
-
O();
|
|
51
|
-
const n = {
|
|
52
|
-
message: e,
|
|
53
|
-
hideIcon: t == null ? void 0 : t.hideIcon,
|
|
54
|
-
variant: (t == null ? void 0 : t.variant) || "info",
|
|
55
|
-
onClick: () => {
|
|
56
|
-
d();
|
|
57
|
-
},
|
|
58
|
-
onMouseEnter: I,
|
|
59
|
-
onMouseLeave: M
|
|
60
|
-
};
|
|
61
|
-
u((p) => [...p, n]);
|
|
62
|
-
}, I = () => {
|
|
63
|
-
T();
|
|
64
|
-
}, T = () => {
|
|
65
|
-
var t;
|
|
66
|
-
const e = c();
|
|
67
|
-
e && (clearTimeout(e), (t = o.current) == null || t.removeAttribute(i));
|
|
68
|
-
}, m = () => {
|
|
69
|
-
const e = setTimeout(() => {
|
|
70
|
-
d();
|
|
71
|
-
}, P);
|
|
72
|
-
l(String(e));
|
|
73
|
-
}, M = () => {
|
|
74
|
-
c() !== v && o.current && m();
|
|
75
|
-
}, b = () => {
|
|
76
|
-
C(), o.current && s && (o.current.showPopover(), m());
|
|
77
|
-
}, d = () => {
|
|
78
|
-
T(), l(v), o.current && (o.current.addEventListener(
|
|
79
|
-
"animationend",
|
|
80
|
-
() => {
|
|
81
|
-
o.current && (o.current.hidePopover(), L(), o.current = null, u((e) => e.slice(1)), a(null));
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
once: !0
|
|
85
|
-
// removes event listener after being called once
|
|
86
|
-
}
|
|
87
|
-
), o.current.classList.add(y.rootClosing));
|
|
88
|
-
};
|
|
89
|
-
return {
|
|
90
|
-
toast: s ? /* @__PURE__ */ w.jsx(D, { ...s, ref: o }) : void 0,
|
|
91
|
-
queueToastMessage: S
|
|
92
|
-
};
|
|
93
|
-
};
|
|
94
|
-
export {
|
|
95
|
-
k as useToast
|
|
96
|
-
};
|