@esic-lab/data-core-ui 0.0.12 → 0.0.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.css CHANGED
@@ -24,14 +24,20 @@
24
24
  "Courier New",
25
25
  monospace;
26
26
  --color-red-100: #fac5c3;
27
+ --color-red-400: #f16965;
27
28
  --color-red-500: #ee443f;
29
+ --color-red-600: #d93e39;
30
+ --color-green-500: #43b75d;
28
31
  --color-blue-500: #0095ff;
29
32
  --color-gray-200: #e5e7ea;
30
33
  --color-gray-300: #d2d5db;
31
34
  --color-gray-400: #9ea2ae;
35
+ --color-gray-600: #4d5461;
32
36
  --color-black: #000;
33
37
  --color-white: #fff;
34
38
  --spacing: 0.25rem;
39
+ --font-weight-semibold: 600;
40
+ --radius-md: 0.375rem;
35
41
  --animate-spin: spin 1s linear infinite;
36
42
  --default-transition-duration: 150ms;
37
43
  --default-transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
@@ -230,12 +236,24 @@
230
236
  }
231
237
  }
232
238
  @layer utilities {
239
+ .relative {
240
+ position: relative;
241
+ }
233
242
  .static {
234
243
  position: static;
235
244
  }
245
+ .top-4 {
246
+ top: calc(var(--spacing) * 4);
247
+ }
236
248
  .mt-\[10px\] {
237
249
  margin-top: 10px;
238
250
  }
251
+ .mr-\[8px\] {
252
+ margin-right: 8px;
253
+ }
254
+ .mb-\[8px\] {
255
+ margin-bottom: 8px;
256
+ }
239
257
  .ml-auto {
240
258
  margin-left: auto;
241
259
  }
@@ -248,6 +266,9 @@
248
266
  .flex {
249
267
  display: flex;
250
268
  }
269
+ .grid {
270
+ display: grid;
271
+ }
251
272
  .hidden {
252
273
  display: none;
253
274
  }
@@ -269,9 +290,15 @@
269
290
  .h-\[24px\] {
270
291
  height: 24px;
271
292
  }
293
+ .h-\[28px\] {
294
+ height: 28px;
295
+ }
272
296
  .h-\[30px\] {
273
297
  height: 30px;
274
298
  }
299
+ .h-\[35px\] {
300
+ height: 35px;
301
+ }
275
302
  .h-\[40px\] {
276
303
  height: 40px;
277
304
  }
@@ -281,6 +308,9 @@
281
308
  .h-\[47px\] {
282
309
  height: 47px;
283
310
  }
311
+ .h-\[700px\] {
312
+ height: 700px;
313
+ }
284
314
  .h-full {
285
315
  height: 100%;
286
316
  }
@@ -305,12 +335,21 @@
305
335
  .w-\[40px\] {
306
336
  width: 40px;
307
337
  }
338
+ .w-\[80px\] {
339
+ width: 80px;
340
+ }
341
+ .w-\[100px\] {
342
+ width: 100px;
343
+ }
308
344
  .w-\[202px\] {
309
345
  width: 202px;
310
346
  }
311
347
  .w-\[242px\] {
312
348
  width: 242px;
313
349
  }
350
+ .w-\[1500px\] {
351
+ width: 1500px;
352
+ }
314
353
  .w-full {
315
354
  width: 100%;
316
355
  }
@@ -343,6 +382,9 @@
343
382
  .cursor-pointer {
344
383
  cursor: pointer;
345
384
  }
385
+ .\[grid-template-columns\:repeat\(var\(--cols\)\,minmax\(0\,1fr\)\)\] {
386
+ grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
387
+ }
346
388
  .flex-col {
347
389
  flex-direction: column;
348
390
  }
@@ -364,6 +406,17 @@
364
406
  .gap-\[20px\] {
365
407
  gap: 20px;
366
408
  }
409
+ .truncate {
410
+ overflow: hidden;
411
+ text-overflow: ellipsis;
412
+ white-space: nowrap;
413
+ }
414
+ .rounded {
415
+ border-radius: 0.25rem;
416
+ }
417
+ .rounded-\[2px\] {
418
+ border-radius: 2px;
419
+ }
367
420
  .rounded-\[6px\] {
368
421
  border-radius: 6px;
369
422
  }
@@ -373,6 +426,9 @@
373
426
  .rounded-full {
374
427
  border-radius: calc(infinity * 1px);
375
428
  }
429
+ .rounded-md {
430
+ border-radius: var(--radius-md);
431
+ }
376
432
  .border {
377
433
  border-style: var(--tw-border-style);
378
434
  border-width: 1px;
@@ -385,6 +441,14 @@
385
441
  border-style: var(--tw-border-style);
386
442
  border-width: 1px;
387
443
  }
444
+ .border-b {
445
+ border-bottom-style: var(--tw-border-style);
446
+ border-bottom-width: 1px;
447
+ }
448
+ .border-l-\[10px\] {
449
+ border-left-style: var(--tw-border-style);
450
+ border-left-width: 10px;
451
+ }
388
452
  .border-solid {
389
453
  --tw-border-style: solid;
390
454
  border-style: solid;
@@ -392,6 +456,15 @@
392
456
  .border-black {
393
457
  border-color: var(--color-black);
394
458
  }
459
+ .border-gray-200 {
460
+ border-color: var(--color-gray-200);
461
+ }
462
+ .border-green-500 {
463
+ border-color: var(--color-green-500);
464
+ }
465
+ .border-red-600 {
466
+ border-color: var(--color-red-600);
467
+ }
395
468
  .border-t-transparent {
396
469
  border-top-color: transparent;
397
470
  }
@@ -413,6 +486,9 @@
413
486
  .bg-primary-500 {
414
487
  background-color: var(--color-primary-500);
415
488
  }
489
+ .bg-red-400 {
490
+ background-color: var(--color-red-400);
491
+ }
416
492
  .bg-red-500 {
417
493
  background-color: var(--color-red-500);
418
494
  }
@@ -422,15 +498,37 @@
422
498
  .p-1 {
423
499
  padding: calc(var(--spacing) * 1);
424
500
  }
501
+ .p-\[4px\] {
502
+ padding: 4px;
503
+ }
425
504
  .p-\[10px\] {
426
505
  padding: 10px;
427
506
  }
507
+ .px-\[16px\] {
508
+ padding-inline: 16px;
509
+ }
510
+ .py-\[8px\] {
511
+ padding-block: 8px;
512
+ }
513
+ .text-left {
514
+ text-align: left;
515
+ }
428
516
  .text-\[20px\] {
429
517
  font-size: 20px;
430
518
  }
519
+ .font-semibold {
520
+ --tw-font-weight: var(--font-weight-semibold);
521
+ font-weight: var(--font-weight-semibold);
522
+ }
431
523
  .text-black {
432
524
  color: var(--color-black);
433
525
  }
526
+ .text-gray-600 {
527
+ color: var(--color-gray-600);
528
+ }
529
+ .text-red-600 {
530
+ color: var(--color-red-600);
531
+ }
434
532
  .text-white {
435
533
  color: var(--color-white);
436
534
  }
@@ -449,6 +547,10 @@
449
547
  var(--tw-ring-shadow),
450
548
  var(--tw-shadow);
451
549
  }
550
+ .outline {
551
+ outline-style: var(--tw-outline-style);
552
+ outline-width: 1px;
553
+ }
452
554
  .transition-all {
453
555
  transition-property: all;
454
556
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -573,6 +675,9 @@
573
675
  border-color: var(--color-gray-200, currentcolor);
574
676
  }
575
677
  }
