@yamada-ui/close-button 0.2.5 → 0.2.7
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/chunk-2FBZS4JO.mjs +41 -0
- package/dist/close-button.js +27 -25
- package/dist/close-button.mjs +1 -1
- package/dist/index.js +27 -25
- package/dist/index.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-JTFKP6UY.mjs +0 -39
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// src/close-button.tsx
|
|
2
|
+
import {
|
|
3
|
+
ui,
|
|
4
|
+
forwardRef,
|
|
5
|
+
useComponentStyle,
|
|
6
|
+
omitThemeProps
|
|
7
|
+
} from "@yamada-ui/core";
|
|
8
|
+
import { CloseIcon } from "@yamada-ui/icon";
|
|
9
|
+
import { cx } from "@yamada-ui/utils";
|
|
10
|
+
import { jsx } from "react/jsx-runtime";
|
|
11
|
+
var CloseButton = forwardRef(
|
|
12
|
+
(props, ref) => {
|
|
13
|
+
const [styles, mergedProps] = useComponentStyle("CloseButton", props);
|
|
14
|
+
const { className, children, isDisabled, __css, ...rest } = omitThemeProps(mergedProps);
|
|
15
|
+
const css = {
|
|
16
|
+
outline: 0,
|
|
17
|
+
display: "flex",
|
|
18
|
+
justifyContent: "center",
|
|
19
|
+
alignItems: "center",
|
|
20
|
+
flexShrink: 0,
|
|
21
|
+
...styles,
|
|
22
|
+
...__css
|
|
23
|
+
};
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
ui.button,
|
|
26
|
+
{
|
|
27
|
+
ref,
|
|
28
|
+
type: "button",
|
|
29
|
+
className: cx("ui-close-button", className),
|
|
30
|
+
disabled: isDisabled,
|
|
31
|
+
__css: css,
|
|
32
|
+
...rest,
|
|
33
|
+
children: children || /* @__PURE__ */ jsx(CloseIcon, { width: "1em", height: "1em" })
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
CloseButton
|
|
41
|
+
};
|
package/dist/close-button.js
CHANGED
|
@@ -27,31 +27,33 @@ var import_core = require("@yamada-ui/core");
|
|
|
27
27
|
var import_icon = require("@yamada-ui/icon");
|
|
28
28
|
var import_utils = require("@yamada-ui/utils");
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
30
|
-
var CloseButton = (0, import_core.forwardRef)(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
30
|
+
var CloseButton = (0, import_core.forwardRef)(
|
|
31
|
+
(props, ref) => {
|
|
32
|
+
const [styles, mergedProps] = (0, import_core.useComponentStyle)("CloseButton", props);
|
|
33
|
+
const { className, children, isDisabled, __css, ...rest } = (0, import_core.omitThemeProps)(mergedProps);
|
|
34
|
+
const css = {
|
|
35
|
+
outline: 0,
|
|
36
|
+
display: "flex",
|
|
37
|
+
justifyContent: "center",
|
|
38
|
+
alignItems: "center",
|
|
39
|
+
flexShrink: 0,
|
|
40
|
+
...styles,
|
|
41
|
+
...__css
|
|
42
|
+
};
|
|
43
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
44
|
+
import_core.ui.button,
|
|
45
|
+
{
|
|
46
|
+
ref,
|
|
47
|
+
type: "button",
|
|
48
|
+
className: (0, import_utils.cx)("ui-close-button", className),
|
|
49
|
+
disabled: isDisabled,
|
|
50
|
+
__css: css,
|
|
51
|
+
...rest,
|
|
52
|
+
children: children || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.CloseIcon, { width: "1em", height: "1em" })
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
);
|
|
55
57
|
// Annotate the CommonJS export names for ESM import in node:
|
|
56
58
|
0 && (module.exports = {
|
|
57
59
|
CloseButton
|
package/dist/close-button.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -29,31 +29,33 @@ var import_core = require("@yamada-ui/core");
|
|
|
29
29
|
var import_icon = require("@yamada-ui/icon");
|
|
30
30
|
var import_utils = require("@yamada-ui/utils");
|
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
32
|
-
var CloseButton = (0, import_core.forwardRef)(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
32
|
+
var CloseButton = (0, import_core.forwardRef)(
|
|
33
|
+
(props, ref) => {
|
|
34
|
+
const [styles, mergedProps] = (0, import_core.useComponentStyle)("CloseButton", props);
|
|
35
|
+
const { className, children, isDisabled, __css, ...rest } = (0, import_core.omitThemeProps)(mergedProps);
|
|
36
|
+
const css = {
|
|
37
|
+
outline: 0,
|
|
38
|
+
display: "flex",
|
|
39
|
+
justifyContent: "center",
|
|
40
|
+
alignItems: "center",
|
|
41
|
+
flexShrink: 0,
|
|
42
|
+
...styles,
|
|
43
|
+
...__css
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
46
|
+
import_core.ui.button,
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
type: "button",
|
|
50
|
+
className: (0, import_utils.cx)("ui-close-button", className),
|
|
51
|
+
disabled: isDisabled,
|
|
52
|
+
__css: css,
|
|
53
|
+
...rest,
|
|
54
|
+
children: children || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.CloseIcon, { width: "1em", height: "1em" })
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
);
|
|
57
59
|
// Annotate the CommonJS export names for ESM import in node:
|
|
58
60
|
0 && (module.exports = {
|
|
59
61
|
CloseButton
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yamada-ui/close-button",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Yamada UI close button component",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"yamada",
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
"url": "https://github.com/hirotomoyamada/yamada-ui/issues"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@yamada-ui/core": "0.5.
|
|
39
|
-
"@yamada-ui/utils": "0.1.
|
|
40
|
-
"@yamada-ui/icon": "0.2.
|
|
38
|
+
"@yamada-ui/core": "0.5.2",
|
|
39
|
+
"@yamada-ui/utils": "0.1.4",
|
|
40
|
+
"@yamada-ui/icon": "0.2.7"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"react": "^18.0.0",
|
package/dist/chunk-JTFKP6UY.mjs
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
// src/close-button.tsx
|
|
2
|
-
import {
|
|
3
|
-
ui,
|
|
4
|
-
forwardRef,
|
|
5
|
-
useComponentStyle,
|
|
6
|
-
omitThemeProps
|
|
7
|
-
} from "@yamada-ui/core";
|
|
8
|
-
import { CloseIcon } from "@yamada-ui/icon";
|
|
9
|
-
import { cx } from "@yamada-ui/utils";
|
|
10
|
-
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
var CloseButton = forwardRef((props, ref) => {
|
|
12
|
-
const [styles, mergedProps] = useComponentStyle("CloseButton", props);
|
|
13
|
-
const { className, children, isDisabled, __css, ...rest } = omitThemeProps(mergedProps);
|
|
14
|
-
const css = {
|
|
15
|
-
outline: 0,
|
|
16
|
-
display: "flex",
|
|
17
|
-
justifyContent: "center",
|
|
18
|
-
alignItems: "center",
|
|
19
|
-
flexShrink: 0,
|
|
20
|
-
...styles,
|
|
21
|
-
...__css
|
|
22
|
-
};
|
|
23
|
-
return /* @__PURE__ */ jsx(
|
|
24
|
-
ui.button,
|
|
25
|
-
{
|
|
26
|
-
ref,
|
|
27
|
-
type: "button",
|
|
28
|
-
className: cx("ui-close-button", className),
|
|
29
|
-
disabled: isDisabled,
|
|
30
|
-
__css: css,
|
|
31
|
-
...rest,
|
|
32
|
-
children: children || /* @__PURE__ */ jsx(CloseIcon, { width: "1em", height: "1em" })
|
|
33
|
-
}
|
|
34
|
-
);
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
export {
|
|
38
|
-
CloseButton
|
|
39
|
-
};
|