@alexandregme/zljs 0.3.11 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +30 -14
- package/dist/index.js +112 -74
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -6,13 +6,6 @@ import * as zustand from 'zustand';
|
|
|
6
6
|
import { Store, Reducer, Middleware, Dispatch } from '@reduxjs/toolkit';
|
|
7
7
|
import 'react-hook-form';
|
|
8
8
|
|
|
9
|
-
declare const iconNames: readonly ["Check", "X", "Plus", "Minus", "Search", "Menu", "ChevronDown", "ChevronUp", "ChevronLeft", "ChevronRight", "Pencil", "Trash2", "Save", "RefreshCw", "Home", "MessageSquare", "Users", "Store", "ShoppingCart", "BarChart3", "Brain", "Send", "LogOut", "User", "Key", "Contact", "Package", "Warehouse", "HandCoins", "Stethoscope", "LogIn", "Megaphone", "LayoutDashboard", "Smile", "Frown", "Cat", "ArrowRight", "Loader", "CheckCircle", "XCircle", "AlertTriangle", "Info", "Map", "CloudDownload", "Wrench", "GitMerge", "SiWhatsapp", "SiFacebook", "SiInstagram", "SiShopify"];
|
|
10
|
-
|
|
11
|
-
type IconName = (typeof iconNames)[number];
|
|
12
|
-
interface IconProps {
|
|
13
|
-
name: IconName;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
9
|
/**
|
|
17
10
|
* Semantic colors for action-oriented components (Button, Heading, etc.)
|
|
18
11
|
*/
|
|
@@ -22,12 +15,26 @@ type SemanticColor = "primary" | "success" | "danger" | "warning" | "info" | "no
|
|
|
22
15
|
*/
|
|
23
16
|
type DataColor = "blue" | "red" | "yellow" | "green" | "gray" | "orange";
|
|
24
17
|
|
|
18
|
+
/**
|
|
19
|
+
* Sizes shared by every sized component (Icon, Button, Input, etc.)
|
|
20
|
+
*/
|
|
21
|
+
type Size = "sm" | "md";
|
|
22
|
+
|
|
23
|
+
declare const iconNames: readonly ["Check", "X", "Plus", "Minus", "Search", "Menu", "ChevronDown", "ChevronUp", "ChevronLeft", "ChevronRight", "Pencil", "Trash2", "Save", "RefreshCw", "Home", "MessageSquare", "Users", "Store", "ShoppingCart", "BarChart3", "Brain", "Send", "LogOut", "User", "Key", "Contact", "Package", "Warehouse", "HandCoins", "Stethoscope", "LogIn", "Megaphone", "LayoutDashboard", "Smile", "Frown", "Cat", "ArrowRight", "Loader", "CheckCircle", "XCircle", "AlertTriangle", "Info", "SiWhatsapp", "SiFacebook", "SiInstagram", "SiShopify"];
|
|
24
|
+
|
|
25
|
+
type IconName = (typeof iconNames)[number];
|
|
26
|
+
interface IconProps {
|
|
27
|
+
name: IconName;
|
|
28
|
+
size?: Size;
|
|
29
|
+
}
|
|
30
|
+
|
|
25
31
|
type ButtonVariant = "default" | "icon" | "ghost" | "link";
|
|
26
32
|
interface ButtonProps {
|
|
27
33
|
children?: ReactNode;
|
|
28
34
|
type?: "button" | "submit" | "reset";
|
|
29
35
|
variant?: ButtonVariant;
|
|
30
36
|
color?: SemanticColor;
|
|
37
|
+
size?: Size;
|
|
31
38
|
icon?: IconName;
|
|
32
39
|
iconPosition?: "left" | "right";
|
|
33
40
|
disabled?: boolean;
|
|
@@ -35,7 +42,7 @@ interface ButtonProps {
|
|
|
35
42
|
onClick?: () => void;
|
|
36
43
|
}
|
|
37
44
|
|
|
38
|
-
declare const Button: ({ children, type, variant: variantProp, color, icon, iconPosition, disabled, "aria-label": ariaLabel, onClick, }: ButtonProps) => react.JSX.Element;
|
|
45
|
+
declare const Button: ({ children, type, variant: variantProp, color, size, icon, iconPosition, disabled, "aria-label": ariaLabel, onClick, }: ButtonProps) => react.JSX.Element;
|
|
39
46
|
|
|
40
47
|
interface DataGridCellParams<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
41
48
|
value?: any;
|
|
@@ -138,7 +145,7 @@ interface TextAreaProps {
|
|
|
138
145
|
|
|
139
146
|
declare const TextArea: ({ label: labelText, placeholder, value, rows, error, disabled, onChange, }: TextAreaProps) => react.JSX.Element;
|
|
140
147
|
|
|
141
|
-
declare const Icon: ({ name }: IconProps) => react.JSX.Element;
|
|
148
|
+
declare const Icon: ({ name, size }: IconProps) => react.JSX.Element;
|
|
142
149
|
|
|
143
150
|
interface StatsCardProps {
|
|
144
151
|
label: string;
|
|
@@ -177,6 +184,15 @@ interface HeadingProps {
|
|
|
177
184
|
|
|
178
185
|
declare const Heading: ({ children, level, color }: HeadingProps) => react.JSX.Element;
|
|
179
186
|
|
|
187
|
+
type TextVariant = "body" | "caption" | "display";
|
|
188
|
+
interface TextProps {
|
|
189
|
+
children: string | number;
|
|
190
|
+
as?: "p" | "span";
|
|
191
|
+
variant?: TextVariant;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
declare const Text: ({ children, as: Tag, variant, }: TextProps) => react.JSX.Element;
|
|
195
|
+
|
|
180
196
|
interface SidebarItem {
|
|
181
197
|
icon: IconName;
|
|
182
198
|
label: string;
|
|
@@ -204,11 +220,11 @@ declare const Sidebar: ({ sections, user, activeHref, defaultCollapsed, collapse
|
|
|
204
220
|
|
|
205
221
|
interface TagProps {
|
|
206
222
|
children: ReactNode;
|
|
207
|
-
color?:
|
|
223
|
+
color?: DataColor;
|
|
208
224
|
onRemove?: () => void;
|
|
209
|
-
className?: string;
|
|
210
225
|
}
|
|
211
|
-
|
|
226
|
+
|
|
227
|
+
declare const Tag: ({ children, color, onRemove }: TagProps) => react.JSX.Element;
|
|
212
228
|
|
|
213
229
|
declare const Toaster: () => react.JSX.Element;
|
|
214
230
|
|
|
@@ -436,5 +452,5 @@ declare class HTTPClient {
|
|
|
436
452
|
patch<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T | undefined>;
|
|
437
453
|
}
|
|
438
454
|
|
|
439
|
-
export { AppWrapper, Button, Checkbox, ConnectedModal, DataGrid, DocumentWrapper, Error, Form, GlobalState, HTTPClient, Heading, Icon, Input, Loader, Modal, PageWrapper, Radio, Select, Sidebar, Spinner, StatsCard, Tag, TextArea, Toaster, WhatsAppButton, splitURLasPath, useAppStore, useModalStore, usePageStore, useRouterStore, useToastStore };
|
|
440
|
-
export type { AppState, AppWrapperProps, ButtonProps, ButtonVariant, CheckboxProps, ConnectedModalProps, DataGridColumn, DataGridProps, DocumentWrapperProps, ErrorProps, ExtendedStore, FormProps, GlobalStateProps, HeadingProps, HttpClientConfig, HttpRequestConfig, IconName, InitPageFunction, InputProps, LoaderProps, ModalEntry, ModalProps, ModalState, PageState, PageWrapperProps, RadioProps, RouterState, SelectOption, SelectProps, SidebarItem, SidebarProps, SidebarSection, SidebarUser, SpinnerProps, StatsCardProps, TagProps, TextAreaProps, Toast, ToastState, ToastType, WhatsAppButtonProps };
|
|
455
|
+
export { AppWrapper, Button, Checkbox, ConnectedModal, DataGrid, DocumentWrapper, Error, Form, GlobalState, HTTPClient, Heading, Icon, Input, Loader, Modal, PageWrapper, Radio, Select, Sidebar, Spinner, StatsCard, Tag, Text, TextArea, Toaster, WhatsAppButton, splitURLasPath, useAppStore, useModalStore, usePageStore, useRouterStore, useToastStore };
|
|
456
|
+
export type { AppState, AppWrapperProps, ButtonProps, ButtonVariant, CheckboxProps, ConnectedModalProps, DataGridColumn, DataGridProps, DocumentWrapperProps, ErrorProps, ExtendedStore, FormProps, GlobalStateProps, HeadingProps, HttpClientConfig, HttpRequestConfig, IconName, InitPageFunction, InputProps, LoaderProps, ModalEntry, ModalProps, ModalState, PageState, PageWrapperProps, RadioProps, RouterState, SelectOption, SelectProps, SidebarItem, SidebarProps, SidebarSection, SidebarUser, SpinnerProps, StatsCardProps, TagProps, TextAreaProps, TextProps, TextVariant, Toast, ToastState, ToastType, WhatsAppButtonProps };
|
package/dist/index.js
CHANGED
|
@@ -8,19 +8,27 @@ import {
|
|
|
8
8
|
|
|
9
9
|
// core/icon/icon.tsx
|
|
10
10
|
import * as LucideIcons from "lucide-react";
|
|
11
|
+
|
|
12
|
+
// core/icon/icon.const.ts
|
|
11
13
|
import { SiWhatsapp, SiFacebook, SiInstagram, SiShopify } from "react-icons/si";
|
|
12
|
-
|
|
13
|
-
var brandIcons = {
|
|
14
|
+
var iconBrands = {
|
|
14
15
|
SiWhatsapp,
|
|
15
16
|
SiFacebook,
|
|
16
17
|
SiInstagram,
|
|
17
18
|
SiShopify
|
|
18
19
|
};
|
|
19
|
-
var
|
|
20
|
+
var iconSizes = {
|
|
21
|
+
sm: 12,
|
|
22
|
+
md: 16
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// core/icon/icon.tsx
|
|
26
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
27
|
+
var Icon = ({ name, size = "md" }) => {
|
|
20
28
|
const isBrand = name.startsWith("Si");
|
|
21
|
-
const IconComponent = isBrand ?
|
|
29
|
+
const IconComponent = isBrand ? iconBrands[name] : LucideIcons[name];
|
|
22
30
|
if (!IconComponent) return /* @__PURE__ */ jsx(Fragment, {});
|
|
23
|
-
return /* @__PURE__ */ jsx("span", { "data-testid": name, children: /* @__PURE__ */ jsx(IconComponent, { size:
|
|
31
|
+
return /* @__PURE__ */ jsx("span", { "data-testid": name, children: /* @__PURE__ */ jsx(IconComponent, { size: iconSizes[size] }) });
|
|
24
32
|
};
|
|
25
33
|
|
|
26
34
|
// core/button/button.styles.ts
|
|
@@ -41,9 +49,23 @@ var button = tv({
|
|
|
41
49
|
warning: "bg-yellow-500 hover:bg-yellow-600 focus:ring-yellow-500 text-gray-900",
|
|
42
50
|
info: "bg-cyan-500 hover:bg-cyan-600 focus:ring-cyan-500",
|
|
43
51
|
none: ""
|
|
52
|
+
},
|
|
53
|
+
size: {
|
|
54
|
+
sm: "",
|
|
55
|
+
md: ""
|
|
44
56
|
}
|
|
45
57
|
},
|
|
46
58
|
compoundVariants: [
|
|
59
|
+
{
|
|
60
|
+
variant: "default",
|
|
61
|
+
size: "sm",
|
|
62
|
+
class: "px-2 py-1 text-xs gap-1"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
variant: "icon",
|
|
66
|
+
size: "sm",
|
|
67
|
+
class: "p-0.5"
|
|
68
|
+
},
|
|
47
69
|
{
|
|
48
70
|
variant: "link",
|
|
49
71
|
color: "primary",
|
|
@@ -62,7 +84,8 @@ var button = tv({
|
|
|
62
84
|
],
|
|
63
85
|
defaultVariants: {
|
|
64
86
|
variant: "default",
|
|
65
|
-
color: "primary"
|
|
87
|
+
color: "primary",
|
|
88
|
+
size: "md"
|
|
66
89
|
}
|
|
67
90
|
});
|
|
68
91
|
|
|
@@ -73,6 +96,7 @@ var Button = ({
|
|
|
73
96
|
type = "button",
|
|
74
97
|
variant: variantProp,
|
|
75
98
|
color = "primary",
|
|
99
|
+
size = "md",
|
|
76
100
|
icon,
|
|
77
101
|
iconPosition = "left",
|
|
78
102
|
disabled = false,
|
|
@@ -85,7 +109,7 @@ var Button = ({
|
|
|
85
109
|
if (!icon) {
|
|
86
110
|
return children;
|
|
87
111
|
}
|
|
88
|
-
const iconElement = /* @__PURE__ */ jsx2(Icon, { name: icon });
|
|
112
|
+
const iconElement = /* @__PURE__ */ jsx2(Icon, { name: icon, size });
|
|
89
113
|
if (isIconOnly) {
|
|
90
114
|
return iconElement;
|
|
91
115
|
}
|
|
@@ -106,7 +130,8 @@ var Button = ({
|
|
|
106
130
|
"aria-label": ariaLabel,
|
|
107
131
|
className: button({
|
|
108
132
|
variant,
|
|
109
|
-
color: variant === "icon" || variant === "ghost" ? "none" : color
|
|
133
|
+
color: variant === "icon" || variant === "ghost" ? "none" : color,
|
|
134
|
+
size
|
|
110
135
|
}),
|
|
111
136
|
children: renderContent()
|
|
112
137
|
}
|
|
@@ -373,7 +398,8 @@ var tag = tv7({
|
|
|
373
398
|
green: "bg-green-100 text-green-700",
|
|
374
399
|
red: "bg-red-100 text-red-700",
|
|
375
400
|
yellow: "bg-yellow-100 text-yellow-700",
|
|
376
|
-
gray: "bg-slate-100 text-slate-700"
|
|
401
|
+
gray: "bg-slate-100 text-slate-700",
|
|
402
|
+
orange: "bg-orange-100 text-orange-700"
|
|
377
403
|
}
|
|
378
404
|
},
|
|
379
405
|
defaultVariants: {
|
|
@@ -383,24 +409,10 @@ var tag = tv7({
|
|
|
383
409
|
|
|
384
410
|
// core/tag/tag.tsx
|
|
385
411
|
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
386
|
-
var Tag = ({
|
|
387
|
-
children
|
|
388
|
-
color = "blue",
|
|
389
|
-
onRemove,
|
|
390
|
-
className
|
|
391
|
-
}) => {
|
|
392
|
-
return /* @__PURE__ */ jsxs7("span", { className: tag({ color, className }), children: [
|
|
412
|
+
var Tag = ({ children, color = "blue", onRemove }) => {
|
|
413
|
+
return /* @__PURE__ */ jsxs7("span", { "data-testid": "tag", className: tag({ color }), children: [
|
|
393
414
|
children,
|
|
394
|
-
onRemove && /* @__PURE__ */ jsx9(
|
|
395
|
-
"button",
|
|
396
|
-
{
|
|
397
|
-
type: "button",
|
|
398
|
-
onClick: onRemove,
|
|
399
|
-
className: "ml-1 hover:opacity-70 focus:outline-none",
|
|
400
|
-
"aria-label": "Remover",
|
|
401
|
-
children: "\xD7"
|
|
402
|
-
}
|
|
403
|
-
)
|
|
415
|
+
onRemove && /* @__PURE__ */ jsx9(Button, { size: "sm", icon: "X", "aria-label": "Remover", onClick: onRemove })
|
|
404
416
|
] });
|
|
405
417
|
};
|
|
406
418
|
|
|
@@ -757,13 +769,38 @@ var Heading = ({ children, level = 1, color }) => {
|
|
|
757
769
|
return /* @__PURE__ */ jsx15(Tag2, { className: heading({ level, color }), children });
|
|
758
770
|
};
|
|
759
771
|
|
|
772
|
+
// core/text/text.styles.ts
|
|
773
|
+
import { tv as tv10 } from "tailwind-variants";
|
|
774
|
+
var text = tv10({
|
|
775
|
+
variants: {
|
|
776
|
+
variant: {
|
|
777
|
+
body: "text-base",
|
|
778
|
+
caption: "text-sm",
|
|
779
|
+
display: "text-3xl font-bold"
|
|
780
|
+
}
|
|
781
|
+
},
|
|
782
|
+
defaultVariants: {
|
|
783
|
+
variant: "body"
|
|
784
|
+
}
|
|
785
|
+
});
|
|
786
|
+
|
|
787
|
+
// core/text/text.tsx
|
|
788
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
789
|
+
var Text = ({
|
|
790
|
+
children,
|
|
791
|
+
as: Tag2 = "p",
|
|
792
|
+
variant = "body"
|
|
793
|
+
}) => {
|
|
794
|
+
return /* @__PURE__ */ jsx16(Tag2, { "data-testid": "text", className: text({ variant }), children });
|
|
795
|
+
};
|
|
796
|
+
|
|
760
797
|
// core/sidebar/sidebar.tsx
|
|
761
798
|
import { useState as useState3 } from "react";
|
|
762
799
|
import Link from "next/link";
|
|
763
800
|
|
|
764
801
|
// core/sidebar/sidebar.styles.ts
|
|
765
|
-
import { tv as
|
|
766
|
-
var sidebar =
|
|
802
|
+
import { tv as tv11 } from "tailwind-variants";
|
|
803
|
+
var sidebar = tv11({
|
|
767
804
|
base: "h-screen bg-neutral-800 text-neutral-300 flex flex-col overflow-hidden transition-all duration-200",
|
|
768
805
|
variants: {
|
|
769
806
|
collapsed: {
|
|
@@ -775,16 +812,16 @@ var sidebar = tv10({
|
|
|
775
812
|
collapsed: false
|
|
776
813
|
}
|
|
777
814
|
});
|
|
778
|
-
var nav =
|
|
815
|
+
var nav = tv11({
|
|
779
816
|
base: "flex-1 min-h-0 overflow-y-auto overflow-x-hidden"
|
|
780
817
|
});
|
|
781
|
-
var header2 =
|
|
818
|
+
var header2 = tv11({
|
|
782
819
|
base: "shrink-0 border-b border-neutral-600/50 grid p-2"
|
|
783
820
|
});
|
|
784
|
-
var section =
|
|
821
|
+
var section = tv11({
|
|
785
822
|
base: "border-b border-neutral-600/50 last:border-b-0 grid gap-1 p-2"
|
|
786
823
|
});
|
|
787
|
-
var item =
|
|
824
|
+
var item = tv11({
|
|
788
825
|
base: "flex w-full items-center rounded-md text-sm whitespace-nowrap transition-colors cursor-pointer p-1",
|
|
789
826
|
variants: {
|
|
790
827
|
active: {
|
|
@@ -796,10 +833,10 @@ var item = tv10({
|
|
|
796
833
|
active: false
|
|
797
834
|
}
|
|
798
835
|
});
|
|
799
|
-
var itemIcon =
|
|
836
|
+
var itemIcon = tv11({
|
|
800
837
|
base: "p-2"
|
|
801
838
|
});
|
|
802
|
-
var itemLabel =
|
|
839
|
+
var itemLabel = tv11({
|
|
803
840
|
base: "truncate transition-all duration-200",
|
|
804
841
|
variants: {
|
|
805
842
|
collapsed: {
|
|
@@ -811,27 +848,27 @@ var itemLabel = tv10({
|
|
|
811
848
|
collapsed: false
|
|
812
849
|
}
|
|
813
850
|
});
|
|
814
|
-
var footer =
|
|
851
|
+
var footer = tv11({
|
|
815
852
|
base: "shrink-0 border-t border-neutral-600/50 p-3 flex items-center gap-3 whitespace-nowrap"
|
|
816
853
|
});
|
|
817
|
-
var avatar =
|
|
854
|
+
var avatar = tv11({
|
|
818
855
|
base: "shrink-0 w-8 h-8 rounded-full bg-neutral-600 text-white text-xs font-medium flex items-center justify-center"
|
|
819
856
|
});
|
|
820
|
-
var userInfo =
|
|
857
|
+
var userInfo = tv11({
|
|
821
858
|
base: "flex flex-col min-w-0"
|
|
822
859
|
});
|
|
823
|
-
var userName =
|
|
860
|
+
var userName = tv11({
|
|
824
861
|
base: "text-sm text-white truncate"
|
|
825
862
|
});
|
|
826
|
-
var userEmail =
|
|
863
|
+
var userEmail = tv11({
|
|
827
864
|
base: "text-xs text-neutral-400"
|
|
828
865
|
});
|
|
829
|
-
var toggleButton =
|
|
866
|
+
var toggleButton = tv11({
|
|
830
867
|
base: "shrink-0 border-t border-neutral-600/50 grid p-2 [&>button]:justify-start [&>button]:overflow-hidden [&>button]:whitespace-nowrap"
|
|
831
868
|
});
|
|
832
869
|
|
|
833
870
|
// core/sidebar/sidebar.tsx
|
|
834
|
-
import { jsx as
|
|
871
|
+
import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
835
872
|
var getInitials = (name) => {
|
|
836
873
|
const parts = name.trim().split(/\s+/);
|
|
837
874
|
if (parts.length >= 2) {
|
|
@@ -852,19 +889,19 @@ var Sidebar = ({
|
|
|
852
889
|
const [collapsed, setCollapsed] = useState3(defaultCollapsed);
|
|
853
890
|
const initials = getInitials(user.name);
|
|
854
891
|
return /* @__PURE__ */ jsxs12("aside", { className: sidebar({ collapsed }), children: [
|
|
855
|
-
homeHref && /* @__PURE__ */
|
|
892
|
+
homeHref && /* @__PURE__ */ jsx17(
|
|
856
893
|
Link,
|
|
857
894
|
{
|
|
858
895
|
href: homeHref,
|
|
859
896
|
className: header2(),
|
|
860
897
|
"aria-label": homeLabel || "Home",
|
|
861
898
|
children: /* @__PURE__ */ jsxs12("span", { className: item({ active: homeHref === activeHref }), children: [
|
|
862
|
-
/* @__PURE__ */
|
|
863
|
-
/* @__PURE__ */
|
|
899
|
+
/* @__PURE__ */ jsx17("span", { className: itemIcon(), children: /* @__PURE__ */ jsx17(Icon, { name: "Home" }) }),
|
|
900
|
+
/* @__PURE__ */ jsx17("span", { className: itemLabel({ collapsed }), children: homeLabel })
|
|
864
901
|
] })
|
|
865
902
|
}
|
|
866
903
|
),
|
|
867
|
-
/* @__PURE__ */
|
|
904
|
+
/* @__PURE__ */ jsx17("nav", { "aria-label": "Main navigation", className: nav(), children: sections.map((sectionData, i) => /* @__PURE__ */ jsx17("div", { className: section(), children: sectionData.items.map((sidebarItem) => {
|
|
868
905
|
const isActive = sidebarItem.href === activeHref;
|
|
869
906
|
return /* @__PURE__ */ jsxs12(
|
|
870
907
|
Link,
|
|
@@ -873,20 +910,20 @@ var Sidebar = ({
|
|
|
873
910
|
className: item({ active: isActive }),
|
|
874
911
|
...isActive && { "aria-current": "page" },
|
|
875
912
|
children: [
|
|
876
|
-
/* @__PURE__ */
|
|
877
|
-
/* @__PURE__ */
|
|
913
|
+
/* @__PURE__ */ jsx17("span", { className: itemIcon(), children: /* @__PURE__ */ jsx17(Icon, { name: sidebarItem.icon }) }),
|
|
914
|
+
/* @__PURE__ */ jsx17("span", { className: itemLabel({ collapsed }), children: sidebarItem.label })
|
|
878
915
|
]
|
|
879
916
|
},
|
|
880
917
|
sidebarItem.href
|
|
881
918
|
);
|
|
882
919
|
}) }, i)) }),
|
|
883
920
|
/* @__PURE__ */ jsxs12("div", { className: footer(), children: [
|
|
884
|
-
/* @__PURE__ */
|
|
921
|
+
/* @__PURE__ */ jsx17("div", { className: avatar(), children: initials }),
|
|
885
922
|
/* @__PURE__ */ jsxs12("div", { className: userInfo(), children: [
|
|
886
|
-
/* @__PURE__ */
|
|
887
|
-
/* @__PURE__ */
|
|
923
|
+
/* @__PURE__ */ jsx17("span", { className: userName(), children: user.name }),
|
|
924
|
+
/* @__PURE__ */ jsx17("span", { className: userEmail(), children: user.email })
|
|
888
925
|
] }),
|
|
889
|
-
/* @__PURE__ */
|
|
926
|
+
/* @__PURE__ */ jsx17(
|
|
890
927
|
Button,
|
|
891
928
|
{
|
|
892
929
|
variant: "ghost",
|
|
@@ -896,7 +933,7 @@ var Sidebar = ({
|
|
|
896
933
|
}
|
|
897
934
|
)
|
|
898
935
|
] }),
|
|
899
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ jsx17("div", { className: toggleButton(), children: /* @__PURE__ */ jsx17(
|
|
900
937
|
Button,
|
|
901
938
|
{
|
|
902
939
|
variant: "ghost",
|
|
@@ -945,7 +982,7 @@ var useToastStore = create()(
|
|
|
945
982
|
);
|
|
946
983
|
|
|
947
984
|
// core/toaster/toaster.tsx
|
|
948
|
-
import { jsx as
|
|
985
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
949
986
|
var Toaster = () => {
|
|
950
987
|
const toasts = useToastStore((s) => s.toasts);
|
|
951
988
|
const removeToast = useToastStore((s) => s.removeToast);
|
|
@@ -958,7 +995,7 @@ var Toaster = () => {
|
|
|
958
995
|
removeToast(t.id);
|
|
959
996
|
});
|
|
960
997
|
}, [toasts, removeToast]);
|
|
961
|
-
return /* @__PURE__ */
|
|
998
|
+
return /* @__PURE__ */ jsx18(
|
|
962
999
|
SonnerToaster,
|
|
963
1000
|
{
|
|
964
1001
|
position: "bottom-right",
|
|
@@ -1037,7 +1074,7 @@ import {
|
|
|
1037
1074
|
combineReducers,
|
|
1038
1075
|
configureStore
|
|
1039
1076
|
} from "@reduxjs/toolkit";
|
|
1040
|
-
import { jsx as
|
|
1077
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1041
1078
|
var store;
|
|
1042
1079
|
var persistentReducers = {};
|
|
1043
1080
|
var dynamicReducers = {};
|
|
@@ -1076,7 +1113,7 @@ var GlobalState = ({
|
|
|
1076
1113
|
preloadedState,
|
|
1077
1114
|
coreReducers
|
|
1078
1115
|
);
|
|
1079
|
-
return /* @__PURE__ */
|
|
1116
|
+
return /* @__PURE__ */ jsx19(Provider, { store: reduxStore, children });
|
|
1080
1117
|
};
|
|
1081
1118
|
|
|
1082
1119
|
// core/state/router/router.store.ts
|
|
@@ -1135,7 +1172,7 @@ var usePageStore = create5()(
|
|
|
1135
1172
|
import { useEffect as useEffect2 } from "react";
|
|
1136
1173
|
import { useDispatch, useStore } from "react-redux";
|
|
1137
1174
|
import { useRouter } from "next/compat/router";
|
|
1138
|
-
import { Fragment as Fragment4, jsx as
|
|
1175
|
+
import { Fragment as Fragment4, jsx as jsx20 } from "react/jsx-runtime";
|
|
1139
1176
|
var PageWrapper = ({
|
|
1140
1177
|
reducers,
|
|
1141
1178
|
title: title2,
|
|
@@ -1159,11 +1196,11 @@ var PageWrapper = ({
|
|
|
1159
1196
|
initPage(dispatch);
|
|
1160
1197
|
}
|
|
1161
1198
|
}, []);
|
|
1162
|
-
return /* @__PURE__ */
|
|
1199
|
+
return /* @__PURE__ */ jsx20(Fragment4, { children });
|
|
1163
1200
|
};
|
|
1164
1201
|
|
|
1165
1202
|
// core/connected-modal/connected-modal.tsx
|
|
1166
|
-
import { jsx as
|
|
1203
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1167
1204
|
var ConnectedModal = ({
|
|
1168
1205
|
modalId,
|
|
1169
1206
|
title: title2,
|
|
@@ -1173,7 +1210,7 @@ var ConnectedModal = ({
|
|
|
1173
1210
|
}) => {
|
|
1174
1211
|
const isOpen = useModalStore((s) => s.isOpen(modalId));
|
|
1175
1212
|
const closeModal = useModalStore((s) => s.closeModal);
|
|
1176
|
-
return /* @__PURE__ */
|
|
1213
|
+
return /* @__PURE__ */ jsx21(
|
|
1177
1214
|
Modal,
|
|
1178
1215
|
{
|
|
1179
1216
|
open: isOpen,
|
|
@@ -1190,34 +1227,34 @@ var ConnectedModal = ({
|
|
|
1190
1227
|
import { LoaderCircle } from "lucide-react";
|
|
1191
1228
|
|
|
1192
1229
|
// core/spinner/spinner.styles.ts
|
|
1193
|
-
import { tv as
|
|
1194
|
-
var spinner =
|
|
1230
|
+
import { tv as tv12 } from "tailwind-variants";
|
|
1231
|
+
var spinner = tv12({
|
|
1195
1232
|
base: "animate-spin w-20 h-20 text-white stroke-[0.3]"
|
|
1196
1233
|
});
|
|
1197
1234
|
|
|
1198
1235
|
// core/spinner/spinner.tsx
|
|
1199
|
-
import { jsx as
|
|
1200
|
-
var Spinner = ({ className }) => /* @__PURE__ */
|
|
1236
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1237
|
+
var Spinner = ({ className }) => /* @__PURE__ */ jsx22(LoaderCircle, { className: spinner({ className }), strokeWidth: 1 });
|
|
1201
1238
|
|
|
1202
1239
|
// core/loader/loader.styles.ts
|
|
1203
|
-
import { tv as
|
|
1204
|
-
var overlay2 =
|
|
1240
|
+
import { tv as tv13 } from "tailwind-variants";
|
|
1241
|
+
var overlay2 = tv13({
|
|
1205
1242
|
base: "flex fixed justify-center items-center w-full h-full bg-black/20 z-50"
|
|
1206
1243
|
});
|
|
1207
1244
|
|
|
1208
1245
|
// core/loader/loader.tsx
|
|
1209
|
-
import { jsx as
|
|
1246
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
1210
1247
|
var Loader = ({ label: label5 = "Loading" }) => {
|
|
1211
1248
|
const fetching = useAppStore((s) => s.fetching);
|
|
1212
1249
|
if (!fetching) return null;
|
|
1213
|
-
return /* @__PURE__ */
|
|
1250
|
+
return /* @__PURE__ */ jsx23("div", { role: "status", "aria-label": label5, className: overlay2(), children: /* @__PURE__ */ jsx23(Spinner, {}) });
|
|
1214
1251
|
};
|
|
1215
1252
|
|
|
1216
1253
|
// core/app-wrapper/app-wrapper.tsx
|
|
1217
1254
|
import { useEffect as useEffect3 } from "react";
|
|
1218
1255
|
import { useRouter as useRouter2 } from "next/compat/router";
|
|
1219
1256
|
import { SessionProvider } from "next-auth/react";
|
|
1220
|
-
import { jsx as
|
|
1257
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1221
1258
|
var AppWrapper = ({
|
|
1222
1259
|
children,
|
|
1223
1260
|
reducers,
|
|
@@ -1231,15 +1268,15 @@ var AppWrapper = ({
|
|
|
1231
1268
|
setRoute(router.asPath);
|
|
1232
1269
|
}
|
|
1233
1270
|
}, [router?.isReady, router?.asPath, setRoute]);
|
|
1234
|
-
return /* @__PURE__ */
|
|
1271
|
+
return /* @__PURE__ */ jsx24(SessionProvider, { children: /* @__PURE__ */ jsxs13(
|
|
1235
1272
|
GlobalState,
|
|
1236
1273
|
{
|
|
1237
1274
|
reducers,
|
|
1238
1275
|
middlewares,
|
|
1239
1276
|
coreReducers,
|
|
1240
1277
|
children: [
|
|
1241
|
-
/* @__PURE__ */
|
|
1242
|
-
/* @__PURE__ */
|
|
1278
|
+
/* @__PURE__ */ jsx24(Loader, {}),
|
|
1279
|
+
/* @__PURE__ */ jsx24(Toaster, {}),
|
|
1243
1280
|
children
|
|
1244
1281
|
]
|
|
1245
1282
|
}
|
|
@@ -1247,13 +1284,13 @@ var AppWrapper = ({
|
|
|
1247
1284
|
};
|
|
1248
1285
|
|
|
1249
1286
|
// core/document-wrapper/document-wrapper.tsx
|
|
1250
|
-
import { jsx as
|
|
1287
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1251
1288
|
var DocumentWrapper = ({
|
|
1252
1289
|
children,
|
|
1253
1290
|
lang = "pt-BR",
|
|
1254
1291
|
className
|
|
1255
1292
|
}) => {
|
|
1256
|
-
return /* @__PURE__ */
|
|
1293
|
+
return /* @__PURE__ */ jsx25("html", { lang, children: /* @__PURE__ */ jsx25("body", { className, children }) });
|
|
1257
1294
|
};
|
|
1258
1295
|
|
|
1259
1296
|
// core/http/http.client.ts
|
|
@@ -1352,6 +1389,7 @@ export {
|
|
|
1352
1389
|
Spinner,
|
|
1353
1390
|
StatsCard,
|
|
1354
1391
|
Tag,
|
|
1392
|
+
Text,
|
|
1355
1393
|
TextArea,
|
|
1356
1394
|
Toaster,
|
|
1357
1395
|
WhatsAppButton,
|