Files
wdi-dashboard/node_modules/@chakra-ui/close-button/dist/close-button.js

73 lines
2.7 KiB
JavaScript
Raw Normal View History

2024-08-16 15:06:52 +05:30
'use client'
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/close-button.tsx
var close_button_exports = {};
__export(close_button_exports, {
CloseButton: () => CloseButton
});
module.exports = __toCommonJS(close_button_exports);
var import_icon = require("@chakra-ui/icon");
var import_system = require("@chakra-ui/system");
var import_jsx_runtime = require("react/jsx-runtime");
function CloseIcon(props) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.Icon, { focusable: "false", "aria-hidden": true, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"path",
{
fill: "currentColor",
d: "M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"
}
) });
}
var CloseButton = (0, import_system.forwardRef)(
function CloseButton2(props, ref) {
const styles = (0, import_system.useStyleConfig)("CloseButton", props);
const { children, isDisabled, __css, ...rest } = (0, import_system.omitThemingProps)(props);
const baseStyle = {
outline: 0,
display: "flex",
alignItems: "center",
justifyContent: "center",
flexShrink: 0
};
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_system.chakra.button,
{
type: "button",
"aria-label": "Close",
ref,
disabled: isDisabled,
__css: {
...baseStyle,
...styles,
...__css
},
...rest,
children: children || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CloseIcon, { width: "1em", height: "1em" })
}
);
}
);
CloseButton.displayName = "CloseButton";
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
CloseButton
});
//# sourceMappingURL=close-button.js.map