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
@@ -16,12 +16,12 @@ import { LitElement } from 'lit';
16
16
  * @slot Icon - A slot for an icon to display.
17
17
  * @slot default - The text for the FAB.
18
18
  *
19
- * @cssproperty --kemet-fab-size - The width and height of the fab. Default: 50px.
20
- * @cssproperty --kemet-fab-color - The text color of the fab. Default: var(--kemet-color-white).
21
- * @cssproperty --kemet-fab-background-color - The bg color of the tab. Default: var(--kemet-color-primary).
22
- * @cssproperty --kemet-fab-outlined-color - The text color of an outlined fab. Default: var(--kemet-color-primary).
23
- * @cssproperty --kemet-fab-outlined-border - The border of an outlined fab. Default: 1px solid var(--kemet-color-primary).
24
- * @cssproperty --kemet-fab-pill-radius - The border radius of a pill fab. Default: 10rem.
19
+ * @cssproperty --kemet-fab-size - The width and height of the fab.
20
+ * @cssproperty --kemet-fab-color - The text color of the fab.
21
+ * @cssproperty --kemet-fab-background-color - The bg color of the tab.
22
+ * @cssproperty --kemet-fab-outlined-color - The text color of an outlined fab.
23
+ * @cssproperty --kemet-fab-outlined-border - The border of an outlined fab.
24
+ * @cssproperty --kemet-fab-pill-radius - The border radius of a pill fab.
25
25
  *
26
26
  * @csspart button - The button's container.
27
27
  * @csspart icon - The FAB's icon.
@@ -19,12 +19,12 @@ import { stylesBase } from './styles';
19
19
  * @slot Icon - A slot for an icon to display.
20
20
  * @slot default - The text for the FAB.
21
21
  *
22
- * @cssproperty --kemet-fab-size - The width and height of the fab. Default: 50px.
23
- * @cssproperty --kemet-fab-color - The text color of the fab. Default: var(--kemet-color-white).
24
- * @cssproperty --kemet-fab-background-color - The bg color of the tab. Default: var(--kemet-color-primary).
25
- * @cssproperty --kemet-fab-outlined-color - The text color of an outlined fab. Default: var(--kemet-color-primary).
26
- * @cssproperty --kemet-fab-outlined-border - The border of an outlined fab. Default: 1px solid var(--kemet-color-primary).
27
- * @cssproperty --kemet-fab-pill-radius - The border radius of a pill fab. Default: 10rem.
22
+ * @cssproperty --kemet-fab-size - The width and height of the fab.
23
+ * @cssproperty --kemet-fab-color - The text color of the fab.
24
+ * @cssproperty --kemet-fab-background-color - The bg color of the tab.
25
+ * @cssproperty --kemet-fab-outlined-color - The text color of an outlined fab.
26
+ * @cssproperty --kemet-fab-outlined-border - The border of an outlined fab.
27
+ * @cssproperty --kemet-fab-pill-radius - The border radius of a pill fab.
28
28
  *
29
29
  * @csspart button - The button's container.
30
30
  * @csspart icon - The FAB's icon.
@@ -1 +1 @@
1
- {"version":3,"file":"kemet-fab.js","sourceRoot":"","sources":["../../../src/components/kemet-fab/kemet-fab.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAGH,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,SAAQ,UAAU;IAAhD;;QAIE,aAAQ,GAAY,KAAK,CAAC;QAG1B,aAAQ,GAAY,KAAK,CAAC;QAG1B,aAAQ,GAAY,KAAK,CAAC;IA4D5B,CAAC;IAjDC,YAAY;QACV,SAAS;QACT,MAAM,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAChE,IAAI,CAAC,gBAAgB,CAAC,WAAW,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;Q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,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAC7B;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;6CAClC;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+CAClC;AAnBH,QAAQ;IAD5B,aAAa,CAAC,WAAW,CAAC;GACN,QAAQ,CAsE5B;eAtEoB,QAAQ","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { stylesBase } from './styles';\n\n/**\n * @since 1.2.0\n * @status stable\n *\n * @tagname kemet-fab\n * @summary The FAB, or Floating Action Button, performs a primary action on a page.\n *\n * @prop {boolean} expanded - The expanded state of the button.\n * @prop {boolean} outlined - Outline style for a button.\n * @prop {boolean} disabled - Determines whether not a button is disabled.\n * @prop {boolean} pill - Displays the fab with rounded corners.\n * @prop {number} expandPoint - The distance, in pixels, where the fab should automatically expand.\n * @prop {number} collapsePoint - The distance, in pixels, where the fab should automatically collapse.\n *\n * @slot Icon - A slot for an icon to display.\n * @slot default - The text for the FAB.\n *\n * @cssproperty --kemet-fab-size - The width and height of the fab. Default: 50px.\n * @cssproperty --kemet-fab-color - The text color of the fab. Default: var(--kemet-color-white).\n * @cssproperty --kemet-fab-background-color - The bg color of the tab. Default: var(--kemet-color-primary).\n * @cssproperty --kemet-fab-outlined-color - The text color of an outlined fab. Default: var(--kemet-color-primary).\n * @cssproperty --kemet-fab-outlined-border - The border of an outlined fab. Default: 1px solid var(--kemet-color-primary).\n * @cssproperty --kemet-fab-pill-radius - The border radius of a pill fab. Default: 10rem.\n *\n * @csspart button - The button's container.\n * @csspart icon - The FAB's icon.\n * @csspart text - The text in the FAB.\n *\n */\n\n@customElement('kemet-fab')\nexport default class KemetFAB extends LitElement {\n static styles = [stylesBase];\n\n @property({ type: Boolean, reflect: true })\n expanded: boolean = false;\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: Boolean, reflect: true })\n pill: boolean;\n\n @property({ type: Number, attribute: 'expand-point' })\n expandPoint: number;\n\n @property({ type: Number, attribute: 'collapse-point' })\n collapsePoint: number;\n\n firstUpdated() {\n // events\n window.addEventListener('scroll', this.handleScroll.bind(this));\n this.addEventListener('mouseover', this.handleMouseOver.bind(this));\n this.addEventListener('mouseout', this.handleMouseOut.bind(this));\n }\n\n render() {\n return html`\n <button class=\"button\" part=\"button\" ?disabled=${this.disabled} aria-disabled=${this.disabled ? 'true' : 'false'}>\n <span class=\"icon\" part=\"icon\">\n <slot name=\"icon\"></slot>\n </span>\n <span class=\"text\" part=\"text\">\n <slot></slot>\n </span>\n </button>\n `;\n }\n\n handleMouseOver() {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n handleMouseOut() {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n handleScroll() {\n if (window.scrollY > this.expandPoint) {\n this.expanded = true;\n }\n\n if (window.scrollY < this.expandPoint) {\n this.expanded = false;\n }\n\n if (window.scrollY > this.collapsePoint) {\n this.expanded = false;\n }\n\n if (window.scrollY < this.collapsePoint) {\n this.expanded = true;\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-fab': KemetFAB\n }\n}\n"]}
1
+ {"version":3,"file":"kemet-fab.js","sourceRoot":"","sources":["../../../src/components/kemet-fab/kemet-fab.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,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AAG,IAAI,CAAC,aAAa,EAAE;YACvC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;SACvB;QAED,IAAI,MAAM,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,EAAE;YACvC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;SACtB;IACH,CAAC;CACF,CAAA;AArEQ,eAAM,GAAG,CAAC,UAAU,CAAC,CAAC;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACjB;AAG1B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;sCAC7B;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;6CAClC;AAGpB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+CAClC;AAnBH,QAAQ;IAD5B,aAAa,CAAC,WAAW,CAAC;GACN,QAAQ,CAsE5B;eAtEoB,QAAQ","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { stylesBase } from './styles';\n\n/**\n * @since 1.2.0\n * @status stable\n *\n * @tagname kemet-fab\n * @summary The FAB, or Floating Action Button, performs a primary action on a page.\n *\n * @prop {boolean} expanded - The expanded state of the button.\n * @prop {boolean} outlined - Outline style for a button.\n * @prop {boolean} disabled - Determines whether not a button is disabled.\n * @prop {boolean} pill - Displays the fab with rounded corners.\n * @prop {number} expandPoint - The distance, in pixels, where the fab should automatically expand.\n * @prop {number} collapsePoint - The distance, in pixels, where the fab should automatically collapse.\n *\n * @slot Icon - A slot for an icon to display.\n * @slot default - The text for the FAB.\n *\n * @cssproperty --kemet-fab-size - The width and height of the fab.\n * @cssproperty --kemet-fab-color - The text color of the fab.\n * @cssproperty --kemet-fab-background-color - The bg color of the tab.\n * @cssproperty --kemet-fab-outlined-color - The text color of an outlined fab.\n * @cssproperty --kemet-fab-outlined-border - The border of an outlined fab.\n * @cssproperty --kemet-fab-pill-radius - The border radius of a pill fab.\n *\n * @csspart button - The button's container.\n * @csspart icon - The FAB's icon.\n * @csspart text - The text in the FAB.\n *\n */\n\n@customElement('kemet-fab')\nexport default class KemetFAB extends LitElement {\n static styles = [stylesBase];\n\n @property({ type: Boolean, reflect: true })\n expanded: boolean = false;\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: Boolean, reflect: true })\n pill: boolean;\n\n @property({ type: Number, attribute: 'expand-point' })\n expandPoint: number;\n\n @property({ type: Number, attribute: 'collapse-point' })\n collapsePoint: number;\n\n firstUpdated() {\n // events\n window.addEventListener('scroll', this.handleScroll.bind(this));\n this.addEventListener('mouseover', this.handleMouseOver.bind(this));\n this.addEventListener('mouseout', this.handleMouseOut.bind(this));\n }\n\n render() {\n return html`\n <button class=\"button\" part=\"button\" ?disabled=${this.disabled} aria-disabled=${this.disabled ? 'true' : 'false'}>\n <span class=\"icon\" part=\"icon\">\n <slot name=\"icon\"></slot>\n </span>\n <span class=\"text\" part=\"text\">\n <slot></slot>\n </span>\n </button>\n `;\n }\n\n handleMouseOver() {\n if (!this.disabled) {\n this.expanded = true;\n }\n }\n\n handleMouseOut() {\n if (!this.disabled) {\n this.expanded = false;\n }\n }\n\n handleScroll() {\n if (window.scrollY > this.expandPoint) {\n this.expanded = true;\n }\n\n if (window.scrollY < this.expandPoint) {\n this.expanded = false;\n }\n\n if (window.scrollY > this.collapsePoint) {\n this.expanded = false;\n }\n\n if (window.scrollY < this.collapsePoint) {\n this.expanded = true;\n }\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-fab': KemetFAB\n }\n}\n"]}
@@ -2,13 +2,22 @@ import { css } from 'lit';
2
2
  export const stylesBase = css `
3
3
  :host {
4
4
  --kemet-fab-size: 50px;
5
+ --kemet-fab-color: rgb(var(--kemet-color-white));
6
+ --kemet-fab-background-color: rgb(var(--kemet-color-primary));
7
+ --kemet-fab-outlined-color: rgb(var(--kemet-color-foreground));
8
+ --kemet-fab-outlined-border: 1px solid rgb(var(--kemet-color-foreground));
9
+ --kemet-fab-pill-radius: 10rem;
10
+ --kemet-fab-background-color: rgb(var(--kemet-color-primary));
11
+ --kemet-fab-outline-border: 1px solid rgb(var(--kemet-color-primary));
12
+ --kemet-fab-color: rgb(var(--kemet-color-white));
13
+ --kemet-fab-outlined-color: rgb(var(--kemet-color-foreground));
5
14
 
6
15
  display: inline-block;
7
16
  position: relative;
8
17
  }
9
18
 
10
19
  button {
11
- color: var(--kemet-fab-color, var(--kemet-color-white));
20
+ color: var(--kemet-fab-color);
12
21
  font-size: inherit;
13
22
  display: inline-flex;
14
23
  padding: 0;
@@ -20,17 +29,17 @@ export const stylesBase = css `
20
29
  justify-content: flex-start;
