@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.
Files changed (128) hide show
  1. package/chunks/{chunk.IQE6F4ZC.js → chunk.2RF5VP6K.js} +10 -24
  2. package/chunks/{chunk.7ZCWP4FY.js → chunk.3KJV6CHY.js} +2 -2
  3. package/chunks/{chunk.TN6ZYAH3.js → chunk.3RYYLMGT.js} +1 -1
  4. package/chunks/{chunk.ZEJDA4NS.js → chunk.5PHLJFEX.js} +4 -8
  5. package/chunks/{chunk.IYCENQZG.js → chunk.6LA2CKUM.js} +1 -1
  6. package/chunks/{chunk.WDJWH2TN.js → chunk.A62LO4CP.js} +1 -1
  7. package/chunks/{chunk.CHEU4C5J.js → chunk.BJCCPLEO.js} +2 -2
  8. package/chunks/{chunk.2Y3BHFKO.js → chunk.BKSMVF4C.js} +9 -1
  9. package/chunks/chunk.C3ECHGX7.js +31 -0
  10. package/chunks/{chunk.WEE5C637.js → chunk.CGZNEIGV.js} +6 -10
  11. package/chunks/{chunk.XXIQLCV7.js → chunk.CH2GIVY6.js} +41 -45
  12. package/chunks/{chunk.Q6AEDXQF.js → chunk.CUR4WRCG.js} +20 -24
  13. package/chunks/{chunk.URP77GWW.js → chunk.EC77QYRA.js} +3 -8
  14. package/chunks/{chunk.2LQSDOD4.js → chunk.EM7MZKG5.js} +12 -5
  15. package/chunks/{chunk.6L4FAOI6.js → chunk.GOOHCUU6.js} +16 -11
  16. package/chunks/{chunk.6NM7ENKA.js → chunk.KBYQYDL3.js} +4 -1
  17. package/chunks/chunk.MURVRI5G.js +0 -0
  18. package/chunks/{chunk.XMPBXAGB.js → chunk.NBEFLQNK.js} +0 -1
  19. package/chunks/{chunk.MVCYVB3S.js → chunk.NRYXPR4Z.js} +4 -7
  20. package/chunks/{chunk.DBTRYFAB.js → chunk.NYOCHFZE.js} +5 -8
  21. package/chunks/{chunk.I2IU2N5F.js → chunk.PE6MD3MB.js} +3 -7
  22. package/chunks/{chunk.VDWYFSGX.js → chunk.RSCI4LL2.js} +5 -9
  23. package/chunks/chunk.TJA7LL3V.js +0 -0
  24. package/chunks/chunk.V7ZQ5N3U.js +0 -0
  25. package/chunks/{chunk.ETETI45J.js → chunk.VHKGMBUL.js} +3 -3
  26. package/chunks/chunk.VHN4JEZC.js +28 -0
  27. package/chunks/chunk.VOYMQ322.js +1 -1
  28. package/chunks/{chunk.3CAFC46K.js → chunk.W2XAWNZY.js} +4 -4
  29. package/chunks/chunk.W7CV3QYI.js +105 -0
  30. package/chunks/{chunk.YIQIH4RW.js → chunk.XOARVFGN.js} +1 -1
  31. package/chunks/chunk.Y42J4CV3.js +86 -0
  32. package/chunks/chunk.YBOK7MI7.js +31 -0
  33. package/chunks/chunk.YDYO7HP5.js +196 -0
  34. package/chunks/chunk.YEV6STTM.js +201 -0
  35. package/chunks/{chunk.H7YA5KO4.js → chunk.Z5NACNXH.js} +7 -23
  36. package/chunks/{chunk.XQ3SZZAO.js → chunk.ZLWSCK7R.js} +174 -119
  37. package/components/badge/badge.js +1 -1
  38. package/components/button/button.js +10 -9
  39. package/components/button/button.trans.styles.js +2 -1
  40. package/components/button/index.js +11 -9
  41. package/components/checkbox/checkbox.js +1 -1
  42. package/components/context-menu/context-menu.d.ts +0 -1
  43. package/components/context-menu/context-menu.js +9 -9
  44. package/components/context-menu/context-menu.trans.styles.js +2 -1
  45. package/components/context-menu/index.js +10 -10
  46. package/components/datepicker/date-part-spinner.js +1 -1
  47. package/components/datepicker/datepicker.d.ts +0 -1
  48. package/components/datepicker/datepicker.js +14 -13
  49. package/components/datepicker/datepicker.trans.styles.js +2 -1
  50. package/components/datepicker/index.js +14 -13
  51. package/components/dropdown/dropdown.d.ts +0 -1
  52. package/components/dropdown/dropdown.js +10 -10
  53. package/components/dropdown/dropdown.trans.styles.js +2 -1
  54. package/components/dropdown/index.js +11 -11
  55. package/components/filter-chips/filter-chip/filter-chip.d.ts +22 -0
  56. package/components/filter-chips/filter-chip/filter-chip.js +24 -0
  57. package/components/filter-chips/filter-chip/filter-chip.styles.d.ts +1 -0
  58. package/components/filter-chips/filter-chip/filter-chip.trans.styles.d.ts +2 -0
  59. package/components/filter-chips/filter-chip/filter-chip.trans.styles.js +11 -0
  60. package/components/filter-chips/filter-chip/index.d.ts +1 -0
  61. package/components/filter-chips/filter-chip/index.js +25 -0
  62. package/components/filter-chips/filter-chips.d.ts +36 -0
  63. package/components/filter-chips/filter-chips.js +28 -0
  64. package/components/filter-chips/filter-chips.styles.d.ts +1 -0
  65. package/components/filter-chips/filter-chips.trans.styles.d.ts +2 -0
  66. package/components/filter-chips/filter-chips.trans.styles.js +11 -0
  67. package/components/filter-chips/index.d.ts +2 -0
  68. package/components/filter-chips/index.js +32 -0
  69. package/components/form-control.js +4 -3
  70. package/components/grid/grid.d.ts +5 -12
  71. package/components/grid/grid.js +6 -3
  72. package/components/grid/grid.style.css.js +1 -1
  73. package/components/grid/index.js +6 -3
  74. package/components/grouped-list/grouped-list.d.ts +0 -1
  75. package/components/grouped-list/grouped-list.js +6 -6
  76. package/components/grouped-list/grouped-list.trans.styles.js +2 -1
  77. package/components/grouped-list/index.js +6 -6
  78. package/components/grouped-list/list-item.js +3 -2
  79. package/components/icon/icon.js +3 -2
  80. package/components/icon/index.js +4 -2
  81. package/components/index.d.ts +1 -0
  82. package/components/index.js +47 -32
  83. package/components/input/input.js +15 -39
  84. package/components/radio/radio-group.js +2 -2
  85. package/components/radio/radio.js +2 -2
  86. package/components/segmented-control/index.js +8 -7
  87. package/components/segmented-control/segment/index.js +5 -5
  88. package/components/segmented-control/segment/segment.js +5 -5
  89. package/components/segmented-control/segment/segment.trans.styles.js +2 -1
  90. package/components/segmented-control/segmented-control.d.ts +0 -2
  91. package/components/segmented-control/segmented-control.js +8 -7
  92. package/components/segmented-control/segmented-control.trans.styles.js +2 -1
  93. package/components/switch/switch.js +1 -1
  94. package/components/theme/index.js +4 -4
  95. package/components/theme/theme.js +4 -4
  96. package/components/theme/theme.trans.styles.js +3 -2
  97. package/controllers/dynamic-styles-controller.d.ts +23 -0
  98. package/dynamic-styles.d.ts +1 -0
  99. package/gds-element.d.ts +3 -0
  100. package/index.js +47 -32
  101. package/package.json +1 -1
  102. package/primitives/calendar/calendar.d.ts +0 -1
  103. package/primitives/calendar/calendar.js +5 -5
  104. package/primitives/calendar/index.js +5 -5
  105. package/primitives/listbox/index.js +6 -6
  106. package/primitives/listbox/listbox.d.ts +0 -1
  107. package/primitives/listbox/listbox.js +6 -6
  108. package/primitives/listbox/option.d.ts +0 -1
  109. package/primitives/listbox/option.js +5 -5
  110. package/primitives/menu/index.js +5 -5
  111. package/primitives/menu/menu-heading.js +4 -4
  112. package/primitives/menu/menu-item.d.ts +0 -1
  113. package/primitives/menu/menu-item.js +4 -4
  114. package/primitives/menu/menu.d.ts +0 -1
  115. package/primitives/menu/menu.js +5 -5
  116. package/primitives/popover/index.js +5 -5
  117. package/primitives/popover/popover.d.ts +0 -1
  118. package/primitives/popover/popover.js +5 -5
  119. package/primitives/ripple/index.js +2 -2
  120. package/primitives/ripple/ripple.js +2 -2
  121. package/transitional-styles.js +2 -2
  122. package/utils/decorators/resize-observer.d.ts +15 -0
  123. package/utils/directives/forward-attributes.d.ts +17 -0
  124. package/utils/helpers/attribute-converters.d.ts +14 -0
  125. package/utils/transitional-styles/transitional-styles.d.ts +4 -8
  126. package/chunks/chunk.X7MGCODG.js +0 -244
  127. /package/chunks/{chunk.HS7ICQNA.js → chunk.4ZADZSWE.js} +0 -0
  128. /package/chunks/{chunk.RSZ4ZUN3.js → chunk.JGTSJ4J6.js} +0 -0
