@kubetail/ui 2.0.3 → 2.0.4-rc1
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/_virtual/rolldown:runtime.cjs +1 -0
- package/dist/elements/button.cjs +2 -2
- package/dist/elements/button.cjs.map +1 -1
- package/dist/elements/button.js +39 -42
- package/dist/elements/button.js.map +1 -1
- package/dist/elements/calendar.cjs +2 -2
- package/dist/elements/calendar.cjs.map +1 -1
- package/dist/elements/calendar.js +23 -27
- package/dist/elements/calendar.js.map +1 -1
- package/dist/elements/card.cjs +2 -2
- package/dist/elements/card.cjs.map +1 -1
- package/dist/elements/card.js +47 -50
- package/dist/elements/card.js.map +1 -1
- package/dist/elements/checkbox.cjs +2 -2
- package/dist/elements/checkbox.cjs.map +1 -1
- package/dist/elements/checkbox.js +19 -28
- package/dist/elements/checkbox.js.map +1 -1
- package/dist/elements/dialog.cjs +2 -2
- package/dist/elements/dialog.cjs.map +1 -1
- package/dist/elements/dialog.js +75 -107
- package/dist/elements/dialog.js.map +1 -1
- package/dist/elements/dropdown-menu.cjs +2 -2
- package/dist/elements/dropdown-menu.cjs.map +1 -1
- package/dist/elements/dropdown-menu.js +107 -181
- package/dist/elements/dropdown-menu.js.map +1 -1
- package/dist/elements/form.cjs +2 -2
- package/dist/elements/form.cjs.map +1 -1
- package/dist/elements/form.js +73 -76
- package/dist/elements/form.js.map +1 -1
- package/dist/elements/input.cjs +2 -2
- package/dist/elements/input.cjs.map +1 -1
- package/dist/elements/input.js +12 -21
- package/dist/elements/input.js.map +1 -1
- package/dist/elements/label.cjs +2 -2
- package/dist/elements/label.cjs.map +1 -1
- package/dist/elements/label.js +13 -19
- package/dist/elements/label.js.map +1 -1
- package/dist/elements/pagination.cjs +2 -2
- package/dist/elements/pagination.cjs.map +1 -1
- package/dist/elements/pagination.js +71 -89
- package/dist/elements/pagination.js.map +1 -1
- package/dist/elements/popover.cjs +2 -2
- package/dist/elements/popover.cjs.map +1 -1
- package/dist/elements/popover.js +31 -37
- package/dist/elements/popover.js.map +1 -1
- package/dist/elements/search-box.cjs +2 -2
- package/dist/elements/search-box.cjs.map +1 -1
- package/dist/elements/search-box.js +25 -28
- package/dist/elements/search-box.js.map +1 -1
- package/dist/elements/select.cjs +2 -2
- package/dist/elements/select.cjs.map +1 -1
- package/dist/elements/select.js +89 -136
- package/dist/elements/select.js.map +1 -1
- package/dist/elements/separator.cjs +2 -2
- package/dist/elements/separator.cjs.map +1 -1
- package/dist/elements/separator.js +15 -26
- package/dist/elements/separator.js.map +1 -1
- package/dist/elements/sheet.cjs +2 -2
- package/dist/elements/sheet.cjs.map +1 -1
- package/dist/elements/sheet.js +71 -88
- package/dist/elements/sheet.js.map +1 -1
- package/dist/elements/sidebar.cjs +2 -2
- package/dist/elements/sidebar.cjs.map +1 -1
- package/dist/elements/sidebar.js +323 -535
- package/dist/elements/sidebar.js.map +1 -1
- package/dist/elements/skeleton.cjs +2 -2
- package/dist/elements/skeleton.cjs.map +1 -1
- package/dist/elements/skeleton.js +11 -8
- package/dist/elements/skeleton.js.map +1 -1
- package/dist/elements/spinner.cjs +2 -2
- package/dist/elements/spinner.cjs.map +1 -1
- package/dist/elements/spinner.js +30 -39
- package/dist/elements/spinner.js.map +1 -1
- package/dist/elements/table.cjs +2 -2
- package/dist/elements/table.cjs.map +1 -1
- package/dist/elements/table.js +58 -63
- package/dist/elements/table.js.map +1 -1
- package/dist/elements/tabs.cjs +2 -2
- package/dist/elements/tabs.cjs.map +1 -1
- package/dist/elements/tabs.js +31 -38
- package/dist/elements/tabs.js.map +1 -1
- package/dist/elements/tooltip.cjs +2 -2
- package/dist/elements/tooltip.cjs.map +1 -1
- package/dist/elements/tooltip.js +31 -38
- package/dist/elements/tooltip.js.map +1 -1
- package/dist/hooks/use-mobile.cjs +2 -2
- package/dist/hooks/use-mobile.cjs.map +1 -1
- package/dist/hooks/use-mobile.js +13 -14
- package/dist/hooks/use-mobile.js.map +1 -1
- package/dist/index.cjs +0 -2
- package/dist/index.js +0 -2
- package/dist/lib/utils.cjs +2 -2
- package/dist/lib/utils.cjs.map +1 -1
- package/dist/lib/utils.js +7 -8
- package/dist/lib/utils.js.map +1 -1
- package/package.json +42 -42
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,28 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
d as SearchBox
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=search-box.js.map
|
|
1
|
+
import { cn } from "../lib/utils.js";
|
|
2
|
+
import { Input } from "./input.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { Search } from "lucide-react";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
var SearchBox = forwardRef(({ className: a, containerClassName: o, placeholder: s = "", ...c }, l) => {
|
|
7
|
+
let { disabled: u } = c;
|
|
8
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
9
|
+
className: cn("relative w-full max-w-sm", o),
|
|
10
|
+
children: [/* @__PURE__ */ jsx(Search, {
|
|
11
|
+
"aria-hidden": !0,
|
|
12
|
+
className: cn("pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground", u && "opacity-50")
|
|
13
|
+
}), /* @__PURE__ */ jsx(Input, {
|
|
14
|
+
ref: l,
|
|
15
|
+
type: "search",
|
|
16
|
+
placeholder: s,
|
|
17
|
+
className: cn("pl-9", a),
|
|
18
|
+
...c
|
|
19
|
+
})]
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
SearchBox.displayName = "SearchBox";
|
|
23
|
+
export { SearchBox };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=search-box.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-box.js","sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"
|
|
1
|
+
{"version":3,"file":"search-box.js","names":[],"sources":["../../src/elements/search-box.tsx"],"sourcesContent":["import { forwardRef } from 'react';\nimport { Search } from 'lucide-react';\n\nimport { Input } from '@/elements/input';\nimport { cn } from '@/lib/utils';\n\nexport type SearchBoxProps = React.ComponentProps<typeof Input> & {\n containerClassName?: string;\n};\n\n/**\n * A compact search box.\n * - Uses shadcn <Input/>\n * - Leading search icon\n */\nconst SearchBox = forwardRef<HTMLInputElement, SearchBoxProps>(\n ({ className, containerClassName, placeholder = '', ...props }, ref) => {\n const { disabled } = props;\n\n return (\n <div className={cn('relative w-full max-w-sm', containerClassName)}>\n <Search\n aria-hidden\n className={cn(\n 'pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground',\n disabled && 'opacity-50',\n )}\n />\n <Input ref={ref} type=\"search\" placeholder={placeholder} className={cn('pl-9', className)} {...props} />\n </div>\n );\n },\n);\n\nSearchBox.displayName = 'SearchBox';\n\nexport { SearchBox };\n"],"mappings":";;;;;AAeA,IAAM,YAAY,YACf,EAAE,cAAW,uBAAoB,iBAAc,IAAI,GAAG,KAAS,MAAQ;CACtE,IAAM,EAAE,gBAAa;AAErB,QACE,qBAAC,OAAA;EAAI,WAAW,GAAG,4BAA4B,EAAmB;aAChE,oBAAC,QAAA;GACC,eAAA;GACA,WAAW,GACT,8FACA,KAAY,aACb;IACD,EACF,oBAAC,OAAA;GAAW;GAAK,MAAK;GAAsB;GAAa,WAAW,GAAG,QAAQ,EAAU;GAAE,GAAI;IAAS,CAAA;GACpG;EAGX;AAED,UAAU,cAAc"}
|
package/dist/elements/select.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use
|
|
2
|
-
//# sourceMappingURL=select.cjs.map
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`lucide-react`),i=require(`@radix-ui/react-select`);i=e.__toESM(i);function a({...e}){return(0,n.jsx)(i.Root,{"data-slot":`select`,...e})}function o({...e}){return(0,n.jsx)(i.Group,{"data-slot":`select-group`,...e})}function s({...e}){return(0,n.jsx)(i.Value,{"data-slot":`select-value`,...e})}function c({className:e,size:a=`default`,children:o,asChild:s=!1,...c}){return s?(0,n.jsx)(i.Trigger,{...c,asChild:!0,children:o}):(0,n.jsxs)(i.Trigger,{"data-slot":`select-trigger`,"data-size":a,className:t.cn(`border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...c,children:[o,(0,n.jsx)(i.Icon,{asChild:!0,children:(0,n.jsx)(r.ChevronDownIcon,{className:`size-4 opacity-50`})})]})}function l({className:e,...a}){return(0,n.jsx)(i.ScrollUpButton,{"data-slot":`select-scroll-up-button`,className:t.cn(`flex cursor-default items-center justify-center py-1`,e),...a,children:(0,n.jsx)(r.ChevronUpIcon,{className:`size-4`})})}function u({className:e,...a}){return(0,n.jsx)(i.ScrollDownButton,{"data-slot":`select-scroll-down-button`,className:t.cn(`flex cursor-default items-center justify-center py-1`,e),...a,children:(0,n.jsx)(r.ChevronDownIcon,{className:`size-4`})})}function d({className:e,children:r,position:a=`popper`,...o}){return(0,n.jsx)(i.Portal,{children:(0,n.jsxs)(i.Content,{"data-slot":`select-content`,className:t.cn(`bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md`,a===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:a,...o,children:[(0,n.jsx)(l,{}),(0,n.jsx)(i.Viewport,{className:t.cn(`p-1`,a===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:r}),(0,n.jsx)(u,{})]})})}function f({className:e,...r}){return(0,n.jsx)(i.Label,{"data-slot":`select-label`,className:t.cn(`text-muted-foreground px-2 py-1.5 text-xs`,e),...r})}function p({className:e,children:a,...o}){return(0,n.jsxs)(i.Item,{"data-slot":`select-item`,className:t.cn(`focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...o,children:[(0,n.jsx)(`span`,{className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,n.jsx)(i.ItemIndicator,{children:(0,n.jsx)(r.CheckIcon,{className:`size-4`})})}),(0,n.jsx)(i.ItemText,{children:a})]})}function m({className:e,...r}){return(0,n.jsx)(i.Separator,{"data-slot":`select-separator`,className:t.cn(`bg-border pointer-events-none -mx-1 my-1 h-px`,e),...r})}exports.Select=a,exports.SelectContent=d,exports.SelectGroup=o,exports.SelectItem=p,exports.SelectLabel=f,exports.SelectScrollDownButton=u,exports.SelectScrollUpButton=l,exports.SelectSeparator=m,exports.SelectTrigger=c,exports.SelectValue=s;
|
|
2
|
+
//# sourceMappingURL=select.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.cjs","sources":["../../src/elements/select.tsx"],"sourcesContent":["'use client';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n asChild = false,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n if (asChild) {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n {children}\n </SelectPrimitive.Trigger>\n );\n }\n\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\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 position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"
|
|
1
|
+
{"version":3,"file":"select.cjs","names":[],"sources":["../../src/elements/select.tsx"],"sourcesContent":["'use client';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n asChild = false,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n if (asChild) {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n {children}\n </SelectPrimitive.Trigger>\n );\n }\n\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\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 position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\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":"kRAOA,SAAS,EAAO,CAAE,GAAG,GAA4D,CAC/E,OAAO,EAAA,EAAA,KAAC,EAAgB,KAAA,CAAK,YAAU,SAAS,GAAI,GAAS,CAG/D,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,KAAC,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAGtE,SAAS,EAAY,CAAE,GAAG,GAA6D,CACrF,OAAO,EAAA,EAAA,KAAC,EAAgB,MAAA,CAAM,YAAU,eAAe,GAAI,GAAS,CAGtE,SAAS,EAAc,CACrB,YACA,OAAO,UACP,WACA,UAAU,GACV,GAAG,GAGF,CASD,OARI,GAEA,EAAA,EAAA,KAAC,EAAgB,QAAA,CAAQ,GAAI,EAAO,QAAA,GACjC,YACuB,EAK5B,EAAA,EAAA,MAAC,EAAgB,QAAA,CACf,YAAU,iBACV,YAAW,EACX,UAAW,EAAA,GACT,+yBACA,EACD,CACD,GAAI,YAEH,GACD,EAAA,EAAA,KAAC,EAAgB,KAAA,CAAK,QAAA,aACpB,EAAA,EAAA,KAAC,EAAA,gBAAA,CAAgB,UAAU,oBAAA,CAAsB,EAC5B,CAAA,EACC,CAI9B,SAAS,EAAqB,CAAE,YAAW,GAAG,GAAsE,CAClH,OACE,EAAA,EAAA,KAAC,EAAgB,eAAA,CACf,YAAU,0BACV,UAAW,EAAA,GAAG,uDAAwD,EAAU,CAChF,GAAI,YAEJ,EAAA,EAAA,KAAC,EAAA,cAAA,CAAc,UAAU,SAAA,CAAW,EACL,CAIrC,SAAS,EAAuB,CAC9B,YACA,GAAG,GAC6D,CAChE,OACE,EAAA,EAAA,KAAC,EAAgB,iBAAA,CACf,YAAU,4BACV,UAAW,EAAA,GAAG,uDAAwD,EAAU,CAChF,GAAI,YAEJ,EAAA,EAAA,KAAC,EAAA,gBAAA,CAAgB,UAAU,SAAA,CAAW,EACL,CAIvC,SAAS,EAAc,CACrB,YACA,WACA,WAAW,SACX,GAAG,GACoD,CACvD,OACE,EAAA,EAAA,KAAC,EAAgB,OAAA,CAAA,UACf,EAAA,EAAA,MAAC,EAAgB,QAAA,CACf,YAAU,iBACV,UAAW,EAAA,GACT,gjBACA,IAAa,UACX,kIACF,EACD,CACS,WACV,GAAI,aAEJ,EAAA,EAAA,KAAC,EAAA,EAAA,CAAuB,EACxB,EAAA,EAAA,KAAC,EAAgB,SAAA,CACf,UAAW,EAAA,GACT,MACA,IAAa,UACX,sGACH,CAEA,YACwB,EAC3B,EAAA,EAAA,KAAC,EAAA,EAAA,CAAyB,GACF,CAAA,CACH,CAI7B,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OACE,EAAA,EAAA,KAAC,EAAgB,MAAA,CACf,YAAU,eACV,UAAW,EAAA,GAAG,4CAA6C,EAAU,CACrE,GAAI,GACJ,CAIN,SAAS,EAAW,CAAE,YAAW,WAAU,GAAG,GAA4D,CACxG,OACE,EAAA,EAAA,MAAC,EAAgB,KAAA,CACf,YAAU,cACV,UAAW,EAAA,GACT,4aACA,EACD,CACD,GAAI,aAEJ,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,uEACd,EAAA,EAAA,KAAC,EAAgB,cAAA,CAAA,UACf,EAAA,EAAA,KAAC,EAAA,UAAA,CAAU,UAAU,SAAA,CAAW,CAAA,CACF,EAC3B,EACP,EAAA,EAAA,KAAC,EAAgB,SAAA,CAAU,WAAA,CAAoC,CAAA,EAC1C,CAI3B,SAAS,EAAgB,CAAE,YAAW,GAAG,GAAiE,CACxG,OACE,EAAA,EAAA,KAAC,EAAgB,UAAA,CACf,YAAU,mBACV,UAAW,EAAA,GAAG,gDAAiD,EAAU,CACzE,GAAI,GACJ"}
|
package/dist/elements/select.js
CHANGED
|
@@ -1,146 +1,99 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
6
|
+
function Select({ ...e }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Root, {
|
|
8
|
+
"data-slot": "select",
|
|
9
|
+
...e
|
|
10
|
+
});
|
|
7
11
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
12
|
+
function SelectGroup({ ...e }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Group, {
|
|
14
|
+
"data-slot": "select-group",
|
|
15
|
+
...e
|
|
16
|
+
});
|
|
10
17
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
18
|
+
function SelectValue({ ...e }) {
|
|
19
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Value, {
|
|
20
|
+
"data-slot": "select-value",
|
|
21
|
+
...e
|
|
22
|
+
});
|
|
13
23
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
),
|
|
30
|
-
...i,
|
|
31
|
-
children: [
|
|
32
|
-
s,
|
|
33
|
-
/* @__PURE__ */ e(a.Icon, { asChild: !0, children: /* @__PURE__ */ e(d, { className: "size-4 opacity-50" }) })
|
|
34
|
-
]
|
|
35
|
-
}
|
|
36
|
-
);
|
|
24
|
+
function SelectTrigger({ className: d, size: p = "default", children: m, asChild: h = !1, ...g }) {
|
|
25
|
+
return h ? /* @__PURE__ */ jsx(SelectPrimitive.Trigger, {
|
|
26
|
+
...g,
|
|
27
|
+
asChild: !0,
|
|
28
|
+
children: m
|
|
29
|
+
}) : /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
30
|
+
"data-slot": "select-trigger",
|
|
31
|
+
"data-size": p,
|
|
32
|
+
className: cn("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", d),
|
|
33
|
+
...g,
|
|
34
|
+
children: [m, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
35
|
+
asChild: !0,
|
|
36
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4 opacity-50" })
|
|
37
|
+
})]
|
|
38
|
+
});
|
|
37
39
|
}
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
children: /* @__PURE__ */ e(u, { className: "size-4" })
|
|
46
|
-
}
|
|
47
|
-
);
|
|
40
|
+
function SelectScrollUpButton({ className: u, ...d }) {
|
|
41
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, {
|
|
42
|
+
"data-slot": "select-scroll-up-button",
|
|
43
|
+
className: cn("flex cursor-default items-center justify-center py-1", u),
|
|
44
|
+
...d,
|
|
45
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, { className: "size-4" })
|
|
46
|
+
});
|
|
48
47
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"data-slot": "select-scroll-down-button",
|
|
57
|
-
className: o("flex cursor-default items-center justify-center py-1", t),
|
|
58
|
-
...r,
|
|
59
|
-
children: /* @__PURE__ */ e(d, { className: "size-4" })
|
|
60
|
-
}
|
|
61
|
-
);
|
|
48
|
+
function SelectScrollDownButton({ className: u, ...d }) {
|
|
49
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, {
|
|
50
|
+
"data-slot": "select-scroll-down-button",
|
|
51
|
+
className: cn("flex cursor-default items-center justify-center py-1", u),
|
|
52
|
+
...d,
|
|
53
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, { className: "size-4" })
|
|
54
|
+
});
|
|
62
55
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
position: s,
|
|
79
|
-
...n,
|
|
80
|
-
children: [
|
|
81
|
-
/* @__PURE__ */ e(p, {}),
|
|
82
|
-
/* @__PURE__ */ e(
|
|
83
|
-
a.Viewport,
|
|
84
|
-
{
|
|
85
|
-
className: o(
|
|
86
|
-
"p-1",
|
|
87
|
-
s === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
88
|
-
),
|
|
89
|
-
children: r
|
|
90
|
-
}
|
|
91
|
-
),
|
|
92
|
-
/* @__PURE__ */ e(m, {})
|
|
93
|
-
]
|
|
94
|
-
}
|
|
95
|
-
) });
|
|
56
|
+
function SelectContent({ className: d, children: f, position: p = "popper", ...m }) {
|
|
57
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
|
|
58
|
+
"data-slot": "select-content",
|
|
59
|
+
className: cn("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md", p === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", d),
|
|
60
|
+
position: p,
|
|
61
|
+
...m,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
64
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
65
|
+
className: cn("p-1", p === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),
|
|
66
|
+
children: f
|
|
67
|
+
}),
|
|
68
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
69
|
+
]
|
|
70
|
+
}) });
|
|
96
71
|
}
|
|
97
|
-
function
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
...r
|
|
104
|
-
}
|
|
105
|
-
);
|
|
72
|
+
function SelectLabel({ className: u, ...d }) {
|
|
73
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Label, {
|
|
74
|
+
"data-slot": "select-label",
|
|
75
|
+
className: cn("text-muted-foreground px-2 py-1.5 text-xs", u),
|
|
76
|
+
...d
|
|
77
|
+
});
|
|
106
78
|
}
|
|
107
|
-
function
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
children: [
|
|
118
|
-
/* @__PURE__ */ e("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ e(a.ItemIndicator, { children: /* @__PURE__ */ e(c, { className: "size-4" }) }) }),
|
|
119
|
-
/* @__PURE__ */ e(a.ItemText, { children: r })
|
|
120
|
-
]
|
|
121
|
-
}
|
|
122
|
-
);
|
|
79
|
+
function SelectItem({ className: f, children: p, ...m }) {
|
|
80
|
+
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
81
|
+
"data-slot": "select-item",
|
|
82
|
+
className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", f),
|
|
83
|
+
...m,
|
|
84
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
85
|
+
className: "absolute right-2 flex size-3.5 items-center justify-center",
|
|
86
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, { className: "size-4" }) })
|
|
87
|
+
}), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children: p })]
|
|
88
|
+
});
|
|
123
89
|
}
|
|
124
|
-
function
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
...r
|
|
131
|
-
}
|
|
132
|
-
);
|
|
90
|
+
function SelectSeparator({ className: u, ...d }) {
|
|
91
|
+
return /* @__PURE__ */ jsx(SelectPrimitive.Separator, {
|
|
92
|
+
"data-slot": "select-separator",
|
|
93
|
+
className: cn("bg-border pointer-events-none -mx-1 my-1 h-px", u),
|
|
94
|
+
...d
|
|
95
|
+
});
|
|
133
96
|
}
|
|
134
|
-
export {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
h as SelectGroup,
|
|
138
|
-
z as SelectItem,
|
|
139
|
-
S as SelectLabel,
|
|
140
|
-
m as SelectScrollDownButton,
|
|
141
|
-
p as SelectScrollUpButton,
|
|
142
|
-
N as SelectSeparator,
|
|
143
|
-
w as SelectTrigger,
|
|
144
|
-
b as SelectValue
|
|
145
|
-
};
|
|
146
|
-
//# sourceMappingURL=select.js.map
|
|
97
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
98
|
+
|
|
99
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.js","sources":["../../src/elements/select.tsx"],"sourcesContent":["'use client';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n asChild = false,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n if (asChild) {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n {children}\n </SelectPrimitive.Trigger>\n );\n }\n\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\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 position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"
|
|
1
|
+
{"version":3,"file":"select.js","names":[],"sources":["../../src/elements/select.tsx"],"sourcesContent":["'use client';\n\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\n\nfunction Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />;\n}\n\nfunction SelectGroup({ ...props }: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />;\n}\n\nfunction SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />;\n}\n\nfunction SelectTrigger({\n className,\n size = 'default',\n children,\n asChild = false,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default';\n}) {\n if (asChild) {\n return (\n <SelectPrimitive.Trigger {...props} asChild>\n {children}\n </SelectPrimitive.Trigger>\n );\n }\n\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n data-size={size}\n className={cn(\n \"border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n );\n}\n\nfunction SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon className=\"size-4\" />\n </SelectPrimitive.ScrollUpButton>\n );\n}\n\nfunction SelectScrollDownButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n return (\n <SelectPrimitive.ScrollDownButton\n data-slot=\"select-scroll-down-button\"\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon className=\"size-4\" />\n </SelectPrimitive.ScrollDownButton>\n );\n}\n\nfunction SelectContent({\n className,\n children,\n position = 'popper',\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n return (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n data-slot=\"select-content\"\n className={cn(\n 'bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\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 position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n 'p-1',\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n );\n}\n\nfunction SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n {...props}\n />\n );\n}\n\nfunction SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n );\n}\n\nfunction SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n {...props}\n />\n );\n}\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":";;;;;AAOA,SAAS,OAAO,EAAE,GAAG,KAA4D;AAC/E,QAAO,oBAAC,gBAAgB,MAAA;EAAK,aAAU;EAAS,GAAI;GAAS;;AAG/D,SAAS,YAAY,EAAE,GAAG,KAA6D;AACrF,QAAO,oBAAC,gBAAgB,OAAA;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,YAAY,EAAE,GAAG,KAA6D;AACrF,QAAO,oBAAC,gBAAgB,OAAA;EAAM,aAAU;EAAe,GAAI;GAAS;;AAGtE,SAAS,cAAc,EACrB,cACA,UAAO,WACP,aACA,aAAU,IACV,GAAG,KAGF;AASD,QARI,IAEA,oBAAC,gBAAgB,SAAA;EAAQ,GAAI;EAAO,SAAA;EACjC;GACuB,GAK5B,qBAAC,gBAAgB,SAAA;EACf,aAAU;EACV,aAAW;EACX,WAAW,GACT,gzBACA,EACD;EACD,GAAI;aAEH,GACD,oBAAC,gBAAgB,MAAA;GAAK,SAAA;aACpB,oBAAC,iBAAA,EAAgB,WAAU,qBAAA,CAAsB;IAC5B,CAAA;GACC;;AAI9B,SAAS,qBAAqB,EAAE,cAAW,GAAG,KAAsE;AAClH,QACE,oBAAC,gBAAgB,gBAAA;EACf,aAAU;EACV,WAAW,GAAG,wDAAwD,EAAU;EAChF,GAAI;YAEJ,oBAAC,eAAA,EAAc,WAAU,UAAA,CAAW;GACL;;AAIrC,SAAS,uBAAuB,EAC9B,cACA,GAAG,KAC6D;AAChE,QACE,oBAAC,gBAAgB,kBAAA;EACf,aAAU;EACV,WAAW,GAAG,wDAAwD,EAAU;EAChF,GAAI;YAEJ,oBAAC,iBAAA,EAAgB,WAAU,UAAA,CAAW;GACL;;AAIvC,SAAS,cAAc,EACrB,cACA,aACA,cAAW,UACX,GAAG,KACoD;AACvD,QACE,oBAAC,gBAAgB,QAAA,EAAA,UACf,qBAAC,gBAAgB,SAAA;EACf,aAAU;EACV,WAAW,GACT,ijBACA,MAAa,YACX,mIACF,EACD;EACS;EACV,GAAI;;GAEJ,oBAAC,sBAAA,EAAA,CAAuB;GACxB,oBAAC,gBAAgB,UAAA;IACf,WAAW,GACT,OACA,MAAa,YACX,sGACH;IAEA;KACwB;GAC3B,oBAAC,wBAAA,EAAA,CAAyB;;GACF,EAAA,CACH;;AAI7B,SAAS,YAAY,EAAE,cAAW,GAAG,KAA6D;AAChG,QACE,oBAAC,gBAAgB,OAAA;EACf,aAAU;EACV,WAAW,GAAG,6CAA6C,EAAU;EACrE,GAAI;GACJ;;AAIN,SAAS,WAAW,EAAE,cAAW,aAAU,GAAG,KAA4D;AACxG,QACE,qBAAC,gBAAgB,MAAA;EACf,aAAU;EACV,WAAW,GACT,6aACA,EACD;EACD,GAAI;aAEJ,oBAAC,QAAA;GAAK,WAAU;aACd,oBAAC,gBAAgB,eAAA,EAAA,UACf,oBAAC,WAAA,EAAU,WAAU,UAAA,CAAW,EAAA,CACF;IAC3B,EACP,oBAAC,gBAAgB,UAAA,EAAU,aAAA,CAAoC,CAAA;GAC1C;;AAI3B,SAAS,gBAAgB,EAAE,cAAW,GAAG,KAAiE;AACxG,QACE,oBAAC,gBAAgB,WAAA;EACf,aAAU;EACV,WAAW,GAAG,iDAAiD,EAAU;EACzE,GAAI;GACJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use
|
|
2
|
-
//# sourceMappingURL=separator.cjs.map
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-separator`);r=e.__toESM(r);function i({className:e,orientation:i=`horizontal`,decorative:a=!0,...o}){return(0,n.jsx)(r.Root,{"data-slot":`separator`,decorative:a,orientation:i,className:t.cn(`bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px`,e),...o})}exports.Separator=i;
|
|
2
|
+
//# sourceMappingURL=separator.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.cjs","sources":["../../src/elements/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/lib/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"
|
|
1
|
+
{"version":3,"file":"separator.cjs","names":[],"sources":["../../src/elements/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/lib/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"mappings":"2PAMA,SAAS,EAAU,CACjB,YACA,cAAc,aACd,aAAa,GACb,GAAG,GACoD,CACvD,OACE,EAAA,EAAA,KAAC,EAAmB,KAAA,CAClB,YAAU,YACE,aACC,cACb,UAAW,EAAA,GACT,iKACA,EACD,CACD,GAAI,GACJ"}
|
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"data-slot": "separator",
|
|
14
|
-
decorative: r,
|
|
15
|
-
orientation: o,
|
|
16
|
-
className: e(
|
|
17
|
-
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
18
|
-
t
|
|
19
|
-
),
|
|
20
|
-
...a
|
|
21
|
-
}
|
|
22
|
-
);
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
+
function Separator({ className: r, orientation: i = "horizontal", decorative: a = !0, ...o }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(SeparatorPrimitive.Root, {
|
|
7
|
+
"data-slot": "separator",
|
|
8
|
+
decorative: a,
|
|
9
|
+
orientation: i,
|
|
10
|
+
className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", r),
|
|
11
|
+
...o
|
|
12
|
+
});
|
|
23
13
|
}
|
|
24
|
-
export {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=separator.js.map
|
|
14
|
+
export { Separator };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=separator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.js","sources":["../../src/elements/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/lib/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"
|
|
1
|
+
{"version":3,"file":"separator.js","names":[],"sources":["../../src/elements/separator.tsx"],"sourcesContent":["'use client';\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator';\n\nimport { cn } from '@/lib/utils';\n\nfunction Separator({\n className,\n orientation = 'horizontal',\n decorative = true,\n ...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n return (\n <SeparatorPrimitive.Root\n data-slot=\"separator\"\n decorative={decorative}\n orientation={orientation}\n className={cn(\n 'bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className,\n )}\n {...props}\n />\n );\n}\n\nexport { Separator };\n"],"mappings":";;;;AAMA,SAAS,UAAU,EACjB,cACA,iBAAc,cACd,gBAAa,IACb,GAAG,KACoD;AACvD,QACE,oBAAC,mBAAmB,MAAA;EAClB,aAAU;EACE;EACC;EACb,WAAW,GACT,kKACA,EACD;EACD,GAAI;GACJ"}
|
package/dist/elements/sheet.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use
|
|
2
|
-
//# sourceMappingURL=sheet.cjs.map
|
|
1
|
+
"use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`lucide-react`),i=require(`@radix-ui/react-dialog`);i=e.__toESM(i);function a({...e}){return(0,n.jsx)(i.Root,{"data-slot":`sheet`,...e})}function o({...e}){return(0,n.jsx)(i.Trigger,{"data-slot":`sheet-trigger`,...e})}function s({...e}){return(0,n.jsx)(i.Close,{"data-slot":`sheet-close`,...e})}function c({...e}){return(0,n.jsx)(i.Portal,{"data-slot":`sheet-portal`,...e})}function l({className:e,...r}){return(0,n.jsx)(i.Overlay,{"data-slot":`sheet-overlay`,className:t.cn(`data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50`,e),...r})}function u({className:e,children:a,side:o=`right`,...s}){return(0,n.jsxs)(c,{children:[(0,n.jsx)(l,{}),(0,n.jsxs)(i.Content,{"data-slot":`sheet-content`,className:t.cn(`bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500`,o===`right`&&`data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm`,o===`left`&&`data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm`,o===`top`&&`data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b`,o===`bottom`&&`data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t`,e),...s,children:[a,(0,n.jsxs)(i.Close,{className:`ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none`,children:[(0,n.jsx)(r.XIcon,{className:`size-4`}),(0,n.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function d({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`sheet-header`,className:t.cn(`flex flex-col gap-1.5 p-4`,e),...r})}function f({className:e,...r}){return(0,n.jsx)(`div`,{"data-slot":`sheet-footer`,className:t.cn(`mt-auto flex flex-col gap-2 p-4`,e),...r})}function p({className:e,...r}){return(0,n.jsx)(i.Title,{"data-slot":`sheet-title`,className:t.cn(`text-foreground font-semibold`,e),...r})}function m({className:e,...r}){return(0,n.jsx)(i.Description,{"data-slot":`sheet-description`,className:t.cn(`text-muted-foreground text-sm`,e),...r})}exports.Sheet=a,exports.SheetClose=s,exports.SheetContent=u,exports.SheetDescription=m,exports.SheetFooter=f,exports.SheetHeader=d,exports.SheetTitle=p,exports.SheetTrigger=o;
|
|
2
|
+
//# sourceMappingURL=sheet.cjs.map
|