analytica-frontend-lib 1.0.27 → 1.0.29

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 (107) hide show
  1. package/dist/Alert/{Alert.d.mts → index.d.mts} +1 -1
  2. package/dist/Alert/{Alert.d.ts → index.d.ts} +1 -1
  3. package/dist/Alert/{Alert.js → index.js} +6 -7
  4. package/dist/Alert/index.js.map +1 -0
  5. package/dist/Alert/{Alert.mjs → index.mjs} +67 -16
  6. package/dist/Alert/index.mjs.map +1 -0
  7. package/dist/Badge/{Badge.d.mts → index.d.mts} +1 -1
  8. package/dist/Badge/{Badge.d.ts → index.d.ts} +1 -1
  9. package/dist/Badge/{Badge.js → index.js} +3 -5
  10. package/dist/Badge/index.js.map +1 -0
  11. package/dist/Badge/{Badge.mjs → index.mjs} +3 -1
  12. package/dist/Badge/index.mjs.map +1 -0
  13. package/dist/Button/{Button.d.ts → index.d.mts} +1 -1
  14. package/dist/Button/{Button.d.mts → index.d.ts} +1 -1
  15. package/dist/Button/{Button.js → index.js} +3 -5
  16. package/dist/Button/index.js.map +1 -0
  17. package/dist/Button/{Button.mjs → index.mjs} +3 -1
  18. package/dist/Button/index.mjs.map +1 -0
  19. package/dist/CheckBox/{CheckBox.d.mts → index.d.mts} +1 -1
  20. package/dist/CheckBox/{CheckBox.d.ts → index.d.ts} +1 -1
  21. package/dist/CheckBox/{CheckBox.js → index.js} +7 -8
  22. package/dist/CheckBox/index.js.map +1 -0
  23. package/dist/CheckBox/{CheckBox.mjs → index.mjs} +68 -16
  24. package/dist/CheckBox/index.mjs.map +1 -0
  25. package/dist/DropdownMenu/{DropdownMenu.d.mts → index.d.mts} +1 -1
  26. package/dist/DropdownMenu/{DropdownMenu.d.ts → index.d.ts} +1 -1
  27. package/dist/DropdownMenu/{DropdownMenu.js → index.js} +4 -3
  28. package/dist/DropdownMenu/index.js.map +1 -0
  29. package/dist/DropdownMenu/{DropdownMenu.mjs → index.mjs} +4 -2
  30. package/dist/DropdownMenu/index.mjs.map +1 -0
  31. package/dist/IconButton/{IconButton.d.mts → index.d.mts} +1 -1
  32. package/dist/IconButton/{IconButton.d.ts → index.d.ts} +1 -1
  33. package/dist/IconButton/{IconButton.js → index.js} +3 -5
  34. package/dist/IconButton/index.js.map +1 -0
  35. package/dist/IconButton/{IconButton.mjs → index.mjs} +3 -1
  36. package/dist/IconButton/index.mjs.map +1 -0
  37. package/dist/IconRoundedButton/{IconRoundedButton.d.mts → index.d.mts} +1 -1
  38. package/dist/IconRoundedButton/{IconRoundedButton.d.ts → index.d.ts} +1 -1
  39. package/dist/IconRoundedButton/{IconRoundedButton.js → index.js} +3 -5
  40. package/dist/IconRoundedButton/index.js.map +1 -0
  41. package/dist/IconRoundedButton/{IconRoundedButton.mjs → index.mjs} +3 -1
  42. package/dist/IconRoundedButton/index.mjs.map +1 -0
  43. package/dist/NavButton/{NavButton.d.mts → index.d.mts} +1 -1
  44. package/dist/NavButton/{NavButton.d.ts → index.d.ts} +1 -1
  45. package/dist/NavButton/{NavButton.js → index.js} +3 -5
  46. package/dist/NavButton/index.js.map +1 -0
  47. package/dist/NavButton/{NavButton.mjs → index.mjs} +3 -1
  48. package/dist/NavButton/index.mjs.map +1 -0
  49. package/dist/SelectionButton/{SelectionButton.d.mts → index.d.mts} +1 -1
  50. package/dist/SelectionButton/{SelectionButton.d.ts → index.d.ts} +1 -1
  51. package/dist/SelectionButton/{SelectionButton.js → index.js} +3 -5
  52. package/dist/SelectionButton/index.js.map +1 -0
  53. package/dist/SelectionButton/{SelectionButton.mjs → index.mjs} +3 -1
  54. package/dist/SelectionButton/index.mjs.map +1 -0
  55. package/dist/Table/{Table.d.mts → index.d.mts} +1 -1
  56. package/dist/Table/{Table.d.ts → index.d.ts} +1 -1
  57. package/dist/Table/{Table.js → index.js} +4 -3
  58. package/dist/Table/index.js.map +1 -0
  59. package/dist/Table/{Table.mjs → index.mjs} +4 -2
  60. package/dist/Table/index.mjs.map +1 -0
  61. package/dist/Text/{Text.d.mts → index.d.mts} +1 -1
  62. package/dist/Text/{Text.d.ts → index.d.ts} +1 -1
  63. package/dist/Text/{Text.js → index.js} +3 -5
  64. package/dist/Text/index.js.map +1 -0
  65. package/dist/{chunk-TT3VCQGR.mjs → Text/index.mjs} +3 -2
  66. package/dist/Text/index.mjs.map +1 -0
  67. package/dist/TextArea/{TextArea.d.mts → index.d.mts} +1 -1
  68. package/dist/TextArea/{TextArea.d.ts → index.d.ts} +1 -1
  69. package/dist/TextArea/{TextArea.js → index.js} +7 -8
  70. package/dist/TextArea/index.js.map +1 -0
  71. package/dist/TextArea/{TextArea.mjs → index.mjs} +62 -10
  72. package/dist/TextArea/index.mjs.map +1 -0
  73. package/dist/Toast/{utils/ToastStore.d.mts → ToastStore/index.d.mts} +1 -1
  74. package/dist/Toast/{utils/ToastStore.d.ts → ToastStore/index.d.ts} +1 -1
  75. package/dist/Toast/{utils/ToastStore.js → ToastStore/index.js} +3 -5
  76. package/dist/Toast/ToastStore/index.js.map +1 -0
  77. package/dist/{chunk-WIOCQOM7.mjs → Toast/ToastStore/index.mjs} +3 -2
  78. package/dist/Toast/ToastStore/index.mjs.map +1 -0
  79. package/dist/Toast/{utils/Toaster.d.mts → Toaster/index.d.mts} +2 -2
  80. package/dist/Toast/{utils/Toaster.d.ts → Toaster/index.d.ts} +2 -2
  81. package/dist/Toast/{utils/Toaster.js → Toaster/index.js} +10 -7
  82. package/dist/Toast/Toaster/index.js.map +1 -0
  83. package/dist/Toast/Toaster/index.mjs +122 -0
  84. package/dist/Toast/Toaster/index.mjs.map +1 -0
  85. package/dist/Toast/{Toast.d.mts → index.d.mts} +1 -1
  86. package/dist/Toast/{Toast.d.ts → index.d.ts} +1 -1
  87. package/dist/Toast/{Toast.js → index.js} +3 -5
  88. package/dist/Toast/index.js.map +1 -0
  89. package/dist/{chunk-XJA5HF7B.mjs → Toast/index.mjs} +5 -2
  90. package/dist/Toast/index.mjs.map +1 -0
  91. package/dist/index.css +1 -3
  92. package/dist/index.css.map +1 -0
  93. package/dist/index.d.mts +18 -507
  94. package/dist/index.d.ts +18 -507
  95. package/dist/index.js +157 -141
  96. package/dist/index.js.map +1 -0
  97. package/dist/index.mjs +154 -138
  98. package/dist/index.mjs.map +1 -0
  99. package/dist/styles.css +1 -3
  100. package/dist/styles.css.map +1 -0
  101. package/dist/styles.d.mts +2 -0
  102. package/dist/styles.d.ts +2 -0
  103. package/package.json +26 -86
  104. package/dist/Text/Text.mjs +0 -6
  105. package/dist/Toast/Toast.mjs +0 -7
  106. package/dist/Toast/utils/ToastStore.mjs +0 -6
  107. package/dist/Toast/utils/Toaster.mjs +0 -35
