@djangocfg/ui-core 2.1.592 → 2.1.594

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 CHANGED
@@ -50,16 +50,26 @@ import { UiProviders, Button, Card } from '@djangocfg/ui-core';
50
50
 
51
51
  | Group | Examples |
52
52
  |---|---|
53
- | `components/data/` | Avatar · Badge · Card · Table · BalancedText · Skeleton |
54
- | `components/forms/` | Button · Input · Textarea · Select · Switch · Checkbox · Slider · Form · DateField · TimeField · DateTimeField · MoneyField · FilterButton · FilterMenu |
55
- | `components/feedback/` | Alert · Toast · Banner · Progress · Spinner |
56
- | `components/overlay/` | Dialog · Drawer · Popover · Tooltip · HoverCard · Sheet · ContextMenu · DropdownMenu |
57
- | `components/navigation/` | Sidebar · Tabs · Breadcrumb · Pagination · NavigationMenu · Command · Disclosure |
58
- | `components/layout/` | Container · Grid · Stack · Separator · ScrollArea · Sticky · FilterBar |
59
- | `components/select/` | Combobox · MultiSelect |
60
- | `components/effects/` | Glass · Marquee · Backdrop |
61
- | `components/specialized/` | Accordion · Collapsible · Toggle · Calendar · DatePicker (legacy — prefer forms/DateField) |
62
- | `components/boundary/` | ErrorBoundary |
53
+ | `components/data/` | Avatar · AvatarGroup · Badge · BadgeOverflow · Card · Table · BalancedText · Skeleton · Stat · Status · Progress · CircularProgress · Carousel · Calendar · Toggle · ToggleGroup · RelativeTimeCard (`timeZone` prop) · Chart (subpath `/chart`) |
54
+ | `components/forms/` | Button · DownloadButton · ButtonGroup · Input · InputGroup · InputAffix · InputOTP · OTPInput · PhoneInput · MaskInput · SegmentedInput · TagsInput · Textarea · Switch · Checkbox · CheckboxGroup · RadioGroup · Slider · Form · Field · Editable · SettingRow / SettingsBlock · DateField · TimeField · DateTimeField · MoneyField · FilterButton · FilterMenu · PopoverActionButton · TimePicker (legacy) |
55
+ | `components/select/` | Select · Combobox · ComboboxAsync · MultiSelect · MultiSelectPro · CountrySelect · LanguageSelect · TimezoneSelect |
56
+ | `components/feedback/` | Alert · Toast (sonner) · Banner · Empty · Preloader · Spinner |
57
+ | `components/overlay/` | Dialog · AlertDialog · Drawer · Sheet · ResponsiveSheet · SidePanel · Popover · Tooltip · HoverCard |
58
+ | `components/navigation/` | **MenuBuilder** · DropdownMenu · ContextMenu · Menubar · NavigationMenu · Sidebar · Tabs · Breadcrumb · Pagination · Stepper · Accordion · Collapsible · Disclosure · Command · Link · PopoverRowButton |
59
+ | `components/layout/` | Card · Stack · Section · KeyValue · Separator · ScrollArea · Resizable · AspectRatio · Sticky · FilterBar · Skeleton |
60
+ | `components/effects/` | GlowBackground · Swap |
61
+ | `components/specialized/` | CopyButton · CopyField · Kbd · Flag · ImageWithFallback · Item · TokenIcon · Portal · Presence · Primitive · VisuallyHidden |
62
+ | `components/boundary/` | Boundary (error boundary, mounted by `UiProviders`) |
63
+
64
+ ### MenuBuilder
65
+
66
+ Declarative menus: pass `MenuItem[]` and a trigger, it renders through the
67
+ `DropdownMenu*` primitives. `kind` is the discriminator (`item`, `submenu`,
68
+ checkbox / radio rows, separators, labels); rows take `icon`, `description`,
69
+ `shortcut`, `href`, `hidden`, `disabled`, `variant: 'destructive'`. Row text is
70
+ `text-sm`. `@djangocfg/layouts` builds its user menu with it
71
+ (`useAccountMenuItems` / `AccountMenuButton`) — reuse that instead of a custom
72
+ menu when you need an account menu.
63
73
 
64
74
  Imports stay flat — group folders are organisational. Native-engine date/time
65
75
  fields (`DateField` / `TimeField` / `DateTimeField`) have their own reference in
@@ -189,6 +199,20 @@ fill's luminance requires it.
189
199
 
190
200
  Tailwind's `text-*` size utilities are bridged to the preset `--font-size-*` scale. Product-specific density belongs in a small CSS override after the static preset import — never in a runtime token builder. See `src/styles/README.md`.
191
201
 
202
+ **Type scale.** Plain `text-xs … text-xl` and the body size come from the
203
+ preset's `--font-size-*` (macOS preset 13/12/11px, default 14/13px). A consuming
204
+ app must **not** reset `:root --font-size-*` — that makes the same `text-sm`
205
+ differ between products and defeats the shared theme. Product-specific names
206
+ (`text-meta`, `text-body`) belong in the app's own `@theme`, not in an override
207
+ of the base scale.
208
+
209
+ **Overlays.** `bg-overlay` is the modal scrim; its frosting is `--overlay-blur`
210
+ (default `5px`, `0px` disables). Only the unprefixed `backdrop-filter` is
211
+ written because lightningcss adds `-webkit-` itself and drops the unprefixed one
212
+ when both exist. A blurred surface needs a translucent background, and nothing
213
+ inside an ancestor that has `backdrop-filter` can blur the page behind it —
214
+ portal it to `body`. Details: `src/styles/README.md` § Overlays and glass.
215
+
192
216
  **Programmatic theme colors** for Canvas / SVG / Mermaid:
