@sebgroup/green-core 2.6.6 → 2.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.
@@ -94,7 +94,8 @@ let GdsCalendar = class extends GdsElement {
94
94
  aria-label="${ifDefined(this.label)}"
95
95
  class="${classMap({
96
96
  small: Boolean(this.size === "small"),
97
- indicators: Boolean(this.customizedDates)
97
+ indicators: Boolean(this.customizedDates),
98
+ "show-week-numbers": Boolean(this.showWeekNumbers)
98
99
  })}"
99
100
  >
100
101
  ${when(
@@ -12,9 +12,14 @@ const style = css`
12
12
  :host {
13
13
  display: flex;
14
14
  justify-content: center;
15
+ --columns: 7;
15
16
  }
16
17
 
17
- :host table {
18
+ table {
19
+ display: grid;
20
+ justify-items: center;
21
+ grid-template-columns: repeat(var(--columns), 1fr);
22
+ gap: var(--gds-sys-space-xs);
18
23
  border-spacing: var(--gds-sys-space-xs);
19
24
  flex-grow: 1;
20
25
  width: 100%;
@@ -39,127 +44,135 @@ const style = css`
39
44
  border-spacing: var(--gds-sys-space-xs) var(--gds-sys-space-l);
40
45
  }
41
46
  }
42
- }
43
47
 
