atomos_next_genesis 0.0.3-alpha → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +250 -249
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +79 -80
- package/dist/index.d.ts +79 -80
- package/dist/index.js +41 -40
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// app/components/Accordian.tsx
|
|
2
|
-
import
|
|
2
|
+
import React, { useState } from "react";
|
|
3
3
|
|
|
4
4
|
// app/utils/utils.tsx
|
|
5
5
|
import clsx from "clsx";
|
|
@@ -26,9 +26,9 @@ function Accordion({
|
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
29
|
+
return /* @__PURE__ */ React.createElement("div", { className }, React.Children.map(children, (child) => {
|
|
30
|
+
if (React.isValidElement(child)) {
|
|
31
|
+
return React.cloneElement(
|
|
32
32
|
child,
|
|
33
33
|
{
|
|
34
34
|
openItems,
|
|
@@ -53,7 +53,7 @@ function AccordionItem({
|
|
|
53
53
|
handleToggle(value);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
return /* @__PURE__ */
|
|
56
|
+
return /* @__PURE__ */ React.createElement(
|
|
57
57
|
"div",
|
|
58
58
|
{
|
|
59
59
|
className: cn(
|
|
@@ -63,13 +63,13 @@ function AccordionItem({
|
|
|
63
63
|
className
|
|
64
64
|
)
|
|
65
65
|
},
|
|
66
|
-
/* @__PURE__ */
|
|
66
|
+
/* @__PURE__ */ React.createElement(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
className: "font-semibold transition-all duration-300 ease-in-out",
|
|
70
70
|
onClick: toggle
|
|
71
71
|
},
|
|
72
|
-
children && Array.isArray(children) ? /* @__PURE__ */
|
|
72
|
+
children && Array.isArray(children) ? /* @__PURE__ */ React.createElement(React.Fragment, null, React.cloneElement(children[0], { isOpen }), /* @__PURE__ */ React.createElement(
|
|
73
73
|
"div",
|
|
74
74
|
{
|
|
75
75
|
className: cn(
|
|
@@ -77,13 +77,13 @@ function AccordionItem({
|
|
|
77
77
|
isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
78
78
|
)
|
|
79
79
|
},
|
|
80
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ React.createElement("div", { className: "overflow-hidden" }, /* @__PURE__ */ React.createElement("div", { className: cn("") }, children[1]))
|
|
81
81
|
)) : children
|
|
82
82
|
)
|
|
83
83
|
);
|
|
84
84
|
}
|
|
85
85
|
function AccordionTrigger({ isOpen, children }) {
|
|
86
|
-
return /* @__PURE__ */
|
|
86
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex p-3.5 justify-between items-center text-sm font-semibold transition-all delay-150 ease-in" }, children, /* @__PURE__ */ React.createElement(
|
|
87
87
|
"span",
|
|
88
88
|
{
|
|
89
89
|
className: cn(
|
|
@@ -91,11 +91,11 @@ function AccordionTrigger({ isOpen, children }) {
|
|
|
91
91
|
isOpen ? "rotate-180" : "rotate-0"
|
|
92
92
|
)
|
|
93
93
|
},
|
|
94
|
-
/* @__PURE__ */
|
|
94
|
+
/* @__PURE__ */ React.createElement(RiArrowDownSLine, { size: 18 })
|
|
95
95
|
));
|
|
96
96
|
}
|
|
97
97
|
function AccordionContent({ isOpen, children }) {
|
|
98
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ React.createElement(
|
|
99
99
|
"div",
|
|
100
100
|
{
|
|
101
101
|
className: cn(
|
|
@@ -109,7 +109,7 @@ function AccordionContent({ isOpen, children }) {
|
|
|
109
109
|
|
|
110
110
|
// app/components/Avatar.tsx
|
|
111
111
|
import Image from "next/image";
|
|
112
|
-
import
|
|
112
|
+
import React2, { forwardRef } from "react";
|
|
113
113
|
var Avatar = forwardRef((props, ref) => {
|
|
114
114
|
const {
|
|
115
115
|
type,
|
|
@@ -131,7 +131,7 @@ var Avatar = forwardRef((props, ref) => {
|
|
|
131
131
|
lg: "w-16 h-16"
|
|
132
132
|
};
|
|
133
133
|
const displayText = type === "text" && props.text ? props.text.length === 2 ? props.text.toUpperCase() : props.text.split(" ").map((word) => word.charAt(0).toUpperCase()).join("").slice(0, 2) : "";
|
|
134
|
-
return /* @__PURE__ */
|
|
134
|
+
return /* @__PURE__ */ React2.createElement(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
ref,
|
|
@@ -147,7 +147,7 @@ var Avatar = forwardRef((props, ref) => {
|
|
|
147
147
|
borderRadius: radius
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
|
-
type === "image" && /* @__PURE__ */
|
|
150
|
+
type === "image" && /* @__PURE__ */ React2.createElement(
|
|
151
151
|
"div",
|
|
152
152
|
{
|
|
153
153
|
className: cn(
|
|
@@ -157,7 +157,7 @@ var Avatar = forwardRef((props, ref) => {
|
|
|
157
157
|
),
|
|
158
158
|
onClick
|
|
159
159
|
},
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ React2.createElement(
|
|
161
161
|
Image,
|
|
162
162
|
{
|
|
163
163
|
fill: true,
|
|
@@ -167,7 +167,7 @@ var Avatar = forwardRef((props, ref) => {
|
|
|
167
167
|
}
|
|
168
168
|
)
|
|
169
169
|
),
|
|
170
|
-
type === "icon" && /* @__PURE__ */
|
|
170
|
+
type === "icon" && /* @__PURE__ */ React2.createElement(
|
|
171
171
|
"div",
|
|
172
172
|
{
|
|
173
173
|
className: cn(
|
|
@@ -180,7 +180,7 @@ var Avatar = forwardRef((props, ref) => {
|
|
|
180
180
|
},
|
|
181
181
|
props.icon
|
|
182
182
|
),
|
|
183
|
-
type === "text" && /* @__PURE__ */
|
|
183
|
+
type === "text" && /* @__PURE__ */ React2.createElement(
|
|
184
184
|
"p",
|
|
185
185
|
{
|
|
186
186
|
onClick,
|
|
@@ -196,7 +196,7 @@ var Avatar = forwardRef((props, ref) => {
|
|
|
196
196
|
},
|
|
197
197
|
displayText
|
|
198
198
|
),
|
|
199
|
-
statusIcon && /* @__PURE__ */
|
|
199
|
+
statusIcon && /* @__PURE__ */ React2.createElement(
|
|
200
200
|
"span",
|
|
201
201
|
{
|
|
202
202
|
className: cn(
|
|
@@ -241,26 +241,26 @@ Avatar.displayName = "Avatar";
|
|
|
241
241
|
var Avatar_default = Avatar;
|
|
242
242
|
|
|
243
243
|
// app/components/AvatarGroup.tsx
|
|
244
|
-
import
|
|
244
|
+
import React3, { forwardRef as forwardRef2 } from "react";
|
|
245
245
|
var AvatarGroup = forwardRef2(
|
|
246
246
|
({ avatars, size = "md", max, className }, ref) => {
|
|
247
247
|
const displayAvatars = max ? avatars.slice(0, max) : avatars;
|
|
248
248
|
const remainingCount = max ? avatars.length - max : 0;
|
|
249
|
-
return /* @__PURE__ */
|
|
249
|
+
return /* @__PURE__ */ React3.createElement(
|
|
250
250
|
"div",
|
|
251
251
|
{
|
|
252
252
|
ref,
|
|
253
253
|
className: cn("flex -space-x-6 rtl:space-x-reverse", className)
|
|
254
254
|
},
|
|
255
|
-
displayAvatars.map((avatar, index) => /* @__PURE__ */
|
|
255
|
+
displayAvatars.map((avatar, index) => /* @__PURE__ */ React3.createElement(
|
|
256
256
|
"div",
|
|
257
257
|
{
|
|
258
258
|
className: "hover:-translate-x-3 transition-all duration-200",
|
|
259
259
|
key: index
|
|
260
260
|
},
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ React3.createElement(Avatar_default, { ...avatar, size })
|
|
262
262
|
)),
|
|
263
|
-
remainingCount > 0 && /* @__PURE__ */
|
|
263
|
+
remainingCount > 0 && /* @__PURE__ */ React3.createElement("div", null, /* @__PURE__ */ React3.createElement(
|
|
264
264
|
Avatar_default,
|
|
265
265
|
{
|
|
266
266
|
type: "text",
|
|
@@ -277,23 +277,23 @@ AvatarGroup.displayName = "AvatarGroup";
|
|
|
277
277
|
var AvatarGroup_default = AvatarGroup;
|
|
278
278
|
|
|
279
279
|
// app/components/Breadcrumb.tsx
|
|
280
|
-
import
|
|
280
|
+
import React4 from "react";
|
|
281
281
|
var Breadcrumbs = ({
|
|
282
282
|
children,
|
|
283
283
|
separator = "/",
|
|
284
284
|
"aria-label": ariaLabel,
|
|
285
285
|
containerClasses
|
|
286
286
|
}) => {
|
|
287
|
-
const items =
|
|
288
|
-
const isLast = index ===
|
|
289
|
-
return /* @__PURE__ */
|
|
287
|
+
const items = React4.Children.toArray(children).map((child, index) => {
|
|
288
|
+
const isLast = index === React4.Children.count(children) - 1;
|
|
289
|
+
return /* @__PURE__ */ React4.createElement("span", { key: index, className: "flex items-center text-text-xs text-gray-700 font-semibold" }, child, !isLast && /* @__PURE__ */ React4.createElement("span", { className: "mx-[6px]" }, separator));
|
|
290
290
|
});
|
|
291
|
-
return /* @__PURE__ */
|
|
291
|
+
return /* @__PURE__ */ React4.createElement("nav", { "aria-label": ariaLabel, className: `flex items-center text-text-xs text-gray-700 font-semibold ${containerClasses}` }, items);
|
|
292
292
|
};
|
|
293
293
|
var Breadcrumb_default = Breadcrumbs;
|
|
294
294
|
|
|
295
295
|
// app/components/Button.tsx
|
|
296
|
-
import
|
|
296
|
+
import React5 from "react";
|
|
297
297
|
import { cva } from "class-variance-authority";
|
|
298
298
|
var buttonVariants = cva(
|
|
299
299
|
"rounded-lg disabled:select-none font-semibold cursor-pointer transition-colors duration-300 ease-in-out",
|
|
@@ -339,7 +339,7 @@ var Button = ({
|
|
|
339
339
|
size,
|
|
340
340
|
...props
|
|
341
341
|
}) => {
|
|
342
|
-
return /* @__PURE__ */
|
|
342
|
+
return /* @__PURE__ */ React5.createElement(
|
|
343
343
|
"button",
|
|
344
344
|
{
|
|
345
345
|
...props,
|
|
@@ -358,7 +358,7 @@ var Button = ({
|
|
|
358
358
|
var Button_default = Button;
|
|
359
359
|
|
|
360
360
|
// app/components/Checkbox.tsx
|
|
361
|
-
import
|
|
361
|
+
import React6, { forwardRef as forwardRef3 } from "react";
|
|
362
362
|
import { cva as cva2 } from "class-variance-authority";
|
|
363
363
|
var checkboxVariant = cva2(
|
|
364
364
|
"peer relative cursor-pointer appearance-none rounded-[4px] border border-gray-300 transition-all checked:border-primary-600 checked:bg-primary-50 hover:bg-primary-50 disabled:opacity-30 disabled:pointer-events-none",
|
|
@@ -376,7 +376,7 @@ var checkboxVariant = cva2(
|
|
|
376
376
|
);
|
|
377
377
|
var Checkbox = forwardRef3(
|
|
378
378
|
({ disabled, checked, size, className, children, ...props }, ref) => {
|
|
379
|
-
return /* @__PURE__ */
|
|
379
|
+
return /* @__PURE__ */ React6.createElement("div", { className: "inline-flex relative items-center" }, /* @__PURE__ */ React6.createElement(
|
|
380
380
|
"input",
|
|
381
381
|
{
|
|
382
382
|
type: "checkbox",
|
|
@@ -386,7 +386,7 @@ var Checkbox = forwardRef3(
|
|
|
386
386
|
checked,
|
|
387
387
|
className: cn(checkboxVariant({ className, size }))
|
|
388
388
|
}
|
|
389
|
-
), /* @__PURE__ */
|
|
389
|
+
), /* @__PURE__ */ React6.createElement("span", { className: "absolute text-primary-600 transition-opacity opacity-0 pointer-events-none top-2/4 left-2/4 -translate-y-2/4 -translate-x-2/4 peer-checked:opacity-100" }, /* @__PURE__ */ React6.createElement(
|
|
390
390
|
"svg",
|
|
391
391
|
{
|
|
392
392
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -396,7 +396,7 @@ var Checkbox = forwardRef3(
|
|
|
396
396
|
stroke: "currentColor",
|
|
397
397
|
strokeWidth: "1"
|
|
398
398
|
},
|
|
399
|
-
/* @__PURE__ */
|
|
399
|
+
/* @__PURE__ */ React6.createElement(
|
|
400
400
|
"path",
|
|
401
401
|
{
|
|
402
402
|
fillRule: "evenodd",
|
|
@@ -411,7 +411,7 @@ Checkbox.displayName = "Checkbox";
|
|
|
411
411
|
var Checkbox_default = Checkbox;
|
|
412
412
|
|
|
413
413
|
// app/components/Chip.tsx
|
|
414
|
-
import
|
|
414
|
+
import React7 from "react";
|
|
415
415
|
import { cva as cva3 } from "class-variance-authority";
|
|
416
416
|
var chipVariants = cva3(
|
|
417
417
|
"rounded-full capitalize flex items-center w-fit gap-2",
|
|
@@ -468,7 +468,7 @@ var Chip = ({
|
|
|
468
468
|
dotColor
|
|
469
469
|
}) => {
|
|
470
470
|
const resolvedIntent = intent ?? "default";
|
|
471
|
-
return /* @__PURE__ */
|
|
471
|
+
return /* @__PURE__ */ React7.createElement("div", { className: cn(chipVariants({ intent: resolvedIntent, size }), className) }, dot && /* @__PURE__ */ React7.createElement(
|
|
472
472
|
"span",
|
|
473
473
|
{
|
|
474
474
|
className: cn(
|
|
@@ -477,11 +477,12 @@ var Chip = ({
|
|
|
477
477
|
// Default fallback
|
|
478
478
|
)
|
|
479
479
|
}
|
|
480
|
-
), /* @__PURE__ */
|
|
480
|
+
), /* @__PURE__ */ React7.createElement("span", null, children));
|
|
481
481
|
};
|
|
482
482
|
var Chip_default = Chip;
|
|
483
483
|
|
|
484
484
|
// app/components/CircularProgress.tsx
|
|
485
|
+
import React8 from "react";
|
|
485
486
|
var CircularProgressBar = ({
|
|
486
487
|
percentage,
|
|
487
488
|
size = 160,
|
|
@@ -493,7 +494,7 @@ var CircularProgressBar = ({
|
|
|
493
494
|
const viewBox = `0 0 ${size} ${size}`;
|
|
494
495
|
const dashArray = radius * Math.PI * 2;
|
|
495
496
|
const dashOffset = dashArray - dashArray * (percentage || 0) / 100;
|
|
496
|
-
return /* @__PURE__ */
|
|
497
|
+
return /* @__PURE__ */ React8.createElement("svg", { width: size, height: size, viewBox }, /* @__PURE__ */ React8.createElement(
|
|
497
498
|
"circle",
|
|
498
499
|
{
|
|
499
500
|
className: "fill-none stroke-gray-200",
|
|
@@ -502,7 +503,7 @@ var CircularProgressBar = ({
|
|
|
502
503
|
r: radius,
|
|
503
504
|
strokeWidth: `${strokeWidth}px`
|
|
504
505
|
}
|
|
505
|
-
), /* @__PURE__ */
|
|
506
|
+
), /* @__PURE__ */ React8.createElement(
|
|
506
507
|
"circle",
|
|
507
508
|
{
|
|
508
509
|
className: "fill-none stroke-primary-600 transition-all delay-200 ease-in",
|
|
@@ -517,7 +518,7 @@ var CircularProgressBar = ({
|
|
|
517
518
|
strokeDashoffset: dashOffset
|
|
518
519
|
}
|
|
519
520
|
}
|
|
520
|
-
), /* @__PURE__ */
|
|
521
|
+
), /* @__PURE__ */ React8.createElement(
|
|
521
522
|
"text",
|
|
522
523
|
{
|
|
523
524
|
x: "50%",
|