395 lines
9.1 KiB
JavaScript
395 lines
9.1 KiB
JavaScript
const require_runtime = require('../_virtual/_rolldown/runtime.cjs');
|
|
let _a2ui_lit = require("@a2ui/lit");
|
|
|
|
//#region src/theme/viewer-theme.ts
|
|
/** Elements */
|
|
const a = {
|
|
"typography-f-sf": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-500": true,
|
|
"layout-as-n": true,
|
|
"layout-dis-iflx": true,
|
|
"layout-al-c": true
|
|
};
|
|
const audio = { "layout-w-100": true };
|
|
const body = {
|
|
"typography-f-s": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-400": true,
|
|
"layout-mt-0": true,
|
|
"layout-mb-2": true,
|
|
"typography-sz-bm": true,
|
|
"color-c-n10": true
|
|
};
|
|
const button = {
|
|
"typography-f-sf": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-500": true,
|
|
"layout-pt-3": true,
|
|
"layout-pb-3": true,
|
|
"layout-pl-5": true,
|
|
"layout-pr-5": true,
|
|
"layout-mb-1": true,
|
|
"border-br-16": true,
|
|
"border-bw-0": true,
|
|
"border-c-n70": true,
|
|
"border-bs-s": true,
|
|
"color-bgc-s30": true,
|
|
"color-c-n100": true,
|
|
"behavior-ho-80": true
|
|
};
|
|
const heading = {
|
|
"typography-f-sf": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-500": true,
|
|
"layout-mt-0": true,
|
|
"layout-mb-2": true,
|
|
"color-c-n10": true
|
|
};
|
|
const h1 = {
|
|
...heading,
|
|
"typography-sz-tl": true
|
|
};
|
|
const h2 = {
|
|
...heading,
|
|
"typography-sz-tm": true
|
|
};
|
|
const h3 = {
|
|
...heading,
|
|
"typography-sz-ts": true
|
|
};
|
|
const iframe = { "behavior-sw-n": true };
|
|
const input = {
|
|
"typography-f-sf": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-400": true,
|
|
"layout-pl-4": true,
|
|
"layout-pr-4": true,
|
|
"layout-pt-2": true,
|
|
"layout-pb-2": true,
|
|
"border-br-6": true,
|
|
"border-bw-1": true,
|
|
"color-bc-s70": true,
|
|
"border-bs-s": true,
|
|
"layout-as-n": true,
|
|
"color-c-n10": true
|
|
};
|
|
const p = {
|
|
"typography-f-s": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"typography-sz-bm": true,
|
|
"layout-as-n": true,
|
|
"color-c-n10": true
|
|
};
|
|
const orderedList = {
|
|
"typography-f-s": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"typography-sz-bm": true,
|
|
"layout-as-n": true
|
|
};
|
|
const unorderedList = {
|
|
"typography-f-s": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"typography-sz-bm": true,
|
|
"layout-as-n": true
|
|
};
|
|
const listItem = {
|
|
"typography-f-s": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"typography-sz-bm": true,
|
|
"layout-as-n": true
|
|
};
|
|
const pre = {
|
|
"typography-f-c": true,
|
|
"typography-fs-n": true,
|
|
"typography-w-400": true,
|
|
"typography-sz-bm": true,
|
|
"typography-ws-p": true,
|
|
"layout-as-n": true
|
|
};
|
|
const textarea = {
|
|
...input,
|
|
"layout-r-none": true,
|
|
"layout-fs-c": true
|
|
};
|
|
const video = { "layout-el-cv": true };
|
|
const aLight = _a2ui_lit.v0_8.Styles.merge(a, { "color-c-n5": true });
|
|
const inputLight = _a2ui_lit.v0_8.Styles.merge(input, { "color-c-n5": true });
|
|
const textareaLight = _a2ui_lit.v0_8.Styles.merge(textarea, { "color-c-n5": true });
|
|
const buttonLight = _a2ui_lit.v0_8.Styles.merge(button, { "color-c-n100": true });
|
|
const h1Light = _a2ui_lit.v0_8.Styles.merge(h1, { "color-c-n5": true });
|
|
const h2Light = _a2ui_lit.v0_8.Styles.merge(h2, { "color-c-n5": true });
|
|
const h3Light = _a2ui_lit.v0_8.Styles.merge(h3, { "color-c-n5": true });
|
|
const bodyLight = _a2ui_lit.v0_8.Styles.merge(body, { "color-c-n5": true });
|
|
const pLight = _a2ui_lit.v0_8.Styles.merge(p, { "color-c-n35": true });
|
|
const preLight = _a2ui_lit.v0_8.Styles.merge(pre, { "color-c-n35": true });
|
|
const orderedListLight = _a2ui_lit.v0_8.Styles.merge(orderedList, { "color-c-n35": true });
|
|
const unorderedListLight = _a2ui_lit.v0_8.Styles.merge(unorderedList, { "color-c-n35": true });
|
|
const listItemLight = _a2ui_lit.v0_8.Styles.merge(listItem, { "color-c-n35": true });
|
|
const theme = {
|
|
additionalStyles: {
|
|
Button: {
|
|
background: "var(--primary, oklch(0.205 0 0))",
|
|
color: "var(--primary-foreground, oklch(0.985 0 0))",
|
|
"border-radius": "calc(var(--radius, 0.625rem) - 2px)",
|
|
cursor: "pointer",
|
|
width: "100%",
|
|
"--n-10": "var(--primary-foreground, oklch(0.985 0 0))",
|
|
"--n-35": "var(--primary-foreground, oklch(0.985 0 0))",
|
|
"--n-60": "var(--primary-foreground, oklch(0.985 0 0))"
|
|
},
|
|
Card: {
|
|
background: "var(--card, oklch(1 0 0))",
|
|
border: "1px solid var(--border, oklch(0.922 0 0))",
|
|
"border-radius": "var(--radius, 0.625rem)",
|
|
padding: "16px"
|
|
},
|
|
TextField: {
|
|
"background-color": "var(--background, oklch(1 0 0))",
|
|
"border-color": "var(--input, oklch(0.922 0 0))",
|
|
color: "var(--foreground, oklch(0.145 0 0))",
|
|
"border-radius": "var(--radius, 0.625rem)"
|
|
},
|
|
CheckBox: {
|
|
"--n-100": "var(--background, oklch(1 0 0))",
|
|
"--n-70": "var(--border, oklch(0.922 0 0))",
|
|
"--n-30": "var(--foreground, oklch(0.145 0 0))"
|
|
},
|
|
DateTimeInput: {
|
|
"background-color": "var(--background, oklch(1 0 0))",
|
|
"border-color": "var(--input, oklch(0.922 0 0))",
|
|
color: "var(--foreground, oklch(0.145 0 0))",
|
|
"border-radius": "var(--radius, 0.625rem)"
|
|
},
|
|
Modal: {
|
|
"--p-100": "var(--card, oklch(1 0 0))",
|
|
"--p-80": "var(--border, oklch(0.922 0 0))",
|
|
"border-radius": "var(--radius, 0.625rem)"
|
|
},
|
|
Text: { color: "var(--foreground, oklch(0.145 0 0))" }
|
|
},
|
|
components: {
|
|
AudioPlayer: {},
|
|
Button: {
|
|
"layout-pt-2": true,
|
|
"layout-pb-2": true,
|
|
"layout-pl-3": true,
|
|
"layout-pr-3": true,
|
|
"border-bw-0": true,
|
|
"border-bs-s": true
|
|
},
|
|
Card: {
|
|
"border-br-9": true,
|
|
"color-bgc-n100": true
|
|
},
|
|
CheckBox: {
|
|
element: {
|
|
"layout-m-0": true,
|
|
"layout-mr-2": true,
|
|
"layout-p-2": true,
|
|
"border-br-2": true,
|
|
"border-bw-1": true,
|
|
"border-bs-s": true,
|
|
"color-bgc-n100": true,
|
|
"color-bc-n70": true,
|
|
"color-c-n30": true
|
|
},
|
|
label: {
|
|
"typography-f-sf": true,
|
|
"typography-v-r": true,
|
|
"typography-w-400": true,
|
|
"layout-flx-1": true,
|
|
"typography-sz-ll": true
|
|
},
|
|
container: {
|
|
"layout-dsp-iflex": true,
|
|
"layout-al-c": true
|
|
}
|
|
},
|
|
Column: { "layout-g-2": true },
|
|
DateTimeInput: {
|
|
container: {},
|
|
label: {},
|
|
element: {
|
|
"layout-pt-2": true,
|
|
"layout-pb-2": true,
|
|
"layout-pl-3": true,
|
|
"layout-pr-3": true,
|
|
"border-br-2": true,
|
|
"border-bw-1": true,
|
|
"border-bs-s": true,
|
|
"color-bgc-n100": true,
|
|
"color-bc-n70": true,
|
|
"color-c-n30": true
|
|
}
|
|
},
|
|
Divider: {},
|
|
Image: {
|
|
all: {
|
|
"border-br-5": true,
|
|
"layout-el-cv": true,
|
|
"layout-w-100": true,
|
|
"layout-h-100": true
|
|
},
|
|
avatar: { "is-avatar": true },
|
|
header: {},
|
|
icon: {},
|
|
largeFeature: {},
|
|
mediumFeature: {},
|
|
smallFeature: {}
|
|
},
|
|
Icon: {},
|
|
List: {
|
|
"layout-g-4": true,
|
|
"layout-p-2": true
|
|
},
|
|
Modal: {
|
|
backdrop: { "color-bbgc-n10_20": true },
|
|
element: {
|
|
"border-br-2": true,
|
|
"color-bgc-n100": true,
|
|
"layout-p-4": true,
|
|
"border-bw-1": true,
|
|
"border-bs-s": true,
|
|
"color-bc-n80": true
|
|
}
|
|
},
|
|
MultipleChoice: {
|
|
container: {},
|
|
label: {},
|
|
element: {}
|
|
},
|
|
Row: { "layout-g-4": true },
|
|
Slider: {
|
|
container: {},
|
|
label: {},
|
|
element: {}
|
|
},
|
|
Tabs: {
|
|
container: {},
|
|
controls: {
|
|
all: {},
|
|
selected: {}
|
|
},
|
|
element: {}
|
|
},
|
|
Text: {
|
|
all: {
|
|
"layout-w-100": true,
|
|
"layout-g-2": true
|
|
},
|
|
h1: {
|
|
"typography-f-sf": true,
|
|
"typography-v-r": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"layout-p-0": true,
|
|
"typography-sz-tl": true
|
|
},
|
|
h2: {
|
|
"typography-f-sf": true,
|
|
"typography-v-r": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"layout-p-0": true,
|
|
"typography-sz-tm": true
|
|
},
|
|
h3: {
|
|
"typography-f-sf": true,
|
|
"typography-v-r": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"layout-p-0": true,
|
|
"typography-sz-ts": true
|
|
},
|
|
h4: {
|
|
"typography-f-sf": true,
|
|
"typography-v-r": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"layout-p-0": true,
|
|
"typography-sz-bl": true
|
|
},
|
|
h5: {
|
|
"typography-f-sf": true,
|
|
"typography-v-r": true,
|
|
"typography-w-400": true,
|
|
"layout-m-0": true,
|
|
"layout-p-0": true,
|
|
"typography-sz-bm": true
|
|
},
|
|
body: {},
|
|
caption: {}
|
|
},
|
|
TextField: {
|
|
container: {
|
|
"typography-sz-bm": true,
|
|
"layout-w-100": true,
|
|
"layout-g-2": true,
|
|
"layout-dsp-flexvert": true
|
|
},
|
|
label: { "layout-flx-0": true },
|
|
element: {
|
|
"typography-sz-bm": true,
|
|
"layout-pt-2": true,
|
|
"layout-pb-2": true,
|
|
"layout-pl-3": true,
|
|
"layout-pr-3": true,
|
|
"border-br-2": true,
|
|
"border-bw-1": true,
|
|
"border-bs-s": true,
|
|
"color-bgc-n100": true,
|
|
"color-bc-n70": true,
|
|
"color-c-n30": true
|
|
}
|
|
},
|
|
Video: {
|
|
"border-br-5": true,
|
|
"layout-el-cv": true
|
|
}
|
|
},
|
|
elements: {
|
|
a: aLight,
|
|
audio,
|
|
body: bodyLight,
|
|
button: buttonLight,
|
|
em: { "typography-fs-n": true },
|
|
h1: h1Light,
|
|
h2: h2Light,
|
|
h3: h3Light,
|
|
h4: {},
|
|
h5: {},
|
|
iframe,
|
|
input: inputLight,
|
|
p: pLight,
|
|
pre: preLight,
|
|
textarea: textareaLight,
|
|
video
|
|
},
|
|
markdown: {
|
|
p: [...Object.keys(pLight)],
|
|
h1: [...Object.keys(h1Light)],
|
|
h2: [...Object.keys(h2Light)],
|
|
h3: [...Object.keys(h3Light)],
|
|
h4: [],
|
|
h5: [],
|
|
ul: [...Object.keys(unorderedListLight)],
|
|
ol: [...Object.keys(orderedListLight)],
|
|
li: [...Object.keys(listItemLight)],
|
|
a: [...Object.keys(aLight)],
|
|
strong: [],
|
|
em: ["typography-fs-n"]
|
|
}
|
|
};
|
|
|
|
//#endregion
|
|
exports.theme = theme;
|
|
//# sourceMappingURL=viewer-theme.cjs.map
|