@redvars/peacock 3.1.2 → 3.1.3

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 (346) hide show
  1. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/LoaderUtils.d.ts +0 -1
  2. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/LoaderUtils.js +0 -1
  3. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/LoaderUtils.js.map +1 -1
  4. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.d.ts +1 -1
  5. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js +1 -1
  6. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js.map +1 -1
  7. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.d.ts +1 -1
  8. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js +1 -1
  9. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js.map +1 -1
  10. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/button.d.ts +99 -0
  11. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/button.js +292 -0
  12. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/button.js.map +1 -0
  13. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/index.d.ts +1 -0
  14. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/index.js +2 -0
  15. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/index.js.map +1 -0
  16. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/ClockController.d.ts +10 -0
  17. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/ClockController.js +22 -0
  18. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/ClockController.js.map +1 -0
  19. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.d.ts +4 -6
  20. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.js +8 -25
  21. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.js.map +1 -1
  22. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/code-highlighter.d.ts +26 -0
  23. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/code-highlighter.js +60 -0
  24. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/code-highlighter.js.map +1 -0
  25. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/index.d.ts +1 -0
  26. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/index.js +2 -0
  27. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/index.js.map +1 -0
  28. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/local.d.ts +6 -0
  29. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/local.js +7 -0
  30. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/local.js.map +1 -0
  31. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.d.ts +1 -2
  32. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.js +1 -8
  33. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.js.map +1 -1
  34. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.css.d.ts +1 -0
  35. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.css.js +47 -0
  36. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.css.js.map +1 -0
  37. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.d.ts +27 -0
  38. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.js +31 -0
  39. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.js.map +1 -0
  40. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/index.d.ts +1 -0
  41. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/index.js +2 -0
  42. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/index.js.map +1 -0
  43. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/FocusAttachableController.d.ts +9 -0
  44. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/FocusAttachableController.js +25 -0
  45. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/FocusAttachableController.js.map +1 -0
  46. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/focus-ring.d.ts +35 -0
  47. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/focus-ring.js +81 -0
  48. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/focus-ring.js.map +1 -0
  49. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/index.d.ts +1 -0
  50. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/index.js +2 -0
  51. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/index.js.map +1 -0
  52. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.d.ts +3 -2
  53. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js +4 -4
  54. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js.map +1 -1
  55. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.d.ts +4 -0
  56. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js +4 -0
  57. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js.map +1 -1
  58. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/peacock-loader.js +24 -18
  59. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/peacock-loader.js.map +1 -1
  60. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/index.d.ts +1 -0
  61. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/index.js +2 -0
  62. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/index.js.map +1 -0
  63. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/ripple.d.ts +9 -0
  64. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/ripple.js +125 -0
  65. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/ripple.js.map +1 -0
  66. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.d.ts +4 -0
  67. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js +22 -1
  68. package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js.map +1 -1
  69. package/.rollup.cache/E/git/redvars/peacock/components/dist/tsconfig.tsbuildinfo +1 -1
  70. package/bin/typedoc-gen.mjs +3 -4
  71. package/demo/index.html +45 -41
  72. package/dist/LoaderUtils.d.ts +23 -0
  73. package/dist/LoaderUtils.d.ts.map +1 -0
  74. package/dist/assets/styles/tokens.css +21 -53
  75. package/dist/avatar/avatar.d.ts +28 -0
  76. package/dist/avatar/avatar.d.ts.map +1 -0
  77. package/dist/avatar/index.d.ts +2 -0
  78. package/dist/avatar/index.d.ts.map +1 -0
  79. package/dist/avatar/p-avatar.d.ts +4 -0
  80. package/dist/avatar/p-avatar.d.ts.map +1 -0
  81. package/dist/avatar.js +42 -40
  82. package/dist/avatar.js.map +1 -1
  83. package/dist/badge/badge.d.ts +24 -0
  84. package/dist/badge/badge.d.ts.map +1 -0
  85. package/dist/badge/index.d.ts +2 -0
  86. package/dist/badge/index.d.ts.map +1 -0
  87. package/dist/badge/p-badge.d.ts +4 -0
  88. package/dist/badge/p-badge.d.ts.map +1 -0
  89. package/dist/badge.js +37 -36
  90. package/dist/badge.js.map +1 -1
  91. package/dist/button/button.d.ts +103 -0
  92. package/dist/button/button.d.ts.map +1 -0
  93. package/dist/button/index.d.ts +2 -0
  94. package/dist/button/index.d.ts.map +1 -0
  95. package/dist/button.js +710 -0
  96. package/dist/button.js.map +1 -0
  97. package/dist/class-map-BzIzngvN.js +89 -0
  98. package/dist/class-map-BzIzngvN.js.map +1 -0
  99. package/dist/class-map-CBk4-iMN.js +11 -0
  100. package/dist/class-map-CBk4-iMN.js.map +1 -0
  101. package/dist/class-map-Cavm-B1S.js +11 -0
  102. package/dist/class-map-Cavm-B1S.js.map +1 -0
  103. package/dist/class-map-DL5vM0J2.js +11 -0
  104. package/dist/class-map-DL5vM0J2.js.map +1 -0
  105. package/dist/class-map-IbP5VjmB.js +11 -0
  106. package/dist/class-map-IbP5VjmB.js.map +1 -0
  107. package/dist/clock/ClockController.d.ts +11 -0
  108. package/dist/clock/ClockController.d.ts.map +1 -0
  109. package/dist/clock/clock.d.ts +26 -0
  110. package/dist/clock/clock.d.ts.map +1 -0
  111. package/dist/clock/index.d.ts +2 -0
  112. package/dist/clock/index.d.ts.map +1 -0
  113. package/dist/clock.js +42 -35
  114. package/dist/clock.js.map +1 -1
  115. package/dist/code-highlighter/code-highlighter.d.ts +27 -0
  116. package/dist/code-highlighter/code-highlighter.d.ts.map +1 -0
  117. package/dist/code-highlighter/index.d.ts +2 -0
  118. package/dist/code-highlighter/index.d.ts.map +1 -0
  119. package/dist/code-highlighter/local.d.ts +7 -0
  120. package/dist/code-highlighter/local.d.ts.map +1 -0
  121. package/dist/code-highlighter.js +66 -0
  122. package/dist/code-highlighter.js.map +1 -0
  123. package/dist/custom-elements-jsdocs.json +589 -34
  124. package/dist/directive-CkFJvUQK.js +45 -0
  125. package/dist/directive-CkFJvUQK.js.map +1 -0
  126. package/dist/divider/divider.d.ts +28 -0
  127. package/dist/divider/divider.d.ts.map +1 -0
  128. package/dist/divider/index.d.ts +2 -0
  129. package/dist/divider/index.d.ts.map +1 -0
  130. package/dist/divider.js +55 -61
  131. package/dist/divider.js.map +1 -1
  132. package/dist/elevation/elevation.d.ts +28 -0
  133. package/dist/elevation/elevation.d.ts.map +1 -0
  134. package/dist/elevation/index.d.ts +2 -0
  135. package/dist/elevation/index.d.ts.map +1 -0
  136. package/dist/elevation-Bl1N6qEq.js +100 -0
  137. package/dist/elevation-Bl1N6qEq.js.map +1 -0
  138. package/dist/elevation-CbF5he8B.js +103 -0
  139. package/dist/elevation-CbF5he8B.js.map +1 -0
  140. package/dist/elevation-D3F6Z1jU.js +100 -0
  141. package/dist/elevation-D3F6Z1jU.js.map +1 -0
  142. package/dist/elevation.js +77 -0
  143. package/dist/elevation.js.map +1 -0
  144. package/dist/focus-ring/FocusAttachableController.d.ts +10 -0
  145. package/dist/focus-ring/FocusAttachableController.d.ts.map +1 -0
  146. package/dist/focus-ring/focus-ring.d.ts +36 -0
  147. package/dist/focus-ring/focus-ring.d.ts.map +1 -0
  148. package/dist/focus-ring/index.d.ts +2 -0
  149. package/dist/focus-ring/index.d.ts.map +1 -0
  150. package/dist/focus-ring.js +105 -0
  151. package/dist/focus-ring.js.map +1 -0
  152. package/dist/icon/datasource.d.ts +3 -0
  153. package/dist/icon/datasource.d.ts.map +1 -0
  154. package/dist/icon/icon.d.ts +42 -0
  155. package/dist/icon/icon.d.ts.map +1 -0
  156. package/dist/icon/index.d.ts +2 -0
  157. package/dist/icon/index.d.ts.map +1 -0
  158. package/dist/icon/p-icon.d.ts +4 -0
  159. package/dist/icon/p-icon.d.ts.map +1 -0
  160. package/dist/icon.js +26 -26
  161. package/dist/icon.js.map +1 -1
  162. package/dist/index.d.ts +9 -0
  163. package/dist/index.d.ts.map +1 -0
  164. package/dist/index.js +9 -5
  165. package/dist/index.js.map +1 -1
  166. package/dist/link/link.css.d.ts +3 -0
  167. package/dist/link/link.css.d.ts.map +1 -0
  168. package/dist/lit-element-B7NX__Gq.js +2851 -0
  169. package/dist/lit-element-B7NX__Gq.js.map +1 -0
  170. package/dist/lit-element-Bq5B2QNv.js +28 -0
  171. package/dist/lit-element-Bq5B2QNv.js.map +1 -0
  172. package/dist/lit-element-CkD27PXL.js +28 -0
  173. package/dist/lit-element-CkD27PXL.js.map +1 -0
  174. package/dist/lit-element-DHH1_Q-3.js +28 -0
  175. package/dist/lit-element-DHH1_Q-3.js.map +1 -0
  176. package/dist/peacock-loader.d.ts +2 -0
  177. package/dist/peacock-loader.d.ts.map +1 -0
  178. package/dist/peacock-loader.js +465 -116
  179. package/dist/peacock-loader.js.map +1 -1
  180. package/dist/property-BXcRN0hQ.js +39 -0
  181. package/dist/property-BXcRN0hQ.js.map +1 -0
  182. package/dist/property-CR1ZrEd9.js +45 -0
  183. package/dist/property-CR1ZrEd9.js.map +1 -0
  184. package/dist/property-CqSbFxyM.js +45 -0
  185. package/dist/property-CqSbFxyM.js.map +1 -0
  186. package/dist/property-DNaigT7h.js +39 -0
  187. package/dist/property-DNaigT7h.js.map +1 -0
  188. package/dist/property-yt9tIYgR.js +39 -0
  189. package/dist/property-yt9tIYgR.js.map +1 -0
  190. package/dist/query-CV342L_h.js +189 -0
  191. package/dist/query-CV342L_h.js.map +1 -0
  192. package/dist/ripple-Blc5Rqhb.js +102 -0
  193. package/dist/ripple-Blc5Rqhb.js.map +1 -0
  194. package/dist/ripple-BqTcEQAP.js +102 -0
  195. package/dist/ripple-BqTcEQAP.js.map +1 -0
  196. package/dist/ripple-BqUjb18i.js +105 -0
  197. package/dist/ripple-BqUjb18i.js.map +1 -0
  198. package/dist/ripple-Buzs-MON.js +106 -0
  199. package/dist/ripple-Buzs-MON.js.map +1 -0
  200. package/dist/ripple-Bz5B_LoE.js +102 -0
  201. package/dist/ripple-Bz5B_LoE.js.map +1 -0
  202. package/dist/ripple-CAq7Ix6x.js +106 -0
  203. package/dist/ripple-CAq7Ix6x.js.map +1 -0
  204. package/dist/ripple-CDqSm_Vy.js +106 -0
  205. package/dist/ripple-CDqSm_Vy.js.map +1 -0
  206. package/dist/ripple-CJtPH28B.js +102 -0
  207. package/dist/ripple-CJtPH28B.js.map +1 -0
  208. package/dist/ripple-CKTd8obC.js +92 -0
  209. package/dist/ripple-CKTd8obC.js.map +1 -0
  210. package/dist/ripple-CKnDWTVQ.js +107 -0
  211. package/dist/ripple-CKnDWTVQ.js.map +1 -0
  212. package/dist/ripple-CeR8eLuc.js +93 -0
  213. package/dist/ripple-CeR8eLuc.js.map +1 -0
  214. package/dist/ripple-Czp3eR6w.js +127 -0
  215. package/dist/ripple-Czp3eR6w.js.map +1 -0
  216. package/dist/ripple-DIab1MaY.js +106 -0
  217. package/dist/ripple-DIab1MaY.js.map +1 -0
  218. package/dist/ripple-DUFMimxZ.js +120 -0
  219. package/dist/ripple-DUFMimxZ.js.map +1 -0
  220. package/dist/ripple-DVmDdoNV.js +102 -0
  221. package/dist/ripple-DVmDdoNV.js.map +1 -0
  222. package/dist/ripple-DYnhXK5d.js +118 -0
  223. package/dist/ripple-DYnhXK5d.js.map +1 -0
  224. package/dist/ripple-DnudV47f.js +102 -0
  225. package/dist/ripple-DnudV47f.js.map +1 -0
  226. package/dist/ripple-DsC-h31M.js +119 -0
  227. package/dist/ripple-DsC-h31M.js.map +1 -0
  228. package/dist/ripple-DvM0SPd9.js +128 -0
  229. package/dist/ripple-DvM0SPd9.js.map +1 -0
  230. package/dist/ripple-NWIiDgX2.js +128 -0
  231. package/dist/ripple-NWIiDgX2.js.map +1 -0
  232. package/dist/ripple-X3U_R8lT.js +106 -0
  233. package/dist/ripple-X3U_R8lT.js.map +1 -0
  234. package/dist/ripple.js +128 -0
  235. package/dist/ripple.js.map +1 -0
  236. package/dist/src/LoaderUtils.d.ts +0 -1
  237. package/dist/src/avatar/avatar.d.ts +1 -1
  238. package/dist/src/badge/badge.d.ts +1 -1
  239. package/dist/src/button/button.d.ts +99 -0
  240. package/dist/src/button/index.d.ts +1 -0
  241. package/dist/src/clock/ClockController.d.ts +10 -0
  242. package/dist/src/clock/clock.d.ts +4 -6
  243. package/dist/src/code-highlighter/code-highlighter.d.ts +26 -0
  244. package/dist/src/code-highlighter/index.d.ts +1 -0
  245. package/dist/src/code-highlighter/local.d.ts +6 -0
  246. package/dist/src/divider/divider.d.ts +1 -2
  247. package/dist/src/elevation/elevation.css.d.ts +1 -0
  248. package/dist/src/elevation/elevation.d.ts +27 -0
  249. package/dist/src/elevation/index.d.ts +1 -0
  250. package/dist/src/focus-ring/FocusAttachableController.d.ts +9 -0
  251. package/dist/src/focus-ring/focus-ring.d.ts +35 -0
  252. package/dist/src/focus-ring/index.d.ts +1 -0
  253. package/dist/src/icon/icon.d.ts +3 -2
  254. package/dist/src/index.d.ts +4 -0
  255. package/dist/src/ripple/index.d.ts +1 -0
  256. package/dist/src/ripple/ripple.d.ts +9 -0
  257. package/dist/src/utils.d.ts +4 -0
  258. package/dist/state-BXOdKkbT.js +10 -0
  259. package/dist/state-BXOdKkbT.js.map +1 -0
  260. package/dist/state-BfUul2Gq.js +10 -0
  261. package/dist/state-BfUul2Gq.js.map +1 -0
  262. package/dist/state-CNX6DhqO.js +10 -0
  263. package/dist/state-CNX6DhqO.js.map +1 -0
  264. package/dist/state-Cl3mjeR1.js +10 -0
  265. package/dist/state-Cl3mjeR1.js.map +1 -0
  266. package/dist/state-WDFgnqnd.js +36 -0
  267. package/dist/state-WDFgnqnd.js.map +1 -0
  268. package/dist/style-inject.es--nCJ9F_D.js +55 -0
  269. package/dist/style-inject.es--nCJ9F_D.js.map +1 -0
  270. package/dist/style-inject.es-tgCJW-Cu.js +29 -0
  271. package/dist/style-inject.es-tgCJW-Cu.js.map +1 -0
  272. package/dist/styleMixins.css-0Uq-6ouM.js +14 -0
  273. package/dist/styleMixins.css-0Uq-6ouM.js.map +1 -0
  274. package/dist/styleMixins.css-B8H9wDNA.js +17 -0
  275. package/dist/styleMixins.css-B8H9wDNA.js.map +1 -0
  276. package/dist/styleMixins.css-DrUsqddl.js +17 -0
  277. package/dist/styleMixins.css-DrUsqddl.js.map +1 -0
  278. package/dist/styleMixins.css-fokZCyF-.js +17 -0
  279. package/dist/styleMixins.css-fokZCyF-.js.map +1 -0
  280. package/dist/styleMixins.css.d.ts +10 -0
  281. package/dist/styleMixins.css.d.ts.map +1 -0
  282. package/dist/text/text.css.d.ts +3 -0
  283. package/dist/text/text.css.d.ts.map +1 -0
  284. package/dist/tsconfig.tsbuildinfo +1 -1
  285. package/dist/typedoc.json +340489 -0
  286. package/dist/utils-BVap5huR.js +157 -0
  287. package/dist/utils-BVap5huR.js.map +1 -0
  288. package/dist/utils-CY3RyfcA.js +157 -0
  289. package/dist/utils-CY3RyfcA.js.map +1 -0
  290. package/dist/utils-CdOdn2dW.js +149 -0
  291. package/dist/utils-CdOdn2dW.js.map +1 -0
  292. package/dist/utils-DD_cg6Ms.js +157 -0
  293. package/dist/utils-DD_cg6Ms.js.map +1 -0
  294. package/dist/utils.d.ts +8 -0
  295. package/dist/utils.d.ts.map +1 -0
  296. package/package.json +4 -2
  297. package/readme.md +1 -1
  298. package/rollup.config.js +9 -1
  299. package/scss/mixin.scss +50 -0
  300. package/src/LoaderUtils.ts +122 -122
  301. package/src/avatar/avatar.scss +38 -0
  302. package/src/avatar/avatar.ts +1 -1
  303. package/src/badge/badge.scss +31 -0
  304. package/src/badge/badge.ts +1 -1
  305. package/src/button/_button-sizes.scss +59 -0
  306. package/src/button/button.scss +430 -0
  307. package/src/button/button.ts +304 -0
  308. package/src/button/demo/index.html +42 -0
  309. package/src/button/index.ts +1 -0
  310. package/src/clock/ClockController.ts +32 -0
  311. package/src/clock/clock.scss +9 -0
  312. package/src/clock/clock.ts +39 -57
  313. package/src/code-highlighter/code-highlighter.scss +0 -0
  314. package/src/code-highlighter/code-highlighter.ts +58 -0
  315. package/src/code-highlighter/demo/index.html +58 -0
  316. package/src/code-highlighter/index.ts +1 -0
  317. package/src/code-highlighter/local.ts +11 -0
  318. package/src/divider/divider.scss +56 -0
  319. package/src/divider/divider.ts +1 -7
  320. package/src/elevation/demo/index.html +58 -0
  321. package/src/elevation/elevation.scss +61 -0
  322. package/src/elevation/elevation.ts +32 -0
  323. package/src/elevation/index.ts +1 -0
  324. package/src/focus-ring/FocusAttachableController.ts +36 -0
  325. package/src/focus-ring/demo/index.html +58 -0
  326. package/src/focus-ring/focus-ring.scss +22 -0
  327. package/src/focus-ring/focus-ring.ts +83 -0
  328. package/src/focus-ring/index.ts +1 -0
  329. package/src/icon/icon.scss +19 -0
  330. package/src/icon/icon.ts +131 -131
  331. package/src/index.ts +9 -5
  332. package/src/link/demo/index.html +34 -0
  333. package/src/link/link.scss +24 -0
  334. package/src/peacock-loader.ts +69 -64
  335. package/src/ripple/index.ts +1 -0
  336. package/src/ripple/ripple.ts +134 -0
  337. package/src/styles.d.ts +3 -1
  338. package/src/text/text.scss +48 -0
  339. package/src/utils.ts +29 -1
  340. package/tsconfig.json +23 -22
  341. package/demo/int.html +0 -31
  342. package/src/avatar/avatar.css.ts +0 -41
  343. package/src/badge/badge.css.ts +0 -34
  344. package/src/clock/clock.css.ts +0 -12
  345. package/src/divider/divider.css.ts +0 -58
  346. package/src/icon/icon.css.ts +0 -22
