@progressive-development/pd-content 0.1.72 → 0.1.73
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/.storybook/main.js +16 -2
- package/.storybook/preview.js +13 -0
- package/lit-localize.json +18 -0
- package/package.json +25 -12
- package/src/PdMoreInfo.js +5 -2
- package/src/generated/locale/be.js +15 -0
- package/src/generated/locale/de.js +15 -0
- package/src/generated/locale/en.js +15 -0
- package/src/generated/locale-codes.js +27 -0
- package/{stories → src/stories}/box-view.stories.js +5 -1
- package/{stories → src/stories}/collapse.stories.js +1 -1
- package/{stories → src/stories}/edit-content.stories.js +1 -1
- package/{stories → src/stories}/more-info.stories.js +1 -1
- package/{stories → src/stories}/resize-content.stories.js +1 -1
- package/xliff/be.xlf +15 -0
- package/xliff/de.xlf +15 -0
- package/xliff/en.xlf +13 -0
- package/.storybook/preview-head.html +0 -2
- package/.storybook/server.mjs +0 -8
package/.storybook/main.js
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** @type { import('@storybook/web-components-vite').StorybookConfig } */
|
|
2
|
+
const config = {
|
|
3
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
4
|
+
addons: [
|
|
5
|
+
'@storybook/addon-links',
|
|
6
|
+
'@storybook/addon-essentials',
|
|
7
|
+
'@chromatic-com/storybook',
|
|
8
|
+
],
|
|
9
|
+
framework: {
|
|
10
|
+
name: '@storybook/web-components-vite',
|
|
11
|
+
options: {},
|
|
12
|
+
},
|
|
13
|
+
docs: {
|
|
14
|
+
autodocs: 'tag',
|
|
15
|
+
},
|
|
3
16
|
};
|
|
17
|
+
export default config;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/lit/lit/main/packages/localize-tools/config.schema.json",
|
|
3
|
+
"sourceLocale": "dev",
|
|
4
|
+
"targetLocales": ["de", "en", "be"],
|
|
5
|
+
"inputFiles": [
|
|
6
|
+
"src/**/*.js"
|
|
7
|
+
],
|
|
8
|
+
"output": {
|
|
9
|
+
"mode": "runtime",
|
|
10
|
+
"localeCodesModule": "src/generated/locale-codes.js",
|
|
11
|
+
"outputDir": "src/generated/locale"
|
|
12
|
+
|
|
13
|
+
},
|
|
14
|
+
"interchange": {
|
|
15
|
+
"format": "xliff",
|
|
16
|
+
"xliffDir": "./xliff/"
|
|
17
|
+
}
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "Progressive Development content components. ",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "PD Progressive Development UG",
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.73",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -13,34 +13,47 @@
|
|
|
13
13
|
"format": "eslint --ext .js,.html . --fix --ignore-path .gitignore && prettier \"**/*.js\" --write --ignore-path .gitignore",
|
|
14
14
|
"test": "web-test-runner --coverage",
|
|
15
15
|
"test:watch": "web-test-runner --watch",
|
|
16
|
-
"storybook": "
|
|
17
|
-
"storybook:build": "npm run analyze -- --exclude dist && build-storybook"
|
|
16
|
+
"storybook": "storybook dev -p 6006",
|
|
17
|
+
"storybook:build": "npm run analyze -- --exclude dist && build-storybook",
|
|
18
|
+
"localizeExtract": "lit-localize extract",
|
|
19
|
+
"localizeBuild": "lit-localize build"
|
|
18
20
|
},
|
|
19
21
|
"dependencies": {
|
|
22
|
+
"@lit/localize": "^0.12.1",
|
|
20
23
|
"@progressive-development/pd-dialog": "^0.1.74",
|
|
21
24
|
"@progressive-development/pd-icon": "^0.1.20",
|
|
22
25
|
"@progressive-development/pd-shared-styles": "^0.1.1",
|
|
23
|
-
"lit": "^2.
|
|
24
|
-
"pwa-helpers": "^0.9.
|
|
26
|
+
"lit": "^2.8.0",
|
|
27
|
+
"pwa-helpers": "^0.9.1"
|
|
25
28
|
},
|
|
26
29
|
"devDependencies": {
|
|
30
|
+
"@chromatic-com/storybook": "^1.3.4",
|
|
27
31
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
32
|
+
"@lit/localize-tools": "^0.7.2",
|
|
28
33
|
"@open-wc/eslint-config": "^4.3.0",
|
|
29
|
-
"@open-wc/testing": "
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@
|
|
34
|
+
"@open-wc/testing": "^3.2.2",
|
|
35
|
+
"@storybook/addon-essentials": "^8.0.10",
|
|
36
|
+
"@storybook/addon-links": "^8.0.10",
|
|
37
|
+
"@storybook/blocks": "^8.0.10",
|
|
38
|
+
"@storybook/test": "^8.0.10",
|
|
39
|
+
"@storybook/web-components": "^8.0.10",
|
|
40
|
+
"@storybook/web-components-vite": "^8.0.10",
|
|
41
|
+
"@web/dev-server": "^0.1.38",
|
|
42
|
+
"@web/test-runner": "^0.13.31",
|
|
33
43
|
"eslint": "^7.32.0",
|
|
34
|
-
"eslint-config-prettier": "^8.
|
|
44
|
+
"eslint-config-prettier": "^8.10.0",
|
|
45
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
35
46
|
"husky": "^4.3.8",
|
|
36
47
|
"lint-staged": "^10.5.4",
|
|
37
|
-
"prettier": "^2.
|
|
48
|
+
"prettier": "^2.8.8",
|
|
49
|
+
"storybook": "^8.0.10"
|
|
38
50
|
},
|
|
39
51
|
"customElements": "custom-elements.json",
|
|
40
52
|
"eslintConfig": {
|
|
41
53
|
"extends": [
|
|
42
54
|
"@open-wc",
|
|
43
|
-
"prettier"
|
|
55
|
+
"prettier",
|
|
56
|
+
"plugin:storybook/recommended"
|
|
44
57
|
]
|
|
45
58
|
},
|
|
46
59
|
"prettier": {
|
package/src/PdMoreInfo.js
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { LitElement, html, css } from 'lit';
|
|
9
|
+
import { msg, updateWhenLocaleChanges } from '@lit/localize';
|
|
10
|
+
|
|
9
11
|
import { PDFontStyles } from '@progressive-development/pd-shared-styles';
|
|
10
12
|
|
|
11
13
|
/**
|
|
@@ -51,6 +53,7 @@ export class PdMoreInfo extends LitElement {
|
|
|
51
53
|
constructor() {
|
|
52
54
|
super();
|
|
53
55
|
this._lessInfo = true;
|
|
56
|
+
updateWhenLocaleChanges(this);
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
render() {
|
|
@@ -58,14 +61,14 @@ export class PdMoreInfo extends LitElement {
|
|
|
58
61
|
return html`
|
|
59
62
|
<p>
|
|
60
63
|
<slot name="small-view"></slot>
|
|
61
|
-
<a @click="${this._showMoreInfo}"
|
|
64
|
+
<a @click="${this._showMoreInfo}">${msg("More information", {id: "pd.moreInfo.more"})}</a>
|
|
62
65
|
</p>
|
|
63
66
|
`;
|
|
64
67
|
}
|
|
65
68
|
return html`
|
|
66
69
|
<p>
|
|
67
70
|
<slot name="large-view"></slot>
|
|
68
|
-
<a @click="${this._showLessInfo}"
|
|
71
|
+
<a @click="${this._showLessInfo}">${msg("Less information", {id: "pd.moreInfo.less"})}</a>
|
|
69
72
|
</p>
|
|
70
73
|
`;
|
|
71
74
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
// Do not modify this file by hand!
|
|
3
|
+
// Re-generate this file by running lit-localize
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/* eslint-disable no-irregular-whitespace */
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10
|
+
|
|
11
|
+
export const templates = {
|
|
12
|
+
'pd.moreInfo.less': `Minder informatie`,
|
|
13
|
+
'pd.moreInfo.more': `Meer informatie`,
|
|
14
|
+
};
|
|
15
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
// Do not modify this file by hand!
|
|
3
|
+
// Re-generate this file by running lit-localize
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/* eslint-disable no-irregular-whitespace */
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10
|
+
|
|
11
|
+
export const templates = {
|
|
12
|
+
'pd.moreInfo.less': `Text ausblenden`,
|
|
13
|
+
'pd.moreInfo.more': `Mehr Informationen`,
|
|
14
|
+
};
|
|
15
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
// Do not modify this file by hand!
|
|
3
|
+
// Re-generate this file by running lit-localize
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
/* eslint-disable no-irregular-whitespace */
|
|
9
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
10
|
+
|
|
11
|
+
export const templates = {
|
|
12
|
+
'pd.moreInfo.more': `More information`,
|
|
13
|
+
'pd.moreInfo.less': `Less information`,
|
|
14
|
+
};
|
|
15
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Do not modify this file by hand!
|
|
2
|
+
// Re-generate this file by running lit-localize.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The locale code that templates in this source code are written in.
|
|
6
|
+
*/
|
|
7
|
+
export const sourceLocale = `dev`;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* The other locale codes that this application is localized into. Sorted
|
|
11
|
+
* lexicographically.
|
|
12
|
+
*/
|
|
13
|
+
export const targetLocales = [
|
|
14
|
+
`be`,
|
|
15
|
+
`de`,
|
|
16
|
+
`en`,
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* All valid project locale codes. Sorted lexicographically.
|
|
21
|
+
*/
|
|
22
|
+
export const allLocales = [
|
|
23
|
+
`be`,
|
|
24
|
+
`de`,
|
|
25
|
+
`dev`,
|
|
26
|
+
`en`,
|
|
27
|
+
];
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
import '
|
|
2
|
+
import '../../pd-box-view.js';
|
|
3
|
+
|
|
3
4
|
|
|
4
5
|
export default {
|
|
5
6
|
title: 'PdContent/Box View',
|
|
6
7
|
component: 'pd-box-view',
|
|
8
|
+
parameters: {
|
|
9
|
+
actions: { argTypesRegex: '^on.*' },
|
|
10
|
+
},
|
|
7
11
|
argTypes: {
|
|
8
12
|
|
|
9
13
|
},
|
package/xliff/be.xlf
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
3
|
+
<file target-language="be" source-language="dev" original="lit-localize-inputs" datatype="plaintext">
|
|
4
|
+
<body>
|
|
5
|
+
<trans-unit id="pd.moreInfo.more">
|
|
6
|
+
<source>More information</source>
|
|
7
|
+
<target>Meer informatie</target>
|
|
8
|
+
</trans-unit>
|
|
9
|
+
<trans-unit id="pd.moreInfo.less">
|
|
10
|
+
<source>Less information</source>
|
|
11
|
+
<target>Minder informatie</target>
|
|
12
|
+
</trans-unit>
|
|
13
|
+
</body>
|
|
14
|
+
</file>
|
|
15
|
+
</xliff>
|
package/xliff/de.xlf
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
3
|
+
<file target-language="de" source-language="dev" original="lit-localize-inputs" datatype="plaintext">
|
|
4
|
+
<body>
|
|
5
|
+
<trans-unit id="pd.moreInfo.more">
|
|
6
|
+
<source>More information</source>
|
|
7
|
+
<target>Mehr Informationen</target>
|
|
8
|
+
</trans-unit>
|
|
9
|
+
<trans-unit id="pd.moreInfo.less">
|
|
10
|
+
<source>Less information</source>
|
|
11
|
+
<target>Text ausblenden</target>
|
|
12
|
+
</trans-unit>
|
|
13
|
+
</body>
|
|
14
|
+
</file>
|
|
15
|
+
</xliff>
|
package/xliff/en.xlf
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
|
|
3
|
+
<file target-language="en" source-language="dev" original="lit-localize-inputs" datatype="plaintext">
|
|
4
|
+
<body>
|
|
5
|
+
<trans-unit id="pd.moreInfo.more">
|
|
6
|
+
<source>More information</source>
|
|
7
|
+
</trans-unit>
|
|
8
|
+
<trans-unit id="pd.moreInfo.less">
|
|
9
|
+
<source>Less information</source>
|
|
10
|
+
</trans-unit>
|
|
11
|
+
</body>
|
|
12
|
+
</file>
|
|
13
|
+
</xliff>
|
package/.storybook/server.mjs
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { storybookPlugin } from '@web/dev-server-storybook';
|
|
2
|
-
import baseConfig from '../web-dev-server.config.mjs';
|
|
3
|
-
|
|
4
|
-
export default /** @type {import('@web/dev-server').DevServerConfig} */ ({
|
|
5
|
-
...baseConfig,
|
|
6
|
-
open: '/',
|
|
7
|
-
plugins: [storybookPlugin({ type: 'web-components' }), ...baseConfig.plugins],
|
|
8
|
-
});
|