q2-tecton-elements 1.27.1 → 1.28.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/dist/cjs/click-elsewhere_2.cjs.entry.js +258 -0
- package/dist/cjs/{index-ffd19146.js → index-7a73e106.js} +12 -52
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +128 -83
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +44 -45
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup_2.cjs.entry.js +1 -1
- package/dist/cjs/{q2-option-list_2.cjs.entry.js → q2-option-list.cjs.entry.js} +3 -167
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +11 -6
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/q2-avatar/styles.css +3 -7
- package/dist/collection/components/q2-calendar/helpers.js +37 -11
- package/dist/collection/components/q2-calendar/index.js +174 -91
- package/dist/collection/components/q2-calendar/styles.css +5 -68
- package/dist/collection/components/q2-dropdown/index.js +123 -66
- package/dist/collection/components/q2-dropdown/styles.css +3 -89
- package/dist/collection/components/q2-select/index.js +10 -5
- package/dist/collection/utils/index.js +11 -51
- package/dist/components/index11.js +1 -1
- package/dist/components/index15.js +12 -52
- package/dist/components/index3.js +1 -1
- package/dist/components/index7.js +1 -1
- package/dist/components/index8.js +1 -1
- package/dist/components/q2-calendar.js +154 -101
- package/dist/components/q2-card.js +1 -1
- package/dist/components/q2-carousel.js +1 -1
- package/dist/components/q2-checkbox-group.js +1 -1
- package/dist/components/q2-checkbox.js +1 -1
- package/dist/components/q2-dropdown.js +66 -59
- package/dist/components/q2-radio-group.js +1 -1
- package/dist/components/q2-radio.js +1 -1
- package/dist/components/q2-select.js +11 -6
- package/dist/components/q2-stepper-pane.js +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-textarea.js +1 -1
- package/dist/docs.json +144 -4
- package/dist/esm/click-elsewhere_2.entry.js +253 -0
- package/dist/esm/{index-a0cc60e3.js → index-576f618c.js} +12 -52
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_2.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +128 -83
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +44 -45
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup_2.entry.js +1 -1
- package/dist/esm/{q2-option-list_2.entry.js → q2-option-list.entry.js} +4 -167
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +1 -1
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +1 -1
- package/dist/esm/q2-select.entry.js +11 -6
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/p-0b7003c4.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-0b8943da.entry.js → p-0d92ab4a.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-138db98d.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-a298cbfb.entry.js → p-1b9e07b4.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-bafb5e70.entry.js → p-1e57a843.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-ac6dd5b1.entry.js → p-2423b9a9.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-396fd275.entry.js → p-2bb447c3.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-85e780b2.entry.js → p-3422207a.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-edcf49fd.entry.js → p-39989362.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-3dca7465.entry.js → p-3aad6a45.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-ef657f8f.entry.js → p-4d2b7f2e.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-869e899c.entry.js → p-4ffde81a.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-d06d752f.entry.js → p-55bdd480.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-590adc15.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-949fa312.entry.js → p-5cd51157.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-5e14a790.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-12e65423.entry.js → p-6524d5f3.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-521c9085.entry.js → p-68908be9.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9367dc29.entry.js → p-6975e5e4.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-6bb3789b.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-5a670d93.entry.js → p-6db208c7.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-78b7ea4e.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-2b8a8981.entry.js → p-7a702d92.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-fb768d19.entry.js → p-7e1a14ea.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-921ea070.js +1 -0
- package/dist/q2-tecton-elements/{p-04b9a7ee.entry.js → p-a63e64f0.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-b9bbfaf7.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-d69cb7d1.entry.js → p-bbd2c530.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-05bdc0aa.entry.js → p-c19e143e.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-256e5161.entry.js → p-c8525f80.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-fcad1609.entry.js → p-c93341d5.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-8545c3cb.entry.js → p-d6824ce5.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-f3e4bb52.entry.js → p-ddfb393a.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9292bd80.entry.js → p-df3fb1e7.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-fe3625ad.entry.js → p-ed77f0c2.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-25ea01d3.entry.js → p-ed91f837.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-1d28c600.entry.js → p-fa0e471c.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +1 -1
- package/dist/types/components/q2-calendar/helpers.d.ts +1 -0
- package/dist/types/components/q2-calendar/index.d.ts +22 -12
- package/dist/types/components/q2-dropdown/index.d.ts +12 -8
- package/dist/types/components.d.ts +24 -0
- package/dist/types/utils/index.d.ts +4 -9
- package/dist/types/workspace/workspace/{tecton-production_release_1.27.x → tecton-production_release_1.28.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cjs/click-elsewhere.cjs.entry.js +0 -93
- package/dist/esm/click-elsewhere.entry.js +0 -89
- package/dist/q2-tecton-elements/p-2453cd92.js +0 -1
- package/dist/q2-tecton-elements/p-31b655b6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-72374b8e.entry.js +0 -1
- package/dist/q2-tecton-elements/p-8e652d59.entry.js +0 -1
- package/dist/q2-tecton-elements/p-aae8b9fc.entry.js +0 -1
- package/dist/q2-tecton-elements/p-be0d3bfe.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c1d33fd2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ee1f3114.entry.js +0 -1
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import { l as loc,
|
|
3
|
-
import { d as defineCustomElement$
|
|
4
|
-
import { d as defineCustomElement$
|
|
5
|
-
import { d as defineCustomElement$
|
|
6
|
-
import { d as defineCustomElement$
|
|
7
|
-
import { d as defineCustomElement$
|
|
8
|
-
import { d as defineCustomElement$
|
|
9
|
-
import { d as defineCustomElement$
|
|
2
|
+
import { l as loc, h as handleAriaLabel, o as overrideFocus, i as isMobile, a as isEventFromElement, b as handleRenamedProp, w as waitForNextPaint } from './index15.js';
|
|
3
|
+
import { d as defineCustomElement$9 } from './index2.js';
|
|
4
|
+
import { d as defineCustomElement$8 } from './index4.js';
|
|
5
|
+
import { d as defineCustomElement$7 } from './index5.js';
|
|
6
|
+
import { d as defineCustomElement$6 } from './index7.js';
|
|
7
|
+
import { d as defineCustomElement$5 } from './index8.js';
|
|
8
|
+
import { d as defineCustomElement$4 } from './index9.js';
|
|
9
|
+
import { d as defineCustomElement$3 } from './index10.js';
|
|
10
|
+
import { d as defineCustomElement$2 } from './index14.js';
|
|
10
11
|
|
|
11
12
|
function toInteger(dirtyNumber) {
|
|
12
13
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
@@ -2667,27 +2668,53 @@ function formatDateISO(value) {
|
|
|
2667
2668
|
return;
|
|
2668
2669
|
return formatISO(date, { representation: 'date' });
|
|
2669
2670
|
}
|
|
2671
|
+
let memoizedFormatDateShort;
|
|
2670
2672
|
function formatDateShort(value) {
|
|
2671
2673
|
const date = new Date(value);
|
|
2672
2674
|
if (!isValid(date))
|
|
2673
2675
|
return;
|
|
2674
2676
|
const isoDate = date.toISOString();
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2677
|
+
if (!memoizedFormatDateShort) {
|
|
2678
|
+
memoizedFormatDateShort = new Intl.DateTimeFormat('default', {
|
|
2679
|
+
month: '2-digit',
|
|
2680
|
+
day: '2-digit',
|
|
2681
|
+
year: 'numeric',
|
|
2682
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
2683
|
+
});
|
|
2684
|
+
}
|
|
2685
|
+
return memoizedFormatDateShort.format(new Date(isoDate));
|
|
2681
2686
|
}
|
|
2687
|
+
let memoizedFormatDateLong;
|
|
2682
2688
|
function formatDateLong(value) {
|
|
2683
2689
|
const date = new Date(value);
|
|
2684
2690
|
if (!isValid(date))
|
|
2685
2691
|
return;
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2692
|
+
if (!memoizedFormatDateLong) {
|
|
2693
|
+
memoizedFormatDateLong = new Intl.DateTimeFormat('default', {
|
|
2694
|
+
month: 'short',
|
|
2695
|
+
day: 'numeric',
|
|
2696
|
+
year: 'numeric',
|
|
2697
|
+
});
|
|
2698
|
+
}
|
|
2699
|
+
return memoizedFormatDateLong.format(date);
|
|
2700
|
+
}
|
|
2701
|
+
let memoizedFormatDateFull;
|
|
2702
|
+
function formatDateFull(value) {
|
|
2703
|
+
if (!value)
|
|
2704
|
+
return;
|
|
2705
|
+
const date = new Date(value);
|
|
2706
|
+
if (!isValid(date))
|
|
2707
|
+
return;
|
|
2708
|
+
if (!memoizedFormatDateFull) {
|
|
2709
|
+
memoizedFormatDateFull = new Intl.DateTimeFormat('default', {
|
|
2710
|
+
month: 'long',
|
|
2711
|
+
day: 'numeric',
|
|
2712
|
+
year: 'numeric',
|
|
2713
|
+
weekday: 'long',
|
|
2714
|
+
timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
2715
|
+
});
|
|
2716
|
+
}
|
|
2717
|
+
return memoizedFormatDateFull.format(date);
|
|
2691
2718
|
}
|
|
2692
2719
|
function convertMomentFormat(stringFormat) {
|
|
2693
2720
|
return stringFormat
|
|
@@ -3045,7 +3072,7 @@ function addEmptyDates(from, to) {
|
|
|
3045
3072
|
return [...Array(to - from).keys()].map(() => (Object.assign({}, emptyDate)));
|
|
3046
3073
|
}
|
|
3047
3074
|
|
|
3048
|
-
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}
|
|
3075
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block}:host[hidden]{display:none}click-elsewhere{position:relative;display:block}q2-input{margin:0;cursor:pointer}.calendar-field-popup{padding:var(--tct-calendar-popover-padding, var(--t-calendar-popover-padding, var(--app-scale-1x, 5px)))}.calendar-label{font-size:var(--tct-calendar-label-font-size, var(--t-calendar-label-font-size, 16px));flex:1 1;flex-basis:calc(100% - var(--tct-btn-icon-width, 44px));margin:0;padding:var(--tct-calendar-label-vertical-padding, var(--t-calendar-label-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0}.calendar-hint{text-align:left;margin:0}.cal-month-heading{padding:0 0 0.75rem;display:flex;justify-content:center;align-items:center;font-size:var(--tct-calendar-month-font-size, var(--t-calendar-month-font-size, 16px));font-weight:var(--tct-calendar-month-font-weight, var(--t-calendar-month-font-weight, 600));text-align:center}.cal-month-text{min-width:82px;display:inline-block}.cal-year-text{min-width:50px;display:inline-block}table{width:100%;margin-bottom:2px;text-align:center}th{font-size:var(--tct-calendar-day-heading-font-size, var(--t-calendar-day-heading-font-size, inherit));font-weight:var(--tct-calendar-day-heading-font-weight, var(--t-calendar-day-heading-font-weight, 600));width:14.285714%}td{height:44px;cursor:pointer;border:var(--tct-calendar-day-border, var(--t-calendar-day-border, 0));border-radius:var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))}td.is-unavailable{border:1px solid var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000))}td.is-valid:hover{border:var(--tct-calendar-day-hover-border, var(--t-calendar-day-hover-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-hover-border-radius, var(--t-calendar-day-hover-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background-color:var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--app-gray14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2))))));color:var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))}td[aria-hidden],td[aria-disabled]{pointer-events:none;cursor:not-allowed}td[aria-disabled]{opacity:var(--tct-calendar-day-disabled-opacity, var(--t-calendar-day-disabled-opacity, var(--app-disabled-opacity, 0.4)))}td[aria-selected]{border:var(--tct-calendar-day-selected-border, var(--t-calendar-day-selected-border, var(--tct-calendar-day-border, var(--t-calendar-day-border, 0))));border-radius:var(--tct-calendar-day-selected-border-radius, var(--t-calendar-day-selected-border-radius, var(--tct-calendar-day-border-radius, var(--t-calendar-day-border-radius))));background-color:var(--tct-calendar-day-selected-bg, var(--t-calendar-day-selected-bg, var(--tct-calendar-day-hover-bg, var(--t-calendar-day-hover-bg, var(--tct-gray-14, var(--t-gray-14, var(--tct-gray-l4, var(--app-gray-l4, #f2f2f2))))))));color:var(--tct-calendar-day-selected-font-color, var(--t-calendar-day-selected-font-color, var(--tct-calendar-day-hover-font-color, var(--t-calendar-day-hover-font-color, inherit))));box-shadow:0 0 0 2px var(--tct-calendar-day-selected-outline-color, var(--t-calendar-day-selected-outline-color, var(--tct-stoplight-info, var(--const-stoplight-info, #0079c1))))}.today-decorator{text-transform:uppercase;font-weight:700;font-size:10px;height:12px}.calendar-disclaimer{font-size:var(--tct-calendar-disclaimer-font-size, var(--t-calendar-disclaimer-font-size, var(--tct-font-size-small, var(--app-font-size-small, 12px))));border-top:1px solid var(--tct-calendar-disclaimer-border-color, var(--t-calendar-disclaimer-border-color, var(--tct-gray-13, var(--t-gray-13, var(--tct-gray-l3, var(--app-gray-l3, #e6e6e6))))));padding:var(--tct-calendar-disclaimer-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)));text-align:left}";
|
|
3049
3076
|
|
|
3050
3077
|
const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
3051
3078
|
constructor() {
|
|
@@ -3057,38 +3084,31 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3057
3084
|
this.success = createEvent(this, "success", 7);
|
|
3058
3085
|
this.formatModifier = 'M/D/YYYY'; // To allow missing leading zero, 4/3/2021 => converts into 04/03/2021
|
|
3059
3086
|
this.defaultFormatString = 'mm/dd/yyyy';
|
|
3060
|
-
this.defaultHintMessage = loc('tecton.element.calendar.hint.format') + ': ' + this.defaultFormatString;
|
|
3061
3087
|
this.scheduledAfterRender = [];
|
|
3062
3088
|
this.dayAbbrStrings = getDays();
|
|
3063
3089
|
this.dayStrings = getDaysOfWeek();
|
|
3064
3090
|
this.monthStrings = getMonths();
|
|
3065
3091
|
this.closeCalendar = () => {
|
|
3066
|
-
if (this.
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
}
|
|
3092
|
+
if (!this.open)
|
|
3093
|
+
return;
|
|
3094
|
+
this.open = false;
|
|
3095
|
+
this.focusInput();
|
|
3071
3096
|
};
|
|
3072
3097
|
this.openCalendar = () => {
|
|
3073
|
-
if (
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
this.scheduledAfterRender.push(this.resizeIframe);
|
|
3079
|
-
}
|
|
3098
|
+
if (this.readonly || this.open)
|
|
3099
|
+
return;
|
|
3100
|
+
this.selectedMonthYear = setupMonthYear(this.dateValue);
|
|
3101
|
+
this.dateList = this.buildDateList(this.selectedMonthYear);
|
|
3102
|
+
this.open = true;
|
|
3080
3103
|
};
|
|
3081
3104
|
this.toggleCalendar = () => {
|
|
3082
3105
|
if (this.readonly)
|
|
3083
3106
|
return;
|
|
3084
|
-
this.
|
|
3085
|
-
|
|
3086
|
-
if (this.dropdownOpen) {
|
|
3087
|
-
this.selectedMonthYear = setupMonthYear(this.dateValue);
|
|
3088
|
-
this.dateList = this.buildDateList(this.selectedMonthYear);
|
|
3107
|
+
if (this.open) {
|
|
3108
|
+
this.closeCalendar();
|
|
3089
3109
|
}
|
|
3090
3110
|
else {
|
|
3091
|
-
this.
|
|
3111
|
+
this.openCalendar();
|
|
3092
3112
|
}
|
|
3093
3113
|
};
|
|
3094
3114
|
this.onClickElsewhere = (event) => {
|
|
@@ -3121,10 +3141,11 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3121
3141
|
if (this.disabled) {
|
|
3122
3142
|
return;
|
|
3123
3143
|
}
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3144
|
+
switch (event.key) {
|
|
3145
|
+
case 'Escape':
|
|
3146
|
+
this.onInputBlur();
|
|
3147
|
+
this.closeCalendar();
|
|
3148
|
+
break;
|
|
3128
3149
|
}
|
|
3129
3150
|
if (!this.isTypeable)
|
|
3130
3151
|
return;
|
|
@@ -3198,10 +3219,8 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3198
3219
|
}
|
|
3199
3220
|
};
|
|
3200
3221
|
this.onInputClick = () => {
|
|
3201
|
-
if (this.disabled)
|
|
3222
|
+
if (this.disabled)
|
|
3202
3223
|
return;
|
|
3203
|
-
}
|
|
3204
|
-
setPopProperties(this);
|
|
3205
3224
|
this.toggleCalendar();
|
|
3206
3225
|
};
|
|
3207
3226
|
this.onRefocus = () => {
|
|
@@ -3238,13 +3257,6 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3238
3257
|
return;
|
|
3239
3258
|
const clickedDate = removeTimezoneOffset(new Date(dateCell.dataset.date));
|
|
3240
3259
|
this.selectDate(clickedDate);
|
|
3241
|
-
if (this.isTypeable) {
|
|
3242
|
-
this.setHints({
|
|
3243
|
-
isValid: true,
|
|
3244
|
-
message: `${loc('tecton.element.calendar.hint.selection')}: ${formatDateLong(clickedDate)}`,
|
|
3245
|
-
messageType: 'success',
|
|
3246
|
-
});
|
|
3247
|
-
}
|
|
3248
3260
|
this.closeCalendar();
|
|
3249
3261
|
};
|
|
3250
3262
|
this.onDateKeydown = (event) => {
|
|
@@ -3319,6 +3331,7 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3319
3331
|
this.disabled = undefined;
|
|
3320
3332
|
this.readonly = undefined;
|
|
3321
3333
|
this.invalid = undefined;
|
|
3334
|
+
this.open = undefined;
|
|
3322
3335
|
this.typeable = undefined;
|
|
3323
3336
|
this.clearable = undefined;
|
|
3324
3337
|
this.placeholder = undefined;
|
|
@@ -3330,24 +3343,22 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3330
3343
|
this.endDate = undefined;
|
|
3331
3344
|
this.cutoffTime = undefined;
|
|
3332
3345
|
this.daysOfWeekChecksum = undefined;
|
|
3333
|
-
this.popDirection = undefined;
|
|
3334
3346
|
this.assume = 'current';
|
|
3335
3347
|
this.errors = undefined;
|
|
3336
3348
|
this.invalidDates = undefined;
|
|
3337
3349
|
this.validDates = undefined;
|
|
3350
|
+
this.popoverDirection = undefined;
|
|
3351
|
+
this.popoverMinHeight = 355;
|
|
3352
|
+
this.popDirection = undefined;
|
|
3338
3353
|
this.onsuccess = undefined;
|
|
3339
3354
|
this.buttonLabel = undefined;
|
|
3340
3355
|
this.ariaLabel = undefined;
|
|
3341
|
-
this.dropdownOpen = false;
|
|
3342
3356
|
this.keyboardSelection = false;
|
|
3343
3357
|
this.typedValue = '';
|
|
3344
3358
|
this.dateList = undefined;
|
|
3345
3359
|
this.hintMessage = this.defaultHintMessage;
|
|
3346
3360
|
this.hintMessageType = 'info';
|
|
3347
3361
|
}
|
|
3348
|
-
resizeIframe() {
|
|
3349
|
-
return window.TectonElements && window.TectonElements.resizeIframe && window.TectonElements.resizeIframe();
|
|
3350
|
-
}
|
|
3351
3362
|
connectedCallback() {
|
|
3352
3363
|
this.selectedMonthYear = setupMonthYear(this.dateValue);
|
|
3353
3364
|
this.dateList = this.buildDateList(this.selectedMonthYear);
|
|
@@ -3357,6 +3368,7 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3357
3368
|
this.validateDate();
|
|
3358
3369
|
}
|
|
3359
3370
|
componentWillLoad() {
|
|
3371
|
+
this.popDirectionHandler();
|
|
3360
3372
|
handleAriaLabel(this);
|
|
3361
3373
|
}
|
|
3362
3374
|
componentDidRender() {
|
|
@@ -3368,6 +3380,20 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3368
3380
|
componentDidLoad() {
|
|
3369
3381
|
overrideFocus(this.hostElement);
|
|
3370
3382
|
}
|
|
3383
|
+
get selectedDate() {
|
|
3384
|
+
var _a;
|
|
3385
|
+
const selectedCell = (_a = this.calendarBody) === null || _a === void 0 ? void 0 : _a.querySelector('[aria-selected="true"]');
|
|
3386
|
+
return selectedCell ? removeTimezoneOffset(new Date(selectedCell.dataset.date)) : null;
|
|
3387
|
+
}
|
|
3388
|
+
get innerInputField() {
|
|
3389
|
+
var _a, _b;
|
|
3390
|
+
return (_b = (_a = this.controlElement) === null || _a === void 0 ? void 0 : _a.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector('.input-field');
|
|
3391
|
+
}
|
|
3392
|
+
get defaultHintMessage() {
|
|
3393
|
+
return this.typeable
|
|
3394
|
+
? loc('tecton.element.calendar.hint.format') + ': ' + this.defaultFormatString
|
|
3395
|
+
: loc('tecton.element.calendar.hint.select');
|
|
3396
|
+
}
|
|
3371
3397
|
get canClear() {
|
|
3372
3398
|
if (this.isTypeable) {
|
|
3373
3399
|
return this.clearable && !!this.typedValue;
|
|
@@ -3475,36 +3501,52 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3475
3501
|
delegateFocus(event) {
|
|
3476
3502
|
if (!isEventFromElement(event, this.hostElement))
|
|
3477
3503
|
return;
|
|
3478
|
-
this.
|
|
3504
|
+
this.controlElement.shadowRoot.querySelector('.input-field').focus();
|
|
3479
3505
|
}
|
|
3480
3506
|
handleClear() {
|
|
3481
3507
|
this.value = null;
|
|
3482
3508
|
this.typedValue = '';
|
|
3483
|
-
|
|
3509
|
+
}
|
|
3510
|
+
popoverStateHandler({ detail: { open } }) {
|
|
3511
|
+
if (this.open !== open)
|
|
3512
|
+
this.open = open;
|
|
3484
3513
|
}
|
|
3485
3514
|
//////// Observers //////////
|
|
3515
|
+
popDirectionHandler() {
|
|
3516
|
+
handleRenamedProp(this, 'popDirection', 'popoverDirection');
|
|
3517
|
+
}
|
|
3486
3518
|
ariaLabelObserver() {
|
|
3487
3519
|
handleAriaLabel(this);
|
|
3488
3520
|
}
|
|
3521
|
+
typeableChanged() {
|
|
3522
|
+
this.valueObserver(this.value);
|
|
3523
|
+
}
|
|
3489
3524
|
valueObserver(newValue) {
|
|
3490
3525
|
const isMoment = newValue && typeof newValue !== 'string' && 'toDate' in newValue;
|
|
3526
|
+
const newDate = isMoment ? newValue.toDate() : stringToDate(newValue);
|
|
3527
|
+
const shortFormattedValue = formatDateShort(newDate);
|
|
3491
3528
|
if (this.isTypeable) {
|
|
3492
|
-
|
|
3493
|
-
? formatDateShort(newValue.toDate())
|
|
3494
|
-
: newValue;
|
|
3495
|
-
this.typedValue = newValueAsString;
|
|
3496
|
-
// reset hint when value is cleared
|
|
3497
|
-
if (!newValueAsString && !this.invalid) {
|
|
3498
|
-
this.setHints({ isValid: true, message: this.defaultHintMessage, messageType: 'info' });
|
|
3499
|
-
}
|
|
3529
|
+
this.typedValue = shortFormattedValue;
|
|
3500
3530
|
}
|
|
3501
3531
|
else {
|
|
3502
|
-
|
|
3503
|
-
this.
|
|
3504
|
-
this.selectedMonthYear = setupMonthYear(dateValue);
|
|
3532
|
+
this.controlElement.value = shortFormattedValue;
|
|
3533
|
+
this.selectedMonthYear = setupMonthYear(newDate);
|
|
3505
3534
|
this.dateList = this.buildDateList(this.selectedMonthYear);
|
|
3506
3535
|
this.validateDate();
|
|
3507
3536
|
}
|
|
3537
|
+
// reset hint when value is cleared
|
|
3538
|
+
if (this.invalid)
|
|
3539
|
+
return;
|
|
3540
|
+
if (shortFormattedValue) {
|
|
3541
|
+
this.setHints({
|
|
3542
|
+
isValid: true,
|
|
3543
|
+
message: `${loc('tecton.element.calendar.hint.selection')}: ${formatDateLong(newDate)}`,
|
|
3544
|
+
messageType: 'success',
|
|
3545
|
+
});
|
|
3546
|
+
}
|
|
3547
|
+
else {
|
|
3548
|
+
this.setHints({ isValid: true, message: this.defaultHintMessage, messageType: 'info' });
|
|
3549
|
+
}
|
|
3508
3550
|
}
|
|
3509
3551
|
daysOfWeekChecksumObserver() {
|
|
3510
3552
|
this.dateList = this.buildDateList(this.selectedMonthYear);
|
|
@@ -3584,7 +3626,7 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3584
3626
|
}
|
|
3585
3627
|
focusInput() {
|
|
3586
3628
|
var _a;
|
|
3587
|
-
(_a = this.
|
|
3629
|
+
(_a = this.controlElement) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3588
3630
|
}
|
|
3589
3631
|
checkActiveCellForBlankness() {
|
|
3590
3632
|
const activeElement = this.hostElement.shadowRoot.activeElement;
|
|
@@ -3604,56 +3646,60 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3604
3646
|
this.goToMonthYear(date.getMonth(), date.getFullYear());
|
|
3605
3647
|
this.scheduledAfterRender.push(() => this.focusDay(date));
|
|
3606
3648
|
}
|
|
3607
|
-
focusDay(date) {
|
|
3649
|
+
async focusDay(date) {
|
|
3608
3650
|
var _a;
|
|
3651
|
+
if (!date)
|
|
3652
|
+
return;
|
|
3653
|
+
await waitForNextPaint();
|
|
3609
3654
|
(_a = this.calendarBody.querySelector(`td[data-day="${date.getDate()}"]`)) === null || _a === void 0 ? void 0 : _a.focus();
|
|
3610
3655
|
}
|
|
3611
3656
|
render() {
|
|
3612
|
-
return (h("click-elsewhere", { class:
|
|
3657
|
+
return (h("click-elsewhere", { class: this.open ? 'dropdown-open' : undefined, onChange: this.onClickElsewhere }, this.inputField(), h("q2-popover", { ref: el => (this.popoverElement = el), controlElement: this.innerInputField, open: this.open, direction: this.popoverDirection, "aria-label": loc('tecton.element.calendar.dialogLabel'), minHeight: this.popoverMinHeight, block: true }, this.hintField(), this.calendarPopover())));
|
|
3613
3658
|
}
|
|
3614
3659
|
hintField() {
|
|
3615
|
-
|
|
3660
|
+
const messageClasses = ['calendar-hint'];
|
|
3661
|
+
if (!this.isTypeable)
|
|
3662
|
+
messageClasses.push('sr');
|
|
3663
|
+
return (h("q2-message", { ref: el => (this.hintMessageElement = el), type: this.hintMessageType, class: messageClasses.join(' ') }, this.hintMessage));
|
|
3616
3664
|
}
|
|
3617
3665
|
setHints({ isValid, message, messageType }) {
|
|
3666
|
+
if (message === this.hintMessage)
|
|
3667
|
+
return this.hintMessageElement.present();
|
|
3618
3668
|
this.invalid = !isValid;
|
|
3619
3669
|
this.hintMessage = message;
|
|
3620
3670
|
this.hintMessageType = messageType;
|
|
3621
|
-
if (!this.invalid) {
|
|
3622
|
-
this.errors = [];
|
|
3623
|
-
}
|
|
3624
3671
|
}
|
|
3625
3672
|
setCompleteInput(inputDate) {
|
|
3626
3673
|
const formattedDate = formatDateShort(inputDate);
|
|
3627
3674
|
this.change.emit({ value: formatDateISO(inputDate) });
|
|
3628
3675
|
this.typedValue = formattedDate;
|
|
3629
|
-
this.setHints({
|
|
3630
|
-
isValid: true,
|
|
3631
|
-
message: `${loc('tecton.element.calendar.hint.selection')}: ${formatDateLong(inputDate)}`,
|
|
3632
|
-
messageType: 'success',
|
|
3633
|
-
});
|
|
3634
3676
|
}
|
|
3635
|
-
|
|
3636
|
-
return (h("q2-input", { ref: el => (this.
|
|
3677
|
+
inputField() {
|
|
3678
|
+
return (h("q2-input", { ref: el => (this.controlElement = el), class: "calendar-input-field", value: this.formattedValue, label: loc(this.label), hideLabel: this.hideLabel, disabled: !!this.disabled, readonly: !!this.readonly, clearable: this.canClear, placeholder: this.computedPlaceholder, optional: !!this.optional, ariaExpanded: `${!!this.open}`, errors: (this.localizedErrors.length > 0 && this.localizedErrors) ||
|
|
3637
3679
|
(this.invalid && ['tecton.element.calendar.invalid']) ||
|
|
3638
3680
|
[], onClick: this.onInputClick, onChange: this.onInputChange, onInput: this.onInputInput, onKeyDown: this.onInputKeydown, onKeyUp: this.onInputKeyup, onBlur: this.onInputBlur, "icon-right": "calendar", "format-modifier": this.isTypeable ? this.formatModifier : '', pseudo: !this.isTypeable, type: "date", "hide-messages": true, "test-id": "inputAndCalendarToggle" }));
|
|
3639
3681
|
}
|
|
3640
|
-
|
|
3682
|
+
calendarPopover() {
|
|
3641
3683
|
const { monthIndex, selectedYear } = this.selectedMonthYear;
|
|
3642
3684
|
return (h("div", { class: "calendar-field-popup", onKeyUp: this.onPopupKeyup }, this.calendarLabel && h("p", { class: "calendar-label" }, loc(this.calendarLabel)), h("div", { class: "cal-month-heading" }, h("q2-btn", { label: loc('tecton.element.calendar.previousMonth'), "hide-label": true, ref: elm => (this.btnPrevMonth = elm), class: "cal-nav-btn prev-month", "test-id": "previousMonthButton", onClick: () => this.goToMonthYear(monthIndex - 1, selectedYear) }, h("q2-icon", { type: "chevron-left" })), h("span", { class: "cal-month-text" }, this.monthStrings[monthIndex]), h("q2-btn", { label: loc('tecton.element.calendar.nextMonth'), "hide-label": true, class: "cal-nav-btn next-month", ref: elm => (this.btnNextMonth = elm), "test-id": "nextMonthButton", onClick: () => this.goToMonthYear(monthIndex + 1, selectedYear) }, h("q2-icon", { type: "chevron-right" })), h("q2-btn", { label: loc('tecton.element.calendar.previousYear'), "hide-label": true, class: "cal-nav-btn prev-year", ref: elm => (this.btnPrevYear = elm), "test-id": "previousYearButton", onClick: () => this.goToMonthYear(monthIndex, selectedYear - 1) }, h("q2-icon", { type: "chevron-left" })), h("span", { class: "cal-year-text" }, this.selectedMonthYear.selectedYear), h("q2-btn", { label: loc('tecton.element.calendar.nextYear'), "hide-label": true, class: "cal-nav-btn next-year", ref: elm => (this.btnNextYear = elm), "test-id": "nextYearButton", onClick: () => this.goToMonthYear(monthIndex, selectedYear + 1) }, h("q2-icon", { type: "chevron-right" }))), h("div", { class: "sr", "aria-live": "polite", id: "table-label" }, `${this.monthStrings[monthIndex]} ${selectedYear}`), this.calendarDays(), this.disclaimer && h("div", { class: "calendar-disclaimer" }, loc(this.disclaimer)), h("q2-btn", { class: "sr refocus-popup", onFocus: this.onRefocus })));
|
|
3643
3685
|
}
|
|
3644
3686
|
calendarDays() {
|
|
3645
|
-
|
|
3646
|
-
return (h("table", { role: "grid", "aria-labelledby": "table-label" }, h("thead", null, h("tr", null, [...Array(7).keys()].map(index => (h("th", { scope: "col", abbr: this.dayStrings[index] }, this.dayAbbrStrings[index]))))), h("tbody", { onClick: this.onDateSelection, onKeyDown: this.onDateKeydown, ref: elm => (this.calendarBody = elm), "test-id": "calendarTableBody" }, this.currentWeeks.map(week => (h("tr", null, week.map(day => {
|
|
3687
|
+
return (h("table", { role: "grid", "aria-labelledby": "table-label" }, h("thead", null, h("tr", null, [...Array(7).keys()].map(index => (h("th", { scope: "col", "aria-label": this.dayStrings[index] }, this.dayAbbrStrings[index]))))), h("tbody", { onClick: this.onDateSelection, onKeyDown: this.onDateKeydown, ref: elm => (this.calendarBody = elm), "test-id": "calendarTableBody" }, this.currentWeeks.map(week => (h("tr", null, week.map(day => {
|
|
3647
3688
|
var _a;
|
|
3648
|
-
let ariaLabel =
|
|
3689
|
+
let ariaLabel = '';
|
|
3690
|
+
if (day.isToday)
|
|
3691
|
+
ariaLabel = `${loc('tecton.element.calendar.today')}, `;
|
|
3692
|
+
ariaLabel += formatDateFull(day.date);
|
|
3649
3693
|
if (day.isSelected)
|
|
3650
3694
|
ariaLabel += ` (${loc('tecton.element.calendar.selected')})`;
|
|
3651
|
-
return (h("td", { class: day.classList, "aria-hidden": day.isEmpty ? 'true' : undefined, tabindex: day.isSelected ? 0 : -1, role: day.isSelected ? 'gridcell' : undefined, "aria-selected": day.isSelected ? 'true' : undefined, "aria-disabled": day.isValid ? undefined : 'true', "data-day": day.integer || undefined, "data-date": day.date ? formatDateISO(day.date) : undefined }, (day === null || day === void 0 ? void 0 : day.isToday) && (h("div", { class: "today-decorator" }, loc('tecton.element.calendar.today'))), h("div", { "aria-label": ariaLabel }, (_a = day === null || day === void 0 ? void 0 : day.integer) !== null && _a !== void 0 ? _a : '')));
|
|
3695
|
+
return (h("td", { class: day.classList, "aria-hidden": day.isEmpty ? 'true' : undefined, tabindex: day.isSelected ? 0 : -1, role: day.isSelected ? 'gridcell' : undefined, "aria-selected": day.isSelected ? 'true' : undefined, "aria-disabled": day.isValid ? undefined : 'true', "data-day": day.integer || undefined, "data-date": day.date ? formatDateISO(day.date) : undefined }, (day === null || day === void 0 ? void 0 : day.isToday) && (h("div", { class: "today-decorator", "aria-hidden": "true" }, loc('tecton.element.calendar.today'))), h("div", { "aria-label": ariaLabel }, (_a = day === null || day === void 0 ? void 0 : day.integer) !== null && _a !== void 0 ? _a : '')));
|
|
3652
3696
|
})))))));
|
|
3653
3697
|
}
|
|
3654
3698
|
get hostElement() { return this; }
|
|
3655
3699
|
static get watchers() { return {
|
|
3700
|
+
"popDirection": ["popDirectionHandler"],
|
|
3656
3701
|
"ariaLabel": ["ariaLabelObserver"],
|
|
3702
|
+
"typeable": ["typeableChanged"],
|
|
3657
3703
|
"value": ["valueObserver"],
|
|
3658
3704
|
"daysOfWeekChecksum": ["daysOfWeekChecksumObserver"],
|
|
3659
3705
|
"validDates": ["validDatesObserver"],
|
|
@@ -3671,6 +3717,7 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3671
3717
|
"disabled": [516],
|
|
3672
3718
|
"readonly": [516],
|
|
3673
3719
|
"invalid": [1540],
|
|
3720
|
+
"open": [1540],
|
|
3674
3721
|
"typeable": [516],
|
|
3675
3722
|
"clearable": [516],
|
|
3676
3723
|
"placeholder": [513],
|
|
@@ -3682,26 +3729,27 @@ const Q2Calendar$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
3682
3729
|
"endDate": [513, "end-date"],
|
|
3683
3730
|
"cutoffTime": [513, "cutoff-time"],
|
|
3684
3731
|
"daysOfWeekChecksum": [514, "days-of-week-checksum"],
|
|
3685
|
-
"popDirection": [513, "pop-direction"],
|
|
3686
3732
|
"assume": [513],
|
|
3687
3733
|
"errors": [1040],
|
|
3688
3734
|
"invalidDates": [16],
|
|
3689
3735
|
"validDates": [16],
|
|
3736
|
+
"popoverDirection": [1025, "popover-direction"],
|
|
3737
|
+
"popoverMinHeight": [2, "popover-min-height"],
|
|
3738
|
+
"popDirection": [513, "pop-direction"],
|
|
3690
3739
|
"onsuccess": [16],
|
|
3691
3740
|
"buttonLabel": [513, "button-label"],
|
|
3692
|
-
"ariaLabel": [
|
|
3693
|
-
"dropdownOpen": [32],
|
|
3741
|
+
"ariaLabel": [1537, "aria-label"],
|
|
3694
3742
|
"keyboardSelection": [32],
|
|
3695
3743
|
"typedValue": [32],
|
|
3696
3744
|
"dateList": [32],
|
|
3697
3745
|
"hintMessage": [32],
|
|
3698
3746
|
"hintMessageType": [32]
|
|
3699
|
-
}, [[0, "change", "defaultChangeHandler"], [0, "error", "defaultErrorHandler"], [0, "success", "defaultSuccessHandler"], [0, "focus", "delegateFocus"], [0, "clear", "handleClear"]]]);
|
|
3747
|
+
}, [[0, "change", "defaultChangeHandler"], [0, "error", "defaultErrorHandler"], [0, "success", "defaultSuccessHandler"], [0, "focus", "delegateFocus"], [0, "clear", "handleClear"], [0, "popoverStateChanged", "popoverStateHandler"]]]);
|
|
3700
3748
|
function defineCustomElement$1() {
|
|
3701
3749
|
if (typeof customElements === "undefined") {
|
|
3702
3750
|
return;
|
|
3703
3751
|
}
|
|
3704
|
-
const components = ["q2-calendar", "click-elsewhere", "q2-badge", "q2-btn", "q2-icon", "q2-input", "q2-loading", "q2-message"];
|
|
3752
|
+
const components = ["q2-calendar", "click-elsewhere", "q2-badge", "q2-btn", "q2-icon", "q2-input", "q2-loading", "q2-message", "q2-popover"];
|
|
3705
3753
|
components.forEach(tagName => { switch (tagName) {
|
|
3706
3754
|
case "q2-calendar":
|
|
3707
3755
|
if (!customElements.get(tagName)) {
|
|
@@ -3710,35 +3758,40 @@ function defineCustomElement$1() {
|
|
|
3710
3758
|
break;
|
|
3711
3759
|
case "click-elsewhere":
|
|
3712
3760
|
if (!customElements.get(tagName)) {
|
|
3713
|
-
defineCustomElement$
|
|
3761
|
+
defineCustomElement$9();
|
|
3714
3762
|
}
|
|
3715
3763
|
break;
|
|
3716
3764
|
case "q2-badge":
|
|
3717
3765
|
if (!customElements.get(tagName)) {
|
|
3718
|
-
defineCustomElement$
|
|
3766
|
+
defineCustomElement$8();
|
|
3719
3767
|
}
|
|
3720
3768
|
break;
|
|
3721
3769
|
case "q2-btn":
|
|
3722
3770
|
if (!customElements.get(tagName)) {
|
|
3723
|
-
defineCustomElement$
|
|
3771
|
+
defineCustomElement$7();
|
|
3724
3772
|
}
|
|
3725
3773
|
break;
|
|
3726
3774
|
case "q2-icon":
|
|
3727
3775
|
if (!customElements.get(tagName)) {
|
|
3728
|
-
defineCustomElement$
|
|
3776
|
+
defineCustomElement$6();
|
|
3729
3777
|
}
|
|
3730
3778
|
break;
|
|
3731
3779
|
case "q2-input":
|
|
3732
3780
|
if (!customElements.get(tagName)) {
|
|
3733
|
-
defineCustomElement$
|
|
3781
|
+
defineCustomElement$5();
|
|
3734
3782
|
}
|
|
3735
3783
|
break;
|
|
3736
3784
|
case "q2-loading":
|
|
3737
3785
|
if (!customElements.get(tagName)) {
|
|
3738
|
-
defineCustomElement$
|
|
3786
|
+
defineCustomElement$4();
|
|
3739
3787
|
}
|
|
3740
3788
|
break;
|
|
3741
3789
|
case "q2-message":
|
|
3790
|
+
if (!customElements.get(tagName)) {
|
|
3791
|
+
defineCustomElement$3();
|
|
3792
|
+
}
|
|
3793
|
+
break;
|
|
3794
|
+
case "q2-popover":
|
|
3742
3795
|
if (!customElements.get(tagName)) {
|
|
3743
3796
|
defineCustomElement$2();
|
|
3744
3797
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { c as isTouchDevice, o as overrideFocus, a as isEventFromElement } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$3 } from './index3.js';
|
|
4
4
|
import { d as defineCustomElement$2 } from './index7.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement as HTMLElement$1, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { d as createGuid, l as loc, h as handleAriaLabel, a as isEventFromElement, o as overrideFocus } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$4 } from './index5.js';
|
|
4
4
|
import { d as defineCustomElement$3 } from './index7.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './index9.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { d as createGuid, l as loc } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './index7.js';
|
|
4
4
|
|
|
5
5
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{margin-top:var(--tct-scale-2, var(--app-scale-2x, 10px))}fieldset{padding:var(--tct-input-error-padding, 0);margin:0;border:0}fieldset.has-error{border-color:var(--tct-input-error-border-color, var(--const-stoplight-alert, #c30000));border-width:1px;border-style:solid;border-radius:var(--tct-border-radius-1, var(--app-border-radius-1, 2px));position:relative}fieldset.has-error .error-icon-container{top:8px;right:8px;position:absolute;width:40%;text-align:right;background:linear-gradient(to right, var(--tct-checkbox-group-error-gradient-start, var(--t-base-a0, rgba(255, 255, 255, 0))), var(--tct-checkbox-group-error-gradient-end, var(--t-base, white)))}fieldset.has-error legend+div.error-icon-container.no-label{top:28px}.group-legend{font-weight:600}legend.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;border:0}.optional-tag{margin-left:var(--tct-input-label-optional-margin-left, var(--tct-scale-1, var(--app-scale-1x, 5px)));color:var(--tct-input-label-optional-font-color, var(--tct-a11y-color, var(--t-a11y-gray-color, var(--tct-gray-7, var(--t-gray-7, var(--tct-gray-d1, var(--app-gray-d1, #666666)))))));font-size:var(--tct-input-label-optional-font-size, 12px);font-weight:var(--tct-input-label-optional-font-weight, 400)}.flexed{margin:0;display:flex;flex-wrap:wrap;align-items:center;justify-content:center}.flexed.left{justify-content:left}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
2
|
+
import { d as createGuid, h as handleAriaLabel, o as overrideFocus, a as isEventFromElement, l as loc } from './index15.js';
|
|
3
3
|
import { d as defineCustomElement$2 } from './index7.js';
|
|
4
4
|
|
|
5
5
|
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;position:relative;padding:var(--tct-checkbox-vertical-padding, var(--t-checkbox-vertical-padding, var(--tct-scale-2, var(--app-scale-2x, 10px)))) 0}.container{--comp-checkbox-size:var(--tct-checkbox-size, var(--t-checkbox-size, 20px));--comp-checkbox-default-column-gap:var(--app-scale-2x, 10px);--comp-checkbox-default-row-gap:0;--comp-checkbox-default-gap:var(--comp-checkbox-default-row-gap) var(--comp-checkbox-default-column-gap);--comp-checkbox-tween:var(--tct-tween-1, var(--app-tween-1, 0.2s ease));--comp-checkbox-toggle-width:var(--tct-checkbox-toggle-width, var(--t-checkbox-toggle-width, 46px));--comp-checkbox-gap:var(--tct-checkbox-gap, var(--t-checkbox-gap, var(--comp-checkbox-default-gap)));--comp-checkbox-outer-stroke-color:var(--tct-checkbox-outer-stroke-color, var(--t-checkbox-outer-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-outer-fill-color:var(--tct-checkbox-outer-fill-color, var(--t-checkbox-outer-fill-color, var(--tct-white, var(--app-white, #ffffff))));--comp-checkbox-checked-color:var(--tct-checkbox-check-stroke-color, var(--t-checkbox-check-stroke-color, var(--t-checkbox-fill, var(--t-a11y-active-gray-color-AA, #404040))));--comp-control-width:var(--comp-checkbox-size);display:grid;grid-template-areas:\"svg label\" \"svg description\";align-items:center;gap:var(--comp-checkbox-gap);grid-template-columns:var(--comp-control-width) calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap))}:host([type=favorite]) .container{--comp-checkbox-favorite-stroke-color:var(--tct-checkbox-favorite-stroke-color, var(--t-checkbox-favorite-stroke-color, var(--t-a11y-gray-color-AA, #949494)));--comp-checkbox-favorite-fill-color:var(--tct-checkbox-favorite-fill-color, var(--t-checkbox-favorite-fill-color, #db7d24))}:host([type=toggle]) .container{--comp-control-width:var(--comp-checkbox-toggle-width)}:host([alignment=right]) .container,:host([type=toggle]:not([alignment])) .container{grid-template-areas:\"label svg\" \"description svg\";grid-template-columns:calc(100% - var(--comp-control-width) - var(--comp-checkbox-default-column-gap)) var(--comp-control-width)}.label-control{align-items:center;display:flex}.label-text{grid-area:label}:host([description]) .label-text{font-weight:var(--tct-checkbox-label-font-weight, var(--t-checkbox-label-font-weight, 600))}:host([checked]) .label-text{font-weight:var(--tct-checkbox-checked-label-font-weight, var(--t-checkbox-checked-label-font-weight, 600))}.description-text{grid-area:description;font-weight:var(--tct-checkbox-description-font-weight, var(--t-checkbox-description-font-weight, 400))}label{color:var(--tct-checkbox-label-color);cursor:pointer}:host([disabled]:not([disabled=false])),:host([group-disabled]){opacity:var(--tct-checkbox-disabled-opacity, var(--t-checkbox-disabled-opacity, var(--tct-disabled-opacity, var(--app-disabled-opacity, 0.4))))}:host([disabled]:not([disabled=false])) label,:host([group-disabled]) label{cursor:not-allowed}.checkbox-icon{--t-icon-stroke-primary:var(--comp-checkbox-outer-stroke-color);width:var(--comp-checkbox-size);height:var(--comp-checkbox-size);border-radius:var(--tct-checkbox-outer-border-radius, var(--t-checkbox-outer-border-radius, var(--tct-border-radius-1, var(--app-border-radius-1, 3px))));stroke:var(--comp-checkbox-outer-stroke-color);color:var(--comp-checkbox-outer-stroke-color);stroke-width:var(--tct-checkbox-outer-stroke-width, var(--t-checkbox-outer-stroke-width, 2));fill:var(--comp-checkbox-outer-fill-color);flex-shrink:0}:host([checked]) .checkbox-icon{fill:var(--tct-checkbox-checked-outer-fill-color, var(--t-checkbox-checked-outer-fill-color, var(--comp-checkbox-outer-fill-color)));stroke:var(--tct-checkbox-checked-outer-stroke-color, var(--t-checkbox-checked-outer-stroke-color, var(--comp-checkbox-outer-stroke-color)))}:host(:focus-within) .checkbox-icon{box-shadow:var(--const-double-focus-ring), var(--tct-global-focus, 0 0 0 2px #33b4ff);stroke:var(--tct-checkbox-focused-outer-stroke-color, var(--t-checkbox-focused-outer-stroke-color, var(--comp-checkbox-checked-color)))}:host([type=favorite]) .checkbox-icon{--tct-icon-stroke-width:var(--tct-checkbox-favorite-stroke-width, var(--t-checkbox-favorite-stroke-width, 1));--tct-icon-stroke-primary:var(--comp-checkbox-favorite-stroke-color);transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host([type=favorite]:focus-within) .checkbox-icon,:host([type=favorite]:hover) .checkbox-icon{--tct-icon-stroke-primary:var(--comp-checkbox-favorite-fill-color);--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}:host([checked][type=favorite]) .checkbox-icon{--tct-icon-stroke-primary:var(--comp-checkbox-favorite-fill-color);fill:var(--comp-checkbox-favorite-fill-color);transition:fill var(--comp-checkbox-tween), color var(--comp-checkbox-tween), stroke var(--comp-checkbox-tween)}:host([checked][type=favorite]:focus-within) .checkbox-icon,:host([checked][type=favorite]:hover) .checkbox-icon{--tct-icon-stroke-primary:var(--comp-checkbox-favorite-stroke-color);--tct-icon-fill-primary:var(--comp-checkbox-favorite-fill-color);--tct-icon-stroke-width:var(--tct-checkbox-favorite-hover-stroke-width, var(--t-checkbox-favorite-hover-stroke-width, 2))}.checkbox-fill{stroke:var(--comp-checkbox-checked-color)}.checked-fill{stroke-width:var(--tct-checkbox-check-stroke-width, var(--t-checkbox-check-stroke-width, 2.5));stroke-linecap:round;stroke-linejoin:round}:host([type=toggle]) .checked-fill{stroke:var(--tct-checkbox-toggle-icon-stroke, var(--t-checkbox-toggle-icon-stroke, var(--tct-white, var(--app-white, #ffffff))));transition:opacity var(--comp-checkbox-tween)}:host([type=toggle][checked]) .checked-fill{stroke:var(--tct-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-toggle-checked-icon-stroke, var(--t-checkbox-text, var(--tct-white, var(--app-white, #ffffff)))))}.indeterminate-fill{stroke-width:var(--tct-checkbox-indeterminate-stroke-width, var(--t-checkbox-indeterminate-stroke-width, 3.5))}.toggle-svg{height:30px;width:var(--comp-checkbox-toggle-width);position:relative;text-align:initial}.toggle-track,.toggle-indicator{position:absolute;top:50%;transform:translateY(-50%)}.toggle-track{fill:var(--tct-checkbox-toggle-track-color, var(--t-checkbox-toggle-track-color, var(--tct-gray-11, var(--t-gray-11, var(--tct-gray-l1, var(--app-gray-l1, #cccccc))))));height:14px;width:46px}:host([checked]) .toggle-track{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));opacity:0.5}.toggle-indicator{transition:left var(--comp-checkbox-tween);height:30px;width:30px;left:0;border-radius:50%}:host([checked]) .toggle-indicator{left:21px}.toggle-circle{fill:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([checked]) .toggle-circle{fill:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)))}:host(:focus-within) .toggle-circle{stroke:var(--tct-checkbox-toggle-checked-color, var(--t-checkbox-toggle-checked-color, var(--comp-checkbox-checked-color)));stroke-width:10px;stroke-opacity:0.5}:host(:not([checked]):focus-within) .toggle-circle{stroke:var(--tct-checkbox-toggle-circle-color, var(--t-checkbox-toggle-circle-color, var(--t-a11y-gray-color-AA, #949494)))}:host([checked]) .off,:host(:not([checked])) .on{opacity:0}";
|