package/dist/button.js ADDED
@@ -0,0 +1,710 @@
1
+ import { _ as __decorate, n, a as __classPrivateFieldGet } from './property-CR1ZrEd9.js';
2
+ import { i, a as i$1, b } from './lit-element-CkD27PXL.js';
3
+ import { r, t as throttle, o as observerSlotChangesWithCallback } from './utils-CY3RyfcA.js';
4
+ import { e as e$2 } from './class-map-Cavm-B1S.js';
5
+ import { s as styleInject } from './style-inject.es-tgCJW-Cu.js';
6
+ import './directive-BKuZRRPO.js';
7
+
8
+ /**
9
+ * @license
10
+ * Copyright 2017 Google LLC
11
+ * SPDX-License-Identifier: BSD-3-Clause
12
+ */
13
+ const e$1=(e,t,c)=>(c.configurable=true,c.enumerable=true,Reflect.decorate&&"object"!=typeof t&&Object.defineProperty(e,t,c),c);
14
+
15
+ /**
16
+ * @license
17
+ * Copyright 2017 Google LLC
18
+ * SPDX-License-Identifier: BSD-3-Clause
19
+ */function e(e,r){return (n,s,i)=>{const o=t=>t.renderRoot?.querySelector(e)??null;return e$1(n,s,{get(){return o(this)}})}}
20
+
21
+ var css_248z = i`/**
22
+ * @prop --pc-button-color: Button filling color.
23
+ * @prop --pc-button-color-light: Button filling color for light variant.
24
+ * @prop --pc-button-color-hover: Button filling color on hover.
25
+ * @prop --pc-button-color-active: Button filling color on active.
26
+ * @prop --pc-button-support-contrast-color: Button support color (text or border). Should be white or black based on weight of button filling color.
27
+ */
28
+ :host {
29
+ display: inline-flex;
30
+ --z-index-button: 0;
31
+ --pc-button-border-width: var(--goat-theme-button-border-width);
32
+ /**
33
+ * @prop --pc-button-border-radius: Button border radius.
34
+ * @prop --goat-theme-button-border-radius: Theme level button border radius. (applies to all buttons)
35
+ */
36
+ --pc-button-border-radius: var(--goat-theme-button-border-radius, var(--border-radius));
37
+ /**
38
+ * @prop --pc-button-border-style: Button border style.
39
+ * @prop --goat-theme-button-border-style: Theme level button border style. (applies to all buttons)
40
+ */
41
+ --pc-button-border-style: var(--goat-theme-button-border-style, solid);
42
+ /**
43
+ * @prop --pc-button-padding: Button padding.
44
+ */
45
+ --pc-button-padding: unset;
46
+ --button-height: unset;
47
+ --button-icon-size: unset;
48
+ --button-container-shape: unset;
49
+ --filled-button-container-color: var(--color-primary);
50
+ --filled-button-label-text-color: var(--color-on-primary);
51
+ --tonal-button-container-color: var(--color-secondary-container);
52
+ --tonal-button-label-text-color: var(--color-on-secondary-container);
53
+ --elevated-button-container-color: var(--color-surface-container-low);
54
+ --elevated-button-label-text-color: var(--color-primary);
55
+ }
56
+
57
+ /**
58
+ * Private CSS Variables
59
+ * These variables are used internally within the button component
60
+ */
61
+ .button {
62
+ --_container-padding: 0.0625rem;
63
+ }
64
+
65
+ slot::slotted(*) {
66
+ --icon-size: var(--button-icon-size, var(--_button-icon-size));
67
+ }
68
+
69
+ /*
70
+ * Reset native button/link styles
71
+ */
72
+ .button.button-element {
73
+ background: transparent;
74
+ border: none;
75
+ appearance: none;
76
+ margin: 0;
77
+ outline: none;
78
+ text-decoration: none;
79
+ }
80
+
81
+ .button {
82
+ position: relative;
83
+ display: inline-flex;
84
+ flex-direction: column;
85
+ align-items: center;
86
+ justify-content: center;
87
+ height: var(--button-height, var(--_button-height));
88
+ padding: 0 var(--_container-padding);
89
+ cursor: pointer;
90
+ border-start-start-radius: var(--_container-shape-start-start);
91
+ border-start-end-radius: var(--_container-shape-start-end);
92
+ border-end-start-radius: var(--_container-shape-end-start);
93
+ border-end-end-radius: var(--_container-shape-end-end);
94
+ }
95
+ .button .button-content {
96
+ display: flex;
97
+ align-items: center;
98
+ justify-content: center;
99
+ gap: var(--_button-icon-label-spacing);
100
+ z-index: var(--z-index-button);
101
+ width: 100%;
102
+ color: var(--_label-text-color);
103
+ opacity: var(--_label-text-opacity, 1);
104
+ --icon-color: currentColor;
105
+ }
106
+ .button .button-content .slot-container {
107
+ display: none;
108
+ }
109
+ .button.disabled {
110
+ cursor: not-allowed;
111
+ }
112
+ .button {
113
+ /*
114
+ Background layers
115
+ */
116
+ }
117
+ .button .focus-ring {
118
+ --focus-ring-shape-start-start: var(--_container-shape-start-start);
119
+ --focus-ring-shape-start-end: var(--_container-shape-start-end);
120
+ --focus-ring-shape-end-start: var(--_container-shape-end-start);
121
+ --focus-ring-shape-end-end: var(--_container-shape-end-end);
122
+ }
123
+ .button .ripple {
124
+ border-radius: inherit;
125
+ }
126
+ .button .background {
127
+ display: block;
128
+ position: absolute;
129
+ left: 0;
130
+ width: 100%;
131
+ height: 100%;
132
+ background-color: var(--_container-color);
133
+ opacity: var(--_container-opacity, 1);
134
+ box-sizing: border-box;
135
+ border-radius: inherit;
136
+ pointer-events: none;
137
+ }
138
+ .button .ripple {
139
+ --ripple-state-opacity: var(--_container-state-opacity, 0);
140
+ --ripple-pressed-color: var(--_container-state-color);
141
+ }
142
+ .button .elevation {
143
+ --elevation-level: var(--_container-elevation-level);
144
+ transition-duration: 280ms;
145
+ border-radius: inherit;
146
+ }
147
+ .button .neo-background {
148
+ display: none;
149
+ position: absolute;
150
+ background: var(--color-inverse-surface);
151
+ border-radius: inherit;
152
+ width: 100%;
153
+ height: 100%;
154
+ pointer-events: none;
155
+ transform: translateX(0.25rem) translateY(0.25rem);
156
+ }
157
+ .button .neo-background:before {
158
+ content: "";
159
+ position: absolute;
160
+ pointer-events: none;
161
+ border-radius: inherit;
162
+ width: 100%;
163
+ height: 100%;
164
+ background: white;
165
+ left: 0;
166
+ transform: translateX(-0.25rem) translateY(-0.25rem);
167
+ }
168
+ .button .outline {
169
+ z-index: 1;
170
+ display: none;
171
+ position: absolute;
172
+ left: 0;
173
+ width: 100%;
174
+ height: 100%;
175
+ pointer-events: none;
176
+ box-sizing: border-box;
177
+ border: var(--_outline-width) solid var(--_outline-color);
178
+ border-radius: inherit;
179
+ }
180
+ .button.has-content .slot-container {
181
+ display: flex;
182
+ flex: none;
183
+ justify-content: center;
184
+ }
185
+
186
+ .button {
187
+ font-family: var(--font-family-sans) !important;
188
+ }
189
+
190
+ .button.size-xs,
191
+ .button.size-extra-small {
192
+ --_button-height: 2rem;
193
+ --_button-icon-size: 1.25rem;
194
+ --_container-padding: 0.75rem;
195
+ }
196
+ .button.size-xs:not(.has-content).has-icon,
197
+ .button.size-extra-small:not(.has-content).has-icon {
198
+ --internal-button-padding: 0.25rem;
199
+ }
200
+
201
+ .button.size-sm,
202
+ .button.size-small {
203
+ --_button-height: 2.5rem;
204
+ --_button-icon-size: 1.25rem;
205
+ --_container-padding: 1rem;
206
+ --_button-icon-label-spacing: 0.5rem;
207
+ font-size: 0.875rem !important;
208
+ font-weight: var(--font-weight-medium) !important;
209
+ line-height: 1.25rem !important;
210
+ letter-spacing: 1px !important;
211
+ }
212
+
213
+ .button.size-md,
214
+ .button.size-medium {
215
+ --_button-height: 3.5rem;
216
+ --_button-icon-size: 1.5rem;
217
+ --_container-padding: 1.5rem;
218
+ }
219
+ .button.size-md:not(.has-content).has-icon,
220
+ .button.size-medium:not(.has-content).has-icon {
221
+ --internal-button-padding: 0.75rem;
222
+ }
223
+
224
+ .button.size-lg,
225
+ .button.size-large {
226
+ --_button-height: 6rem;
227
+ --_button-icon-size: 2rem;
228
+ --_container-padding: 3rem;
229
+ }
230
+
231
+ .button.size-xl {
232
+ --_button-height: 8.5rem;
233
+ --_button-icon-size: 2.5rem;
234
+ --_container-padding: 4rem;
235
+ }
236
+ .button.size-xl .button-content {
237
+ padding-bottom: 1rem;
238
+ }
239
+
240
+ /**
241
+ * Button variant definitions
242
+ */
243
+ .button.variant-filled {
244
+ --_container-shape-start-start: var(--filled-button-container-shape-start-start, var(--button-container-shape, var(--shape-corner-small)));
245
+ --_container-shape-start-end: var(--filled-button-container-shape-start-end, var(--button-container-shape, var(--shape-corner-small)));
246
+ --_container-shape-end-start: var(--filled-button-container-shape-end-start, var(--button-container-shape, var(--shape-corner-small)));
247
+ --_container-shape-end-end: var(--filled-button-container-shape-end-end, var(--button-container-shape, var(--shape-corner-small)));
248
+ --_container-color: var(--filled-button-container-color);
249
+ --_label-text-color: var(--filled-button-label-text-color);
250
+ --_container-state-color: var(--_label-text-color);
251
+ }
252
+ .button.variant-filled:hover:not(.disabled) {
253
+ --_container-elevation-level: 1;
254
+ --_container-state-opacity: 0.08;
255
+ }
256
+ .button.variant-filled.pressed:not(.disabled) {
257
+ --_container-elevation-level: 0;
258
+ --_container-state-opacity: 0.1;
259
+ }
260
+ .button.variant-filled.disabled {
261
+ --_container-color: var(--color-on-surface);
262
+ --_container-opacity: 0.1;
263
+ --_label-text-color: var(--color-on-surface);
264
+ --_label-text-opacity: 0.38;
265
+ }
266
+ .button.variant-filled.disabled .ripple {
267
+ display: none;
268
+ }
269
+
270
+ .button.variant-elevated {
271
+ --_container-shape-start-start: var(--elevated-button-container-shape-start-start, var(--button-container-shape, var(--shape-corner-small)));
272
+ --_container-shape-start-end: var(--elevated-button-container-shape-start-end, var(--button-container-shape, var(--shape-corner-small)));
273
+ --_container-shape-end-start: var(--elevated-button-container-shape-end-start, var(--button-container-shape, var(--shape-corner-small)));
274
+ --_container-shape-end-end: var(--elevated-button-container-shape-end-end, var(--button-container-shape, var(--shape-corner-small)));
275
+ --_container-color: var(--elevated-button-container-color);
276
+ --_label-text-color: var(--elevated-button-label-text-color);
277
+ --_container-elevation-level: 1;
278
+ --_container-state-color: var(--_label-text-color);
279
+ }
280
+ .button.variant-elevated:hover:not(.disabled) {
281
+ --_container-elevation-level: 2;
282
+ --_container-state-opacity: 0.08;
283
+ }
284
+ .button.variant-elevated.pressed:not(.disabled) {
285
+ --_container-elevation-level: 1;
286
+ --_container-state-opacity: 0.12;
287
+ }
288
+ .button.variant-elevated.disabled {
289
+ --_container-color: var(--color-on-surface);
290
+ --_container-opacity: 0.1;
291
+ --_label-text-color: var(--color-on-surface);
292
+ --_label-text-opacity: 0.38;
293
+ }
294
+ .button.variant-elevated.disabled .ripple {
295
+ display: none;
296
+ }
297
+
298
+ .button.variant-tonal {
299
+ --_container-shape-start-start: var(--tonal-button-container-shape-start-start, var(--button-container-shape, var(--shape-corner-small)));
300
+ --_container-shape-start-end: var(--tonal-button-container-shape-start-end, var(--button-container-shape, var(--shape-corner-small)));
301
+ --_container-shape-end-start: var(--tonal-button-container-shape-end-start, var(--button-container-shape, var(--shape-corner-small)));
302
+ --_container-shape-end-end: var(--tonal-button-container-shape-end-end, var(--button-container-shape, var(--shape-corner-small)));
303
+ --_container-color: var(--tonal-button-container-color);
304
+ --_label-text-color: var(--tonal-button-label-text-color);
305
+ --_container-state-color: var(--_label-text-color);
306
+ }
307
+ .button.variant-tonal:hover:not(.disabled) {
308
+ --_container-elevation-level: 1;
309
+ --_container-state-opacity: 0.08;
310
+ }
311
+ .button.variant-tonal.pressed:not(.disabled) {
312
+ --_container-elevation-level: 0;
313
+ --_container-state-opacity: 0.12;
314
+ }
315
+ .button.variant-tonal.disabled {
316
+ --_container-color: var(--color-on-surface);
317
+ --_container-opacity: 0.1;
318
+ --_label-text-color: var(--color-on-surface);
319
+ --_label-text-opacity: 0.38;
320
+ }
321
+ .button.variant-tonal.disabled .ripple {
322
+ display: none;
323
+ }
324
+
325
+ .button.variant-outlined {
326
+ --_container-shape-start-start: var(--outlined-button-container-shape-start-start, var(--button-container-shape, var(--shape-corner-small)));
327
+ --_container-shape-start-end: var(--outlined-button-container-shape-start-end, var(--button-container-shape, var(--shape-corner-small)));
328
+ --_container-shape-end-start: var(--outlined-button-container-shape-end-start, var(--button-container-shape, var(--shape-corner-small)));
329
+ --_container-shape-end-end: var(--outlined-button-container-shape-end-end, var(--button-container-shape, var(--shape-corner-small)));
330
+ --_outline-width: var(--outlined-button-outline-width, 0.125rem);
331
+ --_outline-color: var(--outlined-button-outline-color, var(--color-outline));
332
+ --_label-text-color: var(--color-on-surface-variant);
333
+ --_container-state-color: var(--color-on-surface-variant);
334
+ }
335
+ .button.variant-outlined .outline {
336
+ display: block;
337
+ }
338
+ .button.variant-outlined:hover:not(.disabled) {
339
+ --_container-state-opacity: 0.08;
340
+ }
341
+ .button.variant-outlined.pressed:not(.disabled) {
342
+ --_container-state-opacity: 0.12;
343
+ }
344
+ .button.variant-outlined.disabled {
345
+ --_label-text-color: var(--color-on-surface);
346
+ --_label-text-opacity: 0.38;
347
+ --_outline-color: var(--color-on-surface);
348
+ }
349
+ .button.variant-outlined.disabled .ripple {
350
+ display: none;
351
+ }
352
+
353
+ .button.variant-text {
354
+ --_container-shape-start-start: var(--text-button-container-shape-start-start, var(--button-container-shape, var(--shape-corner-small)));
355
+ --_container-shape-start-end: var(--text-button-container-shape-start-end, var(--button-container-shape, var(--shape-corner-small)));
356
+ --_container-shape-end-start: var(--text-button-container-shape-end-start, var(--button-container-shape, var(--shape-corner-small)));
357
+ --_container-shape-end-end: var(--text-button-container-shape-end-end, var(--button-container-shape, var(--shape-corner-small)));
358
+ --_label-text-color: var(--color-primary);
359
+ --_container-state-color: var(--color-primary);
360
+ }
361
+ .button.variant-text:hover:not(.disabled) {
362
+ --_container-state-opacity: 0.08;
363
+ }
364
+ .button.variant-text.pressed:not(.disabled) {
365
+ --_container-state-opacity: 0.12;
366
+ }
367
+ .button.variant-text.disabled {
368
+ --_label-text-color: var(--color-on-surface);
369
+ --_label-text-opacity: 0.38;
370
+ }
371
+ .button.variant-text.disabled .ripple {
372
+ display: none;
373
+ }
374
+
375
+ .button.variant-neo {
376
+ --_container-shape-start-start: var(--outlined-button-container-shape-start-start, var(--button-container-shape, var(--shape-corner-small)));
377
+ --_container-shape-start-end: var(--outlined-button-container-shape-start-end, var(--button-container-shape, var(--shape-corner-small)));
378
+ --_container-shape-end-start: var(--outlined-button-container-shape-end-start, var(--button-container-shape, var(--shape-corner-small)));
379
+ --_container-shape-end-end: var(--outlined-button-container-shape-end-end, var(--button-container-shape, var(--shape-corner-small)));
380
+ --_container-color: var(--color-primary);
381
+ --_label-text-color: var(--filled-button-label-text-color);
382
+ --_outline-width: var(--outlined-button-outline-width, 0.125rem);
383
+ --_outline-color: var(--color-inverse-surface);
384
+ }
385
+ .button.variant-neo .outline {
386
+ display: block;
387
+ }
388
+ .button.variant-neo .neo-background {
389
+ display: block;
390
+ }
391
+ .button.variant-neo .ripple {
392
+ display: none;
393
+ }
394
+ .button.variant-neo.pressed:not(.disabled) .background, .button.variant-neo.pressed:not(.disabled) .button-content, .button.variant-neo.pressed:not(.disabled) .outline {
395
+ transform: translateX(0.25rem) translateY(0.25rem);
396
+ }
397
+ .button.variant-neo.disabled {
398
+ --_container-color: var(--color-on-surface);
399
+ --_container-opacity: 0.1;
400
+ --_label-text-color: var(--color-on-surface);
401
+ --_label-text-opacity: 0.38;
402
+ --_outline-color: var(--color-on-surface);
403
+ }
404
+ .button.variant-neo.disabled .ripple {
405
+ display: none;
406
+ }
407
+
408
+ @keyframes outward-grow {
409
+ from {
410
+ outline-width: 0;
411
+ }
412
+ to {
413
+ outline-width: var(--focus-ring-active-width, 8px);
414
+ }
415
+ }
416
+ @keyframes outward-shrink {
417
+ from {
418
+ outline-width: var(--focus-ring-active-width, 8px);
419
+ }
420
+ }`;
421
+ styleInject(css_248z);
422
+
423
+ var _Button_id, _Button_tabindex;
424
+ /**
425
+ * @label Button
426
+ * @tag p-button
427
+ * @rawTag button
428
+ *
429
+ * @summary Buttons help people initiate actions, from sending an email, to sharing a document, to liking a post.
430
+ * @overview
431
+ * <p>Buttons are clickable elements that are used to trigger actions. They communicate calls to action to the user and allow users to interact with pages in a variety of ways. Button labels express what action will occur when the user interacts with it.</p>
432
+ *
433
+ * @cssprop --divider-color - Controls the color of the divider.
434
+ * @cssprop --divider-padding - Controls the padding of the divider.
435
+ *
436
+ * @example
437
+ * ```html
438
+ * <pc-button>Button</pc-button>
439
+ * ```
440
+ * @tags display
441
+ */
442
+ class Button extends i$1 {
443
+ constructor() {
444
+ super(...arguments);
445
+ _Button_id.set(this, crypto.randomUUID());
446
+ _Button_tabindex.set(this, 0);
447
+ this.htmlType = 'button';
448
+ /**
449
+ * The visual style of the button.
450
+ *
451
+ * Possible variant values:
452
+ * `"filled"` is a filled button.
453
+ * `"outlined"` is an outlined button.
454
+ * `"text"` is a transparent button.
455
+ * `"tonal"` is a light color button.
456
+ *
457
+ */
458
+ this.variant = 'filled';
459
+ /**
460
+ * Button size.
461
+ * Possible values are `"sm"`, `"md"`, `"lg"`. Defaults to `"md"`.
462
+ */
463
+ this.size = 'sm';
464
+ /**
465
+ * If true, the user cannot interact with the button. Defaults to `false`.
466
+ */
467
+ this.disabled = false;
468
+ /**
469
+ * If true, the user cannot interact with the button and the button is visually styled as disabled. But the button is still focusable. Defaults to `false`.
470
+ */
471
+ this.softDisabled = false;
472
+ /**
473
+ * If button is disabled, the reason why it is disabled.
474
+ */
475
+ this.disabledReason = '';
476
+ /**
477
+ * Defines the primary color of the button. This can be set to predefined color names to apply specific color themes.
478
+ */
479
+ this.color = 'primary';
480
+ /**
481
+ * Icon alignment.
482
+ * Possible values are `"start"`, `"end"`. Defaults to `"end"`.
483
+ */
484
+ this.iconAlign = 'end';
485
+ /**
486
+ * Sets or retrieves the window or frame at which to target content.
487
+ */
488
+ this.target = '_self';
489
+ this.selected = false;
490
+ /**
491
+ * Sets the delay for throttle in milliseconds. Defaults to 200 milliseconds.
492
+ */
493
+ this.throttleDelay = 200;
494
+ /**
495
+ * States
496
+ */
497
+ this.isPressed = false;
498
+ this.slotHasContent = false;
499
+ this.__dispatchClickWithThrottle = event => {
500
+ this.__dispatchClick(event);
501
+ };
502
+ this.__dispatchClick = (event) => {
503
+ // If the button is soft-disabled or a disabled link, we need to explicitly
504
+ // prevent the click from propagating to other event listeners as well as
505
+ // prevent the default action.
506
+ if (this.softDisabled || (this.disabled && this.href)) {
507
+ event.stopImmediatePropagation();
508
+ event.preventDefault();
509
+ return;
510
+ }
511
+ this.focus();
512
+ this.dispatchEvent(new CustomEvent('button:click', {
513
+ bubbles: true,
514
+ composed: true,
515
+ }));
516
+ };
517
+ this.__handlePress = (event) => {
518
+ if (event instanceof KeyboardEvent &&
519
+ event.type === 'keydown' &&
520
+ (event.key === 'Enter' || event.key === ' ')) {
521
+ this.isPressed = true;
522
+ }
523
+ else if (event.type === 'mousedown') {
524
+ this.isPressed = true;
525
+ }
526
+ else {
527
+ this.isPressed = false;
528
+ }
529
+ };
530
+ }
531
+ focus() {
532
+ this.buttonElement?.focus();
533
+ }
534
+ blur() {
535
+ this.buttonElement?.blur();
536
+ }
537
+ connectedCallback() {
538
+ super.connectedCallback();
539
+ window.addEventListener('mouseup', this.__handlePress);
540
+ }
541
+ disconnectedCallback() {
542
+ window.removeEventListener('mouseup', this.__handlePress);
543
+ super.disconnectedCallback();
544
+ }
545
+ firstUpdated() {
546
+ this.__dispatchClickWithThrottle = throttle(this.__dispatchClick, this.throttleDelay);
547
+ observerSlotChangesWithCallback(this.renderRoot.querySelector('slot'), hasContent => {
548
+ this.slotHasContent = hasContent;
549
+ this.requestUpdate();
550
+ });
551
+ }
552
+ __renderDisabledReason() {
553
+ if (this.disabled && this.disabledReason)
554
+ return b `<div
555
+ id="disabled-reason-${__classPrivateFieldGet(this, _Button_id, "f")}"
556
+ role="tooltip"
557
+ aria-label=${this.disabledReason}
558
+ class="sr-only"
559
+ >
560
+ {this.disabledReason}
561
+ </div>`;
562
+ return null;
563
+ }
564
+ /* @ts-ignore */
565
+ __isLink() {
566
+ return !!this.href;
567
+ }
568
+ render() {
569
+ const isLink = this.__isLink();
570
+ const { variant, subVariant } = this.getVariant();
571
+ const cssClasses = {
572
+ button: true,
573
+ 'button-element': true,
574
+ [`size-${this.size}`]: true,
575
+ [`variant-${variant}`]: true,
576
+ [`variant-${subVariant}`]: !!subVariant,
577
+ [`color-${this.color}`]: true,
578
+ disabled: this.disabled || this.softDisabled,
579
+ pressed: this.isPressed,
580
+ 'has-content': this.slotHasContent,
581
+ };
582
+ if (!isLink) {
583
+ return b `<button
584
+ class=${e$2(cssClasses)}
585
+ tabindex=${__classPrivateFieldGet(this, _Button_tabindex, "f")}
586
+ type=${this.htmlType}
587
+ @click=${this.__dispatchClickWithThrottle}
588
+ @mousedown=${this.__handlePress}
589
+ @keydown=${this.__handlePress}
590
+ @keyup=${this.__handlePress}
591
+ ?aria-describedby=${(this.disabled || this.softDisabled) &&
592
+ this.disabledReason
593
+ ? `disabled-reason-${__classPrivateFieldGet(this, _Button_id, "f")}`
594
+ : null}
595
+ aria-disabled=${`${this.disabled || this.softDisabled}`}
596
+ ?disabled=${this.disabled}
597
+ >
598
+ ${this.renderButtonContent()}
599
+ </button>`;
600
+ }
601
+ return b `<a
602
+ class=${e$2(cssClasses)}
603
+ tabindex=${__classPrivateFieldGet(this, _Button_tabindex, "f")}
604
+ href=${this.href}
605
+ target=${this.target}
606
+ @click=${this.__dispatchClickWithThrottle}
607
+ @mousedown=${this.__handlePress}
608
+ @keydown=${this.__handlePress}
609
+ @keyup=${this.__handlePress}
610
+ role="button"
611
+ aria-describedby=${this.disabled && this.disabledReason
612
+ ? `disabled-reason-${__classPrivateFieldGet(this, _Button_id, "f")}`
613
+ : null}
614
+ aria-disabled=${`${this.disabled}`}
615
+ >
616
+ <div class="icon">
617
+ <slot name="icon"></slot>
618
+ </div>
619
+
620
+ <div class="slot-container">
621
+ <slot></slot>
622
+ </div>
623
+ </a>`;
624
+ }
625
+ getVariant() {
626
+ const variants = this.variant?.split('.');
627
+ if (!['filled', 'outlined', 'text', 'tonal', 'neo'].includes(variants[0])) {
628
+ variants.unshift('filled');
629
+ }
630
+ const [variant, subVariant] = variants;
631
+ return { variant, subVariant };
632
+ }
633
+ renderButtonContent() {
634
+ return b `
635
+ <p-focus-ring class="focus-ring" .control=${this}></p-focus-ring>
636
+ <p-elevation class="elevation"></p-elevation>
637
+ <div class="neo-background"></div>
638
+ <div class="background"></div>
639
+ <div class="outline"></div>
640
+ <p-ripple class="ripple"></p-ripple>
641
+
642
+ <div class="button-content">
643
+ ${this.iconAlign === 'start'
644
+ ? b `<slot name="icon"></slot></div>`
645
+ : null}
646
+
647
+ <div class="slot-container">
648
+ <slot></slot>
649
+ </div>
650
+
651
+ ${this.iconAlign === 'end' ? b `<slot name="icon"></slot>` : null}
652
+ </div>
653
+
654
+ ${this.__renderDisabledReason()}
655
+ `;
656
+ }
657
+ }
658
+ _Button_id = new WeakMap(), _Button_tabindex = new WeakMap();
659
+ Button.styles = [css_248z];
660
+ __decorate([
661
+ e('.button')
662
+ ], Button.prototype, "buttonElement", void 0);
663
+ __decorate([
664
+ n({ type: String })
665
+ ], Button.prototype, "htmlType", void 0);
666
+ __decorate([
667
+ n()
668
+ ], Button.prototype, "variant", void 0);
669
+ __decorate([
670
+ n()
671
+ ], Button.prototype, "size", void 0);
672
+ __decorate([
673
+ n({ reflect: true })
674
+ ], Button.prototype, "disabled", void 0);
675
+ __decorate([
676
+ n({ reflect: true })
677
+ ], Button.prototype, "softDisabled", void 0);
678
+ __decorate([
679
+ n()
680
+ ], Button.prototype, "disabledReason", void 0);
681
+ __decorate([
682
+ n({ reflect: true })
683
+ ], Button.prototype, "color", void 0);
684
+ __decorate([
685
+ n()
686
+ ], Button.prototype, "iconAlign", void 0);
687
+ __decorate([
688
+ n({ reflect: true })
689
+ ], Button.prototype, "href", void 0);
690
+ __decorate([
691
+ n({ reflect: true })
692
+ ], Button.prototype, "configAria", void 0);
693
+ __decorate([
694
+ n()
695
+ ], Button.prototype, "target", void 0);
696
+ __decorate([
697
+ n()
698
+ ], Button.prototype, "selected", void 0);
699
+ __decorate([
700
+ n()
701
+ ], Button.prototype, "throttleDelay", void 0);
702
+ __decorate([
703
+ r()
704
+ ], Button.prototype, "isPressed", void 0);
705
+ __decorate([
706
+ r()
707
+ ], Button.prototype, "slotHasContent", void 0);
708
+
709
+ export { Button };
710
+ //# sourceMappingURL=button.js.map