@dinachi/cli 0.8.2 → 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 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
@@ -213,7 +213,7 @@ function getComponentRegistry() {
213
213
  name: "link",
214
214
  description: "A semantic anchor element with style variants and support for external links and framework router composition.",
215
215
  files: [{ name: "link.tsx" }, { name: "index.ts" }],
216
- dependencies: ["class-variance-authority"],
216
+ dependencies: ["@base-ui/react", "class-variance-authority"],
217
217
  utilityDependencies: ["cn"]
218
218
  },
219
219
  menu: {
@@ -251,6 +251,13 @@ function getComponentRegistry() {
251
251
  dependencies: ["@base-ui/react", "lucide-react"],
252
252
  utilityDependencies: ["cn"]
253
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
+ },
254
261
  popover: {
255
262
  name: "popover",
256
263
  description: "An anchored floating panel for contextual information and lightweight interactions.",
@@ -1188,9 +1195,24 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
1188
1195
  --success-foreground: oklch(1 0 0);
1189
1196
  --warning: oklch(0.6365 0.1639 55.49);
1190
1197
  --warning-foreground: oklch(1 0 0);
1198
+ --info: oklch(0.623 0.214 259.815);
1199
+ --info-foreground: oklch(1 0 0);
1191
1200
  --border: oklch(0.9239 0.0017 145.5613);
1192
1201
  --input: oklch(0.8481 0.0105 145.4823);
1193
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);
1194
1216
  --radius: 0.625rem;
1195
1217
  }`;
1196
1218
  const darkVars = `.dark {
@@ -1214,9 +1236,24 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
1214
1236
  --success-foreground: oklch(1 0 0);
1215
1237
  --warning: oklch(0.5966 0.1499 55.49);
1216
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);
1217
1241
  --border: oklch(0.1811 0.0128 129.2819);
1218
1242
  --input: oklch(0.2213 0.0193 135.2915);
