@sebgroup/green-core 1.21.2 → 1.22.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 (81) hide show
  1. package/chunks/{chunk.RR73DCKW.js → chunk.3NDQ53OL.js} +1 -1
  2. package/chunks/{chunk.T47FZ32J.js → chunk.5IFR5NGK.js} +1 -1
  3. package/chunks/{chunk.KDQIFEAP.js → chunk.A5T4P7QS.js} +1 -1
  4. package/chunks/{chunk.3SXUKXZV.js → chunk.AB2OQWFX.js} +1 -1
  5. package/chunks/{chunk.MU5DFDDU.js → chunk.AEGZCLBR.js} +2 -2
  6. package/chunks/{chunk.77RANRZR.js → chunk.C2MXNUCE.js} +1 -1
  7. package/chunks/{chunk.FHNY57AB.js → chunk.DFW523YG.js} +3 -3
  8. package/chunks/{chunk.4ZZYYAX4.js → chunk.DHSXS2A3.js} +149 -67
  9. package/chunks/{chunk.2QXAOTCS.js → chunk.EOQOGT7K.js} +1 -1
  10. package/chunks/{chunk.XFKEBTU3.js → chunk.HL2NDSAL.js} +1 -1
  11. package/chunks/{chunk.CNYIFSDX.js → chunk.IA3JFKY2.js} +57 -25
  12. package/chunks/{chunk.VRM45KID.js → chunk.KPUOGILQ.js} +1 -1
  13. package/chunks/{chunk.SXNGHD2S.js → chunk.LR3W2NRF.js} +31 -22
  14. package/chunks/{chunk.W2GCNYHE.js → chunk.OODZSCCL.js} +19 -23
  15. package/chunks/{chunk.Q3IGOBT4.js → chunk.OQYSWRQN.js} +1 -1
  16. package/chunks/{chunk.SSRI6BF6.js → chunk.SCB55JEL.js} +146 -2130
  17. package/chunks/{chunk.ZWAAQYUP.js → chunk.TIBYVWJK.js} +2 -2
  18. package/chunks/{chunk.2IV2CDG3.js → chunk.UKBROSFM.js} +1 -1
  19. package/chunks/{chunk.PFIA4S5N.js → chunk.UTJQOQMU.js} +1 -1
  20. package/chunks/{chunk.HT7H7ZIV.js → chunk.VH7TVVFL.js} +4 -4
  21. package/chunks/chunk.VOYMQ322.js +1 -1
  22. package/components/button/button.d.ts +17 -1
  23. package/components/button/button.js +4 -4
  24. package/components/button/button.trans.styles.js +1 -1
  25. package/components/button/index.js +4 -4
  26. package/components/context-menu/context-menu.d.ts +1 -1
  27. package/components/context-menu/context-menu.js +9 -6
  28. package/components/context-menu/context-menu.trans.styles.js +2 -2
  29. package/components/context-menu/index.js +10 -7
  30. package/components/datepicker/datepicker.d.ts +6 -1
  31. package/components/datepicker/datepicker.js +20 -9
  32. package/components/datepicker/datepicker.trans.styles.js +2 -2
  33. package/components/datepicker/index.js +20 -9
  34. package/components/dropdown/dropdown.d.ts +2 -3
  35. package/components/dropdown/dropdown.js +9 -6
  36. package/components/dropdown/dropdown.trans.styles.js +2 -2
  37. package/components/dropdown/index.js +10 -7
  38. package/components/filter-chips/filter-chip/filter-chip.js +7 -7
  39. package/components/filter-chips/filter-chip/filter-chip.trans.styles.js +2 -2
  40. package/components/filter-chips/filter-chip/index.js +7 -7
  41. package/components/filter-chips/filter-chips.js +8 -8
  42. package/components/filter-chips/filter-chips.trans.styles.js +2 -2
  43. package/components/filter-chips/index.js +8 -8
  44. package/components/grid/grid.js +2 -2
  45. package/components/grid/index.js +2 -2
  46. package/components/grouped-list/grouped-list.js +2 -2
  47. package/components/grouped-list/grouped-list.trans.styles.js +2 -2
  48. package/components/grouped-list/index.js +2 -2
  49. package/components/icon/icons/index.js +12 -12
  50. package/components/index.js +35 -31
  51. package/{primitives → components}/popover/index.js +6 -3
  52. package/{primitives → components}/popover/popover.d.ts +27 -6
  53. package/{primitives → components}/popover/popover.js +5 -2
  54. package/components/popover/popover.trans.styles.js +11 -0
  55. package/components/segmented-control/index.js +4 -4
  56. package/components/segmented-control/segment/index.js +3 -3
  57. package/components/segmented-control/segment/segment.js +3 -3
  58. package/components/segmented-control/segment/segment.trans.styles.js +2 -2
  59. package/components/segmented-control/segmented-control.js +4 -4
  60. package/components/segmented-control/segmented-control.trans.styles.js +2 -2
  61. package/components/theme/index.js +2 -2
  62. package/components/theme/theme.js +2 -2
  63. package/components/theme/theme.trans.styles.js +2 -2
  64. package/index.js +35 -31
  65. package/package.json +1 -1
  66. package/primitives/calendar/calendar.js +2 -2
  67. package/primitives/calendar/index.js +2 -2
  68. package/primitives/listbox/index.js +3 -3
  69. package/primitives/listbox/listbox.js +3 -3
  70. package/primitives/listbox/option.js +2 -2
  71. package/primitives/menu/index.js +3 -3
  72. package/primitives/menu/menu-heading.js +2 -2
  73. package/primitives/menu/menu-item.js +2 -2
  74. package/primitives/menu/menu.js +3 -3
  75. package/primitives/ripple/index.js +2 -2
  76. package/primitives/ripple/ripple.js +2 -2
  77. package/transitional-styles.js +1 -1
  78. /package/chunks/{chunk.XU4HZLJL.js → chunk.4HJGQCBX.js} +0 -0
  79. /package/{primitives → components}/popover/index.d.ts +0 -0
  80. /package/{primitives → components}/popover/popover.styles.d.ts +0 -0
  81. /package/{primitives → components}/popover/popover.trans.styles.d.ts +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tokens
