@incognia/cosmik 1.0.10 → 2.0.0-alpha.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.
Files changed (200) hide show
  1. package/dist/Badge/index.d.ts +1 -1
  2. package/dist/Calendar/index.d.ts.map +1 -1
  3. package/dist/Toggle/index.d.ts +1 -1
  4. package/dist/cosmik.css +3 -1
  5. package/dist/index.cjs +1 -2
  6. package/dist/index.js +36 -179
  7. package/dist/index10.cjs +2 -2
  8. package/dist/index10.cjs.map +1 -1
  9. package/dist/index10.js +12 -195
  10. package/dist/index10.js.map +1 -1
  11. package/dist/index11.cjs +2 -2
  12. package/dist/index11.cjs.map +1 -1
  13. package/dist/index11.js +61 -140
  14. package/dist/index11.js.map +1 -1
  15. package/dist/index12.cjs +2 -2
  16. package/dist/index12.cjs.map +1 -1
  17. package/dist/index12.js +156 -228
  18. package/dist/index12.js.map +1 -1
  19. package/dist/index13.cjs +2 -2
  20. package/dist/index13.cjs.map +1 -1
  21. package/dist/index13.js +92 -119
  22. package/dist/index13.js.map +1 -1
  23. package/dist/index14.cjs +2 -2
  24. package/dist/index14.cjs.map +1 -1
  25. package/dist/index14.js +71 -24
  26. package/dist/index14.js.map +1 -1
  27. package/dist/index15.cjs +2 -2
  28. package/dist/index15.cjs.map +1 -1
  29. package/dist/index15.js +105 -25
  30. package/dist/index15.js.map +1 -1
  31. package/dist/index16.cjs +2 -2
  32. package/dist/index16.cjs.map +1 -1
  33. package/dist/index16.js +57 -22
  34. package/dist/index16.js.map +1 -1
  35. package/dist/index17.cjs +2 -2
  36. package/dist/index17.cjs.map +1 -1
  37. package/dist/index17.js +23 -63
  38. package/dist/index17.js.map +1 -1
  39. package/dist/index18.cjs +2 -2
  40. package/dist/index18.cjs.map +1 -1
  41. package/dist/index18.js +90 -23
  42. package/dist/index18.js.map +1 -1
  43. package/dist/index19.cjs +2 -2
  44. package/dist/index19.cjs.map +1 -1
  45. package/dist/index19.js +83 -102
  46. package/dist/index19.js.map +1 -1
  47. package/dist/index2.cjs +1 -0
  48. package/dist/index2.js +7 -0
  49. package/dist/index20.cjs +2 -2
  50. package/dist/index20.cjs.map +1 -1
  51. package/dist/index20.js +126 -48
  52. package/dist/index20.js.map +1 -1
  53. package/dist/index21.cjs +2 -2
  54. package/dist/index21.cjs.map +1 -1
  55. package/dist/index21.js +41 -31
  56. package/dist/index21.js.map +1 -1
  57. package/dist/index22.cjs +2 -2
  58. package/dist/index22.cjs.map +1 -1
  59. package/dist/index22.js +76 -46
  60. package/dist/index22.js.map +1 -1
  61. package/dist/index23.cjs +2 -2
  62. package/dist/index23.cjs.map +1 -1
  63. package/dist/index23.js +68 -185
  64. package/dist/index23.js.map +1 -1
  65. package/dist/index24.cjs +2 -2
  66. package/dist/index24.cjs.map +1 -1
  67. package/dist/index24.js +31 -28
  68. package/dist/index24.js.map +1 -1
  69. package/dist/index25.cjs +2 -2
  70. package/dist/index25.cjs.map +1 -1
  71. package/dist/index25.js +17 -132
  72. package/dist/index25.js.map +1 -1
  73. package/dist/index26.cjs +2 -2
  74. package/dist/index26.cjs.map +1 -1
  75. package/dist/index26.js +17 -17
  76. package/dist/index26.js.map +1 -1
  77. package/dist/index27.cjs +2 -2
  78. package/dist/index27.cjs.map +1 -1
  79. package/dist/index27.js +52 -36
  80. package/dist/index27.js.map +1 -1
  81. package/dist/index28.cjs +2 -2
  82. package/dist/index28.cjs.map +1 -1
  83. package/dist/index28.js +10 -33
  84. package/dist/index28.js.map +1 -1
  85. package/dist/index29.cjs +2 -2
  86. package/dist/index29.cjs.map +1 -1
  87. package/dist/index29.js +25 -135
  88. package/dist/index29.js.map +1 -1
  89. package/dist/index30.cjs +2 -2
  90. package/dist/index30.cjs.map +1 -1
  91. package/dist/index30.js +66 -62
  92. package/dist/index30.js.map +1 -1
  93. package/dist/index31.cjs +2 -2
  94. package/dist/index31.cjs.map +1 -1
  95. package/dist/index31.js +22 -88
  96. package/dist/index31.js.map +1 -1
  97. package/dist/index32.cjs +2 -2
  98. package/dist/index32.cjs.map +1 -1
  99. package/dist/index32.js +30 -23
  100. package/dist/index32.js.map +1 -1
  101. package/dist/index33.cjs +2 -2
  102. package/dist/index33.cjs.map +1 -1
  103. package/dist/index33.js +97 -93
  104. package/dist/index33.js.map +1 -1
  105. package/dist/index34.cjs +2 -2
  106. package/dist/index34.cjs.map +1 -1
  107. package/dist/index34.js +19 -72
  108. package/dist/index34.js.map +1 -1
  109. package/dist/index35.cjs +2 -2
  110. package/dist/index35.cjs.map +1 -1
  111. package/dist/index35.js +81 -62
  112. package/dist/index35.js.map +1 -1
  113. package/dist/index36.cjs +2 -2
  114. package/dist/index36.cjs.map +1 -1
  115. package/dist/index36.js +14 -161
  116. package/dist/index36.js.map +1 -1
  117. package/dist/index37.cjs +2 -2
  118. package/dist/index37.cjs.map +1 -1
  119. package/dist/index37.js +44 -6
  120. package/dist/index37.js.map +1 -1
  121. package/dist/index38.cjs +2 -2
  122. package/dist/index38.cjs.map +1 -1
  123. package/dist/index38.js +22 -36
  124. package/dist/index38.js.map +1 -1
  125. package/dist/index39.cjs +2 -2
  126. package/dist/index39.cjs.map +1 -1
  127. package/dist/index39.js +71 -16
  128. package/dist/index39.js.map +1 -1
  129. package/dist/index4.cjs +2 -2
  130. package/dist/index4.cjs.map +1 -1
  131. package/dist/index4.js +18 -160
  132. package/dist/index4.js.map +1 -1
  133. package/dist/index40.cjs +2 -2
  134. package/dist/index40.cjs.map +1 -1
  135. package/dist/index40.js +38 -120
  136. package/dist/index40.js.map +1 -1
  137. package/dist/index41.cjs +2 -2
  138. package/dist/index41.cjs.map +1 -1
  139. package/dist/index41.js +73 -16
  140. package/dist/index41.js.map +1 -1
  141. package/dist/index42.cjs +2 -2
  142. package/dist/index42.cjs.map +1 -1
  143. package/dist/index42.js +15 -10
  144. package/dist/index42.js.map +1 -1
  145. package/dist/index43.cjs +2 -2
  146. package/dist/index43.cjs.map +1 -1
  147. package/dist/index43.js +87 -5
  148. package/dist/index43.js.map +1 -1
  149. package/dist/index44.cjs +2 -2
  150. package/dist/index44.cjs.map +1 -1
  151. package/dist/index44.js +52 -26
  152. package/dist/index44.js.map +1 -1
  153. package/dist/index45.cjs +2 -7
  154. package/dist/index45.cjs.map +1 -1
  155. package/dist/index45.js +48 -238
  156. package/dist/index45.js.map +1 -1
  157. package/dist/index46.cjs +2 -2
  158. package/dist/index46.cjs.map +1 -1
  159. package/dist/index46.js +85 -17
  160. package/dist/index46.js.map +1 -1
  161. package/dist/index5.cjs +2 -2
  162. package/dist/index5.cjs.map +1 -1
  163. package/dist/index5.js +34 -80
  164. package/dist/index5.js.map +1 -1
  165. package/dist/index6.cjs +2 -2
  166. package/dist/index6.cjs.map +1 -1
  167. package/dist/index6.js +1586 -163
  168. package/dist/index6.js.map +1 -1
  169. package/dist/index7.cjs +2 -2
  170. package/dist/index7.cjs.map +1 -1
  171. package/dist/index7.js +14 -196
  172. package/dist/index7.js.map +1 -1
  173. package/dist/index8.cjs +2 -2
  174. package/dist/index8.cjs.map +1 -1
  175. package/dist/index8.js +23 -91
  176. package/dist/index8.js.map +1 -1
  177. package/dist/index9.cjs +7 -2
  178. package/dist/index9.cjs.map +1 -1
  179. package/dist/index9.js +162 -40
  180. package/dist/index9.js.map +1 -1
  181. package/dist/{cosmik-theme.css → src/cosmik-theme.css} +68 -66
  182. package/package.json +22 -20
  183. package/dist/index.cjs.map +0 -1
  184. package/dist/index.js.map +0 -1
  185. package/dist/index3.cjs +0 -2
  186. package/dist/index3.cjs.map +0 -1
  187. package/dist/index3.js +0 -87
  188. package/dist/index3.js.map +0 -1
  189. package/dist/index47.cjs +0 -2
  190. package/dist/index47.cjs.map +0 -1
  191. package/dist/index47.js +0 -2732
  192. package/dist/index47.js.map +0 -1
  193. package/dist/index48.cjs +0 -2
  194. package/dist/index48.cjs.map +0 -1
  195. package/dist/index48.js +0 -5
  196. package/dist/index48.js.map +0 -1
  197. package/dist/index49.cjs +0 -2
  198. package/dist/index49.cjs.map +0 -1
  199. package/dist/index49.js +0 -5
  200. package/dist/index49.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index39.js","sources":["../src/lib/utils.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function debounce<F extends (...args: Parameters<F>) => ReturnType<F>>(\n func: F,\n waitFor: number\n) {\n let timeout: ReturnType<typeof setTimeout>\n\n const debounced = (...args: Parameters<F>) => {\n clearTimeout(timeout)\n timeout = setTimeout(() => func(...args), waitFor)\n }\n\n return debounced\n}\n"],"names":["cn","inputs","twMerge","clsx","debounce","func","waitFor","timeout","args"],"mappings":";;AAGO,SAASA,KAAMC,GAAsB;AAC1C,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC7B;AAEO,SAASG,EACdC,GACAC,GACA;AACA,MAAIC;AAOJ,SALkB,IAAIC,MAAwB;AAC5C,iBAAaD,CAAO,GACpBA,IAAU,WAAW,MAAMF,EAAK,GAAGG,CAAI,GAAGF,CAAO;AAAA,EACnD;AAGF;"}
