@sebgroup/green-core 3.29.0 → 3.30.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/gds-element.js CHANGED
@@ -16,7 +16,7 @@ class GdsElement extends LitElement {
16
16
  /**
17
17
  * The semantic version of this element. Can be used for troubleshooting to verify the version being used.
18
18
  */
19
- this.semanticVersion = "3.29.0";
19
+ this.semanticVersion = "3.30.0";
20
20
  this.syncFirstRender = false;
21
21
  this._isUsingTransitionalStyles = false;
22
22
  this._dynamicStylesController = new DynamicStylesController(this);
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-12T20:44:58.646Z",
2
+ "generatedAt": "2026-10-15T13:54:55.150Z",
3
3
  "components": [
4
4
  {
5
5
  "name": "gds-alert",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-12T20:44:58.646Z",
2
+ "generatedAt": "2026-10-15T13:54:55.150Z",
3
3
  "icons": [
4
4
  {
5
5
  "name": "gds-icon-ai",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-12T20:44:58.646Z",
2
+ "generatedAt": "2026-10-15T13:54:55.150Z",
3
3
  "instructions": "./INSTRUCTIONS.md",
4
4
  "components": "./components.json",
5
5
  "icons": "./icons.json",
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-10-12T20:44:57.641Z",
2
+ "generatedAt": "2026-10-15T13:54:54.890Z",
3
3
  "categories": {
4
4
  "space": {
5
5
  "description": "Spacing tokens for padding, margin, gap, and other spacing",
@@ -1,14 +1,14 @@
1
- export * from './alert/index.js';
2
- export * from './avatar/index.js';
3
1
  export * from './badge/index.js';
2
+ export * from './avatar/index.js';
3
+ export * from './alert/index.js';
4
4
  export * from './blur/index.js';
5
5
  export * from './breadcrumbs/index.js';
6
6
  export * from './button/index.js';
7
7
  export * from './calendar/index.js';
8
8
  export * from './card/index.js';
9
9
  export * from './card-linked/index.js';
10
- export * from './checkbox/index.js';
11
10
  export * from './coachmark/index.js';
11
+ export * from './checkbox/index.js';
12
12
  export * from './context-menu/index.js';
13
13
  export * from './datepicker/index.js';
14
14
  export * from './details/index.js';
@@ -57,14 +57,13 @@ export * from './filter-chip/index.js';
57
57
  export * from './formatted-account/index.js';
58
58
  export * from './formatted-date/index.js';
59
59
  export * from './formatted-number/index.js';
60
- export * from './radio-group/index.js';
61
60
  export * from './list-item/index.js';
61
+ export * from './radio-group/index.js';
62
62
  export * from './segment/index.js';
63
63
  export * from './sensitive-account/index.js';
64
64
  export * from './sensitive-date/index.js';
65
65
  export * from './sensitive-number/index.js';
66
66
  export * from './tab/index.js';
67
- export * from './tab-panel/index.js';
68
67
  export * from './icons/icon-ai/index.js';
69
68
  export * from './icons/icon-airplane-up/index.js';
70
69
  export * from './icons/icon-archive/index.js';
@@ -377,5 +376,6 @@ export * from './icons/icon-youtube/index.js';
377
376
  export * from './icons/icon-zap/index.js';
378
377
  export * from './icons/icon-zoom-in/index.js';
379
378
  export * from './icons/icon-zoom-out/index.js';
379
+ export * from './tab-panel/index.js';
380
380
  export * from './menu-item/index.js';
381
381
  export * from './menu-heading/index.js';
@@ -1,14 +1,14 @@
1
- export * from "./alert/index.js";
2
- export * from "./avatar/index.js";
3
1
  export * from "./badge/index.js";
2
+ export * from "./avatar/index.js";
3
+ export * from "./alert/index.js";
4
4
  export * from "./blur/index.js";
5
5
  export * from "./breadcrumbs/index.js";
6
6
  export * from "./button/index.js";
7
7
  export * from "./calendar/index.js";
8
8
  export * from "./card/index.js";
9
9
  export * from "./card-linked/index.js";
10
- export * from "./checkbox/index.js";
11
10
  export * from "./coachmark/index.js";
11
+ export * from "./checkbox/index.js";
12
12
  export * from "./context-menu/index.js";
13
13
  export * from "./datepicker/index.js";
14
14
  export * from "./details/index.js";
@@ -57,14 +57,13 @@ export * from "./filter-chip/index.js";
57
57
  export * from "./formatted-account/index.js";
58
58
  export * from "./formatted-date/index.js";
59
59
  export * from "./formatted-number/index.js";
60
- export * from "./radio-group/index.js";
61
60
  export * from "./list-item/index.js";
61
+ export * from "./radio-group/index.js";
62
62
  export * from "./segment/index.js";
63
63
  export * from "./sensitive-account/index.js";
64
64
  export * from "./sensitive-date/index.js";
65
65
  export * from "./sensitive-number/index.js";
66
66
  export * from "./tab/index.js";
67
- export * from "./tab-panel/index.js";
68
67
  export * from "./icons/icon-ai/index.js";
69
68
  export * from "./icons/icon-airplane-up/index.js";
70
69
  export * from "./icons/icon-archive/index.js";
@@ -377,5 +376,6 @@ export * from "./icons/icon-youtube/index.js";
377
376
  export * from "./icons/icon-zap/index.js";
378
377
  export * from "./icons/icon-zoom-in/index.js";
379
378
  export * from "./icons/icon-zoom-out/index.js";
379
+ export * from "./tab-panel/index.js";
380
380
  export * from "./menu-item/index.js";
381
381
  export * from "./menu-heading/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": "3.29.0",
4
+ "version": "3.30.0",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  import "../../chunks/chunk.H2T4A5YY.js";
2
2
  import { html as litHtml } from "lit";
3
- const VER_SUFFIX = "-8cd888";
3
+ const VER_SUFFIX = "-5669a5";
4
4
  class ScopedElementRegistry {
5
5
  static get instance() {
6
6
  if (!globalThis.__gdsElementLookupTable?.[VER_SUFFIX])
@@ -24,3 +24,12 @@ export declare const gdsInitLocalization: ({ extraLocales, extraTemplates }?: Lo
24
24
  _LIT_LOCALIZE_SET_LOCALE_?: never;
25
25
  };
26
26
  };
27
+ /**
28
+ * Returns the currently active locale, as configured via `gdsInitLocalization`. Components
29
+ * should use this to read the active locale on connect, instead of relying solely on the
30
+ * `lit-localize-status` event - which is only dispatched at the moment a locale change happens,
31
+ * and is missed by any component that connects after that point.
32
+ *
33
+ * Falls back to `navigator.language` if `gdsInitLocalization` has not been called yet.
34
+ */
35
+ export declare const gdsGetLocale: () => string;
@@ -19,6 +19,7 @@ const localizedTemplates = /* @__PURE__ */ new Map([
19
19
  ["de", templates_de],
20
20
  ["da", templates_da]
21
21
  ]);
22
+ let _getLocale;
22
23
  const gdsInitLocalization = ({ extraLocales, extraTemplates } = {
23
24
  extraLocales: [],
24
25
  extraTemplates: /* @__PURE__ */ new Map()
@@ -30,7 +31,7 @@ const gdsInitLocalization = ({ extraLocales, extraTemplates } = {
30
31
  for (const locale of extraLocales) {
31
32
  _targetLocales.push(locale);
32
33
  }
33
- return configureLocalization({
34
+ const localization = configureLocalization({
34
35
  sourceLocale,
35
36
  targetLocales: _targetLocales,
36
37
  loadLocale: async (locale) => {
@@ -41,8 +42,12 @@ const gdsInitLocalization = ({ extraLocales, extraTemplates } = {
41
42
  return Promise.reject(new Error(`Locale ${locale} not found`));
42
43
  }
43
44
  });
45
+ _getLocale = localization.getLocale;
46
+ return localization;
44
47
  };
48
+ const gdsGetLocale = () => _getLocale?.() ?? navigator.language;
45
49
  export {
50
+ gdsGetLocale,
46
51
  gdsInitLocalization,
47
52
  targetLocales
48
53
  };