lecom-ui 4.1.8 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +5 -0
  2. package/dist/_virtual/index.js +7 -0
  3. package/dist/components/Accordion/Accordion.js +40 -37
  4. package/dist/components/Button/Button.js +10 -9
  5. package/dist/components/Button/CustomButton.js +6 -5
  6. package/dist/components/Card/Card.js +7 -6
  7. package/dist/components/Checkbox/Checkbox.js +35 -30
  8. package/dist/components/CustomIcon/Icons/CadastroFacil.js +15 -5
  9. package/dist/components/CustomIcon/Icons/LogoLecom.js +15 -12
  10. package/dist/components/CustomIcon/Icons/LogoLecomBrand.js +8 -5
  11. package/dist/components/CustomIcon/Icons/ModoTeste.js +13 -5
  12. package/dist/components/CustomIcon/Icons/Rpa.js +17 -5
  13. package/dist/components/DataTable/DataTable.js +33 -127
  14. package/dist/components/Dialog/Dialog.js +40 -31
  15. package/dist/components/DropdownMenu/DropdownMenu.js +55 -46
  16. package/dist/components/Header/Header.js +51 -35
  17. package/dist/components/Header/HelpMenu.js +52 -41
  18. package/dist/components/Header/ImgBrand.js +5 -8
  19. package/dist/components/Header/ModulesMenu.js +63 -50
  20. package/dist/components/Header/SocialMenu.js +5 -6
  21. package/dist/components/Header/UserMenu.js +81 -51
  22. package/dist/components/Input/Input.js +11 -2
  23. package/dist/components/Layout/Layout.js +62 -45
  24. package/dist/components/Notification/Notification.js +9 -8
  25. package/dist/components/Notification/NotificationBase.js +5 -5
  26. package/dist/components/Notification/NotificationCallout.js +33 -27
  27. package/dist/components/Notification/NotificationCloseButton.js +4 -3
  28. package/dist/components/Notification/NotificationContent.js +24 -18
  29. package/dist/components/Notification/NotificationIcon.js +9 -6
  30. package/dist/components/Notification/NotificationInline.js +23 -20
  31. package/dist/components/Notification/NotificationToast.js +28 -25
  32. package/dist/components/Notification/useNotificationToast.js +0 -1
  33. package/dist/components/Popover/Popover.js +8 -7
  34. package/dist/components/ScrollArea/ScrollArea.js +18 -15
  35. package/dist/components/Select/Select.js +63 -54
  36. package/dist/components/Separator/Separator.js +5 -4
  37. package/dist/components/Sheet/Sheet.js +35 -26
  38. package/dist/components/Sidebar/Sidebar.js +112 -95
  39. package/dist/components/Skeleton/Skeleton.js +2 -2
  40. package/dist/components/Table/Table.js +15 -26
  41. package/dist/components/Tag/Tag.js +6 -5
  42. package/dist/components/Tooltip/Tooltip.js +17 -15
  43. package/dist/components/Typography/Typography.js +6 -7
  44. package/dist/hooks/use-mobile.js +1 -1
  45. package/dist/i18n/index.js +4 -53
  46. package/dist/i18n/locales/en_us.js +4 -3
  47. package/dist/i18n/locales/es_es.js +4 -3
  48. package/dist/i18n/locales/index.js +4 -4
  49. package/dist/i18n/locales/pt_br.js +4 -3
  50. package/dist/index.d.ts +108 -304
  51. package/dist/index.js +1 -12
  52. package/dist/lib/utils.js +2 -2
  53. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +806 -0
  54. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +726 -0
  55. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +347 -0
  56. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +154 -0
  57. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +136 -0
  58. package/dist/node_modules/@radix-ui/number/dist/index.js +6 -0
  59. package/dist/node_modules/@radix-ui/primitive/dist/index.js +11 -0
  60. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +303 -0
  61. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
  62. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +157 -0
  63. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +144 -0
  64. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +68 -0
  65. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +39 -0
  66. package/dist/node_modules/@radix-ui/react-context/dist/index.js +79 -0
  67. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +319 -0
  68. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
  69. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +211 -0
  70. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +265 -0
  71. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +29 -0
  72. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +207 -0
  73. package/dist/node_modules/@radix-ui/react-id/dist/index.js +15 -0
  74. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +831 -0
  75. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +296 -0
  76. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +278 -0
  77. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +17 -0
  78. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +130 -0
  79. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +41 -0
  80. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +220 -0
  81. package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.js +718 -0
  82. package/dist/node_modules/@radix-ui/react-select/dist/index.js +1143 -0
  83. package/dist/node_modules/@radix-ui/react-separator/dist/index.js +30 -0
  84. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +81 -0
  85. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +476 -0
  86. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +12 -0
  87. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +46 -0
  88. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +18 -0
  89. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
  90. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +15 -0
  91. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +40 -0
  92. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +35 -0
  93. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +74 -0
  94. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +3023 -0
  95. package/dist/node_modules/aria-hidden/dist/es2015/index.js +136 -0
  96. package/dist/node_modules/class-variance-authority/dist/index.js +44 -0
  97. package/dist/node_modules/clsx/dist/clsx.js +3 -0
  98. package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
  99. package/dist/node_modules/hex-color-opacity/lib/index.js +22 -0
  100. package/dist/node_modules/i18next/dist/esm/i18next.js +2228 -0
  101. package/dist/node_modules/lucide-react/dist/esm/Icon.js +44 -0
  102. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +26 -0
  103. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +20 -0
  104. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +13 -0
  105. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +15 -0
  106. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +15 -0
  107. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +13 -0
  108. package/dist/node_modules/lucide-react/dist/esm/icons/circle-alert.js +17 -0
  109. package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.js +16 -0
  110. package/dist/node_modules/lucide-react/dist/esm/icons/circle-help.js +17 -0
  111. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +15 -0
  112. package/dist/node_modules/lucide-react/dist/esm/icons/info.js +17 -0
  113. package/dist/node_modules/lucide-react/dist/esm/icons/menu.js +17 -0
  114. package/dist/node_modules/lucide-react/dist/esm/icons/message-square.js +15 -0
  115. package/dist/node_modules/lucide-react/dist/esm/icons/minus.js +13 -0
  116. package/dist/node_modules/lucide-react/dist/esm/icons/panel-left.js +16 -0
  117. package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +23 -0
  118. package/dist/node_modules/lucide-react/dist/esm/icons/user.js +16 -0
  119. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +16 -0
  120. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +13 -0
  121. package/dist/node_modules/react-i18next/dist/es/context.js +18 -0
  122. package/dist/node_modules/react-i18next/dist/es/defaults.js +21 -0
  123. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +7 -0
  124. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +12 -0
  125. package/dist/node_modules/react-i18next/dist/es/unescape.js +27 -0
  126. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +112 -0
  127. package/dist/node_modules/react-i18next/dist/es/utils.js +63 -0
  128. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +9 -0
  129. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +160 -0
  130. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +38 -0
  131. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +21 -0
  132. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +109 -0
  133. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +5 -0
  134. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +7 -0
  135. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +56 -0
  136. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +10 -0
  137. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +31 -0
  138. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +19 -0
  139. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +25 -0
  140. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +51 -0
  141. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2493 -0
  142. package/dist/node_modules/tslib/tslib.es6.js +56 -0
  143. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +24 -0
  144. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +48 -0
  145. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +42 -0
  146. package/dist/node_modules/use-color-luminance/index.es.js +105 -0
  147. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +21 -0
  148. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +77 -0
  149. package/dist/plugin/typographies.ts +146 -152
  150. package/dist/style.min.css +1 -1
  151. package/dist/utils/cookie.js +9 -6
  152. package/package.json +11 -3
