@oneplatformdev/ui 0.1.10-3 → 0.1.10-4

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 (217) hide show
  1. package/Accordion/index.js +7 -0
  2. package/{ui4.js → Alert/Alert.js} +1 -1
  3. package/Alert/index.js +6 -0
  4. package/{ui6.js → AlertDialog/AlertDialog.js} +1 -1
  5. package/AlertDialog/AlertDialog.stories.js +121 -0
  6. package/AlertDialog/AlertDialog.types.js +1 -0
  7. package/{ui5.js → AlertDialog/AlertDialogRoot.js} +33 -32
  8. package/AlertDialog/index.js +16 -0
  9. package/{ui7.js → AreaChart/AreaChart.js} +1 -1
  10. package/AreaChart/AreaChart.types.js +1 -0
  11. package/AreaChart/index.js +4 -0
  12. package/{ui8.js → Aside/Aside.js} +1 -1
  13. package/Aside/Aside.types.js +1 -0
  14. package/{ui9.js → Aside/AsideSidebar.js} +1 -1
  15. package/Aside/index.js +7 -0
  16. package/AspectRatio/index.js +5 -0
  17. package/Avatar/index.js +6 -0
  18. package/{ui12.js → Badge/Badge.js} +1 -1
  19. package/Badge/Badge.types.js +1 -0
  20. package/Badge/index.js +6 -0
  21. package/Breadcrumb/index.js +10 -0
  22. package/{ui15.js → Button/Button.js} +6 -5
  23. package/Button/Button.stories.js +20 -0
  24. package/Button/Button.types.js +1 -0
  25. package/Button/index.js +7 -0
  26. package/{ui17.js → ButtonIcon/ButtonIcon.js} +5 -4
  27. package/ButtonIcon/ButtonIcon.stories.js +126 -0
  28. package/ButtonIcon/ButtonIcon.types.js +1 -0
  29. package/ButtonIcon/index.js +7 -0
  30. package/CHANGELOG.md +8 -0
  31. package/{ui19.js → Calendar/Calendar.js} +2 -1
  32. package/Calendar/index.js +4 -0
  33. package/Card/index.js +9 -0
  34. package/{ui21.js → Carousel/Carousel.js} +7 -6
  35. package/Carousel/index.js +8 -0
  36. package/Chart/index.js +9 -0
  37. package/{ui23.js → Checkbox/Checkbox.js} +19 -18
  38. package/Checkbox/Checkbox.types.js +1 -0
  39. package/Checkbox/index.js +5 -0
  40. package/Collapsible/index.js +6 -0
  41. package/{ui25.js → Combobox/Combobox.js} +38 -36
  42. package/Combobox/Combobox.types.js +1 -0
  43. package/Combobox/ComboboxOptionItem.d.ts +1 -1
  44. package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
  45. package/{ui98.js → Combobox/ComboboxOptionItem.js} +16 -17
  46. package/Combobox/ComboboxOptions.js +64 -0
  47. package/Combobox/index.js +4 -0
  48. package/{ui26.js → Command/Command.js} +20 -19
  49. package/Command/index.js +12 -0
  50. package/{ui27.js → DataTable/DataTable.js} +13 -12
  51. package/DataTable/DataTable.types.js +1 -0
  52. package/DataTable/DataTableColumnFilter.js +31 -0
  53. package/DataTable/index.js +4 -0
  54. package/DataTable/useDataTable.js +30 -0
  55. package/{ui28.js → DatePicker/DatePicker.js} +15 -14
  56. package/DatePicker/DatePicker.types.js +1 -0
  57. package/DatePicker/index.js +5 -0
  58. package/{ui29.js → Dialog/Dialog.js} +1 -1
  59. package/Dialog/index.js +17 -0
  60. package/Drawer/index.js +13 -0
  61. package/{ui32.js → DropdownMenu/DropdownMenu.js} +5 -5
  62. package/DropdownMenu/index.js +18 -0
  63. package/{ui85.js → Dropzone/Dropzone.js} +5 -5
  64. package/{ui93.js → Dropzone/DropzoneFilePreview.js} +2 -2
  65. package/{ui94.js → Dropzone/DropzoneSinglePickPreview.js} +1 -1
  66. package/Dropzone/index.js +7 -0
  67. package/{ui33.js → Form/Form.js} +9 -8
  68. package/{ui34.js → Form/FormRenderControl.js} +1 -1
  69. package/Form/FormRenderControl.types.js +1 -0
  70. package/Form/index.js +13 -0
  71. package/{ui35.js → FormCheckbox/FormCheckbox.js} +5 -5
  72. package/FormCheckbox/FormCheckbox.types.js +1 -0
  73. package/FormCheckbox/index.js +4 -0
  74. package/{ui36.js → FormCombobox/FormCombobox.js} +5 -5
  75. package/FormCombobox/FormCombobox.types.js +1 -0
  76. package/FormCombobox/index.js +4 -0
  77. package/{ui37.js → FormDatePicker/FormDatePicker.js} +5 -5
  78. package/FormDatePicker/FormDatePicker.types.js +1 -0
  79. package/FormDatePicker/index.js +5 -0
  80. package/FormDropzone/FormDropzone.js +19 -0
  81. package/FormDropzone/FormDropzone.types.js +1 -0
  82. package/FormDropzone/index.js +4 -0
  83. package/{ui38.js → FormInput/FormInput.js} +7 -7
  84. package/FormInput/FormInput.types.js +1 -0
  85. package/FormInput/index.js +4 -0
  86. package/FormRadio/FormRadio.js +40 -0
  87. package/FormRadio/FormRadio.types.d.ts +1 -1
  88. package/FormRadio/FormRadio.types.js +1 -0
  89. package/FormRadio/index.js +4 -0
  90. package/FormSelect/FormSelect.js +40 -0
  91. package/FormSelect/FormSelect.types.js +1 -0
  92. package/FormSelect/index.js +4 -0
  93. package/{ui40.js → FormTextarea/FormTextarea.js} +5 -5
  94. package/FormTextarea/FormTextarea.types.js +1 -0
  95. package/FormTextarea/index.js +4 -0
  96. package/{ui41.js → Header/Header.js} +2 -2
  97. package/Header/Header.types.js +1 -0
  98. package/Header/index.js +5 -0
  99. package/HoverCard/index.js +6 -0
  100. package/{ui43.js → Input/Input.js} +1 -1
  101. package/Input/Input.types.js +1 -0
  102. package/Input/index.js +7 -0
  103. package/InputOTP/index.js +7 -0
  104. package/{ui45.js → Label/Label.js} +1 -1
  105. package/Label/index.js +6 -0
  106. package/LazyLoader/LazyLoader.js +8 -0
  107. package/LazyLoader/index.js +5 -0
  108. package/LoadedIcon/index.js +4 -0
  109. package/{ui49.js → LoadingMask/LoadingMask.js} +1 -1
  110. package/LoadingMask/LoadingMask.types.js +1 -0
  111. package/LoadingMask/index.js +6 -0
  112. package/{ui51.js → LoadingProgress/LoadingProgress.js} +1 -1
  113. package/LoadingProgress/LoadingProgress.types.js +1 -0
  114. package/LoadingProgress/index.js +6 -0
  115. package/{ui53.js → Menubar/Menubar.js} +4 -4
  116. package/Menubar/index.js +19 -0
  117. package/{ui54.js → NavigationMenu/NavigationMenu.js} +1 -1
  118. package/NavigationMenu/index.js +13 -0
  119. package/{ui56.js → Pagination/Pagination.js} +2 -1
  120. package/Pagination/index.js +10 -0
  121. package/{ui57.js → Popover/Popover.js} +1 -1
  122. package/Popover/index.js +7 -0
  123. package/Progress/index.js +4 -0
  124. package/Radio/Radio.js +12 -0
  125. package/Radio/Radio.types.js +1 -0
  126. package/Radio/index.js +4 -0
  127. package/{ui59.js → RadioGroup/RadioGroup.js} +1 -1
  128. package/RadioGroup/index.js +6 -0
  129. package/Resizable/index.js +6 -0
  130. package/ScrollArea/index.js +5 -0
  131. package/{ui62.js → Search/Search.js} +9 -9
  132. package/Search/Search.types.js +1 -0
  133. package/Search/index.js +5 -0
  134. package/{ui64.js → Select/Select.js} +25 -24
  135. package/Select/Select.stories.js +41 -0
  136. package/Select/Select.types.js +1 -0
  137. package/{ui63.js → Select/SelectRoot.js} +3 -3
  138. package/Select/index.js +15 -0
  139. package/Separator/index.js +4 -0
  140. package/Sheet/index.js +13 -0
  141. package/{ui67.js → Sidebar/Sidebar.js} +16 -15
  142. package/Sidebar/index.js +27 -0
  143. package/Skeleton/index.js +4 -0
  144. package/Slider/index.js +4 -0
  145. package/Sonner/index.js +4 -0
  146. package/Switch/index.js +4 -0
  147. package/Table/index.js +11 -0
  148. package/{ui88.js → TablePagination/TablePagination.js} +16 -14
  149. package/TablePagination/index.js +4 -0
  150. package/{ui74.js → Tabs/Tabs.js} +1 -1
  151. package/Tabs/Tabs.types.js +1 -0
  152. package/Tabs/index.js +10 -0
  153. package/{ui75.js → Textarea/Textarea.js} +1 -1
  154. package/Textarea/Textarea.types.js +1 -0
  155. package/Textarea/index.js +4 -0
  156. package/Textarea/useAutosizeTextArea.d.ts +1 -1
  157. package/{ui77.js → Theme/ThemeModeToggle.js} +6 -5
  158. package/Theme/index.js +6 -0
  159. package/{ui78.js → Toast/Toast.js} +1 -1
  160. package/Toast/Toast.types.js +1 -0
  161. package/Toast/index.js +15 -0
  162. package/Toast/toast.constants.js +9 -0
  163. package/{ui80.js → Toaster/Toaster.js} +2 -2
  164. package/Toaster/index.js +4 -0
  165. package/Toggle/index.js +5 -0
  166. package/{ui82.js → ToggleGroup/ToggleGroup.js} +1 -1
  167. package/ToggleGroup/index.js +5 -0
  168. package/{ui84.js → Tooltip/Tooltip.js} +1 -1
  169. package/Tooltip/Tooltip.types.js +1 -0
  170. package/Tooltip/index.js +9 -0
  171. package/{ui97.js → hooks/dist/useIsMobile/useIsMobile.js} +5 -5
  172. package/{ui.js → index.js} +87 -87
  173. package/package.json +6 -16
  174. package/ui39.js +0 -39
  175. package/ui47.js +0 -7
  176. package/ui87.js +0 -19
  177. package/ui91.js +0 -63
  178. /package/{ui3.js → Accordion/Accordion.js} +0 -0
  179. /package/{ui89.js → Alert/alertVariants.js} +0 -0
  180. /package/{ui10.js → AspectRatio/AspectRatio.js} +0 -0
  181. /package/{ui11.js → Avatar/Avatar.js} +0 -0
  182. /package/{ui13.js → Badge/badgeVariants.js} +0 -0
  183. /package/{ui14.js → Breadcrumb/Breadcrumb.js} +0 -0
  184. /package/{ui16.js → Button/buttonVariants.js} +0 -0
  185. /package/{ui18.js → ButtonIcon/buttonIconVariants.js} +0 -0
  186. /package/{ui20.js → Card/Card.js} +0 -0
  187. /package/{ui22.js → Chart/Chart.js} +0 -0
  188. /package/{ui24.js → Collapsible/Collapsible.js} +0 -0
  189. /package/{ui30.js → Dialog/DialogOverlayScope.js} +0 -0
  190. /package/{ui31.js → Drawer/Drawer.js} +0 -0
  191. /package/{ui86.js → Dropzone/Dropzone.types.js} +0 -0
  192. /package/{ui95.js → Dropzone/DropzoneUtils.js} +0 -0
  193. /package/{ui42.js → HoverCard/HoverCard.js} +0 -0
  194. /package/{ui90.js → Input/inputVariants.js} +0 -0
  195. /package/{ui44.js → InputOTP/InputOTP.js} +0 -0
  196. /package/{ui46.js → Label/labelVariants.js} +0 -0
  197. /package/{ui48.js → LoadedIcon/LoadedIcon.js} +0 -0
  198. /package/{ui50.js → LoadingMask/RenderLoadingMask.js} +0 -0
  199. /package/{ui52.js → LoadingProgress/loadingProgressVariants.js} +0 -0
  200. /package/{ui55.js → NavigationMenu/navigationMenuVariants.js} +0 -0
  201. /package/{ui58.js → Progress/Progress.js} +0 -0
  202. /package/{ui60.js → Resizable/Resizable.js} +0 -0
  203. /package/{ui61.js → ScrollArea/ScrollArea.js} +0 -0
  204. /package/{ui65.js → Separator/Separator.js} +0 -0
  205. /package/{ui66.js → Sheet/Sheet.js} +0 -0
  206. /package/{ui68.js → Skeleton/Skeleton.js} +0 -0
  207. /package/{ui69.js → Slider/Slider.js} +0 -0
  208. /package/{ui70.js → Sonner/Sonner.js} +0 -0
  209. /package/{ui71.js → Switch/Switch.js} +0 -0
  210. /package/{ui72.js → Table/Table.js} +0 -0
  211. /package/{ui73.js → Tabs/TabsRoot.js} +0 -0
  212. /package/{ui96.js → Textarea/useAutosizeTextArea.js} +0 -0
  213. /package/{ui76.js → Theme/ThemeProvider.js} +0 -0
  214. /package/{ui92.js → Toast/toastVariants.js} +0 -0
  215. /package/{ui79.js → Toast/useToast.js} +0 -0
  216. /package/{ui81.js → Toggle/Toggle.js} +0 -0
  217. /package/{ui83.js → Tooltip/TooltipRoot.js} +0 -0
