@yamada-ui/close-button 1.0.42-dev-20241007025246 → 1.0.42-dev-20241007155115

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,8 +45,8 @@ var CloseButton = forwardRef(
45
45
  ref,
46
46
  type: "button",
47
47
  className: cx("ui-close-button", className),
48
- disabled: isDisabled,
49
48
  "aria-label": "Close",
49
+ disabled: isDisabled,
50
50
  __css: css,
51
51
  ...rest,
52
52
  onPointerDown,
@@ -64,4 +64,4 @@ CloseButton.__ui__ = "CloseButton";
64
64
  export {
65
65
  CloseButton
66
66
  };
67
- //# sourceMappingURL=chunk-XBT7EE6Q.mjs.map
67
+ //# sourceMappingURL=chunk-IUGYU5VA.mjs.map
@@ -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`, 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 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 disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || isDisabled,\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 disabled={isDisabled}\n aria-label=\"Close\"\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple isDisabled={disableRipple || isDisabled} {...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;AAiEb,SAUe,KAVf;AA/BC,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;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,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,UAAU;AAAA,QACV,cAAW;AAAA,QACX,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,oBAAC,aAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,oBAAC,UAAO,YAAY,iBAAiB,YAAa,GAAG,aAAa;AAAA;AAAA;AAAA,IACpE;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`, 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 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 disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || isDisabled,\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={isDisabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple isDisabled={disableRipple || isDisabled} {...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;AAiEb,SAUe,KAVf;AA/BC,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;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,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,UAAU;AAAA,QACV,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,oBAAC,aAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,oBAAC,UAAO,YAAY,iBAAiB,YAAa,GAAG,aAAa;AAAA;AAAA;AAAA,IACpE;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;AAC1B,YAAY,SAAS;","names":[]}
@@ -63,8 +63,8 @@ var CloseButton = (0, import_core.forwardRef)(
63
63
  ref,
64
64
  type: "button",
65
65
  className: (0, import_utils.cx)("ui-close-button", className),
66
- disabled: isDisabled,
67
66
  "aria-label": "Close",
67
+ disabled: isDisabled,
68
68
  __css: css,
69
69
  ...rest,
70
70
  onPointerDown,
@@ -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`, 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 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 disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || isDisabled,\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 disabled={isDisabled}\n aria-label=\"Close\"\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple isDisabled={disableRipple || isDisabled} {...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;AAiEb;AA/BC,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;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,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,UAAU;AAAA,QACV,cAAW;AAAA,QACX,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,4CAAC,yBAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,4CAAC,wBAAO,YAAY,iBAAiB,YAAa,GAAG,aAAa;AAAA;AAAA;AAAA,IACpE;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`, 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 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 disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || isDisabled,\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={isDisabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple isDisabled={disableRipple || isDisabled} {...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;AAiEb;AA/BC,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;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,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,UAAU;AAAA,QACV,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,4CAAC,yBAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,4CAAC,wBAAO,YAAY,iBAAiB,YAAa,GAAG,aAAa;AAAA;AAAA;AAAA,IACpE;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-XBT7EE6Q.mjs";
4
+ } from "./chunk-IUGYU5VA.mjs";
5
5
  export {
6
6
  CloseButton
7
7
  };
package/dist/index.js CHANGED
@@ -65,8 +65,8 @@ var CloseButton = (0, import_core.forwardRef)(
65
65
  ref,
66
66
  type: "button",
67
67
  className: (0, import_utils.cx)("ui-close-button", className),
68
- disabled: isDisabled,
69
68
  "aria-label": "Close",
69
+ disabled: isDisabled,
70
70
  __css: css,
71
71
  ...rest,
72
72
  onPointerDown,
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`, 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 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 disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || isDisabled,\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 disabled={isDisabled}\n aria-label=\"Close\"\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple isDisabled={disableRipple || isDisabled} {...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;AAiEb;AA/BC,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;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,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,UAAU;AAAA,QACV,cAAW;AAAA,QACX,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,4CAAC,yBAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,4CAAC,wBAAO,YAAY,iBAAiB,YAAa,GAAG,aAAa;AAAA;AAAA;AAAA,IACpE;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`, 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 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 disableRipple,\n isDisabled,\n isRounded,\n __css,\n ...rest\n } = omitThemeProps(mergedProps)\n const { onPointerDown, ...rippleProps } = useRipple({\n ...rest,\n isDisabled: disableRipple || isDisabled,\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={isDisabled}\n __css={css}\n {...rest}\n onPointerDown={onPointerDown}\n >\n {children || <CloseIcon height=\"1em\" width=\"1em\" />}\n\n <Ripple isDisabled={disableRipple || isDisabled} {...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;AAiEb;AA/BC,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;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,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,UAAU;AAAA,QACV,OAAO;AAAA,QACN,GAAG;AAAA,QACJ;AAAA,QAEC;AAAA,sBAAY,4CAAC,yBAAU,QAAO,OAAM,OAAM,OAAM;AAAA,UAEjD,4CAAC,wBAAO,YAAY,iBAAiB,YAAa,GAAG,aAAa;AAAA;AAAA;AAAA,IACpE;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-XBT7EE6Q.mjs";
4
+ } from "./chunk-IUGYU5VA.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.42-dev-20241007025246",
3
+ "version": "1.0.42-dev-20241007155115",
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.15.2-dev-20241007025246",
40
- "@yamada-ui/icon": "1.1.8-dev-20241007025246",
41
- "@yamada-ui/ripple": "1.0.40-dev-20241007025246",
42
- "@yamada-ui/utils": "1.5.3-dev-20241007025246"
39
+ "@yamada-ui/core": "1.15.2-dev-20241007155115",
40
+ "@yamada-ui/icon": "1.1.8-dev-20241007155115",
41
+ "@yamada-ui/ripple": "1.0.40-dev-20241007155115",
42
+ "@yamada-ui/utils": "1.5.3-dev-20241007155115"
43
43
  },
44
44
  "devDependencies": {
45
45
  "clean-package": "2.2.0",