@oneplatformdev/ui 0.0.1-beta.7 → 0.0.1-beta.71

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 (117) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/Accordion/Accordion.mjs +23 -20
  3. package/AlertDialog/AlertDialogRoot.d.ts +2 -2
  4. package/AlertDialog/AlertDialogRoot.mjs +7 -7
  5. package/Button/buttonVariants.mjs +4 -4
  6. package/Calendar/Calendar.mjs +3 -2
  7. package/Checkbox/Checkbox.d.ts +5 -4
  8. package/Checkbox/Checkbox.mjs +48 -21
  9. package/Checkbox/Checkbox.types.d.ts +10 -0
  10. package/Checkbox/index.d.ts +2 -1
  11. package/Checkbox/index.mjs +3 -2
  12. package/Combobox/Combobox.d.ts +2 -2
  13. package/Combobox/Combobox.mjs +127 -87
  14. package/Combobox/Combobox.types.d.ts +13 -1
  15. package/Command/Command.d.ts +1 -1
  16. package/DataTable/DataTable.d.ts +10 -3
  17. package/DataTable/DataTable.mjs +33 -33
  18. package/DataTable/DataTableColumnFilter.d.ts +4 -0
  19. package/DataTable/DataTableColumnFilter.mjs +31 -0
  20. package/DatePicker/DatePicker.mjs +2 -2
  21. package/Dialog/Dialog.d.ts +2 -2
  22. package/Dialog/Dialog.mjs +14 -12
  23. package/Dropzone/Dropzone.d.ts +22 -0
  24. package/Dropzone/Dropzone.mjs +151 -0
  25. package/Dropzone/Dropzone.types.d.ts +38 -0
  26. package/Dropzone/DropzoneFilePreview.d.ts +4 -0
  27. package/Dropzone/DropzoneFilePreview.mjs +9 -0
  28. package/Dropzone/DropzoneSinglePickPreview.d.ts +9 -0
  29. package/Dropzone/DropzoneSinglePickPreview.mjs +38 -0
  30. package/Dropzone/DropzoneUtils.d.ts +5 -0
  31. package/Dropzone/DropzoneUtils.mjs +24 -0
  32. package/Dropzone/index.d.ts +2 -0
  33. package/Dropzone/index.mjs +7 -0
  34. package/Dropzone/package.json +7 -0
  35. package/DropzoneFilePreview-Dhtv8F4u.js +67 -0
  36. package/Form/Form.d.ts +2 -2
  37. package/Form/Form.mjs +48 -45
  38. package/Form/FormRenderControl.d.ts +2 -3
  39. package/Form/FormRenderControl.mjs +10 -10
  40. package/Form/FormRenderControl.types.d.ts +5 -7
  41. package/FormCheckbox/FormCheckbox.d.ts +2 -3
  42. package/FormCheckbox/FormCheckbox.mjs +23 -23
  43. package/FormCheckbox/FormCheckbox.types.d.ts +3 -3
  44. package/FormCombobox/FormCombobox.d.ts +2 -2
  45. package/FormCombobox/FormCombobox.types.d.ts +2 -3
  46. package/FormDatePicker/FormDatePicker.d.ts +2 -2
  47. package/FormDatePicker/FormDatePicker.mjs +20 -18
  48. package/FormDatePicker/FormDatePicker.types.d.ts +2 -3
  49. package/FormDropzone/FormDropzone.d.ts +4 -0
  50. package/FormDropzone/FormDropzone.mjs +19 -0
  51. package/FormDropzone/FormDropzone.types.d.ts +6 -0
  52. package/FormDropzone/index.d.ts +2 -0
  53. package/FormDropzone/index.mjs +4 -0
  54. package/FormDropzone/package.json +7 -0
  55. package/FormInput/FormInput.d.ts +2 -3
  56. package/FormInput/FormInput.mjs +25 -17
  57. package/FormInput/FormInput.types.d.ts +2 -3
  58. package/FormRadio/FormRadio.d.ts +4 -0
  59. package/FormRadio/FormRadio.mjs +40 -0
  60. package/FormRadio/FormRadio.types.d.ts +6 -0
  61. package/FormRadio/index.d.ts +2 -0
  62. package/FormRadio/index.mjs +4 -0
  63. package/FormRadio/package.json +7 -0
  64. package/FormSelect/FormSelect.d.ts +2 -3
  65. package/FormSelect/FormSelect.mjs +19 -17
  66. package/FormSelect/FormSelect.types.d.ts +2 -3
  67. package/FormTextarea/FormTextarea.d.ts +2 -3
  68. package/FormTextarea/FormTextarea.mjs +13 -12
  69. package/FormTextarea/FormTextarea.types.d.ts +2 -3
  70. package/Input/Input.mjs +40 -34
  71. package/Input/Input.types.d.ts +4 -1
  72. package/Input/inputVariants.mjs +9 -3
  73. package/Label/Label.d.ts +2 -2
  74. package/Label/labelVariants.mjs +7 -4
  75. package/LazyLoader/LazyLoader.mjs +5 -4
  76. package/LoadingMask/LoadingMask.d.ts +4 -1
  77. package/LoadingMask/LoadingMask.mjs +18 -56
  78. package/LoadingMask/LoadingMask.types.d.ts +5 -0
  79. package/LoadingMask/RenderLoadingMask.d.ts +3 -0
  80. package/LoadingMask/RenderLoadingMask.mjs +108 -0
  81. package/LoadingMask/index.d.ts +2 -0
  82. package/LoadingMask/index.mjs +4 -2
  83. package/Radio/Radio.d.ts +4 -0
  84. package/Radio/Radio.mjs +12 -0
  85. package/Radio/Radio.types.d.ts +11 -0
  86. package/Radio/index.d.ts +2 -0
  87. package/Radio/index.mjs +4 -0
  88. package/Radio/package.json +7 -0
  89. package/RadioGroup/RadioGroup.d.ts +9 -3
  90. package/RadioGroup/RadioGroup.mjs +37 -19
  91. package/RadioGroup/index.mjs +4 -3
  92. package/ScrollArea/ScrollArea.d.ts +2 -2
  93. package/ScrollArea/ScrollArea.mjs +26 -13
  94. package/Select/Select.mjs +93 -63
  95. package/Select/Select.types.d.ts +9 -2
  96. package/Select/SelectRoot.d.ts +2 -2
  97. package/Select/SelectRoot.mjs +1 -0
  98. package/TablePagination/TablePagination.d.ts +16 -0
  99. package/TablePagination/TablePagination.mjs +74 -0
  100. package/TablePagination/index.d.ts +1 -0
  101. package/TablePagination/index.mjs +4 -0
  102. package/TablePagination/package.json +7 -0
  103. package/Tabs/Tabs.d.ts +3 -2
  104. package/Tabs/Tabs.mjs +20 -6
  105. package/Tabs/Tabs.types.d.ts +5 -2
  106. package/Tabs/index.mjs +8 -7
  107. package/Textarea/Textarea.d.ts +1 -1
  108. package/Textarea/Textarea.mjs +71 -15
  109. package/Textarea/Textarea.types.d.ts +16 -2
  110. package/Textarea/useAutosizeTextArea.d.ts +3 -0
  111. package/Textarea/useAutosizeTextArea.mjs +20 -0
  112. package/Toast/toastVariants.mjs +3 -3
  113. package/index.css +1 -1
  114. package/index.d.ts +3 -0
  115. package/index.mjs +332 -318
  116. package/package.json +9 -8
  117. package/tailwind.config.mjs +13 -13
