@bubo-squared/ui-framework 0.2.21 → 0.2.23

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.d.cts CHANGED
@@ -137,8 +137,8 @@ type BadgeVariant = "primary" | "secondary" | "informal" | "success" | "warning"
137
137
  type BadgeSize = "sm" | "md" | "lg" | "xl";
138
138
  interface BadgeProps extends VariantProps<typeof badgeVariants> {
139
139
  asChild?: boolean;
140
- label: string;
141
- value?: string;
140
+ label: React$1.ReactNode;
141
+ value?: React$1.ReactNode;
142
142
  className?: string;
143
143
  size?: BadgeSize;
144
144
  variant?: BadgeVariant;
@@ -168,7 +168,7 @@ interface BadgeDotProps extends VariantProps<typeof badgeDotVariants> {
168
168
  declare const BadgeDot: React$1.FC<BadgeDotProps>;
169
169
 
170
170
  interface BadgeStatusProps extends React$1.HTMLAttributes<HTMLDivElement> {
171
- label: string;
171
+ label: React$1.ReactNode;
172
172
  active?: boolean;
173
173
  dotClassName?: string;
174
174
  }
@@ -184,7 +184,7 @@ interface BaseDividerProps extends React$1.HTMLAttributes<HTMLDivElement> {
184
184
  /** Size variant for the divider (affects line thickness + center element sizing). */
185
185
  size?: DividerSize;
186
186
  /** Label shown for text variant (e.g. "OR"). */
187
- label?: string;
187
+ label?: React$1.ReactNode;
188
188
  }
189
189
  type ButtonVariant = ButtonProps$1["variant"];
190
190
  type IconButtonVariant = ButtonProps["variant"];
@@ -211,7 +211,7 @@ interface ButtonLinesDividerProps extends React$1.HTMLAttributes<HTMLDivElement>
211
211
  /** Size variant for the divider (affects line thickness + button size). */
212
212
  size?: DividerSize;
213
213
  /** Text inside the button between the lines. */
214
- buttonLabel: string;
214
+ buttonLabel: React$1.ReactNode;
215
215
  /** onClick handler for the button between the lines. */
216
216
  onButtonClick: React$1.MouseEventHandler<HTMLButtonElement>;
217
217
  /** Variant for the button between the lines. */
@@ -235,9 +235,11 @@ interface ProgressProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "ch
235
235
  /** Current value, from 0 to 100. */
236
236
  value: number;
237
237
  /** Optional label shown above the bar. */
238
- label?: string;
238
+ label?: React$1.ReactNode;
239
239
  /** Optional hint text shown below the bar. */
240
- hint?: string;
240
+ hint?: React$1.ReactNode;
241
+ /** Optional accessible label for the progressbar (string-only). */
242
+ ariaLabel?: string;
241
243
  /** Controls whether the progress percentage label is rendered. */
242
244
  showProgressLabel?: boolean;
243
245
  /** If true, the hint will not be rendered even if provided. */
@@ -263,8 +265,8 @@ declare const tagVariants: (props?: ({
263
265
  } & class_variance_authority_types.ClassProp) | undefined) => string;
264
266
  interface TagProps extends VariantProps<typeof tagVariants> {
265
267
  asChild?: boolean;
266
- label: string;
267
- value?: string;
268
+ label: React$1.ReactNode;
269
+ value?: React$1.ReactNode;
268
270
  className?: string;
269
271
  leadingIcon?: React$1.ReactElement<{
270
272
  disabled?: boolean;
@@ -272,7 +274,7 @@ interface TagProps extends VariantProps<typeof tagVariants> {
272
274
  trailingIcon?: React$1.ReactElement<{
273
275
  disabled?: boolean;
274
276
  }>;
275
- size: "sm" | "md";
277
+ size?: "sm" | "md";
276
278
  disabled?: boolean;
277
279
  }
278
280
  declare const Tag: React$1.ForwardRefExoticComponent<TagProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -327,15 +329,15 @@ declare const MenuSubTrigger: typeof DropdownMenuSubTrigger;
327
329
  interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
328
330
  /** Only needed when the component is a part of a native form. */
329
331
  name?: string;
330
- label?: string;
332
+ label?: React$1.ReactNode;
331
333
  }
332
334
  declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
333
335
 
334
336
  type TextInputSize = "sm" | "md" | "lg" | "xl";
335
337
  type TextInputStatus = "default" | "success" | "error";
336
338
  interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled"> {
337
- label?: string;
338
- hint?: string;
339
+ label?: React$1.ReactNode;
340
+ hint?: React$1.ReactNode;
339
341
  /**
340
342
  * If true, the hint will not be rendered even if provided.
341
343
  */
@@ -355,8 +357,8 @@ interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
355
357
  declare const TextInput: React$1.ForwardRefExoticComponent<TextInputProps & React$1.RefAttributes<HTMLInputElement>>;
356
358
 
357
359
  interface AutocompleteProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled" | "value" | "defaultValue" | "onChange"> {
358
- label?: string;
359
- hint?: string;
360
+ label?: React$1.ReactNode;
361
+ hint?: React$1.ReactNode;
360
362
  /** If true, the hint will not be rendered even if provided. */
361
363
  hideHint?: boolean;
362
364
  status?: TextInputStatus;
@@ -377,6 +379,11 @@ interface AutocompleteProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEl
377
379
  inputValue?: string;
378
380
  defaultInputValue?: string;
379
381
  onInputChange?: (value: string) => void;
382
+ /**
383
+ * If true, free-typed input is also treated as the committed value.
384
+ * Selecting an option from the dropdown still overrides the value.
385
+ */
386
+ freeSolo?: boolean;
380
387
  /** Optional className for the dropdown (options container). */
381
388
  dropdownClassName?: string;
382
389
  /** Optional className for the listbox (<ul>). */
@@ -386,7 +393,7 @@ declare const Autocomplete: React$1.ForwardRefExoticComponent<AutocompleteProps
386
393
 
387
394
  type SelectStatus = "default" | "success" | "error";
388
395
  interface SelectOption {
389
- label: string;
396
+ label: React$1.ReactNode;
390
397
  value: string;
391
398
  }
392
399
  declare const selectTriggerVariants: (props?: ({
@@ -394,8 +401,8 @@ declare const selectTriggerVariants: (props?: ({
394
401
  status?: "error" | "success" | "default" | null | undefined;
395
402
  } & class_variance_authority_types.ClassProp) | undefined) => string;
396
403
  interface SelectProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "onChange">, VariantProps<typeof selectTriggerVariants> {
397
- label?: string;
398
- hint?: string;
404
+ label?: React$1.ReactNode;
405
+ hint?: React$1.ReactNode;
399
406
  /**
400
407
  * If true, the hint will not be rendered even if provided.
401
408
  */
@@ -419,9 +426,9 @@ declare const Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.Re
419
426
 
420
427
  type FieldStatus = "default" | "success" | "error";
421
428
  interface FieldProps {
422
- label?: string;
429
+ label?: React$1.ReactNode;
423
430
  labelRight?: React$1.ReactNode;
424
- hint?: string;
431
+ hint?: React$1.ReactNode;
425
432
  /**
426
433
  * If true, the hint will not be rendered even if provided.
427
434
  */
@@ -437,8 +444,8 @@ type PasswordInputSize = "sm" | "md" | "lg" | "xl";
437
444
  type PasswordInputStatus = "default" | "success" | "error";
438
445
  type PasswordInputVariant = "icon" | "text";
439
446
  interface PasswordInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "disabled"> {
440
- label?: string;
441
- hint?: string;
447
+ label?: React$1.ReactNode;
448
+ hint?: React$1.ReactNode;
442
449
  /**
443
450
  * If true, the hint will not be rendered even if provided.
444
451
  */
@@ -461,8 +468,8 @@ type PhoneInputProps = Omit<React$1.ComponentProps<"input">, "onChange" | "value
461
468
  onChange?: (value: RPNInput.Value) => void;
462
469
  } & {
463
470
  className?: string;
464
- label?: string;
465
- hint?: string;
471
+ label?: React$1.ReactNode;
472
+ hint?: React$1.ReactNode;
466
473
  /**
467
474
  * If true, the hint will not be rendered even if provided.
468
475
  */
@@ -482,12 +489,12 @@ declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps>;
482
489
  type RadioGroupOrientation = "vertical" | "horizontal";
483
490
  interface RadioGroupOption {
484
491
  value: string;
485
- label: string;
492
+ label: React$1.ReactNode;
486
493
  disabled?: boolean;
487
494
  }
488
495
  interface RadioGroupProps extends Omit<RadioGroupPrimitive.RadioGroupProps, "children" | "orientation" | "onValueChange"> {
489
- label?: string;
490
- hint?: string;
496
+ label?: React$1.ReactNode;
497
+ hint?: React$1.ReactNode;
491
498
  /** Only needed when the component is a part of a native form. */
492
499
  name?: string;
493
500
  /** Only needed when the component is a part of a native form. */
@@ -564,8 +571,8 @@ declare const Slider: React$1.ForwardRefExoticComponent<SliderProps & React$1.Re
564
571
 
565
572
  type TextAreaType = "responsive" | "character-limit" | "plain";
566
573
  interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "disabled"> {
567
- label?: string;
568
- hint?: string;
574
+ label?: React$1.ReactNode;
575
+ hint?: React$1.ReactNode;
569
576
  /**
570
577
  * If true, the hint will not be rendered even if provided.
571
578
  */
@@ -601,7 +608,7 @@ interface ToggleProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>
601
608
  * Provide this to include the checked value in native form submission / FormData.
602
609
  */
603
610
  name?: string;
604
- label?: string;
611
+ label?: React$1.ReactNode;
605
612
  }
606
613
  declare const Toggle: React$1.ForwardRefExoticComponent<ToggleProps & React$1.RefAttributes<HTMLInputElement>>;
607
614
 
@@ -627,9 +634,9 @@ declare const WebsiteInput: React$1.ForwardRefExoticComponent<WebsiteInputProps
627
634
  type PopoverPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
628
635
  interface PopoverProps {
629
636
  children: React$1.ReactNode;
630
- strapline?: string;
631
- title: string;
632
- description?: string;
637
+ strapline?: React$1.ReactNode;
638
+ title: React$1.ReactNode;
639
+ description?: React$1.ReactNode;
633
640
  onOk?: () => void;
634
641
  okText?: string;
635
642
  onCancel?: () => void;
@@ -653,9 +660,9 @@ declare const Popover: React$1.FC<PopoverProps>;
653
660
  type TooltipPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
654
661
  interface TooltipProps {
655
662
  children: React$1.ReactNode;
656
- strapline?: string;
657
- title: string;
658
- description?: string;
663
+ strapline?: React$1.ReactNode;
664
+ title: React$1.ReactNode;
665
+ description?: React$1.ReactNode;
659
666
  showArrow?: boolean;
660
667
  className?: string;
661
668
  placement?: TooltipPlacement;
package/dist/index.d.ts CHANGED
@@ -137,8 +137,8 @@ type BadgeVariant = "primary" | "secondary" | "informal" | "success" | "warning"
137
137
  type BadgeSize = "sm" | "md" | "lg" | "xl";
138
138
  interface BadgeProps extends VariantProps<typeof badgeVariants> {
139
139
  asChild?: boolean;
140
- label: string;
141
- value?: string;
140
+ label: React$1.ReactNode;
141
+ value?: React$1.ReactNode;
142
142
  className?: string;
143
143
  size?: BadgeSize;
144
144
  variant?: BadgeVariant;
@@ -168,7 +168,7 @@ interface BadgeDotProps extends VariantProps<typeof badgeDotVariants> {
168
168
  declare const BadgeDot: React$1.FC<BadgeDotProps>;
169
169
 
170
170
  interface BadgeStatusProps extends React$1.HTMLAttributes<HTMLDivElement> {
171
- label: string;
171
+ label: React$1.ReactNode;
172
172
  active?: boolean;
173
173
  dotClassName?: string;
174
174
  }
@@ -184,7 +184,7 @@ interface BaseDividerProps extends React$1.HTMLAttributes<HTMLDivElement> {
184
184
  /** Size variant for the divider (affects line thickness + center element sizing). */
185
185
  size?: DividerSize;
186
186
  /** Label shown for text variant (e.g. "OR"). */
187
- label?: string;
187
+ label?: React$1.ReactNode;
188
188
  }
189
189
  type ButtonVariant = ButtonProps$1["variant"];
190
190
  type IconButtonVariant = ButtonProps["variant"];
@@ -211,7 +211,7 @@ interface ButtonLinesDividerProps extends React$1.HTMLAttributes<HTMLDivElement>
211
211
  /** Size variant for the divider (affects line thickness + button size). */
212
212
  size?: DividerSize;
213
213
  /** Text inside the button between the lines. */
214
- buttonLabel: string;
214
+ buttonLabel: React$1.ReactNode;
215
215
  /** onClick handler for the button between the lines. */
216
216
  onButtonClick: React$1.MouseEventHandler<HTMLButtonElement>;
217
217
  /** Variant for the button between the lines. */
@@ -235,9 +235,11 @@ interface ProgressProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "ch
235
235
  /** Current value, from 0 to 100. */
236
236
  value: number;
237
237
  /** Optional label shown above the bar. */
238
- label?: string;
238
+ label?: React$1.ReactNode;
239
239
  /** Optional hint text shown below the bar. */
240
- hint?: string;
240
+ hint?: React$1.ReactNode;
241
+ /** Optional accessible label for the progressbar (string-only). */
242
+ ariaLabel?: string;
241
243
  /** Controls whether the progress percentage label is rendered. */
242
244
  showProgressLabel?: boolean;
243
245
  /** If true, the hint will not be rendered even if provided. */
@@ -263,8 +265,8 @@ declare const tagVariants: (props?: ({
263
265
  } & class_variance_authority_types.ClassProp) | undefined) => string;
264
266
  interface TagProps extends VariantProps<typeof tagVariants> {
265
267
  asChild?: boolean;
266
- label: string;
267
- value?: string;
268
+ label: React$1.ReactNode;
269
+ value?: React$1.ReactNode;
268
270
  className?: string;
269
271
  leadingIcon?: React$1.ReactElement<{
270
272
  disabled?: boolean;
@@ -272,7 +274,7 @@ interface TagProps extends VariantProps<typeof tagVariants> {
272
274
  trailingIcon?: React$1.ReactElement<{
273
275
  disabled?: boolean;
274
276
  }>;
275
- size: "sm" | "md";
277
+ size?: "sm" | "md";
276
278
  disabled?: boolean;
277
279
  }
278
280
  declare const Tag: React$1.ForwardRefExoticComponent<TagProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -327,15 +329,15 @@ declare const MenuSubTrigger: typeof DropdownMenuSubTrigger;
327
329
  interface CheckboxProps extends React$1.ComponentPropsWithoutRef<typeof CheckboxPrimitive.Root> {
328
330
  /** Only needed when the component is a part of a native form. */
329
331
  name?: string;
330
- label?: string;
332
+ label?: React$1.ReactNode;
331
333
  }
332
334
  declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
333
335
 
334
336
  type TextInputSize = "sm" | "md" | "lg" | "xl";
335
337
  type TextInputStatus = "default" | "success" | "error";
336
338
  interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled"> {
337
- label?: string;
338
- hint?: string;
339
+ label?: React$1.ReactNode;
340
+ hint?: React$1.ReactNode;
339
341
  /**
340
342
  * If true, the hint will not be rendered even if provided.
341
343
  */
@@ -355,8 +357,8 @@ interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEleme
355
357
  declare const TextInput: React$1.ForwardRefExoticComponent<TextInputProps & React$1.RefAttributes<HTMLInputElement>>;
356
358
 
357
359
  interface AutocompleteProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "size" | "disabled" | "value" | "defaultValue" | "onChange"> {
358
- label?: string;
359
- hint?: string;
360
+ label?: React$1.ReactNode;
361
+ hint?: React$1.ReactNode;
360
362
  /** If true, the hint will not be rendered even if provided. */
361
363
  hideHint?: boolean;
362
364
  status?: TextInputStatus;
@@ -377,6 +379,11 @@ interface AutocompleteProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEl
377
379
  inputValue?: string;
378
380
  defaultInputValue?: string;
379
381
  onInputChange?: (value: string) => void;
382
+ /**
383
+ * If true, free-typed input is also treated as the committed value.
384
+ * Selecting an option from the dropdown still overrides the value.
385
+ */
386
+ freeSolo?: boolean;
380
387
  /** Optional className for the dropdown (options container). */
381
388
  dropdownClassName?: string;
382
389
  /** Optional className for the listbox (<ul>). */
@@ -386,7 +393,7 @@ declare const Autocomplete: React$1.ForwardRefExoticComponent<AutocompleteProps
386
393
 
387
394
  type SelectStatus = "default" | "success" | "error";
388
395
  interface SelectOption {
389
- label: string;
396
+ label: React$1.ReactNode;
390
397
  value: string;
391
398
  }
392
399
  declare const selectTriggerVariants: (props?: ({
@@ -394,8 +401,8 @@ declare const selectTriggerVariants: (props?: ({
394
401
  status?: "error" | "success" | "default" | null | undefined;
395
402
  } & class_variance_authority_types.ClassProp) | undefined) => string;
396
403
  interface SelectProps extends Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, "onChange">, VariantProps<typeof selectTriggerVariants> {
397
- label?: string;
398
- hint?: string;
404
+ label?: React$1.ReactNode;
405
+ hint?: React$1.ReactNode;
399
406
  /**
400
407
  * If true, the hint will not be rendered even if provided.
401
408
  */
@@ -419,9 +426,9 @@ declare const Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.Re
419
426
 
420
427
  type FieldStatus = "default" | "success" | "error";
421
428
  interface FieldProps {
422
- label?: string;
429
+ label?: React$1.ReactNode;
423
430
  labelRight?: React$1.ReactNode;
424
- hint?: string;
431
+ hint?: React$1.ReactNode;
425
432
  /**
426
433
  * If true, the hint will not be rendered even if provided.
427
434
  */
@@ -437,8 +444,8 @@ type PasswordInputSize = "sm" | "md" | "lg" | "xl";
437
444
  type PasswordInputStatus = "default" | "success" | "error";
438
445
  type PasswordInputVariant = "icon" | "text";
439
446
  interface PasswordInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "disabled"> {
440
- label?: string;
441
- hint?: string;
447
+ label?: React$1.ReactNode;
448
+ hint?: React$1.ReactNode;
442
449
  /**
443
450
  * If true, the hint will not be rendered even if provided.
444
451
  */
@@ -461,8 +468,8 @@ type PhoneInputProps = Omit<React$1.ComponentProps<"input">, "onChange" | "value
461
468
  onChange?: (value: RPNInput.Value) => void;
462
469
  } & {
463
470
  className?: string;
464
- label?: string;
465
- hint?: string;
471
+ label?: React$1.ReactNode;
472
+ hint?: React$1.ReactNode;
466
473
  /**
467
474
  * If true, the hint will not be rendered even if provided.
468
475
  */
@@ -482,12 +489,12 @@ declare const PhoneInput: React$1.ForwardRefExoticComponent<PhoneInputProps>;
482
489
  type RadioGroupOrientation = "vertical" | "horizontal";
483
490
  interface RadioGroupOption {
484
491
  value: string;
485
- label: string;
492
+ label: React$1.ReactNode;
486
493
  disabled?: boolean;
487
494
  }
488
495
  interface RadioGroupProps extends Omit<RadioGroupPrimitive.RadioGroupProps, "children" | "orientation" | "onValueChange"> {
489
- label?: string;
490
- hint?: string;
496
+ label?: React$1.ReactNode;
497
+ hint?: React$1.ReactNode;
491
498
  /** Only needed when the component is a part of a native form. */
492
499
  name?: string;
493
500
  /** Only needed when the component is a part of a native form. */
@@ -564,8 +571,8 @@ declare const Slider: React$1.ForwardRefExoticComponent<SliderProps & React$1.Re
564
571
 
565
572
  type TextAreaType = "responsive" | "character-limit" | "plain";
566
573
  interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "disabled"> {
567
- label?: string;
568
- hint?: string;
574
+ label?: React$1.ReactNode;
575
+ hint?: React$1.ReactNode;
569
576
  /**
570
577
  * If true, the hint will not be rendered even if provided.
571
578
  */
@@ -601,7 +608,7 @@ interface ToggleProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>
601
608
  * Provide this to include the checked value in native form submission / FormData.
602
609
  */
603
610
  name?: string;
604
- label?: string;
611
+ label?: React$1.ReactNode;
605
612
  }
606
613
  declare const Toggle: React$1.ForwardRefExoticComponent<ToggleProps & React$1.RefAttributes<HTMLInputElement>>;
607
614
 
@@ -627,9 +634,9 @@ declare const WebsiteInput: React$1.ForwardRefExoticComponent<WebsiteInputProps
627
634
  type PopoverPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
628
635
  interface PopoverProps {
629
636
  children: React$1.ReactNode;
630
- strapline?: string;
631
- title: string;
632
- description?: string;
637
+ strapline?: React$1.ReactNode;
638
+ title: React$1.ReactNode;
639
+ description?: React$1.ReactNode;
633
640
  onOk?: () => void;
634
641
  okText?: string;
635
642
  onCancel?: () => void;
@@ -653,9 +660,9 @@ declare const Popover: React$1.FC<PopoverProps>;
653
660
  type TooltipPlacement = "top" | "topLeft" | "topRight" | "bottom" | "bottomLeft" | "bottomRight" | "left" | "leftTop" | "leftBottom" | "right" | "rightTop" | "rightBottom";
654
661
  interface TooltipProps {
655
662
  children: React$1.ReactNode;
656
- strapline?: string;
657
- title: string;
658
- description?: string;
663
+ strapline?: React$1.ReactNode;
664
+ title: React$1.ReactNode;
665
+ description?: React$1.ReactNode;
659
666
  showArrow?: boolean;
660
667
  className?: string;
661
668
  placement?: TooltipPlacement;