@@ -1,15 +1,18 @@
1
1
  import {
2
2
  GdsSegment
3
- } from "./chunk.ETETI45J.js";
3
+ } from "./chunk.VHKGMBUL.js";
4
+ import {
5
+ resizeObserver
6
+ } from "./chunk.VHN4JEZC.js";
4
7
  import {
5
8
  tokens
6
- } from "./chunk.3CAFC46K.js";
9
+ } from "./chunk.W2XAWNZY.js";
7
10
  import {
8
11
  TransitionalStyles
9
- } from "./chunk.XQ3SZZAO.js";
12
+ } from "./chunk.ZLWSCK7R.js";
10
13
  import {
11
14
  GdsElement
12
- } from "./chunk.2LQSDOD4.js";
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, _tid, _resizeObserver, _firstVisibleIndex, _calculatedSegmentWidth, _segmentWidth, _segmentsContainerLeft, _focusedIndex, _dragStartX, _dragStartLeft, _isDragging, _startDrag, _drag, _endDrag, _calcVisibleAfterDrag, _calcLayout, _applySegmentsTransform, _handleSlotChange, handleSlotChange_fn, _scrollLeft, _scrollRight, _updateScrollBtnState, _updateIndicator, _handleSegmentClick, _updateSelectedFromValue;
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`${this._tStyles}
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([
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.XQ3SZZAO.js";
3
+ } from "./chunk.ZLWSCK7R.js";
4
4
  import {
5
5
  GdsElement
6
- } from "./chunk.2LQSDOD4.js";
6
+ } from "./chunk.EM7MZKG5.js";
7
7
  import {
8
8
  gdsCustomElement
9
9
  } from "./chunk.VOYMQ322.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  constrainSlots
3
- } from "./chunk.6NM7ENKA.js";
3
+ } from "./chunk.KBYQYDL3.js";
4
4
  import {
5
5
  __decorateClass,
6
6
  __privateAdd,
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk.2ND5EWHE.js";
5
5
  import {
6
6
  TransitionalStyles
7
- } from "./chunk.XQ3SZZAO.js";
7
+ } from "./chunk.ZLWSCK7R.js";
8
8
  import {
9
9
  GdsElement
10
- } from "./chunk.2LQSDOD4.js";
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, state } from "lit/decorators.js";
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`${this._tStyles}
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.2LQSDOD4.js";
3
+ } from "./chunk.EM7MZKG5.js";
4
4
  import {
5
5
  gdsCustomElement,
6
6
  html
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tokens
3
- } from "./chunk.3CAFC46K.js";
3
+ } from "./chunk.W2XAWNZY.js";
4
4
  import {
5
5
  gdsCustomElement
6
6
  } from "./chunk.VOYMQ322.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.XQ3SZZAO.js";
