@telia-ace/alliance-ui 1.0.7 → 1.0.8-next.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/CHANGELOG.md +15 -0
- package/chunks/{alliance-modal-6cef0241.js → alliance-modal-20f50b87.js} +6 -6
- package/chunks/{alliance-modal-6cef0241.js.map → alliance-modal-20f50b87.js.map} +1 -1
- package/chunks/alliance-paginator-button-25709222.js +313 -0
- package/chunks/alliance-paginator-button-25709222.js.map +1 -0
- package/chunks/{alliance-table-row-67a6becb.js → alliance-table-row-21cc74e0.js} +3 -3
- package/chunks/{alliance-table-row-67a6becb.js.map → alliance-table-row-21cc74e0.js.map} +1 -1
- package/chunks/check-circle-filled-42095247.js.map +1 -1
- package/chunks/chevron-down-50d47dd6.js.map +1 -1
- package/chunks/chevron-right-788ce8a9.js.map +1 -1
- package/chunks/close-7d423291.js.map +1 -1
- package/chunks/close-ac6e4f1c.js.map +1 -1
- package/chunks/error-filled-8de50bdd.js.map +1 -1
- package/chunks/getSvgContent-f2389ce0.js.map +1 -1
- package/chunks/{index-57f6bd40.js → index-d925c796.js} +14 -16
- package/chunks/index-d925c796.js.map +1 -0
- package/chunks/index-eef143db.js +531 -0
- package/chunks/{index-17652cf7.js.map → index-eef143db.js.map} +1 -1
- package/chunks/query-assigned-elements-4285356d.js.map +1 -1
- package/chunks/repeat-bf84f01f.js.map +1 -1
- package/chunks/stringCombiner-10b57054.js.map +1 -1
- package/chunks/{telia-button2-d25eddda.js → telia-button2-7783c019.js} +18 -43
- package/chunks/telia-button2-7783c019.js.map +1 -0
- package/chunks/{telia-card-frame2-2d46eef6.js → telia-card-frame2-1ac1c9e5.js} +4 -4
- package/chunks/telia-card-frame2-1ac1c9e5.js.map +1 -0
- package/chunks/{telia-field-assistive-text2-8e042a32.js → telia-field-assistive-text2-173ba2fb.js} +3 -3
- package/chunks/{telia-field-assistive-text2-8e042a32.js.map → telia-field-assistive-text2-173ba2fb.js.map} +1 -1
- package/chunks/{telia-field-error2-8beb1632.js → telia-field-error2-75dc8ceb.js} +4 -4
- package/chunks/{telia-field-error2-8beb1632.js.map → telia-field-error2-75dc8ceb.js.map} +1 -1
- package/chunks/{telia-field-valid2-bda898b1.js → telia-field-valid2-0f6759ac.js} +4 -4
- package/chunks/{telia-field-valid2-bda898b1.js.map → telia-field-valid2-0f6759ac.js.map} +1 -1
- package/chunks/{telia-heading2-9d3ab48b.js → telia-heading2-38ae44ae.js} +3 -3
- package/chunks/{telia-heading2-9d3ab48b.js.map → telia-heading2-38ae44ae.js.map} +1 -1
- package/chunks/{telia-icon2-34bf5aef.js → telia-icon2-d0e7c715.js} +3 -3
- package/chunks/{telia-icon2-34bf5aef.js.map → telia-icon2-d0e7c715.js.map} +1 -1
- package/chunks/{telia-label2-4d674e5e.js → telia-label2-f4c1eb47.js} +3 -3
- package/chunks/{telia-label2-4d674e5e.js.map → telia-label2-f4c1eb47.js.map} +1 -1
- package/chunks/{telia-link2-7769b385.js → telia-link2-4999bc77.js} +6 -6
- package/chunks/telia-link2-4999bc77.js.map +1 -0
- package/chunks/{telia-navigation-button2-a0b24d67.js → telia-navigation-button2-b6b0d39c.js} +4 -4
- package/chunks/{telia-navigation-button2-a0b24d67.js.map → telia-navigation-button2-b6b0d39c.js.map} +1 -1
- package/chunks/telia-style-link2-0bc93885.js +54 -0
- package/chunks/telia-style-link2-0bc93885.js.map +1 -0
- package/chunks/{telia-style-navigation-item2-58683cd9.js → telia-style-navigation-item2-b2eaedc2.js} +3 -3
- package/chunks/{telia-style-navigation-item2-58683cd9.js.map → telia-style-navigation-item2-b2eaedc2.js.map} +1 -1
- package/chunks/{telia-tab-header2-bd04582d.js → telia-tab-header2-94c52ad6.js} +4 -4
- package/chunks/{telia-tab-header2-bd04582d.js.map → telia-tab-header2-94c52ad6.js.map} +1 -1
- package/chunks/{telia-visually-hidden2-71416262.js → telia-visually-hidden2-9015e8cd.js} +3 -3
- package/chunks/{telia-visually-hidden2-71416262.js.map → telia-visually-hidden2-9015e8cd.js.map} +1 -1
- package/chunks/{telia-vst2-1a7f7bd6.js → telia-vst2-dfb33a56.js} +3 -3
- package/chunks/{telia-vst2-1a7f7bd6.js.map → telia-vst2-dfb33a56.js.map} +1 -1
- package/chunks/uniqueId-0daf01ec.js.map +1 -1
- package/components/alliance-modal.js +8 -8
- package/components/alliance-paginator/alliance-page-selector.d.ts +22 -0
- package/components/alliance-paginator/alliance-paginator.d.ts +4 -1
- package/components/alliance-paginator/index.d.ts +1 -0
- package/components/alliance-paginator/utils.d.ts +13 -0
- package/components/alliance-paginator.js +8 -7
- package/components/alliance-paginator.js.map +1 -1
- package/components/alliance-table.js +5 -5
- package/components/index.js +12 -12
- package/package.json +9 -8
- package/voca/components/telia-accordion-item.js +3 -3
- package/voca/components/telia-accordion-item.js.map +1 -1
- package/voca/components/telia-accordion.js +5 -5
- package/voca/components/telia-accordion.js.map +1 -1
- package/voca/components/telia-badge.js +2 -2
- package/voca/components/telia-badge.js.map +1 -1
- package/voca/components/telia-button.js +4 -4
- package/voca/components/telia-card-frame-link.js +6 -6
- package/voca/components/telia-card-frame-link.js.map +1 -1
- package/voca/components/telia-card-frame.js +3 -3
- package/voca/components/telia-checkbox.js +6 -6
- package/voca/components/telia-checkbox.js.map +1 -1
- package/voca/components/telia-chip-choice.js +2 -2
- package/voca/components/telia-chip-choice.js.map +1 -1
- package/voca/components/telia-chip-filter.js +4 -4
- package/voca/components/telia-chip-filter.js.map +1 -1
- package/voca/components/telia-col.js +2 -2
- package/voca/components/telia-col.js.map +1 -1
- package/voca/components/telia-color-dot.js +2 -2
- package/voca/components/telia-color-dot.js.map +1 -1
- package/voca/components/telia-cta-link.js +3 -3
- package/voca/components/telia-cta-link.js.map +1 -1
- package/voca/components/telia-date-picker.js +77 -65
- package/voca/components/telia-date-picker.js.map +1 -1
- package/voca/components/telia-divider.js +2 -2
- package/voca/components/telia-divider.js.map +1 -1
- package/voca/components/telia-field-assistive-text.js +3 -3
- package/voca/components/telia-field-error.js +4 -4
- package/voca/components/telia-field-valid.js +4 -4
- package/voca/components/telia-fieldset.js +2 -2
- package/voca/components/telia-fieldset.js.map +1 -1
- package/voca/components/telia-focus-trap.js +2 -2
- package/voca/components/telia-focus-trap.js.map +1 -1
- package/voca/components/telia-form.js +9 -7
- package/voca/components/telia-form.js.map +1 -1
- package/voca/components/telia-grid.js +3 -3
- package/voca/components/telia-grid.js.map +1 -1
- package/voca/components/telia-heading.js +3 -3
- package/voca/components/telia-icon.js +3 -3
- package/voca/components/telia-image.js +2 -2
- package/voca/components/telia-image.js.map +1 -1
- package/voca/components/telia-label.js +3 -3
- package/voca/components/telia-link-image.js +8 -8
- package/voca/components/telia-link-image.js.map +1 -1
- package/voca/components/telia-link.js +4 -4
- package/voca/components/telia-list.js +2 -2
- package/voca/components/telia-list.js.map +1 -1
- package/voca/components/telia-logo.js +2 -2
- package/voca/components/telia-logo.js.map +1 -1
- package/voca/components/telia-navigation-button.js +4 -4
- package/voca/components/telia-navigation-dropdown.js +5 -5
- package/voca/components/telia-navigation-dropdown.js.map +1 -1
- package/voca/components/telia-navigation-link.js +3 -3
- package/voca/components/telia-navigation-link.js.map +1 -1
- package/voca/components/telia-notification.js +6 -6
- package/voca/components/telia-notification.js.map +1 -1
- package/voca/components/telia-overlay.js +2 -2
- package/voca/components/telia-overlay.js.map +1 -1
- package/voca/components/telia-p.js +2 -2
- package/voca/components/telia-p.js.map +1 -1
- package/voca/components/telia-pictogram.js +2 -2
- package/voca/components/telia-pictogram.js.map +1 -1
- package/voca/components/telia-radio-button.js +4 -4
- package/voca/components/telia-radio-button.js.map +1 -1
- package/voca/components/telia-row.js +2 -2
- package/voca/components/telia-row.js.map +1 -1
- package/voca/components/telia-select.js +6 -6
- package/voca/components/telia-select.js.map +1 -1
- package/voca/components/telia-skeleton.js +11 -11
- package/voca/components/telia-skeleton.js.map +1 -1
- package/voca/components/telia-status-badge.js +3 -3
- package/voca/components/telia-status-badge.js.map +1 -1
- package/voca/components/telia-style-link.js +3 -3
- package/voca/components/telia-style-navigation-item.js +3 -3
- package/voca/components/telia-tab-content.js +20 -12
- package/voca/components/telia-tab-content.js.map +1 -1
- package/voca/components/telia-tab-header.js +4 -4
- package/voca/components/telia-tab.js +11 -8
- package/voca/components/telia-tab.js.map +1 -1
- package/voca/components/telia-text-input.js +9 -8
- package/voca/components/telia-text-input.js.map +1 -1
- package/voca/components/telia-text-spacing.js +2 -2
- package/voca/components/telia-text-spacing.js.map +1 -1
- package/voca/components/telia-textarea.js +6 -6
- package/voca/components/telia-textarea.js.map +1 -1
- package/voca/components/telia-toggle.js +4 -4
- package/voca/components/telia-toggle.js.map +1 -1
- package/voca/components/telia-visually-hidden.js +3 -3
- package/voca/components/telia-voca-stats.d.ts +1 -0
- package/voca/components/telia-voca-stats.js +54 -0
- package/voca/components/telia-voca-stats.js.map +1 -0
- package/voca/foundations/index.js +15 -18
- package/voca/foundations/index.js.map +1 -1
- package/voca/icons/index.js +1 -1
- package/voca/icons/index.js.map +1 -1
- package/chunks/alliance-paginator-button-83c050bc.js +0 -181
- package/chunks/alliance-paginator-button-83c050bc.js.map +0 -1
- package/chunks/index-17652cf7.js +0 -542
- package/chunks/index-57f6bd40.js.map +0 -1
- package/chunks/telia-button2-d25eddda.js.map +0 -1
- package/chunks/telia-card-frame2-2d46eef6.js.map +0 -1
- package/chunks/telia-link2-7769b385.js.map +0 -1
- package/chunks/telia-style-link2-bbd8d17a.js +0 -55
- package/chunks/telia-style-link2-bbd8d17a.js.map +0 -1
- package/components/alliance-paginator/get-pagination.d.ts +0 -8
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { p as q, H as K, c as F, h as i, a as $, F as W } from "../../chunks/index-
|
|
1
|
+
import { p as q, H as K, c as F, h as i, a as $, F as W } from "../../chunks/index-eef143db.js";
|
|
2
2
|
import { u as k } from "../../chunks/uniqueId-0daf01ec.js";
|
|
3
|
-
import { s as
|
|
3
|
+
import { s as X } from "../../chunks/stringCombiner-10b57054.js";
|
|
4
4
|
import { c as E } from "../../chunks/chevron-down-50d47dd6.js";
|
|
5
|
-
import { c as
|
|
6
|
-
import { d as
|
|
7
|
-
import { d as
|
|
8
|
-
import { d as Q } from "../../chunks/telia-field-error2-
|
|
9
|
-
import { d as ee } from "../../chunks/telia-heading2-
|
|
10
|
-
import { d as te } from "../../chunks/telia-icon2-
|
|
11
|
-
import { d as ae } from "../../chunks/telia-label2-
|
|
12
|
-
import { d as ie } from "../../chunks/telia-vst2-
|
|
5
|
+
import { c as j } from "../../chunks/close-7d423291.js";
|
|
6
|
+
import { d as J } from "../../chunks/telia-button2-7783c019.js";
|
|
7
|
+
import { d as U } from "../../chunks/telia-field-assistive-text2-173ba2fb.js";
|
|
8
|
+
import { d as Q } from "../../chunks/telia-field-error2-75dc8ceb.js";
|
|
9
|
+
import { d as ee } from "../../chunks/telia-heading2-38ae44ae.js";
|
|
10
|
+
import { d as te } from "../../chunks/telia-icon2-d0e7c715.js";
|
|
11
|
+
import { d as ae } from "../../chunks/telia-label2-f4c1eb47.js";
|
|
12
|
+
import { d as ie } from "../../chunks/telia-vst2-dfb33a56.js";
|
|
13
13
|
import "../../chunks/error-filled-8de50bdd.js";
|
|
14
14
|
import "../../chunks/getSvgContent-f2389ce0.js";
|
|
15
|
-
const re = { name: "
|
|
15
|
+
const re = { name: "calendar", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M58 51.3846V16.9231C57.9973 14.5451 56.0588 12.6181 53.6667 12.6154H49.3333V8.30769C49.3306 5.92975 47.3921 4.00272 45 4H40.6667C38.2746 4.00272 36.3361 5.92975 36.3333 8.30769V12.6154H27.6667V8.30769C27.6639 5.92975 25.7254 4.00272 23.3333 4H19C16.6079 4.00272 14.6694 5.92975 14.6667 8.30769V12.6154H10.3333C7.94123 12.6181 6.00273 14.5451 6 16.9231V51.3846C6.00547 56.1405 9.88247 59.9946 14.6667 60H49.3333C54.1175 59.9946 57.9945 56.1405 58 51.3846ZM44.9999 16.923H40.6666V8.30766H44.9999V16.923ZM23.3333 16.923H18.9999V8.30766H23.3333V16.923ZM49.3334 16.9231H53.6668V24.9852H10.3334V16.9231H14.6668C14.6695 19.301 16.608 21.228 19.0001 21.2307H23.3334C25.7255 21.228 27.664 19.301 27.6668 16.9231H36.3334C36.3362 19.301 38.2747 21.228 40.6668 21.2307H45.0001C47.3922 21.228 49.3307 19.301 49.3334 16.9231ZM10.3334 28.9852V51.3846C10.3362 53.7625 12.2747 55.6896 14.6668 55.6923H49.3334C51.7255 55.6896 53.664 53.7625 53.6668 51.3846V28.9852H10.3334Z"/><path d="M14.6949 35.3069C14.6949 34.2023 15.5957 33.3069 16.7068 33.3069H21.378C22.4891 33.3069 23.3899 34.2024 23.3899 35.3069V36.7091C23.3899 37.8137 22.4891 38.7091 21.378 38.7091H16.7068C15.5957 38.7091 14.6949 37.8137 14.6949 36.7091V35.3069Z"/><path d="M27.7374 35.3069C27.7374 34.2023 28.6381 33.3069 29.7493 33.3069H34.4204C35.5316 33.3069 36.4323 34.2024 36.4323 35.3069V36.7091C36.4323 37.8137 35.5316 38.7091 34.4204 38.7091H29.7493C28.6381 38.7091 27.7374 37.8137 27.7374 36.7091V35.3069Z"/><path d="M40.7798 35.3069C40.7798 34.2023 41.6806 33.3069 42.7917 33.3069H47.4629C48.574 33.3069 49.4748 34.2024 49.4748 35.3069V36.7091C49.4748 37.8137 48.574 38.7091 47.4629 38.7091H42.7917C41.6806 38.7091 40.7798 37.8137 40.7798 36.7091V35.3069Z"/><path d="M14.6949 46.1114C14.6949 45.0068 15.5957 44.1114 16.7068 44.1114H21.378C22.4891 44.1114 23.3899 45.0068 23.3899 46.1114V47.5136C23.3899 48.6181 22.4891 49.5136 21.378 49.5136H16.7068C15.5957 49.5136 14.6949 48.6181 14.6949 47.5136V46.1114Z"/><path d="M27.7374 46.1114C27.7374 45.0068 28.6381 44.1114 29.7493 44.1114H34.4204C35.5316 44.1114 36.4323 45.0068 36.4323 46.1114V47.5136C36.4323 48.6181 35.5316 49.5136 34.4204 49.5136H29.7493C28.6381 49.5136 27.7374 48.6181 27.7374 47.5136V46.1114Z"/><path d="M40.7798 46.1114C40.7798 45.0068 41.6806 44.1114 42.7917 44.1114H47.4629C48.574 44.1114 49.4748 45.0068 49.4748 46.1114V47.5136C49.4748 48.6181 48.574 49.5136 47.4629 49.5136H42.7917C41.6806 49.5136 40.7798 48.6181 40.7798 47.5136V46.1114Z"/></svg>' }, le = { name: "chevron-left", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M42.1162 49.8902C42.6915 50.4081 42.9468 51.1934 42.786 51.9505C42.6252 52.7076 42.0727 53.3214 41.3366 53.5607C40.6005 53.8 39.7927 53.6284 39.2174 53.1106L17.5508 33.6106C17.0942 33.1999 16.8335 32.6146 16.8335 32.0004C16.8335 31.3863 17.0942 30.801 17.5508 30.3902L39.2174 10.8902C40.1067 10.0898 41.4766 10.1618 42.277 11.0511C43.0775 11.9403 43.0055 13.3102 42.1162 14.1106L22.2385 32.0004L42.1162 49.8902Z"/></svg>' }, oe = { name: "chevron-right", svg: '<svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M47.1663 32.0005C47.1667 32.6147 46.9059 33.2001 46.449 33.6106L24.7824 53.1106C23.8931 53.9111 22.5233 53.8391 21.7228 52.9498C20.9223 52.0606 20.9943 50.6907 21.8836 49.8903L41.7613 32.0005L21.8836 14.1106C21.3083 13.5928 21.053 12.8075 21.2138 12.0503C21.3746 11.2932 21.9271 10.6794 22.6632 10.4402C23.3993 10.2009 24.2071 10.3724 24.7824 10.8903L46.449 30.3903C46.9059 30.8008 47.1667 31.3862 47.1663 32.0005Z"/></svg>' }, se = /^(\d{4})-(\d{2})-(\d{2})$/;
|
|
16
16
|
var y;
|
|
17
17
|
(function(e) {
|
|
18
18
|
e[e.Sunday = 0] = "Sunday", e[e.Monday = 1] = "Monday", e[e.Tuesday = 2] = "Tuesday", e[e.Wednesday = 3] = "Wednesday", e[e.Thursday = 4] = "Thursday", e[e.Friday = 5] = "Friday", e[e.Saturday = 6] = "Saturday";
|
|
19
19
|
})(y || (y = {}));
|
|
20
|
-
function
|
|
20
|
+
function x(e, t, a) {
|
|
21
21
|
const r = parseInt(a, 10), l = parseInt(t, 10), o = parseInt(e, 10);
|
|
22
22
|
if (Number.isInteger(o) && // all parts should be integers
|
|
23
23
|
Number.isInteger(l) && Number.isInteger(r) && l > 0 && // month must be 1-12
|
|
@@ -30,7 +30,7 @@ function v(e) {
|
|
|
30
30
|
return;
|
|
31
31
|
const t = e.match(se);
|
|
32
32
|
if (t !== null && t.length)
|
|
33
|
-
return
|
|
33
|
+
return x(t[1], t[2], t[3]);
|
|
34
34
|
}
|
|
35
35
|
function V(e) {
|
|
36
36
|
if (e === void 0)
|
|
@@ -38,7 +38,7 @@ function V(e) {
|
|
|
38
38
|
let t = e.getDate().toString(10), a = (e.getMonth() + 1).toString(10), r = e.getFullYear().toString(10);
|
|
39
39
|
return e.getDate() < 10 && (t = `0${t}`), e.getMonth() < 9 && (a = `0${a}`), `${r}-${a}-${t}`;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function I(e, t) {
|
|
42
42
|
return e == null || t == null ? !1 : A(e, t) && e.getDate() === t.getDate();
|
|
43
43
|
}
|
|
44
44
|
function A(e, t) {
|
|
@@ -66,38 +66,38 @@ function H(e, t) {
|
|
|
66
66
|
const a = new Date(e);
|
|
67
67
|
return a.setMonth(t), a;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function L(e, t) {
|
|
70
70
|
const a = new Date(e);
|
|
71
71
|
return a.setFullYear(t), a;
|
|
72
72
|
}
|
|
73
73
|
function M(e, t, a) {
|
|
74
|
-
return
|
|
74
|
+
return S(e, t, a) === e;
|
|
75
75
|
}
|
|
76
|
-
function
|
|
76
|
+
function S(e, t, a) {
|
|
77
77
|
const r = e.getTime();
|
|
78
78
|
return t && t instanceof Date && r < t.getTime() ? t : a && a instanceof Date && r > a.getTime() ? a : e;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ne(e, t) {
|
|
81
81
|
const a = [];
|
|
82
82
|
let r = e;
|
|
83
|
-
for (; !
|
|
83
|
+
for (; !I(r, t); )
|
|
84
84
|
a.push(r), r = z(r, 1);
|
|
85
85
|
return a.push(r), a;
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function ce(e, t = y.Monday) {
|
|
88
88
|
const a = P(D(e), t), r = R(C(e), t);
|
|
89
|
-
return
|
|
89
|
+
return ne(a, r);
|
|
90
90
|
}
|
|
91
|
-
const de = ({ onClick: e, dateFormatter: t, describedBy: a, localization: r, name: l, formattedValue: o, valueAsDate: s, value: d, identifier: h, disabled:
|
|
92
|
-
const G = u ||
|
|
91
|
+
const de = ({ onClick: e, dateFormatter: t, describedBy: a, localization: r, name: l, formattedValue: o, valueAsDate: s, value: d, identifier: h, disabled: c, readonly: u, required: _, role: g, touched: b, buttonLabel: m, buttonRef: n, inputRef: f, onInput: B, onBlur: N, onFocus: O, makeTouched: T, htmlForm: Z }) => {
|
|
92
|
+
const G = u || c;
|
|
93
93
|
return i(
|
|
94
94
|
W,
|
|
95
95
|
null,
|
|
96
96
|
i("input", { class: {
|
|
97
97
|
"telia-date-picker__input": !0,
|
|
98
98
|
"telia-date-picker__input--touched": b
|
|
99
|
-
}, value: o, id: h, disabled:
|
|
100
|
-
T(),
|
|
99
|
+
}, value: o, id: h, disabled: c, readonly: u, role: g, required: _ ? !0 : void 0, "aria-autocomplete": "none", "aria-describedby": a, onInput: B, onFocus: O, onBlur: (w) => {
|
|
100
|
+
T(), N(w);
|
|
101
101
|
}, autoComplete: "off", ref: f, onInvalid: (w) => {
|
|
102
102
|
T(), w.preventDefault();
|
|
103
103
|
}, form: Z }),
|
|
@@ -107,8 +107,8 @@ const de = ({ onClick: e, dateFormatter: t, describedBy: a, localization: r, nam
|
|
|
107
107
|
{ class: "telia-date-picker__input-icon-container" },
|
|
108
108
|
i(
|
|
109
109
|
"telia-button",
|
|
110
|
-
{ allyLabel: m, variant: "text", size: "sm", onClick: e, disabled: G, ref: (w) =>
|
|
111
|
-
i("telia-icon", { class: "telia-date-picker__toggle-icon", svg:
|
|
110
|
+
{ allyLabel: m, variant: "text", size: "sm", onClick: e, disabled: G, ref: (w) => n(w), type: "button", "data-testid": "telia-date-picker__toggle-button" },
|
|
111
|
+
i("telia-icon", { class: "telia-date-picker__toggle-icon", svg: re.svg, size: "sm" }),
|
|
112
112
|
i(
|
|
113
113
|
"span",
|
|
114
114
|
{ class: "telia-date-picker__vhidden" },
|
|
@@ -125,8 +125,8 @@ const de = ({ onClick: e, dateFormatter: t, describedBy: a, localization: r, nam
|
|
|
125
125
|
)
|
|
126
126
|
)
|
|
127
127
|
);
|
|
128
|
-
}, ue = ({ focusedDay: e, today: t, day: a, onDaySelect: r, onKeyboardNavigation: l, focusedDayRef: o, disabled: s, inRange: d, isSelected: h, dateFormatter:
|
|
129
|
-
const u =
|
|
128
|
+
}, ue = ({ focusedDay: e, today: t, day: a, onDaySelect: r, onKeyboardNavigation: l, focusedDayRef: o, disabled: s, inRange: d, isSelected: h, dateFormatter: c }) => {
|
|
129
|
+
const u = I(a, t), _ = A(a, e), g = I(a, e), b = !d, m = s || b;
|
|
130
130
|
return i(
|
|
131
131
|
"button",
|
|
132
132
|
{
|
|
@@ -151,7 +151,7 @@ const de = ({ onClick: e, dateFormatter: t, describedBy: a, localization: r, nam
|
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
153
|
i("span", { "aria-hidden": "true" }, a.getDate()),
|
|
154
|
-
i("span", { class: "telia-date-picker__vhidden" },
|
|
154
|
+
i("span", { class: "telia-date-picker__vhidden" }, c.format(a))
|
|
155
155
|
);
|
|
156
156
|
};
|
|
157
157
|
function he(e, t) {
|
|
@@ -166,8 +166,8 @@ function me(e, t, a) {
|
|
|
166
166
|
return a(e[o]);
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
const pe = ({ selectedDate: e, focusedDate: t, labelledById: a, localization: r, firstDayOfWeek: l, min: o, max: s, dateFormatter: d, isDateDisabled: h, onDateSelect:
|
|
170
|
-
const g = new Date(), b =
|
|
169
|
+
const pe = ({ selectedDate: e, focusedDate: t, labelledById: a, localization: r, firstDayOfWeek: l, min: o, max: s, dateFormatter: d, isDateDisabled: h, onDateSelect: c, onKeyboardNavigation: u, focusedDayRef: _ }) => {
|
|
170
|
+
const g = /* @__PURE__ */ new Date(), b = ce(t, l);
|
|
171
171
|
return i(
|
|
172
172
|
"div",
|
|
173
173
|
{ class: "telia-date-picker__table-wrapper" },
|
|
@@ -184,10 +184,10 @@ const pe = ({ selectedDate: e, focusedDate: t, labelledById: a, localization: r,
|
|
|
184
184
|
i("span", { class: "telia-date-picker__vhidden" }, m)
|
|
185
185
|
)))
|
|
186
186
|
),
|
|
187
|
-
i("tbody", null, he(b, 7).map((m) => i("tr", { class: "telia-date-picker__row" }, m.map((
|
|
187
|
+
i("tbody", null, he(b, 7).map((m) => i("tr", { class: "telia-date-picker__row" }, m.map((n) => i(
|
|
188
188
|
"td",
|
|
189
189
|
{ class: "telia-date-picker__cell" },
|
|
190
|
-
i(ue, { day:
|
|
190
|
+
i(ue, { day: n, today: g, focusedDay: t, isSelected: I(n, e), disabled: h(n), inRange: M(n, o, s), onDaySelect: c, dateFormatter: d, onKeyboardNavigation: u, focusedDayRef: _ })
|
|
191
191
|
)))))
|
|
192
192
|
)
|
|
193
193
|
);
|
|
@@ -247,7 +247,14 @@ const pe = ({ selectedDate: e, focusedDate: t, labelledById: a, localization: r,
|
|
|
247
247
|
for (var r = e; r <= t; r++)
|
|
248
248
|
a.push(r);
|
|
249
249
|
return a;
|
|
250
|
-
}, be = '.telia-date-picker{display:flex;flex-direction:column;position:relative}.telia-date-picker__label{order:1}.telia-date-picker__label label{color:rgba(0, 0, 0, 0.85)}.telia-date-picker__input{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3);border-radius:calc(0.2rem * var(--voca-rem-multiplier));background-color:#ffffff;font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;font-size:calc(1.6rem * var(--voca-rem-multiplier));line-height:1.5;-webkit-appearance:none;appearance:none;box-sizing:border-box;color:rgba(0, 0, 0, 0.85);display:block;margin:0;padding:calc(1rem * var(--voca-rem-multiplier)) calc(1.2rem * var(--voca-rem-multiplier));width:100%;color:rgba(0, 0, 0, 0.85);height:calc(4.6rem * var(--voca-rem-multiplier));margin:calc(0.4rem * var(--voca-rem-multiplier)) 0 0;order:2}.telia-date-picker__input:required{box-shadow:none}.telia-date-picker__input:hover{border:calc(0.2rem * var(--voca-rem-multiplier)) solid #29003e;padding:calc(calc(1rem * var(--voca-rem-multiplier)) - calc(0.1rem * var(--voca-rem-multiplier))) calc(calc(1.2rem * var(--voca-rem-multiplier)) - calc(0.1rem * var(--voca-rem-multiplier)))}.telia-date-picker__input:hover:focus{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3)}.telia-date-picker__input:focus{outline:solid calc(0.3rem * var(--voca-rem-multiplier)) #0099ff;outline-offset:calc(0.2rem * var(--voca-rem-multiplier));padding:calc(1rem * var(--voca-rem-multiplier)) calc(1.2rem * var(--voca-rem-multiplier))}.telia-date-picker__input:focus:hover{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3)}.telia-date-picker__input:read-only{border:calc(0.1rem * var(--voca-rem-multiplier)) solid #c8c8cd;background-color:rgba(0, 0, 0, 0.05)}.telia-date-picker__input:read-only:hover{border:calc(0.1rem * var(--voca-rem-multiplier)) solid #c8c8cd;padding:calc(1rem * var(--voca-rem-multiplier)) calc(1.2rem * var(--voca-rem-multiplier))}.telia-date-picker__input:disabled{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.15);background-color:rgba(0, 0, 0, 0.1);color:rgba(0, 0, 0, 0.4);cursor:not-allowed;-webkit-text-fill-color:#606064}.telia-date-picker__input:disabled:hover{padding:calc(1rem * var(--voca-rem-multiplier)) calc(1.2rem * var(--voca-rem-multiplier))}.telia-date-picker__input:disabled~.telia-date-picker__label .telia-label{color:rgba(0, 0, 0, 0.4);cursor:not-allowed}.telia-date-picker__input:disabled~.telia-date-picker__additional{color:rgba(0, 0, 0, 0.4)}.telia-date-picker__input:invalid{box-shadow:none}.telia-date-picker__input--touched:invalid{border:calc(0.1rem * var(--voca-rem-multiplier)) solid #e4175c}.telia-date-picker__input--touched:invalid:focus{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3)}.telia-date-picker__input--touched:invalid:hover:not(:focus){border:calc(0.2rem * var(--voca-rem-multiplier)) solid #e4175c;padding:calc(calc(1rem * var(--voca-rem-multiplier)) - calc(0.1rem * var(--voca-rem-multiplier))) calc(calc(1.2rem * var(--voca-rem-multiplier)) - calc(0.1rem * var(--voca-rem-multiplier)))}.telia-date-picker__input-icon-container{align-items:center;display:flex;flex-direction:row;height:calc(4.6rem * var(--voca-rem-multiplier));justify-content:flex-end;margin:calc(-1 * calc(4.6rem * var(--voca-rem-multiplier))) 0 0 calc(100% - calc(1.2rem * var(--voca-rem-multiplier)));order:3}.telia-date-picker__additional{order:5}.telia-date-picker__error{margin:calc(0.4rem * var(--voca-rem-multiplier)) 0 0;order:6}.telia-date-picker__toggle-icon{margin:0 calc(1.2rem * var(--voca-rem-multiplier))}.telia-date-picker__input:invalid~.telia-date-picker__input-icon-container .telia-date-picker__toggle-icon{color:#e4175c}.telia-date-picker__dialog-container{order:4}.telia-date-picker__dialog{z-index:300;background-color:rgba(0, 0, 0, 0.3);bottom:0;display:flex;left:0;min-width:calc(32rem * var(--voca-rem-multiplier));opacity:0;position:fixed;right:0;top:0;transform:translateZ(0);transform-origin:bottom center;transition:transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;visibility:hidden;width:100%;will-change:transform, opacity, visibility}@media screen and (min-width: 37.5em){.telia-date-picker__dialog{z-index:100;background:none;bottom:auto;position:absolute;right:auto;top:auto;transform:scale(0.96) translateZ(0) translateY(-2rem);transform-origin:top right}}.telia-date-picker__dialog.is-left{left:auto;right:0;width:auto}.telia-date-picker__dialog.is-active{opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);visibility:visible}.telia-date-picker__dialog-content{background-color:#ffffff;border-radius:0;border-top-left-radius:calc(0.2rem * var(--voca-rem-multiplier));border-top-right-radius:calc(0.2rem * var(--voca-rem-multiplier));border-top:calc(0.1rem * var(--voca-rem-multiplier)) solid #606064;bottom:0;display:none;left:0;margin:0;max-width:none;padding:0;position:absolute;transform:translateZ(0) translateY(100%);width:100%}@media screen and (min-width: 37.5em){.telia-date-picker__dialog-content{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3);border-radius:calc(0.2rem * var(--voca-rem-multiplier));box-shadow:0 calc(0.8rem * var(--voca-rem-multiplier)) calc(2.4rem * var(--voca-rem-multiplier)) #dcdce1;margin:calc(0.8rem * var(--voca-rem-multiplier)) 0 0 auto;max-width:calc(31rem * var(--voca-rem-multiplier));min-width:calc(29rem * var(--voca-rem-multiplier));padding:0;position:relative;transform:none;transition:none;visibility:visible}}.is-active .telia-date-picker__dialog-content{display:block;transform:translateZ(0) translateY(0)}.telia-date-picker__table-wrapper{margin:calc(1.6rem * var(--voca-rem-multiplier)) 0 calc(2rem * var(--voca-rem-multiplier));padding:0 calc(1.6rem * var(--voca-rem-multiplier)) calc(0.8rem * var(--voca-rem-multiplier))}@media screen and (min-width: 37.5em){.telia-date-picker__table-wrapper{padding:0 calc(2rem * var(--voca-rem-multiplier))}}.telia-date-picker__table{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;font-size:calc(1rem * var(--voca-rem-multiplier));color:#222222;border-collapse:collapse;border-spacing:0;line-height:1.25;margin:0;padding:0;text-align:center;width:100%}.telia-date-picker__table-header{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:bold;font-size:calc(1.2rem * var(--voca-rem-multiplier));color:#222222;letter-spacing:calc(0.1rem * var(--voca-rem-multiplier));line-height:1.4;padding-bottom:calc(0.8rem * var(--voca-rem-multiplier));text-decoration:none;text-transform:uppercase}.telia-date-picker__cell{text-align:center}.telia-date-picker__day{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;font-size:calc(1.4rem * var(--voca-rem-multiplier));color:#29003e;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:50%;cursor:pointer;display:inline-block;font-variant-numeric:tabular-nums;height:calc(3.2rem * var(--voca-rem-multiplier));line-height:calc(1.6rem * var(--voca-rem-multiplier));padding:0 0 calc(0.1rem * var(--voca-rem-multiplier));position:relative;text-align:center;vertical-align:middle;width:calc(3.2rem * var(--voca-rem-multiplier))}.telia-date-picker__day.is-today{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:500;color:#29003e;border:calc(0.1rem * var(--voca-rem-multiplier)) solid #29003e}.telia-date-picker__day:hover{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:500;background-color:#edc8ff;color:#29003e}.telia-date-picker__day[aria-pressed=true]{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:bold;background-color:#29003e;color:#ffffff;box-shadow:none;outline:0}.telia-date-picker__day:focus-visible{outline:none}.telia-date-picker__day:focus{outline:none;}.telia-date-picker__day:focus::before{border-radius:calc(99.9rem * var(--voca-rem-multiplier));box-shadow:0 0 0 calc(0.3rem * var(--voca-rem-multiplier)) #0099ff;bottom:calc(-1 * calc(0.4rem * var(--voca-rem-multiplier)));content:"";display:block;left:calc(-1 * calc(0.4rem * var(--voca-rem-multiplier)));position:absolute;right:calc(-1 * calc(0.4rem * var(--voca-rem-multiplier)));top:calc(-1 * calc(0.4rem * var(--voca-rem-multiplier)));z-index:101}@media screen and (min-width: 37.5em){.telia-date-picker__day:focus::before{z-index:301}}.telia-date-picker__day:not(.is-month){font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;box-shadow:none}.telia-date-picker__day:not(.is-month),.telia-date-picker__day[aria-disabled=true]{background:transparent;color:rgba(0, 0, 0, 0.4);cursor:default}.telia-date-picker__day[aria-disabled=true]{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;background-color:rgba(0, 0, 0, 0.1);color:rgba(0, 0, 0, 0.6)}.telia-date-picker__header{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid #dcdce1;align-items:center;display:flex;justify-content:space-between;padding:calc(3.2rem * var(--voca-rem-multiplier)) calc(1.6rem * var(--voca-rem-multiplier)) calc(0.8rem * var(--voca-rem-multiplier)) calc(calc(1.6rem * var(--voca-rem-multiplier)) - calc(0.8rem * var(--voca-rem-multiplier)));width:100%}@media screen and (min-width: 37.5em){.telia-date-picker__header{padding:calc(3.2rem * var(--voca-rem-multiplier)) calc(2rem * var(--voca-rem-multiplier)) calc(0.8rem * var(--voca-rem-multiplier))}}.telia-date-picker__nav{white-space:nowrap}.telia-date-picker__prev,.telia-date-picker__next{color:#29003e;border:calc(0.1rem * var(--voca-rem-multiplier)) solid #29003e;align-items:center;-moz-appearance:none;-webkit-appearance:none;appearance:none;border-radius:50%;cursor:pointer;display:inline-flex;height:calc(3.2rem * var(--voca-rem-multiplier));justify-content:center;margin-left:calc(0.8rem * var(--voca-rem-multiplier));padding:0;width:calc(3.2rem * var(--voca-rem-multiplier))}.telia-date-picker__prev:not([disabled]):hover,.telia-date-picker__next:not([disabled]):hover{background-color:#edc8ff}.telia-date-picker__prev:focus,.telia-date-picker__next:focus{box-shadow:0 0 0 calc(0.3rem * var(--voca-rem-multiplier)) #0099ff;outline:none}.telia-date-picker__prev:active:focus,.telia-date-picker__next:active:focus{box-shadow:none}.telia-date-picker__prev:disabled,.telia-date-picker__next:disabled{cursor:default;opacity:0.5}.telia-date-picker__prev-icon{margin:0 auto}.telia-date-picker__next-icon{margin:0 auto}.telia-date-picker__select{display:inline-flex;margin-top:calc(0.4rem * var(--voca-rem-multiplier));position:relative}.telia-date-picker__select select{cursor:pointer;font-size:calc(1rem * var(--voca-rem-multiplier));height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.telia-date-picker__select select:focus+.telia-date-picker__select-label{box-shadow:0 0 0 calc(0.2rem * var(--voca-rem-multiplier)) #0099ff}.telia-date-picker__select-icon{margin:0 0 0 calc(0.4rem * var(--voca-rem-multiplier))}.telia-date-picker__select-label{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:bold;font-size:calc(1.6rem * var(--voca-rem-multiplier));color:#222222;border-radius:calc(0.2rem * var(--voca-rem-multiplier));align-items:center;display:flex;line-height:1.25;padding:0 calc(0.4rem * var(--voca-rem-multiplier)) 0 calc(0.8rem * var(--voca-rem-multiplier));pointer-events:none;position:relative;width:100%}.telia-date-picker__mobile{background-color:#fbf0ff;align-items:center;display:flex;justify-content:space-between;overflow:hidden;padding:calc(1.6rem * var(--voca-rem-multiplier)) calc(1.6rem * var(--voca-rem-multiplier));position:relative;text-overflow:ellipsis;white-space:nowrap}@media screen and (min-width: 37.5em){.telia-date-picker__mobile{background-color:transparent;border:0;overflow:visible;padding:0;position:absolute;right:calc(-0.8rem * var(--voca-rem-multiplier));top:calc(-0.8rem * var(--voca-rem-multiplier))}}.telia-date-picker__mobile-heading{color:#29003e;display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media screen and (min-width: 37.5em){.telia-date-picker__mobile-heading{display:none}}.telia-date-picker__close{color:#222222;border-radius:calc(99.9rem * var(--voca-rem-multiplier));align-items:center;-webkit-appearance:none;appearance:none;border:0;cursor:pointer;display:flex;height:calc(2.4rem * var(--voca-rem-multiplier));justify-content:center;padding:0;width:calc(2.4rem * var(--voca-rem-multiplier))}@media screen and (min-width: 37.5em){.telia-date-picker__close{opacity:0}}.telia-date-picker__close:hover{color:#29003e}.telia-date-picker__close:focus{box-shadow:0 0 0 calc(0.3rem * var(--voca-rem-multiplier)) #0099ff;outline:none}@media screen and (min-width: 37.5em){.telia-date-picker__close:focus{opacity:1}}.telia-date-picker__close-icon{margin:0 auto}.telia-date-picker__vhidden{border:0;clip:rect(calc(0.1rem * var(--voca-rem-multiplier)), calc(0.1rem * var(--voca-rem-multiplier)), calc(0.1rem * var(--voca-rem-multiplier)), calc(0.1rem * var(--voca-rem-multiplier)));height:calc(0.1rem * var(--voca-rem-multiplier));overflow:hidden;padding:0;position:absolute;top:0;width:calc(0.1rem * var(--voca-rem-multiplier))}', p = {
|
|
250
|
+
}, be = {
|
|
251
|
+
breakpointSm: "0",
|
|
252
|
+
breakpointMd: "37.5em",
|
|
253
|
+
breakpointLg: "64em",
|
|
254
|
+
breakpointXl: "90em",
|
|
255
|
+
fluidBreakpointMedium: "60rem",
|
|
256
|
+
fluidBreakpointXlarge: "144rem"
|
|
257
|
+
}, _e = '.telia-date-picker{display:flex;flex-direction:column;position:relative}.telia-date-picker__label{order:1}.telia-date-picker__label label{color:rgba(0, 0, 0, 0.85)}.telia-date-picker__input{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3);border-radius:calc(0.2rem * var(--voca-rem-multiplier));background-color:#ffffff;font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;font-size:calc(1.6rem * var(--voca-rem-multiplier));line-height:1.5;-webkit-appearance:none;appearance:none;box-sizing:border-box;color:rgba(0, 0, 0, 0.85);display:block;margin:0;padding:calc(1rem * var(--voca-rem-multiplier)) calc(1.2rem * var(--voca-rem-multiplier));width:100%;color:rgba(0, 0, 0, 0.85);height:calc(4.6rem * var(--voca-rem-multiplier));margin:calc(0.4rem * var(--voca-rem-multiplier)) 0 0;order:2}.telia-date-picker__input:required{box-shadow:none}.telia-date-picker__input:hover{border:calc(0.2rem * var(--voca-rem-multiplier)) solid #29003e;padding:calc(calc(1rem * var(--voca-rem-multiplier)) - calc(0.1rem * var(--voca-rem-multiplier))) calc(calc(1.2rem * var(--voca-rem-multiplier)) - calc(0.1rem * var(--voca-rem-multiplier)))}.telia-date-picker__input:hover:focus{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3)}.telia-date-picker__input:focus{outline:solid calc(0.3rem * var(--voca-rem-multiplier)) #0099ff;outline-offset:calc(0.2rem * var(--voca-rem-multiplier));padding:calc(1rem * var(--voca-rem-multiplier)) calc(1.2rem * var(--voca-rem-multiplier))}.telia-date-picker__input:focus:hover{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3)}.telia-date-picker__input:read-only{border:calc(0.1rem * var(--voca-rem-multiplier)) solid #c8c8cd;background-color:rgba(0, 0, 0, 0.05)}.telia-date-picker__input:read-only:hover{border:calc(0.1rem * var(--voca-rem-multiplier)) solid #c8c8cd;padding:calc(1rem * var(--voca-rem-multiplier)) calc(1.2rem * var(--voca-rem-multiplier))}.telia-date-picker__input:disabled{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.15);background-color:rgba(0, 0, 0, 0.1);color:rgba(0, 0, 0, 0.4);cursor:not-allowed;-webkit-text-fill-color:#606064}.telia-date-picker__input:disabled:hover{padding:calc(1rem * var(--voca-rem-multiplier)) calc(1.2rem * var(--voca-rem-multiplier))}.telia-date-picker__input:disabled~.telia-date-picker__label .telia-label{color:rgba(0, 0, 0, 0.4);cursor:not-allowed}.telia-date-picker__input:disabled~.telia-date-picker__additional{color:rgba(0, 0, 0, 0.4)}.telia-date-picker__input:invalid{box-shadow:none}.telia-date-picker__input--touched:invalid{border:calc(0.1rem * var(--voca-rem-multiplier)) solid #e4175c}.telia-date-picker__input--touched:invalid:focus{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3)}.telia-date-picker__input--touched:invalid:hover:not(:focus){border:calc(0.2rem * var(--voca-rem-multiplier)) solid #e4175c;padding:calc(calc(1rem * var(--voca-rem-multiplier)) - calc(0.1rem * var(--voca-rem-multiplier))) calc(calc(1.2rem * var(--voca-rem-multiplier)) - calc(0.1rem * var(--voca-rem-multiplier)))}.telia-date-picker__input-icon-container{align-items:center;display:flex;flex-direction:row;height:calc(4.6rem * var(--voca-rem-multiplier));justify-content:flex-end;margin:calc(-1 * calc(4.6rem * var(--voca-rem-multiplier))) 0 0 calc(100% - calc(1.2rem * var(--voca-rem-multiplier)));order:3}.telia-date-picker__additional{order:5}.telia-date-picker__error{margin:calc(0.4rem * var(--voca-rem-multiplier)) 0 0;order:6}.telia-date-picker__toggle-icon{margin:0 calc(1.2rem * var(--voca-rem-multiplier))}.telia-date-picker__input:invalid~.telia-date-picker__input-icon-container .telia-date-picker__toggle-icon{color:#e4175c}.telia-date-picker__dialog-container{order:4}.telia-date-picker__dialog{z-index:300;background-color:rgba(0, 0, 0, 0.3);bottom:0;display:flex;left:0;min-width:calc(32rem * var(--voca-rem-multiplier));opacity:0;position:fixed;right:0;top:0;transform:translateZ(0);transform-origin:bottom center;transition:transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;visibility:hidden;width:100%;will-change:transform, opacity, visibility}@media screen and (min-width: 37.5em){.telia-date-picker__dialog{z-index:100;background:none;bottom:auto;position:absolute;right:auto;top:auto;transform:scale(0.96) translateZ(0) translateY(-2rem);transform-origin:top right}}.telia-date-picker__dialog.is-left{left:auto;right:0;width:auto}.telia-date-picker__dialog.is-active{opacity:1;transform:scale(1.0001) translateZ(0) translateY(0);visibility:visible}.telia-date-picker__dialog-content{background-color:#ffffff;border-radius:0;border-top-left-radius:calc(0.2rem * var(--voca-rem-multiplier));border-top-right-radius:calc(0.2rem * var(--voca-rem-multiplier));border-top:calc(0.1rem * var(--voca-rem-multiplier)) solid #606064;bottom:0;display:none;left:0;margin:0;max-width:none;padding:0;position:absolute;transform:translateZ(0) translateY(100%);width:100%}@media screen and (min-width: 37.5em){.telia-date-picker__dialog-content{border:calc(0.1rem * var(--voca-rem-multiplier)) solid rgba(0, 0, 0, 0.3);border-radius:calc(0.2rem * var(--voca-rem-multiplier));box-shadow:0 calc(1.2rem * var(--voca-rem-multiplier)) calc(2.4rem * var(--voca-rem-multiplier)) rgba(0, 0, 0, 0.1);margin:calc(0.8rem * var(--voca-rem-multiplier)) 0 0 auto;max-width:calc(31rem * var(--voca-rem-multiplier));min-width:calc(29rem * var(--voca-rem-multiplier));padding:0;position:relative;transform:none;transition:none;visibility:visible}}.is-active .telia-date-picker__dialog-content{display:block;transform:translateZ(0) translateY(0)}.telia-date-picker__table-wrapper{margin:calc(1.6rem * var(--voca-rem-multiplier)) 0 calc(2rem * var(--voca-rem-multiplier));padding:0 calc(1.6rem * var(--voca-rem-multiplier)) calc(0.8rem * var(--voca-rem-multiplier))}@media screen and (min-width: 37.5em){.telia-date-picker__table-wrapper{padding:0 calc(2rem * var(--voca-rem-multiplier))}}.telia-date-picker__table{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;font-size:calc(1rem * var(--voca-rem-multiplier));color:#222222;border-collapse:collapse;border-spacing:0;line-height:1.25;margin:0;padding:0;text-align:center;width:100%}.telia-date-picker__table-header{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:bold;font-size:calc(1.2rem * var(--voca-rem-multiplier));color:#222222;letter-spacing:calc(0.1rem * var(--voca-rem-multiplier));line-height:1.4;padding-bottom:calc(0.8rem * var(--voca-rem-multiplier));text-decoration:none;text-transform:uppercase}.telia-date-picker__cell{text-align:center}.telia-date-picker__day{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;font-size:calc(1.4rem * var(--voca-rem-multiplier));color:#29003e;-moz-appearance:none;-webkit-appearance:none;appearance:none;background:transparent;border:0;border-radius:50%;cursor:pointer;display:inline-block;font-variant-numeric:tabular-nums;height:calc(3.2rem * var(--voca-rem-multiplier));line-height:calc(1.6rem * var(--voca-rem-multiplier));padding:0 0 calc(0.1rem * var(--voca-rem-multiplier));position:relative;text-align:center;vertical-align:middle;width:calc(3.2rem * var(--voca-rem-multiplier))}.telia-date-picker__day.is-today{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:500;color:#29003e;border:calc(0.1rem * var(--voca-rem-multiplier)) solid #29003e}.telia-date-picker__day:hover{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:500;background-color:#edc8ff;color:#29003e}.telia-date-picker__day[aria-pressed=true]{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:bold;background-color:#29003e;color:#ffffff;box-shadow:none;outline:0}.telia-date-picker__day:focus-visible{outline:none}.telia-date-picker__day:focus{outline:none;}.telia-date-picker__day:focus::before{border-radius:calc(99.9rem * var(--voca-rem-multiplier));box-shadow:0 0 0 calc(0.3rem * var(--voca-rem-multiplier)) #0099ff;bottom:calc(-1 * calc(0.4rem * var(--voca-rem-multiplier)));content:"";display:block;left:calc(-1 * calc(0.4rem * var(--voca-rem-multiplier)));position:absolute;right:calc(-1 * calc(0.4rem * var(--voca-rem-multiplier)));top:calc(-1 * calc(0.4rem * var(--voca-rem-multiplier)));z-index:101}@media screen and (min-width: 37.5em){.telia-date-picker__day:focus::before{z-index:301}}.telia-date-picker__day:not(.is-month){font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;box-shadow:none}.telia-date-picker__day:not(.is-month),.telia-date-picker__day[aria-disabled=true]{background:transparent;color:rgba(0, 0, 0, 0.4);cursor:default}.telia-date-picker__day[aria-disabled=true]{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:normal;background-color:rgba(0, 0, 0, 0.1);color:rgba(0, 0, 0, 0.6)}.telia-date-picker__header{border-bottom:calc(0.1rem * var(--voca-rem-multiplier)) solid #dcdce1;align-items:center;display:flex;justify-content:space-between;padding:calc(3.2rem * var(--voca-rem-multiplier)) calc(1.6rem * var(--voca-rem-multiplier)) calc(0.8rem * var(--voca-rem-multiplier)) calc(calc(1.6rem * var(--voca-rem-multiplier)) - calc(0.8rem * var(--voca-rem-multiplier)));width:100%}@media screen and (min-width: 37.5em){.telia-date-picker__header{padding:calc(3.2rem * var(--voca-rem-multiplier)) calc(2rem * var(--voca-rem-multiplier)) calc(0.8rem * var(--voca-rem-multiplier))}}.telia-date-picker__nav{white-space:nowrap}.telia-date-picker__prev,.telia-date-picker__next{color:#29003e;border:calc(0.1rem * var(--voca-rem-multiplier)) solid #29003e;align-items:center;-moz-appearance:none;-webkit-appearance:none;appearance:none;border-radius:50%;cursor:pointer;display:inline-flex;height:calc(3.2rem * var(--voca-rem-multiplier));justify-content:center;margin-left:calc(0.8rem * var(--voca-rem-multiplier));padding:0;width:calc(3.2rem * var(--voca-rem-multiplier))}.telia-date-picker__prev:not([disabled]):hover,.telia-date-picker__next:not([disabled]):hover{background-color:#edc8ff}.telia-date-picker__prev:focus,.telia-date-picker__next:focus{box-shadow:0 0 0 calc(0.3rem * var(--voca-rem-multiplier)) #0099ff;outline:none}.telia-date-picker__prev:active:focus,.telia-date-picker__next:active:focus{box-shadow:none}.telia-date-picker__prev:disabled,.telia-date-picker__next:disabled{cursor:default;opacity:0.5}.telia-date-picker__prev-icon{margin:0 auto}.telia-date-picker__next-icon{margin:0 auto}.telia-date-picker__select{display:inline-flex;margin-top:calc(0.4rem * var(--voca-rem-multiplier));position:relative}.telia-date-picker__select select{cursor:pointer;font-size:calc(1rem * var(--voca-rem-multiplier));height:100%;left:0;opacity:0;position:absolute;top:0;width:100%}.telia-date-picker__select select:focus+.telia-date-picker__select-label{box-shadow:0 0 0 calc(0.2rem * var(--voca-rem-multiplier)) #0099ff}.telia-date-picker__select-icon{margin:0 0 0 calc(0.4rem * var(--voca-rem-multiplier))}.telia-date-picker__select-label{font-family:"TeliaSans", Helvetica, Arial, "Lucida Grande", sans-serif;font-weight:bold;font-size:calc(1.6rem * var(--voca-rem-multiplier));color:#222222;border-radius:calc(0.2rem * var(--voca-rem-multiplier));align-items:center;display:flex;line-height:1.25;padding:0 calc(0.4rem * var(--voca-rem-multiplier)) 0 calc(0.8rem * var(--voca-rem-multiplier));pointer-events:none;position:relative;width:100%}.telia-date-picker__mobile{background-color:#fbf0ff;align-items:center;display:flex;justify-content:space-between;overflow:hidden;padding:calc(1.6rem * var(--voca-rem-multiplier)) calc(1.6rem * var(--voca-rem-multiplier));position:relative;text-overflow:ellipsis;white-space:nowrap}@media screen and (min-width: 37.5em){.telia-date-picker__mobile{background-color:transparent;border:0;overflow:visible;padding:0;position:absolute;right:calc(-0.8rem * var(--voca-rem-multiplier));top:calc(-0.8rem * var(--voca-rem-multiplier))}}.telia-date-picker__mobile-heading{color:#29003e;display:inline-block;max-width:84%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@media screen and (min-width: 37.5em){.telia-date-picker__mobile-heading{display:none}}.telia-date-picker__close{color:#222222;border-radius:calc(99.9rem * var(--voca-rem-multiplier));align-items:center;-webkit-appearance:none;appearance:none;border:0;cursor:pointer;display:flex;height:calc(2.4rem * var(--voca-rem-multiplier));justify-content:center;padding:0;width:calc(2.4rem * var(--voca-rem-multiplier))}@media screen and (min-width: 37.5em){.telia-date-picker__close{display:none}}.telia-date-picker__close:hover{color:#29003e}.telia-date-picker__close:focus{box-shadow:0 0 0 calc(0.3rem * var(--voca-rem-multiplier)) #0099ff;outline:none}.telia-date-picker__close-icon{margin:0 auto}.telia-date-picker__vhidden{border:0;clip:rect(calc(0.1rem * var(--voca-rem-multiplier)), calc(0.1rem * var(--voca-rem-multiplier)), calc(0.1rem * var(--voca-rem-multiplier)), calc(0.1rem * var(--voca-rem-multiplier)));height:calc(0.1rem * var(--voca-rem-multiplier));overflow:hidden;padding:0;position:absolute;top:0;width:calc(0.1rem * var(--voca-rem-multiplier))}', p = {
|
|
251
258
|
TAB: 9,
|
|
252
259
|
ESC: 27,
|
|
253
260
|
SPACE: 32,
|
|
@@ -260,13 +267,20 @@ const pe = ({ selectedDate: e, focusedDate: t, labelledById: a, localization: r,
|
|
|
260
267
|
RIGHT: 39,
|
|
261
268
|
DOWN: 40
|
|
262
269
|
};
|
|
263
|
-
function
|
|
264
|
-
const a = e.value, r = e.selectionStart, l = a.slice(0, r), o = a.slice(r, a.length), s = l.replace(t, ""), d = o.replace(t, ""), h = s + d,
|
|
265
|
-
return e.value = h, e.selectionStart = e.selectionEnd =
|
|
270
|
+
function ke(e, t) {
|
|
271
|
+
const a = e.value, r = e.selectionStart, l = a.slice(0, r), o = a.slice(r, a.length), s = l.replace(t, ""), d = o.replace(t, ""), h = s + d, c = s.length;
|
|
272
|
+
return e.value = h, e.selectionStart = e.selectionEnd = c, h;
|
|
266
273
|
}
|
|
267
|
-
const
|
|
274
|
+
const ye = /[^0-9\.\/\-]+/g, Y = 300, we = /* @__PURE__ */ q(class extends K {
|
|
268
275
|
constructor() {
|
|
269
|
-
super(), this.__registerHost(), this.vocaChange = F(this, "vocaChange", 7), this.vocaBlur = F(this, "vocaBlur", 7), this.vocaFocus = F(this, "vocaFocus", 7), this.monthSelectId = k("dateMonth"), this.yearSelectId = k("dateYear"), this.dialogLabelId = k("dateLabel"), this.body = document.body, this.initialTouchX = null, this.initialTouchY = null, this.dataTrackingId = "telia-date-picker", this.name = "date", this.additionalId = k("additional"), this.inputId = k("input"), this.disabled = !1, this.direction = "right", this.readonly = !1, this.required = !1, this.value = "", this.min = "", this.max = "", this.yearRange = { past: 10, future: 10 }, this.firstDayOfWeek = y.Monday, this.localization = ve, this.dateAdapter = fe, this.modalOpen = !1, this.isDateDisabled = () => !1, this.errorId = k("error"), this.activeFocus = !1, this.focusedDay = new Date(), this.open = this.modalOpen, this.errorMessageState = "", this.touched = !1, this.
|
|
276
|
+
super(), this.__registerHost(), this.vocaChange = F(this, "vocaChange", 7), this.vocaBlur = F(this, "vocaBlur", 7), this.vocaFocus = F(this, "vocaFocus", 7), this.monthSelectId = k("dateMonth"), this.yearSelectId = k("dateYear"), this.dialogLabelId = k("dateLabel"), this.body = document.body, this.initialTouchX = null, this.initialTouchY = null, this.dataTrackingId = "telia-date-picker", this.name = "date", this.additionalId = k("additional"), this.inputId = k("input"), this.disabled = !1, this.direction = "right", this.readonly = !1, this.required = !1, this.value = "", this.min = "", this.max = "", this.yearRange = { past: 10, future: 10 }, this.firstDayOfWeek = y.Monday, this.localization = ve, this.dateAdapter = fe, this.modalOpen = !1, this.isDateDisabled = () => !1, this.errorId = k("error"), this.activeFocus = !1, this.focusedDay = /* @__PURE__ */ new Date(), this.open = this.modalOpen, this.errorMessageState = "", this.touched = !1, this.toggleSmallScreenScroll = () => {
|
|
277
|
+
if (this.body.style.overflowY === "hidden") {
|
|
278
|
+
this.body.style.overflowY = "";
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
const { matches: e } = window.matchMedia(`(max-width: ${be.breakpointMd})`);
|
|
282
|
+
e && (this.body.style.overflowY = "hidden");
|
|
283
|
+
}, this.enableActiveFocus = () => {
|
|
270
284
|
this.activeFocus = !0;
|
|
271
285
|
}, this.disableActiveFocus = () => {
|
|
272
286
|
this.activeFocus = !1;
|
|
@@ -333,22 +347,22 @@ const ke = /[^0-9\.\/\-]+/g, L = 300, ye = /* @__PURE__ */ q(class extends K {
|
|
|
333
347
|
t && (e.preventDefault(), this.enableActiveFocus());
|
|
334
348
|
}, this.handleDaySelect = (e, t) => {
|
|
335
349
|
const a = M(t, v(this.min), v(this.max)), r = !this.isDateDisabled(t);
|
|
336
|
-
a && r ? (this.setValue(t), this.hide()) : this.setFocusedDay(t);
|
|
350
|
+
a && r ? (this.setValue(t), this.updateErrorMessage(""), this.hide()) : this.setFocusedDay(t);
|
|
337
351
|
}, this.handleMonthSelect = (e) => {
|
|
338
352
|
e.stopPropagation(), this.setMonth(parseInt(e.target.value, 10));
|
|
339
353
|
}, this.handleYearSelect = (e) => {
|
|
340
354
|
e.stopPropagation(), this.setYear(parseInt(e.target.value, 10));
|
|
341
355
|
}, this.handleInputChange = () => {
|
|
342
356
|
const e = this.datePickerInput;
|
|
343
|
-
|
|
344
|
-
const t = this.dateAdapter.parse(e.value,
|
|
357
|
+
ke(e, ye);
|
|
358
|
+
const t = this.dateAdapter.parse(e.value, x);
|
|
345
359
|
(t || e.value === "") && this.setValue(t);
|
|
346
360
|
}, this.processFocusedDayNode = (e) => {
|
|
347
361
|
this.focusedDayNode = e, this.activeFocus && this.open && setTimeout(() => e.focus(), 0);
|
|
348
362
|
}, this.makeTouched = () => {
|
|
349
363
|
this.touched = !0;
|
|
350
364
|
}, this.isValueValid = () => {
|
|
351
|
-
const e = this.datePickerInput.value, t = this.dateAdapter.parse(e,
|
|
365
|
+
const e = this.datePickerInput.value, t = this.dateAdapter.parse(e, x);
|
|
352
366
|
return t === void 0 || !M(t, v(this.min), v(this.max)) ? !1 : !this.isDateDisabled(t);
|
|
353
367
|
}, this.updateErrorMessage = (e) => {
|
|
354
368
|
var t;
|
|
@@ -417,16 +431,14 @@ const ke = /[^0-9\.\/\-]+/g, L = 300, ye = /* @__PURE__ */ q(class extends K {
|
|
|
417
431
|
* Show the calendar modal, moving focus to the calendar inside.
|
|
418
432
|
*/
|
|
419
433
|
async show() {
|
|
420
|
-
this.open = !0, this.modalOpen = !0, this.setFocusedDay(v(this.value) || new Date());
|
|
421
|
-
let { matches: e } = window.matchMedia("(max-width: 600px)");
|
|
422
|
-
e && (this.body.style.overflowY = "hidden", this.body.style.position = "fixed", this.body.style.width = "100%"), clearTimeout(this.focusTimeoutId), this.focusTimeoutId = setTimeout(() => this.monthSelectNode.focus(), L);
|
|
434
|
+
this.open = !0, this.modalOpen = !0, this.setFocusedDay(v(this.value) || /* @__PURE__ */ new Date()), this.toggleSmallScreenScroll(), clearTimeout(this.focusTimeoutId), this.focusTimeoutId = setTimeout(() => this.monthSelectNode.focus(), Y);
|
|
423
435
|
}
|
|
424
436
|
/**
|
|
425
437
|
* Hide the calendar modal. Set `moveFocusToButton` to false to prevent focus
|
|
426
438
|
* returning to the date picker's button. Default is true.
|
|
427
439
|
*/
|
|
428
440
|
async hide(e = !0) {
|
|
429
|
-
this.open = !1, this.modalOpen = !1, this.
|
|
441
|
+
this.open = !1, this.modalOpen = !1, this.toggleSmallScreenScroll(), clearTimeout(this.focusTimeoutId), e && setTimeout(() => this.datePickerButton.focus(), Y + 200);
|
|
430
442
|
}
|
|
431
443
|
addDays(e) {
|
|
432
444
|
this.setFocusedDay(z(this.focusedDay, e));
|
|
@@ -445,14 +457,14 @@ const ke = /[^0-9\.\/\-]+/g, L = 300, ye = /* @__PURE__ */ q(class extends K {
|
|
|
445
457
|
}
|
|
446
458
|
setMonth(e) {
|
|
447
459
|
const t = H(D(this.focusedDay), e), a = C(t), r = H(this.focusedDay, e);
|
|
448
|
-
this.setFocusedDay(
|
|
460
|
+
this.setFocusedDay(S(r, t, a));
|
|
449
461
|
}
|
|
450
462
|
setYear(e) {
|
|
451
|
-
const t =
|
|
452
|
-
this.setFocusedDay(
|
|
463
|
+
const t = L(D(this.focusedDay), e), a = C(t), r = L(this.focusedDay, e);
|
|
464
|
+
this.setFocusedDay(S(r, t, a));
|
|
453
465
|
}
|
|
454
466
|
setFocusedDay(e) {
|
|
455
|
-
this.focusedDay =
|
|
467
|
+
this.focusedDay = S(e, v(this.min), v(this.max));
|
|
456
468
|
}
|
|
457
469
|
setValue(e) {
|
|
458
470
|
this.value = V(e), this.vocaChange.emit({
|
|
@@ -467,19 +479,19 @@ const ke = /[^0-9\.\/\-]+/g, L = 300, ye = /* @__PURE__ */ q(class extends K {
|
|
|
467
479
|
*/
|
|
468
480
|
render() {
|
|
469
481
|
var e;
|
|
470
|
-
const t = !!this.additional, a = !!(!((e = this.errorMessageState) === null || e === void 0) && e.length), r =
|
|
482
|
+
const t = !!this.additional, a = !!(!((e = this.errorMessageState) === null || e === void 0) && e.length), r = X({
|
|
471
483
|
[this.additionalId]: t,
|
|
472
484
|
[this.errorId]: a
|
|
473
|
-
}), l = v(this.value), o = l && this.dateAdapter.format(l), s = (l || this.focusedDay).getFullYear(), d = this.focusedDay.getMonth(), h = this.focusedDay.getFullYear(),
|
|
485
|
+
}), l = v(this.value), o = l && this.dateAdapter.format(l), s = (l || this.focusedDay).getFullYear(), d = this.focusedDay.getMonth(), h = this.focusedDay.getFullYear(), c = v(this.min), u = v(this.max), _ = c !== void 0 && c.getMonth() === d && c.getFullYear() === h, g = u !== void 0 && u.getMonth() === d && u.getFullYear() === h, b = c !== void 0 ? c.getFullYear() : s - this.range.past, m = u !== void 0 ? u.getFullYear() : s + this.range.future;
|
|
474
486
|
return i($, null, i("telia-vst", { dataTrackingId: this.dataTrackingId }), i("div", { class: "telia-date-picker" }, i(de, { dateFormatter: this.dateFormatLong, describedBy: r, value: this.value, valueAsDate: l, formattedValue: o, onInput: this.handleInputChange, onBlur: this.handleBlur, onFocus: this.handleFocus, onClick: this.toggleOpen, name: this.name, disabled: this.disabled, readonly: this.readonly, role: this.role, required: this.required, identifier: this.inputId, localization: this.localization, buttonLabel: this.buttonLabel, buttonRef: this.setToggleRef, inputRef: this.setTextInputRef, touched: this.touched, makeTouched: this.makeTouched, htmlForm: this.htmlForm }), i("telia-label", { class: "telia-date-picker__label", htmlFor: this.inputId }, this.required && i("span", { "aria-hidden": "true" }, "* "), this.label), t && i("telia-field-assistive-text", { class: "telia-date-picker__additional", id: this.additionalId }, this.additional), a && i("telia-field-error", { class: "telia-date-picker__error", id: this.errorId }, this.errorMessageState), i("div", { class: "telia-date-picker__dialog-container" }, i("div", { class: {
|
|
475
487
|
"telia-date-picker__dialog": !0,
|
|
476
488
|
"is-left": this.direction === "left",
|
|
477
489
|
"is-active": this.open
|
|
478
|
-
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, i("div", { class: "telia-date-picker__dialog-content", onKeyDown: this.handleEscKey, ref: this.setDialogWrapperRef }, i("div", { class: "telia-date-picker__mobile", onFocusin: this.disableActiveFocus }, i("telia-heading", { tag: "h2", class: "telia-date-picker__mobile-heading", variant: "subsection-100" }, this.localization.calendarHeading), i("button", { class: "telia-date-picker__close", ref: this.setCloseButtonRef, onKeyDown: this.handleFirstFocusableKeydown, onClick: this.handleCloseButtonClick, type: "button" }, i("telia-icon", { class: "telia-date-picker__close-icon", svg:
|
|
479
|
-
|
|
480
|
-
} }, this.localization.monthNames.map((
|
|
481
|
-
|
|
482
|
-
} }, ge(b, m).map((
|
|
490
|
+
}, role: "dialog", "aria-modal": "true", "aria-hidden": this.open ? "false" : "true", "aria-labelledby": this.dialogLabelId, onTouchStart: this.handleTouchStart, onTouchEnd: this.handleTouchEnd }, i("div", { class: "telia-date-picker__dialog-content", onKeyDown: this.handleEscKey, ref: this.setDialogWrapperRef }, i("div", { class: "telia-date-picker__mobile", onFocusin: this.disableActiveFocus }, i("telia-heading", { tag: "h2", class: "telia-date-picker__mobile-heading", variant: "subsection-100" }, this.localization.calendarHeading), i("button", { class: "telia-date-picker__close", ref: this.setCloseButtonRef, onKeyDown: this.handleFirstFocusableKeydown, onClick: this.handleCloseButtonClick, type: "button" }, i("telia-icon", { class: "telia-date-picker__close-icon", svg: j.svg, size: "sm" }), i("span", { class: "telia-date-picker__vhidden" }, this.localization.closeLabel))), i("div", { class: "telia-date-picker__header", onFocusin: this.disableActiveFocus }, i("div", null, i("h2", { id: this.dialogLabelId, class: "telia-date-picker__vhidden", "aria-live": "polite", "aria-atomic": "true" }, this.localization.monthNames[d], " ", this.focusedDay.getFullYear()), i("label", { htmlFor: this.monthSelectId, class: "telia-date-picker__vhidden" }, this.localization.monthSelectLabel), i("div", { class: "telia-date-picker__select" }, i("select", { id: this.monthSelectId, class: "telia-date-picker__select--month", ref: this.setMonthSelectRef, onChange: this.handleMonthSelect, onInput: (n) => {
|
|
491
|
+
n.stopPropagation();
|
|
492
|
+
} }, this.localization.monthNames.map((n, f) => i("option", { key: n, value: f, selected: f === d, disabled: !M(new Date(h, f, 1), c !== void 0 ? D(c) : null, u !== void 0 ? C(u) : null) }, n))), i("div", { class: "telia-date-picker__select-label", "aria-hidden": "true" }, i("span", null, this.localization.monthNamesShort[d]), i("telia-icon", { class: "telia-date-picker__select-icon", svg: E.svg, size: "sm" }))), i("label", { htmlFor: this.yearSelectId, class: "telia-date-picker__vhidden" }, this.localization.yearSelectLabel), i("div", { class: "telia-date-picker__select" }, i("select", { id: this.yearSelectId, class: "telia-date-picker__select--year", onChange: this.handleYearSelect, onInput: (n) => {
|
|
493
|
+
n.stopPropagation();
|
|
494
|
+
} }, ge(b, m).map((n) => i("option", { key: n, selected: n === h }, n))), i("div", { class: "telia-date-picker__select-label", "aria-hidden": "true" }, i("span", null, this.focusedDay.getFullYear()), i("telia-icon", { class: "telia-date-picker__select-icon", svg: E.svg, size: "sm" })))), i("div", { class: "telia-date-picker__nav" }, i("button", { class: "telia-date-picker__prev", onClick: this.handlePreviousMonthClick, disabled: _, type: "button" }, i("telia-icon", { class: "telia-date-picker__prev-icon", svg: le.svg, size: "sm" }), i("span", { class: "telia-date-picker__vhidden" }, this.localization.prevMonthLabel)), i("button", { class: "telia-date-picker__next", onClick: this.handleNextMonthClick, disabled: g, type: "button" }, i("telia-icon", { class: "telia-date-picker__next-icon", svg: oe.svg, size: "sm" }), i("span", { class: "telia-date-picker__vhidden" }, this.localization.nextMonthLabel)))), i(pe, { dateFormatter: this.dateFormatShort, selectedDate: l, focusedDate: this.focusedDay, onDateSelect: this.handleDaySelect, onKeyboardNavigation: this.handleKeyboardNavigation, labelledById: this.dialogLabelId, localization: this.localization, firstDayOfWeek: this.firstDayOfWeek, focusedDayRef: this.processFocusedDayNode, min: c, max: u, isDateDisabled: this.isDateDisabled }))))));
|
|
483
495
|
}
|
|
484
496
|
get element() {
|
|
485
497
|
return this;
|
|
@@ -491,7 +503,7 @@ const ke = /[^0-9\.\/\-]+/g, L = 300, ye = /* @__PURE__ */ q(class extends K {
|
|
|
491
503
|
};
|
|
492
504
|
}
|
|
493
505
|
static get style() {
|
|
494
|
-
return
|
|
506
|
+
return _e;
|
|
495
507
|
}
|
|
496
508
|
}, [0, "telia-date-picker", {
|
|
497
509
|
dataTestid: [1, "data-testid"],
|
|
@@ -529,19 +541,19 @@ const ke = /[^0-9\.\/\-]+/g, L = 300, ye = /* @__PURE__ */ q(class extends K {
|
|
|
529
541
|
show: [64],
|
|
530
542
|
hide: [64]
|
|
531
543
|
}, [[6, "click", "handleDocumentClick"]]]);
|
|
532
|
-
function
|
|
544
|
+
function De() {
|
|
533
545
|
if (typeof customElements > "u")
|
|
534
546
|
return;
|
|
535
547
|
["telia-date-picker", "telia-button", "telia-field-assistive-text", "telia-field-error", "telia-heading", "telia-icon", "telia-label", "telia-vst"].forEach((t) => {
|
|
536
548
|
switch (t) {
|
|
537
549
|
case "telia-date-picker":
|
|
538
|
-
customElements.get(t) || customElements.define(t,
|
|
550
|
+
customElements.get(t) || customElements.define(t, we);
|
|
539
551
|
break;
|
|
540
552
|
case "telia-button":
|
|
541
|
-
customElements.get(t) ||
|
|
553
|
+
customElements.get(t) || J();
|
|
542
554
|
break;
|
|
543
555
|
case "telia-field-assistive-text":
|
|
544
|
-
customElements.get(t) ||
|
|
556
|
+
customElements.get(t) || U();
|
|
545
557
|
break;
|
|
546
558
|
case "telia-field-error":
|
|
547
559
|
customElements.get(t) || Q();
|
|
@@ -561,5 +573,5 @@ function we() {
|
|
|
561
573
|
}
|
|
562
574
|
});
|
|
563
575
|
}
|
|
564
|
-
|
|
576
|
+
De();
|
|
565
577
|
//# sourceMappingURL=telia-date-picker.js.map
|