@paperless/core 0.1.0-alpha.2 → 0.1.0-alpha.20
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 +180 -0
- package/README.md +18 -1
- package/dist/assets/images/avatar/company-default.svg +12 -0
- package/dist/assets/images/avatar/user-default.svg +12 -0
- package/dist/assets/images/helper/helper-hover.svg +15 -0
- package/dist/assets/images/helper/helper.svg +15 -0
- package/dist/build/{p-1d13a9d2.entry.js → p-14ceb308.entry.js} +1 -1
- package/dist/build/p-17c11169.entry.js +1 -0
- package/dist/build/p-42dab9d4.entry.js +1 -0
- package/dist/build/p-47b52f92.entry.js +1 -0
- package/dist/build/p-5ec6ea71.entry.js +1 -0
- package/dist/build/p-76464e0b.js +2 -0
- package/dist/build/{p-feec8ec1.entry.js → p-8501ba07.entry.js} +1 -1
- package/dist/build/p-aae3d4f0.entry.js +1 -0
- package/dist/build/p-adcb0b93.entry.js +1 -0
- package/dist/build/p-bbec0e86.entry.js +1 -0
- package/dist/build/p-d23e4d57.entry.js +1 -0
- package/dist/build/p-f65d7bbf.entry.js +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{index-5b30cb95.js → index-a46a39a5.js} +494 -9
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{p-loader.cjs.entry.js → p-avatar.cjs.entry.js} +13 -38
- package/dist/cjs/{p-icon.cjs.entry.js → p-button_3.cjs.entry.js} +108 -5
- package/dist/cjs/p-counter.cjs.entry.js +19 -0
- package/dist/cjs/p-divider.cjs.entry.js +19 -0
- package/dist/cjs/{p-button.cjs.entry.js → p-helper.cjs.entry.js} +6 -10
- package/dist/cjs/p-illustration.cjs.entry.js +9 -12
- package/dist/cjs/p-info-panel.cjs.entry.js +31 -0
- package/dist/cjs/p-navigation-item.cjs.entry.js +23 -0
- package/dist/cjs/p-pagination-item.cjs.entry.js +23 -0
- package/dist/cjs/p-pagination.cjs.entry.js +167 -0
- package/dist/cjs/p-tooltip.cjs.entry.js +62 -20
- package/dist/cjs/paperless.cjs.js +2 -2
- package/dist/collection/assets/images/avatar/company-default.svg +12 -0
- package/dist/collection/assets/images/avatar/user-default.svg +12 -0
- package/dist/collection/assets/images/helper/helper-hover.svg +15 -0
- package/dist/collection/assets/images/helper/helper.svg +15 -0
- package/dist/collection/collection-manifest.json +9 -1
- package/dist/collection/components/atoms/avatar/avatar.component.css +31 -0
- package/dist/collection/components/atoms/avatar/avatar.component.js +105 -0
- package/dist/collection/components/atoms/button/button.component.css +68 -3
- package/dist/collection/components/atoms/button/button.component.js +241 -7
- package/dist/collection/components/atoms/counter/counter.component.css +5 -0
- package/dist/collection/components/atoms/counter/counter.component.js +15 -0
- package/dist/collection/components/atoms/divider/divider.component.css +3 -0
- package/dist/collection/components/atoms/divider/divider.component.js +14 -0
- package/dist/collection/components/atoms/helper/helper.component.css +7 -0
- package/dist/collection/components/atoms/helper/helper.component.js +18 -0
- package/dist/collection/components/atoms/icon/icon.component.js +2 -7
- package/dist/collection/components/atoms/illustration/illustration.component.js +2 -9
- package/dist/collection/components/atoms/info-panel/info-panel.component.css +28 -0
- package/dist/collection/components/atoms/info-panel/info-panel.component.js +106 -0
- package/dist/collection/components/atoms/loader/loader.component.js +1 -1
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.css +16 -0
- package/dist/collection/components/atoms/pagination-item/pagination-item.component.js +41 -0
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +15 -12
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +122 -32
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.css +28 -0
- package/dist/collection/components/molecules/navigation-item/navigation-item.component.js +118 -0
- package/dist/collection/components/molecules/pagination/pagination.component.css +3 -0
- package/dist/collection/components/molecules/pagination/pagination.component.js +238 -0
- package/dist/collection/components/molecules/pagination/pagination.value-accessor.js +6 -0
- package/dist/collection/tailwind/border-radius.js +1 -0
- package/dist/collection/tailwind/grid.js +24 -4
- package/dist/collection/tailwind.config.js +1 -1
- package/dist/collection/value-accessors.config.js +5 -0
- package/dist/components/counter.component.js +30 -0
- package/dist/{esm/p-icon.entry.js → components/icon.component.js} +26 -11
- package/dist/components/index.d.ts +8 -0
- package/dist/components/index.js +8 -0
- package/dist/{esm/p-loader.entry.js → components/loader.component.js} +30 -9
- package/dist/components/p-avatar.d.ts +11 -0
- package/dist/components/p-avatar.js +52 -0
- package/dist/components/p-button.js +67 -8
- package/dist/components/p-counter.d.ts +11 -0
- package/dist/components/p-counter.js +6 -0
- package/dist/components/p-divider.d.ts +11 -0
- package/dist/components/p-divider.js +33 -0
- package/dist/components/p-helper.d.ts +11 -0
- package/dist/components/p-helper.js +39 -0
- package/dist/components/p-icon.js +1 -815
- package/dist/components/p-illustration.js +0 -4
- package/dist/components/p-info-panel.d.ts +11 -0
- package/dist/components/p-info-panel.js +56 -0
- package/dist/components/p-loader.js +1 -72
- package/dist/components/p-navigation-item.d.ts +11 -0
- package/dist/components/p-navigation-item.js +55 -0
- package/dist/components/p-pagination-item.d.ts +11 -0
- package/dist/components/p-pagination-item.js +6 -0
- package/dist/components/p-pagination.d.ts +11 -0
- package/dist/components/p-pagination.js +196 -0
- package/dist/components/p-tooltip.js +1 -1886
- package/dist/components/pagination-item.component.js +36 -0
- package/dist/components/tooltip.component.js +1932 -0
- package/dist/esm/{index-111a6307.js → index-a68e547b.js} +494 -10
- package/dist/esm/loader.js +2 -2
- package/dist/esm/p-avatar.entry.js +28 -0
- package/dist/esm/p-button_3.entry.js +899 -0
- package/dist/esm/p-counter.entry.js +15 -0
- package/dist/esm/p-divider.entry.js +15 -0
- package/dist/esm/{p-button.entry.js → p-helper.entry.js} +6 -10
- package/dist/esm/p-illustration.entry.js +9 -12
- package/dist/esm/p-info-panel.entry.js +27 -0
- package/dist/esm/p-navigation-item.entry.js +19 -0
- package/dist/esm/p-pagination-item.entry.js +19 -0
- package/dist/esm/p-pagination.entry.js +163 -0
- package/dist/esm/p-tooltip.entry.js +62 -20
- package/dist/esm/paperless.js +2 -2
- package/dist/index.html +1 -1
- package/dist/paperless/{p-1d13a9d2.entry.js → p-14ceb308.entry.js} +1 -1
- package/dist/paperless/p-17c11169.entry.js +1 -0
- package/dist/paperless/p-42dab9d4.entry.js +1 -0
- package/dist/paperless/p-47b52f92.entry.js +1 -0
- package/dist/paperless/p-5ec6ea71.entry.js +1 -0
- package/dist/paperless/p-76464e0b.js +2 -0
- package/dist/paperless/{p-feec8ec1.entry.js → p-8501ba07.entry.js} +1 -1
- package/dist/paperless/p-aae3d4f0.entry.js +1 -0
- package/dist/paperless/p-adcb0b93.entry.js +1 -0
- package/dist/paperless/p-bbec0e86.entry.js +1 -0
- package/dist/paperless/p-d23e4d57.entry.js +1 -0
- package/dist/paperless/p-f65d7bbf.entry.js +1 -0
- package/dist/paperless/paperless.css +96 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +248 -51
- package/dist/tailwind.config.js +1 -1
- package/dist/types/components/atoms/avatar/avatar.component.d.ts +21 -0
- package/dist/types/components/atoms/button/button.component.d.ts +45 -1
- package/dist/types/components/atoms/counter/counter.component.d.ts +3 -0
- package/dist/types/components/atoms/divider/divider.component.d.ts +3 -0
- package/dist/types/components/atoms/helper/helper.component.d.ts +3 -0
- package/dist/types/components/atoms/info-panel/info-panel.component.d.ts +24 -0
- package/dist/types/components/atoms/pagination-item/pagination-item.component.d.ts +7 -0
- package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +20 -8
- package/dist/types/components/molecules/navigation-item/navigation-item.component.d.ts +24 -0
- package/dist/types/components/molecules/pagination/pagination.component.d.ts +28 -0
- package/dist/types/components/molecules/pagination/pagination.value-accessor.d.ts +2 -0
- package/dist/types/components.d.ts +358 -16
- package/dist/types/value-accessors.config.d.ts +2 -0
- package/package.json +1 -1
- package/dist/build/p-208c1f28.entry.js +0 -1
- package/dist/build/p-98d07776.js +0 -2
- package/dist/build/p-bbd1d3df.entry.js +0 -1
- package/dist/build/p-cd525dcc.entry.js +0 -1
- package/dist/paperless/p-208c1f28.entry.js +0 -1
- package/dist/paperless/p-98d07776.js +0 -2
- package/dist/paperless/p-bbd1d3df.entry.js +0 -1
- package/dist/paperless/p-cd525dcc.entry.js +0 -1
|
@@ -1,18 +1,58 @@
|
|
|
1
|
-
import { Component, h, Host, Prop } from '@stencil/core';
|
|
1
|
+
import { Component, Event, h, Host, Listen, Prop } from '@stencil/core';
|
|
2
2
|
export class Button {
|
|
3
3
|
constructor() {
|
|
4
4
|
/**
|
|
5
5
|
* The variant of the button
|
|
6
6
|
*/
|
|
7
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';
|
|
8
24
|
}
|
|
9
25
|
render() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 });
|
|
13
54
|
}
|
|
14
55
|
static get is() { return "p-button"; }
|
|
15
|
-
static get encapsulation() { return "shadow"; }
|
|
16
56
|
static get originalStyleUrls() { return {
|
|
17
57
|
"$": ["button.component.scss"]
|
|
18
58
|
}; }
|
|
@@ -24,8 +64,8 @@ export class Button {
|
|
|
24
64
|
"type": "string",
|
|
25
65
|
"mutable": false,
|
|
26
66
|
"complexType": {
|
|
27
|
-
"original": "'primary' | 'secondary'",
|
|
28
|
-
"resolved": "\"primary\" | \"secondary\"",
|
|
67
|
+
"original": "'primary' | 'secondary' | 'text'",
|
|
68
|
+
"resolved": "\"primary\" | \"secondary\" | \"text\"",
|
|
29
69
|
"references": {}
|
|
30
70
|
},
|
|
31
71
|
"required": false,
|
|
@@ -37,6 +77,200 @@ export class Button {
|
|
|
37
77
|
"attribute": "variant",
|
|
38
78
|
"reflect": false,
|
|
39
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
|
|
40
247
|
}
|
|
41
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
|
+
}]; }
|
|
42
276
|
}
|
|
@@ -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,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,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
|
+
}
|
|
@@ -2,10 +2,6 @@ import { Component, h, Host, Prop } from '@stencil/core';
|
|
|
2
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
|
*/
|
|
@@ -40,15 +36,14 @@ export class Icon {
|
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
38
|
},
|
|
43
|
-
"required":
|
|
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",
|
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
import { Component, h, Host, Prop } from '@stencil/core';
|
|
2
2
|
import illustrations from '../../../utils/illustrations';
|
|
3
3
|
export class Illustration {
|
|
4
|
-
constructor() {
|
|
5
|
-
/**
|
|
6
|
-
* The icon the be displayed
|
|
7
|
-
*/
|
|
8
|
-
this.variant = null;
|
|
9
|
-
}
|
|
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 Illustration {
|
|
|
25
19
|
}
|
|
26
20
|
}
|
|
27
21
|
},
|
|
28
|
-
"required":
|
|
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
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { Component, Element, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
export class InfoPanel {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* The variant of the info panel
|
|
6
|
+
*/
|
|
7
|
+
this.variant = 'info';
|
|
8
|
+
/**
|
|
9
|
+
* Wether the panel can be closed
|
|
10
|
+
*/
|
|
11
|
+
this.closeable = false;
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (h(Host, { class: `p-info-panel variant-${this.variant} ${this.closeable && 'has-close'}` },
|
|
15
|
+
h("div", { class: "header" },
|
|
16
|
+
h("slot", { name: "header" })),
|
|
17
|
+
h("div", { class: "content" },
|
|
18
|
+
h("slot", { name: "content" })),
|
|
19
|
+
this.closeable && (h("div", { class: "close", onClick: () => this._close() },
|
|
20
|
+
h("p-icon", { variant: "negative" })))));
|
|
21
|
+
}
|
|
22
|
+
_close() {
|
|
23
|
+
this._el.remove();
|
|
24
|
+
}
|
|
25
|
+
static get is() { return "p-info-panel"; }
|
|
26
|
+
static get encapsulation() { return "shadow"; }
|
|
27
|
+
static get originalStyleUrls() { return {
|
|
28
|
+
"$": ["info-panel.component.scss"]
|
|
29
|
+
}; }
|
|
30
|
+
static get styleUrls() { return {
|
|
31
|
+
"$": ["info-panel.component.css"]
|
|
32
|
+
}; }
|
|
33
|
+
static get properties() { return {
|
|
34
|
+
"variant": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"mutable": false,
|
|
37
|
+
"complexType": {
|
|
38
|
+
"original": "'info' | 'negative' | 'positive' | 'unbiased'",
|
|
39
|
+
"resolved": "\"info\" | \"negative\" | \"positive\" | \"unbiased\"",
|
|
40
|
+
"references": {}
|
|
41
|
+
},
|
|
42
|
+
"required": false,
|
|
43
|
+
"optional": false,
|
|
44
|
+
"docs": {
|
|
45
|
+
"tags": [],
|
|
46
|
+
"text": "The variant of the info panel"
|
|
47
|
+
},
|
|
48
|
+
"attribute": "variant",
|
|
49
|
+
"reflect": false,
|
|
50
|
+
"defaultValue": "'info'"
|
|
51
|
+
},
|
|
52
|
+
"header": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"mutable": false,
|
|
55
|
+
"complexType": {
|
|
56
|
+
"original": "string",
|
|
57
|
+
"resolved": "string",
|
|
58
|
+
"references": {}
|
|
59
|
+
},
|
|
60
|
+
"required": false,
|
|
61
|
+
"optional": false,
|
|
62
|
+
"docs": {
|
|
63
|
+
"tags": [],
|
|
64
|
+
"text": "The header of the info panel"
|
|
65
|
+
},
|
|
66
|
+
"attribute": "header",
|
|
67
|
+
"reflect": false
|
|
68
|
+
},
|
|
69
|
+
"content": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"mutable": false,
|
|
72
|
+
"complexType": {
|
|
73
|
+
"original": "string",
|
|
74
|
+
"resolved": "string",
|
|
75
|
+
"references": {}
|
|
76
|
+
},
|
|
77
|
+
"required": false,
|
|
78
|
+
"optional": false,
|
|
79
|
+
"docs": {
|
|
80
|
+
"tags": [],
|
|
81
|
+
"text": "The content of the info panel"
|
|
82
|
+
},
|
|
83
|
+
"attribute": "content",
|
|
84
|
+
"reflect": false
|
|
85
|
+
},
|
|
86
|
+
"closeable": {
|
|
87
|
+
"type": "boolean",
|
|
88
|
+
"mutable": false,
|
|
89
|
+
"complexType": {
|
|
90
|
+
"original": "boolean",
|
|
91
|
+
"resolved": "boolean",
|
|
92
|
+
"references": {}
|
|
93
|
+
},
|
|
94
|
+
"required": false,
|
|
95
|
+
"optional": false,
|
|
96
|
+
"docs": {
|
|
97
|
+
"tags": [],
|
|
98
|
+
"text": "Wether the panel can be closed"
|
|
99
|
+
},
|
|
100
|
+
"attribute": "closeable",
|
|
101
|
+
"reflect": false,
|
|
102
|
+
"defaultValue": "false"
|
|
103
|
+
}
|
|
104
|
+
}; }
|
|
105
|
+
static get elementRef() { return "_el"; }
|
|
106
|
+
}
|
|
@@ -33,7 +33,7 @@ export class Loader {
|
|
|
33
33
|
h("slot", null),
|
|
34
34
|
h("div", { class: "loader-wrapper" }, this._loader)))));
|
|
35
35
|
}
|
|
36
|
-
return h(Host, { class: `p-loader ${this.variant === 'full-width' && 'w-100 d-block flex justify-center text-4xl'}` }, this._loader);
|
|
36
|
+
return h(Host, { class: `p-loader flex ${this.variant === 'full-width' && 'w-100 d-block flex justify-center text-4xl'}` }, this._loader);
|
|
37
37
|
}
|
|
38
38
|
_checkShow() {
|
|
39
39
|
var _a;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
@apply h-8 w-8;
|
|
3
|
+
@apply flex justify-center items-center;
|
|
4
|
+
@apply font-semibold text-storm-medium text-sm;
|
|
5
|
+
@apply rounded;
|
|
6
|
+
@apply cursor-pointer;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:host(:hover),
|
|
10
|
+
:host(:focus) {
|
|
11
|
+
@apply text-storm;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host(.active) {
|
|
15
|
+
@apply text-indigo bg-indigo-light;
|
|
16
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Component, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
export class PaginationItem {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Wether the pagination item is active
|
|
6
|
+
*/
|
|
7
|
+
this.active = false;
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, { class: `p-pagination-item ${this.active && 'active'}` },
|
|
11
|
+
h("slot", null)));
|
|
12
|
+
}
|
|
13
|
+
static get is() { return "p-pagination-item"; }
|
|
14
|
+
static get encapsulation() { return "shadow"; }
|
|
15
|
+
static get originalStyleUrls() { return {
|
|
16
|
+
"$": ["pagination-item.component.scss"]
|
|
17
|
+
}; }
|
|
18
|
+
static get styleUrls() { return {
|
|
19
|
+
"$": ["pagination-item.component.css"]
|
|
20
|
+
}; }
|
|
21
|
+
static get properties() { return {
|
|
22
|
+
"active": {
|
|
23
|
+
"type": "boolean",
|
|
24
|
+
"mutable": false,
|
|
25
|
+
"complexType": {
|
|
26
|
+
"original": "boolean",
|
|
27
|
+
"resolved": "boolean",
|
|
28
|
+
"references": {}
|
|
29
|
+
},
|
|
30
|
+
"required": false,
|
|
31
|
+
"optional": false,
|
|
32
|
+
"docs": {
|
|
33
|
+
"tags": [],
|
|
34
|
+
"text": "Wether the pagination item is active"
|
|
35
|
+
},
|
|
36
|
+
"attribute": "active",
|
|
37
|
+
"reflect": false,
|
|
38
|
+
"defaultValue": "false"
|
|
39
|
+
}
|
|
40
|
+
}; }
|
|
41
|
+
}
|
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
:host {
|
|
2
|
-
@apply cursor-pointer;
|
|
2
|
+
@apply cursor-pointer inline-block;
|
|
3
3
|
}
|
|
4
|
-
:host .
|
|
5
|
-
@apply bg-
|
|
4
|
+
:host .popover {
|
|
5
|
+
@apply bg-white hidden text-xs font-medium py-2 px-3 rounded drop-shadow-4;
|
|
6
6
|
max-width: 14.5rem;
|
|
7
7
|
}
|
|
8
|
-
:host .
|
|
8
|
+
:host .popover.variant-hover {
|
|
9
|
+
@apply bg-storm text-white py-1;
|
|
10
|
+
}
|
|
11
|
+
:host .popover[data-show] {
|
|
9
12
|
@apply block;
|
|
10
13
|
}
|
|
11
|
-
:host .
|
|
12
|
-
:host .
|
|
14
|
+
:host .popover .arrow,
|
|
15
|
+
:host .popover .arrow::before {
|
|
13
16
|
background: inherit;
|
|
14
17
|
@apply absolute w-2 h-2;
|
|
15
18
|
}
|
|
16
|
-
:host .
|
|
19
|
+
:host .popover .arrow {
|
|
17
20
|
visibility: hidden;
|
|
18
21
|
}
|
|
19
|
-
:host .
|
|
22
|
+
:host .popover .arrow::before {
|
|
20
23
|
@apply visible transform rotate-45;
|
|
21
24
|
content: "";
|
|
22
25
|
}
|
|
23
|
-
:host .
|
|
26
|
+
:host .popover[data-popper-placement^=top] > .arrow {
|
|
24
27
|
@apply -bottom-1;
|
|
25
28
|
}
|
|
26
|
-
:host .
|
|
29
|
+
:host .popover[data-popper-placement^=bottom] > .arrow {
|
|
27
30
|
@apply -top-1;
|
|
28
31
|
}
|
|
29
|
-
:host .
|
|
32
|
+
:host .popover[data-popper-placement^=left] > .arrow {
|
|
30
33
|
@apply -right-1;
|
|
31
34
|
}
|
|
32
|
-
:host .
|
|
35
|
+
:host .popover[data-popper-placement^=right] > .arrow {
|
|
33
36
|
@apply -left-1;
|
|
34
37
|
}
|