@@ -1,5 +1,5 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
- import { initializeI18n } from '../../i18n/index.js';
3
3
  import { getCookie } from '../../utils/cookie.js';
4
4
  import '../CustomIcon/Icons/CadastroFacil.js';
5
5
  import '../CustomIcon/Icons/LogoLecom.js';
@@ -9,53 +9,70 @@ import { LogoLecomBrand } from '../CustomIcon/Icons/LogoLecomBrand.js';
9
9
  import { Header } from '../Header/Header.js';
10
10
  import { SidebarProvider, Sidebar, SidebarContent, SidebarGroup, SidebarGroupContent, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarFooter } from '../Sidebar/Sidebar.js';
11
11
  import { Typography } from '../Typography/Typography.js';
12
+ import { useTranslation } from '../../node_modules/react-i18next/dist/es/useTranslation.js';
12
13
 
13
- initializeI18n();
14
14
  const Layout = ({ children, header, sideBar }) => {
15
+ const { t } = useTranslation();
15
16
  const { items, info } = sideBar;
16
- const sidebarState = getCookie("sidebar:state") === "true";
17
- return /* @__PURE__ */ React.createElement(SidebarProvider, { className: "flex-col", defaultOpen: sidebarState }, /* @__PURE__ */ React.createElement(Header, { ...header }), /* @__PURE__ */ React.createElement("div", { className: "flex grow" }, /* @__PURE__ */ React.createElement(Sidebar, { collapsible: "icon", variant: "sidebar" }, /* @__PURE__ */ React.createElement(SidebarContent, null, /* @__PURE__ */ React.createElement(SidebarGroup, null, /* @__PURE__ */ React.createElement(SidebarGroupContent, null, /* @__PURE__ */ React.createElement(SidebarMenu, null, items.map((item) => /* @__PURE__ */ React.createElement(SidebarMenuItem, { key: item.title }, /* @__PURE__ */ React.createElement(
18
- SidebarMenuButton,
19
- {
20
- asChild: true,
21
- tooltip: item.title,
22
- isActive: !!item.isActive
23
- },
24
- item.url ? /* @__PURE__ */ React.createElement("a", { href: item.url }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title)) : /* @__PURE__ */ React.createElement("div", { onClick: item.onClick }, item.icon, /* @__PURE__ */ React.createElement("span", null, item.title))
25
- ))))))), /* @__PURE__ */ React.createElement(SidebarFooter, { className: "p-6 pt-0 gap-1" }, /* @__PURE__ */ React.createElement(
26
- Typography,
27
- {
28
- variant: "heading-xsmall-600",
29
- textColor: "text-grey-800",
30
- className: "flex items-center gap-2 w-[200px]"
31
- },
32
- info.platformText,
33
- /* @__PURE__ */ React.createElement(LogoLecomBrand, { className: "w-16 shrink-0" })
34
- ), /* @__PURE__ */ React.createElement(
35
- Typography,
36
- {
37
- variant: "body-medium-400",
38
- textColor: "text-grey-800",
39
- className: "w-[200px]"
40
- },
41
- info.versionText,
42
- " ",
43
- info.version,
44
- " - ",
45
- info.cycle,
46
- " ",
47
- info.build
48
- ), /* @__PURE__ */ React.createElement(
49
- Typography,
50
- {
51
- variant: "body-medium-400",
52
- textColor: "text-grey-800",
53
- className: "w-[200px]"
54
- },
55
- info.authorizedForText,
56
- " ",
57
- info.authorizedFor
58
- ))), /* @__PURE__ */ React.createElement("main", { className: "grow w-full" }, children)));
17
+ const [sidebarState, setSidebarState] = React.useState(
18
+ void 0
19
+ );
20
+ React.useEffect(() => {
21
+ const cookieState = getCookie("sidebar:state") === "true";
22
+ setSidebarState(cookieState);
23
+ }, []);
24
+ return /* @__PURE__ */ jsxs(SidebarProvider, { className: "flex-col", defaultOpen: sidebarState, children: [
25
+ /* @__PURE__ */ jsx(Header, { ...header }),
26
+ /* @__PURE__ */ jsxs("div", { className: "flex grow", children: [
27
+ /* @__PURE__ */ jsxs(Sidebar, { collapsible: "icon", variant: "sidebar", children: [
28
+ /* @__PURE__ */ jsx(SidebarContent, { children: /* @__PURE__ */ jsx(SidebarGroup, { children: /* @__PURE__ */ jsx(SidebarGroupContent, { children: /* @__PURE__ */ jsx(SidebarMenu, { children: items.map((item) => /* @__PURE__ */ jsx(SidebarMenuItem, { children: /* @__PURE__ */ jsx(
29
+ SidebarMenuButton,
30
+ {
31
+ asChild: true,
32
+ tooltip: item.title,
33
+ isActive: !!item.isActive,
34
+ children: item.url ? /* @__PURE__ */ jsxs("a", { href: item.url, children: [
35
+ item.icon,
36
+ /* @__PURE__ */ jsx("span", { children: item.title })
37
+ ] }) : /* @__PURE__ */ jsxs("div", { onClick: item.onClick, children: [
38
+ item.icon,
39
+ /* @__PURE__ */ jsx("span", { children: item.title })
40
+ ] })
41
+ }
42
+ ) }, item.title)) }) }) }) }),
43
+ /* @__PURE__ */ jsxs(SidebarFooter, { className: "p-6 pt-0 gap-1", children: [
44
+ /* @__PURE__ */ jsxs(
45
+ Typography,
46
+ {
47
+ variant: "heading-xsmall-600",
48
+ textColor: "text-grey-800",
49
+ className: "flex items-center gap-2",
50
+ children: [
51
+ t("sidebar.platform"),
52
+ " ",
53
+ /* @__PURE__ */ jsx(LogoLecomBrand, { className: "w-16 shrink-0" })
54
+ ]
55
+ }
56
+ ),
57
+ /* @__PURE__ */ jsxs(Typography, { variant: "body-medium-400", textColor: "text-grey-800", children: [
58
+ t("sidebar.version"),
59
+ " ",
60
+ info.version,
61
+ " - ",
62
+ info.cycle,
63
+ " ",
64
+ info.build
65
+ ] }),
66
+ /* @__PURE__ */ jsxs(Typography, { variant: "body-medium-400", textColor: "text-grey-800", children: [
67
+ t("sidebar.authorizedFor"),
68
+ " ",
69
+ info.authorizedFor
70
+ ] })
71
+ ] })
72
+ ] }),
73
+ /* @__PURE__ */ jsx("main", { className: "grow", children })
74
+ ] })
75
+ ] });
59
76
  };
