@djangocfg/ui-core 2.1.436 → 2.1.437

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.436",
3
+ "version": "2.1.437",
4
4
  "description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -106,7 +106,7 @@
106
106
  "check": "tsc --noEmit"
107
107
  },
108
108
  "peerDependencies": {
109
- "@djangocfg/i18n": "^2.1.436",
109
+ "@djangocfg/i18n": "^2.1.437",
110
110
  "consola": "^3.4.2",
111
111
  "lucide-react": "^0.545.0",
112
112
  "moment": "^2.30.1",
@@ -180,8 +180,8 @@
180
180
  "@chenglou/pretext": "*"
181
181
  },
182
182
  "devDependencies": {
183
- "@djangocfg/i18n": "^2.1.436",
184
- "@djangocfg/typescript-config": "^2.1.436",
183
+ "@djangocfg/i18n": "^2.1.437",
184
+ "@djangocfg/typescript-config": "^2.1.437",
185
185
  "@types/node": "^25.2.3",
186
186
  "@types/react": "^19.2.15",
187
187
  "@types/react-dom": "^19.2.3",
@@ -34,7 +34,17 @@ function BalancedTextImpl({
34
34
  style,
35
35
  ...rest
36
36
  }: BalancedTextProps) {
37
- const Tag = (as ?? 'span') as React.ElementType;
37
+ // Typed as a concrete component shape rather than the bare `React.ElementType`
38
+ // union: under React 19 types, rendering an `ElementType` union with `ref` +
39
+ // `children` collapses those props to `never` (TS2745/TS2322). Pinning the
40
+ // accepted props keeps the dynamic tag while staying type-safe.
41
+ const Tag = (as ?? 'span') as React.ComponentType<
42
+ React.HTMLAttributes<HTMLElement> & {
43
+ ref?: React.Ref<HTMLElement>;
44
+ 'data-slot'?: string;
45
+ 'data-measured'?: string;
46
+ }
47
+ >;
38
48
  const ref = React.useRef<HTMLElement | null>(null);
39
49
 
40
50
  // Resolve the font: explicit prop wins; otherwise read computed style after mount.