@redvars/peacock 3.1.1 → 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.
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/LoaderUtils.d.ts +0 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/LoaderUtils.js +0 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/LoaderUtils.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.css.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.d.ts +20 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js +20 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.d.ts +0 -7
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.js +0 -7
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/p-avatar.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.css.js +5 -4
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.css.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.d.ts +16 -2
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js +28 -11
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.d.ts +0 -5
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.js +0 -5
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/p-badge.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/button.d.ts +99 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/button.js +292 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/button.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/index.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/index.js +2 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/button/index.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/ClockController.d.ts +10 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/ClockController.js +22 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/ClockController.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.css.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.css.js +12 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.css.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.d.ts +25 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.js +41 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/index.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/index.js +2 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/index.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/code-highlighter.d.ts +26 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/code-highlighter.js +60 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/code-highlighter.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/index.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/index.js +2 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/index.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/local.d.ts +6 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/local.js +7 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/local.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.css.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.css.js +58 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.css.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.d.ts +27 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.js +61 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/index.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/index.js +2 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/index.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.css.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.css.js +47 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.css.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.d.ts +27 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.js +31 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/index.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/index.js +2 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/index.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/FocusAttachableController.d.ts +9 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/FocusAttachableController.js +25 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/FocusAttachableController.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/focus-ring.d.ts +35 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/focus-ring.js +81 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/focus-ring.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/index.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/index.js +2 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/focus-ring/index.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.d.ts +23 -2
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js +20 -4
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.d.ts +0 -7
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.js +0 -7
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/p-icon.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.d.ts +6 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js +6 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/peacock-loader.js +35 -19
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/peacock-loader.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/index.d.ts +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/index.js +2 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/index.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/ripple.d.ts +9 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/ripple.js +125 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/ripple/ripple.js.map +1 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.d.ts +5 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js +54 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js.map +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/tsconfig.tsbuildinfo +1 -1
- package/bin/typedoc-gen.mjs +63 -0
- package/custom-elements-manifest.config.mjs +5 -6
- package/demo/index.html +45 -42
- package/dist/LoaderUtils.d.ts +23 -0
- package/dist/LoaderUtils.d.ts.map +1 -0
- package/dist/assets/styles/tokens.css +21 -53
- package/dist/avatar/avatar.d.ts +28 -0
- package/dist/avatar/avatar.d.ts.map +1 -0
- package/dist/avatar/index.d.ts +2 -0
- package/dist/avatar/index.d.ts.map +1 -0
- package/dist/avatar/p-avatar.d.ts +4 -0
- package/dist/avatar/p-avatar.d.ts.map +1 -0
- package/dist/avatar.js +100 -0
- package/dist/avatar.js.map +1 -0
- package/dist/badge/badge.d.ts +24 -0
- package/dist/badge/badge.d.ts.map +1 -0
- package/dist/badge/index.d.ts +2 -0
- package/dist/badge/index.d.ts.map +1 -0
- package/dist/badge/p-badge.d.ts +4 -0
- package/dist/badge/p-badge.d.ts.map +1 -0
- package/dist/badge.js +90 -0
- package/dist/badge.js.map +1 -0
- package/dist/button/button.d.ts +103 -0
- package/dist/button/button.d.ts.map +1 -0
- package/dist/button/index.d.ts +2 -0
- package/dist/button/index.d.ts.map +1 -0
- package/dist/button.js +710 -0
- package/dist/button.js.map +1 -0
- package/dist/class-map-BzIzngvN.js +89 -0
- package/dist/class-map-BzIzngvN.js.map +1 -0
- package/dist/class-map-CBk4-iMN.js +11 -0
- package/dist/class-map-CBk4-iMN.js.map +1 -0
- package/dist/class-map-Cavm-B1S.js +11 -0
- package/dist/class-map-Cavm-B1S.js.map +1 -0
- package/dist/class-map-DL5vM0J2.js +11 -0
- package/dist/class-map-DL5vM0J2.js.map +1 -0
- package/dist/class-map-DpvLRi0h.js +11 -0
- package/dist/class-map-DpvLRi0h.js.map +1 -0
- package/dist/class-map-IbP5VjmB.js +11 -0
- package/dist/class-map-IbP5VjmB.js.map +1 -0
- package/dist/clock/ClockController.d.ts +11 -0
- package/dist/clock/ClockController.d.ts.map +1 -0
- package/dist/clock/clock.d.ts +26 -0
- package/dist/clock/clock.d.ts.map +1 -0
- package/dist/clock/index.d.ts +2 -0
- package/dist/clock/index.d.ts.map +1 -0
- package/dist/clock.js +77 -0
- package/dist/clock.js.map +1 -0
- package/dist/code-highlighter/code-highlighter.d.ts +27 -0
- package/dist/code-highlighter/code-highlighter.d.ts.map +1 -0
- package/dist/code-highlighter/index.d.ts +2 -0
- package/dist/code-highlighter/index.d.ts.map +1 -0
- package/dist/code-highlighter/local.d.ts +7 -0
- package/dist/code-highlighter/local.d.ts.map +1 -0
- package/dist/code-highlighter.js +66 -0
- package/dist/code-highlighter.js.map +1 -0
- package/dist/custom-elements-jsdocs.json +1211 -0
- package/dist/directive-BKuZRRPO.js +9 -0
- package/dist/directive-BKuZRRPO.js.map +1 -0
- package/dist/directive-CkFJvUQK.js +45 -0
- package/dist/directive-CkFJvUQK.js.map +1 -0
- package/dist/divider/divider.d.ts +28 -0
- package/dist/divider/divider.d.ts.map +1 -0
- package/dist/divider/index.d.ts +2 -0
- package/dist/divider/index.d.ts.map +1 -0
- package/dist/divider.js +117 -0
- package/dist/divider.js.map +1 -0
- package/dist/elevation/elevation.d.ts +28 -0
- package/dist/elevation/elevation.d.ts.map +1 -0
- package/dist/elevation/index.d.ts +2 -0
- package/dist/elevation/index.d.ts.map +1 -0
- package/dist/elevation-Bl1N6qEq.js +100 -0
- package/dist/elevation-Bl1N6qEq.js.map +1 -0
- package/dist/elevation-CbF5he8B.js +103 -0
- package/dist/elevation-CbF5he8B.js.map +1 -0
- package/dist/elevation-D3F6Z1jU.js +100 -0
- package/dist/elevation-D3F6Z1jU.js.map +1 -0
- package/dist/elevation.js +77 -0
- package/dist/elevation.js.map +1 -0
- package/dist/focus-ring/FocusAttachableController.d.ts +10 -0
- package/dist/focus-ring/FocusAttachableController.d.ts.map +1 -0
- package/dist/focus-ring/focus-ring.d.ts +36 -0
- package/dist/focus-ring/focus-ring.d.ts.map +1 -0
- package/dist/focus-ring/index.d.ts +2 -0
- package/dist/focus-ring/index.d.ts.map +1 -0
- package/dist/focus-ring.js +105 -0
- package/dist/focus-ring.js.map +1 -0
- package/dist/icon/datasource.d.ts +3 -0
- package/dist/icon/datasource.d.ts.map +1 -0
- package/dist/icon/icon.d.ts +42 -0
- package/dist/icon/icon.d.ts.map +1 -0
- package/dist/icon/index.d.ts +2 -0
- package/dist/icon/index.d.ts.map +1 -0
- package/dist/icon/p-icon.d.ts +4 -0
- package/dist/icon/p-icon.d.ts.map +1 -0
- package/dist/{component/icon.js → icon.js} +43 -124
- package/dist/icon.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -67
- package/dist/index.js.map +1 -1
- package/dist/link/link.css.d.ts +3 -0
- package/dist/link/link.css.d.ts.map +1 -0
- package/dist/lit-element-B7NX__Gq.js +2851 -0
- package/dist/lit-element-B7NX__Gq.js.map +1 -0
- package/dist/lit-element-Bq5B2QNv.js +28 -0
- package/dist/lit-element-Bq5B2QNv.js.map +1 -0
- package/dist/lit-element-CkD27PXL.js +28 -0
- package/dist/lit-element-CkD27PXL.js.map +1 -0
- package/dist/lit-element-DHH1_Q-3.js +28 -0
- package/dist/lit-element-DHH1_Q-3.js.map +1 -0
- package/dist/peacock-loader.d.ts +2 -0
- package/dist/peacock-loader.d.ts.map +1 -0
- package/dist/peacock-loader.js +479 -121
- package/dist/peacock-loader.js.map +1 -1
- package/dist/property-BXcRN0hQ.js +39 -0
- package/dist/property-BXcRN0hQ.js.map +1 -0
- package/dist/property-CR1ZrEd9.js +45 -0
- package/dist/property-CR1ZrEd9.js.map +1 -0
- package/dist/property-CqSbFxyM.js +45 -0
- package/dist/property-CqSbFxyM.js.map +1 -0
- package/dist/{directive-CKEA2P55.js → property-D4Kn9TsY.js} +6 -13
- package/dist/property-D4Kn9TsY.js.map +1 -0
- package/dist/property-DNaigT7h.js +39 -0
- package/dist/property-DNaigT7h.js.map +1 -0
- package/dist/property-yt9tIYgR.js +39 -0
- package/dist/property-yt9tIYgR.js.map +1 -0
- package/dist/query-CV342L_h.js +189 -0
- package/dist/query-CV342L_h.js.map +1 -0
- package/dist/ripple-Blc5Rqhb.js +102 -0
- package/dist/ripple-Blc5Rqhb.js.map +1 -0
- package/dist/ripple-BqTcEQAP.js +102 -0
- package/dist/ripple-BqTcEQAP.js.map +1 -0
- package/dist/ripple-BqUjb18i.js +105 -0
- package/dist/ripple-BqUjb18i.js.map +1 -0
- package/dist/ripple-Buzs-MON.js +106 -0
- package/dist/ripple-Buzs-MON.js.map +1 -0
- package/dist/ripple-Bz5B_LoE.js +102 -0
- package/dist/ripple-Bz5B_LoE.js.map +1 -0
- package/dist/ripple-CAq7Ix6x.js +106 -0
- package/dist/ripple-CAq7Ix6x.js.map +1 -0
- package/dist/ripple-CDqSm_Vy.js +106 -0
- package/dist/ripple-CDqSm_Vy.js.map +1 -0
- package/dist/ripple-CJtPH28B.js +102 -0
- package/dist/ripple-CJtPH28B.js.map +1 -0
- package/dist/ripple-CKTd8obC.js +92 -0
- package/dist/ripple-CKTd8obC.js.map +1 -0
- package/dist/ripple-CKnDWTVQ.js +107 -0
- package/dist/ripple-CKnDWTVQ.js.map +1 -0
- package/dist/ripple-CeR8eLuc.js +93 -0
- package/dist/ripple-CeR8eLuc.js.map +1 -0
- package/dist/ripple-Czp3eR6w.js +127 -0
- package/dist/ripple-Czp3eR6w.js.map +1 -0
- package/dist/ripple-DIab1MaY.js +106 -0
- package/dist/ripple-DIab1MaY.js.map +1 -0
- package/dist/ripple-DUFMimxZ.js +120 -0
- package/dist/ripple-DUFMimxZ.js.map +1 -0
- package/dist/ripple-DVmDdoNV.js +102 -0
- package/dist/ripple-DVmDdoNV.js.map +1 -0
- package/dist/ripple-DYnhXK5d.js +118 -0
- package/dist/ripple-DYnhXK5d.js.map +1 -0
- package/dist/ripple-DnudV47f.js +102 -0
- package/dist/ripple-DnudV47f.js.map +1 -0
- package/dist/ripple-DsC-h31M.js +119 -0
- package/dist/ripple-DsC-h31M.js.map +1 -0
- package/dist/ripple-DvM0SPd9.js +128 -0
- package/dist/ripple-DvM0SPd9.js.map +1 -0
- package/dist/ripple-NWIiDgX2.js +128 -0
- package/dist/ripple-NWIiDgX2.js.map +1 -0
- package/dist/ripple-X3U_R8lT.js +106 -0
- package/dist/ripple-X3U_R8lT.js.map +1 -0
- package/dist/ripple.js +128 -0
- package/dist/ripple.js.map +1 -0
- package/dist/src/LoaderUtils.d.ts +0 -1
- package/dist/src/avatar/avatar.d.ts +20 -1
- package/dist/src/avatar/p-avatar.d.ts +0 -7
- package/dist/src/badge/badge.d.ts +16 -2
- package/dist/src/badge/p-badge.d.ts +0 -5
- package/dist/src/button/button.d.ts +99 -0
- package/dist/src/button/index.d.ts +1 -0
- package/dist/src/clock/ClockController.d.ts +10 -0
- package/dist/src/clock/clock.css.d.ts +1 -0
- package/dist/src/clock/clock.d.ts +25 -0
- package/dist/src/clock/index.d.ts +1 -0
- package/dist/src/code-highlighter/code-highlighter.d.ts +26 -0
- package/dist/src/code-highlighter/index.d.ts +1 -0
- package/dist/src/code-highlighter/local.d.ts +6 -0
- package/dist/src/divider/divider.css.d.ts +1 -0
- package/dist/src/divider/divider.d.ts +27 -0
- package/dist/src/divider/index.d.ts +1 -0
- package/dist/src/elevation/elevation.css.d.ts +1 -0
- package/dist/src/elevation/elevation.d.ts +27 -0
- package/dist/src/elevation/index.d.ts +1 -0
- package/dist/src/focus-ring/FocusAttachableController.d.ts +9 -0
- package/dist/src/focus-ring/focus-ring.d.ts +35 -0
- package/dist/src/focus-ring/index.d.ts +1 -0
- package/dist/src/icon/icon.d.ts +23 -2
- package/dist/src/icon/p-icon.d.ts +0 -7
- package/dist/src/index.d.ts +6 -0
- package/dist/src/ripple/index.d.ts +1 -0
- package/dist/src/ripple/ripple.d.ts +9 -0
- package/dist/src/utils.d.ts +5 -0
- package/dist/state-BXOdKkbT.js +10 -0
- package/dist/state-BXOdKkbT.js.map +1 -0
- package/dist/state-BfUul2Gq.js +10 -0
- package/dist/state-BfUul2Gq.js.map +1 -0
- package/dist/state-CNX6DhqO.js +10 -0
- package/dist/state-CNX6DhqO.js.map +1 -0
- package/dist/state-Cl3mjeR1.js +10 -0
- package/dist/state-Cl3mjeR1.js.map +1 -0
- package/dist/state-CxzmLNIi.js +10 -0
- package/dist/state-CxzmLNIi.js.map +1 -0
- package/dist/state-WDFgnqnd.js +36 -0
- package/dist/state-WDFgnqnd.js.map +1 -0
- package/dist/style-inject.es--nCJ9F_D.js +55 -0
- package/dist/style-inject.es--nCJ9F_D.js.map +1 -0
- package/dist/style-inject.es-tgCJW-Cu.js +29 -0
- package/dist/style-inject.es-tgCJW-Cu.js.map +1 -0
- package/dist/styleMixins.css-0Uq-6ouM.js +14 -0
- package/dist/styleMixins.css-0Uq-6ouM.js.map +1 -0
- package/dist/styleMixins.css-B8H9wDNA.js +17 -0
- package/dist/styleMixins.css-B8H9wDNA.js.map +1 -0
- package/dist/styleMixins.css-CivfMYtB.js +17 -0
- package/dist/styleMixins.css-CivfMYtB.js.map +1 -0
- package/dist/styleMixins.css-DrUsqddl.js +17 -0
- package/dist/styleMixins.css-DrUsqddl.js.map +1 -0
- package/dist/styleMixins.css-fokZCyF-.js +17 -0
- package/dist/styleMixins.css-fokZCyF-.js.map +1 -0
- package/dist/styleMixins.css.d.ts +10 -0
- package/dist/styleMixins.css.d.ts.map +1 -0
- package/dist/text/text.css.d.ts +3 -0
- package/dist/text/text.css.d.ts.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/typedoc.json +340489 -0
- package/dist/utils-BVap5huR.js +157 -0
- package/dist/utils-BVap5huR.js.map +1 -0
- package/dist/utils-CY3RyfcA.js +157 -0
- package/dist/utils-CY3RyfcA.js.map +1 -0
- package/dist/utils-CdOdn2dW.js +149 -0
- package/dist/utils-CdOdn2dW.js.map +1 -0
- package/dist/utils-DD_cg6Ms.js +157 -0
- package/dist/utils-DD_cg6Ms.js.map +1 -0
- package/dist/utils-_5no4mk7.js +128 -0
- package/dist/utils-_5no4mk7.js.map +1 -0
- package/dist/utils.d.ts +8 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +11 -9
- package/readme.md +5 -17
- package/rollup.config.js +79 -37
- package/scratch.mjs +0 -0
- package/scss/mixin.scss +50 -0
- package/src/LoaderUtils.ts +122 -122
- package/src/avatar/avatar.scss +38 -0
- package/src/avatar/avatar.ts +20 -1
- package/src/avatar/p-avatar.ts +0 -7
- package/src/badge/badge.scss +31 -0
- package/src/badge/badge.ts +31 -9
- package/src/badge/demo/index.html +9 -1
- package/src/badge/p-badge.ts +0 -5
- package/src/button/_button-sizes.scss +59 -0
- package/src/button/button.scss +430 -0
- package/src/button/button.ts +304 -0
- package/src/button/demo/index.html +42 -0
- package/src/button/index.ts +1 -0
- package/src/clock/ClockController.ts +32 -0
- package/src/clock/clock.scss +9 -0
- package/src/clock/clock.ts +39 -0
- package/{demo/int.html → src/clock/demo/index.html} +7 -10
- package/src/clock/index.ts +1 -0
- package/src/code-highlighter/code-highlighter.scss +0 -0
- package/src/code-highlighter/code-highlighter.ts +58 -0
- package/src/code-highlighter/demo/index.html +58 -0
- package/src/code-highlighter/index.ts +1 -0
- package/src/code-highlighter/local.ts +11 -0
- package/src/divider/demo/index.html +58 -0
- package/src/divider/divider.scss +56 -0
- package/src/divider/divider.ts +59 -0
- package/src/divider/index.ts +1 -0
- package/src/elevation/demo/index.html +58 -0
- package/src/elevation/elevation.scss +61 -0
- package/src/elevation/elevation.ts +32 -0
- package/src/elevation/index.ts +1 -0
- package/src/focus-ring/FocusAttachableController.ts +36 -0
- package/src/focus-ring/demo/index.html +58 -0
- package/src/focus-ring/focus-ring.scss +22 -0
- package/src/focus-ring/focus-ring.ts +83 -0
- package/src/focus-ring/index.ts +1 -0
- package/src/icon/icon.scss +19 -0
- package/src/icon/icon.ts +131 -111
- package/src/icon/p-icon.ts +0 -7
- package/src/index.ts +9 -3
- package/src/link/demo/index.html +34 -0
- package/src/link/link.scss +24 -0
- package/src/peacock-loader.ts +69 -55
- package/src/ripple/index.ts +1 -0
- package/src/ripple/ripple.ts +134 -0
- package/src/styles.d.ts +3 -1
- package/src/text/text.scss +48 -0
- package/src/utils.ts +72 -1
- package/tsconfig.json +23 -22
- package/assets/tokens.css +0 -522
- package/copyDesignFiles.js +0 -11
- package/custom-elements.md +0 -192
- package/dist/avatar-GQwWRGRw.js +0 -418
- package/dist/avatar-GQwWRGRw.js.map +0 -1
- package/dist/avatar-jfcIDB8G.js +0 -424
- package/dist/avatar-jfcIDB8G.js.map +0 -1
- package/dist/component/avatar.js +0 -92
- package/dist/component/avatar.js.map +0 -1
- package/dist/component/icon.js.map +0 -1
- package/dist/directive-CKEA2P55.js.map +0 -1
- package/dist/utils-CSwoJIcG.js +0 -171
- package/dist/utils-CSwoJIcG.js.map +0 -1
- package/dist/web-types.json +0 -78
- package/readme-gen.mjs +0 -24
- package/src/avatar/avatar.css.ts +0 -41
- package/src/badge/badge.css.ts +0 -33
- 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
|