@@ -0,0 +1,4 @@
1
+ import { Calendar as e } from "./Calendar.js";
2
+ export {
3
+ e as Calendar
4
+ };
package/Card/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import { Card as d, CardContent as e, CardDescription as C, CardFooter as o, CardHeader as t, CardTitle as i } from "./Card.js";
2
+ export {
3
+ d as Card,
4
+ e as CardContent,
5
+ C as CardDescription,
6
+ o as CardFooter,
7
+ t as CardHeader,
8
+ i as CardTitle
9
+ };
@@ -3,10 +3,11 @@ import * as e from "react";
3
3
  import k from "embla-carousel-react";
4
4
  import { ArrowLeft as z, ArrowRight as g } from "lucide-react";
5
5
  import { cn as m } from "@oneplatformdev/utils";
6
- import { Button as w } from "./ui15.js";
7
- const p = e.createContext(null);
6
+ import { Button as p } from "../Button/Button.js";
7
+ import "../Button/buttonVariants.js";
8
+ const w = e.createContext(null);
8
9
  function C() {
9
- const o = e.useContext(p);
10
+ const o = e.useContext(w);
10
11
  if (!o)
11
12
  throw new Error("useCarousel must be used within a <Carousel />");
12
13
  return o;
@@ -47,7 +48,7 @@ const D = e.forwardRef(
47
48
  r?.off("select", d);
48
49
  };
49
50
  }, [r, d]), /* @__PURE__ */ s(
50
- p.Provider,
51
+ w.Provider,
51
52
  {
52
53
  value: {
53
54
  carouselRef: v,
@@ -113,7 +114,7 @@ I.displayName = "CarouselItem";
113
114
  const j = e.forwardRef(({ className: o, variant: l = "outline-solid", size: t = "icon", ...a }, c) => {
114
115
  const { orientation: i, scrollPrev: u, canScrollPrev: f } = C();
115
116
  return /* @__PURE__ */ x(
116
- w,
117
+ p,
117
118
  {
118
119
  ref: c,
119
120
  variant: l,
@@ -137,7 +138,7 @@ j.displayName = "CarouselPrevious";
137
138
  const A = e.forwardRef(({ className: o, variant: l = "outline-solid", size: t = "icon", ...a }, c) => {
138
139
  const { orientation: i, scrollNext: u, canScrollNext: f } = C();
139
140
  return /* @__PURE__ */ x(
140
- w,
141
+ p,
141
142
  {
142
143
  ref: c,
143
144
  variant: l,
@@ -0,0 +1,8 @@
1
+ import { Carousel as r, CarouselContent as s, CarouselItem as u, CarouselNext as C, CarouselPrevious as a } from "./Carousel.js";
2
+ export {
3
+ r as Carousel,
4
+ s as CarouselContent,
5
+ u as CarouselItem,
6
+ C as CarouselNext,
7
+ a as CarouselPrevious
8
+ };
package/Chart/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import { ChartContainer as o, ChartLegend as r, ChartLegendContent as C, ChartStyle as n, ChartTooltip as a, ChartTooltipContent as h } from "./Chart.js";
2
+ export {
3
+ o as ChartContainer,
4
+ r as ChartLegend,
5
+ C as ChartLegendContent,
6
+ n as ChartStyle,
7
+ a as ChartTooltip,
8
+ h as ChartTooltipContent
9
+ };
@@ -1,36 +1,37 @@
1
1
  import { jsx as r, jsxs as l } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-checkbox";
2
+ import * as c from "@radix-ui/react-checkbox";
3
3
  import { MinusIcon as f, CheckIcon as p } from "lucide-react";
4
- import * as n from "react";
4
+ import * as m from "react";
5
5
  import { cn as i } from "@oneplatformdev/utils";
6
- import { Label as h } from "./ui45.js";
7
- const d = n.forwardRef(({ className: s, checked: o, indeterminate: e, ...a }, c) => {
8
- const m = e ? f : p;
6
+ import { Label as h } from "../Label/Label.js";
7
+ import "../Label/labelVariants.js";
8
+ const n = m.forwardRef(({ className: o, checked: s, indeterminate: e, ...a }, t) => {
9
+ const d = e ? f : p;
9
10
  return /* @__PURE__ */ r(
10
- t.Root,
11
+ c.Root,
11
12
  {
12
- ref: c,
13
+ ref: t,
13
14
  className: i(
14
15
  "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow-sm focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
15
- s
16
+ o
16
17
  ),
17
18
  ...a,
18
- checked: o ?? e,
19
+ checked: s ?? e,
19
20
  children: /* @__PURE__ */ r(
20
- t.Indicator,
21
+ c.Indicator,
21
22
  {
22
23
  className: i("flex items-center justify-center text-current"),
23
- children: /* @__PURE__ */ r(m, { className: "h-4 w-4" })
24
+ children: /* @__PURE__ */ r(d, { className: "h-4 w-4" })
24
25
  }
25
26
  )
26
27
  }
27
28
  );
28
29
  });
29
- d.displayName = t.Root.displayName;
30
- const u = n.forwardRef(({ label: s = "", children: o, labelProps: e, ...a }, c) => /* @__PURE__ */ l(
30
+ n.displayName = c.Root.displayName;
31
+ const u = m.forwardRef(({ label: o = "", children: s, labelProps: e, ...a }, t) => /* @__PURE__ */ l(
31
32
  h,
32
33
  {
33
- ref: c,
34
+ ref: t,
34
35
  ...e,
35
36
  className: i(
36
37
  "flex w-full items-start gap-3 font-normal py-3 cursor-pointer",
@@ -38,16 +39,16 @@ const u = n.forwardRef(({ label: s = "", children: o, labelProps: e, ...a }, c)
38
39
  ),
39
40
  style: e?.style,
40
41
  children: [
41
- /* @__PURE__ */ r(d, { ...a }),
42
+ /* @__PURE__ */ r(n, { ...a }),
42
43
  /* @__PURE__ */ l("div", { className: "flex flex-col w-full gap-3", children: [
43
- /* @__PURE__ */ r("span", { className: "flex flex-col justify-start leading-[16px]", children: s }),
44
- o
44
+ /* @__PURE__ */ r("span", { className: "flex flex-col justify-start leading-[16px]", children: o }),
45
+ s
45
46
  ] })
46
47
  ]
47
48
  }
48
49
  ));
49
50
  u.displayName = "CheckboxLabel";
50
51
  export {
51
- d as Checkbox,
52
+ n as Checkbox,
52
53
  u as CheckboxLabel
53
54
  };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,5 @@
1
+ import { Checkbox as b, CheckboxLabel as x } from "./Checkbox.js";
2
+ export {
3
+ b as Checkbox,
4
+ x as CheckboxLabel
5
+ };
@@ -0,0 +1,6 @@
1
+ import { Collapsible as o, CollapsibleContent as i, CollapsibleTrigger as p } from "./Collapsible.js";
2
+ export {
3
+ o as Collapsible,
4
+ i as CollapsibleContent,
5
+ p as CollapsibleTrigger
6
+ };
@@ -1,17 +1,19 @@
1
1
  import { jsx as e, jsxs as l, Fragment as j } from "react/jsx-runtime";
2
- import { forwardRef as W, useRef as X, useState as c, useEffect as _, useCallback as d, useMemo as O, useLayoutEffect as J } from "react";
2
+ import { forwardRef as W, useRef as X, useState as c, useEffect as _, useCallback as p, useMemo as O, useLayoutEffect as J } from "react";
3
+ import { LoadingMask as K } from "../LoadingMask/LoadingMask.js";
4
+ import "../LoadingMask/RenderLoadingMask.js";
5
+ import { Popover as Q, PopoverTrigger as Y, PopoverContent as Z } from "../Popover/Popover.js";
6
+ import { Button as $ } from "../Button/Button.js";
7
+ import "../Button/buttonVariants.js";
8
+ import { Command as ee, CommandInput as oe, CommandList as te, CommandGroup as ne, CommandEmpty as B, CommandItem as re } from "../Command/Command.js";
3
9
  import { cn as L } from "@oneplatformdev/utils";
4
- import { useDebounceCallback as K } from "@oneplatformdev/hooks";
5
- import { X as Q, ChevronsUpDown as Y } from "lucide-react";
6
- import { ComboboxOptions as Z } from "./ui91.js";
7
- import { Popover as $, PopoverTrigger as ee, PopoverContent as oe } from "./ui57.js";
8
- import { Button as te } from "./ui15.js";
9
- import { Command as ne, CommandInput as re, CommandList as ae, CommandGroup as se, CommandEmpty as B, CommandItem as le } from "./ui26.js";
10
- import { LoadingMask as ie } from "./ui49.js";
11
- const Ce = W(
10
+ import { useDebounceCallback as ae } from "@oneplatformdev/hooks";
11
+ import { X as se, ChevronsUpDown as le } from "lucide-react";
12
+ import { ComboboxOptions as ie } from "./ComboboxOptions.js";
13
+ const xe = W(
12
14
  (D, T) => {
13
15
  const {
14
- value: p,
16
+ value: m,
15
17
  onChange: A,
16
18
  placeholder: I,
17
19
  disabled: z,
@@ -19,7 +21,7 @@ const Ce = W(
19
21
  fetchOptions: G,
20
22
  options: u,
21
23
  emptyLabel: S = "No options",
22
- emptyAction: m,
24
+ emptyAction: d,
23
25
  commandInputAction: f,
24
26
  listHeadAction: h,
25
27
  onMount: g
@@ -29,7 +31,7 @@ const Ce = W(
29
31
  }, [u]);
30
32
  const R = async () => {
31
33
  a || (P(), C(""));
32
- }, P = d(async (o) => {
34
+ }, P = p(async (o) => {
33
35
  s(!0);
34
36
  try {
35
37
  const N = await G(o);
@@ -39,14 +41,14 @@ const Ce = W(
39
41
  } finally {
40
42
  s(!1);
41
43
  }
42
- }, []), U = K(P, 1e3, {
44
+ }, []), U = ae(P, 1e3, {
43
45
  leading: !1,
44
46
  trailing: !0
45
- }), q = d((o) => {
47
+ }), q = p((o) => {
46
48
  s(!0), C(o), U(o);
47
- }, []), k = d((o) => {
49
+ }, []), k = p((o) => {
48
50
  A(o.value), w(o), s(!1);
49
- }, []), H = d(() => {
51
+ }, []), H = p(() => {
50
52
  k({ value: "", label: "" }), w(void 0), s(!1);
51
53
  }, []), E = O(() => !!r && !t.length && !n, [n, t.length, r]), M = O(() => !t.length && !n, [n, t.length, r]), i = O(() => ({
52
54
  options: t,
@@ -61,7 +63,7 @@ const Ce = W(
61
63
  setLoading: s,
62
64
  isEmptyList: M,
63
65
  isSearchedEmptyList: E
64
- }), [n, a, t, r, x, M, E]), V = d(() => {
66
+ }), [n, a, t, r, x, M, E]), V = p(() => {
65
67
  if (!g) {
66
68
  b.current = !0;
67
69
  return;
@@ -73,15 +75,15 @@ const Ce = W(
73
75
  return J(() => (V(), () => {
74
76
  b.current = !1;
75
77
  }), []), /* @__PURE__ */ e("div", { className: "w-full", ref: T, children: /* @__PURE__ */ l(
76
- $,
78
+ Q,
77
79
  {
78
80
  open: a,
79
81
  onOpenChange: (o) => {
80
82
  y(o), o && R();
81
83
  },
82
84
  children: [
83
- /* @__PURE__ */ e(ee, { asChild: !0, className: "border-input", children: /* @__PURE__ */ l(
84
- te,
85
+ /* @__PURE__ */ e(Y, { asChild: !0, className: "border-input", children: /* @__PURE__ */ l(
86
+ $,
85
87
  {
86
88
  variant: "outline",
87
89
  role: "combobox",
@@ -95,8 +97,8 @@ const Ce = W(
95
97
  ),
96
98
  disabled: z,
97
99
  children: [
98
- /* @__PURE__ */ e("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: p ? t.find((o) => o.value === p)?.label || x?.label : /* @__PURE__ */ e("span", { className: "text-gray-400", children: I }) }),
99
- p ? /* @__PURE__ */ e(
100
+ /* @__PURE__ */ e("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: m ? t.find((o) => o.value === m)?.label || x?.label : /* @__PURE__ */ e("span", { className: "text-gray-400", children: I }) }),
101
+ m ? /* @__PURE__ */ e(
100
102
  "div",
101
103
  {
102
104
  className: L(
@@ -108,20 +110,20 @@ const Ce = W(
108
110
  onClick: (o) => {
109
111
  o.stopPropagation(), H();
110
112
  },
111
- children: /* @__PURE__ */ e(Q, {})
113
+ children: /* @__PURE__ */ e(se, {})
112
114
  }
113
- ) : /* @__PURE__ */ e(Y, { className: "opacity-50 w-4 h-4" })
115
+ ) : /* @__PURE__ */ e(le, { className: "opacity-50 w-4 h-4" })
114
116
  ]
115
117
  }
116
118
  ) }),
117
119
  /* @__PURE__ */ e(
118
- oe,
120
+ Z,
119
121
  {
120
122
  className: "w-(--radix-popper-anchor-width) max-w-none p-0",
121
123
  align: "start",
122
- children: /* @__PURE__ */ l(ne, { shouldFilter: !1, children: [
124
+ children: /* @__PURE__ */ l(ee, { shouldFilter: !1, children: [
123
125
  /* @__PURE__ */ e(
124
- re,
126
+ oe,
125
127
  {
126
128
  placeholder: F,
127
129
  value: r,
@@ -129,19 +131,19 @@ const Ce = W(
129
131
  }
130
132
  ),
131
133
  typeof f == "function" ? f(i) : f,
132
- /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ l(
133
- se,
134
+ /* @__PURE__ */ e(te, { children: /* @__PURE__ */ l(
135
+ ne,
134
136
  {
135
137
  className: L(!t.length && "p-0 shadow-none"),
136
138
  children: [
137
- n && /* @__PURE__ */ e(ie, { fullWidth: !0 }),
138
- !n && !!r && /* @__PURE__ */ e(j, { children: m ? /* @__PURE__ */ l(B, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
139
+ n && /* @__PURE__ */ e(K, { fullWidth: !0 }),
140
+ !n && !!r && /* @__PURE__ */ e(j, { children: d ? /* @__PURE__ */ l(B, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
139
141
  /* @__PURE__ */ e("span", { children: S }),
140
- typeof m == "function" ? m(i) : m
142
+ typeof d == "function" ? d(i) : d
141
143
  ] }) : /* @__PURE__ */ e(B, { children: S }) }),
142
144
  !n && /* @__PURE__ */ l(j, { children: [
143
145
  !!t.length && h && /* @__PURE__ */ e(
144
- le,
146
+ re,
145
147
  {
146
148
  asChild: !0,
147
149
  className: "w-full",
@@ -150,9 +152,9 @@ const Ce = W(
150
152
  "combobox-list-head-action"
151
153
  ),
152
154
  /* @__PURE__ */ e(
153
- Z,
155
+ ie,
154
156
  {
155
- value: p,
157
+ value: m,
156
158
  options: t,
157
159
  onChangeOption: k,
158
160
  setOpen: y
@@ -171,5 +173,5 @@ const Ce = W(
171
173
  }
172
174
  );
173
175
  export {
174
- Ce as Combobox
176
+ xe as Combobox
175
177
  };
@@ -0,0 +1 @@
1
+
@@ -1,4 +1,4 @@
1
- import { IComboboxOptionsNodeProps } from '..';
1
+ import { IComboboxOptionsNodeProps } from './Combobox.types';
2
2
  export declare const ComboboxOptionItem: import('react').ForwardRefExoticComponent<IComboboxOptionsNodeProps & {
3
3
  children?: import('react').ReactNode | undefined;
4
4
  } & import('react').RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"ComboboxOptionItem.d.ts","sourceRoot":"","sources":["../../src/Combobox/ComboboxOptionItem.tsx"],"names":[],"mappings":"AACA,OAAO,EAAe,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAM5E,eAAO,MAAM,kBAAkB;;kDAsC7B,CAAC"}
1
+ {"version":3,"file":"ComboboxOptionItem.d.ts","sourceRoot":"","sources":["../../src/Combobox/ComboboxOptionItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAM7D,eAAO,MAAM,kBAAkB;;kDAsC7B,CAAC"}
@@ -1,37 +1,36 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
1
+ import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
2
  import { forwardRef as c } from "react";
3
- /* empty css */
4
- import { Check as f } from "lucide-react";
5
- import { cn as a } from "@oneplatformdev/utils";
6
- import { CommandItem as d } from "./ui26.js";
7
- const u = 8, O = c((i, r) => {
8
- const { children: m, setOpen: n, option: e, onChangeOption: o, value: l = "", deep: p = 0 } = i;
3
+ import { CommandItem as f } from "../Command/Command.js";
4
+ import { Check as d } from "lucide-react";
5
+ import { cn as t } from "@oneplatformdev/utils";
6
+ const u = 8, C = c((i, n) => {
7
+ const { children: r, setOpen: m, option: e, onChangeOption: o, value: l = "", deep: p = 0 } = i;
9
8
  return /* @__PURE__ */ s(
10
- d,
9
+ f,
11
10
  {
12
- ref: r,
11
+ ref: n,
13
12
  value: e.value,
14
13
  onSelect: () => {
15
- l === e.value ? o?.({ value: "", label: "" }) : o?.(e), n(!1);
14
+ l === e.value ? o?.({ value: "", label: "" }) : o?.(e), m(!1);
16
15
  },
17
16
  style: {
18
17
  paddingLeft: (p + 1) * u
19
18
  },
20
19
  children: [
21
- m,
22
- /* @__PURE__ */ t(
20
+ r,
21
+ /* @__PURE__ */ a(
23
22
  "span",
24
23
  {
25
- className: a(
24
+ className: t(
26
25
  "overflow-hidden whitespace-wrap text-ellipsis line-clamp-2"
27
26
  ),
28
27
  children: e.label
29
28
  }
30
29
  ),
31
- /* @__PURE__ */ t(
32
- f,
30
+ /* @__PURE__ */ a(
31
+ d,
33
32
  {
34
- className: a(
33
+ className: t(
35
34
  "ml-auto",
36
35
  l === e.value ? "opacity-100" : "opacity-0"
37
36
  )
@@ -43,5 +42,5 @@ const u = 8, O = c((i, r) => {
43
42
  );
44
43
  });
45
44
  export {
46
- O as ComboboxOptionItem
45
+ C as ComboboxOptionItem
47
46
  };
@@ -0,0 +1,64 @@
1
+ import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
+ import { Button as u } from "../Button/Button.js";
3
+ import "../Button/buttonVariants.js";
4
+ import { forwardRef as c, useState as h } from "react";
5
+ import { Collapsible as b, CollapsibleTrigger as g, CollapsibleContent as C } from "../Collapsible/Collapsible.js";
6
+ import { ComboboxOptionItem as p } from "./ComboboxOptionItem.js";
7
+ import { ChevronDownIcon as x } from "lucide-react";
8
+ import { cn as a } from "@oneplatformdev/utils";
9
+ const d = c((e, n) => {
10
+ const { option: s, deep: i = 0 } = e, [t, l] = h(!0);
11
+ return s?.items?.length ? /* @__PURE__ */ m(
12
+ b,
13
+ {
14
+ ref: n,
15
+ open: t,
16
+ onOpenChange: l,
17
+ "data-opened": t,
18
+ className: a("group/collapsible"),
19
+ children: [
20
+ /* @__PURE__ */ o(p, { ...e, children: /* @__PURE__ */ o(g, { asChild: !0, children: /* @__PURE__ */ m(
21
+ u,
22
+ {
23
+ onClick: (r) => {
24
+ r?.preventDefault(), r?.stopPropagation(), l((f) => !f);
25
+ },
26
+ type: "button",
27
+ variant: "ghost",
28
+ size: "sm",
29
+ className: a("aspect-square size-6", "transition-transform"),
30
+ children: [
31
+ /* @__PURE__ */ o(
32
+ x,
33
+ {
34
+ className: a(
35
+ "size-5!",
36
+ "transition-transform",
37
+ t && "rotate-180"
38
+ )
39
+ }
40
+ ),
41
+ /* @__PURE__ */ o("span", { className: "sr-only", children: "Toggle" })
42
+ ]
43
+ }
44
+ ) }) }),
45
+ /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o("div", { className: "flex flex-col gap-0", children: s?.items.map((r) => /* @__PURE__ */ o(
46
+ d,
47
+ {
48
+ ...e,
49
+ deep: i + 1,
50
+ option: r
51
+ },
52
+ r.value
53
+ )) }) })
54
+ ]
55
+ }
56
+ ) : /* @__PURE__ */ o(p, { ...e, ref: n });
57
+ }), I = c((e, n) => {
58
+ const { options: s = [], ...i } = e;
59
+ return /* @__PURE__ */ o("div", { ref: n, className: "flex flex-col gap-0", children: s.map((t) => /* @__PURE__ */ o(d, { ...i, option: t }, t.value)) });
60
+ });
61
+ export {
62
+ I as ComboboxOptions,
63
+ d as ComboboxOptionsNode
64
+ };
@@ -0,0 +1,4 @@
1
+ import { Combobox as m } from "./Combobox.js";
2
+ export {
3
+ m as Combobox
4
+ };
@@ -1,13 +1,14 @@
1
- import { jsx as d, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
2
2
  import * as m from "react";
3
3
  import { Command as t } from "cmdk";
4
4
  import { SearchIcon as p } from "lucide-react";
5
5
  import { cn as r } from "@oneplatformdev/utils";
6
- import { Dialog as i, DialogContent as l } from "./ui29.js";
7
- const n = m.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
6
+ import { Dialog as i, DialogContent as l } from "../Dialog/Dialog.js";
7
+ import "../Dialog/DialogOverlayScope.js";
8
+ const n = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
8
9
  t,
9
10
  {
10
- ref: o,
11
+ ref: d,
11
12
  className: r(
12
13
  "flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
13
14
  e
@@ -16,12 +17,12 @@ const n = m.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
16
17
  }
17
18
  ));
18
19
  n.displayName = t.displayName;
19
- const C = ({ children: e, ...a }) => /* @__PURE__ */ d(i, { ...a, children: /* @__PURE__ */ d(l, { className: "overflow-hidden p-0", children: /* @__PURE__ */ d(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), c = m.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
20
- /* @__PURE__ */ d(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
21
- /* @__PURE__ */ d(
20
+ const b = ({ children: e, ...a }) => /* @__PURE__ */ o(i, { ...a, children: /* @__PURE__ */ o(l, { className: "overflow-hidden p-0", children: /* @__PURE__ */ o(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), c = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ s("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
21
+ /* @__PURE__ */ o(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
22
+ /* @__PURE__ */ o(
22
23
  t.Input,
23
24
  {
24
- ref: o,
25
+ ref: d,
25
26
  className: r(
26
27
  "flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
27
28
  e
@@ -31,16 +32,16 @@ const C = ({ children: e, ...a }) => /* @__PURE__ */ d(i, { ...a, children: /* @
31
32
  )
32
33
  ] }));
33
34
  c.displayName = t.Input.displayName;
34
- const u = m.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
35
+ const u = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
35
36
  t.List,
36
37
  {
37
- ref: o,
38
+ ref: d,
38
39
  className: r("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
39
40
  ...a
40
41
  }
41
42
  ));
42
43
  u.displayName = t.List.displayName;
43
- const f = m.forwardRef((e, a) => /* @__PURE__ */ d(
44
+ const f = m.forwardRef((e, a) => /* @__PURE__ */ o(
44
45
  t.Empty,
45
46
  {
46
47
  ref: a,
@@ -49,10 +50,10 @@ const f = m.forwardRef((e, a) => /* @__PURE__ */ d(
49
50
  }
50
51
  ));
51
52
  f.displayName = t.Empty.displayName;
52
- const g = m.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
53
+ const g = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
53
54
  t.Group,
54
55
  {
55
- ref: o,
56
+ ref: d,
56
57
  className: r(
57
58
  "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
58
59
  e
@@ -61,19 +62,19 @@ const g = m.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
61
62
  }
62
63
  ));
63
64
  g.displayName = t.Group.displayName;
64
- const x = m.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
65
+ const x = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
65
66
  t.Separator,
66
67
  {
67
- ref: o,
68
+ ref: d,
68
69
  className: r("-mx-1 h-px bg-border", e),
69
70
  ...a
70
71
  }
71
72
  ));
72
73
  x.displayName = t.Separator.displayName;
73
- const h = m.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ d(
74
+ const h = m.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ o(
74
75
  t.Item,
75
76
  {
76
- ref: o,
77
+ ref: d,
77
78
  className: r(
78
79
  "relative flex gap-2 select-none items-center rounded-sm",
79
80
  "min-h-8 px-2 py-1",
@@ -92,7 +93,7 @@ h.displayName = t.Item.displayName;
92
93
  const y = ({
93
94
  className: e,
94
95
  ...a
95
- }) => /* @__PURE__ */ d(
96
+ }) => /* @__PURE__ */ o(
96
97
  "span",
97
98
  {
98
99
  className: r(
@@ -105,7 +106,7 @@ const y = ({
105
106
  y.displayName = "CommandShortcut";
106
107
  export {
107
108
  n as Command,
108
- C as CommandDialog,
109
+ b as CommandDialog,
109
110
  f as CommandEmpty,
110
111
  g as CommandGroup,
111
112
  c as CommandInput,
@@ -0,0 +1,12 @@
1
+ import { Command as a, CommandDialog as n, CommandEmpty as d, CommandGroup as C, CommandInput as t, CommandItem as r, CommandList as p, CommandSeparator as e, CommandShortcut as u } from "./Command.js";
2
+ export {
3
+ a as Command,
4
+ n as CommandDialog,
5
+ d as CommandEmpty,
6
+ C as CommandGroup,
7
+ t as CommandInput,
8
+ r as CommandItem,
9
+ p as CommandList,
10
+ e as CommandSeparator,
11
+ u as CommandShortcut
12
+ };