@paperless/core 0.1.0-alpha.3 → 0.1.0-alpha.30
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 +273 -0
- package/README.md +18 -1
- package/dist/assets/icons/checklist.svg +17 -0
- package/dist/assets/icons/folder.svg +19 -0
- package/dist/assets/icons/integration.svg +17 -0
- package/dist/assets/icons/task.svg +17 -0
- package/dist/assets/icons/template.svg +17 -0
- 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-17c11169.entry.js +1 -0
- package/dist/build/p-1d8fa6a1.entry.js +1 -0
- package/dist/build/p-41e5458b.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-75f909ab.entry.js +1 -0
- package/dist/build/p-76464e0b.js +2 -0
- package/dist/build/{p-f04c4de0.entry.js → p-8501ba07.entry.js} +1 -1
- package/dist/build/p-a669807e.entry.js +1 -0
- package/dist/build/p-a7086ffa.js +1 -0
- package/dist/build/p-aa28fef8.entry.js +1 -0
- 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-d7c82962.entry.js +1 -0
- package/dist/build/p-e7019eab.entry.js +1 -0
- package/dist/build/p-f689996b.entry.js +1 -0
- package/dist/build/p-faa4ee42.entry.js +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{index-a2da05ae.js → index-a46a39a5.js} +88 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/p-avatar.cjs.entry.js +32 -0
- package/dist/cjs/p-button_3.cjs.entry.js +106 -12
- package/dist/cjs/p-counter.cjs.entry.js +19 -0
- package/dist/cjs/p-divider.cjs.entry.js +19 -0
- package/dist/cjs/p-dropdown-menu-container.cjs.entry.js +19 -0
- package/dist/cjs/p-dropdown-menu-item.cjs.entry.js +23 -0
- package/dist/cjs/p-dropdown.cjs.entry.js +131 -0
- package/dist/cjs/p-helper.cjs.entry.js +19 -0
- 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 +171 -0
- package/dist/cjs/p-segment-container.cjs.entry.js +19 -0
- package/dist/cjs/p-segment-item.cjs.entry.js +29 -0
- package/dist/cjs/p-status.cjs.entry.js +49 -0
- package/dist/cjs/p-tooltip.cjs.entry.js +75 -1811
- package/dist/cjs/paperless.cjs.js +2 -2
- package/dist/cjs/popper-e0c4ed4c.js +1790 -0
- package/dist/collection/assets/icons/checklist.svg +17 -0
- package/dist/collection/assets/icons/folder.svg +19 -0
- package/dist/collection/assets/icons/integration.svg +17 -0
- package/dist/collection/assets/icons/task.svg +17 -0
- package/dist/collection/assets/icons/template.svg +17 -0
- 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 +15 -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 +24 -0
- package/dist/collection/components/atoms/button/button.component.js +5 -5
- 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/dropdown-menu-container/dropdown-menu-container.component.css +5 -0
- package/dist/collection/components/atoms/dropdown-menu-container/dropdown-menu-container.component.js +14 -0
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.css +13 -0
- package/dist/collection/components/atoms/dropdown-menu-item/dropdown-menu-item.component.js +41 -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 +3 -8
- 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.css +1 -1
- package/dist/collection/components/atoms/loader/loader.component.js +4 -3
- 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/segment-container/segment-container.component.css +5 -0
- package/dist/collection/components/atoms/segment-container/segment-container.component.js +14 -0
- package/dist/collection/components/atoms/segment-item/segment-item.component.css +21 -0
- package/dist/collection/components/atoms/segment-item/segment-item.component.js +107 -0
- package/dist/collection/components/atoms/status/status.component.css +16 -0
- package/dist/collection/components/atoms/status/status.component.js +128 -0
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +18 -12
- package/dist/collection/components/atoms/tooltip/tooltip.component.js +133 -35
- package/dist/collection/components/molecules/dropdown/dropdown.component.css +9 -0
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +223 -0
- 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 +242 -0
- package/dist/collection/tailwind/border-radius.js +8 -6
- package/dist/collection/tailwind/grid.js +24 -4
- package/dist/collection/tailwind.config.js +1 -1
- package/dist/collection/utils/child-of.js +5 -0
- package/dist/collection/utils/icons.js +10 -0
- package/dist/components/counter.component.js +30 -0
- package/dist/components/dropdown-menu-container.component.js +29 -0
- package/dist/components/icon.component.js +97 -4
- package/dist/components/index.d.ts +14 -0
- package/dist/components/index.js +14 -0
- package/dist/components/loader.component.js +5 -4
- package/dist/components/p-avatar.d.ts +11 -0
- package/dist/components/p-avatar.js +52 -0
- package/dist/components/p-button.js +3 -3
- 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-dropdown-menu-container.d.ts +11 -0
- package/dist/components/p-dropdown-menu-container.js +6 -0
- package/dist/components/p-dropdown-menu-item.d.ts +11 -0
- package/dist/components/p-dropdown-menu-item.js +39 -0
- package/dist/components/p-dropdown.d.ts +11 -0
- package/dist/components/p-dropdown.js +156 -0
- package/dist/components/p-helper.d.ts +11 -0
- package/dist/components/p-helper.js +39 -0
- 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-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 +200 -0
- package/dist/components/p-segment-container.d.ts +11 -0
- package/dist/components/p-segment-container.js +32 -0
- package/dist/components/p-segment-item.d.ts +11 -0
- package/dist/components/p-segment-item.js +54 -0
- package/dist/components/p-status.d.ts +11 -0
- package/dist/components/p-status.js +73 -0
- package/dist/components/p-tooltip.js +1 -1886
- package/dist/components/pagination-item.component.js +36 -0
- package/dist/components/popper.js +1788 -0
- package/dist/components/tooltip.component.js +154 -0
- package/dist/esm/{index-d08bfe75.js → index-a68e547b.js} +88 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/p-avatar.entry.js +28 -0
- package/dist/esm/p-button_3.entry.js +106 -12
- package/dist/esm/p-counter.entry.js +15 -0
- package/dist/esm/p-divider.entry.js +15 -0
- package/dist/esm/p-dropdown-menu-container.entry.js +15 -0
- package/dist/esm/p-dropdown-menu-item.entry.js +19 -0
- package/dist/esm/p-dropdown.entry.js +127 -0
- package/dist/esm/p-helper.entry.js +15 -0
- 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 +167 -0
- package/dist/esm/p-segment-container.entry.js +15 -0
- package/dist/esm/p-segment-item.entry.js +25 -0
- package/dist/esm/p-status.entry.js +45 -0
- package/dist/esm/p-tooltip.entry.js +75 -1811
- package/dist/esm/paperless.js +2 -2
- package/dist/esm/popper-41c6f9cd.js +1788 -0
- package/dist/index.html +1 -1
- package/dist/paperless/p-17c11169.entry.js +1 -0
- package/dist/paperless/p-1d8fa6a1.entry.js +1 -0
- package/dist/paperless/p-41e5458b.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-75f909ab.entry.js +1 -0
- package/dist/paperless/p-76464e0b.js +2 -0
- package/dist/paperless/{p-f04c4de0.entry.js → p-8501ba07.entry.js} +1 -1
- package/dist/paperless/p-a669807e.entry.js +1 -0
- package/dist/paperless/p-a7086ffa.js +1 -0
- package/dist/paperless/p-aa28fef8.entry.js +1 -0
- 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-d7c82962.entry.js +1 -0
- package/dist/paperless/p-e7019eab.entry.js +1 -0
- package/dist/paperless/p-f689996b.entry.js +1 -0
- package/dist/paperless/p-faa4ee42.entry.js +1 -0
- package/dist/paperless/paperless.css +136 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +421 -37
- 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 +2 -2
- 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/dropdown-menu-container/dropdown-menu-container.component.d.ts +3 -0
- package/dist/types/components/atoms/dropdown-menu-item/dropdown-menu-item.component.d.ts +7 -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/segment-container/segment-container.component.d.ts +3 -0
- package/dist/types/components/atoms/segment-item/segment-item.component.d.ts +21 -0
- package/dist/types/components/atoms/status/status.component.d.ts +22 -0
- package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +20 -8
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +41 -0
- 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.d.ts +467 -16
- package/dist/types/utils/child-of.d.ts +1 -0
- package/dist/types/utils/icons.d.ts +5 -0
- package/package.json +1 -1
- package/dist/build/p-4144f8a0.entry.js +0 -1
- package/dist/build/p-8538576c.entry.js +0 -1
- package/dist/build/p-f33e1285.js +0 -2
- package/dist/paperless/p-4144f8a0.entry.js +0 -1
- package/dist/paperless/p-8538576c.entry.js +0 -1
- package/dist/paperless/p-f33e1285.js +0 -2
|
@@ -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
|
+
}
|
|
@@ -27,13 +27,14 @@ export class Loader {
|
|
|
27
27
|
return;
|
|
28
28
|
}
|
|
29
29
|
if (this.variant === 'full-screen') {
|
|
30
|
-
return (h(Host, { class: "p-loader" },
|
|
30
|
+
return (h(Host, { class: "p-loader variant-full-screen" },
|
|
31
31
|
h("div", { class: "loading-screen" },
|
|
32
32
|
h("div", { class: "content" },
|
|
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' &&
|
|
36
|
+
return (h(Host, { class: `p-loader flex ${this.variant === 'full-width' &&
|
|
37
|
+
'w-full flex justify-center text-4xl'}` }, this._loader));
|
|
37
38
|
}
|
|
38
39
|
_checkShow() {
|
|
39
40
|
var _a;
|
|
@@ -42,7 +43,7 @@ export class Loader {
|
|
|
42
43
|
this._showSubscriber = null;
|
|
43
44
|
}
|
|
44
45
|
if (typeof this.show !== 'boolean') {
|
|
45
|
-
this._showSubscriber = (_a = this.show) === null || _a === void 0 ? void 0 : _a.subscribe(show => (this._show = show));
|
|
46
|
+
this._showSubscriber = (_a = this.show) === null || _a === void 0 ? void 0 : _a.subscribe((show) => (this._show = show));
|
|
46
47
|
return;
|
|
47
48
|
}
|
|
48
49
|
this._show = this.show;
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Component, h, Host } from '@stencil/core';
|
|
2
|
+
export class SegmentContainer {
|
|
3
|
+
render() {
|
|
4
|
+
return (h(Host, { class: "p-segment-container" },
|
|
5
|
+
h("slot", null)));
|
|
6
|
+
}
|
|
7
|
+
static get is() { return "p-segment-container"; }
|
|
8
|
+
static get originalStyleUrls() { return {
|
|
9
|
+
"$": ["segment-container.component.scss"]
|
|
10
|
+
}; }
|
|
11
|
+
static get styleUrls() { return {
|
|
12
|
+
"$": ["segment-container.component.css"]
|
|
13
|
+
}; }
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
@apply h-6 flex items-center px-2 rounded font-medium mr-1;
|
|
3
|
+
@apply text-storm-light text-sm;
|
|
4
|
+
@apply cursor-pointer;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:host(.variant-icon) {
|
|
8
|
+
@apply w-6 justify-center px-0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
:host(:hover) {
|
|
12
|
+
@apply text-storm-medium;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:host(.active) {
|
|
16
|
+
@apply text-indigo bg-indigo-light;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:host(:last-child) {
|
|
20
|
+
@apply mr-0;
|
|
21
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { Component, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
export class SegmentItem {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Wether the segment item is active
|
|
6
|
+
*/
|
|
7
|
+
this.active = false;
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, { class: `p-segment-item variant-${this.icon ? 'icon' : 'default'} ${this.active && 'active'}` }, this.icon ? this._getIcon() : h("slot", null)));
|
|
11
|
+
}
|
|
12
|
+
_getIcon() {
|
|
13
|
+
if (!this.icon) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
return (h("p-icon", { variant: this.icon, flip: this.iconFlip, rotate: this.iconRotate }));
|
|
17
|
+
}
|
|
18
|
+
static get is() { return "p-segment-item"; }
|
|
19
|
+
static get encapsulation() { return "shadow"; }
|
|
20
|
+
static get originalStyleUrls() { return {
|
|
21
|
+
"$": ["segment-item.component.scss"]
|
|
22
|
+
}; }
|
|
23
|
+
static get styleUrls() { return {
|
|
24
|
+
"$": ["segment-item.component.css"]
|
|
25
|
+
}; }
|
|
26
|
+
static get properties() { return {
|
|
27
|
+
"active": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"mutable": false,
|
|
30
|
+
"complexType": {
|
|
31
|
+
"original": "boolean",
|
|
32
|
+
"resolved": "boolean",
|
|
33
|
+
"references": {}
|
|
34
|
+
},
|
|
35
|
+
"required": false,
|
|
36
|
+
"optional": false,
|
|
37
|
+
"docs": {
|
|
38
|
+
"tags": [],
|
|
39
|
+
"text": "Wether the segment item is active"
|
|
40
|
+
},
|
|
41
|
+
"attribute": "active",
|
|
42
|
+
"reflect": false,
|
|
43
|
+
"defaultValue": "false"
|
|
44
|
+
},
|
|
45
|
+
"icon": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "IconVariant",
|
|
50
|
+
"resolved": "\"arrow\" | \"attachment\" | \"bread\" | \"calendar\" | \"car\" | \"checklist\" | \"checkmark\" | \"chevron\" | \"clock\" | \"cogs\" | \"comment\" | \"document\" | \"download\" | \"envelope\" | \"explanation\" | \"eye\" | \"filter\" | \"folder\" | \"grid\" | \"headset\" | \"integration\" | \"list\" | \"location\" | \"megaphone\" | \"minus\" | \"negative\" | \"pagination\" | \"payment\" | \"pencil\" | \"person\" | \"plus\" | \"question\" | \"receipt\" | \"report\" | \"search\" | \"settings\" | \"sick\" | \"tachometer\" | \"task\" | \"template\" | \"tool\" | \"trash\" | \"turn\" | \"upload\" | \"warning\"",
|
|
51
|
+
"references": {
|
|
52
|
+
"IconVariant": {
|
|
53
|
+
"location": "import",
|
|
54
|
+
"path": "../icon/icon.component"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
"required": false,
|
|
59
|
+
"optional": false,
|
|
60
|
+
"docs": {
|
|
61
|
+
"tags": [],
|
|
62
|
+
"text": "Icon to show on the segment item"
|
|
63
|
+
},
|
|
64
|
+
"attribute": "icon",
|
|
65
|
+
"reflect": false
|
|
66
|
+
},
|
|
67
|
+
"iconFlip": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"mutable": false,
|
|
70
|
+
"complexType": {
|
|
71
|
+
"original": "IconFlipOptions",
|
|
72
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
73
|
+
"references": {
|
|
74
|
+
"IconFlipOptions": {
|
|
75
|
+
"location": "import",
|
|
76
|
+
"path": "../icon/icon.component"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": false,
|
|
81
|
+
"optional": false,
|
|
82
|
+
"docs": {
|
|
83
|
+
"tags": [],
|
|
84
|
+
"text": "Icon flip"
|
|
85
|
+
},
|
|
86
|
+
"attribute": "icon-flip",
|
|
87
|
+
"reflect": false
|
|
88
|
+
},
|
|
89
|
+
"iconRotate": {
|
|
90
|
+
"type": "number",
|
|
91
|
+
"mutable": false,
|
|
92
|
+
"complexType": {
|
|
93
|
+
"original": "number",
|
|
94
|
+
"resolved": "number",
|
|
95
|
+
"references": {}
|
|
96
|
+
},
|
|
97
|
+
"required": false,
|
|
98
|
+
"optional": false,
|
|
99
|
+
"docs": {
|
|
100
|
+
"tags": [],
|
|
101
|
+
"text": "Icon rotate"
|
|
102
|
+
},
|
|
103
|
+
"attribute": "icon-rotate",
|
|
104
|
+
"reflect": false
|
|
105
|
+
}
|
|
106
|
+
}; }
|
|
107
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
p-status {
|
|
2
|
+
@apply flex items-center;
|
|
3
|
+
@apply text-sm text-storm-vague font-medium;
|
|
4
|
+
}
|
|
5
|
+
p-status p-icon {
|
|
6
|
+
@apply mr-2 text-base;
|
|
7
|
+
}
|
|
8
|
+
p-status.variant-positive {
|
|
9
|
+
@apply text-positive;
|
|
10
|
+
}
|
|
11
|
+
p-status.variant-unbiased {
|
|
12
|
+
@apply text-unbiased;
|
|
13
|
+
}
|
|
14
|
+
p-status.variant-negative {
|
|
15
|
+
@apply text-negative;
|
|
16
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { Component, h, Host, Prop } from '@stencil/core';
|
|
2
|
+
export class Status {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* The variant of the status
|
|
6
|
+
*/
|
|
7
|
+
this.variant = 'default';
|
|
8
|
+
}
|
|
9
|
+
render() {
|
|
10
|
+
return (h(Host, { class: `p-status variant-${this.variant}
|
|
11
|
+
}` },
|
|
12
|
+
this._getIcon(),
|
|
13
|
+
h("slot", null)));
|
|
14
|
+
}
|
|
15
|
+
_getIcon() {
|
|
16
|
+
const icon = this.icon || this._getVariantIcon();
|
|
17
|
+
if (!icon) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
return (h("p-icon", { variant: icon, flip: this.iconFlip, rotate: this.iconRotate }));
|
|
21
|
+
}
|
|
22
|
+
_getVariantIcon() {
|
|
23
|
+
let icon = null;
|
|
24
|
+
switch (this.variant) {
|
|
25
|
+
case 'positive':
|
|
26
|
+
icon = 'checkmark';
|
|
27
|
+
break;
|
|
28
|
+
case 'negative':
|
|
29
|
+
icon = 'negative';
|
|
30
|
+
break;
|
|
31
|
+
case 'unbiased':
|
|
32
|
+
icon = 'clock';
|
|
33
|
+
break;
|
|
34
|
+
default:
|
|
35
|
+
icon = null;
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
return icon;
|
|
39
|
+
}
|
|
40
|
+
static get is() { return "p-status"; }
|
|
41
|
+
static get originalStyleUrls() { return {
|
|
42
|
+
"$": ["status.component.scss"]
|
|
43
|
+
}; }
|
|
44
|
+
static get styleUrls() { return {
|
|
45
|
+
"$": ["status.component.css"]
|
|
46
|
+
}; }
|
|
47
|
+
static get properties() { return {
|
|
48
|
+
"variant": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"mutable": false,
|
|
51
|
+
"complexType": {
|
|
52
|
+
"original": "'default' | 'positive' | 'unbiased' | 'negative'",
|
|
53
|
+
"resolved": "\"default\" | \"negative\" | \"positive\" | \"unbiased\"",
|
|
54
|
+
"references": {}
|
|
55
|
+
},
|
|
56
|
+
"required": false,
|
|
57
|
+
"optional": false,
|
|
58
|
+
"docs": {
|
|
59
|
+
"tags": [],
|
|
60
|
+
"text": "The variant of the status"
|
|
61
|
+
},
|
|
62
|
+
"attribute": "variant",
|
|
63
|
+
"reflect": false,
|
|
64
|
+
"defaultValue": "'default'"
|
|
65
|
+
},
|
|
66
|
+
"icon": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"mutable": false,
|
|
69
|
+
"complexType": {
|
|
70
|
+
"original": "IconVariant",
|
|
71
|
+
"resolved": "\"arrow\" | \"attachment\" | \"bread\" | \"calendar\" | \"car\" | \"checklist\" | \"checkmark\" | \"chevron\" | \"clock\" | \"cogs\" | \"comment\" | \"document\" | \"download\" | \"envelope\" | \"explanation\" | \"eye\" | \"filter\" | \"folder\" | \"grid\" | \"headset\" | \"integration\" | \"list\" | \"location\" | \"megaphone\" | \"minus\" | \"negative\" | \"pagination\" | \"payment\" | \"pencil\" | \"person\" | \"plus\" | \"question\" | \"receipt\" | \"report\" | \"search\" | \"settings\" | \"sick\" | \"tachometer\" | \"task\" | \"template\" | \"tool\" | \"trash\" | \"turn\" | \"upload\" | \"warning\"",
|
|
72
|
+
"references": {
|
|
73
|
+
"IconVariant": {
|
|
74
|
+
"location": "import",
|
|
75
|
+
"path": "../icon/icon.component"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"required": false,
|
|
80
|
+
"optional": false,
|
|
81
|
+
"docs": {
|
|
82
|
+
"tags": [],
|
|
83
|
+
"text": "Icon to show on the status"
|
|
84
|
+
},
|
|
85
|
+
"attribute": "icon",
|
|
86
|
+
"reflect": false
|
|
87
|
+
},
|
|
88
|
+
"iconFlip": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"mutable": false,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "IconFlipOptions",
|
|
93
|
+
"resolved": "\"horizontal\" | \"vertical\"",
|
|
94
|
+
"references": {
|
|
95
|
+
"IconFlipOptions": {
|
|
96
|
+
"location": "import",
|
|
97
|
+
"path": "../icon/icon.component"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": false,
|
|
102
|
+
"optional": false,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": "Icon flip"
|
|
106
|
+
},
|
|
107
|
+
"attribute": "icon-flip",
|
|
108
|
+
"reflect": false
|
|
109
|
+
},
|
|
110
|
+
"iconRotate": {
|
|
111
|
+
"type": "number",
|
|
112
|
+
"mutable": false,
|
|
113
|
+
"complexType": {
|
|
114
|
+
"original": "number",
|
|
115
|
+
"resolved": "number",
|
|
116
|
+
"references": {}
|
|
117
|
+
},
|
|
118
|
+
"required": false,
|
|
119
|
+
"optional": false,
|
|
120
|
+
"docs": {
|
|
121
|
+
"tags": [],
|
|
122
|
+
"text": "Icon rotate"
|
|
123
|
+
},
|
|
124
|
+
"attribute": "icon-rotate",
|
|
125
|
+
"reflect": false
|
|
126
|
+
}
|
|
127
|
+
}; }
|
|
128
|
+
}
|
|
@@ -1,34 +1,40 @@
|
|
|
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, :host .popover.variant-error {
|
|
9
|
+
@apply bg-storm text-white py-1;
|
|
10
|
+
}
|
|
11
|
+
:host .popover.variant-error {
|
|
12
|
+
@apply bg-negative;
|
|
13
|
+
}
|
|
14
|
+
:host .popover[data-show] {
|
|
9
15
|
@apply block;
|
|
10
16
|
}
|
|
11
|
-
:host .
|
|
12
|
-
:host .
|
|
17
|
+
:host .popover .arrow,
|
|
18
|
+
:host .popover .arrow::before {
|
|
13
19
|
background: inherit;
|
|
14
20
|
@apply absolute w-2 h-2;
|
|
15
21
|
}
|
|
16
|
-
:host .
|
|
22
|
+
:host .popover .arrow {
|
|
17
23
|
visibility: hidden;
|
|
18
24
|
}
|
|
19
|
-
:host .
|
|
25
|
+
:host .popover .arrow::before {
|
|
20
26
|
@apply visible transform rotate-45;
|
|
21
27
|
content: "";
|
|
22
28
|
}
|
|
23
|
-
:host .
|
|
29
|
+
:host .popover[data-popper-placement^=top] > .arrow {
|
|
24
30
|
@apply -bottom-1;
|
|
25
31
|
}
|
|
26
|
-
:host .
|
|
32
|
+
:host .popover[data-popper-placement^=bottom] > .arrow {
|
|
27
33
|
@apply -top-1;
|
|
28
34
|
}
|
|
29
|
-
:host .
|
|
35
|
+
:host .popover[data-popper-placement^=left] > .arrow {
|
|
30
36
|
@apply -right-1;
|
|
31
37
|
}
|
|
32
|
-
:host .
|
|
38
|
+
:host .popover[data-popper-placement^=right] > .arrow {
|
|
33
39
|
@apply -left-1;
|
|
34
40
|
}
|