@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
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
Icon: true,
|
|
8
|
+
toast: true
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "Icon", {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _react.Icon;
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "toast", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () {
|
|
19
|
+
return _sonner.toast;
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
var _react = require("@iconify/react");
|
|
23
|
+
var _sonner = require("sonner");
|
|
24
|
+
var _badge = require("./components/badge.cjs");
|
|
25
|
+
Object.keys(_badge).forEach(function (key) {
|
|
26
|
+
if (key === "default" || key === "__esModule") return;
|
|
27
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
28
|
+
if (key in exports && exports[key] === _badge[key]) return;
|
|
29
|
+
Object.defineProperty(exports, key, {
|
|
30
|
+
enumerable: true,
|
|
31
|
+
get: function () {
|
|
32
|
+
return _badge[key];
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
var _button = require("./components/button.cjs");
|
|
37
|
+
Object.keys(_button).forEach(function (key) {
|
|
38
|
+
if (key === "default" || key === "__esModule") return;
|
|
39
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
40
|
+
if (key in exports && exports[key] === _button[key]) return;
|
|
41
|
+
Object.defineProperty(exports, key, {
|
|
42
|
+
enumerable: true,
|
|
43
|
+
get: function () {
|
|
44
|
+
return _button[key];
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
var _card = require("./components/card.cjs");
|
|
49
|
+
Object.keys(_card).forEach(function (key) {
|
|
50
|
+
if (key === "default" || key === "__esModule") return;
|
|
51
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
52
|
+
if (key in exports && exports[key] === _card[key]) return;
|
|
53
|
+
Object.defineProperty(exports, key, {
|
|
54
|
+
enumerable: true,
|
|
55
|
+
get: function () {
|
|
56
|
+
return _card[key];
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
var _checkbox = require("./components/checkbox.cjs");
|
|
61
|
+
Object.keys(_checkbox).forEach(function (key) {
|
|
62
|
+
if (key === "default" || key === "__esModule") return;
|
|
63
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
64
|
+
if (key in exports && exports[key] === _checkbox[key]) return;
|
|
65
|
+
Object.defineProperty(exports, key, {
|
|
66
|
+
enumerable: true,
|
|
67
|
+
get: function () {
|
|
68
|
+
return _checkbox[key];
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
var _dropdownMenu = require("./components/dropdown-menu.cjs");
|
|
73
|
+
Object.keys(_dropdownMenu).forEach(function (key) {
|
|
74
|
+
if (key === "default" || key === "__esModule") return;
|
|
75
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
76
|
+
if (key in exports && exports[key] === _dropdownMenu[key]) return;
|
|
77
|
+
Object.defineProperty(exports, key, {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () {
|
|
80
|
+
return _dropdownMenu[key];
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
var _input = require("./components/input.cjs");
|
|
85
|
+
Object.keys(_input).forEach(function (key) {
|
|
86
|
+
if (key === "default" || key === "__esModule") return;
|
|
87
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
88
|
+
if (key in exports && exports[key] === _input[key]) return;
|
|
89
|
+
Object.defineProperty(exports, key, {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function () {
|
|
92
|
+
return _input[key];
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
var _label = require("./components/label.cjs");
|
|
97
|
+
Object.keys(_label).forEach(function (key) {
|
|
98
|
+
if (key === "default" || key === "__esModule") return;
|
|
99
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
100
|
+
if (key in exports && exports[key] === _label[key]) return;
|
|
101
|
+
Object.defineProperty(exports, key, {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function () {
|
|
104
|
+
return _label[key];
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
var _languageSwitcher = require("./components/language-switcher.cjs");
|
|
109
|
+
Object.keys(_languageSwitcher).forEach(function (key) {
|
|
110
|
+
if (key === "default" || key === "__esModule") return;
|
|
111
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
112
|
+
if (key in exports && exports[key] === _languageSwitcher[key]) return;
|
|
113
|
+
Object.defineProperty(exports, key, {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
get: function () {
|
|
116
|
+
return _languageSwitcher[key];
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
var _table = require("./components/table.cjs");
|
|
121
|
+
Object.keys(_table).forEach(function (key) {
|
|
122
|
+
if (key === "default" || key === "__esModule") return;
|
|
123
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
124
|
+
if (key in exports && exports[key] === _table[key]) return;
|
|
125
|
+
Object.defineProperty(exports, key, {
|
|
126
|
+
enumerable: true,
|
|
127
|
+
get: function () {
|
|
128
|
+
return _table[key];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
var _textarea = require("./components/textarea.cjs");
|
|
133
|
+
Object.keys(_textarea).forEach(function (key) {
|
|
134
|
+
if (key === "default" || key === "__esModule") return;
|
|
135
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
136
|
+
if (key in exports && exports[key] === _textarea[key]) return;
|
|
137
|
+
Object.defineProperty(exports, key, {
|
|
138
|
+
enumerable: true,
|
|
139
|
+
get: function () {
|
|
140
|
+
return _textarea[key];
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
var _utils = require("./lib/utils.cjs");
|
|
145
|
+
Object.keys(_utils).forEach(function (key) {
|
|
146
|
+
if (key === "default" || key === "__esModule") return;
|
|
147
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
148
|
+
if (key in exports && exports[key] === _utils[key]) return;
|
|
149
|
+
Object.defineProperty(exports, key, {
|
|
150
|
+
enumerable: true,
|
|
151
|
+
get: function () {
|
|
152
|
+
return _utils[key];
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
});
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Icon } from "@iconify/react";
|
|
2
|
+
export { toast } from "sonner";
|
|
3
|
+
export * from "./components/badge";
|
|
4
|
+
export * from "./components/button";
|
|
5
|
+
export * from "./components/card";
|
|
6
|
+
export * from "./components/checkbox";
|
|
7
|
+
export * from "./components/dropdown-menu";
|
|
8
|
+
export * from "./components/input";
|
|
9
|
+
export * from "./components/label";
|
|
10
|
+
export * from "./components/language-switcher";
|
|
11
|
+
export * from "./components/table";
|
|
12
|
+
export * from "./components/textarea";
|
|
13
|
+
export * from "./lib/utils";
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { Icon } from "@iconify/react";
|
|
2
|
+
export { toast } from "sonner";
|
|
3
|
+
export * from "./components/badge.mjs";
|
|
4
|
+
export * from "./components/button.mjs";
|
|
5
|
+
export * from "./components/card.mjs";
|
|
6
|
+
export * from "./components/checkbox.mjs";
|
|
7
|
+
export * from "./components/dropdown-menu.mjs";
|
|
8
|
+
export * from "./components/input.mjs";
|
|
9
|
+
export * from "./components/label.mjs";
|
|
10
|
+
export * from "./components/language-switcher.mjs";
|
|
11
|
+
export * from "./components/table.mjs";
|
|
12
|
+
export * from "./components/textarea.mjs";
|
|
13
|
+
export * from "./lib/utils.mjs";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.cn = cn;
|
|
7
|
+
var _clsx = require("clsx");
|
|
8
|
+
var _tailwindMerge = require("tailwind-merge");
|
|
9
|
+
function cn(...inputs) {
|
|
10
|
+
return (0, _tailwindMerge.twMerge)((0, _clsx.clsx)(inputs));
|
|
11
|
+
}
|
package/dist/logo.cjs
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Logo = Logo;
|
|
7
|
+
exports.variants = void 0;
|
|
8
|
+
var _reactSlot = require("@radix-ui/react-slot");
|
|
9
|
+
var _classVarianceAuthority = require("class-variance-authority");
|
|
10
|
+
var _image = _interopRequireDefault(require("next/image"));
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _utils = require("./lib/utils.cjs");
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
const variants = exports.variants = (0, _classVarianceAuthority.cva)("", {
|
|
17
|
+
variants: {
|
|
18
|
+
variant: {
|
|
19
|
+
default: "stroke-primary fill-primary",
|
|
20
|
+
primary: "stroke-primary fill-primary"
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
default: "",
|
|
24
|
+
sm: "h-auto w-10",
|
|
25
|
+
md: "h-auto w-16"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: "default",
|
|
30
|
+
size: "sm"
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
function Logo({
|
|
34
|
+
className,
|
|
35
|
+
asChild = false,
|
|
36
|
+
...props
|
|
37
|
+
}) {
|
|
38
|
+
const Comp = asChild ? _reactSlot.Slot : "div";
|
|
39
|
+
return /* @__PURE__ */React.createElement(Comp, {
|
|
40
|
+
...props,
|
|
41
|
+
className: (0, _utils.cn)("flex items-center space-x-2", className)
|
|
42
|
+
}, /* @__PURE__ */React.createElement(_image.default, {
|
|
43
|
+
src: "/logo.svg",
|
|
44
|
+
alt: "alt",
|
|
45
|
+
height: 24.69,
|
|
46
|
+
width: 164
|
|
47
|
+
}));
|
|
48
|
+
}
|
|
49
|
+
Logo.displayName = "Logo";
|
package/dist/logo.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { VariantProps } from "class-variance-authority";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const variants: (props?: ({
|
|
4
|
+
variant?: "default" | "primary" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "md" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
+
export interface LogoProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof variants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
mode?: "full" | "short";
|
|
10
|
+
}
|
|
11
|
+
declare function Logo({ className, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof variants> & LogoProps): React.JSX.Element;
|
|
12
|
+
declare namespace Logo {
|
|
13
|
+
var displayName: string;
|
|
14
|
+
}
|
|
15
|
+
export { Logo, variants };
|
package/dist/logo.mjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import Image from "next/image";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { cn } from "./lib/utils.mjs";
|
|
6
|
+
const variants = cva("", {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "stroke-primary fill-primary",
|
|
10
|
+
primary: "stroke-primary fill-primary"
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
default: "",
|
|
14
|
+
sm: "h-auto w-10",
|
|
15
|
+
md: "h-auto w-16"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: "default",
|
|
20
|
+
size: "sm"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
function Logo({
|
|
24
|
+
className,
|
|
25
|
+
asChild = false,
|
|
26
|
+
...props
|
|
27
|
+
}) {
|
|
28
|
+
const Comp = asChild ? Slot : "div";
|
|
29
|
+
return /* @__PURE__ */ React.createElement(Comp, { ...props, className: cn("flex items-center space-x-2", className) }, /* @__PURE__ */ React.createElement(Image, { src: "/logo.svg", alt: "alt", height: 24.69, width: 164 }));
|
|
30
|
+
}
|
|
31
|
+
Logo.displayName = "Logo";
|
|
32
|
+
export { Logo, variants };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.AuthContext = void 0;
|
|
8
|
+
module.exports = AuthProvider;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var React = _react;
|
|
11
|
+
var _swr = require("swr");
|
|
12
|
+
var _pageLoader = require("../shared/page-loader.cjs");
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
const AuthContext = exports.AuthContext = (0, _react.createContext)(void 0);
|
|
16
|
+
function AuthProvider({
|
|
17
|
+
children,
|
|
18
|
+
initialSession,
|
|
19
|
+
kryoPrefix = "/kryo"
|
|
20
|
+
}) {
|
|
21
|
+
const [isLoading, setIsLoading] = (0, _react.useState)(true);
|
|
22
|
+
const refetchUser = async () => {
|
|
23
|
+
(0, _swr.mutate)("user");
|
|
24
|
+
};
|
|
25
|
+
(0, _react.useEffect)(() => {
|
|
26
|
+
setTimeout(() => {
|
|
27
|
+
setIsLoading(false);
|
|
28
|
+
}, 800);
|
|
29
|
+
}, []);
|
|
30
|
+
if (isLoading) {
|
|
31
|
+
return /* @__PURE__ */React.createElement(_pageLoader.PageLoader, {
|
|
32
|
+
text: "User checking"
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return /* @__PURE__ */React.createElement(AuthContext.Provider, {
|
|
36
|
+
value: {
|
|
37
|
+
user: initialSession?.user,
|
|
38
|
+
session: initialSession?.session,
|
|
39
|
+
kryoPrefix,
|
|
40
|
+
isLoading,
|
|
41
|
+
refetchUser
|
|
42
|
+
}
|
|
43
|
+
}, children);
|
|
44
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { AuthSession } from "@arch-cadre/core";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { type ReactNode } from "react";
|
|
4
|
+
export declare const AuthContext: React.Context<{
|
|
5
|
+
user: AuthSession["user"] | null | undefined;
|
|
6
|
+
session: AuthSession["session"] | null | undefined;
|
|
7
|
+
kryoPrefix: string;
|
|
8
|
+
isLoading: boolean;
|
|
9
|
+
refetchUser: () => Promise<void>;
|
|
10
|
+
} | undefined>;
|
|
11
|
+
export default function AuthProvider({ children, initialSession, kryoPrefix, }: {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
initialSession?: AuthSession;
|
|
14
|
+
kryoPrefix?: string;
|
|
15
|
+
}): React.JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { createContext, useEffect, useState } from "react";
|
|
4
|
+
import { mutate } from "swr";
|
|
5
|
+
import { PageLoader } from "../shared/page-loader.mjs";
|
|
6
|
+
export const AuthContext = createContext(void 0);
|
|
7
|
+
export default function AuthProvider({
|
|
8
|
+
children,
|
|
9
|
+
initialSession,
|
|
10
|
+
kryoPrefix = "/kryo"
|
|
11
|
+
}) {
|
|
12
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
13
|
+
const refetchUser = async () => {
|
|
14
|
+
mutate("user");
|
|
15
|
+
};
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
setIsLoading(false);
|
|
19
|
+
}, 800);
|
|
20
|
+
}, []);
|
|
21
|
+
if (isLoading) {
|
|
22
|
+
return /* @__PURE__ */ React.createElement(PageLoader, { text: "User checking" });
|
|
23
|
+
}
|
|
24
|
+
return /* @__PURE__ */ React.createElement(
|
|
25
|
+
AuthContext.Provider,
|
|
26
|
+
{
|
|
27
|
+
value: {
|
|
28
|
+
user: initialSession?.user,
|
|
29
|
+
session: initialSession?.session,
|
|
30
|
+
kryoPrefix,
|
|
31
|
+
isLoading,
|
|
32
|
+
refetchUser
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
children
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.AppProvider = void 0;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var React = _react;
|
|
10
|
+
var _swr = require("swr");
|
|
11
|
+
var _sonner = require("../components/sonner.cjs");
|
|
12
|
+
var _tooltip = require("../components/tooltip.cjs");
|
|
13
|
+
var _pageLoader = require("../shared/page-loader.cjs");
|
|
14
|
+
var _authProvider = _interopRequireDefault(require("./auth-provider.cjs"));
|
|
15
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
const AppProvider = ({
|
|
19
|
+
children,
|
|
20
|
+
initialSession,
|
|
21
|
+
kryoPrefix
|
|
22
|
+
}) => {
|
|
23
|
+
const [isLoading, setIsLoading] = (0, _react.useState)(true);
|
|
24
|
+
(0, _react.useEffect)(() => {
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
setIsLoading(false);
|
|
27
|
+
}, 800);
|
|
28
|
+
}, []);
|
|
29
|
+
if (isLoading) {
|
|
30
|
+
return /* @__PURE__ */React.createElement(_pageLoader.PageLoader, {
|
|
31
|
+
text: "Initializing"
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
return /* @__PURE__ */React.createElement(_swr.SWRConfig, {
|
|
35
|
+
value: {
|
|
36
|
+
fetcher: url => fetch(url).then(response => response.json()),
|
|
37
|
+
revalidateIfStale: true
|
|
38
|
+
}
|
|
39
|
+
}, /* @__PURE__ */React.createElement(_authProvider.default, {
|
|
40
|
+
initialSession,
|
|
41
|
+
kryoPrefix
|
|
42
|
+
}, /* @__PURE__ */React.createElement(_tooltip.TooltipProvider, null, children, /* @__PURE__ */React.createElement(_sonner.Toaster, {
|
|
43
|
+
position: "top-right",
|
|
44
|
+
expand: true
|
|
45
|
+
}))));
|
|
46
|
+
};
|
|
47
|
+
exports.AppProvider = AppProvider;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { AuthSession } from "@arch-cadre/core";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare const AppProvider: ({ children, initialSession, kryoPrefix, }: {
|
|
4
|
+
children: React.ReactElement;
|
|
5
|
+
initialSession?: AuthSession;
|
|
6
|
+
kryoPrefix?: string;
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import { SWRConfig } from "swr";
|
|
5
|
+
import { Toaster } from "../components/sonner.mjs";
|
|
6
|
+
import { TooltipProvider } from "../components/tooltip.mjs";
|
|
7
|
+
import { PageLoader } from "../shared/page-loader.mjs";
|
|
8
|
+
import AuthProvider from "./auth-provider.mjs";
|
|
9
|
+
export const AppProvider = ({
|
|
10
|
+
children,
|
|
11
|
+
initialSession,
|
|
12
|
+
kryoPrefix
|
|
13
|
+
}) => {
|
|
14
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
15
|
+
useEffect(() => {
|
|
16
|
+
setTimeout(() => {
|
|
17
|
+
setIsLoading(false);
|
|
18
|
+
}, 800);
|
|
19
|
+
}, []);
|
|
20
|
+
if (isLoading) {
|
|
21
|
+
return /* @__PURE__ */ React.createElement(PageLoader, { text: "Initializing" });
|
|
22
|
+
}
|
|
23
|
+
return /* @__PURE__ */ React.createElement(
|
|
24
|
+
SWRConfig,
|
|
25
|
+
{
|
|
26
|
+
value: {
|
|
27
|
+
fetcher: (url) => fetch(url).then((response) => response.json()),
|
|
28
|
+
revalidateIfStale: true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
/* @__PURE__ */ React.createElement(AuthProvider, { initialSession, kryoPrefix }, /* @__PURE__ */ React.createElement(TooltipProvider, null, children, /* @__PURE__ */ React.createElement(Toaster, { position: "top-right", expand: true })))
|
|
32
|
+
);
|
|
33
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.AccessDenied = AccessDenied;
|
|
7
|
+
var _react = require("@iconify/react");
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _button = require("../components/button.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 AccessDenied() {
|
|
13
|
+
return /* @__PURE__ */React.createElement("div", {
|
|
14
|
+
className: "flex flex-col items-center justify-center min-h-[60vh] text-center space-y-6 p-4"
|
|
15
|
+
}, /* @__PURE__ */React.createElement("div", {
|
|
16
|
+
className: "bg-destructive/10 p-6 rounded-full"
|
|
17
|
+
}, /* @__PURE__ */React.createElement(_react.Icon, {
|
|
18
|
+
icon: "solar:shield-warning-bold-duotone",
|
|
19
|
+
className: "size-16 text-destructive"
|
|
20
|
+
})), /* @__PURE__ */React.createElement("div", {
|
|
21
|
+
className: "space-y-2"
|
|
22
|
+
}, /* @__PURE__ */React.createElement("h2", {
|
|
23
|
+
className: "text-2xl font-bold tracking-tight"
|
|
24
|
+
}, "Access Denied"), /* @__PURE__ */React.createElement("p", {
|
|
25
|
+
className: "text-muted-foreground max-w-[400px]"
|
|
26
|
+
}, "You do not have the required permissions to access this area. Please contact your administrator if you believe this is an error.")), /* @__PURE__ */React.createElement("div", {
|
|
27
|
+
className: "flex gap-4"
|
|
28
|
+
}, /* @__PURE__ */React.createElement(_button.Button, {
|
|
29
|
+
asChild: true,
|
|
30
|
+
variant: "outline"
|
|
31
|
+
}, /* @__PURE__ */React.createElement("a", {
|
|
32
|
+
href: "/"
|
|
33
|
+
}, "Go back home")), /* @__PURE__ */React.createElement(_button.Button, {
|
|
34
|
+
asChild: true
|
|
35
|
+
}, /* @__PURE__ */React.createElement("a", {
|
|
36
|
+
href: "/signin"
|
|
37
|
+
}, "Sign in with another account"))));
|
|
38
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Icon } from "@iconify/react";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { Button } from "../components/button.mjs";
|
|
4
|
+
export function AccessDenied() {
|
|
5
|
+
return /* @__PURE__ */ React.createElement("div", { className: "flex flex-col items-center justify-center min-h-[60vh] text-center space-y-6 p-4" }, /* @__PURE__ */ React.createElement("div", { className: "bg-destructive/10 p-6 rounded-full" }, /* @__PURE__ */ React.createElement(
|
|
6
|
+
Icon,
|
|
7
|
+
{
|
|
8
|
+
icon: "solar:shield-warning-bold-duotone",
|
|
9
|
+
className: "size-16 text-destructive"
|
|
10
|
+
}
|
|
11
|
+
)), /* @__PURE__ */ React.createElement("div", { className: "space-y-2" }, /* @__PURE__ */ React.createElement("h2", { className: "text-2xl font-bold tracking-tight" }, "Access Denied"), /* @__PURE__ */ React.createElement("p", { className: "text-muted-foreground max-w-[400px]" }, "You do not have the required permissions to access this area. Please contact your administrator if you believe this is an error.")), /* @__PURE__ */ React.createElement("div", { className: "flex gap-4" }, /* @__PURE__ */ React.createElement(Button, { asChild: true, variant: "outline" }, /* @__PURE__ */ React.createElement("a", { href: "/" }, "Go back home")), /* @__PURE__ */ React.createElement(Button, { asChild: true }, /* @__PURE__ */ React.createElement("a", { href: "/signin" }, "Sign in with another account"))));
|
|
12
|
+
}
|