60
77
  Layout.displayName = "Layout";
61
78
 
@@ -1,6 +1,7 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { cn } from '../../lib/utils.js';
3
- import { cva } from 'class-variance-authority';
4
+ import { cva } from '../../node_modules/class-variance-authority/dist/index.js';
4
5
  import { NotificationCallout } from './NotificationCallout.js';
5
6
  import { NotificationInline } from './NotificationInline.js';
6
7
  import { MemoizedNotificationToast } from './NotificationToast.js';
@@ -37,11 +38,11 @@ const posistionMap = {
37
38
  const renderNotification = (props) => {
38
39
  switch (props.type) {
39
40
  case "toast":
40
- return /* @__PURE__ */ React.createElement(MemoizedNotificationToast, { ...props });
41
+ return /* @__PURE__ */ jsx(MemoizedNotificationToast, { ...props });
41
42
  case "inline":
42
- return /* @__PURE__ */ React.createElement(NotificationInline, { ...props });
43
+ return /* @__PURE__ */ jsx(NotificationInline, { ...props });
43
44
  case "callout":
44
- return /* @__PURE__ */ React.createElement(NotificationCallout, { ...props });
45
+ return /* @__PURE__ */ jsx(NotificationCallout, { ...props });
45
46
  default:
46
47
  return null;
47
48
  }
@@ -58,7 +59,7 @@ const Notification = React.forwardRef(
58
59
  const { shouldExpand } = props;
59
60
  const widthStyle = shouldExpand ? "w-full" : "inline-block";
60
61
  const positionClass = getPositionClass(type, placement);
61
- return /* @__PURE__ */ React.createElement(
62
+ return /* @__PURE__ */ jsx(
62
63
  "main",
63
64
  {
64
65
  className: cn(
@@ -66,9 +67,9 @@ const Notification = React.forwardRef(
66
67
  type === "toast" && "fixed z-50 p-4 space-y-2",
67
68
  positionClass
68
69
  ),
69
- ref
70
- },
71
- renderNotification(props)
70
+ ref,
71
+ children: renderNotification(props)
72
+ }
72
73
  );
73
74
  }
74
75
  );
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ import { jsx } from 'react/jsx-runtime';
2
2
  import { cn } from '../../lib/utils.js';
3
3
  import { notificationVariants } from './Notification.js';
4
4
 
@@ -9,16 +9,16 @@ const NotificationBase = ({
9
9
  children,
10
10
  className,
11
11
  dataTestId
12
- }) => /* @__PURE__ */ React.createElement(
12
+ }) => /* @__PURE__ */ jsx(
13
13
  "div",
14
14
  {
15
15
  className: cn(notificationVariants({ variant }), className),
16
16
  onMouseEnter,
17
17
  onMouseLeave,
18
18
  "data-testid": dataTestId,
19
- "aria-hidden": "true"
20
- },
21
- children
19
+ "aria-hidden": "true",
20
+ children
21
+ }
22
22
  );
