@rededor/cura 1.1.0 → 1.2.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (238) hide show
  1. package/dist/assets/assets/cura-assets.zip +0 -0
  2. package/dist/cjs/app-globals-4d07f363.js.map +1 -1
  3. package/dist/cjs/cura-accordion_12.cjs.entry.js +21 -15
  4. package/dist/cjs/cura-accordion_12.cjs.entry.js.map +1 -1
  5. package/dist/cjs/cura-alert.cjs.entry.js +2 -2
  6. package/dist/cjs/cura-avatar.cjs.entry.js +2 -2
  7. package/dist/cjs/cura-badge-distance.cjs.entry.js +1 -1
  8. package/dist/cjs/cura-badge-number.cjs.entry.js +29 -0
  9. package/dist/cjs/cura-badge-number.cjs.entry.js.map +1 -0
  10. package/dist/cjs/cura-button-outline.cjs.entry.js +2 -2
  11. package/dist/cjs/cura-button-select.cjs.entry.js +69 -58
  12. package/dist/cjs/cura-button-select.cjs.entry.js.map +1 -1
  13. package/dist/cjs/cura-button-transparent.cjs.entry.js +2 -2
  14. package/dist/cjs/cura-calendar.cjs.entry.js +120 -234
  15. package/dist/cjs/cura-calendar.cjs.entry.js.map +1 -1
  16. package/dist/cjs/cura-card.cjs.entry.js +2 -2
  17. package/dist/cjs/cura-checkbox.cjs.entry.js +2 -2
  18. package/dist/cjs/cura-display.cjs.entry.js +2 -2
  19. package/dist/cjs/cura-dropdown-search-option-title.cjs.entry.js +2 -2
  20. package/dist/cjs/cura-dropdown-search-option.cjs.entry.js +3 -3
  21. package/dist/cjs/cura-dropdown-search.cjs.entry.js +30 -4
  22. package/dist/cjs/cura-dropdown-search.cjs.entry.js.map +1 -1
  23. package/dist/cjs/cura-icons-view.cjs.entry.js +4 -4
  24. package/dist/cjs/cura-input-date.cjs.entry.js +188 -0
  25. package/dist/cjs/cura-input-date.cjs.entry.js.map +1 -0
  26. package/dist/cjs/cura-loader-bar.cjs.entry.js +2 -2
  27. package/dist/cjs/cura-radio.cjs.entry.js +2 -2
  28. package/dist/cjs/cura-switch.cjs.entry.js +2 -2
  29. package/dist/cjs/cura-toast.cjs.entry.js +2 -2
  30. package/dist/cjs/cura.cjs.js +2 -2
  31. package/dist/cjs/index-6dc29195.js +126 -0
  32. package/dist/cjs/index-6dc29195.js.map +1 -0
  33. package/dist/cjs/{index-98e7ba54.js → index-e6d728ec.js} +70 -3
  34. package/dist/{esm/index-1ad98520.js.map → cjs/index-e6d728ec.js.map} +1 -1
  35. package/dist/cjs/loader.cjs.js +2 -2
  36. package/dist/collection/collection-manifest.json +2 -0
  37. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.css +30 -0
  38. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js +66 -0
  39. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.js.map +1 -0
  40. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js +56 -0
  41. package/dist/collection/components/badges/cura-badge-number/cura-badge-number.stories.js.map +1 -0
  42. package/dist/collection/components/buttons/cura-button/cura-button.js +1 -1
  43. package/dist/collection/components/buttons/cura-button-outline/cura-button-outline.js +1 -1
  44. package/dist/collection/components/buttons/cura-button-select/cura-button-select.css +49 -21
  45. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js +110 -113
  46. package/dist/collection/components/buttons/cura-button-select/cura-button-select.js.map +1 -1
  47. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js +133 -0
  48. package/dist/collection/components/buttons/cura-button-select/cura-button-select.stories.js.map +1 -0
  49. package/dist/collection/components/buttons/cura-button-transparent/cura-button-transparent.js +1 -1
  50. package/dist/collection/components/cura-alert/cura-alert.js +1 -1
  51. package/dist/collection/components/cura-avatar/cura-avatar.js +1 -1
  52. package/dist/collection/components/cura-calendar/cura-calendar.css +2 -0
  53. package/dist/collection/components/cura-calendar/cura-calendar.js +79 -47
  54. package/dist/collection/components/cura-calendar/cura-calendar.js.map +1 -1
  55. package/dist/collection/components/cura-card/cura-card.js +1 -1
  56. package/dist/collection/components/cura-icon/cura-icon.js +1 -1
  57. package/dist/collection/components/cura-icons-view/cura-icons-view.js +3 -3
  58. package/dist/collection/components/cura-page-template/cura-page-template.js +1 -1
  59. package/dist/collection/components/cura-toast/cura-toast.js +1 -1
  60. package/dist/collection/components/forms/cura-checkbox/cura-checkbox.js +1 -1
  61. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option/cura-dropdown-search-option.js +2 -2
  62. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search-option-title/cura-dropdown-search-option-title.js +1 -1
  63. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.css +1 -1
  64. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js +28 -2
  65. package/dist/collection/components/forms/cura-dropdown-search/cura-dropdown-search.js.map +1 -1
  66. package/dist/collection/components/forms/cura-input-date/cura-input-date.css +79 -0
  67. package/dist/collection/components/forms/cura-input-date/cura-input-date.js +424 -0
  68. package/dist/collection/components/forms/cura-input-date/cura-input-date.js.map +1 -0
  69. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js +138 -0
  70. package/dist/collection/components/forms/cura-input-date/cura-input-date.stories.js.map +1 -0
  71. package/dist/collection/components/forms/cura-input-text/cura-input-text.css +5 -2
  72. package/dist/collection/components/forms/cura-input-text/cura-input-text.js +41 -2
  73. package/dist/collection/components/forms/cura-input-text/cura-input-text.js.map +1 -1
  74. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js +73 -21
  75. package/dist/collection/components/forms/cura-input-text/cura-input-text.stories.js.map +1 -1
  76. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js +3 -0
  77. package/dist/collection/components/forms/cura-input-text/mask-presets/input-mask-presets.js.map +1 -1
  78. package/dist/collection/components/forms/cura-label/cura-label.js +1 -1
  79. package/dist/collection/components/forms/cura-radio/cura-radio.js +1 -1
  80. package/dist/collection/components/forms/cura-select/cura-select.css +5 -2
  81. package/dist/collection/components/forms/cura-select/cura-select.js +3 -3
  82. package/dist/collection/components/forms/cura-select-options/cura-select-option.js +1 -1
  83. package/dist/collection/components/forms/cura-switch/cura-switch.js +1 -1
  84. package/dist/collection/components/loaders/cura-loader-bar/cura-loader-bar.js +1 -1
  85. package/dist/collection/components/loaders/cura-loader-circle/cura-loader-circle.js +1 -1
  86. package/dist/collection/components/text/cura-display/cura-display.js +1 -1
  87. package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
  88. package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
  89. package/dist/components/cura-alert.js +1 -1
  90. package/dist/components/cura-avatar.js +1 -1
  91. package/dist/components/cura-badge-number.d.ts +11 -0
  92. package/dist/components/cura-badge-number.js +8 -0
  93. package/dist/components/cura-badge-number.js.map +1 -0
  94. package/dist/components/cura-badge-number2.js +49 -0
  95. package/dist/components/cura-badge-number2.js.map +1 -0
  96. package/dist/components/cura-button-outline.js +1 -1
  97. package/dist/components/cura-button-select.js +81 -65
  98. package/dist/components/cura-button-select.js.map +1 -1
  99. package/dist/components/cura-button-transparent2.js +1 -1
  100. package/dist/components/cura-button.js +1 -1
  101. package/dist/components/cura-calendar.js +1 -4073
  102. package/dist/components/cura-calendar.js.map +1 -1
  103. package/dist/components/cura-calendar2.js +4082 -0
  104. package/dist/components/cura-calendar2.js.map +1 -0
  105. package/dist/components/cura-card.js +1 -1
  106. package/dist/components/cura-checkbox.js +1 -1
  107. package/dist/components/cura-display.js +1 -1
  108. package/dist/components/cura-dropdown-search-option-title.js +1 -1
  109. package/dist/components/cura-dropdown-search-option.js +2 -2
  110. package/dist/components/cura-dropdown-search.js +29 -3
  111. package/dist/components/cura-dropdown-search.js.map +1 -1
  112. package/dist/components/cura-heading2.js +1 -1
  113. package/dist/components/cura-icon2.js +1 -1
  114. package/dist/components/cura-icons-view.js +3 -3
  115. package/dist/components/cura-input-date.d.ts +11 -0
  116. package/dist/components/cura-input-date.js +270 -0
  117. package/dist/components/cura-input-date.js.map +1 -0
  118. package/dist/components/cura-input-text2.js +10 -2
  119. package/dist/components/cura-input-text2.js.map +1 -1
  120. package/dist/components/cura-label2.js +1 -1
  121. package/dist/components/cura-loader-bar2.js +1 -1
  122. package/dist/components/cura-loader-circle2.js +1 -1
  123. package/dist/components/cura-page-template.js +1 -1
  124. package/dist/components/cura-paragraph2.js +1 -1
  125. package/dist/components/cura-radio.js +1 -1
  126. package/dist/components/cura-select-option2.js +1 -1
  127. package/dist/components/cura-select2.js +4 -4
  128. package/dist/components/cura-select2.js.map +1 -1
  129. package/dist/components/cura-switch.js +1 -1
  130. package/dist/components/cura-toast.js +1 -1
  131. package/dist/components/index.js +4 -0
  132. package/dist/components/index.js.map +1 -1
  133. package/dist/cura/cura.esm.js +1 -1
  134. package/dist/cura/cura.esm.js.map +1 -1
  135. package/dist/cura/p-0b7a7306.js.map +1 -1
  136. package/dist/cura/{p-0d435e42.entry.js → p-116a1cd6.entry.js} +2 -2
  137. package/dist/cura/p-272c784a.js +2 -0
  138. package/dist/cura/p-272c784a.js.map +1 -0
  139. package/dist/cura/{p-4c7a2419.entry.js → p-2d267d23.entry.js} +2 -2
  140. package/dist/cura/{p-9b658260.entry.js → p-33772510.entry.js} +2 -2
  141. package/dist/cura/{p-afd2c148.entry.js → p-41c3d47d.entry.js} +2 -2
  142. package/dist/cura/{p-fbf20e5a.entry.js → p-44e3325a.entry.js} +2 -2
  143. package/dist/cura/p-4e14c01c.entry.js +2 -0
  144. package/dist/cura/p-563ba0cd.entry.js +2 -0
  145. package/dist/cura/p-563ba0cd.entry.js.map +1 -0
  146. package/dist/cura/{p-57b8b468.entry.js → p-8f3db0fe.entry.js} +2 -2
  147. package/dist/cura/{p-a00d2c68.entry.js → p-907b3d12.entry.js} +2 -2
  148. package/dist/cura/p-a2ae6bd2.entry.js +2 -0
  149. package/dist/cura/p-a2ae6bd2.entry.js.map +1 -0
  150. package/dist/cura/{p-6682619b.entry.js → p-b2d5db22.entry.js} +2 -2
  151. package/dist/cura/p-b43b69f3.entry.js +2 -0
  152. package/dist/cura/p-b43b69f3.entry.js.map +1 -0
  153. package/dist/cura/{p-5ac9d510.entry.js → p-be10b681.entry.js} +2 -2
  154. package/dist/cura/p-be10b681.entry.js.map +1 -0
  155. package/dist/cura/{p-a5cf0fd6.entry.js → p-c6508bd7.entry.js} +2 -2
  156. package/dist/cura/{p-2203e829.entry.js → p-dcd2e5bb.entry.js} +2 -2
  157. package/dist/cura/{p-84d8c67d.entry.js → p-e5023e34.entry.js} +2 -2
  158. package/dist/cura/p-e8bc6381.entry.js +2 -0
  159. package/dist/cura/p-e8bc6381.entry.js.map +1 -0
  160. package/dist/cura/p-ed97cf3c.entry.js +2 -0
  161. package/dist/cura/p-ed97cf3c.entry.js.map +1 -0
  162. package/dist/cura/{p-ad8a7e0f.entry.js → p-fcbf4311.entry.js} +2 -2
  163. package/dist/cura/{p-66c5cf5f.entry.js → p-fd083399.entry.js} +2 -2
  164. package/dist/cura/p-fd5ed6b0.js +3 -0
  165. package/dist/cura/p-fd5ed6b0.js.map +1 -0
  166. package/dist/cura/{p-f9433d24.entry.js → p-fdce91a7.entry.js} +2 -2
  167. package/dist/esm/app-globals-6ca7103d.js.map +1 -1
  168. package/dist/esm/cura-accordion_12.entry.js +21 -15
  169. package/dist/esm/cura-accordion_12.entry.js.map +1 -1
  170. package/dist/esm/cura-alert.entry.js +2 -2
  171. package/dist/esm/cura-avatar.entry.js +2 -2
  172. package/dist/esm/cura-badge-distance.entry.js +1 -1
  173. package/dist/esm/cura-badge-number.entry.js +25 -0
  174. package/dist/esm/cura-badge-number.entry.js.map +1 -0
  175. package/dist/esm/cura-button-outline.entry.js +2 -2
  176. package/dist/esm/cura-button-select.entry.js +69 -58
  177. package/dist/esm/cura-button-select.entry.js.map +1 -1
  178. package/dist/esm/cura-button-transparent.entry.js +2 -2
  179. package/dist/esm/cura-calendar.entry.js +51 -165
  180. package/dist/esm/cura-calendar.entry.js.map +1 -1
  181. package/dist/esm/cura-card.entry.js +2 -2
  182. package/dist/esm/cura-checkbox.entry.js +2 -2
  183. package/dist/esm/cura-display.entry.js +2 -2
  184. package/dist/esm/cura-dropdown-search-option-title.entry.js +2 -2
  185. package/dist/esm/cura-dropdown-search-option.entry.js +3 -3
  186. package/dist/esm/cura-dropdown-search.entry.js +30 -4
  187. package/dist/esm/cura-dropdown-search.entry.js.map +1 -1
  188. package/dist/esm/cura-icons-view.entry.js +4 -4
  189. package/dist/esm/cura-input-date.entry.js +184 -0
  190. package/dist/esm/cura-input-date.entry.js.map +1 -0
  191. package/dist/esm/cura-loader-bar.entry.js +2 -2
  192. package/dist/esm/cura-radio.entry.js +2 -2
  193. package/dist/esm/cura-switch.entry.js +2 -2
  194. package/dist/esm/cura-toast.entry.js +2 -2
  195. package/dist/esm/cura.js +3 -3
  196. package/dist/esm/{index-1ad98520.js → index-747aad85.js} +70 -3
  197. package/dist/esm/index-747aad85.js.map +1 -0
  198. package/dist/esm/index-fbee309a.js +120 -0
  199. package/dist/esm/index-fbee309a.js.map +1 -0
  200. package/dist/esm/loader.js +3 -3
  201. package/dist/types/components/badges/cura-badge-number/cura-badge-number.d.ts +8 -0
  202. package/dist/types/components/badges/cura-badge-number/cura-badge-number.stories.d.ts +39 -0
  203. package/dist/types/components/buttons/cura-button-select/cura-button-select.d.ts +12 -34
  204. package/dist/types/components/buttons/cura-button-select/cura-button-select.stories.d.ts +105 -0
  205. package/dist/types/components/cura-calendar/cura-calendar.d.ts +50 -42
  206. package/dist/types/components/forms/cura-dropdown-search/cura-dropdown-search.d.ts +2 -0
  207. package/dist/types/components/forms/cura-input-date/cura-input-date.d.ts +92 -0
  208. package/dist/types/components/forms/cura-input-date/cura-input-date.stories.d.ts +125 -0
  209. package/dist/types/components/forms/cura-input-text/cura-input-text.d.ts +6 -0
  210. package/dist/types/components/forms/cura-input-text/cura-input-text.stories.d.ts +15 -0
  211. package/dist/types/components.d.ts +158 -48
  212. package/package.json +2 -2
  213. package/dist/cjs/index-98e7ba54.js.map +0 -1
  214. package/dist/cura/p-312791fb.js +0 -3
  215. package/dist/cura/p-312791fb.js.map +0 -1
  216. package/dist/cura/p-42dfa3a7.entry.js +0 -2
  217. package/dist/cura/p-42dfa3a7.entry.js.map +0 -1
  218. package/dist/cura/p-5ac9d510.entry.js.map +0 -1
  219. package/dist/cura/p-a9cda3b1.entry.js +0 -2
  220. package/dist/cura/p-a9cda3b1.entry.js.map +0 -1
  221. package/dist/cura/p-df5c3a86.entry.js +0 -2
  222. package/dist/cura/p-df5c3a86.entry.js.map +0 -1
  223. package/dist/cura/p-dfc65f66.entry.js +0 -2
  224. /package/dist/cura/{p-0d435e42.entry.js.map → p-116a1cd6.entry.js.map} +0 -0
  225. /package/dist/cura/{p-4c7a2419.entry.js.map → p-2d267d23.entry.js.map} +0 -0
  226. /package/dist/cura/{p-9b658260.entry.js.map → p-33772510.entry.js.map} +0 -0
  227. /package/dist/cura/{p-afd2c148.entry.js.map → p-41c3d47d.entry.js.map} +0 -0
  228. /package/dist/cura/{p-fbf20e5a.entry.js.map → p-44e3325a.entry.js.map} +0 -0
  229. /package/dist/cura/{p-dfc65f66.entry.js.map → p-4e14c01c.entry.js.map} +0 -0
  230. /package/dist/cura/{p-57b8b468.entry.js.map → p-8f3db0fe.entry.js.map} +0 -0
  231. /package/dist/cura/{p-a00d2c68.entry.js.map → p-907b3d12.entry.js.map} +0 -0
  232. /package/dist/cura/{p-6682619b.entry.js.map → p-b2d5db22.entry.js.map} +0 -0
  233. /package/dist/cura/{p-a5cf0fd6.entry.js.map → p-c6508bd7.entry.js.map} +0 -0
  234. /package/dist/cura/{p-2203e829.entry.js.map → p-dcd2e5bb.entry.js.map} +0 -0
  235. /package/dist/cura/{p-84d8c67d.entry.js.map → p-e5023e34.entry.js.map} +0 -0
  236. /package/dist/cura/{p-ad8a7e0f.entry.js.map → p-fcbf4311.entry.js.map} +0 -0
  237. /package/dist/cura/{p-66c5cf5f.entry.js.map → p-fd083399.entry.js.map} +0 -0
  238. /package/dist/cura/{p-f9433d24.entry.js.map → p-fdce91a7.entry.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{r as t,c as e,h as s,H as i}from"./p-312791fb.js";const a=':host{--border-radius:4px;display:inline-block;vertical-align:middle;position:relative}:host button,:host a{outline:none;box-shadow:none;box-sizing:border-box;display:flex;width:100%;align-items:center;justify-content:center;text-decoration:none !important;font-size:var(--font-size);cursor:pointer;transition:background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;border-radius:var(--border-radius);position:relative;background-color:var(--neutral-purewhite);box-sizing:border-box;border:2px solid var(--primary-base)}:host button:focus,:host a:focus{outline:2px solid #6EA8FF}:host button:not(.disabled):hover,:host a:not(.disabled):hover{background-color:var(--color-lighter);border-color:var(--color-base)}:host button:focus,:host a:focus{border-color:var(--info-base) !important}:host button.large,:host a.large{padding:calc(var(--base-spacing) * 3px) calc(var(--base-spacing) * 4px);min-height:calc(var(--base-spacing) * 11px)}:host button.medium,:host a.medium{padding:calc(var(--base-spacing) * 3px);min-height:calc(var(--base-spacing) * 10px)}:host button.small,:host a.small{padding:calc(var(--base-spacing) * 2px);min-height:calc(var(--base-spacing) * 8px)}:host button cura-label,:host a cura-label{flex:1;text-align:var(--text-align, "left")}:host button .button-container,:host a .button-container{display:flex;align-items:center;opacity:1;transition:opacity 0.2s linear;position:relative;gap:5px}:host button.icon-right .button-container,:host a.icon-right .button-container{flex-direction:row-reverse}:host button.justify .button-container,:host a.justify .button-container{width:100%}:host button.selected,:host a.selected{cursor:pointer;background-color:var(--color-base);border-color:var(--color-darker)}:host button.disabled,:host a.disabled{cursor:not-allowed;background-color:var(--neutral-white-primary-darker);border-color:var(--neutral-medium-primary-base)}';const o=a;const r=class{constructor(s){t(this,s);this.onclick=e(this,"onclick",7);this.theme=window.CuraAPI.theme;this.size="medium";this.disabled=false;this.selected=false;this.iconPosition="right";this.color="accent";this.background="light";this.fontcolor="dark";this.hovered=false;this.styles={}}setColors(){const t=[{name:"--color-base",theme:`${this.color}-base`},{name:"--color-darker",theme:`${this.color}-darker`},{name:"--color-lighter",theme:`${this.color}-lighter`},{name:"--neutral-purewhite-black",theme:this.fontcolor==="light"?"neutral-purewhite":"neutral-black"},{name:"--neutral-white-primary-darker",theme:this.background==="light"?"neutral-white":"primary-darker"},{name:"--neutral-medium-primary-base",theme:this.background==="light"?"neutral-medium":"primary-base"}];t.forEach((t=>{this.styles=Object.assign(Object.assign({},this.styles),{[t.name]:this.theme.colors.getColor(t.theme)})}))}setStyles(){this.weights=this.theme.fonts.getWeights();this.styles["--base-spacing"]=this.theme.spacing.getSpacing();this.styles["--font-size"]=this.theme.fonts.getSize();this.styles["--font-family"]=this.theme.fonts.getFamily();this.styles["--font-weight-medium"]=this.weights.medium;this.styles["--neutral-purewhite"]=this.theme.colors.getColor("neutral-purewhite");this.styles["--neutral-black"]=this.theme.colors.getColor("neutral-black");this.styles["--primary-base"]=this.theme.colors.getColor("primary-base");this.styles["--info-base"]=this.theme.colors.getColor("info-base")}connectedCallback(){this.setStyles();this.setColors()}handleMouseEnter(){if(this.disabled)return;this.hovered=true}handleMouseLeave(){this.hovered=false}assignColor(){if(!this.selected)return"primary-base";const t=this.disabled?this.background==="light"?"neutral-medium":"primary-base":this.selected&&this.fontcolor==="dark"?"neutral-black":"neutral-purewhite";return t}getIcon(){if(!this.selected)return;const t=this.size==="small"?16:this.size==="medium"?20:24;const e=this.hovered?"closeCircle":"checkCircle";return s("cura-icon",{class:"button-icon",name:e,size:t,color:this.assignColor()})}handleClick(t){if(this.disabled)t.preventDefault();this.selected=!this.selected;this.onclick.emit({selected:this.selected})}getClasses(){const t={};t[`${this.size.toLowerCase()}`]=true;t[`icon-${this.iconPosition.toLowerCase()}`]=true;t["disabled"]=this.disabled;t["selected"]=this.selected;return t}render(){return s(i,{key:"bbd95db4048d0bb3d4c17927da18136402bf91dd"},s("button",{key:"ae27bbadadf7597d4e6aaa406cbeee3dc47921cd",class:this.getClasses(),style:this.styles,disabled:this.disabled,onClick:t=>this.handleClick(t),onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},s("div",{key:"6cdcdb3c908673c3babad6fd35cedc38ff358b61",class:"button-container"},this.getIcon(),s("cura-label",{key:"c058fedf71ac3c33a5711fba7be80dacd6ee8467",class:"label",lineHeight:"0%",color:this.assignColor()},s("slot",{key:"5976c1f58c3d5bba77cf6cde7acc31fb49fcd25d"})))))}static get watchers(){return{background:["setColors","assignColor"],color:["setColors"],fontcolor:["setColors","assignColor"]}}};r.style=o;export{r as cura_button_select};
2
- //# sourceMappingURL=p-df5c3a86.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["curaButtonSelectCss","CuraButtonSelectStyle0","CuraButtonOutline","this","theme","window","CuraAPI","setColors","colors","name","color","fontcolor","background","forEach","styles","Object","assign","getColor","setStyles","weights","fonts","getWeights","spacing","getSpacing","getSize","getFamily","medium","connectedCallback","handleMouseEnter","disabled","hovered","handleMouseLeave","assignColor","selected","getIcon","iconSize","size","iconName","h","class","handleClick","e","preventDefault","onclick","emit","getClasses","classes","toLowerCase","iconPosition","render","Host","key","style","onClick","onMouseEnter","onMouseLeave","lineHeight"],"sources":["src/components/buttons/cura-button-select/cura-button-select.scss?tag=cura-button-select&encapsulation=shadow","src/components/buttons/cura-button-select/cura-button-select.tsx"],"sourcesContent":["@import \"../../../scss/mixins/buttons.scss\";\n\n:host {\n @include button-host();\n\n button, a {\n @include button-element() {\n background-color: var(--neutral-purewhite);\n box-sizing: border-box;\n border: 2px solid var(--primary-base);\n\n &:not(.disabled):hover {\n background-color: var(--color-lighter);\n border-color: var(--color-base);\n }\n\n &:focus {\n border-color: var(--info-base) !important;\n }\n }\n\n @include button-sizes();\n\n @include button-label();\n\n // Children Elements\n @include button-container() {\n gap: 5px;\n }\n\n @mixin button-icon() {\n margin: 0;\n }\n\n // selected state\n @include button-selected() {\n background-color: var(--color-base);\n border-color: var(--color-darker);\n\n }\n\n // Disabled state\n @include button-disabled() {\n background-color: var(--neutral-white-primary-darker);\n border-color: var(--neutral-medium-primary-base);\n\n }\n\n }\n}\n// ver as cores do label button\n","import { Component, Host, h, Prop, Watch, State, Event, EventEmitter } from '@stencil/core';\n\n@Component({\n tag: 'cura-button-select',\n styleUrl: 'cura-button-select.scss',\n shadow: true,\n})\n\nexport class CuraButtonOutline {\n /**\n * Button size: small | medium (default) | large = medium\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n /**\n * Disabled state. Boolean.\n */\n @Prop({ reflect: true }) disabled = false;\n /**\n * selected state. Boolean.\n */\n @Prop({ reflect: true }) selected = false;\n /**\n * Icon position: left (default) | right.\n */\n @Prop({ reflect: true }) iconPosition: 'left' | 'right' = 'right';\n /**\n * Color base from color scheme. Default: accent.\n */\n @Prop() color = 'accent';\n /**\n * Set the font color to dark or light.\n */\n @Prop() background: 'dark' | 'light' = 'light';\n /**\n * fontcolor theme of the checkbox.\n * Can be 'dark' or 'light'.\n */\n @Prop() fontcolor: 'dark' | 'light' = 'dark';\n /**\n * hovered state. Boolean.\n */\n @State() hovered = false;\n\n @State() styles = {};\n\n @Event({ eventName: \"onclick\" }) onclick: EventEmitter<{ selected: boolean; }>;\n\n theme = window.CuraAPI.theme\n\n weights;\n\n @Watch('background')\n @Watch('color')\n @Watch('fontcolor')\n setColors() {\n const colors = [\n { name: '--color-base', theme: `${this.color}-base` },\n { name: '--color-darker', theme: `${this.color}-darker` },\n { name: '--color-lighter', theme: `${this.color}-lighter` },\n { name: '--neutral-purewhite-black', theme: this.fontcolor === 'light' ? 'neutral-purewhite' : 'neutral-black' },\n { name: '--neutral-white-primary-darker', theme: this.background === 'light' ? 'neutral-white' : 'primary-darker' },\n { name: '--neutral-medium-primary-base', theme: this.background === 'light' ? 'neutral-medium' : 'primary-base' },\n ];\n\n colors.forEach(color => {\n this.styles = {\n ...this.styles,\n [color.name]: this.theme.colors.getColor(color.theme)\n };\n });\n }\n\n setStyles() {\n this.weights = this.theme.fonts.getWeights();\n this.styles['--base-spacing'] = this.theme.spacing.getSpacing();\n this.styles['--font-size'] = this.theme.fonts.getSize();\n this.styles['--font-family'] = this.theme.fonts.getFamily();\n this.styles['--font-weight-medium'] = this.weights.medium;\n this.styles['--neutral-purewhite'] = this.theme.colors.getColor(\"neutral-purewhite\");\n this.styles['--neutral-black'] = this.theme.colors.getColor(\"neutral-black\");\n this.styles['--primary-base'] = this.theme.colors.getColor(\"primary-base\");\n this.styles['--info-base'] = this.theme.colors.getColor(\"info-base\");\n }\n\n connectedCallback() {\n this.setStyles()\n this.setColors();\n }\n\n handleMouseEnter() {\n if (this.disabled) return;\n this.hovered = true;\n }\n\n handleMouseLeave() {\n this.hovered = false;\n }\n\n @Watch('background')\n @Watch('fontcolor')\n assignColor() {\n if (!this.selected) return 'primary-base'\n\n const fontcolor =\n this.disabled\n ? (this.background === 'light' ? 'neutral-medium' : 'primary-base')\n : this.selected && this.fontcolor === \"dark\" ? 'neutral-black' : \"neutral-purewhite\";\n\n return fontcolor\n }\n\n getIcon() {\n if (!this.selected) return;\n\n const iconSize = this.size === 'small' ? 16 : this.size === 'medium' ? 20 : 24;\n const iconName = this.hovered ? 'closeCircle' : 'checkCircle';\n\n return <cura-icon class=\"button-icon\" name={iconName} size={iconSize} color={this.assignColor()}></cura-icon>;\n }\n\n\n handleClick(e: Event) {\n if (this.disabled) e.preventDefault();\n this.selected = !this.selected;\n this.onclick.emit({ selected: this.selected });\n }\n\n\n getClasses() {\n const classes = {};\n classes[`${this.size.toLowerCase()}`] = true;\n classes[`icon-${this.iconPosition.toLowerCase()}`] = true;\n classes['disabled'] = this.disabled;\n classes['selected'] = this.selected;\n return classes;\n }\n\n\n\n render() {\n return (\n <Host>\n <button class={this.getClasses()}\n style={this.styles}\n disabled={this.disabled}\n onClick={(e) => this.handleClick(e)}\n onMouseEnter={() => this.handleMouseEnter()}\n onMouseLeave={() => this.handleMouseLeave()}>\n <div class=\"button-container\">\n {this.getIcon()}\n <cura-label class=\"label\" lineHeight='0%' color={this.assignColor()}><slot></slot></cura-label>\n </div>\n </button>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KAAK4B,oBACzBO,EAAA,OAAAa,IAAA,2CAAKZ,MAAM,oBACRpC,KAAK+B,UACNI,EAAA,cAAAa,IAAA,2CAAYZ,MAAM,QAAQiB,WAAW,KAAK9C,MAAOP,KAAK6B,eAAeM,EAAA,QAAAa,IAAA,gD","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import{r as o,h as r,H as e}from"./p-312791fb.js";const a=":host{display:block;box-sizing:border-box;width:100%}cura-label{padding:12px 0px;border-bottom:1px solid var(--neutral-light)}";const d=a;const t=class{constructor(r){o(this,r)}render(){return r(e,{key:"b9fbb0edaea7457fad9244d5c032961bd913f170",slot:"dropdown-search-option"},r("cura-label",{key:"dbefa340f1001a532c7f2152907b87e5e2e1f0ec",color:"neutral-dark",size:"xsmall",lineHeight:"16px",marginBlock:"0"},r("slot",{key:"1d03c41d153dc707db82943c77dd96547c98c78a"})))}};t.style=d;export{t as cura_dropdown_search_option_title};
2
- //# sourceMappingURL=p-dfc65f66.entry.js.map