3
- } from "./chunk.HT7H7ZIV.js";
3
+ } from "./chunk.VH7TVVFL.js";
4
4
  import {
5
5
  GdsFormControlElement
6
6
  } from "./chunk.MZSK66DN.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk.KBYQYDL3.js";
10
10
  import {
11
11
  TransitionalStyles
12
- } from "./chunk.SSRI6BF6.js";
12
+ } from "./chunk.SCB55JEL.js";
13
13
  import {
14
14
  gdsCustomElement,
15
15
  html
@@ -23,8 +23,10 @@ import {
23
23
 
24
24
  // libs/core/src/components/button/button.ts
25
25
  import { nothing as nothing2, unsafeCSS } from "lit";
26
+ import { html as staticHtml, literal } from "lit/static-html.js";
26
27
  import { property, query } from "lit/decorators.js";
27
28
  import { when } from "lit/directives/when.js";
29
+ import { ifDefined } from "lit/directives/if-defined.js";
28
30
  import { classMap } from "lit/directives/class-map.js";
29
31
 
30
32
  // libs/core/src/utils/directives/forward-attributes.ts
@@ -105,7 +107,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
105
107
  }
106
108
 
107
109
  @layer core {
108
- button {
110
+ .button {
109
111
  --gds-sys-transition-properties: color !important;
110
112
 
111
113
  align-items: center;
@@ -136,6 +138,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
136
138
  padding-block: var(--_padding-block);
137
139
  padding-inline: var(--_padding-inline);
138
140
  position: relative;
141
+ text-decoration: none;
139
142
  transition: var(--_transition);
140
143
  transition-property: color, border-color;
141
144
 
@@ -178,20 +181,20 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
178
181
  }
179
182
  }
180
183
 
181
- button slot:not([name]) {
184
+ .button slot:not([name]) {
182
185
  display: inline-block;
183
186
  overflow: hidden;
184
187
  text-overflow: ellipsis;
185
188
  white-space: nowrap;
186
189
  }
187
190
 
188
- button.icon slot {
191
+ .button.icon slot {
189
192
  display: contents;
190
193
  }
191
194
  }
192
195
 
193
196
  @layer ranks {
194
- :host([rank*='secondary']) button {
197
+ :host([rank*='secondary']) .button {
195
198
  --_color-bg: var(--gds-sys-color-content-content-inverse);
196
199
  --_color-text: var(--gds-sys-color-content-content);
197
200
  --_color-border: var(--gds-sys-color-stroke-stroke);
@@ -201,7 +204,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
201
204
  }
202
205
  }
203
206
 
204
- :host([rank*='tertiary']) button {
207
+ :host([rank*='tertiary']) .button {
205
208
  --_color-bg: transparent;
206
209
  --_color-text: var(--gds-sys-color-content-content);
207
210
  --_color-border: transparent;
@@ -216,7 +219,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
216
219
  }
217
220
  }
218
221
 
219
- button.circle {
222
+ .button.circle {
220
223
  display: flex;
221
224
  align-items: center;
222
225
  height: var(--_size);
@@ -229,20 +232,20 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
229
232
  }
230
233
 
231
234
  @layer sizes {
232
- :host([size='small']) button {
235
+ :host([size='small']) .button {
233
236
  --_padding-inline: var(--gds-sys-space-padding-l);
234
237
  --_padding-block: var(--gds-sys-space-padding-s);
235
238
  --_size: 2rem;
236
239
  font-size: 0.875rem;
237
240
  }
238
241
 
239
- :host([size='medium']) button {
242
+ :host([size='medium']) .button {
240
243
  --_padding-inline: var(--gds-sys-space-padding-l);
241
244
  --_padding-block: var(--gds-sys-space-padding-m);
242
245
  --_size: 2.5rem;
243
246
  }
244
247
 
245
- :host([size='large']) button {
248
+ :host([size='large']) .button {
246
249
  --_padding-inline: var(--gds-sys-space-padding-xl);
247
250
  --_padding-block: var(--gds-sys-space-padding-m);
248
251
  --_size: 3rem;
@@ -250,7 +253,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
250
253
  }
251
254
 
252
255
  @layer variants {
253
- :host([rank='primary'][variant='positive']) button {
256
+ :host([rank='primary'][variant='positive']) .button {
254
257
  --_bg: var(--gds-sys-color-container-container-positive);
255
258
  --_color-bg: var(--_bg);
256
259
  --_color-border: var(--_bg);
@@ -268,7 +271,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
268
271
  }
269
272
  }
270
273
 
271
- :host([rank='secondary'][variant='positive']) button {
274
+ :host([rank='secondary'][variant='positive']) .button {
272
275
  --_color-bg: var(--gds-sys-color-content-content-inverse);
273
276
  --_color-text: var(--gds-sys-color-content-content-positive);
274
277
  --_color-border: var(--gds-sys-color-stroke-stroke-positive);
@@ -284,7 +287,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
284
287
  }
285
288
  }
286
289
 
287
- :host([rank='tertiary'][variant='positive']) button {
290
+ :host([rank='tertiary'][variant='positive']) .button {
288
291
  --_color-bg: transparent;
289
292
  --_color-text: var(--gds-sys-color-content-content-positive);
290
293
  --_color-border: transparent;
@@ -302,7 +305,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
302
305
  }
303
306
  }
304
307
 
305
- :host([rank='primary'][variant='negative']) button {
308
+ :host([rank='primary'][variant='negative']) .button {
306
309
  --_bg: var(--gds-sys-color-container-container-negative);
307
310
  --_color-bg: var(--_bg);
308
311
  --_color-text: var(--gds-sys-color-status-negative-on-negative);
@@ -321,7 +324,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
321
324
  }
322
325
  }
323
326
 
324
- :host([rank='secondary'][variant='negative']) button {
327
+ :host([rank='secondary'][variant='negative']) .button {
325
328
  --_color-bg: var(--gds-sys-color-content-content-inverse);
326
329
  --_color-text: var(--gds-sys-color-content-content-negative);
327
330
  --_color-border: var(--gds-sys-color-stroke-stroke-negative);
@@ -337,7 +340,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
337
340
  }
338
341
  }
339
342
 
340
- :host([rank='tertiary'][variant='negative']) button {
343
+ :host([rank='tertiary'][variant='negative']) .button {
341
344
  --_color-bg: transparent;
342
345
  --_color-text: var(--gds-sys-color-content-content-negative);
343
346
  --_color-border: transparent;
@@ -357,7 +360,7 @@ var button_style_default = `@layer tokens, a11y, core, ranks, sizes, variants, d
357
360
  }
358
361
 
359
362
  @layer disabled {
360
- button:disabled {
363
+ .button:disabled {
361
364
  --_color-bg: var(--gds-sys-color-container-container-disabled);
362
365
  border-color: var(--_color-bg);
363
366
  color: var(--gds-sys-color-content-content-disabled);
@@ -382,15 +385,18 @@ function stripWhitespace(extendedTag) {
382
385
 
383
386
  // libs/core/src/components/button/button.ts
384
387
  var html2 = stripWhitespace(html);
385
- var _isIconButton, _mainSlotChange, _handleClick;
388
+ var _isIconButton, _isLink, isLink_get, _defaultRel, defaultRel_get, _mainSlotChange, _handleClick;
386
389
  var GdsButton = class extends GdsFormControlElement {
387
390
  constructor() {
388
391
  super();
392
+ __privateAdd(this, _isLink);
393
+ __privateAdd(this, _defaultRel);
389
394
  this.disabled = false;
390
395
  this.rank = "primary";
391
396
  this.variant = "neutral";
392
397
  this.size = "medium";
393
398
  this.label = "";
399
+ this.href = "";
394
400
  __privateAdd(this, _isIconButton, false);
395
401
  // Check if the button is an icon button.
396
402
  __privateAdd(this, _mainSlotChange, () => {
@@ -409,7 +415,7 @@ var GdsButton = class extends GdsFormControlElement {
409
415
  detail: e
410
416
  })
411
417
  );
412
- if (this.form) {
418
+ if (this.form && !__privateGet(this, _isLink, isLink_get)) {
413
419
  if (this.type === "submit") {
414
420
  this.form.requestSubmit();
415
421
  } else if (this.type === "reset") {
@@ -426,6 +432,7 @@ var GdsButton = class extends GdsFormControlElement {
426
432
  }
427
433
  render() {
428
434
  const buttonClasses = {
435
+ button: true,
429
436
  circle: __privateGet(this, _isIconButton),
430
437
  icon: __privateGet(this, _isIconButton),
431
438
  small: this.size === "small",
@@ -436,14 +443,19 @@ var GdsButton = class extends GdsFormControlElement {
436
443
  secondary: this.rank === "secondary",
437
444
  tertiary: this.rank === "tertiary"
438
445
  };
439
- return html2`
440
- <button
446
+ const tag = __privateGet(this, _isLink, isLink_get) ? literal`a` : literal`button`;
447
+ return staticHtml`
448
+ <${tag}
441
449
  class=${classMap(buttonClasses)}
442
- ?type="${this.type}"
450
+ type="${ifDefined(__privateGet(this, _isLink, isLink_get) ? void 0 : this.type)}"
443
451
  ?disabled="${this.disabled}"
444
- @click="${__privateGet(this, _handleClick)}"
445
452
  aria-label=${this.label || nothing2}
453
+ href=${ifDefined(__privateGet(this, _isLink, isLink_get) ? this.href : void 0)}
454
+ target=${ifDefined(__privateGet(this, _isLink, isLink_get) ? this.target : void 0)}
455
+ rel=${ifDefined(__privateGet(this, _isLink, isLink_get) ? this.rel || __privateGet(this, _defaultRel, defaultRel_get) : void 0)}
456
+ download=${ifDefined(__privateGet(this, _isLink, isLink_get) ? this.download : void 0)}
446
457
  part="_button"
458
+ @click="${__privateGet(this, _handleClick)}"
447
459
  ${forwardAttributes(
448
460
  (attr) => attr.name.startsWith("gds-aria") || attr.name === "gds-role"
449
461
  )}
@@ -455,11 +467,19 @@ var GdsButton = class extends GdsFormControlElement {
455
467
  !this._isUsingTransitionalStyles,
456
468
  () => html2`<gds-ripple></gds-ripple>`
457
469
  )}
458
- </button>
470
+ </${tag}>
459
471
  `;
460
472
  }
461
473
  };
462
474
  _isIconButton = new WeakMap();
475
+ _isLink = new WeakSet();
476
+ isLink_get = function() {
477
+ return this.href.length > 0;
478
+ };
479
+ _defaultRel = new WeakSet();
480
+ defaultRel_get = function() {
481
+ return this.target === "_blank" ? "noreferrer noopener" : void 0;
482
+ };
463
483
  _mainSlotChange = new WeakMap();
464
484
  _handleClick = new WeakMap();
465
485
  GdsButton.styles = [tokens, unsafeCSS(button_style_default)];
@@ -488,6 +508,18 @@ __decorateClass([
488
508
  __decorateClass([
489
509
  property()
490
510
  ], GdsButton.prototype, "label", 2);
511
+ __decorateClass([
512
+ property()
513
+ ], GdsButton.prototype, "href", 2);
514
+ __decorateClass([
515
+ property()
516
+ ], GdsButton.prototype, "target", 2);
517
+ __decorateClass([
518
+ property()
519
+ ], GdsButton.prototype, "rel", 2);
520
+ __decorateClass([
521
+ property()
522
+ ], GdsButton.prototype, "download", 2);
491
523
  __decorateClass([
492
524
  query("slot:not([name])")
493
525
  ], GdsButton.prototype, "_mainSlot", 2);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.SSRI6BF6.js";
3
+ } from "./chunk.SCB55JEL.js";
4
4
  import {
5
5
  GdsElement
6
6
  } from "./chunk.ZQ4D5K7J.js";
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk.MZSK66DN.js";
8
8
  import {
9
9
  TransitionalStyles
10
- } from "./chunk.SSRI6BF6.js";
10
+ } from "./chunk.SCB55JEL.js";
11
11
  import {
12
12
  watch
13
13
  } from "./chunk.2WO4NHJ2.js";
@@ -46,6 +46,7 @@ var styles = css`
46
46
  `;
47
47
 
48
48
  // libs/core/src/components/datepicker/datepicker.ts
49
+ import isSameDay from "date-fns/isSameDay";
49
50
  var _valueOnOpen, _renderBackToValidRangeButton, renderBackToValidRangeButton_fn, _focusDate, focusDate_fn, _getSpinnerLabel, getSpinnerLabel_fn, _getMinSpinnerValue, getMinSpinnerValue_fn, _getMaxSpinnerValue, getMaxSpinnerValue_fn, _dispatchChangeEvent, dispatchChangeEvent_fn, _dispatchInputEvent, dispatchInputEvent_fn, _handleFieldFocusOut, _handleSpinnerFocus, _handleClipboardCopy, _handleClipboardPaste, _handleFieldClick, _handleCalendarChange, _handleMonthChange, _handleYearChange, _handleIncrementFocusedMonth, _handleDecrementFocusedMonth, _handleCalendarFocusChange, _handlePopoverStateChange, _handleSpinnerKeydown, _parseDateFormat, parseDateFormat_fn, _handleSpinnerChange, _spinnerState, _years, years_get, _isValueOutsideRange, isValueOutsideRange_get;
50
51
  var GdsDatepicker = class extends GdsFormControlElement {
51
52
  constructor() {
@@ -168,12 +169,19 @@ var GdsDatepicker = class extends GdsFormControlElement {
168
169
  return;
169
170
  this.open = e.detail.open;
170
171
  if (e.detail.reason === "close") {
171
- this.value = (await this._elCalendar).value;
172
+ const calValue = (await this._elCalendar).value;
173
+ const hasChanged = !isSameDay(
174
+ calValue || /* @__PURE__ */ new Date(0),
175
+ __privateGet(this, _valueOnOpen) || /* @__PURE__ */ new Date(0)
176
+ );
177
+ if (hasChanged) {
178
+ this.value = calValue;
179
+ __privateMethod(this, _dispatchChangeEvent, dispatchChangeEvent_fn).call(this);
180
+ }
172
181
  if (this.value) {
173
182
  this._focusedMonth = this.value.getMonth();
174
183
  this._focusedYear = this.value.getFullYear();
175
184
  }
176
- __privateMethod(this, _dispatchChangeEvent, dispatchChangeEvent_fn).call(this);
177
185
  }
178
186
  if (e.detail.reason === "cancel") {
179
187
  this.value = __privateGet(this, _valueOnOpen);
@@ -260,7 +268,7 @@ var GdsDatepicker = class extends GdsFormControlElement {
260
268
 
261
269
  <div
262
270
  class=${classMap({ field: true, small: this.size === "small" })}
263
- id="trigger"
271
+ id="field"
264
272
  @click=${__privateGet(this, _handleFieldClick)}
265
273
  @copy=${__privateGet(this, _handleClipboardCopy)}
266
274
  @paste=${__privateGet(this, _handleClipboardPaste)}
@@ -299,14 +307,8 @@ var GdsDatepicker = class extends GdsFormControlElement {
299
307
  aria-expanded=${this.open}
300
308
  aria-controls="calendar-popover"
301
309
  aria-describedby="label"
302
- @click=${() => this.open = !this.open}
303
310
  >
304
- <svg viewBox="0 0 24 24" inert>
305
- <rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
306
- <line x1="16" y1="2" x2="16" y2="6" />
307
- <line x1="8" y1="2" x2="8" y2="6" />
308
- <line x1="3" y1="10" x2="21" y2="10" />
309
- </svg>
311
+ <gds-icon-calendar></gds-icon-calendar>
310
312
  </button>
311
313
  </div>
312
314
 
@@ -314,12 +316,14 @@ var GdsDatepicker = class extends GdsFormControlElement {
314
316
 
315
317
  <gds-popover
316
318
  .triggerRef=${this._elTrigger}
319
+ .anchorRef=${this._elField}
317
320
  .open=${this.open}
318
321
  @gds-ui-state=${__privateGet(this, _handlePopoverStateChange)}
319
322
  label=${this.label}
320
323
  id="calendar-popover"
321
324
  .placement=${"bottom-end"}
322
325
  .calcMinWidth=${() => this.showWeekNumbers ? "350px" : "305px"}
326
+ .useModalInMobileView=${true}
323
327
  @focusin=${async (e) => {
324
328
  var _a;
325
329
  const isPopover = ((_a = e.target) == null ? void 0 : _a.id) === "calendar-popover";
@@ -333,7 +337,7 @@ var GdsDatepicker = class extends GdsFormControlElement {
333
337
  @click=${__privateGet(this, _handleDecrementFocusedMonth)}
334
338
  aria-label=${msg("Previous month")}
335
339
  >
336
- <i class="icon prev"></i>
340
+ <gds-icon-chevron-left></gds-icon-chevron-left>
337
341
  </button>
338
342
  <gds-dropdown
339
343
  .value=${this._focusedMonth.toString()}
@@ -375,7 +379,7 @@ var GdsDatepicker = class extends GdsFormControlElement {
375
379
  @click=${__privateGet(this, _handleIncrementFocusedMonth)}
376
380
  aria-label=${msg("Next month")}
377
381
  >
378
- <i class="icon next"></i>
382
+ <gds-icon-chevron-right></gds-icon-chevron-right>
379
383
  </button>
380
384
  </div>
381
385
 
@@ -394,25 +398,27 @@ var GdsDatepicker = class extends GdsFormControlElement {
394
398
  ></gds-calendar>
395
399
 
396
400
  <div class="footer">
397
- <button
398
- class="tertiary clear"
401
+ <gds-button
402
+ rank="tertiary"
403
+ size="small"
399
404
  @click=${() => {
400
405
  this.value = void 0;
401
406
  __privateMethod(this, _dispatchChangeEvent, dispatchChangeEvent_fn).call(this);
402
407
  }}
403
408
  >
404
409
  ${msg("Clear")}
405
- </button>
410
+ </gds-button>
406
411
  ${until(__privateMethod(this, _renderBackToValidRangeButton, renderBackToValidRangeButton_fn).call(this), nothing)}
407
- <button
408
- class="tertiary today"
412
+ <gds-button
413
+ rank="tertiary"
414
+ size="small"
409
415
  @click=${() => {
410
416
  this.value = /* @__PURE__ */ new Date();
411
417
  __privateMethod(this, _dispatchChangeEvent, dispatchChangeEvent_fn).call(this);
412
418
  }}
413
419
  >
414
420
  ${msg("Today")}
415
- </button>
421
+ </gds-button>
416
422
  </div>
417
423
  </gds-popover> `;
418
424
  }
@@ -455,9 +461,9 @@ renderBackToValidRangeButton_fn = async function() {
455
461
  }
456
462
  return html`${when(
457
463
  buttonTxt.length > 0,
458
- () => html`<button class="tertiary back-to-range" @click=${buttonAction}>
464
+ () => html`<gds-button rank="tertiary" size="small" @click=${buttonAction}>
459
465
  ${buttonTxt}
460
- </button>`,
466
+ </gds-button>`,
461
467
  () => nothing
462
468
  )}`;
463
469
  };
@@ -616,8 +622,11 @@ __decorateClass([
616
622
  queryAsync("#calendar")
617
623
  ], GdsDatepicker.prototype, "_elCalendar", 2);
618
624
  __decorateClass([
619
- queryAsync("#trigger")
625
+ queryAsync("#calendar-button")
620
626
  ], GdsDatepicker.prototype, "_elTrigger", 2);
627
+ __decorateClass([
628
+ queryAsync("#field")
629
+ ], GdsDatepicker.prototype, "_elField", 2);
621
630
  __decorateClass([
622
631
  queryAll("[role=spinbutton]")
623
632
  ], GdsDatepicker.prototype, "_elSpinners", 2);
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.KBYQYDL3.js";
7
7
  import {
8
8
  TransitionalStyles
9
- } from "./chunk.SSRI6BF6.js";
9
+ } from "./chunk.SCB55JEL.js";
10
10
  import {
11
11
  observeLightDOM
12
12
  } from "./chunk.WM7HBMMV.js";
@@ -205,32 +205,29 @@ var GdsDropdown = class extends GdsFormControlElement {
205
205
 
206
206
  <span class="form-info"><slot name="sub-label"></slot></span>
207
207
 
208
- <button
209
- id="trigger"
210
- @click="${() => this.open = !this.open}"
211
- aria-haspopup="listbox"
212
- role="combobox"
213
- aria-owns="listbox"
214
- aria-controls="listbox"
215
- aria-expanded="${this.open}"
216
- aria-label="${this.label}"
217
- class=${classMap({ small: this.size === "small" })}
218
- >
219
- <slot name="trigger">
220
- <span>${unsafeHTML(this.displayValue)}</span>
221
- </slot>
222
- </button>
223
-
224
- <span class="form-info"><slot name="message"></slot></span>
225
-
226
208
  <gds-popover
227
209
  .label=${this.label}
228
210
  .open=${this.open}
229
- .triggerRef=${this._elTriggerBtnAsync}
230
211
  .calcMaxWidth=${(trigger) => this.syncPopoverWidth ? `${trigger.offsetWidth}px` : `auto`}
231
212
  .calcMaxHeight=${(_trigger) => `${this.maxHeight}px`}
213
+ .useModalInMobileView=${true}
232
214
  @gds-ui-state=${(e) => this.open = e.detail.open}
233
215
  >
216
+ <button
217
+ id="trigger"
218
+ slot="trigger"
219
+ aria-haspopup="listbox"
220
+ role="combobox"
221
+ aria-owns="listbox"
222
+ aria-controls="listbox"
223
+ aria-expanded="${this.open}"
224
+ aria-label="${this.label}"
225
+ class=${classMap({ small: this.size === "small" })}
226
+ >
227
+ <slot name="trigger">
228
+ <span>${unsafeHTML(this.displayValue)}</span>
229
+ </slot>
230
+ </button>
234
231
  ${when(
235
232
  this.searchable,
236
233
  () => html`<input
@@ -254,6 +251,8 @@ var GdsDropdown = class extends GdsFormControlElement {
254
251
  <slot gds-allow="gds-option gds-menu-heading"></slot>
255
252
  </gds-listbox>
256
253
  </gds-popover>
254
+
255
+ <span class="form-info"><slot name="message"></slot></span>
257
256
  `;
258
257
  }
259
258
  _handleLightDOMChange() {
@@ -383,9 +382,6 @@ __decorateClass([
383
382
  __decorateClass([
384
383
  query("#trigger")
385
384
  ], GdsDropdown.prototype, "_elTriggerBtn", 2);
386
- __decorateClass([
387
- queryAsync("#trigger")
388
- ], GdsDropdown.prototype, "_elTriggerBtnAsync", 2);
389
385
  __decorateClass([
390
386
  queryAsync("#listbox")
391
387
  ], GdsDropdown.prototype, "_elListbox", 2);
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.375BWME4.js";
4
4
  import {
5
5
  TransitionalStyles
6
- } from "./chunk.SSRI6BF6.js";
6
+ } from "./chunk.SCB55JEL.js";
7
7
  import {
8
8
  GdsElement
9
9
  } from "./chunk.ZQ4D5K7J.js";