@duetds/components 4.34.1 → 4.35.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/hydrate/index.js +373 -25
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +2 -2
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +48 -0
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +68 -0
- package/lib/cjs/duet-button_2.cjs.entry.js +4 -3
- package/lib/cjs/duet-caption_4.cjs.entry.js +2 -2
- package/lib/cjs/duet-card.cjs.entry.js +1 -1
- package/lib/cjs/duet-checkbox.cjs.entry.js +1 -1
- package/lib/cjs/duet-choice_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
- package/lib/cjs/duet-cookie-consent.cjs.entry.js +1 -1
- package/lib/cjs/duet-date-picker.cjs.entry.js +2 -2
- package/lib/cjs/duet-divider_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table-button.cjs.entry.js +1 -1
- package/lib/cjs/duet-editable-table_4.cjs.entry.js +10 -1
- package/lib/cjs/duet-empty-state.cjs.entry.js +1 -1
- package/lib/cjs/duet-fieldset.cjs.entry.js +1 -1
- package/lib/cjs/duet-footer.cjs.entry.js +2 -2
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +2 -2
- package/lib/cjs/duet-hero.cjs.entry.js +1 -1
- package/lib/cjs/duet-icon.cjs.entry.js +1 -1
- package/lib/cjs/duet-input_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-layout.cjs.entry.js +1 -1
- package/lib/cjs/duet-list_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-modal.cjs.entry.js +15 -3
- package/lib/cjs/duet-notification_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-number-input.cjs.entry.js +1 -1
- package/lib/cjs/duet-progress.cjs.entry.js +1 -1
- package/lib/cjs/duet-radio_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-range-slider.cjs.entry.js +1 -1
- package/lib/cjs/duet-scrollable_3.cjs.entry.js +406 -0
- package/lib/cjs/duet-select.cjs.entry.js +1 -1
- package/lib/cjs/duet-step_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-textarea.cjs.entry.js +1 -1
- package/lib/cjs/duet-toggle.cjs.entry.js +1 -1
- package/lib/cjs/duet-tooltip.cjs.entry.js +1 -1
- package/lib/cjs/duet-tray.cjs.entry.js +1 -1
- package/lib/cjs/duet-upload-aria-status.cjs.entry.js +1 -1
- package/lib/cjs/duet-visually-hidden.cjs.entry.js +1 -1
- package/lib/cjs/duet.cjs.js +2 -2
- package/lib/cjs/{focus-utils-30f5dc06.js → focus-utils-adf0830f.js} +1 -1
- package/lib/cjs/{index-1c10bbfb.js → index-ebc216a6.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/collection/collection-manifest.json +10 -6
- package/lib/collection/components/duet-badge/duet-badge.js +1 -1
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumb.css +57 -0
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumb.js +131 -0
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.css +63 -0
- package/lib/collection/components/duet-breadcrumbs/duet-breadcrumbs.js +104 -0
- package/lib/collection/components/duet-button/duet-button.css +22 -4
- package/lib/collection/components/duet-button/duet-button.js +6 -2
- package/lib/collection/components/duet-footer/duet-footer.css +2 -1
- package/lib/collection/components/duet-header/duet-header.css +3 -9
- package/lib/collection/components/duet-link/duet-link.js +1 -1
- package/lib/collection/components/duet-modal/duet-modal.js +33 -3
- package/lib/collection/components/duet-scrollable/duet-scrollable.css +83 -0
- package/lib/collection/components/duet-scrollable/duet-scrollable.js +218 -0
- package/lib/collection/components/duet-tab/duet-tab.js +63 -1
- package/lib/collection/components/duet-tab-group/duet-tab-group.css +2 -3
- package/lib/collection/components/duet-tab-group/duet-tab-group.js +79 -16
- package/lib/collection/components/duet-upload/duet-upload.js +25 -0
- package/lib/custom-elements-bundle/index.d.ts +18 -0
- package/lib/custom-elements-bundle/index.js +348 -29
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-571015b8.system.entry.js → p-00d1f654.system.entry.js} +1 -1
- package/lib/duet/{p-6dc026cf.system.entry.js → p-04e69095.system.entry.js} +1 -1
- package/lib/duet/{p-3e9fe1c7.system.entry.js → p-085226d4.system.entry.js} +1 -1
- package/lib/duet/{p-fe3806e2.system.entry.js → p-087794ce.system.entry.js} +1 -1
- package/lib/duet/{p-c85583d4.system.entry.js → p-0af5a8c0.system.entry.js} +1 -1
- package/lib/duet/{p-8fcaeb1b.entry.js → p-0c2f5442.entry.js} +1 -1
- package/lib/duet/{p-1a4204b7.entry.js → p-0e638e4d.entry.js} +1 -1
- package/lib/duet/{p-fd009368.entry.js → p-0ed5a97c.entry.js} +1 -1
- package/lib/duet/{p-9dad09a8.entry.js → p-0fa24ad5.entry.js} +1 -1
- package/lib/duet/p-10632ef8.entry.js +4 -0
- package/lib/duet/{p-6b1b2655.entry.js → p-14e42cd6.entry.js} +1 -1
- package/lib/duet/{p-f1dbb4ec.entry.js → p-17572919.entry.js} +1 -1
- package/lib/duet/{p-5d2ddf99.entry.js → p-1a30dc8e.entry.js} +1 -1
- package/lib/duet/{p-b1401fd8.system.entry.js → p-1bed3ddf.system.entry.js} +1 -1
- package/lib/duet/{p-8e478364.system.entry.js → p-1f736745.system.entry.js} +1 -1
- package/lib/duet/{p-39cd816e.entry.js → p-21faf286.entry.js} +1 -1
- package/lib/duet/{p-99cd16d8.system.entry.js → p-24481f5b.system.entry.js} +1 -1
- package/lib/duet/p-29dc9ba4.system.js +4 -0
- package/lib/duet/p-2a674d85.entry.js +4 -0
- package/lib/duet/p-2b3d4a87.entry.js +4 -0
- package/lib/duet/{p-ffcfbd7a.system.entry.js → p-3076d759.system.entry.js} +1 -1
- package/lib/duet/{p-e10f1828.entry.js → p-36a2d533.entry.js} +1 -1
- package/lib/duet/{p-8adcc2f9.system.entry.js → p-3b9a85ec.system.entry.js} +1 -1
- package/lib/duet/{p-ca68c8f0.entry.js → p-3cb4e5c0.entry.js} +1 -1
- package/lib/duet/p-3ccaf840.system.entry.js +4 -0
- package/lib/duet/{p-a4c0ce83.system.entry.js → p-407b0a9e.system.entry.js} +1 -1
- package/lib/duet/{p-580c57ea.entry.js → p-48cc1039.entry.js} +1 -1
- package/lib/duet/{p-af7685aa.system.entry.js → p-49f82fb6.system.entry.js} +1 -1
- package/lib/duet/{p-f55ea1cc.system.entry.js → p-50aa0600.system.entry.js} +1 -1
- package/lib/duet/{p-c04ca724.system.entry.js → p-59da6977.system.entry.js} +1 -1
- package/lib/duet/{p-fe1a2f0d.system.entry.js → p-5e1b47ae.system.entry.js} +1 -1
- package/lib/duet/p-5fe48b92.js +4 -0
- package/lib/duet/p-62ecba0c.entry.js +4 -0
- package/lib/duet/{p-97dc72c2.system.entry.js → p-6450fb96.system.entry.js} +1 -1
- package/lib/duet/{p-4b400f7d.system.entry.js → p-674df722.system.entry.js} +1 -1
- package/lib/duet/{p-80d40375.entry.js → p-684eca44.entry.js} +1 -1
- package/lib/duet/{p-cecdebf3.entry.js → p-6c7d2e78.entry.js} +1 -1
- package/lib/duet/{p-c0472744.system.entry.js → p-73ee8a98.system.entry.js} +1 -1
- package/lib/duet/{p-4b480fdc.entry.js → p-743a76fb.entry.js} +1 -1
- package/lib/duet/p-7471bf49.system.entry.js +4 -0
- package/lib/duet/{p-1d8d319c.system.entry.js → p-74f7726a.system.entry.js} +1 -1
- package/lib/duet/{p-1164a119.system.entry.js → p-777ea91c.system.entry.js} +1 -1
- package/lib/duet/{p-df37c5cd.entry.js → p-7983ec01.entry.js} +1 -1
- package/lib/duet/{p-dc27e127.system.entry.js → p-7c42729a.system.entry.js} +1 -1
- package/lib/duet/p-7e87870b.js +4 -0
- package/lib/duet/{p-2c89e016.system.entry.js → p-81d33c0d.system.entry.js} +1 -1
- package/lib/duet/{p-ca2b3f6a.system.entry.js → p-868cf1d0.system.entry.js} +1 -1
- package/lib/duet/{p-420c000b.entry.js → p-86cdd6ae.entry.js} +1 -1
- package/lib/duet/{p-95edfcb8.system.entry.js → p-8825b949.system.entry.js} +1 -1
- package/lib/duet/{p-a0129887.system.entry.js → p-8b046f32.system.entry.js} +1 -1
- package/lib/duet/{p-5cf1d847.entry.js → p-8d49cfce.entry.js} +1 -1
- package/lib/duet/{p-2b1707bd.system.entry.js → p-8d4c1df6.system.entry.js} +1 -1
- package/lib/duet/{p-e5120c30.entry.js → p-8dd65109.entry.js} +1 -1
- package/lib/duet/{p-5db0676e.system.entry.js → p-9628f617.system.entry.js} +1 -1
- package/lib/duet/p-98f7ed54.system.entry.js +4 -0
- package/lib/duet/{p-aa5ba0fd.entry.js → p-99ab3ae7.entry.js} +1 -1
- package/lib/duet/{p-15945ba7.system.entry.js → p-99dd842a.system.entry.js} +1 -1
- package/lib/duet/{p-8ad673ef.entry.js → p-9bdd6e13.entry.js} +1 -1
- package/lib/duet/{p-08498e46.entry.js → p-a69cec5c.entry.js} +1 -1
- package/lib/duet/{p-545dcb04.entry.js → p-ac3066a5.entry.js} +1 -1
- package/lib/duet/p-b252dd83.system.entry.js +4 -0
- package/lib/duet/{p-477c6c71.entry.js → p-b6914af6.entry.js} +1 -1
- package/lib/duet/{p-f7700f25.entry.js → p-b7e51d7d.entry.js} +1 -1
- package/lib/duet/{p-a9dc4dd9.system.entry.js → p-bae4038e.system.entry.js} +1 -1
- package/lib/duet/{p-30f15c84.system.entry.js → p-c14a82ed.system.entry.js} +1 -1
- package/lib/duet/{p-d1d6dc7a.entry.js → p-c16492e3.entry.js} +1 -1
- package/lib/duet/p-c4ccaaa2.system.js +4 -0
- package/lib/duet/{p-b71cbe4b.entry.js → p-cb35d64f.entry.js} +1 -1
- package/lib/duet/{p-87703af9.entry.js → p-cd2f9010.entry.js} +1 -1
- package/lib/duet/{p-6bb9a991.entry.js → p-d2d9c6ac.entry.js} +1 -1
- package/lib/duet/{p-b061516e.system.entry.js → p-d8189d01.system.entry.js} +1 -1
- package/lib/duet/{p-309f9094.entry.js → p-dd26cd81.entry.js} +1 -1
- package/lib/duet/{p-603a61dc.system.entry.js → p-de7025f9.system.entry.js} +1 -1
- package/lib/duet/p-e095b87c.entry.js +4 -0
- package/lib/duet/{p-13f72df0.entry.js → p-e510911a.entry.js} +1 -1
- package/lib/duet/{p-1842a4db.system.entry.js → p-e585efe8.system.entry.js} +1 -1
- package/lib/duet/p-e841a4f2.system.entry.js +4 -0
- package/lib/duet/{p-0bb75f62.system.entry.js → p-ed346e6c.system.entry.js} +1 -1
- package/lib/duet/{p-3d47d6d4.entry.js → p-edcc923f.entry.js} +1 -1
- package/lib/duet/{p-f1c7f166.system.entry.js → p-f485fdc9.system.entry.js} +1 -1
- package/lib/duet/{p-71261eb7.entry.js → p-f4d70bbf.entry.js} +1 -1
- package/lib/duet/p-fa082925.entry.js +4 -0
- package/lib/duet/{p-41938e76.system.js → p-fb116ef7.system.js} +1 -1
- package/lib/duet/{p-9db71699.entry.js → p-fb142d09.entry.js} +1 -1
- package/lib/duet/{p-93a51797.entry.js → p-fbef000c.entry.js} +1 -1
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +2 -2
- package/lib/esm/duet-breadcrumb.entry.js +44 -0
- package/lib/esm/duet-breadcrumbs.entry.js +64 -0
- package/lib/esm/duet-button_2.entry.js +4 -3
- package/lib/esm/duet-caption_4.entry.js +2 -2
- package/lib/esm/duet-card.entry.js +1 -1
- package/lib/esm/duet-checkbox.entry.js +1 -1
- package/lib/esm/duet-choice_2.entry.js +2 -2
- package/lib/esm/duet-collapsible.entry.js +1 -1
- package/lib/esm/duet-cookie-consent.entry.js +1 -1
- package/lib/esm/duet-date-picker.entry.js +2 -2
- package/lib/esm/duet-divider_2.entry.js +1 -1
- package/lib/esm/duet-editable-table-button.entry.js +1 -1
- package/lib/esm/duet-editable-table_4.entry.js +10 -1
- package/lib/esm/duet-empty-state.entry.js +1 -1
- package/lib/esm/duet-fieldset.entry.js +1 -1
- package/lib/esm/duet-footer.entry.js +2 -2
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +2 -2
- package/lib/esm/duet-hero.entry.js +1 -1
- package/lib/esm/duet-icon.entry.js +1 -1
- package/lib/esm/duet-input_2.entry.js +1 -1
- package/lib/esm/duet-layout.entry.js +1 -1
- package/lib/esm/duet-list_2.entry.js +1 -1
- package/lib/esm/duet-modal.entry.js +15 -3
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-progress.entry.js +1 -1
- package/lib/esm/duet-radio_2.entry.js +1 -1
- package/lib/esm/duet-range-slider.entry.js +1 -1
- package/lib/esm/duet-scrollable_3.entry.js +400 -0
- package/lib/esm/duet-select.entry.js +1 -1
- package/lib/esm/duet-step_2.entry.js +1 -1
- package/lib/esm/duet-textarea.entry.js +1 -1
- package/lib/esm/duet-toggle.entry.js +1 -1
- package/lib/esm/duet-tooltip.entry.js +1 -1
- package/lib/esm/duet-tray.entry.js +1 -1
- package/lib/esm/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm/duet-visually-hidden.entry.js +1 -1
- package/lib/esm/duet.js +2 -2
- package/lib/esm/{focus-utils-bf7d1e80.js → focus-utils-6ed104b0.js} +1 -1
- package/lib/esm/{index-f813a624.js → index-b7694cc6.js} +1 -1
- package/lib/esm/loader.js +2 -2
- package/lib/esm-es5/duet-alert.entry.js +1 -1
- package/lib/esm-es5/duet-badge.entry.js +1 -1
- package/lib/esm-es5/duet-breadcrumb.entry.js +4 -0
- package/lib/esm-es5/duet-breadcrumbs.entry.js +4 -0
- package/lib/esm-es5/duet-button_2.entry.js +1 -1
- package/lib/esm-es5/duet-caption_4.entry.js +1 -1
- package/lib/esm-es5/duet-card.entry.js +1 -1
- package/lib/esm-es5/duet-checkbox.entry.js +1 -1
- package/lib/esm-es5/duet-choice_2.entry.js +1 -1
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-cookie-consent.entry.js +1 -1
- package/lib/esm-es5/duet-date-picker.entry.js +1 -1
- package/lib/esm-es5/duet-divider_2.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table-button.entry.js +1 -1
- package/lib/esm-es5/duet-editable-table_4.entry.js +1 -1
- package/lib/esm-es5/duet-empty-state.entry.js +1 -1
- package/lib/esm-es5/duet-fieldset.entry.js +1 -1
- package/lib/esm-es5/duet-footer.entry.js +1 -1
- package/lib/esm-es5/duet-grid_2.entry.js +1 -1
- package/lib/esm-es5/duet-header_2.entry.js +1 -1
- package/lib/esm-es5/duet-hero.entry.js +1 -1
- package/lib/esm-es5/duet-icon.entry.js +1 -1
- package/lib/esm-es5/duet-input_2.entry.js +1 -1
- package/lib/esm-es5/duet-layout.entry.js +1 -1
- package/lib/esm-es5/duet-list_2.entry.js +1 -1
- package/lib/esm-es5/duet-modal.entry.js +1 -1
- package/lib/esm-es5/duet-notification_2.entry.js +1 -1
- package/lib/esm-es5/duet-number-input.entry.js +1 -1
- package/lib/esm-es5/duet-progress.entry.js +1 -1
- package/lib/esm-es5/duet-radio_2.entry.js +1 -1
- package/lib/esm-es5/duet-range-slider.entry.js +1 -1
- package/lib/esm-es5/duet-scrollable_3.entry.js +4 -0
- package/lib/esm-es5/duet-select.entry.js +1 -1
- package/lib/esm-es5/duet-step_2.entry.js +1 -1
- package/lib/esm-es5/duet-textarea.entry.js +1 -1
- package/lib/esm-es5/duet-toggle.entry.js +1 -1
- package/lib/esm-es5/duet-tooltip.entry.js +1 -1
- package/lib/esm-es5/duet-tray.entry.js +1 -1
- package/lib/esm-es5/duet-upload-aria-status.entry.js +1 -1
- package/lib/esm-es5/duet-visually-hidden.entry.js +1 -1
- package/lib/esm-es5/duet.js +1 -1
- package/lib/esm-es5/{focus-utils-bf7d1e80.js → focus-utils-6ed104b0.js} +1 -1
- package/lib/esm-es5/index-b7694cc6.js +4 -0
- package/lib/esm-es5/loader.js +1 -1
- package/lib/html.html-data.json +128 -5
- package/lib/types/components/duet-badge/duet-badge.d.ts +1 -1
- package/lib/types/components/duet-breadcrumbs/duet-breadcrumb.d.ts +31 -0
- package/lib/types/components/duet-breadcrumbs/duet-breadcrumbs.d.ts +23 -0
- package/lib/types/components/duet-button/duet-button.d.ts +2 -1
- package/lib/types/components/duet-modal/duet-modal.d.ts +5 -1
- package/lib/types/components/duet-scrollable/duet-scrollable.d.ts +47 -0
- package/lib/types/components/duet-tab/duet-tab.d.ts +11 -0
- package/lib/types/components/duet-tab-group/duet-tab-group.d.ts +11 -0
- package/lib/types/components/duet-upload/duet-upload.d.ts +6 -0
- package/lib/types/components.d.ts +146 -1
- package/package.json +6 -5
- package/lib/cjs/duet-tab_2.cjs.entry.js +0 -213
- package/lib/duet/p-0d546cd6.system.entry.js +0 -4
- package/lib/duet/p-3ff50cee.entry.js +0 -4
- package/lib/duet/p-478d2995.entry.js +0 -4
- package/lib/duet/p-71a94fb9.system.entry.js +0 -4
- package/lib/duet/p-76b98e4d.system.js +0 -4
- package/lib/duet/p-80f90fef.js +0 -4
- package/lib/duet/p-9c3b48fc.entry.js +0 -4
- package/lib/duet/p-c33d1202.js +0 -4
- package/lib/duet/p-d9a93e45.entry.js +0 -4
- package/lib/duet/p-e54705b2.system.js +0 -4
- package/lib/duet/p-f3cd9499.system.entry.js +0 -4
- package/lib/esm/duet-tab_2.entry.js +0 -208
- package/lib/esm-es5/duet-tab_2.entry.js +0 -4
- package/lib/esm-es5/index-f813a624.js +0 -4
|
@@ -2,14 +2,29 @@
|
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
4
|
import { Build, Component, h, Prop } from "@stencil/core";
|
|
5
|
+
import { getLocaleString } from "../../utils/language-utils";
|
|
5
6
|
export class DuetTab {
|
|
7
|
+
constructor() {
|
|
8
|
+
/**
|
|
9
|
+
* Defaults for AccessibleLabel
|
|
10
|
+
* @default null
|
|
11
|
+
*/
|
|
12
|
+
this.accessibleDescriptionDefault = null;
|
|
13
|
+
/**
|
|
14
|
+
* String for AccessibleLabel
|
|
15
|
+
* @default null
|
|
16
|
+
*/
|
|
17
|
+
this.accessibleDescription = this.accessibleDescriptionDefault
|
|
18
|
+
? getLocaleString(this.accessibleDescriptionDefault)
|
|
19
|
+
: null;
|
|
20
|
+
}
|
|
6
21
|
/**
|
|
7
22
|
* render() function
|
|
8
23
|
* Always the last one in the class.
|
|
9
24
|
*/
|
|
10
25
|
render() {
|
|
11
26
|
if (Build.isBrowser) {
|
|
12
|
-
return (h("div", { role: "tabpanel", class: { "duet-tab": true, selected: this.selected } },
|
|
27
|
+
return (h("div", { role: "tabpanel", class: { "duet-tab": true, selected: this.selected }, "aria-description": this.accessibleDescription },
|
|
13
28
|
h("slot", null)));
|
|
14
29
|
}
|
|
15
30
|
}
|
|
@@ -55,6 +70,53 @@ export class DuetTab {
|
|
|
55
70
|
},
|
|
56
71
|
"attribute": "selected",
|
|
57
72
|
"reflect": true
|
|
73
|
+
},
|
|
74
|
+
"accessibleDescriptionDefault": {
|
|
75
|
+
"type": "string",
|
|
76
|
+
"mutable": false,
|
|
77
|
+
"complexType": {
|
|
78
|
+
"original": "DuetLangObject | string",
|
|
79
|
+
"resolved": "DuetLangObject | string",
|
|
80
|
+
"references": {
|
|
81
|
+
"DuetLangObject": {
|
|
82
|
+
"location": "import",
|
|
83
|
+
"path": "../../utils/language-utils"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": false,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [{
|
|
91
|
+
"name": "default",
|
|
92
|
+
"text": "null"
|
|
93
|
+
}],
|
|
94
|
+
"text": "Defaults for AccessibleLabel"
|
|
95
|
+
},
|
|
96
|
+
"attribute": "accessible-description-defaults",
|
|
97
|
+
"reflect": false,
|
|
98
|
+
"defaultValue": "null"
|
|
99
|
+
},
|
|
100
|
+
"accessibleDescription": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "string",
|
|
105
|
+
"resolved": "string",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [{
|
|
112
|
+
"name": "default",
|
|
113
|
+
"text": "null"
|
|
114
|
+
}],
|
|
115
|
+
"text": "String for AccessibleLabel"
|
|
116
|
+
},
|
|
117
|
+
"attribute": "accessible-description",
|
|
118
|
+
"reflect": false,
|
|
119
|
+
"defaultValue": "this.accessibleDescriptionDefault\n ? getLocaleString(this.accessibleDescriptionDefault)\n : null"
|
|
58
120
|
}
|
|
59
121
|
}; }
|
|
60
122
|
}
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
.duet-tab-group-tabs.duet-m-0 {
|
|
37
37
|
margin: 0 !important;
|
|
38
38
|
}
|
|
39
|
-
.duet-tab-group-tabs.duet-tab-group-hidden {
|
|
39
|
+
.duet-tab-group-tabs.duet-tab-group-collapses.duet-tab-group-hidden {
|
|
40
40
|
display: none;
|
|
41
41
|
}
|
|
42
42
|
@media (min-width: 36em) {
|
|
43
|
-
.duet-tab-group-tabs.duet-tab-group-hidden {
|
|
43
|
+
.duet-tab-group-tabs.duet-tab-group-collapses.duet-tab-group-hidden {
|
|
44
44
|
display: block;
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -76,7 +76,6 @@
|
|
|
76
76
|
cursor: pointer;
|
|
77
77
|
background: white;
|
|
78
78
|
border: 2px solid #e1e3e6;
|
|
79
|
-
border-style: solid;
|
|
80
79
|
border-radius: 0;
|
|
81
80
|
transition: 150ms ease;
|
|
82
81
|
}
|
|
@@ -19,6 +19,15 @@ export class DuetTabGroup {
|
|
|
19
19
|
* Theme of the component.
|
|
20
20
|
*/
|
|
21
21
|
this.theme = "";
|
|
22
|
+
/**
|
|
23
|
+
* Controls whether the tab-group should scroll (by inflection this will disable collapsing to select box on small screens),
|
|
24
|
+
* if this is a number instead of true it will be used as "amount of items to scroll"
|
|
25
|
+
*/
|
|
26
|
+
this.scrolls = false;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the tab-group collapses to a select dropwdown in minor breakpoints
|
|
29
|
+
*/
|
|
30
|
+
this.collapses = true;
|
|
22
31
|
/**
|
|
23
32
|
* Style variation of the tab group.
|
|
24
33
|
*/
|
|
@@ -73,12 +82,18 @@ export class DuetTabGroup {
|
|
|
73
82
|
button.focus();
|
|
74
83
|
}
|
|
75
84
|
};
|
|
76
|
-
this.renderTab = (
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
this.renderTab = () => {
|
|
86
|
+
const renderedTabs = this.tabs.map((element, index) => {
|
|
87
|
+
return (h("button", { role: "tab", id: this.getButtonId(index), "aria-controls": this.getTabId(index), "aria-selected": element.selected ? "true" : "false", "aria-description": this.getAccessibleDescription(index), type: "button", class: {
|
|
88
|
+
"duet-p-0": this.padding === "none",
|
|
89
|
+
"duet-tab-button": true,
|
|
90
|
+
selected: element.selected,
|
|
91
|
+
}, onClick: () => this.openTab(index), onKeyDown: ev => this.handleKeyDown(ev) }, element.label));
|
|
92
|
+
});
|
|
93
|
+
if (this.scrolls) {
|
|
94
|
+
return h("duet-scrollable", { selected: this.selected }, renderedTabs);
|
|
95
|
+
}
|
|
96
|
+
return renderedTabs;
|
|
82
97
|
};
|
|
83
98
|
}
|
|
84
99
|
/**
|
|
@@ -97,7 +112,7 @@ export class DuetTabGroup {
|
|
|
97
112
|
subtree: true,
|
|
98
113
|
});
|
|
99
114
|
}
|
|
100
|
-
this.updateTabs();
|
|
115
|
+
await this.updateTabs();
|
|
101
116
|
}
|
|
102
117
|
disconnectedCallback() {
|
|
103
118
|
if (this.mutationO) {
|
|
@@ -138,19 +153,27 @@ export class DuetTabGroup {
|
|
|
138
153
|
/**
|
|
139
154
|
* Local methods.
|
|
140
155
|
*/
|
|
156
|
+
getTabs() {
|
|
157
|
+
const allTabs = Array.from(this.element.querySelectorAll("duet-tab"));
|
|
158
|
+
const localTabs = allTabs.filter(tab => tab.closest("duet-tab-group") === this.element);
|
|
159
|
+
if (localTabs.length === 0) {
|
|
160
|
+
throw new Error("[duet-tabs] Must have at least one tab");
|
|
161
|
+
}
|
|
162
|
+
// filter out any nested tabs
|
|
163
|
+
return localTabs;
|
|
164
|
+
}
|
|
141
165
|
getButtonId(index) {
|
|
142
166
|
return `${this.id}-button-${index}`;
|
|
143
167
|
}
|
|
144
168
|
getTabId(index) {
|
|
145
169
|
return `${this.id}-tab-${index}`;
|
|
146
170
|
}
|
|
171
|
+
getAccessibleDescription(index) {
|
|
172
|
+
const description = this.tabs[index].getAttribute("accessible-description") || null;
|
|
173
|
+
return description;
|
|
174
|
+
}
|
|
147
175
|
async updateTabs() {
|
|
148
|
-
|
|
149
|
-
// filter out any nested tabs
|
|
150
|
-
this.tabs = allTabs.filter(tab => tab.closest("duet-tab-group") === this.element);
|
|
151
|
-
if (this.tabs.length === 0) {
|
|
152
|
-
throw new Error("[duet-tabs] Must have at least one tab");
|
|
153
|
-
}
|
|
176
|
+
this.tabs = this.getTabs();
|
|
154
177
|
this.tabs.forEach((tab, index) => {
|
|
155
178
|
tab.id = this.getTabId(index);
|
|
156
179
|
tab.setAttribute("aria-labelledby", this.getButtonId(index));
|
|
@@ -158,6 +181,7 @@ export class DuetTabGroup {
|
|
|
158
181
|
this.selected = index;
|
|
159
182
|
}
|
|
160
183
|
});
|
|
184
|
+
return;
|
|
161
185
|
}
|
|
162
186
|
/**
|
|
163
187
|
* render() function
|
|
@@ -168,20 +192,23 @@ export class DuetTabGroup {
|
|
|
168
192
|
"duet-tab-group": true,
|
|
169
193
|
"duet-theme-turva": this.theme === "turva",
|
|
170
194
|
[`duet-tab-variation-${this.variation}`]: true,
|
|
195
|
+
"duet-tab-group-scrolls": this.scrolls,
|
|
196
|
+
"duet-tab-group-collapses": this.collapses,
|
|
171
197
|
} },
|
|
172
|
-
this.tabs.length > 3 && (h("duet-select", { value: this.selected.toString(), expand: true, label: this.label, labelHidden: this.labelHidden, theme: this.theme, onDuetChange: event => this.openTab(Number(event.detail.value)), items: this.tabs.map((tab, index) => {
|
|
198
|
+
this.tabs.length > 3 && this.collapses && (h("duet-select", { value: this.selected.toString(), expand: true, label: this.label, labelHidden: this.labelHidden, theme: this.theme, onDuetChange: event => this.openTab(Number(event.detail.value)), items: this.tabs.map((tab, index) => {
|
|
173
199
|
return { label: tab.label, value: index.toString() };
|
|
174
200
|
}) })),
|
|
175
201
|
h("div", { role: "tablist", class: {
|
|
176
202
|
"duet-m-0": this.margin === "none",
|
|
177
203
|
"duet-tab-group-tabs": true,
|
|
178
204
|
"duet-tab-group-hidden": this.tabs.length > 3,
|
|
179
|
-
|
|
205
|
+
"duet-tab-group-collapses": this.collapses,
|
|
206
|
+
} }, this.renderTab()),
|
|
180
207
|
h("div", { class: { "duet-tab-group-content": true, "duet-m-0": this.margin === "none" } },
|
|
181
208
|
h("slot", null))));
|
|
182
209
|
}
|
|
183
210
|
static get is() { return "duet-tab-group"; }
|
|
184
|
-
static get encapsulation() { return "
|
|
211
|
+
static get encapsulation() { return "shadow"; }
|
|
185
212
|
static get originalStyleUrls() { return {
|
|
186
213
|
"$": ["duet-tab-group.scss"]
|
|
187
214
|
}; }
|
|
@@ -212,6 +239,42 @@ export class DuetTabGroup {
|
|
|
212
239
|
"reflect": false,
|
|
213
240
|
"defaultValue": "\"\""
|
|
214
241
|
},
|
|
242
|
+
"scrolls": {
|
|
243
|
+
"type": "boolean",
|
|
244
|
+
"mutable": false,
|
|
245
|
+
"complexType": {
|
|
246
|
+
"original": "boolean",
|
|
247
|
+
"resolved": "boolean",
|
|
248
|
+
"references": {}
|
|
249
|
+
},
|
|
250
|
+
"required": false,
|
|
251
|
+
"optional": false,
|
|
252
|
+
"docs": {
|
|
253
|
+
"tags": [],
|
|
254
|
+
"text": "Controls whether the tab-group should scroll (by inflection this will disable collapsing to select box on small screens),\nif this is a number instead of true it will be used as \"amount of items to scroll\""
|
|
255
|
+
},
|
|
256
|
+
"attribute": "scrolls",
|
|
257
|
+
"reflect": false,
|
|
258
|
+
"defaultValue": "false"
|
|
259
|
+
},
|
|
260
|
+
"collapses": {
|
|
261
|
+
"type": "boolean",
|
|
262
|
+
"mutable": false,
|
|
263
|
+
"complexType": {
|
|
264
|
+
"original": "boolean",
|
|
265
|
+
"resolved": "boolean",
|
|
266
|
+
"references": {}
|
|
267
|
+
},
|
|
268
|
+
"required": false,
|
|
269
|
+
"optional": false,
|
|
270
|
+
"docs": {
|
|
271
|
+
"tags": [],
|
|
272
|
+
"text": "Whether the tab-group collapses to a select dropwdown in minor breakpoints"
|
|
273
|
+
},
|
|
274
|
+
"attribute": "collapses",
|
|
275
|
+
"reflect": false,
|
|
276
|
+
"defaultValue": "true"
|
|
277
|
+
},
|
|
215
278
|
"variation": {
|
|
216
279
|
"type": "string",
|
|
217
280
|
"mutable": false,
|
|
@@ -739,6 +739,15 @@ export class DuetUpload {
|
|
|
739
739
|
this.nativeInput.click();
|
|
740
740
|
return;
|
|
741
741
|
}
|
|
742
|
+
/**
|
|
743
|
+
* Method for forcing a render of the upload list, element.files can be changed externally
|
|
744
|
+
* But it will only rerender on a new Map or a top Level change - this can be used to update
|
|
745
|
+
* the tabular data if the automatic re-render is no sufficient
|
|
746
|
+
*/
|
|
747
|
+
async refresh() {
|
|
748
|
+
this.kick();
|
|
749
|
+
await this.setFocus();
|
|
750
|
+
}
|
|
742
751
|
/**
|
|
743
752
|
* Get list of files, divided in errors and valid sections
|
|
744
753
|
*/
|
|
@@ -1835,6 +1844,22 @@ export class DuetUpload {
|
|
|
1835
1844
|
"tags": []
|
|
1836
1845
|
}
|
|
1837
1846
|
},
|
|
1847
|
+
"refresh": {
|
|
1848
|
+
"complexType": {
|
|
1849
|
+
"signature": "() => Promise<void>",
|
|
1850
|
+
"parameters": [],
|
|
1851
|
+
"references": {
|
|
1852
|
+
"Promise": {
|
|
1853
|
+
"location": "global"
|
|
1854
|
+
}
|
|
1855
|
+
},
|
|
1856
|
+
"return": "Promise<void>"
|
|
1857
|
+
},
|
|
1858
|
+
"docs": {
|
|
1859
|
+
"text": "Method for forcing a render of the upload list, element.files can be changed externally\nBut it will only rerender on a new Map or a top Level change - this can be used to update\nthe tabular data if the automatic re-render is no sufficient",
|
|
1860
|
+
"tags": []
|
|
1861
|
+
}
|
|
1862
|
+
},
|
|
1838
1863
|
"getFiles": {
|
|
1839
1864
|
"complexType": {
|
|
1840
1865
|
"signature": "() => Promise<false | { valid: any[]; invalid: any[]; }>",
|
|
@@ -14,6 +14,18 @@ export const DuetBadge: {
|
|
|
14
14
|
new (): DuetBadge;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
interface DuetBreadcrumb extends Components.DuetBreadcrumb, HTMLElement {}
|
|
18
|
+
export const DuetBreadcrumb: {
|
|
19
|
+
prototype: DuetBreadcrumb;
|
|
20
|
+
new (): DuetBreadcrumb;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
interface DuetBreadcrumbs extends Components.DuetBreadcrumbs, HTMLElement {}
|
|
24
|
+
export const DuetBreadcrumbs: {
|
|
25
|
+
prototype: DuetBreadcrumbs;
|
|
26
|
+
new (): DuetBreadcrumbs;
|
|
27
|
+
};
|
|
28
|
+
|
|
17
29
|
interface DuetButton extends Components.DuetButton, HTMLElement {}
|
|
18
30
|
export const DuetButton: {
|
|
19
31
|
prototype: DuetButton;
|
|
@@ -242,6 +254,12 @@ export const DuetRangeSlider: {
|
|
|
242
254
|
new (): DuetRangeSlider;
|
|
243
255
|
};
|
|
244
256
|
|
|
257
|
+
interface DuetScrollable extends Components.DuetScrollable, HTMLElement {}
|
|
258
|
+
export const DuetScrollable: {
|
|
259
|
+
prototype: DuetScrollable;
|
|
260
|
+
new (): DuetScrollable;
|
|
261
|
+
};
|
|
262
|
+
|
|
245
263
|
interface DuetSelect extends Components.DuetSelect, HTMLElement {}
|
|
246
264
|
export const DuetSelect: {
|
|
247
265
|
prototype: DuetSelect;
|