@oneplatformdev/ui 0.0.1-beta.4 → 0.0.1-beta.5
Sign up to get free protection for your applications and to get access to all the features.
- package/AlertDialog/AlertDialog.d.ts +14 -0
- package/FormInput/FormInput.mjs +6 -7
- package/Input/index.d.ts +0 -1
- package/Input/index.mjs +5 -7
- package/Search/Search.mjs +5 -6
- package/Sidebar/Sidebar.mjs +0 -1
- package/index.mjs +181 -183
- package/package.json +1 -1
@@ -6,6 +6,10 @@ import { FC, PropsWithChildren } from 'react';
|
|
6
6
|
* @public
|
7
7
|
* @see [Documentation](#)
|
8
8
|
* @example
|
9
|
+
* > Import:
|
10
|
+
* ```tsx
|
11
|
+
* import { AlertDialog } from '@oneplatformdev/ui/AlertDialog';
|
12
|
+
* ```
|
9
13
|
* > Simple example:
|
10
14
|
* ```tsx
|
11
15
|
* <AlertDialog
|
@@ -25,6 +29,16 @@ import { FC, PropsWithChildren } from 'react';
|
|
25
29
|
* onConfirm={(event) => console.log(event, 'Confirm')}
|
26
30
|
* />
|
27
31
|
* ```
|
32
|
+
* > Trigger example: Button with icon children
|
33
|
+
* ```tsx
|
34
|
+
* <AlertDialog
|
35
|
+
* trigger={<Button variant="outline" size="icon"><PencilLine /></Button>}
|
36
|
+
* title="Dialog title with icon trigger"
|
37
|
+
* description="Description text..."
|
38
|
+
* onCancel={(event) => console.log(event, 'Cancel')}
|
39
|
+
* onConfirm={(event) => console.log(event, 'Confirm')}
|
40
|
+
* />
|
41
|
+
* ```
|
28
42
|
*
|
29
43
|
* > Full content example:
|
30
44
|
* ```tsx
|
package/FormInput/FormInput.mjs
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
2
2
|
import { FormControl as l } from "../Form/Form.mjs";
|
3
|
-
import { FormRenderControl as
|
4
|
-
import { Input as
|
5
|
-
|
6
|
-
const d = (m) => {
|
3
|
+
import { FormRenderControl as u } from "../Form/FormRenderControl.mjs";
|
4
|
+
import { Input as a } from "../Input/Input.mjs";
|
5
|
+
const F = (m) => {
|
7
6
|
const { form: t, label: e, name: n, ...p } = m;
|
8
7
|
return /* @__PURE__ */ r(
|
9
|
-
|
8
|
+
u,
|
10
9
|
{
|
11
10
|
form: t,
|
12
11
|
name: n,
|
13
12
|
label: e,
|
14
13
|
render: ({ field: o }) => /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
|
15
|
-
|
14
|
+
a,
|
16
15
|
{
|
17
16
|
...o,
|
18
17
|
value: o.value || "",
|
@@ -23,5 +22,5 @@ const d = (m) => {
|
|
23
22
|
);
|
24
23
|
};
|
25
24
|
export {
|
26
|
-
|
25
|
+
F as FormInput
|
27
26
|
};
|
package/Input/index.d.ts
CHANGED
package/Input/index.mjs
CHANGED
@@ -1,9 +1,7 @@
|
|
1
|
-
import { BaseInput as
|
2
|
-
import { inputVariants as s } from "./inputVariants.mjs";
|
1
|
+
import { BaseInput as u, Input as a, PasswordInput as n, Input as s } from "./Input.mjs";
|
3
2
|
export {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
s as inputVariants
|
3
|
+
u as BaseInput,
|
4
|
+
a as Input,
|
5
|
+
n as PasswordInput,
|
6
|
+
s as default
|
9
7
|
};
|
package/Search/Search.mjs
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
2
2
|
import { useState as S } from "react";
|
3
3
|
import { Input as f } from "../Input/Input.mjs";
|
4
|
-
import "../Input/inputVariants.mjs";
|
5
4
|
import { useDebounceCallback as v } from "@oneplatformdev/hooks";
|
6
5
|
import { cn as d } from "@oneplatformdev/utils";
|
7
|
-
const
|
6
|
+
const j = (t) => {
|
8
7
|
const {
|
9
8
|
search: a,
|
10
9
|
onChange: e,
|
@@ -12,20 +11,20 @@ const k = (t) => {
|
|
12
11
|
placeholder: s = "Search",
|
13
12
|
className: n,
|
14
13
|
...m
|
15
|
-
} = t, [i, l] = S(a),
|
14
|
+
} = t, [i, l] = S(a), h = v(c, 1e3), p = (r) => {
|
16
15
|
const u = r.target.value;
|
17
|
-
l(u), e == null || e(r),
|
16
|
+
l(u), e == null || e(r), h(r.target.value);
|
18
17
|
};
|
19
18
|
return /* @__PURE__ */ o("div", { className: d("space-y-4", n), children: /* @__PURE__ */ o(
|
20
19
|
f,
|
21
20
|
{
|
22
21
|
placeholder: s,
|
23
22
|
value: i,
|
24
|
-
onChange:
|
23
|
+
onChange: p,
|
25
24
|
...m
|
26
25
|
}
|
27
26
|
) });
|
28
27
|
};
|
29
28
|
export {
|
30
|
-
|
29
|
+
j as Search
|
31
30
|
};
|
package/Sidebar/Sidebar.mjs
CHANGED
@@ -7,7 +7,6 @@ import { cn as d } from "@oneplatformdev/utils";
|
|
7
7
|
import { Button as E } from "../Button/Button.mjs";
|
8
8
|
import "../Button/buttonVariants.mjs";
|
9
9
|
import { Input as z } from "../Input/Input.mjs";
|
10
|
-
import "../Input/inputVariants.mjs";
|
11
10
|
import { Separator as B } from "../Separator/Separator.mjs";
|
12
11
|
import { Sheet as T, SheetContent as A } from "../Sheet/Sheet.mjs";
|
13
12
|
import { Skeleton as M } from "../Skeleton/Skeleton.mjs";
|
package/index.mjs
CHANGED
@@ -38,46 +38,45 @@ import { FormTextarea as $o } from "./FormTextarea/FormTextarea.mjs";
|
|
38
38
|
import { Header as oe } from "./Header/Header.mjs";
|
39
39
|
import { HoverCard as te, HoverCardContent as ae, HoverCardTrigger as ne } from "./HoverCard/HoverCard.mjs";
|
40
40
|
import { BaseInput as pe, Input as le, PasswordInput as me } from "./Input/Input.mjs";
|
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 { Tooltip as Bn } from "./Tooltip/Tooltip.mjs";
|
41
|
+
import { InputOTP as de, InputOTPGroup as ge, InputOTPSeparator as be, InputOTPSlot as xe } from "./InputOTP/InputOTP.mjs";
|
42
|
+
import { Label as Se } from "./Label/Label.mjs";
|
43
|
+
import { labelVariants as Ce } from "./Label/labelVariants.mjs";
|
44
|
+
import { LazyLoader as ce } from "./LazyLoader/LazyLoader.mjs";
|
45
|
+
import { LoadingMask as Me } from "./LoadingMask/LoadingMask.mjs";
|
46
|
+
import { LoadingProgress as Ie } from "./LoadingProgress/LoadingProgress.mjs";
|
47
|
+
import { loadingProgressVariants as we } from "./LoadingProgress/loadingProgressVariants.mjs";
|
48
|
+
import { Menubar as ve, MenubarCheckboxItem as Fe, MenubarContent as Le, MenubarGroup as Be, MenubarItem as Re, MenubarLabel as Ge, MenubarMenu as ke, MenubarPortal as He, MenubarRadioGroup as Ne, MenubarRadioItem as Ve, MenubarSeparator as ye, MenubarShortcut as Oe, MenubarSub as ze, MenubarSubContent as Ee, MenubarSubTrigger as Ue, MenubarTrigger as je } from "./Menubar/Menubar.mjs";
|
49
|
+
import { NavigationMenu as Je, NavigationMenuContent as Ke, NavigationMenuIndicator as Qe, NavigationMenuItem as We, NavigationMenuLink as Xe, NavigationMenuList as Ye, NavigationMenuTrigger as Ze, NavigationMenuViewport as _e } from "./NavigationMenu/NavigationMenu.mjs";
|
50
|
+
import { navigationMenuVariants as rt } from "./NavigationMenu/navigationMenuVariants.mjs";
|
51
|
+
import { Pagination as et, PaginationContent as tt, PaginationEllipsis as at, PaginationItem as nt, PaginationLink as it, PaginationNext as pt, PaginationPrevious as lt } from "./Pagination/Pagination.mjs";
|
52
|
+
import { Popover as ut, PopoverAnchor as dt, PopoverContent as gt, PopoverTrigger as bt } from "./Popover/Popover.mjs";
|
53
|
+
import { Progress as ft } from "./Progress/Progress.mjs";
|
54
|
+
import { RadioGroup as st, RadioGroupItem as Ct } from "./RadioGroup/RadioGroup.mjs";
|
55
|
+
import { ResizableHandle as ct, ResizablePanel as Dt, ResizablePanelGroup as Mt } from "./Resizable/Resizable.mjs";
|
56
|
+
import { ScrollArea as It, ScrollBar as At } from "./ScrollArea/ScrollArea.mjs";
|
57
|
+
import { Search as ht } from "./Search/Search.mjs";
|
58
|
+
import { SelectContent as Ft, SelectGroup as Lt, SelectItem as Bt, SelectLabel as Rt, SelectRoot as Gt, SelectScrollDownButton as kt, SelectScrollUpButton as Ht, SelectSeparator as Nt, SelectTrigger as Vt, SelectValue as yt } from "./Select/SelectRoot.mjs";
|
59
|
+
import { Select as zt } from "./Select/Select.mjs";
|
60
|
+
import { Separator as Ut } from "./Separator/Separator.mjs";
|
61
|
+
import { Sheet as qt, SheetClose as Jt, SheetContent as Kt, SheetDescription as Qt, SheetFooter as Wt, SheetHeader as Xt, SheetOverlay as Yt, SheetPortal as Zt, SheetTitle as _t, SheetTrigger as $t } from "./Sheet/Sheet.mjs";
|
62
|
+
import { Sidebar as oa, SidebarContent as ea, SidebarFooter as ta, SidebarGroup as aa, SidebarGroupAction as na, SidebarGroupContent as ia, SidebarGroupLabel as pa, SidebarHeader as la, SidebarInput as ma, SidebarInset as ua, SidebarMenu as da, SidebarMenuAction as ga, SidebarMenuBadge as ba, SidebarMenuButton as xa, SidebarMenuItem as fa, SidebarMenuSkeleton as Sa, SidebarMenuSub as sa, SidebarMenuSubButton as Ca, SidebarMenuSubItem as Ta, SidebarProvider as ca, SidebarRail as Da, SidebarSeparator as Ma, SidebarTrigger as Pa, useSidebar as Ia } from "./Sidebar/Sidebar.mjs";
|
63
|
+
import { Skeleton as wa } from "./Skeleton/Skeleton.mjs";
|
64
|
+
import { Slider as va } from "./Slider/Slider.mjs";
|
65
|
+
import { Sonner as La } from "./Sonner/Sonner.mjs";
|
66
|
+
import { Switch as Ra } from "./Switch/Switch.mjs";
|
67
|
+
import { Table as ka, TableBody as Ha, TableCaption as Na, TableCell as Va, TableFooter as ya, TableHead as Oa, TableHeader as za, TableRow as Ea } from "./Table/Table.mjs";
|
68
|
+
import { TabsContent as ja, TabsList as qa, TabsRoot as Ja, TabsTrigger as Ka } from "./Tabs/TabsRoot.mjs";
|
69
|
+
import { Tabs as Wa } from "./Tabs/Tabs.mjs";
|
70
|
+
import { Textarea as Ya } from "./Textarea/Textarea.mjs";
|
71
|
+
import { ThemeProvider as _a } from "./Theme/ThemeProvider.mjs";
|
72
|
+
import { ThemeModeToggle as rn } from "./Theme/ThemeModeToggle.mjs";
|
73
|
+
import { Toast as en, ToastAction as tn, ToastClose as an, ToastDescription as nn, ToastProvider as pn, ToastTitle as ln, ToastViewport as mn } from "./Toast/Toast.mjs";
|
74
|
+
import { reducer as dn, toast as gn, useNotify as bn, useToast as xn } from "./Toast/useToast.mjs";
|
75
|
+
import { Toaster as Sn } from "./Toaster/Toaster.mjs";
|
76
|
+
import { Toggle as Cn, toggleVariants as Tn } from "./Toggle/Toggle.mjs";
|
77
|
+
import { ToggleGroup as Dn, ToggleGroupItem as Mn } from "./ToggleGroup/ToggleGroup.mjs";
|
78
|
+
import { TooltipContent as In, TooltipProvider as An, TooltipRoot as wn, TooltipTrigger as hn } from "./Tooltip/TooltipRoot.mjs";
|
79
|
+
import { Tooltip as Fn } from "./Tooltip/Tooltip.mjs";
|
81
80
|
export {
|
82
81
|
e as Accordion,
|
83
82
|
t as AccordionContent,
|
@@ -204,152 +203,151 @@ export {
|
|
204
203
|
ae as HoverCardContent,
|
205
204
|
ne as HoverCardTrigger,
|
206
205
|
le as Input,
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
206
|
+
de as InputOTP,
|
207
|
+
ge as InputOTPGroup,
|
208
|
+
be as InputOTPSeparator,
|
209
|
+
xe as InputOTPSlot,
|
210
|
+
Se as Label,
|
211
|
+
ce as LazyLoader,
|
212
|
+
Me as LoadingMask,
|
213
|
+
Ie as LoadingProgress,
|
214
|
+
ve as Menubar,
|
215
|
+
Fe as MenubarCheckboxItem,
|
216
|
+
Le as MenubarContent,
|
217
|
+
Be as MenubarGroup,
|
218
|
+
Re as MenubarItem,
|
219
|
+
Ge as MenubarLabel,
|
220
|
+
ke as MenubarMenu,
|
221
|
+
He as MenubarPortal,
|
222
|
+
Ne as MenubarRadioGroup,
|
223
|
+
Ve as MenubarRadioItem,
|
224
|
+
ye as MenubarSeparator,
|
225
|
+
Oe as MenubarShortcut,
|
226
|
+
ze as MenubarSub,
|
227
|
+
Ee as MenubarSubContent,
|
228
|
+
Ue as MenubarSubTrigger,
|
229
|
+
je as MenubarTrigger,
|
230
|
+
Je as NavigationMenu,
|
231
|
+
Ke as NavigationMenuContent,
|
232
|
+
Qe as NavigationMenuIndicator,
|
233
|
+
We as NavigationMenuItem,
|
234
|
+
Xe as NavigationMenuLink,
|
235
|
+
Ye as NavigationMenuList,
|
236
|
+
Ze as NavigationMenuTrigger,
|
237
|
+
_e as NavigationMenuViewport,
|
238
|
+
et as Pagination,
|
239
|
+
tt as PaginationContent,
|
240
|
+
at as PaginationEllipsis,
|
241
|
+
nt as PaginationItem,
|
242
|
+
it as PaginationLink,
|
243
|
+
pt as PaginationNext,
|
244
|
+
lt as PaginationPrevious,
|
246
245
|
me as PasswordInput,
|
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
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
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
|
-
|
246
|
+
ut as Popover,
|
247
|
+
dt as PopoverAnchor,
|
248
|
+
gt as PopoverContent,
|
249
|
+
bt as PopoverTrigger,
|
250
|
+
ft as Progress,
|
251
|
+
st as RadioGroup,
|
252
|
+
Ct as RadioGroupItem,
|
253
|
+
ct as ResizableHandle,
|
254
|
+
Dt as ResizablePanel,
|
255
|
+
Mt as ResizablePanelGroup,
|
256
|
+
It as ScrollArea,
|
257
|
+
At as ScrollBar,
|
258
|
+
ht as Search,
|
259
|
+
zt as Select,
|
260
|
+
Ft as SelectContent,
|
261
|
+
Lt as SelectGroup,
|
262
|
+
Bt as SelectItem,
|
263
|
+
Rt as SelectLabel,
|
264
|
+
Gt as SelectRoot,
|
265
|
+
kt as SelectScrollDownButton,
|
266
|
+
Ht as SelectScrollUpButton,
|
267
|
+
Nt as SelectSeparator,
|
268
|
+
Vt as SelectTrigger,
|
269
|
+
yt as SelectValue,
|
270
|
+
Ut as Separator,
|
271
|
+
qt as Sheet,
|
272
|
+
Jt as SheetClose,
|
273
|
+
Kt as SheetContent,
|
274
|
+
Qt as SheetDescription,
|
275
|
+
Wt as SheetFooter,
|
276
|
+
Xt as SheetHeader,
|
277
|
+
Yt as SheetOverlay,
|
278
|
+
Zt as SheetPortal,
|
279
|
+
_t as SheetTitle,
|
280
|
+
$t as SheetTrigger,
|
281
|
+
oa as Sidebar,
|
282
|
+
ea as SidebarContent,
|
283
|
+
ta as SidebarFooter,
|
284
|
+
aa as SidebarGroup,
|
285
|
+
na as SidebarGroupAction,
|
286
|
+
ia as SidebarGroupContent,
|
287
|
+
pa as SidebarGroupLabel,
|
288
|
+
la as SidebarHeader,
|
289
|
+
ma as SidebarInput,
|
290
|
+
ua as SidebarInset,
|
291
|
+
da as SidebarMenu,
|
292
|
+
ga as SidebarMenuAction,
|
293
|
+
ba as SidebarMenuBadge,
|
294
|
+
xa as SidebarMenuButton,
|
295
|
+
fa as SidebarMenuItem,
|
296
|
+
Sa as SidebarMenuSkeleton,
|
297
|
+
sa as SidebarMenuSub,
|
298
|
+
Ca as SidebarMenuSubButton,
|
299
|
+
Ta as SidebarMenuSubItem,
|
300
|
+
ca as SidebarProvider,
|
301
|
+
Da as SidebarRail,
|
302
|
+
Ma as SidebarSeparator,
|
303
|
+
Pa as SidebarTrigger,
|
304
|
+
wa as Skeleton,
|
305
|
+
va as Slider,
|
306
|
+
La as Sonner,
|
307
|
+
Ra as Switch,
|
308
|
+
ka as Table,
|
309
|
+
Ha as TableBody,
|
310
|
+
Na as TableCaption,
|
311
|
+
Va as TableCell,
|
312
|
+
ya as TableFooter,
|
313
|
+
Oa as TableHead,
|
314
|
+
za as TableHeader,
|
315
|
+
Ea as TableRow,
|
316
|
+
Wa as Tabs,
|
317
|
+
ja as TabsContent,
|
318
|
+
qa as TabsList,
|
319
|
+
Ja as TabsRoot,
|
320
|
+
Ka as TabsTrigger,
|
321
|
+
Ya as Textarea,
|
322
|
+
rn as ThemeModeToggle,
|
323
|
+
_a as ThemeProvider,
|
324
|
+
en as Toast,
|
325
|
+
tn as ToastAction,
|
326
|
+
an as ToastClose,
|
327
|
+
nn as ToastDescription,
|
328
|
+
pn as ToastProvider,
|
329
|
+
ln as ToastTitle,
|
330
|
+
mn as ToastViewport,
|
331
|
+
Sn as Toaster,
|
332
|
+
Cn as Toggle,
|
333
|
+
Dn as ToggleGroup,
|
334
|
+
Mn as ToggleGroupItem,
|
335
|
+
Fn as Tooltip,
|
336
|
+
In as TooltipContent,
|
337
|
+
An as TooltipProvider,
|
338
|
+
wn as TooltipRoot,
|
339
|
+
hn as TooltipTrigger,
|
341
340
|
O as badgeVariants,
|
342
341
|
or as buttonIconVariants,
|
343
342
|
Z as buttonVariants,
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
Dn as toggleVariants,
|
343
|
+
Ce as labelVariants,
|
344
|
+
we as loadingProgressVariants,
|
345
|
+
rt as navigationMenuVariants,
|
346
|
+
dn as reducer,
|
347
|
+
gn as toast,
|
348
|
+
Tn as toggleVariants,
|
351
349
|
Oo as useFormField,
|
352
|
-
|
353
|
-
|
354
|
-
|
350
|
+
bn as useNotify,
|
351
|
+
Ia as useSidebar,
|
352
|
+
xn as useToast
|
355
353
|
};
|