@xsolla/xui-button 0.192.0 → 0.193.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/web/index.d.ts CHANGED
@@ -169,7 +169,7 @@ interface IconButtonProps extends ThemeOverrideProps {
169
169
  */
170
170
  declare const IconButton: React.FC<IconButtonProps>;
171
171
 
172
- interface FlexButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type"> {
172
+ interface FlexButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type">, ThemeOverrideProps {
173
173
  /**
174
174
  * Button label. Omit for icon-only buttons (provide `aria-label`).
175
175
  *
@@ -229,6 +229,11 @@ interface FlexButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElem
229
229
  "aria-controls"?: string;
230
230
  testID?: string;
231
231
  }
232
+ /**
233
+ * Total hit-area size of an icon-only `FlexButton`, in px. `noPadding` does not
234
+ * change it — only the inner padding is removed.
235
+ */
236
+ declare const getFlexButtonBoxSize: (size?: NonNullable<FlexButtonProps["size"]>) => number;
232
237
  /**
233
238
  * FlexButton - A compact button component designed for use in modals and popups.
234
239
  *
@@ -255,7 +260,7 @@ interface FlexButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElem
255
260
  * - **Focus Indicator**: Visible focus ring for keyboard navigation
256
261
  * - **Screen Reader Support**: Announces button label, state, and any associated descriptions
257
262
  */
258
- declare const FlexButton: React.FC<FlexButtonProps>;
263
+ declare const FlexButton: React.ForwardRefExoticComponent<FlexButtonProps & React.RefAttributes<HTMLButtonElement>>;
259
264
 
260
265
  interface AppButtonProps extends ThemeOverrideProps {
261
266
  /** Size of the button */
@@ -364,4 +369,4 @@ interface ButtonGroupProps extends ThemeOverrideProps {
364
369
  */
365
370
  declare const ButtonGroup: React.FC<ButtonGroupProps>;
366
371
 
367
- export { AppButton, type AppButtonProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, FlexButton, type FlexButtonProps, IconButton, type IconButtonProps };
372
+ export { AppButton, type AppButtonProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, FlexButton, type FlexButtonProps, IconButton, type IconButtonProps, getFlexButtonBoxSize };