@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,292 @@
|
|
|
1
|
+
import {html, css, svg, nothing} from "lit";
|
|
2
|
+
import {customElement, property, state} from "lit/decorators.js";
|
|
3
|
+
import {resetStyles} from "../../styles/reset.js";
|
|
4
|
+
import {StChartBase} from "../chart/chart-base.js";
|
|
5
|
+
import {clamp, normalize} from "../chart/chart.utils.js";
|
|
6
|
+
|
|
7
|
+
export const heatMapColors = ["primary", "info", "success", "warning", "error"] as const;
|
|
8
|
+
export type HeatMapColor = (typeof heatMapColors)[number];
|
|
9
|
+
|
|
10
|
+
export interface HeatCellRef {
|
|
11
|
+
row: number;
|
|
12
|
+
col: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const MARGIN = {top: 28, right: 8, bottom: 8};
|
|
16
|
+
|
|
17
|
+
/** Matrix heat map. Cell intensity is interpolated between the surface and the chosen color. */
|
|
18
|
+
@customElement("st-heat-map")
|
|
19
|
+
export class StHeatMap extends StChartBase {
|
|
20
|
+
@property({type: Array}) rows: string[] = [];
|
|
21
|
+
@property({type: Array}) columns: string[] = [];
|
|
22
|
+
/** `values[row][col]`; null/undefined renders an empty cell. */
|
|
23
|
+
@property({type: Array}) values: (number | null)[][] = [];
|
|
24
|
+
@property({type: Number}) min?: number;
|
|
25
|
+
@property({type: Number}) max?: number;
|
|
26
|
+
@property({type: String, reflect: true}) color: HeatMapColor = "primary";
|
|
27
|
+
/** Prints each value inside its cell when the cell is large enough. */
|
|
28
|
+
@property({type: Boolean, attribute: "show-values"}) showValues = false;
|
|
29
|
+
/** The selected cell, e.g. `{ "row": 1, "col": 2 }`, or null. */
|
|
30
|
+
@property({type: Object}) selected: HeatCellRef | null = null;
|
|
31
|
+
|
|
32
|
+
@state() private _active: HeatCellRef | null = null;
|
|
33
|
+
|
|
34
|
+
static styles = [
|
|
35
|
+
resetStyles,
|
|
36
|
+
StChartBase.baseStyles,
|
|
37
|
+
css`
|
|
38
|
+
:host {
|
|
39
|
+
--_ramp: var(--st-color-primary);
|
|
40
|
+
--_on-ramp: var(--st-color-on-primary);
|
|
41
|
+
}
|
|
42
|
+
:host([color="info"]) {
|
|
43
|
+
--_ramp: var(--st-color-info);
|
|
44
|
+
--_on-ramp: var(--st-color-on-info);
|
|
45
|
+
}
|
|
46
|
+
:host([color="success"]) {
|
|
47
|
+
--_ramp: var(--st-color-success);
|
|
48
|
+
--_on-ramp: var(--st-color-on-success);
|
|
49
|
+
}
|
|
50
|
+
:host([color="warning"]) {
|
|
51
|
+
--_ramp: var(--st-color-warning);
|
|
52
|
+
--_on-ramp: var(--st-color-on-warning);
|
|
53
|
+
}
|
|
54
|
+
:host([color="error"]) {
|
|
55
|
+
--_ramp: var(--st-color-error);
|
|
56
|
+
--_on-ramp: var(--st-color-on-danger);
|
|
57
|
+
}
|
|
58
|
+
.cell {
|
|
59
|
+
stroke: var(--st-color-bg);
|
|
60
|
+
stroke-width: 2;
|
|
61
|
+
cursor: default;
|
|
62
|
+
}
|
|
63
|
+
:host([selectable]) .cell {
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
}
|
|
66
|
+
.cell.empty {
|
|
67
|
+
fill: var(--st-color-surface-muted);
|
|
68
|
+
opacity: 0.4;
|
|
69
|
+
}
|
|
70
|
+
.cell.active {
|
|
71
|
+
stroke: var(--st-color-text);
|
|
72
|
+
}
|
|
73
|
+
.cell.chosen {
|
|
74
|
+
stroke: var(--st-color-text);
|
|
75
|
+
stroke-dasharray: 4 2;
|
|
76
|
+
}
|
|
77
|
+
.cell-text {
|
|
78
|
+
font-size: var(--st-font-size-xs);
|
|
79
|
+
pointer-events: none;
|
|
80
|
+
}
|
|
81
|
+
.scale {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
gap: var(--st-spacing-sm);
|
|
85
|
+
margin-top: var(--st-spacing-sm);
|
|
86
|
+
font-size: var(--st-font-size-xs);
|
|
87
|
+
color: var(--st-color-text-muted);
|
|
88
|
+
}
|
|
89
|
+
.scale-bar {
|
|
90
|
+
flex: 1;
|
|
91
|
+
max-width: 12rem;
|
|
92
|
+
height: 0.5rem;
|
|
93
|
+
border-radius: 999px;
|
|
94
|
+
border: 1px solid var(--st-color-border);
|
|
95
|
+
background: linear-gradient(
|
|
96
|
+
to right,
|
|
97
|
+
var(--st-color-surface-muted),
|
|
98
|
+
var(--_ramp)
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
`,
|
|
102
|
+
];
|
|
103
|
+
|
|
104
|
+
private get _range(): [number, number] {
|
|
105
|
+
const flat = this.values.flat().filter((v): v is number => v != null);
|
|
106
|
+
return [this.min ?? Math.min(...flat, Infinity), this.max ?? Math.max(...flat, -Infinity)].map(
|
|
107
|
+
(v) => (Number.isFinite(v) ? v : 0),
|
|
108
|
+
) as [number, number];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
private _value(ref: HeatCellRef) {
|
|
112
|
+
return this.values[ref.row]?.[ref.col] ?? null;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
private _same(a: HeatCellRef | null, b: HeatCellRef | null) {
|
|
116
|
+
return !!a && !!b && a.row === b.row && a.col === b.col;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
private _layout() {
|
|
120
|
+
const maxLabel = Math.max(0, ...this.rows.map((r) => r.length));
|
|
121
|
+
const left = clamp(maxLabel * 7 + 16, 40, 140);
|
|
122
|
+
const innerW = Math.max(this._width - left - MARGIN.right, 1);
|
|
123
|
+
const innerH = Math.max(this.height - MARGIN.top - MARGIN.bottom, 1);
|
|
124
|
+
return {
|
|
125
|
+
left,
|
|
126
|
+
cellW: innerW / Math.max(this.columns.length, 1),
|
|
127
|
+
cellH: innerH / Math.max(this.rows.length, 1),
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
private _describe(ref: HeatCellRef) {
|
|
132
|
+
return {
|
|
133
|
+
row: ref.row,
|
|
134
|
+
col: ref.col,
|
|
135
|
+
rowLabel: this.rows[ref.row],
|
|
136
|
+
columnLabel: this.columns[ref.col],
|
|
137
|
+
value: this._value(ref),
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
private _setActive(ref: HeatCellRef | null) {
|
|
142
|
+
if (this._same(ref, this._active)) return;
|
|
143
|
+
this._active = ref;
|
|
144
|
+
if (!ref) {
|
|
145
|
+
this.hideTooltip();
|
|
146
|
+
this.emit("st-chart-leave", {});
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const {left, cellW, cellH} = this._layout();
|
|
150
|
+
const d = this._describe(ref);
|
|
151
|
+
const value = d.value === null ? "No data" : this.fmt(d.value);
|
|
152
|
+
this.showTooltip(
|
|
153
|
+
{
|
|
154
|
+
x: left + (ref.col + 0.5) * cellW,
|
|
155
|
+
y: MARGIN.top + ref.row * cellH,
|
|
156
|
+
title: `${d.rowLabel} · ${d.columnLabel}`,
|
|
157
|
+
rows: [{label: "Value", value}],
|
|
158
|
+
},
|
|
159
|
+
`${d.rowLabel}, ${d.columnLabel}: ${value}`,
|
|
160
|
+
);
|
|
161
|
+
this.emit("st-chart-hover", d);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
private _select(ref: HeatCellRef) {
|
|
165
|
+
if (!this.selectable) return;
|
|
166
|
+
this.selected = this._same(this.selected, ref) ? null : {...ref};
|
|
167
|
+
this.emit("st-chart-select", {...this._describe(ref), selected: this.selected !== null});
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
private _onKeydown(e: KeyboardEvent) {
|
|
171
|
+
if (e.key === "Escape") return this._setActive(null);
|
|
172
|
+
if ((e.key === "Enter" || e.key === " ") && this._active) {
|
|
173
|
+
e.preventDefault();
|
|
174
|
+
return this._select(this._active);
|
|
175
|
+
}
|
|
176
|
+
const cur = this._active ?? {row: 0, col: -1};
|
|
177
|
+
const rows = this.rows.length;
|
|
178
|
+
const cols = this.columns.length;
|
|
179
|
+
if (!rows || !cols) return;
|
|
180
|
+
let {row, col} = cur;
|
|
181
|
+
switch (e.key) {
|
|
182
|
+
case "ArrowRight": col = Math.min(col + 1, cols - 1); break;
|
|
183
|
+
case "ArrowLeft": col = Math.max(col - 1, 0); break;
|
|
184
|
+
case "ArrowDown": row = Math.min(row + 1, rows - 1); col = Math.max(col, 0); break;
|
|
185
|
+
case "ArrowUp": row = Math.max(row - 1, 0); col = Math.max(col, 0); break;
|
|
186
|
+
case "Home": col = 0; break;
|
|
187
|
+
case "End": col = cols - 1; break;
|
|
188
|
+
default: return;
|
|
189
|
+
}
|
|
190
|
+
e.preventDefault();
|
|
191
|
+
this._setActive({row, col});
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
private _renderPlot() {
|
|
195
|
+
const {left, cellW, cellH} = this._layout();
|
|
196
|
+
const [lo, hi] = this._range;
|
|
197
|
+
const emphasis = this._active ?? this.selected;
|
|
198
|
+
return svg`
|
|
199
|
+
<svg width=${this._width} height=${this.height} aria-hidden="true">
|
|
200
|
+
${this.columns.map(
|
|
201
|
+
(c, i) => svg`<text class="tick" x=${left + (i + 0.5) * cellW} y=${MARGIN.top - 10} text-anchor="middle">${c}</text>`,
|
|
202
|
+
)}
|
|
203
|
+
${this.rows.map(
|
|
204
|
+
(r, i) => svg`<text class="tick" x=${left - 8} y=${MARGIN.top + (i + 0.5) * cellH} text-anchor="end" dominant-baseline="middle">${r}</text>`,
|
|
205
|
+
)}
|
|
206
|
+
${this.rows.map((_, row) =>
|
|
207
|
+
this.columns.map((_, col) => {
|
|
208
|
+
const ref = {row, col};
|
|
209
|
+
const value = this._value(ref);
|
|
210
|
+
const t = value === null ? 0 : normalize(value, lo, hi);
|
|
211
|
+
const pct = Math.round(t * 100);
|
|
212
|
+
const x = left + col * cellW;
|
|
213
|
+
const y = MARGIN.top + row * cellH;
|
|
214
|
+
const classes = [
|
|
215
|
+
"cell",
|
|
216
|
+
value === null ? "empty" : "",
|
|
217
|
+
this._same(this._active, ref) ? "active" : "",
|
|
218
|
+
this._same(this.selected, ref) ? "chosen" : "",
|
|
219
|
+
].join(" ");
|
|
220
|
+
const label =
|
|
221
|
+
this.showValues && value !== null && cellW > 36 && cellH > 20
|
|
222
|
+
? svg`<text class="cell-text" x=${x + cellW / 2} y=${y + cellH / 2} text-anchor="middle" dominant-baseline="middle"
|
|
223
|
+
style="fill:${pct > 55 ? "var(--_on-ramp)" : "var(--st-color-text)"}">${this.fmtAxis(value)}</text>`
|
|
224
|
+
: nothing;
|
|
225
|
+
return svg`
|
|
226
|
+
<rect
|
|
227
|
+
class=${classes}
|
|
228
|
+
x=${x} y=${y} width=${cellW} height=${cellH} rx="3"
|
|
229
|
+
style=${value === null ? "" : `fill:color-mix(in srgb, var(--_ramp) ${pct}%, var(--st-color-surface-muted))`}
|
|
230
|
+
opacity=${emphasis && !this._same(emphasis, ref) && value !== null ? 0.7 : 1}
|
|
231
|
+
@pointerenter=${() => this._setActive(ref)}
|
|
232
|
+
@pointerleave=${() => this._setActive(null)}
|
|
233
|
+
@click=${() => this._select(ref)}
|
|
234
|
+
></rect>
|
|
235
|
+
${label}
|
|
236
|
+
`;
|
|
237
|
+
}),
|
|
238
|
+
)}
|
|
239
|
+
</svg>
|
|
240
|
+
`;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
render() {
|
|
244
|
+
const [lo, hi] = this._range;
|
|
245
|
+
return html`
|
|
246
|
+
<div class="chart">
|
|
247
|
+
${this._width > 0
|
|
248
|
+
? html`
|
|
249
|
+
<div
|
|
250
|
+
class="plot"
|
|
251
|
+
tabindex="0"
|
|
252
|
+
role="group"
|
|
253
|
+
aria-roledescription="heat map"
|
|
254
|
+
aria-label=${this.label || "Heat map"}
|
|
255
|
+
@keydown=${this._onKeydown}
|
|
256
|
+
@focus=${() => !this._active && this.rows.length && this.columns.length && this._setActive({row: 0, col: 0})}
|
|
257
|
+
@blur=${() => this._setActive(null)}
|
|
258
|
+
>
|
|
259
|
+
${this._renderPlot()} ${this.renderTooltip()}
|
|
260
|
+
</div>
|
|
261
|
+
`
|
|
262
|
+
: nothing}
|
|
263
|
+
${this.hideLegend
|
|
264
|
+
? nothing
|
|
265
|
+
: html`
|
|
266
|
+
<div class="scale" aria-hidden="true">
|
|
267
|
+
<span>${this.fmtAxis(lo)}</span>
|
|
268
|
+
<span class="scale-bar"></span>
|
|
269
|
+
<span>${this.fmtAxis(hi)}</span>
|
|
270
|
+
</div>
|
|
271
|
+
`}
|
|
272
|
+
${this.renderLiveRegion()}
|
|
273
|
+
${this.renderDataTable(
|
|
274
|
+
["Row", ...this.columns],
|
|
275
|
+
this.rows.map((r, row) => [
|
|
276
|
+
r,
|
|
277
|
+
...this.columns.map((_, col) => {
|
|
278
|
+
const v = this._value({row, col});
|
|
279
|
+
return v === null ? "–" : this.fmt(v);
|
|
280
|
+
}),
|
|
281
|
+
]),
|
|
282
|
+
)}
|
|
283
|
+
</div>
|
|
284
|
+
`;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
declare global {
|
|
289
|
+
interface HTMLElementTagNameMap {
|
|
290
|
+
"st-heat-map": StHeatMap;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import {html, css} from "lit";
|
|
2
|
+
import {customElement, property, state} from "lit/decorators.js";
|
|
3
|
+
import {StSection} from "../section/section.js";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* The opening row of a page: a big title, a short introduction and the main actions. Add a
|
|
7
|
+
* `media` (an image or video) and the row becomes two columns on wide screens, text beside media,
|
|
8
|
+
* stacking on narrow ones.
|
|
9
|
+
*
|
|
10
|
+
* Slots: `eyebrow`, `title`, `lead`, `actions` (buttons), `media` and the default slot for
|
|
11
|
+
* anything extra under the actions (a note, a row of logos).
|
|
12
|
+
* It takes all the row options of `st-section` (tone, space, width, reveal, label).
|
|
13
|
+
*/
|
|
14
|
+
@customElement("st-hero")
|
|
15
|
+
export class StHero extends StSection {
|
|
16
|
+
/** With media, shows it before the text instead of after. */
|
|
17
|
+
@property({type: Boolean, reflect: true}) reverse = false;
|
|
18
|
+
|
|
19
|
+
@state() private _hasMedia = false;
|
|
20
|
+
@state() private _hasActions = false;
|
|
21
|
+
|
|
22
|
+
constructor() {
|
|
23
|
+
super();
|
|
24
|
+
this.space = "lg";
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
static styles = [
|
|
28
|
+
...StSection.styles,
|
|
29
|
+
css`
|
|
30
|
+
.hero {
|
|
31
|
+
display: grid;
|
|
32
|
+
gap: var(--st-spacing-2xl);
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
:host([data-media]) .hero {
|
|
37
|
+
grid-template-columns: minmax(0, 1fr);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
@media (min-width: 60rem) {
|
|
41
|
+
:host([data-media]) .hero {
|
|
42
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
:host([reverse]) .media {
|
|
46
|
+
order: -1;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.text {
|
|
51
|
+
display: grid;
|
|
52
|
+
justify-items: center;
|
|
53
|
+
gap: var(--st-spacing-lg);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host([data-media]) .text {
|
|
57
|
+
justify-items: start;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
:host([data-media]) .header {
|
|
61
|
+
margin-inline: 0;
|
|
62
|
+
text-align: start;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.header {
|
|
66
|
+
margin-bottom: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
::slotted([slot="title"]) {
|
|
70
|
+
font-size: clamp(2rem, 5vw, 3.5rem) !important;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
::slotted([slot="lead"]) {
|
|
74
|
+
font-size: var(--st-font-size-xl);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.actions {
|
|
78
|
+
display: flex;
|
|
79
|
+
flex-wrap: wrap;
|
|
80
|
+
gap: var(--st-spacing-md);
|
|
81
|
+
justify-content: center;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
:host([data-media]) .actions {
|
|
85
|
+
justify-content: flex-start;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.media ::slotted(*) {
|
|
89
|
+
width: 100%;
|
|
90
|
+
border-radius: var(--st-radius-lg);
|
|
91
|
+
}
|
|
92
|
+
`,
|
|
93
|
+
];
|
|
94
|
+
|
|
95
|
+
private _onMediaChange = (e: Event) => {
|
|
96
|
+
this._hasMedia = (e.target as HTMLSlotElement).assignedNodes().length > 0;
|
|
97
|
+
this.toggleAttribute("data-media", this._hasMedia);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
render() {
|
|
101
|
+
return this.frame(
|
|
102
|
+
html`
|
|
103
|
+
<div class="hero">
|
|
104
|
+
<div class="text">
|
|
105
|
+
${this.renderHeader()}
|
|
106
|
+
${this.animateIn(
|
|
107
|
+
html`<div class="actions" ?hidden=${!this._hasActions}>
|
|
108
|
+
<slot
|
|
109
|
+
name="actions"
|
|
110
|
+
@slotchange=${(e: Event) =>
|
|
111
|
+
(this._hasActions = (e.target as HTMLSlotElement).assignedNodes().length > 0)}
|
|
112
|
+
></slot>
|
|
113
|
+
</div>`,
|
|
114
|
+
150,
|
|
115
|
+
)}
|
|
116
|
+
${this.animateIn(html`<slot @slotchange=${this._onItemsChange}></slot>`, 250)}
|
|
117
|
+
</div>
|
|
118
|
+
<div class="media" ?hidden=${!this._hasMedia}>
|
|
119
|
+
${this.animateIn(html`<slot name="media" @slotchange=${this._onMediaChange}></slot>`, 200)}
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
`,
|
|
123
|
+
{header: false, animated: false},
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
declare global {
|
|
129
|
+
interface HTMLElementTagNameMap {
|
|
130
|
+
"st-hero": StHero;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import {svg} from "lit";
|
|
1
|
+
import {svg, type SVGTemplateResult} from "lit";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Stroke-based icon builder. The shared <st-icon> wrapper applies fill + stroke to every
|
|
5
|
+
* path, so line icons reset the fill and use a bold, round stroke on the 640 grid.
|
|
6
|
+
*/
|
|
7
|
+
const line = (body: SVGTemplateResult) =>
|
|
8
|
+
svg`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><g fill="none" stroke="currentColor" stroke-width="48" stroke-linecap="round" stroke-linejoin="round">${body}</g></svg>`;
|
|
2
9
|
|
|
3
10
|
export const iconPaths = {
|
|
4
11
|
"angles-down": {
|
|
@@ -203,6 +210,90 @@ export const iconPaths = {
|
|
|
203
210
|
},
|
|
204
211
|
"wrench": {
|
|
205
212
|
classic: svg`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 640"><!--!Font Awesome Free v7.3.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2026 Fonticons, Inc.--><path d="M541.4 162.6C549 155 561.7 156.9 565.5 166.9C572.3 184.6 576 203.9 576 224C576 312.4 504.4 384 416 384C398.5 384 381.6 381.2 365.8 376L178.9 562.9C150.8 591 105.2 591 77.1 562.9C49 534.8 49 489.2 77.1 461.1L264 274.2C258.8 258.4 256 241.6 256 224C256 135.6 327.6 64 416 64C436.1 64 455.4 67.7 473.1 74.5C483.1 78.3 484.9 91 477.4 98.6L388.7 187.3C385.7 190.3 384 194.4 384 198.6L384 240C384 248.8 391.2 256 400 256L441.4 256C445.6 256 449.7 254.3 452.7 251.3L541.4 162.6z"/></svg>`
|
|
213
|
+
},
|
|
214
|
+
"x": {
|
|
215
|
+
classic: line(svg`<path d="M160 160L480 480M480 160L160 480"/>`)
|
|
216
|
+
},
|
|
217
|
+
"check": {
|
|
218
|
+
classic: line(svg`<path d="M128 336L256 464L512 192"/>`)
|
|
219
|
+
},
|
|
220
|
+
"search": {
|
|
221
|
+
classic: line(svg`<circle cx="280" cy="280" r="176"/><path d="M410 410L530 530"/>`)
|
|
222
|
+
},
|
|
223
|
+
"eye": {
|
|
224
|
+
classic: line(svg`<path d="M64 320C128 200 220 144 320 144C420 144 512 200 576 320C512 440 420 496 320 496C220 496 128 440 64 320Z"/><circle cx="320" cy="320" r="72"/>`)
|
|
225
|
+
},
|
|
226
|
+
"eye-slash": {
|
|
227
|
+
classic: line(svg`<path d="M64 320C128 200 220 144 320 144C420 144 512 200 576 320C512 440 420 496 320 496C220 496 128 440 64 320Z"/><circle cx="320" cy="320" r="72"/><path d="M120 120L520 520"/>`)
|
|
228
|
+
},
|
|
229
|
+
"copy": {
|
|
230
|
+
classic: line(svg`<rect x="216" y="216" width="320" height="320" rx="48"/><path d="M424 216V152A48 48 0 0 0 376 104H152A48 48 0 0 0 104 152V376A48 48 0 0 0 152 424H216"/>`)
|
|
231
|
+
},
|
|
232
|
+
"menu": {
|
|
233
|
+
classic: line(svg`<path d="M112 176H528M112 320H528M112 464H528"/>`)
|
|
234
|
+
},
|
|
235
|
+
"ellipsis": {
|
|
236
|
+
classic: line(svg`<path d="M144 320h.01M320 320h.01M496 320h.01"/>`)
|
|
237
|
+
},
|
|
238
|
+
"filter": {
|
|
239
|
+
classic: line(svg`<path d="M96 128H544L360 336V496L280 544V336Z"/>`)
|
|
240
|
+
},
|
|
241
|
+
"sort-up": {
|
|
242
|
+
classic: line(svg`<path d="M152 512V128M72 208L152 128L232 208M312 160H408M312 288H472M312 416H536"/>`)
|
|
243
|
+
},
|
|
244
|
+
"sort-down": {
|
|
245
|
+
classic: line(svg`<path d="M152 128V512M72 432L152 512L232 432M312 160H536M312 288H472M312 416H408"/>`)
|
|
246
|
+
},
|
|
247
|
+
"sliders": {
|
|
248
|
+
classic: line(svg`<path d="M96 160H544M96 320H544M96 480H544"/><circle cx="224" cy="160" r="48"/><circle cx="416" cy="320" r="48"/><circle cx="288" cy="480" r="48"/>`)
|
|
249
|
+
},
|
|
250
|
+
"calendar-clock": {
|
|
251
|
+
classic: line(svg`<rect x="80" y="112" width="400" height="400" rx="48"/><path d="M80 240H480M184 64V160M376 64V160"/><circle cx="480" cy="456" r="104"/><path d="M480 408V456L512 480"/>`)
|
|
252
|
+
},
|
|
253
|
+
"user": {
|
|
254
|
+
classic: line(svg`<circle cx="320" cy="208" r="96"/><path d="M112 544C112 430 204 352 320 352C436 352 528 430 528 544"/>`)
|
|
255
|
+
},
|
|
256
|
+
"lock": {
|
|
257
|
+
classic: line(svg`<rect x="128" y="288" width="384" height="256" rx="48"/><path d="M208 288V208A112 112 0 0 1 432 208V288M320 400V448"/>`)
|
|
258
|
+
},
|
|
259
|
+
"link": {
|
|
260
|
+
classic: line(svg`<path d="M272 368A96 96 0 0 0 408 368L520 256A96 96 0 0 0 384 120L352 152M368 272A96 96 0 0 0 232 272L120 384A96 96 0 0 0 256 520L288 488"/>`)
|
|
261
|
+
},
|
|
262
|
+
"external-link": {
|
|
263
|
+
classic: line(svg`<path d="M320 128H176A48 48 0 0 0 128 176V464A48 48 0 0 0 176 512H464A48 48 0 0 0 512 464V320M384 96H544V256M544 96L288 352"/>`)
|
|
264
|
+
},
|
|
265
|
+
"bell": {
|
|
266
|
+
classic: line(svg`<path d="M160 448H480C432 400 432 336 432 272A112 112 0 0 0 208 272C208 336 208 400 160 448ZM276 512A48 48 0 0 0 364 512"/>`)
|
|
267
|
+
},
|
|
268
|
+
"server": {
|
|
269
|
+
classic: line(svg`<rect x="96" y="96" width="448" height="176" rx="40"/><rect x="96" y="368" width="448" height="176" rx="40"/><path d="M192 184h.01M192 456h.01"/>`)
|
|
270
|
+
},
|
|
271
|
+
"hard-drive": {
|
|
272
|
+
classic: line(svg`<path d="M96 352L168 160H472L544 352V448A32 32 0 0 1 512 480H128A32 32 0 0 1 96 448ZM96 352H544M456 416h.01"/>`)
|
|
273
|
+
},
|
|
274
|
+
"monitor": {
|
|
275
|
+
classic: line(svg`<rect x="64" y="96" width="512" height="340" rx="40"/><path d="M320 436V540M200 544H440"/>`)
|
|
276
|
+
},
|
|
277
|
+
"loader": {
|
|
278
|
+
classic: line(svg`<path d="M320 96V176M320 464V544M96 320H176M464 320H544M161 161L218 218M422 422L479 479M161 479L218 422M422 218L479 161"/>`)
|
|
279
|
+
},
|
|
280
|
+
"cpu": {
|
|
281
|
+
classic: line(svg`<rect x="160" y="160" width="320" height="320" rx="32"/><rect x="256" y="256" width="128" height="128"/><path d="M256 64V160M384 64V160M256 480V576M384 480V576M64 256H160M64 384H160M480 256H576M480 384H576"/>`)
|
|
282
|
+
},
|
|
283
|
+
"box": {
|
|
284
|
+
classic: line(svg`<path d="M320 64L544 176V400L320 512L96 400V176ZM96 176L320 288L544 176M320 288V512"/>`)
|
|
285
|
+
},
|
|
286
|
+
"minus": {
|
|
287
|
+
classic: line(svg`<path d="M128 320H512"/>`)
|
|
288
|
+
},
|
|
289
|
+
"table": {
|
|
290
|
+
classic: line(svg`<rect x="80" y="112" width="480" height="416" rx="40"/><path d="M80 232H560M80 352H560M240 232V528"/>`)
|
|
291
|
+
},
|
|
292
|
+
"grid": {
|
|
293
|
+
classic: line(svg`<rect x="96" y="96" width="176" height="176" rx="32"/><rect x="368" y="96" width="176" height="176" rx="32"/><rect x="96" y="368" width="176" height="176" rx="32"/><rect x="368" y="368" width="176" height="176" rx="32"/>`)
|
|
294
|
+
},
|
|
295
|
+
"list": {
|
|
296
|
+
classic: line(svg`<path d="M112 160h.01M112 320h.01M112 480h.01M232 160H544M232 320H544M232 480H544"/>`)
|
|
206
297
|
}
|
|
207
298
|
};
|
|
208
299
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { LitElement, html, css } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
2
3
|
import { customElement, property } from 'lit/decorators.js';
|
|
3
4
|
import { iconPaths, IconName } from './icon-paths.js';
|
|
4
5
|
import { resetStyles } from '../../styles/reset.js';
|
|
@@ -9,6 +10,9 @@ export type IconVariant = 'classic' | 'thin';
|
|
|
9
10
|
export class StIcon extends LitElement {
|
|
10
11
|
@property({ type: String }) name: IconName | string = '';
|
|
11
12
|
@property({ type: String }) variant: IconVariant = 'classic';
|
|
13
|
+
|
|
14
|
+
/** Accessible name. When omitted the icon is decorative and hidden from assistive tech. */
|
|
15
|
+
@property({ type: String }) label = '';
|
|
12
16
|
|
|
13
17
|
// Semantic Colors
|
|
14
18
|
@property({ type: String, reflect: true }) color: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'error' | 'info' = 'default';
|
|
@@ -64,7 +68,10 @@ export class StIcon extends LitElement {
|
|
|
64
68
|
|
|
65
69
|
return html`
|
|
66
70
|
<svg
|
|
67
|
-
viewBox="0 0 24 24"
|
|
71
|
+
viewBox="0 0 24 24"
|
|
72
|
+
role=${this.label ? 'img' : 'presentation'}
|
|
73
|
+
aria-label=${ifDefined(this.label || undefined)}
|
|
74
|
+
aria-hidden=${this.label ? 'false' : 'true'}
|
|
68
75
|
xmlns="http://www.w3.org/2000/svg"
|
|
69
76
|
fill="currentColor"
|
|
70
77
|
stroke="currentColor"
|