@progressive-development/pd-calendar 0.1.19 → 0.2.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/.storybook/main.js +12 -2
- package/.storybook/preview.js +14 -0
- package/package.json +22 -13
- package/src/PdCalendar.js +9 -2
- package/{stories → src/stories}/cell.stories.js +1 -1
- package/{stories → src/stories}/index.stories.js +3 -1
- package/.storybook/preview-head.html +0 -2
- package/.storybook/server.mjs +0 -8
package/.storybook/main.js
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
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: ['@storybook/addon-links', '@storybook/addon-essentials'],
|
|
5
|
+
framework: {
|
|
6
|
+
name: '@storybook/web-components-vite',
|
|
7
|
+
options: {},
|
|
8
|
+
},
|
|
9
|
+
docs: {
|
|
10
|
+
autodocs: 'tag',
|
|
11
|
+
},
|
|
3
12
|
};
|
|
13
|
+
export default config;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @type { import('@storybook/web-components').Preview } */
|
|
2
|
+
const preview = {
|
|
3
|
+
parameters: {
|
|
4
|
+
actions: { argTypesRegex: '^on[A-Z].*' },
|
|
5
|
+
controls: {
|
|
6
|
+
matchers: {
|
|
7
|
+
color: /(background|color)$/i,
|
|
8
|
+
date: /Date$/i,
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default preview;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "progressive development calendar web component",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"author": "PD Progressive Development",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.2.0",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -13,8 +13,8 @@
|
|
|
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
|
|
16
|
+
"storybook": "storybook dev -p 6006",
|
|
17
|
+
"build-storybook": "storybook build"
|
|
18
18
|
},
|
|
19
19
|
"keywords": [
|
|
20
20
|
"pd",
|
|
@@ -30,29 +30,38 @@
|
|
|
30
30
|
"week"
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@progressive-development/pd-icon": "^0.1.
|
|
33
|
+
"@progressive-development/pd-icon": "^0.1.19",
|
|
34
34
|
"@progressive-development/pd-shared-styles": "0.1.1",
|
|
35
|
-
"fecha": "^4.2.
|
|
36
|
-
"lit": "^2.
|
|
35
|
+
"fecha": "^4.2.3",
|
|
36
|
+
"lit": "^2.8.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@custom-elements-manifest/analyzer": "^0.4.17",
|
|
40
40
|
"@open-wc/eslint-config": "^4.3.0",
|
|
41
|
-
"@open-wc/testing": "next",
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
41
|
+
"@open-wc/testing": "^3.0.0-next.5",
|
|
42
|
+
"@storybook/addon-essentials": "^7.6.4",
|
|
43
|
+
"@storybook/addon-links": "^7.6.4",
|
|
44
|
+
"@storybook/blocks": "^7.6.4",
|
|
45
|
+
"@storybook/web-components": "^7.6.4",
|
|
46
|
+
"@storybook/web-components-vite": "^7.6.4",
|
|
47
|
+
"@web/dev-server": "^0.1.38",
|
|
48
|
+
"@web/test-runner": "^0.13.31",
|
|
45
49
|
"eslint": "^7.32.0",
|
|
46
|
-
"eslint-config-prettier": "^8.
|
|
50
|
+
"eslint-config-prettier": "^8.10.0",
|
|
51
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
47
52
|
"husky": "^4.3.8",
|
|
48
53
|
"lint-staged": "^10.5.4",
|
|
49
|
-
"prettier": "^2.
|
|
54
|
+
"prettier": "^2.8.8",
|
|
55
|
+
"react": "^18.2.0",
|
|
56
|
+
"react-dom": "^18.2.0",
|
|
57
|
+
"storybook": "^7.6.4"
|
|
50
58
|
},
|
|
51
59
|
"customElements": "custom-elements.json",
|
|
52
60
|
"eslintConfig": {
|
|
53
61
|
"extends": [
|
|
54
62
|
"@open-wc",
|
|
55
|
-
"prettier"
|
|
63
|
+
"prettier",
|
|
64
|
+
"plugin:storybook/recommended"
|
|
56
65
|
]
|
|
57
66
|
},
|
|
58
67
|
"prettier": {
|
package/src/PdCalendar.js
CHANGED
|
@@ -169,10 +169,17 @@ export class PdCalendar extends LitElement {
|
|
|
169
169
|
font-weight: bold;
|
|
170
170
|
}
|
|
171
171
|
|
|
172
|
+
.icon-container {
|
|
173
|
+
display: flex;
|
|
174
|
+
align-items: center;
|
|
175
|
+
justify-content: center;
|
|
176
|
+
gap: 5px;
|
|
177
|
+
}
|
|
178
|
+
|
|
172
179
|
.arrow {
|
|
173
180
|
cursor: pointer;
|
|
174
181
|
--pd-icon-size: var(--pd-calendar-title-icon-size, 1.2em);
|
|
175
|
-
--pd-icon-bg-col-hover: lightgrey;
|
|
182
|
+
--pd-icon-bg-col-hover: lightgrey;
|
|
176
183
|
}
|
|
177
184
|
`];
|
|
178
185
|
}
|
|
@@ -282,7 +289,7 @@ export class PdCalendar extends LitElement {
|
|
|
282
289
|
|
|
283
290
|
<div class="header-main">
|
|
284
291
|
|
|
285
|
-
<div>
|
|
292
|
+
<div class="icon-container">
|
|
286
293
|
<pd-icon
|
|
287
294
|
@click="${this._previousMonth}"
|
|
288
295
|
class="arrow"
|
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
|
-
});
|