@sebgroup/green-core 1.9.0 → 1.9.2

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/index.js CHANGED
@@ -144,7 +144,7 @@ function watchMediaQuery(q) {
144
144
  // libs/core/src/utils/helpers/custom-element-scoping.ts
145
145
  import { html as litHtml } from "lit";
146
146
  import { customElement } from "lit/decorators.js";
147
- var VER_SUFFIX = "-af766e";
147
+ var VER_SUFFIX = "-2d68d7";
148
148
  var elementLookupTable = /* @__PURE__ */ new Map();
149
149
  var gdsCustomElement = (tagName) => {
150
150
  if (globalThis.GDS_DISABLE_VERSIONED_ELEMENTS) {
@@ -1315,7 +1315,7 @@ var GdsDropdown = class extends GdsFormControlElement {
1315
1315
  this._handleValueChange();
1316
1316
  return;
1317
1317
  }
1318
- if (!this.value) {
1318
+ if (this.value === void 0) {
1319
1319
  if (this.placeholder)
1320
1320
  this.value = this.placeholder.value;
1321
1321
  else
@@ -1761,7 +1761,10 @@ var GdsCalendar = class extends GdsElement {
1761
1761
  return this.focusedDate.getMonth();
1762
1762
  }
1763
1763
  set focusedMonth(month) {
1764
- this.focusedDate = new Date(this.focusedDate.setMonth(month));
1764
+ const newDate = new Date(this.focusedDate);
1765
+ newDate.setMonth(month);
1766
+ newDate.setHours(0, 0, 0, 0);
1767
+ this.focusedDate = newDate;
1765
1768
  }
1766
1769
  get focusedYear() {
1767
1770
  return this.focusedDate.getFullYear();
@@ -2275,6 +2278,10 @@ var GdsDatepicker = class extends GdsFormControlElement {
2275
2278
  this.open = e.detail.open;
2276
2279
  if (e.detail.reason === "close") {
2277
2280
  this.value = (await this._elCalendar).value;
2281
+ if (this.value) {
2282
+ this._focusedMonth = this.value.getMonth();
2283
+ this._focusedYear = this.value.getFullYear();
2284
+ }
2278
2285
  __privateMethod(this, _dispatchChangeEvent2, dispatchChangeEvent_fn2).call(this);
2279
2286
  }
2280
2287
  if (e.detail.reason === "cancel") {
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.9.0",
4
+ "version": "1.9.2",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "type": "module",
@@ -89,25 +89,25 @@ var option_trans_styles_default = `/**
89
89
  user-select: none;
90
90
  }
91
91
  :host:hover, :host:focus-visible {
92
- background-color: var(--gds-ref-pallet-base200);
92
+ background-color: var(--grey-400);
93
93
  }
94
94
  :host:active {
95
- background-color: var(--gds-ref-pallet-base300);
95
+ background-color: var(--grey-400);
96
96
  }
97
97
  :host:focus {
98
98
  outline-color: #000;
99
99
  outline-offset: -0.25rem;
100
100
  }
101
101
  :host.active.sg-highlighted, :host[aria-selected=true] {
102
- background: var(--gds-ref-pallet-base800);
102
+ background: var(--grey-1000);
103
103
  color: #fff;
104
104
  }
105
105
  :host(:hover),
106
106
  :host(:focus-visible) {
107
- background-color: var(--gds-ref-pallet-base200);
107
+ background-color: var(--grey-400);
108
108
  }
109
109
  :host(:active) {
110
- background-color: var(--gds-ref-pallet-base300);
110
+ background-color: var(--grey-500);
111
111
  }
112
112
  :host(:focus) {
113
113
  outline-color: #000;
@@ -117,7 +117,7 @@ var option_trans_styles_default = `/**
117
117
  display: none;
118
118
  }
119
119
  :host([highlighted]) {
120
- background: var(--gds-ref-pallet-base800);
120
+ background: var(--grey-1000);
121
121
  color: #fff;
122
122
  }
123
123
  .checkbox {
@@ -662,6 +662,7 @@ button[type=button]:where(:not(.primary,
662
662
  button[type=reset]:where(:not(.primary, .tertiary, .ghost, .danger, .close, .link)):disabled,
663
663
  button[type=reset]:where(:not(.primary, .tertiary, .ghost, .danger, .close, .link)).disabled,
664
664
  button[type=reset]:where(:not(.primary, .tertiary, .ghost, .danger, .close, .link))[aria-disabled=true] {
665
+ background: var(--sg-form-control-bg-disabled) !important;
665
666
  color: var(--text-disabled-color) !important;
666
667
  border-color: var(--border-disabled-color) !important;
667
668
  cursor: not-allowed;
@@ -1000,6 +1001,7 @@ button.tertiary[aria-disabled=true],
1000
1001
  a.button.tertiary:disabled,
1001
1002
  a.button.tertiary.disabled,
1002
1003
  a.button.tertiary[aria-disabled=true] {
1004
+ background: var(--sg-form-control-bg-disabled) !important;
1003
1005
  color: var(--text-disabled-color) !important;
1004
1006
  border-color: var(--border-disabled-color) !important;
1005
1007
  cursor: not-allowed;
@@ -2086,6 +2088,7 @@ a.button.tertiary.danger:focus-visible {
2086
2088
  overflow: hidden;
2087
2089
  padding: 0;
2088
2090
  right: 0;
2091
+ color: var(--text-primary-color);
2089
2092
  }
2090
2093
  @media (max-width: 35.98em) {
2091
2094
  dialog {
@@ -2104,8 +2107,8 @@ a.button.tertiary.danger:focus-visible {
2104
2107
  dialog {
2105
2108
  padding-bottom: 0;
2106
2109
  border: solid var(--sg-border-width) var(--sg-border-color);
2107
- --border-color: var(--gds-ref-pallet-base800);
2108
- --sg-border-color: var(--gds-ref-pallet-base800);
2110
+ --border-color: var(--text-primary-color);
2111
+ --sg-border-color: var(--text-primary-color);
2109
2112
  border-radius: var(--sg-border-radius);
2110
2113
  max-height: 500px;
2111
2114
  box-shadow: var(--sg-popover-box-shadow);
@@ -2503,8 +2506,8 @@ var dropdown_trans_styles_default = `/**
2503
2506
  padding-top: 0.75rem;
2504
2507
  border-radius: var(--sg-border-radius);
2505
2508
  border: solid var(--sg-border-width) var(--sg-border-color);
2506
- --border-color: var(--gds-ref-pallet-base600);
2507
- --sg-border-color: var(--gds-ref-pallet-base600);
2509
+ --border-color: var(--grey-800);
2510
+ --sg-border-color: var(--grey-800);
2508
2511
  background: var(--sg-form-control-bg);
2509
2512
  color: var(--text-primary-color);
2510
2513
  min-height: 2.75rem;
@@ -2576,6 +2579,7 @@ var dropdown_trans_styles_default = `/**
2576
2579
  border-color: rgb(0, 122, 199);
2577
2580
  }
2578
2581
  button:disabled, button.disabled, button[aria-disabled=true] {
2582
+ background: var(--sg-form-control-bg-disabled) !important;
2579
2583
  color: var(--text-disabled-color) !important;
2580
2584
  border-color: var(--border-disabled-color) !important;
2581
2585
  cursor: not-allowed;
@@ -2598,11 +2602,11 @@ var dropdown_trans_styles_default = `/**
2598
2602
  }
2599
2603
  }
2600
2604
  button:not(:disabled, .disabled, [aria-disabled]):hover {
2601
- --background: var(--gds-ref-pallet-base200);
2602
- --color: var(--gds-ref-pallet-base800);
2603
- background-color: var(--gds-ref-pallet-base200);
2604
- color: var(--gds-ref-pallet-base800);
2605
- border-color: var(--gds-ref-pallet-base800);
2605
+ --background: var(--grey-400);
2606
+ --color: var(--grey-1000);
2607
+ background-color: var(--grey-400);
2608
+ color: var(--grey-1000);
2609
+ border-color: var(--grey-1000);
2606
2610
  }
2607
2611
  button > span {
2608
2612
  white-space: nowrap;
@@ -2612,8 +2616,8 @@ var dropdown_trans_styles_default = `/**
2612
2616
  button::after {
2613
2617
  margin-left: 0.5rem;
2614
2618
  margin-right: 0.5rem;
2615
- border-bottom: solid 2px var(--gds-ref-pallet-base800);
2616
- border-left: solid 2px var(--gds-ref-pallet-base800);
2619
+ border-bottom: solid 2px var(--text-primary-color);
2620
+ border-left: solid 2px var(--text-primary-color);
2617
2621
  content: "";
2618
2622
  display: block;
2619
2623
  height: 0.5rem;
@@ -2634,7 +2638,7 @@ var dropdown_trans_styles_default = `/**
2634
2638
  font-size: 0.875rem;
2635
2639
  }
2636
2640
  button:hover {
2637
- background: var(--gds-ref-pallet-base300);
2641
+ background: var(--grey-400);
2638
2642
  }
2639
2643
  label {
2640
2644
  display: block;
@@ -2913,11 +2917,11 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2913
2917
  :host table tbody tr td.today {
2914
2918
  background: transparent;
2915
2919
  border-radius: 4px;
2916
- color: var(--gds-ref-pallet-base800);
2917
- box-shadow: inset 0 0 0 2px var(--gds-ref-pallet-base800);
2920
+ color: var(--grey-1000);
2921
+ box-shadow: inset 0 0 0 2px var(--grey-1000);
2918
2922
  }
2919
2923
  :host table tbody tr td:hover:not(.disabled) {
2920
- background: var(--gds-ref-pallet-base300);
2924
+ background: var(--grey-500);
2921
2925
  border: solid 1px var(--sg-bg-level-2);
2922
2926
  border-radius: 4px;
2923
2927
  color: var(--gds-sys-color-font);
@@ -2941,7 +2945,7 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2941
2945
  z-index: 0;
2942
2946
  }
2943
2947
  :host table tbody tr td[aria-selected=true] {
2944
- background: var(--gds-ref-pallet-base800);
2948
+ background: var(--grey-1000);
2945
2949
  border: solid 1px var(--sg-bg-level-2);
2946
2950
  border-radius: 4px;
2947
2951
  color: hsl(var(--sg-hsl-white));
@@ -2950,7 +2954,7 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2950
2954
  border-radius: 4px;
2951
2955
  }
2952
2956
  :host table tbody tr td:hover:active:not(.disabled) {
2953
- background: var(--gds-ref-pallet-base800);
2957
+ background: var(--grey-1000);
2954
2958
  border: solid 1px var(--sg-bg-level-2);
2955
2959
  border-radius: 4px;
2956
2960
  color: hsl(var(--sg-hsl-white));
@@ -3098,7 +3102,7 @@ i.sg-icon.sg-icon-ellipsis::before {
3098
3102
  cursor: text;
3099
3103
  }
3100
3104
  .field:hover {
3101
- background-color: var(--gds-ref-pallet-base100);
3105
+ background-color: var(--grey-200);
3102
3106
  }
3103
3107
  .field .input {
3104
3108
  padding-left: 1rem;
@@ -3154,6 +3158,7 @@ i.sg-icon.sg-icon-ellipsis::before {
3154
3158
  cursor: pointer;
3155
3159
  width: 2.75rem;
3156
3160
  background: transparent;
3161
+ color: var(--text-primary-color);
3157
3162
  }
3158
3163
  .field button:focus:not(:focus-visible) {
3159
3164
  box-shadow: none;
@@ -3166,7 +3171,7 @@ i.sg-icon.sg-icon-ellipsis::before {
3166
3171
  outline-offset: 0.125rem;
3167
3172
  }
3168
3173
  .field button:hover {
3169
- background: var(--gds-ref-pallet-base300);
3174
+ background: var(--grey-500);
3170
3175
  }
3171
3176
  .field button svg {
3172
3177
  width: 1rem;
@@ -3248,15 +3253,15 @@ i.sg-icon.sg-icon-ellipsis::before {
3248
3253
  outline-offset: 0.125rem;
3249
3254
  }
3250
3255
  .header button:hover {
3251
- background: var(--gds-ref-pallet-base300);
3256
+ background: var(--grey-400);
3252
3257
  }
3253
3258
  .header button:focus-visible {
3254
3259
  outline-offset: 0;
3255
3260
  }
3256
3261
  .header button .icon::before {
3257
3262
  background: none;
3258
- border-bottom: 2px solid;
3259
- border-left: 2px solid;
3263
+ border-bottom: 2px solid var(--grey-1000);
3264
+ border-left: 2px solid var(--grey-1000);
3260
3265
  content: "";
3261
3266
  display: block;
3262
3267
  height: 8px;
@@ -3353,7 +3358,7 @@ function register7() {
3353
3358
  // libs/core/src/utils/helpers/custom-element-scoping.ts
3354
3359
  import { html as litHtml } from "lit";
3355
3360
  import { customElement } from "lit/decorators.js";
3356
- var VER_SUFFIX = "-af766e";
3361
+ var VER_SUFFIX = "-2d68d7";
3357
3362
  var elementLookupTable = /* @__PURE__ */ new Map();
3358
3363
  var templateCache = /* @__PURE__ */ new WeakMap();
3359
3364
  function applyElementScoping(strings, ...values) {