1.3.0 • Published 2 months ago

@blockquote-web-components/blockquote-tabs v1.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Lit

ARIA patterns

Tabs are a set of layered sections of content, known as tab panels, that display one panel of content at a time. Each tab panel has an associated tab element, that when activated, displays the panel. The list of tab elements is arranged along one edge of the currently displayed panel, most commonly the top edge.

Demo

Open in StackBlitz

Usage

<blockquote-tabs label="List of tabs">
  <blockquote-tab id="tab-1">Tab 1</blockquote-tab>
  <blockquote-tab id="tab-2">Tab 2</blockquote-tab>
  <blockquote-tab id="tab-3">Tab 3</blockquote-tab>
  <blockquote-tab id="tab-4">Tab 4</blockquote-tab>
  <blockquote-tab id="tab-5">Tab 5</blockquote-tab>
  <blockquote-tab id="tab-6">Tab 6</blockquote-tab>
  <blockquote-tab id="tab-7">Tab 7</blockquote-tab>
  <blockquote-tab id="tab-8">Tab 8</blockquote-tab>
  <blockquote-tab id="tab-9">Tab 9</blockquote-tab>
  <blockquote-tab id="tab-10">Tab 10</blockquote-tab>
  <blockquote-tabpanel aria-labelledby="tab-1"><p>Panel 1</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-2"><p>Panel 2</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-3"><p>Panel 3</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-4"><p>Panel 4</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-5"><p>Panel 5</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-6"><p>Panel 6</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-7"><p>Panel 7</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-8"><p>Panel 8</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-9"><p>Panel 9</p></blockquote-tabpanel>
  <blockquote-tabpanel aria-labelledby="tab-10"><p>Panel 10</p></blockquote-tabpanel>
</blockquote-tabs>

src/BlockquoteTabs.js:

class: BlockquoteTabs, blockquote-tabs

Mixins
NameModulePackage
BlockquoteMixinSlotContent@blockquote-web-components/blockquote-mixin-slot-content
Fields
NamePrivacyTypeDefaultDescriptionInherited From
_selectedTab
_selectedTabIndex
_selectedTabIndexFromOne
_getTabListLength
_scrollContentTpl
_tablistTpl
_separatorTpl
_indicatorsTpl
_holdTpl
_tabpanelTpl
autofocuspublicbooleanfalseIf present, the tab automatically have focus
labelpublicstring''`aria-label` for tabs group
selectedpublicnumber1The tab selected.
_tabListarray[]
_tabpanelListarray[]
_selectTabLastundefined
_selectTabpanelLastundefined
_observedFocusbooleanfalse
_observeScrollBehaviorbooleanfalse
_slotChangesCountnumber0
_slotNodesCountundefined
_scrollContentRef
_resizeControllerObservernew ResizeController(this, { callback: () => { this._onResizeObserverChange(); }, skipInitial: true, })
_hasScrollLeftIndicatorpublicboolean
_hasScrollRightIndicatorpublicboolean
Methods
NamePrivacyDescriptionParametersReturnInherited From
_selectedIsInRangeidx
_onSlotChangesev
_scrollEdge{ target = this._scrollContentRef.value }
_onTabClickev
_onTabKeyDownev
_selectTab
_moveFocusSelectedTabselectedTab
_requestFocusUpdate
_scrollIntoView
_scrollIntoViewWithOffsettabScroller, behavior
_requestPropertyUpdateprop
_onResizeObserverChange
Events
NameTypeDescriptionInherited From
selectedchange
Attributes
NameFieldInherited From
autofocusautofocus
labellabel
selectedselected
_hasScrollLeftIndicator_hasScrollLeftIndicator
_hasScrollRightIndicator_hasScrollRightIndicator

Exports

KindNameDeclarationModulePackage
jsBlockquoteTabsBlockquoteTabssrc/BlockquoteTabs.js

src/index.js:

Exports

KindNameDeclarationModulePackage
jsBlockquoteTabsBlockquoteTabs./BlockquoteTabs.js
jsBlockquoteTabBlockquoteTab./tab/BlockquoteTab.js
jsBlockquoteTabPanelBlockquoteTabPanel./tabpanel/BlockquoteTabPanel.js

src/styles/blockquote-tabs-styles.css.js:

Variables

NameDescriptionType
styles

Exports

KindNameDeclarationModulePackage
jsstylesstylessrc/styles/blockquote-tabs-styles.css.js

Lit

<blockquote-tabpanel> A tab element that can be used inside a blockquote-tabs element.

src/tabpanel/BlockquoteTabPanel.js:

class: BlockquoteTabPanel, blockquote-tabpanel

Fields
NamePrivacyTypeDefaultDescriptionInherited From
selectedpublicbooleanfalseWhether or not the tabpanel is `selected`.
globalRootAttributesobject{ role: 'tabpanel', slot: 'tabpanel', tabindex: 0, }
Methods
NamePrivacyDescriptionParametersReturnInherited From
__setArrayAttibuteSets attributes on the element.entries: Record<*, *>
Attributes
NameFieldInherited From
selectedselected

Exports

KindNameDeclarationModulePackage
jsBlockquoteTabPanelBlockquoteTabPanelsrc/tabpanel/BlockquoteTabPanel.js

Lit

<blockquote-tab> A tab element that can be used inside a blockquote-tabs element.

src/tab/BlockquoteTab.js:

class: BlockquoteTab, blockquote-tab

Mixins
NameModulePackage
BlockquoteMixinSlotContent@blockquote-web-components/blockquote-mixin-slot-content
Fields
NamePrivacyTypeDefaultDescriptionInherited From
selectedpublicbooleanfalseWhether or not the tab is `selected`.
globalRootAttributesobject{ role: 'tab', slot: 'tab', tabindex: 0, }
Methods
NamePrivacyDescriptionParametersReturnInherited From
_onSlotChangesev
__setArrayAttibuteSets attributes on the element.entries: Record<*, *>
Attributes
NameFieldInherited From
selectedselected

Exports

KindNameDeclarationModulePackage
jsBlockquoteTabBlockquoteTabsrc/tab/BlockquoteTab.js

src/tabpanel/styles/blockquote-tabpanel-styles.css.js:

Variables

NameDescriptionType
styles

Exports

KindNameDeclarationModulePackage
jsstylesstylessrc/tabpanel/styles/blockquote-tabpanel-styles.css.js

src/tab/styles/blockquote-tab-styles.css.js:

Variables

NameDescriptionType
styles

Exports

KindNameDeclarationModulePackage
jsstylesstylessrc/tab/styles/blockquote-tab-styles.css.js

define/blockquote-tab.js:

Exports

KindNameDeclarationModulePackage
custom-element-definitionblockquote-tabBlockquoteTab/src/tab/BlockquoteTab.js

define/blockquote-tabpanel.js:

Exports

KindNameDeclarationModulePackage
custom-element-definitionblockquote-tabpanelBlockquoteTabPanel/src/tabpanel/BlockquoteTabPanel.js

define/blockquote-tabs.js:

Exports

KindNameDeclarationModulePackage
custom-element-definitionblockquote-tabsBlockquoteTabs/src/BlockquoteTabs.js
1.3.0

2 months ago

1.2.0

2 months ago

1.1.8

4 months ago

1.1.7

4 months ago

1.1.6

4 months ago

1.1.5

4 months ago

1.1.4

4 months ago

1.1.3

5 months ago

1.1.1

6 months ago

1.1.2

6 months ago

1.1.0

6 months ago

1.0.5

7 months ago

1.0.4

9 months ago

1.0.3

10 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago