@kubetail/ui 2.0.2 → 2.0.4-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/dist/_virtual/rolldown:runtime.cjs +1 -0
  2. package/dist/elements/button.cjs +2 -2
  3. package/dist/elements/button.cjs.map +1 -1
  4. package/dist/elements/button.js +39 -42
  5. package/dist/elements/button.js.map +1 -1
  6. package/dist/elements/calendar.cjs +2 -2
  7. package/dist/elements/calendar.cjs.map +1 -1
  8. package/dist/elements/calendar.js +23 -27
  9. package/dist/elements/calendar.js.map +1 -1
  10. package/dist/elements/card.cjs +2 -2
  11. package/dist/elements/card.cjs.map +1 -1
  12. package/dist/elements/card.js +47 -50
  13. package/dist/elements/card.js.map +1 -1
  14. package/dist/elements/checkbox.cjs +2 -2
  15. package/dist/elements/checkbox.cjs.map +1 -1
  16. package/dist/elements/checkbox.js +19 -28
  17. package/dist/elements/checkbox.js.map +1 -1
  18. package/dist/elements/dialog.cjs +2 -2
  19. package/dist/elements/dialog.cjs.map +1 -1
  20. package/dist/elements/dialog.js +75 -107
  21. package/dist/elements/dialog.js.map +1 -1
  22. package/dist/elements/dropdown-menu.cjs +2 -2
  23. package/dist/elements/dropdown-menu.cjs.map +1 -1
  24. package/dist/elements/dropdown-menu.js +107 -181
  25. package/dist/elements/dropdown-menu.js.map +1 -1
  26. package/dist/elements/form.cjs +2 -2
  27. package/dist/elements/form.cjs.map +1 -1
  28. package/dist/elements/form.js +73 -76
  29. package/dist/elements/form.js.map +1 -1
  30. package/dist/elements/input.cjs +2 -2
  31. package/dist/elements/input.cjs.map +1 -1
  32. package/dist/elements/input.js +12 -21
  33. package/dist/elements/input.js.map +1 -1
  34. package/dist/elements/label.cjs +2 -2
  35. package/dist/elements/label.cjs.map +1 -1
  36. package/dist/elements/label.js +13 -19
  37. package/dist/elements/label.js.map +1 -1
  38. package/dist/elements/pagination.cjs +2 -0
  39. package/dist/elements/pagination.cjs.map +1 -0
  40. package/dist/elements/pagination.d.ts +13 -0
  41. package/dist/elements/pagination.js +79 -0
  42. package/dist/elements/pagination.js.map +1 -0
  43. package/dist/elements/pagination.stories.d.ts +15 -0
  44. package/dist/elements/pagination.test.d.ts +0 -0
  45. package/dist/elements/popover.cjs +2 -2
  46. package/dist/elements/popover.cjs.map +1 -1
  47. package/dist/elements/popover.js +31 -37
  48. package/dist/elements/popover.js.map +1 -1
  49. package/dist/elements/search-box.cjs +2 -2
  50. package/dist/elements/search-box.cjs.map +1 -1
  51. package/dist/elements/search-box.js +25 -28
  52. package/dist/elements/search-box.js.map +1 -1
  53. package/dist/elements/select.cjs +2 -2
  54. package/dist/elements/select.cjs.map +1 -1
  55. package/dist/elements/select.js +89 -136
  56. package/dist/elements/select.js.map +1 -1
  57. package/dist/elements/separator.cjs +2 -0
  58. package/dist/elements/separator.cjs.map +1 -0
  59. package/dist/elements/separator.d.ts +3 -0
  60. package/dist/elements/separator.js +16 -0
  61. package/dist/elements/separator.js.map +1 -0
  62. package/dist/elements/separator.stories.d.ts +15 -0
  63. package/dist/elements/separator.test.d.ts +0 -0
  64. package/dist/elements/sheet.cjs +2 -0
  65. package/dist/elements/sheet.cjs.map +1 -0
  66. package/dist/elements/sheet.d.ts +12 -0
  67. package/dist/elements/sheet.js +81 -0
  68. package/dist/elements/sheet.js.map +1 -0
  69. package/dist/elements/sheet.stories.d.ts +15 -0
  70. package/dist/elements/sheet.test.d.ts +0 -0
  71. package/dist/elements/sidebar.cjs +2 -0
  72. package/dist/elements/sidebar.cjs.map +1 -0
  73. package/dist/elements/sidebar.d.ts +68 -0
  74. package/dist/elements/sidebar.js +347 -0
  75. package/dist/elements/sidebar.js.map +1 -0
  76. package/dist/elements/sidebar.stories.d.ts +17 -0
  77. package/dist/elements/sidebar.test.d.ts +0 -0
  78. package/dist/elements/skeleton.cjs +2 -0
  79. package/dist/elements/skeleton.cjs.map +1 -0
  80. package/dist/elements/skeleton.d.ts +2 -0
  81. package/dist/elements/skeleton.js +12 -0
  82. package/dist/elements/skeleton.js.map +1 -0
  83. package/dist/elements/skeleton.stories.d.ts +15 -0
  84. package/dist/elements/skeleton.test.d.ts +0 -0
  85. package/dist/elements/spinner.cjs +2 -2
  86. package/dist/elements/spinner.cjs.map +1 -1
  87. package/dist/elements/spinner.js +30 -39
  88. package/dist/elements/spinner.js.map +1 -1
  89. package/dist/elements/table.cjs +2 -2
  90. package/dist/elements/table.cjs.map +1 -1
  91. package/dist/elements/table.js +58 -63
  92. package/dist/elements/table.js.map +1 -1
  93. package/dist/elements/tabs.cjs +2 -2
  94. package/dist/elements/tabs.cjs.map +1 -1
  95. package/dist/elements/tabs.js +31 -38
  96. package/dist/elements/tabs.js.map +1 -1
  97. package/dist/elements/tooltip.cjs +2 -0
  98. package/dist/elements/tooltip.cjs.map +1 -0
  99. package/dist/elements/tooltip.d.ts +6 -0
  100. package/dist/elements/tooltip.js +35 -0
  101. package/dist/elements/tooltip.js.map +1 -0
  102. package/dist/elements/tooltip.stories.d.ts +15 -0
  103. package/dist/elements/tooltip.test.d.ts +0 -0
  104. package/dist/hooks/use-mobile.cjs +2 -0
  105. package/dist/hooks/use-mobile.cjs.map +1 -0
  106. package/dist/hooks/use-mobile.d.ts +1 -0
  107. package/dist/hooks/use-mobile.js +14 -0
  108. package/dist/hooks/use-mobile.js.map +1 -0
  109. package/dist/index.cjs +0 -2
  110. package/dist/index.css +16 -16
  111. package/dist/index.js +0 -2
  112. package/dist/lib/utils.cjs +2 -2
  113. package/dist/lib/utils.cjs.map +1 -1
  114. package/dist/lib/utils.js +7 -8
  115. package/dist/lib/utils.js.map +1 -1
  116. package/package.json +51 -41
  117. package/dist/index.cjs.map +0 -1
  118. package/dist/index.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ declare function Skeleton({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
2
+ export { Skeleton };
@@ -0,0 +1,12 @@
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx } from "react/jsx-runtime";
3
+ function Skeleton({ className: n, ...r }) {
4
+ return /* @__PURE__ */ jsx("div", {
5
+ "data-slot": "skeleton",
6
+ className: cn("bg-accent animate-pulse rounded-md", n),
7
+ ...r
8
+ });
9
+ }
10
+ export { Skeleton };
11
+
12
+ //# sourceMappingURL=skeleton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skeleton.js","names":[],"sources":["../../src/elements/skeleton.tsx"],"sourcesContent":["import { cn } from '@/lib/utils';\n\nfunction Skeleton({ className, ...props }: React.ComponentProps<'div'>) {\n return <div data-slot=\"skeleton\" className={cn('bg-accent animate-pulse rounded-md', className)} {...props} />;\n}\n\nexport { Skeleton };\n"],"mappings":";;AAEA,SAAS,SAAS,EAAE,cAAW,GAAG,KAAsC;AACtE,QAAO,oBAAC,OAAA;EAAI,aAAU;EAAW,WAAW,GAAG,sCAAsC,EAAU;EAAE,GAAI;GAAS"}
@@ -0,0 +1,15 @@
1
+ import { Skeleton } from './skeleton';
2
+ declare const meta: {
3
+ title: string;
4
+ tags: string[];
5
+ component: typeof Skeleton;
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ export declare function Demo(): import("react/jsx-runtime").JSX.Element;
File without changes
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../lib/utils.cjs"),t="animate-spin mr-2 text-chrome-200 fill-chrome-500",i={xs:"w-4 h-4",sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},l=({className:n,size:s="md"})=>e.jsxs("div",{role:"status",children:[e.jsxs("svg",{"aria-hidden":"true",className:r.cn(t,s&&i[s],n),viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),e.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]}),e.jsx("span",{className:"sr-only",children:"Loading..."})]});exports.Spinner=l;
2
- //# sourceMappingURL=spinner.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`);var r=`animate-spin mr-2 text-chrome-200 fill-chrome-500`,i={xs:`w-4 h-4`,sm:`w-6 h-6`,md:`w-8 h-8`,lg:`w-10 h-10`};const a=({className:e,size:a=`md`})=>(0,n.jsxs)(`div`,{role:`status`,children:[(0,n.jsxs)(`svg`,{"aria-hidden":`true`,className:t.cn(r,a&&i[a],e),viewBox:`0 0 100 101`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:[(0,n.jsx)(`path`,{d:`M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z`,fill:`currentColor`}),(0,n.jsx)(`path`,{d:`M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z`,fill:`currentFill`})]}),(0,n.jsx)(`span`,{className:`sr-only`,children:`Loading...`})]});exports.Spinner=a;
2
+ //# sourceMappingURL=spinner.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.cjs","sources":["../../src/elements/spinner.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN = 'animate-spin mr-2 text-chrome-200 fill-chrome-500';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst sizeCNMap: Record<SpinnerSize, string> = {\n xs: 'w-4 h-4',\n sm: 'w-6 h-6',\n md: 'w-8 h-8',\n lg: 'w-10 h-10',\n};\n\ntype Props = {\n className?: string;\n size?: SpinnerSize;\n};\n\nexport const Spinner = ({ className, size = 'md' }: Props) => (\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className={cn(baseCN, size && sizeCNMap[size], className)}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span className=\"sr-only\">Loading...</span>\n </div>\n);\n"],"names":["baseCN","sizeCNMap","Spinner","className","size","jsxs","cn","jsx"],"mappings":"mJAgBMA,EAAS,oDAITC,EAAyC,CAC7C,GAAI,UACJ,GAAI,UACJ,GAAI,UACJ,GAAI,WACN,EAOaC,EAAU,CAAC,CAAE,UAAAC,EAAW,KAAAC,EAAO,QAC1CC,EAAAA,KAAC,MAAA,CAAI,KAAK,SACR,SAAA,CAAAA,EAAAA,KAAC,MAAA,CACC,cAAY,OACZ,UAAWC,EAAAA,GAAGN,EAAQI,GAAQH,EAAUG,CAAI,EAAGD,CAAS,EACxD,QAAQ,cACR,KAAK,OACL,MAAM,6BAEN,SAAA,CAAAI,EAAAA,IAAC,OAAA,CACC,EAAE,+WACF,KAAK,cAAA,CAAA,EAEPA,EAAAA,IAAC,OAAA,CACC,EAAE,glBACF,KAAK,aAAA,CAAA,CACP,CAAA,CAAA,EAEFA,EAAAA,IAAC,OAAA,CAAK,UAAU,UAAU,SAAA,YAAA,CAAU,CAAA,CAAA,CACtC"}
1
+ {"version":3,"file":"spinner.cjs","names":["sizeCNMap: Record<SpinnerSize, string>"],"sources":["../../src/elements/spinner.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN = 'animate-spin mr-2 text-chrome-200 fill-chrome-500';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst sizeCNMap: Record<SpinnerSize, string> = {\n xs: 'w-4 h-4',\n sm: 'w-6 h-6',\n md: 'w-8 h-8',\n lg: 'w-10 h-10',\n};\n\ntype Props = {\n className?: string;\n size?: SpinnerSize;\n};\n\nexport const Spinner = ({ className, size = 'md' }: Props) => (\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className={cn(baseCN, size && sizeCNMap[size], className)}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span className=\"sr-only\">Loading...</span>\n </div>\n);\n"],"mappings":"wLAgBA,IAAM,EAAS,oDAITA,EAAyC,CAC7C,GAAI,UACJ,GAAI,UACJ,GAAI,UACJ,GAAI,YACL,CAOD,MAAa,GAAW,CAAE,YAAW,OAAO,SAC1C,EAAA,EAAA,MAAC,MAAA,CAAI,KAAK,oBACR,EAAA,EAAA,MAAC,MAAA,CACC,cAAY,OACZ,UAAW,EAAA,GAAG,EAAQ,GAAQ,EAAU,GAAO,EAAU,CACzD,QAAQ,cACR,KAAK,OACL,MAAM,wCAEN,EAAA,EAAA,KAAC,OAAA,CACC,EAAE,+WACF,KAAK,gBACL,EACF,EAAA,EAAA,KAAC,OAAA,CACC,EAAE,glBACF,KAAK,eACL,CAAA,EACE,EACN,EAAA,EAAA,KAAC,OAAA,CAAK,UAAU,mBAAU,cAAiB,CAAA,EACvC"}
@@ -1,40 +1,31 @@
1
- import { jsxs as s, jsx as C } from "react/jsx-runtime";
2
- import { cn as n } from "../lib/utils.js";
3
- const e = "animate-spin mr-2 text-chrome-200 fill-chrome-500", i = {
4
- xs: "w-4 h-4",
5
- sm: "w-6 h-6",
6
- md: "w-8 h-8",
7
- lg: "w-10 h-10"
8
- }, a = ({ className: l, size: r = "md" }) => /* @__PURE__ */ s("div", { role: "status", children: [
9
- /* @__PURE__ */ s(
10
- "svg",
11
- {
12
- "aria-hidden": "true",
13
- className: n(e, r && i[r], l),
14
- viewBox: "0 0 100 101",
15
- fill: "none",
16
- xmlns: "http://www.w3.org/2000/svg",
17
- children: [
18
- /* @__PURE__ */ C(
19
- "path",
20
- {
21
- d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
22
- fill: "currentColor"
23
- }
24
- ),
25
- /* @__PURE__ */ C(
26
- "path",
27
- {
28
- d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
29
- fill: "currentFill"
30
- }
31
- )
32
- ]
33
- }
34
- ),
35
- /* @__PURE__ */ C("span", { className: "sr-only", children: "Loading..." })
36
- ] });
37
- export {
38
- a as Spinner
1
+ import { cn } from "../lib/utils.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ var baseCN = "animate-spin mr-2 text-chrome-200 fill-chrome-500", sizeCNMap = {
4
+ xs: "w-4 h-4",
5
+ sm: "w-6 h-6",
6
+ md: "w-8 h-8",
7
+ lg: "w-10 h-10"
39
8
  };
40
- //# sourceMappingURL=spinner.js.map
9
+ const Spinner = ({ className: a, size: o = "md" }) => /* @__PURE__ */ jsxs("div", {
10
+ role: "status",
11
+ children: [/* @__PURE__ */ jsxs("svg", {
12
+ "aria-hidden": "true",
13
+ className: cn(baseCN, o && sizeCNMap[o], a),
14
+ viewBox: "0 0 100 101",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg",
17
+ children: [/* @__PURE__ */ jsx("path", {
18
+ d: "M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",
19
+ fill: "currentColor"
20
+ }), /* @__PURE__ */ jsx("path", {
21
+ d: "M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",
22
+ fill: "currentFill"
23
+ })]
24
+ }), /* @__PURE__ */ jsx("span", {
25
+ className: "sr-only",
26
+ children: "Loading..."
27
+ })]
28
+ });
29
+ export { Spinner };
30
+
31
+ //# sourceMappingURL=spinner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"spinner.js","sources":["../../src/elements/spinner.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN = 'animate-spin mr-2 text-chrome-200 fill-chrome-500';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst sizeCNMap: Record<SpinnerSize, string> = {\n xs: 'w-4 h-4',\n sm: 'w-6 h-6',\n md: 'w-8 h-8',\n lg: 'w-10 h-10',\n};\n\ntype Props = {\n className?: string;\n size?: SpinnerSize;\n};\n\nexport const Spinner = ({ className, size = 'md' }: Props) => (\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className={cn(baseCN, size && sizeCNMap[size], className)}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span className=\"sr-only\">Loading...</span>\n </div>\n);\n"],"names":["baseCN","sizeCNMap","Spinner","className","size","jsxs","cn","jsx"],"mappings":";;AAgBA,MAAMA,IAAS,qDAITC,IAAyC;AAAA,EAC7C,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN,GAOaC,IAAU,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,WAC1C,gBAAAC,EAAC,OAAA,EAAI,MAAK,UACR,UAAA;AAAA,EAAA,gBAAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAGN,GAAQI,KAAQH,EAAUG,CAAI,GAAGD,CAAS;AAAA,MACxD,SAAQ;AAAA,MACR,MAAK;AAAA,MACL,OAAM;AAAA,MAEN,UAAA;AAAA,QAAA,gBAAAI;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,QAEP,gBAAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,GAAE;AAAA,YACF,MAAK;AAAA,UAAA;AAAA,QAAA;AAAA,MACP;AAAA,IAAA;AAAA,EAAA;AAAA,EAEF,gBAAAA,EAAC,QAAA,EAAK,WAAU,WAAU,UAAA,aAAA,CAAU;AAAA,EAAA,CACtC;"}
1
+ {"version":3,"file":"spinner.js","names":["sizeCNMap: Record<SpinnerSize, string>"],"sources":["../../src/elements/spinner.tsx"],"sourcesContent":["// Copyright 2024-2025 Andres Morey\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { cn } from '@/lib/utils';\n\nconst baseCN = 'animate-spin mr-2 text-chrome-200 fill-chrome-500';\n\ntype SpinnerSize = 'xs' | 'sm' | 'md' | 'lg';\n\nconst sizeCNMap: Record<SpinnerSize, string> = {\n xs: 'w-4 h-4',\n sm: 'w-6 h-6',\n md: 'w-8 h-8',\n lg: 'w-10 h-10',\n};\n\ntype Props = {\n className?: string;\n size?: SpinnerSize;\n};\n\nexport const Spinner = ({ className, size = 'md' }: Props) => (\n <div role=\"status\">\n <svg\n aria-hidden=\"true\"\n className={cn(baseCN, size && sizeCNMap[size], className)}\n viewBox=\"0 0 100 101\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z\"\n fill=\"currentFill\"\n />\n </svg>\n <span className=\"sr-only\">Loading...</span>\n </div>\n);\n"],"mappings":";;AAgBA,IAAM,SAAS,qDAITA,YAAyC;CAC7C,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAOD,MAAa,WAAW,EAAE,cAAW,UAAO,WAC1C,qBAAC,OAAA;CAAI,MAAK;YACR,qBAAC,OAAA;EACC,eAAY;EACZ,WAAW,GAAG,QAAQ,KAAQ,UAAU,IAAO,EAAU;EACzD,SAAQ;EACR,MAAK;EACL,OAAM;aAEN,oBAAC,QAAA;GACC,GAAE;GACF,MAAK;IACL,EACF,oBAAC,QAAA;GACC,GAAE;GACF,MAAK;IACL,CAAA;GACE,EACN,oBAAC,QAAA;EAAK,WAAU;YAAU;GAAiB,CAAA;EACvC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("../lib/utils.cjs");function r({className:e,containerClassName:t,...o}){return a.jsx("div",{"data-slot":"table-container",className:l.cn("relative w-full overflow-x-auto",t),children:a.jsx("table",{"data-slot":"table",className:l.cn("w-full caption-bottom text-sm",e),...o})})}function n({className:e,...t}){return a.jsx("thead",{"data-slot":"table-header",className:l.cn("[&_tr]:border-b",e),...t})}function s({className:e,...t}){return a.jsx("tbody",{"data-slot":"table-body",className:l.cn("[&_tr:last-child]:border-0",e),...t})}function c({className:e,...t}){return a.jsx("tfoot",{"data-slot":"table-footer",className:l.cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0",e),...t})}function b({className:e,...t}){return a.jsx("tr",{"data-slot":"table-row",className:l.cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function d({className:e,...t}){return a.jsx("th",{"data-slot":"table-head",className:l.cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function i({className:e,...t}){return a.jsx("td",{"data-slot":"table-cell",className:l.cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function u({className:e,...t}){return a.jsx("caption",{"data-slot":"table-caption",className:l.cn("text-muted-foreground mt-4 text-sm",e),...t})}exports.Table=r;exports.TableBody=s;exports.TableCaption=u;exports.TableCell=i;exports.TableFooter=c;exports.TableHead=d;exports.TableHeader=n;exports.TableRow=b;
2
- //# sourceMappingURL=table.cjs.map
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`);function r({className:e,containerClassName:r,...i}){return(0,n.jsx)(`div`,{"data-slot":`table-container`,className:t.cn(`relative w-full overflow-x-auto`,r),children:(0,n.jsx)(`table`,{"data-slot":`table`,className:t.cn(`w-full caption-bottom text-sm`,e),...i})})}function i({className:e,...r}){return(0,n.jsx)(`thead`,{"data-slot":`table-header`,className:t.cn(`[&_tr]:border-b`,e),...r})}function a({className:e,...r}){return(0,n.jsx)(`tbody`,{"data-slot":`table-body`,className:t.cn(`[&_tr:last-child]:border-0`,e),...r})}function o({className:e,...r}){return(0,n.jsx)(`tfoot`,{"data-slot":`table-footer`,className:t.cn(`bg-muted/50 border-t font-medium [&>tr]:last:border-b-0`,e),...r})}function s({className:e,...r}){return(0,n.jsx)(`tr`,{"data-slot":`table-row`,className:t.cn(`hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors`,e),...r})}function c({className:e,...r}){return(0,n.jsx)(`th`,{"data-slot":`table-head`,className:t.cn(`text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...r})}function l({className:e,...r}){return(0,n.jsx)(`td`,{"data-slot":`table-cell`,className:t.cn(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...r})}function u({className:e,...r}){return(0,n.jsx)(`caption`,{"data-slot":`table-caption`,className:t.cn(`text-muted-foreground mt-4 text-sm`,e),...r})}exports.Table=r,exports.TableBody=a,exports.TableCaption=u,exports.TableCell=l,exports.TableFooter=o,exports.TableHead=c,exports.TableHeader=i,exports.TableRow=s;
2
+ //# sourceMappingURL=table.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.cjs","sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', 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('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"names":["Table","className","containerClassName","props","jsx","cn","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":"mJAQA,SAASA,EAAM,CAAE,UAAAC,EAAW,mBAAAC,EAAoB,GAAGC,GAAqB,CACtE,OACEC,MAAC,OAAI,YAAU,kBAAkB,UAAWC,EAAAA,GAAG,kCAAmCH,CAAkB,EAClG,SAAAE,EAAAA,IAAC,SAAM,YAAU,QAAQ,UAAWC,EAAAA,GAAG,gCAAiCJ,CAAS,EAAI,GAAGE,EAAO,EACjG,CAEJ,CAEA,SAASG,EAAY,CAAE,UAAAL,EAAW,GAAGE,GAAwC,CAC3E,OAAOC,MAAC,QAAA,CAAM,YAAU,eAAe,UAAWC,EAAAA,GAAG,kBAAmBJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CACjG,CAEA,SAASI,EAAU,CAAE,UAAAN,EAAW,GAAGE,GAAwC,CACzE,OAAOC,MAAC,QAAA,CAAM,YAAU,aAAa,UAAWC,EAAAA,GAAG,6BAA8BJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CAC1G,CAEA,SAASK,EAAY,CAAE,UAAAP,EAAW,GAAGE,GAAwC,CAC3E,OACEC,EAAAA,IAAC,QAAA,CACC,YAAU,eACV,UAAWC,EAAAA,GAAG,0DAA2DJ,CAAS,EACjF,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASM,EAAS,CAAE,UAAAR,EAAW,GAAGE,GAAqC,CACrE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,YACV,UAAWC,EAAAA,GAAG,8EAA+EJ,CAAS,EACrG,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASO,EAAU,CAAE,UAAAT,EAAW,GAAGE,GAAqC,CACtE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,aACV,UAAWC,EAAAA,GACT,qJACAJ,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASQ,EAAU,CAAE,UAAAV,EAAW,GAAGE,GAAqC,CACtE,OACEC,EAAAA,IAAC,KAAA,CACC,YAAU,aACV,UAAWC,EAAAA,GACT,yGACAJ,CAAA,EAED,GAAGE,CAAA,CAAA,CAGV,CAEA,SAASS,EAAa,CAAE,UAAAX,EAAW,GAAGE,GAA0C,CAC9E,OACEC,MAAC,UAAA,CAAQ,YAAU,gBAAgB,UAAWC,EAAAA,GAAG,qCAAsCJ,CAAS,EAAI,GAAGE,CAAA,CAAO,CAElH"}
1
+ {"version":3,"file":"table.cjs","names":[],"sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', 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('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"mappings":"qMAQA,SAAS,EAAM,CAAE,YAAW,qBAAoB,GAAG,GAAqB,CACtE,OACE,EAAA,EAAA,KAAC,MAAA,CAAI,YAAU,kBAAkB,UAAW,EAAA,GAAG,kCAAmC,EAAmB,WACnG,EAAA,EAAA,KAAC,QAAA,CAAM,YAAU,QAAQ,UAAW,EAAA,GAAG,gCAAiC,EAAU,CAAE,GAAI,GAAS,EAC7F,CAIV,SAAS,EAAY,CAAE,YAAW,GAAG,GAAwC,CAC3E,OAAO,EAAA,EAAA,KAAC,QAAA,CAAM,YAAU,eAAe,UAAW,EAAA,GAAG,kBAAmB,EAAU,CAAE,GAAI,GAAS,CAGnG,SAAS,EAAU,CAAE,YAAW,GAAG,GAAwC,CACzE,OAAO,EAAA,EAAA,KAAC,QAAA,CAAM,YAAU,aAAa,UAAW,EAAA,GAAG,6BAA8B,EAAU,CAAE,GAAI,GAAS,CAG5G,SAAS,EAAY,CAAE,YAAW,GAAG,GAAwC,CAC3E,OACE,EAAA,EAAA,KAAC,QAAA,CACC,YAAU,eACV,UAAW,EAAA,GAAG,0DAA2D,EAAU,CACnF,GAAI,GACJ,CAIN,SAAS,EAAS,CAAE,YAAW,GAAG,GAAqC,CACrE,OACE,EAAA,EAAA,KAAC,KAAA,CACC,YAAU,YACV,UAAW,EAAA,GAAG,8EAA+E,EAAU,CACvG,GAAI,GACJ,CAIN,SAAS,EAAU,CAAE,YAAW,GAAG,GAAqC,CACtE,OACE,EAAA,EAAA,KAAC,KAAA,CACC,YAAU,aACV,UAAW,EAAA,GACT,qJACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,EAAU,CAAE,YAAW,GAAG,GAAqC,CACtE,OACE,EAAA,EAAA,KAAC,KAAA,CACC,YAAU,aACV,UAAW,EAAA,GACT,yGACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,EAAa,CAAE,YAAW,GAAG,GAA0C,CAC9E,OACE,EAAA,EAAA,KAAC,UAAA,CAAQ,YAAU,gBAAgB,UAAW,EAAA,GAAG,qCAAsC,EAAU,CAAE,GAAI,GAAS"}
@@ -1,71 +1,66 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import { cn as o } from "../lib/utils.js";
3
- function s({ className: t, containerClassName: e, ...l }) {
4
- return /* @__PURE__ */ a("div", { "data-slot": "table-container", className: o("relative w-full overflow-x-auto", e), children: /* @__PURE__ */ a("table", { "data-slot": "table", className: o("w-full caption-bottom text-sm", t), ...l }) });
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ function Table({ className: s, containerClassName: c, ...l }) {
5
+ return /* @__PURE__ */ jsx("div", {
6
+ "data-slot": "table-container",
7
+ className: cn("relative w-full overflow-x-auto", c),
8
+ children: /* @__PURE__ */ jsx("table", {
9
+ "data-slot": "table",
10
+ className: cn("w-full caption-bottom text-sm", s),
11
+ ...l
12
+ })
13
+ });
5
14
  }
6
- function d({ className: t, ...e }) {
7
- return /* @__PURE__ */ a("thead", { "data-slot": "table-header", className: o("[&_tr]:border-b", t), ...e });
15
+ function TableHeader({ className: s, ...c }) {
16
+ return /* @__PURE__ */ jsx("thead", {
17
+ "data-slot": "table-header",
18
+ className: cn("[&_tr]:border-b", s),
19
+ ...c
20
+ });
8
21
  }
9
- function c({ className: t, ...e }) {
10
- return /* @__PURE__ */ a("tbody", { "data-slot": "table-body", className: o("[&_tr:last-child]:border-0", t), ...e });
22
+ function TableBody({ className: s, ...c }) {
23
+ return /* @__PURE__ */ jsx("tbody", {
24
+ "data-slot": "table-body",
25
+ className: cn("[&_tr:last-child]:border-0", s),
26
+ ...c
27
+ });
11
28
  }
12
- function b({ className: t, ...e }) {
13
- return /* @__PURE__ */ a(
14
- "tfoot",
15
- {
16
- "data-slot": "table-footer",
17
- className: o("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", t),
18
- ...e
19
- }
20
- );
29
+ function TableFooter({ className: s, ...c }) {
30
+ return /* @__PURE__ */ jsx("tfoot", {
31
+ "data-slot": "table-footer",
32
+ className: cn("bg-muted/50 border-t font-medium [&>tr]:last:border-b-0", s),
33
+ ...c
34
+ });
21
35
  }
22
- function i({ className: t, ...e }) {
23
- return /* @__PURE__ */ a(
24
- "tr",
25
- {
26
- "data-slot": "table-row",
27
- className: o("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", t),
28
- ...e
29
- }
30
- );
36
+ function TableRow({ className: s, ...c }) {
37
+ return /* @__PURE__ */ jsx("tr", {
38
+ "data-slot": "table-row",
39
+ className: cn("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors", s),
40
+ ...c
41
+ });
31
42
  }
32
- function m({ className: t, ...e }) {
33
- return /* @__PURE__ */ a(
34
- "th",
35
- {
36
- "data-slot": "table-head",
37
- className: o(
38
- "text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
39
- t
40
- ),
41
- ...e
42
- }
43
- );
43
+ function TableHead({ className: s, ...c }) {
44
+ return /* @__PURE__ */ jsx("th", {
45
+ "data-slot": "table-head",
46
+ className: cn("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", s),
47
+ ...c
48
+ });
44
49
  }
45
- function u({ className: t, ...e }) {
46
- return /* @__PURE__ */ a(
47
- "td",
48
- {
49
- "data-slot": "table-cell",
50
- className: o(
51
- "p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
52
- t
53
- ),
54
- ...e
55
- }
56
- );
50
+ function TableCell({ className: s, ...c }) {
51
+ return /* @__PURE__ */ jsx("td", {
52
+ "data-slot": "table-cell",
53
+ className: cn("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", s),
54
+ ...c
55
+ });
57
56
  }
58
- function f({ className: t, ...e }) {
59
- return /* @__PURE__ */ a("caption", { "data-slot": "table-caption", className: o("text-muted-foreground mt-4 text-sm", t), ...e });
57
+ function TableCaption({ className: s, ...c }) {
58
+ return /* @__PURE__ */ jsx("caption", {
59
+ "data-slot": "table-caption",
60
+ className: cn("text-muted-foreground mt-4 text-sm", s),
61
+ ...c
62
+ });
60
63
  }
61
- export {
62
- s as Table,
63
- c as TableBody,
64
- f as TableCaption,
65
- u as TableCell,
66
- b as TableFooter,
67
- m as TableHead,
68
- d as TableHeader,
69
- i as TableRow
70
- };
71
- //# sourceMappingURL=table.js.map
64
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
65
+
66
+ //# sourceMappingURL=table.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', 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('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"names":["Table","className","containerClassName","props","jsx","cn","TableHeader","TableBody","TableFooter","TableRow","TableHead","TableCell","TableCaption"],"mappings":";;AAQA,SAASA,EAAM,EAAE,WAAAC,GAAW,oBAAAC,GAAoB,GAAGC,KAAqB;AACtE,SACE,gBAAAC,EAAC,SAAI,aAAU,mBAAkB,WAAWC,EAAG,mCAAmCH,CAAkB,GAClG,UAAA,gBAAAE,EAAC,WAAM,aAAU,SAAQ,WAAWC,EAAG,iCAAiCJ,CAAS,GAAI,GAAGE,GAAO,GACjG;AAEJ;AAEA,SAASG,EAAY,EAAE,WAAAL,GAAW,GAAGE,KAAwC;AAC3E,SAAO,gBAAAC,EAAC,SAAA,EAAM,aAAU,gBAAe,WAAWC,EAAG,mBAAmBJ,CAAS,GAAI,GAAGE,EAAA,CAAO;AACjG;AAEA,SAASI,EAAU,EAAE,WAAAN,GAAW,GAAGE,KAAwC;AACzE,SAAO,gBAAAC,EAAC,SAAA,EAAM,aAAU,cAAa,WAAWC,EAAG,8BAA8BJ,CAAS,GAAI,GAAGE,EAAA,CAAO;AAC1G;AAEA,SAASK,EAAY,EAAE,WAAAP,GAAW,GAAGE,KAAwC;AAC3E,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,2DAA2DJ,CAAS;AAAA,MACjF,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASM,EAAS,EAAE,WAAAR,GAAW,GAAGE,KAAqC;AACrE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC,EAAG,+EAA+EJ,CAAS;AAAA,MACrG,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASO,EAAU,EAAE,WAAAT,GAAW,GAAGE,KAAqC;AACtE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASQ,EAAU,EAAE,WAAAV,GAAW,GAAGE,KAAqC;AACtE,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGE;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASS,EAAa,EAAE,WAAAX,GAAW,GAAGE,KAA0C;AAC9E,SACE,gBAAAC,EAAC,WAAA,EAAQ,aAAU,iBAAgB,WAAWC,EAAG,sCAAsCJ,CAAS,GAAI,GAAGE,EAAA,CAAO;AAElH;"}
1
+ {"version":3,"file":"table.js","names":[],"sources":["../../src/elements/table.tsx"],"sourcesContent":["'use client';\n\nimport { cn } from '@/lib/utils';\n\ninterface TableProps extends React.ComponentProps<'table'> {\n containerClassName?: string;\n}\n\nfunction Table({ className, containerClassName, ...props }: TableProps) {\n return (\n <div data-slot=\"table-container\" className={cn('relative w-full overflow-x-auto', containerClassName)}>\n <table data-slot=\"table\" className={cn('w-full caption-bottom text-sm', className)} {...props} />\n </div>\n );\n}\n\nfunction TableHeader({ className, ...props }: React.ComponentProps<'thead'>) {\n return <thead data-slot=\"table-header\" className={cn('[&_tr]:border-b', className)} {...props} />;\n}\n\nfunction TableBody({ className, ...props }: React.ComponentProps<'tbody'>) {\n return <tbody data-slot=\"table-body\" className={cn('[&_tr:last-child]:border-0', className)} {...props} />;\n}\n\nfunction TableFooter({ className, ...props }: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n data-slot=\"table-footer\"\n className={cn('bg-muted/50 border-t font-medium [&>tr]:last:border-b-0', 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('hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors', className)}\n {...props}\n />\n );\n}\n\nfunction TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n data-slot=\"table-head\"\n className={cn(\n 'text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n data-slot=\"table-cell\"\n className={cn(\n 'p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TableCaption({ className, ...props }: React.ComponentProps<'caption'>) {\n return (\n <caption data-slot=\"table-caption\" className={cn('text-muted-foreground mt-4 text-sm', className)} {...props} />\n );\n}\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\nexport type { TableProps };\n"],"mappings":";;;AAQA,SAAS,MAAM,EAAE,cAAW,uBAAoB,GAAG,KAAqB;AACtE,QACE,oBAAC,OAAA;EAAI,aAAU;EAAkB,WAAW,GAAG,mCAAmC,EAAmB;YACnG,oBAAC,SAAA;GAAM,aAAU;GAAQ,WAAW,GAAG,iCAAiC,EAAU;GAAE,GAAI;IAAS;GAC7F;;AAIV,SAAS,YAAY,EAAE,cAAW,GAAG,KAAwC;AAC3E,QAAO,oBAAC,SAAA;EAAM,aAAU;EAAe,WAAW,GAAG,mBAAmB,EAAU;EAAE,GAAI;GAAS;;AAGnG,SAAS,UAAU,EAAE,cAAW,GAAG,KAAwC;AACzE,QAAO,oBAAC,SAAA;EAAM,aAAU;EAAa,WAAW,GAAG,8BAA8B,EAAU;EAAE,GAAI;GAAS;;AAG5G,SAAS,YAAY,EAAE,cAAW,GAAG,KAAwC;AAC3E,QACE,oBAAC,SAAA;EACC,aAAU;EACV,WAAW,GAAG,2DAA2D,EAAU;EACnF,GAAI;GACJ;;AAIN,SAAS,SAAS,EAAE,cAAW,GAAG,KAAqC;AACrE,QACE,oBAAC,MAAA;EACC,aAAU;EACV,WAAW,GAAG,+EAA+E,EAAU;EACvG,GAAI;GACJ;;AAIN,SAAS,UAAU,EAAE,cAAW,GAAG,KAAqC;AACtE,QACE,oBAAC,MAAA;EACC,aAAU;EACV,WAAW,GACT,sJACA,EACD;EACD,GAAI;GACJ;;AAIN,SAAS,UAAU,EAAE,cAAW,GAAG,KAAqC;AACtE,QACE,oBAAC,MAAA;EACC,aAAU;EACV,WAAW,GACT,0GACA,EACD;EACD,GAAI;GACJ;;AAIN,SAAS,aAAa,EAAE,cAAW,GAAG,KAA0C;AAC9E,QACE,oBAAC,WAAA;EAAQ,aAAU;EAAgB,WAAW,GAAG,sCAAsC,EAAU;EAAE,GAAI;GAAS"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),o=require("@radix-ui/react-tabs"),r=require("../lib/utils.cjs");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const a=c(o);function u({className:e,...t}){return s.jsx(a.Root,{"data-slot":"tabs",className:r.cn("flex flex-col gap-2",e),...t})}function l({className:e,...t}){return s.jsx(a.List,{"data-slot":"tabs-list",className:r.cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function d({className:e,...t}){return s.jsx(a.Trigger,{"data-slot":"tabs-trigger",className:r.cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function b({className:e,...t}){return s.jsx(a.Content,{"data-slot":"tabs-content",className:r.cn("flex-1 outline-none",e),...t})}exports.Tabs=u;exports.TabsContent=b;exports.TabsList=l;exports.TabsTrigger=d;
2
- //# sourceMappingURL=tabs.cjs.map
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`react/jsx-runtime`),r=require(`@radix-ui/react-tabs`);r=e.__toESM(r);function i({className:e,...i}){return(0,n.jsx)(r.Root,{"data-slot":`tabs`,className:t.cn(`flex flex-col gap-2`,e),...i})}function a({className:e,...i}){return(0,n.jsx)(r.List,{"data-slot":`tabs-list`,className:t.cn(`bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]`,e),...i})}function o({className:e,...i}){return(0,n.jsx)(r.Trigger,{"data-slot":`tabs-trigger`,className:t.cn(`data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...i})}function s({className:e,...i}){return(0,n.jsx)(r.Content,{"data-slot":`tabs-content`,className:t.cn(`flex-1 outline-none`,e),...i})}exports.Tabs=i,exports.TabsContent=s,exports.TabsList=a,exports.TabsTrigger=o;
2
+ //# sourceMappingURL=tabs.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.cjs","sources":["../../src/elements/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot=\"tabs-content\" className={cn('flex-1 outline-none', className)} {...props} />;\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"names":["Tabs","className","props","jsx","TabsPrimitive","cn","TabsList","TabsTrigger","TabsContent"],"mappings":"+cAMA,SAASA,EAAK,CAAE,UAAAC,EAAW,GAAGC,GAA0D,CACtF,OAAOC,EAAAA,IAACC,EAAc,KAAd,CAAmB,YAAU,OAAO,UAAWC,EAAAA,GAAG,sBAAuBJ,CAAS,EAAI,GAAGC,CAAA,CAAO,CAC1G,CAEA,SAASI,EAAS,CAAE,UAAAL,EAAW,GAAGC,GAA0D,CAC1F,OACEC,EAAAA,IAACC,EAAc,KAAd,CACC,YAAU,YACV,UAAWC,EAAAA,GACT,sGACAJ,CAAA,EAED,GAAGC,CAAA,CAAA,CAGV,CAEA,SAASK,EAAY,CAAE,UAAAN,EAAW,GAAGC,GAA6D,CAChG,OACEC,EAAAA,IAACC,EAAc,QAAd,CACC,YAAU,eACV,UAAWC,EAAAA,GACT,kqBACAJ,CAAA,EAED,GAAGC,CAAA,CAAA,CAGV,CAEA,SAASM,EAAY,CAAE,UAAAP,EAAW,GAAGC,GAA6D,CAChG,OAAOC,EAAAA,IAACC,EAAc,QAAd,CAAsB,YAAU,eAAe,UAAWC,EAAAA,GAAG,sBAAuBJ,CAAS,EAAI,GAAGC,CAAA,CAAO,CACrH"}
1
+ {"version":3,"file":"tabs.cjs","names":[],"sources":["../../src/elements/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot=\"tabs-content\" className={cn('flex-1 outline-none', className)} {...props} />;\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":"sPAMA,SAAS,EAAK,CAAE,YAAW,GAAG,GAA0D,CACtF,OAAO,EAAA,EAAA,KAAC,EAAc,KAAA,CAAK,YAAU,OAAO,UAAW,EAAA,GAAG,sBAAuB,EAAU,CAAE,GAAI,GAAS,CAG5G,SAAS,EAAS,CAAE,YAAW,GAAG,GAA0D,CAC1F,OACE,EAAA,EAAA,KAAC,EAAc,KAAA,CACb,YAAU,YACV,UAAW,EAAA,GACT,sGACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OACE,EAAA,EAAA,KAAC,EAAc,QAAA,CACb,YAAU,eACV,UAAW,EAAA,GACT,kqBACA,EACD,CACD,GAAI,GACJ,CAIN,SAAS,EAAY,CAAE,YAAW,GAAG,GAA6D,CAChG,OAAO,EAAA,EAAA,KAAC,EAAc,QAAA,CAAQ,YAAU,eAAe,UAAW,EAAA,GAAG,sBAAuB,EAAU,CAAE,GAAI,GAAS"}
@@ -1,42 +1,35 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import * as s from "@radix-ui/react-tabs";
3
- import { cn as i } from "../lib/utils.js";
4
- function o({ className: t, ...e }) {
5
- return /* @__PURE__ */ a(s.Root, { "data-slot": "tabs", className: i("flex flex-col gap-2", t), ...e });
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import * as TabsPrimitive from "@radix-ui/react-tabs";
5
+ function Tabs({ className: a, ...o }) {
6
+ return /* @__PURE__ */ jsx(TabsPrimitive.Root, {
7
+ "data-slot": "tabs",
8
+ className: cn("flex flex-col gap-2", a),
9
+ ...o
10
+ });
6
11
  }
7
- function d({ className: t, ...e }) {
8
- return /* @__PURE__ */ a(
9
- s.List,
10
- {
11
- "data-slot": "tabs-list",
12
- className: i(
13
- "bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",
14
- t
15
- ),
16
- ...e
17
- }
18
- );
12
+ function TabsList({ className: a, ...o }) {
13
+ return /* @__PURE__ */ jsx(TabsPrimitive.List, {
14
+ "data-slot": "tabs-list",
15
+ className: cn("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]", a),
16
+ ...o
17
+ });
19
18
  }
20
- function c({ className: t, ...e }) {
21
- return /* @__PURE__ */ a(
22
- s.Trigger,
23
- {
24
- "data-slot": "tabs-trigger",
25
- className: i(
26
- "data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
27
- t
28
- ),
29
- ...e
30
- }
31
- );
19
+ function TabsTrigger({ className: a, ...o }) {
20
+ return /* @__PURE__ */ jsx(TabsPrimitive.Trigger, {
21
+ "data-slot": "tabs-trigger",
22
+ className: cn("data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", a),
23
+ ...o
24
+ });
32
25
  }
33
- function l({ className: t, ...e }) {
34
- return /* @__PURE__ */ a(s.Content, { "data-slot": "tabs-content", className: i("flex-1 outline-none", t), ...e });
26
+ function TabsContent({ className: a, ...o }) {
27
+ return /* @__PURE__ */ jsx(TabsPrimitive.Content, {
28
+ "data-slot": "tabs-content",
29
+ className: cn("flex-1 outline-none", a),
30
+ ...o
31
+ });
35
32
  }
36
- export {
37
- o as Tabs,
38
- l as TabsContent,
39
- d as TabsList,
40
- c as TabsTrigger
41
- };
42
- //# sourceMappingURL=tabs.js.map
33
+ export { Tabs, TabsContent, TabsList, TabsTrigger };
34
+
35
+ //# sourceMappingURL=tabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.js","sources":["../../src/elements/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot=\"tabs-content\" className={cn('flex-1 outline-none', className)} {...props} />;\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"names":["Tabs","className","props","jsx","TabsPrimitive","cn","TabsList","TabsTrigger","TabsContent"],"mappings":";;;AAMA,SAASA,EAAK,EAAE,WAAAC,GAAW,GAAGC,KAA0D;AACtF,SAAO,gBAAAC,EAACC,EAAc,MAAd,EAAmB,aAAU,QAAO,WAAWC,EAAG,uBAAuBJ,CAAS,GAAI,GAAGC,EAAA,CAAO;AAC1G;AAEA,SAASI,EAAS,EAAE,WAAAL,GAAW,GAAGC,KAA0D;AAC1F,SACE,gBAAAC;AAAA,IAACC,EAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASK,EAAY,EAAE,WAAAN,GAAW,GAAGC,KAA6D;AAChG,SACE,gBAAAC;AAAA,IAACC,EAAc;AAAA,IAAd;AAAA,MACC,aAAU;AAAA,MACV,WAAWC;AAAA,QACT;AAAA,QACAJ;AAAA,MAAA;AAAA,MAED,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGV;AAEA,SAASM,EAAY,EAAE,WAAAP,GAAW,GAAGC,KAA6D;AAChG,SAAO,gBAAAC,EAACC,EAAc,SAAd,EAAsB,aAAU,gBAAe,WAAWC,EAAG,uBAAuBJ,CAAS,GAAI,GAAGC,EAAA,CAAO;AACrH;"}
1
+ {"version":3,"file":"tabs.js","names":[],"sources":["../../src/elements/tabs.tsx"],"sourcesContent":["'use client';\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs';\n\nimport { cn } from '@/lib/utils';\n\nfunction Tabs({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Root>) {\n return <TabsPrimitive.Root data-slot=\"tabs\" className={cn('flex flex-col gap-2', className)} {...props} />;\n}\n\nfunction TabsList({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.List>) {\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(\n 'bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]',\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsTrigger({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(\n \"data-[state=active]:bg-background dark:data-[state=active]:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 text-foreground dark:text-muted-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className,\n )}\n {...props}\n />\n );\n}\n\nfunction TabsContent({ className, ...props }: React.ComponentProps<typeof TabsPrimitive.Content>) {\n return <TabsPrimitive.Content data-slot=\"tabs-content\" className={cn('flex-1 outline-none', className)} {...props} />;\n}\n\nexport { Tabs, TabsList, TabsTrigger, TabsContent };\n"],"mappings":";;;;AAMA,SAAS,KAAK,EAAE,cAAW,GAAG,KAA0D;AACtF,QAAO,oBAAC,cAAc,MAAA;EAAK,aAAU;EAAO,WAAW,GAAG,uBAAuB,EAAU;EAAE,GAAI;GAAS;;AAG5G,SAAS,SAAS,EAAE,cAAW,GAAG,KAA0D;AAC1F,QACE,oBAAC,cAAc,MAAA;EACb,aAAU;EACV,WAAW,GACT,uGACA,EACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,cAAW,GAAG,KAA6D;AAChG,QACE,oBAAC,cAAc,SAAA;EACb,aAAU;EACV,WAAW,GACT,mqBACA,EACD;EACD,GAAI;GACJ;;AAIN,SAAS,YAAY,EAAE,cAAW,GAAG,KAA6D;AAChG,QAAO,oBAAC,cAAc,SAAA;EAAQ,aAAU;EAAe,WAAW,GAAG,uBAAuB,EAAU;EAAE,GAAI;GAAS"}
@@ -0,0 +1,2 @@
1
+ "use client";Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`../_virtual/rolldown:runtime.cjs`),t=require(`../lib/utils.cjs`);let n=require(`@radix-ui/react-tooltip`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);function i({delayDuration:e=0,...t}){return(0,r.jsx)(n.Provider,{"data-slot":`tooltip-provider`,delayDuration:e,...t})}function a({...e}){return(0,r.jsx)(i,{children:(0,r.jsx)(n.Root,{"data-slot":`tooltip`,...e})})}function o({...e}){return(0,r.jsx)(n.Trigger,{"data-slot":`tooltip-trigger`,...e})}function s({className:e,sideOffset:i=0,children:a,...o}){return(0,r.jsx)(n.Portal,{children:(0,r.jsxs)(n.Content,{"data-slot":`tooltip-content`,sideOffset:i,className:t.cn(`bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance`,e),...o,children:[a,(0,r.jsx)(n.Arrow,{className:`bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]`})]})})}exports.Tooltip=a,exports.TooltipContent=s,exports.TooltipProvider=i,exports.TooltipTrigger=o;
2
+ //# sourceMappingURL=tooltip.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.cjs","names":[],"sources":["../../src/elements/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nfunction TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delayDuration={delayDuration} {...props} />;\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"mappings":"6PAMA,SAAS,EAAgB,CAAE,gBAAgB,EAAG,GAAG,GAAiE,CAChH,OAAO,EAAA,EAAA,KAAC,EAAiB,SAAA,CAAS,YAAU,mBAAkC,gBAAe,GAAI,GAAS,CAG5G,SAAS,EAAQ,CAAE,GAAG,GAA6D,CACjF,OACE,EAAA,EAAA,KAAC,EAAA,CAAA,UACC,EAAA,EAAA,KAAC,EAAiB,KAAA,CAAK,YAAU,UAAU,GAAI,GAAS,CAAA,CACxC,CAItB,SAAS,EAAe,CAAE,GAAG,GAAgE,CAC3F,OAAO,EAAA,EAAA,KAAC,EAAiB,QAAA,CAAQ,YAAU,kBAAkB,GAAI,GAAS,CAG5E,SAAS,EAAe,CACtB,YACA,aAAa,EACb,WACA,GAAG,GACqD,CACxD,OACE,EAAA,EAAA,KAAC,EAAiB,OAAA,CAAA,UAChB,EAAA,EAAA,MAAC,EAAiB,QAAA,CAChB,YAAU,kBACE,aACZ,UAAW,EAAA,GACT,oaACA,EACD,CACD,GAAI,YAEH,GACD,EAAA,EAAA,KAAC,EAAiB,MAAA,CAAM,UAAU,qGAAA,CAAuG,CAAA,EAChH,CAAA,CACH"}
@@ -0,0 +1,6 @@
1
+ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
2
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
3
+ declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
5
+ declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
6
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
@@ -0,0 +1,35 @@
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ function TooltipProvider({ delayDuration: e = 0, ...r }) {
6
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
7
+ "data-slot": "tooltip-provider",
8
+ delayDuration: e,
9
+ ...r
10
+ });
11
+ }
12
+ function Tooltip({ ...e }) {
13
+ return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsx(TooltipPrimitive.Root, {
14
+ "data-slot": "tooltip",
15
+ ...e
16
+ }) });
17
+ }
18
+ function TooltipTrigger({ ...e }) {
19
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, {
20
+ "data-slot": "tooltip-trigger",
21
+ ...e
22
+ });
23
+ }
24
+ function TooltipContent({ className: i, sideOffset: a = 0, children: o, ...s }) {
25
+ return /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(TooltipPrimitive.Content, {
26
+ "data-slot": "tooltip-content",
27
+ sideOffset: a,
28
+ className: cn("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance", i),
29
+ ...s,
30
+ children: [o, /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
31
+ }) });
32
+ }
33
+ export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
34
+
35
+ //# sourceMappingURL=tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.js","names":[],"sources":["../../src/elements/tooltip.tsx"],"sourcesContent":["'use client';\n\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nimport { cn } from '@/lib/utils';\n\nfunction TooltipProvider({ delayDuration = 0, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n return <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delayDuration={delayDuration} {...props} />;\n}\n\nfunction Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n return (\n <TooltipProvider>\n <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />\n </TooltipProvider>\n );\n}\n\nfunction TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n return <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\n\nfunction TooltipContent({\n className,\n sideOffset = 0,\n children,\n ...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n data-slot=\"tooltip-content\"\n sideOffset={sideOffset}\n className={cn(\n 'bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance',\n className,\n )}\n {...props}\n >\n {children}\n <TooltipPrimitive.Arrow className=\"bg-foreground fill-foreground z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]\" />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n );\n}\n\nexport { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };\n"],"mappings":";;;;AAMA,SAAS,gBAAgB,EAAE,mBAAgB,GAAG,GAAG,KAAiE;AAChH,QAAO,oBAAC,iBAAiB,UAAA;EAAS,aAAU;EAAkC;EAAe,GAAI;GAAS;;AAG5G,SAAS,QAAQ,EAAE,GAAG,KAA6D;AACjF,QACE,oBAAC,iBAAA,EAAA,UACC,oBAAC,iBAAiB,MAAA;EAAK,aAAU;EAAU,GAAI;GAAS,EAAA,CACxC;;AAItB,SAAS,eAAe,EAAE,GAAG,KAAgE;AAC3F,QAAO,oBAAC,iBAAiB,SAAA;EAAQ,aAAU;EAAkB,GAAI;GAAS;;AAG5E,SAAS,eAAe,EACtB,cACA,gBAAa,GACb,aACA,GAAG,KACqD;AACxD,QACE,oBAAC,iBAAiB,QAAA,EAAA,UAChB,qBAAC,iBAAiB,SAAA;EAChB,aAAU;EACE;EACZ,WAAW,GACT,qaACA,EACD;EACD,GAAI;aAEH,GACD,oBAAC,iBAAiB,OAAA,EAAM,WAAU,sGAAA,CAAuG,CAAA;GAChH,EAAA,CACH"}
@@ -0,0 +1,15 @@
1
+ import { Tooltip } from './tooltip';
2
+ declare const meta: {
3
+ title: string;
4
+ tags: string[];
5
+ component: typeof Tooltip;
6
+ parameters: {
7
+ docs: {
8
+ description: {
9
+ component: string;
10
+ };
11
+ };
12
+ };
13
+ };
14
+ export default meta;
15
+ export declare function Demo(): import("react/jsx-runtime").JSX.Element;
File without changes