@sebgroup/green-core 1.18.1 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/{chunk.IQE6F4ZC.js → chunk.2RF5VP6K.js} +10 -24
- package/chunks/{chunk.7ZCWP4FY.js → chunk.3KJV6CHY.js} +2 -2
- package/chunks/{chunk.TN6ZYAH3.js → chunk.3RYYLMGT.js} +1 -1
- package/chunks/{chunk.ZEJDA4NS.js → chunk.5PHLJFEX.js} +4 -8
- package/chunks/{chunk.IYCENQZG.js → chunk.6LA2CKUM.js} +1 -1
- package/chunks/{chunk.WDJWH2TN.js → chunk.A62LO4CP.js} +1 -1
- package/chunks/{chunk.CHEU4C5J.js → chunk.BJCCPLEO.js} +2 -2
- package/chunks/{chunk.2Y3BHFKO.js → chunk.BKSMVF4C.js} +9 -1
- package/chunks/chunk.C3ECHGX7.js +31 -0
- package/chunks/{chunk.WEE5C637.js → chunk.CGZNEIGV.js} +6 -10
- package/chunks/{chunk.XXIQLCV7.js → chunk.CH2GIVY6.js} +41 -45
- package/chunks/{chunk.Q6AEDXQF.js → chunk.CUR4WRCG.js} +20 -24
- package/chunks/{chunk.URP77GWW.js → chunk.EC77QYRA.js} +3 -8
- package/chunks/{chunk.2LQSDOD4.js → chunk.EM7MZKG5.js} +12 -5
- package/chunks/{chunk.6L4FAOI6.js → chunk.GOOHCUU6.js} +16 -11
- package/chunks/{chunk.6NM7ENKA.js → chunk.KBYQYDL3.js} +4 -1
- package/chunks/chunk.MURVRI5G.js +0 -0
- package/chunks/{chunk.XMPBXAGB.js → chunk.NBEFLQNK.js} +0 -1
- package/chunks/{chunk.MVCYVB3S.js → chunk.NRYXPR4Z.js} +4 -7
- package/chunks/{chunk.DBTRYFAB.js → chunk.NYOCHFZE.js} +5 -8
- package/chunks/{chunk.I2IU2N5F.js → chunk.PE6MD3MB.js} +3 -7
- package/chunks/{chunk.VDWYFSGX.js → chunk.RSCI4LL2.js} +5 -9
- package/chunks/chunk.TJA7LL3V.js +0 -0
- package/chunks/chunk.V7ZQ5N3U.js +0 -0
- package/chunks/{chunk.ETETI45J.js → chunk.VHKGMBUL.js} +3 -3
- package/chunks/chunk.VHN4JEZC.js +28 -0
- package/chunks/chunk.VOYMQ322.js +1 -1
- package/chunks/{chunk.3CAFC46K.js → chunk.W2XAWNZY.js} +4 -4
- package/chunks/chunk.W7CV3QYI.js +105 -0
- package/chunks/{chunk.YIQIH4RW.js → chunk.XOARVFGN.js} +1 -1
- package/chunks/chunk.Y42J4CV3.js +86 -0
- package/chunks/chunk.YBOK7MI7.js +31 -0
- package/chunks/chunk.YDYO7HP5.js +196 -0
- package/chunks/chunk.YEV6STTM.js +201 -0
- package/chunks/{chunk.H7YA5KO4.js → chunk.Z5NACNXH.js} +7 -23
- package/chunks/{chunk.XQ3SZZAO.js → chunk.ZLWSCK7R.js} +174 -119
- package/components/badge/badge.js +1 -1
- package/components/button/button.js +10 -9
- package/components/button/button.trans.styles.js +2 -1
- package/components/button/index.js +11 -9
- package/components/checkbox/checkbox.js +1 -1
- package/components/context-menu/context-menu.d.ts +0 -1
- package/components/context-menu/context-menu.js +9 -9
- package/components/context-menu/context-menu.trans.styles.js +2 -1
- package/components/context-menu/index.js +10 -10
- package/components/datepicker/date-part-spinner.js +1 -1
- package/components/datepicker/datepicker.d.ts +0 -1
- package/components/datepicker/datepicker.js +14 -13
- package/components/datepicker/datepicker.trans.styles.js +2 -1
- package/components/datepicker/index.js +14 -13
- package/components/dropdown/dropdown.d.ts +0 -1
- package/components/dropdown/dropdown.js +10 -10
- package/components/dropdown/dropdown.trans.styles.js +2 -1
- package/components/dropdown/index.js +11 -11
- package/components/filter-chips/filter-chip/filter-chip.d.ts +22 -0
- package/components/filter-chips/filter-chip/filter-chip.js +24 -0
- package/components/filter-chips/filter-chip/filter-chip.styles.d.ts +1 -0
- package/components/filter-chips/filter-chip/filter-chip.trans.styles.d.ts +2 -0
- package/components/filter-chips/filter-chip/filter-chip.trans.styles.js +11 -0
- package/components/filter-chips/filter-chip/index.d.ts +1 -0
- package/components/filter-chips/filter-chip/index.js +25 -0
- package/components/filter-chips/filter-chips.d.ts +36 -0
- package/components/filter-chips/filter-chips.js +28 -0
- package/components/filter-chips/filter-chips.styles.d.ts +1 -0
- package/components/filter-chips/filter-chips.trans.styles.d.ts +2 -0
- package/components/filter-chips/filter-chips.trans.styles.js +11 -0
- package/components/filter-chips/index.d.ts +2 -0
- package/components/filter-chips/index.js +32 -0
- package/components/form-control.js +4 -3
- package/components/grid/grid.d.ts +5 -12
- package/components/grid/grid.js +6 -3
- package/components/grid/grid.style.css.js +1 -1
- package/components/grid/index.js +6 -3
- package/components/grouped-list/grouped-list.d.ts +0 -1
- package/components/grouped-list/grouped-list.js +6 -6
- package/components/grouped-list/grouped-list.trans.styles.js +2 -1
- package/components/grouped-list/index.js +6 -6
- package/components/grouped-list/list-item.js +3 -2
- package/components/icon/icon.js +3 -2
- package/components/icon/index.js +4 -2
- package/components/index.d.ts +1 -0
- package/components/index.js +47 -32
- package/components/input/input.js +15 -39
- package/components/radio/radio-group.js +2 -2
- package/components/radio/radio.js +2 -2
- package/components/segmented-control/index.js +8 -7
- package/components/segmented-control/segment/index.js +5 -5
- package/components/segmented-control/segment/segment.js +5 -5
- package/components/segmented-control/segment/segment.trans.styles.js +2 -1
- package/components/segmented-control/segmented-control.d.ts +0 -2
- package/components/segmented-control/segmented-control.js +8 -7
- package/components/segmented-control/segmented-control.trans.styles.js +2 -1
- package/components/switch/switch.js +1 -1
- package/components/theme/index.js +4 -4
- package/components/theme/theme.js +4 -4
- package/components/theme/theme.trans.styles.js +3 -2
- package/controllers/dynamic-styles-controller.d.ts +23 -0
- package/dynamic-styles.d.ts +1 -0
- package/gds-element.d.ts +3 -0
- package/index.js +47 -32
- package/package.json +1 -1
- package/primitives/calendar/calendar.d.ts +0 -1
- package/primitives/calendar/calendar.js +5 -5
- package/primitives/calendar/index.js +5 -5
- package/primitives/listbox/index.js +6 -6
- package/primitives/listbox/listbox.d.ts +0 -1
- package/primitives/listbox/listbox.js +6 -6
- package/primitives/listbox/option.d.ts +0 -1
- package/primitives/listbox/option.js +5 -5
- package/primitives/menu/index.js +5 -5
- package/primitives/menu/menu-heading.js +4 -4
- package/primitives/menu/menu-item.d.ts +0 -1
- package/primitives/menu/menu-item.js +4 -4
- package/primitives/menu/menu.d.ts +0 -1
- package/primitives/menu/menu.js +5 -5
- package/primitives/popover/index.js +5 -5
- package/primitives/popover/popover.d.ts +0 -1
- package/primitives/popover/popover.js +5 -5
- package/primitives/ripple/index.js +2 -2
- package/primitives/ripple/ripple.js +2 -2
- package/transitional-styles.js +2 -2
- package/utils/decorators/resize-observer.d.ts +15 -0
- package/utils/directives/forward-attributes.d.ts +17 -0
- package/utils/helpers/attribute-converters.d.ts +14 -0
- package/utils/transitional-styles/transitional-styles.d.ts +4 -8
- package/chunks/chunk.X7MGCODG.js +0 -244
- /package/chunks/{chunk.HS7ICQNA.js → chunk.4ZADZSWE.js} +0 -0
- /package/chunks/{chunk.RSZ4ZUN3.js → chunk.JGTSJ4J6.js} +0 -0
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsSegment
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.VHKGMBUL.js";
|
|
4
|
+
import {
|
|
5
|
+
resizeObserver
|
|
6
|
+
} from "./chunk.VHN4JEZC.js";
|
|
4
7
|
import {
|
|
5
8
|
tokens
|
|
6
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.W2XAWNZY.js";
|
|
7
10
|
import {
|
|
8
11
|
TransitionalStyles
|
|
9
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.ZLWSCK7R.js";
|
|
10
13
|
import {
|
|
11
14
|
GdsElement
|
|
12
|
-
} from "./chunk.
|
|
15
|
+
} from "./chunk.EM7MZKG5.js";
|
|
13
16
|
import {
|
|
14
17
|
watch
|
|
15
18
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -128,7 +131,7 @@ var BTN_SIZE = {
|
|
|
128
131
|
medium: 44
|
|
129
132
|
};
|
|
130
133
|
var getSegmentGap = (transitionalStyles) => transitionalStyles ? 0 : 4;
|
|
131
|
-
var _value,
|
|
134
|
+
var _value, _firstVisibleIndex, _calculatedSegmentWidth, _segmentWidth, _segmentsContainerLeft, _focusedIndex, _dragStartX, _dragStartLeft, _isDragging, _startDrag, _drag, _endDrag, _calcVisibleAfterDrag, _calcLayout, _applySegmentsTransform, _handleSlotChange, handleSlotChange_fn, _scrollLeft, _scrollRight, _updateScrollBtnState, _updateIndicator, _handleSegmentClick, _updateSelectedFromValue;
|
|
132
135
|
var GdsSegmentedControl = class extends GdsElement {
|
|
133
136
|
constructor() {
|
|
134
137
|
super(...arguments);
|
|
@@ -138,13 +141,6 @@ var GdsSegmentedControl = class extends GdsElement {
|
|
|
138
141
|
__privateAdd(this, _value, void 0);
|
|
139
142
|
this._showPrevButton = false;
|
|
140
143
|
this._showNextButton = false;
|
|
141
|
-
__privateAdd(this, _tid, void 0);
|
|
142
|
-
__privateAdd(this, _resizeObserver, new ResizeObserver(() => {
|
|
143
|
-
__privateGet(this, _tid) && clearTimeout(__privateGet(this, _tid));
|
|
144
|
-
__privateSet(this, _tid, setTimeout(() => {
|
|
145
|
-
__privateGet(this, _calcLayout).call(this);
|
|
146
|
-
}, 20));
|
|
147
|
-
}));
|
|
148
144
|
__privateAdd(this, _firstVisibleIndex, 0);
|
|
149
145
|
__privateAdd(this, _calculatedSegmentWidth, 0);
|
|
150
146
|
__privateAdd(this, _segmentWidth, 0);
|
|
@@ -322,7 +318,6 @@ var GdsSegmentedControl = class extends GdsElement {
|
|
|
322
318
|
connectedCallback() {
|
|
323
319
|
super.connectedCallback();
|
|
324
320
|
TransitionalStyles.instance.apply(this, "gds-segmented-control");
|
|
325
|
-
__privateGet(this, _resizeObserver).observe(this);
|
|
326
321
|
this.addEventListener("focusin", (e) => {
|
|
327
322
|
if (e.target instanceof GdsSegment) {
|
|
328
323
|
__privateSet(this, _focusedIndex, this.segments.indexOf(e.target));
|
|
@@ -330,13 +325,8 @@ var GdsSegmentedControl = class extends GdsElement {
|
|
|
330
325
|
}
|
|
331
326
|
});
|
|
332
327
|
}
|
|
333
|
-
disconnectedCallback() {
|
|
334
|
-
super.disconnectedCallback();
|
|
335
|
-
__privateGet(this, _resizeObserver).unobserve(this);
|
|
336
|
-
}
|
|
337
328
|
render() {
|
|
338
|
-
return html`${
|
|
339
|
-
${when(
|
|
329
|
+
return html`${when(
|
|
340
330
|
this._showPrevButton,
|
|
341
331
|
() => html`<button
|
|
342
332
|
id="btn-prev"
|
|
@@ -386,8 +376,6 @@ var GdsSegmentedControl = class extends GdsElement {
|
|
|
386
376
|
}
|
|
387
377
|
};
|
|
388
378
|
_value = new WeakMap();
|
|
389
|
-
_tid = new WeakMap();
|
|
390
|
-
_resizeObserver = new WeakMap();
|
|
391
379
|
_firstVisibleIndex = new WeakMap();
|
|
392
380
|
_calculatedSegmentWidth = new WeakMap();
|
|
393
381
|
_segmentWidth = new WeakMap();
|
|
@@ -427,9 +415,6 @@ __decorateClass([
|
|
|
427
415
|
__decorateClass([
|
|
428
416
|
property()
|
|
429
417
|
], GdsSegmentedControl.prototype, "value", 1);
|
|
430
|
-
__decorateClass([
|
|
431
|
-
state()
|
|
432
|
-
], GdsSegmentedControl.prototype, "_tStyles", 2);
|
|
433
418
|
__decorateClass([
|
|
434
419
|
query("slot")
|
|
435
420
|
], GdsSegmentedControl.prototype, "_elSlot", 2);
|
|
@@ -449,6 +434,7 @@ __decorateClass([
|
|
|
449
434
|
state()
|
|
450
435
|
], GdsSegmentedControl.prototype, "_showNextButton", 2);
|
|
451
436
|
__decorateClass([
|
|
437
|
+
resizeObserver(),
|
|
452
438
|
watch("segMinWidth")
|
|
453
439
|
], GdsSegmentedControl.prototype, "_recalculateMinWidth", 1);
|
|
454
440
|
GdsSegmentedControl = __decorateClass([
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk.2ND5EWHE.js";
|
|
5
5
|
import {
|
|
6
6
|
TransitionalStyles
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.ZLWSCK7R.js";
|
|
8
8
|
import {
|
|
9
9
|
GdsElement
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.EM7MZKG5.js";
|
|
11
11
|
import {
|
|
12
12
|
watch
|
|
13
13
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
|
|
25
25
|
// libs/core/src/primitives/listbox/option.ts
|
|
26
26
|
import { html } from "lit";
|
|
27
|
-
import { property
|
|
27
|
+
import { property } from "lit/decorators.js";
|
|
28
28
|
import { when } from "lit/directives/when.js";
|
|
29
29
|
import { classMap } from "lit/directives/class-map.js";
|
|
30
30
|
import "reflect-metadata";
|
|
@@ -88,8 +88,7 @@ var GdsOption = class extends Focusable(GdsElement) {
|
|
|
88
88
|
else
|
|
89
89
|
this.removeAttribute("highlighted");
|
|
90
90
|
}
|
|
91
|
-
return html
|
|
92
|
-
<div>${when(isMultiple, () => checkbox)} <slot></slot></div>`;
|
|
91
|
+
return html`<div>${when(isMultiple, () => checkbox)} <slot></slot></div>`;
|
|
93
92
|
}
|
|
94
93
|
};
|
|
95
94
|
_hidden = new WeakMap();
|
|
@@ -125,9 +124,6 @@ __decorateClass([
|
|
|
125
124
|
__decorateClass([
|
|
126
125
|
property({ type: Boolean, reflect: true })
|
|
127
126
|
], GdsOption.prototype, "isPlaceholder", 2);
|
|
128
|
-
__decorateClass([
|
|
129
|
-
state()
|
|
130
|
-
], GdsOption.prototype, "_tStyles", 2);
|
|
131
127
|
__decorateClass([
|
|
132
128
|
watch("isplaceholder")
|
|
133
129
|
], GdsOption.prototype, "_handlePlaceholderStatusChange", 1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsElement
|
|
3
|
-
} from "./chunk.
|
|
3
|
+
} from "./chunk.EM7MZKG5.js";
|
|
4
4
|
import {
|
|
5
5
|
gdsCustomElement,
|
|
6
6
|
html
|
|
@@ -134,6 +134,14 @@ var GdsIcon = class extends GdsElement {
|
|
|
134
134
|
<line x1="12" y1="9" x2="12" y2="13" />
|
|
135
135
|
<path x1="12" y1="17" x2="12.01" y2="17" />
|
|
136
136
|
</symbol>
|
|
137
|
+
<symbol id="checkmark">
|
|
138
|
+
<path
|
|
139
|
+
d="M2.75 15.0938L9 20.25L21.25 3.75"
|
|
140
|
+
stroke-width="2"
|
|
141
|
+
stroke-linecap="round"
|
|
142
|
+
stroke-linejoin="round"
|
|
143
|
+
/>
|
|
144
|
+
</symbol>
|
|
137
145
|
</svg>
|
|
138
146
|
<svg viewBox="0 0 24 24">
|
|
139
147
|
<use href="#${name}"></use>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// libs/core/src/utils/helpers/attribute-converters.ts
|
|
2
|
+
var dateConverter = {
|
|
3
|
+
fromAttribute(value) {
|
|
4
|
+
return new Date(value);
|
|
5
|
+
},
|
|
6
|
+
toAttribute(value) {
|
|
7
|
+
return value.toISOString();
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var dateArrayConverter = {
|
|
11
|
+
fromAttribute(value) {
|
|
12
|
+
return value.split(",").map((d) => new Date(d.trim()));
|
|
13
|
+
},
|
|
14
|
+
toAttribute(value) {
|
|
15
|
+
return JSON.stringify(value.map((d) => d.toISOString()));
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
var stringArrayConverter = {
|
|
19
|
+
fromAttribute(value) {
|
|
20
|
+
return value.split(",");
|
|
21
|
+
},
|
|
22
|
+
toAttribute(value) {
|
|
23
|
+
return Array.isArray(value) ? value.join(",") : value;
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
dateConverter,
|
|
29
|
+
dateArrayConverter,
|
|
30
|
+
stringArrayConverter
|
|
31
|
+
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GdsFormControlElement
|
|
3
|
-
} from "./chunk.
|
|
4
|
-
import {
|
|
5
|
-
TransitionalStyles
|
|
6
|
-
} from "./chunk.XQ3SZZAO.js";
|
|
3
|
+
} from "./chunk.XOARVFGN.js";
|
|
7
4
|
import {
|
|
8
5
|
observeLightDOM
|
|
9
6
|
} from "./chunk.WM7HBMMV.js";
|
|
7
|
+
import {
|
|
8
|
+
TransitionalStyles
|
|
9
|
+
} from "./chunk.ZLWSCK7R.js";
|
|
10
10
|
import {
|
|
11
11
|
constrainSlots
|
|
12
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.KBYQYDL3.js";
|
|
13
13
|
import {
|
|
14
14
|
watch
|
|
15
15
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk.5VURDMKE.js";
|
|
28
28
|
|
|
29
29
|
// libs/core/src/components/dropdown/dropdown.ts
|
|
30
|
-
import { property, query, queryAsync
|
|
30
|
+
import { property, query, queryAsync } from "lit/decorators.js";
|
|
31
31
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
32
32
|
import { when } from "lit/directives/when.js";
|
|
33
33
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
@@ -199,7 +199,6 @@ var GdsDropdown = class extends GdsFormControlElement {
|
|
|
199
199
|
}
|
|
200
200
|
render() {
|
|
201
201
|
return html`
|
|
202
|
-
${this._tStyles}
|
|
203
202
|
${when(
|
|
204
203
|
this.label && !this.hideLabel,
|
|
205
204
|
() => html`<label for="trigger">${this.label}</label>`
|
|
@@ -382,9 +381,6 @@ __decorateClass([
|
|
|
382
381
|
__decorateClass([
|
|
383
382
|
property({ type: Boolean, attribute: "hide-label" })
|
|
384
383
|
], GdsDropdown.prototype, "hideLabel", 2);
|
|
385
|
-
__decorateClass([
|
|
386
|
-
state()
|
|
387
|
-
], GdsDropdown.prototype, "_tStyles", 2);
|
|
388
384
|
__decorateClass([
|
|
389
385
|
query("#trigger")
|
|
390
386
|
], GdsDropdown.prototype, "_elTriggerBtn", 2);
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
} from "./chunk.375BWME4.js";
|
|
4
4
|
import {
|
|
5
5
|
TransitionalStyles
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.ZLWSCK7R.js";
|
|
7
7
|
import {
|
|
8
8
|
GdsElement
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.EM7MZKG5.js";
|
|
10
10
|
import {
|
|
11
11
|
watch
|
|
12
12
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
import { html } from "lit";
|
|
24
24
|
import { classMap } from "lit/directives/class-map.js";
|
|
25
25
|
import { when } from "lit/directives/when.js";
|
|
26
|
-
import { property, query
|
|
26
|
+
import { property, query } from "lit/decorators.js";
|
|
27
27
|
import { msg } from "@lit/localize";
|
|
28
28
|
import {
|
|
29
29
|
addDays,
|
|
@@ -97,61 +97,60 @@ var GdsCalendar = class extends GdsElement {
|
|
|
97
97
|
}
|
|
98
98
|
render() {
|
|
99
99
|
const currentDate = /* @__PURE__ */ new Date();
|
|
100
|
-
return html
|
|
101
|
-
<
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
${renderMonthGridView(
|
|
100
|
+
return html`<table>
|
|
101
|
+
<thead>
|
|
102
|
+
<tr>
|
|
103
|
+
${when(this.showWeekNumbers, () => html`<th></th>`)}
|
|
104
|
+
<th>${msg("Mon")}</th>
|
|
105
|
+
<th>${msg("Tue")}</th>
|
|
106
|
+
<th>${msg("Wed")}</th>
|
|
107
|
+
<th>${msg("Thu")}</th>
|
|
108
|
+
<th>${msg("Fri")}</th>
|
|
109
|
+
<th>${msg("Sat")}</th>
|
|
110
|
+
<th>${msg("Sun")}</th>
|
|
111
|
+
</tr>
|
|
112
|
+
</thead>
|
|
113
|
+
<tbody>
|
|
114
|
+
${renderMonthGridView(
|
|
116
115
|
this.focusedDate,
|
|
117
116
|
(weeks) => html`
|
|
118
|
-
|
|
117
|
+
${weeks.map(
|
|
119
118
|
(week) => html`
|
|
120
|
-
|
|
121
|
-
|
|
119
|
+
<tr>
|
|
120
|
+
${when(
|
|
122
121
|
this.showWeekNumbers,
|
|
123
122
|
() => html`<td class="week-number">
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
${getWeek(week.days[0])}
|
|
124
|
+
</td>`
|
|
126
125
|
)}
|
|
127
|
-
|
|
126
|
+
${week.days.map((day) => {
|
|
128
127
|
const isOutsideCurrentMonth = !isSameMonth(this.focusedDate, day) || day < this.min || day > this.max;
|
|
129
128
|
const isWeekend = day.getDay() === 0 || day.getDay() === 6;
|
|
130
129
|
const isDisabled = isOutsideCurrentMonth || this.disabledWeekends && isWeekend || this.disabledDates && this.disabledDates.some((d) => isSameDay(d, day));
|
|
131
130
|
return html`
|
|
132
|
-
|
|
133
|
-
|
|
131
|
+
<td
|
|
132
|
+
class="${classMap({
|
|
134
133
|
disabled: Boolean(isDisabled),
|
|
135
134
|
today: isSameDay(currentDate, day)
|
|
136
135
|
})}"
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
136
|
+
?disabled=${isDisabled}
|
|
137
|
+
tabindex="${isSameDay(this.focusedDate, day) ? 0 : -1}"
|
|
138
|
+
aria-selected="${this.value && isSameDay(this.value, day)}"
|
|
139
|
+
aria-label="${day.toDateString()}"
|
|
140
|
+
@click=${() => isDisabled ? null : __privateMethod(this, _setSelectedDate, setSelectedDate_fn).call(this, day)}
|
|
141
|
+
id="dateCell-${day.getDate()}"
|
|
142
|
+
>
|
|
143
|
+
${day.getDate()}
|
|
144
|
+
</td>
|
|
145
|
+
`;
|
|
147
146
|
})}
|
|
148
|
-
|
|
149
|
-
|
|
147
|
+
</tr>
|
|
148
|
+
`
|
|
150
149
|
)}
|
|
151
|
-
|
|
150
|
+
`
|
|
152
151
|
)}
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
</tbody>
|
|
153
|
+
</table>`;
|
|
155
154
|
}
|
|
156
155
|
_valueChanged() {
|
|
157
156
|
if (!this.value)
|
|
@@ -259,9 +258,6 @@ __decorateClass([
|
|
|
259
258
|
__decorateClass([
|
|
260
259
|
query('td[tabindex="0"]')
|
|
261
260
|
], GdsCalendar.prototype, "_elFocusedCell", 2);
|
|
262
|
-
__decorateClass([
|
|
263
|
-
state()
|
|
264
|
-
], GdsCalendar.prototype, "_tStyles", 2);
|
|
265
261
|
__decorateClass([
|
|
266
262
|
watch("value")
|
|
267
263
|
], GdsCalendar.prototype, "_valueChanged", 1);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TransitionalStyles
|
|
3
|
-
} from "./chunk.XQ3SZZAO.js";
|
|
4
1
|
import {
|
|
5
2
|
watchMediaQuery
|
|
6
3
|
} from "./chunk.WM7HBMMV.js";
|
|
4
|
+
import {
|
|
5
|
+
TransitionalStyles
|
|
6
|
+
} from "./chunk.ZLWSCK7R.js";
|
|
7
7
|
import {
|
|
8
8
|
GdsElement
|
|
9
|
-
} from "./chunk.
|
|
9
|
+
} from "./chunk.EM7MZKG5.js";
|
|
10
10
|
import {
|
|
11
11
|
watch
|
|
12
12
|
} from "./chunk.2WO4NHJ2.js";
|
|
@@ -195,23 +195,22 @@ var GdsPopover = class extends GdsElement {
|
|
|
195
195
|
__privateMethod(this, _unregisterTriggerEvents, unregisterTriggerEvents_fn).call(this);
|
|
196
196
|
}
|
|
197
197
|
render() {
|
|
198
|
-
return html
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
>
|
|
203
|
-
<
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
>
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
</dialog>`;
|
|
198
|
+
return html`<dialog
|
|
199
|
+
class="${classMap({ "v-kb-visible": this._isVirtKbVisible })}"
|
|
200
|
+
${ref(__privateGet(this, _dialogElementRef))}
|
|
201
|
+
>
|
|
202
|
+
<header>
|
|
203
|
+
<h2>${this.label}</h2>
|
|
204
|
+
<button
|
|
205
|
+
class="close"
|
|
206
|
+
@click=${__privateGet(this, _handleCloseButton)}
|
|
207
|
+
aria-label="${msg("Close")}"
|
|
208
|
+
>
|
|
209
|
+
<i></i>
|
|
210
|
+
</button>
|
|
211
|
+
</header>
|
|
212
|
+
<slot></slot>
|
|
213
|
+
</dialog>`;
|
|
215
214
|
}
|
|
216
215
|
_handleOpenChange() {
|
|
217
216
|
this.setAttribute("aria-hidden", String(!this.open));
|
|
@@ -342,9 +341,6 @@ __decorateClass([
|
|
|
342
341
|
__decorateClass([
|
|
343
342
|
watch("_trigger")
|
|
344
343
|
], GdsPopover.prototype, "_handleTriggerChanged", 1);
|
|
345
|
-
__decorateClass([
|
|
346
|
-
state()
|
|
347
|
-
], GdsPopover.prototype, "_tStyles", 2);
|
|
348
344
|
__decorateClass([
|
|
349
345
|
watch("open")
|
|
350
346
|
], GdsPopover.prototype, "_handleOpenChange", 1);
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk.2ND5EWHE.js";
|
|
5
5
|
import {
|
|
6
6
|
TransitionalStyles
|
|
7
|
-
} from "./chunk.
|
|
7
|
+
} from "./chunk.ZLWSCK7R.js";
|
|
8
8
|
import {
|
|
9
9
|
GdsElement
|
|
10
|
-
} from "./chunk.
|
|
10
|
+
} from "./chunk.EM7MZKG5.js";
|
|
11
11
|
import {
|
|
12
12
|
gdsCustomElement,
|
|
13
13
|
html
|
|
@@ -19,7 +19,6 @@ import {
|
|
|
19
19
|
} from "./chunk.5VURDMKE.js";
|
|
20
20
|
|
|
21
21
|
// libs/core/src/primitives/menu/menu-item.ts
|
|
22
|
-
import { state } from "lit/decorators.js";
|
|
23
22
|
var _handleOnClick;
|
|
24
23
|
var GdsMenuItem = class extends Focusable(GdsElement) {
|
|
25
24
|
constructor() {
|
|
@@ -46,15 +45,11 @@ var GdsMenuItem = class extends Focusable(GdsElement) {
|
|
|
46
45
|
TransitionalStyles.instance.apply(this, "gds-option");
|
|
47
46
|
}
|
|
48
47
|
render() {
|
|
49
|
-
return html
|
|
50
|
-
<div><slot></slot></div>`;
|
|
48
|
+
return html`<div><slot></slot></div>`;
|
|
51
49
|
}
|
|
52
50
|
};
|
|
53
51
|
_handleOnClick = new WeakMap();
|
|
54
52
|
GdsMenuItem.styles = [option_styles_default];
|
|
55
|
-
__decorateClass([
|
|
56
|
-
state()
|
|
57
|
-
], GdsMenuItem.prototype, "_tStyles", 2);
|
|
58
53
|
GdsMenuItem = __decorateClass([
|
|
59
54
|
gdsCustomElement("gds-menu-item")
|
|
60
55
|
], GdsMenuItem);
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DynamicStylesController
|
|
3
|
+
} from "./chunk.W7CV3QYI.js";
|
|
1
4
|
import {
|
|
2
5
|
getUnscopedTagName
|
|
3
6
|
} from "./chunk.VOYMQ322.js";
|
|
7
|
+
import {
|
|
8
|
+
__decorateClass
|
|
9
|
+
} from "./chunk.5VURDMKE.js";
|
|
4
10
|
|
|
5
11
|
// libs/core/src/gds-element.ts
|
|
12
|
+
import { state } from "lit/decorators.js";
|
|
6
13
|
import { LitElement } from "lit";
|
|
7
14
|
var GdsElement = class extends LitElement {
|
|
8
15
|
constructor() {
|
|
9
|
-
super(
|
|
16
|
+
super();
|
|
10
17
|
/**
|
|
11
18
|
* The unscoped name of this element.
|
|
12
19
|
*/
|
|
13
20
|
this.gdsElementName = "";
|
|
14
|
-
/**
|
|
15
|
-
* Whether the element is using transitional styles.
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
21
|
this._isUsingTransitionalStyles = false;
|
|
22
|
+
this._dynamicStylesController = new DynamicStylesController(this);
|
|
19
23
|
}
|
|
20
24
|
connectedCallback() {
|
|
21
25
|
super.connectedCallback();
|
|
@@ -23,6 +27,9 @@ var GdsElement = class extends LitElement {
|
|
|
23
27
|
this.setAttribute("gds-element", this.gdsElementName);
|
|
24
28
|
}
|
|
25
29
|
};
|
|
30
|
+
__decorateClass([
|
|
31
|
+
state()
|
|
32
|
+
], GdsElement.prototype, "_isUsingTransitionalStyles", 2);
|
|
26
33
|
|
|
27
34
|
export {
|
|
28
35
|
GdsElement
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk.
|
|
2
|
+
forwardAttributes
|
|
3
|
+
} from "./chunk.YBOK7MI7.js";
|
|
4
4
|
import {
|
|
5
5
|
tokens
|
|
6
|
-
} from "./chunk.
|
|
6
|
+
} from "./chunk.W2XAWNZY.js";
|
|
7
|
+
import {
|
|
8
|
+
GdsFormControlElement
|
|
9
|
+
} from "./chunk.XOARVFGN.js";
|
|
7
10
|
import {
|
|
8
11
|
TransitionalStyles
|
|
9
|
-
} from "./chunk.
|
|
12
|
+
} from "./chunk.ZLWSCK7R.js";
|
|
10
13
|
import {
|
|
11
14
|
constrainSlots
|
|
12
|
-
} from "./chunk.
|
|
15
|
+
} from "./chunk.KBYQYDL3.js";
|
|
13
16
|
import {
|
|
14
17
|
gdsCustomElement,
|
|
15
18
|
html
|
|
@@ -22,7 +25,7 @@ import {
|
|
|
22
25
|
} from "./chunk.5VURDMKE.js";
|
|
23
26
|
|
|
24
27
|
// libs/core/src/components/button/button.ts
|
|
25
|
-
import { unsafeCSS } from "lit";
|
|
28
|
+
import { nothing, unsafeCSS } from "lit";
|
|
26
29
|
import { property, query } from "lit/decorators.js";
|
|
27
30
|
import { when } from "lit/directives/when.js";
|
|
28
31
|
import { classMap } from "lit/directives/class-map.js";
|
|
@@ -393,6 +396,7 @@ var GdsButton = class extends GdsFormControlElement {
|
|
|
393
396
|
}
|
|
394
397
|
connectedCallback() {
|
|
395
398
|
super.connectedCallback();
|
|
399
|
+
this.setAttribute("role", "none");
|
|
396
400
|
TransitionalStyles.instance.apply(this, "gds-button");
|
|
397
401
|
}
|
|
398
402
|
render() {
|
|
@@ -413,13 +417,14 @@ var GdsButton = class extends GdsFormControlElement {
|
|
|
413
417
|
?type="${this.type}"
|
|
414
418
|
?disabled="${this.disabled}"
|
|
415
419
|
@click="${__privateGet(this, _handleClick)}"
|
|
416
|
-
aria-label
|
|
420
|
+
aria-label=${this.label || nothing}
|
|
421
|
+
part="_button"
|
|
422
|
+
${forwardAttributes(
|
|
423
|
+
(attr) => attr.name.startsWith("gds-aria") || attr.name === "gds-role"
|
|
424
|
+
)}
|
|
417
425
|
>
|
|
418
426
|
<slot name="lead" gds-allow="gds-icon"></slot>
|
|
419
|
-
<slot
|
|
420
|
-
@slotchange=${__privateGet(this, _mainSlotChange)}
|
|
421
|
-
gds-allow="#text gds-icon"
|
|
422
|
-
></slot>
|
|
427
|
+
<slot @slotchange=${__privateGet(this, _mainSlotChange)}></slot>
|
|
423
428
|
<slot name="trail" gds-allow="gds-icon"></slot>
|
|
424
429
|
${when(
|
|
425
430
|
!this._isUsingTransitionalStyles,
|
|
@@ -12,7 +12,10 @@ function constrainSlots(self) {
|
|
|
12
12
|
}
|
|
13
13
|
const constrain = (slot) => {
|
|
14
14
|
var _a2, _b2;
|
|
15
|
-
const allowed =
|
|
15
|
+
const allowed = [
|
|
16
|
+
...((_a2 = slot.getAttribute("gds-allow")) == null ? void 0 : _a2.split(" ")) || [],
|
|
17
|
+
"slot"
|
|
18
|
+
];
|
|
16
19
|
for (const node of Array.from(slot.assignedNodes())) {
|
|
17
20
|
if (!allowed.includes(node.nodeName.toLowerCase())) {
|
|
18
21
|
(_b2 = node.parentNode) == null ? void 0 : _b2.removeChild(node);
|
|
File without changes
|