@rededor/cura 0.4.1 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{app-globals-d0edfce9.js → app-globals-858f45bf.js} +8 -8
- package/dist/cjs/{app-globals-d0edfce9.js.map → app-globals-858f45bf.js.map} +1 -1
- package/dist/cjs/cura.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/api/theme-presets/static.js +7 -7
- package/dist/collection/api/theme-presets/static.js.map +1 -1
- package/dist/components/index.js +7 -7
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.js +1 -1
- package/dist/cura/p-aa9ad33b.system.js +2 -0
- package/dist/cura/p-aa9ad33b.system.js.map +1 -0
- package/dist/cura/{p-cdad5c49.system.js → p-b1ae12e5.system.js} +2 -2
- package/dist/cura/p-deafb1b5.js +2 -0
- package/dist/cura/p-deafb1b5.js.map +1 -0
- package/dist/esm/{app-globals-32bc3415.js → app-globals-66a65edd.js} +8 -8
- package/dist/esm/{app-globals-32bc3415.js.map → app-globals-66a65edd.js.map} +1 -1
- package/dist/esm/cura.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/app-globals-66a65edd.js +2 -0
- package/dist/esm-es5/app-globals-66a65edd.js.map +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/package.json +2 -2
- package/dist/cura/p-211e297c.system.js +0 -2
- package/dist/cura/p-211e297c.system.js.map +0 -1
- package/dist/cura/p-28e1a705.js +0 -2
- package/dist/cura/p-28e1a705.js.map +0 -1
- package/dist/esm-es5/app-globals-32bc3415.js +0 -2
- package/dist/esm-es5/app-globals-32bc3415.js.map +0 -1
- /package/dist/cura/{p-cdad5c49.system.js.map → p-b1ae12e5.system.js.map} +0 -0
|
@@ -201,22 +201,22 @@ const Static = {
|
|
|
201
201
|
breakpoints: {
|
|
202
202
|
xsmall: {
|
|
203
203
|
min: 0,
|
|
204
|
-
max:
|
|
204
|
+
max: 480
|
|
205
205
|
},
|
|
206
206
|
small: {
|
|
207
|
-
min:
|
|
208
|
-
max:
|
|
207
|
+
min: 481,
|
|
208
|
+
max: 768
|
|
209
209
|
},
|
|
210
210
|
medium: {
|
|
211
|
-
min:
|
|
212
|
-
max:
|
|
211
|
+
min: 769,
|
|
212
|
+
max: 992
|
|
213
213
|
},
|
|
214
214
|
large: {
|
|
215
|
-
min:
|
|
215
|
+
min: 993,
|
|
216
216
|
max: 1919
|
|
217
217
|
},
|
|
218
218
|
xlarge: {
|
|
219
|
-
min:
|
|
219
|
+
min: 1920,
|
|
220
220
|
max: 4096
|
|
221
221
|
}
|
|
222
222
|
}
|
|
@@ -476,4 +476,4 @@ const globalScripts = appGlobalScript;
|
|
|
476
476
|
|
|
477
477
|
exports.globalScripts = globalScripts;
|
|
478
478
|
|
|
479
|
-
//# sourceMappingURL=app-globals-
|
|
479
|
+
//# sourceMappingURL=app-globals-858f45bf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"app-globals-d0edfce9.js","mappings":";;AAAA;;;AAGO,MAAM,YAAY,GAAG;;EAE1B,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,SAAS,EAAE;MACT,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,MAAM,EAAE;MACN,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;GACF;;EAED,OAAO,EAAE;IACP,IAAI,EAAE,CAAC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api/theme-presets/theme-default.ts","./src/api/theme-presets/theme-maternity.ts","./src/api/theme-presets/theme-oncology.ts","./src/api/theme-presets/theme-presets.ts","./src/api/theme-presets/static.ts","./src/api/modules/cura-theme-colors-module.ts","./src/api/modules/cura-theme-spacing-module.ts","./src/api/modules/cura-theme-fonts-module.ts","./src/api/modules/cura-theme-breakpoints-module.ts","./src/api/modules/cura-theme-module.ts","./src/api/cura-api.ts","./src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '#71C5E8',\n '300': '#449CD5',\n '500': '#005EB8',\n '700': '#004890',\n '900': '#002855'\n },\n secondary: {\n '100': '#F5ECE3',\n '300': '#DDC0A2',\n '500': '#CCA074',\n '700': '#886B4D',\n '900': '#292017'\n },\n accent: {\n '100': '#FFC27B',\n '300': '#FFA84A',\n '500': '#FF8200',\n '700': '#D7720A',\n '900': '#9B5A1A'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n \n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#F8E3E2',\n '300': '#FFB3AB',\n '500': '#DA716F',\n '700': '#914B4A',\n '900': '#492625'\n },\n secondary: {\n '100': '#FDFBF9',\n '300': '#F7F4EE',\n '500': '#F5ECE3',\n '700': '#CCC5BD',\n '900': '#A39D97'\n },\n accent: {\n '100': '#ECEFF9',\n '300': '#8599CB',\n '500': '#0B1497',\n '700': '#070D65',\n '900': '#040732'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 325,\n light: 325,\n regular: 325, \n medium: 350,\n bold: 400,\n black: 425\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#AABEE1',\n '300': '#557EC4',\n '500': '#003DA6',\n '700': '#00296F',\n '900': '#000C21'\n },\n secondary: {\n '100': '#CDD7E3',\n '300': '#9BAFC7',\n '500': '#6886AB',\n '700': '#365E8F',\n '900': '#043673',\n },\n accent: {\n '100': '#99CFFF',\n '300': '#47A9FF',\n '500': '#0083F5',\n '700': '#006DCC',\n '900': '#0058A4',\n },\n aux: {\n '100': '#DAF2EF',\n '300': '#84D4CA',\n '500': '#47BFB0',\n '700': '#2F7F75',\n '900': '#0E2623',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '#DFF6E9',\n '300': '#94E1B5',\n '500': '#5FD290',\n '700': '#3F8C60',\n '900': '#132A1D',\n },\n info: {\n '100': '#CFE2FF',\n '300': '#95BFFF',\n '500': '#6EA8FF',\n '700': '#517BBB',\n '900': '#253855',\n },\n error: {\n '100': '#FBDDDD',\n '300': '#F28F8F',\n '500': '#EB5757',\n '700': '#9D3A3A',\n '900': '#2F1111',\n },\n warning: {\n '100': '#FCFAC4',\n '300': '#F8F489',\n '500': '#F5EF4E',\n '700': '#A39F34',\n '900': '#313010',\n },\n neutral: {\n '0': '#FFFFFF',\n '100': '#F6F6F6',\n '200': '#E9E9E9',\n '300': '#E2E2E2',\n '400': '#D4D4D4',\n '500': '#B7B7B7',\n '600': '#929292',\n '700': '#6E6E6E',\n '800': '#4A4A4A',\n '900': '#262626',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 360\n },\n small: {\n min: 361,\n max: 480\n },\n medium: {\n min: 481,\n max: 1365\n },\n large: {\n min: 1366,\n max: 1919\n },\n xlarge: {\n min: 1930,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n \n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns css color property. Color definition or related css var from the theme.\n */\n getColor(colorWithDepth: string = \"primary-base\"): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Static color definition.\n */\n getStatic(color: string, depth: string) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n return color === 'neutral'\n ? Static.color[color]?.[this.NeutralDepthAlias[depth]] || Static.color[color]?.[depth]\n : Static.color[color]?.[this.ColorDepthAlias[depth]] || Static.color[color]?.[depth];\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Related CSS variable defined by the theme.\n */\n getDynamic(color: string, depth: string) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.body).getPropertyValue(themeVar)\n ? `var(${themeVar})`\n : `var(--cura-color-primary-500)`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark or primary-700.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n body: HTMLBodyElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.body = window.document.documentElement.querySelector('body');\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.body.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string) { return themeModule.colors.getColor(colorWithDepth) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
|
1
|
+
{"file":"app-globals-858f45bf.js","mappings":";;AAAA;;;AAGO,MAAM,YAAY,GAAG;;EAE1B,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,SAAS,EAAE;MACT,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,MAAM,EAAE;MACN,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;GACF;;EAED,OAAO,EAAE;IACP,IAAI,EAAE,CAAC;GACR;;EAED,IAAI,EAAE;IACJ,IAAI,EAAE,MAAM;IACZ,K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ets/theme-oncology.ts","./src/api/theme-presets/theme-presets.ts","./src/api/theme-presets/static.ts","./src/api/modules/cura-theme-colors-module.ts","./src/api/modules/cura-theme-spacing-module.ts","./src/api/modules/cura-theme-fonts-module.ts","./src/api/modules/cura-theme-breakpoints-module.ts","./src/api/modules/cura-theme-module.ts","./src/api/cura-api.ts","./src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '#71C5E8',\n '300': '#449CD5',\n '500': '#005EB8',\n '700': '#004890',\n '900': '#002855'\n },\n secondary: {\n '100': '#F5ECE3',\n '300': '#DDC0A2',\n '500': '#CCA074',\n '700': '#886B4D',\n '900': '#292017'\n },\n accent: {\n '100': '#FFC27B',\n '300': '#FFA84A',\n '500': '#FF8200',\n '700': '#D7720A',\n '900': '#9B5A1A'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n \n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#F8E3E2',\n '300': '#FFB3AB',\n '500': '#DA716F',\n '700': '#914B4A',\n '900': '#492625'\n },\n secondary: {\n '100': '#FDFBF9',\n '300': '#F7F4EE',\n '500': '#F5ECE3',\n '700': '#CCC5BD',\n '900': '#A39D97'\n },\n accent: {\n '100': '#ECEFF9',\n '300': '#8599CB',\n '500': '#0B1497',\n '700': '#070D65',\n '900': '#040732'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 325,\n light: 325,\n regular: 325, \n medium: 350,\n bold: 400,\n black: 425\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#AABEE1',\n '300': '#557EC4',\n '500': '#003DA6',\n '700': '#00296F',\n '900': '#000C21'\n },\n secondary: {\n '100': '#CDD7E3',\n '300': '#9BAFC7',\n '500': '#6886AB',\n '700': '#365E8F',\n '900': '#043673',\n },\n accent: {\n '100': '#99CFFF',\n '300': '#47A9FF',\n '500': '#0083F5',\n '700': '#006DCC',\n '900': '#0058A4',\n },\n aux: {\n '100': '#DAF2EF',\n '300': '#84D4CA',\n '500': '#47BFB0',\n '700': '#2F7F75',\n '900': '#0E2623',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '#DFF6E9',\n '300': '#94E1B5',\n '500': '#5FD290',\n '700': '#3F8C60',\n '900': '#132A1D',\n },\n info: {\n '100': '#CFE2FF',\n '300': '#95BFFF',\n '500': '#6EA8FF',\n '700': '#517BBB',\n '900': '#253855',\n },\n error: {\n '100': '#FBDDDD',\n '300': '#F28F8F',\n '500': '#EB5757',\n '700': '#9D3A3A',\n '900': '#2F1111',\n },\n warning: {\n '100': '#FCFAC4',\n '300': '#F8F489',\n '500': '#F5EF4E',\n '700': '#A39F34',\n '900': '#313010',\n },\n neutral: {\n '0': '#FFFFFF',\n '100': '#F6F6F6',\n '200': '#E9E9E9',\n '300': '#E2E2E2',\n '400': '#D4D4D4',\n '500': '#B7B7B7',\n '600': '#929292',\n '700': '#6E6E6E',\n '800': '#4A4A4A',\n '900': '#262626',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1919\n },\n xlarge: {\n min: 1920,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n \n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns css color property. Color definition or related css var from the theme.\n */\n getColor(colorWithDepth: string = \"primary-base\"): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Static color definition.\n */\n getStatic(color: string, depth: string) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n return color === 'neutral'\n ? Static.color[color]?.[this.NeutralDepthAlias[depth]] || Static.color[color]?.[depth]\n : Static.color[color]?.[this.ColorDepthAlias[depth]] || Static.color[color]?.[depth];\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Related CSS variable defined by the theme.\n */\n getDynamic(color: string, depth: string) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.body).getPropertyValue(themeVar)\n ? `var(${themeVar})`\n : `var(--cura-color-primary-500)`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark or primary-700.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n body: HTMLBodyElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.body = window.document.documentElement.querySelector('body');\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.body.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string) { return themeModule.colors.getColor(colorWithDepth) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
package/dist/cjs/cura.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0e874533.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-858f45bf.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com
|
package/dist/cjs/loader.cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-0e874533.js');
|
|
6
|
-
const appGlobals = require('./app-globals-
|
|
6
|
+
const appGlobals = require('./app-globals-858f45bf.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
Stencil Client Patch Esm v3.3.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -48,22 +48,22 @@ export const Static = {
|
|
|
48
48
|
breakpoints: {
|
|
49
49
|
xsmall: {
|
|
50
50
|
min: 0,
|
|
51
|
-
max:
|
|
51
|
+
max: 480
|
|
52
52
|
},
|
|
53
53
|
small: {
|
|
54
|
-
min:
|
|
55
|
-
max:
|
|
54
|
+
min: 481,
|
|
55
|
+
max: 768
|
|
56
56
|
},
|
|
57
57
|
medium: {
|
|
58
|
-
min:
|
|
59
|
-
max:
|
|
58
|
+
min: 769,
|
|
59
|
+
max: 992
|
|
60
60
|
},
|
|
61
61
|
large: {
|
|
62
|
-
min:
|
|
62
|
+
min: 993,
|
|
63
63
|
max: 1919
|
|
64
64
|
},
|
|
65
65
|
xlarge: {
|
|
66
|
-
min:
|
|
66
|
+
min: 1920,
|
|
67
67
|
max: 4096
|
|
68
68
|
}
|
|
69
69
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../src/api/theme-presets/static.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;EACpB,YAAY;EACZ,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,IAAI,EAAE;MACJ,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,KAAK,EAAE;MACL,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,OAAO,EAAE;MACP,GAAG,EAAE,SAAS;MACd,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;GACF;EACD,WAAW,EAAE;IACX,MAAM,EAAE;MACN,GAAG,EAAE,CAAC;MACN,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,MAAM,EAAE;MACN,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"static.js","sourceRoot":"","sources":["../../../src/api/theme-presets/static.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;EACpB,YAAY;EACZ,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,IAAI,EAAE;MACJ,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,KAAK,EAAE;MACL,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,OAAO,EAAE;MACP,GAAG,EAAE,SAAS;MACd,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;GACF;EACD,WAAW,EAAE;IACX,MAAM,EAAE;MACN,GAAG,EAAE,CAAC;MACN,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,MAAM,EAAE;MACN,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,GAAG;KACT;IACD,KAAK,EAAE;MACL,GAAG,EAAE,GAAG;MACR,GAAG,EAAE,IAAI;KACV;IACD,MAAM,EAAE;MACN,GAAG,EAAE,IAAI;MACT,GAAG,EAAE,IAAI;KACV;GACF;CACF,CAAC","sourcesContent":["/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '#DFF6E9',\n '300': '#94E1B5',\n '500': '#5FD290',\n '700': '#3F8C60',\n '900': '#132A1D',\n },\n info: {\n '100': '#CFE2FF',\n '300': '#95BFFF',\n '500': '#6EA8FF',\n '700': '#517BBB',\n '900': '#253855',\n },\n error: {\n '100': '#FBDDDD',\n '300': '#F28F8F',\n '500': '#EB5757',\n '700': '#9D3A3A',\n '900': '#2F1111',\n },\n warning: {\n '100': '#FCFAC4',\n '300': '#F8F489',\n '500': '#F5EF4E',\n '700': '#A39F34',\n '900': '#313010',\n },\n neutral: {\n '0': '#FFFFFF',\n '100': '#F6F6F6',\n '200': '#E9E9E9',\n '300': '#E2E2E2',\n '400': '#D4D4D4',\n '500': '#B7B7B7',\n '600': '#929292',\n '700': '#6E6E6E',\n '800': '#4A4A4A',\n '900': '#262626',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1919\n },\n xlarge: {\n min: 1920,\n max: 4096\n }\n }\n};\n"]}
|
package/dist/components/index.js
CHANGED
|
@@ -211,22 +211,22 @@ const Static = {
|
|
|
211
211
|
breakpoints: {
|
|
212
212
|
xsmall: {
|
|
213
213
|
min: 0,
|
|
214
|
-
max:
|
|
214
|
+
max: 480
|
|
215
215
|
},
|
|
216
216
|
small: {
|
|
217
|
-
min:
|
|
218
|
-
max:
|
|
217
|
+
min: 481,
|
|
218
|
+
max: 768
|
|
219
219
|
},
|
|
220
220
|
medium: {
|
|
221
|
-
min:
|
|
222
|
-
max:
|
|
221
|
+
min: 769,
|
|
222
|
+
max: 992
|
|
223
223
|
},
|
|
224
224
|
large: {
|
|
225
|
-
min:
|
|
225
|
+
min: 993,
|
|
226
226
|
max: 1919
|
|
227
227
|
},
|
|
228
228
|
xlarge: {
|
|
229
|
-
min:
|
|
229
|
+
min: 1920,
|
|
230
230
|
max: 4096
|
|
231
231
|
}
|
|
232
232
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index.js","mappings":";;;;;;;;;;;;AAAA;;;AAGO,MAAM,YAAY,GAAG;;EAE1B,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,SAAS,EAAE;MACT,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,MAAM,EAAE;MACN,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;GACF;;EAED,OAAO,EAAE;IACP,IAAI,EAAE,CAAC;GACR;;EAED,IA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;;","names":[],"sources":["./src/api/theme-presets/theme-default.ts","./src/api/theme-presets/theme-maternity.ts","./src/api/theme-presets/theme-oncology.ts","./src/api/theme-presets/theme-presets.ts","./src/api/theme-presets/static.ts","./src/api/modules/cura-theme-colors-module.ts","./src/api/modules/cura-theme-spacing-module.ts","./src/api/modules/cura-theme-fonts-module.ts","./src/api/modules/cura-theme-breakpoints-module.ts","./src/api/modules/cura-theme-module.ts","./src/api/cura-api.ts","./src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '#71C5E8',\n '300': '#449CD5',\n '500': '#005EB8',\n '700': '#004890',\n '900': '#002855'\n },\n secondary: {\n '100': '#F5ECE3',\n '300': '#DDC0A2',\n '500': '#CCA074',\n '700': '#886B4D',\n '900': '#292017'\n },\n accent: {\n '100': '#FFC27B',\n '300': '#FFA84A',\n '500': '#FF8200',\n '700': '#D7720A',\n '900': '#9B5A1A'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n \n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#F8E3E2',\n '300': '#FFB3AB',\n '500': '#DA716F',\n '700': '#914B4A',\n '900': '#492625'\n },\n secondary: {\n '100': '#FDFBF9',\n '300': '#F7F4EE',\n '500': '#F5ECE3',\n '700': '#CCC5BD',\n '900': '#A39D97'\n },\n accent: {\n '100': '#ECEFF9',\n '300': '#8599CB',\n '500': '#0B1497',\n '700': '#070D65',\n '900': '#040732'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 325,\n light: 325,\n regular: 325, \n medium: 350,\n bold: 400,\n black: 425\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#AABEE1',\n '300': '#557EC4',\n '500': '#003DA6',\n '700': '#00296F',\n '900': '#000C21'\n },\n secondary: {\n '100': '#CDD7E3',\n '300': '#9BAFC7',\n '500': '#6886AB',\n '700': '#365E8F',\n '900': '#043673',\n },\n accent: {\n '100': '#99CFFF',\n '300': '#47A9FF',\n '500': '#0083F5',\n '700': '#006DCC',\n '900': '#0058A4',\n },\n aux: {\n '100': '#DAF2EF',\n '300': '#84D4CA',\n '500': '#47BFB0',\n '700': '#2F7F75',\n '900': '#0E2623',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '#DFF6E9',\n '300': '#94E1B5',\n '500': '#5FD290',\n '700': '#3F8C60',\n '900': '#132A1D',\n },\n info: {\n '100': '#CFE2FF',\n '300': '#95BFFF',\n '500': '#6EA8FF',\n '700': '#517BBB',\n '900': '#253855',\n },\n error: {\n '100': '#FBDDDD',\n '300': '#F28F8F',\n '500': '#EB5757',\n '700': '#9D3A3A',\n '900': '#2F1111',\n },\n warning: {\n '100': '#FCFAC4',\n '300': '#F8F489',\n '500': '#F5EF4E',\n '700': '#A39F34',\n '900': '#313010',\n },\n neutral: {\n '0': '#FFFFFF',\n '100': '#F6F6F6',\n '200': '#E9E9E9',\n '300': '#E2E2E2',\n '400': '#D4D4D4',\n '500': '#B7B7B7',\n '600': '#929292',\n '700': '#6E6E6E',\n '800': '#4A4A4A',\n '900': '#262626',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 360\n },\n small: {\n min: 361,\n max: 480\n },\n medium: {\n min: 481,\n max: 1365\n },\n large: {\n min: 1366,\n max: 1919\n },\n xlarge: {\n min: 1930,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n \n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns css color property. Color definition or related css var from the theme.\n */\n getColor(colorWithDepth: string = \"primary-base\"): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Static color definition.\n */\n getStatic(color: string, depth: string) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n return color === 'neutral'\n ? Static.color[color]?.[this.NeutralDepthAlias[depth]] || Static.color[color]?.[depth]\n : Static.color[color]?.[this.ColorDepthAlias[depth]] || Static.color[color]?.[depth];\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Related CSS variable defined by the theme.\n */\n getDynamic(color: string, depth: string) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.body).getPropertyValue(themeVar)\n ? `var(${themeVar})`\n : `var(--cura-color-primary-500)`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark or primary-700.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n body: HTMLBodyElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.body = window.document.documentElement.querySelector('body');\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.body.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string) { return themeModule.colors.getColor(colorWithDepth) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
|
1
|
+
{"file":"index.js","mappings":";;;;;;;;;;;;AAAA;;;AAGO,MAAM,YAAY,GAAG;;EAE1B,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,SAAS,EAAE;MACT,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;IACD,MAAM,EAAE;MACN,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;KACjB;GACF;;EAED,OAAO,EAAE;IACP,IAAI,EAAE,CAAC;GACR;;EAED,IAAI,EAAE;IACJ,IAAI,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me-presets/theme-default.ts","./src/api/theme-presets/theme-maternity.ts","./src/api/theme-presets/theme-oncology.ts","./src/api/theme-presets/theme-presets.ts","./src/api/theme-presets/static.ts","./src/api/modules/cura-theme-colors-module.ts","./src/api/modules/cura-theme-spacing-module.ts","./src/api/modules/cura-theme-fonts-module.ts","./src/api/modules/cura-theme-breakpoints-module.ts","./src/api/modules/cura-theme-module.ts","./src/api/cura-api.ts","./src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '#71C5E8',\n '300': '#449CD5',\n '500': '#005EB8',\n '700': '#004890',\n '900': '#002855'\n },\n secondary: {\n '100': '#F5ECE3',\n '300': '#DDC0A2',\n '500': '#CCA074',\n '700': '#886B4D',\n '900': '#292017'\n },\n accent: {\n '100': '#FFC27B',\n '300': '#FFA84A',\n '500': '#FF8200',\n '700': '#D7720A',\n '900': '#9B5A1A'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n \n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#F8E3E2',\n '300': '#FFB3AB',\n '500': '#DA716F',\n '700': '#914B4A',\n '900': '#492625'\n },\n secondary: {\n '100': '#FDFBF9',\n '300': '#F7F4EE',\n '500': '#F5ECE3',\n '700': '#CCC5BD',\n '900': '#A39D97'\n },\n accent: {\n '100': '#ECEFF9',\n '300': '#8599CB',\n '500': '#0B1497',\n '700': '#070D65',\n '900': '#040732'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 325,\n light: 325,\n regular: 325, \n medium: 350,\n bold: 400,\n black: 425\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#AABEE1',\n '300': '#557EC4',\n '500': '#003DA6',\n '700': '#00296F',\n '900': '#000C21'\n },\n secondary: {\n '100': '#CDD7E3',\n '300': '#9BAFC7',\n '500': '#6886AB',\n '700': '#365E8F',\n '900': '#043673',\n },\n accent: {\n '100': '#99CFFF',\n '300': '#47A9FF',\n '500': '#0083F5',\n '700': '#006DCC',\n '900': '#0058A4',\n },\n aux: {\n '100': '#DAF2EF',\n '300': '#84D4CA',\n '500': '#47BFB0',\n '700': '#2F7F75',\n '900': '#0E2623',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '#DFF6E9',\n '300': '#94E1B5',\n '500': '#5FD290',\n '700': '#3F8C60',\n '900': '#132A1D',\n },\n info: {\n '100': '#CFE2FF',\n '300': '#95BFFF',\n '500': '#6EA8FF',\n '700': '#517BBB',\n '900': '#253855',\n },\n error: {\n '100': '#FBDDDD',\n '300': '#F28F8F',\n '500': '#EB5757',\n '700': '#9D3A3A',\n '900': '#2F1111',\n },\n warning: {\n '100': '#FCFAC4',\n '300': '#F8F489',\n '500': '#F5EF4E',\n '700': '#A39F34',\n '900': '#313010',\n },\n neutral: {\n '0': '#FFFFFF',\n '100': '#F6F6F6',\n '200': '#E9E9E9',\n '300': '#E2E2E2',\n '400': '#D4D4D4',\n '500': '#B7B7B7',\n '600': '#929292',\n '700': '#6E6E6E',\n '800': '#4A4A4A',\n '900': '#262626',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1919\n },\n xlarge: {\n min: 1920,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n \n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns css color property. Color definition or related css var from the theme.\n */\n getColor(colorWithDepth: string = \"primary-base\"): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Static color definition.\n */\n getStatic(color: string, depth: string) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n return color === 'neutral'\n ? Static.color[color]?.[this.NeutralDepthAlias[depth]] || Static.color[color]?.[depth]\n : Static.color[color]?.[this.ColorDepthAlias[depth]] || Static.color[color]?.[depth];\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Related CSS variable defined by the theme.\n */\n getDynamic(color: string, depth: string) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.body).getPropertyValue(themeVar)\n ? `var(${themeVar})`\n : `var(--cura-color-primary-500)`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark or primary-700.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n body: HTMLBodyElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.body = window.document.documentElement.querySelector('body');\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.body.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string) { return themeModule.colors.getColor(colorWithDepth) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"version":3}
|
package/dist/cura/cura.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as o,w as i,a as n,b as t}from"./p-cbc91ac5.js";export{s as setNonce}from"./p-cbc91ac5.js";import{g as e}from"./p-
|
|
1
|
+
import{p as o,w as i,a as n,b as t}from"./p-cbc91ac5.js";export{s as setNonce}from"./p-cbc91ac5.js";import{g as e}from"./p-deafb1b5.js";const c=()=>{{o.o=i.__cssshim}const t=import.meta.url;const e={};if(t!==""){e.resourcesUrl=new URL(".",t).href}return n(e)};c().then((o=>{e();return t([["p-d172fb46",[[1,"cura-button",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-button-outline",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-button-transparent",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-icons-view",{selected:[32]}],[1,"cura-display",{level:[514],size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-heading",{level:[514],size:[513],weight:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-page-template",{contentwidth:[513]}],[1,"cura-paragraph",{size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-loader-circle",{size:[513],color:[513]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]]],o)}));
|
|
2
2
|
//# sourceMappingURL=cura.esm.js.map
|
package/dist/cura/cura.js
CHANGED
|
@@ -117,7 +117,7 @@ var __assign=this&&this.__assign||function(){return __assign=Object.assign||func
|
|
|
117
117
|
var resourcesUrl = scriptElm ? scriptElm.getAttribute('data-resources-url') || scriptElm.src : '';
|
|
118
118
|
var start = function() {
|
|
119
119
|
// if src is not present then origin is "null", and new URL() throws TypeError: Failed to construct 'URL': Invalid base URL
|
|
120
|
-
var url = new URL('./p-
|
|
120
|
+
var url = new URL('./p-b1ae12e5.system.js', new URL(resourcesUrl, window.location.origin !== 'null' ? window.location.origin : undefined));
|
|
121
121
|
System.import(url.href);
|
|
122
122
|
};
|
|
123
123
|
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
System.register([],(function(t){"use strict";return{execute:function(){var e={color:{primary:{100:"#71C5E8",300:"#449CD5",500:"#005EB8",700:"#004890",900:"#002855"},secondary:{100:"#F5ECE3",300:"#DDC0A2",500:"#CCA074",700:"#886B4D",900:"#292017"},accent:{100:"#FFC27B",300:"#FFA84A",500:"#FF8200",700:"#D7720A",900:"#9B5A1A"}},spacing:{base:4},font:{size:"14px",color:"#4A4A4A",body:"'Roboto', Arial, Helvetica, sans-serif",heading:"'Roboto', Arial, Helvetica, sans-serif",display:"'Roboto', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}};var r=Object.assign(Object.assign({},e),{color:{primary:{100:"#F8E3E2",300:"#FFB3AB",500:"#DA716F",700:"#914B4A",900:"#492625"},secondary:{100:"#FDFBF9",300:"#F7F4EE",500:"#F5ECE3",700:"#CCC5BD",900:"#A39D97"},accent:{100:"#ECEFF9",300:"#8599CB",500:"#0B1497",700:"#070D65",900:"#040732"}},font:{size:"14px",color:"#4A4A4A",body:"'Gotham', Arial, Helvetica, sans-serif",heading:"'Gotham', Arial, Helvetica, sans-serif",display:"'Gotham', Arial, Helvetica, sans-serif",weights:{thin:325,light:325,regular:325,medium:350,bold:400,black:425}}});var o=Object.assign(Object.assign({},e),{color:{primary:{100:"#AABEE1",300:"#557EC4",500:"#003DA6",700:"#00296F",900:"#000C21"},secondary:{100:"#CDD7E3",300:"#9BAFC7",500:"#6886AB",700:"#365E8F",900:"#043673"},accent:{100:"#99CFFF",300:"#47A9FF",500:"#0083F5",700:"#006DCC",900:"#0058A4"},aux:{100:"#DAF2EF",300:"#84D4CA",500:"#47BFB0",700:"#2F7F75",900:"#0E2623"}},font:{size:"14px",color:"#4A4A4A",body:"'Hanken Grotesk', Arial, Helvetica, sans-serif",heading:"'Hanken Grotesk', Arial, Helvetica, sans-serif",display:"'Hanken Grotesk', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}});var i={default:e,maternidade:r,oncologia:o};var n={color:{success:{100:"#DFF6E9",300:"#94E1B5",500:"#5FD290",700:"#3F8C60",900:"#132A1D"},info:{100:"#CFE2FF",300:"#95BFFF",500:"#6EA8FF",700:"#517BBB",900:"#253855"},error:{100:"#FBDDDD",300:"#F28F8F",500:"#EB5757",700:"#9D3A3A",900:"#2F1111"},warning:{100:"#FCFAC4",300:"#F8F489",500:"#F5EF4E",700:"#A39F34",900:"#313010"},neutral:{0:"#FFFFFF",100:"#F6F6F6",200:"#E9E9E9",300:"#E2E2E2",400:"#D4D4D4",500:"#B7B7B7",600:"#929292",700:"#6E6E6E",800:"#4A4A4A",900:"#262626"}},breakpoints:{xsmall:{min:0,max:480},small:{min:481,max:768},medium:{min:769,max:992},large:{min:993,max:1919},xlarge:{min:1920,max:4096}}};var a=function(){function t(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"};this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}t.prototype.getColor=function(t){if(t===void 0){t="primary-base"}var e=this.splitColorDepth(t),r=e.color,o=e.depth;var i=this.getStatic(r,o);if(i)return i;return this.getDynamic(r,o)};t.prototype.getStatic=function(t,e){var r,o,i,a;var s=n.color[t];if(!s)return null;return t==="neutral"?((r=n.color[t])===null||r===void 0?void 0:r[this.NeutralDepthAlias[e]])||((o=n.color[t])===null||o===void 0?void 0:o[e]):((i=n.color[t])===null||i===void 0?void 0:i[this.ColorDepthAlias[e]])||((a=n.color[t])===null||a===void 0?void 0:a[e])};t.prototype.getDynamic=function(t,e){var r=this.ColorDepthAlias[e]?"--cura-color-".concat(t,"-").concat(this.ColorDepthAlias[e]):"--cura-color-".concat(t,"-").concat(e);return getComputedStyle(document.body).getPropertyValue(r)?"var(".concat(r,")"):"var(--cura-color-primary-500)"};t.prototype.splitColorDepth=function(t){var e=t.toLowerCase().split(/-(.*)/),r=e[0],o=e[1];return{color:r!==null&&r!==void 0?r:"primary",depth:o!==null&&o!==void 0?o:"base"}};return t}();var s=function(){function t(){this.curaSpacing="--cura-spacing-base"}t.prototype.getSpacing=function(){if(getComputedStyle(document.body).getPropertyValue(this.curaSpacing)){return"var(".concat(this.curaSpacing,")")}return"4"};return t}();var c=function(){function t(){this.getSize=function(){return"var(--cura-font-size)"};this.getColor=function(){return"var(--cura-font-color)"}}t.prototype.getFamily=function(t){if(t===void 0){t="body"}var e="--cura-font-".concat(t.toLowerCase());return getComputedStyle(document.body).getPropertyValue(e)?"var(".concat(e,")"):"var(--cura-font-body)"};t.prototype.getWeights=function(){var t={};Object.keys(e.font.weights).forEach((function(e){return t[e]="var(--cura-font-weights-".concat(e,")")}));return t};return t}();var l=function(){function t(){}t.prototype.get=function(t,e){if(t===void 0){t=null}if(e===void 0){e=null}if(t){var r=e?n.breakpoints[t][e]:n.breakpoints[t];if(r)return r}return n.breakpoints};return t}();var u=function(){function t(){var t=this;this.prefix="--cura";this.colors=new a;this.spacing=new s;this.fonts=new c;this.breakpoints=new l;this.setCssVar=function(e,r){var o=t.groupPath(r,e[0]);t.body.style.setProperty(o,e[1])};this.groupPath=function(t,e){return"".concat(t,"-").concat(e)};this.isObject=function(t){return t&&typeof t==="object"&&!Array.isArray(t)};this.mergeObject=function(e,r){var o=Object.entries(e);for(var i=0,n=o;i<n.length;i++){var a=n[i];if(t.isObject(a[1])){t.mergeObject(a[1],r[a[0]])}else{r[a[0]]=a[1]}}};this.buildCssVars=function(e,r){var o=Object.entries(r);for(var i=0,n=o;i<n.length;i++){var a=n[i];if(t.isObject(a[1])){t.buildCssVars(t.groupPath(e,a[0]),a[1])}else{t.setCssVar(a,e)}}};this.body=window.document.documentElement.querySelector("body")}t.prototype.load=function(t){if(t===void 0){t="default"}var e=i[t]?i[t]:i.default;this.buildCssVars(this.prefix,e)};t.prototype.setCustom=function(t){var e=t.name;if(e in i){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e);this.load("default")}else{var r=t.fromPreset&&t.fromPreset in i?i[t.fromPreset]:i.default;var o=Object.assign({},JSON.parse(JSON.stringify(r)));this.mergeObject(t.definitions,o);i[e]=o;this.load(e)}};return t}();var f=function(){function t(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";var e=new u;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t){return e.colors.getColor(t)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}},spacing:{getSpacing:function(){return e.spacing.getSpacing()}},breakpoints:{get:function(t,r){return e.breakpoints.get(t,r)}}};if(t&&t.customTheme){this.theme.setCustom(t.customTheme)}else{var r=t&&t.theme?t.theme:"default";this.theme.load(r)}}return t}();function h(){var t=window.CuraInit;window.CuraAPI=t?new f(t):new f;var e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}}));if(t&&typeof t.onReady==="function")t.onReady(e)}var d=t("g",h)}}}));
|
|
2
|
+
//# sourceMappingURL=p-aa9ad33b.system.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ThemeDefault","color","primary","secondary","accent","spacing","base","font","size","body","heading","display","weights","thin","light","regular","medium","bold","black","ThemeMaternity","Object","assign","ThemeOncology","aux","ThemePresets","default","maternidade","oncologia","Static","success","info","error","warning","neutral","breakpoints","xsmall","min","max","small","large","xlarge","CuraThemeColorsModule","this","NeutralDepthAlias","purewhite","white","pale","lighter","dark","darker","ColorDepthAlias","prototype","getColor","colorWithDepth","_e","splitColorDepth","depth","staticColor","getStatic","getDynamic","colorObj","_a","_b","_c","_d","themeVar","concat","getComputedStyle","document","getPropertyValue","toLowerCase","split","CuraThemeSpacingModule","curaSpacing","getSpacing","CuraThemeFontsModule","getSize","getFamily","type","curaFontFamilyCSSVar","getWeights","keys","forEach","key","CuraThemeBreakpointsModule","get","position","breakpoint","CuraThemeModule","_this","prefix","colors","fonts","setCssVar","prop","path","varName","groupPath","style","setProperty","a","b","isObject","val","Array","isArray","mergeObject","from","to","entries","_i","entries_1","length","e","buildCssVars","obj","entries_2","window","documentElement","querySelector","load","theme","preset","setCustom","customTheme","customTag","name","console","log","fromPreset","newTheme","JSON","parse","stringify","definitions","CuraAPI","config","localAssetsPath","themeModule","themeTag","customThemeDefinitions","CuraInit","api","dispatchEvent","CustomEvent","detail","onReady","globalScripts","exports","appGlobalScript"],"sources":["src/api/theme-presets/theme-default.ts","src/api/theme-presets/theme-maternity.ts","src/api/theme-presets/theme-oncology.ts","src/api/theme-presets/theme-presets.ts","src/api/theme-presets/static.ts","src/api/modules/cura-theme-colors-module.ts","src/api/modules/cura-theme-spacing-module.ts","src/api/modules/cura-theme-fonts-module.ts","src/api/modules/cura-theme-breakpoints-module.ts","src/api/modules/cura-theme-module.ts","src/api/cura-api.ts","src/rededor-cura-start.ts","@stencil/core/internal/app-globals"],"sourcesContent":["/**\n * Cura Default Theme\n */\nexport const ThemeDefault = {\n /* Colors */\n color: {\n primary: {\n '100': '#71C5E8',\n '300': '#449CD5',\n '500': '#005EB8',\n '700': '#004890',\n '900': '#002855'\n },\n secondary: {\n '100': '#F5ECE3',\n '300': '#DDC0A2',\n '500': '#CCA074',\n '700': '#886B4D',\n '900': '#292017'\n },\n accent: {\n '100': '#FFC27B',\n '300': '#FFA84A',\n '500': '#FF8200',\n '700': '#D7720A',\n '900': '#9B5A1A'\n }\n },\n /* Spacing */\n spacing: {\n base: 4,\n },\n /* Fonts */\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Roboto', Arial, Helvetica, sans-serif\",\n heading: \"'Roboto', Arial, Helvetica, sans-serif\",\n display: \"'Roboto', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","/**\n * Maternity Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeMaternity = {\n /* Get default theme */\n ...ThemeDefault,\n \n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#F8E3E2',\n '300': '#FFB3AB',\n '500': '#DA716F',\n '700': '#914B4A',\n '900': '#492625'\n },\n secondary: {\n '100': '#FDFBF9',\n '300': '#F7F4EE',\n '500': '#F5ECE3',\n '700': '#CCC5BD',\n '900': '#A39D97'\n },\n accent: {\n '100': '#ECEFF9',\n '300': '#8599CB',\n '500': '#0B1497',\n '700': '#070D65',\n '900': '#040732'\n }\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Gotham', Arial, Helvetica, sans-serif\",\n heading: \"'Gotham', Arial, Helvetica, sans-serif\",\n display: \"'Gotham', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 325,\n light: 325,\n regular: 325, \n medium: 350,\n bold: 400,\n black: 425\n },\n }\n};\n","/**\n * Oncology Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeOncology = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '#AABEE1',\n '300': '#557EC4',\n '500': '#003DA6',\n '700': '#00296F',\n '900': '#000C21'\n },\n secondary: {\n '100': '#CDD7E3',\n '300': '#9BAFC7',\n '500': '#6886AB',\n '700': '#365E8F',\n '900': '#043673',\n },\n accent: {\n '100': '#99CFFF',\n '300': '#47A9FF',\n '500': '#0083F5',\n '700': '#006DCC',\n '900': '#0058A4',\n },\n aux: {\n '100': '#DAF2EF',\n '300': '#84D4CA',\n '500': '#47BFB0',\n '700': '#2F7F75',\n '900': '#0E2623',\n },\n },\n font: {\n size: '14px',\n color: '#4A4A4A',\n body: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n heading: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n display: \"'Hanken Grotesk', Arial, Helvetica, sans-serif\",\n weights: {\n thin: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\n },\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '#DFF6E9',\n '300': '#94E1B5',\n '500': '#5FD290',\n '700': '#3F8C60',\n '900': '#132A1D',\n },\n info: {\n '100': '#CFE2FF',\n '300': '#95BFFF',\n '500': '#6EA8FF',\n '700': '#517BBB',\n '900': '#253855',\n },\n error: {\n '100': '#FBDDDD',\n '300': '#F28F8F',\n '500': '#EB5757',\n '700': '#9D3A3A',\n '900': '#2F1111',\n },\n warning: {\n '100': '#FCFAC4',\n '300': '#F8F489',\n '500': '#F5EF4E',\n '700': '#A39F34',\n '900': '#313010',\n },\n neutral: {\n '0': '#FFFFFF',\n '100': '#F6F6F6',\n '200': '#E9E9E9',\n '300': '#E2E2E2',\n '400': '#D4D4D4',\n '500': '#B7B7B7',\n '600': '#929292',\n '700': '#6E6E6E',\n '800': '#4A4A4A',\n '900': '#262626',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1919\n },\n xlarge: {\n min: 1920,\n max: 4096\n }\n }\n};\n","import { Static } from \"../theme-presets/static\";\n\nexport default class CuraThemeColorsModule {\n \n NeutralDepthAlias = {\n 'purewhite': '0',\n 'white': '100',\n 'pale': '200',\n 'lighter': '300',\n 'light': '400',\n 'base': '500',\n 'medium': '600',\n 'dark': '700',\n 'darker': '800',\n 'black': '900',\n };\n\n ColorDepthAlias = {\n 'lighter': '100',\n 'light': '300',\n 'base': '500',\n 'dark': '700',\n 'darker': '900'\n }\n\n constructor() {}\n\n /**\n * Get theme color.\n * @param colorWithDepth string Ex.: primary-light\n * @returns css color property. Color definition or related css var from the theme.\n */\n getColor(colorWithDepth: string = \"primary-base\"): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth);\n }\n\n /**\n * Internal: Look for static color by name and depth.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Static color definition.\n */\n getStatic(color: string, depth: string) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n return color === 'neutral'\n ? Static.color[color]?.[this.NeutralDepthAlias[depth]] || Static.color[color]?.[depth]\n : Static.color[color]?.[this.ColorDepthAlias[depth]] || Static.color[color]?.[depth];\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Depth number or alias.\n * @returns Related CSS variable defined by the theme.\n */\n getDynamic(color: string, depth: string) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.body).getPropertyValue(themeVar)\n ? `var(${themeVar})`\n : `var(--cura-color-primary-500)`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark or primary-700.\n * @returns Object { color: string, depth: string }.\n */\n private splitColorDepth(colorWithDepth: string): { color: string, depth: string } {\n const [ color, depth ] = colorWithDepth.toLowerCase().split(/-(.*)/);\n return { color: color ?? \"primary\", depth: depth ?? \"base\" };\n }\n\n}\n","export default class CuraThemeSpacingModule {\n\n private curaSpacing = '--cura-spacing-base';\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n getSpacing(): string {\n if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {\n return `var(${this.curaSpacing})`;\n }\n return '4';\n }\n}\n","import { ThemeDefault } from \"../theme-presets/theme-default\";\n\nexport default class CuraThemeFontsModule {\n\n constructor() {}\n\n /**\n * Get the CSS variable related to the font family defined by the theme.\n * @param type 'body' | 'heading' | 'display'\n * @returns Related css variable as a string.\n */\n getFamily(type: string = \"body\"): string {\n const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;\n return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)\n ? `var(${curaFontFamilyCSSVar})`\n : 'var(--cura-font-body)';\n }\n\n /**\n * Get the CSS variables related to font weights defined by the theme.\n * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.\n */\n getWeights(): any {\n const weights = {};\n Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);\n return weights;\n }\n\n /**\n * Get the CSS variable related to the font size base defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getSize = () => `var(--cura-font-size)`;\n\n /**\n * Get CSS variable related to the font color defined by the theme.\n * @returns Related CSS variable as a string.\n */\n getColor = () => `var(--cura-font-color)`;\n\n}\n","import { Static } from '../theme-presets/static';\n\nexport default class CuraThemeBreakpointsModule {\n\n constructor() {}\n\n /** Returns the base spacing var defined in the theme */\n get(size: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' = null, position: 'min' | 'max' = null): any {\n if (size) {\n const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];\n if (breakpoint) return breakpoint;\n }\n return Static.breakpoints;\n }\n}\n","import { ThemePresets } from \"../theme-presets/theme-presets\";\nimport { CuraCustomTheme } from \"../cura-api.type\";\nimport CuraThemeColorsModule from \"./cura-theme-colors-module\";\nimport CuraThemeSpacingModule from \"./cura-theme-spacing-module\";\nimport CuraThemeFontsModule from \"./cura-theme-fonts-module\";\nimport CuraThemeBreakpointsModule from \"./cura-theme-breakpoints-module\";\n\nexport default class CuraThemeModule {\n\n body: HTMLBodyElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.body = window.document.documentElement.querySelector('body');\n }\n\n /**\n * Load a theme.\n * @param theme Theme tag.\n */\n load(theme = 'default') {\n const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;\n this.buildCssVars(this.prefix, preset);\n }\n\n /**\n * Define a custom theme\n * @param customTheme Custom theme object definition\n */\n setCustom(customTheme: CuraCustomTheme) {\n const customTag = customTheme.name;\n if (customTag in ThemePresets) {\n console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);\n this.load('default');\n } else {\n const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets\n ? ThemePresets[customTheme.fromPreset]\n : ThemePresets.default;\n const newTheme = {...JSON.parse(JSON.stringify(preset))};\n this.mergeObject(customTheme.definitions, newTheme);\n ThemePresets[customTag] = newTheme;\n this.load(customTag);\n }\n }\n\n /* Private */\n\n /** Set css var based on object structure */\n setCssVar = (prop, path) => {\n const varName = this.groupPath(path, prop[0]);\n this.body.style.setProperty(varName, prop[1]);\n }\n\n groupPath = (a, b) => `${a}-${b}`;\n\n isObject = (val) => {\n return val && typeof val === 'object' && !Array.isArray(val);\n }\n\n /** Deep merge objects */\n mergeObject = (from, to) => {\n const entries = Object.entries(from);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.mergeObject(e[1], to[e[0]]);\n } else {\n to[e[0]] = e[1];\n }\n }\n }\n\n /** Set css vars from preset object */\n buildCssVars = (path, obj) => {\n const entries = Object.entries(obj);\n for (let e of entries) {\n if (this.isObject(e[1])) {\n this.buildCssVars(this.groupPath(path, e[0]), e[1]);\n } else {\n this.setCssVar(e, path);\n }\n }\n }\n}\n","import { CuraConfig, APIThemeFunctions, CuraCustomTheme } from './cura-api.type';\nimport CuraThemeModule from './modules/cura-theme-module';\n\nexport default class CuraAPI {\n\n theme: APIThemeFunctions;\n localAssetsPath: string;\n\n constructor (config?: CuraConfig) {\n this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;\n const themeModule = new CuraThemeModule();\n this.theme = {\n load: function(themeTag: string) { themeModule.load(themeTag); },\n setCustom: function(customThemeDefinitions: CuraCustomTheme) { themeModule.setCustom(customThemeDefinitions); },\n colors: {\n getColor: function(colorWithDepth?: string) { return themeModule.colors.getColor(colorWithDepth) },\n },\n fonts: {\n getFamily: function(type?: string) { return themeModule.fonts.getFamily(type) },\n getWeights: function() { return themeModule.fonts.getWeights() },\n getSize: function() { return themeModule.fonts.getSize() },\n getColor: function() { return themeModule.fonts.getColor() }\n },\n spacing: {\n getSpacing: function() { return themeModule.spacing.getSpacing(); },\n },\n breakpoints: {\n get: function(size?: 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge', position?: 'min' | 'max') { return themeModule.breakpoints.get(size, position); }\n }\n };\n if (config && config.customTheme) {\n this.theme.setCustom(config.customTheme);\n } else {\n const theme = config && config.theme ? config.theme : 'default';\n this.theme.load(theme);\n }\n }\n\n}\n","import CuraAPI from './api/cura-api';\nimport { CuraConfig } from './api/cura-api.type';\n// import { setAssetPath } from '@stencil/core';\n\n// setAssetPath(import.meta.url);\ndeclare global {\n interface Window {\n CuraAPI?: CuraAPI,\n CuraInit?: CuraConfig\n }\n}\n\nexport default function() {\n const config = window.CuraInit;\n window.CuraAPI = config ? new CuraAPI(config) : new CuraAPI();\n const api = window.CuraAPI;\n window.dispatchEvent(new CustomEvent(\"CuraAPIReady\", { detail: {api} }));\n if (config && typeof config.onReady === 'function') config.onReady(api);\n}\n","import appGlobalScript from '/Users/fellipesoares/Code/cura/packages/component-lib/src/rededor-cura-start.ts';\nexport const globalScripts = appGlobalScript;\n"],"mappings":"uEAGO,IAAMA,EAAe,CAE1BC,MAAO,CACLC,QAAS,CACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,WAETC,UAAW,CACT,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,WAETC,OAAQ,CACN,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,UACP,IAAO,YAIXC,QAAS,CACPC,KAAM,GAGRC,KAAM,CACJC,KAAM,OACNP,MAAO,UACPQ,KAAM,yCACNC,QAAS,yCACTC,QAAS,yCACTC,QAAS,CACPC,KAAM,IACNC,MAAO,IACPC,QAAS,IACTC,OAAQ,IACRC,KAAM,IACNC,MAAO,OCxCN,IAAMC,EAAcC,OAAAC,OAAAD,OAAAC,OAAA,GAEtBrB,GAAY,CAIfC,MAAO,CACLC,QAAS,CACP,I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GAAiB,OAAO4D,EAAY9C,MAAMf,UAAUC,EAAK,EAC7EE,WAAY,WAAa,OAAO0D,EAAY9C,MAAMZ,YAAY,EAC9DJ,QAAS,WAAa,OAAO8D,EAAY9C,MAAMhB,SAAS,EACxDxB,SAAU,WAAa,OAAOsF,EAAY9C,MAAMxC,UAAU,GAE5D/C,QAAS,CACPqE,WAAY,WAAa,OAAOgE,EAAYrI,QAAQqE,YAAa,GAEnExC,YAAa,CACXmD,IAAK,SAAS7E,EAA2D8E,GAA4B,OAAOoD,EAAYxG,YAAYmD,IAAI7E,EAAM8E,EAAU,IAG5J,GAAIkD,GAAUA,EAAOZ,YAAa,CAChClF,KAAK+E,MAAME,UAAUa,EAAOZ,Y,KACvB,CACL,IAAMH,EAAQe,GAAUA,EAAOf,MAAQe,EAAOf,MAAQ,UACtD/E,KAAK+E,MAAMD,KAAKC,E,2BCrBpB,IAAMe,EAASnB,OAAOwB,SACtBxB,OAAOkB,QAAUC,EAAS,IAAID,EAAAC,GAAA,IAAAD,EAC9B,IAAMO,EAAMzB,OAAOkB,QACnBlB,OAAO0B,cAAc,IAAIC,YAAA,gBAAAC,OAAA,CAAAH,UACzB,GAAIN,UAAiBA,EAAOU,UAAY,WAAYV,EAAOU,QAAQJ,EACrE,CCjBY,IAACK,EAAaC,EAAA,IAAGC,E"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
System.register(["./p-a84ae34f.system.js","./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
System.register(["./p-a84ae34f.system.js","./p-aa9ad33b.system.js"],(function(o,n){"use strict";var i,e,t,s,c;return{setters:[function(n){i=n.p;e=n.w;t=n.a;s=n.b;o("setNonce",n.s)},function(o){c=o.g}],execute:function(){var o=function(){{i.$cssShim$=e.__cssshim}var o=n.meta.url;var s={};if(o!==""){s.resourcesUrl=new URL(".",o).href}return t(s)};o().then((function(o){c();return s([["p-6aa9dd1d.system",[[1,"cura-button",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-button-outline",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-button-transparent",{size:[513],disabled:[516],isLoading:[516,"is-loading"],iconName:[513,"icon-name"],iconset:[513],iconPosition:[513,"icon-position"],iconOnly:[516,"icon-only"],href:[513],target:[513],color:[1],fontColor:[513,"font-color"],textAlign:[513,"text-align"],styles:[32]}],[1,"cura-icons-view",{selected:[32]}],[1,"cura-display",{level:[514],size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-heading",{level:[514],size:[513],weight:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-page-template",{contentwidth:[513]}],[1,"cura-paragraph",{size:[513],inverted:[516],spotColor:[513,"spot-color"]}],[1,"cura-loader-circle",{size:[513],color:[513]}],[1,"cura-icon",{name:[513],color:[1],size:[8],iconset:[513],disabled:[4]}]]]],o)}))}}}));
|
|
2
|
+
//# sourceMappingURL=p-b1ae12e5.system.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const t={color:{primary:{100:"#71C5E8",300:"#449CD5",500:"#005EB8",700:"#004890",900:"#002855"},secondary:{100:"#F5ECE3",300:"#DDC0A2",500:"#CCA074",700:"#886B4D",900:"#292017"},accent:{100:"#FFC27B",300:"#FFA84A",500:"#FF8200",700:"#D7720A",900:"#9B5A1A"}},spacing:{base:4},font:{size:"14px",color:"#4A4A4A",body:"'Roboto', Arial, Helvetica, sans-serif",heading:"'Roboto', Arial, Helvetica, sans-serif",display:"'Roboto', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}};const e=Object.assign(Object.assign({},t),{color:{primary:{100:"#F8E3E2",300:"#FFB3AB",500:"#DA716F",700:"#914B4A",900:"#492625"},secondary:{100:"#FDFBF9",300:"#F7F4EE",500:"#F5ECE3",700:"#CCC5BD",900:"#A39D97"},accent:{100:"#ECEFF9",300:"#8599CB",500:"#0B1497",700:"#070D65",900:"#040732"}},font:{size:"14px",color:"#4A4A4A",body:"'Gotham', Arial, Helvetica, sans-serif",heading:"'Gotham', Arial, Helvetica, sans-serif",display:"'Gotham', Arial, Helvetica, sans-serif",weights:{thin:325,light:325,regular:325,medium:350,bold:400,black:425}}});const i=Object.assign(Object.assign({},t),{color:{primary:{100:"#AABEE1",300:"#557EC4",500:"#003DA6",700:"#00296F",900:"#000C21"},secondary:{100:"#CDD7E3",300:"#9BAFC7",500:"#6886AB",700:"#365E8F",900:"#043673"},accent:{100:"#99CFFF",300:"#47A9FF",500:"#0083F5",700:"#006DCC",900:"#0058A4"},aux:{100:"#DAF2EF",300:"#84D4CA",500:"#47BFB0",700:"#2F7F75",900:"#0E2623"}},font:{size:"14px",color:"#4A4A4A",body:"'Hanken Grotesk', Arial, Helvetica, sans-serif",heading:"'Hanken Grotesk', Arial, Helvetica, sans-serif",display:"'Hanken Grotesk', Arial, Helvetica, sans-serif",weights:{thin:100,light:300,regular:400,medium:500,bold:700,black:900}}});const s={default:t,maternidade:e,oncologia:i};const o={color:{success:{100:"#DFF6E9",300:"#94E1B5",500:"#5FD290",700:"#3F8C60",900:"#132A1D"},info:{100:"#CFE2FF",300:"#95BFFF",500:"#6EA8FF",700:"#517BBB",900:"#253855"},error:{100:"#FBDDDD",300:"#F28F8F",500:"#EB5757",700:"#9D3A3A",900:"#2F1111"},warning:{100:"#FCFAC4",300:"#F8F489",500:"#F5EF4E",700:"#A39F34",900:"#313010"},neutral:{0:"#FFFFFF",100:"#F6F6F6",200:"#E9E9E9",300:"#E2E2E2",400:"#D4D4D4",500:"#B7B7B7",600:"#929292",700:"#6E6E6E",800:"#4A4A4A",900:"#262626"}},breakpoints:{xsmall:{min:0,max:480},small:{min:481,max:768},medium:{min:769,max:992},large:{min:993,max:1919},xlarge:{min:1920,max:4096}}};class n{constructor(){this.NeutralDepthAlias={purewhite:"0",white:"100",pale:"200",lighter:"300",light:"400",base:"500",medium:"600",dark:"700",darker:"800",black:"900"};this.ColorDepthAlias={lighter:"100",light:"300",base:"500",dark:"700",darker:"900"}}getColor(t="primary-base"){const{color:e,depth:i}=this.splitColorDepth(t);const s=this.getStatic(e,i);if(s)return s;return this.getDynamic(e,i)}getStatic(t,e){var i,s,n,r;const a=o.color[t];if(!a)return null;return t==="neutral"?((i=o.color[t])===null||i===void 0?void 0:i[this.NeutralDepthAlias[e]])||((s=o.color[t])===null||s===void 0?void 0:s[e]):((n=o.color[t])===null||n===void 0?void 0:n[this.ColorDepthAlias[e]])||((r=o.color[t])===null||r===void 0?void 0:r[e])}getDynamic(t,e){const i=this.ColorDepthAlias[e]?`--cura-color-${t}-${this.ColorDepthAlias[e]}`:`--cura-color-${t}-${e}`;return getComputedStyle(document.body).getPropertyValue(i)?`var(${i})`:`var(--cura-color-primary-500)`}splitColorDepth(t){const[e,i]=t.toLowerCase().split(/-(.*)/);return{color:e!==null&&e!==void 0?e:"primary",depth:i!==null&&i!==void 0?i:"base"}}}class r{constructor(){this.curaSpacing="--cura-spacing-base"}getSpacing(){if(getComputedStyle(document.body).getPropertyValue(this.curaSpacing)){return`var(${this.curaSpacing})`}return"4"}}class a{constructor(){this.getSize=()=>`var(--cura-font-size)`;this.getColor=()=>`var(--cura-font-color)`}getFamily(t="body"){const e=`--cura-font-${t.toLowerCase()}`;return getComputedStyle(document.body).getPropertyValue(e)?`var(${e})`:"var(--cura-font-body)"}getWeights(){const e={};Object.keys(t.font.weights).forEach((t=>e[t]=`var(--cura-font-weights-${t})`));return e}}class c{constructor(){}get(t=null,e=null){if(t){const i=e?o.breakpoints[t][e]:o.breakpoints[t];if(i)return i}return o.breakpoints}}class l{constructor(){this.prefix="--cura";this.colors=new n;this.spacing=new r;this.fonts=new a;this.breakpoints=new c;this.setCssVar=(t,e)=>{const i=this.groupPath(e,t[0]);this.body.style.setProperty(i,t[1])};this.groupPath=(t,e)=>`${t}-${e}`;this.isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);this.mergeObject=(t,e)=>{const i=Object.entries(t);for(let t of i){if(this.isObject(t[1])){this.mergeObject(t[1],e[t[0]])}else{e[t[0]]=t[1]}}};this.buildCssVars=(t,e)=>{const i=Object.entries(e);for(let e of i){if(this.isObject(e[1])){this.buildCssVars(this.groupPath(t,e[0]),e[1])}else{this.setCssVar(e,t)}}};this.body=window.document.documentElement.querySelector("body")}load(t="default"){const e=s[t]?s[t]:s.default;this.buildCssVars(this.prefix,e)}setCustom(t){const e=t.name;if(e in s){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",e);this.load("default")}else{const i=t.fromPreset&&t.fromPreset in s?s[t.fromPreset]:s.default;const o=Object.assign({},JSON.parse(JSON.stringify(i)));this.mergeObject(t.definitions,o);s[e]=o;this.load(e)}}}class u{constructor(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:`/assets`;const e=new l;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t){return e.colors.getColor(t)}},fonts:{getFamily:function(t){return e.fonts.getFamily(t)},getWeights:function(){return e.fonts.getWeights()},getSize:function(){return e.fonts.getSize()},getColor:function(){return e.fonts.getColor()}},spacing:{getSpacing:function(){return e.spacing.getSpacing()}},breakpoints:{get:function(t,i){return e.breakpoints.get(t,i)}}};if(t&&t.customTheme){this.theme.setCustom(t.customTheme)}else{const e=t&&t.theme?t.theme:"default";this.theme.load(e)}}}function h(){const t=window.CuraInit;window.CuraAPI=t?new u(t):new u;const e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}}));if(t&&typeof t.onReady==="function")t.onReady(e)}const F=h;export{F as g};
|
|
2
|
+
//# sourceMappingURL=p-deafb1b5.js.map
|