kemet-ui 2.0.2 → 3.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 (297) hide show
  1. package/custom-elements.json +540 -553
  2. package/dist/components/kemet-accordion/kemet-accordion-panel.d.ts +1 -2
  3. package/dist/components/kemet-accordion/kemet-accordion-panel.js +3 -2
  4. package/dist/components/kemet-accordion/kemet-accordion-panel.js.map +1 -1
  5. package/dist/components/kemet-accordion/kemet-accordion.d.ts +3 -2
  6. package/dist/components/kemet-accordion/kemet-accordion.js +12 -4
  7. package/dist/components/kemet-accordion/kemet-accordion.js.map +1 -1
  8. package/dist/components/kemet-accordion/stories.d.ts +2 -0
  9. package/dist/components/kemet-accordion/stories.js +6 -3
  10. package/dist/components/kemet-accordion/stories.js.map +1 -1
  11. package/dist/components/kemet-accordion/styles.js +5 -5
  12. package/dist/components/kemet-accordion/styles.js.map +1 -1
  13. package/dist/components/kemet-alert/docs/stories.d.ts +12 -0
  14. package/dist/components/kemet-alert/docs/stories.js +180 -36
  15. package/dist/components/kemet-alert/docs/stories.js.map +1 -1
  16. package/dist/components/kemet-alert/kemet-alert.d.ts +4 -5
  17. package/dist/components/kemet-alert/kemet-alert.js +8 -5
  18. package/dist/components/kemet-alert/kemet-alert.js.map +1 -1
  19. package/dist/components/kemet-alert/styles.js +10 -8
  20. package/dist/components/kemet-alert/styles.js.map +1 -1
  21. package/dist/components/kemet-alert/types.d.ts +0 -9
  22. package/dist/components/kemet-alert/types.js.map +1 -1
  23. package/dist/components/kemet-avatar/docs/stories.d.ts +4 -0
  24. package/dist/components/kemet-avatar/docs/stories.js +57 -35
  25. package/dist/components/kemet-avatar/docs/stories.js.map +1 -1
  26. package/dist/components/kemet-avatar/kemet-avatar.d.ts +4 -4
  27. package/dist/components/kemet-avatar/kemet-avatar.js +4 -4
  28. package/dist/components/kemet-avatar/kemet-avatar.js.map +1 -1
  29. package/dist/components/kemet-avatar/styles.js +16 -9
  30. package/dist/components/kemet-avatar/styles.js.map +1 -1
  31. package/dist/components/kemet-badge/docs/stories.d.ts +6 -0
  32. package/dist/components/kemet-badge/docs/stories.js +52 -16
  33. package/dist/components/kemet-badge/docs/stories.js.map +1 -1
  34. package/dist/components/kemet-badge/kemet-badge.d.ts +2 -1
  35. package/dist/components/kemet-badge/kemet-badge.js +1 -1
  36. package/dist/components/kemet-badge/kemet-badge.js.map +1 -1
  37. package/dist/components/kemet-badge/styles.js +11 -9
  38. package/dist/components/kemet-badge/styles.js.map +1 -1
  39. package/dist/components/kemet-badge/types.d.ts +1 -6
  40. package/dist/components/kemet-badge/types.js.map +1 -1
  41. package/dist/components/kemet-button/docs/stories.d.ts +12 -0
  42. package/dist/components/kemet-button/docs/stories.js +81 -20
  43. package/dist/components/kemet-button/docs/stories.js.map +1 -1
  44. package/dist/components/kemet-button/kemet-button.d.ts +21 -21
  45. package/dist/components/kemet-button/kemet-button.js +22 -22
  46. package/dist/components/kemet-button/kemet-button.js.map +1 -1
  47. package/dist/components/kemet-button/styles.js +46 -26
  48. package/dist/components/kemet-button/styles.js.map +1 -1
  49. package/dist/components/kemet-button/types.d.ts +1 -10
  50. package/dist/components/kemet-button/types.js.map +1 -1
  51. package/dist/components/kemet-card/docs/stories.d.ts +10 -0
  52. package/dist/components/kemet-card/docs/stories.js +78 -66
  53. package/dist/components/kemet-card/docs/stories.js.map +1 -1
  54. package/dist/components/kemet-card/kemet-card.d.ts +15 -15
  55. package/dist/components/kemet-card/kemet-card.js +15 -15
  56. package/dist/components/kemet-card/kemet-card.js.map +1 -1
  57. package/dist/components/kemet-card/styles.js +29 -14
  58. package/dist/components/kemet-card/styles.js.map +1 -1
  59. package/dist/components/kemet-carousel/docs/stories.d.ts +6 -0
  60. package/dist/components/kemet-carousel/docs/stories.js +72 -60
  61. package/dist/components/kemet-carousel/docs/stories.js.map +1 -1
  62. package/dist/components/kemet-carousel/kemet-carousel-current.d.ts +2 -2
  63. package/dist/components/kemet-carousel/kemet-carousel-current.js.map +1 -1
  64. package/dist/components/kemet-carousel/kemet-carousel-total.d.ts +2 -2
  65. package/dist/components/kemet-carousel/kemet-carousel-total.js.map +1 -1
  66. package/dist/components/kemet-carousel/kemet-carousel.d.ts +15 -15
  67. package/dist/components/kemet-carousel/kemet-carousel.js +15 -15
  68. package/dist/components/kemet-carousel/kemet-carousel.js.map +1 -1
  69. package/dist/components/kemet-carousel/styles.js +31 -15
  70. package/dist/components/kemet-carousel/styles.js.map +1 -1
  71. package/dist/components/kemet-checkbox/docs/stories.d.ts +4 -0
  72. package/dist/components/kemet-checkbox/docs/stories.js +28 -28
  73. package/dist/components/kemet-checkbox/docs/stories.js.map +1 -1
  74. package/dist/components/kemet-checkbox/kemet-checkbox.d.ts +6 -6
  75. package/dist/components/kemet-checkbox/kemet-checkbox.js +6 -6
  76. package/dist/components/kemet-checkbox/kemet-checkbox.js.map +1 -1
  77. package/dist/components/kemet-checkbox/styles.js +20 -13
  78. package/dist/components/kemet-checkbox/styles.js.map +1 -1
  79. package/dist/components/kemet-combo/docs/stories.js +14 -12
  80. package/dist/components/kemet-combo/docs/stories.js.map +1 -1
  81. package/dist/components/kemet-combo/kemet-combo.d.ts +9 -9
  82. package/dist/components/kemet-combo/kemet-combo.js +9 -9
  83. package/dist/components/kemet-combo/kemet-combo.js.map +1 -1
  84. package/dist/components/kemet-combo/styles.js +21 -9
  85. package/dist/components/kemet-combo/styles.js.map +1 -1
  86. package/dist/components/kemet-count/docs/stories.js +10 -25
  87. package/dist/components/kemet-count/docs/stories.js.map +1 -1
  88. package/dist/components/kemet-draggable/docs/stories.d.ts +1 -0
  89. package/dist/components/kemet-draggable/docs/stories.js +8 -15
  90. package/dist/components/kemet-draggable/docs/stories.js.map +1 -1
  91. package/dist/components/kemet-drawer/docs/stories.d.ts +6 -0
  92. package/dist/components/kemet-drawer/docs/stories.js +59 -60
  93. package/dist/components/kemet-drawer/docs/stories.js.map +1 -1
  94. package/dist/components/kemet-drawer/kemet-drawer.d.ts +5 -5
  95. package/dist/components/kemet-drawer/kemet-drawer.js +5 -5
  96. package/dist/components/kemet-drawer/kemet-drawer.js.map +1 -1
  97. package/dist/components/kemet-drawer/styles.js +31 -25
  98. package/dist/components/kemet-drawer/styles.js.map +1 -1
  99. package/dist/components/kemet-drawer/types.d.ts +0 -6
  100. package/dist/components/kemet-drawer/types.js.map +1 -1
  101. package/dist/components/kemet-fab/docs/stories.d.ts +3 -0
  102. package/dist/components/kemet-fab/docs/stories.js +23 -32
  103. package/dist/components/kemet-fab/docs/stories.js.map +1 -1
  104. package/dist/components/kemet-fab/kemet-fab.d.ts +6 -6
  105. package/dist/components/kemet-fab/kemet-fab.js +6 -6
  106. package/dist/components/kemet-fab/kemet-fab.js.map +1 -1
  107. package/dist/components/kemet-fab/styles.js +19 -10
  108. package/dist/components/kemet-fab/styles.js.map +1 -1
  109. package/dist/components/kemet-field/docs/stories.d.ts +1 -1
  110. package/dist/components/kemet-field/docs/stories.js +19 -69
  111. package/dist/components/kemet-field/docs/stories.js.map +1 -1
  112. package/dist/components/kemet-field/kemet-field.d.ts +5 -5
  113. package/dist/components/kemet-field/kemet-field.js.map +1 -1
  114. package/dist/components/kemet-field/styles.js +6 -6
  115. package/dist/components/kemet-field/styles.js.map +1 -1
  116. package/dist/components/kemet-flipcard/docs/stories.d.ts +3 -0
  117. package/dist/components/kemet-flipcard/docs/stories.js +29 -78
  118. package/dist/components/kemet-flipcard/docs/stories.js.map +1 -1
  119. package/dist/components/kemet-flipcard/kemet-flipcard.d.ts +7 -7
  120. package/dist/components/kemet-flipcard/kemet-flipcard.js +7 -7
  121. package/dist/components/kemet-flipcard/kemet-flipcard.js.map +1 -1
  122. package/dist/components/kemet-flipcard/styles.js +20 -10
  123. package/dist/components/kemet-flipcard/styles.js.map +1 -1
  124. package/dist/components/kemet-icon/docs/stories.js +8 -15
  125. package/dist/components/kemet-icon/docs/stories.js.map +1 -1
  126. package/dist/components/kemet-input/docs/stories.d.ts +4 -0
  127. package/dist/components/kemet-input/docs/stories.js +54 -113
  128. package/dist/components/kemet-input/docs/stories.js.map +1 -1
  129. package/dist/components/kemet-input/kemet-input.d.ts +15 -15
  130. package/dist/components/kemet-input/kemet-input.js +15 -15
  131. package/dist/components/kemet-input/kemet-input.js.map +1 -1
  132. package/dist/components/kemet-input/styles.js +38 -21
  133. package/dist/components/kemet-input/styles.js.map +1 -1
  134. package/dist/components/kemet-modal/docs/stories.d.ts +2 -0
  135. package/dist/components/kemet-modal/docs/stories.js +25 -68
  136. package/dist/components/kemet-modal/docs/stories.js.map +1 -1
  137. package/dist/components/kemet-modal/kemet-modal-close.js +1 -1
  138. package/dist/components/kemet-modal/kemet-modal-close.js.map +1 -1
  139. package/dist/components/kemet-modal/kemet-modal.d.ts +16 -6
  140. package/dist/components/kemet-modal/kemet-modal.js +37 -18
  141. package/dist/components/kemet-modal/kemet-modal.js.map +1 -1
  142. package/dist/components/kemet-modal/styles.js +77 -48
  143. package/dist/components/kemet-modal/styles.js.map +1 -1
  144. package/dist/components/kemet-password/docs/stories.js +10 -18
  145. package/dist/components/kemet-password/docs/stories.js.map +1 -1
  146. package/dist/components/kemet-password/styles.js +7 -7
  147. package/dist/components/kemet-password/styles.js.map +1 -1
  148. package/dist/components/kemet-popper/docs/stories.d.ts +2 -0
  149. package/dist/components/kemet-popper/docs/stories.js +32 -39
  150. package/dist/components/kemet-popper/docs/stories.js.map +1 -1
  151. package/dist/components/kemet-popper/kemet-popper.d.ts +1 -3
  152. package/dist/components/kemet-popper/kemet-popper.js +3 -8
  153. package/dist/components/kemet-popper/kemet-popper.js.map +1 -1
  154. package/dist/components/kemet-popper/styles.js +14 -5
  155. package/dist/components/kemet-popper/styles.js.map +1 -1
  156. package/dist/components/kemet-radio/docs/stories.d.ts +2 -0
  157. package/dist/components/kemet-radio/docs/stories.js +24 -20
  158. package/dist/components/kemet-radio/docs/stories.js.map +1 -1
  159. package/dist/components/kemet-radio/kemet-radio.d.ts +7 -6
  160. package/dist/components/kemet-radio/kemet-radio.js +7 -6
  161. package/dist/components/kemet-radio/kemet-radio.js.map +1 -1
  162. package/dist/components/kemet-radio/kemet-radios.d.ts +1 -1
  163. package/dist/components/kemet-radio/kemet-radios.js +1 -1
  164. package/dist/components/kemet-radio/kemet-radios.js.map +1 -1
  165. package/dist/components/kemet-radio/styles.js +26 -16
  166. package/dist/components/kemet-radio/styles.js.map +1 -1
  167. package/dist/components/kemet-rotator/docs/stories.d.ts +1 -0
  168. package/dist/components/kemet-rotator/docs/stories.js +16 -28
  169. package/dist/components/kemet-rotator/docs/stories.js.map +1 -1
  170. package/dist/components/kemet-rotator/kemet-rotator.d.ts +2 -2
  171. package/dist/components/kemet-rotator/kemet-rotator.js +1 -1
  172. package/dist/components/kemet-rotator/kemet-rotator.js.map +1 -1
  173. package/dist/components/kemet-rotator/styles.js +4 -2
  174. package/dist/components/kemet-rotator/styles.js.map +1 -1
  175. package/dist/components/kemet-scroll-link/docs/stories.js +2 -2
  176. package/dist/components/kemet-scroll-link/docs/stories.js.map +1 -1
  177. package/dist/components/kemet-scroll-nav/docs/stories.js +5 -5
  178. package/dist/components/kemet-scroll-nav/docs/stories.js.map +1 -1
  179. package/dist/components/kemet-scroll-nav/kemet-scroll-nav.d.ts +5 -5
  180. package/dist/components/kemet-scroll-nav/kemet-scroll-nav.js +5 -5
  181. package/dist/components/kemet-scroll-nav/kemet-scroll-nav.js.map +1 -1
  182. package/dist/components/kemet-scroll-nav/styles.js +10 -4
  183. package/dist/components/kemet-scroll-nav/styles.js.map +1 -1
  184. package/dist/components/kemet-scroll-snap/docs/stories.d.ts +6 -0
  185. package/dist/components/kemet-scroll-snap/docs/stories.js +72 -82
  186. package/dist/components/kemet-scroll-snap/docs/stories.js.map +1 -1
  187. package/dist/components/kemet-scroll-snap/kemet-scroll-snap-paginator.d.ts +3 -3
  188. package/dist/components/kemet-scroll-snap/kemet-scroll-snap-paginator.js +3 -3
  189. package/dist/components/kemet-scroll-snap/kemet-scroll-snap-paginator.js.map +1 -1
  190. package/dist/components/kemet-scroll-snap/kemet-scroll-snap.d.ts +4 -4
  191. package/dist/components/kemet-scroll-snap/kemet-scroll-snap.js +4 -4
  192. package/dist/components/kemet-scroll-snap/kemet-scroll-snap.js.map +1 -1
  193. package/dist/components/kemet-scroll-snap/styles.js +14 -6
  194. package/dist/components/kemet-scroll-snap/styles.js.map +1 -1
  195. package/dist/components/kemet-select/docs/stories.d.ts +3 -0
  196. package/dist/components/kemet-select/docs/stories.js +25 -33
  197. package/dist/components/kemet-select/docs/stories.js.map +1 -1
  198. package/dist/components/kemet-select/kemet-select.d.ts +13 -13
  199. package/dist/components/kemet-select/kemet-select.js +13 -13
  200. package/dist/components/kemet-select/kemet-select.js.map +1 -1
  201. package/dist/components/kemet-select/styles.js +32 -16
  202. package/dist/components/kemet-select/styles.js.map +1 -1
  203. package/dist/components/kemet-sortable/docs/stories.js +5 -10
  204. package/dist/components/kemet-sortable/docs/stories.js.map +1 -1
  205. package/dist/components/kemet-sortable/styles.js +1 -1
  206. package/dist/components/kemet-sortable/styles.js.map +1 -1
  207. package/dist/components/kemet-svgs/docs/stories.js +11 -11
  208. package/dist/components/kemet-svgs/docs/stories.js.map +1 -1
  209. package/dist/components/kemet-tabs/docs/stories.d.ts +9 -0
  210. package/dist/components/kemet-tabs/docs/stories.js +78 -78
  211. package/dist/components/kemet-tabs/docs/stories.js.map +1 -1
  212. package/dist/components/kemet-tabs/kemet-tab-panel.d.ts +1 -1
  213. package/dist/components/kemet-tabs/kemet-tab-panel.js +1 -1
  214. package/dist/components/kemet-tabs/kemet-tab-panel.js.map +1 -1
  215. package/dist/components/kemet-tabs/kemet-tab.d.ts +2 -2
  216. package/dist/components/kemet-tabs/kemet-tab.js +2 -2
  217. package/dist/components/kemet-tabs/kemet-tab.js.map +1 -1
  218. package/dist/components/kemet-tabs/kemet-tabs.d.ts +8 -8
  219. package/dist/components/kemet-tabs/kemet-tabs.js +16 -8
  220. package/dist/components/kemet-tabs/kemet-tabs.js.map +1 -1
  221. package/dist/components/kemet-tabs/styles.js +12 -5
  222. package/dist/components/kemet-tabs/styles.js.map +1 -1
  223. package/dist/components/kemet-textarea/docs/stories.d.ts +3 -0
  224. package/dist/components/kemet-textarea/docs/stories.js +37 -67
  225. package/dist/components/kemet-textarea/docs/stories.js.map +1 -1
  226. package/dist/components/kemet-textarea/kemet-textarea.d.ts +12 -12
  227. package/dist/components/kemet-textarea/kemet-textarea.js +12 -12
  228. package/dist/components/kemet-textarea/kemet-textarea.js.map +1 -1
  229. package/dist/components/kemet-textarea/styles.js +31 -16
  230. package/dist/components/kemet-textarea/styles.js.map +1 -1
  231. package/dist/components/kemet-toggle/docs/stories.d.ts +2 -0
  232. package/dist/components/kemet-toggle/docs/stories.js +21 -36
  233. package/dist/components/kemet-toggle/docs/stories.js.map +1 -1
  234. package/dist/components/kemet-toggle/kemet-toggle.d.ts +9 -9
  235. package/dist/components/kemet-toggle/kemet-toggle.js +9 -9
  236. package/dist/components/kemet-toggle/kemet-toggle.js.map +1 -1
  237. package/dist/components/kemet-toggle/styles.js +12 -6
  238. package/dist/components/kemet-toggle/styles.js.map +1 -1
  239. package/dist/components/kemet-tooltip/docs/stories.d.ts +4 -0
  240. package/dist/components/kemet-tooltip/docs/stories.js +58 -33
  241. package/dist/components/kemet-tooltip/docs/stories.js.map +1 -1
  242. package/dist/components/kemet-tooltip/styles.js +2 -2
  243. package/dist/components/kemet-tooltip/styles.js.map +1 -1
  244. package/dist/components/kemet-tracker/docs/stories.d.ts +1 -0
  245. package/dist/components/kemet-tracker/docs/stories.js +18 -22
  246. package/dist/components/kemet-tracker/docs/stories.js.map +1 -1
  247. package/dist/components/kemet-tracker/kemet-tracker-step.d.ts +16 -16
  248. package/dist/components/kemet-tracker/kemet-tracker-step.js +16 -16
  249. package/dist/components/kemet-tracker/kemet-tracker-step.js.map +1 -1
  250. package/dist/components/kemet-tracker/styles.js +23 -12
  251. package/dist/components/kemet-tracker/styles.js.map +1 -1
  252. package/dist/components/kemet-upload/docs/stories.js +17 -22
  253. package/dist/components/kemet-upload/docs/stories.js.map +1 -1
  254. package/dist/components/kemet-upload/kemet-upload-file.d.ts +3 -3
  255. package/dist/components/kemet-upload/kemet-upload-file.js +3 -3
  256. package/dist/components/kemet-upload/kemet-upload-file.js.map +1 -1
  257. package/dist/components/kemet-upload/kemet-upload.d.ts +4 -4
  258. package/dist/components/kemet-upload/kemet-upload.js +4 -4
  259. package/dist/components/kemet-upload/kemet-upload.js.map +1 -1
  260. package/dist/components/kemet-upload/styles.js +27 -18
  261. package/dist/components/kemet-upload/styles.js.map +1 -1
  262. package/dist/kemet-components.bundle.js +16 -17
  263. package/dist/kemet-components.bundle.js.map +1 -1
  264. package/dist/kemet-components.cjs +6866 -6753
  265. package/dist/kemet-components.js +6866 -6753
  266. package/dist/styles/kemet.base.css +255 -78
  267. package/dist/styles/kemet.base.css.map +1 -1
  268. package/dist/styles/kemet.base.scss +6 -5
  269. package/dist/styles/kemet.components.css +1 -16
  270. package/dist/styles/kemet.components.css.map +1 -1
  271. package/dist/styles/kemet.components.scss +0 -2
  272. package/dist/styles/kemet.core.css +5729 -1737
  273. package/dist/styles/kemet.core.css.map +1 -1
  274. package/dist/styles/shared/_config.scss +306 -93
  275. package/dist/styles/shared/_helpers.scss +88 -16
  276. package/dist/tsconfig.tsbuildinfo +1 -1
  277. package/package.json +13 -12
  278. package/dist/components/kemet-accordion/types.d.ts +0 -9
  279. package/dist/components/kemet-accordion/types.js +0 -2
  280. package/dist/components/kemet-accordion/types.js.map +0 -1
  281. package/dist/components/kemet-avatar/types.d.ts +0 -8
  282. package/dist/components/kemet-avatar/types.js +0 -2
  283. package/dist/components/kemet-avatar/types.js.map +0 -1
  284. package/dist/components/kemet-card/types.d.ts +0 -3
  285. package/dist/components/kemet-card/types.js +0 -2
  286. package/dist/components/kemet-card/types.js.map +0 -1
  287. package/dist/components/kemet-carousel/types.d.ts +0 -21
  288. package/dist/components/kemet-carousel/types.js +0 -2
  289. package/dist/components/kemet-carousel/types.js.map +0 -1
  290. package/dist/components/kemet-combo/types.d.ts +0 -5
  291. package/dist/components/kemet-combo/types.js +0 -2
  292. package/dist/components/kemet-combo/types.js.map +0 -1
  293. package/dist/components/kemet-draggable/types.d.ts +0 -6
  294. package/dist/components/kemet-draggable/types.js +0 -2
  295. package/dist/components/kemet-draggable/types.js.map +0 -1
  296. package/dist/styles/components/drawer.scss +0 -11
  297. package/dist/styles/components/modal.scss +0 -8
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-badge/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqC5B,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n :host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: var(--kemet-badge-padding, 10px);\n line-height: 1;\n color: var(--kemet-color-white);\n }\n\n :host([status='primary']) {\n background-color: var(--kemet-color-primary);\n }\n\n :host([status='success']) {\n background-color: var(--kemet-color-success);\n }\n\n :host([status='standard']) {\n background-color: var(--kemet-color-gray6);\n }\n\n :host([status='warning']) {\n background-color: var(--kemet-color-warning);\n }\n\n :host([status='error']) {\n background-color: var(--kemet-color-error);\n }\n\n :host([circle]) {\n border-radius: 50%;\n }\n\n :host([pill]) {\n border-radius: 99rem;\n }\n`;\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-badge/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuC5B,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n :host {\n --kemet-badge-padding: 10px;\n\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: var(--kemet-badge-padding);\n line-height: 1;\n color: rgb(var(--kemet-color-white));\n }\n\n :host([status='primary']) {\n background-color: rgb(var(--kemet-color-primary));\n }\n\n :host([status='success']) {\n background-color: rgb(var(--kemet-color-success));\n }\n\n :host([status='standard']) {\n background-color: rgb(var(--kemet-color-gray-500));\n }\n\n :host([status='warning']) {\n background-color: rgb(var(--kemet-color-warning));\n }\n\n :host([status='error']) {\n background-color: rgb(var(--kemet-color-error));\n }\n\n :host([circle]) {\n border-radius: var(--kemet-border-radius-circle);\n }\n\n :host([pill]) {\n border-radius: var(--kemet-border-radius-pill);\n }\n`;\n"]}
@@ -1,6 +1 @@
1
- export interface KemetBadge {
2
- status: string;
3
- circle: boolean;
4
- pill: boolean;
5
- circlePadding: number;
6
- }
1
+ export declare type TypeStatus = 'standard' | 'primary' | 'success' | 'warning' | 'error';
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/kemet-badge/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface KemetBadge {\n status: string,\n circle: boolean,\n pill: boolean,\n circlePadding: number,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/kemet-badge/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TypeStatus = 'standard' | 'primary' | 'success' | 'warning' | 'error';\n"]}
@@ -3,7 +3,19 @@ import '../kemet-button';
3
3
  import '../../kemet-tabs/kemet-tabs';
4
4
  import '../../kemet-tabs/kemet-tab';
5
5
  import '../../kemet-tabs/kemet-tab-panel';
6
+ import '../../kemet-icon/kemet-icon';
6
7
  declare const meta: Meta;
7
8
  export default meta;
8
9
  declare type Story = StoryObj;
9
10
  export declare const Standard: Story;
11
+ export declare const Text: Story;
12
+ export declare const Circle: Story;
13
+ export declare const Rounded: Story;
14
+ export declare const Pill: Story;
15
+ export declare const Outlined: Story;
16
+ export declare const OutlinedRounded: Story;
17
+ export declare const OutlinedPill: Story;
18
+ export declare const IconLeft: Story;
19
+ export declare const IconRight: Story;
20
+ export declare const Link: Story;
21
+ export declare const Disabled: Story;
@@ -4,30 +4,12 @@ import '../kemet-button';
4
4
  import '../../kemet-tabs/kemet-tabs';
5
5
  import '../../kemet-tabs/kemet-tab';
6
6
  import '../../kemet-tabs/kemet-tab-panel';
7
+ import '../../kemet-icon/kemet-icon';
7
8
  const meta = {
8
9
  title: 'Components / Button',
9
10
  component: 'kemet-button',
10
- };
11
- export default meta;
12
- const Template = ({ type = 'standard', outlined = false, iconLeft = '', iconRight = 'gear', link = '', disabled = false, }) => html `
13
- <kemet-button type="${type}" ?outlined=${outlined} ?disabled=${disabled} link=${ifDefined(link !== '' ? link : undefined)}>
14
- ${ifDefined(iconLeft !== '' && type !== 'circle' ? html `<kemet-icon slot="left" icon="${iconLeft}"></kemet-icon>` : undefined)}
15
- ${type === 'circle' ? html `<kemet-icon icon="gear" size="24"></kemet-icon>` : 'Button'}
16
- ${ifDefined(iconRight !== '' && type !== 'circle' ? html `<kemet-icon slot="right" icon="${iconRight}"></kemet-icon>` : undefined)}
17
- </kemet-button>
18
- `;
19
- export const Standard = {
20
- render: args => Template(args),
21
- args: {
22
- type: 'standard',
23
- outlined: false,
24
- iconLeft: '',
25
- iconRight: 'gear',
26
- link: '',
27
- disabled: false,
28
- },
29
11
  argTypes: {
30
- type: {
12
+ variant: {
31
13
  control: { type: 'select' },
32
14
  options: ['standard', 'text', 'circle', 'rounded', 'pill'],
33
15
  },
@@ -48,4 +30,83 @@ export const Standard = {
48
30
  },
49
31
  }
50
32
  };
33
+ export default meta;
34
+ const Template = (args) => html `
35
+ <kemet-button variant="${ifDefined(args.variant)}" ?outlined=${args.outlined} ?disabled=${args.disabled} link=${ifDefined(args.link !== '' ? args.link : undefined)}>
36
+ ${ifDefined(args.iconLeft !== '' && args.type !== 'circle' && args.iconLeft ? html `<kemet-icon slot="left" icon="${args.iconLeft}"></kemet-icon>` : undefined)}
37
+ ${args.variant === 'circle' ? html `<kemet-icon icon="gear" size="24"></kemet-icon>` : 'Button'}
38
+ ${ifDefined(args.iconRight !== '' && args.variant !== 'circle' && args.iconRight ? html `<kemet-icon slot="right" icon="${args.iconRight}"></kemet-icon>` : undefined)}
39
+ </kemet-button>
40
+ `;
41
+ export const Standard = {
42
+ render: args => Template(args),
43
+ };
44
+ export const Text = {
45
+ render: args => Template(args),
46
+ args: {
47
+ variant: 'text',
48
+ },
49
+ };
50
+ export const Circle = {
51
+ render: args => Template(args),
52
+ args: {
53
+ variant: 'circle',
54
+ },
55
+ };
56
+ export const Rounded = {
57
+ render: args => Template(args),
58
+ args: {
59
+ variant: 'rounded',
60
+ },
61
+ };
62
+ export const Pill = {
63
+ render: args => Template(args),
64
+ args: {
65
+ variant: 'pill',
66
+ },
67
+ };
68
+ export const Outlined = {
69
+ render: args => Template(args),
70
+ args: {
71
+ outlined: true,
72
+ },
73
+ };
74
+ export const OutlinedRounded = {
75
+ render: args => Template(args),
76
+ args: {
77
+ outlined: true,
78
+ variant: 'rounded',
79
+ },
80
+ };
81
+ export const OutlinedPill = {
82
+ render: args => Template(args),
83
+ args: {
84
+ outlined: true,
85
+ variant: 'pill',
86
+ },
87
+ };
88
+ export const IconLeft = {
89
+ render: args => Template(args),
90
+ args: {
91
+ iconLeft: 'chevron-left',
92
+ },
93
+ };
94
+ export const IconRight = {
95
+ render: args => Template(args),
96
+ args: {
97
+ iconRight: 'chevron-right',
98
+ },
99
+ };
100
+ export const Link = {
101
+ render: args => Template(args),
102
+ args: {
103
+ link: 'https://google.com',
104
+ },
105
+ };
106
+ export const Disabled = {
107
+ render: args => Template(args),
108
+ args: {
109
+ disabled: true,
110
+ },
111
+ };
51
112
  //# sourceMappingURL=stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../src/components/kemet-button/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B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B,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,KAAK;KAChB;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;SAC3D;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC7B;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B;QACD,SAAS,EAAE;YACT,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC7B;KACF;CACF,CAAC","sourcesContent":["import { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport type { Meta, StoryObj } from '@storybook/web-components';\n\nimport '../kemet-button';\n\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nconst meta: Meta = {\n title: 'Components / Button',\n component: 'kemet-button',\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst Template = ({\n type = 'standard',\n outlined = false,\n iconLeft = '',\n iconRight = 'gear',\n link = '',\n disabled = false,\n}) => html`\n <kemet-button type=\"${type}\" ?outlined=${outlined} ?disabled=${disabled} link=${ifDefined(link !== '' ? link : undefined)}>\n ${ifDefined(iconLeft !== '' && type !== 'circle' ? html`<kemet-icon slot=\"left\" icon=\"${iconLeft}\"></kemet-icon>` : undefined)}\n ${type === 'circle' ? html`<kemet-icon icon=\"gear\" size=\"24\"></kemet-icon>` : 'Button'}\n ${ifDefined(iconRight !== '' && type !== 'circle' ? html`<kemet-icon slot=\"right\" icon=\"${iconRight}\"></kemet-icon>` : undefined)}\n </kemet-button>\n`;\n\nexport const Standard: Story = {\n render: args => Template(args),\n args: {\n type: 'standard',\n outlined: false,\n iconLeft: '',\n iconRight: 'gear',\n link: '',\n disabled: false,\n },\n argTypes: {\n type: {\n control: { type: 'select' },\n options: ['standard', 'text', 'circle', 'rounded', 'pill'],\n },\n outlined: {\n control: { type: 'boolean' },\n },\n iconLeft: {\n control: { type: 'text' },\n },\n iconRight: {\n control: { type: 'text' },\n },\n link: {\n control: { type: 'text' },\n },\n disabled: {\n control: { type: 'boolean' },\n },\n }\n};\n"]}
1
+ {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../src/components/kemet-button/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,iBAAiB,CAAC;AAEzB,OAAO,6BAA6B,CAAC;AACrC,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAE1C,OAAO,6BAA6B,CAAC;AAErC,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,cAAc;IACzB,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC;SAC3D;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC7B;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B;QACD,SAAS,EAAE;YACT,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM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AM,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,IAAI,EAAE;QACJ,SAAS,EAAE,eAAe;KAC3B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAU;IACzB,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,oBAAoB;KAC3B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;IAC9B,IAAI,EAAE;QACJ,QAAQ,EAAE,IAAI;KACf;CACF,CAAC","sourcesContent":["import { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport type { Meta, StoryObj } from '@storybook/web-components';\n\nimport '../kemet-button';\n\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nimport '../../kemet-icon/kemet-icon';\n\nconst meta: Meta = {\n title: 'Components / Button',\n component: 'kemet-button',\n argTypes: {\n variant: {\n control: { type: 'select' },\n options: ['standard', 'text', 'circle', 'rounded', 'pill'],\n },\n outlined: {\n control: { type: 'boolean' },\n },\n iconLeft: {\n control: { type: 'text' },\n },\n iconRight: {\n control: { type: 'text' },\n },\n link: {\n control: { type: 'text' },\n },\n disabled: {\n control: { type: 'boolean' },\n },\n }\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst Template = (args) => html`\n <kemet-button variant=\"${ifDefined(args.variant)}\" ?outlined=${args.outlined} ?disabled=${args.disabled} link=${ifDefined(args.link !== '' ? args.link : undefined)}>\n ${ifDefined(args.iconLeft !== '' && args.type !== 'circle' && args.iconLeft ? html`<kemet-icon slot=\"left\" icon=\"${args.iconLeft}\"></kemet-icon>` : undefined)}\n ${args.variant === 'circle' ? html`<kemet-icon icon=\"gear\" size=\"24\"></kemet-icon>` : 'Button'}\n ${ifDefined(args.iconRight !== '' && args.variant !== 'circle' && args.iconRight ? html`<kemet-icon slot=\"right\" icon=\"${args.iconRight}\"></kemet-icon>` : undefined)}\n </kemet-button>\n`;\n\n\nexport const Standard: Story = {\n render: args => Template(args),\n};\n\nexport const Text: Story = {\n render: args => Template(args),\n args: {\n variant: 'text',\n },\n};\n\nexport const Circle: Story = {\n render: args => Template(args),\n args: {\n variant: 'circle',\n },\n};\n\nexport const Rounded: Story = {\n render: args => Template(args),\n args: {\n variant: 'rounded',\n },\n};\n\nexport const Pill: Story = {\n render: args => Template(args),\n args: {\n variant: 'pill',\n },\n};\n\nexport const Outlined: Story = {\n render: args => Template(args),\n args: {\n outlined: true,\n },\n};\n\nexport const OutlinedRounded: Story = {\n render: args => Template(args),\n args: {\n outlined: true,\n variant: 'rounded',\n },\n};\n\nexport const OutlinedPill: Story = {\n render: args => Template(args),\n args: {\n outlined: true,\n variant: 'pill',\n },\n};\n\nexport const IconLeft: Story = {\n render: args => Template(args),\n args: {\n iconLeft: 'chevron-left',\n },\n};\n\nexport const IconRight: Story = {\n render: args => Template(args),\n args: {\n iconRight: 'chevron-right',\n },\n};\n\nexport const Link: Story = {\n render: args => Template(args),\n args: {\n link: 'https://google.com',\n },\n};\n\nexport const Disabled: Story = {\n render: args => Template(args),\n args: {\n disabled: true,\n },\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
- import { TypeType } from './types';
2
+ import { TypeVariant } from './types';
3
3
  import { FormSubmitController } from '../../utilities/controllers/forms';
4
4
  import '../kemet-icon/kemet-icon';
5
5
  /**
@@ -15,31 +15,31 @@ import '../kemet-icon/kemet-icon';
15
15
  * @prop {string} link - The url a button should link too
16
16
  * @prop {boolean} outlined - Outline style for a button
17
17
  * @prop {boolean} disabled - Determines whether not a button is disabled
18
- * @prop {string} type - Controls the type of button. standard | text | circle | rounded | pill
18
+ * @prop {string} variant - Controls the type of button. standard | text | circle | rounded | pill
19
19
  *
20
20
  * @slot left - Allows you to place an icon to the left of the button text.
21
21
  * @slot right - Allows you to place an icon to the right of the button text.
22
22
  *
23
23
  * @csspart button - The button or anchor element.
24
24
  *
25
- * @cssproperty --kemet-button-font-size - The font size. Default: inherit.
26
- * @cssproperty --kemet-button-color - The text color. Default: --kemet-color-foreground.
27
- * @cssproperty --kemet-button-width - The width. Default: auto.
28
- * @cssproperty --kemet-button-height - The height. Default: auto.
29
- * @cssproperty --kemet-button-border - The border. Default: 0.
30
- * @cssproperty --kemet-button-border-radius - The border radius. Default: 0.
31
- * @cssproperty --kemet-button-transition-speed - The transition speed of the hover effect. Default: 300ms.
32
- * @cssproperty --kemet-button-background-color - The background color. Default: --kemet-color-background.
33
- * @cssproperty --kemet-button-hover-brightness - The brightness of the hover effect. Default: 1.25.
34
- * @cssproperty --kemet-button-gap - The gap between the button and icons. Default: 0.5rem.
35
- * @cssproperty --kemet-button-padding - The button padding. Default: 1rem 1.25rem.
36
- * @cssproperty --kemet-button-hover-decoration - The decoration for a text button's hover. Default: underline.
37
- * @cssproperty --kemet-button-circle-size - The diameter of a circle button. Default: 50px.
38
- * @cssproperty --kemet-button-rounded-amount - The border radius of the rounded button. Default: 6px.
39
- * @cssproperty --kemet-button-border-width - The width of the outline border. Default: 1px.
40
- * @cssproperty --kemet-button-border-style - The style of the outline border. Default: solid.
41
- * @cssproperty --kemet-button-border-color - The color of the outline border. Default: --kemet-color-primary.
42
- * @cssproperty --kemet-button-disabled-opacity - The opacity of the disabled state. Default: 0.5.
25
+ * @cssproperty --kemet-button-font-size - The font size.
26
+ * @cssproperty --kemet-button-color - The text color.
27
+ * @cssproperty --kemet-button-width - The width.
28
+ * @cssproperty --kemet-button-height - The height.
29
+ * @cssproperty --kemet-button-border - The border.
30
+ * @cssproperty --kemet-button-border-radius - The border radius.
31
+ * @cssproperty --kemet-button-transition-speed - The transition speed of the hover effect.
32
+ * @cssproperty --kemet-button-background-color - The background color.
33
+ * @cssproperty --kemet-button-hover-brightness - The brightness of the hover effect.
34
+ * @cssproperty --kemet-button-gap - The gap between the button and icons.
35
+ * @cssproperty --kemet-button-padding - The button padding.
36
+ * @cssproperty --kemet-button-hover-decoration - The decoration for a text button's hover.
37
+ * @cssproperty --kemet-button-circle-size - The diameter of a circle button.
38
+ * @cssproperty --kemet-button-rounded-amount - The border radius of the rounded button.
39
+ * @cssproperty --kemet-button-border-width - The width of the outline border.
40
+ * @cssproperty --kemet-button-border-style - The style of the outline border.
41
+ * @cssproperty --kemet-button-border-color - The color of the outline border.
42
+ * @cssproperty --kemet-button-disabled-opacity - The opacity of the disabled state.
43
43
  *
44
44
  */
45
45
  export default class KemetButton extends LitElement {
@@ -52,7 +52,7 @@ export default class KemetButton extends LitElement {
52
52
  link: string;
53
53
  outlined: boolean;
54
54
  disabled: boolean;
55
- type: TypeType;
55
+ variant: TypeVariant;
56
56
  constructor();
57
57
  render(): import("lit-html").TemplateResult<1>;
58
58
  /**
@@ -17,31 +17,31 @@ import '../kemet-icon/kemet-icon';
17
17
  * @prop {string} link - The url a button should link too
18
18
  * @prop {boolean} outlined - Outline style for a button
19
19
  * @prop {boolean} disabled - Determines whether not a button is disabled
20
- * @prop {string} type - Controls the type of button. standard | text | circle | rounded | pill
20
+ * @prop {string} variant - Controls the type of button. standard | text | circle | rounded | pill
21
21
  *
22
22
  * @slot left - Allows you to place an icon to the left of the button text.
23
23
  * @slot right - Allows you to place an icon to the right of the button text.
24
24
  *
25
25
  * @csspart button - The button or anchor element.
26
26
  *
27
- * @cssproperty --kemet-button-font-size - The font size. Default: inherit.
28
- * @cssproperty --kemet-button-color - The text color. Default: --kemet-color-foreground.
29
- * @cssproperty --kemet-button-width - The width. Default: auto.
30
- * @cssproperty --kemet-button-height - The height. Default: auto.
31
- * @cssproperty --kemet-button-border - The border. Default: 0.
32
- * @cssproperty --kemet-button-border-radius - The border radius. Default: 0.
33
- * @cssproperty --kemet-button-transition-speed - The transition speed of the hover effect. Default: 300ms.
34
- * @cssproperty --kemet-button-background-color - The background color. Default: --kemet-color-background.
35
- * @cssproperty --kemet-button-hover-brightness - The brightness of the hover effect. Default: 1.25.
36
- * @cssproperty --kemet-button-gap - The gap between the button and icons. Default: 0.5rem.
37
- * @cssproperty --kemet-button-padding - The button padding. Default: 1rem 1.25rem.
38
- * @cssproperty --kemet-button-hover-decoration - The decoration for a text button's hover. Default: underline.
39
- * @cssproperty --kemet-button-circle-size - The diameter of a circle button. Default: 50px.
40
- * @cssproperty --kemet-button-rounded-amount - The border radius of the rounded button. Default: 6px.
41
- * @cssproperty --kemet-button-border-width - The width of the outline border. Default: 1px.
42
- * @cssproperty --kemet-button-border-style - The style of the outline border. Default: solid.
43
- * @cssproperty --kemet-button-border-color - The color of the outline border. Default: --kemet-color-primary.
44
- * @cssproperty --kemet-button-disabled-opacity - The opacity of the disabled state. Default: 0.5.
27
+ * @cssproperty --kemet-button-font-size - The font size.
28
+ * @cssproperty --kemet-button-color - The text color.
29
+ * @cssproperty --kemet-button-width - The width.
30
+ * @cssproperty --kemet-button-height - The height.
31
+ * @cssproperty --kemet-button-border - The border.
32
+ * @cssproperty --kemet-button-border-radius - The border radius.
33
+ * @cssproperty --kemet-button-transition-speed - The transition speed of the hover effect.
34
+ * @cssproperty --kemet-button-background-color - The background color.
35
+ * @cssproperty --kemet-button-hover-brightness - The brightness of the hover effect.
36
+ * @cssproperty --kemet-button-gap - The gap between the button and icons.
37
+ * @cssproperty --kemet-button-padding - The button padding.
38
+ * @cssproperty --kemet-button-hover-decoration - The decoration for a text button's hover.
39
+ * @cssproperty --kemet-button-circle-size - The diameter of a circle button.
40
+ * @cssproperty --kemet-button-rounded-amount - The border radius of the rounded button.
41
+ * @cssproperty --kemet-button-border-width - The width of the outline border.
42
+ * @cssproperty --kemet-button-border-style - The style of the outline border.
43
+ * @cssproperty --kemet-button-border-color - The color of the outline border.
44
+ * @cssproperty --kemet-button-disabled-opacity - The opacity of the disabled state.
45
45
  *
46
46
  */
47
47
  let KemetButton = class KemetButton extends LitElement {
@@ -49,7 +49,7 @@ let KemetButton = class KemetButton extends LitElement {
49
49
  super();
50
50
  this.outlined = false;
51
51
  this.disabled = false;
52
- this.type = 'standard';
52
+ this.variant = 'standard';
53
53
  this.addEventListener('click', this.handleClick.bind(this));
54
54
  this.addEventListener('mouseover', this.handleMouseOver.bind(this));
55
55
  this.addEventListener('mouseout', this.handleMouseOut.bind(this));
@@ -144,8 +144,8 @@ __decorate([
144
144
  property({ type: Boolean, reflect: true })
145
145
  ], KemetButton.prototype, "disabled", void 0);
146
146
  __decorate([
147
- property({ type: String, reflect: true })
148
- ], KemetButton.prototype, "type", void 0);
147
+ property({ reflect: true })
148
+ ], KemetButton.prototype, "variant", void 0);
149
149
  KemetButton = __decorate([
150
150
  customElement('kemet-button')
151
151
  ], KemetButton);
@@ -1 +1 @@
1
- {"version":3,"file":"kemet-button.js","sourceRoot":"","sources":["../../../src/components/kemet-button/kemet-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,IAAqB,WAAW,GAAhC,MAAqB,WAAY,SAAQ,UAAU;IA2BjD;QACE,KAAK,EAAE,CAAC;QATV,aAAQ,GAAY,KAAK,CAAC;QAG1B,aAAQ,GAAY,KAAK,CAAC;QAG1B,SAAI,GAAa,UAAU,CAAC;QAK1B,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,gBAAgB,CAAC,WAAW,E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E;YAC3C,IAAI,CAAC,oBAAoB,CAAC,MAAM,EAAE,CAAC;SACpC;IACH,CAAC;IAED;;;OAGG;IACH,UAAU;QACR,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;QACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,KAAK;QACf,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,EAAE;YACvB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;SACrB;IACH,CAAC;CACF,CAAA;AA7GQ,kBAAM,GAAG,CAAC,UAAU,CAAC,CAAC;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC5B;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCACd;AAzBT,WAAW;IAD/B,aAAa,CAAC,cAAc,CAAC;GACT,WAAW,CAiH/B;eAjHoB,WAAW","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { TypeType } from './types';\nimport { stylesBase } from './styles';\nimport { FormSubmitController } from '../../utilities/controllers/forms';\nimport '../kemet-icon/kemet-icon';\n\n/**\n * @since 1.0.0\n * @status stable\n *\n * @tagname kemet-button\n * @summary A versatile button that can be used either to submit a form, trigger an action, or link to content.\n *\n * @prop {boolean} active - Determines whether or not the button is active\n * @prop {boolean} hover - Is true when the button is hovered\n * @prop {boolean} focused - Is true when the button is focused\n * @prop {string} link - The url a button should link too\n * @prop {boolean} outlined - Outline style for a button\n * @prop {boolean} disabled - Determines whether not a button is disabled\n * @prop {string} type - Controls the type of button. standard | text | circle | rounded | pill\n *\n * @slot left - Allows you to place an icon to the left of the button text.\n * @slot right - Allows you to place an icon to the right of the button text.\n *\n * @csspart button - The button or anchor element.\n *\n * @cssproperty --kemet-button-font-size - The font size. Default: inherit.\n * @cssproperty --kemet-button-color - The text color. Default: --kemet-color-foreground.\n * @cssproperty --kemet-button-width - The width. Default: auto.\n * @cssproperty --kemet-button-height - The height. Default: auto.\n * @cssproperty --kemet-button-border - The border. Default: 0.\n * @cssproperty --kemet-button-border-radius - The border radius. Default: 0.\n * @cssproperty --kemet-button-transition-speed - The transition speed of the hover effect. Default: 300ms.\n * @cssproperty --kemet-button-background-color - The background color. Default: --kemet-color-background.\n * @cssproperty --kemet-button-hover-brightness - The brightness of the hover effect. Default: 1.25.\n * @cssproperty --kemet-button-gap - The gap between the button and icons. Default: 0.5rem.\n * @cssproperty --kemet-button-padding - The button padding. Default: 1rem 1.25rem.\n * @cssproperty --kemet-button-hover-decoration - The decoration for a text button's hover. Default: underline.\n * @cssproperty --kemet-button-circle-size - The diameter of a circle button. Default: 50px.\n * @cssproperty --kemet-button-rounded-amount - The border radius of the rounded button. Default: 6px.\n * @cssproperty --kemet-button-border-width - The width of the outline border. Default: 1px.\n * @cssproperty --kemet-button-border-style - The style of the outline border. Default: solid.\n * @cssproperty --kemet-button-border-color - The color of the outline border. Default: --kemet-color-primary.\n * @cssproperty --kemet-button-disabled-opacity - The opacity of the disabled state. Default: 0.5.\n *\n */\n\n@customElement('kemet-button')\nexport default class KemetButton extends LitElement {\n /** @internal */\n formSubmitController: FormSubmitController;\n\n static styles = [stylesBase];\n\n @property({ type: Boolean, reflect: true })\n active: boolean;\n\n @property({ type: Boolean, reflect: true })\n hover: boolean;\n\n @property({ type: Boolean, reflect: true })\n focused: boolean;\n\n @property({ type: String })\n link: string;\n\n @property({ type: Boolean, reflect: true })\n outlined: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n @property({ type: String, reflect: true })\n type: TypeType = 'standard';\n\n constructor() {\n super();\n\n this.addEventListener('click', this.handleClick.bind(this));\n this.addEventListener('mouseover', this.handleMouseOver.bind(this));\n this.addEventListener('mouseout', this.handleMouseOut.bind(this));\n this.addEventListener('blur', this.handleBlur.bind(this));\n this.addEventListener('keyup', event => this.handleKeyUp(event));\n\n /** @internal */\n this.formSubmitController = new FormSubmitController(this);\n }\n\n render() {\n if (this.link && !this.disabled) {\n return html`\n <a href=${this.link} class=\"button\" role=\"button\" part=\"button\">\n <slot name=\"left\"></slot>\n <slot></slot>\n <slot name=\"right\"></slot>\n </a>\n `;\n }\n\n return html`\n <button class=\"button\" part=\"button\" ?disabled=${this.disabled} aria-disabled=${this.disabled ? 'true' : 'false'}>\n <slot name=\"left\"></slot>\n <slot></slot>\n <slot name=\"right\"></slot>\n </button>\n `;\n }\n\n /**\n * Sets hover to true onMouseOver\n * @private\n */\n handleMouseOver() {\n this.hover = true;\n }\n\n /**\n * Sets hover to false onMouseOut\n * @private\n */\n handleMouseOut() {\n this.hover = false;\n }\n\n /**\n * Handles click behavior\n * @private\n */\n handleClick() {\n this.hover = false;\n this.active = true;\n\n setTimeout(() => {\n this.active = false;\n }, 300);\n\n if (this.shadowRoot.querySelector('button')) {\n this.formSubmitController.submit();\n }\n }\n\n /**\n * Handles blur\n * @private\n */\n handleBlur() {\n this.focused = false;\n this.active = false;\n this.hover = false;\n }\n\n /**\n * Handles keyup\n * @private\n * @param {object} event - event object\n */\n handleKeyUp(event) {\n if (event.key === 'Tab') {\n this.focused = true;\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-button': KemetButton\n }\n}\n"]}
1
+ {"version":3,"file":"kemet-button.js","sourceRoot":"","sources":["../../../src/components/kemet-button/kemet-button.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,0BAA0B,CAAC;AAElC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAGH,IAAqB,WAAW,GAAhC,MAAqB,WAAY,SAAQ,UAAU;IA2BjD;QACE,KAAK,EAAE,CAAC;QATV,aAAQ,GAAY,KAAK,CAAC;QAG1B,aAAQ,GAAY,KAAK,CAAC;QAG1B,YAAO,GAAgB,UAAU,CAAC;QAKhC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACpE,IAAI,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAClE,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAC1D,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC;QAEjE,gBA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AAG,CAAC,UAAU,CAAC,CAAC;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC5B;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACM;AAzBf,WAAW;IAD/B,aAAa,CAAC,cAAc,CAAC;GACT,WAAW,CAiH/B;eAjHoB,WAAW","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { TypeVariant } from './types';\nimport { stylesBase } from './styles';\nimport { FormSubmitController } from '../../utilities/controllers/forms';\nimport '../kemet-icon/kemet-icon';\n\n/**\n * @since 1.0.0\n * @status stable\n *\n * @tagname kemet-button\n * @summary A versatile button that can be used either to submit a form, trigger an action, or link to content.\n *\n * @prop {boolean} active - Determines whether or not the button is active\n * @prop {boolean} hover - Is true when the button is hovered\n * @prop {boolean} focused - Is true when the button is focused\n * @prop {string} link - The url a button should link too\n * @prop {boolean} outlined - Outline style for a button\n * @prop {boolean} disabled - Determines whether not a button is disabled\n * @prop {string} variant - Controls the type of button. standard | text | circle | rounded | pill\n *\n * @slot left - Allows you to place an icon to the left of the button text.\n * @slot right - Allows you to place an icon to the right of the button text.\n *\n * @csspart button - The button or anchor element.\n *\n * @cssproperty --kemet-button-font-size - The font size.\n * @cssproperty --kemet-button-color - The text color.\n * @cssproperty --kemet-button-width - The width.\n * @cssproperty --kemet-button-height - The height.\n * @cssproperty --kemet-button-border - The border.\n * @cssproperty --kemet-button-border-radius - The border radius.\n * @cssproperty --kemet-button-transition-speed - The transition speed of the hover effect.\n * @cssproperty --kemet-button-background-color - The background color.\n * @cssproperty --kemet-button-hover-brightness - The brightness of the hover effect.\n * @cssproperty --kemet-button-gap - The gap between the button and icons.\n * @cssproperty --kemet-button-padding - The button padding.\n * @cssproperty --kemet-button-hover-decoration - The decoration for a text button's hover.\n * @cssproperty --kemet-button-circle-size - The diameter of a circle button.\n * @cssproperty --kemet-button-rounded-amount - The border radius of the rounded button.\n * @cssproperty --kemet-button-border-width - The width of the outline border.\n * @cssproperty --kemet-button-border-style - The style of the outline border.\n * @cssproperty --kemet-button-border-color - The color of the outline border.\n * @cssproperty --kemet-button-disabled-opacity - The opacity of the disabled state.\n *\n */\n\n@customElement('kemet-button')\nexport default class KemetButton extends LitElement {\n /** @internal */\n formSubmitController: FormSubmitController;\n\n static styles = [stylesBase];\n\n @property({ type: Boolean, reflect: true })\n active: boolean;\n\n @property({ type: Boolean, reflect: true })\n hover: boolean;\n\n @property({ type: Boolean, reflect: true })\n focused: boolean;\n\n @property({ type: String })\n link: string;\n\n @property({ type: Boolean, reflect: true })\n outlined: boolean = false;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean = false;\n\n @property({ reflect: true })\n variant: TypeVariant = 'standard';\n\n constructor() {\n super();\n\n this.addEventListener('click', this.handleClick.bind(this));\n this.addEventListener('mouseover', this.handleMouseOver.bind(this));\n this.addEventListener('mouseout', this.handleMouseOut.bind(this));\n this.addEventListener('blur', this.handleBlur.bind(this));\n this.addEventListener('keyup', event => this.handleKeyUp(event));\n\n /** @internal */\n this.formSubmitController = new FormSubmitController(this);\n }\n\n render() {\n if (this.link && !this.disabled) {\n return html`\n <a href=${this.link} class=\"button\" role=\"button\" part=\"button\">\n <slot name=\"left\"></slot>\n <slot></slot>\n <slot name=\"right\"></slot>\n </a>\n `;\n }\n\n return html`\n <button class=\"button\" part=\"button\" ?disabled=${this.disabled} aria-disabled=${this.disabled ? 'true' : 'false'}>\n <slot name=\"left\"></slot>\n <slot></slot>\n <slot name=\"right\"></slot>\n </button>\n `;\n }\n\n /**\n * Sets hover to true onMouseOver\n * @private\n */\n handleMouseOver() {\n this.hover = true;\n }\n\n /**\n * Sets hover to false onMouseOut\n * @private\n */\n handleMouseOut() {\n this.hover = false;\n }\n\n /**\n * Handles click behavior\n * @private\n */\n handleClick() {\n this.hover = false;\n this.active = true;\n\n setTimeout(() => {\n this.active = false;\n }, 300);\n\n if (this.shadowRoot.querySelector('button')) {\n this.formSubmitController.submit();\n }\n }\n\n /**\n * Handles blur\n * @private\n */\n handleBlur() {\n this.focused = false;\n this.active = false;\n this.hover = false;\n }\n\n /**\n * Handles keyup\n * @private\n * @param {object} event - event object\n */\n handleKeyUp(event) {\n if (event.key === 'Tab') {\n this.focused = true;\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-button': KemetButton\n }\n}\n"]}
@@ -1,38 +1,58 @@
1
1
  import { css } from 'lit';
2
2
  export const stylesBase = css `
3
3
  :host {
4
+ --kemet-button-font-size: inherit;
5
+ --kemet-button-color: rgb(var(--kemet-color-background));
6
+ --kemet-button-width: auto;
7
+ --kemet-button-height: auto;
8
+ --kemet-button-border: 0;
9
+ --kemet-button-border-radius: 0;
10
+ --kemet-button-transition-speed: 300ms;
11
+ --kemet-button-background-color: rgb(var(--kemet-color-foreground));
12
+ --kemet-button-hover-brightness: 1.25;
13
+ --kemet-button-disabled-opacity: 0.5;
14
+ --kemet-button-gap: 0.5rem;
15
+ --kemet-button-padding: 1rem 1.25rem;
16
+ --kemet-button-hover-decoration: underline;
17
+ --kemet-button-circle-size: 50px;
18
+ --kemet-button-rounded-amount: 6px;
19
+ --kemet-button-border-width: 1.5px;
20
+ --kemet-button-border-style: solid;
21
+ --kemet-button-border-color: rgb(var(--kemet-color-foreground));
22
+
4
23
  cursor: pointer;
5
24
  display: inline-flex;
6
25
  align-items: center;
7
26
  justify-content: center;
8
- font-size: var(--kemet-button-font-size, inherit);
9
- color: var(--kemet-button-color, var(--kemet-color-foreground));
10
- width: var(--kemet-button-width, auto);
11
- height: var(--kemet-button-height, auto);
12
- border: var(--kemet-button-border, 0);
13
- border-radius: var(--kemet-button-border-radius, 0);
14
- transition: filter var(--kemet-button-transition-speed, 300ms) ease;
15
- background-color: var(--kemet-button-background-color, var(--kemet-color-background));
27
+ font-size: var(--kemet-button-font-size);
28
+ color: var(--kemet-button-color);
29
+ width: var(--kemet-button-width);
30
+ height: var(--kemet-button-height);
31
+ border: var(--kemet-button-border);
32
+ border-radius: var(--kemet-button-border-radius);
33
+ transition: filter var(--kemet-button-transition-speed) ease;
34
+ background-color: var(--kemet-button-background-color);
16
35
  }
17
36
 
18
37
  :host(:hover:not([disabled])) {
19
- filter: brightness(var(--kemet-button-hover-brightness, 1.25));
38
+ filter: brightness(var(--kemet-button-hover-brightness));
20
39
  }
21
40
 
22
41
  :host([disabled]) {
23
- opacity: var(--kemet-button-disabled-opacity, 0.5);
42
+ opacity: var(--kemet-button-disabled-opacity);
24
43
  }
25
44
 
26
45
  .button {
27
46
  cursor: pointer;
28
47
  text-decoration: none;
29
48
  display: flex;
30
- gap: var(--kemet-button-gap, 0.5rem);
49
+ gap: var(--kemet-button-gap);
31
50
  align-items: center;
51
+ justify-content: center;
32
52
  color: inherit;
33
53
  font-size: inherit;
34
54
  width: 100%;
35
- padding: var(--kemet-button-padding, 1rem 1.25rem);
55
+ padding: var(--kemet-button-padding);
36
56
  border: 0;
37
57
  background: none;
38
58
  }
@@ -41,33 +61,33 @@ export const stylesBase = css `
41
61
  cursor: not-allowed;
42
62
  }
43
63
 
44
- :host([type='text']) {
45
- --kemet-button-color: var(--kemet-color-text);
64
+ :host([variant='text']) {
65
+ --kemet-button-color: rgb(var(--kemet-color-text));
46
66
  --kemet-button-background-color: none;
47
67
  }
48
68
 
49
- :host([type='text']:hover) {
50
- text-decoration: var(--kemet-button-hover-decoration, underline);
69
+ :host([variant='text']:hover) {
70
+ text-decoration: var(--kemet-button-hover-decoration);
51
71
  }
52
72
 
53
- :host([type='circle']) {
54
- --kemet-button-border-radius: 50%;
55
- --kemet-button-width: var(--kemet-button-circle-size, 50px);
56
- --kemet-button-height: var(--kemet-button-circle-size, 50px);
73
+ :host([variant='circle']) {
74
+ --kemet-button-border-radius: var(--kemet-border-radius-circle);
75
+ --kemet-button-width: var(--kemet-button-circle-size);
76
+ --kemet-button-height: var(--kemet-button-circle-size);
57
77
  }
58
78
 
59
- :host([type='rounded']) {
60
- --kemet-button-border-radius: var(--kemet-button-rounded-amount, 6px);
79
+ :host([variant='rounded']) {
80
+ --kemet-button-border-radius: var(--kemet-button-rounded-amount);
61
81
  }
62
82
 
63
- :host([type='pill']) {
64
- --kemet-button-border-radius: 10rem;
83
+ :host([variant='pill']) {
84
+ --kemet-button-border-radius: var(--kemet-border-radius-pill);
65
85
  }
66
86
 
67
87
  :host([outlined]) {
68
- --kemet-button-color: var(--kemet-color-background);
88
+ --kemet-button-color: rgb(var(--kemet-color-foreground));
69
89
  --kemet-button-background-color: transparent;
70
- --kemet-button-border: var(--kemet-button-border-width, 1px) var(--kemet-button-border-style, solid) var(--kemet-button-border-color, var(--kemet-color-background));
90
+ --kemet-button-border: var(--kemet-button-border-width) var(--kemet-button-border-style) var(--kemet-button-border-color);
71
91
  }
72
92
  `;
73
93
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsE5B,CAAA","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n :host {\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: var(--kemet-button-font-size, inherit);\n color: var(--kemet-button-color, var(--kemet-color-foreground));\n width: var(--kemet-button-width, auto);\n height: var(--kemet-button-height, auto);\n border: var(--kemet-button-border, 0);\n border-radius: var(--kemet-button-border-radius, 0);\n transition: filter var(--kemet-button-transition-speed, 300ms) ease;\n background-color: var(--kemet-button-background-color, var(--kemet-color-background));\n }\n\n :host(:hover:not([disabled])) {\n filter: brightness(var(--kemet-button-hover-brightness, 1.25));\n }\n\n :host([disabled]) {\n opacity: var(--kemet-button-disabled-opacity, 0.5);\n }\n\n .button {\n cursor: pointer;\n text-decoration: none;\n display: flex;\n gap: var(--kemet-button-gap, 0.5rem);\n align-items: center;\n color: inherit;\n font-size: inherit;\n width: 100%;\n padding: var(--kemet-button-padding, 1rem 1.25rem);\n border: 0;\n background: none;\n }\n\n :host([disabled]) .button {\n cursor: not-allowed;\n }\n\n :host([type='text']) {\n --kemet-button-color: var(--kemet-color-text);\n --kemet-button-background-color: none;\n }\n\n :host([type='text']:hover) {\n text-decoration: var(--kemet-button-hover-decoration, underline);\n }\n\n :host([type='circle']) {\n --kemet-button-border-radius: 50%;\n --kemet-button-width: var(--kemet-button-circle-size, 50px);\n --kemet-button-height: var(--kemet-button-circle-size, 50px);\n }\n\n :host([type='rounded']) {\n --kemet-button-border-radius: var(--kemet-button-rounded-amount, 6px);\n }\n\n :host([type='pill']) {\n --kemet-button-border-radius: 10rem;\n }\n\n :host([outlined]) {\n --kemet-button-color: var(--kemet-color-background);\n --kemet-button-background-color: transparent;\n --kemet-button-border: var(--kemet-button-border-width, 1px) var(--kemet-button-border-style, solid) var(--kemet-button-border-color, var(--kemet-color-background));\n }\n`\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-button/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0F5B,CAAA","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n :host {\n --kemet-button-font-size: inherit;\n --kemet-button-color: rgb(var(--kemet-color-background));\n --kemet-button-width: auto;\n --kemet-button-height: auto;\n --kemet-button-border: 0;\n --kemet-button-border-radius: 0;\n --kemet-button-transition-speed: 300ms;\n --kemet-button-background-color: rgb(var(--kemet-color-foreground));\n --kemet-button-hover-brightness: 1.25;\n --kemet-button-disabled-opacity: 0.5;\n --kemet-button-gap: 0.5rem;\n --kemet-button-padding: 1rem 1.25rem;\n --kemet-button-hover-decoration: underline;\n --kemet-button-circle-size: 50px;\n --kemet-button-rounded-amount: 6px;\n --kemet-button-border-width: 1.5px;\n --kemet-button-border-style: solid;\n --kemet-button-border-color: rgb(var(--kemet-color-foreground));\n\n cursor: pointer;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: var(--kemet-button-font-size);\n color: var(--kemet-button-color);\n width: var(--kemet-button-width);\n height: var(--kemet-button-height);\n border: var(--kemet-button-border);\n border-radius: var(--kemet-button-border-radius);\n transition: filter var(--kemet-button-transition-speed) ease;\n background-color: var(--kemet-button-background-color);\n }\n\n :host(:hover:not([disabled])) {\n filter: brightness(var(--kemet-button-hover-brightness));\n }\n\n :host([disabled]) {\n opacity: var(--kemet-button-disabled-opacity);\n }\n\n .button {\n cursor: pointer;\n text-decoration: none;\n display: flex;\n gap: var(--kemet-button-gap);\n align-items: center;\n justify-content: center;\n color: inherit;\n font-size: inherit;\n width: 100%;\n padding: var(--kemet-button-padding);\n border: 0;\n background: none;\n }\n\n :host([disabled]) .button {\n cursor: not-allowed;\n }\n\n :host([variant='text']) {\n --kemet-button-color: rgb(var(--kemet-color-text));\n --kemet-button-background-color: none;\n }\n\n :host([variant='text']:hover) {\n text-decoration: var(--kemet-button-hover-decoration);\n }\n\n :host([variant='circle']) {\n --kemet-button-border-radius: var(--kemet-border-radius-circle);\n --kemet-button-width: var(--kemet-button-circle-size);\n --kemet-button-height: var(--kemet-button-circle-size);\n }\n\n :host([variant='rounded']) {\n --kemet-button-border-radius: var(--kemet-button-rounded-amount);\n }\n\n :host([variant='pill']) {\n --kemet-button-border-radius: var(--kemet-border-radius-pill);\n }\n\n :host([outlined]) {\n --kemet-button-color: rgb(var(--kemet-color-foreground));\n --kemet-button-background-color: transparent;\n --kemet-button-border: var(--kemet-button-border-width) var(--kemet-button-border-style) var(--kemet-button-border-color);\n }\n`\n"]}
@@ -1,10 +1 @@
1
- export declare type TypeType = 'standard' | 'text' | 'circle' | 'rounded' | 'pill';
2
- export interface KemetButtonInterface {
3
- active: boolean;
4
- hover: boolean;
5
- focused: boolean;
6
- link: string;
7
- outlined: boolean;
8
- disabled: boolean;
9
- type: TypeType;
10
- }
1
+ export declare type TypeVariant = 'standard' | 'text' | 'circle' | 'rounded' | 'pill';
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/kemet-button/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TypeType = 'standard' | 'text' | 'circle' | 'rounded' | 'pill';\n\nexport interface KemetButtonInterface {\n active: boolean,\n hover: boolean,\n focused: boolean,\n link: string,\n outlined: boolean,\n disabled: boolean,\n type: TypeType,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/kemet-button/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TypeVariant = 'standard' | 'text' | 'circle' | 'rounded' | 'pill';\n"]}
@@ -3,7 +3,17 @@ import '../kemet-card';
3
3
  import '../../kemet-tabs/kemet-tabs';
4
4
  import '../../kemet-tabs/kemet-tab';
5
5
  import '../../kemet-tabs/kemet-tab-panel';
6
+ import '../../kemet-avatar/kemet-avatar';
7
+ import '../../kemet-icon/kemet-icon';
6
8
  declare const meta: Meta;
7
9
  export default meta;
8
10
  declare type Story = StoryObj;
9
11
  export declare const Standard: Story;
12
+ export declare const Header: Story;
13
+ export declare const Footer: Story;
14
+ export declare const HeaderAndFooter: Story;
15
+ export declare const Image: Story;
16
+ export declare const Video: Story;
17
+ export declare const Embed: Story;
18
+ export declare const Avatar: Story;
19
+ export declare const Full: Story;