@sebgroup/green-core 1.9.0 → 1.9.1

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 = "-260c87";
148
148
  var elementLookupTable = /* @__PURE__ */ new Map();
149
149
  var gdsCustomElement = (tagName) => {
150
150
  if (globalThis.GDS_DISABLE_VERSIONED_ELEMENTS) {
@@ -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.1",
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 {
@@ -2086,6 +2086,7 @@ a.button.tertiary.danger:focus-visible {
2086
2086
  overflow: hidden;
2087
2087
  padding: 0;
2088
2088
  right: 0;
2089
+ color: var(--text-primary-color);
2089
2090
  }
2090
2091
  @media (max-width: 35.98em) {
2091
2092
  dialog {
@@ -2104,8 +2105,8 @@ a.button.tertiary.danger:focus-visible {
2104
2105
  dialog {
2105
2106
  padding-bottom: 0;
2106
2107
  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);
2108
+ --border-color: var(--text-primary-color);
2109
+ --sg-border-color: var(--text-primary-color);
2109
2110
  border-radius: var(--sg-border-radius);
2110
2111
  max-height: 500px;
2111
2112
  box-shadow: var(--sg-popover-box-shadow);
@@ -2503,8 +2504,8 @@ var dropdown_trans_styles_default = `/**
2503
2504
  padding-top: 0.75rem;
2504
2505
  border-radius: var(--sg-border-radius);
2505
2506
  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);
2507
+ --border-color: var(--grey-800);
2508
+ --sg-border-color: var(--grey-800);
2508
2509
  background: var(--sg-form-control-bg);
2509
2510
  color: var(--text-primary-color);
2510
2511
  min-height: 2.75rem;
@@ -2598,11 +2599,11 @@ var dropdown_trans_styles_default = `/**
2598
2599
  }
2599
2600
  }
2600
2601
  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);
2602
+ --background: var(--grey-400);
2603
+ --color: var(--grey-1000);
2604
+ background-color: var(--grey-400);
2605
+ color: var(--grey-1000);
2606
+ border-color: var(--grey-1000);
2606
2607
  }
2607
2608
  button > span {
2608
2609
  white-space: nowrap;
@@ -2612,8 +2613,8 @@ var dropdown_trans_styles_default = `/**
2612
2613
  button::after {
2613
2614
  margin-left: 0.5rem;
2614
2615
  margin-right: 0.5rem;
2615
- border-bottom: solid 2px var(--gds-ref-pallet-base800);
2616
- border-left: solid 2px var(--gds-ref-pallet-base800);
2616
+ border-bottom: solid 2px var(--text-primary-color);
2617
+ border-left: solid 2px var(--text-primary-color);
2617
2618
  content: "";
2618
2619
  display: block;
2619
2620
  height: 0.5rem;
@@ -2634,7 +2635,7 @@ var dropdown_trans_styles_default = `/**
2634
2635
  font-size: 0.875rem;
2635
2636
  }
2636
2637
  button:hover {
2637
- background: var(--gds-ref-pallet-base300);
2638
+ background: var(--grey-400);
2638
2639
  }
2639
2640
  label {
2640
2641
  display: block;
@@ -2913,11 +2914,11 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2913
2914
  :host table tbody tr td.today {
2914
2915
  background: transparent;
2915
2916
  border-radius: 4px;
2916
- color: var(--gds-ref-pallet-base800);
2917
- box-shadow: inset 0 0 0 2px var(--gds-ref-pallet-base800);
2917
+ color: var(--grey-1000);
2918
+ box-shadow: inset 0 0 0 2px var(--grey-1000);
2918
2919
  }
2919
2920
  :host table tbody tr td:hover:not(.disabled) {
2920
- background: var(--gds-ref-pallet-base300);
2921
+ background: var(--grey-500);
2921
2922
  border: solid 1px var(--sg-bg-level-2);
2922
2923
  border-radius: 4px;
2923
2924
  color: var(--gds-sys-color-font);
@@ -2941,7 +2942,7 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2941
2942
  z-index: 0;
2942
2943
  }
2943
2944
  :host table tbody tr td[aria-selected=true] {
2944
- background: var(--gds-ref-pallet-base800);
2945
+ background: var(--grey-1000);
2945
2946
  border: solid 1px var(--sg-bg-level-2);
2946
2947
  border-radius: 4px;
2947
2948
  color: hsl(var(--sg-hsl-white));
@@ -2950,7 +2951,7 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2950
2951
  border-radius: 4px;
2951
2952
  }
2952
2953
  :host table tbody tr td:hover:active:not(.disabled) {
2953
- background: var(--gds-ref-pallet-base800);
2954
+ background: var(--grey-1000);
2954
2955
  border: solid 1px var(--sg-bg-level-2);
2955
2956
  border-radius: 4px;
2956
2957
  color: hsl(var(--sg-hsl-white));
@@ -3098,7 +3099,7 @@ i.sg-icon.sg-icon-ellipsis::before {
3098
3099
  cursor: text;
3099
3100
  }
3100
3101
  .field:hover {
3101
- background-color: var(--gds-ref-pallet-base100);
3102
+ background-color: var(--grey-200);
3102
3103
  }
3103
3104
  .field .input {
3104
3105
  padding-left: 1rem;
@@ -3154,6 +3155,7 @@ i.sg-icon.sg-icon-ellipsis::before {
3154
3155
  cursor: pointer;
3155
3156
  width: 2.75rem;
3156
3157
  background: transparent;
3158
+ color: var(--text-primary-color);
3157
3159
  }
3158
3160
  .field button:focus:not(:focus-visible) {
3159
3161
  box-shadow: none;
@@ -3166,7 +3168,7 @@ i.sg-icon.sg-icon-ellipsis::before {
3166
3168
  outline-offset: 0.125rem;
3167
3169
  }
3168
3170
  .field button:hover {
3169
- background: var(--gds-ref-pallet-base300);
3171
+ background: var(--grey-500);
3170
3172
  }
3171
3173
  .field button svg {
3172
3174
  width: 1rem;
@@ -3248,15 +3250,15 @@ i.sg-icon.sg-icon-ellipsis::before {
3248
3250
  outline-offset: 0.125rem;
3249
3251
  }
3250
3252
  .header button:hover {
3251
- background: var(--gds-ref-pallet-base300);
3253
+ background: var(--grey-400);
3252
3254
  }
3253
3255
  .header button:focus-visible {
3254
3256
  outline-offset: 0;
3255
3257
  }
3256
3258
  .header button .icon::before {
3257
3259
  background: none;
3258
- border-bottom: 2px solid;
3259
- border-left: 2px solid;
3260
+ border-bottom: 2px solid var(--grey-1000);
3261
+ border-left: 2px solid var(--grey-1000);
3260
3262
  content: "";
3261
3263
  display: block;
3262
3264
  height: 8px;
@@ -3353,7 +3355,7 @@ function register7() {
3353
3355
  // libs/core/src/utils/helpers/custom-element-scoping.ts
3354
3356
  import { html as litHtml } from "lit";
3355
3357
  import { customElement } from "lit/decorators.js";
3356
- var VER_SUFFIX = "-af766e";
3358
+ var VER_SUFFIX = "-260c87";
3357
3359
  var elementLookupTable = /* @__PURE__ */ new Map();
3358
3360
  var templateCache = /* @__PURE__ */ new WeakMap();
3359
3361
  function applyElementScoping(strings, ...values) {