3
+ } from "./chunk.ZLWSCK7R.js";
4
4
  import {
5
5
  GdsElement
6
- } from "./chunk.2LQSDOD4.js";
6
+ } from "./chunk.EM7MZKG5.js";
7
7
  import {
8
8
  gdsCustomElement,
9
9
  html
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GdsElement
3
- } from "./chunk.2LQSDOD4.js";
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.YIQIH4RW.js";
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.6NM7ENKA.js";
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, state } from "lit/decorators.js";
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.XQ3SZZAO.js";
6
+ } from "./chunk.ZLWSCK7R.js";
7
7
  import {
8
8
  GdsElement
9
- } from "./chunk.2LQSDOD4.js";
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, state } from "lit/decorators.js";
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`${this._tStyles}
101
- <table>
102
- <thead>
103
- <tr>
104
- ${when(this.showWeekNumbers, () => html`<th></th>`)}
105
- <th>${msg("Mon")}</th>
106
- <th>${msg("Tue")}</th>
107
- <th>${msg("Wed")}</th>
108
- <th>${msg("Thu")}</th>
109
- <th>${msg("Fri")}</th>
110
- <th>${msg("Sat")}</th>
111
- <th>${msg("Sun")}</th>
112
- </tr>
113
- </thead>
114
- <tbody>
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
- ${weeks.map(
117
+ ${weeks.map(
119
118
  (week) => html`
