@customafk/lunas-ui 0.1.63 → 0.1.65

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.
Files changed (131) hide show
  1. package/dist/{button-JlbAGiZ4.d.cts → button-B-ba_2Ct.d.cts} +4 -4
  2. package/dist/{button-CvqhYhbD.d.mts → button-Dj9K9IDQ.d.mts} +6 -6
  3. package/dist/{dialog-Ct3CfsWu.d.cts → dialog-CDJxe4km.d.mts} +12 -12
  4. package/dist/{dialog-lTmdu05q.d.mts → dialog-DbUT8FYE.d.cts} +12 -12
  5. package/dist/dialogs/detail-dialog/components/sidebar.d.cts +2 -2
  6. package/dist/dialogs/detail-dialog/components/sidebar.d.mts +2 -2
  7. package/dist/dialogs/detail-dialog/index.cjs +1 -1
  8. package/dist/dialogs/detail-dialog/index.cjs.map +1 -1
  9. package/dist/dialogs/detail-dialog/index.mjs +1 -1
  10. package/dist/dialogs/detail-dialog/index.mjs.map +1 -1
  11. package/dist/features/descriptions/index.cjs +1 -1
  12. package/dist/features/descriptions/index.cjs.map +1 -1
  13. package/dist/features/descriptions/index.mjs +1 -1
  14. package/dist/features/descriptions/index.mjs.map +1 -1
  15. package/dist/features/search-modal/index.d.mts +2 -2
  16. package/dist/features/tables/index.d.mts +1 -1
  17. package/dist/{input-B7Cg9VS5.d.mts → input-CvKhyXfs.d.mts} +3 -3
  18. package/dist/layouts/app-layout/index.d.cts +27 -27
  19. package/dist/layouts/app-layout/index.d.mts +27 -27
  20. package/dist/layouts/flex.d.mts +2 -2
  21. package/dist/layouts/service-layout/index.d.cts +12 -12
  22. package/dist/layouts/service-layout/index.d.mts +14 -14
  23. package/dist/pages/FeatureDeveloping.d.cts +2 -2
  24. package/dist/pages/FeatureDeveloping.d.mts +2 -2
  25. package/dist/pages/FeatureFixing.d.cts +2 -2
  26. package/dist/pages/FeatureFixing.d.mts +2 -2
  27. package/dist/pages/NotAuthorized.d.cts +2 -2
  28. package/dist/pages/NotAuthorized.d.mts +2 -2
  29. package/dist/pages/NotFound.d.mts +2 -2
  30. package/dist/{separator-Bkes-3Sb.d.mts → separator-BLK3kO-5.d.cts} +3 -3
  31. package/dist/{separator-BlDi1CSH.d.cts → separator-DG0RZ3MC.d.mts} +3 -3
  32. package/dist/typography/paragraph.d.cts +2 -2
  33. package/dist/typography/paragraph.d.mts +2 -2
  34. package/dist/typography/title.d.cts +2 -2
  35. package/dist/ui/alert-dialog.d.cts +12 -12
  36. package/dist/ui/alert-dialog.d.mts +12 -12
  37. package/dist/ui/alert.d.cts +5 -5
  38. package/dist/ui/alert.d.mts +7 -7
  39. package/dist/ui/aspect-ratio.d.cts +2 -2
  40. package/dist/ui/aspect-ratio.d.mts +2 -2
  41. package/dist/ui/avatar.d.cts +4 -4
  42. package/dist/ui/avatar.d.mts +4 -4
  43. package/dist/ui/badge.d.cts +2 -2
  44. package/dist/ui/badge.d.mts +2 -2
  45. package/dist/ui/breadcrumb.d.cts +8 -8
  46. package/dist/ui/breadcrumb.d.mts +8 -8
  47. package/dist/ui/button-group.d.cts +5 -5
  48. package/dist/ui/button-group.d.mts +5 -5
  49. package/dist/ui/button.d.cts +1 -1
  50. package/dist/ui/button.d.mts +1 -1
  51. package/dist/ui/calendar.d.cts +1 -1
  52. package/dist/ui/calendar.d.mts +4 -4
  53. package/dist/ui/card.d.cts +8 -8
  54. package/dist/ui/card.d.mts +8 -8
  55. package/dist/ui/carousel.d.cts +1 -1
  56. package/dist/ui/carousel.d.mts +7 -7
  57. package/dist/ui/collapsible.d.cts +4 -4
  58. package/dist/ui/collapsible.d.mts +4 -4
  59. package/dist/ui/command.d.cts +11 -11
  60. package/dist/ui/command.d.mts +11 -11
  61. package/dist/ui/context-menu.d.cts +16 -16
  62. package/dist/ui/context-menu.d.mts +16 -16
  63. package/dist/ui/dialog.d.cts +1 -1
  64. package/dist/ui/dialog.d.mts +1 -1
  65. package/dist/ui/drawer.d.cts +11 -11
  66. package/dist/ui/drawer.d.mts +11 -11
  67. package/dist/ui/dropdown-menu.d.cts +16 -16
  68. package/dist/ui/dropdown-menu.d.mts +16 -16
  69. package/dist/ui/empty.d.cts +7 -7
  70. package/dist/ui/empty.d.mts +7 -7
  71. package/dist/ui/field.d.cts +11 -11
  72. package/dist/ui/field.d.mts +24 -24
  73. package/dist/ui/file-uploader.d.cts +2 -2
  74. package/dist/ui/file-uploader.d.mts +2 -2
  75. package/dist/ui/form.d.mts +11 -11
  76. package/dist/ui/hover-card.d.cts +4 -4
  77. package/dist/ui/hover-card.d.mts +4 -4
  78. package/dist/ui/input-otp.d.cts +5 -5
  79. package/dist/ui/input-otp.d.mts +5 -5
  80. package/dist/ui/input.d.mts +1 -1
  81. package/dist/ui/inputs/search-input.d.cts +2 -2
  82. package/dist/ui/inputs/search-input.d.mts +3 -3
  83. package/dist/ui/item.d.cts +12 -12
  84. package/dist/ui/item.d.mts +15 -15
  85. package/dist/ui/label.d.cts +2 -2
  86. package/dist/ui/label.d.mts +2 -2
  87. package/dist/ui/menubar.d.cts +17 -17
  88. package/dist/ui/multi-select.d.mts +3 -3
  89. package/dist/ui/navigation-menu.d.cts +9 -9
  90. package/dist/ui/navigation-menu.d.mts +9 -9
  91. package/dist/ui/pagination.d.cts +9 -9
  92. package/dist/ui/pagination.d.mts +9 -9
  93. package/dist/ui/popover.d.cts +5 -5
  94. package/dist/ui/popover.d.mts +5 -5
  95. package/dist/ui/progress.d.cts +2 -2
  96. package/dist/ui/progress.d.mts +2 -2
  97. package/dist/ui/radio-group.d.cts +3 -3
  98. package/dist/ui/radio-group.d.mts +3 -3
  99. package/dist/ui/resizable.d.cts +4 -4
  100. package/dist/ui/resizable.d.mts +4 -4
  101. package/dist/ui/scroll-area.d.cts +3 -3
  102. package/dist/ui/scroll-area.d.mts +6 -6
  103. package/dist/ui/select.d.cts +11 -11
  104. package/dist/ui/select.d.mts +11 -11
  105. package/dist/ui/separator.d.cts +1 -1
  106. package/dist/ui/separator.d.mts +1 -1
  107. package/dist/ui/sheet.d.cts +9 -9
  108. package/dist/ui/sheet.d.mts +9 -9
  109. package/dist/ui/sidebar.d.cts +26 -26
  110. package/dist/ui/sidebar.d.mts +29 -29
  111. package/dist/ui/skeleton.d.cts +2 -2
  112. package/dist/ui/skeleton.d.mts +2 -2
  113. package/dist/ui/slider.d.cts +2 -2
  114. package/dist/ui/slider.d.mts +2 -2
  115. package/dist/ui/sonner.d.cts +2 -2
  116. package/dist/ui/sonner.d.mts +2 -2
  117. package/dist/ui/spinner.d.cts +2 -2
  118. package/dist/ui/spinner.d.mts +2 -2
  119. package/dist/ui/switch.d.cts +2 -2
  120. package/dist/ui/switch.d.mts +2 -2
  121. package/dist/ui/table.d.cts +9 -9
  122. package/dist/ui/table.d.mts +9 -9
  123. package/dist/ui/tabs.d.cts +5 -5
  124. package/dist/ui/tabs.d.mts +5 -5
  125. package/dist/ui/textarea.d.cts +2 -2
  126. package/dist/ui/textarea.d.mts +2 -2
  127. package/dist/ui/toggle-group.d.cts +3 -3
  128. package/dist/ui/toggle-group.d.mts +3 -3
  129. package/dist/ui/toggle.d.cts +2 -2
  130. package/dist/ui/toggle.d.mts +4 -4
  131. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- import * as react_jsx_runtime55 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime51 from "react/jsx-runtime";
2
2
  import * as class_variance_authority_types12 from "class-variance-authority/types";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
 
@@ -9,7 +9,7 @@ import { VariantProps } from "class-variance-authority";
9
9
  */
10
10
  declare const buttonVariants: (props?: ({
11
11
  variant?: "default" | "outline" | "link" | "ghost" | "soft" | "subtle" | null | undefined;
12
- color?: "muted" | "primary" | "secondary" | "success" | "important" | "info" | "warning" | "danger" | null | undefined;
12
+ color?: "muted" | "success" | "warning" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
14
14
  } & class_variance_authority_types12.ClassProp) | undefined) => string;
15
15
  type ButtonVariantProps = VariantProps<typeof buttonVariants>;
@@ -51,7 +51,7 @@ declare function Button({
51
51
  disabled,
52
52
  type,
53
53
  ...props
54
- }: ButtonProps): react_jsx_runtime55.JSX.Element;
54
+ }: ButtonProps): react_jsx_runtime51.JSX.Element;
55
55
  //#endregion
56
56
  export { ButtonProps as n, Button as t };
57
- //# sourceMappingURL=button-JlbAGiZ4.d.cts.map
57
+ //# sourceMappingURL=button-B-ba_2Ct.d.cts.map
@@ -1,6 +1,6 @@
1
- import * as react_jsx_runtime52 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime48 from "react/jsx-runtime";
2
2
  import { VariantProps } from "class-variance-authority";
3
- import * as class_variance_authority_types11 from "class-variance-authority/types";
3
+ import * as class_variance_authority_types12 from "class-variance-authority/types";
4
4
 
5
5
  //#region packages/components/ui/button.variants.d.ts
6
6
 
@@ -9,9 +9,9 @@ import * as class_variance_authority_types11 from "class-variance-authority/type
9
9
  */
10
10
  declare const buttonVariants: (props?: ({
11
11
  variant?: "default" | "outline" | "link" | "ghost" | "soft" | "subtle" | null | undefined;
12
- color?: "muted" | "primary" | "secondary" | "success" | "important" | "info" | "warning" | "danger" | null | undefined;
12
+ color?: "muted" | "success" | "warning" | "info" | "primary" | "secondary" | "important" | "danger" | null | undefined;
13
13
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "default" | "icon" | null | undefined;
14
- } & class_variance_authority_types11.ClassProp) | undefined) => string;
14
+ } & class_variance_authority_types12.ClassProp) | undefined) => string;
15
15
  type ButtonVariantProps = VariantProps<typeof buttonVariants>;
16
16
  //#endregion
17
17
  //#region packages/components/ui/button.d.ts
@@ -51,7 +51,7 @@ declare function Button({
51
51
  disabled,
52
52
  type,
53
53
  ...props
54
- }: ButtonProps): react_jsx_runtime52.JSX.Element;
54
+ }: ButtonProps): react_jsx_runtime48.JSX.Element;
55
55
  //#endregion
56
56
  export { ButtonProps as n, Button as t };
57
- //# sourceMappingURL=button-CvqhYhbD.d.mts.map
57
+ //# sourceMappingURL=button-Dj9K9IDQ.d.mts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime89 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime83 from "react/jsx-runtime";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
5
5
  declare function Dialog$1({
6
6
  ...props
7
- }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime89.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime83.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime89.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime83.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime89.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime83.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime89.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime83.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime89.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime83.JSX.Element;
21
21
  declare function DialogContent({
22
22
  className,
23
23
  children,
@@ -25,23 +25,23 @@ declare function DialogContent({
25
25
  ...props
26
26
  }: React.ComponentProps<typeof Dialog.Content> & {
27
27
  showCloseButton?: boolean;
28
- }): react_jsx_runtime89.JSX.Element;
28
+ }): react_jsx_runtime83.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime89.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime83.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime89.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime83.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime89.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime83.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime89.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime83.JSX.Element;
45
45
  //#endregion
46
46
  export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
47
- //# sourceMappingURL=dialog-Ct3CfsWu.d.cts.map
47
+ //# sourceMappingURL=dialog-CDJxe4km.d.mts.map
@@ -1,23 +1,23 @@
1
- import * as react_jsx_runtime104 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime114 from "react/jsx-runtime";
2
2
  import { Dialog } from "radix-ui";
3
3
 
4
4
  //#region packages/components/ui/dialog.d.ts
5
5
  declare function Dialog$1({
6
6
  ...props
7
- }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime104.JSX.Element;
7
+ }: React.ComponentProps<typeof Dialog.Root>): react_jsx_runtime114.JSX.Element;
8
8
  declare function DialogTrigger({
9
9
  ...props
10
- }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime104.JSX.Element;
10
+ }: React.ComponentProps<typeof Dialog.Trigger>): react_jsx_runtime114.JSX.Element;
11
11
  declare function DialogPortal({
12
12
  ...props
13
- }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime104.JSX.Element;
13
+ }: React.ComponentProps<typeof Dialog.Portal>): react_jsx_runtime114.JSX.Element;
14
14
  declare function DialogClose({
15
15
  ...props
16
- }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime104.JSX.Element;
16
+ }: React.ComponentProps<typeof Dialog.Close>): react_jsx_runtime114.JSX.Element;
17
17
  declare function DialogOverlay({
18
18
  className,
19
19
  ...props
20
- }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime104.JSX.Element;
20
+ }: React.ComponentProps<typeof Dialog.Overlay>): react_jsx_runtime114.JSX.Element;
21
21
  declare function DialogContent({
22
22
  className,
23
23
  children,
@@ -25,23 +25,23 @@ declare function DialogContent({
25
25
  ...props
26
26
  }: React.ComponentProps<typeof Dialog.Content> & {
27
27
  showCloseButton?: boolean;
28
- }): react_jsx_runtime104.JSX.Element;
28
+ }): react_jsx_runtime114.JSX.Element;
29
29
  declare function DialogHeader({
30
30
  className,
31
31
  ...props
32
- }: React.ComponentProps<'div'>): react_jsx_runtime104.JSX.Element;
32
+ }: React.ComponentProps<'div'>): react_jsx_runtime114.JSX.Element;
33
33
  declare function DialogFooter({
34
34
  className,
35
35
  ...props
36
- }: React.ComponentProps<'div'>): react_jsx_runtime104.JSX.Element;
36
+ }: React.ComponentProps<'div'>): react_jsx_runtime114.JSX.Element;
37
37
  declare function DialogTitle({
38
38
  className,
39
39
  ...props
40
- }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime104.JSX.Element;
40
+ }: React.ComponentProps<typeof Dialog.Title>): react_jsx_runtime114.JSX.Element;
41
41
  declare function DialogDescription({
42
42
  className,
43
43
  ...props
44
- }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime104.JSX.Element;
44
+ }: React.ComponentProps<typeof Dialog.Description>): react_jsx_runtime114.JSX.Element;
45
45
  //#endregion