package/dist/index.js CHANGED
@@ -18,30 +18,30 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- Alert: () => Alert,
24
- Badge: () => Badge,
25
- Button: () => Button,
26
- CheckBox: () => CheckBox,
27
- DropdownMenu: () => DropdownMenu,
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ Alert: () => Alert_default,
24
+ Badge: () => Badge_default,
25
+ Button: () => Button_default,
26
+ CheckBox: () => CheckBox_default,
27
+ DropdownMenu: () => DropdownMenu_default,
28
28
  DropdownMenuContent: () => MenuContent,
29
29
  DropdownMenuItem: () => MenuItem,
30
30
  DropdownMenuLabel: () => MenuLabel,
31
31
  DropdownMenuSeparator: () => MenuSeparator,
32
32
  DropdownMenuTrigger: () => DropdownMenuTrigger,
33
- IconButton: () => IconButton,
34
- IconRoundedButton: () => IconRoundedButton,
35
- NavButton: () => NavButton,
36
- SelectionButton: () => SelectionButton,
37
- Table: () => Table,
38
- Text: () => Text,
39
- TextArea: () => TextArea,
40
- Toast: () => Toast,
41
- Toaster: () => Toaster,
42
- useToastStore: () => useToastStore
33
+ IconButton: () => IconButton_default,
34
+ IconRoundedButton: () => IconRoundedButton_default,
35
+ NavButton: () => NavButton_default,
36
+ SelectionButton: () => SelectionButton_default,
37
+ Table: () => Table_default,
38
+ Text: () => Text_default,
39
+ TextArea: () => TextArea_default,
40
+ Toast: () => Toast_default,
41
+ Toaster: () => Toaster_default,
42
+ useToastStore: () => ToastStore_default
43
43
  });
