@rededor/cura 0.4.0 → 0.4.2
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-f9607e85.js → app-globals-83854305.js} +40 -1
- package/dist/cjs/app-globals-83854305.js.map +1 -0
- package/dist/cjs/cura.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/api/cura-api.js +3 -0
- package/dist/collection/api/cura-api.js.map +1 -1
- package/dist/collection/api/cura-api.type.js.map +1 -1
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js +14 -0
- package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -0
- package/dist/collection/api/modules/cura-theme-module.js +2 -0
- package/dist/collection/api/modules/cura-theme-module.js.map +1 -1
- package/dist/collection/api/theme-presets/static.js +22 -0
- package/dist/collection/api/theme-presets/static.js.map +1 -1
- package/dist/components/index.js +39 -0
- 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-02bea7d3.system.js → p-57343c1d.system.js} +2 -2
- package/dist/cura/p-58abf7d0.system.js +2 -0
- package/dist/cura/p-58abf7d0.system.js.map +1 -0
- package/dist/cura/p-78229110.js +2 -0
- package/dist/cura/p-78229110.js.map +1 -0
- package/dist/esm/{app-globals-1370f3c7.js → app-globals-b66da41d.js} +40 -1
- package/dist/esm/app-globals-b66da41d.js.map +1 -0
- package/dist/esm/cura.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/app-globals-b66da41d.js +2 -0
- package/dist/esm-es5/app-globals-b66da41d.js.map +1 -0
- package/dist/esm-es5/cura.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/types/api/cura-api.type.d.ts +3 -0
- package/dist/types/api/modules/cura-theme-breakpoints-module.d.ts +5 -0
- package/dist/types/api/modules/cura-theme-module.d.ts +2 -0
- package/dist/types/api/theme-presets/static.d.ts +22 -0
- package/package.json +2 -2
- package/dist/cjs/app-globals-f9607e85.js.map +0 -1
- package/dist/cura/p-85310d41.system.js +0 -2
- package/dist/cura/p-85310d41.system.js.map +0 -1
- package/dist/cura/p-8fe6ac1e.js +0 -2
- package/dist/cura/p-8fe6ac1e.js.map +0 -1
- package/dist/esm/app-globals-1370f3c7.js.map +0 -1
- package/dist/esm-es5/app-globals-1370f3c7.js +0 -2
- package/dist/esm-es5/app-globals-1370f3c7.js.map +0 -1
- /package/dist/cura/{p-02bea7d3.system.js.map → p-57343c1d.system.js.map} +0 -0
|
@@ -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: 360\n },\n small: {\n min: 361,\n max: 480\n },\n medium: {\n min: 481,\n max: 768\n },\n large: {\n min: 769,\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"],"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,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,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xB,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"}
|
|
@@ -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:360},small:{min:361,max:480},medium:{min:481,max:768},large:{min:769,max:1919},xlarge:{min:1930,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-78229110.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","constructor","this","NeutralDepthAlias","purewhite","white","pale","lighter","dark","darker","ColorDepthAlias","getColor","colorWithDepth","depth","splitColorDepth","staticColor","getStatic","getDynamic","colorObj","_a","_b","_c","_d","themeVar","getComputedStyle","document","getPropertyValue","toLowerCase","split","CuraThemeSpacingModule","curaSpacing","getSpacing","CuraThemeFontsModule","getSize","getFamily","type","curaFontFamilyCSSVar","getWeights","keys","forEach","key","CuraThemeBreakpointsModule","get","position","breakpoint","CuraThemeModule","prefix","colors","fonts","setCssVar","prop","path","varName","groupPath","style","setProperty","a","b","isObject","val","Array","isArray","mergeObject","from","to","entries","e","buildCssVars","obj","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","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: 360\n },\n small: {\n min: 361,\n max: 480\n },\n medium: {\n min: 481,\n max: 768\n },\n large: {\n min: 769,\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 glob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,WAAY,WAAa,OAAO2D,EAAY9H,QAAQmE,YAAa,GAEnEtC,YAAa,CACXiD,IAAK,SAAS3E,EAA2D4E,GAA4B,OAAO+C,EAAYjG,YAAYiD,IAAI3E,EAAM4E,EAAU,IAG5J,GAAI6C,GAAUA,EAAOZ,YAAa,CAChC1E,KAAKuE,MAAME,UAAUa,EAAOZ,Y,KACvB,CACL,MAAMH,EAAQe,GAAUA,EAAOf,MAAQe,EAAOf,MAAQ,UACtDvE,KAAKuE,MAAMD,KAAKC,E,gBCrBpB,MAAMe,EAASnB,OAAOwB,SACtBxB,OAAOkB,QAAUC,EAAS,IAAID,EAAAC,GAAA,IAAAD,EAC9B,MAAMO,EAAMzB,OAAOkB,QACnBlB,OAAO0B,cAAc,IAAIC,YAAA,gBAAAC,OAAA,CAAAH,UACzB,GAAIN,UAAiBA,EAAOU,UAAY,WAAYV,EAAOU,QAAQJ,EACrE,CCjBY,MAACK,EAAgBC,S"}
|
|
@@ -196,6 +196,28 @@ const Static = {
|
|
|
196
196
|
'900': '#262626',
|
|
197
197
|
},
|
|
198
198
|
},
|
|
199
|
+
breakpoints: {
|
|
200
|
+
xsmall: {
|
|
201
|
+
min: 0,
|
|
202
|
+
max: 360
|
|
203
|
+
},
|
|
204
|
+
small: {
|
|
205
|
+
min: 361,
|
|
206
|
+
max: 480
|
|
207
|
+
},
|
|
208
|
+
medium: {
|
|
209
|
+
min: 481,
|
|
210
|
+
max: 768
|
|
211
|
+
},
|
|
212
|
+
large: {
|
|
213
|
+
min: 769,
|
|
214
|
+
max: 1919
|
|
215
|
+
},
|
|
216
|
+
xlarge: {
|
|
217
|
+
min: 1930,
|
|
218
|
+
max: 4096
|
|
219
|
+
}
|
|
220
|
+
}
|
|
199
221
|
};
|
|
200
222
|
|
|
201
223
|
class CuraThemeColorsModule {
|
|
@@ -320,12 +342,26 @@ class CuraThemeFontsModule {
|
|
|
320
342
|
}
|
|
321
343
|
}
|
|
322
344
|
|
|
345
|
+
class CuraThemeBreakpointsModule {
|
|
346
|
+
constructor() { }
|
|
347
|
+
/** Returns the base spacing var defined in the theme */
|
|
348
|
+
get(size = null, position = null) {
|
|
349
|
+
if (size) {
|
|
350
|
+
const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];
|
|
351
|
+
if (breakpoint)
|
|
352
|
+
return breakpoint;
|
|
353
|
+
}
|
|
354
|
+
return Static.breakpoints;
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
|
|
323
358
|
class CuraThemeModule {
|
|
324
359
|
constructor() {
|
|
325
360
|
this.prefix = '--cura';
|
|
326
361
|
this.colors = new CuraThemeColorsModule();
|
|
327
362
|
this.spacing = new CuraThemeSpacingModule();
|
|
328
363
|
this.fonts = new CuraThemeFontsModule();
|
|
364
|
+
this.breakpoints = new CuraThemeBreakpointsModule();
|
|
329
365
|
/* Private */
|
|
330
366
|
/** Set css var based on object structure */
|
|
331
367
|
this.setCssVar = (prop, path) => {
|
|
@@ -411,6 +447,9 @@ class CuraAPI {
|
|
|
411
447
|
spacing: {
|
|
412
448
|
getSpacing: function () { return themeModule.spacing.getSpacing(); },
|
|
413
449
|
},
|
|
450
|
+
breakpoints: {
|
|
451
|
+
get: function (size, position) { return themeModule.breakpoints.get(size, position); }
|
|
452
|
+
}
|
|
414
453
|
};
|
|
415
454
|
if (config && config.customTheme) {
|
|
416
455
|
this.theme.setCustom(config.customTheme);
|
|
@@ -435,4 +474,4 @@ const globalScripts = appGlobalScript;
|
|
|
435
474
|
|
|
436
475
|
export { globalScripts as g };
|
|
437
476
|
|
|
438
|
-
//# sourceMappingURL=app-globals-
|
|
477
|
+
//# sourceMappingURL=app-globals-b66da41d.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"app-globals-b66da41d.js","mappings":"AAAA;;;AAGO,MAAM,YAAY,GAAG;;EAE1B,KAAK,EAAE;IACL,OAAO,EAAE;MACP,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE,SAAS;MAChB,KAAK,EAAE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KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxB;GACF;;;;ECvBD,MAAM,MAAM,GAAG,MAAM,CAAC;EACtB,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI;EAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;EAC3B,MAAM,CAAC,aAAa,CAAC,IAAI;EACzB,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU;IAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1E;;ACjBY,MAAC,aAAa,GAAG;;;;","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: 768\n },\n large: {\n min: 769,\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}
|
package/dist/esm/cura.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as plt, w as win, a as promiseResolve, b as bootstrapLazy } from './index-92c824be.js';
|
|
2
2
|
export { s as setNonce } from './index-92c824be.js';
|
|
3
|
-
import { g as globalScripts } from './app-globals-
|
|
3
|
+
import { g as globalScripts } from './app-globals-b66da41d.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Browser v3.3.0 | MIT Licensed | https://stenciljs.com
|
package/dist/esm/loader.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as CSS, p as plt, w as win, a as promiseResolve, b as bootstrapLazy } from './index-92c824be.js';
|
|
2
2
|
export { s as setNonce } from './index-92c824be.js';
|
|
3
|
-
import { g as globalScripts } from './app-globals-
|
|
3
|
+
import { g as globalScripts } from './app-globals-b66da41d.js';
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
6
|
Stencil Client Patch Esm v3.3.0 | MIT Licensed | https://stenciljs.com
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var ThemeDefault={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 ThemeMaternity=Object.assign(Object.assign({},ThemeDefault),{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 ThemeOncology=Object.assign(Object.assign({},ThemeDefault),{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 ThemePresets={default:ThemeDefault,maternidade:ThemeMaternity,oncologia:ThemeOncology};var Static={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:360},small:{min:361,max:480},medium:{min:481,max:768},large:{min:769,max:1919},xlarge:{min:1930,max:4096}}};var CuraThemeColorsModule=function(){function e(){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"}}e.prototype.getColor=function(e){if(e===void 0){e="primary-base"}var t=this.splitColorDepth(e),r=t.color,o=t.depth;var a=this.getStatic(r,o);if(a)return a;return this.getDynamic(r,o)};e.prototype.getStatic=function(e,t){var r,o,a,i;var n=Static.color[e];if(!n)return null;return e==="neutral"?((r=Static.color[e])===null||r===void 0?void 0:r[this.NeutralDepthAlias[t]])||((o=Static.color[e])===null||o===void 0?void 0:o[t]):((a=Static.color[e])===null||a===void 0?void 0:a[this.ColorDepthAlias[t]])||((i=Static.color[e])===null||i===void 0?void 0:i[t])};e.prototype.getDynamic=function(e,t){var r=this.ColorDepthAlias[t]?"--cura-color-".concat(e,"-").concat(this.ColorDepthAlias[t]):"--cura-color-".concat(e,"-").concat(t);return getComputedStyle(document.body).getPropertyValue(r)?"var(".concat(r,")"):"var(--cura-color-primary-500)"};e.prototype.splitColorDepth=function(e){var t=e.toLowerCase().split(/-(.*)/),r=t[0],o=t[1];return{color:r!==null&&r!==void 0?r:"primary",depth:o!==null&&o!==void 0?o:"base"}};return e}();var CuraThemeSpacingModule=function(){function e(){this.curaSpacing="--cura-spacing-base"}e.prototype.getSpacing=function(){if(getComputedStyle(document.body).getPropertyValue(this.curaSpacing)){return"var(".concat(this.curaSpacing,")")}return"4"};return e}();var CuraThemeFontsModule=function(){function e(){this.getSize=function(){return"var(--cura-font-size)"};this.getColor=function(){return"var(--cura-font-color)"}}e.prototype.getFamily=function(e){if(e===void 0){e="body"}var t="--cura-font-".concat(e.toLowerCase());return getComputedStyle(document.body).getPropertyValue(t)?"var(".concat(t,")"):"var(--cura-font-body)"};e.prototype.getWeights=function(){var e={};Object.keys(ThemeDefault.font.weights).forEach((function(t){return e[t]="var(--cura-font-weights-".concat(t,")")}));return e};return e}();var CuraThemeBreakpointsModule=function(){function e(){}e.prototype.get=function(e,t){if(e===void 0){e=null}if(t===void 0){t=null}if(e){var r=t?Static.breakpoints[e][t]:Static.breakpoints[e];if(r)return r}return Static.breakpoints};return e}();var CuraThemeModule=function(){function e(){var e=this;this.prefix="--cura";this.colors=new CuraThemeColorsModule;this.spacing=new CuraThemeSpacingModule;this.fonts=new CuraThemeFontsModule;this.breakpoints=new CuraThemeBreakpointsModule;this.setCssVar=function(t,r){var o=e.groupPath(r,t[0]);e.body.style.setProperty(o,t[1])};this.groupPath=function(e,t){return"".concat(e,"-").concat(t)};this.isObject=function(e){return e&&typeof e==="object"&&!Array.isArray(e)};this.mergeObject=function(t,r){var o=Object.entries(t);for(var a=0,i=o;a<i.length;a++){var n=i[a];if(e.isObject(n[1])){e.mergeObject(n[1],r[n[0]])}else{r[n[0]]=n[1]}}};this.buildCssVars=function(t,r){var o=Object.entries(r);for(var a=0,i=o;a<i.length;a++){var n=i[a];if(e.isObject(n[1])){e.buildCssVars(e.groupPath(t,n[0]),n[1])}else{e.setCssVar(n,t)}}};this.body=window.document.documentElement.querySelector("body")}e.prototype.load=function(e){if(e===void 0){e="default"}var t=ThemePresets[e]?ThemePresets[e]:ThemePresets.default;this.buildCssVars(this.prefix,t)};e.prototype.setCustom=function(e){var t=e.name;if(t in ThemePresets){console.log("Error building custom theme. Theme %s already exists. Loading default theme.",t);this.load("default")}else{var r=e.fromPreset&&e.fromPreset in ThemePresets?ThemePresets[e.fromPreset]:ThemePresets.default;var o=Object.assign({},JSON.parse(JSON.stringify(r)));this.mergeObject(e.definitions,o);ThemePresets[t]=o;this.load(t)}};return e}();var CuraAPI=function(){function e(e){this.localAssetsPath=e&&e.localAssetsPath?e.localAssetsPath:"/assets";var t=new CuraThemeModule;this.theme={load:function(e){t.load(e)},setCustom:function(e){t.setCustom(e)},colors:{getColor:function(e){return t.colors.getColor(e)}},fonts:{getFamily:function(e){return t.fonts.getFamily(e)},getWeights:function(){return t.fonts.getWeights()},getSize:function(){return t.fonts.getSize()},getColor:function(){return t.fonts.getColor()}},spacing:{getSpacing:function(){return t.spacing.getSpacing()}},breakpoints:{get:function(e,r){return t.breakpoints.get(e,r)}}};if(e&&e.customTheme){this.theme.setCustom(e.customTheme)}else{var r=e&&e.theme?e.theme:"default";this.theme.load(r)}}return e}();function appGlobalScript(){var e=window.CuraInit;window.CuraAPI=e?new CuraAPI(e):new CuraAPI;var t=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:t}}));if(e&&typeof e.onReady==="function")e.onReady(t)}var globalScripts=appGlobalScript;export{globalScripts as g};
|
|
2
|
+
//# sourceMappingURL=app-globals-b66da41d.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","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: 360\n },\n small: {\n min: 361,\n max: 480\n },\n medium: {\n min: 481,\n max: 768\n },\n large: {\n min: 769,\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"],"mappings":"AAGO,IAAMA,aAAe,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,cAAY,CAIfC,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,YAGXG,KAAM,CACJC,KAAM,OACNP,MAAO,UACPQ,KAAM,yCACNC,QAAS,yCACTC,QAAS,yCACTC,QAAS,CACPC,KAAM,IACNC,MAAO,IACPC,QAAS,IACTC,OAAQ,IACRC,KAAM,IAC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AAYxG,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,yCCrBpB,IAAMe,EAASnB,OAAOwB,SACtBxB,OAAOkB,QAAUC,EAAS,IAAID,QAAAC,GAAA,IAAAD,QAC9B,IAAMO,EAAMzB,OAAOkB,QACnBlB,OAAO0B,cAAc,IAAIC,YAAA,gBAAAC,OAAA,CAAAH,UACzB,GAAIN,UAAiBA,EAAOU,UAAY,WAAYV,EAAOU,QAAQJ,EACrE,CCjBY,IAACK,cAAgBC,uB"}
|
package/dist/esm-es5/cura.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as plt,w as win,a as promiseResolve,b as bootstrapLazy}from"./index-92c824be.js";export{s as setNonce}from"./index-92c824be.js";import{g as globalScripts}from"./app-globals-
|
|
1
|
+
import{p as plt,w as win,a as promiseResolve,b as bootstrapLazy}from"./index-92c824be.js";export{s as setNonce}from"./index-92c824be.js";import{g as globalScripts}from"./app-globals-b66da41d.js";var patchBrowser=function(){{plt.$cssShim$=win.__cssshim}var o=import.meta.url;var i={};if(o!==""){i.resourcesUrl=new URL(".",o).href}return promiseResolve(i)};patchBrowser().then((function(o){globalScripts();return bootstrapLazy([["cura-button_10",[[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.js.map
|
package/dist/esm-es5/loader.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{C as CSS,p as plt,w as win,a as promiseResolve,b as bootstrapLazy}from"./index-92c824be.js";export{s as setNonce}from"./index-92c824be.js";import{g as globalScripts}from"./app-globals-
|
|
1
|
+
import{C as CSS,p as plt,w as win,a as promiseResolve,b as bootstrapLazy}from"./index-92c824be.js";export{s as setNonce}from"./index-92c824be.js";import{g as globalScripts}from"./app-globals-b66da41d.js";var patchEsm=function(){if(!(CSS&&CSS.supports&&CSS.supports("color","var(--c)"))){return import("./css-shim-d13f0738.js").then((function(){if(plt.$cssShim$=win.__cssshim){return plt.$cssShim$.i()}else{return 0}}))}return promiseResolve()};var defineCustomElements=function(o,i){if(typeof window==="undefined")return Promise.resolve();return patchEsm().then((function(){globalScripts();return bootstrapLazy([["cura-button_10",[[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]}]]]],i)}))};export{defineCustomElements};
|
|
2
2
|
//# sourceMappingURL=loader.js.map
|
|
@@ -2,12 +2,14 @@ import { CuraCustomTheme } from "../cura-api.type";
|
|
|
2
2
|
import CuraThemeColorsModule from "./cura-theme-colors-module";
|
|
3
3
|
import CuraThemeSpacingModule from "./cura-theme-spacing-module";
|
|
4
4
|
import CuraThemeFontsModule from "./cura-theme-fonts-module";
|
|
5
|
+
import CuraThemeBreakpointsModule from "./cura-theme-breakpoints-module";
|
|
5
6
|
export default class CuraThemeModule {
|
|
6
7
|
body: HTMLBodyElement;
|
|
7
8
|
prefix: string;
|
|
8
9
|
colors: CuraThemeColorsModule;
|
|
9
10
|
spacing: CuraThemeSpacingModule;
|
|
10
11
|
fonts: CuraThemeFontsModule;
|
|
12
|
+
breakpoints: CuraThemeBreakpointsModule;
|
|
11
13
|
constructor();
|
|
12
14
|
/**
|
|
13
15
|
* Load a theme.
|
|
@@ -44,4 +44,26 @@ export declare const Static: {
|
|
|
44
44
|
'900': string;
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
|
+
breakpoints: {
|
|
48
|
+
xsmall: {
|
|
49
|
+
min: number;
|
|
50
|
+
max: number;
|
|
51
|
+
};
|
|
52
|
+
small: {
|
|
53
|
+
min: number;
|
|
54
|
+
max: number;
|
|
55
|
+
};
|
|
56
|
+
medium: {
|
|
57
|
+
min: number;
|
|
58
|
+
max: number;
|
|
59
|
+
};
|
|
60
|
+
large: {
|
|
61
|
+
min: number;
|
|
62
|
+
max: number;
|
|
63
|
+
};
|
|
64
|
+
xlarge: {
|
|
65
|
+
min: number;
|
|
66
|
+
max: number;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
47
69
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rededor/cura",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Cura Design System",
|
|
5
5
|
"author": "Rede D`Or São Luiz",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"puppeteer": "^10.0.0",
|
|
39
39
|
"svgo": "^3.0.1"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "6d72eb829e96c9e5dec0e7fca3a170de58816810"
|
|
42
42
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"app-globals-f9607e85.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,KAA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,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;KAC1C;SAAM;MACL,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,GAAG,SAAS,CAAC;MAChE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxB;GACF;;;;ECpBD,MAAM,MAAM,GAAG,MAAM,CAAC;EACtB,MAAM,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI;EAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,OAAO,CAAC;EAC3B,MAAM,CAAC,aAAa,CAAC,IAAI;EACzB,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU;IAAE,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;AAC1E;;ACjBY,MAAC,aAAa,GAAG;;;;","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-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};\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 { 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\";\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\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 };\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,2 +0,0 @@
|
|
|
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"}}};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(){var t=this;this.prefix="--cura";this.colors=new a;this.spacing=new s;this.fonts=new c;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 u=function(){function t(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:"/assets";var 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()}}};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 f(){var t=window.CuraInit;window.CuraAPI=t?new u(t):new u;var e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}}));if(t&&typeof t.onReady==="function")t.onReady(e)}var h=t("g",f)}}}));
|
|
2
|
-
//# sourceMappingURL=p-85310d41.system.js.map
|