44
- thead {
45
- th {
46
- height: var(--gds-sys-space-2xl);
47
- width: var(--gds-sys-space-2xl);
48
- box-sizing: border-box;
49
- text-align: center;
50
- font-weight: normal;
48
+ &.show-week-numbers {
49
+ --columns: 8;
51
50
  }
52
51
  }
53
52
 
53
+ tr,
54
+ thead,
54
55
  tbody {
55
- td {
56
- position: relative;
57
- width: var(--gds-sys-space-2xl);
58
- height: var(--gds-sys-space-2xl);
59
- box-sizing: border-box;
60
- text-align: center;
61
- user-select: none;
62
- border-width: var(--gds-sys-space-4xs);
63
- border-style: solid;
64
- border-color: transparent;
65
- border-radius: var(--gds-sys-radius-max);
66
- transition: background 0.2s;
67
- outline-style: solid;
68
- outline-color: transparent;
69
- outline-width: 0px;
70
- outline-offset: var(--gds-sys-space-4xs);
56
+ display: contents;
57
+ }
71
58
 
72
- &.short {
73
- width: var(--gds-sys-space-4xl);
74
- }
59
+ th,
60
+ td {
61
+ display: flex;
62
+ align-items: center;
63
+ justify-content: center;
64
+ height: var(--gds-sys-space-2xl);
65
+ width: var(--gds-sys-space-2xl);
66
+ box-sizing: border-box;
67
+ user-select: none;
68
+ }
75
69
 
76
- &.wide {
77
- width: var(--gds-sys-space-5xl);
78
- }
70
+ th {
71
+ font-weight: normal;
72
+ }
79
73
 
80
- &.long {
81
- width: var(--gds-sys-space-7xl);
82
- }
74
+ td {
75
+ position: relative;
76
+ border-width: var(--gds-sys-space-4xs);
77
+ border-style: solid;
78
+ border-color: transparent;
79
+ border-radius: var(--gds-sys-radius-max);
80
+ transition: background 0.2s;
81
+ outline-style: solid;
82
+ outline-color: transparent;
83
+ outline-width: 0px;
84
+ outline-offset: var(--gds-sys-space-4xs);
85
+
86
+ &.short {
87
+ width: var(--gds-sys-space-4xl);
88
+ }
83
89
 
84
- &:not(.disabled):hover,
85
- &[aria-selected='true'] {
86
- cursor: pointer;
87
- }
90
+ &.wide {
91
+ width: var(--gds-sys-space-5xl);
92
+ }
88
93
 
89
- &[aria-selected='true'] {
90
- color: var(--gds-sys-color-content-neutral-03);
91
- background: var(--gds-sys-color-l3-neutral-01);
92
- }
94
+ &.long {
95
+ width: var(--gds-sys-space-7xl);
96
+ }
93
97
 
94
- &:not(.disabled):hover {
95
- background: color-mix(
96
- in srgb,
97
- transparent,
98
- var(--gds-sys-color-state-neutral-05)
99
- );
100
- }
98
+ &:not(.disabled):hover,
99
+ &[aria-selected='true'] {
100
+ cursor: pointer;
101
+ }
101
102
 
102
- &[aria-selected='true']:not(.disabled):hover {
103
- background: color-mix(
104
- in srgb,
105
- var(--gds-sys-color-l3-neutral-01),
106
- var(--gds-sys-color-state-neutral-01)
107
- );
108
- }
103
+ &[aria-selected='true'] {
104
+ color: var(--gds-sys-color-content-neutral-03);
105
+ background: var(--gds-sys-color-l3-neutral-01);
106
+ }
109
107
 
110
- &.today {
111
- border-color: var(--gds-sys-color-border-strong);
112
- }
108
+ &:not(.disabled):hover {
109
+ background: color-mix(
110
+ in srgb,
111
+ transparent,
112
+ var(--gds-sys-color-state-neutral-05)
113
+ );
114
+ }
113
115
 
114
- &.disabled:not(.week-number) {
115
- background: var(--gds-sys-color-l3-disabled-01);
116
- color: var(--gds-sys-color-content-disabled-01);
117
- cursor: not-allowed;
118
- }
116
+ &[aria-selected='true']:not(.disabled):hover {
117
+ background: color-mix(
118
+ in srgb,
119
+ var(--gds-sys-color-l3-neutral-01),
120
+ var(--gds-sys-color-state-neutral-01)
121
+ );
122
+ }
119
123
 
120
- &.disabled.week-number {
121
- color: var(--gds-sys-color-content-neutral-02);
122
- cursor: default;
123
- }
124
+ &.today {
125
+ border-color: var(--gds-sys-color-border-strong);
126
+ }
124
127
 
125
- &[aria-selected='false']:active:not(.disabled) {
126
- background: color-mix(
127
- in srgb,
128
- transparent,
129
- var(--gds-sys-color-state-neutral-06)
130
- );
131
- }
128
+ &.disabled:not(.week-number) {
129
+ background: var(--gds-sys-color-l3-disabled-01);
130
+ color: var(--gds-sys-color-content-disabled-01);
131
+ cursor: not-allowed;
132
+ }
132
133
 
133
- &[aria-selected='true']:active:not(.disabled) {
134
- background: color-mix(
135
- in srgb,
136
- var(--gds-sys-color-l3-neutral-01),
137
- var(--gds-sys-color-state-neutral-02)
138
- );
139
- }
134
+ &.disabled.week-number {
135
+ color: var(--gds-sys-color-content-neutral-02);
136
+ cursor: default;
137
+ }
140
138
 
141
- &:focus-visible {
142
- outline-color: var(--gds-sys-color-content-neutral-01);
143
- outline-width: var(--gds-sys-space-4xs);
144
- }
139
+ &[aria-selected='false']:active:not(.disabled) {
140
+ background: color-mix(
141
+ in srgb,
142
+ transparent,
143
+ var(--gds-sys-color-state-neutral-06)
144
+ );
145
+ }
145
146
 
146
- &.small {
147
- width: var(--gds-sys-space-xl);
148
- height: var(--gds-sys-space-xl);
149
- font: var(--gds-sys-text-body-book-s);
150
- line-height: var(--gds-sys-text-line-height-detail-s);
147
+ &[aria-selected='true']:active:not(.disabled) {
148
+ background: color-mix(
149
+ in srgb,
150
+ var(--gds-sys-color-l3-neutral-01),
151
+ var(--gds-sys-color-state-neutral-02)
152
+ );
153
+ }
154
+
155
+ &:focus-visible {
156
+ outline-color: var(--gds-sys-color-content-neutral-01);
157
+ outline-width: var(--gds-sys-space-4xs);
158
+ }
159
+
160
+ &.small {
161
+ width: var(--gds-sys-space-xl);
162
+ height: var(--gds-sys-space-xl);
163
+ font: var(--gds-sys-text-body-book-s);
164
+ line-height: var(--gds-sys-text-line-height-detail-s);
151
165
 
152
- &.short {
153
- width: var(--gds-sys-space-2xl);
154
- }
166
+ &.short {
167
+ width: var(--gds-sys-space-2xl);
168
+ }
155
169
 
156
- &.wide {
157
- width: var(--gds-sys-space-3xl);
158
- }
170
+ &.wide {
171
+ width: var(--gds-sys-space-3xl);
172
+ }
159
173
 
160
- &.long {
161
- width: var(--gds-sys-space-6xl);
162
- }
174
+ &.long {
175
+ width: var(--gds-sys-space-6xl);
163
176
  }
164
177
  }
165
178
 
@@ -396,8 +396,8 @@ let Datepicker = class extends GdsFormControlElement {
396
396
  <gds-flex
397
397
  align-items="center"
398
398
  justify-content="space-between"
399
- gap="s"
400
- padding="m m 0 m"
399
+ gap="xs; xs { s }"
400
+ padding="m xs 0 xs; xs { m m 0 m }"
401
401
  >
402
402
  <gds-button
403
403
  @click=${__privateGet(this, _handleDecrementFocusedMonth)}
@@ -499,7 +499,7 @@ let Datepicker = class extends GdsFormControlElement {
499
499
  !this.hideTodayButton,
500
500
  () => html` <gds-button
501
501
  id="today-button"
502
- rank="primary"
502
+ rank="tertiary"
503
503
  size="small"
504
504
  @click=${(e) => {
505
505
  e.stopPropagation();
@@ -40,7 +40,7 @@ let GdsFilterChips = class extends GdsFormControlElement {
40
40
  this.value = [...this.value, clickedChip.value];
41
41
  }
42
42
  } else {
43
- this.value = clickedChip.value;
43
+ this.value = clickedChip.value === this.value ? void 0 : clickedChip.value;
44
44
  }
45
45
  this.dispatchCustomEvent("change", {
46
46
  detail: { clickedChip, value: this.value },
@@ -102,7 +102,6 @@ let GdsFilterChips = class extends GdsFormControlElement {
102
102
  }
103
103
  }
104
104
  _updateSelectedFromValue() {
105
- if (!this.value) return;
106
105
  if (this.multiple && !Array.isArray(this.value)) {
107
106
  this.value = [this.value];
108
107
  }
@@ -14,7 +14,6 @@ const style = css`
14
14
  :host([open]) dialog {
15
15
  opacity: 1;
16
16
  box-sizing: border-box;
17
- /*transform: translate3d(0, 0, 0);*/
18
17
  visibility: visible;
19
18
  }
20
19
 
@@ -48,7 +47,6 @@ const style = css`
48
47
  bottom: 0;
49
48
  left: 0;
50
49
 
51
- max-height: 50svh;
52
50
  padding-bottom: 0;
53
51
 
54
52
  transform: translateY(0);
package/gds-element.js CHANGED
@@ -14,7 +14,7 @@ class GdsElement extends LitElement {
14
14
  /**
15
15
  * The semantic version of this element. Can be used for troubleshooting to verify the version being used.
16
16
  */
17
- this.semanticVersion = "2.6.6";
17
+ this.semanticVersion = "2.7.0";
18
18
  this._isUsingTransitionalStyles = false;
19
19
  this._dynamicStylesController = new DynamicStylesController(this);
20
20
  }
@@ -14,10 +14,10 @@ export * from './dialog/index.js';
14
14
  export * from './div/index.js';
15
15
  export * from './divider/index.js';
16
16
  export * from './dropdown/index.js';
17
- export * from './fab/index.js';
18
17
  export * from './filter-chips/index.js';
19
- export * from './form-summary/index.js';
18
+ export * from './fab/index.js';
20
19
  export * from './flex/index.js';
20
+ export * from './form-summary/index.js';
21
21
  export * from './grid/index.js';
22
22
  export * from './grouped-list/index.js';
23
23
  export * from './list-item/index.js';
@@ -52,8 +52,8 @@ export * from './formatted-number/index.js';
52
52
  export * from './radio-group/index.js';
53
53
  export * from './segment/index.js';
54
54
  export * from './sensitive-account/index.js';
55
- export * from './sensitive-date/index.js';
56
55
  export * from './sensitive-number/index.js';
56
+ export * from './sensitive-date/index.js';
57
57
  export * from './icons/icon-ai/index.js';
58
58
  export * from './icons/icon-airplane-up/index.js';
59
59
  export * from './icons/icon-archive/index.js';
@@ -14,10 +14,10 @@ export * from "./dialog/index.js";
14
14
  export * from "./div/index.js";
15
15
  export * from "./divider/index.js";
16
16
  export * from "./dropdown/index.js";
17
- export * from "./fab/index.js";
18
17
  export * from "./filter-chips/index.js";
19
- export * from "./form-summary/index.js";
18
+ export * from "./fab/index.js";
20
19
  export * from "./flex/index.js";
20
+ export * from "./form-summary/index.js";
21
21
  export * from "./grid/index.js";
22
22
  export * from "./grouped-list/index.js";
23
23
  export * from "./list-item/index.js";
@@ -52,8 +52,8 @@ export * from "./formatted-number/index.js";
52
52
  export * from "./radio-group/index.js";
53
53
  export * from "./segment/index.js";
54
54
  export * from "./sensitive-account/index.js";
55
- export * from "./sensitive-date/index.js";
56
55
  export * from "./sensitive-number/index.js";
56
+ export * from "./sensitive-date/index.js";
57
57
  export * from "./icons/icon-ai/index.js";
58
58
  export * from "./icons/icon-airplane-up/index.js";
59
59
  export * from "./icons/icon-archive/index.js";
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": "2.6.6",
4
+ "version": "2.7.0",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  import "../../chunks/chunk.QU3DSPNU.js";
2
2
  import { html as litHtml } from "lit";
3
- const VER_SUFFIX = "-eaa8fd";
3
+ const VER_SUFFIX = "-32727e";
4
4
  class ScopedElementRegistry {
5
5
  static get instance() {
6
6
  if (!globalThis.__gdsElementLookupTable?.[VER_SUFFIX])