@rededor/cura 0.5.5 → 1.0.0-alpha.1

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 (647) hide show
  1. package/dist/assets/assets/icons/iconset-default-list.ts +1 -0
  2. package/dist/assets/{icons → assets/icons}/iconset-default-tmp.svg +8 -0
  3. package/dist/assets/assets/icons/iconset-default.svg +1 -0
  4. package/dist/assets/assets/images/avatar/doctor-default.svg +8 -0
  5. package/dist/assets/assets/images/avatar/dora-default.svg +5 -0
  6. package/dist/assets/assets/images/avatar/patient-default.svg +12 -0
  7. package/dist/assets/assets/images/avatar/unit-default.svg +9 -0
  8. package/dist/assets/assets/images/logoCura.svg +15 -0
  9. package/dist/cjs/app-globals-bcffd819.js +511 -0
  10. package/dist/cjs/app-globals-bcffd819.js.map +1 -0
  11. package/dist/cjs/cura-accordion_9.cjs.entry.js +544 -0
  12. package/dist/cjs/cura-accordion_9.cjs.entry.js.map +1 -0
  13. package/dist/cjs/cura-alert.cjs.entry.js +57 -55
  14. package/dist/cjs/cura-alert.cjs.entry.js.map +1 -1
  15. package/dist/cjs/cura-avatar.cjs.entry.js +68 -0
  16. package/dist/cjs/cura-avatar.cjs.entry.js.map +1 -0
  17. package/dist/cjs/cura-button-outline.cjs.entry.js +102 -71
  18. package/dist/cjs/cura-button-outline.cjs.entry.js.map +1 -1
  19. package/dist/cjs/cura-button-select.cjs.entry.js +91 -85
  20. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  21. package/dist/cjs/cura-button-transparent_2.cjs.entry.js +4055 -0
  22. package/dist/cjs/cura-button-transparent_2.cjs.entry.js.map +1 -0
  23. package/dist/cjs/cura-calendar.cjs.entry.js +3913 -0
  24. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -0
  25. package/dist/cjs/cura-card.cjs.entry.js +53 -0
  26. package/dist/cjs/cura-card.cjs.entry.js.map +1 -0
  27. package/dist/cjs/cura-checkbox.cjs.entry.js +168 -131
  28. package/dist/cjs/cura-checkbox.cjs.entry.js.map +1 -1
  29. package/dist/cjs/cura-display.cjs.entry.js +63 -62
  30. package/dist/cjs/cura-display.cjs.entry.js.map +1 -1
  31. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +22 -0
  32. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js.map +1 -0
  33. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +55 -0
  34. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js.map +1 -0
  35. package/dist/cjs/cura-dropdown-search.cjs.entry.js +217 -0
  36. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -0
  37. package/dist/cjs/cura-forms.definitions-c164f1b8.js +20 -0
  38. package/dist/cjs/cura-forms.definitions-c164f1b8.js.map +1 -0
  39. package/dist/cjs/cura-icon.definitions-8d714f6a.js +21 -0
  40. package/dist/cjs/cura-icon.definitions-8d714f6a.js.map +1 -0
  41. package/dist/cjs/cura-icons-view.cjs.entry.js +24 -23
  42. package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
  43. package/dist/cjs/cura-radio.cjs.entry.js +142 -103
  44. package/dist/cjs/cura-radio.cjs.entry.js.map +1 -1
  45. package/dist/cjs/cura-select_2.cjs.entry.js +325 -0
  46. package/dist/cjs/cura-select_2.cjs.entry.js.map +1 -0
  47. package/dist/cjs/cura-switch.cjs.entry.js +113 -78
  48. package/dist/cjs/cura-switch.cjs.entry.js.map +1 -1
  49. package/dist/cjs/cura.cjs.js +13 -22
  50. package/dist/cjs/cura.cjs.js.map +1 -1
  51. package/dist/cjs/index-98e7ba54.js +1544 -0
  52. package/dist/cjs/index-98e7ba54.js.map +1 -0
  53. package/dist/cjs/index.cjs.js +1 -1
  54. package/dist/cjs/index.cjs.js.map +1 -1
  55. package/dist/cjs/loader.cjs.js +6 -31
  56. package/dist/cjs/loader.cjs.js.map +1 -1
  57. package/dist/collection/api/cura-api.js +30 -30
  58. package/dist/collection/api/cura-api.js.map +1 -1
  59. package/dist/collection/api/cura-api.type.js +2 -2
  60. package/dist/collection/api/cura-api.type.js.map +1 -1
  61. package/dist/collection/api/modules/cura-theme-breakpoints-module.js +10 -10
  62. package/dist/collection/api/modules/cura-theme-breakpoints-module.js.map +1 -1
  63. package/dist/collection/api/modules/cura-theme-colors-module.js +72 -72
  64. package/dist/collection/api/modules/cura-theme-colors-module.js.map +1 -1
  65. package/dist/collection/api/modules/cura-theme-fonts-module.js +28 -28
  66. package/dist/collection/api/modules/cura-theme-fonts-module.js.map +1 -1
  67. package/dist/collection/api/modules/cura-theme-module.js +66 -66
  68. package/dist/collection/api/modules/cura-theme-module.js.map +1 -1
  69. package/dist/collection/api/modules/cura-theme-spacing-module.js +9 -9
  70. package/dist/collection/api/modules/cura-theme-spacing-module.js.map +1 -1
  71. package/dist/collection/api/theme-presets/static.js +63 -63
  72. package/dist/collection/api/theme-presets/static.js.map +1 -1
  73. package/dist/collection/api/theme-presets/theme-default.js +41 -41
  74. package/dist/collection/api/theme-presets/theme-default.js.map +1 -1
  75. package/dist/collection/api/theme-presets/theme-legacy-default.js +24 -24
  76. package/dist/collection/api/theme-presets/theme-legacy-default.js.map +1 -1
  77. package/dist/collection/api/theme-presets/theme-maternity.js +38 -38
  78. package/dist/collection/api/theme-presets/theme-maternity.js.map +1 -1
  79. package/dist/collection/api/theme-presets/theme-oncology.js +46 -46
  80. package/dist/collection/api/theme-presets/theme-oncology.js.map +1 -1
  81. package/dist/collection/api/theme-presets/theme-presets.js +8 -8
  82. package/dist/collection/api/theme-presets/theme-presets.js.map +1 -1
  83. package/dist/collection/assets/icons/iconset-default-list.js +1 -1
  84. package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
  85. package/dist/collection/assets/icons/iconset-default-tmp.svg +8 -0
  86. package/dist/collection/assets/icons/iconset-default.svg +1 -1
  87. package/dist/collection/assets/images/avatar/doctor-default.svg +8 -0
  88. package/dist/collection/assets/images/avatar/dora-default.svg +5 -0
  89. package/dist/collection/assets/images/avatar/patient-default.svg +12 -0
  90. package/dist/collection/assets/images/avatar/unit-default.svg +9 -0
  91. package/dist/collection/assets/images/logoCura.svg +15 -0
  92. package/dist/collection/assets-raw/icons/default/contacts.svg +3 -0
  93. package/dist/collection/assets-raw/icons/default/scheduleCancel.svg +3 -0
  94. package/dist/collection/collection-manifest.json +29 -21
  95. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js +267 -267
  96. package/dist/collection/components/accordion/cura-accordion/cura-accordion.js.map +1 -1
  97. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js +127 -127
  98. package/dist/collection/components/accordion/cura-accordion/cura-accordion.stories.js.map +1 -1
  99. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js +196 -196
  100. package/dist/collection/components/accordion/cura-accordion-item/cura-accordion-item.js.map +1 -1
  101. package/dist/collection/components/buttons/cura-button/cura-button.css +109 -46
  102. package/dist/collection/components/buttons/cura-button/cura-button.js +368 -306
  103. package/dist/collection/components/buttons/cura-button/cura-button.js.map +1 -1
  104. package/dist/collection/components/buttons/cura-button/cura-button.stories.js +184 -159
  105. package/dist/collection/components/buttons/cura-button/cura-button.stories.js.map +1 -1
  106. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.css +34 -64
  107. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +374 -306
  108. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js.map +1 -1
  109. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js +184 -159
  110. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.stories.js.map +1 -1
  111. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +33 -23
  112. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +265 -260
  113. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  114. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.css +29 -50
  115. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +339 -306
  116. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js.map +1 -1
  117. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js +172 -159
  118. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.stories.js.map +1 -1
  119. package/dist/collection/components/cura-alert/cura-alert.js +182 -164
  120. package/dist/collection/components/cura-alert/cura-alert.js.map +1 -1
  121. package/dist/collection/components/cura-alert/cura-alert.stories.js +90 -77
  122. package/dist/collection/components/cura-alert/cura-alert.stories.js.map +1 -1
  123. package/dist/collection/components/cura-avatar/cura-avatar.css +24 -0
  124. package/dist/collection/components/cura-avatar/cura-avatar.definitions.js +7 -0
  125. package/dist/collection/components/cura-avatar/cura-avatar.definitions.js.map +1 -0
  126. package/dist/collection/components/cura-avatar/cura-avatar.js +231 -0
  127. package/dist/collection/components/cura-avatar/cura-avatar.js.map +1 -0
  128. package/dist/collection/components/cura-avatar/cura-avatar.stories.js +198 -0
  129. package/dist/collection/components/cura-avatar/cura-avatar.stories.js.map +1 -0
  130. package/dist/collection/components/cura-calendar/cura-calendar.css +181 -0
  131. package/dist/collection/components/cura-calendar/cura-calendar.js +681 -0
  132. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -0
  133. package/dist/collection/components/cura-calendar/cura-calendar.stories.js +126 -0
  134. package/dist/collection/components/cura-calendar/cura-calendar.stories.js.map +1 -0
  135. package/dist/collection/components/cura-card/cura-card.css +175 -0
  136. package/dist/collection/components/cura-card/cura-card.js +201 -0
  137. package/dist/collection/components/cura-card/cura-card.js.map +1 -0
  138. package/dist/collection/components/cura-card/cura-card.stories.js +127 -0
  139. package/dist/collection/components/cura-card/cura-card.stories.js.map +1 -0
  140. package/dist/collection/components/cura-icon/cura-icon.definitions.js +11 -11
  141. package/dist/collection/components/cura-icon/cura-icon.definitions.js.map +1 -1
  142. package/dist/collection/components/cura-icon/cura-icon.js +151 -151
  143. package/dist/collection/components/cura-icon/cura-icon.js.map +1 -1
  144. package/dist/collection/components/cura-icon/cura-icon.stories.js +60 -60
  145. package/dist/collection/components/cura-icon/cura-icon.stories.js.map +1 -1
  146. package/dist/collection/components/cura-icons-view/cura-icons-view.js +37 -37
  147. package/dist/collection/components/cura-icons-view/cura-icons-view.js.map +1 -1
  148. package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js +7 -7
  149. package/dist/collection/components/cura-icons-view/cura-icons-view.stories.js.map +1 -1
  150. package/dist/collection/components/cura-page-template/cura-page-template.js +52 -52
  151. package/dist/collection/components/cura-page-template/cura-page-template.js.map +1 -1
  152. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.css +19 -11
  153. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +457 -427
  154. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js.map +1 -1
  155. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js +170 -170
  156. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.stories.js.map +1 -1
  157. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.css +50 -0
  158. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +136 -0
  159. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js.map +1 -0
  160. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.stories.js +56 -0
  161. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.stories.js.map +1 -0
  162. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.css +10 -0
  163. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +19 -0
  164. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js.map +1 -0
  165. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +153 -0
  166. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +410 -0
  167. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -0
  168. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js +193 -0
  169. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.stories.js.map +1 -0
  170. package/dist/collection/components/forms/cura-forms.definitions.js +12 -12
  171. package/dist/collection/components/forms/cura-forms.definitions.js.map +1 -1
  172. package/dist/collection/components/forms/cura-input-text/cura-input-text.css +849 -139
  173. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +732 -641
  174. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
  175. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +217 -196
  176. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -1
  177. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +40 -40
  178. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -1
  179. package/dist/collection/components/forms/cura-label/cura-label.js +187 -187
  180. package/dist/collection/components/forms/cura-label/cura-label.js.map +1 -1
  181. package/dist/collection/components/forms/cura-label/cura-label.stories.js +108 -108
  182. package/dist/collection/components/forms/cura-label/cura-label.stories.js.map +1 -1
  183. package/dist/collection/components/forms/cura-radio/cura-radio.js +395 -363
  184. package/dist/collection/components/forms/cura-radio/cura-radio.js.map +1 -1
  185. package/dist/collection/components/forms/cura-radio/cura-radio.stories.js +150 -150
  186. package/dist/collection/components/forms/cura-radio/cura-radio.stories.js.map +1 -1
  187. package/dist/collection/components/forms/cura-select/cura-select.css +519 -0
  188. package/dist/collection/components/forms/cura-select/cura-select.js +444 -0
  189. package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -0
  190. package/dist/collection/components/forms/cura-select/cura-select.stories.js +144 -0
  191. package/dist/collection/components/forms/cura-select/cura-select.stories.js.map +1 -0
  192. package/dist/collection/components/forms/cura-select-options/cura-select-option.css +28 -0
  193. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +138 -0
  194. package/dist/collection/components/forms/cura-select-options/cura-select-option.js.map +1 -0
  195. package/dist/collection/components/forms/cura-switch/cura-switch.css +80 -18
  196. package/dist/collection/components/forms/cura-switch/cura-switch.js +292 -264
  197. package/dist/collection/components/forms/cura-switch/cura-switch.js.map +1 -1
  198. package/dist/collection/components/forms/cura-switch/cura-switch.stories.js +115 -115
  199. package/dist/collection/components/forms/cura-switch/cura-switch.stories.js.map +1 -1
  200. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +74 -74
  201. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js.map +1 -1
  202. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js +41 -41
  203. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.stories.js.map +1 -1
  204. package/dist/collection/components/text/cura-display/cura-display.js +174 -174
  205. package/dist/collection/components/text/cura-display/cura-display.js.map +1 -1
  206. package/dist/collection/components/text/cura-display/cura-display.stories.js +97 -97
  207. package/dist/collection/components/text/cura-display/cura-display.stories.js.map +1 -1
  208. package/dist/collection/components/text/cura-heading/cura-heading.js +220 -220
  209. package/dist/collection/components/text/cura-heading/cura-heading.js.map +1 -1
  210. package/dist/collection/components/text/cura-heading/cura-heading.stories.js +117 -117
  211. package/dist/collection/components/text/cura-heading/cura-heading.stories.js.map +1 -1
  212. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +168 -168
  213. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js.map +1 -1
  214. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js +98 -98
  215. package/dist/collection/components/text/cura-paragraph/cura-paragraph.stories.js.map +1 -1
  216. package/dist/collection/index.js +1 -1
  217. package/dist/collection/index.js.map +1 -1
  218. package/dist/collection/rededor-cura-start.js +7 -7
  219. package/dist/collection/rededor-cura-start.js.map +1 -1
  220. package/dist/collection/utils/utils.js +11 -11
  221. package/dist/collection/utils/utils.js.map +1 -1
  222. package/dist/components/cura-accordion-item.d.ts +2 -2
  223. package/dist/components/cura-accordion-item.js +62 -61
  224. package/dist/components/cura-accordion-item.js.map +1 -1
  225. package/dist/components/cura-accordion.d.ts +2 -2
  226. package/dist/components/cura-accordion.js +108 -104
  227. package/dist/components/cura-accordion.js.map +1 -1
  228. package/dist/components/cura-alert.d.ts +2 -2
  229. package/dist/components/cura-alert.js +93 -88
  230. package/dist/components/cura-alert.js.map +1 -1
  231. package/dist/components/cura-avatar.d.ts +11 -0
  232. package/dist/components/cura-avatar.js +95 -0
  233. package/dist/components/cura-avatar.js.map +1 -0
  234. package/dist/components/cura-button-outline.d.ts +2 -2
  235. package/dist/components/cura-button-outline.js +147 -109
  236. package/dist/components/cura-button-outline.js.map +1 -1
  237. package/dist/components/cura-button-select.d.ts +2 -2
  238. package/dist/components/cura-button-select.js +129 -113
  239. package/dist/components/cura-button-select.js.map +1 -1
  240. package/dist/components/cura-button-transparent.d.ts +2 -2
  241. package/dist/components/cura-button-transparent.js +1 -116
  242. package/dist/components/cura-button-transparent.js.map +1 -1
  243. package/dist/components/cura-button-transparent2.js +144 -0
  244. package/dist/components/cura-button-transparent2.js.map +1 -0
  245. package/dist/components/cura-button.d.ts +2 -2
  246. package/dist/components/cura-button.js +145 -109
  247. package/dist/components/cura-button.js.map +1 -1
  248. package/dist/components/cura-calendar.d.ts +11 -0
  249. package/dist/components/cura-calendar.js +3969 -0
  250. package/dist/components/cura-calendar.js.map +1 -0
  251. package/dist/components/cura-card.d.ts +11 -0
  252. package/dist/components/cura-card.js +75 -0
  253. package/dist/components/cura-card.js.map +1 -0
  254. package/dist/components/cura-checkbox.d.ts +2 -2
  255. package/dist/components/cura-checkbox.js +210 -174
  256. package/dist/components/cura-checkbox.js.map +1 -1
  257. package/dist/components/cura-display.d.ts +2 -2
  258. package/dist/components/cura-display.js +85 -81
  259. package/dist/components/cura-display.js.map +1 -1
  260. package/dist/components/cura-dropdown-search-option-title.d.ts +11 -0
  261. package/dist/components/cura-dropdown-search-option-title.js +42 -0
  262. package/dist/components/cura-dropdown-search-option-title.js.map +1 -0
  263. package/dist/components/cura-dropdown-search-option.d.ts +11 -0
  264. package/dist/components/cura-dropdown-search-option.js +82 -0
  265. package/dist/components/cura-dropdown-search-option.js.map +1 -0
  266. package/dist/components/cura-dropdown-search.d.ts +11 -0
  267. package/dist/components/cura-dropdown-search.js +281 -0
  268. package/dist/components/cura-dropdown-search.js.map +1 -0
  269. package/dist/components/cura-forms.definitions.js +12 -12
  270. package/dist/components/cura-forms.definitions.js.map +1 -1
  271. package/dist/components/cura-heading.d.ts +2 -2
  272. package/dist/components/cura-heading2.js +97 -93
  273. package/dist/components/cura-heading2.js.map +1 -1
  274. package/dist/components/cura-icon.d.ts +2 -2
  275. package/dist/components/cura-icon2.js +74 -69
  276. package/dist/components/cura-icon2.js.map +1 -1
  277. package/dist/components/cura-icons-view.d.ts +2 -2
  278. package/dist/components/cura-icons-view.js +57 -56
  279. package/dist/components/cura-icons-view.js.map +1 -1
  280. package/dist/components/cura-input-text.d.ts +2 -2
  281. package/dist/components/cura-input-text.js +1 -3954
  282. package/dist/components/cura-input-text.js.map +1 -1
  283. package/dist/{cjs/cura-input-text.cjs.entry.js → components/cura-input-text2.js} +393 -283
  284. package/dist/components/cura-input-text2.js.map +1 -0
  285. package/dist/components/cura-label.d.ts +2 -2
  286. package/dist/components/cura-label2.js +81 -77
  287. package/dist/components/cura-label2.js.map +1 -1
  288. package/dist/components/cura-loader-circle.d.ts +2 -2
  289. package/dist/components/cura-loader-circle2.js +41 -40
  290. package/dist/components/cura-loader-circle2.js.map +1 -1
  291. package/dist/components/cura-page-template.d.ts +2 -2
  292. package/dist/components/cura-page-template.js +36 -35
  293. package/dist/components/cura-page-template.js.map +1 -1
  294. package/dist/components/cura-paragraph.d.ts +2 -2
  295. package/dist/components/cura-paragraph2.js +79 -75
  296. package/dist/components/cura-paragraph2.js.map +1 -1
  297. package/dist/components/cura-radio.d.ts +2 -2
  298. package/dist/components/cura-radio.js +176 -139
  299. package/dist/components/cura-radio.js.map +1 -1
  300. package/dist/components/cura-select-option.d.ts +11 -0
  301. package/dist/components/cura-select-option.js +8 -0
  302. package/dist/components/cura-select-option.js.map +1 -0
  303. package/dist/components/cura-select-option2.js +87 -0
  304. package/dist/components/cura-select-option2.js.map +1 -0
  305. package/dist/components/cura-select.d.ts +11 -0
  306. package/dist/components/cura-select.js +8 -0
  307. package/dist/components/cura-select.js.map +1 -0
  308. package/dist/components/cura-select2.js +308 -0
  309. package/dist/components/cura-select2.js.map +1 -0
  310. package/dist/components/cura-switch.d.ts +2 -2
  311. package/dist/components/cura-switch.js +138 -105
  312. package/dist/components/cura-switch.js.map +1 -1
  313. package/dist/components/index.d.ts +6 -0
  314. package/dist/components/index.js +482 -466
  315. package/dist/components/index.js.map +1 -1
  316. package/dist/cura/cura.esm.js +1 -1
  317. package/dist/cura/cura.esm.js.map +1 -1
  318. package/dist/cura/index.esm.js.map +1 -1
  319. package/dist/cura/p-17a878d4.entry.js +2 -0
  320. package/dist/cura/p-17a878d4.entry.js.map +1 -0
  321. package/dist/cura/p-251bd980.entry.js +2 -0
  322. package/dist/cura/p-251bd980.entry.js.map +1 -0
  323. package/dist/cura/p-260edb61.entry.js +2 -0
  324. package/dist/cura/p-260edb61.entry.js.map +1 -0
  325. package/dist/cura/p-312791fb.js +3 -0
  326. package/dist/cura/p-312791fb.js.map +1 -0
  327. package/dist/cura/p-31ae34e3.entry.js +2 -0
  328. package/dist/cura/p-31ae34e3.entry.js.map +1 -0
  329. package/dist/cura/p-3b4bf71e.entry.js +2 -0
  330. package/dist/cura/p-3b4bf71e.entry.js.map +1 -0
  331. package/dist/cura/p-3c39a9d8.entry.js +2 -0
  332. package/dist/cura/p-3c39a9d8.entry.js.map +1 -0
  333. package/dist/cura/p-5466758a.entry.js +2 -0
  334. package/dist/cura/p-5466758a.entry.js.map +1 -0
  335. package/dist/cura/p-578c74a4.entry.js +2 -0
  336. package/dist/cura/p-578c74a4.entry.js.map +1 -0
  337. package/dist/cura/p-61d20270.entry.js +2 -0
  338. package/dist/cura/p-61d20270.entry.js.map +1 -0
  339. package/dist/cura/p-6373c7cd.entry.js +2 -0
  340. package/dist/cura/p-6373c7cd.entry.js.map +1 -0
  341. package/dist/cura/{p-f8fffdc1.js → p-70c369b1.js} +1 -1
  342. package/dist/cura/p-70c369b1.js.map +1 -0
  343. package/dist/cura/p-93389727.entry.js +2 -0
  344. package/dist/cura/p-93389727.entry.js.map +1 -0
  345. package/dist/cura/p-9a4094e3.entry.js +2 -0
  346. package/dist/cura/p-9a4094e3.entry.js.map +1 -0
  347. package/dist/cura/{p-c791725b.js → p-a7221f0c.js} +1 -1
  348. package/dist/{esm-es5/cura-icon.definitions-a63d1862.js.map → cura/p-a7221f0c.js.map} +1 -1
  349. package/dist/cura/p-b0d66386.entry.js +2 -0
  350. package/dist/cura/p-b0d66386.entry.js.map +1 -0
  351. package/dist/cura/p-b3a50bcf.entry.js +2 -0
  352. package/dist/cura/p-b3a50bcf.entry.js.map +1 -0
  353. package/dist/cura/p-ba2e7222.entry.js +2 -0
  354. package/dist/cura/p-ba2e7222.entry.js.map +1 -0
  355. package/dist/cura/p-c63f4695.entry.js +2 -0
  356. package/dist/cura/p-c63f4695.entry.js.map +1 -0
  357. package/dist/cura/p-ced36448.entry.js +2 -0
  358. package/dist/cura/p-ced36448.entry.js.map +1 -0
  359. package/dist/cura/{p-3688570d.js → p-f9b8f665.js} +1 -1
  360. package/dist/{esm-es5/cura-forms.definitions-0f774253.js.map → cura/p-f9b8f665.js.map} +1 -1
  361. package/dist/esm/app-globals-f2da2b14.js +509 -0
  362. package/dist/esm/app-globals-f2da2b14.js.map +1 -0
  363. package/dist/esm/cura-accordion_9.entry.js +532 -0
  364. package/dist/esm/cura-accordion_9.entry.js.map +1 -0
  365. package/dist/esm/cura-alert.entry.js +57 -55
  366. package/dist/esm/cura-alert.entry.js.map +1 -1
  367. package/dist/esm/cura-avatar.entry.js +64 -0
  368. package/dist/esm/cura-avatar.entry.js.map +1 -0
  369. package/dist/esm/cura-button-outline.entry.js +102 -71
  370. package/dist/esm/cura-button-outline.entry.js.map +1 -1
  371. package/dist/esm/cura-button-select.entry.js +91 -85
  372. package/dist/esm/cura-button-select.entry.js.map +1 -1
  373. package/dist/esm/{cura-input-text.entry.js → cura-button-transparent_2.entry.js} +423 -276
  374. package/dist/esm/cura-button-transparent_2.entry.js.map +1 -0
  375. package/dist/esm/cura-calendar.entry.js +3909 -0
  376. package/dist/esm/cura-calendar.entry.js.map +1 -0
  377. package/dist/esm/cura-card.entry.js +49 -0
  378. package/dist/esm/cura-card.entry.js.map +1 -0
  379. package/dist/esm/cura-checkbox.entry.js +168 -131
  380. package/dist/esm/cura-checkbox.entry.js.map +1 -1
  381. package/dist/esm/cura-display.entry.js +63 -62
  382. package/dist/esm/cura-display.entry.js.map +1 -1
  383. package/dist/esm/cura-dropdown-search-option-title.entry.js +18 -0
  384. package/dist/esm/cura-dropdown-search-option-title.entry.js.map +1 -0
  385. package/dist/esm/cura-dropdown-search-option.entry.js +51 -0
  386. package/dist/esm/cura-dropdown-search-option.entry.js.map +1 -0
  387. package/dist/esm/cura-dropdown-search.entry.js +213 -0
  388. package/dist/esm/cura-dropdown-search.entry.js.map +1 -0
  389. package/dist/esm/cura-forms.definitions-2f963167.js +18 -0
  390. package/dist/esm/cura-forms.definitions-2f963167.js.map +1 -0
  391. package/dist/esm/cura-icon.definitions-aaa4e80f.js +18 -0
  392. package/dist/esm/cura-icon.definitions-aaa4e80f.js.map +1 -0
  393. package/dist/esm/cura-icons-view.entry.js +24 -23
  394. package/dist/esm/cura-icons-view.entry.js.map +1 -1
  395. package/dist/esm/cura-radio.entry.js +142 -103
  396. package/dist/esm/cura-radio.entry.js.map +1 -1
  397. package/dist/esm/cura-select_2.entry.js +320 -0
  398. package/dist/esm/cura-select_2.entry.js.map +1 -0
  399. package/dist/esm/cura-switch.entry.js +113 -78
  400. package/dist/esm/cura-switch.entry.js.map +1 -1
  401. package/dist/esm/cura.js +14 -23
  402. package/dist/esm/cura.js.map +1 -1
  403. package/dist/esm/index-1ad98520.js +1515 -0
  404. package/dist/esm/index-1ad98520.js.map +1 -0
  405. package/dist/esm/index.js +1 -1
  406. package/dist/esm/index.js.map +1 -1
  407. package/dist/esm/loader.js +8 -33
  408. package/dist/esm/loader.js.map +1 -1
  409. package/dist/index.js +1 -1
  410. package/dist/loader/cdn.js +1 -3
  411. package/dist/loader/index.cjs.js +1 -3
  412. package/dist/loader/index.d.ts +4 -1
  413. package/dist/loader/index.es2017.js +1 -3
  414. package/dist/loader/index.js +1 -3
  415. package/dist/types/api/cura-api.d.ts +3 -3
  416. package/dist/types/api/cura-api.type.d.ts +44 -44
  417. package/dist/types/api/modules/cura-theme-breakpoints-module.d.ts +3 -3
  418. package/dist/types/api/modules/cura-theme-colors-module.d.ts +46 -46
  419. package/dist/types/api/modules/cura-theme-fonts-module.d.ts +22 -22
  420. package/dist/types/api/modules/cura-theme-module.d.ts +25 -25
  421. package/dist/types/api/modules/cura-theme-spacing-module.d.ts +4 -4
  422. package/dist/types/api/theme-presets/static.d.ts +62 -62
  423. package/dist/types/api/theme-presets/theme-default.d.ts +38 -38
  424. package/dist/types/api/theme-presets/theme-legacy-default.d.ts +38 -38
  425. package/dist/types/api/theme-presets/theme-maternity.d.ts +38 -38
  426. package/dist/types/api/theme-presets/theme-oncology.d.ts +45 -45
  427. package/dist/types/api/theme-presets/theme-presets.d.ts +175 -175
  428. package/dist/types/components/accordion/cura-accordion/cura-accordion.d.ts +37 -37
  429. package/dist/types/components/accordion/cura-accordion/cura-accordion.stories.d.ts +140 -140
  430. package/dist/types/components/accordion/cura-accordion-item/cura-accordion-item.d.ts +27 -27
  431. package/dist/types/components/buttons/cura-button/cura-button.d.ts +70 -59
  432. package/dist/types/components/buttons/cura-button/cura-button.stories.d.ts +184 -155
  433. package/dist/types/components/buttons/cura-button-outline/cura-button-outline.d.ts +70 -59
  434. package/dist/types/components/buttons/cura-button-outline/cura-button-outline.stories.d.ts +184 -155
  435. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +48 -47
  436. package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.d.ts +65 -59
  437. package/dist/types/components/buttons/cura-button-transparent/cura-button-transparent.stories.d.ts +169 -155
  438. package/dist/types/components/cura-alert/cura-alert.d.ts +14 -13
  439. package/dist/types/components/cura-alert/cura-alert.stories.d.ts +85 -70
  440. package/dist/types/components/cura-avatar/cura-avatar.d.ts +24 -0
  441. package/dist/types/components/cura-avatar/cura-avatar.definitions.d.ts +14 -0
  442. package/dist/types/components/cura-avatar/cura-avatar.stories.d.ts +167 -0
  443. package/dist/types/components/cura-calendar/cura-calendar.d.ts +323 -0
  444. package/dist/types/components/cura-calendar/cura-calendar.stories.d.ts +128 -0
  445. package/dist/types/components/cura-card/cura-card.d.ts +48 -0
  446. package/dist/types/components/cura-card/cura-card.stories.d.ts +98 -0
  447. package/dist/types/components/cura-icon/cura-icon.d.ts +12 -12
  448. package/dist/types/components/cura-icon/cura-icon.definitions.d.ts +44 -44
  449. package/dist/types/components/cura-icon/cura-icon.stories.d.ts +56 -56
  450. package/dist/types/components/cura-icons-view/cura-icons-view.d.ts +6 -6
  451. package/dist/types/components/cura-icons-view/cura-icons-view.stories.d.ts +3 -3
  452. package/dist/types/components/cura-page-template/cura-page-template.d.ts +6 -6
  453. package/dist/types/components/forms/cura-checkbox/cura-checkbox.d.ts +111 -95
  454. package/dist/types/components/forms/cura-checkbox/cura-checkbox.stories.d.ts +193 -193
  455. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.d.ts +27 -0
  456. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.stories.d.ts +44 -0
  457. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.d.ts +3 -0
  458. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +111 -0
  459. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.stories.d.ts +124 -0
  460. package/dist/types/components/forms/cura-forms.definitions.d.ts +12 -12
  461. package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +169 -132
  462. package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +241 -218
  463. package/dist/types/components/forms/cura-input-text/mask-presets/input-mask-presets.d.ts +1 -2
  464. package/dist/types/components/forms/cura-label/cura-label.d.ts +52 -52
  465. package/dist/types/components/forms/cura-label/cura-label.stories.d.ts +112 -112
  466. package/dist/types/components/forms/cura-radio/cura-radio.d.ts +96 -74
  467. package/dist/types/components/forms/cura-radio/cura-radio.stories.d.ts +162 -162
  468. package/dist/types/components/forms/cura-select/cura-select.d.ts +176 -0
  469. package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +156 -0
  470. package/dist/types/components/forms/cura-select-options/cura-select-option.d.ts +17 -0
  471. package/dist/types/components/forms/cura-switch/cura-switch.d.ts +78 -57
  472. package/dist/types/components/forms/cura-switch/cura-switch.stories.d.ts +121 -121
  473. package/dist/types/components/loaders/cura-loader-circle/cura-loader-circle.d.ts +21 -21
  474. package/dist/types/components/loaders/cura-loader-circle/cura-loader-circle.stories.d.ts +35 -35
  475. package/dist/types/components/text/cura-display/cura-display.d.ts +47 -47
  476. package/dist/types/components/text/cura-display/cura-display.stories.d.ts +101 -101
  477. package/dist/types/components/text/cura-heading/cura-heading.d.ts +58 -58
  478. package/dist/types/components/text/cura-heading/cura-heading.stories.d.ts +127 -127
  479. package/dist/types/components/text/cura-paragraph/cura-paragraph.d.ts +47 -47
  480. package/dist/types/components/text/cura-paragraph/cura-paragraph.stories.d.ts +99 -99
  481. package/dist/types/components.d.ts +697 -13
  482. package/dist/types/index.d.ts +4 -4
  483. package/dist/types/rededor-cura-start.d.ts +4 -4
  484. package/dist/types/stencil-public-runtime.d.ts +55 -15
  485. package/package.json +6 -6
  486. package/dist/assets/icons/iconset-default-list.ts +0 -1
  487. package/dist/assets/icons/iconset-default.svg +0 -1
  488. package/dist/cjs/app-globals-2988084b.js +0 -511
  489. package/dist/cjs/app-globals-2988084b.js.map +0 -1
  490. package/dist/cjs/css-shim-83cf0349.js +0 -8
  491. package/dist/cjs/css-shim-83cf0349.js.map +0 -1
  492. package/dist/cjs/cura-accordion_8.cjs.entry.js +0 -445
  493. package/dist/cjs/cura-accordion_8.cjs.entry.js.map +0 -1
  494. package/dist/cjs/cura-button-transparent.cjs.entry.js +0 -83
  495. package/dist/cjs/cura-button-transparent.cjs.entry.js.map +0 -1
  496. package/dist/cjs/cura-forms.definitions-11be2ebd.js +0 -20
  497. package/dist/cjs/cura-forms.definitions-11be2ebd.js.map +0 -1
  498. package/dist/cjs/cura-icon.definitions-b73b0178.js +0 -21
  499. package/dist/cjs/cura-icon.definitions-b73b0178.js.map +0 -1
  500. package/dist/cjs/cura-input-text.cjs.entry.js.map +0 -1
  501. package/dist/cjs/cura-label.cjs.entry.js +0 -69
  502. package/dist/cjs/cura-label.cjs.entry.js.map +0 -1
  503. package/dist/cjs/index-7616f620.js +0 -2281
  504. package/dist/cjs/index-7616f620.js.map +0 -1
  505. package/dist/cjs/shadow-css-8baae635.js +0 -391
  506. package/dist/cjs/shadow-css-8baae635.js.map +0 -1
  507. package/dist/collection/utils/utils.spec.js +0 -16
  508. package/dist/collection/utils/utils.spec.js.map +0 -1
  509. package/dist/cura/cura.js +0 -133
  510. package/dist/cura/p-0c2644aa.system.entry.js +0 -2
  511. package/dist/cura/p-0c2644aa.system.entry.js.map +0 -1
  512. package/dist/cura/p-118112e5.system.js +0 -14
  513. package/dist/cura/p-118112e5.system.js.map +0 -1
  514. package/dist/cura/p-120926c5.system.js +0 -2
  515. package/dist/cura/p-120926c5.system.js.map +0 -1
  516. package/dist/cura/p-1228e771.entry.js +0 -2
  517. package/dist/cura/p-1228e771.entry.js.map +0 -1
  518. package/dist/cura/p-183305c3.js +0 -2
  519. package/dist/cura/p-183305c3.js.map +0 -1
  520. package/dist/cura/p-2d42ccf4.entry.js +0 -2
  521. package/dist/cura/p-2d42ccf4.entry.js.map +0 -1
  522. package/dist/cura/p-3688570d.js.map +0 -1
  523. package/dist/cura/p-36a83bc7.system.js +0 -3
  524. package/dist/cura/p-36a83bc7.system.js.map +0 -1
  525. package/dist/cura/p-3f5de5e2.entry.js +0 -2
  526. package/dist/cura/p-3f5de5e2.entry.js.map +0 -1
  527. package/dist/cura/p-3f6aaefc.system.js +0 -2
  528. package/dist/cura/p-3f6aaefc.system.js.map +0 -1
  529. package/dist/cura/p-48426f60.system.js +0 -2
  530. package/dist/cura/p-48426f60.system.js.map +0 -1
  531. package/dist/cura/p-557c6eef.entry.js +0 -2
  532. package/dist/cura/p-557c6eef.entry.js.map +0 -1
  533. package/dist/cura/p-5a6c2cd2.system.entry.js +0 -2
  534. package/dist/cura/p-5a6c2cd2.system.entry.js.map +0 -1
  535. package/dist/cura/p-71ed26f4.entry.js +0 -2
  536. package/dist/cura/p-71ed26f4.entry.js.map +0 -1
  537. package/dist/cura/p-7c744ff0.system.entry.js +0 -2
  538. package/dist/cura/p-7c744ff0.system.entry.js.map +0 -1
  539. package/dist/cura/p-8d959fb2.entry.js +0 -2
  540. package/dist/cura/p-8d959fb2.entry.js.map +0 -1
  541. package/dist/cura/p-9471c93e.system.entry.js +0 -2
  542. package/dist/cura/p-9471c93e.system.entry.js.map +0 -1
  543. package/dist/cura/p-a32889a4.system.js +0 -2
  544. package/dist/cura/p-a32889a4.system.js.map +0 -1
  545. package/dist/cura/p-a56f9357.system.entry.js +0 -2
  546. package/dist/cura/p-a56f9357.system.entry.js.map +0 -1
  547. package/dist/cura/p-a719b444.system.entry.js +0 -2
  548. package/dist/cura/p-a719b444.system.entry.js.map +0 -1
  549. package/dist/cura/p-ab8c9a8f.system.entry.js +0 -2
  550. package/dist/cura/p-ab8c9a8f.system.entry.js.map +0 -1
  551. package/dist/cura/p-ad194144.entry.js +0 -2
  552. package/dist/cura/p-ad194144.entry.js.map +0 -1
  553. package/dist/cura/p-ba20f1b6.entry.js +0 -2
  554. package/dist/cura/p-ba20f1b6.entry.js.map +0 -1
  555. package/dist/cura/p-ba66d7be.js +0 -3
  556. package/dist/cura/p-ba66d7be.js.map +0 -1
  557. package/dist/cura/p-beab48cd.js +0 -13
  558. package/dist/cura/p-beab48cd.js.map +0 -1
  559. package/dist/cura/p-bfe9a9e2.entry.js +0 -2
  560. package/dist/cura/p-bfe9a9e2.entry.js.map +0 -1
  561. package/dist/cura/p-c0ff425e.entry.js +0 -2
  562. package/dist/cura/p-c0ff425e.entry.js.map +0 -1
  563. package/dist/cura/p-c791725b.js.map +0 -1
  564. package/dist/cura/p-cb4e2a0c.system.entry.js +0 -2
  565. package/dist/cura/p-cb4e2a0c.system.entry.js.map +0 -1
  566. package/dist/cura/p-d3f9c888.system.js +0 -2
  567. package/dist/cura/p-d3f9c888.system.js.map +0 -1
  568. package/dist/cura/p-e5e259fd.system.entry.js +0 -2
  569. package/dist/cura/p-e5e259fd.system.entry.js.map +0 -1
  570. package/dist/cura/p-edeffbfc.entry.js +0 -2
  571. package/dist/cura/p-edeffbfc.entry.js.map +0 -1
  572. package/dist/cura/p-f51705c2.system.entry.js +0 -2
  573. package/dist/cura/p-f51705c2.system.entry.js.map +0 -1
  574. package/dist/cura/p-f89f2ecc.system.entry.js +0 -2
  575. package/dist/cura/p-f89f2ecc.system.entry.js.map +0 -1
  576. package/dist/cura/p-f8fffdc1.js.map +0 -1
  577. package/dist/cura/p-fc4ba4ce.system.js +0 -2
  578. package/dist/cura/p-fc4ba4ce.system.js.map +0 -1
  579. package/dist/cura/p-fef52079.entry.js +0 -2
  580. package/dist/cura/p-fef52079.entry.js.map +0 -1
  581. package/dist/cura/p-ffd41520.system.entry.js +0 -2
  582. package/dist/cura/p-ffd41520.system.entry.js.map +0 -1
  583. package/dist/esm/app-globals-29001758.js +0 -509
  584. package/dist/esm/app-globals-29001758.js.map +0 -1
  585. package/dist/esm/css-shim-d13f0738.js +0 -6
  586. package/dist/esm/css-shim-d13f0738.js.map +0 -1
  587. package/dist/esm/cura-accordion_8.entry.js +0 -434
  588. package/dist/esm/cura-accordion_8.entry.js.map +0 -1
  589. package/dist/esm/cura-button-transparent.entry.js +0 -79
  590. package/dist/esm/cura-button-transparent.entry.js.map +0 -1
  591. package/dist/esm/cura-forms.definitions-0f774253.js +0 -18
  592. package/dist/esm/cura-forms.definitions-0f774253.js.map +0 -1
  593. package/dist/esm/cura-icon.definitions-a63d1862.js +0 -18
  594. package/dist/esm/cura-icon.definitions-a63d1862.js.map +0 -1
  595. package/dist/esm/cura-input-text.entry.js.map +0 -1
  596. package/dist/esm/cura-label.entry.js +0 -65
  597. package/dist/esm/cura-label.entry.js.map +0 -1
  598. package/dist/esm/index-81f1a268.js +0 -2249
  599. package/dist/esm/index-81f1a268.js.map +0 -1
  600. package/dist/esm/polyfills/core-js.js +0 -11
  601. package/dist/esm/polyfills/css-shim.js +0 -1
  602. package/dist/esm/polyfills/dom.js +0 -79
  603. package/dist/esm/polyfills/es5-html-element.js +0 -1
  604. package/dist/esm/polyfills/index.js +0 -34
  605. package/dist/esm/polyfills/system.js +0 -6
  606. package/dist/esm/shadow-css-07b0c8c8.js +0 -389
  607. package/dist/esm/shadow-css-07b0c8c8.js.map +0 -1
  608. package/dist/esm-es5/app-globals-29001758.js +0 -2
  609. package/dist/esm-es5/app-globals-29001758.js.map +0 -1
  610. package/dist/esm-es5/css-shim-d13f0738.js +0 -2
  611. package/dist/esm-es5/css-shim-d13f0738.js.map +0 -1
  612. package/dist/esm-es5/cura-accordion_8.entry.js +0 -2
  613. package/dist/esm-es5/cura-accordion_8.entry.js.map +0 -1
  614. package/dist/esm-es5/cura-alert.entry.js +0 -2
  615. package/dist/esm-es5/cura-alert.entry.js.map +0 -1
  616. package/dist/esm-es5/cura-button-outline.entry.js +0 -2
  617. package/dist/esm-es5/cura-button-outline.entry.js.map +0 -1
  618. package/dist/esm-es5/cura-button-select.entry.js +0 -2
  619. package/dist/esm-es5/cura-button-select.entry.js.map +0 -1
  620. package/dist/esm-es5/cura-button-transparent.entry.js +0 -2
  621. package/dist/esm-es5/cura-button-transparent.entry.js.map +0 -1
  622. package/dist/esm-es5/cura-checkbox.entry.js +0 -2
  623. package/dist/esm-es5/cura-checkbox.entry.js.map +0 -1
  624. package/dist/esm-es5/cura-display.entry.js +0 -2
  625. package/dist/esm-es5/cura-display.entry.js.map +0 -1
  626. package/dist/esm-es5/cura-forms.definitions-0f774253.js +0 -2
  627. package/dist/esm-es5/cura-icon.definitions-a63d1862.js +0 -2
  628. package/dist/esm-es5/cura-icons-view.entry.js +0 -2
  629. package/dist/esm-es5/cura-icons-view.entry.js.map +0 -1
  630. package/dist/esm-es5/cura-input-text.entry.js +0 -2
  631. package/dist/esm-es5/cura-input-text.entry.js.map +0 -1
  632. package/dist/esm-es5/cura-label.entry.js +0 -2
  633. package/dist/esm-es5/cura-label.entry.js.map +0 -1
  634. package/dist/esm-es5/cura-radio.entry.js +0 -2
  635. package/dist/esm-es5/cura-radio.entry.js.map +0 -1
  636. package/dist/esm-es5/cura-switch.entry.js +0 -2
  637. package/dist/esm-es5/cura-switch.entry.js.map +0 -1
  638. package/dist/esm-es5/cura.js +0 -2
  639. package/dist/esm-es5/cura.js.map +0 -1
  640. package/dist/esm-es5/index-81f1a268.js +0 -3
  641. package/dist/esm-es5/index-81f1a268.js.map +0 -1
  642. package/dist/esm-es5/index.js +0 -2
  643. package/dist/esm-es5/index.js.map +0 -1
  644. package/dist/esm-es5/loader.js +0 -2
  645. package/dist/esm-es5/loader.js.map +0 -1
  646. package/dist/esm-es5/shadow-css-07b0c8c8.js +0 -13
  647. package/dist/esm-es5/shadow-css-07b0c8c8.js.map +0 -1
