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

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 (228) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/README.md +17 -0
  3. package/dist/assets/icons/arrow.svg +1 -1
  4. package/dist/assets/icons/attachment.svg +1 -1
  5. package/dist/assets/icons/bread.svg +1 -1
  6. package/dist/assets/icons/calendar.svg +1 -1
  7. package/dist/assets/icons/car.svg +1 -1
  8. package/dist/assets/icons/checkmark.svg +1 -1
  9. package/dist/assets/icons/chevron.svg +1 -1
  10. package/dist/assets/icons/clock.svg +1 -1
  11. package/dist/assets/icons/cogs.svg +1 -1
  12. package/dist/assets/icons/comment.svg +1 -1
  13. package/dist/assets/icons/document.svg +1 -1
  14. package/dist/assets/icons/download.svg +1 -1
  15. package/dist/assets/icons/envelope.svg +1 -1
  16. package/dist/assets/icons/explanation.svg +1 -1
  17. package/dist/assets/icons/eye.svg +1 -1
  18. package/dist/assets/icons/filter.svg +1 -1
  19. package/dist/assets/icons/grid.svg +1 -1
  20. package/dist/assets/icons/headset.svg +1 -1
  21. package/dist/assets/icons/list.svg +1 -1
  22. package/dist/assets/icons/location.svg +1 -1
  23. package/dist/assets/icons/megaphone.svg +1 -1
  24. package/dist/assets/icons/minus.svg +1 -1
  25. package/dist/assets/icons/negative.svg +1 -1
  26. package/dist/assets/icons/pagination.svg +1 -1
  27. package/dist/assets/icons/payment.svg +1 -1
  28. package/dist/assets/icons/pencil.svg +1 -1
  29. package/dist/assets/icons/person.svg +1 -1
  30. package/dist/assets/icons/plus.svg +1 -1
  31. package/dist/assets/icons/question.svg +1 -1
  32. package/dist/assets/icons/receipt.svg +1 -1
  33. package/dist/assets/icons/report.svg +1 -1
  34. package/dist/assets/icons/search.svg +1 -1
  35. package/dist/assets/icons/settings.svg +1 -1
  36. package/dist/assets/icons/sick.svg +1 -1
  37. package/dist/assets/icons/tachometer.svg +1 -1
  38. package/dist/assets/icons/tool.svg +1 -1
  39. package/dist/assets/icons/trash.svg +1 -1
  40. package/dist/assets/icons/turn.svg +1 -1
  41. package/dist/assets/icons/upload.svg +1 -1
  42. package/dist/assets/icons/warning.svg +1 -1
  43. package/dist/assets/images/avatar/company-default.svg +12 -0
  44. package/dist/assets/images/avatar/user-default.svg +12 -0
  45. package/dist/assets/images/helper/helper-hover.svg +15 -0
  46. package/dist/assets/images/helper/helper.svg +15 -0
  47. package/dist/build/p-06a38756.entry.js +1 -0
  48. package/dist/build/p-19afe191.entry.js +1 -0
  49. package/dist/build/p-229f113b.js +2 -0
  50. package/dist/{paperless/p-98d636b6.entry.js → build/p-23980fbb.entry.js} +1 -1
  51. package/dist/build/p-31f80006.entry.js +1 -0
  52. package/dist/build/p-332028c6.entry.js +1 -0
  53. package/dist/build/p-5f0ec763.entry.js +1 -0
  54. package/dist/build/p-6c6c1137.entry.js +1 -0
  55. package/dist/build/p-80bf9d06.entry.js +1 -0
  56. package/dist/build/p-e80637b9.entry.js +1 -0
  57. package/dist/build/p-ec52095f.entry.js +1 -0
  58. package/dist/build/paperless.css +4 -3
  59. package/dist/build/paperless.esm.js +1 -1
  60. package/dist/cjs/{index-6758a39e.js → index-6b6e08cc.js} +487 -9
  61. package/dist/cjs/loader.cjs.js +2 -2
  62. package/dist/cjs/p-avatar.cjs.entry.js +32 -0
  63. package/dist/cjs/{p-icon.cjs.entry.js → p-button_3.cjs.entry.js} +149 -46
  64. package/dist/cjs/p-counter.cjs.entry.js +19 -0
  65. package/dist/cjs/p-divider.cjs.entry.js +19 -0
  66. package/dist/cjs/p-helper.cjs.entry.js +19 -0
  67. package/dist/cjs/p-illustration.cjs.entry.js +11 -14
  68. package/dist/cjs/p-info-panel.cjs.entry.js +31 -0
  69. package/dist/cjs/p-pagination-item.cjs.entry.js +23 -0
  70. package/dist/cjs/p-pagination.cjs.entry.js +163 -0
  71. package/dist/cjs/p-tooltip.cjs.entry.js +62 -20
  72. package/dist/cjs/paperless.cjs.js +2 -2
  73. package/dist/collection/assets/icons/arrow.svg +1 -1
  74. package/dist/collection/assets/icons/attachment.svg +1 -1
  75. package/dist/collection/assets/icons/bread.svg +1 -1
  76. package/dist/collection/assets/icons/calendar.svg +1 -1
  77. package/dist/collection/assets/icons/car.svg +1 -1
  78. package/dist/collection/assets/icons/checkmark.svg +1 -1
  79. package/dist/collection/assets/icons/chevron.svg +1 -1
  80. package/dist/collection/assets/icons/clock.svg +1 -1
  81. package/dist/collection/assets/icons/cogs.svg +1 -1
  82. package/dist/collection/assets/icons/comment.svg +1 -1
  83. package/dist/collection/assets/icons/document.svg +1 -1
  84. package/dist/collection/assets/icons/download.svg +1 -1
  85. package/dist/collection/assets/icons/envelope.svg +1 -1
  86. package/dist/collection/assets/icons/explanation.svg +1 -1
  87. package/dist/collection/assets/icons/eye.svg +1 -1
  88. package/dist/collection/assets/icons/filter.svg +1 -1
  89. package/dist/collection/assets/icons/grid.svg +1 -1
  90. package/dist/collection/assets/icons/headset.svg +1 -1
  91. package/dist/collection/assets/icons/list.svg +1 -1
  92. package/dist/collection/assets/icons/location.svg +1 -1
  93. package/dist/collection/assets/icons/megaphone.svg +1 -1
  94. package/dist/collection/assets/icons/minus.svg +1 -1
  95. package/dist/collection/assets/icons/negative.svg +1 -1
  96. package/dist/collection/assets/icons/pagination.svg +1 -1
  97. package/dist/collection/assets/icons/payment.svg +1 -1
  98. package/dist/collection/assets/icons/pencil.svg +1 -1
  99. package/dist/collection/assets/icons/person.svg +1 -1
  100. package/dist/collection/assets/icons/plus.svg +1 -1
  101. package/dist/collection/assets/icons/question.svg +1 -1
  102. package/dist/collection/assets/icons/receipt.svg +1 -1
  103. package/dist/collection/assets/icons/report.svg +1 -1
  104. package/dist/collection/assets/icons/search.svg +1 -1
  105. package/dist/collection/assets/icons/settings.svg +1 -1
  106. package/dist/collection/assets/icons/sick.svg +1 -1
  107. package/dist/collection/assets/icons/tachometer.svg +1 -1
  108. package/dist/collection/assets/icons/tool.svg +1 -1
  109. package/dist/collection/assets/icons/trash.svg +1 -1
  110. package/dist/collection/assets/icons/turn.svg +1 -1
  111. package/dist/collection/assets/icons/upload.svg +1 -1
  112. package/dist/collection/assets/icons/warning.svg +1 -1
  113. package/dist/collection/assets/images/avatar/company-default.svg +12 -0
  114. package/dist/collection/assets/images/avatar/user-default.svg +12 -0
  115. package/dist/collection/assets/images/helper/helper-hover.svg +15 -0
  116. package/dist/collection/assets/images/helper/helper.svg +15 -0
  117. package/dist/collection/collection-manifest.json +12 -4
  118. package/dist/collection/components/atoms/avatar/avatar.component.css +31 -0
  119. package/dist/collection/components/atoms/avatar/avatar.component.js +105 -0
  120. package/dist/collection/components/atoms/button/button.component.css +71 -0
  121. package/dist/collection/components/atoms/button/button.component.js +276 -0
  122. package/dist/collection/components/atoms/counter/counter.component.css +5 -0
  123. package/dist/collection/components/atoms/counter/counter.component.js +15 -0
  124. package/dist/collection/components/atoms/divider/divider.component.css +3 -0
  125. package/dist/collection/components/atoms/divider/divider.component.js +14 -0
  126. package/dist/collection/components/atoms/helper/helper.component.css +7 -0
  127. package/dist/collection/components/atoms/helper/helper.component.js +18 -0
  128. package/dist/collection/components/{icon → atoms/icon}/icon.component.js +10 -11
  129. package/dist/collection/components/{illustration → atoms/illustration}/illustration.component.js +4 -11
  130. package/dist/collection/components/atoms/info-panel/info-panel.component.css +28 -0
  131. package/dist/collection/components/atoms/info-panel/info-panel.component.js +106 -0
  132. package/dist/collection/components/atoms/loader/loader.component.css +26 -0
  133. package/dist/collection/components/atoms/loader/loader.component.js +153 -0
  134. package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +16 -0
  135. package/dist/collection/components/atoms/pagination-item/pagination-item.component.js +41 -0
  136. package/dist/collection/components/atoms/tooltip/tooltip.component.css +37 -0
  137. package/dist/collection/components/{tooltip → atoms/tooltip}/tooltip.component.js +122 -32
  138. package/dist/collection/components/molecules/pagination/pagination.component.css +3 -0
  139. package/dist/collection/components/molecules/pagination/pagination.component.js +219 -0
  140. package/dist/collection/tailwind/border-radius.js +1 -0
  141. package/dist/collection/tailwind/grid.js +24 -4
  142. package/dist/collection/tailwind/rotate.js +8 -0
  143. package/dist/collection/tailwind/scale.js +3 -0
  144. package/dist/collection/tailwind.config.js +6 -7
  145. package/dist/{esm/p-icon.entry.js → components/icon.component.js} +67 -52
  146. package/dist/components/index.d.ts +9 -1
  147. package/dist/components/index.js +8 -0
  148. package/dist/components/loader.component.js +74 -0
  149. package/dist/components/p-avatar.d.ts +11 -0
  150. package/dist/components/p-avatar.js +52 -0
  151. package/dist/components/p-button.js +67 -8
  152. package/dist/components/p-counter.d.ts +11 -0
  153. package/dist/components/p-counter.js +33 -0
  154. package/dist/components/p-divider.d.ts +11 -0
  155. package/dist/components/p-divider.js +33 -0
  156. package/dist/components/p-helper.d.ts +11 -0
  157. package/dist/components/p-helper.js +39 -0
  158. package/dist/components/p-icon.js +1 -815
  159. package/dist/components/p-illustration.js +3 -7
  160. package/dist/components/p-info-panel.d.ts +11 -0
  161. package/dist/components/p-info-panel.js +56 -0
  162. package/dist/components/p-loader.d.ts +11 -0
  163. package/dist/components/p-loader.js +6 -0
  164. package/dist/components/p-pagination-item.d.ts +11 -0
  165. package/dist/components/p-pagination-item.js +6 -0
  166. package/dist/components/p-pagination.d.ts +11 -0
  167. package/dist/components/p-pagination.js +192 -0
  168. package/dist/components/p-tooltip.js +1 -1886
  169. package/dist/components/pagination-item.component.js +36 -0
  170. package/dist/components/tooltip.component.js +1932 -0
  171. package/dist/esm/{index-e4d80e41.js → index-5c917d13.js} +487 -10
  172. package/dist/esm/loader.js +2 -2
  173. package/dist/esm/p-avatar.entry.js +28 -0
  174. package/dist/esm/p-button_3.entry.js +899 -0
  175. package/dist/esm/p-counter.entry.js +15 -0
  176. package/dist/esm/p-divider.entry.js +15 -0
  177. package/dist/esm/p-helper.entry.js +15 -0
  178. package/dist/esm/p-illustration.entry.js +11 -14
  179. package/dist/esm/p-info-panel.entry.js +27 -0
  180. package/dist/esm/p-pagination-item.entry.js +19 -0
  181. package/dist/esm/p-pagination.entry.js +159 -0
  182. package/dist/esm/p-tooltip.entry.js +62 -20
  183. package/dist/esm/paperless.js +2 -2
  184. package/dist/index.html +1 -1
  185. package/dist/paperless/p-06a38756.entry.js +1 -0
  186. package/dist/paperless/p-19afe191.entry.js +1 -0
  187. package/dist/paperless/p-229f113b.js +2 -0
  188. package/dist/{build/p-98d636b6.entry.js → paperless/p-23980fbb.entry.js} +1 -1
  189. package/dist/paperless/p-31f80006.entry.js +1 -0
  190. package/dist/paperless/p-332028c6.entry.js +1 -0
  191. package/dist/paperless/p-5f0ec763.entry.js +1 -0
  192. package/dist/paperless/p-6c6c1137.entry.js +1 -0
  193. package/dist/paperless/p-80bf9d06.entry.js +1 -0
  194. package/dist/paperless/p-e80637b9.entry.js +1 -0
  195. package/dist/paperless/p-ec52095f.entry.js +1 -0
  196. package/dist/paperless/paperless.css +3843 -201
  197. package/dist/paperless/paperless.esm.js +1 -1
  198. package/dist/sw.js +245 -49
  199. package/dist/tailwind.config.js +6 -7
  200. package/dist/types/components/atoms/avatar/avatar.component.d.ts +21 -0
  201. package/dist/types/components/atoms/button/button.component.d.ts +51 -0
  202. package/dist/types/components/atoms/counter/counter.component.d.ts +3 -0
  203. package/dist/types/components/atoms/divider/divider.component.d.ts +3 -0
  204. package/dist/types/components/atoms/helper/helper.component.d.ts +3 -0
  205. package/dist/types/components/{icon → atoms/icon}/icon.component.d.ts +3 -2
  206. package/dist/types/components/{illustration → atoms/illustration}/illustration.component.d.ts +2 -2
  207. package/dist/types/components/atoms/info-panel/info-panel.component.d.ts +24 -0
  208. package/dist/types/components/atoms/loader/loader.component.d.ts +30 -0
  209. package/dist/types/components/atoms/pagination-item/pagination-item.component.d.ts +7 -0
  210. package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +40 -0
  211. package/dist/types/components/molecules/pagination/pagination.component.d.ts +31 -0
  212. package/dist/types/components.d.ts +358 -20
  213. package/package.json +3 -2
  214. package/dist/build/p-3318b73b.entry.js +0 -1
  215. package/dist/build/p-6f9229a6.js +0 -2
  216. package/dist/build/p-711630fb.entry.js +0 -1
  217. package/dist/build/p-c3d80205.entry.js +0 -1
  218. package/dist/cjs/p-button.cjs.entry.js +0 -23
  219. package/dist/collection/components/button/button.component.css +0 -6
  220. package/dist/collection/components/button/button.component.js +0 -42
  221. package/dist/collection/components/tooltip/tooltip.component.css +0 -34
  222. package/dist/esm/p-button.entry.js +0 -19
  223. package/dist/paperless/p-3318b73b.entry.js +0 -1
  224. package/dist/paperless/p-6f9229a6.js +0 -2
  225. package/dist/paperless/p-711630fb.entry.js +0 -1
  226. package/dist/paperless/p-c3d80205.entry.js +0 -1
  227. package/dist/types/components/button/button.component.d.ts +0 -7
  228. package/dist/types/components/tooltip/tooltip.component.d.ts +0 -28