44
- module.exports = __toCommonJS(index_exports);
44
+ module.exports = __toCommonJS(src_exports);
45
45
 
46
46
  // src/components/Text/Text.tsx
47
47
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -92,6 +92,7 @@ var Text = ({
92
92
  }
93
93
  );
94
94
  };
95
+ var Text_default = Text;
95
96
 
96
97
  // src/components/Button/Button.tsx
97
98
  var import_jsx_runtime2 = require("react/jsx-runtime");
@@ -149,6 +150,7 @@ var Button = ({
149
150
  }
150
151
  );
151
152
  };
153
+ var Button_default = Button;
152
154
 
153
155
  // src/components/Badge/Badge.tsx
154
156
  var import_phosphor_react = require("phosphor-react");
@@ -239,6 +241,7 @@ var Badge = ({
239
241
  }
240
242
  );
241
243
  };
244
+ var Badge_default = Badge;
242
245
 
243
246
  // src/components/Alert/Alert.tsx
244
247
  var import_phosphor_react2 = require("phosphor-react");
@@ -295,7 +298,7 @@ var Alert = ({
295
298
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: `mt-0.5 ${variantColor}`, children: variantIcon }),
296
299
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { children: [
297
300
  hasHeading && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
298
- Text,
301
+ Text_default,
299
302
  {
300
303
  size: "md",
301
304
  weight: "medium",
@@ -305,7 +308,7 @@ var Alert = ({
305
308
  }
306
309
  ),
307
310
  /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
308
- Text,
311
+ Text_default,
309
312
  {
310
313
  size: hasHeading ? "sm" : "md",
311
314
  weight: "normal",
@@ -318,6 +321,7 @@ var Alert = ({
318
321
  }
319
322
  );
320
323
  };
324
+ var Alert_default = Alert;
321
325
 
322
326
  // src/components/IconButton/IconButton.tsx
323
327
  var import_react = require("react");
@@ -370,6 +374,7 @@ var IconButton = (0, import_react.forwardRef)(
370
374
  }
371
375
  );
372
376
  IconButton.displayName = "IconButton";
377
+ var IconButton_default = IconButton;
373
378
 
374
379
  // src/components/IconRoundedButton/IconRoundedButton.tsx
375
380
  var import_jsx_runtime6 = require("react/jsx-runtime");
@@ -411,6 +416,7 @@ var IconRoundedButton = ({
411
416
  }
412
417
  );
413
418
  };
419
+ var IconRoundedButton_default = IconRoundedButton;
414
420
 
415
421
  // src/components/NavButton/NavButton.tsx
416
422
  var import_react2 = require("react");
@@ -460,6 +466,7 @@ var NavButton = (0, import_react2.forwardRef)(
460
466
  }
461
467
  );
