@gv-tech/ui-web 2.29.1 → 2.29.3
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/dist/accordion.cjs +1 -1
- package/dist/accordion.mjs +53 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.mjs +99 -2
- package/dist/alert.cjs +1 -1
- package/dist/alert.mjs +2 -3
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.mjs +10 -2
- package/dist/attachment.cjs +1 -1
- package/dist/attachment.mjs +26 -26
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.mjs +49 -2
- package/dist/badge.cjs +1 -1
- package/dist/badge.mjs +5 -5
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.mjs +13 -13
- package/dist/bubble.cjs +1 -1
- package/dist/bubble.mjs +5 -5
- package/dist/button-group.cjs +1 -1
- package/dist/button-group.mjs +13 -13
- package/dist/button.cjs +1 -1
- package/dist/button.mjs +5 -5
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.mjs +97 -2
- package/dist/card.cjs +1 -1
- package/dist/card.mjs +2 -3
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.mjs +107 -2
- package/dist/chart.cjs +2 -2
- package/dist/chart.mjs +14 -15
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.mjs +19 -2
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.mjs +13 -14
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.mjs +161 -2
- package/dist/command.cjs +1 -1
- package/dist/command.mjs +89 -2
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.mjs +123 -2
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.mjs +41 -42
- package/dist/direction.cjs +1 -1
- package/dist/direction.mjs +8 -9
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.mjs +2 -3
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.mjs +126 -2
- package/dist/empty.cjs +1 -1
- package/dist/empty.mjs +2 -3
- package/dist/field.cjs +1 -1
- package/dist/field.mjs +37 -38
- package/dist/form.cjs +1 -1
- package/dist/form.mjs +34 -35
- package/dist/hooks/use-theme.d.ts +52 -52
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.mjs +30 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +66 -66
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.mjs +27 -28
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.mjs +45 -2
- package/dist/input.cjs +1 -1
- package/dist/input.mjs +2 -3
- package/dist/item.cjs +1 -1
- package/dist/item.mjs +29 -29
- package/dist/kbd.cjs +1 -1
- package/dist/kbd.mjs +2 -3
- package/dist/label.cjs +1 -1
- package/dist/label.mjs +13 -2
- package/dist/marker.cjs +1 -1
- package/dist/marker.mjs +5 -5
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.mjs +133 -2
- package/dist/message-scroller.cjs +1 -1
- package/dist/message-scroller.mjs +59 -2
- package/dist/message.cjs +1 -1
- package/dist/message.mjs +2 -3
- package/dist/native-select.cjs +1 -1
- package/dist/native-select.mjs +2 -3
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.mjs +79 -2
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.mjs +15 -16
- package/dist/popover.cjs +1 -1
- package/dist/popover.mjs +54 -2
- package/dist/progress.cjs +1 -1
- package/dist/progress.mjs +19 -2
- package/dist/questionnaire.cjs +1 -1
- package/dist/questionnaire.mjs +168 -2
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.mjs +25 -2
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.mjs +26 -2
- package/dist/rolldown-runtime-BocRIvOZ.js +1 -0
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.mjs +35 -2
- package/dist/scroll-to-top.cjs +1 -1
- package/dist/scroll-to-top.mjs +6 -11
- package/dist/search.cjs +1 -1
- package/dist/search.mjs +12 -13
- package/dist/select.cjs +1 -1
- package/dist/select.mjs +98 -2
- package/dist/separator.cjs +1 -1
- package/dist/separator.mjs +15 -2
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.mjs +39 -40
- package/dist/{sidebar-DM9ee9wf.mjs → sidebar-DrU3nKaL.mjs} +137 -135
- package/dist/sidebar-uOtFHnBs.js +1 -0
- package/dist/sidebar.cjs +1 -1
- package/dist/sidebar.mjs +3 -2
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.mjs +2 -3
- package/dist/slider.cjs +1 -1
- package/dist/slider.mjs +34 -2
- package/dist/sonner.mjs +1 -2
- package/dist/spinner.cjs +1 -1
- package/dist/spinner.mjs +2 -3
- package/dist/support-fab.cjs +1 -1
- package/dist/support-fab.mjs +21 -22
- package/dist/switch.cjs +1 -1
- package/dist/switch.mjs +18 -2
- package/dist/table-of-contents.cjs +1 -1
- package/dist/table-of-contents.mjs +5 -6
- package/dist/table.cjs +1 -1
- package/dist/table.mjs +2 -3
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.mjs +44 -2
- package/dist/text.cjs +1 -1
- package/dist/text.mjs +14 -12
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.mjs +2 -3
- package/dist/theme-provider.mjs +1 -2
- package/dist/{theme-toggle-3RStptYf.mjs → theme-toggle-9KtAIRxy.mjs} +18 -20
- package/dist/theme-toggle-DkNI3bfh.js +1 -0
- package/dist/theme-toggle.cjs +1 -1
- package/dist/theme-toggle.mjs +2 -2
- package/dist/toast.cjs +1 -1
- package/dist/toast.mjs +52 -2
- package/dist/{toaster-gT2b7mfE.mjs → toaster-8RrHPtlc.mjs} +10 -12
- package/dist/toaster-AFud4l6l.js +1 -0
- package/dist/toaster.cjs +1 -1
- package/dist/toaster.mjs +2 -2
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.mjs +49 -2
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.mjs +35 -2
- package/dist/tooltip.cjs +1 -1
- package/dist/tooltip.mjs +34 -2
- package/dist/{utils-A_oVsYw5.mjs → utils-DQKc9joa.mjs} +1 -2
- package/package.json +3 -3
- package/dist/accordion-D5QXSsCK.mjs +0 -248
- package/dist/accordion-DjyDOX-h.js +0 -1
- package/dist/alert-dialog-B-a0Wa1M.mjs +0 -182
- package/dist/alert-dialog-DYQAhGBC.js +0 -1
- package/dist/aspect-ratio-C-KOOyGP.js +0 -1
- package/dist/aspect-ratio-s7Ji1MSr.mjs +0 -40
- package/dist/avatar-4K3XjhP8.js +0 -1
- package/dist/avatar-d8Di248f.mjs +0 -138
- package/dist/calendar-DFj14O6r.js +0 -1
- package/dist/calendar-UW8h9dfh.mjs +0 -3182
- package/dist/carousel-CNGpg5df.js +0 -1
- package/dist/carousel-DG9xGJns.mjs +0 -1171
- package/dist/checkbox-BCgbTAdU.js +0 -1
- package/dist/checkbox-Dq8VHKDH.mjs +0 -186
- package/dist/chunk-BmowowmI.mjs +0 -14
- package/dist/chunk-HBS6WEDP-CQNaACTf.js +0 -1
- package/dist/chunk-HBS6WEDP-aK8IuEX9.mjs +0 -63
- package/dist/chunk-mLOUI7ql.js +0 -1
- package/dist/combobox-CpPIGtPJ.js +0 -4
- package/dist/combobox-b4OmCNw1.mjs +0 -5887
- package/dist/command-5hobOyGG.mjs +0 -545
- package/dist/command-Dbqnm9kI.js +0 -1
- package/dist/context-menu-DyTUismw.js +0 -1
- package/dist/context-menu-DzzU-_v8.mjs +0 -317
- package/dist/dist-1zUKVGvf.js +0 -1
- package/dist/dist-B057I8ju.mjs +0 -30
- package/dist/dist-BB78QQyQ.mjs +0 -41
- package/dist/dist-BBvidwzC.js +0 -1
- package/dist/dist-BEbV0Hal.mjs +0 -45
- package/dist/dist-BPL7gUpg.mjs +0 -18
- package/dist/dist-BTUvBzOm.js +0 -1
- package/dist/dist-BU-TFzJf.js +0 -1
- package/dist/dist-Bb5W_J2F.mjs +0 -39
- package/dist/dist-BbI6NHqR.mjs +0 -23
- package/dist/dist-BexAB6yo.mjs +0 -192
- package/dist/dist-BgXIqHHq.js +0 -1
- package/dist/dist-Bvfb4y_L.mjs +0 -100
- package/dist/dist-C8Pm6LRc.js +0 -1
- package/dist/dist-CGgemr2V.js +0 -1
- package/dist/dist-CPAF050o.mjs +0 -90
- package/dist/dist-CS572Be42.mjs +0 -11
- package/dist/dist-CUvxOuXM.mjs +0 -551
- package/dist/dist-C_iFkwIX.js +0 -1
- package/dist/dist-ClYM7l1t.js +0 -1
- package/dist/dist-CpKLY_uZ.mjs +0 -96
- package/dist/dist-D1qkELLT.js +0 -1
- package/dist/dist-D7-Fky36.js +0 -1
- package/dist/dist-DEpkkABT.js +0 -1
- package/dist/dist-DI1vapnL.mjs +0 -20
- package/dist/dist-DJqkhIXb2.js +0 -1
- package/dist/dist-DKXojpVG.js +0 -1
- package/dist/dist-DYUvPCPC.js +0 -1
- package/dist/dist-DZiOPWLp.js +0 -1
- package/dist/dist-DatgTWLz.mjs +0 -202
- package/dist/dist-Dm3IQk5b.mjs +0 -685
- package/dist/dist-DoivLw3t.js +0 -1
- package/dist/dist-Dq-h6VAy.mjs +0 -118
- package/dist/dist-Dt6m-kwU.mjs +0 -221
- package/dist/dist-E8ieJTBC.mjs +0 -190
- package/dist/dist-GazS1kfR.mjs +0 -5
- package/dist/dist-N97cIp0_.js +0 -1
- package/dist/dist-OqDzLHTa.mjs +0 -460
- package/dist/dist-Qm9hFvM1.js +0 -1
- package/dist/dist-UkWa-Arh.mjs +0 -16
- package/dist/dist-UnTrOmPV.js +0 -1
- package/dist/dist-YAADIsyo.js +0 -1
- package/dist/dist-Zs2sjYhL.js +0 -1
- package/dist/dist-hFLuJoMi.js +0 -1
- package/dist/dist-s7ibhASj.mjs +0 -181
- package/dist/dist-vu20fMUK.mjs +0 -93
- package/dist/dropdown-menu-BqAhn64y.mjs +0 -313
- package/dist/dropdown-menu-BtKOr--r.js +0 -1
- package/dist/es2015-DbAsWDbs.js +0 -41
- package/dist/es2015-DbsmTzuc.mjs +0 -571
- package/dist/floating-ui.react-dom-BwFRxNGc.js +0 -1
- package/dist/floating-ui.react-dom-CyupHsR6.mjs +0 -1062
- package/dist/hover-card-DMsxpR9G.mjs +0 -178
- package/dist/hover-card-DWXusgiI.js +0 -1
- package/dist/input-otp-D49Y9VcH.mjs +0 -409
- package/dist/input-otp-u3obpt-Q.js +0 -20
- package/dist/label-Dacwh21G.js +0 -1
- package/dist/label-DsSICLPc.mjs +0 -28
- package/dist/menubar-BYNeRuzx.js +0 -1
- package/dist/menubar-DZqEj6S1.mjs +0 -407
- package/dist/message-scroller-CS4t7Ypn.mjs +0 -824
- package/dist/message-scroller-DqLu0YI6.js +0 -1
- package/dist/navigation-menu-B36G3O83.js +0 -1
- package/dist/navigation-menu-RO6thDOF.mjs +0 -636
- package/dist/popover-DSBkc70V.mjs +0 -243
- package/dist/popover-DUHbvKB8.js +0 -1
- package/dist/progress-B9z08UXf.js +0 -6
- package/dist/progress-CQ4nQ85t.mjs +0 -92
- package/dist/questionnaire-CVED7G7R.mjs +0 -1159
- package/dist/questionnaire-PWClWvST.js +0 -1
- package/dist/radio-group-Bd3WbH5I.js +0 -1
- package/dist/radio-group-TRiAhMZB.mjs +0 -266
- package/dist/resizable-Cq60hEWB.js +0 -1
- package/dist/resizable-Qc8cVUKd.mjs +0 -2857
- package/dist/scroll-area-D6MiNHnJ.mjs +0 -564
- package/dist/scroll-area-DFUdJeSZ.js +0 -1
- package/dist/select-BFJUmjvX.mjs +0 -830
- package/dist/select-iQFoKU1s.js +0 -1
- package/dist/separator-2kr96SyF.mjs +0 -40
- package/dist/separator-Bo49G2aj.js +0 -1
- package/dist/sidebar-C6O8hLkz.js +0 -1
- package/dist/slider-CagVxozY.js +0 -1
- package/dist/slider-CdTCoQu1.mjs +0 -485
- package/dist/switch-CoeAC1Wk.js +0 -1
- package/dist/switch-zUBdj7jK.mjs +0 -174
- package/dist/tabs-DaE9pEbo.mjs +0 -160
- package/dist/tabs-TMhXe20x.js +0 -1
- package/dist/theme-toggle-DKh8WFLT.js +0 -1
- package/dist/toast-B0S3F09s.js +0 -1
- package/dist/toast-D0Yb-K84.mjs +0 -445
- package/dist/toaster-CX9im8R_.js +0 -1
- package/dist/toggle-B0hXPsi7.js +0 -1
- package/dist/toggle-BAeKd2N0.mjs +0 -59
- package/dist/toggle-group-CEKhUozD.mjs +0 -167
- package/dist/toggle-group-htyug3G7.js +0 -1
- package/dist/tooltip-BZazhXDZ.js +0 -1
- package/dist/tooltip-R_nK_Qh5.mjs +0 -390
package/dist/drawer.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { cn as e } from "cn";
|
|
3
3
|
import "react";
|
|
4
4
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
5
5
|
import { Drawer as r } from "vaul";
|
|
6
|
-
|
|
6
|
+
// src/drawer.tsx
|
|
7
7
|
function i({ ...e }) {
|
|
8
8
|
return /* @__PURE__ */ t(r.Root, {
|
|
9
9
|
"data-slot": "drawer",
|
|
@@ -74,5 +74,4 @@ function p({ className: n, ...i }) {
|
|
|
74
74
|
...i
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
//#endregion
|
|
78
77
|
export { i as Drawer, s as DrawerClose, l as DrawerContent, p as DrawerDescription, d as DrawerFooter, u as DrawerHeader, c as DrawerOverlay, o as DrawerPortal, f as DrawerTitle, a as DrawerTrigger };
|
package/dist/dropdown-menu.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./dropdown-menu-
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.js");let t=require("cn"),n=require("lucide-react"),r=require("radix-ui"),i=require("react");i=e.t(i);let a=require("react/jsx-runtime");function o({...e}){return(0,a.jsx)(r.DropdownMenu.Root,{"data-slot":`dropdown-menu`,...e})}function s({...e}){return(0,a.jsx)(r.DropdownMenu.Portal,{"data-slot":`dropdown-menu-portal`,...e})}function c({...e}){return(0,a.jsx)(r.DropdownMenu.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function l({className:e,align:n=`start`,sideOffset:i=4,...o}){return(0,a.jsx)(r.DropdownMenu.Portal,{children:(0,a.jsx)(r.DropdownMenu.Content,{"data-slot":`dropdown-menu-content`,sideOffset:i,align:n,className:(0,t.cn)(`bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100 data-[state=closed]:overflow-hidden`,e),...o})})}function u({...e}){return(0,a.jsx)(r.DropdownMenu.Group,{"data-slot":`dropdown-menu-group`,...e})}function d({className:e,inset:n,variant:i=`default`,...o}){return(0,a.jsx)(r.DropdownMenu.Item,{"data-slot":`dropdown-menu-item`,"data-inset":n,"data-variant":i,className:(0,t.cn)(`group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...o})}function f({className:e,children:i,checked:o,inset:s,...c}){return(0,a.jsxs)(r.DropdownMenu.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,"data-inset":s,className:(0,t.cn)(`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),checked:o,...c,children:[(0,a.jsx)(`span`,{className:`pointer-events-none absolute end-2 flex items-center justify-center`,"data-slot":`dropdown-menu-checkbox-item-indicator`,children:(0,a.jsx)(r.DropdownMenu.ItemIndicator,{children:(0,a.jsx)(n.CheckIcon,{})})}),i]})}function p({...e}){return(0,a.jsx)(r.DropdownMenu.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function m({className:e,children:i,inset:o,...s}){return(0,a.jsxs)(r.DropdownMenu.RadioItem,{"data-slot":`dropdown-menu-radio-item`,"data-inset":o,className:(0,t.cn)(`focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...s,children:[(0,a.jsx)(`span`,{className:`pointer-events-none absolute end-2 flex items-center justify-center`,"data-slot":`dropdown-menu-radio-item-indicator`,children:(0,a.jsx)(r.DropdownMenu.ItemIndicator,{children:(0,a.jsx)(n.CheckIcon,{})})}),i]})}function h({className:e,inset:n,...i}){return(0,a.jsx)(r.DropdownMenu.Label,{"data-slot":`dropdown-menu-label`,"data-inset":n,className:(0,t.cn)(`text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7`,e),...i})}function g({className:e,...n}){return(0,a.jsx)(r.DropdownMenu.Separator,{"data-slot":`dropdown-menu-separator`,className:(0,t.cn)(`bg-border -mx-1 my-1 h-px`,e),...n})}function _({className:e,...n}){return(0,a.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:(0,t.cn)(`text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ms-auto text-xs tracking-widest`,e),...n})}function v({...e}){return(0,a.jsx)(r.DropdownMenu.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function y({className:e,inset:i,children:o,...s}){return(0,a.jsxs)(r.DropdownMenu.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,"data-inset":i,className:(0,t.cn)(`focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...s,children:[o,(0,a.jsx)(n.ChevronRightIcon,{className:`ms-auto rtl:rotate-180`})]})}function b({className:e,...n}){return(0,a.jsx)(r.DropdownMenu.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:(0,t.cn)(`bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg p-1 shadow-lg ring-1 duration-100`,e),...n})}exports.DropdownMenu=o,exports.DropdownMenuCheckboxItem=f,exports.DropdownMenuContent=l,exports.DropdownMenuGroup=u,exports.DropdownMenuItem=d,exports.DropdownMenuLabel=h,exports.DropdownMenuPortal=s,exports.DropdownMenuRadioGroup=p,exports.DropdownMenuRadioItem=m,exports.DropdownMenuSeparator=g,exports.DropdownMenuShortcut=_,exports.DropdownMenuSub=v,exports.DropdownMenuSubContent=b,exports.DropdownMenuSubTrigger=y,exports.DropdownMenuTrigger=c;
|
package/dist/dropdown-menu.mjs
CHANGED
|
@@ -1,4 +1,128 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { cn as e } from "cn";
|
|
4
|
+
import { CheckIcon as t, ChevronRightIcon as n } from "lucide-react";
|
|
5
|
+
import { DropdownMenu as r } from "radix-ui";
|
|
6
|
+
import "react";
|
|
7
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
8
|
+
// src/dropdown-menu.tsx
|
|
9
|
+
function o({ ...e }) {
|
|
10
|
+
return /* @__PURE__ */ i(r.Root, {
|
|
11
|
+
"data-slot": "dropdown-menu",
|
|
12
|
+
...e
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function s({ ...e }) {
|
|
16
|
+
return /* @__PURE__ */ i(r.Portal, {
|
|
17
|
+
"data-slot": "dropdown-menu-portal",
|
|
18
|
+
...e
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function c({ ...e }) {
|
|
22
|
+
return /* @__PURE__ */ i(r.Trigger, {
|
|
23
|
+
"data-slot": "dropdown-menu-trigger",
|
|
24
|
+
...e
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
function l({ className: t, align: n = "start", sideOffset: a = 4, ...o }) {
|
|
28
|
+
return /* @__PURE__ */ i(r.Portal, { children: /* @__PURE__ */ i(r.Content, {
|
|
29
|
+
"data-slot": "dropdown-menu-content",
|
|
30
|
+
sideOffset: a,
|
|
31
|
+
align: n,
|
|
32
|
+
className: e("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) min-w-32 origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100 data-[state=closed]:overflow-hidden", t),
|
|
33
|
+
...o
|
|
34
|
+
}) });
|
|
35
|
+
}
|
|
36
|
+
function u({ ...e }) {
|
|
37
|
+
return /* @__PURE__ */ i(r.Group, {
|
|
38
|
+
"data-slot": "dropdown-menu-group",
|
|
39
|
+
...e
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
function d({ className: t, inset: n, variant: a = "default", ...o }) {
|
|
43
|
+
return /* @__PURE__ */ i(r.Item, {
|
|
44
|
+
"data-slot": "dropdown-menu-item",
|
|
45
|
+
"data-inset": n,
|
|
46
|
+
"data-variant": a,
|
|
47
|
+
className: e("group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
48
|
+
...o
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
function f({ className: n, children: o, checked: s, inset: c, ...l }) {
|
|
52
|
+
return /* @__PURE__ */ a(r.CheckboxItem, {
|
|
53
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
54
|
+
"data-inset": c,
|
|
55
|
+
className: e("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", n),
|
|
56
|
+
checked: s,
|
|
57
|
+
...l,
|
|
58
|
+
children: [/* @__PURE__ */ i("span", {
|
|
59
|
+
className: "pointer-events-none absolute end-2 flex items-center justify-center",
|
|
60
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
61
|
+
children: /* @__PURE__ */ i(r.ItemIndicator, { children: /* @__PURE__ */ i(t, {}) })
|
|
62
|
+
}), o]
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
function p({ ...e }) {
|
|
66
|
+
return /* @__PURE__ */ i(r.RadioGroup, {
|
|
67
|
+
"data-slot": "dropdown-menu-radio-group",
|
|
68
|
+
...e
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function m({ className: n, children: o, inset: s, ...c }) {
|
|
72
|
+
return /* @__PURE__ */ a(r.RadioItem, {
|
|
73
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
74
|
+
"data-inset": s,
|
|
75
|
+
className: e("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", n),
|
|
76
|
+
...c,
|
|
77
|
+
children: [/* @__PURE__ */ i("span", {
|
|
78
|
+
className: "pointer-events-none absolute end-2 flex items-center justify-center",
|
|
79
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
80
|
+
children: /* @__PURE__ */ i(r.ItemIndicator, { children: /* @__PURE__ */ i(t, {}) })
|
|
81
|
+
}), o]
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
function h({ className: t, inset: n, ...a }) {
|
|
85
|
+
return /* @__PURE__ */ i(r.Label, {
|
|
86
|
+
"data-slot": "dropdown-menu-label",
|
|
87
|
+
"data-inset": n,
|
|
88
|
+
className: e("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:ps-7", t),
|
|
89
|
+
...a
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
function g({ className: t, ...n }) {
|
|
93
|
+
return /* @__PURE__ */ i(r.Separator, {
|
|
94
|
+
"data-slot": "dropdown-menu-separator",
|
|
95
|
+
className: e("bg-border -mx-1 my-1 h-px", t),
|
|
96
|
+
...n
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
function _({ className: t, ...n }) {
|
|
100
|
+
return /* @__PURE__ */ i("span", {
|
|
101
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
102
|
+
className: e("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ms-auto text-xs tracking-widest", t),
|
|
103
|
+
...n
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
function v({ ...e }) {
|
|
107
|
+
return /* @__PURE__ */ i(r.Sub, {
|
|
108
|
+
"data-slot": "dropdown-menu-sub",
|
|
109
|
+
...e
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function y({ className: t, inset: o, children: s, ...c }) {
|
|
113
|
+
return /* @__PURE__ */ a(r.SubTrigger, {
|
|
114
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
115
|
+
"data-inset": o,
|
|
116
|
+
className: e("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none data-inset:ps-7 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", t),
|
|
117
|
+
...c,
|
|
118
|
+
children: [s, /* @__PURE__ */ i(n, { className: "ms-auto rtl:rotate-180" })]
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
function b({ className: t, ...n }) {
|
|
122
|
+
return /* @__PURE__ */ i(r.SubContent, {
|
|
123
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
124
|
+
className: e("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 min-w-[96px] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-lg p-1 shadow-lg ring-1 duration-100", t),
|
|
125
|
+
...n
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
export { o as DropdownMenu, f as DropdownMenuCheckboxItem, l as DropdownMenuContent, u as DropdownMenuGroup, d as DropdownMenuItem, h as DropdownMenuLabel, s as DropdownMenuPortal, p as DropdownMenuRadioGroup, m as DropdownMenuRadioItem, g as DropdownMenuSeparator, _ as DropdownMenuShortcut, v as DropdownMenuSub, b as DropdownMenuSubContent, y as DropdownMenuSubTrigger, c as DropdownMenuTrigger };
|
package/dist/empty.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("cn"),t=require("react/jsx-runtime"),n=require("class-variance-authority");function r({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`empty`,className:(0,e.cn)(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,n),...r})}function i({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`empty-header`,className:(0,e.cn)(`flex max-w-sm flex-col items-center gap-2`,n),...r})}var a=(0,n.cva)(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`bg-muted text-foreground flex size-8 shrink-0 items-center justify-center rounded-lg [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function o({className:n,variant:r=`default`,...i}){return(0,t.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":r,className:(0,e.cn)(a({variant:r,className:n})),...i})}function s({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`empty-title`,className:(0,e.cn)(`text-sm font-medium tracking-tight`,n),...r})}function c({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`empty-description`,className:(0,e.cn)(`text-muted-foreground [&>a:hover]:text-primary text-sm/relaxed [&>a]:underline [&>a]:underline-offset-4`,n),...r})}function l({className:n,...r}){return(0,t.jsx)(`div`,{"data-slot":`empty-content`,className:(0,e.cn)(`flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance`,n),...r})}exports.Empty=r,exports.EmptyContent=l,exports.EmptyDescription=c,exports.EmptyHeader=i,exports.EmptyMedia=o,exports.EmptyTitle=s;
|
package/dist/empty.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { cn as e } from "cn";
|
|
3
3
|
import { jsx as t } from "react/jsx-runtime";
|
|
4
4
|
import { cva as n } from "class-variance-authority";
|
|
5
|
-
|
|
5
|
+
// src/empty.tsx
|
|
6
6
|
function r({ className: n, ...r }) {
|
|
7
7
|
return /* @__PURE__ */ t("div", {
|
|
8
8
|
"data-slot": "empty",
|
|
@@ -56,5 +56,4 @@ function l({ className: n, ...r }) {
|
|
|
56
56
|
...r
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
//#endregion
|
|
60
59
|
export { r as Empty, l as EmptyContent, c as EmptyDescription, i as EmptyHeader, o as EmptyMedia, s as EmptyTitle };
|
package/dist/field.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./label.cjs"),t=require("./separator.cjs");let n=require("cn"),r=require("react"),i=require("react/jsx-runtime"),a=require("class-variance-authority");function o({className:e,...t}){return(0,i.jsx)(`fieldset`,{"data-slot":`field-set`,className:(0,n.cn)(`flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t})}function s({className:e,variant:t=`legend`,...r}){return(0,i.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:(0,n.cn)(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...r})}function c({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-group`,className:(0,n.cn)(`group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4`,e),...t})}var l=(0,a.cva)(`group/field data-[invalid=true]:text-destructive flex w-full gap-2`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function u({className:e,orientation:t=`vertical`,...r}){return(0,i.jsx)(`fieldset`,{"data-slot":`field`,"data-orientation":t,className:(0,n.cn)(l({orientation:t}),e),...r})}function d({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-content`,className:(0,n.cn)(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,e),...t})}function f({className:t,...r}){return(0,i.jsx)(e.Label,{"data-slot":`field-label`,className:(0,n.cn)(`group/field-label peer/field-label has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-2.5`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,t),...r})}function p({className:e,...t}){return(0,i.jsx)(`div`,{"data-slot":`field-label`,className:(0,n.cn)(`flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50`,e),...t})}function m({className:e,...t}){return(0,i.jsx)(`p`,{"data-slot":`field-description`,className:(0,n.cn)(`text-muted-foreground text-start text-sm leading-normal font-normal group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4`,e),...t})}function h({children:e,className:r,...a}){return(0,i.jsxs)(`div`,{"data-slot":`field-separator`,"data-content":!!e,className:(0,n.cn)(`relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2`,r),...a,children:[(0,i.jsx)(t.Separator,{className:`absolute inset-0 top-1/2`}),e&&(0,i.jsx)(`span`,{className:`bg-background text-muted-foreground relative mx-auto block w-fit px-2`,"data-slot":`field-separator-content`,children:e})]})}function g({className:e,children:t,errors:a,...o}){let s=(0,r.useMemo)(()=>{if(t)return t;if(!a?.length)return null;let e=[...new Map(a.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,i.jsx)(`ul`,{className:`ms-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,i.jsx)(`li`,{children:e.message},t))})},[t,a]);return s?(0,i.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:(0,n.cn)(`text-destructive text-sm font-normal`,e),...o,children:s}):null}exports.Field=u,exports.FieldContent=d,exports.FieldDescription=m,exports.FieldError=g,exports.FieldGroup=c,exports.FieldLabel=f,exports.FieldLegend=s,exports.FieldSeparator=h,exports.FieldSet=o,exports.FieldTitle=p;
|
package/dist/field.mjs
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
4
|
-
import { t } from "./
|
|
5
|
-
import {
|
|
3
|
+
import { Label as e } from "./label.mjs";
|
|
4
|
+
import { Separator as t } from "./separator.mjs";
|
|
5
|
+
import { cn as n } from "cn";
|
|
6
6
|
import { useMemo as r } from "react";
|
|
7
7
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
8
8
|
import { cva as o } from "class-variance-authority";
|
|
9
|
-
|
|
10
|
-
function s({ className:
|
|
9
|
+
// src/field.tsx
|
|
10
|
+
function s({ className: e, ...t }) {
|
|
11
11
|
return /* @__PURE__ */ i("fieldset", {
|
|
12
12
|
"data-slot": "field-set",
|
|
13
|
-
className:
|
|
14
|
-
...
|
|
13
|
+
className: n("flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3", e),
|
|
14
|
+
...t
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
|
-
function c({ className:
|
|
17
|
+
function c({ className: e, variant: t = "legend", ...r }) {
|
|
18
18
|
return /* @__PURE__ */ i("legend", {
|
|
19
19
|
"data-slot": "field-legend",
|
|
20
|
-
"data-variant":
|
|
21
|
-
className:
|
|
20
|
+
"data-variant": t,
|
|
21
|
+
className: n("mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base", e),
|
|
22
22
|
...r
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
|
-
function l({ className:
|
|
25
|
+
function l({ className: e, ...t }) {
|
|
26
26
|
return /* @__PURE__ */ i("div", {
|
|
27
27
|
"data-slot": "field-group",
|
|
28
|
-
className:
|
|
29
|
-
...
|
|
28
|
+
className: n("group/field-group @container/field-group flex w-full flex-col gap-5 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4", e),
|
|
29
|
+
...t
|
|
30
30
|
});
|
|
31
31
|
}
|
|
32
32
|
var u = o("group/field data-[invalid=true]:text-destructive flex w-full gap-2", {
|
|
@@ -37,72 +37,71 @@ var u = o("group/field data-[invalid=true]:text-destructive flex w-full gap-2",
|
|
|
37
37
|
} },
|
|
38
38
|
defaultVariants: { orientation: "vertical" }
|
|
39
39
|
});
|
|
40
|
-
function d({ className:
|
|
40
|
+
function d({ className: e, orientation: t = "vertical", ...r }) {
|
|
41
41
|
return /* @__PURE__ */ i("fieldset", {
|
|
42
42
|
"data-slot": "field",
|
|
43
|
-
"data-orientation":
|
|
44
|
-
className:
|
|
43
|
+
"data-orientation": t,
|
|
44
|
+
className: n(u({ orientation: t }), e),
|
|
45
45
|
...r
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
|
-
function f({ className:
|
|
48
|
+
function f({ className: e, ...t }) {
|
|
49
49
|
return /* @__PURE__ */ i("div", {
|
|
50
50
|
"data-slot": "field-content",
|
|
51
|
-
className:
|
|
52
|
-
...
|
|
51
|
+
className: n("group/field-content flex flex-1 flex-col gap-0.5 leading-snug", e),
|
|
52
|
+
...t
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
|
-
function p({ className:
|
|
56
|
-
return /* @__PURE__ */ i(
|
|
55
|
+
function p({ className: t, ...r }) {
|
|
56
|
+
return /* @__PURE__ */ i(e, {
|
|
57
57
|
"data-slot": "field-label",
|
|
58
|
-
className:
|
|
58
|
+
className: n("group/field-label peer/field-label has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-2.5", "has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col", t),
|
|
59
59
|
...r
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
function m({ className:
|
|
62
|
+
function m({ className: e, ...t }) {
|
|
63
63
|
return /* @__PURE__ */ i("div", {
|
|
64
64
|
"data-slot": "field-label",
|
|
65
|
-
className:
|
|
66
|
-
...
|
|
65
|
+
className: n("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50", e),
|
|
66
|
+
...t
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function h({ className:
|
|
69
|
+
function h({ className: e, ...t }) {
|
|
70
70
|
return /* @__PURE__ */ i("p", {
|
|
71
71
|
"data-slot": "field-description",
|
|
72
|
-
className:
|
|
73
|
-
...
|
|
72
|
+
className: n("text-muted-foreground text-start text-sm leading-normal font-normal group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5", "last:mt-0 nth-last-2:-mt-1", "[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4", e),
|
|
73
|
+
...t
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
function g({ children:
|
|
76
|
+
function g({ children: e, className: r, ...o }) {
|
|
77
77
|
return /* @__PURE__ */ a("div", {
|
|
78
78
|
"data-slot": "field-separator",
|
|
79
|
-
"data-content": !!
|
|
80
|
-
className:
|
|
79
|
+
"data-content": !!e,
|
|
80
|
+
className: n("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2", r),
|
|
81
81
|
...o,
|
|
82
|
-
children: [/* @__PURE__ */ i(
|
|
82
|
+
children: [/* @__PURE__ */ i(t, { className: "absolute inset-0 top-1/2" }), e && /* @__PURE__ */ i("span", {
|
|
83
83
|
className: "bg-background text-muted-foreground relative mx-auto block w-fit px-2",
|
|
84
84
|
"data-slot": "field-separator-content",
|
|
85
|
-
children:
|
|
85
|
+
children: e
|
|
86
86
|
})]
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
function _({ className:
|
|
89
|
+
function _({ className: e, children: t, errors: a, ...o }) {
|
|
90
90
|
let s = r(() => {
|
|
91
|
-
if (
|
|
91
|
+
if (t) return t;
|
|
92
92
|
if (!a?.length) return null;
|
|
93
93
|
let e = [...new Map(a.map((e) => [e?.message, e])).values()];
|
|
94
94
|
return e?.length == 1 ? e[0]?.message : /* @__PURE__ */ i("ul", {
|
|
95
95
|
className: "ms-4 flex list-disc flex-col gap-1",
|
|
96
96
|
children: e.map((e, t) => e?.message && /* @__PURE__ */ i("li", { children: e.message }, t))
|
|
97
97
|
});
|
|
98
|
-
}, [
|
|
98
|
+
}, [t, a]);
|
|
99
99
|
return s ? /* @__PURE__ */ i("div", {
|
|
100
100
|
role: "alert",
|
|
101
101
|
"data-slot": "field-error",
|
|
102
|
-
className:
|
|
102
|
+
className: n("text-destructive text-sm font-normal", e),
|
|
103
103
|
...o,
|
|
104
104
|
children: s
|
|
105
105
|
}) : null;
|
|
106
106
|
}
|
|
107
|
-
//#endregion
|
|
108
107
|
export { d as Field, f as FieldContent, h as FieldDescription, _ as FieldError, l as FieldGroup, p as FieldLabel, c as FieldLegend, g as FieldSeparator, s as FieldSet, m as FieldTitle };
|
package/dist/form.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./
|
|
1
|
+
"use client";"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./rolldown-runtime-BocRIvOZ.js"),t=require("./label.cjs"),n=require("./utils-ChMUqofy.js");let r=require("react");r=e.t(r);let i=require("react/jsx-runtime"),a=require("@radix-ui/react-slot"),o=require("react-hook-form");var s=o.FormProvider,c=r.createContext(null),l=({...e})=>(0,i.jsx)(c.Provider,{value:{name:e.name},children:(0,i.jsx)(o.Controller,{...e})}),u=()=>{let e=r.useContext(c),t=r.useContext(d),{getFieldState:n,formState:i}=(0,o.useFormContext)();if(!e)throw Error(`useFormField should be used within <FormField>`);if(!t)throw Error(`useFormField should be used within <FormItem>`);let a=n(e.name,i),{id:s}=t;return{id:s,name:e.name,formItemId:`${s}-form-item`,formDescriptionId:`${s}-form-item-description`,formMessageId:`${s}-form-item-message`,...a}},d=r.createContext(null),f=r.forwardRef(({className:e,...t},a)=>{let o=r.useId();return(0,i.jsx)(d.Provider,{value:{id:o},children:(0,i.jsx)(`div`,{ref:a,className:n.t(`space-y-2`,e),...t})})});f.displayName=`FormItem`;var p=r.forwardRef(({className:e,...r},a)=>{let{error:o,formItemId:s}=u();return(0,i.jsx)(t.Label,{ref:a,className:n.t(o&&`text-destructive`,e),htmlFor:s,...r})});p.displayName=`FormLabel`;var m=r.forwardRef(({...e},t)=>{let{error:n,formItemId:r,formDescriptionId:o,formMessageId:s}=u();return(0,i.jsx)(a.Slot,{ref:t,id:r,"aria-describedby":n?`${o} ${s}`:`${o}`,"aria-invalid":!!n,...e})});m.displayName=`FormControl`;var h=r.forwardRef(({className:e,...t},r)=>{let{formDescriptionId:a}=u();return(0,i.jsx)(`p`,{ref:r,id:a,className:n.t(`text-muted-foreground text-[0.8rem]`,e),...t})});h.displayName=`FormDescription`;var g=r.forwardRef(({className:e,children:t,...r},a)=>{let{error:o,formMessageId:s}=u(),c=o?String(o?.message??``):t;return c?(0,i.jsx)(`p`,{ref:a,id:s,className:n.t(`text-destructive text-[0.8rem] font-medium`,e),...r,children:c}):null});g.displayName=`FormMessage`,exports.Form=s,exports.FormControl=m,exports.FormDescription=h,exports.FormField=l,exports.FormItem=f,exports.FormLabel=p,exports.FormMessage=g,exports.useFormField=u;
|
package/dist/form.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use client";
|
|
3
|
-
import {
|
|
4
|
-
import { t } from "./
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
3
|
+
import { Label as e } from "./label.mjs";
|
|
4
|
+
import { t } from "./utils-DQKc9joa.mjs";
|
|
5
|
+
import * as n from "react";
|
|
6
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
7
|
+
import { Slot as i } from "@radix-ui/react-slot";
|
|
8
8
|
import { Controller as a, FormProvider as o, useFormContext as s } from "react-hook-form";
|
|
9
|
-
|
|
10
|
-
var c = o, l =
|
|
9
|
+
// src/form.tsx
|
|
10
|
+
var c = o, l = n.createContext(null), u = ({ ...e }) => /* @__PURE__ */ r(l.Provider, {
|
|
11
11
|
value: { name: e.name },
|
|
12
|
-
children: /* @__PURE__ */
|
|
12
|
+
children: /* @__PURE__ */ r(a, { ...e })
|
|
13
13
|
}), d = () => {
|
|
14
|
-
let e =
|
|
14
|
+
let e = n.useContext(l), t = n.useContext(f), { getFieldState: r, formState: i } = s();
|
|
15
15
|
if (!e) throw Error("useFormField should be used within <FormField>");
|
|
16
16
|
if (!t) throw Error("useFormField should be used within <FormItem>");
|
|
17
|
-
let a =
|
|
17
|
+
let a = r(e.name, i), { id: o } = t;
|
|
18
18
|
return {
|
|
19
19
|
id: o,
|
|
20
20
|
name: e.name,
|
|
@@ -23,59 +23,58 @@ var c = o, l = r.createContext(null), u = ({ ...e }) => /* @__PURE__ */ i(l.Prov
|
|
|
23
23
|
formMessageId: `${o}-form-item-message`,
|
|
24
24
|
...a
|
|
25
25
|
};
|
|
26
|
-
}, f =
|
|
27
|
-
let o =
|
|
28
|
-
return /* @__PURE__ */
|
|
26
|
+
}, f = n.createContext(null), p = n.forwardRef(({ className: e, ...i }, a) => {
|
|
27
|
+
let o = n.useId();
|
|
28
|
+
return /* @__PURE__ */ r(f.Provider, {
|
|
29
29
|
value: { id: o },
|
|
30
|
-
children: /* @__PURE__ */
|
|
30
|
+
children: /* @__PURE__ */ r("div", {
|
|
31
31
|
ref: a,
|
|
32
|
-
className:
|
|
33
|
-
...
|
|
32
|
+
className: t("space-y-2", e),
|
|
33
|
+
...i
|
|
34
34
|
})
|
|
35
35
|
});
|
|
36
36
|
});
|
|
37
37
|
p.displayName = "FormItem";
|
|
38
|
-
var m =
|
|
38
|
+
var m = n.forwardRef(({ className: n, ...i }, a) => {
|
|
39
39
|
let { error: o, formItemId: s } = d();
|
|
40
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ r(e, {
|
|
41
41
|
ref: a,
|
|
42
|
-
className:
|
|
42
|
+
className: t(o && "text-destructive", n),
|
|
43
43
|
htmlFor: s,
|
|
44
|
-
...
|
|
44
|
+
...i
|
|
45
45
|
});
|
|
46
46
|
});
|
|
47
47
|
m.displayName = "FormLabel";
|
|
48
|
-
var h =
|
|
49
|
-
let { error:
|
|
50
|
-
return /* @__PURE__ */ i
|
|
51
|
-
ref:
|
|
48
|
+
var h = n.forwardRef(({ ...e }, t) => {
|
|
49
|
+
let { error: n, formItemId: a, formDescriptionId: o, formMessageId: s } = d();
|
|
50
|
+
return /* @__PURE__ */ r(i, {
|
|
51
|
+
ref: t,
|
|
52
52
|
id: a,
|
|
53
|
-
"aria-describedby":
|
|
54
|
-
"aria-invalid": !!
|
|
53
|
+
"aria-describedby": n ? `${o} ${s}` : `${o}`,
|
|
54
|
+
"aria-invalid": !!n,
|
|
55
55
|
...e
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
h.displayName = "FormControl";
|
|
59
|
-
var g =
|
|
59
|
+
var g = n.forwardRef(({ className: e, ...n }, i) => {
|
|
60
60
|
let { formDescriptionId: a } = d();
|
|
61
|
-
return /* @__PURE__ */
|
|
62
|
-
ref:
|
|
61
|
+
return /* @__PURE__ */ r("p", {
|
|
62
|
+
ref: i,
|
|
63
63
|
id: a,
|
|
64
|
-
className:
|
|
64
|
+
className: t("text-muted-foreground text-[0.8rem]", e),
|
|
65
65
|
...n
|
|
66
66
|
});
|
|
67
67
|
});
|
|
68
68
|
g.displayName = "FormDescription";
|
|
69
|
-
var _ =
|
|
69
|
+
var _ = n.forwardRef(({ className: e, children: n, ...i }, a) => {
|
|
70
70
|
let { error: o, formMessageId: s } = d(), c = o ? String(o?.message ?? "") : n;
|
|
71
|
-
return c ? /* @__PURE__ */
|
|
71
|
+
return c ? /* @__PURE__ */ r("p", {
|
|
72
72
|
ref: a,
|
|
73
73
|
id: s,
|
|
74
|
-
className:
|
|
75
|
-
...
|
|
74
|
+
className: t("text-destructive text-[0.8rem] font-medium", e),
|
|
75
|
+
...i,
|
|
76
76
|
children: c
|
|
77
77
|
}) : null;
|
|
78
78
|
});
|
|
79
79
|
_.displayName = "FormMessage";
|
|
80
|
-
//#endregion
|
|
81
80
|
export { c as Form, h as FormControl, g as FormDescription, u as FormField, p as FormItem, m as FormLabel, _ as FormMessage, d as useFormField };
|
|
@@ -1,61 +1,61 @@
|
|
|
1
1
|
export declare function useTheme(): {
|
|
2
2
|
tokens: {
|
|
3
|
-
readonly background: "hsl(
|
|
4
|
-
readonly foreground: "hsl(
|
|
5
|
-
readonly card: "hsl(
|
|
6
|
-
readonly cardForeground: "hsl(
|
|
7
|
-
readonly popover: "hsl(
|
|
8
|
-
readonly popoverForeground: "hsl(
|
|
9
|
-
readonly primary: "hsl(
|
|
10
|
-
readonly primaryForeground: "hsl(
|
|
11
|
-
readonly secondary: "hsl(
|
|
12
|
-
readonly secondaryForeground: "hsl(
|
|
13
|
-
readonly muted: "hsl(
|
|
14
|
-
readonly mutedForeground: "hsl(
|
|
15
|
-
readonly accent: "hsl(
|
|
16
|
-
readonly accentForeground: "hsl(
|
|
3
|
+
readonly background: "hsl(30 15% 12%)";
|
|
4
|
+
readonly foreground: "hsl(35 20% 92%)";
|
|
5
|
+
readonly card: "hsl(30 12% 16%)";
|
|
6
|
+
readonly cardForeground: "hsl(35 20% 92%)";
|
|
7
|
+
readonly popover: "hsl(30 12% 16%)";
|
|
8
|
+
readonly popoverForeground: "hsl(35 20% 92%)";
|
|
9
|
+
readonly primary: "hsl(150 40% 55%)";
|
|
10
|
+
readonly primaryForeground: "hsl(150 45% 10%)";
|
|
11
|
+
readonly secondary: "hsl(150 30% 65%)";
|
|
12
|
+
readonly secondaryForeground: "hsl(150 45% 10%)";
|
|
13
|
+
readonly muted: "hsl(30 10% 22%)";
|
|
14
|
+
readonly mutedForeground: "hsl(35 12% 70%)";
|
|
15
|
+
readonly accent: "hsl(30 12% 18%)";
|
|
16
|
+
readonly accentForeground: "hsl(35 20% 92%)";
|
|
17
17
|
readonly destructive: "hsl(0 62.8% 30.6%)";
|
|
18
|
-
readonly destructiveForeground: "hsl(
|
|
19
|
-
readonly border: "hsl(
|
|
20
|
-
readonly input: "hsl(
|
|
21
|
-
readonly ring: "hsl(
|
|
22
|
-
readonly sidebar: "hsl(
|
|
23
|
-
readonly sidebarForeground: "hsl(
|
|
24
|
-
readonly sidebarPrimary: "hsl(
|
|
25
|
-
readonly sidebarPrimaryForeground: "hsl(
|
|
26
|
-
readonly sidebarAccent: "hsl(
|
|
27
|
-
readonly sidebarAccentForeground: "hsl(
|
|
28
|
-
readonly sidebarBorder: "hsl(
|
|
29
|
-
readonly sidebarRing: "hsl(
|
|
18
|
+
readonly destructiveForeground: "hsl(35 20% 92%)";
|
|
19
|
+
readonly border: "hsl(30 10% 22%)";
|
|
20
|
+
readonly input: "hsl(30 10% 22%)";
|
|
21
|
+
readonly ring: "hsl(150 40% 55%)";
|
|
22
|
+
readonly sidebar: "hsl(30 18% 8%)";
|
|
23
|
+
readonly sidebarForeground: "hsl(35 12% 70%)";
|
|
24
|
+
readonly sidebarPrimary: "hsl(150 40% 55%)";
|
|
25
|
+
readonly sidebarPrimaryForeground: "hsl(150 45% 10%)";
|
|
26
|
+
readonly sidebarAccent: "hsl(30 10% 22%)";
|
|
27
|
+
readonly sidebarAccentForeground: "hsl(35 20% 92%)";
|
|
28
|
+
readonly sidebarBorder: "hsl(30 10% 22%)";
|
|
29
|
+
readonly sidebarRing: "hsl(150 40% 55%)";
|
|
30
30
|
readonly radius: "0.5rem";
|
|
31
31
|
} | {
|
|
32
|
-
readonly background: "hsl(
|
|
33
|
-
readonly foreground: "hsl(
|
|
34
|
-
readonly card: "hsl(
|
|
35
|
-
readonly cardForeground: "hsl(
|
|
36
|
-
readonly popover: "hsl(
|
|
37
|
-
readonly popoverForeground: "hsl(
|
|
38
|
-
readonly primary: "hsl(
|
|
39
|
-
readonly primaryForeground: "hsl(
|
|
40
|
-
readonly secondary: "hsl(
|
|
41
|
-
readonly secondaryForeground: "hsl(
|
|
42
|
-
readonly muted: "hsl(
|
|
43
|
-
readonly mutedForeground: "hsl(
|
|
44
|
-
readonly accent: "hsl(
|
|
45
|
-
readonly accentForeground: "hsl(
|
|
32
|
+
readonly background: "hsl(35 25% 88%)";
|
|
33
|
+
readonly foreground: "hsl(150 50% 22%)";
|
|
34
|
+
readonly card: "hsl(35 20% 94%)";
|
|
35
|
+
readonly cardForeground: "hsl(150 50% 22%)";
|
|
36
|
+
readonly popover: "hsl(35 20% 94%)";
|
|
37
|
+
readonly popoverForeground: "hsl(150 50% 22%)";
|
|
38
|
+
readonly primary: "hsl(150 50% 28%)";
|
|
39
|
+
readonly primaryForeground: "hsl(35 33% 97%)";
|
|
40
|
+
readonly secondary: "hsl(150 25% 40%)";
|
|
41
|
+
readonly secondaryForeground: "hsl(35 33% 97%)";
|
|
42
|
+
readonly muted: "hsl(35 15% 80%)";
|
|
43
|
+
readonly mutedForeground: "hsl(150 15% 32%)";
|
|
44
|
+
readonly accent: "hsl(35 18% 82%)";
|
|
45
|
+
readonly accentForeground: "hsl(150 50% 22%)";
|
|
46
46
|
readonly destructive: "hsl(0 84.2% 60.2%)";
|
|
47
|
-
readonly destructiveForeground: "hsl(
|
|
48
|
-
readonly border: "hsl(
|
|
49
|
-
readonly input: "hsl(
|
|
50
|
-
readonly ring: "hsl(
|
|
51
|
-
readonly sidebar: "hsl(
|
|
52
|
-
readonly sidebarForeground: "hsl(
|
|
53
|
-
readonly sidebarPrimary: "hsl(
|
|
54
|
-
readonly sidebarPrimaryForeground: "hsl(
|
|
55
|
-
readonly sidebarAccent: "hsl(
|
|
56
|
-
readonly sidebarAccentForeground: "hsl(
|
|
57
|
-
readonly sidebarBorder: "hsl(
|
|
58
|
-
readonly sidebarRing: "hsl(
|
|
47
|
+
readonly destructiveForeground: "hsl(35 33% 97%)";
|
|
48
|
+
readonly border: "hsl(35 15% 80%)";
|
|
49
|
+
readonly input: "hsl(35 15% 80%)";
|
|
50
|
+
readonly ring: "hsl(150 50% 28%)";
|
|
51
|
+
readonly sidebar: "hsl(35 25% 88%)";
|
|
52
|
+
readonly sidebarForeground: "hsl(150 50% 22%)";
|
|
53
|
+
readonly sidebarPrimary: "hsl(150 50% 28%)";
|
|
54
|
+
readonly sidebarPrimaryForeground: "hsl(35 33% 97%)";
|
|
55
|
+
readonly sidebarAccent: "hsl(35 15% 80%)";
|
|
56
|
+
readonly sidebarAccentForeground: "hsl(150 50% 22%)";
|
|
57
|
+
readonly sidebarBorder: "hsl(35 15% 80%)";
|
|
58
|
+
readonly sidebarRing: "hsl(150 50% 28%)";
|
|
59
59
|
readonly radius: "0.5rem";
|
|
60
60
|
};
|
|
61
61
|
themes: string[];
|