@paperless/core 0.1.0-alpha.0 → 0.1.0-alpha.2
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/CHANGELOG.md +16 -0
- package/dist/assets/icons/arrow.svg +1 -1
- package/dist/assets/icons/attachment.svg +1 -1
- package/dist/assets/icons/bread.svg +1 -1
- package/dist/assets/icons/calendar.svg +1 -1
- package/dist/assets/icons/car.svg +1 -1
- package/dist/assets/icons/checkmark.svg +1 -1
- package/dist/assets/icons/chevron.svg +1 -1
- package/dist/assets/icons/clock.svg +1 -1
- package/dist/assets/icons/cogs.svg +1 -1
- package/dist/assets/icons/comment.svg +1 -1
- package/dist/assets/icons/document.svg +1 -1
- package/dist/assets/icons/download.svg +1 -1
- package/dist/assets/icons/envelope.svg +1 -1
- package/dist/assets/icons/explanation.svg +1 -1
- package/dist/assets/icons/eye.svg +1 -1
- package/dist/assets/icons/filter.svg +1 -1
- package/dist/assets/icons/grid.svg +1 -1
- package/dist/assets/icons/headset.svg +1 -1
- package/dist/assets/icons/list.svg +1 -1
- package/dist/assets/icons/location.svg +1 -1
- package/dist/assets/icons/megaphone.svg +1 -1
- package/dist/assets/icons/minus.svg +1 -1
- package/dist/assets/icons/negative.svg +1 -1
- package/dist/assets/icons/pagination.svg +1 -1
- package/dist/assets/icons/payment.svg +1 -1
- package/dist/assets/icons/pencil.svg +1 -1
- package/dist/assets/icons/person.svg +1 -1
- package/dist/assets/icons/plus.svg +1 -1
- package/dist/assets/icons/question.svg +1 -1
- package/dist/assets/icons/receipt.svg +1 -1
- package/dist/assets/icons/report.svg +1 -1
- package/dist/assets/icons/search.svg +1 -1
- package/dist/assets/icons/settings.svg +1 -1
- package/dist/assets/icons/sick.svg +1 -1
- package/dist/assets/icons/tachometer.svg +1 -1
- package/dist/assets/icons/tool.svg +1 -1
- package/dist/assets/icons/trash.svg +1 -1
- package/dist/assets/icons/turn.svg +1 -1
- package/dist/assets/icons/upload.svg +1 -1
- package/dist/assets/icons/warning.svg +1 -1
- package/dist/build/p-1d13a9d2.entry.js +1 -0
- package/dist/build/p-208c1f28.entry.js +1 -0
- package/dist/build/p-98d07776.js +2 -0
- package/dist/build/p-bbd1d3df.entry.js +1 -0
- package/dist/build/p-cd525dcc.entry.js +1 -0
- package/dist/{paperless/p-98d636b6.entry.js → build/p-feec8ec1.entry.js} +1 -1
- package/dist/build/paperless.css +4 -3
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{index-6758a39e.js → index-5b30cb95.js} +3 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/p-button.cjs.entry.js +2 -2
- package/dist/cjs/p-icon.cjs.entry.js +42 -42
- package/dist/cjs/p-illustration.cjs.entry.js +3 -3
- package/dist/cjs/p-loader.cjs.entry.js +57 -0
- package/dist/cjs/p-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/paperless.cjs.js +2 -2
- package/dist/collection/assets/icons/arrow.svg +1 -1
- package/dist/collection/assets/icons/attachment.svg +1 -1
- package/dist/collection/assets/icons/bread.svg +1 -1
- package/dist/collection/assets/icons/calendar.svg +1 -1
- package/dist/collection/assets/icons/car.svg +1 -1
- package/dist/collection/assets/icons/checkmark.svg +1 -1
- package/dist/collection/assets/icons/chevron.svg +1 -1
- package/dist/collection/assets/icons/clock.svg +1 -1
- package/dist/collection/assets/icons/cogs.svg +1 -1
- package/dist/collection/assets/icons/comment.svg +1 -1
- package/dist/collection/assets/icons/document.svg +1 -1
- package/dist/collection/assets/icons/download.svg +1 -1
- package/dist/collection/assets/icons/envelope.svg +1 -1
- package/dist/collection/assets/icons/explanation.svg +1 -1
- package/dist/collection/assets/icons/eye.svg +1 -1
- package/dist/collection/assets/icons/filter.svg +1 -1
- package/dist/collection/assets/icons/grid.svg +1 -1
- package/dist/collection/assets/icons/headset.svg +1 -1
- package/dist/collection/assets/icons/list.svg +1 -1
- package/dist/collection/assets/icons/location.svg +1 -1
- package/dist/collection/assets/icons/megaphone.svg +1 -1
- package/dist/collection/assets/icons/minus.svg +1 -1
- package/dist/collection/assets/icons/negative.svg +1 -1
- package/dist/collection/assets/icons/pagination.svg +1 -1
- package/dist/collection/assets/icons/payment.svg +1 -1
- package/dist/collection/assets/icons/pencil.svg +1 -1
- package/dist/collection/assets/icons/person.svg +1 -1
- package/dist/collection/assets/icons/plus.svg +1 -1
- package/dist/collection/assets/icons/question.svg +1 -1
- package/dist/collection/assets/icons/receipt.svg +1 -1
- package/dist/collection/assets/icons/report.svg +1 -1
- package/dist/collection/assets/icons/search.svg +1 -1
- package/dist/collection/assets/icons/settings.svg +1 -1
- package/dist/collection/assets/icons/sick.svg +1 -1
- package/dist/collection/assets/icons/tachometer.svg +1 -1
- package/dist/collection/assets/icons/tool.svg +1 -1
- package/dist/collection/assets/icons/trash.svg +1 -1
- package/dist/collection/assets/icons/turn.svg +1 -1
- package/dist/collection/assets/icons/upload.svg +1 -1
- package/dist/collection/assets/icons/warning.svg +1 -1
- package/dist/collection/collection-manifest.json +5 -4
- package/dist/collection/components/{button → atoms/button}/button.component.css +0 -0
- package/dist/collection/components/{button → atoms/button}/button.component.js +0 -0
- package/dist/collection/components/{icon → atoms/icon}/icon.component.js +8 -4
- package/dist/collection/components/{illustration → atoms/illustration}/illustration.component.js +2 -2
- package/dist/collection/components/atoms/loader/loader.component.css +26 -0
- package/dist/collection/components/atoms/loader/loader.component.js +153 -0
- package/dist/collection/components/{tooltip → atoms/tooltip}/tooltip.component.css +0 -0
- package/dist/collection/components/{tooltip → atoms/tooltip}/tooltip.component.js +1 -1
- package/dist/collection/tailwind/rotate.js +8 -0
- package/dist/collection/tailwind/scale.js +3 -0
- package/dist/collection/tailwind.config.js +5 -6
- package/dist/components/index.d.ts +2 -1
- package/dist/components/index.js +1 -0
- package/dist/components/p-button.js +1 -1
- package/dist/components/p-icon.js +41 -41
- package/dist/components/p-illustration.js +3 -3
- package/dist/components/p-loader.d.ts +11 -0
- package/dist/components/p-loader.js +77 -0
- package/dist/components/p-tooltip.js +2 -2
- package/dist/esm/{index-e4d80e41.js → index-111a6307.js} +3 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/p-button.entry.js +2 -2
- package/dist/esm/p-icon.entry.js +42 -42
- package/dist/esm/p-illustration.entry.js +3 -3
- package/dist/esm/p-loader.entry.js +53 -0
- package/dist/esm/p-tooltip.entry.js +3 -3
- package/dist/esm/paperless.js +2 -2
- package/dist/index.html +1 -1
- package/dist/paperless/p-1d13a9d2.entry.js +1 -0
- package/dist/paperless/p-208c1f28.entry.js +1 -0
- package/dist/paperless/p-98d07776.js +2 -0
- package/dist/paperless/p-bbd1d3df.entry.js +1 -0
- package/dist/paperless/p-cd525dcc.entry.js +1 -0
- package/dist/{build/p-98d636b6.entry.js → paperless/p-feec8ec1.entry.js} +1 -1
- package/dist/paperless/paperless.css +3773 -227
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +74 -40
- package/dist/tailwind.config.js +5 -6
- package/dist/types/components/{button → atoms/button}/button.component.d.ts +0 -0
- package/dist/types/components/{icon → atoms/icon}/icon.component.d.ts +3 -2
- package/dist/types/components/{illustration → atoms/illustration}/illustration.component.d.ts +2 -2
- package/dist/types/components/atoms/loader/loader.component.d.ts +30 -0
- package/dist/types/components/{tooltip → atoms/tooltip}/tooltip.component.d.ts +0 -0
- package/dist/types/components.d.ts +58 -4
- package/package.json +3 -2
- package/dist/build/p-3318b73b.entry.js +0 -1
- package/dist/build/p-6f9229a6.js +0 -2
- package/dist/build/p-711630fb.entry.js +0 -1
- package/dist/build/p-c3d80205.entry.js +0 -1
- package/dist/paperless/p-3318b73b.entry.js +0 -1
- package/dist/paperless/p-6f9229a6.js +0 -2
- package/dist/paperless/p-711630fb.entry.js +0 -1
- package/dist/paperless/p-c3d80205.entry.js +0 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { Component, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
export class Loader {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Wether to show or hide the loader
|
|
6
|
+
*/
|
|
7
|
+
this.show = true;
|
|
8
|
+
/**
|
|
9
|
+
* Variant of loader
|
|
10
|
+
*/
|
|
11
|
+
this.variant = 'inline';
|
|
12
|
+
/**
|
|
13
|
+
* Color of the loader
|
|
14
|
+
*/
|
|
15
|
+
this.color = 'indigo';
|
|
16
|
+
this._show = this.show;
|
|
17
|
+
this._loader = (h("div", { class: `loader color-${this.color}` }));
|
|
18
|
+
}
|
|
19
|
+
componentWillRender() {
|
|
20
|
+
this._checkShow();
|
|
21
|
+
}
|
|
22
|
+
componentShouldUpdate() {
|
|
23
|
+
this._checkShow();
|
|
24
|
+
}
|
|
25
|
+
render() {
|
|
26
|
+
if (!this._show) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (this.variant === 'full-screen') {
|
|
30
|
+
return (h(Host, { class: "p-loader" },
|
|
31
|
+
h("div", { class: "loading-screen" },
|
|
32
|
+
h("div", { class: "content" },
|
|
33
|
+
h("slot", null),
|
|
34
|
+
h("div", { class: "loader-wrapper" }, this._loader)))));
|
|
35
|
+
}
|
|
36
|
+
return h(Host, { class: `p-loader ${this.variant === 'full-width' && 'w-100 d-block flex justify-center text-4xl'}` }, this._loader);
|
|
37
|
+
}
|
|
38
|
+
_checkShow() {
|
|
39
|
+
var _a;
|
|
40
|
+
if (this._showSubscriber) {
|
|
41
|
+
this._showSubscriber.unsubscribe();
|
|
42
|
+
this._showSubscriber = null;
|
|
43
|
+
}
|
|
44
|
+
if (typeof this.show !== 'boolean') {
|
|
45
|
+
this._showSubscriber = (_a = this.show) === null || _a === void 0 ? void 0 : _a.subscribe(show => (this._show = show));
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
this._show = this.show;
|
|
49
|
+
}
|
|
50
|
+
static get is() { return "p-loader"; }
|
|
51
|
+
static get encapsulation() { return "shadow"; }
|
|
52
|
+
static get originalStyleUrls() { return {
|
|
53
|
+
"$": ["loader.component.scss"]
|
|
54
|
+
}; }
|
|
55
|
+
static get styleUrls() { return {
|
|
56
|
+
"$": ["loader.component.css"]
|
|
57
|
+
}; }
|
|
58
|
+
static get properties() { return {
|
|
59
|
+
"show": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "boolean | Observable<boolean>",
|
|
64
|
+
"resolved": "Observable<boolean> | boolean",
|
|
65
|
+
"references": {
|
|
66
|
+
"Observable": {
|
|
67
|
+
"location": "import",
|
|
68
|
+
"path": "rxjs"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"required": false,
|
|
73
|
+
"optional": false,
|
|
74
|
+
"docs": {
|
|
75
|
+
"tags": [],
|
|
76
|
+
"text": "Wether to show or hide the loader"
|
|
77
|
+
},
|
|
78
|
+
"attribute": "show",
|
|
79
|
+
"reflect": false,
|
|
80
|
+
"defaultValue": "true"
|
|
81
|
+
},
|
|
82
|
+
"variant": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "'inline' | 'full-width' | 'full-screen' | 'modal'",
|
|
87
|
+
"resolved": "\"full-screen\" | \"full-width\" | \"inline\" | \"modal\"",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": "Variant of loader"
|
|
95
|
+
},
|
|
96
|
+
"attribute": "variant",
|
|
97
|
+
"reflect": false,
|
|
98
|
+
"defaultValue": "'inline'"
|
|
99
|
+
},
|
|
100
|
+
"color": {
|
|
101
|
+
"type": "string",
|
|
102
|
+
"mutable": false,
|
|
103
|
+
"complexType": {
|
|
104
|
+
"original": "'indigo' | 'white' | 'storm'",
|
|
105
|
+
"resolved": "\"indigo\" | \"storm\" | \"white\"",
|
|
106
|
+
"references": {}
|
|
107
|
+
},
|
|
108
|
+
"required": false,
|
|
109
|
+
"optional": false,
|
|
110
|
+
"docs": {
|
|
111
|
+
"tags": [],
|
|
112
|
+
"text": "Color of the loader"
|
|
113
|
+
},
|
|
114
|
+
"attribute": "color",
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"defaultValue": "'indigo'"
|
|
117
|
+
},
|
|
118
|
+
"modalTitle": {
|
|
119
|
+
"type": "string",
|
|
120
|
+
"mutable": false,
|
|
121
|
+
"complexType": {
|
|
122
|
+
"original": "string",
|
|
123
|
+
"resolved": "string",
|
|
124
|
+
"references": {}
|
|
125
|
+
},
|
|
126
|
+
"required": false,
|
|
127
|
+
"optional": false,
|
|
128
|
+
"docs": {
|
|
129
|
+
"tags": [],
|
|
130
|
+
"text": "!NOT IMPLEMENTED! Modal title for modal variant"
|
|
131
|
+
},
|
|
132
|
+
"attribute": "modal-title",
|
|
133
|
+
"reflect": false
|
|
134
|
+
},
|
|
135
|
+
"modalDescription": {
|
|
136
|
+
"type": "string",
|
|
137
|
+
"mutable": false,
|
|
138
|
+
"complexType": {
|
|
139
|
+
"original": "string",
|
|
140
|
+
"resolved": "string",
|
|
141
|
+
"references": {}
|
|
142
|
+
},
|
|
143
|
+
"required": false,
|
|
144
|
+
"optional": false,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": "!NOT IMPLEMENTED! Modal description for modal variant"
|
|
148
|
+
},
|
|
149
|
+
"attribute": "modal-description",
|
|
150
|
+
"reflect": false
|
|
151
|
+
}
|
|
152
|
+
}; }
|
|
153
|
+
}
|
|
File without changes
|
|
@@ -2,21 +2,20 @@ const colors = require('./tailwind/colors');
|
|
|
2
2
|
const shadows = require('./tailwind/shadows');
|
|
3
3
|
const borderRadius = require('./tailwind/border-radius');
|
|
4
4
|
const grid = require('./tailwind/grid');
|
|
5
|
+
const scale = require('./tailwind/scale');
|
|
6
|
+
const rotate = require('./tailwind/rotate');
|
|
5
7
|
|
|
6
8
|
module.exports = {
|
|
7
9
|
important: true,
|
|
8
|
-
safelist: [
|
|
9
|
-
{
|
|
10
|
-
pattern: /./,
|
|
11
|
-
},
|
|
12
|
-
],
|
|
13
10
|
theme: {
|
|
14
11
|
colors,
|
|
15
12
|
boxShadow: shadows,
|
|
16
13
|
dropShadow: shadows,
|
|
17
14
|
borderRadius,
|
|
18
|
-
|
|
15
|
+
extend: {
|
|
19
16
|
grid,
|
|
17
|
+
scale,
|
|
18
|
+
rotate,
|
|
20
19
|
},
|
|
21
20
|
},
|
|
22
21
|
variants: {},
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/* paperless custom elements */
|
|
2
2
|
export { Button as PButton } from '../types/components/p-button/p-button';
|
|
3
3
|
export { Icon as PIcon } from '../types/components/p-icon/p-icon';
|
|
4
|
-
export {
|
|
4
|
+
export { Illustration as PIllustration } from '../types/components/p-illustration/p-illustration';
|
|
5
|
+
export { Loader as PLoader } from '../types/components/p-loader/p-loader';
|
|
5
6
|
export { Tooltip as PTooltip } from '../types/components/p-tooltip/p-tooltip';
|
|
6
7
|
|
|
7
8
|
/**
|
package/dist/components/index.js
CHANGED
|
@@ -2,4 +2,5 @@ export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client'
|
|
|
2
2
|
export { PButton, defineCustomElement as defineCustomElementPButton } from './p-button.js';
|
|
3
3
|
export { PIcon, defineCustomElement as defineCustomElementPIcon } from './p-icon.js';
|
|
4
4
|
export { PIllustration, defineCustomElement as defineCustomElementPIllustration } from './p-illustration.js';
|
|
5
|
+
export { PLoader, defineCustomElement as defineCustomElementPLoader } from './p-loader.js';
|
|
5
6
|
export { PTooltip, defineCustomElement as defineCustomElementPTooltip } from './p-tooltip.js';
|