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

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.
@@ -1,5 +1,5 @@
1
1
  import { cva as e } from "class-variance-authority";
2
- const r = e(
2
+ const t = e(
3
3
  "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
4
4
  {
5
5
  variants: {
@@ -20,10 +20,10 @@ const r = e(
20
20
  },
21
21
  defaultVariants: {
22
22
  variant: "default",
23
- size: "default"
23
+ size: "lg"
24
24
  }
25
25
  }
26
26
  );
27
27
  export {
28
- r as buttonVariants
28
+ t as buttonVariants
29
29
  };
@@ -1,4 +1,5 @@
1
+ import { CheckboxLabelProps, CheckboxProps } from './Checkbox.types.ts';
1
2
  import * as React from "react";
2
- import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
- declare const Checkbox: React.ForwardRefExoticComponent<Omit<CheckboxPrimitive.CheckboxProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
4
- export { Checkbox };
3
+ declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
4
+ declare const CheckboxLabel: React.ForwardRefExoticComponent<CheckboxLabelProps & React.RefAttributes<HTMLLabelElement>>;
5
+ export { Checkbox, CheckboxLabel };
@@ -1,27 +1,54 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import * as s from "react";
3
- import * as r from "@radix-ui/react-checkbox";
4
- import { Check as c } from "lucide-react";
5
- import { cn as o } from "@oneplatformdev/utils";
6
- const d = s.forwardRef(({ className: i, ...t }, a) => /* @__PURE__ */ e(
7
- r.Root,
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import * as s from "@radix-ui/react-checkbox";
3
+ import { MinusIcon as l, CheckIcon as h } from "lucide-react";
4
+ import * as m from "react";
5
+ import { cn as a } from "@oneplatformdev/utils";
6
+ import { Label as u } from "../Label/Label.mjs";
7
+ import "../Label/labelVariants.mjs";
8
+ const d = m.forwardRef(({ className: t, checked: c, indeterminate: e, ...i }, o) => {
9
+ const f = e ? l : h;
10
+ return /* @__PURE__ */ r(
11
+ s.Root,
12
+ {
13
+ ref: o,
14
+ className: a(
15
+ "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none 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",
16
+ t
17
+ ),
18
+ ...i,
19
+ checked: c || e,
20
+ children: /* @__PURE__ */ r(
21
+ s.Indicator,
22
+ {
23
+ className: a("flex items-center justify-center text-current"),
24
+ children: /* @__PURE__ */ r(f, { className: "h-4 w-4" })
25
+ }
26
+ )
27
+ }
28
+ );
29
+ });
30
+ d.displayName = s.Root.displayName;
31
+ const x = m.forwardRef(({ label: t = "", children: c, labelProps: e, ...i }, o) => /* @__PURE__ */ n(
32
+ u,
8
33
  {
9
- ref: a,
10
- className: o(
11
- "peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none 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",
12
- i
34
+ ref: o,
35
+ ...e,
36
+ className: a(
37
+ "flex w-full items-start gap-3 font-normal py-3 cursor-pointer",
38
+ e == null ? void 0 : e.className
13
39
  ),
14
- ...t,
15
- children: /* @__PURE__ */ e(
16
- r.Indicator,
17
- {
18
- className: o("flex items-center justify-center text-current"),
19
- children: /* @__PURE__ */ e(c, { className: "h-4 w-4" })
20
- }
21
- )
40
+ style: e == null ? void 0 : e.style,
41
+ children: [
42
+ /* @__PURE__ */ r(d, { ...i }),
43
+ /* @__PURE__ */ n("div", { className: "flex flex-col w-full gap-3", children: [
44
+ /* @__PURE__ */ r("span", { className: "flex flex-col justify-start leading-[16px]", children: t }),
45
+ c
46
+ ] })
47
+ ]
22
48
  }
23
49
  ));
24
- d.displayName = r.Root.displayName;
50
+ x.displayName = "CheckboxLabel";
25
51
  export {
26
- d as Checkbox
52
+ d as Checkbox,
53
+ x as CheckboxLabel
27
54
  };
@@ -0,0 +1,10 @@
1
+ import { Label } from '../Label/Label';
2
+ import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
3
+ import * as React from "react";
4
+ export interface CheckboxProps extends React.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
5
+ indeterminate?: boolean;
6
+ }
7
+ export interface CheckboxLabelProps extends CheckboxProps {
8
+ label?: string;
9
+ labelProps?: React.ComponentPropsWithoutRef<typeof Label>;
10
+ }
@@ -1 +1,2 @@
1
- export * from './Checkbox';
1
+ export * from './Checkbox.tsx';
2
+ export type * from './Checkbox.types.ts';
@@ -1,4 +1,5 @@
1
- import { Checkbox as r } from "./Checkbox.mjs";
1
+ import { Checkbox as b, CheckboxLabel as x } from "./Checkbox.mjs";
2
2
  export {
3
- r as Checkbox
3
+ b as Checkbox,
4
+ x as CheckboxLabel
4
5
  };
@@ -1,4 +1,4 @@
1
1
  import { ComboboxProps } from './Combobox.types';
2
- import { FC } from 'react';
2
+ import { default as React } from 'react';
3
3
 
4
- export declare const Combobox: FC<ComboboxProps>;
4
+ export declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLDivElement>>;
@@ -1,86 +1,88 @@
1
- import { jsx as a, jsxs as o, Fragment as I } from "react/jsx-runtime";
2
- import s, { useRef as R, useEffect as U, useCallback as c, useLayoutEffect as q } from "react";
3
- import { LoadingMask as z } from "../LoadingMask/LoadingMask.mjs";
4
- import { Popover as A, PopoverTrigger as V, PopoverContent as X } from "../Popover/Popover.mjs";
5
- import { Button as H } from "../Button/Button.mjs";
1
+ import { jsx as a, jsxs as r, Fragment as G } from "react/jsx-runtime";
2
+ import s, { forwardRef as I, useRef as U, useEffect as q, useCallback as c, useLayoutEffect as A } from "react";
3
+ import { LoadingMask as V } from "../LoadingMask/LoadingMask.mjs";
4
+ import "../LoadingMask/RenderLoadingMask.mjs";
5
+ import { Popover as X, PopoverTrigger as H, PopoverContent as J } from "../Popover/Popover.mjs";
6
+ import { Button as K } from "../Button/Button.mjs";
6
7
  import "../Button/buttonVariants.mjs";
7
- import { Command as J, CommandInput as K, CommandList as Q, CommandGroup as W, CommandEmpty as k, CommandItem as Y } from "../Command/Command.mjs";
8
+ import { Command as Q, CommandInput as W, CommandList as Y, CommandGroup as Z, CommandEmpty as j, CommandItem as $ } from "../Command/Command.mjs";
8
9
  import { cn as h } from "@oneplatformdev/utils";
9
- import { useDebounceCallback as Z } from "@oneplatformdev/hooks";
10
- import { X as $, ChevronsUpDown as ee, Check as ae } from "lucide-react";
11
- const ue = (O) => {
12
- var j;
10
+ import { useDebounceCallback as ee } from "@oneplatformdev/hooks";
11
+ import { X as ae, ChevronsUpDown as te, Check as re } from "lucide-react";
12
+ const fe = I((k, O) => {
13
+ var L;
13
14
  const {
14
- value: n,
15
+ value: o,
15
16
  onChange: P,
16
17
  placeholder: D,
17
18
  disabled: T,
18
19
  searchLabel: B = "Type to search...",
19
20
  fetchOptions: E,
20
- options: r,
21
+ options: n,
21
22
  emptyLabel: C = "No options",
22
23
  emptyAction: i,
23
24
  onMount: x
24
- } = O, f = R(!1), [t, d] = s.useState(!1), [m, w] = s.useState(""), [u, p] = s.useState([]), [b, N] = s.useState(), [g, l] = s.useState(!1);
25
- U(() => {
26
- r != null && r.length && p(r);
27
- }, [r]);
25
+ } = k, f = U(!1), [t, d] = s.useState(!1), [m, w] = s.useState(""), [p, u] = s.useState([]), [b, N] = s.useState(), [g, l] = s.useState(!1);
26
+ q(() => {
27
+ n != null && n.length && u(n);
28
+ }, [n]);
28
29
  const M = async () => {
29
30
  t || (S(), w(""));
30
31
  }, S = c(async (e) => {
31
32
  l(!0);
32
33
  try {
33
34
  const y = await E(e);
34
- p(y);
35
+ u(y);
35
36
  } catch (y) {
36
37
  console.error("Unexpected error while get option:", y);
37
38
  } finally {
38
39
  l(!1);
39
40
  }
40
- }, []), _ = Z(S, 1e3, {
41
+ }, []), R = ee(S, 1e3, {
41
42
  leading: !1,
42
43
  trailing: !0
43
- }), F = c((e) => {
44
- l(!0), w(e), _(e);
44
+ }), _ = c((e) => {
45
+ l(!0), w(e), R(e);
45
46
  }, []), v = c((e) => {
46
47
  P(e.value), N(e), l(!1);
47
- }, []), L = c(() => {
48
- console.log("handleClearSelection", L), v({ value: "", label: "" }), N(void 0), l(!1);
49
- }, []), G = c(() => {
48
+ }, []), z = c(() => {
49
+ v({ value: "", label: "" }), N(void 0), l(!1);
50
+ }, []), F = c(() => {
50
51
  if (!x) {
51
52
  f.current = !0;
52
53
  return;
53
54
  }
54
- x({ setOptions: p, search: m || "", open: t, setOpen: d }).finally(
55
+ x({ setOptions: u, search: m || "", open: t, setOpen: d }).finally(
55
56
  () => {
56
57
  f.current = !0;
57
58
  }
58
59
  );
59
60
  }, []);
60
- return q(() => (G(), () => {
61
+ return A(() => (F(), () => {
61
62
  f.current = !1;
62
- }), []), /* @__PURE__ */ a("div", { className: "w-full", children: /* @__PURE__ */ o(
63
- A,
63
+ }), []), /* @__PURE__ */ a("div", { className: "w-full", ref: O, children: /* @__PURE__ */ r(
64
+ X,
64
65
  {
65
66
  open: t,
66
67
  onOpenChange: (e) => {
67
68
  d(e), e && M();
68
69
  },
69
70
  children: [
70
- /* @__PURE__ */ a(V, { asChild: !0, className: "border-input", children: /* @__PURE__ */ o(
71
- H,
71
+ /* @__PURE__ */ a(H, { asChild: !0, className: "border-input", children: /* @__PURE__ */ r(
72
+ K,
72
73
  {
73
74
  variant: "outline",
74
75
  role: "combobox",
76
+ size: "lg",
75
77
  "aria-expanded": t,
76
78
  className: h(
77
- "w-full justify-between font-normal text-sm border bg-transparent relative",
79
+ "w-full justify-between font-normal text-sm border bg-transparent relative p-3",
78
80
  t ? "border-2 border-sidebar-accent" : "border-border"
79
81
  ),
80
82
  disabled: T,
81
83
  children: [
82
- /* @__PURE__ */ a("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: n ? ((j = u.find((e) => e.value === n)) == null ? void 0 : j.label) || (b == null ? void 0 : b.label) : /* @__PURE__ */ a("span", { className: "text-gray-400", children: D }) }),
83
- n ? /* @__PURE__ */ a(
84
+ /* @__PURE__ */ a("span", { className: "truncate max-w-[calc(100%-1.5rem)] overflow-hidden whitespace-nowrap", children: o ? ((L = p.find((e) => e.value === o)) == null ? void 0 : L.label) || (b == null ? void 0 : b.label) : /* @__PURE__ */ a("span", { className: "text-gray-400", children: D }) }),
85
+ o ? /* @__PURE__ */ a(
84
86
  "div",
85
87
  {
86
88
  className: h(
@@ -90,58 +92,58 @@ const ue = (O) => {
90
92
  "opacity-50 cursor-pointer hover:opacity-100"
91
93
  ),
92
94
  onClick: (e) => {
93
- e.stopPropagation(), L();
95
+ e.stopPropagation(), z();
94
96
  },
95
- children: /* @__PURE__ */ a($, {})
97
+ children: /* @__PURE__ */ a(ae, {})
96
98
  }
97
- ) : /* @__PURE__ */ a(ee, { className: "opacity-50 w-4 h-4" })
99
+ ) : /* @__PURE__ */ a(te, { className: "opacity-50 w-4 h-4" })
98
100
  ]
99
101
  }
100
102
  ) }),
101
103
  /* @__PURE__ */ a(
102
- X,
104
+ J,
103
105
  {
104
106
  className: "w-[var(--radix-popper-anchor-width)] max-w-none p-0",
105
107
  align: "start",
106
- children: /* @__PURE__ */ o(J, { shouldFilter: !1, children: [
108
+ children: /* @__PURE__ */ r(Q, { shouldFilter: !1, children: [
107
109
  /* @__PURE__ */ a(
108
- K,
110
+ W,
109
111
  {
110
112
  placeholder: B,
111
113
  value: m,
112
- onValueChange: F
114
+ onValueChange: _
113
115
  }
114
116
  ),
115
- /* @__PURE__ */ a(Q, { children: /* @__PURE__ */ o(
116
- W,
117
+ /* @__PURE__ */ a(Y, { children: /* @__PURE__ */ r(
118
+ Z,
117
119
  {
118
- className: h(!u.length && "p-0 shadow-none"),
120
+ className: h(!p.length && "p-0 shadow-none"),
119
121
  children: [
120
- g && /* @__PURE__ */ a("div", { className: "flex justify-center", children: /* @__PURE__ */ a(z, {}) }),
121
- !g && !!m && /* @__PURE__ */ a(I, { children: i ? /* @__PURE__ */ o(k, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
122
+ g && /* @__PURE__ */ a("div", { className: "flex justify-center", children: /* @__PURE__ */ a(V, {}) }),
123
+ !g && !!m && /* @__PURE__ */ a(G, { children: i ? /* @__PURE__ */ r(j, { className: "flex flex-col gap-3 py-5 px-3 items-center", children: [
122
124
  /* @__PURE__ */ a("span", { children: C }),
123
125
  typeof i == "function" ? i({
124
- setOptions: p,
126
+ setOptions: u,
125
127
  search: m || "",
126
128
  open: t,
127
129
  setOpen: d
128
130
  }) : i
129
- ] }) : /* @__PURE__ */ a(k, { children: C }) }),
130
- !g && !!u.length && u.map((e) => /* @__PURE__ */ o(
131
- Y,
131
+ ] }) : /* @__PURE__ */ a(j, { children: C }) }),
132
+ !g && !!p.length && p.map((e) => /* @__PURE__ */ r(
133
+ $,
132
134
  {
133
135
  value: e.value,
134
136
  onSelect: () => {
135
- n === e.value ? v({ value: "", label: "" }) : v(e), d(!1);
137
+ o === e.value ? v({ value: "", label: "" }) : v(e), d(!1);
136
138
  },
137
139
  children: [
138
140
  e.label,
139
141
  /* @__PURE__ */ a(
140
- ae,
142
+ re,
141
143
  {
142
144
  className: h(
143
145
  "ml-auto",
144
- n === e.value ? "opacity-100" : "opacity-0"
146
+ o === e.value ? "opacity-100" : "opacity-0"
145
147
  )
146
148
  }
147
149
  )
@@ -158,7 +160,7 @@ const ue = (O) => {
158
160
  ]
159
161
  }
160
162
  ) });
161
- };
163
+ });
162
164
  export {
163
- ue as Combobox
165
+ fe as Combobox
164
166
  };
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import * as DialogPrimitive from "@radix-ui/react-dialog";
1
+ import * as React from 'react';
2
+ import * as DialogPrimitive from '@radix-ui/react-dialog';
3
3
  declare const Dialog: React.FC<DialogPrimitive.DialogProps>;
4
4
  declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
5
  declare const DialogPortal: React.FC<DialogPrimitive.DialogPortalProps>;
package/Dialog/Dialog.mjs CHANGED
@@ -1,9 +1,9 @@
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 l from "react";
3
3
  import * as e from "@radix-ui/react-dialog";
4
4
  import { X as c } from "lucide-react";
5
5
  import { cn as i } from "@oneplatformdev/utils";
6
- const b = e.Root, h = e.Trigger, m = e.Portal, v = e.Close, d = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
6
+ const b = e.Root, h = e.Trigger, m = e.Portal, w = e.Close, n = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
7
7
  e.Overlay,
8
8
  {
9
9
  ref: s,
@@ -14,21 +14,23 @@ const b = e.Root, h = e.Trigger, m = e.Portal, v = e.Close, d = l.forwardRef(({
14
14
  ...t
15
15
  }
16
16
  ));
17
- d.displayName = e.Overlay.displayName;
18
- const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */ n(m, { children: [
19
- /* @__PURE__ */ o(d, {}),
20
- /* @__PURE__ */ n(
17
+ n.displayName = e.Overlay.displayName;
18
+ const f = l.forwardRef(({ className: a, children: t, ...s }, r) => /* @__PURE__ */ d(m, { children: [
19
+ /* @__PURE__ */ o(n, {}),
20
+ /* @__PURE__ */ d(
21
21
  e.Content,
22
22
  {
23
23
  ref: r,
24
24
  className: i(
25
25
  "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 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-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
26
+ "max-w-[90%] max-h-[90%] overflow-hidden",
27
+ "bg-[#FCFCFC] border border-[#E8E9EB] rounded-[16px]",
26
28
  a
27
29
  ),
28
30
  ...s,
29
31
  children: [
30
32
  t,
31
- /* @__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-accent data-[state=open]:text-muted-foreground", children: [
33
+ /* @__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-accent data-[state=open]:text-muted-foreground", children: [
32
34
  /* @__PURE__ */ o(c, { className: "h-4 w-4" }),
33
35
  /* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
34
36
  ] })
@@ -77,7 +79,7 @@ const u = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
77
79
  }
78
80
  ));
79
81
  u.displayName = e.Title.displayName;
80
- const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
82
+ const x = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
81
83
  e.Description,
82
84
  {
83
85
  ref: s,
@@ -85,15 +87,15 @@ const y = l.forwardRef(({ className: a, ...t }, s) => /* @__PURE__ */ o(
85
87
  ...t
86
88
  }
87
89
  ));
88
- y.displayName = e.Description.displayName;
90
+ x.displayName = e.Description.displayName;
89
91
  export {
90
92
  b as Dialog,
91
- v as DialogClose,
93
+ w as DialogClose,
92
94
  f as DialogContent,
93
- y as DialogDescription,
95
+ x as DialogDescription,
94
96
  g as DialogFooter,
95
97
  p as DialogHeader,
96
- d as DialogOverlay,
98
+ n as DialogOverlay,
97
99
  m as DialogPortal,
98
100
  u as DialogTitle,
99
101
  h as DialogTrigger
@@ -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,30 @@
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 { FormControl as h } from "../Form/Form.mjs";
3
+ import { FormRenderControl as p } from "../Form/FormRenderControl.mjs";
4
+ import { CheckboxLabel as s } from "../Checkbox/Checkbox.mjs";
5
+ const i = (t) => {
6
+ const { form: c, label: a, name: l, onCheckedChange: o, ...m } = t;
7
+ return /* @__PURE__ */ e(
8
+ p,
9
9
  {
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
10
+ form: c,
11
+ name: l,
12
+ render: ({ field: r }) => /* @__PURE__ */ e(h, { children: /* @__PURE__ */ e(
13
+ s,
14
+ {
15
+ ...r,
16
+ ...m,
17
+ label: a,
18
+ checked: r.value || !1,
19
+ onCheckedChange: (n) => {
20
+ r.onChange(n), o == null || o(n);
20
21
  }
21
- ),
22
- /* @__PURE__ */ r(h, { children: n })
23
- ] }),
24
- ...c
22
+ }
23
+ ) }),
24
+ ...m
25
25
  }
26
26
  );
27
27
  };
28
28
  export {
29
- b as FormCheckbox
29
+ i as FormCheckbox
30
30
  };
@@ -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
  }
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 };
@@ -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,21 @@
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 { RenderLoadingMask as r } from "./RenderLoadingMask.mjs";
3
+ import { cn as o } from "@oneplatformdev/utils";
4
+ const f = (t) => {
5
+ const { fullWidth: s = !1, className: i, ...n } = t;
6
+ return s ? /* @__PURE__ */ e(
7
+ "div",
8
+ {
9
+ ...n,
10
+ className: o(
11
+ "absolute inset-0",
12
+ "flex items-center justify-center",
13
+ i
20
14
  ),
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
- ) });
15
+ children: /* @__PURE__ */ e(r, {})
16
+ }
17
+ ) : /* @__PURE__ */ e(r, {});
18
+ };
57
19
  export {
58
- t as LoadingMask
20
+ f as LoadingMask
59
21
  };
@@ -0,0 +1,5 @@
1
+ import { HTMLAttributes } from 'react';
2
+
3
+ export interface ILoadingMaskProps extends HTMLAttributes<HTMLDivElement> {
4
+ fullWidth?: boolean;
5
+ }
@@ -0,0 +1,3 @@
1
+ import { HTMLAttributes } from 'react';
2
+
3
+ export declare const RenderLoadingMask: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import('react').RefAttributes<HTMLDivElement>>;