@patternfly/elements 4.0.1 → 4.0.2
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/package.json +1 -1
- package/pf-accordion/pf-accordion-header.js +1 -1
- package/pf-accordion/pf-accordion-panel.js +1 -1
- package/pf-accordion/pf-accordion.js +1 -1
- package/pf-avatar/pf-avatar.js +1 -1
- package/pf-back-to-top/pf-back-to-top.js +1 -1
- package/pf-background-image/pf-background-image.js +1 -1
- package/pf-badge/pf-badge.js +1 -1
- package/pf-banner/pf-banner.js +1 -1
- package/pf-button/pf-button.js +1 -1
- package/pf-card/pf-card.js +1 -1
- package/pf-chip/pf-chip-group.js +1 -1
- package/pf-chip/pf-chip.js +1 -1
- package/pf-clipboard-copy/pf-clipboard-copy.js +1 -1
- package/pf-code-block/pf-code-block.js +1 -1
- package/pf-dropdown/pf-dropdown-group.js +1 -1
- package/pf-dropdown/pf-dropdown-item.js +1 -1
- package/pf-dropdown/pf-dropdown-menu.js +1 -1
- package/pf-dropdown/pf-dropdown.js +1 -1
- package/pf-icon/pf-icon.js +1 -1
- package/pf-jump-links/pf-jump-links-item.js +1 -1
- package/pf-jump-links/pf-jump-links-list.js +1 -1
- package/pf-jump-links/pf-jump-links.css +22 -11
- package/pf-jump-links/pf-jump-links.js +2 -2
- package/pf-label/pf-label.js +1 -1
- package/pf-modal/pf-modal.js +1 -1
- package/pf-panel/pf-panel.js +1 -1
- package/pf-popover/pf-popover.js +1 -1
- package/pf-progress/pf-progress.js +1 -1
- package/pf-progress-stepper/pf-progress-step.js +1 -1
- package/pf-progress-stepper/pf-progress-stepper.js +1 -1
- package/pf-select/pf-option-group.js +1 -1
- package/pf-select/pf-option.js +1 -1
- package/pf-select/pf-select.js +1 -1
- package/pf-spinner/pf-spinner.js +1 -1
- package/pf-switch/pf-switch.js +1 -1
- package/pf-table/pf-caption.js +1 -1
- package/pf-table/pf-table.js +1 -1
- package/pf-table/pf-tbody.js +1 -1
- package/pf-table/pf-td.js +1 -1
- package/pf-table/pf-th.js +1 -1
- package/pf-table/pf-thead.js +1 -1
- package/pf-table/pf-tr.js +1 -1
- package/pf-tabs/pf-tab-panel.js +1 -1
- package/pf-tabs/pf-tab.js +1 -1
- package/pf-tabs/pf-tabs.js +1 -1
- package/pf-tabs/test/pf-tabs.spec.js +1 -1
- package/pf-tabs/test/pf-tabs.spec.js.map +1 -1
- package/pf-text-area/pf-text-area.js +1 -1
- package/pf-text-input/pf-text-input.js +1 -1
- package/pf-tile/pf-tile.js +1 -1
- package/pf-timestamp/pf-timestamp.js +1 -1
- package/pf-tooltip/pf-tooltip.js +1 -1
- package/pfe.min.js +23 -12
- package/pfe.min.js.map +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pf-tabs.spec.js","sourceRoot":"","sources":["pf-tabs.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAElE,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,2CAA2C,CAAC;AAEnD,SAAS,KAAK,CAAC,GAAW;IACxB,OAAO,KAAK;QACV,MAAM,QAAQ,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;IACjC,CAAC,CAAC;AACJ,CAAC;AAED,QAAQ,CAAC,WAAW,EAAE;IACpB,EAAE,CAAC,2BAA2B,EAAE;QAC9B,M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,aAAa,CAAS,IAAI,CAAA;;;;;;;;;;;;;OAazC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wCAAwC,EAAE;YAC3C,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, html, nextFrame } from '@open-wc/testing';\nimport { createFixture } from '@patternfly/pfe-tools/test/create-fixture.js';\nimport { a11ySnapshot } from '@patternfly/pfe-tools/test/a11y-snapshot.js';\nimport { setViewport, sendKeys } from '@web/test-runner-commands';\n\nimport { allUpdates } from '@patternfly/pfe-tools/test/utils.js';\n\nimport { PfTabs } from '../pf-tabs.js';\nimport { PfTab } from '../pf-tab.js';\nimport { PfTabPanel } from '../pf-tab-panel.js';\n\nimport '@patternfly/pfe-tools/test/stub-logger.js';\n\nfunction press(key: string) {\n return async function() {\n await sendKeys({ press: key });\n };\n}\n\ndescribe('<pf-tabs>', function() {\n it('instantiates imperatively', function() {\n expect(document.createElement('pf-tabs')).to.be.an.instanceof(PfTabs);\n expect(document.createElement('pf-tab')).to.be.an.instanceof(PfTab);\n expect(document.createElement('pf-tab-panel')).to.be.an.instanceof(PfTabPanel);\n });\n\n it('should upgrade', async function() {\n const el = await createFixture<PfTabs>(html`<pf-tabs></pf-tabs>`);\n expect(el, 'pf-tabs should be an instance of PfeTabs')\n .to.be.an.instanceOf(customElements.get('pf-tabs'))\n .and\n .to.be.an.instanceOf(PfTabs);\n });\n\n describe('with three valid tab pairs', function() {\n let element: PfTabs;\n\n const updateComplete = () => allUpdates(element);\n\n beforeEach(async function() {\n element = await createFixture<PfTabs>(html`\n <pf-tabs>\n <pf-tab slot=\"tab\">tab-1</pf-tab>\n <pf-tab-panel>panel-1</pf-tab-panel>\n <pf-tab slot=\"tab\">tab-2</pf-tab>\n <pf-tab-panel>panel-2</pf-tab-panel>\n <pf-tab slot=\"tab\">tab-3</pf-tab>\n <pf-tab-panel>panel-3</pf-tab-panel>\n </pf-tabs>\n `);\n });\n\n beforeEach(updateComplete);\n\n it('should apply aria attributes on initialization', function() {\n const tabs = element.querySelectorAll('pf-tab');\n const panels = element.querySelectorAll('pf-tab-panel');\n tabs.forEach(function(tab: Element, index: number) {\n const tabId = tab.getAttribute('id');\n const tabControls = tab.getAttribute('aria-controls');\n panels.forEach(function(panel: Element, pindex: number) {\n if (index === pindex) {\n expect(panel.getAttribute('aria-labelledby')).to.equal(tabId);\n expect(panel.id).to.equal(tabControls);\n }\n });\n });\n });\n\n describe('pressing Tab', function() {\n beforeEach(press('Tab'));\n beforeEach(updateComplete);\n beforeEach(nextFrame);\n it('should activate the first focusable tab', function() {\n expect(element.querySelector('pf-tab')).to.have.attribute('active');\n });\n\n it('should activate the first tab panel', function() {\n expect(element.querySelector('pf-tab')).to.not.have.attribute('hidden');\n });\n });\n\n describe('setting the `vertical` attribute', function() {\n beforeEach(function() {\n element.setAttribute('vertical', '');\n });\n\n beforeEach(updateComplete);\n\n it('should have vertical styles', function() {\n // WARNING: asserting on shadow root content;\n const tabs = element.shadowRoot!.querySelector('[part=\"tabs\"]')!;\n const tabsVerticalStyles = getComputedStyle(tabs).flexDirection;\n expect(tabsVerticalStyles).to.be.equal('column');\n });\n });\n\n describe('setting the second tab\\'s `active` attribute', function() {\n beforeEach(function() {\n const [, tab] = element.querySelectorAll('pf-tab');\n tab!.active = true;\n });\n\n beforeEach(updateComplete);\n beforeEach(nextFrame);\n\n it('should activate the second tab', function() {\n const [, tab] = element.querySelectorAll('pf-tab');\n expect(tab).to.have.attribute('active');\n });\n\n it('should activate its panel', function() {\n const [, tab] = element.querySelectorAll('pf-tab');\n expect(tab).to.not.have.attribute('hidden');\n });\n\n it('should deactivate previously active tab', function() {\n expect(element.querySelector('pf-tab')).to.not.have.attribute('active');\n });\n\n it('should hide previously active panel', function() {\n expect(element.querySelector('pf-tab-panel')).to.have.attribute('hidden');\n });\n });\n\n describe('setting `activeIndex` to 2', function() {\n beforeEach(function() {\n element.activeIndex = 2;\n });\n\n beforeEach(updateComplete);\n beforeEach(nextFrame);\n\n it('should activate the third tab', function() {\n const [,, tab] = element.querySelectorAll('pf-tab');\n expect(tab).to.have.attribute('active');\n });\n\n it('should activate the third panel', async function() {\n const snapshot = await a11ySnapshot();\n expect(snapshot.children?.find(x => x.role === 'tabpanel')?.name).to.equal('tab-3');\n });\n\n describe('then setting the first tab\\'s `disabled` attribute', function() {\n beforeEach(async function() {\n element.querySelector('pf-tab')!.disabled = true;\n });\n\n beforeEach(updateComplete);\n\n it('should disable the button', async function() {\n const snapshot = await a11ySnapshot();\n const disabledTab = snapshot.children?.find(x => x.role === 'tab' && x.disabled);\n expect(disabledTab).to.be.ok;\n });\n\n describe('and clicking the disabled tab', function() {\n beforeEach(async function() {\n element.querySelector('pf-tab')!.click();\n });\n\n beforeEach(updateComplete);\n\n it('should not activate', function() {\n const [first] = element.querySelectorAll('pf-tab');\n expect(first).to.not.have.attribute('active');\n });\n\n it('should present the third panel to the ax tree', async function() {\n const snapshot = await a11ySnapshot();\n expect(snapshot.children?.find(x => x.role === 'tabpanel')?.name).to.equal('tab-3');\n });\n });\n\n describe('then setting `activeIndex` to 0 (i.e. the disabled tab\\'s index)', function() {\n beforeEach(function() {\n element.activeIndex = 0;\n });\n\n beforeEach(updateComplete);\n\n it('should not activate the first tab', function() {\n expect(element.querySelector('pf-tab')).to.not.have.attribute('active');\n });\n\n it('should present the third panel to the ax tree', async function() {\n const snapshot = await a11ySnapshot();\n expect(snapshot.children?.find(x => x.role === 'tabpanel')?.name).to.equal('tab-3');\n });\n });\n });\n });\n\n describe('when viewed in a small viewport', function() {\n beforeEach(async function() {\n // this is a comically narrow viewport, but our tabs have quite short\n // labels, so viewport must be itsy-pitsy in order to cause overflow\n await setViewport({ width: 100, height: 640 });\n });\n\n beforeEach(nextFrame);\n beforeEach(updateComplete);\n beforeEach(nextFrame);\n beforeEach(updateComplete);\n\n\n it('should have visible scroll buttons if overflowed', function() {\n // Note: overflow buttons are not included in the accessibility tree otherwise we'd test\n // for buttons there. tabindex=\"-1\" is used on the buttons to prevent focus and was a\n // decision made to keep logical keyboard navigation order flow between tabs and panels\n // as the next overflow button exists in the DOM between the tabs container and the open panel\n // and would disrupt the expected flow. For keyboard users they are able to scroll using the\n // left and right arrows keys and do not need direct access to the overflow buttons but still\n // exist as visual cues for which direction is overflowed\n const previousTab = element.shadowRoot!.querySelector('#previousTab')!;\n const nextTab = element.shadowRoot!.querySelector('#nextTab')!;\n expect(previousTab).to.not.be.null;\n expect(nextTab).to.not.be.null;\n const prevDisplayStyle = getComputedStyle(previousTab).display;\n const nextDisplayStyle = getComputedStyle(nextTab).display;\n expect(prevDisplayStyle ).to.not.equal('none');\n expect(nextDisplayStyle).to.not.equal('none');\n });\n });\n\n describe(`when navigated by keyboard`, function() {\n describe('when focused on the first tab', function() {\n beforeEach(async function() {\n element.querySelector('pf-tab')!.focus();\n });\n\n describe('pressing ArrowRight', function() {\n beforeEach(async function() {\n await sendKeys({ down: 'ArrowRight' });\n });\n\n beforeEach(updateComplete);\n\n it('should activate the next tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.not.have.attribute('active');\n expect(second).to.have.attribute('active');\n expect(third).to.not.have.attribute('active');\n });\n });\n\n describe('pressing ArrowLeft', function() {\n beforeEach(async function() {\n await sendKeys({ down: 'ArrowLeft' });\n });\n\n it('should activate the last tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.not.have.attribute('active');\n expect(second).to.not.have.attribute('active');\n expect(third).to.have.attribute('active');\n });\n describe('then pressing ArrowRight', function() {\n beforeEach(async function() {\n await sendKeys({ down: 'ArrowRight' });\n });\n\n beforeEach(updateComplete);\n\n it('should activate the first tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.have.attribute('active');\n expect(second).to.not.have.attribute('active');\n expect(third).to.not.have.attribute('active');\n });\n });\n });\n });\n });\n\n describe('setting the `manual` attribute', function() {\n beforeEach(function() {\n element.setAttribute('manual', '');\n });\n\n beforeEach(updateComplete);\n\n describe('pressing Tab', function() {\n beforeEach(press('Tab'));\n describe('pressing ArrowRight key', function() {\n beforeEach(press('ArrowRight'));\n\n beforeEach(updateComplete);\n\n it('should not activate second tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.have.attribute('active');\n expect(second).to.not.have.attribute('active');\n expect(third).to.not.have.attribute('active');\n });\n\n it('should focus the second tab', function() {\n const [, second] = element.querySelectorAll('pf-tab');\n expect(document.activeElement).to.equal(second);\n });\n\n describe('pressing enter key', function() {\n beforeEach(press('Enter'));\n\n beforeEach(updateComplete);\n\n it('should activate second tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.not.have.attribute('active');\n expect(second).to.have.attribute('active');\n expect(third).to.not.have.attribute('active');\n expect(document.activeElement).to.equal(second);\n });\n });\n });\n });\n });\n });\n\n describe('when no active tab is given and the first tab is disabled', function() {\n let element: PfTabs;\n\n beforeEach(async function() {\n element = await createFixture<PfTabs>(html`\n <pf-tabs>\n <pf-tab id=\"tab1\" slot=\"tab\" disabled></pf-tab>\n <pf-tab id=\"tab2\" slot=\"tab\"></pf-tab>\n <pf-tab id=\"tab3\" slot=\"tab\"></pf-tab>\n <pf-tab id=\"tab4\" slot=\"tab\" disabled></pf-tab>\n <pf-tab id=\"tab5\" slot=\"tab\" aria-disabled=\"true\"></pf-tab>\n <pf-tab-panel></pf-tab-panel>\n <pf-tab-panel></pf-tab-panel>\n <pf-tab-panel></pf-tab-panel>\n <pf-tab-panel></pf-tab-panel>\n <pf-tab-panel></pf-tab-panel>\n </pf-tabs>\n `);\n });\n\n it('should activate the next focusable tab', function() {\n expect(element.activeTab).to.have.id('tab2');\n });\n });\n});\n"]}
|
|
1
|
+
{"version":3,"file":"pf-tabs.spec.js","sourceRoot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E,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;4BAClE,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;4BAC9C,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;4BAC3C,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;4BAC9C,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;wBAClD,CAAC,CAAC,CAAC;oBACL,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,2DAA2D,EAAE;QACpE,IAAI,OAAe,CAAC;QAEpB,UAAU,CAAC,KAAK;YACd,OAAO,GAAG,MAAM,aAAa,CAAS,IAAI,CAAA;;;;;;;;;;;;;OAazC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,wCAAwC,EAAE;YAC3C,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { expect, html, nextFrame } from '@open-wc/testing';\nimport { createFixture } from '@patternfly/pfe-tools/test/create-fixture.js';\nimport { a11ySnapshot } from '@patternfly/pfe-tools/test/a11y-snapshot.js';\nimport { setViewport, sendKeys } from '@web/test-runner-commands';\n\nimport { allUpdates } from '@patternfly/pfe-tools/test/utils.js';\n\nimport { PfTabs } from '../pf-tabs.js';\nimport { PfTab } from '../pf-tab.js';\nimport { PfTabPanel } from '../pf-tab-panel.js';\n\nimport '@patternfly/pfe-tools/test/stub-logger.js';\n\nfunction press(key: string) {\n return async function() {\n await sendKeys({ press: key });\n };\n}\n\ndescribe('<pf-tabs>', function() {\n it('instantiates imperatively', function() {\n expect(document.createElement('pf-tabs')).to.be.an.instanceof(PfTabs);\n expect(document.createElement('pf-tab')).to.be.an.instanceof(PfTab);\n expect(document.createElement('pf-tab-panel')).to.be.an.instanceof(PfTabPanel);\n });\n\n it('should upgrade', async function() {\n const el = await createFixture<PfTabs>(html`<pf-tabs></pf-tabs>`);\n expect(el, 'pf-tabs should be an instance of PfeTabs')\n .to.be.an.instanceOf(customElements.get('pf-tabs'))\n .and\n .to.be.an.instanceOf(PfTabs);\n });\n\n describe('with three valid tab pairs', function() {\n let element: PfTabs;\n\n const updateComplete = () => allUpdates(element);\n\n beforeEach(async function() {\n element = await createFixture<PfTabs>(html`\n <pf-tabs>\n <pf-tab slot=\"tab\">tab-1</pf-tab>\n <pf-tab-panel>panel-1</pf-tab-panel>\n <pf-tab slot=\"tab\">tab-2</pf-tab>\n <pf-tab-panel>panel-2</pf-tab-panel>\n <pf-tab slot=\"tab\">tab-3</pf-tab>\n <pf-tab-panel>panel-3</pf-tab-panel>\n </pf-tabs>\n `);\n });\n\n beforeEach(updateComplete);\n\n it('should apply aria attributes on initialization', function() {\n const tabs = element.querySelectorAll('pf-tab');\n const panels = element.querySelectorAll('pf-tab-panel');\n tabs.forEach(function(tab: Element, index: number) {\n const tabId = tab.getAttribute('id');\n const tabControls = tab.getAttribute('aria-controls');\n panels.forEach(function(panel: Element, pindex: number) {\n if (index === pindex) {\n expect(panel.getAttribute('aria-labelledby')).to.equal(tabId);\n expect(panel.id).to.equal(tabControls);\n }\n });\n });\n });\n\n describe('pressing Tab', function() {\n beforeEach(press('Tab'));\n beforeEach(updateComplete);\n beforeEach(nextFrame);\n it('should activate the first focusable tab', function() {\n expect(element.querySelector('pf-tab')).to.have.attribute('active');\n });\n\n it('should activate the first tab panel', function() {\n expect(element.querySelector('pf-tab')).to.not.have.attribute('hidden');\n });\n });\n\n describe('setting the `vertical` attribute', function() {\n beforeEach(function() {\n element.setAttribute('vertical', '');\n });\n\n beforeEach(updateComplete);\n\n it('should have vertical styles', function() {\n // WARNING: asserting on shadow root content;\n const tabs = element.shadowRoot!.querySelector('[part=\"tabs\"]')!;\n const tabsVerticalStyles = getComputedStyle(tabs).flexDirection;\n expect(tabsVerticalStyles).to.be.equal('column');\n });\n });\n\n describe('setting the second tab\\'s `active` attribute', function() {\n beforeEach(function() {\n const [, tab] = element.querySelectorAll('pf-tab');\n tab!.active = true;\n });\n\n beforeEach(updateComplete);\n beforeEach(nextFrame);\n\n it('should activate the second tab', function() {\n const [, tab] = element.querySelectorAll('pf-tab');\n expect(tab).to.have.attribute('active');\n });\n\n it('should activate its panel', function() {\n const [, tab] = element.querySelectorAll('pf-tab');\n expect(tab).to.not.have.attribute('hidden');\n });\n\n it('should deactivate previously active tab', function() {\n expect(element.querySelector('pf-tab')).to.not.have.attribute('active');\n });\n\n it('should hide previously active panel', function() {\n expect(element.querySelector('pf-tab-panel')).to.have.attribute('hidden');\n });\n });\n\n describe('setting `activeIndex` to 2', function() {\n beforeEach(function() {\n element.activeIndex = 2;\n });\n\n beforeEach(updateComplete);\n beforeEach(nextFrame);\n\n it('should activate the third tab', function() {\n const [,, tab] = element.querySelectorAll('pf-tab');\n expect(tab).to.have.attribute('active');\n });\n\n it('should activate the third panel', async function() {\n const snapshot = await a11ySnapshot();\n expect(snapshot.children?.find(x => x.role === 'tabpanel')?.name).to.equal('tab-3');\n });\n\n describe('then setting the first tab\\'s `disabled` attribute', function() {\n beforeEach(async function() {\n element.querySelector('pf-tab')!.disabled = true;\n });\n\n beforeEach(updateComplete);\n\n it('should disable the button', async function() {\n const snapshot = await a11ySnapshot();\n const disabledTab = snapshot.children?.find(x => x.role === 'tab' && x.disabled);\n expect(disabledTab).to.be.ok;\n });\n\n describe('and clicking the disabled tab', function() {\n beforeEach(async function() {\n element.querySelector('pf-tab')!.click();\n });\n\n beforeEach(updateComplete);\n\n it('should not activate', function() {\n const [first] = element.querySelectorAll('pf-tab');\n expect(first).to.not.have.attribute('active');\n });\n\n it('should present the third panel to the ax tree', async function() {\n const snapshot = await a11ySnapshot();\n expect(snapshot.children?.find(x => x.role === 'tabpanel')?.name).to.equal('tab-3');\n });\n });\n\n describe('then setting `activeIndex` to 0 (i.e. the disabled tab\\'s index)', function() {\n beforeEach(function() {\n element.activeIndex = 0;\n });\n\n beforeEach(updateComplete);\n\n it('should not activate the first tab', function() {\n expect(element.querySelector('pf-tab')).to.not.have.attribute('active');\n });\n\n it('should present the third panel to the ax tree', async function() {\n const snapshot = await a11ySnapshot();\n expect(snapshot.children?.find(x => x.role === 'tabpanel')?.name).to.equal('tab-3');\n });\n });\n });\n });\n\n describe('when viewed in a small viewport', function() {\n beforeEach(async function() {\n // this is a comically narrow viewport, but our tabs have quite short\n // labels, so viewport must be itsy-pitsy in order to cause overflow\n await setViewport({ width: 100, height: 640 });\n });\n\n beforeEach(nextFrame);\n beforeEach(nextFrame);\n beforeEach(nextFrame);\n beforeEach(updateComplete);\n\n it('should have visible scroll buttons if overflowed', function() {\n // Note: overflow buttons are not included in the accessibility tree otherwise we'd test\n // for buttons there. tabindex=\"-1\" is used on the buttons to prevent focus and was a\n // decision made to keep logical keyboard navigation order flow between tabs and panels\n // as the next overflow button exists in the DOM between the tabs container and the open panel\n // and would disrupt the expected flow. For keyboard users they are able to scroll using the\n // left and right arrows keys and do not need direct access to the overflow buttons but still\n // exist as visual cues for which direction is overflowed\n const previousTab = element.shadowRoot!.querySelector('#previousTab')!;\n const nextTab = element.shadowRoot!.querySelector('#nextTab')!;\n expect(previousTab).to.not.be.null;\n expect(nextTab).to.not.be.null;\n const prevDisplayStyle = getComputedStyle(previousTab).display;\n const nextDisplayStyle = getComputedStyle(nextTab).display;\n expect(prevDisplayStyle ).to.not.equal('none');\n expect(nextDisplayStyle).to.not.equal('none');\n });\n });\n\n describe(`when navigated by keyboard`, function() {\n describe('when focused on the first tab', function() {\n beforeEach(async function() {\n element.querySelector('pf-tab')!.focus();\n });\n\n describe('pressing ArrowRight', function() {\n beforeEach(async function() {\n await sendKeys({ down: 'ArrowRight' });\n });\n\n beforeEach(updateComplete);\n\n it('should activate the next tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.not.have.attribute('active');\n expect(second).to.have.attribute('active');\n expect(third).to.not.have.attribute('active');\n });\n });\n\n describe('pressing ArrowLeft', function() {\n beforeEach(async function() {\n await sendKeys({ down: 'ArrowLeft' });\n });\n\n it('should activate the last tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.not.have.attribute('active');\n expect(second).to.not.have.attribute('active');\n expect(third).to.have.attribute('active');\n });\n describe('then pressing ArrowRight', function() {\n beforeEach(async function() {\n await sendKeys({ down: 'ArrowRight' });\n });\n\n beforeEach(updateComplete);\n\n it('should activate the first tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.have.attribute('active');\n expect(second).to.not.have.attribute('active');\n expect(third).to.not.have.attribute('active');\n });\n });\n });\n });\n });\n\n describe('setting the `manual` attribute', function() {\n beforeEach(function() {\n element.setAttribute('manual', '');\n });\n\n beforeEach(updateComplete);\n\n describe('pressing Tab', function() {\n beforeEach(press('Tab'));\n describe('pressing ArrowRight key', function() {\n beforeEach(press('ArrowRight'));\n\n beforeEach(updateComplete);\n\n it('should not activate second tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.have.attribute('active');\n expect(second).to.not.have.attribute('active');\n expect(third).to.not.have.attribute('active');\n });\n\n it('should focus the second tab', function() {\n const [, second] = element.querySelectorAll('pf-tab');\n expect(document.activeElement).to.equal(second);\n });\n\n describe('pressing enter key', function() {\n beforeEach(press('Enter'));\n\n beforeEach(updateComplete);\n\n it('should activate second tab', function() {\n const [first, second, third] = element.querySelectorAll('pf-tab');\n expect(first).to.not.have.attribute('active');\n expect(second).to.have.attribute('active');\n expect(third).to.not.have.attribute('active');\n expect(document.activeElement).to.equal(second);\n });\n });\n });\n });\n });\n });\n\n describe('when no active tab is given and the first tab is disabled', function() {\n let element: PfTabs;\n\n beforeEach(async function() {\n element = await createFixture<PfTabs>(html`\n <pf-tabs>\n <pf-tab id=\"tab1\" slot=\"tab\" disabled></pf-tab>\n <pf-tab id=\"tab2\" slot=\"tab\"></pf-tab>\n <pf-tab id=\"tab3\" slot=\"tab\"></pf-tab>\n <pf-tab id=\"tab4\" slot=\"tab\" disabled></pf-tab>\n <pf-tab id=\"tab5\" slot=\"tab\" aria-disabled=\"true\"></pf-tab>\n <pf-tab-panel></pf-tab-panel>\n <pf-tab-panel></pf-tab-panel>\n <pf-tab-panel></pf-tab-panel>\n <pf-tab-panel></pf-tab-panel>\n <pf-tab-panel></pf-tab-panel>\n </pf-tabs>\n `);\n });\n\n it('should activate the next focusable tab', function() {\n expect(element.activeTab).to.have.id('tab2');\n });\n });\n});\n"]}
|
|
@@ -104,7 +104,7 @@ PfTextArea.shadowRootOptions = {
|
|
|
104
104
|
...LitElement.shadowRootOptions,
|
|
105
105
|
delegatesFocus: true,
|
|
106
106
|
};
|
|
107
|
-
PfTextArea.version = "4.0.
|
|
107
|
+
PfTextArea.version = "4.0.2";
|
|
108
108
|
__decorate([
|
|
109
109
|
property({ reflect: true, attribute: 'accessible-label' })
|
|
110
110
|
], PfTextArea.prototype, "accessibleLabel", void 0);
|
|
@@ -123,7 +123,7 @@ PfTextInput.shadowRootOptions = {
|
|
|
123
123
|
...LitElement.shadowRootOptions,
|
|
124
124
|
delegatesFocus: true,
|
|
125
125
|
};
|
|
126
|
-
PfTextInput.version = "4.0.
|
|
126
|
+
PfTextInput.version = "4.0.2";
|
|
127
127
|
__decorate([
|
|
128
128
|
property({ type: Boolean, reflect: true, attribute: 'left-truncated' })
|
|
129
129
|
], PfTextInput.prototype, "leftTruncated", void 0);
|
package/pf-tile/pf-tile.js
CHANGED
|
@@ -47,7 +47,7 @@ let PfTimestamp = class PfTimestamp extends LitElement {
|
|
|
47
47
|
};
|
|
48
48
|
_PfTimestamp_timestamp = new WeakMap();
|
|
49
49
|
PfTimestamp.styles = [style];
|
|
50
|
-
PfTimestamp.version = "4.0.
|
|
50
|
+
PfTimestamp.version = "4.0.2";
|
|
51
51
|
__decorate([
|
|
52
52
|
property({ reflect: true, attribute: 'date-format' })
|
|
53
53
|
], PfTimestamp.prototype, "dateFormat", void 0);
|
package/pf-tooltip/pf-tooltip.js
CHANGED
|
@@ -135,7 +135,7 @@ _PfTooltip_updateTrigger = function _PfTooltip_updateTrigger() {
|
|
|
135
135
|
}
|
|
136
136
|
};
|
|
137
137
|
PfTooltip.styles = [styles];
|
|
138
|
-
PfTooltip.version = "4.0.
|
|
138
|
+
PfTooltip.version = "4.0.2";
|
|
139
139
|
__decorate([
|
|
140
140
|
property()
|
|
141
141
|
], PfTooltip.prototype, "position", void 0);
|
package/pfe.min.js
CHANGED
|
@@ -825,7 +825,7 @@ textarea[readonly] {
|
|
|
825
825
|
placeholder="${Lp(this.placeholder)}"
|
|
826
826
|
.value="${this.value}"
|
|
827
827
|
></textarea>
|
|
828
|
-
`}firstUpdated(){this.autoResize&&s(this,Tr,mc).call(this)}async formDisabledCallback(){await this.updateComplete,this.requestUpdate()}setCustomValidity(o){i(this,nt).setValidity({},o)}checkValidity(){return s(this,Er,gc).call(this),i(this,nt).checkValidity()}reportValidity(){return s(this,Er,gc).call(this),i(this,nt).reportValidity()}};zl=new WeakMap,nt=new WeakMap,zr=new WeakMap,Wl=new WeakSet,zp=function(){return!Cg&&this.matches(":disabled")||this.disabled},ct=new WeakSet,qt=function(){return this.shadowRoot?.getElementById("textarea")??null},Wr=new WeakSet,fc=function(o){if(o.target instanceof HTMLTextAreaElement){let{value:e}=o.target;this.value=e,i(this,nt).setFormValue(e)}this.autoResize&&s(this,Tr,mc).call(this)},Tr=new WeakSet,mc=function(){i(this,ct,qt).style.setProperty("--pf-c-form-control--textarea--Height","auto"),i(this,ct,qt).style.setProperty("--pf-c-form-control--textarea--Height",`${i(this,ct,qt).scrollHeight}px`)},Er=new WeakSet,gc=function(){i(this,ct,qt)?i(this,nt).setValidity(i(this,ct,qt).validity,i(this,ct,qt).validationMessage):i(this,zl).warn("await updateComplete before validating")},ao.styles=[wp],ao.formAssociated=!0,ao.shadowRootOptions={...Sp.shadowRootOptions,delegatesFocus:!0},r([it({reflect:!0,attribute:"accessible-label"})],ao.prototype,"accessibleLabel",2),r([it({reflect:!0})],ao.prototype,"validated",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"disabled",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"required",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"readonly",2),r([it()],ao.prototype,"placeholder",2),r([it()],ao.prototype,"value",2),r([it()],ao.prototype,"resize",2),r([it({type:Boolean,attribute:"auto-resize"})],ao.prototype,"autoResize",2),ao=r([Bg("pf-text-area")],ao);import{html as Tc,LitElement as ob}from"lit";import{customElement as tb}from"lit/decorators/custom-element.js";import{property as mt}from"lit/decorators/property.js";import{query as eb}from"lit/decorators/query.js";var st=class extends Event{constructor(t,o,e){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=o,this.subscribe=e??!1}};function bc(l){return l}var xe=class{constructor(t,o,e,a){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(c,p)=>{this.unsubscribe&&(this.unsubscribe!==p&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=c,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(c,p)),this.unsubscribe=p},this.host=t,o.context!==void 0){let c=o;this.context=c.context,this.callback=c.callback,this.subscribe=c.subscribe??!1}else this.context=o,this.callback=e,this.subscribe=a??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new st(this.context,this.t,this.subscribe))}};var Tl=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,o=!1){let e=o||!Object.is(t,this.o);this.o=t,e&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[o,{disposer:e}]of this.subscriptions)o(this.o,e)},t!==void 0&&(this.value=t)}addCallback(t,o,e){if(!e)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:o});let{disposer:a}=this.subscriptions.get(t);t(this.value,a)}clearCallbacks(){this.subscriptions.clear()}};var hc=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},Ce=class extends Tl{constructor(t,o,e){super(o.context!==void 0?o.initialValue:e),this.onContextRequest=a=>{let c=a.composedPath()[0];a.context===this.context&&c!==this.host&&(a.stopPropagation(),this.addCallback(a.callback,c,a.subscribe))},this.onProviderRequest=a=>{let c=a.composedPath()[0];if(a.context!==this.context||c===this.host)return;let p=new Set;for(let[f,{consumerHost:b}]of this.subscriptions)p.has(f)||(p.add(f),b.dispatchEvent(new st(this.context,f,!0)));a.stopPropagation()},this.host=t,o.context!==void 0?this.context=o.context:this.context=o,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new hc(this.context))}};var Rr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:e}=o;for(let{elementRef:a,callbackRef:c}of e){let p=a.deref(),f=c.deref();p===void 0||f===void 0||p.dispatchEvent(new st(t.context,f,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.composedPath()[0],e=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let c=a.callbacks.get(o);c===void 0&&a.callbacks.set(o,c=new WeakSet),c.has(e)||(c.add(e),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(e)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};function Mr({context:l}){return(t,o)=>{let e=new WeakMap;if(typeof o=="object")return o.addInitializer(function(){e.set(this,new Ce(this,{context:l}))}),{get(){return t.get.call(this)},set(a){return e.get(this)?.setValue(a),t.set.call(this,a)},init(a){return e.get(this)?.setValue(a),a}};{t.constructor.addInitializer(p=>{e.set(p,new Ce(p,{context:l}))});let a=Object.getOwnPropertyDescriptor(t,o),c;if(a===void 0){let p=new WeakMap;c={get(){return p.get(this)},set(f){e.get(this).setValue(f),p.set(this,f)},configurable:!0,enumerable:!0}}else{let p=a.set;c={...a,set(f){e.get(this).setValue(f),p?.call(this,f)}}}return void Object.defineProperty(t,o,c)}}}function pt({context:l,subscribe:t}){return(o,e)=>{typeof e=="object"?e.addInitializer(function(){new xe(this,{context:l,callback:a=>{o.set.call(this,a)},subscribe:t})}):o.constructor.addInitializer(a=>{new xe(a,{context:l,callback:c=>{a[e]=c},subscribe:t})})}}mo();import{classMap as rb}from"lit/directives/class-map.js";import{__classPrivateFieldGet as B,__classPrivateFieldSet as Fr}from"tslib";function uc(l,t,o=!1,e=!1){if(!l||!t)return!1;let a=l.getBoundingClientRect(),c=t.getBoundingClientRect(),p=Math.ceil(a.left),f=Math.floor(a.right),b=Math.ceil(c.left),x=Math.floor(c.right),S=b>=p&&x<=f,E=(o||!e&&a.width<c.width)&&(b<p&&x>p||x>f&&b<f);return S||E}var dt,Ir,xc,Q,Pr,El,Rl,Be,vc,_c,Et,Hr=class{get firstItem(){return B(this,Pr,"f").at(0)}get lastItem(){return B(this,Pr,"f").at(-1)}constructor(t,o){dt.add(this),this.host=t,this.options=o,Q.set(this,void 0),Pr.set(this,[]),El.set(this,void 0),Rl.set(this,void 0),Be.set(this,void 0),vc.set(this,new MutationObserver(e=>{for(let a of e)a.type==="childList"&&B(this,dt,"m",Et).call(this)})),_c.set(this,new ResizeObserver(()=>{B(this,dt,"m",Et).call(this)})),this.showScrollButtons=!1,this.overflowLeft=!1,this.overflowRight=!1,this.onScroll=()=>{clearTimeout(B(this,Rl,"f")),Fr(this,Rl,setTimeout(()=>B(this,dt,"m",Et).call(this),B(this,El,"f")),"f")},Fr(this,Be,o?.hideOverflowButtons??!1,"f"),Fr(this,El,o?.scrollTimeoutDelay??0,"f"),t.isConnected&&B(Ir,Ir,"f",xc).add(this),t.addController(this),t.isConnected&&this.hostConnected()}init(t,o){Fr(this,Q,t,"f"),Fr(this,Pr,o,"f")}scrollLeft(){if(!B(this,Q,"f"))return;let t=B(this,Q,"f").scrollLeft-B(this,Q,"f").clientWidth;B(this,Q,"f").scroll({left:t,behavior:"smooth"}),B(this,dt,"m",Et).call(this)}scrollRight(){if(!B(this,Q,"f"))return;let t=B(this,Q,"f").scrollLeft+B(this,Q,"f").clientWidth;B(this,Q,"f").scroll({left:t,behavior:"smooth"}),B(this,dt,"m",Et).call(this)}update(){B(this,dt,"m",Et).call(this)}hostConnected(){B(this,vc,"f").observe(this.host,{attributes:!1,childList:!0,subtree:!0}),B(this,_c,"f").observe(this.host),this.onScroll(),B(this,dt,"m",Et).call(this)}};Ir=Hr,Q=new WeakMap,Pr=new WeakMap,El=new WeakMap,Rl=new WeakMap,Be=new WeakMap,vc=new WeakMap,_c=new WeakMap,dt=new WeakSet,Et=function(){if(!this.firstItem||!this.lastItem||!B(this,Q,"f"))return;let t=this.overflowLeft,o=this.overflowRight;this.overflowLeft=!B(this,Be,"f")&&!uc(B(this,Q,"f"),this.firstItem),this.overflowRight=!B(this,Be,"f")&&!uc(B(this,Q,"f"),this.lastItem);let e=0;(this.overflowLeft||this.overflowRight)&&(e=(B(this,Q,"f").parentElement?.querySelector("button")?.getBoundingClientRect().width||0)*2),this.showScrollButtons=!B(this,Be,"f")&&B(this,Q,"f").scrollWidth>B(this,Q,"f").clientWidth+e,(t!==this.overflowLeft||o!==this.overflowRight)&&this.host.requestUpdate()};xc={value:new Set};globalThis.addEventListener?.("resize",()=>{for(let l of B(Ir,Ir,"f",xc))l.onScroll()},{capture:!1,passive:!0});import{__classPrivateFieldGet as Bc,__classPrivateFieldSet as Tp,__decorate as Sg}from"tslib";import{isServer as Lg}from"lit";Wt();import{__classPrivateFieldGet as Xo,__classPrivateFieldSet as Wp}from"tslib";import{isServer as kg}from"lit";var Ml,ft,$r,Cc;function wg(l){return!!l&&l.ariaHidden!=="true"&&!l.hasAttribute("inert")&&!l.hasAttribute("hidden")}var ye=class{get atFocusedItemIndex(){return Xo(this,$r,"f")}set atFocusedItemIndex(t){let o=Xo(this,$r,"f"),e=t>o?1:-1,{items:a,atFocusableItems:c}=this,p=a.indexOf(this.atFocusableItems.at(-1)),f=a.at(t),b=c.includes(f);if(c.length){let x=0;for(;!f||!b&&x++<=1e3;)t<0?t=p:t>=p?t=0:t=t+e,f=a.at(t),b=c.includes(f);if(x>=1e3)throw new Error("Could not atFocusedItemIndex")}Wp(this,$r,t,"f")}get controlsElements(){return this.options.getControlsElements?.()??[]}get atFocusableItems(){return this._items.filter(wg)}get itemsContainerElement(){return Xo(this,ft,"f")??null}set itemsContainerElement(t){t!==Xo(this,ft,"f")&&(Xo(this,ft,"f")?.removeEventListener("keydown",this.onKeydown),Wp(this,ft,t,"f"),Xo(this,ft,"f")?.addEventListener("keydown",this.onKeydown),this.host.requestUpdate())}constructor(t,o){Ml.add(this),this.host=t,this.options=o,ft.set(this,null),$r.set(this,-1),this._items=[],this.host.updateComplete.then(()=>this.initItems())}initItems(){this.items=this.options.getItems(),this.itemsContainerElement??(this.itemsContainerElement=Xo(this,Ml,"m",Cc).call(this))}hostConnected(){this.hostUpdate()}hostDisconnected(){Xo(this,ft,"f")?.removeEventListener("keydown",this.onKeydown)}hostUpdate(){this.itemsContainerElement??(this.itemsContainerElement=Xo(this,Ml,"m",Cc).call(this))}onKeydown(t){let o=this.options.getOrientation?.()??Xo(this,ft,"f")?.getAttribute("aria-orientation"),e=this._items.at(this.atFocusedItemIndex),a=o==="horizontal"||e?.tagName==="SELECT"||e?.getAttribute("role")==="spinbutton",c=o==="vertical";switch(t.key){case"ArrowLeft":if(c)return;this.atFocusedItemIndex--,t.stopPropagation(),t.preventDefault();break;case"ArrowRight":if(c)return;this.atFocusedItemIndex++,t.stopPropagation(),t.preventDefault();break;case"ArrowUp":if(a)return;this.atFocusedItemIndex--,t.stopPropagation(),t.preventDefault();break;case"ArrowDown":if(a)return;this.atFocusedItemIndex++,t.stopPropagation(),t.preventDefault();break;case"Home":t.target instanceof HTMLElement&&(t.target.hasAttribute("aria-activedescendant")||t.target.ariaActiveDescendantElement)||(this.atFocusedItemIndex=0,t.stopPropagation(),t.preventDefault());break;case"End":t.target instanceof HTMLElement&&(t.target.hasAttribute("aria-activedescendant")||t.target.ariaActiveDescendantElement)||(this.atFocusedItemIndex=this.items.length-1,t.stopPropagation(),t.preventDefault());break;default:break}this.host.requestUpdate()}};ft=new WeakMap,$r=new WeakMap,Ml=new WeakSet,Cc=function(){return this.options.getItemsContainer?.()??(!kg&&this.host instanceof HTMLElement?this.host:null)};mo();Wt();var yc,Fl,Pl,co=class l extends ye{static of(t,o){return new l(t,o)}get atFocusedItemIndex(){return super.atFocusedItemIndex}set atFocusedItemIndex(t){super.atFocusedItemIndex=t;let o=this.items.at(this.atFocusedItemIndex);for(let e of this.items)e.tabIndex=o===e?0:-1;Bc(this,Fl,"f")&&o?.focus(),this.host.requestUpdate()}get items(){return this._items}set items(t){this._items=t,Tp(this,Pl,new Set(t),"f");let o=Math.max(0,this.atFocusedItemIndex),[e]=this.atFocusableItems,a=e?t.indexOf(e):-1,c=t.indexOf(this.items.slice(o).concat(this.items.slice(0,o)).find(p=>this.atFocusableItems.includes(p)));this.atFocusedItemIndex=Math.max(a,c),this.host.requestUpdate()}constructor(t,o){super(t,o),this.host=t,yc.set(this,new k(this.host)),Fl.set(this,!1),Pl.set(this,new Set),this.initItems();let e=o.getItemsContainer?.()??this.host;Lg||(e instanceof HTMLElement?e.addEventListener("focusin",()=>Tp(this,Fl,!0,"f"),{once:!0}):Bc(this,yc,"f").warn("RovingTabindexController requires a getItemsContainer function"))}onKeydown(t){!t.ctrlKey&&!t.altKey&&!t.metaKey&&this.atFocusableItems.length&&t.composedPath().some(o=>Bc(this,Pl,"f").has(o))&&super.onKeydown(t)}};yc=new WeakMap,Fl=new WeakMap,Pl=new WeakMap;Sg([A],co.prototype,"onKeydown",null);mo();import{__classPrivateFieldGet as O,__classPrivateFieldSet as Ar}from"tslib";var Or,Dr,$l,Rt,Mt,ke,Il,Hl,Al=class{get tabs(){return[...O(this,Mt,"f").keys()]}get activeTab(){return this.tabs.find(t=>O(this,ke,"f").isActiveTab(t))}constructor(t,o){if(Or.add(this),Dr.set(this,void 0),$l.set(this,void 0),Rt.set(this,void 0),Mt.set(this,new Map),ke.set(this,void 0),Il.set(this,new MutationObserver(O(this,Or,"m",Hl).bind(this))),Ar(this,ke,o,"f"),Ar(this,Dr,new k(t),"f"),t instanceof HTMLElement)Ar(this,Rt,t,"f");else{let e=o.getHTMLElement?.();if(!e)throw new Error("TabsController must be instantiated with an HTMLElement or a `getHTMLElement()` option");Ar(this,Rt,e,"f")}Ar(this,$l,t,"f").addController(this),O(this,Rt,"f").addEventListener("slotchange",O(this,Or,"m",Hl)),O(this,Rt,"f").isConnected&&this.hostConnected()}hostConnected(){O(this,Il,"f").observe(O(this,Rt,"f"),{attributes:!1,childList:!0,subtree:!1}),O(this,Or,"m",Hl).call(this)}hostUpdated(){for(let[t,o]of O(this,Mt,"f"))o.setAttribute("aria-labelledby",t.id),t.setAttribute("aria-controls",o.id)}hostDisconnected(){O(this,Il,"f").disconnect()}panelFor(t){return O(this,Mt,"f").get(t)}tabFor(t){for(let[o,e]of O(this,Mt,"f"))if(t===e)return o}};Dr=new WeakMap,$l=new WeakMap,Rt=new WeakMap,Mt=new WeakMap,ke=new WeakMap,Il=new WeakMap,Or=new WeakSet,Hl=function(){O(this,Mt,"f").clear();let t=[],o=[];for(let e of O(this,Rt,"f").children)O(this,ke,"f").isTab(e)?(t.push(e),e.role??(e.role="tab")):O(this,ke,"f").isPanel(e)&&(o.push(e),e.role??(e.role="tabpanel"));for(t.length>o.length?O(this,Dr,"f").warn("Too many tabs!"):o.length>t.length&&O(this,Dr,"f").warn("Too many panels!");t.length;)O(this,Mt,"f").set(t.shift(),o.shift());O(this,$l,"f").requestUpdate()};import{LitElement as Pg,html as Ig}from"lit";import{customElement as Hg}from"lit/decorators/custom-element.js";import{property as zc}from"lit/decorators/property.js";import{queryAssignedElements as $g}from"lit/decorators/query-assigned-elements.js";import{classMap as Ag}from"lit/directives/class-map.js";Wt();Wt();import{__decorate as zg}from"tslib";function Ep(l,t,o=!1){let e;return function(...a){let c=this,p=function(){e=null,o||l.apply(c,a)},f=o&&!e;clearTimeout(e),e=window.setTimeout(p,t),f&&l.apply(c,a)}}mo();var Ur=class l{constructor(t,o){this.host=t,this.options=o,this.mo=new MutationObserver(this.parse),this.cache=new Map,this.class=t.constructor,this.logger=new k(this.host),l.instances.set(t,this);let e=this.options?.properties??{};for(let[a,c]of Object.entries(e))this.initProp(a,c);t.addController(this),this.cascadeProperties=Ep(this.cascadeProperties,1)}hostUpdated(){this.cascadeProperties()}hostConnected(){this.mo.observe(this.host,{attributes:!0,childList:!0}),this.cascadeProperties()}hostDisconnected(){this.mo.disconnect()}cascadeProperties(t=this.host.children){if(this.host.isConnected){let o=this.cache.keys();if(!t)return this._cascadeAttributes(o,this.cache);for(let e of t)if(e instanceof Element){for(let a of o)if(e.matches(a)){let c=this.cache.get(a);for(let p of c??[])this._copyAttribute(p,e)}}}}initProp(t,o){for(let e of[o].flat(1/0).filter(Boolean)){let{attribute:a}=this.class.getPropertyOptions(t),c=typeof a=="string"?a:t.toLowerCase();this.cache.get(e)?this.cache.get(e)?.push(c):this.cache.set(e,[c])}}parse(t){for(let o of t??[])o.type==="childList"&&o.addedNodes.length?this.cascadeProperties(o.addedNodes):o.type==="attributes"&&this._cascadeAttributes(this.cache.keys(),this.cache)}async _copyAttribute(t,o){this.logger.log(`copying ${t} to ${o}`);let e=this.host.getAttribute(t);o.isConnected&&(e==null?o.removeAttribute(t):o.setAttribute(t,e))}_cascadeAttributes(t,o){for(let e of t)for(let a of o.get(e)??[])this._cascadeAttribute(a,e)}_cascadeAttribute(t,o){let e=[...this.host.querySelectorAll(o),...this.host.shadowRoot?.querySelectorAll(o)??[]];for(let a of e)this._copyAttribute(t,a)}};Ur.instances=new WeakMap;zg([A],Ur.prototype,"parse",null);mo();function Rp(l){return function(t,o){let{alias:e,...a}=l,c=t.constructor,p=c.getPropertyOptions(e);c.createProperty(o,{...p,...a}),c.addInitializer(f=>{f.addController(new kc(f,l,o))})}}var kc=class{constructor(t,o,e){this.host=t,this.options=o,this.deprecatedKey=e,this.logged=!1,this.logger=new k(t)}hostUpdate(){let{deprecatedKey:t,options:{alias:o}}=this;this.host[t]&&this.host[o]!==this.host[t]&&(this.logged||(this.logger.warn(`${t} is deprecated, use ${o} instead`),this.logged=!0),this.host[o]=this.host[t])}};mo();var Ol=class{constructor(t,o,e){this.host=t,this.options=e,this.initializer=o.bind(t),this.mo=new MutationObserver(this.initializer),this.logger=new k(this.host),t.addController(this)}hostConnected(){this.hasLightDOM()?this.initializer():this.options?.emptyWarning&&this.logger.warn(this.options?.emptyWarning),this.initObserver()}hostDisconnected(){this.mo.disconnect()}initObserver(){(this.options?.observe??!0)&&this.mo.observe(this.host,typeof this.options?.observe!="object"?{childList:!0}:this.options?.observe)}hasLightDOM(){return this.host.children.length>0||(this.host.textContent??"").trim().length>0}};function Mp(l){return function(t,o){t.constructor.addInitializer(e=>{let a=t[o],c=new Ol(e,a,l);e.isConnected&&c.hostConnected()})}}function wc(l,t){return function(o,e){let a=o.connectedCallback,c=o.disconnectedCallback,p=o[e];o.connectedCallback=function(){a?.call(this),this.addEventListener(l,p,t)},o.disconnectedCallback=function(){c?.call(this),this.removeEventListener(l,p,t)}}}import{__classPrivateFieldGet as Sc,__classPrivateFieldSet as Wg}from"tslib";import{notEqual as Tg}from"lit";var Dl,Ul,Lc,Fp=Symbol("uninitialized"),Nr=class{constructor(t,o){Dl.add(this),this.host=t,this.options=o,this.oldVal=Fp,Ul.set(this,!0)}hostConnected(){Sc(this,Dl,"m",Lc).call(this)}async hostUpdate(){Sc(this,Dl,"m",Lc).call(this);let{oldVal:t,options:{waitFor:o,propertyName:e,callback:a}}=this;if(!a)throw new Error(`no callback for ${e}`);let c=this.host[e];if(this.oldVal=c,c!==t)switch(o){case"connected":if(!this.host.isConnected){let b=this.host.connectedCallback;await new Promise(x=>{this.host.connectedCallback=function(){x(b?.call(this))}})}break;case"firstUpdated":this.host.hasUpdated||await this.host.updateComplete;break;case"updated":await this.host.updateComplete;break}let f=this.host.constructor.getPropertyOptions(this.options.propertyName).hasChanged??Tg;(Sc(this,Ul,"f")||f(t,c))&&(a.call(this.host,t,c),Wg(this,Ul,!1,"f"))}};Ul=new WeakMap,Dl=new WeakSet,Lc=function(){this.oldVal===Fp&&(this.oldVal=this.host[this.options.propertyName])};function L(l,t){return function(o,e){let a=o[e];if(typeof a!="function")throw new Error("@observes must decorate a class method");o.constructor.addInitializer(p=>{p.addController(new Nr(p,{...t,propertyName:l,callback:a}))})}}function N(l="pfe"){return`${l}-${Math.random().toString(36).substr(2,9)}`}import{isServer as Eg}from"lit";var Pp;function Rg(){let l=new Rr;return Eg||l.attach(document.body),l}function Nl(...l){return Pp??(Pp=Rg()),bc(...l)}var Vt=class extends Event{constructor(o){super("expand",{bubbles:!0,cancelable:!0});this.tab=o}},we=Nl(Symbol("pf-tabs-context"));import{css as Mg}from"lit";var Fg=Mg`[hidden] {
|
|
828
|
+
`}firstUpdated(){this.autoResize&&s(this,Tr,mc).call(this)}async formDisabledCallback(){await this.updateComplete,this.requestUpdate()}setCustomValidity(o){i(this,nt).setValidity({},o)}checkValidity(){return s(this,Er,gc).call(this),i(this,nt).checkValidity()}reportValidity(){return s(this,Er,gc).call(this),i(this,nt).reportValidity()}};zl=new WeakMap,nt=new WeakMap,zr=new WeakMap,Wl=new WeakSet,zp=function(){return!Cg&&this.matches(":disabled")||this.disabled},ct=new WeakSet,qt=function(){return this.shadowRoot?.getElementById("textarea")??null},Wr=new WeakSet,fc=function(o){if(o.target instanceof HTMLTextAreaElement){let{value:e}=o.target;this.value=e,i(this,nt).setFormValue(e)}this.autoResize&&s(this,Tr,mc).call(this)},Tr=new WeakSet,mc=function(){i(this,ct,qt).style.setProperty("--pf-c-form-control--textarea--Height","auto"),i(this,ct,qt).style.setProperty("--pf-c-form-control--textarea--Height",`${i(this,ct,qt).scrollHeight}px`)},Er=new WeakSet,gc=function(){i(this,ct,qt)?i(this,nt).setValidity(i(this,ct,qt).validity,i(this,ct,qt).validationMessage):i(this,zl).warn("await updateComplete before validating")},ao.styles=[wp],ao.formAssociated=!0,ao.shadowRootOptions={...Sp.shadowRootOptions,delegatesFocus:!0},r([it({reflect:!0,attribute:"accessible-label"})],ao.prototype,"accessibleLabel",2),r([it({reflect:!0})],ao.prototype,"validated",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"disabled",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"required",2),r([it({type:Boolean,reflect:!0})],ao.prototype,"readonly",2),r([it()],ao.prototype,"placeholder",2),r([it()],ao.prototype,"value",2),r([it()],ao.prototype,"resize",2),r([it({type:Boolean,attribute:"auto-resize"})],ao.prototype,"autoResize",2),ao=r([Bg("pf-text-area")],ao);import{html as Tc,LitElement as ob}from"lit";import{customElement as tb}from"lit/decorators/custom-element.js";import{property as mt}from"lit/decorators/property.js";import{query as eb}from"lit/decorators/query.js";var st=class extends Event{constructor(t,o,e){super("context-request",{bubbles:!0,composed:!0}),this.context=t,this.callback=o,this.subscribe=e??!1}};function bc(l){return l}var xe=class{constructor(t,o,e,a){if(this.subscribe=!1,this.provided=!1,this.value=void 0,this.t=(c,p)=>{this.unsubscribe&&(this.unsubscribe!==p&&(this.provided=!1,this.unsubscribe()),this.subscribe||this.unsubscribe()),this.value=c,this.host.requestUpdate(),this.provided&&!this.subscribe||(this.provided=!0,this.callback&&this.callback(c,p)),this.unsubscribe=p},this.host=t,o.context!==void 0){let c=o;this.context=c.context,this.callback=c.callback,this.subscribe=c.subscribe??!1}else this.context=o,this.callback=e,this.subscribe=a??!1;this.host.addController(this)}hostConnected(){this.dispatchRequest()}hostDisconnected(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0)}dispatchRequest(){this.host.dispatchEvent(new st(this.context,this.t,this.subscribe))}};var Tl=class{get value(){return this.o}set value(t){this.setValue(t)}setValue(t,o=!1){let e=o||!Object.is(t,this.o);this.o=t,e&&this.updateObservers()}constructor(t){this.subscriptions=new Map,this.updateObservers=()=>{for(let[o,{disposer:e}]of this.subscriptions)o(this.o,e)},t!==void 0&&(this.value=t)}addCallback(t,o,e){if(!e)return void t(this.value);this.subscriptions.has(t)||this.subscriptions.set(t,{disposer:()=>{this.subscriptions.delete(t)},consumerHost:o});let{disposer:a}=this.subscriptions.get(t);t(this.value,a)}clearCallbacks(){this.subscriptions.clear()}};var hc=class extends Event{constructor(t){super("context-provider",{bubbles:!0,composed:!0}),this.context=t}},Ce=class extends Tl{constructor(t,o,e){super(o.context!==void 0?o.initialValue:e),this.onContextRequest=a=>{let c=a.composedPath()[0];a.context===this.context&&c!==this.host&&(a.stopPropagation(),this.addCallback(a.callback,c,a.subscribe))},this.onProviderRequest=a=>{let c=a.composedPath()[0];if(a.context!==this.context||c===this.host)return;let p=new Set;for(let[f,{consumerHost:b}]of this.subscriptions)p.has(f)||(p.add(f),b.dispatchEvent(new st(this.context,f,!0)));a.stopPropagation()},this.host=t,o.context!==void 0?this.context=o.context:this.context=o,this.attachListeners(),this.host.addController?.(this)}attachListeners(){this.host.addEventListener("context-request",this.onContextRequest),this.host.addEventListener("context-provider",this.onProviderRequest)}hostConnected(){this.host.dispatchEvent(new hc(this.context))}};var Rr=class{constructor(){this.pendingContextRequests=new Map,this.onContextProvider=t=>{let o=this.pendingContextRequests.get(t.context);if(o===void 0)return;this.pendingContextRequests.delete(t.context);let{requests:e}=o;for(let{elementRef:a,callbackRef:c}of e){let p=a.deref(),f=c.deref();p===void 0||f===void 0||p.dispatchEvent(new st(t.context,f,!0))}},this.onContextRequest=t=>{if(t.subscribe!==!0)return;let o=t.composedPath()[0],e=t.callback,a=this.pendingContextRequests.get(t.context);a===void 0&&this.pendingContextRequests.set(t.context,a={callbacks:new WeakMap,requests:[]});let c=a.callbacks.get(o);c===void 0&&a.callbacks.set(o,c=new WeakSet),c.has(e)||(c.add(e),a.requests.push({elementRef:new WeakRef(o),callbackRef:new WeakRef(e)}))}}attach(t){t.addEventListener("context-request",this.onContextRequest),t.addEventListener("context-provider",this.onContextProvider)}detach(t){t.removeEventListener("context-request",this.onContextRequest),t.removeEventListener("context-provider",this.onContextProvider)}};function Mr({context:l}){return(t,o)=>{let e=new WeakMap;if(typeof o=="object")return o.addInitializer(function(){e.set(this,new Ce(this,{context:l}))}),{get(){return t.get.call(this)},set(a){return e.get(this)?.setValue(a),t.set.call(this,a)},init(a){return e.get(this)?.setValue(a),a}};{t.constructor.addInitializer(p=>{e.set(p,new Ce(p,{context:l}))});let a=Object.getOwnPropertyDescriptor(t,o),c;if(a===void 0){let p=new WeakMap;c={get(){return p.get(this)},set(f){e.get(this).setValue(f),p.set(this,f)},configurable:!0,enumerable:!0}}else{let p=a.set;c={...a,set(f){e.get(this).setValue(f),p?.call(this,f)}}}return void Object.defineProperty(t,o,c)}}}function pt({context:l,subscribe:t}){return(o,e)=>{typeof e=="object"?e.addInitializer(function(){new xe(this,{context:l,callback:a=>{o.set.call(this,a)},subscribe:t})}):o.constructor.addInitializer(a=>{new xe(a,{context:l,callback:c=>{a[e]=c},subscribe:t})})}}mo();import{classMap as rb}from"lit/directives/class-map.js";import{__classPrivateFieldGet as B,__classPrivateFieldSet as Fr}from"tslib";function uc(l,t,o=!1,e=!1){if(!l||!t)return!1;let a=l.getBoundingClientRect(),c=t.getBoundingClientRect(),p=Math.ceil(a.left),f=Math.floor(a.right),b=Math.ceil(c.left),x=Math.floor(c.right),S=b>=p&&x<=f,E=(o||!e&&a.width<c.width)&&(b<p&&x>p||x>f&&b<f);return S||E}var dt,Ir,xc,Q,Pr,El,Rl,Be,vc,_c,Et,Hr=class{get firstItem(){return B(this,Pr,"f").at(0)}get lastItem(){return B(this,Pr,"f").at(-1)}constructor(t,o){dt.add(this),this.host=t,this.options=o,Q.set(this,void 0),Pr.set(this,[]),El.set(this,void 0),Rl.set(this,void 0),Be.set(this,void 0),vc.set(this,new MutationObserver(e=>{for(let a of e)a.type==="childList"&&B(this,dt,"m",Et).call(this)})),_c.set(this,new ResizeObserver(()=>{requestAnimationFrame(()=>{B(this,dt,"m",Et).call(this)})})),this.showScrollButtons=!1,this.overflowLeft=!1,this.overflowRight=!1,this.onScroll=()=>{clearTimeout(B(this,Rl,"f")),Fr(this,Rl,setTimeout(()=>B(this,dt,"m",Et).call(this),B(this,El,"f")),"f")},Fr(this,Be,o?.hideOverflowButtons??!1,"f"),Fr(this,El,o?.scrollTimeoutDelay??0,"f"),t.isConnected&&B(Ir,Ir,"f",xc).add(this),t.addController(this),t.isConnected&&this.hostConnected()}init(t,o){Fr(this,Q,t,"f"),Fr(this,Pr,o,"f")}scrollLeft(){if(!B(this,Q,"f"))return;let t=B(this,Q,"f").scrollLeft-B(this,Q,"f").clientWidth;B(this,Q,"f").scroll({left:t,behavior:"smooth"}),B(this,dt,"m",Et).call(this)}scrollRight(){if(!B(this,Q,"f"))return;let t=B(this,Q,"f").scrollLeft+B(this,Q,"f").clientWidth;B(this,Q,"f").scroll({left:t,behavior:"smooth"}),B(this,dt,"m",Et).call(this)}update(){B(this,dt,"m",Et).call(this)}hostConnected(){B(this,vc,"f").observe(this.host,{attributes:!1,childList:!0,subtree:!0}),B(this,_c,"f").observe(this.host),this.onScroll(),B(this,dt,"m",Et).call(this)}};Ir=Hr,Q=new WeakMap,Pr=new WeakMap,El=new WeakMap,Rl=new WeakMap,Be=new WeakMap,vc=new WeakMap,_c=new WeakMap,dt=new WeakSet,Et=function(){if(!this.firstItem||!this.lastItem||!B(this,Q,"f"))return;let t=this.overflowLeft,o=this.overflowRight;this.overflowLeft=!B(this,Be,"f")&&!uc(B(this,Q,"f"),this.firstItem),this.overflowRight=!B(this,Be,"f")&&!uc(B(this,Q,"f"),this.lastItem);let e=0;(this.overflowLeft||this.overflowRight)&&(e=(B(this,Q,"f").parentElement?.querySelector("button")?.getBoundingClientRect().width||0)*2),this.showScrollButtons=!B(this,Be,"f")&&B(this,Q,"f").scrollWidth>B(this,Q,"f").clientWidth+e,(t!==this.overflowLeft||o!==this.overflowRight)&&this.host.requestUpdate()};xc={value:new Set};globalThis.addEventListener?.("resize",()=>{for(let l of B(Ir,Ir,"f",xc))l.onScroll()},{capture:!1,passive:!0});import{__classPrivateFieldGet as Bc,__classPrivateFieldSet as Tp,__decorate as Sg}from"tslib";import{isServer as Lg}from"lit";Wt();import{__classPrivateFieldGet as Xo,__classPrivateFieldSet as Wp}from"tslib";import{isServer as kg}from"lit";var Ml,ft,$r,Cc;function wg(l){return!!l&&l.ariaHidden!=="true"&&!l.hasAttribute("inert")&&!l.hasAttribute("hidden")}var ye=class{get atFocusedItemIndex(){return Xo(this,$r,"f")}set atFocusedItemIndex(t){let o=Xo(this,$r,"f"),e=t>o?1:-1,{items:a,atFocusableItems:c}=this,p=a.indexOf(this.atFocusableItems.at(-1)),f=a.at(t),b=c.includes(f);if(c.length){let x=0;for(;!f||!b&&x++<=1e3;)t<0?t=p:t>=p?t=0:t=t+e,f=a.at(t),b=c.includes(f);if(x>=1e3)throw new Error("Could not atFocusedItemIndex")}Wp(this,$r,t,"f")}get controlsElements(){return this.options.getControlsElements?.()??[]}get atFocusableItems(){return this._items.filter(wg)}get itemsContainerElement(){return Xo(this,ft,"f")??null}set itemsContainerElement(t){t!==Xo(this,ft,"f")&&(Xo(this,ft,"f")?.removeEventListener("keydown",this.onKeydown),Wp(this,ft,t,"f"),Xo(this,ft,"f")?.addEventListener("keydown",this.onKeydown),this.host.requestUpdate())}constructor(t,o){Ml.add(this),this.host=t,this.options=o,ft.set(this,null),$r.set(this,-1),this._items=[],this.host.updateComplete.then(()=>this.initItems())}initItems(){this.items=this.options.getItems(),this.itemsContainerElement??(this.itemsContainerElement=Xo(this,Ml,"m",Cc).call(this))}hostConnected(){this.hostUpdate()}hostDisconnected(){Xo(this,ft,"f")?.removeEventListener("keydown",this.onKeydown)}hostUpdate(){this.itemsContainerElement??(this.itemsContainerElement=Xo(this,Ml,"m",Cc).call(this))}onKeydown(t){let o=this.options.getOrientation?.()??Xo(this,ft,"f")?.getAttribute("aria-orientation"),e=this._items.at(this.atFocusedItemIndex),a=o==="horizontal"||e?.tagName==="SELECT"||e?.getAttribute("role")==="spinbutton",c=o==="vertical";switch(t.key){case"ArrowLeft":if(c)return;this.atFocusedItemIndex--,t.stopPropagation(),t.preventDefault();break;case"ArrowRight":if(c)return;this.atFocusedItemIndex++,t.stopPropagation(),t.preventDefault();break;case"ArrowUp":if(a)return;this.atFocusedItemIndex--,t.stopPropagation(),t.preventDefault();break;case"ArrowDown":if(a)return;this.atFocusedItemIndex++,t.stopPropagation(),t.preventDefault();break;case"Home":t.target instanceof HTMLElement&&(t.target.hasAttribute("aria-activedescendant")||t.target.ariaActiveDescendantElement)||(this.atFocusedItemIndex=0,t.stopPropagation(),t.preventDefault());break;case"End":t.target instanceof HTMLElement&&(t.target.hasAttribute("aria-activedescendant")||t.target.ariaActiveDescendantElement)||(this.atFocusedItemIndex=this.items.length-1,t.stopPropagation(),t.preventDefault());break;default:break}this.host.requestUpdate()}};ft=new WeakMap,$r=new WeakMap,Ml=new WeakSet,Cc=function(){return this.options.getItemsContainer?.()??(!kg&&this.host instanceof HTMLElement?this.host:null)};mo();Wt();var yc,Fl,Pl,co=class l extends ye{static of(t,o){return new l(t,o)}get atFocusedItemIndex(){return super.atFocusedItemIndex}set atFocusedItemIndex(t){super.atFocusedItemIndex=t;let o=this.items.at(this.atFocusedItemIndex);for(let e of this.items)e.tabIndex=o===e?0:-1;Bc(this,Fl,"f")&&o?.focus(),this.host.requestUpdate()}get items(){return this._items}set items(t){this._items=t,Tp(this,Pl,new Set(t),"f");let o=Math.max(0,this.atFocusedItemIndex),[e]=this.atFocusableItems,a=e?t.indexOf(e):-1,c=t.indexOf(this.items.slice(o).concat(this.items.slice(0,o)).find(p=>this.atFocusableItems.includes(p)));this.atFocusedItemIndex=Math.max(a,c),this.host.requestUpdate()}constructor(t,o){super(t,o),this.host=t,yc.set(this,new k(this.host)),Fl.set(this,!1),Pl.set(this,new Set),this.initItems();let e=o.getItemsContainer?.()??this.host;Lg||(e instanceof HTMLElement?e.addEventListener("focusin",()=>Tp(this,Fl,!0,"f"),{once:!0}):Bc(this,yc,"f").warn("RovingTabindexController requires a getItemsContainer function"))}onKeydown(t){!t.ctrlKey&&!t.altKey&&!t.metaKey&&this.atFocusableItems.length&&t.composedPath().some(o=>Bc(this,Pl,"f").has(o))&&super.onKeydown(t)}};yc=new WeakMap,Fl=new WeakMap,Pl=new WeakMap;Sg([A],co.prototype,"onKeydown",null);mo();import{__classPrivateFieldGet as O,__classPrivateFieldSet as Ar}from"tslib";var Or,Dr,$l,Rt,Mt,ke,Il,Hl,Al=class{get tabs(){return[...O(this,Mt,"f").keys()]}get activeTab(){return this.tabs.find(t=>O(this,ke,"f").isActiveTab(t))}constructor(t,o){if(Or.add(this),Dr.set(this,void 0),$l.set(this,void 0),Rt.set(this,void 0),Mt.set(this,new Map),ke.set(this,void 0),Il.set(this,new MutationObserver(O(this,Or,"m",Hl).bind(this))),Ar(this,ke,o,"f"),Ar(this,Dr,new k(t),"f"),t instanceof HTMLElement)Ar(this,Rt,t,"f");else{let e=o.getHTMLElement?.();if(!e)throw new Error("TabsController must be instantiated with an HTMLElement or a `getHTMLElement()` option");Ar(this,Rt,e,"f")}Ar(this,$l,t,"f").addController(this),O(this,Rt,"f").addEventListener("slotchange",O(this,Or,"m",Hl)),O(this,Rt,"f").isConnected&&this.hostConnected()}hostConnected(){O(this,Il,"f").observe(O(this,Rt,"f"),{attributes:!1,childList:!0,subtree:!1}),O(this,Or,"m",Hl).call(this)}hostUpdated(){for(let[t,o]of O(this,Mt,"f"))o.setAttribute("aria-labelledby",t.id),t.setAttribute("aria-controls",o.id)}hostDisconnected(){O(this,Il,"f").disconnect()}panelFor(t){return O(this,Mt,"f").get(t)}tabFor(t){for(let[o,e]of O(this,Mt,"f"))if(t===e)return o}};Dr=new WeakMap,$l=new WeakMap,Rt=new WeakMap,Mt=new WeakMap,ke=new WeakMap,Il=new WeakMap,Or=new WeakSet,Hl=function(){O(this,Mt,"f").clear();let t=[],o=[];for(let e of O(this,Rt,"f").children)O(this,ke,"f").isTab(e)?(t.push(e),e.role??(e.role="tab")):O(this,ke,"f").isPanel(e)&&(o.push(e),e.role??(e.role="tabpanel"));for(t.length>o.length?O(this,Dr,"f").warn("Too many tabs!"):o.length>t.length&&O(this,Dr,"f").warn("Too many panels!");t.length;)O(this,Mt,"f").set(t.shift(),o.shift());O(this,$l,"f").requestUpdate()};import{LitElement as Pg,html as Ig}from"lit";import{customElement as Hg}from"lit/decorators/custom-element.js";import{property as zc}from"lit/decorators/property.js";import{queryAssignedElements as $g}from"lit/decorators/query-assigned-elements.js";import{classMap as Ag}from"lit/directives/class-map.js";Wt();Wt();import{__decorate as zg}from"tslib";function Ep(l,t,o=!1){let e;return function(...a){let c=this,p=function(){e=null,o||l.apply(c,a)},f=o&&!e;clearTimeout(e),e=window.setTimeout(p,t),f&&l.apply(c,a)}}mo();var Ur=class l{constructor(t,o){this.host=t,this.options=o,this.mo=new MutationObserver(this.parse),this.cache=new Map,this.class=t.constructor,this.logger=new k(this.host),l.instances.set(t,this);let e=this.options?.properties??{};for(let[a,c]of Object.entries(e))this.initProp(a,c);t.addController(this),this.cascadeProperties=Ep(this.cascadeProperties,1)}hostUpdated(){this.cascadeProperties()}hostConnected(){this.mo.observe(this.host,{attributes:!0,childList:!0}),this.cascadeProperties()}hostDisconnected(){this.mo.disconnect()}cascadeProperties(t=this.host.children){if(this.host.isConnected){let o=this.cache.keys();if(!t)return this._cascadeAttributes(o,this.cache);for(let e of t)if(e instanceof Element){for(let a of o)if(e.matches(a)){let c=this.cache.get(a);for(let p of c??[])this._copyAttribute(p,e)}}}}initProp(t,o){for(let e of[o].flat(1/0).filter(Boolean)){let{attribute:a}=this.class.getPropertyOptions(t),c=typeof a=="string"?a:t.toLowerCase();this.cache.get(e)?this.cache.get(e)?.push(c):this.cache.set(e,[c])}}parse(t){for(let o of t??[])o.type==="childList"&&o.addedNodes.length?this.cascadeProperties(o.addedNodes):o.type==="attributes"&&this._cascadeAttributes(this.cache.keys(),this.cache)}async _copyAttribute(t,o){this.logger.log(`copying ${t} to ${o}`);let e=this.host.getAttribute(t);o.isConnected&&(e==null?o.removeAttribute(t):o.setAttribute(t,e))}_cascadeAttributes(t,o){for(let e of t)for(let a of o.get(e)??[])this._cascadeAttribute(a,e)}_cascadeAttribute(t,o){let e=[...this.host.querySelectorAll(o),...this.host.shadowRoot?.querySelectorAll(o)??[]];for(let a of e)this._copyAttribute(t,a)}};Ur.instances=new WeakMap;zg([A],Ur.prototype,"parse",null);mo();function Rp(l){return function(t,o){let{alias:e,...a}=l,c=t.constructor,p=c.getPropertyOptions(e);c.createProperty(o,{...p,...a}),c.addInitializer(f=>{f.addController(new kc(f,l,o))})}}var kc=class{constructor(t,o,e){this.host=t,this.options=o,this.deprecatedKey=e,this.logged=!1,this.logger=new k(t)}hostUpdate(){let{deprecatedKey:t,options:{alias:o}}=this;this.host[t]&&this.host[o]!==this.host[t]&&(this.logged||(this.logger.warn(`${t} is deprecated, use ${o} instead`),this.logged=!0),this.host[o]=this.host[t])}};mo();var Ol=class{constructor(t,o,e){this.host=t,this.options=e,this.initializer=o.bind(t),this.mo=new MutationObserver(this.initializer),this.logger=new k(this.host),t.addController(this)}hostConnected(){this.hasLightDOM()?this.initializer():this.options?.emptyWarning&&this.logger.warn(this.options?.emptyWarning),this.initObserver()}hostDisconnected(){this.mo.disconnect()}initObserver(){(this.options?.observe??!0)&&this.mo.observe(this.host,typeof this.options?.observe!="object"?{childList:!0}:this.options?.observe)}hasLightDOM(){return this.host.children.length>0||(this.host.textContent??"").trim().length>0}};function Mp(l){return function(t,o){t.constructor.addInitializer(e=>{let a=t[o],c=new Ol(e,a,l);e.isConnected&&c.hostConnected()})}}function wc(l,t){return function(o,e){let a=o.connectedCallback,c=o.disconnectedCallback,p=o[e];o.connectedCallback=function(){a?.call(this),this.addEventListener(l,p,t)},o.disconnectedCallback=function(){c?.call(this),this.removeEventListener(l,p,t)}}}import{__classPrivateFieldGet as Sc,__classPrivateFieldSet as Wg}from"tslib";import{notEqual as Tg}from"lit";var Dl,Ul,Lc,Fp=Symbol("uninitialized"),Nr=class{constructor(t,o){Dl.add(this),this.host=t,this.options=o,this.oldVal=Fp,Ul.set(this,!0)}hostConnected(){Sc(this,Dl,"m",Lc).call(this)}async hostUpdate(){Sc(this,Dl,"m",Lc).call(this);let{oldVal:t,options:{waitFor:o,propertyName:e,callback:a}}=this;if(!a)throw new Error(`no callback for ${e}`);let c=this.host[e];if(this.oldVal=c,c!==t)switch(o){case"connected":if(!this.host.isConnected){let b=this.host.connectedCallback;await new Promise(x=>{this.host.connectedCallback=function(){x(b?.call(this))}})}break;case"firstUpdated":this.host.hasUpdated||await this.host.updateComplete;break;case"updated":await this.host.updateComplete;break}let f=this.host.constructor.getPropertyOptions(this.options.propertyName).hasChanged??Tg;(Sc(this,Ul,"f")||f(t,c))&&(a.call(this.host,t,c),Wg(this,Ul,!1,"f"))}};Ul=new WeakMap,Dl=new WeakSet,Lc=function(){this.oldVal===Fp&&(this.oldVal=this.host[this.options.propertyName])};function L(l,t){return function(o,e){let a=o[e];if(typeof a!="function")throw new Error("@observes must decorate a class method");o.constructor.addInitializer(p=>{p.addController(new Nr(p,{...t,propertyName:l,callback:a}))})}}function N(l="pfe"){return`${l}-${Math.random().toString(36).substr(2,9)}`}import{isServer as Eg}from"lit";var Pp;function Rg(){let l=new Rr;return Eg||l.attach(document.body),l}function Nl(...l){return Pp??(Pp=Rg()),bc(...l)}var Vt=class extends Event{constructor(o){super("expand",{bubbles:!0,cancelable:!0});this.tab=o}},we=Nl(Symbol("pf-tabs-context"));import{css as Mg}from"lit";var Fg=Mg`[hidden] {
|
|
829
829
|
display: none !important;
|
|
830
830
|
}
|
|
831
831
|
|
|
@@ -5291,18 +5291,29 @@ slot::before {
|
|
|
5291
5291
|
}
|
|
5292
5292
|
|
|
5293
5293
|
:host([vertical]) #container {
|
|
5294
|
-
--pf-c-jump-links__list--PaddingTop:
|
|
5295
|
-
var(--pf-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
--pf-c-jump-links__list--
|
|
5301
|
-
|
|
5294
|
+
--pf-c-jump-links__list--PaddingTop:
|
|
5295
|
+
var(--pf-c-jump-links--m-vertical__list--PaddingTop,
|
|
5296
|
+
var(--pf-global--spacer--md, 1rem)
|
|
5297
|
+
);
|
|
5298
|
+
--pf-c-jump-links__list--PaddingRight:
|
|
5299
|
+
var(--pf-c-jump-links--m-vertical__list--PaddingRight,0);
|
|
5300
|
+
--pf-c-jump-links__list--PaddingBottom:
|
|
5301
|
+
var(--pf-c-jump-links--m-vertical__list--PaddingBottom,
|
|
5302
|
+
var(--pf-global--spacer--md, 1rem)
|
|
5303
|
+
);
|
|
5304
|
+
--pf-c-jump-links__list--PaddingLeft:
|
|
5305
|
+
var(--pf-c-jump-links--m-vertical__list--PaddingLeft, 0);
|
|
5306
|
+
--pf-c-jump-links__list--before--BorderTopWidth:
|
|
5307
|
+
var(--pf-c-jump-links--m-vertical__list--before--BorderTopWidth, 0);
|
|
5308
|
+
--pf-c-jump-links__list--before--BorderLeftWidth:
|
|
5309
|
+
var(--pf-c-jump-links--m-vertical__list--before--BorderLeftWidth,
|
|
5302
5310
|
var(--pf-global--BorderWidth--sm, 1px));
|
|
5303
|
-
--pf-c-jump-links__item--m-current__link--before--BorderTopWidth:
|
|
5304
|
-
|
|
5305
|
-
|
|
5311
|
+
--pf-c-jump-links__item--m-current__link--before--BorderTopWidth:
|
|
5312
|
+
var(--pf-c-jump-links--m-vertical__item--m-current__link--before--BorderTopWidth, 0);
|
|
5313
|
+
--pf-c-jump-links__item--m-current__link--before--BorderLeftWidth:
|
|
5314
|
+
var(--pf-c-jump-links--m-vertical__item--m-current__link--before--BorderLeftWidth,
|
|
5315
|
+
var(--pf-global--BorderWidth--lg, 3px)
|
|
5316
|
+
);
|
|
5306
5317
|
--pf-c-jump-links__list--FlexDirection: var(--pf-c-jump-links--m-vertical__list--FlexDirection, column);
|
|
5307
5318
|
}
|
|
5308
5319
|
|