@mcp-b/web-components 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +49 -0
- package/dist/accordion-B1Q3kuP_.d.ts +373 -0
- package/dist/accordion-item-DvPfhpm8.js +307 -0
- package/dist/accordion-item-bPRIahNn.d.ts +63 -0
- package/dist/accordion-zDr-Br4V.js +483 -0
- package/dist/action-bar-CYsjmhwP.d.ts +29 -0
- package/dist/action-bar-CjN_UcnP.js +56 -0
- package/dist/alert-dialog-4CnO3Nb5.d.ts +60 -0
- package/dist/alert-dialog-D25Oi_TS.js +126 -0
- package/dist/avatar-Bje_KpZo.d.ts +141 -0
- package/dist/avatar-CRP0kW3x.js +224 -0
- package/dist/badge-Ct95U4UO.js +301 -0
- package/dist/badge-D1DNQrWn.d.ts +106 -0
- package/dist/breadcrumb-BxZ-nQE5.d.ts +365 -0
- package/dist/breadcrumb-item-BC454oQe.d.ts +59 -0
- package/dist/breadcrumb-item-P5pdq_gE.js +151 -0
- package/dist/breadcrumb-uURhiqWJ.js +384 -0
- package/dist/button-5k_aL_gD.js +802 -0
- package/dist/button-BQofnUt4.d.ts +354 -0
- package/dist/button-group-BydvJTQy.js +197 -0
- package/dist/button-group-COodHeuB.d.ts +155 -0
- package/dist/callout-B8zTf8Go.js +188 -0
- package/dist/callout-DFwPao36.d.ts +103 -0
- package/dist/card-BYDzdMAU.d.ts +177 -0
- package/dist/card-DIg1-X2G.js +332 -0
- package/dist/carousel-Bktu7wrD.js +843 -0
- package/dist/carousel-DQITCtEY.d.ts +423 -0
- package/dist/carousel-item-B5-X31Ha.js +79 -0
- package/dist/carousel-item-BB3jL2tk.d.ts +34 -0
- package/dist/cdn/loader.js +530 -0
- package/dist/checkbox-D6r7PVPj.js +641 -0
- package/dist/checkbox-DoFcDEKB.d.ts +354 -0
- package/dist/checkbox-group-CLvNAO_F.js +201 -0
- package/dist/checkbox-group-Cnh8rAn4.d.ts +152 -0
- package/dist/color-input-Bky89xg_.d.ts +470 -0
- package/dist/color-input-DPIxi9wR.js +894 -0
- package/dist/color-picker-adwOmtRl.js +1240 -0
- package/dist/color-picker-wQw8bPsq.d.ts +360 -0
- package/dist/combobox-B6al50UG.js +1693 -0
- package/dist/combobox-item-D2H1CMxC.d.ts +714 -0
- package/dist/combobox-item-yM6tDrGG.js +225 -0
- package/dist/comparison-B1-nMwmp.d.ts +134 -0
- package/dist/comparison-CyqKrCN-.js +435 -0
- package/dist/components/accordion/accordion.d.ts +2 -0
- package/dist/components/accordion/accordion.js +2 -0
- package/dist/components/accordion-item/accordion-item.d.ts +2 -0
- package/dist/components/accordion-item/accordion-item.js +2 -0
- package/dist/components/action-bar/action-bar.d.ts +2 -0
- package/dist/components/action-bar/action-bar.js +2 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog.js +2 -0
- package/dist/components/avatar/avatar.d.ts +2 -0
- package/dist/components/avatar/avatar.js +2 -0
- package/dist/components/badge/badge.d.ts +2 -0
- package/dist/components/badge/badge.js +2 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.js +2 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +2 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.js +2 -0
- package/dist/components/button/button.d.ts +2 -0
- package/dist/components/button/button.js +2 -0
- package/dist/components/button-group/button-group.d.ts +2 -0
- package/dist/components/button-group/button-group.js +2 -0
- package/dist/components/callout/callout.d.ts +2 -0
- package/dist/components/callout/callout.js +2 -0
- package/dist/components/card/card.d.ts +2 -0
- package/dist/components/card/card.js +2 -0
- package/dist/components/carousel/carousel.d.ts +2 -0
- package/dist/components/carousel/carousel.js +2 -0
- package/dist/components/carousel-item/carousel-item.d.ts +2 -0
- package/dist/components/carousel-item/carousel-item.js +2 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.js +2 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.js +2 -0
- package/dist/components/color-input/color-input.d.ts +2 -0
- package/dist/components/color-input/color-input.js +2 -0
- package/dist/components/color-picker/color-picker.d.ts +2 -0
- package/dist/components/color-picker/color-picker.js +2 -0
- package/dist/components/combobox/combobox.d.ts +2 -0
- package/dist/components/combobox/combobox.js +2 -0
- package/dist/components/combobox-item/combobox-item.d.ts +2 -0
- package/dist/components/combobox-item/combobox-item.js +2 -0
- package/dist/components/comparison/comparison.d.ts +2 -0
- package/dist/components/comparison/comparison.js +2 -0
- package/dist/components/copy/copy.d.ts +2 -0
- package/dist/components/copy/copy.js +291 -0
- package/dist/components/data-table/data-table.d.ts +2 -0
- package/dist/components/data-table/data-table.js +2 -0
- package/dist/components/date/date.d.ts +2 -0
- package/dist/components/date/date.js +2 -0
- package/dist/components/dialog/dialog.d.ts +2 -0
- package/dist/components/dialog/dialog.js +2 -0
- package/dist/components/divider/divider.d.ts +2 -0
- package/dist/components/divider/divider.js +2 -0
- package/dist/components/dropdown/dropdown.d.ts +2 -0
- package/dist/components/dropdown/dropdown.js +2 -0
- package/dist/components/dropdown-item/dropdown-item.d.ts +2 -0
- package/dist/components/dropdown-item/dropdown-item.js +2 -0
- package/dist/components/empty-result/empty-result.d.ts +2 -0
- package/dist/components/empty-result/empty-result.js +2 -0
- package/dist/components/empty-state/empty-state.d.ts +2 -0
- package/dist/components/empty-state/empty-state.js +2 -0
- package/dist/components/expander/expander.d.ts +2 -0
- package/dist/components/expander/expander.js +2 -0
- package/dist/components/field/field.d.ts +2 -0
- package/dist/components/field/field.js +2 -0
- package/dist/components/file-input/file-input.d.ts +2 -0
- package/dist/components/file-input/file-input.js +2 -0
- package/dist/components/filter-bar/filter-bar.d.ts +2 -0
- package/dist/components/filter-bar/filter-bar.js +2 -0
- package/dist/components/form-section/form-section.d.ts +2 -0
- package/dist/components/form-section/form-section.js +2 -0
- package/dist/components/icon/icon.d.ts +2 -0
- package/dist/components/icon/icon.js +2 -0
- package/dist/components/include/include.d.ts +2 -0
- package/dist/components/include/include.js +2 -0
- package/dist/components/index.d.ts +85 -0
- package/dist/components/index.js +86 -0
- package/dist/components/infinite-scroller/infinite-scroller.d.ts +2 -0
- package/dist/components/infinite-scroller/infinite-scroller.js +2 -0
- package/dist/components/intersection-observer/intersection-observer.d.ts +2 -0
- package/dist/components/intersection-observer/intersection-observer.js +2 -0
- package/dist/components/listbox/listbox.d.ts +2 -0
- package/dist/components/listbox/listbox.js +2 -0
- package/dist/components/listbox-item/listbox-item.d.ts +2 -0
- package/dist/components/listbox-item/listbox-item.js +2 -0
- package/dist/components/lorem-ipsum/lorem-ipsum.d.ts +2 -0
- package/dist/components/lorem-ipsum/lorem-ipsum.js +2 -0
- package/dist/components/meter/meter.d.ts +2 -0
- package/dist/components/meter/meter.js +2 -0
- package/dist/components/metric/metric.d.ts +2 -0
- package/dist/components/metric/metric.js +2 -0
- package/dist/components/metric-grid/metric-grid.d.ts +2 -0
- package/dist/components/metric-grid/metric-grid.js +2 -0
- package/dist/components/mutation-observer/mutation-observer.d.ts +2 -0
- package/dist/components/mutation-observer/mutation-observer.js +2 -0
- package/dist/components/navicon/navicon.d.ts +2 -0
- package/dist/components/navicon/navicon.js +2 -0
- package/dist/components/number/number.d.ts +2 -0
- package/dist/components/number/number.js +2 -0
- package/dist/components/number-field/number-field.d.ts +2 -0
- package/dist/components/number-field/number-field.js +2 -0
- package/dist/components/pagination/pagination.d.ts +2 -0
- package/dist/components/pagination/pagination.js +2 -0
- package/dist/components/popover/popover.d.ts +2 -0
- package/dist/components/popover/popover.js +2 -0
- package/dist/components/preview-card/preview-card.d.ts +2 -0
- package/dist/components/preview-card/preview-card.js +2 -0
- package/dist/components/progress/progress.d.ts +2 -0
- package/dist/components/progress/progress.js +2 -0
- package/dist/components/radio/radio.d.ts +2 -0
- package/dist/components/radio/radio.js +2 -0
- package/dist/components/radio-item/radio-item.d.ts +2 -0
- package/dist/components/radio-item/radio-item.js +2 -0
- package/dist/components/random-content/random-content.d.ts +2 -0
- package/dist/components/random-content/random-content.js +2 -0
- package/dist/components/rating/rating.d.ts +2 -0
- package/dist/components/rating/rating.js +2 -0
- package/dist/components/resize-observer/resize-observer.d.ts +2 -0
- package/dist/components/resize-observer/resize-observer.js +2 -0
- package/dist/components/scroll-area/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.js +2 -0
- package/dist/components/scroller/scroller.d.ts +2 -0
- package/dist/components/scroller/scroller.js +2 -0
- package/dist/components/search-list/search-list.d.ts +2 -0
- package/dist/components/search-list/search-list.js +2 -0
- package/dist/components/select/select.d.ts +2 -0
- package/dist/components/select/select.js +2 -0
- package/dist/components/selection-summary/selection-summary.d.ts +2 -0
- package/dist/components/selection-summary/selection-summary.js +2 -0
- package/dist/components/share/share.d.ts +2 -0
- package/dist/components/share/share.js +2 -0
- package/dist/components/slide-activator/slide-activator.d.ts +2 -0
- package/dist/components/slide-activator/slide-activator.js +2 -0
- package/dist/components/slider/slider.d.ts +2 -0
- package/dist/components/slider/slider.js +2 -0
- package/dist/components/sparkline/sparkline.d.ts +2 -0
- package/dist/components/sparkline/sparkline.js +2 -0
- package/dist/components/spinner/spinner.d.ts +2 -0
- package/dist/components/spinner/spinner.js +2 -0
- package/dist/components/splitter/splitter.d.ts +2 -0
- package/dist/components/splitter/splitter.js +2 -0
- package/dist/components/switch/switch.d.ts +2 -0
- package/dist/components/switch/switch.js +2 -0
- package/dist/components/tab/tab.d.ts +2 -0
- package/dist/components/tab/tab.js +2 -0
- package/dist/components/tab-list/tab-list.d.ts +2 -0
- package/dist/components/tab-list/tab-list.js +2 -0
- package/dist/components/tab-panel/tab-panel.d.ts +2 -0
- package/dist/components/tab-panel/tab-panel.js +2 -0
- package/dist/components/text-area/text-area.d.ts +2 -0
- package/dist/components/text-area/text-area.js +2 -0
- package/dist/components/text-field/text-field.d.ts +2 -0
- package/dist/components/text-field/text-field.js +2 -0
- package/dist/components/text-mask/text-mask.d.ts +2 -0
- package/dist/components/text-mask/text-mask.js +2 -0
- package/dist/components/timed-content/timed-content.d.ts +2 -0
- package/dist/components/timed-content/timed-content.js +2 -0
- package/dist/components/toast/toast.d.ts +2 -0
- package/dist/components/toast/toast.js +2 -0
- package/dist/components/toast-item/toast-item.d.ts +2 -0
- package/dist/components/toast-item/toast-item.js +2 -0
- package/dist/components/toggle-icon/toggle-icon.d.ts +2 -0
- package/dist/components/toggle-icon/toggle-icon.js +2 -0
- package/dist/components/toggle-tag/toggle-tag.d.ts +2 -0
- package/dist/components/toggle-tag/toggle-tag.js +2 -0
- package/dist/components/toolbar/toolbar.d.ts +2 -0
- package/dist/components/toolbar/toolbar.js +2 -0
- package/dist/components/tooltip/tooltip.d.ts +2 -0
- package/dist/components/tooltip/tooltip.js +2 -0
- package/dist/components/transition-group/transition-group.d.ts +2 -0
- package/dist/components/transition-group/transition-group.js +2 -0
- package/dist/components/zoomable-frame/zoomable-frame.d.ts +2 -0
- package/dist/components/zoomable-frame/zoomable-frame.js +2 -0
- package/dist/copy-CvC9vaGw.d.ts +206 -0
- package/dist/copy.styles-DWGvGNTP.js +100 -0
- package/dist/data-table-CITa8DSn.js +247 -0
- package/dist/data-table-DL5RhE0d.d.ts +89 -0
- package/dist/date-CJPmOdi9.js +146 -0
- package/dist/date-DtaTBM71.d.ts +142 -0
- package/dist/decorate-DcF3lt7P.js +9 -0
- package/dist/dialog-Cx46HMaZ.js +983 -0
- package/dist/dialog-N-v0woIy.d.ts +414 -0
- package/dist/divider-9vNsfHW8.js +169 -0
- package/dist/divider-DWuAxcXv.d.ts +79 -0
- package/dist/docs/custom-elements.json +29301 -0
- package/dist/dropdown-BXSKpVX9.js +1123 -0
- package/dist/dropdown-Bo00Vlr5.d.ts +537 -0
- package/dist/dropdown-item-_lIs-Tfd.d.ts +111 -0
- package/dist/dropdown-item-i77cRuN6.js +504 -0
- package/dist/empty-result-B2ln1yFL.js +65 -0
- package/dist/empty-result-B54x_Ab2.d.ts +31 -0
- package/dist/empty-state-BLWjtKUo.js +186 -0
- package/dist/empty-state-SGKjpwp3.d.ts +117 -0
- package/dist/expander-BUev0BmM.d.ts +174 -0
- package/dist/expander-Bwvxj6Oa.js +342 -0
- package/dist/field-BEyS909F.js +163 -0
- package/dist/field-ITx0jVw-.d.ts +69 -0
- package/dist/file-input-BEumLJjg.js +841 -0
- package/dist/file-input-D2D6YC0B.d.ts +378 -0
- package/dist/filter-bar-Bj2QzEn9.d.ts +35 -0
- package/dist/filter-bar-Dcs67aXo.js +66 -0
- package/dist/form-section-BchPetkj.js +83 -0
- package/dist/form-section-xFBTBULQ.d.ts +34 -0
- package/dist/icon-BPVkNsY4.js +165 -0
- package/dist/icon-Ci9CPZJV.d.ts +72 -0
- package/dist/icon-library-D_if7p2h.d.ts +2 -0
- package/dist/include-CQHVVtNs.d.ts +103 -0
- package/dist/include-qNUh_6kT.js +155 -0
- package/dist/index.d.ts +89 -0
- package/dist/index.js +92 -0
- package/dist/infinite-scroller-BmmtnWNt.js +285 -0
- package/dist/infinite-scroller-CuUEAlB9.d.ts +174 -0
- package/dist/intersection-observer-B6TciOAQ.js +503 -0
- package/dist/intersection-observer-B7nmP7Zz.d.ts +418 -0
- package/dist/listbox-C3XXRWGX.js +1257 -0
- package/dist/listbox-DD4ujIJe.d.ts +682 -0
- package/dist/listbox-item-CwD9s3VY.js +135 -0
- package/dist/listbox-item-DQEJWp4Z.d.ts +53 -0
- package/dist/localize-322EtXNX.d.ts +66 -0
- package/dist/lorem-ipsum-B2x3V-v8.js +198 -0
- package/dist/lorem-ipsum-CR82CSuJ.d.ts +130 -0
- package/dist/meter-BC7uaJWf.d.ts +73 -0
- package/dist/meter-BIDyjwFp.js +155 -0
- package/dist/metric-CjlLq_VA.d.ts +36 -0
- package/dist/metric-DbuOcDp_.js +86 -0
- package/dist/metric-grid-C2Pb0Zl3.js +37 -0
- package/dist/metric-grid-C5Xbb1_0.d.ts +27 -0
- package/dist/mutation-observer-BmrZ-GER.d.ts +326 -0
- package/dist/mutation-observer-DS8EBuOp.js +388 -0
- package/dist/navicon-Dic5Qjzb.d.ts +159 -0
- package/dist/navicon-_yMHY27-.js +486 -0
- package/dist/number-BNtNXNF3.js +162 -0
- package/dist/number-BwbnErlB.d.ts +143 -0
- package/dist/number-field-BQHB7UYo.js +726 -0
- package/dist/number-field-odk4lKXM.d.ts +422 -0
- package/dist/pagination-6z2qcf3U.d.ts +322 -0
- package/dist/pagination-DuKPuzdb.js +679 -0
- package/dist/popover-D0sxTU6o.d.ts +259 -0
- package/dist/popover-DJBrJ0za.js +556 -0
- package/dist/preview-card-C7H1FPfd.js +287 -0
- package/dist/preview-card-DitOCZTD.d.ts +86 -0
- package/dist/progress-Db0_axHQ.d.ts +181 -0
- package/dist/progress-DzVk260j.js +494 -0
- package/dist/radio-BtDG9xJM.js +658 -0
- package/dist/radio-CieMa4zU.d.ts +460 -0
- package/dist/radio-item-DIrUStAX.js +264 -0
- package/dist/radio-item-Xq2U3cMu.d.ts +69 -0
- package/dist/random-content-BhSeJFKz.d.ts +380 -0
- package/dist/random-content-BwiirXdG.js +450 -0
- package/dist/rating-4xNsWumY.d.ts +369 -0
- package/dist/rating-C1BcJDIO.js +722 -0
- package/dist/resize-observer-BseSbVWP.d.ts +187 -0
- package/dist/resize-observer-DcrLhddo.js +236 -0
- package/dist/scroll-area-COc1857S.js +127 -0
- package/dist/scroll-area-CVYDf5qY.d.ts +61 -0
- package/dist/scroller-LYgBVyfY.js +590 -0
- package/dist/scroller-bB2rGs7b.d.ts +374 -0
- package/dist/search-list-Clmrg8EV.js +884 -0
- package/dist/search-list-n0GYO7rh.d.ts +777 -0
- package/dist/select-CkZK2jJn.d.ts +506 -0
- package/dist/select-DLIaRnA4.js +690 -0
- package/dist/selection-summary-BVnNJ8Lw.js +48 -0
- package/dist/selection-summary-DmFkGyZI.d.ts +34 -0
- package/dist/share-DPlqP2dc.d.ts +162 -0
- package/dist/share-bsgXZCl7.js +250 -0
- package/dist/sigvelo.d.ts +5 -0
- package/dist/sigvelo.js +5 -0
- package/dist/sigvelo.loader.d.ts +3 -0
- package/dist/sigvelo.loader.js +102 -0
- package/dist/slide-activator-D7bBz69E.d.ts +429 -0
- package/dist/slide-activator-DlxQt9R9.js +798 -0
- package/dist/slider-B0FVsV1o.d.ts +921 -0
- package/dist/slider-B90Il7x3.js +1744 -0
- package/dist/sparkline-CcpTaJ_Z.js +358 -0
- package/dist/sparkline-DlCIt81-.d.ts +235 -0
- package/dist/spinner-C04Dmc0H.js +188 -0
- package/dist/spinner-CZ19x_dC.d.ts +99 -0
- package/dist/splitter-DBDJAzsp.d.ts +325 -0
- package/dist/splitter-MnD4In9H.js +638 -0
- package/dist/switch-CPaEKbog.js +581 -0
- package/dist/switch-Cief9M59.d.ts +248 -0
- package/dist/tab-BcqYGsuW.d.ts +44 -0
- package/dist/tab-C-FtuNmh.js +102 -0
- package/dist/tab-list-B_Ye_Oj9.js +691 -0
- package/dist/tab-list-DDvS8qHr.d.ts +450 -0
- package/dist/tab-panel-BaBl6eep.js +60 -0
- package/dist/tab-panel-BzSJlSfd.d.ts +38 -0
- package/dist/text-area-B_mjCE9W.d.ts +327 -0
- package/dist/text-area-Czixaz-_.js +556 -0
- package/dist/text-field-BClWMp6q.d.ts +424 -0
- package/dist/text-field-inpJfp0A.js +687 -0
- package/dist/text-mask-CNKVKSFp.d.ts +336 -0
- package/dist/text-mask-DDEurj90.js +370 -0
- package/dist/themes/sigvelo.css +10 -0
- package/dist/themes/utilities.css +9 -0
- package/dist/timed-content-D2mGFamc.d.ts +181 -0
- package/dist/timed-content-pvEP4l5V.js +226 -0
- package/dist/toast-BnZaIg6Z.js +636 -0
- package/dist/toast-cEBVK9NQ.d.ts +487 -0
- package/dist/toast-item-BPpJT6vD.d.ts +159 -0
- package/dist/toast-item-IS8IFUEg.js +372 -0
- package/dist/toggle-icon-4oLDeEt4.js +752 -0
- package/dist/toggle-icon-DlwMMWZL.d.ts +359 -0
- package/dist/toggle-tag-1sfTFJtg.js +434 -0
- package/dist/toggle-tag-IVvMGT4R.d.ts +245 -0
- package/dist/toolbar-CABq0ZL1.d.ts +122 -0
- package/dist/toolbar-CEZ0-F-X.js +196 -0
- package/dist/tooltip-DbyoPFNe.js +521 -0
- package/dist/tooltip-ahFthek8.d.ts +192 -0
- package/dist/transition-group-3hnAnwSd.js +801 -0
- package/dist/transition-group-DD_CjSNC.d.ts +608 -0
- package/dist/translations/en.d.ts +6 -0
- package/dist/translations/en.js +75 -0
- package/dist/translations/es.d.ts +6 -0
- package/dist/translations/es.js +75 -0
- package/dist/types/custom-element-jsx.d.ts +13723 -0
- package/dist/utilities/icon-library.d.ts +3 -0
- package/dist/utilities/icon-library.js +93 -0
- package/dist/utilities/localize.d.ts +2 -0
- package/dist/utilities/localize.js +6 -0
- package/dist/zoomable-frame-Cldvj5sE.js +398 -0
- package/dist/zoomable-frame-r6S6587z.d.ts +162 -0
- package/package.json +83 -0
|
@@ -0,0 +1,450 @@
|
|
|
1
|
+
import { CSSResultGroup, PropertyValues } from "lit";
|
|
2
|
+
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tab-list/tab-list.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* <sigvelo-tab-list>
|
|
7
|
+
*
|
|
8
|
+
* @summary Allows users to switch between different sections of content without leaving the page, providing a clean and
|
|
9
|
+
* @tag sigvelo-tab-list
|
|
10
|
+
* organized interface.
|
|
11
|
+
* @documentation https://design-system.sigvelo.com/docs/components/tab-list
|
|
12
|
+
* @status stable
|
|
13
|
+
* @since 1.0
|
|
14
|
+
*
|
|
15
|
+
* @dependency sigvelo-scroller
|
|
16
|
+
* @dependency sigvelo-tab
|
|
17
|
+
* @dependency sigvelo-tab-panel
|
|
18
|
+
*
|
|
19
|
+
* @slot - One or more `<sigvelo-tab-panel>` elements, each with a `name` attribute unique to the tab list.
|
|
20
|
+
* @slot tab - One or more `<sigvelo-tab>` elements, each with a `panel` attribute linked to the `name` of a tab panel.
|
|
21
|
+
* Note that tabs will automatically apply this slot to themselves, so you can safely omit `slot="tab"` in your markup.
|
|
22
|
+
* Also useful for adding close buttons to tabs.
|
|
23
|
+
*
|
|
24
|
+
* @event sigvelo-tab-shown - Emitted after a tab is shown. The event will include a `detail` object with `tab` and
|
|
25
|
+
* `panel`properties that reference the respective tab and panel elements.
|
|
26
|
+
* @event sigvelo-tab-hidden - Emitted after a tab is hidden. The event will include a `detail` object with `tab` and
|
|
27
|
+
* `panel` properties that reference the respective tab and panel elements.
|
|
28
|
+
*
|
|
29
|
+
* @csspart tabs - The container that holds all of the tabs, a `<sigvelo-scroller>` element.
|
|
30
|
+
* @csspart tabs-content - The scroller's `content` part.
|
|
31
|
+
* @csspart panels - The container that holds all of the tab panels.
|
|
32
|
+
*
|
|
33
|
+
* @example Default
|
|
34
|
+
* Tab lists follow the ARIA APG tooltip pattern for accessibility. They are comprised of three different components. A single tab list surrounds one or more tabs and their corresponding tab panels. Each panel must have a unique `name`, and each tab must have a `panel` attribute that maps to a panel.
|
|
35
|
+
*
|
|
36
|
+
* ```html
|
|
37
|
+
* <sigvelo-tab-list label="Select a tab">
|
|
38
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
39
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
40
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
41
|
+
*
|
|
42
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
43
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
44
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
45
|
+
* </sigvelo-tab-list>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* **Note:** In the same way that images require `alt` text, you should add a `label` to every tab list. The label won't be displayed, but it will be announced by assistive devices.
|
|
49
|
+
*
|
|
50
|
+
* @example Setting the active tab
|
|
51
|
+
* To make a specific tab show initially, or to programmatically activate a tab, set the `tab` attribute to the name of the desired panel.
|
|
52
|
+
*
|
|
53
|
+
* ```html
|
|
54
|
+
* <sigvelo-tab-list label="Select a tab" tab="second">
|
|
55
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
56
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
57
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
58
|
+
*
|
|
59
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
60
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
61
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
62
|
+
* </sigvelo-tab-list>
|
|
63
|
+
* ```
|
|
64
|
+
*
|
|
65
|
+
* @example Showing tabs at the bottom
|
|
66
|
+
* Set the `placement` attribute to `bottom` to show tabs at the bottom.
|
|
67
|
+
*
|
|
68
|
+
* ```html
|
|
69
|
+
* <sigvelo-tab-list label="Select a tab" placement="bottom">
|
|
70
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
71
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
72
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
73
|
+
*
|
|
74
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
75
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
76
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
77
|
+
* </sigvelo-tab-list>
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @example Showing tabs at the start
|
|
81
|
+
* Set the `placement` attribute to `start` to show tabs at the start. The tabs will automatically move to the opposite side in <abbr title="Right to left">RTL</abbr> languages.
|
|
82
|
+
*
|
|
83
|
+
* ```html
|
|
84
|
+
* <sigvelo-tab-list label="Select a tab" placement="start">
|
|
85
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
86
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
87
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
88
|
+
*
|
|
89
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
90
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
91
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
92
|
+
* </sigvelo-tab-list>
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* @example Showing tabs at the end
|
|
96
|
+
* Set the `placement` attribute to `end` to show tabs at the end. The tabs will automatically move to the opposite side in <abbr title="Right to left">RTL</abbr> languages.
|
|
97
|
+
*
|
|
98
|
+
* ```html
|
|
99
|
+
* <sigvelo-tab-list label="Select a tab" placement="end">
|
|
100
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
101
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
102
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
103
|
+
*
|
|
104
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
105
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
106
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
107
|
+
* </sigvelo-tab-list>
|
|
108
|
+
* ```
|
|
109
|
+
*
|
|
110
|
+
* @example Scrolling tabs
|
|
111
|
+
* When the number of tabs exceeds the available space in a top or bottom placement, the tab container will scroll horizontally.
|
|
112
|
+
*
|
|
113
|
+
* ```html
|
|
114
|
+
* <sigvelo-tab-list label="Select a tab">
|
|
115
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
116
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
117
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
118
|
+
* <sigvelo-tab panel="fourth">Fourth</sigvelo-tab>
|
|
119
|
+
* <sigvelo-tab panel="fifth">Fifth</sigvelo-tab>
|
|
120
|
+
* <sigvelo-tab panel="sixth">Sixth</sigvelo-tab>
|
|
121
|
+
* <sigvelo-tab panel="seventh">Seventh</sigvelo-tab>
|
|
122
|
+
* <sigvelo-tab panel="eight">Eight</sigvelo-tab>
|
|
123
|
+
* <sigvelo-tab panel="ninth">Ninth</sigvelo-tab>
|
|
124
|
+
* <sigvelo-tab panel="tenth">Tenth</sigvelo-tab>
|
|
125
|
+
*
|
|
126
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
127
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
128
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
129
|
+
* <sigvelo-tab-panel name="fourth">Stealthy shadows in the moonlight, cats emerge for nocturnal adventures through gardens and alleyways. Their night vision reveals a secret world invisible to human eyes during daylight hours.</sigvelo-tab-panel>
|
|
130
|
+
* <sigvelo-tab-panel name="fifth">Cozy blanket burrows become the ultimate fortress for sleepy kitties seeking warmth. The rhythmic breathing of a napping cat creates the most soothing soundtrack for peaceful afternoons.</sigvelo-tab-panel>
|
|
131
|
+
* <sigvelo-tab-panel name="sixth">Laser pointer dots trigger ancient hunting instincts, sending cats into acrobatic displays of athleticism. Every red dot becomes the ultimate prey in this eternal game of chase and pounce.</sigvelo-tab-panel>
|
|
132
|
+
* <sigvelo-tab-panel name="seventh">Catnip-infused toys transform ordinary house cats into euphoric party animals rolling with unbridled joy. This magical herb unlocks a level of feline happiness that's absolutely contagious to witness.</sigvelo-tab-panel>
|
|
133
|
+
* <sigvelo-tab-panel name="eight">Scratching posts serve as both manicure stations and territorial markers for our feline friends. Each scratch communicates ownership while maintaining those razor-sharp claws in perfect hunting condition.</sigvelo-tab-panel>
|
|
134
|
+
* <sigvelo-tab-panel name="ninth">Cardboard boxes become luxury penthouses in the cat real estate market, regardless of size. Whether tiny or enormous, every box offers the perfect hideout for surveillance and surprise attacks.</sigvelo-tab-panel>
|
|
135
|
+
* <sigvelo-tab-panel name="tenth">Sunrise stretches and yoga poses demonstrate the incredible flexibility that makes cats natural contortionists. Their graceful movements inspire humans to embrace daily stretching routines for better health.</sigvelo-tab-panel>
|
|
136
|
+
* </sigvelo-tab-list>
|
|
137
|
+
* ```
|
|
138
|
+
*
|
|
139
|
+
* If you don't want the tabs to scroll, you can apply `flex-wrap: wrap` to the `tabs-content` part to allow them to wrap instead.
|
|
140
|
+
*
|
|
141
|
+
* ```html
|
|
142
|
+
* <sigvelo-tab-list label="Select a tab" id="tabs-list__no-scroll">
|
|
143
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
144
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
145
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
146
|
+
* <sigvelo-tab panel="fourth">Fourth</sigvelo-tab>
|
|
147
|
+
* <sigvelo-tab panel="fifth">Fifth</sigvelo-tab>
|
|
148
|
+
* <sigvelo-tab panel="sixth">Sixth</sigvelo-tab>
|
|
149
|
+
* <sigvelo-tab panel="seventh">Seventh</sigvelo-tab>
|
|
150
|
+
* <sigvelo-tab panel="eight">Eight</sigvelo-tab>
|
|
151
|
+
* <sigvelo-tab panel="ninth">Ninth</sigvelo-tab>
|
|
152
|
+
* <sigvelo-tab panel="tenth">Tenth</sigvelo-tab>
|
|
153
|
+
*
|
|
154
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
155
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
156
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
157
|
+
* <sigvelo-tab-panel name="fourth">Stealthy shadows in the moonlight, cats emerge for nocturnal adventures through gardens and alleyways. Their night vision reveals a secret world invisible to human eyes during daylight hours.</sigvelo-tab-panel>
|
|
158
|
+
* <sigvelo-tab-panel name="fifth">Cozy blanket burrows become the ultimate fortress for sleepy kitties seeking warmth. The rhythmic breathing of a napping cat creates the most soothing soundtrack for peaceful afternoons.</sigvelo-tab-panel>
|
|
159
|
+
* <sigvelo-tab-panel name="sixth">Laser pointer dots trigger ancient hunting instincts, sending cats into acrobatic displays of athleticism. Every red dot becomes the ultimate prey in this eternal game of chase and pounce.</sigvelo-tab-panel>
|
|
160
|
+
* <sigvelo-tab-panel name="seventh">Catnip-infused toys transform ordinary house cats into euphoric party animals rolling with unbridled joy. This magical herb unlocks a level of feline happiness that's absolutely contagious to witness.</sigvelo-tab-panel>
|
|
161
|
+
* <sigvelo-tab-panel name="eight">Scratching posts serve as both manicure stations and territorial markers for our feline friends. Each scratch communicates ownership while maintaining those razor-sharp claws in perfect hunting condition.</sigvelo-tab-panel>
|
|
162
|
+
* <sigvelo-tab-panel name="ninth">Cardboard boxes become luxury penthouses in the cat real estate market, regardless of size. Whether tiny or enormous, every box offers the perfect hideout for surveillance and surprise attacks.</sigvelo-tab-panel>
|
|
163
|
+
* <sigvelo-tab-panel name="tenth">Sunrise stretches and yoga poses demonstrate the incredible flexibility that makes cats natural contortionists. Their graceful movements inspire humans to embrace daily stretching routines for better health.</sigvelo-tab-panel>
|
|
164
|
+
* </sigvelo-tab-list>
|
|
165
|
+
*
|
|
166
|
+
* <style>
|
|
167
|
+
* sigvelo-tab-list#tabs-list__no-scroll::part(tabs-content) {
|
|
168
|
+
* flex-wrap: wrap;
|
|
169
|
+
* }
|
|
170
|
+
* </style>
|
|
171
|
+
* ```
|
|
172
|
+
*
|
|
173
|
+
* @example Disabling
|
|
174
|
+
* To disable a tab, add the `disabled` attribute to it. Since tabs use automatic activation, disabled tabs are not focusable but are still recognized by assistive devices as disabled tabs.
|
|
175
|
+
*
|
|
176
|
+
* ```html
|
|
177
|
+
* <sigvelo-tab-list label="Select a tab">
|
|
178
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
179
|
+
* <sigvelo-tab panel="second" disabled>Second (disabled)</sigvelo-tab>
|
|
180
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
181
|
+
*
|
|
182
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
183
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
184
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
185
|
+
* </sigvelo-tab-list>
|
|
186
|
+
* ```
|
|
187
|
+
*
|
|
188
|
+
* @example Lazy loading content
|
|
189
|
+
* Sigvelo considers lazy loading tab content to be an anti-pattern but, when necessary, you can use the `sigvelo-tab-shown` event to do it.
|
|
190
|
+
*
|
|
191
|
+
* ```html
|
|
192
|
+
* <sigvelo-tab-list label="Select a tab" id="tab-list__lazy">
|
|
193
|
+
* <sigvelo-tab panel="regular">Regular</sigvelo-tab>
|
|
194
|
+
* <sigvelo-tab panel="lazy">Lazy</sigvelo-tab>
|
|
195
|
+
*
|
|
196
|
+
* <sigvelo-tab-panel name="regular">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
197
|
+
* <sigvelo-tab-panel name="lazy">
|
|
198
|
+
* <sigvelo-spinner label="Loading" style="display: block; margin-inline: auto;"></sigvelo-spinner>
|
|
199
|
+
* </sigvelo-tab-panel>
|
|
200
|
+
* </sigvelo-tab-list>
|
|
201
|
+
*
|
|
202
|
+
* <script>
|
|
203
|
+
* const tabList = document.getElementById('tab-list__lazy');
|
|
204
|
+
* const lazyPanel = tabList.querySelector('sigvelo-tab-panel[name="lazy"]');
|
|
205
|
+
*
|
|
206
|
+
* tabList.addEventListener('sigvelo-tab-shown', event => {
|
|
207
|
+
* if (event.detail.tab.panel === 'lazy' && !lazyPanel.hasAttribute('data-loaded')) {
|
|
208
|
+
* lazyPanel.setAttribute('data-loaded', '');
|
|
209
|
+
*
|
|
210
|
+
* // Some async operation...
|
|
211
|
+
*
|
|
212
|
+
* setTimeout(() => {
|
|
213
|
+
* lazyPanel.innerHTML = 'Surprise! A sleepy kitten just finished loading and is now ready for belly rubs and treats.';
|
|
214
|
+
* }, 2000);
|
|
215
|
+
* }
|
|
216
|
+
* });
|
|
217
|
+
* </script>
|
|
218
|
+
* ```
|
|
219
|
+
*
|
|
220
|
+
* @example Making tabs closable
|
|
221
|
+
* Avoid nesting buttons and other interactive elements inside of a tab, as it will cause assistive devices to work incorrectly. Instead, you can add buttons adjacent to tabs using the `tab` slot as shown in this example. When tabs are removable, you should also listen for the [[Delete]] key.
|
|
222
|
+
*
|
|
223
|
+
* Note that we use `tabindex="-1"` on the close button to prevent it from interfering with normal tabbing. The button, however, is still accessible to virtual cursors.
|
|
224
|
+
*
|
|
225
|
+
* ```html
|
|
226
|
+
* <sigvelo-tab-list label="Select a tab" id="tab-list__closable">
|
|
227
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
228
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
229
|
+
* <sigvelo-button slot="tab" variant="ghost" size="xs" icon-label="Close second tab" tabindex="-1">
|
|
230
|
+
* <sigvelo-icon name="x"></sigvelo-icon>
|
|
231
|
+
* </sigvelo-button>
|
|
232
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
233
|
+
*
|
|
234
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
235
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
236
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
237
|
+
* </sigvelo-tab-list>
|
|
238
|
+
*
|
|
239
|
+
* <sigvelo-button disabled style="margin-block-start: 2rem;">Restore Tab</sigvelo-button>
|
|
240
|
+
*
|
|
241
|
+
* <script>
|
|
242
|
+
* const tabList = document.getElementById('tab-list__closable');
|
|
243
|
+
* const firstTab = tabList.querySelector('sigvelo-tab[panel="first"]');
|
|
244
|
+
* const secondTab = tabList.querySelector('sigvelo-tab[panel="second"]');
|
|
245
|
+
* const secondPanel = tabList.querySelector('sigvelo-tab-panel[name="second"]');
|
|
246
|
+
* const closeButton = tabList.querySelector('sigvelo-button');
|
|
247
|
+
* const restoreButton = tabList.nextElementSibling;
|
|
248
|
+
*
|
|
249
|
+
* function closeTab() {
|
|
250
|
+
* closeButton.remove();
|
|
251
|
+
* secondTab.remove();
|
|
252
|
+
* secondPanel.remove();
|
|
253
|
+
* restoreButton.disabled = false;
|
|
254
|
+
*
|
|
255
|
+
* if (tabList.active === 'second') {
|
|
256
|
+
* tabList.active = 'third';
|
|
257
|
+
* }
|
|
258
|
+
* }
|
|
259
|
+
*
|
|
260
|
+
* function restoreTab() {
|
|
261
|
+
* firstTab.insertAdjacentElement('afterend', closeButton);
|
|
262
|
+
* firstTab.insertAdjacentElement('afterend', secondTab);
|
|
263
|
+
* tabList.append(secondPanel);
|
|
264
|
+
* restoreButton.disabled = true;
|
|
265
|
+
* }
|
|
266
|
+
*
|
|
267
|
+
* // Remove the tab when the close button is clicked
|
|
268
|
+
* closeButton.addEventListener('click', closeTab);
|
|
269
|
+
*
|
|
270
|
+
* // Remove the tab when delete is pressed
|
|
271
|
+
* secondTab.addEventListener('keydown', event => {
|
|
272
|
+
* if (event.key === 'Delete') {
|
|
273
|
+
* closeTab();
|
|
274
|
+
* }
|
|
275
|
+
* });
|
|
276
|
+
*
|
|
277
|
+
* // Restore the tab
|
|
278
|
+
* restoreButton.addEventListener('click', restoreTab);
|
|
279
|
+
* </script>
|
|
280
|
+
*
|
|
281
|
+
* <style>
|
|
282
|
+
* #tab-list__closable {
|
|
283
|
+
* sigvelo-button {
|
|
284
|
+
* position: relative;
|
|
285
|
+
* left: -1rem;
|
|
286
|
+
* font-size: .875rem;
|
|
287
|
+
* margin-inline-end: -.5rem;
|
|
288
|
+
* }
|
|
289
|
+
*
|
|
290
|
+
* sigvelo-button::part(button) {
|
|
291
|
+
* border-radius: var(--sigvelo-radius-md);
|
|
292
|
+
* height: 2rem;
|
|
293
|
+
* }
|
|
294
|
+
* }
|
|
295
|
+
* </style>
|
|
296
|
+
* ```
|
|
297
|
+
*
|
|
298
|
+
* @example Styling tab lists
|
|
299
|
+
* Tab lists come with a simple, minimal appearance. Feel free to customize them with your own styles.
|
|
300
|
+
*
|
|
301
|
+
* ```html
|
|
302
|
+
* <sigvelo-tab-list label="Select a tab" class="tab-list__cards">
|
|
303
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
304
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
305
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
306
|
+
*
|
|
307
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
308
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
309
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
310
|
+
* </sigvelo-tab-list>
|
|
311
|
+
*
|
|
312
|
+
* <style>
|
|
313
|
+
* .tab-list__cards {
|
|
314
|
+
* border: solid 1px var(--sigvelo-color-neutral-border-subtle);
|
|
315
|
+
* border-radius: var(--sigvelo-radius-md);
|
|
316
|
+
* box-shadow: var(--sigvelo-elevation-hairline);
|
|
317
|
+
*
|
|
318
|
+
* &::part(tabs) {
|
|
319
|
+
* padding-top: 0.5rem;
|
|
320
|
+
* }
|
|
321
|
+
*
|
|
322
|
+
* &::part(panels) {
|
|
323
|
+
* padding: 1.5rem 1rem;
|
|
324
|
+
* }
|
|
325
|
+
*
|
|
326
|
+
* sigvelo-tab {
|
|
327
|
+
* background-color: var(--sigvelo-color-surface);
|
|
328
|
+
* border: solid 1px var(--sigvelo-color-neutral-border-subtle);
|
|
329
|
+
* border-start-start-radius: var(--sigvelo-radius-md);
|
|
330
|
+
* border-start-end-radius: var(--sigvelo-radius-md);
|
|
331
|
+
* color: var(--sigvelo-color-text-muted);
|
|
332
|
+
* padding-block: 0.75rem;
|
|
333
|
+
* margin-inline: 0.25rem;
|
|
334
|
+
*
|
|
335
|
+
* &:state(active) {
|
|
336
|
+
* background-color: var(--sigvelo-color-canvas);
|
|
337
|
+
* }
|
|
338
|
+
* }
|
|
339
|
+
*
|
|
340
|
+
* sigvelo-tab:first-of-type {
|
|
341
|
+
* margin-inline-start: 0.5rem;
|
|
342
|
+
* }
|
|
343
|
+
*
|
|
344
|
+
* sigvelo-tab:last-of-type {
|
|
345
|
+
* margin-inline-end: 0.5rem;
|
|
346
|
+
* }
|
|
347
|
+
*
|
|
348
|
+
* sigvelo-tab:state(active) {
|
|
349
|
+
* border-bottom-color: var(--sigvelo-color-canvas);
|
|
350
|
+
* color: var(--sigvelo-color-text);
|
|
351
|
+
* }
|
|
352
|
+
*
|
|
353
|
+
* &::part(panels) {
|
|
354
|
+
* border-top-width: 1px;
|
|
355
|
+
* margin-top: -1px;
|
|
356
|
+
* }
|
|
357
|
+
* }
|
|
358
|
+
* </style>
|
|
359
|
+
* ```
|
|
360
|
+
*
|
|
361
|
+
* ```html
|
|
362
|
+
* <sigvelo-tab-list label="Select a tab" class="tab-list__segments">
|
|
363
|
+
* <sigvelo-tab panel="first">First</sigvelo-tab>
|
|
364
|
+
* <sigvelo-tab panel="second">Second</sigvelo-tab>
|
|
365
|
+
* <sigvelo-tab panel="third">Third</sigvelo-tab>
|
|
366
|
+
*
|
|
367
|
+
* <sigvelo-tab-panel name="first">Whiskers twitching with curiosity, cats patrol their domain with silent paws and keen eyes. Every corner holds potential adventure or the perfect sunny spot for an afternoon nap.</sigvelo-tab-panel>
|
|
368
|
+
* <sigvelo-tab-panel name="second">Purring contentedly on warm windowsills, felines observe the world with ancient wisdom. Their graceful movements and mysterious expressions captivate humans across all cultures.</sigvelo-tab-panel>
|
|
369
|
+
* <sigvelo-tab-panel name="third">Playful pouncing and midnight zoomies reveal the wild hunter within every house cat. From cardboard boxes to feather toys, everything becomes an exciting opportunity for feline fun.</sigvelo-tab-panel>
|
|
370
|
+
* </sigvelo-tab-list>
|
|
371
|
+
*
|
|
372
|
+
* <style>
|
|
373
|
+
* .tab-list__segments {
|
|
374
|
+
* &::part(tabs) {
|
|
375
|
+
* justify-content: space-between;
|
|
376
|
+
* background-color: var(--sigvelo-color-neutral-bg-subtle);
|
|
377
|
+
* border-radius: var(--sigvelo-radius-md);
|
|
378
|
+
* padding: .25rem;
|
|
379
|
+
* }
|
|
380
|
+
*
|
|
381
|
+
* sigvelo-tab {
|
|
382
|
+
* flex: 1 1 auto;
|
|
383
|
+
* justify-content: center;
|
|
384
|
+
* border: none;
|
|
385
|
+
* border-radius: var(--sigvelo-radius-md);
|
|
386
|
+
* color: var(--sigvelo-color-text-muted);
|
|
387
|
+
* padding-inline: 2rem;
|
|
388
|
+
* padding-block: .25rem;
|
|
389
|
+
* transition: 100ms background-color ease, 100ms color ease;
|
|
390
|
+
* }
|
|
391
|
+
*
|
|
392
|
+
* sigvelo-tab:first-child {
|
|
393
|
+
* margin-inline-start: 0;
|
|
394
|
+
* }
|
|
395
|
+
*
|
|
396
|
+
* sigvelo-tab:state(active) {
|
|
397
|
+
* border: none;
|
|
398
|
+
* background-color: var(--sigvelo-color-canvas);
|
|
399
|
+
* color: var(--sigvelo-color-text);
|
|
400
|
+
* }
|
|
401
|
+
*
|
|
402
|
+
* &::part(panels) {
|
|
403
|
+
* border: none;
|
|
404
|
+
* padding-block: 1rem;
|
|
405
|
+
* margin: 0;
|
|
406
|
+
* }
|
|
407
|
+
* }
|
|
408
|
+
* </style>
|
|
409
|
+
* ```
|
|
410
|
+
*/
|
|
411
|
+
declare class SigveloTabList extends SigveloElement {
|
|
412
|
+
static styles: CSSResultGroup;
|
|
413
|
+
private localize;
|
|
414
|
+
private tabSlot;
|
|
415
|
+
private panelSlot;
|
|
416
|
+
/**
|
|
417
|
+
* An accessible label for the tab list. This won't be visible, but it will be read to assistive devices so you should
|
|
418
|
+
* always include one.
|
|
419
|
+
*/
|
|
420
|
+
label: string;
|
|
421
|
+
/** The name of the tab panel that's currently active. */
|
|
422
|
+
tab: string;
|
|
423
|
+
/** The placement of tab controls. */
|
|
424
|
+
placement: "top" | "bottom" | "start" | "end";
|
|
425
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
426
|
+
/**
|
|
427
|
+
* Gets an array of tabs slotted into the tab list.
|
|
428
|
+
*
|
|
429
|
+
* `slotchange` can fire before the first render and after the element is
|
|
430
|
+
* disconnected, so the @query result is not guaranteed to be present; an
|
|
431
|
+
* empty list is the correct answer in both cases.
|
|
432
|
+
*/
|
|
433
|
+
private getTabs;
|
|
434
|
+
private getPanels;
|
|
435
|
+
private handleTabsClick;
|
|
436
|
+
private handleTabsKeyDown;
|
|
437
|
+
private handleSlotChange;
|
|
438
|
+
/** Sets the active tab + panel. */
|
|
439
|
+
private setActiveTab;
|
|
440
|
+
/** @internal Makes only the active tab tabbable. If no tab is active, the first non-disabled tab will be tabbable. */
|
|
441
|
+
resetRovingTabIndex(): void;
|
|
442
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
443
|
+
}
|
|
444
|
+
declare global {
|
|
445
|
+
interface HTMLElementTagNameMap {
|
|
446
|
+
"sigvelo-tab-list": SigveloTabList;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
//#endregion
|
|
450
|
+
export { SigveloTabList as t };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { t as __decorate } from "./decorate-DcF3lt7P.js";
|
|
2
|
+
import { css, html } from "lit";
|
|
3
|
+
import { property } from "lit/decorators.js";
|
|
4
|
+
import hostStyles from "@mcp-b/wc-support/styles/host.styles";
|
|
5
|
+
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
6
|
+
//#region src/components/tab-panel/tab-panel.styles.ts
|
|
7
|
+
var tab_panel_styles_default = css`
|
|
8
|
+
:host {
|
|
9
|
+
display: block;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:host(:not(:state(visible))) {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
`;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/components/tab-panel/tab-panel.ts
|
|
18
|
+
/**
|
|
19
|
+
* <sigvelo-tab-panel>
|
|
20
|
+
*
|
|
21
|
+
* @summary Holds the content that gets displayed when a tab is selected.
|
|
22
|
+
* @tag sigvelo-tab-panel
|
|
23
|
+
* @documentation https://design-system.sigvelo.com/docs/components/tab-panel
|
|
24
|
+
* @status stable
|
|
25
|
+
* @since 1.0
|
|
26
|
+
*
|
|
27
|
+
* @slot - Content to show inside the tab panel.
|
|
28
|
+
*
|
|
29
|
+
* @cssstate visible - Applied when the tab panel is visible.
|
|
30
|
+
*
|
|
31
|
+
* @example Default
|
|
32
|
+
* This component must only be used within a tab list. You can see some examples of tab panels being used in the tab list documentation.
|
|
33
|
+
*/
|
|
34
|
+
var SigveloTabPanel = class extends SigveloElement {
|
|
35
|
+
constructor(..._args) {
|
|
36
|
+
super(..._args);
|
|
37
|
+
this.visible = false;
|
|
38
|
+
}
|
|
39
|
+
static {
|
|
40
|
+
this.styles = [hostStyles, tab_panel_styles_default];
|
|
41
|
+
}
|
|
42
|
+
firstUpdated() {
|
|
43
|
+
this.setAttribute("role", "tabpanel");
|
|
44
|
+
}
|
|
45
|
+
disconnectedCallback() {
|
|
46
|
+
super.disconnectedCallback();
|
|
47
|
+
this.visible = false;
|
|
48
|
+
}
|
|
49
|
+
updated(changedProperties) {
|
|
50
|
+
if (changedProperties.has("visible")) this.customStates.set("visible", this.visible);
|
|
51
|
+
}
|
|
52
|
+
render() {
|
|
53
|
+
return html` <slot></slot> `;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
__decorate([property({ type: Boolean })], SigveloTabPanel.prototype, "visible", void 0);
|
|
57
|
+
__decorate([property({ reflect: true })], SigveloTabPanel.prototype, "name", void 0);
|
|
58
|
+
customElements.define("sigvelo-tab-panel", SigveloTabPanel);
|
|
59
|
+
//#endregion
|
|
60
|
+
export { SigveloTabPanel as t };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CSSResultGroup, PropertyValues } from "lit";
|
|
2
|
+
import { SigveloElement } from "@mcp-b/wc-support/base/sigvelo-element";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tab-panel/tab-panel.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* <sigvelo-tab-panel>
|
|
7
|
+
*
|
|
8
|
+
* @summary Holds the content that gets displayed when a tab is selected.
|
|
9
|
+
* @tag sigvelo-tab-panel
|
|
10
|
+
* @documentation https://design-system.sigvelo.com/docs/components/tab-panel
|
|
11
|
+
* @status stable
|
|
12
|
+
* @since 1.0
|
|
13
|
+
*
|
|
14
|
+
* @slot - Content to show inside the tab panel.
|
|
15
|
+
*
|
|
16
|
+
* @cssstate visible - Applied when the tab panel is visible.
|
|
17
|
+
*
|
|
18
|
+
* @example Default
|
|
19
|
+
* This component must only be used within a tab list. You can see some examples of tab panels being used in the tab list documentation.
|
|
20
|
+
*/
|
|
21
|
+
declare class SigveloTabPanel extends SigveloElement {
|
|
22
|
+
static styles: CSSResultGroup;
|
|
23
|
+
/** @internal The controller will set this when the panel should be visible. */
|
|
24
|
+
visible: boolean;
|
|
25
|
+
/** The name of the tab panel. Used for assigning tabs to panels. */
|
|
26
|
+
name: string;
|
|
27
|
+
firstUpdated(): void;
|
|
28
|
+
disconnectedCallback(): void;
|
|
29
|
+
updated(changedProperties: PropertyValues<this>): void;
|
|
30
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
31
|
+
}
|
|
32
|
+
declare global {
|
|
33
|
+
interface HTMLElementTagNameMap {
|
|
34
|
+
"sigvelo-tab-panel": SigveloTabPanel;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { SigveloTabPanel as t };
|