@oneplatformdev/ui 0.1.99-beta.24 → 0.1.99-beta.241
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 +1 -1
- package/Accordion/Accordion.d.ts.map +1 -1
- package/Accordion/Accordion.js +48 -26
- package/Accordion/Accordion.js.map +1 -1
- package/AlertDialog/AlertDialog.stories.js +3 -2
- package/AlertDialog/AlertDialog.stories.js.map +1 -1
- package/AlertDialog/AlertDialogRoot.d.ts.map +1 -1
- package/AlertDialog/AlertDialogRoot.js +26 -24
- package/AlertDialog/AlertDialogRoot.js.map +1 -1
- package/Button/Button.d.ts.map +1 -1
- package/Button/Button.js +43 -43
- package/Button/Button.js.map +1 -1
- package/Button/Button.stories.js +15 -12
- 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/buttonVariants.d.ts +2 -2
- package/Button/buttonVariants.d.ts.map +1 -1
- package/Button/buttonVariants.js +39 -6
- 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 +41 -39
- 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 +1 -1
- package/ButtonIcon/buttonIconVariants.d.ts.map +1 -1
- package/ButtonIcon/buttonIconVariants.js +4 -2
- package/ButtonIcon/buttonIconVariants.js.map +1 -1
- package/CHANGELOG.md +1367 -0
- package/Calendar/Calendar.js +5 -4
- package/Calendar/Calendar.js.map +1 -1
- package/Card/Card.d.ts.map +1 -1
- package/Card/Card.js +22 -21
- package/Card/Card.js.map +1 -1
- package/Checkbox/Checkbox.d.ts.map +1 -1
- package/Checkbox/Checkbox.js +36 -34
- package/Checkbox/Checkbox.js.map +1 -1
- package/Checkbox/Checkbox.stories.js +108 -0
- package/Checkbox/Checkbox.stories.js.map +1 -0
- package/Checkbox/Checkbox.types.d.ts +2 -1
- package/Checkbox/Checkbox.types.d.ts.map +1 -1
- package/Combobox/Combobox.d.ts +4 -2
- package/Combobox/Combobox.d.ts.map +1 -1
- package/Combobox/Combobox.js +183 -195
- package/Combobox/Combobox.js.map +1 -1
- package/Combobox/Combobox.stories.js +293 -0
- package/Combobox/Combobox.stories.js.map +1 -0
- package/Combobox/Combobox.types.d.ts +68 -24
- package/Combobox/Combobox.types.d.ts.map +1 -1
- package/Combobox/Combobox.types.js +4 -1
- package/Combobox/Combobox.types.js.map +1 -1
- package/Combobox/ComboboxOptionItem.d.ts +5 -3
- package/Combobox/ComboboxOptionItem.d.ts.map +1 -1
- package/Combobox/ComboboxOptionItem.js +79 -23
- package/Combobox/ComboboxOptionItem.js.map +1 -1
- package/Combobox/ComboboxRenderContent.d.ts +23 -0
- package/Combobox/ComboboxRenderContent.d.ts.map +1 -0
- package/Combobox/ComboboxRenderContent.js +117 -0
- package/Combobox/ComboboxRenderContent.js.map +1 -0
- package/Combobox/ComboboxRenderOptions.d.ts +4 -0
- package/Combobox/ComboboxRenderOptions.d.ts.map +1 -0
- package/Combobox/ComboboxRenderOptions.js +53 -0
- package/Combobox/ComboboxRenderOptions.js.map +1 -0
- package/Combobox/ComboboxRenderTrigger.d.ts +18 -0
- package/Combobox/ComboboxRenderTrigger.d.ts.map +1 -0
- package/Combobox/ComboboxRenderTrigger.js +120 -0
- package/Combobox/ComboboxRenderTrigger.js.map +1 -0
- package/Command/Command.d.ts +6 -1
- package/Command/Command.d.ts.map +1 -1
- package/Command/Command.js +61 -43
- package/Command/Command.js.map +1 -1
- package/ContextPopover/ContextDropdownMenu.d.ts +12 -0
- package/ContextPopover/ContextDropdownMenu.d.ts.map +1 -0
- package/ContextPopover/ContextDropdownMenu.js +41 -0
- package/ContextPopover/ContextDropdownMenu.js.map +1 -0
- package/ContextPopover/ContextPopover.d.ts +12 -0
- package/ContextPopover/ContextPopover.d.ts.map +1 -0
- package/ContextPopover/ContextPopover.js +34 -0
- package/ContextPopover/ContextPopover.js.map +1 -0
- package/ContextPopover/index.d.ts +4 -0
- package/ContextPopover/index.d.ts.map +1 -0
- package/ContextPopover/index.js +9 -0
- package/ContextPopover/index.js.map +1 -0
- package/ContextPopover/useContextPopoverHandler.d.ts +14 -0
- package/ContextPopover/useContextPopoverHandler.d.ts.map +1 -0
- package/ContextPopover/useContextPopoverHandler.js +21 -0
- package/ContextPopover/useContextPopoverHandler.js.map +1 -0
- package/DataTable/DataTable.js +16 -15
- package/DataTable/DataTable.js.map +1 -1
- package/Dialog/Dialog.d.ts +4 -1
- package/Dialog/Dialog.d.ts.map +1 -1
- package/Dialog/Dialog.js +68 -34
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/Dialog.stories.js +102 -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/index.d.ts +1 -0
- package/Dialog/index.d.ts.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 +6 -6
- package/Dropzone/Dropzone.types.js.map +1 -1
- package/Form/Form.d.ts.map +1 -1
- 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 +54 -14
- package/Form/FormRenderControl.js.map +1 -1
- package/Form/FormRenderControl.types.d.ts +5 -2
- package/Form/FormRenderControl.types.d.ts.map +1 -1
- package/FormCombobox/FormCombobox.d.ts +4 -2
- package/FormCombobox/FormCombobox.d.ts.map +1 -1
- package/FormCombobox/FormCombobox.js +30 -17
- package/FormCombobox/FormCombobox.js.map +1 -1
- package/FormCombobox/FormCombobox.types.d.ts +6 -2
- package/FormCombobox/FormCombobox.types.d.ts.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 +11 -9
- 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/FormSelect/FormSelect.d.ts.map +1 -1
- package/FormSelect/FormSelect.js +21 -17
- package/FormSelect/FormSelect.js.map +1 -1
- package/FormTextarea/FormTextarea.d.ts.map +1 -1
- package/FormTextarea/FormTextarea.js +15 -12
- package/FormTextarea/FormTextarea.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/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/Popover/Popover.d.ts.map +1 -1
- package/Popover/Popover.js +9 -5
- package/Popover/Popover.js.map +1 -1
- package/ScrollArea/ScrollArea.d.ts +5 -1
- package/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/ScrollArea/ScrollArea.js +23 -17
- 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/Select/Select.d.ts.map +1 -1
- package/Select/Select.js +53 -48
- package/Select/Select.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/Switch/Switch.d.ts +1 -1
- package/Switch/Switch.d.ts.map +1 -1
- package/Switch/Switch.js +5 -7
- package/Switch/Switch.js.map +1 -1
- package/TablePagination/TablePagination.js +9 -8
- package/TablePagination/TablePagination.js.map +1 -1
- package/Textarea/Textarea.d.ts.map +1 -1
- package/Textarea/Textarea.js +50 -45
- package/Textarea/Textarea.js.map +1 -1
- package/Textarea/Textarea.types.d.ts +3 -1
- package/Textarea/Textarea.types.d.ts.map +1 -1
- package/Toast/Toast.d.ts +1 -1
- package/Toast/toastVariants.d.ts +1 -1
- package/Tooltip/Tooltip.d.ts.map +1 -1
- package/Tooltip/Tooltip.js +51 -32
- package/Tooltip/Tooltip.js.map +1 -1
- package/Tooltip/Tooltip.types.d.ts +10 -0
- package/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/Tooltip/tooltipVariants.d.ts +4 -0
- package/Tooltip/tooltipVariants.d.ts.map +1 -0
- package/Tooltip/tooltipVariants.js +22 -0
- package/Tooltip/tooltipVariants.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.d.ts.map +1 -1
- package/index.js +342 -332
- package/index.js.map +1 -1
- package/package.json +6 -5
- package/Combobox/ComboboxOptions.d.ts +0 -4
- package/Combobox/ComboboxOptions.d.ts.map +0 -1
- package/Combobox/ComboboxOptions.js +0 -65
- package/Combobox/ComboboxOptions.js.map +0 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c, Fragment as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as f } from "@oneplatformdev/utils";
|
|
3
|
+
import { infoBlockVariants as p } from "./infoBlockVariants.js";
|
|
4
|
+
import { isValidElement as d, createElement as h } from "react";
|
|
5
|
+
import { InfoIcon as u, TriangleAlertIcon as w } from "lucide-react";
|
|
6
|
+
const N = (r) => r ? d(r) ? r : h(r) : null, x = {
|
|
7
|
+
error: /* @__PURE__ */ e(w, { className: "fill-[#DC2626] text-white!" }),
|
|
8
|
+
info: /* @__PURE__ */ e(u, { className: "fill-[#9368FF] text-white!" })
|
|
9
|
+
}, k = (r) => {
|
|
10
|
+
const { className: t, variant: n = "error", content: a, icon: o, children: i, node: l, ...s } = r;
|
|
11
|
+
return /* @__PURE__ */ e(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
...s,
|
|
15
|
+
className: f(p({ className: t, variant: n })),
|
|
16
|
+
children: i ?? /* @__PURE__ */ c(m, { children: [
|
|
17
|
+
N(o ?? x[n]),
|
|
18
|
+
l ?? /* @__PURE__ */ e("span", { className: "whitespace-pre-wrap wrap-break-word line-clamp-10", children: a })
|
|
19
|
+
] })
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
k.displayName = "InfoBlock";
|
|
24
|
+
export {
|
|
25
|
+
k as InfoBlock,
|
|
26
|
+
k as default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=InfoBlock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.js","sources":["../../src/InfoBlock/InfoBlock.tsx"],"sourcesContent":["import { InfoBlockIconType, InfoBlockProps } from \"./InfoBlock.types\";\nimport { cn } from \"@oneplatformdev/utils\";\nimport { infoBlockVariants } from \"./infoBlockVariants\";\nimport { createElement, isValidElement } from \"react\";\nimport { TriangleAlertIcon, InfoIcon } from \"lucide-react\";\n\nconst renderInnerIcon = (Icon?: InfoBlockIconType) => {\n if (!Icon) return null;\n if (isValidElement(Icon)) return Icon;\n return createElement(Icon);\n};\n\nconst iconByVariant: Record<NonNullable<InfoBlockProps['variant']>, InfoBlockIconType> = {\n error: <TriangleAlertIcon className='fill-[#DC2626] text-white!'/>,\n info: <InfoIcon className='fill-[#9368FF] text-white!'/>\n}\n\nexport const InfoBlock = (props: InfoBlockProps) => {\n const { className, variant = 'error', content, icon, children, node, ...rest } = props;\n return (\n <div\n {...rest}\n className={cn(infoBlockVariants({ className, variant }))}\n >\n {children ?? (\n <>\n {renderInnerIcon(icon ?? iconByVariant[variant!])}\n {node ?? (\n <span className='whitespace-pre-wrap wrap-break-word line-clamp-10'>\n {content}\n </span>\n )}\n </>\n )}\n </div>\n )\n}\nInfoBlock.displayName = 'InfoBlock';\nexport default InfoBlock;\n\n"],"names":["renderInnerIcon","Icon","isValidElement","createElement","iconByVariant","jsx","TriangleAlertIcon","InfoIcon","InfoBlock","props","className","variant","content","icon","children","node","rest","cn","infoBlockVariants","jsxs","Fragment"],"mappings":";;;;;AAMA,MAAMA,IAAkB,CAACC,MAClBA,IACDC,EAAeD,CAAI,IAAUA,IAC1BE,EAAcF,CAAI,IAFP,MAKdG,IAAmF;AAAA,EACvF,OAAO,gBAAAC,EAACC,GAAA,EAAkB,WAAU,6BAAA,CAA4B;AAAA,EAChE,MAAM,gBAAAD,EAACE,GAAA,EAAS,WAAU,6BAAA,CAA4B;AACxD,GAEaC,IAAY,CAACC,MAA0B;AAClD,QAAM,EAAE,WAAAC,GAAW,SAAAC,IAAU,SAAS,SAAAC,GAAS,MAAAC,GAAM,UAAAC,GAAU,MAAAC,GAAM,GAAGC,EAAA,IAASP;AACjF,SACE,gBAAAJ;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGW;AAAA,MACJ,WAAWC,EAAGC,EAAkB,EAAE,WAAAR,GAAW,SAAAC,EAAA,CAAS,CAAC;AAAA,MAEtD,eACC,gBAAAQ,EAAAC,GAAA,EACG,UAAA;AAAA,QAAApB,EAAgBa,KAAQT,EAAcO,CAAQ,CAAC;AAAA,QAC/CI,KACC,gBAAAV,EAAC,QAAA,EAAK,WAAU,qDACf,UAAAO,EAAA,CACH;AAAA,MAAA,EAAA,CAEF;AAAA,IAAA;AAAA,EAAA;AAIR;AACAJ,EAAU,cAAc;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { InfoBlock as o } from "./InfoBlock.js";
|
|
3
|
+
import { CircleAlert as n } from "lucide-react";
|
|
4
|
+
const a = {
|
|
5
|
+
title: "UI/InfoBlock",
|
|
6
|
+
component: o,
|
|
7
|
+
argTypes: {
|
|
8
|
+
variant: {
|
|
9
|
+
control: "select",
|
|
10
|
+
options: ["error", "info"],
|
|
11
|
+
description: "Defines the color scheme and default icon"
|
|
12
|
+
},
|
|
13
|
+
content: {
|
|
14
|
+
control: "text",
|
|
15
|
+
description: "Text or content inside the block"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
parameters: {
|
|
19
|
+
layout: "centered"
|
|
20
|
+
}
|
|
21
|
+
}, i = {
|
|
22
|
+
args: {
|
|
23
|
+
variant: "error",
|
|
24
|
+
content: "Увага! Перш ніж архівувати підрозділ “Підрозділ дизайну”, переведіть співробітників до іншого — інакше вони будуть автоматично звільнені."
|
|
25
|
+
}
|
|
26
|
+
}, s = {
|
|
27
|
+
args: {
|
|
28
|
+
variant: "info",
|
|
29
|
+
content: "Зміни вступлять в силу після збереження налаштувань профілю."
|
|
30
|
+
}
|
|
31
|
+
}, l = {
|
|
32
|
+
args: {
|
|
33
|
+
variant: "info",
|
|
34
|
+
icon: /* @__PURE__ */ t(n, { className: "text-blue-500" }),
|
|
35
|
+
content: "Цей блок використовує передану вручну іконку замість стандартної."
|
|
36
|
+
}
|
|
37
|
+
}, f = {
|
|
38
|
+
args: {
|
|
39
|
+
variant: "error",
|
|
40
|
+
content: "Дуже довгий текст: ".repeat(20)
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
l as CustomIcon,
|
|
45
|
+
i as Error,
|
|
46
|
+
s as Info,
|
|
47
|
+
f as LongContent,
|
|
48
|
+
a as default
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=InfoBlock.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.stories.js","sources":["../../src/InfoBlock/InfoBlock.stories.tsx"],"sourcesContent":["import type { Meta, StoryObj } from '@storybook/react-vite';\nimport { InfoBlock } from './InfoBlock';\nimport { CircleAlert } from 'lucide-react';\n\nconst meta = {\n title: 'UI/InfoBlock',\n component: InfoBlock,\n argTypes: {\n variant: {\n control: 'select',\n options: ['error', 'info'],\n description: 'Defines the color scheme and default icon',\n },\n content: {\n control: 'text',\n description: 'Text or content inside the block',\n },\n },\n parameters: {\n layout: 'centered',\n },\n} satisfies Meta<typeof InfoBlock>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Error: Story = {\n args: {\n variant: 'error',\n content: 'Увага! Перш ніж архівувати підрозділ “Підрозділ дизайну”, переведіть співробітників до іншого — інакше вони будуть автоматично звільнені.',\n },\n};\n\nexport const Info: Story = {\n args: {\n variant: 'info',\n content: 'Зміни вступлять в силу після збереження налаштувань профілю.',\n },\n};\n\nexport const CustomIcon: Story = {\n args: {\n variant: 'info',\n icon: <CircleAlert className=\"text-blue-500\" />,\n content: 'Цей блок використовує передану вручну іконку замість стандартної.',\n },\n};\n\nexport const LongContent: Story = {\n args: {\n variant: 'error',\n content: 'Дуже довгий текст: '.repeat(20),\n },\n};\n"],"names":["meta","InfoBlock","Error","Info","CustomIcon","jsx","CircleAlert","LongContent"],"mappings":";;;AAIA,MAAMA,IAAO;AAAA,EACX,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,SAAS;AAAA,MACP,SAAS;AAAA,MACT,SAAS,CAAC,SAAS,MAAM;AAAA,MACzB,aAAa;AAAA,IAAA;AAAA,IAEf,SAAS;AAAA,MACP,SAAS;AAAA,MACT,aAAa;AAAA,IAAA;AAAA,EACf;AAAA,EAEF,YAAY;AAAA,IACV,QAAQ;AAAA,EAAA;AAEZ,GAMaC,IAAe;AAAA,EAC1B,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,SAAS;AAAA,EAAA;AAEb,GAEaC,IAAc;AAAA,EACzB,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,SAAS;AAAA,EAAA;AAEb,GAEaC,IAAoB;AAAA,EAC/B,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,MAAM,gBAAAC,EAACC,GAAA,EAAY,WAAU,gBAAA,CAAgB;AAAA,IAC7C,SAAS;AAAA,EAAA;AAEb,GAEaC,IAAqB;AAAA,EAChC,MAAM;AAAA,IACJ,SAAS;AAAA,IACT,SAAS,sBAAsB,OAAO,EAAE;AAAA,EAAA;AAE5C;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InfoBlockVariantsProps } from './infoBlockVariants';
|
|
2
|
+
import { ComponentType, HTMLAttributes, PropsWithChildren, ReactElement, ReactNode, SVGProps } from 'react';
|
|
3
|
+
export type InfoBlockIconType = ComponentType<SVGProps<SVGSVGElement>> | ReactElement<SVGProps<SVGSVGElement>>;
|
|
4
|
+
export interface InfoBlockProps extends PropsWithChildren, InfoBlockVariantsProps, Omit<HTMLAttributes<HTMLDivElement>, 'color' | 'content'> {
|
|
5
|
+
content?: ReactNode;
|
|
6
|
+
node?: ReactNode;
|
|
7
|
+
icon?: InfoBlockIconType;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=InfoBlock.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.types.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EACL,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,SAAS,EACT,QAAQ,EACT,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,iBAAiB,GACzB,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,GACtC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC;AAE1C,MAAM,WAAW,cACf,SAAQ,iBAAiB,EACvB,sBAAsB,EACtB,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,iBAAiB,CAAC;CAC1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.types.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,mBAAmB,mBAAmB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const infoBlockVariants: (props?: ({
|
|
3
|
+
variant?: "error" | "info" | null | undefined;
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
5
|
+
export type InfoBlockVariantsProps = VariantProps<typeof infoBlockVariants>;
|
|
6
|
+
//# sourceMappingURL=infoBlockVariants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoBlockVariants.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/infoBlockVariants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,eAAO,MAAM,iBAAiB;;8EAqB7B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cva as t } from "class-variance-authority";
|
|
2
|
+
const a = t(
|
|
3
|
+
[
|
|
4
|
+
"flex items-start gap-2",
|
|
5
|
+
"p-2.5 rounded-lg",
|
|
6
|
+
"font-medium text-base leading-normal text-[#06080D]",
|
|
7
|
+
"whitespace-pre-wrap break-words",
|
|
8
|
+
"[&>p]:m-0 [&>p]:p-0",
|
|
9
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-6",
|
|
10
|
+
"transition-transform duration-200 [&_svg]:transition-transform [&_svg]:duration-200"
|
|
11
|
+
],
|
|
12
|
+
{
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
error: "bg-[#DC26260F] [&>svg]:text-[#DC2626]",
|
|
16
|
+
info: "bg-[#9368FF0F] [&>svg]:text-[#9368FF]"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "error"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
export {
|
|
25
|
+
a as infoBlockVariants
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=infoBlockVariants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"infoBlockVariants.js","sources":["../../src/InfoBlock/infoBlockVariants.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\nexport const infoBlockVariants = cva(\n [\n 'flex items-start gap-2',\n 'p-2.5 rounded-lg',\n 'font-medium text-base leading-normal text-[#06080D]',\n 'whitespace-pre-wrap break-words',\n '[&>p]:m-0 [&>p]:p-0',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-6\",\n 'transition-transform duration-200 [&_svg]:transition-transform [&_svg]:duration-200',\n ],\n {\n variants: {\n variant: {\n error: 'bg-[#DC26260F] [&>svg]:text-[#DC2626]',\n info: 'bg-[#9368FF0F] [&>svg]:text-[#9368FF]',\n },\n },\n defaultVariants: {\n variant: 'error',\n },\n }\n)\n\nexport type InfoBlockVariantsProps = VariantProps<typeof infoBlockVariants>;\n"],"names":["infoBlockVariants","cva"],"mappings":";AAEO,MAAMA,IAAoBC;AAAA,EAC/B;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA;AAAA,EAEF;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,OAAO;AAAA,QACP,MAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;"}
|
package/Input/Input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAO,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,eAAO,MAAM,SAAS,qFAiErB,CAAC;AAGF,eAAO,MAAM,aAAa,qFAiBzB,CAAC;AAkBF,eAAO,MAAM,KAAK,qFAKjB,CAAC"}
|
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-10',\n classNameInputSlotProps,\n fullSize && 'min-w-auto',\n )}\n ref={ref}\n {...restInputSlotProps}\n {...rest}\n onChange={(e) => {\n if (typeof onTransform?.(e.target.value, e) === 'string') {\n e.target.value = onTransform(e.target.value, e);\n }\n if (onChange) onChange(e);\n }}\n />\n </div>\n );\n }\n);\nBaseInput.displayName = 'Input';\n\nexport const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n (props, ref) => {\n const [isVisible, setIsVisible] = useState<boolean>(false);\n\n const inputType = isVisible ? 'text' : 'password';\n\n const toggleVisibility = () => {\n setIsVisible(!isVisible);\n };\n\n return (\n <div {...(props?.slotProps?.wrapper || {})} className={cn('relative', props?.slotProps?.wrapper?.className)}>\n <BaseInput {...props} type={inputType} className=\"pr-8\" ref={ref} />\n <VisibilityButton isVisible={isVisible} onClick={toggleVisibility} />\n </div>\n );\n }\n);\nPasswordInput.displayName = 'PasswordInput';\n\ntype VisibilityButtonProps = {\n isVisible: boolean\n onClick: () => void\n}\n\nconst VisibilityButton = ({ isVisible, onClick }:VisibilityButtonProps) => (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"absolute top-1/2 right-3 transform -translate-y-1/2\"\n >\n {isVisible ? <Eye size={16} /> : <EyeOff size={16} />}\n </button>\n);\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ type, ...props }, ref) => {\n if (type === 'password') return <PasswordInput type={type} {...props} ref={ref} />;\n return <BaseInput type={type} {...props} ref={ref} />;\n }\n);\nInput.displayName = 'Input';\n"],"names":["BaseInput","React","props","ref","className","variant","type","input","wrapper","onChange","onTransform","fullSize","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,UAAAC,IAAW;AAAA,MACX,GAAGC;AAAA,IAAA,
|
|
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 counter = false,\n maxLength,\n fullSize = false,\n value,\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-10',\n classNameInputSlotProps,\n fullSize && 'min-w-auto',\n )}\n ref={ref}\n maxLength={maxLength}\n value={value}\n {...restInputSlotProps}\n {...rest}\n onChange={(e) => {\n if (typeof onTransform?.(e.target.value, e) === 'string') {\n e.target.value = onTransform(e.target.value, e);\n }\n if (onChange) onChange(e);\n }}\n />\n {counter && typeof maxLength === 'number' && (\n <div className={cn(\n 'w-full text-right inline-flex items-center justify-end',\n 'text-xs font-medium leading-[1.2] text-muted-foreground',\n 'peer-disabled:cursor-not-allowed peer-disabled:opacity-70'\n )}>\n {String(value || '').length}/{maxLength}\n </div>\n )}\n </div>\n );\n }\n);\nBaseInput.displayName = 'Input';\n\nexport const PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n (props, ref) => {\n const [isVisible, setIsVisible] = useState<boolean>(false);\n\n const inputType = isVisible ? 'text' : 'password';\n\n const toggleVisibility = () => {\n setIsVisible(!isVisible);\n };\n\n return (\n <div {...(props?.slotProps?.wrapper || {})} className={cn('relative', props?.slotProps?.wrapper?.className)}>\n <BaseInput {...props} type={inputType} className=\"pr-8\" ref={ref} />\n <VisibilityButton isVisible={isVisible} onClick={toggleVisibility} />\n </div>\n );\n }\n);\nPasswordInput.displayName = 'PasswordInput';\n\ntype VisibilityButtonProps = {\n isVisible: boolean\n onClick: () => void\n}\n\nconst VisibilityButton = ({ isVisible, onClick }:VisibilityButtonProps) => (\n <button\n type=\"button\"\n onClick={onClick}\n className=\"absolute top-1/2 right-3 transform -translate-y-1/2\"\n >\n {isVisible ? <Eye size={16} /> : <EyeOff size={16} />}\n </button>\n);\n\nexport const Input = React.forwardRef<HTMLInputElement, InputProps>(\n ({ type, ...props }, ref) => {\n if (type === 'password') return <PasswordInput type={type} {...props} ref={ref} />;\n return <BaseInput type={type} {...props} ref={ref} />;\n }\n);\nInput.displayName = 'Input';\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":"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"}
|
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,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,MAAM,WAAW,mBACf,SAAQ,wBAAwB,CAAC,OAAO,SAAS,CAAC;IAClD,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,mBAAmB,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;
|
|
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,iBAAiB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC,MAAM,WAAW,mBACf,SAAQ,wBAAwB,CAAC,OAAO,SAAS,CAAC;IAClD,cAAc,CAAC,EAAE,SAAS,CAAC;CAC5B;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,EAAE,mBAAmB,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,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';\nimport { RenderLoadingMask } from './RenderLoadingMask';\nimport { cn } from '@oneplatformdev/utils';\n\nexport const LoadingMask = (props: ILoadingMaskProps) => {\n const { loading = true, fullWidth = false, className, ...rest } = props;\n if(!loading) return null;\n if (!fullWidth) return <RenderLoadingMask />;\n return (\n <div\n {...rest}\n className={cn(\n 'absolute inset-0',\n 'flex items-center justify-center',\n className\n )}\n >\n <RenderLoadingMask />\n </div>\n );\n};\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"}
|
package/Popover/Popover.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAErE;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE/E;AAED,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../src/Popover/Popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAA;AAI3D,iBAAS,OAAO,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAErE;AAED,iBAAS,cAAc,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE/E;AAED,iBAAS,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CA8BnF;AAED,iBAAS,aAAa,CAAC,EACE,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,2CAE7E;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,CAAA"}
|
package/Popover/Popover.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as e from "@radix-ui/react-popover";
|
|
3
3
|
import { cn as s } from "@oneplatformdev/utils";
|
|
4
|
-
function
|
|
4
|
+
function m({
|
|
5
5
|
...o
|
|
6
6
|
}) {
|
|
7
7
|
return /* @__PURE__ */ t(e.Root, { "data-slot": "popover", ...o });
|
|
@@ -27,7 +27,11 @@ function c(o) {
|
|
|
27
27
|
sideOffset: n,
|
|
28
28
|
...d,
|
|
29
29
|
className: s(
|
|
30
|
-
"
|
|
30
|
+
"text-popover-foreground",
|
|
31
|
+
"w-72 origin-(--radix-popover-content-transform-origin) outline-hidden",
|
|
32
|
+
"border p-4 bg-popover rounded-lg",
|
|
33
|
+
"shadow-[1px_1px_10px_rgba(6,8,13,0.06)]",
|
|
34
|
+
"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 z-50",
|
|
31
35
|
r
|
|
32
36
|
),
|
|
33
37
|
style: {
|
|
@@ -37,14 +41,14 @@ function c(o) {
|
|
|
37
41
|
}
|
|
38
42
|
) });
|
|
39
43
|
}
|
|
40
|
-
function
|
|
44
|
+
function g({
|
|
41
45
|
...o
|
|
42
46
|
}) {
|
|
43
47
|
return /* @__PURE__ */ t(e.Anchor, { "data-slot": "popover-anchor", ...o });
|
|
44
48
|
}
|
|
45
49
|
export {
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
m as Popover,
|
|
51
|
+
g as PopoverAnchor,
|
|
48
52
|
c as PopoverContent,
|
|
49
53
|
e as PopoverPrimitive,
|
|
50
54
|
f as PopoverTrigger
|
package/Popover/Popover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Popover({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent(props: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n const {\n className,\n align = \"center\",\n sideOffset = 4,\n style,\n ...rest\n } = props;\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n {...rest}\n className={cn(\n \"
|
|
1
|
+
{"version":3,"file":"Popover.js","sources":["../../src/Popover/Popover.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Popover({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Root>) {\n return <PopoverPrimitive.Root data-slot=\"popover\" {...props} />\n}\n\nfunction PopoverTrigger({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Trigger>) {\n return <PopoverPrimitive.Trigger data-slot=\"popover-trigger\" {...props} />\n}\n\nfunction PopoverContent(props: React.ComponentProps<typeof PopoverPrimitive.Content>) {\n const {\n className,\n align = \"center\",\n sideOffset = 4,\n style,\n ...rest\n } = props;\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n data-slot=\"popover-content\"\n align={align}\n sideOffset={sideOffset}\n {...rest}\n className={cn(\n \"text-popover-foreground\",\n 'w-72 origin-(--radix-popover-content-transform-origin) outline-hidden',\n 'border p-4 bg-popover rounded-lg',\n 'shadow-[1px_1px_10px_rgba(6,8,13,0.06)]',\n '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 z-50',\n className\n )}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n />\n </PopoverPrimitive.Portal>\n )\n}\n\nfunction PopoverAnchor({\n ...props\n }: React.ComponentProps<typeof PopoverPrimitive.Anchor>) {\n return <PopoverPrimitive.Anchor data-slot=\"popover-anchor\" {...props} />\n}\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor, PopoverPrimitive }\n"],"names":["Popover","props","PopoverPrimitive","PopoverTrigger","PopoverContent","className","align","sideOffset","style","rest","jsx","cn","PopoverAnchor"],"mappings":";;;AAOA,SAASA,EAAQ;AAAA,EACE,GAAGC;AACL,GAAuD;AACtE,2BAAQC,EAAiB,MAAjB,EAAsB,aAAU,WAAW,GAAGD,GAAO;AAC/D;AAEA,SAASE,EAAe;AAAA,EACE,GAAGF;AACL,GAA0D;AAChF,2BAAQC,EAAiB,SAAjB,EAAyB,aAAU,mBAAmB,GAAGD,GAAO;AAC1E;AAEA,SAASG,EAAeH,GAA8D;AACpF,QAAM;AAAA,IACJ,WAAAI;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,YAAAC,IAAa;AAAA,IACb,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDR;AACJ,SACE,gBAAAS,EAACR,EAAiB,QAAjB,EACC,UAAA,gBAAAQ;AAAA,IAACR,EAAiB;AAAA,IAAjB;AAAA,MACC,aAAU;AAAA,MACV,OAAAI;AAAA,MACA,YAAAC;AAAA,MACC,GAAGE;AAAA,MACJ,WAAWE;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAEF,OAAO;AAAA,QACL,eAAe;AAAA,QACf,GAAIG,KAAS,CAAA;AAAA,MAAC;AAAA,IAChB;AAAA,EAAA,GAEJ;AAEJ;AAEA,SAASI,EAAc;AAAA,EACE,GAAGX;AACL,GAAyD;AAC9E,2BAAQC,EAAiB,QAAjB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
3
|
-
declare function ScrollArea(
|
|
3
|
+
declare function ScrollArea(props: React.ComponentProps<typeof ScrollAreaPrimitive.Root> & {
|
|
4
|
+
slotProps?: {
|
|
5
|
+
viewport?: React.ComponentProps<typeof ScrollAreaPrimitive.Viewport>;
|
|
6
|
+
};
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
4
8
|
declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
|
|
5
9
|
export { ScrollArea, ScrollBar, ScrollAreaPrimitive };
|
|
6
10
|
//# sourceMappingURL=ScrollArea.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollArea.d.ts","sourceRoot":"","sources":["../../src/ScrollArea/ScrollArea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAIlE,iBAAS,UAAU,CAAC,
|
|
1
|
+
{"version":3,"file":"ScrollArea.d.ts","sourceRoot":"","sources":["../../src/ScrollArea/ScrollArea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAA;AAIlE,iBAAS,UAAU,CACjB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG;IAC7D,SAAS,CAAC,EAAE;QACV,QAAQ,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,QAAQ,CAAC,CAAC;KACtE,CAAA;CACF,2CA4BF;AAED,iBAAS,SAAS,CAAC,EACE,SAAS,EACT,WAAwB,EACxB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,mBAAmB,CAAC,2CAqBzF;AAED,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAA"}
|
package/ScrollArea/ScrollArea.js
CHANGED
|
@@ -1,33 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "@radix-ui/react-scroll-area";
|
|
3
|
-
import { cn as
|
|
4
|
-
function
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import { cn as s } from "@oneplatformdev/utils";
|
|
4
|
+
function m(e) {
|
|
5
|
+
const {
|
|
6
|
+
className: r,
|
|
7
|
+
children: a,
|
|
8
|
+
slotProps: t,
|
|
9
|
+
...c
|
|
10
|
+
} = e;
|
|
11
|
+
return /* @__PURE__ */ i(
|
|
10
12
|
o.Root,
|
|
11
13
|
{
|
|
12
14
|
"data-slot": "scroll-area",
|
|
13
|
-
className:
|
|
14
|
-
...
|
|
15
|
+
className: s("relative", r),
|
|
16
|
+
...c,
|
|
15
17
|
children: [
|
|
16
18
|
/* @__PURE__ */ l(
|
|
17
19
|
o.Viewport,
|
|
18
20
|
{
|
|
21
|
+
...t?.viewport || {},
|
|
19
22
|
"data-slot": "scroll-area-viewport",
|
|
20
|
-
className:
|
|
21
|
-
|
|
23
|
+
className: s(
|
|
24
|
+
"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",
|
|
25
|
+
t?.viewport?.className
|
|
26
|
+
),
|
|
27
|
+
children: a
|
|
22
28
|
}
|
|
23
29
|
),
|
|
24
|
-
/* @__PURE__ */ l(
|
|
30
|
+
/* @__PURE__ */ l(n, {}),
|
|
25
31
|
/* @__PURE__ */ l(o.Corner, {})
|
|
26
32
|
]
|
|
27
33
|
}
|
|
28
34
|
);
|
|
29
35
|
}
|
|
30
|
-
function
|
|
36
|
+
function n({
|
|
31
37
|
className: e,
|
|
32
38
|
orientation: r = "vertical",
|
|
33
39
|
...a
|
|
@@ -37,7 +43,7 @@ function i({
|
|
|
37
43
|
{
|
|
38
44
|
"data-slot": "scroll-area-scrollbar",
|
|
39
45
|
orientation: r,
|
|
40
|
-
className:
|
|
46
|
+
className: s(
|
|
41
47
|
"flex touch-none p-px transition-colors select-none",
|
|
42
48
|
r === "vertical" && "h-full w-2.5 border-l border-l-transparent",
|
|
43
49
|
r === "horizontal" && "h-2.5 flex-col border-t border-t-transparent",
|
|
@@ -55,8 +61,8 @@ function i({
|
|
|
55
61
|
);
|
|
56
62
|
}
|
|
57
63
|
export {
|
|
58
|
-
|
|
64
|
+
m as ScrollArea,
|
|
59
65
|
o as ScrollAreaPrimitive,
|
|
60
|
-
|
|
66
|
+
n as ScrollBar
|
|
61
67
|
};
|
|
62
68
|
//# sourceMappingURL=ScrollArea.js.map
|