@bubo-squared/ui-framework 0.2.33 → 0.2.34

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
@@ -532,6 +532,32 @@ interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEle
532
532
  }
533
533
  declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
534
534
 
535
+ type SegmentedSwitchValue = string;
536
+ type SegmentedSwitchOption = {
537
+ label: React$1.ReactNode;
538
+ value: SegmentedSwitchValue;
539
+ /** Accessible label used when `label` is not a plain string (e.g. an icon). */
540
+ "aria-label"?: string;
541
+ };
542
+ interface SegmentedSwitchProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
543
+ /**
544
+ * Only needed when the component is a part of a native form.
545
+ * Provide this to include the value in native form submission / FormData.
546
+ */
547
+ name?: string;
548
+ /**
549
+ * Options rendered as segments.
550
+ */
551
+ options: SegmentedSwitchOption[];
552
+ value: SegmentedSwitchValue;
553
+ onValueChange: (nextValue: SegmentedSwitchValue) => void;
554
+ /** Accessible label for the radiogroup — recommended when the surrounding context doesn't already label the control. */
555
+ "aria-label"?: string;
556
+ disabled?: boolean;
557
+ pill?: boolean;
558
+ }
559
+ declare const SegmentedSwitch: React$1.ForwardRefExoticComponent<SegmentedSwitchProps & React$1.RefAttributes<HTMLDivElement>>;
560
+
535
561
  type SliderDisplay = "flat" | "numeric" | "tooltip";
536
562
  type SliderTooltipPlacement = "top" | "bottom";
537
563
  type SliderBaseProps = {
@@ -760,4 +786,4 @@ declare const Logo: FC<LogoProps>;
760
786
 
761
787
  declare function cn(...inputs: ClassValue[]): string;
762
788
 
763
- export { Accordion, Autocomplete, Avatar, Badge, BadgeDigit, BadgeDot, BadgeStatus, Breadcrumbs, Button, ButtonGroup, Checkbox, Divider, Field, IconButton, IconButtonGroup, LinkButton, Logo, LogoIcon, Menu, MenuGroup, MenuItem, MenuLabel, MenuPortal, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, MenuSubTrigger, MessageButton, PasswordInput, PhoneInput, Popover, Progress, RadioGroup, SearchInput, Select, Slider, StatusAvatar, Tag, TextArea, TextInput, Toggle, Tooltip, TooltipProvider, Typography, WebsiteInput, cn };
789
+ export { Accordion, Autocomplete, Avatar, Badge, BadgeDigit, BadgeDot, BadgeStatus, Breadcrumbs, Button, ButtonGroup, Checkbox, Divider, Field, IconButton, IconButtonGroup, LinkButton, Logo, LogoIcon, Menu, MenuGroup, MenuItem, MenuLabel, MenuPortal, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, MenuSubTrigger, MessageButton, PasswordInput, PhoneInput, Popover, Progress, RadioGroup, SearchInput, SegmentedSwitch, Select, Slider, StatusAvatar, Tag, TextArea, TextInput, Toggle, Tooltip, TooltipProvider, Typography, WebsiteInput, cn };
package/dist/index.d.ts CHANGED
@@ -532,6 +532,32 @@ interface SearchInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputEle
532
532
  }
533
533
  declare const SearchInput: React$1.ForwardRefExoticComponent<SearchInputProps & React$1.RefAttributes<HTMLInputElement>>;
534
534
 
535
+ type SegmentedSwitchValue = string;
536
+ type SegmentedSwitchOption = {
537
+ label: React$1.ReactNode;
538
+ value: SegmentedSwitchValue;
539
+ /** Accessible label used when `label` is not a plain string (e.g. an icon). */
540
+ "aria-label"?: string;
541
+ };
542
+ interface SegmentedSwitchProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "onChange"> {
543
+ /**
544
+ * Only needed when the component is a part of a native form.
545
+ * Provide this to include the value in native form submission / FormData.
546
+ */
547
+ name?: string;
548
+ /**
549
+ * Options rendered as segments.
550
+ */
551
+ options: SegmentedSwitchOption[];
552
+ value: SegmentedSwitchValue;
553
+ onValueChange: (nextValue: SegmentedSwitchValue) => void;
554
+ /** Accessible label for the radiogroup — recommended when the surrounding context doesn't already label the control. */
555
+ "aria-label"?: string;
556
+ disabled?: boolean;
557
+ pill?: boolean;
558
+ }
559
+ declare const SegmentedSwitch: React$1.ForwardRefExoticComponent<SegmentedSwitchProps & React$1.RefAttributes<HTMLDivElement>>;
560
+
535
561
  type SliderDisplay = "flat" | "numeric" | "tooltip";
536
562
  type SliderTooltipPlacement = "top" | "bottom";
537
563
  type SliderBaseProps = {
@@ -760,4 +786,4 @@ declare const Logo: FC<LogoProps>;
760
786
 
761
787
  declare function cn(...inputs: ClassValue[]): string;
762
788
 
763
- export { Accordion, Autocomplete, Avatar, Badge, BadgeDigit, BadgeDot, BadgeStatus, Breadcrumbs, Button, ButtonGroup, Checkbox, Divider, Field, IconButton, IconButtonGroup, LinkButton, Logo, LogoIcon, Menu, MenuGroup, MenuItem, MenuLabel, MenuPortal, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, MenuSubTrigger, MessageButton, PasswordInput, PhoneInput, Popover, Progress, RadioGroup, SearchInput, Select, Slider, StatusAvatar, Tag, TextArea, TextInput, Toggle, Tooltip, TooltipProvider, Typography, WebsiteInput, cn };
789
+ export { Accordion, Autocomplete, Avatar, Badge, BadgeDigit, BadgeDot, BadgeStatus, Breadcrumbs, Button, ButtonGroup, Checkbox, Divider, Field, IconButton, IconButtonGroup, LinkButton, Logo, LogoIcon, Menu, MenuGroup, MenuItem, MenuLabel, MenuPortal, MenuSeparator, MenuShortcut, MenuSub, MenuSubContent, MenuSubTrigger, MessageButton, PasswordInput, PhoneInput, Popover, Progress, RadioGroup, SearchInput, SegmentedSwitch, Select, Slider, StatusAvatar, Tag, TextArea, TextInput, Toggle, Tooltip, TooltipProvider, Typography, WebsiteInput, cn };