@haiilo/catalyst 4.1.2 → 5.0.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 (276) hide show
  1. package/dist/catalyst/assets/fonts/Lato-Black.woff +0 -0
  2. package/dist/catalyst/assets/fonts/Lato-Black.woff2 +0 -0
  3. package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff +0 -0
  4. package/dist/catalyst/assets/fonts/Lato-BlackItalic.woff2 +0 -0
  5. package/dist/catalyst/assets/fonts/Lato-Bold.woff +0 -0
  6. package/dist/catalyst/assets/fonts/Lato-Bold.woff2 +0 -0
  7. package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff +0 -0
  8. package/dist/catalyst/assets/fonts/Lato-BoldItalic.woff2 +0 -0
  9. package/dist/catalyst/assets/fonts/Lato-Hairline.woff +0 -0
  10. package/dist/catalyst/assets/fonts/Lato-Hairline.woff2 +0 -0
  11. package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff +0 -0
  12. package/dist/catalyst/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
  13. package/dist/catalyst/assets/fonts/Lato-Heavy.woff +0 -0
  14. package/dist/catalyst/assets/fonts/Lato-Heavy.woff2 +0 -0
  15. package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff +0 -0
  16. package/dist/catalyst/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
  17. package/dist/catalyst/assets/fonts/Lato-Italic.woff +0 -0
  18. package/dist/catalyst/assets/fonts/Lato-Italic.woff2 +0 -0
  19. package/dist/catalyst/assets/fonts/Lato-Light.woff +0 -0
  20. package/dist/catalyst/assets/fonts/Lato-Light.woff2 +0 -0
  21. package/dist/catalyst/assets/fonts/Lato-LightItalic.woff +0 -0
  22. package/dist/catalyst/assets/fonts/Lato-LightItalic.woff2 +0 -0
  23. package/dist/catalyst/assets/fonts/Lato-Medium.woff +0 -0
  24. package/dist/catalyst/assets/fonts/Lato-Medium.woff2 +0 -0
  25. package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff +0 -0
  26. package/dist/catalyst/assets/fonts/Lato-MediumItalic.woff2 +0 -0
  27. package/dist/catalyst/assets/fonts/Lato-Regular.woff +0 -0
  28. package/dist/catalyst/assets/fonts/Lato-Regular.woff2 +0 -0
  29. package/dist/catalyst/assets/fonts/Lato-Semibold.woff +0 -0
  30. package/dist/catalyst/assets/fonts/Lato-Semibold.woff2 +0 -0
  31. package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff +0 -0
  32. package/dist/catalyst/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
  33. package/dist/catalyst/assets/fonts/Lato-Thin.woff +0 -0
  34. package/dist/catalyst/assets/fonts/Lato-Thin.woff2 +0 -0
  35. package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff +0 -0
  36. package/dist/catalyst/assets/fonts/Lato-ThinItalic.woff2 +0 -0
  37. package/dist/catalyst/catalyst.css +6 -27
  38. package/dist/catalyst/catalyst.esm.js +1 -1
  39. package/dist/catalyst/catalyst.esm.js.map +1 -1
  40. package/dist/catalyst/index.esm.js.map +1 -1
  41. package/dist/catalyst/p-50855511.entry.js +10 -0
  42. package/dist/catalyst/p-50855511.entry.js.map +1 -0
  43. package/dist/catalyst/p-ccfebe33.js.map +1 -1
  44. package/dist/catalyst/p-d1fb9d96.js +3 -0
  45. package/dist/catalyst/p-d1fb9d96.js.map +1 -0
  46. package/dist/catalyst/scss/fonts/_fonts-mixins.scss +0 -10
  47. package/dist/cjs/cat-alert_24.cjs.entry.js +932 -1132
  48. package/dist/cjs/cat-alert_24.cjs.entry.js.map +1 -1
  49. package/dist/cjs/catalyst.cjs.js +10 -3
  50. package/dist/cjs/catalyst.cjs.js.map +1 -1
  51. package/dist/cjs/{index-c4542095.js → index-01312a2e.js} +527 -245
  52. package/dist/cjs/index-01312a2e.js.map +1 -0
  53. package/dist/cjs/index.cjs.js.map +1 -1
  54. package/dist/cjs/loader.cjs.js +4 -3
  55. package/dist/cjs/loader.cjs.js.map +1 -1
  56. package/dist/collection/assets/fonts/Lato-Black.woff +0 -0
  57. package/dist/collection/assets/fonts/Lato-Black.woff2 +0 -0
  58. package/dist/collection/assets/fonts/Lato-BlackItalic.woff +0 -0
  59. package/dist/collection/assets/fonts/Lato-BlackItalic.woff2 +0 -0
  60. package/dist/collection/assets/fonts/Lato-Bold.woff +0 -0
  61. package/dist/collection/assets/fonts/Lato-Bold.woff2 +0 -0
  62. package/dist/collection/assets/fonts/Lato-BoldItalic.woff +0 -0
  63. package/dist/collection/assets/fonts/Lato-BoldItalic.woff2 +0 -0
  64. package/dist/collection/assets/fonts/Lato-Hairline.woff +0 -0
  65. package/dist/collection/assets/fonts/Lato-Hairline.woff2 +0 -0
  66. package/dist/collection/assets/fonts/Lato-HairlineItalic.woff +0 -0
  67. package/dist/collection/assets/fonts/Lato-HairlineItalic.woff2 +0 -0
  68. package/dist/collection/assets/fonts/Lato-Heavy.woff +0 -0
  69. package/dist/collection/assets/fonts/Lato-Heavy.woff2 +0 -0
  70. package/dist/collection/assets/fonts/Lato-HeavyItalic.woff +0 -0
  71. package/dist/collection/assets/fonts/Lato-HeavyItalic.woff2 +0 -0
  72. package/dist/collection/assets/fonts/Lato-Italic.woff +0 -0
  73. package/dist/collection/assets/fonts/Lato-Italic.woff2 +0 -0
  74. package/dist/collection/assets/fonts/Lato-Light.woff +0 -0
  75. package/dist/collection/assets/fonts/Lato-Light.woff2 +0 -0
  76. package/dist/collection/assets/fonts/Lato-LightItalic.woff +0 -0
  77. package/dist/collection/assets/fonts/Lato-LightItalic.woff2 +0 -0
  78. package/dist/collection/assets/fonts/Lato-Medium.woff +0 -0
  79. package/dist/collection/assets/fonts/Lato-Medium.woff2 +0 -0
  80. package/dist/collection/assets/fonts/Lato-MediumItalic.woff +0 -0
  81. package/dist/collection/assets/fonts/Lato-MediumItalic.woff2 +0 -0
  82. package/dist/collection/assets/fonts/Lato-Regular.woff +0 -0
  83. package/dist/collection/assets/fonts/Lato-Regular.woff2 +0 -0
  84. package/dist/collection/assets/fonts/Lato-Semibold.woff +0 -0
  85. package/dist/collection/assets/fonts/Lato-Semibold.woff2 +0 -0
  86. package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff +0 -0
  87. package/dist/collection/assets/fonts/Lato-SemiboldItalic.woff2 +0 -0
  88. package/dist/collection/assets/fonts/Lato-Thin.woff +0 -0
  89. package/dist/collection/assets/fonts/Lato-Thin.woff2 +0 -0
  90. package/dist/collection/assets/fonts/Lato-ThinItalic.woff +0 -0
  91. package/dist/collection/assets/fonts/Lato-ThinItalic.woff2 +0 -0
  92. package/dist/collection/collection-manifest.json +2 -2
  93. package/dist/collection/components/cat-alert/cat-alert.js +69 -71
  94. package/dist/collection/components/cat-alert/cat-alert.js.map +1 -1
  95. package/dist/collection/components/cat-avatar/cat-avatar.js +172 -165
  96. package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
  97. package/dist/collection/components/cat-badge/cat-badge.js +102 -111
  98. package/dist/collection/components/cat-badge/cat-badge.js.map +1 -1
  99. package/dist/collection/components/cat-button/cat-button.js +526 -537
  100. package/dist/collection/components/cat-button/cat-button.js.map +1 -1
  101. package/dist/collection/components/cat-card/cat-card.js +12 -8
  102. package/dist/collection/components/cat-checkbox/cat-checkbox.js +336 -350
  103. package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
  104. package/dist/collection/components/cat-dropdown/cat-dropdown.js +137 -137
  105. package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
  106. package/dist/collection/components/cat-form-group/cat-form-group.js +58 -40
  107. package/dist/collection/components/cat-form-group/cat-form-group.js.map +1 -1
  108. package/dist/collection/components/cat-form-hint/cat-form-hint.js +14 -7
  109. package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -1
  110. package/dist/collection/components/cat-i18n/cat-i18n-registry.js +1 -1
  111. package/dist/collection/components/cat-icon/cat-icon-registry.js +1 -1
  112. package/dist/collection/components/cat-icon/cat-icon.js +85 -79
  113. package/dist/collection/components/cat-icon/cat-icon.js.map +1 -1
  114. package/dist/collection/components/cat-input/cat-input.css +32 -3
  115. package/dist/collection/components/cat-input/cat-input.js +662 -660
  116. package/dist/collection/components/cat-input/cat-input.js.map +1 -1
  117. package/dist/collection/components/cat-input/input-type.js +1 -1
  118. package/dist/collection/components/cat-label/cat-label.js +69 -78
  119. package/dist/collection/components/cat-label/cat-label.js.map +1 -1
  120. package/dist/collection/components/cat-notification/cat-notification.js +1 -1
  121. package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
  122. package/dist/collection/components/cat-pagination/cat-pagination.js +192 -226
  123. package/dist/collection/components/cat-pagination/cat-pagination.js.map +1 -1
  124. package/dist/collection/components/cat-radio/cat-radio.js +319 -327
  125. package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
  126. package/dist/collection/components/cat-radio-group/cat-radio-group.js +173 -165
  127. package/dist/collection/components/cat-radio-group/cat-radio-group.js.map +1 -1
  128. package/dist/collection/components/cat-scrollable/cat-scrollable.js +200 -208
  129. package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
  130. package/dist/collection/components/cat-select/cat-select.js +555 -590
  131. package/dist/collection/components/cat-select/cat-select.js.map +1 -1
  132. package/dist/collection/components/cat-select-demo/cat-select-demo.js +3 -28
  133. package/dist/collection/components/cat-select-demo/cat-select-demo.js.map +1 -1
  134. package/dist/collection/components/cat-skeleton/cat-skeleton.js +85 -88
  135. package/dist/collection/components/cat-skeleton/cat-skeleton.js.map +1 -1
  136. package/dist/collection/components/cat-spinner/cat-spinner.js +52 -50
  137. package/dist/collection/components/cat-spinner/cat-spinner.js.map +1 -1
  138. package/dist/collection/components/cat-tab/cat-tab.js +169 -168
  139. package/dist/collection/components/cat-tab/cat-tab.js.map +1 -1
  140. package/dist/collection/components/cat-tabs/cat-tabs.js +73 -66
  141. package/dist/collection/components/cat-tabs/cat-tabs.js.map +1 -1
  142. package/dist/collection/components/cat-textarea/cat-textarea.css +32 -1
  143. package/dist/collection/components/cat-textarea/cat-textarea.js +479 -468
  144. package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
  145. package/dist/collection/components/cat-toggle/cat-toggle.js +319 -326
  146. package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
  147. package/dist/collection/components/cat-tooltip/cat-tooltip.css +7 -1
  148. package/dist/collection/components/cat-tooltip/cat-tooltip.js +187 -198
  149. package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
  150. package/dist/collection/index.js +1 -1
  151. package/dist/collection/scss/fonts/_fonts-mixins.scss +0 -10
  152. package/dist/collection/utils/breakpoints.js +1 -1
  153. package/dist/collection/utils/breakpoints.js.map +1 -1
  154. package/dist/collection/utils/coerce.js +11 -0
  155. package/dist/collection/utils/coerce.js.map +1 -0
  156. package/dist/collection/utils/first-tabbable.js +1 -1
  157. package/dist/collection/utils/is-touch-screen.js +1 -1
  158. package/dist/collection/utils/load-img.js +1 -1
  159. package/dist/collection/utils/media-matcher.js +1 -1
  160. package/dist/collection/utils/platform.js +4 -4
  161. package/dist/collection/utils/setDefault.js +1 -1
  162. package/dist/components/cat-alert.js +1 -6
  163. package/dist/components/cat-alert.js.map +1 -1
  164. package/dist/components/cat-avatar2.js +6 -9
  165. package/dist/components/cat-avatar2.js.map +1 -1
  166. package/dist/components/cat-badge.js +0 -15
  167. package/dist/components/cat-badge.js.map +1 -1
  168. package/dist/components/cat-button2.js +10 -36
  169. package/dist/components/cat-button2.js.map +1 -1
  170. package/dist/components/cat-checkbox2.js +9 -26
  171. package/dist/components/cat-checkbox2.js.map +1 -1
  172. package/dist/components/cat-dropdown2.js +139 -176
  173. package/dist/components/cat-dropdown2.js.map +1 -1
  174. package/dist/components/cat-form-group.js +4 -9
  175. package/dist/components/cat-form-group.js.map +1 -1
  176. package/dist/components/cat-form-hint.js +13 -6
  177. package/dist/components/cat-form-hint.js.map +1 -1
  178. package/dist/components/cat-icon-registry.js +71 -0
  179. package/dist/components/cat-icon-registry.js.map +1 -0
  180. package/dist/components/cat-icon.js +1 -1
  181. package/dist/components/cat-icon2.js +5 -71
  182. package/dist/components/cat-icon2.js.map +1 -1
  183. package/dist/components/cat-input.js +33 -41
  184. package/dist/components/cat-input.js.map +1 -1
  185. package/dist/components/cat-label.js +1 -6
  186. package/dist/components/cat-label.js.map +1 -1
  187. package/dist/components/cat-pagination.js +0 -30
  188. package/dist/components/cat-pagination.js.map +1 -1
  189. package/dist/components/cat-radio-group.js +3 -6
  190. package/dist/components/cat-radio-group.js.map +1 -1
  191. package/dist/components/cat-radio.js +9 -23
  192. package/dist/components/cat-radio.js.map +1 -1
  193. package/dist/components/cat-scrollable2.js +1 -12
  194. package/dist/components/cat-scrollable2.js.map +1 -1
  195. package/dist/components/cat-select-demo.js +2 -12
  196. package/dist/components/cat-select-demo.js.map +1 -1
  197. package/dist/components/cat-select2.js +40 -47
  198. package/dist/components/cat-select2.js.map +1 -1
  199. package/dist/components/cat-skeleton2.js +1 -10
  200. package/dist/components/cat-skeleton2.js.map +1 -1
  201. package/dist/components/cat-spinner2.js +1 -3
  202. package/dist/components/cat-spinner2.js.map +1 -1
  203. package/dist/components/cat-tab.js +3 -12
  204. package/dist/components/cat-tab.js.map +1 -1
  205. package/dist/components/cat-tabs.js +1 -6
  206. package/dist/components/cat-tabs.js.map +1 -1
  207. package/dist/components/cat-textarea.js +28 -33
  208. package/dist/components/cat-textarea.js.map +1 -1
  209. package/dist/components/cat-toggle.js +9 -23
  210. package/dist/components/cat-toggle.js.map +1 -1
  211. package/dist/components/cat-tooltip.js +14 -34
  212. package/dist/components/cat-tooltip.js.map +1 -1
  213. package/dist/components/first-tabbable.js +51 -113
  214. package/dist/components/first-tabbable.js.map +1 -1
  215. package/dist/components/floating-ui.dom.esm.js +577 -441
  216. package/dist/components/floating-ui.dom.esm.js.map +1 -1
  217. package/dist/components/index.d.ts +9 -27
  218. package/dist/components/index.js +2 -26
  219. package/dist/components/index.js.map +1 -1
  220. package/dist/esm/cat-alert_24.entry.js +933 -1133
  221. package/dist/esm/cat-alert_24.entry.js.map +1 -1
  222. package/dist/esm/catalyst.js +7 -3
  223. package/dist/esm/catalyst.js.map +1 -1
  224. package/dist/esm/{index-524906f7.js → index-fc2f91a4.js} +527 -246
  225. package/dist/esm/index-fc2f91a4.js.map +1 -0
  226. package/dist/esm/index.js.map +1 -1
  227. package/dist/esm/loader.js +4 -3
  228. package/dist/esm/loader.js.map +1 -1
  229. package/dist/esm/polyfills/css-shim.js +1 -1
  230. package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +1 -1
  231. package/dist/types/components/cat-form-group/cat-form-group.d.ts +4 -0
  232. package/dist/types/components/cat-form-hint/cat-form-hint.d.ts +5 -0
  233. package/dist/types/components/cat-input/cat-input.d.ts +6 -1
  234. package/dist/types/components/cat-input/input-type.d.ts +1 -1
  235. package/dist/types/components/cat-radio/cat-radio.d.ts +1 -1
  236. package/dist/types/components/cat-select/cat-select.d.ts +3 -1
  237. package/dist/types/components/cat-textarea/cat-textarea.d.ts +6 -1
  238. package/dist/types/components/cat-toggle/cat-toggle.d.ts +1 -1
  239. package/dist/types/components/cat-tooltip/cat-tooltip.d.ts +3 -0
  240. package/dist/types/components.d.ts +353 -7
  241. package/dist/types/stencil-public-runtime.d.ts +91 -19
  242. package/dist/types/utils/breakpoints.d.ts +1 -1
  243. package/dist/types/utils/coerce.d.ts +3 -0
  244. package/dist/types/utils/first-tabbable.d.ts +2 -2
  245. package/loader/index.d.ts +9 -0
  246. package/loader/package.json +1 -0
  247. package/package.json +19 -19
  248. package/dist/catalyst/assets/fonts/AzeretMono-Regular.woff2 +0 -0
  249. package/dist/catalyst/assets/fonts/DMSans-Bold.woff2 +0 -0
  250. package/dist/catalyst/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
  251. package/dist/catalyst/assets/fonts/DMSans-Italic.woff2 +0 -0
  252. package/dist/catalyst/assets/fonts/DMSans-Medium.woff2 +0 -0
  253. package/dist/catalyst/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
  254. package/dist/catalyst/assets/fonts/DMSans-Regular.woff2 +0 -0
  255. package/dist/catalyst/p-919eea27.js +0 -3
  256. package/dist/catalyst/p-919eea27.js.map +0 -1
  257. package/dist/catalyst/p-cd8f8639.entry.js +0 -10
  258. package/dist/catalyst/p-cd8f8639.entry.js.map +0 -1
  259. package/dist/catalyst/scss/fonts/_fonts.mixins.azeret.scss +0 -14
  260. package/dist/catalyst/scss/fonts/_fonts.mixins.dm.scss +0 -53
  261. package/dist/cjs/index-c4542095.js.map +0 -1
  262. package/dist/collection/assets/fonts/AzeretMono-Regular.woff2 +0 -0
  263. package/dist/collection/assets/fonts/DMSans-Bold.woff2 +0 -0
  264. package/dist/collection/assets/fonts/DMSans-BoldItalic.woff2 +0 -0
  265. package/dist/collection/assets/fonts/DMSans-Italic.woff2 +0 -0
  266. package/dist/collection/assets/fonts/DMSans-Medium.woff2 +0 -0
  267. package/dist/collection/assets/fonts/DMSans-MediumItalic.woff2 +0 -0
  268. package/dist/collection/assets/fonts/DMSans-Regular.woff2 +0 -0
  269. package/dist/collection/components/cat-form-hint/cat-form-hint-utils.js +0 -13
  270. package/dist/collection/components/cat-form-hint/cat-form-hint-utils.js.map +0 -1
  271. package/dist/collection/scss/fonts/_fonts.mixins.azeret.scss +0 -14
  272. package/dist/collection/scss/fonts/_fonts.mixins.dm.scss +0 -53
  273. package/dist/components/cat-form-hint-utils.js +0 -17
  274. package/dist/components/cat-form-hint-utils.js.map +0 -1
  275. package/dist/esm/index-524906f7.js.map +0 -1
  276. package/dist/types/components/cat-form-hint/cat-form-hint-utils.d.ts +0 -4
