@djangocfg/ui-core 2.1.593 → 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.
Files changed (2) hide show
  1. package/README.md +34 -10
  2. package/package.json +10 -9
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.593",
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.593",
134
- "@djangocfg/i18n": "^2.1.593",
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.593",
211
- "@djangocfg/eslint-config": "^2.1.593",
212
- "@djangocfg/i18n": "^2.1.593",
213
- "@djangocfg/typescript-config": "^2.1.593",
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",