@@ -1,34 +1,34 @@
1
- import CuraThemeModule from './modules/cura-theme-module';
1
+ import CuraThemeModule from "./modules/cura-theme-module";
2
2
  export default class CuraAPI {
3
- constructor(config) {
4
- this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
5
- const themeModule = new CuraThemeModule();
6
- this.theme = {
7
- load: function (themeTag) { themeModule.load(themeTag); },
8
- setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
9
- colors: {
10
- getColor: function (colorWithDepth, opacity) { return themeModule.colors.getColor(colorWithDepth, opacity); },
11
- },
12
- fonts: {
13
- getFamily: function (type) { return themeModule.fonts.getFamily(type); },
14
- getWeights: function () { return themeModule.fonts.getWeights(); },
15
- getSize: function () { return themeModule.fonts.getSize(); },
16
- getColor: function () { return themeModule.fonts.getColor(); }
17
- },
18
- spacing: {
19
- getSpacing: function () { return themeModule.spacing.getSpacing(); },
20
- },
21
- breakpoints: {
22
- get: function (size, position) { return themeModule.breakpoints.get(size, position); }
23
- }
24
- };
25
- if (config && config.customTheme) {
26
- this.theme.setCustom(config.customTheme);
3
+ constructor(config) {
4
+ this.localAssetsPath = config && config.localAssetsPath ? config.localAssetsPath : `/assets`;
5
+ const themeModule = new CuraThemeModule();
6
+ this.theme = {
7
+ load: function (themeTag) { themeModule.load(themeTag); },
8
+ setCustom: function (customThemeDefinitions) { themeModule.setCustom(customThemeDefinitions); },
9
+ colors: {
10
+ getColor: function (colorWithDepth, opacity) { return themeModule.colors.getColor(colorWithDepth, opacity); },
11
+ },
12
+ fonts: {
13
+ getFamily: function (type) { return themeModule.fonts.getFamily(type); },
14
+ getWeights: function () { return themeModule.fonts.getWeights(); },
15
+ getSize: function () { return themeModule.fonts.getSize(); },
16
+ getColor: function () { return themeModule.fonts.getColor(); }
17
+ },
18
+ spacing: {
19
+ getSpacing: function () { return themeModule.spacing.getSpacing(); },
20
+ },
21
+ breakpoints: {
22
+ get: function (size, position) { return themeModule.breakpoints.get(size, position); }
23
+ }
24
+ };
25
+ if (config && config.customTheme) {
26
+ this.theme.setCustom(config.customTheme);
27
+ }
28
+ else {
29
+ const theme = config && config.theme ? config.theme : 'default';
30
+ this.theme.load(theme);
31
+ }
27
32
  }
28
- else {
29
- const theme = config && config.theme ? config.theme : 'default';
30
- this.theme.load(theme);
31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,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;OACpE;MACD,WAAW,EAAE;QACX,GAAG,EAAE,UAAS,IAAyD,EAAE,QAAwB,IAAI,OAAO,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;OAC3J;KACH,CAAC;IACD,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE;MAChC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;KAC1C;SAAM;MACL,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;MAChE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxB;EACH,CAAC;CAEF","sourcesContent":["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"]}
1
+ {"version":3,"file":"cura-api.js","sourceRoot":"","sources":["../../src/api/cura-api.ts"],"names":[],"mappings":"AACA,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,OAAO;IAK1B,YAAa,MAAmB;QAC9B,IAAI,CAAC,eAAe,GAAG,MAAM,IAAI,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC;QAC7F,MAAM,WAAW,GAAG,IAAI,eAAe,EAAE,CAAC;QAC1C,IAAI,CAAC,KAAK,GAAG;YACX,IAAI,EAAE,UAAS,QAAgB,IAAI,WAAW,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;YAChE,SAAS,EAAE,UAAS,sBAAuC,IAAI,WAAW,CAAC,SAAS,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;YAC/G,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAS,cAAuB,EAAE,OAAgB,IAAI,OAAO,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC,CAAA,CAAC,CAAC;aAC9H;YACD,KAAK,EAAE;gBACL,SAAS,EAAE,UAAS,IAAa,IAAI,OAAO,WAAW,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;gBAC/E,UAAU,EAAE,cAAa,OAAO,WAAW,CAAC,KAAK,CAAC,UAAU,EAAE,CAAA,CAAC,CAAC;gBAChE,OAAO,EAAE,cAAa,OAAO,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,CAAA,CAAC,CAAC;gBAC1D,QAAQ,EAAE,cAAa,OAAO,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAA,CAAC,CAAC;aAC7D;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,cAAa,OAAO,WAAW,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;aACpE;YACD,WAAW,EAAE;gBACX,GAAG,EAAE,UAAS,IAAyD,EAAE,QAAwB,IAAI,OAAO,WAAW,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;aAC3J;SACH,CAAC;QACD,IAAI,MAAM,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;YACjC,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAC3C,CAAC;aAAM,CAAC;YACN,MAAM,KAAK,GAAG,MAAM,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;YAChE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;CAEF","sourcesContent":["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"]}
@@ -1,7 +1,7 @@
1
1
  ;
2
2
  export var InterfaceModes;
3
3
  (function (InterfaceModes) {
4
- InterfaceModes["LIGHT"] = "light";
5
- InterfaceModes["DARK"] = "dark";
4
+ InterfaceModes["LIGHT"] = "light";
5
+ InterfaceModes["DARK"] = "dark";
6
6
  })(InterfaceModes || (InterfaceModes = {}));
7
7
  //# sourceMappingURL=cura-api.type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-api.type.js","sourceRoot":"","sources":["../../src/api/cura-api.type.ts"],"names":[],"mappings":"AA+CC,CAAC;AAEF,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;EACxB,iCAAe,CAAA;EACf,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB","sourcesContent":["export interface CuraCustomThemeColorDepth {\n base?: string,\n depth0?: string,\n depth20?: string,\n depth40?: string,\n depth80?: string,\n depth100?: string\n}\nexport interface CuraCustomThemeColors {\n primary?: CuraCustomThemeColorDepth,\n secondary?: CuraCustomThemeColorDepth,\n accent?: CuraCustomThemeColorDepth\n}\n\nexport interface CuraCustomThemeSpacing {\n base?: string;\n}\n\nexport interface CuraCustomThemeFontFamily {\n title?: string;\n body?: string;\n}\nexport interface CuraCustomThemeFontSize {\n base?: string;\n}\nexport interface CuraCustomThemeFont {\n family?: CuraCustomThemeFontFamily;\n size?: CuraCustomThemeFontSize;\n}\n\nexport interface CuraCustomThemeDefinitions {\n colors?: CuraCustomThemeColors,\n spacing?: CuraCustomThemeSpacing,\n font?: CuraCustomThemeFont\n}\n\nexport interface CuraCustomTheme {\n name: string;\n definitions: CuraCustomThemeDefinitions;\n fromPreset?: string;\n}\n\nexport interface CuraConfig {\n localAssetsPath?: string;\n theme?: string;\n customTheme?: CuraCustomTheme;\n onReady?(api? : any): any;\n};\n\nexport enum InterfaceModes {\n LIGHT = 'light',\n DARK = 'dark'\n}\n\nexport interface APIThemeFunctions {\n load(themeTag: string): unknown,\n setCustom(customThemeDefinitions: CuraCustomTheme): unknown,\n colors: {\n getColor(colorWithDepth?: string, opacity?: number): string,\n },\n fonts: {\n getFamily(type?: string): string,\n getWeights(): any,\n getSize(): string,\n getColor(): string\n },\n spacing: {\n getSpacing(): string,\n },\n breakpoints: {\n get(): any\n }\n}\n\n"]}
1
+ {"version":3,"file":"cura-api.type.js","sourceRoot":"","sources":["../../src/api/cura-api.type.ts"],"names":[],"mappings":"AA+CC,CAAC;AAEF,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB","sourcesContent":["export interface CuraCustomThemeColorDepth {\n base?: string,\n depth0?: string,\n depth20?: string,\n depth40?: string,\n depth80?: string,\n depth100?: string\n}\nexport interface CuraCustomThemeColors {\n primary?: CuraCustomThemeColorDepth,\n secondary?: CuraCustomThemeColorDepth,\n accent?: CuraCustomThemeColorDepth\n}\n\nexport interface CuraCustomThemeSpacing {\n base?: string;\n}\n\nexport interface CuraCustomThemeFontFamily {\n title?: string;\n body?: string;\n}\nexport interface CuraCustomThemeFontSize {\n base?: string;\n}\nexport interface CuraCustomThemeFont {\n family?: CuraCustomThemeFontFamily;\n size?: CuraCustomThemeFontSize;\n}\n\nexport interface CuraCustomThemeDefinitions {\n colors?: CuraCustomThemeColors,\n spacing?: CuraCustomThemeSpacing,\n font?: CuraCustomThemeFont\n}\n\nexport interface CuraCustomTheme {\n name: string;\n definitions: CuraCustomThemeDefinitions;\n fromPreset?: string;\n}\n\nexport interface CuraConfig {\n localAssetsPath?: string;\n theme?: string;\n customTheme?: CuraCustomTheme;\n onReady?(api? : any): any;\n};\n\nexport enum InterfaceModes {\n LIGHT = 'light',\n DARK = 'dark'\n}\n\nexport interface APIThemeFunctions {\n load(themeTag: string): unknown,\n setCustom(customThemeDefinitions: CuraCustomTheme): unknown,\n colors: {\n getColor(colorWithDepth?: string, opacity?: number): string,\n },\n fonts: {\n getFamily(type?: string): string,\n getWeights(): any,\n getSize(): string,\n getColor(): string\n },\n spacing: {\n getSpacing(): string,\n },\n breakpoints: {\n get(): any\n }\n}\n\n"]}
@@ -1,14 +1,14 @@
1
- import { Static } from '../theme-presets/static';
1
+ import { Static } from "../theme-presets/static";
2
2
  export default class CuraThemeBreakpointsModule {
3
- constructor() { }
4
- /** Returns the base spacing var defined in the theme */
5
- get(size = null, position = null) {
6
- if (size) {
7
- const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];
8
- if (breakpoint || breakpoint === 0)
9
- return breakpoint;
3
+ constructor() { }
4
+ /** Returns the base spacing var defined in the theme */
5
+ get(size = null, position = null) {
6
+ if (size) {
7
+ const breakpoint = position ? Static.breakpoints[size][position] : Static.breakpoints[size];
8
+ if (breakpoint || breakpoint === 0)
9
+ return breakpoint;
10
+ }
11
+ return Static.breakpoints;
10
12
  }
11
- return Static.breakpoints;
12
- }
13
13
  }
14
14
  //# sourceMappingURL=cura-theme-breakpoints-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-theme-breakpoints-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-breakpoints-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,0BAA0B;EAE7C,gBAAe,CAAC;EAEhB,wDAAwD;EACxD,GAAG,CAAC,OAA2D,IAAI,EAAE,WAA0B,IAAI;IACjG,IAAI,IAAI,EAAE;MACR,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;MAC5F,IAAI,UAAU,IAAI,UAAU,KAAK,CAAC;QAAE,OAAO,UAAU,CAAC;KACvD;IACD,OAAO,MAAM,CAAC,WAAW,CAAC;EAC5B,CAAC;CACF","sourcesContent":["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"]}
1
+ {"version":3,"file":"cura-theme-breakpoints-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-breakpoints-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,0BAA0B;IAE7C,gBAAe,CAAC;IAEhB,wDAAwD;IACxD,GAAG,CAAC,OAA2D,IAAI,EAAE,WAA0B,IAAI;QACjG,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAC5F,IAAI,UAAU,IAAI,UAAU,KAAK,CAAC;gBAAE,OAAO,UAAU,CAAC;QACxD,CAAC;QACD,OAAO,MAAM,CAAC,WAAW,CAAC;IAC5B,CAAC;CACF","sourcesContent":["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"]}
@@ -1,76 +1,76 @@
1
1
  import { Static } from "../theme-presets/static";
2
2
  export default class CuraThemeColorsModule {
3
- constructor() {
4
- this.NeutralDepthAlias = {
5
- 'purewhite': '0',
6
- 'white': '100',
7
- 'pale': '200',
8
- 'lighter': '300',
9
- 'light': '400',
10
- 'base': '500',
11
- 'medium': '600',
12
- 'dark': '700',
13
- 'darker': '800',
14
- 'black': '900',
15
- };
16
- this.ColorDepthAlias = {
17
- 'lighter': '100',
18
- 'light': '300',
19
- 'base': '500',
20
- 'dark': '700',
21
- 'darker': '900'
22
- };
23
- }
24
- /**
25
- * Get theme color.
26
- * @param colorWithDepth string Ex.: primary-light
27
- * @returns RGBA value.
28
- */
29
- getColor(colorWithDepth = "primary-base", opacity = 1) {
30
- const { color, depth } = this.splitColorDepth(colorWithDepth);
31
- const staticColor = this.getStatic(color, depth, opacity);
32
- if (staticColor)
33
- return staticColor;
34
- return this.getDynamic(color, depth, opacity);
35
- }
36
- /**
37
- * Internal: Look for static color by name and depth.
38
- * @param color Color name.
39
- * @param depth Depth number or alias.
40
- * @returns RGBA value.
41
- */
42
- getStatic(color, depth, opacity = 1) {
43
- var _a, _b, _c;
44
- const colorObj = Static.color[color];
45
- if (!colorObj)
46
- return null;
47
- const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];
48
- return ((_a = Static.color[color]) === null || _a === void 0 ? void 0 : _a[alias])
49
- ? `rgba(${(_b = Static.color[color]) === null || _b === void 0 ? void 0 : _b[alias]}, ${opacity})`
50
- : `rgba(${(_c = Static.color[color]) === null || _c === void 0 ? void 0 : _c[depth]}, ${opacity})`;
51
- }
52
- /**
53
- * Internal: Look for theme dynamic colors.
54
- * @param color Color name.
55
- * @param depth Color depth.
56
- * @returns RGBA value.
57
- */
58
- getDynamic(color, depth, opacity) {
59
- const themeVar = this.ColorDepthAlias[depth]
60
- ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`
61
- : `--cura-color-${color}-${depth}`;
62
- return getComputedStyle(document.documentElement).getPropertyValue(themeVar)
63
- ? `rgba(var(${themeVar}), ${opacity})`
64
- : `rgba(var(--cura-color-primary-500), ${opacity})`;
65
- }
66
- /**
67
- * Internal: Split color strings
68
- * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.
69
- * @returns Object { color: string, depth: string }.
70
- */
71
- splitColorDepth(colorWithDepth) {
72
- const [color, depth] = colorWithDepth.toLowerCase().split(/-(.*)/);
73
- return { color: color !== null && color !== void 0 ? color : "primary", depth: depth !== null && depth !== void 0 ? depth : "base" };
74
- }
3
+ constructor() {
4
+ this.NeutralDepthAlias = {
5
+ 'purewhite': '0',
6
+ 'white': '100',
7
+ 'pale': '200',
8
+ 'lighter': '300',
9
+ 'light': '400',
10
+ 'base': '500',
11
+ 'medium': '600',
12
+ 'dark': '700',
13
+ 'darker': '800',
14
+ 'black': '900',
15
+ };
16
+ this.ColorDepthAlias = {
17
+ 'lighter': '100',
18
+ 'light': '300',
19
+ 'base': '500',
20
+ 'dark': '700',
21
+ 'darker': '900'
22
+ };
23
+ }
24
+ /**
25
+ * Get theme color.
26
+ * @param colorWithDepth string Ex.: primary-light
27
+ * @returns RGBA value.
28
+ */
29
+ getColor(colorWithDepth = "primary-base", opacity = 1) {
30
+ const { color, depth } = this.splitColorDepth(colorWithDepth);
31
+ const staticColor = this.getStatic(color, depth, opacity);
32
+ if (staticColor)
33
+ return staticColor;
34
+ return this.getDynamic(color, depth, opacity);
35
+ }
36
+ /**
37
+ * Internal: Look for static color by name and depth.
38
+ * @param color Color name.
39
+ * @param depth Depth number or alias.
40
+ * @returns RGBA value.
41
+ */
42
+ getStatic(color, depth, opacity = 1) {
43
+ var _a, _b, _c;
44
+ const colorObj = Static.color[color];
45
+ if (!colorObj)
46
+ return null;
47
+ const alias = color === 'neutral' ? this.NeutralDepthAlias[depth] : this.ColorDepthAlias[depth];
48
+ return ((_a = Static.color[color]) === null || _a === void 0 ? void 0 : _a[alias])
49
+ ? `rgba(${(_b = Static.color[color]) === null || _b === void 0 ? void 0 : _b[alias]}, ${opacity})`
50
+ : `rgba(${(_c = Static.color[color]) === null || _c === void 0 ? void 0 : _c[depth]}, ${opacity})`;
51
+ }
52
+ /**
53
+ * Internal: Look for theme dynamic colors.
54
+ * @param color Color name.
55
+ * @param depth Color depth.
56
+ * @returns RGBA value.
57
+ */
58
+ getDynamic(color, depth, opacity) {
59
+ const themeVar = this.ColorDepthAlias[depth]
60
+ ? `--cura-color-${color}-${this.ColorDepthAlias[depth]}`
61
+ : `--cura-color-${color}-${depth}`;
62
+ return getComputedStyle(document.documentElement).getPropertyValue(themeVar)
63
+ ? `rgba(var(${themeVar}), ${opacity})`
64
+ : `rgba(var(--cura-color-primary-500), ${opacity})`;
65
+ }
66
+ /**
67
+ * Internal: Split color strings
68
+ * @param colorWithDepth Color string [color]-[depth]. Ex.: primary-dark.
69
+ * @returns Object { color: string, depth: string }.
70
+ */
71
+ splitColorDepth(colorWithDepth) {
72
+ const [color, depth] = colorWithDepth.toLowerCase().split(/-(.*)/);
73
+ return { color: color !== null && color !== void 0 ? color : "primary", depth: depth !== null && depth !== void 0 ? depth : "base" };
74
+ }
75
75
  }
76
76
  //# sourceMappingURL=cura-theme-colors-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-theme-colors-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-colors-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,qBAAqB;EAuBxC;IArBA,sBAAiB,GAAG;MAClB,WAAW,EAAE,GAAG;MAChB,OAAO,EAAE,KAAK;MACd,MAAM,EAAE,KAAK;MACb,SAAS,EAAE,KAA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AO,GAAG;MACrD,CAAC,CAAC,QAAQ,MAAA,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,0CAAG,KAAK,CAAC,KAAK,OAAO,GAAG,CAAC;EAC1D,CAAC;EAED;;;;;KAKG;EACH,UAAU,CAAC,KAAa,EAAE,KAAa,EAAE,OAAe;IACtD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;MAC1C,CAAC,CAAC,gBAAgB,KAAK,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;MACxD,CAAC,CAAC,gBAAgB,KAAK,IAAI,KAAK,EAAE,CAAC;IACrC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC;MAC1E,CAAC,CAAC,YAAY,QAAQ,MAAM,OAAO,GAAG;MACtC,CAAC,CAAC,uCAAuC,OAAO,GAAG,CAAC;EACxD,CAAC;EAED;;;;KAIG;EACK,eAAe,CAAC,cAAsB;IAC5C,MAAM,CAAE,KAAK,EAAE,KAAK,CAAE,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACrE,OAAO,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,MAAM,EAAE,CAAC;EAC/D,CAAC;CAEF","sourcesContent":["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"]}
1
+ {"version":3,"file":"cura-theme-colors-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-colors-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAuBxC;QArBA,sBAAiB,GAAG;YAClB,WAAW,EAAE,GAAG;YAChB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AAM,CAAC,KAAK,CAAC,KAAK,CAAC,0CAAG,KAAK,CAAC,KAAK,OAAO,GAAG;YACrD,CAAC,CAAC,QAAQ,MAAA,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,0CAAG,KAAK,CAAC,KAAK,OAAO,GAAG,CAAC;IAC1D,CAAC;IAED;;;;;OAKG;IACH,UAAU,CAAC,KAAa,EAAE,KAAa,EAAE,OAAe;QACtD,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;YAC1C,CAAC,CAAC,gBAAgB,KAAK,IAAI,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;YACxD,CAAC,CAAC,gBAAgB,KAAK,IAAI,KAAK,EAAE,CAAC;QACrC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,QAAQ,CAAC;YAC1E,CAAC,CAAC,YAAY,QAAQ,MAAM,OAAO,GAAG;YACtC,CAAC,CAAC,uCAAuC,OAAO,GAAG,CAAC;IACxD,CAAC;IAED;;;;OAIG;IACK,eAAe,CAAC,cAAsB;QAC5C,MAAM,CAAE,KAAK,EAAE,KAAK,CAAE,GAAG,cAAc,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;QACrE,OAAO,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,SAAS,EAAE,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,MAAM,EAAE,CAAC;IAC/D,CAAC;CAEF","sourcesContent":["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"]}
@@ -1,36 +1,36 @@
1
1
  import { ThemeDefault } from "../theme-presets/theme-default";
2
2
  export default class CuraThemeFontsModule {
3
- constructor() {
3
+ constructor() {
4
+ /**
5
+ * Get the CSS variable related to the font size base defined by the theme.
6
+ * @returns Related CSS variable as a string.
7
+ */
8
+ this.getSize = () => `var(--cura-font-size)`;
9
+ /**
10
+ * Get CSS variable related to the font color defined by the theme.
11
+ * @returns Related CSS variable as a string.
12
+ */
13
+ this.getColor = () => `var(--cura-font-color)`;
14
+ }
4
15
  /**
5
- * Get the CSS variable related to the font size base defined by the theme.
6
- * @returns Related CSS variable as a string.
16
+ * Get the CSS variable related to the font family defined by the theme.
17
+ * @param type 'body' | 'heading' | 'display'
18
+ * @returns Related css variable as a string.
7
19
  */
8
- this.getSize = () => `var(--cura-font-size)`;
20
+ getFamily(type = "body") {
21
+ const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;
22
+ return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)
23
+ ? `var(${curaFontFamilyCSSVar})`
24
+ : 'var(--cura-font-body)';
25
+ }
9
26
  /**
10
- * Get CSS variable related to the font color defined by the theme.
11
- * @returns Related CSS variable as a string.
27
+ * Get the CSS variables related to font weights defined by the theme.
28
+ * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.
12
29
  */
13
- this.getColor = () => `var(--cura-font-color)`;
14
- }
15
- /**
16
- * Get the CSS variable related to the font family defined by the theme.
17
- * @param type 'body' | 'heading' | 'display'
18
- * @returns Related css variable as a string.
19
- */
20
- getFamily(type = "body") {
21
- const curaFontFamilyCSSVar = `--cura-font-${type.toLowerCase()}`;
22
- return getComputedStyle(document.body).getPropertyValue(curaFontFamilyCSSVar)
23
- ? `var(${curaFontFamilyCSSVar})`
24
- : 'var(--cura-font-body)';
25
- }
26
- /**
27
- * Get the CSS variables related to font weights defined by the theme.
28
- * @returns Object with CSS vars weights definitions for thin, light, regular, medium, bold and black fonts.
29
- */
30
- getWeights() {
31
- const weights = {};
32
- Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);
33
- return weights;
34
- }
30
+ getWeights() {
31
+ const weights = {};
32
+ Object.keys(ThemeDefault.font.weights).forEach((key) => weights[key] = `var(--cura-font-weights-${key})`);
33
+ return weights;
34
+ }
35
35
  }
36
36
  //# sourceMappingURL=cura-theme-fonts-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-theme-fonts-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-fonts-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,oBAAoB;EAEvC;IAwBA;;;OAGG;IACH,YAAO,GAAG,GAAG,EAAE,CAAC,uBAAuB,CAAC;IAExC;;;OAGG;IACH,aAAQ,GAAG,GAAG,EAAE,CAAC,wBAAwB,CAAC;EAlC3B,CAAC;EAEhB;;;;KAIG;EACH,SAAS,CAAC,OAAe,MAAM;IAC7B,MAAM,oBAAoB,GAAG,eAAe,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;IACjE,OAAO,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,CAAC;MAC3E,CAAC,CAAC,OAAO,oBAAoB,GAAG;MAChC,CAAC,CAAC,uBAAuB,CAAC;EAC9B,CAAC;EAED;;;KAGG;EACH,UAAU;IACR,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,2BAA2B,GAAG,GAAG,CAAC,CAAC;IAC1G,OAAO,OAAO,CAAC;EACjB,CAAC;CAcF","sourcesContent":["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"]}
1
+ {"version":3,"file":"cura-theme-fonts-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-fonts-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,MAAM,CAAC,OAAO,OAAO,oBAAoB;IAEvC;QAwBA;;;WAGG;QACH,YAAO,GAAG,GAAG,EAAE,CAAC,uBAAuB,CAAC;QAExC;;;WAGG;QACH,aAAQ,GAAG,GAAG,EAAE,CAAC,wBAAwB,CAAC;IAlC3B,CAAC;IAEhB;;;;OAIG;IACH,SAAS,CAAC,OAAe,MAAM;QAC7B,MAAM,oBAAoB,GAAG,eAAe,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;QACjE,OAAO,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,oBAAoB,CAAC;YAC3E,CAAC,CAAC,OAAO,oBAAoB,GAAG;YAChC,CAAC,CAAC,uBAAuB,CAAC;IAC9B,CAAC;IAED;;;OAGG;IACH,UAAU;QACR,MAAM,OAAO,GAAG,EAAE,CAAC;QACnB,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,2BAA2B,GAAG,GAAG,CAAC,CAAC;QAC1G,OAAO,OAAO,CAAC;IACjB,CAAC;CAcF","sourcesContent":["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"]}
@@ -4,75 +4,75 @@ import CuraThemeSpacingModule from "./cura-theme-spacing-module";
4
4
  import CuraThemeFontsModule from "./cura-theme-fonts-module";
5
5
  import CuraThemeBreakpointsModule from "./cura-theme-breakpoints-module";
6
6
  export default class CuraThemeModule {
7
- constructor() {
8
- this.prefix = '--cura';
9
- this.colors = new CuraThemeColorsModule();
10
- this.spacing = new CuraThemeSpacingModule();
11
- this.fonts = new CuraThemeFontsModule();
12
- this.breakpoints = new CuraThemeBreakpointsModule();
13
- /* Private */
14
- /** Set css var based on object structure */
15
- this.setCssVar = (prop, path) => {
16
- const varName = this.groupPath(path, prop[0]);
17
- this.rootElement.style.setProperty(varName, prop[1]);
18
- };
19
- this.groupPath = (a, b) => `${a}-${b}`;
20
- this.isObject = (val) => {
21
- return val && typeof val === 'object' && !Array.isArray(val);
22
- };
23
- /** Deep merge objects */
24
- this.mergeObject = (from, to) => {
25
- const entries = Object.entries(from);
26
- for (let e of entries) {
27
- if (this.isObject(e[1])) {
28
- this.mergeObject(e[1], to[e[0]]);
29
- }
30
- else {
31
- to[e[0]] = e[1];
32
- }
33
- }
34
- };
35
- /** Set css vars from preset object */
36
- this.buildCssVars = (path, obj) => {
37
- const entries = Object.entries(obj);
38
- for (let e of entries) {
39
- if (this.isObject(e[1])) {
40
- this.buildCssVars(this.groupPath(path, e[0]), e[1]);
7
+ constructor() {
8
+ this.prefix = '--cura';
9
+ this.colors = new CuraThemeColorsModule();
10
+ this.spacing = new CuraThemeSpacingModule();
11
+ this.fonts = new CuraThemeFontsModule();
12
+ this.breakpoints = new CuraThemeBreakpointsModule();
13
+ /* Private */
14
+ /** Set css var based on object structure */
15
+ this.setCssVar = (prop, path) => {
16
+ const varName = this.groupPath(path, prop[0]);
17
+ this.rootElement.style.setProperty(varName, prop[1]);
18
+ };
19
+ this.groupPath = (a, b) => `${a}-${b}`;
20
+ this.isObject = (val) => {
21
+ return val && typeof val === 'object' && !Array.isArray(val);
22
+ };
23
+ /** Deep merge objects */
24
+ this.mergeObject = (from, to) => {
25
+ const entries = Object.entries(from);
26
+ for (let e of entries) {
27
+ if (this.isObject(e[1])) {
28
+ this.mergeObject(e[1], to[e[0]]);
29
+ }
30
+ else {
31
+ to[e[0]] = e[1];
32
+ }
33
+ }
34
+ };
35
+ /** Set css vars from preset object */
36
+ this.buildCssVars = (path, obj) => {
37
+ const entries = Object.entries(obj);
38
+ for (let e of entries) {
39
+ if (this.isObject(e[1])) {
40
+ this.buildCssVars(this.groupPath(path, e[0]), e[1]);
41
+ }
42
+ else {
43
+ this.setCssVar(e, path);
44
+ }
45
+ }
46
+ };
47
+ this.rootElement = window.document.documentElement;
48
+ }
49
+ /**
50
+ * Load a theme.
51
+ * @param theme Theme tag.
52
+ */
53
+ load(theme = 'default') {
54
+ const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
55
+ this.buildCssVars(this.prefix, preset);
56
+ }
57
+ /**
58
+ * Define a custom theme
59
+ * @param customTheme Custom theme object definition
60
+ */
61
+ setCustom(customTheme) {
62
+ const customTag = customTheme.name;
63
+ if (customTag in ThemePresets) {
64
+ console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);
65
+ this.load('default');
41
66
  }
42
67
  else {
43
- this.setCssVar(e, path);
68
+ const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets
69
+ ? ThemePresets[customTheme.fromPreset]
70
+ : ThemePresets.default;
71
+ const newTheme = Object.assign({}, JSON.parse(JSON.stringify(preset)));
72
+ this.mergeObject(customTheme.definitions, newTheme);
73
+ ThemePresets[customTag] = newTheme;
74
+ this.load(customTag);
44
75
  }
45
- }
46
- };
47
- this.rootElement = window.document.documentElement;
48
- }
49
- /**
50
- * Load a theme.
51
- * @param theme Theme tag.
52
- */
53
- load(theme = 'default') {
54
- const preset = ThemePresets[theme] ? ThemePresets[theme] : ThemePresets.default;
55
- this.buildCssVars(this.prefix, preset);
56
- }
57
- /**
58
- * Define a custom theme
59
- * @param customTheme Custom theme object definition
60
- */
61
- setCustom(customTheme) {
62
- const customTag = customTheme.name;
63
- if (customTag in ThemePresets) {
64
- console.log('Error building custom theme. Theme %s already exists. Loading default theme.', customTag);
65
- this.load('default');
66
- }
67
- else {
68
- const preset = customTheme.fromPreset && customTheme.fromPreset in ThemePresets
69
- ? ThemePresets[customTheme.fromPreset]
70
- : ThemePresets.default;
71
- const newTheme = Object.assign({}, JSON.parse(JSON.stringify(preset)));
72
- this.mergeObject(customTheme.definitions, newTheme);
73
- ThemePresets[customTag] = newTheme;
74
- this.load(customTag);
75
76
  }
76
- }
77
77
  }
78
78
  //# sourceMappingURL=cura-theme-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-theme-module.js","sourceRoot":"","sources":["../../../src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AI,CAAC;IACnC,IAAI,SAAS,IAAI,YAAY,EAAE;MAC7B,OAAO,CAAC,GAAG,CAAC,8EAA8E,EAAE,SAAS,CAAC,CAAC;MACvG,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACtB;SAAM;MACL,MAAM,MAAM,GAAG,WAAW,CAAC,UAAU,IAAI,WAAW,CAAC,UAAU,IAAI,YAAY;QAC7E,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC;QACtC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC;MACzB,MAAM,QAAQ,qBAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;MACzD,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;MACpD,YAAY,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;MACnC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KACtB;EACH,CAAC;CAuCF","sourcesContent":["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"]}
1
+ {"version":3,"file":"cura-theme-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAE9D,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,oBAAoB,MAAM,2BAA2B,CAAC;AAC7D,OAAO,0BAA0B,MAAM,iCAAiC,CAAC;AAEzE,MAAM,CAAC,OAAO,OAAO,eAAe;IASlC;QANA,WAAM,GAAG,QAAQ,CAAC;QAClB,WAAM,GAAG,IAAI,qBAAqB,EAAE,CAAC;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C,YAAY,CAAC,WAAW,CAAC,UAAU,CAAC;gBACtC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC;YACzB,MAAM,QAAQ,qBAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;YACpD,YAAY,CAAC,SAAS,CAAC,GAAG,QAAQ,CAAC;YACnC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;CAuCF","sourcesContent":["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"]}
@@ -1,13 +1,13 @@
1
1
  export default class CuraThemeSpacingModule {
2
- constructor() {
3
- this.curaSpacing = '--cura-spacing-base';
4
- }
5
- /** Returns the base spacing var defined in the theme */
6
- getSpacing() {
7
- if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {
8
- return `var(${this.curaSpacing})`;
2
+ constructor() {
3
+ this.curaSpacing = '--cura-spacing-base';
4
+ }
5
+ /** Returns the base spacing var defined in the theme */
6
+ getSpacing() {
7
+ if (getComputedStyle(document.body).getPropertyValue(this.curaSpacing)) {
8
+ return `var(${this.curaSpacing})`;
9
+ }
10
+ return '4';
9
11
  }
10
- return '4';
11
- }
12
12
  }
13
13
  //# sourceMappingURL=cura-theme-spacing-module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cura-theme-spacing-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-spacing-module.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,sBAAsB;EAIzC;IAFQ,gBAAW,GAAG,qBAAqB,CAAC;EAE7B,CAAC;EAEhB,wDAAwD;EACxD,UAAU;IACR,IAAI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;MACtE,OAAO,OAAO,IAAI,CAAC,WAAW,GAAG,CAAC;KACnC;IACD,OAAO,GAAG,CAAC;EACb,CAAC;CACF","sourcesContent":["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"]}
1
+ {"version":3,"file":"cura-theme-spacing-module.js","sourceRoot":"","sources":["../../../src/api/modules/cura-theme-spacing-module.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAIzC;QAFQ,gBAAW,GAAG,qBAAqB,CAAC;IAE7B,CAAC;IAEhB,wDAAwD;IACxD,UAAU;QACR,IAAI,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC;YACvE,OAAO,OAAO,IAAI,CAAC,WAAW,GAAG,CAAC;QACpC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF","sourcesContent":["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"]}