678
+ ::-ms-reveal {
679
+ display: none;
680
+ }
576
681
  .headline-1 {
577
682
  font-family: "Kanit";
578
683
  font-size: 48px;
@@ -713,6 +818,52 @@
713
818
  font-weight: 600;
714
819
  line-height: 12px;
715
820
  }
821
+ .fc-toolbar-title {
822
+ font-family: "Kanit";
823
+ font-size: 24px;
824
+ font-style: normal;
825
+ font-weight: 600;
826
+ line-height: 28px;
827
+ }
828
+ .fc-col-header-cell-cushion {
829
+ font-family: "Kanit";
830
+ font-size: 14px;
831
+ font-style: normal;
832
+ font-weight: 400;
833
+ line-height: 20px;
834
+ }
835
+ .fc-daygrid-day {
836
+ height: 100px;
837
+ }
838
+ .fc-daygrid-day-number {
839
+ font-family: "Kanit";
840
+ font-size: 12px;
841
+ font-style: normal;
842
+ font-weight: 400;
843
+ line-height: 16px;
844
+ }
845
+ .fc-daygrid-day-top {
846
+ display: flex;
847
+ justify-content: center;
848
+ }
849
+ .fc-event {
850
+ border: none;
851
+ background: none;
852
+ }
853
+ .fc-daygrid-more-link {
854
+ font-family: "Kanit";
855
+ font-size: 12px;
856
+ font-style: normal;
857
+ font-weight: 400;
858
+ line-height: 16px;
859
+ }
860
+ .fc-popover-title {
861
+ font-family: "Kanit";
862
+ font-size: 12px;
863
+ font-style: normal;
864
+ font-weight: 400;
865
+ line-height: 16px;
866
+ }
716
867
  @property --tw-translate-x { syntax: "*"; inherits: false; initial-value: 0; }