23
23
 
24
24
  export { NotificationBase };
@@ -1,9 +1,10 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { cn } from '../../lib/utils.js';
3
- import { ChevronUpIcon } from 'lucide-react';
4
4
  import { NotificationBase } from './NotificationBase.js';
5
5
  import { NotificationContent } from './NotificationContent.js';
6
6
  import { NotificationIcon } from './NotificationIcon.js';
7
+ import ChevronUp from '../../node_modules/lucide-react/dist/esm/icons/chevron-up.js';
7
8
 
8
9
  const NotificationCallout = ({ ...props }) => {
9
10
  const [isCollapsed, setIsCollapsed] = React.useState(false);
@@ -46,37 +47,42 @@ const NotificationCallout = ({ ...props }) => {
46
47
  if (isCollapsed && props.title) return "max-h-0 overflow-hidden";
47
48
  return "no-collapse";
48
49
  };
49
- return /* @__PURE__ */ React.createElement(
50
+ return /* @__PURE__ */ jsxs(
50
51
  NotificationBase,
51
52
  {
52
53
  variant: defaultVariant,
53
54
  className: cn(getGridColumns(), isCollapsed && "place-items-center"),
54
- dataTestId: "notification-callout"
55
- },
56
- /* @__PURE__ */ React.createElement(NotificationIcon, { variant: defaultVariant }),
57
- /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-0.5" }, /* @__PURE__ */ React.createElement(
58
- NotificationContent,
59
- {
60
- title: props.title,
61
- content: props.content,
62
- ref: contentRef,
63
- className: cn(
64
- "transition-all duration-300",
65
- isCollapsed && getCollapseClass()
55
+ dataTestId: "notification-callout",
56
+ children: [
57
+ /* @__PURE__ */ jsx(NotificationIcon, { variant: defaultVariant }),
58
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5", children: [
59
+ /* @__PURE__ */ jsx(
60
+ NotificationContent,
61
+ {
62
+ title: props.title,
63
+ content: props.content,
64
+ ref: contentRef,
65
+ className: cn(
66
+ "transition-all duration-300",
67
+ isCollapsed && getCollapseClass()
68
+ )
69
+ }
70
+ ),
71
+ props.action
72
+ ] }),
73
+ /* @__PURE__ */ jsx(
74
+ ChevronUp,
75
+ {
76
+ "data-testid": "collapse-icon",
77
+ onClick: handleCollapse,
78
+ ref: refCollapse,
79
+ className: cn(
80
+ shouldCollapse ? "opacity-100 size-5 text-grey-800 transition-transform duration-200 cursor-pointer hover:text-foreground group-hover:opacity-100" : "opacity-0 pointer-events-none h-0 w-0 absolute"
81
+ )
82
+ }
66
83
  )
67
- }
68
- ), props.action),
69
- /* @__PURE__ */ React.createElement(
70
- ChevronUpIcon,
71
- {
72
- "data-testid": "collapse-icon",
73
- onClick: handleCollapse,
74
- ref: refCollapse,
75
- className: cn(
76
- shouldCollapse ? "opacity-100 size-5 text-grey-800 transition-transform duration-200 cursor-pointer hover:text-foreground group-hover:opacity-100" : "opacity-0 pointer-events-none h-0 w-0 absolute"
77
- )
78
- }
79
- )
84
+ ]
85
+ }
80
86
  );
