@capitaltg/vero 1.10.8 → 1.11.0
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/dist/index.cjs +64 -62
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.js +3804 -3714
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +61 -5
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -141,6 +141,10 @@ export declare interface AutocompleteProps<T, K extends keyof T, L extends keyof
|
|
|
141
141
|
* @default 'Failed to load options'
|
|
142
142
|
*/
|
|
143
143
|
errorMessage?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Additional class names for the popover content (e.g. to set min-width or width).
|
|
146
|
+
*/
|
|
147
|
+
popoverClassName?: string;
|
|
144
148
|
/**
|
|
145
149
|
* Z-index value for the popover dropdown.
|
|
146
150
|
* If not provided, uses the default z-index from the theme.
|
|
@@ -225,15 +229,19 @@ export declare interface CheckboxGroupProps extends Omit<HTMLAttributes<HTMLDivE
|
|
|
225
229
|
value: string[];
|
|
226
230
|
onChange: (value: string[]) => void;
|
|
227
231
|
className?: string;
|
|
232
|
+
/** Number of columns for default and tile variants (vertical orientation). Defaults to 1. */
|
|
228
233
|
columns?: 1 | 2 | 3 | 4;
|
|
229
234
|
orientation?: 'horizontal' | 'vertical';
|
|
230
235
|
variant?: 'default' | 'tile' | 'button';
|
|
231
236
|
}
|
|
232
237
|
|
|
233
238
|
export declare interface CheckboxOption {
|
|
239
|
+
/** Option identifier (used in value array). Consider standardizing with RadioGroup, which uses "value" for the option key. */
|
|
234
240
|
id: string;
|
|
235
241
|
label: string;
|
|
236
242
|
description?: string;
|
|
243
|
+
/** Optional explicit id for the checkbox input. Defaults to `${groupId}-${id}` when CheckboxGroup has an id. */
|
|
244
|
+
inputId?: string;
|
|
237
245
|
}
|
|
238
246
|
|
|
239
247
|
export declare interface CheckboxProps extends Omit<ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root>, 'checked' | 'disabled'> {
|
|
@@ -262,9 +270,26 @@ export declare interface ComboboxProps extends Omit<ButtonHTMLAttributes<HTMLBut
|
|
|
262
270
|
placeholder?: string;
|
|
263
271
|
searchPlaceholder?: string;
|
|
264
272
|
emptyMessage?: string;
|
|
273
|
+
/**
|
|
274
|
+
* Custom filter function for search. Receives the option's value and current search string.
|
|
275
|
+
* Return 0 to hide the item, or a positive number to show it (higher = better match rank).
|
|
276
|
+
* When not provided, default filtering matches by both value and label (case-insensitive substring).
|
|
277
|
+
*/
|
|
278
|
+
filter?: (value: string, search: string) => number;
|
|
265
279
|
className?: string;
|
|
266
280
|
listClassName?: string;
|
|
281
|
+
/** Additional class names for the popover content (e.g. to set min-width or width). */
|
|
282
|
+
popoverClassName?: string;
|
|
283
|
+
/**
|
|
284
|
+
* Z-index value for the popover dropdown.
|
|
285
|
+
* If not provided, uses the default z-index from the theme.
|
|
286
|
+
*/
|
|
267
287
|
zIndex?: number;
|
|
288
|
+
/**
|
|
289
|
+
* Whether the component is disabled.
|
|
290
|
+
* When true, the combobox cannot be interacted with.
|
|
291
|
+
* @default false
|
|
292
|
+
*/
|
|
268
293
|
isDisabled?: boolean;
|
|
269
294
|
/**
|
|
270
295
|
* The name attribute for form submission.
|
|
@@ -527,7 +552,18 @@ export declare interface MultiSelectProps extends Omit<HTMLAttributes<HTMLDivEle
|
|
|
527
552
|
emptyMessage?: string;
|
|
528
553
|
className?: string;
|
|
529
554
|
listClassName?: string;
|
|
555
|
+
/** Additional class names for the popover content (e.g. to set min-width or width). */
|
|
556
|
+
popoverClassName?: string;
|
|
557
|
+
/**
|
|
558
|
+
* Z-index value for the popover dropdown.
|
|
559
|
+
* If not provided, uses the default z-index from the theme.
|
|
560
|
+
*/
|
|
530
561
|
zIndex?: number;
|
|
562
|
+
/**
|
|
563
|
+
* Whether the component is disabled.
|
|
564
|
+
* When true, the multi-select cannot be interacted with.
|
|
565
|
+
* @default false
|
|
566
|
+
*/
|
|
531
567
|
isDisabled?: boolean;
|
|
532
568
|
/**
|
|
533
569
|
* The name attribute for form submission.
|
|
@@ -566,20 +602,36 @@ export declare const Radio: React_2.ForwardRefExoticComponent<RadioProps & React
|
|
|
566
602
|
|
|
567
603
|
export declare const RadioGroup: React_2.ForwardRefExoticComponent<RadioGroupProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
568
604
|
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
value: string;
|
|
572
|
-
onChange: (value: string) => void;
|
|
605
|
+
declare type RadioGroupBaseProps = Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>, 'onValueChange' | 'onChange'> & {
|
|
606
|
+
value?: string;
|
|
607
|
+
onChange?: (value: string) => void;
|
|
573
608
|
className?: string;
|
|
609
|
+
/** Number of columns for default and tile variants (vertical orientation). Defaults to 1. */
|
|
574
610
|
columns?: 1 | 2 | 3 | 4;
|
|
575
611
|
orientation?: 'horizontal' | 'vertical';
|
|
576
612
|
variant?: 'default' | 'tile' | 'button';
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
export declare type RadioGroupProps = RadioGroupPropsWithOptions | RadioGroupPropsWithChildren;
|
|
616
|
+
|
|
617
|
+
/** Use with Radio components as children when you need custom layout or structure. */
|
|
618
|
+
declare interface RadioGroupPropsWithChildren extends RadioGroupBaseProps {
|
|
619
|
+
options?: never;
|
|
620
|
+
children: ReactNode;
|
|
621
|
+
}
|
|
622
|
+
|
|
623
|
+
/** Use with an `options` array; RadioGroup renders Radio items and applies layout. */
|
|
624
|
+
declare interface RadioGroupPropsWithOptions extends RadioGroupBaseProps {
|
|
625
|
+
options: RadioOption[];
|
|
626
|
+
children?: never;
|
|
577
627
|
}
|
|
578
628
|
|
|
579
629
|
export declare interface RadioOption {
|
|
580
630
|
value: string;
|
|
581
631
|
label: string;
|
|
582
632
|
description?: string;
|
|
633
|
+
/** Optional explicit id for the radio input. Defaults to `${groupId}-${value}` when RadioGroup has an id. */
|
|
634
|
+
id?: string;
|
|
583
635
|
}
|
|
584
636
|
|
|
585
637
|
export declare interface RadioProps extends Omit<ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>, 'checked' | 'disabled'> {
|
|
@@ -656,6 +708,8 @@ export declare const SelectTrigger: React_2.ForwardRefExoticComponent<SelectTrig
|
|
|
656
708
|
|
|
657
709
|
export declare interface SelectTriggerProps extends Omit<ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>, 'disabled'> {
|
|
658
710
|
isDisabled?: boolean;
|
|
711
|
+
/** When false, the trigger value span is shown with muted styling (placeholder state). */
|
|
712
|
+
hasValue?: boolean;
|
|
659
713
|
}
|
|
660
714
|
|
|
661
715
|
export declare const SelectValue: React_2.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & React_2.RefAttributes<HTMLSpanElement>>;
|
|
@@ -812,7 +866,7 @@ export declare interface TooltipProps extends Omit<ComponentPropsWithoutRef<type
|
|
|
812
866
|
zIndex?: number;
|
|
813
867
|
}
|
|
814
868
|
|
|
815
|
-
export declare
|
|
869
|
+
export declare function TooltipProvider({ delayDuration, ...props }: Readonly<React_2.ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>>): JSX_2.Element;
|
|
816
870
|
|
|
817
871
|
export declare const tw: <T extends string>(strings: TemplateStringsArray, ...values: unknown[]) => T;
|
|
818
872
|
|
|
@@ -839,6 +893,8 @@ declare type UseAriaDisabledActive = {
|
|
|
839
893
|
onClick: (evt: React.MouseEvent) => void;
|
|
840
894
|
onTouchStart: (evt: React.TouchEvent) => void;
|
|
841
895
|
onTouchEnd: (evt: React.TouchEvent) => void;
|
|
896
|
+
onPointerDown: (evt: React.PointerEvent) => void;
|
|
897
|
+
onPointerDownCapture: (evt: React.PointerEvent) => void;
|
|
842
898
|
onKeyDown: (evt: React.KeyboardEvent) => void;
|
|
843
899
|
onKeyUp: (evt: React.KeyboardEvent) => void;
|
|
844
900
|
onKeyPress: (evt: React.KeyboardEvent) => void;
|