@ledgerhq/lumen-ui-react 0.1.2 → 0.1.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/lib/Components/AmountDisplay/AmountDisplay.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/AmountDisplay.js +101 -53
- package/dist/lib/Components/AmountDisplay/types.d.ts +8 -2
- package/dist/lib/Components/AmountDisplay/types.d.ts.map +1 -1
- package/dist/lib/Components/AmountDisplay/types.js +4 -0
- package/dist/lib/Components/ContentBanner/ContentBanner.js +1 -1
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +39 -50
- package/dist/lib/Components/Subheader/Subheader.js +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AmountDisplay.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/AmountDisplay.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"AmountDisplay.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/AmountDisplay.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,kBAAkB,EAInB,MAAM,SAAS,CAAC;AA2EjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,aAAa;0EAQvB,kBAAkB;;CAwDpB,CAAC"}
|
|
@@ -1,78 +1,126 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useSplitText as
|
|
3
|
-
import { memo as
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useSplitText as y, buildAriaLabel as x, cn as p } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
import { memo as d } from "react";
|
|
4
|
+
import { DIGITS as b } from "./types.js";
|
|
4
5
|
import { useCommonTranslation as D } from "../../../i18n/useCommonTranslation.js";
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
const N = {
|
|
7
|
+
0: 24.5,
|
|
8
|
+
1: 15,
|
|
9
|
+
2: 23,
|
|
10
|
+
3: 24,
|
|
11
|
+
4: 25,
|
|
12
|
+
5: 23,
|
|
13
|
+
6: 24.5,
|
|
14
|
+
7: 21.5,
|
|
15
|
+
8: 24,
|
|
16
|
+
9: 24
|
|
17
|
+
}, I = {
|
|
18
|
+
0: 17,
|
|
19
|
+
1: 10.5,
|
|
20
|
+
2: 16,
|
|
21
|
+
3: 16.5,
|
|
22
|
+
4: 17.2,
|
|
23
|
+
5: 15.7,
|
|
24
|
+
6: 17,
|
|
25
|
+
7: 14.7,
|
|
26
|
+
8: 16.5,
|
|
27
|
+
9: 16.5
|
|
28
|
+
}, T = d(({ value: a, animate: l, type: r }) => {
|
|
29
|
+
const i = (r === "integer" ? N : I)[a];
|
|
30
|
+
return /* @__PURE__ */ o(
|
|
31
|
+
"div",
|
|
9
32
|
{
|
|
10
|
-
className:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
33
|
+
className: "relative overflow-hidden transition-[width] duration-600",
|
|
34
|
+
style: { width: i + "px" },
|
|
35
|
+
children: [
|
|
36
|
+
/* @__PURE__ */ e("span", { className: "invisible", children: "0" }),
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
"span",
|
|
39
|
+
{
|
|
40
|
+
className: p(
|
|
41
|
+
"absolute inset-x-0 top-0 flex flex-col items-center justify-center",
|
|
42
|
+
l && "transition-transform duration-600 ease-in-out"
|
|
43
|
+
),
|
|
44
|
+
style: {
|
|
45
|
+
transform: `translateY(-${a * 10}%)`
|
|
46
|
+
},
|
|
47
|
+
children: b.map((s, n) => /* @__PURE__ */ e("span", { inert: s !== a, children: s }, n))
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
]
|
|
18
51
|
}
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
|
|
52
|
+
);
|
|
53
|
+
}), m = d(({ items: a, type: l, animate: r }) => a.map((i, s) => {
|
|
54
|
+
const n = a.length - s;
|
|
55
|
+
return i.type === "separator" ? /* @__PURE__ */ e("span", { children: i.value }, n) : /* @__PURE__ */ e(
|
|
56
|
+
T,
|
|
57
|
+
{
|
|
58
|
+
value: Number(i.value),
|
|
59
|
+
animate: r,
|
|
60
|
+
type: l
|
|
61
|
+
},
|
|
62
|
+
n
|
|
63
|
+
);
|
|
64
|
+
})), g = ({
|
|
65
|
+
value: a,
|
|
22
66
|
formatter: l,
|
|
23
|
-
hidden:
|
|
24
|
-
loading:
|
|
25
|
-
animate:
|
|
26
|
-
className:
|
|
27
|
-
...
|
|
67
|
+
hidden: r = !1,
|
|
68
|
+
loading: i = !1,
|
|
69
|
+
animate: s = !0,
|
|
70
|
+
className: n,
|
|
71
|
+
...u
|
|
28
72
|
}) => {
|
|
29
|
-
const
|
|
30
|
-
e,
|
|
73
|
+
const t = l(a), c = y(t), { t: f } = D(), h = x(
|
|
31
74
|
t,
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
A,
|
|
37
|
-
{
|
|
38
|
-
value: parseInt(r.value, 10),
|
|
39
|
-
animate: u
|
|
40
|
-
},
|
|
41
|
-
p
|
|
42
|
-
)));
|
|
43
|
-
};
|
|
44
|
-
return /* @__PURE__ */ n(
|
|
75
|
+
r,
|
|
76
|
+
f("components.amountDisplay.amountHiddenAriaLabel")
|
|
77
|
+
);
|
|
78
|
+
return /* @__PURE__ */ o(
|
|
45
79
|
"div",
|
|
46
80
|
{
|
|
47
|
-
className:
|
|
48
|
-
|
|
81
|
+
className: p(
|
|
82
|
+
i && "animate-pulse",
|
|
49
83
|
"relative inline-flex items-end",
|
|
50
|
-
|
|
84
|
+
n
|
|
51
85
|
),
|
|
52
|
-
"aria-label":
|
|
53
|
-
"aria-busy":
|
|
54
|
-
...
|
|
86
|
+
"aria-label": h,
|
|
87
|
+
"aria-busy": i,
|
|
88
|
+
...u,
|
|
55
89
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ o(
|
|
57
91
|
"span",
|
|
58
92
|
{
|
|
59
93
|
className: "inline-flex flex-row mask-fade-y heading-1-semi-bold text-base",
|
|
60
94
|
"aria-hidden": "true",
|
|
61
95
|
children: [
|
|
62
|
-
|
|
63
|
-
|
|
96
|
+
t.currencyPosition === "start" && /* @__PURE__ */ e("span", { className: "me-4", children: t.currencyText }),
|
|
97
|
+
r ? /* @__PURE__ */ e("span", { children: "••••" }) : /* @__PURE__ */ e(
|
|
98
|
+
m,
|
|
99
|
+
{
|
|
100
|
+
items: c.integerPart,
|
|
101
|
+
animate: s,
|
|
102
|
+
type: "integer"
|
|
103
|
+
}
|
|
104
|
+
)
|
|
64
105
|
]
|
|
65
106
|
}
|
|
66
107
|
),
|
|
67
|
-
/* @__PURE__ */
|
|
108
|
+
/* @__PURE__ */ o(
|
|
68
109
|
"span",
|
|
69
110
|
{
|
|
70
111
|
className: "inline-flex flex-row mask-fade-y pb-2 heading-2-semi-bold text-muted",
|
|
71
112
|
"aria-hidden": "true",
|
|
72
113
|
children: [
|
|
73
|
-
!
|
|
74
|
-
|
|
75
|
-
|
|
114
|
+
!r && t.decimalPart && /* @__PURE__ */ e("span", { children: t.decimalSeparator }),
|
|
115
|
+
t.decimalPart && !r && /* @__PURE__ */ e(
|
|
116
|
+
m,
|
|
117
|
+
{
|
|
118
|
+
items: c.decimalPart,
|
|
119
|
+
animate: s,
|
|
120
|
+
type: "decimal"
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
t.currencyPosition === "end" && /* @__PURE__ */ e("span", { className: "ms-4", children: t.currencyText })
|
|
76
124
|
]
|
|
77
125
|
}
|
|
78
126
|
)
|
|
@@ -80,7 +128,7 @@ const P = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], A = N(({ value: i, animate: l }) => /*
|
|
|
80
128
|
}
|
|
81
129
|
);
|
|
82
130
|
};
|
|
83
|
-
|
|
131
|
+
g.displayName = "AmountDisplay";
|
|
84
132
|
export {
|
|
85
|
-
|
|
133
|
+
g as AmountDisplay
|
|
86
134
|
};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { FormattedValue, SplitChar } from '@ledgerhq/lumen-utils-shared';
|
|
2
2
|
import { ComponentPropsWithRef } from 'react';
|
|
3
|
-
export type { FormattedValue
|
|
3
|
+
export type { FormattedValue };
|
|
4
|
+
export declare const DIGITS: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
|
|
5
|
+
type IntegerDigit = (typeof DIGITS)[number];
|
|
4
6
|
export type DigitStripProps = {
|
|
5
|
-
value:
|
|
7
|
+
value: IntegerDigit;
|
|
6
8
|
animate: boolean;
|
|
9
|
+
type: 'integer' | 'decimal';
|
|
7
10
|
};
|
|
11
|
+
export type DigitStripListProps = {
|
|
12
|
+
items: SplitChar[];
|
|
13
|
+
} & Omit<DigitStripProps, 'value'>;
|
|
8
14
|
/**
|
|
9
15
|
* Props for the AmountDisplay component.
|
|
10
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,YAAY,EAAE,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/AmountDisplay/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAEnD,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B,eAAO,MAAM,MAAM,yCAA0C,CAAC;AAE9D,KAAK,YAAY,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,EAAE,YAAY,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,cAAc,CAAC;IAC7C;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SideBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/SideBar.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAmDjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,OAAO;2KAWjB,YAAY;;CA2Bd,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,cAAc;6CAKxB,mBAAmB;;CAUrB,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,eAAe;6CAKzB,oBAAoB;;CAUtB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,WAAW;4IAWrB,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"SideBar.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/SideBar.tsx"],"names":[],"mappings":"AAOA,OAAO,EAEL,YAAY,EACZ,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,EAChB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAmDjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,OAAO;2KAWjB,YAAY;;CA2Bd,CAAC;AAGF;;;GAGG;AACH,eAAO,MAAM,cAAc;6CAKxB,mBAAmB;;CAUrB,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,eAAe;6CAKzB,oBAAoB;;CAUtB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,WAAW;4IAWrB,gBAAgB;;CAmDlB,CAAC;AAGF;;;;;;;;GAQG;AACH,eAAO,MAAM,qBAAqB;8BAG/B,0BAA0B;;CAgC5B,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { createSafeContext as j, cn as
|
|
1
|
+
import { jsx as a, jsxs as x, Fragment as A } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as j, cn as p } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as v } from "class-variance-authority";
|
|
4
4
|
import { t as h } from "../../../node_modules/i18next/dist/esm/i18next.js";
|
|
5
|
-
import { useCallback as
|
|
5
|
+
import { useCallback as S } from "react";
|
|
6
6
|
import { Tooltip as P, TooltipTrigger as R, TooltipContent as V } from "../Tooltip/Tooltip.js";
|
|
7
|
-
import { useControllableState as
|
|
7
|
+
import { useControllableState as B } from "../../../utils/useControllableState/useControllableState.js";
|
|
8
8
|
import { ExpandRight as q } from "../../Symbols/Icons/ExpandRight.js";
|
|
9
9
|
import { ExpandLeft as z } from "../../Symbols/Icons/ExpandLeft.js";
|
|
10
|
-
const [E,
|
|
10
|
+
const [E, C] = j("SideBar"), m = {
|
|
11
11
|
root: v(
|
|
12
12
|
[
|
|
13
13
|
"flex h-full flex-col justify-between gap-16 overflow-y-auto rounded-xl bg-muted-transparent p-16",
|
|
@@ -17,7 +17,7 @@ const [E, y] = j("SideBar"), u = {
|
|
|
17
17
|
{
|
|
18
18
|
variants: {
|
|
19
19
|
collapsed: {
|
|
20
|
-
true: "w-
|
|
20
|
+
true: "w-[76px]",
|
|
21
21
|
false: "w-208"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
@@ -29,7 +29,7 @@ const [E, y] = j("SideBar"), u = {
|
|
|
29
29
|
section: v(["flex flex-col gap-16"]),
|
|
30
30
|
item: v(
|
|
31
31
|
[
|
|
32
|
-
"flex h-44 w-full cursor-pointer items-center rounded-md p-12",
|
|
32
|
+
"flex h-44 w-full cursor-pointer items-center overflow-hidden rounded-md p-12",
|
|
33
33
|
"transition-all duration-300",
|
|
34
34
|
"focus-visible:outline-2 focus-visible:outline-focus"
|
|
35
35
|
],
|
|
@@ -56,30 +56,30 @@ const [E, y] = j("SideBar"), u = {
|
|
|
56
56
|
defaultCollapsed: e = !1,
|
|
57
57
|
onCollapsedChange: o,
|
|
58
58
|
active: n,
|
|
59
|
-
defaultActive:
|
|
59
|
+
defaultActive: c,
|
|
60
60
|
onActiveChange: s,
|
|
61
61
|
children: f,
|
|
62
62
|
className: i,
|
|
63
63
|
...b
|
|
64
64
|
}) => {
|
|
65
|
-
const [
|
|
65
|
+
const [u, g] = B({
|
|
66
66
|
prop: t,
|
|
67
67
|
defaultProp: e,
|
|
68
68
|
onChange: o
|
|
69
|
-
}), [
|
|
69
|
+
}), [l, d] = B({
|
|
70
70
|
prop: n,
|
|
71
|
-
defaultProp:
|
|
71
|
+
defaultProp: c ?? "",
|
|
72
72
|
onChange: s
|
|
73
73
|
});
|
|
74
74
|
return /* @__PURE__ */ a(
|
|
75
75
|
E,
|
|
76
76
|
{
|
|
77
|
-
value: { collapsed:
|
|
77
|
+
value: { collapsed: u, setCollapsed: g, active: l, onActiveChange: d },
|
|
78
78
|
children: /* @__PURE__ */ a(
|
|
79
79
|
"nav",
|
|
80
80
|
{
|
|
81
81
|
ref: r,
|
|
82
|
-
className:
|
|
82
|
+
className: p(m.root({ collapsed: u }), i),
|
|
83
83
|
"aria-label": h("components.sideBar.navigationAriaLabel"),
|
|
84
84
|
...b,
|
|
85
85
|
children: f
|
|
@@ -98,7 +98,7 @@ const F = ({
|
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
100
|
ref: r,
|
|
101
|
-
className:
|
|
101
|
+
className: p(m.section(), e),
|
|
102
102
|
...o,
|
|
103
103
|
children: t
|
|
104
104
|
}
|
|
@@ -113,7 +113,7 @@ const J = ({
|
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
ref: r,
|
|
116
|
-
className:
|
|
116
|
+
className: p("mt-auto", m.section(), e),
|
|
117
117
|
...o,
|
|
118
118
|
children: t
|
|
119
119
|
}
|
|
@@ -125,78 +125,67 @@ const K = ({
|
|
|
125
125
|
icon: e,
|
|
126
126
|
activeIcon: o,
|
|
127
127
|
label: n,
|
|
128
|
-
tooltipContent:
|
|
128
|
+
tooltipContent: c,
|
|
129
129
|
disabled: s = !1,
|
|
130
130
|
className: f,
|
|
131
131
|
onClick: i,
|
|
132
132
|
...b
|
|
133
133
|
}) => {
|
|
134
|
-
const { collapsed:
|
|
134
|
+
const { collapsed: u, active: g, onActiveChange: l } = C({
|
|
135
135
|
consumerName: "SideBarItem",
|
|
136
136
|
contextRequired: !0
|
|
137
|
-
}),
|
|
137
|
+
}), d = g === t, N = d ? o : e, y = c ?? n, T = S(
|
|
138
138
|
(L) => {
|
|
139
|
-
s || (i == null || i(L),
|
|
139
|
+
s || (i == null || i(L), l == null || l(t));
|
|
140
140
|
},
|
|
141
|
-
[s, i,
|
|
142
|
-
),
|
|
143
|
-
/* @__PURE__ */ a(
|
|
144
|
-
n != null && /* @__PURE__ */ a(
|
|
145
|
-
|
|
146
|
-
{
|
|
147
|
-
className: d(
|
|
148
|
-
"truncate transition-all duration-200",
|
|
149
|
-
l ? "ml-0 w-0 opacity-0" : "ml-8 opacity-100"
|
|
150
|
-
),
|
|
151
|
-
children: n
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
] }), B = /* @__PURE__ */ a(
|
|
141
|
+
[s, i, l, t]
|
|
142
|
+
), w = /* @__PURE__ */ x(A, { children: [
|
|
143
|
+
/* @__PURE__ */ a(N, { size: 20, className: "shrink-0" }),
|
|
144
|
+
n != null && /* @__PURE__ */ a("span", { className: "translate-x-8 truncate", children: n })
|
|
145
|
+
] }), I = /* @__PURE__ */ a(
|
|
155
146
|
"button",
|
|
156
147
|
{
|
|
157
148
|
ref: r,
|
|
158
149
|
type: "button",
|
|
159
150
|
disabled: s,
|
|
160
|
-
onClick:
|
|
161
|
-
className:
|
|
162
|
-
|
|
163
|
-
l && "w-fit",
|
|
151
|
+
onClick: T,
|
|
152
|
+
className: p(
|
|
153
|
+
m.item({ active: d, disabled: s }),
|
|
164
154
|
f
|
|
165
155
|
),
|
|
166
|
-
"aria-current":
|
|
156
|
+
"aria-current": d ? "page" : void 0,
|
|
167
157
|
...b,
|
|
168
|
-
children:
|
|
158
|
+
children: w
|
|
169
159
|
}
|
|
170
160
|
);
|
|
171
|
-
return
|
|
172
|
-
/* @__PURE__ */ a(R, { asChild: !0, children:
|
|
173
|
-
/* @__PURE__ */ a(V, { side: "right", sideOffset: 8, children:
|
|
174
|
-
] })
|
|
161
|
+
return /* @__PURE__ */ x(P, { open: u ? void 0 : !1, children: [
|
|
162
|
+
/* @__PURE__ */ a(R, { asChild: !0, children: I }),
|
|
163
|
+
/* @__PURE__ */ a(V, { side: "right", sideOffset: 8, children: y })
|
|
164
|
+
] });
|
|
175
165
|
};
|
|
176
166
|
K.displayName = "SideBarItem";
|
|
177
167
|
const O = ({
|
|
178
168
|
className: r,
|
|
179
169
|
...t
|
|
180
170
|
}) => {
|
|
181
|
-
const { collapsed: e, setCollapsed: o } =
|
|
171
|
+
const { collapsed: e, setCollapsed: o } = C({
|
|
182
172
|
consumerName: "SideBarCollapseToggle",
|
|
183
173
|
contextRequired: !0
|
|
184
|
-
}), n =
|
|
174
|
+
}), n = S(() => {
|
|
185
175
|
o(!e);
|
|
186
|
-
}, [e, o]),
|
|
176
|
+
}, [e, o]), c = e ? q : z;
|
|
187
177
|
return /* @__PURE__ */ a(
|
|
188
178
|
"button",
|
|
189
179
|
{
|
|
190
180
|
type: "button",
|
|
191
181
|
onClick: n,
|
|
192
|
-
className:
|
|
193
|
-
|
|
194
|
-
e && "w-fit",
|
|
182
|
+
className: p(
|
|
183
|
+
m.item({ active: !1, disabled: !1 }),
|
|
195
184
|
r
|
|
196
185
|
),
|
|
197
186
|
"aria-label": e ? h("components.sideBar.expandAriaLabel") : h("components.sideBar.collapseAriaLabel"),
|
|
198
187
|
...t,
|
|
199
|
-
children: /* @__PURE__ */ a(
|
|
188
|
+
children: /* @__PURE__ */ a(c, { size: 20, className: "shrink-0" })
|
|
200
189
|
}
|
|
201
190
|
);
|
|
202
191
|
};
|
package/dist/package.json
CHANGED