@@ -1,4 +1,4 @@
1
- import { Component, h, Prop, State, Watch } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  import log from 'loglevel';
3
3
  import loadImg from '../../utils/load-img';
4
4
  /**
@@ -6,18 +6,15 @@ import loadImg from '../../utils/load-img';
6
6
  */
7
7
  export class CatAvatar {
8
8
  constructor() {
9
- /**
10
- * The size of the avatar.
11
- */
9
+ this.backgroundImage = undefined;
12
10
  this.size = 'm';
13
- /**
14
- * Use round avatar edges.
15
- */
16
11
  this.round = false;
17
- /**
18
- * The label of the avatar.
19
- */
20
12
  this.label = '';
13
+ this.initials = undefined;
14
+ this.src = undefined;
15
+ this.icon = undefined;
16
+ this.url = undefined;
17
+ this.urlTarget = undefined;
21
18
  }
22
19
  onSrcChanged(value) {
23
20
  if (value) {
@@ -67,159 +64,169 @@ export class CatAvatar {
67
64
  }
68
65
  static get is() { return "cat-avatar"; }
69
66
  static get encapsulation() { return "shadow"; }
70
- static get originalStyleUrls() { return {
71
- "$": ["cat-avatar.scss"]
72
- }; }
73
- static get styleUrls() { return {
74
- "$": ["cat-avatar.css"]
75
- }; }
76
- static get properties() { return {
77
- "size": {
78
- "type": "string",
79
- "mutable": false,
80
- "complexType": {
81
- "original": "'xs' | 's' | 'm' | 'l' | 'xl'",
82
- "resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
83
- "references": {}
84
- },
85
- "required": false,
86
- "optional": false,
87
- "docs": {
88
- "tags": [],
89
- "text": "The size of the avatar."
90
- },
91
- "attribute": "size",
92
- "reflect": false,
93
- "defaultValue": "'m'"
94
- },
95
- "round": {
96
- "type": "boolean",
97
- "mutable": false,
98
- "complexType": {
99
- "original": "boolean",
100
- "resolved": "boolean",
101
- "references": {}
102
- },
103
- "required": false,
104
- "optional": false,
105
- "docs": {
106
- "tags": [],
107
- "text": "Use round avatar edges."
108
- },
109
- "attribute": "round",
110
- "reflect": false,
111
- "defaultValue": "false"
112
- },
113
- "label": {
114
- "type": "string",
115
- "mutable": false,
116
- "complexType": {
117
- "original": "string",
118
- "resolved": "string",
119
- "references": {}
120
- },
121
- "required": false,
122
- "optional": false,
123
- "docs": {
124
- "tags": [],
125
- "text": "The label of the avatar."
126
- },
127
- "attribute": "label",
128
- "reflect": false,
129
- "defaultValue": "''"
130
- },
131
- "initials": {
132
- "type": "string",
133
- "mutable": false,
134
- "complexType": {
135
- "original": "string",
136
- "resolved": "string | undefined",
137
- "references": {}
138
- },
139
- "required": false,
140
- "optional": true,
141
- "docs": {
142
- "tags": [],
143
- "text": "Custom initials for the avatar."
144
- },
145
- "attribute": "initials",
146
- "reflect": false
147
- },
148
- "src": {
149
- "type": "string",
150
- "mutable": false,
151
- "complexType": {
152
- "original": "string",
153
- "resolved": "string | undefined",
154
- "references": {}
155
- },
156
- "required": false,
157
- "optional": true,
158
- "docs": {
159
- "tags": [],
160
- "text": "An optional avatar image."
161
- },
162
- "attribute": "src",
163
- "reflect": false
164
- },
165
- "icon": {
166
- "type": "string",
167
- "mutable": false,
168
- "complexType": {
169
- "original": "string",
170
- "resolved": "string | undefined",
171
- "references": {}
172
- },
173
- "required": false,
174
- "optional": true,
175
- "docs": {
176
- "tags": [],
177
- "text": "An icon to be used instead of the initials."
178
- },
179
- "attribute": "icon",
180
- "reflect": false
181
- },
182
- "url": {
183
- "type": "string",
184
- "mutable": false,
185
- "complexType": {
186
- "original": "string",
187
- "resolved": "string | undefined",
188
- "references": {}
189
- },
190
- "required": false,
191
- "optional": true,
192
- "docs": {
193
- "tags": [],
194
- "text": "A destination to link to, rendered in the href attribute of a link."
195
- },
196
- "attribute": "url",
197
- "reflect": false
198
- },
199
- "urlTarget": {
200
- "type": "string",
201
- "mutable": false,
202
- "complexType": {
203
- "original": "'_blank' | '_self'",
204
- "resolved": "\"_blank\" | \"_self\" | undefined",
205
- "references": {}
206
- },
207
- "required": false,
208
- "optional": true,
209
- "docs": {
210
- "tags": [],
211
- "text": "Specifies where to open the linked document."
212
- },
213
- "attribute": "url-target",
214
- "reflect": false
215
- }
216
- }; }
217
- static get states() { return {
218
- "backgroundImage": {}
219
- }; }
220
- static get watchers() { return [{
221
- "propName": "src",
222
- "methodName": "onSrcChanged"
223
- }]; }
67
+ static get originalStyleUrls() {
68
+ return {
69
+ "$": ["cat-avatar.scss"]
70
+ };
71
+ }
72
+ static get styleUrls() {
73
+ return {
74
+ "$": ["cat-avatar.css"]
75
+ };
76
+ }
77
+ static get properties() {
78
+ return {
79
+ "size": {
80
+ "type": "string",
81
+ "mutable": false,
82
+ "complexType": {
83
+ "original": "'xs' | 's' | 'm' | 'l' | 'xl'",
84
+ "resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
85
+ "references": {}
86
+ },
87
+ "required": false,
88
+ "optional": false,
89
+ "docs": {
90
+ "tags": [],
91
+ "text": "The size of the avatar."
92
+ },
93
+ "attribute": "size",
94
+ "reflect": false,
95
+ "defaultValue": "'m'"
96
+ },
97
+ "round": {
98
+ "type": "boolean",
99
+ "mutable": false,
100
+ "complexType": {
101
+ "original": "boolean",
102
+ "resolved": "boolean",
103
+ "references": {}
104
+ },
105
+ "required": false,
106
+ "optional": false,
107
+ "docs": {
108
+ "tags": [],
109
+ "text": "Use round avatar edges."
110
+ },
111
+ "attribute": "round",
112
+ "reflect": false,
113
+ "defaultValue": "false"
114
+ },
115
+ "label": {
116
+ "type": "string",
117
+ "mutable": false,
118
+ "complexType": {
119
+ "original": "string",
120
+ "resolved": "string",
121
+ "references": {}
122
+ },
123
+ "required": false,
124
+ "optional": false,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": "The label of the avatar."
128
+ },
129
+ "attribute": "label",
130
+ "reflect": false,
131
+ "defaultValue": "''"
132
+ },
133
+ "initials": {
134
+ "type": "string",
135
+ "mutable": false,
136
+ "complexType": {
137
+ "original": "string",
138
+ "resolved": "string | undefined",
139
+ "references": {}
140
+ },
141
+ "required": false,
142
+ "optional": true,
143
+ "docs": {
144
+ "tags": [],
145
+ "text": "Custom initials for the avatar."
146
+ },
147
+ "attribute": "initials",
148
+ "reflect": false
149
+ },
150
+ "src": {
151
+ "type": "string",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "string",
155
+ "resolved": "string | undefined",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": true,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": "An optional avatar image."
163
+ },
164
+ "attribute": "src",
165
+ "reflect": false
166
+ },
167
+ "icon": {
168
+ "type": "string",
169
+ "mutable": false,
170
+ "complexType": {
171
+ "original": "string",
172
+ "resolved": "string | undefined",
173
+ "references": {}
174
+ },
175
+ "required": false,
176
+ "optional": true,
177
+ "docs": {
178
+ "tags": [],
179
+ "text": "An icon to be used instead of the initials."
180
+ },
181
+ "attribute": "icon",
182
+ "reflect": false
183
+ },
184
+ "url": {
185
+ "type": "string",
186
+ "mutable": false,
187
+ "complexType": {
188
+ "original": "string",
189
+ "resolved": "string | undefined",
190
+ "references": {}
191
+ },
192
+ "required": false,
193
+ "optional": true,
194
+ "docs": {
195
+ "tags": [],
196
+ "text": "A destination to link to, rendered in the href attribute of a link."
197
+ },
198
+ "attribute": "url",
199
+ "reflect": false
200
+ },
201
+ "urlTarget": {
202
+ "type": "string",
203
+ "mutable": false,
204
+ "complexType": {
205
+ "original": "'_blank' | '_self'",
206
+ "resolved": "\"_blank\" | \"_self\" | undefined",
207
+ "references": {}
208
+ },
209
+ "required": false,
210
+ "optional": true,
211
+ "docs": {
212
+ "tags": [],
213
+ "text": "Specifies where to open the linked document."
214
+ },
215
+ "attribute": "url-target",
216
+ "reflect": false
217
+ }
218
+ };
219
+ }
220
+ static get states() {
221
+ return {
222
+ "backgroundImage": {}
223
+ };
224
+ }
225
+ static get watchers() {
226
+ return [{
227
+ "propName": "src",
228
+ "methodName": "onSrcChanged"
229
+ }];
230
+ }
224
231
  }
