enefit-design-system 0.9.2-ds.3 → 0.9.2-ds.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DsStepper/DsStepper.js +42 -41
- package/dist/_virtual/index5.js +3 -5
- package/dist/_virtual/index6.js +5 -3
- 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/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/package.json +1 -1
|
@@ -1,89 +1,90 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as n, jsx as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { jsxs as n, jsx as t, Fragment as D } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as F, useRef as T, useEffect as $ } from "react";
|
|
4
|
+
import q from "../output/icons/IconCheckXs.js";
|
|
5
|
+
import C from "../output/icons/IconCheckSm.js";
|
|
6
|
+
import { cn as b } from "../utils/dsClass.js";
|
|
6
7
|
/* empty css */
|
|
7
|
-
function
|
|
8
|
-
return r <
|
|
8
|
+
function E(r, s) {
|
|
9
|
+
return r < s ? "completed" : r === s ? "active" : "upcoming";
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
return
|
|
11
|
+
function H(r, s, i) {
|
|
12
|
+
return s ? !!(r === "completed" && i) : !1;
|
|
12
13
|
}
|
|
13
|
-
const K =
|
|
14
|
+
const K = F(
|
|
14
15
|
function({
|
|
15
|
-
items:
|
|
16
|
+
items: s,
|
|
16
17
|
value: i,
|
|
17
18
|
onChange: p,
|
|
18
|
-
allowPrevStepSelect:
|
|
19
|
+
allowPrevStepSelect: v = !1,
|
|
19
20
|
focusOnActiveChange: d = !1,
|
|
20
21
|
size: u = "default",
|
|
21
|
-
ariaLabels:
|
|
22
|
+
ariaLabels: m,
|
|
22
23
|
className: N,
|
|
23
|
-
...
|
|
24
|
-
},
|
|
25
|
-
const I =
|
|
26
|
-
|
|
24
|
+
...k
|
|
25
|
+
}, x) {
|
|
26
|
+
const I = m?.nav ?? "Steps", S = m?.completed ?? "completed", o = Math.max(0, s.findIndex((e) => e.value === i)), g = u === "small" ? "small" : "default", f = T(null);
|
|
27
|
+
$(() => {
|
|
27
28
|
if (!d) return;
|
|
28
|
-
const e =
|
|
29
|
+
const e = f.current;
|
|
29
30
|
if (!e) return;
|
|
30
31
|
(e.querySelector(
|
|
31
32
|
"button, [tabindex]"
|
|
32
33
|
) ?? e).focus();
|
|
33
34
|
}, [o, d]);
|
|
34
|
-
const l =
|
|
35
|
+
const l = s[o];
|
|
35
36
|
return /* @__PURE__ */ n(
|
|
36
37
|
"nav",
|
|
37
38
|
{
|
|
38
|
-
ref:
|
|
39
|
+
ref: x,
|
|
39
40
|
"aria-label": I,
|
|
40
|
-
className:
|
|
41
|
+
className: b(
|
|
41
42
|
"ds-stepper",
|
|
42
43
|
u === "small" && "ds-stepper--small",
|
|
43
44
|
N
|
|
44
45
|
),
|
|
45
|
-
...
|
|
46
|
+
...k,
|
|
46
47
|
children: [
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
const a =
|
|
48
|
+
/* @__PURE__ */ t("ol", { className: "ds-stepper__list", children: s.map((e, c) => {
|
|
49
|
+
const a = E(c, o), w = e.disabled ?? !1, y = s.slice(c + 1).every((j) => j.disabled), h = H(
|
|
49
50
|
a,
|
|
50
51
|
p,
|
|
51
|
-
|
|
52
|
-
),
|
|
53
|
-
/* @__PURE__ */
|
|
52
|
+
v
|
|
53
|
+
), L = a === "completed" ? g === "small" ? /* @__PURE__ */ t(q, { "aria-hidden": !0, width: 16, height: 16 }) : /* @__PURE__ */ t(C, { "aria-hidden": !0, width: 24, height: 24 }) : c + 1, _ = /* @__PURE__ */ n(D, { children: [
|
|
54
|
+
/* @__PURE__ */ t(
|
|
54
55
|
"span",
|
|
55
56
|
{
|
|
56
57
|
className: "ds-stepper__indicator",
|
|
57
58
|
"aria-hidden": "true",
|
|
58
|
-
children:
|
|
59
|
+
children: L
|
|
59
60
|
}
|
|
60
61
|
),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
e.description != null && e.description !== "" ? /* @__PURE__ */
|
|
63
|
-
] }),
|
|
62
|
+
/* @__PURE__ */ t("span", { className: "ds-stepper__title", children: e.label }),
|
|
63
|
+
e.description != null && e.description !== "" ? /* @__PURE__ */ t("span", { className: "ds-stepper__description", children: e.description }) : null
|
|
64
|
+
] }), R = a === "completed" ? `${e.label}, ${S}` : e.label;
|
|
64
65
|
return /* @__PURE__ */ n(
|
|
65
66
|
"li",
|
|
66
67
|
{
|
|
67
|
-
ref: a === "active" ?
|
|
68
|
-
className:
|
|
68
|
+
ref: a === "active" ? f : void 0,
|
|
69
|
+
className: b(
|
|
69
70
|
"ds-stepper__item",
|
|
70
|
-
|
|
71
|
+
w && "ds-stepper__item--hidden"
|
|
71
72
|
),
|
|
72
73
|
"data-state": a,
|
|
73
74
|
"aria-current": a === "active" ? "step" : void 0,
|
|
74
|
-
"aria-label":
|
|
75
|
-
tabIndex: a === "active" && d && !
|
|
75
|
+
"aria-label": R,
|
|
76
|
+
tabIndex: a === "active" && d && !h ? -1 : void 0,
|
|
76
77
|
children: [
|
|
77
|
-
|
|
78
|
+
h ? /* @__PURE__ */ t(
|
|
78
79
|
"button",
|
|
79
80
|
{
|
|
80
81
|
type: "button",
|
|
81
82
|
className: "ds-stepper__button",
|
|
82
83
|
onClick: () => p?.(e.value),
|
|
83
|
-
children:
|
|
84
|
+
children: _
|
|
84
85
|
}
|
|
85
|
-
) :
|
|
86
|
-
|
|
86
|
+
) : _,
|
|
87
|
+
y ? null : /* @__PURE__ */ t(
|
|
87
88
|
"span",
|
|
88
89
|
{
|
|
89
90
|
className: "ds-stepper__separator",
|
|
@@ -97,8 +98,8 @@ const K = T(
|
|
|
97
98
|
);
|
|
98
99
|
}) }),
|
|
99
100
|
l ? /* @__PURE__ */ n("div", { className: "ds-stepper__active-step", "aria-hidden": "true", children: [
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
l.description != null && l.description !== "" ? /* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ t("p", { className: "ds-stepper__active-title", children: l.label }),
|
|
102
|
+
l.description != null && l.description !== "" ? /* @__PURE__ */ t("p", { className: "ds-stepper__active-description", children: l.description }) : null
|
|
102
103
|
] }) : null
|
|
103
104
|
]
|
|
104
105
|
}
|
package/dist/_virtual/index5.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/index6.js
CHANGED
|
@@ -1,5 +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);
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
s as default
|
|
5
7
|
};
|
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/index5.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/index5.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 r } from "../../_virtual/
|
|
1
|
+
import { __module as r } from "../../_virtual/index8.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/index6.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/index6.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/index7.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;
|