@oneplatformdev/ui 0.0.1-beta.14 → 0.0.1-beta.140
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.
- package/Accordion/Accordion.d.ts +5 -3
- package/Accordion/Accordion.mjs +27 -24
- package/AlertDialog/AlertDialogRoot.d.ts +2 -2
- package/AlertDialog/AlertDialogRoot.mjs +7 -7
- package/Button/Button.mjs +11 -10
- package/Button/buttonVariants.mjs +14 -8
- package/Calendar/Calendar.mjs +3 -2
- package/Card/Card.d.ts +1 -1
- package/Card/Card.mjs +24 -23
- package/Checkbox/Checkbox.d.ts +5 -4
- package/Checkbox/Checkbox.mjs +48 -21
- package/Checkbox/Checkbox.types.d.ts +10 -0
- package/Checkbox/index.d.ts +1 -0
- package/Checkbox/index.mjs +3 -2
- package/Combobox/Combobox.d.ts +2 -2
- package/Combobox/Combobox.mjs +12 -123
- package/Combobox/Combobox.types.d.ts +36 -1
- package/Combobox/ComboboxOptionItem.d.ts +5 -0
- package/Combobox/ComboboxOptionItem.mjs +69 -0
- package/Combobox/ComboboxOptions.d.ts +4 -0
- package/Combobox/ComboboxOptions.mjs +12 -0
- package/Combobox/index.mjs +1 -1
- package/Combobox-CkGEIfTD.js +325 -0
- package/Command/Command.d.ts +1 -1
- package/Command/Command.mjs +15 -7
- package/DataTable/DataTable.d.ts +10 -3
- package/DataTable/DataTable.mjs +33 -33
- package/DataTable/DataTableColumnFilter.d.ts +4 -0
- package/DataTable/DataTableColumnFilter.mjs +31 -0
- package/DatePicker/DatePicker.mjs +2 -2
- package/Dialog/Dialog.d.ts +7 -3
- package/Dialog/Dialog.mjs +95 -52
- package/Dialog/DialogOverlayScope.d.ts +9 -0
- package/Dialog/DialogOverlayScope.mjs +10 -0
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.mjs +12 -8
- package/DropdownMenu/DropdownMenu.d.ts +2 -2
- package/DropdownMenu/DropdownMenu.mjs +30 -26
- package/Dropzone/Dropzone.d.ts +2 -2
- package/Dropzone/Dropzone.mjs +111 -97
- package/Dropzone/Dropzone.types.d.ts +8 -0
- package/Dropzone/{FilePreview.mjs → DropzoneFilePreview.mjs} +1 -1
- package/Dropzone/DropzoneSinglePickPreview.d.ts +10 -0
- package/Dropzone/DropzoneSinglePickPreview.mjs +44 -0
- package/Dropzone/DropzoneUtils.d.ts +1 -0
- package/Dropzone/DropzoneUtils.mjs +17 -8
- package/Dropzone/index.mjs +1 -1
- package/Form/Form.d.ts +2 -2
- package/Form/Form.mjs +48 -45
- package/Form/FormRenderControl.d.ts +2 -3
- package/Form/FormRenderControl.mjs +10 -10
- package/Form/FormRenderControl.types.d.ts +5 -7
- package/FormCheckbox/FormCheckbox.d.ts +2 -3
- package/FormCheckbox/FormCheckbox.mjs +23 -23
- package/FormCheckbox/FormCheckbox.types.d.ts +3 -3
- package/FormCombobox/FormCombobox.d.ts +2 -2
- package/FormCombobox/FormCombobox.mjs +6 -6
- package/FormCombobox/FormCombobox.types.d.ts +2 -3
- package/FormDatePicker/FormDatePicker.d.ts +2 -2
- package/FormDatePicker/FormDatePicker.mjs +20 -18
- package/FormDatePicker/FormDatePicker.types.d.ts +2 -3
- package/FormDropzone/FormDropzone.d.ts +2 -2
- package/FormDropzone/FormDropzone.mjs +8 -16
- package/FormDropzone/FormDropzone.types.d.ts +2 -3
- package/FormInput/FormInput.d.ts +5 -3
- package/FormInput/FormInput.mjs +37 -16
- package/FormInput/FormInput.types.d.ts +2 -3
- package/FormRadio/FormRadio.d.ts +4 -0
- package/FormRadio/FormRadio.mjs +40 -0
- package/FormRadio/FormRadio.types.d.ts +6 -0
- package/FormRadio/index.d.ts +2 -0
- package/FormRadio/index.mjs +4 -0
- package/FormRadio/package.json +7 -0
- package/FormSelect/FormSelect.d.ts +2 -3
- package/FormSelect/FormSelect.mjs +19 -17
- package/FormSelect/FormSelect.types.d.ts +2 -3
- package/FormTextarea/FormTextarea.d.ts +2 -3
- package/FormTextarea/FormTextarea.mjs +13 -12
- package/FormTextarea/FormTextarea.types.d.ts +2 -3
- package/Input/Input.mjs +50 -38
- package/Input/Input.types.d.ts +6 -2
- package/Input/inputVariants.mjs +9 -3
- package/Label/Label.d.ts +2 -2
- package/Label/labelVariants.mjs +7 -4
- package/LazyLoader/LazyLoader.mjs +5 -4
- package/LoadedIcon/LoadedIcon.d.ts +11 -0
- package/LoadedIcon/LoadedIcon.mjs +27 -0
- package/LoadedIcon/index.d.ts +1 -0
- package/LoadedIcon/index.mjs +4 -0
- package/LoadedIcon/package.json +7 -0
- package/LoadingMask/LoadingMask.d.ts +4 -1
- package/LoadingMask/LoadingMask.mjs +18 -56
- package/LoadingMask/LoadingMask.types.d.ts +5 -0
- package/LoadingMask/RenderLoadingMask.d.ts +3 -0
- package/LoadingMask/RenderLoadingMask.mjs +108 -0
- package/LoadingMask/index.d.ts +2 -0
- package/LoadingMask/index.mjs +4 -2
- package/Popover/Popover.d.ts +3 -3
- package/Popover/Popover.mjs +30 -21
- package/Radio/Radio.d.ts +4 -0
- package/Radio/Radio.mjs +12 -0
- package/Radio/Radio.types.d.ts +11 -0
- package/Radio/index.d.ts +2 -0
- package/Radio/index.mjs +4 -0
- package/Radio/package.json +7 -0
- package/RadioGroup/RadioGroup.d.ts +9 -3
- package/RadioGroup/RadioGroup.mjs +37 -19
- package/RadioGroup/index.mjs +4 -3
- package/ScrollArea/ScrollArea.d.ts +2 -2
- package/ScrollArea/ScrollArea.mjs +26 -13
- package/Search/Search.d.ts +1 -2
- package/Search/Search.mjs +36 -21
- package/Search/Search.types.d.ts +1 -0
- package/Select/Select.mjs +94 -63
- package/Select/Select.types.d.ts +11 -3
- package/Select/SelectRoot.d.ts +2 -2
- package/Select/SelectRoot.mjs +29 -24
- package/Sheet/Sheet.d.ts +5 -2
- package/Sheet/Sheet.mjs +33 -33
- package/TablePagination/TablePagination.d.ts +16 -0
- package/TablePagination/TablePagination.mjs +74 -0
- package/TablePagination/index.d.ts +1 -0
- package/TablePagination/index.mjs +4 -0
- package/TablePagination/package.json +7 -0
- package/Tabs/Tabs.d.ts +3 -2
- package/Tabs/Tabs.mjs +20 -6
- package/Tabs/Tabs.types.d.ts +5 -2
- package/Tabs/index.mjs +8 -7
- package/Textarea/Textarea.d.ts +1 -1
- package/Textarea/Textarea.mjs +72 -15
- package/Textarea/Textarea.types.d.ts +16 -2
- package/Textarea/useAutosizeTextArea.d.ts +3 -0
- package/Textarea/useAutosizeTextArea.mjs +20 -0
- package/Toast/toastVariants.mjs +3 -3
- package/index.css +1 -1
- package/index.d.ts +2 -0
- package/index.mjs +305 -292
- package/package.json +6 -6
- package/tailwind.config.mjs +13 -13
- /package/Dropzone/{FilePreview.d.ts → DropzoneFilePreview.d.ts} +0 -0
- /package/{FilePreview-Dhtv8F4u.js → DropzoneFilePreview-Dhtv8F4u.js} +0 -0
package/Input/Input.mjs
CHANGED
|
@@ -1,61 +1,73 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Eye as
|
|
4
|
-
import { inputVariants as
|
|
5
|
-
import { cn as
|
|
6
|
-
const p =
|
|
7
|
-
(t,
|
|
1
|
+
import { jsxs as N, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import d, { useState as v } from "react";
|
|
3
|
+
import { Eye as w, EyeOff as h } from "lucide-react";
|
|
4
|
+
import { inputVariants as P } from "./inputVariants.mjs";
|
|
5
|
+
import { cn as f } from "@oneplatformdev/utils";
|
|
6
|
+
const p = d.forwardRef(
|
|
7
|
+
(t, s) => {
|
|
8
8
|
const {
|
|
9
|
-
className:
|
|
10
|
-
variant:
|
|
11
|
-
type:
|
|
12
|
-
slotProps: { input: n } = {},
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
className: e,
|
|
10
|
+
variant: o,
|
|
11
|
+
type: c,
|
|
12
|
+
slotProps: { input: u, wrapper: n } = {},
|
|
13
|
+
onChange: i,
|
|
14
|
+
onTransform: l,
|
|
15
|
+
...g
|
|
16
|
+
} = t, {
|
|
17
|
+
startAdornment: m,
|
|
18
|
+
className: I,
|
|
19
|
+
...b
|
|
20
|
+
} = u || {};
|
|
21
|
+
return /* @__PURE__ */ N("div", { ...n || {}, className: f("relative", n == null ? void 0 : n.className), children: [
|
|
22
|
+
!!m && /* @__PURE__ */ a("span", { className: "absolute left-[10px] top-1/2 -translate-y-1/2", children: m }),
|
|
23
|
+
/* @__PURE__ */ a(
|
|
18
24
|
"input",
|
|
19
25
|
{
|
|
20
|
-
type:
|
|
21
|
-
className:
|
|
22
|
-
|
|
23
|
-
!!
|
|
26
|
+
type: c,
|
|
27
|
+
className: f(
|
|
28
|
+
P({ variant: o, className: e }),
|
|
29
|
+
!!m && "pl-8",
|
|
30
|
+
I
|
|
24
31
|
),
|
|
25
|
-
ref:
|
|
26
|
-
...
|
|
32
|
+
ref: s,
|
|
33
|
+
...b,
|
|
34
|
+
...g,
|
|
35
|
+
onChange: (r) => {
|
|
36
|
+
typeof (l == null ? void 0 : l(r.target.value, r)) == "string" && (r.target.value = l(r.target.value, r)), i && i(r);
|
|
37
|
+
}
|
|
27
38
|
}
|
|
28
39
|
)
|
|
29
40
|
] });
|
|
30
41
|
}
|
|
31
42
|
);
|
|
32
43
|
p.displayName = "Input";
|
|
33
|
-
const
|
|
34
|
-
(t,
|
|
35
|
-
|
|
36
|
-
|
|
44
|
+
const y = d.forwardRef(
|
|
45
|
+
(t, s) => {
|
|
46
|
+
var n, i, l;
|
|
47
|
+
const [e, o] = v(!1), c = e ? "text" : "password", u = () => {
|
|
48
|
+
o(!e);
|
|
37
49
|
};
|
|
38
|
-
return /* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
50
|
+
return /* @__PURE__ */ N("div", { ...((n = t == null ? void 0 : t.slotProps) == null ? void 0 : n.wrapper) || {}, className: f("relative", (l = (i = t == null ? void 0 : t.slotProps) == null ? void 0 : i.wrapper) == null ? void 0 : l.className), children: [
|
|
51
|
+
/* @__PURE__ */ a(p, { ...t, type: c, className: "pr-8", ref: s }),
|
|
52
|
+
/* @__PURE__ */ a(x, { isVisible: e, onClick: u })
|
|
41
53
|
] });
|
|
42
54
|
}
|
|
43
55
|
);
|
|
44
|
-
|
|
45
|
-
const
|
|
56
|
+
y.displayName = "PasswordInput";
|
|
57
|
+
const x = ({ isVisible: t, onClick: s }) => /* @__PURE__ */ a(
|
|
46
58
|
"button",
|
|
47
59
|
{
|
|
48
60
|
type: "button",
|
|
49
|
-
onClick:
|
|
61
|
+
onClick: s,
|
|
50
62
|
className: "absolute top-1/2 right-3 transform -translate-y-1/2",
|
|
51
|
-
children: t ? /* @__PURE__ */
|
|
63
|
+
children: t ? /* @__PURE__ */ a(w, { size: 16 }) : /* @__PURE__ */ a(h, { size: 16 })
|
|
52
64
|
}
|
|
53
|
-
),
|
|
54
|
-
({ type: t, ...
|
|
65
|
+
), V = d.forwardRef(
|
|
66
|
+
({ type: t, ...s }, e) => t === "password" ? /* @__PURE__ */ a(y, { type: t, ...s, ref: e }) : /* @__PURE__ */ a(p, { type: t, ...s, ref: e })
|
|
55
67
|
);
|
|
56
|
-
|
|
68
|
+
V.displayName = "Input";
|
|
57
69
|
export {
|
|
58
70
|
p as BaseInput,
|
|
59
|
-
|
|
60
|
-
|
|
71
|
+
V as Input,
|
|
72
|
+
y as PasswordInput
|
|
61
73
|
};
|
package/Input/Input.types.d.ts
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import { BaseInput } from './Input';
|
|
1
2
|
import { inputVariants } from './inputVariants';
|
|
2
3
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
import { default as React, ReactNode } from 'react';
|
|
4
|
+
import { default as React, ChangeEvent, ComponentPropsWithoutRef, HTMLAttributes, ReactNode } from 'react';
|
|
4
5
|
|
|
5
|
-
export interface InputSlotInputProps {
|
|
6
|
+
export interface InputSlotInputProps extends ComponentPropsWithoutRef<typeof BaseInput> {
|
|
6
7
|
startAdornment?: ReactNode;
|
|
7
8
|
}
|
|
8
9
|
export interface InputSlotProps {
|
|
9
10
|
input?: InputSlotInputProps;
|
|
11
|
+
wrapper?: HTMLAttributes<HTMLDivElement>;
|
|
10
12
|
}
|
|
11
13
|
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputVariants> {
|
|
12
14
|
slotProps?: InputSlotProps;
|
|
15
|
+
/** func transform event.target.value before onChange event call*/
|
|
16
|
+
onTransform?: (value: string, event: ChangeEvent<HTMLInputElement>) => string;
|
|
13
17
|
}
|
package/Input/inputVariants.mjs
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { cva as e } from "class-variance-authority";
|
|
2
|
-
const
|
|
3
|
-
|
|
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
|
-
|
|
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
|
|
3
|
-
import * as LabelPrimitive from
|
|
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/labelVariants.mjs
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { cva as
|
|
2
|
-
const a =
|
|
3
|
-
"
|
|
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
|
|
3
|
-
import { LoadingMask as
|
|
4
|
-
|
|
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
|
-
|
|
7
|
+
s as LazyLoader
|
|
7
8
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC, HTMLAttributes, PropsWithChildren } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
|
|
4
|
+
declare const loadedIconVariants: (props?: ({
|
|
5
|
+
size?: "sm" | "lg" | "md" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
+
interface ILoadedIconProps extends HTMLAttributes<HTMLDivElement>, VariantProps<typeof loadedIconVariants> {
|
|
8
|
+
loading?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const LoadedIcon: FC<PropsWithChildren<ILoadedIconProps>>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { cva as n } from "class-variance-authority";
|
|
3
|
+
import { LoaderCircleIcon as t } from "lucide-react";
|
|
4
|
+
import { cn as c } from "@oneplatformdev/utils";
|
|
5
|
+
const d = n([], {
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
sm: "[&_svg]:!size-[18px]",
|
|
9
|
+
md: "[&_svg]:!size-5",
|
|
10
|
+
lg: "[&_svg]:!size-5"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: { size: "md" }
|
|
14
|
+
}), f = (a) => {
|
|
15
|
+
const { loading: e, children: i, size: o = "md", className: r, ...m } = a;
|
|
16
|
+
return /* @__PURE__ */ s(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
...m,
|
|
20
|
+
className: c(d({ size: o, className: r })),
|
|
21
|
+
children: e ? /* @__PURE__ */ s(t, { className: "animate-spin" }) : i
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
f as LoadedIcon
|
|
27
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LoadedIcon';
|
|
@@ -1,59 +1,21 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
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
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
20
|
+
f as LoadingMask
|
|
59
21
|
};
|
|
@@ -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
|
+
};
|
package/LoadingMask/index.d.ts
CHANGED
package/LoadingMask/index.mjs
CHANGED
package/Popover/Popover.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as PopoverPrimitive from
|
|
3
|
-
declare const Popover: React.
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
declare const Popover: (props: React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root>) => import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
declare const PopoverTrigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
5
|
declare const PopoverAnchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
package/Popover/Popover.mjs
CHANGED
|
@@ -1,24 +1,33 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import * as p from "react";
|
|
3
3
|
import * as o from "@radix-ui/react-popover";
|
|
4
|
-
import { cn as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
)
|
|
18
|
-
|
|
4
|
+
import { cn as l } from "@oneplatformdev/utils";
|
|
5
|
+
import { useDialogOverlayContainer as f } from "../Dialog/DialogOverlayScope.mjs";
|
|
6
|
+
const P = (t) => /* @__PURE__ */ e(o.Root, { ...t, modal: !1 }), h = o.Trigger, b = o.Anchor, c = p.forwardRef(({ className: t, align: a = "center", sideOffset: r = 4, style: n, avoidCollisions: i = !0, ...d }, s) => {
|
|
7
|
+
const m = f();
|
|
8
|
+
return /* @__PURE__ */ e(o.Portal, { container: m, children: /* @__PURE__ */ e(
|
|
9
|
+
o.Content,
|
|
10
|
+
{
|
|
11
|
+
ref: s,
|
|
12
|
+
align: a,
|
|
13
|
+
sideOffset: r,
|
|
14
|
+
className: l(
|
|
15
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
16
|
+
t
|
|
17
|
+
),
|
|
18
|
+
style: {
|
|
19
|
+
pointerEvents: "auto",
|
|
20
|
+
...n
|
|
21
|
+
},
|
|
22
|
+
...d,
|
|
23
|
+
avoidCollisions: i
|
|
24
|
+
}
|
|
25
|
+
) });
|
|
26
|
+
});
|
|
27
|
+
c.displayName = o.Content.displayName;
|
|
19
28
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
P as Popover,
|
|
30
|
+
b as PopoverAnchor,
|
|
31
|
+
c as PopoverContent,
|
|
32
|
+
h as PopoverTrigger
|
|
24
33
|
};
|
package/Radio/Radio.d.ts
ADDED
package/Radio/Radio.mjs
ADDED
|
@@ -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
|
+
}
|
package/Radio/index.d.ts
ADDED
package/Radio/index.mjs
ADDED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
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
|
-
|
|
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 };
|