@incognia/cosmik 1.0.11 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Tabs/index.d.ts +5 -1
- package/dist/Tabs/index.d.ts.map +1 -1
- package/dist/cosmik.css +3 -1
- package/dist/index.cjs +1 -2
- package/dist/index.js +36 -179
- package/dist/index10.cjs +2 -2
- package/dist/index10.cjs.map +1 -1
- package/dist/index10.js +70 -193
- package/dist/index10.js.map +1 -1
- package/dist/index11.cjs +2 -2
- package/dist/index11.cjs.map +1 -1
- package/dist/index11.js +97 -139
- package/dist/index11.js.map +1 -1
- package/dist/index12.cjs +2 -2
- package/dist/index12.cjs.map +1 -1
- package/dist/index12.js +57 -229
- package/dist/index12.js.map +1 -1
- package/dist/index13.cjs +2 -2
- package/dist/index13.cjs.map +1 -1
- package/dist/index13.js +22 -119
- package/dist/index13.js.map +1 -1
- package/dist/index14.cjs +2 -2
- package/dist/index14.cjs.map +1 -1
- package/dist/index14.js +89 -25
- package/dist/index14.js.map +1 -1
- package/dist/index15.cjs +2 -2
- package/dist/index15.cjs.map +1 -1
- package/dist/index15.js +89 -26
- package/dist/index15.js.map +1 -1
- package/dist/index16.cjs +2 -2
- package/dist/index16.cjs.map +1 -1
- package/dist/index16.js +125 -23
- package/dist/index16.js.map +1 -1
- package/dist/index17.cjs +2 -2
- package/dist/index17.cjs.map +1 -1
- package/dist/index17.js +37 -60
- package/dist/index17.js.map +1 -1
- package/dist/index18.cjs +2 -2
- package/dist/index18.cjs.map +1 -1
- package/dist/index18.js +75 -22
- package/dist/index18.js.map +1 -1
- package/dist/index19.cjs +2 -2
- package/dist/index19.cjs.map +1 -1
- package/dist/index19.js +68 -108
- package/dist/index19.js.map +1 -1
- package/dist/index2.cjs +1 -0
- package/dist/index20.cjs +2 -2
- package/dist/index20.cjs.map +1 -1
- package/dist/index20.js +28 -45
- package/dist/index20.js.map +1 -1
- package/dist/index21.cjs +2 -2
- package/dist/index21.cjs.map +1 -1
- package/dist/index21.js +15 -31
- package/dist/index21.js.map +1 -1
- package/dist/index22.cjs +2 -2
- package/dist/index22.cjs.map +1 -1
- package/dist/index22.js +16 -46
- package/dist/index22.js.map +1 -1
- package/dist/index23.cjs +2 -2
- package/dist/index23.cjs.map +1 -1
- package/dist/index23.js +51 -186
- package/dist/index23.js.map +1 -1
- package/dist/index24.cjs +2 -2
- package/dist/index24.cjs.map +1 -1
- package/dist/index24.js +9 -28
- package/dist/index24.js.map +1 -1
- package/dist/index25.cjs +2 -2
- package/dist/index25.cjs.map +1 -1
- package/dist/index25.js +24 -132
- package/dist/index25.js.map +1 -1
- package/dist/index26.cjs +2 -2
- package/dist/index26.cjs.map +1 -1
- package/dist/index26.js +68 -17
- package/dist/index26.js.map +1 -1
- package/dist/index27.cjs +2 -2
- package/dist/index27.cjs.map +1 -1
- package/dist/index27.js +22 -36
- package/dist/index27.js.map +1 -1
- package/dist/index28.cjs +2 -2
- package/dist/index28.cjs.map +1 -1
- package/dist/index28.js +29 -33
- package/dist/index28.js.map +1 -1
- package/dist/index29.cjs +2 -2
- package/dist/index29.cjs.map +1 -1
- package/dist/index29.js +89 -127
- package/dist/index29.js.map +1 -1
- package/dist/index3.js +16 -85
- package/dist/index3.js.map +1 -1
- package/dist/index30.cjs +2 -2
- package/dist/index30.cjs.map +1 -1
- package/dist/index30.js +18 -65
- package/dist/index30.js.map +1 -1
- package/dist/index31.cjs +2 -2
- package/dist/index31.cjs.map +1 -1
- package/dist/index31.js +82 -87
- package/dist/index31.js.map +1 -1
- package/dist/index32.cjs +2 -2
- package/dist/index32.cjs.map +1 -1
- package/dist/index32.js +12 -23
- package/dist/index32.js.map +1 -1
- package/dist/index33.cjs +2 -2
- package/dist/index33.cjs.map +1 -1
- package/dist/index33.js +44 -94
- package/dist/index33.js.map +1 -1
- package/dist/index34.cjs +2 -2
- package/dist/index34.cjs.map +1 -1
- package/dist/index34.js +20 -72
- package/dist/index34.js.map +1 -1
- package/dist/index35.cjs +2 -2
- package/dist/index35.cjs.map +1 -1
- package/dist/index35.js +66 -62
- package/dist/index35.js.map +1 -1
- package/dist/index36.cjs +2 -2
- package/dist/index36.cjs.map +1 -1
- package/dist/index36.js +59 -161
- package/dist/index36.js.map +1 -1
- package/dist/index37.cjs +2 -2
- package/dist/index37.cjs.map +1 -1
- package/dist/index37.js +73 -6
- package/dist/index37.js.map +1 -1
- package/dist/index38.cjs +2 -2
- package/dist/index38.cjs.map +1 -1
- package/dist/index38.js +15 -36
- package/dist/index38.js.map +1 -1
- package/dist/index39.cjs +2 -2
- package/dist/index39.cjs.map +1 -1
- package/dist/index39.js +86 -15
- package/dist/index39.js.map +1 -1
- package/dist/index4.cjs +2 -2
- package/dist/index4.cjs.map +1 -1
- package/dist/index4.js +34 -159
- package/dist/index4.js.map +1 -1
- package/dist/index40.cjs +2 -2
- package/dist/index40.cjs.map +1 -1
- package/dist/index40.js +51 -119
- package/dist/index40.js.map +1 -1
- package/dist/index41.cjs +2 -2
- package/dist/index41.cjs.map +1 -1
- package/dist/index41.js +48 -16
- package/dist/index41.js.map +1 -1
- package/dist/index42.cjs +2 -2
- package/dist/index42.cjs.map +1 -1
- package/dist/index42.js +84 -11
- package/dist/index42.js.map +1 -1
- package/dist/index43.cjs +2 -2
- package/dist/index43.cjs.map +1 -1
- package/dist/index5.cjs +2 -2
- package/dist/index5.cjs.map +1 -1
- package/dist/index5.js +1586 -79
- package/dist/index5.js.map +1 -1
- package/dist/index6.cjs +2 -2
- package/dist/index6.cjs.map +1 -1
- package/dist/index6.js +15 -164
- package/dist/index6.js.map +1 -1
- package/dist/index7.cjs +2 -2
- package/dist/index7.cjs.map +1 -1
- package/dist/index7.js +60 -196
- package/dist/index7.js.map +1 -1
- package/dist/index8.cjs +2 -2
- package/dist/index8.cjs.map +1 -1
- package/dist/index8.js +156 -90
- package/dist/index8.js.map +1 -1
- package/dist/index9.cjs +2 -2
- package/dist/index9.cjs.map +1 -1
- package/dist/index9.js +92 -40
- package/dist/index9.js.map +1 -1
- package/package.json +22 -20
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/index3.cjs +0 -2
- package/dist/index3.cjs.map +0 -1
- package/dist/index43.js +0 -5
- package/dist/index43.js.map +0 -1
- package/dist/index44.cjs +0 -2
- package/dist/index44.cjs.map +0 -1
- package/dist/index44.js +0 -27
- package/dist/index44.js.map +0 -1
- package/dist/index45.cjs +0 -7
- package/dist/index45.cjs.map +0 -1
- package/dist/index45.js +0 -239
- package/dist/index45.js.map +0 -1
- package/dist/index46.cjs +0 -2
- package/dist/index46.cjs.map +0 -1
- package/dist/index46.js +0 -17
- package/dist/index46.js.map +0 -1
- package/dist/index47.cjs +0 -2
- package/dist/index47.cjs.map +0 -1
- package/dist/index47.js +0 -2732
- package/dist/index47.js.map +0 -1
- package/dist/index48.cjs +0 -2
- package/dist/index48.cjs.map +0 -1
- package/dist/index48.js +0 -5
- package/dist/index48.js.map +0 -1
- package/dist/index49.cjs +0 -2
- package/dist/index49.cjs.map +0 -1
- package/dist/index49.js +0 -5
- package/dist/index49.js.map +0 -1
- /package/dist/{cosmik-theme.css → src/cosmik-theme.css} +0 -0
package/dist/index35.js
CHANGED
|
@@ -1,66 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
defaultVariants: {
|
|
15
|
-
variant: "default"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
);
|
|
19
|
-
function m({
|
|
20
|
-
delayDuration: t = 0,
|
|
21
|
-
...r
|
|
22
|
-
}) {
|
|
23
|
-
return /* @__PURE__ */ o.jsx(
|
|
24
|
-
i.Provider,
|
|
25
|
-
{
|
|
26
|
-
"data-slot": "tooltip-provider",
|
|
27
|
-
delayDuration: t,
|
|
28
|
-
...r
|
|
29
|
-
}
|
|
30
|
-
);
|
|
1
|
+
import { cn as e } from "./index6.js";
|
|
2
|
+
import { LucideChevronDown as t, LucideChevronUp as n } from "lucide-react";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
|
+
//#region src/Table/index.tsx
|
|
6
|
+
function a({ className: t, ...n }) {
|
|
7
|
+
return /* @__PURE__ */ r("table", {
|
|
8
|
+
"data-slot": "table",
|
|
9
|
+
className: e("border-separate border-spacing-y-8 h-fit", t),
|
|
10
|
+
...n
|
|
11
|
+
});
|
|
31
12
|
}
|
|
32
|
-
function
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
13
|
+
function o({ className: t, ...n }) {
|
|
14
|
+
return /* @__PURE__ */ r("thead", {
|
|
15
|
+
"data-slot": "table-header",
|
|
16
|
+
className: e("bg-gray-200 text-left text-sm", t),
|
|
17
|
+
...n
|
|
18
|
+
});
|
|
36
19
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
20
|
+
function s({ className: t, hoverable: n, ...i }) {
|
|
21
|
+
return /* @__PURE__ */ r("tbody", {
|
|
22
|
+
"data-slot": "table-body",
|
|
23
|
+
className: e("bg-white h-full", { "[&_tr:hover]:bg-gray-100 cursor-pointer": n }, t),
|
|
24
|
+
...i
|
|
25
|
+
});
|
|
41
26
|
}
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}) {
|
|
49
|
-
return /* @__PURE__ */ o.jsx(i.Portal, { children: /* @__PURE__ */ o.jsx(
|
|
50
|
-
i.Content,
|
|
51
|
-
{
|
|
52
|
-
"data-slot": "tooltip-content",
|
|
53
|
-
sideOffset: e,
|
|
54
|
-
className: s(l({ variant: t, className: r })),
|
|
55
|
-
...n,
|
|
56
|
-
children: a
|
|
57
|
-
}
|
|
58
|
-
) });
|
|
27
|
+
function c({ className: t, ...n }) {
|
|
28
|
+
return /* @__PURE__ */ r("tfoot", {
|
|
29
|
+
"data-slot": "table-footer",
|
|
30
|
+
className: e("bg-gray-100", t),
|
|
31
|
+
...n
|
|
32
|
+
});
|
|
59
33
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
};
|
|
66
|
-
|
|
34
|
+
function l({ className: t, ...n }) {
|
|
35
|
+
return /* @__PURE__ */ r("tr", {
|
|
36
|
+
"data-slot": "table-row",
|
|
37
|
+
className: e("transition-colors data-[state=selected]:bg-gray-100", t),
|
|
38
|
+
...n
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function u({ className: a, children: o, sortDirection: s, ...c }) {
|
|
42
|
+
let l;
|
|
43
|
+
return s === "ASC" ? l = n : s === "DESC" && (l = t), /* @__PURE__ */ i("th", {
|
|
44
|
+
"data-slot": "table-head",
|
|
45
|
+
className: e("first:rounded-l first:pl-24", "last:rounded-r last:pr-24", "px-12 py-8 font-normal leading-14", "whitespace-nowrap", { "cursor-pointer": !!c?.onClick }, a),
|
|
46
|
+
...c,
|
|
47
|
+
children: [o, l && /* @__PURE__ */ r(l, {
|
|
48
|
+
size: 16,
|
|
49
|
+
className: "inline-block ml-4"
|
|
50
|
+
})]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function d({ className: t, ...n }) {
|
|
54
|
+
return /* @__PURE__ */ r("td", {
|
|
55
|
+
"data-slot": "table-cell",
|
|
56
|
+
className: e("first:rounded-l first:pl-24 first:border-l", "last:rounded-r last:pr-24 last:border-r", "border-gray-900/8 border-y px-12 h-[54px]", "whitespace-nowrap", t),
|
|
57
|
+
...n
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function f({ className: t, ...n }) {
|
|
61
|
+
return /* @__PURE__ */ r("caption", {
|
|
62
|
+
"data-slot": "table-caption",
|
|
63
|
+
className: e("mt-16 text-sm text-gray-700", t),
|
|
64
|
+
...n
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { a as Table, s as TableBody, f as TableCaption, d as TableCell, c as TableFooter, u as TableHead, o as TableHeader, l as TableRow };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=index35.js.map
|
package/dist/index35.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index35.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index35.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,kBAAC,SAAD;EACE,aAAU;EACV,WAAW,EAAG,4CAA4C,CAAS;EACnE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAAwC;CAC3E,OACE,kBAAC,SAAD;EACE,aAAU;EACV,WAAW,EAAG,iCAAiC,CAAS;EACxD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAU,EACjB,cACA,cACA,GAAG,KACuD;CAC1D,OACE,kBAAC,SAAD;EACE,aAAU;EACV,WAAW,EACT,mBACA,EACE,2CAA2C,EAC7C,GACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EAAE,cAAW,GAAG,KAAwC;CAC3E,OACE,kBAAC,SAAD;EACE,aAAU;EACV,WAAW,EAAG,eAAe,CAAS;EACtC,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAS,EAAE,cAAW,GAAG,KAAqC;CACrE,OACE,kBAAC,MAAD;EACE,aAAU;EACV,WAAW,EACT,uDACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAU,EACjB,cACA,aACA,kBACA,GAAG,KAC+D;CAClE,IAAI;CAOJ,OANI,MAAkB,QACpB,IAAW,IACF,MAAkB,WAC3B,IAAW,IAIX,kBAAC,MAAD;EACE,aAAU;EACV,WAAW,EACT,+BACA,6BACA,qCACA,qBACA,EACE,kBAAkB,CAAC,CAAC,GAAO,QAC7B,GACA,CACF;EACA,GAAI;YAZN,CAcG,GACA,KAAY,kBAAC,GAAD;GAAU,MAAM;GAAI,WAAU;EAAqB,CAAA,CAC9D;;AAER;AAEA,SAAS,EAAU,EAAE,cAAW,GAAG,KAAqC;CACtE,OACE,kBAAC,MAAD;EACE,aAAU;EACV,WAAW,EACT,8CACA,2CACA,6CACA,qBACA,CACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAa,EACpB,cACA,GAAG,KAC+B;CAClC,OACE,kBAAC,WAAD;EACE,aAAU;EACV,WAAW,EAAG,+BAA+B,CAAS;EACtD,GAAI;CACL,CAAA;AAEL"}
|
package/dist/index36.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=index36.cjs.map
|
|
1
|
+
const e=require("./index2.cjs"),t=require("./index7.cjs");let n=require("lucide-react"),r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");function a({className:e,...n}){return(0,i.jsx)(`table`,{"data-slot":`table`,className:t.cn(`border-separate border-spacing-y-8 h-fit`,e),...n})}function o({className:e,...n}){return(0,i.jsx)(`thead`,{"data-slot":`table-header`,className:t.cn(`bg-gray-200 text-left text-sm`,e),...n})}function s({className:e,hoverable:n,...r}){return(0,i.jsx)(`tbody`,{"data-slot":`table-body`,className:t.cn(`bg-white h-full`,{"[&_tr:hover]:bg-gray-100 cursor-pointer":n},e),...r})}function c({className:e,...n}){return(0,i.jsx)(`tfoot`,{"data-slot":`table-footer`,className:t.cn(`bg-gray-100`,e),...n})}function l({className:e,...n}){return(0,i.jsx)(`tr`,{"data-slot":`table-row`,className:t.cn(`transition-colors data-[state=selected]:bg-gray-100`,e),...n})}function u({className:e,children:r,sortDirection:a,...o}){let s;return a===`ASC`?s=n.LucideChevronUp:a===`DESC`&&(s=n.LucideChevronDown),(0,i.jsxs)(`th`,{"data-slot":`table-head`,className:t.cn(`first:rounded-l first:pl-24`,`last:rounded-r last:pr-24`,`px-12 py-8 font-normal leading-14`,`whitespace-nowrap`,{"cursor-pointer":!!o?.onClick},e),...o,children:[r,s&&(0,i.jsx)(s,{size:16,className:`inline-block ml-4`})]})}function d({className:e,...n}){return(0,i.jsx)(`td`,{"data-slot":`table-cell`,className:t.cn(`first:rounded-l first:pl-24 first:border-l`,`last:rounded-r last:pr-24 last:border-r`,`border-gray-900/8 border-y px-12 h-[54px]`,`whitespace-nowrap`,e),...n})}function f({className:e,...n}){return(0,i.jsx)(`caption`,{"data-slot":`table-caption`,className:t.cn(`mt-16 text-sm text-gray-700`,e),...n})}exports.Table=a,exports.TableBody=s,exports.TableCaption=f,exports.TableCell=d,exports.TableFooter=c,exports.TableHead=u,exports.TableHeader=o,exports.TableRow=l;
|
|
2
|
+
//# sourceMappingURL=index36.cjs.map
|
package/dist/index36.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index36.cjs","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index36.cjs","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":"+JAIA,SAAS,EAAM,CAAE,YAAW,GAAG,GAAwC,CACrE,OACE,EAAA,EAAA,KAAC,QAAD,CACE,YAAU,QACV,UAAW,EAAA,GAAG,2CAA4C,CAAS,EACnE,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAY,CAAE,YAAW,GAAG,GAAwC,CAC3E,OACE,EAAA,EAAA,KAAC,QAAD,CACE,YAAU,eACV,UAAW,EAAA,GAAG,gCAAiC,CAAS,EACxD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAU,CACjB,YACA,YACA,GAAG,GACuD,CAC1D,OACE,EAAA,EAAA,KAAC,QAAD,CACE,YAAU,aACV,UAAW,EAAA,GACT,kBACA,CACE,0CAA2C,CAC7C,EACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAY,CAAE,YAAW,GAAG,GAAwC,CAC3E,OACE,EAAA,EAAA,KAAC,QAAD,CACE,YAAU,eACV,UAAW,EAAA,GAAG,cAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAS,CAAE,YAAW,GAAG,GAAqC,CACrE,OACE,EAAA,EAAA,KAAC,KAAD,CACE,YAAU,YACV,UAAW,EAAA,GACT,sDACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAU,CACjB,YACA,WACA,gBACA,GAAG,GAC+D,CAClE,IAAI,EAOJ,OANI,IAAkB,MACpB,EAAW,EAAA,gBACF,IAAkB,SAC3B,EAAW,EAAA,oBAIX,EAAA,EAAA,MAAC,KAAD,CACE,YAAU,aACV,UAAW,EAAA,GACT,8BACA,4BACA,oCACA,oBACA,CACE,iBAAkB,CAAC,CAAC,GAAO,OAC7B,EACA,CACF,EACA,GAAI,WAZN,CAcG,EACA,IAAY,EAAA,EAAA,KAAC,EAAD,CAAU,KAAM,GAAI,UAAU,mBAAqB,CAAA,CAC9D,GAER,CAEA,SAAS,EAAU,CAAE,YAAW,GAAG,GAAqC,CACtE,OACE,EAAA,EAAA,KAAC,KAAD,CACE,YAAU,aACV,UAAW,EAAA,GACT,6CACA,0CACA,4CACA,oBACA,CACF,EACA,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAa,CACpB,YACA,GAAG,GAC+B,CAClC,OACE,EAAA,EAAA,KAAC,UAAD,CACE,YAAU,gBACV,UAAW,EAAA,GAAG,8BAA+B,CAAS,EACtD,GAAI,CACL,CAAA,CAEL"}
|
package/dist/index36.js
CHANGED
|
@@ -1,161 +1,59 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
function
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
function N({
|
|
62
|
-
className: t,
|
|
63
|
-
...e
|
|
64
|
-
}) {
|
|
65
|
-
return /* @__PURE__ */ i.jsx(
|
|
66
|
-
n.Item,
|
|
67
|
-
{
|
|
68
|
-
"data-slot": "navigation-menu-item",
|
|
69
|
-
className: r("w-full", t),
|
|
70
|
-
...e
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
function j({
|
|
75
|
-
className: t,
|
|
76
|
-
...e
|
|
77
|
-
}) {
|
|
78
|
-
return /* @__PURE__ */ i.jsx(
|
|
79
|
-
n.Link,
|
|
80
|
-
{
|
|
81
|
-
"data-slot": "navigation-menu-link",
|
|
82
|
-
className: r(
|
|
83
|
-
"flex items-center justify-start pl-16 pr-8 py-[10px] min-h-40 w-full font-normal text-gray-800 rounded transition-colors duration-150",
|
|
84
|
-
"active:bg-gray-300",
|
|
85
|
-
"hover:bg-gray-200 hover:text-purple-800",
|
|
86
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-2",
|
|
87
|
-
"data-[active]:bg-purple-700 data-[active]:text-white",
|
|
88
|
-
"hover:data-[active]:bg-purple-800",
|
|
89
|
-
t
|
|
90
|
-
),
|
|
91
|
-
...e
|
|
92
|
-
}
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
function h({
|
|
96
|
-
className: t,
|
|
97
|
-
...e
|
|
98
|
-
}) {
|
|
99
|
-
return /* @__PURE__ */ i.jsx(l.Root, { className: r("w-full", t), ...e });
|
|
100
|
-
}
|
|
101
|
-
function y({
|
|
102
|
-
className: t,
|
|
103
|
-
children: e,
|
|
104
|
-
chevron: a = !0,
|
|
105
|
-
ref: o,
|
|
106
|
-
...s
|
|
107
|
-
}) {
|
|
108
|
-
return /* @__PURE__ */ i.jsx(
|
|
109
|
-
l.Trigger,
|
|
110
|
-
{
|
|
111
|
-
ref: o,
|
|
112
|
-
className: r(
|
|
113
|
-
"group/subtrigger flex items-center justify-start pl-16 pr-8 py-[10px] min-h-40 w-full font-normal text-gray-800 rounded transition-colors",
|
|
114
|
-
"hover:bg-gray-200 hover:text-purple-800",
|
|
115
|
-
"active:bg-gray-300",
|
|
116
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-purple-500 focus-visible:ring-offset-2",
|
|
117
|
-
t
|
|
118
|
-
),
|
|
119
|
-
...s,
|
|
120
|
-
children: /* @__PURE__ */ i.jsxs("span", { className: "flex w-full items-center justify-between", children: [
|
|
121
|
-
/* @__PURE__ */ i.jsx("span", { className: "flex items-center gap-x-8", children: e }),
|
|
122
|
-
a ? /* @__PURE__ */ i.jsx(
|
|
123
|
-
u,
|
|
124
|
-
{
|
|
125
|
-
"aria-hidden": "true",
|
|
126
|
-
className: "h-16 w-16 shrink-0 text-gray-600 group-hover:text-gray-700 transition-transform duration-200 group-data-[state=open]/subtrigger:rotate-90"
|
|
127
|
-
}
|
|
128
|
-
) : null
|
|
129
|
-
] })
|
|
130
|
-
}
|
|
131
|
-
);
|
|
132
|
-
}
|
|
133
|
-
function M({
|
|
134
|
-
className: t,
|
|
135
|
-
indentClassName: e = "ml-24 px-8 py-2 border-l border-gray-900/8",
|
|
136
|
-
children: a,
|
|
137
|
-
ref: o,
|
|
138
|
-
...s
|
|
139
|
-
}) {
|
|
140
|
-
return /* @__PURE__ */ i.jsx(
|
|
141
|
-
l.Content,
|
|
142
|
-
{
|
|
143
|
-
ref: o,
|
|
144
|
-
className: r("overflow-hidden", t),
|
|
145
|
-
...s,
|
|
146
|
-
children: /* @__PURE__ */ i.jsx("div", { className: e, children: a })
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
}
|
|
150
|
-
export {
|
|
151
|
-
v as VerticalNavigationMenu,
|
|
152
|
-
d as VerticalNavigationMenuHeading,
|
|
153
|
-
N as VerticalNavigationMenuItem,
|
|
154
|
-
j as VerticalNavigationMenuLink,
|
|
155
|
-
x as VerticalNavigationMenuList,
|
|
156
|
-
b as VerticalNavigationMenuSeparator,
|
|
157
|
-
h as VerticalNavigationMenuSub,
|
|
158
|
-
M as VerticalNavigationMenuSubContent,
|
|
159
|
-
y as VerticalNavigationMenuSubTrigger
|
|
160
|
-
};
|
|
161
|
-
//# sourceMappingURL=index36.js.map
|
|
1
|
+
"use client";
|
|
2
|
+
import { cva as e } from "./index4.js";
|
|
3
|
+
import { cn as t } from "./index6.js";
|
|
4
|
+
import * as n from "react";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
import * as i from "@radix-ui/react-tabs";
|
|
7
|
+
//#region src/Tabs/index.tsx
|
|
8
|
+
var a = e("inline-flex items-center text-base font-normal text-gray-600 [&_svg]:text-gray-600 [&_i]:text-gray-600", {
|
|
9
|
+
variants: { variant: {
|
|
10
|
+
default: "h-48 p-8 gap-8 justify-center rounded-[12px] bg-gray-200",
|
|
11
|
+
subtle: "h-[36px] w-full justify-start rounded-none border-b border-gray-900/16 bg-transparent p-0 gap-0"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { variant: "default" }
|
|
14
|
+
}), o = e("inline-flex items-center justify-center whitespace-nowrap transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-64", {
|
|
15
|
+
variants: { variant: {
|
|
16
|
+
default: t("h-32 rounded px-[12px] py-[6px]", "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]"),
|
|
17
|
+
subtle: t("relative h-[36px] rounded-none shadow-none data-[state=active]:z-10 data-[state=active]:shadow-none font-medium", "px-12 py-0", "border-b-2 border-transparent data-[state=active]:-mb-px data-[state=active]:border-purple-700", "text-gray-700 hover:text-purple-700 data-[state=active]:text-purple-700 hover:data-[state=active]:text-purple-700", "bg-transparent hover:bg-transparent data-[state=active]:bg-transparent hover:data-[state=active]:bg-transparent")
|
|
18
|
+
} },
|
|
19
|
+
defaultVariants: { variant: "default" }
|
|
20
|
+
}), s = n.createContext({ variant: "default" });
|
|
21
|
+
function c({ className: e, variant: t = "default", ...n }) {
|
|
22
|
+
let a = t ?? "default";
|
|
23
|
+
return /* @__PURE__ */ r(s.Provider, {
|
|
24
|
+
value: { variant: a },
|
|
25
|
+
children: /* @__PURE__ */ r(i.Root, {
|
|
26
|
+
"data-slot": "tabs",
|
|
27
|
+
"data-variant": a,
|
|
28
|
+
className: e,
|
|
29
|
+
...n
|
|
30
|
+
})
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function l({ className: e, ...o }) {
|
|
34
|
+
let { variant: c } = n.useContext(s);
|
|
35
|
+
return /* @__PURE__ */ r(i.List, {
|
|
36
|
+
"data-slot": "tabs-list",
|
|
37
|
+
className: t(a({ variant: c }), e),
|
|
38
|
+
...o
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function u({ className: e, ...a }) {
|
|
42
|
+
let { variant: c } = n.useContext(s);
|
|
43
|
+
return /* @__PURE__ */ r(i.Trigger, {
|
|
44
|
+
"data-slot": "tabs-trigger",
|
|
45
|
+
className: t(o({ variant: c }), e),
|
|
46
|
+
...a
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function d({ className: e, ...n }) {
|
|
50
|
+
return /* @__PURE__ */ r(i.Content, {
|
|
51
|
+
"data-slot": "tabs-content",
|
|
52
|
+
className: t("flex-1 outline-none", e),
|
|
53
|
+
...n
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { c as Tabs, d as TabsContent, l as TabsList, u as TabsTrigger };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=index36.js.map
|
package/dist/index36.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index36.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index36.js","names":[],"sources":["../src/Tabs/index.tsx"],"sourcesContent":["'use client'\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst tabsListVariants = cva(\n 'inline-flex items-center text-base font-normal text-gray-600 [&_svg]:text-gray-600 [&_i]:text-gray-600',\n {\n variants: {\n variant: {\n default: 'h-48 p-8 gap-8 justify-center rounded-[12px] bg-gray-200',\n subtle:\n 'h-[36px] w-full justify-start rounded-none border-b border-gray-900/16 bg-transparent p-0 gap-0'\n }\n },\n defaultVariants: {\n variant: 'default'\n }\n }\n)\n\nconst tabsTriggerVariants = cva(\n 'inline-flex items-center justify-center whitespace-nowrap transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-64',\n {\n variants: {\n variant: {\n default: cn(\n 'h-32 rounded px-[12px] py-[6px]',\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 ),\n subtle: cn(\n 'relative h-[36px] rounded-none shadow-none data-[state=active]:z-10 data-[state=active]:shadow-none font-medium',\n 'px-12 py-0',\n 'border-b-2 border-transparent data-[state=active]:-mb-px data-[state=active]:border-purple-700',\n 'text-gray-700 hover:text-purple-700 data-[state=active]:text-purple-700 hover:data-[state=active]:text-purple-700',\n 'bg-transparent hover:bg-transparent data-[state=active]:bg-transparent hover:data-[state=active]:bg-transparent'\n )\n }\n },\n defaultVariants: {\n variant: 'default'\n }\n }\n)\n\ntype TabsVariant = NonNullable<VariantProps<typeof tabsListVariants>['variant']>\n\nconst TabsContext = React.createContext<{ variant: TabsVariant }>({\n variant: 'default'\n})\n\nfunction Tabs({\n className,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root> &\n VariantProps<typeof tabsListVariants>) {\n const resolvedVariant = variant ?? 'default'\n\n return (\n <TabsContext.Provider value={{ variant: resolvedVariant }}>\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-variant={resolvedVariant}\n className={className}\n {...props}\n />\n </TabsContext.Provider>\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n const { variant } = React.useContext(TabsContext)\n\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n const { variant } = React.useContext(TabsContext)\n\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(tabsTriggerVariants({ variant }), className)}\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":";;;;;;;AAOA,IAAM,IAAmB,EACvB,0GACA;CACE,UAAU,EACR,SAAS;EACP,SAAS;EACT,QACE;CACJ,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF,GAEM,IAAsB,EAC1B,wJACA;CACE,UAAU,EACR,SAAS;EACP,SAAS,EACP,mCACA,6CACA,iJACA,yFACA,qCACF;EACA,QAAQ,EACN,mHACA,cACA,kGACA,qHACA,iHACF;CACF,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF,GAIM,IAAc,EAAM,cAAwC,EAChE,SAAS,UACX,CAAC;AAED,SAAS,EAAK,EACZ,cACA,aAAU,WACV,GAAG,KAEoC;CACvC,IAAM,IAAkB,KAAW;CAEnC,OACE,kBAAC,EAAY,UAAb;EAAsB,OAAO,EAAE,SAAS,EAAgB;YACtD,kBAAC,EAAc,MAAf;GACE,aAAU;GACV,gBAAc;GACH;GACX,GAAI;EACL,CAAA;CACmB,CAAA;AAE1B;AAEA,SAAS,EAAS,EAChB,cACA,GAAG,KAC+C;CAClD,IAAM,EAAE,eAAY,EAAM,WAAW,CAAW;CAEhD,OACE,kBAAC,EAAc,MAAf;EACE,aAAU;EACV,WAAW,EAAG,EAAiB,EAAE,WAAQ,CAAC,GAAG,CAAS;EACtD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EACnB,cACA,GAAG,KACkD;CACrD,IAAM,EAAE,eAAY,EAAM,WAAW,CAAW;CAEhD,OACE,kBAAC,EAAc,SAAf;EACE,aAAU;EACV,WAAW,EAAG,EAAoB,EAAE,WAAQ,CAAC,GAAG,CAAS;EACzD,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,EAAY,EACnB,cACA,GAAG,KACkD;CACrD,OACE,kBAAC,EAAc,SAAf;EACE,aAAU;EACV,WAAW,EAAG,uBAAuB,CAAS;EAC9C,GAAI;CACL,CAAA;AAEL"}
|
package/dist/index37.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use
|
|
2
|
-
//# sourceMappingURL=index37.cjs.map
|
|
1
|
+
"use client";const e=require("./index2.cjs"),t=require("./index5.cjs"),n=require("./index7.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime"),a=require("@radix-ui/react-tabs");a=e.__toESM(a,1);var o=t.cva(`inline-flex items-center text-base font-normal text-gray-600 [&_svg]:text-gray-600 [&_i]:text-gray-600`,{variants:{variant:{default:`h-48 p-8 gap-8 justify-center rounded-[12px] bg-gray-200`,subtle:`h-[36px] w-full justify-start rounded-none border-b border-gray-900/16 bg-transparent p-0 gap-0`}},defaultVariants:{variant:`default`}}),s=t.cva(`inline-flex items-center justify-center whitespace-nowrap transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-64`,{variants:{variant:{default:n.cn(`h-32 rounded px-[12px] py-[6px]`,`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]`),subtle:n.cn(`relative h-[36px] rounded-none shadow-none data-[state=active]:z-10 data-[state=active]:shadow-none font-medium`,`px-12 py-0`,`border-b-2 border-transparent data-[state=active]:-mb-px data-[state=active]:border-purple-700`,`text-gray-700 hover:text-purple-700 data-[state=active]:text-purple-700 hover:data-[state=active]:text-purple-700`,`bg-transparent hover:bg-transparent data-[state=active]:bg-transparent hover:data-[state=active]:bg-transparent`)}},defaultVariants:{variant:`default`}}),c=r.createContext({variant:`default`});function l({className:e,variant:t=`default`,...n}){let r=t??`default`;return(0,i.jsx)(c.Provider,{value:{variant:r},children:(0,i.jsx)(a.Root,{"data-slot":`tabs`,"data-variant":r,className:e,...n})})}function u({className:e,...t}){let{variant:s}=r.useContext(c);return(0,i.jsx)(a.List,{"data-slot":`tabs-list`,className:n.cn(o({variant:s}),e),...t})}function d({className:e,...t}){let{variant:o}=r.useContext(c);return(0,i.jsx)(a.Trigger,{"data-slot":`tabs-trigger`,className:n.cn(s({variant:o}),e),...t})}function f({className:e,...t}){return(0,i.jsx)(a.Content,{"data-slot":`tabs-content`,className:n.cn(`flex-1 outline-none`,e),...t})}exports.Tabs=l,exports.TabsContent=f,exports.TabsList=u,exports.TabsTrigger=d;
|
|
2
|
+
//# sourceMappingURL=index37.cjs.map
|
package/dist/index37.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index37.cjs","sources":[],"sourcesContent":[],"
|
|
1
|
+
{"version":3,"file":"index37.cjs","names":[],"sources":["../src/Tabs/index.tsx"],"sourcesContent":["'use client'\n\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../lib/utils'\n\nconst tabsListVariants = cva(\n 'inline-flex items-center text-base font-normal text-gray-600 [&_svg]:text-gray-600 [&_i]:text-gray-600',\n {\n variants: {\n variant: {\n default: 'h-48 p-8 gap-8 justify-center rounded-[12px] bg-gray-200',\n subtle:\n 'h-[36px] w-full justify-start rounded-none border-b border-gray-900/16 bg-transparent p-0 gap-0'\n }\n },\n defaultVariants: {\n variant: 'default'\n }\n }\n)\n\nconst tabsTriggerVariants = cva(\n 'inline-flex items-center justify-center whitespace-nowrap transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-64',\n {\n variants: {\n variant: {\n default: cn(\n 'h-32 rounded px-[12px] py-[6px]',\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 ),\n subtle: cn(\n 'relative h-[36px] rounded-none shadow-none data-[state=active]:z-10 data-[state=active]:shadow-none font-medium',\n 'px-12 py-0',\n 'border-b-2 border-transparent data-[state=active]:-mb-px data-[state=active]:border-purple-700',\n 'text-gray-700 hover:text-purple-700 data-[state=active]:text-purple-700 hover:data-[state=active]:text-purple-700',\n 'bg-transparent hover:bg-transparent data-[state=active]:bg-transparent hover:data-[state=active]:bg-transparent'\n )\n }\n },\n defaultVariants: {\n variant: 'default'\n }\n }\n)\n\ntype TabsVariant = NonNullable<VariantProps<typeof tabsListVariants>['variant']>\n\nconst TabsContext = React.createContext<{ variant: TabsVariant }>({\n variant: 'default'\n})\n\nfunction Tabs({\n className,\n variant = 'default',\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Root> &\n VariantProps<typeof tabsListVariants>) {\n const resolvedVariant = variant ?? 'default'\n\n return (\n <TabsContext.Provider value={{ variant: resolvedVariant }}>\n <TabsPrimitive.Root\n data-slot=\"tabs\"\n data-variant={resolvedVariant}\n className={className}\n {...props}\n />\n </TabsContext.Provider>\n )\n}\n\nfunction TabsList({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.List>) {\n const { variant } = React.useContext(TabsContext)\n\n return (\n <TabsPrimitive.List\n data-slot=\"tabs-list\"\n className={cn(tabsListVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction TabsTrigger({\n className,\n ...props\n}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {\n const { variant } = React.useContext(TabsContext)\n\n return (\n <TabsPrimitive.Trigger\n data-slot=\"tabs-trigger\"\n className={cn(tabsTriggerVariants({ variant }), className)}\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":"+NAOA,IAAM,EAAmB,EAAA,IACvB,yGACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,2DACT,OACE,iGACJ,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CACF,EAEM,EAAsB,EAAA,IAC1B,uJACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,EAAA,GACP,kCACA,4CACA,gJACA,wFACA,qCACF,EACA,OAAQ,EAAA,GACN,kHACA,aACA,iGACA,oHACA,iHACF,CACF,CACF,EACA,gBAAiB,CACf,QAAS,SACX,CACF,CACF,EAIM,EAAc,EAAM,cAAwC,CAChE,QAAS,SACX,CAAC,EAED,SAAS,EAAK,CACZ,YACA,UAAU,UACV,GAAG,GAEoC,CACvC,IAAM,EAAkB,GAAW,UAEnC,OACE,EAAA,EAAA,KAAC,EAAY,SAAb,CAAsB,MAAO,CAAE,QAAS,CAAgB,YACtD,EAAA,EAAA,KAAC,EAAc,KAAf,CACE,YAAU,OACV,eAAc,EACH,YACX,GAAI,CACL,CAAA,CACmB,CAAA,CAE1B,CAEA,SAAS,EAAS,CAChB,YACA,GAAG,GAC+C,CAClD,GAAM,CAAE,WAAY,EAAM,WAAW,CAAW,EAEhD,OACE,EAAA,EAAA,KAAC,EAAc,KAAf,CACE,YAAU,YACV,UAAW,EAAA,GAAG,EAAiB,CAAE,SAAQ,CAAC,EAAG,CAAS,EACtD,GAAI,CACL,CAAA,CAEL,CAEA,SAAS,EAAY,CACnB,YACA,GAAG,GACkD,CACrD,GAAM,CAAE,WAAY,EAAM,WAAW,CAAW,EAEhD,OACE,EAAA,EAAA,KAAC,EAAc,QAAf,CACE,YAAU,eACV,UAAW,EAAA,GAAG,EAAoB,CAAE,SAAQ,CAAC,EAAG,CAAS,EACzD,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/index37.js
CHANGED
|
@@ -1,6 +1,73 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { cn as e } from "./index6.js";
|
|
2
|
+
import { Button as t } from "./index8.js";
|
|
3
|
+
import { Badge as n } from "./index10.js";
|
|
4
|
+
import { LucideX as r } from "lucide-react";
|
|
5
|
+
import * as i from "react";
|
|
6
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
//#region src/TagInput/index.tsx
|
|
8
|
+
function c({ className: t, value: n, placeholder: r, onValueChange: a, ...c }) {
|
|
9
|
+
let [u, d] = i.useState(""), f = i.useRef(null);
|
|
10
|
+
function p(e) {
|
|
11
|
+
let t = e.target.value;
|
|
12
|
+
if (t.includes(",")) {
|
|
13
|
+
let e = t.split(","), r = Array.from(new Set(e));
|
|
14
|
+
a([...n || [], ...r.filter((e) => !!e && !n?.includes(e)).map((e) => e.trim()) || []]), d("");
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
d(t);
|
|
18
|
+
}
|
|
19
|
+
function m(e) {
|
|
20
|
+
["Enter", "Tab"].includes(e.key) && u?.trim() && (e.preventDefault(), n?.includes(u) || h(), d("")), e.key === "Backspace" && !u && a(n?.slice(0, -1) || []);
|
|
21
|
+
}
|
|
22
|
+
function h() {
|
|
23
|
+
u.trim() && (a([...n || [], u]), d(""));
|
|
24
|
+
}
|
|
25
|
+
return /* @__PURE__ */ s("div", {
|
|
26
|
+
className: e("flex flex-wrap items-center gap-8 min-h-[36px]", "border rounded border-gray-900/24 bg-white px-12 py-4", "hover:cursor-text", "hover:shadow-field-hover", "active:shadow-field-active", "focus-visible:outline-none focus:shadow-field-active", t),
|
|
27
|
+
onClick: () => f.current?.focus(),
|
|
28
|
+
...c,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ o(l, {
|
|
31
|
+
value: n,
|
|
32
|
+
onValueChange: a
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ o("input", {
|
|
35
|
+
ref: f,
|
|
36
|
+
className: "h-[26px] outline-none text-sm",
|
|
37
|
+
type: "text",
|
|
38
|
+
value: u,
|
|
39
|
+
onChange: p,
|
|
40
|
+
onKeyDown: m,
|
|
41
|
+
style: { width: `${u.length + 1}ch` },
|
|
42
|
+
onBlur: () => h()
|
|
43
|
+
}),
|
|
44
|
+
n?.length === 0 && !u && /* @__PURE__ */ o("div", {
|
|
45
|
+
className: "text-gray-400 ml-[-2ch]",
|
|
46
|
+
children: r
|
|
47
|
+
})
|
|
48
|
+
]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
c.displayName = "TagInput";
|
|
52
|
+
function l({ value: e, onValueChange: i }) {
|
|
53
|
+
return /* @__PURE__ */ o(a, { children: e?.map((a, c) => /* @__PURE__ */ s(n, {
|
|
54
|
+
className: "px-0 pr-8 pl-0 gap-x-4 overflow-hidden",
|
|
55
|
+
children: [/* @__PURE__ */ o(t, {
|
|
56
|
+
type: "button",
|
|
57
|
+
className: "w-[26px] h-[26px] shrink-0",
|
|
58
|
+
size: "icon",
|
|
59
|
+
intent: "secondary",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
i(e?.filter((e, t) => t !== c) || []);
|
|
62
|
+
},
|
|
63
|
+
children: /* @__PURE__ */ o(r, { className: "w-16" })
|
|
64
|
+
}), /* @__PURE__ */ o("div", {
|
|
65
|
+
className: "truncate",
|
|
66
|
+
children: a
|
|
67
|
+
})]
|
|
68
|
+
}, c)) });
|
|
69
|
+
}
|
|
70
|
+
//#endregion
|
|
71
|
+
export { c as TagInput };
|
|
72
|
+
|
|
73
|
+
//# sourceMappingURL=index37.js.map
|