@nurl/panda-preset
Version:
Official Panda-CSS preset for the Ganglion Design System.
92 lines (91 loc) • 2.61 kB
JavaScript
;
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/recipes/checkbox.ts
var checkbox_exports = {};
__export(checkbox_exports, {
checkbox: () => checkbox
});
module.exports = __toCommonJS(checkbox_exports);
var import_dev = require("@pandacss/dev");
var import_states = require("./shared/states.cjs");
var import_input = require("./shared/input.base.cjs");
var checkbox = (0, import_dev.defineSlotRecipe)({
className: "checkbox",
description: "The styles for the Checkbox component",
slots: ["root", "control", "icon"],
base: {
root: {
alignItems: "center",
display: "flex",
gap: "3",
position: "relative"
},
control: {
...import_input.inputControl,
border: "2px solid",
h: "1.125rem",
p: "0",
rounded: "sm",
w: "1.125rem",
zIndex: "base",
_hover: {
...import_input.inputControl._hover,
bgColor: "neutral.bg.hover",
borderColor: "action.border.initial"
},
_checked: {
bgColor: "action.bg.initial"
},
_userInvalid: {
borderColor: "danger.border.initial",
_checked: {
bgColor: "danger.bg.initial"
}
}
},
icon: {
color: "action.text.initial",
display: "none",
position: "absolute",
h: "full",
left: "0",
top: "0",
w: "full",
zIndex: "decorator",
_peerChecked: {
alignItems: "center",
display: "flex",
justifyContent: "center"
},
_peerInvalid: {
color: "danger.text.inverse"
},
_peerDisabled: {
opacity: import_states.formStates._disabled.opacity
}
}
},
variants: {},
defaultVariants: {}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
checkbox
});
//# sourceMappingURL=checkbox.cjs.map