@mittwald/flow-react-components 0.1.0-alpha.199 → 0.1.0-alpha.200
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/Accordion-DX40QvjC.js +85 -0
- package/dist/Accordion.js +1 -1
- package/dist/Navigation.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/Accordion/Accordion.d.ts +1 -0
- package/dist/types/components/Accordion/stories/Default.stories.d.ts +1 -0
- package/package.json +4 -4
- package/dist/Accordion-C3Df-FUx.js +0 -77
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import n, { useState as I, useId as a } from "react";
|
|
4
|
+
import w from "clsx";
|
|
5
|
+
import "./propsContext-DzAKlmhS.js";
|
|
6
|
+
import { P as N } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
7
|
+
import "@react-aria/utils";
|
|
8
|
+
import "remeda";
|
|
9
|
+
import { d } from "./dynamic-ClpUSmEt.js";
|
|
10
|
+
import { B as y } from "./Button-CVDWL-od.js";
|
|
11
|
+
import "@tabler/icons-react";
|
|
12
|
+
import "./Icon-CUhvR1IT.js";
|
|
13
|
+
import { I as B } from "./IconChevronDown-0Qm5hGlw.js";
|
|
14
|
+
import { TunnelProvider as C, TunnelExit as P } from "@mittwald/react-tunnel";
|
|
15
|
+
import { A } from "./Activity-CmfZpgOM.js";
|
|
16
|
+
const b = "flow--accordion", g = "flow--accordion--header", D = "flow--accordion--header-button", T = "flow--accordion--content", H = "flow--accordion--content-inner", L = "flow--accordion--chevron", R = "flow--accordion--outline", S = "flow--accordion--expanded", e = {
|
|
17
|
+
accordion: b,
|
|
18
|
+
header: g,
|
|
19
|
+
headerButton: D,
|
|
20
|
+
content: T,
|
|
21
|
+
contentInner: H,
|
|
22
|
+
chevron: L,
|
|
23
|
+
outline: R,
|
|
24
|
+
expanded: S
|
|
25
|
+
}, W = (i) => {
|
|
26
|
+
const {
|
|
27
|
+
children: s,
|
|
28
|
+
className: l,
|
|
29
|
+
defaultExpanded: m = !1,
|
|
30
|
+
variant: p = "default",
|
|
31
|
+
...u
|
|
32
|
+
} = i, [o, h] = I(m), f = w(
|
|
33
|
+
e.accordion,
|
|
34
|
+
o && e.expanded,
|
|
35
|
+
l,
|
|
36
|
+
p === "outlined" && e.outline
|
|
37
|
+
), v = a(), r = a(), c = (t) => /* @__PURE__ */ n.createElement(
|
|
38
|
+
y,
|
|
39
|
+
{
|
|
40
|
+
unstyled: !0,
|
|
41
|
+
"aria-expanded": o,
|
|
42
|
+
className: e.headerButton,
|
|
43
|
+
onPress: () => h((E) => !E),
|
|
44
|
+
"aria-controls": r
|
|
45
|
+
},
|
|
46
|
+
t,
|
|
47
|
+
/* @__PURE__ */ n.createElement(B, { className: e.chevron })
|
|
48
|
+
), x = {
|
|
49
|
+
Content: {
|
|
50
|
+
className: e.contentInner,
|
|
51
|
+
tunnelId: "content"
|
|
52
|
+
},
|
|
53
|
+
Heading: {
|
|
54
|
+
className: e.header,
|
|
55
|
+
level: 4,
|
|
56
|
+
children: d((t) => c(t.children))
|
|
57
|
+
},
|
|
58
|
+
Label: {
|
|
59
|
+
className: e.header,
|
|
60
|
+
children: d((t) => c(t.children))
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
return /* @__PURE__ */ n.createElement("div", { ...u, className: f }, /* @__PURE__ */ n.createElement(
|
|
64
|
+
N,
|
|
65
|
+
{
|
|
66
|
+
mergeInParentContext: !0,
|
|
67
|
+
props: x,
|
|
68
|
+
dependencies: [o]
|
|
69
|
+
},
|
|
70
|
+
/* @__PURE__ */ n.createElement(C, null, s, /* @__PURE__ */ n.createElement(
|
|
71
|
+
"div",
|
|
72
|
+
{
|
|
73
|
+
"aria-labelledby": v,
|
|
74
|
+
id: r,
|
|
75
|
+
role: "region",
|
|
76
|
+
hidden: !o,
|
|
77
|
+
className: e.content
|
|
78
|
+
},
|
|
79
|
+
/* @__PURE__ */ n.createElement(A, { isActive: o, inactiveDelay: 1e3 }, /* @__PURE__ */ n.createElement(P, { id: "content" }))
|
|
80
|
+
))
|
|
81
|
+
));
|
|
82
|
+
};
|
|
83
|
+
export {
|
|
84
|
+
W as A
|
|
85
|
+
};
|
package/dist/Accordion.js
CHANGED
package/dist/Navigation.js
CHANGED
|
@@ -9,7 +9,7 @@ import { P as l } from "./PropsContextProvider-C6Z4XGp6.js";
|
|
|
9
9
|
import "@react-aria/utils";
|
|
10
10
|
import "remeda";
|
|
11
11
|
import { TunnelProvider as u, TunnelExit as p } from "@mittwald/react-tunnel";
|
|
12
|
-
import { A as x } from "./Accordion-
|
|
12
|
+
import { A as x } from "./Accordion-DX40QvjC.js";
|
|
13
13
|
import { C as N } from "./Content-DTwZweqp.js";
|
|
14
14
|
const C = "flow--navigation", I = "flow--navigation--item", b = "flow--navigation--icon", P = "flow--navigation--text", w = "flow--navigation--control-icon", r = {
|
|
15
15
|
navigation: C,
|