@sebgroup/green-core 1.6.0 → 1.8.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.
package/README.md CHANGED
@@ -1,112 +1,75 @@
1
- # ![image](https://user-images.githubusercontent.com/11420341/121186039-f6eeda00-c866-11eb-9d80-21d01d065f0a.png) green
1
+ <h1 align="center">
2
+ <a href="https://seb.io">
3
+ <img src="https://github.com/sebgroup/green/assets/11420341/2fc122ba-54fc-4f22-b96d-d405079d6e50">
4
+ </a>
5
+ <br/>
6
+ <br/>
7
+ Green Design System
8
+ </h1>
2
9
 
3
- Green is an opinionated design system for building content and functionality for SEB. It builds on a set of principles and techniques aimed at maximizing code quality, code reuse, consistency and collaboration.
10
+ <p align="center">Green is an open-source design system built by SEB.<p>
11
+ <p align="center"><a href="https://github.com/sebgroup/green/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache2.0-005FAC"/></a> <a href="https://semver.org/"><img src="https://img.shields.io/badge/semantic%20versioning-006D31"/></a> <a href="https://nx.dev/"><img src="https://img.shields.io/badge/maintained%20with-nx-006D31"/></a> <a href="https://github.com/sebgroup/green/blob/main/CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-006D31"/></a></p>
4
12
 
13
+ ## Getting started
5
14
 
