@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.
Files changed (151) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/assets/icons/arrow.svg +1 -1
  3. package/dist/assets/icons/attachment.svg +1 -1
  4. package/dist/assets/icons/bread.svg +1 -1
  5. package/dist/assets/icons/calendar.svg +1 -1
  6. package/dist/assets/icons/car.svg +1 -1
  7. package/dist/assets/icons/checkmark.svg +1 -1
  8. package/dist/assets/icons/chevron.svg +1 -1
  9. package/dist/assets/icons/clock.svg +1 -1
  10. package/dist/assets/icons/cogs.svg +1 -1
  11. package/dist/assets/icons/comment.svg +1 -1
  12. package/dist/assets/icons/document.svg +1 -1
  13. package/dist/assets/icons/download.svg +1 -1
  14. package/dist/assets/icons/envelope.svg +1 -1
  15. package/dist/assets/icons/explanation.svg +1 -1
  16. package/dist/assets/icons/eye.svg +1 -1
  17. package/dist/assets/icons/filter.svg +1 -1
  18. package/dist/assets/icons/grid.svg +1 -1
  19. package/dist/assets/icons/headset.svg +1 -1
  20. package/dist/assets/icons/list.svg +1 -1
  21. package/dist/assets/icons/location.svg +1 -1
  22. package/dist/assets/icons/megaphone.svg +1 -1
  23. package/dist/assets/icons/minus.svg +1 -1
  24. package/dist/assets/icons/negative.svg +1 -1
  25. package/dist/assets/icons/pagination.svg +1 -1
  26. package/dist/assets/icons/payment.svg +1 -1
  27. package/dist/assets/icons/pencil.svg +1 -1
  28. package/dist/assets/icons/person.svg +1 -1
  29. package/dist/assets/icons/plus.svg +1 -1
  30. package/dist/assets/icons/question.svg +1 -1
  31. package/dist/assets/icons/receipt.svg +1 -1
  32. package/dist/assets/icons/report.svg +1 -1
  33. package/dist/assets/icons/search.svg +1 -1
  34. package/dist/assets/icons/settings.svg +1 -1
  35. package/dist/assets/icons/sick.svg +1 -1
  36. package/dist/assets/icons/tachometer.svg +1 -1
  37. package/dist/assets/icons/tool.svg +1 -1
  38. package/dist/assets/icons/trash.svg +1 -1
  39. package/dist/assets/icons/turn.svg +1 -1
  40. package/dist/assets/icons/upload.svg +1 -1
  41. package/dist/assets/icons/warning.svg +1 -1
  42. package/dist/build/p-1d13a9d2.entry.js +1 -0
  43. package/dist/build/p-208c1f28.entry.js +1 -0
  44. package/dist/build/p-98d07776.js +2 -0
  45. package/dist/build/p-bbd1d3df.entry.js +1 -0
  46. package/dist/build/p-cd525dcc.entry.js +1 -0
  47. package/dist/{paperless/p-98d636b6.entry.js → build/p-feec8ec1.entry.js} +1 -1
  48. package/dist/build/paperless.css +4 -3
  49. package/dist/build/paperless.esm.js +1 -1
  50. package/dist/cjs/{index-6758a39e.js → index-5b30cb95.js} +3 -0
  51. package/dist/cjs/loader.cjs.js +2 -2
  52. package/dist/cjs/p-button.cjs.entry.js +2 -2
  53. package/dist/cjs/p-icon.cjs.entry.js +42 -42
  54. package/dist/cjs/p-illustration.cjs.entry.js +3 -3
  55. package/dist/cjs/p-loader.cjs.entry.js +57 -0
  56. package/dist/cjs/p-tooltip.cjs.entry.js +3 -3
  57. package/dist/cjs/paperless.cjs.js +2 -2
  58. package/dist/collection/assets/icons/arrow.svg +1 -1
  59. package/dist/collection/assets/icons/attachment.svg +1 -1
  60. package/dist/collection/assets/icons/bread.svg +1 -1
  61. package/dist/collection/assets/icons/calendar.svg +1 -1
  62. package/dist/collection/assets/icons/car.svg +1 -1
  63. package/dist/collection/assets/icons/checkmark.svg +1 -1
  64. package/dist/collection/assets/icons/chevron.svg +1 -1
  65. package/dist/collection/assets/icons/clock.svg +1 -1
  66. package/dist/collection/assets/icons/cogs.svg +1 -1
  67. package/dist/collection/assets/icons/comment.svg +1 -1
  68. package/dist/collection/assets/icons/document.svg +1 -1
  69. package/dist/collection/assets/icons/download.svg +1 -1
  70. package/dist/collection/assets/icons/envelope.svg +1 -1
  71. package/dist/collection/assets/icons/explanation.svg +1 -1
  72. package/dist/collection/assets/icons/eye.svg +1 -1
  73. package/dist/collection/assets/icons/filter.svg +1 -1
  74. package/dist/collection/assets/icons/grid.svg +1 -1
  75. package/dist/collection/assets/icons/headset.svg +1 -1
  76. package/dist/collection/assets/icons/list.svg +1 -1
  77. package/dist/collection/assets/icons/location.svg +1 -1
  78. package/dist/collection/assets/icons/megaphone.svg +1 -1
  79. package/dist/collection/assets/icons/minus.svg +1 -1
  80. package/dist/collection/assets/icons/negative.svg +1 -1
  81. package/dist/collection/assets/icons/pagination.svg +1 -1
  82. package/dist/collection/assets/icons/payment.svg +1 -1
  83. package/dist/collection/assets/icons/pencil.svg +1 -1
  84. package/dist/collection/assets/icons/person.svg +1 -1
  85. package/dist/collection/assets/icons/plus.svg +1 -1
  86. package/dist/collection/assets/icons/question.svg +1 -1
  87. package/dist/collection/assets/icons/receipt.svg +1 -1
  88. package/dist/collection/assets/icons/report.svg +1 -1
  89. package/dist/collection/assets/icons/search.svg +1 -1
  90. package/dist/collection/assets/icons/settings.svg +1 -1
  91. package/dist/collection/assets/icons/sick.svg +1 -1
  92. package/dist/collection/assets/icons/tachometer.svg +1 -1
  93. package/dist/collection/assets/icons/tool.svg +1 -1
  94. package/dist/collection/assets/icons/trash.svg +1 -1
  95. package/dist/collection/assets/icons/turn.svg +1 -1
  96. package/dist/collection/assets/icons/upload.svg +1 -1
  97. package/dist/collection/assets/icons/warning.svg +1 -1
  98. package/dist/collection/collection-manifest.json +5 -4
  99. package/dist/collection/components/{button → atoms/button}/button.component.css +0 -0
  100. package/dist/collection/components/{button → atoms/button}/button.component.js +0 -0
  101. package/dist/collection/components/{icon → atoms/icon}/icon.component.js +8 -4
  102. package/dist/collection/components/{illustration → atoms/illustration}/illustration.component.js +2 -2
  103. package/dist/collection/components/atoms/loader/loader.component.css +26 -0
  104. package/dist/collection/components/atoms/loader/loader.component.js +153 -0
  105. package/dist/collection/components/{tooltip → atoms/tooltip}/tooltip.component.css +0 -0
  106. package/dist/collection/components/{tooltip → atoms/tooltip}/tooltip.component.js +1 -1
  107. package/dist/collection/tailwind/rotate.js +8 -0
  108. package/dist/collection/tailwind/scale.js +3 -0
  109. package/dist/collection/tailwind.config.js +5 -6
  110. package/dist/components/index.d.ts +2 -1
  111. package/dist/components/index.js +1 -0
  112. package/dist/components/p-button.js +1 -1
  113. package/dist/components/p-icon.js +41 -41
  114. package/dist/components/p-illustration.js +3 -3
  115. package/dist/components/p-loader.d.ts +11 -0
  116. package/dist/components/p-loader.js +77 -0
  117. package/dist/components/p-tooltip.js +2 -2
  118. package/dist/esm/{index-e4d80e41.js → index-111a6307.js} +3 -0
  119. package/dist/esm/loader.js +2 -2
  120. package/dist/esm/p-button.entry.js +2 -2
  121. package/dist/esm/p-icon.entry.js +42 -42
  122. package/dist/esm/p-illustration.entry.js +3 -3
  123. package/dist/esm/p-loader.entry.js +53 -0
  124. package/dist/esm/p-tooltip.entry.js +3 -3
  125. package/dist/esm/paperless.js +2 -2
  126. package/dist/index.html +1 -1
  127. package/dist/paperless/p-1d13a9d2.entry.js +1 -0
  128. package/dist/paperless/p-208c1f28.entry.js +1 -0
  129. package/dist/paperless/p-98d07776.js +2 -0
  130. package/dist/paperless/p-bbd1d3df.entry.js +1 -0
  131. package/dist/paperless/p-cd525dcc.entry.js +1 -0
  132. package/dist/{build/p-98d636b6.entry.js → paperless/p-feec8ec1.entry.js} +1 -1
  133. package/dist/paperless/paperless.css +3773 -227
  134. package/dist/paperless/paperless.esm.js +1 -1
  135. package/dist/sw.js +74 -40
  136. package/dist/tailwind.config.js +5 -6
  137. package/dist/types/components/{button → atoms/button}/button.component.d.ts +0 -0
  138. package/dist/types/components/{icon → atoms/icon}/icon.component.d.ts +3 -2
  139. package/dist/types/components/{illustration → atoms/illustration}/illustration.component.d.ts +2 -2
  140. package/dist/types/components/atoms/loader/loader.component.d.ts +30 -0
  141. package/dist/types/components/{tooltip → atoms/tooltip}/tooltip.component.d.ts +0 -0
  142. package/dist/types/components.d.ts +58 -4
  143. package/package.json +3 -2
  144. package/dist/build/p-3318b73b.entry.js +0 -1
  145. package/dist/build/p-6f9229a6.js +0 -2
  146. package/dist/build/p-711630fb.entry.js +0 -1
  147. package/dist/build/p-c3d80205.entry.js +0 -1
  148. package/dist/paperless/p-3318b73b.entry.js +0 -1
  149. package/dist/paperless/p-6f9229a6.js +0 -2
  150. package/dist/paperless/p-711630fb.entry.js +0 -1
  151. 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
+ }
@@ -23,7 +23,7 @@ export class Tooltip {
23
23
  }
24
24
  }
25
25
  render() {
26
- return (h(Host, null,
26
+ return (h(Host, { class: "p-tooltip" },
27
27
  h("slot", null),
28
28
  h("div", { class: "tooltip", role: "tooltip", ref: el => this._load(el) },
29
29
  this.content,
@@ -0,0 +1,8 @@
1
+ const rotateNumbers = {};
2
+
3
+ for (let i = 1; i < 360; i++) {
4
+ rotateNumbers[`${i}`] = `${i}deg`;
5
+ rotateNumbers[`-${i}`] = `-${i}deg`;
6
+ }
7
+
8
+ module.exports = rotateNumbers;
@@ -0,0 +1,3 @@
1
+ module.exports = {
2
+ flip: '-1',
3
+ };
@@ -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
- extends: {
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 { Icon as PIllustration } from '../types/components/p-illustration/p-illustration';
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
  /**
@@ -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';