21
30
  transition: all 0.4s ease;
22
31
  border: none;
23
- background-color: var(--kemet-fab-background-color, var(--kemet-color-primary));
32
+ background-color: var(--kemet-fab-background-color);
24
33
  }
25
34
 
26
35
  :host([outlined]) button {
27
- color: var(--kemet-fab-outlined-color, var(--kemet-color-background));
28
- border: var(--kemet-fab-outlined-border, 1px solid var(--kemet-color-background));
36
+ color: var(--kemet-fab-outlined-color);
37
+ border: var(--kemet-fab-outlined-border);
29
38
  background-color: transparent;
30
39
  }
31
40
 
32
41
  :host([pill]) button {
33
- border-radius: var(--kemet-fab-pill-radius, 10rem);
42
+ border-radius: var(--kemet-fab-pill-radius);
34
43
  }
35
44
 
36
45
  button::before {
@@ -44,15 +53,15 @@ export const stylesBase = css `
44
53
  width: 100%;
45
54
  height: 100%;
46
55
  transition: background-color 0.3s ease-in-out;
47
- background-color: var(--kemet-fab-background-color, var(--kemet-color-primary));
56
+ background-color: var(--kemet-fab-background-color);
48
57
  }
49
58
 
50
59
  :host([pill]) button::before {
51
- border-radius: var(--kemet-fab-pill-radius, 10rem);
60
+ border-radius: var(--kemet-fab-pill-radius);
52
61
  }
53
62
 
54
63
  :host([outlined]) button::before {
55
- border: var(--kemet-fab-outline-border, 1px solid var(--kemet-color-primary));
64
+ border: var(--kemet-fab-outline-border);
56
65
  background-color: transparent;
57
66
  }
58
67
 
@@ -76,7 +85,7 @@ export const stylesBase = css `
76
85
  }
77
86
 
