enefit-design-system 0.9.2-ds.4 → 0.9.2-ds.5
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/DsStepper/DsStepper.js +41 -42
- package/dist/_virtual/index3.js +7 -2
- package/dist/_virtual/index5.js +2 -5
- package/dist/_virtual/index6.js +3 -5
- package/dist/_virtual/index7.js +2 -2
- package/dist/_virtual/index8.js +2 -2
- package/dist/external/@react-aria/landmark/dist/useLandmark.js +1 -1
- package/dist/external/@react-stately/toast/dist/useToastState.js +1 -1
- package/dist/external/prop-types/external/react-is/index.js +1 -1
- package/dist/external/prop-types/index.js +1 -1
- package/dist/external/react-transition-group/esm/CSSTransition.js +1 -1
- package/dist/external/react-transition-group/esm/Transition.js +1 -1
- package/dist/external/react-transition-group/esm/utils/PropTypes.js +1 -1
- package/dist/external/use-sync-external-store/shim/index.js +1 -1
- package/dist/external/usehooks-ts/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,90 +1,89 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as n, jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { cn as b } from "../utils/dsClass.js";
|
|
2
|
+
import { jsxs as n, jsx as s, Fragment as F } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as T, useRef as $, useEffect as q } from "react";
|
|
4
|
+
import { DsIcon as w } from "../DsIcon/DsIcon.js";
|
|
5
|
+
import { cn as v } from "../utils/dsClass.js";
|
|
7
6
|
/* empty css */
|
|
8
|
-
function
|
|
9
|
-
return r <
|
|
7
|
+
function z(r, t) {
|
|
8
|
+
return r < t ? "completed" : r === t ? "active" : "upcoming";
|
|
10
9
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
10
|
+
function E(r, t, i) {
|
|
11
|
+
return t ? !!(r === "completed" && i) : !1;
|
|
13
12
|
}
|
|
14
|
-
const K =
|
|
13
|
+
const K = T(
|
|
15
14
|
function({
|
|
16
|
-
items:
|
|
15
|
+
items: t,
|
|
17
16
|
value: i,
|
|
18
17
|
onChange: p,
|
|
19
|
-
allowPrevStepSelect:
|
|
18
|
+
allowPrevStepSelect: h = !1,
|
|
20
19
|
focusOnActiveChange: d = !1,
|
|
21
20
|
size: u = "default",
|
|
22
|
-
ariaLabels:
|
|
21
|
+
ariaLabels: f,
|
|
23
22
|
className: N,
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
const I =
|
|
27
|
-
|
|
23
|
+
...x
|
|
24
|
+
}, k) {
|
|
25
|
+
const I = f?.nav ?? "Steps", S = f?.completed ?? "completed", o = Math.max(0, t.findIndex((e) => e.value === i)), y = u === "small" ? "small" : "default", m = $(null);
|
|
26
|
+
q(() => {
|
|
28
27
|
if (!d) return;
|
|
29
|
-
const e =
|
|
28
|
+
const e = m.current;
|
|
30
29
|
if (!e) return;
|
|
31
30
|
(e.querySelector(
|
|
32
31
|
"button, [tabindex]"
|
|
33
32
|
) ?? e).focus();
|
|
34
33
|
}, [o, d]);
|
|
35
|
-
const l =
|
|
34
|
+
const l = t[o];
|
|
36
35
|
return /* @__PURE__ */ n(
|
|
37
36
|
"nav",
|
|
38
37
|
{
|
|
39
|
-
ref:
|
|
38
|
+
ref: k,
|
|
40
39
|
"aria-label": I,
|
|
41
|
-
className:
|
|
40
|
+
className: v(
|
|
42
41
|
"ds-stepper",
|
|
43
42
|
u === "small" && "ds-stepper--small",
|
|
44
43
|
N
|
|
45
44
|
),
|
|
46
|
-
...
|
|
45
|
+
...x,
|
|
47
46
|
children: [
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
const a =
|
|
47
|
+
/* @__PURE__ */ s("ol", { className: "ds-stepper__list", children: t.map((e, c) => {
|
|
48
|
+
const a = z(c, o), D = e.disabled ?? !1, L = t.slice(c + 1).every((j) => j.disabled), _ = E(
|
|
50
49
|
a,
|
|
51
50
|
p,
|
|
52
|
-
|
|
53
|
-
),
|
|
54
|
-
/* @__PURE__ */
|
|
51
|
+
h
|
|
52
|
+
), R = a === "completed" ? /* @__PURE__ */ s(w, { icon: "check", size: y, "aria-hidden": "true" }) : c + 1, b = /* @__PURE__ */ n(F, { children: [
|
|
53
|
+
/* @__PURE__ */ s(
|
|
55
54
|
"span",
|
|
56
55
|
{
|
|
57
56
|
className: "ds-stepper__indicator",
|
|
58
57
|
"aria-hidden": "true",
|
|
59
|
-
children:
|
|
58
|
+
children: R
|
|
60
59
|
}
|
|
61
60
|
),
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
e.description != null && e.description !== "" ? /* @__PURE__ */
|
|
64
|
-
] }),
|
|
61
|
+
/* @__PURE__ */ s("span", { className: "ds-stepper__title", children: e.label }),
|
|
62
|
+
e.description != null && e.description !== "" ? /* @__PURE__ */ s("span", { className: "ds-stepper__description", children: e.description }) : null
|
|
63
|
+
] }), g = a === "completed" ? `${e.label}, ${S}` : e.label;
|
|
65
64
|
return /* @__PURE__ */ n(
|
|
66
65
|
"li",
|
|
67
66
|
{
|
|
68
|
-
ref: a === "active" ?
|
|
69
|
-
className:
|
|
67
|
+
ref: a === "active" ? m : void 0,
|
|
68
|
+
className: v(
|
|
70
69
|
"ds-stepper__item",
|
|
71
|
-
|
|
70
|
+
D && "ds-stepper__item--hidden"
|
|
72
71
|
),
|
|
73
72
|
"data-state": a,
|
|
74
73
|
"aria-current": a === "active" ? "step" : void 0,
|
|
75
|
-
"aria-label":
|
|
76
|
-
tabIndex: a === "active" && d && !
|
|
74
|
+
"aria-label": g,
|
|
75
|
+
tabIndex: a === "active" && d && !_ ? -1 : void 0,
|
|
77
76
|
children: [
|
|
78
|
-
|
|
77
|
+
_ ? /* @__PURE__ */ s(
|
|
79
78
|
"button",
|
|
80
79
|
{
|
|
81
80
|
type: "button",
|
|
82
81
|
className: "ds-stepper__button",
|
|
83
82
|
onClick: () => p?.(e.value),
|
|
84
|
-
children:
|
|
83
|
+
children: b
|
|
85
84
|
}
|
|
86
|
-
) :
|
|
87
|
-
|
|
85
|
+
) : b,
|
|
86
|
+
L ? null : /* @__PURE__ */ s(
|
|
88
87
|
"span",
|
|
89
88
|
{
|
|
90
89
|
className: "ds-stepper__separator",
|
|
@@ -98,8 +97,8 @@ const K = F(
|
|
|
98
97
|
);
|
|
99
98
|
}) }),
|
|
100
99
|
l ? /* @__PURE__ */ n("div", { className: "ds-stepper__active-step", "aria-hidden": "true", children: [
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
l.description != null && l.description !== "" ? /* @__PURE__ */
|
|
100
|
+
/* @__PURE__ */ s("p", { className: "ds-stepper__active-title", children: l.label }),
|
|
101
|
+
l.description != null && l.description !== "" ? /* @__PURE__ */ s("p", { className: "ds-stepper__active-description", children: l.description }) : null
|
|
103
102
|
] }) : null
|
|
104
103
|
]
|
|
105
104
|
}
|
package/dist/_virtual/index3.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { getDefaultExportFromCjs as r } from "./_commonjsHelpers.js";
|
|
2
|
+
import { __require as o } from "../external/prop-types/index.js";
|
|
3
|
+
var p = /* @__PURE__ */ o();
|
|
4
|
+
const s = /* @__PURE__ */ r(p);
|
|
5
|
+
export {
|
|
6
|
+
s as default
|
|
7
|
+
};
|
package/dist/_virtual/index5.js
CHANGED
package/dist/_virtual/index6.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
var p = /* @__PURE__ */ o();
|
|
4
|
-
const s = /* @__PURE__ */ r(p);
|
|
1
|
+
import { __require as r } from "../external/use-sync-external-store/shim/index.js";
|
|
2
|
+
var i = r();
|
|
5
3
|
export {
|
|
6
|
-
|
|
4
|
+
i as s
|
|
7
5
|
};
|
package/dist/_virtual/index7.js
CHANGED
package/dist/_virtual/index8.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as b, useCallback as h, useEffect as g } from "react";
|
|
2
2
|
import { useLayoutEffect as L } from "../../utils/dist/useLayoutEffect.js";
|
|
3
|
-
import { s as p } from "../../../../_virtual/
|
|
3
|
+
import { s as p } from "../../../../_virtual/index6.js";
|
|
4
4
|
const v = 1, c = /* @__PURE__ */ Symbol.for("react-aria-landmark-manager");
|
|
5
5
|
function E(l) {
|
|
6
6
|
return document.addEventListener("react-aria-landmark-manager-change", l), () => document.removeEventListener("react-aria-landmark-manager-change", l);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMemo as o, useCallback as l } from "react";
|
|
2
|
-
import { s as u } from "../../../../_virtual/
|
|
2
|
+
import { s as u } from "../../../../_virtual/index6.js";
|
|
3
3
|
function d(e = {}) {
|
|
4
4
|
let { maxVisibleToasts: s = 1, wrapUpdate: t } = e, i = o(() => new c({
|
|
5
5
|
maxVisibleToasts: s,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index8.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as r } from "../../_virtual/
|
|
1
|
+
import { __module as r } from "../../_virtual/index7.js";
|
|
2
2
|
import { __require as s } from "./external/react-is/index.js";
|
|
3
3
|
import { __require as t } from "./factoryWithTypeCheckers.js";
|
|
4
4
|
import { __require as p } from "./factoryWithThrowingShims.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import C from "../../@babel/runtime/helpers/esm/extends.js";
|
|
2
2
|
import x from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
|
|
3
3
|
import N from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
|
|
4
|
-
import v from "../../../_virtual/
|
|
4
|
+
import v from "../../../_virtual/index3.js";
|
|
5
5
|
import A from "../../dom-helpers/esm/addClass.js";
|
|
6
6
|
import _ from "../../dom-helpers/esm/removeClass.js";
|
|
7
7
|
import c from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import C from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
|
|
2
2
|
import D from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
|
|
3
|
-
import o from "../../../_virtual/
|
|
3
|
+
import o from "../../../_virtual/index3.js";
|
|
4
4
|
import v from "react";
|
|
5
5
|
import b from "react-dom";
|
|
6
6
|
import T from "./config.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as r } from "../../../_virtual/
|
|
1
|
+
import { __module as r } from "../../../_virtual/index9.js";
|
|
2
2
|
import { __require as o } from "../cjs/use-sync-external-store-shim.production.js";
|
|
3
3
|
import { __require as i } from "../cjs/use-sync-external-store-shim.development.js";
|
|
4
4
|
var e;
|