@incognia/cosmik 1.0.0-beta.9 → 1.0.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index23.cjs","sources":["../src/Select/index.tsx"],"sourcesContent":["'use client'\n\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n className={cn(\n \"border border-gray-900/24 data-[placeholder]:text-gray-700 [&_svg:not([class*='text-'])]:text-gray-700\",\n 'focus-visible:outline-none focus:shadow-field-active',\n 'flex h-[36px] w-full items-center justify-between rounded bg-white pl-16 pr-12 text-left whitespace-nowrap transition-[color,box-shadow]',\n 'disabled:cursor-not-allowed disabled:opacity-64 disabled:shadow-none',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-8',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-16\",\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'data-[state=open]:shadow-field-active',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-16 opacity-64 shrink-0\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\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-white',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2',\n '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 '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 border shadow-200',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-4 data-[side=left]:-translate-x-4 data-[side=right]:translate-x-4 data-[side=top]:-translate-y-4',\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-4'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('px-16 py-8 pr-8 font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'relative flex w-full cursor-default items-center gap-8 py-8 px-16 outline-none select-none',\n 'hover:bg-gray-200',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n 'data-[state=checked]:bg-purple-800 data-[state=checked]:text-white hover:data-[state=checked]:bg-purple-800',\n \"[&_svg:not([class*='size-'])]:size-16 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-8\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-8 flex size-16 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-16\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\n 'bg-gray-900/24 pointer-events-none -mx-4 my-4 h-px',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-4',\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-16\" />\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(\n 'flex cursor-default items-center justify-center py-4',\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-16\" />\n </SelectPrimitive.ScrollDownButton>\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"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","children","jsxs","cn","jsx","ChevronDownIcon","SelectContent","position","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":"oeAOA,SAASA,EAAO,CACd,GAAGC,CACL,EAAsD,CACpD,+BAAQC,EAAgB,KAAhB,CAAqB,YAAU,SAAU,GAAGD,EAAO,CAC7D,CAEA,SAASE,EAAY,CACnB,GAAGF,CACL,EAAuD,CACrD,+BAAQC,EAAgB,MAAhB,CAAsB,YAAU,eAAgB,GAAGD,EAAO,CACpE,CAEA,SAASG,EAAY,CACnB,GAAGH,CACL,EAAuD,CACrD,+BAAQC,EAAgB,MAAhB,CAAsB,YAAU,eAAgB,GAAGD,EAAO,CACpE,CAEA,SAASI,EAAc,CACrB,UAAAC,EACA,SAAAC,EACA,GAAGN,CACL,EAEG,CACD,OACEO,EAAAA,kBAAAA,KAACN,EAAgB,QAAhB,CACC,YAAU,iBACV,UAAWO,EAAAA,GACT,yGACA,uDACA,2IACA,uEACA,mJACA,qFACA,2BACA,6BACA,wCACAH,CAAA,EAED,GAAGL,EAEH,SAAA,CAAAM,EACDG,EAAAA,kBAAAA,IAACR,EAAgB,KAAhB,CAAqB,QAAO,GAC3B,SAAAQ,EAAAA,kBAAAA,IAACC,EAAAA,gBAAA,CAAgB,UAAU,6BAAA,CAA8B,CAAA,CAC3D,CAAA,CAAA,CAAA,CAGN,CAEA,SAASC,EAAc,CACrB,UAAAN,EACA,SAAAC,EACA,SAAAM,EAAW,SACX,GAAGZ,CACL,EAAyD,CACvD,OACES,EAAAA,kBAAAA,IAACR,EAAgB,OAAhB,CACC,SAAAM,EAAAA,kBAAAA,KAACN,EAAgB,QAAhB,CACC,YAAU,iBACV,UAAWO,EAAAA,GACT,WACA,0HACA,sGACA,uHACA,0LACAI,IAAa,UACX,kIACFP,CAAA,EAEF,SAAAO,EACC,GAAGZ,EAEJ,SAAA,CAAAS,EAAAA,kBAAAA,IAACI,EA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AAAA,IAACU,EAAAA,cAAA,CAAc,UAAU,SAAA,CAAU,CAAA,CAAA,CAGzC,CAEA,SAASL,EAAuB,CAC9B,UAAAT,EACA,GAAGL,CACL,EAAkE,CAChE,OACES,EAAAA,kBAAAA,IAACR,EAAgB,iBAAhB,CACC,YAAU,4BACV,UAAWO,EAAAA,GACT,uDACAH,CAAA,EAED,GAAGL,EAEJ,SAAAS,EAAAA,kBAAAA,IAACC,EAAAA,gBAAA,CAAgB,UAAU,SAAA,CAAU,CAAA,CAAA,CAG3C"}
1
+ {"version":3,"file":"index23.cjs","sources":["../src/Select/index.tsx"],"sourcesContent":["'use client'\n\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n className={cn(\n \"border border-gray-900/24 data-[placeholder]:text-gray-700 [&_svg:not([class*='text-'])]:text-gray-700\",\n 'focus-visible:outline-none focus:shadow-field-active',\n 'flex h-[36px] w-full items-center justify-between rounded bg-white pl-16 pr-12 text-left whitespace-nowrap transition-[color,box-shadow]',\n 'disabled:cursor-not-allowed disabled:opacity-64 disabled:shadow-none',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-8',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-16\",\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'data-[state=open]:shadow-field-active',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-16 opacity-64 shrink-0 ml-4\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\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-white',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2',\n '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 '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 border shadow-200',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-4 data-[side=left]:-translate-x-4 data-[side=right]:translate-x-4 data-[side=top]:-translate-y-4',\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-4'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('px-16 py-8 pr-8 font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'relative flex w-full cursor-default items-center gap-8 py-8 pl-16 pr-32 outline-none select-none',\n 'hover:bg-gray-200',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n 'data-[state=checked]:bg-purple-800 data-[state=checked]:text-white hover:data-[state=checked]:bg-purple-800',\n \"[&_svg:not([class*='size-'])]:size-16 *:[span]:last:flex *:[span]:last:flex-col *:[span]:last:gap-8\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-8 top-8 flex size-16 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-16\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\n 'bg-gray-900/24 pointer-events-none -mx-4 my-4 h-px',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-4',\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-16\" />\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(\n 'flex cursor-default items-center justify-center py-4',\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-16\" />\n </SelectPrimitive.ScrollDownButton>\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"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","children","jsxs","cn","jsx","ChevronDownIcon","SelectContent","position","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":"oeAOA,SAASA,EAAO,CACd,GAAGC,CACL,EAAsD,CACpD,+BAAQC,EAAgB,KAAhB,CAAqB,YAAU,SAAU,GAAGD,EAAO,CAC7D,CAEA,SAASE,EAAY,CACnB,GAAGF,CACL,EAAuD,CACrD,+BAAQC,EAAgB,MAAhB,CAAsB,YAAU,eAAgB,GAAGD,EAAO,CACpE,CAEA,SAASG,EAAY,CACnB,GAAGH,CACL,EAAuD,CACrD,+BAAQC,EAAgB,MAAhB,CAAsB,YAAU,eAAgB,GAAGD,EAAO,CACpE,CAEA,SAASI,EAAc,CACrB,UAAAC,EACA,SAAAC,EACA,GAAGN,CACL,EAEG,CACD,OACEO,EAAAA,kBAAAA,KAACN,EAAgB,QAAhB,CACC,YAAU,iBACV,UAAWO,EAAAA,GACT,yGACA,uDACA,2IACA,uEACA,mJACA,qFACA,2BACA,6BACA,wCACAH,CAAA,EAED,GAAGL,EAEH,SAAA,CAAAM,EACDG,EAAAA,kBAAAA,IAACR,EAAgB,KAAhB,CAAqB,QAAO,GAC3B,SAAAQ,EAAAA,kBAAAA,IAACC,EAAAA,gBAAA,CAAgB,UAAU,kCAAA,CAAmC,CAAA,CAChE,CAAA,CAAA,CAAA,CAGN,CAEA,SAASC,EAAc,CACrB,UAAAN,EACA,SAAAC,EACA,SAAAM,EAAW,SACX,GAAGZ,CACL,EAAyD,CACvD,OACES,EAAAA,kBAAAA,IAACR,EAA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AED,GAAGL,CAAA,CAAA,CAGV,CAEA,SAASa,EAAqB,CAC5B,UAAAR,EACA,GAAGL,CACL,EAAgE,CAC9D,OACES,EAAAA,kBAAAA,IAACR,EAAgB,eAAhB,CACC,YAAU,0BACV,UAAWO,EAAAA,GACT,uDACAH,CAAA,EAED,GAAGL,EAEJ,SAAAS,EAAAA,kBAAAA,IAACU,EAAAA,cAAA,CAAc,UAAU,SAAA,CAAU,CAAA,CAAA,CAGzC,CAEA,SAASL,EAAuB,CAC9B,UAAAT,EACA,GAAGL,CACL,EAAkE,CAChE,OACES,EAAAA,kBAAAA,IAACR,EAAgB,iBAAhB,CACC,YAAU,4BACV,UAAWO,EAAAA,GACT,uDACAH,CAAA,EAED,GAAGL,EAEJ,SAAAS,EAAAA,kBAAAA,IAACC,EAAAA,gBAAA,CAAgB,UAAU,SAAA,CAAU,CAAA,CAAA,CAG3C"}
package/dist/index23.js CHANGED
@@ -2,7 +2,7 @@ import { j as e } from "./index37.js";
2
2
  import * as a from "@radix-ui/react-select";
3
3
  import { CheckIcon as i, ChevronDownIcon as r, ChevronUpIcon as c } from "lucide-react";
4
4
  import { cn as l } from "./index39.js";
5
- function f({
5
+ function x({
6
6
  ...t
7
7
  }) {
8
8
  return /* @__PURE__ */ e.jsx(a.Root, { "data-slot": "select", ...t });
@@ -41,7 +41,7 @@ function v({
41
41
  ...o,
42
42
  children: [
43
43
  s,
44
- /* @__PURE__ */ e.jsx(a.Icon, { asChild: !0, children: /* @__PURE__ */ e.jsx(r, { className: "size-16 opacity-64 shrink-0" }) })
44
+ /* @__PURE__ */ e.jsx(a.Icon, { asChild: !0, children: /* @__PURE__ */ e.jsx(r, { className: "size-16 opacity-64 shrink-0 ml-4" }) })
45
45
  ]
46
46
  }
47
47
  );
@@ -106,16 +106,16 @@ function w({
106
106
  {
107
107
  "data-slot": "select-item",
108
108
  className: l(
109
- "relative flex w-full cursor-default items-center gap-8 py-8 px-16 outline-none select-none",
109
+ "relative flex w-full cursor-default items-center gap-8 py-8 pl-16 pr-32 outline-none select-none",
110
110
  "hover:bg-gray-200",
111
111
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0",
112
112
  "data-[state=checked]:bg-purple-800 data-[state=checked]:text-white hover:data-[state=checked]:bg-purple-800",
113
- "[&_svg:not([class*='size-'])]:size-16 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-8",
113
+ "[&_svg:not([class*='size-'])]:size-16 *:[span]:last:flex *:[span]:last:flex-col *:[span]:last:gap-8",
114
114
  t
115
115
  ),
116
116
  ...o,
117
117
  children: [
118
- /* @__PURE__ */ e.jsx("span", { className: "absolute right-8 flex size-16 items-center justify-center", children: /* @__PURE__ */ e.jsx(a.ItemIndicator, { children: /* @__PURE__ */ e.jsx(i, { className: "size-16" }) }) }),
118
+ /* @__PURE__ */ e.jsx("span", { className: "absolute right-8 top-8 flex size-16 items-center justify-center", children: /* @__PURE__ */ e.jsx(a.ItemIndicator, { children: /* @__PURE__ */ e.jsx(i, { className: "size-16" }) }) }),
119
119
  /* @__PURE__ */ e.jsx(a.ItemText, { children: s })
120
120
  ]
121
121
  }
@@ -172,7 +172,7 @@ function u({
172
172
  );
173
173
  }
174
174
  export {
175
- f as Select,
175
+ x as Select,
176
176
  j as SelectContent,
177
177
  h as SelectGroup,
178
178
  w as SelectItem,
@@ -1 +1 @@
1
- {"version":3,"file":"index23.js","sources":["../src/Select/index.tsx"],"sourcesContent":["'use client'\n\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n className={cn(\n \"border border-gray-900/24 data-[placeholder]:text-gray-700 [&_svg:not([class*='text-'])]:text-gray-700\",\n 'focus-visible:outline-none focus:shadow-field-active',\n 'flex h-[36px] w-full items-center justify-between rounded bg-white pl-16 pr-12 text-left whitespace-nowrap transition-[color,box-shadow]',\n 'disabled:cursor-not-allowed disabled:opacity-64 disabled:shadow-none',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-8',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-16\",\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'data-[state=open]:shadow-field-active',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-16 opacity-64 shrink-0\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\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-white',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2',\n '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 '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 border shadow-200',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-4 data-[side=left]:-translate-x-4 data-[side=right]:translate-x-4 data-[side=top]:-translate-y-4',\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-4'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('px-16 py-8 pr-8 font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'relative flex w-full cursor-default items-center gap-8 py-8 px-16 outline-none select-none',\n 'hover:bg-gray-200',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n 'data-[state=checked]:bg-purple-800 data-[state=checked]:text-white hover:data-[state=checked]:bg-purple-800',\n \"[&_svg:not([class*='size-'])]:size-16 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-8\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-8 flex size-16 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-16\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\n 'bg-gray-900/24 pointer-events-none -mx-4 my-4 h-px',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-4',\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-16\" />\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(\n 'flex cursor-default items-center justify-center py-4',\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-16\" />\n </SelectPrimitive.ScrollDownButton>\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"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","children","jsxs","cn","jsx","ChevronDownIcon","SelectContent","position","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":";;;;AAOA,SAASA,EAAO;AAAA,EACd,GAAGC;AACL,GAAsD;AACpD,+BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAY;AAAA,EACnB,GAAGF;AACL,GAAuD;AACrD,+BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASG,EAAY;AAAA,EACnB,GAAGH;AACL,GAAuD;AACrD,+BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,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AU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAAS,gBAAAA,EAAAA,IAACU,GAAA,EAAc,WAAU,UAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AAGzC;AAEA,SAASL,EAAuB;AAAA,EAC9B,WAAAT;AAAA,EACA,GAAGL;AACL,GAAkE;AAChE,SACES,gBAAAA,EAAAA;AAAAA,IAACR,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAAS,gBAAAA,EAAAA,IAACC,GAAA,EAAgB,WAAU,UAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AAG3C;"}
1
+ {"version":3,"file":"index23.js","sources":["../src/Select/index.tsx"],"sourcesContent":["'use client'\n\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nfunction Select({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n return <SelectPrimitive.Root data-slot=\"select\" {...props} />\n}\n\nfunction SelectGroup({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n return <SelectPrimitive.Group data-slot=\"select-group\" {...props} />\n}\n\nfunction SelectValue({\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n return <SelectPrimitive.Value data-slot=\"select-value\" {...props} />\n}\n\nfunction SelectTrigger({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n size?: 'sm' | 'default'\n}) {\n return (\n <SelectPrimitive.Trigger\n data-slot=\"select-trigger\"\n className={cn(\n \"border border-gray-900/24 data-[placeholder]:text-gray-700 [&_svg:not([class*='text-'])]:text-gray-700\",\n 'focus-visible:outline-none focus:shadow-field-active',\n 'flex h-[36px] w-full items-center justify-between rounded bg-white pl-16 pr-12 text-left whitespace-nowrap transition-[color,box-shadow]',\n 'disabled:cursor-not-allowed disabled:opacity-64 disabled:shadow-none',\n '*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-8',\n \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-16\",\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'data-[state=open]:shadow-field-active',\n className\n )}\n {...props}\n >\n {children}\n <SelectPrimitive.Icon asChild>\n <ChevronDownIcon className=\"size-16 opacity-64 shrink-0 ml-4\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\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-white',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0',\n 'data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2',\n '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 '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 border shadow-200',\n position === 'popper' &&\n 'data-[side=bottom]:translate-y-4 data-[side=left]:-translate-x-4 data-[side=right]:translate-x-4 data-[side=top]:-translate-y-4',\n className\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n position === 'popper' &&\n 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-4'\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n )\n}\n\nfunction SelectLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n return (\n <SelectPrimitive.Label\n data-slot=\"select-label\"\n className={cn('px-16 py-8 pr-8 font-medium', className)}\n {...props}\n />\n )\n}\n\nfunction SelectItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n return (\n <SelectPrimitive.Item\n data-slot=\"select-item\"\n className={cn(\n 'relative flex w-full cursor-default items-center gap-8 py-8 pl-16 pr-32 outline-none select-none',\n 'hover:bg-gray-200',\n 'data-[disabled]:pointer-events-none data-[disabled]:opacity-64 [&_svg]:pointer-events-none [&_svg]:shrink-0',\n 'data-[state=checked]:bg-purple-800 data-[state=checked]:text-white hover:data-[state=checked]:bg-purple-800',\n \"[&_svg:not([class*='size-'])]:size-16 *:[span]:last:flex *:[span]:last:flex-col *:[span]:last:gap-8\",\n className\n )}\n {...props}\n >\n <span className=\"absolute right-8 top-8 flex size-16 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <CheckIcon className=\"size-16\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n )\n}\n\nfunction SelectSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n return (\n <SelectPrimitive.Separator\n data-slot=\"select-separator\"\n className={cn(\n 'bg-gray-900/24 pointer-events-none -mx-4 my-4 h-px',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SelectScrollUpButton({\n className,\n ...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n return (\n <SelectPrimitive.ScrollUpButton\n data-slot=\"select-scroll-up-button\"\n className={cn(\n 'flex cursor-default items-center justify-center py-4',\n className\n )}\n {...props}\n >\n <ChevronUpIcon className=\"size-16\" />\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(\n 'flex cursor-default items-center justify-center py-4',\n className\n )}\n {...props}\n >\n <ChevronDownIcon className=\"size-16\" />\n </SelectPrimitive.ScrollDownButton>\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"],"names":["Select","props","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","className","children","jsxs","cn","jsx","ChevronDownIcon","SelectContent","position","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":";;;;AAOA,SAASA,EAAO;AAAA,EACd,GAAGC;AACL,GAAsD;AACpD,+BAAQC,EAAgB,MAAhB,EAAqB,aAAU,UAAU,GAAGD,GAAO;AAC7D;AAEA,SAASE,EAAY;AAAA,EACnB,GAAGF;AACL,GAAuD;AACrD,+BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASG,EAAY;AAAA,EACnB,GAAGH;AACL,GAAuD;AACrD,+BAAQC,EAAgB,OAAhB,EAAsB,aAAU,gBAAgB,GAAGD,GAAO;AACpE;AAEA,SAASI,EAAc;AAAA,EACrB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGN;AACL,GAEG;AACD,SACEO,gBAAAA,EAAAA;AAAAA,IAACN,EAAgB;AAAA,IAAhB;AAAA,MACC,aAAU;AAAA,MACV,WAAWO;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEH,UAAA;AAAA,Q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WO;AAAA,QACT;AAAA,QACAH;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,MAEJ,UAAAS,gBAAAA,EAAAA,IAACC,GAAA,EAAgB,WAAU,UAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AAG3C;"}
package/dist/index24.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index37.cjs"),n=require("@radix-ui/react-separator"),i=require("./index39.cjs");function l(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const u=l(n);function c({className:t,orientation:r="horizontal",decorative:e=!0,...a}){return o.jsxRuntimeExports.jsx(u.Root,{"data-slot":"separator",decorative:e,orientation:r,className:i.cn("bg-gray-900/24 shrink-0","data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full","data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),...a})}exports.Separator=c;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./index37.cjs"),n=require("@radix-ui/react-separator"),i=require("./index39.cjs");function u(t){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const a=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}return r.default=t,Object.freeze(r)}const c=u(n);function s({className:t,orientation:r="horizontal",decorative:e=!0,...a}){return o.jsxRuntimeExports.jsx(c.Root,{"data-slot":"separator",decorative:e,orientation:r,className:i.cn("bg-gray-900/24 shrink-0","data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-auto","data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-px",t),...a})}exports.Separator=s;
2
2
  //# sourceMappingURL=index24.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index24.cjs","sources":["../src/Separator/index.tsx"],"sourcesContent":["'use client'\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport * as React from 'react'\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-gray-900/24 shrink-0',\n 'data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"names":["Separator","className","orientation","decorative","props","jsx","SeparatorPrimitive","cn"],"mappings":"6cAMA,SAASA,EAAU,CACjB,UAAAC,EACA,YAAAC,EAAc,aACd,WAAAC,EAAa,GACb,GAAGC,CACL,EAAyD,CACvD,OACEC,EAAAA,kBAAAA,IAACC,EAAmB,KAAnB,CACC,YAAU,YACV,WAAAH,EACA,YAAAD,EACA,UAAWK,EAAAA,GACT,0BACA,0EACA,sEACAN,CAAA,EAED,GAAGG,CAAA,CAAA,CAGV"}
1
+ {"version":3,"file":"index24.cjs","sources":["../src/Separator/index.tsx"],"sourcesContent":["'use client'\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport * as React from 'react'\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-gray-900/24 shrink-0',\n 'data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-auto',\n 'data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"names":["Separator","className","orientation","decorative","props","jsx","SeparatorPrimitive","cn"],"mappings":"6cAMA,SAASA,EAAU,CACjB,UAAAC,EACA,YAAAC,EAAc,aACd,WAAAC,EAAa,GACb,GAAGC,CACL,EAAyD,CACvD,OACEC,EAAAA,kBAAAA,IAACC,EAAmB,KAAnB,CACC,YAAU,YACV,WAAAH,EACA,YAAAD,EACA,UAAWK,EAAAA,GACT,0BACA,0EACA,sEACAN,CAAA,EAED,GAAGG,CAAA,CAAA,CAGV"}
package/dist/index24.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { j as i } from "./index37.js";
2
2
  import * as n from "@radix-ui/react-separator";
3
3
  import { cn as e } from "./index39.js";
4
- function s({
4
+ function m({
5
5
  className: t,
6
6
  orientation: a = "horizontal",
7
7
  decorative: o = !0,
@@ -15,8 +15,8 @@ function s({
15
15
  orientation: a,
16
16
  className: e(
17
17
  "bg-gray-900/24 shrink-0",
18
- "data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full",
19
- "data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
18
+ "data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-auto",
19
+ "data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-px",
20
20
  t
21
21
  ),
22
22
  ...r
@@ -24,6 +24,6 @@ function s({
24
24
  );
25
25
  }
26
26
  export {
27
- s as Separator
27
+ m as Separator
28
28
  };
29
29
  //# sourceMappingURL=index24.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index24.js","sources":["../src/Separator/index.tsx"],"sourcesContent":["'use client'\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport * as React from 'react'\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-gray-900/24 shrink-0',\n 'data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full',\n 'data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"names":["Separator","className","orientation","decorative","props","jsx","SeparatorPrimitive","cn"],"mappings":";;;AAMA,SAASA,EAAU;AAAA,EACjB,WAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,YAAAC,IAAa;AAAA,EACb,GAAGC;AACL,GAAyD;AACvD,SACEC,gBAAAA,EAAAA;AAAAA,IAACC,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,YAAAH;AAAA,MACA,aAAAD;AAAA,MACA,WAAWK;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"index24.js","sources":["../src/Separator/index.tsx"],"sourcesContent":["'use client'\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\nimport * as React from 'react'\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-gray-900/24 shrink-0',\n 'data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-auto',\n 'data-[orientation=vertical]:h-auto data-[orientation=vertical]:w-px',\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Separator }\n"],"names":["Separator","className","orientation","decorative","props","jsx","SeparatorPrimitive","cn"],"mappings":";;;AAMA,SAASA,EAAU;AAAA,EACjB,WAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,YAAAC,IAAa;AAAA,EACb,GAAGC;AACL,GAAyD;AACvD,SACEC,gBAAAA,EAAAA;AAAAA,IAACC,EAAmB;AAAA,IAAnB;AAAA,MACC,aAAU;AAAA,MACV,YAAAH;AAAA,MACA,aAAAD;AAAA,MACA,WAAWK;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACAN;AAAA,MAAA;AAAA,MAED,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
package/dist/index31.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index37.cjs"),y=require("lucide-react"),R=require("react"),b=require("./index5.cjs"),w=require("./index6.cjs"),E=require("./index39.cjs");function N(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const x=N(R);function f({className:t,value:e,placeholder:i,onValueChange:n,...l}){const[r,o]=x.useState(""),d=x.useRef(null);function m(c){const a=c.target.value;if(a.includes(",")){const h=a.split(","),g=Array.from(new Set(h));n([...e||[],...g.filter(u=>!!u&&!e?.includes(u)).map(u=>u.trim())||[]]),o("");return}o(a)}function j(c){["Enter","Tab"].includes(c.key)&&r?.trim()&&(c.preventDefault(),e?.includes(r)||p(),o("")),c.key==="Backspace"&&!r&&n(e?.slice(0,-1)||[])}function p(){r.trim()&&(n([...e||[],r]),o(""))}return s.jsxRuntimeExports.jsxs("div",{className:E.cn("flex flex-wrap items-center gap-8 min-h-[36px]","border rounded border-gray-900/24 bg-white px-12 py-4","hover:cursor-text","hover:shadow-field-hover","active:shadow-field-active","focus-visible:outline-none focus:shadow-field-active",t),onClick:()=>d.current?.focus(),...l,children:[s.jsxRuntimeExports.jsx(k,{value:e,onValueChange:n}),s.jsxRuntimeExports.jsx("input",{ref:d,className:"h-[26px] outline-none text-sm",type:"text",value:r,onChange:m,onKeyDown:j,style:{width:`${r.length+1}ch`},onBlur:()=>p()}),e?.length===0&&!r&&s.jsxRuntimeExports.jsx("div",{className:"text-gray-400 ml-[-2ch]",children:i})]})}f.displayName="TagInput";function k({value:t,onValueChange:e}){return s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:t?.map((i,n)=>s.jsxRuntimeExports.jsxs(b.Badge,{className:"pl-0 gap-x-4 overflow-hidden",children:[s.jsxRuntimeExports.jsx(w.Button,{type:"button",className:"w-[26px] h-[26px] shrink-0",size:"icon",intent:"secondary",onClick:()=>{e(t?.filter((l,r)=>r!==n)||[])},children:s.jsxRuntimeExports.jsx(y.LucideX,{className:"w-16"})}),s.jsxRuntimeExports.jsx("div",{className:"truncate",children:i})]},n))})}exports.TagInput=f;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index37.cjs"),y=require("lucide-react"),R=require("react"),b=require("./index5.cjs"),w=require("./index6.cjs"),E=require("./index39.cjs");function N(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const i in t)if(i!=="default"){const n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:()=>t[i]})}}return e.default=t,Object.freeze(e)}const d=N(R);function f({className:t,value:e,placeholder:i,onValueChange:n,...l}){const[r,o]=d.useState(""),p=d.useRef(null);function m(c){const a=c.target.value;if(a.includes(",")){const h=a.split(","),g=Array.from(new Set(h));n([...e||[],...g.filter(u=>!!u&&!e?.includes(u)).map(u=>u.trim())||[]]),o("");return}o(a)}function j(c){["Enter","Tab"].includes(c.key)&&r?.trim()&&(c.preventDefault(),e?.includes(r)||x(),o("")),c.key==="Backspace"&&!r&&n(e?.slice(0,-1)||[])}function x(){r.trim()&&(n([...e||[],r]),o(""))}return s.jsxRuntimeExports.jsxs("div",{className:E.cn("flex flex-wrap items-center gap-8 min-h-[36px]","border rounded border-gray-900/24 bg-white px-12 py-4","hover:cursor-text","hover:shadow-field-hover","active:shadow-field-active","focus-visible:outline-none focus:shadow-field-active",t),onClick:()=>p.current?.focus(),...l,children:[s.jsxRuntimeExports.jsx(k,{value:e,onValueChange:n}),s.jsxRuntimeExports.jsx("input",{ref:p,className:"h-[26px] outline-none text-sm",type:"text",value:r,onChange:m,onKeyDown:j,style:{width:`${r.length+1}ch`},onBlur:()=>x()}),e?.length===0&&!r&&s.jsxRuntimeExports.jsx("div",{className:"text-gray-400 ml-[-2ch]",children:i})]})}f.displayName="TagInput";function k({value:t,onValueChange:e}){return s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:t?.map((i,n)=>s.jsxRuntimeExports.jsxs(b.Badge,{className:"px-0 pr-8 pl-0 gap-x-4 overflow-hidden",children:[s.jsxRuntimeExports.jsx(w.Button,{type:"button",className:"w-[26px] h-[26px] shrink-0",size:"icon",intent:"secondary",onClick:()=>{e(t?.filter((l,r)=>r!==n)||[])},children:s.jsxRuntimeExports.jsx(y.LucideX,{className:"w-16"})}),s.jsxRuntimeExports.jsx("div",{className:"truncate",children:i})]},n))})}exports.TagInput=f;
2
2
  //# sourceMappingURL=index31.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index31.cjs","sources":["../src/TagInput/index.tsx"],"sourcesContent":["import { LucideX } from 'lucide-react'\nimport * as React from 'react'\nimport { Badge } from '../Badge'\nimport { Button } from '../Button'\nimport { cn } from '../lib/utils'\n\nexport type TagInputProps = React.HTMLAttributes<HTMLInputElement> & {\n value?: string[]\n onValueChange: (value: string[]) => void\n placeholder?: string\n}\n\nfunction TagInput({\n className,\n value,\n placeholder,\n onValueChange,\n ...props\n}: TagInputProps) {\n const [inputValue, setInputValue] = React.useState('')\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n function handleChange(event: React.ChangeEvent<HTMLInputElement>) {\n const currentInputValue = event.target.value\n if (currentInputValue.includes(',')) {\n const currentValues = currentInputValue.split(',')\n //Remove duplicates\n const uniqueValues = Array.from(new Set(currentValues))\n\n onValueChange([\n ...(value || []),\n ...(uniqueValues\n .filter(inputValue => {\n //Remove empty values and already added values\n return Boolean(inputValue) && !value?.includes(inputValue)\n })\n .map(i => i.trim()) || [])\n ])\n setInputValue('')\n return\n }\n setInputValue(currentInputValue)\n }\n\n function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\n if (['Enter', 'Tab'].includes(event.key)) {\n if (inputValue?.trim()) {\n event.preventDefault()\n if (!value?.includes(inputValue)) {\n addInputValue()\n }\n setInputValue('')\n }\n }\n\n if (event.key === 'Backspace' && !inputValue) {\n onValueChange(value?.slice(0, -1) || [])\n }\n }\n\n function addInputValue() {\n if (!inputValue.trim()) return\n onValueChange([...(value || []), inputValue])\n setInputValue('')\n }\n\n return (\n <div\n className={cn(\n 'flex flex-wrap items-center gap-8 min-h-[36px]',\n 'border rounded border-gray-900/24 bg-white px-12 py-4',\n 'hover:cursor-text',\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'focus-visible:outline-none focus:shadow-field-active',\n className\n )}\n onClick={() => inputRef.current?.focus()}\n {...props}\n >\n <TagList value={value} onValueChange={onValueChange} />\n <input\n ref={inputRef}\n className=\"h-[26px] outline-none text-sm\"\n type=\"text\"\n value={inputValue}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n style={{ width: `${inputValue.length + 1}ch` }}\n onBlur={() => addInputValue()}\n />\n {value?.length === 0 && !inputValue && (\n <div className=\"text-gray-400 ml-[-2ch]\">{placeholder}</div>\n )}\n </div>\n )\n}\n\nTagInput.displayName = 'TagInput'\n\ntype TagListProps = React.HTMLAttributes<HTMLDivElement> & {\n value?: string[]\n onValueChange: (value: string[]) => void\n}\n\nfunction TagList({ value, onValueChange }: TagListProps) {\n return (\n <>\n {value?.map((tag, index) => (\n <Badge key={index} className=\"pl-0 gap-x-4 overflow-hidden\">\n <Button\n type=\"button\"\n className=\"w-[26px] h-[26px] shrink-0\"\n size=\"icon\"\n intent=\"secondary\"\n onClick={() => {\n onValueChange(value?.filter((_, i) => i !== index) || [])\n }}\n >\n <LucideX className=\"w-16\" />\n </Button>\n <div className=\"truncate\">{tag}</div>\n </Badge>\n ))}\n </>\n )\n}\n\nexport { TagInput }\n"],"names":["TagInput","className","value","placeholder","onValueChange","props","inputValue","setInputValue","React","inputRef","handleChange","event","currentInputValue","currentValues","uniqueValues","i","handleKeyDown","addInputValue","jsxs","cn","jsx","TagList","Fragment","tag","index","Badge","Button","_","LucideX"],"mappings":"ugBAYA,SAASA,EAAS,CAChB,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,cAAAC,EACA,GAAGC,CACL,EAAkB,CAChB,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAM,SAAS,EAAE,EAC/CC,EAAWD,EAAM,OAAyB,IAAI,EAEpD,SAASE,EAAaC,EAA4C,CAChE,MAAMC,EAAoBD,EAAM,OAAO,MACvC,GAAIC,EAAkB,SAAS,GAAG,EAAG,CACnC,MAAMC,EAAgBD,EAAkB,MAAM,GAAG,EAE3CE,EAAe,MAAM,KAAK,IAAI,IAAID,CAAa,CAAC,EAEtDT,EAAc,CACZ,GAAIF,GAAS,CAAA,EACb,GAAIY,EACD,OAAOR,GAEC,EAAQA,GAAe,CAACJ,GAAO,SAASI,CAAU,CAC1D,EACA,IAAIS,GAAKA,EAAE,KAAA,CAAM,GAAK,CAAA,CAAC,CAC3B,EACDR,EAAc,EAAE,EAChB,MACF,CACAA,EAAcK,CAAiB,CACjC,CAEA,SAASI,EAAcL,EAA8C,CAC/D,CAAC,QAAS,KAAK,EAAE,SAASA,EAAM,GAAG,GACjCL,GAAY,SACdK,EAAM,eAAA,EACDT,GAAO,SAASI,CAAU,GAC7BW,EAAA,EAEFV,EAAc,EAAE,GAIhBI,EAAM,MAAQ,aAAe,CAACL,GAChCF,EAAcF,GAAO,MAAM,EAAG,EAAE,GAAK,CAAA,CAAE,CAE3C,CAEA,SAASe,GAAgB,CAClBX,EAAW,SAChBF,EAAc,CAAC,GAAIF,GAAS,CAAA,EAAKI,CAAU,CAAC,EAC5CC,EAAc,EAAE,EAClB,CAEA,OACEW,EAAAA,kBAAAA,KAAC,MAAA,CACC,UAAWC,EAAAA,GACT,iDACA,wDACA,oBACA,2BACA,6BACA,uDACAlB,CAAA,EAEF,QAAS,IAAMQ,EAAS,SAAS,MAAA,EAChC,GAAGJ,EAEJ,SAAA,CAAAe,EAAAA,kBAAAA,IAACC,EAAA,CAAQ,MAAAnB,EAAc,cAAAE,CAAA,CAA8B,EACrDgB,EAAAA,kBAAAA,IAAC,QAAA,CACC,IAAKX,EACL,UAAU,gCACV,KAAK,OACL,MAAOH,EACP,SAAUI,EACV,UAAWM,EACX,MAAO,CAAE,MAAO,GAAGV,EAAW,OAAS,CAAC,IAAA,EACxC,OAAQ,IAAMW,EAAA,CAAc,CAAA,EAE7Bf,GAAO,SAAW,GAAK,CAACI,GACvBc,EAAAA,kBAAAA,IAAC,MAAA,CAAI,UAAU,0BAA2B,SAAAjB,CAAA,CAAY,CAAA,CAAA,CAAA,CAI9D,CAEAH,EAAS,YAAc,WAOvB,SAASqB,EAAQ,CAAE,MAAAnB,EAAO,cAAAE,GAA+B,CACvD,OACEgB,EAAAA,kBAAAA,IAAAE,EAAAA,kBAAAA,SAAA,CACG,YAAO,IAAI,CAACC,EAAKC,IAChBN,EAAAA,kBAAAA,KAACO,EAAAA,MAAA,CAAkB,UAAU,+BAC3B,SAAA,CAAAL,EAAAA,kBAAAA,IAACM,EAAAA,OAAA,CACC,KAAK,SACL,UAAU,6BACV,KAAK,OACL,OAAO,YACP,QAAS,IAAM,CACbtB,EAAcF,GAAO,OAAO,CAACyB,EAAGZ,IAAMA,IAAMS,CAAK,GAAK,EAAE,CAC1D,EAEA,SAAAJ,EAAAA,kBAAAA,IAACQ,EAAAA,QAAA,CAAQ,UAAU,MAAA,CAAO,CAAA,CAAA,EAE5BR,EAAAA,kBAAAA,IAAC,MAAA,CAAI,UAAU,WAAY,SAAAG,CAAA,CAAI,CAAA,GAZrBC,CAaZ,CACD,EACH,CAEJ"}
1
+ {"version":3,"file":"index31.cjs","sources":["../src/TagInput/index.tsx"],"sourcesContent":["import { LucideX } from 'lucide-react'\nimport * as React from 'react'\nimport { Badge } from '../Badge'\nimport { Button } from '../Button'\nimport { cn } from '../lib/utils'\n\nexport type TagInputProps = React.HTMLAttributes<HTMLInputElement> & {\n value?: string[]\n onValueChange: (value: string[]) => void\n placeholder?: string\n}\n\nfunction TagInput({\n className,\n value,\n placeholder,\n onValueChange,\n ...props\n}: TagInputProps) {\n const [inputValue, setInputValue] = React.useState('')\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n function handleChange(event: React.ChangeEvent<HTMLInputElement>) {\n const currentInputValue = event.target.value\n if (currentInputValue.includes(',')) {\n const currentValues = currentInputValue.split(',')\n //Remove duplicates\n const uniqueValues = Array.from(new Set(currentValues))\n\n onValueChange([\n ...(value || []),\n ...(uniqueValues\n .filter(inputValue => {\n //Remove empty values and already added values\n return Boolean(inputValue) && !value?.includes(inputValue)\n })\n .map(i => i.trim()) || [])\n ])\n setInputValue('')\n return\n }\n setInputValue(currentInputValue)\n }\n\n function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\n if (['Enter', 'Tab'].includes(event.key)) {\n if (inputValue?.trim()) {\n event.preventDefault()\n if (!value?.includes(inputValue)) {\n addInputValue()\n }\n setInputValue('')\n }\n }\n\n if (event.key === 'Backspace' && !inputValue) {\n onValueChange(value?.slice(0, -1) || [])\n }\n }\n\n function addInputValue() {\n if (!inputValue.trim()) return\n onValueChange([...(value || []), inputValue])\n setInputValue('')\n }\n\n return (\n <div\n className={cn(\n 'flex flex-wrap items-center gap-8 min-h-[36px]',\n 'border rounded border-gray-900/24 bg-white px-12 py-4',\n 'hover:cursor-text',\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'focus-visible:outline-none focus:shadow-field-active',\n className\n )}\n onClick={() => inputRef.current?.focus()}\n {...props}\n >\n <TagList value={value} onValueChange={onValueChange} />\n <input\n ref={inputRef}\n className=\"h-[26px] outline-none text-sm\"\n type=\"text\"\n value={inputValue}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n style={{ width: `${inputValue.length + 1}ch` }}\n onBlur={() => addInputValue()}\n />\n {value?.length === 0 && !inputValue && (\n <div className=\"text-gray-400 ml-[-2ch]\">{placeholder}</div>\n )}\n </div>\n )\n}\n\nTagInput.displayName = 'TagInput'\n\ntype TagListProps = React.HTMLAttributes<HTMLDivElement> & {\n value?: string[]\n onValueChange: (value: string[]) => void\n}\n\nfunction TagList({ value, onValueChange }: TagListProps) {\n return (\n <>\n {value?.map((tag, index) => (\n <Badge key={index} className=\"px-0 pr-8 pl-0 gap-x-4 overflow-hidden\">\n <Button\n type=\"button\"\n className=\"w-[26px] h-[26px] shrink-0\"\n size=\"icon\"\n intent=\"secondary\"\n onClick={() => {\n onValueChange(value?.filter((_, i) => i !== index) || [])\n }}\n >\n <LucideX className=\"w-16\" />\n </Button>\n <div className=\"truncate\">{tag}</div>\n </Badge>\n ))}\n </>\n )\n}\n\nexport { TagInput }\n"],"names":["TagInput","className","value","placeholder","onValueChange","props","inputValue","setInputValue","React","inputRef","handleChange","event","currentInputValue","currentValues","uniqueValues","i","handleKeyDown","addInputValue","jsxs","cn","jsx","TagList","Fragment","tag","index","Badge","Button","_","LucideX"],"mappings":"ugBAYA,SAASA,EAAS,CAChB,UAAAC,EACA,MAAAC,EACA,YAAAC,EACA,cAAAC,EACA,GAAGC,CACL,EAAkB,CAChB,KAAM,CAACC,EAAYC,CAAa,EAAIC,EAAM,SAAS,EAAE,EAC/CC,EAAWD,EAAM,OAAyB,IAAI,EAEpD,SAASE,EAAaC,EAA4C,CAChE,MAAMC,EAAoBD,EAAM,OAAO,MACvC,GAAIC,EAAkB,SAAS,GAAG,EAAG,CACnC,MAAMC,EAAgBD,EAAkB,MAAM,GAAG,EAE3CE,EAAe,MAAM,KAAK,IAAI,IAAID,CAAa,CAAC,EAEtDT,EAAc,CACZ,GAAIF,GAAS,CAAA,EACb,GAAIY,EACD,OAAOR,GAEC,EAAQA,GAAe,CAACJ,GAAO,SAASI,CAAU,CAC1D,EACA,IAAIS,GAAKA,EAAE,KAAA,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AAAA,KAACO,EAAAA,MAAA,CAAkB,UAAU,yCAC3B,SAAA,CAAAL,EAAAA,kBAAAA,IAACM,EAAAA,OAAA,CACC,KAAK,SACL,UAAU,6BACV,KAAK,OACL,OAAO,YACP,QAAS,IAAM,CACbtB,EAAcF,GAAO,OAAO,CAACyB,EAAGZ,IAAMA,IAAMS,CAAK,GAAK,EAAE,CAC1D,EAEA,SAAAJ,EAAAA,kBAAAA,IAACQ,EAAAA,QAAA,CAAQ,UAAU,MAAA,CAAO,CAAA,CAAA,EAE5BR,EAAAA,kBAAAA,IAAC,MAAA,CAAI,UAAU,WAAY,SAAAG,CAAA,CAAI,CAAA,GAZrBC,CAaZ,CACD,EACH,CAEJ"}
package/dist/index31.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { j as t } from "./index37.js";
2
2
  import { LucideX as g } from "lucide-react";
3
- import * as p from "react";
3
+ import * as f from "react";
4
4
  import { Badge as w } from "./index5.js";
5
5
  import { Button as j } from "./index6.js";
6
6
  import { cn as N } from "./index39.js";
@@ -11,7 +11,7 @@ function b({
11
11
  onValueChange: r,
12
12
  ...u
13
13
  }) {
14
- const [e, o] = p.useState(""), d = p.useRef(null);
14
+ const [e, o] = f.useState(""), p = f.useRef(null);
15
15
  function m(i) {
16
16
  const l = i.target.value;
17
17
  if (l.includes(",")) {
@@ -25,9 +25,9 @@ function b({
25
25
  o(l);
26
26
  }
27
27
  function h(i) {
28
- ["Enter", "Tab"].includes(i.key) && e?.trim() && (i.preventDefault(), n?.includes(e) || f(), o("")), i.key === "Backspace" && !e && r(n?.slice(0, -1) || []);
28
+ ["Enter", "Tab"].includes(i.key) && e?.trim() && (i.preventDefault(), n?.includes(e) || d(), o("")), i.key === "Backspace" && !e && r(n?.slice(0, -1) || []);
29
29
  }
30
- function f() {
30
+ function d() {
31
31
  e.trim() && (r([...n || [], e]), o(""));
32
32
  }
33
33
  return /* @__PURE__ */ t.jsxs(
@@ -42,21 +42,21 @@ function b({
42
42
  "focus-visible:outline-none focus:shadow-field-active",
43
43
  s
44
44
  ),
45
- onClick: () => d.current?.focus(),
45
+ onClick: () => p.current?.focus(),
46
46
  ...u,
47
47
  children: [
48
48
  /* @__PURE__ */ t.jsx(k, { value: n, onValueChange: r }),
49
49
  /* @__PURE__ */ t.jsx(
50
50
  "input",
51
51
  {
52
- ref: d,
52
+ ref: p,
53
53
  className: "h-[26px] outline-none text-sm",
54
54
  type: "text",
55
55
  value: e,
56
56
  onChange: m,
57
57
  onKeyDown: h,
58
58
  style: { width: `${e.length + 1}ch` },
59
- onBlur: () => f()
59
+ onBlur: () => d()
60
60
  }
61
61
  ),
62
62
  n?.length === 0 && !e && /* @__PURE__ */ t.jsx("div", { className: "text-gray-400 ml-[-2ch]", children: a })
@@ -66,7 +66,7 @@ function b({
66
66
  }
67
67
  b.displayName = "TagInput";
68
68
  function k({ value: s, onValueChange: n }) {
69
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: s?.map((a, r) => /* @__PURE__ */ t.jsxs(w, { className: "pl-0 gap-x-4 overflow-hidden", children: [
69
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: s?.map((a, r) => /* @__PURE__ */ t.jsxs(w, { className: "px-0 pr-8 pl-0 gap-x-4 overflow-hidden", children: [
70
70
  /* @__PURE__ */ t.jsx(
71
71
  j,
72
72
  {
@@ -1 +1 @@
1
- {"version":3,"file":"index31.js","sources":["../src/TagInput/index.tsx"],"sourcesContent":["import { LucideX } from 'lucide-react'\nimport * as React from 'react'\nimport { Badge } from '../Badge'\nimport { Button } from '../Button'\nimport { cn } from '../lib/utils'\n\nexport type TagInputProps = React.HTMLAttributes<HTMLInputElement> & {\n value?: string[]\n onValueChange: (value: string[]) => void\n placeholder?: string\n}\n\nfunction TagInput({\n className,\n value,\n placeholder,\n onValueChange,\n ...props\n}: TagInputProps) {\n const [inputValue, setInputValue] = React.useState('')\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n function handleChange(event: React.ChangeEvent<HTMLInputElement>) {\n const currentInputValue = event.target.value\n if (currentInputValue.includes(',')) {\n const currentValues = currentInputValue.split(',')\n //Remove duplicates\n const uniqueValues = Array.from(new Set(currentValues))\n\n onValueChange([\n ...(value || []),\n ...(uniqueValues\n .filter(inputValue => {\n //Remove empty values and already added values\n return Boolean(inputValue) && !value?.includes(inputValue)\n })\n .map(i => i.trim()) || [])\n ])\n setInputValue('')\n return\n }\n setInputValue(currentInputValue)\n }\n\n function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\n if (['Enter', 'Tab'].includes(event.key)) {\n if (inputValue?.trim()) {\n event.preventDefault()\n if (!value?.includes(inputValue)) {\n addInputValue()\n }\n setInputValue('')\n }\n }\n\n if (event.key === 'Backspace' && !inputValue) {\n onValueChange(value?.slice(0, -1) || [])\n }\n }\n\n function addInputValue() {\n if (!inputValue.trim()) return\n onValueChange([...(value || []), inputValue])\n setInputValue('')\n }\n\n return (\n <div\n className={cn(\n 'flex flex-wrap items-center gap-8 min-h-[36px]',\n 'border rounded border-gray-900/24 bg-white px-12 py-4',\n 'hover:cursor-text',\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'focus-visible:outline-none focus:shadow-field-active',\n className\n )}\n onClick={() => inputRef.current?.focus()}\n {...props}\n >\n <TagList value={value} onValueChange={onValueChange} />\n <input\n ref={inputRef}\n className=\"h-[26px] outline-none text-sm\"\n type=\"text\"\n value={inputValue}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n style={{ width: `${inputValue.length + 1}ch` }}\n onBlur={() => addInputValue()}\n />\n {value?.length === 0 && !inputValue && (\n <div className=\"text-gray-400 ml-[-2ch]\">{placeholder}</div>\n )}\n </div>\n )\n}\n\nTagInput.displayName = 'TagInput'\n\ntype TagListProps = React.HTMLAttributes<HTMLDivElement> & {\n value?: string[]\n onValueChange: (value: string[]) => void\n}\n\nfunction TagList({ value, onValueChange }: TagListProps) {\n return (\n <>\n {value?.map((tag, index) => (\n <Badge key={index} className=\"pl-0 gap-x-4 overflow-hidden\">\n <Button\n type=\"button\"\n className=\"w-[26px] h-[26px] shrink-0\"\n size=\"icon\"\n intent=\"secondary\"\n onClick={() => {\n onValueChange(value?.filter((_, i) => i !== index) || [])\n }}\n >\n <LucideX className=\"w-16\" />\n </Button>\n <div className=\"truncate\">{tag}</div>\n </Badge>\n ))}\n </>\n )\n}\n\nexport { TagInput }\n"],"names":["TagInput","className","value","placeholder","onValueChange","props","inputValue","setInputValue","React","inputRef","handleChange","event","currentInputValue","currentValues","uniqueValues","i","handleKeyDown","addInputValue","jsxs","cn","jsx","TagList","Fragment","tag","index","Badge","Button","_","LucideX"],"mappings":";;;;;;AAYA,SAASA,EAAS;AAAA,EAChB,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,GAAGC;AACL,GAAkB;AAChB,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAM,SAAS,EAAE,GAC/CC,IAAWD,EAAM,OAAyB,IAAI;AAEpD,WAASE,EAAaC,GAA4C;AAChE,UAAMC,IAAoBD,EAAM,OAAO;AACvC,QAAIC,EAAkB,SAAS,GAAG,GAAG;AACnC,YAAMC,IAAgBD,EAAkB,MAAM,GAAG,GAE3CE,IAAe,MAAM,KAAK,IAAI,IAAID,CAAa,CAAC;AAEtD,MAAAT,EAAc;AAAA,QACZ,GAAIF,KAAS,CAAA;AAAA,QACb,GAAIY,EACD,OAAO,CAAAR,MAEC,EAAQA,KAAe,CAACJ,GAAO,SAASI,CAAU,CAC1D,EACA,IAAI,CAAAS,MAAKA,EAAE,KAAA,CAAM,KAAK,CAAA;AAAA,MAAC,CAC3B,GACDR,EAAc,EAAE;AAChB;AAAA,IACF;AACA,IAAAA,EAAcK,CAAiB;AAAA,EACjC;AAEA,WAASI,EAAcL,GAA8C;AACnE,IAAI,CAAC,SAAS,KAAK,EAAE,SAASA,EAAM,GAAG,KACjCL,GAAY,WACdK,EAAM,eAAA,GACDT,GAAO,SAASI,CAAU,KAC7BW,EAAA,GA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AAAA,IAAAL,gBAAAA,EAAAA;AAAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,WAAU;AAAA,QACV,MAAK;AAAA,QACL,QAAO;AAAA,QACP,SAAS,MAAM;AACb,UAAAtB,EAAcF,GAAO,OAAO,CAACyB,GAAGZ,MAAMA,MAAMS,CAAK,KAAK,EAAE;AAAA,QAC1D;AAAA,QAEA,UAAAJ,gBAAAA,EAAAA,IAACQ,GAAA,EAAQ,WAAU,OAAA,CAAO;AAAA,MAAA;AAAA,IAAA;AAAA,IAE5BR,gBAAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,YAAY,UAAAG,EAAA,CAAI;AAAA,EAAA,KAZrBC,CAaZ,CACD,GACH;AAEJ;"}
1
+ {"version":3,"file":"index31.js","sources":["../src/TagInput/index.tsx"],"sourcesContent":["import { LucideX } from 'lucide-react'\nimport * as React from 'react'\nimport { Badge } from '../Badge'\nimport { Button } from '../Button'\nimport { cn } from '../lib/utils'\n\nexport type TagInputProps = React.HTMLAttributes<HTMLInputElement> & {\n value?: string[]\n onValueChange: (value: string[]) => void\n placeholder?: string\n}\n\nfunction TagInput({\n className,\n value,\n placeholder,\n onValueChange,\n ...props\n}: TagInputProps) {\n const [inputValue, setInputValue] = React.useState('')\n const inputRef = React.useRef<HTMLInputElement>(null)\n\n function handleChange(event: React.ChangeEvent<HTMLInputElement>) {\n const currentInputValue = event.target.value\n if (currentInputValue.includes(',')) {\n const currentValues = currentInputValue.split(',')\n //Remove duplicates\n const uniqueValues = Array.from(new Set(currentValues))\n\n onValueChange([\n ...(value || []),\n ...(uniqueValues\n .filter(inputValue => {\n //Remove empty values and already added values\n return Boolean(inputValue) && !value?.includes(inputValue)\n })\n .map(i => i.trim()) || [])\n ])\n setInputValue('')\n return\n }\n setInputValue(currentInputValue)\n }\n\n function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {\n if (['Enter', 'Tab'].includes(event.key)) {\n if (inputValue?.trim()) {\n event.preventDefault()\n if (!value?.includes(inputValue)) {\n addInputValue()\n }\n setInputValue('')\n }\n }\n\n if (event.key === 'Backspace' && !inputValue) {\n onValueChange(value?.slice(0, -1) || [])\n }\n }\n\n function addInputValue() {\n if (!inputValue.trim()) return\n onValueChange([...(value || []), inputValue])\n setInputValue('')\n }\n\n return (\n <div\n className={cn(\n 'flex flex-wrap items-center gap-8 min-h-[36px]',\n 'border rounded border-gray-900/24 bg-white px-12 py-4',\n 'hover:cursor-text',\n 'hover:shadow-field-hover',\n 'active:shadow-field-active',\n 'focus-visible:outline-none focus:shadow-field-active',\n className\n )}\n onClick={() => inputRef.current?.focus()}\n {...props}\n >\n <TagList value={value} onValueChange={onValueChange} />\n <input\n ref={inputRef}\n className=\"h-[26px] outline-none text-sm\"\n type=\"text\"\n value={inputValue}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n style={{ width: `${inputValue.length + 1}ch` }}\n onBlur={() => addInputValue()}\n />\n {value?.length === 0 && !inputValue && (\n <div className=\"text-gray-400 ml-[-2ch]\">{placeholder}</div>\n )}\n </div>\n )\n}\n\nTagInput.displayName = 'TagInput'\n\ntype TagListProps = React.HTMLAttributes<HTMLDivElement> & {\n value?: string[]\n onValueChange: (value: string[]) => void\n}\n\nfunction TagList({ value, onValueChange }: TagListProps) {\n return (\n <>\n {value?.map((tag, index) => (\n <Badge key={index} className=\"px-0 pr-8 pl-0 gap-x-4 overflow-hidden\">\n <Button\n type=\"button\"\n className=\"w-[26px] h-[26px] shrink-0\"\n size=\"icon\"\n intent=\"secondary\"\n onClick={() => {\n onValueChange(value?.filter((_, i) => i !== index) || [])\n }}\n >\n <LucideX className=\"w-16\" />\n </Button>\n <div className=\"truncate\">{tag}</div>\n </Badge>\n ))}\n </>\n )\n}\n\nexport { TagInput }\n"],"names":["TagInput","className","value","placeholder","onValueChange","props","inputValue","setInputValue","React","inputRef","handleChange","event","currentInputValue","currentValues","uniqueValues","i","handleKeyDown","addInputValue","jsxs","cn","jsx","TagList","Fragment","tag","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AAAA,EAAAA,IAAC,OAAA,EAAI,WAAU,YAAY,UAAAG,EAAA,CAAI;AAAA,EAAA,KAZrBC,CAaZ,CACD,GACH;AAEJ;"}
package/dist/index36.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index37.cjs"),u=require("@radix-ui/react-navigation-menu"),s=require("./index24.cjs"),r=require("./index39.cjs");function c(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,o.get?o:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const a=c(u);function l({children:t,viewport:e=!0,...n}){return i.jsxRuntimeExports.jsxs(a.Root,{"data-slot":"navigation-menu","data-viewport":e,...n,children:[t,e&&i.jsxRuntimeExports.jsx(a.NavigationMenuViewport,{})]})}function g({className:t,...e}){return i.jsxRuntimeExports.jsx(a.List,{"data-slot":"navigation-menu-list",className:r.cn("group flex flex-col list-none items-center justify-center pb-16",t),...e})}function x({className:t,...e}){return i.jsxRuntimeExports.jsx("div",{className:r.cn("flex items-start justify-start text-sm text-gray-800 mt-16 mb-2 px-16",t),...e})}function m({...t}){return i.jsxRuntimeExports.jsx(s.Separator,{...t})}function v({className:t,...e}){return i.jsxRuntimeExports.jsx(a.Item,{"data-slot":"navigation-menu-item",className:r.cn("w-full",t),...e})}function p({className:t,...e}){return i.jsxRuntimeExports.jsx(a.Link,{"data-slot":"navigation-menu-link",className:r.cn("flex justify-start px-12 py-[10px] w-full font-normal text-gray-800 hover:bg-gray-200 hover:text-purple-800 focus-visible:outline-none focus-visible:bg-gray-200 focus-visible:text-purple-900 data-active:bg-purple-900 hover:data-active:bg-purple-900 data-active:text-white",t),...e})}exports.VerticalNavigationMenu=l;exports.VerticalNavigationMenuHeading=x;exports.VerticalNavigationMenuItem=v;exports.VerticalNavigationMenuLink=p;exports.VerticalNavigationMenuList=g;exports.VerticalNavigationMenuSeparator=m;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index37.cjs"),c=require("@radix-ui/react-collapsible"),g=require("@radix-ui/react-navigation-menu"),x=require("lucide-react"),p=require("./index24.cjs"),r=require("./index39.cjs");function l(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,a.get?a:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const u=l(c),s=l(g);function m({children:t,viewport:e=!0,...n}){return i.jsxRuntimeExports.jsxs(s.Root,{"data-slot":"navigation-menu","data-viewport":e,...n,children:[t,e&&i.jsxRuntimeExports.jsx(s.NavigationMenuViewport,{})]})}function v({className:t,...e}){return i.jsxRuntimeExports.jsx(s.List,{"data-slot":"navigation-menu-list",className:r.cn("group flex flex-col list-none items-center justify-center pb-12 gap-2",t),...e})}function f({className:t,...e}){return i.jsxRuntimeExports.jsx("div",{className:r.cn("flex items-start justify-start text-sm text-gray-600 mt-16 mb-2 px-16",t),...e})}function j({...t}){return i.jsxRuntimeExports.jsx(p.Separator,{...t})}function d({className:t,...e}){return i.jsxRuntimeExports.jsx(s.Item,{"data-slot":"navigation-menu-item",className:r.cn("w-full",t),...e})}function b({className:t,...e}){return i.jsxRuntimeExports.jsx(s.Link,{"data-slot":"navigation-menu-link",className:r.cn("flex items-center justify-start pl-16 pr-8 py-[10px] min-h-40 w-full font-normal text-gray-800 rounded transition-colors duration-150","active:bg-gray-300","hover:bg-gray-200 hover:text-purple-800","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-2","data-[active]:bg-purple-700 data-[active]:text-white","hover:data-[active]:bg-purple-800",t),...e})}function N({className:t,...e}){return i.jsxRuntimeExports.jsx(u.Root,{className:r.cn("w-full",t),...e})}function y({className:t,children:e,chevron:n=!0,ref:a,...o}){return i.jsxRuntimeExports.jsx(u.Trigger,{ref:a,className:r.cn("group/subtrigger flex items-center justify-start pl-16 pr-8 py-[10px] min-h-40 w-full font-normal text-gray-800 rounded transition-colors","hover:bg-gray-200 hover:text-purple-800","active:bg-gray-300","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-2",t),...o,children:i.jsxRuntimeExports.jsxs("span",{className:"flex w-full items-center justify-between",children:[i.jsxRuntimeExports.jsx("span",{className:"flex items-center gap-x-8",children:e}),n?i.jsxRuntimeExports.jsx(x.ChevronRight,{"aria-hidden":"true",className:"h-16 w-16 shrink-0 text-gray-600 group-hover:text-gray-700 transition-transform duration-200 group-data-[state=open]/subtrigger:rotate-90"}):null]})})}function M({className:t,indentClassName:e="ml-24 px-8 py-2 border-l border-gray-900/8",children:n,ref:a,...o}){return i.jsxRuntimeExports.jsx(u.Content,{ref:a,className:r.cn("overflow-hidden",t),...o,children:i.jsxRuntimeExports.jsx("div",{className:e,children:n})})}exports.VerticalNavigationMenu=m;exports.VerticalNavigationMenuHeading=f;exports.VerticalNavigationMenuItem=d;exports.VerticalNavigationMenuLink=b;exports.VerticalNavigationMenuList=v;exports.VerticalNavigationMenuSeparator=j;exports.VerticalNavigationMenuSub=N;exports.VerticalNavigationMenuSubContent=M;exports.VerticalNavigationMenuSubTrigger=y;
2
2
  //# sourceMappingURL=index36.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index36.cjs","sources":["../src/VerticalNavigationMenu/index.tsx"],"sourcesContent":["import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport * as React from 'react'\nimport { Separator } from '../Separator'\nimport { cn } from '../lib/utils'\n\nfunction VerticalNavigationMenu({\n children,\n viewport = true,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {\n viewport?: boolean\n}) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n data-viewport={viewport}\n {...props}\n >\n {children}\n {viewport && <NavigationMenuPrimitive.NavigationMenuViewport />}\n </NavigationMenuPrimitive.Root>\n )\n}\n\nfunction VerticalNavigationMenuList({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn(\n 'group flex flex-col list-none items-center justify-center pb-16',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuHeading({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n className={cn(\n 'flex items-start justify-start text-sm text-gray-800 mt-16 mb-2 px-16',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuSeparator({\n ...props\n}: React.ComponentProps<'div'>) {\n return <Separator {...props} />\n}\n\nfunction VerticalNavigationMenuItem({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot=\"navigation-menu-item\"\n className={cn('w-full', className)}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuLink({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n 'flex justify-start px-12 py-[10px] w-full font-normal text-gray-800 \\\n hover:bg-gray-200 hover:text-purple-800 \\\n focus-visible:outline-none focus-visible:bg-gray-200 focus-visible:text-purple-900 \\\n data-active:bg-purple-900 hover:data-active:bg-purple-900 data-active:text-white',\n className\n )}\n {...props}\n />\n )\n}\nexport {\n VerticalNavigationMenu,\n VerticalNavigationMenuHeading,\n VerticalNavigationMenuItem,\n VerticalNavigationMenuLink,\n VerticalNavigationMenuList,\n VerticalNavigationMenuSeparator\n}\n"],"names":["VerticalNavigationMenu","children","viewport","props","jsxs","NavigationMenuPrimitive","jsx","VerticalNavigationMenuList","className","cn","VerticalNavigationMenuHeading","VerticalNavigationMenuSeparator","Separator","VerticalNavigationMenuItem","VerticalNavigationMenuLink"],"mappings":"8eAKA,SAASA,EAAuB,CAC9B,SAAAC,EACA,SAAAC,EAAW,GACX,GAAGC,CACL,EAEG,CACD,OACEC,EAAAA,kBAAAA,KAACC,EAAwB,KAAxB,CACC,YAAU,kBACV,gBAAeH,EACd,GAAGC,EAEH,SAAA,CAAAF,EACAC,GAAYI,EAAAA,kBAAAA,IAACD,EAAwB,uBAAxB,CAAA,CAA+C,CAAA,CAAA,CAAA,CAGnE,CAEA,SAASE,EAA2B,CAClC,UAAAC,EACA,GAAGL,CACL,EAA8D,CAC5D,OACEG,EAAAA,kBAAAA,IAACD,EAAwB,KAAxB,CACC,YAAU,uBACV,UAAWI,EAAAA,GACT,kEACAD,CAAA,EAED,GAAGL,CAAA,CAAA,CAGV,CAEA,SAASO,EAA8B,CACrC,UAAAF,EACA,GAAGL,CACL,EAAgC,CAC9B,OACEG,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWG,EAAAA,GACT,wEACAD,CAAA,EAED,GAAGL,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAgC,CACvC,GAAGR,CACL,EAAgC,CAC9B,OAAOG,wBAACM,EAAAA,UAAA,CAAW,GAAGT,CAAA,CAAO,CAC/B,CAEA,SAASU,EAA2B,CAClC,UAAAL,EACA,GAAGL,CACL,EAA8D,CAC5D,OACEG,EAAAA,kBAAAA,IAACD,EAAwB,KAAxB,CACC,YAAU,uBACV,UAAWI,EAAAA,GAAG,SAAUD,CAAS,EAChC,GAAGL,CAAA,CAAA,CAGV,CAEA,SAASW,EAA2B,CAClC,UAAAN,EACA,GAAGL,CACL,EAA8D,CAC5D,OACEG,EAAAA,kBAAAA,IAACD,EAAwB,KAAxB,CACC,YAAU,uBACV,UAAWI,EAAAA,GACT,8RAIAD,CAAA,EAED,GAAGL,CAAA,CAAA,CAGV"}
1
+ {"version":3,"file":"index36.cjs","sources":["../src/VerticalNavigationMenu/index.tsx"],"sourcesContent":["import * as CollapsiblePrimitive from '@radix-ui/react-collapsible'\nimport * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu'\nimport { ChevronRight } from 'lucide-react'\nimport * as React from 'react'\nimport { Separator } from '../Separator'\nimport { cn } from '../lib/utils'\n\nfunction VerticalNavigationMenu({\n children,\n viewport = true,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Root> & {\n viewport?: boolean\n}) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n data-viewport={viewport}\n {...props}\n >\n {children}\n {viewport && <NavigationMenuPrimitive.NavigationMenuViewport />}\n </NavigationMenuPrimitive.Root>\n )\n}\n\nfunction VerticalNavigationMenuList({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.List>) {\n return (\n <NavigationMenuPrimitive.List\n data-slot=\"navigation-menu-list\"\n className={cn(\n 'group flex flex-col list-none items-center justify-center pb-12 gap-2',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuHeading({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n className={cn(\n 'flex items-start justify-start text-sm text-gray-600 mt-16 mb-2 px-16',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuSeparator({\n ...props\n}: React.ComponentProps<'div'>) {\n return <Separator {...props} />\n}\n\nfunction VerticalNavigationMenuItem({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Item>) {\n return (\n <NavigationMenuPrimitive.Item\n data-slot=\"navigation-menu-item\"\n className={cn('w-full', className)}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuLink({\n className,\n ...props\n}: React.ComponentProps<typeof NavigationMenuPrimitive.Link>) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n 'flex items-center justify-start pl-16 pr-8 py-[10px] min-h-40 w-full font-normal text-gray-800 rounded transition-colors duration-150',\n 'active:bg-gray-300',\n 'hover:bg-gray-200 hover:text-purple-800',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-2',\n 'data-[active]:bg-purple-700 data-[active]:text-white',\n 'hover:data-[active]:bg-purple-800',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction VerticalNavigationMenuSub({\n className,\n ...props\n}: React.ComponentProps<typeof CollapsiblePrimitive.Root>) {\n return (\n <CollapsiblePrimitive.Root className={cn('w-full', className)} {...props} />\n )\n}\n\ntype SubTriggerProps = React.ComponentPropsWithRef<\n typeof CollapsiblePrimitive.Trigger\n> & {\n chevron?: boolean\n}\n\nfunction VerticalNavigationMenuSubTrigger({\n className,\n children,\n chevron = true,\n ref,\n ...props\n}: SubTriggerProps) {\n return (\n <CollapsiblePrimitive.Trigger\n ref={ref}\n className={cn(\n 'group/subtrigger flex items-center justify-start pl-16 pr-8 py-[10px] min-h-40 w-full font-normal text-gray-800 rounded transition-colors',\n 'hover:bg-gray-200 hover:text-purple-800',\n 'active:bg-gray-300',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-2',\n className\n )}\n {...props}\n >\n <span className=\"flex w-full items-center justify-between\">\n <span className=\"flex items-center gap-x-8\">{children}</span>\n\n {chevron ? (\n <ChevronRight\n aria-hidden=\"true\"\n className=\"h-16 w-16 shrink-0 text-gray-600 group-hover:text-gray-700 transition-transform duration-200 group-data-[state=open]/subtrigger:rotate-90\"\n />\n ) : null}\n </span>\n </CollapsiblePrimitive.Trigger>\n )\n}\n\ntype SubContentProps = React.ComponentPropsWithRef<\n typeof CollapsiblePrimitive.Content\n> & {\n indentClassName?: string\n}\n\nfunction VerticalNavigationMenuSubContent({\n className,\n indentClassName = 'ml-24 px-8 py-2 border-l border-gray-900/8',\n children,\n ref,\n ...props\n}: SubContentProps) {\n return (\n <CollapsiblePrimitive.Content\n ref={ref}\n className={cn('overflow-hidden', className)}\n {...props}\n >\n <div className={indentClassName}>{children}</div>\n </CollapsiblePrimitive.Content>\n )\n}\n\nexport {\n VerticalNavigationMenu,\n VerticalNavigationMenuHeading,\n VerticalNavigationMenuItem,\n VerticalNavigationMenuLink,\n VerticalNavigationMenuList,\n VerticalNavigationMenuSeparator,\n VerticalNavigationMenuSub,\n VerticalNavigationMenuSubContent,\n VerticalNavigationMenuSubTrigger\n}\n"],"names":["VerticalNavigationMenu","children","viewport","props","jsxs","NavigationMenuPrimitive","jsx","VerticalNavigationMenuList","className","cn","VerticalNavigationMenuHeading","VerticalNavigationMenuSeparator","Separator","VerticalNavigationMenuItem","VerticalNavigationMenuLink","VerticalNavigationMenuSub","CollapsiblePrimitive","VerticalNavigationMenuSubTrigger","chevron","ref","ChevronRight","VerticalNavigationMenuSubContent","indentClassName"],"mappings":"wjBAOA,SAASA,EAAuB,CAC9B,SAAAC,EACA,SAAAC,EAAW,GACX,GAAGC,CACL,EAEG,CACD,OACEC,EAAAA,kBAAAA,KAACC,EAAwB,KAAxB,CACC,YAAU,kBACV,gBAAeH,EACd,GAAGC,EAEH,SAAA,CAAAF,EACAC,GAAYI,EAAAA,kBAAAA,IAACD,EAAwB,uBAAxB,CAAA,CAA+C,CAAA,CAAA,CAAA,CAGnE,CAEA,SAASE,EAA2B,CAClC,UAAAC,EACA,GAAGL,CACL,EAA8D,CAC5D,OACEG,EAAAA,kBAAAA,IAACD,EAAwB,KAAxB,CACC,YAAU,uBACV,UAAWI,EAAAA,GACT,wEACAD,CAAA,EAED,GAAGL,CAAA,CAAA,CAGV,CAEA,SAASO,EAA8B,CACrC,UAAAF,EACA,GAAGL,CACL,EAAgC,CAC9B,OACEG,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWG,EAAAA,GACT,wEACAD,CAAA,EAED,GAAGL,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAgC,CACvC,GAAGR,CACL,EAAgC,CAC9B,OAAOG,wBAACM,EAAAA,UAAA,CAAW,GAAGT,CAAA,CAAO,CAC/B,CAEA,SAASU,EAA2B,CAClC,UAAAL,EACA,GAAGL,CACL,EAA8D,CAC5D,OACEG,EAAAA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,CAAI,UAAWgB,EAAkB,SAAArB,CAAA,CAAS,CAAA,CAAA,CAGjD"}
package/dist/index36.js CHANGED
@@ -1,96 +1,161 @@
1
- import { j as a } from "./index37.js";
2
- import * as i from "@radix-ui/react-navigation-menu";
3
- import { Separator as o } from "./index24.js";
4
- import { cn as n } from "./index39.js";
5
- function c({
1
+ import { j as i } from "./index37.js";
2
+ import * as l from "@radix-ui/react-collapsible";
3
+ import * as n from "@radix-ui/react-navigation-menu";
4
+ import { ChevronRight as u } from "lucide-react";
5
+ import { Separator as c } from "./index24.js";
6
+ import { cn as r } from "./index39.js";
7
+ function v({
6
8
  children: t,
7
9
  viewport: e = !0,
8
- ...r
10
+ ...a
9
11
  }) {
10
- return /* @__PURE__ */ a.jsxs(
11
- i.Root,
12
+ return /* @__PURE__ */ i.jsxs(
13
+ n.Root,
12
14
  {
13
15
  "data-slot": "navigation-menu",
14
16
  "data-viewport": e,
15
- ...r,
17
+ ...a,
16
18
  children: [
17
19
  t,
18
- e && /* @__PURE__ */ a.jsx(i.NavigationMenuViewport, {})
20
+ e && /* @__PURE__ */ i.jsx(n.NavigationMenuViewport, {})
19
21
  ]
20
22
  }
21
23
  );
22
24
  }
23
- function m({
25
+ function x({
24
26
  className: t,
25
27
  ...e
26
28
  }) {
27
- return /* @__PURE__ */ a.jsx(
28
- i.List,
29
+ return /* @__PURE__ */ i.jsx(
30
+ n.List,
29
31
  {
30
32
  "data-slot": "navigation-menu-list",
31
- className: n(
32
- "group flex flex-col list-none items-center justify-center pb-16",
33
+ className: r(
34
+ "group flex flex-col list-none items-center justify-center pb-12 gap-2",
33
35
  t
34
36
  ),
35
37
  ...e
36
38
  }
37
39
  );
38
40
  }
39
- function f({
41
+ function d({
40
42
  className: t,
41
43
  ...e
42
44
  }) {
43
- return /* @__PURE__ */ a.jsx(
45
+ return /* @__PURE__ */ i.jsx(
44
46
  "div",
45
47
  {
46
- className: n(
47
- "flex items-start justify-start text-sm text-gray-800 mt-16 mb-2 px-16",
48
+ className: r(
49
+ "flex items-start justify-start text-sm text-gray-600 mt-16 mb-2 px-16",
48
50
  t
49
51
  ),
50
52
  ...e
51
53
  }
52
54
  );
53
55
  }
54
- function p({
56
+ function b({
55
57
  ...t
56
58
  }) {
57
- return /* @__PURE__ */ a.jsx(o, { ...t });
59
+ return /* @__PURE__ */ i.jsx(c, { ...t });
58
60
  }
59
- function v({
61
+ function N({
60
62
  className: t,
61
63
  ...e
62
64
  }) {
63
- return /* @__PURE__ */ a.jsx(
64
- i.Item,
65
+ return /* @__PURE__ */ i.jsx(
66
+ n.Item,
65
67
  {
66
68
  "data-slot": "navigation-menu-item",
67
- className: n("w-full", t),
69
+ className: r("w-full", t),
68
70
  ...e
69
71
  }
70
72
  );
71
73
  }
72
- function x({
74
+ function j({
73
75
  className: t,
74
76
  ...e
75
77
  }) {
76
- return /* @__PURE__ */ a.jsx(
77
- i.Link,
78
+ return /* @__PURE__ */ i.jsx(
79
+ n.Link,
78
80
  {
79
81
  "data-slot": "navigation-menu-link",
80
- className: n(
81
- "flex justify-start px-12 py-[10px] w-full font-normal text-gray-800 hover:bg-gray-200 hover:text-purple-800 focus-visible:outline-none focus-visible:bg-gray-200 focus-visible:text-purple-900 data-active:bg-purple-900 hover:data-active:bg-purple-900 data-active:text-white",
82
+ className: r(
83
+ "flex items-center justify-start pl-16 pr-8 py-[10px] min-h-40 w-full font-normal text-gray-800 rounded transition-colors duration-150",
84
+ "active:bg-gray-300",
85
+ "hover:bg-gray-200 hover:text-purple-800",
86
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-2",
87
+ "data-[active]:bg-purple-700 data-[active]:text-white",
88
+ "hover:data-[active]:bg-purple-800",
82
89
  t
83
90
  ),
84
91
  ...e
85
92
  }
86
93
  );
87
94
  }
95
+ function h({
96
+ className: t,
97
+ ...e
98
+ }) {
99
+ return /* @__PURE__ */ i.jsx(l.Root, { className: r("w-full", t), ...e });
100
+ }
101
+ function y({
102
+ className: t,
103
+ children: e,
104
+ chevron: a = !0,
105
+ ref: o,
106
+ ...s
107
+ }) {
108
+ return /* @__PURE__ */ i.jsx(
109
+ l.Trigger,
110
+ {
111
+ ref: o,
112
+ className: r(
113
+ "group/subtrigger flex items-center justify-start pl-16 pr-8 py-[10px] min-h-40 w-full font-normal text-gray-800 rounded transition-colors",
114
+ "hover:bg-gray-200 hover:text-purple-800",
115
+ "active:bg-gray-300",
116
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-2",
117
+ t
118
+ ),
119
+ ...s,
120
+ children: /* @__PURE__ */ i.jsxs("span", { className: "flex w-full items-center justify-between", children: [
121
+ /* @__PURE__ */ i.jsx("span", { className: "flex items-center gap-x-8", children: e }),
122
+ a ? /* @__PURE__ */ i.jsx(
123
+ u,
124
+ {
125
+ "aria-hidden": "true",
126
+ className: "h-16 w-16 shrink-0 text-gray-600 group-hover:text-gray-700 transition-transform duration-200 group-data-[state=open]/subtrigger:rotate-90"
127
+ }
128
+ ) : null
129
+ ] })
130
+ }
131
+ );
132
+ }
133
+ function M({
134
+ className: t,
135
+ indentClassName: e = "ml-24 px-8 py-2 border-l border-gray-900/8",
136
+ children: a,
137
+ ref: o,
138
+ ...s
139
+ }) {
140
+ return /* @__PURE__ */ i.jsx(
141
+ l.Content,
142
+ {
143
+ ref: o,
144
+ className: r("overflow-hidden", t),
145
+ ...s,
146
+ children: /* @__PURE__ */ i.jsx("div", { className: e, children: a })
147
+ }
148
+ );
149
+ }
88
150
  export {
89
- c as VerticalNavigationMenu,
90
- f as VerticalNavigationMenuHeading,
91
- v as VerticalNavigationMenuItem,
92
- x as VerticalNavigationMenuLink,
93
- m as VerticalNavigationMenuList,
94
- p as VerticalNavigationMenuSeparator
151
+ v as VerticalNavigationMenu,
152
+ d as VerticalNavigationMenuHeading,
153
+ N as VerticalNavigationMenuItem,
154
+ j as VerticalNavigationMenuLink,
155
+ x as VerticalNavigationMenuList,
156
+ b as VerticalNavigationMenuSeparator,
157
+ h as VerticalNavigationMenuSub,
158
+ M as VerticalNavigationMenuSubContent,
159
+ y as VerticalNavigationMenuSubTrigger
95
160
  };
96
161
  //# sourceMappingURL=index36.js.map