@ledgerhq/lumen-ui-react 0.1.15 → 0.1.16
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/ai-rules/RULES.md +1 -1
- package/dist/i18n/i18n.d.ts.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +126 -128
- package/dist/lib/Components/AmountInput/AmountInput.d.ts.map +1 -1
- package/dist/lib/Components/Avatar/Avatar.js +24 -24
- package/dist/lib/Components/BaseInput/BaseInput.d.ts.map +1 -1
- package/dist/lib/Components/BaseInput/BaseInput.js +58 -58
- package/dist/lib/Components/CardButton/CardButton.js +10 -10
- package/dist/lib/Components/Dialog/Dialog.js +39 -39
- package/dist/lib/Components/Dialog/types.d.ts +3 -3
- package/dist/lib/Components/Icon/Icon.js +5 -5
- package/dist/lib/Components/Icon/createIcon.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.d.ts.map +1 -1
- package/dist/lib/Components/Link/Link.js +25 -32
- package/dist/lib/Components/ListItem/ListItem.d.ts +17 -28
- package/dist/lib/Components/ListItem/ListItem.d.ts.map +1 -1
- package/dist/lib/Components/ListItem/ListItem.js +81 -93
- package/dist/lib/Components/ListItem/types.d.ts +13 -32
- package/dist/lib/Components/ListItem/types.d.ts.map +1 -1
- package/dist/lib/Components/Menu/Menu.d.ts +4 -4
- package/dist/lib/Components/Menu/Menu.d.ts.map +1 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts +0 -1
- package/dist/lib/Components/NavBar/NavBar.d.ts.map +1 -1
- package/dist/lib/Components/Popover/Popover.js +7 -7
- package/dist/lib/Components/Popover/types.d.ts +3 -3
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/SegmentedControl.js +97 -81
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts +1 -0
- package/dist/lib/Components/SegmentedControl/SegmentedControlContext.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/types.d.ts +7 -0
- package/dist/lib/Components/SegmentedControl/types.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.d.ts +5 -6
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.d.ts.map +1 -1
- package/dist/lib/Components/SegmentedControl/usePillElementLayoutEffect.js +30 -25
- package/dist/lib/Components/Select/Select.js +9 -9
- package/dist/lib/Components/SideBar/SideBar.d.ts +1 -1
- package/dist/lib/Components/SideBar/SideBar.d.ts.map +1 -1
- package/dist/lib/Components/SideBar/SideBar.js +93 -89
- package/dist/lib/Components/SideBar/types.d.ts +7 -1
- package/dist/lib/Components/SideBar/types.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.d.ts +5 -6
- package/dist/lib/Components/Stepper/Stepper.d.ts.map +1 -1
- package/dist/lib/Components/Stepper/Stepper.js +100 -102
- package/dist/lib/Components/Stepper/types.d.ts +2 -2
- package/dist/lib/Components/Stepper/types.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.d.ts.map +1 -1
- package/dist/lib/Components/Tag/Tag.js +1 -1
- package/dist/lib/Components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/lib/Components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/lib/Components/TriggerButton/TriggerButton.js +8 -8
- package/dist/node_modules/i18next/dist/esm/i18next.js +45 -47
- package/dist/package.json +1 -1
- package/dist/utils/icon-template.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/lib/Patterns/index.d.ts +0 -3
- package/dist/lib/Patterns/index.d.ts.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { createSafeContext as
|
|
1
|
+
import { jsx as e, jsxs as C, Fragment as P } from "react/jsx-runtime";
|
|
2
|
+
import { createSafeContext as R, cn as u, useDisabledContext as V } from "../../../libs/utils-shared/dist/index.js";
|
|
3
3
|
import { cva as h } from "class-variance-authority";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { useControllableState as
|
|
4
|
+
import { useCallback as B } from "react";
|
|
5
|
+
import { Tooltip as S, TooltipTrigger as N, TooltipContent as y } from "../Tooltip/Tooltip.js";
|
|
6
|
+
import { useCommonTranslation as T } from "../../../i18n/useCommonTranslation.js";
|
|
7
|
+
import { useControllableState as x } from "../../../utils/useControllableState/useControllableState.js";
|
|
8
8
|
import { ExpandRight as q } from "../../Symbols/Icons/ExpandRight.js";
|
|
9
9
|
import { ExpandLeft as E } from "../../Symbols/Icons/ExpandLeft.js";
|
|
10
|
-
const [
|
|
10
|
+
const [O, A] = R("SideBar"), f = {
|
|
11
11
|
root: h(
|
|
12
12
|
[
|
|
13
13
|
"flex h-full flex-col justify-between gap-16 overflow-y-auto rounded-xl bg-muted-transparent p-16",
|
|
@@ -50,71 +50,71 @@ const [D, N] = j("SideBar"), d = {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
|
-
},
|
|
53
|
+
}, D = ({
|
|
54
54
|
ref: n,
|
|
55
55
|
collapsed: t,
|
|
56
|
-
defaultCollapsed:
|
|
57
|
-
onCollapsedChange:
|
|
58
|
-
active:
|
|
59
|
-
defaultActive:
|
|
60
|
-
onActiveChange:
|
|
61
|
-
children:
|
|
62
|
-
className:
|
|
63
|
-
...
|
|
56
|
+
defaultCollapsed: s = !1,
|
|
57
|
+
onCollapsedChange: a,
|
|
58
|
+
active: o,
|
|
59
|
+
defaultActive: r,
|
|
60
|
+
onActiveChange: d,
|
|
61
|
+
children: c,
|
|
62
|
+
className: i,
|
|
63
|
+
...p
|
|
64
64
|
}) => {
|
|
65
|
-
const [
|
|
65
|
+
const { t: l } = T(), [b, v] = x({
|
|
66
66
|
prop: t,
|
|
67
|
-
defaultProp:
|
|
68
|
-
onChange:
|
|
69
|
-
}), [g, m] =
|
|
70
|
-
prop:
|
|
71
|
-
defaultProp:
|
|
72
|
-
onChange:
|
|
67
|
+
defaultProp: s,
|
|
68
|
+
onChange: a
|
|
69
|
+
}), [g, m] = x({
|
|
70
|
+
prop: o,
|
|
71
|
+
defaultProp: r ?? "",
|
|
72
|
+
onChange: d
|
|
73
73
|
});
|
|
74
|
-
return /* @__PURE__ */
|
|
75
|
-
|
|
74
|
+
return /* @__PURE__ */ e(
|
|
75
|
+
O,
|
|
76
76
|
{
|
|
77
|
-
value: { collapsed:
|
|
78
|
-
children: /* @__PURE__ */
|
|
77
|
+
value: { collapsed: b, setCollapsed: v, active: g, onActiveChange: m },
|
|
78
|
+
children: /* @__PURE__ */ e(
|
|
79
79
|
"nav",
|
|
80
80
|
{
|
|
81
81
|
ref: n,
|
|
82
|
-
className:
|
|
83
|
-
"aria-label":
|
|
84
|
-
...
|
|
85
|
-
children:
|
|
82
|
+
className: u(f.root({ collapsed: b }), i),
|
|
83
|
+
"aria-label": l("components.sideBar.navigationAriaLabel"),
|
|
84
|
+
...p,
|
|
85
|
+
children: c
|
|
86
86
|
}
|
|
87
87
|
)
|
|
88
88
|
}
|
|
89
89
|
);
|
|
90
90
|
};
|
|
91
|
-
|
|
92
|
-
const
|
|
91
|
+
D.displayName = "SideBar";
|
|
92
|
+
const F = ({
|
|
93
93
|
ref: n,
|
|
94
94
|
children: t,
|
|
95
|
-
className:
|
|
96
|
-
...
|
|
97
|
-
}) => /* @__PURE__ */
|
|
95
|
+
className: s,
|
|
96
|
+
...a
|
|
97
|
+
}) => /* @__PURE__ */ e(
|
|
98
98
|
"div",
|
|
99
99
|
{
|
|
100
100
|
ref: n,
|
|
101
|
-
className:
|
|
102
|
-
...
|
|
101
|
+
className: u(f.section(), s),
|
|
102
|
+
...a,
|
|
103
103
|
children: t
|
|
104
104
|
}
|
|
105
105
|
);
|
|
106
|
-
|
|
106
|
+
F.displayName = "SideBarLeading";
|
|
107
107
|
const W = ({
|
|
108
108
|
ref: n,
|
|
109
109
|
children: t,
|
|
110
|
-
className:
|
|
111
|
-
...
|
|
112
|
-
}) => /* @__PURE__ */
|
|
110
|
+
className: s,
|
|
111
|
+
...a
|
|
112
|
+
}) => /* @__PURE__ */ e(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
ref: n,
|
|
116
|
-
className:
|
|
117
|
-
...
|
|
116
|
+
className: u("mt-auto", f.section(), s),
|
|
117
|
+
...a,
|
|
118
118
|
children: t
|
|
119
119
|
}
|
|
120
120
|
);
|
|
@@ -122,81 +122,85 @@ W.displayName = "SideBarTrailing";
|
|
|
122
122
|
const G = ({
|
|
123
123
|
ref: n,
|
|
124
124
|
value: t,
|
|
125
|
-
icon:
|
|
126
|
-
activeIcon:
|
|
127
|
-
label:
|
|
128
|
-
tooltipContent:
|
|
129
|
-
disabled:
|
|
130
|
-
className:
|
|
131
|
-
onClick:
|
|
132
|
-
...
|
|
125
|
+
icon: s,
|
|
126
|
+
activeIcon: a,
|
|
127
|
+
label: o,
|
|
128
|
+
tooltipContent: r,
|
|
129
|
+
disabled: d = !1,
|
|
130
|
+
className: c,
|
|
131
|
+
onClick: i,
|
|
132
|
+
...p
|
|
133
133
|
}) => {
|
|
134
|
-
const
|
|
134
|
+
const l = V({
|
|
135
135
|
consumerName: "SideBarItem",
|
|
136
|
-
mergeWith: { disabled:
|
|
137
|
-
}), { collapsed: b, active:
|
|
136
|
+
mergeWith: { disabled: d }
|
|
137
|
+
}), { collapsed: b, active: v, onActiveChange: g } = A({
|
|
138
138
|
consumerName: "SideBarItem",
|
|
139
139
|
contextRequired: !0
|
|
140
|
-
}),
|
|
141
|
-
(
|
|
142
|
-
|
|
140
|
+
}), m = v === t, w = m ? a : s, I = r ?? o, L = B(
|
|
141
|
+
(z) => {
|
|
142
|
+
l || (i?.(z), g?.(t));
|
|
143
143
|
},
|
|
144
|
-
[
|
|
145
|
-
),
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
148
|
-
] }),
|
|
144
|
+
[l, i, g, t]
|
|
145
|
+
), j = /* @__PURE__ */ C(P, { children: [
|
|
146
|
+
/* @__PURE__ */ e(w, { size: 20 }),
|
|
147
|
+
o != null && /* @__PURE__ */ e("span", { className: "translate-x-8 truncate", children: o })
|
|
148
|
+
] }), k = /* @__PURE__ */ e(
|
|
149
149
|
"button",
|
|
150
150
|
{
|
|
151
151
|
ref: n,
|
|
152
152
|
type: "button",
|
|
153
|
-
disabled:
|
|
154
|
-
onClick:
|
|
155
|
-
className:
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
disabled: l,
|
|
154
|
+
onClick: L,
|
|
155
|
+
className: u(
|
|
156
|
+
f.item({ active: m, disabled: l }),
|
|
157
|
+
c
|
|
158
158
|
),
|
|
159
|
-
"aria-current":
|
|
160
|
-
...
|
|
161
|
-
children:
|
|
159
|
+
"aria-current": m ? "page" : void 0,
|
|
160
|
+
...p,
|
|
161
|
+
children: j
|
|
162
162
|
}
|
|
163
163
|
);
|
|
164
|
-
return /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
164
|
+
return /* @__PURE__ */ C(S, { open: b ? void 0 : !1, children: [
|
|
165
|
+
/* @__PURE__ */ e(N, { asChild: !0, children: k }),
|
|
166
|
+
/* @__PURE__ */ e(y, { side: "right", sideOffset: 8, children: I })
|
|
167
167
|
] });
|
|
168
168
|
};
|
|
169
169
|
G.displayName = "SideBarItem";
|
|
170
170
|
const H = ({
|
|
171
171
|
className: n,
|
|
172
|
-
|
|
172
|
+
tooltipContent: t,
|
|
173
|
+
...s
|
|
173
174
|
}) => {
|
|
174
|
-
const { collapsed:
|
|
175
|
+
const { t: a } = T(), { collapsed: o, setCollapsed: r } = A({
|
|
175
176
|
consumerName: "SideBarCollapseToggle",
|
|
176
177
|
contextRequired: !0
|
|
177
|
-
}),
|
|
178
|
-
|
|
179
|
-
}, [
|
|
180
|
-
return /* @__PURE__ */ a(
|
|
178
|
+
}), d = B(() => {
|
|
179
|
+
r(!o);
|
|
180
|
+
}, [o, r]), c = o ? q : E, i = /* @__PURE__ */ e(
|
|
181
181
|
"button",
|
|
182
182
|
{
|
|
183
183
|
type: "button",
|
|
184
|
-
onClick:
|
|
185
|
-
className:
|
|
186
|
-
|
|
184
|
+
onClick: d,
|
|
185
|
+
className: u(
|
|
186
|
+
f.item({ active: !1, disabled: !1 }),
|
|
187
187
|
n
|
|
188
188
|
),
|
|
189
|
-
"aria-label":
|
|
190
|
-
...
|
|
191
|
-
children: /* @__PURE__ */
|
|
189
|
+
"aria-label": a(o ? "components.sideBar.expandAriaLabel" : "components.sideBar.collapseAriaLabel"),
|
|
190
|
+
...s,
|
|
191
|
+
children: /* @__PURE__ */ e(c, { size: 20 })
|
|
192
192
|
}
|
|
193
|
-
);
|
|
193
|
+
), p = t ?? a("components.sideBar.collapseAriaLabel");
|
|
194
|
+
return /* @__PURE__ */ C(S, { open: o ? void 0 : !1, children: [
|
|
195
|
+
/* @__PURE__ */ e(N, { asChild: !0, children: i }),
|
|
196
|
+
/* @__PURE__ */ e(y, { side: "right", sideOffset: 8, children: p })
|
|
197
|
+
] });
|
|
194
198
|
};
|
|
195
199
|
H.displayName = "SideBarCollapseToggle";
|
|
196
200
|
export {
|
|
197
|
-
|
|
201
|
+
D as SideBar,
|
|
198
202
|
H as SideBarCollapseToggle,
|
|
199
203
|
G as SideBarItem,
|
|
200
|
-
|
|
204
|
+
F as SideBarLeading,
|
|
201
205
|
W as SideBarTrailing
|
|
202
206
|
};
|
|
@@ -114,7 +114,8 @@ export type SideBarItemProps = {
|
|
|
114
114
|
*/
|
|
115
115
|
label?: ReactNode;
|
|
116
116
|
/**
|
|
117
|
-
* Content shown in the tooltip when collapsed. Can be a string or ReactNode.
|
|
117
|
+
* Content shown in the tooltip when collapsed. Can be a string or ReactNode.
|
|
118
|
+
* If not provided and `label` is set, `label` is used.
|
|
118
119
|
*/
|
|
119
120
|
tooltipContent?: ReactNode;
|
|
120
121
|
/**
|
|
@@ -136,6 +137,11 @@ export type SideBarItemProps = {
|
|
|
136
137
|
* Internal props for the collapse toggle component
|
|
137
138
|
*/
|
|
138
139
|
export type SideBarCollapseToggleProps = {
|
|
140
|
+
/**
|
|
141
|
+
* Content shown in the tooltip when collapsed. Can be a string or ReactNode.
|
|
142
|
+
* If not provided, defaults to the `components.sideBar.collapseAriaLabel` translation key.
|
|
143
|
+
*/
|
|
144
|
+
tooltipContent?: ReactNode;
|
|
139
145
|
/**
|
|
140
146
|
* Additional CSS classes for the toggle.
|
|
141
147
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/SideBar/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IACjD;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,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AC7B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D;;OAEG;IACH,UAAU,EAAE,aAAa,CAAC;QAAE,IAAI,CAAC,EAAE,QAAQ,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACnE;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,CAAC;IAC/C;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC;;;OAGG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { StepperProps } from './types';
|
|
1
2
|
/**
|
|
2
3
|
* A circular stepper component showing progress as current step out of total steps.
|
|
3
4
|
* Renders a track arc with a progress arc and a center label.
|
|
@@ -8,10 +9,8 @@
|
|
|
8
9
|
* <Stepper currentStep={1} totalSteps={4} />
|
|
9
10
|
* <Stepper currentStep={0} totalSteps={9} disabled /> // Shows minimal dot, disabled style
|
|
10
11
|
*/
|
|
11
|
-
export declare const Stepper:
|
|
12
|
-
currentStep:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
label?: string;
|
|
16
|
-
} & Omit<import('react').HTMLAttributes<HTMLDivElement>, "children"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
|
+
export declare const Stepper: {
|
|
13
|
+
({ className, currentStep, totalSteps, disabled: disabledProp, label, ref, ...props }: StepperProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
17
16
|
//# sourceMappingURL=Stepper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Stepper/Stepper.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Stepper.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Stepper/Stepper.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAKvC;;;;;;;;;GASG;AACH,eAAO,MAAM,OAAO;2FAQjB,YAAY;;CAyFd,CAAC"}
|
|
@@ -1,110 +1,108 @@
|
|
|
1
1
|
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useDisabledContext as N, cn as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { useDisabledContext as N, cn as d, getStepperCalculations as v } from "../../../libs/utils-shared/dist/index.js";
|
|
3
|
+
const s = 48, i = 4, D = ({
|
|
4
|
+
className: m,
|
|
5
|
+
currentStep: t,
|
|
6
|
+
totalSteps: r,
|
|
7
|
+
disabled: h = !1,
|
|
8
|
+
label: o,
|
|
9
|
+
ref: u,
|
|
10
|
+
...p
|
|
11
|
+
}) => {
|
|
12
|
+
const f = N({
|
|
13
|
+
consumerName: "Stepper",
|
|
14
|
+
mergeWith: { disabled: h }
|
|
15
|
+
}), {
|
|
16
|
+
displayLabel: k,
|
|
17
|
+
r: n,
|
|
18
|
+
cx: l,
|
|
19
|
+
cy: c,
|
|
20
|
+
trackDashArray: b,
|
|
21
|
+
progressDashArray: x,
|
|
22
|
+
progressDashOffset: y
|
|
23
|
+
} = v({
|
|
7
24
|
currentStep: t,
|
|
8
25
|
totalSteps: r,
|
|
9
|
-
|
|
26
|
+
size: s,
|
|
10
27
|
label: o,
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
viewBox: `0 0 ${s} ${s}`,
|
|
52
|
-
className: "rotate-135",
|
|
53
|
-
"aria-hidden": !0,
|
|
54
|
-
children: [
|
|
55
|
-
/* @__PURE__ */ e(
|
|
56
|
-
"circle",
|
|
57
|
-
{
|
|
58
|
-
cx: l,
|
|
59
|
-
cy: d,
|
|
60
|
-
r: n,
|
|
61
|
-
fill: "none",
|
|
62
|
-
stroke: "currentColor",
|
|
63
|
-
strokeLinecap: "round",
|
|
64
|
-
className: "stroke-muted-subtle",
|
|
65
|
-
style: {
|
|
66
|
-
strokeWidth: `${i}px`,
|
|
67
|
-
strokeDasharray: b,
|
|
68
|
-
strokeDashoffset: 0
|
|
69
|
-
}
|
|
28
|
+
strokeWidth: i
|
|
29
|
+
});
|
|
30
|
+
return /* @__PURE__ */ a(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
ref: u,
|
|
34
|
+
role: "progressbar",
|
|
35
|
+
"aria-valuenow": t,
|
|
36
|
+
"aria-valuemin": 1,
|
|
37
|
+
"aria-valuemax": r,
|
|
38
|
+
"aria-label": k,
|
|
39
|
+
className: d(
|
|
40
|
+
"relative flex size-48 shrink-0 items-center justify-center rounded-full",
|
|
41
|
+
m
|
|
42
|
+
),
|
|
43
|
+
...p,
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ a(
|
|
46
|
+
"svg",
|
|
47
|
+
{
|
|
48
|
+
width: s,
|
|
49
|
+
height: s,
|
|
50
|
+
viewBox: `0 0 ${s} ${s}`,
|
|
51
|
+
className: "rotate-135",
|
|
52
|
+
"aria-hidden": !0,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
|
+
"circle",
|
|
56
|
+
{
|
|
57
|
+
cx: l,
|
|
58
|
+
cy: c,
|
|
59
|
+
r: n,
|
|
60
|
+
fill: "none",
|
|
61
|
+
stroke: "currentColor",
|
|
62
|
+
strokeLinecap: "round",
|
|
63
|
+
className: "stroke-muted-subtle",
|
|
64
|
+
style: {
|
|
65
|
+
strokeWidth: `${i}px`,
|
|
66
|
+
strokeDasharray: b,
|
|
67
|
+
strokeDashoffset: 0
|
|
70
68
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
69
|
+
}
|
|
70
|
+
),
|
|
71
|
+
/* @__PURE__ */ e(
|
|
72
|
+
"circle",
|
|
73
|
+
{
|
|
74
|
+
cx: l,
|
|
75
|
+
cy: c,
|
|
76
|
+
r: n,
|
|
77
|
+
fill: "none",
|
|
78
|
+
stroke: "currentColor",
|
|
79
|
+
strokeLinecap: "round",
|
|
80
|
+
className: d(
|
|
81
|
+
f ? "stroke-muted-subtle-hover" : "stroke-active",
|
|
82
|
+
"transition-[stroke-dashoffset,stroke] duration-300 ease-in-out"
|
|
83
|
+
),
|
|
84
|
+
style: {
|
|
85
|
+
strokeWidth: `${i}px`,
|
|
86
|
+
strokeDasharray: x,
|
|
87
|
+
strokeDashoffset: y
|
|
90
88
|
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
] })
|
|
102
|
-
]
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ e("span", { className: "absolute inset-0 m-4 flex items-center justify-center text-base", children: o ? /* @__PURE__ */ e("span", { className: "body-2-semi-bold", children: o }) : /* @__PURE__ */ a("span", { children: [
|
|
95
|
+
/* @__PURE__ */ e("span", { className: "body-1-semi-bold", children: Math.min(Math.max(t, 0), r) }),
|
|
96
|
+
/* @__PURE__ */ a("span", { className: "body-2-semi-bold text-muted", children: [
|
|
97
|
+
"/",
|
|
98
|
+
r
|
|
99
|
+
] })
|
|
100
|
+
] }) })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
D.displayName = "Stepper";
|
|
108
106
|
export {
|
|
109
|
-
|
|
107
|
+
D as Stepper
|
|
110
108
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
2
|
export type StepperProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Current step number (1-based). Use 0 or negative to show minimal dot (before starting).
|
|
@@ -17,5 +17,5 @@ export type StepperProps = {
|
|
|
17
17
|
* Optional custom label. Defaults to "{currentStep}/{totalSteps}".
|
|
18
18
|
*/
|
|
19
19
|
label?: string;
|
|
20
|
-
} & Omit<
|
|
20
|
+
} & Omit<ComponentPropsWithRef<'div'>, 'children'>;
|
|
21
21
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Stepper/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Stepper/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAE9C,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tag/Tag.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA+BnC,eAAO,MAAM,GAAG;0FASb,QAAQ;;
|
|
1
|
+
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tag/Tag.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AA+BnC,eAAO,MAAM,GAAG;0FASb,QAAQ;;CAuBV,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
2
|
import { TooltipContentProps, TooltipProps, TooltipTriggerProps } from './types';
|
|
3
3
|
import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
4
4
|
/**
|
|
@@ -21,7 +21,7 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
|
|
|
21
21
|
* );
|
|
22
22
|
* }
|
|
23
23
|
*/
|
|
24
|
-
export declare const TooltipProvider: ({ delayDuration, ...props }:
|
|
24
|
+
export declare const TooltipProvider: ({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>) => import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
/**
|
|
26
26
|
* The root component that manages the tooltip's open/closed state and contains the trigger and content.
|
|
27
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,
|
|
1
|
+
{"version":3,"file":"Tooltip.d.ts","sourceRoot":"","sources":["../../../../src/lib/Components/Tooltip/Tooltip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAqBjB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,eAAe,GAAI,6BAO7B,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,4CAQlD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,OAAO,GAAI,6BAAmC,YAAY,4CAMtE,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,GAAI,cAAc,mBAAmB,4CAE/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,cAAc,GAAI,qDAM5B,mBAAmB,4CAerB,CAAC"}
|
|
@@ -28,10 +28,10 @@ const N = b("gap-8 body-2-semi-bold", {
|
|
|
28
28
|
size: "md",
|
|
29
29
|
iconType: "none"
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
31
|
+
}), v = ({
|
|
32
32
|
ref: i,
|
|
33
|
-
className:
|
|
34
|
-
appearance:
|
|
33
|
+
className: p,
|
|
34
|
+
appearance: r = "gray",
|
|
35
35
|
size: l = "md",
|
|
36
36
|
disabled: m = !1,
|
|
37
37
|
asChild: n = !1,
|
|
@@ -50,12 +50,12 @@ const N = b("gap-8 body-2-semi-bold", {
|
|
|
50
50
|
ref: i,
|
|
51
51
|
className: g(
|
|
52
52
|
x({
|
|
53
|
-
appearance:
|
|
53
|
+
appearance: r,
|
|
54
54
|
disabled: a,
|
|
55
55
|
loading: !1
|
|
56
56
|
}),
|
|
57
57
|
N({ size: l, iconType: y }),
|
|
58
|
-
|
|
58
|
+
p
|
|
59
59
|
),
|
|
60
60
|
"data-disabled": a || void 0,
|
|
61
61
|
disabled: a,
|
|
@@ -64,13 +64,13 @@ const N = b("gap-8 body-2-semi-bold", {
|
|
|
64
64
|
s && /* @__PURE__ */ e("span", { className: "shrink-0", children: s }),
|
|
65
65
|
/* @__PURE__ */ t("span", { className: "flex items-center gap-2", children: [
|
|
66
66
|
n ? /* @__PURE__ */ e(T, { children: o }) : /* @__PURE__ */ e("span", { className: "line-clamp-1 text-left", children: o }),
|
|
67
|
-
/* @__PURE__ */ e(z, { size: 20
|
|
67
|
+
/* @__PURE__ */ e(z, { size: 20 })
|
|
68
68
|
] })
|
|
69
69
|
]
|
|
70
70
|
}
|
|
71
71
|
);
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
v.displayName = "TriggerButton";
|
|
74
74
|
export {
|
|
75
|
-
|
|
75
|
+
v as TriggerButton
|
|
76
76
|
};
|