@oneplatformdev/ui 0.0.1-beta.12 → 0.0.1-beta.121

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 (147) hide show
  1. package/Accordion/Accordion.d.ts +5 -3
  2. package/Accordion/Accordion.mjs +27 -24
  3. package/AlertDialog/AlertDialogRoot.d.ts +2 -2
  4. package/AlertDialog/AlertDialogRoot.mjs +7 -7
  5. package/Button/Button.mjs +11 -10
  6. package/Button/buttonVariants.mjs +14 -8
  7. package/Calendar/Calendar.mjs +3 -2
  8. package/Card/Card.d.ts +1 -1
  9. package/Card/Card.mjs +24 -23
  10. package/Checkbox/Checkbox.d.ts +5 -4
  11. package/Checkbox/Checkbox.mjs +48 -21
  12. package/Checkbox/Checkbox.types.d.ts +10 -0
  13. package/Checkbox/index.d.ts +1 -0
  14. package/Checkbox/index.mjs +3 -2
  15. package/Combobox/Combobox.d.ts +2 -2
  16. package/Combobox/Combobox.mjs +12 -123
  17. package/Combobox/Combobox.types.d.ts +36 -1
  18. package/Combobox/ComboboxOptionItem.d.ts +5 -0
  19. package/Combobox/ComboboxOptionItem.mjs +69 -0
  20. package/Combobox/ComboboxOptions.d.ts +4 -0
  21. package/Combobox/ComboboxOptions.mjs +12 -0
  22. package/Combobox/index.mjs +1 -1
  23. package/Combobox-CkGEIfTD.js +325 -0
  24. package/Command/Command.d.ts +1 -1
  25. package/Command/Command.mjs +15 -7
  26. package/DataTable/DataTable.d.ts +10 -3
  27. package/DataTable/DataTable.mjs +33 -33
  28. package/DataTable/DataTableColumnFilter.d.ts +4 -0
  29. package/DataTable/DataTableColumnFilter.mjs +31 -0
  30. package/DatePicker/DatePicker.mjs +2 -2
  31. package/Dialog/Dialog.d.ts +6 -3
  32. package/Dialog/Dialog.mjs +100 -64
  33. package/Dialog/DialogOverlayScope.d.ts +8 -0
  34. package/Dialog/DialogOverlayScope.mjs +7 -0
  35. package/Dialog/index.d.ts +1 -0
  36. package/Dialog/index.mjs +10 -8
  37. package/DropdownMenu/DropdownMenu.d.ts +2 -2
  38. package/DropdownMenu/DropdownMenu.mjs +30 -26
  39. package/Dropzone/Dropzone.d.ts +16 -10
  40. package/Dropzone/Dropzone.mjs +146 -113
  41. package/Dropzone/Dropzone.types.d.ts +33 -10
  42. package/Dropzone/DropzoneFilePreview.d.ts +4 -0
  43. package/Dropzone/DropzoneFilePreview.mjs +9 -0
  44. package/Dropzone/DropzoneSinglePickPreview.d.ts +10 -0
  45. package/Dropzone/DropzoneSinglePickPreview.mjs +44 -0
  46. package/Dropzone/DropzoneUtils.d.ts +5 -0
  47. package/Dropzone/DropzoneUtils.mjs +24 -0
  48. package/Dropzone/index.mjs +1 -1
  49. package/DropzoneFilePreview-Dhtv8F4u.js +67 -0
  50. package/Form/Form.d.ts +2 -2
  51. package/Form/Form.mjs +48 -45
  52. package/Form/FormRenderControl.d.ts +2 -3
  53. package/Form/FormRenderControl.mjs +10 -10
  54. package/Form/FormRenderControl.types.d.ts +5 -7
  55. package/FormCheckbox/FormCheckbox.d.ts +2 -3
  56. package/FormCheckbox/FormCheckbox.mjs +23 -23
  57. package/FormCheckbox/FormCheckbox.types.d.ts +3 -3
  58. package/FormCombobox/FormCombobox.d.ts +2 -2
  59. package/FormCombobox/FormCombobox.mjs +6 -6
  60. package/FormCombobox/FormCombobox.types.d.ts +2 -3
  61. package/FormDatePicker/FormDatePicker.d.ts +2 -2
  62. package/FormDatePicker/FormDatePicker.mjs +20 -18
  63. package/FormDatePicker/FormDatePicker.types.d.ts +2 -3
  64. package/FormDropzone/FormDropzone.d.ts +4 -0
  65. package/FormDropzone/FormDropzone.mjs +19 -0
  66. package/FormDropzone/FormDropzone.types.d.ts +6 -0
  67. package/FormDropzone/index.d.ts +2 -0
  68. package/FormDropzone/index.mjs +4 -0
  69. package/FormDropzone/package.json +7 -0
  70. package/FormInput/FormInput.d.ts +5 -3
  71. package/FormInput/FormInput.mjs +37 -16
  72. package/FormInput/FormInput.types.d.ts +2 -3
  73. package/FormRadio/FormRadio.d.ts +4 -0
  74. package/FormRadio/FormRadio.mjs +40 -0
  75. package/FormRadio/FormRadio.types.d.ts +6 -0
  76. package/FormRadio/index.d.ts +2 -0
  77. package/FormRadio/index.mjs +4 -0
  78. package/FormRadio/package.json +7 -0
  79. package/FormSelect/FormSelect.d.ts +2 -3
  80. package/FormSelect/FormSelect.mjs +19 -17
  81. package/FormSelect/FormSelect.types.d.ts +2 -3
  82. package/FormTextarea/FormTextarea.d.ts +2 -3
  83. package/FormTextarea/FormTextarea.mjs +13 -12
  84. package/FormTextarea/FormTextarea.types.d.ts +2 -3
  85. package/Input/Input.mjs +50 -38
  86. package/Input/Input.types.d.ts +6 -2
  87. package/Input/inputVariants.mjs +9 -3
  88. package/Label/Label.d.ts +2 -2
  89. package/Label/labelVariants.mjs +7 -4
  90. package/LazyLoader/LazyLoader.mjs +5 -4
  91. package/LoadedIcon/LoadedIcon.d.ts +11 -0
  92. package/LoadedIcon/LoadedIcon.mjs +27 -0
  93. package/LoadedIcon/index.d.ts +1 -0
  94. package/LoadedIcon/index.mjs +4 -0
  95. package/LoadedIcon/package.json +7 -0
  96. package/LoadingMask/LoadingMask.d.ts +4 -1
  97. package/LoadingMask/LoadingMask.mjs +18 -56
  98. package/LoadingMask/LoadingMask.types.d.ts +5 -0
  99. package/LoadingMask/RenderLoadingMask.d.ts +3 -0
  100. package/LoadingMask/RenderLoadingMask.mjs +108 -0
  101. package/LoadingMask/index.d.ts +2 -0
  102. package/LoadingMask/index.mjs +4 -2
  103. package/Popover/Popover.d.ts +3 -3
  104. package/Popover/Popover.mjs +30 -21
  105. package/Radio/Radio.d.ts +4 -0
  106. package/Radio/Radio.mjs +12 -0
  107. package/Radio/Radio.types.d.ts +11 -0
  108. package/Radio/index.d.ts +2 -0
  109. package/Radio/index.mjs +4 -0
  110. package/Radio/package.json +7 -0
  111. package/RadioGroup/RadioGroup.d.ts +9 -3
  112. package/RadioGroup/RadioGroup.mjs +37 -19
  113. package/RadioGroup/index.mjs +4 -3
  114. package/ScrollArea/ScrollArea.d.ts +2 -2
  115. package/ScrollArea/ScrollArea.mjs +26 -13
  116. package/Search/Search.d.ts +1 -2
  117. package/Search/Search.mjs +36 -21
  118. package/Search/Search.types.d.ts +1 -0
  119. package/Select/Select.mjs +94 -63
  120. package/Select/Select.types.d.ts +11 -3
  121. package/Select/SelectRoot.d.ts +2 -2
  122. package/Select/SelectRoot.mjs +29 -24
  123. package/Sheet/Sheet.d.ts +5 -2
  124. package/Sheet/Sheet.mjs +33 -33
  125. package/TablePagination/TablePagination.d.ts +16 -0
  126. package/TablePagination/TablePagination.mjs +74 -0
  127. package/TablePagination/index.d.ts +1 -0
  128. package/TablePagination/index.mjs +4 -0
  129. package/TablePagination/package.json +7 -0
  130. package/Tabs/Tabs.d.ts +3 -2
  131. package/Tabs/Tabs.mjs +20 -6
  132. package/Tabs/Tabs.types.d.ts +5 -2
  133. package/Tabs/index.mjs +8 -7
  134. package/Textarea/Textarea.d.ts +1 -1
  135. package/Textarea/Textarea.mjs +72 -15
  136. package/Textarea/Textarea.types.d.ts +16 -2
  137. package/Textarea/useAutosizeTextArea.d.ts +3 -0
  138. package/Textarea/useAutosizeTextArea.mjs +20 -0
  139. package/Toast/toastVariants.mjs +3 -3
  140. package/index.css +1 -1
  141. package/index.d.ts +3 -0
  142. package/index.mjs +304 -291
  143. package/package.json +6 -6
  144. package/tailwind.config.mjs +13 -13
  145. package/Dropzone/FilePreview.d.ts +0 -15
  146. package/Dropzone/FilePreview.mjs +0 -7
  147. package/FilePreview-C6IeuOqo.js +0 -40