78
87
  .text {
79
- color: var(--kemet-fab-color, var(--kemet-color-white));
88
+ color: var(--kemet-fab-color);
80
89
  z-index: 1;
81
90
  white-space: nowrap;
82
91
  pointer-events: none;
@@ -85,7 +94,7 @@ export const stylesBase = css `
85
94
  }
86
95
 
87
96
  :host([outlined]) .text {
88
- color: var(--kemet-fab-outlined-color, var(--kemet-color-background));
97
+ color: var(--kemet-fab-outlined-color);
89
98
  }
90
99
 
91
100
  :host([expanded]) .text {
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-fab/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4F5B,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n :host {\n --kemet-fab-size: 50px;\n\n display: inline-block;\n position: relative;\n }\n\n button {\n color: var(--kemet-fab-color, var(--kemet-color-white));\n font-size: inherit;\n display: inline-flex;\n padding: 0;\n position: relative;\n min-height: var(--kemet-fab-size);\n min-width: var(--kemet-fab-size);\n max-width: var(--kemet-fab-size);\n align-items: center;\n justify-content: flex-start;\n transition: all 0.4s ease;\n border: none;\n background-color: var(--kemet-fab-background-color, var(--kemet-color-primary));\n }\n\n :host([outlined]) button {\n color: var(--kemet-fab-outlined-color, var(--kemet-color-background));\n border: var(--kemet-fab-outlined-border, 1px solid var(--kemet-color-background));\n background-color: transparent;\n }\n\n :host([pill]) button {\n border-radius: var(--kemet-fab-pill-radius, 10rem);\n }\n\n button::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: -1;\n width: 100%;\n height: 100%;\n transition: background-color 0.3s ease-in-out;\n background-color: var(--kemet-fab-background-color, var(--kemet-color-primary));\n }\n\n :host([pill]) button::before {\n border-radius: var(--kemet-fab-pill-radius, 10rem);\n }\n\n :host([outlined]) button::before {\n border: var(--kemet-fab-outline-border, 1px solid var(--kemet-color-primary));\n background-color: transparent;\n }\n\n :host([expanded]) button {\n max-width: 99rem;\n padding: 0 1.35rem 0 0.25rem;\n }\n\n :host([disabled]) button {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .icon {\n width: var(--kemet-fab-size);\n height: var(--kemet-fab-size);\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n }\n\n .text {\n color: var(--kemet-fab-color, var(--kemet-color-white));\n z-index: 1;\n white-space: nowrap;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n }\n\n :host([outlined]) .text {\n color: var(--kemet-fab-outlined-color, var(--kemet-color-background));\n }\n\n :host([expanded]) .text {\n opacity: 1;\n }\n`;\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-fab/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqG5B,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n :host {\n --kemet-fab-size: 50px;\n --kemet-fab-color: rgb(var(--kemet-color-white));\n --kemet-fab-background-color: rgb(var(--kemet-color-primary));\n --kemet-fab-outlined-color: rgb(var(--kemet-color-foreground));\n --kemet-fab-outlined-border: 1px solid rgb(var(--kemet-color-foreground));\n --kemet-fab-pill-radius: 10rem;\n --kemet-fab-background-color: rgb(var(--kemet-color-primary));\n --kemet-fab-outline-border: 1px solid rgb(var(--kemet-color-primary));\n --kemet-fab-color: rgb(var(--kemet-color-white));\n --kemet-fab-outlined-color: rgb(var(--kemet-color-foreground));\n\n display: inline-block;\n position: relative;\n }\n\n button {\n color: var(--kemet-fab-color);\n font-size: inherit;\n display: inline-flex;\n padding: 0;\n position: relative;\n min-height: var(--kemet-fab-size);\n min-width: var(--kemet-fab-size);\n max-width: var(--kemet-fab-size);\n align-items: center;\n justify-content: flex-start;\n transition: all 0.4s ease;\n border: none;\n background-color: var(--kemet-fab-background-color);\n }\n\n :host([outlined]) button {\n color: var(--kemet-fab-outlined-color);\n border: var(--kemet-fab-outlined-border);\n background-color: transparent;\n }\n\n :host([pill]) button {\n border-radius: var(--kemet-fab-pill-radius);\n }\n\n button::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: -1;\n width: 100%;\n height: 100%;\n transition: background-color 0.3s ease-in-out;\n background-color: var(--kemet-fab-background-color);\n }\n\n :host([pill]) button::before {\n border-radius: var(--kemet-fab-pill-radius);\n }\n\n :host([outlined]) button::before {\n border: var(--kemet-fab-outline-border);\n background-color: transparent;\n }\n\n :host([expanded]) button {\n max-width: 99rem;\n padding: 0 1.35rem 0 0.25rem;\n }\n\n :host([disabled]) button {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .icon {\n width: var(--kemet-fab-size);\n height: var(--kemet-fab-size);\n display: flex;\n flex: 0 0 auto;\n align-items: center;\n justify-content: center;\n }\n\n .text {\n color: var(--kemet-fab-color);\n z-index: 1;\n white-space: nowrap;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n }\n\n :host([outlined]) .text {\n color: var(--kemet-fab-outlined-color);\n }\n\n :host([expanded]) .text {\n opacity: 1;\n }\n`;\n"]}
@@ -10,6 +10,6 @@ import '../../kemet-tabs/kemet-tab-panel';
10
10
  declare const meta: Meta;
11
11
  export default meta;
12
12
  declare type Story = StoryObj;
13
- export declare const Standard: Story;
13
+ export declare const Input: Story;
14
14
  export declare const Select: Story;
15
15
  export declare const Textarea: Story;
@@ -10,15 +10,25 @@ import '../../kemet-tabs/kemet-tab-panel';
10
10
  const meta = {
11
11
  title: 'Components / Field',
12
12
  component: 'kemet-accordion',
13
+ args: {
14
+ label: 'Label',
15
+ },
16
+ argTypes: {
17
+ status: {
18
+ name: 'Status',
19
+ control: { type: 'radio' },
20
+ options: ['standard', 'error', 'success', 'warning'],
21
+ },
22
+ }
13
23
  };
14
24
  export default meta;
15
- const TemplateInput = ({ label = 'Label', message = '', status = 'standard', }) => html `
16
- <kemet-field slug="unique-identifier" label="${label}" message="${message}" status="${status}">
17
- <kemet-input required slot="input" name="input-field" status="${status}" validate-on-blur></kemet-input>
25
+ const TemplateInput = (args) => html `
26
+ <kemet-field slug="unique-identifier" label="${args.label}" message="${args.message}" status="${args.status}">
27
+ <kemet-input required slot="input" name="input-field" status="${args.status}" validate-on-blur></kemet-input>
18
28
  </kemet-field>
19
29
  `;
20
- const TemplateSelect = ({ label = 'Label', message = '', status = 'standard', }) => html `
21
- <kemet-field slug="unique-identifier" label="${label}" message="${message}" status="${status}">
30
+ const TemplateSelect = (args) => html `
31
+ <kemet-field slug="unique-identifier" label="${args.label}" message="${args.message}" status="${args.status}">
22
32
  <kemet-select slot="input" name="select-field" status="${status}" required>
23
33
  <kemet-option label="Choose an Item" value=""></kemet-option>
24
34
  <kemet-option label="Item 1" value="1"></kemet-option>
@@ -28,78 +38,18 @@ const TemplateSelect = ({ label = 'Label', message = '', status = 'standard', })
28
38
  </kemet-select>
29
39
  </kemet-field>
30
40
  `;
31
- const TemplateTextarea = ({ label = 'Label', message = '', status = 'standard', }) => html `
32
- <kemet-field slug="unique-identifier" label="${label}" message="${message}" status="${status}">
33
- <kemet-textarea required slot="input" name="textarea-field" status="${status}"></kemet-textarea>
41
+ const TemplateTextarea = (args) => html `
42
+ <kemet-field slug="unique-identifier" label="${args.label}" message="${args.message}" status="${args.status}">
43
+ <kemet-textarea required slot="input" name="textarea-field" status="${args.status}"></kemet-textarea>
34
44
  </kemet-field>
35
45
  `;
36
- export const Standard = {
46
+ export const Input = {
37
47
  render: args => TemplateInput(args),
38
- args: {
39
- label: 'Label',
40
- message: '',
41
- status: 'standard',
42
- },
43
- argTypes: {
44
- label: {
45
- name: 'Label',
46
- control: { type: 'text' },
47
- },
48
- message: {
49
- name: 'Validation Message',
50
- control: { type: 'text' },
51
- },
52
- status: {
53
- name: 'Status',
54
- control: { type: 'radio' },
55
- options: ['standard', 'error', 'success', 'warning'],
56
- },
57
- }
58
48
  };
59
49
  export const Select = {
60
50
  render: args => TemplateSelect(args),
61
- args: {
62
- label: 'Label',
63
- message: '',
64
- status: 'standard',
65
- },
66
- argTypes: {
67
- label: {
68
- name: 'Label',
69
- control: { type: 'text' },
70
- },
71
- message: {
72
- name: 'Validation Message',
73
- control: { type: 'text' },
74
- },
75
- status: {
76
- name: 'Status',
77
- control: { type: 'radio' },
78
- options: ['standard', 'error', 'success', 'warning'],
79
- },
80
- }
81
51
  };
82
52
  export const Textarea = {
83
53
  render: args => TemplateTextarea(args),
84
- args: {
85
- label: 'Label',
86
- message: '',
87
- status: 'standard',
88
- },
89
- argTypes: {
90
- label: {
91
- name: 'Label',
92
- control: { type: 'text' },
93
- },
94
- message: {
95
- name: 'Validation Message',
96
- control: { type: 'text' },
97
- },
98
- status: {
99
- name: 'Status',
100
- control: { type: 'radio' },
101
- options: ['standard', 'error', 'success', 'warning'],
102
- },
103
- }
104
54
  };
105
55
  //# sourceMappingURL=stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../src/components/kemet-field/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,gBAAgB,CAAC;AACxB,OAAO,+BAA+B,CAAC;AACvC,OAAO,qCAAqC,CAAC;AAC7C,OAAO,iCAAiC,CAAC;AACzC,OAAO,iCAAiC,CAAC;AAEzC,OAAO,6BAA6B,CAAC;AACrC,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAE1C,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,oBAAoB;IAC3B,SAAS,EAAE,iBAAiB;CAC7B,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,aAAa,GAAG,CAAC,EACrB,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE,MAAM,GAAG,UAAU,GACnD,EAAE,EAAE,CAAC,IAAI,CAAA;iDACuC,KAAK,cAAc,OAAO,aAAa,MAAM;oEAC1B,MAAM;;CAEzE,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE,MAAM,GAAG,UAAU,GACnD,EAAE,EAAE,CAAC,IAAI,CAAA;iDACuC,KAAK,cAAc,OAAO,aAAa,MAAM;6DACjC,MAAM;;;;;;;;CAQlE,CAAC;AAEF,MAAM,gBAAgB,GAAG,CAAC,EACxB,KAAK,GAAG,OAAO,EAAE,OAAO,GAAG,EAAE,EAAE,MAAM,GAAG,UAAU,GACnD,EAAE,EAAE,CAAC,IAAI,CAAA;iDACuC,KAAK,cAAc,OAAO,aAAa,MAAM;0EACpB,MAAM;;CAE/E,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;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B,CAAC,IAAI,CAAC;IACtC,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,EAAE;QACX,MAAM,EAAE,UAAU;KACnB;IACD,QAAQ,EAAE;QACR,KAAK,EAAE;YACL,IAAI,EAAE,OAAO;YACb,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B;QACD,OAAO,EAAE;YACP,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SAC1B;QACD,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;YAC1B,OAAO,EAAE,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,CAAC;SACrD;KACF;CACF,CAAC","sourcesContent":["import { html } from 'lit';\nimport type { Meta, StoryObj } from '@storybook/web-components';\n\nimport '../kemet-field';\nimport '../../kemet-input/kemet-input';\nimport '../../kemet-textarea/kemet-textarea';\nimport '../../kemet-select/kemet-select';\nimport '../../kemet-select/kemet-option';\n\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nconst meta: Meta = {\n title: 'Components / Field',\n component: 'kemet-accordion',\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst TemplateInput = ({\n label = 'Label', message = '', status = 'standard',\n}) => html`\n <kemet-field slug=\"unique-identifier\" label=\"${label}\" message=\"${message}\" status=\"${status}\">\n <kemet-input required slot=\"input\" name=\"input-field\" status=\"${status}\" validate-on-blur></kemet-input>\n </kemet-field>\n`;\n\nconst TemplateSelect = ({\n label = 'Label', message = '', status = 'standard',\n}) => html`\n <kemet-field slug=\"unique-identifier\" label=\"${label}\" message=\"${message}\" status=\"${status}\">\n <kemet-select slot=\"input\" name=\"select-field\" status=\"${status}\" required>\n <kemet-option label=\"Choose an Item\" value=\"\"></kemet-option>\n <kemet-option label=\"Item 1\" value=\"1\"></kemet-option>\n <kemet-option label=\"Item 2\" value=\"2\" selected></kemet-option>\n <kemet-option label=\"Item 3\" value=\"3\"></kemet-option>\n <kemet-option label=\"Item 4\" value=\"4\" disabled></kemet-option>\n </kemet-select>\n </kemet-field>\n`;\n\nconst TemplateTextarea = ({\n label = 'Label', message = '', status = 'standard',\n}) => html`\n <kemet-field slug=\"unique-identifier\" label=\"${label}\" message=\"${message}\" status=\"${status}\">\n <kemet-textarea required slot=\"input\" name=\"textarea-field\" status=\"${status}\"></kemet-textarea>\n </kemet-field>\n`;\n\nexport const Standard: Story = {\n render: args => TemplateInput(args),\n args: {\n label: 'Label',\n message: '',\n status: 'standard',\n },\n argTypes: {\n label: {\n name: 'Label',\n control: { type: 'text' },\n },\n message: {\n name: 'Validation Message',\n control: { type: 'text' },\n },\n status: {\n name: 'Status',\n control: { type: 'radio' },\n options: ['standard', 'error', 'success', 'warning'],\n },\n }\n};\n\nexport const Select: Story = {\n render: args => TemplateSelect(args),\n args: {\n label: 'Label',\n message: '',\n status: 'standard',\n },\n argTypes: {\n label: {\n name: 'Label',\n control: { type: 'text' },\n },\n message: {\n name: 'Validation Message',\n control: { type: 'text' },\n },\n status: {\n name: 'Status',\n control: { type: 'radio' },\n options: ['standard', 'error', 'success', 'warning'],\n },\n }\n};\n\nexport const Textarea: Story = {\n render: args => TemplateTextarea(args),\n args: {\n label: 'Label',\n message: '',\n status: 'standard',\n },\n argTypes: {\n label: {\n name: 'Label',\n control: { type: 'text' },\n },\n message: {\n name: 'Validation Message',\n control: { type: 'text' },\n },\n status: {\n name: 'Status',\n control: { type: 'radio' },\n options: ['standard', 'error', 'success', 'warning'],\n },\n }\n};\n"]}
1
+ {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../src/components/kemet-field/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,gBAAgB,CAAC;AACxB,OAAO,+BAA+B,CAA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AAE,CAAC,cAAc,CAAC,IAAI,CAAC;CACrC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,IAAI,CAAC;CACvC,CAAC","sourcesContent":["import { html } from 'lit';\nimport type { Meta, StoryObj } from '@storybook/web-components';\n\nimport '../kemet-field';\nimport '../../kemet-input/kemet-input';\nimport '../../kemet-textarea/kemet-textarea';\nimport '../../kemet-select/kemet-select';\nimport '../../kemet-select/kemet-option';\n\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nconst meta: Meta = {\n title: 'Components / Field',\n component: 'kemet-accordion',\n args: {\n label: 'Label',\n },\n argTypes: {\n status: {\n name: 'Status',\n control: { type: 'radio' },\n options: ['standard', 'error', 'success', 'warning'],\n },\n }\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst TemplateInput = (args) => html`\n <kemet-field slug=\"unique-identifier\" label=\"${args.label}\" message=\"${args.message}\" status=\"${args.status}\">\n <kemet-input required slot=\"input\" name=\"input-field\" status=\"${args.status}\" validate-on-blur></kemet-input>\n </kemet-field>\n`;\n\nconst TemplateSelect = (args) => html`\n <kemet-field slug=\"unique-identifier\" label=\"${args.label}\" message=\"${args.message}\" status=\"${args.status}\">\n <kemet-select slot=\"input\" name=\"select-field\" status=\"${status}\" required>\n <kemet-option label=\"Choose an Item\" value=\"\"></kemet-option>\n <kemet-option label=\"Item 1\" value=\"1\"></kemet-option>\n <kemet-option label=\"Item 2\" value=\"2\" selected></kemet-option>\n <kemet-option label=\"Item 3\" value=\"3\"></kemet-option>\n <kemet-option label=\"Item 4\" value=\"4\" disabled></kemet-option>\n </kemet-select>\n </kemet-field>\n`;\n\nconst TemplateTextarea = (args) => html`\n <kemet-field slug=\"unique-identifier\" label=\"${args.label}\" message=\"${args.message}\" status=\"${args.status}\">\n <kemet-textarea required slot=\"input\" name=\"textarea-field\" status=\"${args.status}\"></kemet-textarea>\n </kemet-field>\n`;\n\nexport const Input: Story = {\n render: args => TemplateInput(args),\n};\n\nexport const Select: Story = {\n render: args => TemplateSelect(args),\n};\n\nexport const Textarea: Story = {\n render: args => TemplateTextarea(args),\n};\n"]}
@@ -1,8 +1,8 @@
1
1
  import { LitElement } from 'lit';
2
- import { KemetComboInterface } from '../kemet-combo/types';
3
- import { KemetInputInterface } from '../kemet-input/types';
4
- import { KemetTextareaInterface } from '../kemet-textarea/types';
5
2
  import { TypeStatus } from './types';
3
+ import KemetCombo from '../kemet-combo/kemet-combo';
4
+ import KemetInput from '../kemet-input/kemet-input';
5
+ import KemetTextarea from '../kemet-textarea/kemet-textarea';
6
6
  /**
7
7
  * @since 1.0.0
8
8
  * @status stable
@@ -42,8 +42,8 @@ export default class KemetField extends LitElement {
42
42
  disabled: boolean;
43
43
  errorIcon: string;
44
44
  successIcon: string;
45
- slotInput: KemetInputInterface | KemetTextareaInterface;
46
- slotCombo: KemetComboInterface;
45
+ slotInput: KemetInput | KemetTextarea;
46
+ slotCombo: KemetCombo;
47
47
  constructor();
48
48
  firstUpdated(): void;
49
49
  render(): import("lit-html").TemplateResult<1>;
@@ -1 +1 @@
1
- {"version":3,"file":"kemet-field.js","sourceRoot":"","sources":["../../../src/components/kemet-field/kemet-field.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAIxD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAGH,IAAqB,UAAU,GAA/B,MAAqB,UAAW,SAAQ,UAAU;IAuChD;QACE,KAAK,EAAE,CAAC;QAxBV,WAAM,GAAe,UA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,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACrE,CAAC;CACF,CAAA;AApHQ,iBAAM,GAAG,CAAC,UAAU,CAAC,CAAC;AAG7B;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wCACd;AAGb;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;yCACb;AAGd;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;2CACX;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2CAC1B;AAGjB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CACV;AAGhC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAC3B;AAGhB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;0CACZ;AAGf;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CACzB;AAGlB;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6CACJ;AAGhD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;+CACrB;AAGjC;IADC,KAAK,EAAE;6CACgD;AAGxD;IADC,KAAK,EAAE;6CACuB;AArCZ,UAAU;IAD9B,aAAa,CAAC,aAAa,CAAC;GACR,UAAU,CAqH9B;eArHoB,UAAU","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { emitEvent } from '../../utilities/misc/events';\nimport { KemetComboInterface } from '../kemet-combo/types';\nimport { KemetInputInterface } from '../kemet-input/types';\nimport { KemetTextareaInterface } from '../kemet-textarea/types';\nimport { stylesBase } from './styles';\nimport { TypeStatus } from './types';\n\n/**\n * @since 1.0.0\n * @status stable\n *\n * @tagname kemet-field\n * @summary Used in combination with Input, Select, and Textarea, to make a Field.\n *\n * @prop {string} slug - Uniquely identifies the control. Use the same slug for slotted sub components.\n * @prop {string} label - The label text\n * @prop {string} message - The validation message for error or success\n * @prop {boolean} focused - Determines if the containing input is focused\n * @prop {string} status - The validation status of standard, error, or success\n * @prop {boolean} filled - Is true when the containing input has a value\n * @prop {number} length - The length of the containing input\n * @prop {boolean} disabled - Determines the disabled state of the control\n * @prop {string} errorIcon - The icon while in an error or warning state\n * @prop {string} successIcon - The icon while in an success state\n *\n * @slot component - Allows sub components of the field to display.\n *\n * @csspart label - The label of the field.\n * @csspart message - The validation message of the field.\n * @csspart text - The text in the label.\n *\n * @event kemet-field-input - Fires when input fires on the input slot\n *\n */\n\n@customElement('kemet-field')\nexport default class KemetField extends LitElement {\n static styles = [stylesBase];\n\n @property({ type: String })\n slug: string;\n\n @property({ type: String })\n label: string;\n\n @property({ type: String })\n message: string;\n\n @property({ type: Boolean, reflect: true })\n focused: boolean;\n\n @property({ type: String, reflect: true })\n status: TypeStatus = 'standard';\n\n @property({ type: Boolean, reflect: true })\n filled: boolean;\n\n @property({ type: Number })\n length: number;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean;\n\n @property({ type: String, attribute: 'error-icon' })\n errorIcon: string = 'exclamation-triangle-fill';\n\n @property({ type: String, attribute: 'success-icon' })\n successIcon: string = 'check-lg';\n\n @state()\n slotInput: KemetInputInterface | KemetTextareaInterface;\n\n @state()\n slotCombo: KemetComboInterface;\n\n constructor() {\n super();\n\n // listeners\n this.addEventListener('kemet-input-focused', event => this.handleFocused(event));\n this.addEventListener('kemet-input-status', event => this.handleStatus(event));\n this.addEventListener('kemet-input-input', event => this.handleInput(event));\n this.addEventListener('kemet-count-status', event => this.handleStatus(event));\n this.addEventListener('kemet-combo-selection', event => this.handleSelection(event));\n }\n\n firstUpdated() {\n this.slotInput = this.querySelector('[slot=\"input\"]');\n this.slotCombo = this.querySelector('[slot=\"combo\"]');\n\n if (this.slotInput.value) {\n this.length = this.slotInput.value.length;\n } else {\n this.length = 0;\n }\n }\n\n render() {\n return html`\n <label for=\"${this.slug}\" id=\"${this.slug}-label\" part=\"label\">\n <span part=\"text\">${this.label}${this.makeStatusIcon()}</span>\n <slot name=\"input\"></slot>\n </label>\n ${this.makeStatusMessage()}\n <slot name=\"component\"></slot>\n `;\n }\n\n makeStatusIcon() {\n if (this.status === 'error' || this.status === 'warning') {\n return html`<kemet-icon icon=\"${this.errorIcon}\" size=\"16\"></kemet-icon>`;\n }\n\n if (this.status === 'success') {\n return html`<kemet-icon icon=\"${this.successIcon}\" size=\"16\"></kemet-icon>`;\n }\n\n return null;\n }\n\n makeStatusMessage() {\n if (this.status !== 'standard') {\n return html`<span class=\"message\" part=\"message\">${this.message}</span>`;\n }\n\n return null;\n }\n\n handleFocused(event) {\n this.focused = event.detail;\n\n if (!this.focused && this.slotCombo && this.slotCombo.options.length < 1) {\n this.slotCombo.show = false;\n }\n }\n\n handleStatus(event) {\n this.status = event.detail.status;\n }\n\n handleInput(event) {\n emitEvent(this, 'kemet-field-input', event.detail.length);\n\n if (event.detail === '') {\n this.filled = false;\n } else {\n this.filled = true;\n }\n }\n\n handleSelection(event) {\n this.slotInput.setAttribute('aria-activedescendant', event.detail);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-field': KemetField\n }\n}\n"]}
1
+ {"version":3,"file":"kemet-field.js","sourceRoot":"","sources":["../../../src/components/kemet-field/kemet-field.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,E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qH9B;eArHoB,UAAU","sourcesContent":["import { html, LitElement } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { emitEvent } from '../../utilities/misc/events';\nimport { stylesBase } from './styles';\nimport { TypeStatus } from './types';\n\nimport KemetCombo from '../kemet-combo/kemet-combo';\nimport KemetInput from '../kemet-input/kemet-input';\nimport KemetTextarea from '../kemet-textarea/kemet-textarea';\n\n/**\n * @since 1.0.0\n * @status stable\n *\n * @tagname kemet-field\n * @summary Used in combination with Input, Select, and Textarea, to make a Field.\n *\n * @prop {string} slug - Uniquely identifies the control. Use the same slug for slotted sub components.\n * @prop {string} label - The label text\n * @prop {string} message - The validation message for error or success\n * @prop {boolean} focused - Determines if the containing input is focused\n * @prop {string} status - The validation status of standard, error, or success\n * @prop {boolean} filled - Is true when the containing input has a value\n * @prop {number} length - The length of the containing input\n * @prop {boolean} disabled - Determines the disabled state of the control\n * @prop {string} errorIcon - The icon while in an error or warning state\n * @prop {string} successIcon - The icon while in an success state\n *\n * @slot component - Allows sub components of the field to display.\n *\n * @csspart label - The label of the field.\n * @csspart message - The validation message of the field.\n * @csspart text - The text in the label.\n *\n * @event kemet-field-input - Fires when input fires on the input slot\n *\n */\n\n@customElement('kemet-field')\nexport default class KemetField extends LitElement {\n static styles = [stylesBase];\n\n @property({ type: String })\n slug: string;\n\n @property({ type: String })\n label: string;\n\n @property({ type: String })\n message: string;\n\n @property({ type: Boolean, reflect: true })\n focused: boolean;\n\n @property({ type: String, reflect: true })\n status: TypeStatus = 'standard';\n\n @property({ type: Boolean, reflect: true })\n filled: boolean;\n\n @property({ type: Number })\n length: number;\n\n @property({ type: Boolean, reflect: true })\n disabled: boolean;\n\n @property({ type: String, attribute: 'error-icon' })\n errorIcon: string = 'exclamation-triangle-fill';\n\n @property({ type: String, attribute: 'success-icon' })\n successIcon: string = 'check-lg';\n\n @state()\n slotInput: KemetInput | KemetTextarea;\n\n @state()\n slotCombo: KemetCombo;\n\n constructor() {\n super();\n\n // listeners\n this.addEventListener('kemet-input-focused', event => this.handleFocused(event));\n this.addEventListener('kemet-input-status', event => this.handleStatus(event));\n this.addEventListener('kemet-input-input', event => this.handleInput(event));\n this.addEventListener('kemet-count-status', event => this.handleStatus(event));\n this.addEventListener('kemet-combo-selection', event => this.handleSelection(event));\n }\n\n firstUpdated() {\n this.slotInput = this.querySelector('[slot=\"input\"]');\n this.slotCombo = this.querySelector('[slot=\"combo\"]');\n\n if (this.slotInput.value) {\n this.length = this.slotInput.value.length;\n } else {\n this.length = 0;\n }\n }\n\n render() {\n return html`\n <label for=\"${this.slug}\" id=\"${this.slug}-label\" part=\"label\">\n <span part=\"text\">${this.label}${this.makeStatusIcon()}</span>\n <slot name=\"input\"></slot>\n </label>\n ${this.makeStatusMessage()}\n <slot name=\"component\"></slot>\n `;\n }\n\n makeStatusIcon() {\n if (this.status === 'error' || this.status === 'warning') {\n return html`<kemet-icon icon=\"${this.errorIcon}\" size=\"16\"></kemet-icon>`;\n }\n\n if (this.status === 'success') {\n return html`<kemet-icon icon=\"${this.successIcon}\" size=\"16\"></kemet-icon>`;\n }\n\n return null;\n }\n\n makeStatusMessage() {\n if (this.status !== 'standard') {\n return html`<span class=\"message\" part=\"message\">${this.message}</span>`;\n }\n\n return null;\n }\n\n handleFocused(event) {\n this.focused = event.detail;\n\n if (!this.focused && this.slotCombo && this.slotCombo.options.length < 1) {\n this.slotCombo.show = false;\n }\n }\n\n handleStatus(event) {\n this.status = event.detail.status;\n }\n\n handleInput(event) {\n emitEvent(this, 'kemet-field-input', event.detail.length);\n\n if (event.detail === '') {\n this.filled = false;\n } else {\n this.filled = true;\n }\n }\n\n handleSelection(event) {\n this.slotInput.setAttribute('aria-activedescendant', event.detail);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'kemet-field': KemetField\n }\n}\n"]}
@@ -28,15 +28,15 @@ export const stylesBase = css `
28
28
  }
29
29
 
30
30
  :host([status='error']) kemet-icon {
31
- color: var(--kemet-color-error);
31
+ color: rgb(var(--kemet-color-error));
32
32
  }
33
33
 
34
34
  :host([status='success']) kemet-icon {
35
- color: var(--kemet-color-success);
35
+ color: rgb(var(--kemet-color-success));
36
36
  }
37
37
 
38
38
  :host([status='warning']) kemet-icon {
39
- color: var(--kemet-color-warning);
39
+ color: rgb(var(--kemet-color-warning));
40
40
  }
41
41
 
42
42
  .message {
@@ -47,15 +47,15 @@ export const stylesBase = css `
47
47
  }
48
48
 
49
49
  :host([status='error']) .message {
50
- color: var(--kemet-color-error);
50
+ color: rgb(var(--kemet-color-error));
51
51
  }
52
52
 
53
53
  :host([status='success']) .message {
54
- color: var(--kemet-color-success);
54
+ color: rgb(var(--kemet-color-success));
55
55
  }
56
56
 
57
57
  :host([status='warning']) .message {
58
- color: var(--kemet-color-warning);
58
+ color: rgb(var(--kemet-color-warning));
59
59
  }
60
60
  `;
61
61
  //# sourceMappingURL=styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D5B,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n :host {\n display: block;\n }\n\n :host([disabled]) {\n opacity: 0.5;\n }\n\n label {\n position: relative;\n display: block;\n }\n\n label span {\n color: inherit;\n display: inline-flex;\n gap: 0.5rem;\n align-items: center;\n margin-bottom: 0.8rem;\n }\n\n :host([status='error']) kemet-icon {\n color: var(--kemet-color-error);\n }\n\n :host([status='success']) kemet-icon {\n color: var(--kemet-color-success);\n }\n\n :host([status='warning']) kemet-icon {\n color: var(--kemet-color-warning);\n }\n\n .message {\n font-size: 0.9rem;\n line-height: 1;\n display: block;\n margin-top: 0.8rem;\n }\n\n :host([status='error']) .message {\n color: var(--kemet-color-error);\n }\n\n :host([status='success']) .message {\n color: var(--kemet-color-success);\n }\n\n :host([status='warning']) .message {\n color: var(--kemet-color-warning);\n }\n`;\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../src/components/kemet-field/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,UAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D5B,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const stylesBase = css`\n *,\n *::before,\n *::after {\n box-sizing: border-box;\n }\n\n :host {\n display: block;\n }\n\n :host([disabled]) {\n opacity: 0.5;\n }\n\n label {\n position: relative;\n display: block;\n }\n\n label span {\n color: inherit;\n display: inline-flex;\n gap: 0.5rem;\n align-items: center;\n margin-bottom: 0.8rem;\n }\n\n :host([status='error']) kemet-icon {\n color: rgb(var(--kemet-color-error));\n }\n\n :host([status='success']) kemet-icon {\n color: rgb(var(--kemet-color-success));\n }\n\n :host([status='warning']) kemet-icon {\n color: rgb(var(--kemet-color-warning));\n }\n\n .message {\n font-size: 0.9rem;\n line-height: 1;\n display: block;\n margin-top: 0.8rem;\n }\n\n :host([status='error']) .message {\n color: rgb(var(--kemet-color-error));\n }\n\n :host([status='success']) .message {\n color: rgb(var(--kemet-color-success));\n }\n\n :host([status='warning']) .message {\n color: rgb(var(--kemet-color-warning));\n }\n`;\n"]}
@@ -9,3 +9,6 @@ declare const meta: Meta;
9
9
  export default meta;
10
10
  declare type Story = StoryObj;
11
11
  export declare const Standard: Story;
12
+ export declare const Vertical: Story;
13
+ export declare const Rounded: Story;
14
+ export declare const Hover: Story;
@@ -1,4 +1,5 @@
1
1
  import { html } from 'lit';
2
+ import { ifDefined } from 'lit/directives/if-defined.js';
2
3
  import '../kemet-flipcard';
3
4
  import '../kemet-flipcard-trigger';
4
5
  import '../../kemet-button/kemet-button';
@@ -8,36 +9,26 @@ import '../../kemet-tabs/kemet-tab-panel';
8
9
  const meta = {
9
10
  title: 'Components / Flipcard',
10
11
  component: 'kemet-flipcard',
12
+ argTypes: {
13
+ axis: {
14
+ control: { type: 'select' },
15
+ options: ['horizontal', 'vertical'],
16
+ },
17
+ },
18
+ args: {
19
+ flipped: false
20
+ }
11
21
  };
12
22
  export default meta;
13
- const Template = ({ width = '50%', height = 'auto', frontColor = 'var(--kemet-color-text)', frontBackgroundColor = 'transparent', backColor = 'var(--kemet-color-text)', backBackgroundColor = 'transparent', border = '2px solid var(--kemet-color-background)', borderRadius = '0', ratio = '16/9', flipped = false, measure = false, axis = 'horizontal', flipOnHover = false, rounded = false, }) => html `
14
- <style>
15
- kemet-flipcard {
16
- --kemet-flipcard-width: ${width};
17
- --kemet-flipcard-height: ${height};
18
- --kemet-flipcard-front-color: ${frontColor};
19
- --kemet-flipcard-front-background-color: ${frontBackgroundColor};
20
- --kemet-flipcard-back-color: ${backColor};
21
- --kemet-flipcard-back-background-color: ${backBackgroundColor};
22
- --kemet-flipcard-border: ${border};
23
- --kemet-flipcard-border-radius: ${borderRadius};
24
- --kemet-flipcard-ratio: ${ratio};
25
- }
26
- </style>
27
- <kemet-flipcard
28
- ?flipped="${flipped}"
29
- ?measure="${measure}"
30
- axis="${axis}"
31
- ?flip-on-hover="${flipOnHover}"
32
- ?rounded=${rounded}
33
- >
34
- <div slot="front" kemet-elevation="layer5" kemet-padding="tiny:normal">
23
+ const Template = (args) => html `
24
+ <kemet-flipcard ?flipped="${args.flipped}" ?measure="${args.measure}" axis="${ifDefined(args.axis)}" ?flip-on-hover="${args.flipOnHover}" ?rounded=${args.rounded}>
25
+ <div slot="front" kemet-elevation="layer-5" kemet-padding="2xl">
35
26
  <p>This is the front of the card.</p>
36
27
  <kemet-flipcard-trigger>
37
28
  <kemet-button>Flip Me</kemet-button>
38
29
  </kemet-flipcard-trigger>
39
30
  </div>
40
- <div slot="back" kemet-elevation="layer5" kemet-padding="tiny:normal">
31
+ <div slot="back" kemet-elevation="layer-5" kemet-padding="2xl">
41
32
  <p>This is the back of the card.</p>
42
33
  <kemet-flipcard-trigger>
43
34
  <kemet-button>Flip Me</kemet-button>
@@ -47,63 +38,23 @@ const Template = ({ width = '50%', height = 'auto', frontColor = 'var(--kemet-co
47
38
  `;
48
39
  export const Standard = {
49
40
  render: (args) => Template(args),
50
- argTypes: {
51
- width: {
52
- control: { type: 'text' },
53
- },
54
- height: {
55
- control: { type: 'text' },
56
- },
57
- frontColor: {
58
- control: { type: 'color' },
59
- },
60
- frontBackgroundColor: {
61
- control: { type: 'color' },
62
- },
63
- backColor: {
64
- control: { type: 'color' },
65
- },
66
- backBackgroundColor: {
67
- control: { type: 'color' },
68
- },
69
- border: {
70
- control: { type: 'text' },
71
- },
72
- borderRadius: {
73
- control: { type: 'text' },
74
- },
75
- flipped: {
76
- control: { type: 'boolean' },
77
- },
78
- measure: {
79
- control: { type: 'boolean' },
80
- },
81
- axis: {
82
- control: { type: 'select' },
83
- options: ['horizontal', 'vertical'],
84
- },
85
- flipOnHover: {
86
- control: { type: 'boolean' },
87
- },
88
- rounded: {
89
- control: { type: 'boolean' },
90
- },
41
+ };
42
+ export const Vertical = {
43
+ render: (args) => Template(args),
44
+ args: {
45
+ axis: 'vertical',
46
+ },
47
+ };
48
+ export const Rounded = {
49
+ render: (args) => Template(args),
50
+ args: {
51
+ rounded: true,
91
52
  },
53
+ };
54
+ export const Hover = {
55
+ render: (args) => Template(args),
92
56
  args: {
93
- width: '50%',
94
- height: 'auto',
95
- frontColor: 'var(--kemet-color-text)',
96
- frontBackgroundColor: 'transparent',
97
- backColor: 'var(--kemet-color-text)',
98
- backBackgroundColor: 'transparent',
99
- border: '2px solid var(--kemet-color-background)',
100
- borderRadius: '0',
101
- ratio: '16/9',
102
- flipped: false,
103
- measure: false,
104
- axis: 'horizontal',
105
- flipOnHover: false,
106
- rounded: false,
57
+ flipOnHover: true,
107
58
  },
108
59
  };
109
60
  //# sourceMappingURL=stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../src/components/kemet-flipcard/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAG3B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,2BAA2B,CAAC;AAEnC,OAAO,iCAAiC,CAAC;AACzC,OAAO,6BAA6B,CAAC;AACrC,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAE1C,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,gBAAgB;CAC5B,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,QAAQ,GAAG,CAAC,EAChB,KAAK,GAAG,KAAK,EACb,MAAM,GAAG,MAAM,EACf,UAAU,GAAG,yBAAyB,EACtC,oBAAoB,GAAG,aAAa,EACpC,SAAS,GAAG,yBAAyB,EACrC,mBAAmB,GAAG,aAAa,EACnC,MAAM,GAAG,yCAAyC,EAClD,YAAY,GAAG,GAAG,EAClB,KAAK,GAAG,MAAM,EACd,OAAO,GAAG,KAAK,EACf,OAAO,GAAG,KAAK,EACf,IAAI,GAAG,YAAY,EACnB,WAAW,GAAG,KAAK,EACnB,OAAO,GAAG,KAAK,GAChB,EAAE,EAAE,CAAC,IAAI,CAAA;;;gCAGsB,KAAK;iCACJ,MAAM;sCACD,UAAU;iDACC,oBAAoB;qCAChC,SAAS;gDACE,mBAAmB;iCAClC,MAAM;wCACC,YAAY;gCACpB,KAAK;;;;gBAIrB,OAAO;gBACP,OAAO;YACX,IAAI;sBACM,WAAW;eAClB,OAAO;;;;;;;;;;;;;;;CAerB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAA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E,GAAG;QACjB,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,KAAK;QAClB,OAAO,EAAE,KAAK;KACf;CACF,CAAC","sourcesContent":["import { html } from 'lit';\nimport type { Meta, StoryObj } from '@storybook/web-components';\n\nimport '../kemet-flipcard';\nimport '../kemet-flipcard-trigger';\n\nimport '../../kemet-button/kemet-button';\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nconst meta: Meta = {\n title: 'Components / Flipcard',\n component: 'kemet-flipcard',\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst Template = ({\n width = '50%',\n height = 'auto',\n frontColor = 'var(--kemet-color-text)',\n frontBackgroundColor = 'transparent',\n backColor = 'var(--kemet-color-text)',\n backBackgroundColor = 'transparent',\n border = '2px solid var(--kemet-color-background)',\n borderRadius = '0',\n ratio = '16/9',\n flipped = false,\n measure = false,\n axis = 'horizontal',\n flipOnHover = false,\n rounded = false,\n}) => html`\n <style>\n kemet-flipcard {\n --kemet-flipcard-width: ${width};\n --kemet-flipcard-height: ${height};\n --kemet-flipcard-front-color: ${frontColor};\n --kemet-flipcard-front-background-color: ${frontBackgroundColor};\n --kemet-flipcard-back-color: ${backColor};\n --kemet-flipcard-back-background-color: ${backBackgroundColor};\n --kemet-flipcard-border: ${border};\n --kemet-flipcard-border-radius: ${borderRadius};\n --kemet-flipcard-ratio: ${ratio};\n }\n </style>\n <kemet-flipcard\n ?flipped=\"${flipped}\"\n ?measure=\"${measure}\"\n axis=\"${axis}\"\n ?flip-on-hover=\"${flipOnHover}\"\n ?rounded=${rounded}\n >\n <div slot=\"front\" kemet-elevation=\"layer5\" kemet-padding=\"tiny:normal\">\n <p>This is the front of the card.</p>\n <kemet-flipcard-trigger>\n <kemet-button>Flip Me</kemet-button>\n </kemet-flipcard-trigger>\n </div>\n <div slot=\"back\" kemet-elevation=\"layer5\" kemet-padding=\"tiny:normal\">\n <p>This is the back of the card.</p>\n <kemet-flipcard-trigger>\n <kemet-button>Flip Me</kemet-button>\n </kemet-flipcard-trigger>\n </div>\n </kemet-flipcard>\n`;\n\nexport const Standard: Story = {\n render: (args) => Template(args),\n argTypes: {\n width: {\n control: { type: 'text' },\n },\n height: {\n control: { type: 'text' },\n },\n frontColor: {\n control: { type: 'color' },\n },\n frontBackgroundColor: {\n control: { type: 'color' },\n },\n backColor: {\n control: { type: 'color' },\n },\n backBackgroundColor: {\n control: { type: 'color' },\n },\n border: {\n control: { type: 'text' },\n },\n borderRadius: {\n control: { type: 'text' },\n },\n flipped: {\n control: { type: 'boolean' },\n },\n measure: {\n control: { type: 'boolean' },\n },\n axis: {\n control: { type: 'select' },\n options: ['horizontal', 'vertical'],\n },\n flipOnHover: {\n control: { type: 'boolean' },\n },\n rounded: {\n control: { type: 'boolean' },\n },\n },\n args: {\n width: '50%',\n height: 'auto',\n frontColor: 'var(--kemet-color-text)',\n frontBackgroundColor: 'transparent',\n backColor: 'var(--kemet-color-text)',\n backBackgroundColor: 'transparent',\n border: '2px solid var(--kemet-color-background)',\n borderRadius: '0',\n ratio: '16/9',\n flipped: false,\n measure: false,\n axis: 'horizontal',\n flipOnHover: false,\n rounded: false,\n },\n};\n"]}
1
+ {"version":3,"file":"stories.js","sourceRoot":"","sources":["../../../../src/components/kemet-flipcard/docs/stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,2BAA2B,CAAC;AAEnC,OAAO,iCAAiC,CAAC;AACzC,OAAO,6BAA6B,CAAC;AACrC,OAAO,4BAA4B,CAAC;AACpC,OAAO,kCAAkC,CAAC;AAE1C,MAAM,IAAI,GAAS;IACjB,KAAK,EAAE,uBAAuB;IAC9B,SAAS,EAAE,gBAAgB;IAC3B,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,CAAC,YAAY,EAAE,UAAU,CAAC;SACpC;KACF;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;KACf;CACF,CAAC;AACF,eAAe,IAAI,CAAC;AAIpB,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAA;8BACD,IAAI,CAAC,OAAO,eAAe,IAAI,CAAC,OAAO,WAAW,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,IAAI,CAAC,WAAW,cAAc,IAAI,CAAC,OAAO;;;;;;;;;;;;;;CAclK,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAU;IAC7B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;IAChC,IAAI,EAAE;QACJ,IAAI,EAAE,UAAU;KACjB;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAU;IAC5B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;IAChC,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;KACd;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC;IAChC,IAAI,EAAE;QACJ,WAAW,EAAE,IAAI;KAClB;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-flipcard';\nimport '../kemet-flipcard-trigger';\n\nimport '../../kemet-button/kemet-button';\nimport '../../kemet-tabs/kemet-tabs';\nimport '../../kemet-tabs/kemet-tab';\nimport '../../kemet-tabs/kemet-tab-panel';\n\nconst meta: Meta = {\n title: 'Components / Flipcard',\n component: 'kemet-flipcard',\n argTypes: {\n axis: {\n control: { type: 'select' },\n options: ['horizontal', 'vertical'],\n },\n },\n args: {\n flipped: false\n }\n};\nexport default meta;\n\ntype Story = StoryObj;\n\nconst Template = (args) => html`\n <kemet-flipcard ?flipped=\"${args.flipped}\" ?measure=\"${args.measure}\" axis=\"${ifDefined(args.axis)}\" ?flip-on-hover=\"${args.flipOnHover}\" ?rounded=${args.rounded}>\n <div slot=\"front\" kemet-elevation=\"layer-5\" kemet-padding=\"2xl\">\n <p>This is the front of the card.</p>\n <kemet-flipcard-trigger>\n <kemet-button>Flip Me</kemet-button>\n </kemet-flipcard-trigger>\n </div>\n <div slot=\"back\" kemet-elevation=\"layer-5\" kemet-padding=\"2xl\">\n <p>This is the back of the card.</p>\n <kemet-flipcard-trigger>\n <kemet-button>Flip Me</kemet-button>\n </kemet-flipcard-trigger>\n </div>\n </kemet-flipcard>\n`;\n\nexport const Standard: Story = {\n render: (args) => Template(args),\n};\n\nexport const Vertical: Story = {\n render: (args) => Template(args),\n args: {\n axis: 'vertical',\n },\n};\n\nexport const Rounded: Story = {\n render: (args) => Template(args),\n args: {\n rounded: true,\n },\n};\n\nexport const Hover: Story = {\n render: (args) => Template(args),\n args: {\n flipOnHover: true,\n },\n};\n"]}