@oneplatformdev/ui 0.0.1-beta.64 → 0.0.1-beta.68

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 (61) hide show
  1. package/Alert/Alert.mjs +7 -6
  2. package/AreaChart/AreaChart.mjs +5 -4
  3. package/Badge/Badge.mjs +7 -6
  4. package/Button/buttonVariants.mjs +3 -3
  5. package/Calendar/Calendar.mjs +1 -0
  6. package/Checkbox/Checkbox.d.ts +5 -4
  7. package/Checkbox/Checkbox.mjs +48 -21
  8. package/Checkbox/Checkbox.types.d.ts +10 -0
  9. package/Checkbox/index.d.ts +2 -1
  10. package/Checkbox/index.mjs +3 -2
  11. package/Combobox/Combobox.d.ts +2 -2
  12. package/Combobox/Combobox.mjs +55 -53
  13. package/Command/Command.mjs +3 -2
  14. package/DataTable/DataTable.mjs +16 -15
  15. package/Dialog/Dialog.d.ts +2 -2
  16. package/Dialog/Dialog.mjs +14 -12
  17. package/Dropzone/Dropzone.mjs +1 -1
  18. package/Dropzone/DropzoneFilePreview.mjs +1 -1
  19. package/Dropzone/index.mjs +1 -1
  20. package/{DropzoneFilePreview-Dhtv8F4u.js → DropzoneFilePreview-C-SoCoO0.js} +16 -15
  21. package/Form/Form.mjs +5 -4
  22. package/Form/FormRenderControl.mjs +7 -6
  23. package/FormCheckbox/FormCheckbox.d.ts +1 -1
  24. package/FormCheckbox/FormCheckbox.mjs +24 -23
  25. package/FormCheckbox/FormCheckbox.types.d.ts +3 -2
  26. package/FormCombobox/FormCombobox.mjs +13 -12
  27. package/FormDatePicker/FormDatePicker.mjs +7 -6
  28. package/FormDropzone/FormDropzone.mjs +7 -6
  29. package/FormInput/FormInput.mjs +7 -6
  30. package/FormRadio/FormRadio.mjs +11 -10
  31. package/FormSelect/FormSelect.mjs +6 -5
  32. package/FormTextarea/FormTextarea.mjs +10 -9
  33. package/Header/Header.mjs +7 -6
  34. package/Label/Label.d.ts +2 -2
  35. package/Label/Label.mjs +7 -6
  36. package/Label/labelVariants.mjs +1 -1
  37. package/LazyLoader/LazyLoader.mjs +5 -4
  38. package/LoadingMask/LoadingMask.d.ts +4 -1
  39. package/LoadingMask/LoadingMask.mjs +19 -56
  40. package/LoadingMask/LoadingMask.types.d.ts +5 -0
  41. package/LoadingMask/RenderLoadingMask.d.ts +3 -0
  42. package/LoadingMask/RenderLoadingMask.mjs +108 -0
  43. package/LoadingMask/index.d.ts +2 -0
  44. package/LoadingMask/index.mjs +4 -2
  45. package/LoadingProgress/LoadingProgress.mjs +3 -2
  46. package/Radio/Radio.mjs +8 -7
  47. package/ScrollArea/ScrollArea.d.ts +2 -2
  48. package/ScrollArea/ScrollArea.mjs +26 -13
  49. package/Skeleton/Skeleton.mjs +9 -8
  50. package/TablePagination/TablePagination.mjs +9 -8
  51. package/Textarea/Textarea.mjs +5 -72
  52. package/Textarea/index.mjs +2 -2
  53. package/Textarea/useAutosizeTextArea.mjs +65 -18
  54. package/Textarea-D1CCXy7E.js +149 -0
  55. package/Theme/ThemeProvider.mjs +14 -13
  56. package/Toast/Toast.mjs +3 -2
  57. package/ToggleGroup/ToggleGroup.mjs +7 -6
  58. package/Tooltip/Tooltip.mjs +3 -2
  59. package/index.css +1 -1
  60. package/index.mjs +287 -284
  61. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { Dropzone as r } from "./Dropzone.mjs";
