@arch-cadre/ui 0.0.10 → 0.0.15
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/build.config.ts +23 -0
- package/dist/components/.gitkeep +0 -0
- package/dist/components/accordion.cjs +62 -0
- package/dist/components/accordion.d.ts +7 -0
- package/dist/components/accordion.mjs +58 -0
- package/dist/components/alert-dialog.cjs +127 -0
- package/dist/components/alert-dialog.d.ts +14 -0
- package/dist/components/alert-dialog.mjs +144 -0
- package/dist/components/alert.cjs +58 -0
- package/dist/components/alert.d.ts +9 -0
- package/dist/components/alert.mjs +62 -0
- package/dist/components/aspect-ratio.cjs +19 -0
- package/dist/components/aspect-ratio.d.ts +4 -0
- package/dist/components/aspect-ratio.mjs +9 -0
- package/dist/components/avatar.cjs +44 -0
- package/dist/components/avatar.d.ts +6 -0
- package/dist/components/avatar.mjs +50 -0
- package/dist/components/badge.cjs +41 -0
- package/dist/components/badge.d.ts +9 -0
- package/dist/components/badge.mjs +37 -0
- package/dist/components/breadcrumb.cjs +106 -0
- package/dist/components/breadcrumb.d.ts +11 -0
- package/dist/components/breadcrumb.mjs +105 -0
- package/dist/components/button-group.cjs +65 -0
- package/dist/components/button-group.d.ts +12 -0
- package/dist/components/button-group.mjs +76 -0
- package/dist/components/button.cjs +57 -0
- package/dist/components/button.d.ts +10 -0
- package/dist/components/button.mjs +51 -0
- package/dist/components/calendar.cjs +143 -0
- package/dist/components/calendar.d.ts +8 -0
- package/dist/components/calendar.mjs +191 -0
- package/dist/components/card.cjs +86 -0
- package/dist/components/card.d.ts +9 -0
- package/dist/components/card.mjs +90 -0
- package/dist/components/checkbox.cjs +28 -0
- package/dist/components/checkbox.d.ts +4 -0
- package/dist/components/checkbox.mjs +30 -0
- package/dist/components/collapsible.cjs +37 -0
- package/dist/components/collapsible.d.ts +6 -0
- package/dist/components/collapsible.mjs +31 -0
- package/dist/components/command.cjs +125 -0
- package/dist/components/command.d.ts +18 -0
- package/dist/components/command.mjs +169 -0
- package/dist/components/context-menu.cjs +188 -0
- package/dist/components/context-menu.d.ts +25 -0
- package/dist/components/context-menu.mjs +218 -0
- package/dist/components/dialog.cjs +123 -0
- package/dist/components/dialog.d.ts +15 -0
- package/dist/components/dialog.mjs +130 -0
- package/dist/components/drawer.cjs +118 -0
- package/dist/components/drawer.d.ts +13 -0
- package/dist/components/drawer.mjs +124 -0
- package/dist/components/dropdown-menu.cjs +190 -0
- package/dist/components/dropdown-menu.d.ts +25 -0
- package/dist/components/dropdown-menu.mjs +226 -0
- package/dist/components/empty.cjs +92 -0
- package/dist/components/empty.d.ts +12 -0
- package/dist/components/empty.mjs +102 -0
- package/dist/components/field.cjs +173 -0
- package/dist/components/field.d.ts +25 -0
- package/dist/components/field.mjs +228 -0
- package/dist/components/form.cjs +143 -0
- package/dist/components/form.d.ts +23 -0
- package/dist/components/form.mjs +123 -0
- package/dist/components/hover-card.cjs +46 -0
- package/dist/components/hover-card.d.ts +6 -0
- package/dist/components/hover-card.mjs +35 -0
- package/dist/components/input-group.cjs +130 -0
- package/dist/components/input-group.d.ts +16 -0
- package/dist/components/input-group.mjs +155 -0
- package/dist/components/input-otp.cjs +69 -0
- package/dist/components/input-otp.d.ts +11 -0
- package/dist/components/input-otp.mjs +59 -0
- package/dist/components/input.cjs +22 -0
- package/dist/components/input.d.ts +3 -0
- package/dist/components/input.mjs +19 -0
- package/dist/components/item.cjs +168 -0
- package/dist/components/item.d.ts +23 -0
- package/dist/components/item.mjs +187 -0
- package/dist/components/kbd.cjs +31 -0
- package/dist/components/kbd.d.ts +4 -0
- package/dist/components/kbd.mjs +28 -0
- package/dist/components/label.cjs +22 -0
- package/dist/components/label.d.ts +4 -0
- package/dist/components/label.mjs +21 -0
- package/dist/components/language-switcher.cjs +43 -0
- package/dist/components/language-switcher.d.ts +2 -0
- package/dist/components/language-switcher.mjs +30 -0
- package/dist/components/menubar.cjs +207 -0
- package/dist/components/menubar.d.ts +26 -0
- package/dist/components/menubar.mjs +246 -0
- package/dist/components/navigation-menu.cjs +113 -0
- package/dist/components/navigation-menu.d.ts +14 -0
- package/dist/components/navigation-menu.mjs +166 -0
- package/dist/components/pagination.cjs +106 -0
- package/dist/components/pagination.d.ts +15 -0
- package/dist/components/pagination.mjs +116 -0
- package/dist/components/popover.cjs +53 -0
- package/dist/components/popover.d.ts +7 -0
- package/dist/components/popover.mjs +40 -0
- package/dist/components/progress.cjs +29 -0
- package/dist/components/progress.d.ts +4 -0
- package/dist/components/progress.mjs +30 -0
- package/dist/components/radio-group.cjs +39 -0
- package/dist/components/radio-group.d.ts +5 -0
- package/dist/components/radio-group.mjs +43 -0
- package/dist/components/scroll-area.cjs +45 -0
- package/dist/components/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area.mjs +59 -0
- package/dist/components/select.cjs +140 -0
- package/dist/components/select.d.ts +15 -0
- package/dist/components/select.mjs +173 -0
- package/dist/components/separator.cjs +26 -0
- package/dist/components/separator.d.ts +4 -0
- package/dist/components/separator.mjs +25 -0
- package/dist/components/sheet.cjs +120 -0
- package/dist/components/sheet.d.ts +13 -0
- package/dist/components/sheet.mjs +119 -0
- package/dist/components/sidebar.cjs +508 -0
- package/dist/components/sidebar.d.ts +69 -0
- package/dist/components/sidebar.mjs +635 -0
- package/dist/components/skeleton.cjs +20 -0
- package/dist/components/skeleton.d.ts +3 -0
- package/dist/components/skeleton.mjs +13 -0
- package/dist/components/slider.cjs +43 -0
- package/dist/components/slider.d.ts +4 -0
- package/dist/components/slider.mjs +59 -0
- package/dist/components/sonner.cjs +49 -0
- package/dist/components/sonner.d.ts +4 -0
- package/dist/components/sonner.mjs +36 -0
- package/dist/components/spinner.cjs +22 -0
- package/dist/components/spinner.d.ts +3 -0
- package/dist/components/spinner.mjs +15 -0
- package/dist/components/switch.cjs +25 -0
- package/dist/components/switch.d.ts +4 -0
- package/dist/components/switch.mjs +30 -0
- package/dist/components/table.cjs +101 -0
- package/dist/components/table.d.ts +10 -0
- package/dist/components/table.mjs +115 -0
- package/dist/components/tabs.cjs +55 -0
- package/dist/components/tabs.d.ts +7 -0
- package/dist/components/tabs.mjs +63 -0
- package/dist/components/textarea.cjs +20 -0
- package/dist/components/textarea.d.ts +3 -0
- package/dist/components/textarea.mjs +16 -0
- package/dist/components/toggle-group.cjs +65 -0
- package/dist/components/toggle-group.d.ts +9 -0
- package/dist/components/toggle-group.mjs +65 -0
- package/dist/components/toggle.cjs +47 -0
- package/dist/components/toggle.d.ts +9 -0
- package/dist/components/toggle.mjs +41 -0
- package/dist/components/tooltip.cjs +56 -0
- package/dist/components/tooltip.d.ts +7 -0
- package/dist/components/tooltip.mjs +49 -0
- package/dist/hooks/.gitkeep +0 -0
- package/dist/hooks/use-mobile.cjs +23 -0
- package/dist/hooks/use-mobile.d.ts +1 -0
- package/dist/hooks/use-mobile.mjs +17 -0
- package/dist/hooks/use-user.cjs +21 -0
- package/dist/hooks/use-user.d.ts +12 -0
- package/dist/hooks/use-user.mjs +12 -0
- package/dist/index.cjs +155 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.mjs +13 -0
- package/dist/lib/utils.cjs +11 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/lib/utils.mjs +5 -0
- package/dist/logo.cjs +49 -0
- package/dist/logo.d.ts +15 -0
- package/dist/logo.mjs +32 -0
- package/dist/postcss.config.cjs +13 -0
- package/dist/postcss.config.d.mts +3 -0
- package/dist/postcss.config.mjs +6 -0
- package/dist/providers/auth-provider.cjs +44 -0
- package/dist/providers/auth-provider.d.ts +15 -0
- package/dist/providers/auth-provider.mjs +37 -0
- package/dist/providers/index.cjs +47 -0
- package/dist/providers/index.d.ts +7 -0
- package/dist/providers/index.mjs +33 -0
- package/dist/shared/access-denied.cjs +38 -0
- package/dist/shared/access-denied.d.ts +2 -0
- package/dist/shared/access-denied.mjs +12 -0
- package/dist/shared/loader.cjs +95 -0
- package/dist/shared/loader.d.ts +11 -0
- package/dist/shared/loader.mjs +98 -0
- package/dist/shared/page-loader.cjs +23 -0
- package/dist/shared/page-loader.d.ts +7 -0
- package/dist/shared/page-loader.mjs +6 -0
- package/dist/shared/scroll-fade-effect.cjs +21 -0
- package/dist/shared/scroll-fade-effect.d.ts +4 -0
- package/dist/shared/scroll-fade-effect.mjs +20 -0
- package/dist/styles/globals.css +1 -0
- package/package.json +58 -49
- package/scripts/switchToDist.js +55 -0
- package/scripts/switchToSrc.js +52 -0
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +1 -1
- package/src/components/alert.tsx +1 -1
- package/src/components/aspect-ratio.tsx +2 -1
- package/src/components/avatar.tsx +1 -1
- package/src/components/badge.tsx +3 -3
- package/src/components/breadcrumb.tsx +5 -3
- package/src/components/button-group.tsx +4 -2
- package/src/components/button.tsx +3 -3
- package/src/components/calendar.tsx +2 -2
- package/src/components/checkbox.tsx +2 -2
- package/src/components/collapsible.tsx +2 -1
- package/src/components/command.tsx +1 -1
- package/src/components/context-menu.tsx +2 -2
- package/src/components/dialog.tsx +2 -2
- package/src/components/dropdown-menu.tsx +2 -2
- package/src/components/empty.tsx +1 -0
- package/src/components/field.tsx +5 -2
- package/src/components/form.tsx +9 -7
- package/src/components/hover-card.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/item.tsx +3 -3
- package/src/components/kbd.tsx +1 -0
- package/src/components/label.tsx +1 -1
- package/src/components/language-switcher.tsx +16 -17
- package/src/components/menubar.tsx +2 -2
- package/src/components/navigation-menu.tsx +2 -2
- package/src/components/pagination.tsx +5 -2
- package/src/components/popover.tsx +1 -1
- package/src/components/progress.tsx +1 -1
- package/src/components/radio-group.tsx +2 -2
- package/src/components/scroll-area.tsx +1 -1
- package/src/components/select.tsx +2 -2
- package/src/components/separator.tsx +1 -1
- package/src/components/sheet.tsx +2 -2
- package/src/components/sidebar.tsx +6 -6
- package/src/components/skeleton.tsx +1 -0
- package/src/components/slider.tsx +1 -1
- package/src/components/sonner.tsx +1 -0
- package/src/components/spinner.tsx +1 -0
- package/src/components/switch.tsx +1 -1
- package/src/components/tabs.tsx +1 -1
- package/src/components/toggle-group.tsx +2 -2
- package/src/components/toggle.tsx +2 -2
- package/src/components/tooltip.tsx +1 -1
- package/src/hooks/use-user.ts +2 -2
- package/src/index.ts +8 -5
- package/src/logo.tsx +1 -0
- package/src/providers/auth-provider.tsx +7 -6
- package/src/providers/index.tsx +1 -0
- package/src/shared/access-denied.tsx +1 -0
- package/src/shared/loader.tsx +2 -1
- package/src/shared/page-loader.tsx +1 -0
- package/src/shared/scroll-fade-effect.tsx +1 -1
- package/src/styles/globals.css +258 -244
- package/biome.json +0 -38
- package/src/components/carousel.tsx +0 -241
- package/src/components/chart.tsx +0 -357
- package/tsconfig.build.json +0 -16
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Loader = Loader;
|
|
7
|
+
exports.loaderVariants = void 0;
|
|
8
|
+
var _reactSlot = require("@radix-ui/react-slot");
|
|
9
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
10
|
+
var React = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _utils = require("../lib/utils.cjs");
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
+
const loaderVariants = exports.loaderVariants = (0, _classVarianceAuthority.cva)("spinner", {
|
|
15
|
+
variants: {
|
|
16
|
+
variant: {
|
|
17
|
+
default: "stroke-primary",
|
|
18
|
+
dark: "stroke-white",
|
|
19
|
+
destructive: "stroke-destructive",
|
|
20
|
+
secondary: "stroke-secondary",
|
|
21
|
+
ghost: "stroke-accent"
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
default: "h-5 w-5",
|
|
25
|
+
md: "h-10 w-10",
|
|
26
|
+
lg: "h-60 w-60"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
function Loader({
|
|
35
|
+
className,
|
|
36
|
+
variant,
|
|
37
|
+
size,
|
|
38
|
+
asChild = false,
|
|
39
|
+
...props
|
|
40
|
+
}) {
|
|
41
|
+
const Comp = asChild ? _reactSlot.Slot : "div";
|
|
42
|
+
return /* @__PURE__ */React.createElement(Comp, {
|
|
43
|
+
className: "flex items-center justify-center",
|
|
44
|
+
...props
|
|
45
|
+
}, /* @__PURE__ */React.createElement("style", null, `
|
|
46
|
+
.spinner {
|
|
47
|
+
animation: animate-rotate 2s linear infinite;
|
|
48
|
+
z-index: 2;
|
|
49
|
+
max-width: 5rem;
|
|
50
|
+
max-height: 5rem;
|
|
51
|
+
|
|
52
|
+
.path {
|
|
53
|
+
stroke-linecap: round;
|
|
54
|
+
animation: animate-dash 1.75s ease-in-out infinite;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
`), /* @__PURE__ */React.createElement("svg", {
|
|
58
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
59
|
+
viewBox: "0 0 24 24",
|
|
60
|
+
className: (0, _utils.cn)(loaderVariants({
|
|
61
|
+
variant,
|
|
62
|
+
size,
|
|
63
|
+
className
|
|
64
|
+
}))
|
|
65
|
+
}, /* @__PURE__ */React.createElement("g", null, /* @__PURE__ */React.createElement("circle", {
|
|
66
|
+
cx: 12,
|
|
67
|
+
cy: 12,
|
|
68
|
+
r: 9.5,
|
|
69
|
+
fill: "none",
|
|
70
|
+
strokeLinecap: "round",
|
|
71
|
+
strokeWidth: 3
|
|
72
|
+
}, /* @__PURE__ */React.createElement("animate", {
|
|
73
|
+
attributeName: "stroke-dasharray",
|
|
74
|
+
calcMode: "spline",
|
|
75
|
+
dur: "1.5s",
|
|
76
|
+
keySplines: "0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",
|
|
77
|
+
keyTimes: "0;0.475;0.95;1",
|
|
78
|
+
repeatCount: "indefinite",
|
|
79
|
+
values: "0 150;42 150;42 150;42 150"
|
|
80
|
+
}), /* @__PURE__ */React.createElement("animate", {
|
|
81
|
+
attributeName: "stroke-dashoffset",
|
|
82
|
+
calcMode: "spline",
|
|
83
|
+
dur: "1.5s",
|
|
84
|
+
keySplines: "0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",
|
|
85
|
+
keyTimes: "0;0.475;0.95;1",
|
|
86
|
+
repeatCount: "indefinite",
|
|
87
|
+
values: "0;-16;-59;-59"
|
|
88
|
+
})), /* @__PURE__ */React.createElement("animateTransform", {
|
|
89
|
+
attributeName: "transform",
|
|
90
|
+
dur: "2s",
|
|
91
|
+
repeatCount: "indefinite",
|
|
92
|
+
type: "rotate",
|
|
93
|
+
values: "0 12 12;360 12 12"
|
|
94
|
+
}))));
|
|
95
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const loaderVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "secondary" | "ghost" | "dark" | null | undefined;
|
|
5
|
+
size?: "default" | "md" | "lg" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface LoaderProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof loaderVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function Loader({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof loaderVariants> & LoaderProps): React.JSX.Element;
|
|
11
|
+
export { Loader, loaderVariants };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../lib/utils.mjs";
|
|
5
|
+
const loaderVariants = cva("spinner", {
|
|
6
|
+
variants: {
|
|
7
|
+
variant: {
|
|
8
|
+
default: "stroke-primary",
|
|
9
|
+
dark: "stroke-white",
|
|
10
|
+
destructive: "stroke-destructive",
|
|
11
|
+
secondary: "stroke-secondary",
|
|
12
|
+
ghost: "stroke-accent"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
default: "h-5 w-5",
|
|
16
|
+
md: "h-10 w-10",
|
|
17
|
+
lg: "h-60 w-60"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
variant: "default",
|
|
22
|
+
size: "default"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
function Loader({
|
|
26
|
+
className,
|
|
27
|
+
variant,
|
|
28
|
+
size,
|
|
29
|
+
asChild = false,
|
|
30
|
+
...props
|
|
31
|
+
}) {
|
|
32
|
+
const Comp = asChild ? Slot : "div";
|
|
33
|
+
return /* @__PURE__ */ React.createElement(Comp, { className: "flex items-center justify-center", ...props }, /* @__PURE__ */ React.createElement("style", null, `
|
|
34
|
+
.spinner {
|
|
35
|
+
animation: animate-rotate 2s linear infinite;
|
|
36
|
+
z-index: 2;
|
|
37
|
+
max-width: 5rem;
|
|
38
|
+
max-height: 5rem;
|
|
39
|
+
|
|
40
|
+
.path {
|
|
41
|
+
stroke-linecap: round;
|
|
42
|
+
animation: animate-dash 1.75s ease-in-out infinite;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`), /* @__PURE__ */ React.createElement(
|
|
46
|
+
"svg",
|
|
47
|
+
{
|
|
48
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
49
|
+
viewBox: "0 0 24 24",
|
|
50
|
+
className: cn(loaderVariants({ variant, size, className }))
|
|
51
|
+
},
|
|
52
|
+
/* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement(
|
|
53
|
+
"circle",
|
|
54
|
+
{
|
|
55
|
+
cx: 12,
|
|
56
|
+
cy: 12,
|
|
57
|
+
r: 9.5,
|
|
58
|
+
fill: "none",
|
|
59
|
+
strokeLinecap: "round",
|
|
60
|
+
strokeWidth: 3
|
|
61
|
+
},
|
|
62
|
+
/* @__PURE__ */ React.createElement(
|
|
63
|
+
"animate",
|
|
64
|
+
{
|
|
65
|
+
attributeName: "stroke-dasharray",
|
|
66
|
+
calcMode: "spline",
|
|
67
|
+
dur: "1.5s",
|
|
68
|
+
keySplines: "0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",
|
|
69
|
+
keyTimes: "0;0.475;0.95;1",
|
|
70
|
+
repeatCount: "indefinite",
|
|
71
|
+
values: "0 150;42 150;42 150;42 150"
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ React.createElement(
|
|
75
|
+
"animate",
|
|
76
|
+
{
|
|
77
|
+
attributeName: "stroke-dashoffset",
|
|
78
|
+
calcMode: "spline",
|
|
79
|
+
dur: "1.5s",
|
|
80
|
+
keySplines: "0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1",
|
|
81
|
+
keyTimes: "0;0.475;0.95;1",
|
|
82
|
+
repeatCount: "indefinite",
|
|
83
|
+
values: "0;-16;-59;-59"
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
), /* @__PURE__ */ React.createElement(
|
|
87
|
+
"animateTransform",
|
|
88
|
+
{
|
|
89
|
+
attributeName: "transform",
|
|
90
|
+
dur: "2s",
|
|
91
|
+
repeatCount: "indefinite",
|
|
92
|
+
type: "rotate",
|
|
93
|
+
values: "0 12 12;360 12 12"
|
|
94
|
+
}
|
|
95
|
+
))
|
|
96
|
+
));
|
|
97
|
+
}
|
|
98
|
+
export { Loader, loaderVariants };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PageLoader = PageLoader;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _logo = require("../logo.cjs");
|
|
9
|
+
var _loader = require("./loader.cjs");
|
|
10
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
11
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
12
|
+
function PageLoader({
|
|
13
|
+
withLogo = true,
|
|
14
|
+
text
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
17
|
+
className: "bg-background absolute inset-0 flex flex-col items-center justify-center space-y-6"
|
|
18
|
+
}, withLogo && /* @__PURE__ */React.createElement("div", {
|
|
19
|
+
className: "mb-6"
|
|
20
|
+
}, /* @__PURE__ */React.createElement(_logo.Logo, null)), /* @__PURE__ */React.createElement(_loader.Loader, null), text && /* @__PURE__ */React.createElement("div", {
|
|
21
|
+
className: "text-xs lowercase"
|
|
22
|
+
}, text));
|
|
23
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Logo } from "../logo.mjs";
|
|
3
|
+
import { Loader } from "./loader.mjs";
|
|
4
|
+
export function PageLoader({ withLogo = true, text }) {
|
|
5
|
+
return /* @__PURE__ */ React.createElement("div", { className: "bg-background absolute inset-0 flex flex-col items-center justify-center space-y-6" }, withLogo && /* @__PURE__ */ React.createElement("div", { className: "mb-6" }, /* @__PURE__ */ React.createElement(Logo, null)), /* @__PURE__ */ React.createElement(Loader, null), text && /* @__PURE__ */ React.createElement("div", { className: "text-xs lowercase" }, text));
|
|
6
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ScrollFadeEffect = ScrollFadeEffect;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _utils = require("../lib/utils.cjs");
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
+
function ScrollFadeEffect({
|
|
12
|
+
className,
|
|
13
|
+
orientation = "vertical",
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
17
|
+
"data-orientation": orientation,
|
|
18
|
+
className: (0, _utils.cn)("data-[orientation=horizontal]:overflow-x-auto data-[orientation=vertical]:overflow-y-auto", "data-[orientation=horizontal]:scroll-fade-effect-x data-[orientation=vertical]:scroll-fade-effect-y", className),
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { cn } from "../lib/utils.mjs";
|
|
3
|
+
export function ScrollFadeEffect({
|
|
4
|
+
className,
|
|
5
|
+
orientation = "vertical",
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ React.createElement(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
"data-orientation": orientation,
|
|
12
|
+
className: cn(
|
|
13
|
+
"data-[orientation=horizontal]:overflow-x-auto data-[orientation=vertical]:overflow-y-auto",
|
|
14
|
+
"data-[orientation=horizontal]:scroll-fade-effect-x data-[orientation=vertical]:scroll-fade-effect-y",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import "tailwindcss";@source "../../../apps/**/*.{ts,tsx}";@source "../../../components/**/*.{ts,tsx}";@source "../**/*.{ts,tsx}";@import "tw-animate-css";@custom-variant dark (&:is(.dark *));@theme inline{--container:1024px;--color-background:var(--background);--color-foreground:var(--foreground);--font-sans:var(--font-syne-sans);--font-mono:var(--font-syne-mono);--color-sidebar-ring:var(--sidebar-ring);--color-sidebar-border:var(--sidebar-border);--color-sidebar-accent-foreground:var(--sidebar-accent-foreground);--color-sidebar-accent:var(--sidebar-accent);--color-sidebar-primary-foreground:var(--sidebar-primary-foreground);--color-sidebar-primary:var(--sidebar-primary);--color-sidebar-foreground:var(--sidebar-foreground);--color-sidebar:var(--sidebar);--color-chart-5:var(--chart-5);--color-chart-4:var(--chart-4);--color-chart-3:var(--chart-3);--color-chart-2:var(--chart-2);--color-chart-1:var(--chart-1);--color-ring:var(--ring);--color-input:var(--input);--color-border:var(--border);--color-destructive:var(--destructive);--color-accent-foreground:var(--accent-foreground);--color-accent:var(--accent);--color-muted-foreground:var(--muted-foreground);--color-muted:var(--muted);--color-secondary-foreground:var(--secondary-foreground);--color-secondary:var(--secondary);--color-primary-foreground:var(--primary-foreground);--color-primary:var(--primary);--color-popover-foreground:var(--popover-foreground);--color-popover:var(--popover);--color-card-foreground:var(--card-foreground);--color-card:var(--card);--radius-sm:calc(var(--radius) - 4px);--radius-md:calc(var(--radius) - 2px);--radius-lg:var(--radius);--radius-xl:calc(var(--radius) + 4px);--radius-2xl:calc(var(--radius) + 8px);--radius-3xl:calc(var(--radius) + 12px);--radius-4xl:calc(var(--radius) + 16px)}:root{--radius:0.5rem;--background:oklch(0.985 0 0);--foreground:oklch(0.24 0.06 245.57);--card:oklch(1 0 0);--card-foreground:oklch(0.24 0.06 245.57);--popover:oklch(1 0 0);--popover-foreground:oklch(0.24 0.06 245.57);--primary:oklch(0.24 0.06 245.57);--primary-foreground:oklch(0.985 0 0);--secondary:oklch(0.97 0 0);--secondary-foreground:oklch(0.24 0.06 245.57);--muted:oklch(0.97 0 0);--muted-foreground:oklch(0.556 0 0);--accent:oklch(0.97 0 0);--accent-foreground:oklch(0.24 0.06 245.57);--destructive:oklch(0.577 0.245 27.325);--border:oklch(0.922 0 0);--input:oklch(0.922 0 0);--ring:oklch(0.708 0 0);--chart-1:oklch(0.646 0.222 41.116);--chart-2:oklch(0.6 0.118 184.704);--chart-3:oklch(0.398 0.07 227.392);--chart-4:oklch(0.828 0.189 84.429);--chart-5:oklch(0.769 0.188 70.08);--sidebar:oklch(1 0 0);--sidebar-foreground:oklch(0.24 0.06 245.57);--sidebar-primary:oklch(0.24 0.06 245.57);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.97 0 0);--sidebar-accent-foreground:oklch(0.24 0.06 245.57);--sidebar-border:oklch(0.922 0 0);--sidebar-ring:oklch(0.708 0 0)}.dark{--background:oklch(0.145 0 0);--foreground:oklch(0.985 0 0);--card:oklch(0.205 0 0);--card-foreground:oklch(0.985 0 0);--popover:oklch(0.205 0 0);--popover-foreground:oklch(0.985 0 0);--primary:oklch(0.922 0 0);--primary-foreground:oklch(0.205 0 0);--secondary:oklch(0.269 0 0);--secondary-foreground:oklch(0.985 0 0);--muted:oklch(0.269 0 0);--muted-foreground:oklch(0.708 0 0);--accent:oklch(0.269 0 0);--accent-foreground:oklch(0.985 0 0);--destructive:oklch(0.704 0.191 22.216);--border:oklch(1 0 0/10%);--input:oklch(1 0 0/15%);--ring:oklch(0.556 0 0);--chart-1:oklch(0.488 0.243 264.376);--chart-2:oklch(0.696 0.17 162.48);--chart-3:oklch(0.769 0.188 70.08);--chart-4:oklch(0.627 0.265 303.9);--chart-5:oklch(0.645 0.246 16.439);--sidebar:oklch(0.205 0 0);--sidebar-foreground:oklch(0.985 0 0);--sidebar-primary:oklch(0.488 0.243 264.376);--sidebar-primary-foreground:oklch(0.985 0 0);--sidebar-accent:oklch(0.269 0 0);--sidebar-accent-foreground:oklch(0.985 0 0);--sidebar-border:oklch(1 0 0/10%);--sidebar-ring:oklch(0.556 0 0)}@layer utilities{.squircle{border-radius:1rem}@supports (corner-shape:squircle){.squircle{border-radius:2rem;corner-shape:squircle}}}@layer base{*{@apply border-border outline-ring/50}body{@apply bg-background text-foreground}body:before{z-index:1}[data-slot=sidebar-wrapper]:before,body:before{background:#000;content:"";filter:url(#grain);height:100%;left:0;opacity:.1;pointer-events:none;position:fixed;top:0;width:100%}[data-slot=sidebar-wrapper]:before{z-index:51}svg.grain-noise{height:0;position:absolute;width:0;z-index:-1}.container{margin:0 auto;max-width:var(--container);@apply px-4 sm:px-6 lg:px-8}@keyframes show-top-mask{to{--top-mask-height:var(--mask-height)}}@keyframes hide-bottom-mask{to{--bottom-mask-height:0px}}@keyframes show-left-mask{to{--left-mask-width:var(--mask-width)}}@keyframes hide-right-mask{to{--right-mask-width:0px}}}@property --top-mask-height{syntax:"<length>";inherits:true;initial-value:0}@property --bottom-mask-height{syntax:"<length>";inherits:true;initial-value:64px}@property --left-mask-width{syntax:"<length>";inherits:true;initial-value:0}@property --right-mask-width{syntax:"<length>";inherits:true;initial-value:64px}@utility scroll-fade-effect-y{--mask-height:64px;--mask-offset-top:0px;--mask-offset-bottom:0px;--scroll-buffer:2rem;animation-fill-mode:both;animation-name:show-top-mask,hide-bottom-mask;animation-range:0 var(--scroll-buffer),calc(100% - var(--scroll-buffer)) 100%;animation-timeline:scroll(self),scroll(self);-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-image:linear-gradient(0deg,transparent,#000 90%),linear-gradient(180deg,transparent 0,#000),linear-gradient(#000,#000);mask-image:linear-gradient(0deg,transparent,#000 90%),linear-gradient(180deg,transparent 0,#000),linear-gradient(#000,#000);-webkit-mask-position:0 var(--mask-offset-top),0 calc(100% - var(--mask-offset-bottom)),0 0;mask-position:0 var(--mask-offset-top),0 calc(100% - var(--mask-offset-bottom)),0 0;-webkit-mask-repeat:no-repeat,no-repeat,no-repeat;mask-repeat:no-repeat,no-repeat,no-repeat;-webkit-mask-size:100% var(--top-mask-height),100% var(--bottom-mask-height),100% 100%;mask-size:100% var(--top-mask-height),100% var(--bottom-mask-height),100% 100%}@utility scroll-fade-effect-x{--mask-width:64px;--mask-offset-left:0px;--mask-offset-right:0px;--scroll-buffer:2rem;animation-fill-mode:both;animation-name:show-left-mask,hide-right-mask;animation-range:0 var(--scroll-buffer),calc(100% - var(--scroll-buffer)) 100%;animation-timeline:scroll(self inline),scroll(self inline);-webkit-mask-composite:xor;mask-composite:exclude;-webkit-mask-image:linear-gradient(270deg,transparent,#000 90%),linear-gradient(90deg,transparent 0,#000),linear-gradient(#000,#000);mask-image:linear-gradient(270deg,transparent,#000 90%),linear-gradient(90deg,transparent 0,#000),linear-gradient(#000,#000);-webkit-mask-position:var(--mask-offset-left) 0,calc(100% - var(--mask-offset-right)) 0,0 0;mask-position:var(--mask-offset-left) 0,calc(100% - var(--mask-offset-right)) 0,0 0;-webkit-mask-repeat:no-repeat,no-repeat,no-repeat;mask-repeat:no-repeat,no-repeat,no-repeat;-webkit-mask-size:var(--left-mask-width) 100%,var(--right-mask-width) 100%,100% 100%;mask-size:var(--left-mask-width) 100%,var(--right-mask-width) 100%,100% 100%}@keyframes progress-fast{0%{transform:translateX(-100%)}50%{transform:translateX(-20%)}to{transform:translateX(100%)}}.animate-progress-fast{animation:progress-fast 1.5s linear infinite}
|
package/package.json
CHANGED
|
@@ -1,83 +1,92 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arch-cadre/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.15",
|
|
4
4
|
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
"./package.json": "./package.json",
|
|
7
|
+
"./globals.css": "./dist/styles/globals.css",
|
|
8
|
+
"./postcss.config": "./postcss.config.mjs",
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./providers": {
|
|
15
|
+
"types": "./dist/providers/index.d.ts",
|
|
16
|
+
"import": "./dist/providers/index.mjs",
|
|
17
|
+
"require": "./dist/providers/index.cjs"
|
|
18
|
+
},
|
|
19
|
+
"./brand/logo": {
|
|
20
|
+
"types": "./dist/logo.d.ts",
|
|
21
|
+
"import": "./dist/logo.mjs",
|
|
22
|
+
"require": "./dist/logo.cjs"
|
|
23
|
+
},
|
|
24
|
+
"./shared/*": {
|
|
25
|
+
"types": "./dist/shared/*.d.ts",
|
|
26
|
+
"import": "./dist/shared/*.mjs",
|
|
27
|
+
"require": "./dist/shared/*.cjs"
|
|
28
|
+
},
|
|
29
|
+
"./lib/*": {
|
|
30
|
+
"types": "./dist/lib/*.d.ts",
|
|
31
|
+
"import": "./dist/lib/*.mjs",
|
|
32
|
+
"require": "./dist/lib/*.cjs"
|
|
33
|
+
},
|
|
34
|
+
"./components/*": {
|
|
35
|
+
"types": "./dist/components/*.d.ts",
|
|
36
|
+
"import": "./dist/components/*.mjs",
|
|
37
|
+
"require": "./dist/components/*.cjs"
|
|
38
|
+
},
|
|
39
|
+
"./hooks/*": {
|
|
40
|
+
"types": "./dist/hooks/*.d.ts",
|
|
41
|
+
"import": "./dist/hooks/*.mjs",
|
|
42
|
+
"require": "./dist/hooks/*.cjs"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
5
45
|
"scripts": {
|
|
46
|
+
"clean": "rm -rf ./dist",
|
|
47
|
+
"switch:dev": "node scripts/switchToSrc.js",
|
|
48
|
+
"switch:prod": "node scripts/switchToDist.js",
|
|
6
49
|
"release": "npm publish --access public --no-git-checks",
|
|
7
|
-
"lint": "biome check --write"
|
|
50
|
+
"lint": "biome check --write",
|
|
51
|
+
"build": "unbuild",
|
|
52
|
+
"dev": "unbuild --stub"
|
|
8
53
|
},
|
|
9
54
|
"dependencies": {
|
|
55
|
+
"@arch-cadre/core": "^0.0.15",
|
|
56
|
+
"@arch-cadre/intl": "^0.0.15",
|
|
10
57
|
"@hookform/resolvers": "^5.2.2",
|
|
11
58
|
"@iconify-json/solar": "^1.2.2",
|
|
12
59
|
"@iconify/react": "^6.0.0",
|
|
13
|
-
"@
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"@
|
|
17
|
-
"@radix-ui/react-aspect-ratio": "^1.1.8",
|
|
18
|
-
"@radix-ui/react-avatar": "^1.1.11",
|
|
19
|
-
"@radix-ui/react-checkbox": "^1.3.3",
|
|
20
|
-
"@radix-ui/react-collapsible": "^1.1.12",
|
|
21
|
-
"@radix-ui/react-context-menu": "^2.2.16",
|
|
22
|
-
"@radix-ui/react-dialog": "^1.1.15",
|
|
23
|
-
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
24
|
-
"@radix-ui/react-hover-card": "^1.1.15",
|
|
25
|
-
"@radix-ui/react-label": "^2.1.8",
|
|
26
|
-
"@radix-ui/react-menubar": "^1.1.16",
|
|
27
|
-
"@radix-ui/react-navigation-menu": "^1.2.14",
|
|
28
|
-
"@radix-ui/react-popover": "^1.1.15",
|
|
29
|
-
"@radix-ui/react-progress": "^1.1.8",
|
|
30
|
-
"@radix-ui/react-radio-group": "^1.3.8",
|
|
31
|
-
"@radix-ui/react-scroll-area": "^1.2.10",
|
|
32
|
-
"@radix-ui/react-select": "^2.2.6",
|
|
33
|
-
"@radix-ui/react-separator": "^1.1.8",
|
|
34
|
-
"@radix-ui/react-slider": "^1.3.6",
|
|
35
|
-
"@radix-ui/react-slot": "^1.2.3",
|
|
36
|
-
"@radix-ui/react-switch": "^1.2.6",
|
|
37
|
-
"@radix-ui/react-tabs": "^1.1.13",
|
|
38
|
-
"@radix-ui/react-toggle": "^1.1.10",
|
|
39
|
-
"@radix-ui/react-toggle-group": "^1.1.11",
|
|
40
|
-
"@radix-ui/react-tooltip": "^1.2.8",
|
|
60
|
+
"@radix-ui/react-slot": "^1.2.4",
|
|
61
|
+
"@types/node": "^20.19.9",
|
|
62
|
+
"@types/react": "^19.1.9",
|
|
63
|
+
"@types/react-dom": "^19.1.7",
|
|
41
64
|
"class-variance-authority": "^0.7.1",
|
|
42
65
|
"clsx": "^2.1.1",
|
|
43
66
|
"cmdk": "^1.1.1",
|
|
44
67
|
"date-fns": "^4.1.0",
|
|
45
|
-
"embla-carousel-react": "^8.6.0",
|
|
46
68
|
"input-otp": "^1.4.2",
|
|
47
69
|
"lucide-react": "^0.475.0",
|
|
48
70
|
"next": "16.1.1",
|
|
49
71
|
"next-themes": "^0.4.6",
|
|
72
|
+
"radix-ui": "latest",
|
|
50
73
|
"react": "^19.1.1",
|
|
51
74
|
"react-day-picker": "^9.13.0",
|
|
52
75
|
"react-dom": "^19.1.1",
|
|
53
76
|
"react-hook-form": "^7.70.0",
|
|
54
|
-
"recharts": "2.15.4",
|
|
55
77
|
"sonner": "^2.0.7",
|
|
56
78
|
"swr": "^2.3.8",
|
|
57
79
|
"tailwind-merge": "^3.3.1",
|
|
58
80
|
"tw-animate-css": "^1.3.6",
|
|
59
81
|
"vaul": "^1.1.2",
|
|
60
|
-
"zod": "^3.25.76"
|
|
61
|
-
"@types/node": "^20.19.9",
|
|
62
|
-
"@types/react": "^19.1.9",
|
|
63
|
-
"@types/react-dom": "^19.1.7"
|
|
82
|
+
"zod": "^3.25.76"
|
|
64
83
|
},
|
|
65
84
|
"devDependencies": {
|
|
66
85
|
"@biomejs/biome": "2.3.8",
|
|
67
86
|
"@tailwindcss/postcss": "^4.1.11",
|
|
68
|
-
"@turbo/gen": "^2.5.5",
|
|
69
87
|
"tailwindcss": "^4.1.11",
|
|
70
|
-
"typescript": "^5.9.2"
|
|
88
|
+
"typescript": "^5.9.2",
|
|
89
|
+
"unbuild": "^3.6.1"
|
|
71
90
|
},
|
|
72
|
-
"
|
|
73
|
-
".": "./src/index.ts",
|
|
74
|
-
"./providers": "./src/providers/index.tsx",
|
|
75
|
-
"./brand/logo": "./src/logo.tsx",
|
|
76
|
-
"./shared/*": "./src/shared/*.tsx",
|
|
77
|
-
"./globals.css": "./src/styles/globals.css",
|
|
78
|
-
"./postcss.config": "./postcss.config.mjs",
|
|
79
|
-
"./lib/*": "./src/lib/*.ts",
|
|
80
|
-
"./components/*": "./src/components/*.tsx",
|
|
81
|
-
"./hooks/*": "./src/hooks/*.ts"
|
|
82
|
-
}
|
|
91
|
+
"main": "./dist/index.mjs"
|
|
83
92
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
|
|
8
|
+
const packagePath = path.resolve(__dirname, "../package.json");
|
|
9
|
+
const pkg = JSON.parse(fs.readFileSync(packagePath, "utf-8"));
|
|
10
|
+
|
|
11
|
+
pkg.main = "./dist/index.mjs";
|
|
12
|
+
|
|
13
|
+
pkg.exports = {
|
|
14
|
+
"./package.json": "./package.json",
|
|
15
|
+
"./globals.css": "./dist/styles/globals.css",
|
|
16
|
+
"./postcss.config": "./postcss.config.mjs",
|
|
17
|
+
".": {
|
|
18
|
+
types: "./dist/index.d.ts",
|
|
19
|
+
import: "./dist/index.mjs",
|
|
20
|
+
require: "./dist/index.cjs",
|
|
21
|
+
},
|
|
22
|
+
"./providers": {
|
|
23
|
+
types: "./dist/providers/index.d.ts",
|
|
24
|
+
import: "./dist/providers/index.mjs",
|
|
25
|
+
require: "./dist/providers/index.cjs",
|
|
26
|
+
},
|
|
27
|
+
"./brand/logo": {
|
|
28
|
+
types: "./dist/logo.d.ts",
|
|
29
|
+
import: "./dist/logo.mjs",
|
|
30
|
+
require: "./dist/logo.cjs",
|
|
31
|
+
},
|
|
32
|
+
"./shared/*": {
|
|
33
|
+
types: "./dist/shared/*.d.ts",
|
|
34
|
+
import: "./dist/shared/*.mjs",
|
|
35
|
+
require: "./dist/shared/*.cjs",
|
|
36
|
+
},
|
|
37
|
+
"./lib/*": {
|
|
38
|
+
types: "./dist/lib/*.d.ts",
|
|
39
|
+
import: "./dist/lib/*.mjs",
|
|
40
|
+
require: "./dist/lib/*.cjs",
|
|
41
|
+
},
|
|
42
|
+
"./components/*": {
|
|
43
|
+
types: "./dist/components/*.d.ts",
|
|
44
|
+
import: "./dist/components/*.mjs",
|
|
45
|
+
require: "./dist/components/*.cjs",
|
|
46
|
+
},
|
|
47
|
+
"./hooks/*": {
|
|
48
|
+
types: "./dist/hooks/*.d.ts",
|
|
49
|
+
import: "./dist/hooks/*.mjs",
|
|
50
|
+
require: "./dist/hooks/*.cjs",
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2));
|
|
55
|
+
console.log("Switched exports to use dist for production");
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = path.dirname(__filename);
|
|
7
|
+
|
|
8
|
+
const packagePath = path.resolve(__dirname, "../package.json");
|
|
9
|
+
|
|
10
|
+
// Leer el archivo package.json
|
|
11
|
+
const pkg = JSON.parse(fs.readFileSync(packagePath, "utf-8"));
|
|
12
|
+
|
|
13
|
+
pkg.main = "./src/index.ts";
|
|
14
|
+
|
|
15
|
+
// Modificar los exports
|
|
16
|
+
pkg.exports = {
|
|
17
|
+
"./package.json": "./package.json",
|
|
18
|
+
"./globals.css": "./src/styles/globals.css",
|
|
19
|
+
"./postcss.config": "./postcss.config.mjs",
|
|
20
|
+
".": {
|
|
21
|
+
import: "./src/index.ts",
|
|
22
|
+
require: "./dist/index.cjs",
|
|
23
|
+
},
|
|
24
|
+
"./providers": {
|
|
25
|
+
import: "./src/providers/index.tsx",
|
|
26
|
+
require: "./dist/providers/index.cjs",
|
|
27
|
+
},
|
|
28
|
+
"./brand/logo": {
|
|
29
|
+
import: "./src/logo.tsx",
|
|
30
|
+
require: "./dist/logo.cjs",
|
|
31
|
+
},
|
|
32
|
+
"./shared/*": {
|
|
33
|
+
import: "./src/shared/*.tsx",
|
|
34
|
+
require: "./dist/shared/*.cjs",
|
|
35
|
+
},
|
|
36
|
+
"./lib/*": {
|
|
37
|
+
import: "./src/lib/*.ts",
|
|
38
|
+
require: "./dist/lib/*.cjs",
|
|
39
|
+
},
|
|
40
|
+
"./components/*": {
|
|
41
|
+
import: "./src/components/*.tsx",
|
|
42
|
+
require: "./dist/components/*.cjs",
|
|
43
|
+
},
|
|
44
|
+
"./hooks/*": {
|
|
45
|
+
import: "./src/hooks/*.ts",
|
|
46
|
+
require: "./dist/hooks/*.cjs",
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
// Guardar los cambios en package.json
|
|
51
|
+
fs.writeFileSync(packagePath, JSON.stringify(pkg, null, 2));
|
|
52
|
+
console.log("Switched exports to use src for development");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
+
import { Accordion as AccordionPrimitive } from "radix-ui";
|
|
5
4
|
import { ChevronDownIcon } from "lucide-react";
|
|
5
|
+
import * as React from "react";
|
|
6
6
|
|
|
7
7
|
import { cn } from "../lib/utils";
|
|
8
8
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { AlertDialog as AlertDialogPrimitive } from "radix-ui";
|
|
3
4
|
import * as React from "react";
|
|
4
|
-
import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog";
|
|
5
5
|
|
|
6
6
|
import { cn } from "../lib/utils";
|
|
7
7
|
import { buttonVariants } from "./button";
|
package/src/components/alert.tsx
CHANGED
package/src/components/badge.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
1
|
+
import { Slot as SlotPrimitive } from "radix-ui";
|
|
3
2
|
import { cva, type VariantProps } from "class-variance-authority";
|
|
3
|
+
import * as React from "react";
|
|
4
4
|
|
|
5
5
|
import { cn } from "../lib/utils";
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ function Badge({
|
|
|
32
32
|
...props
|
|
33
33
|
}: React.ComponentProps<"span"> &
|
|
34
34
|
VariantProps<typeof badgeVariants> & { asChild?: boolean }) {
|
|
35
|
-
const Comp = asChild ? Slot : "span";
|
|
35
|
+
const Comp = asChild ? SlotPrimitive.Slot : "span";
|
|
36
36
|
|
|
37
37
|
return (
|
|
38
38
|
<Comp
|