@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.
- 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.d.ts +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/avatar/avatar.js +1 -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/badge/badge.d.ts +1 -1
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/badge/badge.js +1 -1
- 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/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.d.ts +4 -6
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.js +8 -25
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/clock/clock.js.map +1 -1
- 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.d.ts +1 -2
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.js +1 -8
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/divider/divider.js.map +1 -1
- 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 +3 -2
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/icon/icon.js +4 -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/index.d.ts +4 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/index.js +4 -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 +24 -18
- 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 +4 -0
- package/.rollup.cache/E/git/redvars/peacock/components/dist/src/utils.js +22 -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 +3 -4
- package/demo/index.html +45 -41
- 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 +42 -40
- package/dist/avatar.js.map +1 -1
- 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 +37 -36
- package/dist/badge.js.map +1 -1
- 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-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 +42 -35
- package/dist/clock.js.map +1 -1
- 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 +589 -34
- 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 +55 -61
- package/dist/divider.js.map +1 -1
- 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/icon.js +26 -26
- package/dist/icon.js.map +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -5
- 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 +465 -116
- 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/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 +1 -1
- package/dist/src/badge/badge.d.ts +1 -1
- 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.d.ts +4 -6
- 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.d.ts +1 -2
- 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 +3 -2
- package/dist/src/index.d.ts +4 -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 +4 -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-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-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.d.ts +8 -0
- package/dist/utils.d.ts.map +1 -0
- package/package.json +4 -2
- package/readme.md +1 -1
- package/rollup.config.js +9 -1
- package/scss/mixin.scss +50 -0
- package/src/LoaderUtils.ts +122 -122
- package/src/avatar/avatar.scss +38 -0
- package/src/avatar/avatar.ts +1 -1
- package/src/badge/badge.scss +31 -0
- package/src/badge/badge.ts +1 -1
- 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 -57
- 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/divider.scss +56 -0
- package/src/divider/divider.ts +1 -7
- 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 -131
- package/src/index.ts +9 -5
- package/src/link/demo/index.html +34 -0
- package/src/link/link.scss +24 -0
- package/src/peacock-loader.ts +69 -64
- 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 +29 -1
- package/tsconfig.json +23 -22
- package/demo/int.html +0 -31
- package/src/avatar/avatar.css.ts +0 -41
- package/src/badge/badge.css.ts +0 -34
- package/src/clock/clock.css.ts +0 -12
- package/src/divider/divider.css.ts +0 -58
- package/src/icon/icon.css.ts +0 -22
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { html, LitElement } from 'lit';
|
|
3
|
-
import { property
|
|
4
|
-
import
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
4
|
+
import styles from './clock.scss';
|
|
5
|
+
import { ClockController } from './ClockController.js';
|
|
5
6
|
/**
|
|
6
7
|
* @label Clock
|
|
7
8
|
* @tag p-clock
|
|
@@ -21,38 +22,20 @@ import { styles } from './clock.css.js';
|
|
|
21
22
|
export class Clock extends LitElement {
|
|
22
23
|
constructor() {
|
|
23
24
|
super(...arguments);
|
|
24
|
-
|
|
25
|
-
// as we need to trigger a rerender when its
|
|
26
|
-
// value changes to show the latest time
|
|
27
|
-
this.currentTime = '';
|
|
25
|
+
this.clockController = new ClockController(this, 100);
|
|
28
26
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
this.__updateCurrentTime();
|
|
32
|
-
this._timerId = setInterval(() => {
|
|
33
|
-
this.__updateCurrentTime();
|
|
34
|
-
}, 1000);
|
|
35
|
-
}
|
|
36
|
-
disconnectedCallback() {
|
|
37
|
-
if (this._timerId) {
|
|
38
|
-
clearInterval(this._timerId);
|
|
39
|
-
}
|
|
40
|
-
super.disconnectedCallback();
|
|
41
|
-
}
|
|
42
|
-
__updateCurrentTime() {
|
|
43
|
-
this.currentTime = new Date().toLocaleTimeString('en-US', {
|
|
27
|
+
__formatDate(date) {
|
|
28
|
+
return date.toLocaleTimeString('en-US', {
|
|
44
29
|
timeZone: this.timezone,
|
|
45
30
|
});
|
|
46
31
|
}
|
|
47
32
|
render() {
|
|
48
|
-
|
|
33
|
+
const currentDate = this.__formatDate(this.clockController.value);
|
|
34
|
+
return html `<div class="current-time">${currentDate}</div>`;
|
|
49
35
|
}
|
|
50
36
|
}
|
|
51
37
|
Clock.styles = [styles];
|
|
52
38
|
__decorate([
|
|
53
39
|
property()
|
|
54
40
|
], Clock.prototype, "timezone", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
state()
|
|
57
|
-
], Clock.prototype, "currentTime", void 0);
|
|
58
41
|
//# sourceMappingURL=clock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clock.js","sourceRoot":"","sources":["../../../src/clock/clock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"clock.js","sourceRoot":"","sources":["../../../src/clock/clock.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,KAAM,SAAQ,UAAU;IAArC;;QAGE,oBAAe,GAAG,IAAI,eAAe,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAcnD,CAAC;IAVC,YAAY,CAAC,IAAU;QACrB,OAAO,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE;YACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ;SACxB,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAClE,OAAO,IAAI,CAAA,6BAA6B,WAAW,QAAQ,CAAC;IAC9D,CAAC;;AAfM,YAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAIb;IAAX,QAAQ,EAAE;uCAAmB","sourcesContent":["import { html, LitElement } from 'lit';\r\nimport { property } from 'lit/decorators.js';\r\nimport styles from './clock.scss';\r\nimport { ClockController } from './ClockController.js';\r\n\r\n/**\r\n * @label Clock\r\n * @tag p-clock\r\n * @rawTag clock\r\n *\r\n * @summary Displays the current time in a given timezone.\r\n * @overview\r\n * - Clocks are used to display the current time in a specified timezone.\r\n * - They can be displayed in various formats, including 12-hour and 24-hour time.\r\n *\r\n * @example\r\n * ```html\r\n * <p-clock></p-clock>\r\n * ```\r\n * @tags display\r\n */\r\nexport class Clock extends LitElement {\r\n static styles = [styles];\r\n\r\n clockController = new ClockController(this, 100);\r\n\r\n @property() timezone?: string;\r\n\r\n __formatDate(date: Date) {\r\n return date.toLocaleTimeString('en-US', {\r\n timeZone: this.timezone,\r\n });\r\n }\r\n\r\n render() {\r\n const currentDate = this.__formatDate(this.clockController.value);\r\n return html`<div class=\"current-time\">${currentDate}</div>`;\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Code Highlighter
|
|
4
|
+
* @tag p-code-highlighter
|
|
5
|
+
* @rawTag code-highlighter
|
|
6
|
+
*
|
|
7
|
+
* @summary The code highlighter component is used to display code snippets with syntax highlighting.
|
|
8
|
+
* @overview
|
|
9
|
+
* <p>The <strong>Code Highlighter</strong> component allows you to display code snippets with syntax highlighting for various programming languages. It supports features like line numbers, code formatting, and a copy-to-clipboard button.</p>
|
|
10
|
+
*
|
|
11
|
+
* @cssprop --divider-color - Controls the color of the divider.
|
|
12
|
+
* @cssprop --divider-padding - Controls the padding of the divider.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <p-divider style="width: 12rem;">or</p-divider>
|
|
17
|
+
* ```
|
|
18
|
+
* @tags display
|
|
19
|
+
*/
|
|
20
|
+
export declare class CodeHighlighter extends LitElement {
|
|
21
|
+
static styles: import("lit").CSSResultGroup[];
|
|
22
|
+
vertical: boolean;
|
|
23
|
+
slotHasContent: boolean;
|
|
24
|
+
firstUpdated(): void;
|
|
25
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
26
|
+
}
|
package/.rollup.cache/E/git/redvars/peacock/components/dist/src/code-highlighter/code-highlighter.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html, LitElement } from 'lit';
|
|
3
|
+
import { property, state } from 'lit/decorators.js';
|
|
4
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
5
|
+
import styles from './code-highlighter.scss';
|
|
6
|
+
import { observerSlotChangesWithCallback } from '../utils.js';
|
|
7
|
+
/**
|
|
8
|
+
* @label Code Highlighter
|
|
9
|
+
* @tag p-code-highlighter
|
|
10
|
+
* @rawTag code-highlighter
|
|
11
|
+
*
|
|
12
|
+
* @summary The code highlighter component is used to display code snippets with syntax highlighting.
|
|
13
|
+
* @overview
|
|
14
|
+
* <p>The <strong>Code Highlighter</strong> component allows you to display code snippets with syntax highlighting for various programming languages. It supports features like line numbers, code formatting, and a copy-to-clipboard button.</p>
|
|
15
|
+
*
|
|
16
|
+
* @cssprop --divider-color - Controls the color of the divider.
|
|
17
|
+
* @cssprop --divider-padding - Controls the padding of the divider.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```html
|
|
21
|
+
* <p-divider style="width: 12rem;">or</p-divider>
|
|
22
|
+
* ```
|
|
23
|
+
* @tags display
|
|
24
|
+
*/
|
|
25
|
+
export class CodeHighlighter extends LitElement {
|
|
26
|
+
constructor() {
|
|
27
|
+
super(...arguments);
|
|
28
|
+
this.vertical = false;
|
|
29
|
+
this.slotHasContent = false;
|
|
30
|
+
}
|
|
31
|
+
firstUpdated() {
|
|
32
|
+
observerSlotChangesWithCallback(this.renderRoot.querySelector('slot'), hasContent => {
|
|
33
|
+
this.slotHasContent = hasContent;
|
|
34
|
+
this.requestUpdate();
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
return html `<div
|
|
39
|
+
class=${classMap({
|
|
40
|
+
divider: true,
|
|
41
|
+
vertical: this.vertical,
|
|
42
|
+
'slot-has-content': this.slotHasContent,
|
|
43
|
+
})}
|
|
44
|
+
>
|
|
45
|
+
<div class="line"></div>
|
|
46
|
+
<div class="slot-container">
|
|
47
|
+
<slot></slot>
|
|
48
|
+
</div>
|
|
49
|
+
<div class="line"></div>
|
|
50
|
+
</div>`;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
CodeHighlighter.styles = [styles];
|
|
54
|
+
__decorate([
|
|
55
|
+
property({ type: Boolean, reflect: true })
|
|
56
|
+
], CodeHighlighter.prototype, "vertical", void 0);
|
|
57
|
+
__decorate([
|
|
58
|
+
state()
|
|
59
|
+
], CodeHighlighter.prototype, "slotHasContent", void 0);
|
|
60
|
+
//# sourceMappingURL=code-highlighter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-highlighter.js","sourceRoot":"","sources":["../../../src/code-highlighter/code-highlighter.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,MAAM,MAAM,yBAAyB,CAAC;AAC7C,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,OAAO,eAAgB,SAAQ,UAAU;IAA/C;;QAG8C,aAAQ,GAAG,KAAK,CAAC;QAG7D,mBAAc,GAAG,KAAK,CAAC;IA2BzB,CAAC;IAzBC,YAAY;QACV,+BAA+B,CAC7B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,EACrC,UAAU,CAAC,EAAE;YACX,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC;YACjC,IAAI,CAAC,aAAa,EAAE,CAAC;QACvB,CAAC,CACF,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;cACD,QAAQ,CAAC;YACf,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,kBAAkB,EAAE,IAAI,CAAC,cAAc;SACxC,CAAC;;;;;;;WAOG,CAAC;IACV,CAAC;;AA/BM,sBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAEmB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAkB;AAG7D;IADC,KAAK,EAAE;uDACe","sourcesContent":["import { html, LitElement } from 'lit';\r\nimport { property, state } from 'lit/decorators.js';\r\nimport { classMap } from 'lit/directives/class-map.js';\r\nimport styles from './code-highlighter.scss';\r\nimport { observerSlotChangesWithCallback } from '../utils.js';\r\n\r\n/**\r\n * @label Code Highlighter\r\n * @tag p-code-highlighter\r\n * @rawTag code-highlighter\r\n *\r\n * @summary The code highlighter component is used to display code snippets with syntax highlighting.\r\n * @overview\r\n * <p>The <strong>Code Highlighter</strong> component allows you to display code snippets with syntax highlighting for various programming languages. It supports features like line numbers, code formatting, and a copy-to-clipboard button.</p>\r\n *\r\n * @cssprop --divider-color - Controls the color of the divider.\r\n * @cssprop --divider-padding - Controls the padding of the divider.\r\n *\r\n * @example\r\n * ```html\r\n * <p-divider style=\"width: 12rem;\">or</p-divider>\r\n * ```\r\n * @tags display\r\n */\r\nexport class CodeHighlighter extends LitElement {\r\n static styles = [styles];\r\n\r\n @property({ type: Boolean, reflect: true }) vertical = false;\r\n\r\n @state()\r\n slotHasContent = false;\r\n\r\n firstUpdated() {\r\n observerSlotChangesWithCallback(\r\n this.renderRoot.querySelector('slot'),\r\n hasContent => {\r\n this.slotHasContent = hasContent;\r\n this.requestUpdate();\r\n },\r\n );\r\n }\r\n\r\n render() {\r\n return html`<div\r\n class=${classMap({\r\n divider: true,\r\n vertical: this.vertical,\r\n 'slot-has-content': this.slotHasContent,\r\n })}\r\n >\r\n <div class=\"line\"></div>\r\n <div class=\"slot-container\">\r\n <slot></slot>\r\n </div>\r\n <div class=\"line\"></div>\r\n </div>`;\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CodeHighlighter } from './code-highlighter.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/code-highlighter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["export { CodeHighlighter } from './code-highlighter.js';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../../../src/code-highlighter/local.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,MAAM,GAKf;IACF,OAAO,EAAE,iBAAiB;IAC1B,eAAe,EAAE,mBAAmB;IACpC,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,aAAa;CAC1B,CAAC","sourcesContent":["export const locale: {\n loading: string;\n copyToClipboard: string;\n copied: string;\n copiedCode: string;\n} = {\n loading: 'Loading code...',\n copyToClipboard: 'Copy to clipboard',\n copied: 'Copied',\n copiedCode: 'Copied code',\n};\n"]}
|
|
@@ -19,8 +19,7 @@ import { LitElement } from 'lit';
|
|
|
19
19
|
* @tags display
|
|
20
20
|
*/
|
|
21
21
|
export declare class Divider extends LitElement {
|
|
22
|
-
|
|
23
|
-
static styles: import("lit").CSSResult[];
|
|
22
|
+
static styles: import("lit").CSSResultGroup[];
|
|
24
23
|
vertical: boolean;
|
|
25
24
|
slotHasContent: boolean;
|
|
26
25
|
firstUpdated(): void;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
var _Divider_instances, _Divider_handleSlotChange;
|
|
2
1
|
import { __decorate } from "tslib";
|
|
3
2
|
import { html, LitElement } from 'lit';
|
|
4
3
|
import { property, state } from 'lit/decorators.js';
|
|
5
4
|
import { classMap } from 'lit/directives/class-map.js';
|
|
6
|
-
import
|
|
5
|
+
import styles from './divider.scss';
|
|
7
6
|
import { observerSlotChangesWithCallback } from '../utils.js';
|
|
8
7
|
/**
|
|
9
8
|
* @label Divider
|
|
@@ -27,7 +26,6 @@ import { observerSlotChangesWithCallback } from '../utils.js';
|
|
|
27
26
|
export class Divider extends LitElement {
|
|
28
27
|
constructor() {
|
|
29
28
|
super(...arguments);
|
|
30
|
-
_Divider_instances.add(this);
|
|
31
29
|
this.vertical = false;
|
|
32
30
|
this.slotHasContent = false;
|
|
33
31
|
}
|
|
@@ -53,11 +51,6 @@ export class Divider extends LitElement {
|
|
|
53
51
|
</div>`;
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
|
-
_Divider_instances = new WeakSet(), _Divider_handleSlotChange = function _Divider_handleSlotChange(event) {
|
|
57
|
-
const slot = event.target;
|
|
58
|
-
// Check assignedElements length
|
|
59
|
-
this.slotHasContent = slot.assignedNodes({ flatten: true }).length > 0;
|
|
60
|
-
};
|
|
61
54
|
Divider.styles = [styles];
|
|
62
55
|
__decorate([
|
|
63
56
|
property({ type: Boolean, reflect: true })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../src/divider/divider.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"divider.js","sourceRoot":"","sources":["../../../src/divider/divider.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,MAAM,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAE9D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,OAAQ,SAAQ,UAAU;IAAvC;;QAG8C,aAAQ,GAAG,KAAK,CAAC;QAG7D,mBAAc,GAAG,KAAK,CAAC;IA2BzB,CAAC;IAzBC,YAAY;QACV,+BAA+B,CAC7B,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC,EACrC,UAAU,CAAC,EAAE;YACX,IAAI,CAAC,cAAc,GAAG,UAAU,CAAC;YACjC,IAAI,CAAC,aAAa,EAAE,CAAC;QACvB,CAAC,CACF,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;cACD,QAAQ,CAAC;YACf,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,kBAAkB,EAAE,IAAI,CAAC,cAAc;SACxC,CAAC;;;;;;;WAOG,CAAC;IACV,CAAC;;AA/BM,cAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAEmB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAkB;AAG7D;IADC,KAAK,EAAE;+CACe","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport styles from './divider.scss';\nimport { observerSlotChangesWithCallback } from '../utils.js';\n\n/**\n * @label Divider\n * @tag p-divider\n * @rawTag divider\n *\n * @summary The divider component is used to visually separate content.\n * @overview\n * - Dividers are used to separate content into clear groups, making it easier for users to scan and understand the information presented.\n * - They can be oriented either vertically or horizontally, depending on the layout requirements.\n *\n * @cssprop --divider-color - Controls the color of the divider.\n * @cssprop --divider-padding - Controls the padding of the divider.\n *\n * @example\n * ```html\n * <p-divider style=\"width: 12rem;\">or</p-divider>\n * ```\n * @tags display\n */\nexport class Divider extends LitElement {\n static styles = [styles];\n\n @property({ type: Boolean, reflect: true }) vertical = false;\n\n @state()\n slotHasContent = false;\n\n firstUpdated() {\n observerSlotChangesWithCallback(\n this.renderRoot.querySelector('slot'),\n hasContent => {\n this.slotHasContent = hasContent;\n this.requestUpdate();\n },\n );\n }\n\n render() {\n return html`<div\n class=${classMap({\n divider: true,\n vertical: this.vertical,\n 'slot-has-content': this.slotHasContent,\n })}\n >\n <div class=\"line\"></div>\n <div class=\"slot-container\">\n <slot></slot>\n </div>\n <div class=\"line\"></div>\n </div>`;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import("lit").CSSResult;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const styles = css `
|
|
3
|
+
/**
|
|
4
|
+
* Derived from Material Design Elevation
|
|
5
|
+
* https://github.com/material-components/material-web/blob/main/elevation/internal/_elevation.scss
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
:host,
|
|
9
|
+
.shadow,
|
|
10
|
+
.shadow::before,
|
|
11
|
+
.shadow::after {
|
|
12
|
+
border-radius: inherit;
|
|
13
|
+
inset: 0;
|
|
14
|
+
position: absolute;
|
|
15
|
+
transition-duration: inherit;
|
|
16
|
+
transition-property: inherit;
|
|
17
|
+
transition-timing-function: inherit;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:host {
|
|
21
|
+
display: flex;
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
transition-property: box-shadow, opacity;
|
|
24
|
+
--elevation-level: 0;
|
|
25
|
+
--elevation-color: #000;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.shadow::before,
|
|
29
|
+
.shadow::after {
|
|
30
|
+
content: '';
|
|
31
|
+
transition-property: box-shadow, opacity;
|
|
32
|
+
|
|
33
|
+
--_level: var(--elevation-level);
|
|
34
|
+
--_shadow-color: var(--elevation-color);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Key box shadow
|
|
38
|
+
.shadow::before {
|
|
39
|
+
opacity: 0.3;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Ambient box shadow
|
|
43
|
+
.shadow::after {
|
|
44
|
+
opacity: 0.15;
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
47
|
+
//# sourceMappingURL=elevation.css.js.map
|
package/.rollup.cache/E/git/redvars/peacock/components/dist/src/elevation/elevation.css.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elevation.css.js","sourceRoot":"","sources":["../../../src/elevation/elevation.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAa,MAAM,KAAK,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4CxB,CAAC","sourcesContent":["import { css, unsafeCSS } from 'lit';\n\nexport const styles = css`\n /**\n * Derived from Material Design Elevation\n * https://github.com/material-components/material-web/blob/main/elevation/internal/_elevation.scss\n */\n\n :host,\n .shadow,\n .shadow::before,\n .shadow::after {\n border-radius: inherit;\n inset: 0;\n position: absolute;\n transition-duration: inherit;\n transition-property: inherit;\n transition-timing-function: inherit;\n }\n\n :host {\n display: flex;\n pointer-events: none;\n transition-property: box-shadow, opacity;\n --elevation-level: 0;\n --elevation-color: #000;\n }\n\n .shadow::before,\n .shadow::after {\n content: '';\n transition-property: box-shadow, opacity;\n\n --_level: var(--elevation-level);\n --_shadow-color: var(--elevation-color);\n }\n\n // Key box shadow\n .shadow::before {\n opacity: 0.3;\n }\n\n // Ambient box shadow\n .shadow::after {\n opacity: 0.15;\n }\n`;\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Elevation
|
|
4
|
+
* @tag p-elevation
|
|
5
|
+
* @rawTag elevation
|
|
6
|
+
*
|
|
7
|
+
* @summary Adds elevation to an element.
|
|
8
|
+
* @overview
|
|
9
|
+
* - Elevation adds a shadow effect to an element to give it depth.
|
|
10
|
+
* - It can be used to create a sense of hierarchy or to draw attention to a particular element.
|
|
11
|
+
*
|
|
12
|
+
* @cssprop --elevation-level - Controls the elevation level of the shadow.
|
|
13
|
+
* @cssprop --elevation-color - Controls the color of the shadow.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <div style="position: relative; padding: var(--spacing-200); border-radius: var(--shape-corner-small);">
|
|
18
|
+
* <p-elevation style='--elevation-level: 2'></p-elevation>
|
|
19
|
+
* Level 2
|
|
20
|
+
* </div>
|
|
21
|
+
* ```
|
|
22
|
+
* @tags display
|
|
23
|
+
*/
|
|
24
|
+
export declare class Elevation extends LitElement {
|
|
25
|
+
static styles: import("lit").CSSResultGroup[];
|
|
26
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { html, LitElement } from 'lit';
|
|
2
|
+
import styles from './elevation.scss';
|
|
3
|
+
/**
|
|
4
|
+
* @label Elevation
|
|
5
|
+
* @tag p-elevation
|
|
6
|
+
* @rawTag elevation
|
|
7
|
+
*
|
|
8
|
+
* @summary Adds elevation to an element.
|
|
9
|
+
* @overview
|
|
10
|
+
* - Elevation adds a shadow effect to an element to give it depth.
|
|
11
|
+
* - It can be used to create a sense of hierarchy or to draw attention to a particular element.
|
|
12
|
+
*
|
|
13
|
+
* @cssprop --elevation-level - Controls the elevation level of the shadow.
|
|
14
|
+
* @cssprop --elevation-color - Controls the color of the shadow.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```html
|
|
18
|
+
* <div style="position: relative; padding: var(--spacing-200); border-radius: var(--shape-corner-small);">
|
|
19
|
+
* <p-elevation style='--elevation-level: 2'></p-elevation>
|
|
20
|
+
* Level 2
|
|
21
|
+
* </div>
|
|
22
|
+
* ```
|
|
23
|
+
* @tags display
|
|
24
|
+
*/
|
|
25
|
+
export class Elevation extends LitElement {
|
|
26
|
+
render() {
|
|
27
|
+
return html `<span class="shadow"></span>`;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
Elevation.styles = [styles];
|
|
31
|
+
//# sourceMappingURL=elevation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"elevation.js","sourceRoot":"","sources":["../../../src/elevation/elevation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AAEtC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IAGvC,MAAM;QACJ,OAAO,IAAI,CAAA,8BAA8B,CAAC;IAC5C,CAAC;;AAJM,gBAAM,GAAG,CAAC,MAAM,CAAC,CAAC","sourcesContent":["import { html, LitElement } from 'lit';\nimport styles from './elevation.scss';\n\n/**\n * @label Elevation\n * @tag p-elevation\n * @rawTag elevation\n *\n * @summary Adds elevation to an element.\n * @overview\n * - Elevation adds a shadow effect to an element to give it depth.\n * - It can be used to create a sense of hierarchy or to draw attention to a particular element.\n *\n * @cssprop --elevation-level - Controls the elevation level of the shadow.\n * @cssprop --elevation-color - Controls the color of the shadow.\n *\n * @example\n * ```html\n * <div style=\"position: relative; padding: var(--spacing-200); border-radius: var(--shape-corner-small);\">\n * <p-elevation style='--elevation-level: 2'></p-elevation>\n * Level 2\n * </div>\n * ```\n * @tags display\n */\nexport class Elevation extends LitElement {\n static styles = [styles];\n\n render() {\n return html`<span class=\"shadow\"></span>`;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Elevation } from './elevation.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/elevation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC","sourcesContent":["export { Elevation } from './elevation.js';\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactiveController, ReactiveControllerHost } from 'lit';
|
|
2
|
+
export declare class FocusAttachableController implements ReactiveController {
|
|
3
|
+
host: ReactiveControllerHost;
|
|
4
|
+
getControlElement: () => HTMLElement;
|
|
5
|
+
visible: boolean;
|
|
6
|
+
constructor(host: ReactiveControllerHost, getControlElement: () => HTMLElement);
|
|
7
|
+
hostConnected(): void;
|
|
8
|
+
hostDisconnected(): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export class FocusAttachableController {
|
|
2
|
+
constructor(host, getControlElement) {
|
|
3
|
+
this.visible = false;
|
|
4
|
+
(this.host = host).addController(this);
|
|
5
|
+
this.getControlElement = getControlElement;
|
|
6
|
+
}
|
|
7
|
+
hostConnected() {
|
|
8
|
+
// Start a timer when the host is connected
|
|
9
|
+
console.log('connected');
|
|
10
|
+
if (this.getControlElement) {
|
|
11
|
+
const element = this.getControlElement();
|
|
12
|
+
element.addEventListener('focus', () => {
|
|
13
|
+
console.log('focus');
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
this.host.handleEvent();
|
|
16
|
+
this.host.requestUpdate();
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
// eslint-disable-next-line class-methods-use-this
|
|
21
|
+
hostDisconnected() {
|
|
22
|
+
console.log('disconnected');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=FocusAttachableController.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FocusAttachableController.js","sourceRoot":"","sources":["../../../src/focus-ring/FocusAttachableController.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,yBAAyB;IAOpC,YACE,IAA4B,EAC5B,iBAAoC;QAJtC,YAAO,GAAG,KAAK,CAAC;QAMd,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAC;IAC7C,CAAC;IAED,aAAa;QACX,2CAA2C;QAC3C,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACzB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACzC,OAAO,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,EAAE;gBACrC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;gBACrB,aAAa;gBACb,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC;gBACxB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;YAC5B,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,kDAAkD;IAClD,gBAAgB;QACd,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAC9B,CAAC;CACF","sourcesContent":["import { ReactiveController, ReactiveControllerHost } from 'lit';\r\n\r\nexport class FocusAttachableController implements ReactiveController {\r\n host: ReactiveControllerHost;\r\n\r\n getControlElement: () => HTMLElement;\r\n\r\n visible = false;\r\n\r\n constructor(\r\n host: ReactiveControllerHost,\r\n getControlElement: () => HTMLElement,\r\n ) {\r\n (this.host = host).addController(this);\r\n this.getControlElement = getControlElement;\r\n }\r\n\r\n hostConnected() {\r\n // Start a timer when the host is connected\r\n console.log('connected');\r\n if (this.getControlElement) {\r\n const element = this.getControlElement();\r\n element.addEventListener('focus', () => {\r\n console.log('focus');\r\n // @ts-ignore\r\n this.host.handleEvent();\r\n this.host.requestUpdate();\r\n });\r\n }\r\n }\r\n\r\n // eslint-disable-next-line class-methods-use-this\r\n hostDisconnected() {\r\n console.log('disconnected');\r\n }\r\n}\r\n"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* @label Elevation
|
|
4
|
+
* @tag p-elevation
|
|
5
|
+
* @rawTag elevation
|
|
6
|
+
*
|
|
7
|
+
* @summary Adds elevation to an element.
|
|
8
|
+
* @overview
|
|
9
|
+
* - Elevation adds a shadow effect to an element to give it depth.
|
|
10
|
+
* - It can be used to create a sense of hierarchy or to draw attention to a particular element.
|
|
11
|
+
*
|
|
12
|
+
* @cssprop --elevation-level - Controls the elevation level of the shadow.
|
|
13
|
+
* @cssprop --elevation-color - Controls the color of the shadow.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <div style="position: relative; padding: var(--spacing-200); border-radius: var(--shape-corner-small);">
|
|
18
|
+
* <p-elevation style='--elevation-level: 2'></p-elevation>
|
|
19
|
+
* Level 2
|
|
20
|
+
* </div>
|
|
21
|
+
* ```
|
|
22
|
+
* @tags display
|
|
23
|
+
*/
|
|
24
|
+
export declare class FocusRing extends LitElement {
|
|
25
|
+
static styles: import("lit").CSSResultGroup[];
|
|
26
|
+
visible: boolean;
|
|
27
|
+
render(): symbol;
|
|
28
|
+
_control?: HTMLElement;
|
|
29
|
+
get control(): HTMLElement | null;
|
|
30
|
+
set control(control: HTMLElement | null);
|
|
31
|
+
connectedCallback(): void;
|
|
32
|
+
disconnectedCallback(): void;
|
|
33
|
+
attach(): void;
|
|
34
|
+
detach(): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { LitElement, nothing } from 'lit';
|
|
3
|
+
import { property } from 'lit/decorators.js';
|
|
4
|
+
import styles from './focus-ring.scss';
|
|
5
|
+
/**
|
|
6
|
+
* @label Elevation
|
|
7
|
+
* @tag p-elevation
|
|
8
|
+
* @rawTag elevation
|
|
9
|
+
*
|
|
10
|
+
* @summary Adds elevation to an element.
|
|
11
|
+
* @overview
|
|
12
|
+
* - Elevation adds a shadow effect to an element to give it depth.
|
|
13
|
+
* - It can be used to create a sense of hierarchy or to draw attention to a particular element.
|
|
14
|
+
*
|
|
15
|
+
* @cssprop --elevation-level - Controls the elevation level of the shadow.
|
|
16
|
+
* @cssprop --elevation-color - Controls the color of the shadow.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```html
|
|
20
|
+
* <div style="position: relative; padding: var(--spacing-200); border-radius: var(--shape-corner-small);">
|
|
21
|
+
* <p-elevation style='--elevation-level: 2'></p-elevation>
|
|
22
|
+
* Level 2
|
|
23
|
+
* </div>
|
|
24
|
+
* ```
|
|
25
|
+
* @tags display
|
|
26
|
+
*/
|
|
27
|
+
export class FocusRing extends LitElement {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.visible = false;
|
|
31
|
+
}
|
|
32
|
+
render() {
|
|
33
|
+
return nothing;
|
|
34
|
+
}
|
|
35
|
+
get control() {
|
|
36
|
+
return this._control || null;
|
|
37
|
+
}
|
|
38
|
+
set control(control) {
|
|
39
|
+
if (control) {
|
|
40
|
+
this._control = control;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.detach();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
connectedCallback() {
|
|
47
|
+
super.connectedCallback();
|
|
48
|
+
this.attach();
|
|
49
|
+
}
|
|
50
|
+
disconnectedCallback() {
|
|
51
|
+
this.detach();
|
|
52
|
+
super.disconnectedCallback();
|
|
53
|
+
}
|
|
54
|
+
attach() {
|
|
55
|
+
// @ts-ignore - buttonElement is not defined on the base class
|
|
56
|
+
this._control?.buttonElement?.addEventListener('focusin', () => {
|
|
57
|
+
this.visible =
|
|
58
|
+
// @ts-ignore - buttonElement is not defined on the base class
|
|
59
|
+
this._control?.buttonElement?.matches(':focus-visible') ?? false;
|
|
60
|
+
});
|
|
61
|
+
// @ts-ignore - buttonElement is not defined on the base class
|
|
62
|
+
this._control?.buttonElement?.addEventListener('focusout', () => {
|
|
63
|
+
this.visible = false;
|
|
64
|
+
});
|
|
65
|
+
// @ts-ignore - buttonElement is not defined on the base class
|
|
66
|
+
this._control?.buttonElement?.addEventListener('pointerdown', () => {
|
|
67
|
+
this.visible = false;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
detach() {
|
|
71
|
+
this._control?.removeEventListener('focusin', () => { });
|
|
72
|
+
this._control?.removeEventListener('focusout', () => { });
|
|
73
|
+
this._control?.removeEventListener('pointerdown', () => { });
|
|
74
|
+
this._control = undefined;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
FocusRing.styles = [styles];
|
|
78
|
+
__decorate([
|
|
79
|
+
property({ type: Boolean, reflect: true })
|
|
80
|
+
], FocusRing.prototype, "visible", void 0);
|
|
81
|
+
//# sourceMappingURL=focus-ring.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"focus-ring.js","sourceRoot":"","sources":["../../../src/focus-ring/focus-ring.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,OAAO,SAAU,SAAQ,UAAU;IAAzC;;QAG8C,YAAO,GAAY,KAAK,CAAC;IAqDvE,CAAC;IAnDC,MAAM;QACJ,OAAO,OAAO,CAAC;IACjB,CAAC;IAID,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC;IAC/B,CAAC;IAED,IAAI,OAAO,CAAC,OAA2B;QACrC,IAAI,OAAO,EAAE,CAAC;YACZ,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QAC1B,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,MAAM,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,oBAAoB;QAClB,IAAI,CAAC,MAAM,EAAE,CAAC;QACd,KAAK,CAAC,oBAAoB,EAAE,CAAC;IAC/B,CAAC;IAED,MAAM;QACJ,8DAA8D;QAC9D,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,gBAAgB,CAAC,SAAS,EAAE,GAAG,EAAE;YAC7D,IAAI,CAAC,OAAO;gBACV,8DAA8D;gBAC9D,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,OAAO,CAAC,gBAAgB,CAAC,IAAI,KAAK,CAAC;QACrE,CAAC,CAAC,CAAC;QACH,8DAA8D;QAC9D,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,gBAAgB,CAAC,UAAU,EAAE,GAAG,EAAE;YAC9D,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC,CAAC,CAAC;QACH,8DAA8D;QAC9D,IAAI,CAAC,QAAQ,EAAE,aAAa,EAAE,gBAAgB,CAAC,aAAa,EAAE,GAAG,EAAE;YACjE,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,MAAM;QACJ,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,SAAS,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACxD,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,UAAU,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QACzD,IAAI,CAAC,QAAQ,EAAE,mBAAmB,CAAC,aAAa,EAAE,GAAG,EAAE,GAAE,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC5B,CAAC;;AAtDM,gBAAM,GAAG,CAAC,MAAM,CAAC,AAAX,CAAY;AAEmB;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;0CAA0B","sourcesContent":["import { LitElement, nothing } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport styles from './focus-ring.scss';\n\n/**\n * @label Elevation\n * @tag p-elevation\n * @rawTag elevation\n *\n * @summary Adds elevation to an element.\n * @overview\n * - Elevation adds a shadow effect to an element to give it depth.\n * - It can be used to create a sense of hierarchy or to draw attention to a particular element.\n *\n * @cssprop --elevation-level - Controls the elevation level of the shadow.\n * @cssprop --elevation-color - Controls the color of the shadow.\n *\n * @example\n * ```html\n * <div style=\"position: relative; padding: var(--spacing-200); border-radius: var(--shape-corner-small);\">\n * <p-elevation style='--elevation-level: 2'></p-elevation>\n * Level 2\n * </div>\n * ```\n * @tags display\n */\nexport class FocusRing extends LitElement {\n static styles = [styles];\n\n @property({ type: Boolean, reflect: true }) visible: boolean = false;\n\n render() {\n return nothing;\n }\n\n _control?: HTMLElement;\n\n get control() {\n return this._control || null;\n }\n\n set control(control: HTMLElement | null) {\n if (control) {\n this._control = control;\n } else {\n this.detach();\n }\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.attach();\n }\n\n disconnectedCallback() {\n this.detach();\n super.disconnectedCallback();\n }\n\n attach() {\n // @ts-ignore - buttonElement is not defined on the base class\n this._control?.buttonElement?.addEventListener('focusin', () => {\n this.visible =\n // @ts-ignore - buttonElement is not defined on the base class\n this._control?.buttonElement?.matches(':focus-visible') ?? false;\n });\n // @ts-ignore - buttonElement is not defined on the base class\n this._control?.buttonElement?.addEventListener('focusout', () => {\n this.visible = false;\n });\n // @ts-ignore - buttonElement is not defined on the base class\n this._control?.buttonElement?.addEventListener('pointerdown', () => {\n this.visible = false;\n });\n }\n\n detach() {\n this._control?.removeEventListener('focusin', () => {});\n this._control?.removeEventListener('focusout', () => {});\n this._control?.removeEventListener('pointerdown', () => {});\n this._control = undefined;\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FocusRing } from './focus-ring.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/focus-ring/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC","sourcesContent":["export { FocusRing } from './focus-ring.js';\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
+
export type IconProvider = 'material-symbols' | 'material-icons';
|
|
2
3
|
/**
|
|
3
4
|
* @label Icon
|
|
4
5
|
* @tag p-icon
|
|
@@ -16,14 +17,14 @@ import { LitElement } from 'lit';
|
|
|
16
17
|
*
|
|
17
18
|
*/
|
|
18
19
|
export declare class Icon extends LitElement {
|
|
19
|
-
static styles: import("lit").
|
|
20
|
+
static styles: import("lit").CSSResultGroup[];
|
|
20
21
|
/**
|
|
21
22
|
* The identifier for the icon.
|
|
22
23
|
* This name corresponds to a specific SVG asset in the icon set.
|
|
23
24
|
*/
|
|
24
25
|
name?: string;
|
|
25
26
|
src?: string;
|
|
26
|
-
provider:
|
|
27
|
+
provider: IconProvider;
|
|
27
28
|
private svgContent;
|
|
28
29
|
private loading;
|
|
29
30
|
private error;
|
|
@@ -4,7 +4,7 @@ import { property, state } from 'lit/decorators.js';
|
|
|
4
4
|
import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
|
|
5
5
|
import { fetchIcon, fetchSVG } from './datasource.js';
|
|
6
6
|
import { sanitizeSvg } from '../utils.js';
|
|
7
|
-
import
|
|
7
|
+
import styles from './icon.scss';
|
|
8
8
|
/**
|
|
9
9
|
* @label Icon
|
|
10
10
|
* @tag p-icon
|
|
@@ -44,10 +44,10 @@ export class Icon extends LitElement {
|
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
46
|
// accessible wrapper; consumers can provide a fallback via <slot name="fallback">.
|
|
47
|
-
return html ` <div class="icon">
|
|
47
|
+
return html ` <div class="icon">
|
|
48
48
|
${this.svgContent
|
|
49
49
|
? unsafeSVG(this.svgContent)
|
|
50
|
-
: html `<slot name="fallback"></slot>`}
|
|
50
|
+
: html `<slot name="fallback"></slot>`}
|
|
51
51
|
</div>`;
|
|
52
52
|
}
|
|
53
53
|
// small debounce to coalesce rapid changes (50ms)
|
|
@@ -120,7 +120,7 @@ __decorate([
|
|
|
120
120
|
state()
|
|
121
121
|
], Icon.prototype, "svgContent", void 0);
|
|
122
122
|
__decorate([
|
|
123
|
-
state()
|
|
123
|
+
state() // @ts-ignore
|
|
124
124
|
], Icon.prototype, "loading", void 0);
|
|
125
125
|
__decorate([
|
|
126
126
|
state()
|