193
217
 
194
218
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@djangocfg/ui-core",
3
- "version": "2.1.592",
3
+ "version": "2.1.594",
4
4
  "description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -126,12 +126,13 @@
126
126
  ],
127
127
  "scripts": {
128
128
  "lint": "eslint .",
129
- "check": "tsc --noEmit && node scripts/check-preset-contrast.mjs",
130
- "check:contrast": "node scripts/check-preset-contrast.mjs"
129
+ "check": "tsc --noEmit && node scripts/check-preset-contrast.mjs && node scripts/check-docs.mjs",
130
+ "check:contrast": "node scripts/check-preset-contrast.mjs",
131
+ "check:docs": "node scripts/check-docs.mjs"
131
132
  },
132
133
  "peerDependencies": {
133
- "@djangocfg/api": "^2.1.592",
134
- "@djangocfg/i18n": "^2.1.592",
134
+ "@djangocfg/api": "^2.1.594",
135
+ "@djangocfg/i18n": "^2.1.594",
135
136
  "consola": "^3.4.2",
136
137
  "lucide-react": "^0.545.0",
137
138
  "moment": "^2.30.1",
@@ -207,10 +208,10 @@
207
208
  "vaul": "1.1.2"
208
209
  },
209
210
  "devDependencies": {
210
- "@djangocfg/api": "^2.1.592",
211
- "@djangocfg/eslint-config": "^2.1.592",
212
- "@djangocfg/i18n": "^2.1.592",
213
- "@djangocfg/typescript-config": "^2.1.592",
211
+ "@djangocfg/api": "^2.1.594",
212
+ "@djangocfg/eslint-config": "^2.1.594",
213
+ "@djangocfg/i18n": "^2.1.594",
214
+ "@djangocfg/typescript-config": "^2.1.594",
214
215
  "@storybook/react-vite": "^10.5.0",
215
216
  "@types/node": "^24.13.3",
216
217
  "@types/react": "19.2.15",
@@ -127,7 +127,7 @@ const DropdownMenuItem = React.forwardRef<
127
127
  }
128
128
  >(({ className, inset, href, variant = "default", children, ...props }, ref) => {
129
129
  const classes = cn(
130
- "relative flex cursor-default select-none items-center gap-2 rounded-[var(--radius-sm)] px-2.5 py-1 text-base outline-none transition-colors focus:bg-foreground/[0.07] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
130
+ "relative flex cursor-default select-none items-center gap-2 rounded-[var(--radius-sm)] px-2.5 py-1 text-sm outline-none transition-colors focus:bg-foreground/[0.07] data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
131
131
  "data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive",
132
132
  inset && "pl-8",
133
133
  className
@@ -16,7 +16,6 @@
16
16
  */
17
17
  .glass-macos {
18
18
  backdrop-filter: blur(20px) saturate(180%);
19
- -webkit-backdrop-filter: blur(20px) saturate(180%);
20
19
  background-color: color-mix(in oklab, var(--background) 72%, transparent);
21
20
  }
22
21
 
@@ -27,7 +26,6 @@
27
26
  */
28
27
  .glass-win11 {
29
28
  backdrop-filter: blur(60px) saturate(125%);
30
- -webkit-backdrop-filter: blur(60px) saturate(125%);
31
29
  background-color: color-mix(in oklab, var(--background) 85%, transparent);
32
30
  }
33
31
 
@@ -38,7 +36,6 @@
38
36
  */
39
37
  .glass-liquid {
40
38
  backdrop-filter: blur(12px) saturate(180%);
41
- -webkit-backdrop-filter: blur(12px) saturate(180%);
42
39
  background-color: color-mix(in oklab, var(--card) 60%, transparent);
43
40
  border: 1px solid color-mix(in oklab, var(--foreground) 8%, transparent);
44
41
  box-shadow:
@@ -52,7 +49,6 @@
52
49
  */
53
50
  .glass-header {
54
51
  backdrop-filter: blur(8px) saturate(160%);
55
- -webkit-backdrop-filter: blur(8px) saturate(160%);
56
52
  background-color: color-mix(in oklab, var(--background) 80%, transparent);
57
53
  }
58
54
 
@@ -64,7 +60,6 @@
64
60
  */
65
61
  .nav-dropdown-glass {
66
62
  backdrop-filter: blur(var(--overlay-blur, 5px)) saturate(150%);
67
- -webkit-backdrop-filter: blur(var(--overlay-blur, 5px)) saturate(150%);
68
63
  background-color: color-mix(in oklab, var(--background) 55%, transparent);
69
64
  }
70
65
 
@@ -12,6 +12,9 @@
12
12
  * override it per theme/preset to make the backdrop crisper or softer, or set
13
13
  * it to `0px` to disable frosting entirely without touching the scrim color.
14
14
  *
15
+ * Only the unprefixed `backdrop-filter` is written: lightningcss (Tailwind v4, Next) adds `-webkit-` itself, and when both are
16
+ * written it DROPS the unprefixed one (verified), leaving Chromium with no blur at all.
17
+ *
15
18
  * Plain CSS (NOT a JIT-scanned Tailwind utility) so it compiles regardless of
16
19
  * which package's source the Tailwind content scan covers — same rationale as
17
20
  * `divider.css`.
@@ -20,7 +23,6 @@
20
23
  .bg-overlay {
21
24
  /* `--overlay-blur` defaults in base.css; a 0px value cleanly no-ops the blur. */
22
25
  backdrop-filter: blur(var(--overlay-blur, 0px));
23
- -webkit-backdrop-filter: blur(var(--overlay-blur, 0px));
24
26
  }
25
27
 
26
28
  /**