717
868
  @property --tw-translate-y { syntax: "*"; inherits: false; initial-value: 0; }
718
869
  @property --tw-translate-z { syntax: "*"; inherits: false; initial-value: 0; }
@@ -725,6 +876,7 @@
725
876
  @property --tw-skew-x { syntax: "*"; inherits: false; }
726
877
  @property --tw-skew-y { syntax: "*"; inherits: false; }
727
878
  @property --tw-border-style { syntax: "*"; inherits: false; initial-value: solid; }
879
+ @property --tw-font-weight { syntax: "*"; inherits: false; }
728
880
  @property --tw-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
729
881
  @property --tw-shadow-color { syntax: "*"; inherits: false; }
730
882
  @property --tw-shadow-alpha { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@@ -739,6 +891,7 @@
739
891
  @property --tw-ring-offset-width { syntax: "<length>"; inherits: false; initial-value: 0px; }
740
892
  @property --tw-ring-offset-color { syntax: "*"; inherits: false; initial-value: #fff; }
741
893
  @property --tw-ring-offset-shadow { syntax: "*"; inherits: false; initial-value: 0 0 #0000; }
894
+ @property --tw-outline-style { syntax: "*"; inherits: false; initial-value: solid; }
742
895
  @property --tw-duration { syntax: "*"; inherits: false; }
743
896
  @keyframes spin {
744
897
  to {
@@ -763,6 +916,7 @@
763
916
  --tw-skew-x: initial;
764
917
  --tw-skew-y: initial;
765
918
  --tw-border-style: solid;
919
+ --tw-font-weight: initial;
766
920
  --tw-shadow: 0 0 #0000;
767
921
  --tw-shadow-color: initial;
768
922
  --tw-shadow-alpha: 100%;
@@ -777,6 +931,7 @@
777
931
  --tw-ring-offset-width: 0px;
778
932
  --tw-ring-offset-color: #fff;
779
933
  --tw-ring-offset-shadow: 0 0 #0000;
934
+ --tw-outline-style: solid;
780
935
  --tw-duration: initial;
781
936
  }
782
937
  }
package/dist/index.d.mts CHANGED
@@ -1,4 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import React$1 from 'react';
3
+ import { EventSourceInput } from '@fullcalendar/core';
2
4
 
3
5
  type ColorScale = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;
4
6
  type BaseColor = "primary" | "gray" | "green" | "red" | "yellow" | "blue";
@@ -95,7 +97,35 @@ declare function MenuNavBar({ menus, onClick }: MenuNavBarProps): react_jsx_runt
95
97
 
96
98
  interface TopNavBarProps {
97
99
  onClickNoti: () => void;
100
+ logo?: React.ReactNode;
98
101
  }
99
- declare function TopNavBar({ onClickNoti }: TopNavBarProps): react_jsx_runtime.JSX.Element;
102
+ declare function TopNavBar({ onClickNoti, logo }: TopNavBarProps): react_jsx_runtime.JSX.Element;
100
103
 
101
- export { Checkbox, CheckboxGroup, GhostButton, Loader, MenuNavBar, type MenuNavBarProps, PrimaryButton, Radio, RadioGroup, SecondaryButton, Switch, TopNavBar };
104
+ interface Column<T> {
105
+ header: string;
106
+ accessor: keyof T | ((row: T) => React$1.ReactNode);
107
+ }
108
+ interface DataTableProps<T> {
109
+ columns: Column<T>[];
110
+ data: T[];
111
+ }
112
+ declare function DataTable<T>({ columns, data }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
113
+
114
+ interface CalendarProps {
115
+ events: EventSourceInput | undefined;
116
+ }
117
+ declare function Calendar({ events }: CalendarProps): react_jsx_runtime.JSX.Element;
118
+
119
+ interface TextInputProps {
120
+ label: string;
121
+ placeholder?: string;
122
+ type?: "text" | "password";
123
+ maxLength?: number;
124
+ required?: boolean;
125
+ error?: string;
126
+ value?: string;
127
+ onChange: (value: string) => void;
128
+ }
129
+ declare function TextInput({ label, placeholder, type, maxLength, required, error, value, onChange, }: TextInputProps): react_jsx_runtime.JSX.Element;
130
+
131
+ export { Calendar, Checkbox, CheckboxGroup, DataTable, GhostButton, Loader, MenuNavBar, type MenuNavBarProps, PrimaryButton, Radio, RadioGroup, SecondaryButton, Switch, TextInput, TopNavBar };
package/dist/index.js CHANGED
@@ -47,7 +47,7 @@ function PrimaryButton({
47
47
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
48
48
  "button",
49
49
  {
50
- className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer ${bgColor} text-${textColor}`,
50
+ className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer ${bgColor} text-${textColor} body-1`,
51
51
  onClick,
52
52
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex justify-center items-center gap-[10px]", children: [
53
53
  iconLeft && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: iconLeft }),
@@ -64,7 +64,7 @@ function SecondaryButton({ title, onClick, iconLeft, iconRight }) {
64
64
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
65
65
  "button",
66
66
  {
67
- className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] border-[1px] border-black cursor-pointer bg-white text-black`,
67
+ className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] border-[1px] border-black cursor-pointer bg-white text-black body-1`,
68
68
  onClick,
69
69
  children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex justify-center items-center gap-[10px]", children: [
70
70
  iconLeft && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: iconLeft }),
@@ -81,7 +81,7 @@ function GhostButton({ title, onClick, iconLeft, iconRight }) {
81
81
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
82
82
  "button",
83
83
  {
84
- className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer bg-[#E9E9E9]`,
84
+ className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer bg-[#E9E9E9] body-1`,
85
85
  onClick,
86
86
  children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex justify-center items-center gap-[10px]", children: [
87
87
  iconLeft && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { children: iconLeft }),
@@ -125,7 +125,7 @@ function Checkbox({ label, checked, onChange }) {
125
125
  )
126
126
  }
127
127
  ),
128
- label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { children: label })
128
+ label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("p", { className: "body-1", children: label })
129
129
  ] });
130
130
  }
