@alto-avios/alto-ui 1.2.1-alpha.3 → 1.2.1-alpha.4

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.
@@ -1,4 +1,4 @@
1
- import { ElementType } from 'react';
1
+ import { ComponentType, ElementType } from 'react';
2
2
  import { AriaButtonProps, PressEvent } from 'react-aria';
3
3
  export type NewButtonSize = 'lg' | 'md' | 'sm';
4
4
  export interface NewButtonProps<T extends ElementType> extends AriaButtonProps<T> {
@@ -77,6 +77,7 @@ export interface NewButtonProps<T extends ElementType> extends AriaButtonProps<T
77
77
  * What type of focus style to apply to the button.
78
78
  */
79
79
  focusStyle?: 'default' | 'white';
80
+ passthroughProps?: Partial<T extends ComponentType<infer P> ? P : T extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[T] : never>;
80
81
  }
81
- export declare const NewButton: <T extends ElementType = "button">({ as, styleType, emphasis, size, hasLeadingIcon, leadingIconName, hasTrailingIcon, trailingIconName, isDisabled, href, target, children, fullWidth, onClick, focusStyle, ...props }: NewButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
82
+ export declare const NewButton: <T extends ElementType = "button">({ as, styleType, emphasis, size, hasLeadingIcon, leadingIconName, hasTrailingIcon, trailingIconName, isDisabled, href, target, children, fullWidth, onClick, focusStyle, passthroughProps, ...props }: NewButtonProps<T>) => import("react/jsx-runtime").JSX.Element;
82
83
  export default NewButton;
@@ -1401,6 +1401,7 @@ const NewButton = ({
1401
1401
  fullWidth: fullWidth2,
1402
1402
  onClick,
1403
1403
  focusStyle = "default",
1404
+ passthroughProps,
1404
1405
  ...props
1405
1406
  }) => {
1406
1407
  const ref = useRef(null);
@@ -1450,7 +1451,7 @@ const NewButton = ({
1450
1451
  const Component = as;
1451
1452
  return /* @__PURE__ */ jsx(Component, { className: `${className} ${focusStyleVariants({
1452
1453
  focusStyle
1453
- })}`, ref, "data-focused": isFocused ? true : void 0, "data-hovered": isHovered ? true : void 0, "data-pressed": isPressed ? true : void 0, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...filteredButtonProps, children: /* @__PURE__ */ jsxs(Fragment, { children: [
1454
+ })}`, ref, "data-focused": isFocused ? true : void 0, "data-hovered": isHovered ? true : void 0, "data-pressed": isPressed ? true : void 0, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...filteredButtonProps, ...passthroughProps, children: /* @__PURE__ */ jsxs(Fragment, { children: [
1454
1455
  hasLeadingIcon && leadingIconName ? /* @__PURE__ */ jsx(Icon, { iconName: leadingIconName || "" }) : null,
1455
1456
  children,
1456
1457
  hasTrailingIcon && trailingIconName ? /* @__PURE__ */ jsx(Icon, { iconName: trailingIconName || "" }) : null
@@ -1 +1 @@
1
- {"version":3,"file":"NewButton.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alto-avios/alto-ui",
3
- "version": "1.2.1-alpha.3",
3
+ "version": "1.2.1-alpha.4",
4
4
  "description": "A react component library for Alto Design System",
5
5
  "author": "Ian Caldwell IAGL",
6
6
  "license": "MIT",