@progressive-development/pd-calendar 0.0.3 → 0.0.5
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/package.json +2 -2
- package/src/PdCalendar.js +5 -5
- package/stories/index.stories.js +12 -31
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.0.
|
|
6
|
+
"version": "0.0.5",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"module": "index.js",
|
|
9
9
|
"scripts": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"lit": "^2.0.2",
|
|
34
|
-
"@progressive-development/pd-icon": "0.0.
|
|
34
|
+
"@progressive-development/pd-icon": "0.0.7",
|
|
35
35
|
"fecha": "^4.2.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
package/src/PdCalendar.js
CHANGED
|
@@ -232,7 +232,7 @@ export class PdCalendar extends LitElement {
|
|
|
232
232
|
/* Hack */
|
|
233
233
|
padding-top: 8px;
|
|
234
234
|
cursor: pointer;
|
|
235
|
-
--
|
|
235
|
+
--pd-icon-size: 1.5rem;
|
|
236
236
|
--my-fill-color: var(--my-title-color);
|
|
237
237
|
}
|
|
238
238
|
`;
|
|
@@ -328,19 +328,19 @@ export class PdCalendar extends LitElement {
|
|
|
328
328
|
<div class="layout-container">
|
|
329
329
|
<div class="header">
|
|
330
330
|
<div class="header-main">
|
|
331
|
-
<
|
|
331
|
+
<pd-icon
|
|
332
332
|
@click="${this._previousMonth}"
|
|
333
333
|
class="arrow"
|
|
334
334
|
icon="previousArrow"
|
|
335
|
-
></
|
|
335
|
+
></pd-icon>
|
|
336
336
|
|
|
337
337
|
<span class="content-title">${this._monthName}</span>
|
|
338
338
|
|
|
339
|
-
<
|
|
339
|
+
<pd-icon
|
|
340
340
|
@click="${this._nextMonth}"
|
|
341
341
|
class="arrow"
|
|
342
342
|
icon="nextArrow"
|
|
343
|
-
></
|
|
343
|
+
></pd-icon>
|
|
344
344
|
</div>
|
|
345
345
|
|
|
346
346
|
<div class="header-icons"></div>
|
package/stories/index.stories.js
CHANGED
|
@@ -2,43 +2,24 @@ import { html } from 'lit';
|
|
|
2
2
|
import '../pd-calendar.js';
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
|
-
title: '
|
|
5
|
+
title: 'Calendar',
|
|
6
6
|
component: 'pd-calendar',
|
|
7
7
|
argTypes: {
|
|
8
|
-
title: { control: 'text' },
|
|
9
|
-
counter: { control: 'number' },
|
|
10
|
-
textColor: { control: 'color' },
|
|
11
8
|
},
|
|
12
9
|
};
|
|
13
10
|
|
|
14
|
-
function
|
|
15
|
-
return html`
|
|
16
|
-
<pd-calendar
|
|
17
|
-
style="--pd-calendar-text-color: ${textColor || 'black'}"
|
|
18
|
-
.title=${title}
|
|
19
|
-
.counter=${counter}
|
|
20
|
-
>
|
|
21
|
-
${slot}
|
|
22
|
-
</pd-calendar>
|
|
23
|
-
`;
|
|
11
|
+
function CalendarTemplate({ data }) {
|
|
12
|
+
return html` <pd-calendar .data="${data || {}}"></pd-calendar> `;
|
|
24
13
|
}
|
|
25
14
|
|
|
26
|
-
export const
|
|
15
|
+
export const Basic = CalendarTemplate.bind({});
|
|
16
|
+
Basic.args = {};
|
|
27
17
|
|
|
28
|
-
export const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
counter: 123456,
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export const SlottedContent = Template.bind({});
|
|
39
|
-
SlottedContent.args = {
|
|
40
|
-
slot: html`<p>Slotted content</p>`,
|
|
41
|
-
};
|
|
42
|
-
SlottedContent.argTypes = {
|
|
43
|
-
slot: { table: { disable: true } },
|
|
18
|
+
export const WithInfo = CalendarTemplate.bind({});
|
|
19
|
+
WithInfo.args = {
|
|
20
|
+
data: {
|
|
21
|
+
'2021-05-13': [{ info: '180€' }],
|
|
22
|
+
'2021-05-14': [{ info: '160€' }],
|
|
23
|
+
'2021-05-31': [{ info: '120€' }],
|
|
24
|
+
},
|
|
44
25
|
};
|