46
46
  export { DialogFooter as a, DialogPortal as c, DialogDescription as i, DialogTitle as l, DialogClose as n, DialogHeader as o, DialogContent as r, DialogOverlay as s, Dialog$1 as t, DialogTrigger as u };
47
- //# sourceMappingURL=dialog-lTmdu05q.d.mts.map
47
+ //# sourceMappingURL=dialog-DbUT8FYE.d.cts.map
@@ -1,5 +1,5 @@
1
- import { t as Button } from "../../../button-JlbAGiZ4.cjs";
2
- import { t as Separator } from "../../../separator-BlDi1CSH.cjs";
1
+ import { t as Button } from "../../../button-B-ba_2Ct.cjs";
2
+ import { t as Separator } from "../../../separator-BLK3kO-5.cjs";
3
3
  import { n as TooltipContent } from "../../../tooltip-4w6-u_Fx.cjs";
4
4
  import * as react_jsx_runtime2 from "react/jsx-runtime";
5
5
  import * as class_variance_authority_types0 from "class-variance-authority/types";
@@ -1,5 +1,5 @@
1
- import { t as Button } from "../../../button-CvqhYhbD.mjs";
2
- import { t as Separator } from "../../../separator-Bkes-3Sb.mjs";
1
+ import { t as Button } from "../../../button-Dj9K9IDQ.mjs";
2
+ import { t as Separator } from "../../../separator-DG0RZ3MC.mjs";
3
3
  import { n as TooltipContent } from "../../../tooltip-C--JxILV.mjs";
4
4
  import * as react_jsx_runtime2 from "react/jsx-runtime";
5
5
  import { VariantProps } from "class-variance-authority";
