@paperless/core 0.1.0-alpha.4 → 0.1.0-alpha.41
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 +362 -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-02d2b531.entry.js +1 -0
- package/dist/build/p-18572fe6.entry.js +1 -0
- package/dist/build/p-1d45ef92.entry.js +1 -0
- package/dist/build/p-20a59914.entry.js +1 -0
- package/dist/build/p-24c63fe7.entry.js +1 -0
- package/dist/build/p-3ecf3173.entry.js +1 -0
- package/dist/build/p-647910e6.entry.js +1 -0
- package/dist/build/p-69b38836.entry.js +1 -0
- package/dist/build/p-741ec1a6.entry.js +1 -0
- package/dist/build/p-76464e0b.js +2 -0
- package/dist/build/{p-f04c4de0.entry.js → p-90cb9ba3.entry.js} +1 -1
- package/dist/build/p-96f7f4ed.entry.js +1 -0
- package/dist/build/p-9d254d19.entry.js +1 -0
- package/dist/build/p-a7086ffa.js +1 -0
- package/dist/build/p-aab433ae.entry.js +1 -0
- package/dist/build/p-ac0798de.entry.js +1 -0
- package/dist/build/p-ae7fb5ac.entry.js +1 -0
- package/dist/build/p-d03853e1.entry.js +1 -0
- package/dist/build/p-d5ae88e6.entry.js +1 -0
- package/dist/build/p-d5d2f377.entry.js +1 -0
- package/dist/build/p-e32286ce.entry.js +1 -0
- package/dist/build/p-fb05d32c.entry.js +1 -0
- package/dist/build/paperless.css +29 -18
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{index-a2da05ae.js → index-a46a39a5.js} +178 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/p-avatar.cjs.entry.js +35 -0
- package/dist/cjs/p-button_3.cjs.entry.js +164 -19
- package/dist/cjs/p-card-body.cjs.entry.js +23 -0
- package/dist/cjs/p-card-container.cjs.entry.js +23 -0
- package/dist/cjs/p-card-header.cjs.entry.js +24 -0
- 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 +141 -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 +18 -1
- package/dist/collection/components/atoms/avatar/avatar.component.css +31 -0
- package/dist/collection/components/atoms/avatar/avatar.component.js +108 -0
- package/dist/collection/components/atoms/button/button.component.css +23 -1
- package/dist/collection/components/atoms/button/button.component.js +90 -14
- package/dist/collection/components/atoms/card-body/card-body.component.css +9 -0
- package/dist/collection/components/atoms/card-body/card-body.component.js +40 -0
- package/dist/collection/components/atoms/card-container/card-container.component.css +13 -0
- package/dist/collection/components/atoms/card-container/card-container.component.js +41 -0
- package/dist/collection/components/atoms/card-header/card-header.component.css +17 -0
- package/dist/collection/components/atoms/card-header/card-header.component.js +60 -0
- 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 +1 -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.css +1 -0
- package/dist/collection/components/atoms/icon/icon.component.js +63 -20
- 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 +2 -2
- 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 +112 -0
- package/dist/collection/components/atoms/status/status.component.css +16 -0
- package/dist/collection/components/atoms/status/status.component.js +133 -0
- package/dist/collection/components/atoms/tooltip/tooltip.component.css +19 -13
- 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 +233 -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/typography.js +21 -0
- package/dist/collection/tailwind.config.js +15 -13
- package/dist/collection/utils/child-of.js +5 -0
- package/dist/collection/utils/icons.js +10 -0
- package/dist/collection/utils/types.js +1 -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 +137 -9
- package/dist/components/index.d.ts +17 -0
- package/dist/components/index.js +17 -0
- package/dist/components/loader.component.js +5 -4
- package/dist/components/p-avatar.d.ts +11 -0
- package/dist/components/p-avatar.js +55 -0
- package/dist/components/p-button.js +25 -6
- package/dist/components/p-card-body.d.ts +11 -0
- package/dist/components/p-card-body.js +38 -0
- package/dist/components/p-card-container.d.ts +11 -0
- package/dist/components/p-card-container.js +39 -0
- package/dist/components/p-card-header.d.ts +11 -0
- package/dist/components/p-card-header.js +46 -0
- 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 +166 -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} +178 -3
- package/dist/esm/loader.js +2 -2
- package/dist/esm/p-avatar.entry.js +31 -0
- package/dist/esm/p-button_3.entry.js +164 -19
- package/dist/esm/p-card-body.entry.js +19 -0
- package/dist/esm/p-card-container.entry.js +19 -0
- package/dist/esm/p-card-header.entry.js +20 -0
- 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 +137 -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-02d2b531.entry.js +1 -0
- package/dist/paperless/p-18572fe6.entry.js +1 -0
- package/dist/paperless/p-1d45ef92.entry.js +1 -0
- package/dist/paperless/p-20a59914.entry.js +1 -0
- package/dist/paperless/p-24c63fe7.entry.js +1 -0
- package/dist/paperless/p-3ecf3173.entry.js +1 -0
- package/dist/paperless/p-647910e6.entry.js +1 -0
- package/dist/paperless/p-69b38836.entry.js +1 -0
- package/dist/paperless/p-741ec1a6.entry.js +1 -0
- package/dist/paperless/p-76464e0b.js +2 -0
- package/dist/paperless/{p-f04c4de0.entry.js → p-90cb9ba3.entry.js} +1 -1
- package/dist/paperless/p-96f7f4ed.entry.js +1 -0
- package/dist/paperless/p-9d254d19.entry.js +1 -0
- package/dist/paperless/p-a7086ffa.js +1 -0
- package/dist/paperless/p-aab433ae.entry.js +1 -0
- package/dist/paperless/p-ac0798de.entry.js +1 -0
- package/dist/paperless/p-ae7fb5ac.entry.js +1 -0
- package/dist/paperless/p-d03853e1.entry.js +1 -0
- package/dist/paperless/p-d5ae88e6.entry.js +1 -0
- package/dist/paperless/p-d5d2f377.entry.js +1 -0
- package/dist/paperless/p-e32286ce.entry.js +1 -0
- package/dist/paperless/p-fb05d32c.entry.js +1 -0
- package/dist/paperless/paperless.css +81 -26375
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +539 -37
- package/dist/tailwind/border-radius.js +10 -0
- package/dist/tailwind/colors.js +52 -0
- package/dist/tailwind/grid.js +26 -0
- package/dist/tailwind/rotate.js +8 -0
- package/dist/tailwind/scale.js +3 -0
- package/dist/tailwind/shadows.js +7 -0
- package/dist/tailwind/typography.js +21 -0
- package/dist/tailwind.config.js +15 -13
- package/dist/types/components/atoms/avatar/avatar.component.d.ts +21 -0
- package/dist/types/components/atoms/button/button.component.d.ts +16 -3
- package/dist/types/components/atoms/card-body/card-body.component.d.ts +7 -0
- package/dist/types/components/atoms/card-container/card-container.component.d.ts +7 -0
- package/dist/types/components/atoms/card-header/card-header.component.d.ts +11 -0
- 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/icon/icon.component.d.ts +3 -3
- 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 +22 -0
- package/dist/types/components/atoms/status/status.component.d.ts +23 -0
- package/dist/types/components/atoms/tooltip/tooltip.component.d.ts +20 -8
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +42 -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 +569 -22
- package/dist/types/utils/child-of.d.ts +1 -0
- package/dist/types/utils/icons.d.ts +5 -0
- package/dist/types/utils/types.d.ts +2 -0
- package/package.json +61 -61
- package/dist/build/p-31acefc4.entry.js +0 -1
- package/dist/build/p-4144f8a0.entry.js +0 -1
- package/dist/build/p-f33e1285.js +0 -2
- package/dist/paperless/p-31acefc4.entry.js +0 -1
- package/dist/paperless/p-4144f8a0.entry.js +0 -1
- package/dist/paperless/p-f33e1285.js +0 -2
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
const popper = require('./popper-e0c4ed4c.js');
|
|
7
|
+
|
|
8
|
+
const childOf = (c, p) => {
|
|
9
|
+
while ((c = c.parentNode) && c !== p)
|
|
10
|
+
;
|
|
11
|
+
return !!c;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const dropdownComponentCss = ".visible{visibility:visible!important}.static{position:static!important}.flex{display:flex!important}.hidden{display:none!important}.h-auto{height:auto!important}.w-auto{width:auto!important}:host .trigger{display:inline-block;height:auto;width:auto}:host p-dropdown-menu-container{display:none}:host p-dropdown-menu-container[data-show]{display:flex}";
|
|
15
|
+
|
|
16
|
+
const Dropdown = class {
|
|
17
|
+
constructor(hostRef) {
|
|
18
|
+
index.registerInstance(this, hostRef);
|
|
19
|
+
this.isOpen = index.createEvent(this, "isOpen", 7);
|
|
20
|
+
/**
|
|
21
|
+
* The content of the dropdown menu
|
|
22
|
+
*/
|
|
23
|
+
this.placement = 'bottom';
|
|
24
|
+
/**
|
|
25
|
+
* Wether to show the dropdown menu
|
|
26
|
+
*/
|
|
27
|
+
this.show = false;
|
|
28
|
+
/**
|
|
29
|
+
* Wether to automatically close the dropdown menu after clicking inside
|
|
30
|
+
*/
|
|
31
|
+
this.insideClick = false;
|
|
32
|
+
/**
|
|
33
|
+
* Wether to automatically close the dropdown menu after clicking inside
|
|
34
|
+
*/
|
|
35
|
+
this.disableTriggerClick = false;
|
|
36
|
+
this._loaded = false;
|
|
37
|
+
}
|
|
38
|
+
componentShouldUpdate() {
|
|
39
|
+
this._setOptions();
|
|
40
|
+
if (this._loaded && this.show) {
|
|
41
|
+
this._show();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
render() {
|
|
45
|
+
return (index.h(index.Host, { class: "p-dropdown" }, index.h("div", { class: "trigger", onClick: () => this._triggerClickHandler() }, index.h("slot", { onSlotchange: (ev) => this._checkButton(ev), name: "trigger" })), index.h("p-dropdown-menu-container", { role: "popover", ref: (el) => this._load(el), onClick: () => this._containerClickHandler() }, index.h("slot", { name: "items" }))));
|
|
46
|
+
}
|
|
47
|
+
_checkButton({ target }) {
|
|
48
|
+
const slot = target;
|
|
49
|
+
const children = slot.assignedElements();
|
|
50
|
+
for (let child of children) {
|
|
51
|
+
if (child.nodeName === 'P-BUTTON') {
|
|
52
|
+
child.chevron =
|
|
53
|
+
this.placement === 'top' ? 'up' : 'down';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
_containerClickHandler() {
|
|
58
|
+
if (this.insideClick) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (this._menu.hasAttribute('data-show')) {
|
|
62
|
+
this._hide();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
_triggerClickHandler() {
|
|
66
|
+
if (this.disableTriggerClick) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (this._menu.hasAttribute('data-show')) {
|
|
70
|
+
this._hide();
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
this._show();
|
|
74
|
+
}
|
|
75
|
+
documentClickHandler({ target }) {
|
|
76
|
+
if (!this._menu.hasAttribute('data-show') ||
|
|
77
|
+
childOf(target, this._el)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
this._hide();
|
|
81
|
+
}
|
|
82
|
+
_load(popover) {
|
|
83
|
+
this._menu = popover;
|
|
84
|
+
if (popover) {
|
|
85
|
+
this._popper = popper.createPopper(this._el, popover);
|
|
86
|
+
this._setOptions();
|
|
87
|
+
this._loaded = true;
|
|
88
|
+
if (this.show) {
|
|
89
|
+
setTimeout(() => this._show(), 100);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
_setOptions() {
|
|
94
|
+
if (!this._popper) {
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
this._popper.setOptions({
|
|
98
|
+
placement: `${this.placement}-start`,
|
|
99
|
+
modifiers: [
|
|
100
|
+
{
|
|
101
|
+
name: 'offset',
|
|
102
|
+
options: {
|
|
103
|
+
offset: [0, 8],
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
_show() {
|
|
110
|
+
if (!this._loaded) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
// Make the popover visible
|
|
114
|
+
this._menu.setAttribute('data-show', '');
|
|
115
|
+
this.isOpen.emit(true);
|
|
116
|
+
// Enable the event listeners
|
|
117
|
+
this._popper.setOptions((options) => (Object.assign(Object.assign({}, options), { modifiers: [
|
|
118
|
+
...options.modifiers,
|
|
119
|
+
{ name: 'eventListeners', enabled: true },
|
|
120
|
+
] })));
|
|
121
|
+
// Update its position
|
|
122
|
+
this._popper.update();
|
|
123
|
+
}
|
|
124
|
+
_hide() {
|
|
125
|
+
if (!this._loaded || this.show) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
// Hide the popover
|
|
129
|
+
this._menu.removeAttribute('data-show');
|
|
130
|
+
this.isOpen.emit(false);
|
|
131
|
+
// Disable the event listeners
|
|
132
|
+
this._popper.setOptions((options) => (Object.assign(Object.assign({}, options), { modifiers: [
|
|
133
|
+
...options.modifiers,
|
|
134
|
+
{ name: 'eventListeners', enabled: false },
|
|
135
|
+
] })));
|
|
136
|
+
}
|
|
137
|
+
get _el() { return index.getElement(this); }
|
|
138
|
+
};
|
|
139
|
+
Dropdown.style = dropdownComponentCss;
|
|
140
|
+
|
|
141
|
+
exports.p_dropdown = Dropdown;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
|
|
7
|
+
const helperComponentCss = ".visible{visibility:visible!important}.static{position:static!important}.inline-block{display:inline-block!important}.w-3{width:.75rem!important}.cursor-pointer{cursor:pointer!important}.bg-center{background-position:50%!important}.bg-no-repeat{background-repeat:no-repeat!important}.blur{--tw-blur:blur(8px)!important;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}:host .helper{background-image:url(/assets/images/helper/helper.svg);background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:.75rem;width:.75rem}:host .helper:hover{background-image:url(/assets/images/helper/helper-hover.svg)}";
|
|
8
|
+
|
|
9
|
+
const Helper = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (index.h(index.Host, { class: "p-helper" }, index.h("p-tooltip", null, index.h("div", { slot: "popover" }, index.h("slot", null)), index.h("div", { slot: "content", class: "helper" }))));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
Helper.style = helperComponentCss;
|
|
18
|
+
|
|
19
|
+
exports.p_helper = Helper;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
6
|
|
|
7
7
|
const emptyState = `<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="400" height="400" viewBox="0 0 400 400">
|
|
8
8
|
<defs>
|
|
@@ -1410,17 +1410,14 @@ const illustrations = {
|
|
|
1410
1410
|
};
|
|
1411
1411
|
|
|
1412
1412
|
const Illustration = class {
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
render() {
|
|
1421
|
-
const illustration = illustrations[this.variant];
|
|
1422
|
-
return index.h(index.Host, { class: "p-illustration block", innerHTML: illustration });
|
|
1423
|
-
}
|
|
1413
|
+
constructor(hostRef) {
|
|
1414
|
+
index.registerInstance(this, hostRef);
|
|
1415
|
+
}
|
|
1416
|
+
render() {
|
|
1417
|
+
const illustration = illustrations[this.variant];
|
|
1418
|
+
return index.h(index.Host, { class: "p-illustration block", innerHTML: illustration });
|
|
1419
|
+
}
|
|
1424
1420
|
};
|
|
1421
|
+
Illustration.style = '.block{display:block!important}';
|
|
1425
1422
|
|
|
1426
1423
|
exports.p_illustration = Illustration;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
|
|
7
|
+
const infoPanelComponentCss = ".static{position:static!important}.absolute{position:absolute!important}.relative{position:relative!important}.top-2{top:.5rem!important}.right-2{right:.5rem!important}.flex{display:flex!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.flex-col{flex-direction:column!important}.bg-indigo-light{--tw-bg-opacity:1!important;background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}.p-4{padding:1rem!important}.font-semibold{font-weight:600!important}:host{--tw-bg-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));border-radius:.375rem;display:flex;flex-direction:column;padding:1rem;position:relative;width:100%}:host .header{--tw-text-opacity:1;color:rgb(39 40 56/var(--tw-text-opacity));font-weight:600}:host .content{font-size:.875rem;line-height:1.25rem}:host .close{--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity));cursor:pointer;position:absolute;right:.5rem;top:.5rem}:host(.variant-positive){--tw-bg-opacity:1;background-color:rgb(229 255 242/var(--tw-bg-opacity))}:host(.variant-unbiased){--tw-bg-opacity:1;background-color:rgb(255 246 220/var(--tw-bg-opacity))}:host(.variant-negative){--tw-bg-opacity:1;background-color:rgb(255 204 211/var(--tw-bg-opacity))}:host(.has-close){padding-right:2rem}";
|
|
8
|
+
|
|
9
|
+
const InfoPanel = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* The variant of the info panel
|
|
14
|
+
*/
|
|
15
|
+
this.variant = 'info';
|
|
16
|
+
/**
|
|
17
|
+
* Wether the panel can be closed
|
|
18
|
+
*/
|
|
19
|
+
this.closeable = false;
|
|
20
|
+
}
|
|
21
|
+
render() {
|
|
22
|
+
return (index.h(index.Host, { class: `p-info-panel variant-${this.variant} ${this.closeable && 'has-close'}` }, index.h("div", { class: "header" }, index.h("slot", { name: "header" })), index.h("div", { class: "content" }, index.h("slot", { name: "content" })), this.closeable && (index.h("div", { class: "close", onClick: () => this._close() }, index.h("p-icon", { variant: "negative" })))));
|
|
23
|
+
}
|
|
24
|
+
_close() {
|
|
25
|
+
this._el.remove();
|
|
26
|
+
}
|
|
27
|
+
get _el() { return index.getElement(this); }
|
|
28
|
+
};
|
|
29
|
+
InfoPanel.style = infoPanelComponentCss;
|
|
30
|
+
|
|
31
|
+
exports.p_info_panel = InfoPanel;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
|
|
7
|
+
const navigationItemComponentCss = ".static{position:static!important}.inline-block{display:inline-block!important}.flex{display:flex!important}.h-8{height:2rem!important}.w-full{width:100%!important}.cursor-pointer{cursor:pointer!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.text-mystic-dark{--tw-text-opacity:1!important;color:rgb(218 230 240/var(--tw-text-opacity))!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}:host{display:inline-block;margin-bottom:.25rem;width:100%}:host>a{--tw-text-opacity:1;align-items:center;border-radius:.375rem;color:rgb(128 130 158/var(--tw-text-opacity));cursor:pointer;display:flex;font-weight:500;height:2rem;padding-left:.5rem;padding-right:.5rem;width:100%}:host>a:hover{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(39 40 56/var(--tw-text-opacity))}:host>a>p-icon{--tw-text-opacity:1;color:rgb(218 230 240/var(--tw-text-opacity));margin-right:.75rem}:host>a>p-counter{margin-left:auto}:host>a>span.has-counter{margin-right:.75rem}:host>a:hover>p-icon{--tw-text-opacity:1;color:rgb(152 154 183/var(--tw-text-opacity))}:host(.active)>a{--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(82 138 250/var(--tw-text-opacity))}:host(.active)>a>p-icon{--tw-text-opacity:1;color:rgb(82 138 250/var(--tw-text-opacity))}.hover\\:bg-indigo-light:hover{--tw-bg-opacity:1!important;background-color:rgb(241 246 255/var(--tw-bg-opacity))!important}";
|
|
8
|
+
|
|
9
|
+
const NavigationItem = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Wether the navigation item is active
|
|
14
|
+
*/
|
|
15
|
+
this.active = false;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (index.h(index.Host, { class: `p-navigation-item ${this.active && 'active'}` }, index.h("a", { href: this.href, target: this.target }, this.icon && index.h("p-icon", { variant: this.icon }), index.h("span", { class: this.counter && 'has-counter' }, index.h("slot", null)), this.counter && index.h("p-counter", null, this.counter))));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
NavigationItem.style = navigationItemComponentCss;
|
|
22
|
+
|
|
23
|
+
exports.p_navigation_item = NavigationItem;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
|
|
7
|
+
const paginationItemComponentCss = ".static{position:static!important}.flex{display:flex!important}.h-8{height:2rem!important}.justify-center{justify-content:center!important}.rounded{border-radius:.25rem!important}.font-semibold{font-weight:600!important}.text-storm-medium{--tw-text-opacity:1!important;color:rgb(128 130 158/var(--tw-text-opacity))!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}:host{--tw-text-opacity:1;align-items:center;border-radius:.25rem;color:rgb(128 130 158/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;font-weight:600;height:2rem;justify-content:center;line-height:1.25rem;width:2rem}:host(:focus),:host(:hover){--tw-text-opacity:1;color:rgb(81 83 107/var(--tw-text-opacity))}:host(.active){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(82 138 250/var(--tw-text-opacity))}";
|
|
8
|
+
|
|
9
|
+
const PaginationItem = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Wether the pagination item is active
|
|
14
|
+
*/
|
|
15
|
+
this.active = false;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (index.h(index.Host, { class: `p-pagination-item ${this.active && 'active'}` }, index.h("slot", null)));
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
PaginationItem.style = paginationItemComponentCss;
|
|
22
|
+
|
|
23
|
+
exports.p_pagination_item = PaginationItem;
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
|
|
7
|
+
const paginationComponentCss = ".static{position:static!important}.flex{display:flex!important}p-pagination{display:flex}";
|
|
8
|
+
|
|
9
|
+
const Pagination = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.pageChange = index.createEvent(this, "pageChange", 7);
|
|
13
|
+
/**
|
|
14
|
+
* The current page
|
|
15
|
+
*/
|
|
16
|
+
this.page = 1;
|
|
17
|
+
/**
|
|
18
|
+
* The amount of items per page
|
|
19
|
+
*/
|
|
20
|
+
this.pageSize = 12;
|
|
21
|
+
this._pages = [];
|
|
22
|
+
this._set = [];
|
|
23
|
+
this._nextClick = () => {
|
|
24
|
+
const nextPage = this.page + 1;
|
|
25
|
+
if (nextPage > this._pages[this._pages.length - 1]) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
this._changePage(nextPage);
|
|
29
|
+
};
|
|
30
|
+
this._pageClick = (p) => this._changePage(p);
|
|
31
|
+
this._generateSet = (range = 1, enableBoundaries = true) => {
|
|
32
|
+
const totalPages = this._pages.length;
|
|
33
|
+
if (!totalPages) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
let start = this.page - range;
|
|
37
|
+
let end = this.page + range;
|
|
38
|
+
if (end > totalPages) {
|
|
39
|
+
end = totalPages;
|
|
40
|
+
start = totalPages - range * 2;
|
|
41
|
+
start = start < 1 ? 1 : start;
|
|
42
|
+
}
|
|
43
|
+
if (start <= 1) {
|
|
44
|
+
start = 1;
|
|
45
|
+
end = Math.min(range * 2 + 1, totalPages);
|
|
46
|
+
}
|
|
47
|
+
const set = [];
|
|
48
|
+
const previous = {
|
|
49
|
+
type: 'previous',
|
|
50
|
+
value: index.h("p-icon", { variant: "chevron", rotate: 90 }),
|
|
51
|
+
};
|
|
52
|
+
const next = {
|
|
53
|
+
type: 'next',
|
|
54
|
+
value: index.h("p-icon", { variant: "chevron", rotate: -90 }),
|
|
55
|
+
};
|
|
56
|
+
// Disable page range, display all the pages
|
|
57
|
+
if (range === null) {
|
|
58
|
+
const p = this._pages.map((p) => ({
|
|
59
|
+
type: 'page',
|
|
60
|
+
value: p,
|
|
61
|
+
}));
|
|
62
|
+
return enableBoundaries ? [previous, ...p, next] : p;
|
|
63
|
+
}
|
|
64
|
+
if (enableBoundaries) {
|
|
65
|
+
set.push(previous);
|
|
66
|
+
}
|
|
67
|
+
if (start <= 3) {
|
|
68
|
+
for (let i = 1; i < start; i++) {
|
|
69
|
+
set.push({
|
|
70
|
+
type: 'page',
|
|
71
|
+
value: this._pages[i - 1],
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
set.push({
|
|
77
|
+
type: 'page',
|
|
78
|
+
value: 1,
|
|
79
|
+
});
|
|
80
|
+
set.push({
|
|
81
|
+
type: 'ellipsis',
|
|
82
|
+
value: 'ellipsis',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
for (let i = start; i <= end; i++) {
|
|
86
|
+
set.push({
|
|
87
|
+
type: 'page',
|
|
88
|
+
value: this._pages[i - 1],
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
if (end >= totalPages - 2) {
|
|
92
|
+
for (let i = end + 1; i <= totalPages; i++) {
|
|
93
|
+
set.push({
|
|
94
|
+
type: 'page',
|
|
95
|
+
value: this._pages[i - 1],
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
else {
|
|
100
|
+
set.push({
|
|
101
|
+
type: 'ellipsis',
|
|
102
|
+
});
|
|
103
|
+
set.push({
|
|
104
|
+
type: 'page',
|
|
105
|
+
value: this._pages[this._pages.length - 1],
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
if (enableBoundaries) {
|
|
109
|
+
set.push(next);
|
|
110
|
+
}
|
|
111
|
+
return set;
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
componentWillRender() {
|
|
115
|
+
this._generate();
|
|
116
|
+
}
|
|
117
|
+
render() {
|
|
118
|
+
var _a;
|
|
119
|
+
return (index.h(index.Host, { class: "p-pagination" }, (_a = this._set) === null || _a === void 0 ? void 0 : _a.map((p) => {
|
|
120
|
+
if (p.type === 'previous' || p.type === 'next') {
|
|
121
|
+
return (index.h("p-pagination-item", { onClick: () => p.type === 'previous'
|
|
122
|
+
? this._previousClick()
|
|
123
|
+
: this._nextClick() }, p.value));
|
|
124
|
+
}
|
|
125
|
+
if (p.type === 'ellipsis') {
|
|
126
|
+
return index.h("p-pagination-item", null, "...");
|
|
127
|
+
}
|
|
128
|
+
return (index.h("p-pagination-item", { active: p.value === this.page, onClick: () => this._pageClick(p.value) }, p.value));
|
|
129
|
+
})));
|
|
130
|
+
}
|
|
131
|
+
pageChangeHandler() {
|
|
132
|
+
this._generate();
|
|
133
|
+
}
|
|
134
|
+
_generate() {
|
|
135
|
+
var _a;
|
|
136
|
+
this._pages = this._generatePages();
|
|
137
|
+
this._set = this._generateSet();
|
|
138
|
+
if (this.page > ((_a = this._pages) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
139
|
+
this._changePage(this._pages.length);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
_changePage(p) {
|
|
143
|
+
if (!p) {
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
this.page = p;
|
|
147
|
+
this.pageChange.emit(this.page);
|
|
148
|
+
}
|
|
149
|
+
_previousClick() {
|
|
150
|
+
const previousPage = this.page - 1;
|
|
151
|
+
if (previousPage < this._pages[0]) {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
this._changePage(previousPage);
|
|
155
|
+
}
|
|
156
|
+
_generatePages() {
|
|
157
|
+
if (!this.total || !this.pageSize) {
|
|
158
|
+
return [];
|
|
159
|
+
}
|
|
160
|
+
const pages = Math.ceil(this.total / this.pageSize);
|
|
161
|
+
return new Array(pages).fill(undefined).map((_, i) => i + 1);
|
|
162
|
+
}
|
|
163
|
+
static get watchers() { return {
|
|
164
|
+
"page": ["pageChangeHandler"],
|
|
165
|
+
"pageSize": ["pageChangeHandler"],
|
|
166
|
+
"total": ["pageChangeHandler"]
|
|
167
|
+
}; }
|
|
168
|
+
};
|
|
169
|
+
Pagination.style = paginationComponentCss;
|
|
170
|
+
|
|
171
|
+
exports.p_pagination = Pagination;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
|
|
7
|
+
const segmentContainerComponentCss = ".static{position:static!important}.flex{display:flex!important}.h-8{height:2rem!important}.rounded{border-radius:.25rem!important}.bg-white{--tw-bg-opacity:1!important;background-color:rgb(255 255 255/var(--tw-bg-opacity))!important}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)!important}p-segment-container{--tw-bg-opacity:1;--tw-drop-shadow:drop-shadow(0px 0.3125rem 1rem rgba(0,24,98,.08)) drop-shadow(0px 0.0625rem 0.1875rem rgba(0,24,98,.13));background-color:rgb(255 255 255/var(--tw-bg-opacity));border-radius:.25rem;display:flex;filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);height:2rem;padding:.25rem}";
|
|
8
|
+
|
|
9
|
+
const SegmentContainer = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
}
|
|
13
|
+
render() {
|
|
14
|
+
return (index.h(index.Host, { class: "p-segment-container" }, index.h("slot", null)));
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
SegmentContainer.style = segmentContainerComponentCss;
|
|
18
|
+
|
|
19
|
+
exports.p_segment_container = SegmentContainer;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
|
|
7
|
+
const segmentItemComponentCss = ".static{position:static!important}.flex{display:flex!important}.h-6{height:1.5rem!important}.w-6{width:1.5rem!important}.items-center{align-items:center!important}.justify-center{justify-content:center!important}.rounded{border-radius:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.font-medium{font-weight:500!important}.text-storm-light{--tw-text-opacity:1!important;color:rgb(176 178 203/var(--tw-text-opacity))!important}.text-indigo{--tw-text-opacity:1!important;color:rgb(82 138 250/var(--tw-text-opacity))!important}:host{--tw-text-opacity:1;align-items:center;border-radius:.25rem;color:rgb(176 178 203/var(--tw-text-opacity));cursor:pointer;display:flex;font-size:.875rem;font-weight:500;height:1.5rem;line-height:1.25rem;margin-right:.25rem;padding-left:.5rem;padding-right:.5rem}:host(.variant-icon){justify-content:center;padding-left:0;padding-right:0;width:1.5rem}:host(:hover){--tw-text-opacity:1;color:rgb(128 130 158/var(--tw-text-opacity))}:host(.active){--tw-bg-opacity:1;--tw-text-opacity:1;background-color:rgb(241 246 255/var(--tw-bg-opacity));color:rgb(82 138 250/var(--tw-text-opacity))}:host(:last-child){margin-right:0}";
|
|
8
|
+
|
|
9
|
+
const SegmentItem = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* Wether the segment item is active
|
|
14
|
+
*/
|
|
15
|
+
this.active = false;
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (index.h(index.Host, { class: `p-segment-item variant-${this.icon ? 'icon' : 'default'} ${this.active && 'active'}` }, this.icon ? this._getIcon() : index.h("slot", null)));
|
|
19
|
+
}
|
|
20
|
+
_getIcon() {
|
|
21
|
+
if (!this.icon) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
return (index.h("p-icon", { variant: this.icon, flip: this.iconFlip, rotate: this.iconRotate }));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
SegmentItem.style = segmentItemComponentCss;
|
|
28
|
+
|
|
29
|
+
exports.p_segment_item = SegmentItem;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-a46a39a5.js');
|
|
6
|
+
|
|
7
|
+
const statusComponentCss = ".static{position:static!important}.mr-2{margin-right:.5rem!important}.flex{display:flex!important}.text-sm{font-size:.875rem!important;line-height:1.25rem!important}.text-storm-vague{--tw-text-opacity:1!important;color:rgb(152 154 183/var(--tw-text-opacity))!important}p-status{--tw-text-opacity:1;align-items:center;color:rgb(152 154 183/var(--tw-text-opacity));display:flex;font-size:.875rem;font-weight:500;line-height:1.25rem}p-status p-icon{font-size:1rem;line-height:1.5rem;margin-right:.5rem}p-status.variant-positive{--tw-text-opacity:1;color:rgb(40 209 124/var(--tw-text-opacity))}p-status.variant-unbiased{--tw-text-opacity:1;color:rgb(255 199 45/var(--tw-text-opacity))}p-status.variant-negative{--tw-text-opacity:1;color:rgb(185 30 40/var(--tw-text-opacity))}";
|
|
8
|
+
|
|
9
|
+
const Status = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
/**
|
|
13
|
+
* The variant of the status
|
|
14
|
+
*/
|
|
15
|
+
this.variant = 'default';
|
|
16
|
+
}
|
|
17
|
+
render() {
|
|
18
|
+
return (index.h(index.Host, { class: `p-status variant-${this.variant}
|
|
19
|
+
}` }, this._getIcon(), index.h("slot", null)));
|
|
20
|
+
}
|
|
21
|
+
_getIcon() {
|
|
22
|
+
const icon = this.icon || this._getVariantIcon();
|
|
23
|
+
if (!icon) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
return (index.h("p-icon", { variant: icon, flip: this.iconFlip, rotate: this.iconRotate }));
|
|
27
|
+
}
|
|
28
|
+
_getVariantIcon() {
|
|
29
|
+
let icon = null;
|
|
30
|
+
switch (this.variant) {
|
|
31
|
+
case 'positive':
|
|
32
|
+
icon = 'checkmark';
|
|
33
|
+
break;
|
|
34
|
+
case 'negative':
|
|
35
|
+
icon = 'negative';
|
|
36
|
+
break;
|
|
37
|
+
case 'unbiased':
|
|
38
|
+
icon = 'clock';
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
icon = null;
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
return icon;
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
Status.style = statusComponentCss;
|
|
48
|
+
|
|
49
|
+
exports.p_status = Status;
|