@yamada-ui/close-button 1.0.51-dev-20241214144625 → 1.0.51

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.
@@ -14,20 +14,19 @@ import { jsx, jsxs } from "react/jsx-runtime";
14
14
  var CloseButton = forwardRef(
15
15
  (props, ref) => {
16
16
  const [styles, mergedProps] = useComponentStyle("CloseButton", props);
17
- let {
17
+ const {
18
18
  className,
19
19
  children,
20
- disabled,
21
- disableRipple,
22
20
  isDisabled,
21
+ disabled = isDisabled,
22
+ disableRipple,
23
23
  isRounded,
24
24
  __css,
25
25
  ...rest
26
26
  } = omitThemeProps(mergedProps);
27
- disabled != null ? disabled : disabled = isDisabled;
28
27
  const { onPointerDown, ...rippleProps } = useRipple({
29
28
  ...rest,
30
- isDisabled: disableRipple || disabled
29
+ disabled: disableRipple || disabled
31
30
  });
32
31
  const css = {
33
32
  alignItems: "center",
@@ -66,4 +65,4 @@ CloseButton.__ui__ = "CloseButton";
66
65
  export {
67
66
  CloseButton
68
67
  };
69
- //# sourceMappingURL=chunk-QCOFUOB2.mjs.map
68
+ //# sourceMappingURL=chunk-ZGA2XAOL.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/close-button.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n forwardRef,\n omitThemeProps,\n ui,\n useComponentStyle,\n} from \"@yamada-ui/core\"\nimport { CloseIcon } from \"@yamada-ui/icon\"\nimport { Ripple, useRipple } from \"@yamada-ui/ripple\"\nimport { cx } from \"@yamada-ui/utils\"\n\ninterface CloseButtonOptions {\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * If `true`, disable ripple effects when pressing a element.\n *\n * @default false\n */\n disableRipple?: boolean\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n *\n * @deprecated Use `disabled` instead.\n */\n isDisabled?: boolean\n /**\n * If true, the button is full rounded.\n *\n * @default false\n */\n isRounded?: boolean\n}\n\nexport interface CloseButtonProps\n extends HTMLUIProps<\"button\">,\n ThemeProps<\"CloseButton\">,\n CloseButtonOptions {}\n\n/**\n * `CloseButton` is a component used primarily to trigger the close functionality of a component.\n *\n * @see Docs https://yamada-ui.com/components/other/close-button\n */\n\nexport const CloseButton = forwardRef<CloseButtonProps, \"button\">(\n (props, ref) => {\n const [styles, mergedProps] = useComponentStyle(\"CloseButton\", props)\n const {\n className,\n children,\n isDisabled,\n disabled = isDisabled,\n disableRipple,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n disabled: disableRipple || disabled,\n })\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n flexShrink: 0,\n justifyContent: \"center\",\n outline: 0,\n overflow: \"hidden\",\n position: \"relative\",\n ...styles,\n ...__css,\n ...(isRounded ? { borderRadius: \"fallback(full, 9999px)\" } : {}),\n }\n\n return (\n <ui.button\n ref={ref}\n type=\"button\"\n className={cx(\"ui-close-button\", className)}\n aria-label=\"Close\"\n disabled={disabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple {...rippleProps} />\n </ui.button>\n )\n },\n)\n\nCloseButton.displayName = \"CloseButton\"\nCloseButton.__ui__ = \"CloseButton\"\n"],"mappings":";;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,iBAAiB;AAClC,SAAS,UAAU;AA0Eb,SAUe,KAVf;AAhCC,IAAM,cAAc;AAAA,EACzB,CAAC,OAAO,QAAQ;AACd,UAAM,CAAC,QAAQ,WAAW,IAAI,kBAAkB,eAAe,KAAK;AACpE,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI,eAAe,WAAW;AAC9B,UAAM,EAAE,eAAe,GAAG,YAAY,IAAI,UAAU;AAAA,MAClD,GAAG;AAAA,MACH,UAAU,iBAAiB;AAAA,IAC7B,CAAC;AAED,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAI,YAAY,EAAE,cAAc,yBAAyB,IAAI,CAAC;AAAA,IAChE;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,WAAW,GAAG,mBAAmB,SAAS;AAAA,QAC1C,cAAW;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,oBAAC,aAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,oBAAC,UAAQ,GAAG,aAAa;AAAA;AAAA;AAAA,IAC3B;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
@@ -32,20 +32,19 @@ var import_jsx_runtime = require("react/jsx-runtime");
32
32
  var CloseButton = (0, import_core.forwardRef)(
33
33
  (props, ref) => {
34
34
  const [styles, mergedProps] = (0, import_core.useComponentStyle)("CloseButton", props);
35
- let {
35
+ const {
36
36
  className,
37
37
  children,
38
- disabled,
39
- disableRipple,
40
38
  isDisabled,
39
+ disabled = isDisabled,
40
+ disableRipple,
41
41
  isRounded,
42
42
  __css,
43
43
  ...rest
44
44
  } = (0, import_core.omitThemeProps)(mergedProps);
45
- disabled != null ? disabled : disabled = isDisabled;
46
45
  const { onPointerDown, ...rippleProps } = (0, import_ripple.useRipple)({
47
46
  ...rest,
48
- isDisabled: disableRipple || disabled
47
+ disabled: disableRipple || disabled
49
48
  });
50
49
  const css = {
51
50
  alignItems: "center",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/close-button.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n forwardRef,\n omitThemeProps,\n ui,\n useComponentStyle,\n} from \"@yamada-ui/core\"\nimport { CloseIcon } from \"@yamada-ui/icon\"\nimport { Ripple, useRipple } from \"@yamada-ui/ripple\"\nimport { cx } from \"@yamada-ui/utils\"\n\ninterface CloseButtonOptions {\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * If `true`, disable ripple effects when pressing a element.\n *\n * @default false\n */\n disableRipple?: boolean\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n *\n * @deprecated Use `disabled` instead.\n */\n isDisabled?: boolean\n /**\n * If true, the button is full rounded.\n *\n * @default false\n */\n isRounded?: boolean\n}\n\nexport interface CloseButtonProps\n extends HTMLUIProps<\"button\">,\n ThemeProps<\"CloseButton\">,\n CloseButtonOptions {}\n\n/**\n * `CloseButton` is a component used primarily to trigger the close functionality of a component.\n *\n * @see Docs https://yamada-ui.com/components/other/close-button\n */\n\nexport const CloseButton = forwardRef<CloseButtonProps, \"button\">(\n (props, ref) => {\n const [styles, mergedProps] = useComponentStyle(\"CloseButton\", props)\n let {\n className,\n children,\n disabled,\n disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n\n disabled ??= isDisabled\n\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || disabled,\n })\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n flexShrink: 0,\n justifyContent: \"center\",\n outline: 0,\n overflow: \"hidden\",\n position: \"relative\",\n ...styles,\n ...__css,\n ...(isRounded ? { borderRadius: \"fallback(full, 9999px)\" } : {}),\n }\n\n return (\n <ui.button\n ref={ref}\n type=\"button\"\n className={cx(\"ui-close-button\", className)}\n aria-label=\"Close\"\n disabled={disabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple {...rippleProps} />\n </ui.button>\n )\n },\n)\n\nCloseButton.displayName = \"CloseButton\"\nCloseButton.__ui__ = \"CloseButton\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAKO;AACP,kBAA0B;AAC1B,oBAAkC;AAClC,mBAAmB;AA6Eb;AAnCC,IAAM,kBAAc;AAAA,EACzB,CAAC,OAAO,QAAQ;AACd,UAAM,CAAC,QAAQ,WAAW,QAAI,+BAAkB,eAAe,KAAK;AACpE,QAAI;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,QAAI,4BAAe,WAAW;AAE9B,6CAAa;AAEb,UAAM,EAAE,eAAe,GAAG,YAAY,QAAI,yBAAU;AAAA,MAClD,GAAG;AAAA,MACH,YAAY,iBAAiB;AAAA,IAC/B,CAAC;AAED,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAI,YAAY,EAAE,cAAc,yBAAyB,IAAI,CAAC;AAAA,IAChE;AAEA,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,eAAW,iBAAG,mBAAmB,SAAS;AAAA,QAC1C,cAAW;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,4CAAC,yBAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,4CAAC,wBAAQ,GAAG,aAAa;AAAA;AAAA;AAAA,IAC3B;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
1
+ {"version":3,"sources":["../src/close-button.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n forwardRef,\n omitThemeProps,\n ui,\n useComponentStyle,\n} from \"@yamada-ui/core\"\nimport { CloseIcon } from \"@yamada-ui/icon\"\nimport { Ripple, useRipple } from \"@yamada-ui/ripple\"\nimport { cx } from \"@yamada-ui/utils\"\n\ninterface CloseButtonOptions {\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * If `true`, disable ripple effects when pressing a element.\n *\n * @default false\n */\n disableRipple?: boolean\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n *\n * @deprecated Use `disabled` instead.\n */\n isDisabled?: boolean\n /**\n * If true, the button is full rounded.\n *\n * @default false\n */\n isRounded?: boolean\n}\n\nexport interface CloseButtonProps\n extends HTMLUIProps<\"button\">,\n ThemeProps<\"CloseButton\">,\n CloseButtonOptions {}\n\n/**\n * `CloseButton` is a component used primarily to trigger the close functionality of a component.\n *\n * @see Docs https://yamada-ui.com/components/other/close-button\n */\n\nexport const CloseButton = forwardRef<CloseButtonProps, \"button\">(\n (props, ref) => {\n const [styles, mergedProps] = useComponentStyle(\"CloseButton\", props)\n const {\n className,\n children,\n isDisabled,\n disabled = isDisabled,\n disableRipple,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n disabled: disableRipple || disabled,\n })\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n flexShrink: 0,\n justifyContent: \"center\",\n outline: 0,\n overflow: \"hidden\",\n position: \"relative\",\n ...styles,\n ...__css,\n ...(isRounded ? { borderRadius: \"fallback(full, 9999px)\" } : {}),\n }\n\n return (\n <ui.button\n ref={ref}\n type=\"button\"\n className={cx(\"ui-close-button\", className)}\n aria-label=\"Close\"\n disabled={disabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple {...rippleProps} />\n </ui.button>\n )\n },\n)\n\nCloseButton.displayName = \"CloseButton\"\nCloseButton.__ui__ = \"CloseButton\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAKO;AACP,kBAA0B;AAC1B,oBAAkC;AAClC,mBAAmB;AA0Eb;AAhCC,IAAM,kBAAc;AAAA,EACzB,CAAC,OAAO,QAAQ;AACd,UAAM,CAAC,QAAQ,WAAW,QAAI,+BAAkB,eAAe,KAAK;AACpE,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,QAAI,4BAAe,WAAW;AAC9B,UAAM,EAAE,eAAe,GAAG,YAAY,QAAI,yBAAU;AAAA,MAClD,GAAG;AAAA,MACH,UAAU,iBAAiB;AAAA,IAC7B,CAAC;AAED,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAI,YAAY,EAAE,cAAc,yBAAyB,IAAI,CAAC;AAAA,IAChE;AAEA,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,eAAW,iBAAG,mBAAmB,SAAS;AAAA,QAC1C,cAAW;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,4CAAC,yBAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,4CAAC,wBAAQ,GAAG,aAAa;AAAA;AAAA;AAAA,IAC3B;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  CloseButton
4
- } from "./chunk-QCOFUOB2.mjs";
4
+ } from "./chunk-ZGA2XAOL.mjs";
5
5
  export {
6
6
  CloseButton
7
7
  };
package/dist/index.js CHANGED
@@ -34,20 +34,19 @@ var import_jsx_runtime = require("react/jsx-runtime");
34
34
  var CloseButton = (0, import_core.forwardRef)(
35
35
  (props, ref) => {
36
36
  const [styles, mergedProps] = (0, import_core.useComponentStyle)("CloseButton", props);
37
- let {
37
+ const {
38
38
  className,
39
39
  children,
40
- disabled,
41
- disableRipple,
42
40
  isDisabled,
41
+ disabled = isDisabled,
42
+ disableRipple,
43
43
  isRounded,
44
44
  __css,
45
45
  ...rest
46
46
  } = (0, import_core.omitThemeProps)(mergedProps);
47
- disabled != null ? disabled : disabled = isDisabled;
48
47
  const { onPointerDown, ...rippleProps } = (0, import_ripple.useRipple)({
49
48
  ...rest,
50
- isDisabled: disableRipple || disabled
49
+ disabled: disableRipple || disabled
51
50
  });
52
51
  const css = {
53
52
  alignItems: "center",
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/close-button.tsx"],"sourcesContent":["export { CloseButton } from \"./close-button\"\nexport type { CloseButtonProps } from \"./close-button\"\n","import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n forwardRef,\n omitThemeProps,\n ui,\n useComponentStyle,\n} from \"@yamada-ui/core\"\nimport { CloseIcon } from \"@yamada-ui/icon\"\nimport { Ripple, useRipple } from \"@yamada-ui/ripple\"\nimport { cx } from \"@yamada-ui/utils\"\n\ninterface CloseButtonOptions {\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * If `true`, disable ripple effects when pressing a element.\n *\n * @default false\n */\n disableRipple?: boolean\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n *\n * @deprecated Use `disabled` instead.\n */\n isDisabled?: boolean\n /**\n * If true, the button is full rounded.\n *\n * @default false\n */\n isRounded?: boolean\n}\n\nexport interface CloseButtonProps\n extends HTMLUIProps<\"button\">,\n ThemeProps<\"CloseButton\">,\n CloseButtonOptions {}\n\n/**\n * `CloseButton` is a component used primarily to trigger the close functionality of a component.\n *\n * @see Docs https://yamada-ui.com/components/other/close-button\n */\n\nexport const CloseButton = forwardRef<CloseButtonProps, \"button\">(\n (props, ref) => {\n const [styles, mergedProps] = useComponentStyle(\"CloseButton\", props)\n let {\n className,\n children,\n disabled,\n disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n\n disabled ??= isDisabled\n\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || disabled,\n })\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n flexShrink: 0,\n justifyContent: \"center\",\n outline: 0,\n overflow: \"hidden\",\n position: \"relative\",\n ...styles,\n ...__css,\n ...(isRounded ? { borderRadius: \"fallback(full, 9999px)\" } : {}),\n }\n\n return (\n <ui.button\n ref={ref}\n type=\"button\"\n className={cx(\"ui-close-button\", className)}\n aria-label=\"Close\"\n disabled={disabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple {...rippleProps} />\n </ui.button>\n )\n },\n)\n\nCloseButton.displayName = \"CloseButton\"\nCloseButton.__ui__ = \"CloseButton\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAKO;AACP,kBAA0B;AAC1B,oBAAkC;AAClC,mBAAmB;AA6Eb;AAnCC,IAAM,kBAAc;AAAA,EACzB,CAAC,OAAO,QAAQ;AACd,UAAM,CAAC,QAAQ,WAAW,QAAI,+BAAkB,eAAe,KAAK;AACpE,QAAI;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,QAAI,4BAAe,WAAW;AAE9B,6CAAa;AAEb,UAAM,EAAE,eAAe,GAAG,YAAY,QAAI,yBAAU;AAAA,MAClD,GAAG;AAAA,MACH,YAAY,iBAAiB;AAAA,IAC/B,CAAC;AAED,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAI,YAAY,EAAE,cAAc,yBAAyB,IAAI,CAAC;AAAA,IAChE;AAEA,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,eAAW,iBAAG,mBAAmB,SAAS;AAAA,QAC1C,cAAW;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,4CAAC,yBAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,4CAAC,wBAAQ,GAAG,aAAa;AAAA;AAAA;AAAA,IAC3B;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/close-button.tsx"],"sourcesContent":["export { CloseButton } from \"./close-button\"\nexport type { CloseButtonProps } from \"./close-button\"\n","import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n forwardRef,\n omitThemeProps,\n ui,\n useComponentStyle,\n} from \"@yamada-ui/core\"\nimport { CloseIcon } from \"@yamada-ui/icon\"\nimport { Ripple, useRipple } from \"@yamada-ui/ripple\"\nimport { cx } from \"@yamada-ui/utils\"\n\ninterface CloseButtonOptions {\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * If `true`, disable ripple effects when pressing a element.\n *\n * @default false\n */\n disableRipple?: boolean\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n *\n * @deprecated Use `disabled` instead.\n */\n isDisabled?: boolean\n /**\n * If true, the button is full rounded.\n *\n * @default false\n */\n isRounded?: boolean\n}\n\nexport interface CloseButtonProps\n extends HTMLUIProps<\"button\">,\n ThemeProps<\"CloseButton\">,\n CloseButtonOptions {}\n\n/**\n * `CloseButton` is a component used primarily to trigger the close functionality of a component.\n *\n * @see Docs https://yamada-ui.com/components/other/close-button\n */\n\nexport const CloseButton = forwardRef<CloseButtonProps, \"button\">(\n (props, ref) => {\n const [styles, mergedProps] = useComponentStyle(\"CloseButton\", props)\n const {\n className,\n children,\n isDisabled,\n disabled = isDisabled,\n disableRipple,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n disabled: disableRipple || disabled,\n })\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n flexShrink: 0,\n justifyContent: \"center\",\n outline: 0,\n overflow: \"hidden\",\n position: \"relative\",\n ...styles,\n ...__css,\n ...(isRounded ? { borderRadius: \"fallback(full, 9999px)\" } : {}),\n }\n\n return (\n <ui.button\n ref={ref}\n type=\"button\"\n className={cx(\"ui-close-button\", className)}\n aria-label=\"Close\"\n disabled={disabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple {...rippleProps} />\n </ui.button>\n )\n },\n)\n\nCloseButton.displayName = \"CloseButton\"\nCloseButton.__ui__ = \"CloseButton\"\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,kBAKO;AACP,kBAA0B;AAC1B,oBAAkC;AAClC,mBAAmB;AA0Eb;AAhCC,IAAM,kBAAc;AAAA,EACzB,CAAC,OAAO,QAAQ;AACd,UAAM,CAAC,QAAQ,WAAW,QAAI,+BAAkB,eAAe,KAAK;AACpE,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,QAAI,4BAAe,WAAW;AAC9B,UAAM,EAAE,eAAe,GAAG,YAAY,QAAI,yBAAU;AAAA,MAClD,GAAG;AAAA,MACH,UAAU,iBAAiB;AAAA,IAC7B,CAAC;AAED,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAI,YAAY,EAAE,cAAc,yBAAyB,IAAI,CAAC;AAAA,IAChE;AAEA,WACE;AAAA,MAAC,eAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,eAAW,iBAAG,mBAAmB,SAAS;AAAA,QAC1C,cAAW;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,4CAAC,yBAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,4CAAC,wBAAQ,GAAG,aAAa;AAAA;AAAA;AAAA,IAC3B;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  import {
3
3
  CloseButton
4
- } from "./chunk-QCOFUOB2.mjs";
4
+ } from "./chunk-ZGA2XAOL.mjs";
5
5
  export {
6
6
  CloseButton
7
7
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/close-button",
3
- "version": "1.0.51-dev-20241214144625",
3
+ "version": "1.0.51",
4
4
  "description": "Yamada UI close button component",
5
5
  "keywords": [
6
6
  "yamada",
@@ -36,10 +36,10 @@
36
36
  "url": "https://github.com/yamada-ui/yamada-ui/issues"
37
37
  },
38
38
  "dependencies": {
39
- "@yamada-ui/core": "1.16.2-dev-20241214144625",
40
- "@yamada-ui/icon": "1.1.17-dev-20241214144625",
41
- "@yamada-ui/ripple": "1.0.48-dev-20241214144625",
42
- "@yamada-ui/utils": "1.6.2-dev-20241214144625"
39
+ "@yamada-ui/core": "1.16.2",
40
+ "@yamada-ui/icon": "1.1.17",
41
+ "@yamada-ui/ripple": "1.0.48",
42
+ "@yamada-ui/utils": "1.6.2"
43
43
  },
44
44
  "devDependencies": {
45
45
  "clean-package": "2.2.0",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/close-button.tsx"],"sourcesContent":["import type { CSSUIObject, HTMLUIProps, ThemeProps } from \"@yamada-ui/core\"\nimport {\n forwardRef,\n omitThemeProps,\n ui,\n useComponentStyle,\n} from \"@yamada-ui/core\"\nimport { CloseIcon } from \"@yamada-ui/icon\"\nimport { Ripple, useRipple } from \"@yamada-ui/ripple\"\nimport { cx } from \"@yamada-ui/utils\"\n\ninterface CloseButtonOptions {\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n */\n disabled?: boolean\n /**\n * If `true`, disable ripple effects when pressing a element.\n *\n * @default false\n */\n disableRipple?: boolean\n /**\n * If `true`, the button is disabled.\n *\n * @default false\n *\n * @deprecated Use `disabled` instead.\n */\n isDisabled?: boolean\n /**\n * If true, the button is full rounded.\n *\n * @default false\n */\n isRounded?: boolean\n}\n\nexport interface CloseButtonProps\n extends HTMLUIProps<\"button\">,\n ThemeProps<\"CloseButton\">,\n CloseButtonOptions {}\n\n/**\n * `CloseButton` is a component used primarily to trigger the close functionality of a component.\n *\n * @see Docs https://yamada-ui.com/components/other/close-button\n */\n\nexport const CloseButton = forwardRef<CloseButtonProps, \"button\">(\n (props, ref) => {\n const [styles, mergedProps] = useComponentStyle(\"CloseButton\", props)\n let {\n className,\n children,\n disabled,\n disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n\n disabled ??= isDisabled\n\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || disabled,\n })\n\n const css: CSSUIObject = {\n alignItems: \"center\",\n display: \"flex\",\n flexShrink: 0,\n justifyContent: \"center\",\n outline: 0,\n overflow: \"hidden\",\n position: \"relative\",\n ...styles,\n ...__css,\n ...(isRounded ? { borderRadius: \"fallback(full, 9999px)\" } : {}),\n }\n\n return (\n <ui.button\n ref={ref}\n type=\"button\"\n className={cx(\"ui-close-button\", className)}\n aria-label=\"Close\"\n disabled={disabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple {...rippleProps} />\n </ui.button>\n )\n },\n)\n\nCloseButton.displayName = \"CloseButton\"\nCloseButton.__ui__ = \"CloseButton\"\n"],"mappings":";;;AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,SAAS,QAAQ,iBAAiB;AAClC,SAAS,UAAU;AA6Eb,SAUe,KAVf;AAnCC,IAAM,cAAc;AAAA,EACzB,CAAC,OAAO,QAAQ;AACd,UAAM,CAAC,QAAQ,WAAW,IAAI,kBAAkB,eAAe,KAAK;AACpE,QAAI;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI,eAAe,WAAW;AAE9B,6CAAa;AAEb,UAAM,EAAE,eAAe,GAAG,YAAY,IAAI,UAAU;AAAA,MAClD,GAAG;AAAA,MACH,YAAY,iBAAiB;AAAA,IAC/B,CAAC;AAED,UAAM,MAAmB;AAAA,MACvB,YAAY;AAAA,MACZ,SAAS;AAAA,MACT,YAAY;AAAA,MACZ,gBAAgB;AAAA,MAChB,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACH,GAAI,YAAY,EAAE,cAAc,yBAAyB,IAAI,CAAC;AAAA,IAChE;AAEA,WACE;AAAA,MAAC,GAAG;AAAA,MAAH;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,WAAW,GAAG,mBAAmB,SAAS;AAAA,QAC1C,cAAW;AAAA,QACX;AAAA,QACA,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,oBAAC,aAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,oBAAC,UAAQ,GAAG,aAAa;AAAA;AAAA;AAAA,IAC3B;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}