@@ -1,14 +1,15 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
2
  import * as l from "react";
3
3
  import * as e from "@radix-ui/react-select";
4
- import { ChevronDown as i, ChevronUp as f, Check as u } from "lucide-react";
4
+ import { ChevronDown as i, ChevronUp as u, Check as h } from "lucide-react";
5
5
  import { cn as s } from "@oneplatformdev/utils";
6
- const v = e.Root, R = e.Group, C = e.Value, h = l.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ n(
6
+ const R = e.Root, C = e.Group, I = e.Value, w = l.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ n(
7
7
  e.Trigger,
8
8
  {
9
9
  ref: d,
10
10
  className: s(
11
- "flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
11
+ "flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
12
+ "[&>svg]:disabled:hidden",
12
13
  o
13
14
  ),
14
15
  ...a,
@@ -18,7 +19,7 @@ const v = e.Root, R = e.Group, C = e.Value, h = l.forwardRef(({ className: o, ch
18
19
  ]
19
20
  }
20
21
  ));
21
- h.displayName = e.Trigger.displayName;
22
+ w.displayName = e.Trigger.displayName;
22
23
  const c = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
23
24
  e.ScrollUpButton,
24
25
  {
@@ -28,7 +29,7 @@ const c = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
28
29
  o
29
30
  ),
30
31
  ...r,
31
- children: /* @__PURE__ */ t(f, { className: "h-4 w-4" })
32
+ children: /* @__PURE__ */ t(u, { className: "h-4 w-4" })
32
33
  }
33
34
  ));
