@yamada-ui/button 0.3.14 → 0.3.15
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.js +5 -5
- package/dist/button.mjs +1 -1
- package/dist/{chunk-7J6CGDZ6.mjs → chunk-BGBHFZBE.mjs} +5 -5
- package/dist/{chunk-3COEMZNH.mjs → chunk-ZI6ZBN3O.mjs} +4 -2
- package/dist/icon-button.js +8 -6
- package/dist/icon-button.mjs +2 -2
- package/dist/index.js +8 -6
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
package/dist/button.js
CHANGED
|
@@ -153,13 +153,13 @@ var Button = (0, import_core2.forwardRef)(
|
|
|
153
153
|
type: type != null ? type : defaultType,
|
|
154
154
|
disabled: isDisabled || isLoading,
|
|
155
155
|
"data-active": (0, import_utils2.dataAttr)(isActive),
|
|
156
|
-
|
|
156
|
+
data__loading: (0, import_utils2.dataAttr)(isLoading),
|
|
157
157
|
__css: css,
|
|
158
158
|
...rest,
|
|
159
159
|
children: [
|
|
160
|
-
isLoading && loadingPlacement === "start" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-
|
|
160
|
+
isLoading && loadingPlacement === "start" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-button__loading--start", ...loadingProps }) : null,
|
|
161
161
|
isLoading ? loadingText || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.span, { opacity: 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Content, { ...contentProps }) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Content, { ...contentProps }),
|
|
162
|
-
isLoading && loadingPlacement === "end" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-
|
|
162
|
+
isLoading && loadingPlacement === "end" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-button__loading--end", ...loadingProps }) : null
|
|
163
163
|
]
|
|
164
164
|
}
|
|
165
165
|
);
|
|
@@ -183,7 +183,7 @@ var Loading = ({ className, loadingIcon, loadingText }) => {
|
|
|
183
183
|
return loadingIcon || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_loading.Loading, { color: "current" });
|
|
184
184
|
}
|
|
185
185
|
}, [loadingIcon]);
|
|
186
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.div, { className: (0, import_utils2.cx)("ui-
|
|
186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.div, { className: (0, import_utils2.cx)("ui-button__loading", className), __css: css, children: element });
|
|
187
187
|
};
|
|
188
188
|
var Content = ({
|
|
189
189
|
leftIcon,
|
|
@@ -200,7 +200,7 @@ var Icon = ({ children, className, ...rest }) => {
|
|
|
200
200
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
201
201
|
import_core2.ui.span,
|
|
202
202
|
{
|
|
203
|
-
className: (0, import_utils2.cx)("ui-
|
|
203
|
+
className: (0, import_utils2.cx)("ui-button__icon", className),
|
|
204
204
|
display: "inline-flex",
|
|
205
205
|
alignSelf: "center",
|
|
206
206
|
flexShrink: 0,
|
package/dist/button.mjs
CHANGED
|
@@ -79,13 +79,13 @@ var Button = forwardRef(
|
|
|
79
79
|
type: type != null ? type : defaultType,
|
|
80
80
|
disabled: isDisabled || isLoading,
|
|
81
81
|
"data-active": dataAttr(isActive),
|
|
82
|
-
|
|
82
|
+
data__loading: dataAttr(isLoading),
|
|
83
83
|
__css: css,
|
|
84
84
|
...rest,
|
|
85
85
|
children: [
|
|
86
|
-
isLoading && loadingPlacement === "start" ? /* @__PURE__ */ jsx(Loading, { className: "ui-
|
|
86
|
+
isLoading && loadingPlacement === "start" ? /* @__PURE__ */ jsx(Loading, { className: "ui-button__loading--start", ...loadingProps }) : null,
|
|
87
87
|
isLoading ? loadingText || /* @__PURE__ */ jsx(ui.span, { opacity: 0, children: /* @__PURE__ */ jsx(Content, { ...contentProps }) }) : /* @__PURE__ */ jsx(Content, { ...contentProps }),
|
|
88
|
-
isLoading && loadingPlacement === "end" ? /* @__PURE__ */ jsx(Loading, { className: "ui-
|
|
88
|
+
isLoading && loadingPlacement === "end" ? /* @__PURE__ */ jsx(Loading, { className: "ui-button__loading--end", ...loadingProps }) : null
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
91
|
);
|
|
@@ -109,7 +109,7 @@ var Loading = ({ className, loadingIcon, loadingText }) => {
|
|
|
109
109
|
return loadingIcon || /* @__PURE__ */ jsx(LoadingIcon, { color: "current" });
|
|
110
110
|
}
|
|
111
111
|
}, [loadingIcon]);
|
|
112
|
-
return /* @__PURE__ */ jsx(ui.div, { className: cx("ui-
|
|
112
|
+
return /* @__PURE__ */ jsx(ui.div, { className: cx("ui-button__loading", className), __css: css, children: element });
|
|
113
113
|
};
|
|
114
114
|
var Content = ({
|
|
115
115
|
leftIcon,
|
|
@@ -126,7 +126,7 @@ var Icon = ({ children, className, ...rest }) => {
|
|
|
126
126
|
return /* @__PURE__ */ jsx(
|
|
127
127
|
ui.span,
|
|
128
128
|
{
|
|
129
|
-
className: cx("ui-
|
|
129
|
+
className: cx("ui-button__icon", className),
|
|
130
130
|
display: "inline-flex",
|
|
131
131
|
alignSelf: "center",
|
|
132
132
|
flexShrink: 0,
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import {
|
|
3
3
|
Button
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BGBHFZBE.mjs";
|
|
5
5
|
|
|
6
6
|
// src/icon-button.tsx
|
|
7
7
|
import { forwardRef } from "@yamada-ui/core";
|
|
8
|
+
import { cx } from "@yamada-ui/utils";
|
|
8
9
|
import { jsx } from "react/jsx-runtime";
|
|
9
10
|
var IconButton = forwardRef(
|
|
10
|
-
({ icon, isRounded, children, ...rest }, ref) => {
|
|
11
|
+
({ icon, isRounded, children, className, ...rest }, ref) => {
|
|
11
12
|
return /* @__PURE__ */ jsx(
|
|
12
13
|
Button,
|
|
13
14
|
{
|
|
15
|
+
className: cx("ui-icon-button", className),
|
|
14
16
|
ref,
|
|
15
17
|
p: 0,
|
|
16
18
|
...isRounded ? { rounded: "full" } : {},
|
package/dist/icon-button.js
CHANGED
|
@@ -25,6 +25,7 @@ __export(icon_button_exports, {
|
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(icon_button_exports);
|
|
27
27
|
var import_core3 = require("@yamada-ui/core");
|
|
28
|
+
var import_utils3 = require("@yamada-ui/utils");
|
|
28
29
|
|
|
29
30
|
// src/button.tsx
|
|
30
31
|
var import_core2 = require("@yamada-ui/core");
|
|
@@ -155,13 +156,13 @@ var Button = (0, import_core2.forwardRef)(
|
|
|
155
156
|
type: type != null ? type : defaultType,
|
|
156
157
|
disabled: isDisabled || isLoading,
|
|
157
158
|
"data-active": (0, import_utils2.dataAttr)(isActive),
|
|
158
|
-
|
|
159
|
+
data__loading: (0, import_utils2.dataAttr)(isLoading),
|
|
159
160
|
__css: css,
|
|
160
161
|
...rest,
|
|
161
162
|
children: [
|
|
162
|
-
isLoading && loadingPlacement === "start" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-
|
|
163
|
+
isLoading && loadingPlacement === "start" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-button__loading--start", ...loadingProps }) : null,
|
|
163
164
|
isLoading ? loadingText || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.span, { opacity: 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Content, { ...contentProps }) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Content, { ...contentProps }),
|
|
164
|
-
isLoading && loadingPlacement === "end" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-
|
|
165
|
+
isLoading && loadingPlacement === "end" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-button__loading--end", ...loadingProps }) : null
|
|
165
166
|
]
|
|
166
167
|
}
|
|
167
168
|
);
|
|
@@ -185,7 +186,7 @@ var Loading = ({ className, loadingIcon, loadingText }) => {
|
|
|
185
186
|
return loadingIcon || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_loading.Loading, { color: "current" });
|
|
186
187
|
}
|
|
187
188
|
}, [loadingIcon]);
|
|
188
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.div, { className: (0, import_utils2.cx)("ui-
|
|
189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.div, { className: (0, import_utils2.cx)("ui-button__loading", className), __css: css, children: element });
|
|
189
190
|
};
|
|
190
191
|
var Content = ({
|
|
191
192
|
leftIcon,
|
|
@@ -202,7 +203,7 @@ var Icon = ({ children, className, ...rest }) => {
|
|
|
202
203
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
203
204
|
import_core2.ui.span,
|
|
204
205
|
{
|
|
205
|
-
className: (0, import_utils2.cx)("ui-
|
|
206
|
+
className: (0, import_utils2.cx)("ui-button__icon", className),
|
|
206
207
|
display: "inline-flex",
|
|
207
208
|
alignSelf: "center",
|
|
208
209
|
flexShrink: 0,
|
|
@@ -225,10 +226,11 @@ var useButtonType = (value) => {
|
|
|
225
226
|
// src/icon-button.tsx
|
|
226
227
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
227
228
|
var IconButton = (0, import_core3.forwardRef)(
|
|
228
|
-
({ icon, isRounded, children, ...rest }, ref) => {
|
|
229
|
+
({ icon, isRounded, children, className, ...rest }, ref) => {
|
|
229
230
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
230
231
|
Button,
|
|
231
232
|
{
|
|
233
|
+
className: (0, import_utils3.cx)("ui-icon-button", className),
|
|
232
234
|
ref,
|
|
233
235
|
p: 0,
|
|
234
236
|
...isRounded ? { rounded: "full" } : {},
|
package/dist/icon-button.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -156,13 +156,13 @@ var Button = (0, import_core2.forwardRef)(
|
|
|
156
156
|
type: type != null ? type : defaultType,
|
|
157
157
|
disabled: isDisabled || isLoading,
|
|
158
158
|
"data-active": (0, import_utils2.dataAttr)(isActive),
|
|
159
|
-
|
|
159
|
+
data__loading: (0, import_utils2.dataAttr)(isLoading),
|
|
160
160
|
__css: css,
|
|
161
161
|
...rest,
|
|
162
162
|
children: [
|
|
163
|
-
isLoading && loadingPlacement === "start" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-
|
|
163
|
+
isLoading && loadingPlacement === "start" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-button__loading--start", ...loadingProps }) : null,
|
|
164
164
|
isLoading ? loadingText || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.span, { opacity: 0, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Content, { ...contentProps }) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Content, { ...contentProps }),
|
|
165
|
-
isLoading && loadingPlacement === "end" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-
|
|
165
|
+
isLoading && loadingPlacement === "end" ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Loading, { className: "ui-button__loading--end", ...loadingProps }) : null
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
);
|
|
@@ -186,7 +186,7 @@ var Loading = ({ className, loadingIcon, loadingText }) => {
|
|
|
186
186
|
return loadingIcon || /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_loading.Loading, { color: "current" });
|
|
187
187
|
}
|
|
188
188
|
}, [loadingIcon]);
|
|
189
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.div, { className: (0, import_utils2.cx)("ui-
|
|
189
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_core2.ui.div, { className: (0, import_utils2.cx)("ui-button__loading", className), __css: css, children: element });
|
|
190
190
|
};
|
|
191
191
|
var Content = ({
|
|
192
192
|
leftIcon,
|
|
@@ -203,7 +203,7 @@ var Icon = ({ children, className, ...rest }) => {
|
|
|
203
203
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
204
204
|
import_core2.ui.span,
|
|
205
205
|
{
|
|
206
|
-
className: (0, import_utils2.cx)("ui-
|
|
206
|
+
className: (0, import_utils2.cx)("ui-button__icon", className),
|
|
207
207
|
display: "inline-flex",
|
|
208
208
|
alignSelf: "center",
|
|
209
209
|
flexShrink: 0,
|
|
@@ -225,12 +225,14 @@ var useButtonType = (value) => {
|
|
|
225
225
|
|
|
226
226
|
// src/icon-button.tsx
|
|
227
227
|
var import_core3 = require("@yamada-ui/core");
|
|
228
|
+
var import_utils3 = require("@yamada-ui/utils");
|
|
228
229
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
229
230
|
var IconButton = (0, import_core3.forwardRef)(
|
|
230
|
-
({ icon, isRounded, children, ...rest }, ref) => {
|
|
231
|
+
({ icon, isRounded, children, className, ...rest }, ref) => {
|
|
231
232
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
232
233
|
Button,
|
|
233
234
|
{
|
|
235
|
+
className: (0, import_utils3.cx)("ui-icon-button", className),
|
|
234
236
|
ref,
|
|
235
237
|
p: 0,
|
|
236
238
|
...isRounded ? { rounded: "full" } : {},
|
package/dist/index.mjs
CHANGED