@duetds/components 5.2.2 → 5.3.1
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 +21 -37
- package/lib/cjs/duet-action-button.cjs.entry.js +1 -1
- package/lib/cjs/duet-alert.cjs.entry.js +1 -1
- package/lib/cjs/duet-badge.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumb.cjs.entry.js +1 -1
- package/lib/cjs/duet-breadcrumbs.cjs.entry.js +4 -3
- package/lib/cjs/duet-button_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-caption_4.cjs.entry.js +1 -1
- 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 +5 -5
- package/lib/cjs/duet-collapsible.cjs.entry.js +1 -1
- package/lib/cjs/duet-combobox.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_3.cjs.entry.js +1 -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 +4 -22
- package/lib/cjs/duet-grid_2.cjs.entry.js +1 -1
- package/lib/cjs/duet-header_2.cjs.entry.js +1 -1
- 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 +2 -2
- 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-pagination_2.cjs.entry.js +13 -6
- 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 +1 -1
- 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-4648b81b.js → focus-utils-d33a726a.js} +1 -1
- package/lib/cjs/{index-d690ab34.js → index-3780d82f.js} +1 -1
- package/lib/cjs/loader.cjs.js +2 -2
- package/lib/collection/components/duet-choice-group/duet-choice-group.js +3 -3
- package/lib/collection/components/duet-footer/duet-footer.css +35 -154
- package/lib/collection/components/duet-footer/duet-footer.js +12 -139
- package/lib/collection/components/duet-pagination/duet-pagination.js +21 -12
- package/lib/collection/utils/fixture-utils.js +1 -78
- package/lib/custom-elements-bundle/index.js +21 -30
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/p-041a896d.system.entry.js +4 -0
- package/lib/duet/p-0696eb1a.entry.js +4 -0
- package/lib/duet/{p-ea59bb06.system.entry.js → p-0993feba.system.entry.js} +1 -1
- package/lib/duet/{p-35611d73.system.entry.js → p-0c74813f.system.entry.js} +2 -2
- package/lib/duet/{p-43c0c459.system.entry.js → p-0e681c77.system.entry.js} +1 -1
- package/lib/duet/p-0ed3fe09.entry.js +4 -0
- package/lib/duet/{p-b6cea2fb.entry.js → p-10608266.entry.js} +1 -1
- package/lib/duet/{p-834242e9.entry.js → p-11bcbf27.entry.js} +1 -1
- package/lib/duet/{p-9ed30f80.entry.js → p-13586e5b.entry.js} +1 -1
- package/lib/duet/{p-14a98f4b.system.entry.js → p-183b1c28.system.entry.js} +1 -1
- package/lib/duet/{p-56a92e4b.system.entry.js → p-1f33ee48.system.entry.js} +1 -1
- package/lib/duet/{p-65b4903d.system.entry.js → p-21d29128.system.entry.js} +1 -1
- package/lib/duet/{p-e67563e7.entry.js → p-225cf8bb.entry.js} +1 -1
- package/lib/duet/p-27ddb422.entry.js +4 -0
- package/lib/duet/{p-1d6d8314.system.entry.js → p-2820712b.system.entry.js} +1 -1
- package/lib/duet/{p-c858aedd.entry.js → p-3f27706d.entry.js} +1 -1
- package/lib/duet/{p-1164c8a6.system.entry.js → p-3f972617.system.entry.js} +1 -1
- package/lib/duet/{p-38c52a73.entry.js → p-43531991.entry.js} +1 -1
- package/lib/duet/{p-ab66df54.entry.js → p-46201755.entry.js} +1 -1
- package/lib/duet/{p-3735b874.entry.js → p-4bc446cd.entry.js} +1 -1
- package/lib/duet/{p-636c9c24.system.entry.js → p-4cfd7479.system.entry.js} +1 -1
- package/lib/duet/{p-e4133a47.entry.js → p-515efd5e.entry.js} +1 -1
- package/lib/duet/{p-e0ba5d9e.system.entry.js → p-52afc90f.system.entry.js} +1 -1
- package/lib/duet/{p-2260d4d2.system.js → p-57e4d4a5.system.js} +1 -1
- package/lib/duet/{p-1c6a3c81.system.entry.js → p-5ca35070.system.entry.js} +1 -1
- package/lib/duet/{p-10b144b0.system.entry.js → p-5d048dde.system.entry.js} +1 -1
- package/lib/duet/p-5d1712bc.entry.js +4 -0
- package/lib/duet/{p-1527b7e3.system.entry.js → p-5dc2fe9c.system.entry.js} +1 -1
- package/lib/duet/{p-96e03d88.entry.js → p-5e80341a.entry.js} +1 -1
- package/lib/duet/{p-0a62f171.system.entry.js → p-6300b98f.system.entry.js} +1 -1
- package/lib/duet/{p-54eadbb6.system.entry.js → p-6637dddb.system.entry.js} +1 -1
- package/lib/duet/p-6a976ab3.js +4 -0
- package/lib/duet/{p-804eb7eb.system.entry.js → p-6aff0c69.system.entry.js} +1 -1
- package/lib/duet/{p-2135afa1.system.entry.js → p-6c5c94d5.system.entry.js} +1 -1
- package/lib/duet/{p-d511ca66.entry.js → p-6dcaafcb.entry.js} +1 -1
- package/lib/duet/{p-5da3ec79.entry.js → p-6f894a84.entry.js} +1 -1
- package/lib/duet/{p-e3e092e1.system.entry.js → p-70674d11.system.entry.js} +1 -1
- package/lib/duet/{p-e406a3b7.entry.js → p-73900ab3.entry.js} +1 -1
- package/lib/duet/{p-cbb59840.entry.js → p-77379e14.entry.js} +1 -1
- package/lib/duet/{p-5a4a83ce.entry.js → p-7924e732.entry.js} +1 -1
- package/lib/duet/p-79d1d0cb.system.entry.js +4 -0
- package/lib/duet/{p-7ccefcc3.system.entry.js → p-7b24dead.system.entry.js} +2 -2
- package/lib/duet/{p-188d7eb5.system.entry.js → p-7b453d02.system.entry.js} +1 -1
- package/lib/duet/{p-113531de.entry.js → p-7c89d0c2.entry.js} +1 -1
- package/lib/duet/{p-be1a1ee5.entry.js → p-7f7bbf78.entry.js} +1 -1
- package/lib/duet/p-83acdd74.system.entry.js +4 -0
- package/lib/duet/{p-e3010ea3.entry.js → p-885863ec.entry.js} +1 -1
- package/lib/duet/{p-aae30188.system.js → p-8d960bf9.system.js} +1 -1
- package/lib/duet/{p-974143b1.system.entry.js → p-91fbb3dd.system.entry.js} +1 -1
- package/lib/duet/{p-3dadaaf9.entry.js → p-96684a07.entry.js} +1 -1
- package/lib/duet/{p-a1980c81.entry.js → p-9b726b0f.entry.js} +1 -1
- package/lib/duet/{p-4a000e12.system.entry.js → p-9ca9a75a.system.entry.js} +1 -1
- package/lib/duet/{p-7bad44b0.entry.js → p-9ccfa377.entry.js} +1 -1
- package/lib/duet/{p-7e3eec66.system.entry.js → p-9d79b4b4.system.entry.js} +1 -1
- package/lib/duet/{p-7fbb09c1.system.entry.js → p-a25e8c1e.system.entry.js} +1 -1
- package/lib/duet/p-a6dafb06.entry.js +4 -0
- package/lib/duet/{p-3c0d7470.system.entry.js → p-af13e0a4.system.entry.js} +2 -2
- package/lib/duet/p-b391e09f.entry.js +4 -0
- package/lib/duet/{p-dc429d5d.system.entry.js → p-b5427844.system.entry.js} +1 -1
- package/lib/duet/{p-e8658390.system.entry.js → p-b55b1eee.system.entry.js} +1 -1
- package/lib/duet/{p-3b871ee9.system.entry.js → p-b8c692d9.system.entry.js} +1 -1
- package/lib/duet/{p-84a95f49.system.entry.js → p-bb12ef40.system.entry.js} +1 -1
- package/lib/duet/{p-999dec9f.entry.js → p-bc3bf3c1.entry.js} +1 -1
- package/lib/duet/{p-8d7c2cf4.entry.js → p-cad1a3ae.entry.js} +1 -1
- package/lib/duet/{p-5aec2bd7.system.entry.js → p-cd6c7ef4.system.entry.js} +1 -1
- package/lib/duet/{p-4be66230.js → p-d15467dd.js} +1 -1
- package/lib/duet/{p-31f7ef10.system.entry.js → p-d2ab2e3a.system.entry.js} +1 -1
- package/lib/duet/{p-1fdc5601.system.entry.js → p-d30fca7c.system.entry.js} +1 -1
- package/lib/duet/{p-808d661f.system.entry.js → p-d658e056.system.entry.js} +1 -1
- package/lib/duet/{p-55fbbafb.entry.js → p-d825646b.entry.js} +1 -1
- package/lib/duet/{p-e5992e2a.entry.js → p-d9f25bfd.entry.js} +1 -1
- package/lib/duet/{p-e6ff063e.system.entry.js → p-da4b1590.system.entry.js} +1 -1
- package/lib/duet/{p-3a529853.system.entry.js → p-db18d1d9.system.entry.js} +1 -1
- package/lib/duet/{p-57934454.entry.js → p-dbc93afd.entry.js} +1 -1
- package/lib/duet/{p-6ecb8b94.entry.js → p-dd8890a5.entry.js} +1 -1
- package/lib/duet/{p-a7e5cd45.entry.js → p-e30e5451.entry.js} +1 -1
- package/lib/duet/{p-db48e77a.system.entry.js → p-e442811b.system.entry.js} +1 -1
- package/lib/duet/p-e54773a3.system.js +4 -0
- package/lib/duet/{p-95dc8004.system.entry.js → p-e7c6249a.system.entry.js} +1 -1
- package/lib/duet/{p-0da92109.system.entry.js → p-e9102d1d.system.entry.js} +1 -1
- package/lib/duet/{p-928e0b63.entry.js → p-e92ce50e.entry.js} +1 -1
- package/lib/duet/{p-3cf51bd3.entry.js → p-e9c77ad7.entry.js} +1 -1
- package/lib/duet/{p-08829649.entry.js → p-f2d7130c.entry.js} +1 -1
- package/lib/duet/{p-bf306f77.entry.js → p-f9779f32.entry.js} +1 -1
- package/lib/duet/{p-c0cb67d7.entry.js → p-f9f77331.entry.js} +1 -1
- package/lib/duet/{p-6009349f.entry.js → p-fa0df688.entry.js} +1 -1
- package/lib/duet/{p-e7eb9f7a.system.entry.js → p-fb40adf9.system.entry.js} +1 -1
- package/lib/duet/{p-879ab923.entry.js → p-fb84a35e.entry.js} +1 -1
- package/lib/duet/{p-9e3cd6b5.entry.js → p-ff32d4e5.entry.js} +1 -1
- package/lib/esm/duet-action-button.entry.js +1 -1
- package/lib/esm/duet-alert.entry.js +1 -1
- package/lib/esm/duet-badge.entry.js +1 -1
- package/lib/esm/duet-breadcrumb.entry.js +1 -1
- package/lib/esm/duet-breadcrumbs.entry.js +3 -2
- package/lib/esm/duet-button_2.entry.js +1 -1
- package/lib/esm/duet-caption_4.entry.js +1 -1
- 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 +5 -5
- package/lib/esm/duet-collapsible.entry.js +1 -1
- package/lib/esm/duet-combobox.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_3.entry.js +1 -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 +4 -22
- package/lib/esm/duet-grid_2.entry.js +1 -1
- package/lib/esm/duet-header_2.entry.js +1 -1
- 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 +2 -2
- package/lib/esm/duet-notification_2.entry.js +1 -1
- package/lib/esm/duet-number-input.entry.js +1 -1
- package/lib/esm/duet-pagination_2.entry.js +13 -6
- 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 +1 -1
- 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-6313db97.js → focus-utils-f13c6d24.js} +1 -1
- package/lib/esm/{index-9e6ac831.js → index-be37acdd.js} +1 -1
- package/lib/esm/loader.js +2 -2
- package/lib/esm-es5/duet-action-button.entry.js +1 -1
- 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 +1 -1
- package/lib/esm-es5/duet-breadcrumbs.entry.js +2 -2
- 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 +2 -2
- package/lib/esm-es5/duet-collapsible.entry.js +1 -1
- package/lib/esm-es5/duet-combobox.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_3.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 +2 -2
- 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-pagination_2.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 +1 -1
- 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 +2 -2
- 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-6313db97.js → focus-utils-f13c6d24.js} +1 -1
- package/lib/esm-es5/{index-9e6ac831.js → index-be37acdd.js} +1 -1
- package/lib/esm-es5/loader.js +1 -1
- package/lib/types/components/duet-footer/duet-footer.d.ts +0 -27
- package/lib/types/components/duet-pagination/duet-pagination.d.ts +2 -1
- package/lib/types/components.d.ts +0 -32
- package/lib/types/utils/fixture-utils.d.ts +4 -5
- package/package.json +5 -7
- package/lib/cjs/action-arrow-right-small-a25eb475.js +0 -8
- package/lib/duet/p-057e3337.system.entry.js +0 -4
- package/lib/duet/p-216d4da8.entry.js +0 -4
- package/lib/duet/p-24201d53.system.entry.js +0 -4
- package/lib/duet/p-336ddadc.js +0 -4
- package/lib/duet/p-355f9884.entry.js +0 -4
- package/lib/duet/p-3e510a51.entry.js +0 -4
- package/lib/duet/p-479657e4.entry.js +0 -4
- package/lib/duet/p-4804b9d8.system.entry.js +0 -4
- package/lib/duet/p-7cbb6eba.js +0 -4
- package/lib/duet/p-89368497.system.js +0 -4
- package/lib/duet/p-af5f34fb.entry.js +0 -4
- package/lib/duet/p-afc7cc44.entry.js +0 -4
- package/lib/duet/p-f476cb84.system.js +0 -4
- package/lib/esm/action-arrow-right-small-f9d2ba83.js +0 -6
- package/lib/esm-es5/action-arrow-right-small-f9d2ba83.js +0 -4
|
@@ -235,6 +235,8 @@ a:hover .duet-footer-arrow {
|
|
|
235
235
|
|
|
236
236
|
.duet-footer-menu {
|
|
237
237
|
padding: 20px !important;
|
|
238
|
+
display: flex;
|
|
239
|
+
gap: 2rem;
|
|
238
240
|
font-size: 0.875rem;
|
|
239
241
|
}
|
|
240
242
|
@media (min-width: 36em) {
|
|
@@ -262,13 +264,43 @@ a:hover .duet-footer-arrow {
|
|
|
262
264
|
display: inline-block;
|
|
263
265
|
margin: 0 8px;
|
|
264
266
|
}
|
|
267
|
+
.duet-footer-menu .duet-footer-divider-copyright {
|
|
268
|
+
display: none;
|
|
269
|
+
}
|
|
270
|
+
.duet-footer-menu .duet-footer-menu-links {
|
|
271
|
+
flex: 1;
|
|
272
|
+
}
|
|
273
|
+
@media (min-width: 62em) {
|
|
274
|
+
.duet-footer-menu .duet-footer-menu-links {
|
|
275
|
+
text-align: right;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
265
278
|
.duet-footer-menu a:last-of-type .duet-footer-divider {
|
|
266
279
|
display: none;
|
|
267
280
|
}
|
|
268
281
|
|
|
269
282
|
.duet-footer-copyright {
|
|
283
|
+
display: none;
|
|
284
|
+
font-size: 0.875rem;
|
|
270
285
|
color: white;
|
|
271
286
|
}
|
|
287
|
+
@media (min-width: 62em) {
|
|
288
|
+
.duet-footer-copyright {
|
|
289
|
+
display: inline;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
.duet-footer-copyright.duet-footer-copyright-mobile {
|
|
293
|
+
display: block;
|
|
294
|
+
padding-top: 0.5rem;
|
|
295
|
+
padding-bottom: 1.25rem;
|
|
296
|
+
padding-left: 2rem;
|
|
297
|
+
text-align: left;
|
|
298
|
+
}
|
|
299
|
+
@media (min-width: 62em) {
|
|
300
|
+
.duet-footer-copyright.duet-footer-copyright-mobile {
|
|
301
|
+
display: none;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
272
304
|
|
|
273
305
|
.duet-footer-simple {
|
|
274
306
|
padding: 0;
|
|
@@ -300,6 +332,9 @@ a:hover .duet-footer-arrow {
|
|
|
300
332
|
.duet-footer-simple .duet-footer-menu {
|
|
301
333
|
padding: 20px 0 !important;
|
|
302
334
|
}
|
|
335
|
+
.duet-footer-simple .duet-footer-copyright-mobile {
|
|
336
|
+
padding-left: 0;
|
|
337
|
+
}
|
|
303
338
|
.duet-footer-simple.duet-theme-turva {
|
|
304
339
|
color: #171c3a;
|
|
305
340
|
border-color: #e4e4e6;
|
|
@@ -309,160 +344,6 @@ a:hover .duet-footer-arrow {
|
|
|
309
344
|
color: #171c3a;
|
|
310
345
|
}
|
|
311
346
|
|
|
312
|
-
.duet-footer-multilevel duet-logo {
|
|
313
|
-
margin-left: 0.5rem !important;
|
|
314
|
-
}
|
|
315
|
-
@media (min-width: 62em) {
|
|
316
|
-
.duet-footer-multilevel duet-logo {
|
|
317
|
-
margin-left: -0.5rem !important;
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
.duet-footer-multilevel .duet-footer-link {
|
|
321
|
-
padding: 0.5rem 1.25rem !important;
|
|
322
|
-
border: 0;
|
|
323
|
-
}
|
|
324
|
-
.duet-footer-multilevel .duet-footer-link:first-of-type {
|
|
325
|
-
margin: 0;
|
|
326
|
-
}
|
|
327
|
-
.duet-footer-multilevel .duet-footer-link .duet-footer-arrow {
|
|
328
|
-
margin-left: 0.5rem;
|
|
329
|
-
}
|
|
330
|
-
.duet-footer-multilevel .duet-footer-link .duet-footer-arrow duet-icon {
|
|
331
|
-
width: 0.75rem;
|
|
332
|
-
height: 0.75rem;
|
|
333
|
-
}
|
|
334
|
-
@media (min-width: 62em) {
|
|
335
|
-
.duet-footer-multilevel .duet-footer-link {
|
|
336
|
-
padding: 0.75rem 0 !important;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
.duet-footer-multilevel .duet-footer-top {
|
|
340
|
-
flex-direction: column;
|
|
341
|
-
gap: 1rem 0;
|
|
342
|
-
align-items: flex-start;
|
|
343
|
-
}
|
|
344
|
-
@media (min-width: 62em) {
|
|
345
|
-
.duet-footer-multilevel .multilevel {
|
|
346
|
-
display: flex;
|
|
347
|
-
justify-content: space-between;
|
|
348
|
-
width: 100%;
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
.duet-footer-multilevel .multilevel-main-item {
|
|
352
|
-
margin-top: 1.25rem;
|
|
353
|
-
}
|
|
354
|
-
@media (min-width: 62em) {
|
|
355
|
-
.duet-footer-multilevel .multilevel-main-item {
|
|
356
|
-
margin-top: 0;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
.duet-footer-multilevel .multilevel-main-item .duet-footer-link {
|
|
360
|
-
padding: 0 0.5 1.25rem !important;
|
|
361
|
-
font-weight: 700;
|
|
362
|
-
}
|
|
363
|
-
@media (min-width: 62em) {
|
|
364
|
-
.duet-footer-multilevel .multilevel-main-item .duet-footer-link {
|
|
365
|
-
padding: 0 0 0.5rem !important;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
@media (min-width: 62em) {
|
|
369
|
-
.duet-footer-multilevel .multilevel-primary-items {
|
|
370
|
-
column-gap: 0;
|
|
371
|
-
width: 100%;
|
|
372
|
-
columns: 3;
|
|
373
|
-
}
|
|
374
|
-
.duet-footer-multilevel .multilevel-primary-items .duet-footer-link {
|
|
375
|
-
display: inline-flex;
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
.duet-footer-multilevel .multilevel-secondary-items .duet-footer-link {
|
|
379
|
-
padding: 0.875rem 1.25rem !important;
|
|
380
|
-
font-weight: 700;
|
|
381
|
-
}
|
|
382
|
-
.duet-footer-multilevel .multilevel-secondary-items .duet-footer-link:first-child {
|
|
383
|
-
padding: 1.25rem 1.25rem 0.875rem !important;
|
|
384
|
-
}
|
|
385
|
-
@media (min-width: 62em) {
|
|
386
|
-
.duet-footer-multilevel .multilevel-secondary-items {
|
|
387
|
-
display: grid;
|
|
388
|
-
grid-template-columns: repeat(3, 1fr);
|
|
389
|
-
width: 100%;
|
|
390
|
-
}
|
|
391
|
-
.duet-footer-multilevel .multilevel-secondary-items .duet-footer-link,
|
|
392
|
-
.duet-footer-multilevel .multilevel-secondary-items .duet-footer-link:first-child {
|
|
393
|
-
display: inline-flex;
|
|
394
|
-
padding: 1rem 0 !important;
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
.duet-footer-multilevel .multilevel-right .duet-footer-link:first-child {
|
|
398
|
-
padding-top: 0.875rem !important;
|
|
399
|
-
font-weight: 700;
|
|
400
|
-
}
|
|
401
|
-
@media (min-width: 62em) {
|
|
402
|
-
.duet-footer-multilevel .multilevel-right .duet-footer-link {
|
|
403
|
-
padding: 0.375rem 0 !important;
|
|
404
|
-
font-size: 0.875rem;
|
|
405
|
-
font-weight: 400;
|
|
406
|
-
}
|
|
407
|
-
.duet-footer-multilevel .multilevel-right .duet-footer-link:first-child {
|
|
408
|
-
padding-top: 0 !important;
|
|
409
|
-
font-size: 1rem;
|
|
410
|
-
font-weight: 600;
|
|
411
|
-
}
|
|
412
|
-
.duet-footer-multilevel .multilevel-right .tertiary-main-item .duet-footer-arrow {
|
|
413
|
-
display: none;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
.duet-footer-multilevel .duet-footer-menu {
|
|
417
|
-
padding: 1.25rem !important;
|
|
418
|
-
line-height: 2.5;
|
|
419
|
-
}
|
|
420
|
-
@media (min-width: 62em) {
|
|
421
|
-
.duet-footer-multilevel .duet-footer-menu {
|
|
422
|
-
padding-right: 0 !important;
|
|
423
|
-
padding-left: 0 !important;
|
|
424
|
-
text-align: right;
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
.duet-footer-multilevel .duet-footer-copyright {
|
|
428
|
-
display: none;
|
|
429
|
-
font-size: 0.875rem;
|
|
430
|
-
}
|
|
431
|
-
@media (min-width: 62em) {
|
|
432
|
-
.duet-footer-multilevel .duet-footer-copyright {
|
|
433
|
-
position: absolute;
|
|
434
|
-
left: 48px;
|
|
435
|
-
display: inline;
|
|
436
|
-
}
|
|
437
|
-
}
|
|
438
|
-
@media (min-width: 76.25em) {
|
|
439
|
-
.duet-footer-multilevel .duet-footer-copyright {
|
|
440
|
-
left: 0;
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
.duet-footer-multilevel .duet-footer-copyright.duet-footer-copyright-mobile {
|
|
444
|
-
display: block;
|
|
445
|
-
padding-top: 0.5rem;
|
|
446
|
-
padding-bottom: 1.25rem;
|
|
447
|
-
text-align: center;
|
|
448
|
-
}
|
|
449
|
-
@media (min-width: 62em) {
|
|
450
|
-
.duet-footer-multilevel .duet-footer-copyright.duet-footer-copyright-mobile {
|
|
451
|
-
display: none;
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
.duet-footer-multilevel.duet-theme-turva .duet-footer-copyright-mobile {
|
|
455
|
-
padding-left: 1.25rem;
|
|
456
|
-
text-align: left;
|
|
457
|
-
}
|
|
458
|
-
.duet-footer-multilevel.duet-theme-turva .duet-footer-icon {
|
|
459
|
-
color: #171c3a;
|
|
460
|
-
background: white;
|
|
461
|
-
}
|
|
462
|
-
.duet-footer-multilevel.duet-theme-turva a:hover .duet-footer-icon {
|
|
463
|
-
background: #e6e6e6;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
347
|
.duet-footer-external {
|
|
467
348
|
display: inline-block;
|
|
468
349
|
margin-left: 4px;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
import arrowDownSmallIcon from "@duetds/icons/lib/assets/action-arrow-down-small";
|
|
5
4
|
import arrowRightIcon from "@duetds/icons/lib/assets/action-arrow-right";
|
|
6
|
-
import arrowRightSmallIcon from "@duetds/icons/lib/assets/action-arrow-right-small";
|
|
7
5
|
import newWindowIcon from "@duetds/icons/lib/assets/action-new-window";
|
|
8
6
|
import newWindowIconSmall from "@duetds/icons/lib/assets/action-new-window-small";
|
|
9
7
|
import { Component, Element, Event, Fragment, h, Prop, State, Watch } from "@stencil/core";
|
|
@@ -16,11 +14,6 @@ const i18n = {
|
|
|
16
14
|
sv: { lahi: "© LokalTapiola", turva: "© Turva" },
|
|
17
15
|
en: { lahi: "© LocalTapiola", turva: "© Turva" },
|
|
18
16
|
};
|
|
19
|
-
const i18nMultilevel = {
|
|
20
|
-
fi: { lahi: "© LähiTapiola", turva: "© Keskinäinen Vakuutusyhtiö Turva" },
|
|
21
|
-
sv: { lahi: "© LokalTapiola", turva: "© Keskinäinen Vakuutusyhtiö Turva" },
|
|
22
|
-
en: { lahi: "© LocalTapiola", turva: "© Keskinäinen Vakuutusyhtiö Turva" },
|
|
23
|
-
};
|
|
24
17
|
const createEvent = (ev, data) => ({
|
|
25
18
|
component: "duet-footer",
|
|
26
19
|
data,
|
|
@@ -39,9 +32,6 @@ export class DuetFooter {
|
|
|
39
32
|
*/
|
|
40
33
|
this.processedMainItem = null;
|
|
41
34
|
this.processedItems = null;
|
|
42
|
-
this.processedSecondaryItems = null;
|
|
43
|
-
this.processedTertiaryMainItem = null;
|
|
44
|
-
this.processedTertiaryItems = null;
|
|
45
35
|
this.processedMenu = null;
|
|
46
36
|
/**
|
|
47
37
|
* Theme of the navigation.
|
|
@@ -116,11 +106,7 @@ export class DuetFooter {
|
|
|
116
106
|
* Local methods
|
|
117
107
|
*/
|
|
118
108
|
async refresh() {
|
|
119
|
-
this.processedMainItem = parsePossibleJSON(this.mainItem);
|
|
120
109
|
this.processedItems = parsePossibleJSON(this.items);
|
|
121
|
-
this.processedSecondaryItems = parsePossibleJSON(this.secondaryItems);
|
|
122
|
-
this.processedTertiaryMainItem = parsePossibleJSON(this.tertiaryMainItem);
|
|
123
|
-
this.processedTertiaryItems = parsePossibleJSON(this.tertiaryItems);
|
|
124
110
|
this.processedMenu = parsePossibleJSON(this.menu);
|
|
125
111
|
}
|
|
126
112
|
/**
|
|
@@ -128,21 +114,19 @@ export class DuetFooter {
|
|
|
128
114
|
* Always the last one in the class.
|
|
129
115
|
*/
|
|
130
116
|
render() {
|
|
131
|
-
const text =
|
|
117
|
+
const text = getLocaleString(i18n);
|
|
132
118
|
const copyrightLabel = this.theme === "turva" ? text.turva : text.lahi;
|
|
133
119
|
return (h("footer", { class: {
|
|
134
120
|
"duet-footer": true,
|
|
135
121
|
"duet-m-0": this.margin === "none",
|
|
136
122
|
"duet-theme-turva": this.theme === "turva",
|
|
137
123
|
"duet-footer-simple": this.variation === "simple",
|
|
138
|
-
"duet-footer-multilevel": this.variation === "multilevel",
|
|
139
124
|
} },
|
|
140
125
|
h("div", { class: "duet-footer-wrapper" },
|
|
141
126
|
h("div", { class: "duet-footer-top", part: "top" },
|
|
142
127
|
this.variation !== "simple" && (h("duet-logo", { href: this.logoHref, onClick: this.handleLogoClick, size: "large", inverse: true, language: this.language, theme: this.theme })),
|
|
143
128
|
this.processedItems &&
|
|
144
129
|
this.variation !== "simple" &&
|
|
145
|
-
this.variation !== "multilevel" &&
|
|
146
130
|
this.processedItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item) },
|
|
147
131
|
h("div", { class: "duet-footer-icon" },
|
|
148
132
|
h("duet-icon", { size: "medium", margin: "none", name: item.icon, color: "currentColor" })),
|
|
@@ -150,60 +134,20 @@ export class DuetFooter {
|
|
|
150
134
|
item.external && h("duet-visually-hidden", null,
|
|
151
135
|
", ",
|
|
152
136
|
this.accessibleLabelExternal),
|
|
153
|
-
h("div", { class: "duet-footer-arrow" }, item.external ? (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })) : (h("duet-icon", { icon: arrowRightIcon.svg, size: "auto", margin: "none", color: "currentColor" })))))),
|
|
154
|
-
this.processedItems && this.variation === "multilevel" && (h("div", { class: "multilevel" },
|
|
155
|
-
h("div", { class: "multilevel-left" },
|
|
156
|
-
h("div", { class: "multilevel-main-item" }, this.processedMainItem && (h("a", { class: "duet-footer-link", href: this.processedMainItem.href, id: this.processedMainItem.id, target: this.processedMainItem.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, this.processedMainItem) },
|
|
157
|
-
h("span", null, this.processedMainItem.label),
|
|
158
|
-
this.processedMainItem.external && (h("duet-visually-hidden", null,
|
|
159
|
-
", ",
|
|
160
|
-
this.accessibleLabelExternal)),
|
|
161
|
-
h("div", { class: "duet-footer-arrow" }, this.processedMainItem.external && (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })))))),
|
|
162
|
-
h("div", { class: "multilevel-primary-items" }, this.processedItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item) },
|
|
163
|
-
h("div", { class: "duet-footer-icon" },
|
|
164
|
-
h("duet-icon", { size: "small", margin: "none", name: item.icon, color: "currentColor" })),
|
|
165
|
-
h("span", null, item.label),
|
|
166
|
-
item.external && h("duet-visually-hidden", null,
|
|
167
|
-
", ",
|
|
168
|
-
this.accessibleLabelExternal),
|
|
169
|
-
h("div", { class: "duet-footer-arrow" }, item.external && (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" }))))))),
|
|
170
|
-
h("div", { class: "multilevel-secondary-items" }, this.processedSecondaryItems &&
|
|
171
|
-
this.processedSecondaryItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item) },
|
|
172
|
-
h("span", null, item.label),
|
|
173
|
-
item.external && (h("duet-visually-hidden", null,
|
|
174
|
-
", ",
|
|
175
|
-
this.accessibleLabelExternal)),
|
|
176
|
-
h("div", { class: "duet-footer-arrow" }, item.external ? (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })) : (h("duet-icon", { icon: arrowRightSmallIcon.svg, size: "auto", margin: "none", color: "currentColor" })))))))),
|
|
177
|
-
h("div", { class: "multilevel-right" },
|
|
178
|
-
this.processedTertiaryMainItem && (h("span", { class: "duet-footer-link tertiary-main-item", id: this.processedTertiaryMainItem.id },
|
|
179
|
-
h("span", null, this.processedTertiaryMainItem.label),
|
|
180
|
-
this.processedTertiaryMainItem.external && (h("duet-visually-hidden", null,
|
|
181
|
-
", ",
|
|
182
|
-
this.accessibleLabelExternal)),
|
|
183
|
-
h("div", { class: "duet-footer-arrow" },
|
|
184
|
-
h("duet-icon", { icon: arrowDownSmallIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })))),
|
|
185
|
-
this.processedTertiaryItems &&
|
|
186
|
-
this.processedTertiaryItems.map(item => (h("a", { class: "duet-footer-link", href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleItemClick(event, item) },
|
|
187
|
-
h("span", null, item.label),
|
|
188
|
-
item.external && h("duet-visually-hidden", null,
|
|
189
|
-
", ",
|
|
190
|
-
this.accessibleLabelExternal),
|
|
191
|
-
h("div", { class: "duet-footer-arrow" }, item.external && (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })))))))))),
|
|
137
|
+
h("div", { class: "duet-footer-arrow" }, item.external ? (h("duet-icon", { icon: newWindowIcon.svg, size: "xx-small", margin: "none", color: "currentColor" })) : (h("duet-icon", { icon: arrowRightIcon.svg, size: "auto", margin: "none", color: "currentColor" }))))))),
|
|
192
138
|
h("slot", { name: "extra" }),
|
|
193
139
|
h("p", { class: "duet-footer-menu", part: "menu" },
|
|
194
140
|
h("span", { class: "duet-footer-copyright" }, `${copyrightLabel} ${new Date().getFullYear()}`),
|
|
195
|
-
this.processedMenu && (h(Fragment, null,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
h("span", { class: "duet-footer-divider", role: "presentation", "aria-hidden": "true" }, "/"))))))),
|
|
206
|
-
this.variation === "multilevel" && (h("p", { class: "duet-footer-copyright duet-footer-copyright-mobile" }, `${copyrightLabel} ${new Date().getFullYear()}`)))));
|
|
141
|
+
h("div", { class: "duet-footer-menu-links" }, this.processedMenu && (h(Fragment, null, this.processedMenu.map(item => (h("a", { href: item.href, id: item.id, target: item.external ? "_blank" : "_self", onClick: event => this.handleMenuClick(event, item) },
|
|
142
|
+
item.label,
|
|
143
|
+
item.external && (h(Fragment, null,
|
|
144
|
+
h("duet-visually-hidden", null,
|
|
145
|
+
", ",
|
|
146
|
+
this.accessibleLabelExternal),
|
|
147
|
+
h("div", { class: "duet-footer-external" },
|
|
148
|
+
h("duet-icon", { icon: newWindowIconSmall.svg, size: "xx-small", margin: "none", color: "currentColor" })))),
|
|
149
|
+
h("span", { class: "duet-footer-divider", role: "presentation", "aria-hidden": "true" }, "/")))))))),
|
|
150
|
+
h("p", { class: "duet-footer-copyright duet-footer-copyright-mobile" }, `${copyrightLabel} ${new Date().getFullYear()}`))));
|
|
207
151
|
}
|
|
208
152
|
static get is() { return "duet-footer"; }
|
|
209
153
|
static get encapsulation() { return "shadow"; }
|
|
@@ -329,23 +273,6 @@ export class DuetFooter {
|
|
|
329
273
|
"reflect": false,
|
|
330
274
|
"defaultValue": "getLanguage()"
|
|
331
275
|
},
|
|
332
|
-
"mainItem": {
|
|
333
|
-
"type": "any",
|
|
334
|
-
"mutable": false,
|
|
335
|
-
"complexType": {
|
|
336
|
-
"original": "any",
|
|
337
|
-
"resolved": "any",
|
|
338
|
-
"references": {}
|
|
339
|
-
},
|
|
340
|
-
"required": false,
|
|
341
|
-
"optional": false,
|
|
342
|
-
"docs": {
|
|
343
|
-
"tags": [],
|
|
344
|
-
"text": "Main item of footer links. Item have to include mandatory\n\"label\" and \"href\". Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag."
|
|
345
|
-
},
|
|
346
|
-
"attribute": "main-item",
|
|
347
|
-
"reflect": false
|
|
348
|
-
},
|
|
349
276
|
"items": {
|
|
350
277
|
"type": "any",
|
|
351
278
|
"mutable": false,
|
|
@@ -363,57 +290,6 @@ export class DuetFooter {
|
|
|
363
290
|
"attribute": "items",
|
|
364
291
|
"reflect": false
|
|
365
292
|
},
|
|
366
|
-
"secondaryItems": {
|
|
367
|
-
"type": "any",
|
|
368
|
-
"mutable": false,
|
|
369
|
-
"complexType": {
|
|
370
|
-
"original": "any",
|
|
371
|
-
"resolved": "any",
|
|
372
|
-
"references": {}
|
|
373
|
-
},
|
|
374
|
-
"required": false,
|
|
375
|
-
"optional": false,
|
|
376
|
-
"docs": {
|
|
377
|
-
"tags": [],
|
|
378
|
-
"text": "An array of items for the secondary footer links. Items have to include mandatory\n\"label\" and \"href\". Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag."
|
|
379
|
-
},
|
|
380
|
-
"attribute": "secondary-items",
|
|
381
|
-
"reflect": false
|
|
382
|
-
},
|
|
383
|
-
"tertiaryMainItem": {
|
|
384
|
-
"type": "any",
|
|
385
|
-
"mutable": false,
|
|
386
|
-
"complexType": {
|
|
387
|
-
"original": "any",
|
|
388
|
-
"resolved": "any",
|
|
389
|
-
"references": {}
|
|
390
|
-
},
|
|
391
|
-
"required": false,
|
|
392
|
-
"optional": false,
|
|
393
|
-
"docs": {
|
|
394
|
-
"tags": [],
|
|
395
|
-
"text": "Main item of tertiary footer links. Item have to include mandatory\n\"label\" and \"href\". Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag."
|
|
396
|
-
},
|
|
397
|
-
"attribute": "tertiary-main-item",
|
|
398
|
-
"reflect": false
|
|
399
|
-
},
|
|
400
|
-
"tertiaryItems": {
|
|
401
|
-
"type": "any",
|
|
402
|
-
"mutable": false,
|
|
403
|
-
"complexType": {
|
|
404
|
-
"original": "any",
|
|
405
|
-
"resolved": "any",
|
|
406
|
-
"references": {}
|
|
407
|
-
},
|
|
408
|
-
"required": false,
|
|
409
|
-
"optional": false,
|
|
410
|
-
"docs": {
|
|
411
|
-
"tags": [],
|
|
412
|
-
"text": "An array of items for the tertiary footer links. Items have to include mandatory\n\"label\" and \"href\". Additionally, you can pass an \"id\"\nthat is added as an HTML identifier for the anchor tag."
|
|
413
|
-
},
|
|
414
|
-
"attribute": "tertiary-items",
|
|
415
|
-
"reflect": false
|
|
416
|
-
},
|
|
417
293
|
"accessibleLabelExternalDefaults": {
|
|
418
294
|
"type": "string",
|
|
419
295
|
"mutable": false,
|
|
@@ -482,9 +358,6 @@ export class DuetFooter {
|
|
|
482
358
|
static get states() { return {
|
|
483
359
|
"processedMainItem": {},
|
|
484
360
|
"processedItems": {},
|
|
485
|
-
"processedSecondaryItems": {},
|
|
486
|
-
"processedTertiaryMainItem": {},
|
|
487
|
-
"processedTertiaryItems": {},
|
|
488
361
|
"processedMenu": {}
|
|
489
362
|
}; }
|
|
490
363
|
static get events() { return [{
|
|
@@ -130,6 +130,7 @@ export class DuetPagination {
|
|
|
130
130
|
await this.setFocus();
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
+
return true;
|
|
133
134
|
};
|
|
134
135
|
//helper to emit relevant page events
|
|
135
136
|
this.emitPageEvent = debounce((ev, passedPage) => {
|
|
@@ -160,8 +161,12 @@ export class DuetPagination {
|
|
|
160
161
|
});
|
|
161
162
|
}, 500);
|
|
162
163
|
}
|
|
164
|
+
watchPropTotalHandler( /*newValue: boolean, oldValue: boolean*/) {
|
|
165
|
+
this.calculatePageTake();
|
|
166
|
+
return true;
|
|
167
|
+
}
|
|
163
168
|
watchStateHandler(newValue, oldValue) {
|
|
164
|
-
this.actionChain(newValue, oldValue);
|
|
169
|
+
return this.actionChain(newValue, oldValue);
|
|
165
170
|
}
|
|
166
171
|
/**
|
|
167
172
|
* Component lifecycle events.
|
|
@@ -232,8 +237,9 @@ export class DuetPagination {
|
|
|
232
237
|
sectionClickHandler(e, direction) {
|
|
233
238
|
e.preventDefault();
|
|
234
239
|
let next = this.internalSectionIndex + direction;
|
|
235
|
-
|
|
236
|
-
|
|
240
|
+
const takePerVisibleItems = this.take * this.visibleItems;
|
|
241
|
+
if (next * takePerVisibleItems > this.total) {
|
|
242
|
+
next = this.internalSectionIndex;
|
|
237
243
|
}
|
|
238
244
|
const newSection = next;
|
|
239
245
|
this.internalSectionIndex = newSection >= 0 ? newSection : 0;
|
|
@@ -248,7 +254,7 @@ export class DuetPagination {
|
|
|
248
254
|
//handles click on the jump (total) button
|
|
249
255
|
jumpToEnd(e) {
|
|
250
256
|
e.preventDefault();
|
|
251
|
-
this.internalSectionIndex = this.totalPages / this.take - 1;
|
|
257
|
+
this.internalSectionIndex = Math.ceil(this.totalPages / this.take - 1);
|
|
252
258
|
this.current = this.totalPages;
|
|
253
259
|
this.emitPageEvent(e);
|
|
254
260
|
}
|
|
@@ -303,18 +309,18 @@ export class DuetPagination {
|
|
|
303
309
|
h("duet-action-button", { disabled: this.internalSectionIndex === 0 && this.current <= 1, "data-direction": "back", onClick: e => this.onMouseHandler(e, -1), "aria-label": this.accessibleLabels.previous_page, "icon-name": "action-arrow-left-small" })),
|
|
304
310
|
this.internalSectionIndex !== 0 && this.shouldDisplayNavigation() && (h(Fragment, null,
|
|
305
311
|
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" },
|
|
306
|
-
h("duet-button", { class: "duet-pagination-link", "center-text": "true", variation: "plain", color: "secondary", margin: "none", accessibleLabel: this.accessibleLabels.first_page, onClick: e => this.jumpToStart(e) },
|
|
312
|
+
h("duet-button", { class: "duet-pagination-link duet-pagination-link-jump-back", "center-text": "true", variation: "plain", color: "secondary", margin: "none", accessibleLabel: this.accessibleLabels.first_page, onClick: e => this.jumpToStart(e) },
|
|
307
313
|
h("div", { class: "duet-pagination-page-number" }, "1"))),
|
|
308
314
|
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" },
|
|
309
|
-
h("duet-button", { class: "duet-pagination-link", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.prev_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, -1) },
|
|
315
|
+
h("duet-button", { class: "duet-pagination-link duet-pagination-link-dots-back", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.prev_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, -1) },
|
|
310
316
|
h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))))),
|
|
311
317
|
this.renderPageNumbers(),
|
|
312
|
-
this.internalSectionIndex
|
|
318
|
+
this.internalSectionIndex * (this.visibleItems + 2) < this.totalPages && this.shouldDisplayNavigation() && (h(Fragment, null,
|
|
313
319
|
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" },
|
|
314
|
-
h("duet-button", { class: "duet-pagination-link", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.next_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, 1) },
|
|
320
|
+
h("duet-button", { class: "duet-pagination-link duet-pagination-link-dots-forward", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.next_section.replace("{0}", `${this.visibleItems}`), onClick: e => this.sectionClickHandler(e, 1) },
|
|
315
321
|
h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))),
|
|
316
322
|
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" },
|
|
317
|
-
h("duet-button", { class: "duet-pagination-link", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.last_page, onClick: e => this.jumpToEnd(e) },
|
|
323
|
+
h("duet-button", { class: "duet-pagination-link duet-pagination-link-jump-forward", "center-text": "true", color: "secondary", variation: "plain", margin: "none", accessibleLabel: this.accessibleLabels.last_page, onClick: e => this.jumpToEnd(e) },
|
|
318
324
|
h("div", { class: "duet-pagination-page-number" }, this.totalPages))))),
|
|
319
325
|
h("li", { class: {
|
|
320
326
|
"duet-pagination-page-button": true,
|
|
@@ -510,7 +516,7 @@ export class DuetPagination {
|
|
|
510
516
|
},
|
|
511
517
|
"take": {
|
|
512
518
|
"type": "number",
|
|
513
|
-
"mutable":
|
|
519
|
+
"mutable": false,
|
|
514
520
|
"complexType": {
|
|
515
521
|
"original": "number",
|
|
516
522
|
"resolved": "number",
|
|
@@ -528,7 +534,7 @@ export class DuetPagination {
|
|
|
528
534
|
},
|
|
529
535
|
"visibleItems": {
|
|
530
536
|
"type": "number",
|
|
531
|
-
"mutable":
|
|
537
|
+
"mutable": false,
|
|
532
538
|
"complexType": {
|
|
533
539
|
"original": "number",
|
|
534
540
|
"resolved": "number",
|
|
@@ -546,7 +552,7 @@ export class DuetPagination {
|
|
|
546
552
|
},
|
|
547
553
|
"total": {
|
|
548
554
|
"type": "number",
|
|
549
|
-
"mutable":
|
|
555
|
+
"mutable": false,
|
|
550
556
|
"complexType": {
|
|
551
557
|
"original": "number",
|
|
552
558
|
"resolved": "number",
|
|
@@ -626,6 +632,9 @@ export class DuetPagination {
|
|
|
626
632
|
}]; }
|
|
627
633
|
static get elementRef() { return "element"; }
|
|
628
634
|
static get watchers() { return [{
|
|
635
|
+
"propName": "total",
|
|
636
|
+
"methodName": "watchPropTotalHandler"
|
|
637
|
+
}, {
|
|
629
638
|
"propName": "current",
|
|
630
639
|
"methodName": "watchStateHandler"
|
|
631
640
|
}]; }
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Built with Duet Design System
|
|
3
3
|
*/
|
|
4
|
-
require("dotenv").config();
|
|
5
|
-
const port = process.env.KOA_PROXY_PORT ? parseInt(process.env.KOA_PROXY_PORT) : 3334;
|
|
6
4
|
import * as fs from "fs";
|
|
7
5
|
import * as path from "path";
|
|
8
|
-
import { createPage } from "./test-utils";
|
|
9
6
|
/**
|
|
10
7
|
* Get fixtures from directories and parse them for processing
|
|
11
8
|
*/
|
|
12
|
-
function getAllFixturesFiles(dirPath, fixPath = "fixtures", skipFixture = []) {
|
|
9
|
+
export function getAllFixturesFiles(dirPath, fixPath = "fixtures", skipFixture = []) {
|
|
13
10
|
const component = dirPath.split(path.sep).pop();
|
|
14
11
|
const fullPath = path.join(dirPath, fixPath);
|
|
15
12
|
let files;
|
|
@@ -36,77 +33,3 @@ function getAllFixturesFiles(dirPath, fixPath = "fixtures", skipFixture = []) {
|
|
|
36
33
|
fixtures,
|
|
37
34
|
};
|
|
38
35
|
}
|
|
39
|
-
/**
|
|
40
|
-
* Generate automatic fixture testing for jest
|
|
41
|
-
*/
|
|
42
|
-
const htmlFragment = (fixtureHtml, theme = "", minHeight = "0px", lang = "fi") => {
|
|
43
|
-
let fontFile = "localtapiola";
|
|
44
|
-
let className = "";
|
|
45
|
-
if (theme === "turva") {
|
|
46
|
-
fontFile = "turva";
|
|
47
|
-
className = "duet-theme-turva";
|
|
48
|
-
}
|
|
49
|
-
return `
|
|
50
|
-
<html class="${className}" lang="${lang}" style="min-height: auto">
|
|
51
|
-
<head>
|
|
52
|
-
<meta charset="utf-8" />
|
|
53
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
54
|
-
<title>Visual regression test</title>
|
|
55
|
-
<style>
|
|
56
|
-
*,
|
|
57
|
-
*::after,
|
|
58
|
-
*::before {
|
|
59
|
-
transition-delay: 0s !important;
|
|
60
|
-
transition-duration: 0s !important;
|
|
61
|
-
animation-delay: -0.0001s !important;
|
|
62
|
-
animation-duration: 0s !important;
|
|
63
|
-
animation-play-state: paused !important;
|
|
64
|
-
caret-color: transparent !important;
|
|
65
|
-
color-adjust: exact !important;
|
|
66
|
-
}
|
|
67
|
-
*:focus,
|
|
68
|
-
*:focus::after,
|
|
69
|
-
*:focus::before {
|
|
70
|
-
outline: none !important;
|
|
71
|
-
outline-style: none !important;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
</style>
|
|
75
|
-
<link rel="stylesheet" href="http://0.0.0.0:${port}/fonts/lib/${fontFile}.css" />
|
|
76
|
-
<link rel="stylesheet" href="http://0.0.0.0:${port}/tokens/lib/tokens.custom-properties.css" />
|
|
77
|
-
<link rel="stylesheet" href="http://0.0.0.0:${port}/css/lib/duet.css" />
|
|
78
|
-
</head>
|
|
79
|
-
<body style="min-height: ${minHeight} !important; margin: 8px">
|
|
80
|
-
${fixtureHtml}
|
|
81
|
-
</body>
|
|
82
|
-
</html>
|
|
83
|
-
|
|
84
|
-
`;
|
|
85
|
-
};
|
|
86
|
-
// getFixturesAndTest returns fixtures object and creates synthetic tests
|
|
87
|
-
export const getFixturesAndTest = (directory, options = {}) => {
|
|
88
|
-
const { minHeight, skipFixture } = options;
|
|
89
|
-
const componentFixtures = getAllFixturesFiles(directory, "fixtures", skipFixture);
|
|
90
|
-
fixtureTests(componentFixtures, minHeight);
|
|
91
|
-
return componentFixtures;
|
|
92
|
-
};
|
|
93
|
-
export const fixtureTests = (componentFixtures, minHeight) => {
|
|
94
|
-
if (!process.env.VIZDIF) {
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
describe(`${componentFixtures.component} vizdif`, () => {
|
|
98
|
-
Object.keys(componentFixtures.fixtures).forEach(fixtureName => {
|
|
99
|
-
const html = componentFixtures.fixtures[fixtureName];
|
|
100
|
-
it(`${fixtureName} renders correctly with Turva theme`, async () => {
|
|
101
|
-
const page = await createPage(htmlFragment(html, "turva", minHeight));
|
|
102
|
-
await page.find("#fixture");
|
|
103
|
-
expect(await page.screenshot()).toMatchImageSnapshot();
|
|
104
|
-
});
|
|
105
|
-
it(`${fixtureName} renders correctly with Lahitapiola theme`, async () => {
|
|
106
|
-
const page = await createPage(htmlFragment(html, "default", minHeight));
|
|
107
|
-
await page.find("#fixture");
|
|
108
|
-
expect(await page.screenshot()).toMatchImageSnapshot();
|
|
109
|
-
});
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
};
|