@dinachi/cli 0.8.1 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +87 -0
- package/README.md +2 -0
- package/dist/index.js +131 -4
- package/package.json +14 -10
- package/templates/accordion/accordion.tsx +5 -8
- package/templates/badge/badge.tsx +4 -4
- package/templates/json-render/catalog.ts +483 -0
- package/templates/json-render/components.tsx +958 -0
- package/templates/json-render/index.ts +36 -0
- package/templates/json-render/registry.ts +21 -0
- package/templates/link/index.ts +2 -0
- package/templates/link/link.tsx +94 -0
- package/templates/otp-field/index.ts +1 -0
- package/templates/otp-field/otp-field.tsx +72 -0
- package/templates/select/select.tsx +4 -2
- package/templates/slider/slider.tsx +1 -1
- package/templates/text/index.ts +2 -0
- package/templates/text/text.tsx +70 -0
- package/templates/tsconfig.json +2 -1
- package/LICENSE +0 -21
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@dinachi/cli` will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.9.0] - 2026-05-27
|
|
9
|
+
|
|
10
|
+
First release with a CHANGELOG. Covers everything shipped since the last
|
|
11
|
+
npm-published version, `0.8.2`.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **OTP Field** component — a one-time password / verification code input
|
|
16
|
+
built on Base UI 1.4.0+'s preview `OTPField` primitive. Supports
|
|
17
|
+
auto-advance, paste handling, validation modes (numeric / alphanumeric /
|
|
18
|
+
alphabetic), masking, separators, and form integration. Install with
|
|
19
|
+
`dinachi add otp-field`.
|
|
20
|
+
- New `--info` / `--info-foreground` semantic color tokens, plus the missing
|
|
21
|
+
`--chart-*` and `--sidebar-*` tokens, are now seeded into `globals.css`
|
|
22
|
+
on `dinachi init` so theming covers every variant the components reference.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Bumped `@base-ui/react` peer / template dependency from `1.3.0` to `1.5.0`
|
|
27
|
+
to pick up the new OTPField primitive plus upstream a11y, autocomplete,
|
|
28
|
+
combobox, dialog, and form-integration fixes from the 1.4.x and 1.5.x
|
|
29
|
+
release lines.
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **Badge**: `success`, `warning`, and `info` variants now use semantic tokens
|
|
34
|
+
(`bg-success`, `bg-warning`, `bg-info`) instead of hardcoded
|
|
35
|
+
`bg-green-500` / `bg-yellow-500` / `bg-blue-500`, so they theme correctly in
|
|
36
|
+
light and dark mode and respect user palette overrides.
|
|
37
|
+
- **Select**: dropdown no longer renders behind `Drawer` or `Dialog` overlays,
|
|
38
|
+
and sibling form controls (checkboxes, switches, other inputs) no longer
|
|
39
|
+
paint on top of the open dropdown. Default `portal` is now `false`, and
|
|
40
|
+
`z-50` lives on the `Positioner` (the `position: fixed` element) instead of
|
|
41
|
+
the inner `Popup`. ([#29](https://github.com/raymond-UI/dinachiUI/issues/29))
|
|
42
|
+
- **Slider**: removed the static `z-10` from `SliderThumb`. Base UI manages
|
|
43
|
+
thumb stacking dynamically (active = `z:2`, last-used = `z:1` in range
|
|
44
|
+
sliders); the hardcoded class was floating idle thumbs above the dragging
|
|
45
|
+
one and could conflict with surrounding page elements.
|
|
46
|
+
|
|
47
|
+
### Upgrading from 0.8.2
|
|
48
|
+
|
|
49
|
+
The `info` Badge variant now reads from a `--info` CSS variable. If you ran
|
|
50
|
+
`dinachi init` on an earlier version and add a Badge with `variant="info"`,
|
|
51
|
+
add the following to your `globals.css`:
|
|
52
|
+
|
|
53
|
+
```css
|
|
54
|
+
:root {
|
|
55
|
+
--info: oklch(0.623 0.214 259.815);
|
|
56
|
+
--info-foreground: oklch(1 0 0);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.dark {
|
|
60
|
+
--info: oklch(0.707 0.165 254.624);
|
|
61
|
+
--info-foreground: oklch(0.1324 0.0033 145.3864);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Tailwind 4: @theme inline */
|
|
65
|
+
@theme inline {
|
|
66
|
+
--color-info: var(--info);
|
|
67
|
+
--color-info-foreground: var(--info-foreground);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Combobox**: Base UI 1.5.0 narrowed `Combobox.Label` to only label
|
|
72
|
+
`Combobox.Trigger`. If you currently pair `<ComboboxLabel>` with
|
|
73
|
+
`<ComboboxInput>` (input as the form control), switch to a native
|
|
74
|
+
`<label htmlFor>` or `<Field.Label>` to avoid the dev-mode warning.
|
|
75
|
+
`<ComboboxLabel>` is still correct for Trigger-driven (Select-style)
|
|
76
|
+
Comboboxes.
|
|
77
|
+
|
|
78
|
+
Re-run `dinachi add select`, `dinachi add slider`, and `dinachi add otp-field`
|
|
79
|
+
(or hand-apply the diffs) to pick everything up, and bump `@base-ui/react` to
|
|
80
|
+
`1.5.0` in your project to match the templates.
|
|
81
|
+
|
|
82
|
+
## Earlier versions
|
|
83
|
+
|
|
84
|
+
See [git history](https://github.com/raymond-UI/dinachiUI/commits/main/packages/cli)
|
|
85
|
+
for changes prior to 0.9.0.
|
|
86
|
+
|
|
87
|
+
[0.9.0]: https://github.com/raymond-UI/dinachiUI/releases/tag/cli-v0.9.0
|
package/README.md
CHANGED
|
@@ -4,6 +4,8 @@ A CLI for adding Dinachi UI components to your project. Just like shadcn/ui, thi
|
|
|
4
4
|
|
|
5
5
|
Best fit: React projects using Tailwind CSS (Next.js, Vite, Remix, CRA, and similar layouts).
|
|
6
6
|
|
|
7
|
+
> **What's new?** See the [changelog](./CHANGELOG.md) or the [releases page](https://github.com/raymond-UI/dinachiUI/releases) for the latest fixes and additions.
|
|
8
|
+
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
9
11
|
```bash
|
package/dist/index.js
CHANGED
|
@@ -209,6 +209,13 @@ function getComponentRegistry() {
|
|
|
209
209
|
dependencies: [],
|
|
210
210
|
utilityDependencies: ["cn"]
|
|
211
211
|
},
|
|
212
|
+
link: {
|
|
213
|
+
name: "link",
|
|
214
|
+
description: "A semantic anchor element with style variants and support for external links and framework router composition.",
|
|
215
|
+
files: [{ name: "link.tsx" }, { name: "index.ts" }],
|
|
216
|
+
dependencies: ["@base-ui/react", "class-variance-authority"],
|
|
217
|
+
utilityDependencies: ["cn"]
|
|
218
|
+
},
|
|
212
219
|
menu: {
|
|
213
220
|
name: "menu",
|
|
214
221
|
description: "A popup menu for actions and options triggered by a button.",
|
|
@@ -244,6 +251,13 @@ function getComponentRegistry() {
|
|
|
244
251
|
dependencies: ["@base-ui/react", "lucide-react"],
|
|
245
252
|
utilityDependencies: ["cn"]
|
|
246
253
|
},
|
|
254
|
+
"otp-field": {
|
|
255
|
+
name: "otp-field",
|
|
256
|
+
description: "A one-time password / verification code input with auto-focus, paste handling, and validation.",
|
|
257
|
+
files: [{ name: "otp-field.tsx" }, { name: "index.ts" }],
|
|
258
|
+
dependencies: ["@base-ui/react"],
|
|
259
|
+
utilityDependencies: ["cn"]
|
|
260
|
+
},
|
|
247
261
|
popover: {
|
|
248
262
|
name: "popover",
|
|
249
263
|
description: "An anchored floating panel for contextual information and lightweight interactions.",
|
|
@@ -321,6 +335,13 @@ function getComponentRegistry() {
|
|
|
321
335
|
dependencies: ["@base-ui/react"],
|
|
322
336
|
utilityDependencies: ["cn"]
|
|
323
337
|
},
|
|
338
|
+
text: {
|
|
339
|
+
name: "text",
|
|
340
|
+
description: "A typography component for headings, paragraphs, and text styles.",
|
|
341
|
+
files: [{ name: "text.tsx" }, { name: "index.ts" }],
|
|
342
|
+
dependencies: ["class-variance-authority"],
|
|
343
|
+
utilityDependencies: ["cn"]
|
|
344
|
+
},
|
|
324
345
|
textarea: {
|
|
325
346
|
name: "textarea",
|
|
326
347
|
description: "A multi-line text input for longer form content.",
|
|
@@ -362,6 +383,52 @@ function getComponentRegistry() {
|
|
|
362
383
|
files: [{ name: "tooltip.tsx" }, { name: "index.ts" }],
|
|
363
384
|
dependencies: ["@base-ui/react"],
|
|
364
385
|
utilityDependencies: ["cn"]
|
|
386
|
+
},
|
|
387
|
+
"json-render": {
|
|
388
|
+
name: "json-render",
|
|
389
|
+
description: "Adapter for @json-render \u2014 renders DinachiUI components from JSON specs with state binding, validation, and actions.",
|
|
390
|
+
files: [
|
|
391
|
+
{ name: "catalog.ts" },
|
|
392
|
+
{ name: "components.tsx" },
|
|
393
|
+
{ name: "registry.ts" },
|
|
394
|
+
{ name: "index.ts" }
|
|
395
|
+
],
|
|
396
|
+
dependencies: ["@json-render/core", "@json-render/react", "zod"],
|
|
397
|
+
componentDependencies: [
|
|
398
|
+
"accordion",
|
|
399
|
+
"alert-dialog",
|
|
400
|
+
"avatar",
|
|
401
|
+
"badge",
|
|
402
|
+
"button",
|
|
403
|
+
"card",
|
|
404
|
+
"checkbox",
|
|
405
|
+
"collapsible",
|
|
406
|
+
"dialog",
|
|
407
|
+
"drawer",
|
|
408
|
+
"fieldset",
|
|
409
|
+
"input",
|
|
410
|
+
"label",
|
|
411
|
+
"number-field",
|
|
412
|
+
"popover",
|
|
413
|
+
"progress",
|
|
414
|
+
"radio",
|
|
415
|
+
"scroll-area",
|
|
416
|
+
"select",
|
|
417
|
+
"separator",
|
|
418
|
+
"skeleton",
|
|
419
|
+
"slider",
|
|
420
|
+
"switch",
|
|
421
|
+
"tabs",
|
|
422
|
+
"text",
|
|
423
|
+
"textarea",
|
|
424
|
+
"toast",
|
|
425
|
+
"toggle",
|
|
426
|
+
"toggle-group",
|
|
427
|
+
"tooltip"
|
|
428
|
+
],
|
|
429
|
+
utilityDependencies: ["cn"],
|
|
430
|
+
targetDir: "json-render",
|
|
431
|
+
integration: true
|
|
365
432
|
}
|
|
366
433
|
};
|
|
367
434
|
}
|
|
@@ -488,7 +555,10 @@ var DEPENDENCY_VERSION_MAP = {
|
|
|
488
555
|
"tailwindcss-animate": "^1.0.7",
|
|
489
556
|
"tw-animate-css": "^1.3.4",
|
|
490
557
|
"clsx": "^2.1.1",
|
|
491
|
-
"tailwind-merge": "^3.3.1"
|
|
558
|
+
"tailwind-merge": "^3.3.1",
|
|
559
|
+
"@json-render/core": "^0.14.0",
|
|
560
|
+
"@json-render/react": "^0.14.0",
|
|
561
|
+
"zod": "^4.0.0"
|
|
492
562
|
};
|
|
493
563
|
function toInstallSpec(dep) {
|
|
494
564
|
const version = DEPENDENCY_VERSION_MAP[dep];
|
|
@@ -831,7 +901,9 @@ var addCommand = new Command("add").description("Add a component to your project
|
|
|
831
901
|
const registry = getComponentRegistry();
|
|
832
902
|
let componentsToInstall = [];
|
|
833
903
|
if (options.all) {
|
|
834
|
-
const allComponents = Object.keys(registry)
|
|
904
|
+
const allComponents = Object.keys(registry).filter(
|
|
905
|
+
(name) => !registry[name].integration
|
|
906
|
+
);
|
|
835
907
|
spinner.text = `Installing all ${allComponents.length} components...`;
|
|
836
908
|
const allComponentsWithDeps = /* @__PURE__ */ new Set();
|
|
837
909
|
for (const name of allComponents) {
|
|
@@ -910,11 +982,21 @@ var addCommand = new Command("add").description("Add a component to your project
|
|
|
910
982
|
for (const name of componentsToInstall) {
|
|
911
983
|
const comp = registry[name];
|
|
912
984
|
if (!comp) continue;
|
|
985
|
+
const fileTargetDir = comp.targetDir ? path3.join(libDir, comp.targetDir) : componentDir;
|
|
986
|
+
if (comp.targetDir) {
|
|
987
|
+
await fs3.ensureDir(fileTargetDir);
|
|
988
|
+
}
|
|
913
989
|
for (const file of comp.files) {
|
|
914
990
|
const sourcePath = path3.join(__dirname2, "../templates", name, file.name);
|
|
915
|
-
const targetPath = path3.join(
|
|
991
|
+
const targetPath = path3.join(fileTargetDir, file.name);
|
|
916
992
|
if (file.name === "index.ts") {
|
|
917
|
-
|
|
993
|
+
if (comp.targetDir) {
|
|
994
|
+
const templateContent2 = stripTemplateDirective(await fs3.readFile(sourcePath, "utf-8"));
|
|
995
|
+
await fs3.writeFile(targetPath, templateContent2);
|
|
996
|
+
allFilesAdded.push({ name: "index.ts", path: targetPath });
|
|
997
|
+
} else {
|
|
998
|
+
await handleIndexFile(sourcePath, targetPath, allFilesAdded, fileTargetDir);
|
|
999
|
+
}
|
|
918
1000
|
continue;
|
|
919
1001
|
}
|
|
920
1002
|
if (fs3.existsSync(targetPath) && !options.overwrite) {
|
|
@@ -1113,9 +1195,24 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
|
|
|
1113
1195
|
--success-foreground: oklch(1 0 0);
|
|
1114
1196
|
--warning: oklch(0.6365 0.1639 55.49);
|
|
1115
1197
|
--warning-foreground: oklch(1 0 0);
|
|
1198
|
+
--info: oklch(0.623 0.214 259.815);
|
|
1199
|
+
--info-foreground: oklch(1 0 0);
|
|
1116
1200
|
--border: oklch(0.9239 0.0017 145.5613);
|
|
1117
1201
|
--input: oklch(0.8481 0.0105 145.4823);
|
|
1118
1202
|
--ring: oklch(0.1459 0.0497 142.4953);
|
|
1203
|
+
--chart-1: oklch(0.6038 0.2363 344.4657);
|
|
1204
|
+
--chart-2: oklch(0.4445 0.2251 300.6246);
|
|
1205
|
+
--chart-3: oklch(0.379 0.0438 226.1538);
|
|
1206
|
+
--chart-4: oklch(0.833 0.1185 88.3461);
|
|
1207
|
+
--chart-5: oklch(0.7843 0.1256 58.9964);
|
|
1208
|
+
--sidebar: oklch(0.972 0.0068 145.5233);
|
|
1209
|
+
--sidebar-foreground: oklch(0.2284 0.023 134.3921);
|
|
1210
|
+
--sidebar-primary: oklch(0.1324 0.0033 145.3864);
|
|
1211
|
+
--sidebar-primary-foreground: oklch(0.9742 0.0101 131.3574);
|
|
1212
|
+
--sidebar-accent: oklch(0.9248 0.0051 145.5339);
|
|
1213
|
+
--sidebar-accent-foreground: oklch(0.1459 0.0497 142.4953);
|
|
1214
|
+
--sidebar-border: oklch(0.9407 0.0045 134.8505);
|
|
1215
|
+
--sidebar-ring: oklch(0.5916 0.218 0.5844);
|
|
1119
1216
|
--radius: 0.625rem;
|
|
1120
1217
|
}`;
|
|
1121
1218
|
const darkVars = `.dark {
|
|
@@ -1139,9 +1236,24 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
|
|
|
1139
1236
|
--success-foreground: oklch(1 0 0);
|
|
1140
1237
|
--warning: oklch(0.5966 0.1499 55.49);
|
|
1141
1238
|
--warning-foreground: oklch(1 0 0);
|
|
1239
|
+
--info: oklch(0.707 0.165 254.624);
|
|
1240
|
+
--info-foreground: oklch(0.1324 0.0033 145.3864);
|
|
1142
1241
|
--border: oklch(0.1811 0.0128 129.2819);
|
|
1143
1242
|
--input: oklch(0.2213 0.0193 135.2915);
|
|
1144
1243
|
--ring: oklch(0.9248 0.0051 145.5339);
|
|
1244
|
+
--chart-1: oklch(0.5316 0.1409 355.1999);
|
|
1245
|
+
--chart-2: oklch(0.5633 0.1912 306.8561);
|
|
1246
|
+
--chart-3: oklch(0.7227 0.1502 60.5799);
|
|
1247
|
+
--chart-4: oklch(0.6193 0.2029 312.7422);
|
|
1248
|
+
--chart-5: oklch(0.6118 0.2093 6.1387);
|
|
1249
|
+
--sidebar: oklch(0.1495 0.0139 121.7627);
|
|
1250
|
+
--sidebar-foreground: oklch(0.8942 0.0315 133.3174);
|
|
1251
|
+
--sidebar-primary: oklch(0.9729 0.0101 145.4971);
|
|
1252
|
+
--sidebar-primary-foreground: oklch(0.1324 0.0033 145.3864);
|
|
1253
|
+
--sidebar-accent: oklch(0.2163 0.0025 145.4898);
|
|
1254
|
+
--sidebar-accent-foreground: oklch(0.9699 0.0013 106.4238);
|
|
1255
|
+
--sidebar-border: oklch(0.2757 0.0116 128.9395);
|
|
1256
|
+
--sidebar-ring: oklch(0.9248 0.0051 145.5339);
|
|
1145
1257
|
}`;
|
|
1146
1258
|
const parts = [];
|
|
1147
1259
|
if (tailwindMajor >= 4) {
|
|
@@ -1171,9 +1283,24 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
|
|
|
1171
1283
|
--color-success-foreground: var(--success-foreground);
|
|
1172
1284
|
--color-warning: var(--warning);
|
|
1173
1285
|
--color-warning-foreground: var(--warning-foreground);
|
|
1286
|
+
--color-info: var(--info);
|
|
1287
|
+
--color-info-foreground: var(--info-foreground);
|
|
1174
1288
|
--color-border: var(--border);
|
|
1175
1289
|
--color-input: var(--input);
|
|
1176
1290
|
--color-ring: var(--ring);
|
|
1291
|
+
--color-chart-1: var(--chart-1);
|
|
1292
|
+
--color-chart-2: var(--chart-2);
|
|
1293
|
+
--color-chart-3: var(--chart-3);
|
|
1294
|
+
--color-chart-4: var(--chart-4);
|
|
1295
|
+
--color-chart-5: var(--chart-5);
|
|
1296
|
+
--color-sidebar: var(--sidebar);
|
|
1297
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
1298
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
1299
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
1300
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
1301
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
1302
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
1303
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
1177
1304
|
--radius-sm: calc(var(--radius) - 4px);
|
|
1178
1305
|
--radius-md: calc(var(--radius) - 2px);
|
|
1179
1306
|
--radius-lg: var(--radius);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dinachi/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "CLI for adding Dinachi UI components to your project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -23,8 +23,15 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
|
-
"templates"
|
|
26
|
+
"templates",
|
|
27
|
+
"CHANGELOG.md"
|
|
27
28
|
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
31
|
+
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
32
|
+
"type-check": "tsc --noEmit",
|
|
33
|
+
"test": "pnpm run build && node --test test/**/*.test.mjs"
|
|
34
|
+
},
|
|
28
35
|
"dependencies": {
|
|
29
36
|
"chalk": "^5.3.0",
|
|
30
37
|
"commander": "^14.0.2",
|
|
@@ -37,6 +44,8 @@
|
|
|
37
44
|
},
|
|
38
45
|
"devDependencies": {
|
|
39
46
|
"@base-ui/react": "1.3.0",
|
|
47
|
+
"@json-render/core": "^0.14.0",
|
|
48
|
+
"@json-render/react": "^0.14.0",
|
|
40
49
|
"@types/fs-extra": "^11.0.4",
|
|
41
50
|
"@types/prompts": "^2.4.9",
|
|
42
51
|
"@types/react": "^19.2.14",
|
|
@@ -46,18 +55,13 @@
|
|
|
46
55
|
"react": "19.2.4",
|
|
47
56
|
"tailwind-merge": "^3.5.0",
|
|
48
57
|
"tsup": "^8.0.1",
|
|
49
|
-
"typescript": "^5.5.3"
|
|
58
|
+
"typescript": "^5.5.3",
|
|
59
|
+
"zod": "^4.0.0"
|
|
50
60
|
},
|
|
51
61
|
"peerDependencies": {
|
|
52
62
|
"typescript": ">=4.5.0"
|
|
53
63
|
},
|
|
54
64
|
"publishConfig": {
|
|
55
65
|
"access": "public"
|
|
56
|
-
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"build": "tsup src/index.ts --format esm --dts --clean",
|
|
59
|
-
"dev": "tsup src/index.ts --format esm --dts --watch",
|
|
60
|
-
"type-check": "tsc --noEmit",
|
|
61
|
-
"test": "pnpm run build && node --test test/**/*.test.mjs"
|
|
62
66
|
}
|
|
63
|
-
}
|
|
67
|
+
}
|
|
@@ -64,16 +64,13 @@ const AccordionPanel = React.forwardRef<
|
|
|
64
64
|
<BaseAccordion.Panel
|
|
65
65
|
ref={ref}
|
|
66
66
|
className={cn(
|
|
67
|
-
"overflow-hidden text-sm",
|
|
68
|
-
"
|
|
69
|
-
"data-[
|
|
70
|
-
"
|
|
67
|
+
"overflow-hidden text-sm h-[var(--accordion-panel-height)]",
|
|
68
|
+
"transition-[height] duration-200 ease-in-out",
|
|
69
|
+
"data-[starting-style]:h-0 data-[ending-style]:h-0",
|
|
70
|
+
"data-[open]:animate-in data-[open]:slide-down-from-top",
|
|
71
|
+
"data-[closed]:animate-out data-[closed]:slide-up-to-top",
|
|
71
72
|
className
|
|
72
73
|
)}
|
|
73
|
-
style={{
|
|
74
|
-
"--accordion-panel-height": "var(--accordion-panel-height)",
|
|
75
|
-
"--accordion-panel-width": "var(--accordion-panel-width)",
|
|
76
|
-
} as React.CSSProperties}
|
|
77
74
|
{...props}
|
|
78
75
|
>
|
|
79
76
|
<div className="pb-4 pt-0">{children}</div>
|
|
@@ -17,11 +17,11 @@ const badgeVariants = cva(
|
|
|
17
17
|
"border-transparent bg-destructive text-destructive-foreground",
|
|
18
18
|
outline: "text-foreground",
|
|
19
19
|
success:
|
|
20
|
-
"border-transparent bg-
|
|
20
|
+
"border-transparent bg-success text-success-foreground",
|
|
21
21
|
warning:
|
|
22
|
-
"border-transparent bg-
|
|
22
|
+
"border-transparent bg-warning text-warning-foreground",
|
|
23
23
|
info:
|
|
24
|
-
"border-transparent bg-
|
|
24
|
+
"border-transparent bg-info text-info-foreground",
|
|
25
25
|
},
|
|
26
26
|
size: {
|
|
27
27
|
sm: "px-2 py-0.5 text-xs",
|
|
@@ -78,7 +78,7 @@ const Badge = React.forwardRef<HTMLDivElement, BadgeProps>(
|
|
|
78
78
|
<button
|
|
79
79
|
type="button"
|
|
80
80
|
onClick={onDismiss}
|
|
81
|
-
className="ml-1 shrink-0 rounded-full p-0.5 hover:bg-
|
|
81
|
+
className="ml-1 shrink-0 rounded-full p-0.5 hover:bg-foreground/10 focus:outline-none focus:ring-1 focus:ring-ring/40"
|
|
82
82
|
aria-label="Remove"
|
|
83
83
|
>
|
|
84
84
|
<svg
|