Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mirohq/design-system-base-button

Package Overview
Dependencies
Maintainers
2
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mirohq/design-system-base-button - npm Package Compare versions

Comparing version 0.4.10 to 0.4.11-use-press.0

123

dist/main.js

@@ -5,10 +5,11 @@ 'use strict';

var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var button = require('@react-aria/button');
var utils = require('@react-aria/utils');
var designSystemUtils = require('@mirohq/design-system-utils');
var interactions = require('@react-aria/interactions');
var utils = require('@react-aria/utils');
var link = require('@react-aria/link');
var focus = require('@react-aria/focus');
var designSystemUsePress = require('@mirohq/design-system-use-press');
var designSystemPrimitive = require('@mirohq/design-system-primitive');
var designSystemStitches = require('@mirohq/design-system-stitches');
var designSystemStyles = require('@mirohq/design-system-styles');

@@ -34,13 +35,8 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

},
'&[aria-disabled="true"]': {
"&[aria-disabled]": {
cursor: "default"
}
},
...designSystemStyles.focus.defaults
});
function eventHandler(callback, allowEvent) {
if (allowEvent) {
return callback;
}
return void 0;
}
const BaseButton = React__default["default"].forwardRef(

@@ -50,77 +46,50 @@ ({

"aria-disabled": ariaDisabled,
href,
target,
rel,
children,
onClick,
asChild,
role,
onHoverStart,
onHoverEnd,
onHoverChange,
onPress,
onPressStart,
onPressEnd,
onPressChange,
onFocus,
onBlur,
onFocusChange,
...restProps
}, forwardRef) => {
const asLink = href != null;
const ref = React.useRef(null);
const refWithFallback = forwardRef != null ? forwardRef : ref;
const allowPressEvents = ariaDisabled !== "true" && ariaDisabled !== true;
const commonProps = {
isDisabled: disabled,
onPress: eventHandler(onPress != null ? onPress : onClick, allowPressEvents),
onPressStart: eventHandler(onPressStart, allowPressEvents),
onPressEnd: eventHandler(onPressEnd, allowPressEvents),
onPressChange: eventHandler(onPressChange, allowPressEvents),
onFocusChange,
onFocus,
onBlur
};
const { buttonProps, isPressed } = button.useButton(
{
href,
allowFocusWhenDisabled: false,
...commonProps,
...restProps
},
refWithFallback
);
const { linkProps } = link.useLink(
{ ...commonProps, ...restProps },
refWithFallback
);
const tabIndexProp = disabled && {
tabIndex: -1
};
const { isFocusVisible, focusProps: focusPropsRing } = focus.useFocusRing();
const asLink = "href" in restProps;
const { href, target, rel = "" } = restProps;
let elementProps = restProps;
if (designSystemUtils.booleanify(ariaDisabled)) {
elementProps = designSystemUtils.removeEventProps(elementProps, ["onBlur", "onFocus"]);
}
const { pressProps, isPressed } = designSystemUsePress.usePress({
preventFocusOnPress: true,
disabled: disabled || designSystemUtils.booleanify(ariaDisabled),
...elementProps
});
const { hoverProps, isHovered } = interactions.useHover({
onHoverStart: (e) => onHoverStart == null ? void 0 : onHoverStart(e),
onHoverEnd: (e) => onHoverEnd == null ? void 0 : onHoverEnd(e),
onHoverChange: (e) => onHoverChange == null ? void 0 : onHoverChange(e)
onHoverStart,
onHoverEnd,
onHoverChange
});
const elementProps = utils.mergeProps(
restProps,
asLink ? linkProps : buttonProps,
hoverProps,
focusPropsRing
elementProps = utils.mergeProps(pressProps, hoverProps);
return /* @__PURE__ */ jsxRuntime.jsx(
StyledBaseButton,
{
...elementProps,
"data-pressed": isPressed ? "" : void 0,
"data-hovered": isHovered ? "" : void 0,
asChild: asLink || asChild,
disabled,
role: role != null ? role : asChild === true ? "button" : void 0,
"aria-disabled": designSystemUtils.booleanify(ariaDisabled) ? "true" : void 0,
tabIndex: disabled && (asLink || asChild === true) ? -1 : void 0,
ref: forwardRef,
children: asLink ? /* @__PURE__ */ jsxRuntime.jsx(
"a",
{
href,
target,
rel: target === "_blank" ? `noopener noreferrer ${rel}`.trim() : rel,
children
}
) : children
}
);
return /* @__PURE__ */ React__default["default"].createElement(StyledBaseButton, {
...elementProps,
disabled,
asChild: asLink || asChild,
...tabIndexProp,
"data-pressed": isPressed ? "" : void 0,
"data-focused": isFocusVisible ? "" : void 0,
"data-hovered": isHovered ? "" : void 0,
"aria-disabled": ariaDisabled,
ref: refWithFallback
}, asLink ? /* @__PURE__ */ React__default["default"].createElement("a", {
href,
target,
rel: target === "_blank" ? `noopener noreferrer ${rel}` : rel
}, children) : children);
}

@@ -127,0 +96,0 @@ );

@@ -1,9 +0,10 @@

import React, { useRef } from 'react';
import { useButton } from '@react-aria/button';
import { jsx } from 'react/jsx-runtime';
import React from 'react';
import { mergeProps } from '@react-aria/utils';
import { booleanify, removeEventProps } from '@mirohq/design-system-utils';
import { useHover } from '@react-aria/interactions';
import { mergeProps } from '@react-aria/utils';
import { useLink } from '@react-aria/link';
import { useFocusRing } from '@react-aria/focus';
import { usePress } from '@mirohq/design-system-use-press';
import { Primitive } from '@mirohq/design-system-primitive';
import { styled } from '@mirohq/design-system-stitches';
import { focus } from '@mirohq/design-system-styles';

@@ -25,13 +26,8 @@ const sizes = {

},
'&[aria-disabled="true"]': {
"&[aria-disabled]": {
cursor: "default"
}
},
...focus.defaults
});
function eventHandler(callback, allowEvent) {
if (allowEvent) {
return callback;
}
return void 0;
}
const BaseButton = React.forwardRef(

@@ -41,77 +37,50 @@ ({

"aria-disabled": ariaDisabled,
href,
target,
rel,
children,
onClick,
asChild,
role,
onHoverStart,
onHoverEnd,
onHoverChange,
onPress,
onPressStart,
onPressEnd,
onPressChange,
onFocus,
onBlur,
onFocusChange,
...restProps
}, forwardRef) => {
const asLink = href != null;
const ref = useRef(null);
const refWithFallback = forwardRef != null ? forwardRef : ref;
const allowPressEvents = ariaDisabled !== "true" && ariaDisabled !== true;
const commonProps = {
isDisabled: disabled,
onPress: eventHandler(onPress != null ? onPress : onClick, allowPressEvents),
onPressStart: eventHandler(onPressStart, allowPressEvents),
onPressEnd: eventHandler(onPressEnd, allowPressEvents),
onPressChange: eventHandler(onPressChange, allowPressEvents),
onFocusChange,
onFocus,
onBlur
};
const { buttonProps, isPressed } = useButton(
{
href,
allowFocusWhenDisabled: false,
...commonProps,
...restProps
},
refWithFallback
);
const { linkProps } = useLink(
{ ...commonProps, ...restProps },
refWithFallback
);
const tabIndexProp = disabled && {
tabIndex: -1
};
const { isFocusVisible, focusProps: focusPropsRing } = useFocusRing();
const asLink = "href" in restProps;
const { href, target, rel = "" } = restProps;
let elementProps = restProps;
if (booleanify(ariaDisabled)) {
elementProps = removeEventProps(elementProps, ["onBlur", "onFocus"]);
}
const { pressProps, isPressed } = usePress({
preventFocusOnPress: true,
disabled: disabled || booleanify(ariaDisabled),
...elementProps
});
const { hoverProps, isHovered } = useHover({
onHoverStart: (e) => onHoverStart == null ? void 0 : onHoverStart(e),
onHoverEnd: (e) => onHoverEnd == null ? void 0 : onHoverEnd(e),
onHoverChange: (e) => onHoverChange == null ? void 0 : onHoverChange(e)
onHoverStart,
onHoverEnd,
onHoverChange
});
const elementProps = mergeProps(
restProps,
asLink ? linkProps : buttonProps,
hoverProps,
focusPropsRing
elementProps = mergeProps(pressProps, hoverProps);
return /* @__PURE__ */ jsx(
StyledBaseButton,
{
...elementProps,
"data-pressed": isPressed ? "" : void 0,
"data-hovered": isHovered ? "" : void 0,
asChild: asLink || asChild,
disabled,
role: role != null ? role : asChild === true ? "button" : void 0,
"aria-disabled": booleanify(ariaDisabled) ? "true" : void 0,
tabIndex: disabled && (asLink || asChild === true) ? -1 : void 0,
ref: forwardRef,
children: asLink ? /* @__PURE__ */ jsx(
"a",
{
href,
target,
rel: target === "_blank" ? `noopener noreferrer ${rel}`.trim() : rel,
children
}
) : children
}
);
return /* @__PURE__ */ React.createElement(StyledBaseButton, {
...elementProps,
disabled,
asChild: asLink || asChild,
...tabIndexProp,
"data-pressed": isPressed ? "" : void 0,
"data-focused": isFocusVisible ? "" : void 0,
"data-hovered": isHovered ? "" : void 0,
"aria-disabled": ariaDisabled,
ref: refWithFallback
}, asLink ? /* @__PURE__ */ React.createElement("a", {
href,
target,
rel: target === "_blank" ? `noopener noreferrer ${rel}` : rel
}, children) : children);
}

@@ -118,0 +87,0 @@ );

import * as react from 'react';
import react__default, { ComponentPropsWithRef, ReactNode } from 'react';
import { FocusEvents, HoverEvents } from '@react-types/shared';
import { AriaButtonProps } from '@react-types/button';
import react__default, { ComponentPropsWithRef, AnchorHTMLAttributes } from 'react';
import { HoverEvents } from '@react-types/shared';
import { PressProps } from '@mirohq/design-system-use-press';
import * as _mirohq_design_system_primitive from '@mirohq/design-system-primitive';

@@ -15,3 +15,3 @@ import * as _mirohq_design_system_stitches from '@mirohq/design-system-stitches';

};
declare const StyledBaseButton: react.ForwardRefExoticComponent<Pick<Omit<{}, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.SafeProps<Omit<Pick<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof react.ButtonHTMLAttributes<HTMLButtonElement>> & {
declare const StyledBaseButton: react.ForwardRefExoticComponent<Omit<Omit<{}, never> & _stitches_react_types_styled_component.TransformProps<{}, {}> & _mirohq_design_system_stitches.SafeProps<Omit<Omit<react.DetailedHTMLProps<react.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & {
ref?: ((instance: HTMLButtonElement | null) => void) | react.RefObject<HTMLButtonElement> | null | undefined;

@@ -467,34 +467,12 @@ } & {

children?: react.ReactNode;
} & _mirohq_design_system_stitches.CustomStylesProps, "form" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "asChild" | keyof _mirohq_design_system_stitches.CustomStylesProps> & react.RefAttributes<HTMLButtonElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"button">>, {}, {}>;
} & _mirohq_design_system_stitches.CustomStylesProps, "ref"> & react.RefAttributes<HTMLButtonElement>> & _mirohq_design_system_stitches.StitchesInternals<react.ForwardRefExoticComponent<_mirohq_design_system_primitive.PrimitiveProps<"button">>, {}, {}>;
declare type StyledBaseButtonProps = ComponentPropsWithRef<typeof StyledBaseButton>;
declare type ButtonPropsA11y = StyledBaseButtonProps & AriaButtonProps<'button'>;
interface BaseButtonProps extends FocusEvents, HoverEvents, Omit<ButtonPropsA11y, 'onClick' | 'isDisabled' | 'elementType' | 'onBlur' | 'onFocus' | 'onPressUp'> {
/**
* The content
*/
children: ReactNode;
/**
* Prevent pointer events
*/
disabled?: boolean;
/**
* A URL to link when using the button as a link
*/
href?: string;
/**
* The target window using the button as a link
*/
target?: string;
/**
* The relationship between the linked resource and the current page. See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/rel)
*/
rel?: string;
/**
* Alias for onPress
*/
onClick?: AriaButtonProps['onPress'];
}
declare const BaseButton: react__default.ForwardRefExoticComponent<Pick<BaseButtonProps, "form" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "disabled" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "type" | "value" | "target" | "href" | "rel" | "asChild" | "css" | "UNSAFE_style" | "onPress" | "onPressStart" | "onPressEnd" | "onPressChange" | "onFocusChange" | "excludeFromTabOrder" | "onHoverStart" | "onHoverEnd" | "onHoverChange"> & react__default.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
declare type AsButtonProps = StyledBaseButtonProps & PressProps & HoverEvents;
declare type AsLinkProps = AsButtonProps & AnchorHTMLAttributes<'a'> & {
href: string;
};
declare type BaseButtonProps = AsButtonProps | AsLinkProps;
declare const BaseButton: react__default.ForwardRefExoticComponent<(Omit<AsButtonProps, "ref"> | Omit<AsLinkProps, "ref">) & react__default.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
export { BaseButton, BaseButtonProps, sizes };
{
"name": "@mirohq/design-system-base-button",
"version": "0.4.10",
"version": "0.4.11-use-press.0",
"description": "",

@@ -29,11 +29,7 @@ "author": "Miro",

"dependencies": {
"@react-aria/button": "^3.5.0",
"@react-aria/focus": "^3.10.0",
"@react-aria/interactions": "^3.13.0",
"@react-aria/link": "^3.3.0",
"@react-aria/utils": "^3.13.0",
"@react-types/button": "^3.5.0",
"@react-types/shared": "^3.16.0",
"@mirohq/design-system-stitches": "^2.3.3",
"@mirohq/design-system-primitive": "^1.1.0"
"@mirohq/design-system-primitive": "^1.1.0",
"@mirohq/design-system-stitches": "^2.3.4-use-press.0"
},

@@ -40,0 +36,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc