shadcn-ui-react 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/bin/shadcn-ui-react.mjs +99 -0
- package/dist/index.cjs +75 -39
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +75 -39
- package/dist/style.css +9 -12
- package/package.json +7 -2
- package/templates/vscode-settings.json +11 -0
package/README.md
CHANGED
|
@@ -18,6 +18,16 @@ pnpm add shadcn-ui-react
|
|
|
18
18
|
|
|
19
19
|
---
|
|
20
20
|
|
|
21
|
+
### Tailwind IntelliSense (VS Code)
|
|
22
|
+
|
|
23
|
+
To enable Tailwind CSS IntelliSense to detect classes within `cn(...)` and other utilities:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx shadcn-ui-react init-vscode
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
21
31
|
## 🚀 Getting Started
|
|
22
32
|
|
|
23
33
|
### 1. Import Global Styles
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
|
|
9
|
+
const cmd = process.argv[2];
|
|
10
|
+
|
|
11
|
+
const uniq = (arr) => {
|
|
12
|
+
const seen = new Set();
|
|
13
|
+
const out = [];
|
|
14
|
+
for (const item of arr) {
|
|
15
|
+
const key = JSON.stringify(item);
|
|
16
|
+
if (seen.has(key)) continue;
|
|
17
|
+
seen.add(key);
|
|
18
|
+
out.push(item);
|
|
19
|
+
}
|
|
20
|
+
return out;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
function ensureDir(dir) {
|
|
24
|
+
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function readJson(p) {
|
|
28
|
+
if (!fs.existsSync(p)) return null;
|
|
29
|
+
try {
|
|
30
|
+
return JSON.parse(fs.readFileSync(p, "utf8"));
|
|
31
|
+
} catch (e) {
|
|
32
|
+
console.error(`❌ No pude leer JSON: ${p}`);
|
|
33
|
+
console.error(e?.message ?? e);
|
|
34
|
+
process.exit(1);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function writeJson(p, obj) {
|
|
39
|
+
fs.writeFileSync(p, JSON.stringify(obj, null, 2) + "\n", "utf8");
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function initVscode() {
|
|
43
|
+
const tplPath = path.join(__dirname, "..", "templates", "vscode-settings.json");
|
|
44
|
+
const tpl = readJson(tplPath) ?? {};
|
|
45
|
+
|
|
46
|
+
const vscodeDir = path.join(process.cwd(), ".vscode");
|
|
47
|
+
const settingsPath = path.join(vscodeDir, "settings.json");
|
|
48
|
+
|
|
49
|
+
ensureDir(vscodeDir);
|
|
50
|
+
|
|
51
|
+
const current = readJson(settingsPath) ?? {};
|
|
52
|
+
const next = { ...current };
|
|
53
|
+
|
|
54
|
+
// classRegex (merge + dedupe)
|
|
55
|
+
const curRegex = current["tailwindCSS.experimental.classRegex"] ?? [];
|
|
56
|
+
const tplRegex = tpl["tailwindCSS.experimental.classRegex"] ?? [];
|
|
57
|
+
next["tailwindCSS.experimental.classRegex"] = uniq([
|
|
58
|
+
...(Array.isArray(curRegex) ? curRegex : []),
|
|
59
|
+
...(Array.isArray(tplRegex) ? tplRegex : [])
|
|
60
|
+
]);
|
|
61
|
+
|
|
62
|
+
// includeLanguages (merge)
|
|
63
|
+
const curLang = current["tailwindCSS.includeLanguages"] ?? {};
|
|
64
|
+
const tplLang = tpl["tailwindCSS.includeLanguages"] ?? {};
|
|
65
|
+
next["tailwindCSS.includeLanguages"] = { ...(curLang || {}), ...(tplLang || {}) };
|
|
66
|
+
|
|
67
|
+
writeJson(settingsPath, next);
|
|
68
|
+
console.log("✅ Listo: actualizado .vscode/settings.json (Tailwind IntelliSense).");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function initExtensions() {
|
|
72
|
+
const vscodeDir = path.join(process.cwd(), ".vscode");
|
|
73
|
+
const extPath = path.join(vscodeDir, "extensions.json");
|
|
74
|
+
ensureDir(vscodeDir);
|
|
75
|
+
|
|
76
|
+
const current = readJson(extPath) ?? {};
|
|
77
|
+
const recs = Array.isArray(current.recommendations) ? current.recommendations : [];
|
|
78
|
+
const add = "bradlc.vscode-tailwindcss";
|
|
79
|
+
|
|
80
|
+
const next = {
|
|
81
|
+
...current,
|
|
82
|
+
recommendations: Array.from(new Set([...recs, add]))
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
writeJson(extPath, next);
|
|
86
|
+
console.log("✅ Listo: actualizado .vscode/extensions.json (recomendación Tailwind CSS).");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
switch (cmd) {
|
|
90
|
+
case "init-vscode":
|
|
91
|
+
initVscode();
|
|
92
|
+
initExtensions();
|
|
93
|
+
break;
|
|
94
|
+
default:
|
|
95
|
+
console.log(`Uso:
|
|
96
|
+
npx shadcn-ui-react init-vscode
|
|
97
|
+
`);
|
|
98
|
+
process.exit(cmd ? 1 : 0);
|
|
99
|
+
}
|
package/dist/index.cjs
CHANGED
|
@@ -8392,23 +8392,12 @@ function Breadcrumbs({ items, className, classNameList }) {
|
|
|
8392
8392
|
}
|
|
8393
8393
|
|
|
8394
8394
|
// src/shared/data-table.tsx
|
|
8395
|
-
var import_react36 =
|
|
8395
|
+
var import_react36 = require("react");
|
|
8396
8396
|
var import_framer_motion2 = require("framer-motion");
|
|
8397
8397
|
var import_react_icons18 = require("@radix-ui/react-icons");
|
|
8398
8398
|
var import_react_table = require("@tanstack/react-table");
|
|
8399
8399
|
var import_lucide_react6 = require("lucide-react");
|
|
8400
8400
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
8401
|
-
var TablePlain = import_react36.default.forwardRef((_a, ref) => {
|
|
8402
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8403
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8404
|
-
"table",
|
|
8405
|
-
__spreadValues({
|
|
8406
|
-
ref,
|
|
8407
|
-
className: cn("w-full caption-bottom text-sm", className)
|
|
8408
|
-
}, props)
|
|
8409
|
-
);
|
|
8410
|
-
});
|
|
8411
|
-
TablePlain.displayName = "TablePlain";
|
|
8412
8401
|
var ACCENT_COLOR = {
|
|
8413
8402
|
primary: "var(--primary)",
|
|
8414
8403
|
emerald: "#10b981",
|
|
@@ -8428,9 +8417,9 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8428
8417
|
neo: {
|
|
8429
8418
|
root: cn(
|
|
8430
8419
|
"relative w-full overflow-hidden rounded-2xl border shadow-sm",
|
|
8431
|
-
"bg-background/70 supports-
|
|
8420
|
+
"bg-background/70 supports-backdrop-filter:bg-background/45 backdrop-blur",
|
|
8432
8421
|
"flex flex-col",
|
|
8433
|
-
"before:absolute before:inset-x-0 before:top-0 before:h-
|
|
8422
|
+
"before:absolute before:inset-x-0 before:top-0 before:h-0.5 before:bg-transparent",
|
|
8434
8423
|
"data-[accent=on]:before:bg-[color:var(--dt-accent)]"
|
|
8435
8424
|
),
|
|
8436
8425
|
table: cn("w-full text-sm"),
|
|
@@ -8459,14 +8448,14 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8459
8448
|
td: "px-4 py-3 align-middle",
|
|
8460
8449
|
footer: cn(
|
|
8461
8450
|
"border-t",
|
|
8462
|
-
"bg-background/80 supports-
|
|
8451
|
+
"bg-background/80 supports-backdrop-filter:bg-background/55 backdrop-blur"
|
|
8463
8452
|
),
|
|
8464
8453
|
footerInner: "px-4 py-3",
|
|
8465
8454
|
metaWrap: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground",
|
|
8466
8455
|
controlsWrap: "flex flex-wrap items-center justify-between gap-3 sm:justify-end",
|
|
8467
8456
|
pageSizeLabel: "text-sm font-medium whitespace-nowrap",
|
|
8468
8457
|
pageSizeTrigger: cn(
|
|
8469
|
-
"h-8 w-
|
|
8458
|
+
"h-8 w-20",
|
|
8470
8459
|
"border-muted-foreground/20",
|
|
8471
8460
|
"focus-visible:ring-2 focus-visible:ring-ring",
|
|
8472
8461
|
"data-[accent=on]:focus-visible:ring-[color:var(--dt-accent)]/35"
|
|
@@ -8485,13 +8474,16 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8485
8474
|
glass: {
|
|
8486
8475
|
root: cn(
|
|
8487
8476
|
"relative w-full overflow-hidden rounded-2xl border shadow-md",
|
|
8488
|
-
"bg-background/55 supports-
|
|
8477
|
+
"bg-background/55 supports-backdrop-filter:bg-background/25 backdrop-blur-xl",
|
|
8489
8478
|
"flex flex-col",
|
|
8490
|
-
"before:absolute before:inset-x-0 before:top-0 before:h-
|
|
8479
|
+
"before:absolute before:inset-x-0 before:top-0 before:h-0.5 before:bg-transparent",
|
|
8491
8480
|
"data-[accent=on]:before:bg-[color:var(--dt-accent)]"
|
|
8492
8481
|
),
|
|
8493
8482
|
theadSticky: "sticky top-0 z-10 bg-background/70 supports-[backdrop-filter]:bg-background/35 backdrop-blur-xl",
|
|
8494
|
-
tbody: cn(
|
|
8483
|
+
tbody: cn(
|
|
8484
|
+
"[&_tr:last-child]:border-0",
|
|
8485
|
+
"[&>tr:nth-child(even)]:bg-background/20"
|
|
8486
|
+
)
|
|
8495
8487
|
},
|
|
8496
8488
|
compact: {
|
|
8497
8489
|
th: "h-10 px-3 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground whitespace-nowrap",
|
|
@@ -8499,7 +8491,9 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8499
8491
|
pageSizeTrigger: "h-8 w-[4.5rem]"
|
|
8500
8492
|
},
|
|
8501
8493
|
minimal: {
|
|
8502
|
-
root: cn(
|
|
8494
|
+
root: cn(
|
|
8495
|
+
"relative w-full overflow-hidden rounded-xl border-0 shadow-none bg-transparent flex flex-col"
|
|
8496
|
+
),
|
|
8503
8497
|
theadSticky: "sticky top-0 z-10 bg-background",
|
|
8504
8498
|
footer: "border-t bg-transparent",
|
|
8505
8499
|
tbody: "[&_tr:last-child]:border-0"
|
|
@@ -8508,11 +8502,14 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8508
8502
|
root: cn(
|
|
8509
8503
|
"relative w-full overflow-hidden rounded-2xl border shadow-none",
|
|
8510
8504
|
"bg-background flex flex-col",
|
|
8511
|
-
"before:absolute before:inset-x-0 before:top-0 before:h-
|
|
8505
|
+
"before:absolute before:inset-x-0 before:top-0 before:h-0.5 before:bg-transparent",
|
|
8512
8506
|
"data-[accent=on]:before:bg-[color:var(--dt-accent)]"
|
|
8513
8507
|
),
|
|
8514
8508
|
theadSticky: "sticky top-0 z-10 bg-background",
|
|
8515
|
-
tbody: cn(
|
|
8509
|
+
tbody: cn(
|
|
8510
|
+
"[&_tr:last-child]:border-0",
|
|
8511
|
+
"[&>tr:nth-child(even)]:bg-transparent"
|
|
8512
|
+
),
|
|
8516
8513
|
tr: cn(
|
|
8517
8514
|
"border-b",
|
|
8518
8515
|
"data-[state=selected]:bg-muted/35",
|
|
@@ -8529,11 +8526,14 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8529
8526
|
root: cn(
|
|
8530
8527
|
"relative w-full overflow-hidden rounded-3xl border shadow-lg",
|
|
8531
8528
|
"bg-card flex flex-col",
|
|
8532
|
-
"before:absolute before:inset-x-0 before:top-0 before:h-
|
|
8529
|
+
"before:absolute before:inset-x-0 before:top-0 before:h-0.5 before:bg-transparent",
|
|
8533
8530
|
"data-[accent=on]:before:bg-[color:var(--dt-accent)]"
|
|
8534
8531
|
),
|
|
8535
8532
|
theadSticky: "sticky top-0 z-10 bg-card/95 supports-[backdrop-filter]:bg-card/75 backdrop-blur",
|
|
8536
|
-
tbody: cn(
|
|
8533
|
+
tbody: cn(
|
|
8534
|
+
"[&_tr:last-child]:border-0",
|
|
8535
|
+
"[&>tr:nth-child(even)]:bg-muted/10"
|
|
8536
|
+
),
|
|
8537
8537
|
th: cn(
|
|
8538
8538
|
"h-12 px-5 text-left align-middle whitespace-nowrap",
|
|
8539
8539
|
"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground"
|
|
@@ -8541,7 +8541,9 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8541
8541
|
td: "px-5 py-3 align-middle"
|
|
8542
8542
|
},
|
|
8543
8543
|
grid: {
|
|
8544
|
-
root: cn(
|
|
8544
|
+
root: cn(
|
|
8545
|
+
"relative w-full overflow-hidden rounded-2xl border shadow-sm bg-background flex flex-col"
|
|
8546
|
+
),
|
|
8545
8547
|
table: cn(
|
|
8546
8548
|
"w-full text-sm border-separate border-spacing-0",
|
|
8547
8549
|
"[&_th]:border-b [&_td]:border-b",
|
|
@@ -8563,7 +8565,9 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8563
8565
|
)
|
|
8564
8566
|
},
|
|
8565
8567
|
cards: {
|
|
8566
|
-
root: cn(
|
|
8568
|
+
root: cn(
|
|
8569
|
+
"relative w-full overflow-hidden rounded-2xl border bg-transparent shadow-none flex flex-col"
|
|
8570
|
+
),
|
|
8567
8571
|
table: cn(
|
|
8568
8572
|
"w-full text-sm border-separate border-spacing-y-2",
|
|
8569
8573
|
"[&_tbody_tr_td]:bg-background",
|
|
@@ -8679,13 +8683,13 @@ function DataTable({
|
|
|
8679
8683
|
style: accentOn ? { "--dt-accent": dtAccent } : void 0,
|
|
8680
8684
|
children: [
|
|
8681
8685
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(ScrollArea, { className: "h-full", children: [
|
|
8682
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "relative min-w-full
|
|
8686
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(Table, { className: cn(ui.table), children: [
|
|
8683
8687
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8684
8688
|
TableHead,
|
|
8685
8689
|
{
|
|
8686
8690
|
className: cn(
|
|
8687
|
-
ui.
|
|
8688
|
-
|
|
8691
|
+
headerIsSticky ? cn(ui.theadSticky, "z-20") : void 0,
|
|
8692
|
+
ui.th
|
|
8689
8693
|
),
|
|
8690
8694
|
children: header.isPlaceholder ? null : (0, import_react_table.flexRender)(
|
|
8691
8695
|
header.column.columnDef.header,
|
|
@@ -8708,15 +8712,24 @@ function DataTable({
|
|
|
8708
8712
|
"data-accent": dataAccent,
|
|
8709
8713
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
8710
8714
|
onClick: () => onClick == null ? void 0 : onClick(row.original),
|
|
8711
|
-
className: cn(
|
|
8712
|
-
|
|
8715
|
+
className: cn(
|
|
8716
|
+
ui.tr,
|
|
8717
|
+
clickable ? ui.trClickable : void 0
|
|
8718
|
+
),
|
|
8719
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableCell, { className: cn(ui.td), children: (0, import_react_table.flexRender)(
|
|
8720
|
+
cell.column.columnDef.cell,
|
|
8721
|
+
cell.getContext()
|
|
8722
|
+
) }, cell.id))
|
|
8713
8723
|
},
|
|
8714
8724
|
row.id
|
|
8715
8725
|
)) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8716
8726
|
TableCell,
|
|
8717
8727
|
{
|
|
8718
8728
|
colSpan: columns.length,
|
|
8719
|
-
className: cn(
|
|
8729
|
+
className: cn(
|
|
8730
|
+
ui.td,
|
|
8731
|
+
"text-muted-foreground h-28 text-center"
|
|
8732
|
+
),
|
|
8720
8733
|
children: "No results."
|
|
8721
8734
|
}
|
|
8722
8735
|
) })
|
|
@@ -8728,15 +8741,24 @@ function DataTable({
|
|
|
8728
8741
|
"data-accent": dataAccent,
|
|
8729
8742
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
8730
8743
|
onClick: () => onClick == null ? void 0 : onClick(row.original),
|
|
8731
|
-
className: cn(
|
|
8732
|
-
|
|
8744
|
+
className: cn(
|
|
8745
|
+
ui.tr,
|
|
8746
|
+
clickable ? ui.trClickable : void 0
|
|
8747
|
+
),
|
|
8748
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableCell, { className: cn(ui.td), children: (0, import_react_table.flexRender)(
|
|
8749
|
+
cell.column.columnDef.cell,
|
|
8750
|
+
cell.getContext()
|
|
8751
|
+
) }, cell.id))
|
|
8733
8752
|
},
|
|
8734
8753
|
row.id
|
|
8735
8754
|
)) : emptyData || /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8736
8755
|
TableCell,
|
|
8737
8756
|
{
|
|
8738
8757
|
colSpan: columns.length,
|
|
8739
|
-
className: cn(
|
|
8758
|
+
className: cn(
|
|
8759
|
+
ui.td,
|
|
8760
|
+
"text-muted-foreground h-28 text-center"
|
|
8761
|
+
),
|
|
8740
8762
|
children: "No results."
|
|
8741
8763
|
}
|
|
8742
8764
|
) }) })
|
|
@@ -8763,10 +8785,24 @@ function DataTable({
|
|
|
8763
8785
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn(ui.controlsWrap), children: [
|
|
8764
8786
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8765
8787
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
|
|
8766
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
8767
|
-
|
|
8768
|
-
|
|
8769
|
-
|
|
8788
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(
|
|
8789
|
+
Select2,
|
|
8790
|
+
{
|
|
8791
|
+
value: `${pageSize}`,
|
|
8792
|
+
onValueChange: (v) => changePageSize(Number(v)),
|
|
8793
|
+
children: [
|
|
8794
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
8795
|
+
SelectTrigger,
|
|
8796
|
+
{
|
|
8797
|
+
"data-accent": dataAccent,
|
|
8798
|
+
className: cn(ui.pageSizeTrigger),
|
|
8799
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectValue, { placeholder: `${pageSize}` })
|
|
8800
|
+
}
|
|
8801
|
+
),
|
|
8802
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(SelectItem, { value: `${size}`, children: size }, size)) })
|
|
8803
|
+
]
|
|
8804
|
+
}
|
|
8805
|
+
)
|
|
8770
8806
|
] }),
|
|
8771
8807
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
8772
8808
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: cn(ui.pageLabel), children: [
|
package/dist/index.d.cts
CHANGED
|
@@ -803,7 +803,7 @@ type DataTableSlots = Partial<{
|
|
|
803
803
|
* - `accentColor`: provide a custom CSS color (overrides `accent`)
|
|
804
804
|
* If both are null/empty, accent styling is disabled.
|
|
805
805
|
*/
|
|
806
|
-
type DataTableAccent =
|
|
806
|
+
type DataTableAccent = "primary" | "emerald" | "indigo" | "rose" | "amber" | "zinc";
|
|
807
807
|
/** =========
|
|
808
808
|
* TEMPLATES
|
|
809
809
|
* =========
|
|
@@ -933,7 +933,7 @@ interface DataTableProps<TData, TValue> {
|
|
|
933
933
|
* - isRowsSelected / rowsSelectedLabel: selection meta display
|
|
934
934
|
* - rowPerPageLabel, pageLabel, ofLabel: i18n labels
|
|
935
935
|
*/
|
|
936
|
-
declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, isRowsSelected, totalRows, rowsSelectedLabel, template, classNames, accent, accentColor, emptyData, onPageChange, onClick, onPageSizeChange, animate, stickyHeader, headerScroll, heightClassName }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
936
|
+
declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, isRowsSelected, totalRows, rowsSelectedLabel, template, classNames, accent, accentColor, emptyData, onPageChange, onClick, onPageSizeChange, animate, stickyHeader, headerScroll, heightClassName, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
937
937
|
|
|
938
938
|
type DataTableSkeletonProps = {
|
|
939
939
|
columnCount: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -803,7 +803,7 @@ type DataTableSlots = Partial<{
|
|
|
803
803
|
* - `accentColor`: provide a custom CSS color (overrides `accent`)
|
|
804
804
|
* If both are null/empty, accent styling is disabled.
|
|
805
805
|
*/
|
|
806
|
-
type DataTableAccent =
|
|
806
|
+
type DataTableAccent = "primary" | "emerald" | "indigo" | "rose" | "amber" | "zinc";
|
|
807
807
|
/** =========
|
|
808
808
|
* TEMPLATES
|
|
809
809
|
* =========
|
|
@@ -933,7 +933,7 @@ interface DataTableProps<TData, TValue> {
|
|
|
933
933
|
* - isRowsSelected / rowsSelectedLabel: selection meta display
|
|
934
934
|
* - rowPerPageLabel, pageLabel, ofLabel: i18n labels
|
|
935
935
|
*/
|
|
936
|
-
declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, isRowsSelected, totalRows, rowsSelectedLabel, template, classNames, accent, accentColor, emptyData, onPageChange, onClick, onPageSizeChange, animate, stickyHeader, headerScroll, heightClassName }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
936
|
+
declare function DataTable<TData, TValue>({ columns, data, pageCount, page, perPage, pageSizeOptions, rowPerPageLabel, ofLabel, pageLabel, isRowsSelected, totalRows, rowsSelectedLabel, template, classNames, accent, accentColor, emptyData, onPageChange, onClick, onPageSizeChange, animate, stickyHeader, headerScroll, heightClassName, }: DataTableProps<TData, TValue>): react_jsx_runtime.JSX.Element;
|
|
937
937
|
|
|
938
938
|
type DataTableSkeletonProps = {
|
|
939
939
|
columnCount: number;
|
package/dist/index.js
CHANGED
|
@@ -8182,7 +8182,7 @@ function Breadcrumbs({ items, className, classNameList }) {
|
|
|
8182
8182
|
}
|
|
8183
8183
|
|
|
8184
8184
|
// src/shared/data-table.tsx
|
|
8185
|
-
import
|
|
8185
|
+
import { useMemo as useMemo3 } from "react";
|
|
8186
8186
|
import { AnimatePresence, motion as motion2 } from "framer-motion";
|
|
8187
8187
|
import {
|
|
8188
8188
|
DoubleArrowLeftIcon,
|
|
@@ -8196,17 +8196,6 @@ import {
|
|
|
8196
8196
|
} from "@tanstack/react-table";
|
|
8197
8197
|
import { ChevronLeft as ChevronLeft3, ChevronRight as ChevronRight3 } from "lucide-react";
|
|
8198
8198
|
import { jsx as jsx48, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
8199
|
-
var TablePlain = React67.forwardRef((_a, ref) => {
|
|
8200
|
-
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
8201
|
-
return /* @__PURE__ */ jsx48(
|
|
8202
|
-
"table",
|
|
8203
|
-
__spreadValues({
|
|
8204
|
-
ref,
|
|
8205
|
-
className: cn("w-full caption-bottom text-sm", className)
|
|
8206
|
-
}, props)
|
|
8207
|
-
);
|
|
8208
|
-
});
|
|
8209
|
-
TablePlain.displayName = "TablePlain";
|
|
8210
8199
|
var ACCENT_COLOR = {
|
|
8211
8200
|
primary: "var(--primary)",
|
|
8212
8201
|
emerald: "#10b981",
|
|
@@ -8226,9 +8215,9 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8226
8215
|
neo: {
|
|
8227
8216
|
root: cn(
|
|
8228
8217
|
"relative w-full overflow-hidden rounded-2xl border shadow-sm",
|
|
8229
|
-
"bg-background/70 supports-
|
|
8218
|
+
"bg-background/70 supports-backdrop-filter:bg-background/45 backdrop-blur",
|
|
8230
8219
|
"flex flex-col",
|
|
8231
|
-
"before:absolute before:inset-x-0 before:top-0 before:h-
|
|
8220
|
+
"before:absolute before:inset-x-0 before:top-0 before:h-0.5 before:bg-transparent",
|
|
8232
8221
|
"data-[accent=on]:before:bg-[color:var(--dt-accent)]"
|
|
8233
8222
|
),
|
|
8234
8223
|
table: cn("w-full text-sm"),
|
|
@@ -8257,14 +8246,14 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8257
8246
|
td: "px-4 py-3 align-middle",
|
|
8258
8247
|
footer: cn(
|
|
8259
8248
|
"border-t",
|
|
8260
|
-
"bg-background/80 supports-
|
|
8249
|
+
"bg-background/80 supports-backdrop-filter:bg-background/55 backdrop-blur"
|
|
8261
8250
|
),
|
|
8262
8251
|
footerInner: "px-4 py-3",
|
|
8263
8252
|
metaWrap: "flex flex-wrap items-center gap-x-3 gap-y-1 text-sm text-muted-foreground",
|
|
8264
8253
|
controlsWrap: "flex flex-wrap items-center justify-between gap-3 sm:justify-end",
|
|
8265
8254
|
pageSizeLabel: "text-sm font-medium whitespace-nowrap",
|
|
8266
8255
|
pageSizeTrigger: cn(
|
|
8267
|
-
"h-8 w-
|
|
8256
|
+
"h-8 w-20",
|
|
8268
8257
|
"border-muted-foreground/20",
|
|
8269
8258
|
"focus-visible:ring-2 focus-visible:ring-ring",
|
|
8270
8259
|
"data-[accent=on]:focus-visible:ring-[color:var(--dt-accent)]/35"
|
|
@@ -8283,13 +8272,16 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8283
8272
|
glass: {
|
|
8284
8273
|
root: cn(
|
|
8285
8274
|
"relative w-full overflow-hidden rounded-2xl border shadow-md",
|
|
8286
|
-
"bg-background/55 supports-
|
|
8275
|
+
"bg-background/55 supports-backdrop-filter:bg-background/25 backdrop-blur-xl",
|
|
8287
8276
|
"flex flex-col",
|
|
8288
|
-
"before:absolute before:inset-x-0 before:top-0 before:h-
|
|
8277
|
+
"before:absolute before:inset-x-0 before:top-0 before:h-0.5 before:bg-transparent",
|
|
8289
8278
|
"data-[accent=on]:before:bg-[color:var(--dt-accent)]"
|
|
8290
8279
|
),
|
|
8291
8280
|
theadSticky: "sticky top-0 z-10 bg-background/70 supports-[backdrop-filter]:bg-background/35 backdrop-blur-xl",
|
|
8292
|
-
tbody: cn(
|
|
8281
|
+
tbody: cn(
|
|
8282
|
+
"[&_tr:last-child]:border-0",
|
|
8283
|
+
"[&>tr:nth-child(even)]:bg-background/20"
|
|
8284
|
+
)
|
|
8293
8285
|
},
|
|
8294
8286
|
compact: {
|
|
8295
8287
|
th: "h-10 px-3 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground whitespace-nowrap",
|
|
@@ -8297,7 +8289,9 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8297
8289
|
pageSizeTrigger: "h-8 w-[4.5rem]"
|
|
8298
8290
|
},
|
|
8299
8291
|
minimal: {
|
|
8300
|
-
root: cn(
|
|
8292
|
+
root: cn(
|
|
8293
|
+
"relative w-full overflow-hidden rounded-xl border-0 shadow-none bg-transparent flex flex-col"
|
|
8294
|
+
),
|
|
8301
8295
|
theadSticky: "sticky top-0 z-10 bg-background",
|
|
8302
8296
|
footer: "border-t bg-transparent",
|
|
8303
8297
|
tbody: "[&_tr:last-child]:border-0"
|
|
@@ -8306,11 +8300,14 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8306
8300
|
root: cn(
|
|
8307
8301
|
"relative w-full overflow-hidden rounded-2xl border shadow-none",
|
|
8308
8302
|
"bg-background flex flex-col",
|
|
8309
|
-
"before:absolute before:inset-x-0 before:top-0 before:h-
|
|
8303
|
+
"before:absolute before:inset-x-0 before:top-0 before:h-0.5 before:bg-transparent",
|
|
8310
8304
|
"data-[accent=on]:before:bg-[color:var(--dt-accent)]"
|
|
8311
8305
|
),
|
|
8312
8306
|
theadSticky: "sticky top-0 z-10 bg-background",
|
|
8313
|
-
tbody: cn(
|
|
8307
|
+
tbody: cn(
|
|
8308
|
+
"[&_tr:last-child]:border-0",
|
|
8309
|
+
"[&>tr:nth-child(even)]:bg-transparent"
|
|
8310
|
+
),
|
|
8314
8311
|
tr: cn(
|
|
8315
8312
|
"border-b",
|
|
8316
8313
|
"data-[state=selected]:bg-muted/35",
|
|
@@ -8327,11 +8324,14 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8327
8324
|
root: cn(
|
|
8328
8325
|
"relative w-full overflow-hidden rounded-3xl border shadow-lg",
|
|
8329
8326
|
"bg-card flex flex-col",
|
|
8330
|
-
"before:absolute before:inset-x-0 before:top-0 before:h-
|
|
8327
|
+
"before:absolute before:inset-x-0 before:top-0 before:h-0.5 before:bg-transparent",
|
|
8331
8328
|
"data-[accent=on]:before:bg-[color:var(--dt-accent)]"
|
|
8332
8329
|
),
|
|
8333
8330
|
theadSticky: "sticky top-0 z-10 bg-card/95 supports-[backdrop-filter]:bg-card/75 backdrop-blur",
|
|
8334
|
-
tbody: cn(
|
|
8331
|
+
tbody: cn(
|
|
8332
|
+
"[&_tr:last-child]:border-0",
|
|
8333
|
+
"[&>tr:nth-child(even)]:bg-muted/10"
|
|
8334
|
+
),
|
|
8335
8335
|
th: cn(
|
|
8336
8336
|
"h-12 px-5 text-left align-middle whitespace-nowrap",
|
|
8337
8337
|
"text-[11px] font-semibold uppercase tracking-wider text-muted-foreground"
|
|
@@ -8339,7 +8339,9 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8339
8339
|
td: "px-5 py-3 align-middle"
|
|
8340
8340
|
},
|
|
8341
8341
|
grid: {
|
|
8342
|
-
root: cn(
|
|
8342
|
+
root: cn(
|
|
8343
|
+
"relative w-full overflow-hidden rounded-2xl border shadow-sm bg-background flex flex-col"
|
|
8344
|
+
),
|
|
8343
8345
|
table: cn(
|
|
8344
8346
|
"w-full text-sm border-separate border-spacing-0",
|
|
8345
8347
|
"[&_th]:border-b [&_td]:border-b",
|
|
@@ -8361,7 +8363,9 @@ var DATA_TABLE_TEMPLATES = {
|
|
|
8361
8363
|
)
|
|
8362
8364
|
},
|
|
8363
8365
|
cards: {
|
|
8364
|
-
root: cn(
|
|
8366
|
+
root: cn(
|
|
8367
|
+
"relative w-full overflow-hidden rounded-2xl border bg-transparent shadow-none flex flex-col"
|
|
8368
|
+
),
|
|
8365
8369
|
table: cn(
|
|
8366
8370
|
"w-full text-sm border-separate border-spacing-y-2",
|
|
8367
8371
|
"[&_tbody_tr_td]:bg-background",
|
|
@@ -8477,13 +8481,13 @@ function DataTable({
|
|
|
8477
8481
|
style: accentOn ? { "--dt-accent": dtAccent } : void 0,
|
|
8478
8482
|
children: [
|
|
8479
8483
|
/* @__PURE__ */ jsx48("div", { className: "min-h-0 flex-1", children: /* @__PURE__ */ jsxs23(ScrollArea, { className: "h-full", children: [
|
|
8480
|
-
/* @__PURE__ */ jsx48("div", { className: "relative min-w-full
|
|
8484
|
+
/* @__PURE__ */ jsx48("div", { className: "relative w-max min-w-full", children: /* @__PURE__ */ jsxs23(Table, { className: cn(ui.table), children: [
|
|
8481
8485
|
/* @__PURE__ */ jsx48(TableHeader, { className: cn(ui.thead), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx48(TableRow, { className: cn(ui.trHead), children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx48(
|
|
8482
8486
|
TableHead,
|
|
8483
8487
|
{
|
|
8484
8488
|
className: cn(
|
|
8485
|
-
ui.
|
|
8486
|
-
|
|
8489
|
+
headerIsSticky ? cn(ui.theadSticky, "z-20") : void 0,
|
|
8490
|
+
ui.th
|
|
8487
8491
|
),
|
|
8488
8492
|
children: header.isPlaceholder ? null : flexRender(
|
|
8489
8493
|
header.column.columnDef.header,
|
|
@@ -8506,15 +8510,24 @@ function DataTable({
|
|
|
8506
8510
|
"data-accent": dataAccent,
|
|
8507
8511
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
8508
8512
|
onClick: () => onClick == null ? void 0 : onClick(row.original),
|
|
8509
|
-
className: cn(
|
|
8510
|
-
|
|
8513
|
+
className: cn(
|
|
8514
|
+
ui.tr,
|
|
8515
|
+
clickable ? ui.trClickable : void 0
|
|
8516
|
+
),
|
|
8517
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx48(TableCell, { className: cn(ui.td), children: flexRender(
|
|
8518
|
+
cell.column.columnDef.cell,
|
|
8519
|
+
cell.getContext()
|
|
8520
|
+
) }, cell.id))
|
|
8511
8521
|
},
|
|
8512
8522
|
row.id
|
|
8513
8523
|
)) : emptyData || /* @__PURE__ */ jsx48(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx48(
|
|
8514
8524
|
TableCell,
|
|
8515
8525
|
{
|
|
8516
8526
|
colSpan: columns.length,
|
|
8517
|
-
className: cn(
|
|
8527
|
+
className: cn(
|
|
8528
|
+
ui.td,
|
|
8529
|
+
"text-muted-foreground h-28 text-center"
|
|
8530
|
+
),
|
|
8518
8531
|
children: "No results."
|
|
8519
8532
|
}
|
|
8520
8533
|
) })
|
|
@@ -8526,15 +8539,24 @@ function DataTable({
|
|
|
8526
8539
|
"data-accent": dataAccent,
|
|
8527
8540
|
"data-state": row.getIsSelected() ? "selected" : void 0,
|
|
8528
8541
|
onClick: () => onClick == null ? void 0 : onClick(row.original),
|
|
8529
|
-
className: cn(
|
|
8530
|
-
|
|
8542
|
+
className: cn(
|
|
8543
|
+
ui.tr,
|
|
8544
|
+
clickable ? ui.trClickable : void 0
|
|
8545
|
+
),
|
|
8546
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx48(TableCell, { className: cn(ui.td), children: flexRender(
|
|
8547
|
+
cell.column.columnDef.cell,
|
|
8548
|
+
cell.getContext()
|
|
8549
|
+
) }, cell.id))
|
|
8531
8550
|
},
|
|
8532
8551
|
row.id
|
|
8533
8552
|
)) : emptyData || /* @__PURE__ */ jsx48(TableRow, { "data-accent": dataAccent, children: /* @__PURE__ */ jsx48(
|
|
8534
8553
|
TableCell,
|
|
8535
8554
|
{
|
|
8536
8555
|
colSpan: columns.length,
|
|
8537
|
-
className: cn(
|
|
8556
|
+
className: cn(
|
|
8557
|
+
ui.td,
|
|
8558
|
+
"text-muted-foreground h-28 text-center"
|
|
8559
|
+
),
|
|
8538
8560
|
children: "No results."
|
|
8539
8561
|
}
|
|
8540
8562
|
) }) })
|
|
@@ -8561,10 +8583,24 @@ function DataTable({
|
|
|
8561
8583
|
/* @__PURE__ */ jsxs23("div", { className: cn(ui.controlsWrap), children: [
|
|
8562
8584
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
8563
8585
|
/* @__PURE__ */ jsx48("p", { className: cn(ui.pageSizeLabel), children: rowPerPageLabel }),
|
|
8564
|
-
/* @__PURE__ */ jsxs23(
|
|
8565
|
-
|
|
8566
|
-
|
|
8567
|
-
|
|
8586
|
+
/* @__PURE__ */ jsxs23(
|
|
8587
|
+
Select2,
|
|
8588
|
+
{
|
|
8589
|
+
value: `${pageSize}`,
|
|
8590
|
+
onValueChange: (v) => changePageSize(Number(v)),
|
|
8591
|
+
children: [
|
|
8592
|
+
/* @__PURE__ */ jsx48(
|
|
8593
|
+
SelectTrigger,
|
|
8594
|
+
{
|
|
8595
|
+
"data-accent": dataAccent,
|
|
8596
|
+
className: cn(ui.pageSizeTrigger),
|
|
8597
|
+
children: /* @__PURE__ */ jsx48(SelectValue, { placeholder: `${pageSize}` })
|
|
8598
|
+
}
|
|
8599
|
+
),
|
|
8600
|
+
/* @__PURE__ */ jsx48(SelectContent, { side: "top", children: pageSizeOptions.map((size) => /* @__PURE__ */ jsx48(SelectItem, { value: `${size}`, children: size }, size)) })
|
|
8601
|
+
]
|
|
8602
|
+
}
|
|
8603
|
+
)
|
|
8568
8604
|
] }),
|
|
8569
8605
|
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2", children: [
|
|
8570
8606
|
/* @__PURE__ */ jsxs23("div", { className: cn(ui.pageLabel), children: [
|
package/dist/style.css
CHANGED
|
@@ -658,9 +658,6 @@
|
|
|
658
658
|
.w-\[4\.5rem\] {
|
|
659
659
|
width: 4.5rem;
|
|
660
660
|
}
|
|
661
|
-
.w-\[5rem\] {
|
|
662
|
-
width: 5rem;
|
|
663
|
-
}
|
|
664
661
|
.w-\[100px\] {
|
|
665
662
|
width: 100px;
|
|
666
663
|
}
|
|
@@ -1769,10 +1766,10 @@
|
|
|
1769
1766
|
top: calc(var(--spacing) * 0);
|
|
1770
1767
|
}
|
|
1771
1768
|
}
|
|
1772
|
-
.before\:h
|
|
1769
|
+
.before\:h-0\.5 {
|
|
1773
1770
|
&::before {
|
|
1774
1771
|
content: var(--tw-content);
|
|
1775
|
-
height:
|
|
1772
|
+
height: calc(var(--spacing) * 0.5);
|
|
1776
1773
|
}
|
|
1777
1774
|
}
|
|
1778
1775
|
.before\:bg-transparent {
|
|
@@ -2956,7 +2953,7 @@
|
|
|
2956
2953
|
transition-property: none;
|
|
2957
2954
|
}
|
|
2958
2955
|
}
|
|
2959
|
-
.supports
|
|
2956
|
+
.supports-backdrop-filter\:bg-background\/25 {
|
|
2960
2957
|
@supports (backdrop-filter: var(--tw)) {
|
|
2961
2958
|
background-color: var(--background);
|
|
2962
2959
|
@supports (color: color-mix(in lab, red, red)) {
|
|
@@ -2964,27 +2961,27 @@
|
|
|
2964
2961
|
}
|
|
2965
2962
|
}
|
|
2966
2963
|
}
|
|
2967
|
-
.supports
|
|
2964
|
+
.supports-backdrop-filter\:bg-background\/45 {
|
|
2968
2965
|
@supports (backdrop-filter: var(--tw)) {
|
|
2969
2966
|
background-color: var(--background);
|
|
2970
2967
|
@supports (color: color-mix(in lab, red, red)) {
|
|
2971
|
-
background-color: color-mix(in oklab, var(--background)
|
|
2968
|
+
background-color: color-mix(in oklab, var(--background) 45%, transparent);
|
|
2972
2969
|
}
|
|
2973
2970
|
}
|
|
2974
2971
|
}
|
|
2975
|
-
.supports
|
|
2972
|
+
.supports-backdrop-filter\:bg-background\/55 {
|
|
2976
2973
|
@supports (backdrop-filter: var(--tw)) {
|
|
2977
2974
|
background-color: var(--background);
|
|
2978
2975
|
@supports (color: color-mix(in lab, red, red)) {
|
|
2979
|
-
background-color: color-mix(in oklab, var(--background)
|
|
2976
|
+
background-color: color-mix(in oklab, var(--background) 55%, transparent);
|
|
2980
2977
|
}
|
|
2981
2978
|
}
|
|
2982
2979
|
}
|
|
2983
|
-
.supports-\[backdrop-filter\]\:bg-background\/
|
|
2980
|
+
.supports-\[backdrop-filter\]\:bg-background\/35 {
|
|
2984
2981
|
@supports (backdrop-filter: var(--tw)) {
|
|
2985
2982
|
background-color: var(--background);
|
|
2986
2983
|
@supports (color: color-mix(in lab, red, red)) {
|
|
2987
|
-
background-color: color-mix(in oklab, var(--background)
|
|
2984
|
+
background-color: color-mix(in oklab, var(--background) 35%, transparent);
|
|
2988
2985
|
}
|
|
2989
2986
|
}
|
|
2990
2987
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shadcn-ui-react",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Bleker Cordova <bleker@gliyen.com>",
|
|
6
6
|
"description": "A collection of components for building beautiful and accessible user interfaces with React and Tailwind CSS.",
|
|
@@ -14,8 +14,13 @@
|
|
|
14
14
|
"style": "dist/style.css",
|
|
15
15
|
"files": [
|
|
16
16
|
"dist",
|
|
17
|
-
"dist/style.css"
|
|
17
|
+
"dist/style.css",
|
|
18
|
+
"bin",
|
|
19
|
+
"templates"
|
|
18
20
|
],
|
|
21
|
+
"bin": {
|
|
22
|
+
"shadcn-ui-react": "./bin/shadcn-ui-react.mjs"
|
|
23
|
+
},
|
|
19
24
|
"sideEffects": [
|
|
20
25
|
"dist/*.css"
|
|
21
26
|
],
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tailwindCSS.experimental.classRegex": [
|
|
3
|
+
["cn\\(([^)]*)\\)", "[\"'`]([^\"'`]*?)[\"'`]"],
|
|
4
|
+
["classNames\\s*=\\s*\\{\\{([\\s\\S]*?)\\}\\}", "[\"'`]([^\"'`]*?)[\"'`]"]
|
|
5
|
+
],
|
|
6
|
+
"tailwindCSS.includeLanguages": {
|
|
7
|
+
"typescript": "javascript",
|
|
8
|
+
"typescriptreact": "javascript",
|
|
9
|
+
"javascriptreact": "javascript"
|
|
10
|
+
}
|
|
11
|
+
}
|