@paperless/core 0.1.0-alpha.0 → 0.1.0-alpha.4

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 (150) hide show
  1. package/CHANGELOG.md +38 -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-31acefc4.entry.js +1 -0
  43. package/dist/build/p-4144f8a0.entry.js +1 -0
  44. package/dist/{paperless/p-98d636b6.entry.js → build/p-f04c4de0.entry.js} +1 -1
  45. package/dist/build/p-f33e1285.js +2 -0
  46. package/dist/build/paperless.css +4 -3
  47. package/dist/build/paperless.esm.js +1 -1
  48. package/dist/cjs/{index-6758a39e.js → index-a2da05ae.js} +409 -7
  49. package/dist/cjs/loader.cjs.js +2 -2
  50. package/dist/cjs/{p-icon.cjs.entry.js → p-button_3.cjs.entry.js} +149 -42
  51. package/dist/cjs/p-illustration.cjs.entry.js +3 -3
  52. package/dist/cjs/p-tooltip.cjs.entry.js +3 -3
  53. package/dist/cjs/paperless.cjs.js +2 -2
  54. package/dist/collection/assets/icons/arrow.svg +1 -1
  55. package/dist/collection/assets/icons/attachment.svg +1 -1
  56. package/dist/collection/assets/icons/bread.svg +1 -1
  57. package/dist/collection/assets/icons/calendar.svg +1 -1
  58. package/dist/collection/assets/icons/car.svg +1 -1
  59. package/dist/collection/assets/icons/checkmark.svg +1 -1
  60. package/dist/collection/assets/icons/chevron.svg +1 -1
  61. package/dist/collection/assets/icons/clock.svg +1 -1
  62. package/dist/collection/assets/icons/cogs.svg +1 -1
  63. package/dist/collection/assets/icons/comment.svg +1 -1
  64. package/dist/collection/assets/icons/document.svg +1 -1
  65. package/dist/collection/assets/icons/download.svg +1 -1
  66. package/dist/collection/assets/icons/envelope.svg +1 -1
  67. package/dist/collection/assets/icons/explanation.svg +1 -1
  68. package/dist/collection/assets/icons/eye.svg +1 -1
  69. package/dist/collection/assets/icons/filter.svg +1 -1
  70. package/dist/collection/assets/icons/grid.svg +1 -1
  71. package/dist/collection/assets/icons/headset.svg +1 -1
  72. package/dist/collection/assets/icons/list.svg +1 -1
  73. package/dist/collection/assets/icons/location.svg +1 -1
  74. package/dist/collection/assets/icons/megaphone.svg +1 -1
  75. package/dist/collection/assets/icons/minus.svg +1 -1
  76. package/dist/collection/assets/icons/negative.svg +1 -1
  77. package/dist/collection/assets/icons/pagination.svg +1 -1
  78. package/dist/collection/assets/icons/payment.svg +1 -1
  79. package/dist/collection/assets/icons/pencil.svg +1 -1
  80. package/dist/collection/assets/icons/person.svg +1 -1
  81. package/dist/collection/assets/icons/plus.svg +1 -1
  82. package/dist/collection/assets/icons/question.svg +1 -1
  83. package/dist/collection/assets/icons/receipt.svg +1 -1
  84. package/dist/collection/assets/icons/report.svg +1 -1
  85. package/dist/collection/assets/icons/search.svg +1 -1
  86. package/dist/collection/assets/icons/settings.svg +1 -1
  87. package/dist/collection/assets/icons/sick.svg +1 -1
  88. package/dist/collection/assets/icons/tachometer.svg +1 -1
  89. package/dist/collection/assets/icons/tool.svg +1 -1
  90. package/dist/collection/assets/icons/trash.svg +1 -1
  91. package/dist/collection/assets/icons/turn.svg +1 -1
  92. package/dist/collection/assets/icons/upload.svg +1 -1
  93. package/dist/collection/assets/icons/warning.svg +1 -1
  94. package/dist/collection/collection-manifest.json +5 -4
  95. package/dist/collection/components/atoms/button/button.component.css +71 -0
  96. package/dist/collection/components/atoms/button/button.component.js +276 -0
  97. package/dist/collection/components/{icon → atoms/icon}/icon.component.js +8 -4
  98. package/dist/collection/components/{illustration → atoms/illustration}/illustration.component.js +2 -2
  99. package/dist/collection/components/atoms/loader/loader.component.css +26 -0
  100. package/dist/collection/components/atoms/loader/loader.component.js +153 -0
  101. package/dist/collection/components/{tooltip → atoms/tooltip}/tooltip.component.css +0 -0
  102. package/dist/collection/components/{tooltip → atoms/tooltip}/tooltip.component.js +1 -1
  103. package/dist/collection/tailwind/rotate.js +8 -0
  104. package/dist/collection/tailwind/scale.js +3 -0
  105. package/dist/collection/tailwind.config.js +5 -6
  106. package/dist/{esm/p-icon.entry.js → components/icon.component.js} +67 -48
  107. package/dist/components/index.d.ts +2 -1
  108. package/dist/components/index.js +1 -0
  109. package/dist/components/loader.component.js +74 -0
  110. package/dist/components/p-button.js +67 -8
  111. package/dist/components/p-icon.js +1 -815
  112. package/dist/components/p-illustration.js +3 -3
  113. package/dist/components/p-loader.d.ts +11 -0
  114. package/dist/components/p-loader.js +6 -0
  115. package/dist/components/p-tooltip.js +2 -2
  116. package/dist/esm/{index-e4d80e41.js → index-d08bfe75.js} +409 -8
  117. package/dist/esm/loader.js +2 -2
  118. package/dist/esm/p-button_3.entry.js +903 -0
  119. package/dist/esm/p-illustration.entry.js +3 -3
  120. package/dist/esm/p-tooltip.entry.js +3 -3
  121. package/dist/esm/paperless.js +2 -2
  122. package/dist/index.html +1 -1
  123. package/dist/paperless/p-31acefc4.entry.js +1 -0
  124. package/dist/paperless/p-4144f8a0.entry.js +1 -0
  125. package/dist/{build/p-98d636b6.entry.js → paperless/p-f04c4de0.entry.js} +1 -1
  126. package/dist/paperless/p-f33e1285.js +2 -0
  127. package/dist/paperless/paperless.css +3773 -227
  128. package/dist/paperless/paperless.esm.js +1 -1
  129. package/dist/sw.js +66 -54
  130. package/dist/tailwind.config.js +5 -6
  131. package/dist/types/components/atoms/button/button.component.d.ts +51 -0
  132. package/dist/types/components/{icon → atoms/icon}/icon.component.d.ts +3 -2
  133. package/dist/types/components/{illustration → atoms/illustration}/illustration.component.d.ts +2 -2
  134. package/dist/types/components/atoms/loader/loader.component.d.ts +30 -0
  135. package/dist/types/components/{tooltip → atoms/tooltip}/tooltip.component.d.ts +0 -0
  136. package/dist/types/components.d.ts +141 -6
  137. package/package.json +3 -2
  138. package/dist/build/p-3318b73b.entry.js +0 -1
  139. package/dist/build/p-6f9229a6.js +0 -2
  140. package/dist/build/p-711630fb.entry.js +0 -1
  141. package/dist/build/p-c3d80205.entry.js +0 -1
  142. package/dist/cjs/p-button.cjs.entry.js +0 -23
  143. package/dist/collection/components/button/button.component.css +0 -6
  144. package/dist/collection/components/button/button.component.js +0 -42
  145. package/dist/esm/p-button.entry.js +0 -19
  146. package/dist/paperless/p-3318b73b.entry.js +0 -1
  147. package/dist/paperless/p-6f9229a6.js +0 -2
  148. package/dist/paperless/p-711630fb.entry.js +0 -1
  149. package/dist/paperless/p-c3d80205.entry.js +0 -1
  150. package/dist/types/components/button/button.component.d.ts +0 -7
