@crystallize/design-system 0.0.1 → 0.2.0
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/CHANGELOG.md +29 -0
- package/dist/index.css +242 -5
- package/dist/index.d.ts +113 -23
- package/dist/index.js +498 -168
- package/dist/index.mjs +485 -166
- package/package.json +15 -12
- package/src/action-menu/action-item.tsx +2 -2
- package/src/action-menu/action-menu.tsx +4 -7
- package/src/checkbox/checkbox.stories.tsx +62 -0
- package/src/checkbox/checkbox.tsx +36 -0
- package/src/checkbox/index.ts +1 -0
- package/src/dialog/dialog.tsx +6 -6
- package/src/dropdown-menu/DropdownMenu.stories.tsx +1 -2
- package/src/dropdown-menu/dropdown-menu-item.tsx +3 -3
- package/src/dropdown-menu/dropdown-menu-label.tsx +3 -3
- package/src/dropdown-menu/dropdown-menu-root.tsx +1 -1
- package/src/icons/error.tsx +22 -29
- package/src/icons/info.tsx +25 -32
- package/src/icons/warning.tsx +34 -41
- package/src/index.ts +13 -1
- package/src/inline-radio/index.ts +1 -0
- package/src/inline-radio/inline-radio.stories.tsx +62 -0
- package/src/inline-radio/inline-radio.tsx +36 -0
- package/src/input/Input.stories.tsx +19 -0
- package/src/input/index.ts +1 -0
- package/src/input/input.tsx +33 -0
- package/src/label/index.ts +1 -0
- package/src/label/label.stories.tsx +19 -0
- package/src/label/label.tsx +11 -0
- package/src/progress/Progress.stories.tsx +26 -0
- package/src/progress/index.ts +1 -0
- package/src/progress/progress.tsx +16 -0
- package/src/radio/index.ts +1 -0
- package/src/radio/radio.stories.tsx +142 -0
- package/src/radio/radio.tsx +26 -0
- package/src/select/index.ts +1 -0
- package/src/select/select-item.tsx +27 -0
- package/src/select/select-root.tsx +41 -0
- package/src/select/select.stories.tsx +62 -0
- package/src/select/select.ts +7 -0
- package/src/text-field/TextField.stories.tsx +20 -0
- package/src/text-field/index.ts +1 -0
- package/src/text-field/text-field.tsx +60 -0
package/dist/index.js
CHANGED
|
@@ -28,8 +28,19 @@ var src_exports = {};
|
|
|
28
28
|
__export(src_exports, {
|
|
29
29
|
ActionMenu: () => ActionMenu,
|
|
30
30
|
Button: () => Button,
|
|
31
|
+
Card: () => Card,
|
|
32
|
+
Checkbox: () => Checkbox,
|
|
31
33
|
Dialog: () => Dialog,
|
|
32
34
|
DropdownMenu: () => DropdownMenu,
|
|
35
|
+
Icon: () => Icon,
|
|
36
|
+
IconButton: () => IconButton,
|
|
37
|
+
InlineRadio: () => InlineRadio,
|
|
38
|
+
Input: () => Input,
|
|
39
|
+
Label: () => Label2,
|
|
40
|
+
Progress: () => Progress,
|
|
41
|
+
Radio: () => Radio,
|
|
42
|
+
Select: () => Select,
|
|
43
|
+
TextField: () => TextField,
|
|
33
44
|
destroyAll: () => destroyAll,
|
|
34
45
|
showConfirm: () => showConfirm,
|
|
35
46
|
showDialog: () => showDialog,
|
|
@@ -40,7 +51,7 @@ __export(src_exports, {
|
|
|
40
51
|
module.exports = __toCommonJS(src_exports);
|
|
41
52
|
|
|
42
53
|
// src/action-menu/action-menu.tsx
|
|
43
|
-
var
|
|
54
|
+
var import_class_variance_authority4 = require("class-variance-authority");
|
|
44
55
|
|
|
45
56
|
// src/dropdown-menu/dropdown-menu-root.tsx
|
|
46
57
|
var DropdownMenuPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
@@ -65,12 +76,12 @@ function DropdownMenuRoot({ children, content, onOpenChange, alignContent = "sta
|
|
|
65
76
|
|
|
66
77
|
// src/dropdown-menu/dropdown-menu-item.tsx
|
|
67
78
|
var DropdownMenuPrimitive2 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
68
|
-
var
|
|
79
|
+
var import_class_variance_authority = require("class-variance-authority");
|
|
69
80
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
70
81
|
function DropdownMenuItem({ children, className, ...delegated }) {
|
|
71
82
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(DropdownMenuPrimitive2.Item, {
|
|
72
83
|
...delegated,
|
|
73
|
-
className: (0,
|
|
84
|
+
className: (0, import_class_variance_authority.cx)(
|
|
74
85
|
"text-xs font-medium text-black-text",
|
|
75
86
|
"flex h-10 cursor-pointer items-center bg-white px-4 outline-asteroid",
|
|
76
87
|
"hover:bg-[#F8F8F9] hover:outline-none hover:focus-visible:outline-none",
|
|
@@ -82,12 +93,12 @@ function DropdownMenuItem({ children, className, ...delegated }) {
|
|
|
82
93
|
}
|
|
83
94
|
|
|
84
95
|
// src/dropdown-menu/dropdown-menu-label.tsx
|
|
85
|
-
var import_clsx2 = __toESM(require("clsx"));
|
|
86
96
|
var DropdownMenuPrimitive3 = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
97
|
+
var import_class_variance_authority2 = require("class-variance-authority");
|
|
87
98
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
88
99
|
function DropdownMenuLabel({ children }) {
|
|
89
100
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(DropdownMenuPrimitive3.Label, {
|
|
90
|
-
className: (0,
|
|
101
|
+
className: (0, import_class_variance_authority2.cx)("bg-white px-4 py-2 text-xs text-label", "first:rounded-tl first:rounded-tr"),
|
|
91
102
|
children
|
|
92
103
|
});
|
|
93
104
|
}
|
|
@@ -186,41 +197,27 @@ var Error2 = (0, import_react4.forwardRef)((delegated, ref) => {
|
|
|
186
197
|
viewBox: "0 0 22 22",
|
|
187
198
|
...delegated,
|
|
188
199
|
children: [
|
|
189
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", {
|
|
193
|
-
fill: "#DD1367",
|
|
194
|
-
d: "M20.83 11c0 5.43-4.4 9.83-9.83 9.83S1.17 16.43 1.17 11 5.57 1.17 11 1.17s9.83 4.4 9.83 9.83Z"
|
|
195
|
-
}),
|
|
196
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", {
|
|
197
|
-
fill: "#528693",
|
|
198
|
-
fillRule: "evenodd",
|
|
199
|
-
d: "M21.431 11c0 5.76-4.67 10.43-10.43 10.43C5.238 21.43.568 16.76.568 11S5.24.57 11 .57C16.76.57 21.431 5.24 21.431 11Zm-10.43 9.83c5.429 0 9.83-4.4 9.83-9.83s-4.401-9.83-9.83-9.83c-5.43 0-9.832 4.4-9.832 9.83S5.571 20.83 11 20.83Z",
|
|
200
|
-
clipRule: "evenodd"
|
|
201
|
-
}),
|
|
202
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", {
|
|
203
|
-
fill: "#fff",
|
|
204
|
-
fillRule: "evenodd",
|
|
205
|
-
d: "m7.364 13.479 1.157 1.157L11 12.158l2.479 2.478 1.157-1.157L12.158 11l2.478-2.479-1.157-1.157-2.48 2.478-2.478-2.478L7.364 8.52 9.842 11l-2.478 2.479Z",
|
|
206
|
-
clipRule: "evenodd"
|
|
207
|
-
}),
|
|
208
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", {
|
|
209
|
-
fill: "#528693",
|
|
210
|
-
fillRule: "evenodd",
|
|
211
|
-
d: "M6.94 13.903a.6.6 0 0 1 0-.849L8.994 11 6.94 8.946a.6.6 0 0 1 0-.849L8.097 6.94a.6.6 0 0 1 .849 0L11 8.994l2.054-2.054a.6.6 0 0 1 .849 0l1.157 1.157a.6.6 0 0 1 0 .849L13.006 11l2.054 2.054a.6.6 0 0 1 0 .849l-1.157 1.157a.6.6 0 0 1-.849 0L11 13.006 8.946 15.06a.6.6 0 0 1-.849 0L6.94 13.903ZM11 12.158l2.479 2.478 1.157-1.157L12.158 11l2.478-2.479-1.157-1.157L11 9.842 8.521 7.364 7.364 8.52 9.842 11l-2.478 2.479 1.157 1.157L11 12.158Z",
|
|
212
|
-
clipRule: "evenodd"
|
|
213
|
-
})
|
|
214
|
-
]
|
|
200
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", {
|
|
201
|
+
fill: "#DD1367",
|
|
202
|
+
d: "M20.83 11c0 5.43-4.4 9.83-9.83 9.83S1.17 16.43 1.17 11 5.57 1.17 11 1.17s9.83 4.4 9.83 9.83Z"
|
|
215
203
|
}),
|
|
216
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
204
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", {
|
|
205
|
+
fill: "#528693",
|
|
206
|
+
fillRule: "evenodd",
|
|
207
|
+
d: "M21.431 11c0 5.76-4.67 10.43-10.43 10.43C5.238 21.43.568 16.76.568 11S5.24.57 11 .57C16.76.57 21.431 5.24 21.431 11Zm-10.43 9.83c5.429 0 9.83-4.4 9.83-9.83s-4.401-9.83-9.83-9.83c-5.43 0-9.832 4.4-9.832 9.83S5.571 20.83 11 20.83Z",
|
|
208
|
+
clipRule: "evenodd"
|
|
209
|
+
}),
|
|
210
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", {
|
|
211
|
+
fill: "#fff",
|
|
212
|
+
fillRule: "evenodd",
|
|
213
|
+
d: "m7.364 13.479 1.157 1.157L11 12.158l2.479 2.478 1.157-1.157L12.158 11l2.478-2.479-1.157-1.157-2.48 2.478-2.478-2.478L7.364 8.52 9.842 11l-2.478 2.479Z",
|
|
214
|
+
clipRule: "evenodd"
|
|
215
|
+
}),
|
|
216
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", {
|
|
217
|
+
fill: "#528693",
|
|
218
|
+
fillRule: "evenodd",
|
|
219
|
+
d: "M6.94 13.903a.6.6 0 0 1 0-.849L8.994 11 6.94 8.946a.6.6 0 0 1 0-.849L8.097 6.94a.6.6 0 0 1 .849 0L11 8.994l2.054-2.054a.6.6 0 0 1 .849 0l1.157 1.157a.6.6 0 0 1 0 .849L13.006 11l2.054 2.054a.6.6 0 0 1 0 .849l-1.157 1.157a.6.6 0 0 1-.849 0L11 13.006 8.946 15.06a.6.6 0 0 1-.849 0L6.94 13.903ZM11 12.158l2.479 2.478 1.157-1.157L12.158 11l2.478-2.479-1.157-1.157L11 9.842 8.521 7.364 7.364 8.52 9.842 11l-2.478 2.479 1.157 1.157L11 12.158Z",
|
|
220
|
+
clipRule: "evenodd"
|
|
224
221
|
})
|
|
225
222
|
]
|
|
226
223
|
});
|
|
@@ -416,47 +413,33 @@ var Info = (0, import_react7.forwardRef)((delegated, ref) => {
|
|
|
416
413
|
viewBox: "0 0 22 22",
|
|
417
414
|
...delegated,
|
|
418
415
|
children: [
|
|
419
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
423
|
-
fill: "#BFF6F8",
|
|
424
|
-
d: "M20.83 11c0 5.43-4.4 9.83-9.83 9.83S1.17 16.43 1.17 11 5.57 1.17 11 1.17s9.83 4.4 9.83 9.83Z"
|
|
425
|
-
}),
|
|
426
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
427
|
-
fill: "#528693",
|
|
428
|
-
fillRule: "evenodd",
|
|
429
|
-
d: "M21.431 11c0 5.76-4.67 10.43-10.43 10.43C5.238 21.43.568 16.76.568 11S5.24.57 11 .57C16.76.57 21.431 5.24 21.431 11Zm-10.43 9.83c5.429 0 9.83-4.4 9.83-9.83s-4.401-9.83-9.83-9.83c-5.43 0-9.832 4.4-9.832 9.83S5.571 20.83 11 20.83Z",
|
|
430
|
-
clipRule: "evenodd"
|
|
431
|
-
}),
|
|
432
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
433
|
-
fill: "#fff",
|
|
434
|
-
d: "M14.814 6.317a.991.991 0 1 1-1.983 0 .991.991 0 0 1 1.983 0Z"
|
|
435
|
-
}),
|
|
436
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
437
|
-
fill: "#528693",
|
|
438
|
-
fillRule: "evenodd",
|
|
439
|
-
d: "M15.415 6.317a1.592 1.592 0 1 1-3.184 0 1.592 1.592 0 0 1 3.184 0Zm-1.592.991a.991.991 0 1 0 0-1.982.991.991 0 0 0 0 1.982Z",
|
|
440
|
-
clipRule: "evenodd"
|
|
441
|
-
}),
|
|
442
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
443
|
-
fill: "#fff",
|
|
444
|
-
d: "m9.37 16.049 1.8.26-.22-.7-.78-.621.56-1.14 2.261-3.382-.34-1.381-1.92-1-1.261.14-.28.32 1.08.54.14.54-2.22 2.862-.821 2.36 2 1.202Z"
|
|
445
|
-
}),
|
|
446
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
447
|
-
fill: "#528693",
|
|
448
|
-
d: "M10.476 16.666a4.93 4.93 0 0 1-2.096-.599c-1.114-.605-1.482-1.63-.961-2.673a9.606 9.606 0 0 1 1.437-1.963l.067-.077c.252-.293.513-.595.742-.897.288-.38.538-.745.443-1.031-.056-.164-.215-.282-.485-.362a1.58 1.58 0 0 0-.247-.033l-.055-.004a.984.984 0 0 1-.481-.096c-.169-.132-.098-.51-.013-.676a.915.915 0 0 1 .701-.473c.139-.025.28-.037.42-.035.656.034 1.301.176 1.91.42 1.104.424 1.631 1.263 1.41 2.244a4.193 4.193 0 0 1-.908 1.714c-.128.161-.26.315-.392.471l-.07.083c-.282.32-.544.654-.788 1.003l-.144.206c-.161.209-.291.44-.385.687a.582.582 0 0 0 .32.743.91.91 0 0 0 .32.08c.175.021.356.044.428.21a.575.575 0 0 1-.035.477 1.144 1.144 0 0 1-1.138.581Zm-.877-8.193c.128.079.268.136.414.17.18.04.35.12.494.236.58.552.14 1.272-.318 1.903-.214.292-.47.58-.74.884l-.068.077c-.624.692-1.27 1.408-1.497 2.232a1.148 1.148 0 0 0 .163 1.06c.493.658 1.78.907 2.819.921l.035-.05-.025-.035a1.248 1.248 0 0 1-.865-.594 1.04 1.04 0 0 1 .006-.894 8.071 8.071 0 0 1 1.309-1.977l.127-.155c.171-.21.356-.437.525-.665.371-.501.844-1.245.664-1.915-.315-1.173-2.15-1.209-3.03-1.226h-.057l.044.028Z"
|
|
449
|
-
})
|
|
450
|
-
]
|
|
416
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
417
|
+
fill: "#BFF6F8",
|
|
418
|
+
d: "M20.83 11c0 5.43-4.4 9.83-9.83 9.83S1.17 16.43 1.17 11 5.57 1.17 11 1.17s9.83 4.4 9.83 9.83Z"
|
|
451
419
|
}),
|
|
452
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
420
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
421
|
+
fill: "#528693",
|
|
422
|
+
fillRule: "evenodd",
|
|
423
|
+
d: "M21.431 11c0 5.76-4.67 10.43-10.43 10.43C5.238 21.43.568 16.76.568 11S5.24.57 11 .57C16.76.57 21.431 5.24 21.431 11Zm-10.43 9.83c5.429 0 9.83-4.4 9.83-9.83s-4.401-9.83-9.83-9.83c-5.43 0-9.832 4.4-9.832 9.83S5.571 20.83 11 20.83Z",
|
|
424
|
+
clipRule: "evenodd"
|
|
425
|
+
}),
|
|
426
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
427
|
+
fill: "#fff",
|
|
428
|
+
d: "M14.814 6.317a.991.991 0 1 1-1.983 0 .991.991 0 0 1 1.983 0Z"
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
431
|
+
fill: "#528693",
|
|
432
|
+
fillRule: "evenodd",
|
|
433
|
+
d: "M15.415 6.317a1.592 1.592 0 1 1-3.184 0 1.592 1.592 0 0 1 3.184 0Zm-1.592.991a.991.991 0 1 0 0-1.982.991.991 0 0 0 0 1.982Z",
|
|
434
|
+
clipRule: "evenodd"
|
|
435
|
+
}),
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
437
|
+
fill: "#fff",
|
|
438
|
+
d: "m9.37 16.049 1.8.26-.22-.7-.78-.621.56-1.14 2.261-3.382-.34-1.381-1.92-1-1.261.14-.28.32 1.08.54.14.54-2.22 2.862-.821 2.36 2 1.202Z"
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("path", {
|
|
441
|
+
fill: "#528693",
|
|
442
|
+
d: "M10.476 16.666a4.93 4.93 0 0 1-2.096-.599c-1.114-.605-1.482-1.63-.961-2.673a9.606 9.606 0 0 1 1.437-1.963l.067-.077c.252-.293.513-.595.742-.897.288-.38.538-.745.443-1.031-.056-.164-.215-.282-.485-.362a1.58 1.58 0 0 0-.247-.033l-.055-.004a.984.984 0 0 1-.481-.096c-.169-.132-.098-.51-.013-.676a.915.915 0 0 1 .701-.473c.139-.025.28-.037.42-.035.656.034 1.301.176 1.91.42 1.104.424 1.631 1.263 1.41 2.244a4.193 4.193 0 0 1-.908 1.714c-.128.161-.26.315-.392.471l-.07.083c-.282.32-.544.654-.788 1.003l-.144.206c-.161.209-.291.44-.385.687a.582.582 0 0 0 .32.743.91.91 0 0 0 .32.08c.175.021.356.044.428.21a.575.575 0 0 1-.035.477 1.144 1.144 0 0 1-1.138.581Zm-.877-8.193c.128.079.268.136.414.17.18.04.35.12.494.236.58.552.14 1.272-.318 1.903-.214.292-.47.58-.74.884l-.068.077c-.624.692-1.27 1.408-1.497 2.232a1.148 1.148 0 0 0 .163 1.06c.493.658 1.78.907 2.819.921l.035-.05-.025-.035a1.248 1.248 0 0 1-.865-.594 1.04 1.04 0 0 1 .006-.894 8.071 8.071 0 0 1 1.309-1.977l.127-.155c.171-.21.356-.437.525-.665.371-.501.844-1.245.664-1.915-.315-1.173-2.15-1.209-3.03-1.226h-.057l.044.028Z"
|
|
460
443
|
})
|
|
461
444
|
]
|
|
462
445
|
});
|
|
@@ -560,59 +543,45 @@ var Warning = (0, import_react9.forwardRef)((delegated, ref) => {
|
|
|
560
543
|
viewBox: "0 0 22 22",
|
|
561
544
|
...delegated,
|
|
562
545
|
children: [
|
|
563
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
567
|
-
fill: "#FFDE99",
|
|
568
|
-
d: "M20.83 11c0 5.43-4.4 9.83-9.83 9.83S1.17 16.43 1.17 11 5.57 1.17 11 1.17s9.83 4.4 9.83 9.83Z"
|
|
569
|
-
}),
|
|
570
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
571
|
-
fill: "#528693",
|
|
572
|
-
fillRule: "evenodd",
|
|
573
|
-
d: "M21.43 11c0 5.76-4.67 10.43-10.43 10.43S.57 16.76.57 11 5.24.57 11 .57 21.43 5.24 21.43 11ZM11 20.83c5.43 0 9.83-4.4 9.83-9.83S16.43 1.17 11 1.17 1.17 5.57 1.17 11s4.4 9.83 9.83 9.83Z",
|
|
574
|
-
clipRule: "evenodd"
|
|
575
|
-
}),
|
|
576
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
577
|
-
fill: "#fff",
|
|
578
|
-
d: "M10.077 5.232c.41-.71 1.436-.71 1.846 0L17 14.025c.41.71-.103 1.599-.924 1.599H5.923c-.82 0-1.333-.889-.923-1.6l5.077-8.792Z"
|
|
579
|
-
}),
|
|
580
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
581
|
-
fill: "#528693",
|
|
582
|
-
fillRule: "evenodd",
|
|
583
|
-
d: "m16.48 14.325-5.077-8.793a.466.466 0 0 0-.806 0L5.52 14.325c-.18.31.045.699.403.699h10.153a.466.466 0 0 0 .404-.7Zm-4.557-9.093a1.066 1.066 0 0 0-1.846 0L5 14.025c-.41.71.103 1.599.923 1.599h10.153c.821 0 1.334-.889.924-1.6l-5.077-8.792Z",
|
|
584
|
-
clipRule: "evenodd"
|
|
585
|
-
}),
|
|
586
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
587
|
-
fill: "#FFDE99",
|
|
588
|
-
d: "M10.588 8.628a.5.5 0 1 1 1 0v2.475a.5.5 0 0 1-1 0V8.628Z"
|
|
589
|
-
}),
|
|
590
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
591
|
-
fill: "#528693",
|
|
592
|
-
fillRule: "evenodd",
|
|
593
|
-
d: "M12.188 8.628v2.475a1.1 1.1 0 0 1-2.2 0V8.628a1.1 1.1 0 1 1 2.2 0Zm-1.1-.5a.5.5 0 0 0-.5.5v2.475a.5.5 0 1 0 1 0V8.628a.5.5 0 0 0-.5-.5Z",
|
|
594
|
-
clipRule: "evenodd"
|
|
595
|
-
}),
|
|
596
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
597
|
-
fill: "#FFDE99",
|
|
598
|
-
d: "M11.588 13.403a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"
|
|
599
|
-
}),
|
|
600
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
601
|
-
fill: "#528693",
|
|
602
|
-
fillRule: "evenodd",
|
|
603
|
-
d: "M12.188 13.403a1.1 1.1 0 1 1-2.2 0 1.1 1.1 0 0 1 2.2 0Zm-1.1.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",
|
|
604
|
-
clipRule: "evenodd"
|
|
605
|
-
})
|
|
606
|
-
]
|
|
546
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
547
|
+
fill: "#FFDE99",
|
|
548
|
+
d: "M20.83 11c0 5.43-4.4 9.83-9.83 9.83S1.17 16.43 1.17 11 5.57 1.17 11 1.17s9.83 4.4 9.83 9.83Z"
|
|
607
549
|
}),
|
|
608
|
-
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
550
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
551
|
+
fill: "#528693",
|
|
552
|
+
fillRule: "evenodd",
|
|
553
|
+
d: "M21.43 11c0 5.76-4.67 10.43-10.43 10.43S.57 16.76.57 11 5.24.57 11 .57 21.43 5.24 21.43 11ZM11 20.83c5.43 0 9.83-4.4 9.83-9.83S16.43 1.17 11 1.17 1.17 5.57 1.17 11s4.4 9.83 9.83 9.83Z",
|
|
554
|
+
clipRule: "evenodd"
|
|
555
|
+
}),
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
557
|
+
fill: "#fff",
|
|
558
|
+
d: "M10.077 5.232c.41-.71 1.436-.71 1.846 0L17 14.025c.41.71-.103 1.599-.924 1.599H5.923c-.82 0-1.333-.889-.923-1.6l5.077-8.792Z"
|
|
559
|
+
}),
|
|
560
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
561
|
+
fill: "#528693",
|
|
562
|
+
fillRule: "evenodd",
|
|
563
|
+
d: "m16.48 14.325-5.077-8.793a.466.466 0 0 0-.806 0L5.52 14.325c-.18.31.045.699.403.699h10.153a.466.466 0 0 0 .404-.7Zm-4.557-9.093a1.066 1.066 0 0 0-1.846 0L5 14.025c-.41.71.103 1.599.923 1.599h10.153c.821 0 1.334-.889.924-1.6l-5.077-8.792Z",
|
|
564
|
+
clipRule: "evenodd"
|
|
565
|
+
}),
|
|
566
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
567
|
+
fill: "#FFDE99",
|
|
568
|
+
d: "M10.588 8.628a.5.5 0 1 1 1 0v2.475a.5.5 0 0 1-1 0V8.628Z"
|
|
569
|
+
}),
|
|
570
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
571
|
+
fill: "#528693",
|
|
572
|
+
fillRule: "evenodd",
|
|
573
|
+
d: "M12.188 8.628v2.475a1.1 1.1 0 0 1-2.2 0V8.628a1.1 1.1 0 1 1 2.2 0Zm-1.1-.5a.5.5 0 0 0-.5.5v2.475a.5.5 0 1 0 1 0V8.628a.5.5 0 0 0-.5-.5Z",
|
|
574
|
+
clipRule: "evenodd"
|
|
575
|
+
}),
|
|
576
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
577
|
+
fill: "#FFDE99",
|
|
578
|
+
d: "M11.588 13.403a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0Z"
|
|
579
|
+
}),
|
|
580
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", {
|
|
581
|
+
fill: "#528693",
|
|
582
|
+
fillRule: "evenodd",
|
|
583
|
+
d: "M12.188 13.403a1.1 1.1 0 1 1-2.2 0 1.1 1.1 0 0 1 2.2 0Zm-1.1.5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1Z",
|
|
584
|
+
clipRule: "evenodd"
|
|
616
585
|
})
|
|
617
586
|
]
|
|
618
587
|
});
|
|
@@ -633,12 +602,12 @@ var Icon = {
|
|
|
633
602
|
};
|
|
634
603
|
|
|
635
604
|
// src/action-menu/action-item.tsx
|
|
636
|
-
var
|
|
605
|
+
var import_class_variance_authority3 = require("class-variance-authority");
|
|
637
606
|
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
638
607
|
function Item2({ children, className, onSelect }) {
|
|
639
608
|
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownMenu.Item, {
|
|
640
609
|
onClick: onSelect,
|
|
641
|
-
className: (0,
|
|
610
|
+
className: (0, import_class_variance_authority3.cx)(
|
|
642
611
|
"items-center text-density cursor-pointer flex font-sans font-medium text-sm gap-2 py-2.5 px-5",
|
|
643
612
|
"hover:bg-[#f4f4f4]",
|
|
644
613
|
"[&.danger]:text-error",
|
|
@@ -650,17 +619,17 @@ function Item2({ children, className, onSelect }) {
|
|
|
650
619
|
|
|
651
620
|
// src/action-menu/action-menu.tsx
|
|
652
621
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
653
|
-
function ActionMenu({ children,
|
|
622
|
+
function ActionMenu({ children, tabIndex }) {
|
|
654
623
|
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenu.Root, {
|
|
655
624
|
content: children,
|
|
625
|
+
alignContent: "center",
|
|
656
626
|
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("button", {
|
|
657
627
|
tabIndex,
|
|
658
628
|
type: "button",
|
|
659
|
-
className: (0,
|
|
629
|
+
className: (0, import_class_variance_authority4.cx)(
|
|
660
630
|
"items-center bg-transparent rounded-full border-none cursor-pointer flex justify-center p-1",
|
|
661
631
|
"hover:bg-gray-6 focus:bg-gray-6 focus:outline-offset-2 focus:outline focus:outline-1 focus:outline-glacier focus-visible:outline-offset-2 focus-visible:outline focus-visible:outline-1 focus-visible:outline-glacier",
|
|
662
|
-
"active:scale-95"
|
|
663
|
-
className
|
|
632
|
+
"active:scale-95"
|
|
664
633
|
),
|
|
665
634
|
"aria-label": "more options",
|
|
666
635
|
children: [
|
|
@@ -677,10 +646,10 @@ ActionMenu.Item = Item2;
|
|
|
677
646
|
|
|
678
647
|
// src/button/button.tsx
|
|
679
648
|
var import_react10 = require("react");
|
|
680
|
-
var
|
|
649
|
+
var import_class_variance_authority5 = require("class-variance-authority");
|
|
681
650
|
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
682
651
|
var DEFAULT_TEXT_COLOR = "text-black-text disabled:text-black-text/50";
|
|
683
|
-
var buttonStyles = (0,
|
|
652
|
+
var buttonStyles = (0, import_class_variance_authority5.cva)(
|
|
684
653
|
[
|
|
685
654
|
"inline-grid grid-flow-col items-center gap-2 rounded border-none font-medium cursor-pointer whitespace-nowrap",
|
|
686
655
|
"disabled:cursor-default disabled:scale-100 disabled:drop-shadow-none",
|
|
@@ -723,20 +692,77 @@ var Button = (0, import_react10.forwardRef)(
|
|
|
723
692
|
);
|
|
724
693
|
Button.displayName = "Button";
|
|
725
694
|
|
|
695
|
+
// src/card/card.tsx
|
|
696
|
+
var import_class_variance_authority6 = require("class-variance-authority");
|
|
697
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
698
|
+
var cardStyles = (0, import_class_variance_authority6.cva)("rounded-lg p-4 sm:p-8", {
|
|
699
|
+
variants: {
|
|
700
|
+
variant: {
|
|
701
|
+
gray: "bg-jupiter",
|
|
702
|
+
white: "bg-white"
|
|
703
|
+
}
|
|
704
|
+
},
|
|
705
|
+
defaultVariants: {
|
|
706
|
+
variant: "gray"
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
function Card({ children, className, variant, ...delegated }) {
|
|
710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("section", {
|
|
711
|
+
className: cardStyles({ variant, className }),
|
|
712
|
+
...delegated,
|
|
713
|
+
children
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// src/checkbox/checkbox.tsx
|
|
718
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
719
|
+
var import_class_variance_authority7 = require("class-variance-authority");
|
|
720
|
+
var import_react11 = require("react");
|
|
721
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
722
|
+
var Checkbox = (0, import_react11.forwardRef)((props, ref) => {
|
|
723
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CheckboxPrimitive.Root, {
|
|
724
|
+
...props,
|
|
725
|
+
ref,
|
|
726
|
+
className: (0, import_class_variance_authority7.cx)(
|
|
727
|
+
"flex h-3.5 w-3.5 items-center justify-center rounded-sm border border-solid border-[#ddd] bg-white",
|
|
728
|
+
"focus:outline-none focus:ring-1 focus:ring-[#528693] focus:ring-offset-1",
|
|
729
|
+
"radix-state-checked:border-[#528693] radix-state-checked:bg-neptune",
|
|
730
|
+
"radix-state-checked:disabled:opacity-40 radix-state-unchecked:disabled:!bg-[#ddd]/20"
|
|
731
|
+
),
|
|
732
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(CheckboxPrimitive.Indicator, {
|
|
733
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("svg", {
|
|
734
|
+
viewBox: "0 0 9 9",
|
|
735
|
+
fill: "none",
|
|
736
|
+
className: "h-2 w-2",
|
|
737
|
+
children: [
|
|
738
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", {
|
|
739
|
+
d: "M1.12 5.51a.559.559 0 01.832-.101l2.201 1.953-.427.624a.326.326 0 01-.486.06L1.21 6.245a.559.559 0 01-.09-.734z",
|
|
740
|
+
fill: "#528693"
|
|
741
|
+
}),
|
|
742
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("path", {
|
|
743
|
+
d: "M7.883 1.087c.043.03.053.09.023.132L3.669 7.132l-.154-.105L7.754 1.11a.093.093 0 01.129-.023z",
|
|
744
|
+
stroke: "#528693"
|
|
745
|
+
})
|
|
746
|
+
]
|
|
747
|
+
})
|
|
748
|
+
})
|
|
749
|
+
});
|
|
750
|
+
});
|
|
751
|
+
Checkbox.displayName = "Checkbox";
|
|
752
|
+
|
|
726
753
|
// src/dialog/destroyFns.ts
|
|
727
754
|
var destroyFns = [];
|
|
728
755
|
|
|
729
756
|
// src/dialog/dialog.tsx
|
|
730
|
-
var import_clsx5 = __toESM(require("clsx"));
|
|
731
757
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
732
|
-
var
|
|
733
|
-
var
|
|
758
|
+
var import_class_variance_authority8 = require("class-variance-authority");
|
|
759
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
734
760
|
var IconMap = {
|
|
735
761
|
error: Icon.Error,
|
|
736
762
|
info: Icon.Info,
|
|
737
763
|
warning: Icon.Warning
|
|
738
764
|
};
|
|
739
|
-
var dialogContentStyles = (0,
|
|
765
|
+
var dialogContentStyles = (0, import_class_variance_authority8.cva)(
|
|
740
766
|
"bg-white rounded shadow fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 max-w-xl w-auto p-6",
|
|
741
767
|
{
|
|
742
768
|
variants: {
|
|
@@ -746,28 +772,29 @@ var dialogContentStyles = (0, import_class_variance_authority2.cva)(
|
|
|
746
772
|
}
|
|
747
773
|
}
|
|
748
774
|
);
|
|
749
|
-
function DialogContent({ children, closable = true, type, className, ...delegated }) {
|
|
775
|
+
function DialogContent({ children, closable = true, type, className, container, ...delegated }) {
|
|
750
776
|
const withIcon = typeof type !== "undefined";
|
|
751
777
|
const IconComponent = type && IconMap[type];
|
|
752
|
-
return /* @__PURE__ */ (0,
|
|
778
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DialogPrimitive.Portal, {
|
|
779
|
+
container,
|
|
753
780
|
children: [
|
|
754
|
-
/* @__PURE__ */ (0,
|
|
781
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogPrimitive.Overlay, {
|
|
755
782
|
className: "bg-black/30 fixed inset-0"
|
|
756
783
|
}),
|
|
757
|
-
/* @__PURE__ */ (0,
|
|
784
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(DialogPrimitive.Content, {
|
|
758
785
|
className: dialogContentStyles({ withIcon, class: className }),
|
|
759
786
|
...delegated,
|
|
760
787
|
children: [
|
|
761
|
-
IconComponent && /* @__PURE__ */ (0,
|
|
788
|
+
IconComponent && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconComponent, {
|
|
762
789
|
className: "my-1 shrink-0",
|
|
763
790
|
width: 32,
|
|
764
791
|
height: 32
|
|
765
792
|
}),
|
|
766
|
-
closable && /* @__PURE__ */ (0,
|
|
793
|
+
closable && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogClose, {
|
|
767
794
|
asChild: true,
|
|
768
|
-
children: /* @__PURE__ */ (0,
|
|
795
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Button, {
|
|
769
796
|
className: "absolute top-2.5 right-2.5 !rounded-full !p-0 h-6 w-6 inline-flex items-center justify-center !bg-transparent hover:!bg-gray-200 focus:!bg-gray-200 !drop-shadow-none",
|
|
770
|
-
children: /* @__PURE__ */ (0,
|
|
797
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Icon.Cancel, {
|
|
771
798
|
color: "density",
|
|
772
799
|
"aria-label": "Close",
|
|
773
800
|
height: 18,
|
|
@@ -775,7 +802,7 @@ function DialogContent({ children, closable = true, type, className, ...delegate
|
|
|
775
802
|
})
|
|
776
803
|
})
|
|
777
804
|
}),
|
|
778
|
-
/* @__PURE__ */ (0,
|
|
805
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", {
|
|
779
806
|
children
|
|
780
807
|
})
|
|
781
808
|
]
|
|
@@ -784,13 +811,13 @@ function DialogContent({ children, closable = true, type, className, ...delegate
|
|
|
784
811
|
});
|
|
785
812
|
}
|
|
786
813
|
function DialogTitle({ className, ...delegated }) {
|
|
787
|
-
return /* @__PURE__ */ (0,
|
|
788
|
-
className: (0,
|
|
814
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogPrimitive.Title, {
|
|
815
|
+
className: (0, import_class_variance_authority8.cx)("m-0 font-medium text-xl font-sans text-black-text", className),
|
|
789
816
|
...delegated
|
|
790
817
|
});
|
|
791
818
|
}
|
|
792
819
|
function DialogDescription(delegated) {
|
|
793
|
-
return /* @__PURE__ */ (0,
|
|
820
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogPrimitive.Description, {
|
|
794
821
|
className: "mt-2 mb-5 text-gray-600",
|
|
795
822
|
...delegated
|
|
796
823
|
});
|
|
@@ -799,7 +826,7 @@ var DialogTrigger = DialogPrimitive.Trigger;
|
|
|
799
826
|
var DialogClose = DialogPrimitive.Close;
|
|
800
827
|
var DialogRoot = DialogPrimitive.Root;
|
|
801
828
|
function DialogBase({ children, ...delegated }) {
|
|
802
|
-
return /* @__PURE__ */ (0,
|
|
829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(DialogRoot, {
|
|
803
830
|
...delegated,
|
|
804
831
|
children
|
|
805
832
|
});
|
|
@@ -814,7 +841,7 @@ DialogBase.Overlay = DialogPrimitive.Overlay;
|
|
|
814
841
|
var import_react_dom = require("react-dom");
|
|
815
842
|
|
|
816
843
|
// src/dialog/confirm-dialog.tsx
|
|
817
|
-
var
|
|
844
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
818
845
|
function ConfirmDialog({
|
|
819
846
|
open,
|
|
820
847
|
close,
|
|
@@ -831,37 +858,37 @@ function ConfirmDialog({
|
|
|
831
858
|
onPointerDownOutside,
|
|
832
859
|
type
|
|
833
860
|
}) {
|
|
834
|
-
const cancelButton = okCancel && /* @__PURE__ */ (0,
|
|
861
|
+
const cancelButton = okCancel && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, {
|
|
835
862
|
variant: "secondary",
|
|
836
863
|
onClick: () => {
|
|
837
|
-
onCancel
|
|
864
|
+
onCancel?.();
|
|
838
865
|
close();
|
|
839
866
|
},
|
|
840
867
|
children: cancelText
|
|
841
868
|
});
|
|
842
|
-
return /* @__PURE__ */ (0,
|
|
869
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogRoot, {
|
|
843
870
|
open,
|
|
844
871
|
onOpenChange: () => close(),
|
|
845
|
-
children: /* @__PURE__ */ (0,
|
|
872
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Dialog.Content, {
|
|
846
873
|
onEscapeKeyDown,
|
|
847
874
|
onInteractOutside,
|
|
848
875
|
onPointerDownOutside,
|
|
849
876
|
type,
|
|
850
877
|
children: [
|
|
851
|
-
title && /* @__PURE__ */ (0,
|
|
878
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog.Title, {
|
|
852
879
|
children: title
|
|
853
880
|
}),
|
|
854
|
-
description && /* @__PURE__ */ (0,
|
|
881
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Dialog.Description, {
|
|
855
882
|
children: description
|
|
856
883
|
}),
|
|
857
884
|
content,
|
|
858
|
-
/* @__PURE__ */ (0,
|
|
885
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", {
|
|
859
886
|
className: "flex items-center gap-4 mt-4 justify-end",
|
|
860
887
|
children: [
|
|
861
888
|
cancelButton,
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
889
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, {
|
|
863
890
|
onClick: () => {
|
|
864
|
-
onOk
|
|
891
|
+
onOk?.();
|
|
865
892
|
close();
|
|
866
893
|
},
|
|
867
894
|
children: okText
|
|
@@ -874,7 +901,7 @@ function ConfirmDialog({
|
|
|
874
901
|
}
|
|
875
902
|
|
|
876
903
|
// src/dialog/config.tsx
|
|
877
|
-
var
|
|
904
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
878
905
|
function confirm(config) {
|
|
879
906
|
const container = document.createDocumentFragment();
|
|
880
907
|
let currentConfig = { ...config, close, open: true };
|
|
@@ -910,7 +937,7 @@ function confirm(config) {
|
|
|
910
937
|
function render({ okText, cancelText, ...delegated }) {
|
|
911
938
|
clearTimeout(timeoutId);
|
|
912
939
|
timeoutId = setTimeout(() => {
|
|
913
|
-
(0, import_react_dom.render)(/* @__PURE__ */ (0,
|
|
940
|
+
(0, import_react_dom.render)(/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(ConfirmDialog, {
|
|
914
941
|
...delegated,
|
|
915
942
|
okText,
|
|
916
943
|
cancelText
|
|
@@ -1011,12 +1038,315 @@ function destroyAll() {
|
|
|
1011
1038
|
}
|
|
1012
1039
|
}
|
|
1013
1040
|
}
|
|
1041
|
+
|
|
1042
|
+
// src/icon-button/icon-button.tsx
|
|
1043
|
+
var import_react12 = require("react");
|
|
1044
|
+
var import_class_variance_authority9 = require("class-variance-authority");
|
|
1045
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1046
|
+
var buttonStyles2 = (0, import_class_variance_authority9.cva)(
|
|
1047
|
+
[
|
|
1048
|
+
"flex items-center justify-center rounded-full font-medium cursor-pointer",
|
|
1049
|
+
"disabled:cursor-default disabled:scale-100 disabled:shadow-none",
|
|
1050
|
+
"active:scale-95",
|
|
1051
|
+
"focus:shadow focus:bg-slate-200",
|
|
1052
|
+
"hover:shadow hover:bg-slate-200",
|
|
1053
|
+
"focus-visible:outline-inherit focus-visible:outline-offset-1 focus-visible:outline focus-visible:outline-1"
|
|
1054
|
+
],
|
|
1055
|
+
{
|
|
1056
|
+
variants: {
|
|
1057
|
+
size: {
|
|
1058
|
+
xs: "h-8 w-8",
|
|
1059
|
+
sm: "h-9 w-9",
|
|
1060
|
+
md: "h-10 w-10",
|
|
1061
|
+
lg: "h-10 w-10",
|
|
1062
|
+
xl: "h-11 w-11"
|
|
1063
|
+
}
|
|
1064
|
+
},
|
|
1065
|
+
defaultVariants: {
|
|
1066
|
+
size: "sm"
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
);
|
|
1070
|
+
var IconButton = (0, import_react12.forwardRef)(
|
|
1071
|
+
({ children, className, type = "button", size, ...delegated }, ref) => {
|
|
1072
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", {
|
|
1073
|
+
ref,
|
|
1074
|
+
type,
|
|
1075
|
+
className: buttonStyles2({ size, className }),
|
|
1076
|
+
...delegated,
|
|
1077
|
+
children
|
|
1078
|
+
});
|
|
1079
|
+
}
|
|
1080
|
+
);
|
|
1081
|
+
IconButton.displayName = "Button";
|
|
1082
|
+
|
|
1083
|
+
// src/inline-radio/inline-radio.tsx
|
|
1084
|
+
var RadioGroupPrimitive = __toESM(require("@radix-ui/react-radio-group"));
|
|
1085
|
+
var import_class_variance_authority10 = require("class-variance-authority");
|
|
1086
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1087
|
+
function InlineRadioGroup(delegated) {
|
|
1088
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RadioGroupPrimitive.Root, {
|
|
1089
|
+
...delegated,
|
|
1090
|
+
className: "inline-flex space-x-1 rounded-sm bg-[#9095a81a] p-[3px]"
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
function InlineRadioItem({ children, className, ...delegated }) {
|
|
1094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RadioGroupPrimitive.Item, {
|
|
1095
|
+
...delegated,
|
|
1096
|
+
className: (0, import_class_variance_authority10.cx)(
|
|
1097
|
+
"m-0 p-0",
|
|
1098
|
+
"flex cursor-pointer items-center justify-center rounded border-none bg-transparent text-sm leading-none text-zinc-800",
|
|
1099
|
+
"disabled:cursor-not-allowed",
|
|
1100
|
+
"radix-state-checked:bg-white radix-state-checked:shadow-sm",
|
|
1101
|
+
"focus:outline-neptune",
|
|
1102
|
+
className
|
|
1103
|
+
),
|
|
1104
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(RadioGroupPrimitive.Indicator, {
|
|
1105
|
+
forceMount: true,
|
|
1106
|
+
children
|
|
1107
|
+
})
|
|
1108
|
+
});
|
|
1109
|
+
}
|
|
1110
|
+
var InlineRadio = {
|
|
1111
|
+
Group: InlineRadioGroup,
|
|
1112
|
+
Item: InlineRadioItem
|
|
1113
|
+
};
|
|
1114
|
+
|
|
1115
|
+
// src/input/input.tsx
|
|
1116
|
+
var import_class_variance_authority11 = require("class-variance-authority");
|
|
1117
|
+
var import_react13 = require("react");
|
|
1118
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1119
|
+
var inputStyles = (0, import_class_variance_authority11.cva)(
|
|
1120
|
+
[
|
|
1121
|
+
"p-0 border-none text-zinc-800",
|
|
1122
|
+
"focus:outline-none",
|
|
1123
|
+
"placeholder:italic placeholder:font-light placeholder:text-gray-400 placeholder:text-sm",
|
|
1124
|
+
"disabled:cursor-default"
|
|
1125
|
+
],
|
|
1126
|
+
{
|
|
1127
|
+
variants: {
|
|
1128
|
+
paper: {
|
|
1129
|
+
white: "bg-white",
|
|
1130
|
+
gray: "bg-jupiter"
|
|
1131
|
+
}
|
|
1132
|
+
},
|
|
1133
|
+
defaultVariants: {
|
|
1134
|
+
paper: "gray"
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
);
|
|
1138
|
+
var Input = (0, import_react13.forwardRef)(({ className, paper, ...delegated }, ref) => {
|
|
1139
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("input", {
|
|
1140
|
+
ref,
|
|
1141
|
+
className: inputStyles({ className, paper }),
|
|
1142
|
+
type: "text",
|
|
1143
|
+
...delegated
|
|
1144
|
+
});
|
|
1145
|
+
});
|
|
1146
|
+
Input.displayName = "Input";
|
|
1147
|
+
|
|
1148
|
+
// src/label/label.tsx
|
|
1149
|
+
var import_react14 = require("react");
|
|
1150
|
+
var import_class_variance_authority12 = require("class-variance-authority");
|
|
1151
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1152
|
+
var Label2 = (0, import_react14.forwardRef)(({ className, ...delegated }, ref) => {
|
|
1153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("label", {
|
|
1154
|
+
ref,
|
|
1155
|
+
className: (0, import_class_variance_authority12.cx)("text-xs font-medium text-gray-400", className),
|
|
1156
|
+
...delegated
|
|
1157
|
+
});
|
|
1158
|
+
});
|
|
1159
|
+
Label2.displayName = "Label";
|
|
1160
|
+
|
|
1161
|
+
// src/progress/progress.tsx
|
|
1162
|
+
var ProgressPrimitives = __toESM(require("@radix-ui/react-progress"));
|
|
1163
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1164
|
+
function Progress({ value }) {
|
|
1165
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ProgressPrimitives.Root, {
|
|
1166
|
+
className: "relative overflow-hidden rounded-full w-full h-6 bg-neutral-200",
|
|
1167
|
+
value,
|
|
1168
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ProgressPrimitives.Indicator, {
|
|
1169
|
+
className: "bg-[#50dbdc] w-full h-full transform ease-linear duration-500",
|
|
1170
|
+
style: { transform: `translateX(-${100 - value}%)` }
|
|
1171
|
+
})
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
// src/radio/radio.tsx
|
|
1176
|
+
var RadioGroupPrimitive2 = __toESM(require("@radix-ui/react-radio-group"));
|
|
1177
|
+
var import_class_variance_authority13 = require("class-variance-authority");
|
|
1178
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1179
|
+
function RadioGroupItem(props) {
|
|
1180
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadioGroupPrimitive2.Item, {
|
|
1181
|
+
...props,
|
|
1182
|
+
className: (0, import_class_variance_authority13.cx)(
|
|
1183
|
+
"flex h-3 w-3 flex-shrink-0 items-center justify-center rounded-full border border-solid border-[#ddd] bg-white p-0",
|
|
1184
|
+
"focus:outline-none",
|
|
1185
|
+
"disabled:bg-[#ddd]/20",
|
|
1186
|
+
"radix-state-checked:border-[#528693] radix-state-checked:bg-neptune"
|
|
1187
|
+
),
|
|
1188
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(RadioGroupPrimitive2.Indicator, {
|
|
1189
|
+
className: (0, import_class_variance_authority13.cx)("block h-[6px] w-[6px] rounded-full bg-[#528693]")
|
|
1190
|
+
})
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
var Radio = {
|
|
1194
|
+
Group: RadioGroupPrimitive2.Root,
|
|
1195
|
+
Item: RadioGroupItem
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
// src/select/select-item.tsx
|
|
1199
|
+
var import_react15 = require("react");
|
|
1200
|
+
var SelectPrimitives = __toESM(require("@radix-ui/react-select"));
|
|
1201
|
+
var import_class_variance_authority14 = require("class-variance-authority");
|
|
1202
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1203
|
+
var SelectItem = (0, import_react15.forwardRef)((props, ref) => {
|
|
1204
|
+
const { children, ...delegated } = props;
|
|
1205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(SelectPrimitives.Item, {
|
|
1206
|
+
className: (0, import_class_variance_authority14.cx)(
|
|
1207
|
+
"flex cursor-pointer items-center whitespace-nowrap px-6 py-2 font-medium",
|
|
1208
|
+
"focus:bg-neptune/20",
|
|
1209
|
+
"hover:bg-neptune/20"
|
|
1210
|
+
),
|
|
1211
|
+
ref,
|
|
1212
|
+
...delegated,
|
|
1213
|
+
children: [
|
|
1214
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectPrimitives.ItemText, {
|
|
1215
|
+
children
|
|
1216
|
+
}),
|
|
1217
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SelectPrimitives.ItemIndicator, {})
|
|
1218
|
+
]
|
|
1219
|
+
});
|
|
1220
|
+
});
|
|
1221
|
+
SelectItem.displayName = "SelectItem";
|
|
1222
|
+
|
|
1223
|
+
// src/select/select-root.tsx
|
|
1224
|
+
var import_react16 = require("react");
|
|
1225
|
+
var SelectPrimitives2 = __toESM(require("@radix-ui/react-select"));
|
|
1226
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1227
|
+
var SelectContainer = (0, import_react16.forwardRef)(
|
|
1228
|
+
({ children, id, placeholder, disabled, ...delegated }, ref) => {
|
|
1229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(SelectPrimitives2.Root, {
|
|
1230
|
+
...delegated,
|
|
1231
|
+
children: [
|
|
1232
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(SelectPrimitives2.Trigger, {
|
|
1233
|
+
ref,
|
|
1234
|
+
className: "inline-flex cursor-pointer items-center justify-center gap-4 whitespace-nowrap rounded border-0 bg-white px-4 py-3 text-sm font-medium text-black-text shadow disabled:cursor-default disabled:opacity-50",
|
|
1235
|
+
disabled,
|
|
1236
|
+
id,
|
|
1237
|
+
children: [
|
|
1238
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitives2.Value, {
|
|
1239
|
+
placeholder: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", {
|
|
1240
|
+
className: "italic text-label",
|
|
1241
|
+
children: placeholder ?? "Select..."
|
|
1242
|
+
})
|
|
1243
|
+
}),
|
|
1244
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Icon.Arrow, {})
|
|
1245
|
+
]
|
|
1246
|
+
}),
|
|
1247
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitives2.Portal, {
|
|
1248
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(SelectPrimitives2.Content, {
|
|
1249
|
+
className: "overflow-hidden rounded bg-white text-black-text shadow",
|
|
1250
|
+
children: [
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitives2.ScrollUpButton, {}),
|
|
1252
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitives2.Viewport, {
|
|
1253
|
+
className: "py-2",
|
|
1254
|
+
children
|
|
1255
|
+
}),
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectPrimitives2.ScrollDownButton, {})
|
|
1257
|
+
]
|
|
1258
|
+
})
|
|
1259
|
+
})
|
|
1260
|
+
]
|
|
1261
|
+
});
|
|
1262
|
+
}
|
|
1263
|
+
);
|
|
1264
|
+
SelectContainer.displayName = "Select";
|
|
1265
|
+
|
|
1266
|
+
// src/select/select.ts
|
|
1267
|
+
var Select = {
|
|
1268
|
+
Container: SelectContainer,
|
|
1269
|
+
Item: SelectItem
|
|
1270
|
+
};
|
|
1271
|
+
|
|
1272
|
+
// src/text-field/text-field.tsx
|
|
1273
|
+
var import_react17 = require("react");
|
|
1274
|
+
var import_class_variance_authority15 = require("class-variance-authority");
|
|
1275
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
1276
|
+
var textFieldStyles = (0, import_class_variance_authority15.cva)(
|
|
1277
|
+
["relative gap-3 flex flex-col p-3 text-sm font-medium text-gray-400 rounded border border-transparent border-solid"],
|
|
1278
|
+
{
|
|
1279
|
+
variants: {
|
|
1280
|
+
variant: {
|
|
1281
|
+
outlined: "",
|
|
1282
|
+
filled: "",
|
|
1283
|
+
standard: ""
|
|
1284
|
+
},
|
|
1285
|
+
raised: {
|
|
1286
|
+
sm: "shadow-sm",
|
|
1287
|
+
md: "shadow-md",
|
|
1288
|
+
lg: "shadow-lg"
|
|
1289
|
+
},
|
|
1290
|
+
paper: {
|
|
1291
|
+
white: "bg-white",
|
|
1292
|
+
gray: "bg-jupiter"
|
|
1293
|
+
},
|
|
1294
|
+
error: {
|
|
1295
|
+
true: "border-rose-800 text-rose-800"
|
|
1296
|
+
}
|
|
1297
|
+
},
|
|
1298
|
+
defaultVariants: {
|
|
1299
|
+
variant: "standard",
|
|
1300
|
+
paper: "white"
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
);
|
|
1304
|
+
var TextField = (0, import_react17.forwardRef)(
|
|
1305
|
+
({ variant, raised, className, label, paper, endAdornment, error, ...delegated }, ref) => {
|
|
1306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_jsx_runtime29.Fragment, {
|
|
1307
|
+
children: [
|
|
1308
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("label", {
|
|
1309
|
+
className: textFieldStyles({ variant, raised, paper, error: Boolean(error), className }),
|
|
1310
|
+
children: [
|
|
1311
|
+
label,
|
|
1312
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(Input, {
|
|
1313
|
+
ref,
|
|
1314
|
+
className: "w-10/12 text-ellipsis overflow-hidden",
|
|
1315
|
+
type: "text",
|
|
1316
|
+
...delegated
|
|
1317
|
+
}),
|
|
1318
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", {
|
|
1319
|
+
className: "absolute right-1 top-2/3 -translate-y-1/2 ",
|
|
1320
|
+
children: endAdornment
|
|
1321
|
+
})
|
|
1322
|
+
]
|
|
1323
|
+
}),
|
|
1324
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", {
|
|
1325
|
+
className: "text-rose-800 text-sm px-3 !mt-1",
|
|
1326
|
+
children: error
|
|
1327
|
+
})
|
|
1328
|
+
]
|
|
1329
|
+
});
|
|
1330
|
+
}
|
|
1331
|
+
);
|
|
1332
|
+
TextField.displayName = "TextField";
|
|
1014
1333
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1015
1334
|
0 && (module.exports = {
|
|
1016
1335
|
ActionMenu,
|
|
1017
1336
|
Button,
|
|
1337
|
+
Card,
|
|
1338
|
+
Checkbox,
|
|
1018
1339
|
Dialog,
|
|
1019
1340
|
DropdownMenu,
|
|
1341
|
+
Icon,
|
|
1342
|
+
IconButton,
|
|
1343
|
+
InlineRadio,
|
|
1344
|
+
Input,
|
|
1345
|
+
Label,
|
|
1346
|
+
Progress,
|
|
1347
|
+
Radio,
|
|
1348
|
+
Select,
|
|
1349
|
+
TextField,
|
|
1020
1350
|
destroyAll,
|
|
1021
1351
|
showConfirm,
|
|
1022
1352
|
showDialog,
|