@oneplatformdev/ui 0.0.1-beta.13 → 0.0.1-beta.130

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 (144) 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 +7 -3
  32. package/Dialog/Dialog.mjs +109 -65
  33. package/Dialog/DialogOverlayScope.d.ts +9 -0
  34. package/Dialog/DialogOverlayScope.mjs +10 -0
  35. package/Dialog/index.d.ts +1 -0
  36. package/Dialog/index.mjs +12 -8
  37. package/DropdownMenu/DropdownMenu.d.ts +2 -2
  38. package/DropdownMenu/DropdownMenu.mjs +30 -26
  39. package/Dropzone/Dropzone.d.ts +3 -3
  40. package/Dropzone/Dropzone.mjs +136 -104
  41. package/Dropzone/Dropzone.types.d.ts +16 -9
  42. package/Dropzone/{FilePreview.mjs → DropzoneFilePreview.mjs} +1 -1
  43. package/Dropzone/DropzoneSinglePickPreview.d.ts +10 -0
  44. package/Dropzone/DropzoneSinglePickPreview.mjs +44 -0
  45. package/Dropzone/DropzoneUtils.d.ts +1 -0
  46. package/Dropzone/DropzoneUtils.mjs +17 -8
  47. package/Dropzone/index.mjs +1 -1
  48. package/Form/Form.d.ts +2 -2
  49. package/Form/Form.mjs +48 -45
  50. package/Form/FormRenderControl.d.ts +2 -3
  51. package/Form/FormRenderControl.mjs +10 -10
  52. package/Form/FormRenderControl.types.d.ts +5 -7
  53. package/FormCheckbox/FormCheckbox.d.ts +2 -3
  54. package/FormCheckbox/FormCheckbox.mjs +23 -23
  55. package/FormCheckbox/FormCheckbox.types.d.ts +3 -3
  56. package/FormCombobox/FormCombobox.d.ts +2 -2
  57. package/FormCombobox/FormCombobox.mjs +6 -6
  58. package/FormCombobox/FormCombobox.types.d.ts +2 -3
  59. package/FormDatePicker/FormDatePicker.d.ts +2 -2
  60. package/FormDatePicker/FormDatePicker.mjs +20 -18
  61. package/FormDatePicker/FormDatePicker.types.d.ts +2 -3
  62. package/FormDropzone/FormDropzone.d.ts +4 -0
  63. package/FormDropzone/FormDropzone.mjs +19 -0
  64. package/FormDropzone/FormDropzone.types.d.ts +6 -0
  65. package/FormDropzone/index.d.ts +2 -0
  66. package/FormDropzone/index.mjs +4 -0
  67. package/FormDropzone/package.json +7 -0
  68. package/FormInput/FormInput.d.ts +5 -3
  69. package/FormInput/FormInput.mjs +37 -16
  70. package/FormInput/FormInput.types.d.ts +2 -3
  71. package/FormRadio/FormRadio.d.ts +4 -0
  72. package/FormRadio/FormRadio.mjs +40 -0
  73. package/FormRadio/FormRadio.types.d.ts +6 -0
  74. package/FormRadio/index.d.ts +2 -0
  75. package/FormRadio/index.mjs +4 -0
  76. package/FormRadio/package.json +7 -0
  77. package/FormSelect/FormSelect.d.ts +2 -3
  78. package/FormSelect/FormSelect.mjs +19 -17
  79. package/FormSelect/FormSelect.types.d.ts +2 -3
  80. package/FormTextarea/FormTextarea.d.ts +2 -3
  81. package/FormTextarea/FormTextarea.mjs +13 -12
  82. package/FormTextarea/FormTextarea.types.d.ts +2 -3
  83. package/Input/Input.mjs +50 -38
  84. package/Input/Input.types.d.ts +6 -2
  85. package/Input/inputVariants.mjs +9 -3
  86. package/Label/Label.d.ts +2 -2
  87. package/Label/labelVariants.mjs +7 -4
  88. package/LazyLoader/LazyLoader.mjs +5 -4
  89. package/LoadedIcon/LoadedIcon.d.ts +11 -0
  90. package/LoadedIcon/LoadedIcon.mjs +27 -0
  91. package/LoadedIcon/index.d.ts +1 -0
  92. package/LoadedIcon/index.mjs +4 -0
  93. package/LoadedIcon/package.json +7 -0
  94. package/LoadingMask/LoadingMask.d.ts +4 -1
  95. package/LoadingMask/LoadingMask.mjs +18 -56
  96. package/LoadingMask/LoadingMask.types.d.ts +5 -0
  97. package/LoadingMask/RenderLoadingMask.d.ts +3 -0
  98. package/LoadingMask/RenderLoadingMask.mjs +108 -0
  99. package/LoadingMask/index.d.ts +2 -0
  100. package/LoadingMask/index.mjs +4 -2
  101. package/Popover/Popover.d.ts +2 -2
  102. package/Popover/Popover.mjs +30 -21
  103. package/Radio/Radio.d.ts +4 -0
  104. package/Radio/Radio.mjs +12 -0
  105. package/Radio/Radio.types.d.ts +11 -0
  106. package/Radio/index.d.ts +2 -0
  107. package/Radio/index.mjs +4 -0
  108. package/Radio/package.json +7 -0
  109. package/RadioGroup/RadioGroup.d.ts +9 -3
  110. package/RadioGroup/RadioGroup.mjs +37 -19
  111. package/RadioGroup/index.mjs +4 -3
  112. package/ScrollArea/ScrollArea.d.ts +2 -2
  113. package/ScrollArea/ScrollArea.mjs +26 -13
  114. package/Search/Search.d.ts +1 -2
  115. package/Search/Search.mjs +36 -21
  116. package/Search/Search.types.d.ts +1 -0
  117. package/Select/Select.mjs +94 -63
  118. package/Select/Select.types.d.ts +11 -3
  119. package/Select/SelectRoot.d.ts +2 -2
  120. package/Select/SelectRoot.mjs +29 -24
  121. package/Sheet/Sheet.d.ts +5 -2
  122. package/Sheet/Sheet.mjs +33 -33
  123. package/TablePagination/TablePagination.d.ts +16 -0
  124. package/TablePagination/TablePagination.mjs +74 -0
  125. package/TablePagination/index.d.ts +1 -0
  126. package/TablePagination/index.mjs +4 -0
  127. package/TablePagination/package.json +7 -0
  128. package/Tabs/Tabs.d.ts +3 -2
  129. package/Tabs/Tabs.mjs +20 -6
  130. package/Tabs/Tabs.types.d.ts +5 -2
  131. package/Tabs/index.mjs +8 -7
  132. package/Textarea/Textarea.d.ts +1 -1
  133. package/Textarea/Textarea.mjs +72 -15
  134. package/Textarea/Textarea.types.d.ts +16 -2
  135. package/Textarea/useAutosizeTextArea.d.ts +3 -0
  136. package/Textarea/useAutosizeTextArea.mjs +20 -0
  137. package/Toast/toastVariants.mjs +3 -3
  138. package/index.css +1 -1
  139. package/index.d.ts +3 -0
  140. package/index.mjs +305 -290
  141. package/package.json +6 -6
  142. package/tailwind.config.mjs +13 -13
  143. /package/Dropzone/{FilePreview.d.ts → DropzoneFilePreview.d.ts} +0 -0
  144. /package/{FilePreview-Dhtv8F4u.js → DropzoneFilePreview-Dhtv8F4u.js} +0 -0