@@ -1 +1 @@
1
- import{p as o,b as t}from"./p-6f9229a6.js";(()=>{const t=import.meta.url,e={};return""!==t&&(e.resourcesUrl=new URL(".",t).href),o(e)})().then((o=>t([["p-711630fb",[[1,"p-button",{variant:[1]}]]],["p-3318b73b",[[0,"p-icon",{variant:[1],size:[1],rotate:[2],flip:[1]}]]],["p-98d636b6",[[0,"p-illustration",{variant:[1]}]]],["p-c3d80205",[[1,"p-tooltip",{content:[8],placement:[1],forceShow:[4,"force-show"]},[[1,"mouseenter","_show"],[0,"focus","_show"],[1,"mouseleave","_hide"],[0,"blur","_hide"]]]]]],o)));
1
+ import{p as o,b as i}from"./p-f33e1285.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),o(t)})().then((o=>i([["p-f04c4de0",[[0,"p-illustration",{variant:[1]}]]],["p-4144f8a0",[[1,"p-tooltip",{content:[8],placement:[1],forceShow:[4,"force-show"]},[[1,"mouseenter","_show"],[0,"focus","_show"],[1,"mouseleave","_hide"],[0,"blur","_hide"]]]]],["p-31acefc4",[[4,"p-button",{variant:[1],href:[1],target:[1],size:[1],loading:[4],disabled:[4],icon:[1],iconPosition:[1,"icon-position"],iconFlip:[1,"icon-flip"],iconRotate:[2,"icon-rotate"]},[[2,"click","handleClick"]]],[0,"p-icon",{variant:[1],size:[1],rotate:[2],flip:[1]}],[1,"p-loader",{show:[4],variant:[1],color:[1],modalTitle:[1,"modal-title"],modalDescription:[1,"modal-description"]}]]]],o)));
package/dist/sw.js CHANGED
@@ -27,30 +27,27 @@ self.addEventListener('message', (event) => {
27
27
  self.__precacheManifest = [
28
28
  {
29
29
  "url": "index.html",
30
- "revision": "5eb75d027add016ecebb943b1a73afb4"
30
+ "revision": "b1a471c41640a8aebc24f88a9c36597c"
31
31
  },
32
32
  {
33
33
  "url": "build/index.esm.js",
34
34
  "revision": "d41d8cd98f00b204e9800998ecf8427e"
35
35
  },
36
36
  {
37
- "url": "build/p-3318b73b.entry.js"
37
+ "url": "build/p-31acefc4.entry.js"
38
38
  },
39
39
  {
40
- "url": "build/p-6f9229a6.js"
40
+ "url": "build/p-4144f8a0.entry.js"
41
41
  },
42
42
  {
43
- "url": "build/p-711630fb.entry.js"
43
+ "url": "build/p-f04c4de0.entry.js"
44
44
  },
45
45
  {
46
- "url": "build/p-98d636b6.entry.js"
46
+ "url": "build/p-f33e1285.js"
47
47
  },
48
48
  {
49
- "url": "build/p-c3d80205.entry.js"
50
- },
51
- {
52
- "url": "cjs/index-6758a39e.js",
53
- "revision": "af6d997d161c98736fa3b74da48a43b3"
49
+ "url": "cjs/index-a2da05ae.js",
50
+ "revision": "86392d41f79c3187879bc79878cfcfc0"
54
51
  },
55
52
  {
56
53
  "url": "cjs/index.cjs.js",
@@ -58,54 +55,57 @@ self.__precacheManifest = [
58
55
  },
59
56
  {
60
57
  "url": "cjs/loader.cjs.js",
61
- "revision": "f1b10d6b89b98f4d89dbf078676900b7"
62
- },
63
- {
64
- "url": "cjs/p-button.cjs.entry.js",
65
- "revision": "a6fc78ccb968bf14301c1c068a594834"
58
+ "revision": "e2619a8d45daf8b58d263594d79b26cb"
66
59
  },
67
60
  {
68
- "url": "cjs/p-icon.cjs.entry.js",
69
- "revision": "30eb72e46de820d7f4b114c76affbd28"
61
+ "url": "cjs/p-button_3.cjs.entry.js"
70
62
  },
71
63
  {
72
64
  "url": "cjs/p-illustration.cjs.entry.js"
73
65
  },
74
66
  {
75
67
  "url": "cjs/p-tooltip.cjs.entry.js",
76
- "revision": "3370e22d2f92b66d4ec204a31b74dea4"
68
+ "revision": "bb26894313d91f23f2c0fc141b22f7aa"
77
69
  },
78
70
  {
79
71
  "url": "cjs/paperless.cjs.js",
80
- "revision": "82a4f2e0dc205eef73f1629f387cc7ff"
72
+ "revision": "b2535eba7fdbdc0ce0bba36960964c49"
81
73
  },
82
74
  {
83
75
  "url": "collection/collection-manifest.json",
84
- "revision": "55e82bf57df0419273ddb8de09c5d478"
76
+ "revision": "69abfd94310e01f720a7c81a6c0f6c3e"
77
+ },
78
+ {
79
+ "url": "collection/components/atoms/button/button.component.css",
80
+ "revision": "170a89ffed517b7ed3b01b77e01510e5"
85
81
  },
86
82
  {
87
- "url": "collection/components/button/button.component.css",
88
- "revision": "466c53f1a00432686bc94302851afa4c"
83
+ "url": "collection/components/atoms/button/button.component.js",
84
+ "revision": "5b46b7fb9cf669ada19aa9aa1b3ec05d"
89
85
  },
90
86
  {
91
- "url": "collection/components/button/button.component.js",
92
- "revision": "bb87cf170753e7cc9083f9f172000469"
87
+ "url": "collection/components/atoms/icon/icon.component.js",
88
+ "revision": "9cc3323a777fb568699d10f3c1008618"
93
89
  },
94
90
  {
95
- "url": "collection/components/icon/icon.component.js",
96
- "revision": "2ff80f54824184a52a6bae6441ad457a"
91
+ "url": "collection/components/atoms/illustration/illustration.component.js",
92
+ "revision": "c7d9878fa926e60baca9005710323683"
97
93
  },
98
94
  {
99
- "url": "collection/components/illustration/illustration.component.js",
100
- "revision": "c6dc3500ec209bc7d4ac9891968e297e"
95
+ "url": "collection/components/atoms/loader/loader.component.css",
96
+ "revision": "aa556581969d7c61d430a0f022bb02a1"
101
97
  },
102
98
  {
103
- "url": "collection/components/tooltip/tooltip.component.css",
99
+ "url": "collection/components/atoms/loader/loader.component.js",
100
+ "revision": "d1f630e8255de08b90c5697347183cb4"
101
+ },
102
+ {
103
+ "url": "collection/components/atoms/tooltip/tooltip.component.css",
104
104
  "revision": "f80a0a5022b3d0dd068cedbba1c2e707"
105
105
  },
106
106
  {
107
- "url": "collection/components/tooltip/tooltip.component.js",
108
- "revision": "e1d5c10217b7bf25360a13ddc4a6ae13"
107
+ "url": "collection/components/atoms/tooltip/tooltip.component.js",
108
+ "revision": "a39fb80cbbd78315e90da33db405551c"
109
109
  },
110
110
  {
111
111
  "url": "collection/index.js",
@@ -113,7 +113,7 @@ self.__precacheManifest = [
113
113
  },
114
114
  {
115
115
  "url": "collection/tailwind.config.js",
116
- "revision": "164cbed49fedb48015b4c21006802f87"
116
+ "revision": "b6809e92405d6e378aa1798a0af3dbee"
117
117
  },
118
118
  {
119
119
  "url": "collection/tailwind/border-radius.js",
@@ -127,6 +127,14 @@ self.__precacheManifest = [
127
127
  "url": "collection/tailwind/grid.js",
128
128
  "revision": "c10b15ec73ad6b89c0f24b667886b357"
129
129
  },
130
+ {
131
+ "url": "collection/tailwind/rotate.js",
132
+ "revision": "6e10d60cb01221e64cf027d729886b6d"
133
+ },
134
+ {
135
+ "url": "collection/tailwind/scale.js",
136
+ "revision": "a839cb541613e836dc315f26e3e9a396"
137
+ },
130
138
  {
131
139
  "url": "collection/tailwind/shadows.js",
132
140
  "revision": "90a3cc6f1c4f6714180ddbb3a0e40a53"
@@ -143,28 +151,40 @@ self.__precacheManifest = [
143
151
  "url": "collection/utils/utils.js",
144
152
  "revision": "4beb8ca8a76230f44db73b6109a0043d"
145
153
  },
154
+ {
155
+ "url": "components/icon.component.js",
156
+ "revision": "873a64ed9ab191318d9b8735bf287e73"
157
+ },
146
158
  {
147
159
  "url": "components/index.js",
148
- "revision": "31ca90a73d65b3aaf82779e687a5d5ba"
160
+ "revision": "575ad0ea8d16b9dffb1d08e3a2f3a69c"
161
+ },
162
+ {
163
+ "url": "components/loader.component.js",
164
+ "revision": "a0af339e6c9ad114c1f01bcb927559b4"
149
165
  },
150
166
  {
151
167
  "url": "components/p-button.js",
152
- "revision": "3cb5e4e7f92265cde7b39c1045403f48"
168
+ "revision": "151517968fbd9bdccdc63b8939506467"
153
169
  },
154
170
  {
155
171
  "url": "components/p-icon.js",
156
- "revision": "56b3dffb5840a6b9fc11370dcdf3bf79"
172
+ "revision": "89ede38633ef7c3b9ed45a67a2ffe2c8"
157
173
  },
158
174
  {
159
175
  "url": "components/p-illustration.js"
160
176
  },
177
+ {
178
+ "url": "components/p-loader.js",
179
+ "revision": "850d0015b16c8a34f62568d99ccdd388"
180
+ },
161
181
  {
162
182
  "url": "components/p-tooltip.js",
163
- "revision": "f572f34b82a39036fb11a6c9f2f2f656"
183
+ "revision": "d1a4deb2abca1de0f64e36a280cc1edf"
164
184
  },
165
185
  {
166
- "url": "esm/index-e4d80e41.js",
167
- "revision": "653c187864c171a614b8c562afdb97e8"
186
+ "url": "esm/index-d08bfe75.js",
187
+ "revision": "7ae0c35a1ae5a2679bc5320131e19d5c"
168
188
  },
169
189
  {
170
190
  "url": "esm/index.js",
@@ -172,22 +192,17 @@ self.__precacheManifest = [
172
192
  },
173
193
  {
174
194
  "url": "esm/loader.js",
175
- "revision": "2949da7fe9f52c2bdb03fa1227f8197b"
176
- },
177
- {
178
- "url": "esm/p-button.entry.js",
179
- "revision": "87304cfa413873e4ddef417a8accba49"
195
+ "revision": "1b0f1d5ae1352bc23c6cc3a691f1f06b"
180
196
  },
181
197
  {
182
- "url": "esm/p-icon.entry.js",
183
- "revision": "3c877f15e9c3956f39404f391a175689"
198
+ "url": "esm/p-button_3.entry.js"
184
199
  },
185
200
  {
186
201
  "url": "esm/p-illustration.entry.js"
187
202
  },
188
203
  {
189
204
  "url": "esm/p-tooltip.entry.js",
190
- "revision": "bc6190169e0a896eeb303f776da10da7"
205
+ "revision": "6d244b355c8662063569772ed5a1b721"
191
206
  },
192
207
  {
193
208
  "url": "esm/polyfills/core-js.js",
@@ -226,23 +241,20 @@ self.__precacheManifest = [
226
241
  "revision": "d41d8cd98f00b204e9800998ecf8427e"
227
242
  },
228
243
  {
229
- "url": "paperless/p-3318b73b.entry.js"
230
- },
231
- {
232
- "url": "paperless/p-6f9229a6.js"
244
+ "url": "paperless/p-31acefc4.entry.js"
233
245
  },
234
246
  {
235
- "url": "paperless/p-711630fb.entry.js"
247
+ "url": "paperless/p-4144f8a0.entry.js"
236
248
  },
237
249
  {
238
- "url": "paperless/p-98d636b6.entry.js"
250
+ "url": "paperless/p-f04c4de0.entry.js"
239
251
  },
240
252
  {
241
- "url": "paperless/p-c3d80205.entry.js"
253
+ "url": "paperless/p-f33e1285.js"
242
254
  },
243
255
  {
244
256
  "url": "tailwind.config.js",
245
- "revision": "164cbed49fedb48015b4c21006802f87"
257
+ "revision": "b6809e92405d6e378aa1798a0af3dbee"
246
258
  }
247
259
  ].concat(self.__precacheManifest || []);
248
260
  workbox.precaching.precacheAndRoute(self.__precacheManifest, {});
@@ -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: {},
@@ -0,0 +1,51 @@
1
+ import { EventEmitter } from '../../../stencil-public-runtime';
2
+ import { IconFlipOptions, IconVariant } from '../icon/icon.component';
3
+ export declare class Button {
4
+ /**
5
+ * The variant of the button
6
+ */
7
+ variant: 'primary' | 'secondary' | 'text';
8
+ /**
9
+ * Href in case of "text" version
10
+ */
11
+ href: string;
12
+ /**
13
+ * Target in case of "text" version
14
+ */
15
+ target: string;
16
+ /**
17
+ * The size of the button
18
+ */
19
+ size: 'small' | 'medium';
20
+ /**
21
+ * Wether to show a loader or not
22
+ */
23
+ loading: boolean;
24
+ /**
25
+ * Wether the button is disabled
26
+ */
27
+ disabled: boolean;
28
+ /**
29
+ * Icon to show on the button
30
+ */
31
+ icon: IconVariant;
32
+ /**
33
+ * Icon position
34
+ */
35
+ iconPosition: 'start' | 'end';
36
+ /**
37
+ * Icon flip
38
+ */
39
+ iconFlip: IconFlipOptions;
40
+ /**
41
+ * Icon rotate
42
+ */
43
+ iconRotate: number;
44
+ /**
45
+ * Button press event
46
+ */
47
+ click: EventEmitter<MouseEvent>;
48
+ render(): any;
49
+ handleClick(ev: MouseEvent): void;
50
+ private _getIcon;
51
+ }
@@ -1,5 +1,6 @@
1
- import icons from '../../utils/icons';
1
+ import icons from '../../../utils/icons';
2
2
  export declare type IconVariant = keyof typeof icons;
3
+ export declare type IconFlipOptions = 'horizontal' | 'vertical';
3
4
  export declare class Icon {
4
5
  /**
5
6
  * The icon the be displayed
@@ -16,7 +17,7 @@ export declare class Icon {
16
17
  /**
17
18
  * Wether to flip the icon horizontally or vertically
18
19
  */
19
- flip: 'horizontal' | 'vertical';
20
+ flip: IconFlipOptions;
20
21
  render(): any;
21
22
  private _getClass;
22
23
  }
@@ -1,6 +1,6 @@
1
- import illustrations from '../../utils/illustrations';
1
+ import illustrations from '../../../utils/illustrations';
2
2
  export declare type IllustrationVariant = keyof typeof illustrations;
3
- export declare class Icon {
3
+ export declare class Illustration {
4
4
  /**
5
5
  * The icon the be displayed
6
6
  */
@@ -0,0 +1,30 @@
1
+ import { Observable } from 'rxjs';
2
+ export declare class Loader {
3
+ /**
4
+ * Wether to show or hide the loader
5
+ */
6
+ show: boolean | Observable<boolean>;
7
+ /**
8
+ * Variant of loader
9
+ */
10
+ variant: 'inline' | 'full-width' | 'full-screen' | 'modal';
11
+ /**
12
+ * Color of the loader
13
+ */
14
+ color: 'indigo' | 'white' | 'storm';
15
+ /**
16
+ * !NOT IMPLEMENTED! Modal title for modal variant
17
+ */
18
+ modalTitle: string;
19
+ /**
20
+ * !NOT IMPLEMENTED! Modal description for modal variant
21
+ */
22
+ modalDescription: string;
23
+ private _show;
24
+ private _showSubscriber;
25
+ private _loader;
26
+ componentWillRender(): void;
27
+ componentShouldUpdate(): void;
28
+ render(): any;
29
+ private _checkShow;
30
+ }
@@ -5,21 +5,59 @@
5
5
  * It contains typing information for all components that exist in this project.
6
6
  */
7
7
  import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
8
- import { IconVariant } from "./components/icon/icon.component";
9
- import { IllustrationVariant } from "./components/illustration/illustration.component";
8
+ import { IconFlipOptions, IconVariant } from "./components/atoms/icon/icon.component";
9
+ import { IconFlipOptions as IconFlipOptions1, IconVariant as IconVariant1 } from "./components/atoms/icon/icon.component";
10
+ import { IllustrationVariant } from "./components/atoms/illustration/illustration.component";
11
+ import { Observable } from "rxjs";
10
12
  import { Placement } from "@popperjs/core";
11
13
  export namespace Components {
12
14
  interface PButton {
15
+ /**
16
+ * Wether the button is disabled
17
+ */
18
+ "disabled": boolean;
19
+ /**
20
+ * Href in case of "text" version
21
+ */
22
+ "href": string;
23
+ /**
24
+ * Icon to show on the button
25
+ */
26
+ "icon": IconVariant;
27
+ /**
28
+ * Icon flip
29
+ */
30
+ "iconFlip": IconFlipOptions;
31
+ /**
32
+ * Icon position
33
+ */
34
+ "iconPosition": 'start' | 'end';
35
+ /**
36
+ * Icon rotate
37
+ */
38
+ "iconRotate": number;
39
+ /**
40
+ * Wether to show a loader or not
41
+ */
42
+ "loading": boolean;
43
+ /**
44
+ * The size of the button
45
+ */
46
+ "size": 'small' | 'medium';
47
+ /**
48
+ * Target in case of "text" version
49
+ */
50
+ "target": string;
13
51
  /**
14
52
  * The variant of the button
15
53
  */
16
- "variant": 'primary' | 'secondary';
54
+ "variant": 'primary' | 'secondary' | 'text';
17
55
  }
18
56
  interface PIcon {
19
57
  /**
20
58
  * Wether to flip the icon horizontally or vertically
21
59
  */
22
- "flip": 'horizontal' | 'vertical';
60
+ "flip": IconFlipOptions;
23
61
  /**
24
62
  * Wether to rotate the icon x degrees
25
63
  */
@@ -39,6 +77,28 @@ export namespace Components {
39
77
  */
40
78
  "variant": IllustrationVariant;
41
79
  }
80
+ interface PLoader {
81
+ /**
82
+ * Color of the loader
83
+ */
84
+ "color": 'indigo' | 'white' | 'storm';
85
+ /**
86
+ * !NOT IMPLEMENTED! Modal description for modal variant
87
+ */
88
+ "modalDescription": string;
89
+ /**
90
+ * !NOT IMPLEMENTED! Modal title for modal variant
91
+ */
92
+ "modalTitle": string;
93
+ /**
94
+ * Wether to show or hide the loader
95
+ */
96
+ "show": boolean | Observable<boolean>;
97
+ /**
98
+ * Variant of loader
99
+ */
100
+ "variant": 'inline' | 'full-width' | 'full-screen' | 'modal';
101
+ }
42
102
  interface PTooltip {
43
103
  /**
44
104
  * The content of the tooltip
@@ -54,6 +114,10 @@ export namespace Components {
54
114
  "placement": Placement;
55
115
  }
56
116
  }
117
+ export interface PButtonCustomEvent<T> extends CustomEvent<T> {
118
+ detail: T;
119
+ target: HTMLPButtonElement;
120
+ }
57
121
  declare global {
58
122
  interface HTMLPButtonElement extends Components.PButton, HTMLStencilElement {
59
123
  }
@@ -73,6 +137,12 @@ declare global {
73
137
  prototype: HTMLPIllustrationElement;
74
138
  new (): HTMLPIllustrationElement;
75
139
  };
140
+ interface HTMLPLoaderElement extends Components.PLoader, HTMLStencilElement {
141
+ }
142
+ var HTMLPLoaderElement: {
143
+ prototype: HTMLPLoaderElement;
144
+ new (): HTMLPLoaderElement;
145
+ };
76
146
  interface HTMLPTooltipElement extends Components.PTooltip, HTMLStencilElement {
77
147
  }
78
148
  var HTMLPTooltipElement: {
@@ -83,21 +153,62 @@ declare global {
83
153
  "p-button": HTMLPButtonElement;
84
154
  "p-icon": HTMLPIconElement;
85
155
  "p-illustration": HTMLPIllustrationElement;
156
+ "p-loader": HTMLPLoaderElement;
86
157
  "p-tooltip": HTMLPTooltipElement;
87
158
  }
88
159
  }
89
160
  declare namespace LocalJSX {
90
161
  interface PButton {
162
+ /**
163
+ * Wether the button is disabled
164
+ */
165
+ "disabled"?: boolean;
166
+ /**
167
+ * Href in case of "text" version
168
+ */
169
+ "href"?: string;
170
+ /**
171
+ * Icon to show on the button
172
+ */
173
+ "icon"?: IconVariant;
174
+ /**
175
+ * Icon flip
176
+ */
177
+ "iconFlip"?: IconFlipOptions;
178
+ /**
179
+ * Icon position
180
+ */
181
+ "iconPosition"?: 'start' | 'end';
182
+ /**
183
+ * Icon rotate
184
+ */
185
+ "iconRotate"?: number;
186
+ /**
187
+ * Wether to show a loader or not
188
+ */
189
+ "loading"?: boolean;
190
+ /**
191
+ * Button press event
192
+ */
193
+ "onClick"?: (event: PButtonCustomEvent<MouseEvent>) => void;
194
+ /**
195
+ * The size of the button
196
+ */
197
+ "size"?: 'small' | 'medium';
198
+ /**
199
+ * Target in case of "text" version
200
+ */
201
+ "target"?: string;
91
202
  /**
92
203
  * The variant of the button
93
204
  */
94
- "variant"?: 'primary' | 'secondary';
205
+ "variant"?: 'primary' | 'secondary' | 'text';
95
206
  }
96
207
  interface PIcon {
97
208
  /**
98
209
  * Wether to flip the icon horizontally or vertically
99
210
  */
100
- "flip"?: 'horizontal' | 'vertical';
211
+ "flip"?: IconFlipOptions;
101
212
  /**
102
213
  * Wether to rotate the icon x degrees
103
214
  */
@@ -117,6 +228,28 @@ declare namespace LocalJSX {
117
228
  */
118
229
  "variant"?: IllustrationVariant;
119
230
  }
231
+ interface PLoader {
232
+ /**
233
+ * Color of the loader
234
+ */
235
+ "color"?: 'indigo' | 'white' | 'storm';
236
+ /**
237
+ * !NOT IMPLEMENTED! Modal description for modal variant
238
+ */
239
+ "modalDescription"?: string;
240
+ /**
241
+ * !NOT IMPLEMENTED! Modal title for modal variant
242
+ */
243
+ "modalTitle"?: string;
244
+ /**
245
+ * Wether to show or hide the loader
246
+ */
247
+ "show"?: boolean | Observable<boolean>;
248
+ /**
249
+ * Variant of loader
250
+ */
251
+ "variant"?: 'inline' | 'full-width' | 'full-screen' | 'modal';
252
+ }
120
253
  interface PTooltip {
121
254
  /**
122
255
  * The content of the tooltip
@@ -135,6 +268,7 @@ declare namespace LocalJSX {
135
268
  "p-button": PButton;
136
269
  "p-icon": PIcon;
137
270
  "p-illustration": PIllustration;
271
+ "p-loader": PLoader;
138
272
  "p-tooltip": PTooltip;
139
273
  }
140
274
  }
@@ -145,6 +279,7 @@ declare module "@stencil/core" {
145
279
  "p-button": LocalJSX.PButton & JSXBase.HTMLAttributes<HTMLPButtonElement>;
146
280
  "p-icon": LocalJSX.PIcon & JSXBase.HTMLAttributes<HTMLPIconElement>;
147
281
  "p-illustration": LocalJSX.PIllustration & JSXBase.HTMLAttributes<HTMLPIllustrationElement>;
282
+ "p-loader": LocalJSX.PLoader & JSXBase.HTMLAttributes<HTMLPLoaderElement>;
148
283
  "p-tooltip": LocalJSX.PTooltip & JSXBase.HTMLAttributes<HTMLPTooltipElement>;
149
284
  }
150
285
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "0.1.0-alpha.0",
3
+ "version": "0.1.0-alpha.4",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -38,7 +38,8 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@popperjs/core": "^2.11.5",
41
- "@stencil/core": "^2.13.0"
41
+ "@stencil/core": "^2.13.0",
42
+ "rxjs": "^7.5.5"
42
43
  },
43
44
  "devDependencies": {
44
45
  "@stencil/angular-output-target": "^0.4.0",