@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/components/calendar/calendar.component.js +2 -0
- package/components/datepicker/datepicker.component.js +9 -0
- package/components/dropdown/dropdown.component.js +4 -6
- package/components/progress/progress.component.js +2 -0
- package/components/table/table.component.js +24 -15
- package/components/table/table.stories.data.js +6 -2
- package/components/table/table.styles.js +83 -4
- package/components/table/table.types.d.ts +2 -0
- package/custom-elements.json +2449 -2431
- package/gds-element.js +1 -1
- package/generated/mcp/components.json +1 -1
- package/generated/mcp/icons.json +1 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/tokens.json +1 -1
- package/generated/react/index.d.ts +5 -5
- package/generated/react/index.js +5 -5
- package/package.json +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
- package/utils/localization/localization.d.ts +9 -0
- package/utils/localization/localization.js +6 -1
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.
|
|
19
|
+
this.semanticVersion = "3.30.0";
|
|
20
20
|
this.syncFirstRender = false;
|
|
21
21
|
this._isUsingTransitionalStyles = false;
|
|
22
22
|
this._dynamicStylesController = new DynamicStylesController(this);
|
package/generated/mcp/icons.json
CHANGED
package/generated/mcp/index.json
CHANGED
|
@@ -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/generated/react/index.js
CHANGED
|
@@ -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
|
@@ -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
|
-
|
|
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
|
};
|