@@ -1,2 +1,2 @@
1
- const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`),require(`../../button-DtFiUaY7.cjs`),require(`../../skeleton-C4suljHP.cjs`);const t=require(`../../flex-BYj-xYaw.cjs`),n=require(`../../date-DU8xM0hQ.cjs`);require(`../../tooltip-a3HDmxog.cjs`);const r=require(`../../typography/title.cjs`);require(`../../separator-C3ip6sbh.cjs`),require(`../../sheet-5MJRtrfG.cjs`);const i=require(`./components/sidebar.cjs`);let a=require(`react/jsx-runtime`),o=require(`lucide-react`),s=require(`radix-ui`);const c=({open:e,isLoading:c,title:l,createdAt:u,onOpenChange:d,sidebar:f,children:p})=>{let{content:m,footer:h}=f||{};return(0,a.jsx)(s.Dialog.Root,{"data-slot":`detail-dialog`,open:e,onOpenChange:d,children:(0,a.jsxs)(s.Dialog.Portal,{"data-slot":`detail-dialog-portal`,children:[(0,a.jsx)(s.Dialog.Overlay,{"data-slot":`detail-dialog-overlay`,className:`data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`}),(0,a.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:(0,a.jsxs)(s.Dialog.Content,{"data-slot":`dialog-content`,className:`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]`,onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,a.jsxs)(i.SidebarProvider,{children:[(0,a.jsxs)(i.Sidebar,{collapsible:`icon`,children:[(0,a.jsx)(i.DetailDialogSidebarHeader,{children:(0,a.jsx)(i.DetailDialogSidebarMenu,{children:(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:(0,a.jsxs)(i.DetailDialogSidebarMenuButton,{size:`lg`,tabIndex:-1,children:[(0,a.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,a.jsx)(o.CatIcon,{size:16})}),(0,a.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,a.jsx)(`span`,{className:`truncate font-medium`,children:f?.title||`Detail Dialog`}),(0,a.jsx)(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),(0,a.jsx)(i.DetailDialogSidebarContent,{children:m}),(0,a.jsx)(i.DetailDialogSidebarFooter,{children:(0,a.jsxs)(i.DetailDialogSidebarMenu,{children:[(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:h}),(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:(0,a.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),(0,a.jsx)(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:(0,a.jsxs)(t.t,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[(0,a.jsxs)(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2`,children:[(0,a.jsx)(i.DetailDialogSidebarTrigger,{}),(0,a.jsxs)(t.t,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[(0,a.jsx)(r.Title,{level:5,className:`line-clamp-1 truncate text-wrap`,children:l||`Detail Dialog`}),!!u&&(0,a.jsxs)(t.t,{padding:`none`,className:`relative text-text-positive-weak`,children:[(0,a.jsx)(o.CalendarIcon,{size:12,className:`absolute top-0.5 md:top-1`}),(0,a.jsx)(n.t,{showTime:!0,showHoliday:!0,date:u,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),c?(0,a.jsx)(t.t,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:(0,a.jsx)(`div`,{className:`loader`})}):(0,a.jsx)(`section`,{"data-slot":`detail-dialog-body-loading`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-muted`,children:p})]})})]}),(0,a.jsx)(s.Dialog.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:(0,a.jsx)(`button`,{className:`flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:(0,a.jsx)(o.XIcon,{size:24})})})]})})]})})};exports.DetailDialog=c;
1
+ const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../button.variants-C--cfyfH.cjs`),require(`../../button-DtFiUaY7.cjs`),require(`../../skeleton-C4suljHP.cjs`);const t=require(`../../flex-BYj-xYaw.cjs`),n=require(`../../date-DU8xM0hQ.cjs`);require(`../../tooltip-a3HDmxog.cjs`);const r=require(`../../typography/title.cjs`);require(`../../separator-C3ip6sbh.cjs`),require(`../../sheet-5MJRtrfG.cjs`);const i=require(`./components/sidebar.cjs`);let a=require(`react/jsx-runtime`),o=require(`lucide-react`),s=require(`radix-ui`);const c=({open:e,isLoading:c,title:l,createdAt:u,onOpenChange:d,sidebar:f,children:p})=>{let{content:m,footer:h}=f||{};return(0,a.jsx)(s.Dialog.Root,{"data-slot":`detail-dialog`,open:e,onOpenChange:d,children:(0,a.jsxs)(s.Dialog.Portal,{"data-slot":`detail-dialog-portal`,children:[(0,a.jsx)(s.Dialog.Overlay,{"data-slot":`detail-dialog-overlay`,className:`data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`}),(0,a.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:(0,a.jsxs)(s.Dialog.Content,{"data-slot":`dialog-content`,className:`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]`,onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[(0,a.jsxs)(i.SidebarProvider,{children:[(0,a.jsxs)(i.Sidebar,{collapsible:`icon`,children:[(0,a.jsx)(i.DetailDialogSidebarHeader,{children:(0,a.jsx)(i.DetailDialogSidebarMenu,{children:(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:(0,a.jsxs)(i.DetailDialogSidebarMenuButton,{size:`lg`,tabIndex:-1,children:[(0,a.jsx)(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:(0,a.jsx)(o.CatIcon,{size:16})}),(0,a.jsxs)(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[(0,a.jsx)(`span`,{className:`truncate font-medium`,children:f?.title||`Detail Dialog`}),(0,a.jsx)(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),(0,a.jsx)(i.DetailDialogSidebarContent,{children:m}),(0,a.jsx)(i.DetailDialogSidebarFooter,{children:(0,a.jsxs)(i.DetailDialogSidebarMenu,{children:[(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:h}),(0,a.jsx)(i.DetailDialogSidebarMenuItem,{children:(0,a.jsx)(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),(0,a.jsx)(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:(0,a.jsxs)(t.t,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[(0,a.jsxs)(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2`,children:[(0,a.jsx)(i.DetailDialogSidebarTrigger,{}),(0,a.jsxs)(t.t,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[(0,a.jsx)(r.Title,{level:5,className:`line-clamp-1 truncate text-wrap`,children:l||`Detail Dialog`}),!!u&&(0,a.jsxs)(t.t,{padding:`none`,className:`relative text-text-positive-weak`,children:[(0,a.jsx)(o.CalendarIcon,{size:12,className:`absolute top-0.5 md:top-1`}),(0,a.jsx)(n.t,{showTime:!0,showHoliday:!0,date:u,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),c?(0,a.jsx)(t.t,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:(0,a.jsx)(`div`,{className:`loader`})}):(0,a.jsx)(`section`,{"data-slot":`detail-dialog-body-loading`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-bg-subtle`,children:p})]})})]}),(0,a.jsx)(s.Dialog.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:(0,a.jsx)(`button`,{className:`flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:(0,a.jsx)(o.XIcon,{size:24})})})]})})]})})};exports.DetailDialog=c;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n>","DialogPrimitive","SidebarProvider","Sidebar","DetailDialogSidebarHeader","DetailDialogSidebarMenu","DetailDialogSidebarMenuItem","DetailDialogSidebarMenuButton","CatIcon","DetailDialogSidebarContent","DetailDialogSidebarFooter","Flex","DetailDialogSidebarTrigger","Title","CalendarIcon","DateDisplay","XIcon"],"sources":["../../../packages/components/dialogs/detail-dialog/index.tsx"],"sourcesContent":["import { CalendarIcon, CatIcon, XIcon } from 'lucide-react';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { DateDisplay } from '@/components/data-display/date';\nimport { Flex } from '@/components/layouts/flex';\nimport { Title } from '@/components/typography/title';\nimport {\n DetailDialogSidebarContent,\n DetailDialogSidebarFooter,\n DetailDialogSidebarHeader,\n DetailDialogSidebarMenu,\n DetailDialogSidebarMenuButton,\n DetailDialogSidebarMenuItem,\n DetailDialogSidebarTrigger,\n Sidebar,\n SidebarProvider,\n} from './components/sidebar';\n\nexport const DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ open, isLoading, title, createdAt, onOpenChange, sidebar, children }) => {\n const { content: SidebarContent, footer: SidebarFooter } = sidebar || {};\n return (\n <DialogPrimitive.Root data-slot=\"detail-dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"detail-dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"detail-dialog-overlay\"\n className=\"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in\"\n />\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className=\"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]\"\n onInteractOutside={e => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <SidebarProvider>\n <Sidebar collapsible=\"icon\">\n <DetailDialogSidebarHeader>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuButton size=\"lg\" tabIndex={-1}>\n <div className=\"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <CatIcon size={16} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">{sidebar?.title || 'Detail Dialog'}</span>\n <span className=\"truncate text-xs\">Lunas Enterprise</span>\n </div>\n </DetailDialogSidebarMenuButton>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarHeader>\n <DetailDialogSidebarContent>{SidebarContent}</DetailDialogSidebarContent>\n <DetailDialogSidebarFooter>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>{SidebarFooter}</DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuItem>\n <p className=\"pt-2 text-center text-muted-foreground text-xs\">Copyright © 2025, Lunas.</p>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarFooter>\n </Sidebar>\n\n <main data-slot=\"detail-dialog-main\" className=\"relative h-full flex-1\">\n <Flex padding=\"none\" gap=\"none\" vertical align=\"stretch\" className=\"absolute inset-0 size-full\">\n <header className=\"flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2\">\n <DetailDialogSidebarTrigger />\n <Flex vertical align=\"start\" padding=\"none\" width=\"null\" wrap={false} className=\"flex-1 gap-0\">\n <Title level={5} className=\"line-clamp-1 truncate text-wrap\">\n {title || 'Detail Dialog'}\n </Title>\n {!!createdAt && (\n <Flex padding=\"none\" className=\"relative text-text-positive-weak\">\n <CalendarIcon size={12} className=\"absolute top-0.5 md:top-1\" />\n <DateDisplay showTime showHoliday date={createdAt} format=\"full\" className=\"ml-4 text-xs md:text-sm\" />\n </Flex>\n )}\n </Flex>\n </header>\n {isLoading ? (\n <Flex justify=\"center\" className=\"inset-shadow-sm w-full flex-1 bg-muted-muted\">\n <div className=\"loader\" />\n </Flex>\n ) : (\n <section\n data-slot=\"detail-dialog-body-loading\"\n className=\"relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-muted\"\n >\n {children}\n </section>\n )}\n </Flex>\n </main>\n </SidebarProvider>\n\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <button className=\"flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60\">\n <XIcon size={24} />\n </button>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </div>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"qhBAkBA,MAAaA,GAgBR,CAAE,OAAM,YAAW,QAAO,YAAW,eAAc,UAAS,cAAe,CAC9E,GAAM,CAAE,QAAS,EAAgB,OAAQ,GAAkB,GAAW,EAAE,CACxE,OACE,EAAA,EAAA,KAACC,EAAAA,OAAgB,KAAA,CAAK,YAAU,gBAAsB,OAAoB,yBACxE,EAAA,EAAA,MAACA,EAAAA,OAAgB,OAAA,CAAO,YAAU,kCAChC,EAAA,EAAA,KAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,wBACV,UAAU,0JACV,EACF,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,gEACb,EAAA,EAAA,MAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,UAAU,udACV,kBAAmB,GAAK,CACtB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,aAGrB,EAAA,EAAA,MAACC,EAAAA,gBAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,YAAY,kBACnB,EAAA,EAAA,KAACC,EAAAA,0BAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,wBAAAA,CAAAA,UACC,EAAA,EAAA,KAACC,EAAAA,4BAAAA,CAAAA,UACC,EAAA,EAAA,MAACC,EAAAA,8BA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IACD,EAAA,EAAA,MAACF,EAAAA,EAAAA,CAAK,QAAQ,OAAO,UAAU,8CAC7B,EAAA,EAAA,KAACG,EAAAA,aAAAA,CAAa,KAAM,GAAI,UAAU,6BAA8B,EAChE,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAY,SAAA,GAAS,YAAA,GAAY,KAAM,EAAW,OAAO,OAAO,UAAU,2BAA4B,CAAA,EAClG,CAAA,EAEJ,CAAA,EACA,CACR,GACC,EAAA,EAAA,KAACJ,EAAAA,EAAAA,CAAK,QAAQ,SAAS,UAAU,yDAC/B,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,SAAA,CAAW,EACrB,EAEP,EAAA,EAAA,KAAC,UAAA,CACC,YAAU,6BACV,UAAU,4FAET,YACO,CAAA,EAEP,EACF,CAAA,CAAA,CACS,EAElB,EAAA,EAAA,KAACV,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,mCAC9E,EAAA,EAAA,KAAC,SAAA,CAAO,UAAU,+QAChB,EAAA,EAAA,KAACe,EAAAA,MAAAA,CAAM,KAAM,GAAA,CAAM,EACZ,EACa,CAAA,EACA,EACtB,CAAA,EACiB,EACJ"}
1
+ {"version":3,"file":"index.cjs","names":["DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n>","DialogPrimitive","SidebarProvider","Sidebar","DetailDialogSidebarHeader","DetailDialogSidebarMenu","DetailDialogSidebarMenuItem","DetailDialogSidebarMenuButton","CatIcon","DetailDialogSidebarContent","DetailDialogSidebarFooter","Flex","DetailDialogSidebarTrigger","Title","CalendarIcon","DateDisplay","XIcon"],"sources":["../../../packages/components/dialogs/detail-dialog/index.tsx"],"sourcesContent":["import { CalendarIcon, CatIcon, XIcon } from 'lucide-react';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { DateDisplay } from '@/components/data-display/date';\nimport { Flex } from '@/components/layouts/flex';\nimport { Title } from '@/components/typography/title';\nimport {\n DetailDialogSidebarContent,\n DetailDialogSidebarFooter,\n DetailDialogSidebarHeader,\n DetailDialogSidebarMenu,\n DetailDialogSidebarMenuButton,\n DetailDialogSidebarMenuItem,\n DetailDialogSidebarTrigger,\n Sidebar,\n SidebarProvider,\n} from './components/sidebar';\n\nexport const DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ open, isLoading, title, createdAt, onOpenChange, sidebar, children }) => {\n const { content: SidebarContent, footer: SidebarFooter } = sidebar || {};\n return (\n <DialogPrimitive.Root data-slot=\"detail-dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"detail-dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"detail-dialog-overlay\"\n className=\"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in\"\n />\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className=\"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]\"\n onInteractOutside={e => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <SidebarProvider>\n <Sidebar collapsible=\"icon\">\n <DetailDialogSidebarHeader>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuButton size=\"lg\" tabIndex={-1}>\n <div className=\"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <CatIcon size={16} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">{sidebar?.title || 'Detail Dialog'}</span>\n <span className=\"truncate text-xs\">Lunas Enterprise</span>\n </div>\n </DetailDialogSidebarMenuButton>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarHeader>\n <DetailDialogSidebarContent>{SidebarContent}</DetailDialogSidebarContent>\n <DetailDialogSidebarFooter>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>{SidebarFooter}</DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuItem>\n <p className=\"pt-2 text-center text-muted-foreground text-xs\">Copyright © 2025, Lunas.</p>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarFooter>\n </Sidebar>\n\n <main data-slot=\"detail-dialog-main\" className=\"relative h-full flex-1\">\n <Flex padding=\"none\" gap=\"none\" vertical align=\"stretch\" className=\"absolute inset-0 size-full\">\n <header className=\"flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2\">\n <DetailDialogSidebarTrigger />\n <Flex vertical align=\"start\" padding=\"none\" width=\"null\" wrap={false} className=\"flex-1 gap-0\">\n <Title level={5} className=\"line-clamp-1 truncate text-wrap\">\n {title || 'Detail Dialog'}\n </Title>\n {!!createdAt && (\n <Flex padding=\"none\" className=\"relative text-text-positive-weak\">\n <CalendarIcon size={12} className=\"absolute top-0.5 md:top-1\" />\n <DateDisplay showTime showHoliday date={createdAt} format=\"full\" className=\"ml-4 text-xs md:text-sm\" />\n </Flex>\n )}\n </Flex>\n </header>\n {isLoading ? (\n <Flex justify=\"center\" className=\"inset-shadow-sm w-full flex-1 bg-muted-muted\">\n <div className=\"loader\" />\n </Flex>\n ) : (\n <section\n data-slot=\"detail-dialog-body-loading\"\n className=\"relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-bg-subtle\"\n >\n {children}\n </section>\n )}\n </Flex>\n </main>\n </SidebarProvider>\n\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <button className=\"flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60\">\n <XIcon size={24} />\n </button>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </div>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"qhBAkBA,MAAaA,GAgBR,CAAE,OAAM,YAAW,QAAO,YAAW,eAAc,UAAS,cAAe,CAC9E,GAAM,CAAE,QAAS,EAAgB,OAAQ,GAAkB,GAAW,EAAE,CACxE,OACE,EAAA,EAAA,KAACC,EAAAA,OAAgB,KAAA,CAAK,YAAU,gBAAsB,OAAoB,yBACxE,EAAA,EAAA,MAACA,EAAAA,OAAgB,OAAA,CAAO,YAAU,kCAChC,EAAA,EAAA,KAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,wBACV,UAAU,0JACV,EACF,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,gEACb,EAAA,EAAA,MAACA,EAAAA,OAAgB,QAAA,CACf,YAAU,iBACV,UAAU,udACV,kBAAmB,GAAK,CACtB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,aAGrB,EAAA,EAAA,MAACC,EAAAA,gBAAAA,CAAAA,SAAAA,EACC,EAAA,EAAA,MAACC,EAAAA,QAAAA,CAAQ,YAAY,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K,SAAA,GAAS,MAAM,QAAQ,QAAQ,OAAO,MAAM,OAAO,KAAM,GAAO,UAAU,0BAC9E,EAAA,EAAA,KAACE,EAAAA,MAAAA,CAAM,MAAO,EAAG,UAAU,2CACxB,GAAS,iBACJ,CACP,CAAC,CAAC,IACD,EAAA,EAAA,MAACF,EAAAA,EAAAA,CAAK,QAAQ,OAAO,UAAU,8CAC7B,EAAA,EAAA,KAACG,EAAAA,aAAAA,CAAa,KAAM,GAAI,UAAU,6BAA8B,EAChE,EAAA,EAAA,KAACC,EAAAA,EAAAA,CAAY,SAAA,GAAS,YAAA,GAAY,KAAM,EAAW,OAAO,OAAO,UAAU,2BAA4B,CAAA,EAClG,CAAA,EAEJ,CAAA,EACA,CACR,GACC,EAAA,EAAA,KAACJ,EAAAA,EAAAA,CAAK,QAAQ,SAAS,UAAU,yDAC/B,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,SAAA,CAAW,EACrB,EAEP,EAAA,EAAA,KAAC,UAAA,CACC,YAAU,6BACV,UAAU,gGAET,YACO,CAAA,EAEP,EACF,CAAA,CAAA,CACS,EAElB,EAAA,EAAA,KAACV,EAAAA,OAAgB,MAAA,CAAM,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,mCAC9E,EAAA,EAAA,KAAC,SAAA,CAAO,UAAU,+QAChB,EAAA,EAAA,KAACe,EAAAA,MAAAA,CAAM,KAAM,GAAA,CAAM,EACZ,EACa,CAAA,EACA,EACtB,CAAA,EACiB,EACJ"}
@@ -1,2 +1,2 @@
1
- import"../../button.variants-C0W9NZQP.mjs";import"../../button-CDUAtJIo.mjs";import"../../skeleton-VALtdlm9.mjs";import{t as e}from"../../flex-DsiCflw0.mjs";import{t}from"../../date-BeK-z6-c.mjs";import"../../tooltip-pjVAbfk-.mjs";import{Title as n}from"../../typography/title.mjs";import"../../separator-Bf0gymN4.mjs";import"../../sheet-oadGRiie.mjs";import{DetailDialogSidebarContent as r,DetailDialogSidebarFooter as i,DetailDialogSidebarHeader as a,DetailDialogSidebarMenu as o,DetailDialogSidebarMenuButton as s,DetailDialogSidebarMenuItem as c,DetailDialogSidebarTrigger as l,Sidebar as u,SidebarProvider as d}from"./components/sidebar.mjs";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{CalendarIcon as m,CatIcon as h,XIcon as g}from"lucide-react";import{Dialog as _}from"radix-ui";const v=({open:v,isLoading:y,title:b,createdAt:x,onOpenChange:S,sidebar:C,children:w})=>{let{content:T,footer:E}=C||{};return f(_.Root,{"data-slot":`detail-dialog`,open:v,onOpenChange:S,children:p(_.Portal,{"data-slot":`detail-dialog-portal`,children:[f(_.Overlay,{"data-slot":`detail-dialog-overlay`,className:`data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`}),f(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:p(_.Content,{"data-slot":`dialog-content`,className:`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]`,onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[p(d,{children:[p(u,{collapsible:`icon`,children:[f(a,{children:f(o,{children:f(c,{children:p(s,{size:`lg`,tabIndex:-1,children:[f(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(h,{size:16})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:C?.title||`Detail Dialog`}),f(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),f(r,{children:T}),f(i,{children:p(o,{children:[f(c,{children:E}),f(c,{children:f(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),f(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:p(e,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[p(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2`,children:[f(l,{}),p(e,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[f(n,{level:5,className:`line-clamp-1 truncate text-wrap`,children:b||`Detail Dialog`}),!!x&&p(e,{padding:`none`,className:`relative text-text-positive-weak`,children:[f(m,{size:12,className:`absolute top-0.5 md:top-1`}),f(t,{showTime:!0,showHoliday:!0,date:x,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),y?f(e,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:f(`div`,{className:`loader`})}):f(`section`,{"data-slot":`detail-dialog-body-loading`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-muted`,children:w})]})})]}),f(_.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:f(`button`,{className:`flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:f(g,{size:24})})})]})})]})})};export{v as DetailDialog};
1
+ import"../../button.variants-C0W9NZQP.mjs";import"../../button-CDUAtJIo.mjs";import"../../skeleton-VALtdlm9.mjs";import{t as e}from"../../flex-DsiCflw0.mjs";import{t}from"../../date-BeK-z6-c.mjs";import"../../tooltip-pjVAbfk-.mjs";import{Title as n}from"../../typography/title.mjs";import"../../separator-Bf0gymN4.mjs";import"../../sheet-oadGRiie.mjs";import{DetailDialogSidebarContent as r,DetailDialogSidebarFooter as i,DetailDialogSidebarHeader as a,DetailDialogSidebarMenu as o,DetailDialogSidebarMenuButton as s,DetailDialogSidebarMenuItem as c,DetailDialogSidebarTrigger as l,Sidebar as u,SidebarProvider as d}from"./components/sidebar.mjs";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{CalendarIcon as m,CatIcon as h,XIcon as g}from"lucide-react";import{Dialog as _}from"radix-ui";const v=({open:v,isLoading:y,title:b,createdAt:x,onOpenChange:S,sidebar:C,children:w})=>{let{content:T,footer:E}=C||{};return f(_.Root,{"data-slot":`detail-dialog`,open:v,onOpenChange:S,children:p(_.Portal,{"data-slot":`detail-dialog-portal`,children:[f(_.Overlay,{"data-slot":`detail-dialog-overlay`,className:`data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in`}),f(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center`,children:p(_.Content,{"data-slot":`dialog-content`,className:`data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]`,onInteractOutside:e=>{e.preventDefault(),e.stopPropagation()},children:[p(d,{children:[p(u,{collapsible:`icon`,children:[f(a,{children:f(o,{children:f(c,{children:p(s,{size:`lg`,tabIndex:-1,children:[f(`div`,{className:`flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground`,children:f(h,{size:16})}),p(`div`,{className:`grid flex-1 text-left text-sm leading-tight`,children:[f(`span`,{className:`truncate font-medium`,children:C?.title||`Detail Dialog`}),f(`span`,{className:`truncate text-xs`,children:`Lunas Enterprise`})]})]})})})}),f(r,{children:T}),f(i,{children:p(o,{children:[f(c,{children:E}),f(c,{children:f(`p`,{className:`pt-2 text-center text-muted-foreground text-xs`,children:`Copyright © 2025, Lunas.`})})]})})]}),f(`main`,{"data-slot":`detail-dialog-main`,className:`relative h-full flex-1`,children:p(e,{padding:`none`,gap:`none`,vertical:!0,align:`stretch`,className:`absolute inset-0 size-full`,children:[p(`header`,{className:`flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2`,children:[f(l,{}),p(e,{vertical:!0,align:`start`,padding:`none`,width:`null`,wrap:!1,className:`flex-1 gap-0`,children:[f(n,{level:5,className:`line-clamp-1 truncate text-wrap`,children:b||`Detail Dialog`}),!!x&&p(e,{padding:`none`,className:`relative text-text-positive-weak`,children:[f(m,{size:12,className:`absolute top-0.5 md:top-1`}),f(t,{showTime:!0,showHoliday:!0,date:x,format:`full`,className:`ml-4 text-xs md:text-sm`})]})]})]}),y?f(e,{justify:`center`,className:`inset-shadow-sm w-full flex-1 bg-muted-muted`,children:f(`div`,{className:`loader`})}):f(`section`,{"data-slot":`detail-dialog-body-loading`,className:`relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-bg-subtle`,children:w})]})})]}),f(_.Close,{"data-slot":`dialog-close`,tabIndex:-1,asChild:!0,className:`absolute top-3 right-3`,children:f(`button`,{className:`flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60`,children:f(g,{size:24})})})]})})]})})};export{v as DetailDialog};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n>","DialogPrimitive"],"sources":["../../../packages/components/dialogs/detail-dialog/index.tsx"],"sourcesContent":["import { CalendarIcon, CatIcon, XIcon } from 'lucide-react';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { DateDisplay } from '@/components/data-display/date';\nimport { Flex } from '@/components/layouts/flex';\nimport { Title } from '@/components/typography/title';\nimport {\n DetailDialogSidebarContent,\n DetailDialogSidebarFooter,\n DetailDialogSidebarHeader,\n DetailDialogSidebarMenu,\n DetailDialogSidebarMenuButton,\n DetailDialogSidebarMenuItem,\n DetailDialogSidebarTrigger,\n Sidebar,\n SidebarProvider,\n} from './components/sidebar';\n\nexport const DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ open, isLoading, title, createdAt, onOpenChange, sidebar, children }) => {\n const { content: SidebarContent, footer: SidebarFooter } = sidebar || {};\n return (\n <DialogPrimitive.Root data-slot=\"detail-dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"detail-dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"detail-dialog-overlay\"\n className=\"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in\"\n />\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className=\"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]\"\n onInteractOutside={e => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <SidebarProvider>\n <Sidebar collapsible=\"icon\">\n <DetailDialogSidebarHeader>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuButton size=\"lg\" tabIndex={-1}>\n <div className=\"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <CatIcon size={16} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">{sidebar?.title || 'Detail Dialog'}</span>\n <span className=\"truncate text-xs\">Lunas Enterprise</span>\n </div>\n </DetailDialogSidebarMenuButton>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarHeader>\n <DetailDialogSidebarContent>{SidebarContent}</DetailDialogSidebarContent>\n <DetailDialogSidebarFooter>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>{SidebarFooter}</DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuItem>\n <p className=\"pt-2 text-center text-muted-foreground text-xs\">Copyright © 2025, Lunas.</p>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarFooter>\n </Sidebar>\n\n <main data-slot=\"detail-dialog-main\" className=\"relative h-full flex-1\">\n <Flex padding=\"none\" gap=\"none\" vertical align=\"stretch\" className=\"absolute inset-0 size-full\">\n <header className=\"flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2\">\n <DetailDialogSidebarTrigger />\n <Flex vertical align=\"start\" padding=\"none\" width=\"null\" wrap={false} className=\"flex-1 gap-0\">\n <Title level={5} className=\"line-clamp-1 truncate text-wrap\">\n {title || 'Detail Dialog'}\n </Title>\n {!!createdAt && (\n <Flex padding=\"none\" className=\"relative text-text-positive-weak\">\n <CalendarIcon size={12} className=\"absolute top-0.5 md:top-1\" />\n <DateDisplay showTime showHoliday date={createdAt} format=\"full\" className=\"ml-4 text-xs md:text-sm\" />\n </Flex>\n )}\n </Flex>\n </header>\n {isLoading ? (\n <Flex justify=\"center\" className=\"inset-shadow-sm w-full flex-1 bg-muted-muted\">\n <div className=\"loader\" />\n </Flex>\n ) : (\n <section\n data-slot=\"detail-dialog-body-loading\"\n className=\"relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-muted\"\n >\n {children}\n </section>\n )}\n </Flex>\n </main>\n </SidebarProvider>\n\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <button className=\"flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60\">\n <XIcon size={24} />\n </button>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </div>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"+xBAkBA,MAAaA,GAgBR,CAAE,OAAM,YAAW,QAAO,YAAW,eAAc,UAAS,cAAe,CAC9E,GAAM,CAAE,QAAS,EAAgB,OAAQ,GAAkB,GAAW,EAAE,CACxE,OACE,EAACC,EAAgB,KAAA,CAAK,YAAU,gBAAsB,OAAoB,wBACxE,EAACA,EAAgB,OAAA,CAAO,YAAU,iCAChC,EAACA,EAAgB,QAAA,CACf,YAAU,wBACV,UAAU,0JACV,CACF,EAAC,MAAA,CAAI,UAAU,+DACb,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAU,udACV,kBAAmB,GAAK,CACtB,EAAE,gBAAgB,CA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,KAAM,EAAW,OAAO,OAAO,UAAU,2BAA4B,CAAA,EAClG,CAAA,EAEJ,CAAA,EACA,CACR,EACC,EAAC,EAAA,CAAK,QAAQ,SAAS,UAAU,wDAC/B,EAAC,MAAA,CAAI,UAAU,SAAA,CAAW,EACrB,CAEP,EAAC,UAAA,CACC,YAAU,6BACV,UAAU,4FAET,YACO,CAAA,EAEP,EACF,CAAA,CAAA,CACS,CAElB,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,kCAC9E,EAAC,SAAA,CAAO,UAAU,8QAChB,EAAC,EAAA,CAAM,KAAM,GAAA,CAAM,EACZ,EACa,CAAA,EACA,EACtB,CAAA,EACiB,EACJ"}
1
+ {"version":3,"file":"index.mjs","names":["DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n>","DialogPrimitive"],"sources":["../../../packages/components/dialogs/detail-dialog/index.tsx"],"sourcesContent":["import { CalendarIcon, CatIcon, XIcon } from 'lucide-react';\n\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { DateDisplay } from '@/components/data-display/date';\nimport { Flex } from '@/components/layouts/flex';\nimport { Title } from '@/components/typography/title';\nimport {\n DetailDialogSidebarContent,\n DetailDialogSidebarFooter,\n DetailDialogSidebarHeader,\n DetailDialogSidebarMenu,\n DetailDialogSidebarMenuButton,\n DetailDialogSidebarMenuItem,\n DetailDialogSidebarTrigger,\n Sidebar,\n SidebarProvider,\n} from './components/sidebar';\n\nexport const DetailDialog: React.FC<\n React.PropsWithChildren<{\n open?: boolean;\n isLoading?: boolean;\n\n title: string;\n createdAt?: string | Date | number;\n\n sidebar?: {\n title?: string;\n content?: React.ReactNode;\n footer?: React.ReactNode;\n };\n\n onOpenChange?: (open: boolean) => void;\n }>\n> = ({ open, isLoading, title, createdAt, onOpenChange, sidebar, children }) => {\n const { content: SidebarContent, footer: SidebarFooter } = sidebar || {};\n return (\n <DialogPrimitive.Root data-slot=\"detail-dialog\" open={open} onOpenChange={onOpenChange}>\n <DialogPrimitive.Portal data-slot=\"detail-dialog-portal\">\n <DialogPrimitive.Overlay\n data-slot=\"detail-dialog-overlay\"\n className=\"data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0 fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=open]:animate-in\"\n />\n <div className=\"fixed inset-0 z-50 flex items-center justify-center\">\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className=\"data-[state=open]:fade-in-0 data-[state=open]:zoom-in-80 data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-80 relative z-50 grid h-full max-h-dvh w-full max-w-svw gap-4 overflow-hidden rounded-none border-none bg-background p-0 shadow-dialog outline-none duration-200 data-[state=closed]:animate-out data-[state=open]:animate-in sm:max-w-lg md:max-h-[90dvh] md:max-w-[90svw] md:rounded-lg xl:max-h-[90dvh] xl:max-w-[90svw] 2xl:max-h-[90dvh] 2xl:max-w-[90svw]\"\n onInteractOutside={e => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <SidebarProvider>\n <Sidebar collapsible=\"icon\">\n <DetailDialogSidebarHeader>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuButton size=\"lg\" tabIndex={-1}>\n <div className=\"flex aspect-square size-8 items-center justify-center rounded-lg bg-sidebar-primary text-sidebar-primary-foreground\">\n <CatIcon size={16} />\n </div>\n <div className=\"grid flex-1 text-left text-sm leading-tight\">\n <span className=\"truncate font-medium\">{sidebar?.title || 'Detail Dialog'}</span>\n <span className=\"truncate text-xs\">Lunas Enterprise</span>\n </div>\n </DetailDialogSidebarMenuButton>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarHeader>\n <DetailDialogSidebarContent>{SidebarContent}</DetailDialogSidebarContent>\n <DetailDialogSidebarFooter>\n <DetailDialogSidebarMenu>\n <DetailDialogSidebarMenuItem>{SidebarFooter}</DetailDialogSidebarMenuItem>\n <DetailDialogSidebarMenuItem>\n <p className=\"pt-2 text-center text-muted-foreground text-xs\">Copyright © 2025, Lunas.</p>\n </DetailDialogSidebarMenuItem>\n </DetailDialogSidebarMenu>\n </DetailDialogSidebarFooter>\n </Sidebar>\n\n <main data-slot=\"detail-dialog-main\" className=\"relative h-full flex-1\">\n <Flex padding=\"none\" gap=\"none\" vertical align=\"stretch\" className=\"absolute inset-0 size-full\">\n <header className=\"flex w-full flex-0 items-start gap-x-2.5 border-border-weak border-b bg-card py-2.5 pr-12 pl-2\">\n <DetailDialogSidebarTrigger />\n <Flex vertical align=\"start\" padding=\"none\" width=\"null\" wrap={false} className=\"flex-1 gap-0\">\n <Title level={5} className=\"line-clamp-1 truncate text-wrap\">\n {title || 'Detail Dialog'}\n </Title>\n {!!createdAt && (\n <Flex padding=\"none\" className=\"relative text-text-positive-weak\">\n <CalendarIcon size={12} className=\"absolute top-0.5 md:top-1\" />\n <DateDisplay showTime showHoliday date={createdAt} format=\"full\" className=\"ml-4 text-xs md:text-sm\" />\n </Flex>\n )}\n </Flex>\n </header>\n {isLoading ? (\n <Flex justify=\"center\" className=\"inset-shadow-sm w-full flex-1 bg-muted-muted\">\n <div className=\"loader\" />\n </Flex>\n ) : (\n <section\n data-slot=\"detail-dialog-body-loading\"\n className=\"relative inset-shadow-sm flex flex-1 snap-y flex-col gap-0 overflow-y-auto bg-muted-bg-subtle\"\n >\n {children}\n </section>\n )}\n </Flex>\n </main>\n </SidebarProvider>\n\n <DialogPrimitive.Close data-slot=\"dialog-close\" tabIndex={-1} asChild className=\"absolute top-3 right-3\">\n <button className=\"flex cursor-pointer items-center justify-center rounded-[100px] p-2 text-text-positive-weak transition-colors hover:bg-muted-muted hover:text-text-positive active:bg-muted-weak active:text-text-positive-strong disabled:pointer-events-none disabled:opacity-60\">\n <XIcon size={24} />\n </button>\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </div>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n );\n};\n"],"mappings":"+xBAkBA,MAAaA,GAgBR,CAAE,OAAM,YAAW,QAAO,YAAW,eAAc,UAAS,cAAe,CAC9E,GAAM,CAAE,QAAS,EAAgB,OAAQ,GAAkB,GAAW,EAAE,CACxE,OACE,EAACC,EAAgB,KAAA,CAAK,YAAU,gBAAsB,OAAoB,wBACxE,EAACA,EAAgB,OAAA,CAAO,YAAU,iCAChC,EAACA,EAAgB,QAAA,CACf,YAAU,wBACV,UAAU,0JACV,CACF,EAAC,MAAA,CAAI,UAAU,+DACb,EAACA,EAAgB,QAAA,CACf,YAAU,iBACV,UAAU,udACV,kBAAmB,GAAK,CACtB,EAAE,gBAAgB,CAClB,EAAE,iBAAiB,YAGrB,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAQ,YAAY,iBACnB,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAA8B,KAAK,KAAK,SAAU,aACjD,EAAC,MAAA,CAAI,UAAU,+HACb,EAAC,EAAA,CAAQ,KAAM,GAAA,CAAM,EACjB,CACN,EAAC,MAAA,CAAI,UAAU,wDACb,EAAC,OAAA,CAAK,UAAU,gCAAwB,GAAS,OAAS,iBAAuB,CACjF,EAAC,OAAA,CAAK,UAAU,4BAAmB,oBAAuB,CAAA,EACtD,CAAA,EACwB,CAAA,CACJ,CAAA,CACN,CAAA,CACA,CAC5B,EAAC,EAAA,CAAA,SAA4B,EAAA,CAA4C,CACzE,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SAA6B,EAAA,CAA4C,CAC1E,EAAC,EAAA,CAAA,SACC,EAAC,IAAA,CAAE,UAAU,0DAAiD,4BAA4B,CAAA,CAC9D,CAAA,CAAA,CACN,CAAA,CACA,GACpB,CAEV,EAAC,OAAA,CAAK,YAAU,qBAAqB,UAAU,kCAC7C,EAAC,EAAA,CAAK,QAAQ,OAAO,IAAI,OAAO,SAAA,GAAS,MAAM,UAAU,UAAU,uCACjE,EAAC,SAAA,CAAO,UAAU,2GAChB,EAAC,EAAA,EAAA,CAA6B,CAC9B,EAAC,EAAA,CAAK,SAAA,GAAS,MAAM,QAAQ,QAAQ,OAAO,MAAM,OAAO,KAAM,GAAO,UAAU,yBAC9E,EAAC,EAAA,CAAM,MAAO,EAAG,UAAU,2CACxB,GAAS,iBACJ,CACP,CAAC,CAAC,GACD,EAAC,EAAA,CAAK,QAAQ,OAAO,UAAU,6CAC7B,EAAC,EAAA,CAAa,KAAM,GAAI,UAAU,6BAA8B,CAChE,EAAC,EAAA,CAAY,SAAA,GAAS,YAAA,GAAY,KAAM,EAAW,OAAO,OAAO,UAAU,2BAA4B,CAAA,EAClG,CAAA,EAEJ,CAAA,EACA,CACR,EACC,EAAC,EAAA,CAAK,QAAQ,SAAS,UAAU,wDAC/B,EAAC,MAAA,CAAI,UAAU,SAAA,CAAW,EACrB,CAEP,EAAC,UAAA,CACC,YAAU,6BACV,UAAU,gGAET,YACO,CAAA,EAEP,EACF,CAAA,CAAA,CACS,CAElB,EAACA,EAAgB,MAAA,CAAM,YAAU,eAAe,SAAU,GAAI,QAAA,GAAQ,UAAU,kCAC9E,EAAC,SAAA,CAAO,UAAU,8QAChB,EAAC,EAAA,CAAM,KAAM,GAAA,CAAM,EACZ,EACa,CAAA,EACA,EACtB,CAAA,EACiB,EACJ"}
@@ -1,2 +1,2 @@
1
- const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../skeleton-C4suljHP.cjs`);const t=require(`../../image-D5vQS72z.cjs`),n=require(`../../flex-BYj-xYaw.cjs`),r=require(`../../paragraph-CqAtWDb_.cjs`),i=require(`../../date-DU8xM0hQ.cjs`),a=require(`../../tooltip-a3HDmxog.cjs`);let o=require(`@customafk/react-toolkit/utils`),s=require(`react/jsx-runtime`),c=require(`react`);const l=()=>(0,s.jsx)(`div`,{className:`flex items-center gap-0 font-medium text-sm text-text-positive-muted italic`,children:(0,s.jsx)(`p`,{children:`Empty Value`})}),u=({label:e})=>e?(0,s.jsx)(`div`,{className:`w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs`,children:e}):(0,s.jsx)(l,{}),d=({date:e})=>e==null?(0,s.jsx)(l,{}):(0,s.jsx)(a.r,{children:(0,s.jsxs)(a.t,{children:[(0,s.jsx)(a.i,{children:(0,s.jsx)(i.t,{date:e,format:`medium`})}),(0,s.jsx)(a.n,{children:(0,s.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-medium text-xs`})})]})}),f=({images:e})=>!e||!e.length?(0,s.jsx)(l,{}):e.length===1?(0,s.jsx)(`div`,{className:`flex flex-wrap gap-4`,children:(0,s.jsx)(`div`,{className:`group relative size-42 rounded-sm shadow-xs`,children:(0,s.jsx)(t.t,{src:e[0].src,alt:e[0].alt,width:`100%`,height:`100%`})},e[0].id)}):(0,s.jsx)(`div`,{className:`flex flex-wrap gap-4`,children:e.map(e=>(0,s.jsx)(`div`,{className:`group relative size-16 rounded-sm shadow-xs`,children:(0,s.jsx)(t.t,{src:e.src,alt:e.alt,width:`100%`,height:`100%`})},e.id))}),p=({content:e})=>e==null?(0,s.jsx)(l,{}):(0,s.jsxs)(a.t,{children:[(0,s.jsx)(a.i,{children:(0,s.jsx)(r.t,{variant:`sm`,className:`whitespace-pre-line break-all text-start text-sm`,children:e})}),(0,s.jsx)(a.n,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:(0,s.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,s.jsx)(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),(0,s.jsxs)(`p`,{className:`w-full text-end`,children:[e.toString().length,` chars`]})]})})]}),m=({name:e})=>e?(0,s.jsxs)(a.t,{children:[(0,s.jsx)(a.i,{children:(0,s.jsx)(r.t,{variant:`sm`,className:`line-clamp-2 w-full truncate`,children:e})}),(0,s.jsx)(a.n,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:(0,s.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,s.jsx)(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),(0,s.jsxs)(`p`,{className:`w-full text-end`,children:[e.length,` chars`]})]})})]}):(0,s.jsx)(l,{}),h=({value:e})=>(0,s.jsxs)(a.t,{children:[(0,s.jsx)(a.i,{children:(0,s.jsx)(r.t,{variant:`sm`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,s.jsx)(a.n,{align:`start`,children:(0,s.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),g=(e,t,n)=>{let r=10**t;switch(n){case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:return Math.round(e*r)/r}},_=(0,c.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:u=`round`,showTrailingZeros:d=!1,size:f=`sm`,value:p=0})=>{let m=(0,c.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&d&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,d]),h=(0,c.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=g(e,a,u)),t.toLocaleString(`en-US`,m)},[u,m,a]),_=(0,c.useMemo)(()=>{if(typeof p==`number`)return Number.isNaN(p)||!Number.isFinite(p)?`N/A`:h(p);if(typeof p==`string`){let e=p.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:h(t)}return`N/A`},[p,h]),v=(0,c.useMemo)(()=>e===`.`&&t===`,`?_:_.replace(/,/g,t).replace(/\./g,e),[_,e,t]);return v===`0`||v===`N/A`||!v?(0,s.jsx)(l,{}):(0,s.jsxs)(n.t,{padding:`none`,className:(0,o.cn)(`font-number text-lg text-text-positive tabular-nums`,f===`xs`&&`text-xs`,f===`sm`&&`text-sm`,f===`md`&&`text-base`,f===`lg`&&`text-lg`,f===`xl`&&`text-xl`),children:[r,(0,s.jsx)(`p`,{children:v}),i]})});_.displayName=`DescriptionStatistic`;const v=({label:e,labelColSpan:t=3,children:n})=>(0,s.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(12, minmax(0, 1fr))`},className:`grid border-b border-b-border`,children:[(0,s.jsx)(`div`,{style:{gridColumn:`span ${t} / span ${t}`},className:`flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-bg-subtle py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums`,children:e}),(0,s.jsx)(`div`,{style:{gridColumn:`span ${12-t} / span ${12-t}`},className:`flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive`,children:n})]}),y=({children:e})=>(0,s.jsx)(`div`,{"data-slot":`description-wrapper`,className:`relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-card ring-3 ring-border-muted`,children:e});exports.Description=y,exports.DescriptionBadge=u,exports.DescriptionDate=d,exports.DescriptionEmpty=l,exports.DescriptionImages=f,exports.DescriptionItem=v,exports.DescriptionLongText=p,exports.DescriptionName=m,exports.DescriptionNumberPhone=h,exports.DescriptionStatistic=_;
1
+ const e=require(`../../chunk-Bmb41Sf3.cjs`);require(`../../skeleton-C4suljHP.cjs`);const t=require(`../../image-D5vQS72z.cjs`),n=require(`../../flex-BYj-xYaw.cjs`),r=require(`../../paragraph-CqAtWDb_.cjs`),i=require(`../../date-DU8xM0hQ.cjs`),a=require(`../../tooltip-a3HDmxog.cjs`);let o=require(`@customafk/react-toolkit/utils`),s=require(`react/jsx-runtime`),c=require(`react`);const l=()=>(0,s.jsx)(`div`,{className:`flex items-center gap-0 font-medium text-sm text-text-positive-muted italic`,children:(0,s.jsx)(`p`,{children:`Empty Value`})}),u=({label:e})=>e?(0,s.jsx)(`div`,{className:`w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs`,children:e}):(0,s.jsx)(l,{}),d=({date:e})=>e==null?(0,s.jsx)(l,{}):(0,s.jsx)(a.r,{children:(0,s.jsxs)(a.t,{children:[(0,s.jsx)(a.i,{children:(0,s.jsx)(i.t,{date:e,format:`medium`})}),(0,s.jsx)(a.n,{children:(0,s.jsx)(i.t,{date:e,format:`full`,showTime:!0,className:`font-medium text-xs`})})]})}),f=({images:e})=>!e||!e.length?(0,s.jsx)(l,{}):e.length===1?(0,s.jsx)(`div`,{className:`flex flex-wrap gap-4`,children:(0,s.jsx)(`div`,{className:`group relative size-42 rounded-sm shadow-xs`,children:(0,s.jsx)(t.t,{src:e[0].src,alt:e[0].alt,width:`100%`,height:`100%`})},e[0].id)}):(0,s.jsx)(`div`,{className:`flex flex-wrap gap-4`,children:e.map(e=>(0,s.jsx)(`div`,{className:`group relative size-16 rounded-sm shadow-xs`,children:(0,s.jsx)(t.t,{src:e.src,alt:e.alt,width:`100%`,height:`100%`})},e.id))}),p=({content:e})=>e==null?(0,s.jsx)(l,{}):(0,s.jsxs)(a.t,{children:[(0,s.jsx)(a.i,{children:(0,s.jsx)(r.t,{variant:`sm`,className:`whitespace-pre-line break-all text-start text-sm`,children:e})}),(0,s.jsx)(a.n,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:(0,s.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,s.jsx)(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),(0,s.jsxs)(`p`,{className:`w-full text-end`,children:[e.toString().length,` chars`]})]})})]}),m=({name:e})=>e?(0,s.jsxs)(a.t,{children:[(0,s.jsx)(a.i,{children:(0,s.jsx)(r.t,{variant:`sm`,className:`line-clamp-2 w-full truncate`,children:e})}),(0,s.jsx)(a.n,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:(0,s.jsxs)(`div`,{className:`flex flex-col gap-y-2`,children:[(0,s.jsx)(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),(0,s.jsxs)(`p`,{className:`w-full text-end`,children:[e.length,` chars`]})]})})]}):(0,s.jsx)(l,{}),h=({value:e})=>(0,s.jsxs)(a.t,{children:[(0,s.jsx)(a.i,{children:(0,s.jsx)(r.t,{variant:`sm`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),(0,s.jsx)(a.n,{align:`start`,children:(0,s.jsx)(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),g=(e,t,n)=>{let r=10**t;switch(n){case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:return Math.round(e*r)/r}},_=(0,c.memo)(({decimalSeparator:e=`.`,groupSeparator:t=`,`,prefix:r,suffix:i,precision:a,roundingMode:u=`round`,showTrailingZeros:d=!1,size:f=`sm`,value:p=0})=>{let m=(0,c.useMemo)(()=>{let e={};return typeof a==`number`&&a>=0&&d&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,d]),h=(0,c.useCallback)(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=g(e,a,u)),t.toLocaleString(`en-US`,m)},[u,m,a]),_=(0,c.useMemo)(()=>{if(typeof p==`number`)return Number.isNaN(p)||!Number.isFinite(p)?`N/A`:h(p);if(typeof p==`string`){let e=p.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:h(t)}return`N/A`},[p,h]),v=(0,c.useMemo)(()=>e===`.`&&t===`,`?_:_.replace(/,/g,t).replace(/\./g,e),[_,e,t]);return v===`0`||v===`N/A`||!v?(0,s.jsx)(l,{}):(0,s.jsxs)(n.t,{padding:`none`,className:(0,o.cn)(`font-number text-lg text-text-positive tabular-nums`,f===`xs`&&`text-xs`,f===`sm`&&`text-sm`,f===`md`&&`text-base`,f===`lg`&&`text-lg`,f===`xl`&&`text-xl`),children:[r,(0,s.jsx)(`p`,{children:v}),i]})});_.displayName=`DescriptionStatistic`;const v=({label:e,labelColSpan:t=3,children:n})=>(0,s.jsxs)(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(12, minmax(0, 1fr))`},className:`grid border-b border-b-border`,children:[(0,s.jsx)(`div`,{style:{gridColumn:`span ${t} / span ${t}`},className:`flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-muted py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums`,children:e}),(0,s.jsx)(`div`,{style:{gridColumn:`span ${12-t} / span ${12-t}`},className:`flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive`,children:n})]}),y=({children:e})=>(0,s.jsx)(`div`,{"data-slot":`description-wrapper`,className:`relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-card ring-3 ring-border-muted`,children:e});exports.Description=y,exports.DescriptionBadge=u,exports.DescriptionDate=d,exports.DescriptionEmpty=l,exports.DescriptionImages=f,exports.DescriptionItem=v,exports.DescriptionLongText=p,exports.DescriptionName=m,exports.DescriptionNumberPhone=h,exports.DescriptionStatistic=_;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["DescriptionEmpty: React.FC","DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}>","DescriptionDate: React.FC<Props>","TooltipProvider","Tooltip","TooltipTrigger","DateDisplay","TooltipContent","DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}>","Image","DescriptionLongText: React.FC<{ content: string | null | undefined | number }>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","DescriptionName: React.FC<{\n name?: string | null | undefined;\n}>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","options: Intl.NumberFormatOptions","Flex","DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n>","Description: React.FC<React.PropsWithChildren>"],"sources":["../../../packages/components/features/descriptions/components/empty.tsx","../../../packages/components/features/descriptions/components/badge.tsx","../../../packages/components/features/descriptions/components/date.tsx","../../../packages/components/features/descriptions/components/images.tsx","../../../packages/components/features/descriptions/components/longtext.tsx","../../../packages/components/features/descriptions/components/name.tsx","../../../packages/components/features/descriptions/components/number-phone.tsx","../../../packages/components/features/descriptions/components/statistic.tsx","../../../packages/components/features/descriptions/index.tsx"],"sourcesContent":["export const DescriptionEmpty: React.FC = () => {\n return (\n <div className=\"flex items-center gap-0 font-medium text-sm text-text-positive-muted italic\">\n <p>Empty Value</p>\n </div>\n );\n};\n","import { DescriptionEmpty } from './empty';\n\nexport const DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}> = ({ label }) => {\n if (!label) return <DescriptionEmpty />;\n return (\n <div className=\"w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs\">{label}</div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { DateDisplay } from '@/components/data-display/date';\nimport { DescriptionEmpty } from './empty';\n\ntype Props = {\n date: Date | string | number | null | undefined;\n};\nexport const DescriptionDate: React.FC<Props> = ({ date }) => {\n if (typeof date === 'undefined' || date === null) return <DescriptionEmpty />;\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger>\n <DateDisplay date={date} format=\"medium\" />\n </TooltipTrigger>\n <TooltipContent>\n <DateDisplay date={date} format=\"full\" showTime className=\"font-medium text-xs\" />\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n","import { Image } from '@/components/ui/image';\n\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}> = ({ images }) => {\n if (!images || !images.length) return <DescriptionEmpty />;\n if (images.length === 1)\n return (\n <div className=\"flex flex-wrap gap-4\">\n <div key={images[0].id} className=\"group relative size-42 rounded-sm shadow-xs\">\n <Image src={images[0].src} alt={images[0].alt} width=\"100%\" height=\"100%\" />\n </div>\n </div>\n );\n return (\n <div className=\"flex flex-wrap gap-4\">\n {images.map(image => (\n <div key={image.id} className=\"group relative size-16 rounded-sm shadow-xs\">\n <Image src={image.src} alt={image.alt} width=\"100%\" height=\"100%\" />\n </div>\n ))}\n </div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionLongText: React.FC<{ content: string | null | undefined | number }> = ({ content }) => {\n if (content === undefined || content === null) {\n return <DescriptionEmpty />;\n }\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"whitespace-pre-line break-all text-start text-sm\">\n {content}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{content}</p>\n <p className=\"w-full text-end\">{content.toString().length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionName: React.FC<{\n name?: string | null | undefined;\n}> = ({ name }) => {\n if (!name) return <DescriptionEmpty />;\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"line-clamp-2 w-full truncate\">\n {name}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{name}</p>\n <p className=\"w-full text-end\">{name.length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\n\nexport const DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>> = ({ value }) => {\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\">{value.replace(/(\\d{3})(\\d{3})(\\d{4})/, '($1) $2-$3')}</Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\">\n <p className=\"tabular-nums\">{value.slice(1).replace(/(\\d{2})(\\d{3})(\\d{4})/, '(00) (+84) ($1) $2-$3')}</p>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { memo, useCallback, useMemo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Flex } from '@/components/layouts/flex';\nimport { DescriptionEmpty } from './empty';\n\nconst applyRounding = (num: number, precisionValue: number, roundingMode?: 'round' | 'floor' | 'ceil') => {\n const multiplier = 10 ** precisionValue;\n\n switch (roundingMode) {\n case 'floor':\n return Math.floor(num * multiplier) / multiplier;\n case 'ceil':\n return Math.ceil(num * multiplier) / multiplier;\n default:\n return Math.round(num * multiplier) / multiplier;\n }\n};\n\ntype Props = {\n decimalSeparator?: string;\n groupSeparator?: string;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n precision?: number; // Số chữ số thập phân\n roundingMode?: 'round' | 'floor' | 'ceil'; // Kiểu làm tròn\n showTrailingZeros?: boolean; // Hiển thị số 0 cuối\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; // Kích thước của component\n value: number | string | null | undefined;\n};\n\nexport const DescriptionStatistic = memo(\n ({\n decimalSeparator = '.',\n groupSeparator = ',',\n prefix: Prefix,\n suffix: Suffix,\n precision,\n roundingMode = 'round',\n showTrailingZeros = false,\n size = 'sm',\n value = 0,\n }: Props) => {\n // Memoize number formatting options\n const formatOptions = useMemo((): Intl.NumberFormatOptions => {\n const options: Intl.NumberFormatOptions = {};\n\n if (typeof precision === 'number' && precision >= 0 && showTrailingZeros) {\n options.minimumFractionDigits = precision;\n options.maximumFractionDigits = precision;\n } else {\n options.maximumFractionDigits = precision;\n }\n\n return options;\n }, [precision, showTrailingZeros]);\n\n const formatNumber = useCallback(\n (num: number): string => {\n let processedNum = num;\n\n // Áp dụng làm tròn nếu có precision\n if (typeof precision === 'number' && precision >= 0) {\n processedNum = applyRounding(num, precision, roundingMode);\n }\n\n return processedNum.toLocaleString('en-US', formatOptions);\n },\n [roundingMode, formatOptions, precision]\n );\n\n // Memoize value processing\n const processedValue = useMemo((): string => {\n // Xử lý giá trị number\n if (typeof value === 'number') {\n if (Number.isNaN(value) || !Number.isFinite(value)) {\n return 'N/A';\n }\n return formatNumber(value);\n }\n\n // Xử lý giá trị string\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n\n // Nếu là chuỗi rỗng\n if (!trimmedValue) {\n return 'N/A';\n }\n\n // Thử convert sang number\n const numValue = Number(trimmedValue);\n\n if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {\n // Nếu không phải số, trả về string gốc\n return 'N/A';\n }\n\n return formatNumber(numValue);\n }\n\n return 'N/A';\n }, [value, formatNumber]);\n\n // Memoize separator replacement\n const finalFormattedValue = useMemo((): string => {\n // Chỉ thay thế separators nếu khác mặc định\n if (decimalSeparator === '.' && groupSeparator === ',') {\n return processedValue;\n }\n return processedValue.replace(/,/g, groupSeparator).replace(/\\./g, decimalSeparator);\n }, [processedValue, decimalSeparator, groupSeparator]);\n\n if (finalFormattedValue === '0' || finalFormattedValue === 'N/A' || !finalFormattedValue) {\n return <DescriptionEmpty />;\n }\n\n return (\n <Flex\n padding=\"none\"\n className={cn(\n 'font-number text-lg text-text-positive tabular-nums',\n size === 'xs' && 'text-xs',\n size === 'sm' && 'text-sm',\n size === 'md' && 'text-base',\n size === 'lg' && 'text-lg',\n size === 'xl' && 'text-xl'\n )}\n >\n {Prefix}\n <p>{finalFormattedValue}</p>\n {Suffix}\n </Flex>\n );\n }\n);\nDescriptionStatistic.displayName = 'DescriptionStatistic';\n","export * from './components'\n\nexport const DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n> = ({ label, labelColSpan = 3, children }) => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',\n }}\n className=\"grid border-b border-b-border\"\n >\n <div\n style={{\n gridColumn: `span ${labelColSpan} / span ${labelColSpan}`,\n }}\n className=\"flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-bg-subtle py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums\"\n >\n {label}\n </div>\n <div\n style={{\n gridColumn: `span ${12 - labelColSpan} / span ${12 - labelColSpan}`,\n }}\n className=\"flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive\"\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport const Description: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <div\n data-slot=\"description-wrapper\"\n className=\"relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-card ring-3 ring-border-muted\"\n >\n {children}\n </div>\n );\n};\n"],"mappings":"6XAAA,MAAaA,OAET,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,wFACb,EAAA,EAAA,KAAC,IAAA,CAAA,SAAE,cAAA,CAAe,EACd,CCFGC,GAEP,CAAE,WACD,GAEH,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,qIAA6H,GAAY,EAFvI,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,CCG5BC,GAAoC,CAAE,UACtC,GAAiC,MAAa,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1C,EAEF,EAAe,QAAQ,KAAM,EAAe,CAAC,QAAQ,MAAO,EAAiB,CACnF,CAAC,EAAgB,EAAkB,EAAe,CAAC,CAMtD,OAJI,IAAwB,KAAO,IAAwB,OAAS,CAAC,GAC5D,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,EAI3B,EAAA,EAAA,MAACC,EAAAA,EAAAA,CACC,QAAQ,OACR,WAAA,EAAA,EAAA,IACE,sDACA,IAAS,MAAQ,UACjB,IAAS,MAAQ,UACjB,IAAS,MAAQ,YACjB,IAAS,MAAQ,UACjB,IAAS,MAAQ,UAClB,WAEA,GACD,EAAA,EAAA,KAAC,IAAA,CAAA,SAAG,EAAA,CAAwB,CAC3B,IACI,EAGZ,CACD,EAAqB,YAAc,uBCvInC,MAAaC,GAKR,CAAE,QAAO,eAAe,EAAG,eAE5B,EAAA,EAAA,MAAC,MAAA,CACC,MAAO,CACL,QAAS,OACT,oBAAqB,6BACtB,CACD,UAAU,2CAEV,EAAA,EAAA,KAAC,MAAA,CACC,MAAO,CACL,WAAY,QAAQ,EAAa,UAAU,IAC5C,CACD,UAAU,wMAET,GACG,EACN,EAAA,EAAA,KAAC,MAAA,CACC,MAAO,CACL,WAAY,QAAQ,GAAK,EAAa,UAAU,GAAK,IACtD,CACD,UAAU,iEAET,YACG,CAAA,EACF,CAIGC,GAAkD,CAAE,eAE7D,EAAA,EAAA,KAAC,MAAA,CACC,YAAU,sBACV,UAAU,kJAET,YACG"}
1
+ {"version":3,"file":"index.cjs","names":["DescriptionEmpty: React.FC","DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}>","DescriptionDate: React.FC<Props>","TooltipProvider","Tooltip","TooltipTrigger","DateDisplay","TooltipContent","DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}>","Image","DescriptionLongText: React.FC<{ content: string | null | undefined | number }>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","DescriptionName: React.FC<{\n name?: string | null | undefined;\n}>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>>","Tooltip","TooltipTrigger","Paragraph","TooltipContent","options: Intl.NumberFormatOptions","Flex","DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n>","Description: React.FC<React.PropsWithChildren>"],"sources":["../../../packages/components/features/descriptions/components/empty.tsx","../../../packages/components/features/descriptions/components/badge.tsx","../../../packages/components/features/descriptions/components/date.tsx","../../../packages/components/features/descriptions/components/images.tsx","../../../packages/components/features/descriptions/components/longtext.tsx","../../../packages/components/features/descriptions/components/name.tsx","../../../packages/components/features/descriptions/components/number-phone.tsx","../../../packages/components/features/descriptions/components/statistic.tsx","../../../packages/components/features/descriptions/index.tsx"],"sourcesContent":["export const DescriptionEmpty: React.FC = () => {\n return (\n <div className=\"flex items-center gap-0 font-medium text-sm text-text-positive-muted italic\">\n <p>Empty Value</p>\n </div>\n );\n};\n","import { DescriptionEmpty } from './empty';\n\nexport const DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}> = ({ label }) => {\n if (!label) return <DescriptionEmpty />;\n return (\n <div className=\"w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs\">{label}</div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { DateDisplay } from '@/components/data-display/date';\nimport { DescriptionEmpty } from './empty';\n\ntype Props = {\n date: Date | string | number | null | undefined;\n};\nexport const DescriptionDate: React.FC<Props> = ({ date }) => {\n if (typeof date === 'undefined' || date === null) return <DescriptionEmpty />;\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger>\n <DateDisplay date={date} format=\"medium\" />\n </TooltipTrigger>\n <TooltipContent>\n <DateDisplay date={date} format=\"full\" showTime className=\"font-medium text-xs\" />\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n","import { Image } from '@/components/ui/image';\n\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}> = ({ images }) => {\n if (!images || !images.length) return <DescriptionEmpty />;\n if (images.length === 1)\n return (\n <div className=\"flex flex-wrap gap-4\">\n <div key={images[0].id} className=\"group relative size-42 rounded-sm shadow-xs\">\n <Image src={images[0].src} alt={images[0].alt} width=\"100%\" height=\"100%\" />\n </div>\n </div>\n );\n return (\n <div className=\"flex flex-wrap gap-4\">\n {images.map(image => (\n <div key={image.id} className=\"group relative size-16 rounded-sm shadow-xs\">\n <Image src={image.src} alt={image.alt} width=\"100%\" height=\"100%\" />\n </div>\n ))}\n </div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionLongText: React.FC<{ content: string | null | undefined | number }> = ({ content }) => {\n if (content === undefined || content === null) {\n return <DescriptionEmpty />;\n }\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"whitespace-pre-line break-all text-start text-sm\">\n {content}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{content}</p>\n <p className=\"w-full text-end\">{content.toString().length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionName: React.FC<{\n name?: string | null | undefined;\n}> = ({ name }) => {\n if (!name) return <DescriptionEmpty />;\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"line-clamp-2 w-full truncate\">\n {name}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{name}</p>\n <p className=\"w-full text-end\">{name.length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\n\nexport const DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>> = ({ value }) => {\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\">{value.replace(/(\\d{3})(\\d{3})(\\d{4})/, '($1) $2-$3')}</Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\">\n <p className=\"tabular-nums\">{value.slice(1).replace(/(\\d{2})(\\d{3})(\\d{4})/, '(00) (+84) ($1) $2-$3')}</p>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { memo, useCallback, useMemo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Flex } from '@/components/layouts/flex';\nimport { DescriptionEmpty } from './empty';\n\nconst applyRounding = (num: number, precisionValue: number, roundingMode?: 'round' | 'floor' | 'ceil') => {\n const multiplier = 10 ** precisionValue;\n\n switch (roundingMode) {\n case 'floor':\n return Math.floor(num * multiplier) / multiplier;\n case 'ceil':\n return Math.ceil(num * multiplier) / multiplier;\n default:\n return Math.round(num * multiplier) / multiplier;\n }\n};\n\ntype Props = {\n decimalSeparator?: string;\n groupSeparator?: string;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n precision?: number; // Số chữ số thập phân\n roundingMode?: 'round' | 'floor' | 'ceil'; // Kiểu làm tròn\n showTrailingZeros?: boolean; // Hiển thị số 0 cuối\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; // Kích thước của component\n value: number | string | null | undefined;\n};\n\nexport const DescriptionStatistic = memo(\n ({\n decimalSeparator = '.',\n groupSeparator = ',',\n prefix: Prefix,\n suffix: Suffix,\n precision,\n roundingMode = 'round',\n showTrailingZeros = false,\n size = 'sm',\n value = 0,\n }: Props) => {\n // Memoize number formatting options\n const formatOptions = useMemo((): Intl.NumberFormatOptions => {\n const options: Intl.NumberFormatOptions = {};\n\n if (typeof precision === 'number' && precision >= 0 && showTrailingZeros) {\n options.minimumFractionDigits = precision;\n options.maximumFractionDigits = precision;\n } else {\n options.maximumFractionDigits = precision;\n }\n\n return options;\n }, [precision, showTrailingZeros]);\n\n const formatNumber = useCallback(\n (num: number): string => {\n let processedNum = num;\n\n // Áp dụng làm tròn nếu có precision\n if (typeof precision === 'number' && precision >= 0) {\n processedNum = applyRounding(num, precision, roundingMode);\n }\n\n return processedNum.toLocaleString('en-US', formatOptions);\n },\n [roundingMode, formatOptions, precision]\n );\n\n // Memoize value processing\n const processedValue = useMemo((): string => {\n // Xử lý giá trị number\n if (typeof value === 'number') {\n if (Number.isNaN(value) || !Number.isFinite(value)) {\n return 'N/A';\n }\n return formatNumber(value);\n }\n\n // Xử lý giá trị string\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n\n // Nếu là chuỗi rỗng\n if (!trimmedValue) {\n return 'N/A';\n }\n\n // Thử convert sang number\n const numValue = Number(trimmedValue);\n\n if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {\n // Nếu không phải số, trả về string gốc\n return 'N/A';\n }\n\n return formatNumber(numValue);\n }\n\n return 'N/A';\n }, [value, formatNumber]);\n\n // Memoize separator replacement\n const finalFormattedValue = useMemo((): string => {\n // Chỉ thay thế separators nếu khác mặc định\n if (decimalSeparator === '.' && groupSeparator === ',') {\n return processedValue;\n }\n return processedValue.replace(/,/g, groupSeparator).replace(/\\./g, decimalSeparator);\n }, [processedValue, decimalSeparator, groupSeparator]);\n\n if (finalFormattedValue === '0' || finalFormattedValue === 'N/A' || !finalFormattedValue) {\n return <DescriptionEmpty />;\n }\n\n return (\n <Flex\n padding=\"none\"\n className={cn(\n 'font-number text-lg text-text-positive tabular-nums',\n size === 'xs' && 'text-xs',\n size === 'sm' && 'text-sm',\n size === 'md' && 'text-base',\n size === 'lg' && 'text-lg',\n size === 'xl' && 'text-xl'\n )}\n >\n {Prefix}\n <p>{finalFormattedValue}</p>\n {Suffix}\n </Flex>\n );\n }\n);\nDescriptionStatistic.displayName = 'DescriptionStatistic';\n","export * from './components'\n\nexport const DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n> = ({ label, labelColSpan = 3, children }) => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',\n }}\n className=\"grid border-b border-b-border\"\n >\n <div\n style={{\n gridColumn: `span ${labelColSpan} / span ${labelColSpan}`,\n }}\n className=\"flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-muted py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums\"\n >\n {label}\n </div>\n <div\n style={{\n gridColumn: `span ${12 - labelColSpan} / span ${12 - labelColSpan}`,\n }}\n className=\"flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive\"\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport const Description: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <div\n data-slot=\"description-wrapper\"\n className=\"relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-card ring-3 ring-border-muted\"\n >\n {children}\n </div>\n );\n};\n"],"mappings":"6XAAA,MAAaA,OAET,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,wFACb,EAAA,EAAA,KAAC,IAAA,CAAA,SAAE,cAAA,CAAe,EACd,CCFGC,GAEP,CAAE,WACD,GAEH,EAAA,EAAA,KAAC,MAAA,CAAI,UAAU,qIAA6H,GAAY,EAFvI,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,CCG5BC,GAAoC,CAAE,U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,KAAO,IAAmB,IAC1C,EAEF,EAAe,QAAQ,KAAM,EAAe,CAAC,QAAQ,MAAO,EAAiB,CACnF,CAAC,EAAgB,EAAkB,EAAe,CAAC,CAMtD,OAJI,IAAwB,KAAO,IAAwB,OAAS,CAAC,GAC5D,EAAA,EAAA,KAAC,EAAA,EAAA,CAAmB,EAI3B,EAAA,EAAA,MAACC,EAAAA,EAAAA,CACC,QAAQ,OACR,WAAA,EAAA,EAAA,IACE,sDACA,IAAS,MAAQ,UACjB,IAAS,MAAQ,UACjB,IAAS,MAAQ,YACjB,IAAS,MAAQ,UACjB,IAAS,MAAQ,UAClB,WAEA,GACD,EAAA,EAAA,KAAC,IAAA,CAAA,SAAG,EAAA,CAAwB,CAC3B,IACI,EAGZ,CACD,EAAqB,YAAc,uBCvInC,MAAaC,GAKR,CAAE,QAAO,eAAe,EAAG,eAE5B,EAAA,EAAA,MAAC,MAAA,CACC,MAAO,CACL,QAAS,OACT,oBAAqB,6BACtB,CACD,UAAU,2CAEV,EAAA,EAAA,KAAC,MAAA,CACC,MAAO,CACL,WAAY,QAAQ,EAAa,UAAU,IAC5C,CACD,UAAU,oMAET,GACG,EACN,EAAA,EAAA,KAAC,MAAA,CACC,MAAO,CACL,WAAY,QAAQ,GAAK,EAAa,UAAU,GAAK,IACtD,CACD,UAAU,iEAET,YACG,CAAA,EACF,CAIGC,GAAkD,CAAE,eAE7D,EAAA,EAAA,KAAC,MAAA,CACC,YAAU,sBACV,UAAU,kJAET,YACG"}
@@ -1,2 +1,2 @@
1
- import"../../skeleton-VALtdlm9.mjs";import{t as e}from"../../image-BOLFKRA7.mjs";import{t}from"../../flex-DsiCflw0.mjs";import{t as n}from"../../paragraph-NGjcXqGV.mjs";import{t as r}from"../../date-BeK-z6-c.mjs";import{i,n as a,r as o,t as s}from"../../tooltip-pjVAbfk-.mjs";import{cn as c}from"@customafk/react-toolkit/utils";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{memo as d,useCallback as f,useMemo as p}from"react";const m=()=>l(`div`,{className:`flex items-center gap-0 font-medium text-sm text-text-positive-muted italic`,children:l(`p`,{children:`Empty Value`})}),h=({label:e})=>e?l(`div`,{className:`w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs`,children:e}):l(m,{}),g=({date:e})=>e==null?l(m,{}):l(o,{children:u(s,{children:[l(i,{children:l(r,{date:e,format:`medium`})}),l(a,{children:l(r,{date:e,format:`full`,showTime:!0,className:`font-medium text-xs`})})]})}),_=({images:t})=>!t||!t.length?l(m,{}):t.length===1?l(`div`,{className:`flex flex-wrap gap-4`,children:l(`div`,{className:`group relative size-42 rounded-sm shadow-xs`,children:l(e,{src:t[0].src,alt:t[0].alt,width:`100%`,height:`100%`})},t[0].id)}):l(`div`,{className:`flex flex-wrap gap-4`,children:t.map(t=>l(`div`,{className:`group relative size-16 rounded-sm shadow-xs`,children:l(e,{src:t.src,alt:t.alt,width:`100%`,height:`100%`})},t.id))}),v=({content:e})=>e==null?l(m,{}):u(s,{children:[l(i,{children:l(n,{variant:`sm`,className:`whitespace-pre-line break-all text-start text-sm`,children:e})}),l(a,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:u(`div`,{className:`flex flex-col gap-y-2`,children:[l(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),u(`p`,{className:`w-full text-end`,children:[e.toString().length,` chars`]})]})})]}),y=({name:e})=>e?u(s,{children:[l(i,{children:l(n,{variant:`sm`,className:`line-clamp-2 w-full truncate`,children:e})}),l(a,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:u(`div`,{className:`flex flex-col gap-y-2`,children:[l(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),u(`p`,{className:`w-full text-end`,children:[e.length,` chars`]})]})})]}):l(m,{}),b=({value:e})=>u(s,{children:[l(i,{children:l(n,{variant:`sm`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),l(a,{align:`start`,children:l(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),x=(e,t,n)=>{let r=10**t;switch(n){case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:return Math.round(e*r)/r}},S=d(({decimalSeparator:e=`.`,groupSeparator:n=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:d=`sm`,value:h=0})=>{let g=p(()=>{let e={};return typeof a==`number`&&a>=0&&s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,s]),_=f(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=x(e,a,o)),t.toLocaleString(`en-US`,g)},[o,g,a]),v=p(()=>{if(typeof h==`number`)return Number.isNaN(h)||!Number.isFinite(h)?`N/A`:_(h);if(typeof h==`string`){let e=h.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:_(t)}return`N/A`},[h,_]),y=p(()=>e===`.`&&n===`,`?v:v.replace(/,/g,n).replace(/\./g,e),[v,e,n]);return y===`0`||y===`N/A`||!y?l(m,{}):u(t,{padding:`none`,className:c(`font-number text-lg text-text-positive tabular-nums`,d===`xs`&&`text-xs`,d===`sm`&&`text-sm`,d===`md`&&`text-base`,d===`lg`&&`text-lg`,d===`xl`&&`text-xl`),children:[r,l(`p`,{children:y}),i]})});S.displayName=`DescriptionStatistic`;const C=({label:e,labelColSpan:t=3,children:n})=>u(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(12, minmax(0, 1fr))`},className:`grid border-b border-b-border`,children:[l(`div`,{style:{gridColumn:`span ${t} / span ${t}`},className:`flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-bg-subtle py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums`,children:e}),l(`div`,{style:{gridColumn:`span ${12-t} / span ${12-t}`},className:`flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive`,children:n})]}),w=({children:e})=>l(`div`,{"data-slot":`description-wrapper`,className:`relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-card ring-3 ring-border-muted`,children:e});export{w as Description,h as DescriptionBadge,g as DescriptionDate,m as DescriptionEmpty,_ as DescriptionImages,C as DescriptionItem,v as DescriptionLongText,y as DescriptionName,b as DescriptionNumberPhone,S as DescriptionStatistic};
1
+ import"../../skeleton-VALtdlm9.mjs";import{t as e}from"../../image-BOLFKRA7.mjs";import{t}from"../../flex-DsiCflw0.mjs";import{t as n}from"../../paragraph-NGjcXqGV.mjs";import{t as r}from"../../date-BeK-z6-c.mjs";import{i,n as a,r as o,t as s}from"../../tooltip-pjVAbfk-.mjs";import{cn as c}from"@customafk/react-toolkit/utils";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{memo as d,useCallback as f,useMemo as p}from"react";const m=()=>l(`div`,{className:`flex items-center gap-0 font-medium text-sm text-text-positive-muted italic`,children:l(`p`,{children:`Empty Value`})}),h=({label:e})=>e?l(`div`,{className:`w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs`,children:e}):l(m,{}),g=({date:e})=>e==null?l(m,{}):l(o,{children:u(s,{children:[l(i,{children:l(r,{date:e,format:`medium`})}),l(a,{children:l(r,{date:e,format:`full`,showTime:!0,className:`font-medium text-xs`})})]})}),_=({images:t})=>!t||!t.length?l(m,{}):t.length===1?l(`div`,{className:`flex flex-wrap gap-4`,children:l(`div`,{className:`group relative size-42 rounded-sm shadow-xs`,children:l(e,{src:t[0].src,alt:t[0].alt,width:`100%`,height:`100%`})},t[0].id)}):l(`div`,{className:`flex flex-wrap gap-4`,children:t.map(t=>l(`div`,{className:`group relative size-16 rounded-sm shadow-xs`,children:l(e,{src:t.src,alt:t.alt,width:`100%`,height:`100%`})},t.id))}),v=({content:e})=>e==null?l(m,{}):u(s,{children:[l(i,{children:l(n,{variant:`sm`,className:`whitespace-pre-line break-all text-start text-sm`,children:e})}),l(a,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:u(`div`,{className:`flex flex-col gap-y-2`,children:[l(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),u(`p`,{className:`w-full text-end`,children:[e.toString().length,` chars`]})]})})]}),y=({name:e})=>e?u(s,{children:[l(i,{children:l(n,{variant:`sm`,className:`line-clamp-2 w-full truncate`,children:e})}),l(a,{align:`start`,className:`h-fit min-w-48 max-w-80 pt-4`,children:u(`div`,{className:`flex flex-col gap-y-2`,children:[l(`p`,{className:`whitespace-pre-line text-wrap break-keep`,children:e}),u(`p`,{className:`w-full text-end`,children:[e.length,` chars`]})]})})]}):l(m,{}),b=({value:e})=>u(s,{children:[l(i,{children:l(n,{variant:`sm`,children:e.replace(/(\d{3})(\d{3})(\d{4})/,`($1) $2-$3`)})}),l(a,{align:`start`,children:l(`p`,{className:`tabular-nums`,children:e.slice(1).replace(/(\d{2})(\d{3})(\d{4})/,`(00) (+84) ($1) $2-$3`)})})]}),x=(e,t,n)=>{let r=10**t;switch(n){case`floor`:return Math.floor(e*r)/r;case`ceil`:return Math.ceil(e*r)/r;default:return Math.round(e*r)/r}},S=d(({decimalSeparator:e=`.`,groupSeparator:n=`,`,prefix:r,suffix:i,precision:a,roundingMode:o=`round`,showTrailingZeros:s=!1,size:d=`sm`,value:h=0})=>{let g=p(()=>{let e={};return typeof a==`number`&&a>=0&&s&&(e.minimumFractionDigits=a),e.maximumFractionDigits=a,e},[a,s]),_=f(e=>{let t=e;return typeof a==`number`&&a>=0&&(t=x(e,a,o)),t.toLocaleString(`en-US`,g)},[o,g,a]),v=p(()=>{if(typeof h==`number`)return Number.isNaN(h)||!Number.isFinite(h)?`N/A`:_(h);if(typeof h==`string`){let e=h.trim();if(!e)return`N/A`;let t=Number(e);return Number.isNaN(t)||!Number.isFinite(t)?`N/A`:_(t)}return`N/A`},[h,_]),y=p(()=>e===`.`&&n===`,`?v:v.replace(/,/g,n).replace(/\./g,e),[v,e,n]);return y===`0`||y===`N/A`||!y?l(m,{}):u(t,{padding:`none`,className:c(`font-number text-lg text-text-positive tabular-nums`,d===`xs`&&`text-xs`,d===`sm`&&`text-sm`,d===`md`&&`text-base`,d===`lg`&&`text-lg`,d===`xl`&&`text-xl`),children:[r,l(`p`,{children:y}),i]})});S.displayName=`DescriptionStatistic`;const C=({label:e,labelColSpan:t=3,children:n})=>u(`div`,{style:{display:`grid`,gridTemplateColumns:`repeat(12, minmax(0, 1fr))`},className:`grid border-b border-b-border`,children:[l(`div`,{style:{gridColumn:`span ${t} / span ${t}`},className:`flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-muted py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums`,children:e}),l(`div`,{style:{gridColumn:`span ${12-t} / span ${12-t}`},className:`flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive`,children:n})]}),w=({children:e})=>l(`div`,{"data-slot":`description-wrapper`,className:`relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-card ring-3 ring-border-muted`,children:e});export{w as Description,h as DescriptionBadge,g as DescriptionDate,m as DescriptionEmpty,_ as DescriptionImages,C as DescriptionItem,v as DescriptionLongText,y as DescriptionName,b as DescriptionNumberPhone,S as DescriptionStatistic};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["DescriptionEmpty: React.FC","DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}>","DescriptionDate: React.FC<Props>","DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}>","DescriptionLongText: React.FC<{ content: string | null | undefined | number }>","DescriptionName: React.FC<{\n name?: string | null | undefined;\n}>","DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>>","options: Intl.NumberFormatOptions","DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n>","Description: React.FC<React.PropsWithChildren>"],"sources":["../../../packages/components/features/descriptions/components/empty.tsx","../../../packages/components/features/descriptions/components/badge.tsx","../../../packages/components/features/descriptions/components/date.tsx","../../../packages/components/features/descriptions/components/images.tsx","../../../packages/components/features/descriptions/components/longtext.tsx","../../../packages/components/features/descriptions/components/name.tsx","../../../packages/components/features/descriptions/components/number-phone.tsx","../../../packages/components/features/descriptions/components/statistic.tsx","../../../packages/components/features/descriptions/index.tsx"],"sourcesContent":["export const DescriptionEmpty: React.FC = () => {\n return (\n <div className=\"flex items-center gap-0 font-medium text-sm text-text-positive-muted italic\">\n <p>Empty Value</p>\n </div>\n );\n};\n","import { DescriptionEmpty } from './empty';\n\nexport const DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}> = ({ label }) => {\n if (!label) return <DescriptionEmpty />;\n return (\n <div className=\"w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs\">{label}</div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { DateDisplay } from '@/components/data-display/date';\nimport { DescriptionEmpty } from './empty';\n\ntype Props = {\n date: Date | string | number | null | undefined;\n};\nexport const DescriptionDate: React.FC<Props> = ({ date }) => {\n if (typeof date === 'undefined' || date === null) return <DescriptionEmpty />;\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger>\n <DateDisplay date={date} format=\"medium\" />\n </TooltipTrigger>\n <TooltipContent>\n <DateDisplay date={date} format=\"full\" showTime className=\"font-medium text-xs\" />\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n","import { Image } from '@/components/ui/image';\n\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}> = ({ images }) => {\n if (!images || !images.length) return <DescriptionEmpty />;\n if (images.length === 1)\n return (\n <div className=\"flex flex-wrap gap-4\">\n <div key={images[0].id} className=\"group relative size-42 rounded-sm shadow-xs\">\n <Image src={images[0].src} alt={images[0].alt} width=\"100%\" height=\"100%\" />\n </div>\n </div>\n );\n return (\n <div className=\"flex flex-wrap gap-4\">\n {images.map(image => (\n <div key={image.id} className=\"group relative size-16 rounded-sm shadow-xs\">\n <Image src={image.src} alt={image.alt} width=\"100%\" height=\"100%\" />\n </div>\n ))}\n </div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionLongText: React.FC<{ content: string | null | undefined | number }> = ({ content }) => {\n if (content === undefined || content === null) {\n return <DescriptionEmpty />;\n }\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"whitespace-pre-line break-all text-start text-sm\">\n {content}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{content}</p>\n <p className=\"w-full text-end\">{content.toString().length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionName: React.FC<{\n name?: string | null | undefined;\n}> = ({ name }) => {\n if (!name) return <DescriptionEmpty />;\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"line-clamp-2 w-full truncate\">\n {name}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{name}</p>\n <p className=\"w-full text-end\">{name.length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\n\nexport const DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>> = ({ value }) => {\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\">{value.replace(/(\\d{3})(\\d{3})(\\d{4})/, '($1) $2-$3')}</Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\">\n <p className=\"tabular-nums\">{value.slice(1).replace(/(\\d{2})(\\d{3})(\\d{4})/, '(00) (+84) ($1) $2-$3')}</p>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { memo, useCallback, useMemo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Flex } from '@/components/layouts/flex';\nimport { DescriptionEmpty } from './empty';\n\nconst applyRounding = (num: number, precisionValue: number, roundingMode?: 'round' | 'floor' | 'ceil') => {\n const multiplier = 10 ** precisionValue;\n\n switch (roundingMode) {\n case 'floor':\n return Math.floor(num * multiplier) / multiplier;\n case 'ceil':\n return Math.ceil(num * multiplier) / multiplier;\n default:\n return Math.round(num * multiplier) / multiplier;\n }\n};\n\ntype Props = {\n decimalSeparator?: string;\n groupSeparator?: string;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n precision?: number; // Số chữ số thập phân\n roundingMode?: 'round' | 'floor' | 'ceil'; // Kiểu làm tròn\n showTrailingZeros?: boolean; // Hiển thị số 0 cuối\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; // Kích thước của component\n value: number | string | null | undefined;\n};\n\nexport const DescriptionStatistic = memo(\n ({\n decimalSeparator = '.',\n groupSeparator = ',',\n prefix: Prefix,\n suffix: Suffix,\n precision,\n roundingMode = 'round',\n showTrailingZeros = false,\n size = 'sm',\n value = 0,\n }: Props) => {\n // Memoize number formatting options\n const formatOptions = useMemo((): Intl.NumberFormatOptions => {\n const options: Intl.NumberFormatOptions = {};\n\n if (typeof precision === 'number' && precision >= 0 && showTrailingZeros) {\n options.minimumFractionDigits = precision;\n options.maximumFractionDigits = precision;\n } else {\n options.maximumFractionDigits = precision;\n }\n\n return options;\n }, [precision, showTrailingZeros]);\n\n const formatNumber = useCallback(\n (num: number): string => {\n let processedNum = num;\n\n // Áp dụng làm tròn nếu có precision\n if (typeof precision === 'number' && precision >= 0) {\n processedNum = applyRounding(num, precision, roundingMode);\n }\n\n return processedNum.toLocaleString('en-US', formatOptions);\n },\n [roundingMode, formatOptions, precision]\n );\n\n // Memoize value processing\n const processedValue = useMemo((): string => {\n // Xử lý giá trị number\n if (typeof value === 'number') {\n if (Number.isNaN(value) || !Number.isFinite(value)) {\n return 'N/A';\n }\n return formatNumber(value);\n }\n\n // Xử lý giá trị string\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n\n // Nếu là chuỗi rỗng\n if (!trimmedValue) {\n return 'N/A';\n }\n\n // Thử convert sang number\n const numValue = Number(trimmedValue);\n\n if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {\n // Nếu không phải số, trả về string gốc\n return 'N/A';\n }\n\n return formatNumber(numValue);\n }\n\n return 'N/A';\n }, [value, formatNumber]);\n\n // Memoize separator replacement\n const finalFormattedValue = useMemo((): string => {\n // Chỉ thay thế separators nếu khác mặc định\n if (decimalSeparator === '.' && groupSeparator === ',') {\n return processedValue;\n }\n return processedValue.replace(/,/g, groupSeparator).replace(/\\./g, decimalSeparator);\n }, [processedValue, decimalSeparator, groupSeparator]);\n\n if (finalFormattedValue === '0' || finalFormattedValue === 'N/A' || !finalFormattedValue) {\n return <DescriptionEmpty />;\n }\n\n return (\n <Flex\n padding=\"none\"\n className={cn(\n 'font-number text-lg text-text-positive tabular-nums',\n size === 'xs' && 'text-xs',\n size === 'sm' && 'text-sm',\n size === 'md' && 'text-base',\n size === 'lg' && 'text-lg',\n size === 'xl' && 'text-xl'\n )}\n >\n {Prefix}\n <p>{finalFormattedValue}</p>\n {Suffix}\n </Flex>\n );\n }\n);\nDescriptionStatistic.displayName = 'DescriptionStatistic';\n","export * from './components'\n\nexport const DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n> = ({ label, labelColSpan = 3, children }) => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',\n }}\n className=\"grid border-b border-b-border\"\n >\n <div\n style={{\n gridColumn: `span ${labelColSpan} / span ${labelColSpan}`,\n }}\n className=\"flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-bg-subtle py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums\"\n >\n {label}\n </div>\n <div\n style={{\n gridColumn: `span ${12 - labelColSpan} / span ${12 - labelColSpan}`,\n }}\n className=\"flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive\"\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport const Description: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <div\n data-slot=\"description-wrapper\"\n className=\"relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-card ring-3 ring-border-muted\"\n >\n {children}\n </div>\n );\n};\n"],"mappings":"qbAAA,MAAaA,MAET,EAAC,MAAA,CAAI,UAAU,uFACb,EAAC,IAAA,CAAA,SAAE,cAAA,CAAe,EACd,CCFGC,GAEP,CAAE,WACD,EAEH,EAAC,MAAA,CAAI,UAAU,qIAA6H,GAAY,CAFvI,EAAC,EAAA,EAAA,CAAmB,CCG5BC,GAAoC,CAAE,UACtC,GAAiC,KAAa,EAAC,EAAA,EAAA,CAAmB,CAE3E,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAA,SAAA,CACC,EAAC,EAAA,CAAA,SACC,EAAC,EAAA,CAAkB,OAAM,OAAO,UAAW,CAAA,CAC5B,CACjB,EAAC,EAAA,CAAA,SACC,EAA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","DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}>","DescriptionDate: React.FC<Props>","DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}>","DescriptionLongText: React.FC<{ content: string | null | undefined | number }>","DescriptionName: React.FC<{\n name?: string | null | undefined;\n}>","DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>>","options: Intl.NumberFormatOptions","DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n>","Description: React.FC<React.PropsWithChildren>"],"sources":["../../../packages/components/features/descriptions/components/empty.tsx","../../../packages/components/features/descriptions/components/badge.tsx","../../../packages/components/features/descriptions/components/date.tsx","../../../packages/components/features/descriptions/components/images.tsx","../../../packages/components/features/descriptions/components/longtext.tsx","../../../packages/components/features/descriptions/components/name.tsx","../../../packages/components/features/descriptions/components/number-phone.tsx","../../../packages/components/features/descriptions/components/statistic.tsx","../../../packages/components/features/descriptions/index.tsx"],"sourcesContent":["export const DescriptionEmpty: React.FC = () => {\n return (\n <div className=\"flex items-center gap-0 font-medium text-sm text-text-positive-muted italic\">\n <p>Empty Value</p>\n </div>\n );\n};\n","import { DescriptionEmpty } from './empty';\n\nexport const DescriptionBadge: React.FC<{\n label: string | number | null | undefined;\n}> = ({ label }) => {\n if (!label) return <DescriptionEmpty />;\n return (\n <div className=\"w-fit rounded-full border border-border-weak px-3 py-1 font-medium text-text-positive-weak text-xs tabular-nums shadow-xs\">{label}</div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { DateDisplay } from '@/components/data-display/date';\nimport { DescriptionEmpty } from './empty';\n\ntype Props = {\n date: Date | string | number | null | undefined;\n};\nexport const DescriptionDate: React.FC<Props> = ({ date }) => {\n if (typeof date === 'undefined' || date === null) return <DescriptionEmpty />;\n return (\n <TooltipProvider>\n <Tooltip>\n <TooltipTrigger>\n <DateDisplay date={date} format=\"medium\" />\n </TooltipTrigger>\n <TooltipContent>\n <DateDisplay date={date} format=\"full\" showTime className=\"font-medium text-xs\" />\n </TooltipContent>\n </Tooltip>\n </TooltipProvider>\n );\n};\n","import { Image } from '@/components/ui/image';\n\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionImages: React.FC<{\n images?:\n | Array<{\n id: string;\n src: string;\n alt: string;\n }>\n | null\n | undefined;\n}> = ({ images }) => {\n if (!images || !images.length) return <DescriptionEmpty />;\n if (images.length === 1)\n return (\n <div className=\"flex flex-wrap gap-4\">\n <div key={images[0].id} className=\"group relative size-42 rounded-sm shadow-xs\">\n <Image src={images[0].src} alt={images[0].alt} width=\"100%\" height=\"100%\" />\n </div>\n </div>\n );\n return (\n <div className=\"flex flex-wrap gap-4\">\n {images.map(image => (\n <div key={image.id} className=\"group relative size-16 rounded-sm shadow-xs\">\n <Image src={image.src} alt={image.alt} width=\"100%\" height=\"100%\" />\n </div>\n ))}\n </div>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionLongText: React.FC<{ content: string | null | undefined | number }> = ({ content }) => {\n if (content === undefined || content === null) {\n return <DescriptionEmpty />;\n }\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"whitespace-pre-line break-all text-start text-sm\">\n {content}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{content}</p>\n <p className=\"w-full text-end\">{content.toString().length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\nimport { DescriptionEmpty } from './empty';\n\nexport const DescriptionName: React.FC<{\n name?: string | null | undefined;\n}> = ({ name }) => {\n if (!name) return <DescriptionEmpty />;\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\" className=\"line-clamp-2 w-full truncate\">\n {name}\n </Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\" className=\"h-fit min-w-48 max-w-80 pt-4\">\n <div className=\"flex flex-col gap-y-2\">\n <p className=\"whitespace-pre-line text-wrap break-keep\">{name}</p>\n <p className=\"w-full text-end\">{name.length} chars</p>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip';\n\nimport { Paragraph } from '@/components/typography/paragraph';\n\nexport const DescriptionNumberPhone: React.FC<React.PropsWithChildren<{ value: string }>> = ({ value }) => {\n return (\n <Tooltip>\n <TooltipTrigger>\n <Paragraph variant=\"sm\">{value.replace(/(\\d{3})(\\d{3})(\\d{4})/, '($1) $2-$3')}</Paragraph>\n </TooltipTrigger>\n <TooltipContent align=\"start\">\n <p className=\"tabular-nums\">{value.slice(1).replace(/(\\d{2})(\\d{3})(\\d{4})/, '(00) (+84) ($1) $2-$3')}</p>\n </TooltipContent>\n </Tooltip>\n );\n};\n","import { memo, useCallback, useMemo } from 'react';\n\nimport { cn } from '@customafk/react-toolkit/utils';\n\nimport { Flex } from '@/components/layouts/flex';\nimport { DescriptionEmpty } from './empty';\n\nconst applyRounding = (num: number, precisionValue: number, roundingMode?: 'round' | 'floor' | 'ceil') => {\n const multiplier = 10 ** precisionValue;\n\n switch (roundingMode) {\n case 'floor':\n return Math.floor(num * multiplier) / multiplier;\n case 'ceil':\n return Math.ceil(num * multiplier) / multiplier;\n default:\n return Math.round(num * multiplier) / multiplier;\n }\n};\n\ntype Props = {\n decimalSeparator?: string;\n groupSeparator?: string;\n prefix?: React.ReactNode;\n suffix?: React.ReactNode;\n precision?: number; // Số chữ số thập phân\n roundingMode?: 'round' | 'floor' | 'ceil'; // Kiểu làm tròn\n showTrailingZeros?: boolean; // Hiển thị số 0 cuối\n size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'; // Kích thước của component\n value: number | string | null | undefined;\n};\n\nexport const DescriptionStatistic = memo(\n ({\n decimalSeparator = '.',\n groupSeparator = ',',\n prefix: Prefix,\n suffix: Suffix,\n precision,\n roundingMode = 'round',\n showTrailingZeros = false,\n size = 'sm',\n value = 0,\n }: Props) => {\n // Memoize number formatting options\n const formatOptions = useMemo((): Intl.NumberFormatOptions => {\n const options: Intl.NumberFormatOptions = {};\n\n if (typeof precision === 'number' && precision >= 0 && showTrailingZeros) {\n options.minimumFractionDigits = precision;\n options.maximumFractionDigits = precision;\n } else {\n options.maximumFractionDigits = precision;\n }\n\n return options;\n }, [precision, showTrailingZeros]);\n\n const formatNumber = useCallback(\n (num: number): string => {\n let processedNum = num;\n\n // Áp dụng làm tròn nếu có precision\n if (typeof precision === 'number' && precision >= 0) {\n processedNum = applyRounding(num, precision, roundingMode);\n }\n\n return processedNum.toLocaleString('en-US', formatOptions);\n },\n [roundingMode, formatOptions, precision]\n );\n\n // Memoize value processing\n const processedValue = useMemo((): string => {\n // Xử lý giá trị number\n if (typeof value === 'number') {\n if (Number.isNaN(value) || !Number.isFinite(value)) {\n return 'N/A';\n }\n return formatNumber(value);\n }\n\n // Xử lý giá trị string\n if (typeof value === 'string') {\n const trimmedValue = value.trim();\n\n // Nếu là chuỗi rỗng\n if (!trimmedValue) {\n return 'N/A';\n }\n\n // Thử convert sang number\n const numValue = Number(trimmedValue);\n\n if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {\n // Nếu không phải số, trả về string gốc\n return 'N/A';\n }\n\n return formatNumber(numValue);\n }\n\n return 'N/A';\n }, [value, formatNumber]);\n\n // Memoize separator replacement\n const finalFormattedValue = useMemo((): string => {\n // Chỉ thay thế separators nếu khác mặc định\n if (decimalSeparator === '.' && groupSeparator === ',') {\n return processedValue;\n }\n return processedValue.replace(/,/g, groupSeparator).replace(/\\./g, decimalSeparator);\n }, [processedValue, decimalSeparator, groupSeparator]);\n\n if (finalFormattedValue === '0' || finalFormattedValue === 'N/A' || !finalFormattedValue) {\n return <DescriptionEmpty />;\n }\n\n return (\n <Flex\n padding=\"none\"\n className={cn(\n 'font-number text-lg text-text-positive tabular-nums',\n size === 'xs' && 'text-xs',\n size === 'sm' && 'text-sm',\n size === 'md' && 'text-base',\n size === 'lg' && 'text-lg',\n size === 'xl' && 'text-xl'\n )}\n >\n {Prefix}\n <p>{finalFormattedValue}</p>\n {Suffix}\n </Flex>\n );\n }\n);\nDescriptionStatistic.displayName = 'DescriptionStatistic';\n","export * from './components'\n\nexport const DescriptionItem: React.FC<\n React.PropsWithChildren<{\n label: string;\n labelColSpan?: number;\n }>\n> = ({ label, labelColSpan = 3, children }) => {\n return (\n <div\n style={{\n display: 'grid',\n gridTemplateColumns: 'repeat(12, minmax(0, 1fr))',\n }}\n className=\"grid border-b border-b-border\"\n >\n <div\n style={{\n gridColumn: `span ${labelColSpan} / span ${labelColSpan}`,\n }}\n className=\"flex min-w-full items-center justify-start overflow-x-hidden text-wrap break-all border-r border-r-border bg-secondary-muted py-3 pr-2 pl-4 text-sm text-text-positive-weak tabular-nums\"\n >\n {label}\n </div>\n <div\n style={{\n gridColumn: `span ${12 - labelColSpan} / span ${12 - labelColSpan}`,\n }}\n className=\"flex flex-wrap gap-2 py-3 pr-2 pl-4 text-sm text-text-positive\"\n >\n {children}\n </div>\n </div>\n );\n};\n\nexport const Description: React.FC<React.PropsWithChildren> = ({ children }) => {\n return (\n <div\n data-slot=\"description-wrapper\"\n className=\"relative flex size-full flex-col gap-y-0 space-y-0 overflow-hidden rounded-lg border border-border bg-card shadow-card ring-3 ring-border-muted\"\n >\n {children}\n </div>\n );\n};\n"],"mappings":"qbAAA,MAAaA,MAET,EAAC,MAAA,CAAI,UAAU,uFACb,EAAC,IAAA,CAAA,SAAE,cAAA,CAAe,EACd,CCFGC,GAEP,CAAE,WACD,EAEH,EAAC,MAAA,CAAI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L,WAAY,QAAQ,EAAa,UAAU,IAC5C,CACD,UAAU,oMAET,GACG,CACN,EAAC,MAAA,CACC,MAAO,CACL,WAAY,QAAQ,GAAK,EAAa,UAAU,GAAK,IACtD,CACD,UAAU,iEAET,YACG,CAAA,EACF,CAIGC,GAAkD,CAAE,cAE7D,EAAC,MAAA,CACC,YAAU,sBACV,UAAU,kJAET,YACG"}
@@ -1,7 +1,7 @@
1
- import * as react_jsx_runtime25 from "react/jsx-runtime";
1
+ import * as react_jsx_runtime24 from "react/jsx-runtime";
2
2
 
3
3
  //#region packages/components/features/search-modal/index.d.ts
4
- declare const SearchModal: () => react_jsx_runtime25.JSX.Element;
4
+ declare const SearchModal: () => react_jsx_runtime24.JSX.Element;
5
5
  //#endregion
6
6
  export { SearchModal };
7
7
  //# sourceMappingURL=index.d.mts.map