@@ -0,0 +1,105 @@
1
+ import { Component, h, Host, Prop, State } from '@stencil/core';
2
+ export class Avatar {
3
+ constructor() {
4
+ /**
5
+ * The variant of the avatar
6
+ */
7
+ this.variant = 'user';
8
+ /**
9
+ * The size of the avatar
10
+ */
11
+ this.size = 'medium';
12
+ this._src = this.src;
13
+ }
14
+ render() {
15
+ return (h(Host, { class: `p-avatar size-${this.size} variant-${this.variant}` },
16
+ h("img", { src: this._src, onError: () => this._setDefaultLink() })));
17
+ }
18
+ _setDefaultLink() {
19
+ var _a;
20
+ this._src = (_a = this.defaultImage) !== null && _a !== void 0 ? _a : (this.variant === 'user' ? '/assets/images/avatar/user-default.svg' : '/assets/images/avatar/company-default.svg');
21
+ }
22
+ static get is() { return "p-avatar"; }
23
+ static get encapsulation() { return "shadow"; }
24
+ static get originalStyleUrls() { return {
25
+ "$": ["avatar.component.scss"]
26
+ }; }
27
+ static get styleUrls() { return {
28
+ "$": ["avatar.component.css"]
29
+ }; }
30
+ static get properties() { return {
31
+ "variant": {
32
+ "type": "string",
33
+ "mutable": false,
34
+ "complexType": {
35
+ "original": "'user' | 'company'",
36
+ "resolved": "\"company\" | \"user\"",
37
+ "references": {}
38
+ },
39
+ "required": false,
40
+ "optional": false,
41
+ "docs": {
42
+ "tags": [],
43
+ "text": "The variant of the avatar"
44
+ },
45
+ "attribute": "variant",
46
+ "reflect": false,
47
+ "defaultValue": "'user'"
48
+ },
49
+ "size": {
50
+ "type": "string",
51
+ "mutable": false,
52
+ "complexType": {
53
+ "original": "'small' | 'medium' | 'large'",
54
+ "resolved": "\"large\" | \"medium\" | \"small\"",
55
+ "references": {}
56
+ },
57
+ "required": false,
58
+ "optional": false,
59
+ "docs": {
60
+ "tags": [],
61
+ "text": "The size of the avatar"
62
+ },
63
+ "attribute": "size",
64
+ "reflect": false,
65
+ "defaultValue": "'medium'"
66
+ },
67
+ "defaultImage": {
68
+ "type": "string",
69
+ "mutable": false,
70
+ "complexType": {
71
+ "original": "string",
72
+ "resolved": "string",
73
+ "references": {}
74
+ },
75
+ "required": false,
76
+ "optional": false,
77
+ "docs": {
78
+ "tags": [],
79
+ "text": "The default image to show on errors"
80
+ },
81
+ "attribute": "default-image",
82
+ "reflect": false
83
+ },
84
+ "src": {
85
+ "type": "string",
86
+ "mutable": false,
87
+ "complexType": {
88
+ "original": "string",
89
+ "resolved": "string",
90
+ "references": {}
91
+ },
92
+ "required": true,
93
+ "optional": false,
94
+ "docs": {
95
+ "tags": [],
96
+ "text": "The image used for the avatar"
97
+ },
98
+ "attribute": "src",
99
+ "reflect": false
100
+ }
101
+ }; }
102
+ static get states() { return {
103
+ "_src": {}
104
+ }; }
105
+ }
@@ -0,0 +1,71 @@
1
+ p-button {
2
+ @apply inline-block;
3
+ }
4
+ p-button > button,
5
+ p-button > a {
6
+ outline: 0;
7
+ border: 0;
8
+ @apply h-10 rounded-large;
9
+ @apply font-semibold leading-4;
10
+ @apply flex items-center justify-center;
11
+ @apply cursor-pointer;
12
+ }
13
+ p-button > button > p-loader,
14
+ p-button > a > p-loader {
15
+ @apply ml-2;
16
+ }
17
+ p-button > button.icon-position-end > p-icon,
18
+ p-button > a.icon-position-end > p-icon {
19
+ @apply ml-2;
20
+ }
21
+ p-button > button.icon-position-start > p-icon,
22
+ p-button > a.icon-position-start > p-icon {
23
+ @apply mr-2;
24
+ }
25
+ p-button > button.variant-primary, p-button > button.variant-secondary,
26
+ p-button > a.variant-primary,
27
+ p-button > a.variant-secondary {
28
+ @apply px-4;
29
+ }
30
+ p-button > button.variant-primary,
31
+ p-button > a.variant-primary {
32
+ @apply bg-indigo text-white;
33
+ }
34
+ p-button > button.variant-primary:hover,
35
+ p-button > a.variant-primary:hover {
36
+ @apply bg-indigo/95;
37
+ }
38
+ p-button > button.variant-primary:active,
39
+ p-button > a.variant-primary:active {
40
+ @apply bg-indigo-dark;
41
+ }
42
+ p-button > button.variant-secondary,
43
+ p-button > a.variant-secondary {
44
+ @apply border border-mystic-dark !important;
45
+ @apply bg-white text-storm;
46
+ @apply filter drop-shadow-4;
47
+ }
48
+ p-button > button.variant-secondary:hover,
49
+ p-button > a.variant-secondary:hover {
50
+ @apply bg-mystic;
51
+ }
52
+ p-button > button.variant-secondary:active,
53
+ p-button > a.variant-secondary:active {
54
+ @apply bg-storm-light/5 border-storm-light/20;
55
+ }
56
+ p-button > button.variant-text,
57
+ p-button > a.variant-text {
58
+ @apply text-indigo;
59
+ }
60
+ p-button > button.variant-text:hover,
61
+ p-button > a.variant-text:hover {
62
+ @apply text-indigo-dark;
63
+ }
64
+ p-button > button.size-small,
65
+ p-button > a.size-small {
66
+ @apply h-8 text-sm;
67
+ }
68
+ p-button > button[disabled],
69
+ p-button > a[disabled] {
70
+ @apply opacity-50;
71
+ }
@@ -0,0 +1,276 @@
1
+ import { Component, Event, h, Host, Listen, Prop } from '@stencil/core';
2
+ export class Button {
3
+ constructor() {
4
+ /**
5
+ * The variant of the button
6
+ */
7
+ this.variant = 'primary';
8
+ /**
9
+ * The size of the button
10
+ */
11
+ this.size = 'medium';
12
+ /**
13
+ * Wether to show a loader or not
14
+ */
15
+ this.loading = false;
16
+ /**
17
+ * Wether the button is disabled
18
+ */
19
+ this.disabled = false;
20
+ /**
21
+ * Icon position
22
+ */
23
+ this.iconPosition = 'end';
24
+ }
25
+ render() {
26
+ let loaderColor = 'white';
27
+ switch (this.variant) {
28
+ case 'secondary':
29
+ loaderColor = 'storm';
30
+ break;
31
+ case 'text':
32
+ loaderColor = 'indigo';
33
+ break;
34
+ }
35
+ const VariableTag = this.variant === 'text' ? 'a' : 'button';
36
+ return (h(Host, { class: "p-button" },
37
+ h(VariableTag, { class: `variant-${this.variant} size-${this.size} icon-position-${this.iconPosition}`, disabled: this.disabled, href: this.href, target: this.target },
38
+ this.icon && this.iconPosition === 'start' && this._getIcon(),
39
+ h("slot", null),
40
+ this.icon && this.iconPosition === 'end' && this._getIcon(),
41
+ this.loading && h("p-loader", { color: loaderColor }))));
42
+ }
43
+ handleClick(ev) {
44
+ if (this.loading || this.disabled) {
45
+ return;
46
+ }
47
+ this.onClick.emit(ev);
48
+ }
49
+ _getIcon() {
50
+ if (!this.icon) {
51
+ return;
52
+ }
53
+ return h("p-icon", { variant: this.icon, flip: this.iconFlip, rotate: this.iconRotate });
54
+ }
55
+ static get is() { return "p-button"; }
56
+ static get originalStyleUrls() { return {
57
+ "$": ["button.component.scss"]
58
+ }; }
59
+ static get styleUrls() { return {
60
+ "$": ["button.component.css"]
61
+ }; }
62
+ static get properties() { return {
63
+ "variant": {
64
+ "type": "string",
65
+ "mutable": false,
66
+ "complexType": {
67
+ "original": "'primary' | 'secondary' | 'text'",
68
+ "resolved": "\"primary\" | \"secondary\" | \"text\"",
69
+ "references": {}
70
+ },
71
+ "required": false,
72
+ "optional": false,
73
+ "docs": {
74
+ "tags": [],
75
+ "text": "The variant of the button"
76
+ },
77
+ "attribute": "variant",
78
+ "reflect": false,
79
+ "defaultValue": "'primary'"
80
+ },
81
+ "href": {
82
+ "type": "string",
83
+ "mutable": false,
84
+ "complexType": {
85
+ "original": "string",
86
+ "resolved": "string",
87
+ "references": {}
88
+ },
89
+ "required": false,
90
+ "optional": false,
91
+ "docs": {
92
+ "tags": [],
93
+ "text": "Href in case of \"text\" version"
94
+ },
95
+ "attribute": "href",
96
+ "reflect": false
97
+ },
98
+ "target": {
99
+ "type": "string",
100
+ "mutable": false,
101
+ "complexType": {
102
+ "original": "string",
103
+ "resolved": "string",
104
+ "references": {}
105
+ },
106
+ "required": false,
107
+ "optional": false,
108
+ "docs": {
109
+ "tags": [],
110
+ "text": "Target in case of \"text\" version"
111
+ },
112
+ "attribute": "target",
113
+ "reflect": false
114
+ },
115
+ "size": {
116
+ "type": "string",
117
+ "mutable": false,
118
+ "complexType": {
119
+ "original": "'small' | 'medium'",
120
+ "resolved": "\"medium\" | \"small\"",
121
+ "references": {}
122
+ },
123
+ "required": false,
124
+ "optional": false,
125
+ "docs": {
126
+ "tags": [],
127
+ "text": "The size of the button"
128
+ },
129
+ "attribute": "size",
130
+ "reflect": false,
131
+ "defaultValue": "'medium'"
132
+ },
133
+ "loading": {
134
+ "type": "boolean",
135
+ "mutable": false,
136
+ "complexType": {
137
+ "original": "boolean",
138
+ "resolved": "boolean",
139
+ "references": {}
140
+ },
141
+ "required": false,
142
+ "optional": false,
143
+ "docs": {
144
+ "tags": [],
145
+ "text": "Wether to show a loader or not"
146
+ },
147
+ "attribute": "loading",
148
+ "reflect": false,
149
+ "defaultValue": "false"
150
+ },
151
+ "disabled": {
152
+ "type": "boolean",
153
+ "mutable": false,
154
+ "complexType": {
155
+ "original": "boolean",
156
+ "resolved": "boolean",
157
+ "references": {}
158
+ },
159
+ "required": false,
160
+ "optional": false,
161
+ "docs": {
162
+ "tags": [],
163
+ "text": "Wether the button is disabled"
164
+ },
165
+ "attribute": "disabled",
166
+ "reflect": false,
167
+ "defaultValue": "false"
168
+ },
169
+ "icon": {
170
+ "type": "string",
171
+ "mutable": false,
172
+ "complexType": {
173
+ "original": "IconVariant",
174
+ "resolved": "\"arrow\" | \"attachment\" | \"bread\" | \"calendar\" | \"car\" | \"checkmark\" | \"chevron\" | \"clock\" | \"cogs\" | \"comment\" | \"document\" | \"download\" | \"envelope\" | \"explanation\" | \"eye\" | \"filter\" | \"grid\" | \"headset\" | \"list\" | \"location\" | \"megaphone\" | \"minus\" | \"negative\" | \"pagination\" | \"payment\" | \"pencil\" | \"person\" | \"plus\" | \"question\" | \"receipt\" | \"report\" | \"search\" | \"settings\" | \"sick\" | \"tachometer\" | \"tool\" | \"trash\" | \"turn\" | \"upload\" | \"warning\"",
175
+ "references": {
176
+ "IconVariant": {
177
+ "location": "import",
178
+ "path": "../icon/icon.component"
179
+ }
180
+ }
181
+ },
182
+ "required": false,
183
+ "optional": false,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": "Icon to show on the button"
187
+ },
188
+ "attribute": "icon",
189
+ "reflect": false
190
+ },
191
+ "iconPosition": {
192
+ "type": "string",
193
+ "mutable": false,
194
+ "complexType": {
195
+ "original": "'start' | 'end'",
196
+ "resolved": "\"end\" | \"start\"",
197
+ "references": {}
198
+ },
199
+ "required": false,
200
+ "optional": false,
201
+ "docs": {
202
+ "tags": [],
203
+ "text": "Icon position"
204
+ },
205
+ "attribute": "icon-position",
206
+ "reflect": false,
207
+ "defaultValue": "'end'"
208
+ },
209
+ "iconFlip": {
210
+ "type": "string",
211
+ "mutable": false,
212
+ "complexType": {
213
+ "original": "IconFlipOptions",
214
+ "resolved": "\"horizontal\" | \"vertical\"",
215
+ "references": {
216
+ "IconFlipOptions": {
217
+ "location": "import",
218
+ "path": "../icon/icon.component"
219
+ }
220
+ }
221
+ },
222
+ "required": false,
223
+ "optional": false,
224
+ "docs": {
225
+ "tags": [],
226
+ "text": "Icon flip"
227
+ },
228
+ "attribute": "icon-flip",
229
+ "reflect": false
230
+ },
231
+ "iconRotate": {
232
+ "type": "number",
233
+ "mutable": false,
234
+ "complexType": {
235
+ "original": "number",
236
+ "resolved": "number",
237
+ "references": {}
238
+ },
239
+ "required": false,
240
+ "optional": false,
241
+ "docs": {
242
+ "tags": [],
243
+ "text": "Icon rotate"
244
+ },
245
+ "attribute": "icon-rotate",
246
+ "reflect": false
247
+ }
248
+ }; }
249
+ static get events() { return [{
250
+ "method": "onClick",
251
+ "name": "onClick",
252
+ "bubbles": true,
253
+ "cancelable": true,
254
+ "composed": true,
255
+ "docs": {
256
+ "tags": [],
257
+ "text": "Button click event"
258
+ },
259
+ "complexType": {
260
+ "original": "MouseEvent",
261
+ "resolved": "MouseEvent",
262
+ "references": {
263
+ "MouseEvent": {
264
+ "location": "global"
265
+ }
266
+ }
267
+ }
268
+ }]; }
269
+ static get listeners() { return [{
270
+ "name": "click",
271
+ "method": "handleClick",
272
+ "target": undefined,
273
+ "capture": true,
274
+ "passive": false
275
+ }]; }
276
+ }
@@ -0,0 +1,5 @@
1
+ :host {
2
+ @apply h-4 px-2 bg-indigo rounded-xlarge;
3
+ @apply text-xs leading-3 text-white font-bold uppercase;
4
+ @apply flex justify-center items-center;
5
+ }
@@ -0,0 +1,15 @@
1
+ import { Component, h, Host } from '@stencil/core';
2
+ export class Counter {
3
+ render() {
4
+ return (h(Host, { class: "p-counter" },
5
+ h("slot", null)));
6
+ }
7
+ static get is() { return "p-counter"; }
8
+ static get encapsulation() { return "shadow"; }
9
+ static get originalStyleUrls() { return {
10
+ "$": ["counter.component.scss"]
11
+ }; }
12
+ static get styleUrls() { return {
13
+ "$": ["counter.component.css"]
14
+ }; }
15
+ }
@@ -0,0 +1,3 @@
1
+ :host {
2
+ @apply h-px bg-mystic-medium my-2 w-full;
3
+ }
@@ -0,0 +1,14 @@
1
+ import { Component, h, Host } from '@stencil/core';
2
+ export class Divider {
3
+ render() {
4
+ return h(Host, { class: "p-divider" });
5
+ }
6
+ static get is() { return "p-divider"; }
7
+ static get encapsulation() { return "shadow"; }
8
+ static get originalStyleUrls() { return {
9
+ "$": ["divider.component.scss"]
10
+ }; }
11
+ static get styleUrls() { return {
12
+ "$": ["divider.component.css"]
13
+ }; }
14
+ }
@@ -0,0 +1,7 @@
1
+ :host .helper {
2
+ @apply inline-block cursor-pointer bg-no-repeat bg-center w-3 h-3;
3
+ background-image: url(/assets/images/helper/helper.svg);
4
+ }
5
+ :host .helper:hover {
6
+ background-image: url(/assets/images/helper/helper-hover.svg);
7
+ }
@@ -0,0 +1,18 @@
1
+ import { Component, h, Host } from '@stencil/core';
2
+ export class Helper {
3
+ render() {
4
+ return (h(Host, { class: "p-helper" },
5
+ h("p-tooltip", null,
6
+ h("div", { slot: "popover" },
7
+ h("slot", null)),
8
+ h("div", { slot: "content", class: "helper" }))));
9
+ }
10
+ static get is() { return "p-helper"; }
11
+ static get encapsulation() { return "shadow"; }
12
+ static get originalStyleUrls() { return {
13
+ "$": ["helper.component.scss"]
14
+ }; }
15
+ static get styleUrls() { return {
16
+ "$": ["helper.component.css"]
17
+ }; }
18
+ }
@@ -1,11 +1,7 @@
1
1
  import { Component, h, Host, Prop } from '@stencil/core';