81
87
  };
82
88
  NotificationCallout.displayName = "NotificationCallout";
@@ -1,11 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { cn } from '../../lib/utils.js';
2
- import { XIcon } from 'lucide-react';
3
+ import X from '../../node_modules/lucide-react/dist/esm/icons/x.js';
3
4
 
4
5
  const NotificationCloseButton = ({
5
6
  onClose,
6
7
  enableClose
7
- }) => /* @__PURE__ */ React.createElement(
8
- XIcon,
8
+ }) => /* @__PURE__ */ jsx(
9
+ X,
9
10
  {
10
11
  className: cn(
11
12
  enableClose ? "opacity-100 size-5 text-grey-800 cursor-pointer hover:text-foreground group-hover:opacity-100" : "opacity-0 pointer-events-none h-0 w-0 absolute"
@@ -1,24 +1,30 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { Typography } from '../Typography/Typography.js';
3
4
 
4
- const NotificationContent = React.forwardRef(({ title, content, className, children }, ref) => /* @__PURE__ */ React.createElement("div", { className: "flex flex-col gap-0.5 flex-1" }, title && /* @__PURE__ */ React.createElement(
5
- Typography,
6
- {
7
- variant: "body-medium-500",
8
- color: "grey-800",
9
- "data-testid": "title"
10
- },
11
- title
12
- ), /* @__PURE__ */ React.createElement("div", { ref, className, "data-testid": "collapse-content" }, /* @__PURE__ */ React.createElement(
13
- Typography,
14
- {
15
- variant: "body-medium-400",
16
- color: "grey-800",
17
- "data-testid": "content"
18
- },
19
- content,
20
- children
21
- ))));
5
+ const NotificationContent = React.forwardRef(({ title, content, className, children }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-0.5 flex-1", children: [
6
+ title && /* @__PURE__ */ jsx(
7
+ Typography,
8
+ {
9
+ variant: "body-medium-500",
10
+ color: "grey-800",
11
+ "data-testid": "title",
12
+ children: title
13
+ }
14
+ ),
15
+ /* @__PURE__ */ jsx("div", { ref, className, "data-testid": "collapse-content", children: /* @__PURE__ */ jsxs(
16
+ Typography,
17
+ {
18
+ variant: "body-medium-400",
19
+ color: "grey-800",
20
+ "data-testid": "content",
21
+ children: [
22
+ content,
23
+ children
24
+ ]
25
+ }
26
+ ) })
27
+ ] }));
22
28
  NotificationContent.displayName = "NotificationContent";
23
29
 
24
30
  export { NotificationContent };
@@ -1,11 +1,14 @@
1
- import * as React from 'react';
2
- import { CircleCheckIcon, CircleAlertIcon, InfoIcon, TriangleAlertIcon } from 'lucide-react';
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import TriangleAlert from '../../node_modules/lucide-react/dist/esm/icons/triangle-alert.js';
3
+ import Info from '../../node_modules/lucide-react/dist/esm/icons/info.js';
4
+ import CircleAlert from '../../node_modules/lucide-react/dist/esm/icons/circle-alert.js';
5
+ import CircleCheck from '../../node_modules/lucide-react/dist/esm/icons/circle-check.js';
3
6
 
4
7
  const iconMap = {
5
- success: /* @__PURE__ */ React.createElement(CircleCheckIcon, { className: "text-green-600 size-5" }),
6
- error: /* @__PURE__ */ React.createElement(CircleAlertIcon, { className: "text-red-600 size-5" }),
7
- information: /* @__PURE__ */ React.createElement(InfoIcon, { className: "text-blue-600 size-5" }),
8
- warning: /* @__PURE__ */ React.createElement(TriangleAlertIcon, { className: "size-5 text-yellow-600" })
8
+ success: /* @__PURE__ */ jsx(CircleCheck, { className: "text-green-600 size-5" }),
9
+ error: /* @__PURE__ */ jsx(CircleAlert, { className: "text-red-600 size-5" }),
10
+ information: /* @__PURE__ */ jsx(Info, { className: "text-blue-600 size-5" }),
11
+ warning: /* @__PURE__ */ jsx(TriangleAlert, { className: "size-5 text-yellow-600" })
9
12
  };
10
13
  const NotificationIcon = ({
11
14
  variant
@@ -1,3 +1,4 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { cn } from '../../lib/utils.js';
3
4
  import { NotificationBase } from './NotificationBase.js';
@@ -45,30 +46,32 @@ const NotificationInline = ({
45
46
  return getNonFullWidthColumns();
46
47
  }
47
48
  };
48
- return /* @__PURE__ */ React.createElement(
49
+ return /* @__PURE__ */ jsxs(
49
50
  NotificationBase,
50
51
  {
51
52
  variant: defaultVariant,
52
53
  className: cn(getGridColumns()),
53
- dataTestId: "notification-inline"
54
- },
55
- /* @__PURE__ */ React.createElement(NotificationIcon, { variant: defaultVariant }),
56
- /* @__PURE__ */ React.createElement(
57
- NotificationContent,
58
- {
59
- title,
60
- content,
61
- className: "max-h-10 overflow-hidden"
62
- }
63
- ),
64
- action,
65
- /* @__PURE__ */ React.createElement(
66
- NotificationCloseButton,
67
- {
68
- enableClose: enableClose ?? false,
69
- onClose: () => setIsVisible(false)
70
- }
71
- )
54
+ dataTestId: "notification-inline",
55
+ children: [
56
+ /* @__PURE__ */ jsx(NotificationIcon, { variant: defaultVariant }),
57
+ /* @__PURE__ */ jsx(
58
+ NotificationContent,
59
+ {
60
+ title,
61
+ content,
62
+ className: "max-h-11 overflow-hidden"
63
+ }
64
+ ),
65
+ action,
66
+ /* @__PURE__ */ jsx(
67
+ NotificationCloseButton,
68
+ {
69
+ enableClose: enableClose ?? false,
70
+ onClose: () => setIsVisible(false)
71
+ }
72
+ )
73
+ ]
74
+ }
72
75
  );
73
76
  };
74
77
  NotificationInline.displayName = "NotificationInline";
@@ -1,3 +1,4 @@
1
+ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { cn } from '../../lib/utils.js';
3
4
  import { NotificationBase } from './NotificationBase.js';
@@ -107,14 +108,13 @@ const NotificationToast = (props) => {
107
108
  );
108
109
  const renderAction = (action) => {
109
110
  if (action) {
110
- return /* @__PURE__ */ React.createElement("div", { className: cn(props.showProgress ? "py-2" : "pt-2") }, action);
111
+ return /* @__PURE__ */ jsx("div", { className: cn(props.showProgress ? "py-2" : "pt-2"), children: action });
111
112
  }
112
113
  return null;
113
114
  };
114
- return /* @__PURE__ */ React.createElement(React.Fragment, null, toasts.map((toast) => /* @__PURE__ */ React.createElement(
115
+ return /* @__PURE__ */ jsx(Fragment, { children: toasts.map((toast) => /* @__PURE__ */ jsxs(
115
116
  NotificationBase,
116
117
  {
117
- key: toast.id,
118
118
  variant: toast.variant,
119
119
  className: cn(
120
120
  "sm:w-[17.5rem] min-w-auto cursor-pointer",
@@ -122,29 +122,32 @@ const NotificationToast = (props) => {
122
122
  ),
123
123
  onMouseEnter: () => handleMouseEnter(toast.id),
124
124
  onMouseLeave: () => handleMouseLeave(toast.id),
125
- dataTestId: "notification-toast"
126
- },
127
- /* @__PURE__ */ React.createElement(NotificationIcon, { variant: toast.variant }),
128
- /* @__PURE__ */ React.createElement(NotificationContent, { title: toast.title, content: toast.content }, renderAction(toast.action)),
129
- /* @__PURE__ */ React.createElement(
130
- NotificationCloseButton,
131
- {
132
- enableClose: props.enableClose ?? false,
133
- onClose: () => closeNotification(toast.id)
134
- }
135
- ),
136
- props.showProgress && /* @__PURE__ */ React.createElement(
137
- "div",
138
- {
139
- "data-testid": "progress-bar",
140
- className: cn(
141
- `absolute bottom-0 left-0 h-1 rounded-b-lg transition-all`,
142
- colorMap[toast.variant]
125
+ dataTestId: "notification-toast",
126
+ children: [
127
+ /* @__PURE__ */ jsx(NotificationIcon, { variant: toast.variant }),
128
+ /* @__PURE__ */ jsx(NotificationContent, { title: toast.title, content: toast.content, children: renderAction(toast.action) }),
129
+ /* @__PURE__ */ jsx(
130
+ NotificationCloseButton,
131
+ {
132
+ enableClose: props.enableClose ?? false,
133
+ onClose: () => closeNotification(toast.id)
134
+ }
143
135
  ),
144
- style: { width: `${progressMap[toast.id] ?? 100}%` }
145
- }
146
- )
147
- )));
136
+ props.showProgress && /* @__PURE__ */ jsx(
137
+ "div",
138
+ {
139
+ "data-testid": "progress-bar",
140
+ className: cn(
141
+ `absolute bottom-0 left-0 h-1 rounded-b-lg transition-all`,
142
+ colorMap[toast.variant]
143
+ ),
144
+ style: { width: `${progressMap[toast.id] ?? 100}%` }
145
+ }
146
+ )
147
+ ]
148
+ },
149
+ toast.id
150
+ )) });
148
151
  };
149
152
  NotificationToast.displayName = "NotificationToast";
150
153
  const MemoizedNotificationToast = React.memo(NotificationToast);
@@ -4,7 +4,6 @@ const TOAST_LIMIT = Infinity;
4
4
  const TOAST_REMOVE_DELAY = 5e3;
5
5
  const actionTypes = {
6
6
  ADD_TOAST: "ADD_TOAST",
7
- UPDATE_TOAST: "UPDATE_TOAST",
8
7
  DISMISS_TOAST: "DISMISS_TOAST",
9
8
  REMOVE_TOAST: "REMOVE_TOAST",
10
9
  PAUSE_TOAST: "PAUSE_TOAST",
@@ -1,11 +1,12 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { cn } from '../../lib/utils.js';
3
- import * as PopoverPrimitive from '@radix-ui/react-popover';
4
+ import { Portal, Content as Content2, Root as Root2, Trigger } from '../../node_modules/@radix-ui/react-popover/dist/index.js';
4
5
 
5
- const Popover = PopoverPrimitive.Root;
6
- const PopoverTrigger = PopoverPrimitive.Trigger;
7
- const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ React.createElement(PopoverPrimitive.Portal, null, /* @__PURE__ */ React.createElement(
8
- PopoverPrimitive.Content,
6
+ const Popover = Root2;
7
+ const PopoverTrigger = Trigger;
8
+ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsx(
9
+ Content2,
9
10
  {
10
11
  ref,
11
12
  align,
@@ -16,7 +17,7 @@ const PopoverContent = React.forwardRef(({ className, align = "center", sideOffs
16
17
  ),
17
18
  ...props
18
19
  }
19
- )));
20
- PopoverContent.displayName = PopoverPrimitive.Content.displayName;
20
+ ) }));
21
+ PopoverContent.displayName = Content2.displayName;
21
22
 
22
23
  export { Popover, PopoverContent, PopoverTrigger };
@@ -1,21 +1,24 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
1
2
  import * as React from 'react';
2
3
  import { cn } from '../../lib/utils.js';
3
- import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
4
+ import { Root, Viewport, Corner, ScrollAreaScrollbar, ScrollAreaThumb } from '../../node_modules/@radix-ui/react-scroll-area/dist/index.js';
4
5
 
5
- const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ React.createElement(
6
- ScrollAreaPrimitive.Root,
6
+ const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
7
+ Root,
7
8
  {
8
9
  ref,
9
10
  className: cn("relative overflow-hidden", className),
10
- ...props
11
- },
12
- /* @__PURE__ */ React.createElement(ScrollAreaPrimitive.Viewport, { className: "h-full w-full rounded-[inherit]" }, children),
13
- /* @__PURE__ */ React.createElement(ScrollBar, null),
14
- /* @__PURE__ */ React.createElement(ScrollAreaPrimitive.Corner, null)
11
+ ...props,
12
+ children: [
13
+ /* @__PURE__ */ jsx(Viewport, { className: "h-full w-full rounded-[inherit]", children }),
14
+ /* @__PURE__ */ jsx(ScrollBar, {}),
15
+ /* @__PURE__ */ jsx(Corner, {})
16
+ ]
17
+ }
15
18
  ));
16
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
17
- const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ React.createElement(
18
- ScrollAreaPrimitive.ScrollAreaScrollbar,
19
+ ScrollArea.displayName = Root.displayName;
20
+ const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
21
+ ScrollAreaScrollbar,
19
22
  {
20
23
  ref,
21
24
  orientation,
@@ -25,10 +28,10 @@ const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...pr
25
28
  orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
26
29
  className
27
30
  ),
28
- ...props
29
- },
30
- /* @__PURE__ */ React.createElement(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
31
+ ...props,
32
+ children: /* @__PURE__ */ jsx(ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
33
+ }
31
34
  ));
32
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
35
+ ScrollBar.displayName = ScrollAreaScrollbar.displayName;
33
36
 
34
37
  export { ScrollArea, ScrollBar };