6
- ## View
15
+ If you are new to Green, checkout [@sebgroup/green-core](https://github.com/sebgroup/green/tree/main/libs/core).
7
16
 
8
- View the components in our [Storybook](https://sebgroup.github.io/green/latest/chlorophyll/)
17
+ We also provide components for the following technologies:
9
18
 
19
+ - [React](https://github.com/sebgroup/green/tree/main/libs/react)
20
+ - [Angular](https://github.com/sebgroup/green/tree/main/libs/react)
10
21
 
11
- ## Philosophy
22
+ If you're trying to find something specific, here's a full list of packages that we support!
12
23
 
13
- Dream big! Start small! Learn fast!
24
+ | Package name | Description |
25
+ | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
26
+ | [@sebgroup/green-core](https://github.com/sebgroup/green/tree/main/libs/core) | Webcomponent library built with [Lit](https://lit.dev) |
27
+ | [@sebgroup/green-react](https://github.com/sebgroup/green/tree/main/libs/react) | React component library |
28
+ | [@sebgroup/green-angular](https://github.com/sebgroup/green/tree/main/libs/angular) | Angular component library |
29
+ | [@sebgroup/chlorophyll](https://github.com/sebgroup/green/tree/main/libs/chlorophyll) | Styling framework |
30
+ | [@sebgroup/green-tokens](https://github.com/sebgroup/green/tree/main/libs/tokens) | Design Tokens package |
31
+ | [@sebgroup/green-charts](https://github.com/sebgroup/green/tree/main/libs/charts) | An SEB wrapper of [Billboard.js](https://naver.github.io/billboard.js/) |
32
+ | [@sebgroup/green-react-charts](https://github.com/sebgroup/green/tree/main/libs/react-charts) | A React version of the charts wrapper |
33
+ | [@sebgroup/green-angular-charts](https://github.com/sebgroup/green/tree/main/libs/angular-charts) | An Angular version of the charts wrapper |
14
34
 
35
+ ## 📋 Table of content
15
36
 
16
- ### We only build what we need
37
+ - [Documentation](https://github.com/sebgroup/green/tree/main?tab=readme-ov-file#documentation)
38
+ - [Working from SEB](https://github.com/sebgroup/green/tree/main?tab=readme-ov-file#working-from-seb)
39
+ - [Contribute](https://github.com/sebgroup/green/tree/main?tab=readme-ov-file#contribute)
40
+ - [Working locally with this repo](https://github.com/sebgroup/green/tree/main?tab=readme-ov-file#working-locally-with-this-repo)
17
41
 
18
- If no-one needs a component, we will not build it. If someone needs a component, we will build it. This means that some things in Design Library might not make it into Green. It all depends on what gets used.
42
+ ## 📚 Documentation
19
43
 
44
+ Documentation currently resides in a few different locations:
20
45
 
21
- ### Ease of use, not ease of build
46
+ - [User Interface Guidelines (Design Library)](https://designlibrary.sebgroup.com/)
47
+ - [Storybook (@sebgroup/chlorophyll)](https://sebgroup.github.io/green/latest/chlorophyll/)
48
+ - [Storybook (@sebgroup/green-core)](https://sebgroup.github.io/green/latest/core/)
49
+ - [Storybook (@sebgroup/green-react)](https://sebgroup.github.io/green/latest/react/)
50
+ - [Storybook (@sebgroup/green-angular)](https://sebgroup.github.io/green/latest/angular/)
22
51
 
23
- The components of Green will be used more times than one. This puts a multiplier on the value of every hour spent improving ease of use.
52
+ ## 🏦 Working from SEB
24
53
 
54
+ Working from SEB and on SEB machines you need to setup things in a specific way for everything to work smooth. Checkout our [Developer Guidelines](https://github.sebank.se/pages/seb-common/Developer-garden/detail_pages/green.html) over at Developer Garden.
25
55
 
26
- ### Minimum possible flexibility, but _not_ less
56
+ ## 🎉 Contribute
27
57
 
28
- Flexibility means decisions must be made. This puts strain on every user of a system. Green goes the other way: Minimum flexibility, maximum clarity. If our users cannot do what they need, we solve that specific problem in a generalized way - no more, no less. Remember: The most flexible system possible is your terminal.
58
+ We're always looking for contributors to help us fix bugs, build new features, or help us improve the project documentation. If you're interested, definitely check out our [Contributing Guide](https://github.com/sebgroup/green/blob/main/CONTRIBUTING.md)! 👀
29
59
 
60
+ ## 🔨 Working locally with this repo
30
61
 
31
- ### We don't solve problems we do not have
62
+ ### Start Storybook locally
32
63
 
33
- If something _might_ be a performance problem, that is ok. If something _might_ give a to large payload, that is ok. When we suspect a problem, we measure it. If it _is_ a problem, we fix it. See [premature optimization](https://xkcd.com/1691/)
34
-
35
-
36
- ### We work from right to left
37
-
38
- If something can be deployed, we deploy. Then, if a PR needs a review, we review. Then, and only then, if something can be built, we build. Flow is more important than speed.
39
-
40
-
41
- ## The design process
42
-
43
- Green is tightly integrated with the design process. The design responsible are part of the team so that decisions can be made effectively and by those most suited.
44
-
45
- For the most part we follow the existing design. When changes have to be made for practical reasons, clarity, uniformity, accessibility or any other reason, the design responsible make the call and the change is integrated.
46
-
47
- This can, and will, lead to minor inconsistencies in different parts of our offering, especially as Green is not yet (even close to) at 100% adoption. This is fine. Far larger inconsistencies already exist in our current, digital ecosystem. We therefore prioritise the ability to keep moving forward and improve our customers' experience over delaying for the sake of consistency.
48
-
49
- In the long run, consistency will be achieved by automating the roll-out of changes, be they visual, functional or qualitative, to keep all parts of our offering on the latest version. When we go Green, we stay green.
50
-
51
-
52
- ## Develop
53
-
54
- ### Yarn
55
-
56
- This mono repo is based on `nx` and uses `yarn` instead of `npm`. If you are unused to yarn, see the following instructions:
57
-
58
- #### Install yarn
59
-
60
- ```bash
61
- npm install yarn -g
62
- ```
63
- Use the -g flag to install it globally on your computer.
64
-
65
-
66
- #### Install dependencies
67
-
68
- ```bash
69
- yarn
70
- ```
71
-
72
- #### Add a dependency to a workspace
73
-
74
- All projects use a common set of dependencies so if you want to add `leftpad` to the chlorophyll project, just run:
75
-
76
- ```bash
77
- yarn add leftpad
78
- ```
79
-
80
- #### Run a command in `package.json`
81
-
82
- Unlike `npm`, `yarn` doesn't require the `run` command. So if you want to run `lint` in your package or in the project root, simply type:
64
+ To start Storybooks locally on your machine you run the following command:
83
65
 
84
66
  ```bash
85
- yarn lint
67
+ npx nx run [PROJECT]:storybook
86
68
  ```
87
69
 
88
- ### How to contribute?
89
-
90
- - Clone the project locally from GitHub - `git clone https://github.com/sebgroup/green.git`.
91
- - Create a new branch each time - `git checkout -b "DESCRIPTIVE NAME"`.
92
- - Commit with the Semantic everything inscructions underneath.
93
- - Pull the latest - `git pull`.
94
- - Push eveything - `git push`.
95
- - Make a pull request in GitHub - `https://github.com/sebgroup/green/compare`.
70
+ Where you replace `[PROJECT]` with a folder name from `green\libs`.
96
71
 
97
- ### Semantic everything
98
-
99
- All projects in Green use [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) to power [semantic releases](https://semantic-release.gitbook.io/semantic-release/). In order to simplify using this format, install:
100
-
101
- ```bash
102
- npm install git-cz -g
103
- ```
104
-
105
- To commit, just run `git-cz` in the terminal. Always try to add reference to an issue in the longer description with # and the issue number. Eg `#1337`.
106
-
107
- ### Start Storybook
108
-
109
- You start the common storybooks with these commands:
72
+ So to start Storybook for each component library run:
110
73
 
111
74
  ```bash
112
75
  npx nx run chlorophyll:storybook
@@ -114,38 +77,14 @@ npx nx run react:storybook
114
77
  npx nx run angular:storybook
115
78
  ```
116
79
 
117
- Or the general `npx nx run [PROJECT]:storybook` where you replace `[PROJECT]` with a folder name from `green\libs`.
118
-
119
80
  If you install nx globally you can omit the npx above.
120
81
 
121
82
  ```bash
83
+ # Install nx globally
122
84
  npm install nx -g
123
- ```
124
85
 
125
- #### Build
126
-
127
- If you want to build the files to see how the output looks use `build-storybook`:
128
-
129
- ```bash
130
- npx nx run chlorophyll:build-storybook
131
- npx nx run react:build-storybook
132
- npx nx run angular:build-storybook
86
+ # And start the storybooks
87
+ nx run chlorophyll:storybook
88
+ nx run react:storybook
89
+ nx run angular:storybook
133
90
  ```
134
-
135
- ### On SEB Windows computer
136
-
137
- For the moment, `yarn` is difficult to use within the SEB environment, so instead you can install the dependencies using `npm`:
138
-
139
- ```bash
140
- $ npm i --force
141
- ```
142
-
143
- The `--force` flag is necessary in this case to convince `npm` that sub-dependency conflicts are OK.
144
-
145
- Don't commit the generated `package-lock.json` file, since we already have a `yarn.lock` file.
146
-
147
- If you need to add a new dependency, the `yarn.lock` file needs to be updated, and in that case you still need to use `yarn`. You can do this by temporarily disconnecting from the SEB network, or by using a non-SEB computer.
148
-
149
- ## Git
150
-
151
- We reccommend using [GitHub Desktop](https://desktop.github.com/), as it will work smoothly with both on-prem GitHub and external GitHub without any manual configuration of proxies and certificates. Ask for help on Teams if you need assistance!
@@ -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
  */
@@ -0,0 +1,17 @@
1
+ import { GdsElement } from '../../gds-element';
2
+ import './list-item';
3
+ /**
4
+ * @element gds-grouped-list
5
+ * @status beta
6
+ *
7
+ * Grouped lists are used to list many datapoints with labels in a structured way.
8
+ */
9
+ export declare class GdsGroupedList extends GdsElement {
10
+ private _tStyles?;
11
+ /**
12
+ * The label for the list that will render in the shadowDOM as the first <li> element in the list with the class `gds-list-heading`
13
+ */
14
+ label: string;
15
+ connectedCallback(): void;
16
+ render(): any;
17
+ }
@@ -0,0 +1,2 @@
1
+ export declare function register(): void;
2
+ export default register;
@@ -0,0 +1,11 @@
1
+ import { GdsElement } from '../../gds-element';
2
+ /**
3
+ * @element gds-list-item
4
+ * @status beta
5
+ *
6
+ * Used with `gds-grouped-list` to create a list items.
7
+ */
8
+ export declare class GdsListItem extends GdsElement {
9
+ connectedCallback(): void;
10
+ render(): any;
11
+ }
@@ -4,3 +4,4 @@ export * from '../primitives/menu/menu-heading';
4
4
  export * from './context-menu/context-menu';
5
5
  export * from '../primitives/menu/menu-item';
6
6
  export * from './datepicker/datepicker';
7
+ export * from './grouped-list/grouped-list';
@@ -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
 
@@ -76,8 +77,8 @@ function watch(propertyName, options) {
76
77
  const { update } = proto;
77
78
  const watchedProperties = Array.isArray(propertyName) ? propertyName : [propertyName];
78
79
  proto.update = function(changedProps) {
79
- watchedProperties.forEach((property10) => {
80
- const key = property10;
80
+ watchedProperties.forEach((property11) => {
81
+ const key = property11;
81
82
  if (changedProps.has(key)) {
82
83
  const oldValue = changedProps.get(key);
83
84
  const newValue = this[key];
@@ -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 = "-3d880b";
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);
@@ -2653,10 +2691,62 @@ __decorateClass([
2653
2691
  GdsDatepicker = __decorateClass([
2654
2692
  gdsCustomElement("gds-datepicker")
2655
2693
  ], GdsDatepicker);
2694
+
2695
+ // libs/core/src/components/grouped-list/grouped-list.ts
2696
+ import { state as state11, property as property10 } from "lit/decorators.js";
2697
+ import { when as when5 } from "lit/directives/when.js";
2698
+
2699
+ // libs/core/src/components/grouped-list/list-item.ts
2700
+ var GdsListItem = class extends GdsElement {
2701
+ connectedCallback() {
2702
+ super.connectedCallback();
2703
+ this.setAttribute("role", "listitem");
2704
+ }
2705
+ render() {
2706
+ return html`<slot></slot>`;
2707
+ }
2708
+ };
2709
+ GdsListItem = __decorateClass([
2710
+ gdsCustomElement("gds-list-item")
2711
+ ], GdsListItem);
2712
+
2713
+ // libs/core/src/components/grouped-list/grouped-list.ts
2714
+ var GdsGroupedList = class extends GdsElement {
2715
+ constructor() {
2716
+ super(...arguments);
2717
+ this.label = "";
2718
+ }
2719
+ connectedCallback() {
2720
+ super.connectedCallback();
2721
+ constrainSlots(this);
2722
+ TransitionalStyles.instance.apply(this, "gds-grouped-list");
2723
+ }
2724
+ render() {
2725
+ return html`${this._tStyles}${when5(
2726
+ this.label,
2727
+ () => html`<div class="gds-list-heading" aria-hidden="true" id="label">
2728
+ ${this.label}
2729
+ </div>`
2730
+ )}
2731
+ <div role="list" aria-labelledby="label">
2732
+ <slot gds-allow="gds-list-item"></slot>
2733
+ </div>`;
2734
+ }
2735
+ };
2736
+ __decorateClass([
2737
+ state11()
2738
+ ], GdsGroupedList.prototype, "_tStyles", 2);
2739
+ __decorateClass([
2740
+ property10()
2741
+ ], GdsGroupedList.prototype, "label", 2);
2742
+ GdsGroupedList = __decorateClass([
2743
+ gdsCustomElement("gds-grouped-list")
2744
+ ], GdsGroupedList);
2656
2745
  export {
2657
2746
  GdsContextMenu,
2658
2747
  GdsDatepicker,
2659
2748
  GdsDropdown,
2749
+ GdsGroupedList,
2660
2750
  GdsMenuHeading,
2661
2751
  GdsMenuItem,
2662
2752
  GdsOption,
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.8.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
  */
@@ -21,6 +21,12 @@ var listbox_trans_styles_default = `/**
21
21
  * Use \`add-focus\` instead
22
22
  */
23
23
  /** add background color, color and border-color to element when it has focus-visible i.e. tab focus */
24
+ /**
25
+ * @deprecated in favor of Grouped list component
26
+ */
27
+ /**
28
+ * @deprecated in favor of Grouped list component
29
+ */
24
30
  @layer base, reset, transitional-styles;
25
31
  @layer transitional-styles {
26
32
  :host {
@@ -70,11 +76,10 @@ var option_trans_styles_default = `/**
70
76
  @layer base, reset, transitional-styles;
71
77
  @layer transitional-styles {
72
78
  :host {
73
- padding-left: 0.75rem;
74
- padding-right: 0.75rem;
79
+ padding-left: 1rem;
80
+ padding-right: 1rem;
75
81
  padding-bottom: 0.75rem;
76
82
  padding-top: 0.75rem;
77
- transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1), outline-offset 0s, outline-width 0s;
78
83
  line-height: 1.25;
79
84
  cursor: pointer;
80
85
  display: flex;
@@ -83,22 +88,19 @@ var option_trans_styles_default = `/**
83
88
  -moz-user-select: none;
84
89
  user-select: none;
85
90
  }
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;
91
+ :host:hover, :host:focus-visible {
92
+ background-color: var(--gds-ref-pallet-base200);
92
93
  }
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);
94
+ :host:active {
95
+ background-color: var(--gds-ref-pallet-base300);
99
96
  }
100
- :host.active.sg-highlighted {
97
+ :host:focus {
98
+ outline-color: #000;
99
+ outline-offset: -0.25rem;
100
+ }
101
+ :host.active.sg-highlighted, :host[aria-selected=true] {
101
102
  background: var(--gds-ref-pallet-base800);
103
+ color: #fff;
102
104
  }
103
105
  :host(:hover),
104
106
  :host(:focus-visible) {
@@ -150,14 +152,15 @@ var option_trans_styles_default = `/**
150
152
  var menu_heading_trans_styles_default = `@layer base, reset, transitional-styles;
151
153
  @layer transitional-styles {
152
154
  :host {
153
- padding: 0.5rem 1rem;
154
- background-color: var(--gds-ref-pallet-base100);
155
+ padding: 0.75rem 1rem;
156
+ background-color: var(--gds-ref-pallet-base300);
155
157
  color: var(--gds-ref-pallet-base800);
156
158
  display: flex;
157
159
  -webkit-user-select: none;
158
160
  -moz-user-select: none;
159
161
  user-select: none;
160
162
  font-size: 0.875rem;
163
+ font-weight: 500;
161
164
  }
162
165
  :host([aria-hidden=true]) {
163
166
  display: none;
@@ -2051,9 +2054,7 @@ a.button.tertiary.danger:focus-visible {
2051
2054
  visibility: visible;
2052
2055
  }
2053
2056
  header {
2054
- border-bottom: 1px solid var(--border-color);
2055
2057
  display: flex;
2056
- padding: 0.25rem 0.75rem;
2057
2058
  }
2058
2059
  @media (min-width: 36em) {
2059
2060
  header {
@@ -2061,13 +2062,14 @@ a.button.tertiary.danger:focus-visible {
2061
2062
  }
2062
2063
  }
2063
2064
  header button.close {
2064
- margin: -0.25rem;
2065
+ margin: 0rem;
2066
+ padding: 0;
2065
2067
  }
2066
2068
  header h2 {
2067
2069
  flex-grow: 1;
2068
- font-weight: 500;
2070
+ font-weight: 400;
2069
2071
  line-height: 1.5;
2070
- margin: 0;
2072
+ margin: 0.25rem 0 0 0.75rem;
2071
2073
  }
2072
2074
  dialog {
2073
2075
  --z-index: var(--sg-z-index-popover);
@@ -2080,7 +2082,6 @@ a.button.tertiary.danger:focus-visible {
2080
2082
  position: fixed;
2081
2083
  visibility: hidden;
2082
2084
  z-index: var(--z-index);
2083
- border-width: 0;
2084
2085
  inset: 0;
2085
2086
  overflow: hidden;
2086
2087
  padding: 0;
@@ -2132,8 +2133,10 @@ a.button.tertiary.danger:focus-visible {
2132
2133
  }
2133
2134
  @media (max-width: 35.98em) {
2134
2135
  dialog {
2135
- border-radius: 0.5rem;
2136
2136
  max-height: 80svh;
2137
+ border-radius: 0.25rem;
2138
+ border: 1px solid var(--border-color);
2139
+ padding-bottom: 0;
2137
2140
  }
2138
2141
  dialog.v-kb-visible {
2139
2142
  inset-block-end: auto;
@@ -2389,6 +2392,22 @@ var dropdown_trans_styles_default = `/**
2389
2392
  input[type=week][aria-disabled=true]::placeholder {
2390
2393
  color: var(--text-disabled-color);
2391
2394
  }
2395
+ input:not([type]):hover,
2396
+ input[type=date]:hover,
2397
+ input[type=datetime]:hover,
2398
+ input[type=datetime-local]:hover,
2399
+ input[type=email]:hover,
2400
+ input[type=month]:hover,
2401
+ input[type=number]:hover,
2402
+ input[type=password]:hover,
2403
+ input[type=search]:hover,
2404
+ input[type=tel]:hover,
2405
+ input[type=text]:hover,
2406
+ input[type=time]:hover,
2407
+ input[type=url]:hover,
2408
+ input[type=week]:hover {
2409
+ background-color: var(--gds-ref-pallet-base100);
2410
+ }
2392
2411
  input[type=number] {
2393
2412
  -moz-appearance: textfield;
2394
2413
  }
@@ -2597,10 +2616,10 @@ var dropdown_trans_styles_default = `/**
2597
2616
  border-left: solid 2px var(--gds-ref-pallet-base800);
2598
2617
  content: "";
2599
2618
  display: block;
2600
- height: 0.75rem;
2601
- width: 0.75rem;
2619
+ height: 0.5rem;
2620
+ width: 0.5rem;
2602
2621
  position: relative;
2603
- top: -0.1875rem;
2622
+ top: -0.15rem;
2604
2623
  transform: translate(75%, 0) rotate3d(0, 0, 1, -45deg) scale3d(1, 1, -1);
2605
2624
  transition: transform 300ms ease-in;
2606
2625
  flex-shrink: 0;
@@ -2611,6 +2630,12 @@ var dropdown_trans_styles_default = `/**
2611
2630
  button:hover::after {
2612
2631
  border-color: currentColor;
2613
2632
  }
2633
+ button.small {
2634
+ font-size: 0.875rem;
2635
+ }
2636
+ button:hover {
2637
+ background: var(--gds-ref-pallet-base300);
2638
+ }
2614
2639
  label {
2615
2640
  display: block;
2616
2641
  font-weight: 500;
@@ -2853,16 +2878,12 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2853
2878
  :host table {
2854
2879
  border-spacing: 0;
2855
2880
  }
2856
- @media (max-width: 35.98em) {
2857
- :host table {
2858
- width: 100%;
2859
- }
2860
- }
2861
2881
  :host table tr th,
2862
2882
  :host table tr td {
2863
- height: 2.5rem;
2883
+ height: 2.75rem;
2864
2884
  text-align: center;
2865
- width: 2.5rem;
2885
+ width: 2.75rem;
2886
+ box-sizing: border-box;
2866
2887
  }
2867
2888
  :host table thead th {
2868
2889
  background: var(--sg-bg-level-2);
@@ -2902,23 +2923,23 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2902
2923
  color: var(--gds-sys-color-font);
2903
2924
  cursor: pointer;
2904
2925
  }
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) {
2926
+ :host table tbody tr td:focus-visible:focus:not(:focus-visible) {
2913
2927
  box-shadow: none;
2914
2928
  outline: 0;
2915
2929
  }
2916
- :host table tbody tr td:focus-visible:not(.disabled):focus, :host table tbody tr td:focus-visible:not(.disabled):focus-visible {
2930
+ :host table tbody tr td:focus-visible:focus, :host table tbody tr td:focus-visible:focus-visible {
2917
2931
  outline-color: var(--gds-sys-color-focus-outline);
2918
2932
  outline-style: solid;
2919
2933
  outline-width: 0.125rem;
2920
2934
  outline-offset: 0.125rem;
2921
2935
  }
2936
+ :host table tbody tr td:focus-visible:not(.disabled) {
2937
+ border: solid 1px var(--sg-bg-level-2);
2938
+ border-radius: 4px;
2939
+ cursor: pointer;
2940
+ position: relative;
2941
+ z-index: 0;
2942
+ }
2922
2943
  :host table tbody tr td[aria-selected=true] {
2923
2944
  background: var(--gds-ref-pallet-base800);
2924
2945
  border: solid 1px var(--sg-bg-level-2);
@@ -2939,6 +2960,8 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2939
2960
  color: hsl(var(--sg-hsl-disabled-color));
2940
2961
  cursor: not-allowed;
2941
2962
  font-weight: 400;
2963
+ border-radius: 4px;
2964
+ border: solid 1px var(--sg-bg-level-2);
2942
2965
  }
2943
2966
  :host table tbody tr td.disabled.sg-date-holiday {
2944
2967
  color: hsla(var(--sg-hsl-red-2), 0.25);
@@ -2950,7 +2973,7 @@ var calendar_trans_styles_default = `/* stylelint-disable max-nesting-depth */
2950
2973
  }
2951
2974
  @layer _modifiers {
2952
2975
  .week-number {
2953
- border-right: solid 1px var(--sg-grey-300);
2976
+ border-right: solid 1px var(--gds-ref-pallet-base300);
2954
2977
  font-weight: 400;
2955
2978
  pointer-events: none;
2956
2979
  }
@@ -3061,28 +3084,29 @@ i.sg-icon.sg-icon-ellipsis::before {
3061
3084
  }
3062
3085
  .field {
3063
3086
  border-radius: var(--sg-border-radius);
3087
+ border: solid var(--sg-border-width) var(--sg-border-color);
3088
+ --border-color: var(--sg-border-color);
3064
3089
  align-items: center;
3065
3090
  background-color: var(--sg-form-control-bg);
3066
3091
  box-sizing: border-box;
3067
3092
  color: var(--sg-text-primary);
3068
3093
  display: flex;
3069
- justify-content: center;
3070
3094
  justify-content: space-between;
3095
+ align-items: stretch;
3071
3096
  margin: 0.5rem 0;
3072
3097
  min-height: 2.75rem;
3098
+ cursor: text;
3099
+ }
3100
+ .field:hover {
3101
+ background-color: var(--gds-ref-pallet-base100);
3073
3102
  }
3074
3103
  .field .input {
3075
3104
  padding-left: 1rem;
3076
3105
  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);
3106
+ border-radius: var(--sg-border-radius);
3084
3107
  flex-grow: 1;
3085
- isolation: isolate;
3108
+ display: flex;
3109
+ align-items: center;
3086
3110
  }
3087
3111
  .field .input:focus:not(:focus-visible) {
3088
3112
  box-shadow: none;
@@ -3094,17 +3118,20 @@ i.sg-icon.sg-icon-ellipsis::before {
3094
3118
  outline-width: 0.125rem;
3095
3119
  outline-offset: 0.125rem;
3096
3120
  }
3097
- .field .input::-moz-selection {
3121
+ .field .input::-moz-selection, .field .input span::-moz-selection {
3098
3122
  background: transparent;
3099
3123
  }
3100
- .field .input::selection {
3124
+ .field .input::selection,
3125
+ .field .input span::selection {
3101
3126
  background: transparent;
3102
3127
  }
3103
- .field span {
3104
- cursor: text;
3128
+ .field .input.is-placeholder {
3129
+ opacity: 0;
3130
+ }
3131
+ .field .input.is-placeholder:hover, .field .input.is-placeholder:focus, .field .input.is-placeholder:has(:focus) {
3132
+ opacity: 0.7;
3105
3133
  }
3106
3134
  .field [role=spinbutton] {
3107
- cursor: text;
3108
3135
  display: inline-block;
3109
3136
  }
3110
3137
  .field [role=spinbutton]:focus {
@@ -3118,16 +3145,15 @@ i.sg-icon.sg-icon-ellipsis::before {
3118
3145
  background: transparent;
3119
3146
  }
3120
3147
  .field button {
3148
+ border-radius: var(--sg-border-radius);
3121
3149
  -webkit-appearance: none;
3122
3150
  -moz-appearance: none;
3123
3151
  appearance: none;
3124
- background: var(--intent-info-background);
3125
3152
  border: 0;
3126
- border-radius: 0 var(--sg-border-radius) var(--sg-border-radius) 0;
3127
3153
  box-sizing: border-box;
3128
3154
  cursor: pointer;
3129
- padding: 0.7rem 1rem;
3130
- width: 3rem;
3155
+ width: 2.75rem;
3156
+ background: transparent;
3131
3157
  }
3132
3158
  .field button:focus:not(:focus-visible) {
3133
3159
  box-shadow: none;
@@ -3139,8 +3165,23 @@ i.sg-icon.sg-icon-ellipsis::before {
3139
3165
  outline-width: 0.125rem;
3140
3166
  outline-offset: 0.125rem;
3141
3167
  }
3142
- .field button svg path {
3143
- fill: #fff;
3168
+ .field button:hover {
3169
+ background: var(--gds-ref-pallet-base300);
3170
+ }
3171
+ .field button svg {
3172
+ width: 1rem;
3173
+ height: 1rem;
3174
+ }
3175
+ .field button svg > * {
3176
+ fill: none;
3177
+ stroke: currentColor;
3178
+ stroke-linecap: round;
3179
+ stroke-linejoin: round;
3180
+ stroke-width: 2px;
3181
+ }
3182
+ .field.small {
3183
+ min-height: 2rem;
3184
+ font-size: 0.875rem;
3144
3185
  }
3145
3186
  :host(:invalid) .field + .form-info {
3146
3187
  position: relative;
@@ -3171,6 +3212,11 @@ i.sg-icon.sg-icon-ellipsis::before {
3171
3212
  display: flex;
3172
3213
  justify-content: space-between;
3173
3214
  }
3215
+ @media (max-width: 35.98em) {
3216
+ .header {
3217
+ padding-top: 0;
3218
+ }
3219
+ }
3174
3220
  .header > * {
3175
3221
  margin-left: 0.25rem;
3176
3222
  margin-right: 0.25rem;
@@ -3180,14 +3226,32 @@ i.sg-icon.sg-icon-ellipsis::before {
3180
3226
  flex: 1 1;
3181
3227
  }
3182
3228
  .header button {
3229
+ border-radius: var(--sg-border-radius);
3183
3230
  -webkit-appearance: none;
3184
3231
  -moz-appearance: none;
3185
3232
  appearance: none;
3186
3233
  background: transparent;
3187
3234
  border: 0;
3188
3235
  cursor: pointer;
3189
- padding: 0.7rem 1rem;
3190
- width: 3rem;
3236
+ padding: 0.5rem 0.5rem;
3237
+ width: 2.75rem;
3238
+ margin: 0.125rem 0.25rem;
3239
+ }
3240
+ .header button:focus:not(:focus-visible) {
3241
+ box-shadow: none;
3242
+ outline: 0;
3243
+ }
3244
+ .header button:focus, .header button:focus-visible {
3245
+ outline-color: var(--gds-sys-color-focus-outline);
3246
+ outline-style: solid;
3247
+ outline-width: 0.125rem;
3248
+ outline-offset: 0.125rem;
3249
+ }
3250
+ .header button:hover {
3251
+ background: var(--gds-ref-pallet-base300);
3252
+ }
3253
+ .header button:focus-visible {
3254
+ outline-offset: 0;
3191
3255
  }
3192
3256
  .header button .icon::before {
3193
3257
  background: none;
@@ -3195,16 +3259,16 @@ i.sg-icon.sg-icon-ellipsis::before {
3195
3259
  border-left: 2px solid;
3196
3260
  content: "";
3197
3261
  display: block;
3198
- height: 12px;
3262
+ height: 8px;
3199
3263
  margin-top: 2px;
3200
- width: 12px;
3264
+ width: 8px;
3201
3265
  }
3202
3266
  .header button .icon.prev::before {
3203
- margin-left: -4px;
3267
+ margin-left: 3px;
3204
3268
  transform: translate(75%) rotate(45deg) scaleZ(-1);
3205
3269
  }
3206
3270
  .header button .icon.next::before {
3207
- margin-left: -10px;
3271
+ margin-left: -1px;
3208
3272
  transform: translate(75%) rotate(-135deg) scaleZ(-1);
3209
3273
  }
3210
3274
  .footer {
@@ -3230,10 +3294,23 @@ i.sg-icon.sg-icon-ellipsis::before {
3230
3294
  font-weight: 500;
3231
3295
  padding: 0.5rem 0.75rem;
3232
3296
  }
3297
+ .footer button:focus:not(:focus-visible) {
3298
+ box-shadow: none;
3299
+ outline: 0;
3300
+ }
3301
+ .footer button:focus, .footer button:focus-visible {
3302
+ outline-color: var(--gds-sys-color-focus-outline);
3303
+ outline-style: solid;
3304
+ outline-width: 0.125rem;
3305
+ outline-offset: 0.125rem;
3306
+ }
3233
3307
  .footer button:hover {
3234
3308
  background: var(--intent-info-background);
3235
3309
  color: #fff;
3236
3310
  }
3311
+ .footer .clear {
3312
+ margin-right: auto;
3313
+ }
3237
3314
  }`;
3238
3315
 
3239
3316
  // libs/core/src/components/datepicker/datepicker.trans.styles.ts
@@ -3241,10 +3318,42 @@ function register6() {
3241
3318
  TransitionalStyles.instance.register("gds-datepicker", datepicker_trans_styles_default.toString());
3242
3319
  }
3243
3320
 
3321
+ // libs/core/src/components/grouped-list/grouped-list.trans.styles.scss
3322
+ var grouped_list_trans_styles_default = `@layer base, reset, transitional-styles;
3323
+ @layer transitional-styles {
3324
+ @layer _base, _overrides;
3325
+ :host {
3326
+ display: block;
3327
+ list-style: none;
3328
+ }
3329
+ @layer _base {
3330
+ .gds-list-heading {
3331
+ padding: 0.5rem 1rem;
3332
+ font-size: 0.875rem;
3333
+ font-weight: 500;
3334
+ background-color: var(--gds-ref-pallet-base200, #e9e9e9);
3335
+ }
3336
+ ::slotted([gds-element=gds-list-item]) {
3337
+ all: revert;
3338
+ display: flex;
3339
+ gap: 0.25rem;
3340
+ justify-content: space-between;
3341
+ padding: 1rem;
3342
+ border-bottom: 1px solid var(--gds-ref-pallet-base200, #e9e9e9);
3343
+ }
3344
+ }
3345
+ @layer _overrides {}
3346
+ }`;
3347
+
3348
+ // libs/core/src/components/grouped-list/grouped-list.trans.styles.ts
3349
+ function register7() {
3350
+ TransitionalStyles.instance.register("gds-grouped-list", grouped_list_trans_styles_default.toString());
3351
+ }
3352
+
3244
3353
  // libs/core/src/utils/helpers/custom-element-scoping.ts
3245
3354
  import { html as litHtml } from "lit";
3246
3355
  import { customElement } from "lit/decorators.js";
3247
- var VER_SUFFIX = "-f9a04d";
3356
+ var VER_SUFFIX = "-3d880b";
3248
3357
  var elementLookupTable = /* @__PURE__ */ new Map();
3249
3358
  var templateCache = /* @__PURE__ */ new WeakMap();
3250
3359
  function applyElementScoping(strings, ...values) {
@@ -3281,6 +3390,7 @@ var registerTransitionalStyles = () => {
3281
3390
  register4();
3282
3391
  register5();
3283
3392
  register6();
3393
+ register7();
3284
3394
  };
3285
3395
  function supportsConstructedStylesheets() {
3286
3396
  try {
@@ -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;