@sebgroup/green-core 1.6.0 → 1.7.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.
@@ -43,6 +43,14 @@ export declare class GdsDatepicker extends GdsFormControlElement<Date> {
43
43
  * Whether to show a column of week numbers in the calendar.
44
44
  */
45
45
  showWeekNumbers: boolean;
46
+ /**
47
+ * Whether to use the small variant of the datepicker field.
48
+ */
49
+ size: 'small' | 'medium';
50
+ /**
51
+ * Whether to hide the label above the input field.
52
+ */
53
+ hideLabel: boolean;
46
54
  /**
47
55
  * The date format to use. Accepts a string with the characters `y`, `m` and `d` in any order, separated by a delimiter.
48
56
  * For example, `y-m-d` or `d/m/y`. All three characters must be present.
@@ -3,7 +3,6 @@ import '../../primitives/listbox';
3
3
  import type { GdsOption, OptionsContainer } from '../../primitives/listbox';
4
4
  import '../../primitives/popover';
5
5
  import { GdsFormControlElement } from '../form-control';
6
- import { CSSResult } from 'lit';
7
6
  /**
8
7
  * @element gds-dropdown
9
8
  * A dropdown consist of a trigger button and a list of selectable options. It is used to select a single value from a list of options.
@@ -20,7 +19,7 @@ import { CSSResult } from 'lit';
20
19
  */
21
20
  export declare class GdsDropdown<ValueT = any> extends GdsFormControlElement<ValueT | ValueT[]> implements OptionsContainer {
22
21
  #private;
23
- static styles: CSSResult;
22
+ static styles: import("lit").CSSResult;
24
23
  static shadowRootOptions: ShadowRootInit;
25
24
  /**
26
25
  * The label of the dropdown.
@@ -77,6 +76,15 @@ export declare class GdsDropdown<ValueT = any> extends GdsFormControlElement<Val
77
76
  * are still readable and apply appropriate custom layout or truncation if neccecary.
78
77
  */
79
78
  syncPopoverWidth: boolean;
79
+ /**
80
+ * Size of the dropdown. Supports `medium` and `small`. There is no `large` size for dropdowns.
81
+ * `medium` is the default size.
82
+ */
83
+ size: 'medium' | 'small';
84
+ /**
85
+ * Whether to hide the label.
86
+ */
87
+ hideLabel: boolean;
80
88
  /**
81
89
  * Get the options of the dropdown.
82
90
  */
@@ -8,16 +8,19 @@ export declare const templates: {
8
8
  s281846ef0421c71f: string;
9
9
  s39938ecdae568740: string;
10
10
  s407a88a592a0987c: string;
11
+ s46d6587089bd0356: string;
11
12
  s5052d10b539eabf0: string;
12
13
  s58bfb494feb8eb02: import("@lit/localize").StrResult;
13
14
  s5d929ff1619ac0c9: string;
14
15
  s5e8250fb85d64c23: string;
16
+ s62931b2a50168976: string;
15
17
  s63d040e37887f17e: string;
16
18
  s6cfed919e21ac6ac: string;
17
19
  s6d24cd19e23b8185: string;
18
20
  s74aa0319e62b2eb7: string;
19
21
  s7793b811d20184fe: string;
20
22
  s7fd3469f78111589: string;
23
+ s8ade4e9d5e804d6a: string;
21
24
  s9836b719fa8ef857: string;
22
25
  s987ac119fac8d621: string;
23
26
  sa6f2645578b2d2bc: string;
@@ -28,5 +31,6 @@ export declare const templates: {
28
31
  scb6b9cb49cf93277: string;
29
32
  sd898d99fd9c13de6: string;
30
33
  se0955919920ee87d: string;
34
+ se4129fd6b9d7b4c2: string;
31
35
  sf295af199c723ec8: string;
32
36
  };
package/index.js CHANGED
@@ -37,6 +37,7 @@ import { property as property5, query, queryAsync, state as state4 } from "lit/d
37
37
  import { unsafeHTML as unsafeHTML2 } from "lit/directives/unsafe-html.js";
38
38
  import { when as when2 } from "lit/directives/when.js";
39
39
  import { ifDefined } from "lit/directives/if-defined.js";
40
+ import { classMap as classMap3 } from "lit/directives/class-map.js";
40
41
  import { msg as msg2, str, updateWhenLocaleChanges } from "@lit/localize";
41
42
  import "reflect-metadata";
42
43
 
@@ -143,7 +144,7 @@ function watchMediaQuery(q) {
143
144
  // libs/core/src/utils/helpers/custom-element-scoping.ts
144
145
  import { html as litHtml } from "lit";
145
146
  import { customElement } from "lit/decorators.js";
146
- var VER_SUFFIX = "-f9a04d";
147
+ var VER_SUFFIX = "-16d025";
147
148
  var elementLookupTable = /* @__PURE__ */ new Map();
148
149
  var gdsCustomElement = (tagName) => {
149
150
  if (globalThis.GDS_DISABLE_VERSIONED_ELEMENTS) {
@@ -1126,6 +1127,8 @@ var GdsDropdown = class extends GdsFormControlElement {
1126
1127
  this.compareWith = (a, b) => a === b;
1127
1128
  this.searchFilter = (q, o) => o.innerHTML.toLowerCase().includes(q.toLowerCase());
1128
1129
  this.syncPopoverWidth = false;
1130
+ this.size = "medium";
1131
+ this.hideLabel = false;
1129
1132
  __privateAdd(this, _optionElements, void 0);
1130
1133
  /**
1131
1134
  * Event handler for filtering the options in the dropdown.
@@ -1238,7 +1241,7 @@ var GdsDropdown = class extends GdsFormControlElement {
1238
1241
  return html`
1239
1242
  ${this._tStyles}
1240
1243
  ${when2(
1241
- this.label,
1244
+ this.label && !this.hideLabel,
1242
1245
  () => html`<label for="trigger">${this.label}</label>`
1243
1246
  )}
1244
1247
 
@@ -1252,6 +1255,8 @@ var GdsDropdown = class extends GdsFormControlElement {
1252
1255
  aria-owns="listbox"
1253
1256
  aria-controls="listbox"
1254
1257
  aria-expanded="${this.open}"
1258
+ aria-label="${this.label}"
1259
+ class=${classMap3({ small: this.size === "small" })}
1255
1260
  >
1256
1261
  <slot name="trigger">
1257
1262
  <span>${unsafeHTML2(this.displayValue)}</span>
@@ -1400,8 +1405,14 @@ __decorateClass([
1400
1405
  property5()
1401
1406
  ], GdsDropdown.prototype, "searchFilter", 2);
1402
1407
  __decorateClass([
1403
- property5({ type: Boolean })
1408
+ property5({ type: Boolean, attribute: "sync-popover-width" })
1404
1409
  ], GdsDropdown.prototype, "syncPopoverWidth", 2);
1410
+ __decorateClass([
1411
+ property5()
1412
+ ], GdsDropdown.prototype, "size", 2);
1413
+ __decorateClass([
1414
+ property5({ type: Boolean, attribute: "hide-label" })
1415
+ ], GdsDropdown.prototype, "hideLabel", 2);
1405
1416
  __decorateClass([
1406
1417
  state4()
1407
1418
  ], GdsDropdown.prototype, "_tStyles", 2);
@@ -1476,7 +1487,7 @@ GdsMenuHeading = __decorateClass([
1476
1487
  // libs/core/src/components/context-menu/context-menu.ts
1477
1488
  import { nothing } from "lit";
1478
1489
  import { msg as msg3 } from "@lit/localize";
1479
- import { classMap as classMap3 } from "lit-html/directives/class-map.js";
1490
+ import { classMap as classMap4 } from "lit-html/directives/class-map.js";
1480
1491
  import { property as property6, queryAsync as queryAsync2, state as state6 } from "lit/decorators.js";
1481
1492
 
1482
1493
  // libs/core/src/primitives/menu/menu.ts
@@ -1546,7 +1557,7 @@ var GdsContextMenu = class extends GdsElement {
1546
1557
  return html`${this._tStyles}
1547
1558
  <button
1548
1559
  id="trigger"
1549
- class="icon border-0 small ${classMap3({ highlighted: this.open })}"
1560
+ class="icon border-0 small ${classMap4({ highlighted: this.open })}"
1550
1561
  aria-label=${this.buttonLabel ?? this.label}
1551
1562
  aria-haspopup="menu"
1552
1563
  aria-controls="menu"
@@ -1657,12 +1668,13 @@ import { when as when4 } from "lit/directives/when.js";
1657
1668
  import { until } from "lit/directives/until.js";
1658
1669
  import { map } from "lit/directives/map.js";
1659
1670
  import { repeat } from "lit/directives/repeat.js";
1671
+ import { classMap as classMap6 } from "lit/directives/class-map.js";
1660
1672
  import { nothing as nothing2 } from "lit";
1661
1673
  import { msg as msg5 } from "@lit/localize";
1662
1674
 
1663
1675
  // libs/core/src/primitives/calendar/calendar.ts
1664
1676
  import { html as html7 } from "lit";
1665
- import { classMap as classMap4 } from "lit/directives/class-map.js";
1677
+ import { classMap as classMap5 } from "lit/directives/class-map.js";
1666
1678
  import { when as when3 } from "lit/directives/when.js";
1667
1679
  import { property as property7, query as query2, state as state8 } from "lit/decorators.js";
1668
1680
  import { msg as msg4 } from "@lit/localize";
@@ -1724,7 +1736,6 @@ var GdsCalendar = class extends GdsElement {
1724
1736
  super(...arguments);
1725
1737
  __privateAdd(this, _setSelectedDate);
1726
1738
  __privateAdd(this, _handleKeyDown);
1727
- this.value = /* @__PURE__ */ new Date();
1728
1739
  this.min = new Date((/* @__PURE__ */ new Date()).getFullYear() - 10, 0, 1);
1729
1740
  this.max = new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 0, 1);
1730
1741
  this.focusedDate = /* @__PURE__ */ new Date();
@@ -1790,13 +1801,13 @@ var GdsCalendar = class extends GdsElement {
1790
1801
  const isDisabled = !isSameMonth(this.focusedDate, day) || day < this.min || day > this.max;
1791
1802
  return html7`
1792
1803
  <td
1793
- class="${classMap4({
1804
+ class="${classMap5({
1794
1805
  disabled: isDisabled,
1795
1806
  today: isSameDay(currentDate, day)
1796
1807
  })}"
1797
1808
  ?disabled=${isDisabled}
1798
1809
  tabindex="${isSameDay(this.focusedDate, day) ? 0 : -1}"
1799
- aria-selected="${isSameDay(this.value, day)}"
1810
+ aria-selected="${this.value && isSameDay(this.value, day)}"
1800
1811
  aria-label="${day.toDateString()}"
1801
1812
  @click=${() => isDisabled ? null : __privateMethod(this, _setSelectedDate, setSelectedDate_fn).call(this, day)}
1802
1813
  id="dateCell-${day.getDate()}"
@@ -2141,6 +2152,8 @@ var GdsDatepicker = class extends GdsFormControlElement {
2141
2152
  this.open = false;
2142
2153
  this.label = "";
2143
2154
  this.showWeekNumbers = false;
2155
+ this.size = "medium";
2156
+ this.hideLabel = false;
2144
2157
  this._focusedMonth = (/* @__PURE__ */ new Date()).getMonth();
2145
2158
  this._focusedYear = (/* @__PURE__ */ new Date()).getFullYear();
2146
2159
  this._dateFormatLayout = __privateMethod(this, _parseDateFormat, parseDateFormat_fn).call(this, "y-m-d");
@@ -2228,7 +2241,7 @@ var GdsDatepicker = class extends GdsFormControlElement {
2228
2241
  return;
2229
2242
  this.open = e.detail.open;
2230
2243
  if (e.detail.reason === "close") {
2231
- this.value = (await this._elCalendar).focusedDate;
2244
+ this.value = (await this._elCalendar).value;
2232
2245
  __privateMethod(this, _dispatchChangeEvent2, dispatchChangeEvent_fn2).call(this);
2233
2246
  }
2234
2247
  if (e.detail.reason === "cancel") {
@@ -2290,7 +2303,7 @@ var GdsDatepicker = class extends GdsFormControlElement {
2290
2303
  * Get a string representation of the currently displayed value in the input field. The formatting will match the dateformat attribute.
2291
2304
  */
2292
2305
  get displayValue() {
2293
- return this._elInput.innerText;
2306
+ return this._elInput.innerText.replace(/\s+/g, "");
2294
2307
  }
2295
2308
  /**
2296
2309
  * A reference to a date cell element (<td>) inside the shadow root of the calendar primitive.
@@ -2305,18 +2318,24 @@ var GdsDatepicker = class extends GdsFormControlElement {
2305
2318
  }
2306
2319
  render() {
2307
2320
  return html`${this._tStyles}
2308
- <label for="spinner-0" id="label">${this.label}</label>
2321
+ ${when4(
2322
+ this.label && !this.hideLabel,
2323
+ () => html`<label for="spinner-0" id="label">${this.label}</label>`
2324
+ )}
2309
2325
 
2310
2326
  <div class="form-info"><slot name="sub-label"></slot></div>
2311
2327
 
2312
2328
  <div
2313
- class="field"
2329
+ class=${classMap6({ field: true, small: this.size === "small" })}
2314
2330
  id="trigger"
2315
2331
  @click=${__privateGet(this, _handleFieldClick)}
2316
2332
  @copy=${__privateGet(this, _handleClipboardCopy)}
2317
2333
  @paste=${__privateGet(this, _handleClipboardPaste)}
2318
2334
  >
2319
- <div class="input" @focusout=${__privateGet(this, _handleFieldFocusOut)}>
2335
+ <div
2336
+ class=${classMap6({ input: true, "is-placeholder": !this.value })}
2337
+ @focusout=${__privateGet(this, _handleFieldFocusOut)}
2338
+ >
2320
2339
  ${join(
2321
2340
  map(
2322
2341
  this._dateFormatLayout.layout,
@@ -2331,6 +2350,10 @@ var GdsDatepicker = class extends GdsFormControlElement {
2331
2350
  @keydown=${__privateGet(this, _handleSpinnerKeydown)}
2332
2351
  @change=${(e) => __privateGet(this, _handleSpinnerChange).call(this, e.detail.value, f.name)}
2333
2352
  @focus=${__privateGet(this, _handleSpinnerFocus)}
2353
+ @touchend=${(e) => {
2354
+ this.open = true;
2355
+ e.preventDefault();
2356
+ }}
2334
2357
  ></gds-date-part-spinner>`
2335
2358
  ),
2336
2359
  html`<span>${this._dateFormatLayout.delimiter}</span>`
@@ -2345,14 +2368,11 @@ var GdsDatepicker = class extends GdsFormControlElement {
2345
2368
  aria-describedby="label"
2346
2369
  @click=${() => this.open = !this.open}
2347
2370
  >
2348
- <svg
2349
- xmlns="http://www.w3.org/2000/svg"
2350
- viewBox="0 0 448 512"
2351
- style="width:100%;height:100%"
2352
- >
2353
- <path
2354
- d="M152 64h144V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40h40c35.3 0 64 28.65 64 64v320c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V128c0-35.35 28.65-64 64-64h40V24c0-13.25 10.7-24 24-24s24 10.75 24 24v40zM48 248h80v-56H48v56zm0 48v64h80v-64H48zm128 0v64h96v-64h-96zm144 0v64h80v-64h-80zm80-104h-80v56h80v-56zm0 216h-80v56h64c8.8 0 16-7.2 16-16v-40zm-128 0h-96v56h96v-56zm-144 0H48v40c0 8.8 7.16 16 16 16h64v-56zm144-216h-96v56h96v-56z "
2355
- />
2371
+ <svg viewBox="0 0 24 24" inert>
2372
+ <rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
2373
+ <line x1="16" y1="2" x2="16" y2="6" />
2374
+ <line x1="8" y1="2" x2="8" y2="6" />
2375
+ <line x1="3" y1="10" x2="21" y2="10" />
2356
2376
  </svg>
2357
2377
  </button>
2358
2378
  </div>
@@ -2363,9 +2383,10 @@ var GdsDatepicker = class extends GdsFormControlElement {
2363
2383
  .triggerRef=${this._elTrigger}
2364
2384
  .open=${this.open}
2365
2385
  @gds-ui-state=${__privateGet(this, _handlePopoverStateChange)}
2386
+ label=${this.label}
2366
2387
  id="calendar-popover"
2367
2388
  .placement=${"bottom-end"}
2368
- .calcMinWidth=${() => "390px"}
2389
+ .calcMinWidth=${() => this.showWeekNumbers ? "350px" : "305px"}
2369
2390
  @focusin=${async (e) => {
2370
2391
  const isPopover = e.target?.id === "calendar-popover";
2371
2392
  if (!isPopover)
@@ -2374,13 +2395,19 @@ var GdsDatepicker = class extends GdsFormControlElement {
2374
2395
  }}
2375
2396
  >
2376
2397
  <div class="header">
2377
- <button @click=${__privateGet(this, _handleDecrementFocusedMonth)}>
2398
+ <button
2399
+ @click=${__privateGet(this, _handleDecrementFocusedMonth)}
2400
+ aria-label=${msg5("Previous month")}
2401
+ >
2378
2402
  <i class="icon prev"></i>
2379
2403
  </button>
2380
2404
  <gds-dropdown
2381
2405
  .value=${this._focusedMonth.toString()}
2382
2406
  @change=${__privateGet(this, _handleMonthChange)}
2383
- aria-label="${msg5("Month")}"
2407
+ label="${msg5("Month")}"
2408
+ style="width:120px"
2409
+ size="small"
2410
+ hide-label
2384
2411
  >
2385
2412
  <gds-option value="0">${msg5("January")}</gds-option>
2386
2413
  <gds-option value="1">${msg5("February")}</gds-option>
@@ -2398,7 +2425,9 @@ var GdsDatepicker = class extends GdsFormControlElement {
2398
2425
  <gds-dropdown
2399
2426
  .value=${this._focusedYear.toString()}
2400
2427
  @change=${__privateGet(this, _handleYearChange)}
2401
- aria-label="${msg5("Year")}"
2428
+ label="${msg5("Year")}"
2429
+ size="small"
2430
+ hide-label
2402
2431
  >
2403
2432
  ${repeat(
2404
2433
  __privateGet(this, _years, years_get),
@@ -2406,7 +2435,10 @@ var GdsDatepicker = class extends GdsFormControlElement {
2406
2435
  (year) => html`<gds-option value=${year}>${year}</gds-option>`
2407
2436
  )}
2408
2437
  </gds-dropdown>
2409
- <button @click=${__privateGet(this, _handleIncrementFocusedMonth)}>
2438
+ <button
2439
+ @click=${__privateGet(this, _handleIncrementFocusedMonth)}
2440
+ aria-label=${msg5("Next month")}
2441
+ >
2410
2442
  <i class="icon next"></i>
2411
2443
  </button>
2412
2444
  </div>
@@ -2612,8 +2644,14 @@ __decorateClass([
2612
2644
  property9()
2613
2645
  ], GdsDatepicker.prototype, "label", 2);
2614
2646
  __decorateClass([
2615
- property9({ type: Boolean })
2647
+ property9({ type: Boolean, attribute: "show-week-numbers" })
2616
2648
  ], GdsDatepicker.prototype, "showWeekNumbers", 2);
2649
+ __decorateClass([
2650
+ property9()
2651
+ ], GdsDatepicker.prototype, "size", 2);
2652
+ __decorateClass([
2653
+ property9({ type: Boolean, attribute: "hide-label" })
2654
+ ], GdsDatepicker.prototype, "hideLabel", 2);
2617
2655
  __decorateClass([
2618
2656
  property9()
2619
2657
  ], GdsDatepicker.prototype, "dateformat", 1);
package/localization.js CHANGED
@@ -29,16 +29,19 @@ var templates = {
29
29
  "s281846ef0421c71f": `November`,
30
30
  "s39938ecdae568740": `September`,
31
31
  "s407a88a592a0987c": `Augusti`,
32
+ "s46d6587089bd0356": `N\xE4sta m\xE5nad`,
32
33
  "s5052d10b539eabf0": `Mars`,
33
34
  "s58bfb494feb8eb02": str`${0} valda`,
34
35
  "s5d929ff1619ac0c9": `S\xF6k`,
35
36
  "s5e8250fb85d64c23": `St\xE4ng`,
37
+ "s62931b2a50168976": `F\xF6reg\xE5ende m\xE5nad`,
36
38
  "s63d040e37887f17e": `Idag`,
37
39
  "s6cfed919e21ac6ac": `Tor`,
38
40
  "s6d24cd19e23b8185": `Tis`,
39
41
  "s74aa0319e62b2eb7": `Ons`,
40
42
  "s7793b811d20184fe": `December`,
41
43
  "s7fd3469f78111589": `\xD6ppna meny`,
44
+ "s8ade4e9d5e804d6a": `F\xF6rsta tillg\xE4ngliga datum`,
42
45
  "s9836b719fa8ef857": `L\xF6r`,
43
46
  "s987ac119fac8d621": `S\xF6n`,
44
47
  "sa6f2645578b2d2bc": `\xC5r`,
@@ -49,6 +52,7 @@ var templates = {
49
52
  "scb6b9cb49cf93277": `April`,
50
53
  "sd898d99fd9c13de6": `S\xF6k i listan av val`,
51
54
  "se0955919920ee87d": `Dag`,
55
+ "se4129fd6b9d7b4c2": `Sista tillg\xE4ngliga datum`,
52
56
  "sf295af199c723ec8": `Fre`
53
57
  };
54
58
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sebgroup/green-core",
3
3
  "description": "A carefully crafted set of Web Components, laying the foundation of the Green Design System.",
4
- "version": "1.6.0",
4
+ "version": "1.7.0",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "type": "module",
@@ -15,7 +15,7 @@ export declare class GdsCalendar extends GdsElement {
15
15
  /**
16
16
  * The currently selected date.
17
17
  */
18
- value: Date;
18
+ value?: Date;
19
19
  /**
20
20
  * The minimum date that can be selected.
21
21
  */
@@ -70,11 +70,10 @@ var option_trans_styles_default = `/**
70
70
  @layer base, reset, transitional-styles;
71
71
  @layer transitional-styles {
72
72
  :host {
73
- padding-left: 0.75rem;
74
- padding-right: 0.75rem;
73
+ padding-left: 1rem;
74
+ padding-right: 1rem;
75
75
  padding-bottom: 0.75rem;
76
76
  padding-top: 0.75rem;
77
- transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;
78
77
  line-height: 1.25;
79
78
  cursor: pointer;
80
79
  display: flex;
@@ -83,22 +82,19 @@ var option_trans_styles_default = `/**
83
82
  -moz-user-select: none;
84
83
  user-select: none;
85
84
  }
86
- :host:not(:disabled, .disabled, [aria-disabled]):hover {
87
- background-color: #199be3;
88
- color: rgb(255, 255, 255);
89
- --background: #199be3;
90
- --color: rgb(255, 255, 255);
91
- border-color: #199be3;
85
+ :host:hover, :host:focus-visible {
86
+ background-color: var(--gds-ref-pallet-base200);
92
87
  }
93
- :host[aria-selected], :host:active, :host.active, :host.active:hover, :host:active:hover {
94
- background-color: rgb(0, 122, 199);
95
- color: rgb(255, 255, 255);
96
- --background: rgb(0, 122, 199);
97
- --color: rgb(255, 255, 255);
98
- border-color: rgb(0, 122, 199);
88
+ :host:active {
89
+ background-color: var(--gds-ref-pallet-base300);
90
+ }
91
+ :host:focus {
92
+ outline-color: #000;
93
+ outline-offset: -0.25rem;
99
94
  }
100
- :host.active.sg-highlighted {
95
+ :host.active.sg-highlighted, :host[aria-selected=true] {
101
96
  background: var(--gds-ref-pallet-base800);
97
+ color: #fff;
102
98
  }
103
99
  :host(:hover),
104
100
  :host(:focus-visible) {
@@ -150,14 +146,15 @@ var option_trans_styles_default = `/**
150
146
  var menu_heading_trans_styles_default = `@layer base, reset, transitional-styles;
151
147
  @layer transitional-styles {
152
148
  :host {
153
- padding: 0.5rem 1rem;
154
- background-color: var(--gds-ref-pallet-base100);
149
+ padding: 0.75rem 1rem;
150
+ background-color: var(--gds-ref-pallet-base300);
155
151
  color: var(--gds-ref-pallet-base800);
156
152
  display: flex;
157
153
  -webkit-user-select: none;
158
154
  -moz-user-select: none;
159
155
  user-select: none;
160
156
  font-size: 0.875rem;
157
+ font-weight: 500;
161
158
  }
162
159
  :host([aria-hidden=true]) {
163
160
  display: none;
@@ -2051,9 +2048,7 @@ a.button.tertiary.danger:focus-visible {
2051
2048
  visibility: visible;
2052
2049
  }
2053
2050
  header {
2054
- border-bottom: 1px solid var(--border-color);
2055
2051
  display: flex;
2056
- padding: 0.25rem 0.75rem;
2057
2052
  }
2058
2053
  @media (min-width: 36em) {
2059
2054
  header {
@@ -2061,13 +2056,14 @@ a.button.tertiary.danger:focus-visible {
2061
2056
  }
2062
2057
  }
2063
2058
  header button.close {
2064
- margin: -0.25rem;
2059
+ margin: 0rem;
2060
+ padding: 0;
2065
2061
  }
2066
2062
  header h2 {
2067
2063
  flex-grow: 1;
2068
- font-weight: 500;
2064
+ font-weight: 400;
2069
2065
  line-height: 1.5;
2070
- margin: 0;
2066
+ margin: 0.25rem 0 0 0.75rem;
2071
2067
  }
2072
2068
  dialog {
2073
2069
  --z-index: var(--sg-z-index-popover);
@@ -2080,7 +2076,6 @@ a.button.tertiary.danger:focus-visible {
2080
2076
  position: fixed;
2081
2077
  visibility: hidden;
2082
2078
  z-index: var(--z-index);
2083
- border-width: 0;
2084
2079
  inset: 0;
2085
2080
  overflow: hidden;
2086
2081
  padding: 0;
@@ -2132,8 +2127,10 @@ a.button.tertiary.danger:focus-visible {
2132
2127
  }
2133
2128
  @media (max-width: 35.98em) {
2134
2129
  dialog {
2135
- border-radius: 0.5rem;
2136
2130
  max-height: 80svh;
2131
+ border-radius: 0.25rem;
2132
+ border: 1px solid var(--border-color);
2133
+ padding-bottom: 0;
2137
2134
  }
2138
2135
  dialog.v-kb-visible {
2139
2136
  inset-block-end: auto;
@@ -2389,6 +2386,22 @@ var dropdown_trans_styles_default = `/**
2389
2386
  input[type=week][aria-disabled=true]::placeholder {
2390
2387
  color: var(--text-disabled-color);
2391
2388
  }
2389
+ input:not([type]):hover,
2390
+ input[type=date]:hover,
2391
+ input[type=datetime]:hover,
2392
+ input[type=datetime-local]:hover,
2393
+ input[type=email]:hover,
2394
+ input[type=month]:hover,
2395
+ input[type=number]:hover,
2396
+ input[type=password]:hover,
2397
+ input[type=search]:hover,
2398
+ input[type=tel]:hover,
2399
+ input[type=text]:hover,
2400
+ input[type=time]:hover,
2401
+ input[type=url]:hover,
2402
+ input[type=week]:hover {
2403
+ background-color: var(--gds-ref-pallet-base100);
2404
+ }
2392
2405
  input[type=number] {
2393
2406
  -moz-appearance: textfield;
2394
2407
  }
@@ -2597,10 +2610,10 @@ var dropdown_trans_styles_default = `/**
2597
2610
  border-left: solid 2px var(--gds-ref-pallet-base800);
2598
2611
  content: "";
2599
2612
  display: block;
2600
- height: 0.75rem;
2601
- width: 0.75rem;
2613
+ height: 0.5rem;
2614
+ width: 0.5rem;
2602
2615
  position: relative;
2603
- top: -0.1875rem;
2616
+ top: -0.15rem;
2604
2617
  transform: translate(75%, 0) rotate3d(0, 0, 1, -45deg) scale3d(1, 1, -1);
2605
2618
  transition: transform 300ms ease-in;
2606
2619
  flex-shrink: 0;
@@ -2611,6 +2624,12 @@ var dropdown_trans_styles_default = `/**
2611
2624
  button:hover::after {
2612
2625
  border-color: currentColor;
2613
2626
  }
2627
+ button.small {
2628
+ font-size: 0.875rem;
2629
+ }
2630
+ button:hover {
2631
+ background: var(--gds-ref-pallet-base300);
2632
+ }
2614
2633
  label {
2615
2634
  display: block;
2616
2635
  font-weight: 500;
@@ -2853,16 +2872,12 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2853
2872
  :host table {
2854
2873
  border-spacing: 0;
2855
2874
  }
2856
- @media (max-width: 35.98em) {
2857
- :host table {
2858
- width: 100%;
2859
- }
2860
- }
2861
2875
  :host table tr th,
2862
2876
  :host table tr td {
2863
- height: 2.5rem;
2877
+ height: 2.75rem;
2864
2878
  text-align: center;
2865
- width: 2.5rem;
2879
+ width: 2.75rem;
2880
+ box-sizing: border-box;
2866
2881
  }
2867
2882
  :host table thead th {
2868
2883
  background: var(--sg-bg-level-2);
@@ -2902,23 +2917,23 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2902
2917
  color: var(--gds-sys-color-font);
2903
2918
  cursor: pointer;
2904
2919
  }
2905
- :host table tbody tr td:focus-visible:not(.disabled) {
2906
- border: solid 1px var(--sg-bg-level-2);
2907
- border-radius: 4px;
2908
- cursor: pointer;
2909
- position: relative;
2910
- z-index: 0;
2911
- }
2912
- :host table tbody tr td:focus-visible:not(.disabled):focus:not(:focus-visible) {
2920
+ :host table tbody tr td:focus-visible:focus:not(:focus-visible) {
2913
2921
  box-shadow: none;
2914
2922
  outline: 0;
2915
2923
  }
2916
- :host table tbody tr td:focus-visible:not(.disabled):focus, :host table tbody tr td:focus-visible:not(.disabled):focus-visible {
2924
+ :host table tbody tr td:focus-visible:focus, :host table tbody tr td:focus-visible:focus-visible {
2917
2925
  outline-color: var(--gds-sys-color-focus-outline);
2918
2926
  outline-style: solid;
2919
2927
  outline-width: 0.125rem;
2920
2928
  outline-offset: 0.125rem;
2921
2929
  }
2930
+ :host table tbody tr td:focus-visible:not(.disabled) {
2931
+ border: solid 1px var(--sg-bg-level-2);
2932
+ border-radius: 4px;
2933
+ cursor: pointer;
2934
+ position: relative;
2935
+ z-index: 0;
2936
+ }
2922
2937
  :host table tbody tr td[aria-selected=true] {
2923
2938
  background: var(--gds-ref-pallet-base800);
2924
2939
  border: solid 1px var(--sg-bg-level-2);
@@ -2939,6 +2954,8 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2939
2954
  color: hsl(var(--sg-hsl-disabled-color));
2940
2955
  cursor: not-allowed;
2941
2956
  font-weight: 400;
2957
+ border-radius: 4px;
2958
+ border: solid 1px var(--sg-bg-level-2);
2942
2959
  }
2943
2960
  :host table tbody tr td.disabled.sg-date-holiday {
2944
2961
  color: hsla(var(--sg-hsl-red-2), 0.25);
@@ -2950,7 +2967,7 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2950
2967
  }
2951
2968
  @layer _modifiers {
2952
2969
  .week-number {
2953
- border-right: solid 1px var(--sg-grey-300);
2970
+ border-right: solid 1px var(--gds-ref-pallet-base300);
2954
2971
  font-weight: 400;
2955
2972
  pointer-events: none;
2956
2973
  }
@@ -3061,28 +3078,29 @@ i.sg-icon.sg-icon-ellipsis::before {
3061
3078
  }
3062
3079
  .field {
3063
3080
  border-radius: var(--sg-border-radius);
3081
+ border: solid var(--sg-border-width) var(--sg-border-color);
3082
+ --border-color: var(--sg-border-color);
3064
3083
  align-items: center;
3065
3084
  background-color: var(--sg-form-control-bg);
3066
3085
  box-sizing: border-box;
3067
3086
  color: var(--sg-text-primary);
3068
3087
  display: flex;
3069
- justify-content: center;
3070
3088
  justify-content: space-between;
3089
+ align-items: stretch;
3071
3090
  margin: 0.5rem 0;
3072
3091
  min-height: 2.75rem;
3092
+ cursor: text;
3093
+ }
3094
+ .field:hover {
3095
+ background-color: var(--gds-ref-pallet-base100);
3073
3096
  }
3074
3097
  .field .input {
3075
3098
  padding-left: 1rem;
3076
3099
  padding-right: 1rem;
3077
- padding-bottom: 0.75rem;
3078
- padding-top: 0.75rem;
3079
- border-top: solid var(--sg-border-width) var(--sg-border-color);
3080
- border-bottom: solid var(--sg-border-width) var(--sg-border-color);
3081
- border-left: solid var(--sg-border-width) var(--sg-border-color);
3082
- --border-color: var(--sg-border-color);
3083
- border-radius: var(--sg-border-radius) 0 0 var(--sg-border-radius);
3100
+ border-radius: var(--sg-border-radius);
3084
3101
  flex-grow: 1;
3085
- isolation: isolate;
3102
+ display: flex;
3103
+ align-items: center;
3086
3104
  }
3087
3105
  .field .input:focus:not(:focus-visible) {
3088
3106
  box-shadow: none;
@@ -3094,17 +3112,20 @@ i.sg-icon.sg-icon-ellipsis::before {
3094
3112
  outline-width: 0.125rem;
3095
3113
  outline-offset: 0.125rem;
3096
3114
  }
3097
- .field .input::-moz-selection {
3115
+ .field .input::-moz-selection, .field .input span::-moz-selection {
3098
3116
  background: transparent;
3099
3117
  }
3100
- .field .input::selection {
3118
+ .field .input::selection,
3119
+ .field .input span::selection {
3101
3120
  background: transparent;
3102
3121
  }
3103
- .field span {
3104
- cursor: text;
3122
+ .field .input.is-placeholder {
3123
+ opacity: 0;
3124
+ }
3125
+ .field .input.is-placeholder:hover, .field .input.is-placeholder:focus, .field .input.is-placeholder:has(:focus) {
3126
+ opacity: 0.7;
3105
3127
  }
3106
3128
  .field [role=spinbutton] {
3107
- cursor: text;
3108
3129
  display: inline-block;
3109
3130
  }
3110
3131
  .field [role=spinbutton]:focus {
@@ -3118,16 +3139,15 @@ i.sg-icon.sg-icon-ellipsis::before {
3118
3139
  background: transparent;
3119
3140
  }
3120
3141
  .field button {
3142
+ border-radius: var(--sg-border-radius);
3121
3143
  -webkit-appearance: none;
3122
3144
  -moz-appearance: none;
3123
3145
  appearance: none;
3124
- background: var(--intent-info-background);
3125
3146
  border: 0;
3126
- border-radius: 0 var(--sg-border-radius) var(--sg-border-radius) 0;
3127
3147
  box-sizing: border-box;
3128
3148
  cursor: pointer;
3129
- padding: 0.7rem 1rem;
3130
- width: 3rem;
3149
+ width: 2.75rem;
3150
+ background: transparent;
3131
3151
  }
3132
3152
  .field button:focus:not(:focus-visible) {
3133
3153
  box-shadow: none;
@@ -3139,8 +3159,23 @@ i.sg-icon.sg-icon-ellipsis::before {
3139
3159
  outline-width: 0.125rem;
3140
3160
  outline-offset: 0.125rem;
3141
3161
  }
3142
- .field button svg path {
3143
- fill: #fff;
3162
+ .field button:hover {
3163
+ background: var(--gds-ref-pallet-base300);
3164
+ }
3165
+ .field button svg {
3166
+ width: 1rem;
3167
+ height: 1rem;
3168
+ }
3169
+ .field button svg > * {
3170
+ fill: none;
3171
+ stroke: currentColor;
3172
+ stroke-linecap: round;
3173
+ stroke-linejoin: round;
3174
+ stroke-width: 2px;
3175
+ }
3176
+ .field.small {
3177
+ min-height: 2rem;
3178
+ font-size: 0.875rem;
3144
3179
  }
3145
3180
  :host(:invalid) .field + .form-info {
3146
3181
  position: relative;
@@ -3171,6 +3206,11 @@ i.sg-icon.sg-icon-ellipsis::before {
3171
3206
  display: flex;
3172
3207
  justify-content: space-between;
3173
3208
  }
3209
+ @media (max-width: 35.98em) {
3210
+ .header {
3211
+ padding-top: 0;
3212
+ }
3213
+ }
3174
3214
  .header > * {
3175
3215
  margin-left: 0.25rem;
3176
3216
  margin-right: 0.25rem;
@@ -3180,14 +3220,32 @@ i.sg-icon.sg-icon-ellipsis::before {
3180
3220
  flex: 1 1;
3181
3221
  }
3182
3222
  .header button {
3223
+ border-radius: var(--sg-border-radius);
3183
3224
  -webkit-appearance: none;
3184
3225
  -moz-appearance: none;
3185
3226
  appearance: none;
3186
3227
  background: transparent;
3187
3228
  border: 0;
3188
3229
  cursor: pointer;
3189
- padding: 0.7rem 1rem;
3190
- width: 3rem;
3230
+ padding: 0.5rem 0.5rem;
3231
+ width: 2.75rem;
3232
+ margin: 0.125rem 0.25rem;
3233
+ }
3234
+ .header button:focus:not(:focus-visible) {
3235
+ box-shadow: none;
3236
+ outline: 0;
3237
+ }
3238
+ .header button:focus, .header button:focus-visible {
3239
+ outline-color: var(--gds-sys-color-focus-outline);
3240
+ outline-style: solid;
3241
+ outline-width: 0.125rem;
3242
+ outline-offset: 0.125rem;
3243
+ }
3244
+ .header button:hover {
3245
+ background: var(--gds-ref-pallet-base300);
3246
+ }
3247
+ .header button:focus-visible {
3248
+ outline-offset: 0;
3191
3249
  }
3192
3250
  .header button .icon::before {
3193
3251
  background: none;
@@ -3195,16 +3253,16 @@ i.sg-icon.sg-icon-ellipsis::before {
3195
3253
  border-left: 2px solid;
3196
3254
  content: "";
3197
3255
  display: block;
3198
- height: 12px;
3256
+ height: 8px;
3199
3257
  margin-top: 2px;
3200
- width: 12px;
3258
+ width: 8px;
3201
3259
  }
3202
3260
  .header button .icon.prev::before {
3203
- margin-left: -4px;
3261
+ margin-left: 3px;
3204
3262
  transform: translate(75%) rotate(45deg) scaleZ(-1);
3205
3263
  }
3206
3264
  .header button .icon.next::before {
3207
- margin-left: -10px;
3265
+ margin-left: -1px;
3208
3266
  transform: translate(75%) rotate(-135deg) scaleZ(-1);
3209
3267
  }
3210
3268
  .footer {
@@ -3230,10 +3288,23 @@ i.sg-icon.sg-icon-ellipsis::before {
3230
3288
  font-weight: 500;
3231
3289
  padding: 0.5rem 0.75rem;
3232
3290
  }
3291
+ .footer button:focus:not(:focus-visible) {
3292
+ box-shadow: none;
3293
+ outline: 0;
3294
+ }
3295
+ .footer button:focus, .footer button:focus-visible {
3296
+ outline-color: var(--gds-sys-color-focus-outline);
3297
+ outline-style: solid;
3298
+ outline-width: 0.125rem;
3299
+ outline-offset: 0.125rem;
3300
+ }
3233
3301
  .footer button:hover {
3234
3302
  background: var(--intent-info-background);
3235
3303
  color: #fff;
3236
3304
  }
3305
+ .footer .clear {
3306
+ margin-right: auto;
3307
+ }
3237
3308
  }`;
3238
3309
 
3239
3310
  // libs/core/src/components/datepicker/datepicker.trans.styles.ts
@@ -3244,7 +3315,7 @@ function register6() {
3244
3315
  // libs/core/src/utils/helpers/custom-element-scoping.ts
3245
3316
  import { html as litHtml } from "lit";
3246
3317
  import { customElement } from "lit/decorators.js";
3247
- var VER_SUFFIX = "-f9a04d";
3318
+ var VER_SUFFIX = "-16d025";
3248
3319
  var elementLookupTable = /* @__PURE__ */ new Map();
3249
3320
  var templateCache = /* @__PURE__ */ new WeakMap();
3250
3321
  function applyElementScoping(strings, ...values) {
@@ -36,4 +36,4 @@ export declare function conditionToBeTrue(condition: () => boolean): Promise<voi
36
36
  export declare function isWebKit(): boolean;
37
37
  export declare function isChromium(): boolean;
38
38
  export declare function isFirefox(): boolean;
39
- export declare function onlyDate(date: Date): string;
39
+ export declare function onlyDate(date: Date | undefined): string | undefined;