@nurl/panda-preset
Version:
Official Panda-CSS preset for the Ganglion Design System.
91 lines (90 loc) • 2.3 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/input.ts
var input_exports = {};
__export(input_exports, {
input: () => input
});
module.exports = __toCommonJS(input_exports);
var import_dev = require("@pandacss/dev");
var import_states = require("./shared/states.cjs");
var import_input = require("./shared/input.base.cjs");
var inputIconProps = {
color: import_input.INPUT_COLOR,
position: "absolute",
top: "50%",
transform: "translateY(-50%)",
w: "1.5rem",
_peerInvalid: {
color: "danger.text.100"
},
_peerDisabled: {
opacity: import_states.formStates._disabled.opacity
}
};
var input = (0, import_dev.defineSlotRecipe)({
className: "input",
description: "The styles for the Input component",
slots: ["root", "control", "icon", "startIcon"],
base: {
root: {
marginTop: "2",
position: "relative",
paddingInlineEnd: "4",
w: "full"
},
control: {
...import_input.inputControl,
_startIcon: {
paddingInlineStart: "10"
}
},
icon: {
...inputIconProps,
right: "1.5rem"
},
startIcon: {
...inputIconProps,
left: "0.7rem"
}
},
variants: {
size: {
md: {
root: {
h: "2.5rem",
fontSize: "sm"
}
},
lg: {
root: {
h: "3rem"
}
}
}
},
defaultVariants: {
size: "lg"
}
});
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
input
});
//# sourceMappingURL=input.cjs.map