@rededor/cura 1.0.0 → 1.1.0

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.
Files changed (165) hide show
  1. package/dist/assets/assets/cura-assets.zip +0 -0
  2. package/dist/assets/assets/fonts/Gotham/Gotham-Black.woff2 +0 -0
  3. package/dist/assets/assets/fonts/Gotham/Gotham-BlackItalic.woff2 +0 -0
  4. package/dist/assets/assets/fonts/Gotham/Gotham-Bold.woff2 +0 -0
  5. package/dist/assets/assets/fonts/Gotham/Gotham-BoldItalic.woff2 +0 -0
  6. package/dist/assets/assets/fonts/Gotham/Gotham-Book.woff2 +0 -0
  7. package/dist/assets/assets/fonts/Gotham/Gotham-BookItalic.woff2 +0 -0
  8. package/dist/assets/assets/fonts/Gotham/Gotham-ExtraLight.woff2 +0 -0
  9. package/dist/assets/assets/fonts/Gotham/Gotham-ExtraLightItalic.woff2 +0 -0
  10. package/dist/assets/assets/fonts/Gotham/Gotham-Light.woff2 +0 -0
  11. package/dist/assets/assets/fonts/Gotham/Gotham-LightItalic.woff2 +0 -0
  12. package/dist/assets/assets/fonts/Gotham/Gotham-Medium.woff2 +0 -0
  13. package/dist/assets/assets/fonts/Gotham/Gotham-MediumItalic.woff2 +0 -0
  14. package/dist/assets/assets/fonts/Gotham/Gotham-Thin.woff2 +0 -0
  15. package/dist/assets/assets/fonts/Gotham/Gotham-ThinItalic.woff2 +0 -0
  16. package/dist/assets/assets/fonts/Gotham/Gotham-Ultra.woff2 +0 -0
  17. package/dist/assets/assets/fonts/Gotham/Gotham-UltraItalic.woff2 +0 -0
  18. package/dist/assets/assets/fonts/Gotham/style.css +90 -0
  19. package/dist/assets/assets/fonts/HankenGrotesk/HankenGrotesk-Italic-VariableFont_wght.woff2 +0 -0
  20. package/dist/assets/assets/fonts/HankenGrotesk/HankenGrotesk-VariableFont_wght.woff2 +0 -0
  21. package/dist/assets/assets/fonts/HankenGrotesk/style-webfont.css +72 -0
  22. package/dist/assets/assets/fonts/HankenGrotesk/style.css +16 -0
  23. package/dist/assets/assets/fonts/Roboto/Roboto-Black.woff2 +0 -0
  24. package/dist/assets/assets/fonts/Roboto/Roboto-BlackItalic.woff2 +0 -0
  25. package/dist/assets/assets/fonts/Roboto/Roboto-Bold.woff2 +0 -0
  26. package/dist/assets/assets/fonts/Roboto/Roboto-BoldItalic.woff2 +0 -0
  27. package/dist/assets/assets/fonts/Roboto/Roboto-Italic.woff2 +0 -0
  28. package/dist/assets/assets/fonts/Roboto/Roboto-Light.woff2 +0 -0
  29. package/dist/assets/assets/fonts/Roboto/Roboto-LightItalic.woff2 +0 -0
  30. package/dist/assets/assets/fonts/Roboto/Roboto-Medium.woff2 +0 -0
  31. package/dist/assets/assets/fonts/Roboto/Roboto-MediumItalic.woff2 +0 -0
  32. package/dist/assets/assets/fonts/Roboto/Roboto-Regular.woff2 +0 -0
  33. package/dist/assets/assets/fonts/Roboto/Roboto-Thin.woff2 +0 -0
  34. package/dist/assets/assets/fonts/Roboto/Roboto-ThinItalic.woff2 +0 -0
  35. package/dist/assets/assets/fonts/Roboto/style-webfont.css +756 -0
  36. package/dist/assets/assets/fonts/Roboto/style.css +90 -0
  37. package/dist/assets/assets/images/avatar/doctor-default.svg +6 -7
  38. package/dist/assets/assets/images/avatar/doctor-default_old.svg +8 -0
  39. package/dist/assets/assets/images/avatar/dora-default.svg +3 -4
  40. package/dist/assets/assets/images/avatar/dora-default_old.svg +5 -0
  41. package/dist/assets/assets/images/avatar/patient-default.svg +16 -10
  42. package/dist/assets/assets/images/avatar/patient-default_old.svg +12 -0
  43. package/dist/assets/assets/images/avatar/unit-default.svg +7 -8
  44. package/dist/assets/assets/images/avatar/unit-default_old.svg +9 -0
  45. package/dist/cjs/{app-globals-b77d5b06.js → app-globals-4d07f363.js} +20 -4
  46. package/dist/cjs/app-globals-4d07f363.js.map +1 -0
  47. package/dist/cjs/cura-accordion_12.cjs.entry.js +8 -7
  48. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  49. package/dist/cjs/cura-button-outline.cjs.entry.js +1 -1
  50. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  51. package/dist/cjs/cura-button-transparent.cjs.entry.js +1 -1
  52. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +1 -1
  53. package/dist/cjs/cura-calendar.cjs.entry.js +9 -4
  54. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  55. package/dist/cjs/cura-checkbox.cjs.entry.js +1 -1
  56. package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
  57. package/dist/cjs/cura-dropdown-search.cjs.entry.js +5 -4
  58. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  59. package/dist/cjs/cura.cjs.js +2 -2
  60. package/dist/cjs/loader.cjs.js +2 -2
  61. package/dist/collection/api/theme-presets/theme-default.js +3 -3
  62. package/dist/collection/api/theme-presets/theme-default.js.map +1 -1
  63. package/dist/collection/api/theme-presets/theme-legacy-default.js +16 -0
  64. package/dist/collection/api/theme-presets/theme-legacy-default.js.map +1 -1
  65. package/dist/collection/assets/images/avatar/doctor-default.svg +6 -7
  66. package/dist/collection/assets/images/avatar/doctor-default_old.svg +8 -0
  67. package/dist/collection/assets/images/avatar/dora-default.svg +3 -4
  68. package/dist/collection/assets/images/avatar/dora-default_old.svg +5 -0
  69. package/dist/collection/assets/images/avatar/patient-default.svg +16 -10
  70. package/dist/collection/assets/images/avatar/patient-default_old.svg +12 -0
  71. package/dist/collection/assets/images/avatar/unit-default.svg +7 -8
  72. package/dist/collection/assets/images/avatar/unit-default_old.svg +9 -0
  73. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  74. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  75. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  76. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  77. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  78. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  79. package/dist/collection/components/cura-calendar/cura-calendar.css +13 -5
  80. package/dist/collection/components/cura-calendar/cura-calendar.js +61 -6
  81. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
  82. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +33 -3
  83. package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -1
  84. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.css +13 -5
  85. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +23 -4
  86. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  87. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js +19 -6
  88. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js.map +1 -1
  89. package/dist/collection/components/forms/cura-select/cura-select.css +1 -0
  90. package/dist/collection/components/forms/cura-select/cura-select.js +23 -4
  91. package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
  92. package/dist/collection/components/forms/cura-select/cura-select.stories.js +11 -1
  93. package/dist/collection/components/forms/cura-select/cura-select.stories.js.map +1 -1
  94. package/dist/collection/components/text/cura-paragraph/cura-paragraph.css +3 -1
  95. package/dist/collection/stories/blocks/index.js +85 -0
  96. package/dist/components/cura-button-outline.js +1 -1
  97. package/dist/components/cura-button-outline.js.map +1 -1
  98. package/dist/components/cura-button-transparent2.js +1 -1
  99. package/dist/components/cura-button-transparent2.js.map +1 -1
  100. package/dist/components/cura-button.js +1 -1
  101. package/dist/components/cura-button.js.map +1 -1
  102. package/dist/components/cura-calendar.js +12 -4
  103. package/dist/components/cura-calendar.js.map +1 -1
  104. package/dist/components/cura-checkbox.js +1 -1
  105. package/dist/components/cura-checkbox.js.map +1 -1
  106. package/dist/components/cura-dropdown-search.js +6 -4
  107. package/dist/components/cura-dropdown-search.js.map +1 -1
  108. package/dist/components/cura-paragraph2.js +1 -1
  109. package/dist/components/cura-paragraph2.js.map +1 -1
  110. package/dist/components/cura-select2.js +7 -5
  111. package/dist/components/cura-select2.js.map +1 -1
  112. package/dist/components/index.js +19 -3
  113. package/dist/components/index.js.map +1 -1
  114. package/dist/cura/cura.esm.js +1 -1
  115. package/dist/cura/cura.esm.js.map +1 -1
  116. package/dist/cura/p-0b7a7306.js +2 -0
  117. package/dist/cura/p-0b7a7306.js.map +1 -0
  118. package/dist/cura/p-42dfa3a7.entry.js +2 -0
  119. package/dist/cura/p-42dfa3a7.entry.js.map +1 -0
  120. package/dist/cura/{p-599acc84.entry.js → p-5ac9d510.entry.js} +2 -2
  121. package/dist/cura/p-5ac9d510.entry.js.map +1 -0
  122. package/dist/cura/{p-b301a1ef.entry.js → p-9b658260.entry.js} +2 -2
  123. package/dist/cura/{p-b301a1ef.entry.js.map → p-9b658260.entry.js.map} +1 -1
  124. package/dist/cura/{p-4ef24fbd.entry.js → p-a9cda3b1.entry.js} +2 -2
  125. package/dist/cura/p-a9cda3b1.entry.js.map +1 -0
  126. package/dist/cura/{p-0a923806.entry.js → p-afd2c148.entry.js} +2 -2
  127. package/dist/cura/{p-0a923806.entry.js.map → p-afd2c148.entry.js.map} +1 -1
  128. package/dist/cura/p-fbf20e5a.entry.js +2 -0
  129. package/dist/cura/p-fbf20e5a.entry.js.map +1 -0
  130. package/dist/esm/{app-globals-488bf508.js → app-globals-6ca7103d.js} +20 -4
  131. package/dist/esm/app-globals-6ca7103d.js.map +1 -0
  132. package/dist/esm/cura-accordion_12.entry.js +8 -7
  133. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  134. package/dist/esm/cura-button-outline.entry.js +1 -1
  135. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  136. package/dist/esm/cura-button-transparent.entry.js +1 -1
  137. package/dist/esm/cura-button-transparent.entry.js.map +1 -1
  138. package/dist/esm/cura-calendar.entry.js +9 -4
  139. package/dist/esm/cura-calendar.entry.js.map +1 -1
  140. package/dist/esm/cura-checkbox.entry.js +1 -1
  141. package/dist/esm/cura-checkbox.entry.js.map +1 -1
  142. package/dist/esm/cura-dropdown-search.entry.js +5 -4
  143. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  144. package/dist/esm/cura.js +2 -2
  145. package/dist/esm/loader.js +2 -2
  146. package/dist/types/api/theme-presets/theme-legacy-default.d.ts +3 -3
  147. package/dist/types/api/theme-presets/theme-presets.d.ts +3 -3
  148. package/dist/types/components/cura-calendar/cura-calendar.d.ts +3 -0
  149. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +33 -0
  150. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +7 -3
  151. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.stories.d.ts +14 -0
  152. package/dist/types/components/forms/cura-select/cura-select.d.ts +5 -0
  153. package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +11 -0
  154. package/dist/types/components.d.ts +22 -0
  155. package/package.json +5 -3
  156. package/dist/cjs/app-globals-b77d5b06.js.map +0 -1
  157. package/dist/cura/p-0dd837cf.entry.js +0 -2
  158. package/dist/cura/p-0dd837cf.entry.js.map +0 -1
  159. package/dist/cura/p-4ef24fbd.entry.js.map +0 -1
  160. package/dist/cura/p-599acc84.entry.js.map +0 -1
  161. package/dist/cura/p-a6c3c0ea.js +0 -2
  162. package/dist/cura/p-a6c3c0ea.js.map +0 -1
  163. package/dist/cura/p-dc5d0c29.entry.js +0 -2
  164. package/dist/cura/p-dc5d0c29.entry.js.map +0 -1
  165. package/dist/esm/app-globals-488bf508.js.map +0 -1
