@refinn/core-ui 0.1.3 → 0.1.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/README.md +21 -0
- package/dist/index.cjs +2636 -0
- package/dist/index.d.mts +154 -5
- package/dist/index.d.ts +154 -5
- package/dist/index.js +1296 -240
- package/dist/theme.css +446 -526
- package/package.json +7 -7
- package/dist/index.mjs +0 -1540
package/dist/index.js
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
"use
|
|
2
|
-
var __create = Object.create;
|
|
1
|
+
"use client";
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __defProps = Object.defineProperties;
|
|
5
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
4
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
5
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
10
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
7
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
8
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -34,51 +30,17 @@ var __objRest = (source, exclude) => {
|
|
|
34
30
|
}
|
|
35
31
|
return target;
|
|
36
32
|
};
|
|
37
|
-
var __export = (target, all) => {
|
|
38
|
-
for (var name in all)
|
|
39
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
-
};
|
|
41
|
-
var __copyProps = (to, from, except, desc) => {
|
|
42
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
-
for (let key of __getOwnPropNames(from))
|
|
44
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
-
}
|
|
47
|
-
return to;
|
|
48
|
-
};
|
|
49
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
-
mod
|
|
56
|
-
));
|
|
57
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
-
|
|
59
|
-
// src/components/index.ts
|
|
60
|
-
var index_exports = {};
|
|
61
|
-
__export(index_exports, {
|
|
62
|
-
Accordion: () => Accordion,
|
|
63
|
-
AlertBanner: () => AlertBanner,
|
|
64
|
-
Avatar: () => Avatar,
|
|
65
|
-
Badge: () => Badge,
|
|
66
|
-
BottomSheet: () => BottomSheet,
|
|
67
|
-
Button: () => Button,
|
|
68
|
-
Checkbox: () => Checkbox,
|
|
69
|
-
Dialog: () => Dialog,
|
|
70
|
-
Icon: () => Icon,
|
|
71
|
-
Radio: () => Radio,
|
|
72
|
-
Slider: () => Slider,
|
|
73
|
-
Toast: () => Toast
|
|
74
|
-
});
|
|
75
|
-
module.exports = __toCommonJS(index_exports);
|
|
76
33
|
|
|
77
34
|
// src/components/Accordion/Accordion.tsx
|
|
78
|
-
|
|
79
|
-
|
|
35
|
+
import {
|
|
36
|
+
forwardRef,
|
|
37
|
+
useCallback,
|
|
38
|
+
useId,
|
|
39
|
+
useState
|
|
40
|
+
} from "react";
|
|
41
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
80
42
|
function ChevronIcon({ className }) {
|
|
81
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ jsx("svg", { className, viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
82
44
|
"path",
|
|
83
45
|
{
|
|
84
46
|
d: "M5 7.5L10 12.5L15 7.5",
|
|
@@ -97,8 +59,8 @@ function AccordionItem({ item, isOpen, onToggle, generatedId }) {
|
|
|
97
59
|
isOpen ? "rotate-180" : "",
|
|
98
60
|
item.disabled ? "text-static-icon-disabled" : "text-static-icon-primary"
|
|
99
61
|
].join(" ");
|
|
100
|
-
return /* @__PURE__ */
|
|
101
|
-
/* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ jsxs("div", { children: [
|
|
63
|
+
/* @__PURE__ */ jsxs(
|
|
102
64
|
"button",
|
|
103
65
|
{
|
|
104
66
|
id: triggerId,
|
|
@@ -109,8 +71,8 @@ function AccordionItem({ item, isOpen, onToggle, generatedId }) {
|
|
|
109
71
|
className: "flex flex-row items-center justify-between w-full pl-16 pr-8 py-8 lg:pl-24 lg:py-16 lg:pr-12",
|
|
110
72
|
onClick: onToggle,
|
|
111
73
|
children: [
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ jsxs("span", { className: `flex flex-col`, children: [
|
|
75
|
+
/* @__PURE__ */ jsx(
|
|
114
76
|
"span",
|
|
115
77
|
{
|
|
116
78
|
className: `
|
|
@@ -122,16 +84,16 @@ function AccordionItem({ item, isOpen, onToggle, generatedId }) {
|
|
|
122
84
|
children: item.title
|
|
123
85
|
}
|
|
124
86
|
),
|
|
125
|
-
item.subtitle && /* @__PURE__ */
|
|
87
|
+
item.subtitle && /* @__PURE__ */ jsx("span", { className: [
|
|
126
88
|
"text-body-small",
|
|
127
89
|
item.disabled ? "text-accordion-text-disabled" : "text-accordion-text-secondary"
|
|
128
90
|
].join(" "), children: item.subtitle })
|
|
129
91
|
] }),
|
|
130
|
-
/* @__PURE__ */
|
|
92
|
+
/* @__PURE__ */ jsx(ChevronIcon, { className: iconClasses })
|
|
131
93
|
]
|
|
132
94
|
}
|
|
133
95
|
),
|
|
134
|
-
/* @__PURE__ */
|
|
96
|
+
/* @__PURE__ */ jsx(
|
|
135
97
|
"div",
|
|
136
98
|
{
|
|
137
99
|
id: panelId,
|
|
@@ -139,12 +101,12 @@ function AccordionItem({ item, isOpen, onToggle, generatedId }) {
|
|
|
139
101
|
"aria-labelledby": triggerId,
|
|
140
102
|
className: "overflow-hidden transition-[grid-template-rows] duration-200",
|
|
141
103
|
style: { display: "grid", gridTemplateRows: isOpen ? "1fr" : "0fr" },
|
|
142
|
-
children: /* @__PURE__ */
|
|
104
|
+
children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: `text-accordion-text-secondary text-body-small pt-8 pb-16 px-16 lg:text-body-regular lg:pl-24 lg:pr-64 lg:pb-24 lg:pt-12`, children: item.content }) })
|
|
143
105
|
}
|
|
144
106
|
)
|
|
145
107
|
] });
|
|
146
108
|
}
|
|
147
|
-
var Accordion =
|
|
109
|
+
var Accordion = forwardRef(
|
|
148
110
|
(_a, ref) => {
|
|
149
111
|
var _b = _a, {
|
|
150
112
|
items,
|
|
@@ -157,7 +119,7 @@ var Accordion = (0, import_react.forwardRef)(
|
|
|
157
119
|
"loading",
|
|
158
120
|
"className"
|
|
159
121
|
]);
|
|
160
|
-
const baseId =
|
|
122
|
+
const baseId = useId();
|
|
161
123
|
const defaultOpen = () => {
|
|
162
124
|
const set = /* @__PURE__ */ new Set();
|
|
163
125
|
items.forEach((item, i) => {
|
|
@@ -166,8 +128,8 @@ var Accordion = (0, import_react.forwardRef)(
|
|
|
166
128
|
});
|
|
167
129
|
return set;
|
|
168
130
|
};
|
|
169
|
-
const [openItems, setOpenItems] =
|
|
170
|
-
const handleToggle =
|
|
131
|
+
const [openItems, setOpenItems] = useState(defaultOpen);
|
|
132
|
+
const handleToggle = useCallback(
|
|
171
133
|
(itemId) => {
|
|
172
134
|
setOpenItems((prev) => {
|
|
173
135
|
const next = new Set(multiple ? prev : []);
|
|
@@ -187,15 +149,15 @@ var Accordion = (0, import_react.forwardRef)(
|
|
|
187
149
|
className
|
|
188
150
|
].filter(Boolean).join(" ");
|
|
189
151
|
if (loading) {
|
|
190
|
-
return /* @__PURE__ */
|
|
191
|
-
/* @__PURE__ */
|
|
192
|
-
/* @__PURE__ */
|
|
152
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className: containerClasses }, rest), { children: /* @__PURE__ */ jsxs("div", { className: `flex items-center justify-between gap-8 pl-16 pr-8 py-8`, children: [
|
|
153
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col gap-4", children: /* @__PURE__ */ jsx("div", { className: "h-16 w-3/4 rounded bg-gray-200 animate-pulse" }) }),
|
|
154
|
+
/* @__PURE__ */ jsx(ChevronIcon, { className: `shrink-0 text-accordion-icon w-20 h-20 my-8 mx-12` })
|
|
193
155
|
] }) }));
|
|
194
156
|
}
|
|
195
|
-
return /* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ jsx("div", __spreadProps(__spreadValues({ ref, className: containerClasses }, rest), { children: items.map((item, i) => {
|
|
196
158
|
var _a2;
|
|
197
159
|
const itemId = (_a2 = item.id) != null ? _a2 : String(i);
|
|
198
|
-
return /* @__PURE__ */
|
|
160
|
+
return /* @__PURE__ */ jsx(
|
|
199
161
|
AccordionItem,
|
|
200
162
|
{
|
|
201
163
|
item,
|
|
@@ -211,8 +173,8 @@ var Accordion = (0, import_react.forwardRef)(
|
|
|
211
173
|
Accordion.displayName = "Accordion";
|
|
212
174
|
|
|
213
175
|
// src/components/AlertBanner/AlertBanner.tsx
|
|
214
|
-
|
|
215
|
-
|
|
176
|
+
import { forwardRef as forwardRef2 } from "react";
|
|
177
|
+
import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
216
178
|
var pageClasses = {
|
|
217
179
|
info: "bg-alert-page-info-bg text-alert-text-primary-inverse",
|
|
218
180
|
success: "bg-alert-page-success-bg text-alert-text-primary-inverse",
|
|
@@ -249,25 +211,25 @@ var inlineIconClasses = {
|
|
|
249
211
|
none: "text-alert-inline-common-icon"
|
|
250
212
|
};
|
|
251
213
|
function InfoIcon({ className }) {
|
|
252
|
-
return /* @__PURE__ */ (
|
|
214
|
+
return /* @__PURE__ */ jsx2("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM10 6h.01M9 10h1v4h1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
253
215
|
}
|
|
254
216
|
function SuccessIcon({ className }) {
|
|
255
|
-
return /* @__PURE__ */ (
|
|
256
|
-
/* @__PURE__ */ (
|
|
257
|
-
/* @__PURE__ */ (
|
|
217
|
+
return /* @__PURE__ */ jsxs2("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
218
|
+
/* @__PURE__ */ jsx2("path", { d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
219
|
+
/* @__PURE__ */ jsx2("path", { d: "m7 10 2 2 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
258
220
|
] });
|
|
259
221
|
}
|
|
260
222
|
function WarningIcon({ className }) {
|
|
261
|
-
return /* @__PURE__ */ (
|
|
223
|
+
return /* @__PURE__ */ jsx2("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M8.57 3.22 1.53 15.5a1.67 1.67 0 0 0 1.43 2.5h14.08a1.67 1.67 0 0 0 1.43-2.5L11.43 3.22a1.67 1.67 0 0 0-2.86 0ZM10 7.5v3.33M10 14.17h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
262
224
|
}
|
|
263
225
|
function DangerIcon({ className }) {
|
|
264
|
-
return /* @__PURE__ */ (
|
|
226
|
+
return /* @__PURE__ */ jsx2("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM12.5 7.5l-5 5M7.5 7.5l5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
265
227
|
}
|
|
266
228
|
function NoneIcon({ className }) {
|
|
267
|
-
return /* @__PURE__ */ (
|
|
229
|
+
return /* @__PURE__ */ jsx2(Fragment, {});
|
|
268
230
|
}
|
|
269
231
|
function CloseIcon({ className }) {
|
|
270
|
-
return /* @__PURE__ */ (
|
|
232
|
+
return /* @__PURE__ */ jsx2("svg", { className, width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx2("path", { d: "M12 4 4 12M4 4l8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
271
233
|
}
|
|
272
234
|
var defaultIcons = {
|
|
273
235
|
info: InfoIcon,
|
|
@@ -276,7 +238,7 @@ var defaultIcons = {
|
|
|
276
238
|
danger: DangerIcon,
|
|
277
239
|
none: NoneIcon
|
|
278
240
|
};
|
|
279
|
-
var AlertBanner = (
|
|
241
|
+
var AlertBanner = forwardRef2(
|
|
280
242
|
(_a, ref) => {
|
|
281
243
|
var _b = _a, {
|
|
282
244
|
variant = "info",
|
|
@@ -313,25 +275,25 @@ var AlertBanner = (0, import_react2.forwardRef)(
|
|
|
313
275
|
variantClass,
|
|
314
276
|
className
|
|
315
277
|
].filter(Boolean).join(" ");
|
|
316
|
-
return /* @__PURE__ */ (
|
|
317
|
-
/* @__PURE__ */ (
|
|
318
|
-
icon != null ? icon : /* @__PURE__ */ (
|
|
319
|
-
/* @__PURE__ */ (
|
|
320
|
-
title && /* @__PURE__ */ (
|
|
321
|
-
description && /* @__PURE__ */ (
|
|
278
|
+
return /* @__PURE__ */ jsxs2("div", __spreadProps(__spreadValues({ ref, role: "alert", className: classes }, rest), { children: [
|
|
279
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-8", children: [
|
|
280
|
+
icon != null ? icon : /* @__PURE__ */ jsx2(DefaultIcon, { className: `h-20 w-20 ${iconColorClass}` }),
|
|
281
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex-1 min-w-0 flex flex-col", children: [
|
|
282
|
+
title && /* @__PURE__ */ jsx2("p", { className: "text-label-medium", children: title }),
|
|
283
|
+
description && /* @__PURE__ */ jsx2("p", { className: `text-body-small ${descColorClass} ${title ? "mt-2" : ""} ${children ? "mb-8" : ""}`, children: description }),
|
|
322
284
|
children
|
|
323
285
|
] })
|
|
324
286
|
] }),
|
|
325
|
-
/* @__PURE__ */ (
|
|
326
|
-
(action == null ? void 0 : action[0]) && /* @__PURE__ */ (
|
|
327
|
-
onClose && /* @__PURE__ */ (
|
|
287
|
+
/* @__PURE__ */ jsxs2("div", { className: `flex ${children ? "items-start" : "self-center"} gap-24`, children: [
|
|
288
|
+
(action == null ? void 0 : action[0]) && /* @__PURE__ */ jsx2("a", { className: `${actionClass} underline text-sm font-medium`, href: action[1], children: action[0] }),
|
|
289
|
+
onClose && /* @__PURE__ */ jsx2(
|
|
328
290
|
"button",
|
|
329
291
|
{
|
|
330
292
|
type: "button",
|
|
331
293
|
onClick: onClose,
|
|
332
294
|
className: `shrink-0 p-2 rounded transition-colors ${closeColorClass}`,
|
|
333
295
|
"aria-label": "Close",
|
|
334
|
-
children: /* @__PURE__ */ (
|
|
296
|
+
children: /* @__PURE__ */ jsx2(CloseIcon, { className: "h-16 w-16" })
|
|
335
297
|
}
|
|
336
298
|
)
|
|
337
299
|
] })
|
|
@@ -341,8 +303,8 @@ var AlertBanner = (0, import_react2.forwardRef)(
|
|
|
341
303
|
AlertBanner.displayName = "AlertBanner";
|
|
342
304
|
|
|
343
305
|
// src/components/Avatar/Avatar.tsx
|
|
344
|
-
|
|
345
|
-
|
|
306
|
+
import { forwardRef as forwardRef3 } from "react";
|
|
307
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
346
308
|
var sizeClasses = {
|
|
347
309
|
sm: { container: "h-24 w-24", text: "text-sm", status: "h-6 w-6", statusRing: "ring-1" },
|
|
348
310
|
md: { container: "h-32 w-32", text: "text-base", status: "h-8 w-8", statusRing: "ring-[1.5px]" },
|
|
@@ -361,9 +323,9 @@ function getInitials(name) {
|
|
|
361
323
|
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
362
324
|
}
|
|
363
325
|
function PersonIcon({ className }) {
|
|
364
|
-
return /* @__PURE__ */ (
|
|
326
|
+
return /* @__PURE__ */ jsx3("svg", { className, viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true", children: /* @__PURE__ */ jsx3("path", { d: "M10 10a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5ZM3.75 17.5a6.25 6.25 0 0 1 12.5 0" }) });
|
|
365
327
|
}
|
|
366
|
-
var Avatar = (
|
|
328
|
+
var Avatar = forwardRef3(
|
|
367
329
|
(_a, ref) => {
|
|
368
330
|
var _b = _a, {
|
|
369
331
|
size = "md",
|
|
@@ -393,7 +355,7 @@ var Avatar = (0, import_react3.forwardRef)(
|
|
|
393
355
|
].filter(Boolean).join(" ");
|
|
394
356
|
let content;
|
|
395
357
|
if (src) {
|
|
396
|
-
content = /* @__PURE__ */ (
|
|
358
|
+
content = /* @__PURE__ */ jsx3(
|
|
397
359
|
"img",
|
|
398
360
|
{
|
|
399
361
|
src,
|
|
@@ -404,13 +366,13 @@ var Avatar = (0, import_react3.forwardRef)(
|
|
|
404
366
|
} else if (icon) {
|
|
405
367
|
content = icon;
|
|
406
368
|
} else if (name) {
|
|
407
|
-
content = /* @__PURE__ */ (
|
|
369
|
+
content = /* @__PURE__ */ jsx3("span", { className: sz.text, children: getInitials(name) });
|
|
408
370
|
} else {
|
|
409
|
-
content = /* @__PURE__ */ (
|
|
371
|
+
content = /* @__PURE__ */ jsx3(PersonIcon, { className: `${sz.text} h-[60%] w-[60%]` });
|
|
410
372
|
}
|
|
411
|
-
return /* @__PURE__ */ (
|
|
373
|
+
return /* @__PURE__ */ jsxs3("div", __spreadProps(__spreadValues({ ref, className: containerClasses }, rest), { children: [
|
|
412
374
|
content,
|
|
413
|
-
status && /* @__PURE__ */ (
|
|
375
|
+
status && /* @__PURE__ */ jsx3(
|
|
414
376
|
"span",
|
|
415
377
|
{
|
|
416
378
|
className: [
|
|
@@ -428,8 +390,8 @@ var Avatar = (0, import_react3.forwardRef)(
|
|
|
428
390
|
Avatar.displayName = "Avatar";
|
|
429
391
|
|
|
430
392
|
// src/components/Badge/Badge.tsx
|
|
431
|
-
|
|
432
|
-
|
|
393
|
+
import { forwardRef as forwardRef4 } from "react";
|
|
394
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
433
395
|
var sizeClasses2 = {
|
|
434
396
|
sm: "h-20 px-8 py-2 text-label-small gap-4",
|
|
435
397
|
md: "h-28 px-10 py-4 text-label-medium gap-4",
|
|
@@ -469,7 +431,7 @@ var styleMap = {
|
|
|
469
431
|
subtle: subtleClasses,
|
|
470
432
|
bold: boldClasses
|
|
471
433
|
};
|
|
472
|
-
var Badge = (
|
|
434
|
+
var Badge = forwardRef4(
|
|
473
435
|
(_a, ref) => {
|
|
474
436
|
var _b = _a, {
|
|
475
437
|
status = "common",
|
|
@@ -496,28 +458,124 @@ var Badge = (0, import_react4.forwardRef)(
|
|
|
496
458
|
styleMap[badgeStyle][status],
|
|
497
459
|
className
|
|
498
460
|
].filter(Boolean).join(" ");
|
|
499
|
-
return /* @__PURE__ */ (
|
|
500
|
-
icon && /* @__PURE__ */ (
|
|
461
|
+
return /* @__PURE__ */ jsxs4("span", __spreadProps(__spreadValues({ ref, className: classes }, rest), { children: [
|
|
462
|
+
icon && /* @__PURE__ */ jsx4("span", { className: `shrink-0 ${iconSizeClasses[size]}`, children: icon }),
|
|
501
463
|
children
|
|
502
464
|
] }));
|
|
503
465
|
}
|
|
504
466
|
);
|
|
505
467
|
Badge.displayName = "Badge";
|
|
506
468
|
|
|
469
|
+
// src/components/Branding/Branding.tsx
|
|
470
|
+
import {
|
|
471
|
+
forwardRef as forwardRef5
|
|
472
|
+
} from "react";
|
|
473
|
+
import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
474
|
+
var Branding = forwardRef5(
|
|
475
|
+
(_a, ref) => {
|
|
476
|
+
var _b = _a, { type = "brand", className = "" } = _b, rest = __objRest(_b, ["type", "className"]);
|
|
477
|
+
return /* @__PURE__ */ jsx5(
|
|
478
|
+
"div",
|
|
479
|
+
__spreadProps(__spreadValues({
|
|
480
|
+
ref,
|
|
481
|
+
className: `${type === "black" ? "text-gray-900" : type === "white" ? "text-white-100" : "text-blue-600"} ${className}`
|
|
482
|
+
}, rest), {
|
|
483
|
+
children: /* @__PURE__ */ jsxs5(
|
|
484
|
+
"svg",
|
|
485
|
+
{
|
|
486
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
487
|
+
width: "89",
|
|
488
|
+
height: "20",
|
|
489
|
+
viewBox: "0 0 89 20",
|
|
490
|
+
fill: "currentColor",
|
|
491
|
+
children: [
|
|
492
|
+
/* @__PURE__ */ jsxs5("g", { "clip-path": "url(#clip0_828_998)", children: [
|
|
493
|
+
/* @__PURE__ */ jsx5(
|
|
494
|
+
"path",
|
|
495
|
+
{
|
|
496
|
+
"fill-rule": "evenodd",
|
|
497
|
+
"clip-rule": "evenodd",
|
|
498
|
+
d: "M16.7368 16.8241H16.7425L12.5943 11.7367C14.2529 11.1183 16.1138 9.64704 16.1138 6.12635C16.1138 -0.239164 10.023 0.0275032 10.0092 0.0275032H1.92874C1.91035 0.0275032 1.89311 0.0275032 1.87587 0.0275032C1.37851 0.0275032 0.901524 0.225077 0.549839 0.576762C0.198155 0.928447 0.000580351 1.40543 0.000580351 1.90279C0.000580351 2.40015 0.198155 2.87713 0.549839 3.22882C0.901524 3.5805 1.37851 3.77808 1.87587 3.77808C1.89426 3.77808 1.9115 3.77808 1.92874 3.77808H10.1149C10.7376 3.79195 11.3292 4.0526 11.7597 4.50268C12.1902 4.95277 12.4242 5.55543 12.4103 6.17808C12.3965 6.80073 12.1358 7.39236 11.6857 7.82284C11.2357 8.25331 10.633 8.48735 10.0103 8.47348H1.88621H1.87472C1.62814 8.47348 1.38398 8.52212 1.15623 8.61662C0.928482 8.71112 0.721611 8.84963 0.547468 9.0242C0.373325 9.19877 0.23533 9.40598 0.141388 9.63396C0.0474455 9.86194 -0.00059909 10.1062 5.6384e-06 10.3528C5.6384e-06 10.3528 5.6384e-06 10.3631 5.6384e-06 10.3677V17.9746C0.0121171 18.4636 0.214886 18.9286 0.565035 19.2701C0.915184 19.6117 1.38498 19.8029 1.87414 19.8029C2.36331 19.8029 2.8331 19.6117 3.18325 19.2701C3.5334 18.9286 3.73617 18.4636 3.74828 17.9746V12.1631H8.14943L13.8149 19.1643L13.8218 19.1585C14.1314 19.5449 14.5818 19.7925 15.0739 19.8468C15.566 19.9012 16.0596 19.7578 16.446 19.4482C16.8324 19.1386 17.08 18.6882 17.1343 18.1961C17.1886 17.704 17.0452 17.2104 16.7356 16.8241H16.7368Z",
|
|
499
|
+
fill: "currentColor"
|
|
500
|
+
}
|
|
501
|
+
),
|
|
502
|
+
/* @__PURE__ */ jsx5(
|
|
503
|
+
"path",
|
|
504
|
+
{
|
|
505
|
+
d: "M30.3851 15.1575C31.5816 13.5 34.0989 15.2805 32.9023 16.9379C31.9828 18.1966 30.3241 19.854 27.2241 19.823C23.6241 19.823 20.5575 16.7195 20.4736 12.6379C20.4671 12.5169 20.4671 12.3957 20.4736 12.2747C20.5621 8.18966 23.6241 5.08966 27.1931 5.08966H27.2241C30.815 5.08966 33.977 8.28162 33.977 12.4563C33.979 12.6584 33.9407 12.8588 33.8643 13.0459C33.7879 13.233 33.6749 13.4029 33.532 13.5458C33.3891 13.6887 33.2192 13.8017 33.0321 13.8781C32.845 13.9545 32.6446 13.9928 32.4425 13.9908H23.7851C24.3046 15.5667 25.6023 16.7494 27.223 16.7494H27.254C28.9736 16.7816 29.8943 15.8621 30.3851 15.1575ZM23.7851 10.9195H30.9115C30.9115 10.1828 29.346 8.16093 27.2333 8.16093C25.6023 8.16093 24.3046 9.34598 23.7851 10.9195Z",
|
|
506
|
+
fill: "currentColor"
|
|
507
|
+
}
|
|
508
|
+
),
|
|
509
|
+
/* @__PURE__ */ jsx5(
|
|
510
|
+
"path",
|
|
511
|
+
{
|
|
512
|
+
"fill-rule": "evenodd",
|
|
513
|
+
"clip-rule": "evenodd",
|
|
514
|
+
d: "M44.1379 5.09414H41.4805V4.56196C41.4808 4.16209 41.6398 3.77869 41.9225 3.49595C42.2052 3.2132 42.5886 3.05422 42.9885 3.05391H43.9977C44.398 3.05391 44.7818 2.89491 45.0649 2.61188C45.3479 2.32885 45.5069 1.94498 45.5069 1.54472C45.5069 1.14445 45.3479 0.760585 45.0649 0.477556C44.7818 0.194527 44.398 0.0355225 43.9977 0.0355225H41.9713V0.0435684C41.0274 0.0827094 40.1351 0.485118 39.4809 1.1667C38.8268 1.84829 38.4613 2.75632 38.4609 3.70104V5.08955H37.7402C37.3897 5.08955 37.0534 5.22881 36.8056 5.4767C36.5577 5.7246 36.4184 6.06081 36.4184 6.41138C36.4184 6.76196 36.5577 7.09817 36.8056 7.34607C37.0534 7.59396 37.3897 7.73322 37.7402 7.73322H38.4609V18.4229H38.4713C38.4925 18.806 38.6597 19.1665 38.9384 19.4303C39.2172 19.694 39.5864 19.841 39.9701 19.841C40.3539 19.841 40.7231 19.694 41.0018 19.4303C41.2806 19.1665 41.4477 18.806 41.469 18.4229H41.4793V7.73322H44.1379C44.4885 7.73322 44.8247 7.59396 45.0726 7.34607C45.3205 7.09817 45.4598 6.76196 45.4598 6.41138C45.4598 6.06081 45.3205 5.7246 45.0726 5.4767C44.8247 5.22881 44.4885 5.08955 44.1379 5.08955V5.09414Z",
|
|
515
|
+
fill: "currentColor"
|
|
516
|
+
}
|
|
517
|
+
),
|
|
518
|
+
/* @__PURE__ */ jsx5(
|
|
519
|
+
"path",
|
|
520
|
+
{
|
|
521
|
+
"fill-rule": "evenodd",
|
|
522
|
+
"clip-rule": "evenodd",
|
|
523
|
+
d: "M72.2724 10.154C72.2414 7.48161 70.0678 5.04368 67.3885 5.04368C66.4874 5.04385 65.6039 5.29338 64.8358 5.76464C64.0678 6.2359 63.4451 6.91052 63.0368 7.7138C63.0368 7.7138 63.0368 6.56437 63.0368 6.53334C63.0368 6.13307 62.8778 5.7492 62.5947 5.46617C62.3117 5.18314 61.9278 5.02414 61.5276 5.02414C61.1273 5.02414 60.7434 5.18314 60.4604 5.46617C60.1774 5.7492 60.0184 6.13307 60.0184 6.53334V18.4356H60.0287C60.0499 18.8188 60.2171 19.1793 60.4959 19.443C60.7746 19.7068 61.1438 19.8537 61.5276 19.8537C61.9113 19.8537 62.2805 19.7068 62.5593 19.443C62.838 19.1793 63.0052 18.8188 63.0264 18.4356H63.0368V11.1805L63.0483 11.1989C63.0483 9.47472 64.4414 7.80575 66.1598 7.80575C67.7758 7.80575 69.1046 9.32069 69.2563 10.8977V18.4368H69.2666C69.2879 18.82 69.455 19.1804 69.7338 19.4442C70.0126 19.7079 70.3817 19.8549 70.7655 19.8549C71.1493 19.8549 71.5184 19.7079 71.7972 19.4442C72.076 19.1804 72.2431 18.82 72.2644 18.4368H72.2747V10.154H72.2724Z",
|
|
524
|
+
fill: "currentColor"
|
|
525
|
+
}
|
|
526
|
+
),
|
|
527
|
+
/* @__PURE__ */ jsx5(
|
|
528
|
+
"path",
|
|
529
|
+
{
|
|
530
|
+
"fill-rule": "evenodd",
|
|
531
|
+
"clip-rule": "evenodd",
|
|
532
|
+
d: "M55.4322 2.2V1.96897H55.4126C55.2287 0.904602 53.7586 0.0758667 51.9724 0.0758667C50.1862 0.0758667 48.7161 0.905751 48.5322 1.96897H48.5126V4.4046H48.5241C48.6391 5.51035 50.1333 6.38621 51.9724 6.38621C53.8115 6.38621 55.3057 5.51035 55.4207 4.4046H55.431V4.27242L55.4322 2.2ZM54.1678 4.40575C54.1678 4.80115 53.1851 5.12184 51.9724 5.12184C50.7598 5.12184 49.777 4.80115 49.777 4.40575V3.53564C49.777 3.93104 50.7598 4.25173 51.9724 4.25173C53.1851 4.25173 54.1678 3.93104 54.1678 3.53564V4.40575ZM51.9724 3.09426C50.7598 3.09426 49.777 2.69196 49.777 2.19541C49.777 1.69885 50.7598 1.29541 51.9724 1.29541C53.1851 1.29541 54.1678 1.69771 54.1678 2.19541C54.1678 2.69311 53.1839 3.09426 51.9724 3.09426Z",
|
|
533
|
+
fill: "currentColor"
|
|
534
|
+
}
|
|
535
|
+
),
|
|
536
|
+
/* @__PURE__ */ jsx5(
|
|
537
|
+
"path",
|
|
538
|
+
{
|
|
539
|
+
"fill-rule": "evenodd",
|
|
540
|
+
"clip-rule": "evenodd",
|
|
541
|
+
d: "M55.4321 17.708V9.16092V9.08046C55.3689 7.94483 53.8482 7.03448 51.9781 7.03448C50.108 7.03448 48.5804 7.94598 48.5172 9.08046H48.5115V17.7012C48.5115 17.7012 48.5115 17.7115 48.5115 17.7161C48.5115 18.8862 50.0609 19.8356 51.9724 19.8356C53.8839 19.8356 55.4333 18.8874 55.4333 17.7161C55.4333 17.7161 55.4333 17.7058 55.4333 17.7012L55.4321 17.708ZM54.1678 17.8954C54.1678 18.2908 53.185 18.6115 51.9724 18.6115C50.7597 18.6115 49.777 18.2908 49.777 17.8954V17.0264C49.777 17.4218 50.7597 17.7425 51.9724 17.7425C53.185 17.7425 54.1678 17.4218 54.1678 17.0264V17.8954ZM54.1678 15.792C54.1678 16.1874 53.185 16.508 51.9724 16.508C50.7597 16.508 49.777 16.1874 49.777 15.792V14.923C49.777 15.3184 50.7597 15.6391 51.9724 15.6391C53.185 15.6391 54.1678 15.3184 54.1678 14.923V15.792ZM54.1678 13.6885C54.1678 14.0839 53.185 14.4046 51.9724 14.4046C50.7597 14.4046 49.777 14.0839 49.777 13.6885V12.8195C49.777 13.2149 50.7597 13.5356 51.9724 13.5356C53.185 13.5356 54.1678 13.2149 54.1678 12.8195V13.6885ZM54.1678 11.5161C54.1678 11.9115 53.185 12.2322 51.9724 12.2322C50.7597 12.2322 49.777 11.9115 49.777 11.5161V10.646C49.777 11.0414 50.7597 11.3621 51.9724 11.3621C53.185 11.3621 54.1678 11.0414 54.1678 10.646V11.5161ZM51.9724 10.0678C50.7597 10.0678 49.777 9.66552 49.777 9.16897C49.777 8.67242 50.7597 8.27012 51.9724 8.27012C53.185 8.27012 54.1678 8.67242 54.1678 9.16897C54.1678 9.66552 53.1839 10.0667 51.9724 10.0667V10.0678Z",
|
|
542
|
+
fill: "currentColor"
|
|
543
|
+
}
|
|
544
|
+
),
|
|
545
|
+
/* @__PURE__ */ jsx5(
|
|
546
|
+
"path",
|
|
547
|
+
{
|
|
548
|
+
"fill-rule": "evenodd",
|
|
549
|
+
"clip-rule": "evenodd",
|
|
550
|
+
d: "M88.8885 10.154C88.8574 7.48161 86.6839 5.04368 84.0046 5.04368C83.1039 5.04427 82.2209 5.294 81.4532 5.76524C80.6856 6.23648 80.0633 6.91086 79.6552 7.71379C79.6552 7.71379 79.6552 6.56437 79.6552 6.53333C79.6552 6.13307 79.4962 5.7492 79.2131 5.46617C78.9301 5.18314 78.5462 5.02414 78.146 5.02414C77.7457 5.02414 77.3618 5.18314 77.0788 5.46617C76.7958 5.7492 76.6368 6.13307 76.6368 6.53333V18.4356H76.6471C76.6684 18.8188 76.8355 19.1793 77.1143 19.443C77.393 19.7068 77.7622 19.8537 78.146 19.8537C78.5297 19.8537 78.8989 19.7068 79.1777 19.443C79.4564 19.1793 79.6236 18.8188 79.6448 18.4356H79.6552V11.1805L79.6667 11.1989C79.6667 9.47471 81.0598 7.80575 82.7781 7.80575C84.3942 7.80575 85.723 9.32069 85.8747 10.8977V18.4368H85.885C85.9063 18.8199 86.0734 19.1804 86.3522 19.4442C86.6309 19.7079 87.0001 19.8549 87.3839 19.8549C87.7676 19.8549 88.1368 19.7079 88.4156 19.4442C88.6943 19.1804 88.8615 18.8199 88.8827 18.4368H88.8931V10.154H88.8885Z",
|
|
551
|
+
fill: "currentColor"
|
|
552
|
+
}
|
|
553
|
+
)
|
|
554
|
+
] }),
|
|
555
|
+
/* @__PURE__ */ jsx5("defs", { children: /* @__PURE__ */ jsx5("clipPath", { id: "clip0_828_998", children: /* @__PURE__ */ jsx5("rect", { width: "88.892", height: "20", fill: "currentColor" }) }) })
|
|
556
|
+
]
|
|
557
|
+
}
|
|
558
|
+
)
|
|
559
|
+
})
|
|
560
|
+
);
|
|
561
|
+
}
|
|
562
|
+
);
|
|
563
|
+
Branding.displayName = "Branding";
|
|
564
|
+
|
|
507
565
|
// src/components/Button/Button.tsx
|
|
508
|
-
|
|
566
|
+
import { forwardRef as forwardRef7 } from "react";
|
|
509
567
|
|
|
510
568
|
// src/components/Loading/Loading.tsx
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
var Loading = (
|
|
569
|
+
import { forwardRef as forwardRef6 } from "react";
|
|
570
|
+
import { jsx as jsx6, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
571
|
+
var Loading = forwardRef6(
|
|
514
572
|
(_a, ref) => {
|
|
515
573
|
var _b = _a, { size = "sm", isDark = false, className = "" } = _b, rest = __objRest(_b, ["size", "isDark", "className"]);
|
|
516
574
|
const containerClasses = [
|
|
517
575
|
isDark ? "text-white-100" : "text-blue-600",
|
|
518
576
|
className
|
|
519
577
|
].filter(Boolean).join(" ");
|
|
520
|
-
return size === "sm" && !isDark ? /* @__PURE__ */ (
|
|
578
|
+
return size === "sm" && !isDark ? /* @__PURE__ */ jsx6("div", __spreadProps(__spreadValues({ ref, className: containerClasses }, rest), { children: /* @__PURE__ */ jsxs6(
|
|
521
579
|
"svg",
|
|
522
580
|
{
|
|
523
581
|
className: "animate-spin",
|
|
@@ -527,7 +585,7 @@ var Loading = (0, import_react5.forwardRef)(
|
|
|
527
585
|
viewBox: "0 0 18 18",
|
|
528
586
|
fill: "none",
|
|
529
587
|
children: [
|
|
530
|
-
/* @__PURE__ */ (
|
|
588
|
+
/* @__PURE__ */ jsx6(
|
|
531
589
|
"path",
|
|
532
590
|
{
|
|
533
591
|
d: "M1 9C1 6.87827 1.84286 4.84344 3.34315 3.34315C4.84344 1.84285 6.87827 1 9 1C11.1217 1 13.1566 1.84286 14.6569 3.34315C16.1571 4.84344 17 6.87827 17 9C17 11.1217 16.1571 13.1566 14.6569 14.6569C13.1566 16.1571 11.1217 17 9 17C6.87827 17 4.84344 16.1571 3.34315 14.6569C1.84285 13.1566 1 11.1217 1 9L1 9Z",
|
|
@@ -535,7 +593,7 @@ var Loading = (0, import_react5.forwardRef)(
|
|
|
535
593
|
"stroke-width": "2"
|
|
536
594
|
}
|
|
537
595
|
),
|
|
538
|
-
/* @__PURE__ */ (
|
|
596
|
+
/* @__PURE__ */ jsx6(
|
|
539
597
|
"path",
|
|
540
598
|
{
|
|
541
599
|
d: "M1 9C1 7.31057 1.53484 5.6645 2.52786 4.29772C3.52089 2.93094 4.92112 1.91361 6.52787 1.39155C8.13461 0.869484 9.86539 0.869484 11.4721 1.39155C13.0789 1.91361 14.4791 2.93094 15.4721 4.29772",
|
|
@@ -545,7 +603,7 @@ var Loading = (0, import_react5.forwardRef)(
|
|
|
545
603
|
)
|
|
546
604
|
]
|
|
547
605
|
}
|
|
548
|
-
) })) : /* @__PURE__ */ (
|
|
606
|
+
) })) : /* @__PURE__ */ jsx6("div", __spreadProps(__spreadValues({ ref, className: containerClasses }, rest), { children: /* @__PURE__ */ jsx6(
|
|
549
607
|
"svg",
|
|
550
608
|
{
|
|
551
609
|
className: "animate-spin",
|
|
@@ -553,7 +611,7 @@ var Loading = (0, import_react5.forwardRef)(
|
|
|
553
611
|
height: size === "sm" ? 18 : 88,
|
|
554
612
|
viewBox: "0 0 20 20",
|
|
555
613
|
fill: "none",
|
|
556
|
-
children: /* @__PURE__ */ (
|
|
614
|
+
children: /* @__PURE__ */ jsx6(
|
|
557
615
|
"path",
|
|
558
616
|
{
|
|
559
617
|
d: "M10 2.5a7.5 7.5 0 1 0 7.5 7.5",
|
|
@@ -569,7 +627,7 @@ var Loading = (0, import_react5.forwardRef)(
|
|
|
569
627
|
Loading.displayName = "Loading";
|
|
570
628
|
|
|
571
629
|
// src/components/Button/Button.tsx
|
|
572
|
-
|
|
630
|
+
import { jsx as jsx7, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
573
631
|
var variantClasses = {
|
|
574
632
|
primary: [
|
|
575
633
|
"bg-blue-600 text-white-100",
|
|
@@ -613,7 +671,7 @@ var sizeClasses3 = {
|
|
|
613
671
|
lg: "px-24 py-12 text-label-large",
|
|
614
672
|
xl: "px-32 py-16 text-label-large"
|
|
615
673
|
};
|
|
616
|
-
var Button = (
|
|
674
|
+
var Button = forwardRef7(
|
|
617
675
|
(_a, ref) => {
|
|
618
676
|
var _b = _a, {
|
|
619
677
|
variant = "primary",
|
|
@@ -648,8 +706,8 @@ var Button = (0, import_react6.forwardRef)(
|
|
|
648
706
|
rounded ? "rounded-full" : size === "sm" ? "rounded-6" : size === "xl" ? "rounded-12" : "rounded-8",
|
|
649
707
|
className
|
|
650
708
|
].filter(Boolean).join(" ");
|
|
651
|
-
return /* @__PURE__ */ (
|
|
652
|
-
loading ? /* @__PURE__ */ (
|
|
709
|
+
return /* @__PURE__ */ jsxs7("button", __spreadProps(__spreadValues({ ref, disabled: isDisabled, className: classes }, rest), { children: [
|
|
710
|
+
loading ? /* @__PURE__ */ jsx7(Loading, { size: "sm", isDark: variant === "primary" || variant === "transparent" }) : startIcon,
|
|
653
711
|
children,
|
|
654
712
|
!loading && endIcon
|
|
655
713
|
] }));
|
|
@@ -658,10 +716,10 @@ var Button = (0, import_react6.forwardRef)(
|
|
|
658
716
|
Button.displayName = "Button";
|
|
659
717
|
|
|
660
718
|
// src/components/BottomSheet/BottomSheet.tsx
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
var BottomSheet = (
|
|
719
|
+
import React, { useEffect, useState as useState2, useCallback as useCallback2, forwardRef as forwardRef8 } from "react";
|
|
720
|
+
import { createPortal } from "react-dom";
|
|
721
|
+
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
722
|
+
var BottomSheet = forwardRef8(
|
|
665
723
|
(_a, ref) => {
|
|
666
724
|
var _b = _a, {
|
|
667
725
|
isForceOpen = false,
|
|
@@ -688,10 +746,10 @@ var BottomSheet = (0, import_react7.forwardRef)(
|
|
|
688
746
|
"modalDesc",
|
|
689
747
|
"className"
|
|
690
748
|
]);
|
|
691
|
-
const [isOpen, setIsOpen] = (
|
|
692
|
-
const [shouldRender, setShouldRender] = (
|
|
693
|
-
const [animate, setAnimate] = (
|
|
694
|
-
|
|
749
|
+
const [isOpen, setIsOpen] = useState2(false);
|
|
750
|
+
const [shouldRender, setShouldRender] = useState2(false);
|
|
751
|
+
const [animate, setAnimate] = useState2(false);
|
|
752
|
+
useEffect(() => {
|
|
695
753
|
if (isOpen) {
|
|
696
754
|
setShouldRender(true);
|
|
697
755
|
setTimeout(() => setAnimate(true), 10);
|
|
@@ -701,14 +759,14 @@ var BottomSheet = (0, import_react7.forwardRef)(
|
|
|
701
759
|
return () => clearTimeout(timer);
|
|
702
760
|
}
|
|
703
761
|
}, [isOpen]);
|
|
704
|
-
|
|
762
|
+
useEffect(() => {
|
|
705
763
|
if (isForceOpen) {
|
|
706
764
|
setIsOpen(true);
|
|
707
765
|
} else {
|
|
708
766
|
setIsOpen(false);
|
|
709
767
|
}
|
|
710
768
|
}, [isForceOpen]);
|
|
711
|
-
const handleStartClick = (
|
|
769
|
+
const handleStartClick = useCallback2(
|
|
712
770
|
(e) => {
|
|
713
771
|
var _a2, _b2;
|
|
714
772
|
(_b2 = startModalBtn == null ? void 0 : (_a2 = startModalBtn.props).onClick) == null ? void 0 : _b2.call(_a2, e);
|
|
@@ -717,7 +775,7 @@ var BottomSheet = (0, import_react7.forwardRef)(
|
|
|
717
775
|
},
|
|
718
776
|
[startModalBtn]
|
|
719
777
|
);
|
|
720
|
-
const handleStopClick = (
|
|
778
|
+
const handleStopClick = useCallback2(
|
|
721
779
|
(e) => {
|
|
722
780
|
var _a2, _b2;
|
|
723
781
|
(_b2 = stopModalBtn == null ? void 0 : (_a2 = stopModalBtn.props).onClick) == null ? void 0 : _b2.call(_a2, e);
|
|
@@ -730,19 +788,19 @@ var BottomSheet = (0, import_react7.forwardRef)(
|
|
|
730
788
|
setIsForceOpen == null ? void 0 : setIsForceOpen(false);
|
|
731
789
|
setIsOpen(false);
|
|
732
790
|
};
|
|
733
|
-
return /* @__PURE__ */ (
|
|
734
|
-
startModalBtn &&
|
|
791
|
+
return /* @__PURE__ */ jsxs8("span", { ref, style: { display: "contents" }, children: [
|
|
792
|
+
startModalBtn && React.cloneElement(startModalBtn, {
|
|
735
793
|
onClick: handleStartClick
|
|
736
794
|
}),
|
|
737
|
-
shouldRender &&
|
|
738
|
-
/* @__PURE__ */ (
|
|
795
|
+
shouldRender && createPortal(
|
|
796
|
+
/* @__PURE__ */ jsxs8(
|
|
739
797
|
"div",
|
|
740
798
|
{
|
|
741
799
|
className: `fixed inset-0 z-50 flex items-end justify-center transition-opacity duration-300 ${animate ? "opacity-100" : "opacity-0"}`,
|
|
742
800
|
"aria-modal": "true",
|
|
743
801
|
role: "dialog",
|
|
744
802
|
children: [
|
|
745
|
-
/* @__PURE__ */ (
|
|
803
|
+
/* @__PURE__ */ jsx8(
|
|
746
804
|
"div",
|
|
747
805
|
{
|
|
748
806
|
className: "absolute inset-0 bg-black/40",
|
|
@@ -750,26 +808,26 @@ var BottomSheet = (0, import_react7.forwardRef)(
|
|
|
750
808
|
"aria-label": "Close modal"
|
|
751
809
|
}
|
|
752
810
|
),
|
|
753
|
-
/* @__PURE__ */ (
|
|
811
|
+
/* @__PURE__ */ jsxs8(
|
|
754
812
|
"div",
|
|
755
813
|
{
|
|
756
814
|
className: `flex flex-col z-10 w-full rounded-t-xl bg-white pt-8 pb-16 px-16 shadow-lg transform transition-all duration-300
|
|
757
815
|
${size === "sm" ? "h-auto max-h-auto" : size === "md" ? "h-full max-h-[85vh]" : "h-full max-h-screen rounded-t-none!"}
|
|
758
816
|
${animate ? "scale-100 translate-y-0" : "scale-95 translate-y-full"}`,
|
|
759
817
|
children: [
|
|
760
|
-
/* @__PURE__ */ (
|
|
761
|
-
/* @__PURE__ */ (
|
|
762
|
-
/* @__PURE__ */ (
|
|
763
|
-
/* @__PURE__ */ (
|
|
818
|
+
/* @__PURE__ */ jsxs8("div", { className: "w-full flex flex-row relative items-center pt-8 pb-16", children: [
|
|
819
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col px-8 max-w-225", children: [
|
|
820
|
+
/* @__PURE__ */ jsx8("p", { className: "text-heading-3 text-button-sheet-text-primary", children: modalTitle }),
|
|
821
|
+
/* @__PURE__ */ jsx8("p", { className: "text-body-small text-button-sheet-text-secondary", children: modalDesc })
|
|
764
822
|
] }),
|
|
765
|
-
/* @__PURE__ */ (
|
|
823
|
+
/* @__PURE__ */ jsx8(
|
|
766
824
|
"i",
|
|
767
825
|
{
|
|
768
826
|
className: "fi fi-br-cross-small flex text-xl text-gray-600 w-44 h-44 absolute top-0 right-0 p-12",
|
|
769
827
|
onClick: () => handleCloseClick()
|
|
770
828
|
}
|
|
771
829
|
),
|
|
772
|
-
/* @__PURE__ */ (
|
|
830
|
+
/* @__PURE__ */ jsx8(
|
|
773
831
|
"div",
|
|
774
832
|
{
|
|
775
833
|
className: "text-gray-600 text-xl absolute top-0 right-0 p-12",
|
|
@@ -778,9 +836,9 @@ var BottomSheet = (0, import_react7.forwardRef)(
|
|
|
778
836
|
}
|
|
779
837
|
)
|
|
780
838
|
] }),
|
|
781
|
-
/* @__PURE__ */ (
|
|
839
|
+
/* @__PURE__ */ jsxs8("div", { className: "w-full h-full grow overflow-y-auto overflow-x-visible", children: [
|
|
782
840
|
children,
|
|
783
|
-
stopModalBtn &&
|
|
841
|
+
stopModalBtn && React.cloneElement(stopModalBtn, {
|
|
784
842
|
onClick: handleStopClick
|
|
785
843
|
}),
|
|
786
844
|
afterStopBtn && afterStopBtn
|
|
@@ -799,17 +857,21 @@ var BottomSheet = (0, import_react7.forwardRef)(
|
|
|
799
857
|
BottomSheet.displayName = "BottomSheet";
|
|
800
858
|
|
|
801
859
|
// src/components/Checkbox/Checkbox.tsx
|
|
802
|
-
|
|
803
|
-
|
|
860
|
+
import {
|
|
861
|
+
forwardRef as forwardRef9,
|
|
862
|
+
useId as useId2,
|
|
863
|
+
useState as useState3
|
|
864
|
+
} from "react";
|
|
865
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
804
866
|
function CheckIcon({ className }) {
|
|
805
|
-
return /* @__PURE__ */ (
|
|
867
|
+
return /* @__PURE__ */ jsx9(
|
|
806
868
|
"svg",
|
|
807
869
|
{
|
|
808
870
|
className,
|
|
809
871
|
viewBox: "0 0 16 16",
|
|
810
872
|
fill: "none",
|
|
811
873
|
"aria-hidden": "true",
|
|
812
|
-
children: /* @__PURE__ */ (
|
|
874
|
+
children: /* @__PURE__ */ jsx9(
|
|
813
875
|
"path",
|
|
814
876
|
{
|
|
815
877
|
d: "M13.333 4.667 6 12l-3.333-3.333",
|
|
@@ -823,14 +885,14 @@ function CheckIcon({ className }) {
|
|
|
823
885
|
);
|
|
824
886
|
}
|
|
825
887
|
function IndeterminateIcon({ className }) {
|
|
826
|
-
return /* @__PURE__ */ (
|
|
888
|
+
return /* @__PURE__ */ jsx9(
|
|
827
889
|
"svg",
|
|
828
890
|
{
|
|
829
891
|
className,
|
|
830
892
|
viewBox: "0 0 16 16",
|
|
831
893
|
fill: "none",
|
|
832
894
|
"aria-hidden": "true",
|
|
833
|
-
children: /* @__PURE__ */ (
|
|
895
|
+
children: /* @__PURE__ */ jsx9(
|
|
834
896
|
"path",
|
|
835
897
|
{
|
|
836
898
|
d: "M3.333 8h9.334",
|
|
@@ -842,7 +904,7 @@ function IndeterminateIcon({ className }) {
|
|
|
842
904
|
}
|
|
843
905
|
);
|
|
844
906
|
}
|
|
845
|
-
var Checkbox = (
|
|
907
|
+
var Checkbox = forwardRef9(
|
|
846
908
|
(_a, ref) => {
|
|
847
909
|
var _b = _a, {
|
|
848
910
|
label,
|
|
@@ -865,17 +927,17 @@ var Checkbox = (0, import_react8.forwardRef)(
|
|
|
865
927
|
"id",
|
|
866
928
|
"defaultChecked"
|
|
867
929
|
]);
|
|
868
|
-
const reactId = (
|
|
930
|
+
const reactId = useId2();
|
|
869
931
|
const inputId = id != null ? id : reactId;
|
|
870
|
-
const [isChecked, setIsChecked] = (
|
|
871
|
-
return /* @__PURE__ */ (
|
|
932
|
+
const [isChecked, setIsChecked] = useState3(defaultChecked != null ? defaultChecked : false);
|
|
933
|
+
return /* @__PURE__ */ jsxs9(
|
|
872
934
|
"label",
|
|
873
935
|
{
|
|
874
936
|
htmlFor: inputId,
|
|
875
937
|
className: `flex select-none font-sans ${disabled ? "cursor-not-allowed" : "cursor-pointer"} ${className}`,
|
|
876
938
|
children: [
|
|
877
|
-
/* @__PURE__ */ (
|
|
878
|
-
/* @__PURE__ */ (
|
|
939
|
+
/* @__PURE__ */ jsxs9("div", { className: "relative mr-16", children: [
|
|
940
|
+
/* @__PURE__ */ jsx9(
|
|
879
941
|
"input",
|
|
880
942
|
__spreadValues({
|
|
881
943
|
ref,
|
|
@@ -892,16 +954,16 @@ var Checkbox = (0, import_react8.forwardRef)(
|
|
|
892
954
|
className: "sr-only"
|
|
893
955
|
}, rest)
|
|
894
956
|
),
|
|
895
|
-
/* @__PURE__ */ (
|
|
957
|
+
/* @__PURE__ */ jsx9(
|
|
896
958
|
"div",
|
|
897
959
|
{
|
|
898
960
|
className: `box m-6 flex h-20 w-20 rounded-md items-center justify-center border ${contrast ? isChecked || indeterminate ? "border-white bg-white" : "border-white" : isChecked || indeterminate ? "bg-static-icon-brand border-static-icon-brand" : "border-static-icon-primary"}`,
|
|
899
|
-
children: isChecked ? /* @__PURE__ */ (
|
|
961
|
+
children: isChecked ? /* @__PURE__ */ jsx9(
|
|
900
962
|
CheckIcon,
|
|
901
963
|
{
|
|
902
964
|
className: `h-20 ${contrast ? "text-static-icon-brand" : "text-white"}`
|
|
903
965
|
}
|
|
904
|
-
) : indeterminate ? /* @__PURE__ */ (
|
|
966
|
+
) : indeterminate ? /* @__PURE__ */ jsx9(
|
|
905
967
|
IndeterminateIcon,
|
|
906
968
|
{
|
|
907
969
|
className: `h-20 ${contrast ? "text-static-icon-brand" : "text-white"}`
|
|
@@ -910,15 +972,15 @@ var Checkbox = (0, import_react8.forwardRef)(
|
|
|
910
972
|
}
|
|
911
973
|
)
|
|
912
974
|
] }),
|
|
913
|
-
(label || description) && /* @__PURE__ */ (
|
|
914
|
-
label && /* @__PURE__ */ (
|
|
975
|
+
(label || description) && /* @__PURE__ */ jsxs9("span", { className: "flex flex-col", children: [
|
|
976
|
+
label && /* @__PURE__ */ jsx9(
|
|
915
977
|
"span",
|
|
916
978
|
{
|
|
917
979
|
className: `text-label-large ${disabled ? "text-checkbox-text-disabled" : contrast ? "text-checkbox-text-primary-inverse" : "text-checkbox-text-primary"}`,
|
|
918
980
|
children: label
|
|
919
981
|
}
|
|
920
982
|
),
|
|
921
|
-
description && /* @__PURE__ */ (
|
|
983
|
+
description && /* @__PURE__ */ jsx9(
|
|
922
984
|
"span",
|
|
923
985
|
{
|
|
924
986
|
className: `text-body-small ${error ? "text-checkbox-text-danger" : disabled ? "text-checkbox-text-disabled" : contrast ? "text-checkbox-text-primary-inverse" : "text-checkbox-text-secondary"}`,
|
|
@@ -933,11 +995,94 @@ var Checkbox = (0, import_react8.forwardRef)(
|
|
|
933
995
|
);
|
|
934
996
|
Checkbox.displayName = "Checkbox";
|
|
935
997
|
|
|
998
|
+
// src/components/Chip/Chip.tsx
|
|
999
|
+
import {
|
|
1000
|
+
forwardRef as forwardRef10,
|
|
1001
|
+
useState as useState4
|
|
1002
|
+
} from "react";
|
|
1003
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1004
|
+
var sizeClasses4 = {
|
|
1005
|
+
sm: "h-32 text-label-medium px-12 py-6",
|
|
1006
|
+
md: "h-40 text-label-large px-16 py-10",
|
|
1007
|
+
lg: "h-48 text-label-large px-24 py-14"
|
|
1008
|
+
};
|
|
1009
|
+
var marginImgClasses = {
|
|
1010
|
+
sm: "-ml-10 -my-4 h-28 w-28",
|
|
1011
|
+
md: "-ml-12 -my-6 h-32 w-32",
|
|
1012
|
+
lg: "-ml-18 -my-8 h-32 w-32"
|
|
1013
|
+
};
|
|
1014
|
+
var isOutlinedClasses = {
|
|
1015
|
+
true: "border border-chip-border-enabled bg-chip-background-inverse",
|
|
1016
|
+
false: "border-0 bg-chip-background-enabled"
|
|
1017
|
+
};
|
|
1018
|
+
var isDarkClasses = {
|
|
1019
|
+
true: "!bg-chip-background-black-active !text-chip-text-inverse",
|
|
1020
|
+
false: "!bg-chip-background-active !text-chip-text-inverse"
|
|
1021
|
+
};
|
|
1022
|
+
var Chip = forwardRef10(
|
|
1023
|
+
(_a, ref) => {
|
|
1024
|
+
var _b = _a, {
|
|
1025
|
+
size = "md",
|
|
1026
|
+
src,
|
|
1027
|
+
alt = "",
|
|
1028
|
+
label,
|
|
1029
|
+
icon,
|
|
1030
|
+
isOutlined = false,
|
|
1031
|
+
isDark = false,
|
|
1032
|
+
defaultSelected = false,
|
|
1033
|
+
disabled = false,
|
|
1034
|
+
className = ""
|
|
1035
|
+
} = _b, rest = __objRest(_b, [
|
|
1036
|
+
"size",
|
|
1037
|
+
"src",
|
|
1038
|
+
"alt",
|
|
1039
|
+
"label",
|
|
1040
|
+
"icon",
|
|
1041
|
+
"isOutlined",
|
|
1042
|
+
"isDark",
|
|
1043
|
+
"defaultSelected",
|
|
1044
|
+
"disabled",
|
|
1045
|
+
"className"
|
|
1046
|
+
]);
|
|
1047
|
+
const [selected, setSelected] = useState4(defaultSelected);
|
|
1048
|
+
const sz = sizeClasses4[size];
|
|
1049
|
+
const outlinedClass = isOutlinedClasses[String(isOutlined)];
|
|
1050
|
+
const darkClass = isDarkClasses[String(isDark)];
|
|
1051
|
+
const containerClasses = [
|
|
1052
|
+
"w-fit rounded-full flex flex-row gap-8 items-center justify-center text-chip-text-enabled",
|
|
1053
|
+
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
|
1054
|
+
outlinedClass,
|
|
1055
|
+
sz,
|
|
1056
|
+
className,
|
|
1057
|
+
selected ? darkClass : ""
|
|
1058
|
+
].filter(Boolean).join(" ");
|
|
1059
|
+
return /* @__PURE__ */ jsxs10(
|
|
1060
|
+
"div",
|
|
1061
|
+
__spreadProps(__spreadValues({
|
|
1062
|
+
ref,
|
|
1063
|
+
className: containerClasses
|
|
1064
|
+
}, rest), {
|
|
1065
|
+
onClick: () => !disabled && setSelected(!selected),
|
|
1066
|
+
children: [
|
|
1067
|
+
icon ? icon : src && /* @__PURE__ */ jsx10("img", { src, alt, className: `${marginImgClasses[size]} rounded-full` }),
|
|
1068
|
+
label
|
|
1069
|
+
]
|
|
1070
|
+
})
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
);
|
|
1074
|
+
Chip.displayName = "Chip";
|
|
1075
|
+
|
|
936
1076
|
// src/components/Dialog/Dialog.tsx
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
1077
|
+
import React2, {
|
|
1078
|
+
useEffect as useEffect2,
|
|
1079
|
+
useState as useState5,
|
|
1080
|
+
useCallback as useCallback3,
|
|
1081
|
+
forwardRef as forwardRef11
|
|
1082
|
+
} from "react";
|
|
1083
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
1084
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1085
|
+
var Dialog = forwardRef11(
|
|
941
1086
|
({
|
|
942
1087
|
isForceOpen = false,
|
|
943
1088
|
setIsForceOpen,
|
|
@@ -947,12 +1092,13 @@ var Dialog = (0, import_react9.forwardRef)(
|
|
|
947
1092
|
startModalBtn,
|
|
948
1093
|
stopModalBtn,
|
|
949
1094
|
afterStopBtn,
|
|
950
|
-
p = "20"
|
|
1095
|
+
p = "20",
|
|
1096
|
+
maxW = "md"
|
|
951
1097
|
}, ref) => {
|
|
952
|
-
const [isOpen, setIsOpen] = (
|
|
953
|
-
const [isRender, setIsRender] = (
|
|
954
|
-
const [animate, setAnimate] = (
|
|
955
|
-
(
|
|
1098
|
+
const [isOpen, setIsOpen] = useState5(false);
|
|
1099
|
+
const [isRender, setIsRender] = useState5(false);
|
|
1100
|
+
const [animate, setAnimate] = useState5(false);
|
|
1101
|
+
useEffect2(() => {
|
|
956
1102
|
if (isOpen) {
|
|
957
1103
|
setIsRender(true);
|
|
958
1104
|
setTimeout(() => setAnimate(true), 10);
|
|
@@ -962,14 +1108,14 @@ var Dialog = (0, import_react9.forwardRef)(
|
|
|
962
1108
|
return () => clearTimeout(timer);
|
|
963
1109
|
}
|
|
964
1110
|
}, [isOpen]);
|
|
965
|
-
(
|
|
1111
|
+
useEffect2(() => {
|
|
966
1112
|
if (isForceOpen) {
|
|
967
1113
|
setIsOpen(true);
|
|
968
1114
|
} else {
|
|
969
1115
|
setIsOpen(false);
|
|
970
1116
|
}
|
|
971
1117
|
}, [isForceOpen]);
|
|
972
|
-
const handleStartClick = (
|
|
1118
|
+
const handleStartClick = useCallback3(
|
|
973
1119
|
(e) => {
|
|
974
1120
|
var _a, _b;
|
|
975
1121
|
(_b = startModalBtn == null ? void 0 : (_a = startModalBtn.props).onClick) == null ? void 0 : _b.call(_a, e);
|
|
@@ -978,7 +1124,7 @@ var Dialog = (0, import_react9.forwardRef)(
|
|
|
978
1124
|
},
|
|
979
1125
|
[startModalBtn]
|
|
980
1126
|
);
|
|
981
|
-
const handleStopClick = (
|
|
1127
|
+
const handleStopClick = useCallback3(
|
|
982
1128
|
(e) => {
|
|
983
1129
|
var _a, _b;
|
|
984
1130
|
(_b = stopModalBtn == null ? void 0 : (_a = stopModalBtn.props).onClick) == null ? void 0 : _b.call(_a, e);
|
|
@@ -991,19 +1137,19 @@ var Dialog = (0, import_react9.forwardRef)(
|
|
|
991
1137
|
setIsForceOpen == null ? void 0 : setIsForceOpen(false);
|
|
992
1138
|
setIsOpen(false);
|
|
993
1139
|
};
|
|
994
|
-
return /* @__PURE__ */ (
|
|
995
|
-
startModalBtn &&
|
|
1140
|
+
return /* @__PURE__ */ jsxs11("span", { ref, style: { display: "contents" }, children: [
|
|
1141
|
+
startModalBtn && React2.cloneElement(startModalBtn, {
|
|
996
1142
|
onClick: handleStartClick
|
|
997
1143
|
}),
|
|
998
|
-
isRender && (
|
|
999
|
-
/* @__PURE__ */ (
|
|
1144
|
+
isRender && createPortal2(
|
|
1145
|
+
/* @__PURE__ */ jsxs11(
|
|
1000
1146
|
"div",
|
|
1001
1147
|
{
|
|
1002
1148
|
className: `fixed inset-0 z-50 flex items-center justify-center transition-opacity duration-300 ${animate ? "opacity-100" : "opacity-0"}`,
|
|
1003
1149
|
"aria-modal": "true",
|
|
1004
1150
|
role: "dialog",
|
|
1005
1151
|
children: [
|
|
1006
|
-
/* @__PURE__ */ (
|
|
1152
|
+
/* @__PURE__ */ jsx11(
|
|
1007
1153
|
"div",
|
|
1008
1154
|
{
|
|
1009
1155
|
className: "absolute inset-0 bg-black/40",
|
|
@@ -1011,12 +1157,12 @@ var Dialog = (0, import_react9.forwardRef)(
|
|
|
1011
1157
|
"aria-label": "Close modal"
|
|
1012
1158
|
}
|
|
1013
1159
|
),
|
|
1014
|
-
/* @__PURE__ */ (
|
|
1160
|
+
/* @__PURE__ */ jsxs11(
|
|
1015
1161
|
"div",
|
|
1016
1162
|
{
|
|
1017
|
-
className: `relative z-10 w-[calc(100%-40px)] max-w
|
|
1163
|
+
className: `relative z-10 w-[calc(100%-40px)] max-w-${maxW} rounded-xl bg-white p-${p || "20"} shadow-lg transform transition-all duration-300 ${animate ? "scale-100 opacity-100" : "scale-95 opacity-0"}`,
|
|
1018
1164
|
children: [
|
|
1019
|
-
isCloseIcon && /* @__PURE__ */ (
|
|
1165
|
+
isCloseIcon && /* @__PURE__ */ jsx11(
|
|
1020
1166
|
"svg",
|
|
1021
1167
|
{
|
|
1022
1168
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1029,7 +1175,7 @@ var Dialog = (0, import_react9.forwardRef)(
|
|
|
1029
1175
|
e.preventDefault();
|
|
1030
1176
|
handleCloseClick();
|
|
1031
1177
|
},
|
|
1032
|
-
children: /* @__PURE__ */ (
|
|
1178
|
+
children: /* @__PURE__ */ jsx11(
|
|
1033
1179
|
"path",
|
|
1034
1180
|
{
|
|
1035
1181
|
d: "M14.7119 6.0625L10.7744 10L14.7119 13.9375L13.9375 14.7119L10 10.7744L6.0625 14.7119L5.28809 13.9375L9.22559 10L5.28809 6.0625L6.0625 5.28809L10 9.22559L13.9375 5.28809L14.7119 6.0625Z",
|
|
@@ -1039,7 +1185,7 @@ var Dialog = (0, import_react9.forwardRef)(
|
|
|
1039
1185
|
}
|
|
1040
1186
|
),
|
|
1041
1187
|
children,
|
|
1042
|
-
stopModalBtn &&
|
|
1188
|
+
stopModalBtn && React2.cloneElement(stopModalBtn, {
|
|
1043
1189
|
onClick: handleStopClick
|
|
1044
1190
|
}),
|
|
1045
1191
|
afterStopBtn && afterStopBtn
|
|
@@ -1056,10 +1202,342 @@ var Dialog = (0, import_react9.forwardRef)(
|
|
|
1056
1202
|
);
|
|
1057
1203
|
Dialog.displayName = "Dialog";
|
|
1058
1204
|
|
|
1205
|
+
// src/components/Dropdown/Dropdown.tsx
|
|
1206
|
+
import { useState as useState6, useRef, useEffect as useEffect3 } from "react";
|
|
1207
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1208
|
+
var IconDanger = () => /* @__PURE__ */ jsx12(
|
|
1209
|
+
"svg",
|
|
1210
|
+
{
|
|
1211
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1212
|
+
width: "20",
|
|
1213
|
+
height: "20",
|
|
1214
|
+
viewBox: "0 0 20 20",
|
|
1215
|
+
fill: "none",
|
|
1216
|
+
children: /* @__PURE__ */ jsx12(
|
|
1217
|
+
"path",
|
|
1218
|
+
{
|
|
1219
|
+
d: "M10.0078 2.41699C11.0548 2.41699 12.0363 2.61407 12.9512 3.00879C13.8657 3.40341 14.6687 3.94646 15.3604 4.6377C16.0522 5.32922 16.5962 6.13426 16.9912 7.05176C17.386 7.96936 17.583 8.95002 17.583 9.99316C17.583 11.0363 17.3859 12.0187 16.9912 12.9404C16.5966 13.862 16.0536 14.6687 15.3623 15.3604C14.6708 16.0522 13.8657 16.5962 12.9482 16.9912C12.0306 17.386 11.05 17.583 10.0068 17.583C8.96373 17.583 7.9813 17.3859 7.05957 16.9912C6.13798 16.5966 5.33135 16.0536 4.63965 15.3623C3.94784 14.6708 3.40379 13.8642 3.00879 12.9434C2.61398 12.0228 2.41703 11.039 2.41699 9.99219C2.41699 8.94524 2.61407 7.96369 3.00879 7.04883C3.40341 6.13429 3.94646 5.33128 4.6377 4.63965C5.32922 3.94784 6.13581 3.40379 7.05664 3.00879C7.97723 2.61398 8.961 2.41703 10.0078 2.41699ZM10.0039 12.5967C9.83828 12.5968 9.69804 12.6527 9.58301 12.7646C9.46793 12.8769 9.41016 13.0159 9.41016 13.1816C9.4102 13.3472 9.46621 13.4875 9.57812 13.6025C9.69035 13.7177 9.83026 13.7754 9.99609 13.7754C10.1617 13.7753 10.302 13.7195 10.417 13.6074C10.5321 13.4952 10.5898 13.3562 10.5898 13.1904C10.5898 13.0246 10.534 12.8837 10.4219 12.7686C10.3097 12.6536 10.1697 12.5967 10.0039 12.5967ZM9.45801 11.0645H10.542V6.06445H9.45801V11.0645Z",
|
|
1220
|
+
fill: "#EF4444"
|
|
1221
|
+
}
|
|
1222
|
+
)
|
|
1223
|
+
}
|
|
1224
|
+
);
|
|
1225
|
+
function IconCheck({ className }) {
|
|
1226
|
+
return /* @__PURE__ */ jsx12(
|
|
1227
|
+
"svg",
|
|
1228
|
+
{
|
|
1229
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1230
|
+
width: "20",
|
|
1231
|
+
height: "20",
|
|
1232
|
+
viewBox: "0 0 20 20",
|
|
1233
|
+
fill: "none",
|
|
1234
|
+
className,
|
|
1235
|
+
children: /* @__PURE__ */ jsx12(
|
|
1236
|
+
"path",
|
|
1237
|
+
{
|
|
1238
|
+
d: "M15.6328 6.64062L8.10449 14.1494L4.36719 10.4326L5.13281 9.64551L8.10449 12.6172L14.8672 5.875L15.6328 6.64062Z",
|
|
1239
|
+
fill: "#111827"
|
|
1240
|
+
}
|
|
1241
|
+
)
|
|
1242
|
+
}
|
|
1243
|
+
);
|
|
1244
|
+
}
|
|
1245
|
+
function ChevronDown({ className }) {
|
|
1246
|
+
return /* @__PURE__ */ jsx12(
|
|
1247
|
+
"svg",
|
|
1248
|
+
{
|
|
1249
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1250
|
+
width: "20",
|
|
1251
|
+
height: "20",
|
|
1252
|
+
viewBox: "0 0 20 20",
|
|
1253
|
+
fill: "none",
|
|
1254
|
+
className,
|
|
1255
|
+
children: /* @__PURE__ */ jsx12(
|
|
1256
|
+
"path",
|
|
1257
|
+
{
|
|
1258
|
+
d: "M14.7119 8.0625L10 12.7744L5.28809 8.0625L6.0625 7.28809L10 11.2256L13.9375 7.28809L14.7119 8.0625Z",
|
|
1259
|
+
fill: "#111827"
|
|
1260
|
+
}
|
|
1261
|
+
)
|
|
1262
|
+
}
|
|
1263
|
+
);
|
|
1264
|
+
}
|
|
1265
|
+
var Dropdown = ({
|
|
1266
|
+
error,
|
|
1267
|
+
label,
|
|
1268
|
+
placeholder,
|
|
1269
|
+
isDisabled = false,
|
|
1270
|
+
isSearchable = false,
|
|
1271
|
+
isTextCenter = false,
|
|
1272
|
+
value,
|
|
1273
|
+
setValue,
|
|
1274
|
+
dropDownItems = [
|
|
1275
|
+
{ label: "Bonnie Green", value: "Bonnie Green" },
|
|
1276
|
+
{ label: "Jese Leos", value: "Jese Leos" },
|
|
1277
|
+
{ label: "Joseph Mcfall", value: "Joseph Mcfall" },
|
|
1278
|
+
{ label: "John Smith", value: "John Smith" },
|
|
1279
|
+
{ label: "Maria Garcia", value: "Maria Garcia" }
|
|
1280
|
+
]
|
|
1281
|
+
}) => {
|
|
1282
|
+
const [isOpen, setIsOpen] = useState6(false);
|
|
1283
|
+
const [search, setSearch] = useState6("");
|
|
1284
|
+
const dropdownRef = useRef(null);
|
|
1285
|
+
const filteredItems = dropDownItems.filter(
|
|
1286
|
+
(item) => item.label.toLowerCase().includes(search.toLowerCase())
|
|
1287
|
+
);
|
|
1288
|
+
useEffect3(() => {
|
|
1289
|
+
function handleClickOutside(event) {
|
|
1290
|
+
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
1291
|
+
setIsOpen(false);
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
1295
|
+
return () => {
|
|
1296
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
1297
|
+
};
|
|
1298
|
+
}, []);
|
|
1299
|
+
return /* @__PURE__ */ jsxs12("div", { className: "w-full", children: [
|
|
1300
|
+
label ? /* @__PURE__ */ jsx12(
|
|
1301
|
+
"p",
|
|
1302
|
+
{
|
|
1303
|
+
className: `text-label-medium text-left items-left font-medium mb-4 ${isDisabled ? "text-dropdown-text-disabled" : "text-dropdown-text-primary"}`,
|
|
1304
|
+
children: label
|
|
1305
|
+
}
|
|
1306
|
+
) : /* @__PURE__ */ jsx12(Fragment2, {}),
|
|
1307
|
+
/* @__PURE__ */ jsxs12("div", { className: "w-full flex flex-col relative", ref: dropdownRef, children: [
|
|
1308
|
+
/* @__PURE__ */ jsxs12(
|
|
1309
|
+
"button",
|
|
1310
|
+
{
|
|
1311
|
+
onClick: () => !isDisabled && setIsOpen(!isOpen),
|
|
1312
|
+
className: `w-full rounded-md text-body-small px-16 py-10 text-center inline-flex gap-8 items-center border **:focus:outline-none focus:border-2 focus:px-15 focus:py-9
|
|
1313
|
+
${isDisabled ? "pointer-events-none bg-dropdown-background-disabled text-dropdown-text-disabled border-dropdown-border-disabled" : error ? "border-red-600 bg-dropdown-background-enabled focus:border-red-600" : value ? "text-dropdown-text-primary bg-dropdown-background-enabled border-dropdown-border-enabled focus:border-dropdown-border-active " : "text-dropdown-text-secondary bg-dropdown-background-enabled border-dropdown-border-enabled focus:border-dropdown-border-active "} `,
|
|
1314
|
+
type: "button",
|
|
1315
|
+
children: [
|
|
1316
|
+
/* @__PURE__ */ jsx12("p", { className: `grow ${isTextCenter ? "text-center" : "text-start"}`, children: value.label || placeholder }),
|
|
1317
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-8", children: [
|
|
1318
|
+
isDisabled ? /* @__PURE__ */ jsx12(Fragment2, {}) : error ? /* @__PURE__ */ jsx12(IconDanger, {}) : /* @__PURE__ */ jsx12(Fragment2, {}),
|
|
1319
|
+
/* @__PURE__ */ jsx12(
|
|
1320
|
+
ChevronDown,
|
|
1321
|
+
{
|
|
1322
|
+
className: `h-20 w-20 duration-300 ${isOpen ? "rotate-180" : ""}`
|
|
1323
|
+
}
|
|
1324
|
+
)
|
|
1325
|
+
] })
|
|
1326
|
+
]
|
|
1327
|
+
}
|
|
1328
|
+
),
|
|
1329
|
+
/* @__PURE__ */ jsxs12(
|
|
1330
|
+
"div",
|
|
1331
|
+
{
|
|
1332
|
+
id: "dropdownSearch",
|
|
1333
|
+
className: `${isOpen ? "flex" : "hidden"} top-[calc(100%+4px)] left-8 absolute z-10000 bg-white-100 rounded-lg shadow-base w-9/10 min-w-fit flex-col`,
|
|
1334
|
+
children: [
|
|
1335
|
+
isSearchable ? /* @__PURE__ */ jsxs12("div", { className: "p-3", children: [
|
|
1336
|
+
/* @__PURE__ */ jsx12("label", { htmlFor: "input-group-search", className: "sr-only", children: "Search" }),
|
|
1337
|
+
/* @__PURE__ */ jsxs12("div", { className: "relative", children: [
|
|
1338
|
+
/* @__PURE__ */ jsx12("div", { className: "absolute inset-y-0 rtl:inset-r-0 inset-s-0 flex items-center ps-12 pointer-events-none", children: /* @__PURE__ */ jsxs12(
|
|
1339
|
+
"svg",
|
|
1340
|
+
{
|
|
1341
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1342
|
+
width: "20",
|
|
1343
|
+
height: "20",
|
|
1344
|
+
viewBox: "0 0 20 20",
|
|
1345
|
+
fill: "none",
|
|
1346
|
+
children: [
|
|
1347
|
+
/* @__PURE__ */ jsx12(
|
|
1348
|
+
"mask",
|
|
1349
|
+
{
|
|
1350
|
+
id: "mask0_3218_5077",
|
|
1351
|
+
style: { maskType: "alpha" },
|
|
1352
|
+
maskUnits: "userSpaceOnUse",
|
|
1353
|
+
x: "0",
|
|
1354
|
+
y: "0",
|
|
1355
|
+
width: "20",
|
|
1356
|
+
height: "20",
|
|
1357
|
+
children: /* @__PURE__ */ jsx12("rect", { width: "20", height: "20", fill: "#D9D9D9" })
|
|
1358
|
+
}
|
|
1359
|
+
),
|
|
1360
|
+
/* @__PURE__ */ jsx12("g", { mask: "url(#mask0_3218_5077)", children: /* @__PURE__ */ jsx12(
|
|
1361
|
+
"path",
|
|
1362
|
+
{
|
|
1363
|
+
d: "M15.8894 16.6476L10.9263 11.6842C10.5096 12.0005 10.0527 12.2454 9.55563 12.419C9.05855 12.5926 8.54556 12.6794 8.01667 12.6794C6.7182 12.6794 5.61354 12.2241 4.70271 11.3134C3.79202 10.4026 3.33667 9.29811 3.33667 8.00005C3.33667 6.702 3.79202 5.59755 4.70271 4.68672C5.61354 3.77603 6.71799 3.32068 8.01604 3.32068C9.3141 3.32068 10.4185 3.77603 11.3294 4.68672C12.2401 5.59755 12.6954 6.70221 12.6954 8.00068C12.6954 8.54554 12.606 9.06651 12.4271 9.56359C12.2481 10.0608 12.0058 10.5097 11.7002 10.9103L16.6633 15.8734L15.8894 16.6476ZM8.01604 11.5963C9.02035 11.5963 9.87077 11.248 10.5673 10.5513C11.264 9.85478 11.6123 9.00436 11.6123 8.00005C11.6123 6.99575 11.264 6.14533 10.5673 5.4488C9.87077 4.75214 9.02035 4.4038 8.01604 4.4038C7.01174 4.4038 6.16132 4.75214 5.46479 5.4488C4.76813 6.14533 4.41979 6.99575 4.41979 8.00005C4.41979 9.00436 4.76813 9.85478 5.46479 10.5513C6.16132 11.248 7.01174 11.5963 8.01604 11.5963Z",
|
|
1364
|
+
fill: "#111827"
|
|
1365
|
+
}
|
|
1366
|
+
) })
|
|
1367
|
+
]
|
|
1368
|
+
}
|
|
1369
|
+
) }),
|
|
1370
|
+
/* @__PURE__ */ jsx12(
|
|
1371
|
+
"input",
|
|
1372
|
+
{
|
|
1373
|
+
type: "text",
|
|
1374
|
+
className: "block w-full p-8 ps-40 text-body-small text-gray-900 border border-gray-300 rounded-lg bg-gray-50 focus:ring-bubblegum focus:border-bubblegum",
|
|
1375
|
+
placeholder: "Search...",
|
|
1376
|
+
value: search,
|
|
1377
|
+
onChange: (e) => setSearch(e.target.value)
|
|
1378
|
+
}
|
|
1379
|
+
)
|
|
1380
|
+
] })
|
|
1381
|
+
] }) : /* @__PURE__ */ jsx12(Fragment2, {}),
|
|
1382
|
+
/* @__PURE__ */ jsx12(
|
|
1383
|
+
"ul",
|
|
1384
|
+
{
|
|
1385
|
+
className: "h-auto max-h-392 overflow-y-auto cursor-pointer",
|
|
1386
|
+
"aria-labelledby": "dropdownSearchButton",
|
|
1387
|
+
children: filteredItems.length > 0 ? filteredItems.map((item, idx) => /* @__PURE__ */ jsx12("li", { children: /* @__PURE__ */ jsxs12(
|
|
1388
|
+
"div",
|
|
1389
|
+
{
|
|
1390
|
+
onClick: () => {
|
|
1391
|
+
setValue(item);
|
|
1392
|
+
setSearch("");
|
|
1393
|
+
setIsOpen(false);
|
|
1394
|
+
},
|
|
1395
|
+
className: "relative text-gray-900 py-12 px-16 rounded-sm text-label-medium hover:bg-gray-100",
|
|
1396
|
+
children: [
|
|
1397
|
+
item.label,
|
|
1398
|
+
value.value === item.value && /* @__PURE__ */ jsx12(IconCheck, { className: "absolute h-20 w-20 right-24 top-2 translate-y-1/2" })
|
|
1399
|
+
]
|
|
1400
|
+
}
|
|
1401
|
+
) }, idx)) : /* @__PURE__ */ jsx12("li", { className: "px-8 py-8 text-label-medium text-gray-900", children: "No results found" })
|
|
1402
|
+
}
|
|
1403
|
+
)
|
|
1404
|
+
]
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
1407
|
+
] }),
|
|
1408
|
+
error ? /* @__PURE__ */ jsx12(
|
|
1409
|
+
"p",
|
|
1410
|
+
{
|
|
1411
|
+
className: `text-caption-caption text-left items-left text-dropdown-text-danger mt-4 ${isDisabled ? "hidden" : ""}`,
|
|
1412
|
+
children: error
|
|
1413
|
+
}
|
|
1414
|
+
) : /* @__PURE__ */ jsx12(Fragment2, {})
|
|
1415
|
+
] });
|
|
1416
|
+
};
|
|
1417
|
+
Dropdown.displayName = "Dropdown";
|
|
1418
|
+
|
|
1419
|
+
// src/components/FinancialLogo/FinancialLogo.tsx
|
|
1420
|
+
import { forwardRef as forwardRef12 } from "react";
|
|
1421
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1422
|
+
var inlineClasses2 = {
|
|
1423
|
+
info: "bg-alert-inline-info-bg border-alert-inline-info-border text-alert-text-primary",
|
|
1424
|
+
success: "bg-alert-inline-success-bg border-alert-inline-success-border text-alert-text-primary",
|
|
1425
|
+
warning: "bg-alert-inline-warning-bg border-alert-inline-warning-border text-alert-text-primary",
|
|
1426
|
+
danger: "bg-alert-inline-danger-bg border-alert-inline-danger-border text-alert-text-primary",
|
|
1427
|
+
common: "bg-alert-inline-common-bg border-alert-inline-common-border text-alert-text-primary"
|
|
1428
|
+
};
|
|
1429
|
+
var pageClasses2 = {
|
|
1430
|
+
info: "bg-alert-page-info-bg text-alert-text-primary-inverse",
|
|
1431
|
+
success: "bg-alert-page-success-bg text-alert-text-primary-inverse",
|
|
1432
|
+
warning: "bg-alert-page-warning-bg text-alert-text-primary-inverse",
|
|
1433
|
+
danger: "bg-alert-page-danger-bg text-alert-text-primary-inverse",
|
|
1434
|
+
common: "bg-alert-page-common-bg text-alert-text-primary-inverse"
|
|
1435
|
+
};
|
|
1436
|
+
var actionsPageClasses2 = {
|
|
1437
|
+
info: "text-enabled-inverse",
|
|
1438
|
+
success: "text-enabled-inverse",
|
|
1439
|
+
warning: "text-enabled-dark",
|
|
1440
|
+
danger: "text-enabled-inverse",
|
|
1441
|
+
common: "text-enabled-inverse"
|
|
1442
|
+
};
|
|
1443
|
+
var inlineIconClasses2 = {
|
|
1444
|
+
info: "text-alert-inline-info-icon",
|
|
1445
|
+
success: "text-alert-inline-success-icon",
|
|
1446
|
+
warning: "text-alert-inline-warning-icon",
|
|
1447
|
+
danger: "text-alert-inline-danger-icon",
|
|
1448
|
+
common: "text-alert-inline-common-icon"
|
|
1449
|
+
};
|
|
1450
|
+
function InfoIcon2({ className }) {
|
|
1451
|
+
return /* @__PURE__ */ jsx13("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM10 6h.01M9 10h1v4h1", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1452
|
+
}
|
|
1453
|
+
function SuccessIcon2({ className }) {
|
|
1454
|
+
return /* @__PURE__ */ jsxs13("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1455
|
+
/* @__PURE__ */ jsx13("path", { d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
1456
|
+
/* @__PURE__ */ jsx13("path", { d: "m7 10 2 2 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1457
|
+
] });
|
|
1458
|
+
}
|
|
1459
|
+
function WarningIcon2({ className }) {
|
|
1460
|
+
return /* @__PURE__ */ jsx13("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "M8.57 3.22 1.53 15.5a1.67 1.67 0 0 0 1.43 2.5h14.08a1.67 1.67 0 0 0 1.43-2.5L11.43 3.22a1.67 1.67 0 0 0-2.86 0ZM10 7.5v3.33M10 14.17h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1461
|
+
}
|
|
1462
|
+
function DangerIcon2({ className }) {
|
|
1463
|
+
return /* @__PURE__ */ jsx13("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM12.5 7.5l-5 5M7.5 7.5l5 5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1464
|
+
}
|
|
1465
|
+
function CommonIcon({ className }) {
|
|
1466
|
+
return /* @__PURE__ */ jsx13("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM10 6v4M10 14h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1467
|
+
}
|
|
1468
|
+
function CloseIcon2({ className }) {
|
|
1469
|
+
return /* @__PURE__ */ jsx13("svg", { className, width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx13("path", { d: "M12 4 4 12M4 4l8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1470
|
+
}
|
|
1471
|
+
var defaultIcons2 = {
|
|
1472
|
+
info: InfoIcon2,
|
|
1473
|
+
success: SuccessIcon2,
|
|
1474
|
+
warning: WarningIcon2,
|
|
1475
|
+
danger: DangerIcon2,
|
|
1476
|
+
common: CommonIcon
|
|
1477
|
+
};
|
|
1478
|
+
var FinancialLogo = forwardRef12(
|
|
1479
|
+
(_a, ref) => {
|
|
1480
|
+
var _b = _a, {
|
|
1481
|
+
variant = "info",
|
|
1482
|
+
mode = "inline",
|
|
1483
|
+
title,
|
|
1484
|
+
description,
|
|
1485
|
+
action,
|
|
1486
|
+
icon,
|
|
1487
|
+
onClose,
|
|
1488
|
+
className = "",
|
|
1489
|
+
children
|
|
1490
|
+
} = _b, rest = __objRest(_b, [
|
|
1491
|
+
"variant",
|
|
1492
|
+
"mode",
|
|
1493
|
+
"title",
|
|
1494
|
+
"description",
|
|
1495
|
+
"action",
|
|
1496
|
+
"icon",
|
|
1497
|
+
"onClose",
|
|
1498
|
+
"className",
|
|
1499
|
+
"children"
|
|
1500
|
+
]);
|
|
1501
|
+
const isPage = mode === "page";
|
|
1502
|
+
const variantClass = isPage ? pageClasses2[variant] : inlineClasses2[variant];
|
|
1503
|
+
const actionClass = isPage ? actionsPageClasses2[variant] : "text-enabled";
|
|
1504
|
+
const DefaultIcon = defaultIcons2[variant];
|
|
1505
|
+
const iconColorClass = isPage ? "" : inlineIconClasses2[variant];
|
|
1506
|
+
const descColorClass = isPage ? "text-alert-text-secondary-inverse" : "text-alert-text-secondary";
|
|
1507
|
+
const closeColorClass = isPage ? "text-alert-close-inverse hover:text-alert-close-inverse-hover" : "text-alert-close hover:text-alert-close-hover";
|
|
1508
|
+
const classes = [
|
|
1509
|
+
"flex items-start gap-12 font-sans",
|
|
1510
|
+
isPage ? "px-16 py-12" : "px-16 py-12 border-l-4 rounded-lg",
|
|
1511
|
+
variantClass,
|
|
1512
|
+
className
|
|
1513
|
+
].filter(Boolean).join(" ");
|
|
1514
|
+
return /* @__PURE__ */ jsxs13("div", __spreadProps(__spreadValues({ ref, role: "alert", className: classes }, rest), { children: [
|
|
1515
|
+
/* @__PURE__ */ jsx13("span", { className: `shrink-0 mt-2 ${iconColorClass}`, children: icon != null ? icon : /* @__PURE__ */ jsx13(DefaultIcon, { className: "h-20 w-20" }) }),
|
|
1516
|
+
/* @__PURE__ */ jsxs13("div", { className: "flex-1 min-w-0", children: [
|
|
1517
|
+
title && /* @__PURE__ */ jsx13("p", { className: "text-sm font-medium leading-20", children: title }),
|
|
1518
|
+
description && /* @__PURE__ */ jsx13("p", { className: `text-sm leading-20 ${descColorClass} ${title ? "mt-4" : ""}`, children: description }),
|
|
1519
|
+
children
|
|
1520
|
+
] }),
|
|
1521
|
+
action && /* @__PURE__ */ jsx13("div", { className: `${actionClass} underline text-sm font-medium`, children: action }),
|
|
1522
|
+
onClose && /* @__PURE__ */ jsx13(
|
|
1523
|
+
"button",
|
|
1524
|
+
{
|
|
1525
|
+
type: "button",
|
|
1526
|
+
onClick: onClose,
|
|
1527
|
+
className: `shrink-0 p-2 rounded transition-colors ${closeColorClass}`,
|
|
1528
|
+
"aria-label": "Close",
|
|
1529
|
+
children: /* @__PURE__ */ jsx13(CloseIcon2, { className: "h-16 w-16" })
|
|
1530
|
+
}
|
|
1531
|
+
)
|
|
1532
|
+
] }));
|
|
1533
|
+
}
|
|
1534
|
+
);
|
|
1535
|
+
FinancialLogo.displayName = "FinancialLogo";
|
|
1536
|
+
|
|
1059
1537
|
// src/components/Icon/Icon.tsx
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
var Icon = (
|
|
1538
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
1539
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1540
|
+
var Icon = forwardRef13(
|
|
1063
1541
|
(_a, ref) => {
|
|
1064
1542
|
var _b = _a, {
|
|
1065
1543
|
name,
|
|
@@ -1087,7 +1565,7 @@ var Icon = (0, import_react10.forwardRef)(
|
|
|
1087
1565
|
"material-symbols-outlined select-none shrink-0 inline-block leading-none",
|
|
1088
1566
|
className
|
|
1089
1567
|
].filter(Boolean).join(" ");
|
|
1090
|
-
return /* @__PURE__ */ (
|
|
1568
|
+
return /* @__PURE__ */ jsx14(
|
|
1091
1569
|
"span",
|
|
1092
1570
|
__spreadProps(__spreadValues({
|
|
1093
1571
|
ref,
|
|
@@ -1109,10 +1587,81 @@ var Icon = (0, import_react10.forwardRef)(
|
|
|
1109
1587
|
);
|
|
1110
1588
|
Icon.displayName = "Icon";
|
|
1111
1589
|
|
|
1590
|
+
// src/components/Link/Link.tsx
|
|
1591
|
+
import { forwardRef as forwardRef14 } from "react";
|
|
1592
|
+
import { jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1593
|
+
var linkStyleClasses = {
|
|
1594
|
+
brand: "font-sans text-link-text-enabled",
|
|
1595
|
+
white: "font-sans text-link-text-enabled-inverse",
|
|
1596
|
+
black: "font-sans text-link-text-enabled-dark",
|
|
1597
|
+
brandLooped: "font-looped text-link-text-enabled",
|
|
1598
|
+
whiteLooped: "font-looped text-link-text-enabled-inverse",
|
|
1599
|
+
blackLooped: "font-looped text-link-text-enabled-dark"
|
|
1600
|
+
};
|
|
1601
|
+
var linkVariantClasses = {
|
|
1602
|
+
xs: "text-link-extra-small gap-2",
|
|
1603
|
+
sm: "text-link-small gap-2",
|
|
1604
|
+
md: "text-link-medium gap-2",
|
|
1605
|
+
lg: "text-link-large gap-4"
|
|
1606
|
+
};
|
|
1607
|
+
var iconVariantClasses = {
|
|
1608
|
+
xs: "w-20 h-20",
|
|
1609
|
+
sm: "w-20 h-20",
|
|
1610
|
+
md: "w-20 h-20",
|
|
1611
|
+
lg: "w-24 h-24"
|
|
1612
|
+
};
|
|
1613
|
+
function SuccessIcon3({ className }) {
|
|
1614
|
+
return /* @__PURE__ */ jsxs14("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
1615
|
+
/* @__PURE__ */ jsx15("path", { d: "M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
1616
|
+
/* @__PURE__ */ jsx15("path", { d: "m7 10 2 2 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1617
|
+
] });
|
|
1618
|
+
}
|
|
1619
|
+
var Link = forwardRef14(
|
|
1620
|
+
(_a, ref) => {
|
|
1621
|
+
var _b = _a, {
|
|
1622
|
+
variant = "sm",
|
|
1623
|
+
isInline = false,
|
|
1624
|
+
linkStyle = "brand",
|
|
1625
|
+
text,
|
|
1626
|
+
href,
|
|
1627
|
+
icon = true,
|
|
1628
|
+
className = "",
|
|
1629
|
+
children
|
|
1630
|
+
} = _b, rest = __objRest(_b, [
|
|
1631
|
+
"variant",
|
|
1632
|
+
"isInline",
|
|
1633
|
+
"linkStyle",
|
|
1634
|
+
"text",
|
|
1635
|
+
"href",
|
|
1636
|
+
"icon",
|
|
1637
|
+
"className",
|
|
1638
|
+
"children"
|
|
1639
|
+
]);
|
|
1640
|
+
const styleClass = linkStyleClasses[linkStyle];
|
|
1641
|
+
const variantClass = linkVariantClasses[variant];
|
|
1642
|
+
const iconClass = iconVariantClasses[variant];
|
|
1643
|
+
const classes = [
|
|
1644
|
+
"flex items-center",
|
|
1645
|
+
isInline ? "underline" : "",
|
|
1646
|
+
styleClass,
|
|
1647
|
+
variantClass,
|
|
1648
|
+
className
|
|
1649
|
+
].filter(Boolean).join(" ");
|
|
1650
|
+
return /* @__PURE__ */ jsxs14("div", __spreadProps(__spreadValues({ ref, role: "link", className: classes }, rest), { children: [
|
|
1651
|
+
/* @__PURE__ */ jsx15("a", { className: "", href, children: text }),
|
|
1652
|
+
icon && !isInline ? /* @__PURE__ */ jsx15(SuccessIcon3, { className: iconClass }) : null
|
|
1653
|
+
] }));
|
|
1654
|
+
}
|
|
1655
|
+
);
|
|
1656
|
+
Link.displayName = "Link";
|
|
1657
|
+
|
|
1112
1658
|
// src/components/Radio/Radio.tsx
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1659
|
+
import {
|
|
1660
|
+
forwardRef as forwardRef15,
|
|
1661
|
+
useId as useId3
|
|
1662
|
+
} from "react";
|
|
1663
|
+
import { jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1664
|
+
var Radio = forwardRef15(
|
|
1116
1665
|
(_a, ref) => {
|
|
1117
1666
|
var _b = _a, {
|
|
1118
1667
|
size = "sm",
|
|
@@ -1137,20 +1686,20 @@ var Radio = (0, import_react11.forwardRef)(
|
|
|
1137
1686
|
"id",
|
|
1138
1687
|
"name"
|
|
1139
1688
|
]);
|
|
1140
|
-
const reactId = (
|
|
1689
|
+
const reactId = useId3();
|
|
1141
1690
|
const inputId = id != null ? id : reactId;
|
|
1142
|
-
return /* @__PURE__ */ (
|
|
1691
|
+
return /* @__PURE__ */ jsx16(
|
|
1143
1692
|
"div",
|
|
1144
1693
|
{
|
|
1145
1694
|
className: `${disabled ? "cursor-not-allowed" : "cursor-pointer"} ${className}`,
|
|
1146
|
-
children: /* @__PURE__ */ (
|
|
1695
|
+
children: /* @__PURE__ */ jsxs15(
|
|
1147
1696
|
"label",
|
|
1148
1697
|
{
|
|
1149
1698
|
htmlFor: inputId,
|
|
1150
1699
|
className: `flex gap-4 ${disabled ? "pointer-events-none text-gray-400" : "text-gray-900 cursor-pointer"}`,
|
|
1151
1700
|
children: [
|
|
1152
|
-
/* @__PURE__ */ (
|
|
1153
|
-
/* @__PURE__ */ (
|
|
1701
|
+
/* @__PURE__ */ jsxs15("div", { children: [
|
|
1702
|
+
/* @__PURE__ */ jsx16(
|
|
1154
1703
|
"input",
|
|
1155
1704
|
__spreadValues({
|
|
1156
1705
|
ref,
|
|
@@ -1163,14 +1712,14 @@ var Radio = (0, import_react11.forwardRef)(
|
|
|
1163
1712
|
name
|
|
1164
1713
|
}, rest)
|
|
1165
1714
|
),
|
|
1166
|
-
/* @__PURE__ */ (
|
|
1715
|
+
/* @__PURE__ */ jsx16(
|
|
1167
1716
|
"div",
|
|
1168
1717
|
{
|
|
1169
1718
|
className: `relative box flex items-center justify-center rounded-full border-2 group bg-white
|
|
1170
1719
|
${size === "sm" ? "h-16 w-16 my-4 ml-3 mr-3" : "m-3 h-20 w-20 text-label-large"}
|
|
1171
1720
|
${error ? "border-red-500" : "border-gray-600 peer-checked:border-blue-600 peer-disabled:border-gray-400!"}
|
|
1172
1721
|
`,
|
|
1173
|
-
children: /* @__PURE__ */ (
|
|
1722
|
+
children: /* @__PURE__ */ jsx16(
|
|
1174
1723
|
"span",
|
|
1175
1724
|
{
|
|
1176
1725
|
className: `absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2
|
|
@@ -1181,12 +1730,12 @@ var Radio = (0, import_react11.forwardRef)(
|
|
|
1181
1730
|
}
|
|
1182
1731
|
)
|
|
1183
1732
|
] }),
|
|
1184
|
-
/* @__PURE__ */ (
|
|
1733
|
+
/* @__PURE__ */ jsxs15(
|
|
1185
1734
|
"div",
|
|
1186
1735
|
{
|
|
1187
1736
|
className: `flex flex-col gap-1 ${size === "sm" ? "mt-2" : "mt-4"}`,
|
|
1188
1737
|
children: [
|
|
1189
|
-
/* @__PURE__ */ (
|
|
1738
|
+
/* @__PURE__ */ jsx16(
|
|
1190
1739
|
"p",
|
|
1191
1740
|
{
|
|
1192
1741
|
className: `
|
|
@@ -1196,7 +1745,7 @@ var Radio = (0, import_react11.forwardRef)(
|
|
|
1196
1745
|
children: label
|
|
1197
1746
|
}
|
|
1198
1747
|
),
|
|
1199
|
-
/* @__PURE__ */ (
|
|
1748
|
+
/* @__PURE__ */ jsx16(
|
|
1200
1749
|
"p",
|
|
1201
1750
|
{
|
|
1202
1751
|
className: `text-caption-caption ${disabled ? "text-gray-400" : error ? "text-red-600" : "text-gray-600"}`,
|
|
@@ -1215,9 +1764,44 @@ var Radio = (0, import_react11.forwardRef)(
|
|
|
1215
1764
|
);
|
|
1216
1765
|
Radio.displayName = "Radio";
|
|
1217
1766
|
|
|
1767
|
+
// src/components/SegmentControl/SegmentControl.tsx
|
|
1768
|
+
import {
|
|
1769
|
+
forwardRef as forwardRef16
|
|
1770
|
+
} from "react";
|
|
1771
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1772
|
+
var SegmentControl = forwardRef16(
|
|
1773
|
+
(_a, ref) => {
|
|
1774
|
+
var _b = _a, { size = "md", items, selected, setSelected, className = "" } = _b, rest = __objRest(_b, ["size", "items", "selected", "setSelected", "className"]);
|
|
1775
|
+
return /* @__PURE__ */ jsx17(
|
|
1776
|
+
"div",
|
|
1777
|
+
__spreadProps(__spreadValues({
|
|
1778
|
+
ref,
|
|
1779
|
+
className: `bg-background-tertiary rounded-full flex flex-row items-center justify-center p-4 gap-4 ${className}`
|
|
1780
|
+
}, rest), {
|
|
1781
|
+
children: items.map((item) => /* @__PURE__ */ jsx17(
|
|
1782
|
+
"div",
|
|
1783
|
+
{
|
|
1784
|
+
onClick: () => setSelected == null ? void 0 : setSelected(item.value),
|
|
1785
|
+
className: `cursor-pointer rounded-full text-center grow
|
|
1786
|
+
${size === "sm" ? "px-8 py-6 text-label-medium" : size === "md" ? "px-12 py-10 text-label-large" : "px-16 py-14 text-label-large"} ${selected === item.value ? "bg-segmented-control-background-active shadow-base text-segmented-control-text-primary hover:bg-segmented-control-background-active-hover" : "bg-segmented-control-background-enabled text-segmented-control-text-primary hover:bg-segmented-control-background-hover"} `,
|
|
1787
|
+
children: item.label
|
|
1788
|
+
},
|
|
1789
|
+
item.value
|
|
1790
|
+
))
|
|
1791
|
+
})
|
|
1792
|
+
);
|
|
1793
|
+
}
|
|
1794
|
+
);
|
|
1795
|
+
SegmentControl.displayName = "SegmentControl";
|
|
1796
|
+
|
|
1218
1797
|
// src/components/Slider/Slider.tsx
|
|
1219
|
-
|
|
1220
|
-
|
|
1798
|
+
import {
|
|
1799
|
+
forwardRef as forwardRef17,
|
|
1800
|
+
useCallback as useCallback4,
|
|
1801
|
+
useId as useId4,
|
|
1802
|
+
useState as useState8
|
|
1803
|
+
} from "react";
|
|
1804
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1221
1805
|
var sizeConfig = {
|
|
1222
1806
|
small: {
|
|
1223
1807
|
trackH: "h-4",
|
|
@@ -1248,7 +1832,7 @@ var sizeConfig = {
|
|
|
1248
1832
|
}
|
|
1249
1833
|
};
|
|
1250
1834
|
function ChevronGlyphs({ size, color }) {
|
|
1251
|
-
return /* @__PURE__ */ (
|
|
1835
|
+
return /* @__PURE__ */ jsxs16(
|
|
1252
1836
|
"svg",
|
|
1253
1837
|
{
|
|
1254
1838
|
width: size,
|
|
@@ -1258,7 +1842,7 @@ function ChevronGlyphs({ size, color }) {
|
|
|
1258
1842
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1259
1843
|
"aria-hidden": "true",
|
|
1260
1844
|
children: [
|
|
1261
|
-
/* @__PURE__ */ (
|
|
1845
|
+
/* @__PURE__ */ jsx18(
|
|
1262
1846
|
"path",
|
|
1263
1847
|
{
|
|
1264
1848
|
d: "M4.75 3.25L2.25 6L4.75 8.75",
|
|
@@ -1268,7 +1852,7 @@ function ChevronGlyphs({ size, color }) {
|
|
|
1268
1852
|
strokeLinejoin: "round"
|
|
1269
1853
|
}
|
|
1270
1854
|
),
|
|
1271
|
-
/* @__PURE__ */ (
|
|
1855
|
+
/* @__PURE__ */ jsx18(
|
|
1272
1856
|
"path",
|
|
1273
1857
|
{
|
|
1274
1858
|
d: "M7.25 3.25L9.75 6L7.25 8.75",
|
|
@@ -1282,7 +1866,7 @@ function ChevronGlyphs({ size, color }) {
|
|
|
1282
1866
|
}
|
|
1283
1867
|
);
|
|
1284
1868
|
}
|
|
1285
|
-
var Slider = (
|
|
1869
|
+
var Slider = forwardRef17(
|
|
1286
1870
|
(_a, ref) => {
|
|
1287
1871
|
var _b = _a, {
|
|
1288
1872
|
size = "medium",
|
|
@@ -1317,15 +1901,15 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1317
1901
|
"onChange",
|
|
1318
1902
|
"aria-label"
|
|
1319
1903
|
]);
|
|
1320
|
-
const reactId = (
|
|
1904
|
+
const reactId = useId4();
|
|
1321
1905
|
const inputId = id != null ? id : reactId;
|
|
1322
1906
|
const sz = sizeConfig[size];
|
|
1323
1907
|
const ariaLabel = ariaLabelProp != null ? ariaLabelProp : typeof label === "string" ? void 0 : "Slider";
|
|
1324
1908
|
const ariaDescriptionId = description ? `${inputId}-description` : void 0;
|
|
1325
1909
|
const isControlled = controlledValue !== void 0;
|
|
1326
|
-
const [internalValue, setInternalValue] = (
|
|
1910
|
+
const [internalValue, setInternalValue] = useState8(defaultValue != null ? defaultValue : min);
|
|
1327
1911
|
const currentValue = isControlled ? controlledValue : internalValue;
|
|
1328
|
-
const handleChange = (
|
|
1912
|
+
const handleChange = useCallback4(
|
|
1329
1913
|
(e) => {
|
|
1330
1914
|
const val = Number(e.target.value);
|
|
1331
1915
|
if (!isControlled) {
|
|
@@ -1345,13 +1929,13 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1345
1929
|
const descriptionColor = disabled ? "text-slider-label-disabled" : "text-slider-description";
|
|
1346
1930
|
const thumbOffset = percent * sz.thumbPx / 100;
|
|
1347
1931
|
const fillOffset = sz.thumbPx / 2 - thumbOffset;
|
|
1348
|
-
return /* @__PURE__ */ (
|
|
1932
|
+
return /* @__PURE__ */ jsxs16(
|
|
1349
1933
|
"div",
|
|
1350
1934
|
{
|
|
1351
1935
|
className: ["flex w-full flex-col gap-8 font-sans", className].filter(Boolean).join(" "),
|
|
1352
1936
|
children: [
|
|
1353
|
-
(label || showValue && !disabled) && /* @__PURE__ */ (
|
|
1354
|
-
label && /* @__PURE__ */ (
|
|
1937
|
+
(label || showValue && !disabled) && /* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between", children: [
|
|
1938
|
+
label && /* @__PURE__ */ jsx18(
|
|
1355
1939
|
"label",
|
|
1356
1940
|
{
|
|
1357
1941
|
htmlFor: inputId,
|
|
@@ -1364,7 +1948,7 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1364
1948
|
children: label
|
|
1365
1949
|
}
|
|
1366
1950
|
),
|
|
1367
|
-
showValue && /* @__PURE__ */ (
|
|
1951
|
+
showValue && /* @__PURE__ */ jsx18(
|
|
1368
1952
|
"span",
|
|
1369
1953
|
{
|
|
1370
1954
|
className: [sz.description, "tabular-nums", labelColor].join(" "),
|
|
@@ -1372,7 +1956,7 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1372
1956
|
}
|
|
1373
1957
|
)
|
|
1374
1958
|
] }),
|
|
1375
|
-
/* @__PURE__ */ (
|
|
1959
|
+
/* @__PURE__ */ jsxs16(
|
|
1376
1960
|
"div",
|
|
1377
1961
|
{
|
|
1378
1962
|
className: [
|
|
@@ -1381,7 +1965,7 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1381
1965
|
disabled ? "cursor-not-allowed" : "cursor-pointer"
|
|
1382
1966
|
].join(" "),
|
|
1383
1967
|
children: [
|
|
1384
|
-
/* @__PURE__ */ (
|
|
1968
|
+
/* @__PURE__ */ jsx18(
|
|
1385
1969
|
"div",
|
|
1386
1970
|
{
|
|
1387
1971
|
className: [
|
|
@@ -1391,14 +1975,14 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1391
1975
|
].join(" ")
|
|
1392
1976
|
}
|
|
1393
1977
|
),
|
|
1394
|
-
/* @__PURE__ */ (
|
|
1978
|
+
/* @__PURE__ */ jsx18(
|
|
1395
1979
|
"div",
|
|
1396
1980
|
{
|
|
1397
1981
|
className: ["absolute left-0 rounded-full", sz.trackH, fillBg].join(" "),
|
|
1398
1982
|
style: { width: `calc(${percent}% + ${fillOffset}px)` }
|
|
1399
1983
|
}
|
|
1400
1984
|
),
|
|
1401
|
-
/* @__PURE__ */ (
|
|
1985
|
+
/* @__PURE__ */ jsx18(
|
|
1402
1986
|
"input",
|
|
1403
1987
|
__spreadValues({
|
|
1404
1988
|
ref,
|
|
@@ -1419,7 +2003,7 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1419
2003
|
].join(" ")
|
|
1420
2004
|
}, rest)
|
|
1421
2005
|
),
|
|
1422
|
-
/* @__PURE__ */ (
|
|
2006
|
+
/* @__PURE__ */ jsx18(
|
|
1423
2007
|
"div",
|
|
1424
2008
|
{
|
|
1425
2009
|
className: [
|
|
@@ -1432,13 +2016,13 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1432
2016
|
!disabled && "peer-hover:shadow-medium"
|
|
1433
2017
|
].filter(Boolean).join(" "),
|
|
1434
2018
|
style: { left: `calc(${percent}% - ${thumbOffset}px)` },
|
|
1435
|
-
children: /* @__PURE__ */ (
|
|
2019
|
+
children: /* @__PURE__ */ jsx18(ChevronGlyphs, { size: sz.iconPx, color: iconColor })
|
|
1436
2020
|
}
|
|
1437
2021
|
)
|
|
1438
2022
|
]
|
|
1439
2023
|
}
|
|
1440
2024
|
),
|
|
1441
|
-
description && /* @__PURE__ */ (
|
|
2025
|
+
description && /* @__PURE__ */ jsx18(
|
|
1442
2026
|
"span",
|
|
1443
2027
|
{
|
|
1444
2028
|
id: ariaDescriptionId,
|
|
@@ -1453,31 +2037,351 @@ var Slider = (0, import_react12.forwardRef)(
|
|
|
1453
2037
|
);
|
|
1454
2038
|
Slider.displayName = "Slider";
|
|
1455
2039
|
|
|
2040
|
+
// src/components/Tab/Tab.tsx
|
|
2041
|
+
import { forwardRef as forwardRef18 } from "react";
|
|
2042
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2043
|
+
var Tab = forwardRef18(
|
|
2044
|
+
(_a, ref) => {
|
|
2045
|
+
var _b = _a, {
|
|
2046
|
+
size = "md",
|
|
2047
|
+
label,
|
|
2048
|
+
value,
|
|
2049
|
+
isDisabled = false,
|
|
2050
|
+
selected,
|
|
2051
|
+
setSelected,
|
|
2052
|
+
className = ""
|
|
2053
|
+
} = _b, rest = __objRest(_b, [
|
|
2054
|
+
"size",
|
|
2055
|
+
"label",
|
|
2056
|
+
"value",
|
|
2057
|
+
"isDisabled",
|
|
2058
|
+
"selected",
|
|
2059
|
+
"setSelected",
|
|
2060
|
+
"className"
|
|
2061
|
+
]);
|
|
2062
|
+
return /* @__PURE__ */ jsx19(
|
|
2063
|
+
"div",
|
|
2064
|
+
__spreadProps(__spreadValues({
|
|
2065
|
+
ref,
|
|
2066
|
+
className: `flex items-center justify-center
|
|
2067
|
+
${size === "md" ? "text-label-medium px-16 pt-12 pb-8" : "text-label-large p-16"}
|
|
2068
|
+
${value === selected ? isDisabled ? "cursor-not-allowed text-gray-400 border-gray-100 border-b-2" : "text-blue-600 border-blue-600 border-b-2 cursor-pointer" : isDisabled ? "cursor-not-allowed text-gray-400" : "text-gray-600 hover:border-b-2 hover:border-gray-200 cursor-pointer"}
|
|
2069
|
+
${className}`,
|
|
2070
|
+
onClick: () => !isDisabled && (setSelected == null ? void 0 : setSelected(value))
|
|
2071
|
+
}, rest), {
|
|
2072
|
+
children: label
|
|
2073
|
+
})
|
|
2074
|
+
);
|
|
2075
|
+
}
|
|
2076
|
+
);
|
|
2077
|
+
Tab.displayName = "Tab";
|
|
2078
|
+
|
|
2079
|
+
// src/components/TextArea/TextArea.tsx
|
|
2080
|
+
import {
|
|
2081
|
+
useState as useState9,
|
|
2082
|
+
forwardRef as forwardRef19
|
|
2083
|
+
} from "react";
|
|
2084
|
+
import { Fragment as Fragment3, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2085
|
+
var TextArea = forwardRef19(
|
|
2086
|
+
(_a, ref) => {
|
|
2087
|
+
var _b = _a, {
|
|
2088
|
+
maxText = 500,
|
|
2089
|
+
height = 100,
|
|
2090
|
+
error,
|
|
2091
|
+
label,
|
|
2092
|
+
placeholder,
|
|
2093
|
+
description,
|
|
2094
|
+
icon,
|
|
2095
|
+
isDisabled = false,
|
|
2096
|
+
isLoading = false,
|
|
2097
|
+
isVertify = false,
|
|
2098
|
+
isClearable = true,
|
|
2099
|
+
disabled,
|
|
2100
|
+
value,
|
|
2101
|
+
onChange
|
|
2102
|
+
} = _b, props = __objRest(_b, [
|
|
2103
|
+
"maxText",
|
|
2104
|
+
"height",
|
|
2105
|
+
"error",
|
|
2106
|
+
"label",
|
|
2107
|
+
"placeholder",
|
|
2108
|
+
"description",
|
|
2109
|
+
"icon",
|
|
2110
|
+
"isDisabled",
|
|
2111
|
+
"isLoading",
|
|
2112
|
+
"isVertify",
|
|
2113
|
+
"isClearable",
|
|
2114
|
+
"disabled",
|
|
2115
|
+
"value",
|
|
2116
|
+
"onChange"
|
|
2117
|
+
]);
|
|
2118
|
+
const [isFocused, setIsFocused] = useState9(false);
|
|
2119
|
+
return /* @__PURE__ */ jsxs17("div", { className: "w-full flex flex-col gap-4", children: [
|
|
2120
|
+
/* @__PURE__ */ jsxs17("div", { className: "w-full flex justify-between items-center ", children: [
|
|
2121
|
+
label ? /* @__PURE__ */ jsx20(
|
|
2122
|
+
"p",
|
|
2123
|
+
{
|
|
2124
|
+
className: `text-label-medium text-left items-left ${isDisabled || disabled ? "text-gray-400" : "text-gray-900"}`,
|
|
2125
|
+
children: label
|
|
2126
|
+
}
|
|
2127
|
+
) : /* @__PURE__ */ jsx20(Fragment3, {}),
|
|
2128
|
+
maxText ? /* @__PURE__ */ jsxs17("p", { className: "text-gray-400 text-caption-caption", children: [
|
|
2129
|
+
" ",
|
|
2130
|
+
(value == null ? void 0 : value.length) || 0,
|
|
2131
|
+
" / ",
|
|
2132
|
+
maxText
|
|
2133
|
+
] }) : /* @__PURE__ */ jsx20(Fragment3, {})
|
|
2134
|
+
] }),
|
|
2135
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative w-full", children: [
|
|
2136
|
+
/* @__PURE__ */ jsx20(
|
|
2137
|
+
"textarea",
|
|
2138
|
+
__spreadValues({
|
|
2139
|
+
ref,
|
|
2140
|
+
name: "text-input",
|
|
2141
|
+
placeholder,
|
|
2142
|
+
disabled: isDisabled || disabled || isLoading,
|
|
2143
|
+
onFocus: () => setIsFocused(true),
|
|
2144
|
+
onBlur: () => setIsFocused(false),
|
|
2145
|
+
value,
|
|
2146
|
+
onChange,
|
|
2147
|
+
className: `w-full min-h-${height} focus:min-h-${height - 2} pt-12 pb-8 pr-44 pl-16 focus:pt-11 focus:pb-7 focus:pr-43 focus:pl-15 border border-gray-300 text-base rounded-md focus:outline-none focus:ring-1 focus:m-1 focus:w-[calc(100%-2px)] ${isDisabled || disabled ? "bg-gray-50 text-gray-400" : error ? "bg-white text-gray-900 border-red-500 focus:border-red-500 focus:ring-red-500" : "bg-white text-gray-900 focus:border-blue-600 focus:ring-blue-600"}`
|
|
2148
|
+
}, props)
|
|
2149
|
+
),
|
|
2150
|
+
isLoading ? /* @__PURE__ */ jsx20(
|
|
2151
|
+
Loading,
|
|
2152
|
+
{
|
|
2153
|
+
size: "sm",
|
|
2154
|
+
className: `absolute right-12 top-12`
|
|
2155
|
+
}
|
|
2156
|
+
) : isClearable && isFocused && value ? /* @__PURE__ */ jsx20(
|
|
2157
|
+
"svg",
|
|
2158
|
+
{
|
|
2159
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2160
|
+
width: "20",
|
|
2161
|
+
height: "20",
|
|
2162
|
+
viewBox: "0 0 20 20",
|
|
2163
|
+
fill: "none",
|
|
2164
|
+
className: "text-gray-900 flex h-20 w-20 items-center justify-center absolute right-12 top-12",
|
|
2165
|
+
onMouseDown: (e) => {
|
|
2166
|
+
e.preventDefault();
|
|
2167
|
+
onChange == null ? void 0 : onChange({ target: { value: "" } });
|
|
2168
|
+
},
|
|
2169
|
+
children: /* @__PURE__ */ jsx20(
|
|
2170
|
+
"path",
|
|
2171
|
+
{
|
|
2172
|
+
d: "M14.7119 6.0625L10.7744 10L14.7119 13.9375L13.9375 14.7119L10 10.7744L6.0625 14.7119L5.28809 13.9375L9.22559 10L5.28809 6.0625L6.0625 5.28809L10 9.22559L13.9375 5.28809L14.7119 6.0625Z",
|
|
2173
|
+
fill: "#111827"
|
|
2174
|
+
}
|
|
2175
|
+
)
|
|
2176
|
+
}
|
|
2177
|
+
) : isVertify ? /* @__PURE__ */ jsx20(
|
|
2178
|
+
"svg",
|
|
2179
|
+
{
|
|
2180
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2181
|
+
width: "20",
|
|
2182
|
+
height: "20",
|
|
2183
|
+
viewBox: "0 0 20 20",
|
|
2184
|
+
fill: "none",
|
|
2185
|
+
className: "text-green-600 flex h-20 w-20 items-center justify-center absolute right-12 top-12",
|
|
2186
|
+
children: /* @__PURE__ */ jsx20(
|
|
2187
|
+
"path",
|
|
2188
|
+
{
|
|
2189
|
+
"fill-rule": "evenodd",
|
|
2190
|
+
"clip-rule": "evenodd",
|
|
2191
|
+
d: "M15.6328 6.64062L8.10449 14.1494L4.36719 10.4326L5.13281 9.64551L8.10449 12.6172L14.8672 5.875L15.6328 6.64062Z",
|
|
2192
|
+
fill: "#16A34A"
|
|
2193
|
+
}
|
|
2194
|
+
)
|
|
2195
|
+
}
|
|
2196
|
+
) : error ? /* @__PURE__ */ jsx20(
|
|
2197
|
+
"svg",
|
|
2198
|
+
{
|
|
2199
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2200
|
+
width: "20",
|
|
2201
|
+
height: "20",
|
|
2202
|
+
viewBox: "0 0 20 20",
|
|
2203
|
+
fill: "none",
|
|
2204
|
+
className: "text-red-500 flex h-20 w-20 items-center justify-center absolute right-12 top-12",
|
|
2205
|
+
children: /* @__PURE__ */ jsx20(
|
|
2206
|
+
"path",
|
|
2207
|
+
{
|
|
2208
|
+
d: "M10.0078 2.41699C11.0548 2.41699 12.0363 2.61407 12.9512 3.00879C13.8657 3.40341 14.6687 3.94646 15.3604 4.6377C16.0522 5.32922 16.5962 6.13426 16.9912 7.05176C17.386 7.96936 17.583 8.95002 17.583 9.99316C17.583 11.0363 17.3859 12.0187 16.9912 12.9404C16.5966 13.862 16.0536 14.6687 15.3623 15.3604C14.6708 16.0522 13.8657 16.5962 12.9482 16.9912C12.0306 17.386 11.05 17.583 10.0068 17.583C8.96373 17.583 7.9813 17.3859 7.05957 16.9912C6.13798 16.5966 5.33135 16.0536 4.63965 15.3623C3.94784 14.6708 3.40379 13.8642 3.00879 12.9434C2.61398 12.0228 2.41703 11.039 2.41699 9.99219C2.41699 8.94524 2.61407 7.96369 3.00879 7.04883C3.40341 6.13429 3.94646 5.33128 4.6377 4.63965C5.32922 3.94784 6.13581 3.40379 7.05664 3.00879C7.97723 2.61398 8.961 2.41703 10.0078 2.41699ZM10.0039 12.5967C9.83828 12.5968 9.69804 12.6527 9.58301 12.7646C9.46793 12.8769 9.41016 13.0159 9.41016 13.1816C9.4102 13.3472 9.46621 13.4875 9.57812 13.6025C9.69035 13.7177 9.83026 13.7754 9.99609 13.7754C10.1617 13.7753 10.302 13.7195 10.417 13.6074C10.5321 13.4952 10.5898 13.3562 10.5898 13.1904C10.5898 13.0246 10.534 12.8837 10.4219 12.7686C10.3097 12.6536 10.1697 12.5967 10.0039 12.5967ZM9.45801 11.0645H10.542V6.06445H9.45801V11.0645Z",
|
|
2209
|
+
fill: "#EF4444"
|
|
2210
|
+
}
|
|
2211
|
+
)
|
|
2212
|
+
}
|
|
2213
|
+
) : /* @__PURE__ */ jsx20(Fragment3, {})
|
|
2214
|
+
] }),
|
|
2215
|
+
error ? /* @__PURE__ */ jsx20("p", { className: "text-caption-caption text-left items-left text-red-600", children: error }) : description ? /* @__PURE__ */ jsx20("p", { className: "text-caption-caption text-left items-left text-gray-600", children: description }) : /* @__PURE__ */ jsx20(Fragment3, {})
|
|
2216
|
+
] });
|
|
2217
|
+
}
|
|
2218
|
+
);
|
|
2219
|
+
TextArea.displayName = "TextArea";
|
|
2220
|
+
|
|
2221
|
+
// src/components/TextField/TextField.tsx
|
|
2222
|
+
import {
|
|
2223
|
+
useState as useState10,
|
|
2224
|
+
forwardRef as forwardRef20
|
|
2225
|
+
} from "react";
|
|
2226
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2227
|
+
var TextField = forwardRef20(
|
|
2228
|
+
(_a, ref) => {
|
|
2229
|
+
var _b = _a, {
|
|
2230
|
+
inputSize,
|
|
2231
|
+
error,
|
|
2232
|
+
label,
|
|
2233
|
+
placeholder,
|
|
2234
|
+
description,
|
|
2235
|
+
icon,
|
|
2236
|
+
isDisabled = false,
|
|
2237
|
+
isLoading = false,
|
|
2238
|
+
isVertify = false,
|
|
2239
|
+
isUnrequired = false,
|
|
2240
|
+
isClearable = true,
|
|
2241
|
+
disabled,
|
|
2242
|
+
value,
|
|
2243
|
+
onChange
|
|
2244
|
+
} = _b, props = __objRest(_b, [
|
|
2245
|
+
"inputSize",
|
|
2246
|
+
"error",
|
|
2247
|
+
"label",
|
|
2248
|
+
"placeholder",
|
|
2249
|
+
"description",
|
|
2250
|
+
"icon",
|
|
2251
|
+
"isDisabled",
|
|
2252
|
+
"isLoading",
|
|
2253
|
+
"isVertify",
|
|
2254
|
+
"isUnrequired",
|
|
2255
|
+
"isClearable",
|
|
2256
|
+
"disabled",
|
|
2257
|
+
"value",
|
|
2258
|
+
"onChange"
|
|
2259
|
+
]);
|
|
2260
|
+
const [isFocused, setIsFocused] = useState10(false);
|
|
2261
|
+
return /* @__PURE__ */ jsxs18("div", { className: "w-full flex flex-col gap-4", children: [
|
|
2262
|
+
label ? /* @__PURE__ */ jsxs18(
|
|
2263
|
+
"p",
|
|
2264
|
+
{
|
|
2265
|
+
className: `text-label-medium text-left items-left ${isDisabled || disabled ? "text-gray-400" : "text-gray-900"}`,
|
|
2266
|
+
children: [
|
|
2267
|
+
label,
|
|
2268
|
+
" ",
|
|
2269
|
+
isUnrequired && /* @__PURE__ */ jsx21("span", { className: "text-gray-400", children: `(\u0E44\u0E21\u0E48\u0E1A\u0E31\u0E07\u0E04\u0E31\u0E1A)` })
|
|
2270
|
+
]
|
|
2271
|
+
}
|
|
2272
|
+
) : /* @__PURE__ */ jsx21(Fragment4, {}),
|
|
2273
|
+
/* @__PURE__ */ jsxs18("div", { className: "relative w-full", children: [
|
|
2274
|
+
/* @__PURE__ */ jsx21(
|
|
2275
|
+
"input",
|
|
2276
|
+
__spreadValues({
|
|
2277
|
+
ref,
|
|
2278
|
+
name: "text-input",
|
|
2279
|
+
type: "text",
|
|
2280
|
+
placeholder,
|
|
2281
|
+
disabled: isDisabled || disabled || isLoading,
|
|
2282
|
+
onFocus: () => setIsFocused(true),
|
|
2283
|
+
onBlur: () => setIsFocused(false),
|
|
2284
|
+
value,
|
|
2285
|
+
onChange,
|
|
2286
|
+
className: `w-full ${inputSize === "md" ? "px-16 py-12 focus:px-15 focus:py-11" : "p-16 focus:p-15"} border border-gray-300 text-base rounded-md focus:outline-none focus:ring-1 focus:m-1 focus:w-[calc(100%-2px)] ${isDisabled || disabled ? "bg-gray-50 text-gray-400" : error ? "bg-white text-gray-900 border-red-500 focus:border-red-500 focus:ring-red-500" : "bg-white text-gray-900 focus:border-blue-600 focus:ring-blue-600"}`
|
|
2287
|
+
}, props)
|
|
2288
|
+
),
|
|
2289
|
+
isLoading ? /* @__PURE__ */ jsx21(
|
|
2290
|
+
Loading,
|
|
2291
|
+
{
|
|
2292
|
+
size: "sm",
|
|
2293
|
+
className: `absolute right-16 top-1/2 -translate-y-1/2`
|
|
2294
|
+
}
|
|
2295
|
+
) : isClearable && isFocused && value ? /* @__PURE__ */ jsx21(
|
|
2296
|
+
"svg",
|
|
2297
|
+
{
|
|
2298
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2299
|
+
width: "20",
|
|
2300
|
+
height: "20",
|
|
2301
|
+
viewBox: "0 0 20 20",
|
|
2302
|
+
fill: "none",
|
|
2303
|
+
className: "text-gray-900 flex h-20 w-20 items-center justify-center absolute right-16 top-1/2 -translate-y-1/2",
|
|
2304
|
+
onMouseDown: (e) => {
|
|
2305
|
+
e.preventDefault();
|
|
2306
|
+
onChange == null ? void 0 : onChange({ target: { value: "" } });
|
|
2307
|
+
},
|
|
2308
|
+
children: /* @__PURE__ */ jsx21(
|
|
2309
|
+
"path",
|
|
2310
|
+
{
|
|
2311
|
+
d: "M14.7119 6.0625L10.7744 10L14.7119 13.9375L13.9375 14.7119L10 10.7744L6.0625 14.7119L5.28809 13.9375L9.22559 10L5.28809 6.0625L6.0625 5.28809L10 9.22559L13.9375 5.28809L14.7119 6.0625Z",
|
|
2312
|
+
fill: "#111827"
|
|
2313
|
+
}
|
|
2314
|
+
)
|
|
2315
|
+
}
|
|
2316
|
+
) : isVertify ? /* @__PURE__ */ jsx21(
|
|
2317
|
+
"svg",
|
|
2318
|
+
{
|
|
2319
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2320
|
+
width: "20",
|
|
2321
|
+
height: "20",
|
|
2322
|
+
viewBox: "0 0 20 20",
|
|
2323
|
+
fill: "none",
|
|
2324
|
+
className: "text-green-600 flex h-20 w-20 items-center justify-center absolute right-16 top-1/2 -translate-y-1/2",
|
|
2325
|
+
children: /* @__PURE__ */ jsx21(
|
|
2326
|
+
"path",
|
|
2327
|
+
{
|
|
2328
|
+
"fill-rule": "evenodd",
|
|
2329
|
+
"clip-rule": "evenodd",
|
|
2330
|
+
d: "M15.6328 6.64062L8.10449 14.1494L4.36719 10.4326L5.13281 9.64551L8.10449 12.6172L14.8672 5.875L15.6328 6.64062Z",
|
|
2331
|
+
fill: "#16A34A"
|
|
2332
|
+
}
|
|
2333
|
+
)
|
|
2334
|
+
}
|
|
2335
|
+
) : error ? /* @__PURE__ */ jsx21(
|
|
2336
|
+
"svg",
|
|
2337
|
+
{
|
|
2338
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2339
|
+
width: "20",
|
|
2340
|
+
height: "20",
|
|
2341
|
+
viewBox: "0 0 20 20",
|
|
2342
|
+
fill: "none",
|
|
2343
|
+
className: "text-red-500 flex h-20 w-20 items-center justify-center absolute right-16 top-1/2 -translate-y-1/2",
|
|
2344
|
+
children: /* @__PURE__ */ jsx21(
|
|
2345
|
+
"path",
|
|
2346
|
+
{
|
|
2347
|
+
d: "M10.0078 2.41699C11.0548 2.41699 12.0363 2.61407 12.9512 3.00879C13.8657 3.40341 14.6687 3.94646 15.3604 4.6377C16.0522 5.32922 16.5962 6.13426 16.9912 7.05176C17.386 7.96936 17.583 8.95002 17.583 9.99316C17.583 11.0363 17.3859 12.0187 16.9912 12.9404C16.5966 13.862 16.0536 14.6687 15.3623 15.3604C14.6708 16.0522 13.8657 16.5962 12.9482 16.9912C12.0306 17.386 11.05 17.583 10.0068 17.583C8.96373 17.583 7.9813 17.3859 7.05957 16.9912C6.13798 16.5966 5.33135 16.0536 4.63965 15.3623C3.94784 14.6708 3.40379 13.8642 3.00879 12.9434C2.61398 12.0228 2.41703 11.039 2.41699 9.99219C2.41699 8.94524 2.61407 7.96369 3.00879 7.04883C3.40341 6.13429 3.94646 5.33128 4.6377 4.63965C5.32922 3.94784 6.13581 3.40379 7.05664 3.00879C7.97723 2.61398 8.961 2.41703 10.0078 2.41699ZM10.0039 12.5967C9.83828 12.5968 9.69804 12.6527 9.58301 12.7646C9.46793 12.8769 9.41016 13.0159 9.41016 13.1816C9.4102 13.3472 9.46621 13.4875 9.57812 13.6025C9.69035 13.7177 9.83026 13.7754 9.99609 13.7754C10.1617 13.7753 10.302 13.7195 10.417 13.6074C10.5321 13.4952 10.5898 13.3562 10.5898 13.1904C10.5898 13.0246 10.534 12.8837 10.4219 12.7686C10.3097 12.6536 10.1697 12.5967 10.0039 12.5967ZM9.45801 11.0645H10.542V6.06445H9.45801V11.0645Z",
|
|
2348
|
+
fill: "#EF4444"
|
|
2349
|
+
}
|
|
2350
|
+
)
|
|
2351
|
+
}
|
|
2352
|
+
) : /* @__PURE__ */ jsx21(Fragment4, {})
|
|
2353
|
+
] }),
|
|
2354
|
+
error ? /* @__PURE__ */ jsx21("p", { className: "text-caption-caption text-left items-left text-red-600", children: error }) : description ? /* @__PURE__ */ jsx21("p", { className: "text-caption-caption text-left items-left text-gray-600", children: description }) : /* @__PURE__ */ jsx21(Fragment4, {})
|
|
2355
|
+
] });
|
|
2356
|
+
}
|
|
2357
|
+
);
|
|
2358
|
+
TextField.displayName = "TextField";
|
|
2359
|
+
|
|
1456
2360
|
// src/components/Toast/Toast.tsx
|
|
1457
|
-
|
|
1458
|
-
|
|
2361
|
+
import { forwardRef as forwardRef21 } from "react";
|
|
2362
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
1459
2363
|
function CheckCircleIcon({ className }) {
|
|
1460
|
-
return /* @__PURE__ */ (
|
|
1461
|
-
/* @__PURE__ */ (
|
|
1462
|
-
/* @__PURE__ */ (
|
|
2364
|
+
return /* @__PURE__ */ jsxs19("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
2365
|
+
/* @__PURE__ */ jsx22("circle", { cx: "10", cy: "10", r: "8", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
2366
|
+
/* @__PURE__ */ jsx22("path", { d: "m7 10 2 2 4-4", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
1463
2367
|
] });
|
|
1464
2368
|
}
|
|
1465
2369
|
function ProgressIcon({ className }) {
|
|
1466
|
-
return /* @__PURE__ */ (
|
|
1467
|
-
/* @__PURE__ */ (
|
|
1468
|
-
/* @__PURE__ */ (
|
|
2370
|
+
return /* @__PURE__ */ jsxs19("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
2371
|
+
/* @__PURE__ */ jsx22("circle", { cx: "10", cy: "10", r: "8", stroke: "currentColor", strokeWidth: "1.5", opacity: "0.3" }),
|
|
2372
|
+
/* @__PURE__ */ jsx22("path", { d: "M10 2a8 8 0 0 1 8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", children: /* @__PURE__ */ jsx22("animateTransform", { attributeName: "transform", type: "rotate", from: "0 10 10", to: "360 10 10", dur: "1s", repeatCount: "indefinite" }) })
|
|
1469
2373
|
] });
|
|
1470
2374
|
}
|
|
1471
2375
|
function ErrorIcon({ className }) {
|
|
1472
|
-
return /* @__PURE__ */ (
|
|
1473
|
-
/* @__PURE__ */ (
|
|
1474
|
-
/* @__PURE__ */ (
|
|
2376
|
+
return /* @__PURE__ */ jsxs19("svg", { className, width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [
|
|
2377
|
+
/* @__PURE__ */ jsx22("circle", { cx: "10", cy: "10", r: "8", stroke: "currentColor", strokeWidth: "1.5" }),
|
|
2378
|
+
/* @__PURE__ */ jsx22("path", { d: "M10 6.5v4M10 13.5h.01", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
|
|
1475
2379
|
] });
|
|
1476
2380
|
}
|
|
1477
|
-
function
|
|
1478
|
-
return /* @__PURE__ */ (
|
|
2381
|
+
function CloseIcon3({ className }) {
|
|
2382
|
+
return /* @__PURE__ */ jsx22("svg", { className, width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx22("path", { d: "M12 4 4 12M4 4l8 8", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) });
|
|
1479
2383
|
}
|
|
1480
|
-
var
|
|
2384
|
+
var defaultIcons3 = {
|
|
1481
2385
|
default: CheckCircleIcon,
|
|
1482
2386
|
progress: ProgressIcon,
|
|
1483
2387
|
error: ErrorIcon
|
|
@@ -1492,7 +2396,7 @@ var iconColorClasses = {
|
|
|
1492
2396
|
progress: "text-toast-progress-icon",
|
|
1493
2397
|
error: "text-toast-error-icon"
|
|
1494
2398
|
};
|
|
1495
|
-
var Toast = (
|
|
2399
|
+
var Toast = forwardRef21(
|
|
1496
2400
|
(_a, ref) => {
|
|
1497
2401
|
var _b = _a, {
|
|
1498
2402
|
type = "default",
|
|
@@ -1511,7 +2415,7 @@ var Toast = (0, import_react13.forwardRef)(
|
|
|
1511
2415
|
"children",
|
|
1512
2416
|
"className"
|
|
1513
2417
|
]);
|
|
1514
|
-
const DefaultIcon =
|
|
2418
|
+
const DefaultIcon = defaultIcons3[type];
|
|
1515
2419
|
const classes = [
|
|
1516
2420
|
"inline-flex items-center gap-12 font-sans",
|
|
1517
2421
|
"rounded-xl px-16 py-12",
|
|
@@ -1520,10 +2424,10 @@ var Toast = (0, import_react13.forwardRef)(
|
|
|
1520
2424
|
typeClasses[type],
|
|
1521
2425
|
className
|
|
1522
2426
|
].filter(Boolean).join(" ");
|
|
1523
|
-
return /* @__PURE__ */ (
|
|
1524
|
-
icon && /* @__PURE__ */ (
|
|
1525
|
-
/* @__PURE__ */ (
|
|
1526
|
-
actionLabel && onAction && /* @__PURE__ */ (
|
|
2427
|
+
return /* @__PURE__ */ jsxs19("div", __spreadProps(__spreadValues({ ref, role: "alert", className: classes }, rest), { children: [
|
|
2428
|
+
icon && /* @__PURE__ */ jsx22("span", { className: `shrink-0 ${iconColorClasses[type]}`, children: /* @__PURE__ */ jsx22(DefaultIcon, { className: "h-20 w-20" }) }),
|
|
2429
|
+
/* @__PURE__ */ jsx22("span", { className: "flex-1 text-sm font-medium leading-20 truncate", children }),
|
|
2430
|
+
actionLabel && onAction && /* @__PURE__ */ jsx22(
|
|
1527
2431
|
"button",
|
|
1528
2432
|
{
|
|
1529
2433
|
type: "button",
|
|
@@ -1532,32 +2436,184 @@ var Toast = (0, import_react13.forwardRef)(
|
|
|
1532
2436
|
children: actionLabel
|
|
1533
2437
|
}
|
|
1534
2438
|
),
|
|
1535
|
-
onDismiss && /* @__PURE__ */ (
|
|
2439
|
+
onDismiss && /* @__PURE__ */ jsx22(
|
|
1536
2440
|
"button",
|
|
1537
2441
|
{
|
|
1538
2442
|
type: "button",
|
|
1539
2443
|
onClick: onDismiss,
|
|
1540
2444
|
className: "shrink-0 p-4 rounded-md text-toast-dismiss hover:text-toast-dismiss-hover transition-colors",
|
|
1541
2445
|
"aria-label": "Dismiss",
|
|
1542
|
-
children: /* @__PURE__ */ (
|
|
2446
|
+
children: /* @__PURE__ */ jsx22(CloseIcon3, { className: "h-16 w-16" })
|
|
1543
2447
|
}
|
|
1544
2448
|
)
|
|
1545
2449
|
] }));
|
|
1546
2450
|
}
|
|
1547
2451
|
);
|
|
1548
2452
|
Toast.displayName = "Toast";
|
|
1549
|
-
|
|
1550
|
-
|
|
2453
|
+
|
|
2454
|
+
// src/components/ToggleSwitch/ToggleSwitch.tsx
|
|
2455
|
+
import { forwardRef as forwardRef22 } from "react";
|
|
2456
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2457
|
+
var ToggleSwitch = forwardRef22(
|
|
2458
|
+
(_a, ref) => {
|
|
2459
|
+
var _b = _a, {
|
|
2460
|
+
value,
|
|
2461
|
+
isDisabled = false,
|
|
2462
|
+
isSelected,
|
|
2463
|
+
setIsSelected,
|
|
2464
|
+
className = ""
|
|
2465
|
+
} = _b, rest = __objRest(_b, [
|
|
2466
|
+
"value",
|
|
2467
|
+
"isDisabled",
|
|
2468
|
+
"isSelected",
|
|
2469
|
+
"setIsSelected",
|
|
2470
|
+
"className"
|
|
2471
|
+
]);
|
|
2472
|
+
return /* @__PURE__ */ jsxs20(
|
|
2473
|
+
"label",
|
|
2474
|
+
__spreadProps(__spreadValues({
|
|
2475
|
+
ref,
|
|
2476
|
+
className: `inline-flex items-center ${className}`
|
|
2477
|
+
}, rest), {
|
|
2478
|
+
children: [
|
|
2479
|
+
/* @__PURE__ */ jsx23(
|
|
2480
|
+
"input",
|
|
2481
|
+
{
|
|
2482
|
+
type: "checkbox",
|
|
2483
|
+
value,
|
|
2484
|
+
className: "sr-only peer",
|
|
2485
|
+
checked: isSelected,
|
|
2486
|
+
onChange: () => !isDisabled && (setIsSelected == null ? void 0 : setIsSelected(!isSelected))
|
|
2487
|
+
}
|
|
2488
|
+
),
|
|
2489
|
+
/* @__PURE__ */ jsx23(
|
|
2490
|
+
"div",
|
|
2491
|
+
{
|
|
2492
|
+
className: `${isDisabled ? "opacity-40 cursor-not-allowed" : "cursor-pointer hover:bg-gray-300 hover:peer-checked:bg-green-700"} relative w-48 h-26 bg-gray-200 rounded-full peer-checked:after:translate-x-22 rtl:peer-checked:after:-translate-x-22 peer-checked:after:border-white after:content-[''] after:absolute after:top-4 after:left-4 after:bg-white after:border-gray-300 after:border after:rounded-full after:h-18 after:w-18 after:transition-all peer-checked:bg-green-600 `
|
|
2493
|
+
}
|
|
2494
|
+
)
|
|
2495
|
+
]
|
|
2496
|
+
})
|
|
2497
|
+
);
|
|
2498
|
+
}
|
|
2499
|
+
);
|
|
2500
|
+
ToggleSwitch.displayName = "ToggleSwitch";
|
|
2501
|
+
|
|
2502
|
+
// src/components/Tooltip/Tooltip.tsx
|
|
2503
|
+
import {
|
|
2504
|
+
useState as useState11,
|
|
2505
|
+
useEffect as useEffect6,
|
|
2506
|
+
useRef as useRef4,
|
|
2507
|
+
forwardRef as forwardRef23
|
|
2508
|
+
} from "react";
|
|
2509
|
+
import { Fragment as Fragment5, jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2510
|
+
var Tooltip = forwardRef23(
|
|
2511
|
+
(_a, ref) => {
|
|
2512
|
+
var _b = _a, {
|
|
2513
|
+
size = "md",
|
|
2514
|
+
children,
|
|
2515
|
+
headText,
|
|
2516
|
+
text,
|
|
2517
|
+
position = "top",
|
|
2518
|
+
className = ""
|
|
2519
|
+
} = _b, rest = __objRest(_b, [
|
|
2520
|
+
"size",
|
|
2521
|
+
"children",
|
|
2522
|
+
"headText",
|
|
2523
|
+
"text",
|
|
2524
|
+
"position",
|
|
2525
|
+
"className"
|
|
2526
|
+
]);
|
|
2527
|
+
const wrapperRef = useRef4(null);
|
|
2528
|
+
const [isVisible, setIsVisible] = useState11(false);
|
|
2529
|
+
const [isHovered, setIsHovered] = useState11(false);
|
|
2530
|
+
useEffect6(() => {
|
|
2531
|
+
const handleClickOutside = (event) => {
|
|
2532
|
+
if (wrapperRef.current && !wrapperRef.current.contains(event.target)) {
|
|
2533
|
+
setIsVisible(false);
|
|
2534
|
+
setIsHovered(false);
|
|
2535
|
+
}
|
|
2536
|
+
};
|
|
2537
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
2538
|
+
return () => {
|
|
2539
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
2540
|
+
};
|
|
2541
|
+
}, []);
|
|
2542
|
+
return /* @__PURE__ */ jsxs21(
|
|
2543
|
+
"div",
|
|
2544
|
+
__spreadProps(__spreadValues({
|
|
2545
|
+
className: `group relative inline-block ${className}`,
|
|
2546
|
+
ref
|
|
2547
|
+
}, rest), {
|
|
2548
|
+
children: [
|
|
2549
|
+
/* @__PURE__ */ jsx24(
|
|
2550
|
+
"div",
|
|
2551
|
+
{
|
|
2552
|
+
ref: wrapperRef,
|
|
2553
|
+
onClick: () => {
|
|
2554
|
+
if (isVisible) {
|
|
2555
|
+
setIsVisible(false);
|
|
2556
|
+
setIsHovered(false);
|
|
2557
|
+
} else {
|
|
2558
|
+
setIsVisible(true);
|
|
2559
|
+
}
|
|
2560
|
+
},
|
|
2561
|
+
onMouseEnter: () => setIsHovered(true),
|
|
2562
|
+
onMouseLeave: () => setIsHovered(false),
|
|
2563
|
+
children
|
|
2564
|
+
}
|
|
2565
|
+
),
|
|
2566
|
+
/* @__PURE__ */ jsxs21(
|
|
2567
|
+
"div",
|
|
2568
|
+
{
|
|
2569
|
+
className: `min-w-100 max-w-300 whitespace-nowrap rounded bg-gray-900 text-white ${size === "lg" ? "text-body-regular py-12 px-16" : size === "md" ? "text-body-small px-12 pt-10 pb-8" : "text-body-small px-8 pt-6 pb-4"} ${position === "right" && `absolute left-full top-1/2 z-20 ml-8 -translate-y-1/2 ${isVisible || isHovered ? "opacity-100" : "opacity-0"}` || position === "top" && `absolute bottom-full left-1/2 z-20 mb-8 -translate-x-1/2 ${isVisible || isHovered ? "opacity-100" : "opacity-0"}` || position === "left" && `absolute right-full top-1/2 z-20 mr-8 -translate-y-1/2 ${isVisible || isHovered ? "opacity-100" : "opacity-0"}` || position === "bottom" && `absolute left-1/2 top-full z-20 mt-8 -translate-x-1/2 ${isVisible || isHovered ? "opacity-100" : "opacity-0"}`}`,
|
|
2570
|
+
children: [
|
|
2571
|
+
/* @__PURE__ */ jsx24(
|
|
2572
|
+
"span",
|
|
2573
|
+
{
|
|
2574
|
+
className: ` ${position === "right" && `absolute -left-3 top-1/2 -z-10 h-8 w-8 -translate-y-1/2 rotate-45 rounded-xs bg-black` || position === "top" && `absolute -bottom-3 left-1/2 -z-10 h-8 w-8 -translate-x-1/2 rotate-45 rounded-xs bg-black` || position === "left" && `absolute -right-3 top-1/2 -z-10 h-8 w-8 -translate-y-1/2 rotate-45 rounded-xs bg-black` || position === "bottom" && `absolute left-1/2 -top-3 -z-10 h-8 w-8 -translate-x-1/2 rotate-45 rounded-xs bg-black`} `
|
|
2575
|
+
}
|
|
2576
|
+
),
|
|
2577
|
+
headText ? /* @__PURE__ */ jsx24(
|
|
2578
|
+
"p",
|
|
2579
|
+
{
|
|
2580
|
+
className: `text-sm text-white font-semibold text-center ${text ? "mb-5" : ""}`,
|
|
2581
|
+
children: headText
|
|
2582
|
+
}
|
|
2583
|
+
) : /* @__PURE__ */ jsx24(Fragment5, {}),
|
|
2584
|
+
text ? /* @__PURE__ */ jsx24("p", { className: "text-xs text-white font-normal text-center text-wrap", children: text }) : /* @__PURE__ */ jsx24(Fragment5, {})
|
|
2585
|
+
]
|
|
2586
|
+
}
|
|
2587
|
+
)
|
|
2588
|
+
]
|
|
2589
|
+
})
|
|
2590
|
+
);
|
|
2591
|
+
}
|
|
2592
|
+
);
|
|
2593
|
+
Tooltip.displayName = "Tooltip";
|
|
2594
|
+
export {
|
|
1551
2595
|
Accordion,
|
|
1552
2596
|
AlertBanner,
|
|
1553
2597
|
Avatar,
|
|
1554
2598
|
Badge,
|
|
1555
2599
|
BottomSheet,
|
|
2600
|
+
Branding,
|
|
1556
2601
|
Button,
|
|
1557
2602
|
Checkbox,
|
|
2603
|
+
Chip,
|
|
1558
2604
|
Dialog,
|
|
2605
|
+
Dropdown,
|
|
2606
|
+
FinancialLogo,
|
|
1559
2607
|
Icon,
|
|
2608
|
+
Link,
|
|
2609
|
+
Loading,
|
|
1560
2610
|
Radio,
|
|
2611
|
+
SegmentControl,
|
|
1561
2612
|
Slider,
|
|
1562
|
-
|
|
1563
|
-
|
|
2613
|
+
Tab,
|
|
2614
|
+
TextArea,
|
|
2615
|
+
TextField,
|
|
2616
|
+
Toast,
|
|
2617
|
+
ToggleSwitch,
|
|
2618
|
+
Tooltip
|
|
2619
|
+
};
|