131
131
 
@@ -153,7 +153,7 @@ var import_jsx_runtime8 = require("react/jsx-runtime");
153
153
  function RadioGroup({ options, value, onChange, alignment = "horizontal" }) {
154
154
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("label", { className: "flex items-center gap-2 cursor-pointer", children: [
155
155
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value) }),
156
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: opt.label })
156
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "body-1", children: opt.label })
157
157
  ] }, opt.value)) });
158
158
  }
159
159
 
@@ -205,16 +205,15 @@ function MenuNavBar({ menus, onClick }) {
205
205
  ] }, `menu_${menu.title}`)) });
206
206
  }
207
207
 
208
- // src/assets/STO-logo.svg
209
- var STO_logo_default = "./STO-logo-ADYYAPS3.svg";
210
-
211
208
  // src/NavBar/TopNavBar/TopNavBar.tsx
212
209
  var import_icons_react2 = require("@tabler/icons-react");
213
210
  var import_jsx_runtime11 = require("react/jsx-runtime");
211
+ var import_meta = {};
212
+ var STOLogo = new URL("../../assets/STO-logo.svg", import_meta.url).href;
214
213
  function TopNavBar({ onClickNoti }) {
215
214
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "w-full h-full flex", children: [
216
215
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
217
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: STO_logo_default }),
216
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("img", { src: STOLogo }),
218
217
  /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { className: "subtitle-1", children: "Project Management" })
219
218
  ] }),
220
219
  /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
