UNPKG

@crossed/ui

Version:

A universal & performant styling library for React Native, Next.js & React

108 lines (107 loc) 3.42 kB
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); var form_exports = {}; __export(form_exports, { form: () => form }); module.exports = __toCommonJS(form_exports); var import_styled = require("@crossed/styled"); const form = (0, import_styled.createStyles)( ({ space, font, colors, components: { Input } }) => ({ inputError: { base: { borderColor: colors.error.primary, color: colors.error.primary } }, input: { "base": { color: Input.primary.default.text, borderWidth: 1, borderStyle: "solid", borderColor: Input.primary.default.border, backgroundColor: Input.primary.default.background, borderRadius: 8, paddingVertical: space.xs, paddingHorizontal: space.md, justifyContent: "center", alignItems: "center", height: 44, flexDirection: "row", flex: 1 }, ":hover": { borderColor: Input.primary.hover.border }, ":focus": { borderColor: Input.primary.focus.border }, ":active": { borderColor: Input.primary.focus.border }, ":disabled": { backgroundColor: Input.primary.disabled.background, borderColor: Input.primary.disabled.border }, "web": { "base": { boxSizing: "border-box" }, ":focus-visible": { outlineWidth: 0 }, ":focus": { outlineColor: Input.primary.focus.border }, ":disabled": { cursor: "not-allowed" } } }, disabled: { base: { backgroundColor: Input.primary.disabled.background, borderColor: Input.primary.disabled.border } }, placeholder: { base: { color: Input.primary.default.placeholder } }, label: { "base": { color: font.color, fontWeight: font.fontWeight.lg }, ":focus": { color: colors.text.brand }, ":disabled": { color: colors.text.secondary } }, labelDescription: { base: { color: colors.text.secondary } }, labelExtra: { base: { color: colors.text.secondary, flex: 1 } }, containerLabel: {}, elementRight: { base: { position: "absolute", right: 0, top: 0, bottom: 0, justifyContent: "center", padding: space.md, paddingVertical: 0, alignItems: "center" } }, elementLeft: { base: { position: "absolute", left: 0, top: 0, bottom: 0, paddingVertical: 0, justifyContent: "center", padding: space.md, alignItems: "center" } } }) ); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { form }); //# sourceMappingURL=form.js.map