@amiceli/papierjs 0.7.0 → 0.9.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/dist/cjs/{index-875ceae0.js → index-e53c626b.js} +43 -6
- package/dist/cjs/index-e53c626b.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/p-accordion.cjs.entry.js +1 -1
- package/dist/cjs/p-alert.cjs.entry.js +1 -1
- package/dist/cjs/p-badge.cjs.entry.js +1 -1
- package/dist/cjs/p-breadcrumb-item.cjs.entry.js +1 -1
- package/dist/cjs/p-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +9 -6
- package/dist/cjs/p-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/p-dropdown-preview.cjs.entry.js +2 -2
- package/dist/cjs/p-icon.cjs.entry.js +513 -0
- package/dist/cjs/p-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/p-input-text.cjs.entry.js +13 -7
- package/dist/cjs/p-input-text.cjs.entry.js.map +1 -1
- package/dist/cjs/p-leaf.cjs.entry.js +1 -1
- package/dist/cjs/p-modal-preview.cjs.entry.js +1 -1
- package/dist/cjs/p-modal.cjs.entry.js +2 -2
- package/dist/cjs/p-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/p-notification-handler.cjs.entry.js +1 -1
- package/dist/cjs/p-notification-preview.cjs.entry.js +1 -1
- package/dist/cjs/p-notification.cjs.entry.js +1 -1
- package/dist/cjs/p-progress-bar.cjs.entry.js +12 -2
- package/dist/cjs/p-progress-bar.cjs.entry.js.map +1 -1
- package/dist/cjs/p-slider.cjs.entry.js +1 -1
- package/dist/cjs/p-spinner.cjs.entry.js +33 -0
- package/dist/cjs/p-spinner.cjs.entry.js.map +1 -0
- package/dist/cjs/p-switch-tile.cjs.entry.js +1 -1
- package/dist/cjs/p-switch.cjs.entry.js +1 -1
- package/dist/cjs/p-tab.cjs.entry.js +3 -3
- package/dist/cjs/p-tabs.cjs.entry.js +4 -4
- package/dist/cjs/p-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/p-tooltip.cjs.entry.js.map +1 -1
- package/dist/cjs/papierjs.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/button/button.js +24 -1
- package/dist/collection/components/button/button.js.map +1 -1
- package/dist/collection/components/dropdown/dropdown/dropdown.js +2 -2
- package/dist/collection/components/dropdown/dropdown/stories/dropdown.preview.js +1 -1
- package/dist/collection/components/dropdown/dropdown-item/dropdown-item.js +2 -2
- package/dist/collection/components/form/input-text/input-text.css +3 -0
- package/dist/collection/components/form/input-text/input-text.js +32 -13
- package/dist/collection/components/form/input-text/input-text.js.map +1 -1
- package/dist/collection/components/modal/modal.css +3 -0
- package/dist/collection/components/p-icon/icons.js +489 -0
- package/dist/collection/components/p-icon/icons.js.map +1 -0
- package/dist/collection/components/p-icon/p-icon.css +6 -0
- package/dist/collection/components/p-icon/p-icon.js +92 -0
- package/dist/collection/components/p-icon/p-icon.js.map +1 -0
- package/dist/collection/components/p-icon/stories/p-icon-playground.stories.js +34 -0
- package/dist/collection/components/p-spinner/p-spinner.css +3250 -0
- package/dist/collection/components/p-spinner/p-spinner.js +94 -0
- package/dist/collection/components/p-spinner/p-spinner.js.map +1 -0
- package/dist/collection/components/p-spinner/stories/p-spinner-playground.stories.js +27 -0
- package/dist/collection/components/progress-bar/progress-bar.js +35 -1
- package/dist/collection/components/progress-bar/progress-bar.js.map +1 -1
- package/dist/collection/components/tabs/tab/tab.js +2 -2
- package/dist/collection/components/tabs/tabs/tabs.js +3 -3
- package/dist/collection/components/tooltip/tooltip.css +3 -0
- package/dist/collection/components/tooltip/tooltip.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/{p-c3c46963.js → p-34faf3f1.js} +3 -3
- package/dist/components/{p-c3c46963.js.map → p-34faf3f1.js.map} +1 -1
- package/dist/components/{p-555df865.js → p-642f2cf7.js} +3 -3
- package/dist/components/p-642f2cf7.js.map +1 -0
- package/dist/components/{p-51fafe64.js → p-a714a956.js} +4 -4
- package/dist/components/{p-51fafe64.js.map → p-a714a956.js.map} +1 -1
- package/dist/components/p-a900d6a8.js +49 -0
- package/dist/components/p-a900d6a8.js.map +1 -0
- package/dist/components/p-accordion.js +1 -1
- package/dist/components/p-alert.js +1 -1
- package/dist/components/p-badge.js +1 -1
- package/dist/components/p-breadcrumb-item.js +1 -1
- package/dist/components/p-breadcrumb.js +1 -1
- package/dist/components/p-button.js +1 -1
- package/dist/components/{p-af62ba98.js → p-c65086ec.js} +32 -4
- package/dist/components/p-c65086ec.js.map +1 -0
- package/dist/components/p-dropdown-item.js +1 -1
- package/dist/components/p-dropdown-preview.js +16 -10
- package/dist/components/p-dropdown-preview.js.map +1 -1
- package/dist/components/p-dropdown.js +1 -1
- package/dist/components/{p-ef7a623f.js → p-ef0c3ae9.js} +2 -2
- package/dist/components/{p-ef7a623f.js.map → p-ef0c3ae9.js.map} +1 -1
- package/dist/components/{p-3e858546.js → p-f4386040.js} +15 -5
- package/dist/components/p-f4386040.js.map +1 -0
- package/dist/components/{p-c8138bbd.js → p-fe923a22.js} +4 -4
- package/dist/components/{p-c8138bbd.js.map → p-fe923a22.js.map} +1 -1
- package/dist/components/p-icon.d.ts +11 -0
- package/dist/components/p-icon.js +533 -0
- package/dist/components/p-icon.js.map +1 -0
- package/dist/components/p-input-text.js +15 -9
- package/dist/components/p-input-text.js.map +1 -1
- package/dist/components/p-leaf.js +1 -1
- package/dist/components/p-modal-preview.js +11 -5
- package/dist/components/p-modal-preview.js.map +1 -1
- package/dist/components/p-modal.js +1 -1
- package/dist/components/p-notification-handler.js +1 -1
- package/dist/components/p-notification-preview.js +17 -11
- package/dist/components/p-notification-preview.js.map +1 -1
- package/dist/components/p-notification.js +1 -1
- package/dist/components/p-progress-bar.js +15 -3
- package/dist/components/p-progress-bar.js.map +1 -1
- package/dist/components/p-slider.js +1 -1
- package/dist/components/p-spinner.d.ts +11 -0
- package/dist/components/p-spinner.js +8 -0
- package/dist/components/p-spinner.js.map +1 -0
- package/dist/components/p-switch-tile.js +1 -1
- package/dist/components/p-switch.js +1 -1
- package/dist/components/p-tab.js +3 -3
- package/dist/components/p-tabs.js +4 -4
- package/dist/components/p-tooltip.js +3 -3
- package/dist/components/p-tooltip.js.map +1 -1
- package/dist/esm/{index-7ee4e700.js → index-aee2eada.js} +43 -6
- package/dist/esm/index-aee2eada.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/p-accordion.entry.js +1 -1
- package/dist/esm/p-alert.entry.js +1 -1
- package/dist/esm/p-badge.entry.js +1 -1
- package/dist/esm/p-breadcrumb-item.entry.js +1 -1
- package/dist/esm/p-breadcrumb.entry.js +1 -1
- package/dist/esm/p-button_3.entry.js +9 -6
- package/dist/esm/p-button_3.entry.js.map +1 -1
- package/dist/esm/p-dropdown-preview.entry.js +2 -2
- package/dist/esm/p-icon.entry.js +509 -0
- package/dist/esm/p-icon.entry.js.map +1 -0
- package/dist/esm/p-input-text.entry.js +13 -7
- package/dist/esm/p-input-text.entry.js.map +1 -1
- package/dist/esm/p-leaf.entry.js +1 -1
- package/dist/esm/p-modal-preview.entry.js +1 -1
- package/dist/esm/p-modal.entry.js +2 -2
- package/dist/esm/p-modal.entry.js.map +1 -1
- package/dist/esm/p-notification-handler.entry.js +1 -1
- package/dist/esm/p-notification-preview.entry.js +1 -1
- package/dist/esm/p-notification.entry.js +1 -1
- package/dist/esm/p-progress-bar.entry.js +12 -2
- package/dist/esm/p-progress-bar.entry.js.map +1 -1
- package/dist/esm/p-slider.entry.js +1 -1
- package/dist/esm/p-spinner.entry.js +29 -0
- package/dist/esm/p-spinner.entry.js.map +1 -0
- package/dist/esm/p-switch-tile.entry.js +1 -1
- package/dist/esm/p-switch.entry.js +1 -1
- package/dist/esm/p-tab.entry.js +3 -3
- package/dist/esm/p-tabs.entry.js +4 -4
- package/dist/esm/p-tooltip.entry.js +3 -3
- package/dist/esm/p-tooltip.entry.js.map +1 -1
- package/dist/esm/papierjs.js +3 -3
- package/dist/papierjs/{p-55975574.entry.js → p-03a16f60.entry.js} +2 -2
- package/dist/papierjs/p-03a16f60.entry.js.map +1 -0
- package/dist/papierjs/{p-7b6c5a15.entry.js → p-06d54935.entry.js} +2 -2
- package/dist/papierjs/{p-4ef52ae1.entry.js → p-08aac893.entry.js} +2 -2
- package/dist/papierjs/{p-21ae2040.entry.js → p-0c87229d.entry.js} +2 -2
- package/dist/papierjs/{p-bc16a85a.entry.js → p-1ebff2d7.entry.js} +2 -2
- package/dist/papierjs/{p-d9e3c9ca.entry.js → p-23b08b62.entry.js} +2 -2
- package/dist/papierjs/p-2cb3923f.entry.js +2 -0
- package/dist/papierjs/p-2cb3923f.entry.js.map +1 -0
- package/dist/papierjs/{p-acf916fa.entry.js → p-3c06fffc.entry.js} +2 -2
- package/dist/papierjs/{p-f7bc7154.entry.js → p-3efab78f.entry.js} +2 -2
- package/dist/papierjs/{p-4de54c9d.entry.js → p-462779ed.entry.js} +2 -2
- package/dist/papierjs/p-4cb8bb30.js +3 -0
- package/dist/{cjs/index-875ceae0.js.map → papierjs/p-4cb8bb30.js.map} +1 -1
- package/dist/papierjs/{p-4e8985c5.entry.js → p-5a6898e8.entry.js} +2 -2
- package/dist/papierjs/p-5a6898e8.entry.js.map +1 -0
- package/dist/papierjs/p-5c511196.entry.js +2 -0
- package/dist/papierjs/p-5c511196.entry.js.map +1 -0
- package/dist/papierjs/{p-edbf5d19.entry.js → p-7d32bcf0.entry.js} +2 -2
- package/dist/papierjs/p-7d32bcf0.entry.js.map +1 -0
- package/dist/papierjs/{p-a40b185f.entry.js → p-83c4843a.entry.js} +2 -2
- package/dist/papierjs/p-83c4843a.entry.js.map +1 -0
- package/dist/papierjs/{p-d583fd92.entry.js → p-860525ed.entry.js} +2 -2
- package/dist/papierjs/{p-963f21b8.entry.js → p-907ecded.entry.js} +2 -2
- package/dist/papierjs/{p-a2523f10.entry.js → p-9b8dfa28.entry.js} +2 -2
- package/dist/papierjs/{p-ef8536b9.entry.js → p-b292b138.entry.js} +2 -2
- package/dist/papierjs/p-b3f595fd.entry.js +2 -0
- package/dist/papierjs/p-b3f595fd.entry.js.map +1 -0
- package/dist/papierjs/p-b8b2a5c8.entry.js +2 -0
- package/dist/papierjs/{p-b783633d.entry.js → p-c2d59e17.entry.js} +2 -2
- package/dist/papierjs/{p-3149398f.entry.js → p-cce903e9.entry.js} +2 -2
- package/dist/papierjs/{p-743abca9.entry.js → p-d9e2e92c.entry.js} +2 -2
- package/dist/papierjs/papierjs.esm.js +1 -1
- package/dist/papierjs/papierjs.esm.js.map +1 -1
- package/dist/types/components/button/button.d.ts +2 -0
- package/dist/types/components/form/input-text/input-text.d.ts +4 -2
- package/dist/types/components/p-icon/icons.d.ts +1 -0
- package/dist/types/components/p-icon/p-icon.d.ts +7 -0
- package/dist/types/components/p-spinner/p-spinner.d.ts +9 -0
- package/dist/types/components/progress-bar/progress-bar.d.ts +4 -0
- package/dist/types/components.d.ts +46 -2
- package/package.json +7 -4
- package/readme.md +1 -0
- package/dist/components/p-3e858546.js.map +0 -1
- package/dist/components/p-555df865.js.map +0 -1
- package/dist/components/p-af62ba98.js.map +0 -1
- package/dist/esm/index-7ee4e700.js.map +0 -1
- package/dist/papierjs/p-34a520d8.js +0 -3
- package/dist/papierjs/p-34a520d8.js.map +0 -1
- package/dist/papierjs/p-4e8985c5.entry.js.map +0 -1
- package/dist/papierjs/p-55975574.entry.js.map +0 -1
- package/dist/papierjs/p-57f13bee.entry.js +0 -2
- package/dist/papierjs/p-5e68bd6c.entry.js +0 -2
- package/dist/papierjs/p-5e68bd6c.entry.js.map +0 -1
- package/dist/papierjs/p-a40b185f.entry.js.map +0 -1
- package/dist/papierjs/p-edbf5d19.entry.js.map +0 -1
- /package/dist/papierjs/{p-7b6c5a15.entry.js.map → p-06d54935.entry.js.map} +0 -0
- /package/dist/papierjs/{p-4ef52ae1.entry.js.map → p-08aac893.entry.js.map} +0 -0
- /package/dist/papierjs/{p-21ae2040.entry.js.map → p-0c87229d.entry.js.map} +0 -0
- /package/dist/papierjs/{p-bc16a85a.entry.js.map → p-1ebff2d7.entry.js.map} +0 -0
- /package/dist/papierjs/{p-d9e3c9ca.entry.js.map → p-23b08b62.entry.js.map} +0 -0
- /package/dist/papierjs/{p-acf916fa.entry.js.map → p-3c06fffc.entry.js.map} +0 -0
- /package/dist/papierjs/{p-f7bc7154.entry.js.map → p-3efab78f.entry.js.map} +0 -0
- /package/dist/papierjs/{p-4de54c9d.entry.js.map → p-462779ed.entry.js.map} +0 -0
- /package/dist/papierjs/{p-d583fd92.entry.js.map → p-860525ed.entry.js.map} +0 -0
- /package/dist/papierjs/{p-963f21b8.entry.js.map → p-907ecded.entry.js.map} +0 -0
- /package/dist/papierjs/{p-a2523f10.entry.js.map → p-9b8dfa28.entry.js.map} +0 -0
- /package/dist/papierjs/{p-ef8536b9.entry.js.map → p-b292b138.entry.js.map} +0 -0
- /package/dist/papierjs/{p-57f13bee.entry.js.map → p-b8b2a5c8.entry.js.map} +0 -0
- /package/dist/papierjs/{p-b783633d.entry.js.map → p-c2d59e17.entry.js.map} +0 -0
- /package/dist/papierjs/{p-3149398f.entry.js.map → p-cce903e9.entry.js.map} +0 -0
- /package/dist/papierjs/{p-743abca9.entry.js.map → p-d9e2e92c.entry.js.map} +0 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
export class PSpinner {
|
|
3
|
+
constructor() {
|
|
4
|
+
this.large = false;
|
|
5
|
+
}
|
|
6
|
+
getStyle() {
|
|
7
|
+
return {
|
|
8
|
+
backgroundColor: this.color || 'currentColor',
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return (h(Host, { key: '4a41842ec2411ca6ece5f790bc0455662e4afe4e' }, h("div", { key: 'f3366e6f349a2c4ebc521fb5e6c726911dd148e6', class: {
|
|
13
|
+
'p-spinner': true,
|
|
14
|
+
papier: true,
|
|
15
|
+
'is--large': this.large,
|
|
16
|
+
'is--dark': this.dark,
|
|
17
|
+
} }, h("div", { key: 'c3106cda345e743c5e164e873e509f404e4c05cd', class: "border border-primary", style: this.getStyle() }), h("div", { key: '0c6337ddc6f779ebf292edca69dbbef50cf1f122', class: "border border-primary", style: this.getStyle() }), h("div", { key: 'b22d65d9627cabd463911e512e784f94cf700ec8', class: "border border-primary", style: this.getStyle() }))));
|
|
18
|
+
}
|
|
19
|
+
static get is() { return "p-spinner"; }
|
|
20
|
+
static get encapsulation() { return "shadow"; }
|
|
21
|
+
static get originalStyleUrls() {
|
|
22
|
+
return {
|
|
23
|
+
"$": ["p-spinner.scss"]
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
static get styleUrls() {
|
|
27
|
+
return {
|
|
28
|
+
"$": ["p-spinner.css"]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
static get properties() {
|
|
32
|
+
return {
|
|
33
|
+
"large": {
|
|
34
|
+
"type": "boolean",
|
|
35
|
+
"mutable": false,
|
|
36
|
+
"complexType": {
|
|
37
|
+
"original": "boolean",
|
|
38
|
+
"resolved": "boolean",
|
|
39
|
+
"references": {}
|
|
40
|
+
},
|
|
41
|
+
"required": false,
|
|
42
|
+
"optional": false,
|
|
43
|
+
"docs": {
|
|
44
|
+
"tags": [],
|
|
45
|
+
"text": ""
|
|
46
|
+
},
|
|
47
|
+
"getter": false,
|
|
48
|
+
"setter": false,
|
|
49
|
+
"attribute": "large",
|
|
50
|
+
"reflect": false,
|
|
51
|
+
"defaultValue": "false"
|
|
52
|
+
},
|
|
53
|
+
"color": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"mutable": false,
|
|
56
|
+
"complexType": {
|
|
57
|
+
"original": "string",
|
|
58
|
+
"resolved": "string",
|
|
59
|
+
"references": {}
|
|
60
|
+
},
|
|
61
|
+
"required": false,
|
|
62
|
+
"optional": true,
|
|
63
|
+
"docs": {
|
|
64
|
+
"tags": [],
|
|
65
|
+
"text": ""
|
|
66
|
+
},
|
|
67
|
+
"getter": false,
|
|
68
|
+
"setter": false,
|
|
69
|
+
"attribute": "color",
|
|
70
|
+
"reflect": false
|
|
71
|
+
},
|
|
72
|
+
"dark": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"mutable": false,
|
|
75
|
+
"complexType": {
|
|
76
|
+
"original": "boolean",
|
|
77
|
+
"resolved": "boolean",
|
|
78
|
+
"references": {}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": true,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": ""
|
|
85
|
+
},
|
|
86
|
+
"getter": false,
|
|
87
|
+
"setter": false,
|
|
88
|
+
"attribute": "dark",
|
|
89
|
+
"reflect": false
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=p-spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"p-spinner.js","sourceRoot":"","sources":["../../../src/components/p-spinner/p-spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AAOxD,MAAM,OAAO,QAAQ;IALrB;QAOW,UAAK,GAAY,KAAK,CAAA;KAyChC;IAjCU,QAAQ;QACX,OAAO;YACH,eAAe,EAAE,IAAI,CAAC,KAAK,IAAI,cAAc;SAChD,CAAA;IACL,CAAC;IAED,MAAM;QACF,OAAO,CACH,EAAC,IAAI;YACD,4DACI,KAAK,EAAE;oBACH,WAAW,EAAE,IAAI;oBACjB,MAAM,EAAE,IAAI;oBACZ,WAAW,EAAE,IAAI,CAAC,KAAK;oBACvB,UAAU,EAAE,IAAI,CAAC,IAAI;iBACxB;gBAED,4DACI,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GACxB;gBACF,4DACI,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GACxB;gBACF,4DACI,KAAK,EAAC,uBAAuB,EAC7B,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE,GACxB,CACA,CACH,CACV,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Host, Prop, h } from '@stencil/core'\n\n@Component({\n tag: 'p-spinner',\n styleUrl: 'p-spinner.scss',\n shadow: true,\n})\nexport class PSpinner {\n @Prop()\n public large: boolean = false\n\n @Prop()\n public color?: string\n\n @Prop()\n public dark?: boolean\n\n public getStyle() {\n return {\n backgroundColor: this.color || 'currentColor',\n }\n }\n\n render() {\n return (\n <Host>\n <div\n class={{\n 'p-spinner': true,\n papier: true,\n 'is--large': this.large,\n 'is--dark': this.dark,\n }}\n >\n <div\n class=\"border border-primary\"\n style={this.getStyle()}\n />\n <div\n class=\"border border-primary\"\n style={this.getStyle()}\n />\n <div\n class=\"border border-primary\"\n style={this.getStyle()}\n />\n </div>\n </Host>\n )\n }\n}\n"]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Spinner/Playground',
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
const Template = (args) => {
|
|
6
|
+
return `
|
|
7
|
+
<p-leaf>
|
|
8
|
+
<h3>p-spinner</h3>
|
|
9
|
+
</p-leaf>
|
|
10
|
+
<br />
|
|
11
|
+
<div style='padding: 10px; background: ${args.dark ? '#41403e' : 'white'}'>
|
|
12
|
+
<p-spinner
|
|
13
|
+
color="${args.color}"
|
|
14
|
+
${args.large ? 'large' : ''}
|
|
15
|
+
${args.dark ? 'dark' : ''}
|
|
16
|
+
></p-spinner>
|
|
17
|
+
</div>
|
|
18
|
+
`
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const Playground = Template.bind({})
|
|
22
|
+
|
|
23
|
+
Playground.args = {
|
|
24
|
+
dark: false,
|
|
25
|
+
large: false,
|
|
26
|
+
color: 'inherit',
|
|
27
|
+
}
|
|
@@ -6,6 +6,16 @@ export class ProgressBar {
|
|
|
6
6
|
this.striped = false;
|
|
7
7
|
this.dark = false;
|
|
8
8
|
}
|
|
9
|
+
componentDidLoad() {
|
|
10
|
+
if (this.auto) {
|
|
11
|
+
this.interval = window.setInterval(() => {
|
|
12
|
+
this.value = this.value >= 100 ? 0 : this.value + 10;
|
|
13
|
+
}, this.auto);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
disconnectedCallback() {
|
|
17
|
+
window.clearInterval(this.interval);
|
|
18
|
+
}
|
|
9
19
|
getClass() {
|
|
10
20
|
const types = [
|
|
11
21
|
'secondary',
|
|
@@ -36,7 +46,7 @@ export class ProgressBar {
|
|
|
36
46
|
return cssClass;
|
|
37
47
|
}
|
|
38
48
|
render() {
|
|
39
|
-
return (h("div", { key: '
|
|
49
|
+
return (h("div", { key: 'f77ea9deebca9331ea9dc57983b7effc0001579d', class: this.getParentClass() }, h("div", { key: '40197b0a4574f76ae8bc6229ed917a5d83441ab7', class: "progress" }, h("div", { key: 'a728ce2662ad1c279cac34a5414a1291c64c600f', class: this.getClass() }, h("slot", { key: '039a17e5cec9d958f82ab66e00eaafc141068d4a' })))));
|
|
40
50
|
}
|
|
41
51
|
static get is() { return "p-progress-bar"; }
|
|
42
52
|
static get encapsulation() { return "shadow"; }
|
|
@@ -136,8 +146,32 @@ export class ProgressBar {
|
|
|
136
146
|
"attribute": "dark",
|
|
137
147
|
"reflect": false,
|
|
138
148
|
"defaultValue": "false"
|
|
149
|
+
},
|
|
150
|
+
"auto": {
|
|
151
|
+
"type": "number",
|
|
152
|
+
"mutable": false,
|
|
153
|
+
"complexType": {
|
|
154
|
+
"original": "number",
|
|
155
|
+
"resolved": "number",
|
|
156
|
+
"references": {}
|
|
157
|
+
},
|
|
158
|
+
"required": false,
|
|
159
|
+
"optional": true,
|
|
160
|
+
"docs": {
|
|
161
|
+
"tags": [],
|
|
162
|
+
"text": ""
|
|
163
|
+
},
|
|
164
|
+
"getter": false,
|
|
165
|
+
"setter": false,
|
|
166
|
+
"attribute": "auto",
|
|
167
|
+
"reflect": false
|
|
139
168
|
}
|
|
140
169
|
};
|
|
141
170
|
}
|
|
171
|
+
static get states() {
|
|
172
|
+
return {
|
|
173
|
+
"interval": {}
|
|
174
|
+
};
|
|
175
|
+
}
|
|
142
176
|
}
|
|
143
177
|
//# sourceMappingURL=progress-bar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress-bar.js","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"progress-bar.js","sourceRoot":"","sources":["../../../src/components/progress-bar/progress-bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AAezD,MAAM,OAAO,WAAW;IALxB;QAOI,SAAI,GAAsB,SAAS,CAAA;QAEnC,UAAK,GAAY,CAAC,CAAA;QAElB,YAAO,GAAa,KAAK,CAAA;QAEzB,SAAI,GAAa,KAAK,CAAA;KAkEzB;IA3DU,gBAAgB;QACnB,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,WAAW,CAAC,GAAG,EAAE;gBACpC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAA;YACxD,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;QACjB,CAAC;IACL,CAAC;IAEM,oBAAoB;QACvB,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IACvC,CAAC;IAEM,QAAQ;QACX,MAAM,KAAK,GAAG;YACV,WAAW;YACX,SAAS;YACT,SAAS;YACT,QAAQ;YACR,OAAO;YACP,SAAS;SACZ,CAAA;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAA;QAEtE,IAAI,QAAQ,GAAG,SAAS,KAAK,EAAE,CAAA;QAE/B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YAC7B,QAAQ,GAAG,GAAG,QAAQ,UAAU,CAAA;QACpC,CAAC;aAAM,CAAC;YACJ,QAAQ,GAAG,GAAG,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAA;QACzC,CAAC;QAED,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACf,QAAQ,GAAG,GAAG,QAAQ,UAAU,CAAA;QACpC,CAAC;QAED,OAAO,QAAQ,CAAA;IACnB,CAAC;IAEM,cAAc;QACjB,IAAI,QAAQ,GAAG,kBAAkB,CAAA;QAEjC,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,QAAQ,GAAG,GAAG,QAAQ,WAAW,CAAA;QACrC,CAAC;QAED,OAAO,QAAQ,CAAA;IACnB,CAAC;IAED,MAAM;QACF,OAAO,CACH,4DAAK,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE;YAC7B,4DAAK,KAAK,EAAC,UAAU;gBACjB,4DAAK,KAAK,EAAE,IAAI,CAAC,QAAQ,EAAE;oBACvB,8DAAQ,CACN,CACJ,CACJ,CACT,CAAA;IACL,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACJ","sourcesContent":["import { Component, Prop, State, h } from '@stencil/core'\n\ntype ProgressBarColor =\n | 'secondary'\n | 'success'\n | 'warning'\n | 'danger'\n | 'muted'\n | 'primary'\n\n@Component({\n tag: 'p-progress-bar',\n styleUrl: 'progress-bar.scss',\n shadow: true,\n})\nexport class ProgressBar {\n @Prop()\n type?: ProgressBarColor = 'primary'\n @Prop()\n value?: number = 0\n @Prop()\n striped?: boolean = false\n @Prop()\n dark?: boolean = false\n @Prop()\n auto?: number\n\n @State()\n interval?: number\n\n public componentDidLoad() {\n if (this.auto) {\n this.interval = window.setInterval(() => {\n this.value = this.value >= 100 ? 0 : this.value + 10\n }, this.auto)\n }\n }\n\n public disconnectedCallback() {\n window.clearInterval(this.interval)\n }\n\n public getClass(): string {\n const types = [\n 'secondary',\n 'success',\n 'warning',\n 'danger',\n 'muted',\n 'primary',\n ]\n const value = this.value < 0 ? 0 : this.value > 100 ? 100 : this.value\n\n let cssClass = `bar w-${value}`\n\n if (!types.includes(this.type)) {\n cssClass = `${cssClass} primary`\n } else {\n cssClass = `${cssClass} ${this.type}`\n }\n\n if (this.striped) {\n cssClass = `${cssClass} striped`\n }\n\n return cssClass\n }\n\n public getParentClass() {\n let cssClass = 'papier is--block'\n\n if (this.dark) {\n cssClass = `${cssClass} is--dark`\n }\n\n return cssClass\n }\n\n render() {\n return (\n <div class={this.getParentClass()}>\n <div class=\"progress\">\n <div class={this.getClass()}>\n <slot />\n </div>\n </div>\n </div>\n )\n }\n}\n"]}
|
|
@@ -5,11 +5,11 @@ export class PTab {
|
|
|
5
5
|
this.dark = false;
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
|
-
return (h(Host, { key: '
|
|
8
|
+
return (h(Host, { key: '1ea5cf18627b1720210a140698e035707cfb8b1f' }, h("div", { key: 'f57138c165e957d2dfe375920728c821bd96a435', class: {
|
|
9
9
|
papier: true,
|
|
10
10
|
'is--selected': this.selected,
|
|
11
11
|
'is--dark': this.dark,
|
|
12
|
-
} }, h("slot", { key: '
|
|
12
|
+
} }, h("slot", { key: 'd3ae85ebe177281245e489a2e7ec55926edf410f' }))));
|
|
13
13
|
}
|
|
14
14
|
static get is() { return "p-tab"; }
|
|
15
15
|
static get encapsulation() { return "shadow"; }
|
|
@@ -44,12 +44,12 @@ export class PTabs {
|
|
|
44
44
|
};
|
|
45
45
|
}
|
|
46
46
|
render() {
|
|
47
|
-
return (h(Host, { key: '
|
|
47
|
+
return (h(Host, { key: 'd59b104d239042132d6c4451b58aad48b3886234' }, h("div", { key: '2eb521ba002c190a066dc7039474c5969e0c1bf1', class: {
|
|
48
48
|
'is--dark': this.dark,
|
|
49
49
|
papier: true,
|
|
50
|
-
} }, h("div", { key: '
|
|
50
|
+
} }, h("div", { key: 'a9db4856105d86313b229a0abca779e8c98ca4d9', class: "row flex-spaces tabs" }, this.tabs.map((t) => {
|
|
51
51
|
return (h("label", { class: this.getTabClass(t), htmlFor: "tab1", key: t.title, onClick: () => this.onSelectTab(t) }, t.title));
|
|
52
|
-
}), h("div", { key: '
|
|
52
|
+
}), h("div", { key: 'f363537fc0ce3a310d2a1c5eef72884ceb122ff7', class: "content" }, h("slot", { key: '24150a096b7344d7f74ccfae58ca283ed8eb3f45' }))))));
|
|
53
53
|
}
|
|
54
54
|
static get is() { return "p-tabs"; }
|
|
55
55
|
static get encapsulation() { return "shadow"; }
|
|
@@ -8,7 +8,7 @@ export class PTooltip {
|
|
|
8
8
|
this.top = false;
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
|
-
return (h(Host, { key: '
|
|
11
|
+
return (h(Host, { key: '49696872fd30c059c732eac8b29b97f8a4df80f8' }, h("div", { key: '63c42e1a0dca1b46e0064bac1104aa4db0f2af7a', class: "papier" }, h("div", { key: '0bd0ca4afc6aef686ee52859a3782a3a27d708c1', "popover-left": this.left && !this.disabled ? this.title : null, "popover-right": this.right && !this.disabled ? this.title : null, "popover-bottom": this.bottom && !this.disabled ? this.title : null, "popover-top": this.top && !this.disabled ? this.title : null }, h("slot", { key: '97d076079f049d7cbf4187675b81a6c5c95aab4f' })))));
|
|
12
12
|
}
|
|
13
13
|
static get is() { return "p-tooltip"; }
|
|
14
14
|
static get encapsulation() { return "shadow"; }
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, h, c as Host } from './p-
|
|
2
|
-
import { d as defineCustomElement$1 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, h, c as Host } from './p-c65086ec.js';
|
|
2
|
+
import { d as defineCustomElement$1 } from './p-ef0c3ae9.js';
|
|
3
3
|
|
|
4
4
|
const pNotificationHandlerCss = ":host{pointer-events:none;display:flex;flex-direction:column;justify-content:center;row-gap:8px;position:fixed;top:40px;margin:auto 80px;left:0;right:0;z-index:9999}";
|
|
5
5
|
const PNotificationHandlerStyle0 = pNotificationHandlerCss;
|
|
@@ -75,4 +75,4 @@ defineCustomElement();
|
|
|
75
75
|
|
|
76
76
|
export { PNotificationHandler as P, defineCustomElement as d };
|
|
77
77
|
|
|
78
|
-
//# sourceMappingURL=p-
|
|
78
|
+
//# sourceMappingURL=p-34faf3f1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-
|
|
1
|
+
{"file":"p-34faf3f1.js","mappings":";;;AAAA,MAAM,uBAAuB,GAAG,uKAAuK,CAAC;AACxM,mCAAe,uBAAuB;;MCiBzB,oBAAoB;IALjC;;;;QAOW,kBAAa,GAAmB,EAAE,CAAA;KAsD5C;IAnDU,MAAM,gBAAgB,CAAC,OAAoB;QAC9C,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,CAAA;QACjD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC,CAAA;QAC9C,IAAI,CAAC,aAAa,GAAG;YACjB,GAAG,IAAI,CAAC,aAAa;YACrB;gBACI,IAAI;gBACJ,IAAI;gBACJ,QAAQ;gBACR,SAAS;aACZ;SACJ,CAAA;QAED,IAAI,CAAC,OAAO;YAAE,OAAM;QAEpB,UAAU,CAAC;YACP,MAAM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,KAAK;gBAC/C,OAAO,KAAK,CAAC,SAAS,KAAK,SAAS,CAAA;aACvC,CAAC,CAAA;YACF,IAAI,YAAY,EAAE;gBACd,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAA;aAC9B;SACJ,EAAE,OAAO,CAAC,CAAA;KACd;IAEO,WAAW,CAAC,SAAiB;QACjC,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,KAAK;YACjD,OAAO,KAAK,CAAC,SAAS,KAAK,SAAS,CAAA;SACvC,CAAC,CAAA;KACL;IAGM,iBAAiB,CAAC,KAA0B;QAC/C,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;KACjC;IAEM,gBAAgB;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,MAChC,sBACI,GAAG,EAAE,KAAK,CAAC,IAAI,EACf,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAE,KAAK,CAAC,SAAS,GAC5B,CACL,CAAC,CAAA;KACL;IAED,MAAM;QACF,OAAO,EAAC,IAAI,uDAAE,IAAI,CAAC,gBAAgB,EAAE,CAAQ,CAAA;KAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/notification/p-notification-handler/p-notification-handler.scss?tag=p-notification-handler&encapsulation=shadow","src/components/notification/p-notification-handler/p-notification-handler.tsx"],"sourcesContent":[":host {\n pointer-events: none;\n display: flex;\n flex-direction: column;\n justify-content: center;\n row-gap: 8px;\n position: fixed;\n top: 40px;\n margin: auto 80px;\n left: 0;\n right: 0;\n z-index: 9999;\n}","import { Component, Host, Listen, Method, State, h } from '@stencil/core'\n\nexport type PushOptions = {\n type: string\n text: string\n canclose: boolean\n timeout?: number\n}\n\ntype Notification = PushOptions & {\n timestamp: string\n}\n\n@Component({\n tag: 'p-notification-handler',\n styleUrl: 'p-notification-handler.scss',\n shadow: true,\n})\nexport class PNotificationHandler {\n @State()\n public notifications: Notification[] = []\n\n @Method()\n public async pushNotification(options: PushOptions) {\n const { type, text, canclose, timeout } = options\n const timestamp = String(new Date().getTime())\n this.notifications = [\n ...this.notifications,\n {\n type,\n text,\n canclose,\n timestamp,\n },\n ]\n\n if (!timeout) return\n\n setTimeout(() => {\n const notification = this.notifications.find((toast) => {\n return toast.timestamp === timestamp\n })\n if (notification) {\n this.removeToast(timestamp)\n }\n }, timeout)\n }\n\n private removeToast(timestamp: string) {\n this.notifications = this.notifications.filter((toast) => {\n return toast.timestamp !== timestamp\n })\n }\n\n @Listen('close')\n public closeToastHandler(event: CustomEvent<string>) {\n this.removeToast(event.detail)\n }\n\n public mapNotifications() {\n return this.notifications.map((toast) => (\n <p-notification\n key={toast.type}\n type={toast.type}\n text={toast.text}\n canclose={toast.canclose}\n timestamp={toast.timestamp}\n />\n ))\n }\n\n render() {\n return <Host>{this.mapNotifications()}</Host>\n }\n}\n"],"version":3}
|