@devalok/shilp-sutra 0.43.0 → 0.44.0
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/MIGRATION.md +46 -0
- package/dist/_chunks/chat.js +163 -162
- package/dist/_chunks/chat.js.map +1 -1
- package/dist/_chunks/mention-suggestion.js +34 -32
- package/dist/_chunks/mention-suggestion.js.map +1 -1
- package/dist/_chunks/oauth-button.js +102 -97
- package/dist/_chunks/oauth-button.js.map +1 -1
- package/dist/_chunks/tree-view.js +1 -1
- package/dist/_chunks/tree-view.js.map +1 -1
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/composed/command-palette.js +3 -3
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/content-card.d.ts +6 -0
- package/dist/composed/content-card.d.ts.map +1 -1
- package/dist/composed/content-card.js.map +1 -1
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/file-preview/audio-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +146 -142
- package/dist/composed/file-preview.js.map +1 -1
- package/dist/composed/filter-bar.js +5 -2
- package/dist/composed/filter-bar.js.map +1 -1
- package/dist/composed/master-detail.js +1 -1
- package/dist/composed/master-detail.js.map +1 -1
- package/dist/composed/page-header.js +1 -1
- package/dist/composed/page-header.js.map +1 -1
- package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/audio-player.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.js +595 -586
- package/dist/composed/rich-chat-input.js.map +1 -1
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +164 -162
- package/dist/composed/rich-text-editor.js.map +1 -1
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +101 -97
- package/dist/shell/notification-center.js.map +1 -1
- package/dist/shell/sidebar.d.ts.map +1 -1
- package/dist/shell/sidebar.js +137 -122
- package/dist/shell/sidebar.js.map +1 -1
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +86 -83
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/tokens/semantic.css +1 -0
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/avatar.js.map +1 -1
- package/dist/ui/breadcrumb.js +2 -2
- package/dist/ui/breadcrumb.js.map +1 -1
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/card.d.ts +82 -7
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +74 -108
- package/dist/ui/card.js.map +1 -1
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/combobox.js +2 -2
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/dropdown-menu.js +9 -3
- package/dist/ui/dropdown-menu.js.map +1 -1
- package/dist/ui/index.d.ts +2 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +58 -57
- package/dist/ui/index.js.map +1 -1
- package/dist/ui/menubar.js +9 -3
- package/dist/ui/menubar.js.map +1 -1
- package/dist/ui/oauth-button/oauth-button.d.ts.map +1 -1
- package/dist/ui/select.js +5 -2
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/sidebar.js +73 -73
- package/dist/ui/sidebar.js.map +1 -1
- package/dist/ui/stat-card.d.ts +8 -5
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +168 -150
- package/dist/ui/stat-card.js.map +1 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +5 -2
- package/dist/ui/tabs.js.map +1 -1
- package/dist/ui/truncated-text.d.ts +37 -0
- package/dist/ui/truncated-text.d.ts.map +1 -0
- package/dist/ui/truncated-text.js +53 -0
- package/dist/ui/truncated-text.js.map +1 -0
- package/docs/components/ui/card.md +13 -4
- package/docs/components/ui/stat-card.md +7 -2
- package/docs/components/ui/truncated-text.md +49 -0
- package/llms-full.txt +70 -7
- package/make-kit/components/card.md +14 -4
- package/package.json +1 -1
- package/skill/SKILL.md +1 -1
- package/skill/references/components-full.md +70 -7
package/dist/ui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ui/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAOH,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAC,cAAc,EAAE,MAAM,UAAU,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAC,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAClF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,YAAY,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAC,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAChI,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AACvF,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5D,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,KAAK,mBAAmB,EAAE,M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AAO,EACP,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,YAAY,EACZ,KAAK,iBAAiB,EACtB,WAAW,EACX,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,qBAAqB,EAC1B,aAAa,EACb,KAAK,kBAAkB,EACvB,eAAe,EACf,KAAK,oBAAoB,EACzB,eAAe,EACf,KAAK,oBAAoB,EACzB,iBAAiB,GAClB,MAAM,QAAQ,CAAA;AAGf,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAA;AAG7C,OAAO,EACL,aAAa,EACb,YAAY,EACZ,KAAK,EACL,KAAK,eAAe,EACpB,WAAW,EACX,KAAK,gBAAgB,EACrB,kBAAkB,EAClB,KAAK,uBAAuB,EAC5B,YAAY,EACZ,KAAK,iBAAiB,EACtB,UAAU,EACV,KAAK,eAAe,EACpB,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAA;AAGvB,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACrD,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC7D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAC1E,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAA"}
|
package/dist/ui/index.js
CHANGED
|
@@ -17,63 +17,64 @@ import { Banner as L, bannerVariants as R } from "./banner.js";
|
|
|
17
17
|
import { Breadcrumb as z, BreadcrumbEllipsis as B, BreadcrumbItem as V, BreadcrumbLink as H, BreadcrumbList as U, BreadcrumbPage as W, BreadcrumbSeparator as G } from "./breadcrumb.js";
|
|
18
18
|
import { ButtonGroup as K, useButtonGroup as q } from "./button-group.js";
|
|
19
19
|
import { Button as J, buttonVariants as Y } from "./button.js";
|
|
20
|
-
import { Card as X,
|
|
21
|
-
import { Checkbox as
|
|
22
|
-
import { Code as
|
|
23
|
-
import { Collapsible as
|
|
24
|
-
import { i as
|
|
25
|
-
import { ColorInput as
|
|
26
|
-
import { ColorSwatch as
|
|
27
|
-
import { Combobox as
|
|
28
|
-
import { Container as
|
|
29
|
-
import { ContextMenu as
|
|
30
|
-
import { Skeleton as
|
|
31
|
-
import { Table as
|
|
32
|
-
import { DropdownMenu as
|
|
33
|
-
import { DevalokGrain as
|
|
34
|
-
import { Dialog as
|
|
35
|
-
import { FileUpload as
|
|
36
|
-
import { HoverCard as
|
|
37
|
-
import { IconButton as
|
|
38
|
-
import { IconGroup as
|
|
39
|
-
import { Input as
|
|
40
|
-
import { Label as
|
|
41
|
-
import { Separator as
|
|
42
|
-
import { SplitButton as
|
|
43
|
-
import { VisuallyHidden as
|
|
44
|
-
import { NumberInput as
|
|
45
|
-
import { RadioGroup as
|
|
46
|
-
import { SearchInput as
|
|
47
|
-
import { Select as
|
|
48
|
-
import { Slider as
|
|
49
|
-
import { Switch as
|
|
50
|
-
import { Textarea as
|
|
51
|
-
import { Toggle as
|
|
52
|
-
import { ToggleGroup as
|
|
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 {
|
|
20
|
+
import { Card as X, CardAction as Z, CardContent as re, CardDescription as ie, CardFooter as ae, CardHeader as oe, CardTitle as se, cardVariants as ce } from "./card.js";
|
|
21
|
+
import { Checkbox as le } from "./checkbox.js";
|
|
22
|
+
import { Code as ue } from "./code.js";
|
|
23
|
+
import { Collapsible as de, CollapsibleContent as fe, CollapsibleTrigger as pe } from "./collapsible.js";
|
|
24
|
+
import { i as me, n as he, r as ge, t as _e } from "../_chunks/popover.js";
|
|
25
|
+
import { ColorInput as ve } from "./color-input.js";
|
|
26
|
+
import { ColorSwatch as ye } from "./color-swatch.js";
|
|
27
|
+
import { Combobox as be, comboboxTriggerVariants as xe } from "./combobox.js";
|
|
28
|
+
import { Container as Se } from "./container.js";
|
|
29
|
+
import { ContextMenu as Ce, ContextMenuCheckboxItem as we, ContextMenuContent as Te, ContextMenuGroup as Ee, ContextMenuItem as De, ContextMenuLabel as Oe, ContextMenuPortal as ke, ContextMenuRadioGroup as Ae, ContextMenuRadioItem as je, ContextMenuSeparator as Me, ContextMenuShortcut as Ne, ContextMenuSub as Pe, ContextMenuSubContent as Fe, ContextMenuSubTrigger as Ie, ContextMenuTrigger as Le } from "./context-menu.js";
|
|
30
|
+
import { Skeleton as Re, SkeletonAvatar as ze, SkeletonButton as Be, SkeletonChart as Ve, SkeletonGroup as He, SkeletonImage as Ue, SkeletonInput as We, SkeletonText as Ge, skeletonVariants as Ke } from "./skeleton.js";
|
|
31
|
+
import { Table as qe, TableBody as Je, TableCaption as Ye, TableCell as Xe, TableFooter as Ze, TableHead as Qe, TableHeader as $e, TableRow as et } from "./table.js";
|
|
32
|
+
import { DropdownMenu as tt, DropdownMenuCheckboxItem as nt, DropdownMenuContent as rt, DropdownMenuGroup as it, DropdownMenuItem as at, DropdownMenuLabel as ot, DropdownMenuPortal as st, DropdownMenuRadioGroup as ct, DropdownMenuRadioItem as lt, DropdownMenuSeparator as ut, DropdownMenuShortcut as dt, DropdownMenuSub as ft, DropdownMenuSubContent as pt, DropdownMenuSubTrigger as mt, DropdownMenuTrigger as ht } from "./dropdown-menu.js";
|
|
33
|
+
import { DevalokGrain as gt } from "./devalok-grain.js";
|
|
34
|
+
import { Dialog as _t, DialogClose as vt, DialogContent as yt, DialogContentRaw as bt, DialogDescription as xt, DialogFooter as St, DialogHeader as Ct, DialogOverlay as wt, DialogPortal as Tt, DialogTitle as Et, DialogTrigger as Dt } from "./dialog.js";
|
|
35
|
+
import { FileUpload as Ot } from "./file-upload.js";
|
|
36
|
+
import { HoverCard as kt, HoverCardContent as At, HoverCardTrigger as jt } from "./hover-card.js";
|
|
37
|
+
import { IconButton as Mt } from "./icon-button.js";
|
|
38
|
+
import { IconGroup as Nt } from "./icon-group.js";
|
|
39
|
+
import { Input as Pt, inputWrapperVariants as Ft } from "./input.js";
|
|
40
|
+
import { Label as It } from "./label.js";
|
|
41
|
+
import { Separator as Lt } from "./separator.js";
|
|
42
|
+
import { SplitButton as Rt } from "./split-button.js";
|
|
43
|
+
import { VisuallyHidden as zt } from "./visually-hidden.js";
|
|
44
|
+
import { NumberInput as Bt, numberInputWrapperVariants as Vt } from "./number-input.js";
|
|
45
|
+
import { RadioGroup as Ht, RadioGroupItem as Ut } from "./radio.js";
|
|
46
|
+
import { SearchInput as Wt } from "./search-input.js";
|
|
47
|
+
import { Select as Gt, SelectContent as Kt, SelectGroup as qt, SelectItem as Jt, SelectLabel as Yt, SelectScrollDownButton as Q, SelectScrollUpButton as Xt, SelectSeparator as Zt, SelectTrigger as Qt, SelectValue as $t, selectTriggerVariants as en } from "./select.js";
|
|
48
|
+
import { Slider as tn, sliderThumbVariants as nn, sliderTrackVariants as rn } from "./slider.js";
|
|
49
|
+
import { Switch as an } from "./switch.js";
|
|
50
|
+
import { Textarea as on, textareaVariants as sn } from "./textarea.js";
|
|
51
|
+
import { Toggle as cn, toggleVariants as ln } from "./toggle.js";
|
|
52
|
+
import { ToggleGroup as un, ToggleGroupItem as dn } from "./toggle-group.js";
|
|
53
|
+
import { Tooltip as fn, TooltipContent as pn, TooltipProvider as mn, TooltipTrigger as hn } from "./tooltip.js";
|
|
54
|
+
import { TruncatedText as gn } from "./truncated-text.js";
|
|
55
|
+
import { Sheet as _n, SheetClose as vn, SheetContent as yn, SheetDescription as bn, SheetFooter as xn, SheetHeader as Sn, SheetOverlay as Cn, SheetPortal as wn, SheetTitle as Tn, SheetTrigger as En } from "./sheet.js";
|
|
56
|
+
import { Progress as Dn, progressIndicatorVariants as On, progressTrackVariants as kn } from "./progress.js";
|
|
57
|
+
import { MultiProgressRing as An, ProgressRing as jn } from "./progress-ring.js";
|
|
58
|
+
import { StatFlash as Mn } from "./stat-flash.js";
|
|
59
|
+
import { StatCard as Nn } from "./stat-card.js";
|
|
60
|
+
import { StatusDot as Pn } from "./status-dot.js";
|
|
61
|
+
import { Menubar as Fn, MenubarCheckboxItem as In, MenubarContent as Ln, MenubarGroup as Rn, MenubarItem as zn, MenubarLabel as Bn, MenubarMenu as Vn, MenubarPortal as Hn, MenubarRadioGroup as Un, MenubarRadioItem as Wn, MenubarSeparator as Gn, MenubarShortcut as Kn, MenubarSub as qn, MenubarSubContent as Jn, MenubarSubTrigger as Yn, MenubarTrigger as Xn } from "./menubar.js";
|
|
62
|
+
import { NavigationMenu as Zn, NavigationMenuContent as Qn, NavigationMenuIndicator as $n, NavigationMenuItem as er, NavigationMenuLink as tr, NavigationMenuList as nr, NavigationMenuTrigger as rr, NavigationMenuViewport as ir } from "./navigation-menu.js";
|
|
63
|
+
import { PaginationContent as ar, PaginationEllipsis as or, PaginationItem as sr, PaginationLink as cr, PaginationNav as lr, PaginationNext as ur, PaginationPrevious as dr, PaginationRoot as fr, generatePagination as pr } from "./pagination.js";
|
|
64
|
+
import { Sidebar as mr, SidebarContent as hr, SidebarFooter as gr, SidebarGroup as _r, SidebarGroupAction as vr, SidebarGroupContent as yr, SidebarGroupLabel as br, SidebarHeader as xr, SidebarInput as Sr, SidebarInset as Cr, SidebarMenu as wr, SidebarMenuAction as Tr, SidebarMenuBadge as Er, SidebarMenuButton as Dr, SidebarMenuItem as Or, SidebarMenuSkeleton as kr, SidebarMenuSub as Ar, SidebarMenuSubButton as jr, SidebarMenuSubItem as Mr, SidebarProvider as Nr, SidebarRail as Pr, SidebarSeparator as Fr, SidebarTrigger as Ir, useSidebar as Lr } from "./sidebar.js";
|
|
65
|
+
import { Tabs as Rr, TabsContent as zr, TabsList as Br, TabsTrigger as Vr } from "./tabs.js";
|
|
66
|
+
import { Step as Hr, Stepper as Ur } from "./stepper.js";
|
|
67
|
+
import { Text as Wr, textVariants as Gr } from "./text.js";
|
|
68
|
+
import { Stack as Kr } from "./stack.js";
|
|
69
|
+
import { n as qr, r as Jr, t as Yr } from "../_chunks/tree-view.js";
|
|
70
|
+
import { SegmentedControl as Xr } from "./segmented-control.js";
|
|
71
|
+
import { a as Zr, c as Qr, i as $r, n as ei, o as ti, r as ni, s as ri, t as ii } from "../_chunks/chat.js";
|
|
72
|
+
import { Link as ai } from "./link.js";
|
|
73
|
+
import { a as oi, c as si, i as ci, n as li, o as ui, r as di, s as fi, t as pi } from "../_chunks/oauth-button.js";
|
|
74
|
+
import { formatRelativeTime as mi } from "./lib/date-utils.js";
|
|
74
75
|
//#region src/ui/lib/check-tokens.ts
|
|
75
76
|
var $ = !1;
|
|
76
|
-
function
|
|
77
|
+
function hi() {
|
|
77
78
|
if (!$ && !(typeof window > "u")) {
|
|
78
79
|
try {
|
|
79
80
|
return;
|
|
@@ -85,6 +86,6 @@ function pi() {
|
|
|
85
86
|
}
|
|
86
87
|
//#endregion
|
|
87
88
|
//#region src/ui/index.ts
|
|
88
|
-
|
|
89
|
+
hi();
|
|
89
90
|
//#endregion
|
|
90
|
-
export { s as Accordion, c as AccordionContent, l as AccordionItem, u as AccordionTrigger, S as Alert, d as AlertDialog, f as AlertDialogAction, p as AlertDialogCancel, m as AlertDialogContent, h as AlertDialogDescription, g as AlertDialogFooter, _ as AlertDialogHeader, v as AlertDialogOverlay, y as AlertDialogPortal, b as AlertDialogTitle, x as AlertDialogTrigger, w as AspectRatio, O as Autocomplete, k as Avatar, A as AvatarFallback, j as AvatarImage, P as Badge, I as BadgeGroup, N as BadgeIndicator, L as Banner, z as Breadcrumb, B as BreadcrumbEllipsis, V as BreadcrumbItem, H as BreadcrumbLink, U as BreadcrumbList, W as BreadcrumbPage, G as BreadcrumbSeparator, J as Button, K as ButtonGroup, X as Card, Z as
|
|
91
|
+
export { s as Accordion, c as AccordionContent, l as AccordionItem, u as AccordionTrigger, S as Alert, d as AlertDialog, f as AlertDialogAction, p as AlertDialogCancel, m as AlertDialogContent, h as AlertDialogDescription, g as AlertDialogFooter, _ as AlertDialogHeader, v as AlertDialogOverlay, y as AlertDialogPortal, b as AlertDialogTitle, x as AlertDialogTrigger, w as AspectRatio, O as Autocomplete, k as Avatar, A as AvatarFallback, j as AvatarImage, P as Badge, I as BadgeGroup, N as BadgeIndicator, L as Banner, z as Breadcrumb, B as BreadcrumbEllipsis, V as BreadcrumbItem, H as BreadcrumbLink, U as BreadcrumbList, W as BreadcrumbPage, G as BreadcrumbSeparator, J as Button, K as ButtonGroup, X as Card, Z as CardAction, re as CardContent, ie as CardDescription, ae as CardFooter, oe as CardHeader, se as CardTitle, le as Checkbox, ue as Code, de as Collapsible, fe as CollapsibleContent, pe as CollapsibleTrigger, ve as ColorInput, ye as ColorSwatch, be as Combobox, Se as Container, Ce as ContextMenu, we as ContextMenuCheckboxItem, Te as ContextMenuContent, Ee as ContextMenuGroup, De as ContextMenuItem, Oe as ContextMenuLabel, ke as ContextMenuPortal, Ae as ContextMenuRadioGroup, je as ContextMenuRadioItem, Me as ContextMenuSeparator, Ne as ContextMenuShortcut, Pe as ContextMenuSub, Fe as ContextMenuSubContent, Ie as ContextMenuSubTrigger, Le as ContextMenuTrigger, Qr as DateSeparator, gt as DevalokGrain, _t as Dialog, vt as DialogClose, yt as DialogContent, bt as DialogContentRaw, xt as DialogDescription, St as DialogFooter, Ct as DialogHeader, wt as DialogOverlay, Tt as DialogPortal, Et as DialogTitle, Dt as DialogTrigger, tt as DropdownMenu, nt as DropdownMenuCheckboxItem, rt as DropdownMenuContent, it as DropdownMenuGroup, at as DropdownMenuItem, ot as DropdownMenuLabel, st as DropdownMenuPortal, ct as DropdownMenuRadioGroup, lt as DropdownMenuRadioItem, ut as DropdownMenuSeparator, dt as DropdownMenuShortcut, ft as DropdownMenuSub, pt as DropdownMenuSubContent, mt as DropdownMenuSubTrigger, ht as DropdownMenuTrigger, Ot as FileUpload, T as FormField, E as FormHelperText, kt as HoverCard, At as HoverCardContent, jt as HoverCardTrigger, o as Icon, Mt as IconButton, ee as IconContext, Nt as IconGroup, te as IconProvider, Pt as Input, It as Label, ai as Link, Fn as Menubar, In as MenubarCheckboxItem, Ln as MenubarContent, Rn as MenubarGroup, zn as MenubarItem, Bn as MenubarLabel, Vn as MenubarMenu, Hn as MenubarPortal, Un as MenubarRadioGroup, Wn as MenubarRadioItem, Gn as MenubarSeparator, Kn as MenubarShortcut, qn as MenubarSub, Jn as MenubarSubContent, Yn as MenubarSubTrigger, Xn as MenubarTrigger, ti as Message, Zr as MessageInput, $r as MessageList, An as MultiProgressRing, Zn as NavigationMenu, Qn as NavigationMenuContent, $n as NavigationMenuIndicator, er as NavigationMenuItem, tr as NavigationMenuLink, nr as NavigationMenuList, rr as NavigationMenuTrigger, ir as NavigationMenuViewport, Bt as NumberInput, pi as OAuth, li as OAuthButton, di as OAuthConnectionRow, ci as OAuthDivider, oi as OAuthGlyph, ui as OAuthGroup, ar as PaginationContent, or as PaginationEllipsis, sr as PaginationItem, cr as PaginationLink, lr as PaginationNav, ur as PaginationNext, dr as PaginationPrevious, fr as PaginationRoot, _e as Popover, he as PopoverAnchor, ge as PopoverContent, me as PopoverTrigger, Dn as Progress, jn as ProgressRing, Ht as RadioGroup, Ut as RadioGroupItem, Wt as SearchInput, Xr as SegmentedControl, Gt as Select, Kt as SelectContent, qt as SelectGroup, Jt as SelectItem, Yt as SelectLabel, Q as SelectScrollDownButton, Xt as SelectScrollUpButton, Zt as SelectSeparator, Qt as SelectTrigger, $t as SelectValue, Lt as Separator, _n as Sheet, vn as SheetClose, yn as SheetContent, bn as SheetDescription, xn as SheetFooter, Sn as SheetHeader, Cn as SheetOverlay, wn as SheetPortal, Tn as SheetTitle, En as SheetTrigger, mr as Sidebar, hr as SidebarContent, gr as SidebarFooter, _r as SidebarGroup, vr as SidebarGroupAction, yr as SidebarGroupContent, br as SidebarGroupLabel, xr as SidebarHeader, Sr as SidebarInput, Cr as SidebarInset, wr as SidebarMenu, Tr as SidebarMenuAction, Er as SidebarMenuBadge, Dr as SidebarMenuButton, Or as SidebarMenuItem, kr as SidebarMenuSkeleton, Ar as SidebarMenuSub, jr as SidebarMenuSubButton, Mr as SidebarMenuSubItem, Nr as SidebarProvider, Pr as SidebarRail, Fr as SidebarSeparator, Ir as SidebarTrigger, Re as Skeleton, ze as SkeletonAvatar, Be as SkeletonButton, Ve as SkeletonChart, He as SkeletonGroup, Ue as SkeletonImage, We as SkeletonInput, Ge as SkeletonText, tn as Slider, a as Spinner, Rt as SplitButton, Kr as Stack, Nn as StatCard, Mn as StatFlash, Pn as StatusDot, Hr as Step, Ur as Stepper, an as Switch, ni as SystemMessage, qe as Table, Je as TableBody, Ye as TableCaption, Xe as TableCell, Ze as TableFooter, Qe as TableHead, $e as TableHeader, et as TableRow, Rr as Tabs, zr as TabsContent, Br as TabsList, Vr as TabsTrigger, Wr as Text, on as Textarea, cn as Toggle, un as ToggleGroup, dn as ToggleGroupItem, fn as Tooltip, pn as TooltipContent, mn as TooltipProvider, hn as TooltipTrigger, Yr as TreeItem, qr as TreeView, gn as TruncatedText, ei as TypingIndicator, ii as UnreadSeparator, zt as VisuallyHidden, C as alertVariants, M as avatarVariants, F as badgeVariants, R as bannerVariants, Y as buttonVariants, ce as cardVariants, i as cn, xe as comboboxTriggerVariants, mi as formatRelativeTime, pr as generatePagination, fi as getOAuthLabel, si as getOAuthName, Ft as inputWrapperVariants, Vt as numberInputWrapperVariants, On as progressIndicatorVariants, kn as progressTrackVariants, en as selectTriggerVariants, Ke as skeletonVariants, nn as sliderThumbVariants, rn as sliderTrackVariants, e as springs, t as stagger, Gr as textVariants, sn as textareaVariants, ln as toggleVariants, n as tweens, q as useButtonGroup, D as useFormField, ne as useIconContext, ri as useMessageContext, Lr as useSidebar, Jr as useTree, r as withReducedMotion };
|
package/dist/ui/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/ui/lib/check-tokens.ts","../../src/ui/index.ts"],"sourcesContent":["/**\n * Dev-mode check for missing token CSS.\n *\n * If the consumer forgets `import '@devalok/shilp-sutra/tokens'`, all CSS\n * custom properties resolve to empty strings and components render with\n * transparent/broken backgrounds. This check detects that condition and\n * warns in the console.\n *\n * Only runs once, only in development, only in the browser.\n */\nlet checked = false\n\nexport function checkTokensLoaded(): void {\n if (checked) return\n if (typeof window === 'undefined') return\n\n // Skip in production — bundlers (Vite, Next.js, webpack) define import.meta.env or process.env\n try {\n // @ts-expect-error -- import.meta.env is Vite-specific, not in base TS lib\n if (import.meta.env?.PROD) return\n } catch { /* not in Vite */ }\n\n checked = true\n\n // Wait for stylesheets to load\n requestAnimationFrame(() => {\n const value = getComputedStyle(document.documentElement).getPropertyValue('--color-accent-9').trim()\n if (!value) {\n console.warn(\n '[shilp-sutra] Design system tokens CSS not loaded. ' +\n 'Add `import \\'@devalok/shilp-sutra/tokens\\'` to your root layout. ' +\n 'Without it, components will render with missing colors, spacing, and typography.'\n )\n }\n })\n}\n","/**\n * @module @devalok/shilp-sutra/ui\n *\n * Core UI primitives: buttons, inputs, dialogs, cards, tables, badges, navigation, and more.\n * Most components require client-side React (\"use client\").\n *\n * **Server-safe components** (import individually for Server Components):\n * `Text`, `Skeleton`, `Stack`, `Container`, `Table`, `Code`, `VisuallyHidden`\n *\n * @example\n * // Server Component — import individually:\n * import { Text } from '@devalok/shilp-sutra/ui/text'\n * import { Stack } from '@devalok/shilp-sutra/ui/stack'\n *\n * // Client Component — barrel import:\n * import { Button, Dialog } from '@devalok/shilp-sutra/ui'\n */\n\n// Dev-mode token presence check — runs once on first import\nimport { checkTokensLoaded } from './lib/check-tokens'\ncheckTokensLoaded()\n\n// Core\nexport { Button, type ButtonProps,buttonVariants } from './button'\nexport { ButtonGroup, type ButtonGroupProps,useButtonGroup } from './button-group'\nexport { ColorInput, type ColorInputProps } from './color-input'\nexport { Icon, type IconProps } from './icon'\nexport { IconButton, type IconButtonProps } from './icon-button'\nexport { IconContext, type IconContextValue, IconProvider, type IconSize, type IconStroke,useIconContext } from './icon-context'\nexport { IconGroup, type IconGroupProps } from './icon-group'\nexport { Input, type InputProps, type InputState, inputWrapperVariants } from './input'\nexport { Label, type LabelProps } from './label'\nexport { Separator, type SeparatorProps } from './separator'\nexport { SplitButton, type SplitButtonProps } from './split-button'\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden'\n\n// Autocomplete\nexport { Autocomplete, type AutocompleteOption,type AutocompleteProps } from './autocomplete'\n\n// Combobox\nexport { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize,comboboxTriggerVariants } from './combobox'\n\n// FileUpload\nexport { FileUpload, type FileUploadProps } from './file-upload'\n\n// Form Controls\nexport { Checkbox, type CheckboxProps } from './checkbox'\nexport { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps,useFormField } from './form'\n// InputOTP removed from barrel in 0.40.0 — hard peer `input-otp` was breaking\n// fresh-consumer builds. Import per-component instead:\n// import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from '@devalok/shilp-sutra/ui/input-otp'\nexport { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState,numberInputWrapperVariants } from './number-input'\nexport { RadioGroup, RadioGroupItem, type RadioGroupItemProps,type RadioGroupProps } from './radio'\nexport { SearchInput, type SearchInputProps } from './search-input'\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n type SelectTriggerProps,\n selectTriggerVariants,\n SelectValue,\n} from './select'\nexport { Slider, type SliderColor,type SliderProps, type SliderSize, sliderThumbVariants, sliderTrackVariants } from './slider'\nexport { Switch, type SwitchProps } from './switch'\nexport { Textarea, type TextareaProps,textareaVariants } from './textarea'\nexport { Toggle, type ToggleProps,toggleVariants } from './toggle'\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps,type ToggleGroupProps } from './toggle-group'\n\n// Feedback & Overlays\nexport {\n AlertDialog,\n AlertDialogAction,\n type AlertDialogActionProps,\n AlertDialogCancel,\n type AlertDialogCancelProps,\n AlertDialogContent,\n type AlertDialogContentProps,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from './alert-dialog'\nexport { Collapsible, CollapsibleContent, type CollapsibleProps,CollapsibleTrigger } from './collapsible'\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n type DialogContentProps,\n DialogContentRaw,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n type DialogTitleProps,\n DialogTrigger,\n} from './dialog'\nexport { HoverCard, HoverCardContent, type HoverCardContentProps,HoverCardTrigger } from './hover-card'\nexport { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps,PopoverTrigger } from './popover'\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n type SheetContentProps,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetOverlay,\n SheetPortal,\n SheetTitle,\n SheetTrigger,\n} from './sheet'\n// toast + Toaster removed from barrel in 0.40.0 — hard peer `sonner` was\n// breaking fresh-consumer builds when consumers imported other UI symbols\n// from the barrel without sonner installed. Import per-component instead:\n// import { toast, formatFileSize, type ToastOptions } from '@devalok/shilp-sutra/ui/toast'\n// import { Toaster } from '@devalok/shilp-sutra/ui/toaster'\nexport { Tooltip, TooltipContent, type TooltipContentProps,TooltipProvider, TooltipTrigger } from './tooltip'\n// ---------------------------------------------------------------------------\n// Notifications — pick the right one:\n// Alert — inline, static feedback within a form or page section (no user action needed to show)\n// Banner — persistent, page-level notice shown above main content (survives navigation)\n// Toast — imperative, transient, action-triggered (fires on user action, auto-dismisses)\n// Requires <Toaster /> mounted once at layout root. Use toast.success() etc. from anywhere.\n// ---------------------------------------------------------------------------\nexport { Alert, type AlertProps,alertVariants } from './alert'\nexport { Banner, type BannerProps,bannerVariants } from './banner'\nexport { Spinner, type SpinnerProps } from './spinner'\n\n// Data Display\nexport { AspectRatio } from './aspect-ratio'\nexport { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarProps, type AvatarRing,type AvatarStatus, avatarVariants } from './avatar'\nexport { Badge, type BadgeProps,badgeVariants } from './badge'\nexport { BadgeGroup, type BadgeGroupProps } from './badge-group'\nexport { BadgeIndicator, type BadgeIndicatorProps } from './badge-indicator'\nexport { Card, CardContent, CardDescription, CardFooter, CardHeader, type CardProps,CardTitle, cardVariants } from './card'\nexport { Code, type CodeProps } from './code'\nexport { ColorSwatch, type ColorSwatchProps } from './color-swatch'\nexport { Progress, progressIndicatorVariants, type ProgressProps,progressTrackVariants } from './progress'\nexport { MultiProgressRing, type MultiProgressRingProps,ProgressRing, type ProgressRingProps } from './progress-ring'\nexport {\n Skeleton,\n SkeletonAvatar,\n type SkeletonAvatarProps,\n SkeletonButton,\n type SkeletonButtonProps,\n SkeletonChart,\n type SkeletonChartProps,\n SkeletonGroup,\n type SkeletonGroupProps,\n SkeletonImage,\n type SkeletonImageProps,\n SkeletonInput,\n type SkeletonInputProps,\n type SkeletonProps,\n SkeletonText,\n type SkeletonTextProps,\n skeletonVariants,\n} from './skeleton'\nexport { StatCard, type StatCardProps } from './stat-card'\nexport {\n type FlashPreset,\n type FlashSpec,\n type FlashSpeed,\n type FlashTone,\n StatFlash,\n type StatFlashProps,\n} from './stat-flash'\nexport { StatusDot, type StatusDotProps, type StatusDotStatus } from './status-dot'\nexport { Table, TableBody, TableCaption, TableCell, type TableCellProps,TableFooter, TableHead, TableHeader, type TableProps, TableRow, type TableRowProps } from './table'\n\n// Navigation\nexport { Accordion, AccordionContent, type AccordionContentProps,AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps } from './accordion'\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n type BreadcrumbLinkProps,\n BreadcrumbList,\n BreadcrumbPage,\n type BreadcrumbProps,\n BreadcrumbSeparator,\n} from './breadcrumb'\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n type ContextMenuContentProps,\n ContextMenuGroup,\n ContextMenuItem,\n type ContextMenuItemProps,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n} from './context-menu'\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n type DropdownMenuContentProps,\n DropdownMenuGroup,\n DropdownMenuItem,\n type DropdownMenuItemProps,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from './dropdown-menu'\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n type MenubarContentProps,\n MenubarGroup,\n MenubarItem,\n type MenubarItemProps,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n} from './menubar'\nexport {\n NavigationMenu,\n NavigationMenuContent,\n type NavigationMenuContentProps,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n type NavigationMenuProps,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n} from './navigation-menu'\nexport {\n generatePagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n type PaginationLinkProps,\n PaginationNav,\n type PaginationNavProps,\n PaginationNext,\n PaginationPrevious,\n PaginationRoot,\n} from './pagination'\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n type SidebarProps,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from './sidebar'\nexport { Tabs, type TabsColor, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation,type TabsProps, type TabsSize, TabsTrigger, type TabsTriggerProps } from './tabs'\n\n// Workflow\nexport { Step, Stepper, type StepperProps, type StepProps } from './stepper'\n\n\n// Typography\nexport { Text, type TextProps, type TextVariant,textVariants } from './text'\n\n// Layout\nexport { Container, type ContainerProps } from './container'\nexport { type SpacingToken,Stack, type StackProps } from './stack'\n\n// Tree View\nexport { TreeItem, type TreeItemProps, type TreeNode,TreeView, type TreeViewProps, useTree } from './tree-view'\n\n// Segmented Control\nexport {\n SegmentedControl,\n type SegmentedControlOption,\n type SegmentedControlProps,\n type SegmentedControlSize,\n type SegmentedControlVariant,\n} from './segmented-control'\n\n// Brand Texture\nexport { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain'\n\n// Chat primitives\nexport {\n DateSeparator,\n type DateSeparatorProps,\n Message,\n type MessageActionProps,\n type MessageActionsProps,\n type MessageAuthorProps,\n type MessageAvatarProps,\n type MessageBodyProps,\n type MessageContentProps,\n type MessageContextValue,\n type MessageEditableBodyProps,\n MessageInput,\n type MessageInputProps,\n MessageList,\n type MessageListProps,\n type MessageProps,\n type MessageReactionsProps,\n SystemMessage,\n type SystemMessageProps,\n TypingIndicator,\n type TypingIndicatorProps,\n UnreadSeparator,\n type UnreadSeparatorProps,\n useMessageContext,\n} from './chat'\n\n// Other\nexport { Link, type LinkProps } from './link'\n\n// OAuth / Social sign-in\nexport {\n getOAuthLabel,\n getOAuthName,\n OAuth,\n type OAuthAppearance,\n OAuthButton,\n type OAuthButtonProps,\n OAuthConnectionRow,\n type OAuthConnectionRowProps,\n OAuthDivider,\n type OAuthDividerProps,\n OAuthGlyph,\n type OAuthGlyphProps,\n OAuthGroup,\n type OAuthGroupProps,\n type OAuthIntent,\n type OAuthProvider,\n type OAuthVariant,\n} from './oauth-button'\n\n// Utilities\nexport { formatRelativeTime } from './lib/date-utils'\nexport type { SpringPreset, TweenPreset } from './lib/motion'\nexport { springs, stagger, tweens, withReducedMotion } from './lib/motion'\nexport { cn } from './lib/utils'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAI,IAAU;AAEd,SAAgB,KAA0B;AACpC,WACA,SAAO,SAAW,MAGtB;MAAI;AAEyB;UACrB;AAKR,EAHA,IAAU,IAGV,4BAA4B;AAE1B,GADc,iBAAiB,SAAS,gBAAgB,CAAC,iBAAiB,mBAAmB,CAAC,MAAM,IAElG,QAAQ,KACN,sMAGD;IAEH;;;;;ACdJ,IAAmB"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/ui/lib/check-tokens.ts","../../src/ui/index.ts"],"sourcesContent":["/**\n * Dev-mode check for missing token CSS.\n *\n * If the consumer forgets `import '@devalok/shilp-sutra/tokens'`, all CSS\n * custom properties resolve to empty strings and components render with\n * transparent/broken backgrounds. This check detects that condition and\n * warns in the console.\n *\n * Only runs once, only in development, only in the browser.\n */\nlet checked = false\n\nexport function checkTokensLoaded(): void {\n if (checked) return\n if (typeof window === 'undefined') return\n\n // Skip in production — bundlers (Vite, Next.js, webpack) define import.meta.env or process.env\n try {\n // @ts-expect-error -- import.meta.env is Vite-specific, not in base TS lib\n if (import.meta.env?.PROD) return\n } catch { /* not in Vite */ }\n\n checked = true\n\n // Wait for stylesheets to load\n requestAnimationFrame(() => {\n const value = getComputedStyle(document.documentElement).getPropertyValue('--color-accent-9').trim()\n if (!value) {\n console.warn(\n '[shilp-sutra] Design system tokens CSS not loaded. ' +\n 'Add `import \\'@devalok/shilp-sutra/tokens\\'` to your root layout. ' +\n 'Without it, components will render with missing colors, spacing, and typography.'\n )\n }\n })\n}\n","/**\n * @module @devalok/shilp-sutra/ui\n *\n * Core UI primitives: buttons, inputs, dialogs, cards, tables, badges, navigation, and more.\n * Most components require client-side React (\"use client\").\n *\n * **Server-safe components** (import individually for Server Components):\n * `Text`, `Skeleton`, `Stack`, `Container`, `Table`, `Code`, `VisuallyHidden`\n *\n * @example\n * // Server Component — import individually:\n * import { Text } from '@devalok/shilp-sutra/ui/text'\n * import { Stack } from '@devalok/shilp-sutra/ui/stack'\n *\n * // Client Component — barrel import:\n * import { Button, Dialog } from '@devalok/shilp-sutra/ui'\n */\n\n// Dev-mode token presence check — runs once on first import\nimport { checkTokensLoaded } from './lib/check-tokens'\ncheckTokensLoaded()\n\n// Core\nexport { Button, type ButtonProps,buttonVariants } from './button'\nexport { ButtonGroup, type ButtonGroupProps,useButtonGroup } from './button-group'\nexport { ColorInput, type ColorInputProps } from './color-input'\nexport { Icon, type IconProps } from './icon'\nexport { IconButton, type IconButtonProps } from './icon-button'\nexport { IconContext, type IconContextValue, IconProvider, type IconSize, type IconStroke,useIconContext } from './icon-context'\nexport { IconGroup, type IconGroupProps } from './icon-group'\nexport { Input, type InputProps, type InputState, inputWrapperVariants } from './input'\nexport { Label, type LabelProps } from './label'\nexport { Separator, type SeparatorProps } from './separator'\nexport { SplitButton, type SplitButtonProps } from './split-button'\nexport { VisuallyHidden, type VisuallyHiddenProps } from './visually-hidden'\n\n// Autocomplete\nexport { Autocomplete, type AutocompleteOption,type AutocompleteProps } from './autocomplete'\n\n// Combobox\nexport { Combobox, type ComboboxOption, type ComboboxProps, type ComboboxSize,comboboxTriggerVariants } from './combobox'\n\n// FileUpload\nexport { FileUpload, type FileUploadProps } from './file-upload'\n\n// Form Controls\nexport { Checkbox, type CheckboxProps } from './checkbox'\nexport { FormField, type FormFieldProps, type FormHelperState, FormHelperText, type FormHelperTextProps,useFormField } from './form'\n// InputOTP removed from barrel in 0.40.0 — hard peer `input-otp` was breaking\n// fresh-consumer builds. Import per-component instead:\n// import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from '@devalok/shilp-sutra/ui/input-otp'\nexport { NumberInput, type NumberInputProps, type NumberInputSize, type NumberInputState,numberInputWrapperVariants } from './number-input'\nexport { RadioGroup, RadioGroupItem, type RadioGroupItemProps,type RadioGroupProps } from './radio'\nexport { SearchInput, type SearchInputProps } from './search-input'\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n type SelectTriggerProps,\n selectTriggerVariants,\n SelectValue,\n} from './select'\nexport { Slider, type SliderColor,type SliderProps, type SliderSize, sliderThumbVariants, sliderTrackVariants } from './slider'\nexport { Switch, type SwitchProps } from './switch'\nexport { Textarea, type TextareaProps,textareaVariants } from './textarea'\nexport { Toggle, type ToggleProps,toggleVariants } from './toggle'\nexport { ToggleGroup, ToggleGroupItem, type ToggleGroupItemProps,type ToggleGroupProps } from './toggle-group'\nexport { TruncatedText, type TruncatedTextProps } from './truncated-text'\n\n// Feedback & Overlays\nexport {\n AlertDialog,\n AlertDialogAction,\n type AlertDialogActionProps,\n AlertDialogCancel,\n type AlertDialogCancelProps,\n AlertDialogContent,\n type AlertDialogContentProps,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n} from './alert-dialog'\nexport { Collapsible, CollapsibleContent, type CollapsibleProps,CollapsibleTrigger } from './collapsible'\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n type DialogContentProps,\n DialogContentRaw,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n type DialogTitleProps,\n DialogTrigger,\n} from './dialog'\nexport { HoverCard, HoverCardContent, type HoverCardContentProps,HoverCardTrigger } from './hover-card'\nexport { Popover, PopoverAnchor, PopoverContent, type PopoverContentProps,PopoverTrigger } from './popover'\nexport {\n Sheet,\n SheetClose,\n SheetContent,\n type SheetContentProps,\n SheetDescription,\n SheetFooter,\n SheetHeader,\n SheetOverlay,\n SheetPortal,\n SheetTitle,\n SheetTrigger,\n} from './sheet'\n// toast + Toaster removed from barrel in 0.40.0 — hard peer `sonner` was\n// breaking fresh-consumer builds when consumers imported other UI symbols\n// from the barrel without sonner installed. Import per-component instead:\n// import { toast, formatFileSize, type ToastOptions } from '@devalok/shilp-sutra/ui/toast'\n// import { Toaster } from '@devalok/shilp-sutra/ui/toaster'\nexport { Tooltip, TooltipContent, type TooltipContentProps,TooltipProvider, TooltipTrigger } from './tooltip'\n// ---------------------------------------------------------------------------\n// Notifications — pick the right one:\n// Alert — inline, static feedback within a form or page section (no user action needed to show)\n// Banner — persistent, page-level notice shown above main content (survives navigation)\n// Toast — imperative, transient, action-triggered (fires on user action, auto-dismisses)\n// Requires <Toaster /> mounted once at layout root. Use toast.success() etc. from anywhere.\n// ---------------------------------------------------------------------------\nexport { Alert, type AlertProps,alertVariants } from './alert'\nexport { Banner, type BannerProps,bannerVariants } from './banner'\nexport { Spinner, type SpinnerProps } from './spinner'\n\n// Data Display\nexport { AspectRatio } from './aspect-ratio'\nexport { Avatar, AvatarFallback, type AvatarFallbackProps, AvatarImage, type AvatarProps, type AvatarRing,type AvatarStatus, avatarVariants } from './avatar'\nexport { Badge, type BadgeProps,badgeVariants } from './badge'\nexport { BadgeGroup, type BadgeGroupProps } from './badge-group'\nexport { BadgeIndicator, type BadgeIndicatorProps } from './badge-indicator'\nexport { Card, CardAction, type CardActionPlacement, type CardActionProps, CardContent, CardDescription, CardFooter, CardHeader, type CardProps,CardTitle, cardVariants } from './card'\nexport { Code, type CodeProps } from './code'\nexport { ColorSwatch, type ColorSwatchProps } from './color-swatch'\nexport { Progress, progressIndicatorVariants, type ProgressProps,progressTrackVariants } from './progress'\nexport { MultiProgressRing, type MultiProgressRingProps,ProgressRing, type ProgressRingProps } from './progress-ring'\nexport {\n Skeleton,\n SkeletonAvatar,\n type SkeletonAvatarProps,\n SkeletonButton,\n type SkeletonButtonProps,\n SkeletonChart,\n type SkeletonChartProps,\n SkeletonGroup,\n type SkeletonGroupProps,\n SkeletonImage,\n type SkeletonImageProps,\n SkeletonInput,\n type SkeletonInputProps,\n type SkeletonProps,\n SkeletonText,\n type SkeletonTextProps,\n skeletonVariants,\n} from './skeleton'\nexport { StatCard, type StatCardProps } from './stat-card'\nexport {\n type FlashPreset,\n type FlashSpec,\n type FlashSpeed,\n type FlashTone,\n StatFlash,\n type StatFlashProps,\n} from './stat-flash'\nexport { StatusDot, type StatusDotProps, type StatusDotStatus } from './status-dot'\nexport { Table, TableBody, TableCaption, TableCell, type TableCellProps,TableFooter, TableHead, TableHeader, type TableProps, TableRow, type TableRowProps } from './table'\n\n// Navigation\nexport { Accordion, AccordionContent, type AccordionContentProps,AccordionItem, type AccordionItemProps, AccordionTrigger, type AccordionTriggerProps } from './accordion'\nexport {\n Breadcrumb,\n BreadcrumbEllipsis,\n BreadcrumbItem,\n BreadcrumbLink,\n type BreadcrumbLinkProps,\n BreadcrumbList,\n BreadcrumbPage,\n type BreadcrumbProps,\n BreadcrumbSeparator,\n} from './breadcrumb'\nexport {\n ContextMenu,\n ContextMenuCheckboxItem,\n ContextMenuContent,\n type ContextMenuContentProps,\n ContextMenuGroup,\n ContextMenuItem,\n type ContextMenuItemProps,\n ContextMenuLabel,\n ContextMenuPortal,\n ContextMenuRadioGroup,\n ContextMenuRadioItem,\n ContextMenuSeparator,\n ContextMenuShortcut,\n ContextMenuSub,\n ContextMenuSubContent,\n ContextMenuSubTrigger,\n ContextMenuTrigger,\n} from './context-menu'\nexport {\n DropdownMenu,\n DropdownMenuCheckboxItem,\n DropdownMenuContent,\n type DropdownMenuContentProps,\n DropdownMenuGroup,\n DropdownMenuItem,\n type DropdownMenuItemProps,\n DropdownMenuLabel,\n DropdownMenuPortal,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuTrigger,\n} from './dropdown-menu'\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n type MenubarContentProps,\n MenubarGroup,\n MenubarItem,\n type MenubarItemProps,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n} from './menubar'\nexport {\n NavigationMenu,\n NavigationMenuContent,\n type NavigationMenuContentProps,\n NavigationMenuIndicator,\n NavigationMenuItem,\n NavigationMenuLink,\n NavigationMenuList,\n type NavigationMenuProps,\n NavigationMenuTrigger,\n NavigationMenuViewport,\n} from './navigation-menu'\nexport {\n generatePagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n type PaginationLinkProps,\n PaginationNav,\n type PaginationNavProps,\n PaginationNext,\n PaginationPrevious,\n PaginationRoot,\n} from './pagination'\nexport {\n Sidebar,\n SidebarContent,\n SidebarFooter,\n SidebarGroup,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInput,\n SidebarInset,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuButton,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubButton,\n SidebarMenuSubItem,\n type SidebarProps,\n SidebarProvider,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from './sidebar'\nexport { Tabs, type TabsColor, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsOrientation,type TabsProps, type TabsSize, TabsTrigger, type TabsTriggerProps } from './tabs'\n\n// Workflow\nexport { Step, Stepper, type StepperProps, type StepProps } from './stepper'\n\n\n// Typography\nexport { Text, type TextProps, type TextVariant,textVariants } from './text'\n\n// Layout\nexport { Container, type ContainerProps } from './container'\nexport { type SpacingToken,Stack, type StackProps } from './stack'\n\n// Tree View\nexport { TreeItem, type TreeItemProps, type TreeNode,TreeView, type TreeViewProps, useTree } from './tree-view'\n\n// Segmented Control\nexport {\n SegmentedControl,\n type SegmentedControlOption,\n type SegmentedControlProps,\n type SegmentedControlSize,\n type SegmentedControlVariant,\n} from './segmented-control'\n\n// Brand Texture\nexport { DevalokGrain, type DevalokGrainProps, type GrainIntensity } from './devalok-grain'\n\n// Chat primitives\nexport {\n DateSeparator,\n type DateSeparatorProps,\n Message,\n type MessageActionProps,\n type MessageActionsProps,\n type MessageAuthorProps,\n type MessageAvatarProps,\n type MessageBodyProps,\n type MessageContentProps,\n type MessageContextValue,\n type MessageEditableBodyProps,\n MessageInput,\n type MessageInputProps,\n MessageList,\n type MessageListProps,\n type MessageProps,\n type MessageReactionsProps,\n SystemMessage,\n type SystemMessageProps,\n TypingIndicator,\n type TypingIndicatorProps,\n UnreadSeparator,\n type UnreadSeparatorProps,\n useMessageContext,\n} from './chat'\n\n// Other\nexport { Link, type LinkProps } from './link'\n\n// OAuth / Social sign-in\nexport {\n getOAuthLabel,\n getOAuthName,\n OAuth,\n type OAuthAppearance,\n OAuthButton,\n type OAuthButtonProps,\n OAuthConnectionRow,\n type OAuthConnectionRowProps,\n OAuthDivider,\n type OAuthDividerProps,\n OAuthGlyph,\n type OAuthGlyphProps,\n OAuthGroup,\n type OAuthGroupProps,\n type OAuthIntent,\n type OAuthProvider,\n type OAuthVariant,\n} from './oauth-button'\n\n// Utilities\nexport { formatRelativeTime } from './lib/date-utils'\nexport type { SpringPreset, TweenPreset } from './lib/motion'\nexport { springs, stagger, tweens, withReducedMotion } from './lib/motion'\nexport { cn } from './lib/utils'\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUA,IAAI,IAAU;AAEd,SAAgB,KAA0B;AACpC,WACA,SAAO,SAAW,MAGtB;MAAI;AAEyB;UACrB;AAKR,EAHA,IAAU,IAGV,4BAA4B;AAE1B,GADc,iBAAiB,SAAS,gBAAgB,CAAC,iBAAiB,mBAAmB,CAAC,MAAM,IAElG,QAAQ,KACN,sMAGD;IAEH;;;;;ACdJ,IAAmB"}
|
package/dist/ui/menubar.js
CHANGED
|
@@ -40,10 +40,13 @@ var I = b.forwardRef(({ className: e, inset: n, children: r, ...i }, a) => /* @_
|
|
|
40
40
|
ref: a,
|
|
41
41
|
className: v("flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-ds-md outline-hidden focus:bg-surface-raised data-[state=open]:bg-surface-raised [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0", n && "pl-ds-07", e),
|
|
42
42
|
...i,
|
|
43
|
-
children: [
|
|
43
|
+
children: [/* @__PURE__ */ x("span", {
|
|
44
|
+
className: "min-w-0 truncate",
|
|
45
|
+
children: r
|
|
46
|
+
}), /* @__PURE__ */ x(y, {
|
|
44
47
|
icon: w,
|
|
45
48
|
size: "sm",
|
|
46
|
-
className: "ml-auto"
|
|
49
|
+
className: "ml-auto shrink-0"
|
|
47
50
|
})]
|
|
48
51
|
}));
|
|
49
52
|
I.displayName = t.displayName;
|
|
@@ -111,7 +114,10 @@ var V = b.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */
|
|
|
111
114
|
children: [/* @__PURE__ */ x("span", {
|
|
112
115
|
className: "absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center",
|
|
113
116
|
children: /* @__PURE__ */ x(o, { children: /* @__PURE__ */ x(T, { className: "h-2 w-2 fill-current" }) })
|
|
114
|
-
}),
|
|
117
|
+
}), /* @__PURE__ */ x("span", {
|
|
118
|
+
className: "min-w-0 truncate",
|
|
119
|
+
children: t
|
|
120
|
+
})]
|
|
115
121
|
}));
|
|
116
122
|
V.displayName = i.displayName;
|
|
117
123
|
var H = b.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ x(f, {
|
package/dist/ui/menubar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menubar.js","names":[],"sources":["../../src/ui/menubar.tsx"],"sourcesContent":["'use client'\n\nimport * as MenubarPrimitive from '@primitives/react-menubar'\nimport { IconCheck, IconChevronRight, IconCircle } from '@tabler/icons-react'\nimport { AnimatePresence,motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\n// ── Internal contexts to thread open state ──\n\nconst MenubarSubOpenContext = React.createContext(false)\n\nconst MenubarMenu: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Menu>> = (props) => {\n // MenubarPrimitive.Menu doesn't expose open/onOpenChange directly.\n // We derive open from data-state on the trigger via a callback ref approach,\n // but the cleanest way is to use the Menubar root's value prop.\n // Since MenubarMenu doesn't have open/onOpenChange, we track via a wrapper\n // that observes the trigger's data-state.\n //\n // Alternative: MenubarPrimitive.Menu has a `value` that the root uses.\n // We'll use a simpler approach: track open via content mount state.\n return <MenubarPrimitive.Menu {...props} />\n}\nMenubarMenu.displayName = 'MenubarMenu'\n\n// For Menubar, the Menu doesn't expose open/onOpenChange. Instead, we'll use a\n// different approach: wrap Content to use a local presence state based on data-state.\n// We create a wrapper component that tracks whether content should be shown.\n\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group\n\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal\n\nconst MenubarSub: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>> = ({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n ...props\n}) => {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : uncontrolledOpen\n\n const handleOpenChange = React.useCallback(\n (value: boolean) => {\n if (!isControlled) setUncontrolledOpen(value)\n onOpenChange?.(value)\n },\n [isControlled, onOpenChange],\n )\n\n return (\n <MenubarSubOpenContext.Provider value={open}>\n <MenubarPrimitive.Sub open={open} onOpenChange={handleOpenChange} {...props} />\n </MenubarSubOpenContext.Provider>\n )\n}\nMenubarSub.displayName = 'MenubarSub'\n\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup =\n MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n 'flex h-ds-sm-plus items-center space-x-ds-02 rounded-overlay bg-surface-overlay p-ds-02 shadow-raised',\n className,\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-control px-ds-04 py-ds-02 text-ds-md font-medium outline-hidden transition-colors hover:bg-surface-raised-hover focus-visible:bg-surface-raised-hover data-[state=open]:bg-surface-raised-hover',\n className,\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-ds-md outline-hidden focus:bg-surface-raised data-[state=open]:bg-surface-raised [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n >\n {children}\n <Icon icon={IconChevronRight} size=\"sm\" className=\"ml-auto\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, children, ...props }, ref) => {\n const open = React.useContext(MenubarSubOpenContext)\n\n return (\n <AnimatePresence>\n {open && (\n <MenubarPrimitive.SubContent\n ref={ref}\n forceMount\n asChild\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={{ ...springs.snappy, opacity: tweens.fade }}\n className={cn(\n 'z-popover min-w-[8rem] overflow-hidden rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n className,\n )}\n >\n {children}\n </motion.div>\n </MenubarPrimitive.SubContent>\n )}\n </AnimatePresence>\n )\n})\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\n// For MenubarContent, since MenubarMenu doesn't expose open/onOpenChange,\n// we use a wrapper that reads presence from a callback approach.\n// The cleanest solution: use a local state tracker via onCloseAutoFocus/onOpenAutoFocus\n// or simply keep CSS-free and let Radix handle mount/unmount naturally.\n//\n// Since Menubar menus are opened by the Menubar root (which tracks which menu value is open),\n// and MenubarPrimitive.Content already handles mount/unmount, we can use a ref-based approach\n// to detect the data-state attribute. However, the simplest reliable approach is to use\n// a wrapper that detects mount via useEffect.\n\n// MenubarContent uses CSS data-state animations instead of framer-motion because\n// MenubarPrimitive.Menu doesn't expose open/onOpenChange, making AnimatePresence\n// impossible to wire up for exit animations. The popover-in/popover-out keyframes\n// are defined in the tailwind preset and triggered by Radix's data-state attribute.\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = 'start', alignOffset = -4, sideOffset = 8, children, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n 'z-popover min-w-[12rem] rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n 'data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out',\n className,\n )}\n {...props}\n >\n {children}\n </MenubarPrimitive.Content>\n </MenubarPrimitive.Portal>\n ),\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Icon icon={IconCheck} size=\"sm\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <IconCircle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n 'px-ds-03 py-ds-02b text-ds-md font-semibold',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn('-mx-ds-01 my-ds-02 h-px bg-surface-border', className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'ml-auto text-ds-sm text-surface-fg-subtle',\n className,\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayName = 'MenubarShortcut'\n\nexport type MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\nexport type MenubarItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item>\n\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n MenubarGroup,\n MenubarItem,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAM,IAAwB,EAAM,cAAc,GAAM,EAElD,KAAuF,MASpF,kBAAC,GAAD,EAAuB,GAAI,GAAS,CAAA;AAE7C,EAAY,cAAc;AAM1B,IAAM,IAA8C,GAE9C,IAA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C,GAAD,EAAY,WAAU,wBAAyB,CAAA,EAChB,CAAA;EAC5B,CAAA,EACN,EAC0B;GAC7B;AACF,EAAiB,cAAA,EAAyC;AAE1D,IAAM,IAAe,EAAM,YAKxB,EAAE,cAAW,UAAO,GAAG,KAAS,MACjC,kBAAC,GAAD;CACO;CACL,WAAW,EACT,+CACA,KAAS,YACT,EACD;CACD,GAAI;CACJ,CAAA,CACF;AACF,EAAa,cAAA,EAAqC;AAElD,IAAM,IAAmB,EAAM,YAG5B,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,GAAD;CACO;CACL,WAAW,EAAG,6CAA6C,EAAU;CACrE,GAAI;CACJ,CAAA,CACF;AACF,EAAiB,cAAA,EAAyC;AAE1D,IAAM,KAAmB,EACvB,cACA,GAAG,QAGD,kBAAC,QAAD;CACE,WAAW,EACT,6CACA,EACD;CACD,GAAI;CACJ,CAAA;AAGN,EAAgB,cAAc"}
|
|
1
|
+
{"version":3,"file":"menubar.js","names":[],"sources":["../../src/ui/menubar.tsx"],"sourcesContent":["'use client'\n\nimport * as MenubarPrimitive from '@primitives/react-menubar'\nimport { IconCheck, IconChevronRight, IconCircle } from '@tabler/icons-react'\nimport { AnimatePresence,motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\n// ── Internal contexts to thread open state ──\n\nconst MenubarSubOpenContext = React.createContext(false)\n\nconst MenubarMenu: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Menu>> = (props) => {\n // MenubarPrimitive.Menu doesn't expose open/onOpenChange directly.\n // We derive open from data-state on the trigger via a callback ref approach,\n // but the cleanest way is to use the Menubar root's value prop.\n // Since MenubarMenu doesn't have open/onOpenChange, we track via a wrapper\n // that observes the trigger's data-state.\n //\n // Alternative: MenubarPrimitive.Menu has a `value` that the root uses.\n // We'll use a simpler approach: track open via content mount state.\n return <MenubarPrimitive.Menu {...props} />\n}\nMenubarMenu.displayName = 'MenubarMenu'\n\n// For Menubar, the Menu doesn't expose open/onOpenChange. Instead, we'll use a\n// different approach: wrap Content to use a local presence state based on data-state.\n// We create a wrapper component that tracks whether content should be shown.\n\nconst MenubarGroup: typeof MenubarPrimitive.Group = MenubarPrimitive.Group\n\nconst MenubarPortal: typeof MenubarPrimitive.Portal = MenubarPrimitive.Portal\n\nconst MenubarSub: React.FC<React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Sub>> = ({\n open: controlledOpen,\n defaultOpen = false,\n onOpenChange,\n ...props\n}) => {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen)\n const isControlled = controlledOpen !== undefined\n const open = isControlled ? controlledOpen : uncontrolledOpen\n\n const handleOpenChange = React.useCallback(\n (value: boolean) => {\n if (!isControlled) setUncontrolledOpen(value)\n onOpenChange?.(value)\n },\n [isControlled, onOpenChange],\n )\n\n return (\n <MenubarSubOpenContext.Provider value={open}>\n <MenubarPrimitive.Sub open={open} onOpenChange={handleOpenChange} {...props} />\n </MenubarSubOpenContext.Provider>\n )\n}\nMenubarSub.displayName = 'MenubarSub'\n\nconst MenubarRadioGroup: typeof MenubarPrimitive.RadioGroup =\n MenubarPrimitive.RadioGroup\n\nconst Menubar = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Root>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Root\n ref={ref}\n className={cn(\n 'flex h-ds-sm-plus items-center space-x-ds-02 rounded-overlay bg-surface-overlay p-ds-02 shadow-raised',\n className,\n )}\n {...props}\n />\n))\nMenubar.displayName = MenubarPrimitive.Root.displayName\n\nconst MenubarTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Trigger>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-control px-ds-04 py-ds-02 text-ds-md font-medium outline-hidden transition-colors hover:bg-surface-raised-hover focus-visible:bg-surface-raised-hover data-[state=open]:bg-surface-raised-hover',\n className,\n )}\n {...props}\n />\n))\nMenubarTrigger.displayName = MenubarPrimitive.Trigger.displayName\n\nconst MenubarSubTrigger = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubTrigger> & {\n inset?: boolean\n }\n>(({ className, inset, children, ...props }, ref) => (\n <MenubarPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-ds-md outline-hidden focus:bg-surface-raised data-[state=open]:bg-surface-raised [&_svg]:pointer-events-none [&_svg]:h-ico-sm [&_svg]:w-ico-sm [&_svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n >\n <span className=\"min-w-0 truncate\">{children}</span>\n <Icon icon={IconChevronRight} size=\"sm\" className=\"ml-auto shrink-0\" />\n </MenubarPrimitive.SubTrigger>\n))\nMenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName\n\nconst MenubarSubContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.SubContent>\n>(({ className, children, ...props }, ref) => {\n const open = React.useContext(MenubarSubOpenContext)\n\n return (\n <AnimatePresence>\n {open && (\n <MenubarPrimitive.SubContent\n ref={ref}\n forceMount\n asChild\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n exit={{ opacity: 0, scale: 0.95 }}\n transition={{ ...springs.snappy, opacity: tweens.fade }}\n className={cn(\n 'z-popover min-w-[8rem] overflow-hidden rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n className,\n )}\n >\n {children}\n </motion.div>\n </MenubarPrimitive.SubContent>\n )}\n </AnimatePresence>\n )\n})\nMenubarSubContent.displayName = MenubarPrimitive.SubContent.displayName\n\n// For MenubarContent, since MenubarMenu doesn't expose open/onOpenChange,\n// we use a wrapper that reads presence from a callback approach.\n// The cleanest solution: use a local state tracker via onCloseAutoFocus/onOpenAutoFocus\n// or simply keep CSS-free and let Radix handle mount/unmount naturally.\n//\n// Since Menubar menus are opened by the Menubar root (which tracks which menu value is open),\n// and MenubarPrimitive.Content already handles mount/unmount, we can use a ref-based approach\n// to detect the data-state attribute. However, the simplest reliable approach is to use\n// a wrapper that detects mount via useEffect.\n\n// MenubarContent uses CSS data-state animations instead of framer-motion because\n// MenubarPrimitive.Menu doesn't expose open/onOpenChange, making AnimatePresence\n// impossible to wire up for exit animations. The popover-in/popover-out keyframes\n// are defined in the tailwind preset and triggered by Radix's data-state attribute.\nconst MenubarContent = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\n>(\n (\n { className, align = 'start', alignOffset = -4, sideOffset = 8, children, ...props },\n ref,\n ) => (\n <MenubarPrimitive.Portal>\n <MenubarPrimitive.Content\n ref={ref}\n align={align}\n alignOffset={alignOffset}\n sideOffset={sideOffset}\n className={cn(\n 'z-popover min-w-[12rem] rounded-overlay bg-surface-overlay p-ds-02 text-surface-fg shadow-floating',\n 'data-[state=open]:animate-popover-in data-[state=closed]:animate-popover-out',\n className,\n )}\n {...props}\n >\n {children}\n </MenubarPrimitive.Content>\n </MenubarPrimitive.Portal>\n ),\n)\nMenubarContent.displayName = MenubarPrimitive.Content.displayName\n\nconst MenubarItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center gap-ds-03 rounded-control px-ds-03 py-ds-02b text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled [&>svg]:h-ico-sm [&>svg]:w-ico-sm [&>svg]:shrink-0',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarItem.displayName = MenubarPrimitive.Item.displayName\n\nconst MenubarCheckboxItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <MenubarPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <Icon icon={IconCheck} size=\"sm\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n {children}\n </MenubarPrimitive.CheckboxItem>\n))\nMenubarCheckboxItem.displayName = MenubarPrimitive.CheckboxItem.displayName\n\nconst MenubarRadioItem = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <MenubarPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-control py-ds-02b pl-ds-07 pr-ds-03 text-ds-md outline-hidden transition-colors focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <MenubarPrimitive.ItemIndicator>\n <IconCircle className=\"h-2 w-2 fill-current\" />\n </MenubarPrimitive.ItemIndicator>\n </span>\n <span className=\"min-w-0 truncate\">{children}</span>\n </MenubarPrimitive.RadioItem>\n))\nMenubarRadioItem.displayName = MenubarPrimitive.RadioItem.displayName\n\nconst MenubarLabel = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Label> & {\n inset?: boolean\n }\n>(({ className, inset, ...props }, ref) => (\n <MenubarPrimitive.Label\n ref={ref}\n className={cn(\n 'px-ds-03 py-ds-02b text-ds-md font-semibold',\n inset && 'pl-ds-07',\n className,\n )}\n {...props}\n />\n))\nMenubarLabel.displayName = MenubarPrimitive.Label.displayName\n\nconst MenubarSeparator = React.forwardRef<\n React.ElementRef<typeof MenubarPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <MenubarPrimitive.Separator\n ref={ref}\n className={cn('-mx-ds-01 my-ds-02 h-px bg-surface-border', className)}\n {...props}\n />\n))\nMenubarSeparator.displayName = MenubarPrimitive.Separator.displayName\n\nconst MenubarShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n 'ml-auto text-ds-sm text-surface-fg-subtle',\n className,\n )}\n {...props}\n />\n )\n}\nMenubarShortcut.displayName = 'MenubarShortcut'\n\nexport type MenubarContentProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Content>\nexport type MenubarItemProps = React.ComponentPropsWithoutRef<typeof MenubarPrimitive.Item>\n\nexport {\n Menubar,\n MenubarCheckboxItem,\n MenubarContent,\n MenubarGroup,\n MenubarItem,\n MenubarLabel,\n MenubarMenu,\n MenubarPortal,\n MenubarRadioGroup,\n MenubarRadioItem,\n MenubarSeparator,\n MenubarShortcut,\n MenubarSub,\n MenubarSubContent,\n MenubarSubTrigger,\n MenubarTrigger,\n}\n"],"mappings":";;;;;;;;;;AAaA,IAAM,IAAwB,EAAM,cAAc,GAAM,EAElD,KAAuF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U,GAAG,KAAS,MACpC,kBAAC,GAAD;CACO;CACL,WAAW,EACT,2QACA,EACD;CACD,GAAI;WANN,CAQE,kBAAC,QAAD;EAAM,WAAU;YACd,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAY,WAAU,wBAAyB,CAAA,EAChB,CAAA;EAC5B,CAAA,EACP,kBAAC,QAAD;EAAM,WAAU;EAAoB;EAAgB,CAAA,CACzB;GAC7B;AACF,EAAiB,cAAA,EAAyC;AAE1D,IAAM,IAAe,EAAM,YAKxB,EAAE,cAAW,UAAO,GAAG,KAAS,MACjC,kBAAC,GAAD;CACO;CACL,WAAW,EACT,+CACA,KAAS,YACT,EACD;CACD,GAAI;CACJ,CAAA,CACF;AACF,EAAa,cAAA,EAAqC;AAElD,IAAM,IAAmB,EAAM,YAG5B,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,GAAD;CACO;CACL,WAAW,EAAG,6CAA6C,EAAU;CACrE,GAAI;CACJ,CAAA,CACF;AACF,EAAiB,cAAA,EAAyC;AAE1D,IAAM,KAAmB,EACvB,cACA,GAAG,QAGD,kBAAC,QAAD;CACE,WAAW,EACT,6CACA,EACD;CACD,GAAI;CACJ,CAAA;AAGN,EAAgB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-button.d.ts","sourceRoot":"","sources":["../../../src/ui/oauth-button/oauth-button.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"oauth-button.d.ts","sourceRoot":"","sources":["../../../src/ui/oauth-button/oauth-button.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAA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AA0E;IAC1E,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;IACzE,gCAAgC;IAChC,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,gCAAgC;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2DAA2D;IAC3D,IAAI,CAAC,EAAE,SAAS,CAAA;CACjB;AAED;;;;;GAKG;AACH,QAAA,MAAM,kBAAkB,gGAiEvB,CAAA;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA;AAI7B,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxF,QAAQ,EAAE,aAAa,CAAA;IACvB,oCAAoC;IACpC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;;;;GAKG;AACH,QAAA,MAAM,UAAU,uFASf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA;AAIrB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,aAAa,EAAE,MAAM,GAAE,WAAwB,EAAE,OAAO,UAAQ,GAAG,MAAM,CAEhH;AAED,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,CAE5D;AAID;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,KAAK;;;;;;;;CAQR,CAAA"}
|
package/dist/ui/select.js
CHANGED
|
@@ -10,7 +10,7 @@ import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
|
10
10
|
import { IconCheck as w, IconChevronDown as T, IconChevronUp as E } from "@tabler/icons-react";
|
|
11
11
|
import { motion as D } from "framer-motion";
|
|
12
12
|
//#region src/ui/select.tsx
|
|
13
|
-
var O = e, k = r, A = u, j = _("flex w-full items-center justify-between whitespace-nowrap rounded-control placeholder:text-surface-fg-subtle focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled [&>span]:line-clamp-1", {
|
|
13
|
+
var O = e, k = r, A = u, j = _("flex w-full items-center justify-between whitespace-nowrap rounded-control placeholder:text-surface-fg-subtle focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled [&>span]:line-clamp-1 [&>span]:min-w-0", {
|
|
14
14
|
variants: {
|
|
15
15
|
variant: {
|
|
16
16
|
default: "border border-surface-border-strong bg-surface-raised-hover focus-visible:border-accent-7",
|
|
@@ -125,7 +125,10 @@ var L = x.forwardRef(({ className: e, children: t, ...r }, i) => /* @__PURE__ */
|
|
|
125
125
|
icon: w,
|
|
126
126
|
size: "sm"
|
|
127
127
|
}) })
|
|
128
|
-
}), /* @__PURE__ */ S(a, {
|
|
128
|
+
}), /* @__PURE__ */ S(a, {
|
|
129
|
+
className: "min-w-0 line-clamp-1",
|
|
130
|
+
children: t
|
|
131
|
+
})]
|
|
129
132
|
}));
|
|
130
133
|
L.displayName = n.displayName;
|
|
131
134
|
var R = x.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ S(d, {
|
package/dist/ui/select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","names":[],"sources":["../../src/ui/select.tsx"],"sourcesContent":["'use client'\n\nimport * as SelectPrimitive from '@primitives/react-select'\nimport { IconCheck, IconChevronDown, IconChevronUp } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { useFormField } from './form'\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\n/**\n * Select root — manages open/close state and selected value.\n *\n * **Important:** `size` is NOT a prop on `Select`. Set it on `SelectTrigger` instead.\n * Passing `size` directly to `Select` produces no TypeScript error but has no effect.\n *\n * @example\n * // CORRECT — size goes on SelectTrigger:\n * <Select onValueChange={setValue}>\n * <SelectTrigger size=\"lg\">\n * <SelectValue placeholder=\"Choose...\" />\n * </SelectTrigger>\n * <SelectContent>\n * <SelectItem value=\"a\">Option A</SelectItem>\n * <SelectItem value=\"b\">Option B</SelectItem>\n * </SelectContent>\n * </Select>\n *\n * // WRONG — size on Select root is silently ignored (no TypeScript error):\n * // <Select size=\"lg\">...</Select>\n */\nconst Select = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nexport const selectTriggerVariants = cva(\n 'flex w-full items-center justify-between whitespace-nowrap rounded-control placeholder:text-surface-fg-subtle focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled [&>span]:line-clamp-1',\n {\n variants: {\n variant: {\n default:\n 'border border-surface-border-strong bg-surface-raised-hover focus-visible:border-accent-7',\n outline:\n 'border border-surface-border-strong bg-transparent focus-visible:border-accent-7',\n ghost:\n 'border border-transparent bg-transparent hover:bg-surface-raised-hover focus-visible:border-accent-7',\n },\n color: {\n default: '',\n error: 'border-error-7 text-error-11 focus-visible:ring-error-9',\n success: 'border-success-7',\n warning: 'border-warning-7',\n },\n size: {\n xs: 'h-ds-xs-plus text-ds-sm px-ds-02',\n sm: 'h-ds-sm text-ds-sm px-ds-03',\n md: 'h-ds-md text-ds-md px-ds-04',\n lg: 'h-ds-lg text-ds-md px-ds-05',\n },\n },\n defaultVariants: { variant: 'default', color: 'default', size: 'md' },\n },\n)\n\n/**\n * Props for SelectTrigger. Use `size` here (not on the `Select` root).\n *\n * @example\n * <SelectTrigger size=\"lg\" className=\"w-[200px]\">\n * <SelectValue placeholder=\"Select an option\" />\n * </SelectTrigger>\n */\nexport interface SelectTriggerProps\n extends Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, 'color'>,\n VariantProps<typeof selectTriggerVariants> {}\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n SelectTriggerProps\n>(({ className, children, variant, color, size, ...props }, ref) => {\n const fieldCtx = useFormField()\n const isError =\n color === 'error' ||\n (fieldCtx.state === 'error' && color == null)\n const ariaDescribedBy = props['aria-describedby'] ?? fieldCtx.helperTextId\n const ariaRequired = props['aria-required'] ?? fieldCtx.required\n\n return (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(selectTriggerVariants({ variant, color: isError && !color ? 'error' : color, size }), className)}\n aria-invalid={isError || undefined}\n aria-describedby={ariaDescribedBy}\n aria-required={ariaRequired || undefined}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <Icon icon={IconChevronDown} size=\"sm\" className=\"opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n})\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n 'flex cursor-default items-center justify-center py-ds-02',\n className,\n )}\n {...props}\n >\n <Icon icon={IconChevronUp} size=\"sm\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n 'flex cursor-default items-center justify-center py-ds-02',\n className,\n )}\n {...props}\n >\n <Icon icon={IconChevronDown} size=\"sm\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n asChild\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ ...springs.snappy, opacity: tweens.fade }}\n className={cn(\n 'relative z-popover max-h-96 min-w-[8rem] overflow-hidden rounded-overlay bg-surface-overlay text-surface-fg shadow-floating',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-ds-02',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </motion.div>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn('px-ds-03 py-ds-02b text-ds-md font-semibold', className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex w-full cursor-default select-none items-center rounded-control py-ds-02b pl-ds-03 pr-ds-07 text-ds-md outline-hidden transition-colors duration-fast-01 ease-productive-standard hover:bg-surface-raised focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Icon icon={IconCheck} size=\"sm\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn('-mx-ds-01 my-ds-02 h-px bg-surface-border', className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"],"mappings":";;;;;;;;;;;;AAkCA,IAAM,IAAS,GAET,IAAc,GAEd,IAAc,GAEP,IAAwB,EACnC,8SACA;CACE,UAAU;EACR,SAAS;GACP,SACE;GACF,SACE;GACF,OACE;GACH;EACD,OAAO;GACL,SAAS;GACT,OAAO;GACP,SAAS;GACT,SAAS;GACV;EACD,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EAAE,SAAS;EAAW,OAAO;EAAW,MAAM;EAAM;CACtE,CACF,EAcK,IAAgB,EAAM,YAGzB,EAAE,cAAW,aAAU,YAAS,UAAO,SAAM,GAAG,KAAS,MAAQ;CAClE,IAAM,IAAW,GAAc,EACzB,IACJ,MAAU,WACT,EAAS,UAAU,WAAW,KAAS,MAC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;GAWE,kBAAC,GAAD,EAAwB,CAAA;GACxB,kBAAC,GAAD;IACE,WAAW,EACT,WACA,MAAa,YACX,0FACH;IAEA;IACwB,CAAA;GAC3B,kBAAC,GAAD,EAA0B,CAAA;GACf;;CACW,CAAA,EACH,CAAA,CACzB;AACF,EAAc,cAAA,EAAsC;AAEpD,IAAM,IAAc,EAAM,YAGvB,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,GAAD;CACO;CACL,WAAW,EAAG,+CAA+C,EAAU;CACvE,GAAI;CACJ,CAAA,CACF;AACF,EAAY,cAAA,EAAoC;AAEhD,IAAM,IAAa,EAAM,YAGtB,EAAE,cAAW,aAAU,GAAG,KAAS,MACpC,kBAAC,GAAD;CACO;CACL,WAAW,EACT,oVACA,EACD;CACD,GAAI;WANN,CAQE,kBAAC,QAAD;EAAM,WAAU;YACd,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;GAAM,MAAM;GAAW,MAAK;GAAO,CAAA,EACL,CAAA;EAC3B,CAAA,EACP,kBAAC,GAAD,EAA2B,aAAoC,CAAA,CAC1C;GACvB;AACF,EAAW,cAAA,EAAmC;AAE9C,IAAM,IAAkB,EAAM,YAG3B,EAAE,cAAW,GAAG,KAAS,MAC1B,kBAAC,GAAD;CACO;CACL,WAAW,EAAG,6CAA6C,EAAU;CACrE,GAAI;CACJ,CAAA,CACF;AACF,EAAgB,cAAA,EAAwC"}
|
|
1
|
+
{"version":3,"file":"select.js","names":[],"sources":["../../src/ui/select.tsx"],"sourcesContent":["'use client'\n\nimport * as SelectPrimitive from '@primitives/react-select'\nimport { IconCheck, IconChevronDown, IconChevronUp } from '@tabler/icons-react'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport { motion } from 'framer-motion'\nimport * as React from 'react'\n\nimport { useFormField } from './form'\nimport { Icon } from './icon'\nimport { springs, tweens } from './lib/motion'\nimport { cn } from './lib/utils'\n\n/**\n * Select root — manages open/close state and selected value.\n *\n * **Important:** `size` is NOT a prop on `Select`. Set it on `SelectTrigger` instead.\n * Passing `size` directly to `Select` produces no TypeScript error but has no effect.\n *\n * @example\n * // CORRECT — size goes on SelectTrigger:\n * <Select onValueChange={setValue}>\n * <SelectTrigger size=\"lg\">\n * <SelectValue placeholder=\"Choose...\" />\n * </SelectTrigger>\n * <SelectContent>\n * <SelectItem value=\"a\">Option A</SelectItem>\n * <SelectItem value=\"b\">Option B</SelectItem>\n * </SelectContent>\n * </Select>\n *\n * // WRONG — size on Select root is silently ignored (no TypeScript error):\n * // <Select size=\"lg\">...</Select>\n */\nconst Select = SelectPrimitive.Root\n\nconst SelectGroup = SelectPrimitive.Group\n\nconst SelectValue = SelectPrimitive.Value\n\nexport const selectTriggerVariants = cva(\n 'flex w-full items-center justify-between whitespace-nowrap rounded-control placeholder:text-surface-fg-subtle focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled [&>span]:line-clamp-1 [&>span]:min-w-0',\n {\n variants: {\n variant: {\n default:\n 'border border-surface-border-strong bg-surface-raised-hover focus-visible:border-accent-7',\n outline:\n 'border border-surface-border-strong bg-transparent focus-visible:border-accent-7',\n ghost:\n 'border border-transparent bg-transparent hover:bg-surface-raised-hover focus-visible:border-accent-7',\n },\n color: {\n default: '',\n error: 'border-error-7 text-error-11 focus-visible:ring-error-9',\n success: 'border-success-7',\n warning: 'border-warning-7',\n },\n size: {\n xs: 'h-ds-xs-plus text-ds-sm px-ds-02',\n sm: 'h-ds-sm text-ds-sm px-ds-03',\n md: 'h-ds-md text-ds-md px-ds-04',\n lg: 'h-ds-lg text-ds-md px-ds-05',\n },\n },\n defaultVariants: { variant: 'default', color: 'default', size: 'md' },\n },\n)\n\n/**\n * Props for SelectTrigger. Use `size` here (not on the `Select` root).\n *\n * @example\n * <SelectTrigger size=\"lg\" className=\"w-[200px]\">\n * <SelectValue placeholder=\"Select an option\" />\n * </SelectTrigger>\n */\nexport interface SelectTriggerProps\n extends Omit<React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, 'color'>,\n VariantProps<typeof selectTriggerVariants> {}\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n SelectTriggerProps\n>(({ className, children, variant, color, size, ...props }, ref) => {\n const fieldCtx = useFormField()\n const isError =\n color === 'error' ||\n (fieldCtx.state === 'error' && color == null)\n const ariaDescribedBy = props['aria-describedby'] ?? fieldCtx.helperTextId\n const ariaRequired = props['aria-required'] ?? fieldCtx.required\n\n return (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(selectTriggerVariants({ variant, color: isError && !color ? 'error' : color, size }), className)}\n aria-invalid={isError || undefined}\n aria-describedby={ariaDescribedBy}\n aria-required={ariaRequired || undefined}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <Icon icon={IconChevronDown} size=\"sm\" className=\"opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n )\n})\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n 'flex cursor-default items-center justify-center py-ds-02',\n className,\n )}\n {...props}\n >\n <Icon icon={IconChevronUp} size=\"sm\" />\n </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n 'flex cursor-default items-center justify-center py-ds-02',\n className,\n )}\n {...props}\n >\n <Icon icon={IconChevronDown} size=\"sm\" />\n </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n position={position}\n asChild\n {...props}\n >\n <motion.div\n initial={{ opacity: 0, scale: 0.95 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ ...springs.snappy, opacity: tweens.fade }}\n className={cn(\n 'relative z-popover max-h-96 min-w-[8rem] overflow-hidden rounded-overlay bg-surface-overlay text-surface-fg shadow-floating',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n className,\n )}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-ds-02',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </motion.div>\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn('px-ds-03 py-ds-02b text-ds-md font-semibold', className)}\n {...props}\n />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex w-full cursor-default select-none items-center rounded-control py-ds-02b pl-ds-03 pr-ds-07 text-ds-md outline-hidden transition-colors duration-fast-01 ease-productive-standard hover:bg-surface-raised focus:bg-surface-raised focus:text-surface-fg data-[disabled]:pointer-events-none data-[disabled]:opacity-action-disabled',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-ds-03 flex h-ico-sm w-ico-sm items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Icon icon={IconCheck} size=\"sm\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText className=\"min-w-0 line-clamp-1\">{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn('-mx-ds-01 my-ds-02 h-px bg-surface-border', className)}\n {...props}\n />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n}\n"],"mappings":";;;;;;;;;;;;AAkCA,IAAM,IAAS,GAET,IAAc,GAEd,IAAc,GAEP,IAAwB,EACnC,+TACA;CACE,UAAU;EACR,SAAS;GACP,SACE;GACF,SACE;GACF,OACE;GACH;EACD,OAAO;GACL,SAAS;GACT,OAAO;GACP,SAAS;GACT,SAAS;GACV;EACD,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EAAE,SAAS;EAAW,OAAO;EAAW,MAAM;EAAM;CACtE,CACF,EAcK,IAAgB,EAAM,YAGzB,EAAE,cAAW,aAAU,YAAS,UAAO,SAAM,GAAG,KAAS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