UNPKG

@vrx-arco/helper

Version:

<p align="center"> <img src="https://vrx-arco.github.io/arco-design-pro/favicon.svg" width="200" height="250"> </p>

255 lines (250 loc) 10.3 kB
import { __export } from "./chunk-Cl8Af3a2.js"; import { VrxArcoColorPickerResolver } from "@vrx-arco/color-picker-import-resolver"; //#region src/pro-components/constant.ts var constant_exports = {}; __export(constant_exports, { mjsStyleCssComp: () => mjsStyleCssComp$1, mjsStyleJsComp: () => mjsStyleJsComp$1, vrxStyle: () => vrxStyle$1 }); const mjsStyleCssComp$1 = { ThemeDarkLight: ["@arco-design/web-vue/es/button/style/css.js"], ToggleFullScreen: ["@arco-design/web-vue/es/button/style/css.js"], AvatarDropDown: ["@arco-design/web-vue/es/avatar/style/css.js", "@arco-design/web-vue/es/dropdown/style/css.js"], LoginForm: [ "@arco-design/web-vue/es/button/style/css.js", "@arco-design/web-vue/es/checkbox/style/css.js", "@arco-design/web-vue/es/form/style/css.js", "@arco-design/web-vue/es/input/style/css.js", "@arco-design/web-vue/es/link/style/css.js", "@arco-design/web-vue/es/message/style/css.js", "@arco-design/web-vue/es/space/style/css.js" ], LoginPage: [ "@arco-design/web-vue/es/button/style/css.js", "@arco-design/web-vue/es/checkbox/style/css.js", "@arco-design/web-vue/es/form/style/css.js", "@arco-design/web-vue/es/input/style/css.js", "@arco-design/web-vue/es/link/style/css.js", "@arco-design/web-vue/es/message/style/css.js", "@arco-design/web-vue/es/space/style/css.js", "@arco-design/web-vue/es/layout/style/css.js" ], SearchLayout: ["@arco-design/web-vue/es/layout/style/css.js"], SearchLayoutHeader: [ "@arco-design/web-vue/es/card/style/css.js", "@arco-design/web-vue/es/divider/style/css.js", "@arco-design/web-vue/es/layout/style/css.js" ], SearchLayoutContent: ["@arco-design/web-vue/es/layout/style/css.js", "@arco-design/web-vue/es/tabs/style/css.js"], ProCardList: [ "@arco-design/web-vue/es/card/style/css.js", "@arco-design/web-vue/es/list/style/css.js", "@arco-design/web-vue/es/layout/style/css.js", "@arco-design/web-vue/es/pagination/style/css.js" ], ProCardMeta: [], ProPagination: ["@arco-design/web-vue/es/layout/style/css.js", "@arco-design/web-vue/es/pagination/style/css.js"], ProList: [ "@arco-design/web-vue/es/list/style/css.js", "@arco-design/web-vue/es/layout/style/css.js", "@arco-design/web-vue/es/pagination/style/css.js" ], SearchBar: [ "@arco-design/web-vue/es/button/style/css.js", "@arco-design/web-vue/es/form/style/css.js", "@arco-design/web-vue/es/grid/style/css.js", "@arco-design/web-vue/es/space/style/css.js" ], SearchBarItem: ["@arco-design/web-vue/es/grid/style/css.js", "@arco-design/web-vue/es/form/style/css.js"], FormGridItem: [], FormGrid: [], EditFormDialog: [ "@arco-design/web-vue/es/drawer/style/css.js", "@arco-design/web-vue/es/form/style/css.js", "@arco-design/web-vue/es/modal/style/css.js", "@arco-design/web-vue/es/notification/style/css.js" ], SpaceDivider: ["@arco-design/web-vue/es/divider/style/css.js"] }; const mjsStyleJsComp$1 = { ThemeDarkLight: ["@arco-design/web-vue/es/button/style/index.js"], ToggleFullScreen: ["@arco-design/web-vue/es/button/style/index.js"], AvatarDropDown: ["@arco-design/web-vue/es/avatar/style/index.js", "@arco-design/web-vue/es/dropdown/style/index.js"], LoginForm: [ "@arco-design/web-vue/es/button/style/index.js", "@arco-design/web-vue/es/checkbox/style/index.js", "@arco-design/web-vue/es/form/style/index.js", "@arco-design/web-vue/es/input/style/index.js", "@arco-design/web-vue/es/link/style/index.js", "@arco-design/web-vue/es/message/style/index.js", "@arco-design/web-vue/es/space/style/index.js" ], LoginPage: [ "@arco-design/web-vue/es/button/style/index.js", "@arco-design/web-vue/es/checkbox/style/index.js", "@arco-design/web-vue/es/form/style/index.js", "@arco-design/web-vue/es/input/style/index.js", "@arco-design/web-vue/es/link/style/index.js", "@arco-design/web-vue/es/message/style/index.js", "@arco-design/web-vue/es/space/style/index.js", "@arco-design/web-vue/es/layout/style/index.js" ], SearchLayout: ["@arco-design/web-vue/es/layout/style/index.js"], SearchLayoutHeader: [ "@arco-design/web-vue/es/card/style/index.js", "@arco-design/web-vue/es/divider/style/index.js", "@arco-design/web-vue/es/layout/style/index.js" ], SearchLayoutContent: ["@arco-design/web-vue/es/layout/style/index.js", "@arco-design/web-vue/es/tabs/style/index.js"], ProCardList: [ "@arco-design/web-vue/es/card/style/index.js", "@arco-design/web-vue/es/list/style/index.js", "@arco-design/web-vue/es/layout/style/index.js", "@arco-design/web-vue/es/pagination/style/index.js" ], ProCardMeta: [], ProPagination: ["@arco-design/web-vue/es/layout/style/index.js", "@arco-design/web-vue/es/pagination/style/index.js"], ProList: [ "@arco-design/web-vue/es/list/style/index.js", "@arco-design/web-vue/es/layout/style/index.js", "@arco-design/web-vue/es/pagination/style/index.js" ], SearchBar: [ "@arco-design/web-vue/es/button/style/index.js", "@arco-design/web-vue/es/form/style/index.js", "@arco-design/web-vue/es/grid/style/index.js", "@arco-design/web-vue/es/space/style/index.js" ], SearchBarItem: ["@arco-design/web-vue/es/grid/style/index.js", "@arco-design/web-vue/es/form/style/index.js"], FormGridItem: [], FormGrid: [], EditFormDialog: [ "@arco-design/web-vue/es/drawer/style/index.js", "@arco-design/web-vue/es/form/style/index.js", "@arco-design/web-vue/es/modal/style/index.js", "@arco-design/web-vue/es/notification/style/index.js" ], SpaceDivider: ["@arco-design/web-vue/es/divider/style/index.js"] }; const vrxStyle$1 = { ThemeDarkLight: [], ToggleFullScreen: [], AvatarDropDown: ["@vrx-arco/pro-components/style/AvatarDropDown/style/index.css"], LoginForm: ["@vrx-arco/pro-components/style/LoginForm/style/index.css"], LoginPage: ["@vrx-arco/pro-components/style/LoginForm/style/index.css", "@vrx-arco/pro-components/style/LoginPage/style/index.css"], SearchLayout: ["@vrx-arco/pro-components/style/SearchLayout/style/index.css"], SearchLayoutHeader: [], SearchLayoutContent: [], ProCardList: ["@vrx-arco/pro-components/style/ProPagination/style/index.css", "@vrx-arco/pro-components/style/ProList/style/index.css"], ProCardMeta: ["@vrx-arco/pro-components/style/ProCardMeta/style/index.css"], ProPagination: ["@vrx-arco/pro-components/style/ProPagination/style/index.css"], ProList: ["@vrx-arco/pro-components/style/ProPagination/style/index.css", "@vrx-arco/pro-components/style/ProList/style/index.css"], SearchBar: ["@vrx-arco/pro-components/style/SearchBar/style/index.css"], SearchBarItem: [], FormGridItem: [], FormGrid: [], EditFormDialog: [], SpaceDivider: ["@vrx-arco/pro-components/style/SpaceDivider/style/index.css"] }; //#endregion //#region src/pro-components/index.ts const _VrxArcoColorPickerResolver = (options, name) => { if (!options.colorPicker) return; return VrxArcoColorPickerResolver(options).resolve(name); }; const _VrxArcoProComponentsResolver = (options, name) => { if (Reflect.has(mjsStyleCssComp$1, name)) { const importStyle = options.importStyle ?? "css"; const config = { name, from: "@vrx-arco/pro-components" }; if (options.sideEffect !== false) { const styles = importStyle == "css" ? mjsStyleCssComp$1[name] : mjsStyleJsComp$1[name]; styles.push(...vrxStyle$1[name]); config.sideEffects = styles; if (Array.isArray(config.sideEffects) && options.theme) config.sideEffects = config.sideEffects.map((v) => { if (typeof v === "string" && options.theme) return v.replace(/^@arco-design\/web-vue/, options.theme); return v; }); } return config; } }; function VrxArcoProComponentsResolver(options) { return { type: "component", resolve: (name) => { const resolvers = [_VrxArcoColorPickerResolver, _VrxArcoProComponentsResolver]; for (const resolver of resolvers) { const config = resolver(options, name); if (config) return config; } } }; } //#endregion //#region src/pro-layout/constant.ts var constant_exports$1 = {}; __export(constant_exports$1, { mjsStyleCssComp: () => mjsStyleCssComp, mjsStyleJsComp: () => mjsStyleJsComp, vrxStyle: () => vrxStyle }); const mjsStyleCssComp = { ProLayout: [ "@arco-design/web-vue/es/drawer/style/css.js", "@arco-design/web-vue/es/layout/style/css.js", "@arco-design/web-vue/es/scrollbar/style/css.js", "@arco-design/web-vue/es/spin/style/css.js", "@arco-design/web-vue/es/menu/style/css.js", "@arco-design/web-vue/es/space/style/css.js", "@arco-design/web-vue/es/typography/style/css.js" ], PageWrapper: ["@arco-design/web-vue/es/breadcrumb/style/css.js", "@arco-design/web-vue/es/scrollbar/style/css.js"] }; const mjsStyleJsComp = { ProLayout: [ "@arco-design/web-vue/es/drawer/style/index.js", "@arco-design/web-vue/es/layout/style/index.js", "@arco-design/web-vue/es/scrollbar/style/index.js", "@arco-design/web-vue/es/spin/style/index.js", "@arco-design/web-vue/es/menu/style/index.js", "@arco-design/web-vue/es/space/style/index.js", "@arco-design/web-vue/es/typography/style/index.js" ], PageWrapper: ["@arco-design/web-vue/es/breadcrumb/style/index.js", "@arco-design/web-vue/es/scrollbar/style/index.js"] }; const vrxStyle = { ProLayout: ["@vrx-arco/pro-layout/style/ProLayout/style/index.css"], PageWrapper: ["@vrx-arco/pro-layout/style/PageWrapper/style/index.css"] }; //#endregion //#region src/pro-layout/index.ts function VrxArcoProLayoutResolver(options) { return { type: "component", resolve: (name) => { if (Reflect.has(mjsStyleCssComp, name)) { const importStyle = options.importStyle ?? "css"; const config = { name, from: "@vrx-arco/pro-layout" }; if (options.sideEffect !== false) { const styles = importStyle == "css" ? mjsStyleCssComp[name] : mjsStyleJsComp[name]; styles.push(...vrxStyle[name]); config.sideEffects = styles; if (Array.isArray(config.sideEffects) && options.theme) config.sideEffects = config.sideEffects.map((v) => { if (typeof v === "string" && options.theme) return v.replace(/^@arco-design\/web-vue/, options.theme); return v; }); } return config; } } }; } //#endregion export { constant_exports as ProComponentsConstant, constant_exports$1 as ProLayoutConstant, VrxArcoProComponentsResolver, VrxArcoProLayoutResolver };