@zenkigen-inc/component-ui 1.9.0 → 1.9.1

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.
@@ -12,7 +12,7 @@ type Props = {
12
12
  borderRadius?: CSSProperties['borderRadius'];
13
13
  } & ({
14
14
  type?: 'anchor';
15
- href: string;
15
+ href?: string;
16
16
  target?: HTMLAnchorElement['target'];
17
17
  onClick?: never;
18
18
  } | {
@@ -26,5 +26,5 @@ type Props = {
26
26
  target?: never;
27
27
  onClick?: () => void;
28
28
  });
29
- export declare function Button({ size, variant, type, href, target, onClick, ...props }: PropsWithChildren<Props>): import("react").JSX.Element;
29
+ export declare const Button: import("react").ForwardRefExoticComponent<PropsWithChildren<Props> & import("react").RefAttributes<HTMLAnchorElement & HTMLButtonElement>>;
30
30
  export {};
package/dist/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { userColors, buttonColors, focusVisible, iconColors, typography, tagColors, tagLightColors } from '@zenkigen-inc/component-theme';
2
2
  import clsx$1, { clsx } from 'clsx';
3
3
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
- import aa, { useState, useCallback, useEffect, createContext, useContext, useRef, useLayoutEffect, forwardRef } from 'react';
4
+ import aa, { forwardRef, useState, useCallback, useEffect, createContext, useContext, useRef, useLayoutEffect } from 'react';
5
5
  import { iconElements } from '@zenkigen-inc/component-icons';
6
6
 
7
7
  function _extends() {
@@ -79,7 +79,7 @@ function Breadcrumb(_ref) {
79
79
  Breadcrumb.Item = BreadcrumbItem;
80
80
 
81
81
  var _excluded$6 = ["size", "variant", "type", "href", "target", "onClick"];
82
- function Button(_ref) {
82
+ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
83
83
  var _clsx;
84
84
  var _ref$size = _ref.size,
85
85
  size = _ref$size === void 0 ? 'medium' : _ref$size,
@@ -105,6 +105,7 @@ function Button(_ref) {
105
105
  style: {
106
106
  borderRadius: props.borderRadius
107
107
  },
108
+ ref: ref,
108
109
  children: [props.before, props.children, props.after]
109
110
  });
110
111
  } else {
@@ -117,10 +118,12 @@ function Button(_ref) {
117
118
  width: props.width,
118
119
  borderRadius: props.borderRadius
119
120
  },
121
+ ref: ref,
120
122
  children: [props.before, props.children, props.after]
121
123
  });
122
124
  }
123
- }
125
+ });
126
+ Button.displayName = 'Button';
124
127
 
125
128
  var CheckedIcon = function CheckedIcon() {
126
129
  return /*#__PURE__*/jsx("svg", {