462
468
  NavButton.displayName = "NavButton";
469
+ var NavButton_default = NavButton;
463
470
 
464
471
  // src/components/SelectionButton/SelectionButton.tsx
465
472
  var import_react3 = require("react");
@@ -514,6 +521,7 @@ var SelectionButton = (0, import_react3.forwardRef)(
514
521
  }
515
522
  );
516
523
  SelectionButton.displayName = "SelectionButton";
524
+ var SelectionButton_default = SelectionButton;
517
525
 
518
526
  // src/components/Table/Table.tsx
519
527
  var import_react4 = require("react");
@@ -612,6 +620,7 @@ var TableCaption = (0, import_react4.forwardRef)(({ className, ...props }, ref)
612
620
  }
613
621
  ));
614
622
  TableCaption.displayName = "TableCaption";
623
+ var Table_default = Table;
615
624
 
616
625
  // src/components/CheckBox/CheckBox.tsx
617
626
  var import_react5 = require("react");
@@ -757,7 +766,7 @@ var CheckBox = (0, import_react5.forwardRef)(
757
766
  {
758
767
  className: `flex flex-row items-center ${sizeClasses.labelHeight}`,
759
768
  children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
760
- Text,
769
+ Text_default,
761
770
  {
762
771
  as: "label",
763
772
  htmlFor: inputId,
@@ -773,7 +782,7 @@ var CheckBox = (0, import_react5.forwardRef)(
773
782
  }
774
783
  ),
775
784
  errorMessage && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
776
- Text,
785
+ Text_default,
777
786
  {
778
787
  size: "sm",
779
788
  weight: "normal",
@@ -783,7 +792,7 @@ var CheckBox = (0, import_react5.forwardRef)(
783
792
  }
784
793
  ),
785
794
  helperText && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
786
- Text,
795
+ Text_default,
787
796
  {
788
797
  size: "sm",
789
798
  weight: "normal",
@@ -796,6 +805,7 @@ var CheckBox = (0, import_react5.forwardRef)(
796
805
  }
797
806
  );
798
807
  CheckBox.displayName = "CheckBox";
808
+ var CheckBox_default = CheckBox;
799
809
 
800
810
  // src/components/TextArea/TextArea.tsx
801
811
  var import_react6 = require("react");
@@ -896,7 +906,7 @@ var TextArea = (0, import_react6.forwardRef)(
896
906
  const textareaClasses = `${BASE_TEXTAREA_CLASSES} ${sizeClasses.textarea} ${stateClasses.base} ${stateClasses.hover} ${stateClasses.focus} ${className}`;
897
907
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `flex flex-col ${sizeClasses.container}`, children: [
898
908
  label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
899
- Text,
909
+ Text_default,
900
910
  {
901
911
  as: "label",
902
912
  htmlFor: inputId,
@@ -921,16 +931,128 @@ var TextArea = (0, import_react6.forwardRef)(
921
931
  ...props
922
932
  }
923
933
  ),
924
- errorMessage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { size: "sm", weight: "normal", className: "mt-1.5 text-error-600", children: errorMessage }),
925
- helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
934
+ errorMessage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { size: "sm", weight: "normal", className: "mt-1.5 text-error-600", children: errorMessage }),
935
+ helperMessage && !errorMessage && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Text_default, { size: "sm", weight: "normal", className: "mt-1.5 text-text-500", children: helperMessage })
926
936
  ] });
927
937
  }
928
938
  );
929
939
  TextArea.displayName = "TextArea";
