@limetech/kompendium 1.1.1
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/LICENSE +21 -0
- package/README.md +313 -0
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +13 -0
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js.map +1 -0
- package/dist/cjs/anchor-scroll-BmplAyR0.js +69 -0
- package/dist/cjs/anchor-scroll-BmplAyR0.js.map +1 -0
- package/dist/cjs/index-DYiJ6dQL.js +1866 -0
- package/dist/cjs/index-DYiJ6dQL.js.map +1 -0
- package/dist/cjs/index.cjs.js +3 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/kompendium-app.kompendium-darkmode-switch.kompendium-navigation.kompendium-search.stencil-route.stencil-route-switch.stencil-router.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-app_7.cjs.entry.js +2924 -0
- package/dist/cjs/kompendium-code.cjs.entry.js +2724 -0
- package/dist/cjs/kompendium-code.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-component.cjs.entry.js +207 -0
- package/dist/cjs/kompendium-component.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-debug.cjs.entry.js +47 -0
- package/dist/cjs/kompendium-debug.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-example-code.cjs.entry.js +20 -0
- package/dist/cjs/kompendium-example-code.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-example-markdown.cjs.entry.js +165 -0
- package/dist/cjs/kompendium-example-markdown.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-guide.cjs.entry.js +33 -0
- package/dist/cjs/kompendium-guide.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-markdown.cjs.entry.js +48923 -0
- package/dist/cjs/kompendium-markdown.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-playground.cjs.entry.js +89 -0
- package/dist/cjs/kompendium-playground.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-proplist.kompendium-taglist.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium-proplist_2.cjs.entry.js +49 -0
- package/dist/cjs/kompendium-type.cjs.entry.js +83 -0
- package/dist/cjs/kompendium-type.entry.cjs.js.map +1 -0
- package/dist/cjs/kompendium.cjs.js +25 -0
- package/dist/cjs/kompendium.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/markdown-types-B884tLd-.js +15 -0
- package/dist/cjs/markdown-types-B884tLd-.js.map +1 -0
- package/dist/cjs/methods-DoA78dOH.js +97 -0
- package/dist/cjs/methods-DoA78dOH.js.map +1 -0
- package/dist/cjs/types-SjA7Kcy_.js +8 -0
- package/dist/cjs/types-SjA7Kcy_.js.map +1 -0
- package/dist/collection/assets/favicon.svg +65 -0
- package/dist/collection/assets/icons/bookmark-fill.svg +1 -0
- package/dist/collection/assets/icons/danger.svg +1 -0
- package/dist/collection/assets/icons/debug.svg +1 -0
- package/dist/collection/assets/icons/important.svg +1 -0
- package/dist/collection/assets/icons/info.svg +1 -0
- package/dist/collection/assets/icons/logo.svg +1 -0
- package/dist/collection/assets/icons/note.svg +1 -0
- package/dist/collection/assets/icons/search.svg +1 -0
- package/dist/collection/assets/icons/tip.svg +1 -0
- package/dist/collection/assets/icons/warning.svg +1 -0
- package/dist/collection/assets/logotype.svg +64 -0
- package/dist/collection/collection-manifest.json +35 -0
- package/dist/collection/components/anchor-scroll.js +61 -0
- package/dist/collection/components/anchor-scroll.js.map +1 -0
- package/dist/collection/components/app/app.css +125 -0
- package/dist/collection/components/app/app.js +149 -0
- package/dist/collection/components/app/app.js.map +1 -0
- package/dist/collection/components/code/code.css +250 -0
- package/dist/collection/components/code/code.js +82 -0
- package/dist/collection/components/code/code.js.map +1 -0
- package/dist/collection/components/code/examples/code.js +14 -0
- package/dist/collection/components/code/examples/code.js.map +1 -0
- package/dist/collection/components/component/component.css +383 -0
- package/dist/collection/components/component/component.js +191 -0
- package/dist/collection/components/component/component.js.map +1 -0
- package/dist/collection/components/component/templates/events.js +32 -0
- package/dist/collection/components/component/templates/events.js.map +1 -0
- package/dist/collection/components/component/templates/examples.js +17 -0
- package/dist/collection/components/component/templates/examples.js.map +1 -0
- package/dist/collection/components/component/templates/methods.js +54 -0
- package/dist/collection/components/component/templates/methods.js.map +1 -0
- package/dist/collection/components/component/templates/props.js +36 -0
- package/dist/collection/components/component/templates/props.js.map +1 -0
- package/dist/collection/components/component/templates/slots.js +14 -0
- package/dist/collection/components/component/templates/slots.js.map +1 -0
- package/dist/collection/components/component/templates/style.js +14 -0
- package/dist/collection/components/component/templates/style.js.map +1 -0
- package/dist/collection/components/darkmode-switch/darkmode-switch.css +141 -0
- package/dist/collection/components/darkmode-switch/darkmode-switch.js +90 -0
- package/dist/collection/components/darkmode-switch/darkmode-switch.js.map +1 -0
- package/dist/collection/components/darkmode-switch/types.js +2 -0
- package/dist/collection/components/darkmode-switch/types.js.map +1 -0
- package/dist/collection/components/debug/debug.js +146 -0
- package/dist/collection/components/debug/debug.js.map +1 -0
- package/dist/collection/components/guide/guide.js +61 -0
- package/dist/collection/components/guide/guide.js.map +1 -0
- package/dist/collection/components/markdown/examples/markdown-example.js +150 -0
- package/dist/collection/components/markdown/examples/markdown-example.js.map +1 -0
- package/dist/collection/components/markdown/examples/markdown.js +14 -0
- package/dist/collection/components/markdown/examples/markdown.js.map +1 -0
- package/dist/collection/components/markdown/markdown-types.js +8 -0
- package/dist/collection/components/markdown/markdown-types.js.map +1 -0
- package/dist/collection/components/markdown/markdown.css +660 -0
- package/dist/collection/components/markdown/markdown.js +83 -0
- package/dist/collection/components/markdown/markdown.js.map +1 -0
- package/dist/collection/components/navigation/navigation.css +403 -0
- package/dist/collection/components/navigation/navigation.js +184 -0
- package/dist/collection/components/navigation/navigation.js.map +1 -0
- package/dist/collection/components/playground/playground.css +198 -0
- package/dist/collection/components/playground/playground.js +174 -0
- package/dist/collection/components/playground/playground.js.map +1 -0
- package/dist/collection/components/playground/playground.types.js +2 -0
- package/dist/collection/components/playground/playground.types.js.map +1 -0
- package/dist/collection/components/proplist/proplist.css +334 -0
- package/dist/collection/components/proplist/proplist.js +53 -0
- package/dist/collection/components/proplist/proplist.js.map +1 -0
- package/dist/collection/components/search/search.css +183 -0
- package/dist/collection/components/search/search.js +76 -0
- package/dist/collection/components/search/search.js.map +1 -0
- package/dist/collection/components/taglist/taglist.css +58 -0
- package/dist/collection/components/taglist/taglist.js +82 -0
- package/dist/collection/components/taglist/taglist.js.map +1 -0
- package/dist/collection/components/type/templates/alias.js +11 -0
- package/dist/collection/components/type/templates/alias.js.map +1 -0
- package/dist/collection/components/type/templates/enum.js +25 -0
- package/dist/collection/components/type/templates/enum.js.map +1 -0
- package/dist/collection/components/type/templates/interface.js +13 -0
- package/dist/collection/components/type/templates/interface.js.map +1 -0
- package/dist/collection/components/type/type.js +97 -0
- package/dist/collection/components/type/type.js.map +1 -0
- package/dist/collection/index.js +4 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/kompendium/config.js +7 -0
- package/dist/collection/kompendium/config.js.map +1 -0
- package/dist/collection/kompendium/filesystem.js +9 -0
- package/dist/collection/kompendium/filesystem.js.map +1 -0
- package/dist/collection/kompendium/generator.js +217 -0
- package/dist/collection/kompendium/generator.js.map +1 -0
- package/dist/collection/kompendium/guides.js +30 -0
- package/dist/collection/kompendium/guides.js.map +1 -0
- package/dist/collection/kompendium/index.js +2 -0
- package/dist/collection/kompendium/index.js.map +1 -0
- package/dist/collection/kompendium/markdown-admonitions.js +82 -0
- package/dist/collection/kompendium/markdown-admonitions.js.map +1 -0
- package/dist/collection/kompendium/markdown-code.js +40 -0
- package/dist/collection/kompendium/markdown-code.js.map +1 -0
- package/dist/collection/kompendium/markdown-frontmatter.js +12 -0
- package/dist/collection/kompendium/markdown-frontmatter.js.map +1 -0
- package/dist/collection/kompendium/markdown-nodes.js +10 -0
- package/dist/collection/kompendium/markdown-nodes.js.map +1 -0
- package/dist/collection/kompendium/markdown-typelinks.js +115 -0
- package/dist/collection/kompendium/markdown-typelinks.js.map +1 -0
- package/dist/collection/kompendium/markdown.js +35 -0
- package/dist/collection/kompendium/markdown.js.map +1 -0
- package/dist/collection/kompendium/menu.js +149 -0
- package/dist/collection/kompendium/menu.js.map +1 -0
- package/dist/collection/kompendium/schema.js +167 -0
- package/dist/collection/kompendium/schema.js.map +1 -0
- package/dist/collection/kompendium/search.js +144 -0
- package/dist/collection/kompendium/search.js.map +1 -0
- package/dist/collection/kompendium/source.js +81 -0
- package/dist/collection/kompendium/source.js.map +1 -0
- package/dist/collection/kompendium/test/fixtures/basic.js +48 -0
- package/dist/collection/kompendium/test/fixtures/basic.js.map +1 -0
- package/dist/collection/kompendium/test/fixtures/filtering/example-type.js +2 -0
- package/dist/collection/kompendium/test/fixtures/filtering/example-type.js.map +1 -0
- package/dist/collection/kompendium/test/fixtures/filtering/node-modules-type.js +2 -0
- package/dist/collection/kompendium/test/fixtures/filtering/node-modules-type.js.map +1 -0
- package/dist/collection/kompendium/test/fixtures/filtering/private-types.js +2 -0
- package/dist/collection/kompendium/test/fixtures/filtering/private-types.js.map +1 -0
- package/dist/collection/kompendium/test/fixtures/filtering/stencil-component-types.js +2 -0
- package/dist/collection/kompendium/test/fixtures/filtering/stencil-component-types.js.map +1 -0
- package/dist/collection/kompendium/test/fixtures/filtering/test-helper-type.js +2 -0
- package/dist/collection/kompendium/test/fixtures/filtering/test-helper-type.js.map +1 -0
- package/dist/collection/kompendium/test/fixtures/filtering/valid-types.js +29 -0
- package/dist/collection/kompendium/test/fixtures/filtering/valid-types.js.map +1 -0
- package/dist/collection/kompendium/typedoc.js +481 -0
- package/dist/collection/kompendium/typedoc.js.map +1 -0
- package/dist/collection/kompendium/watch.js +9 -0
- package/dist/collection/kompendium/watch.js.map +1 -0
- package/dist/collection/types.js +2 -0
- package/dist/collection/types.js.map +1 -0
- package/dist/config.ts +8 -0
- package/dist/esm/_commonjsHelpers-BFTU3MAI.js +10 -0
- package/dist/esm/_commonjsHelpers-BFTU3MAI.js.map +1 -0
- package/dist/esm/anchor-scroll-BAGXN2n6.js +65 -0
- package/dist/esm/anchor-scroll-BAGXN2n6.js.map +1 -0
- package/dist/esm/index-9UrzenzW.js +1857 -0
- package/dist/esm/index-9UrzenzW.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/kompendium-app.kompendium-darkmode-switch.kompendium-navigation.kompendium-search.stencil-route.stencil-route-switch.stencil-router.entry.js.map +1 -0
- package/dist/esm/kompendium-app_7.entry.js +2916 -0
- package/dist/esm/kompendium-code.entry.js +2722 -0
- package/dist/esm/kompendium-code.entry.js.map +1 -0
- package/dist/esm/kompendium-component.entry.js +205 -0
- package/dist/esm/kompendium-component.entry.js.map +1 -0
- package/dist/esm/kompendium-debug.entry.js +45 -0
- package/dist/esm/kompendium-debug.entry.js.map +1 -0
- package/dist/esm/kompendium-example-code.entry.js +18 -0
- package/dist/esm/kompendium-example-code.entry.js.map +1 -0
- package/dist/esm/kompendium-example-markdown.entry.js +163 -0
- package/dist/esm/kompendium-example-markdown.entry.js.map +1 -0
- package/dist/esm/kompendium-guide.entry.js +31 -0
- package/dist/esm/kompendium-guide.entry.js.map +1 -0
- package/dist/esm/kompendium-markdown.entry.js +48921 -0
- package/dist/esm/kompendium-markdown.entry.js.map +1 -0
- package/dist/esm/kompendium-playground.entry.js +87 -0
- package/dist/esm/kompendium-playground.entry.js.map +1 -0
- package/dist/esm/kompendium-proplist.kompendium-taglist.entry.js.map +1 -0
- package/dist/esm/kompendium-proplist_2.entry.js +46 -0
- package/dist/esm/kompendium-type.entry.js +81 -0
- package/dist/esm/kompendium-type.entry.js.map +1 -0
- package/dist/esm/kompendium.js +21 -0
- package/dist/esm/kompendium.js.map +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/markdown-types-Ajsawr_9.js +12 -0
- package/dist/esm/markdown-types-Ajsawr_9.js.map +1 -0
- package/dist/esm/methods-BAjd6f7g.js +94 -0
- package/dist/esm/methods-BAjd6f7g.js.map +1 -0
- package/dist/esm/types-BIPLEi1G.js +6 -0
- package/dist/esm/types-BIPLEi1G.js.map +1 -0
- package/dist/filesystem.ts +9 -0
- package/dist/generator.ts +302 -0
- package/dist/guides.ts +49 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/index.ts +1 -0
- package/dist/kompendium/index.esm.js +2 -0
- package/dist/kompendium/index.esm.js.map +1 -0
- package/dist/kompendium/kompendium-app.kompendium-darkmode-switch.kompendium-navigation.kompendium-search.stencil-route.stencil-route-switch.stencil-router.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-code.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-component.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-debug.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-example-code.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-example-markdown.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-guide.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-markdown.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-playground.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-proplist.kompendium-taglist.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium-type.entry.esm.js.map +1 -0
- package/dist/kompendium/kompendium.css +47 -0
- package/dist/kompendium/kompendium.esm.js +2 -0
- package/dist/kompendium/kompendium.esm.js.map +1 -0
- package/dist/kompendium/loader.esm.js.map +1 -0
- package/dist/kompendium/p-15e4b2c0.entry.js +2 -0
- package/dist/kompendium/p-15e4b2c0.entry.js.map +1 -0
- package/dist/kompendium/p-1cf0168f.entry.js +2 -0
- package/dist/kompendium/p-1cf0168f.entry.js.map +1 -0
- package/dist/kompendium/p-29c23c89.entry.js +2 -0
- package/dist/kompendium/p-29c23c89.entry.js.map +1 -0
- package/dist/kompendium/p-3981d11f.entry.js +2 -0
- package/dist/kompendium/p-3981d11f.entry.js.map +1 -0
- package/dist/kompendium/p-93f0548d.entry.js +2 -0
- package/dist/kompendium/p-93f0548d.entry.js.map +1 -0
- package/dist/kompendium/p-97b02575.entry.js +2 -0
- package/dist/kompendium/p-97b02575.entry.js.map +1 -0
- package/dist/kompendium/p-9UrzenzW.js +3 -0
- package/dist/kompendium/p-9UrzenzW.js.map +1 -0
- package/dist/kompendium/p-Ajsawr_9.js +2 -0
- package/dist/kompendium/p-Ajsawr_9.js.map +1 -0
- package/dist/kompendium/p-BAGXN2n6.js +2 -0
- package/dist/kompendium/p-BAGXN2n6.js.map +1 -0
- package/dist/kompendium/p-BFTU3MAI.js +2 -0
- package/dist/kompendium/p-BFTU3MAI.js.map +1 -0
- package/dist/kompendium/p-BIPLEi1G.js +2 -0
- package/dist/kompendium/p-BIPLEi1G.js.map +1 -0
- package/dist/kompendium/p-CnQEA7KO.js +2 -0
- package/dist/kompendium/p-CnQEA7KO.js.map +1 -0
- package/dist/kompendium/p-b0f95bd6.entry.js +2 -0
- package/dist/kompendium/p-b0f95bd6.entry.js.map +1 -0
- package/dist/kompendium/p-d9bcc473.entry.js +10 -0
- package/dist/kompendium/p-d9bcc473.entry.js.map +1 -0
- package/dist/kompendium/p-e36f3f1e.entry.js +2 -0
- package/dist/kompendium/p-e36f3f1e.entry.js.map +1 -0
- package/dist/kompendium/p-e52a2f57.entry.js +2 -0
- package/dist/kompendium/p-e52a2f57.entry.js.map +1 -0
- package/dist/kompendium/p-ec5861de.entry.js +2 -0
- package/dist/kompendium/p-ec5861de.entry.js.map +1 -0
- package/dist/markdown-admonitions.ts +112 -0
- package/dist/markdown-code.ts +51 -0
- package/dist/markdown-frontmatter.ts +19 -0
- package/dist/markdown-nodes.ts +23 -0
- package/dist/markdown-typelinks.ts +166 -0
- package/dist/markdown.ts +49 -0
- package/dist/menu.ts +189 -0
- package/dist/schema.ts +233 -0
- package/dist/search.ts +197 -0
- package/dist/source.ts +129 -0
- package/dist/typedoc.ts +665 -0
- package/dist/types/components/anchor-scroll.d.ts +36 -0
- package/dist/types/components/app/app.d.ts +22 -0
- package/dist/types/components/code/code.d.ts +26 -0
- package/dist/types/components/code/examples/code.d.ts +3 -0
- package/dist/types/components/component/component.d.ts +32 -0
- package/dist/types/components/component/templates/events.d.ts +5 -0
- package/dist/types/components/component/templates/examples.d.ts +9 -0
- package/dist/types/components/component/templates/methods.d.ts +5 -0
- package/dist/types/components/component/templates/props.d.ts +5 -0
- package/dist/types/components/component/templates/slots.d.ts +5 -0
- package/dist/types/components/component/templates/style.d.ts +5 -0
- package/dist/types/components/darkmode-switch/darkmode-switch.d.ts +18 -0
- package/dist/types/components/darkmode-switch/types.d.ts +2 -0
- package/dist/types/components/debug/debug.d.ts +24 -0
- package/dist/types/components/guide/guide.d.ts +14 -0
- package/dist/types/components/markdown/examples/markdown-example.d.ts +1 -0
- package/dist/types/components/markdown/examples/markdown.d.ts +7 -0
- package/dist/types/components/markdown/markdown-types.d.ts +2 -0
- package/dist/types/components/markdown/markdown.d.ts +20 -0
- package/dist/types/components/navigation/navigation.d.ts +35 -0
- package/dist/types/components/playground/playground.d.ts +32 -0
- package/dist/types/components/playground/playground.types.d.ts +1 -0
- package/dist/types/components/proplist/proplist.d.ts +12 -0
- package/dist/types/components/search/search.d.ts +15 -0
- package/dist/types/components/taglist/taglist.d.ts +16 -0
- package/dist/types/components/type/templates/alias.d.ts +4 -0
- package/dist/types/components/type/templates/enum.d.ts +4 -0
- package/dist/types/components/type/templates/interface.d.ts +4 -0
- package/dist/types/components/type/type.d.ts +15 -0
- package/dist/types/components.d.ts +517 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/kompendium/config.d.ts +2 -0
- package/dist/types/kompendium/filesystem.d.ts +1 -0
- package/dist/types/kompendium/generator.d.ts +4 -0
- package/dist/types/kompendium/guides.d.ts +9 -0
- package/dist/types/kompendium/index.d.ts +1 -0
- package/dist/types/kompendium/markdown-admonitions.d.ts +3 -0
- package/dist/types/kompendium/markdown-code.d.ts +2 -0
- package/dist/types/kompendium/markdown-frontmatter.d.ts +6 -0
- package/dist/types/kompendium/markdown-nodes.d.ts +12 -0
- package/dist/types/kompendium/markdown-typelinks.d.ts +21 -0
- package/dist/types/kompendium/markdown.d.ts +8 -0
- package/dist/types/kompendium/menu.d.ts +12 -0
- package/dist/types/kompendium/schema.d.ts +9 -0
- package/dist/types/kompendium/search.d.ts +3 -0
- package/dist/types/kompendium/source.d.ts +10 -0
- package/dist/types/kompendium/test/fixtures/basic.d.ts +65 -0
- package/dist/types/kompendium/test/fixtures/filtering/example-type.d.ts +8 -0
- package/dist/types/kompendium/test/fixtures/filtering/node-modules-type.d.ts +8 -0
- package/dist/types/kompendium/test/fixtures/filtering/private-types.d.ts +23 -0
- package/dist/types/kompendium/test/fixtures/filtering/stencil-component-types.d.ts +19 -0
- package/dist/types/kompendium/test/fixtures/filtering/test-helper-type.d.ts +8 -0
- package/dist/types/kompendium/test/fixtures/filtering/valid-types.d.ts +42 -0
- package/dist/types/kompendium/typedoc.d.ts +2 -0
- package/dist/types/kompendium/watch.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1746 -0
- package/dist/types/types.d.ts +119 -0
- package/dist/watch.ts +14 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +116 -0
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
/* Box sizing rules */
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Remove default padding */
|
|
9
|
+
ul[class],
|
|
10
|
+
ol[class] {
|
|
11
|
+
padding: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Remove default margin */
|
|
15
|
+
body,
|
|
16
|
+
h1,
|
|
17
|
+
h2,
|
|
18
|
+
h3,
|
|
19
|
+
h4,
|
|
20
|
+
p,
|
|
21
|
+
ul[class],
|
|
22
|
+
ol[class],
|
|
23
|
+
li,
|
|
24
|
+
figure,
|
|
25
|
+
figcaption,
|
|
26
|
+
blockquote,
|
|
27
|
+
dl,
|
|
28
|
+
dd {
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Remove list styles on ul, ol elements with a class attribute */
|
|
33
|
+
ul[class],
|
|
34
|
+
ol[class] {
|
|
35
|
+
list-style: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* A elements that don't have a class get default styles */
|
|
39
|
+
a:not([class]) {
|
|
40
|
+
text-decoration-skip-ink: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Make images easier to work with */
|
|
44
|
+
img {
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Natural flow and rhythm in articles by default */
|
|
49
|
+
/* Inherit fonts for inputs and buttons */
|
|
50
|
+
input,
|
|
51
|
+
button,
|
|
52
|
+
textarea,
|
|
53
|
+
select {
|
|
54
|
+
font: inherit;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Remove all animations and transitions for people that prefer not to see them */
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
* {
|
|
60
|
+
animation-duration: 0.01ms !important;
|
|
61
|
+
animation-iteration-count: 1 !important;
|
|
62
|
+
transition-duration: 0.01ms !important;
|
|
63
|
+
scroll-behavior: auto !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
p,
|
|
67
|
+
a,
|
|
68
|
+
li {
|
|
69
|
+
font-size: 0.9375rem;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
h1,
|
|
73
|
+
h2,
|
|
74
|
+
h3,
|
|
75
|
+
h4,
|
|
76
|
+
h5,
|
|
77
|
+
h6 {
|
|
78
|
+
margin-bottom: 0.5rem;
|
|
79
|
+
font-weight: normal;
|
|
80
|
+
font-weight: 500;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
h1 {
|
|
84
|
+
font-size: 2rem;
|
|
85
|
+
line-height: 2.25rem;
|
|
86
|
+
margin-top: 1.5rem;
|
|
87
|
+
letter-spacing: -0.0625rem;
|
|
88
|
+
font-weight: 400;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
h2 {
|
|
92
|
+
font-size: 1.625rem;
|
|
93
|
+
line-height: 1.25rem;
|
|
94
|
+
margin-top: 1.25rem;
|
|
95
|
+
margin-bottom: 1rem;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
h3 {
|
|
99
|
+
font-size: 1.375rem;
|
|
100
|
+
line-height: 1.5rem;
|
|
101
|
+
margin-top: 1rem;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
h4 {
|
|
105
|
+
font-size: 1.25rem;
|
|
106
|
+
line-height: 1.25rem;
|
|
107
|
+
margin-top: 1rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
h5 {
|
|
111
|
+
font-size: 1.125rem;
|
|
112
|
+
line-height: 1.125rem;
|
|
113
|
+
margin-top: 0.75rem;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
h6 {
|
|
117
|
+
font-size: 1rem;
|
|
118
|
+
font-variant: all-small-caps;
|
|
119
|
+
letter-spacing: 0.0625rem;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
p,
|
|
123
|
+
blockquote {
|
|
124
|
+
margin-top: 0;
|
|
125
|
+
margin-bottom: 0.5rem;
|
|
126
|
+
}
|
|
127
|
+
p:only-child,
|
|
128
|
+
blockquote:only-child {
|
|
129
|
+
margin-bottom: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
a {
|
|
133
|
+
transition: color 0.2s ease;
|
|
134
|
+
color: rgb(var(--kompendium-color-blue-default));
|
|
135
|
+
text-decoration: none;
|
|
136
|
+
border-radius: 0.125rem;
|
|
137
|
+
}
|
|
138
|
+
a:hover {
|
|
139
|
+
color: rgb(var(--kompendium-color-blue-light));
|
|
140
|
+
}
|
|
141
|
+
a:focus {
|
|
142
|
+
outline: none;
|
|
143
|
+
}
|
|
144
|
+
a:focus-visible {
|
|
145
|
+
outline: none;
|
|
146
|
+
box-shadow: var(--kompendium-shadow-depth-8-focused);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
ul {
|
|
150
|
+
list-style: none;
|
|
151
|
+
}
|
|
152
|
+
ul li {
|
|
153
|
+
position: relative;
|
|
154
|
+
margin-left: 0.75rem;
|
|
155
|
+
}
|
|
156
|
+
ul li:before {
|
|
157
|
+
content: "";
|
|
158
|
+
position: absolute;
|
|
159
|
+
left: -0.5rem;
|
|
160
|
+
top: 0.625rem;
|
|
161
|
+
width: 0.25rem;
|
|
162
|
+
height: 0.25rem;
|
|
163
|
+
border-radius: 50%;
|
|
164
|
+
background-color: rgb(var(--kompendium-contrast-700));
|
|
165
|
+
display: block;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
ol {
|
|
169
|
+
list-style: decimal inside;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
ol,
|
|
173
|
+
ul {
|
|
174
|
+
padding-left: 0;
|
|
175
|
+
margin-top: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
ul ul,
|
|
179
|
+
ul ol,
|
|
180
|
+
ol ol,
|
|
181
|
+
ol ul {
|
|
182
|
+
margin: 0.9375rem 0 0.9375rem 1.875rem;
|
|
183
|
+
font-size: 90%;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
li {
|
|
187
|
+
margin-bottom: 0.625rem;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
th,
|
|
191
|
+
td {
|
|
192
|
+
padding: 0.75rem 1rem;
|
|
193
|
+
text-align: left;
|
|
194
|
+
border-bottom: 1px solid rgb(var(--kompendium-contrast-600));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
th:first-child,
|
|
198
|
+
td:first-child {
|
|
199
|
+
padding-left: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
th:last-child,
|
|
203
|
+
td:last-child {
|
|
204
|
+
padding-right: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
hr {
|
|
208
|
+
margin: 1.75rem 0 2rem 0;
|
|
209
|
+
border-width: 0;
|
|
210
|
+
border-top: 1px solid rgb(var(--kompendium-contrast-600));
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
kbd {
|
|
214
|
+
font-family: var(--kompendium-font-code);
|
|
215
|
+
font-size: 0.875rem;
|
|
216
|
+
font-weight: 600;
|
|
217
|
+
color: rgb(var(--kompendium-contrast-1000));
|
|
218
|
+
background-color: rgb(var(--kompendium-contrast-200));
|
|
219
|
+
white-space: pre;
|
|
220
|
+
word-spacing: normal;
|
|
221
|
+
word-break: normal;
|
|
222
|
+
word-wrap: normal;
|
|
223
|
+
line-height: normal;
|
|
224
|
+
padding: 0.125rem 0.5rem;
|
|
225
|
+
margin: 0 0.25rem;
|
|
226
|
+
box-shadow: var(--kompendium-button-shadow-normal), 0 0.03125rem 0.21875rem 0 rgba(var(--kompendium-contrast-100), 0.5) inset;
|
|
227
|
+
border-radius: 0.25rem;
|
|
228
|
+
border-style: solid;
|
|
229
|
+
border-color: rgba(var(--kompendium-contrast-600), 0.8);
|
|
230
|
+
border-width: 0 1px 0.125rem 1px;
|
|
231
|
+
}
|
|
232
|
+
@media (prefers-color-scheme: dark) {
|
|
233
|
+
kbd:not([data-theme=force-light]) {
|
|
234
|
+
background-color: rgb(var(--kompendium-contrast-200));
|
|
235
|
+
color: rgb(var(--kompendium-contrast-1100));
|
|
236
|
+
border-color: rgba(var(--kompendium-contrast-500), 0.8);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
kbd[data-theme=force-dark] {
|
|
240
|
+
background-color: rgb(var(--kompendium-contrast-200));
|
|
241
|
+
color: rgb(var(--kompendium-contrast-1100));
|
|
242
|
+
border-color: rgba(var(--kompendium-contrast-500), 0.8);
|
|
243
|
+
}
|
|
244
|
+
@media (prefers-color-scheme: dark) {
|
|
245
|
+
:host(:not([data-theme=force-light])) kbd {
|
|
246
|
+
background-color: rgb(var(--kompendium-contrast-200));
|
|
247
|
+
color: rgb(var(--kompendium-contrast-1100));
|
|
248
|
+
border-color: rgba(var(--kompendium-contrast-500), 0.8);
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
:host([data-theme=force-dark]) kbd {
|
|
252
|
+
background-color: rgb(var(--kompendium-contrast-200));
|
|
253
|
+
color: rgb(var(--kompendium-contrast-1100));
|
|
254
|
+
border-color: rgba(var(--kompendium-contrast-500), 0.8);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
:host {
|
|
258
|
+
display: block;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
pre,
|
|
262
|
+
code {
|
|
263
|
+
font-family: var(--kompendium-font-code);
|
|
264
|
+
border-radius: 0.25rem;
|
|
265
|
+
font-size: 0.6875rem;
|
|
266
|
+
}
|
|
267
|
+
pre a,
|
|
268
|
+
code a {
|
|
269
|
+
font-size: 0.6875rem;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
code {
|
|
273
|
+
background: rgba(var(--kompendium-contrast-1100), 0.05);
|
|
274
|
+
border: 1px solid rgba(var(--kompendium-contrast-1100), 0.1);
|
|
275
|
+
padding: 0.125rem 0.3125rem;
|
|
276
|
+
margin: 0 0.125rem;
|
|
277
|
+
white-space: pre-wrap;
|
|
278
|
+
color: rgb(var(--kompendium-contrast-1100));
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
pre > code {
|
|
282
|
+
display: block;
|
|
283
|
+
padding: 0.625rem 0.6375rem;
|
|
284
|
+
white-space: pre-wrap;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.value--false code {
|
|
288
|
+
color: rgb(var(--kompendium-color-code-magenta));
|
|
289
|
+
border-color: rgba(var(--kompendium-color-code-magenta), 0.2);
|
|
290
|
+
background-color: rgba(var(--kompendium-color-code-magenta), 0.1);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.value--true code {
|
|
294
|
+
color: rgb(var(--kompendium-color-code-green-dark));
|
|
295
|
+
border-color: rgba(var(--kompendium-color-code-green-dark), 0.2);
|
|
296
|
+
background-color: rgba(var(--kompendium-color-code-green-dark), 0.1);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
dl {
|
|
300
|
+
display: grid;
|
|
301
|
+
grid-template-columns: 1fr 2fr;
|
|
302
|
+
grid-template-rows: 1fr;
|
|
303
|
+
margin-bottom: 2rem;
|
|
304
|
+
border: 1px solid rgb(var(--kompendium-contrast-500));
|
|
305
|
+
border-radius: 0.375rem;
|
|
306
|
+
background-color: rgb(var(--kompendium-contrast-300));
|
|
307
|
+
}
|
|
308
|
+
dl dt,
|
|
309
|
+
dl dd {
|
|
310
|
+
padding: 0.375rem 0.5rem;
|
|
311
|
+
font-size: 0.875rem;
|
|
312
|
+
}
|
|
313
|
+
dl dt:nth-of-type(even),
|
|
314
|
+
dl dd:nth-of-type(even) {
|
|
315
|
+
background-color: rgb(var(--kompendium-contrast-400));
|
|
316
|
+
}
|
|
317
|
+
dl dt:first-child {
|
|
318
|
+
border-top-left-radius: 0.375rem;
|
|
319
|
+
}
|
|
320
|
+
dl dt:last-child {
|
|
321
|
+
border-bottom-left-radius: 0.375rem;
|
|
322
|
+
}
|
|
323
|
+
dl dd:first-child {
|
|
324
|
+
border-top-right-radius: 0.375rem;
|
|
325
|
+
}
|
|
326
|
+
dl dd:last-child {
|
|
327
|
+
border-bottom-right-radius: 0.375rem;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
dl,
|
|
331
|
+
dt,
|
|
332
|
+
dd {
|
|
333
|
+
transition: background-color 0.3s ease 0.05s, border-color 0.3s ease 0.05s;
|
|
334
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
export class Proplist {
|
|
3
|
+
render() {
|
|
4
|
+
return h("dl", { key: 'e0d431f2ef5b105af7436d0a9b46a3ad2886a96b' }, this.items.map(this.renderProperty));
|
|
5
|
+
}
|
|
6
|
+
renderProperty(property) {
|
|
7
|
+
const { key, value } = property;
|
|
8
|
+
return [
|
|
9
|
+
h("dt", null, key),
|
|
10
|
+
h("dd", { class: `value--${value}` }, h("kompendium-markdown", { text: `\`${value}\`` })),
|
|
11
|
+
];
|
|
12
|
+
}
|
|
13
|
+
static get is() { return "kompendium-proplist"; }
|
|
14
|
+
static get encapsulation() { return "shadow"; }
|
|
15
|
+
static get originalStyleUrls() {
|
|
16
|
+
return {
|
|
17
|
+
"$": ["proplist.scss"]
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
static get styleUrls() {
|
|
21
|
+
return {
|
|
22
|
+
"$": ["proplist.css"]
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
static get properties() {
|
|
26
|
+
return {
|
|
27
|
+
"items": {
|
|
28
|
+
"type": "unknown",
|
|
29
|
+
"mutable": false,
|
|
30
|
+
"complexType": {
|
|
31
|
+
"original": "ProplistItem[]",
|
|
32
|
+
"resolved": "ProplistItem[]",
|
|
33
|
+
"references": {
|
|
34
|
+
"ProplistItem": {
|
|
35
|
+
"location": "local",
|
|
36
|
+
"path": "/private/tmp/kompendium/src/components/proplist/proplist.tsx",
|
|
37
|
+
"id": "src/components/proplist/proplist.tsx::ProplistItem"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": false,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": "List of properties"
|
|
46
|
+
},
|
|
47
|
+
"getter": false,
|
|
48
|
+
"setter": false
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=proplist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"proplist.js","sourceRoot":"","sources":["../../../src/components/proplist/proplist.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAYnD,MAAM,OAAO,QAAQ;IAOjB,MAAM;QACF,OAAO,6DAAK,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CAAM,CAAC;IAC1D,CAAC;IAEO,cAAc,CAAC,QAAsB;QACzC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC;QAEhC,OAAO;YACH,cAAK,GAAG,CAAM;YACd,UAAI,KAAK,EAAE,UAAU,KAAK,EAAE;gBACxB,2BAAqB,IAAI,EAAE,KAAK,KAAK,IAAI,GAAI,CAC5C;SACR,CAAC;IACN,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\nexport interface ProplistItem {\n key: string;\n value: string;\n}\n\n@Component({\n tag: 'kompendium-proplist',\n shadow: true,\n styleUrl: 'proplist.scss',\n})\nexport class Proplist {\n /**\n * List of properties\n */\n @Prop()\n public items: ProplistItem[];\n\n render(): HTMLElement {\n return <dl>{this.items.map(this.renderProperty)}</dl>;\n }\n\n private renderProperty(property: ProplistItem) {\n const { key, value } = property;\n\n return [\n <dt>{key}</dt>,\n <dd class={`value--${value}`}>\n <kompendium-markdown text={`\\`${value}\\``} />\n </dd>,\n ];\n }\n}\n"]}
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
/* Box sizing rules */
|
|
2
|
+
*,
|
|
3
|
+
*::before,
|
|
4
|
+
*::after {
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/* Remove default padding */
|
|
9
|
+
ul[class],
|
|
10
|
+
ol[class] {
|
|
11
|
+
padding: 0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/* Remove default margin */
|
|
15
|
+
body,
|
|
16
|
+
h1,
|
|
17
|
+
h2,
|
|
18
|
+
h3,
|
|
19
|
+
h4,
|
|
20
|
+
p,
|
|
21
|
+
ul[class],
|
|
22
|
+
ol[class],
|
|
23
|
+
li,
|
|
24
|
+
figure,
|
|
25
|
+
figcaption,
|
|
26
|
+
blockquote,
|
|
27
|
+
dl,
|
|
28
|
+
dd {
|
|
29
|
+
margin: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Remove list styles on ul, ol elements with a class attribute */
|
|
33
|
+
ul[class],
|
|
34
|
+
ol[class] {
|
|
35
|
+
list-style: none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* A elements that don't have a class get default styles */
|
|
39
|
+
a:not([class]) {
|
|
40
|
+
text-decoration-skip-ink: auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Make images easier to work with */
|
|
44
|
+
img {
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Natural flow and rhythm in articles by default */
|
|
49
|
+
/* Inherit fonts for inputs and buttons */
|
|
50
|
+
input,
|
|
51
|
+
button,
|
|
52
|
+
textarea,
|
|
53
|
+
select {
|
|
54
|
+
font: inherit;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Remove all animations and transitions for people that prefer not to see them */
|
|
58
|
+
@media (prefers-reduced-motion: reduce) {
|
|
59
|
+
* {
|
|
60
|
+
animation-duration: 0.01ms !important;
|
|
61
|
+
animation-iteration-count: 1 !important;
|
|
62
|
+
transition-duration: 0.01ms !important;
|
|
63
|
+
scroll-behavior: auto !important;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
:host {
|
|
67
|
+
display: block;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
:host(:focus) .result.has-results,
|
|
71
|
+
:host(:focus-within) .result.has-results {
|
|
72
|
+
display: block;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@keyframes display-search-results {
|
|
76
|
+
0% {
|
|
77
|
+
opacity: 0;
|
|
78
|
+
transform: translate3d(0, -1.25rem, -1rem) rotateX(10deg);
|
|
79
|
+
}
|
|
80
|
+
50% {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
100% {
|
|
84
|
+
transform: translate3d(0, 0, 0) rotateX(0);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
.search-box {
|
|
88
|
+
z-index: 1;
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
position: relative;
|
|
92
|
+
perspective: 60rem;
|
|
93
|
+
}
|
|
94
|
+
.search-box .result.has-results {
|
|
95
|
+
animation: display-search-results 0.28s ease-out forwards;
|
|
96
|
+
position: absolute;
|
|
97
|
+
background: rgb(var(--kompendium-contrast-200));
|
|
98
|
+
padding: 0.5rem;
|
|
99
|
+
margin-top: 2rem;
|
|
100
|
+
width: 100%;
|
|
101
|
+
border-radius: 5px;
|
|
102
|
+
box-shadow: var(--kompendium-shadow-depth-16);
|
|
103
|
+
display: none;
|
|
104
|
+
max-height: calc(100vh - 6rem);
|
|
105
|
+
overflow-y: auto;
|
|
106
|
+
}
|
|
107
|
+
.search-box .result.has-results li a {
|
|
108
|
+
overflow: hidden;
|
|
109
|
+
white-space: nowrap;
|
|
110
|
+
text-overflow: ellipsis;
|
|
111
|
+
transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease-out;
|
|
112
|
+
}
|
|
113
|
+
.search-box .result.has-results li a:hover {
|
|
114
|
+
box-shadow: var(--kompendium-button-shadow-hovered);
|
|
115
|
+
}
|
|
116
|
+
.search-box .result.has-results li a:active {
|
|
117
|
+
box-shadow: var(--kompendium-button-shadow-pressed);
|
|
118
|
+
transform: translate3d(0, 0.08rem, 0);
|
|
119
|
+
}
|
|
120
|
+
.search-box .result.has-results li a:focus {
|
|
121
|
+
outline: none;
|
|
122
|
+
}
|
|
123
|
+
.search-box .result.has-results li a:focus-visible {
|
|
124
|
+
outline: none;
|
|
125
|
+
box-shadow: var(--kompendium-shadow-depth-8-focused);
|
|
126
|
+
}
|
|
127
|
+
.search-box .result.has-results li a {
|
|
128
|
+
display: block;
|
|
129
|
+
width: 100%;
|
|
130
|
+
padding: 0.5rem 0.75rem;
|
|
131
|
+
border-radius: 0.25rem;
|
|
132
|
+
}
|
|
133
|
+
.search-box .result.has-results li:hover a {
|
|
134
|
+
background: rgb(var(--kompendium-contrast-100));
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
input {
|
|
138
|
+
transition: background-color 0.2s ease;
|
|
139
|
+
border: 0;
|
|
140
|
+
border-radius: 0.25rem;
|
|
141
|
+
padding: 0 0.25rem 0 2.25rem;
|
|
142
|
+
color: rgb(var(--kompendium-contrast-1200));
|
|
143
|
+
height: 2rem;
|
|
144
|
+
line-height: 2rem;
|
|
145
|
+
-webkit-appearance: textfield;
|
|
146
|
+
background-color: rgb(var(--kompendium-contrast-300));
|
|
147
|
+
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5" clip-rule="evenodd" viewBox="0 0 400 400"><defs/><path fill="none" d="M0 0h400v400H0z"/><path d="M275.621 258.31l-16.962 16.979 50.965 50.964.008.009c4.637 4.637 12.268 4.637 16.905 0l.032-.033c4.687-4.687 4.642-12.33.025-16.946l-50.964-50.965-.009-.008z" fill="rgb(48,48,66)"/><circle cx="200" cy="200" r="99.5" fill="rgb(33,150,243)" fill-opacity=".3" stroke="rgb(48,48,66)" stroke-width="13.27" transform="translate(19.096 19.096) scale(.90452)"/><ellipse cx="163.443" cy="186.777" rx="32.324" ry="22.133" fill="rgb(255,255,255)" fill-opacity=".3" transform="rotate(-45 128.405 173.5)"/></svg>');
|
|
148
|
+
background-repeat: no-repeat;
|
|
149
|
+
background-position: left center;
|
|
150
|
+
}
|
|
151
|
+
input::placeholder {
|
|
152
|
+
color: rgb(var(--kompendium-contrast-800));
|
|
153
|
+
}
|
|
154
|
+
input:active, input:focus, input:hover {
|
|
155
|
+
background-color: rgb(var(--kompendium-contrast-200));
|
|
156
|
+
}
|
|
157
|
+
input:focus {
|
|
158
|
+
outline: none;
|
|
159
|
+
}
|
|
160
|
+
input::-webkit-search-cancel-button {
|
|
161
|
+
-webkit-appearance: none;
|
|
162
|
+
transition: background-color 0.2s ease;
|
|
163
|
+
height: 1.25rem;
|
|
164
|
+
width: 1.25rem;
|
|
165
|
+
border-radius: 50%;
|
|
166
|
+
cursor: pointer;
|
|
167
|
+
background-color: rgb(var(--kompendium-contrast-800));
|
|
168
|
+
background-repeat: no-repeat;
|
|
169
|
+
background-position: center;
|
|
170
|
+
background-size: 0.75rem;
|
|
171
|
+
background-image: url("data:image/svg+xml; utf8, <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'><defs/><path fill='rgb(255,255,255)' d='M7.219 5.781L5.78 7.22 14.563 16 5.78 24.781 7.22 26.22 16 17.437l8.781 8.782 1.438-1.438L17.437 16l8.782-8.781L24.78 5.78 16 14.563z'/></svg>");
|
|
172
|
+
}
|
|
173
|
+
input::-webkit-search-cancel-button:hover {
|
|
174
|
+
background-color: rgb(var(--kompendium-contrast-1000));
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
a {
|
|
178
|
+
text-decoration: none;
|
|
179
|
+
color: unset;
|
|
180
|
+
}
|
|
181
|
+
a:hover, a.active {
|
|
182
|
+
color: rgb(var(--kompendium-color-blue-default));
|
|
183
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import debounce from "lodash/debounce";
|
|
3
|
+
export class Search {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.documents = [];
|
|
6
|
+
this.renderDocument = (document) => {
|
|
7
|
+
return (h("li", null, h("a", { href: '#' + document.path, onClick: this.handleLinkClick }, h("span", { class: "link-text" }, document.title))));
|
|
8
|
+
};
|
|
9
|
+
this.handleChangeInput = (event) => {
|
|
10
|
+
const query = event.target.value;
|
|
11
|
+
this.search(query);
|
|
12
|
+
};
|
|
13
|
+
this.handleLinkClick = () => {
|
|
14
|
+
var _a;
|
|
15
|
+
(_a = this.host.shadowRoot.activeElement) === null || _a === void 0 ? void 0 : _a.blur();
|
|
16
|
+
};
|
|
17
|
+
this.search = debounce(this.search, 300);
|
|
18
|
+
}
|
|
19
|
+
componentDidLoad() {
|
|
20
|
+
this.host.shadowRoot.querySelector('input').focus();
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
const classList = {
|
|
24
|
+
result: true,
|
|
25
|
+
'has-results': this.documents.length > 0,
|
|
26
|
+
};
|
|
27
|
+
return (h("div", { key: '8085f45b0d1f5e7b50d20de0df3aa95068598fa2', class: "search-box" }, h("input", { key: 'cc001b093b727306c6ea4e8ac078a4f408a0a6c9', type: "search", autoFocus: true, placeholder: "Search", onInput: this.handleChangeInput }), h("ul", { key: '7b293d633cd2493c85db58d84f8308e98061ab42', class: classList }, this.documents.map(this.renderDocument))));
|
|
28
|
+
}
|
|
29
|
+
search(query) {
|
|
30
|
+
const index = this.index;
|
|
31
|
+
const result = index.search(query);
|
|
32
|
+
this.documents = result.map((doc) => doc.item).slice(0, 10);
|
|
33
|
+
}
|
|
34
|
+
static get is() { return "kompendium-search"; }
|
|
35
|
+
static get encapsulation() { return "shadow"; }
|
|
36
|
+
static get originalStyleUrls() {
|
|
37
|
+
return {
|
|
38
|
+
"$": ["search.scss"]
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
static get styleUrls() {
|
|
42
|
+
return {
|
|
43
|
+
"$": ["search.css"]
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
static get properties() {
|
|
47
|
+
return {
|
|
48
|
+
"index": {
|
|
49
|
+
"type": "any",
|
|
50
|
+
"mutable": false,
|
|
51
|
+
"complexType": {
|
|
52
|
+
"original": "any",
|
|
53
|
+
"resolved": "any",
|
|
54
|
+
"references": {}
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"optional": false,
|
|
58
|
+
"docs": {
|
|
59
|
+
"tags": [],
|
|
60
|
+
"text": "Index containing searchable documents"
|
|
61
|
+
},
|
|
62
|
+
"getter": false,
|
|
63
|
+
"setter": false,
|
|
64
|
+
"reflect": false,
|
|
65
|
+
"attribute": "index"
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static get states() {
|
|
70
|
+
return {
|
|
71
|
+
"documents": {}
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
static get elementRef() { return "host"; }
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.js","sourceRoot":"","sources":["../../../src/components/search/search.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGnE,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAOvC,MAAM,OAAO,MAAM;IAaf;QALQ,cAAS,GAAyB,EAAE,CAAC;QAkCrC,mBAAc,GAAG,CAAC,QAA4B,EAAE,EAAE;YACtD,OAAO,CACH;gBACI,SAAG,IAAI,EAAE,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,eAAe;oBACvD,YAAM,KAAK,EAAC,WAAW,IAAE,QAAQ,CAAC,KAAK,CAAQ,CAC/C,CACH,CACR,CAAC;QACN,CAAC,CAAC;QAEM,sBAAiB,GAAG,CAAC,KAAiB,EAAE,EAAE;YAC9C,MAAM,KAAK,GAAI,KAAK,CAAC,MAA2B,CAAC,KAAK,CAAC;YACvD,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC,CAAC;QASM,oBAAe,GAAG,GAAG,EAAE;;YAC3B,MAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAA6B,0CAAE,IAAI,EAAE,CAAC;QAChE,CAAC,CAAC;QApDE,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC5C;IAED,gBAAgB;QACZ,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAC;IACxD,CAAC;IAED,MAAM;QACF,MAAM,SAAS,GAAG;YACd,MAAM,EAAE,IAAI;YACZ,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC;SAC3C,CAAC;QAEF,OAAO,CACH,4DAAK,KAAK,EAAC,YAAY;YACnB,8DACI,IAAI,EAAC,QAAQ,EACb,SAAS,QACT,WAAW,EAAC,QAAQ,EACpB,OAAO,EAAE,IAAI,CAAC,iBAAiB,GACjC;YACF,2DAAI,KAAK,EAAE,SAAS,IACf,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,cAAc,CAAC,CACvC,CACH,CACT,CAAC;IACN,CAAC;IAiBO,MAAM,CAAC,KAAa;QACxB,MAAM,KAAK,GAA6B,IAAI,CAAC,KAAK,CAAC;QACnD,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAEnC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAChE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKJ","sourcesContent":["import { Component, h, Element, Prop, State } from '@stencil/core';\nimport Fuse from 'fuse.js';\nimport { KompendiumDocument } from '../../types';\nimport debounce from 'lodash/debounce';\n\n@Component({\n tag: 'kompendium-search',\n styleUrl: 'search.scss',\n shadow: true,\n})\nexport class Search {\n /**\n * Index containing searchable documents\n */\n @Prop()\n public index: any;\n\n @State()\n private documents: KompendiumDocument[] = [];\n\n @Element()\n private host: HTMLKompendiumSearchElement;\n\n constructor() {\n this.search = debounce(this.search, 300);\n }\n\n componentDidLoad(): void {\n this.host.shadowRoot.querySelector('input').focus();\n }\n\n render(): HTMLElement {\n const classList = {\n result: true,\n 'has-results': this.documents.length > 0,\n };\n\n return (\n <div class=\"search-box\">\n <input\n type=\"search\"\n autoFocus\n placeholder=\"Search\"\n onInput={this.handleChangeInput}\n />\n <ul class={classList}>\n {this.documents.map(this.renderDocument)}\n </ul>\n </div>\n );\n }\n\n private renderDocument = (document: KompendiumDocument) => {\n return (\n <li>\n <a href={'#' + document.path} onClick={this.handleLinkClick}>\n <span class=\"link-text\">{document.title}</span>\n </a>\n </li>\n );\n };\n\n private handleChangeInput = (event: InputEvent) => {\n const query = (event.target as HTMLInputElement).value;\n this.search(query);\n };\n\n private search(query: string) {\n const index: Fuse<KompendiumDocument> = this.index;\n const result = index.search(query);\n\n this.documents = result.map((doc) => doc.item).slice(0, 10);\n }\n\n private handleLinkClick = () => {\n (this.host.shadowRoot.activeElement as HTMLElement)?.blur();\n };\n}\n"]}
|