@oneplatformdev/ui 0.1.99-beta.20 → 0.1.99-beta.201
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/.storybook/Wrappers.js.map +1 -1
- package/Accordion/Accordion.d.ts +1 -1
- package/Accordion/Accordion.d.ts.map +1 -1
- package/Accordion/Accordion.js +48 -26
- package/Accordion/Accordion.js.map +1 -1
- package/Alert/Alert.js.map +1 -1
- package/Alert/alertVariants.js.map +1 -1
- package/AlertDialog/AlertDialog.js.map +1 -1
- package/AlertDialog/AlertDialog.stories.js +2 -3
- package/AlertDialog/AlertDialog.stories.js.map +1 -1
- package/AlertDialog/AlertDialogRoot.d.ts.map +1 -1
- package/AlertDialog/AlertDialogRoot.js +23 -23
- package/AlertDialog/AlertDialogRoot.js.map +1 -1
- package/AreaChart/AreaChart.js.map +1 -1
- package/Aside/Aside.js.map +1 -1
- package/Aside/AsideSidebar.js.map +1 -1
- package/AspectRatio/AspectRatio.js.map +1 -1
- package/Avatar/Avatar.js.map +1 -1
- package/Badge/Badge.js.map +1 -1
- package/Badge/badgeVariants.js.map +1 -1
- package/Breadcrumb/Breadcrumb.js.map +1 -1
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.js +40 -41
- package/Button/Button.js.map +1 -1
- package/Button/Button.stories.js.map +1 -1
- package/Button/Button.utils.d.ts +3 -0
- package/Button/Button.utils.d.ts.map +1 -0
- package/Button/Button.utils.js +14 -0
- package/Button/Button.utils.js.map +1 -0
- package/Button/ButtonCounterBadge.js.map +1 -1
- package/Button/buttonVariants.d.ts.map +1 -1
- package/Button/buttonVariants.js +2 -1
- package/Button/buttonVariants.js.map +1 -1
- package/Button/index.d.ts +1 -0
- package/Button/index.d.ts.map +1 -1
- package/Button/index.js +8 -6
- package/Button/index.js.map +1 -1
- package/ButtonIcon/ButtonIcon.d.ts.map +1 -1
- package/ButtonIcon/ButtonIcon.js +49 -50
- package/ButtonIcon/ButtonIcon.js.map +1 -1
- package/ButtonIcon/ButtonIcon.stories.js +35 -33
- package/ButtonIcon/ButtonIcon.stories.js.map +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.js +3 -2
- package/ButtonIcon/buttonIconVariants.js.map +1 -1
- package/CHANGELOG.md +2674 -1802
- package/Calendar/Calendar.js +0 -1
- package/Calendar/Calendar.js.map +1 -1
- package/Card/Card.js.map +1 -1
- package/Carousel/Carousel.js +6 -7
- package/Carousel/Carousel.js.map +1 -1
- package/Chart/Chart.js.map +1 -1
- package/Checkbox/Checkbox.d.ts.map +1 -1
- package/Checkbox/Checkbox.js +34 -33
- package/Checkbox/Checkbox.js.map +1 -1
- package/Checkbox/Checkbox.stories.js +108 -0
- package/Checkbox/Checkbox.stories.js.map +1 -0
- package/Collapsible/Collapsible.js.map +1 -1
- package/Combobox/Combobox.d.ts +1 -1
- package/Combobox/Combobox.d.ts.map +1 -1
- package/Combobox/Combobox.js +205 -192
- package/Combobox/Combobox.js.map +1 -1
- package/Combobox/Combobox.stories.js +212 -0
- package/Combobox/Combobox.stories.js.map +1 -0
- package/Combobox/Combobox.types.d.ts +34 -19
- package/Combobox/Combobox.types.d.ts.map +1 -1
- package/Combobox/ComboboxOptionItem.d.ts +4 -3
- package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
- package/Combobox/ComboboxOptionItem.js +49 -22
- package/Combobox/ComboboxOptionItem.js.map +1 -1
- package/Combobox/ComboboxOptions.d.ts +2 -2
- package/Combobox/ComboboxOptions.d.ts.map +1 -1
- package/Combobox/ComboboxOptions.js +48 -49
- package/Combobox/ComboboxOptions.js.map +1 -1
- package/Command/Command.d.ts +6 -1
- package/Command/Command.d.ts.map +1 -1
- package/Command/Command.js +61 -47
- package/Command/Command.js.map +1 -1
- package/DataTable/DataTable.js +12 -13
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/DataTableColumnFilter.js +6 -7
- package/DataTable/DataTableColumnFilter.js.map +1 -1
- package/DataTable/useDataTable.js.map +1 -1
- package/DatePicker/DatePicker.js +12 -13
- package/DatePicker/DatePicker.js.map +1 -1
- package/Dialog/Dialog.d.ts +4 -1
- package/Dialog/Dialog.d.ts.map +1 -1
- package/Dialog/Dialog.js +70 -37
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/Dialog.stories.js +101 -0
- package/Dialog/Dialog.stories.js.map +1 -0
- package/Dialog/Dialog.types.d.ts +4 -0
- package/Dialog/Dialog.types.d.ts.map +1 -0
- package/Dialog/Dialog.types.js +2 -0
- package/Dialog/Dialog.types.js.map +1 -0
- package/Dialog/DialogOverlayScope.js.map +1 -1
- package/Dialog/index.d.ts +1 -0
- package/Dialog/index.d.ts.map +1 -1
- package/Drawer/Drawer.js.map +1 -1
- package/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/DropdownMenu/DropdownMenu.js +33 -20
- package/DropdownMenu/DropdownMenu.js.map +1 -1
- package/Dropzone/Dropzone.d.ts.map +1 -1
- package/Dropzone/Dropzone.js +46 -28
- package/Dropzone/Dropzone.js.map +1 -1
- package/Dropzone/Dropzone.stories.js +100 -0
- package/Dropzone/Dropzone.stories.js.map +1 -0
- package/Dropzone/Dropzone.types.js.map +1 -1
- package/Dropzone/DropzoneFilePreview.js.map +1 -1
- package/Dropzone/DropzoneSinglePickPreview.js.map +1 -1
- package/Dropzone/DropzoneUtils.js.map +1 -1
- package/Form/Form.d.ts.map +1 -1
- package/Form/Form.js +14 -15
- package/Form/Form.js.map +1 -1
- package/Form/FormRenderControl.d.ts +1 -1
- package/Form/FormRenderControl.d.ts.map +1 -1
- package/Form/FormRenderControl.js +53 -14
- package/Form/FormRenderControl.js.map +1 -1
- package/Form/FormRenderControl.types.d.ts +4 -1
- package/Form/FormRenderControl.types.d.ts.map +1 -1
- package/Form/Form_old.js +4 -5
- package/Form/Form_old.js.map +1 -1
- package/FormCheckbox/FormCheckbox.js +4 -4
- package/FormCheckbox/FormCheckbox.js.map +1 -1
- package/FormCombobox/FormCombobox.d.ts.map +1 -1
- package/FormCombobox/FormCombobox.js +15 -13
- package/FormCombobox/FormCombobox.js.map +1 -1
- package/FormDatePicker/FormDatePicker.d.ts.map +1 -1
- package/FormDatePicker/FormDatePicker.js +18 -16
- package/FormDatePicker/FormDatePicker.js.map +1 -1
- package/FormDropzone/FormDropzone.d.ts.map +1 -1
- package/FormDropzone/FormDropzone.js +13 -11
- package/FormDropzone/FormDropzone.js.map +1 -1
- package/FormInput/FormInput.d.ts.map +1 -1
- package/FormInput/FormInput.js +47 -27
- package/FormInput/FormInput.js.map +1 -1
- package/FormInput/FormInput.stories.js +61 -0
- package/FormInput/FormInput.stories.js.map +1 -0
- package/FormInput/FormInput.types.d.ts +1 -0
- package/FormInput/FormInput.types.d.ts.map +1 -1
- package/FormRadio/FormRadio.js.map +1 -1
- package/FormSelect/FormSelect.d.ts.map +1 -1
- package/FormSelect/FormSelect.js +19 -18
- package/FormSelect/FormSelect.js.map +1 -1
- package/FormTextarea/FormTextarea.d.ts.map +1 -1
- package/FormTextarea/FormTextarea.js +13 -11
- package/FormTextarea/FormTextarea.js.map +1 -1
- package/Header/Header.js.map +1 -1
- package/HoverCard/HoverCard.js.map +1 -1
- package/InfoBlock/InfoBlock.d.ts +7 -0
- package/InfoBlock/InfoBlock.d.ts.map +1 -0
- package/InfoBlock/InfoBlock.js +28 -0
- package/InfoBlock/InfoBlock.js.map +1 -0
- package/InfoBlock/InfoBlock.stories.js +50 -0
- package/InfoBlock/InfoBlock.stories.js.map +1 -0
- package/InfoBlock/InfoBlock.types.d.ts +9 -0
- package/InfoBlock/InfoBlock.types.d.ts.map +1 -0
- package/InfoBlock/InfoBlock.types.js +2 -0
- package/InfoBlock/InfoBlock.types.js.map +1 -0
- package/InfoBlock/index.d.ts +3 -0
- package/InfoBlock/index.d.ts.map +1 -0
- package/InfoBlock/index.js +5 -0
- package/InfoBlock/index.js.map +1 -0
- package/InfoBlock/infoBlockVariants.d.ts +6 -0
- package/InfoBlock/infoBlockVariants.d.ts.map +1 -0
- package/InfoBlock/infoBlockVariants.js +27 -0
- package/InfoBlock/infoBlockVariants.js.map +1 -0
- package/Input/Input.d.ts.map +1 -1
- package/Input/Input.js +65 -51
- package/Input/Input.js.map +1 -1
- package/Input/Input.types.d.ts +1 -0
- package/Input/Input.types.d.ts.map +1 -1
- package/Input/inputVariants.d.ts.map +1 -1
- package/Input/inputVariants.js +5 -4
- package/Input/inputVariants.js.map +1 -1
- package/InputOTP/InputOTP.d.ts.map +1 -1
- package/InputOTP/InputOTP.js.map +1 -1
- package/LICENSE +21 -21
- package/Label/Label.js.map +1 -1
- package/Label/labelVariants.js.map +1 -1
- package/LazyLoader/LazyLoader.js +4 -5
- package/LazyLoader/LazyLoader.js.map +1 -1
- package/LoadedIcon/LoadedIcon.js.map +1 -1
- package/LoadingMask/LoadingMask.d.ts +1 -2
- package/LoadingMask/LoadingMask.d.ts.map +1 -1
- package/LoadingMask/LoadingMask.js +8 -8
- package/LoadingMask/LoadingMask.js.map +1 -1
- package/LoadingMask/LoadingMask.types.d.ts +1 -0
- package/LoadingMask/LoadingMask.types.d.ts.map +1 -1
- package/LoadingMask/RenderLoadingMask.js.map +1 -1
- package/LoadingProgress/LoadingProgress.js.map +1 -1
- package/LoadingProgress/loadingProgressVariants.js.map +1 -1
- package/Menubar/Menubar.js.map +1 -1
- package/NavigationMenu/NavigationMenu.js.map +1 -1
- package/NavigationMenu/navigationMenuVariants.js.map +1 -1
- package/Pagination/Pagination.js +0 -1
- package/Pagination/Pagination.js.map +1 -1
- package/Popover/Popover.js.map +1 -1
- package/Progress/Progress.js.map +1 -1
- package/README.md +7 -7
- package/Radio/Radio.js.map +1 -1
- package/RadioGroup/RadioGroup.js.map +1 -1
- package/Resizable/Resizable.js.map +1 -1
- package/Resizable/Resizable.stories.js.map +1 -1
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/Search/Search.d.ts.map +1 -1
- package/Search/Search.js +40 -31
- package/Search/Search.js.map +1 -1
- package/Search/Search.stories.js +17 -0
- package/Search/Search.stories.js.map +1 -0
- package/Select/Select.d.ts.map +1 -1
- package/Select/Select.js +53 -49
- package/Select/Select.js.map +1 -1
- package/Select/Select.stories.js.map +1 -1
- package/Select/Select.types.d.ts +4 -0
- package/Select/Select.types.d.ts.map +1 -1
- package/Select/SelectRoot.js +1 -1
- package/Select/SelectRoot.js.map +1 -1
- package/Separator/Separator.js.map +1 -1
- package/Sheet/Sheet.js.map +1 -1
- package/Sidebar/Sidebar.js +20 -21
- package/Sidebar/Sidebar.js.map +1 -1
- package/Skeleton/Skeleton.js.map +1 -1
- package/Slider/Slider.js.map +1 -1
- package/Sonner/Sonner.js.map +1 -1
- package/Switch/Switch.js.map +1 -1
- package/Table/Table.js.map +1 -1
- package/TablePagination/TablePagination.js +17 -21
- package/TablePagination/TablePagination.js.map +1 -1
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/TabsRoot.js.map +1 -1
- package/Textarea/Textarea.d.ts.map +1 -1
- package/Textarea/Textarea.js +48 -43
- package/Textarea/Textarea.js.map +1 -1
- package/Textarea/Textarea.stories.js +1 -1
- package/Textarea/Textarea.stories.js.map +1 -1
- package/Textarea/Textarea.types.d.ts +3 -1
- package/Textarea/Textarea.types.d.ts.map +1 -1
- package/Textarea/useAutosizeTextArea.js.map +1 -1
- package/Theme/ThemeModeToggle.js +3 -4
- package/Theme/ThemeModeToggle.js.map +1 -1
- package/Theme/ThemeProvider.js.map +1 -1
- package/Toast/Toast.d.ts +1 -1
- package/Toast/Toast.js.map +1 -1
- package/Toast/toast.constants.js.map +1 -1
- package/Toast/toastVariants.d.ts +1 -1
- package/Toast/toastVariants.js.map +1 -1
- package/Toast/useToast.js.map +1 -1
- package/Toaster/Toaster.js.map +1 -1
- package/Toggle/Toggle.js.map +1 -1
- package/ToggleGroup/ToggleGroup.js.map +1 -1
- package/Tooltip/Tooltip.d.ts.map +1 -1
- package/Tooltip/Tooltip.js +41 -29
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tooltip/Tooltip.types.d.ts +1 -0
- package/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/Tooltip/TooltipRoot.js.map +1 -1
- package/Tooltip/tooltipVariants.d.ts +4 -0
- package/Tooltip/tooltipVariants.d.ts.map +1 -0
- package/Tooltip/tooltipVariants.js +23 -0
- package/Tooltip/tooltipVariants.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +332 -328
- package/index.js.map +1 -1
- package/package.json +6 -5
package/Input/Input.js
CHANGED
|
@@ -1,86 +1,100 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Eye as
|
|
4
|
-
import { inputVariants as
|
|
5
|
-
import { cn as
|
|
6
|
-
const
|
|
7
|
-
(t,
|
|
1
|
+
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import c, { useState as P } from "react";
|
|
3
|
+
import { Eye as S, EyeOff as V } from "lucide-react";
|
|
4
|
+
import { inputVariants as B } from "./inputVariants.js";
|
|
5
|
+
import { cn as n } from "@oneplatformdev/utils";
|
|
6
|
+
const f = c.forwardRef(
|
|
7
|
+
(t, s) => {
|
|
8
8
|
const {
|
|
9
|
-
className:
|
|
9
|
+
className: a,
|
|
10
10
|
variant: o,
|
|
11
|
-
type:
|
|
12
|
-
slotProps: { input:
|
|
13
|
-
onChange:
|
|
14
|
-
onTransform:
|
|
11
|
+
type: l,
|
|
12
|
+
slotProps: { input: i, wrapper: d } = {},
|
|
13
|
+
onChange: g,
|
|
14
|
+
onTransform: y,
|
|
15
|
+
counter: h = !1,
|
|
16
|
+
maxLength: p,
|
|
15
17
|
fullSize: N = !1,
|
|
16
|
-
|
|
18
|
+
value: w,
|
|
19
|
+
...x
|
|
17
20
|
} = t, {
|
|
18
|
-
startAdornment:
|
|
19
|
-
className:
|
|
20
|
-
...
|
|
21
|
-
} =
|
|
22
|
-
return /* @__PURE__ */
|
|
21
|
+
startAdornment: u,
|
|
22
|
+
className: v,
|
|
23
|
+
...I
|
|
24
|
+
} = i || {};
|
|
25
|
+
return /* @__PURE__ */ m(
|
|
23
26
|
"div",
|
|
24
27
|
{
|
|
25
|
-
...
|
|
26
|
-
className:
|
|
28
|
+
...d || {},
|
|
29
|
+
className: n(
|
|
27
30
|
"relative",
|
|
28
31
|
N && "w-full",
|
|
29
|
-
|
|
32
|
+
d?.className
|
|
30
33
|
),
|
|
31
34
|
children: [
|
|
32
|
-
!!
|
|
33
|
-
/* @__PURE__ */
|
|
35
|
+
!!u && /* @__PURE__ */ e("span", { className: "absolute left-[10px] top-1/2 -translate-y-1/2", children: u }),
|
|
36
|
+
/* @__PURE__ */ e(
|
|
34
37
|
"input",
|
|
35
38
|
{
|
|
36
|
-
type:
|
|
37
|
-
className:
|
|
38
|
-
|
|
39
|
-
!!
|
|
40
|
-
|
|
39
|
+
type: l,
|
|
40
|
+
className: n(
|
|
41
|
+
B({ variant: o, className: a }),
|
|
42
|
+
!!u && "pl-10",
|
|
43
|
+
v,
|
|
41
44
|
N && "min-w-auto"
|
|
42
45
|
),
|
|
43
|
-
ref:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
ref: s,
|
|
47
|
+
maxLength: p,
|
|
48
|
+
value: w,
|
|
49
|
+
...I,
|
|
50
|
+
...x,
|
|
46
51
|
onChange: (r) => {
|
|
47
|
-
typeof
|
|
52
|
+
typeof y?.(r.target.value, r) == "string" && (r.target.value = y(r.target.value, r)), g && g(r);
|
|
48
53
|
}
|
|
49
54
|
}
|
|
50
|
-
)
|
|
55
|
+
),
|
|
56
|
+
h && typeof p == "number" && /* @__PURE__ */ m("div", { className: n(
|
|
57
|
+
"w-full text-right inline-flex items-center justify-end",
|
|
58
|
+
"text-xs font-medium leading-[1.2] text-muted-foreground",
|
|
59
|
+
"peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
60
|
+
), children: [
|
|
61
|
+
String(w || "").length,
|
|
62
|
+
"/",
|
|
63
|
+
p
|
|
64
|
+
] })
|
|
51
65
|
]
|
|
52
66
|
}
|
|
53
67
|
);
|
|
54
68
|
}
|
|
55
69
|
);
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
(t,
|
|
59
|
-
const [
|
|
60
|
-
o(!
|
|
70
|
+
f.displayName = "Input";
|
|
71
|
+
const b = c.forwardRef(
|
|
72
|
+
(t, s) => {
|
|
73
|
+
const [a, o] = P(!1), l = a ? "text" : "password", i = () => {
|
|
74
|
+
o(!a);
|
|
61
75
|
};
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
/* @__PURE__ */
|
|
64
|
-
/* @__PURE__ */
|
|
76
|
+
return /* @__PURE__ */ m("div", { ...t?.slotProps?.wrapper || {}, className: n("relative", t?.slotProps?.wrapper?.className), children: [
|
|
77
|
+
/* @__PURE__ */ e(f, { ...t, type: l, className: "pr-8", ref: s }),
|
|
78
|
+
/* @__PURE__ */ e(R, { isVisible: a, onClick: i })
|
|
65
79
|
] });
|
|
66
80
|
}
|
|
67
81
|
);
|
|
68
|
-
|
|
69
|
-
const
|
|
82
|
+
b.displayName = "PasswordInput";
|
|
83
|
+
const R = ({ isVisible: t, onClick: s }) => /* @__PURE__ */ e(
|
|
70
84
|
"button",
|
|
71
85
|
{
|
|
72
86
|
type: "button",
|
|
73
|
-
onClick:
|
|
87
|
+
onClick: s,
|
|
74
88
|
className: "absolute top-1/2 right-3 transform -translate-y-1/2",
|
|
75
|
-
children: t ? /* @__PURE__ */
|
|
89
|
+
children: t ? /* @__PURE__ */ e(S, { size: 16 }) : /* @__PURE__ */ e(V, { size: 16 })
|
|
76
90
|
}
|
|
77
|
-
),
|
|
78
|
-
({ type: t, ...
|
|
91
|
+
), j = c.forwardRef(
|
|
92
|
+
({ type: t, ...s }, a) => t === "password" ? /* @__PURE__ */ e(b, { type: t, ...s, ref: a }) : /* @__PURE__ */ e(f, { type: t, ...s, ref: a })
|
|
79
93
|
);
|
|
80
|
-
|
|
94
|
+
j.displayName = "Input";
|
|
81
95
|
export {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
96
|
+
f as BaseInput,
|
|
97
|
+
j as Input,
|
|
98
|
+
b as PasswordInput
|
|
85
99
|
};
|
|
86
100
|
//# sourceMappingURL=Input.js.map
|
package/Input/Input.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../src/Input/Input.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Eye, EyeOff } from 'lucide-react';\nimport { inputVariants } from './inputVariants';\n\nimport { cn } from '@oneplatformdev/utils';\nimport { InputProps } from './Input.types';\n\nexport const BaseInput = React.forwardRef<HTMLInputElement, InputProps>(\n (props, ref) => {\n const {\n className,\n variant,\n type,\n slotProps: { input, wrapper } = {},\n onChange,\n onTransform,\n fullSize = false,\n ...rest\n } = props;\n const {\n startAdornment,\n className: classNameInputSlotProps,\n ...restInputSlotProps\n } = input || {};\n return (\n <div\n {...(wrapper || {})}\n className={cn(\n 'relative',\n fullSize && 'w-full',\n wrapper?.className\n )}>\n {Boolean(startAdornment) && (\n <span className=\"absolute left-[10px] top-1/2 -translate-y-1/2\">\n {startAdornment}\n </span>\n )}\n <input\n type={type}\n className={cn(\n inputVariants({ variant, className }),\n Boolean(startAdornment) && 'pl-
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../src/Input/Input.tsx"],"sourcesContent":["import React, { useState } from 'react';\r\nimport { Eye, EyeOff } from 'lucide-react';\r\nimport { inputVariants } from './inputVariants';\r\n\r\nimport { cn } from '@oneplatformdev/utils';\r\nimport { InputProps } from './Input.types';\r\n\r\nexport const BaseInput = React.forwardRef<HTMLInputElement, InputProps>(\r\n (props, ref) => {\r\n const {\r\n className,\r\n variant,\r\n type,\r\n slotProps: { input, wrapper } = {},\r\n onChange,\r\n onTransform,\r\n counter = false,\r\n maxLength,\r\n fullSize = false,\r\n value,\r\n ...rest\r\n } = props;\r\n const {\r\n startAdornment,\r\n className: classNameInputSlotProps,\r\n ...restInputSlotProps\r\n } = input || {};\r\n return (\r\n <div\r\n {...(wrapper || {})}\r\n className={cn(\r\n 'relative',\r\n fullSize && 'w-full',\r\n wrapper?.className\r\n )}>\r\n {Boolean(startAdornment) && (\r\n <span className=\"absolute left-[10px] top-1/2 -translate-y-1/2\">\r\n {startAdornment}\r\n </span>\r\n )}\r\n <input\r\n type={type}\r\n className={cn(\r\n inputVariants({ variant, className }),\r\n Boolean(startAdornment) && 'pl-10',\r\n classNameInputSlotProps,\r\n fullSize && 'min-w-auto',\r\n )}\r\n ref={ref}\r\n maxLength={maxLength}\r\n value={value}\r\n {...restInputSlotProps}\r\n {...rest}\r\n onChange={(e) => {\r\n if (typeof onTransform?.(e.target.value, e) === 'string') {\r\n e.target.value = onTransform(e.target.value, e);\r\n }\r\n if (onChange) onChange(e);\r\n }}\r\n />\r\n {counter && typeof maxLength === 'number' && (\r\n <div className={cn(\r\n 'w-full text-right inline-flex items-center justify-end',\r\n 'text-xs font-medium leading-[1.2] text-muted-foreground',\r\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70'\r\n )}>\r\n {String(value || '').length}/{maxLength}\r\n </div>\r\n )}\r\n </div>\r\n );\r\n }\r\n);\r\nBaseInput.displayName = 'Input';\r\n\r\nexport const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\r\n (props, ref) => {\r\n const [isVisible, setIsVisible] = useState<boolean>(false);\r\n\r\n const inputType = isVisible ? 'text' : 'password';\r\n\r\n const toggleVisibility = () => {\r\n setIsVisible(!isVisible);\r\n };\r\n\r\n return (\r\n <div {...(props?.slotProps?.wrapper || {})} className={cn('relative', props?.slotProps?.wrapper?.className)}>\r\n <BaseInput {...props} type={inputType} className=\"pr-8\" ref={ref} />\r\n <VisibilityButton isVisible={isVisible} onClick={toggleVisibility} />\r\n </div>\r\n );\r\n }\r\n);\r\nPasswordInput.displayName = 'PasswordInput';\r\n\r\ntype VisibilityButtonProps = {\r\n isVisible: boolean\r\n onClick: () => void\r\n}\r\n\r\nconst VisibilityButton = ({ isVisible, onClick }:VisibilityButtonProps) => (\r\n <button\r\n type=\"button\"\r\n onClick={onClick}\r\n className=\"absolute top-1/2 right-3 transform -translate-y-1/2\"\r\n >\r\n {isVisible ? <Eye size={16} /> : <EyeOff size={16} />}\r\n </button>\r\n);\r\n\r\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\r\n ({ type, ...props }, ref) => {\r\n if (type === 'password') return <PasswordInput type={type} {...props} ref={ref} />;\r\n return <BaseInput type={type} {...props} ref={ref} />;\r\n }\r\n);\r\nInput.displayName = 'Input';\r\n"],"names":["BaseInput","React","props","ref","className","variant","type","input","wrapper","onChange","onTransform","counter","maxLength","fullSize","value","rest","startAdornment","classNameInputSlotProps","restInputSlotProps","jsxs","cn","jsx","inputVariants","e","PasswordInput","isVisible","setIsVisible","useState","inputType","toggleVisibility","VisibilityButton","onClick","Eye","EyeOff","Input"],"mappings":";;;;;AAOO,MAAMA,IAAYC,EAAM;AAAA,EAC7B,CAACC,GAAOC,MAAQ;AACd,UAAM;AAAA,MACJ,WAAAC;AAAA,MACA,SAAAC;AAAA,MACA,MAAAC;AAAA,MACA,WAAW,EAAE,OAAAC,GAAO,SAAAC,EAAA,IAAY,CAAA;AAAA,MAChC,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,SAAAC,IAAU;AAAA,MACV,WAAAC;AAAA,MACA,UAAAC,IAAW;AAAA,MACX,OAAAC;AAAA,MACA,GAAGC;AAAA,IAAA,IACDb,GACE;AAAA,MACJ,gBAAAc;AAAA,MACA,WAAWC;AAAA,MACX,GAAGC;AAAA,IAAA,IACDX,KAAS,CAAA;AACb,WACE,gBAAAY;AAAA,MAAC;AAAA,MAAA;AAAA,QACE,GAAIX,KAAW,CAAA;AAAA,QAChB,WAAWY;AAAA,UACT;AAAA,UACAP,KAAY;AAAA,UACZL,GAAS;AAAA,QAAA;AAAA,QAEV,UAAA;AAAA,UAAA,EAAQQ,KACP,gBAAAK,EAAC,QAAA,EAAK,WAAU,iDACb,UAAAL,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AAA,MAClE,gBAAAkB,EAACS,GAAA,EAAiB,WAAAL,GAAsB,SAASI,EAAA,CAAkB;AAAA,IAAA,GACrE;AAAA,EAEJ;AACF;AACAL,EAAc,cAAc;AAO5B,MAAMM,IAAmB,CAAC,EAAE,WAAAL,GAAW,SAAAM,QACrC,gBAAAV;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,MAAK;AAAA,IACL,SAAAU;AAAA,IACA,WAAU;AAAA,IAET,UAAAN,sBAAaO,GAAA,EAAI,MAAM,IAAI,IAAK,gBAAAX,EAACY,GAAA,EAAO,MAAM,GAAA,CAAI;AAAA,EAAA;AACrD,GAGWC,IAAQjC,EAAM;AAAA,EACzB,CAAC,EAAE,MAAAK,GAAM,GAAGJ,EAAA,GAASC,MACfG,MAAS,aAAmB,gBAAAe,EAACG,KAAc,MAAAlB,GAAa,GAAGJ,GAAO,KAAAC,GAAU,IACzE,gBAAAkB,EAACrB,GAAA,EAAU,MAAAM,GAAa,GAAGJ,GAAO,KAAAC,GAAU;AAEvD;AACA+B,EAAM,cAAc;"}
|
package/Input/Input.types.d.ts
CHANGED
|
@@ -16,5 +16,6 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
16
16
|
/** func transform pasted value before set to input */
|
|
17
17
|
onPastePrepare?: (value: string, event: React.ClipboardEvent<HTMLInputElement>) => string;
|
|
18
18
|
fullSize?: boolean;
|
|
19
|
+
counter?: boolean;
|
|
19
20
|
}
|
|
20
21
|
//# sourceMappingURL=Input.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.types.d.ts","sourceRoot":"","sources":["../../src/Input/Input.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,WAAW,EACX,wBAAwB,EACxB,cAAc,EACd,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,iB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CAAC;IAC5B,OAAO,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;CAC1C;AAED,MAAM,WAAW,UACf,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,YAAY,CAAC,OAAO,aAAa,CAAC;IACvF,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,kEAAkE;IAClE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,MAAM,CAAC;IAC9E,sDAAsD;IACtD,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,KAAK,MAAM,CAAC;IAC1F,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputVariants.d.ts","sourceRoot":"","sources":["../../src/Input/inputVariants.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;
|
|
1
|
+
{"version":3,"file":"inputVariants.d.ts","sourceRoot":"","sources":["../../src/Input/inputVariants.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa;;8EAoBzB,CAAC"}
|
package/Input/inputVariants.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { cva as
|
|
2
|
-
const t =
|
|
1
|
+
import { cva as r } from "class-variance-authority";
|
|
2
|
+
const t = r(
|
|
3
3
|
[
|
|
4
|
-
"flex h-10 w-full rounded-
|
|
4
|
+
"flex h-10 w-full rounded-lg border border-input px-3 py-2",
|
|
5
5
|
"text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground",
|
|
6
6
|
"focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
7
7
|
"group-data-[state=invalid]/form-control:border-destructive",
|
|
8
|
-
"group-data-[state=valid]/form-control:border-input"
|
|
8
|
+
"group-data-[state=valid]/form-control:border-input",
|
|
9
|
+
"box-border"
|
|
9
10
|
],
|
|
10
11
|
{
|
|
11
12
|
variants: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputVariants.js","sources":["../../src/Input/inputVariants.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const inputVariants = cva(\n [\n 'flex h-10 w-full rounded-
|
|
1
|
+
{"version":3,"file":"inputVariants.js","sources":["../../src/Input/inputVariants.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\r\n\r\nexport const inputVariants = cva(\r\n [\r\n 'flex h-10 w-full rounded-lg border border-input px-3 py-2',\r\n 'text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground',\r\n 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50',\r\n 'group-data-[state=invalid]/form-control:border-destructive',\r\n 'group-data-[state=valid]/form-control:border-input',\r\n 'box-border',\r\n ],\r\n {\r\n variants: {\r\n variant: {\r\n default: 'bg-background',\r\n grey: 'bg-slate-200',\r\n },\r\n },\r\n defaultVariants: {\r\n variant: 'default',\r\n },\r\n }\r\n);\r\n"],"names":["inputVariants","cva"],"mappings":";AAEO,MAAMA,IAAgBC;AAAA,EAC3B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputOTP.d.ts","sourceRoot":"","sources":["../../src/InputOTP/InputOTP.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,QAAA,MAAM,QAAQ;;;;;
|
|
1
|
+
{"version":3,"file":"InputOTP.d.ts","sourceRoot":"","sources":["../../src/InputOTP/InputOTP.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,QAAA,MAAM,QAAQ;;;;;kBAUmB,GAAG;;;;;;;;;;;;;kBAAH,GAAG;;;;;;;;2FAGlC,CAAA;AAGF,QAAA,MAAM,aAAa,mKAKjB,CAAA;AAGF,QAAA,MAAM,YAAY;WAEiC,MAAM;wCAuBvD,CAAA;AAGF,QAAA,MAAM,iBAAiB,mKAOrB,CAAA;AAGF,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAA"}
|
package/InputOTP/InputOTP.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputOTP.js","sources":["../../src/InputOTP/InputOTP.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { OTPInput, OTPInputContext } from \"input-otp\"\nimport { Minus } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\";\n\nconst InputOTP = React.forwardRef<\n React.ElementRef<typeof OTPInput>,\n React.ComponentPropsWithoutRef<typeof OTPInput>\n>(({ className, containerClassName, ...props }, ref) => (\n <OTPInput\n ref={ref}\n containerClassName={cn(\n \"flex items-center gap-2 has-disabled:opacity-50\",\n containerClassName\n )}\n className={cn(\"disabled:cursor-not-allowed\", className)}\n {...props}\n />\n))\nInputOTP.displayName = \"InputOTP\"\n\nconst InputOTPGroup = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ className, ...props }, ref) => (\n <div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\n))\nInputOTPGroup.displayName = \"InputOTPGroup\"\n\nconst InputOTPSlot = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\n>(({ index, className, ...props }, ref) => {\n const inputOTPContext = React.useContext(OTPInputContext)\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]\n\n return (\n <div\n ref={ref}\n className={cn(\n \"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all first:rounded-l-md first:border-l last:rounded-r-md\",\n isActive && \"z-10 ring-1 ring-ring\",\n className\n )}\n {...props}\n >\n {char}\n {hasFakeCaret && (\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\n <div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000\" />\n </div>\n )}\n </div>\n )\n})\nInputOTPSlot.displayName = \"InputOTPSlot\"\n\nconst InputOTPSeparator = React.forwardRef<\n React.ElementRef<\"div\">,\n React.ComponentPropsWithoutRef<\"div\">\n>(({ ...props }, ref) => (\n <div ref={ref} role=\"separator\" {...props}>\n <Minus />\n </div>\n))\nInputOTPSeparator.displayName = \"InputOTPSeparator\"\n\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\n"],"names":["InputOTP","React","className","containerClassName","props","ref","jsx","OTPInput","cn","InputOTPGroup","InputOTPSlot","index","inputOTPContext","OTPInputContext","char","hasFakeCaret","isActive","jsxs","InputOTPSeparator","Minus"],"mappings":";;;;;AAQA,MAAMA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,oBAAAC,GAAoB,GAAGC,KAASC,MAC9C,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,oBAAoBG;AAAA,MAClB;AAAA,MACAL;AAAA,IAAA;AAAA,IAEF,WAAWK,EAAG,+BAA+BN,CAAS;AAAA,IACrD,GAAGE;AAAA,EAAA;AACN,CACD;AACDJ,EAAS,cAAc;AAEvB,MAAMS,IAAgBR,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGE,KAASC,wBACzB,OAAA,EAAI,KAAAA,GAAU,WAAWG,EAAG,qBAAqBN,CAAS,GAAI,GAAGE,GAAO,CAC1E;AACDK,EAAc,cAAc;AAE5B,MAAMC,IAAeT,EAAM,WAGzB,CAAC,EAAE,OAAAU,GAAO,WAAAT,GAAW,GAAGE,EAAA,GAASC,MAAQ;AACzC,QAAMO,IAAkBX,EAAM,WAAWY,CAAe,GAClD,EAAE,MAAAC,GAAM,cAAAC,GAAc,UAAAC,MAAaJ,EAAgB,MAAMD,CAAK;AAEpE,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAZ;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAQ,KAAY;AAAA,QACZd;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEH,UAAA;AAAA,QAAAU;AAAA,QACAC,uBACE,OAAA,EAAI,WAAU,yEACb,UAAA,gBAAAT,EAAC,OAAA,EAAI,WAAU,2DAAA,CAA2D,EAAA,CAC5E;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;AACDI,EAAa,cAAc;AAE3B,MAAMQ,IAAoBjB,EAAM,WAG9B,CAAC,EAAE,GAAGG,KAASC,wBACd,OAAA,EAAI,KAAAA,GAAU,MAAK,aAAa,GAAGD,GAClC,UAAA,gBAAAE,EAACa,GAAA,CAAA,CAAM,GACT,CACD;AACDD,EAAkB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"InputOTP.js","sources":["../../src/InputOTP/InputOTP.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport { OTPInput, OTPInputContext } from \"input-otp\"\r\nimport { Minus } from \"lucide-react\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\";\r\n\r\nconst InputOTP = React.forwardRef<\r\n React.ElementRef<typeof OTPInput>,\r\n React.ComponentPropsWithoutRef<typeof OTPInput>\r\n>(({ className, containerClassName, ...props }, ref) => (\r\n <OTPInput\r\n ref={ref}\r\n containerClassName={cn(\r\n \"flex items-center gap-2 has-disabled:opacity-50\",\r\n containerClassName\r\n )}\r\n className={cn(\"disabled:cursor-not-allowed\", className)}\r\n {...props}\r\n />\r\n))\r\nInputOTP.displayName = \"InputOTP\"\r\n\r\nconst InputOTPGroup = React.forwardRef<\r\n React.ElementRef<\"div\">,\r\n React.ComponentPropsWithoutRef<\"div\">\r\n>(({ className, ...props }, ref) => (\r\n <div ref={ref} className={cn(\"flex items-center\", className)} {...props} />\r\n))\r\nInputOTPGroup.displayName = \"InputOTPGroup\"\r\n\r\nconst InputOTPSlot = React.forwardRef<\r\n React.ElementRef<\"div\">,\r\n React.ComponentPropsWithoutRef<\"div\"> & { index: number }\r\n>(({ index, className, ...props }, ref) => {\r\n const inputOTPContext = React.useContext(OTPInputContext)\r\n const { char, hasFakeCaret, isActive } = inputOTPContext.slots[index]\r\n\r\n return (\r\n <div\r\n ref={ref}\r\n className={cn(\r\n \"relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-xs transition-all first:rounded-l-md first:border-l last:rounded-r-md\",\r\n isActive && \"z-10 ring-1 ring-ring\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {char}\r\n {hasFakeCaret && (\r\n <div className=\"pointer-events-none absolute inset-0 flex items-center justify-center\">\r\n <div className=\"h-4 w-px animate-caret-blink bg-foreground duration-1000\" />\r\n </div>\r\n )}\r\n </div>\r\n )\r\n})\r\nInputOTPSlot.displayName = \"InputOTPSlot\"\r\n\r\nconst InputOTPSeparator = React.forwardRef<\r\n React.ElementRef<\"div\">,\r\n React.ComponentPropsWithoutRef<\"div\">\r\n>(({ ...props }, ref) => (\r\n <div ref={ref} role=\"separator\" {...props}>\r\n <Minus />\r\n </div>\r\n))\r\nInputOTPSeparator.displayName = \"InputOTPSeparator\"\r\n\r\nexport { InputOTP, InputOTPGroup, InputOTPSlot, InputOTPSeparator }\r\n"],"names":["InputOTP","React","className","containerClassName","props","ref","jsx","OTPInput","cn","InputOTPGroup","InputOTPSlot","index","inputOTPContext","OTPInputContext","char","hasFakeCaret","isActive","jsxs","InputOTPSeparator","Minus"],"mappings":";;;;;AAQA,MAAMA,IAAWC,EAAM,WAGrB,CAAC,EAAE,WAAAC,GAAW,oBAAAC,GAAoB,GAAGC,KAASC,MAC9C,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,oBAAoBG;AAAA,MAClB;AAAA,MACAL;AAAA,IAAA;AAAA,IAEF,WAAWK,EAAG,+BAA+BN,CAAS;AAAA,IACrD,GAAGE;AAAA,EAAA;AACN,CACD;AACDJ,EAAS,cAAc;AAEvB,MAAMS,IAAgBR,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,GAAGE,KAASC,wBACzB,OAAA,EAAI,KAAAA,GAAU,WAAWG,EAAG,qBAAqBN,CAAS,GAAI,GAAGE,GAAO,CAC1E;AACDK,EAAc,cAAc;AAE5B,MAAMC,IAAeT,EAAM,WAGzB,CAAC,EAAE,OAAAU,GAAO,WAAAT,GAAW,GAAGE,EAAA,GAASC,MAAQ;AACzC,QAAMO,IAAkBX,EAAM,WAAWY,CAAe,GAClD,EAAE,MAAAC,GAAM,cAAAC,GAAc,UAAAC,MAAaJ,EAAgB,MAAMD,CAAK;AAEpE,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAZ;AAAA,MACA,WAAWG;AAAA,QACT;AAAA,QACAQ,KAAY;AAAA,QACZd;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,MAEH,UAAA;AAAA,QAAAU;AAAA,QACAC,uBACE,OAAA,EAAI,WAAU,yEACb,UAAA,gBAAAT,EAAC,OAAA,EAAI,WAAU,2DAAA,CAA2D,EAAA,CAC5E;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;AACDI,EAAa,cAAc;AAE3B,MAAMQ,IAAoBjB,EAAM,WAG9B,CAAC,EAAE,GAAGG,KAASC,wBACd,OAAA,EAAI,KAAAA,GAAU,MAAK,aAAa,GAAGD,GAClC,UAAA,gBAAAE,EAACa,GAAA,CAAA,CAAM,GACT,CACD;AACDD,EAAkB,cAAc;"}
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Oleh Maksimenko
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Oleh Maksimenko
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/Label/Label.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.js","sources":["../../src/Label/Label.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Label(props: React.ComponentProps<typeof LabelPrimitive.Root>) {\n const { className, ...rest } = props;\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n className\n )}\n {...rest}\n />\n )\n}\nexport { Label, LabelPrimitive }\n\nexport default Label;\n"],"names":["Label","props","className","rest","jsx","LabelPrimitive","cn"],"mappings":";;;AAOA,SAASA,EAAMC,GAAyD;AACtE,QAAM,EAAE,WAAAC,GAAW,GAAGC,EAAA,IAASF;AAC/B,SACE,gBAAAG;AAAA,IAACC,EAAe;AAAA,IAAf;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
1
|
+
{"version":3,"file":"Label.js","sources":["../../src/Label/Label.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\"\r\n\r\nfunction Label(props: React.ComponentProps<typeof LabelPrimitive.Root>) {\r\n const { className, ...rest } = props;\r\n return (\r\n <LabelPrimitive.Root\r\n data-slot=\"label\"\r\n className={cn(\r\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\r\n className\r\n )}\r\n {...rest}\r\n />\r\n )\r\n}\r\nexport { Label, LabelPrimitive }\r\n\r\nexport default Label;\r\n"],"names":["Label","props","className","rest","jsx","LabelPrimitive","cn"],"mappings":";;;AAOA,SAASA,EAAMC,GAAyD;AACtE,QAAM,EAAE,WAAAC,GAAW,GAAGC,EAAA,IAASF;AAC/B,SACE,gBAAAG;AAAA,IAACC,EAAe;AAAA,IAAf;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labelVariants.js","sources":["../../src/Label/labelVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const labelVariants = cva([\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\n 'text-md font-medium leading-[150%]',\n 'group-data-[state=valid]/form-control:text-[#363B4E]',\n 'group-data-[state=invalid]/form-control:text-destructive',\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n]);\n"],"names":["labelVariants","cva"],"mappings":";AAEO,MAAMA,IAAgBC,EAAI;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;"}
|
|
1
|
+
{"version":3,"file":"labelVariants.js","sources":["../../src/Label/labelVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\r\n\r\nexport const labelVariants = cva([\r\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70',\r\n 'text-md font-medium leading-[150%]',\r\n 'group-data-[state=valid]/form-control:text-[#363B4E]',\r\n 'group-data-[state=invalid]/form-control:text-destructive',\r\n \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\r\n]);\r\n"],"names":["labelVariants","cva"],"mappings":";AAEO,MAAMA,IAAgBC,EAAI;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;"}
|
package/LazyLoader/LazyLoader.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { Suspense as
|
|
3
|
-
import { LoadingMask as
|
|
4
|
-
|
|
5
|
-
const s = (r, m = !0) => (t) => /* @__PURE__ */ o(a, { fallback: m ? /* @__PURE__ */ o(e, {}) : null, children: /* @__PURE__ */ o(r, { ...t }) });
|
|
2
|
+
import { Suspense as m } from "react";
|
|
3
|
+
import { LoadingMask as t } from "../LoadingMask/LoadingMask.js";
|
|
4
|
+
const p = (r, a = !0) => (e) => /* @__PURE__ */ o(m, { fallback: a ? /* @__PURE__ */ o(t, {}) : null, children: /* @__PURE__ */ o(r, { ...e }) });
|
|
6
5
|
export {
|
|
7
|
-
|
|
6
|
+
p as LazyLoader
|
|
8
7
|
};
|
|
9
8
|
//# sourceMappingURL=LazyLoader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LazyLoader.js","sources":["../../src/LazyLoader/LazyLoader.tsx"],"sourcesContent":["import React, { JSX, Suspense } from 'react';\n\nimport { LoadingMask } from '../LoadingMask';\n\n// TODO: types any\n/**\n * Component lazy load component.\n * @public\n * @see [Documentation](#)\n * @example\n * ```tsx\n * import { lazy } from 'react';\n * import { LazyLoader } from '@oneplatformdev/ui/LazyLoader';\n *\n * const ModuleComponentViewLazy = LazyLoader(\n * lazy(() => import('path/to/module').then(module => ({\n * default: module.ModuleComponentView,\n * })),\n * ),\n * );\n * ```\n */\nexport const LazyLoader =\n (Component: React.LazyExoticComponent<any>, showLoader = true) =>\n (props: any): JSX.Element =>\n (\n <Suspense fallback={showLoader ? <LoadingMask /> : null}>\n <Component {...props} />\n </Suspense>\n );\n"],"names":["LazyLoader","Component","showLoader","props","jsx","Suspense","LoadingMask"],"mappings":"
|
|
1
|
+
{"version":3,"file":"LazyLoader.js","sources":["../../src/LazyLoader/LazyLoader.tsx"],"sourcesContent":["import React, { JSX, Suspense } from 'react';\r\n\r\nimport { LoadingMask } from '../LoadingMask';\r\n\r\n// TODO: types any\r\n/**\r\n * Component lazy load component.\r\n * @public\r\n * @see [Documentation](#)\r\n * @example\r\n * ```tsx\r\n * import { lazy } from 'react';\r\n * import { LazyLoader } from '@oneplatformdev/ui/LazyLoader';\r\n *\r\n * const ModuleComponentViewLazy = LazyLoader(\r\n * lazy(() => import('path/to/module').then(module => ({\r\n * default: module.ModuleComponentView,\r\n * })),\r\n * ),\r\n * );\r\n * ```\r\n */\r\nexport const LazyLoader =\r\n (Component: React.LazyExoticComponent<any>, showLoader = true) =>\r\n (props: any): JSX.Element =>\r\n (\r\n <Suspense fallback={showLoader ? <LoadingMask /> : null}>\r\n <Component {...props} />\r\n </Suspense>\r\n );\r\n"],"names":["LazyLoader","Component","showLoader","props","jsx","Suspense","LoadingMask"],"mappings":";;;AAsBO,MAAMA,IACX,CAACC,GAA2CC,IAAa,OACzD,CAACC,MAEG,gBAAAC,EAACC,GAAA,EAAS,UAAUH,IAAa,gBAAAE,EAACE,KAAY,IAAK,MACjD,4BAACL,GAAA,EAAW,GAAGE,GAAO,EAAA,CACxB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadedIcon.js","sources":["../../src/LoadedIcon/LoadedIcon.tsx"],"sourcesContent":["import { cva, VariantProps } from 'class-variance-authority';\nimport { LoaderCircleIcon } from 'lucide-react';\nimport { FC, HTMLAttributes, PropsWithChildren } from 'react';\n\nimport { cn } from '@oneplatformdev/utils';\n\nconst loadedIconVariants = cva([\n 'relative',\n], {\n variants: {\n size: {\n inherit: '[&_svg]:size-inherit',\n xs: '[&_svg]:size-3',\n sm: '[&_svg]:size-4',\n md: '[&_svg]:size-5',\n lg: '[&_svg]:size-6',\n },\n },\n defaultVariants: { size: 'inherit' },\n});\n\ninterface ILoadedIconProps\n extends HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof loadedIconVariants> {\n loading?: boolean;\n}\n\nexport const LoadedIcon: FC<PropsWithChildren<ILoadedIconProps>> = (props) => {\n const { loading, children, size = 'md', className, ...rest } = props;\n return (\n <div\n {...rest}\n className={cn(loadedIconVariants({ size, className }))}\n >\n {loading\n ? <LoaderCircleIcon className=\"animate-spin\"/>\n : children}\n </div>\n );\n};\n"],"names":["loadedIconVariants","cva","LoadedIcon","props","loading","children","size","className","rest","jsx","cn","LoaderCircleIcon"],"mappings":";;;;AAMA,MAAMA,IAAqBC,EAAI;AAAA,EAC7B;AACF,GAAG;AAAA,EACD,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB,EAAE,MAAM,UAAA;AAC3B,CAAC,GAQYC,IAAsD,CAACC,MAAU;AAC5E,QAAM,EAAE,SAAAC,GAAS,UAAAC,GAAU,MAAAC,IAAO,MAAM,WAAAC,GAAW,GAAGC,MAASL;AAC/D,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,WAAWE,EAAGV,EAAmB,EAAE,MAAAM,GAAM,WAAAC,EAAA,CAAW,CAAC;AAAA,MAEpD,UAAAH,IACG,gBAAAK,EAACE,GAAA,EAAiB,WAAU,gBAAc,IAC1CN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
1
|
+
{"version":3,"file":"LoadedIcon.js","sources":["../../src/LoadedIcon/LoadedIcon.tsx"],"sourcesContent":["import { cva, VariantProps } from 'class-variance-authority';\r\nimport { LoaderCircleIcon } from 'lucide-react';\r\nimport { FC, HTMLAttributes, PropsWithChildren } from 'react';\r\n\r\nimport { cn } from '@oneplatformdev/utils';\r\n\r\nconst loadedIconVariants = cva([\r\n 'relative',\r\n], {\r\n variants: {\r\n size: {\r\n inherit: '[&_svg]:size-inherit',\r\n xs: '[&_svg]:size-3',\r\n sm: '[&_svg]:size-4',\r\n md: '[&_svg]:size-5',\r\n lg: '[&_svg]:size-6',\r\n },\r\n },\r\n defaultVariants: { size: 'inherit' },\r\n});\r\n\r\ninterface ILoadedIconProps\r\n extends HTMLAttributes<HTMLDivElement>,\r\n VariantProps<typeof loadedIconVariants> {\r\n loading?: boolean;\r\n}\r\n\r\nexport const LoadedIcon: FC<PropsWithChildren<ILoadedIconProps>> = (props) => {\r\n const { loading, children, size = 'md', className, ...rest } = props;\r\n return (\r\n <div\r\n {...rest}\r\n className={cn(loadedIconVariants({ size, className }))}\r\n >\r\n {loading\r\n ? <LoaderCircleIcon className=\"animate-spin\"/>\r\n : children}\r\n </div>\r\n );\r\n};\r\n"],"names":["loadedIconVariants","cva","LoadedIcon","props","loading","children","size","className","rest","jsx","cn","LoaderCircleIcon"],"mappings":";;;;AAMA,MAAMA,IAAqBC,EAAI;AAAA,EAC7B;AACF,GAAG;AAAA,EACD,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,SAAS;AAAA,MACT,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,IAAA;AAAA,EACN;AAAA,EAEF,iBAAiB,EAAE,MAAM,UAAA;AAC3B,CAAC,GAQYC,IAAsD,CAACC,MAAU;AAC5E,QAAM,EAAE,SAAAC,GAAS,UAAAC,GAAU,MAAAC,IAAO,MAAM,WAAAC,GAAW,GAAGC,MAASL;AAC/D,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,WAAWE,EAAGV,EAAmB,EAAE,MAAAM,GAAM,WAAAC,EAAA,CAAW,CAAC;AAAA,MAEpD,UAAAH,IACG,gBAAAK,EAACE,GAAA,EAAiB,WAAU,gBAAc,IAC1CN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { ILoadingMaskProps } from './LoadingMask.types';
|
|
3
|
-
export declare const LoadingMask:
|
|
2
|
+
export declare const LoadingMask: (props: ILoadingMaskProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
4
3
|
//# sourceMappingURL=LoadingMask.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingMask.d.ts","sourceRoot":"","sources":["../../src/LoadingMask/LoadingMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"LoadingMask.d.ts","sourceRoot":"","sources":["../../src/LoadingMask/LoadingMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAIxD,eAAO,MAAM,WAAW,GAAI,OAAO,iBAAiB,mDAgBnD,CAAC"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { RenderLoadingMask as r } from "./RenderLoadingMask.js";
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
5
|
-
const { fullWidth: s = !1, className: i, ...
|
|
6
|
-
return s ? /* @__PURE__ */ e(
|
|
3
|
+
import { cn as a } from "@oneplatformdev/utils";
|
|
4
|
+
const c = (t) => {
|
|
5
|
+
const { loading: n = !0, fullWidth: s = !1, className: i, ...o } = t;
|
|
6
|
+
return n ? s ? /* @__PURE__ */ e(
|
|
7
7
|
"div",
|
|
8
8
|
{
|
|
9
|
-
...
|
|
10
|
-
className:
|
|
9
|
+
...o,
|
|
10
|
+
className: a(
|
|
11
11
|
"absolute inset-0",
|
|
12
12
|
"flex items-center justify-center",
|
|
13
13
|
i
|
|
14
14
|
),
|
|
15
15
|
children: /* @__PURE__ */ e(r, {})
|
|
16
16
|
}
|
|
17
|
-
) : /* @__PURE__ */ e(r, {});
|
|
17
|
+
) : /* @__PURE__ */ e(r, {}) : null;
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
c as LoadingMask
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=LoadingMask.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingMask.js","sources":["../../src/LoadingMask/LoadingMask.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"LoadingMask.js","sources":["../../src/LoadingMask/LoadingMask.tsx"],"sourcesContent":["import { ILoadingMaskProps } from './LoadingMask.types';\r\nimport { RenderLoadingMask } from './RenderLoadingMask';\r\nimport { cn } from '@oneplatformdev/utils';\r\n\r\nexport const LoadingMask = (props: ILoadingMaskProps) => {\r\n const { loading = true, fullWidth = false, className, ...rest } = props;\r\n if(!loading) return null;\r\n if (!fullWidth) return <RenderLoadingMask />;\r\n return (\r\n <div\r\n {...rest}\r\n className={cn(\r\n 'absolute inset-0',\r\n 'flex items-center justify-center',\r\n className\r\n )}\r\n >\r\n <RenderLoadingMask />\r\n </div>\r\n );\r\n};\r\n"],"names":["LoadingMask","props","loading","fullWidth","className","rest","jsx","cn","RenderLoadingMask"],"mappings":";;;AAIO,MAAMA,IAAc,CAACC,MAA6B;AACvD,QAAM,EAAE,SAAAC,IAAU,IAAM,WAAAC,IAAY,IAAO,WAAAC,GAAW,GAAGC,MAASJ;AAClE,SAAIC,IACCC,IAEH,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACAH;AAAA,MAAA;AAAA,MAGF,4BAACI,GAAA,CAAA,CAAkB;AAAA,IAAA;AAAA,EAAA,IAVA,gBAAAF,EAACE,GAAA,CAAA,CAAkB,IADtB;AActB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingMask.types.d.ts","sourceRoot":"","sources":["../../src/LoadingMask/LoadingMask.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LoadingMask.types.d.ts","sourceRoot":"","sources":["../../src/LoadingMask/LoadingMask.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,cAAc,CAAC;IACvE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RenderLoadingMask.js","sources":["../../src/LoadingMask/RenderLoadingMask.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes } from 'react';\nimport { cn } from '@oneplatformdev/utils';\n\nexport const RenderLoadingMask = forwardRef<\n HTMLDivElement,\n HTMLAttributes<HTMLDivElement>\n>((props, ref) => {\n const { className, ...rest } = props;\n return (\n <div\n {...rest}\n ref={ref}\n className={cn('flex flex-1 items-center justify-center', className)}\n >\n <svg\n className=\"h-8 w-8 animate-spin text-gray-900 dark:text-gray-50\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12 4.75V6.25\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M17.1475 6.8525L16.0625 7.9375\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M19.25 12H17.75\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M17.1475 17.1475L16.0625 16.0625\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M12 17.75V19.25\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M6.8525 17.1475L7.9375 16.0625\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M4.75 12H6.25\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M6.8525 6.8525L7.9375 7.9375\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </div>\n );\n});\n"],"names":["RenderLoadingMask","forwardRef","props","ref","className","rest","jsx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AAA;AAAA,gBACC,GAAE;AAAA,gBACF,QAAO;AAAA,gBACP,aAAY;AAAA,gBACZ,eAAc;AAAA,gBACd,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,YAEjB,gBAAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,GAAE;AAAA,gBACF,QAAO;AAAA,gBACP,aAAY;AAAA,gBACZ,eAAc;AAAA,gBACd,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,YAEjB,gBAAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,GAAE;AAAA,gBACF,QAAO;AAAA,gBACP,aAAY;AAAA,gBACZ,eAAc;AAAA,gBACd,gBAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,CAAC;"}
|
|
1
|
+
{"version":3,"file":"RenderLoadingMask.js","sources":["../../src/LoadingMask/RenderLoadingMask.tsx"],"sourcesContent":["import { forwardRef, HTMLAttributes } from 'react';\r\nimport { cn } from '@oneplatformdev/utils';\r\n\r\nexport const RenderLoadingMask = forwardRef<\r\n HTMLDivElement,\r\n HTMLAttributes<HTMLDivElement>\r\n>((props, ref) => {\r\n const { className, ...rest } = props;\r\n return (\r\n <div\r\n {...rest}\r\n ref={ref}\r\n className={cn('flex flex-1 items-center justify-center', className)}\r\n >\r\n <svg\r\n className=\"h-8 w-8 animate-spin text-gray-900 dark:text-gray-50\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n >\r\n <path\r\n d=\"M12 4.75V6.25\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n <path\r\n d=\"M17.1475 6.8525L16.0625 7.9375\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n <path\r\n d=\"M19.25 12H17.75\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n <path\r\n d=\"M17.1475 17.1475L16.0625 16.0625\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n <path\r\n d=\"M12 17.75V19.25\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n <path\r\n d=\"M6.8525 17.1475L7.9375 16.0625\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n <path\r\n d=\"M4.75 12H6.25\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n <path\r\n d=\"M6.8525 6.8525L7.9375 7.9375\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </svg>\r\n </div>\r\n );\r\n});\r\n"],"names":["RenderLoadingMask","forwardRef","props","ref","className","rest","jsx","cn","jsxs"],"mappings":";;;AAGO,MAAMA,IAAoBC,EAG/B,CAACC,GAAOC,MAAQ;AAChB,QAAM,EAAE,WAAAC,GAAW,GAAGC,EAAA,IAASH;AAC/B,SACE,gBAAAI;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGD;AAAA,MACJ,KAAAF;AAAA,MACA,WAAWI,EAAG,2CAA2CH,CAAS;AAAA,MAElE,UAAA,gBAAAI;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,OAAM;AAAA,UAEN,UAAA;AAAA,YAAA,gBAAAF;AAAA,cAAC;AAA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BAAe;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LoadingProgress.js","sources":["../../src/LoadingProgress/LoadingProgress.tsx"],"sourcesContent":["import { FC } from \"react\";\n\nimport { cn } from \"@oneplatformdev/utils\";\nimport { loadingProgressVariants } from './loadingProgressVariants';\nimport { ILoadingProgressProps } from './LoadingProgress.types';\n\n// TODO: progress loading for art-metal. remove or refactor\nexport const LoadingProgress: FC<ILoadingProgressProps> = (props) => {\n const { className, fullWidth = false, size, color, wrapClassName } = props;\n return (\n <div\n className={cn(\n wrapClassName,\n 'w-fit h-auto',\n Boolean(fullWidth) && 'flex grow w-full h-full items-center justify-center'\n )}\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className={cn(\n loadingProgressVariants({ size, color, className }),\n )}\n >\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\n </svg>\n </div>\n );\n};\n"],"names":["LoadingProgress","props","className","fullWidth","size","color","wrapClassName","jsx","cn","loadingProgressVariants"],"mappings":";;;AAOO,MAAMA,IAA6C,CAACC,MAAU;AACnE,QAAM,EAAE,WAAAC,GAAW,WAAAC,IAAY,IAAO,MAAAC,GAAM,OAAAC,GAAO,eAAAC,MAAkBL;AACrE,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTF;AAAA,QACA;AAAA,QACA,EAAQH,KAAc;AAAA,MAAA;AAAA,MAGxB,UAAA,gBAAAI;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,OAAM;AAAA,UACN,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,QAAO;AAAA,UACP,aAAY;AAAA,UACZ,eAAc;AAAA,UACd,gBAAe;AAAA,UACf,WAAWC;AAAA,YACTC,EAAwB,EAAE,MAAAL,GAAM,OAAAC,GAAO,WAAAH,GAAW;AAAA,UAAA;AAAA,UAGpD,UAAA,gBAAAK,EAAC,QAAA,EAAK,GAAE,8BAAA,CAA6B;AAAA,QAAA;AAAA,MAAA;AAAA,IACvC;AAAA,EAAA;AAGN;"}
|
|
1
|
+
{"version":3,"file":"LoadingProgress.js","sources":["../../src/LoadingProgress/LoadingProgress.tsx"],"sourcesContent":["import { FC } from \"react\";\r\n\r\nimport { cn } from \"@oneplatformdev/utils\";\r\nimport { loadingProgressVariants } from './loadingProgressVariants';\r\nimport { ILoadingProgressProps } from './LoadingProgress.types';\r\n\r\n// TODO: progress loading for art-metal. remove or refactor\r\nexport const LoadingProgress: FC<ILoadingProgressProps> = (props) => {\r\n const { className, fullWidth = false, size, color, wrapClassName } = props;\r\n return (\r\n <div\r\n className={cn(\r\n wrapClassName,\r\n 'w-fit h-auto',\r\n Boolean(fullWidth) && 'flex grow w-full h-full items-center justify-center'\r\n )}\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"24\"\r\n height=\"24\"\r\n viewBox=\"0 0 24 24\"\r\n fill=\"none\"\r\n stroke=\"currentColor\"\r\n strokeWidth=\"2\"\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n className={cn(\r\n loadingProgressVariants({ size, color, className }),\r\n )}\r\n >\r\n <path d=\"M21 12a9 9 0 1 1-6.219-8.56\"/>\r\n </svg>\r\n </div>\r\n );\r\n};\r\n"],"names":["LoadingProgress","props","className","fullWidth","size","color","wrapClassName","jsx","cn","loadingProgressVariants"],"mappings":";;;AAOO,MAAMA,IAA6C,CAACC,MAAU;AACnE,QAAM,EAAE,WAAAC,GAAW,WAAAC,IAAY,IAAO,MAAAC,GAAM,OAAAC,GAAO,eAAAC,MAAkBL;AACrE,SACE,gBAAAM;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTF;AAAA,QACA;AAAA,QACA,EAAQH,KAAc;AAAA,MAAA;AAAA,MAGxB,UAAA,gBAAAI;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,OAAM;AAAA,UACN,QAAO;AAAA,UACP,SAAQ;AAAA,UACR,MAAK;AAAA,UACL,QAAO;AAAA,UACP,aAAY;AAAA,UACZ,eAAc;AAAA,UACd,gBAAe;AAAA,UACf,WAAWC;AAAA,YACTC,EAAwB,EAAE,MAAAL,GAAM,OAAAC,GAAO,WAAAH,GAAW;AAAA,UAAA;AAAA,UAGpD,UAAA,gBAAAK,EAAC,QAAA,EAAK,GAAE,8BAAA,CAA6B;AAAA,QAAA;AAAA,MAAA;AAAA,IACvC;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loadingProgressVariants.js","sources":["../../src/LoadingProgress/loadingProgressVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\n\nexport const loadingProgressVariants = cva(\n \"animate-spin\",\n {\n variants: {\n color: {\n primary: 'text-primary',\n default: ''\n },\n size: {\n default: \"\",\n sm: \"\",\n lg: \"w-20 h-20\",\n },\n },\n defaultVariants: {\n size: \"default\",\n color: \"default\",\n },\n }\n);\n"],"names":["loadingProgressVariants","cva"],"mappings":";AAEO,MAAMA,IAA0BC;AAAA,EACrC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,MAEX,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"loadingProgressVariants.js","sources":["../../src/LoadingProgress/loadingProgressVariants.ts"],"sourcesContent":["import { cva } from 'class-variance-authority';\r\n\r\nexport const loadingProgressVariants = cva(\r\n \"animate-spin\",\r\n {\r\n variants: {\r\n color: {\r\n primary: 'text-primary',\r\n default: ''\r\n },\r\n size: {\r\n default: \"\",\r\n sm: \"\",\r\n lg: \"w-20 h-20\",\r\n },\r\n },\r\n defaultVariants: {\r\n size: \"default\",\r\n color: \"default\",\r\n },\r\n }\r\n);\r\n"],"names":["loadingProgressVariants","cva"],"mappings":";AAEO,MAAMA,IAA0BC;AAAA,EACrC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,OAAO;AAAA,QACL,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,MAEX,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,iBAAiB;AAAA,MACf,MAAM;AAAA,MACN,OAAO;AAAA,IAAA;AAAA,EACT;AAEJ;"}
|
package/Menubar/Menubar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menubar.js","sources":["../../src/Menubar/Menubar.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nconst MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu;\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group;\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal;\nconst MenubarSub: typeof MenubarPrimitive.Sub = MenubarPrimitive.Sub;\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup = MenubarPrimitive.RadioGroup;\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n \"flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-xs\",\n className\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n className\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-4 w-4\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.SubContent\n ref={ref}\n className={cn(\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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\",\n className\n )}\n {...props}\n />\n))\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\n ref\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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\",\n className\n )}\n {...props}\n />\n </MenubarPrimitive.Portal>\n )\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Circle className=\"h-4 w-4 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n \"px-2 py-1.5 text-sm font-semibold\",\n inset && \"pl-8\",\n className\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayname = \"MenubarShortcut\"\n\nexport {\n Menubar,\n MenubarMenu,\n MenubarTrigger,\n MenubarContent,\n MenubarItem,\n MenubarSeparator,\n MenubarLabel,\n MenubarCheckboxItem,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarPortal,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarGroup,\n MenubarSub,\n MenubarShortcut,\n}\n"],"names":["MenubarMenu","MenubarPrimitive","MenubarGroup","MenubarPortal","MenubarSub","MenubarRadioGroup","Menubar","React","className","props","ref","jsx","cn","MenubarTrigger","MenubarSubTrigger","inset","children","jsxs","ChevronRight","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","Check","MenubarRadioItem","Circle","MenubarLabel","MenubarSeparator","MenubarShortcut"],"mappings":";;;;;AAQA,MAAMA,IAA4CC,EAAiB,MAC7DC,IAA8CD,EAAiB,OAC/DE,IAAgDF,EAAiB,QACjEG,IAA0CH,EAAiB,KAC3DI,IAAwDJ,EAAiB,YAEzEK,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACV,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAS;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menubar/Menubar.tsx"],"sourcesContent":["\"use client\"\r\n\r\nimport * as React from \"react\"\r\nimport * as MenubarPrimitive from \"@radix-ui/react-menubar\"\r\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\r\n\r\nimport { cn } from \"@oneplatformdev/utils\"\r\n\r\nconst MenubarMenu: typeof MenubarPrimitive.Menu = MenubarPrimitive.Menu;\r\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group;\r\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal;\r\nconst MenubarSub: typeof MenubarPrimitive.Sub = MenubarPrimitive.Sub;\r\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup = MenubarPrimitive.RadioGroup;\r\n\r\nconst Menubar = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Root>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\r\n>(({ className, ...props }, ref) => (\r\n <MenubarPrimitive.Root\r\n ref={ref}\r\n className={cn(\r\n \"flex h-9 items-center space-x-1 rounded-md border bg-background p-1 shadow-xs\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubar.displayName = MenubarPrimitive.Root.displayName\r\n\r\nconst MenubarTrigger = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\r\n>(({ className, ...props }, ref) => (\r\n <MenubarPrimitive.Trigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default select-none items-center rounded-sm px-3 py-1 text-sm font-medium outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\r\n\r\nconst MenubarSubTrigger = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, children, ...props }, ref) => (\r\n <MenubarPrimitive.SubTrigger\r\n ref={ref}\r\n className={cn(\r\n \"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground\",\r\n inset && \"pl-8\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n {children}\r\n <ChevronRight className=\"ml-auto h-4 w-4\" />\r\n </MenubarPrimitive.SubTrigger>\r\n))\r\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\r\n\r\nconst MenubarSubContent = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\r\n>(({ className, ...props }, ref) => (\r\n <MenubarPrimitive.SubContent\r\n ref={ref}\r\n className={cn(\r\n \"z-50 min-w-32 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg 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\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\r\n\r\nconst MenubarContent = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Content>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\r\n>(\r\n (\r\n { className, align = \"start\", alignOffset = -4, sideOffset = 8, ...props },\r\n ref\r\n ) => (\r\n <MenubarPrimitive.Portal>\r\n <MenubarPrimitive.Content\r\n ref={ref}\r\n align={align}\r\n alignOffset={alignOffset}\r\n sideOffset={sideOffset}\r\n className={cn(\r\n \"z-50 min-w-48 overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in 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\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n </MenubarPrimitive.Portal>\r\n )\r\n)\r\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\r\n\r\nconst MenubarItem = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Item>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n <MenubarPrimitive.Item\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\r\n inset && \"pl-8\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\r\n\r\nconst MenubarCheckboxItem = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\r\n>(({ className, children, checked, ...props }, ref) => (\r\n <MenubarPrimitive.CheckboxItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\r\n className\r\n )}\r\n checked={checked}\r\n {...props}\r\n >\r\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\r\n <MenubarPrimitive.ItemIndicator>\r\n <Check className=\"h-4 w-4\" />\r\n </MenubarPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </MenubarPrimitive.CheckboxItem>\r\n))\r\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\r\n\r\nconst MenubarRadioItem = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\r\n>(({ className, children, ...props }, ref) => (\r\n <MenubarPrimitive.RadioItem\r\n ref={ref}\r\n className={cn(\r\n \"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50\",\r\n className\r\n )}\r\n {...props}\r\n >\r\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\r\n <MenubarPrimitive.ItemIndicator>\r\n <Circle className=\"h-4 w-4 fill-current\" />\r\n </MenubarPrimitive.ItemIndicator>\r\n </span>\r\n {children}\r\n </MenubarPrimitive.RadioItem>\r\n))\r\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\r\n\r\nconst MenubarLabel = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Label>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\r\n inset?: boolean\r\n }\r\n>(({ className, inset, ...props }, ref) => (\r\n <MenubarPrimitive.Label\r\n ref={ref}\r\n className={cn(\r\n \"px-2 py-1.5 text-sm font-semibold\",\r\n inset && \"pl-8\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n))\r\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\r\n\r\nconst MenubarSeparator = React.forwardRef<\r\n React.ElementRef<typeof MenubarPrimitive.Separator>,\r\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\r\n>(({ className, ...props }, ref) => (\r\n <MenubarPrimitive.Separator\r\n ref={ref}\r\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\r\n {...props}\r\n />\r\n))\r\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\r\n\r\nconst MenubarShortcut = ({\r\n className,\r\n ...props\r\n}: React.HTMLAttributes<HTMLSpanElement>) => {\r\n return (\r\n <span\r\n className={cn(\r\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\r\n className\r\n )}\r\n {...props}\r\n />\r\n )\r\n}\r\nMenubarShortcut.displayname = \"MenubarShortcut\"\r\n\r\nexport {\r\n Menubar,\r\n MenubarMenu,\r\n MenubarTrigger,\r\n MenubarContent,\r\n MenubarItem,\r\n MenubarSeparator,\r\n MenubarLabel,\r\n MenubarCheckboxItem,\r\n MenubarRadioGroup,\r\n MenubarRadioItem,\r\n MenubarPortal,\r\n MenubarSubContent,\r\n MenubarSubTrigger,\r\n MenubarGroup,\r\n MenubarSub,\r\n MenubarShortcut,\r\n}\r\n"],"names":["MenubarMenu","MenubarPrimitive","MenubarGroup","MenubarPortal","MenubarSub","MenubarRadioGroup","Menubar","React","className","props","ref","jsx","cn","MenubarTrigger","MenubarSubTrigger","inset","children","jsxs","ChevronRight","MenubarSubContent","MenubarContent","align","alignOffset","sideOffset","MenubarItem","MenubarCheckboxItem","checked","Check","MenubarRadioItem","Circle","MenubarLabel","MenubarSeparator","MenubarShortcut"],"mappings":";;;;;AAQA,MAAMA,IAA4CC,EAAiB,MAC7DC,IAA8CD,EAAiB,OAC/DE,IAAgDF,EAAiB,QACjEG,IAA0CH,EAAiB,KAC3DI,IAAwDJ,EAAiB,YAEzEK,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAC1B,gBAAAC;AAAA,EAACV,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAS;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAJ;AAAA,IAAA;AAAA,IAED,GAAGC;AAAA,EAAA;AACN,CACD;AACDH,EAAQ,cAAcL,EAAiB,KAAK;AAE5C,MAAMY,IAAiBN,EAAM,WAG3B,CAAC,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