34
35
  c.displayName = e.ScrollUpButton.displayName;
@@ -45,17 +46,21 @@ const m = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
45
46
  }
46
47
  ));
47
48
  m.displayName = e.ScrollDownButton.displayName;
48
- const w = l.forwardRef(({ className: o, children: r, position: a = "popper", ...d }, p) => /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ n(
49
+ const y = l.forwardRef(({ className: o, children: r, position: a = "popper", style: d, ...p }, f) => /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ n(
49
50
  e.Content,
50
51
  {
51
- ref: p,
52
+ ref: f,
52
53
  className: s(
53
54
  "relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
54
55
  a === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
55
56
  o
56
57
  ),
57
58
  position: a,
58
- ...d,
59
+ style: {
60
+ pointerEvents: "auto",
61
+ ...d
62
+ },
63
+ ...p,
59
64
  children: [
60
65
  /* @__PURE__ */ t(c, {}),
61
66
  /* @__PURE__ */ t(
@@ -72,8 +77,8 @@ const w = l.forwardRef(({ className: o, children: r, position: a = "popper", ...
72
77
  ]
73
78
  }
74
79
  ) }));
75
- w.displayName = e.Content.displayName;
76
- const y = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
80
+ y.displayName = e.Content.displayName;
81
+ const g = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
77
82
  e.Label,
78
83
  {
79
84
  ref: a,
@@ -81,8 +86,8 @@ const y = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
81
86
  ...r
82
87
  }
83
88
  ));
84
- y.displayName = e.Label.displayName;
85
- const g = l.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ n(
89
+ g.displayName = e.Label.displayName;
90
+ const N = l.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ n(
86
91
  e.Item,
87
92
  {
88
93
  ref: d,
@@ -92,13 +97,13 @@ const g = l.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__
92
97
  ),
93
98
  ...a,
94
99
  children: [
95
- /* @__PURE__ */ t("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t(e.ItemIndicator, { children: /* @__PURE__ */ t(u, { className: "h-4 w-4" }) }) }),
100
+ /* @__PURE__ */ t("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ t(e.ItemIndicator, { children: /* @__PURE__ */ t(h, { className: "h-4 w-4" }) }) }),
96
101
  /* @__PURE__ */ t(e.ItemText, { children: r })
97
102
  ]
98
103
  }
99
104
  ));
100
- g.displayName = e.Item.displayName;
101
- const N = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
105
+ N.displayName = e.Item.displayName;
106
+ const x = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
102
107
  e.Separator,
103
108
  {
104
109
  ref: a,
@@ -106,16 +111,16 @@ const N = l.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
106
111
  ...r
107
112
  }
108
113
  ));
109
- N.displayName = e.Separator.displayName;
114
+ x.displayName = e.Separator.displayName;
110
115
  export {
111
- w as SelectContent,
112
- R as SelectGroup,
113
- g as SelectItem,
114
- y as SelectLabel,
115
- v as SelectRoot,
116
+ y as SelectContent,
117
+ C as SelectGroup,
118
+ N as SelectItem,
119
+ g as SelectLabel,
120
+ R as SelectRoot,
116
121
  m as SelectScrollDownButton,
117
122
  c as SelectScrollUpButton,
118
- N as SelectSeparator,
119
- h as SelectTrigger,
120
- C as SelectValue
123
+ x as SelectSeparator,
124
+ w as SelectTrigger,
125
+ I as SelectValue
121
126
  };
package/Sheet/Sheet.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import * as React from "react";
3
- import * as SheetPrimitive from "@radix-ui/react-dialog";
2
+ import * as React from 'react';
3
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
4
4
  declare const Sheet: React.FC<SheetPrimitive.DialogProps>;
5
5
  declare const SheetTrigger: React.ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
6
6
  declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
@@ -10,6 +10,9 @@ declare const sheetVariants: (props?: ({
10
10
  side?: "top" | "right" | "bottom" | "left" | null | undefined;
11
11
  } & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
12
12
  interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
13
+ slotProps?: {
14
+ overlay?: React.ComponentPropsWithoutRef<typeof SheetPrimitive.Overlay>;
15
+ };
13
16
  }
14
17
  declare const SheetContent: React.ForwardRefExoticComponent<SheetContentProps & React.RefAttributes<HTMLDivElement>>;
15
18
  declare const SheetHeader: {
package/Sheet/Sheet.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { jsx as o, jsxs as n } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
3
  import * as e from "@radix-ui/react-dialog";
4
- import { cva as c } from "class-variance-authority";
5
- import { X as f } from "lucide-react";
4
+ import { cva as f } from "class-variance-authority";
5
+ import { X as p } from "lucide-react";
6
6
  import { cn as i } from "@oneplatformdev/utils";
7
- const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, d = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
7
+ const R = e.Root, T = e.Trigger, j = e.Close, h = e.Portal, l = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
8
8
  e.Overlay,
9
9
  {
10
10
  className: i(
@@ -15,8 +15,8 @@ const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, d = r.forwardRef(({
15
15
  ref: s
16
16
  }
17
17
  ));
18
- d.displayName = e.Overlay.displayName;
19
- const h = c(
18
+ l.displayName = e.Overlay.displayName;
19
+ const g = f(
20
20
  "fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
21
21
  {
22
22
  variants: {
@@ -31,17 +31,17 @@ const h = c(
31
31
  side: "right"
32
32
  }
33
33
  }
34
- ), g = r.forwardRef(({ side: t = "right", className: a, children: s, ...l }, m) => /* @__PURE__ */ n(p, { children: [
35
- /* @__PURE__ */ o(d, {}),
36
- /* @__PURE__ */ n(
34
+ ), u = r.forwardRef(({ side: t = "right", className: a, children: s, slotProps: n, ...m }, c) => /* @__PURE__ */ d(h, { children: [
35
+ /* @__PURE__ */ o(l, { ...(n == null ? void 0 : n.overlay) || {} }),
36
+ /* @__PURE__ */ d(
37
37
  e.Content,
38
38
  {
39
- ref: m,
40
- className: i(h({ side: t }), a),
41
- ...l,
39
+ ref: c,
40
+ className: i(g({ side: t }), a),
41
+ ...m,
42
42
  children: [
43
- /* @__PURE__ */ n(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
44
- /* @__PURE__ */ o(f, { className: "h-4 w-4" }),
43
+ /* @__PURE__ */ d(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
44
+ /* @__PURE__ */ o(p, { className: "h-4 w-4" }),
45
45
  /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
46
46
  ] }),
47
47
  s
@@ -49,8 +49,8 @@ const h = c(
49
49
  }
50
50
  )
51
51
  ] }));
52
- g.displayName = e.Content.displayName;
53
- const u = ({
52
+ u.displayName = e.Content.displayName;
53
+ const y = ({
54
54
  className: t,
55
55
  ...a
56
56
  }) => /* @__PURE__ */ o(
@@ -63,8 +63,8 @@ const u = ({
63
63
  ...a
64
64
  }
65
65
  );
66
- u.displayName = "SheetHeader";
67
- const y = ({
66
+ y.displayName = "SheetHeader";
67
+ const x = ({
68
68
  className: t,
69
69
  ...a
70
70
  }) => /* @__PURE__ */ o(
@@ -77,8 +77,8 @@ const y = ({
77
77
  ...a
78
78
  }
79
79
  );
80
- y.displayName = "SheetFooter";
81
- const x = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
80
+ x.displayName = "SheetFooter";
81
+ const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
82
82
  e.Title,
83
83
  {
84
84
  ref: s,
@@ -86,8 +86,8 @@ const x = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
86
86
  ...a
87
87
  }
88
88
  ));
89
- x.displayName = e.Title.displayName;
90
- const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
89
+ N.displayName = e.Title.displayName;
90
+ const b = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
91
91
  e.Description,
92
92
  {
93
93
  ref: s,
@@ -95,16 +95,16 @@ const N = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
95
95
  ...a
96
96
  }
97
97
  ));
98
- N.displayName = e.Description.displayName;
98
+ b.displayName = e.Description.displayName;
99
99
  export {
100
- C as Sheet,
101
- T as SheetClose,
102
- g as SheetContent,
103
- N as SheetDescription,
104
- y as SheetFooter,
105
- u as SheetHeader,
106
- d as SheetOverlay,
107
- p as SheetPortal,
108
- x as SheetTitle,
109
- R as SheetTrigger
100
+ R as Sheet,
101
+ j as SheetClose,
102
+ u as SheetContent,
103
+ b as SheetDescription,
104
+ x as SheetFooter,
105
+ y as SheetHeader,
106
+ l as SheetOverlay,
107
+ h as SheetPortal,
108
+ N as SheetTitle,
109
+ T as SheetTrigger
110
110
  };
@@ -0,0 +1,16 @@
1
+ import { FC } from 'react';
2
+
3
+ interface IProps {
4
+ limit: number;
5
+ offset: number;
6
+ totalRows: number;
7
+ setLimit: (limit: number) => void;
8
+ setOffset: (offset: number) => void;
9
+ tRowsPerPage?: string;
10
+ tPrevious?: string;
11
+ tPage?: string;
12
+ tNext?: string;
13
+ tOf?: string;
14
+ }
15
+ export declare const TablePagination: FC<IProps>;
16
+ export {};
@@ -0,0 +1,74 @@
1
+ import { jsxs as c, jsx as n } from "react/jsx-runtime";
2
+ import { Button as i } from "../Button/Button.mjs";
3
+ import "../Button/buttonVariants.mjs";
4
+ import "../Select/SelectRoot.mjs";
5
+ import { Select as P } from "../Select/Select.mjs";
6
+ const y = ({
7
+ offset: l,
8
+ limit: a,
9
+ totalRows: s,
10
+ setLimit: p,
11
+ setOffset: t,
12
+ tRowsPerPage: d = "Rows per page",
13
+ tPrevious: u = "Previous",
14
+ tPage: x = "Page",
15
+ tNext: v = "Next",
16
+ tOf: h = "Of"
17
+ }) => {
18
+ const r = Math.ceil(l / a) + 1, o = Math.ceil(s / a), m = r === o, b = (e) => {
19
+ t(0), p(parseInt(e));
20
+ }, g = () => {
21
+ let e = l - a;
22
+ e < 0 && (e = 0), t(e);
23
+ }, N = () => {
24
+ let e = l + a;
25
+ e > s && (e = s - a), t(e);
26
+ };
27
+ return /* @__PURE__ */ c("div", { className: "flex items-center justify-end space-x-2 py-4", children: [
28
+ /* @__PURE__ */ c("div", { className: "flex items-center space-x-2", children: [
29
+ /* @__PURE__ */ n("span", { className: "text-sm text-nowrap", children: d }),
30
+ /* @__PURE__ */ n(
31
+ P,
32
+ {
33
+ value: a == null ? void 0 : a.toString(),
34
+ options: [
35
+ { value: "5", label: "5" },
36
+ { value: "10", label: "10" },
37
+ { value: "20", label: "20" },
38
+ { value: "30", label: "30" },
39
+ { value: "50", label: "50" }
40
+ ],
41
+ onChange: b,
42
+ placeholder: "6",
43
+ nullable: !1
44
+ }
45
+ )
46
+ ] }),
47
+ /* @__PURE__ */ c("div", { className: "space-x-2", children: [
48
+ /* @__PURE__ */ n(
49
+ i,
50
+ {
51
+ variant: "outline",
52
+ size: "sm",
53
+ disabled: !l,
54
+ onClick: g,
55
+ children: u
56
+ }
57
+ ),
58
+ /* @__PURE__ */ n("span", { className: "text-sm", children: `${x} ${r} ${h} ${o}` }),
59
+ /* @__PURE__ */ n(
60
+ i,
61
+ {
62
+ variant: "outline",
63
+ size: "sm",
64
+ disabled: m,
65
+ onClick: N,
66
+ children: v
67
+ }
68
+ )
69
+ ] })
70
+ ] });
71
+ };
72
+ export {
73
+ y as TablePagination
74
+ };
@@ -0,0 +1 @@
1
+ export * from './TablePagination';
@@ -0,0 +1,4 @@
1
+ import { TablePagination as e } from "./TablePagination.mjs";
2
+ export {
3
+ e as TablePagination
4
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "sideEffects": false,
3
+ "main": "./index.mjs",
4
+ "module": "./index.mjs",
5
+ "default": "./index.mjs",
6
+ "types": "./index.d.ts"
7
+ }
package/Tabs/Tabs.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { TabsProps } from './Tabs.types';
2
- import { FC } from 'react';
2
+ import { FC, PropsWithChildren } from 'react';
3
3
 
4
- export declare const Tabs: FC<TabsProps>;
4
+ export declare const TabRender: FC<TabsProps>;
5
+ export declare const Tabs: FC<PropsWithChildren<TabsProps>>;
package/Tabs/Tabs.mjs CHANGED
@@ -1,9 +1,23 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { TabsRoot as n, TabsList as t, TabsTrigger as c } from "./TabsRoot.mjs";
3
- const p = (r) => {
4
- const { tab: s, tabs: l, onChange: o } = r;
5
- return /* @__PURE__ */ e(n, { value: s, onValueChange: o, children: /* @__PURE__ */ e(t, { className: "px-2 py-6 bg-[#E0E7FF] rounded-[6px]", children: l.map((a) => /* @__PURE__ */ e(c, { value: a.value, className: "h-8", children: a.label }, a.value)) }) });
1
+ import { jsx as o, jsxs as c } from "react/jsx-runtime";
2
+ import { Children as p } from "react";
3
+ import { TabsContent as m, TabsRoot as b, TabsList as i, TabsTrigger as h } from "./TabsRoot.mjs";
4
+ const T = (a) => {
5
+ const { tabs: s = [], contents: t } = a;
6
+ return p.map(t, (n, r) => {
7
+ var l;
8
+ if (!n || !s[r]) return null;
9
+ const e = (l = s[r]) == null ? void 0 : l.value, u = n.props || {};
10
+ return /* @__PURE__ */ o(m, { value: e, ...u, children: n }, e);
11
+ });
12
+ }, f = (a) => {
13
+ const { tab: s, tabs: t = [], onChange: n, children: r } = a;
14
+ return /* @__PURE__ */ c(b, { value: s, onValueChange: n, children: [
15
+ /* @__PURE__ */ o(i, { className: "px-2 py-6 bg-[#E0E7FF] rounded-[6px]", children: t.map((e) => /* @__PURE__ */ o(h, { value: e.value, className: "h-8", children: e.label }, e.value)) }),
16
+ r,
17
+ !r && /* @__PURE__ */ o(T, { ...a })
18
+ ] });
6
19
  };
7
20
  export {
8
- p as Tabs
21
+ T as TabRender,
22
+ f as Tabs
9
23
  };
@@ -1,9 +1,12 @@
1
+ import { ReactElement } from 'react';
2
+
1
3
  export interface TabItemProps {
2
4
  value: string;
3
5
  label: string;
4
6
  }
5
7
  export interface TabsProps {
6
8
  tabs: TabItemProps[];
7
- tab: string;
8
- onChange: (value: string) => void;
9
+ tab?: string;
10
+ onChange?: (value: string) => void;
11
+ contents?: ReactElement[];
9
12
  }
package/Tabs/index.mjs CHANGED
@@ -1,9 +1,10 @@
1
- import { TabsContent as s, TabsList as t, TabsRoot as T, TabsTrigger as a } from "./TabsRoot.mjs";
2
- import { Tabs as e } from "./Tabs.mjs";
1
+ import { TabsContent as T, TabsList as a, TabsRoot as b, TabsTrigger as e } from "./TabsRoot.mjs";
2
+ import { TabRender as t, Tabs as n } from "./Tabs.mjs";
3
3
  export {
4
- e as Tabs,
5
- s as TabsContent,
6
- t as TabsList,
7
- T as TabsRoot,
8
- a as TabsTrigger
4
+ t as TabRender,
5
+ n as Tabs,
6
+ T as TabsContent,
7
+ a as TabsList,
8
+ b as TabsRoot,
9
+ e as TabsTrigger
9
10
  };
@@ -1,4 +1,4 @@
1
1
  import { TextareaProps } from './Textarea.types';
2
- import * as React from "react";
2
+ import * as React from 'react';
3
3
  declare const Textarea: React.ForwardRefExoticComponent<Omit<TextareaProps, "ref"> & React.RefAttributes<HTMLTextAreaElement>>;
4
4
  export { Textarea };
@@ -1,18 +1,75 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import * as a from "react";
3
- import { cn as s } from "@oneplatformdev/utils";
4
- const i = a.forwardRef(({ className: e, ...r }, o) => /* @__PURE__ */ t(
5
- "textarea",
6
- {
7
- className: s(
8
- "flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",
9
- e
10
- ),
11
- ref: o,
12
- ...r
1
+ import { jsxs as u, Fragment as h, jsx as p } from "react/jsx-runtime";
2
+ import * as v from "react";
3
+ import { useId as w, useRef as z, useState as A, useImperativeHandle as F, useEffect as N } from "react";
4
+ import { cn as d } from "@oneplatformdev/utils";
5
+ import { useAutosizeTextArea as y } from "./useAutosizeTextArea.mjs";
6
+ const S = v.forwardRef(
7
+ (m, c) => {
8
+ const {
9
+ className: f,
10
+ value: r = "",
11
+ maxHeight: o = Number.MAX_SAFE_INTEGER,
12
+ minHeight: i = 0,
13
+ resizeble: x = !0,
14
+ counter: n = !1,
15
+ id: s = "",
16
+ ...e
17
+ } = m, a = w(), t = z(null), [g, b] = A("");
18
+ return y({
19
+ textAreaRef: t,
20
+ triggerAutoSize: g,
21
+ maxHeight: o,
22
+ minHeight: i
23
+ }), F(c, () => ({
24
+ ...t.current ?? {},
25
+ textArea: t.current,
26
+ focus: () => {
27
+ var l;
28
+ return (l = t == null ? void 0 : t.current) == null ? void 0 : l.focus();
29
+ },
30
+ maxHeight: o,
31
+ minHeight: i
32
+ })), N(() => {
33
+ b(r);
34
+ }, [e == null ? void 0 : e.defaultValue, r]), /* @__PURE__ */ u(h, { children: [
35
+ /* @__PURE__ */ p(
36
+ "textarea",
37
+ {
38
+ id: s || a,
39
+ ...e,
40
+ ref: t,
41
+ value: r,
42
+ className: d(
43
+ "flex min-h-10 w-full px-3 py-2 text-base relative md:text-sm",
44
+ "rounded-[12px] border border-input bg-[#FCFCFC] shadow-none",
45
+ "placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
46
+ "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
47
+ x ? "resize" : "resize-none !overflow-hidden",
48
+ n && "pb-2",
49
+ f
50
+ )
51
+ }
52
+ ),
53
+ n && /* @__PURE__ */ u(
54
+ "label",
55
+ {
56
+ htmlFor: s || a,
57
+ className: d(
58
+ "w-full text-right inline-flex items-center justify-end",
59
+ "text-sm font-normal text-muted-foreground",
60
+ "leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
61
+ ),
62
+ children: [
63
+ String(r || "").length,
64
+ " / ",
65
+ e == null ? void 0 : e.maxLength
66
+ ]
67
+ }
68
+ )
69
+ ] });
13
70
  }
14
- ));
15
- i.displayName = "Textarea";
71
+ );
72
+ S.displayName = "Textarea";
16
73
  export {
17
- i as Textarea
74
+ S as Textarea
18
75
  };
@@ -1,4 +1,18 @@
1
- import { ComponentProps } from 'react';
1
+ import { ComponentProps, RefObject } from 'react';
2
2
 
3
- export interface TextareaProps extends ComponentProps<'textarea'> {
3
+ export interface IUseAutosizeTextAreaProps {
4
+ textAreaRef: RefObject<HTMLTextAreaElement | null>;
5
+ triggerAutoSize: string;
6
+ /**
7
+ * The minimum height of the textarea.
8
+ */
9
+ minHeight?: number;
10
+ /**
11
+ * The maximum height of the textarea.
12
+ */
13
+ maxHeight?: number;
14
+ }
15
+ export interface TextareaProps extends ComponentProps<'textarea'>, Pick<IUseAutosizeTextAreaProps, 'minHeight' | 'maxHeight'> {
16
+ resizeble?: boolean;
17
+ counter?: boolean;
4
18
  }
@@ -0,0 +1,3 @@
1
+ import { IUseAutosizeTextAreaProps } from '..';
2
+
3
+ export declare const useAutosizeTextArea: ({ textAreaRef, triggerAutoSize, maxHeight, minHeight, }: IUseAutosizeTextAreaProps) => void;
@@ -0,0 +1,20 @@
1
+ import * as f from "react";
2
+ const u = ({
3
+ textAreaRef: r,
4
+ triggerAutoSize: l,
5
+ maxHeight: t = Number.MAX_SAFE_INTEGER,
6
+ minHeight: s = 0
7
+ }) => {
8
+ const [c, i] = f.useState(!0);
9
+ f.useEffect(() => {
10
+ const e = r.current;
11
+ if (e) {
12
+ c && (e.style.minHeight = `${s + 0}px`, t > s && (e.style.maxHeight = `${t}px`), i(!1)), e.style.height = `${s + 0}px`;
13
+ const o = e.scrollHeight;
14
+ o > t ? e.style.height = `${t}px` : e.style.height = `${o + 0}px`;
15
+ }
16
+ }, [r.current, l]);
17
+ };
18
+ export {
19
+ u as useAutosizeTextArea
20
+ };
@@ -6,9 +6,9 @@ const a = t(
6
6
  variant: {
7
7
  default: "border bg-background text-foreground",
8
8
  destructive: "destructive group border-destructive bg-destructive text-destructive-foreground",
9
- success: "",
10
- info: "",
11
- update: ""
9
+ success: "border bg-primary text-white",
10
+ info: "border bg-blue-400 text-white",
11
+ update: "border bg-orange-400 text-white"
12
12
  }
13
13
  },
14
14
  defaultVariants: {