@nimbus-ds/components 5.30.0 → 5.32.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.d.ts CHANGED
@@ -2251,6 +2251,11 @@ export interface ButtonProperties {
2251
2251
  * @default false
2252
2252
  */
2253
2253
  fullWidth?: boolean;
2254
+ /**
2255
+ * Change the size of the button.
2256
+ * @default medium
2257
+ */
2258
+ size?: "medium" | "small";
2254
2259
  }
2255
2260
  export type ButtonBaseProps = ButtonProperties & ButtonHTMLAttributes<HTMLButtonElement>;
2256
2261
  export declare const Button: PolymorphicForwardRefComponent<"button" | "a", ButtonBaseProps> & ButtonComponents;
@@ -4030,5 +4035,93 @@ export interface SegmentedControlContextValue {
4030
4035
  * @throws Error if not within a SegmentedControl
4031
4036
  */
4032
4037
  export declare const useSegmentedControlContext: () => SegmentedControlContextValue;
4038
+ export interface SplitButtonActionProperties {
4039
+ /**
4040
+ * The content of the action item.
4041
+ * @TJS-type React.ReactNode
4042
+ */
4043
+ children: ReactNode;
4044
+ /**
4045
+ * Optional icon to display before the action text.
4046
+ * @TJS-type React.ReactNode
4047
+ */
4048
+ icon?: ReactNode;
4049
+ /**
4050
+ * Callback function when the action is clicked.
4051
+ * @TJS-type () => void;
4052
+ */
4053
+ onClick?: () => void;
4054
+ /**
4055
+ * Disables the action item.
4056
+ * @default false
4057
+ */
4058
+ disabled?: boolean;
4059
+ }
4060
+ export type SplitButtonActionProps = SplitButtonActionProperties & Pick<BoxProps, "backgroundColor" | "borderWidth" | "display" | "alignItems" | "gap" | "p" | "borderRadius">;
4061
+ declare const SplitButtonAction: React.FC<SplitButtonActionProps>;
4062
+ export interface SplitButtonPrimaryProperties {
4063
+ /**
4064
+ * The content of the primary button.
4065
+ * @TJS-type React.ReactNode
4066
+ */
4067
+ children: ReactNode;
4068
+ /**
4069
+ * Callback function when the primary button is clicked.
4070
+ * @TJS-type () => void;
4071
+ */
4072
+ onClick?: () => void;
4073
+ }
4074
+ export type SplitButtonPrimaryProps = SplitButtonPrimaryProperties & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "children">;
4075
+ declare const SplitButtonPrimary: React.FC<SplitButtonPrimaryProps>;
4076
+ export interface SplitButtonSecondaryProperties {
4077
+ /**
4078
+ * The content of the secondary dropdown menu.
4079
+ * @TJS-type React.ReactNode
4080
+ */
4081
+ children: ReactNode;
4082
+ /**
4083
+ * Accessible label for the dropdown button.
4084
+ * @default "Show more actions"
4085
+ */
4086
+ ariaLabel?: string;
4087
+ }
4088
+ export type SplitButtonSecondaryProps = SplitButtonSecondaryProperties & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children">;
4089
+ declare const SplitButtonSecondary: React.FC<SplitButtonSecondaryProps>;
4090
+ export interface SplitButtonComponents {
4091
+ Action: typeof SplitButtonAction;
4092
+ Primary: typeof SplitButtonPrimary;
4093
+ Secondary: typeof SplitButtonSecondary;
4094
+ }
4095
+ export interface SplitButtonProperties {
4096
+ /**
4097
+ * The subcomponents (Primary and Secondary).
4098
+ * @TJS-type React.ReactNode
4099
+ */
4100
+ children: ReactNode;
4101
+ /**
4102
+ * Disables the entire split button.
4103
+ * @default false
4104
+ */
4105
+ disabled?: boolean;
4106
+ /**
4107
+ * Controls the visibility of the popover.
4108
+ */
4109
+ open?: boolean;
4110
+ /**
4111
+ * Callback function to control popover opening and closing.
4112
+ * @TJS-type (open: boolean) => void;
4113
+ */
4114
+ onOpenChange?: (open: boolean) => void;
4115
+ /**
4116
+ * Position of the popover relative to the button.
4117
+ * @default bottom-end
4118
+ */
4119
+ popoverPosition?: PopoverProps["position"];
4120
+ }
4121
+ export type SplitButtonProps = SplitButtonProperties & Omit<BoxProps, "children" | "display" | "gap" | "position">;
4122
+ /**
4123
+ * SplitButton component allows users to perform actions by clicking a primary button and displaying a dropdown menu with additional actions.
4124
+ */
4125
+ export declare const SplitButton: React.FC<SplitButtonProps> & SplitButtonComponents;
4033
4126
 
4034
4127
  export {};