@@ -1,2 +0,0 @@
1
- const t={color:{primary:{100:"113,197,232",300:"68,142,205",500:"0,61,165",700:"0,48,117",900:"0,40,85"},secondary:{100:"245,236,227",300:"221,192,162",500:"204,160,116",700:"136,107,77",900:"41,32,23"},accent:{100:"255,194,123",300:"255,168,74",500:"255,130,0",700:"215,114,10",900:"155,90,26"}},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:"248,227,226",300:"255,179,171",500:"218,113,111",700:"145,75,74",900:"73,38,37"},secondary:{100:"253,251,249",300:"247,244,238",500:"245,236,227",700:"204,197,189",900:"163,157,151"},accent:{100:"236,239,249",300:"133,153,203",500:"11,20,151",700:"7,13,101",900:"4,7,50"}},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:100,light:300,regular:400,medium:500,bold:700,black:900}}});const i=Object.assign(Object.assign({},t),{color:{primary:{100:"170,190,225",300:"85,126,196",500:"0,61,166",700:"0,41,111",900:"0,12,33"},secondary:{100:"205,215,227",300:"155,175,199",500:"104,134,171",700:"54,95,143",900:"4,54,115"},accent:{100:"153,207,255",300:"71,169,255",500:"0,131,245",700:"0,109,204",900:"0,88,164"},aux:{100:"218,242,239",300:"132,212,202",500:"71,191,176",700:"33,100,92",900:"14,38,35"}},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=Object.assign(Object.assign({},t),{color:{primary:{100:"204,217,231",300:"85,128,174",500:"0,65,134",700:"0,43,89",900:"0,13,27"},secondary:{100:"238,232,206",300:"198,180,92",500:"170,142,11",700:"113,95,7",900:"34,28,2"},accent:{100:"249,232,213",300:"228,160,79",500:"223,141,44",700:"149,94,29",900:"45,28,9"}}});const o={default:t,maternidade:e,oncologia:i,legacyDefault:s};const r={color:{success:{100:"223,246,233",300:"148,225,181",500:"95,210,144",700:"49,115,77",900:"19,42,29"},info:{100:"207,226,255",300:"149,191,255",500:"110,168,255",700:"66,100,153",900:"37,56,85"},error:{100:"251,221,221",300:"242,143,143",500:"235,87,87",700:"157,58,58",900:"47,17,17"},warning:{100:"252,250,196",300:"248,244,137",500:"245,239,78",700:"108,106,32",900:"49,48,16"},neutral:{0:"255,255,255",100:"246,246,246",200:"233,233,233",300:"226,226,226",400:"212,212,212",500:"183,183,183",600:"146,146,146",700:"110,110,110",800:"74,74,74",900:"38,38,38"}},breakpoints:{xsmall:{min:0,max:480},small:{min:481,max:768},medium:{min:769,max:992},large:{min:993,max:1920},xlarge:{min:1921,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",e=1){const{color:i,depth:s}=this.splitColorDepth(t);const o=this.getStatic(i,s,e);if(o)return o;return this.getDynamic(i,s,e)}getStatic(t,e,i=1){var s,o,n;const a=r.color[t];if(!a)return null;const c=t==="neutral"?this.NeutralDepthAlias[e]:this.ColorDepthAlias[e];return((s=r.color[t])===null||s===void 0?void 0:s[c])?`rgba(${(o=r.color[t])===null||o===void 0?void 0:o[c]}, ${i})`:`rgba(${(n=r.color[t])===null||n===void 0?void 0:n[e]}, ${i})`}getDynamic(t,e,i){const s=this.ColorDepthAlias[e]?`--cura-color-${t}-${this.ColorDepthAlias[e]}`:`--cura-color-${t}-${e}`;return getComputedStyle(document.documentElement).getPropertyValue(s)?`rgba(var(${s}), ${i})`:`rgba(var(--cura-color-primary-500), ${i})`}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 a{constructor(){this.curaSpacing="--cura-spacing-base"}getSpacing(){if(getComputedStyle(document.body).getPropertyValue(this.curaSpacing)){return`var(${this.curaSpacing})`}return"4"}}class c{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 l{constructor(){}get(t=null,e=null){if(t){const i=e?r.breakpoints[t][e]:r.breakpoints[t];if(i||i===0)return i}return r.breakpoints}}class u{constructor(){this.prefix="--cura";this.colors=new n;this.spacing=new a;this.fonts=new c;this.breakpoints=new l;this.setCssVar=(t,e)=>{const i=this.groupPath(e,t[0]);this.rootElement.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.rootElement=window.document.documentElement}load(t="default"){const e=o[t]?o[t]:o.default;this.buildCssVars(this.prefix,e)}setCustom(t){const e=t.name;if(e in o){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 o?o[t.fromPreset]:o.default;const s=Object.assign({},JSON.parse(JSON.stringify(i)));this.mergeObject(t.definitions,s);o[e]=s;this.load(e)}}}class h{constructor(t){this.localAssetsPath=t&&t.localAssetsPath?t.localAssetsPath:`/assets`;const e=new u;this.theme={load:function(t){e.load(t)},setCustom:function(t){e.setCustom(t)},colors:{getColor:function(t,i){return e.colors.getColor(t,i)}},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 d(){const t=window.CuraInit;window.CuraAPI=t?new h(t):new h;const e=window.CuraAPI;window.dispatchEvent(new CustomEvent("CuraAPIReady",{detail:{api:e}}));if(t&&typeof t.onReady==="function")t.onReady(e)}const g=d;export{g};
2
- //# sourceMappingURL=p-a6c3c0ea.js.map
@@ -1 +0,0 @@
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","ThemeLegacyDefault","ThemePresets","default","maternidade","oncologia","legacyDefault","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","opacity","depth","splitColorDepth","staticColor","getStatic","getDynamic","colorObj","alias","_a","_b","_c","themeVar","getComputedStyle","document","documentElement","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","rootElement","style","setProperty","a","b","isObject","val","Array","isArray","mergeObject","from","to","entries","e","buildCssVars","obj","window","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-legacy-default.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': '113,197,232',\n '300': '68,142,205',\n '500': '0,61,165',\n '700': '0,48,117',\n '900': '0,40,85'\n },\n secondary: {\n '100': '245,236,227',\n '300': '221,192,162',\n '500': '204,160,116',\n '700': '136,107,77',\n '900': '41,32,23'\n },\n accent: {\n '100': '255,194,123',\n '300': '255,168,74',\n '500': '255,130,0',\n '700': '215,114,10',\n '900': '155,90,26'\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': '248,227,226',\n '300': '255,179,171',\n '500': '218,113,111',\n '700': '145,75,74',\n '900': '73,38,37'\n },\n secondary: {\n '100': '253,251,249',\n '300': '247,244,238',\n '500': '245,236,227',\n '700': '204,197,189',\n '900': '163,157,151'\n },\n accent: {\n '100': '236,239,249',\n '300': '133,153,203',\n '500': '11,20,151',\n '700': '7,13,101',\n '900': '4,7,50'\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: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\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': '170,190,225',\n '300': '85,126,196',\n '500': '0,61,166',\n '700': '0,41,111',\n '900': '0,12,33'\n },\n secondary: {\n '100': '205,215,227',\n '300': '155,175,199',\n '500': '104,134,171',\n '700': '54,95,143',\n '900': '4,54,115',\n },\n accent: {\n '100': '153,207,255',\n '300': '71,169,255',\n '500': '0,131,245',\n '700': '0,109,204',\n '900': '0,88,164',\n },\n aux: {\n '100': '218,242,239',\n '300': '132,212,202',\n '500': '71,191,176',\n '700': '33,100,92',\n '900': '14,38,35',\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","/**\n * Legacy Default Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeLegacyDefault = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '204,217,231',\n '300': '85,128,174',\n '500': '0,65,134',\n '700': '0,43,89',\n '900': '0,13,27'\n },\n secondary: {\n '100': '238,232,206',\n '300': '198,180,92',\n '500': '170,142,11',\n '700': '113,95,7',\n '900': '34,28,2'\n },\n accent: {\n '100': '249,232,213',\n '300': '228,160,79',\n '500': '223,141,44',\n '700': '149,94,29',\n '900': '45,28,9'\n }\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'legacyDefault': ThemeLegacyDefault\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1920\n },\n xlarge: {\n min: 1921,\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 RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth, opacity);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\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 RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\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 || breakpoint === 0) 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 rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.rootElement = window.document.documentElement;\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.rootElement.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, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\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,MAAMA,EAAe,CAE1BC,MAAO,CACLC,QAAS,CACP,IAAO,cACP,IAAO,aACP,IAAO,WACP,IAAO,WACP,IAAO,WAETC,UAAW,CACT,IAAO,cACP,IAAO,cACP,IAAO,cACP,IAAO,aACP,IAAO,YAETC,OAAQ,CACN,IAAO,cACP,IAAO,aACP,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ACLd,UAAW,SAASC,GAAiB,OAAOsD,EAAYzC,MAAMd,UAAUC,EAAK,EAC7EE,WAAY,WAAa,OAAOoD,EAAYzC,MAAMX,YAAY,EAC9DJ,QAAS,WAAa,OAAOwD,EAAYzC,MAAMf,SAAS,EACxDxB,SAAU,WAAa,OAAOgF,EAAYzC,MAAMvC,UAAU,GAE5DjD,QAAS,CACPuE,WAAY,WAAa,OAAO0D,EAAYjI,QAAQuE,YAAa,GAEnExC,YAAa,CACXmD,IAAK,SAAS/E,EAA2DgF,GAA4B,OAAO8C,EAAYlG,YAAYmD,IAAI/E,EAAMgF,EAAU,IAG5J,GAAI4C,GAAUA,EAAOZ,YAAa,CAChC3E,KAAKwE,MAAME,UAAUa,EAAOZ,Y,KACvB,CACL,MAAMH,EAAQe,GAAUA,EAAOf,MAAQe,EAAOf,MAAQ,UACtDxE,KAAKwE,MAAMD,KAAKC,E,gBCrBpB,MAAMe,EAASjB,OAAOsB,SACtBtB,OAAOgB,QAAUC,EAAS,IAAID,EAAQC,GAAU,IAAID,EACpD,MAAMO,EAAMvB,OAAOgB,QACnBhB,OAAOwB,cAAc,IAAIC,YAAY,eAAgB,CAAEC,OAAQ,CAACH,UAChE,GAAIN,UAAiBA,EAAOU,UAAY,WAAYV,EAAOU,QAAQJ,EACrE,CCjBY,MAACK,EAAgBC,S","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as t,c as i,h as e,H as o,g as s}from"./p-312791fb.js";const r=":host{display:block;width:100%;box-sizing:border-box}.dropdown{display:flex;position:relative;flex-direction:column;width:inherit}.dropdown .dropdown-search-list{z-index:1000}.dropdown-input-search{width:100%;display:flex;justify-content:center;align-items:center;background:transparent}.dropdown-input-search.dropdown-open ::part(cura-input-field){border-radius:4px 4px 0px 0px}.dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:none}.dropdown-input-search.dropdown-open cura-input-text ::slotted([slot=helperText]){display:none}.dropdown-search-list{position:absolute;top:calc(100% - 8px);width:100%;max-height:var(--dropdown-max-height);padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:0px 4px 8px 0px var(--neutral-black-shadow, rgba(38, 38, 38, 0.16));border-radius:0px 0px 4px 4px;border-top:0 var(--neutral-light);border-right:2px solid var(--neutral-light);border-bottom:2px solid var(--neutral-light);border-left:2px solid var(--neutral-light);background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;display:none}.dropdown-search-list.visible{display:block}.dropdown-search-list-input-search{width:inherit;display:flex;justify-content:center;align-items:center;padding:16px 8px;border-bottom:2px solid var(--info-base);background-color:var(--neutral-purewhite)}.dropdown-search-list-input-search cura-input-text{width:inherit}.dropdown-search-list-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile{position:fixed;top:0;left:0;right:0;width:100%;z-index:10000}.dropdown-mobile .dropdown-input-search{display:flex;gap:4px;padding:12px 8px;background-color:var(--neutral-purewhite);border-bottom:2px solid var(--info-base);z-index:10000}.dropdown-mobile .dropdown-input-search cura-button-transparent{display:flex}.dropdown-mobile .dropdown-input-search.error{background-color:var(--error-lighter);border-bottom:2px solid var(--error-dark)}.dropdown-mobile .dropdown-input-search.dropdown-open{display:flex}.dropdown-mobile .dropdown-input-search.dropdown-open ::slotted([slot=helperText]){display:block}.dropdown-mobile .dropdown-search-list{position:static;width:100%;height:100%;max-height:none;padding:12px 12px;margin:0;box-sizing:border-box;box-shadow:none;border:none;background-color:var(--neutral-purewhite);list-style:none;overflow-y:auto;z-index:10000}";const n=r;const d=class{constructor(e){t(this,e);this.valueChanged=i(this,"valueChanged",7);this.onselect=i(this,"onselect",7);this.overlayElement=null;this.handleSlotChange=()=>{this.options=Array.from(this.host.querySelectorAll("cura-dropdown-search-option"));this.addClickListenersToOptions();this.updateHoveredIndex()};this.handleInputChange=t=>{const i=t.target;this.value=i.value;this.onValueChange(this.value)};this.handleKeyDown=t=>{if(t.key==="ArrowDown"){t.preventDefault();this.moveHighlight(1)}else if(t.key==="ArrowUp"){t.preventDefault();this.moveHighlight(-1)}else if(t.key==="Enter"){t.preventDefault();if(this.hoveredIndex>-1){this.handleOnBlur();this.onSelectedOption(this.hoveredIndex)}}};this.handleResize=()=>{this.isMobile=window.innerWidth<768;if(this.isDropdownOpen){if(this.isMobile){this.showOverlay()}else{this.removeOverlay()}}};this.status="default";this.disabled=false;this.name=undefined;this.required=false;this.selected=false;this.value="";this.placeholder="";this.label="";this.iconName="search";this.dropdownMaxHeight="630px";this.overlayVisible=false;this.isDropdownOpen=false;this.styles={};this.isMobile=window.innerWidth<768;this.mode="default";this.inputTextRef=undefined;this.isOnBlurInput=true;this.hoveredIndex=-1;this.options=[]}connectedCallback(){this.weights=window.CuraAPI.theme.fonts.getWeights();this.styles["--info-base"]=window.CuraAPI.theme.colors.getColor("info-base");this.styles["--neutral-purewhite"]=window.CuraAPI.theme.colors.getColor("neutral-purewhite");this.styles["--neutral-light"]=window.CuraAPI.theme.colors.getColor("neutral-light");this.styles["--neutral-dark"]=window.CuraAPI.theme.colors.getColor("neutral-dark");this.styles["--neutral-black-shadow"]=window.CuraAPI.theme.colors.getColor(`neutral-black`,.16);this.styles["--error-dark"]=window.CuraAPI.theme.colors.getColor("error-dark");this.styles["--error-lighter"]=window.CuraAPI.theme.colors.getColor("error-lighter");this.styles["--breakpoints"]=window.CuraAPI.theme.breakpoints.get();this.styles["--font-size"]=window.CuraAPI.theme.fonts.getSize();this.styles["--font-family"]=window.CuraAPI.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium}onValueChange(t){this.updateSelectedOption(t);this.valueChanged.emit(t)}componentWillLoad(){this.updateSelectedOption(this.value)}componentDidRender(){if(this.isDropdownOpen&&this.isMobile){this.showOverlay()}else{this.removeOverlay()}}componentDidLoad(){window.addEventListener("resize",this.handleResize)}disconnectedCallback(){window.removeEventListener("resize",this.handleResize)}showOverlay(){if(!this.overlayElement){this.overlayElement=document.createElement("div");this.overlayElement.className="dropdown-overlay";this.overlayElement.style.position="fixed";this.overlayElement.style.top="0";this.overlayElement.style.left="0";this.overlayElement.style.width="100%";this.overlayElement.style.height="100%";this.overlayElement.style.zIndex="9999";this.overlayElement.style.backgroundColor="white";document.body.appendChild(this.overlayElement)}}removeOverlay(){if(this.overlayElement&&this.overlayElement.parentNode===document.body){document.body.removeChild(this.overlayElement);this.overlayElement=null}}addClickListenersToOptions(){this.options.forEach(((t,i)=>{t.addEventListener("optionSelected",(()=>this.onSelectedOption(i)))}))}updateSelectedOption(t){const i=this.options.findIndex((i=>i.getAttribute("value")===t));this.hoveredIndex=i;this.updateOptionAttribute("hovered",this.hoveredIndex);this.updateOptionAttribute("selected",this.hoveredIndex);this.scrollIntoView()}onSelectedOption(t){const i=this.options[t];if(i.selectable){const t=i.getAttribute("value")||i.textContent;this.value=t||"";this.updateSelectedOption(this.value);this.isDropdownOpen=false;this.isOnBlurInput=true;this.removeOverlay()}}moveHighlight(t){const i=this.options;const e=(this.hoveredIndex+t+i.length)%i.length;this.hoveredIndex=e;this.updateOptionAttribute("hovered",this.hoveredIndex);this.scrollIntoView()}updateOptionAttribute(t,i){this.options.forEach(((e,o)=>{e[t]=o===i}))}updateHoveredIndex(){const t=this.options;const i=this.value;this.hoveredIndex=t.findIndex((t=>t.getAttribute("value")===i))}scrollIntoView(){var t;const i=(t=this.host.shadowRoot)===null||t===void 0?void 0:t.querySelector(".dropdown-search-list");const e=this.options[this.hoveredIndex];if(i&&e){const t=e.getBoundingClientRect();const o=i.getBoundingClientRect();if(t.bottom>o.bottom){i.scrollTop+=t.bottom-o.bottom}if(t.top<o.top){i.scrollTop-=o.top-t.top}}}handleOnBlur(){if(this.isOnBlurInput===true){setTimeout((()=>{this.isDropdownOpen=false;this.removeOverlay()}),200)}}getClasses(){return{"dropdown-input-search":true,"dropdown-open":this.isDropdownOpen,disabled:this.disabled,[this.status]:true}}getDropdownClasses(){return{"dropdown-search-list":true,visible:this.options.length&&this.isDropdownOpen?true:false}}hostCSSProperties(){return{"--dropdown-max-height":this.dropdownMaxHeight}}render(){const t=this.isMobile&&this.isDropdownOpen;return e(o,{key:"0332c943d5c4240283d9672d021e611a982fe52e",style:this.hostCSSProperties(),class:"dropdown-overlay"},e("div",{key:"2f65822008f3f7fae7c55033e3a6d75efa3e8466",class:`dropdown ${t?"dropdown-mobile":""}`,style:this.styles},e("div",{key:"28bfa930d8f66007716f586a35c78ebf9086974e",class:this.getClasses()},this.isMobile&&this.isDropdownOpen&&e("cura-button-transparent",{key:"1e1c18de7fca61e6420b175c602865fc5aec5e36",fontColor:"dark",onClick:()=>this.isMobile=false,iconName:"arrowLeft",size:"medium",iconOnly:true,color:"primary"}),e("cura-input-text",{key:"5fc1a11e5491ae15d0cc9f1d9aab32cd69a2d2ba",disabled:this.disabled,label:this.label,part:"cura-input-field",mode:t?"transparent":"default",required:this.required,hideErrorIcon:this.status==="error",iconName:this.iconName||"search",value:this.value,status:this.status,onValueChange:t=>this.onValueChange(t.target.value),onInput:t=>this.handleInputChange(t),onFocus:()=>this.isDropdownOpen=true,onClick:()=>window.innerWidth<768?this.isMobile=true:null,onBlur:()=>{this.handleOnBlur()},placeholder:this.placeholder,size:"large",onKeyDown:this.handleKeyDown},e("slot",{key:"f6ae0aea0d15fded19af9152e68a8de56995497f",name:"helperText"}))),e("div",{key:"1ec396eafe90f062aea392faca54473ba3cc475b",id:"dropdown-search-list",class:this.getDropdownClasses()},e("slot",{key:"afc41aa7166145912e163086f6df603dc3e39d51",name:"dropdown-search-option",onSlotchange:this.handleSlotChange}))))}get host(){return s(this)}static get watchers(){return{value:["onValueChange"]}}};d.style=n;export{d as cura_dropdown_search};
2
- //# sourceMappingURL=p-dc5d0c29.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["curaDropdownSearchCss","CuraDropdownSearchStyle0","CuraDropdownSearch","this","overlayElement","handleSlotChange","options","Array","from","host","querySelectorAll","addClickListenersToOptions","updateHoveredIndex","handleInputChange","event","input","target","value","onValueChange","handleKeyDown","key","preventDefault","moveHighlight","hoveredIndex","handleOnBlur","onSelectedOption","handleResize","isMobile","window","innerWidth","isDropdownOpen","showOverlay","removeOverlay","connectedCallback","weights","CuraAPI","theme","fonts","getWeights","styles","colors","getColor","breakpoints","get","getSize","getFamily","medium","newValue","updateSelectedOption","valueChanged","emit","componentWillLoad","componentDidRender","componentDidLoad","addEventListener","disconnectedCallback","removeEventListener","document","createElement","className","style","position","top","left","width","height","zIndex","backgroundColor","body","appendChild","parentNode","removeChild","forEach","option","index","selectedOptionIndex","findIndex","getAttribute","updateOptionAttribute","scrollIntoView","selectedOption","selectable","selectedValue","textContent","isOnBlurInput","direction","visibleOptions","newIndex","length","attribute","indexToUpdate","currentValue","container","_a","shadowRoot","querySelector","hoveredOption","optionRect","getBoundingClientRect","containerRect","bottom","scrollTop","setTimeout","getClasses","disabled","status","getDropdownClasses","visible","hostCSSProperties","dropdownMaxHeight","render","isMobileDropdown","h","Host","class","fontColor","onClick","iconName","size","iconOnly","color","label","part","mode","required","hideErrorIcon","e","onInput","onFocus","onBlur","placeholder","onKeyDown","name","id","onSlotchange"],"sources":["src/components/forms/cura-dropdown-search/cura-dropdown-search.scss?tag=cura-dropdown-search&encapsulation=shadow","src/components/forms/cura-dropdown-search/cura-dropdown-search.tsx"],"sourcesContent":["@import '../../../scss/mixins/shadows.scss';\n\n:host {\n display: block;\n width: 100%;\n box-sizing: border-box;\n}\n\n.dropdown {\n display: flex;\n position: relative;\n\n flex-direction: column;\n width: inherit;\n\n .dropdown-search-list {\n z-index: 1000;\n }\n\n &-input-search {\n width: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n background: transparent;\n\n\n &.dropdown-open {\n ::part(cura-input-field) {\n border-radius: 4px 4px 0px 0px;\n }\n ::slotted([slot='helperText']) {\n display: none;\n }\n\n cura-input-text {\n ::slotted([slot='helperText']) {\n display: none;\n }\n }\n }\n }\n\n &-search-list {\n position: absolute;\n top: calc(100% - 8px);\n width: 100%;\n max-height: var(--dropdown-max-height);\n padding: 12px 12px;\n margin: 0;\n box-sizing: border-box;\n @include shadow-level3(--neutral-black-shadow);\n border-radius: 0px 0px 4px 4px;\n border-top: 0 var(--neutral-light);\n border-right: 2px solid var(--neutral-light);\n border-bottom: 2px solid var(--neutral-light);\n border-left: 2px solid var(--neutral-light);\n background-color: var(--neutral-purewhite);\n list-style: none;\n overflow-y: auto;\n display: none;\n\n &.visible {\n display: block;\n }\n\n &-input-search {\n width: inherit;\n\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 16px 8px;\n border-bottom: 2px solid var(--info-base);\n background-color: var(--neutral-purewhite);\n\n cura-input-text {\n width: inherit;\n }\n\n &.error {\n background-color: var(--error-lighter);\n border-bottom: 2px solid var(--error-dark);\n }\n }\n }\n\n &-mobile {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n width: 100%;\n\n z-index: 10000;\n .dropdown-input-search {\n display: flex;\n gap: 4px;\n padding: 12px 8px;\n background-color: var(--neutral-purewhite);\n border-bottom: 2px solid var(--info-base);\n z-index: 10000;\n cura-button-transparent {\n display: flex;\n }\n &.error {\n background-color: var(--error-lighter);\n border-bottom: 2px solid var(--error-dark);\n }\n &.dropdown-open {\n display: flex;\n\n ::slotted([slot='helperText']) {\n display: block;\n }\n }\n }\n .dropdown-search-list {\n position: static;\n width: 100%;\n height: 100%;\n max-height: none;\n padding: 12px 12px;\n margin: 0;\n box-sizing: border-box;\n box-shadow: none;\n border: none;\n background-color: var(--neutral-purewhite);\n list-style: none;\n overflow-y: auto;\n z-index: 10000;\n }\n }\n}\n","import { Component, Host, Prop, State, Event, EventEmitter, Element, Watch, h } from '@stencil/core';\n\n@Component({\n tag: 'cura-dropdown-search',\n styleUrl: 'cura-dropdown-search.scss',\n shadow: true,\n})\nexport class CuraDropdownSearch {\n /**\n * Define the status of the dropdown search.\n */\n @Prop({ reflect: true }) status: 'error' | 'default' = 'default';\n\n /**\n * Whether the select component is disabled.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * The name of the dropdown search component.\n */\n @Prop({ reflect: true }) name: string;\n\n /**\n * Indicates if the dropdown search is required.\n */\n @Prop({ reflect: true, mutable: true }) required: boolean = false;\n\n /**\n * Indicates if the dropdown search is selected.\n */\n @Prop({ reflect: true, mutable: true }) selected: boolean = false;\n\n /**\n * The value of the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * The placeholder text for the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) placeholder: string = '';\n\n /**\n * The label for the dropdown search.\n */\n @Prop({ reflect: true, mutable: true }) label: string = '';\n\n /**\n * Custom icon name. Default: search.\n */\n @Prop({reflect: true}) iconName = 'search';\n\n /**\n * CSS max-height property for dropdown item.\n * Default to 630px\n */\n @Prop({reflect: true}) dropdownMaxHeight = '630px';\n\n /**\n * Reference to the host element.\n */\n @Element() host: HTMLElement;\n\n /**\n * Indicates if the overlay is visible.\n */\n @State() overlayVisible: boolean = false;\n\n /**\n * Event emitted when the value changes.\n */\n @Event() valueChanged: EventEmitter<string>;\n\n /**\n * Indicates if the dropdown is open.\n */\n @State() isDropdownOpen: boolean = false;\n\n /**\n * Styles for the component.\n\n */\n @State() styles = {};\n\n /**\n * Indicates if the component is being viewed on a mobile device.\n */\n @State() isMobile: boolean = window.innerWidth < 768;\n\n /**\n * The mode of the dropdown search.\n */\n @State() mode: 'default' | 'transparent' = 'default';\n\n @Event() onselect: EventEmitter;\n\n @State() inputTextRef!: HTMLCuraInputTextElement;\n\n /**\n * Indicates if the input is on blur.\n */\n @State() isOnBlurInput: boolean = true;\n\n /**\n * The index of the currently hovered option.\n */\n @State() hoveredIndex: number = -1;\n\n /**\n * The options for the dropdown search.\n * @type {HTMLCuraDropdownSearchOptionElement[]}\n */\n\n weights;\n\n private overlayElement: HTMLDivElement | null = null;\n\n @State() options: HTMLCuraDropdownSearchOptionElement[] = [];\n\n connectedCallback() {\n this.weights = window.CuraAPI.theme.fonts.getWeights();\n this.styles['--info-base'] = window.CuraAPI.theme.colors.getColor('info-base');\n this.styles['--neutral-purewhite'] = window.CuraAPI.theme.colors.getColor('neutral-purewhite');\n this.styles['--neutral-light'] = window.CuraAPI.theme.colors.getColor('neutral-light');\n this.styles['--neutral-dark'] = window.CuraAPI.theme.colors.getColor('neutral-dark');\n this.styles['--neutral-black-shadow'] = window.CuraAPI.theme.colors.getColor(`neutral-black`, 0.16);\n this.styles['--error-dark'] = window.CuraAPI.theme.colors.getColor('error-dark');\n this.styles['--error-lighter'] = window.CuraAPI.theme.colors.getColor('error-lighter');\n this.styles['--breakpoints'] = window.CuraAPI.theme.breakpoints.get();\n this.styles['--font-size'] = window.CuraAPI.theme.fonts.getSize();\n this.styles['--font-family'] = window.CuraAPI.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n }\n\n @Watch('value')\n onValueChange(newValue: string) {\n this.updateSelectedOption(newValue);\n this.valueChanged.emit(newValue);\n }\n\n componentWillLoad() {\n this.updateSelectedOption(this.value);\n }\n\n componentDidRender() {\n if (this.isDropdownOpen && this.isMobile) {\n this.showOverlay();\n } else {\n this.removeOverlay();\n }\n }\n componentDidLoad() {\n window.addEventListener('resize', this.handleResize);\n }\n\n disconnectedCallback() {\n window.removeEventListener('resize', this.handleResize);\n }\n\n private showOverlay() {\n if (!this.overlayElement) {\n this.overlayElement = document.createElement('div');\n this.overlayElement.className = 'dropdown-overlay';\n this.overlayElement.style.position = 'fixed';\n this.overlayElement.style.top = '0';\n this.overlayElement.style.left = '0';\n this.overlayElement.style.width = '100%';\n this.overlayElement.style.height = '100%';\n this.overlayElement.style.zIndex = '9999';\n this.overlayElement.style.backgroundColor = 'white';\n document.body.appendChild(this.overlayElement);\n }\n }\n\n private removeOverlay() {\n if (this.overlayElement && this.overlayElement.parentNode === document.body) {\n document.body.removeChild(this.overlayElement);\n this.overlayElement = null;\n }\n }\n\n private handleSlotChange = () => {\n this.options = Array.from(this.host.querySelectorAll('cura-dropdown-search-option'));\n this.addClickListenersToOptions();\n this.updateHoveredIndex();\n };\n\n private addClickListenersToOptions() {\n this.options.forEach((option, index) => {\n option.addEventListener('optionSelected', () => this.onSelectedOption(index));\n });\n }\n\n private updateSelectedOption(value: string) {\n const selectedOptionIndex = this.options.findIndex(option => option.getAttribute('value') === value);\n this.hoveredIndex = selectedOptionIndex;\n this.updateOptionAttribute('hovered', this.hoveredIndex);\n this.updateOptionAttribute('selected', this.hoveredIndex);\n\n this.scrollIntoView();\n }\n\n private handleInputChange = (event: Event) => {\n const input = event.target as HTMLInputElement;\n this.value = input.value;\n this.onValueChange(this.value);\n // this.valueChanged.emit(this.value);\n };\n\n private onSelectedOption(index: number) {\n const selectedOption = this.options[index];\n if(selectedOption.selectable) {\n const selectedValue = selectedOption.getAttribute('value') || selectedOption.textContent;\n\n this.value = selectedValue || '';\n this.updateSelectedOption(this.value);\n\n this.isDropdownOpen = false;\n this.isOnBlurInput = true;\n this.removeOverlay();\n }\n }\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.moveHighlight(1);\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n this.moveHighlight(-1);\n } else if (event.key === 'Enter') {\n event.preventDefault();\n if (this.hoveredIndex > -1) {\n this.handleOnBlur();\n this.onSelectedOption(this.hoveredIndex);\n }\n }\n };\n\n private moveHighlight(direction: number) {\n const visibleOptions = this.options;\n const newIndex = (this.hoveredIndex + direction + visibleOptions.length) % visibleOptions.length;\n this.hoveredIndex = newIndex;\n this.updateOptionAttribute('hovered', this.hoveredIndex);\n this.scrollIntoView();\n }\n\n private updateOptionAttribute(attribute: string, indexToUpdate: number) {\n this.options.forEach((option, index) => {\n (option as any)[attribute] = index === indexToUpdate;\n });\n }\n\n private updateHoveredIndex() {\n const visibleOptions = this.options;\n const currentValue = this.value;\n this.hoveredIndex = visibleOptions.findIndex(option => option.getAttribute('value') === currentValue);\n }\n\n private scrollIntoView() {\n const container = this.host.shadowRoot?.querySelector('.dropdown-search-list');\n const hoveredOption = this.options[this.hoveredIndex];\n\n if (container && hoveredOption) {\n const optionRect = hoveredOption.getBoundingClientRect();\n const containerRect = container.getBoundingClientRect();\n\n if (optionRect.bottom > containerRect.bottom) {\n container.scrollTop += optionRect.bottom - containerRect.bottom;\n }\n\n if (optionRect.top < containerRect.top) {\n container.scrollTop -= containerRect.top - optionRect.top;\n }\n }\n }\n\n private handleResize = () => {\n this.isMobile = window.innerWidth < 768;\n if (this.isDropdownOpen) {\n if (this.isMobile) {\n this.showOverlay();\n } else {\n this.removeOverlay();\n }\n }\n };\n\n handleOnBlur() {\n if (this.isOnBlurInput === true) {\n setTimeout(() => {\n this.isDropdownOpen = false;\n this.removeOverlay();\n }, 200);\n }\n }\n getClasses() {\n return {\n 'dropdown-input-search': true,\n 'dropdown-open': this.isDropdownOpen,\n disabled: this.disabled,\n [this.status]: true,\n };\n }\n\n getDropdownClasses() {\n return {\n 'dropdown-search-list': true,\n 'visible': this.options.length && this.isDropdownOpen ? true : false\n };\n }\n\n hostCSSProperties() {\n return {\n '--dropdown-max-height': this.dropdownMaxHeight,\n };\n }\n\n render() {\n const isMobileDropdown = this.isMobile && this.isDropdownOpen;\n return (\n <Host style={this.hostCSSProperties()} class=\"dropdown-overlay\">\n <div class={`dropdown ${isMobileDropdown ? 'dropdown-mobile' : ''}`} style={this.styles}>\n <div class={this.getClasses()}>\n {this.isMobile && this.isDropdownOpen && (\n <cura-button-transparent\n fontColor=\"dark\"\n onClick={() => (this.isMobile = false)}\n iconName=\"arrowLeft\"\n size=\"medium\"\n iconOnly\n color=\"primary\"\n ></cura-button-transparent>\n )}\n <cura-input-text\n disabled={this.disabled}\n label={this.label}\n part=\"cura-input-field\"\n mode={isMobileDropdown ? 'transparent' : 'default'}\n required={this.required}\n hideErrorIcon={this.status === 'error'}\n iconName={this.iconName || 'search'}\n value={this.value}\n status={this.status}\n onValueChange={e => this.onValueChange(e.target.value as string)}\n onInput={e => this.handleInputChange(e)}\n onFocus={() => (this.isDropdownOpen = true)}\n onClick={() => (window.innerWidth < 768 ? (this.isMobile = true) : null)}\n onBlur={() => {\n this.handleOnBlur();\n }}\n placeholder={this.placeholder}\n size=\"large\"\n onKeyDown={this.handleKeyDown}\n >\n <slot name=\"helperText\"></slot>\n </cura-input-text>\n </div>\n <div id=\"dropdown-search-list\" class={this.getDropdownClasses()}>\n <slot name=\"dropdown-search-option\" onSlotchange={this.handleSlotChange}></slot>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAwB,s1EAC9B,MAAAC,EAAeD,E,MCMFE,EAAkB,M,uGA8GrBC,KAAAC,eAAwC,KAkExCD,KAAAE,iBAAmB,KACzBF,KAAKG,QAAUC,MAAMC,KAAKL,KAAKM,KAAKC,iBAAiB,gCACrDP,KAAKQ,6BACLR,KAAKS,oBAAoB,EAkBnBT,KAAAU,kBAAqBC,IAC3B,MAAMC,EAAQD,EAAME,OACpBb,KAAKc,MAAQF,EAAME,MACnBd,KAAKe,cAAcf,KAAKc,MAAM,EAkBxBd,KAAAgB,cAAiBL,IACvB,GAAIA,EAAMM,MAAQ,YAAa,CAC7BN,EAAMO,iBACNlB,KAAKmB,cAAc,E,MACd,GAAIR,EAAMM,MAAQ,UAAW,CAClCN,EAAMO,iBACNlB,KAAKmB,eAAe,E,MACf,GAAIR,EAAMM,MAAQ,QAAS,CAChCN,EAAMO,iBACN,GAAIlB,KAAKoB,cAAgB,EAAG,CAC1BpB,KAAKqB,eACLrB,KAAKsB,iBAAiBtB,KAAKoB,a,IA2CzBpB,KAAAuB,aAAe,KACrBvB,KAAKwB,SAAWC,OAAOC,WAAa,IACpC,GAAI1B,KAAK2B,eAAgB,CACvB,GAAI3B,KAAKwB,SAAU,CACjBxB,KAAK4B,a,KACA,CACL5B,KAAK6B,e,gBAlR4C,U,cAMR,M,kCAUa,M,cAKA,M,WAKJ,G,iBAKM,G,WAKN,G,cAKtB,S,uBAMS,Q,oBAUR,M,oBAUA,M,YAMjB,G,cAKWJ,OAAOC,WAAa,I,UAKN,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,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,UAAU;QAAE,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-legacy-default.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': '113,197,232',\n '300': '68,142,205',\n '500': '0,61,165',\n '700': '0,48,117',\n '900': '0,40,85'\n },\n secondary: {\n '100': '245,236,227',\n '300': '221,192,162',\n '500': '204,160,116',\n '700': '136,107,77',\n '900': '41,32,23'\n },\n accent: {\n '100': '255,194,123',\n '300': '255,168,74',\n '500': '255,130,0',\n '700': '215,114,10',\n '900': '155,90,26'\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': '248,227,226',\n '300': '255,179,171',\n '500': '218,113,111',\n '700': '145,75,74',\n '900': '73,38,37'\n },\n secondary: {\n '100': '253,251,249',\n '300': '247,244,238',\n '500': '245,236,227',\n '700': '204,197,189',\n '900': '163,157,151'\n },\n accent: {\n '100': '236,239,249',\n '300': '133,153,203',\n '500': '11,20,151',\n '700': '7,13,101',\n '900': '4,7,50'\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: 100,\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n black: 900\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': '170,190,225',\n '300': '85,126,196',\n '500': '0,61,166',\n '700': '0,41,111',\n '900': '0,12,33'\n },\n secondary: {\n '100': '205,215,227',\n '300': '155,175,199',\n '500': '104,134,171',\n '700': '54,95,143',\n '900': '4,54,115',\n },\n accent: {\n '100': '153,207,255',\n '300': '71,169,255',\n '500': '0,131,245',\n '700': '0,109,204',\n '900': '0,88,164',\n },\n aux: {\n '100': '218,242,239',\n '300': '132,212,202',\n '500': '71,191,176',\n '700': '33,100,92',\n '900': '14,38,35',\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","/**\n * Legacy Default Theme\n */\nimport { ThemeDefault } from \"./theme-default\";\n\nexport const ThemeLegacyDefault = {\n /* Get default theme */\n ...ThemeDefault,\n\n /* Custom */\n /* Colors */\n color: {\n primary: {\n '100': '204,217,231',\n '300': '85,128,174',\n '500': '0,65,134',\n '700': '0,43,89',\n '900': '0,13,27'\n },\n secondary: {\n '100': '238,232,206',\n '300': '198,180,92',\n '500': '170,142,11',\n '700': '113,95,7',\n '900': '34,28,2'\n },\n accent: {\n '100': '249,232,213',\n '300': '228,160,79',\n '500': '223,141,44',\n '700': '149,94,29',\n '900': '45,28,9'\n }\n }\n};\n","import { ThemeDefault } from './theme-default';\nimport { ThemeMaternity } from './theme-maternity';\nimport { ThemeOncology } from './theme-oncology';\nimport { ThemeLegacyDefault } from './theme-legacy-default';\n\nexport const ThemePresets = {\n 'default': ThemeDefault,\n 'maternidade': ThemeMaternity,\n 'oncologia': ThemeOncology,\n 'legacyDefault': ThemeLegacyDefault\n};\n","/**\n * Static\n */\nexport const Static = {\n /* Colors */\n color: {\n success: {\n '100': '223,246,233',\n '300': '148,225,181',\n '500': '95,210,144',\n '700': '49,115,77',\n '900': '19,42,29',\n },\n info: {\n '100': '207,226,255',\n '300': '149,191,255',\n '500': '110,168,255',\n '700': '66,100,153',\n '900': '37,56,85',\n },\n error: {\n '100': '251,221,221',\n '300': '242,143,143',\n '500': '235,87,87',\n '700': '157,58,58',\n '900': '47,17,17',\n },\n warning: {\n '100': '252,250,196',\n '300': '248,244,137',\n '500': '245,239,78',\n '700': '108,106,32',\n '900': '49,48,16',\n },\n neutral: {\n '0': '255,255,255',\n '100': '246,246,246',\n '200': '233,233,233',\n '300': '226,226,226',\n '400': '212,212,212',\n '500': '183,183,183',\n '600': '146,146,146',\n '700': '110,110,110',\n '800': '74,74,74',\n '900': '38,38,38',\n },\n },\n breakpoints: {\n xsmall: {\n min: 0,\n max: 480\n },\n small: {\n min: 481,\n max: 768\n },\n medium: {\n min: 769,\n max: 992\n },\n large: {\n min: 993,\n max: 1920\n },\n xlarge: {\n min: 1921,\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 RGBA value.\n */\n getColor(colorWithDepth: string = \"primary-base\", opacity = 1): string {\n const { color, depth } = this.splitColorDepth(colorWithDepth);\n const staticColor = this.getStatic(color, depth, opacity);\n if (staticColor) return staticColor;\n return this.getDynamic(color, depth, opacity);\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 RGBA value.\n */\n getStatic(color: string, depth: string, opacity = 1) {\n const colorObj = Static.color[color];\n if (!colorObj) return null;\n const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];\n return Static.color[color]?.[alias]\n ? `rgba(${Static.color[color]?.[alias]}, ${opacity})`\n : `rgba(${Static.color[color]?.[depth]}, ${opacity})`;\n }\n\n /**\n * Internal: Look for theme dynamic colors.\n * @param color Color name.\n * @param depth Color depth.\n * @returns RGBA value.\n */\n getDynamic(color: string, depth: string, opacity: number) {\n const themeVar = this.ColorDepthAlias[depth]\n ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`\n : `--cura-color-${color}-${depth}`;\n return getComputedStyle(document.documentElement).getPropertyValue(themeVar)\n ? `rgba(var(${themeVar}), ${opacity})`\n : `rgba(var(--cura-color-primary-500), ${opacity})`;\n }\n\n /**\n * Internal: Split color strings\n * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.\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 || breakpoint === 0) 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 rootElement: HTMLElement;\n prefix = '--cura';\n colors = new CuraThemeColorsModule();\n spacing = new CuraThemeSpacingModule();\n fonts = new CuraThemeFontsModule();\n breakpoints = new CuraThemeBreakpointsModule();\n\n constructor() {\n this.rootElement = window.document.documentElement;\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.rootElement.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, opacity?: number) { return themeModule.colors.getColor(colorWithDepth, opacity) },\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}