@@ -1,38 +1,40 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { FormControl as a } from "../Form/Form.mjs";
3
- import { FormRenderControl as f } from "../Form/FormRenderControl.mjs";
2
+ import { FormControl as f } from "../Form/Form.mjs";
3
+ import { FormRenderControl as d } from "../Form/FormRenderControl.mjs";
4
4
  import "../Select/SelectRoot.mjs";
5
- import { Select as d } from "../Select/Select.mjs";
6
- const x = (m) => {
5
+ import { Select as g } from "../Select/Select.mjs";
6
+ const S = (n) => {
7
7
  const {
8
- form: n,
8
+ form: m,
9
9
  label: i,
10
- name: l,
11
- options: p = [],
10
+ name: p,
11
+ options: l = [],
12
12
  onChange: r,
13
- ...c
14
- } = m;
13
+ containerProps: c,
14
+ ...s
15
+ } = n;
15
16
  return /* @__PURE__ */ e(
16
- f,
17
+ d,
17
18
  {
18
- form: n,
19
- name: l,
19
+ form: m,
20
+ name: p,
20
21
  label: i,
22
+ containerProps: c,
21
23
  render: ({ field: t }) => /* @__PURE__ */ e(
22
- d,
24
+ g,
23
25
  {
24
26
  value: t.value,
25
- options: p,
27
+ options: l,
26
28
  onChange: (o) => {
27
29
  t.onChange(o), r == null || r(o);
28
30
  },
29
- renderTrigger: (o, s) => /* @__PURE__ */ e(a, { children: s }),
30
- ...c
31
+ renderTrigger: (o, a) => /* @__PURE__ */ e(f, { children: a }),
32
+ ...s
31
33
  }
32
34
  )
33
35
  }
34
36
  );
35
37
  };
