musae 0.4.2 → 0.5.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/dist/components/avatar/avatar.cjs +10 -4
- package/dist/components/avatar/avatar.d.ts +1 -1
- package/dist/components/avatar/avatar.mjs +10 -4
- package/dist/components/bench/bench.cjs +2 -2
- package/dist/components/bench/bench.mjs +2 -2
- package/dist/components/breadcrumb/item.cjs +2 -2
- package/dist/components/breadcrumb/item.mjs +2 -2
- package/dist/components/button/button.cjs +14 -51
- package/dist/components/button/button.d.ts +77 -0
- package/dist/components/button/button.mjs +13 -51
- package/dist/components/button/context.cjs +10 -0
- package/dist/components/button/context.d.ts +9 -0
- package/dist/components/button/context.mjs +10 -0
- package/dist/components/button/hooks.cjs +7 -6
- package/dist/components/button/hooks.d.ts +2 -2
- package/dist/components/button/hooks.mjs +8 -7
- package/dist/components/calendar/calendar.cjs +12 -20
- package/dist/components/calendar/calendar.mjs +12 -20
- package/dist/components/calendar/contribution.cjs +3 -3
- package/dist/components/calendar/contribution.mjs +3 -3
- package/dist/components/calendar/hooks.cjs +3 -4
- package/dist/components/calendar/hooks.mjs +3 -4
- package/dist/components/cascader/cascader.cjs +1 -1
- package/dist/components/cascader/cascader.mjs +1 -1
- package/dist/components/checkbox/styles.cjs +2 -2
- package/dist/components/checkbox/styles.mjs +2 -2
- package/dist/components/clock/clock.cjs +1 -1
- package/dist/components/clock/clock.mjs +1 -1
- package/dist/components/clock/column.cjs +2 -2
- package/dist/components/clock/column.mjs +2 -2
- package/dist/components/collapse/item.cjs +1 -1
- package/dist/components/collapse/item.mjs +1 -1
- package/dist/components/date-picker/date-picker.cjs +1 -1
- package/dist/components/date-picker/date-picker.mjs +1 -1
- package/dist/components/date-range-picker/date-range-picker.cjs +1 -1
- package/dist/components/date-range-picker/date-range-picker.mjs +1 -1
- package/dist/components/divider/divider.cjs +2 -2
- package/dist/components/divider/divider.mjs +2 -2
- package/dist/components/drawer/popup.cjs +1 -1
- package/dist/components/drawer/popup.mjs +1 -1
- package/dist/components/empty/empty.cjs +2 -2
- package/dist/components/empty/empty.mjs +2 -2
- package/dist/components/fab/floatable.cjs +2 -3
- package/dist/components/fab/floatable.mjs +2 -3
- package/dist/components/form/field/error.cjs +1 -1
- package/dist/components/form/field/error.mjs +1 -1
- package/dist/components/form/field/layout.cjs +1 -1
- package/dist/components/form/field/layout.mjs +1 -1
- package/dist/components/form/field/support.cjs +1 -1
- package/dist/components/form/field/support.mjs +1 -1
- package/dist/components/i18n-button/i18n-button.cjs +2 -3
- package/dist/components/i18n-button/i18n-button.mjs +2 -3
- package/dist/components/icon-button/icon-button.cjs +49 -0
- package/dist/components/icon-button/icon-button.d.ts +4 -0
- package/dist/components/icon-button/icon-button.mjs +47 -0
- package/dist/components/icon-button/index.d.ts +2 -0
- package/dist/components/image/hooks.cjs +2 -3
- package/dist/components/image/hooks.mjs +2 -3
- package/dist/components/image/image.cjs +2 -2
- package/dist/components/image/image.mjs +2 -2
- package/dist/components/image/preview/operations.cjs +8 -11
- package/dist/components/image/preview/operations.mjs +8 -11
- package/dist/components/input/input.cjs +1 -1
- package/dist/components/input/input.mjs +1 -1
- package/dist/components/menu/group.cjs +4 -4
- package/dist/components/menu/group.mjs +4 -4
- package/dist/components/menu/hooks.cjs +1 -1
- package/dist/components/menu/hooks.mjs +1 -1
- package/dist/components/menu/item.cjs +6 -6
- package/dist/components/menu/item.mjs +6 -6
- package/dist/components/notification/notification.cjs +5 -8
- package/dist/components/notification/notification.mjs +5 -8
- package/dist/components/otp-input/otp-input.cjs +1 -1
- package/dist/components/otp-input/otp-input.mjs +1 -1
- package/dist/components/pagination/item.cjs +13 -13
- package/dist/components/pagination/item.mjs +13 -13
- package/dist/components/pagination/pagination.cjs +1 -1
- package/dist/components/pagination/pagination.mjs +1 -1
- package/dist/components/popconfirm/popconfirm.cjs +1 -1
- package/dist/components/popconfirm/popconfirm.mjs +1 -1
- package/dist/components/popover/popover.cjs +1 -1
- package/dist/components/popover/popover.mjs +1 -1
- package/dist/components/popper/hooks.cjs +1 -1
- package/dist/components/popper/hooks.mjs +1 -1
- package/dist/components/radio/radio.cjs +1 -1
- package/dist/components/radio/radio.mjs +1 -1
- package/dist/components/rich-text-editor/context.cjs +17 -0
- package/dist/components/rich-text-editor/context.d.ts +17 -0
- package/dist/components/rich-text-editor/context.mjs +16 -0
- package/dist/components/rich-text-editor/hooks.d.ts +2 -2
- package/dist/components/rich-text-editor/index.cjs +9 -4
- package/dist/components/rich-text-editor/index.mjs +9 -4
- package/dist/components/rich-text-editor/plugins/floating-link-editor/index.cjs +5 -7
- package/dist/components/rich-text-editor/plugins/floating-link-editor/index.mjs +5 -7
- package/dist/components/rich-text-editor/plugins/toolbar/index.cjs +2 -2
- package/dist/components/rich-text-editor/plugins/toolbar/index.mjs +2 -2
- package/dist/components/rich-text-editor/rich-text-editor.cjs +7 -6
- package/dist/components/rich-text-editor/rich-text-editor.mjs +8 -7
- package/dist/components/select/select.cjs +2 -2
- package/dist/components/select/select.mjs +2 -2
- package/dist/components/steps/item.cjs +3 -3
- package/dist/components/steps/item.mjs +3 -3
- package/dist/components/steps/steps.cjs +1 -1
- package/dist/components/steps/steps.mjs +1 -1
- package/dist/components/switch/switch.cjs +3 -3
- package/dist/components/switch/switch.mjs +3 -3
- package/dist/components/table/body.cjs +1 -1
- package/dist/components/table/body.mjs +1 -1
- package/dist/components/table/header/cell.cjs +1 -1
- package/dist/components/table/header/cell.mjs +1 -1
- package/dist/components/table/header/header.cjs +1 -1
- package/dist/components/table/header/header.mjs +1 -1
- package/dist/components/tag/tag.cjs +10 -10
- package/dist/components/tag/tag.mjs +10 -10
- package/dist/components/textarea/textarea.cjs +1 -1
- package/dist/components/textarea/textarea.mjs +1 -1
- package/dist/components/theme/tokens.stylex.cjs +1 -0
- package/dist/components/theme/tokens.stylex.d.ts +1 -0
- package/dist/components/theme/tokens.stylex.mjs +1 -0
- package/dist/components/time-picker/panel.cjs +2 -2
- package/dist/components/time-picker/panel.mjs +2 -2
- package/dist/components/tour/context.cjs +20 -0
- package/dist/components/tour/context.d.ts +23 -0
- package/dist/components/tour/context.mjs +19 -0
- package/dist/components/tour/spotlight.cjs +9 -13
- package/dist/components/tour/spotlight.d.ts +1 -1
- package/dist/components/tour/spotlight.mjs +11 -15
- package/dist/components/tour/tour.cjs +24 -13
- package/dist/components/tour/tour.mjs +24 -13
- package/dist/components/transfer/item.cjs +1 -1
- package/dist/components/transfer/item.mjs +1 -1
- package/dist/components/transfer/list.cjs +1 -1
- package/dist/components/transfer/list.mjs +1 -1
- package/dist/components/transfer/transfer.cjs +5 -7
- package/dist/components/transfer/transfer.mjs +5 -7
- package/dist/components/tree/node.cjs +3 -3
- package/dist/components/tree/node.mjs +3 -3
- package/dist/components/upload/upload.cjs +3 -3
- package/dist/components/upload/upload.mjs +3 -3
- package/dist/components/upload/uploaded-item.cjs +1 -1
- package/dist/components/upload/uploaded-item.mjs +1 -1
- package/dist/components/upload/uploaded-list.cjs +23 -18
- package/dist/components/upload/uploaded-list.mjs +24 -19
- package/dist/hooks/use-class-names.component.cjs +2 -3
- package/dist/hooks/use-class-names.component.d.ts +1 -1
- package/dist/hooks/use-class-names.component.mjs +2 -3
- package/dist/hooks/use-class-names.d.ts +0 -12
- package/dist/hooks/use-closable.cjs +9 -13
- package/dist/hooks/use-closable.mjs +9 -13
- package/dist/index.cjs +2 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +1 -0
- package/dist/styles.css +116 -119
- package/dist/types/avatar.d.ts +3 -2
- package/dist/types/button.d.ts +2 -2
- package/dist/types/tour.d.ts +3 -4
- package/dist/utils/class-name.cjs +0 -16
- package/dist/utils/class-name.d.ts +0 -36
- package/dist/utils/class-name.mjs +1 -17
- package/package.json +1 -1
- package/dist/components/rich-text-editor/hooks.cjs +0 -15
- package/dist/components/rich-text-editor/hooks.mjs +0 -15
|
@@ -12,7 +12,7 @@ var theme = require('../theme/theme.cjs');
|
|
|
12
12
|
var relax = require('@aiszlab/relax');
|
|
13
13
|
var skeleton = require('../skeleton/skeleton.cjs');
|
|
14
14
|
|
|
15
|
-
var _excluded = ["src", "alt", "shape", "size", "className", "style"];
|
|
15
|
+
var _excluded = ["src", "alt", "shape", "size", "className", "style", "crossOrigin", "referrerPolicy"];
|
|
16
16
|
var styles = {
|
|
17
17
|
avatar: function avatar(props) {
|
|
18
18
|
return [{
|
|
@@ -72,7 +72,7 @@ var styles = {
|
|
|
72
72
|
},
|
|
73
73
|
overlapping: function overlapping(props) {
|
|
74
74
|
return [{
|
|
75
|
-
":not(:first-child)_marginInlineStart": "musaex-
|
|
75
|
+
":not(:first-child)_marginInlineStart": "musaex-1bx1b4w",
|
|
76
76
|
":not(:first-child)_marginLeft": null,
|
|
77
77
|
":not(:first-child)_marginRight": null,
|
|
78
78
|
borderColor: "musaex-eqt46j",
|
|
@@ -143,6 +143,8 @@ var Avatar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
143
143
|
_size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
144
144
|
className$1 = _ref.className,
|
|
145
145
|
style = _ref.style,
|
|
146
|
+
crossOrigin = _ref.crossOrigin,
|
|
147
|
+
referrerPolicy = _ref.referrerPolicy,
|
|
146
148
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
147
149
|
var theme$1 = hooks.useTheme();
|
|
148
150
|
var group = React.useContext(context.Context);
|
|
@@ -151,7 +153,9 @@ var Avatar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
151
153
|
var shape = (_group$shape = group === null || group === void 0 ? void 0 : group.shape) !== null && _group$shape !== void 0 ? _group$shape : _shape;
|
|
152
154
|
var classNames = useClassNames.useClassNames("avatar");
|
|
153
155
|
var loadStatus = relax.useImageLoader({
|
|
154
|
-
src: src
|
|
156
|
+
src: src,
|
|
157
|
+
crossOrigin: crossOrigin,
|
|
158
|
+
referrerPolicy: referrerPolicy
|
|
155
159
|
});
|
|
156
160
|
var styled = {
|
|
157
161
|
avatar: stylex.default.props(theme.typography.label[size], styles.avatar({
|
|
@@ -178,7 +182,9 @@ var Avatar = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
178
182
|
src: src,
|
|
179
183
|
alt: alt,
|
|
180
184
|
className: styled.image.className,
|
|
181
|
-
style: styled.image.style
|
|
185
|
+
style: styled.image.style,
|
|
186
|
+
crossOrigin: crossOrigin,
|
|
187
|
+
referrerPolicy: referrerPolicy
|
|
182
188
|
})), loadStatus !== "loaded" && (alt === null || alt === void 0 ? void 0 : alt.slice(0, 2).toUpperCase()));
|
|
183
189
|
});
|
|
184
190
|
|
|
@@ -3,7 +3,7 @@ import React from "react";
|
|
|
3
3
|
* @description
|
|
4
4
|
* `Avatar`
|
|
5
5
|
*/
|
|
6
|
-
declare const Avatar: React.ForwardRefExoticComponent<import("../../types/element").ComponentProps & {
|
|
6
|
+
declare const Avatar: React.ForwardRefExoticComponent<import("../../types/element").ComponentProps & Pick<import("../../types/image").ImageProps, "crossOrigin" | "referrerPolicy"> & {
|
|
7
7
|
src?: string;
|
|
8
8
|
alt?: string;
|
|
9
9
|
size?: "small" | "medium" | "large";
|
|
@@ -10,7 +10,7 @@ import { typography } from '../theme/theme.mjs';
|
|
|
10
10
|
import { useImageLoader, clsx } from '@aiszlab/relax';
|
|
11
11
|
import Skeleton from '../skeleton/skeleton.mjs';
|
|
12
12
|
|
|
13
|
-
var _excluded = ["src", "alt", "shape", "size", "className", "style"];
|
|
13
|
+
var _excluded = ["src", "alt", "shape", "size", "className", "style", "crossOrigin", "referrerPolicy"];
|
|
14
14
|
var styles = {
|
|
15
15
|
avatar: function avatar(props) {
|
|
16
16
|
return [{
|
|
@@ -70,7 +70,7 @@ var styles = {
|
|
|
70
70
|
},
|
|
71
71
|
overlapping: function overlapping(props) {
|
|
72
72
|
return [{
|
|
73
|
-
":not(:first-child)_marginInlineStart": "musaex-
|
|
73
|
+
":not(:first-child)_marginInlineStart": "musaex-1bx1b4w",
|
|
74
74
|
":not(:first-child)_marginLeft": null,
|
|
75
75
|
":not(:first-child)_marginRight": null,
|
|
76
76
|
borderColor: "musaex-eqt46j",
|
|
@@ -141,6 +141,8 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
141
141
|
_size = _ref$size === void 0 ? "medium" : _ref$size,
|
|
142
142
|
className = _ref.className,
|
|
143
143
|
style = _ref.style,
|
|
144
|
+
crossOrigin = _ref.crossOrigin,
|
|
145
|
+
referrerPolicy = _ref.referrerPolicy,
|
|
144
146
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
145
147
|
var theme = useTheme();
|
|
146
148
|
var group = useContext(Context);
|
|
@@ -149,7 +151,9 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
149
151
|
var shape = (_group$shape = group === null || group === void 0 ? void 0 : group.shape) !== null && _group$shape !== void 0 ? _group$shape : _shape;
|
|
150
152
|
var classNames = useClassNames("avatar");
|
|
151
153
|
var loadStatus = useImageLoader({
|
|
152
|
-
src: src
|
|
154
|
+
src: src,
|
|
155
|
+
crossOrigin: crossOrigin,
|
|
156
|
+
referrerPolicy: referrerPolicy
|
|
153
157
|
});
|
|
154
158
|
var styled = {
|
|
155
159
|
avatar: _stylex.props(typography.label[size], styles.avatar({
|
|
@@ -176,7 +180,9 @@ var Avatar = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
176
180
|
src: src,
|
|
177
181
|
alt: alt,
|
|
178
182
|
className: styled.image.className,
|
|
179
|
-
style: styled.image.style
|
|
183
|
+
style: styled.image.style,
|
|
184
|
+
crossOrigin: crossOrigin,
|
|
185
|
+
referrerPolicy: referrerPolicy
|
|
180
186
|
})), loadStatus !== "loaded" && (alt === null || alt === void 0 ? void 0 : alt.slice(0, 2).toUpperCase()));
|
|
181
187
|
});
|
|
182
188
|
|
|
@@ -36,7 +36,7 @@ var styles = {
|
|
|
36
36
|
paddingLeft: null,
|
|
37
37
|
paddingEnd: null,
|
|
38
38
|
paddingRight: null,
|
|
39
|
-
paddingBottom: "musaex-
|
|
39
|
+
paddingBottom: "musaex-z1jy5j",
|
|
40
40
|
position: "musaex-7wzq59",
|
|
41
41
|
height: "musaex-bmf846",
|
|
42
42
|
top: "musaex-98oeat",
|
|
@@ -53,7 +53,7 @@ var styles = {
|
|
|
53
53
|
header: {
|
|
54
54
|
"default": function _default(props) {
|
|
55
55
|
return [{
|
|
56
|
-
gap: "musaex-
|
|
56
|
+
gap: "musaex-4ttznp",
|
|
57
57
|
rowGap: null,
|
|
58
58
|
columnGap: null,
|
|
59
59
|
boxShadow: "musaex-igitpm",
|
|
@@ -34,7 +34,7 @@ var styles = {
|
|
|
34
34
|
paddingLeft: null,
|
|
35
35
|
paddingEnd: null,
|
|
36
36
|
paddingRight: null,
|
|
37
|
-
paddingBottom: "musaex-
|
|
37
|
+
paddingBottom: "musaex-z1jy5j",
|
|
38
38
|
position: "musaex-7wzq59",
|
|
39
39
|
height: "musaex-bmf846",
|
|
40
40
|
top: "musaex-98oeat",
|
|
@@ -51,7 +51,7 @@ var styles = {
|
|
|
51
51
|
header: {
|
|
52
52
|
"default": function _default(props) {
|
|
53
53
|
return [{
|
|
54
|
-
gap: "musaex-
|
|
54
|
+
gap: "musaex-4ttznp",
|
|
55
55
|
rowGap: null,
|
|
56
56
|
columnGap: null,
|
|
57
57
|
boxShadow: "musaex-igitpm",
|
|
@@ -19,7 +19,7 @@ var styles = {
|
|
|
19
19
|
},
|
|
20
20
|
link: function link(props) {
|
|
21
21
|
return [{
|
|
22
|
-
paddingInline: "musaex-
|
|
22
|
+
paddingInline: "musaex-1fpq7td",
|
|
23
23
|
paddingStart: null,
|
|
24
24
|
paddingLeft: null,
|
|
25
25
|
paddingEnd: null,
|
|
@@ -46,7 +46,7 @@ var styles = {
|
|
|
46
46
|
},
|
|
47
47
|
separator: {
|
|
48
48
|
"default": {
|
|
49
|
-
marginInline: "musaex-
|
|
49
|
+
marginInline: "musaex-f4wbcg",
|
|
50
50
|
marginInlineStart: null,
|
|
51
51
|
marginLeft: null,
|
|
52
52
|
marginInlineEnd: null,
|
|
@@ -17,7 +17,7 @@ var styles = {
|
|
|
17
17
|
},
|
|
18
18
|
link: function link(props) {
|
|
19
19
|
return [{
|
|
20
|
-
paddingInline: "musaex-
|
|
20
|
+
paddingInline: "musaex-1fpq7td",
|
|
21
21
|
paddingStart: null,
|
|
22
22
|
paddingLeft: null,
|
|
23
23
|
paddingEnd: null,
|
|
@@ -44,7 +44,7 @@ var styles = {
|
|
|
44
44
|
},
|
|
45
45
|
separator: {
|
|
46
46
|
"default": {
|
|
47
|
-
marginInline: "musaex-
|
|
47
|
+
marginInline: "musaex-f4wbcg",
|
|
48
48
|
marginInlineStart: null,
|
|
49
49
|
marginLeft: null,
|
|
50
50
|
marginInlineEnd: null,
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
3
3
|
var _objectSpread = require('@babel/runtime/helpers/objectSpread2');
|
|
4
4
|
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var className = require('../../utils/class-name.cjs');
|
|
7
6
|
var relax = require('@aiszlab/relax');
|
|
8
7
|
var stylex = require('../../node_modules/.pnpm/@stylexjs_stylex@0.8.0/node_modules/@stylexjs/stylex/lib/es/stylex.cjs');
|
|
9
8
|
var tokens_stylex = require('../theme/tokens.stylex.cjs');
|
|
@@ -11,8 +10,9 @@ var hooks = require('../theme/hooks.cjs');
|
|
|
11
10
|
var hooks$1 = require('./hooks.cjs');
|
|
12
11
|
var ripple = require('../ripple/ripple.cjs');
|
|
13
12
|
var theme = require('../theme/theme.cjs');
|
|
14
|
-
var useClassNames = require('../../hooks/use-class-names.cjs');
|
|
15
13
|
var color = require('@aiszlab/fuzzy/color');
|
|
14
|
+
var useClassNames_component = require('../../hooks/use-class-names.component.cjs');
|
|
15
|
+
var context = require('./context.cjs');
|
|
16
16
|
|
|
17
17
|
var _excluded = ["children", "className", "style", "color", "size", "variant", "shape", "disabled", "ripple", "type", "onClick", "prefix", "suffix"];
|
|
18
18
|
var styles = {
|
|
@@ -20,7 +20,7 @@ var styles = {
|
|
|
20
20
|
display: "musaex-3nfvp2",
|
|
21
21
|
alignItems: "musaex-6s0dn4",
|
|
22
22
|
justifyContent: "musaex-l56j7k",
|
|
23
|
-
gap: "musaex-
|
|
23
|
+
gap: "musaex-4ttznp",
|
|
24
24
|
rowGap: null,
|
|
25
25
|
columnGap: null,
|
|
26
26
|
transitionProperty: "musaex-fagghw",
|
|
@@ -43,6 +43,7 @@ var styles = {
|
|
|
43
43
|
textOverflow: "musaex-lyipyv",
|
|
44
44
|
cursor: "musaex-1ypdohk",
|
|
45
45
|
fontFamily: "musaex-jb2p0i",
|
|
46
|
+
boxSizing: "musaex-9f619",
|
|
46
47
|
$$css: true
|
|
47
48
|
},
|
|
48
49
|
ripple: {
|
|
@@ -50,16 +51,14 @@ var styles = {
|
|
|
50
51
|
$$css: true
|
|
51
52
|
},
|
|
52
53
|
small: {
|
|
53
|
-
paddingBlock: "musaex-
|
|
54
|
+
paddingBlock: "musaex-pne1ww",
|
|
54
55
|
paddingTop: null,
|
|
55
56
|
paddingBottom: null,
|
|
56
|
-
paddingInline: "musaex-
|
|
57
|
+
paddingInline: "musaex-nd81q0",
|
|
57
58
|
paddingStart: null,
|
|
58
59
|
paddingLeft: null,
|
|
59
60
|
paddingEnd: null,
|
|
60
61
|
paddingRight: null,
|
|
61
|
-
minHeight: "musaex-1ite1z3",
|
|
62
|
-
minWidth: "musaex-8pi1lr",
|
|
63
62
|
$$css: true
|
|
64
63
|
},
|
|
65
64
|
medium: {
|
|
@@ -71,44 +70,6 @@ var styles = {
|
|
|
71
70
|
paddingLeft: null,
|
|
72
71
|
paddingEnd: null,
|
|
73
72
|
paddingRight: null,
|
|
74
|
-
minHeight: "musaex-1p0x9m9",
|
|
75
|
-
minWidth: "musaex-qt0gpg",
|
|
76
|
-
$$css: true
|
|
77
|
-
},
|
|
78
|
-
large: {
|
|
79
|
-
paddingBlock: "musaex-qhkzqn",
|
|
80
|
-
paddingTop: null,
|
|
81
|
-
paddingBottom: null,
|
|
82
|
-
paddingInline: "musaex-1mavw9y",
|
|
83
|
-
paddingStart: null,
|
|
84
|
-
paddingLeft: null,
|
|
85
|
-
paddingEnd: null,
|
|
86
|
-
paddingRight: null,
|
|
87
|
-
minHeight: "musaex-1fdzm4i",
|
|
88
|
-
minWidth: "musaex-sffz45",
|
|
89
|
-
$$css: true
|
|
90
|
-
},
|
|
91
|
-
circular: {
|
|
92
|
-
borderRadius: "musaex-z7qqyb",
|
|
93
|
-
borderStartStartRadius: null,
|
|
94
|
-
borderStartEndRadius: null,
|
|
95
|
-
borderEndStartRadius: null,
|
|
96
|
-
borderEndEndRadius: null,
|
|
97
|
-
borderTopLeftRadius: null,
|
|
98
|
-
borderTopRightRadius: null,
|
|
99
|
-
borderBottomLeftRadius: null,
|
|
100
|
-
borderBottomRightRadius: null,
|
|
101
|
-
padding: null,
|
|
102
|
-
paddingInline: null,
|
|
103
|
-
paddingStart: null,
|
|
104
|
-
paddingLeft: null,
|
|
105
|
-
paddingEnd: null,
|
|
106
|
-
paddingRight: null,
|
|
107
|
-
paddingBlock: null,
|
|
108
|
-
paddingTop: null,
|
|
109
|
-
paddingBottom: null,
|
|
110
|
-
aspectRatio: "musaex-1plog1",
|
|
111
|
-
justifyContent: "musaex-l56j7k",
|
|
112
73
|
$$css: true
|
|
113
74
|
},
|
|
114
75
|
rounded: {
|
|
@@ -121,7 +82,6 @@ var styles = {
|
|
|
121
82
|
borderTopRightRadius: null,
|
|
122
83
|
borderBottomLeftRadius: null,
|
|
123
84
|
borderBottomRightRadius: null,
|
|
124
|
-
minWidth: null,
|
|
125
85
|
$$css: true
|
|
126
86
|
},
|
|
127
87
|
filled: function filled(props) {
|
|
@@ -224,7 +184,7 @@ var styles = {
|
|
|
224
184
|
*/
|
|
225
185
|
var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
226
186
|
var children = _ref.children,
|
|
227
|
-
className
|
|
187
|
+
className = _ref.className,
|
|
228
188
|
style = _ref.style,
|
|
229
189
|
_ref$color = _ref.color,
|
|
230
190
|
color$1 = _ref$color === void 0 ? "primary" : _ref$color,
|
|
@@ -244,7 +204,6 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
244
204
|
prefix = _ref.prefix,
|
|
245
205
|
suffix = _ref.suffix,
|
|
246
206
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
247
|
-
var classNames = useClassNames.useClassNames("button");
|
|
248
207
|
var theme$1 = hooks.useTheme();
|
|
249
208
|
var _useButton = hooks$1.useButton({
|
|
250
209
|
onClick: _onClick
|
|
@@ -252,8 +211,9 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
252
211
|
onClick = _useButton.onClick,
|
|
253
212
|
clear = _useButton.clear,
|
|
254
213
|
ripples = _useButton.ripples;
|
|
214
|
+
var classNames = useClassNames_component.useClassNames(context.CLASS_NAMES);
|
|
255
215
|
var styled = {
|
|
256
|
-
button: stylex.default.props(styles.button, ripple$1 && styles.ripple,
|
|
216
|
+
button: stylex.default.props(styles.button, ripple$1 && styles.ripple,
|
|
257
217
|
// size
|
|
258
218
|
styles[size],
|
|
259
219
|
// variant
|
|
@@ -274,13 +234,15 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
274
234
|
backgroundColor: variant === "filled" ? color.hexToRgba(theme$1.colors["on-surface"], tokens_stylex.OPACITY.medium, "style") : "transparent",
|
|
275
235
|
color: color.hexToRgba(theme$1.colors["on-surface"], tokens_stylex.OPACITY.thicker, "style"),
|
|
276
236
|
outlineColor: variant === "outlined" ? color.hexToRgba(theme$1.colors["on-surface"], tokens_stylex.OPACITY.thicker, "style") : null
|
|
277
|
-
})
|
|
237
|
+
}),
|
|
238
|
+
// text font
|
|
239
|
+
size === "small" && theme.typography.label.medium, size !== "small" && theme.typography.label.large)
|
|
278
240
|
};
|
|
279
241
|
return /*#__PURE__*/React.createElement("button", _objectSpread({
|
|
280
242
|
onClick: onClick,
|
|
281
243
|
ref: ref,
|
|
282
244
|
disabled: disabled,
|
|
283
|
-
className: relax.clsx(classNames
|
|
245
|
+
className: relax.clsx(classNames.button, className, styled.button.className),
|
|
284
246
|
style: _objectSpread(_objectSpread({}, styled.button.style), style),
|
|
285
247
|
type: type
|
|
286
248
|
}, props), prefix, children, suffix, ripple$1 && /*#__PURE__*/React.createElement(ripple.default, {
|
|
@@ -291,3 +253,4 @@ var Button = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
291
253
|
|
|
292
254
|
exports.Button = Button;
|
|
293
255
|
exports.default = Button;
|
|
256
|
+
exports.styles = styles;
|
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
import type { ButtonProps } from "musae/types/button";
|
|
2
2
|
import React from "react";
|
|
3
|
+
declare const styles: Readonly<{
|
|
4
|
+
readonly button: Readonly<{
|
|
5
|
+
readonly display: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"display", "inline-flex">;
|
|
6
|
+
readonly alignItems: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"alignItems", "center">;
|
|
7
|
+
readonly justifyContent: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"justifyContent", "center">;
|
|
8
|
+
readonly gap: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"gap", string>;
|
|
9
|
+
readonly transitionProperty: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"transitionProperty", "all">;
|
|
10
|
+
readonly transitionDuration: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"transitionDuration", "0.3s">;
|
|
11
|
+
readonly willChange: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"willChange", "background-color, color, box-shadow">;
|
|
12
|
+
readonly borderWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderWidth", string>;
|
|
13
|
+
readonly backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", "transparent">;
|
|
14
|
+
readonly overflow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"overflow", "hidden">;
|
|
15
|
+
readonly whiteSpace: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"whiteSpace", "nowrap">;
|
|
16
|
+
readonly textOverflow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"textOverflow", "ellipsis">;
|
|
17
|
+
readonly cursor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"cursor", "pointer">;
|
|
18
|
+
readonly fontFamily: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"fontFamily", "inherit">;
|
|
19
|
+
readonly boxSizing: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"boxSizing", "border-box">;
|
|
20
|
+
}>;
|
|
21
|
+
readonly ripple: Readonly<{
|
|
22
|
+
readonly position: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"position", "relative">;
|
|
23
|
+
}>;
|
|
24
|
+
readonly small: Readonly<{
|
|
25
|
+
readonly paddingBlock: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"paddingBlock", string>;
|
|
26
|
+
readonly paddingInline: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"paddingInline", string>;
|
|
27
|
+
}>;
|
|
28
|
+
readonly medium: Readonly<{
|
|
29
|
+
readonly paddingBlock: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"paddingBlock", string>;
|
|
30
|
+
readonly paddingInline: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"paddingInline", string>;
|
|
31
|
+
}>;
|
|
32
|
+
readonly rounded: Readonly<{
|
|
33
|
+
readonly borderRadius: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderRadius", string>;
|
|
34
|
+
}>;
|
|
35
|
+
readonly filled: (props: {
|
|
36
|
+
backgroundColor: string;
|
|
37
|
+
color: string;
|
|
38
|
+
}) => readonly [Readonly<{
|
|
39
|
+
borderWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderWidth", string>;
|
|
40
|
+
backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
|
|
41
|
+
color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
42
|
+
":hover": import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<":hover", {
|
|
43
|
+
boxShadow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXVar<string>;
|
|
44
|
+
}>;
|
|
45
|
+
}>, typeof import("@stylexjs/stylex/lib/StyleXTypes").StyleXInlineStylesTag];
|
|
46
|
+
readonly outlined: (props: {
|
|
47
|
+
color: string;
|
|
48
|
+
hoveredBackgroundColor: string;
|
|
49
|
+
}) => readonly [Readonly<{
|
|
50
|
+
borderWidth: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderWidth", string>;
|
|
51
|
+
borderStyle: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderStyle", "solid">;
|
|
52
|
+
borderColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderColor", string>;
|
|
53
|
+
color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
54
|
+
":hover": import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<":hover", {
|
|
55
|
+
backgroundColor: string;
|
|
56
|
+
}>;
|
|
57
|
+
}>, typeof import("@stylexjs/stylex/lib/StyleXTypes").StyleXInlineStylesTag];
|
|
58
|
+
readonly text: (props: {
|
|
59
|
+
color: string;
|
|
60
|
+
hoveredBackgroundColor: string;
|
|
61
|
+
}) => readonly [Readonly<{
|
|
62
|
+
color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
63
|
+
":hover": import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<":hover", {
|
|
64
|
+
backgroundColor: string;
|
|
65
|
+
}>;
|
|
66
|
+
}>, typeof import("@stylexjs/stylex/lib/StyleXTypes").StyleXInlineStylesTag];
|
|
67
|
+
readonly disabled: (props: {
|
|
68
|
+
color: string;
|
|
69
|
+
backgroundColor: string;
|
|
70
|
+
outlineColor: string | null;
|
|
71
|
+
}) => readonly [Readonly<{
|
|
72
|
+
backgroundColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"backgroundColor", string>;
|
|
73
|
+
color: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"color", string>;
|
|
74
|
+
cursor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"cursor", "not-allowed">;
|
|
75
|
+
boxShadow: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"boxShadow", null>;
|
|
76
|
+
borderColor: import("@stylexjs/stylex/lib/StyleXTypes").StyleXClassNameFor<"borderColor", string | null>;
|
|
77
|
+
}>, typeof import("@stylexjs/stylex/lib/StyleXTypes").StyleXInlineStylesTag];
|
|
78
|
+
}>;
|
|
3
79
|
/**
|
|
4
80
|
* @author murukal
|
|
5
81
|
*
|
|
@@ -9,3 +85,4 @@ import React from "react";
|
|
|
9
85
|
*/
|
|
10
86
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
87
|
export default Button;
|
|
88
|
+
export { styles };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
2
2
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
3
3
|
import React, { forwardRef } from 'react';
|
|
4
|
-
import { ButtonClassToken } from '../../utils/class-name.mjs';
|
|
5
4
|
import { clsx } from '@aiszlab/relax';
|
|
6
5
|
import _stylex from '../../node_modules/.pnpm/@stylexjs_stylex@0.8.0/node_modules/@stylexjs/stylex/lib/es/stylex.mjs';
|
|
7
6
|
import { OPACITY } from '../theme/tokens.stylex.mjs';
|
|
@@ -9,8 +8,9 @@ import { useTheme } from '../theme/hooks.mjs';
|
|
|
9
8
|
import { useButton } from './hooks.mjs';
|
|
10
9
|
import Ripple from '../ripple/ripple.mjs';
|
|
11
10
|
import { typography } from '../theme/theme.mjs';
|
|
12
|
-
import { useClassNames } from '../../hooks/use-class-names.mjs';
|
|
13
11
|
import { hexToRgba } from '@aiszlab/fuzzy/color';
|
|
12
|
+
import { useClassNames } from '../../hooks/use-class-names.component.mjs';
|
|
13
|
+
import { CLASS_NAMES } from './context.mjs';
|
|
14
14
|
|
|
15
15
|
var _excluded = ["children", "className", "style", "color", "size", "variant", "shape", "disabled", "ripple", "type", "onClick", "prefix", "suffix"];
|
|
16
16
|
var styles = {
|
|
@@ -18,7 +18,7 @@ var styles = {
|
|
|
18
18
|
display: "musaex-3nfvp2",
|
|
19
19
|
alignItems: "musaex-6s0dn4",
|
|
20
20
|
justifyContent: "musaex-l56j7k",
|
|
21
|
-
gap: "musaex-
|
|
21
|
+
gap: "musaex-4ttznp",
|
|
22
22
|
rowGap: null,
|
|
23
23
|
columnGap: null,
|
|
24
24
|
transitionProperty: "musaex-fagghw",
|
|
@@ -41,6 +41,7 @@ var styles = {
|
|
|
41
41
|
textOverflow: "musaex-lyipyv",
|
|
42
42
|
cursor: "musaex-1ypdohk",
|
|
43
43
|
fontFamily: "musaex-jb2p0i",
|
|
44
|
+
boxSizing: "musaex-9f619",
|
|
44
45
|
$$css: true
|
|
45
46
|
},
|
|
46
47
|
ripple: {
|
|
@@ -48,16 +49,14 @@ var styles = {
|
|
|
48
49
|
$$css: true
|
|
49
50
|
},
|
|
50
51
|
small: {
|
|
51
|
-
paddingBlock: "musaex-
|
|
52
|
+
paddingBlock: "musaex-pne1ww",
|
|
52
53
|
paddingTop: null,
|
|
53
54
|
paddingBottom: null,
|
|
54
|
-
paddingInline: "musaex-
|
|
55
|
+
paddingInline: "musaex-nd81q0",
|
|
55
56
|
paddingStart: null,
|
|
56
57
|
paddingLeft: null,
|
|
57
58
|
paddingEnd: null,
|
|
58
59
|
paddingRight: null,
|
|
59
|
-
minHeight: "musaex-1ite1z3",
|
|
60
|
-
minWidth: "musaex-8pi1lr",
|
|
61
60
|
$$css: true
|
|
62
61
|
},
|
|
63
62
|
medium: {
|
|
@@ -69,44 +68,6 @@ var styles = {
|
|
|
69
68
|
paddingLeft: null,
|
|
70
69
|
paddingEnd: null,
|
|
71
70
|
paddingRight: null,
|
|
72
|
-
minHeight: "musaex-1p0x9m9",
|
|
73
|
-
minWidth: "musaex-qt0gpg",
|
|
74
|
-
$$css: true
|
|
75
|
-
},
|
|
76
|
-
large: {
|
|
77
|
-
paddingBlock: "musaex-qhkzqn",
|
|
78
|
-
paddingTop: null,
|
|
79
|
-
paddingBottom: null,
|
|
80
|
-
paddingInline: "musaex-1mavw9y",
|
|
81
|
-
paddingStart: null,
|
|
82
|
-
paddingLeft: null,
|
|
83
|
-
paddingEnd: null,
|
|
84
|
-
paddingRight: null,
|
|
85
|
-
minHeight: "musaex-1fdzm4i",
|
|
86
|
-
minWidth: "musaex-sffz45",
|
|
87
|
-
$$css: true
|
|
88
|
-
},
|
|
89
|
-
circular: {
|
|
90
|
-
borderRadius: "musaex-z7qqyb",
|
|
91
|
-
borderStartStartRadius: null,
|
|
92
|
-
borderStartEndRadius: null,
|
|
93
|
-
borderEndStartRadius: null,
|
|
94
|
-
borderEndEndRadius: null,
|
|
95
|
-
borderTopLeftRadius: null,
|
|
96
|
-
borderTopRightRadius: null,
|
|
97
|
-
borderBottomLeftRadius: null,
|
|
98
|
-
borderBottomRightRadius: null,
|
|
99
|
-
padding: null,
|
|
100
|
-
paddingInline: null,
|
|
101
|
-
paddingStart: null,
|
|
102
|
-
paddingLeft: null,
|
|
103
|
-
paddingEnd: null,
|
|
104
|
-
paddingRight: null,
|
|
105
|
-
paddingBlock: null,
|
|
106
|
-
paddingTop: null,
|
|
107
|
-
paddingBottom: null,
|
|
108
|
-
aspectRatio: "musaex-1plog1",
|
|
109
|
-
justifyContent: "musaex-l56j7k",
|
|
110
71
|
$$css: true
|
|
111
72
|
},
|
|
112
73
|
rounded: {
|
|
@@ -119,7 +80,6 @@ var styles = {
|
|
|
119
80
|
borderTopRightRadius: null,
|
|
120
81
|
borderBottomLeftRadius: null,
|
|
121
82
|
borderBottomRightRadius: null,
|
|
122
|
-
minWidth: null,
|
|
123
83
|
$$css: true
|
|
124
84
|
},
|
|
125
85
|
filled: function filled(props) {
|
|
@@ -242,7 +202,6 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
242
202
|
prefix = _ref.prefix,
|
|
243
203
|
suffix = _ref.suffix,
|
|
244
204
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
245
|
-
var classNames = useClassNames("button");
|
|
246
205
|
var theme = useTheme();
|
|
247
206
|
var _useButton = useButton({
|
|
248
207
|
onClick: _onClick
|
|
@@ -250,8 +209,9 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
250
209
|
onClick = _useButton.onClick,
|
|
251
210
|
clear = _useButton.clear,
|
|
252
211
|
ripples = _useButton.ripples;
|
|
212
|
+
var classNames = useClassNames(CLASS_NAMES);
|
|
253
213
|
var styled = {
|
|
254
|
-
button: _stylex.props(styles.button, ripple && styles.ripple,
|
|
214
|
+
button: _stylex.props(styles.button, ripple && styles.ripple,
|
|
255
215
|
// size
|
|
256
216
|
styles[size],
|
|
257
217
|
// variant
|
|
@@ -272,13 +232,15 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
272
232
|
backgroundColor: variant === "filled" ? hexToRgba(theme.colors["on-surface"], OPACITY.medium, "style") : "transparent",
|
|
273
233
|
color: hexToRgba(theme.colors["on-surface"], OPACITY.thicker, "style"),
|
|
274
234
|
outlineColor: variant === "outlined" ? hexToRgba(theme.colors["on-surface"], OPACITY.thicker, "style") : null
|
|
275
|
-
})
|
|
235
|
+
}),
|
|
236
|
+
// text font
|
|
237
|
+
size === "small" && typography.label.medium, size !== "small" && typography.label.large)
|
|
276
238
|
};
|
|
277
239
|
return /*#__PURE__*/React.createElement("button", _objectSpread({
|
|
278
240
|
onClick: onClick,
|
|
279
241
|
ref: ref,
|
|
280
242
|
disabled: disabled,
|
|
281
|
-
className: clsx(classNames
|
|
243
|
+
className: clsx(classNames.button, className, styled.button.className),
|
|
282
244
|
style: _objectSpread(_objectSpread({}, styled.button.style), style),
|
|
283
245
|
type: type
|
|
284
246
|
}, props), prefix, children, suffix, ripple && /*#__PURE__*/React.createElement(Ripple, {
|
|
@@ -287,4 +249,4 @@ var Button = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
287
249
|
}));
|
|
288
250
|
});
|
|
289
251
|
|
|
290
|
-
export { Button, Button as default };
|
|
252
|
+
export { Button, Button as default, styles };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
var React = require('react');
|
|
2
1
|
var relax = require('@aiszlab/relax');
|
|
3
2
|
var hooks = require('../ripple/hooks.cjs');
|
|
4
3
|
|
|
@@ -6,17 +5,19 @@ var hooks = require('../ripple/hooks.cjs');
|
|
|
6
5
|
* @description
|
|
7
6
|
* hooks for button component
|
|
8
7
|
*/
|
|
9
|
-
var useButton = function useButton(
|
|
8
|
+
var useButton = function useButton(_ref) {
|
|
9
|
+
var click = _ref.onClick;
|
|
10
10
|
var _useRipple = hooks.useRipple(),
|
|
11
11
|
ripples = _useRipple.ripples,
|
|
12
12
|
add = _useRipple.add,
|
|
13
13
|
clear = _useRipple.clear;
|
|
14
|
-
var
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
var onClick = relax.useEvent(function (event) {
|
|
15
|
+
click === null || click === void 0 || click(event);
|
|
16
|
+
add(event);
|
|
17
|
+
});
|
|
17
18
|
return {
|
|
18
19
|
ripples: ripples,
|
|
19
|
-
onClick:
|
|
20
|
+
onClick: onClick,
|
|
20
21
|
clear: clear
|
|
21
22
|
};
|
|
22
23
|
};
|
|
@@ -4,8 +4,8 @@ import type { ButtonProps } from "musae/types/button";
|
|
|
4
4
|
* @description
|
|
5
5
|
* hooks for button component
|
|
6
6
|
*/
|
|
7
|
-
export declare const useButton: (
|
|
7
|
+
export declare const useButton: ({ onClick: click }: Pick<ButtonProps, "onClick">) => {
|
|
8
8
|
ripples: import("../../types/ripple").Ripple[];
|
|
9
|
-
onClick: (
|
|
9
|
+
onClick: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
10
10
|
clear: (key: import("react").Key) => void;
|
|
11
11
|
};
|