package/dist/index.mjs CHANGED
@@ -11,7 +11,7 @@ function PrimaryButton({
11
11
  return /* @__PURE__ */ jsx(
12
12
  "button",
13
13
  {
14
- className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer ${bgColor} text-${textColor}`,
14
+ className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer ${bgColor} text-${textColor} body-1`,
15
15
  onClick,
16
16
  children: /* @__PURE__ */ jsxs("div", { className: "flex justify-center items-center gap-[10px]", children: [
17
17
  iconLeft && /* @__PURE__ */ jsx("div", { children: iconLeft }),
@@ -28,7 +28,7 @@ function SecondaryButton({ title, onClick, iconLeft, iconRight }) {
28
28
  return /* @__PURE__ */ jsx2(
29
29
  "button",
30
30
  {
31
- className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] border-[1px] border-black cursor-pointer bg-white text-black`,
31
+ className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] border-[1px] border-black cursor-pointer bg-white text-black body-1`,
32
32
  onClick,
33
33
  children: /* @__PURE__ */ jsxs2("div", { className: "flex justify-center items-center gap-[10px]", children: [
34
34
  iconLeft && /* @__PURE__ */ jsx2("div", { children: iconLeft }),
@@ -45,7 +45,7 @@ function GhostButton({ title, onClick, iconLeft, iconRight }) {
45
45
  return /* @__PURE__ */ jsx3(
46
46
  "button",
47
47
  {
48
- className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer bg-[#E9E9E9]`,
48
+ className: `flex justify-center w-full h-[42px] rounded-[6px] p-[10px] cursor-pointer bg-[#E9E9E9] body-1`,
49
49
  onClick,
50
50
  children: /* @__PURE__ */ jsxs3("div", { className: "flex justify-center items-center gap-[10px]", children: [
51
51
  iconLeft && /* @__PURE__ */ jsx3("div", { children: iconLeft }),
@@ -89,7 +89,7 @@ function Checkbox({ label, checked, onChange }) {
89
89
  )
90
90
  }
91
91
  ),
92
- label && /* @__PURE__ */ jsx5("p", { children: label })
92
+ label && /* @__PURE__ */ jsx5("p", { className: "body-1", children: label })
93
93
  ] });
94
94
  }
95
95
 
@@ -117,7 +117,7 @@ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
117
117
  function RadioGroup({ options, value, onChange, alignment = "horizontal" }) {
118
118
  return /* @__PURE__ */ jsx8("div", { className: `flex gap-2 ${alignment === "vertical" ? "flex-col" : ""}`, children: options.map((opt) => /* @__PURE__ */ jsxs5("label", { className: "flex items-center gap-2 cursor-pointer", children: [
119
119
  /* @__PURE__ */ jsx8(Radio, { selected: value === opt.value, onChange: () => onChange(opt.value) }),
120
- /* @__PURE__ */ jsx8("span", { children: opt.label })
120
+ /* @__PURE__ */ jsx8("span", { className: "body-1", children: opt.label })
121
121
  ] }, opt.value)) });
122
122
  }
123
123
 
@@ -169,16 +169,13 @@ function MenuNavBar({ menus, onClick }) {
169
169
  ] }, `menu_${menu.title}`)) });
170
170
  }
171
171
 
172
- // src/assets/STO-logo.svg
173
- var STO_logo_default = "./STO-logo-ADYYAPS3.svg";
174
-
175
172
  // src/NavBar/TopNavBar/TopNavBar.tsx
176
173
  import { IconBellRinging } from "@tabler/icons-react";
177
174
  import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
178
- function TopNavBar({ onClickNoti }) {
175
+ function TopNavBar({ onClickNoti, logo }) {
179
176
  return /* @__PURE__ */ jsxs8("div", { className: "w-full h-full flex", children: [
180
177
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-[20px] p-[10px]", children: [
181
- /* @__PURE__ */ jsx11("img", { src: STO_logo_default }),
178
+ logo,
182
179
  /* @__PURE__ */ jsx11("p", { className: "subtitle-1", children: "Project Management" })
183
180
  ] }),
184
181
  /* @__PURE__ */ jsxs8("div", { className: "flex items-center ml-auto gap-[20px] p-[10px]", children: [
@@ -188,9 +185,205 @@ function TopNavBar({ onClickNoti }) {
188
185
  ] })
189
186
  ] });
190
187
  }
188
+
189
+ // src/Table/DataTable/DataTable.tsx
190
+ import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
191
+ function DataTable({ columns, data }) {
192
+ const cols = Math.max(1, columns.length);
193
+ const gridClass = "grid [grid-template-columns:repeat(var(--cols),minmax(0,1fr))]";
194
+ return /* @__PURE__ */ jsxs9("div", { className: "border rounded-md", children: [
195
+ /* @__PURE__ */ jsx12("div", { className: `${gridClass} font-semibold border-b border-gray-200`, style: { ["--cols"]: cols }, children: columns.map((col, i) => /* @__PURE__ */ jsx12("div", { className: "py-[8px] px-[16px] body-4 truncate", children: col.header }, i)) }),
196
+ data.map((row, i) => /* @__PURE__ */ jsx12(
197
+ "div",
198
+ {
199
+ className: `${gridClass} border-b border-gray-200 items-center`,
200
+ style: { ["--cols"]: cols },
201
+ children: columns.map((col, c) => /* @__PURE__ */ jsx12("div", { className: "py-[8px] px-[16px] body-3 truncate", children: typeof col.accessor === "function" ? col.accessor(row) : String(row[col.accessor]) }, c))
202
+ },
203
+ i
204
+ ))
205
+ ] });
206
+ }
207
+
208
+ // src/Calendar/Calendar/Calendar.tsx
209
+ import { useEffect, useRef, useState } from "react";
210
+ import FullCalendar from "@fullcalendar/react";
211
+ import dayGridPlugin from "@fullcalendar/daygrid";
212
+ import timeGridPlugin from "@fullcalendar/timegrid";
213
+ import interactionPlugin from "@fullcalendar/interaction";
214
+ import enLocale from "@fullcalendar/core/locales/en-gb";
215
+ import { IconChevronLeft, IconChevronRight } from "@tabler/icons-react";
216
+ import { Fragment, jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
217
+ function Calendar({ events }) {
218
+ const calendarRef = useRef(null);
219
+ const [monthTitle, setMonthTitle] = useState("");
220
+ const updateTitle = () => {
221
+ const calendarApi = calendarRef.current?.getApi();
222
+ if (calendarApi) {
223
+ setMonthTitle(calendarApi.view.title);
224
+ }
225
+ };
226
+ const changeView = (viewName) => {
227
+ const calendarApi = calendarRef.current?.getApi();
228
+ calendarApi?.changeView(viewName);
229
+ };
230
+ useEffect(() => {
231
+ updateTitle();
232
+ }, []);
233
+ return /* @__PURE__ */ jsxs10("div", { className: "fc w-full h-full", children: [
234
+ /* @__PURE__ */ jsxs10("div", { className: "flex mb-[8px]", children: [
235
+ /* @__PURE__ */ jsx13("p", { className: "headline-5", children: monthTitle }),
236
+ /* @__PURE__ */ jsxs10("div", { className: "flex gap-[10px] ml-auto", children: [
237
+ /* @__PURE__ */ jsx13(
238
+ "p",
239
+ {
240
+ className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
241
+ onClick: () => {
242
+ calendarRef.current.getApi().today();
243
+ updateTitle();
244
+ },
245
+ children: "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49"
246
+ }
247
+ ),
248
+ /* @__PURE__ */ jsx13(
249
+ "p",
250
+ {
251
+ className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
252
+ onClick: () => {
253
+ changeView("dayGridMonth");
254
+ updateTitle();
255
+ },
256
+ children: "Month"
257
+ }
258
+ ),
259
+ /* @__PURE__ */ jsx13(
260
+ "p",
261
+ {
262
+ className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
263
+ onClick: () => {
264
+ changeView("dayGridWeek");
265
+ updateTitle();
266
+ },
267
+ children: "Week"
268
+ }
269
+ ),
270
+ /* @__PURE__ */ jsx13(
271
+ "p",
272
+ {
273
+ className: "w-[80px] h-[35px] border-[1px] flex justify-center items-center rounded-[2px] body-3 cursor-pointer",
274
+ onClick: () => {
275
+ changeView("timeGridDay");
276
+ updateTitle();
277
+ },
278
+ children: "Day"
279
+ }
280
+ ),
281
+ /* @__PURE__ */ jsx13(
282
+ "button",
283
+ {
284
+ className: "cursor-pointer",
285
+ onClick: () => {
286
+ calendarRef.current?.getApi().prev();
287
+ updateTitle();
288
+ },
289
+ children: /* @__PURE__ */ jsx13(IconChevronLeft, {})
290
+ }
291
+ ),
292
+ /* @__PURE__ */ jsx13(
293
+ "button",
294
+ {
295
+ className: "cursor-pointer",
296
+ onClick: () => {
297
+ calendarRef.current?.getApi().next();
298
+ updateTitle();
299
+ },
300
+ children: /* @__PURE__ */ jsx13(IconChevronRight, {})
301
+ }
302
+ )
303
+ ] })
304
+ ] }),
305
+ /* @__PURE__ */ jsx13(
306
+ FullCalendar,
307
+ {
308
+ ref: calendarRef,
309
+ plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
310
+ events,
311
+ locale: enLocale,
312
+ slotLabelFormat: {
313
+ hour: "numeric",
314
+ minute: "2-digit"
315
+ },
316
+ firstDay: 0,
317
+ fixedWeekCount: false,
318
+ initialView: "dayGridMonth",
319
+ headerToolbar: false,
320
+ dayMaxEventRows: 4,
321
+ moreLinkText: "\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",
322
+ editable: true,
323
+ eventDrop: (info) => {
324
+ console.log("Event \u0E02\u0E2D\u0E07\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48:", info.event.startStr);
325
+ },
326
+ eventContent: (arg) => {
327
+ return /* @__PURE__ */ jsx13(Fragment, { children: /* @__PURE__ */ jsx13("div", { className: "relative top-4 flex items-center h-[28px] p-[4px] border-green-500 border-l-[10px] bg-red-400 rounded text-left text-white caption-1", children: arg.event.title }) });
328
+ }
329
+ }
330
+ )
331
+ ] });
332
+ }
333
+
334
+ // src/Input/TextInput/TextInput.tsx
335
+ import { IconEye, IconEyeOff } from "@tabler/icons-react";
336
+ import { useState as useState2 } from "react";
337
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
338
+ function TextInput({
339
+ label,
340
+ placeholder,
341
+ type = "text",
342
+ maxLength,
343
+ required,
344
+ error,
345
+ value,
346
+ onChange
347
+ }) {
348
+ const [showPassword, setShowPassword] = useState2(false);
349
+ const onShowPassword = () => {
350
+ setShowPassword(!showPassword);
351
+ };
352
+ const inputType = type === "password" ? showPassword ? "text" : "password" : "text";
353
+ return /* @__PURE__ */ jsxs11("div", { children: [
354
+ /* @__PURE__ */ jsxs11("p", { className: "body-1 mb-[8px]", children: [
355
+ label,
356
+ required && /* @__PURE__ */ jsx14("span", { className: "text-red-600", children: "\xA0*" })
357
+ ] }),
358
+ /* @__PURE__ */ jsxs11(
359
+ "div",
360
+ {
361
+ className: `border-[1px] rounded-[8px] w-full h-[40px] flex justify-center items-center ${error ? "border-red-600" : ""}`,
362
+ children: [
363
+ /* @__PURE__ */ jsx14(
364
+ "input",
365
+ {
366
+ className: "w-full h-full px-[16px]",
367
+ style: { outline: "none" },
368
+ placeholder,
369
+ type: inputType,
370
+ maxLength,
371
+ value,
372
+ onChange: (e) => onChange(e.target.value)
373
+ }
374
+ ),
375
+ type === "password" && (showPassword ? /* @__PURE__ */ jsx14(IconEye, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }) : /* @__PURE__ */ jsx14(IconEyeOff, { className: "text-gray-600 mr-[8px] cursor-pointer", onClick: onShowPassword }))
376
+ ]
377
+ }
378
+ ),
379
+ error && /* @__PURE__ */ jsx14("p", { className: "text-red-600 body-1", children: error })
380
+ ] });
381
+ }
191
382
  export {
383
+ Calendar,
192
384
  Checkbox,
193
385
  CheckboxGroup,
386
+ DataTable,
194
387
  GhostButton,
195
388
  Loader,
196
389
  MenuNavBar,
@@ -199,5 +392,6 @@ export {
199
392
  RadioGroup,
200
393
  SecondaryButton,
201
394
  Switch,
395
+ TextInput,
202
396
  TopNavBar
203
397
  };