36
38
  export {
37
- x as FormSelect
39
+ S as FormSelect
38
40
  };
@@ -1,7 +1,6 @@
1
1
  import { SelectProps } from '../Select';
2
2
  import { FormRenderControlExtendProps } from '../Form';
3
- import { UseFormReturn } from 'react-hook-form';
4
- import { FieldValues } from 'react-hook-form/dist/types/fields';
3
+ import { FieldValues } from 'react-hook-form';
5
4
 
6
- export interface FormSelectProps<Data extends FieldValues, Form extends UseFormReturn<Data>, ExtendOptionData> extends FormRenderControlExtendProps<Data, Form>, SelectProps<ExtendOptionData> {
5
+ export interface FormSelectProps<Data extends FieldValues, ExtendOptionData> extends FormRenderControlExtendProps<Data>, Omit<SelectProps<ExtendOptionData>, 'onChange'>, Partial<Pick<SelectProps<ExtendOptionData>, 'onChange'>> {
7
6
  }
@@ -1,5 +1,4 @@
1
- import { UseFormReturn } from 'react-hook-form';
2
- import { FieldValues } from 'react-hook-form/dist/types/fields';
1
+ import { FieldValues } from 'react-hook-form';
3
2
  import { FormTextareaProps } from './FormTextarea.types';
4
3
 
5
- export declare const FormTextarea: <Data extends FieldValues, Form extends UseFormReturn<Data>>(props: FormTextareaProps<Data, Form>) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const FormTextarea: <Data extends FieldValues>(props: FormTextareaProps<Data>) => import("react/jsx-runtime").JSX.Element;
@@ -1,26 +1,27 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { FormControl as l } from "../Form/Form.mjs";
3
- import { FormRenderControl as p } from "../Form/FormRenderControl.mjs";
4
- import { Textarea as f } from "../Textarea/Textarea.mjs";
5
- const u = (e) => {
6
- const { form: m, label: t, name: n, ...a } = e;
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;
7
7
  return /* @__PURE__ */ r(
8
- p,
8
+ i,
9
9
  {
10
- form: m,
10
+ form: t,
11
11
  name: n,
12
- label: t,
13
- render: ({ field: o }) => /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
14
- f,
12
+ label: m,
13
+ containerProps: a,
14
+ render: ({ field: o }) => /* @__PURE__ */ r(p, { children: /* @__PURE__ */ r(
15
+ s,
15
16
  {
16
17
  ...o,
17
18
  value: o.value || "",
18
- ...a
19
+ ...l
19
20
  }
20
21
  ) })
21
22
  }
22
23
  );
23
24
  };
24
25
  export {
25
- u as FormTextarea
26
+ F as FormTextarea
26
27
  };
@@ -1,7 +1,6 @@
1
1
  import { TextareaProps } from '../Textarea';
2
2
  import { FormRenderControlExtendProps } from '../Form';
3
- import { UseFormReturn } from 'react-hook-form';
4
- import { FieldValues } from 'react-hook-form/dist/types/fields';
3
+ import { FieldValues } from 'react-hook-form';
5
4
 
6
- export interface FormTextareaProps<Data extends FieldValues, Form extends UseFormReturn<Data>> extends FormRenderControlExtendProps<Data, Form>, Omit<TextareaProps, 'form' | 'name'> {
5
+ export interface FormTextareaProps<Data extends FieldValues> extends FormRenderControlExtendProps<Data>, Omit<TextareaProps, 'form' | 'name'> {
7
6
  }
package/Input/Input.mjs CHANGED
@@ -1,61 +1,67 @@
1
- import { jsxs as c, jsx as s } from "react/jsx-runtime";
2
- import l, { useState as d } from "react";
3
- import { Eye as f, EyeOff as y } from "lucide-react";
4
- import { inputVariants as N } from "./inputVariants.mjs";
5
- import { cn as b } from "@oneplatformdev/utils";
6
- const p = l.forwardRef(
1
+ import { jsxs as y, jsx as a } from "react/jsx-runtime";
2
+ import d, { useState as b } from "react";
3
+ import { Eye as v, EyeOff as w } from "lucide-react";
4
+ import { inputVariants as h } from "./inputVariants.mjs";
5
+ import { cn as f } from "@oneplatformdev/utils";
6
+ const p = d.forwardRef(
7
7
  (t, e) => {
8
8
  const {
9
- className: a,
10
- variant: r,
11
- type: o,
12
- slotProps: { input: n } = {},
13
- ...u
14
- } = t, { startAdornment: i } = n || {};
15
- return /* @__PURE__ */ c("div", { className: "relative", children: [
16
- !!i && /* @__PURE__ */ s("span", { className: "absolute left-[10px] top-1/2 -translate-y-1/2", children: i }),
17
- /* @__PURE__ */ s(
9
+ className: s,
10
+ variant: o,
11
+ type: c,
12
+ slotProps: { input: u, wrapper: n } = {},
13
+ onChange: l,
14
+ onTransform: i,
15
+ ...g
16
+ } = t, { startAdornment: m } = u || {};
17
+ return /* @__PURE__ */ y("div", { ...n || {}, className: f("relative", n == null ? void 0 : n.className), children: [
18
+ !!m && /* @__PURE__ */ a("span", { className: "absolute left-[10px] top-1/2 -translate-y-1/2", children: m }),
19
+ /* @__PURE__ */ a(
18
20
  "input",
19
21
  {
20
- type: o,
21
- className: b(
22
- N({ variant: r, className: a }),
23
- !!i && "pl-8"
22
+ type: c,
23
+ className: f(
24
+ h({ variant: o, className: s }),
25
+ !!m && "pl-8"
24
26
  ),
25
27
  ref: e,
26
- ...u
28
+ ...g,
29
+ onChange: (r) => {
30
+ typeof (i == null ? void 0 : i(r.target.value, r)) == "string" && (r.target.value = i(r.target.value, r)), l && l(r);
31
+ }
27
32
  }
28
33
  )
29
34
  ] });
30
35
  }
31
36
  );
32
37
  p.displayName = "Input";
33
- const m = l.forwardRef(
38
+ const N = d.forwardRef(
34
39
  (t, e) => {
35
- const [a, r] = d(!1), o = a ? "text" : "password", n = () => {
36
- r(!a);
40
+ var n, l, i;
41
+ const [s, o] = b(!1), c = s ? "text" : "password", u = () => {
42
+ o(!s);
37
43
  };
38
- return /* @__PURE__ */ c("div", { className: "relative", children: [
39
- /* @__PURE__ */ s(p, { ...t, type: o, className: "pr-8", ref: e }),
40
- /* @__PURE__ */ s(w, { isVisible: a, onClick: n })
44
+ return /* @__PURE__ */ y("div", { ...((n = t == null ? void 0 : t.slotProps) == null ? void 0 : n.wrapper) || {}, className: f("relative", (i = (l = t == null ? void 0 : t.slotProps) == null ? void 0 : l.wrapper) == null ? void 0 : i.className), children: [
45
+ /* @__PURE__ */ a(p, { ...t, type: c, className: "pr-8", ref: e }),
46
+ /* @__PURE__ */ a(I, { isVisible: s, onClick: u })
41
47
  ] });
42
48
  }
43
49
  );
44
- m.displayName = "PasswordInput";
45
- const w = ({ isVisible: t, onClick: e }) => /* @__PURE__ */ s(
50
+ N.displayName = "PasswordInput";
51
+ const I = ({ isVisible: t, onClick: e }) => /* @__PURE__ */ a(
46
52
  "button",
47
53
  {
48
54
  type: "button",
49
55
  onClick: e,
50
56
  className: "absolute top-1/2 right-3 transform -translate-y-1/2",
51
- children: t ? /* @__PURE__ */ s(f, { size: 16 }) : /* @__PURE__ */ s(y, { size: 16 })
57
+ children: t ? /* @__PURE__ */ a(v, { size: 16 }) : /* @__PURE__ */ a(w, { size: 16 })
52
58
  }
53
- ), I = l.forwardRef(
54
- ({ type: t, ...e }, a) => t === "password" ? /* @__PURE__ */ s(m, { type: t, ...e, ref: a }) : /* @__PURE__ */ s(p, { type: t, ...e, ref: a })
59
+ ), x = d.forwardRef(
60
+ ({ type: t, ...e }, s) => t === "password" ? /* @__PURE__ */ a(N, { type: t, ...e, ref: s }) : /* @__PURE__ */ a(p, { type: t, ...e, ref: s })
55
61
  );
56
- I.displayName = "Input";
62
+ x.displayName = "Input";
57
63
  export {
58
64
  p as BaseInput,
59
- I as Input,
60
- m as PasswordInput
65
+ x as Input,
66
+ N as PasswordInput
61
67
  };
@@ -1,13 +1,16 @@
1
1
  import { inputVariants } from './inputVariants';
2
2
  import { VariantProps } from 'class-variance-authority';
3
- import { default as React, ReactNode } from 'react';
3
+ import { default as React, ChangeEvent, HTMLAttributes, ReactNode } from 'react';
4
4
 
5
5
  export interface InputSlotInputProps {
6
6
  startAdornment?: ReactNode;
7
7
  }
8
8
  export interface InputSlotProps {
9
9
  input?: InputSlotInputProps;
10
+ wrapper?: HTMLAttributes<HTMLDivElement>;
10
11
  }
11
12
  export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
12
13
  slotProps?: InputSlotProps;
14
+ /** func transform event.target.value before onChange event call*/
15
+ onTransform?: (value: string, event: ChangeEvent<HTMLInputElement>) => string;
13
16
  }
@@ -1,6 +1,12 @@
1
1
  import { cva as e } from "class-variance-authority";
2
- const r = e(
3
- "flex h-10 w-full rounded-md border border-input px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
2
+ const t = e(
3
+ [
4
+ "flex h-10 w-full rounded-md border border-input px-3 py-2",
5
+ "text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground",
6
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
7
+ "group-data-[state=invalid]/form-control:border-destructive",
8
+ "group-data-[state=valid]/form-control:border-input"
9
+ ],
4
10
  {
5
11
  variants: {
6
12
  variant: {
@@ -14,5 +20,5 @@ const r = e(
14
20
  }
15
21
  );
16
22
  export {
17
- r as inputVariants
23
+ t as inputVariants
18
24
  };
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,7 +1,10 @@
1
- import { cva as e } from "class-variance-authority";
2
- const a = e(
3
- "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
4
- );
1
+ import { cva as t } from "class-variance-authority";
2
+ const a = t([
3
+ "peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
4
+ "text-md font-medium leading-[150%]",
5
+ "group-data-[state=valid]/form-control:text-[#363B4E]",
6
+ "group-data-[state=invalid]/form-control:text-destructive"
7
+ ]);
5
8
  export {
6
9
  a as labelVariants
7
10
  };
@@ -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>>;
@@ -0,0 +1,108 @@
1
+ import { jsx as r, jsxs as s } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ import { cn as d } from "@oneplatformdev/utils";
4
+ const u = i((o, e) => {
5
+ const { className: t, ...n } = o;
6
+ return /* @__PURE__ */ r(
7
+ "div",
8
+ {
9
+ ...n,
10
+ ref: e,
11
+ className: d("flex flex-1 items-center justify-center", t),
12
+ children: /* @__PURE__ */ s(
13
+ "svg",
14
+ {
15
+ className: "h-8 w-8 animate-spin text-gray-900 dark:text-gray-50",
16
+ viewBox: "0 0 24 24",
17
+ fill: "none",
18
+ xmlns: "http://www.w3.org/2000/svg",
19
+ children: [
20
+ /* @__PURE__ */ r(
21
+ "path",
22
+ {
23
+ d: "M12 4.75V6.25",
24
+ stroke: "currentColor",
25
+ strokeWidth: "2",
26
+ strokeLinecap: "round",
27
+ strokeLinejoin: "round"
28
+ }
29
+ ),
30
+ /* @__PURE__ */ r(
31
+ "path",
32
+ {
33
+ d: "M17.1475 6.8525L16.0625 7.9375",
34
+ stroke: "currentColor",
35
+ strokeWidth: "2",
36
+ strokeLinecap: "round",
37
+ strokeLinejoin: "round"
38
+ }
39
+ ),
40
+ /* @__PURE__ */ r(
41
+ "path",
42
+ {
43
+ d: "M19.25 12H17.75",
44
+ stroke: "currentColor",
45
+ strokeWidth: "2",
46
+ strokeLinecap: "round",
47
+ strokeLinejoin: "round"
48
+ }
49
+ ),
50
+ /* @__PURE__ */ r(
51
+ "path",
52
+ {
53
+ d: "M17.1475 17.1475L16.0625 16.0625",
54
+ stroke: "currentColor",
55
+ strokeWidth: "2",
56
+ strokeLinecap: "round",
57
+ strokeLinejoin: "round"
58
+ }
59
+ ),
60
+ /* @__PURE__ */ r(
61
+ "path",
62
+ {
63
+ d: "M12 17.75V19.25",
64
+ stroke: "currentColor",
65
+ strokeWidth: "2",
66
+ strokeLinecap: "round",
67
+ strokeLinejoin: "round"
68
+ }
69
+ ),
70
+ /* @__PURE__ */ r(
71
+ "path",
72
+ {
73
+ d: "M6.8525 17.1475L7.9375 16.0625",
74
+ stroke: "currentColor",
75
+ strokeWidth: "2",
76
+ strokeLinecap: "round",
77
+ strokeLinejoin: "round"
78
+ }
79
+ ),
80
+ /* @__PURE__ */ r(
81
+ "path",
82
+ {
83
+ d: "M4.75 12H6.25",
84
+ stroke: "currentColor",
85
+ strokeWidth: "2",
86
+ strokeLinecap: "round",
87
+ strokeLinejoin: "round"
88
+ }
89
+ ),
90
+ /* @__PURE__ */ r(
91
+ "path",
92
+ {
93
+ d: "M6.8525 6.8525L7.9375 7.9375",
94
+ stroke: "currentColor",
95
+ strokeWidth: "2",
96
+ strokeLinecap: "round",
97
+ strokeLinejoin: "round"
98
+ }
99
+ )
100
+ ]
101
+ }
102
+ )
103
+ }
104
+ );
105
+ });
106
+ export {
107
+ u as RenderLoadingMask
108
+ };
@@ -1 +1,3 @@
1
1
  export { LoadingMask } from './LoadingMask';
2
+ export { RenderLoadingMask } from './RenderLoadingMask';
3
+ export type * from './LoadingMask.types';
@@ -1,4 +1,6 @@
1
- import { LoadingMask as r } from "./LoadingMask.mjs";
1
+ import { LoadingMask as a } from "./LoadingMask.mjs";
2
+ import { RenderLoadingMask as d } from "./RenderLoadingMask.mjs";
2
3
  export {
3
- r as LoadingMask
4
+ a as LoadingMask,
5
+ d as RenderLoadingMask
4
6
  };
@@ -0,0 +1,4 @@
1
+ import { RadioProps } from './Radio.types';
2
+ import { FC } from 'react';
3
+
4
+ export declare const Radio: FC<RadioProps>;
@@ -0,0 +1,12 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { RadioGroup as c, RadioGroupLabel as u } from "../RadioGroup/RadioGroup.mjs";
3
+ const l = (e) => {
4
+ const { options: f = [], renderOption: r, ...s } = e;
5
+ return /* @__PURE__ */ a(c, { ...s, children: f.map((t) => {
6
+ const o = /* @__PURE__ */ a(u, { ...t }, t.value);
7
+ return !r || typeof r != "function" || !(r != null && r(t, u)) ? o : r == null ? void 0 : r(t, u);
8
+ }) });
9
+ };
10
+ export {
11
+ l as Radio
12
+ };
@@ -0,0 +1,11 @@
1
+ import { RadioGroup, RadioGroupLabel } from '../RadioGroup/RadioGroup';
2
+ import { ComponentPropsWithoutRef, FC, ReactNode } from 'react';
3
+
4
+ export interface RadioOptionProps<Value extends string | number = string> {
5
+ value: Value;
6
+ label: ReactNode;
7
+ }
8
+ export interface RadioProps extends Partial<ComponentPropsWithoutRef<typeof RadioGroup>> {
9
+ options?: RadioOptionProps[];
10
+ renderOption?: (option: RadioOptionProps, DefaultOptionComponent: FC<ComponentPropsWithoutRef<typeof RadioGroupLabel>>) => ReactNode | null;
11
+ }
@@ -0,0 +1,2 @@
1
+ export * from './Radio';
2
+ export type * from './Radio.types.ts';
@@ -0,0 +1,4 @@
1
+ import { Radio as a } from "./Radio.mjs";
2
+ export {
3
+ a as Radio
4
+ };
@@ -0,0 +1,7 @@
1
+ {
2
+ "sideEffects": false,
3
+ "main": "./index.mjs",
4
+ "module": "./index.mjs",
5
+ "default": "./index.mjs",
6
+ "types": "./index.d.ts"
7
+ }
@@ -1,5 +1,11 @@
1
- import * as React from "react";
2
- import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
1
+ import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
2
+ import * as React from 'react';
3
3
  declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
4
  declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
- export { RadioGroup, RadioGroupItem };
5
+ declare const RadioGroupLabel: React.ForwardRefExoticComponent<{
6
+ label: React.ReactNode;
7
+ value: string;
8
+ } & {
9
+ children?: React.ReactNode | undefined;
10
+ } & React.RefAttributes<HTMLLabelElement>>;
11
+ export { RadioGroup, RadioGroupItem, RadioGroupLabel };