@@ -1,31 +1,49 @@
1
- import { jsx as e } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as l } from "react/jsx-runtime";
2
+ import * as i from "@radix-ui/react-radio-group";
3
+ import { Circle as c } from "lucide-react";
2
4
  import * as s from "react";
3
- import * as r from "@radix-ui/react-radio-group";
4
- import { Circle as m } from "lucide-react";
5
5
  import { cn as t } from "@oneplatformdev/utils";
6
- const d = s.forwardRef(({ className: o, ...i }, a) => /* @__PURE__ */ e(
7
- r.Root,
6
+ import { Label as p } from "../Label/Label.mjs";
7
+ const f = s.forwardRef(({ className: r, ...a }, o) => /* @__PURE__ */ e(
8
+ i.Root,
8
9
  {
9
- className: t("grid gap-2", o),
10
- ...i,
11
- ref: a
10
+ className: t("grid gap-0", r),
11
+ ...a,
12
+ ref: o
12
13
  }
13
14
  ));
14
- d.displayName = r.Root.displayName;
15
- const l = s.forwardRef(({ className: o, ...i }, a) => /* @__PURE__ */ e(
16
- r.Item,
15
+ f.displayName = i.Root.displayName;
16
+ const m = s.forwardRef(({ className: r, ...a }, o) => /* @__PURE__ */ e(
17
+ i.Item,
17
18
  {
18
- ref: a,
19
+ ref: o,
19
20
  className: t(
20
- "aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
21
- o
21
+ "aspect-square size-4 rounded-full border border-primary text-primary shadow focus:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
22
+ r
22
23
  ),
23
- ...i,
24
- children: /* @__PURE__ */ e(r.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e(m, { className: "h-3.5 w-3.5 fill-primary" }) })
24
+ ...a,
25
+ children: /* @__PURE__ */ e(i.Indicator, { className: "flex items-center justify-center ", children: /* @__PURE__ */ e(c, { className: "size-2.5 fill-primary" }) })
25
26
  }
26
27
  ));
27
- l.displayName = r.Item.displayName;
28
+ m.displayName = i.Item.displayName;
29
+ const n = s.forwardRef(({ value: r, label: a, children: o }, d) => /* @__PURE__ */ l(
30
+ p,
31
+ {
32
+ ref: d,
33
+ htmlFor: r,
34
+ className: "flex w-full items-start gap-3 font-normal py-3 cursor-pointer",
35
+ children: [
36
+ /* @__PURE__ */ e(m, { value: r, id: r }),
37
+ /* @__PURE__ */ l("div", { className: "flex flex-col w-full gap-3", children: [
38
+ /* @__PURE__ */ e("span", { className: "flex flex-col justify-start leading-[16px]", children: a }),
39
+ o
40
+ ] })
41
+ ]
42
+ }
43
+ ));
44
+ n.displayName = "RadioGroupLabel";
28
45
  export {
29
- d as RadioGroup,
30
- l as RadioGroupItem
46
+ f as RadioGroup,
47
+ m as RadioGroupItem,
48
+ n as RadioGroupLabel
31
49
  };
@@ -1,5 +1,6 @@
1
- import { RadioGroup as p, RadioGroupItem as a } from "./RadioGroup.mjs";
1
+ import { RadioGroup as a, RadioGroupItem as p, RadioGroupLabel as d } from "./RadioGroup.mjs";
2
2
  export {
3
- p as RadioGroup,
4
- a as RadioGroupItem
3
+ a as RadioGroup,
4
+ p as RadioGroupItem,
5
+ d as RadioGroupLabel
5
6
  };
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
1
+ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
2
+ import * as React from 'react';
3
3
  declare const ScrollArea: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
4
  declare const ScrollBar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
5
  export { ScrollArea, ScrollBar };
@@ -1,38 +1,51 @@
1
- import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
- import * as s from "react";
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
3
2
  import * as r from "@radix-ui/react-scroll-area";
4
- import { cn as t } from "@oneplatformdev/utils";
5
- const m = s.forwardRef(({ className: o, children: l, ...a }, c) => /* @__PURE__ */ d(
3
+ import * as t from "react";
4
+ import { cn as s } from "@oneplatformdev/utils";
5
+ const m = t.forwardRef(({ className: o, children: l, ...a }, c) => /* @__PURE__ */ i(
6
6
  r.Root,
7
7
  {
8
8
  ref: c,
9
- className: t("relative overflow-hidden", o),
9
+ className: s(
10
+ "relative overflow-hidden pr-2",
11
+ // '[&:has([data-orientation=vertical])]:pr-2',
12
+ o
13
+ ),
10
14
  ...a,
11
15
  children: [
12
16
  /* @__PURE__ */ e(r.Viewport, { className: "h-full w-full rounded-[inherit]", children: l }),
13
- /* @__PURE__ */ e(i, {}),
17
+ /* @__PURE__ */ e(d, {}),
14
18
  /* @__PURE__ */ e(r.Corner, {})
15
19
  ]
16
20
  }
17
21
  ));
18
22
  m.displayName = r.Root.displayName;
19
- const i = s.forwardRef(({ className: o, orientation: l = "vertical", ...a }, c) => /* @__PURE__ */ e(
23
+ const d = t.forwardRef(({ className: o, orientation: l = "vertical", ...a }, c) => /* @__PURE__ */ e(
20
24
  r.ScrollAreaScrollbar,
21
25
  {
22
26
  ref: c,
23
27
  orientation: l,
24
- className: t(
28
+ className: s(
25
29
  "flex touch-none select-none transition-colors",
26
- l === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
27
- l === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
30
+ "p-[1px] bg-[#DCDDE1] rounded-full",
31
+ l === "vertical" && "h-full w-1.5 border-l border-l-transparent",
32
+ l === "horizontal" && "h-1.5 flex-col border-t border-t-transparent",
28
33
  o
29
34
  ),
30
35
  ...a,
31
- children: /* @__PURE__ */ e(r.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
36
+ children: /* @__PURE__ */ e(
37
+ r.ScrollAreaThumb,
38
+ {
39
+ className: s(
40
+ "relative flex-1 rounded-full bg-border",
41
+ "bg-[#FCFCFC]"
42
+ )
43
+ }
44
+ )
32
45
  }
33
46
  ));
34
- i.displayName = r.ScrollAreaScrollbar.displayName;
47
+ d.displayName = r.ScrollAreaScrollbar.displayName;
35
48
  export {
36
49
  m as ScrollArea,
37
- i as ScrollBar
50
+ d as ScrollBar
38
51
  };
@@ -1,4 +1,3 @@
1
1
  import { SearchProps } from './Search.types';
2
- import { FC } from 'react';
3
2
 
4
- export declare const Search: FC<SearchProps>;
3
+ export declare const Search: (props: SearchProps) => import("react/jsx-runtime").JSX.Element;
package/Search/Search.mjs CHANGED
@@ -1,30 +1,45 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { useState as S } from "react";
3
- import { Input as f } from "../Input/Input.mjs";
4
- import { useDebounceCallback as v } from "@oneplatformdev/hooks";
5
- import { cn as d } from "@oneplatformdev/utils";
6
- const j = (t) => {
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useState as g } from "react";
3
+ import { Input as v } from "../Input/Input.mjs";
4
+ import { useDebounceCallback as b } from "@oneplatformdev/hooks";
5
+ import { cn as x } from "@oneplatformdev/utils";
6
+ import { SearchIcon as I } from "lucide-react";
7
+ import { LoadedIcon as C } from "../LoadedIcon/LoadedIcon.mjs";
8
+ const L = (a) => {
7
9
  const {
8
- search: a,
9
- onChange: e,
10
- onSearch: c,
10
+ search: c,
11
+ onChange: r,
12
+ onSearch: n,
11
13
  placeholder: s = "Search",
12
- className: n,
13
- ...m
14
- } = t, [i, l] = S(a), h = v(c, 1e3), p = (r) => {
15
- const u = r.target.value;
16
- l(u), e == null || e(r), h(r.target.value);
14
+ className: m,
15
+ loading: i = !1,
16
+ slotProps: e,
17
+ name: p = "search",
18
+ ...l
19
+ } = a, [h, u] = g(c), f = b(n, 1e3), d = (o) => {
20
+ const S = o.target.value;
21
+ u(S), r == null || r(o), f(o.target.value);
17
22
  };
18
- return /* @__PURE__ */ o("div", { className: d("space-y-4", n), children: /* @__PURE__ */ o(
19
- f,
23
+ return /* @__PURE__ */ t(
24
+ v,
20
25
  {
26
+ name: p,
21
27
  placeholder: s,
22
- value: i,
23
- onChange: p,
24
- ...m
28
+ value: h,
29
+ className: x("min-w-[340px]", m),
30
+ onChange: d,
31
+ ...l,
32
+ ...e || {},
33
+ slotProps: {
34
+ ...e || {},
35
+ input: {
36
+ startAdornment: /* @__PURE__ */ t(C, { loading: i, size: "sm", children: /* @__PURE__ */ t(I, {}) }),
37
+ ...(e == null ? void 0 : e.input) || {}
38
+ }
39
+ }
25
40
  }
26
- ) });
41
+ );
27
42
  };
28
43
  export {
29
- j as Search
44
+ L as Search
30
45
  };
@@ -3,4 +3,5 @@ import { InputProps } from '../Input';
3
3
  export interface SearchProps extends InputProps {
4
4
  search: string;
5
5
  onSearch: (value?: string) => void;
6
+ loading?: boolean;
6
7
  }
package/Select/Select.mjs CHANGED
@@ -1,72 +1,103 @@
1
- import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
- import { Button as f } from "../Button/Button.mjs";
1
+ import { jsxs as u, jsx as i, Fragment as x } from "react/jsx-runtime";
2
+ import { createElement as f, isValidElement as S } from "react";
3
+ import { Button as y } from "../Button/Button.mjs";
3
4
  import "../Button/buttonVariants.mjs";
4
- import { SelectRoot as p, SelectContent as h, SelectItem as u, SelectTrigger as g, SelectValue as v } from "./SelectRoot.mjs";
5
- import { isValidReactElement as i } from "@oneplatformdev/utils";
6
- const S = (o) => {
7
- const { placeholder: t, renderTrigger: e } = o, n = /* @__PURE__ */ a(g, { children: /* @__PURE__ */ a(v, { placeholder: t }) });
8
- return e && typeof e == "function" && i(e(o, n)) ? e(o, n) : n;
9
- }, C = (o) => {
10
- const { renderOption: t, option: e, index: n, options: l, ...c } = o, r = /* @__PURE__ */ a(u, { value: e.value, children: e.label }, e.value);
11
- return t && typeof t == "function" && i(t(
12
- e,
13
- n,
14
- l,
15
- { ...c, options: l },
16
- r
17
- )) ? i(t(
18
- e,
19
- n,
20
- l,
21
- { ...c, options: l },
22
- r
23
- ), u) ? i(t(
24
- e,
25
- n,
26
- l,
27
- { ...c, options: l },
28
- r
29
- )) : /* @__PURE__ */ a(u, { value: e.value, children: t(
30
- e,
31
- n,
32
- l,
33
- { ...c, options: l },
34
- r
35
- ) }, e.value) : r;
36
- }, T = (o) => {
37
- const {
38
- value: t,
39
- options: e,
40
- onChange: n,
41
- nullable: l = !1,
42
- clearLabel: c = "Clear",
43
- disabled: r
44
- } = o;
45
- return /* @__PURE__ */ d(
5
+ import { SelectRoot as b, SelectContent as R, SelectTrigger as C, SelectValue as V, SelectItem as p } from "./SelectRoot.mjs";
6
+ import { isValidReactElement as k } from "@oneplatformdev/utils";
7
+ const B = (t) => {
8
+ const { placeholder: n, renderTrigger: e, slotProps: l } = t, r = /* @__PURE__ */ i(C, { ...(l == null ? void 0 : l.triggerProps) || {}, children: /* @__PURE__ */ i(V, { placeholder: n }) });
9
+ return e && typeof e == "function" && k(e(t, r)) ? e(t, r) : r;
10
+ }, d = (t) => {
11
+ const { children: n, option: e, deep: l = 0 } = t;
12
+ return /* @__PURE__ */ u(
46
13
  p,
47
14
  {
48
- value: t,
49
- onValueChange: n,
50
- disabled: r,
15
+ value: e.value,
16
+ disabled: e.disabled,
17
+ className: "cursor-pointer",
18
+ style: { paddingLeft: `calc(8px + ${(l || 0) * 8}px)` },
51
19
  children: [
52
- /* @__PURE__ */ a(S, { ...o }),
53
- /* @__PURE__ */ d(h, { children: [
54
- l && /* @__PURE__ */ a(f, { className: "w-full px-2", variant: "secondary", size: "sm", onClick: () => {
55
- n("");
56
- }, children: c }),
57
- e.map((s, m) => /* @__PURE__ */ a(
58
- C,
59
- {
60
- ...o,
61
- option: s,
62
- index: m
63
- }
64
- ))
65
- ] })
20
+ !n && e.label,
21
+ n && /* @__PURE__ */ i(x, { children: typeof n == "function" ? n({ ...t }) : n })
66
22
  ]
67
- }
23
+ },
24
+ e.value
68
25
  );
26
+ }, g = (t) => {
27
+ var a, o;
28
+ const { renderOption: n, option: e, index: l, options: r, deep: m = 0, ...c } = t;
29
+ return n && typeof n == "function" && S(
30
+ n(
31
+ e,
32
+ l,
33
+ r,
34
+ { ...c, options: r },
35
+ /* @__PURE__ */ i(d, { ...t })
36
+ )
37
+ ) ? /* @__PURE__ */ i(p, { value: e.value, children: n(
38
+ e,
39
+ l,
40
+ r,
41
+ { ...c, options: r },
42
+ /* @__PURE__ */ i(d, { ...t })
43
+ ) }, e.value) : (a = e.children) != null && a.length ? /* @__PURE__ */ u(
44
+ "div",
45
+ {
46
+ className: "flex flex-col gap-1 truncate line-clamp-2",
47
+ children: [
48
+ /* @__PURE__ */ i(d, { ...t }),
49
+ (o = e.children) == null ? void 0 : o.map((s, h, v) => /* @__PURE__ */ f(
50
+ g,
51
+ {
52
+ ...t,
53
+ key: s.value,
54
+ option: s,
55
+ options: v,
56
+ index: h,
57
+ deep: (m || 0) + 1
58
+ }
59
+ ))
60
+ ]
61
+ },
62
+ e.value
63
+ ) : /* @__PURE__ */ i(d, { ...t });
64
+ }, w = (t) => {
65
+ const {
66
+ value: n,
67
+ options: e,
68
+ onChange: l,
69
+ nullable: r = !1,
70
+ clearLabel: m = "Clear",
71
+ disabled: c
72
+ } = t;
73
+ return /* @__PURE__ */ u(b, { value: n, onValueChange: l, disabled: c, children: [
74
+ /* @__PURE__ */ i(B, { ...t }),
75
+ /* @__PURE__ */ u(R, { children: [
76
+ r && /* @__PURE__ */ i(
77
+ y,
78
+ {
79
+ className: "w-full px-2",
80
+ variant: "secondary",
81
+ size: "sm",
82
+ onClick: () => {
83
+ l == null || l("");
84
+ },
85
+ children: m
86
+ }
87
+ ),
88
+ e.map((a, o) => /* @__PURE__ */ f(
89
+ g,
90
+ {
91
+ ...t,
92
+ key: a.value,
93
+ option: a,
94
+ index: o,
95
+ deep: 0
96
+ }
97
+ ))
98
+ ] })
99
+ ] });
69
100
  };
70
101
  export {
71
- T as Select
102
+ w as Select
72
103
  };
@@ -1,9 +1,12 @@
1
- import { ReactNode } from 'react';
1
+ import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
2
 
3
- export interface SelectOption<ExtendOptionData> {
3
+ import * as SelectPrimitive from '@radix-ui/react-select';
4
+ export interface SelectOption<ExtendOptionData = unknown> {
4
5
  value: string;
5
6
  label?: ReactNode;
7
+ disabled?: boolean;
6
8
  data?: ExtendOptionData;
9
+ children?: SelectOption<ExtendOptionData>[];
7
10
  }
8
11
  export type SelectRenderTrigger<ExtendOptionData> = (props: Omit<SelectProps<ExtendOptionData>, 'renderTrigger'>, defaultComponent: ReactNode) => ReactNode;
9
12
  export type SelectRenderOption<ExtendOptionData> = (option: SelectOption<ExtendOptionData>, index: number, options: SelectOption<ExtendOptionData>[], props: Omit<SelectProps<ExtendOptionData>, 'renderOption'>, defaultComponent: ReactNode) => ReactNode;
@@ -15,7 +18,7 @@ export interface SelectProps<ExtendOptionData> {
15
18
  /** Select placeholder string. */
16
19
  placeholder?: string;
17
20
  /** Select Root onValueChange handler. */
18
- onChange: (value: SelectOption<ExtendOptionData>['value']) => void;
21
+ onChange?: (value: SelectOption<ExtendOptionData>['value']) => void;
19
22
  /** Show reset select item button. */
20
23
  disabled?: boolean;
21
24
  /** Show reset select item button. */
@@ -26,4 +29,9 @@ export interface SelectProps<ExtendOptionData> {
26
29
  renderTrigger?: SelectRenderTrigger<ExtendOptionData>;
27
30
  /** Render custom option. */
28
31
  renderOption?: SelectRenderOption<ExtendOptionData>;
32
+ /** Select Slot props */
33
+ slotProps?: {
34
+ /** Select Default Trigger Props */
35
+ triggerProps?: ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>;
36
+ };
29
37
  }
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as SelectPrimitive from "@radix-ui/react-select";
1
+ import * as React from 'react';
2
+ import * as SelectPrimitive from '@radix-ui/react-select';
3
3
  declare const SelectRoot: React.FC<SelectPrimitive.SelectProps>;
4
4
  declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
5
5
  declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
@@ -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: {