940
+ var TextArea_default = TextArea;
941
+
942
+ // src/components/Toast/Toast.tsx
943
+ var import_phosphor_react4 = require("phosphor-react");
944
+ var import_jsx_runtime12 = require("react/jsx-runtime");
945
+ var VARIANT_ACTION_CLASSES4 = {
946
+ solid: {
947
+ warning: "bg-warning text-warning-600 border-none focus-visible:outline-none",
948
+ success: "bg-success text-success-800 border-none focus-visible:outline-none",
949
+ info: "bg-info text-info-600 border-none focus-visible:outline-none"
950
+ },
951
+ outlined: {
952
+ warning: "bg-warning text-warning-600 border border-warning-300 focus-visible:outline-none",
953
+ success: "bg-success text-success-800 border border-success-200 focus-visible:outline-none",
954
+ info: "bg-info text-info-600 border border-info-600 focus-visible:outline-none"
955
+ }
956
+ };
957
+ var iconMap = {
958
+ success: import_phosphor_react4.CheckCircle,
959
+ info: import_phosphor_react4.Info,
960
+ warning: import_phosphor_react4.WarningCircle
961
+ };
962
+ var Toast = ({
963
+ variant = "outlined",
964
+ action = "success",
965
+ className = "",
966
+ onClose,
967
+ title,
968
+ description,
969
+ position = "default",
970
+ ...props
971
+ }) => {
972
+ const variantClasses = VARIANT_ACTION_CLASSES4[variant][action];
973
+ const positionClasses = {
974
+ "top-left": "fixed top-4 left-4",
975
+ "top-center": "fixed top-4 left-1/2 transform -translate-x-1/2",
976
+ "top-right": "fixed top-4 right-4",
977
+ "bottom-left": "fixed bottom-4 left-4",
978
+ "bottom-center": "fixed bottom-4 left-1/2 transform -translate-x-1/2",
979
+ "bottom-right": "fixed bottom-4 right-4",
980
+ default: ""
981
+ };
982
+ const IconAction = iconMap[action] || iconMap["success"];
983
+ const baseClasses = "max-w-[390px] w-full flex flex-row items-start justify-between shadow-lg rounded-lg border p-4 gap-6 group";
984
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
985
+ "div",
986
+ {
987
+ role: "alert",
988
+ "aria-live": "assertive",
989
+ "aria-atomic": "true",
990
+ className: `${baseClasses} ${positionClasses[position]} ${variantClasses} ${className}`,
991
+ ...props,
992
+ children: [
993
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-row items-start gap-3", children: [
994
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "mt-1", "data-testid": `toast-icon-${action}`, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconAction, {}) }),
995
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "flex flex-col items-start justify-start", children: [
996
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "font-semibold text-md", children: title }),
997
+ description && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "text-md text-text-900", children: description })
998
+ ] })
999
+ ] }),
1000
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1001
+ "button",
1002
+ {
1003
+ onClick: onClose,
1004
+ "aria-label": "Dismiss notification",
1005
+ className: "text-background-500 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
1006
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_phosphor_react4.X, {})
1007
+ }
1008
+ )
1009
+ ]
1010
+ }
1011
+ );
1012
+ };
1013
+ var Toast_default = Toast;
1014
+
1015
+ // src/components/Toast/utils/ToastStore.ts
1016
+ var import_zustand = require("zustand");
1017
+ var useToastStore = (0, import_zustand.create)((set) => ({
1018
+ toasts: [],
1019
+ addToast: (toast) => {
1020
+ const id = crypto.randomUUID();
1021
+ set((state) => ({
1022
+ toasts: [...state.toasts, { id, ...toast }]
1023
+ }));
1024
+ },
1025
+ removeToast: (id) => {
1026
+ set((state) => ({
1027
+ toasts: state.toasts.filter((t) => t.id !== id)
1028
+ }));
1029
+ }
1030
+ }));
1031
+ var ToastStore_default = useToastStore;
1032
+
1033
+ // src/components/Toast/utils/Toaster.tsx
1034
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1035
+ var Toaster = () => {
1036
+ const toasts = ToastStore_default((state) => state.toasts);
1037
+ const removeToast = ToastStore_default((state) => state.removeToast);
1038
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1039
+ Toast_default,
1040
+ {
1041
+ title: toast.title,
1042
+ description: toast.description,
1043
+ variant: toast.variant,
1044
+ action: toast.action,
1045
+ position: toast.position,
1046
+ onClose: () => removeToast(toast.id)
1047
+ },
1048
+ toast.id
1049
+ )) });
1050
+ };
1051
+ var Toaster_default = Toaster;
930
1052
 