120
- <tr>
121
- ${when(
119
+ <tr>
120
+ ${when(
122
121
  this.showWeekNumbers,
123
122
  () => html`<td class="week-number">
124
- ${getWeek(week.days[0])}
125
- </td>`
123
+ ${getWeek(week.days[0])}
124
+ </td>`
126
125
  )}
127
- ${week.days.map((day) => {
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
- <td
133
- class="${classMap({
131
+ <td
132
+ class="${classMap({
134
133
  disabled: Boolean(isDisabled),
135
134
  today: isSameDay(currentDate, day)
136
135
  })}"
137
- ?disabled=${isDisabled}
138
- tabindex="${isSameDay(this.focusedDate, day) ? 0 : -1}"
139
- aria-selected="${this.value && isSameDay(this.value, day)}"
140
- aria-label="${day.toDateString()}"
141
- @click=${() => isDisabled ? null : __privateMethod(this, _setSelectedDate, setSelectedDate_fn).call(this, day)}
142
- id="dateCell-${day.getDate()}"
143
- >
144
- ${day.getDate()}
145
- </td>
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
- </tr>
149
- `
147
+ </tr>
148
+ `
150
149
  )}
151
- `
150
+ `
152
151
  )}
153
- </tbody>
154
- </table>`;
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.2LQSDOD4.js";
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`${this._tStyles}
199
- <dialog
200
- class="${classMap({ "v-kb-visible": this._isVirtKbVisible })}"
201
- ${ref(__privateGet(this, _dialogElementRef))}
202
- >
203
- <header>
204
- <h2>${this.label}</h2>
205
- <button
206
- class="close"
207
- @click=${__privateGet(this, _handleCloseButton)}
208
- aria-label="${msg("Close")}"
209
- >
210
- <i></i>
211
- </button>
212
- </header>
213
- <slot></slot>
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.XQ3SZZAO.js";
7
+ } from "./chunk.ZLWSCK7R.js";
8
8
  import {
9
9
  GdsElement
10
- } from "./chunk.2LQSDOD4.js";
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`${this._tStyles}
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(...arguments);
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
- GdsFormControlElement
3
- } from "./chunk.YIQIH4RW.js";
2
+ forwardAttributes
3
+ } from "./chunk.YBOK7MI7.js";
4
4
  import {
5
5
  tokens
6
- } from "./chunk.3CAFC46K.js";
6
+ } from "./chunk.W2XAWNZY.js";
7
+ import {
8
+ GdsFormControlElement
9
+ } from "./chunk.XOARVFGN.js";
7
10
  import {
8
11
  TransitionalStyles
9
- } from "./chunk.XQ3SZZAO.js";
12
+ } from "./chunk.ZLWSCK7R.js";
10
13
  import {
11
14
  constrainSlots
12
- } from "./chunk.6NM7ENKA.js";
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="${this.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 = ((_a2 = slot.getAttribute("gds-allow")) == null ? void 0 : _a2.split(" ")) || [];
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
@@ -17,7 +17,6 @@ var style = css`
17
17
  grid-column-gap: var(--_gap-column);
18
18
  grid-row-gap: var(--_gap-row);
19
19
  padding: var(--_grid-padding);
20
- text-wrap: balance;
21
20
  }
22
21
 
23
22
  :host([auto-columns]) {