@oneplatformdev/ui 0.1.99-beta.40 → 0.1.99-beta.45
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/AlertDialog/AlertDialogRoot.js +3 -3
- package/AlertDialog/AlertDialogRoot.js.map +1 -1
- package/CHANGELOG.md +16 -0
- package/Combobox/Combobox.stories.js +11 -11
- package/Combobox/Combobox.stories.js.map +1 -1
- package/Dialog/Dialog.js +5 -5
- package/Dialog/Dialog.js.map +1 -1
- package/InfoBlock/InfoBlock.d.ts +7 -0
- package/InfoBlock/InfoBlock.d.ts.map +1 -0
- package/InfoBlock/InfoBlock.js +27 -0
- package/InfoBlock/InfoBlock.js.map +1 -0
- package/InfoBlock/InfoBlock.stories.js +14 -0
- package/InfoBlock/InfoBlock.stories.js.map +1 -0
- package/InfoBlock/InfoBlock.types.d.ts +8 -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 +26 -0
- package/InfoBlock/infoBlockVariants.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +213 -211
- package/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -36,7 +36,7 @@ function D(t) {
|
|
|
36
36
|
"data-slot": "alert-dialog-content",
|
|
37
37
|
className: l(
|
|
38
38
|
"fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]",
|
|
39
|
-
"grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg gap-4 p-6",
|
|
39
|
+
"grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg min-h-10 gap-4 p-6",
|
|
40
40
|
"bg-background border rounded-lg shadow-lg",
|
|
41
41
|
"overflow-x-hidden break-words",
|
|
42
42
|
"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 duration-200",
|
|
@@ -53,7 +53,7 @@ function w(t) {
|
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
55
|
"data-slot": "alert-dialog-header",
|
|
56
|
-
className: l("flex flex-col gap-
|
|
56
|
+
className: l("flex flex-col gap-3 text-center sm:text-left", a),
|
|
57
57
|
...e
|
|
58
58
|
}
|
|
59
59
|
);
|
|
@@ -78,7 +78,7 @@ function v(t) {
|
|
|
78
78
|
r.Title,
|
|
79
79
|
{
|
|
80
80
|
"data-slot": "alert-dialog-title",
|
|
81
|
-
className: l("text-lg font-semibold break-words", a),
|
|
81
|
+
className: l("text-lg font-semibold break-words min-h-10 flex items-center", a),
|
|
82
82
|
...e
|
|
83
83
|
}
|
|
84
84
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialogRoot.js","sources":["../../src/AlertDialog/AlertDialogRoot.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '@oneplatformdev/utils';\nimport { ButtonProps, buttonVariants } from '../Button';\n\nfunction AlertDialogRoot(props: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger(props: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\nfunction AlertDialogPortal(props: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" asChild {...props} />;\n}\n\nfunction AlertDialogOverlay(props: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogContent(props: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg gap-4 p-6',\n 'bg-background border rounded-lg shadow-lg',\n 'overflow-x-hidden break-words',\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 duration-200',\n className\n )}\n {...rest}\n />\n </AlertDialogPortal>\n )\n}\n\n\nfunction AlertDialogHeader(props: React.ComponentProps<\"div\">) {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\"flex flex-col gap-
|
|
1
|
+
{"version":3,"file":"AlertDialogRoot.js","sources":["../../src/AlertDialog/AlertDialogRoot.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';\n\nimport { cn } from '@oneplatformdev/utils';\nimport { ButtonProps, buttonVariants } from '../Button';\n\nfunction AlertDialogRoot(props: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger(props: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />;\n}\nfunction AlertDialogPortal(props: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" asChild {...props} />;\n}\n\nfunction AlertDialogOverlay(props: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogContent(props: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]',\n 'grid w-full max-w-[calc(100%-2rem)] sm:max-w-lg min-h-10 gap-4 p-6',\n 'bg-background border rounded-lg shadow-lg',\n 'overflow-x-hidden break-words',\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 duration-200',\n className\n )}\n {...rest}\n />\n </AlertDialogPortal>\n )\n}\n\n\nfunction AlertDialogHeader(props: React.ComponentProps<\"div\">) {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn(\"flex flex-col gap-3 text-center sm:text-left\", className)}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogFooter(props: React.ComponentProps<\"div\">) {\n const { className, ...rest } = props;\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end\",\n className\n )}\n {...rest}\n />\n )\n}\nfunction AlertDialogTitle(props: React.ComponentProps<typeof AlertDialogPrimitive.Title>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(\"text-lg font-semibold break-words min-h-10 flex items-center\", className)}\n {...rest}\n />\n )\n}\n\nfunction AlertDialogDescription(props: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n const { className, ...rest } = props;\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn(\"text-muted-foreground text-sm whitespace-pre-wrap break-words\", className)}\n {...rest}\n />\n )\n}\n\n\nfunction AlertDialogAction(props: React.ComponentProps<typeof AlertDialogPrimitive.Action> & ButtonProps) {\n const { className, variant, size, color, ...rest } = props;\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ variant, size, color }), className)}\n {...rest}\n />\n )\n}\nfunction AlertDialogCancel(props: React.ComponentProps<typeof AlertDialogPrimitive.Cancel> & ButtonProps) {\n const { className, variant, color = 'secondary', size, ...rest } = props\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ variant, size, color }), className)}\n {...rest}\n />\n )\n}\n\nexport {\n AlertDialogRoot,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogPrimitive\n};\n"],"names":["AlertDialogRoot","props","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogPortal","jsx","AlertDialogOverlay","className","rest","cn","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","AlertDialogTitle","AlertDialogDescription","AlertDialogAction","variant","size","color","buttonVariants","AlertDialogCancel"],"mappings":";;;;;AAQA,SAASA,EAAgBC,GAA+D;AACtF,2BAAQC,EAAqB,MAArB,EAA0B,aAAU,gBAAgB,GAAGD,GAAO;AACxE;AAEA,SAAS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
+
## 0.1.99-beta.42 (2026-01-14)
|
|
2
|
+
|
|
3
|
+
### 🧱 Updated Dependencies
|
|
4
|
+
|
|
5
|
+
- Updated @oneplatformdev/utils to 0.1.99-beta.42
|
|
6
|
+
- Updated @oneplatformdev/hooks to 0.1.99-beta.42
|
|
7
|
+
- Updated @oneplatformdev/tokens to 0.1.99-beta.42
|
|
8
|
+
|
|
9
|
+
## 0.1.99-beta.41 (2026-01-14)
|
|
10
|
+
|
|
11
|
+
### 🧱 Updated Dependencies
|
|
12
|
+
|
|
13
|
+
- Updated @oneplatformdev/utils to 0.1.99-beta.41
|
|
14
|
+
- Updated @oneplatformdev/hooks to 0.1.99-beta.41
|
|
15
|
+
- Updated @oneplatformdev/tokens to 0.1.99-beta.41
|
|
16
|
+
|
|
1
17
|
## 0.1.99-beta.40 (2026-01-14)
|
|
2
18
|
|
|
3
19
|
### 🧱 Updated Dependencies
|
|
@@ -62,7 +62,7 @@ function l({ initialValue: e = "", ...n }) {
|
|
|
62
62
|
] });
|
|
63
63
|
}
|
|
64
64
|
const w = {
|
|
65
|
-
title: "
|
|
65
|
+
title: "Combobox",
|
|
66
66
|
component: f,
|
|
67
67
|
parameters: {
|
|
68
68
|
layout: "centered"
|
|
@@ -91,21 +91,21 @@ const w = {
|
|
|
91
91
|
render: (e) => /* @__PURE__ */ t(l, { ...e })
|
|
92
92
|
}, L = {
|
|
93
93
|
render: (e) => /* @__PURE__ */ t(l, { ...e, initialValue: "pl" })
|
|
94
|
-
},
|
|
94
|
+
}, M = {
|
|
95
95
|
args: { disabled: !0 },
|
|
96
96
|
render: (e) => /* @__PURE__ */ t(l, { ...e, initialValue: "de" })
|
|
97
|
-
},
|
|
97
|
+
}, P = {
|
|
98
98
|
args: {
|
|
99
99
|
options: r,
|
|
100
100
|
fetchOptions: async () => r
|
|
101
101
|
},
|
|
102
102
|
render: (e) => /* @__PURE__ */ t(l, { ...e })
|
|
103
|
-
},
|
|
103
|
+
}, T = {
|
|
104
104
|
args: {
|
|
105
105
|
fetchOptions: d(r, 1200)
|
|
106
106
|
},
|
|
107
107
|
render: (e) => /* @__PURE__ */ t(l, { ...e })
|
|
108
|
-
},
|
|
108
|
+
}, k = {
|
|
109
109
|
args: {
|
|
110
110
|
emptyLabel: "Nothing found",
|
|
111
111
|
emptyAction: (e) => {
|
|
@@ -126,7 +126,7 @@ const w = {
|
|
|
126
126
|
}
|
|
127
127
|
},
|
|
128
128
|
render: (e) => /* @__PURE__ */ t(l, { ...e })
|
|
129
|
-
},
|
|
129
|
+
}, I = {
|
|
130
130
|
args: {
|
|
131
131
|
commandInputAction: (e) => /* @__PURE__ */ u("div", { className: "px-3 py-2 flex items-center justify-between text-xs text-muted-foreground", children: [
|
|
132
132
|
/* @__PURE__ */ u("span", { children: [
|
|
@@ -178,14 +178,14 @@ const w = {
|
|
|
178
178
|
};
|
|
179
179
|
export {
|
|
180
180
|
A as Default,
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
M as Disabled,
|
|
182
|
+
k as EmptyStateWithAction,
|
|
183
183
|
F as NestedOptions,
|
|
184
184
|
V as OnMountPrefetch,
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
T as SlowFetchLoading,
|
|
186
|
+
I as WithCommandInputAction,
|
|
187
187
|
E as WithListHeadAction,
|
|
188
|
-
|
|
188
|
+
P as WithStaticOptionsProp,
|
|
189
189
|
L as WithValueSelected,
|
|
190
190
|
w as default
|
|
191
191
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Combobox.stories.js","sources":["../../src/Combobox/Combobox.stories.tsx"],"sourcesContent":["import React, { useMemo, useState } from 'react';\nimport type { Meta, StoryObj } from '@storybook/react';\n\nimport { Combobox } from './Combobox';\nimport type {\n ComboboxCallbackStateParams,\n ComboboxOption,\n ComboboxProps,\n} from './Combobox.types';\n\nconst sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));\n\nconst flatten = (nodes: ComboboxOption[] = []): ComboboxOption[] => {\n const res: ComboboxOption[] = [];\n const walk = (list?: ComboboxOption[]) => {\n if (!list?.length) return;\n for (const n of list) {\n res.push(n);\n if (n.items?.length) walk(n.items);\n }\n };\n walk(nodes);\n return res;\n};\n\nconst createFetchOptions =\n (all: ComboboxOption[], delayMs = 350): ComboboxProps['fetchOptions'] =>\n async (search?: string) => {\n await sleep(delayMs);\n\n const q = (search ?? '').trim().toLowerCase();\n if (!q) return all;\n\n // simple \"contains\" search across flattened options; then return top-level filtered\n // (enough for Storybook demos; your real API can do better)\n const allFlat = flatten(all);\n const matchedValues = new Set(\n allFlat\n .filter((o) => String(o.label).toLowerCase().includes(q))\n .map((o) => String(o.value)),\n );\n\n const filterTree = (list: ComboboxOption[]): ComboboxOption[] => {\n return list\n .map((n) => {\n const items = n.items?.length ? filterTree(n.items) : undefined;\n const selfMatch =\n matchedValues.has(String(n.value)) ||\n String(n.label).toLowerCase().includes(q);\n\n if (!selfMatch && !items?.length) return null;\n return { ...n, items };\n })\n .filter(Boolean) as ComboboxOption[];\n };\n\n return filterTree(all);\n };\n\nconst BASE_OPTIONS: ComboboxOption[] = [\n { value: 'ua', label: 'Ukraine' },\n { value: 'pl', label: 'Poland' },\n { value: 'de', label: 'Germany' },\n { value: 'fr', label: 'France' },\n { value: 'es', label: 'Spain' },\n { value: 'it', label: 'Italy' },\n];\n\nconst NESTED_OPTIONS: ComboboxOption[] = [\n {\n value: 'europe',\n label: 'Europe',\n items: [\n { value: 'ua', label: 'Ukraine' },\n { value: 'pl', label: 'Poland' },\n { value: 'de', label: 'Germany' },\n { value: 'fr', label: 'France' },\n ],\n },\n {\n value: 'north-america',\n label: 'North America',\n items: [\n { value: 'us', label: 'United States' },\n { value: 'ca', label: 'Canada' },\n { value: 'mx', label: 'Mexico' },\n ],\n },\n];\n\ntype ControlledProps = Omit<ComboboxProps, 'value' | 'onChange'> & {\n initialValue?: ComboboxProps['value'];\n};\n\nfunction ControlledCombobox({ initialValue = '', ...args }: ControlledProps) {\n const [value, setValue] = useState<ComboboxProps['value']>(initialValue);\n\n // keep stable reference if someone passes inline fetchOptions\n const fetchOptions = useMemo(\n () => args.fetchOptions,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n return (\n <div className=\"max-w-sm\">\n <Combobox {...args} value={value} onChange={setValue} fetchOptions={fetchOptions} />\n <div className=\"mt-3 text-xs text-muted-foreground\">\n value: <span className=\"font-mono\">{String(value || '')}</span>\n </div>\n </div>\n );\n}\n\nconst meta = {\n title: 'UI/Combobox',\n component: Combobox,\n parameters: {\n layout: 'centered',\n },\n args: {\n placeholder: 'Select option...',\n searchLabel: 'Type to search...',\n emptyLabel: 'No options',\n disabled: false,\n fetchOptions: createFetchOptions(BASE_OPTIONS, 250),\n },\n argTypes: {\n fetchOptions: { control: false },\n onChange: { control: false },\n onMount: { control: false },\n emptyAction: { control: false },\n commandInputAction: { control: false },\n listHeadAction: { control: false },\n options: { control: false },\n value: { control: false },\n },\n decorators: [\n (Story) => (\n <div className=\"p-6 w-[420px]\">\n <Story />\n </div>\n ),\n ],\n} satisfies Meta<typeof Combobox>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\n/** 1) Default (async options) */\nexport const Default: Story = {\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 2) With initial selected value */\nexport const WithValueSelected: Story = {\n render: (args) => <ControlledCombobox {...args} initialValue=\"pl\" />,\n};\n\n/** 3) Disabled */\nexport const Disabled: Story = {\n args: { disabled: true },\n render: (args) => <ControlledCombobox {...args} initialValue=\"de\" />,\n};\n\n/** 4) Static options via `options` prop (no async needed, but fetchOptions still required) */\nexport const WithStaticOptionsProp: Story = {\n args: {\n options: BASE_OPTIONS,\n fetchOptions: async () => BASE_OPTIONS,\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 5) Slow fetch to show loading state on open/search */\nexport const SlowFetchLoading: Story = {\n args: {\n fetchOptions: createFetchOptions(BASE_OPTIONS, 1200),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 6) Empty state with action (search something like \"zzz\") */\nexport const EmptyStateWithAction: Story = {\n args: {\n emptyLabel: 'Nothing found',\n emptyAction: (st: ComboboxCallbackStateParams) => {\n const canCreate = Boolean(st.search?.trim());\n return (\n <button\n type=\"button\"\n className=\"inline-flex items-center justify-center rounded-md border px-3 py-1.5 text-sm\"\n disabled={!canCreate}\n onClick={() => {\n const v = st.search.trim();\n const next: ComboboxOption = { value: v, label: `Create \"${v}\"` };\n st.setOptions([next]);\n st.setLoading(false);\n }}\n >\n Create option\n </button>\n );\n },\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 7) commandInputAction (helper row under input) */\nexport const WithCommandInputAction: Story = {\n args: {\n commandInputAction: (st: ComboboxCallbackStateParams) => (\n <div className=\"px-3 py-2 flex items-center justify-between text-xs text-muted-foreground\">\n <span>\n results: <span className=\"font-mono\">{st.options.length}</span>\n </span>\n <button\n type=\"button\"\n className=\"underline\"\n onClick={() => {\n st.setSearch('');\n st.setLoading(false);\n }}\n >\n Clear search\n </button>\n </div>\n ),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 8) listHeadAction (top action inside list) */\nexport const WithListHeadAction: Story = {\n args: {\n listHeadAction: (st: ComboboxCallbackStateParams) => (\n <button\n type=\"button\"\n className=\"w-full text-left px-3 py-2 text-sm\"\n onClick={() => {\n st.setSearch('');\n st.setOpen(false);\n }}\n >\n Close list\n </button>\n ),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 9) Nested options tree */\nexport const NestedOptions: Story = {\n args: {\n fetchOptions: createFetchOptions(NESTED_OPTIONS, 250),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 10) onMount initial loading (simulate prefetch on mount) */\nexport const OnMountPrefetch: Story = {\n args: {\n fetchOptions: createFetchOptions(BASE_OPTIONS, 250),\n onMount: async (st: ComboboxCallbackStateParams) => {\n await sleep(900);\n st.setOptions(BASE_OPTIONS);\n st.setLoading(false);\n },\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n"],"names":["sleep","ms","r","flatten","nodes","res","walk","list","n","createFetchOptions","all","delayMs","search","q","allFlat","matchedValues","o","filterTree","items","BASE_OPTIONS","NESTED_OPTIONS","ControlledCombobox","initialValue","args","value","setValue","useState","fetchOptions","useMemo","jsxs","jsx","Combobox","meta","Story","Default","WithValueSelected","Disabled","WithStaticOptionsProp","SlowFetchLoading","EmptyStateWithAction","st","canCreate","v","next","WithCommandInputAction","WithListHeadAction","NestedOptions","OnMountPrefetch"],"mappings":";;;AAUA,MAAMA,IAAQ,CAACC,MAAe,IAAI,QAAQ,CAACC,MAAM,WAAWA,GAAGD,CAAE,CAAC,GAE5DE,IAAU,CAACC,IAA0B,OAAyB;AAClE,QAAMC,IAAwB,CAAA,GACxBC,IAAO,CAACC,MAA4B;AACxC,QAAKA,GAAM;AACX,iBAAWC,KAAKD;AACd,QAAAF,EAAI,KAAKG,CAAC,GACNA,EAAE,OAAO,UAAQF,EAAKE,EAAE,KAAK;AAAA,EAErC;AACA,SAAAF,EAAKF,CAAK,GACHC;AACT,GAEMI,IACJ,CAACC,GAAuBC,IAAU,QAChC,OAAOC,MAAoB;AACzB,QAAMZ,EAAMW,CAAO;AAEnB,QAAME,KAAKD,KAAU,IAAI,KAAA,EAAO,YAAA;AAChC,MAAI,CAACC,EAAG,QAAOH;AAIf,QAAMI,IAAUX,EAAQO,CAAG,GACrBK,IAAgB,IAAI;AAAA,IACxBD,EACG,OAAO,CAACE,MAAM,OAAOA,EAAE,KAAK,EAAE,YAAA,EAAc,SAASH,CAAC,CAAC,EACvD,IAAI,CAACG,MAAM,OAAOA,EAAE,KAAK,CAAC;AAAA,EAAA,GAGzBC,IAAa,CAACV,MACXA,EACJ,IAAI,CAACC,MAAM;AACV,UAAMU,IAAQV,EAAE,OAAO,SAASS,EAAWT,EAAE,KAAK,IAAI;AAKtD,WAAI,EAHFO,EAAc,IAAI,OAAOP,EAAE,KAAK,CAAC,KACjC,OAAOA,EAAE,KAAK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QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS,MAAM;AACb,YAAAU,EAAG,UAAU,EAAE,GACfA,EAAG,WAAW,EAAK;AAAA,UACrB;AAAA,UACD,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAED,EAAA,CACF;AAAA,EAAA;AAAA,EAGJ,QAAQ,CAACjB,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD,GAGasB,IAA4B;AAAA,EACvC,MAAM;AAAA,IACJ,gBAAgB,CAACL,MACf,gBAAAV;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAU;AAAA,QACV,SAAS,MAAM;AACb,UAAAU,EAAG,UAAU,EAAE,GACfA,EAAG,QAAQ,EAAK;AAAA,QAClB;AAAA,QACD,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAED;AAAA,EAGJ,QAAQ,CAACjB,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD,GAGauB,IAAuB;AAAA,EAClC,MAAM;AAAA,IACJ,cAAcrC,EAAmBW,GAAgB,GAAG;AAAA,EAAA;AAAA,EAEtD,QAAQ,CAACG,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD,GAGawB,IAAyB;AAAA,EACpC,MAAM;AAAA,IACJ,cAActC,EAAmBU,GAAc,GAAG;AAAA,IAClD,SAAS,OAAOqB,MAAoC;AAClD,YAAMxC,EAAM,GAAG,GACfwC,EAAG,WAAWrB,CAAY,GAC1BqB,EAAG,WAAW,EAAK;AAAA,IACrB;AAAA,EAAA;AAAA,EAEF,QAAQ,CAACjB,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD;"}
|
|
1
|
+
{"version":3,"file":"Combobox.stories.js","sources":["../../src/Combobox/Combobox.stories.tsx"],"sourcesContent":["import React, { useMemo, useState } from 'react';\nimport type { Meta, StoryObj } from '@storybook/react';\n\nimport { Combobox } from './Combobox';\nimport type {\n ComboboxCallbackStateParams,\n ComboboxOption,\n ComboboxProps,\n} from './Combobox.types';\n\nconst sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));\n\nconst flatten = (nodes: ComboboxOption[] = []): ComboboxOption[] => {\n const res: ComboboxOption[] = [];\n const walk = (list?: ComboboxOption[]) => {\n if (!list?.length) return;\n for (const n of list) {\n res.push(n);\n if (n.items?.length) walk(n.items);\n }\n };\n walk(nodes);\n return res;\n};\n\nconst createFetchOptions =\n (all: ComboboxOption[], delayMs = 350): ComboboxProps['fetchOptions'] =>\n async (search?: string) => {\n await sleep(delayMs);\n\n const q = (search ?? '').trim().toLowerCase();\n if (!q) return all;\n\n // simple \"contains\" search across flattened options; then return top-level filtered\n // (enough for Storybook demos; your real API can do better)\n const allFlat = flatten(all);\n const matchedValues = new Set(\n allFlat\n .filter((o) => String(o.label).toLowerCase().includes(q))\n .map((o) => String(o.value)),\n );\n\n const filterTree = (list: ComboboxOption[]): ComboboxOption[] => {\n return list\n .map((n) => {\n const items = n.items?.length ? filterTree(n.items) : undefined;\n const selfMatch =\n matchedValues.has(String(n.value)) ||\n String(n.label).toLowerCase().includes(q);\n\n if (!selfMatch && !items?.length) return null;\n return { ...n, items };\n })\n .filter(Boolean) as ComboboxOption[];\n };\n\n return filterTree(all);\n };\n\nconst BASE_OPTIONS: ComboboxOption[] = [\n { value: 'ua', label: 'Ukraine' },\n { value: 'pl', label: 'Poland' },\n { value: 'de', label: 'Germany' },\n { value: 'fr', label: 'France' },\n { value: 'es', label: 'Spain' },\n { value: 'it', label: 'Italy' },\n];\n\nconst NESTED_OPTIONS: ComboboxOption[] = [\n {\n value: 'europe',\n label: 'Europe',\n items: [\n { value: 'ua', label: 'Ukraine' },\n { value: 'pl', label: 'Poland' },\n { value: 'de', label: 'Germany' },\n { value: 'fr', label: 'France' },\n ],\n },\n {\n value: 'north-america',\n label: 'North America',\n items: [\n { value: 'us', label: 'United States' },\n { value: 'ca', label: 'Canada' },\n { value: 'mx', label: 'Mexico' },\n ],\n },\n];\n\ntype ControlledProps = Omit<ComboboxProps, 'value' | 'onChange'> & {\n initialValue?: ComboboxProps['value'];\n};\n\nfunction ControlledCombobox({ initialValue = '', ...args }: ControlledProps) {\n const [value, setValue] = useState<ComboboxProps['value']>(initialValue);\n\n // keep stable reference if someone passes inline fetchOptions\n const fetchOptions = useMemo(\n () => args.fetchOptions,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [],\n );\n\n return (\n <div className=\"max-w-sm\">\n <Combobox {...args} value={value} onChange={setValue} fetchOptions={fetchOptions} />\n <div className=\"mt-3 text-xs text-muted-foreground\">\n value: <span className=\"font-mono\">{String(value || '')}</span>\n </div>\n </div>\n );\n}\n\nconst meta = {\n title: 'Combobox',\n component: Combobox,\n parameters: {\n layout: 'centered',\n },\n args: {\n placeholder: 'Select option...',\n searchLabel: 'Type to search...',\n emptyLabel: 'No options',\n disabled: false,\n fetchOptions: createFetchOptions(BASE_OPTIONS, 250),\n },\n argTypes: {\n fetchOptions: { control: false },\n onChange: { control: false },\n onMount: { control: false },\n emptyAction: { control: false },\n commandInputAction: { control: false },\n listHeadAction: { control: false },\n options: { control: false },\n value: { control: false },\n },\n decorators: [\n (Story) => (\n <div className=\"p-6 w-[420px]\">\n <Story />\n </div>\n ),\n ],\n} satisfies Meta<typeof Combobox>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\n/** 1) Default (async options) */\nexport const Default: Story = {\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 2) With initial selected value */\nexport const WithValueSelected: Story = {\n render: (args) => <ControlledCombobox {...args} initialValue=\"pl\" />,\n};\n\n/** 3) Disabled */\nexport const Disabled: Story = {\n args: { disabled: true },\n render: (args) => <ControlledCombobox {...args} initialValue=\"de\" />,\n};\n\n/** 4) Static options via `options` prop (no async needed, but fetchOptions still required) */\nexport const WithStaticOptionsProp: Story = {\n args: {\n options: BASE_OPTIONS,\n fetchOptions: async () => BASE_OPTIONS,\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 5) Slow fetch to show loading state on open/search */\nexport const SlowFetchLoading: Story = {\n args: {\n fetchOptions: createFetchOptions(BASE_OPTIONS, 1200),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 6) Empty state with action (search something like \"zzz\") */\nexport const EmptyStateWithAction: Story = {\n args: {\n emptyLabel: 'Nothing found',\n emptyAction: (st: ComboboxCallbackStateParams) => {\n const canCreate = Boolean(st.search?.trim());\n return (\n <button\n type=\"button\"\n className=\"inline-flex items-center justify-center rounded-md border px-3 py-1.5 text-sm\"\n disabled={!canCreate}\n onClick={() => {\n const v = st.search.trim();\n const next: ComboboxOption = { value: v, label: `Create \"${v}\"` };\n st.setOptions([next]);\n st.setLoading(false);\n }}\n >\n Create option\n </button>\n );\n },\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 7) commandInputAction (helper row under input) */\nexport const WithCommandInputAction: Story = {\n args: {\n commandInputAction: (st: ComboboxCallbackStateParams) => (\n <div className=\"px-3 py-2 flex items-center justify-between text-xs text-muted-foreground\">\n <span>\n results: <span className=\"font-mono\">{st.options.length}</span>\n </span>\n <button\n type=\"button\"\n className=\"underline\"\n onClick={() => {\n st.setSearch('');\n st.setLoading(false);\n }}\n >\n Clear search\n </button>\n </div>\n ),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 8) listHeadAction (top action inside list) */\nexport const WithListHeadAction: Story = {\n args: {\n listHeadAction: (st: ComboboxCallbackStateParams) => (\n <button\n type=\"button\"\n className=\"w-full text-left px-3 py-2 text-sm\"\n onClick={() => {\n st.setSearch('');\n st.setOpen(false);\n }}\n >\n Close list\n </button>\n ),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 9) Nested options tree */\nexport const NestedOptions: Story = {\n args: {\n fetchOptions: createFetchOptions(NESTED_OPTIONS, 250),\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n\n/** 10) onMount initial loading (simulate prefetch on mount) */\nexport const OnMountPrefetch: Story = {\n args: {\n fetchOptions: createFetchOptions(BASE_OPTIONS, 250),\n onMount: async (st: ComboboxCallbackStateParams) => {\n await sleep(900);\n st.setOptions(BASE_OPTIONS);\n st.setLoading(false);\n },\n },\n render: (args) => <ControlledCombobox {...args} />,\n};\n"],"names":["sleep","ms","r","flatten","nodes","res","walk","list","n","createFetchOptions","all","delayMs","search","q","allFlat","matchedValues","o","filterTree","items","BASE_OPTIONS","NESTED_OPTIONS","ControlledCombobox","initialValue","args","value","setValue","useState","fetchOptions","useMemo","jsxs","jsx","Combobox","meta","Story","Default","WithValueSelected","Disabled","WithStaticOptionsProp","SlowFetchLoading","EmptyStateWithAction","st","canCreate","v","next","WithCommandInputAction","WithListHeadAction","NestedOptions","OnMountPrefetch"],"mappings":";;;AAUA,MAAMA,IAAQ,CAACC,MAAe,IAAI,QAAQ,CAACC,MAAM,WAAWA,GAAGD,CAAE,CAAC,GAE5DE,IAAU,CAACC,IAA0B,OAAyB;AAClE,QAAMC,IAAwB,CAAA,GACxBC,IAAO,CAACC,MAA4B;AACxC,QAAKA,GAAM;AACX,iBAAWC,KAAKD;AACd,QAAAF,EAAI,KAAKG,CAAC,GACNA,EAAE,OAAO,UAAQF,EAAKE,EAAE,KAAK;AAAA,EAErC;AACA,SAAAF,EAAKF,CAAK,GACHC;AACT,GAEMI,IACJ,CAACC,GAAuBC,IAAU,QAChC,OAAOC,MAAoB;AACzB,QAAMZ,EAAMW,CAAO;AAEnB,QAAME,KAAKD,KAAU,IAAI,KAAA,EAAO,YAAA;AAChC,MAAI,CAACC,EAAG,QAAOH;AAIf,QAAMI,IAAUX,EAAQO,CAAG,GACrBK,IAAgB,IAAI;AAAA,IACxBD,EACG,OAAO,CAACE,MAAM,OAAOA,EAAE,KAAK,EAAE,YAAA,EAAc,SAASH,CAAC,CAAC,EACvD,IAAI,CAACG,MAAM,OAAOA,EAAE,KA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AK;AAAA,IACrB;AAAA,EAAA;AAAA,EAEF,QAAQ,CAACjB,MAAS,gBAAAO,EAACT,GAAA,EAAoB,GAAGE,EAAA,CAAM;AAClD;"}
|
package/Dialog/Dialog.js
CHANGED
|
@@ -17,7 +17,7 @@ function u({
|
|
|
17
17
|
}) {
|
|
18
18
|
return /* @__PURE__ */ e(a.Portal, { "data-slot": "dialog-portal", ...t });
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function D({
|
|
21
21
|
...t
|
|
22
22
|
}) {
|
|
23
23
|
return /* @__PURE__ */ e(a.Close, { "data-slot": "dialog-close", ...t });
|
|
@@ -38,7 +38,7 @@ function f({
|
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function h(t) {
|
|
42
42
|
const {
|
|
43
43
|
className: o,
|
|
44
44
|
children: i,
|
|
@@ -133,15 +133,15 @@ function z({
|
|
|
133
133
|
a.Description,
|
|
134
134
|
{
|
|
135
135
|
"data-slot": "dialog-description",
|
|
136
|
-
className: n("text-[#
|
|
136
|
+
className: n("text-[#06080D] font-medium text-base", t),
|
|
137
137
|
...o
|
|
138
138
|
}
|
|
139
139
|
);
|
|
140
140
|
}
|
|
141
141
|
export {
|
|
142
142
|
x as Dialog,
|
|
143
|
-
|
|
144
|
-
|
|
143
|
+
D as DialogClose,
|
|
144
|
+
h as DialogContent,
|
|
145
145
|
z as DialogDescription,
|
|
146
146
|
y as DialogFooter,
|
|
147
147
|
b as DialogHeader,
|
package/Dialog/Dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.js","sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Dialog({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent(props: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n const {\n className,\n children,\n showCloseButton = true,\n style,\n ...rest\n } = props;\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay>\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]',\n 'flex flex-col w-full max-w-[calc(100%-2rem)] sm:max-w-2xl gap-3',\n 'bg-background rounded-lg border p-4 shadow-lg duration-200',\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',\n \"focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus:ring-transparent\",\n 'outline-none focus:outline-none focus-visible:outline-none',\n className\n )}\n {...rest}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n 'absolute top-4 right-4 rounded-2xl opacity-70 transition-opacity hover:opacity-100',\n 'data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',\n 'ring-offset-background focus:ring-transparent focus:ring-0 focus:ring-offset-0 focus:outline-hidden',\n 'focus:outline-none focus:ring-0',\n 'disabled:pointer-events-none [&_svg]:pointer-events-none',\n '[&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-5',\n 'cursor-pointer size-10 flex items-center justify-center',\n )}\n >\n <XIcon className='size-6 text-[#06080D]'/>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogOverlay>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-4 justify-center text-center sm:text-left min-h-10\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end pt-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-bold text-[#06080D]\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-[#
|
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../src/Dialog/Dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport * as DialogPrimitive from \"@radix-ui/react-dialog\"\nimport { XIcon } from \"lucide-react\"\n\nimport { cn } from \"@oneplatformdev/utils\"\n\nfunction Dialog({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />\n}\n\nfunction DialogTrigger({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent(props: React.ComponentProps<typeof DialogPrimitive.Content> & {\n showCloseButton?: boolean\n}) {\n const {\n className,\n children,\n showCloseButton = true,\n style,\n ...rest\n } = props;\n return (\n <DialogPortal data-slot=\"dialog-portal\">\n <DialogOverlay>\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-[50%] left-[50%] z-50 translate-x-[-50%] translate-y-[-50%]',\n 'flex flex-col w-full max-w-[calc(100%-2rem)] sm:max-w-2xl gap-3',\n 'bg-background rounded-lg border p-4 shadow-lg duration-200',\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',\n \"focus:outline-none focus-visible:outline-none focus:ring-0 focus-visible:ring-0 focus:ring-transparent\",\n 'outline-none focus:outline-none focus-visible:outline-none',\n className\n )}\n {...rest}\n style={{\n pointerEvents: 'auto',\n ...(style || {}),\n }}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n className={cn(\n 'absolute top-4 right-4 rounded-2xl opacity-70 transition-opacity hover:opacity-100',\n 'data-[state=open]:bg-accent data-[state=open]:text-muted-foreground',\n 'ring-offset-background focus:ring-transparent focus:ring-0 focus:ring-offset-0 focus:outline-hidden',\n 'focus:outline-none focus:ring-0',\n 'disabled:pointer-events-none [&_svg]:pointer-events-none',\n '[&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-5',\n 'cursor-pointer size-10 flex items-center justify-center',\n )}\n >\n <XIcon className='size-6 text-[#06080D]'/>\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogOverlay>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-4 justify-center text-center sm:text-left min-h-10\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"flex flex-col-reverse gap-2 sm:flex-row sm:justify-end pt-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogTitle({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-lg leading-none font-bold text-[#06080D]\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n }: React.ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\"text-[#06080D] font-medium text-base\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n DialogPrimitive\n}\n"],"names":["Dialog","props","DialogPrimitive","DialogTrigger","DialogPortal","DialogClose","DialogOverlay","className","jsx","cn","DialogContent","children","showCloseButton","style","rest","jsxs","XIcon","DialogHeader","DialogFooter","DialogTitle","DialogDescription"],"mappings":";;;;AAQA,SAASA,EAAO;AAAA,EACE,GAAGC;AACL,GAAsD;AACpE,2BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAc;AAAA,EACE,GAAGF;AACL,GAAyD;AAC9E,2BAAQC,EAAgB,SAAhB,EAAwB,aAAU,kBAAkB,GAAGD,GAAO;AACxE;AAEA,SAASG,EAAa;AAAA,EACE,GAAGH;AACL,GAAwD;AAC5E,2BAAQC,EAAgB,QAAhB,EAAuB,aAAU,iBAAiB,GAAGD,GAAO;AACtE;AAEA,SAASI,EAAY;AAAA,EACE,GAAGJ;AACL,GAAuD;AAC1E,2BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASK,EAAc;AAAA,EACE,WAAAC;AAAA,EACA,GAAGN;AACL,GAAyD;AAC9E,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASS,EAAcT,GAEpB;AACD,QAAM;AAAA,IACJ,WAAAM;AAAA,IACA,UAAAI;AAAA,IACA,iBAAAC,IAAkB;AAAA,IAClB,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,IACDb;AACJ,SACE,gBAAAO,EAACJ,GAAA,EAAa,aAAU,iBACtB,4BAACE,GAAA,EACC,UAAA,gBAAAS;AAAA,IAACb,EAAgB;AAAA,IAAhB;AAAA,MACC,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AWO,EAAG,iDAAiDF,CAAS;AAAA,MACvE,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASmB,EAAkB;AAAA,EACE,WAAAb;AAAA,EACA,GAAGN;AACL,GAA6D;AACtF,SACE,gBAAAO;AAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO,EAAG,wCAAwCF,CAAS;AAAA,MAC9D,GAAGN;AAAA,IAAA;AAAA,EAAA;AAGV;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InfoBlock.d.ts","sourceRoot":"","sources":["../../src/InfoBlock/InfoBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAgBtE,eAAO,MAAM,SAAS;YAAW,cAAc;;CAe9C,CAAA;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { cn as m } from "@oneplatformdev/utils";
|
|
3
|
+
import { infoBlockVariants as f } from "./infoBlockVariants.js";
|
|
4
|
+
import { isValidElement as d, createElement as p } from "react";
|
|
5
|
+
import { TriangleAlertIcon as u } from "lucide-react";
|
|
6
|
+
const h = (r) => r ? d(r) ? r : p(r) : null, x = {
|
|
7
|
+
error: /* @__PURE__ */ e(u, { className: "fill-[#DC2626] text-white!" })
|
|
8
|
+
}, B = (r) => {
|
|
9
|
+
const { className: t, variant: n = "error", content: o, icon: i, children: a, ...l } = r;
|
|
10
|
+
return /* @__PURE__ */ e(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
...l,
|
|
14
|
+
className: m(f({ className: t, variant: n })),
|
|
15
|
+
children: a ?? /* @__PURE__ */ s(c, { children: [
|
|
16
|
+
h(i ?? x[n]),
|
|
17
|
+
/* @__PURE__ */ e("span", { children: o })
|
|
18
|
+
] })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
22
|
+
B.displayName = "InfoBlock";
|
|
23
|
+
export {
|
|
24
|
+
B as InfoBlock,
|
|
25
|
+
B as default
|
|
26
|
+
};
|
|
27
|
+
//# 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 } 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}\n\nexport const InfoBlock = (props: InfoBlockProps) => {\n const { className, variant = 'error', content, icon, children, ...rest } = props;\n return (\n <div\n {...rest}\n className={cn(infoBlockVariants({ className, variant }))}\n >\n {children ?? (\n <>\n {renderInnerIcon(icon ?? iconByVariant[variant!])}\n <span>{content}</span>\n </>\n )}\n </div>\n )\n}\nInfoBlock.displayName = 'InfoBlock';\nexport default InfoBlock;\n\n"],"names":["renderInnerIcon","Icon","isValidElement","createElement","iconByVariant","jsx","TriangleAlertIcon","InfoBlock","props","className","variant","content","icon","children","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;AAClE,GAEaC,IAAY,CAACC,MAA0B;AAClD,QAAM,EAAE,WAAAC,GAAW,SAAAC,IAAU,SAAS,SAAAC,GAAS,MAAAC,GAAM,UAAAC,GAAU,GAAGC,EAAA,IAASN;AAC3E,SACE,gBAAAH;AAAA,IAAC;AAAA,IAAA;AAAA,MACE,GAAGS;AAAA,MACJ,WAAWC,EAAGC,EAAkB,EAAE,WAAAP,GAAW,SAAAC,EAAA,CAAS,CAAC;AAAA,MAEtD,eACC,gBAAAO,EAAAC,GAAA,EACG,UAAA;AAAA,QAAAlB,EAAgBY,KAAQR,EAAcM,CAAQ,CAAC;AAAA,QAChD,gBAAAL,EAAC,UAAM,UAAAM,EAAA,CAAQ;AAAA,MAAA,EAAA,CACjB;AAAA,IAAA;AAAA,EAAA;AAIR;AACAJ,EAAU,cAAc;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InfoBlock as o } from "./InfoBlock.js";
|
|
2
|
+
const n = {
|
|
3
|
+
title: "UI/InfoBlock",
|
|
4
|
+
component: o
|
|
5
|
+
}, e = {
|
|
6
|
+
args: {
|
|
7
|
+
content: "Увага! Перш ніж архівувати підрозділ “Підрозділ дизану”, переведіть співробітників до іншого - інакше вони будуть автоматично звільнені. Підрозділ буде преміщено до розділу “Архів”."
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
e as Default,
|
|
12
|
+
n as default
|
|
13
|
+
};
|
|
14
|
+
//# 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';\n\nimport { InfoBlock } from './InfoBlock';\n\nconst meta = {\n title: 'UI/InfoBlock',\n component: InfoBlock,\n} satisfies Meta<typeof InfoBlock>;\n\nexport default meta;\n\ntype Story = StoryObj<typeof meta>;\n\nexport const Default: Story = {\n args: {\n content: 'Увага! Перш ніж архівувати підрозділ “Підрозділ дизану”, переведіть співробітників до іншого - інакше вони будуть автоматично звільнені. Підрозділ буде преміщено до розділу “Архів”.'\n }\n};\n"],"names":["meta","InfoBlock","Default"],"mappings":";AAIA,MAAMA,IAAO;AAAA,EACX,OAAO;AAAA,EACP,WAAWC;AACb,GAMaC,IAAiB;AAAA,EAC5B,MAAM;AAAA,IACJ,SAAS;AAAA,EAAA;AAEb;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
icon?: InfoBlockIconType;
|
|
7
|
+
}
|
|
8
|
+
//# 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,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" | 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;;8EAoB7B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cva as r } from "class-variance-authority";
|
|
2
|
+
const a = r(
|
|
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-5",
|
|
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
|
+
}
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: "error"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
export {
|
|
24
|
+
a as infoBlockVariants
|
|
25
|
+
};
|
|
26
|
+
//# 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-5\",\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 },\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,MAAA;AAAA,IACT;AAAA,IAEF,iBAAiB;A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AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Accordion as d, AccordionContent as u, AccordionItem as x, AccordionTrigger as g } from "./Accordion/Accordion.js";
|
|
2
2
|
import { Alert as f, AlertDescription as s, AlertTitle as S } from "./Alert/Alert.js";
|
|
3
3
|
import { AlertDialogAction as T, AlertDialogCancel as D, AlertDialogContent as c, AlertDialogDescription as M, AlertDialogFooter as P, AlertDialogHeader as v, AlertDialogOverlay as I, AlertDialogPortal as A, AlertDialogRoot as w, AlertDialogTitle as h, AlertDialogTrigger as F } from "./AlertDialog/AlertDialogRoot.js";
|
|
4
|
-
import { AlertDialog as
|
|
4
|
+
import { AlertDialog as B } from "./AlertDialog/AlertDialog.js";
|
|
5
5
|
import { AreaChart as G } from "./AreaChart/AreaChart.js";
|
|
6
6
|
import { Aside as H } from "./Aside/Aside.js";
|
|
7
7
|
import { AsideSidebar as N } from "./Aside/AsideSidebar.js";
|
|
@@ -17,7 +17,7 @@ import { buttonIconVariants as uo } from "./ButtonIcon/buttonIconVariants.js";
|
|
|
17
17
|
import { Calendar as go } from "./Calendar/Calendar.js";
|
|
18
18
|
import { Card as fo, CardContent as so, CardDescription as So, CardFooter as Co, CardHeader as To, CardTitle as Do } from "./Card/Card.js";
|
|
19
19
|
import { Carousel as Mo, CarouselContent as Po, CarouselItem as vo, CarouselNext as Io, CarouselPrevious as Ao } from "./Carousel/Carousel.js";
|
|
20
|
-
import { ChartContainer as ho, ChartLegend as Fo, ChartLegendContent as Lo, ChartStyle as
|
|
20
|
+
import { ChartContainer as ho, ChartLegend as Fo, ChartLegendContent as Lo, ChartStyle as Bo, ChartTooltip as Ro, ChartTooltipContent as Go } from "./Chart/Chart.js";
|
|
21
21
|
import { Checkbox as Ho, CheckboxLabel as yo } from "./Checkbox/Checkbox.js";
|
|
22
22
|
import { Collapsible as Oo, CollapsibleContent as Vo, CollapsibleTrigger as Eo } from "./Collapsible/Collapsible.js";
|
|
23
23
|
import { Combobox as _o } from "./Combobox/Combobox.js";
|
|
@@ -27,7 +27,7 @@ import { DatePicker as er } from "./DatePicker/DatePicker.js";
|
|
|
27
27
|
import { Dialog as ar, DialogClose as ir, DialogContent as nr, DialogDescription as pr, DialogFooter as mr, DialogHeader as lr, DialogOverlay as dr, DialogPortal as ur, DialogTitle as xr, DialogTrigger as gr } from "./Dialog/Dialog.js";
|
|
28
28
|
import { DialogOverlayContainerContext as fr, DialogOverlayScope as sr, useDialogOverlayContainer as Sr } from "./Dialog/DialogOverlayScope.js";
|
|
29
29
|
import { Drawer as Tr, DrawerClose as Dr, DrawerContent as cr, DrawerDescription as Mr, DrawerFooter as Pr, DrawerHeader as vr, DrawerOverlay as Ir, DrawerPortal as Ar, DrawerTitle as wr, DrawerTrigger as hr } from "./Drawer/Drawer.js";
|
|
30
|
-
import { DropdownMenu as Lr, DropdownMenuCheckboxItem as
|
|
30
|
+
import { DropdownMenu as Lr, DropdownMenuCheckboxItem as Br, DropdownMenuContent as Rr, DropdownMenuGroup as Gr, DropdownMenuItem as kr, DropdownMenuLabel as Hr, DropdownMenuPortal as yr, DropdownMenuRadioGroup as Nr, DropdownMenuRadioItem as Or, DropdownMenuSeparator as Vr, DropdownMenuShortcut as Er, DropdownMenuSub as zr, DropdownMenuSubContent as _r, DropdownMenuSubTrigger as Ur, DropdownMenuTrigger as Yr } from "./DropdownMenu/DropdownMenu.js";
|
|
31
31
|
import { Form as qr, FormControl as Jr, FormDescription as Kr, FormField as Qr, FormItem as Wr, FormLabel as Xr, FormMessage as Zr, useFormField as $r } from "./Form/Form.js";
|
|
32
32
|
import { FormRenderControl as re } from "./Form/FormRenderControl.js";
|
|
33
33
|
import { FormCheckbox as te } from "./FormCheckbox/FormCheckbox.js";
|
|
@@ -38,53 +38,54 @@ import { FormSelect as ue } from "./FormSelect/FormSelect.js";
|
|
|
38
38
|
import { FormTextarea as ge } from "./FormTextarea/FormTextarea.js";
|
|
39
39
|
import { Header as fe } from "./Header/Header.js";
|
|
40
40
|
import { HoverCard as Se, HoverCardContent as Ce, HoverCardTrigger as Te } from "./HoverCard/HoverCard.js";
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
import {
|
|
87
|
-
import {
|
|
41
|
+
import { InfoBlock as ce } from "./InfoBlock/InfoBlock.js";
|
|
42
|
+
import { BaseInput as Pe, Input as ve, PasswordInput as Ie } from "./Input/Input.js";
|
|
43
|
+
import { InputOTP as we, InputOTPGroup as he, InputOTPSeparator as Fe, InputOTPSlot as Le } from "./InputOTP/InputOTP.js";
|
|
44
|
+
import { Label as Re } from "./Label/Label.js";
|
|
45
|
+
import { labelVariants as ke } from "./Label/labelVariants.js";
|
|
46
|
+
import { LazyLoader as ye } from "./LazyLoader/LazyLoader.js";
|
|
47
|
+
import { LoadedIcon as Oe } from "./LoadedIcon/LoadedIcon.js";
|
|
48
|
+
import { LoadingMask as Ee } from "./LoadingMask/LoadingMask.js";
|
|
49
|
+
import { RenderLoadingMask as _e } from "./LoadingMask/RenderLoadingMask.js";
|
|
50
|
+
import { LoadingProgress as Ye } from "./LoadingProgress/LoadingProgress.js";
|
|
51
|
+
import { loadingProgressVariants as qe } from "./LoadingProgress/loadingProgressVariants.js";
|
|
52
|
+
import { Menubar as Ke, MenubarCheckboxItem as Qe, MenubarContent as We, MenubarGroup as Xe, MenubarItem as Ze, MenubarLabel as $e, MenubarMenu as ot, MenubarPortal as rt, MenubarRadioGroup as et, MenubarRadioItem as tt, MenubarSeparator as at, MenubarShortcut as it, MenubarSub as nt, MenubarSubContent as pt, MenubarSubTrigger as mt, MenubarTrigger as lt } from "./Menubar/Menubar.js";
|
|
53
|
+
import { NavigationMenu as ut, NavigationMenuContent as xt, NavigationMenuIndicator as gt, NavigationMenuItem as bt, NavigationMenuLink as ft, NavigationMenuList as st, NavigationMenuTrigger as St, NavigationMenuViewport as Ct } from "./NavigationMenu/NavigationMenu.js";
|
|
54
|
+
import { navigationMenuVariants as Dt } from "./NavigationMenu/navigationMenuVariants.js";
|
|
55
|
+
import { Pagination as Mt, PaginationContent as Pt, PaginationEllipsis as vt, PaginationItem as It, PaginationLink as At, PaginationNext as wt, PaginationPrevious as ht } from "./Pagination/Pagination.js";
|
|
56
|
+
import { Popover as Lt, PopoverAnchor as Bt, PopoverContent as Rt, PopoverTrigger as Gt } from "./Popover/Popover.js";
|
|
57
|
+
import { Progress as Ht } from "./Progress/Progress.js";
|
|
58
|
+
import { RadioGroup as Nt, RadioGroupItem as Ot, RadioGroupLabel as Vt } from "./RadioGroup/RadioGroup.js";
|
|
59
|
+
import { ResizableHandle as zt, ResizablePanel as _t, ResizablePanelGroup as Ut } from "./Resizable/Resizable.js";
|
|
60
|
+
import { ScrollArea as jt, ScrollBar as qt } from "./ScrollArea/ScrollArea.js";
|
|
61
|
+
import { Search as Kt } from "./Search/Search.js";
|
|
62
|
+
import { SelectContent as Wt, SelectGroup as Xt, SelectItem as Zt, SelectLabel as $t, SelectRoot as oa, SelectScrollDownButton as ra, SelectScrollUpButton as ea, SelectSeparator as ta, SelectTrigger as aa, SelectValue as ia } from "./Select/SelectRoot.js";
|
|
63
|
+
import { Select as pa } from "./Select/Select.js";
|
|
64
|
+
import { Separator as la } from "./Separator/Separator.js";
|
|
65
|
+
import { Sheet as ua, SheetClose as xa, SheetContent as ga, SheetDescription as ba, SheetFooter as fa, SheetHeader as sa, SheetOverlay as Sa, SheetPortal as Ca, SheetTitle as Ta, SheetTrigger as Da } from "./Sheet/Sheet.js";
|
|
66
|
+
import { Sidebar as Ma, SidebarContent as Pa, SidebarFooter as va, SidebarGroup as Ia, SidebarGroupAction as Aa, SidebarGroupContent as wa, SidebarGroupLabel as ha, SidebarHeader as Fa, SidebarInput as La, SidebarInset as Ba, SidebarMenu as Ra, SidebarMenuAction as Ga, SidebarMenuBadge as ka, SidebarMenuButton as Ha, SidebarMenuItem as ya, SidebarMenuSkeleton as Na, SidebarMenuSub as Oa, SidebarMenuSubButton as Va, SidebarMenuSubItem as Ea, SidebarProvider as za, SidebarRail as _a, SidebarSeparator as Ua, SidebarTrigger as Ya, useSidebar as ja } from "./Sidebar/Sidebar.js";
|
|
67
|
+
import { Skeleton as Ja } from "./Skeleton/Skeleton.js";
|
|
68
|
+
import { Slider as Qa } from "./Slider/Slider.js";
|
|
69
|
+
import { Sonner as Xa } from "./Sonner/Sonner.js";
|
|
70
|
+
import { Switch as $a } from "./Switch/Switch.js";
|
|
71
|
+
import { Table as ri, TableBody as ei, TableCaption as ti, TableCell as ai, TableFooter as ii, TableHead as ni, TableHeader as pi, TableRow as mi } from "./Table/Table.js";
|
|
72
|
+
import { TabsContent as di, TabsList as ui, TabsRoot as xi, TabsTrigger as gi } from "./Tabs/TabsRoot.js";
|
|
73
|
+
import { TabRender as fi, Tabs as si } from "./Tabs/Tabs.js";
|
|
74
|
+
import { Textarea as Ci } from "./Textarea/Textarea.js";
|
|
75
|
+
import { ThemeProvider as Di } from "./Theme/ThemeProvider.js";
|
|
76
|
+
import { ThemeModeToggle as Mi } from "./Theme/ThemeModeToggle.js";
|
|
77
|
+
import { Toast as vi, ToastAction as Ii, ToastClose as Ai, ToastDescription as wi, ToastProvider as hi, ToastTitle as Fi, ToastViewport as Li } from "./Toast/Toast.js";
|
|
78
|
+
import { reducer as Ri, toast as Gi, useNotify as ki, useToast as Hi } from "./Toast/useToast.js";
|
|
79
|
+
import { Toaster as Ni } from "./Toaster/Toaster.js";
|
|
80
|
+
import { Toggle as Vi, toggleVariants as Ei } from "./Toggle/Toggle.js";
|
|
81
|
+
import { ToggleGroup as _i, ToggleGroupItem as Ui } from "./ToggleGroup/ToggleGroup.js";
|
|
82
|
+
import { TooltipContent as ji, TooltipProvider as qi, TooltipRoot as Ji, TooltipTrigger as Ki } from "./Tooltip/TooltipRoot.js";
|
|
83
|
+
import { Tooltip as Wi, TooltipInner as Xi } from "./Tooltip/Tooltip.js";
|
|
84
|
+
import { Dropzone as $i } from "./Dropzone/Dropzone.js";
|
|
85
|
+
import { DEFAULT_FILE_TYPES as rn, DEFAULT_IMAGES_TYPES as en } from "./Dropzone/Dropzone.types.js";
|
|
86
|
+
import { FormDropzone as an } from "./FormDropzone/FormDropzone.js";
|
|
87
|
+
import { TablePagination as pn } from "./TablePagination/TablePagination.js";
|
|
88
|
+
import { Command as ln } from "cmdk";
|
|
88
89
|
import * as o from "@radix-ui/react-dialog";
|
|
89
90
|
import * as r from "@radix-ui/react-dropdown-menu";
|
|
90
91
|
import * as e from "@radix-ui/react-label";
|
|
@@ -100,7 +101,7 @@ export {
|
|
|
100
101
|
g as AccordionTrigger,
|
|
101
102
|
f as Alert,
|
|
102
103
|
s as AlertDescription,
|
|
103
|
-
|
|
104
|
+
B as AlertDialog,
|
|
104
105
|
T as AlertDialogAction,
|
|
105
106
|
D as AlertDialogCancel,
|
|
106
107
|
c as AlertDialogContent,
|
|
@@ -121,7 +122,7 @@ export {
|
|
|
121
122
|
_ as AvatarFallback,
|
|
122
123
|
U as AvatarImage,
|
|
123
124
|
j as Badge,
|
|
124
|
-
|
|
125
|
+
Pe as BaseInput,
|
|
125
126
|
Q as Breadcrumb,
|
|
126
127
|
W as BreadcrumbEllipsis,
|
|
127
128
|
X as BreadcrumbItem,
|
|
@@ -146,8 +147,8 @@ export {
|
|
|
146
147
|
ho as ChartContainer,
|
|
147
148
|
Fo as ChartLegend,
|
|
148
149
|
Lo as ChartLegendContent,
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
Bo as ChartStyle,
|
|
151
|
+
Ro as ChartTooltip,
|
|
151
152
|
Go as ChartTooltipContent,
|
|
152
153
|
Ho as Checkbox,
|
|
153
154
|
yo as CheckboxLabel,
|
|
@@ -162,11 +163,11 @@ export {
|
|
|
162
163
|
Ko as CommandInput,
|
|
163
164
|
Qo as CommandItem,
|
|
164
165
|
Wo as CommandList,
|
|
165
|
-
|
|
166
|
+
ln as CommandPrimitive,
|
|
166
167
|
Xo as CommandSeparator,
|
|
167
168
|
Zo as CommandShortcut,
|
|
168
|
-
|
|
169
|
-
|
|
169
|
+
rn as DEFAULT_FILE_TYPES,
|
|
170
|
+
en as DEFAULT_IMAGES_TYPES,
|
|
170
171
|
or as DataTable,
|
|
171
172
|
er as DatePicker,
|
|
172
173
|
ar as Dialog,
|
|
@@ -193,8 +194,8 @@ export {
|
|
|
193
194
|
wr as DrawerTitle,
|
|
194
195
|
hr as DrawerTrigger,
|
|
195
196
|
Lr as DropdownMenu,
|
|
196
|
-
|
|
197
|
-
|
|
197
|
+
Br as DropdownMenuCheckboxItem,
|
|
198
|
+
Rr as DropdownMenuContent,
|
|
198
199
|
Gr as DropdownMenuGroup,
|
|
199
200
|
kr as DropdownMenuItem,
|
|
200
201
|
Hr as DropdownMenuLabel,
|
|
@@ -208,14 +209,14 @@ export {
|
|
|
208
209
|
_r as DropdownMenuSubContent,
|
|
209
210
|
Ur as DropdownMenuSubTrigger,
|
|
210
211
|
Yr as DropdownMenuTrigger,
|
|
211
|
-
|
|
212
|
+
$i as Dropzone,
|
|
212
213
|
qr as Form,
|
|
213
214
|
te as FormCheckbox,
|
|
214
215
|
ie as FormCombobox,
|
|
215
216
|
Jr as FormControl,
|
|
216
217
|
pe as FormDatePicker,
|
|
217
218
|
Kr as FormDescription,
|
|
218
|
-
|
|
219
|
+
an as FormDropzone,
|
|
219
220
|
Qr as FormField,
|
|
220
221
|
le as FormInput,
|
|
221
222
|
Wr as FormItem,
|
|
@@ -228,167 +229,168 @@ export {
|
|
|
228
229
|
Se as HoverCard,
|
|
229
230
|
Ce as HoverCardContent,
|
|
230
231
|
Te as HoverCardTrigger,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
Le as
|
|
232
|
+
ce as InfoBlock,
|
|
233
|
+
ve as Input,
|
|
234
|
+
we as InputOTP,
|
|
235
|
+
he as InputOTPGroup,
|
|
236
|
+
Fe as InputOTPSeparator,
|
|
237
|
+
Le as InputOTPSlot,
|
|
238
|
+
Re as Label,
|
|
237
239
|
e as LabelPrimitive,
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
240
|
+
ye as LazyLoader,
|
|
241
|
+
Oe as LoadedIcon,
|
|
242
|
+
Ee as LoadingMask,
|
|
243
|
+
Ye as LoadingProgress,
|
|
244
|
+
Ke as Menubar,
|
|
245
|
+
Qe as MenubarCheckboxItem,
|
|
246
|
+
We as MenubarContent,
|
|
247
|
+
Xe as MenubarGroup,
|
|
248
|
+
Ze as MenubarItem,
|
|
249
|
+
$e as MenubarLabel,
|
|
250
|
+
ot as MenubarMenu,
|
|
251
|
+
rt as MenubarPortal,
|
|
252
|
+
et as MenubarRadioGroup,
|
|
253
|
+
tt as MenubarRadioItem,
|
|
254
|
+
at as MenubarSeparator,
|
|
255
|
+
it as MenubarShortcut,
|
|
256
|
+
nt as MenubarSub,
|
|
257
|
+
pt as MenubarSubContent,
|
|
258
|
+
mt as MenubarSubTrigger,
|
|
259
|
+
lt as MenubarTrigger,
|
|
260
|
+
ut as NavigationMenu,
|
|
261
|
+
xt as NavigationMenuContent,
|
|
262
|
+
gt as NavigationMenuIndicator,
|
|
263
|
+
bt as NavigationMenuItem,
|
|
264
|
+
ft as NavigationMenuLink,
|
|
265
|
+
st as NavigationMenuList,
|
|
266
|
+
St as NavigationMenuTrigger,
|
|
267
|
+
Ct as NavigationMenuViewport,
|
|
268
|
+
Mt as Pagination,
|
|
269
|
+
Pt as PaginationContent,
|
|
270
|
+
vt as PaginationEllipsis,
|
|
271
|
+
It as PaginationItem,
|
|
272
|
+
At as PaginationLink,
|
|
273
|
+
wt as PaginationNext,
|
|
274
|
+
ht as PaginationPrevious,
|
|
275
|
+
Ie as PasswordInput,
|
|
276
|
+
Lt as Popover,
|
|
277
|
+
Bt as PopoverAnchor,
|
|
278
|
+
Rt as PopoverContent,
|
|
277
279
|
t as PopoverPrimitive,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
+
Gt as PopoverTrigger,
|
|
281
|
+
Ht as Progress,
|
|
280
282
|
a as ProgressPrimitive,
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
283
|
+
Nt as RadioGroup,
|
|
284
|
+
Ot as RadioGroupItem,
|
|
285
|
+
Vt as RadioGroupLabel,
|
|
286
|
+
_e as RenderLoadingMask,
|
|
287
|
+
zt as ResizableHandle,
|
|
288
|
+
_t as ResizablePanel,
|
|
289
|
+
Ut as ResizablePanelGroup,
|
|
290
|
+
jt as ScrollArea,
|
|
289
291
|
i as ScrollAreaPrimitive,
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
292
|
+
qt as ScrollBar,
|
|
293
|
+
Kt as Search,
|
|
294
|
+
pa as Select,
|
|
295
|
+
Wt as SelectContent,
|
|
296
|
+
Xt as SelectGroup,
|
|
297
|
+
Zt as SelectItem,
|
|
298
|
+
$t as SelectLabel,
|
|
297
299
|
n as SelectPrimitive,
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
300
|
+
oa as SelectRoot,
|
|
301
|
+
ra as SelectScrollDownButton,
|
|
302
|
+
ea as SelectScrollUpButton,
|
|
303
|
+
ta as SelectSeparator,
|
|
304
|
+
aa as SelectTrigger,
|
|
305
|
+
ia as SelectValue,
|
|
306
|
+
la as Separator,
|
|
307
|
+
ua as Sheet,
|
|
308
|
+
xa as SheetClose,
|
|
309
|
+
ga as SheetContent,
|
|
310
|
+
ba as SheetDescription,
|
|
311
|
+
fa as SheetFooter,
|
|
312
|
+
sa as SheetHeader,
|
|
313
|
+
Sa as SheetOverlay,
|
|
314
|
+
Ca as SheetPortal,
|
|
315
|
+
Ta as SheetTitle,
|
|
316
|
+
Da as SheetTrigger,
|
|
317
|
+
Ma as Sidebar,
|
|
318
|
+
Pa as SidebarContent,
|
|
319
|
+
va as SidebarFooter,
|
|
320
|
+
Ia as SidebarGroup,
|
|
321
|
+
Aa as SidebarGroupAction,
|
|
322
|
+
wa as SidebarGroupContent,
|
|
323
|
+
ha as SidebarGroupLabel,
|
|
324
|
+
Fa as SidebarHeader,
|
|
325
|
+
La as SidebarInput,
|
|
326
|
+
Ba as SidebarInset,
|
|
327
|
+
Ra as SidebarMenu,
|
|
328
|
+
Ga as SidebarMenuAction,
|
|
329
|
+
ka as SidebarMenuBadge,
|
|
330
|
+
Ha as SidebarMenuButton,
|
|
331
|
+
ya as SidebarMenuItem,
|
|
332
|
+
Na as SidebarMenuSkeleton,
|
|
333
|
+
Oa as SidebarMenuSub,
|
|
334
|
+
Va as SidebarMenuSubButton,
|
|
335
|
+
Ea as SidebarMenuSubItem,
|
|
336
|
+
za as SidebarProvider,
|
|
337
|
+
_a as SidebarRail,
|
|
338
|
+
Ua as SidebarSeparator,
|
|
339
|
+
Ya as SidebarTrigger,
|
|
340
|
+
Ja as Skeleton,
|
|
341
|
+
Qa as Slider,
|
|
342
|
+
Xa as Sonner,
|
|
343
|
+
$a as Switch,
|
|
344
|
+
fi as TabRender,
|
|
345
|
+
ri as Table,
|
|
346
|
+
ei as TableBody,
|
|
347
|
+
ti as TableCaption,
|
|
348
|
+
ai as TableCell,
|
|
349
|
+
ii as TableFooter,
|
|
350
|
+
ni as TableHead,
|
|
351
|
+
pi as TableHeader,
|
|
352
|
+
pn as TablePagination,
|
|
353
|
+
mi as TableRow,
|
|
354
|
+
si as Tabs,
|
|
355
|
+
di as TabsContent,
|
|
356
|
+
ui as TabsList,
|
|
357
|
+
xi as TabsRoot,
|
|
358
|
+
gi as TabsTrigger,
|
|
359
|
+
Ci as Textarea,
|
|
360
|
+
Mi as ThemeModeToggle,
|
|
361
|
+
Di as ThemeProvider,
|
|
362
|
+
vi as Toast,
|
|
363
|
+
Ii as ToastAction,
|
|
364
|
+
Ai as ToastClose,
|
|
365
|
+
wi as ToastDescription,
|
|
366
|
+
hi as ToastProvider,
|
|
367
|
+
Fi as ToastTitle,
|
|
368
|
+
Li as ToastViewport,
|
|
369
|
+
Ni as Toaster,
|
|
370
|
+
Vi as Toggle,
|
|
371
|
+
_i as ToggleGroup,
|
|
372
|
+
Ui as ToggleGroupItem,
|
|
373
|
+
Wi as Tooltip,
|
|
374
|
+
ji as TooltipContent,
|
|
375
|
+
Xi as TooltipInner,
|
|
374
376
|
p as TooltipPrimitive,
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
377
|
+
qi as TooltipProvider,
|
|
378
|
+
Ji as TooltipRoot,
|
|
379
|
+
Ki as TooltipTrigger,
|
|
378
380
|
J as badgeVariants,
|
|
379
381
|
io as buttonBadgeVariants,
|
|
380
382
|
uo as buttonIconVariants,
|
|
381
383
|
no as buttonVariants,
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
384
|
+
ke as labelVariants,
|
|
385
|
+
qe as loadingProgressVariants,
|
|
386
|
+
Dt as navigationMenuVariants,
|
|
387
|
+
Ri as reducer,
|
|
388
|
+
Gi as toast,
|
|
389
|
+
Ei as toggleVariants,
|
|
388
390
|
Sr as useDialogOverlayContainer,
|
|
389
391
|
$r as useFormField,
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
392
|
+
ki as useNotify,
|
|
393
|
+
ja as useSidebar,
|
|
394
|
+
Hi as useToast
|
|
393
395
|
};
|
|
394
396
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneplatformdev/ui",
|
|
3
|
-
"version": "0.1.99-beta.
|
|
3
|
+
"version": "0.1.99-beta.45",
|
|
4
4
|
"description": "UI component library for OnePlatform",
|
|
5
5
|
"author": "One Platform Development Team",
|
|
6
6
|
"keywords": [
|
|
@@ -105,9 +105,9 @@
|
|
|
105
105
|
"recharts": "^3.2.0",
|
|
106
106
|
"sonner": "^2.0.7",
|
|
107
107
|
"vaul": "^1.1.2",
|
|
108
|
-
"@oneplatformdev/
|
|
109
|
-
"@oneplatformdev/
|
|
110
|
-
"@oneplatformdev/utils": "^0.1.99-beta.
|
|
108
|
+
"@oneplatformdev/hooks": "^0.1.99-beta.45",
|
|
109
|
+
"@oneplatformdev/tokens": "^0.1.99-beta.45",
|
|
110
|
+
"@oneplatformdev/utils": "^0.1.99-beta.45"
|
|
111
111
|
},
|
|
112
112
|
"scripts": {
|
|
113
113
|
"chromatic": "chromatic"
|