@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
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const isInternetExplorer = require('./is-internet-explorer-91361c56.js');
|
|
10
10
|
|
|
11
11
|
const duetLayoutCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;flex:1 0 auto;width:100%}:host(.duet-middle){display:flex}:host(.duet-middle) .duet-layout{padding:36px 28px !important}@media (min-width: 36em){:host(.duet-middle) .duet-layout{padding:48px 36px !important}}@media (min-width: 62em){:host(.duet-middle) .duet-layout{padding:56px !important}}:host(.duet-ie){height:100%}:host(.duet-middle.duet-ie){height:auto}.duet-layout{position:relative;padding:0 16px;margin:48px auto 36px}@media (min-width: 36em){.duet-layout{margin-top:72px}}.duet-layout.duet-layout-has-top{margin-top:0}.duet-layout.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout.duet-center{display:flex;align-items:center;justify-content:center;width:100%;max-width:888px}@media (min-width: 36em){.duet-layout.duet-center{padding:0 48px}}@media (min-width: 48em){.duet-layout.duet-center{padding:0 72px}}@media (min-width: 62em){.duet-layout.duet-center{width:100%}}@media (min-width: 36em){.duet-layout{padding:0 28px}}@media (min-width: 62em){.duet-layout{display:flex;flex-direction:row;padding:0 56px;margin-bottom:48px}}@media (min-width: 76.25em){.duet-layout{max-width:1110px;padding:0}}.duet-main,.duet-sidebar,.duet-layout-top,.duet-layout-bottom{display:block;width:100%}.duet-layout-top{position:relative;display:block;width:100%;margin:72px auto 0}.duet-layout-top.duet-m-0{margin-top:0 !important;margin-bottom:0 !important}.duet-layout-top .duet-layout-top-wrapper{padding:0 20px;margin:0 auto}@media (min-width: 36em){.duet-layout-top .duet-layout-top-wrapper{padding:0 28px}}@media (min-width: 62em){.duet-layout-top .duet-layout-top-wrapper{padding:0 56px}}@media (min-width: 76.25em){.duet-layout-top .duet-layout-top-wrapper{max-width:1110px;padding:0}}.duet-center .duet-layout-top-wrapper{max-width:888px}@media (min-width: 36em){.duet-center .duet-layout-top-wrapper{padding:0 48px}}@media (min-width: 48em){.duet-center .duet-layout-top-wrapper{padding:0 72px}}@media (min-width: 62em){.duet-main{min-width:600px;margin:0 auto}.has-sidebar .duet-main{max-width:734px;margin-right:20px}}@media (min-width: 62em){.duet-sidebar{min-width:256px;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container{width:auto;max-width:356px}}@media (min-width: 62em){.duet-sidebar-container.has-tabs{margin-top:89px}}@media (min-width: 62em){.duet-sidebar-container.sticky{position:sticky}.duet-sidebar-container.sticky.with-links{top:calc(3rem + 20px)}.duet-sidebar-container.sticky.without-links{top:calc(4rem + 20px)}}";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
10
10
|
const watchOptions = require('./watch-options-d88afac0.js');
|
|
11
11
|
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const bodyScrollLock_es6 = require('./bodyScrollLock.es6-6ef1142a.js');
|
|
10
10
|
const createId = require('./create-id-c3b984b1.js');
|
|
11
|
-
const focusUtils = require('./focus-utils-
|
|
11
|
+
const focusUtils = require('./focus-utils-adf0830f.js');
|
|
12
12
|
const keyboardUtils = require('./keyboard-utils-b4e3d1d3.js');
|
|
13
13
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
14
14
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
@@ -112,6 +112,10 @@ let DuetModal = class {
|
|
|
112
112
|
* Use this property when you need to have the modal dialog initially active.
|
|
113
113
|
*/
|
|
114
114
|
this.active = false;
|
|
115
|
+
/**
|
|
116
|
+
* Use this property when you want the modal to close when clicked outside of modal.
|
|
117
|
+
*/
|
|
118
|
+
this.closeOnBlur = false;
|
|
115
119
|
}
|
|
116
120
|
openChanged() {
|
|
117
121
|
if (this.open) {
|
|
@@ -224,7 +228,15 @@ let DuetModal = class {
|
|
|
224
228
|
} }, index.h(focusUtils.FocusGuard, { moveFocusTo: this.buttonEl }), index.h("div", { class: {
|
|
225
229
|
"duet-modal-inner": true,
|
|
226
230
|
"duet-modal-large": this.size === "large",
|
|
227
|
-
}, role: "document"
|
|
231
|
+
}, role: "document", onClick: e => {
|
|
232
|
+
if (this.closeOnBlur) {
|
|
233
|
+
this.closeModal(e);
|
|
234
|
+
}
|
|
235
|
+
} }, index.h("div", { class: { "duet-modal": true, [this.size]: true }, onClick: e => {
|
|
236
|
+
if (this.closeOnBlur) {
|
|
237
|
+
e.stopPropagation();
|
|
238
|
+
}
|
|
239
|
+
} }, index.h("duet-spacer", null), index.h("div", { class: "duet-modal-close" }, index.h("duet-button", { ref: button => (this.buttonEl = button), variation: "plain", accessibleLabel: this.accessibleCloseLabel, color: closeColor, iconSize: "large", icon: "navigation-close", iconOnly: true, margin: "none", theme: this.theme, onClick: ev => this.closeModal(ev), fixed: true })), index.h("div", { class: {
|
|
228
240
|
"duet-modal-body": true,
|
|
229
241
|
"duet-modal-gutter-small": this.gutterSize === "small",
|
|
230
242
|
"duet-modal-gutter-medium": this.gutterSize === "medium",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
10
10
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
11
|
const actionArrowDownSmall = require('./action-arrow-down-small-ef77a2d1.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const keyboardUtils = require('./keyboard-utils-b4e3d1d3.js');
|
|
11
11
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
11
11
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
11
|
const watchOptions = require('./watch-options-d88afac0.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const tokens_module = require('./tokens.module-6b2df1c2.js');
|
|
10
10
|
const createId = require('./create-id-c3b984b1.js');
|
|
11
11
|
const isInternetExplorer = require('./is-internet-explorer-91361c56.js');
|
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Duet Design System
|
|
3
|
+
*/
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
|
+
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
|
+
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
10
|
+
const languageUtils = require('./language-utils-aa282901.js');
|
|
11
|
+
const createId = require('./create-id-c3b984b1.js');
|
|
12
|
+
const keyboardUtils = require('./keyboard-utils-b4e3d1d3.js');
|
|
13
|
+
require('./string-utils-267e3dbb.js');
|
|
14
|
+
|
|
15
|
+
const duetScrollableCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent}:host{position:relative !important}:host .duet-scrollable-items{display:flex}:host .duet-scrollable-items .duet-scrollable-button{position:relative;flex:0 0 auto;flex-basis:40px;padding:10px;cursor:pointer}:host .duet-scrollable-items .duet-scrollable-button:active{transform:scale(0.8)}:host .duet-scrollable-items .duet-scrollable-button--left{left:-12px}:host .duet-scrollable-items .duet-scrollable-button--right{right:-12px}:host .duet-scrollable-items .duet-scrollable-button--occluded{display:none}:host .duet-scrollable-items .duet-scrollable-list{display:flex;flex-wrap:nowrap;gap:20px;padding-top:2px;overflow-x:auto;overflow-y:hidden;white-space:nowrap;scroll-snap-type:x mandatory;scroll-behavior:smooth;scroll-margin:0 20px;-ms-overflow-style:-ms-autohiding-scrollbar;-webkit-overflow-scrolling:touch;}:host .duet-scrollable-items .duet-scrollable-list::-webkit-scrollbar{display:none}::slotted(*){scroll-snap-align:center;margin-left:0;-webkit-transition:-webkit-transform 0.2s ease-in-out;transition:-webkit-transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out;transition:transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out}";
|
|
16
|
+
|
|
17
|
+
let DuetScrollable = class {
|
|
18
|
+
constructor(hostRef) {
|
|
19
|
+
index.registerInstance(this, hostRef);
|
|
20
|
+
/**
|
|
21
|
+
* Private variables and constants index
|
|
22
|
+
*/
|
|
23
|
+
this.currentIndex = 0;
|
|
24
|
+
this.tabListElement = undefined;
|
|
25
|
+
this.tabListClass = "duet-scrollable-list";
|
|
26
|
+
this.tablistAtStart = true;
|
|
27
|
+
this.isTabContentSmallerThanWrapper = false;
|
|
28
|
+
this.tablistAtEnd = false;
|
|
29
|
+
this.childrenData = {};
|
|
30
|
+
this.resizeObserver = new ResizeObserver(entries => {
|
|
31
|
+
var _a, _b, _c, _d;
|
|
32
|
+
// otherwise, something is wrong, expecting 1 element only
|
|
33
|
+
if ((entries === null || entries === void 0 ? void 0 : entries.length) === 1) {
|
|
34
|
+
const currentWidth = (_b = (_a = entries[0]) === null || _a === void 0 ? void 0 : _a.target) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().width;
|
|
35
|
+
const scrollWidth = (_d = (_c = entries[0]) === null || _c === void 0 ? void 0 : _c.target) === null || _d === void 0 ? void 0 : _d.scrollWidth;
|
|
36
|
+
// in order to avoid state "jumping" on the boundary condition we add a few pixels to the comparison
|
|
37
|
+
this.isTabContentSmallerThanWrapper = scrollWidth > currentWidth + 5;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* Theme of duet-tab-scrollable. When used this will override the color setting and
|
|
42
|
+
* use "primary" or "primary-turva" as the color depending on which theme
|
|
43
|
+
* is chosen.
|
|
44
|
+
*/
|
|
45
|
+
this.theme = "";
|
|
46
|
+
/**
|
|
47
|
+
* Selected element
|
|
48
|
+
*/
|
|
49
|
+
this.selected = 0;
|
|
50
|
+
}
|
|
51
|
+
watchPropHandler(newValue) {
|
|
52
|
+
this.scrollToTab(newValue, "center");
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Component lifecycle events.
|
|
56
|
+
*/
|
|
57
|
+
componentWillLoad() {
|
|
58
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
59
|
+
const slotted = this.host.children;
|
|
60
|
+
this.childrenData = { hasChildren: slotted && slotted.length > 0, numberOfChildren: slotted && slotted.length };
|
|
61
|
+
}
|
|
62
|
+
componentDidLoad() {
|
|
63
|
+
this.resizeObserver.observe(this.tabListElement);
|
|
64
|
+
}
|
|
65
|
+
disconnectedCallback() {
|
|
66
|
+
this.resizeObserver.disconnect();
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Private methods.
|
|
70
|
+
*/
|
|
71
|
+
getLastVisibleElement() {
|
|
72
|
+
const clientWidth = this.tabListElement.clientWidth;
|
|
73
|
+
const xValues = Array.from(this.host.querySelectorAll("button")).findIndex(element => element.getBoundingClientRect().x > clientWidth);
|
|
74
|
+
return xValues;
|
|
75
|
+
}
|
|
76
|
+
getFirstVisibleElement() {
|
|
77
|
+
const buttonCollection = this.host.querySelectorAll("button");
|
|
78
|
+
// reverse the array because we want the first invisible element form the middle, not the first in the list
|
|
79
|
+
const arrayOfXValues = Array.from(buttonCollection).map(el => el.getBoundingClientRect().x - el.getBoundingClientRect().width);
|
|
80
|
+
const xValues = arrayOfXValues.findIndex(element => {
|
|
81
|
+
return element > 0;
|
|
82
|
+
});
|
|
83
|
+
return xValues;
|
|
84
|
+
}
|
|
85
|
+
updateScrollButtons(container = this.tabListElement) {
|
|
86
|
+
if (container.scrollLeft <= 0) {
|
|
87
|
+
this.tablistAtStart = true;
|
|
88
|
+
}
|
|
89
|
+
else if (container.scrollLeft > 0) {
|
|
90
|
+
this.tablistAtStart = false;
|
|
91
|
+
}
|
|
92
|
+
if (container.clientWidth + container.scrollLeft + 10 >= container.scrollWidth) {
|
|
93
|
+
this.tablistAtEnd = true;
|
|
94
|
+
}
|
|
95
|
+
else if (container.clientWidth + container.scrollLeft + 10 < container.scrollWidth) {
|
|
96
|
+
this.tablistAtEnd = false;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
scrollToTab(index = this.currentIndex, inline) {
|
|
100
|
+
if (!this.childrenData.hasChildren) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (index + 1 >= this.childrenData.numberOfChildren) {
|
|
104
|
+
index = this.childrenData.numberOfChildren - 1;
|
|
105
|
+
}
|
|
106
|
+
if (index < 0) {
|
|
107
|
+
index = 0;
|
|
108
|
+
}
|
|
109
|
+
const buttons = this.host.querySelectorAll("button");
|
|
110
|
+
// store previous position
|
|
111
|
+
let prevPosition = buttons[0].getBoundingClientRect().x;
|
|
112
|
+
// iterations to run
|
|
113
|
+
let ticksWhereScrollDidNotHappen = 5;
|
|
114
|
+
const getAnimationFrame = () => {
|
|
115
|
+
// if we get the same value enter the logic loop
|
|
116
|
+
if (buttons[0].getBoundingClientRect().x === prevPosition) {
|
|
117
|
+
ticksWhereScrollDidNotHappen--;
|
|
118
|
+
// When iteration is not complete run the calculation again
|
|
119
|
+
if (ticksWhereScrollDidNotHappen !== 0) {
|
|
120
|
+
window.requestAnimationFrame(getAnimationFrame);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
this.updateScrollButtons();
|
|
124
|
+
}
|
|
125
|
+
else {
|
|
126
|
+
window.requestAnimationFrame(getAnimationFrame);
|
|
127
|
+
prevPosition = buttons[0].getBoundingClientRect().x;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
buttons[index].scrollIntoView({ behavior: "smooth", inline });
|
|
131
|
+
window.requestAnimationFrame(getAnimationFrame);
|
|
132
|
+
}
|
|
133
|
+
scrollLeft() {
|
|
134
|
+
this.tablistAtEnd = false;
|
|
135
|
+
const first = this.getFirstVisibleElement() - 1;
|
|
136
|
+
this.scrollToTab(first, "center");
|
|
137
|
+
}
|
|
138
|
+
scrollRight() {
|
|
139
|
+
this.tablistAtStart = false;
|
|
140
|
+
const last = this.getLastVisibleElement() + 1;
|
|
141
|
+
this.scrollToTab(last, "center");
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* render() function
|
|
145
|
+
* Always the last one in the class.
|
|
146
|
+
*/
|
|
147
|
+
render() {
|
|
148
|
+
return (index.h(index.Host, { class: {
|
|
149
|
+
"duet-theme-turva": this.theme === "turva",
|
|
150
|
+
"duet-theme-default": this.theme === "default",
|
|
151
|
+
} }, index.h("div", { class: "duet-scrollable-items" }, index.h("button", { "aria-hidden": "true", class: {
|
|
152
|
+
"duet-scrollable-button": true,
|
|
153
|
+
"duet-scrollable-button--left": true,
|
|
154
|
+
"duet-scrollable-button--occluded": !this.isTabContentSmallerThanWrapper,
|
|
155
|
+
}, onClick: () => this.scrollLeft(), disabled: this.tablistAtStart, tabindex: "-1" }, index.h("duet-icon", { name: "action-arrow-left-small", size: "small", margin: "none" })), index.h("div", { class: this.tabListClass, onScroll: () => this.updateScrollButtons(), ref: element => (this.tabListElement = element) }, index.h("slot", null)), index.h("button", { "aria-hidden": "true", class: {
|
|
156
|
+
"duet-scrollable-button": true,
|
|
157
|
+
"duet-scrollable-button--right": true,
|
|
158
|
+
"duet-scrollable-button--occluded": !this.isTabContentSmallerThanWrapper,
|
|
159
|
+
}, onClick: () => this.scrollRight(), disabled: this.tablistAtEnd, tabindex: "-1" }, index.h("duet-icon", { name: "action-arrow-right-small", size: "small", margin: "none" })))));
|
|
160
|
+
}
|
|
161
|
+
get host() { return index.getElement(this); }
|
|
162
|
+
static get watchers() { return {
|
|
163
|
+
"selected": ["watchPropHandler"]
|
|
164
|
+
}; }
|
|
165
|
+
};
|
|
166
|
+
DuetScrollable.style = duetScrollableCss;
|
|
167
|
+
|
|
168
|
+
const duetTabCss = ".sc-duet-tab-h{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:block;width:100%}.duet-tab.sc-duet-tab{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;display:none;width:100%}.duet-tab.selected.sc-duet-tab{display:block}";
|
|
169
|
+
|
|
170
|
+
let DuetTab = class {
|
|
171
|
+
constructor(hostRef) {
|
|
172
|
+
index.registerInstance(this, hostRef);
|
|
173
|
+
/**
|
|
174
|
+
* Defaults for AccessibleLabel
|
|
175
|
+
* @default null
|
|
176
|
+
*/
|
|
177
|
+
this.accessibleDescriptionDefault = null;
|
|
178
|
+
/**
|
|
179
|
+
* String for AccessibleLabel
|
|
180
|
+
* @default null
|
|
181
|
+
*/
|
|
182
|
+
this.accessibleDescription = this.accessibleDescriptionDefault
|
|
183
|
+
? languageUtils.getLocaleString(this.accessibleDescriptionDefault)
|
|
184
|
+
: null;
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* render() function
|
|
188
|
+
* Always the last one in the class.
|
|
189
|
+
*/
|
|
190
|
+
render() {
|
|
191
|
+
{
|
|
192
|
+
return (index.h("div", { role: "tabpanel", class: { "duet-tab": true, selected: this.selected }, "aria-description": this.accessibleDescription }, index.h("slot", null)));
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
DuetTab.style = duetTabCss;
|
|
197
|
+
|
|
198
|
+
const duetTabGroupCss = "*,*::after,*::before{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none}:host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;-webkit-tap-highlight-color:transparent;display:block;width:100%}.duet-tab-group-tabs{margin-bottom:28px !important;display:block;width:100%;max-width:100%;padding-top:2px;list-style:none}.duet-tab-group-tabs.duet-m-0{margin:0 !important}.duet-tab-group-tabs.duet-tab-group-collapses.duet-tab-group-hidden{display:none}@media (min-width: 36em){.duet-tab-group-tabs.duet-tab-group-collapses.duet-tab-group-hidden{display:block}}.duet-tab-variation-plain .duet-tab-group-tabs{border-bottom:1px solid #e1e3e6}.duet-theme-turva.duet-tab-variation-plain .duet-tab-group-tabs{border-bottom-color:#e4e4e6 !important}@media (min-width: 36em){duet-select{display:none !important}}.duet-tab-button{-webkit-user-select:none;user-select:none;position:relative;z-index:100;display:block;width:100%;padding:20px;margin-top:-2px;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:600;line-height:1.1;color:#00294d !important;text-align:left;text-decoration:none;cursor:pointer;background:white;border:2px solid #e1e3e6;border-radius:0;transition:150ms ease}.duet-tab-button.duet-p-0{padding:0 !important}.duet-tab-button.duet-m-0{margin:0 !important}.duet-theme-turva .duet-tab-button{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a !important;border-color:#e4e4e6}.duet-tab-button.duet-p-0{padding:0 !important}@media (min-width: 36em){.duet-tab-button{display:inline-block;width:auto;margin-left:-2px;border-right:2px solid #e1e3e6;border-radius:0}}.duet-tab-button:hover{z-index:200;border-color:#909599}.duet-theme-turva .duet-tab-button:hover{border-color:#747475 !important}.duet-tab-button:active{opacity:0.75;transition:none}.duet-tab-button.selected{z-index:201;color:white !important;background:#00294d;border-color:#00294d;outline:0;box-shadow:none !important}.duet-theme-turva .duet-tab-button.selected{color:white !important;background-color:#171c3a;border-color:#171c3a !important}.duet-tab-button:focus{z-index:200;outline:0}:host(.user-is-tabbing) .duet-tab-button:focus{box-shadow:0 0 0 4px rgba(0, 119, 179, 0.3), 0 0 0 1px #0077b3 !important}:host(.user-is-tabbing) .duet-theme-turva .duet-tab-button:focus{box-shadow:0 0 0 4px rgba(23, 28, 58, 0.2), 0 0 0 1px #171c3a !important}.duet-tab-button:first-child{border-top-left-radius:4px;border-top-right-radius:4px}@media (min-width: 36em){.duet-tab-button:first-child{border-top-right-radius:0;border-bottom-left-radius:4px}}.duet-tab-button:last-child{border-bottom-right-radius:4px;border-bottom-left-radius:4px}@media (min-width: 36em){.duet-tab-button:last-child{border-radius:0;border-top-right-radius:4px;border-bottom-right-radius:4px}}.duet-tab-variation-plain .duet-tab-button{display:inline-block;width:auto;padding-right:0;padding-left:0;border:0;border-radius:0;transition:none}.duet-tab-variation-plain .duet-tab-button+.duet-tab-button{margin-left:36px}.duet-tab-variation-plain .duet-tab-button.selected{color:#0077b3 !important;background:white;border-bottom:3px solid #0077b3}.duet-theme-turva.duet-tab-variation-plain .duet-tab-button.selected{color:#c60c30 !important;border-bottom-color:#c60c30 !important}.duet-tab-group-content{position:relative;width:100%;font-family:\"localtapiola-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:400;line-height:1.5;color:#00294d;text-align:left}.duet-theme-turva .duet-tab-group-content{font-family:\"turva-sans\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";color:#171c3a}";
|
|
199
|
+
|
|
200
|
+
let DuetTabGroup = class {
|
|
201
|
+
constructor(hostRef) {
|
|
202
|
+
index.registerInstance(this, hostRef);
|
|
203
|
+
this.duetChange = index.createEvent(this, "duetChange", 3);
|
|
204
|
+
this.duetTabChange = index.createEvent(this, "duetTabChange", 7);
|
|
205
|
+
this.id = createId.createID("DuetTabGroup");
|
|
206
|
+
/**
|
|
207
|
+
* State() variables
|
|
208
|
+
* Inlined decorator, alphabetical order.
|
|
209
|
+
*/
|
|
210
|
+
this.tabs = [];
|
|
211
|
+
this.selected = 0;
|
|
212
|
+
/**
|
|
213
|
+
* Theme of the component.
|
|
214
|
+
*/
|
|
215
|
+
this.theme = "";
|
|
216
|
+
/**
|
|
217
|
+
* Controls whether the tab-group should scroll (by inflection this will disable collapsing to select box on small screens),
|
|
218
|
+
* if this is a number instead of true it will be used as "amount of items to scroll"
|
|
219
|
+
*/
|
|
220
|
+
this.scrolls = false;
|
|
221
|
+
/**
|
|
222
|
+
* Whether the tab-group collapses to a select dropwdown in minor breakpoints
|
|
223
|
+
*/
|
|
224
|
+
this.collapses = true;
|
|
225
|
+
/**
|
|
226
|
+
* Style variation of the tab group.
|
|
227
|
+
*/
|
|
228
|
+
this.variation = "default";
|
|
229
|
+
/**
|
|
230
|
+
* The currently active language. This setting changes the accessible labels to match the
|
|
231
|
+
* chosen language.
|
|
232
|
+
* @deprecated this is now handled via the html lang tag, and is no longer used - kept to avoid breaking changes and ease unit testing
|
|
233
|
+
* @default "fi"
|
|
234
|
+
*/
|
|
235
|
+
this.language = languageUtils.getLanguage();
|
|
236
|
+
/**
|
|
237
|
+
* Defaults for Label
|
|
238
|
+
* @default {fi: "Valitse", en: "Choose", sv: "Välja"}
|
|
239
|
+
*/
|
|
240
|
+
this.labelDefaults = {
|
|
241
|
+
fi: "Valitse",
|
|
242
|
+
en: "Choose",
|
|
243
|
+
sv: "Välj",
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* Label for the select element which gets shown on mobile.
|
|
247
|
+
* @default {fi: "Valitse", en: "Choose", sv: "Välja"}
|
|
248
|
+
*/
|
|
249
|
+
this.label = languageUtils.getLocaleString(this.labelDefaults, this.language);
|
|
250
|
+
/**
|
|
251
|
+
* Determines whether the label for the select element shown on mobile is visually hidden.
|
|
252
|
+
*/
|
|
253
|
+
this.labelHidden = true;
|
|
254
|
+
/**
|
|
255
|
+
* Controls the margin of the component.
|
|
256
|
+
*/
|
|
257
|
+
this.margin = "auto";
|
|
258
|
+
/**
|
|
259
|
+
* Controls the padding of the component.
|
|
260
|
+
*/
|
|
261
|
+
this.padding = "auto";
|
|
262
|
+
/**
|
|
263
|
+
* Component event handling.
|
|
264
|
+
*/
|
|
265
|
+
this.handleKeyDown = ev => {
|
|
266
|
+
let button;
|
|
267
|
+
if (keyboardUtils.isArrowLeftKey(ev) || keyboardUtils.isArrowUpKey(ev)) {
|
|
268
|
+
button = ev.target.previousElementSibling;
|
|
269
|
+
}
|
|
270
|
+
else if (keyboardUtils.isArrowRightKey(ev) || keyboardUtils.isArrowDownKey(ev)) {
|
|
271
|
+
button = ev.target.nextElementSibling;
|
|
272
|
+
}
|
|
273
|
+
if (button) {
|
|
274
|
+
ev.preventDefault();
|
|
275
|
+
button.click();
|
|
276
|
+
button.focus();
|
|
277
|
+
}
|
|
278
|
+
};
|
|
279
|
+
this.renderTab = () => {
|
|
280
|
+
const renderedTabs = this.tabs.map((element, index$1) => {
|
|
281
|
+
return (index.h("button", { role: "tab", id: this.getButtonId(index$1), "aria-controls": this.getTabId(index$1), "aria-selected": element.selected ? "true" : "false", "aria-description": this.getAccessibleDescription(index$1), type: "button", class: {
|
|
282
|
+
"duet-p-0": this.padding === "none",
|
|
283
|
+
"duet-tab-button": true,
|
|
284
|
+
selected: element.selected,
|
|
285
|
+
}, onClick: () => this.openTab(index$1), onKeyDown: ev => this.handleKeyDown(ev) }, element.label));
|
|
286
|
+
});
|
|
287
|
+
if (this.scrolls) {
|
|
288
|
+
return index.h("duet-scrollable", { selected: this.selected }, renderedTabs);
|
|
289
|
+
}
|
|
290
|
+
return renderedTabs;
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Component lifecycle events.
|
|
295
|
+
*/
|
|
296
|
+
async connectedCallback() {
|
|
297
|
+
if (typeof MutationObserver !== "undefined") {
|
|
298
|
+
this.mutationO = new MutationObserver(() => {
|
|
299
|
+
this.updateTabs();
|
|
300
|
+
});
|
|
301
|
+
this.mutationO.observe(this.element, {
|
|
302
|
+
attributes: true,
|
|
303
|
+
attributeFilter: ["label"],
|
|
304
|
+
childList: true,
|
|
305
|
+
characterData: true,
|
|
306
|
+
subtree: true,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
await this.updateTabs();
|
|
310
|
+
}
|
|
311
|
+
disconnectedCallback() {
|
|
312
|
+
if (this.mutationO) {
|
|
313
|
+
this.mutationO.disconnect();
|
|
314
|
+
this.mutationO = undefined;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
componentWillLoad() {
|
|
318
|
+
themeableComponent.inheritGlobalTheme(this);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* This method allows you to open any of the tabs by calling the method and
|
|
322
|
+
* passing the index of the tab. Please note that index starts from zero.
|
|
323
|
+
*/
|
|
324
|
+
async openTab(tabIndex) {
|
|
325
|
+
if (tabIndex >= this.tabs.length) {
|
|
326
|
+
throw new Error(`[duet-tabs] Index ${tabIndex} is out of bounds of tabs length`);
|
|
327
|
+
}
|
|
328
|
+
this.selected = tabIndex;
|
|
329
|
+
this.tabs.forEach((tab, i) => {
|
|
330
|
+
tab.selected = i === tabIndex;
|
|
331
|
+
});
|
|
332
|
+
const event = {
|
|
333
|
+
value: tabIndex,
|
|
334
|
+
component: "duet-tab-group",
|
|
335
|
+
};
|
|
336
|
+
this.duetChange.emit(event);
|
|
337
|
+
this.duetTabChange.emit(event);
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* This method used to refresh the contents of the tab group
|
|
341
|
+
* but is now deprecated as this is done automatically.
|
|
342
|
+
* @deprecated
|
|
343
|
+
*/
|
|
344
|
+
async refresh() {
|
|
345
|
+
console.log("[duet-tabs] Refresh method is deprecated and will be removed in the future version.");
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Local methods.
|
|
349
|
+
*/
|
|
350
|
+
getTabs() {
|
|
351
|
+
const allTabs = Array.from(this.element.querySelectorAll("duet-tab"));
|
|
352
|
+
const localTabs = allTabs.filter(tab => tab.closest("duet-tab-group") === this.element);
|
|
353
|
+
if (localTabs.length === 0) {
|
|
354
|
+
throw new Error("[duet-tabs] Must have at least one tab");
|
|
355
|
+
}
|
|
356
|
+
// filter out any nested tabs
|
|
357
|
+
return localTabs;
|
|
358
|
+
}
|
|
359
|
+
getButtonId(index) {
|
|
360
|
+
return `${this.id}-button-${index}`;
|
|
361
|
+
}
|
|
362
|
+
getTabId(index) {
|
|
363
|
+
return `${this.id}-tab-${index}`;
|
|
364
|
+
}
|
|
365
|
+
getAccessibleDescription(index) {
|
|
366
|
+
const description = this.tabs[index].getAttribute("accessible-description") || null;
|
|
367
|
+
return description;
|
|
368
|
+
}
|
|
369
|
+
async updateTabs() {
|
|
370
|
+
this.tabs = this.getTabs();
|
|
371
|
+
this.tabs.forEach((tab, index) => {
|
|
372
|
+
tab.id = this.getTabId(index);
|
|
373
|
+
tab.setAttribute("aria-labelledby", this.getButtonId(index));
|
|
374
|
+
if (tab.selected) {
|
|
375
|
+
this.selected = index;
|
|
376
|
+
}
|
|
377
|
+
});
|
|
378
|
+
return;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* render() function
|
|
382
|
+
* Always the last one in the class.
|
|
383
|
+
*/
|
|
384
|
+
render() {
|
|
385
|
+
return (index.h("div", { class: {
|
|
386
|
+
"duet-tab-group": true,
|
|
387
|
+
"duet-theme-turva": this.theme === "turva",
|
|
388
|
+
[`duet-tab-variation-${this.variation}`]: true,
|
|
389
|
+
"duet-tab-group-scrolls": this.scrolls,
|
|
390
|
+
"duet-tab-group-collapses": this.collapses,
|
|
391
|
+
} }, this.tabs.length > 3 && this.collapses && (index.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) => {
|
|
392
|
+
return { label: tab.label, value: index.toString() };
|
|
393
|
+
}) })), index.h("div", { role: "tablist", class: {
|
|
394
|
+
"duet-m-0": this.margin === "none",
|
|
395
|
+
"duet-tab-group-tabs": true,
|
|
396
|
+
"duet-tab-group-hidden": this.tabs.length > 3,
|
|
397
|
+
"duet-tab-group-collapses": this.collapses,
|
|
398
|
+
} }, this.renderTab()), index.h("div", { class: { "duet-tab-group-content": true, "duet-m-0": this.margin === "none" } }, index.h("slot", null))));
|
|
399
|
+
}
|
|
400
|
+
get element() { return index.getElement(this); }
|
|
401
|
+
};
|
|
402
|
+
DuetTabGroup.style = duetTabGroupCss;
|
|
403
|
+
|
|
404
|
+
exports.duet_scrollable = DuetScrollable;
|
|
405
|
+
exports.duet_tab = DuetTab;
|
|
406
|
+
exports.duet_tab_group = DuetTabGroup;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const stringUtils = require('./string-utils-267e3dbb.js');
|
|
11
11
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const keyboardUtils = require('./keyboard-utils-b4e3d1d3.js');
|
|
11
11
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const inputUtils = require('./input-utils-f3e3854c.js');
|
|
11
11
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const createId = require('./create-id-c3b984b1.js');
|
|
10
10
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
11
11
|
const themeableComponent = require('./themeable-component-0c1be552.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
const tokens_module = require('./tokens.module-6b2df1c2.js');
|
|
10
10
|
const createId = require('./create-id-c3b984b1.js');
|
|
11
11
|
const languageUtils = require('./language-utils-aa282901.js');
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
|
-
const index = require('./index-
|
|
8
|
+
const index = require('./index-ebc216a6.js');
|
|
9
9
|
|
|
10
10
|
const duetVisuallyHiddenCss = ":host{box-sizing:border-box;padding:0;margin:0;background:transparent;border:0;-moz-appearance:none;-webkit-appearance:none;appearance:none;position:absolute !important;top:0;width:1px !important;height:1px !important;padding:0 !important;overflow:hidden !important;clip:rect(1px, 1px, 1px, 1px) !important;border:0 !important}";
|
|
11
11
|
|