225
- //# sourceMappingURL=cat-avatar.js.map
232
+ //# sourceMappingURL=cat-avatar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cat-avatar.js","sourceRoot":"","sources":["../../../src/components/cat-avatar/cat-avatar.tsx"],"names":[],"mappings":"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","sourcesContent":["import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport loadImg from '../../utils/load-img';\n\n/**\n * Avatars are used to represent a person or object.\n */\n@Component({\n tag: 'cat-avatar',\n styleUrl: 'cat-avatar.scss',\n shadow: true\n})\nexport class CatAvatar {\n @State() backgroundImage?: string;\n\n /**\n * The size of the avatar.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round avatar edges.\n */\n @Prop() round = false;\n\n /**\n * The label of the avatar.\n */\n @Prop() label = '';\n\n /**\n * Custom initials for the avatar.\n */\n @Prop() initials?: string;\n\n /**\n * An optional avatar image.\n */\n @Prop() src?: string;\n\n /**\n * An icon to be used instead of the initials.\n */\n @Prop() icon?: string;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n @Watch('src')\n onSrcChanged(value?: string): void {\n if (value) {\n loadImg(value).then(\n () => (this.backgroundImage = `url(${value})`),\n () => (this.backgroundImage = undefined)\n );\n } else {\n this.backgroundImage = undefined;\n }\n }\n\n componentWillLoad(): void {\n this.onSrcChanged(this.src);\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.warn('[A11y] Missing ARIA label on avatar', this);\n }\n }\n\n render() {\n if (this.url) {\n return (\n <a href={this.url} target={this.urlTarget} style={this.cssStyle} class={this.cssClass} aria-label={this.label}>\n {this.content}\n </a>\n );\n } else {\n return (\n <span style={this.cssStyle} class={this.cssClass} aria-label={this.label}>\n {this.content}\n </span>\n );\n }\n }\n\n private get content() {\n return !this.backgroundImage\n ? [this.icon ? <cat-icon icon={this.icon} size={this.size}></cat-icon> : this.getInitials()]\n : [];\n }\n\n private get cssStyle() {\n return { 'background-image': this.backgroundImage };\n }\n\n private get cssClass() {\n return {\n avatar: true,\n 'avatar-round': this.round,\n [`avatar-${this.size}`]: Boolean(this.size)\n };\n }\n\n private getInitials(): string {\n return (\n this.initials ??\n (this.label ?? '')\n .split(' ')\n .map(n => n[0])\n .join('')\n );\n }\n}\n"]}
1
+ {"version":3,"file":"cat-avatar.js","sourceRoot":"","sources":["../../../src/components/cat-avatar/cat-avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3B,OAAO,OAAO,MAAM,sBAAsB,CAAC;AAE3C;;GAEG;AAMH,MAAM,OAAO,SAAS;;;gBAM0B,GAAG;iBAKjC,KAAK;iBAKL,EAAE;;;;;;;EA4BlB,YAAY,CAAC,KAAc;IACzB,IAAI,KAAK,EAAE;MACT,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CACjB,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,OAAO,KAAK,GAAG,CAAC,EAC9C,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC,CACzC,CAAC;KACH;SAAM;MACL,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;KAClC;EACH,CAAC;EAED,iBAAiB;IACf,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;EAC9B,CAAC;EAED,mBAAmB;IACjB,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;MACf,GAAG,CAAC,IAAI,CAAC,qCAAqC,EAAE,IAAI,CAAC,CAAC;KACvD;EACH,CAAC;EAED,MAAM;IACJ,IAAI,IAAI,CAAC,GAAG,EAAE;MACZ,OAAO,CACL,SAAG,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,IAC1G,IAAI,CAAC,OAAO,CACX,CACL,CAAC;KACH;SAAM;MACL,OAAO,CACL,YAAM,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,CAAC,QAAQ,gBAAc,IAAI,CAAC,KAAK,IACrE,IAAI,CAAC,OAAO,CACR,CACR,CAAC;KACH;EACH,CAAC;EAED,IAAY,OAAO;IACjB,OAAO,CAAC,IAAI,CAAC,eAAe;MAC1B,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAU,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,GAAa,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;MAC5F,CAAC,CAAC,EAAE,CAAC;EACT,CAAC;EAED,IAAY,QAAQ;IAClB,OAAO,EAAE,kBAAkB,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;EACtD,CAAC;EAED,IAAY,QAAQ;IAClB,OAAO;MACL,MAAM,EAAE,IAAI;MACZ,cAAc,EAAE,IAAI,CAAC,KAAK;MAC1B,CAAC,UAAU,IAAI,CAAC,IAAI,EAAE,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;KAC5C,CAAC;EACJ,CAAC;EAEO,WAAW;;IACjB,OAAO,CACL,MAAA,IAAI,CAAC,QAAQ,mCACb,CAAC,MAAA,IAAI,CAAC,KAAK,mCAAI,EAAE,CAAC;OACf,KAAK,CAAC,GAAG,CAAC;OACV,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;OACd,IAAI,CAAC,EAAE,CAAC,CACZ,CAAC;EACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, h, Prop, State, Watch } from '@stencil/core';\nimport log from 'loglevel';\nimport loadImg from '../../utils/load-img';\n\n/**\n * Avatars are used to represent a person or object.\n */\n@Component({\n tag: 'cat-avatar',\n styleUrl: 'cat-avatar.scss',\n shadow: true\n})\nexport class CatAvatar {\n @State() backgroundImage?: string;\n\n /**\n * The size of the avatar.\n */\n @Prop() size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round avatar edges.\n */\n @Prop() round = false;\n\n /**\n * The label of the avatar.\n */\n @Prop() label = '';\n\n /**\n * Custom initials for the avatar.\n */\n @Prop() initials?: string;\n\n /**\n * An optional avatar image.\n */\n @Prop() src?: string;\n\n /**\n * An icon to be used instead of the initials.\n */\n @Prop() icon?: string;\n\n /**\n * A destination to link to, rendered in the href attribute of a link.\n */\n @Prop() url?: string;\n\n /**\n * Specifies where to open the linked document.\n */\n @Prop() urlTarget?: '_blank' | '_self';\n\n @Watch('src')\n onSrcChanged(value?: string): void {\n if (value) {\n loadImg(value).then(\n () => (this.backgroundImage = `url(${value})`),\n () => (this.backgroundImage = undefined)\n );\n } else {\n this.backgroundImage = undefined;\n }\n }\n\n componentWillLoad(): void {\n this.onSrcChanged(this.src);\n }\n\n componentWillRender(): void {\n if (!this.label) {\n log.warn('[A11y] Missing ARIA label on avatar', this);\n }\n }\n\n render() {\n if (this.url) {\n return (\n <a href={this.url} target={this.urlTarget} style={this.cssStyle} class={this.cssClass} aria-label={this.label}>\n {this.content}\n </a>\n );\n } else {\n return (\n <span style={this.cssStyle} class={this.cssClass} aria-label={this.label}>\n {this.content}\n </span>\n );\n }\n }\n\n private get content() {\n return !this.backgroundImage\n ? [this.icon ? <cat-icon icon={this.icon} size={this.size}></cat-icon> : this.getInitials()]\n : [];\n }\n\n private get cssStyle() {\n return { 'background-image': this.backgroundImage };\n }\n\n private get cssClass() {\n return {\n avatar: true,\n 'avatar-round': this.round,\n [`avatar-${this.size}`]: Boolean(this.size)\n };\n }\n\n private getInitials(): string {\n return (\n this.initials ??\n (this.label ?? '')\n .split(' ')\n .map(n => n[0])\n .join('')\n );\n }\n}\n"]}
@@ -1,29 +1,14 @@
1
- import { Component, Element, h, Prop } from '@stencil/core';
1
+ import { h } from '@stencil/core';
2
2
  /**
3
3
  * Badges are used to inform users of the status of an object or of an action
4
4
  * that’s been taken.
5
5
  */
