@djangocfg/ui-core 2.1.453 → 2.1.454
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/package.json +4 -4
- package/src/components/overlay/alert-dialog/index.tsx +1 -1
- package/src/components/overlay/dialog/index.tsx +1 -1
- package/src/components/overlay/drawer/index.tsx +1 -1
- package/src/components/overlay/sheet/index.tsx +1 -1
- package/src/styles/README.md +3 -2
- package/src/styles/base.css +4 -4
- package/src/styles/utilities/overlay.css +15 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@djangocfg/ui-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.454",
|
|
4
4
|
"description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui-components",
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"check": "tsc --noEmit"
|
|
120
120
|
},
|
|
121
121
|
"peerDependencies": {
|
|
122
|
-
"@djangocfg/i18n": "^2.1.
|
|
122
|
+
"@djangocfg/i18n": "^2.1.454",
|
|
123
123
|
"consola": "^3.4.2",
|
|
124
124
|
"lucide-react": "^0.545.0",
|
|
125
125
|
"moment": "^2.30.1",
|
|
@@ -197,8 +197,8 @@
|
|
|
197
197
|
"@chenglou/pretext": "*"
|
|
198
198
|
},
|
|
199
199
|
"devDependencies": {
|
|
200
|
-
"@djangocfg/i18n": "^2.1.
|
|
201
|
-
"@djangocfg/typescript-config": "^2.1.
|
|
200
|
+
"@djangocfg/i18n": "^2.1.454",
|
|
201
|
+
"@djangocfg/typescript-config": "^2.1.454",
|
|
202
202
|
"@types/node": "^25.2.3",
|
|
203
203
|
"@types/react": "^19.2.15",
|
|
204
204
|
"@types/react-dom": "^19.2.3",
|
|
@@ -19,7 +19,7 @@ const AlertDialogOverlay = React.forwardRef<
|
|
|
19
19
|
>(({ className, style, ...props }, ref) => (
|
|
20
20
|
<AlertDialogPrimitive.Overlay
|
|
21
21
|
className={cn(
|
|
22
|
-
"fixed inset-0 z-600 overlay
|
|
22
|
+
"fixed inset-0 z-600 bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
23
23
|
className
|
|
24
24
|
)}
|
|
25
25
|
style={style}
|
|
@@ -22,7 +22,7 @@ const DialogOverlay = React.forwardRef<
|
|
|
22
22
|
<DialogPrimitive.Overlay
|
|
23
23
|
ref={ref}
|
|
24
24
|
className={cn(
|
|
25
|
-
"fixed inset-0 z-600 overlay
|
|
25
|
+
"fixed inset-0 z-600 bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
26
26
|
className
|
|
27
27
|
)}
|
|
28
28
|
style={style}
|
|
@@ -50,7 +50,7 @@ const DrawerOverlay = React.forwardRef<
|
|
|
50
50
|
>(({ className, style, ...props }, ref) => (
|
|
51
51
|
<DrawerPrimitive.Overlay
|
|
52
52
|
ref={ref}
|
|
53
|
-
className={cn("fixed inset-0 z-500 overlay
|
|
53
|
+
className={cn("fixed inset-0 z-500 bg-overlay transition-opacity duration-200", className)}
|
|
54
54
|
style={style}
|
|
55
55
|
{...props}
|
|
56
56
|
/>
|
|
@@ -22,7 +22,7 @@ const SheetOverlay = React.forwardRef<
|
|
|
22
22
|
>(({ className, style, ...props }, ref) => (
|
|
23
23
|
<SheetPrimitive.Overlay
|
|
24
24
|
className={cn(
|
|
25
|
-
"fixed inset-0 z-200 overlay
|
|
25
|
+
"fixed inset-0 z-200 bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
26
26
|
className
|
|
27
27
|
)}
|
|
28
28
|
style={style}
|
package/src/styles/README.md
CHANGED
|
@@ -11,7 +11,7 @@ styles/
|
|
|
11
11
|
├── theme.css # Imports tokens.css → animations → light → dark
|
|
12
12
|
├── base.css # Resets + `*` border-color + body bg/color + radius scale + native focus-outline reset
|
|
13
13
|
├── utilities.css # Custom utilities entry — imports utilities/*
|
|
14
|
-
│ └── utilities/ # display · divider · controls · step · animations · glass · marquee
|
|
14
|
+
│ └── utilities/ # display · divider · overlay · controls · step · animations · glass · marquee
|
|
15
15
|
├── sources.css # @source directives for monorepo class detection
|
|
16
16
|
├── palette/ # JS-readable color access (Canvas/SVG/Mermaid)
|
|
17
17
|
└── theme/
|
|
@@ -70,7 +70,7 @@ This makes opacity modifiers (`bg-card/40`, `border-foreground/20`) resolve thro
|
|
|
70
70
|
| `bg-destructive` / `text-destructive-foreground` | `--destructive` | Error / delete filled controls |
|
|
71
71
|
| `border-border` | `--border` | **Outlines only** — card frames, control/input edges. *Not* for separators (see Presets § Border vs divider) |
|
|
72
72
|
| `border-divider` / `.divider-b` / `bg-divider` | `--divider` | **All separators** — columns, header `border-b`, list rows, resize handles. A soft hairline (translucent on dark themes) so the chrome never reads as a heavy grid |
|
|
73
|
-
| `bg-overlay` | `--overlay` | Modal scrim / backdrop behind dialogs, drawers, sheets — black scrim in both themes
|
|
73
|
+
| `bg-overlay` | `--overlay` | Modal scrim / backdrop behind dialogs, drawers, sheets — black scrim in both themes (the token owns the opacity), **plus** a `backdrop-filter` frost via `--overlay-blur` (`utilities/overlay.css` augments this same class) |
|
|
74
74
|
| `bg-input` | `--input` | Input **fill** — a notch off the panel so fields read as real controls (not flush holes). The input *border* uses `--border`, not `--input` |
|
|
75
75
|
| `ring-ring` | `--ring` | Focus rings, selected outlines — **blue** (system-accent feel), independent of the cyan brand |
|
|
76
76
|
|
|
@@ -273,6 +273,7 @@ Some classes are authored as **plain CSS** in `utilities/*.css` (not Tailwind ut
|
|
|
273
273
|
| Class | File | Why plain CSS |
|
|
274
274
|
|---|---|---|
|
|
275
275
|
| `.divider-b` / `.divider-t` | `utilities/divider.css` | Hairline via `--divider` |
|
|
276
|
+
| `.bg-overlay` (frost) | `utilities/overlay.css` | Adds `backdrop-filter: blur(var(--overlay-blur))` onto Tailwind's own `bg-overlay` so modal backdrops frost the page. Tune via `--overlay-blur` (base.css, default 2px; `0px` disables). Attached to `.bg-overlay` — not a new class — so overlays and host forks that render `bg-overlay` all get it |
|
|
276
277
|
| `.rounded-control` | `utilities/controls.css` | Shared control radius |
|
|
277
278
|
|
|
278
279
|
> **JIT-scan gotcha.** Tailwind's content scan covers `ui-core/src` but **not always every consumer package** (e.g. the `layouts` package source isn't always scanned by Storybook/apps). A *new* arbitrary Tailwind class used **only** in a consumer (`border-zinc-500/25`, `border-foreground/[0.12]`, `rounded-[var(--x)]`) then produces **no CSS rule** and silently falls back to the global `* { border-color: var(--border) }` — the class is in the DOM but the computed color is wrong. **Fix pattern:** for any token-driven visual that consumers need, add a plain `.class` in `ui-core/styles/utilities/*` and `@import` it, then use that class downstream. Don't invent new Tailwind classes in the `layouts` package.
|
package/src/styles/base.css
CHANGED
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
--radius-dialog: 1rem;
|
|
20
20
|
--radius-tooltip: 0.375rem;
|
|
21
21
|
|
|
22
|
-
/* Modal backdrop frosting — how hard the `.overlay
|
|
23
|
-
* / sheet
|
|
22
|
+
/* Modal backdrop frosting — how hard the `.bg-overlay` scrim (dialog / drawer
|
|
23
|
+
* / sheet) blurs the page behind it. Theme-agnostic (same both modes);
|
|
24
24
|
* a preset can override for a heavier/lighter frost, or set `0px` to disable
|
|
25
|
-
* the blur while keeping the `--overlay` dimming scrim.
|
|
26
|
-
--overlay-blur:
|
|
25
|
+
* the blur while keeping the `--overlay` dimming scrim. 2px = a subtle frost. */
|
|
26
|
+
--overlay-blur: 2px;
|
|
27
27
|
|
|
28
28
|
/* Typography tokens — overridable per preset */
|
|
29
29
|
--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Modal backdrop
|
|
2
|
+
* Modal backdrop frosting — the blur behind dialogs, drawers, sheets.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* The dimming scrim is Tailwind's `bg-overlay` (`--overlay`, a themed
|
|
5
|
+
* `hsl(… / α)` token). Blur can't live in that color token (`--overlay` is a
|
|
6
|
+
* color, blur is a filter), so we attach `backdrop-filter` to the SAME
|
|
7
|
+
* `.bg-overlay` class every overlay already renders — no extra class, no
|
|
8
|
+
* component churn, and host forks of Dialog that render `bg-overlay` directly
|
|
9
|
+
* get the frost for free.
|
|
7
10
|
*
|
|
8
|
-
* Blur
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* disable frosting entirely without touching the scrim color.
|
|
11
|
+
* Blur strength rides its own `--overlay-blur` variable (default in base.css) —
|
|
12
|
+
* override it per theme/preset to make the backdrop crisper or softer, or set
|
|
13
|
+
* it to `0px` to disable frosting entirely without touching the scrim color.
|
|
12
14
|
*
|
|
13
|
-
* Plain CSS
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* sheet overlays.
|
|
15
|
+
* Plain CSS (NOT a JIT-scanned Tailwind utility) so it compiles regardless of
|
|
16
|
+
* which package's source the Tailwind content scan covers — same rationale as
|
|
17
|
+
* `divider.css`.
|
|
17
18
|
*/
|
|
18
19
|
|
|
19
|
-
.overlay
|
|
20
|
-
|
|
21
|
-
/* `--overlay-blur` defaults in base.css; a 0 value cleanly no-ops the blur. */
|
|
20
|
+
.bg-overlay {
|
|
21
|
+
/* `--overlay-blur` defaults in base.css; a 0px value cleanly no-ops the blur. */
|
|
22
22
|
backdrop-filter: blur(var(--overlay-blur, 0px));
|
|
23
23
|
-webkit-backdrop-filter: blur(var(--overlay-blur, 0px));
|
|
24
24
|
}
|