@djangocfg/ui-core 2.1.450 → 2.1.453

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ui-core",
3
- "version": "2.1.450",
3
+ "version": "2.1.453",
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.450",
122
+ "@djangocfg/i18n": "^2.1.453",
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.450",
201
- "@djangocfg/typescript-config": "^2.1.450",
200
+ "@djangocfg/i18n": "^2.1.453",
201
+ "@djangocfg/typescript-config": "^2.1.453",
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 bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
22
+ "fixed inset-0 z-600 overlay-backdrop 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 bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
25
+ "fixed inset-0 z-600 overlay-backdrop 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 bg-overlay transition-opacity duration-200", className)}
53
+ className={cn("fixed inset-0 z-500 overlay-backdrop 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 bg-overlay data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
25
+ "fixed inset-0 z-200 overlay-backdrop 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}
@@ -19,6 +19,12 @@
19
19
  --radius-dialog: 1rem;
20
20
  --radius-tooltip: 0.375rem;
21
21
 
22
+ /* Modal backdrop frosting — how hard the `.overlay-backdrop` (dialog / drawer
23
+ * / sheet scrim) blurs the page behind it. Theme-agnostic (same both modes);
24
+ * a preset can override for a heavier/lighter frost, or set `0px` to disable
25
+ * the blur while keeping the `--overlay` dimming scrim. 8px = a light frost. */
26
+ --overlay-blur: 8px;
27
+
22
28
  /* Typography tokens — overridable per preset */
23
29
  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
24
30
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Modal backdrop utility — the scrim behind dialogs, drawers, sheets.
3
+ *
4
+ * One class owns BOTH layers of a modal backdrop:
5
+ * 1. the dimming scrim → `--overlay` (a themed `hsl(… / α)` token)
6
+ * 2. a light frosting → `backdrop-filter: blur(var(--overlay-blur))`
7
+ *
8
+ * Blur can't live in the color token (`--overlay` is a color, blur is a
9
+ * filter), so it rides its own `--overlay-blur` variable — override it per
10
+ * theme/preset to make the backdrop crisper or softer, or set it to `0` to
11
+ * disable frosting entirely without touching the scrim color.
12
+ *
13
+ * Plain CSS class (NOT a JIT-scanned Tailwind utility) so it compiles
14
+ * regardless of which package's source the Tailwind content scan covers —
15
+ * same rationale as `divider.css`. Used by dialog / alert-dialog / drawer /
16
+ * sheet overlays.
17
+ */
18
+
19
+ .overlay-backdrop {
20
+ background-color: var(--overlay);
21
+ /* `--overlay-blur` defaults in base.css; a 0 value cleanly no-ops the blur. */
22
+ backdrop-filter: blur(var(--overlay-blur, 0px));
23
+ -webkit-backdrop-filter: blur(var(--overlay-blur, 0px));
24
+ }
@@ -8,6 +8,7 @@
8
8
 
9
9
  @import './utilities/display.css';
10
10
  @import './utilities/divider.css';
11
+ @import './utilities/overlay.css';
11
12
  @import './utilities/controls.css';
12
13
  @import './utilities/step.css';
13
14
  @import './utilities/animations.css';