@cryptlex/web-components 1.3.4 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/components/data-table/column-picker.es.js +12 -11
- package/dist/components/data-table/column-picker.es.js.map +1 -1
- package/dist/components/data-table/data-table.es.js +112 -95
- package/dist/components/data-table/data-table.es.js.map +1 -1
- package/dist/components/data-table/table-actions.es.js +8 -8
- package/dist/components/data-table/table-actions.es.js.map +1 -1
- package/dist/components/data-table/table-content.es.js +20 -15
- package/dist/components/data-table/table-content.es.js.map +1 -1
- package/dist/components/data-table/table-filter.es.js +264 -0
- package/dist/components/data-table/table-filter.es.js.map +1 -0
- package/dist/components/data-table/table-utils/constants.es.js +20 -6
- package/dist/components/data-table/table-utils/constants.es.js.map +1 -1
- package/dist/components/data-table/table-utils/link-display.es.js +4 -4
- package/dist/components/data-table/table-utils/link-display.es.js.map +1 -1
- package/dist/components/key-value-card/key-value-card.es.js +87 -0
- package/dist/components/key-value-card/key-value-card.es.js.map +1 -0
- package/dist/components/sidebar/app-layout.es.js +41 -47
- package/dist/components/sidebar/app-layout.es.js.map +1 -1
- package/dist/components/sidebar/breadcrumb.es.js +58 -0
- package/dist/components/sidebar/breadcrumb.es.js.map +1 -0
- package/dist/components/sidebar/nav-main.es.js +65 -51
- package/dist/components/sidebar/nav-main.es.js.map +1 -1
- package/dist/components/static-data-table/data-table.es.js +8 -8
- package/dist/components/static-data-table/data-table.es.js.map +1 -1
- package/dist/components/ui/avatar.es.js +1 -1
- package/dist/components/ui/avatar.es.js.map +1 -1
- package/dist/components/ui/badge.es.js +1 -1
- package/dist/components/ui/badge.es.js.map +1 -1
- package/dist/components/ui/button.es.js +15 -14
- package/dist/components/ui/button.es.js.map +1 -1
- package/dist/components/ui/calendar.es.js +3 -3
- package/dist/components/ui/chart.es.js +16 -16
- package/dist/components/ui/chart.es.js.map +1 -1
- package/dist/components/ui/checkbox.es.js +1 -1
- package/dist/components/ui/checkbox.es.js.map +1 -1
- package/dist/components/ui/command.es.js +28 -28
- package/dist/components/ui/command.es.js.map +1 -1
- package/dist/components/ui/copy-button.es.js +76 -0
- package/dist/components/ui/copy-button.es.js.map +1 -0
- package/dist/components/ui/dialog.es.js +8 -8
- package/dist/components/ui/dialog.es.js.map +1 -1
- package/dist/components/ui/drawer.es.js +18 -21
- package/dist/components/ui/drawer.es.js.map +1 -1
- package/dist/components/ui/dropdown-menu.es.js +38 -38
- package/dist/components/ui/dropdown-menu.es.js.map +1 -1
- package/dist/components/ui/form.es.js +4 -4
- package/dist/components/ui/input-otp.es.js +2 -2
- package/dist/components/ui/input-otp.es.js.map +1 -1
- package/dist/components/ui/input.es.js +7 -7
- package/dist/components/ui/input.es.js.map +1 -1
- package/dist/components/ui/link-button.es.js +22 -0
- package/dist/components/ui/link-button.es.js.map +1 -0
- package/dist/components/ui/mutli-select.es.js +17 -15
- package/dist/components/ui/mutli-select.es.js.map +1 -1
- package/dist/components/ui/navigation-menu.es.js +3 -3
- package/dist/components/ui/navigation-menu.es.js.map +1 -1
- package/dist/components/ui/password-input.es.js +10 -10
- package/dist/components/ui/password-input.es.js.map +1 -1
- package/dist/components/ui/popover.es.js +1 -1
- package/dist/components/ui/popover.es.js.map +1 -1
- package/dist/components/ui/radio-group.es.js +7 -7
- package/dist/components/ui/radio-group.es.js.map +1 -1
- package/dist/components/ui/select.es.js +20 -20
- package/dist/components/ui/select.es.js.map +1 -1
- package/dist/components/ui/sheet.es.js +8 -8
- package/dist/components/ui/sheet.es.js.map +1 -1
- package/dist/components/ui/sidebar.es.js +76 -76
- package/dist/components/ui/sidebar.es.js.map +1 -1
- package/dist/components/ui/table-page-layout.es.js +8 -8
- package/dist/components/ui/table-page-layout.es.js.map +1 -1
- package/dist/components/ui/table.es.js +19 -19
- package/dist/components/ui/table.es.js.map +1 -1
- package/dist/components/ui/tabs.es.js +11 -11
- package/dist/components/ui/tabs.es.js.map +1 -1
- package/dist/index.es.d.ts +54 -21
- package/dist/index.es.js +231 -226
- package/dist/index.es.js.map +1 -1
- package/dist/utils/index.es.js +19 -14
- package/dist/utils/index.es.js.map +1 -1
- package/lib/index.css +15 -87
- package/lib/tailwind.preset.css +220 -0
- package/lib/tokens.css +54 -54
- package/package.json +9 -8
- package/dist/components/info-card/info-card.es.js +0 -71
- package/dist/components/info-card/info-card.es.js.map +0 -1
- package/tailwind.preset.ts +0 -183
|
@@ -11,6 +11,8 @@ import "./card.es.js";
|
|
|
11
11
|
import "./chart.es.js";
|
|
12
12
|
import "./checkbox.es.js";
|
|
13
13
|
import "@radix-ui/react-collapsible";
|
|
14
|
+
import { XIcon as D, ChevronDown as g, Command as O, CheckIcon as B } from "lucide-react";
|
|
15
|
+
import * as c from "react";
|
|
14
16
|
import "./dialog.es.js";
|
|
15
17
|
import "./drawer.es.js";
|
|
16
18
|
import "./dropdown-menu.es.js";
|
|
@@ -18,16 +20,15 @@ import "./form.es.js";
|
|
|
18
20
|
import "./input.es.js";
|
|
19
21
|
import "./input-otp.es.js";
|
|
20
22
|
import "./label.es.js";
|
|
21
|
-
import { cn as
|
|
22
|
-
import
|
|
23
|
+
import { cn as K } from "../../utils/index.es.js";
|
|
24
|
+
import "@tanstack/react-router";
|
|
23
25
|
import "./navigation-menu.es.js";
|
|
24
26
|
import "./pagination.es.js";
|
|
25
27
|
import "./password-input.es.js";
|
|
26
28
|
import "./popover.es.js";
|
|
27
29
|
import "./radio-group.es.js";
|
|
28
|
-
import * as c from "react";
|
|
29
30
|
import "./select.es.js";
|
|
30
|
-
import { Separator as
|
|
31
|
+
import { Separator as x } from "./separator.es.js";
|
|
31
32
|
import "./sheet.es.js";
|
|
32
33
|
import "./sidebar.es.js";
|
|
33
34
|
import "sonner";
|
|
@@ -61,7 +62,7 @@ const L = c.forwardRef(
|
|
|
61
62
|
defaultValue: m,
|
|
62
63
|
onValueChange: l,
|
|
63
64
|
disabled: q,
|
|
64
|
-
placeholder:
|
|
65
|
+
placeholder: y,
|
|
65
66
|
animation: z = 0,
|
|
66
67
|
...b
|
|
67
68
|
}, w) => {
|
|
@@ -81,6 +82,7 @@ const L = c.forwardRef(
|
|
|
81
82
|
ref: w,
|
|
82
83
|
...b,
|
|
83
84
|
onClick: () => a(!u),
|
|
85
|
+
variant: "ghost",
|
|
84
86
|
className: "flex w-full p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-card",
|
|
85
87
|
children: t.length > 0 ? /* @__PURE__ */ n("div", { className: "flex justify-between items-center w-full", children: [
|
|
86
88
|
/* @__PURE__ */ e("div", { className: "flex flex-wrap items-center", children: t.map((r) => {
|
|
@@ -92,7 +94,7 @@ const L = c.forwardRef(
|
|
|
92
94
|
}) }),
|
|
93
95
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
94
96
|
/* @__PURE__ */ e(
|
|
95
|
-
|
|
97
|
+
D,
|
|
96
98
|
{
|
|
97
99
|
className: "h-4 mx-2 cursor-pointer text-muted-foreground",
|
|
98
100
|
onClick: (r) => {
|
|
@@ -100,22 +102,22 @@ const L = c.forwardRef(
|
|
|
100
102
|
}
|
|
101
103
|
}
|
|
102
104
|
),
|
|
103
|
-
/* @__PURE__ */ e(
|
|
104
|
-
/* @__PURE__ */ e(
|
|
105
|
+
/* @__PURE__ */ e(x, { orientation: "vertical", className: "flex min-h-6 h-full" }),
|
|
106
|
+
/* @__PURE__ */ e(g, { className: "h-4 mx-2 cursor-pointer text-muted-foreground" })
|
|
105
107
|
] })
|
|
106
108
|
] }) : /* @__PURE__ */ n("div", { className: "flex items-center justify-between w-full mx-auto", children: [
|
|
107
|
-
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground mx-3", children:
|
|
108
|
-
/* @__PURE__ */ e(
|
|
109
|
+
/* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground mx-3", children: y }),
|
|
110
|
+
/* @__PURE__ */ e(g, { className: "h-4 cursor-pointer text-muted-foreground mx-2" })
|
|
109
111
|
] })
|
|
110
112
|
}
|
|
111
113
|
) }),
|
|
112
114
|
/* @__PURE__ */ e(
|
|
113
115
|
A,
|
|
114
116
|
{
|
|
115
|
-
className: "w-[200px] p-0 drop-shadow-
|
|
117
|
+
className: "w-[200px] p-0 drop-shadow-xs",
|
|
116
118
|
align: "start",
|
|
117
119
|
onEscapeKeyDown: () => a(!1),
|
|
118
|
-
children: /* @__PURE__ */ n(
|
|
120
|
+
children: /* @__PURE__ */ n(O, { children: [
|
|
119
121
|
/* @__PURE__ */ e(k, { placeholder: "Search...", onKeyDown: N }),
|
|
120
122
|
/* @__PURE__ */ n(P, { children: [
|
|
121
123
|
/* @__PURE__ */ e(F, { children: "No results found." }),
|
|
@@ -134,11 +136,11 @@ const L = c.forwardRef(
|
|
|
134
136
|
/* @__PURE__ */ e(
|
|
135
137
|
"div",
|
|
136
138
|
{
|
|
137
|
-
className:
|
|
139
|
+
className: K(
|
|
138
140
|
"mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary",
|
|
139
141
|
o ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
|
|
140
142
|
),
|
|
141
|
-
children: /* @__PURE__ */ e(
|
|
143
|
+
children: /* @__PURE__ */ e(B, { className: "h-4 w-4" })
|
|
142
144
|
}
|
|
143
145
|
),
|
|
144
146
|
r.icon && /* @__PURE__ */ e(r.icon, { className: "mr-2 h-4 w-4 text-muted-foreground" }),
|
|
@@ -165,7 +167,7 @@ const L = c.forwardRef(
|
|
|
165
167
|
children: "Clear"
|
|
166
168
|
}
|
|
167
169
|
),
|
|
168
|
-
/* @__PURE__ */ e(
|
|
170
|
+
/* @__PURE__ */ e(x, { orientation: "vertical", className: "flex min-h-6 h-full" })
|
|
169
171
|
] }),
|
|
170
172
|
/* @__PURE__ */ e(v, {}),
|
|
171
173
|
/* @__PURE__ */ e(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutli-select.es.js","sources":["../../../lib/components/ui/mutli-select.tsx"],"sourcesContent":["'use client';\nimport { Badge } from '@/components/ui/badge';\nimport { Button } from '@/components/ui/button';\nimport {\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '@/components/ui/command';\nimport { Separator } from '@/index';\nimport { cn } from '@/utils';\nimport { Popover, PopoverContent, PopoverTrigger } from '@radix-ui/react-popover';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CheckIcon, ChevronDown, Command, XIcon } from 'lucide-react';\nimport * as React from 'react';\n\nconst multiSelectVariants = cva(\n 'm-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300',\n {\n variants: {\n variant: {\n default: 'border-foreground/10 drop-shadow-md text-foreground bg-card hover:bg-card/80',\n secondary:\n 'border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive:\n 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',\n inverted: 'inverted',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\ninterface MultiSelectFormFieldProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof multiSelectVariants> {\n asChild?: boolean;\n options: {\n label: string;\n value: string;\n icon?: React.ComponentType<{ className?: string }>;\n }[];\n defaultValue?: string[];\n disabled?: boolean;\n placeholder: string;\n className?: string;\n animation?: number;\n onValueChange: (value: string[]) => void;\n}\n\nconst MultiSelectFormField = React.forwardRef<HTMLButtonElement, MultiSelectFormFieldProps>(\n (\n {\n className,\n variant,\n asChild = false,\n options,\n defaultValue,\n onValueChange,\n disabled,\n placeholder,\n animation = 0,\n ...props\n },\n ref,\n ) => {\n const [selectedValues, setSelectedValues] = React.useState<string[]>(defaultValue || []);\n const selectedValuesSet = React.useRef(new Set(selectedValues));\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n\n React.useEffect(() => {\n setSelectedValues(defaultValue || []);\n selectedValuesSet.current = new Set(defaultValue);\n }, [defaultValue]);\n\n const handleInputKeyDown = (event: any) => {\n if (event.key === 'Enter') {\n setIsPopoverOpen(true);\n } else if (event.key === 'Backspace' && !event.target.value) {\n selectedValues.pop();\n setSelectedValues([...selectedValues]);\n selectedValuesSet.current.delete(selectedValues[selectedValues.length - 1]);\n onValueChange([...selectedValues]);\n }\n };\n\n const toggleOption = (value: string) => {\n if (selectedValuesSet.current.has(value)) {\n selectedValuesSet.current.delete(value);\n setSelectedValues(selectedValues.filter((v) => v !== value));\n } else {\n selectedValuesSet.current.add(value);\n setSelectedValues([...selectedValues, value]);\n }\n onValueChange(Array.from(selectedValuesSet.current));\n };\n\n return (\n <Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>\n <PopoverTrigger asChild>\n <Button\n ref={ref}\n {...props}\n onClick={() => setIsPopoverOpen(!isPopoverOpen)}\n className=\"flex w-full p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-card\"\n >\n {selectedValues.length > 0 ? (\n <div className=\"flex justify-between items-center w-full\">\n <div className=\"flex flex-wrap items-center\">\n {selectedValues.map((value) => {\n const option = options.find((o) => o.value === value);\n const IconComponent = option?.icon;\n return (\n <Badge key={value}>\n {IconComponent && <IconComponent className=\"h-6 w-6 mr-2\" />}\n {option?.label}\n </Badge>\n );\n })}\n </div>\n <div className=\"flex items-center justify-between\">\n <XIcon\n className=\"h-4 mx-2 cursor-pointer text-muted-foreground\"\n onClick={(event) => {\n setSelectedValues([]);\n selectedValuesSet.current.clear();\n onValueChange([]);\n event.stopPropagation();\n }}\n />\n <Separator orientation=\"vertical\" className=\"flex min-h-6 h-full\" />\n <ChevronDown className=\"h-4 mx-2 cursor-pointer text-muted-foreground\" />\n </div>\n </div>\n ) : (\n <div className=\"flex items-center justify-between w-full mx-auto\">\n <span className=\"text-sm text-muted-foreground mx-3\">{placeholder}</span>\n <ChevronDown className=\"h-4 cursor-pointer text-muted-foreground mx-2\" />\n </div>\n )}\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-[200px] p-0 drop-shadow-sm\"\n align=\"start\"\n onEscapeKeyDown={() => setIsPopoverOpen(false)}\n >\n <Command>\n <CommandInput placeholder=\"Search...\" onKeyDown={handleInputKeyDown} />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup>\n {options.map((option) => {\n const isSelected = selectedValuesSet.current.has(option.value);\n return (\n <CommandItem\n key={option.value}\n onSelect={() => toggleOption(option.value)}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n 'mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary',\n isSelected\n ? 'bg-primary text-primary-foreground'\n : 'opacity-50 [&_svg]:invisible',\n )}\n >\n <CheckIcon className=\"h-4 w-4\" />\n </div>\n {option.icon && (\n <option.icon className=\"mr-2 h-4 w-4 text-muted-foreground\" />\n )}\n <span>{option.label}</span>\n </CommandItem>\n );\n })}\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup>\n <div className=\"flex items-center justify-between\">\n {selectedValues.length > 0 && (\n <>\n <CommandItem\n onSelect={() => {\n setSelectedValues([]);\n selectedValuesSet.current.clear();\n onValueChange([]);\n }}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"flex-1 justify-center cursor-pointer\"\n >\n Clear\n </CommandItem>\n <Separator orientation=\"vertical\" className=\"flex min-h-6 h-full\" />\n </>\n )}\n <CommandSeparator />\n <CommandItem\n onSelect={() => setIsPopoverOpen(false)}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"flex-1 justify-center cursor-pointer\"\n >\n Close\n </CommandItem>\n </div>\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nMultiSelectFormField.displayName = 'MultiSelectFormField';\n\nexport default MultiSelectFormField;\n"],"names":["cva","MultiSelectFormField","React","className","variant","asChild","options","defaultValue","onValueChange","disabled","placeholder","animation","props","ref","selectedValues","setSelectedValues","selectedValuesSet","isPopoverOpen","setIsPopoverOpen","handleInputKeyDown","event","toggleOption","value","v","jsxs","Popover","jsx","PopoverTrigger","Button","option","o","IconComponent","Badge","XIcon","Separator","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","isSelected","CommandItem","cn","CheckIcon","CommandSeparator","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkB4BA;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WACE;AAAA,QACF,aACE;AAAA,QACF,UAAU;AAAA,MAAA;AAAA,IAEd;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAmBA,MAAMC,IAAuBC,EAAM;AAAA,EACjC,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,GAAGC;AAAA,KAELC,MACG;AACG,UAAA,CAACC,GAAgBC,CAAiB,IAAIb,EAAM,SAAmBK,KAAgB,EAAE,GACjFS,IAAoBd,EAAM,OAAO,IAAI,IAAIY,CAAc,CAAC,GACxD,CAACG,GAAeC,CAAgB,IAAIhB,EAAM,SAAS,EAAK;AAE9D,IAAAA,EAAM,UAAU,MAAM;AACF,MAAAa,EAAAR,KAAgB,EAAE,GAClBS,EAAA,UAAU,IAAI,IAAIT,CAAY;AAAA,IAAA,GAC/C,CAACA,CAAY,CAAC;AAEX,UAAAY,IAAqB,CAACC,MAAe;AACrC,MAAAA,EAAM,QAAQ,UAChBF,EAAiB,EAAI,IACZE,EAAM,QAAQ,eAAe,CAACA,EAAM,OAAO,UACpDN,EAAe,IAAI,GACDC,EAAA,CAAC,GAAGD,CAAc,CAAC,GACrCE,EAAkB,QAAQ,O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A;AAAA,gBAAA;AAAA,cAED,EAAA,CACF,EACF,CAAA;AAAA,YAAA,EACF,CAAA;AAAA,UAAA,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,GACF;AAAA,EAAA;AAGN;AAEAjB,EAAqB,cAAc;"}
|
|
1
|
+
{"version":3,"file":"mutli-select.es.js","sources":["../../../lib/components/ui/mutli-select.tsx"],"sourcesContent":["'use client';\nimport { Badge } from '@/components/ui/badge';\nimport { Button } from '@/components/ui/button';\nimport {\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n} from '@/components/ui/command';\nimport { Separator } from '@/index';\nimport { cn } from '@/utils';\nimport { Popover, PopoverContent, PopoverTrigger } from '@radix-ui/react-popover';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { CheckIcon, ChevronDown, Command, XIcon } from 'lucide-react';\nimport * as React from 'react';\n\nconst multiSelectVariants = cva(\n 'm-1 transition ease-in-out delay-150 hover:-translate-y-1 hover:scale-110 duration-300',\n {\n variants: {\n variant: {\n default: 'border-foreground/10 drop-shadow-md text-foreground bg-card hover:bg-card/80',\n secondary:\n 'border-foreground/10 bg-secondary text-secondary-foreground hover:bg-secondary/80',\n destructive:\n 'border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80',\n inverted: 'inverted',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\ninterface MultiSelectFormFieldProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof multiSelectVariants> {\n asChild?: boolean;\n options: {\n label: string;\n value: string;\n icon?: React.ComponentType<{ className?: string }>;\n }[];\n defaultValue?: string[];\n disabled?: boolean;\n placeholder: string;\n className?: string;\n animation?: number;\n onValueChange: (value: string[]) => void;\n}\n\nconst MultiSelectFormField = React.forwardRef<HTMLButtonElement, MultiSelectFormFieldProps>(\n (\n {\n className,\n variant,\n asChild = false,\n options,\n defaultValue,\n onValueChange,\n disabled,\n placeholder,\n animation = 0,\n ...props\n },\n ref,\n ) => {\n const [selectedValues, setSelectedValues] = React.useState<string[]>(defaultValue || []);\n const selectedValuesSet = React.useRef(new Set(selectedValues));\n const [isPopoverOpen, setIsPopoverOpen] = React.useState(false);\n\n React.useEffect(() => {\n setSelectedValues(defaultValue || []);\n selectedValuesSet.current = new Set(defaultValue);\n }, [defaultValue]);\n\n const handleInputKeyDown = (event: any) => {\n if (event.key === 'Enter') {\n setIsPopoverOpen(true);\n } else if (event.key === 'Backspace' && !event.target.value) {\n selectedValues.pop();\n setSelectedValues([...selectedValues]);\n selectedValuesSet.current.delete(selectedValues[selectedValues.length - 1]);\n onValueChange([...selectedValues]);\n }\n };\n\n const toggleOption = (value: string) => {\n if (selectedValuesSet.current.has(value)) {\n selectedValuesSet.current.delete(value);\n setSelectedValues(selectedValues.filter((v) => v !== value));\n } else {\n selectedValuesSet.current.add(value);\n setSelectedValues([...selectedValues, value]);\n }\n onValueChange(Array.from(selectedValuesSet.current));\n };\n\n return (\n <Popover open={isPopoverOpen} onOpenChange={setIsPopoverOpen}>\n <PopoverTrigger asChild>\n <Button\n ref={ref}\n {...props}\n onClick={() => setIsPopoverOpen(!isPopoverOpen)}\n variant={'ghost'}\n className=\"flex w-full p-1 rounded-md border min-h-10 h-auto items-center justify-between bg-inherit hover:bg-card\"\n >\n {selectedValues.length > 0 ? (\n <div className=\"flex justify-between items-center w-full\">\n <div className=\"flex flex-wrap items-center\">\n {selectedValues.map((value) => {\n const option = options.find((o) => o.value === value);\n const IconComponent = option?.icon;\n return (\n <Badge key={value}>\n {IconComponent && <IconComponent className=\"h-6 w-6 mr-2\" />}\n {option?.label}\n </Badge>\n );\n })}\n </div>\n <div className=\"flex items-center justify-between\">\n <XIcon\n className=\"h-4 mx-2 cursor-pointer text-muted-foreground\"\n onClick={(event) => {\n setSelectedValues([]);\n selectedValuesSet.current.clear();\n onValueChange([]);\n event.stopPropagation();\n }}\n />\n <Separator orientation=\"vertical\" className=\"flex min-h-6 h-full\" />\n <ChevronDown className=\"h-4 mx-2 cursor-pointer text-muted-foreground\" />\n </div>\n </div>\n ) : (\n <div className=\"flex items-center justify-between w-full mx-auto\">\n <span className=\"text-sm text-muted-foreground mx-3\">{placeholder}</span>\n <ChevronDown className=\"h-4 cursor-pointer text-muted-foreground mx-2\" />\n </div>\n )}\n </Button>\n </PopoverTrigger>\n <PopoverContent\n className=\"w-[200px] p-0 drop-shadow-xs\"\n align=\"start\"\n onEscapeKeyDown={() => setIsPopoverOpen(false)}\n >\n <Command>\n <CommandInput placeholder=\"Search...\" onKeyDown={handleInputKeyDown} />\n <CommandList>\n <CommandEmpty>No results found.</CommandEmpty>\n <CommandGroup>\n {options.map((option) => {\n const isSelected = selectedValuesSet.current.has(option.value);\n return (\n <CommandItem\n key={option.value}\n onSelect={() => toggleOption(option.value)}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"cursor-pointer\"\n >\n <div\n className={cn(\n 'mr-2 flex h-4 w-4 items-center justify-center rounded-sm border border-primary',\n isSelected\n ? 'bg-primary text-primary-foreground'\n : 'opacity-50 [&_svg]:invisible',\n )}\n >\n <CheckIcon className=\"h-4 w-4\" />\n </div>\n {option.icon && (\n <option.icon className=\"mr-2 h-4 w-4 text-muted-foreground\" />\n )}\n <span>{option.label}</span>\n </CommandItem>\n );\n })}\n </CommandGroup>\n <CommandSeparator />\n <CommandGroup>\n <div className=\"flex items-center justify-between\">\n {selectedValues.length > 0 && (\n <>\n <CommandItem\n onSelect={() => {\n setSelectedValues([]);\n selectedValuesSet.current.clear();\n onValueChange([]);\n }}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"flex-1 justify-center cursor-pointer\"\n >\n Clear\n </CommandItem>\n <Separator orientation=\"vertical\" className=\"flex min-h-6 h-full\" />\n </>\n )}\n <CommandSeparator />\n <CommandItem\n onSelect={() => setIsPopoverOpen(false)}\n style={{\n pointerEvents: 'auto',\n opacity: 1,\n }}\n className=\"flex-1 justify-center cursor-pointer\"\n >\n Close\n </CommandItem>\n </div>\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nMultiSelectFormField.displayName = 'MultiSelectFormField';\n\nexport default MultiSelectFormField;\n"],"names":["cva","MultiSelectFormField","React","className","variant","asChild","options","defaultValue","onValueChange","disabled","placeholder","animation","props","ref","selectedValues","setSelectedValues","selectedValuesSet","isPopoverOpen","setIsPopoverOpen","handleInputKeyDown","event","toggleOption","value","v","jsxs","Popover","jsx","PopoverTrigger","Button","option","o","IconComponent","Badge","XIcon","Separator","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","isSelected","CommandItem","cn","CheckIcon","CommandSeparator","Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkB4BA;AAAA,EAC1B;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,WACE;AAAA,QACF,aACE;AAAA,QACF,UAAU;AAAA,MAAA;AAAA,IAEd;AAAA,IACA,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;AAmBA,MAAMC,IAAuBC,EAAM;AAAA,EACjC,CACE;AAAA,IACE,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,GAAGC;AAAA,KAELC,MACG;AACG,UAAA,CAACC,GAAgBC,CAAiB,IAAIb,EAAM,SAAmBK,KAAgB,EAAE,GACjFS,IAAoBd,EAAM,OAAO,IAAI,IAAIY,CAAc,CAAC,GACxD,CAACG,GAAeC,CAAgB,IAAIhB,EAAM,SAAS,EAAK;AAE9D,IAAAA,EAAM,UAAU,MAAM;AACF,MAAAa,EAAAR,KAAgB,EAAE,GAClBS,EA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U,aAAY,YAAW,WAAU,sBAAsB,CAAA;AAAA,gBAAA,GACpE;AAAA,kCAEDY,GAAiB,EAAA;AAAA,gBAClB,gBAAApB;AAAA,kBAACiB;AAAA,kBAAA;AAAA,oBACC,UAAU,MAAMzB,EAAiB,EAAK;AAAA,oBACtC,OAAO;AAAA,sBACL,eAAe;AAAA,sBACf,SAAS;AAAA,oBACX;AAAA,oBACA,WAAU;AAAA,oBACX,UAAA;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAED,EAAA,CACF,EACF,CAAA;AAAA,YAAA,EACF,CAAA;AAAA,UAAA,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF,GACF;AAAA,EAAA;AAGN;AAEAjB,EAAqB,cAAc;"}
|
|
@@ -69,7 +69,7 @@ const w = t.Link, m = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ *
|
|
|
69
69
|
t.Viewport,
|
|
70
70
|
{
|
|
71
71
|
className: n(
|
|
72
|
-
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
72
|
+
"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]",
|
|
73
73
|
e
|
|
74
74
|
),
|
|
75
75
|
ref: o,
|
|
@@ -82,7 +82,7 @@ const x = r.forwardRef(({ className: e, ...a }, o) => /* @__PURE__ */ i(
|
|
|
82
82
|
{
|
|
83
83
|
ref: o,
|
|
84
84
|
className: n(
|
|
85
|
-
"top-full z-
|
|
85
|
+
"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in",
|
|
86
86
|
e
|
|
87
87
|
),
|
|
88
88
|
...a,
|
|
@@ -95,7 +95,7 @@ const y = r.forwardRef(({ className: e, title: a, children: o, ...d }, l) => /*
|
|
|
95
95
|
{
|
|
96
96
|
ref: l,
|
|
97
97
|
className: n(
|
|
98
|
-
"block select-none text-accent space-y-1 rounded-md p-3 leading-none no-underline outline-
|
|
98
|
+
"block select-none text-accent space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground",
|
|
99
99
|
e
|
|
100
100
|
),
|
|
101
101
|
...d,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation-menu.es.js","sources":["../../../lib/components/ui/navigation-menu.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\nimport { buttonVariants } from \"./button\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(buttonVariants({size:'sm', variant: 'outline'}))\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-
|
|
1
|
+
{"version":3,"file":"navigation-menu.es.js","sources":["../../../lib/components/ui/navigation-menu.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as NavigationMenuPrimitive from \"@radix-ui/react-navigation-menu\"\nimport { cva } from \"class-variance-authority\"\nimport { cn } from \"@/utils\"\nimport { ChevronDownIcon } from \"@radix-ui/react-icons\"\nimport { buttonVariants } from \"./button\"\n\nconst NavigationMenu = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Root>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Root\n ref={ref}\n className={cn(\n \"relative z-10 flex max-w-max flex-1 items-center justify-center\",\n className\n )}\n {...props}\n >\n {children}\n <NavigationMenuViewport />\n </NavigationMenuPrimitive.Root>\n))\nNavigationMenu.displayName = NavigationMenuPrimitive.Root.displayName\n\nconst NavigationMenuList = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.List>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.List\n ref={ref}\n className={cn(\n \"group flex flex-1 list-none items-center justify-center space-x-1 flex-wrap\",\n className\n )}\n {...props}\n />\n))\nNavigationMenuList.displayName = NavigationMenuPrimitive.List.displayName\n\nconst NavigationMenuItem = NavigationMenuPrimitive.Item\n\nconst navigationMenuTriggerStyle = cva(buttonVariants({size:'sm', variant: 'outline'}))\n\nconst NavigationMenuTrigger = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <NavigationMenuPrimitive.Trigger\n ref={ref}\n className={cn(navigationMenuTriggerStyle(), \"group\", className)}\n {...props}\n >\n {children}{\" \"}\n <ChevronDownIcon\n className=\"relative top-[1px] ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180\"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n))\nNavigationMenuTrigger.displayName = NavigationMenuPrimitive.Trigger.displayName\n\nconst NavigationMenuContent = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Content>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Content\n ref={ref}\n className={cn(\n \"left-0 top-0 w-full data-[motion^=from-]:animate-in data-[motion^=to-]:animate-out data-[motion^=from-]:fade-in data-[motion^=to-]:fade-out data-[motion=from-end]:slide-in-from-right-52 data-[motion=from-start]:slide-in-from-left-52 data-[motion=to-end]:slide-out-to-right-52 data-[motion=to-start]:slide-out-to-left-52 md:absolute md:w-auto \",\n className\n )}\n {...props}\n />\n))\nNavigationMenuContent.displayName = NavigationMenuPrimitive.Content.displayName\n\nconst NavigationMenuLink = NavigationMenuPrimitive.Link\n\nconst NavigationMenuViewport = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Viewport>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Viewport>\n>(({ className, ...props }, ref) => (\n <div className={cn(\"absolute left-0 top-full flex justify-center\")}>\n <NavigationMenuPrimitive.Viewport\n className={cn(\n \"origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]\",\n className\n )}\n ref={ref}\n {...props}\n />\n </div>\n))\nNavigationMenuViewport.displayName =\n NavigationMenuPrimitive.Viewport.displayName\n\nconst NavigationMenuIndicator = React.forwardRef<\n React.ElementRef<typeof NavigationMenuPrimitive.Indicator>,\n React.ComponentPropsWithoutRef<typeof NavigationMenuPrimitive.Indicator>\n>(({ className, ...props }, ref) => (\n <NavigationMenuPrimitive.Indicator\n ref={ref}\n className={cn(\n \"top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in\",\n className\n )}\n {...props}\n >\n <div className=\"relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md\" />\n </NavigationMenuPrimitive.Indicator>\n))\nNavigationMenuIndicator.displayName =\n NavigationMenuPrimitive.Indicator.displayName\n\nconst NavigationMenuListItem = React.forwardRef<\n React.ElementRef<\"a\">,\n React.ComponentPropsWithoutRef<\"a\">\n>(({ className, title, children, ...props }, ref) => {\n return (\n <li>\n <NavigationMenuLink asChild>\n <a\n ref={ref}\n className={cn(\n \"block select-none text-accent space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground\",\n className\n )}\n {...props}\n >\n <div className=\"text-body font-medium leading-none\">{title}</div>\n <p className=\"line-clamp-2 text-body leading-snug text-muted-foreground\">\n {children}\n </p>\n </a>\n </NavigationMenuLink>\n </li>\n )\n})\nNavigationMenuListItem.displayName = \"NavigationItemListItem\"\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuViewport,\n NavigationMenuListItem\n}\n"],"names":["NavigationMenu","React","className","children","props","ref","jsxs","NavigationMenuPrimitive","cn","NavigationMenuViewport","NavigationMenuList","jsx","NavigationMenuItem","navigationMenuTriggerStyle","cva","buttonVariants","NavigationMenuTrigger","ChevronDownIcon","NavigationMenuContent","NavigationMenuLink","NavigationMenuIndicator","NavigationMenuListItem","title"],"mappings":";;;;;;;AAOM,MAAAA,IAAiBC,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpC,gBAAAC;AAAA,EAACC,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,wBACAM,GAAuB,CAAA,CAAA;AAAA,IAAA;AAAA,EAAA;AAC1B,CACD;AACDT,EAAe,cAAcO,EAAwB,KAAK;AAEpD,MAAAG,IAAqBT,EAAM,WAG/B,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAM,GAAGC,MAC1B,gBAAAM;AAAA,EAACJ,EAAwB;AAAA,EAAxB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,EAAA;AACN,CACD;AACDM,EAAmB,cAAcH,EAAwB,KAAK;AAE9D,MAAMK,IAAqBL,EAAwB,MAE7CM,IAA6BC,EAAIC,EAAe,EAAC,MAAK,MAAM,SAAS,WAAU,CAAC,GAEhFC,IAAwBf,EAAM,WAGlC,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpC,gBAAAC;AAAA,EAACC,EAAwB;AAAA,EAA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AAC1F,CACD;AACDS,EAAwB,cACtBb,EAAwB,UAAU;AAE9B,MAAAc,IAAyBpB,EAAM,WAGnC,CAAC,EAAE,WAAAC,GAAW,OAAAoB,GAAO,UAAAnB,GAAU,GAAGC,EAAM,GAAGC,MAExC,gBAAAM,EAAA,MAAA,EACC,UAAC,gBAAAA,EAAAQ,GAAA,EAAmB,SAAO,IACzB,UAAA,gBAAAb;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,KAAAD;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,IAEJ,UAAA;AAAA,MAAC,gBAAAO,EAAA,OAAA,EAAI,WAAU,sCAAsC,UAAMW,GAAA;AAAA,MAC1D,gBAAAX,EAAA,KAAA,EAAE,WAAU,6DACV,UAAAR,EACH,CAAA;AAAA,IAAA;AAAA,EAAA;GAEJ,EACF,CAAA,CAEH;AACDkB,EAAuB,cAAc;"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { EyeIcon as d, EyeOffIcon as
|
|
5
|
-
import { Button as
|
|
3
|
+
import * as r from "react";
|
|
4
|
+
import { EyeIcon as d, EyeOffIcon as i } from "lucide-react";
|
|
5
|
+
import { Button as m } from "./button.es.js";
|
|
6
6
|
import { Input as u } from "./input.es.js";
|
|
7
|
-
const c =
|
|
8
|
-
({ className: l, ...
|
|
9
|
-
const [t, a] =
|
|
7
|
+
const c = r.forwardRef(
|
|
8
|
+
({ className: l, ...s }, o) => {
|
|
9
|
+
const [t, a] = r.useState(!1);
|
|
10
10
|
return /* @__PURE__ */ n("div", { className: "flex flex-row items-center relative", children: [
|
|
11
|
-
/* @__PURE__ */ e(u, { type: t ? "text" : "password", ref:
|
|
11
|
+
/* @__PURE__ */ e(u, { type: t ? "text" : "password", ref: o, ...s }),
|
|
12
12
|
/* @__PURE__ */ e(
|
|
13
|
-
|
|
13
|
+
m,
|
|
14
14
|
{
|
|
15
15
|
type: "button",
|
|
16
|
-
className: "absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-muted/5 focus:outline-
|
|
16
|
+
className: "absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-muted/5 focus:outline-hidden",
|
|
17
17
|
onClick: () => a(!t),
|
|
18
|
-
children: t ? /* @__PURE__ */ e(
|
|
18
|
+
children: t ? /* @__PURE__ */ e(i, { className: "h-4 w-4", "aria-hidden": "true" }) : /* @__PURE__ */ e(d, { className: "h-4 w-4", "aria-hidden": "true" })
|
|
19
19
|
}
|
|
20
20
|
)
|
|
21
21
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"password-input.es.js","sources":["../../../lib/components/ui/password-input.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport { Button } from './button';\nimport { Input, InputProps } from './input';\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, ...props }, ref) => {\n const [showPassword, setShowPassword] = React.useState<boolean>(false);\n return (\n <div className=\"flex flex-row items-center relative\">\n <Input type={showPassword ? 'text' : 'password'} ref={ref} {...props} />\n <Button\n type=\"button\"\n className=\"absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-muted/5 focus:outline-
|
|
1
|
+
{"version":3,"file":"password-input.es.js","sources":["../../../lib/components/ui/password-input.tsx"],"sourcesContent":["'use client';\nimport * as React from 'react';\n\nimport { EyeIcon, EyeOffIcon } from 'lucide-react';\nimport { Button } from './button';\nimport { Input, InputProps } from './input';\n\nconst PasswordInput = React.forwardRef<HTMLInputElement, InputProps>(\n ({ className, ...props }, ref) => {\n const [showPassword, setShowPassword] = React.useState<boolean>(false);\n return (\n <div className=\"flex flex-row items-center relative\">\n <Input type={showPassword ? 'text' : 'password'} ref={ref} {...props} />\n <Button\n type=\"button\"\n className=\"absolute right-0 top-0 rounded-md bg-transparent p-2 text-muted-foreground hover:bg-muted/5 focus:outline-hidden\"\n onClick={() => setShowPassword(!showPassword)}\n >\n {!showPassword ? (\n <EyeIcon className=\"h-4 w-4\" aria-hidden=\"true\" />\n ) : (\n <EyeOffIcon className=\"h-4 w-4\" aria-hidden=\"true\" />\n )}\n </Button>\n </div>\n );\n },\n);\nPasswordInput.displayName = 'PasswordInput';\n\nexport { PasswordInput };\n"],"names":["PasswordInput","React","className","props","ref","showPassword","setShowPassword","jsxs","jsx","Input","Button","EyeOffIcon","EyeIcon"],"mappings":";;;;;;AAOA,MAAMA,IAAgBC,EAAM;AAAA,EAC1B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAA,GAASC,MAAQ;AAChC,UAAM,CAACC,GAAcC,CAAe,IAAIL,EAAM,SAAkB,EAAK;AAEnE,WAAA,gBAAAM,EAAC,OAAI,EAAA,WAAU,uCACb,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAM,MAAMJ,IAAe,SAAS,YAAY,KAAAD,GAAW,GAAGD,GAAO;AAAA,MACtE,gBAAAK;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,SAAS,MAAMJ,EAAgB,CAACD,CAAY;AAAA,UAE3C,UAACA,IAGC,gBAAAG,EAAAG,GAAA,EAAW,WAAU,WAAU,eAAY,OAAO,CAAA,IAFlD,gBAAAH,EAAAI,GAAA,EAAQ,WAAU,WAAU,eAAY,OAAO,CAAA;AAAA,QAEG;AAAA,MAAA;AAAA,IAEvD,GACF;AAAA,EAAA;AAGN;AACAZ,EAAc,cAAc;"}
|
|
@@ -9,7 +9,7 @@ const l = o.Root, c = o.Trigger, g = o.Anchor, m = n.forwardRef(({ className: e,
|
|
|
9
9
|
align: a,
|
|
10
10
|
sideOffset: r,
|
|
11
11
|
className: s(
|
|
12
|
-
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-
|
|
12
|
+
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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",
|
|
13
13
|
e
|
|
14
14
|
),
|
|
15
15
|
...d
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover.es.js","sources":["../../../lib/components/ui/popover.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@/utils\"\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-
|
|
1
|
+
{"version":3,"file":"popover.es.js","sources":["../../../lib/components/ui/popover.tsx"],"sourcesContent":["import * as React from \"react\"\nimport * as PopoverPrimitive from \"@radix-ui/react-popover\"\n\nimport { cn } from \"@/utils\"\n\nconst Popover = PopoverPrimitive.Root\n\nconst PopoverTrigger = PopoverPrimitive.Trigger\n\nconst PopoverAnchor = PopoverPrimitive.Anchor\n\nconst PopoverContent = React.forwardRef<\n React.ElementRef<typeof PopoverPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(({ className, align = \"center\", sideOffset = 4, ...props }, ref) => (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n \"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden 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\",\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n))\nPopoverContent.displayName = PopoverPrimitive.Content.displayName\n\nexport { Popover, PopoverTrigger, PopoverContent, PopoverAnchor }\n"],"names":["Popover","PopoverPrimitive","PopoverTrigger","PopoverAnchor","PopoverContent","React","className","align","sideOffset","props","ref","jsx","cn"],"mappings":";;;;AAKA,MAAMA,IAAUC,EAAiB,MAE3BC,IAAiBD,EAAiB,SAElCE,IAAgBF,EAAiB,QAEjCG,IAAiBC,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,OAAAC,IAAQ,UAAU,YAAAC,IAAa,GAAG,GAAGC,EAAM,GAAGC,MAC3D,gBAAAC,EAAAV,EAAiB,QAAjB,EACC,UAAA,gBAAAU;AAAA,EAACV,EAAiB;AAAA,EAAjB;AAAA,IACC,KAAAS;AAAA,IACA,OAAAH;AAAA,IACA,YAAAC;AAAA,IACA,WAAWI;AAAA,MACT;AAAA,MACAN;AAAA,IACF;AAAA,IACC,GAAGG;AAAA,EAAA;AACN,GACF,CACD;AACDL,EAAe,cAAcH,EAAiB,QAAQ;"}
|
|
@@ -3,24 +3,24 @@ import * as s from "react";
|
|
|
3
3
|
import { CheckIcon as m } from "@radix-ui/react-icons";
|
|
4
4
|
import * as r from "@radix-ui/react-radio-group";
|
|
5
5
|
import { cn as t } from "../../utils/index.es.js";
|
|
6
|
-
const d = s.forwardRef(({ className: o, ...
|
|
6
|
+
const d = s.forwardRef(({ className: o, ...i }, a) => /* @__PURE__ */ e(
|
|
7
7
|
r.Root,
|
|
8
8
|
{
|
|
9
9
|
className: t("grid gap-2", o),
|
|
10
|
-
...
|
|
11
|
-
ref:
|
|
10
|
+
...i,
|
|
11
|
+
ref: a
|
|
12
12
|
}
|
|
13
13
|
));
|
|
14
14
|
d.displayName = r.Root.displayName;
|
|
15
|
-
const l = s.forwardRef(({ className: o, ...
|
|
15
|
+
const l = s.forwardRef(({ className: o, ...i }, a) => /* @__PURE__ */ e(
|
|
16
16
|
r.Item,
|
|
17
17
|
{
|
|
18
|
-
ref:
|
|
18
|
+
ref: a,
|
|
19
19
|
className: t(
|
|
20
|
-
"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-
|
|
20
|
+
"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow-sm focus:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",
|
|
21
21
|
o
|
|
22
22
|
),
|
|
23
|
-
...
|
|
23
|
+
...i,
|
|
24
24
|
children: /* @__PURE__ */ e(r.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ e(m, { className: "h-3.5 w-3.5 fill-primary" }) })
|
|
25
25
|
}
|
|
26
26
|
));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-group.es.js","sources":["../../../lib/components/ui/radio-group.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { CheckIcon } from \"@radix-ui/react-icons\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\n\nimport { cn } from \"@/utils\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow focus:outline-
|
|
1
|
+
{"version":3,"file":"radio-group.es.js","sources":["../../../lib/components/ui/radio-group.tsx"],"sourcesContent":["import * as React from \"react\"\nimport { CheckIcon } from \"@radix-ui/react-icons\"\nimport * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\"\n\nimport { cn } from \"@/utils\"\n\nconst RadioGroup = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Root>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Root\n className={cn(\"grid gap-2\", className)}\n {...props}\n ref={ref}\n />\n )\n})\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName\n\nconst RadioGroupItem = React.forwardRef<\n React.ElementRef<typeof RadioGroupPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n return (\n <RadioGroupPrimitive.Item\n ref={ref}\n className={cn(\n \"aspect-square h-4 w-4 rounded-full border border-primary text-primary shadow-sm focus:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50\",\n className\n )}\n {...props}\n >\n <RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n <CheckIcon className=\"h-3.5 w-3.5 fill-primary\" />\n </RadioGroupPrimitive.Indicator>\n </RadioGroupPrimitive.Item>\n )\n})\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName\n\nexport { RadioGroup, RadioGroupItem }\n"],"names":["RadioGroup","React","className","props","ref","jsx","RadioGroupPrimitive","cn","RadioGroupItem","CheckIcon"],"mappings":";;;;;AAMM,MAAAA,IAAaC,EAAM,WAGvB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAExB,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,WAAWC,EAAG,cAAcL,CAAS;AAAA,IACpC,GAAGC;AAAA,IACJ,KAAAC;AAAA,EAAA;AACF,CAEH;AACDJ,EAAW,cAAcM,EAAoB,KAAK;AAE5C,MAAAE,IAAiBP,EAAM,WAG3B,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAExB,gBAAAC;AAAA,EAACC,EAAoB;AAAA,EAApB;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,IAEJ,UAAA,gBAAAE,EAACC,EAAoB,WAApB,EAA8B,WAAU,oCACvC,UAAC,gBAAAD,EAAAI,GAAA,EAAU,WAAU,2BAA2B,CAAA,EAClD,CAAA;AAAA,EAAA;AACF,CAEH;AACDD,EAAe,cAAcF,EAAoB,KAAK;"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import { CaretSortIcon as p, ChevronUpIcon as f, ChevronDownIcon as u, CheckIcon as h } from "@radix-ui/react-icons";
|
|
4
4
|
import * as e from "@radix-ui/react-select";
|
|
5
5
|
import * as s from "react";
|
|
6
6
|
import { cn as l } from "../../utils/index.es.js";
|
|
7
|
-
const I = e.Root, R = e.Group, C = e.Value, y = s.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */
|
|
7
|
+
const I = e.Root, R = e.Group, C = e.Value, y = s.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ i(
|
|
8
8
|
e.Trigger,
|
|
9
9
|
{
|
|
10
10
|
ref: d,
|
|
11
11
|
className: l(
|
|
12
|
-
"flex h-
|
|
12
|
+
"flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-body shadow-xs ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:border-2 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
13
13
|
o
|
|
14
14
|
),
|
|
15
15
|
...a,
|
|
@@ -20,7 +20,7 @@ const I = e.Root, R = e.Group, C = e.Value, y = s.forwardRef(({ className: o, ch
|
|
|
20
20
|
}
|
|
21
21
|
));
|
|
22
22
|
y.displayName = e.Trigger.displayName;
|
|
23
|
-
const
|
|
23
|
+
const n = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
24
24
|
e.ScrollUpButton,
|
|
25
25
|
{
|
|
26
26
|
ref: a,
|
|
@@ -29,7 +29,7 @@ const i = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
|
29
29
|
children: /* @__PURE__ */ t(f, {})
|
|
30
30
|
}
|
|
31
31
|
));
|
|
32
|
-
|
|
32
|
+
n.displayName = e.ScrollUpButton.displayName;
|
|
33
33
|
const c = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
34
34
|
e.ScrollDownButton,
|
|
35
35
|
{
|
|
@@ -40,7 +40,7 @@ const c = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
|
40
40
|
}
|
|
41
41
|
));
|
|
42
42
|
c.displayName = e.ScrollDownButton.displayName;
|
|
43
|
-
const
|
|
43
|
+
const b = s.forwardRef(({ className: o, children: r, position: a = "popper", ...d }, m) => /* @__PURE__ */ t(e.Portal, { children: /* @__PURE__ */ i(
|
|
44
44
|
e.Content,
|
|
45
45
|
{
|
|
46
46
|
ref: m,
|
|
@@ -52,7 +52,7 @@ const w = s.forwardRef(({ className: o, children: r, position: a = "popper", ...
|
|
|
52
52
|
position: a,
|
|
53
53
|
...d,
|
|
54
54
|
children: [
|
|
55
|
-
/* @__PURE__ */ t(
|
|
55
|
+
/* @__PURE__ */ t(n, {}),
|
|
56
56
|
/* @__PURE__ */ t(
|
|
57
57
|
e.Viewport,
|
|
58
58
|
{
|
|
@@ -67,8 +67,8 @@ const w = s.forwardRef(({ className: o, children: r, position: a = "popper", ...
|
|
|
67
67
|
]
|
|
68
68
|
}
|
|
69
69
|
) }));
|
|
70
|
-
|
|
71
|
-
const
|
|
70
|
+
b.displayName = e.Content.displayName;
|
|
71
|
+
const w = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
72
72
|
e.Label,
|
|
73
73
|
{
|
|
74
74
|
ref: a,
|
|
@@ -76,13 +76,13 @@ const g = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
|
76
76
|
...r
|
|
77
77
|
}
|
|
78
78
|
));
|
|
79
|
-
|
|
80
|
-
const
|
|
79
|
+
w.displayName = e.Label.displayName;
|
|
80
|
+
const g = s.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__ */ i(
|
|
81
81
|
e.Item,
|
|
82
82
|
{
|
|
83
83
|
ref: d,
|
|
84
84
|
className: l(
|
|
85
|
-
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-body outline-
|
|
85
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-body outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
86
86
|
o
|
|
87
87
|
),
|
|
88
88
|
...a,
|
|
@@ -92,8 +92,8 @@ const N = s.forwardRef(({ className: o, children: r, ...a }, d) => /* @__PURE__
|
|
|
92
92
|
]
|
|
93
93
|
}
|
|
94
94
|
));
|
|
95
|
-
|
|
96
|
-
const
|
|
95
|
+
g.displayName = e.Item.displayName;
|
|
96
|
+
const x = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
97
97
|
e.Separator,
|
|
98
98
|
{
|
|
99
99
|
ref: a,
|
|
@@ -101,16 +101,16 @@ const b = s.forwardRef(({ className: o, ...r }, a) => /* @__PURE__ */ t(
|
|
|
101
101
|
...r
|
|
102
102
|
}
|
|
103
103
|
));
|
|
104
|
-
|
|
104
|
+
x.displayName = e.Separator.displayName;
|
|
105
105
|
export {
|
|
106
106
|
I as Select,
|
|
107
|
-
|
|
107
|
+
b as SelectContent,
|
|
108
108
|
R as SelectGroup,
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
g as SelectItem,
|
|
110
|
+
w as SelectLabel,
|
|
111
111
|
c as SelectScrollDownButton,
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
n as SelectScrollUpButton,
|
|
113
|
+
x as SelectSeparator,
|
|
114
114
|
y as SelectTrigger,
|
|
115
115
|
C as SelectValue
|
|
116
116
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.es.js","sources":["../../../lib/components/ui/select.tsx"],"sourcesContent":["'use client';\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex h-
|
|
1
|
+
{"version":3,"file":"select.es.js","sources":["../../../lib/components/ui/select.tsx"],"sourcesContent":["'use client';\nimport { CaretSortIcon, CheckIcon, ChevronDownIcon, ChevronUpIcon } from '@radix-ui/react-icons';\nimport * as SelectPrimitive from '@radix-ui/react-select';\nimport * as React from 'react';\n\nimport { cn } from '@/utils';\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n 'flex h-10 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-body shadow-xs ring-offset-background placeholder:text-muted-foreground focus-visible:outline-hidden focus-visible:border-2 focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1',\n className,\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <CaretSortIcon className=\"h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronUpIcon />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn('flex cursor-default items-center justify-center py-1', className)}\n {...props}\n >\n <ChevronDownIcon />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n 'relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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',\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)]',\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-body font-semibold', className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-body outline-hidden focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute right-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-muted', className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue\n};\n\n"],"names":["Select","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","React","className","children","props","ref","jsxs","cn","jsx","CaretSortIcon","SelectScrollUpButton","ChevronUpIcon","SelectScrollDownButton","ChevronDownIcon","SelectContent","position","SelectLabel","SelectItem","CheckIcon","SelectSeparator"],"mappings":";;;;;;AAOA,MAAMA,IAASC,EAAgB,MAEzBC,IAAcD,EAAgB,OAE9BE,IAAcF,EAAgB,OAE9BG,IAAgBC,EAAM,WAG1B,CAAC,EAAE,WAAAC,GAAW,UAAAC,GAAU,GAAGC,KAASC,MACpC,gBAAAC;AAAA,EAACT,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,IAEH,UAAA;AAAA,MAAAD;AAAA,MACD,gBAAAK,EAACX,EAAgB,MAAhB,EAAqB,SAAO,IAC3B,UAAC,gBAAAW,EAAAC,GA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11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as o, jsxs as
|
|
2
|
+
import { jsx as o, jsxs as d } from "react/jsx-runtime";
|
|
3
3
|
import * as e from "@radix-ui/react-dialog";
|
|
4
4
|
import { Cross2Icon as c } from "@radix-ui/react-icons";
|
|
5
5
|
import { cva as f } from "class-variance-authority";
|
|
6
6
|
import * as r from "react";
|
|
7
7
|
import { cn as i } from "../../utils/index.es.js";
|
|
8
|
-
const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal,
|
|
8
|
+
const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, n = r.forwardRef(({ className: t, ...a }, s) => /* @__PURE__ */ o(
|
|
9
9
|
e.Overlay,
|
|
10
10
|
{
|
|
11
11
|
className: i(
|
|
@@ -16,7 +16,7 @@ const C = e.Root, R = e.Trigger, T = e.Close, p = e.Portal, d = r.forwardRef(({
|
|
|
16
16
|
ref: s
|
|
17
17
|
}
|
|
18
18
|
));
|
|
19
|
-
|
|
19
|
+
n.displayName = e.Overlay.displayName;
|
|
20
20
|
const h = f(
|
|
21
21
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
22
22
|
{
|
|
@@ -32,10 +32,10 @@ const h = f(
|
|
|
32
32
|
side: "right"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
), g = r.forwardRef(({ side: t = "right", className: a, children: s, ...l }, m) => /* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */ o(
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
35
|
+
), g = r.forwardRef(({ side: t = "right", className: a, children: s, ...l }, m) => /* @__PURE__ */ d(p, { children: [
|
|
36
|
+
/* @__PURE__ */ o(n, {}),
|
|
37
|
+
/* @__PURE__ */ d(e.Content, { ref: m, className: i(h({ side: t }), a), ...l, children: [
|
|
38
|
+
/* @__PURE__ */ d(e.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
39
39
|
/* @__PURE__ */ o(c, { className: "h-4 w-4" }),
|
|
40
40
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
41
41
|
] }),
|
|
@@ -78,7 +78,7 @@ export {
|
|
|
78
78
|
b as SheetDescription,
|
|
79
79
|
y as SheetFooter,
|
|
80
80
|
u as SheetHeader,
|
|
81
|
-
|
|
81
|
+
n as SheetOverlay,
|
|
82
82
|
p as SheetPortal,
|
|
83
83
|
x as SheetTitle,
|
|
84
84
|
R as SheetTrigger
|