@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
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sondor-technology/sondor-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"build": "tsc && esbuild ./src/styles/index.css --bundle --outfile=dist/styles/index.css",
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
},
|
|
16
16
|
"./button": {
|
|
17
17
|
"types": "./dist/components/button/button.d.ts",
|
|
18
|
-
"development": "./src/components/button/button.ts",
|
|
19
18
|
"default": "./dist/components/button/button.js"
|
|
20
19
|
},
|
|
21
20
|
"./styles.css": {
|
|
@@ -50,10 +49,6 @@
|
|
|
50
49
|
"types": "./dist/components/switch/switch.d.ts",
|
|
51
50
|
"default": "./dist/components/switch/switch.js"
|
|
52
51
|
},
|
|
53
|
-
"./card": {
|
|
54
|
-
"types": "./dist/components/card/card.d.ts",
|
|
55
|
-
"default": "./dist/components/card/card.js"
|
|
56
|
-
},
|
|
57
52
|
"./alert": {
|
|
58
53
|
"types": "./dist/components/alert/alert.d.ts",
|
|
59
54
|
"default": "./dist/components/alert/alert.js"
|
|
@@ -178,6 +173,10 @@
|
|
|
178
173
|
"types": "./dist/components/toggle-group/toggle-group.d.ts",
|
|
179
174
|
"default": "./dist/components/toggle-group/toggle-group.js"
|
|
180
175
|
},
|
|
176
|
+
"./toggle-button": {
|
|
177
|
+
"types": "./dist/components/toggle-group/toggle-button.d.ts",
|
|
178
|
+
"default": "./dist/components/toggle-group/toggle-button.js"
|
|
179
|
+
},
|
|
181
180
|
"./calendar": {
|
|
182
181
|
"types": "./dist/components/calendar/calendar.d.ts",
|
|
183
182
|
"default": "./dist/components/calendar/calendar.js"
|
|
@@ -201,6 +200,214 @@
|
|
|
201
200
|
"./popover": {
|
|
202
201
|
"types": "./dist/components/popover/popover.d.ts",
|
|
203
202
|
"default": "./dist/components/popover/popover.js"
|
|
203
|
+
},
|
|
204
|
+
"./spinner": {
|
|
205
|
+
"types": "./dist/components/spinner/spinner.d.ts",
|
|
206
|
+
"default": "./dist/components/spinner/spinner.js"
|
|
207
|
+
},
|
|
208
|
+
"./progress": {
|
|
209
|
+
"types": "./dist/components/progress/progress.d.ts",
|
|
210
|
+
"default": "./dist/components/progress/progress.js"
|
|
211
|
+
},
|
|
212
|
+
"./avatar": {
|
|
213
|
+
"types": "./dist/components/avatar/avatar.d.ts",
|
|
214
|
+
"default": "./dist/components/avatar/avatar.js"
|
|
215
|
+
},
|
|
216
|
+
"./pagination": {
|
|
217
|
+
"types": "./dist/components/pagination/pagination.d.ts",
|
|
218
|
+
"default": "./dist/components/pagination/pagination.js"
|
|
219
|
+
},
|
|
220
|
+
"./accordion": {
|
|
221
|
+
"types": "./dist/components/accordion/accordion.d.ts",
|
|
222
|
+
"default": "./dist/components/accordion/accordion.js"
|
|
223
|
+
},
|
|
224
|
+
"./toast": {
|
|
225
|
+
"types": "./dist/components/toast/toast.d.ts",
|
|
226
|
+
"default": "./dist/components/toast/toast.js"
|
|
227
|
+
},
|
|
228
|
+
"./line-chart": {
|
|
229
|
+
"types": "./dist/components/line-chart/line-chart.d.ts",
|
|
230
|
+
"default": "./dist/components/line-chart/line-chart.js"
|
|
231
|
+
},
|
|
232
|
+
"./bar-chart": {
|
|
233
|
+
"types": "./dist/components/bar-chart/bar-chart.d.ts",
|
|
234
|
+
"default": "./dist/components/bar-chart/bar-chart.js"
|
|
235
|
+
},
|
|
236
|
+
"./pie-chart": {
|
|
237
|
+
"types": "./dist/components/pie-chart/pie-chart.d.ts",
|
|
238
|
+
"default": "./dist/components/pie-chart/pie-chart.js"
|
|
239
|
+
},
|
|
240
|
+
"./heat-map": {
|
|
241
|
+
"types": "./dist/components/heat-map/heat-map.d.ts",
|
|
242
|
+
"default": "./dist/components/heat-map/heat-map.js"
|
|
243
|
+
},
|
|
244
|
+
"./sparkline": {
|
|
245
|
+
"types": "./dist/components/sparkline/sparkline.d.ts",
|
|
246
|
+
"default": "./dist/components/sparkline/sparkline.js"
|
|
247
|
+
},
|
|
248
|
+
"./stat-card": {
|
|
249
|
+
"types": "./dist/components/stat-card/stat-card.d.ts",
|
|
250
|
+
"default": "./dist/components/stat-card/stat-card.js"
|
|
251
|
+
},
|
|
252
|
+
"./chart-utils": {
|
|
253
|
+
"types": "./dist/components/chart/chart.utils.d.ts",
|
|
254
|
+
"default": "./dist/components/chart/chart.utils.js"
|
|
255
|
+
},
|
|
256
|
+
"./list": {
|
|
257
|
+
"types": "./dist/components/list/list.d.ts",
|
|
258
|
+
"default": "./dist/components/list/list.js"
|
|
259
|
+
},
|
|
260
|
+
"./list-item": {
|
|
261
|
+
"types": "./dist/components/list/list-item.d.ts",
|
|
262
|
+
"default": "./dist/components/list/list-item.js"
|
|
263
|
+
},
|
|
264
|
+
"./context-menu": {
|
|
265
|
+
"types": "./dist/components/context-menu/context-menu.d.ts",
|
|
266
|
+
"default": "./dist/components/context-menu/context-menu.js"
|
|
267
|
+
},
|
|
268
|
+
"./data-table-utils": {
|
|
269
|
+
"types": "./dist/components/table/data-table.utils.d.ts",
|
|
270
|
+
"default": "./dist/components/table/data-table.utils.js"
|
|
271
|
+
},
|
|
272
|
+
"./reveal": {
|
|
273
|
+
"types": "./dist/components/reveal/reveal.d.ts",
|
|
274
|
+
"default": "./dist/components/reveal/reveal.js"
|
|
275
|
+
},
|
|
276
|
+
"./lazy": {
|
|
277
|
+
"types": "./dist/components/lazy/lazy.d.ts",
|
|
278
|
+
"default": "./dist/components/lazy/lazy.js"
|
|
279
|
+
},
|
|
280
|
+
"./image": {
|
|
281
|
+
"types": "./dist/components/image/image.d.ts",
|
|
282
|
+
"default": "./dist/components/image/image.js"
|
|
283
|
+
},
|
|
284
|
+
"./video-embed": {
|
|
285
|
+
"types": "./dist/components/video-embed/video-embed.d.ts",
|
|
286
|
+
"default": "./dist/components/video-embed/video-embed.js"
|
|
287
|
+
},
|
|
288
|
+
"./container": {
|
|
289
|
+
"types": "./dist/components/container/container.d.ts",
|
|
290
|
+
"default": "./dist/components/container/container.js"
|
|
291
|
+
},
|
|
292
|
+
"./section": {
|
|
293
|
+
"types": "./dist/components/section/section.d.ts",
|
|
294
|
+
"default": "./dist/components/section/section.js"
|
|
295
|
+
},
|
|
296
|
+
"./stack": {
|
|
297
|
+
"types": "./dist/components/stack/stack.d.ts",
|
|
298
|
+
"default": "./dist/components/stack/stack.js"
|
|
299
|
+
},
|
|
300
|
+
"./scroll-progress": {
|
|
301
|
+
"types": "./dist/components/scroll-progress/scroll-progress.d.ts",
|
|
302
|
+
"default": "./dist/components/scroll-progress/scroll-progress.js"
|
|
303
|
+
},
|
|
304
|
+
"./back-to-top": {
|
|
305
|
+
"types": "./dist/components/back-to-top/back-to-top.d.ts",
|
|
306
|
+
"default": "./dist/components/back-to-top/back-to-top.js"
|
|
307
|
+
},
|
|
308
|
+
"./consent": {
|
|
309
|
+
"types": "./dist/components/consent/consent.d.ts",
|
|
310
|
+
"default": "./dist/components/consent/consent.js"
|
|
311
|
+
},
|
|
312
|
+
"./site-header": {
|
|
313
|
+
"types": "./dist/components/site-header/site-header.d.ts",
|
|
314
|
+
"default": "./dist/components/site-header/site-header.js"
|
|
315
|
+
},
|
|
316
|
+
"./hero": {
|
|
317
|
+
"types": "./dist/components/hero/hero.d.ts",
|
|
318
|
+
"default": "./dist/components/hero/hero.js"
|
|
319
|
+
},
|
|
320
|
+
"./feature-grid": {
|
|
321
|
+
"types": "./dist/components/feature-grid/feature-grid.d.ts",
|
|
322
|
+
"default": "./dist/components/feature-grid/feature-grid.js"
|
|
323
|
+
},
|
|
324
|
+
"./feature": {
|
|
325
|
+
"types": "./dist/components/feature-grid/feature.d.ts",
|
|
326
|
+
"default": "./dist/components/feature-grid/feature.js"
|
|
327
|
+
},
|
|
328
|
+
"./split": {
|
|
329
|
+
"types": "./dist/components/split/split.d.ts",
|
|
330
|
+
"default": "./dist/components/split/split.js"
|
|
331
|
+
},
|
|
332
|
+
"./cta": {
|
|
333
|
+
"types": "./dist/components/cta/cta.d.ts",
|
|
334
|
+
"default": "./dist/components/cta/cta.js"
|
|
335
|
+
},
|
|
336
|
+
"./stats": {
|
|
337
|
+
"types": "./dist/components/stats/stats.d.ts",
|
|
338
|
+
"default": "./dist/components/stats/stats.js"
|
|
339
|
+
},
|
|
340
|
+
"./stat": {
|
|
341
|
+
"types": "./dist/components/stats/stat.d.ts",
|
|
342
|
+
"default": "./dist/components/stats/stat.js"
|
|
343
|
+
},
|
|
344
|
+
"./timeline": {
|
|
345
|
+
"types": "./dist/components/timeline/timeline.d.ts",
|
|
346
|
+
"default": "./dist/components/timeline/timeline.js"
|
|
347
|
+
},
|
|
348
|
+
"./timeline-item": {
|
|
349
|
+
"types": "./dist/components/timeline/timeline-item.d.ts",
|
|
350
|
+
"default": "./dist/components/timeline/timeline-item.js"
|
|
351
|
+
},
|
|
352
|
+
"./testimonials": {
|
|
353
|
+
"types": "./dist/components/testimonials/testimonials.d.ts",
|
|
354
|
+
"default": "./dist/components/testimonials/testimonials.js"
|
|
355
|
+
},
|
|
356
|
+
"./testimonial": {
|
|
357
|
+
"types": "./dist/components/testimonials/testimonial.d.ts",
|
|
358
|
+
"default": "./dist/components/testimonials/testimonial.js"
|
|
359
|
+
},
|
|
360
|
+
"./faq": {
|
|
361
|
+
"types": "./dist/components/faq/faq.d.ts",
|
|
362
|
+
"default": "./dist/components/faq/faq.js"
|
|
363
|
+
},
|
|
364
|
+
"./faq-item": {
|
|
365
|
+
"types": "./dist/components/faq/faq-item.d.ts",
|
|
366
|
+
"default": "./dist/components/faq/faq-item.js"
|
|
367
|
+
},
|
|
368
|
+
"./logo-cloud": {
|
|
369
|
+
"types": "./dist/components/logo-cloud/logo-cloud.d.ts",
|
|
370
|
+
"default": "./dist/components/logo-cloud/logo-cloud.js"
|
|
371
|
+
},
|
|
372
|
+
"./pricing": {
|
|
373
|
+
"types": "./dist/components/pricing/pricing.d.ts",
|
|
374
|
+
"default": "./dist/components/pricing/pricing.js"
|
|
375
|
+
},
|
|
376
|
+
"./pricing-tier": {
|
|
377
|
+
"types": "./dist/components/pricing/pricing-tier.d.ts",
|
|
378
|
+
"default": "./dist/components/pricing/pricing-tier.js"
|
|
379
|
+
},
|
|
380
|
+
"./team": {
|
|
381
|
+
"types": "./dist/components/team/team.d.ts",
|
|
382
|
+
"default": "./dist/components/team/team.js"
|
|
383
|
+
},
|
|
384
|
+
"./person": {
|
|
385
|
+
"types": "./dist/components/team/person.d.ts",
|
|
386
|
+
"default": "./dist/components/team/person.js"
|
|
387
|
+
},
|
|
388
|
+
"./contact": {
|
|
389
|
+
"types": "./dist/components/contact/contact.d.ts",
|
|
390
|
+
"default": "./dist/components/contact/contact.js"
|
|
391
|
+
},
|
|
392
|
+
"./post-list": {
|
|
393
|
+
"types": "./dist/components/post-list/post-list.d.ts",
|
|
394
|
+
"default": "./dist/components/post-list/post-list.js"
|
|
395
|
+
},
|
|
396
|
+
"./post-card": {
|
|
397
|
+
"types": "./dist/components/post-list/post-card.d.ts",
|
|
398
|
+
"default": "./dist/components/post-list/post-card.js"
|
|
399
|
+
},
|
|
400
|
+
"./project-grid": {
|
|
401
|
+
"types": "./dist/components/project-grid/project-grid.d.ts",
|
|
402
|
+
"default": "./dist/components/project-grid/project-grid.js"
|
|
403
|
+
},
|
|
404
|
+
"./project-card": {
|
|
405
|
+
"types": "./dist/components/project-grid/project-card.d.ts",
|
|
406
|
+
"default": "./dist/components/project-grid/project-card.js"
|
|
407
|
+
},
|
|
408
|
+
"./series-nav": {
|
|
409
|
+
"types": "./dist/components/series-nav/series-nav.d.ts",
|
|
410
|
+
"default": "./dist/components/series-nav/series-nav.js"
|
|
204
411
|
}
|
|
205
412
|
},
|
|
206
413
|
"sideEffects": [
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export const accordionColors = ["default", "primary", "info", "success", "warning", "error"] as const;
|
|
2
|
+
export type AccordionColor = (typeof accordionColors)[number];
|
|
3
|
+
|
|
4
|
+
export const accordionVariants = ["soft", "solid", "outline"] as const;
|
|
5
|
+
export type AccordionVariant = (typeof accordionVariants)[number];
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
import {LitElement, html, css, nothing, PropertyValues} from "lit";
|
|
2
|
+
import {customElement, property} from "lit/decorators.js";
|
|
3
|
+
import {resetStyles} from "../../styles/reset.js";
|
|
4
|
+
import {AccordionColor, AccordionVariant} from "./accordion.constants.js";
|
|
5
|
+
import "../icon/icon.js";
|
|
6
|
+
|
|
7
|
+
let nextId = 0;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Collapsible section. The header is a disclosure button and the content is a labelled region
|
|
11
|
+
* that animates open and closed (respecting `prefers-reduced-motion`).
|
|
12
|
+
*/
|
|
13
|
+
@customElement("st-accordion")
|
|
14
|
+
export class StAccordion extends LitElement {
|
|
15
|
+
@property({type: String}) heading = "";
|
|
16
|
+
@property({type: Boolean, reflect: true}) open = false;
|
|
17
|
+
/** Accordions sharing the same `group` close each other. */
|
|
18
|
+
@property({type: String}) group = "";
|
|
19
|
+
/** Optional icon name shown before the heading. */
|
|
20
|
+
@property({type: String}) icon = "";
|
|
21
|
+
@property({type: String, reflect: true}) color: AccordionColor = "default";
|
|
22
|
+
@property({type: String, reflect: true}) variant: AccordionVariant = "soft";
|
|
23
|
+
|
|
24
|
+
private readonly _id = `st-accordion-${nextId++}`;
|
|
25
|
+
private _hasUpdated = false;
|
|
26
|
+
|
|
27
|
+
static styles = [
|
|
28
|
+
resetStyles,
|
|
29
|
+
css`
|
|
30
|
+
:host {
|
|
31
|
+
display: block;
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
border: 1px solid var(--_accent);
|
|
34
|
+
border-radius: var(--st-radius-md);
|
|
35
|
+
background: var(--st-color-bg);
|
|
36
|
+
|
|
37
|
+
/* Default (neutral) palette */
|
|
38
|
+
--_accent: var(--st-color-border);
|
|
39
|
+
--_accent-text: var(--st-color-text);
|
|
40
|
+
--_soft-bg: var(--st-color-surface-muted);
|
|
41
|
+
--_on-accent: var(--st-color-text);
|
|
42
|
+
}
|
|
43
|
+
:host([color="primary"]) {
|
|
44
|
+
--_accent: var(--st-color-primary);
|
|
45
|
+
--_accent-text: var(--st-color-primary-text);
|
|
46
|
+
--_soft-bg: var(--st-color-primary-bg);
|
|
47
|
+
--_on-accent: var(--st-color-on-primary);
|
|
48
|
+
}
|
|
49
|
+
:host([color="info"]) {
|
|
50
|
+
--_accent: var(--st-color-info);
|
|
51
|
+
--_accent-text: var(--st-color-info-text);
|
|
52
|
+
--_soft-bg: var(--st-color-info-bg);
|
|
53
|
+
--_on-accent: var(--st-color-on-info);
|
|
54
|
+
}
|
|
55
|
+
:host([color="success"]) {
|
|
56
|
+
--_accent: var(--st-color-success);
|
|
57
|
+
--_accent-text: var(--st-color-success);
|
|
58
|
+
--_soft-bg: var(--st-color-success-bg);
|
|
59
|
+
--_on-accent: var(--st-color-on-success);
|
|
60
|
+
}
|
|
61
|
+
:host([color="warning"]) {
|
|
62
|
+
--_accent: var(--st-color-warning);
|
|
63
|
+
--_accent-text: var(--st-color-warning);
|
|
64
|
+
--_soft-bg: var(--st-color-warning-bg);
|
|
65
|
+
--_on-accent: var(--st-color-on-warning);
|
|
66
|
+
}
|
|
67
|
+
:host([color="error"]) {
|
|
68
|
+
--_accent: var(--st-color-error);
|
|
69
|
+
--_accent-text: var(--st-color-error-text);
|
|
70
|
+
--_soft-bg: var(--st-color-error-bg);
|
|
71
|
+
--_on-accent: var(--st-color-on-danger);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* Header colors per variant */
|
|
75
|
+
.header {
|
|
76
|
+
--_header-bg: var(--_soft-bg);
|
|
77
|
+
--_header-text: var(--_accent-text);
|
|
78
|
+
}
|
|
79
|
+
:host([variant="solid"]) .header {
|
|
80
|
+
--_header-bg: var(--_accent);
|
|
81
|
+
--_header-text: var(--_on-accent);
|
|
82
|
+
}
|
|
83
|
+
:host([variant="solid"][color="default"]) .header {
|
|
84
|
+
--_header-bg: var(--st-color-surface-hover);
|
|
85
|
+
--_header-text: var(--st-color-text);
|
|
86
|
+
}
|
|
87
|
+
:host([variant="outline"]) .header {
|
|
88
|
+
--_header-bg: transparent;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.header {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: var(--st-spacing-sm);
|
|
95
|
+
width: 100%;
|
|
96
|
+
padding: var(--st-spacing-md);
|
|
97
|
+
border: 0;
|
|
98
|
+
background: var(--_header-bg);
|
|
99
|
+
color: var(--_header-text);
|
|
100
|
+
font-weight: var(--st-font-weight-medium);
|
|
101
|
+
text-align: left;
|
|
102
|
+
cursor: pointer;
|
|
103
|
+
}
|
|
104
|
+
.header:hover {
|
|
105
|
+
filter: brightness(var(--st-hover-brightness));
|
|
106
|
+
}
|
|
107
|
+
.header:focus-visible {
|
|
108
|
+
outline: 2px solid var(--st-color-primary);
|
|
109
|
+
outline-offset: -2px;
|
|
110
|
+
}
|
|
111
|
+
.title {
|
|
112
|
+
flex: 1;
|
|
113
|
+
}
|
|
114
|
+
.chevron {
|
|
115
|
+
transition: transform 0.25s ease;
|
|
116
|
+
}
|
|
117
|
+
:host([open]) .chevron {
|
|
118
|
+
transform: rotate(180deg);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* Animated panel: grid rows animate 0fr -> 1fr without measuring heights in JS */
|
|
122
|
+
.panel {
|
|
123
|
+
display: grid;
|
|
124
|
+
grid-template-rows: 0fr;
|
|
125
|
+
visibility: hidden;
|
|
126
|
+
transition:
|
|
127
|
+
grid-template-rows 0.25s ease,
|
|
128
|
+
visibility 0s linear 0.25s;
|
|
129
|
+
}
|
|
130
|
+
:host([open]) .panel {
|
|
131
|
+
grid-template-rows: 1fr;
|
|
132
|
+
visibility: visible;
|
|
133
|
+
transition:
|
|
134
|
+
grid-template-rows 0.25s ease,
|
|
135
|
+
visibility 0s;
|
|
136
|
+
}
|
|
137
|
+
.panel-inner {
|
|
138
|
+
min-height: 0;
|
|
139
|
+
overflow: hidden;
|
|
140
|
+
}
|
|
141
|
+
/* Distinct content surface so it never blends with the header */
|
|
142
|
+
.content {
|
|
143
|
+
padding: var(--st-spacing-md);
|
|
144
|
+
background: var(--st-color-bg);
|
|
145
|
+
color: var(--st-color-text);
|
|
146
|
+
border-top: 1px solid var(--_accent);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@media (prefers-reduced-motion: reduce) {
|
|
150
|
+
.chevron,
|
|
151
|
+
.panel,
|
|
152
|
+
:host([open]) .panel {
|
|
153
|
+
transition: none;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
`,
|
|
157
|
+
];
|
|
158
|
+
|
|
159
|
+
protected updated(changed: PropertyValues<this>) {
|
|
160
|
+
if (changed.has("open") && this._hasUpdated) {
|
|
161
|
+
this.dispatchEvent(
|
|
162
|
+
new CustomEvent("st-toggle", {detail: {open: this.open}, bubbles: true, composed: true}),
|
|
163
|
+
);
|
|
164
|
+
if (this.open && this.group) this._closeGroupSiblings();
|
|
165
|
+
}
|
|
166
|
+
this._hasUpdated = true;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
private _closeGroupSiblings() {
|
|
170
|
+
const root = this.getRootNode() as Document | ShadowRoot;
|
|
171
|
+
root
|
|
172
|
+
.querySelectorAll<StAccordion>(`st-accordion[group="${CSS.escape(this.group)}"]`)
|
|
173
|
+
.forEach((el) => {
|
|
174
|
+
if (el !== this) el.open = false;
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
render() {
|
|
179
|
+
const headerId = `${this._id}-header`;
|
|
180
|
+
const panelId = `${this._id}-panel`;
|
|
181
|
+
return html`
|
|
182
|
+
<button
|
|
183
|
+
class="header"
|
|
184
|
+
id=${headerId}
|
|
185
|
+
type="button"
|
|
186
|
+
aria-expanded=${this.open ? "true" : "false"}
|
|
187
|
+
aria-controls=${panelId}
|
|
188
|
+
@click=${() => (this.open = !this.open)}
|
|
189
|
+
>
|
|
190
|
+
${this.icon
|
|
191
|
+
? html`<st-icon name=${this.icon} size="sm" aria-hidden="true"></st-icon>`
|
|
192
|
+
: nothing}
|
|
193
|
+
<span class="title">${this.heading}</span>
|
|
194
|
+
<st-icon class="chevron" name="angle-down" size="sm" aria-hidden="true"></st-icon>
|
|
195
|
+
</button>
|
|
196
|
+
<div class="panel" id=${panelId} role="region" aria-labelledby=${headerId}>
|
|
197
|
+
<div class="panel-inner">
|
|
198
|
+
<div class="content"><slot></slot></div>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
`;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
declare global {
|
|
206
|
+
interface HTMLElementTagNameMap {
|
|
207
|
+
"st-accordion": StAccordion;
|
|
208
|
+
}
|
|
209
|
+
}
|