@zenkigen-inc/component-ui 1.9.0 → 1.9.2
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/button/button.d.ts +2 -2
- package/dist/index.esm.js +7 -3
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/button/button.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ type Props = {
|
|
|
12
12
|
borderRadius?: CSSProperties['borderRadius'];
|
|
13
13
|
} & ({
|
|
14
14
|
type?: 'anchor';
|
|
15
|
-
href
|
|
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
|
|
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
|
|
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
|
-
|
|
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,
|
|
@@ -103,8 +103,10 @@ function Button(_ref) {
|
|
|
103
103
|
href: href,
|
|
104
104
|
target: target,
|
|
105
105
|
style: {
|
|
106
|
+
width: props.width,
|
|
106
107
|
borderRadius: props.borderRadius
|
|
107
108
|
},
|
|
109
|
+
ref: ref,
|
|
108
110
|
children: [props.before, props.children, props.after]
|
|
109
111
|
});
|
|
110
112
|
} else {
|
|
@@ -117,10 +119,12 @@ function Button(_ref) {
|
|
|
117
119
|
width: props.width,
|
|
118
120
|
borderRadius: props.borderRadius
|
|
119
121
|
},
|
|
122
|
+
ref: ref,
|
|
120
123
|
children: [props.before, props.children, props.after]
|
|
121
124
|
});
|
|
122
125
|
}
|
|
123
|
-
}
|
|
126
|
+
});
|
|
127
|
+
Button.displayName = 'Button';
|
|
124
128
|
|
|
125
129
|
var CheckedIcon = function CheckedIcon() {
|
|
126
130
|
return /*#__PURE__*/jsx("svg", {
|