@yamada-ui/close-button 0.2.6 → 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.
@@ -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
+ };
@@ -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)((props, ref) => {
31
- const [styles, mergedProps] = (0, import_core.useComponentStyle)("CloseButton", props);
32
- const { className, children, isDisabled, __css, ...rest } = (0, import_core.omitThemeProps)(mergedProps);
33
- const css = {
34
- outline: 0,
35
- display: "flex",
36
- justifyContent: "center",
37
- alignItems: "center",
38
- flexShrink: 0,
39
- ...styles,
40
- ...__css
41
- };
42
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
43
- import_core.ui.button,
44
- {
45
- ref,
46
- type: "button",
47
- className: (0, import_utils.cx)("ui-close-button", className),
48
- disabled: isDisabled,
49
- __css: css,
50
- ...rest,
51
- children: children || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.CloseIcon, { width: "1em", height: "1em" })
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CloseButton
3
- } from "./chunk-JTFKP6UY.mjs";
3
+ } from "./chunk-2FBZS4JO.mjs";
4
4
  export {
5
5
  CloseButton
6
6
  };
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)((props, ref) => {
33
- const [styles, mergedProps] = (0, import_core.useComponentStyle)("CloseButton", props);
34
- const { className, children, isDisabled, __css, ...rest } = (0, import_core.omitThemeProps)(mergedProps);
35
- const css = {
36
- outline: 0,
37
- display: "flex",
38
- justifyContent: "center",
39
- alignItems: "center",
40
- flexShrink: 0,
41
- ...styles,
42
- ...__css
43
- };
44
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
45
- import_core.ui.button,
46
- {
47
- ref,
48
- type: "button",
49
- className: (0, import_utils.cx)("ui-close-button", className),
50
- disabled: isDisabled,
51
- __css: css,
52
- ...rest,
53
- children: children || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.CloseIcon, { width: "1em", height: "1em" })
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CloseButton
3
- } from "./chunk-JTFKP6UY.mjs";
3
+ } from "./chunk-2FBZS4JO.mjs";
4
4
  export {
5
5
  CloseButton
6
6
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/close-button",
3
- "version": "0.2.6",
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.1",
39
- "@yamada-ui/utils": "0.1.3",
40
- "@yamada-ui/icon": "0.2.6"
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",
@@ -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
- };