6
6
  export class CatBadge {
7
7
  constructor() {
8
- /**
9
- * The rendering style of the badge.
10
- */
11
8
  this.variant = 'filled';
12
- /**
13
- * The color palette of the badge.
14
- */
15
9
  this.color = 'primary';
16
- /**
17
- * The size of the badge.
18
- */
19
10
  this.size = 'm';
20
- /**
21
- * Use round badge edges.
22
- */
23
11
  this.round = false;
24
- /**
25
- * Draw attention to the badge with a subtle animation.
26
- */
27
12
  this.pulse = false;
28
13
  }
29
14
  render() {
@@ -31,104 +16,110 @@ export class CatBadge {
31
16
  }
32
17
  static get is() { return "cat-badge"; }
33
18
  static get encapsulation() { return "shadow"; }
34
- static get originalStyleUrls() { return {
35
- "$": ["cat-badge.scss"]
36
- }; }
37
- static get styleUrls() { return {
38
- "$": ["cat-badge.css"]
39
- }; }
40
- static get properties() { return {
41
- "variant": {
42
- "type": "string",
43
- "mutable": false,
44
- "complexType": {
45
- "original": "'filled' | 'outlined'",
46
- "resolved": "\"filled\" | \"outlined\"",
47
- "references": {}
48
- },
49
- "required": false,
50
- "optional": false,
51
- "docs": {
52
- "tags": [],
53
- "text": "The rendering style of the badge."
54
- },
55
- "attribute": "variant",
56
- "reflect": true,
57
- "defaultValue": "'filled'"
58
- },
59
- "color": {
60
- "type": "string",
61
- "mutable": false,
62
- "complexType": {
63
- "original": "'primary' | 'secondary' | 'danger' | 'success' | 'warning'",
64
- "resolved": "\"danger\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
65
- "references": {}
66
- },
67
- "required": false,
68
- "optional": false,
69
- "docs": {
70
- "tags": [],
71
- "text": "The color palette of the badge."
72
- },
73
- "attribute": "color",
74
- "reflect": true,
75
- "defaultValue": "'primary'"
76
- },
77
- "size": {
78
- "type": "string",
79
- "mutable": false,
80
- "complexType": {
81
- "original": "'xs' | 's' | 'm' | 'l' | 'xl'",
82
- "resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
83
- "references": {}
84
- },
85
- "required": false,
86
- "optional": false,
87
- "docs": {
88
- "tags": [],
89
- "text": "The size of the badge."
90
- },
91
- "attribute": "size",
92
- "reflect": true,
93
- "defaultValue": "'m'"
94
- },
95
- "round": {
96
- "type": "boolean",
97
- "mutable": false,
98
- "complexType": {
99
- "original": "boolean",
100
- "resolved": "boolean",
101
- "references": {}
19
+ static get originalStyleUrls() {
20
+ return {
21
+ "$": ["cat-badge.scss"]
22
+ };
23
+ }
24
+ static get styleUrls() {
25
+ return {
26
+ "$": ["cat-badge.css"]
27
+ };
28
+ }
29
+ static get properties() {
30
+ return {
31
+ "variant": {
32
+ "type": "string",
33
+ "mutable": false,
34
+ "complexType": {
35
+ "original": "'filled' | 'outlined'",
36
+ "resolved": "\"filled\" | \"outlined\"",
37
+ "references": {}
38
+ },
39
+ "required": false,
40
+ "optional": false,
41
+ "docs": {
42
+ "tags": [],
43
+ "text": "The rendering style of the badge."
44
+ },
45
+ "attribute": "variant",
46
+ "reflect": true,
47
+ "defaultValue": "'filled'"
102
48
  },
103
- "required": false,
104
- "optional": false,
105
- "docs": {
106
- "tags": [],
107
- "text": "Use round badge edges."
49
+ "color": {
50
+ "type": "string",
51
+ "mutable": false,
52
+ "complexType": {
53
+ "original": "'primary' | 'secondary' | 'danger' | 'success' | 'warning'",
54
+ "resolved": "\"danger\" | \"primary\" | \"secondary\" | \"success\" | \"warning\"",
55
+ "references": {}
56
+ },
57
+ "required": false,
58
+ "optional": false,
59
+ "docs": {
60
+ "tags": [],
61
+ "text": "The color palette of the badge."
62
+ },
63
+ "attribute": "color",
64
+ "reflect": true,
65
+ "defaultValue": "'primary'"
108
66
  },
109
- "attribute": "round",
110
- "reflect": true,
111
- "defaultValue": "false"
112
- },
113
- "pulse": {
114
- "type": "boolean",
115
- "mutable": false,
116
- "complexType": {
117
- "original": "boolean",
118
- "resolved": "boolean",
119
- "references": {}
67
+ "size": {
68
+ "type": "string",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "'xs' | 's' | 'm' | 'l' | 'xl'",
72
+ "resolved": "\"l\" | \"m\" | \"s\" | \"xl\" | \"xs\"",
73
+ "references": {}
74
+ },
75
+ "required": false,
76
+ "optional": false,
77
+ "docs": {
78
+ "tags": [],
79
+ "text": "The size of the badge."
80
+ },
81
+ "attribute": "size",
82
+ "reflect": true,
83
+ "defaultValue": "'m'"
120
84
  },
121
- "required": false,
122
- "optional": false,
123
- "docs": {
124
- "tags": [],
125
- "text": "Draw attention to the badge with a subtle animation."
85
+ "round": {
86
+ "type": "boolean",
87
+ "mutable": false,
88
+ "complexType": {
89
+ "original": "boolean",
90
+ "resolved": "boolean",
91
+ "references": {}
92
+ },
93
+ "required": false,
94
+ "optional": false,
95
+ "docs": {
96
+ "tags": [],
97
+ "text": "Use round badge edges."
98
+ },
99
+ "attribute": "round",
100
+ "reflect": true,
101
+ "defaultValue": "false"
126
102
  },
127
- "attribute": "pulse",
128
- "reflect": true,
129
- "defaultValue": "false"
130
- }
131
- }; }
103
+ "pulse": {
104
+ "type": "boolean",
105
+ "mutable": false,
106
+ "complexType": {
107
+ "original": "boolean",
108
+ "resolved": "boolean",
109
+ "references": {}
110
+ },
111
+ "required": false,
112
+ "optional": false,
113
+ "docs": {
114
+ "tags": [],
115
+ "text": "Draw attention to the badge with a subtle animation."
116
+ },
117
+ "attribute": "pulse",
118
+ "reflect": true,
119
+ "defaultValue": "false"
120
+ }
121
+ };
122
+ }
132
123
  static get elementRef() { return "hostElement"; }
133
124
  }
134
- //# sourceMappingURL=cat-badge.js.map
125
+ //# sourceMappingURL=cat-badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cat-badge.js","sourceRoot":"","sources":["../../../src/components/cat-badge/cat-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE5D;;;GAGG;AAMH,MAAM,OAAO,QAAQ;EALrB;IAQE;;OAEG;IACsB,YAAO,GAA0B,QAAQ,CAAC;IAEnE;;OAEG;IACsB,UAAK,GAA+D,SAAS,CAAC;IAEvG;;OAEG;IACsB,SAAI,GAAkC,GAAG,CAAC;IAEnE;;OAEG;IACsB,UAAK,GAAG,KAAK,CAAC;IAEvC;;OAEG;IACsB,UAAK,GAAG,KAAK,CAAC;GAKxC;EAHC,MAAM;IACJ,OAAO,eAAa,CAAC;EACvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The rendering style of the badge.\n */\n @Prop({ reflect: true }) variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop({ reflect: true }) size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop({ reflect: true }) round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop({ reflect: true }) pulse = false;\n\n render() {\n return <slot></slot>;\n }\n}\n"]}
1
+ {"version":3,"file":"cat-badge.js","sourceRoot":"","sources":["../../../src/components/cat-badge/cat-badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE5D;;;GAGG;AAMH,MAAM,OAAO,QAAQ;;mBAMuC,QAAQ;iBAK2B,SAAS;gBAKvC,GAAG;iBAKjC,KAAK;iBAKL,KAAK;;EAEtC,MAAM;IACJ,OAAO,eAAa,CAAC;EACvB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, h, Prop } from '@stencil/core';\n\n/**\n * Badges are used to inform users of the status of an object or of an action\n * that’s been taken.\n */\n@Component({\n tag: 'cat-badge',\n styleUrl: 'cat-badge.scss',\n shadow: true\n})\nexport class CatBadge {\n @Element() hostElement!: HTMLElement;\n\n /**\n * The rendering style of the badge.\n */\n @Prop({ reflect: true }) variant: 'filled' | 'outlined' = 'filled';\n\n /**\n * The color palette of the badge.\n */\n @Prop({ reflect: true }) color: 'primary' | 'secondary' | 'danger' | 'success' | 'warning' = 'primary';\n\n /**\n * The size of the badge.\n */\n @Prop({ reflect: true }) size: 'xs' | 's' | 'm' | 'l' | 'xl' = 'm';\n\n /**\n * Use round badge edges.\n */\n @Prop({ reflect: true }) round = false;\n\n /**\n * Draw attention to the badge with a subtle animation.\n */\n @Prop({ reflect: true }) pulse = false;\n\n render() {\n return <slot></slot>;\n }\n}\n"]}