2
- import { D as T, a as _ } from "../DropzoneFilePreview-Dhtv8F4u.js";
2
+ import { D as T, a as _ } from "../DropzoneFilePreview-C-SoCoO0.js";
3
3
  export {
4
4
  T as DEFAULT_FILE_TYPES,
5
5
  _ as DEFAULT_IMAGES_TYPES,
@@ -1,9 +1,10 @@
1
- import { jsx as l, jsxs as d } from "react/jsx-runtime";
2
- import { useState as m, useEffect as f } from "react";
1
+ import { jsx as o, jsxs as m } from "react/jsx-runtime";
2
+ import { useState as d, useEffect as f } from "react";
3
3
  import { File as s } from "lucide-react";
4
- import { isFile as o } from "./Dropzone/DropzoneUtils.mjs";
4
+ import "react-dropzone";
5
+ import { isFile as l } from "./Dropzone/DropzoneUtils.mjs";
5
6
  import { cn as c } from "@oneplatformdev/utils";
6
- const h = [
7
+ const j = [
7
8
  "application/msword",
8
9
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
9
10
  "text/csv",
@@ -15,11 +16,11 @@ const h = [
15
16
  "image/jpg",
16
17
  "image/webp",
17
18
  "image/gif"
18
- ], j = ({ item: e, styles: r }) => {
19
- const [t, a] = m(null), p = o(e) && u.includes(e.type);
19
+ ], E = ({ item: e, styles: r }) => {
20
+ const [t, a] = d(null), p = l(e) && u.includes(e.type);
20
21
  return f(() => {
21
22
  let n = null;
22
- if (o(e) && p) {
23
+ if (l(e) && p) {
23
24
  const i = new FileReader();
24
25
  return i.onloadend = () => a(i.result), i.readAsDataURL(e), () => a(null);
25
26
  } else {
@@ -30,21 +31,21 @@ const h = [
30
31
  a(null);
31
32
  }
32
33
  return () => a(null);
33
- }, [e, p]), /* @__PURE__ */ l(
34
+ }, [e, p]), /* @__PURE__ */ o(
34
35
  "div",
35
36
  {
36
37
  className: c(
37
38
  "w-32 h-32 border border-gray-300 rounded-md overflow-hidden flex items-center justify-center",
38
39
  r == null ? void 0 : r.previewWraper
39
40
  ),
40
- children: t ? /* @__PURE__ */ l(
41
+ children: t ? /* @__PURE__ */ o(
41
42
  "img",
42
43
  {
43
44
  src: t,
44
- alt: o(e) ? e.name : "external-image",
45
+ alt: l(e) ? e.name : "external-image",
45
46
  className: c("w-full h-full object-cover", r == null ? void 0 : r.previewImage)
46
47
  }
47
- ) : /* @__PURE__ */ d(
48
+ ) : /* @__PURE__ */ m(
48
49
  "div",
49
50
  {
50
51
  className: c(
@@ -52,8 +53,8 @@ const h = [
52
53
  r == null ? void 0 : r.previewFile
53
54
  ),
54
55
  children: [
55
- /* @__PURE__ */ l(s, { className: "w-6 h-6" }),
56
- o(e) ? /* @__PURE__ */ l("span", { className: "text-xs break-all", children: e.name }) : /* @__PURE__ */ l("span", { className: "text-xs break-all", children: e })
56
+ /* @__PURE__ */ o(s, { className: "w-6 h-6" }),
57
+ l(e) ? /* @__PURE__ */ o("span", { className: "text-xs break-all", children: e.name }) : /* @__PURE__ */ o("span", { className: "text-xs break-all", children: e })
57
58
  ]
58
59
  }
59
60
  )
@@ -61,7 +62,7 @@ const h = [
61
62
  );
62
63
  };
63
64
  export {
64
- h as D,
65
- j as F,
65
+ j as D,
66
+ E as F,
66
67
  u as a
67
68
  };
package/Form/Form.mjs CHANGED
@@ -1,13 +1,14 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import * as s from "react";
3
+ import "@radix-ui/react-label";
3
4
  import { Slot as F } from "@radix-ui/react-slot";
4
5
  import { FormProvider as u, Controller as p, useFormContext as x } from "react-hook-form";
5
6
  import { cn as a } from "@oneplatformdev/utils";
6
7
  import { Label as I } from "../Label/Label.mjs";
7
8
  import "../Label/labelVariants.mjs";
8
- const M = u, f = s.createContext(
9
+ const S = u, f = s.createContext(
9
10
  {}
10
- ), S = ({
11
+ ), L = ({
11
12
  ...e
12
13
  }) => /* @__PURE__ */ i(f.Provider, { value: { name: e.name }, children: /* @__PURE__ */ i(p, { ...e }) }), d = () => {
13
14
  const e = s.useContext(f), o = s.useContext(l), { getFieldState: r, formState: t } = x(), m = r(e.name, t);
@@ -84,10 +85,10 @@ const w = s.forwardRef(({ className: e, children: o, ...r }, t) => {
84
85
  });
85
86
  w.displayName = "FormMessage";
86
87
  export {
87
- M as Form,
88
+ S as Form,
88
89
  v as FormControl,
89
90
  N as FormDescription,
90
- S as FormField,
91
+ L as FormField,
91
92
  C as FormItem,
92
93
  g as FormLabel,
93
94
  w as FormMessage,
@@ -1,13 +1,14 @@
1
- import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
- import { FormField as d, FormItem as i, FormLabel as F, FormMessage as p } from "./Form.mjs";
3
- const b = (e) => {
1
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
2
+ import { FormField as a, FormItem as d, FormLabel as F, FormMessage as p } from "./Form.mjs";
3
+ import "react-hook-form";
4
+ const h = (e) => {
4
5
  const { form: n, name: m, label: o, render: t, containerProps: l = {}, ...s } = e;
5
6
  return /* @__PURE__ */ r(
6
- d,
7
+ a,
7
8
  {
8
9
  control: n.control,
9
10
  name: m,
10
- render: (c) => /* @__PURE__ */ a(i, { ...l, children: [
11
+ render: (c) => /* @__PURE__ */ i(d, { ...l, children: [
11
12
  !!o && /* @__PURE__ */ r(F, { children: o }),
12
13
  t(c),
13
14
  /* @__PURE__ */ r(p, {})
@@ -17,5 +18,5 @@ const b = (e) => {
17
18
  );
18
19
  };
19
20
  export {
20
- b as FormRenderControl
21
+ h as FormRenderControl
21
22
  };
@@ -1,4 +1,4 @@
1
- import { FieldValues } from 'react-hook-form';
2
1
  import { FormCheckboxProps } from './FormCheckbox.types';
2
+ import { FieldValues } from 'react-hook-form';
3
3
 
4
4
  export declare const FormCheckbox: <Data extends FieldValues>(props: FormCheckboxProps<Data>) => import("react/jsx-runtime").JSX.Element;
@@ -1,30 +1,31 @@
1
- import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
- import { Checkbox as l } from "../Checkbox/Checkbox.mjs";
3
- import { FormLabel as h } from "../Form/Form.mjs";
4
- import { FormRenderControl as d } from "../Form/FormRenderControl.mjs";
5
- const b = (o) => {
6
- const { form: m, label: n, name: t, disabled: a, ...c } = o;
7
- return /* @__PURE__ */ r(
8
- d,
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import "react-hook-form";
3
+ import { FormControl as p } from "../Form/Form.mjs";
4
+ import { FormRenderControl as h } from "../Form/FormRenderControl.mjs";
5
+ import { CheckboxLabel as s } from "../Checkbox/Checkbox.mjs";
6
+ const k = (n) => {
7
+ const { form: c, label: a, name: l, onCheckedChange: o, ...m } = n;
8
+ return /* @__PURE__ */ e(
9
+ h,
9
10
  {
10
- form: m,
11
- name: t,
12
- render: ({ field: e }) => /* @__PURE__ */ s("div", { className: "flex items-center gap-2 mt-4", children: [
13
- /* @__PURE__ */ r(
14
- l,
15
- {
16
- ...e,
17
- checked: e.value || !1,
18
- onCheckedChange: e.onChange,
19
- disabled: a
11
+ form: c,
12
+ name: l,
13
+ render: ({ field: r }) => /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
14
+ s,
15
+ {
16
+ ...r,
17
+ ...m,
18
+ label: a,
19
+ checked: r.value || !1,
20
+ onCheckedChange: (t) => {
21
+ r.onChange(t), o == null || o(t);
20
22
  }
21
- ),
22
- /* @__PURE__ */ r(h, { children: n })
23
- ] }),
24
- ...c
23
+ }
24
+ ) }),
25
+ ...m
25
26
  }
26
27
  );
27
28
  };
28
29
  export {
29
- b as FormCheckbox
30
+ k as FormCheckbox
30
31
  };
@@ -1,6 +1,7 @@
1
- import { FieldValues } from 'react-hook-form';
2
1
  import { FormRenderControlExtendProps } from '../Form';
2
+ import { FieldValues } from 'react-hook-form';
3
+ import { CheckboxProps } from '../Checkbox';
3
4
 
4
- export interface FormCheckboxProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data> {
5
+ export interface FormCheckboxProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data>, Omit<CheckboxProps, 'form' | 'name' | 'label'> {
5
6
  disabled?: boolean;
6
7
  }
@@ -1,19 +1,20 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { FormControl as b } from "../Form/Form.mjs";
3
- import { FormRenderControl as p } from "../Form/FormRenderControl.mjs";
4
- import { Combobox as a } from "../Combobox/Combobox.mjs";
5
- const x = (m) => {
6
- const { form: n, label: e, name: t, ...C } = m;
2
+ import { FormControl as C } from "../Form/Form.mjs";
3
+ import { FormRenderControl as b } from "../Form/FormRenderControl.mjs";
4
+ import { Combobox as i } from "../Combobox/Combobox.mjs";
5
+ import "react-hook-form";
6
+ const c = (m) => {
7
+ const { form: n, label: t, name: e, ...p } = m;
7
8
  return /* @__PURE__ */ o(
8
- p,
9
+ b,
9
10
  {
10
11
  form: n,
11
- label: e,
12
- name: t,
13
- render: ({ field: r }) => /* @__PURE__ */ o(b, { children: /* @__PURE__ */ o(
14
- a,
12
+ label: t,
13
+ name: e,
14
+ render: ({ field: r }) => /* @__PURE__ */ o(C, { children: /* @__PURE__ */ o(
15
+ i,
15
16
  {
16
- ...C,
17
+ ...p,
17
18
  ...r,
18
19
  onChange: r.onChange
19
20
  }
@@ -22,5 +23,5 @@ const x = (m) => {
22
23
  );
23
24
  };
24
25
  export {
25
- x as FormCombobox
26
+ c as FormCombobox
26
27
  };
@@ -1,8 +1,9 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { DatePicker as l } from "../DatePicker/DatePicker.mjs";
3
- import { FormControl as p } from "../Form/Form.mjs";
2
+ import { DatePicker as p } from "../DatePicker/DatePicker.mjs";
3
+ import { FormControl as l } from "../Form/Form.mjs";
4
4
  import { FormRenderControl as s } from "../Form/FormRenderControl.mjs";
5
- const h = (m) => {
5
+ import "react-hook-form";
6
+ const k = (m) => {
6
7
  const { form: n, name: a, label: c, onDateChange: r, ...i } = m;
7
8
  return /* @__PURE__ */ e(
8
9
  s,
@@ -10,8 +11,8 @@ const h = (m) => {
10
11
  form: n,
11
12
  name: a,
12
13
  label: c,
13
- render: ({ field: o }) => /* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
14
- l,
14
+ render: ({ field: o }) => /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(
15
+ p,
15
16
  {
16
17
  ...o,
17
18
  ...i,
@@ -25,5 +26,5 @@ const h = (m) => {
25
26
  );
26
27
  };
27
28
  export {
28
- h as FormDatePicker
29
+ k as FormDatePicker
29
30
  };
@@ -1,19 +1,20 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
2
  import { FormControl as a } from "../Form/Form.mjs";
3
- import { FormRenderControl as l } from "../Form/FormRenderControl.mjs";
4
- import { Dropzone as f } from "../Dropzone/Dropzone.mjs";
5
- const h = (n) => {
3
+ import { FormRenderControl as i } from "../Form/FormRenderControl.mjs";
4
+ import { Dropzone as l } from "../Dropzone/Dropzone.mjs";
5
+ import "react-hook-form";
6
+ const F = (n) => {
6
7
  const { form: e, label: m, name: t, ...p } = n;
7
8
  return /* @__PURE__ */ o(
8
- l,
9
+ i,
9
10
  {
10
11
  form: e,
11
12
  label: m,
12
13
  name: t,
13
- render: ({ field: r }) => /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(f, { ...p, ...r, onChangeValue: r.onChange }) })
14
+ render: ({ field: r }) => /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(l, { ...p, ...r, onChangeValue: r.onChange }) })
14
15
  }
15
16
  );
16
17
  };
17
18
  export {
18
- h as FormDropzone
19
+ F as FormDropzone
19
20
  };
@@ -1,17 +1,18 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
2
  import { FormControl as l } from "../Form/Form.mjs";
3
- import { FormRenderControl as u } from "../Form/FormRenderControl.mjs";
4
- import { Input as a } from "../Input/Input.mjs";
5
- const F = (m) => {
3
+ import { FormRenderControl as i } from "../Form/FormRenderControl.mjs";
4
+ import { Input as u } from "../Input/Input.mjs";
5
+ import "react-hook-form";
6
+ const d = (m) => {
6
7
  const { form: t, label: e, name: n, ...p } = m;
7
8
  return /* @__PURE__ */ r(
8
- u,
9
+ i,
9
10
  {
10
11
  form: t,
11
12
  name: n,
12
13
  label: e,
13
14
  render: ({ field: o }) => /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
14
- a,
15
+ u,
15
16
  {
16
17
  ...o,
17
18
  value: o.value || "",
@@ -22,5 +23,5 @@ const F = (m) => {
22
23
  );
23
24
  };
24
25
  export {
25
- F as FormInput
26
+ d as FormInput
26
27
  };
@@ -1,7 +1,8 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { FormControl as t, FormItem as F } from "../Form/Form.mjs";
3
- import { FormRenderControl as f } from "../Form/FormRenderControl.mjs";
4
- import { Radio as i } from "../Radio/Radio.mjs";
2
+ import "react-hook-form";
3
+ import { FormControl as t, FormItem as v } from "../Form/Form.mjs";
4
+ import { FormRenderControl as F } from "../Form/FormRenderControl.mjs";
5
+ import { Radio as f } from "../Radio/Radio.mjs";
5
6
  const b = (n) => {
6
7
  const {
7
8
  form: u,
@@ -9,27 +10,27 @@ const b = (n) => {
9
10
  label: c,
10
11
  onValueChange: m,
11
12
  value: h,
12
- defaultValue: s,
13
+ defaultValue: i,
13
14
  renderOption: a,
14
- ...v
15
+ ...s
15
16
  } = n;
16
17
  return /* @__PURE__ */ e(
17
- f,
18
+ F,
18
19
  {
19
20
  form: u,
20
21
  name: d,
21
22
  label: c,
22
23
  render: ({ field: o }) => /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(
23
- i,
24
+ f,
24
25
  {
25
26
  ...o,
26
- ...v,
27
- defaultValue: s || o.value,
27
+ ...s,
28
+ defaultValue: i || o.value,
28
29
  value: h || o.value,
29
30
  onValueChange: (r) => {
30
31
  o.onChange(r), m == null || m(r);
31
32
  },
32
- renderOption: (r, l) => /* @__PURE__ */ e(F, { children: /* @__PURE__ */ e(t, { children: (a == null ? void 0 : a(r, l)) || /* @__PURE__ */ e(l, { ...r }) }) }, r.value)
33
+ renderOption: (r, l) => /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(t, { children: (a == null ? void 0 : a(r, l)) || /* @__PURE__ */ e(l, { ...r }) }) }, r.value)
33
34
  }
34
35
  ) })
35
36
  }
@@ -3,20 +3,21 @@ import { FormControl as f } from "../Form/Form.mjs";
3
3
  import { FormRenderControl as d } from "../Form/FormRenderControl.mjs";
4
4
  import "../Select/SelectRoot.mjs";
5
5
  import { Select as g } from "../Select/Select.mjs";
6
- const S = (n) => {
6
+ import "react-hook-form";
7
+ const b = (m) => {
7
8
  const {
8
- form: m,
9
+ form: n,
9
10
  label: i,
10
11
  name: p,
11
12
  options: l = [],
12
13
  onChange: r,
13
14
  containerProps: c,
14
15
  ...s
15
- } = n;
16
+ } = m;
16
17
  return /* @__PURE__ */ e(
17
18
  d,
18
19
  {
19
- form: m,
20
+ form: n,
20
21
  name: p,
21
22
  label: i,
22
23
  containerProps: c,
@@ -36,5 +37,5 @@ const S = (n) => {
36
37
  );
37
38
  };
38
39
  export {
39
- S as FormSelect
40
+ b as FormSelect
40
41
  };
@@ -1,27 +1,28 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { FormControl as p } from "../Form/Form.mjs";
3
- import { FormRenderControl as i } from "../Form/FormRenderControl.mjs";
4
- import { Textarea as s } from "../Textarea/Textarea.mjs";
5
- const F = (e) => {
6
- const { form: t, label: m, name: n, containerProps: a, ...l } = e;
2
+ import { FormControl as i } from "../Form/Form.mjs";
3
+ import { FormRenderControl as l } from "../Form/FormRenderControl.mjs";
4
+ import "react-hook-form";
5
+ import { T as s } from "../Textarea-D1CCXy7E.js";
6
+ const T = (e) => {
7
+ const { form: t, label: m, name: n, containerProps: a, ...p } = e;
7
8
  return /* @__PURE__ */ r(
8
- i,
9
+ l,
9
10
  {
10
11
  form: t,
11
12
  name: n,
12
13
  label: m,
13
14
  containerProps: a,
14
- render: ({ field: o }) => /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(
15
+ render: ({ field: o }) => /* @__PURE__ */ r(i, { children: /* @__PURE__ */ r(
15
16
  s,
16
17
  {
17
18
  ...o,
18
19
  value: o.value || "",
19
- ...l
20
+ ...p
20
21
  }
21
22
  ) })
22
23
  }
23
24
  );
24
25
  };
25
26
  export {
26
- F as FormTextarea
27
+ T as FormTextarea
27
28
  };
package/Header/Header.mjs CHANGED
@@ -1,18 +1,19 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { SidebarTrigger as t } from "../Sidebar/Sidebar.mjs";
2
+ import "react";
3
+ import { SidebarTrigger as s } from "../Sidebar/Sidebar.mjs";
3
4
  import { Separator as l } from "../Separator/Separator.mjs";
4
- const m = (s) => {
5
+ const h = (t) => {
5
6
  const {
6
7
  children: r,
7
8
  hideTrigger: a = !1
8
- } = s;
9
+ } = t;
9
10
  return /* @__PURE__ */ i(
10
11
  "header",
11
12
  {
12
13
  className: "flex h-16 shrink-0 items-center justify-between gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12",
13
14
  children: [
14
15
  !a && /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
15
- /* @__PURE__ */ e(t, { className: "ml-1" }),
16
+ /* @__PURE__ */ e(s, { className: "ml-1" }),
16
17
  /* @__PURE__ */ e(l, { orientation: "vertical", className: "mr-2 h-4" })
17
18
  ] }),
18
19
  a ? r : /* @__PURE__ */ e("div", { className: "flex-1 text-right pr-6", children: r })
@@ -21,6 +22,6 @@ const m = (s) => {
21
22
  );
22
23
  };
23
24
  export {
24
- m as Header,
25
- m as default
25
+ h as Header,
26
+ h as default
26
27
  };
package/Label/Label.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import * as React from "react";
3
- import * as LabelPrimitive from "@radix-ui/react-label";
2
+ import * as React from 'react';
3
+ import * as LabelPrimitive from '@radix-ui/react-label';
4
4
  declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import('class-variance-authority/dist/types').ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
5
5
  export { Label };
package/Label/Label.mjs CHANGED
@@ -1,17 +1,18 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
3
  import * as o from "@radix-ui/react-label";
4
+ import "class-variance-authority";
4
5
  import { cn as e } from "@oneplatformdev/utils";
5
- import { labelVariants as s } from "./labelVariants.mjs";
6
- const p = i.forwardRef(({ className: a, ...r }, m) => /* @__PURE__ */ t(
6
+ import { labelVariants as p } from "./labelVariants.mjs";
7
+ const s = i.forwardRef(({ className: r, ...a }, m) => /* @__PURE__ */ t(
7
8
  o.Root,
8
9
  {
9
10
  ref: m,
10
- className: e(s(), a),
11
- ...r
11
+ className: e(p(), r),
12
+ ...a
12
13
  }
13
14
  ));
14
- p.displayName = o.Root.displayName;
15
+ s.displayName = o.Root.displayName;
15
16
  export {
16
- p as Label
17
+ s as Label
17
18
  };
@@ -1,6 +1,6 @@
1
1
  import { cva as e } from "class-variance-authority";
2
2
  const a = e(
3
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
3
+ "text-md text-[#363B4E] font-medium leading-[150%] peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
4
4
  );
5
5
  export {
6
6
  a as labelVariants
@@ -1,7 +1,8 @@
1
1
  import { jsx as o } from "react/jsx-runtime";
2
- import { Suspense as m } from "react";
3
- import { LoadingMask as t } from "../LoadingMask/LoadingMask.mjs";
4
- const p = (r, a = !0) => (e) => /* @__PURE__ */ o(m, { fallback: a ? /* @__PURE__ */ o(t, {}) : null, children: /* @__PURE__ */ o(r, { ...e }) });
2
+ import { Suspense as a } from "react";
3
+ import { LoadingMask as e } from "../LoadingMask/LoadingMask.mjs";
4
+ import "../LoadingMask/RenderLoadingMask.mjs";
5
+ const s = (r, m = !0) => (t) => /* @__PURE__ */ o(a, { fallback: m ? /* @__PURE__ */ o(e, {}) : null, children: /* @__PURE__ */ o(r, { ...t }) });
5
6
  export {
6
- p as LazyLoader
7
+ s as LazyLoader
7
8
  };
@@ -1 +1,4 @@
1
- export declare const LoadingMask: () => import("react/jsx-runtime").JSX.Element;
1
+ import { ILoadingMaskProps } from './LoadingMask.types';
2
+ import { FC } from 'react';
3
+
4
+ export declare const LoadingMask: FC<ILoadingMaskProps>;
@@ -1,59 +1,22 @@
1
- import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
- const t = () => /* @__PURE__ */ r("div", { className: "flex flex-1 items-center justify-center", children: /* @__PURE__ */ o(
3
- "svg",
4
- {
5
- className: "h-8 w-8 animate-spin text-gray-900 dark:text-gray-50",
6
- viewBox: "0 0 24 24",
7
- fill: "none",
8
- xmlns: "http://www.w3.org/2000/svg",
9
- children: [
10
- /* @__PURE__ */ r("path", { d: "M12 4.75V6.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
11
- /* @__PURE__ */ r(
12
- "path",
13
- {
14
- d: "M17.1475 6.8525L16.0625 7.9375",
15
- stroke: "currentColor",
16
- strokeWidth: "2",
17
- strokeLinecap: "round",
18
- strokeLinejoin: "round"
19
- }
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import "react";
3
+ import { RenderLoadingMask as r } from "./RenderLoadingMask.mjs";
4
+ import { cn as n } from "@oneplatformdev/utils";
5
+ const l = (t) => {
6
+ const { fullWidth: s = !1, className: i, ...o } = t;
7
+ return s ? /* @__PURE__ */ e(
8
+ "div",
9
+ {
10
+ ...o,
11
+ className: n(
12
+ "absolute inset-0",
13
+ "flex items-center justify-center",
14
+ i
20
15
  ),
21
- /* @__PURE__ */ r("path", { d: "M19.25 12H17.75", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
22
- /* @__PURE__ */ r(
23
- "path",
24
- {
25
- d: "M17.1475 17.1475L16.0625 16.0625",
26
- stroke: "currentColor",
27
- strokeWidth: "2",
28
- strokeLinecap: "round",
29
- strokeLinejoin: "round"
30
- }
31
- ),
32
- /* @__PURE__ */ r("path", { d: "M12 17.75V19.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
33
- /* @__PURE__ */ r(
34
- "path",
35
- {
36
- d: "M6.8525 17.1475L7.9375 16.0625",
37
- stroke: "currentColor",
38
- strokeWidth: "2",
39
- strokeLinecap: "round",
40
- strokeLinejoin: "round"
41
- }
42
- ),
43
- /* @__PURE__ */ r("path", { d: "M4.75 12H6.25", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }),
44
- /* @__PURE__ */ r(
45
- "path",
46
- {
47
- d: "M6.8525 6.8525L7.9375 7.9375",
48
- stroke: "currentColor",
49
- strokeWidth: "2",
50
- strokeLinecap: "round",
51
- strokeLinejoin: "round"
52
- }
53
- )
54
- ]
55
- }
56
- ) });
16
+ children: /* @__PURE__ */ e(r, {})
17
+ }
18
+ ) : /* @__PURE__ */ e(r, {});
19
+ };
57
20
  export {
58
- t as LoadingMask
21
+ l as LoadingMask
59
22
  };
@@ -0,0 +1,5 @@
1
+ import { HTMLAttributes } from 'react';
2
+
3
+ export interface ILoadingMaskProps extends HTMLAttributes<HTMLDivElement> {
4
+ fullWidth?: boolean;
5
+ }