@sondor-technology/sondor-components 1.0.8 → 1.0.10
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/dist/components/accordion/accordion.constants.d.ts +5 -0
- package/dist/components/accordion/accordion.constants.d.ts.map +1 -0
- package/dist/components/accordion/accordion.constants.js +3 -0
- package/dist/components/accordion/accordion.constants.js.map +1 -0
- package/dist/components/accordion/accordion.d.ts +29 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +226 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/alert/alert.constants.d.ts +2 -0
- package/dist/components/alert/alert.constants.d.ts.map +1 -1
- package/dist/components/alert/alert.d.ts +50 -2
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +285 -16
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +20 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +100 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/back-to-top/back-to-top.d.ts +29 -0
- package/dist/components/back-to-top/back-to-top.d.ts.map +1 -0
- package/dist/components/back-to-top/back-to-top.js +149 -0
- package/dist/components/back-to-top/back-to-top.js.map +1 -0
- package/dist/components/bar-chart/bar-chart.d.ts +42 -0
- package/dist/components/bar-chart/bar-chart.d.ts.map +1 -0
- package/dist/components/bar-chart/bar-chart.js +298 -0
- package/dist/components/bar-chart/bar-chart.js.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.js +2 -2
- package/dist/components/button/button.d.ts +1 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +8 -8
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button-group/button-group.js +4 -4
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/calendar.js +21 -9
- package/dist/components/calendar/calendar.js.map +1 -1
- package/dist/components/chart/chart-base.d.ts +59 -0
- package/dist/components/chart/chart-base.d.ts.map +1 -0
- package/dist/components/chart/chart-base.js +261 -0
- package/dist/components/chart/chart-base.js.map +1 -0
- package/dist/components/chart/chart.utils.d.ts +27 -0
- package/dist/components/chart/chart.utils.d.ts.map +1 -0
- package/dist/components/chart/chart.utils.js +117 -0
- package/dist/components/chart/chart.utils.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +5 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -1
- package/dist/components/code-block/code-block.js +34 -24
- package/dist/components/code-block/code-block.js.map +1 -1
- package/dist/components/consent/consent.d.ts +63 -0
- package/dist/components/consent/consent.d.ts.map +1 -0
- package/dist/components/consent/consent.js +327 -0
- package/dist/components/consent/consent.js.map +1 -0
- package/dist/components/consent/consent.utils.d.ts +36 -0
- package/dist/components/consent/consent.utils.d.ts.map +1 -0
- package/dist/components/consent/consent.utils.js +82 -0
- package/dist/components/consent/consent.utils.js.map +1 -0
- package/dist/components/contact/contact.d.ts +22 -0
- package/dist/components/contact/contact.d.ts.map +1 -0
- package/dist/components/contact/contact.js +83 -0
- package/dist/components/contact/contact.js.map +1 -0
- package/dist/components/container/container.d.ts +20 -0
- package/dist/components/container/container.d.ts.map +1 -0
- package/dist/components/container/container.js +68 -0
- package/dist/components/container/container.js.map +1 -0
- package/dist/components/content-card/content-card.js +4 -4
- package/dist/components/context-menu/context-menu.d.ts +89 -0
- package/dist/components/context-menu/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu/context-menu.js +414 -0
- package/dist/components/context-menu/context-menu.js.map +1 -0
- package/dist/components/cron-builder/cron-builder.d.ts +5 -2
- package/dist/components/cron-builder/cron-builder.d.ts.map +1 -1
- package/dist/components/cron-builder/cron-builder.js +83 -15
- package/dist/components/cron-builder/cron-builder.js.map +1 -1
- package/dist/components/cta/cta.d.ts +20 -0
- package/dist/components/cta/cta.d.ts.map +1 -0
- package/dist/components/cta/cta.js +64 -0
- package/dist/components/cta/cta.js.map +1 -0
- package/dist/components/drawer/drawer.js +6 -6
- package/dist/components/faq/faq-item.d.ts +22 -0
- package/dist/components/faq/faq-item.d.ts.map +1 -0
- package/dist/components/faq/faq-item.js +117 -0
- package/dist/components/faq/faq-item.js.map +1 -0
- package/dist/components/faq/faq.d.ts +18 -0
- package/dist/components/faq/faq.d.ts.map +1 -0
- package/dist/components/faq/faq.js +38 -0
- package/dist/components/faq/faq.js.map +1 -0
- package/dist/components/feature-grid/feature-grid.d.ts +22 -0
- package/dist/components/feature-grid/feature-grid.d.ts.map +1 -0
- package/dist/components/feature-grid/feature-grid.js +55 -0
- package/dist/components/feature-grid/feature-grid.js.map +1 -0
- package/dist/components/feature-grid/feature.d.ts +18 -0
- package/dist/components/feature-grid/feature.d.ts.map +1 -0
- package/dist/components/feature-grid/feature.js +91 -0
- package/dist/components/feature-grid/feature.js.map +1 -0
- package/dist/components/field/field.js +2 -2
- package/dist/components/footer/footer.js +4 -4
- package/dist/components/form/form-reset.d.ts +7 -0
- package/dist/components/form/form-reset.d.ts.map +1 -0
- package/dist/components/form/form-reset.js +47 -0
- package/dist/components/form/form-reset.js.map +1 -0
- package/dist/components/form/form.d.ts +5 -0
- package/dist/components/form/form.d.ts.map +1 -1
- package/dist/components/form/form.js +17 -3
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/grid/grid.d.ts +5 -0
- package/dist/components/grid/grid.d.ts.map +1 -1
- package/dist/components/grid/grid.js +86 -4
- package/dist/components/grid/grid.js.map +1 -1
- package/dist/components/heat-map/heat-map.d.ts +39 -0
- package/dist/components/heat-map/heat-map.d.ts.map +1 -0
- package/dist/components/heat-map/heat-map.js +306 -0
- package/dist/components/heat-map/heat-map.js.map +1 -0
- package/dist/components/hero/hero.d.ts +26 -0
- package/dist/components/hero/hero.d.ts.map +1 -0
- package/dist/components/hero/hero.js +132 -0
- package/dist/components/hero/hero.js.map +1 -0
- package/dist/components/icon/icon-paths.d.ts +84 -0
- package/dist/components/icon/icon-paths.d.ts.map +1 -1
- package/dist/components/icon/icon-paths.js +89 -0
- package/dist/components/icon/icon-paths.js.map +1 -1
- package/dist/components/icon/icon.d.ts +2 -0
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icon.js +10 -1
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/image/image.d.ts +31 -0
- package/dist/components/image/image.d.ts.map +1 -0
- package/dist/components/image/image.js +179 -0
- package/dist/components/image/image.js.map +1 -0
- package/dist/components/input/input.js +4 -4
- package/dist/components/lazy/lazy.d.ts +34 -0
- package/dist/components/lazy/lazy.d.ts.map +1 -0
- package/dist/components/lazy/lazy.js +104 -0
- package/dist/components/lazy/lazy.js.map +1 -0
- package/dist/components/line-chart/line-chart.d.ts +37 -0
- package/dist/components/line-chart/line-chart.d.ts.map +1 -0
- package/dist/components/line-chart/line-chart.js +271 -0
- package/dist/components/line-chart/line-chart.js.map +1 -0
- package/dist/components/list/list-item.d.ts +45 -0
- package/dist/components/list/list-item.d.ts.map +1 -0
- package/dist/components/list/list-item.js +263 -0
- package/dist/components/list/list-item.js.map +1 -0
- package/dist/components/list/list.d.ts +50 -0
- package/dist/components/list/list.d.ts.map +1 -0
- package/dist/components/list/list.js +161 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/logo-cloud/logo-cloud.d.ts +19 -0
- package/dist/components/logo-cloud/logo-cloud.d.ts.map +1 -0
- package/dist/components/logo-cloud/logo-cloud.js +66 -0
- package/dist/components/logo-cloud/logo-cloud.js.map +1 -0
- package/dist/components/modal/modal.d.ts +12 -0
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.js +40 -11
- package/dist/components/modal/modal.js.map +1 -1
- package/dist/components/page-layout/page-layout.js +8 -8
- package/dist/components/pagination/pagination.d.ts +15 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/pagination.js +126 -0
- package/dist/components/pagination/pagination.js.map +1 -0
- package/dist/components/pagination/pagination.utils.d.ts +3 -0
- package/dist/components/pagination/pagination.utils.d.ts.map +1 -0
- package/dist/components/pagination/pagination.utils.js +19 -0
- package/dist/components/pagination/pagination.utils.js.map +1 -0
- package/dist/components/pie-chart/pie-chart.d.ts +33 -0
- package/dist/components/pie-chart/pie-chart.d.ts.map +1 -0
- package/dist/components/pie-chart/pie-chart.js +233 -0
- package/dist/components/pie-chart/pie-chart.js.map +1 -0
- package/dist/components/pin-input/pin-input.js +4 -4
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +1 -3
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/post-list/post-card.d.ts +16 -0
- package/dist/components/post-list/post-card.d.ts.map +1 -0
- package/dist/components/post-list/post-card.js +22 -0
- package/dist/components/post-list/post-card.js.map +1 -0
- package/dist/components/post-list/post-list.d.ts +17 -0
- package/dist/components/post-list/post-list.d.ts.map +1 -0
- package/dist/components/post-list/post-list.js +23 -0
- package/dist/components/post-list/post-list.js.map +1 -0
- package/dist/components/pricing/pricing-tier.d.ts +23 -0
- package/dist/components/pricing/pricing-tier.d.ts.map +1 -0
- package/dist/components/pricing/pricing-tier.js +144 -0
- package/dist/components/pricing/pricing-tier.js.map +1 -0
- package/dist/components/pricing/pricing.d.ts +18 -0
- package/dist/components/pricing/pricing.d.ts.map +1 -0
- package/dist/components/pricing/pricing.js +38 -0
- package/dist/components/pricing/pricing.js.map +1 -0
- package/dist/components/progress/progress.d.ts +17 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/progress.js +109 -0
- package/dist/components/progress/progress.js.map +1 -0
- package/dist/components/project-grid/project-card.d.ts +17 -0
- package/dist/components/project-grid/project-card.d.ts.map +1 -0
- package/dist/components/project-grid/project-card.js +23 -0
- package/dist/components/project-grid/project-card.js.map +1 -0
- package/dist/components/project-grid/project-grid.d.ts +17 -0
- package/dist/components/project-grid/project-grid.d.ts.map +1 -0
- package/dist/components/project-grid/project-grid.js +23 -0
- package/dist/components/project-grid/project-grid.js.map +1 -0
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/reveal/reveal.constants.d.ts +10 -0
- package/dist/components/reveal/reveal.constants.d.ts.map +1 -0
- package/dist/components/reveal/reveal.constants.js +11 -0
- package/dist/components/reveal/reveal.constants.js.map +1 -0
- package/dist/components/reveal/reveal.d.ts +64 -0
- package/dist/components/reveal/reveal.d.ts.map +1 -0
- package/dist/components/reveal/reveal.js +352 -0
- package/dist/components/reveal/reveal.js.map +1 -0
- package/dist/components/scroll-progress/scroll-progress.d.ts +32 -0
- package/dist/components/scroll-progress/scroll-progress.d.ts.map +1 -0
- package/dist/components/scroll-progress/scroll-progress.js +120 -0
- package/dist/components/scroll-progress/scroll-progress.js.map +1 -0
- package/dist/components/section/card-row.d.ts +30 -0
- package/dist/components/section/card-row.d.ts.map +1 -0
- package/dist/components/section/card-row.js +174 -0
- package/dist/components/section/card-row.js.map +1 -0
- package/dist/components/section/card.d.ts +27 -0
- package/dist/components/section/card.d.ts.map +1 -0
- package/dist/components/section/card.js +205 -0
- package/dist/components/section/card.js.map +1 -0
- package/dist/components/section/row-item.d.ts +22 -0
- package/dist/components/section/row-item.d.ts.map +1 -0
- package/dist/components/section/row-item.js +53 -0
- package/dist/components/section/row-item.js.map +1 -0
- package/dist/components/section/section.d.ts +70 -0
- package/dist/components/section/section.d.ts.map +1 -0
- package/dist/components/section/section.js +240 -0
- package/dist/components/section/section.js.map +1 -0
- package/dist/components/select/select.js +3 -3
- package/dist/components/series-nav/series-nav.d.ts +29 -0
- package/dist/components/series-nav/series-nav.d.ts.map +1 -0
- package/dist/components/series-nav/series-nav.js +178 -0
- package/dist/components/series-nav/series-nav.js.map +1 -0
- package/dist/components/site-header/site-header.d.ts +51 -0
- package/dist/components/site-header/site-header.d.ts.map +1 -0
- package/dist/components/site-header/site-header.js +296 -0
- package/dist/components/site-header/site-header.js.map +1 -0
- package/dist/components/skeleton/skeleton.js +7 -7
- package/dist/components/sparkline/sparkline.d.ts +19 -0
- package/dist/components/sparkline/sparkline.d.ts.map +1 -0
- package/dist/components/sparkline/sparkline.js +99 -0
- package/dist/components/sparkline/sparkline.js.map +1 -0
- package/dist/components/spinner/spinner.d.ts +13 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.js +65 -0
- package/dist/components/spinner/spinner.js.map +1 -0
- package/dist/components/split/split.d.ts +23 -0
- package/dist/components/split/split.d.ts.map +1 -0
- package/dist/components/split/split.js +104 -0
- package/dist/components/split/split.js.map +1 -0
- package/dist/components/stack/stack.d.ts +21 -0
- package/dist/components/stack/stack.d.ts.map +1 -0
- package/dist/components/stack/stack.js +102 -0
- package/dist/components/stack/stack.js.map +1 -0
- package/dist/components/stat-card/stat-card.d.ts +35 -0
- package/dist/components/stat-card/stat-card.d.ts.map +1 -0
- package/dist/components/stat-card/stat-card.js +199 -0
- package/dist/components/stat-card/stat-card.js.map +1 -0
- package/dist/components/stats/stat.d.ts +16 -0
- package/dist/components/stats/stat.d.ts.map +1 -0
- package/dist/components/stats/stat.js +51 -0
- package/dist/components/stats/stat.js.map +1 -0
- package/dist/components/stats/stats.d.ts +19 -0
- package/dist/components/stats/stats.d.ts.map +1 -0
- package/dist/components/stats/stats.js +45 -0
- package/dist/components/stats/stats.js.map +1 -0
- package/dist/components/switch/switch.js +2 -2
- package/dist/components/table/data-table.d.ts +115 -27
- package/dist/components/table/data-table.d.ts.map +1 -1
- package/dist/components/table/data-table.js +1012 -411
- package/dist/components/table/data-table.js.map +1 -1
- package/dist/components/table/data-table.utils.d.ts +81 -0
- package/dist/components/table/data-table.utils.d.ts.map +1 -0
- package/dist/components/table/data-table.utils.js +208 -0
- package/dist/components/table/data-table.utils.js.map +1 -0
- package/dist/components/table/table.d.ts +28 -0
- package/dist/components/table/table.d.ts.map +1 -1
- package/dist/components/table/table.js +161 -33
- package/dist/components/table/table.js.map +1 -1
- package/dist/components/team/person.d.ts +19 -0
- package/dist/components/team/person.d.ts.map +1 -0
- package/dist/components/team/person.js +123 -0
- package/dist/components/team/person.js.map +1 -0
- package/dist/components/team/team.d.ts +18 -0
- package/dist/components/team/team.d.ts.map +1 -0
- package/dist/components/team/team.js +36 -0
- package/dist/components/team/team.js.map +1 -0
- package/dist/components/testimonials/testimonial.d.ts +18 -0
- package/dist/components/testimonials/testimonial.d.ts.map +1 -0
- package/dist/components/testimonials/testimonial.js +115 -0
- package/dist/components/testimonials/testimonial.js.map +1 -0
- package/dist/components/testimonials/testimonials.d.ts +18 -0
- package/dist/components/testimonials/testimonials.d.ts.map +1 -0
- package/dist/components/testimonials/testimonials.js +36 -0
- package/dist/components/testimonials/testimonials.js.map +1 -0
- package/dist/components/textarea/textarea.js +3 -3
- package/dist/components/theme-toggle/theme-toggle.js +1 -1
- package/dist/components/time-picker/time-picker.d.ts.map +1 -1
- package/dist/components/time-picker/time-picker.js +13 -3
- package/dist/components/time-picker/time-picker.js.map +1 -1
- package/dist/components/timeline/timeline-item.d.ts +18 -0
- package/dist/components/timeline/timeline-item.d.ts.map +1 -0
- package/dist/components/timeline/timeline-item.js +102 -0
- package/dist/components/timeline/timeline-item.js.map +1 -0
- package/dist/components/timeline/timeline.d.ts +18 -0
- package/dist/components/timeline/timeline.d.ts.map +1 -0
- package/dist/components/timeline/timeline.js +30 -0
- package/dist/components/timeline/timeline.js.map +1 -0
- package/dist/components/toast/toast.d.ts +33 -0
- package/dist/components/toast/toast.d.ts.map +1 -0
- package/dist/components/toast/toast.js +147 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/toggle-group/toggle-button.d.ts +2 -0
- package/dist/components/toggle-group/toggle-button.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle-button.js +12 -5
- package/dist/components/toggle-group/toggle-button.js.map +1 -1
- package/dist/components/toggle-group/toggle-group.d.ts +6 -0
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -1
- package/dist/components/toggle-group/toggle-group.js +141 -21
- package/dist/components/toggle-group/toggle-group.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +21 -21
- package/dist/components/vertical-nav/vertical-nav-group.js +3 -3
- package/dist/components/vertical-nav/vertical-nav-item.js +4 -4
- package/dist/components/video-embed/video-embed.d.ts +37 -0
- package/dist/components/video-embed/video-embed.d.ts.map +1 -0
- package/dist/components/video-embed/video-embed.js +183 -0
- package/dist/components/video-embed/video-embed.js.map +1 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +104 -0
- package/dist/index.js.map +1 -0
- package/dist/styles/index.css +205 -1
- package/dist/styles/reset.d.ts.map +1 -1
- package/dist/styles/reset.js +5 -0
- package/dist/styles/reset.js.map +1 -1
- package/package.json +214 -7
- package/src/components/accordion/accordion.constants.ts +5 -0
- package/src/components/accordion/accordion.ts +209 -0
- package/src/components/alert/alert.constants.ts +3 -0
- package/src/components/alert/alert.ts +284 -17
- package/src/components/avatar/avatar.ts +84 -0
- package/src/components/back-to-top/back-to-top.ts +140 -0
- package/src/components/bar-chart/bar-chart.ts +295 -0
- package/src/components/breadcrumb/breadcrumb.ts +2 -2
- package/src/components/button/button.ts +9 -8
- package/src/components/button-group/button-group.ts +4 -4
- package/src/components/calendar/calendar.ts +26 -9
- package/src/components/chart/chart-base.ts +275 -0
- package/src/components/chart/chart.utils.ts +140 -0
- package/src/components/code-block/code-block.ts +35 -24
- package/src/components/consent/consent.ts +312 -0
- package/src/components/consent/consent.utils.ts +110 -0
- package/src/components/contact/contact.ts +83 -0
- package/src/components/container/container.ts +60 -0
- package/src/components/content-card/content-card.ts +4 -4
- package/src/components/context-menu/context-menu.ts +426 -0
- package/src/components/cron-builder/cron-builder.ts +102 -22
- package/src/components/cta/cta.ts +64 -0
- package/src/components/drawer/drawer.ts +6 -6
- package/src/components/faq/faq-item.ts +110 -0
- package/src/components/faq/faq.ts +40 -0
- package/src/components/feature-grid/feature-grid.ts +52 -0
- package/src/components/feature-grid/feature.ts +84 -0
- package/src/components/field/field.ts +2 -2
- package/src/components/footer/footer.ts +4 -4
- package/src/components/form/form-reset.ts +45 -0
- package/src/components/form/form.ts +17 -3
- package/src/components/grid/grid.ts +73 -4
- package/src/components/heat-map/heat-map.ts +292 -0
- package/src/components/hero/hero.ts +132 -0
- package/src/components/icon/icon-paths.ts +92 -1
- package/src/components/icon/icon.ts +8 -1
- package/src/components/image/image.ts +165 -0
- package/src/components/input/input.ts +4 -4
- package/src/components/lazy/lazy.ts +94 -0
- package/src/components/line-chart/line-chart.ts +271 -0
- package/src/components/list/list-item.ts +225 -0
- package/src/components/list/list.ts +157 -0
- package/src/components/logo-cloud/logo-cloud.ts +65 -0
- package/src/components/modal/modal.ts +37 -11
- package/src/components/page-layout/page-layout.ts +8 -8
- package/src/components/pagination/pagination.ts +120 -0
- package/src/components/pagination/pagination.utils.ts +14 -0
- package/src/components/pie-chart/pie-chart.ts +230 -0
- package/src/components/pin-input/pin-input.ts +4 -4
- package/src/components/popover/popover.ts +1 -3
- package/src/components/post-list/post-card.ts +18 -0
- package/src/components/post-list/post-list.ts +19 -0
- package/src/components/pricing/pricing-tier.ts +132 -0
- package/src/components/pricing/pricing.ts +39 -0
- package/src/components/progress/progress.ts +95 -0
- package/src/components/project-grid/project-card.ts +19 -0
- package/src/components/project-grid/project-grid.ts +19 -0
- package/src/components/radio/radio.ts +1 -1
- package/src/components/reveal/reveal.constants.ts +20 -0
- package/src/components/reveal/reveal.ts +344 -0
- package/src/components/scroll-progress/scroll-progress.ts +119 -0
- package/src/components/section/card-row.ts +152 -0
- package/src/components/section/card.ts +197 -0
- package/src/components/section/row-item.ts +38 -0
- package/src/components/section/section.ts +232 -0
- package/src/components/select/select.ts +3 -3
- package/src/components/series-nav/series-nav.ts +164 -0
- package/src/components/site-header/site-header.ts +276 -0
- package/src/components/skeleton/skeleton.ts +7 -7
- package/src/components/sparkline/sparkline.ts +83 -0
- package/src/components/spinner/spinner.ts +55 -0
- package/src/components/split/split.ts +106 -0
- package/src/components/stack/stack.ts +88 -0
- package/src/components/stat-card/stat-card.ts +179 -0
- package/src/components/stats/stat.ts +49 -0
- package/src/components/stats/stats.ts +47 -0
- package/src/components/switch/switch.ts +2 -2
- package/src/components/table/data-table.ts +1015 -425
- package/src/components/table/data-table.utils.ts +276 -0
- package/src/components/table/table.ts +168 -38
- package/src/components/team/person.ts +113 -0
- package/src/components/team/team.ts +37 -0
- package/src/components/testimonials/testimonial.ts +108 -0
- package/src/components/testimonials/testimonials.ts +37 -0
- package/src/components/textarea/textarea.ts +3 -3
- package/src/components/theme-toggle/theme-toggle.ts +1 -1
- package/src/components/time-picker/time-picker.ts +17 -3
- package/src/components/timeline/timeline-item.ts +100 -0
- package/src/components/timeline/timeline.ts +31 -0
- package/src/components/toast/toast.ts +153 -0
- package/src/components/toggle-group/toggle-button.ts +9 -5
- package/src/components/toggle-group/toggle-group.ts +158 -42
- package/src/components/tooltip/tooltip.ts +21 -21
- package/src/components/vertical-nav/vertical-nav-group.ts +3 -3
- package/src/components/vertical-nav/vertical-nav-item.ts +4 -4
- package/src/components/video-embed/video-embed.ts +162 -0
- package/src/index.ts +108 -0
- package/src/styles/globals.css +63 -0
- package/src/styles/index.css +3 -1
- package/src/styles/prose.css +154 -0
- package/src/styles/reset.ts +5 -0
- package/src/styles/theme.css +53 -0
- package/src/styles/typography.css +1 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/** Cookie and storage consent: the record kept, and how it is read and written. */
|
|
2
|
+
export const DEFAULT_STORAGE_KEY = "st-consent";
|
|
3
|
+
export const DEFAULT_CATEGORIES = [
|
|
4
|
+
{
|
|
5
|
+
id: "necessary",
|
|
6
|
+
label: "Necessary",
|
|
7
|
+
description: "Needed for the site to work. These cannot be switched off.",
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
{ id: "analytics", label: "Analytics", description: "Help us understand how the site is used." },
|
|
11
|
+
{ id: "marketing", label: "Marketing", description: "Used to show relevant content and measure campaigns." },
|
|
12
|
+
];
|
|
13
|
+
const DAY_MS = 86_400_000;
|
|
14
|
+
/** Every category set to the same answer; required categories are always on. */
|
|
15
|
+
export function choicesFor(categories, value) {
|
|
16
|
+
return Object.fromEntries(categories.map((c) => [c.id, c.required ? true : value]));
|
|
17
|
+
}
|
|
18
|
+
/** Keeps only known categories, forces required ones on, and treats anything missing as off. */
|
|
19
|
+
export function normaliseChoices(categories, choices) {
|
|
20
|
+
return Object.fromEntries(categories.map((c) => [c.id, c.required ? true : choices[c.id] === true]));
|
|
21
|
+
}
|
|
22
|
+
/** True when a stored record is current: same version, not expired, covers every category. */
|
|
23
|
+
export function isRecordValid(record, version, categories, expiresDays, now = Date.now()) {
|
|
24
|
+
if (!record || record.version !== version)
|
|
25
|
+
return false;
|
|
26
|
+
if (now - record.savedAt > expiresDays * DAY_MS)
|
|
27
|
+
return false;
|
|
28
|
+
return categories.every((c) => typeof record.choices?.[c.id] === "boolean");
|
|
29
|
+
}
|
|
30
|
+
export function parseRecord(raw) {
|
|
31
|
+
if (!raw)
|
|
32
|
+
return null;
|
|
33
|
+
try {
|
|
34
|
+
const value = JSON.parse(raw);
|
|
35
|
+
if (value &&
|
|
36
|
+
typeof value.version === "string" &&
|
|
37
|
+
typeof value.savedAt === "number" &&
|
|
38
|
+
value.choices &&
|
|
39
|
+
typeof value.choices === "object") {
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch {
|
|
44
|
+
// Fall through: a corrupt record is the same as no record.
|
|
45
|
+
}
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
export function readRecord(key = DEFAULT_STORAGE_KEY) {
|
|
49
|
+
try {
|
|
50
|
+
return parseRecord(window.localStorage.getItem(key));
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return null; // storage can be blocked
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
export function writeRecord(record, key = DEFAULT_STORAGE_KEY) {
|
|
57
|
+
try {
|
|
58
|
+
window.localStorage.setItem(key, JSON.stringify(record));
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
export function clearRecord(key = DEFAULT_STORAGE_KEY) {
|
|
66
|
+
try {
|
|
67
|
+
window.localStorage.removeItem(key);
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
// ignore
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The visitor's saved choices, or null if they have not chosen yet. Use it to decide whether to
|
|
75
|
+
* load an analytics script:
|
|
76
|
+
*
|
|
77
|
+
* if (getConsent()?.analytics) loadAnalytics();
|
|
78
|
+
*/
|
|
79
|
+
export function getConsent(key = DEFAULT_STORAGE_KEY) {
|
|
80
|
+
return readRecord(key)?.choices ?? null;
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=consent.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consent.utils.js","sourceRoot":"","sources":["../../../src/components/consent/consent.utils.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StSection } from "../section/section.js";
|
|
2
|
+
/**
|
|
3
|
+
* A "get in touch" row: your contact details beside a form. The columns stack on narrow screens,
|
|
4
|
+
* details first. The row only lays things out: the form is yours, so it can post wherever you
|
|
5
|
+
* choose.
|
|
6
|
+
*
|
|
7
|
+
* Slots: `eyebrow`, `title`, `lead`, the default slot (addresses, email, opening hours) and
|
|
8
|
+
* `form` (usually an `st-form`).
|
|
9
|
+
*/
|
|
10
|
+
export declare class StContact extends StSection {
|
|
11
|
+
/** Puts the form on the left on wide screens. */
|
|
12
|
+
reverse: boolean;
|
|
13
|
+
constructor();
|
|
14
|
+
static styles: import("lit").CSSResult[];
|
|
15
|
+
render(): import("lit-html").TemplateResult;
|
|
16
|
+
}
|
|
17
|
+
declare global {
|
|
18
|
+
interface HTMLElementTagNameMap {
|
|
19
|
+
"st-contact": StContact;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=contact.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.d.ts","sourceRoot":"","sources":["../../../src/components/contact/contact.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAEhD;;;;;;;GAOG;AACH,qBACa,SAAU,SAAQ,SAAS;IACtC,iDAAiD;IACP,OAAO,UAAS;IAE1D,cAGC;IAED,MAAM,CAAC,MAAM,4BAsCX;IAEF,MAAM,sCAaL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,YAAY,EAAE,SAAS,CAAC;KACzB;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { html, css } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { StSection } from "../section/section.js";
|
|
10
|
+
/**
|
|
11
|
+
* A "get in touch" row: your contact details beside a form. The columns stack on narrow screens,
|
|
12
|
+
* details first. The row only lays things out: the form is yours, so it can post wherever you
|
|
13
|
+
* choose.
|
|
14
|
+
*
|
|
15
|
+
* Slots: `eyebrow`, `title`, `lead`, the default slot (addresses, email, opening hours) and
|
|
16
|
+
* `form` (usually an `st-form`).
|
|
17
|
+
*/
|
|
18
|
+
let StContact = class StContact extends StSection {
|
|
19
|
+
constructor() {
|
|
20
|
+
super();
|
|
21
|
+
/** Puts the form on the left on wide screens. */
|
|
22
|
+
this.reverse = false;
|
|
23
|
+
this.align = "start";
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
return this.frame(html `
|
|
27
|
+
<div class="contact">
|
|
28
|
+
<div class="text">
|
|
29
|
+
${this.renderHeader()}
|
|
30
|
+
${this.animateIn(html `<div class="details"><slot @slotchange=${this._onItemsChange}></slot></div>`, 100)}
|
|
31
|
+
</div>
|
|
32
|
+
<div class="form">${this.animateIn(html `<slot name="form"></slot>`, 150)}</div>
|
|
33
|
+
</div>
|
|
34
|
+
`, { header: false, animated: false });
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
StContact.styles = [
|
|
38
|
+
...StSection.styles,
|
|
39
|
+
css `
|
|
40
|
+
.contact {
|
|
41
|
+
display: grid;
|
|
42
|
+
gap: var(--st-spacing-2xl);
|
|
43
|
+
align-items: start;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@media (min-width: 52rem) {
|
|
47
|
+
.contact {
|
|
48
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:host([reverse]) .form {
|
|
52
|
+
order: -1;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.header {
|
|
57
|
+
margin-bottom: var(--st-spacing-lg);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.details {
|
|
61
|
+
color: var(--st-color-text-muted);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.details ::slotted(*) {
|
|
65
|
+
margin: 0 0 var(--st-spacing-md);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.form {
|
|
69
|
+
padding: var(--st-spacing-lg);
|
|
70
|
+
border: 1px solid var(--st-color-border);
|
|
71
|
+
border-radius: var(--st-radius-lg);
|
|
72
|
+
background: var(--st-row-card-bg, var(--st-color-surface));
|
|
73
|
+
}
|
|
74
|
+
`,
|
|
75
|
+
];
|
|
76
|
+
__decorate([
|
|
77
|
+
property({ type: Boolean, reflect: true })
|
|
78
|
+
], StContact.prototype, "reverse", void 0);
|
|
79
|
+
StContact = __decorate([
|
|
80
|
+
customElement("st-contact")
|
|
81
|
+
], StContact);
|
|
82
|
+
export { StContact };
|
|
83
|
+
//# sourceMappingURL=contact.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contact.js","sourceRoot":"","sources":["../../../src/components/contact/contact.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,IAAI,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAEhD;;;;;;;GAOG;AAEI,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,SAAS;IAItC;QACE,KAAK,EAAE,CAAC;QAJV,iDAAiD;QACP,YAAO,GAAG,KAAK,CAAC;QAIxD,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC;IACvB,CAAC;IA0CD,MAAM;QACJ,OAAO,IAAI,CAAC,KAAK,CACf,IAAI,CAAA;;;cAGI,IAAI,CAAC,YAAY,EAAE;cACnB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAA,0CAA0C,IAAI,CAAC,cAAc,gBAAgB,EAAE,GAAG,CAAC;;8BAEtF,IAAI,CAAC,SAAS,CAAC,IAAI,CAAA,2BAA2B,EAAE,GAAG,CAAC;;OAE3E,EACD,EAAC,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAC,CACjC,CAAC;IACJ,CAAC;CACF,CAAA;AAtDQ,gBAAM,GAAG;IACd,GAAG,SAAS,CAAC,MAAM;IACnB,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAmCF;CACF,AAtCY,CAsCX;AA7CwC;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;0CAAiB;AAF/C,SAAS;IADrB,aAAa,CAAC,YAAY,CAAC;GACf,SAAS,CA+DrB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
export declare const containerSizes: readonly ["sm", "md", "lg", "xl", "full"];
|
|
3
|
+
export type ContainerSize = (typeof containerSizes)[number];
|
|
4
|
+
/**
|
|
5
|
+
* Centres content and limits its line length, with side padding that grows with the screen.
|
|
6
|
+
* Use `size` to pick the maximum width; `full` removes the limit. Set `flush` to drop the side
|
|
7
|
+
* padding (for example to let an image touch the screen edges).
|
|
8
|
+
*/
|
|
9
|
+
export declare class StContainer extends LitElement {
|
|
10
|
+
size: ContainerSize;
|
|
11
|
+
flush: boolean;
|
|
12
|
+
static styles: import("lit").CSSResult[];
|
|
13
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
14
|
+
}
|
|
15
|
+
declare global {
|
|
16
|
+
interface HTMLElementTagNameMap {
|
|
17
|
+
"st-container": StContainer;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../src/components/container/container.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAY,MAAM,KAAK,CAAC;AAI1C,eAAO,MAAM,cAAc,YAAI,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAU,CAAC;AACxE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5D;;;;GAIG;AACH,qBACa,WAAY,SAAQ,UAAU;IACA,IAAI,EAAE,aAAa,CAAQ;IAC1B,KAAK,UAAS;IAExD,MAAM,CAAC,MAAM,4BA+BX;IAEF,MAAM,yCAEL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,cAAc,EAAE,WAAW,CAAC;KAC7B;CACF"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import { LitElement, html, css } from "lit";
|
|
8
|
+
import { customElement, property } from "lit/decorators.js";
|
|
9
|
+
import { resetStyles } from "../../styles/reset.js";
|
|
10
|
+
export const containerSizes = ["sm", "md", "lg", "xl", "full"];
|
|
11
|
+
/**
|
|
12
|
+
* Centres content and limits its line length, with side padding that grows with the screen.
|
|
13
|
+
* Use `size` to pick the maximum width; `full` removes the limit. Set `flush` to drop the side
|
|
14
|
+
* padding (for example to let an image touch the screen edges).
|
|
15
|
+
*/
|
|
16
|
+
let StContainer = class StContainer extends LitElement {
|
|
17
|
+
constructor() {
|
|
18
|
+
super(...arguments);
|
|
19
|
+
this.size = "lg";
|
|
20
|
+
this.flush = false;
|
|
21
|
+
}
|
|
22
|
+
render() {
|
|
23
|
+
return html `<slot></slot>`;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
StContainer.styles = [
|
|
27
|
+
resetStyles,
|
|
28
|
+
css `
|
|
29
|
+
:host {
|
|
30
|
+
display: block;
|
|
31
|
+
width: 100%;
|
|
32
|
+
max-width: var(--_max, var(--st-container-lg));
|
|
33
|
+
margin-inline: auto;
|
|
34
|
+
padding-inline: var(--st-gutter);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:host([flush]) {
|
|
38
|
+
padding-inline: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
:host([size="sm"]) {
|
|
42
|
+
--_max: var(--st-container-sm);
|
|
43
|
+
}
|
|
44
|
+
:host([size="md"]) {
|
|
45
|
+
--_max: var(--st-container-md);
|
|
46
|
+
}
|
|
47
|
+
:host([size="lg"]) {
|
|
48
|
+
--_max: var(--st-container-lg);
|
|
49
|
+
}
|
|
50
|
+
:host([size="xl"]) {
|
|
51
|
+
--_max: var(--st-container-xl);
|
|
52
|
+
}
|
|
53
|
+
:host([size="full"]) {
|
|
54
|
+
--_max: none;
|
|
55
|
+
}
|
|
56
|
+
`,
|
|
57
|
+
];
|
|
58
|
+
__decorate([
|
|
59
|
+
property({ type: String, reflect: true })
|
|
60
|
+
], StContainer.prototype, "size", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
property({ type: Boolean, reflect: true })
|
|
63
|
+
], StContainer.prototype, "flush", void 0);
|
|
64
|
+
StContainer = __decorate([
|
|
65
|
+
customElement("st-container")
|
|
66
|
+
], StContainer);
|
|
67
|
+
export { StContainer };
|
|
68
|
+
//# sourceMappingURL=container.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"container.js","sourceRoot":"","sources":["../../../src/components/container/container.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAC,UAAU,EAAE,IAAI,EAAE,GAAG,EAAC,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAC,aAAa,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAC,WAAW,EAAC,MAAM,uBAAuB,CAAC;AAElD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAU,CAAC;AAGxE;;;;GAIG;AAEI,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,UAAU;IAApC;;QACoC,SAAI,GAAkB,IAAI,CAAC;QAC1B,UAAK,GAAG,KAAK,CAAC;IAsC1D,CAAC;IAHC,MAAM;QACJ,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;CACF,CAAA;AApCQ,kBAAM,GAAG;IACd,WAAW;IACX,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA4BF;CACF,AA/BY,CA+BX;AAlCuC;IAAxC,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;yCAA4B;AAC1B;IAAzC,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,CAAC;0CAAe;AAF7C,WAAW;IADvB,aAAa,CAAC,cAAc,CAAC;GACjB,WAAW,CAwCvB"}
|
|
@@ -48,7 +48,7 @@ StContentCard.styles = [
|
|
|
48
48
|
height: 100%;
|
|
49
49
|
background-color: var(--st-color-surface);
|
|
50
50
|
border: 1px solid var(--st-color-border);
|
|
51
|
-
border-radius: var(--st-radius-md
|
|
51
|
+
border-radius: var(--st-radius-md);
|
|
52
52
|
overflow: hidden;
|
|
53
53
|
text-decoration: none;
|
|
54
54
|
color: inherit;
|
|
@@ -71,7 +71,7 @@ StContentCard.styles = [
|
|
|
71
71
|
Safari fix: WebKit ignores :host-context.
|
|
72
72
|
Set --st-card-shadow-hover in your global dark mode CSS instead!
|
|
73
73
|
*/
|
|
74
|
-
box-shadow: var(--st-card-shadow-hover,
|
|
74
|
+
box-shadow: var(--st-card-shadow-hover, var(--st-shadow-md));
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
/* ==========================================================
|
|
@@ -102,8 +102,8 @@ StContentCard.styles = [
|
|
|
102
102
|
.content {
|
|
103
103
|
display: flex;
|
|
104
104
|
flex-direction: column;
|
|
105
|
-
padding: var(--st-spacing-md
|
|
106
|
-
gap: var(--st-spacing-sm
|
|
105
|
+
padding: var(--st-spacing-md);
|
|
106
|
+
gap: var(--st-spacing-sm);
|
|
107
107
|
flex: 1;
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { LitElement } from "lit";
|
|
2
|
+
import "../icon/icon.js";
|
|
3
|
+
export interface MenuItem {
|
|
4
|
+
/** Text shown for the item. Omit for a separator. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Identifier returned in `st-menu-select`. Defaults to the label. */
|
|
7
|
+
value?: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
/** Right-aligned hint such as "Ctrl+C" (display only). */
|
|
10
|
+
shortcut?: string;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
/** Styles the item as destructive, e.g. Delete. */
|
|
13
|
+
danger?: boolean;
|
|
14
|
+
/** Turns the item into a checkbox item. Update `items` in response to `st-menu-select`. */
|
|
15
|
+
checked?: boolean;
|
|
16
|
+
/** Keeps the menu open after selecting, e.g. for toggles. */
|
|
17
|
+
keepOpen?: boolean;
|
|
18
|
+
/** Renders a divider line instead of an item. */
|
|
19
|
+
separator?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export type MenuTrigger = "contextmenu" | "click" | "manual";
|
|
22
|
+
/**
|
|
23
|
+
* A reusable menu styled like a native right-click menu. It renders in the top layer, so it is
|
|
24
|
+
* never clipped by scrolling containers, flips to stay on screen, and is fully keyboard
|
|
25
|
+
* operable (arrows, Home/End, type-ahead, Enter/Space, Escape).
|
|
26
|
+
*
|
|
27
|
+
* Opening: wrap an element in it (default trigger is right-click, which also covers the
|
|
28
|
+
* keyboard Menu key and Shift+F10), or call `show(x, y, context)` / `showAt(element, context)`
|
|
29
|
+
* with `trigger="manual"`.
|
|
30
|
+
*
|
|
31
|
+
* Events (bubble, composed): `st-menu-open`, `st-menu-close`, and `st-menu-select` with
|
|
32
|
+
* `{ item, value, context }`.
|
|
33
|
+
*/
|
|
34
|
+
export declare class StContextMenu extends LitElement {
|
|
35
|
+
items: MenuItem[];
|
|
36
|
+
trigger: MenuTrigger;
|
|
37
|
+
/** Accessible name of the menu. */
|
|
38
|
+
label: string;
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
private _open;
|
|
41
|
+
private _active;
|
|
42
|
+
private _menu;
|
|
43
|
+
private _context;
|
|
44
|
+
private _returnFocus;
|
|
45
|
+
private _clicked;
|
|
46
|
+
private _typeahead;
|
|
47
|
+
private _typeaheadTimer?;
|
|
48
|
+
static styles: import("lit").CSSResult[];
|
|
49
|
+
connectedCallback(): void;
|
|
50
|
+
disconnectedCallback(): void;
|
|
51
|
+
/** True while the menu is showing. */
|
|
52
|
+
get isOpen(): boolean;
|
|
53
|
+
private _onContextMenu;
|
|
54
|
+
private _onTriggerClick;
|
|
55
|
+
/** Opens the menu at viewport coordinates. `context` is echoed back in `st-menu-select`. */
|
|
56
|
+
show(x: number, y: number, context?: unknown): void;
|
|
57
|
+
private _show;
|
|
58
|
+
/** Opens the menu below (or above, if there is no room) an element, e.g. a "more" button. */
|
|
59
|
+
showAt(anchor: HTMLElement, context?: unknown): void;
|
|
60
|
+
/** Closes the menu and restores focus to where it was before opening. */
|
|
61
|
+
hide(): void;
|
|
62
|
+
private _activeElement;
|
|
63
|
+
private _place;
|
|
64
|
+
/**
|
|
65
|
+
* Light dismiss is handled here rather than by popover="auto", because browsers that fire
|
|
66
|
+
* contextmenu on mouse-down (macOS, Linux) would close an auto popover on the mouse-up.
|
|
67
|
+
*/
|
|
68
|
+
private _listen;
|
|
69
|
+
private _dismiss;
|
|
70
|
+
private _onOutsidePointer;
|
|
71
|
+
private _onEscape;
|
|
72
|
+
private _closeOnLayoutChange;
|
|
73
|
+
private _onToggle;
|
|
74
|
+
private _afterClose;
|
|
75
|
+
private _isFocusable;
|
|
76
|
+
private _nextEnabled;
|
|
77
|
+
private _focusItem;
|
|
78
|
+
private _onKeydown;
|
|
79
|
+
private _typeaheadSearch;
|
|
80
|
+
private _select;
|
|
81
|
+
private _renderItem;
|
|
82
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
83
|
+
}
|
|
84
|
+
declare global {
|
|
85
|
+
interface HTMLElementTagNameMap {
|
|
86
|
+
"st-context-menu": StContextMenu;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=context-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context-menu.d.ts","sourceRoot":"","sources":["../../../src/components/context-menu/context-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAqB,MAAM,KAAK,CAAC;AAGnD,OAAO,iBAAiB,CAAC;AAEzB,MAAM,WAAW,QAAQ;IACvB,qDAAqD;IACrD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mDAAmD;IACnD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,2FAA2F;IAC3F,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,WAAW,GAAG,aAAa,GAAG,OAAO,GAAG,QAAQ,CAAC;AAI7D;;;;;;;;;;;GAWG;AACH,qBACa,aAAc,SAAQ,UAAU;IAClB,KAAK,EAAE,QAAQ,EAAE,CAAM;IACtB,OAAO,EAAE,WAAW,CAAiB;IAC/D,mCAAmC;IACT,KAAK,SAAa;IACF,QAAQ,UAAS;IAElD,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,OAAO,CAAM;IAEV,OAAO,CAAC,KAAK,CAAe;IAEhD,OAAO,CAAC,QAAQ,CAAU;IAC1B,OAAO,CAAC,YAAY,CAA4B;IAChD,OAAO,CAAC,QAAQ,CAA4B;IAC5C,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,eAAe,CAAC,CAAS;IAEjC,MAAM,CAAC,MAAM,4BAiGX;IAEF,iBAAiB,SAIhB;IAED,oBAAoB,SAKnB;IAED,sCAAsC;IACtC,IAAI,MAAM,YAET;IAED,OAAO,CAAC,cAAc,CASpB;IAEF,OAAO,CAAC,eAAe,CAGrB;IAEF,4FAA4F;IAC5F,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,QAE3C;IAED,OAAO,CAAC,KAAK;IAoBb,6FAA6F;IAC7F,MAAM,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,OAAO,QAI5C;IAED,yEAAyE;IACzE,IAAI,SAGH;IAED,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,MAAM;IAed;;;OAGG;IACH,OAAO,CAAC,OAAO;IASf,OAAO,CAAC,QAAQ,CAAqB;IAErC,OAAO,CAAC,iBAAiB,CAEvB;IAEF,OAAO,CAAC,SAAS,CAIf;IAEF,OAAO,CAAC,oBAAoB,CAI1B;IAEF,OAAO,CAAC,SAAS,CAGf;IAEF,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,UAAU;IA2BlB,OAAO,CAAC,gBAAgB;IAgBxB,OAAO,CAAC,OAAO;IAYf,OAAO,CAAC,WAAW;IA8BnB,MAAM,yCAaL;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,iBAAiB,EAAE,aAAa,CAAC;KAClC;CACF"}
|