2
- import icons from '../../utils/icons';
2
+ import icons from '../../../utils/icons';
3
3
  export class Icon {
4
4
  constructor() {
5
- /**
6
- * The icon the be displayed
7
- */
8
- this.variant = null;
9
5
  /**
10
6
  * The size of the icon, using tailwind sizes
11
7
  */
@@ -24,7 +20,7 @@ export class Icon {
24
20
  return h(Host, { class: this._getClass(), innerHTML: icon });
25
21
  }
26
22
  _getClass() {
27
- return `p-icon inline-block text-${this.size} ${this.rotate || this.flip ? 'transform' : ''} ${this.rotate ? ` ${this.rotate < 0 ? '-' : ''}rotate-${this.rotate < 0 ? this.rotate * -1 : this.rotate}` : ''} ${this.flip === 'horizontal' ? ` -scale-x-1` : this.flip === 'vertical' ? ` -scale-y-1` : ''}`;
23
+ return `p-icon inline-block text-${this.size} ${this.rotate || this.flip ? 'transform' : ''} ${this.rotate ? `${this.rotate < 0 ? '-' : ''}rotate-${this.rotate < 0 ? this.rotate * -1 : this.rotate}` : ''} ${this.flip ? `scale-${this.flip === 'horizontal' ? 'x' : 'y'}-flip` : ''}`;
28
24
  }
29
25
  static get is() { return "p-icon"; }
30
26
  static get properties() { return {
@@ -40,15 +36,14 @@ export class Icon {
40
36
  }
41
37
  }
42
38
  },
43
- "required": false,
39
+ "required": true,
44
40
  "optional": false,
45
41
  "docs": {
46
42
  "tags": [],
47
43
  "text": "The icon the be displayed"
48
44
  },
49
45
  "attribute": "variant",
50
- "reflect": false,
51
- "defaultValue": "null"
46
+ "reflect": false
52
47
  },
53
48
  "size": {
54
49
  "type": "string",
@@ -90,9 +85,13 @@ export class Icon {
90
85
  "type": "string",
91
86
  "mutable": false,
92
87
  "complexType": {
93
- "original": "'horizontal' | 'vertical'",
88
+ "original": "IconFlipOptions",
94
89
  "resolved": "\"horizontal\" | \"vertical\"",
95
- "references": {}
90
+ "references": {
91
+ "IconFlipOptions": {
92
+ "location": "local"
93
+ }
94
+ }
96
95
  },
97
96
  "required": false,
98
97
  "optional": false,
@@ -1,12 +1,6 @@
1
1
  import { Component, h, Host, Prop } from '@stencil/core';
2
- import illustrations from '../../utils/illustrations';
3
- export class Icon {
4
- constructor() {
5
- /**
6
- * The icon the be displayed
7
- */
8
- this.variant = null;
9
- }
2
+ import illustrations from '../../../utils/illustrations';
3
+ export class Illustration {
10
4
  render() {
11
5
  const illustration = illustrations[this.variant];
12
6
  return h(Host, { class: "p-illustration block", innerHTML: illustration });
@@ -25,15 +19,14 @@ export class Icon {
25
19
  }
26
20
  }
27
21
  },
28
- "required": false,
22
+ "required": true,
29
23
  "optional": false,
30
24
  "docs": {
31
25
  "tags": [],
32
26
  "text": "The icon the be displayed"
33
27
  },
34
28
  "attribute": "variant",
35
- "reflect": false,
36
- "defaultValue": "null"
29
+ "reflect": false
37
30
  }
38
31
  }; }
39
32
  }
@@ -0,0 +1,28 @@
1
+ :host {
2
+ @apply flex flex-col w-full relative p-4 bg-indigo-light rounded-large;
3
+ }
4
+ :host .header {
5
+ @apply font-semibold text-storm-dark;
6
+ }
7
+ :host .content {
8
+ @apply text-sm;
9
+ }
10
+ :host .close {
11
+ @apply absolute top-2 right-2 cursor-pointer text-storm-vague;
12
+ }
13
+
14
+ :host(.variant-positive) {
15
+ @apply bg-positive-light;
16
+ }
17
+
18
+ :host(.variant-unbiased) {
19
+ @apply bg-unbiased-light;
20
+ }
21
+
22
+ :host(.variant-negative) {
23
+ @apply bg-negative-light;
24
+ }
25
+
26
+ :host(.has-close) {
27
+ @apply pr-8;
28
+ }