@sebgroup/green-core 1.0.0-beta.4

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.
@@ -0,0 +1,44 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ // libs/core/src/utils/localization.ts
8
+ import { configureLocalization } from "@lit/localize";
9
+
10
+ // libs/core/src/generated/locale-codes.ts
11
+ var sourceLocale = `en`;
12
+ var targetLocales = [
13
+ `sv`
14
+ ];
15
+
16
+ // libs/core/src/generated/locales/sv.ts
17
+ var sv_exports = {};
18
+ __export(sv_exports, {
19
+ templates: () => templates
20
+ });
21
+ import { str } from "@lit/localize";
22
+ var templates = {
23
+ "s58bfb494feb8eb02": str`${0} valda`,
24
+ "s5d929ff1619ac0c9": `S\xF6k`,
25
+ "sd898d99fd9c13de6": `S\xF6k i listan av val`
26
+ };
27
+
28
+ // libs/core/src/utils/localization.ts
29
+ var localizedTemplates = /* @__PURE__ */ new Map([["sv", sv_exports]]);
30
+ var { getLocale, setLocale } = configureLocalization({
31
+ sourceLocale,
32
+ targetLocales,
33
+ loadLocale: async (locale) => {
34
+ const localModule = localizedTemplates.get(locale);
35
+ if (localModule) {
36
+ return localModule;
37
+ }
38
+ return Promise.reject(new Error(`Locale ${locale} not found`));
39
+ }
40
+ });
41
+ export {
42
+ getLocale,
43
+ setLocale
44
+ };
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@sebgroup/green-core",
3
+ "description": "A carefully crafted set of Web Components, laying the foundation of the Green Design System.",
4
+ "version": "1.0.0-beta.4",
5
+ "main": "index.js",
6
+ "module": "index.js",
7
+ "type": "module",
8
+ "author": "SEB Open Source <opensource@seb.se> (https://github.com/sebgroup)",
9
+ "contributors": [],
10
+ "license": "Apache-2.0",
11
+ "bugs": {
12
+ "url": "https://github.com/sebgroup/green/"
13
+ },
14
+ "homepage": "https://sebgroup.github.io/green/latest/core/",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/sebgroup/green.git"
18
+ },
19
+ "publishConfig": {
20
+ "registry": "https://registry.npmjs.org/",
21
+ "access": "public"
22
+ },
23
+ "exports": {
24
+ ".": {
25
+ "types": "./index.d.ts",
26
+ "default": "./index.js"
27
+ },
28
+ "./transitional-styles": {
29
+ "types": "./transitional-styles.d.ts",
30
+ "default": "./transitional-styles.js"
31
+ },
32
+ "./localization": {
33
+ "types": "./localization.d.ts",
34
+ "default": "./localization.js"
35
+ }
36
+ }
37
+ }