@djangocfg/ui-core 2.1.152 → 2.1.154

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.152",
3
+ "version": "2.1.154",
4
4
  "description": "Pure React UI component library without Next.js dependencies - for Electron, Vite, CRA apps",
5
5
  "keywords": [
6
6
  "ui-components",
@@ -71,7 +71,7 @@
71
71
  "playground": "playground dev"
72
72
  },
73
73
  "peerDependencies": {
74
- "@djangocfg/i18n": "^2.1.152",
74
+ "@djangocfg/i18n": "^2.1.154",
75
75
  "react-device-detect": "^2.2.3",
76
76
  "consola": "^3.4.2",
77
77
  "lucide-react": "^0.545.0",
@@ -133,9 +133,9 @@
133
133
  "vaul": "1.1.2"
134
134
  },
135
135
  "devDependencies": {
136
- "@djangocfg/i18n": "^2.1.152",
136
+ "@djangocfg/i18n": "^2.1.154",
137
137
  "@djangocfg/playground": "workspace:*",
138
- "@djangocfg/typescript-config": "^2.1.152",
138
+ "@djangocfg/typescript-config": "^2.1.154",
139
139
  "@types/node": "^24.7.2",
140
140
  "@types/react": "^19.1.0",
141
141
  "@types/react-dom": "^19.1.0",
@@ -284,7 +284,7 @@ export function CountrySelect({
284
284
  }
285
285
 
286
286
  if (!multiple && selectedCountries.length === 1) {
287
- const country = selectedCountries[0];
287
+ const country = selectedCountries[0]!;
288
288
  return (
289
289
  <div className="flex items-center gap-2">
290
290
  <span>{country.emoji}</span>
@@ -141,7 +141,7 @@ const popoverAnimations = {
141
141
  // ==================== HELPERS ====================
142
142
 
143
143
  function isGroupedOptions(options: MultiSelectProAsyncOption[] | MultiSelectProAsyncGroup[]): options is MultiSelectProAsyncGroup[] {
144
- return options.length > 0 && 'heading' in options[0]
144
+ return options.length > 0 && 'heading' in options[0]!
145
145
  }
146
146
 
147
147
  function flattenOptions(options: MultiSelectProAsyncOption[] | MultiSelectProAsyncGroup[]): MultiSelectProAsyncOption[] {
@@ -122,7 +122,7 @@ export interface MultiSelectProProps extends VariantProps<typeof multiSelectVari
122
122
  // ==================== HELPERS ====================
123
123
 
124
124
  function isGroupedOptions(options: MultiSelectProOption[] | MultiSelectProGroup[]): options is MultiSelectProGroup[] {
125
- return options.length > 0 && 'heading' in options[0]
125
+ return options.length > 0 && 'heading' in options[0]!
126
126
  }
127
127
 
128
128
  function flattenOptions(options: MultiSelectProOption[] | MultiSelectProGroup[]): MultiSelectProOption[] {
@@ -213,8 +213,8 @@ export const MultiSelectPro = React.forwardRef<MultiSelectProRef, MultiSelectPro
213
213
  })
214
214
  }, [flatOptions, selectedValues])
215
215
 
216
- // Responsive configuration
217
- const responsiveConfig = React.useMemo((): ResponsiveConfig => {
216
+ // Responsive configuration (reserved for future use)
217
+ const _responsiveConfig = React.useMemo((): ResponsiveConfig => {
218
218
  if (typeof responsive === 'boolean') {
219
219
  return responsive
220
220
  ? {
@@ -1,4 +1,5 @@
1
- import type { OTPInputProps as BaseOTPInputProps } from 'input-otp'
1
+ // Reserved for future use
2
+ // import type { OTPInputProps as BaseOTPInputProps } from 'input-otp'
2
3
 
3
4
  /**
4
5
  * OTP Input validation modes
@@ -12,7 +12,8 @@ import React from 'react';
12
12
 
13
13
  import { useTypedT, type I18nTranslations } from '@djangocfg/i18n';
14
14
  import { cn } from '../lib/utils';
15
- import { Spinner } from './spinner';
15
+ // Spinner is available for future use
16
+ // import { Spinner } from './spinner';
16
17
 
17
18
  export interface PreloaderProps {
18
19
  /**
@@ -23,7 +23,7 @@ export interface ScrollAreaHandle {
23
23
  export interface ScrollAreaProps
24
24
  extends React.ComponentPropsWithoutRef<typeof ScrollAreaPrimitive.Root> {
25
25
  /** Ref to access the viewport element directly */
26
- viewportRef?: React.RefObject<HTMLDivElement>;
26
+ viewportRef?: React.RefObject<HTMLDivElement | null>;
27
27
  /** Additional className for the viewport */
28
28
  viewportClassName?: string;
29
29
  }
@@ -13,14 +13,15 @@ export const Section = ({
13
13
  children,
14
14
  className,
15
15
  variant = "default",
16
- size = "lg"
16
+ size: _size = "lg"
17
17
  }: SectionProps) => {
18
- const paddingClasses = {
19
- sm: "py-12",
20
- md: "py-16",
21
- lg: "py-24",
22
- xl: "py-32"
23
- };
18
+ // Reserved for future use
19
+ // const paddingClasses = {
20
+ // sm: "py-12",
21
+ // md: "py-16",
22
+ // lg: "py-24",
23
+ // xl: "py-32"
24
+ // };
24
25
 
25
26
  const variantClasses = {
26
27
  default: "bg-background",
@@ -115,7 +115,7 @@ export function TokenIcon({
115
115
  ...props
116
116
  }: TokenIconProps) {
117
117
  const [IconComponent, setIconComponent] = React.useState<React.ComponentType<any> | null>(null)
118
- const [loading, setLoading] = React.useState(true)
118
+ const [_loading, setLoading] = React.useState(true)
119
119
 
120
120
  React.useEffect(() => {
121
121
  let mounted = true
@@ -80,7 +80,7 @@ export function useLocalStorage<T>(
80
80
  const ttl = options?.ttl;
81
81
  // Always start with initialValue to match SSR
82
82
  const [storedValue, setStoredValue] = useState<T>(initialValue);
83
- const [isHydrated, setIsHydrated] = useState(false);
83
+ const [_isHydrated, setIsHydrated] = useState(false);
84
84
  const isInitialized = useRef(false);
85
85
 
86
86
  // Read from localStorage after mount (avoids hydration mismatch)
@@ -54,7 +54,7 @@ export function DialogProvider({ children }: DialogProviderProps) {
54
54
  useEffect(() => {
55
55
  if (!current && queue.length > 0) {
56
56
  const [next, ...rest] = queue;
57
- setCurrent(next);
57
+ setCurrent(next ?? null);
58
58
  setQueue(rest);
59
59
  }
60
60
  }, [current, queue]);
@@ -8,7 +8,7 @@
8
8
 
9
9
  'use client';
10
10
 
11
- import { consola, type ConsolaInstance } from 'consola';
11
+ import { consola } from 'consola';
12
12
 
13
13
  import { useLogStore } from './logStore';
14
14