next-helios-fe 1.1.5 → 1.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.1.5",
3
+ "version": "1.1.8",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,11 +14,7 @@ interface ModalProps {
14
14
  disableClose?: boolean;
15
15
  hideFooter?: boolean;
16
16
  };
17
- action?: {
18
- variant?: "primary" | "secondary" | "success" | "warning" | "danger";
19
- label?: string;
20
- onClick: () => void;
21
- };
17
+ action?: React.ReactNode;
22
18
  open: boolean;
23
19
  onClose: (open: boolean) => void;
24
20
  }
@@ -92,6 +88,7 @@ export const Modal: React.FC<ModalProps> = ({
92
88
  <div className="flex justify-end items-center gap-4 px-6 py-2">
93
89
  {!options?.disableClose && (
94
90
  <Button
91
+ type="button"
95
92
  options={{
96
93
  width: "fit",
97
94
  height: "short",
@@ -104,18 +101,7 @@ export const Modal: React.FC<ModalProps> = ({
104
101
  Close
105
102
  </Button>
106
103
  )}
107
- {action?.label && (
108
- <Button
109
- options={{
110
- variant: action?.variant ?? "primary",
111
- width: "fit",
112
- height: "short",
113
- }}
114
- onClick={action?.onClick}
115
- >
116
- {action?.label}
117
- </Button>
118
- )}
104
+ {action}
119
105
  </div>
120
106
  )}
121
107
  </div>
@@ -54,9 +54,9 @@ export const Dialog: React.FC<DialogProps> = ({
54
54
 
55
55
  return (
56
56
  <div
57
- className={`absolute top-0 left-0 w-dvw h-dvh z-40 ${
58
- !open && "hidden"
59
- } ${options?.timeout ? "pointer-events-none" : "bg-black/30"}`}
57
+ className={`absolute top-0 left-0 w-dvw h-dvh z-40 ${!open && "hidden"} ${
58
+ options?.timeout ? "pointer-events-none" : "bg-black/30"
59
+ }`}
60
60
  >
61
61
  <div className="flex justify-center mt-4">
62
62
  <div
@@ -66,8 +66,11 @@ export const Dialog: React.FC<DialogProps> = ({
66
66
  >
67
67
  <div className="flex-1 h-full px-4">{children}</div>
68
68
  <div className="flex justify-end gap-4 px-4">
69
- <button className={actionVariant}>{action.label}</button>
69
+ <button type="button" className={actionVariant}>
70
+ {action.label}
71
+ </button>
70
72
  <button
73
+ type="button"
71
74
  className="text-danger hover:text-danger-dark hover:underline"
72
75
  onClick={() => {
73
76
  onClose(false);
@@ -21,7 +21,7 @@ export const SyntaxHighlighter: React.FC<SyntaxHighlighterProps> = ({
21
21
  onClipboardClick,
22
22
  }) => {
23
23
  return (
24
- <div className="relative w-full border rounded-md overflow-hidden">
24
+ <div className="relative w-full border rounded-md text-sm overflow-hidden">
25
25
  <SH
26
26
  language={language}
27
27
  style={theme === "light" ? atomOneLight : atomOneDark}
@@ -38,7 +38,10 @@ export const SyntaxHighlighter: React.FC<SyntaxHighlighterProps> = ({
38
38
  onClipboardClick && onClipboardClick(codeString);
39
39
  }}
40
40
  >
41
- <Icon icon="fluent:clipboard-text-ltr-32-regular" />
41
+ <Icon
42
+ icon="fluent:clipboard-text-ltr-32-regular"
43
+ className="text-base"
44
+ />
42
45
  </div>
43
46
  </div>
44
47
  );
@@ -291,6 +291,7 @@ export const Table: TableComponentProps = ({
291
291
  }}
292
292
  />
293
293
  <Button
294
+ type="button"
294
295
  options={{ variant: "primary", width: "fit" }}
295
296
  onClick={() => {
296
297
  exportToExcel(