931
1053
  // src/components/DropdownMenu/DropdownMenu.tsx
932
1054
  var import_react7 = require("react");
933
- var import_jsx_runtime12 = require("react/jsx-runtime");
1055
+ var import_jsx_runtime14 = require("react/jsx-runtime");
934
1056
  var DropdownMenuContext = (0, import_react7.createContext)(
935
1057
  void 0
936
1058
  );
@@ -993,14 +1115,14 @@ var DropdownMenu = ({ children, open, onOpenChange }) => {
993
1115
  () => ({ open: currentOpen, setOpen }),
994
1116
  [currentOpen, setOpen]
995
1117
  );
996
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropdownMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "relative", ref: menuRef, children }) });
1118
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownMenuContext.Provider, { value, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "relative", ref: menuRef, children }) });
997
1119
  };
998
1120
  var DropdownMenuTrigger = (0, import_react7.forwardRef)(({ className, children, onClick, ...props }, ref) => {
999
1121
  const context = (0, import_react7.useContext)(DropdownMenuContext);
1000
1122
  if (!context)
1001
1123
  throw new Error("DropdownMenuTrigger must be used within a DropdownMenu");
1002
1124
  const { open, setOpen } = context;
1003
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1125
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1004
1126
  "button",
1005
1127
  {
1006
1128
  ref,
@@ -1032,7 +1154,7 @@ var ALIGN_CLASSES = {
1032
1154
  center: "left-1/2 -translate-x-1/2",
1033
1155
  end: "right-0"
1034
1156
  };
1035
- var MenuLabel = (0, import_react7.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1157
+ var MenuLabel = (0, import_react7.forwardRef)(({ className, inset, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1036
1158
  "fieldset",
1037
1159
  {
1038
1160
  ref,
@@ -1067,7 +1189,7 @@ var MenuContent = (0, import_react7.forwardRef)(
1067
1189
  const horizontal = ALIGN_CLASSES[align];
1068
1190
  return `absolute ${vertical} ${horizontal}`;
1069
1191
  };
1070
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1192
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1071
1193
  "div",
1072
1194
  {
1073
1195
  ref,
@@ -1112,7 +1234,7 @@ var MenuItem = (0, import_react7.forwardRef)(
1112
1234
  }
1113
1235
  onClick?.(e);
1114
1236
  };
1115
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1237
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1116
1238
  "div",
1117
1239
  {
1118
1240
  ref,
@@ -1142,7 +1264,7 @@ var MenuItem = (0, import_react7.forwardRef)(
1142
1264
  }
1143
1265
  );
1144
1266
  MenuItem.displayName = "MenuItem";
1145
- var MenuSeparator = (0, import_react7.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1267
+ var MenuSeparator = (0, import_react7.forwardRef)(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1146
1268
  "div",
1147
1269
  {
1148
1270
  ref,
@@ -1151,114 +1273,7 @@ var MenuSeparator = (0, import_react7.forwardRef)(({ className, ...props }, ref)
1151
1273
  }
1152
1274
  ));
1153
1275
  MenuSeparator.displayName = "MenuSeparator";
1154
-
1155
- // src/components/Toast/Toast.tsx
1156
- var import_phosphor_react4 = require("phosphor-react");
1157
- var import_jsx_runtime13 = require("react/jsx-runtime");
1158
- var VARIANT_ACTION_CLASSES4 = {
1159
- solid: {
1160
- warning: "bg-warning text-warning-600 border-none focus-visible:outline-none",
1161
- success: "bg-success text-success-800 border-none focus-visible:outline-none",
1162
- info: "bg-info text-info-600 border-none focus-visible:outline-none"
1163
- },
1164
- outlined: {
1165
- warning: "bg-warning text-warning-600 border border-warning-300 focus-visible:outline-none",
1166
- success: "bg-success text-success-800 border border-success-200 focus-visible:outline-none",
1167
- info: "bg-info text-info-600 border border-info-600 focus-visible:outline-none"
1168
- }
1169
- };
1170
- var iconMap = {
1171
- success: import_phosphor_react4.CheckCircle,
1172
- info: import_phosphor_react4.Info,
1173
- warning: import_phosphor_react4.WarningCircle
1174
- };
1175
- var Toast = ({
1176
- variant = "outlined",
1177
- action = "success",
1178
- className = "",
1179
- onClose,
1180
- title,
1181
- description,
1182
- position = "default",
1183
- ...props
1184
- }) => {
1185
- const variantClasses = VARIANT_ACTION_CLASSES4[variant][action];
1186
- const positionClasses = {
1187
- "top-left": "fixed top-4 left-4",
1188
- "top-center": "fixed top-4 left-1/2 transform -translate-x-1/2",
1189
- "top-right": "fixed top-4 right-4",
1190
- "bottom-left": "fixed bottom-4 left-4",
1191
- "bottom-center": "fixed bottom-4 left-1/2 transform -translate-x-1/2",
1192
- "bottom-right": "fixed bottom-4 right-4",
1193
- default: ""
1194
- };
1195
- const IconAction = iconMap[action] || iconMap["success"];
1196
- const baseClasses = "max-w-[390px] w-full flex flex-row items-start justify-between shadow-lg rounded-lg border p-4 gap-6 group";
1197
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1198
- "div",
1199
- {
1200
- role: "alert",
1201
- "aria-live": "assertive",
1202
- "aria-atomic": "true",
1203
- className: `${baseClasses} ${positionClasses[position]} ${variantClasses} ${className}`,
1204
- ...props,
1205
- children: [
1206
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-row items-start gap-3", children: [
1207
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "mt-1", "data-testid": `toast-icon-${action}`, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconAction, {}) }),
1208
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col items-start justify-start", children: [
1209
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "font-semibold text-md", children: title }),
1210
- description && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { className: "text-md text-text-900", children: description })
1211
- ] })
1212
- ] }),
1213
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1214
- "button",
1215
- {
1216
- onClick: onClose,
1217
- "aria-label": "Dismiss notification",
1218
- className: "text-background-500 cursor-pointer opacity-0 group-hover:opacity-100 transition-opacity",
1219
- children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_phosphor_react4.X, {})
1220
- }
1221
- )
1222
- ]
1223
- }
1224
- );
1225
- };
1226
-
1227
- // src/components/Toast/utils/ToastStore.ts
1228
- var import_zustand = require("zustand");
1229
- var useToastStore = (0, import_zustand.create)((set) => ({
1230
- toasts: [],
1231
- addToast: (toast) => {
1232
- const id = crypto.randomUUID();
1233
- set((state) => ({
1234
- toasts: [...state.toasts, { id, ...toast }]
1235
- }));
1236
- },
1237
- removeToast: (id) => {
1238
- set((state) => ({
1239
- toasts: state.toasts.filter((t) => t.id !== id)
1240
- }));
1241
- }
1242
- }));
1243
-
1244
- // src/components/Toast/utils/Toaster.tsx
1245
- var import_jsx_runtime14 = require("react/jsx-runtime");
1246
- var Toaster = () => {
1247
- const toasts = useToastStore((state) => state.toasts);
1248
- const removeToast = useToastStore((state) => state.removeToast);
1249
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_jsx_runtime14.Fragment, { children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1250
- Toast,
1251
- {
1252
- title: toast.title,
1253
- description: toast.description,
1254
- variant: toast.variant,
1255
- action: toast.action,
1256
- position: toast.position,
1257
- onClose: () => removeToast(toast.id)
1258
- },
1259
- toast.id
1260
- )) });
1261
- };
1276
+ var DropdownMenu_default = DropdownMenu;
1262
1277
  // Annotate the CommonJS export names for ESM import in node:
1263
1278
  0 && (module.exports = {
1264
1279
  Alert,
@@ -1282,3 +1297,4 @@ var Toaster = () => {
1282
1297
  Toaster,
1283
1298
  useToastStore
1284
1299
  });
1300
+ //# sourceMappingURL=index.js.map