1219
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);
1220
1257
  }`;
1221
1258
  const parts = [];
1222
1259
  if (tailwindMajor >= 4) {
@@ -1246,9 +1283,24 @@ function getThemeCSS(tailwindMajor, mode, preservedThemeVars = []) {
1246
1283
  --color-success-foreground: var(--success-foreground);
1247
1284
  --color-warning: var(--warning);
1248
1285
  --color-warning-foreground: var(--warning-foreground);
1286
+ --color-info: var(--info);
1287
+ --color-info-foreground: var(--info-foreground);
1249
1288
  --color-border: var(--border);
1250
1289
  --color-input: var(--input);
1251
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);
1252
1304
  --radius-sm: calc(var(--radius) - 4px);
1253
1305
  --radius-md: calc(var(--radius) - 2px);
1254
1306
  --radius-lg: var(--radius);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dinachi/cli",
3
- "version": "0.8.2",
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",
@@ -56,11 +63,5 @@
56
63
  },
57
64
  "publishConfig": {
58
65
  "access": "public"
59
- },
60
- "scripts": {
61
- "build": "tsup src/index.ts --format esm --dts --clean",
62
- "dev": "tsup src/index.ts --format esm --dts --watch",
63
- "type-check": "tsc --noEmit",
64
- "test": "pnpm run build && node --test test/**/*.test.mjs"
65
66
  }
66
- }
67
+ }
@@ -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-green-500 text-white",
20
+ "border-transparent bg-success text-success-foreground",
21
21
  warning:
22
- "border-transparent bg-yellow-500 text-yellow-900",
22
+ "border-transparent bg-warning text-warning-foreground",
23
23
  info:
24
- "border-transparent bg-blue-500 text-white",
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-black/10 focus:outline-none focus:ring-1 focus:ring-black/20"
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
@@ -0,0 +1 @@
1
+ export * from "./otp-field"
@@ -0,0 +1,72 @@
1
+ "use client"
2
+
3
+ import * as React from "react"
4
+ import { OTPFieldPreview as OTPFieldPrimitive } from "@base-ui/react/otp-field"
5
+ import { cn } from "@/lib/utils"
6
+
7
+ const OTPField = React.forwardRef<
8
+ React.ComponentRef<typeof OTPFieldPrimitive.Root>,
9
+ React.ComponentPropsWithoutRef<typeof OTPFieldPrimitive.Root>
10
+ >(({ className, ...props }, ref) => (
11
+ <OTPFieldPrimitive.Root
12
+ ref={ref}
13
+ className={cn(
14
+ "flex items-center gap-2",
15
+ "data-[disabled]:opacity-50",
16
+ className
17
+ )}
18
+ {...props}
19
+ />
20
+ ))
21
+ OTPField.displayName = "OTPField"
22
+
23
+ const OTPFieldGroup = React.forwardRef<
24
+ HTMLDivElement,
25
+ React.HTMLAttributes<HTMLDivElement>
26
+ >(({ className, ...props }, ref) => (
27
+ <div
28
+ ref={ref}
29
+ className={cn("flex items-center", className)}
30
+ {...props}
31
+ />
32
+ ))
33
+ OTPFieldGroup.displayName = "OTPFieldGroup"
34
+
35
+ const OTPFieldInput = React.forwardRef<
36
+ React.ComponentRef<typeof OTPFieldPrimitive.Input>,
37
+ React.ComponentPropsWithoutRef<typeof OTPFieldPrimitive.Input>
38
+ >(({ className, ...props }, ref) => (
39
+ <OTPFieldPrimitive.Input
40
+ ref={ref}
41
+ className={cn(
42
+ "relative h-10 w-10 border-y border-r border-input bg-background text-center text-sm shadow-sm outline-none transition-all",
43
+ "first:rounded-l-md first:border-l last:rounded-r-md",
44
+ "focus-visible:z-10 focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/50",
45
+ "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50",
46
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20",
47
+ className
48
+ )}
49
+ {...props}
50
+ />
51
+ ))
52
+ OTPFieldInput.displayName = "OTPFieldInput"
53
+
54
+ const OTPFieldSeparator = React.forwardRef<
55
+ React.ComponentRef<typeof OTPFieldPrimitive.Separator>,
56
+ React.ComponentPropsWithoutRef<typeof OTPFieldPrimitive.Separator>
57
+ >(({ className, ...props }, ref) => (
58
+ <OTPFieldPrimitive.Separator
59
+ ref={ref}
60
+ role="separator"
61
+ className={cn("text-muted-foreground", className)}
62
+ {...props}
63
+ />
64
+ ))
65
+ OTPFieldSeparator.displayName = "OTPFieldSeparator"
66
+
67
+ export type OTPFieldProps = React.ComponentPropsWithoutRef<typeof OTPFieldPrimitive.Root>
68
+ export type OTPFieldGroupProps = React.HTMLAttributes<HTMLDivElement>
69
+ export type OTPFieldInputProps = React.ComponentPropsWithoutRef<typeof OTPFieldPrimitive.Input>
70
+ export type OTPFieldSeparatorProps = React.ComponentPropsWithoutRef<typeof OTPFieldPrimitive.Separator>
71
+
72
+ export { OTPField, OTPFieldGroup, OTPFieldInput, OTPFieldSeparator }
@@ -39,16 +39,18 @@ const SelectContent = React.forwardRef<
39
39
  readonly sideOffset?: number
40
40
  readonly portal?: boolean
41
41
  }
42
- >(({ className, children, alignItemWithTrigger = false, sideOffset = 4, portal = true, ...props }, ref) => {
42
+ >(({ className, children, alignItemWithTrigger = false, sideOffset = 4, portal = false, ...props }, ref) => {
43
43
  const content = (
44
44
  <SelectPrimitive.Positioner
45
45
  sideOffset={sideOffset}
46
46
  alignItemWithTrigger={alignItemWithTrigger}
47
+ positionMethod="fixed"
48
+ className="z-50"
47
49
  >
48
50
  <SelectPrimitive.Popup
49
51
  ref={ref}
50
52
  className={cn(
51
- "relative z-50 max-h-96 min-w-[var(--anchor-width)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
53
+ "relative max-h-96 min-w-[var(--anchor-width)] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",
52
54
  "data-[open]:animate-in data-[closed]:animate-out data-[closed]:fade-out-0 data-[open]:fade-in-0 data-[closed]:zoom-out-95 data-[open]:zoom-in-95",
53
55
  "data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
54
56
  !alignItemWithTrigger &&
@@ -73,7 +73,7 @@ const SliderThumb = React.forwardRef<
73
73
  <BaseSlider.Thumb
74
74
  ref={ref}
75
75
  className={cn(
76
- "block h-5 w-5 z-10 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors",
76
+ "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors",
77
77
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
78
78
  "data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
79
79
  "data-[dragging]:scale-110",
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 DinachiUI
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.