@alexandregme/zljs 0.4.0 → 0.6.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 CHANGED
@@ -18,9 +18,9 @@ type DataColor = "blue" | "red" | "yellow" | "green" | "gray" | "orange";
18
18
  /**
19
19
  * Sizes shared by every sized component (Icon, Button, Input, etc.)
20
20
  */
21
- type Size = "sm" | "md";
21
+ type Size = "sm" | "md" | "lg";
22
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"];
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", "LoaderCircle", "CheckCircle", "XCircle", "AlertTriangle", "Info", "SiWhatsapp", "SiFacebook", "SiInstagram", "SiShopify"];
24
24
 
25
25
  type IconName = (typeof iconNames)[number];
26
26
  interface IconProps {
@@ -184,6 +184,15 @@ interface HeadingProps {
184
184
 
185
185
  declare const Heading: ({ children, level, color }: HeadingProps) => react.JSX.Element;
186
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
+
187
196
  interface SidebarItem {
188
197
  icon: IconName;
189
198
  label: string;
@@ -391,11 +400,13 @@ interface ConnectedModalProps {
391
400
 
392
401
  declare const ConnectedModal: ({ modalId, title, description, size, children, }: ConnectedModalProps) => react.JSX.Element;
393
402
 
403
+ type SpinnerVariant = "circle" | "dots" | "refresh";
394
404
  interface SpinnerProps {
395
- className?: string;
405
+ variant?: SpinnerVariant;
406
+ size?: Size;
396
407
  }
397
408
 
398
- declare const Spinner: ({ className }: SpinnerProps) => react.JSX.Element;
409
+ declare const Spinner: ({ variant, size }: SpinnerProps) => react.JSX.Element;
399
410
 
400
411
  interface LoaderProps {
401
412
  label?: string;
@@ -443,5 +454,5 @@ declare class HTTPClient {
443
454
  patch<T = unknown>(url: string, config?: HttpRequestConfig): Promise<T | undefined>;
444
455
  }
445
456
 
446
- 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 };
447
- 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 };
457
+ 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 };
458
+ 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, SpinnerVariant, StatsCardProps, TagProps, TextAreaProps, TextProps, TextVariant, Toast, ToastState, ToastType, WhatsAppButtonProps };
package/dist/index.js CHANGED
@@ -19,7 +19,8 @@ var iconBrands = {
19
19
  };
20
20
  var iconSizes = {
21
21
  sm: 12,
22
- md: 16
22
+ md: 16,
23
+ lg: 24
23
24
  };
24
25
 
25
26
  // core/icon/icon.tsx
@@ -52,7 +53,8 @@ var button = tv({
52
53
  },
53
54
  size: {
54
55
  sm: "",
55
- md: ""
56
+ md: "",
57
+ lg: ""
56
58
  }
57
59
  },
58
60
  compoundVariants: [
@@ -66,6 +68,16 @@ var button = tv({
66
68
  size: "sm",
67
69
  class: "p-0.5"
68
70
  },
71
+ {
72
+ variant: "default",
73
+ size: "lg",
74
+ class: "px-6 py-3 text-base gap-2"
75
+ },
76
+ {
77
+ variant: "icon",
78
+ size: "lg",
79
+ class: "p-2"
80
+ },
69
81
  {
70
82
  variant: "link",
71
83
  color: "primary",
@@ -589,45 +601,53 @@ var DataGrid = ({
589
601
  );
590
602
  };
591
603
 
592
- // core/stats-card/stats-card.tsx
593
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
594
- var colorClasses = {
595
- blue: {
596
- card: "bg-blue-100",
597
- label: "text-blue-800",
598
- value: "text-blue-900"
599
- },
600
- red: {
601
- card: "bg-red-100",
602
- label: "text-red-800",
603
- value: "text-red-900"
604
- },
605
- yellow: {
606
- card: "bg-yellow-100",
607
- label: "text-yellow-800",
608
- value: "text-yellow-900"
609
- },
610
- green: {
611
- card: "bg-green-100",
612
- label: "text-green-800",
613
- value: "text-green-900"
614
- },
615
- gray: {
616
- card: "bg-gray-100",
617
- label: "text-gray-800",
618
- value: "text-gray-900"
604
+ // core/text/text.styles.ts
605
+ import { tv as tv8 } from "tailwind-variants";
606
+ var text = tv8({
607
+ variants: {
608
+ variant: {
609
+ body: "text-base",
610
+ caption: "text-sm",
611
+ display: "text-3xl font-bold"
612
+ }
619
613
  },
620
- orange: {
621
- card: "bg-orange-100",
622
- label: "text-orange-800",
623
- value: "text-orange-900"
614
+ defaultVariants: {
615
+ variant: "body"
624
616
  }
617
+ });
618
+
619
+ // core/text/text.tsx
620
+ import { jsx as jsx12 } from "react/jsx-runtime";
621
+ var Text = ({
622
+ children,
623
+ as: Tag2 = "p",
624
+ variant = "body"
625
+ }) => {
626
+ return /* @__PURE__ */ jsx12(Tag2, { "data-testid": "text", className: text({ variant }), children });
625
627
  };
628
+
629
+ // core/stats-card/stats-card.styles.ts
630
+ import { tv as tv9 } from "tailwind-variants";
631
+ var statsCard = tv9({
632
+ base: "p-4 rounded-lg",
633
+ variants: {
634
+ color: {
635
+ blue: "bg-blue-100 text-blue-900",
636
+ red: "bg-red-100 text-red-900",
637
+ yellow: "bg-yellow-100 text-yellow-900",
638
+ green: "bg-green-100 text-green-900",
639
+ gray: "bg-gray-100 text-gray-900",
640
+ orange: "bg-orange-100 text-orange-900"
641
+ }
642
+ }
643
+ });
644
+
645
+ // core/stats-card/stats-card.tsx
646
+ import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
626
647
  var StatsCard = ({ label: label5, value, color }) => {
627
- const styles = colorClasses[color];
628
- return /* @__PURE__ */ jsxs10("div", { "data-testid": "stats-card", className: `${styles.card} p-4 rounded-lg`, children: [
629
- /* @__PURE__ */ jsx12("p", { className: `text-sm ${styles.label}`, children: label5 }),
630
- /* @__PURE__ */ jsx12("p", { className: `text-3xl font-bold ${styles.value}`, children: value })
648
+ return /* @__PURE__ */ jsxs10("div", { "data-testid": "stats-card", className: statsCard({ color }), children: [
649
+ /* @__PURE__ */ jsx13(Text, { variant: "caption", children: label5 }),
650
+ /* @__PURE__ */ jsx13(Text, { variant: "display", children: value })
631
651
  ] });
632
652
  };
633
653
 
@@ -635,11 +655,11 @@ var StatsCard = ({ label: label5, value, color }) => {
635
655
  import * as Dialog from "@radix-ui/react-dialog";
636
656
 
637
657
  // core/modal/modal.styles.ts
638
- import { tv as tv8 } from "tailwind-variants";
639
- var overlay = tv8({
658
+ import { tv as tv10 } from "tailwind-variants";
659
+ var overlay = tv10({
640
660
  base: "fixed inset-0 bg-black/50"
641
661
  });
642
- var content = tv8({
662
+ var content = tv10({
643
663
  base: "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 bg-white rounded-lg shadow-lg p-6 w-full focus:outline-none max-h-[90vh] overflow-y-auto",
644
664
  variants: {
645
665
  size: {
@@ -654,21 +674,21 @@ var content = tv8({
654
674
  size: "md"
655
675
  }
656
676
  });
657
- var header = tv8({
677
+ var header = tv10({
658
678
  base: "flex items-start justify-between"
659
679
  });
660
- var title = tv8({
680
+ var title = tv10({
661
681
  base: "text-lg font-semibold text-gray-900 m-0"
662
682
  });
663
- var description = tv8({
683
+ var description = tv10({
664
684
  base: "text-sm text-gray-600 mt-2"
665
685
  });
666
- var body = tv8({
686
+ var body = tv10({
667
687
  base: "mt-4"
668
688
  });
669
689
 
670
690
  // core/modal/modal.tsx
671
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
691
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
672
692
  var Modal = ({
673
693
  open,
674
694
  onClose,
@@ -677,8 +697,8 @@ var Modal = ({
677
697
  children,
678
698
  size = "md"
679
699
  }) => {
680
- return /* @__PURE__ */ jsx13(Dialog.Root, { open, onOpenChange: (isOpen) => !isOpen && onClose(), children: /* @__PURE__ */ jsxs11(Dialog.Portal, { children: [
681
- /* @__PURE__ */ jsx13(Dialog.Overlay, { className: overlay() }),
700
+ return /* @__PURE__ */ jsx14(Dialog.Root, { open, onOpenChange: (isOpen) => !isOpen && onClose(), children: /* @__PURE__ */ jsxs11(Dialog.Portal, { children: [
701
+ /* @__PURE__ */ jsx14(Dialog.Overlay, { className: overlay() }),
682
702
  /* @__PURE__ */ jsxs11(
683
703
  Dialog.Content,
684
704
  {
@@ -686,19 +706,24 @@ var Modal = ({
686
706
  ...!description2 && { "aria-describedby": void 0 },
687
707
  children: [
688
708
  /* @__PURE__ */ jsxs11("div", { className: header(), children: [
689
- /* @__PURE__ */ jsx13(Dialog.Title, { className: title(), children: title2 }),
690
- /* @__PURE__ */ jsx13(Button, { icon: "X", "aria-label": "Close", onClick: onClose })
709
+ /* @__PURE__ */ jsx14(Dialog.Title, { className: title(), children: title2 }),
710
+ /* @__PURE__ */ jsx14(Button, { icon: "X", "aria-label": "Close", onClick: onClose })
691
711
  ] }),
692
- description2 && /* @__PURE__ */ jsx13(Dialog.Description, { className: description(), children: description2 }),
693
- children && /* @__PURE__ */ jsx13("div", { className: body(), children })
712
+ description2 && /* @__PURE__ */ jsx14(Dialog.Description, { className: description(), children: description2 }),
713
+ children && /* @__PURE__ */ jsx14("div", { className: body(), children })
694
714
  ]
695
715
  }
696
716
  )
697
717
  ] }) });
698
718
  };
699
719
 
720
+ // core/whatsapp-button/whatsapp-button.const.ts
721
+ var whatsappWebUrl = "https://wa.me";
722
+ var whatsappBusinessUrl = "whatsapp-business://send";
723
+ var whatsappMobileUserAgent = /Android|iPhone|iPad|iPod/i;
724
+
700
725
  // core/whatsapp-button/whatsapp-button.tsx
701
- import { jsx as jsx14 } from "react/jsx-runtime";
726
+ import { jsx as jsx15 } from "react/jsx-runtime";
702
727
  var WhatsAppButton = ({
703
728
  phone,
704
729
  message,
@@ -707,23 +732,23 @@ var WhatsAppButton = ({
707
732
  }) => {
708
733
  const handleClick = () => {
709
734
  const userAgent = navigator?.userAgent ?? "";
710
- const isMobile = /Android|iPhone|iPad|iPod/i.test(userAgent);
735
+ const isMobile = whatsappMobileUserAgent.test(userAgent);
711
736
  const hasMessage = Boolean(message);
712
737
  const encodedMessage = hasMessage ? encodeURIComponent(message) : "";
713
- const whatsappUrl = hasMessage ? `https://wa.me/${phone}?text=${encodedMessage}` : `https://wa.me/${phone}`;
714
- const whatsappBusinessUrl = hasMessage ? `whatsapp-business://send?phone=${phone}&text=${encodedMessage}` : `whatsapp-business://send?phone=${phone}`;
738
+ const webUrl = hasMessage ? `${whatsappWebUrl}/${phone}?text=${encodedMessage}` : `${whatsappWebUrl}/${phone}`;
739
+ const businessUrl = hasMessage ? `${whatsappBusinessUrl}?phone=${phone}&text=${encodedMessage}` : `${whatsappBusinessUrl}?phone=${phone}`;
715
740
  if (isMobile) {
716
741
  if (window.location?.assign) {
717
- window.location.assign(whatsappBusinessUrl);
742
+ window.location.assign(businessUrl);
718
743
  } else {
719
- window.location.href = whatsappBusinessUrl;
744
+ window.location.href = businessUrl;
720
745
  }
721
746
  } else {
722
- window.open(whatsappUrl, "_blank");
747
+ window.open(webUrl, "_blank");
723
748
  }
724
749
  onClick?.();
725
750
  };
726
- return /* @__PURE__ */ jsx14(Button, { color: "success", icon: "SiWhatsapp", onClick: handleClick, children });
751
+ return /* @__PURE__ */ jsx15(Button, { color: "success", icon: "SiWhatsapp", onClick: handleClick, children });
727
752
  };
728
753
 
729
754
  // core/heading/heading.const.ts
@@ -737,8 +762,8 @@ var headingTags = {
737
762
  };
738
763
 
739
764
  // core/heading/heading.styles.ts
740
- import { tv as tv9 } from "tailwind-variants";
741
- var heading = tv9({
765
+ import { tv as tv11 } from "tailwind-variants";
766
+ var heading = tv11({
742
767
  variants: {
743
768
  level: {
744
769
  1: "text-3xl font-bold",
@@ -763,10 +788,10 @@ var heading = tv9({
763
788
  });
764
789
 
765
790
  // core/heading/heading.tsx
766
- import { jsx as jsx15 } from "react/jsx-runtime";
791
+ import { jsx as jsx16 } from "react/jsx-runtime";
767
792
  var Heading = ({ children, level = 1, color }) => {
768
793
  const Tag2 = headingTags[level];
769
- return /* @__PURE__ */ jsx15(Tag2, { className: heading({ level, color }), children });
794
+ return /* @__PURE__ */ jsx16(Tag2, { className: heading({ level, color }), children });
770
795
  };
771
796
 
772
797
  // core/sidebar/sidebar.tsx
@@ -774,8 +799,8 @@ import { useState as useState3 } from "react";
774
799
  import Link from "next/link";
775
800
 
776
801
  // core/sidebar/sidebar.styles.ts
777
- import { tv as tv10 } from "tailwind-variants";
778
- var sidebar = tv10({
802
+ import { tv as tv12 } from "tailwind-variants";
803
+ var sidebar = tv12({
779
804
  base: "h-screen bg-neutral-800 text-neutral-300 flex flex-col overflow-hidden transition-all duration-200",
780
805
  variants: {
781
806
  collapsed: {
@@ -787,16 +812,16 @@ var sidebar = tv10({
787
812
  collapsed: false
788
813
  }
789
814
  });
790
- var nav = tv10({
815
+ var nav = tv12({
791
816
  base: "flex-1 min-h-0 overflow-y-auto overflow-x-hidden"
792
817
  });
793
- var header2 = tv10({
818
+ var header2 = tv12({
794
819
  base: "shrink-0 border-b border-neutral-600/50 grid p-2"
795
820
  });
796
- var section = tv10({
821
+ var section = tv12({
797
822
  base: "border-b border-neutral-600/50 last:border-b-0 grid gap-1 p-2"
798
823
  });
799
- var item = tv10({
824
+ var item = tv12({
800
825
  base: "flex w-full items-center rounded-md text-sm whitespace-nowrap transition-colors cursor-pointer p-1",
801
826
  variants: {
802
827
  active: {
@@ -808,10 +833,10 @@ var item = tv10({
808
833
  active: false
809
834
  }
810
835
  });
811
- var itemIcon = tv10({
836
+ var itemIcon = tv12({
812
837
  base: "p-2"
813
838
  });
814
- var itemLabel = tv10({
839
+ var itemLabel = tv12({
815
840
  base: "truncate transition-all duration-200",
816
841
  variants: {
817
842
  collapsed: {
@@ -823,27 +848,27 @@ var itemLabel = tv10({
823
848
  collapsed: false
824
849
  }
825
850
  });
826
- var footer = tv10({
851
+ var footer = tv12({
827
852
  base: "shrink-0 border-t border-neutral-600/50 p-3 flex items-center gap-3 whitespace-nowrap"
828
853
  });
829
- var avatar = tv10({
854
+ var avatar = tv12({
830
855
  base: "shrink-0 w-8 h-8 rounded-full bg-neutral-600 text-white text-xs font-medium flex items-center justify-center"
831
856
  });
832
- var userInfo = tv10({
857
+ var userInfo = tv12({
833
858
  base: "flex flex-col min-w-0"
834
859
  });
835
- var userName = tv10({
860
+ var userName = tv12({
836
861
  base: "text-sm text-white truncate"
837
862
  });
838
- var userEmail = tv10({
863
+ var userEmail = tv12({
839
864
  base: "text-xs text-neutral-400"
840
865
  });
841
- var toggleButton = tv10({
866
+ var toggleButton = tv12({
842
867
  base: "shrink-0 border-t border-neutral-600/50 grid p-2 [&>button]:justify-start [&>button]:overflow-hidden [&>button]:whitespace-nowrap"
843
868
  });
844
869
 
845
870
  // core/sidebar/sidebar.tsx
846
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
871
+ import { jsx as jsx17, jsxs as jsxs12 } from "react/jsx-runtime";
847
872
  var getInitials = (name) => {
848
873
  const parts = name.trim().split(/\s+/);
849
874
  if (parts.length >= 2) {
@@ -864,19 +889,19 @@ var Sidebar = ({
864
889
  const [collapsed, setCollapsed] = useState3(defaultCollapsed);
865
890
  const initials = getInitials(user.name);
866
891
  return /* @__PURE__ */ jsxs12("aside", { className: sidebar({ collapsed }), children: [
867
- homeHref && /* @__PURE__ */ jsx16(
892
+ homeHref && /* @__PURE__ */ jsx17(
868
893
  Link,
869
894
  {
870
895
  href: homeHref,
871
896
  className: header2(),
872
897
  "aria-label": homeLabel || "Home",
873
898
  children: /* @__PURE__ */ jsxs12("span", { className: item({ active: homeHref === activeHref }), children: [
874
- /* @__PURE__ */ jsx16("span", { className: itemIcon(), children: /* @__PURE__ */ jsx16(Icon, { name: "Home" }) }),
875
- /* @__PURE__ */ jsx16("span", { className: itemLabel({ collapsed }), children: homeLabel })
899
+ /* @__PURE__ */ jsx17("span", { className: itemIcon(), children: /* @__PURE__ */ jsx17(Icon, { name: "Home" }) }),
900
+ /* @__PURE__ */ jsx17("span", { className: itemLabel({ collapsed }), children: homeLabel })
876
901
  ] })
877
902
  }
878
903
  ),
879
- /* @__PURE__ */ jsx16("nav", { "aria-label": "Main navigation", className: nav(), children: sections.map((sectionData, i) => /* @__PURE__ */ jsx16("div", { className: section(), children: sectionData.items.map((sidebarItem) => {
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) => {
880
905
  const isActive = sidebarItem.href === activeHref;
881
906
  return /* @__PURE__ */ jsxs12(
882
907
  Link,
@@ -885,20 +910,20 @@ var Sidebar = ({
885
910
  className: item({ active: isActive }),
886
911
  ...isActive && { "aria-current": "page" },
887
912
  children: [
888
- /* @__PURE__ */ jsx16("span", { className: itemIcon(), children: /* @__PURE__ */ jsx16(Icon, { name: sidebarItem.icon }) }),
889
- /* @__PURE__ */ jsx16("span", { className: itemLabel({ collapsed }), children: sidebarItem.label })
913
+ /* @__PURE__ */ jsx17("span", { className: itemIcon(), children: /* @__PURE__ */ jsx17(Icon, { name: sidebarItem.icon }) }),
914
+ /* @__PURE__ */ jsx17("span", { className: itemLabel({ collapsed }), children: sidebarItem.label })
890
915
  ]
891
916
  },
892
917
  sidebarItem.href
893
918
  );
894
919
  }) }, i)) }),
895
920
  /* @__PURE__ */ jsxs12("div", { className: footer(), children: [
896
- /* @__PURE__ */ jsx16("div", { className: avatar(), children: initials }),
921
+ /* @__PURE__ */ jsx17("div", { className: avatar(), children: initials }),
897
922
  /* @__PURE__ */ jsxs12("div", { className: userInfo(), children: [
898
- /* @__PURE__ */ jsx16("span", { className: userName(), children: user.name }),
899
- /* @__PURE__ */ jsx16("span", { className: userEmail(), children: user.email })
923
+ /* @__PURE__ */ jsx17("span", { className: userName(), children: user.name }),
924
+ /* @__PURE__ */ jsx17("span", { className: userEmail(), children: user.email })
900
925
  ] }),
901
- /* @__PURE__ */ jsx16(
926
+ /* @__PURE__ */ jsx17(
902
927
  Button,
903
928
  {
904
929
  variant: "ghost",
@@ -908,7 +933,7 @@ var Sidebar = ({
908
933
  }
909
934
  )
910
935
  ] }),
911
- /* @__PURE__ */ jsx16("div", { className: toggleButton(), children: /* @__PURE__ */ jsx16(
936
+ /* @__PURE__ */ jsx17("div", { className: toggleButton(), children: /* @__PURE__ */ jsx17(
912
937
  Button,
913
938
  {
914
939
  variant: "ghost",
@@ -957,7 +982,7 @@ var useToastStore = create()(
957
982
  );
958
983
 
959
984
  // core/toaster/toaster.tsx
960
- import { jsx as jsx17 } from "react/jsx-runtime";
985
+ import { jsx as jsx18 } from "react/jsx-runtime";
961
986
  var Toaster = () => {
962
987
  const toasts = useToastStore((s) => s.toasts);
963
988
  const removeToast = useToastStore((s) => s.removeToast);
@@ -970,7 +995,7 @@ var Toaster = () => {
970
995
  removeToast(t.id);
971
996
  });
972
997
  }, [toasts, removeToast]);
973
- return /* @__PURE__ */ jsx17(
998
+ return /* @__PURE__ */ jsx18(
974
999
  SonnerToaster,
975
1000
  {
976
1001
  position: "bottom-right",
@@ -1049,7 +1074,7 @@ import {
1049
1074
  combineReducers,
1050
1075
  configureStore
1051
1076
  } from "@reduxjs/toolkit";
1052
- import { jsx as jsx18 } from "react/jsx-runtime";
1077
+ import { jsx as jsx19 } from "react/jsx-runtime";
1053
1078
  var store;
1054
1079
  var persistentReducers = {};
1055
1080
  var dynamicReducers = {};
@@ -1088,7 +1113,7 @@ var GlobalState = ({
1088
1113
  preloadedState,
1089
1114
  coreReducers
1090
1115
  );
1091
- return /* @__PURE__ */ jsx18(Provider, { store: reduxStore, children });
1116
+ return /* @__PURE__ */ jsx19(Provider, { store: reduxStore, children });
1092
1117
  };
1093
1118
 
1094
1119
  // core/state/router/router.store.ts
@@ -1147,7 +1172,7 @@ var usePageStore = create5()(
1147
1172
  import { useEffect as useEffect2 } from "react";
1148
1173
  import { useDispatch, useStore } from "react-redux";
1149
1174
  import { useRouter } from "next/compat/router";
1150
- import { Fragment as Fragment4, jsx as jsx19 } from "react/jsx-runtime";
1175
+ import { Fragment as Fragment4, jsx as jsx20 } from "react/jsx-runtime";
1151
1176
  var PageWrapper = ({
1152
1177
  reducers,
1153
1178
  title: title2,
@@ -1171,11 +1196,11 @@ var PageWrapper = ({
1171
1196
  initPage(dispatch);
1172
1197
  }
1173
1198
  }, []);
1174
- return /* @__PURE__ */ jsx19(Fragment4, { children });
1199
+ return /* @__PURE__ */ jsx20(Fragment4, { children });
1175
1200
  };
1176
1201
 
1177
1202
  // core/connected-modal/connected-modal.tsx
1178
- import { jsx as jsx20 } from "react/jsx-runtime";
1203
+ import { jsx as jsx21 } from "react/jsx-runtime";
1179
1204
  var ConnectedModal = ({
1180
1205
  modalId,
1181
1206
  title: title2,
@@ -1185,7 +1210,7 @@ var ConnectedModal = ({
1185
1210
  }) => {
1186
1211
  const isOpen = useModalStore((s) => s.isOpen(modalId));
1187
1212
  const closeModal = useModalStore((s) => s.closeModal);
1188
- return /* @__PURE__ */ jsx20(
1213
+ return /* @__PURE__ */ jsx21(
1189
1214
  Modal,
1190
1215
  {
1191
1216
  open: isOpen,
@@ -1198,38 +1223,42 @@ var ConnectedModal = ({
1198
1223
  );
1199
1224
  };
1200
1225
 
1201
- // core/spinner/spinner.tsx
1202
- import { LoaderCircle } from "lucide-react";
1226
+ // core/spinner/spinner.const.ts
1227
+ var spinnerIcons = {
1228
+ circle: "LoaderCircle",
1229
+ dots: "Loader",
1230
+ refresh: "RefreshCw"
1231
+ };
1203
1232
 
1204
1233
  // core/spinner/spinner.styles.ts
1205
- import { tv as tv11 } from "tailwind-variants";
1206
- var spinner = tv11({
1207
- base: "animate-spin w-20 h-20 text-white stroke-[0.3]"
1234
+ import { tv as tv13 } from "tailwind-variants";
1235
+ var spinner = tv13({
1236
+ base: "inline-flex animate-spin text-white"
1208
1237
  });
1209
1238
 
1210
1239
  // core/spinner/spinner.tsx
1211
- import { jsx as jsx21 } from "react/jsx-runtime";
1212
- var Spinner = ({ className }) => /* @__PURE__ */ jsx21(LoaderCircle, { className: spinner({ className }), strokeWidth: 1 });
1240
+ import { jsx as jsx22 } from "react/jsx-runtime";
1241
+ var Spinner = ({ variant = "circle", size = "md" }) => /* @__PURE__ */ jsx22("span", { "data-testid": "spinner", className: spinner(), children: /* @__PURE__ */ jsx22(Icon, { name: spinnerIcons[variant], size }) });
1213
1242
 
1214
1243
  // core/loader/loader.styles.ts
1215
- import { tv as tv12 } from "tailwind-variants";
1216
- var overlay2 = tv12({
1244
+ import { tv as tv14 } from "tailwind-variants";
1245
+ var overlay2 = tv14({
1217
1246
  base: "flex fixed justify-center items-center w-full h-full bg-black/20 z-50"
1218
1247
  });
1219
1248
 
1220
1249
  // core/loader/loader.tsx
1221
- import { jsx as jsx22 } from "react/jsx-runtime";
1250
+ import { jsx as jsx23 } from "react/jsx-runtime";
1222
1251
  var Loader = ({ label: label5 = "Loading" }) => {
1223
1252
  const fetching = useAppStore((s) => s.fetching);
1224
1253
  if (!fetching) return null;
1225
- return /* @__PURE__ */ jsx22("div", { role: "status", "aria-label": label5, className: overlay2(), children: /* @__PURE__ */ jsx22(Spinner, {}) });
1254
+ return /* @__PURE__ */ jsx23("div", { role: "status", "aria-label": label5, className: overlay2(), children: /* @__PURE__ */ jsx23(Spinner, { size: "lg" }) });
1226
1255
  };
1227
1256
 
1228
1257
  // core/app-wrapper/app-wrapper.tsx
1229
1258
  import { useEffect as useEffect3 } from "react";
1230
1259
  import { useRouter as useRouter2 } from "next/compat/router";
1231
1260
  import { SessionProvider } from "next-auth/react";
1232
- import { jsx as jsx23, jsxs as jsxs13 } from "react/jsx-runtime";
1261
+ import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
1233
1262
  var AppWrapper = ({
1234
1263
  children,
1235
1264
  reducers,
@@ -1243,15 +1272,15 @@ var AppWrapper = ({
1243
1272
  setRoute(router.asPath);
1244
1273
  }
1245
1274
  }, [router?.isReady, router?.asPath, setRoute]);
1246
- return /* @__PURE__ */ jsx23(SessionProvider, { children: /* @__PURE__ */ jsxs13(
1275
+ return /* @__PURE__ */ jsx24(SessionProvider, { children: /* @__PURE__ */ jsxs13(
1247
1276
  GlobalState,
1248
1277
  {
1249
1278
  reducers,
1250
1279
  middlewares,
1251
1280
  coreReducers,
1252
1281
  children: [
1253
- /* @__PURE__ */ jsx23(Loader, {}),
1254
- /* @__PURE__ */ jsx23(Toaster, {}),
1282
+ /* @__PURE__ */ jsx24(Loader, {}),
1283
+ /* @__PURE__ */ jsx24(Toaster, {}),
1255
1284
  children
1256
1285
  ]
1257
1286
  }
@@ -1259,13 +1288,13 @@ var AppWrapper = ({
1259
1288
  };
1260
1289
 
1261
1290
  // core/document-wrapper/document-wrapper.tsx
1262
- import { jsx as jsx24 } from "react/jsx-runtime";
1291
+ import { jsx as jsx25 } from "react/jsx-runtime";
1263
1292
  var DocumentWrapper = ({
1264
1293
  children,
1265
1294
  lang = "pt-BR",
1266
1295
  className
1267
1296
  }) => {
1268
- return /* @__PURE__ */ jsx24("html", { lang, children: /* @__PURE__ */ jsx24("body", { className, children }) });
1297
+ return /* @__PURE__ */ jsx25("html", { lang, children: /* @__PURE__ */ jsx25("body", { className, children }) });
1269
1298
  };
1270
1299
 
1271
1300
  // core/http/http.client.ts
@@ -1364,6 +1393,7 @@ export {
1364
1393
  Spinner,
1365
1394
  StatsCard,
1366
1395
  Tag,
1396
+ Text,
1367
1397
  TextArea,
1368
1398
  Toaster,
1369
1399
  WhatsAppButton,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexandregme/zljs",
3
- "version": "0.4.0",
3
+ "version": "0.6.0",
4
4
  "description": "Opinionated, accessible React component library for enterprise apps (Next.js, Tailwind CSS v4).",
5
5
  "keywords": [
6
6
  "react",