1
+ {"version":3,"file":"index39.js","names":[],"sources":["../src/Table/index.tsx"],"sourcesContent":["import { LucideChevronDown, LucideChevronUp } from 'lucide-react'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nfunction Table({ className, ...props }: React.ComponentProps<'table'>) {\n return (\n <table\n data-slot=\"table\"\n className={cn('border-separate border-spacing-y-8 h-fit', className)}\n {...props}\n />\n )\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return (\n <thead\n data-slot=\"table-header\"\n className={cn('bg-gray-200 text-left text-sm', className)}\n {...props}\n />\n )\n}\n\nfunction TableBody({\n className,\n hoverable,\n ...props\n}: React.ComponentProps<'tbody'> & { hoverable?: boolean }) {\n return (\n <tbody\n data-slot=\"table-body\"\n className={cn(\n 'bg-white h-full',\n {\n '[&_tr:hover]:bg-gray-100 cursor-pointer': hoverable\n },\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-gray-100', className)}\n {...props}\n />\n )\n}\n\nfunction TableRow({ className, ...props }: React.ComponentProps<'tr'>) {\n return (\n <tr\n data-slot=\"table-row\"\n className={cn(\n 'transition-colors data-[state=selected]:bg-gray-100',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableHead({\n className,\n children,\n sortDirection,\n ...props\n}: React.ComponentProps<'th'> & { sortDirection?: 'ASC' | 'DESC' }) {\n let SortIcon\n if (sortDirection === 'ASC') {\n SortIcon = LucideChevronUp\n } else if (sortDirection === 'DESC') {\n SortIcon = LucideChevronDown\n }\n\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'first:rounded-l first:pl-24',\n 'last:rounded-r last:pr-24',\n 'px-12 py-8 font-normal leading-14',\n 'whitespace-nowrap',\n {\n 'cursor-pointer': !!props?.onClick\n },\n className\n )}\n {...props}\n >\n {children}\n {SortIcon && <SortIcon size={16} className=\"inline-block ml-4\" />}\n </th>\n )\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'first:rounded-l first:pl-24 first:border-l',\n 'last:rounded-r last:pr-24 last:border-r',\n 'border-gray-900/8 border-y px-12 h-[54px]',\n 'whitespace-nowrap',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TableCaption({\n className,\n ...props\n}: React.ComponentProps<'caption'>) {\n return (\n <caption\n data-slot=\"table-caption\"\n className={cn('mt-16 text-sm text-gray-700', className)}\n {...props}\n />\n )\n}\n\nexport {\n Table,\n TableBody,\n TableCaption,\n TableCell,\n TableFooter,\n TableHead,\n TableHeader,\n TableRow\n}\n"],"mappings":";;;;;;AAIA,SAAS,EAAM,EAAE,cAAW,GAAG,KAAwC;CACrE,OACE,iBAAA,GAAA,EAAA,KAAC,SAAD;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GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAa,EACpB,cACA,GAAG,KAC+B;CAClC,OACE,iBAAA,GAAA,EAAA,KAAC,WAAD;EACE,aAAU;EACV,WAAW,EAAG,+BAA+B,CAAS;EACtD,GAAI;CACL,CAAA;AAEL"}
package/dist/index4.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index37.cjs"),d=require("@radix-ui/react-alert-dialog"),g=require("./index38.cjs"),i=require("./index6.cjs"),n=require("./index39.cjs");function x(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const l=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,l.get?l:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const o=x(d);function f({...t}){return a.jsxRuntimeExports.jsx(o.Root,{"data-slot":"alert-dialog",...t})}function m({...t}){return a.jsxRuntimeExports.jsx(o.Trigger,{"data-slot":"alert-dialog-trigger",...t})}function s({...t}){return a.jsxRuntimeExports.jsx(o.Portal,{"data-slot":"alert-dialog-portal",...t})}function c({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Overlay,{"data-slot":"alert-dialog-overlay",className:n.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-gray-900/48",t),...e})}function p({className:t,...e}){return a.jsxRuntimeExports.jsxs(s,{children:[a.jsxRuntimeExports.jsx(c,{}),a.jsxRuntimeExports.jsx(o.Content,{"data-slot":"alert-dialog-content",className:n.cn("bg-white 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 fixed left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] gap-24 border-0 p-24 top-24 shadow-200 duration-200 sm:max-w-lg min-w-[384px]",t),...e})]})}function j({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-header",className:n.cn("flex flex-col gap-8 text-left font-display",t),...e})}function D({className:t,...e}){return a.jsxRuntimeExports.jsx("div",{"data-slot":"alert-dialog-footer",className:n.cn("flex gap-8 flex-row justify-end",t),...e})}const u=g.cva("flex items-center text-lg font-semibold",{variants:{intent:{default:"text-gray-800",warning:"text-yellow-600",danger:"text-magenta-600"}},defaultVariants:{intent:"default"}});function A({className:t,intent:e,...r}){return a.jsxRuntimeExports.jsx(o.Title,{"data-slot":"alert-dialog-title",className:n.cn(u({intent:e}),t),...r})}function y({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Description,{"data-slot":"alert-dialog-description",className:n.cn("text-base text-gray-900",t),...e})}function b({className:t,intent:e,...r}){return a.jsxRuntimeExports.jsx(o.Action,{className:n.cn(i.buttonVariants({intent:e}),t),...r})}function R({className:t,...e}){return a.jsxRuntimeExports.jsx(o.Cancel,{className:n.cn(i.buttonVariants({intent:"secondary"}),t),...e})}exports.AlertDialog=f;exports.AlertDialogAction=b;exports.AlertDialogCancel=R;exports.AlertDialogContent=p;exports.AlertDialogDescription=y;exports.AlertDialogFooter=D;exports.AlertDialogHeader=j;exports.AlertDialogOverlay=c;exports.AlertDialogPortal=s;exports.AlertDialogTitle=A;exports.AlertDialogTrigger=m;exports.titleVariants=u;
2
- //# sourceMappingURL=index4.cjs.map
1
+ function e(t){var n,r,i=``;if(typeof t==`string`||typeof t==`number`)i+=t;else if(typeof t==`object`)if(Array.isArray(t)){var a=t.length;for(n=0;n<a;n++)t[n]&&(r=e(t[n]))&&(i&&(i+=` `),i+=r)}else for(r in t)t[r]&&(i&&(i+=` `),i+=r);return i}function t(){for(var t,n,r=0,i=``,a=arguments.length;r<a;r++)(t=arguments[r])&&(n=e(t))&&(i&&(i+=` `),i+=n);return i}exports.default=t;
2
+ //# sourceMappingURL=index4.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index4.cjs","sources":["../src/AlertDialog/index.tsx"],"sourcesContent":["'use client'\n\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { buttonVariants } from '../Button'\nimport { cn } from '../lib/utils'\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-gray-900/48',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-white 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 fixed left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] gap-24 border-0 p-24 top-24 shadow-200 duration-200 sm:max-w-lg min-w-[384px]',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn('flex flex-col gap-8 text-left font-display', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn('flex gap-8 flex-row justify-end', className)}\n {...props}\n />\n )\n}\n\nconst titleVariants = cva('flex items-center text-lg font-semibold', {\n variants: {\n intent: {\n default: 'text-gray-800',\n warning: 'text-yellow-600',\n danger: 'text-magenta-600'\n }\n },\n defaultVariants: {\n intent: 'default'\n }\n})\n\nfunction AlertDialogTitle({\n className,\n intent,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title> & {\n intent?: VariantProps<typeof titleVariants>['intent']\n}) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(titleVariants({ intent }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-base text-gray-900', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n intent,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action> & {\n intent?: VariantProps<typeof buttonVariants>['intent']\n}) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ intent }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ intent: 'secondary' }), className)}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n titleVariants\n}\n"],"names":["AlertDialog","props","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogPortal","AlertDialogOverlay","className","jsx","cn","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","titleVariants","cva","AlertDialogTitle","intent","AlertDialogDescription","AlertDialogAction","buttonVariants","AlertDialogCancel"],"mappings":"qgBAQA,SAASA,EAAY,CACnB,GAAGC,CACL,EAA2D,CACzD,+BAAQC,EAAqB,KAArB,CAA0B,YAAU,eAAgB,GAAGD,EAAO,CACxE,CAEA,SAASE,EAAmB,CAC1B,GAAGF,CACL,EAA8D,CAC5D,+BACGC,EAAqB,QAArB,CAA6B,YAAU,uBAAwB,GAAGD,EAAO,CAE9E,CAEA,SAASG,EAAkB,CACzB,GAAGH,CACL,EAA6D,CAC3D,+BACGC,EAAqB,OAArB,CAA4B,YAAU,sBAAuB,GAAGD,EAAO,CAE5E,CAEA,SAASI,EAAmB,CAC1B,UAAAC,EACA,GAAGL,CACL,EAA8D,CAC5D,OACEM,EAAAA,kBAAAA,IAACL,EAAqB,QAArB,CACC,YAAU,uBACV,UAAWM,EAAAA,GACT,4JACAF,CAAA,EAED,GAAGL,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAmB,CAC1B,UAAAH,EACA,GAAGL,CACL,EAA8D,CAC5D,gCACGG,EAAA,CACC,SAAA,CAAAG,EAAAA,kBAAAA,IAACF,EAAA,EAAmB,EACpBE,EAAAA,kBAAAA,IAACL,EAAqB,QAArB,CACC,YAAU,uBACV,UAAWM,EAAAA,GACT,4UACAF,CAAA,EAED,GAAGL,CAAA,CAAA,CACN,EACF,CAEJ,CAEA,SAASS,EAAkB,CACzB,UAAAJ,EACA,GAAGL,CACL,EAAgC,CAC9B,OACEM,EAAAA,kBAAAA,IAAC,MAAA,CACC,YAAU,sBACV,UAAWC,EAAAA,GAAG,6CAA8CF,CAAS,EACpE,GAAGL,CAAA,CAAA,CAGV,CAEA,SA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/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"x_google_ignoreList":[0],"mappings":"AAAA,SAAS,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,GAAG,GAAa,OAAO,GAAjB,UAA8B,OAAO,GAAjB,SAAmB,GAAG,OAAO,GAAa,OAAO,GAAjB,SAAmB,GAAG,MAAM,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE,OAAO,IAAI,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,IAAI,GAAG,KAAK,GAAG,EAAE,MAAM,IAAI,KAAK,EAAE,EAAE,KAAK,IAAI,GAAG,KAAK,GAAG,GAAG,OAAO,CAAC,CAAC,SAAgB,GAAM,CAAC,IAAI,IAAI,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,UAAU,OAAO,EAAE,EAAE,KAAK,EAAE,UAAU,MAAM,EAAE,EAAE,CAAC,KAAK,IAAI,GAAG,KAAK,GAAG,GAAG,OAAO,CAAC"}
package/dist/index4.js CHANGED
@@ -1,160 +1,18 @@
1
- import { j as e } from "./index37.js";
2
- import * as o from "@radix-ui/react-alert-dialog";
3
- import { cva as i } from "./index38.js";
4
- import { buttonVariants as n } from "./index6.js";
5
- import { cn as l } from "./index39.js";
6
- function m({
7
- ...t
8
- }) {
9
- return /* @__PURE__ */ e.jsx(o.Root, { "data-slot": "alert-dialog", ...t });
10
- }
11
- function p({
12
- ...t
13
- }) {
14
- return /* @__PURE__ */ e.jsx(o.Trigger, { "data-slot": "alert-dialog-trigger", ...t });
15
- }
16
- function s({
17
- ...t
18
- }) {
19
- return /* @__PURE__ */ e.jsx(o.Portal, { "data-slot": "alert-dialog-portal", ...t });
20
- }
21
- function d({
22
- className: t,
23
- ...a
24
- }) {
25
- return /* @__PURE__ */ e.jsx(
26
- o.Overlay,
27
- {
28
- "data-slot": "alert-dialog-overlay",
29
- className: l(
30
- "data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-gray-900/48",
31
- t
32
- ),
33
- ...a
34
- }
35
- );
36
- }
37
- function j({
38
- className: t,
39
- ...a
40
- }) {
41
- return /* @__PURE__ */ e.jsxs(s, { children: [
42
- /* @__PURE__ */ e.jsx(d, {}),
43
- /* @__PURE__ */ e.jsx(
44
- o.Content,
45
- {
46
- "data-slot": "alert-dialog-content",
47
- className: l(
48
- "bg-white 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 fixed left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] gap-24 border-0 p-24 top-24 shadow-200 duration-200 sm:max-w-lg min-w-[384px]",
49
- t
50
- ),
51
- ...a
52
- }
53
- )
54
- ] });
55
- }
56
- function A({
57
- className: t,
58
- ...a
59
- }) {
60
- return /* @__PURE__ */ e.jsx(
61
- "div",
62
- {
63
- "data-slot": "alert-dialog-header",
64
- className: l("flex flex-col gap-8 text-left font-display", t),
65
- ...a
66
- }
67
- );
68
- }
69
- function D({
70
- className: t,
71
- ...a
72
- }) {
73
- return /* @__PURE__ */ e.jsx(
74
- "div",
75
- {
76
- "data-slot": "alert-dialog-footer",
77
- className: l("flex gap-8 flex-row justify-end", t),
78
- ...a
79
- }
80
- );
81
- }
82
- const g = i("flex items-center text-lg font-semibold", {
83
- variants: {
84
- intent: {
85
- default: "text-gray-800",
86
- warning: "text-yellow-600",
87
- danger: "text-magenta-600"
88
- }
89
- },
90
- defaultVariants: {
91
- intent: "default"
92
- }
93
- });
94
- function y({
95
- className: t,
96
- intent: a,
97
- ...r
98
- }) {
99
- return /* @__PURE__ */ e.jsx(
100
- o.Title,
101
- {
102
- "data-slot": "alert-dialog-title",
103
- className: l(g({ intent: a }), t),
104
- ...r
105
- }
106
- );
107
- }
108
- function w({
109
- className: t,
110
- ...a
111
- }) {
112
- return /* @__PURE__ */ e.jsx(
113
- o.Description,
114
- {
115
- "data-slot": "alert-dialog-description",
116
- className: l("text-base text-gray-900", t),
117
- ...a
118
- }
119
- );
120
- }
121
- function v({
122
- className: t,
123
- intent: a,
124
- ...r
125
- }) {
126
- return /* @__PURE__ */ e.jsx(
127
- o.Action,
128
- {
129
- className: l(n({ intent: a }), t),
130
- ...r
131
- }
132
- );
133
- }
134
- function N({
135
- className: t,
136
- ...a
137
- }) {
138
- return /* @__PURE__ */ e.jsx(
139
- o.Cancel,
140
- {
141
- className: l(n({ intent: "secondary" }), t),
142
- ...a
143
- }
144
- );
145
- }
146
- export {
147
- m as AlertDialog,
148
- v as AlertDialogAction,
149
- N as AlertDialogCancel,
150
- j as AlertDialogContent,
151
- w as AlertDialogDescription,
152
- D as AlertDialogFooter,
153
- A as AlertDialogHeader,
154
- d as AlertDialogOverlay,
155
- s as AlertDialogPortal,
156
- y as AlertDialogTitle,
157
- p as AlertDialogTrigger,
158
- g as titleVariants
159
- };
160
- //# sourceMappingURL=index4.js.map
1
+ //#region node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
2
+ function e(t) {
3
+ var n, r, i = "";
4
+ if (typeof t == "string" || typeof t == "number") i += t;
5
+ else if (typeof t == "object") if (Array.isArray(t)) {
6
+ var a = t.length;
7
+ for (n = 0; n < a; n++) t[n] && (r = e(t[n])) && (i && (i += " "), i += r);
8
+ } else for (r in t) t[r] && (i && (i += " "), i += r);
9
+ return i;
10
+ }
11
+ function t() {
12
+ for (var t, n, r = 0, i = "", a = arguments.length; r < a; r++) (t = arguments[r]) && (n = e(t)) && (i && (i += " "), i += n);
13
+ return i;
14
+ }
15
+ //#endregion
16
+ export { t as default };
17
+
18
+ //# sourceMappingURL=index4.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index4.js","sources":["../src/AlertDialog/index.tsx"],"sourcesContent":["'use client'\n\nimport * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { buttonVariants } from '../Button'\nimport { cn } from '../lib/utils'\n\nfunction AlertDialog({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Root>) {\n return <AlertDialogPrimitive.Root data-slot=\"alert-dialog\" {...props} />\n}\n\nfunction AlertDialogTrigger({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Trigger>) {\n return (\n <AlertDialogPrimitive.Trigger data-slot=\"alert-dialog-trigger\" {...props} />\n )\n}\n\nfunction AlertDialogPortal({\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Portal>) {\n return (\n <AlertDialogPrimitive.Portal data-slot=\"alert-dialog-portal\" {...props} />\n )\n}\n\nfunction AlertDialogOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Overlay>) {\n return (\n <AlertDialogPrimitive.Overlay\n data-slot=\"alert-dialog-overlay\"\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-gray-900/48',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDialogContent({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Content>) {\n return (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Content\n data-slot=\"alert-dialog-content\"\n className={cn(\n 'bg-white 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 fixed left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] gap-24 border-0 p-24 top-24 shadow-200 duration-200 sm:max-w-lg min-w-[384px]',\n className\n )}\n {...props}\n />\n </AlertDialogPortal>\n )\n}\n\nfunction AlertDialogHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-header\"\n className={cn('flex flex-col gap-8 text-left font-display', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogFooter({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"alert-dialog-footer\"\n className={cn('flex gap-8 flex-row justify-end', className)}\n {...props}\n />\n )\n}\n\nconst titleVariants = cva('flex items-center text-lg font-semibold', {\n variants: {\n intent: {\n default: 'text-gray-800',\n warning: 'text-yellow-600',\n danger: 'text-magenta-600'\n }\n },\n defaultVariants: {\n intent: 'default'\n }\n})\n\nfunction AlertDialogTitle({\n className,\n intent,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Title> & {\n intent?: VariantProps<typeof titleVariants>['intent']\n}) {\n return (\n <AlertDialogPrimitive.Title\n data-slot=\"alert-dialog-title\"\n className={cn(titleVariants({ intent }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogDescription({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Description>) {\n return (\n <AlertDialogPrimitive.Description\n data-slot=\"alert-dialog-description\"\n className={cn('text-base text-gray-900', className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogAction({\n className,\n intent,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Action> & {\n intent?: VariantProps<typeof buttonVariants>['intent']\n}) {\n return (\n <AlertDialogPrimitive.Action\n className={cn(buttonVariants({ intent }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertDialogCancel({\n className,\n ...props\n}: React.ComponentProps<typeof AlertDialogPrimitive.Cancel>) {\n return (\n <AlertDialogPrimitive.Cancel\n className={cn(buttonVariants({ intent: 'secondary' }), className)}\n {...props}\n />\n )\n}\n\nexport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogOverlay,\n AlertDialogPortal,\n AlertDialogTitle,\n AlertDialogTrigger,\n titleVariants\n}\n"],"names":["AlertDialog","props","AlertDialogPrimitive","AlertDialogTrigger","AlertDialogPortal","AlertDialogOverlay","className","jsx","cn","AlertDialogContent","AlertDialogHeader","AlertDialogFooter","titleVariants","cva","AlertDialogTitle","intent","AlertDialogDescription","AlertDialogAction","buttonVariants","AlertDialogCancel"],"mappings":";;;;;AAQA,SAASA,EAAY;AAAA,EACnB,GAAGC;AACL,GAA2D;AACzD,+BAAQC,EAAqB,MAArB,EAA0B,aAAU,gBAAgB,GAAGD,GAAO;AACxE;AAEA,SAASE,EAAmB;AAAA,EAC1B,GAAGF;AACL,GAA8D;AAC5D,+BACGC,EAAqB,SAArB,EAA6B,aAAU,wBAAwB,GAAGD,GAAO;AAE9E;AAEA,SAASG,EAAkB;AAAA,EACzB,GAAGH;AACL,GAA6D;AAC3D,+BACGC,EAAqB,QAArB,EAA4B,aAAU,uBAAuB,GAAGD,GAAO;AAE5E;AAEA,SAASI,EAAmB;AAAA,EAC1B,WAAAC;AAAA,EACA,GAAGL;AACL,GAA8D;AAC5D,SACEM,gBAAAA,EAAAA;AAAAA,IAACL,EAAqB;AAAA,IAArB;AAAA,MACC,aAAU;AAAA,MACV,WAAWM;AAAA,QACT;AAAA,QACAF;AAAA,MAAA;AAAA,MAED,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASQ,EAAmB;AAAA,EAC1B,WAAAH;AAAA,EACA,GAAGL;AACL,GAA8D;AAC5D,gCACGG,GAAA,EACC,UAAA;AAAA,IAAAG,gBAAAA,EAAAA,IAACF,GAAA,EAAmB;AAA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EAAAA;AAAAA,IAACL,EAAqB;AAAA,IAArB;AAAA,MACC,aAAU;AAAA,MACV,WAAWM,EAAG,2BAA2BF,CAAS;AAAA,MACjD,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASgB,EAAkB;AAAA,EACzB,WAAAX;AAAA,EACA,QAAAS;AAAA,EACA,GAAGd;AACL,GAEG;AACD,SACEM,gBAAAA,EAAAA;AAAAA,IAACL,EAAqB;AAAA,IAArB;AAAA,MACC,WAAWM,EAAGU,EAAe,EAAE,QAAAH,EAAA,CAAQ,GAAGT,CAAS;AAAA,MAClD,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASkB,EAAkB;AAAA,EACzB,WAAAb;AAAA,EACA,GAAGL;AACL,GAA6D;AAC3D,SACEM,gBAAAA,EAAAA;AAAAA,IAACL,EAAqB;AAAA,IAArB;AAAA,MACC,WAAWM,EAAGU,EAAe,EAAE,QAAQ,YAAA,CAAa,GAAGZ,CAAS;AAAA,MAC/D,GAAGL;AAAA,IAAA;AAAA,EAAA;AAGV;"}
1
+ {"version":3,"file":"index4.js","names":[],"sources":["../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs"],"sourcesContent":["function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;"],"x_google_ignoreList":[0],"mappings":";AAAA,SAAS,EAAE,GAAE;CAAC,IAAI,GAAE,GAAE,IAAE;CAAG,IAAa,OAAO,KAAjB,YAA8B,OAAO,KAAjB,UAAmB,KAAG;MAAO,IAAa,OAAO,KAAjB,UAAmB,IAAG,MAAM,QAAQ,CAAC,GAAE;EAAC,IAAI,IAAE,EAAE;EAAO,KAAI,IAAE,GAAE,IAAE,GAAE,KAAI,EAAE,OAAK,IAAE,EAAE,EAAE,EAAE,OAAK,MAAI,KAAG,MAAK,KAAG;CAAE,OAAM,KAAI,KAAK,GAAE,EAAE,OAAK,MAAI,KAAG,MAAK,KAAG;CAAG,OAAO;AAAC;AAAC,SAAgB,IAAM;CAAC,KAAI,IAAI,GAAE,GAAE,IAAE,GAAE,IAAE,IAAG,IAAE,UAAU,QAAO,IAAE,GAAE,KAAI,CAAC,IAAE,UAAU,QAAM,IAAE,EAAE,CAAC,OAAK,MAAI,KAAG,MAAK,KAAG;CAAG,OAAO;AAAC"}
package/dist/index40.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index37.cjs"),u=require("./index38.cjs"),c=require("lucide-react"),n=require("react"),t=require("./index39.cjs"),o=u.cva("",{variants:{variant:{white:"to-white",gray:"to-gray-50"}},defaultVariants:{variant:"gray"}}),a=u.cva("",{variants:{variant:{white:"bg-white",gray:"bg-gray-50"}},defaultVariants:{variant:"gray"}});function j({children:d,className:f,variant:i}){const r=n.useRef(null),[x,h]=n.useState(!1),[m,g]=n.useState(!1),l=n.useCallback(()=>{if(!r.current)return;const{scrollLeft:s,scrollWidth:v,clientWidth:b}=r.current;h(s>0),g(s+b<v-5)},[r]);return n.useEffect(()=>{l();const s=t.debounce(l,100);return window.addEventListener("resize",s),()=>{window.removeEventListener("resize",s)}},[l]),e.jsxRuntimeExports.jsxs("div",{className:"relative flex overflow-hidden",children:[e.jsxRuntimeExports.jsxs("div",{className:t.cn("absolute left-0 top-0 h-full flex items-center",{hidden:!x}),children:[e.jsxRuntimeExports.jsx(c.ChevronLeft,{size:16,className:t.cn("text-gray-600 h-full cursor-pointer",a({variant:i})),onClick:()=>r.current?.scrollBy({left:-100,behavior:"smooth"})}),e.jsxRuntimeExports.jsx("div",{className:t.cn("w-[50px] h-full bg-linear-to-l from-transparent",o({variant:i}))})]}),e.jsxRuntimeExports.jsx("div",{ref:r,onScroll:l,className:t.cn("overflow-scroll no-scrollbar",f),children:d}),e.jsxRuntimeExports.jsxs("div",{className:t.cn("absolute right-0 top-0 h-full w-fit flex items-center justify-end",{hidden:!m}),children:[e.jsxRuntimeExports.jsx("div",{className:t.cn("w-[50px] h-full bg-linear-to-r from-transparent",o({variant:i}))}),e.jsxRuntimeExports.jsx(c.ChevronRight,{size:16,className:t.cn("text-gray-600 h-full cursor-pointer",a({variant:i})),onClick:()=>r.current?.scrollBy({left:100,behavior:"smooth"})})]})]})}exports.GradientScroll=j;exports.backgroundVariants=a;exports.gradientVariants=o;
2
- //# sourceMappingURL=index40.cjs.map
1
+ "use client";const e=require("./index2.cjs"),t=require("./index7.cjs"),n=require("./index10.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("@radix-ui/react-tabs");i=e.__toESM(i,1);var a=n.default;function o({className:e,...t}){return(0,a.jsx)(i.Root,{"data-slot":`tabs`,className:e,...t})}function s({className:e,...n}){return(0,a.jsx)(i.List,{"data-slot":`tabs-list`,className:t.cn(`inline-flex h-48 p-8 gap-8 items-center justify-center rounded-[16px] bg-gray-200 text-md font-normal text-gray-600 [&_svg]:text-gray-600 [&_i]:text-gray-600`,e),...n})}function c({className:e,...n}){return(0,a.jsx)(i.Trigger,{"data-slot":`tabs-trigger`,className:t.cn(`inline-flex h-32 items-center justify-center whitespace-nowrap rounded px-[12px] py-[6px] transition-all`,`focus-visible:outline-none disabled:pointer-events-none disabled:opacity-64`,`hover:bg-gray-900/8 active:bg-gray-900/12`,`data-[state=active]:bg-white data-[state=active]:hover:bg-white data-[state=active]:text-purple-800 hover:data-[state=active]:text-purple-800`,`data-[state=active]:[&_svg]:text-purple-800 [&_i]:data-[state=active]:text-purple-800`,`[&:has(>svg:first-child)]:pl-[10px]`,e),...n})}function l({className:e,...n}){return(0,a.jsx)(i.Content,{"data-slot":`tabs-content`,className:t.cn(`flex-1 outline-none`,e),...n})}exports.Tabs=o,exports.TabsContent=l,exports.TabsList=s,exports.TabsTrigger=c;
2
+ //# sourceMappingURL=index40.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index40.cjs","sources":["../src/FilterBar/GradientScroll.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\nimport React from 'react'\nimport { cn, debounce } from '../lib/utils'\n\nexport const gradientVariants = cva('', {\n variants: {\n variant: {\n white: 'to-white',\n gray: 'to-gray-50'\n }\n },\n defaultVariants: {\n variant: 'gray'\n }\n})\n\nexport const backgroundVariants = cva('', {\n variants: {\n variant: {\n white: 'bg-white',\n gray: 'bg-gray-50'\n }\n },\n defaultVariants: {\n variant: 'gray'\n }\n})\n\ninterface GradientScrollProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof gradientVariants> {}\n\nexport function GradientScroll({\n children,\n className,\n variant\n}: GradientScrollProps) {\n const scrollableRef = React.useRef<HTMLDivElement>(null)\n const [leftArrowVisible, setLeftArrowVisible] = React.useState(false)\n const [rightArrowVisible, setRightArrowVisible] = React.useState(false)\n\n const handleScroll = React.useCallback(() => {\n if (!scrollableRef.current) return\n\n const { scrollLeft, scrollWidth, clientWidth } = scrollableRef.current\n setLeftArrowVisible(scrollLeft > 0)\n setRightArrowVisible(scrollLeft + clientWidth < scrollWidth - 5)\n }, [scrollableRef])\n\n React.useEffect(() => {\n handleScroll()\n\n const debouncedHandleScroll = debounce(handleScroll, 100)\n window.addEventListener('resize', debouncedHandleScroll)\n return () => {\n window.removeEventListener('resize', debouncedHandleScroll)\n }\n }, [handleScroll])\n\n return (\n <div className=\"relative flex overflow-hidden\">\n <div\n className={cn('absolute left-0 top-0 h-full flex items-center', {\n hidden: !leftArrowVisible\n })}\n >\n <ChevronLeft\n size={16}\n className={cn(\n 'text-gray-600 h-full cursor-pointer',\n backgroundVariants({ variant })\n )}\n onClick={() =>\n scrollableRef.current?.scrollBy({ left: -100, behavior: 'smooth' })\n }\n />\n <div\n className={cn(\n 'w-[50px] h-full bg-linear-to-l from-transparent',\n gradientVariants({ variant })\n )}\n />\n </div>\n <div\n ref={scrollableRef}\n onScroll={handleScroll}\n className={cn('overflow-scroll no-scrollbar', className)}\n >\n {children}\n </div>\n <div\n className={cn(\n 'absolute right-0 top-0 h-full w-fit flex items-center justify-end',\n { hidden: !rightArrowVisible }\n )}\n >\n <div\n className={cn(\n 'w-[50px] h-full bg-linear-to-r from-transparent',\n gradientVariants({ variant })\n )}\n />\n <ChevronRight\n size={16}\n className={cn(\n 'text-gray-600 h-full cursor-pointer',\n backgroundVariants({ variant })\n )}\n onClick={() =>\n scrollableRef.current?.scrollBy({ left: 100, behavior: 'smooth' })\n }\n />\n </div>\n </div>\n )\n}\n"],"names":["gradientVariants","cva","backgroundVariants","GradientScroll","children","className","variant","scrollableRef","React","leftArrowVisible","setLeftArrowVisible","rightArrowVisible","setRightArrowVisible","handleScroll","scrollLeft","scrollWidth","clientWidth","debouncedHandleScroll","debounce","jsxs","cn","jsx","ChevronLeft","ChevronRight"],"mappings":"oNAKaA,EAAmBC,EAAAA,IAAI,GAAI,CACtC,SAAU,CACR,QAAS,CACP,MAAO,WACP,KAAM,YAAA,CACR,EAEF,gBAAiB,CACf,QAAS,MAAA,CAEb,CAAC,EAEYC,EAAqBD,EAAAA,IAAI,GAAI,CACxC,SAAU,CACR,QAAS,CACP,MAAO,WACP,KAAM,YAAA,CACR,EAEF,gBAAiB,CACf,QAAS,MAAA,CAEb,CAAC,EAMM,SAASE,EAAe,CAC7B,SAAAC,EACA,UAAAC,EACA,QAAAC,CACF,EAAwB,CACtB,MAAMC,EAAgBC,EAAM,OAAuB,IAAI,EACjD,CAACC,EAAkBC,CAAmB,EAAIF,EAAM,SAAS,EAAK,EAC9D,CAACG,EAAmBC,CAAoB,EAAIJ,EAAM,SAAS,EAAK,EAEhEK,EAAeL,EAAM,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,GACT,kDACApB,EAAiB,CAAE,QAAAM,CAAA,CAAS,CAAA,CAC9B,CAAA,EAEFe,EAAAA,kBAAAA,IAACE,EAAAA,aAAA,CACC,KAAM,GACN,UAAWH,EAAAA,GACT,sCACAlB,EAAmB,CAAE,QAAAI,CAAA,CAAS,CAAA,EAEhC,QAAS,IACPC,EAAc,SAAS,SAAS,CAAE,KAAM,IAAK,SAAU,QAAA,CAAU,CAAA,CAAA,CAErE,CAAA,CAAA,CACF,EACF,CAEJ"}
1
+ {"version":3,"file":"index40.cjs","names":[],"sources":["../src/Tabs/index.tsx"],"sourcesContent":["'use client'\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nfunction Tabs({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root data-slot=\"tabs\" className={className} {...props} />\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'inline-flex h-48 p-8 gap-8 items-center justify-center rounded-[16px] bg-gray-200 text-md font-normal text-gray-600 [&_svg]:text-gray-600 [&_i]:text-gray-600',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n 'inline-flex h-32 items-center justify-center whitespace-nowrap rounded px-[12px] py-[6px] transition-all',\n 'focus-visible:outline-none disabled:pointer-events-none disabled:opacity-64',\n 'hover:bg-gray-900/8 active:bg-gray-900/12',\n 'data-[state=active]:bg-white data-[state=active]:hover:bg-white data-[state=active]:text-purple-800 hover:data-[state=active]:text-purple-800',\n 'data-[state=active]:[&_svg]:text-purple-800 [&_i]:data-[state=active]:text-purple-800',\n '[&:has(>svg:first-child)]:pl-[10px]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn('flex-1 outline-none', className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsContent, TabsList, TabsTrigger }\n"],"mappings":"iNAMA,SAAS,EAAK,CACZ,YACA,GAAG,GAC+C,CAClD,OACE,EAAA,EAAA,KAAC,EAAc,KAAf,CAAoB,YAAU,OAAkB,YAAW,GAAI,CAAQ,CAAA,CAE3E,CAEA,SAAS,EAAS,CAChB,YACA,GAAG,GAC+C,CAClD,OACE,EAAA,EAAA,KAAC,EAAc,KAAf,CACE,YAAU,YACV,UAAW,EAAA,GACT,gKACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAY,CACnB,YACA,GAAG,GACkD,CACrD,OACE,EAAA,EAAA,KAAC,EAAc,QAAf,CACE,YAAU,eACV,UAAW,EAAA,GACT,2GACA,8EACA,4CACA,gJACA,wFACA,sCACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAY,CACnB,YACA,GAAG,GACkD,CACrD,OACE,EAAA,EAAA,KAAC,EAAc,QAAf,CACE,YAAU,eACV,UAAW,EAAA,GAAG,sBAAuB,CAAS,EAC9C,GAAI,CACL,CAAA,CAEL"}
package/dist/index40.js CHANGED
@@ -1,121 +1,39 @@
1
- import { j as e } from "./index37.js";
2
- import { cva as c } from "./index38.js";
3
- import { ChevronLeft as x, ChevronRight as w } from "lucide-react";
4
- import l from "react";
5
- import { cn as r, debounce as p } from "./index39.js";
6
- const i = c("", {
7
- variants: {
8
- variant: {
9
- white: "to-white",
10
- gray: "to-gray-50"
11
- }
12
- },
13
- defaultVariants: {
14
- variant: "gray"
15
- }
16
- }), n = c("", {
17
- variants: {
18
- variant: {
19
- white: "bg-white",
20
- gray: "bg-gray-50"
21
- }
22
- },
23
- defaultVariants: {
24
- variant: "gray"
25
- }
26
- });
27
- function S({
28
- children: f,
29
- className: d,
30
- variant: o
31
- }) {
32
- const t = l.useRef(null), [u, h] = l.useState(!1), [m, v] = l.useState(!1), a = l.useCallback(() => {
33
- if (!t.current) return;
34
- const { scrollLeft: s, scrollWidth: b, clientWidth: g } = t.current;
35
- h(s > 0), v(s + g < b - 5);
36
- }, [t]);
37
- return l.useEffect(() => {
38
- a();
39
- const s = p(a, 100);
40
- return window.addEventListener("resize", s), () => {
41
- window.removeEventListener("resize", s);
42
- };
43
- }, [a]), /* @__PURE__ */ e.jsxs("div", { className: "relative flex overflow-hidden", children: [
44
- /* @__PURE__ */ e.jsxs(
45
- "div",
46
- {
47
- className: r("absolute left-0 top-0 h-full flex items-center", {
48
- hidden: !u
49
- }),
50
- children: [
51
- /* @__PURE__ */ e.jsx(
52
- x,
53
- {
54
- size: 16,
55
- className: r(
56
- "text-gray-600 h-full cursor-pointer",
57
- n({ variant: o })
58
- ),
59
- onClick: () => t.current?.scrollBy({ left: -100, behavior: "smooth" })
60
- }
61
- ),
62
- /* @__PURE__ */ e.jsx(
63
- "div",
64
- {
65
- className: r(
66
- "w-[50px] h-full bg-linear-to-l from-transparent",
67
- i({ variant: o })
68
- )
69
- }
70
- )
71
- ]
72
- }
73
- ),
74
- /* @__PURE__ */ e.jsx(
75
- "div",
76
- {
77
- ref: t,
78
- onScroll: a,
79
- className: r("overflow-scroll no-scrollbar", d),
80
- children: f
81
- }
82
- ),
83
- /* @__PURE__ */ e.jsxs(
84
- "div",
85
- {
86
- className: r(
87
- "absolute right-0 top-0 h-full w-fit flex items-center justify-end",
88
- { hidden: !m }
89
- ),
90
- children: [
91
- /* @__PURE__ */ e.jsx(
92
- "div",
93
- {
94
- className: r(
95
- "w-[50px] h-full bg-linear-to-r from-transparent",
96
- i({ variant: o })
97
- )
98
- }
99
- ),
100
- /* @__PURE__ */ e.jsx(
101
- w,
102
- {
103
- size: 16,
104
- className: r(
105
- "text-gray-600 h-full cursor-pointer",
106
- n({ variant: o })
107
- ),
108
- onClick: () => t.current?.scrollBy({ left: 100, behavior: "smooth" })
109
- }
110
- )
111
- ]
112
- }
113
- )
114
- ] });
1
+ "use client";
2
+ import { cn as e } from "./index7.js";
3
+ import { require_jsx_runtime as t } from "./index10.js";
4
+ import "react";
5
+ import * as n from "@radix-ui/react-tabs";
6
+ //#region src/Tabs/index.tsx
7
+ var r = t();
8
+ function i({ className: e, ...t }) {
9
+ return /* @__PURE__ */ (0, r.jsx)(n.Root, {
10
+ "data-slot": "tabs",
11
+ className: e,
12
+ ...t
13
+ });
115
14
  }
116
- export {
117
- S as GradientScroll,
118
- n as backgroundVariants,
119
- i as gradientVariants
120
- };
121
- //# sourceMappingURL=index40.js.map
15
+ function a({ className: t, ...i }) {
16
+ return /* @__PURE__ */ (0, r.jsx)(n.List, {
17
+ "data-slot": "tabs-list",
18
+ className: e("inline-flex h-48 p-8 gap-8 items-center justify-center rounded-[16px] bg-gray-200 text-md font-normal text-gray-600 [&_svg]:text-gray-600 [&_i]:text-gray-600", t),
19
+ ...i
20
+ });
21
+ }
22
+ function o({ className: t, ...i }) {
23
+ return /* @__PURE__ */ (0, r.jsx)(n.Trigger, {
24
+ "data-slot": "tabs-trigger",
25
+ className: e("inline-flex h-32 items-center justify-center whitespace-nowrap rounded px-[12px] py-[6px] transition-all", "focus-visible:outline-none disabled:pointer-events-none disabled:opacity-64", "hover:bg-gray-900/8 active:bg-gray-900/12", "data-[state=active]:bg-white data-[state=active]:hover:bg-white data-[state=active]:text-purple-800 hover:data-[state=active]:text-purple-800", "data-[state=active]:[&_svg]:text-purple-800 [&_i]:data-[state=active]:text-purple-800", "[&:has(>svg:first-child)]:pl-[10px]", t),
26
+ ...i
27
+ });
28
+ }
29
+ function s({ className: t, ...i }) {
30
+ return /* @__PURE__ */ (0, r.jsx)(n.Content, {
31
+ "data-slot": "tabs-content",
32
+ className: e("flex-1 outline-none", t),
33
+ ...i
34
+ });
35
+ }
36
+ //#endregion
37
+ export { i as Tabs, s as TabsContent, a as TabsList, o as TabsTrigger };
38
+
39
+ //# sourceMappingURL=index40.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index40.js","sources":["../src/FilterBar/GradientScroll.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport { ChevronLeft, ChevronRight } from 'lucide-react'\nimport React from 'react'\nimport { cn, debounce } from '../lib/utils'\n\nexport const gradientVariants = cva('', {\n variants: {\n variant: {\n white: 'to-white',\n gray: 'to-gray-50'\n }\n },\n defaultVariants: {\n variant: 'gray'\n }\n})\n\nexport const backgroundVariants = cva('', {\n variants: {\n variant: {\n white: 'bg-white',\n gray: 'bg-gray-50'\n }\n },\n defaultVariants: {\n variant: 'gray'\n }\n})\n\ninterface GradientScrollProps\n extends React.HTMLAttributes<HTMLDivElement>,\n VariantProps<typeof gradientVariants> {}\n\nexport function GradientScroll({\n children,\n className,\n variant\n}: GradientScrollProps) {\n const scrollableRef = React.useRef<HTMLDivElement>(null)\n const [leftArrowVisible, setLeftArrowVisible] = React.useState(false)\n const [rightArrowVisible, setRightArrowVisible] = React.useState(false)\n\n const handleScroll = React.useCallback(() => {\n if (!scrollableRef.current) return\n\n const { scrollLeft, scrollWidth, clientWidth } = scrollableRef.current\n setLeftArrowVisible(scrollLeft > 0)\n setRightArrowVisible(scrollLeft + clientWidth < scrollWidth - 5)\n }, [scrollableRef])\n\n React.useEffect(() => {\n handleScroll()\n\n const debouncedHandleScroll = debounce(handleScroll, 100)\n window.addEventListener('resize', debouncedHandleScroll)\n return () => {\n window.removeEventListener('resize', debouncedHandleScroll)\n }\n }, [handleScroll])\n\n return (\n <div className=\"relative flex overflow-hidden\">\n <div\n className={cn('absolute left-0 top-0 h-full flex items-center', {\n hidden: !leftArrowVisible\n })}\n >\n <ChevronLeft\n size={16}\n className={cn(\n 'text-gray-600 h-full cursor-pointer',\n backgroundVariants({ variant })\n )}\n onClick={() =>\n scrollableRef.current?.scrollBy({ left: -100, behavior: 'smooth' })\n }\n />\n <div\n className={cn(\n 'w-[50px] h-full bg-linear-to-l from-transparent',\n gradientVariants({ variant })\n )}\n />\n </div>\n <div\n ref={scrollableRef}\n onScroll={handleScroll}\n className={cn('overflow-scroll no-scrollbar', className)}\n >\n {children}\n </div>\n <div\n className={cn(\n 'absolute right-0 top-0 h-full w-fit flex items-center justify-end',\n { hidden: !rightArrowVisible }\n )}\n >\n <div\n className={cn(\n 'w-[50px] h-full bg-linear-to-r from-transparent',\n gradientVariants({ variant })\n )}\n />\n <ChevronRight\n size={16}\n className={cn(\n 'text-gray-600 h-full cursor-pointer',\n backgroundVariants({ variant })\n )}\n onClick={() =>\n scrollableRef.current?.scrollBy({ left: 100, behavior: 'smooth' })\n }\n />\n </div>\n </div>\n )\n}\n"],"names":["gradientVariants","cva","backgroundVariants","GradientScroll","children","className","variant","scrollableRef","React","leftArrowVisible","setLeftArrowVisible","rightArrowVisible","setRightArrowVisible","handleScroll","scrollLeft","scrollWidth","clientWidth","debouncedHandleScroll","debounce","jsxs","cn","jsx","ChevronLeft","ChevronRight"],"mappings":";;;;;AAKO,MAAMA,IAAmBC,EAAI,IAAI;AAAA,EACtC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAAA,EACR;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC,GAEYC,IAAqBD,EAAI,IAAI;AAAA,EACxC,UAAU;AAAA,IACR,SAAS;AAAA,MACP,OAAO;AAAA,MACP,MAAM;AAAA,IAAA;AAAA,EACR;AAAA,EAEF,iBAAiB;AAAA,IACf,SAAS;AAAA,EAAA;AAEb,CAAC;AAMM,SAASE,EAAe;AAAA,EAC7B,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AACF,GAAwB;AACtB,QAAMC,IAAgBC,EAAM,OAAuB,IAAI,GACjD,CAACC,GAAkBC,CAAmB,IAAIF,EAAM,SAAS,EAAK,GAC9D,CAACG,GAAmBC,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A;AAAA,QACC,KAAKd;AAAA,QACL,UAAUM;AAAA,QACV,WAAWO,EAAG,gCAAgCf,CAAS;AAAA,QAEtD,UAAAD;AAAA,MAAA;AAAA,IAAA;AAAA,IAEHe,gBAAAA,EAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAWC;AAAA,UACT;AAAA,UACA,EAAE,QAAQ,CAACT,EAAA;AAAA,QAAkB;AAAA,QAG/B,UAAA;AAAA,UAAAU,gBAAAA,EAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAWD;AAAA,gBACT;AAAA,gBACApB,EAAiB,EAAE,SAAAM,EAAA,CAAS;AAAA,cAAA;AAAA,YAC9B;AAAA,UAAA;AAAA,UAEFe,gBAAAA,EAAAA;AAAAA,YAACE;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,WAAWH;AAAA,gBACT;AAAA,gBACAlB,EAAmB,EAAE,SAAAI,EAAA,CAAS;AAAA,cAAA;AAAA,cAEhC,SAAS,MACPC,EAAc,SAAS,SAAS,EAAE,MAAM,KAAK,UAAU,SAAA,CAAU;AAAA,YAAA;AAAA,UAAA;AAAA,QAErE;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"index40.js","names":[],"sources":["../src/Tabs/index.tsx"],"sourcesContent":["'use client'\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nfunction Tabs({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return (\n <TabsPrimitive.Root data-slot=\"tabs\" className={className} {...props} />\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'inline-flex h-48 p-8 gap-8 items-center justify-center rounded-[16px] bg-gray-200 text-md font-normal text-gray-600 [&_svg]:text-gray-600 [&_i]:text-gray-600',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n 'inline-flex h-32 items-center justify-center whitespace-nowrap rounded px-[12px] py-[6px] transition-all',\n 'focus-visible:outline-none disabled:pointer-events-none disabled:opacity-64',\n 'hover:bg-gray-900/8 active:bg-gray-900/12',\n 'data-[state=active]:bg-white data-[state=active]:hover:bg-white data-[state=active]:text-purple-800 hover:data-[state=active]:text-purple-800',\n 'data-[state=active]:[&_svg]:text-purple-800 [&_i]:data-[state=active]:text-purple-800',\n '[&:has(>svg:first-child)]:pl-[10px]',\n className\n )}\n {...props}\n />\n )\n}\n\nfunction TabsContent({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return (\n <TabsPrimitive.Content\n data-slot=\"tabs-content\"\n className={cn('flex-1 outline-none', className)}\n {...props}\n />\n )\n}\n\nexport { Tabs, TabsContent, TabsList, TabsTrigger }\n"],"mappings":";;;;;;;AAMA,SAAS,EAAK,EACZ,cACA,GAAG,KAC+C;CAClD,OACE,iBAAA,GAAA,EAAA,KAAC,EAAc,MAAf;EAAoB,aAAU;EAAkB;EAAW,GAAI;CAAQ,CAAA;AAE3E;AAEA,SAAS,EAAS,EAChB,cACA,GAAG,KAC+C;CAClD,OACE,iBAAA,GAAA,EAAA,KAAC,EAAc,MAAf;EACE,aAAU;EACV,WAAW,EACT,iKACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EACnB,cACA,GAAG,KACkD;CACrD,OACE,iBAAA,GAAA,EAAA,KAAC,EAAc,SAAf;EACE,aAAU;EACV,WAAW,EACT,4GACA,+EACA,6CACA,iJACA,yFACA,uCACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EACnB,cACA,GAAG,KACkD;CACrD,OACE,iBAAA,GAAA,EAAA,KAAC,EAAc,SAAf;EACE,aAAU;EACV,WAAW,EAAG,uBAAuB,CAAS;EAC9C,GAAI;CACL,CAAA;AAEL"}
package/dist/index41.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./index37.cjs"),u=require("./index39.cjs");function o({className:e}){return t.jsxRuntimeExports.jsx("div",{className:u.cn("absolute top-[18px] w-12 h-12 rounded-full bg-purple-700",e)})}exports.default=o;
2
- //# sourceMappingURL=index41.cjs.map
1
+ const e=require("./index2.cjs"),t=require("./index7.cjs"),n=require("./index10.cjs"),r=require("./index12.cjs"),i=require("./index14.cjs");let a=require("lucide-react"),o=require("react");o=e.__toESM(o,1);var s=n.default;function c({className:e,value:n,placeholder:r,onValueChange:i,...a}){let[c,u]=o.useState(``),d=o.useRef(null);function f(e){let t=e.target.value;if(t.includes(`,`)){let e=t.split(`,`),r=Array.from(new Set(e));i([...n||[],...r.filter(e=>!!e&&!n?.includes(e)).map(e=>e.trim())||[]]),u(``);return}u(t)}function p(e){[`Enter`,`Tab`].includes(e.key)&&c?.trim()&&(e.preventDefault(),n?.includes(c)||m(),u(``)),e.key===`Backspace`&&!c&&i(n?.slice(0,-1)||[])}function m(){c.trim()&&(i([...n||[],c]),u(``))}return(0,s.jsxs)(`div`,{className:t.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`,e),onClick:()=>d.current?.focus(),...a,children:[(0,s.jsx)(l,{value:n,onValueChange:i}),(0,s.jsx)(`input`,{ref:d,className:`h-[26px] outline-none text-sm`,type:`text`,value:c,onChange:f,onKeyDown:p,style:{width:`${c.length+1}ch`},onBlur:()=>m()}),n?.length===0&&!c&&(0,s.jsx)(`div`,{className:`text-gray-400 ml-[-2ch]`,children:r})]})}c.displayName=`TagInput`;function l({value:e,onValueChange:t}){return(0,s.jsx)(s.Fragment,{children:e?.map((n,o)=>(0,s.jsxs)(i.Badge,{className:`px-0 pr-8 pl-0 gap-x-4 overflow-hidden`,children:[(0,s.jsx)(r.Button,{type:`button`,className:`w-[26px] h-[26px] shrink-0`,size:`icon`,intent:`secondary`,onClick:()=>{t(e?.filter((e,t)=>t!==o)||[])},children:(0,s.jsx)(a.LucideX,{className:`w-16`})}),(0,s.jsx)(`div`,{className:`truncate`,children:n})]},o))})}exports.TagInput=c;
2
+ //# sourceMappingURL=index41.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index41.cjs","sources":["../src/Loading/LoadingDot.tsx"],"sourcesContent":["import { cn } from '../lib/utils'\n\ntype Props = {\n className?: string\n}\n\nexport default function LoadingDot({ className }: Props) {\n return (\n <div\n className={cn(\n 'absolute top-[18px] w-12 h-12 rounded-full bg-purple-700',\n className\n )}\n ></div>\n )\n}\n"],"names":["LoadingDot","className","jsx","cn"],"mappings":"wKAMA,SAAwBA,EAAW,CAAE,UAAAC,GAAoB,CACvD,OACEC,EAAAA,kBAAAA,IAAC,MAAA,CACC,UAAWC,EAAAA,GACT,2DACAF,CAAA,CACF,CAAA,CAGN"}
1
+ {"version":3,"file":"index41.cjs","names":[],"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"],"mappings":"6NAYA,SAAS,EAAS,CAChB,YACA,QACA,cACA,gBACA,GAAG,GACa,CAChB,GAAM,CAAC,EAAY,GAAiB,EAAM,SAAS,EAAE,EAC/C,EAAW,EAAM,OAAyB,IAAI,EAEpD,SAAS,EAAa,EAA4C,CAChE,IAAM,EAAoB,EAAM,OAAO,MACvC,GAAI,EAAkB,SAAS,GAAG,EAAG,CACnC,IAAM,EAAgB,EAAkB,MAAM,GAAG,EAE3C,EAAe,MAAM,KAAK,IAAI,IAAI,CAAa,CAAC,EAEtD,EAAc,CACZ,GAAI,GAAS,CAAC,EACd,GAAI,EACD,OAAO,GAEC,EAAQ,GAAe,CAAC,GAAO,SAAS,CAAU,CAC1D,EACA,IAAI,GAAK,EAAE,KAAK,CAAC,GAAK,CAAC,CAC5B,CAAC,EACD,EAAc,EAAE,EAChB,MACF,CACA,EAAc,CAAiB,CACjC,CAEA,SAAS,EAAc,EAA8C,CAC/D,CAAC,QAAS,KAAK,EAAE,SAAS,EAAM,GAAG,GACjC,GAAY,KAAK,IACnB,EAAM,eAAe,EAChB,GAAO,SAAS,CAAU,GAC7B,EAAc,EAEhB,EAAc,EAAE,GAIhB,EAAM,MAAQ,aAAe,CAAC,GAChC,EAAc,GAAO,MAAM,EAAG,EAAE,GAAK,CAAC,CAAC,CAE3C,CAEA,SAAS,GAAgB,CAClB,EAAW,KAAK,IACrB,EAAc,CAAC,GAAI,GAAS,CAAC,EAAI,CAAU,CAAC,EAC5C,EAAc,EAAE,EAClB,CAEA,OACE,EAAA,EAAA,MAAC,MAAD,CACE,UAAW,EAAA,GACT,iDACA,wDACA,oBACA,2BACA,6BACA,uDACA,CACF,EACA,YAAe,EAAS,SAAS,MAAM,EACvC,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