@duetds/components 5.2.1 → 5.3.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 +47 -48
- 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 +39 -17
- 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-7b09fa4b.js → focus-utils-fdec6e56.js} +1 -1
- package/lib/cjs/{index-3024eb44.js → index-b8ee5284.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 +18 -13
- package/lib/collection/components/duet-range-stepper/duet-range-stepper.js +28 -11
- package/lib/collection/utils/fixture-utils.js +1 -78
- package/lib/custom-elements-bundle/index.js +47 -41
- package/lib/duet/duet.esm.js +1 -1
- package/lib/duet/duet.js +1 -1
- package/lib/duet/{p-7f984c27.system.entry.js → p-03e763e8.system.entry.js} +1 -1
- package/lib/duet/{p-5183d420.entry.js → p-0691a1db.entry.js} +1 -1
- package/lib/duet/{p-036b2f99.system.entry.js → p-08337a53.system.entry.js} +1 -1
- package/lib/duet/{p-053c3751.entry.js → p-08cfb940.entry.js} +1 -1
- package/lib/duet/{p-76c11fd4.entry.js → p-0d682d28.entry.js} +1 -1
- package/lib/duet/{p-869a8af0.entry.js → p-0dac66ae.entry.js} +1 -1
- package/lib/duet/{p-876175fe.entry.js → p-0e8f4cc2.entry.js} +1 -1
- package/lib/duet/{p-6ed460f4.system.entry.js → p-109603a2.system.entry.js} +1 -1
- package/lib/duet/{p-9954eddc.entry.js → p-10d7287b.entry.js} +1 -1
- package/lib/duet/{p-13db05ed.entry.js → p-12fb8a87.entry.js} +1 -1
- package/lib/duet/{p-536bde7b.entry.js → p-134231d4.entry.js} +1 -1
- package/lib/duet/{p-dfa712ca.js → p-15a81b18.js} +1 -1
- package/lib/duet/{p-6e02a236.system.entry.js → p-187ad8a8.system.entry.js} +1 -1
- package/lib/duet/{p-27d9b918.entry.js → p-18e3ebc9.entry.js} +1 -1
- package/lib/duet/p-1b276548.system.js +4 -0
- package/lib/duet/{p-0f343566.system.entry.js → p-1f80b9dc.system.entry.js} +1 -1
- package/lib/duet/{p-9d86935b.entry.js → p-2684f8e0.entry.js} +1 -1
- package/lib/duet/{p-60ef49b0.entry.js → p-268f03d9.entry.js} +1 -1
- package/lib/duet/{p-a418cba4.system.js → p-31b26d9c.system.js} +1 -1
- package/lib/duet/{p-ac368fcb.entry.js → p-37d79c67.entry.js} +1 -1
- package/lib/duet/{p-16a1bfe4.entry.js → p-38a9c05f.entry.js} +1 -1
- package/lib/duet/{p-4e2d8044.system.entry.js → p-3aabf3bb.system.entry.js} +1 -1
- package/lib/duet/{p-31a56879.system.entry.js → p-3af85569.system.entry.js} +1 -1
- package/lib/duet/{p-f9501a56.entry.js → p-3b4f0ff4.entry.js} +1 -1
- package/lib/duet/{p-74e56aba.system.entry.js → p-3ddcbdc3.system.entry.js} +1 -1
- package/lib/duet/{p-53b8ff1e.system.entry.js → p-40443406.system.entry.js} +1 -1
- package/lib/duet/{p-b708426c.entry.js → p-41a9efde.entry.js} +1 -1
- package/lib/duet/{p-b2e25ecf.system.entry.js → p-4acd55b8.system.entry.js} +1 -1
- package/lib/duet/{p-df6ebe8d.system.entry.js → p-4d2de4f3.system.entry.js} +1 -1
- package/lib/duet/{p-76263b65.system.entry.js → p-4e73aa88.system.entry.js} +1 -1
- package/lib/duet/{p-97bbef5f.system.entry.js → p-548f0b12.system.entry.js} +1 -1
- package/lib/duet/{p-a18f86a0.entry.js → p-556cbde2.entry.js} +1 -1
- package/lib/duet/{p-484993a3.entry.js → p-56a003a2.entry.js} +1 -1
- package/lib/duet/{p-97d54e2d.entry.js → p-5af47544.entry.js} +1 -1
- package/lib/duet/{p-095b52f8.system.entry.js → p-616f39b7.system.entry.js} +1 -1
- package/lib/duet/{p-1167bc0a.system.entry.js → p-67c79158.system.entry.js} +1 -1
- package/lib/duet/{p-4ff48b81.entry.js → p-68542d9e.entry.js} +1 -1
- package/lib/duet/{p-50f27bbf.system.entry.js → p-6a27cfe6.system.entry.js} +1 -1
- package/lib/duet/{p-720c6e22.system.entry.js → p-6fa21e7a.system.entry.js} +1 -1
- package/lib/duet/p-73861e15.entry.js +4 -0
- package/lib/duet/p-7426cb50.system.entry.js +4 -0
- package/lib/duet/{p-0522338d.system.entry.js → p-7467ee59.system.entry.js} +1 -1
- package/lib/duet/{p-6518b98d.entry.js → p-7a674406.entry.js} +1 -1
- package/lib/duet/{p-97b88959.system.entry.js → p-7a9d50dc.system.entry.js} +1 -1
- package/lib/duet/p-8240f948.entry.js +4 -0
- package/lib/duet/{p-88113f53.system.entry.js → p-85dff60b.system.entry.js} +1 -1
- package/lib/duet/{p-56d12aca.system.entry.js → p-8653c219.system.entry.js} +1 -1
- package/lib/duet/{p-bf052bc0.system.entry.js → p-8b3aa24a.system.entry.js} +1 -1
- package/lib/duet/{p-ec55c00f.system.entry.js → p-947b5555.system.entry.js} +1 -1
- package/lib/duet/{p-7ef5c9a5.entry.js → p-952db7f3.entry.js} +1 -1
- package/lib/duet/{p-8828fc2e.system.entry.js → p-960e7b9b.system.entry.js} +1 -1
- package/lib/duet/{p-55a7c445.system.entry.js → p-972a2484.system.entry.js} +1 -1
- package/lib/duet/{p-867497c7.system.entry.js → p-a389cef0.system.entry.js} +1 -1
- package/lib/duet/{p-7e951645.system.entry.js → p-a3d00d15.system.entry.js} +1 -1
- package/lib/duet/{p-094b206c.entry.js → p-a659dd10.entry.js} +1 -1
- package/lib/duet/{p-98cf83b0.system.entry.js → p-a81e86fa.system.entry.js} +1 -1
- package/lib/duet/{p-927f850c.system.entry.js → p-a8f1a491.system.entry.js} +1 -1
- package/lib/duet/{p-8e9cbd88.entry.js → p-ada8866f.entry.js} +1 -1
- package/lib/duet/p-ae360f66.system.entry.js +4 -0
- package/lib/duet/{p-cd5ed901.system.entry.js → p-b7063d6c.system.entry.js} +1 -1
- package/lib/duet/{p-cabfb664.system.entry.js → p-bc8d4408.system.entry.js} +1 -1
- package/lib/duet/p-c0296b33.system.entry.js +4 -0
- package/lib/duet/{p-750330d5.entry.js → p-c20811fe.entry.js} +1 -1
- package/lib/duet/{p-f3a98f22.entry.js → p-c344e11d.entry.js} +1 -1
- package/lib/duet/{p-35f011bf.system.js → p-c7c65229.system.js} +1 -1
- package/lib/duet/{p-8de3ea21.system.entry.js → p-cd79ca71.system.entry.js} +1 -1
- package/lib/duet/{p-d698f01c.system.entry.js → p-ce1e490c.system.entry.js} +1 -1
- package/lib/duet/p-cf16262d.entry.js +4 -0
- package/lib/duet/{p-c21bd47a.js → p-d056a9c9.js} +1 -1
- package/lib/duet/{p-85be7c9f.system.entry.js → p-d2e0b281.system.entry.js} +1 -1
- package/lib/duet/{p-8714d15d.entry.js → p-d4d37e8a.entry.js} +1 -1
- package/lib/duet/{p-0fffc5fe.entry.js → p-d7c45678.entry.js} +1 -1
- package/lib/duet/{p-af4aafea.entry.js → p-e1676535.entry.js} +1 -1
- package/lib/duet/{p-273b6543.entry.js → p-e85664b1.entry.js} +1 -1
- package/lib/duet/{p-49fc4668.entry.js → p-e98a45bf.entry.js} +1 -1
- package/lib/duet/p-ed19ffae.entry.js +4 -0
- package/lib/duet/{p-7bf7db59.system.entry.js → p-ed66c892.system.entry.js} +2 -2
- package/lib/duet/{p-c6e70db9.entry.js → p-f0a6e48b.entry.js} +1 -1
- package/lib/duet/{p-465777cf.system.entry.js → p-f3493c2b.system.entry.js} +1 -1
- package/lib/duet/{p-b7a90031.entry.js → p-f352c0ba.entry.js} +1 -1
- package/lib/duet/{p-dc1f4e8a.entry.js → p-f4055b5a.entry.js} +1 -1
- package/lib/duet/{p-91a3e8db.entry.js → p-f4afff5a.entry.js} +1 -1
- package/lib/duet/{p-d65262fb.system.entry.js → p-f5970513.system.entry.js} +1 -1
- package/lib/duet/{p-69180d4f.system.entry.js → p-f5b735fa.system.entry.js} +1 -1
- package/lib/duet/{p-2cc240f9.system.entry.js → p-f78511bd.system.entry.js} +1 -1
- package/lib/duet/{p-40ebab42.entry.js → p-f87621f5.entry.js} +1 -1
- package/lib/duet/{p-4061e958.entry.js → p-f9a3ffb8.entry.js} +1 -1
- package/lib/duet/p-fe01a355.entry.js +4 -0
- package/lib/duet/{p-c576c929.entry.js → p-ff766a28.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 +39 -17
- 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-a1fd6cac.js → focus-utils-4be10338.js} +1 -1
- package/lib/esm/{index-179c634c.js → index-d328c322.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-a1fd6cac.js → focus-utils-4be10338.js} +1 -1
- package/lib/esm-es5/{index-179c634c.js → index-d328c322.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 +1 -1
- package/lib/types/components/duet-range-stepper/duet-range-stepper.d.ts +3 -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-15edabe0.entry.js +0 -4
- package/lib/duet/p-2ee81c0d.system.entry.js +0 -4
- package/lib/duet/p-798355c8.system.js +0 -4
- package/lib/duet/p-7cbb6eba.js +0 -4
- package/lib/duet/p-7ed17661.entry.js +0 -4
- package/lib/duet/p-88996447.entry.js +0 -4
- package/lib/duet/p-a36592fe.system.entry.js +0 -4
- package/lib/duet/p-b2a01d36.entry.js +0 -4
- package/lib/duet/p-d7d0f3b7.entry.js +0 -4
- package/lib/duet/p-eba2b43d.system.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) => {
|
|
@@ -143,7 +144,7 @@ export class DuetPagination {
|
|
|
143
144
|
type: "page",
|
|
144
145
|
originalEvent: ev,
|
|
145
146
|
});
|
|
146
|
-
},
|
|
147
|
+
}, 100);
|
|
147
148
|
// this will return the entered number, or the current page if the user presses enter
|
|
148
149
|
this.getEnteredNumber = debounce(ev => {
|
|
149
150
|
this.emitPageEvent(ev, this.numbersStore);
|
|
@@ -161,7 +162,7 @@ export class DuetPagination {
|
|
|
161
162
|
}, 500);
|
|
162
163
|
}
|
|
163
164
|
watchStateHandler(newValue, oldValue) {
|
|
164
|
-
this.actionChain(newValue, oldValue);
|
|
165
|
+
return this.actionChain(newValue, oldValue);
|
|
165
166
|
}
|
|
166
167
|
/**
|
|
167
168
|
* Component lifecycle events.
|
|
@@ -189,6 +190,7 @@ export class DuetPagination {
|
|
|
189
190
|
e.preventDefault();
|
|
190
191
|
e.stopPropagation();
|
|
191
192
|
this.current = this.current + dir;
|
|
193
|
+
this.emitPageEvent(e);
|
|
192
194
|
}
|
|
193
195
|
//handle a11y keyboard navigation events
|
|
194
196
|
async onKeyboardDown(e) {
|
|
@@ -231,8 +233,9 @@ export class DuetPagination {
|
|
|
231
233
|
sectionClickHandler(e, direction) {
|
|
232
234
|
e.preventDefault();
|
|
233
235
|
let next = this.internalSectionIndex + direction;
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
const takePerVisibleItems = this.take * this.visibleItems;
|
|
237
|
+
if (next * takePerVisibleItems > this.total) {
|
|
238
|
+
next = this.internalSectionIndex;
|
|
236
239
|
}
|
|
237
240
|
const newSection = next;
|
|
238
241
|
this.internalSectionIndex = newSection >= 0 ? newSection : 0;
|
|
@@ -242,12 +245,14 @@ export class DuetPagination {
|
|
|
242
245
|
e.preventDefault();
|
|
243
246
|
this.internalSectionIndex = 0;
|
|
244
247
|
this.current = 1;
|
|
248
|
+
this.emitPageEvent(e);
|
|
245
249
|
}
|
|
246
250
|
//handles click on the jump (total) button
|
|
247
251
|
jumpToEnd(e) {
|
|
248
252
|
e.preventDefault();
|
|
249
|
-
this.internalSectionIndex = this.totalPages / this.take - 1;
|
|
253
|
+
this.internalSectionIndex = Math.ceil(this.totalPages / this.take - 1);
|
|
250
254
|
this.current = this.totalPages;
|
|
255
|
+
this.emitPageEvent(e);
|
|
251
256
|
}
|
|
252
257
|
// render the individual page numbers
|
|
253
258
|
renderPageNumbers() {
|
|
@@ -300,18 +305,18 @@ export class DuetPagination {
|
|
|
300
305
|
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" })),
|
|
301
306
|
this.internalSectionIndex !== 0 && this.shouldDisplayNavigation() && (h(Fragment, null,
|
|
302
307
|
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" },
|
|
303
|
-
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) },
|
|
308
|
+
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) },
|
|
304
309
|
h("div", { class: "duet-pagination-page-number" }, "1"))),
|
|
305
310
|
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" },
|
|
306
|
-
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) },
|
|
311
|
+
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) },
|
|
307
312
|
h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))))),
|
|
308
313
|
this.renderPageNumbers(),
|
|
309
|
-
this.internalSectionIndex
|
|
314
|
+
this.internalSectionIndex * (this.visibleItems + 2) < this.totalPages && this.shouldDisplayNavigation() && (h(Fragment, null,
|
|
310
315
|
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-section" },
|
|
311
|
-
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) },
|
|
316
|
+
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) },
|
|
312
317
|
h("div", { class: "duet-pagination-page-number", "aria-hidden": "true" }, "..."))),
|
|
313
318
|
h("li", { class: "duet-pagination-item", role: "menuitem", part: "navigation-jump" },
|
|
314
|
-
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) },
|
|
319
|
+
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) },
|
|
315
320
|
h("div", { class: "duet-pagination-page-number" }, this.totalPages))))),
|
|
316
321
|
h("li", { class: {
|
|
317
322
|
"duet-pagination-page-button": true,
|
|
@@ -507,7 +512,7 @@ export class DuetPagination {
|
|
|
507
512
|
},
|
|
508
513
|
"take": {
|
|
509
514
|
"type": "number",
|
|
510
|
-
"mutable":
|
|
515
|
+
"mutable": false,
|
|
511
516
|
"complexType": {
|
|
512
517
|
"original": "number",
|
|
513
518
|
"resolved": "number",
|
|
@@ -525,7 +530,7 @@ export class DuetPagination {
|
|
|
525
530
|
},
|
|
526
531
|
"visibleItems": {
|
|
527
532
|
"type": "number",
|
|
528
|
-
"mutable":
|
|
533
|
+
"mutable": false,
|
|
529
534
|
"complexType": {
|
|
530
535
|
"original": "number",
|
|
531
536
|
"resolved": "number",
|
|
@@ -543,7 +548,7 @@ export class DuetPagination {
|
|
|
543
548
|
},
|
|
544
549
|
"total": {
|
|
545
550
|
"type": "number",
|
|
546
|
-
"mutable":
|
|
551
|
+
"mutable": false,
|
|
547
552
|
"complexType": {
|
|
548
553
|
"original": "number",
|
|
549
554
|
"resolved": "number",
|
|
@@ -63,15 +63,15 @@ export class DuetRangeStepper {
|
|
|
63
63
|
this.handleStepClick(e);
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
|
|
67
|
-
if (newValue
|
|
66
|
+
watchStepIndexStateHandler(newValue) {
|
|
67
|
+
if (newValue <= 1) {
|
|
68
68
|
this.leftBnRef.setAttribute("disabled", "");
|
|
69
69
|
this.rightBnRef.focus();
|
|
70
70
|
}
|
|
71
71
|
else {
|
|
72
72
|
this.leftBnRef.removeAttribute("disabled");
|
|
73
73
|
}
|
|
74
|
-
if (newValue
|
|
74
|
+
if (newValue >= this.total / this.stepSize) {
|
|
75
75
|
this.rightBnRef.setAttribute("disabled", "");
|
|
76
76
|
this.leftBnRef.focus();
|
|
77
77
|
}
|
|
@@ -79,12 +79,20 @@ export class DuetRangeStepper {
|
|
|
79
79
|
this.rightBnRef.removeAttribute("disabled");
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
watchStepSizeStateHandler(newValue, oldValue) {
|
|
83
|
+
if (newValue !== oldValue) {
|
|
84
|
+
if (this.stepIndex * newValue > this.total) {
|
|
85
|
+
this.stepIndex = this.total / newValue;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
82
89
|
handleStepClick(e) {
|
|
90
|
+
const from = this.stepIndex * this.stepSize - this.stepSize;
|
|
83
91
|
this.duetRangeStepUpdate.emit({
|
|
84
92
|
originalEvent: e,
|
|
85
93
|
component: "duet-range-stepper",
|
|
86
|
-
from:
|
|
87
|
-
to: this.
|
|
94
|
+
from: from,
|
|
95
|
+
to: this.getTo(),
|
|
88
96
|
index: this.stepIndex,
|
|
89
97
|
});
|
|
90
98
|
}
|
|
@@ -92,7 +100,7 @@ export class DuetRangeStepper {
|
|
|
92
100
|
inheritGlobalTheme(this);
|
|
93
101
|
}
|
|
94
102
|
componentDidLoad() {
|
|
95
|
-
this.
|
|
103
|
+
this.watchStepIndexStateHandler(this.stepIndex);
|
|
96
104
|
}
|
|
97
105
|
increment(direction) {
|
|
98
106
|
const newIndex = this.stepIndex + direction;
|
|
@@ -100,22 +108,28 @@ export class DuetRangeStepper {
|
|
|
100
108
|
this.stepIndex = 1;
|
|
101
109
|
}
|
|
102
110
|
else {
|
|
103
|
-
if (newIndex * this.stepSize
|
|
111
|
+
if (newIndex * this.stepSize < this.total + this.stepSize) {
|
|
104
112
|
this.stepIndex = newIndex;
|
|
105
113
|
}
|
|
106
|
-
else {
|
|
114
|
+
else if (newIndex * this.stepSize > this.total + this.stepSize) {
|
|
115
|
+
this.stepIndex = Math.floor(this.total / this.stepSize);
|
|
107
116
|
}
|
|
108
117
|
}
|
|
109
118
|
}
|
|
119
|
+
getTo() {
|
|
120
|
+
const to = this.stepIndex * this.stepSize;
|
|
121
|
+
const result = to > this.total ? this.total : to;
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
110
124
|
generateStepSize() {
|
|
111
125
|
// this function uses this.stepIndex and this.range to generate a range of number like 1-100
|
|
112
126
|
// this is used to generate the step size
|
|
113
|
-
let start = (this.stepIndex - 1) * this.stepSize;
|
|
127
|
+
let start = Math.floor((this.stepIndex - 1) * this.stepSize);
|
|
114
128
|
//easy fix for starting position
|
|
115
129
|
if (start === 0) {
|
|
116
130
|
start = 1;
|
|
117
131
|
}
|
|
118
|
-
const end = this.stepIndex * this.stepSize;
|
|
132
|
+
const end = Math.floor(this.stepIndex * this.stepSize);
|
|
119
133
|
return this.ariaLabels.x_of_y
|
|
120
134
|
.replace("{0}", String(start))
|
|
121
135
|
.replace("{1}", String(end))
|
|
@@ -335,6 +349,9 @@ export class DuetRangeStepper {
|
|
|
335
349
|
static get elementRef() { return "element"; }
|
|
336
350
|
static get watchers() { return [{
|
|
337
351
|
"propName": "stepIndex",
|
|
338
|
-
"methodName": "
|
|
352
|
+
"methodName": "watchStepIndexStateHandler"
|
|
353
|
+
}, {
|
|
354
|
+
"propName": "stepSize",
|
|
355
|
+
"methodName": "watchStepSizeStateHandler"
|
|
339
356
|
}]; }
|
|
340
357
|
}
|