@paperless/core 0.1.0-alpha.10 → 0.1.0-alpha.11
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 +11 -0
- package/dist/build/{p-a4ea5760.entry.js → p-06a38756.entry.js} +1 -1
- package/dist/build/{p-a2fc051b.entry.js → p-19afe191.entry.js} +1 -1
- package/dist/build/{p-fa6ab882.js → p-229f113b.js} +2 -2
- package/dist/build/{p-22129b00.entry.js → p-23980fbb.entry.js} +1 -1
- package/dist/{paperless/p-44a929c9.entry.js → build/p-31f80006.entry.js} +1 -1
- package/dist/{paperless/p-6794871e.entry.js → build/p-5f0ec763.entry.js} +1 -1
- package/dist/build/p-6c6c1137.entry.js +1 -0
- package/dist/build/{p-b4ef7a57.entry.js → p-80bf9d06.entry.js} +1 -1
- package/dist/build/p-d750cdf6.entry.js +1 -0
- package/dist/{paperless/p-8cb80a47.entry.js → build/p-e80637b9.entry.js} +1 -1
- package/dist/build/p-ec52095f.entry.js +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/{index-7caa3dae.js → index-6b6e08cc.js} +32 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/p-avatar.cjs.entry.js +1 -1
- package/dist/cjs/p-button_3.cjs.entry.js +1 -1
- package/dist/cjs/p-counter.cjs.entry.js +1 -1
- package/dist/cjs/p-divider.cjs.entry.js +19 -0
- package/dist/cjs/p-helper.cjs.entry.js +1 -1
- package/dist/cjs/p-illustration.cjs.entry.js +1 -1
- package/dist/cjs/p-info-panel.cjs.entry.js +1 -1
- package/dist/cjs/p-pagination-item.cjs.entry.js +23 -0
- package/dist/cjs/p-pagination.cjs.entry.js +164 -0
- package/dist/cjs/p-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/paperless.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -1
- 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/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/molecules/pagination/pagination.component.css +3 -0
- package/dist/collection/components/molecules/pagination/pagination.component.js +234 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/p-divider.d.ts +11 -0
- package/dist/components/p-divider.js +33 -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 +193 -0
- package/dist/components/pagination-item.component.js +36 -0
- package/dist/esm/{index-d61d31b2.js → index-5c917d13.js} +32 -0
- package/dist/esm/loader.js +2 -2
- package/dist/esm/p-avatar.entry.js +1 -1
- package/dist/esm/p-button_3.entry.js +1 -1
- package/dist/esm/p-counter.entry.js +1 -1
- package/dist/esm/p-divider.entry.js +15 -0
- package/dist/esm/p-helper.entry.js +1 -1
- package/dist/esm/p-illustration.entry.js +1 -1
- package/dist/esm/p-info-panel.entry.js +1 -1
- package/dist/esm/p-pagination-item.entry.js +19 -0
- package/dist/esm/p-pagination.entry.js +160 -0
- package/dist/esm/p-tooltip.entry.js +1 -1
- package/dist/esm/paperless.js +2 -2
- package/dist/index.html +1 -1
- package/dist/paperless/{p-a4ea5760.entry.js → p-06a38756.entry.js} +1 -1
- package/dist/paperless/{p-a2fc051b.entry.js → p-19afe191.entry.js} +1 -1
- package/dist/paperless/{p-fa6ab882.js → p-229f113b.js} +2 -2
- package/dist/paperless/{p-22129b00.entry.js → p-23980fbb.entry.js} +1 -1
- package/dist/{build/p-44a929c9.entry.js → paperless/p-31f80006.entry.js} +1 -1
- package/dist/{build/p-6794871e.entry.js → paperless/p-5f0ec763.entry.js} +1 -1
- package/dist/paperless/p-6c6c1137.entry.js +1 -0
- package/dist/paperless/{p-b4ef7a57.entry.js → p-80bf9d06.entry.js} +1 -1
- package/dist/paperless/p-d750cdf6.entry.js +1 -0
- package/dist/{build/p-8cb80a47.entry.js → paperless/p-e80637b9.entry.js} +1 -1
- package/dist/paperless/p-ec52095f.entry.js +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +112 -36
- package/dist/types/components/atoms/divider/divider.component.d.ts +3 -0
- package/dist/types/components/atoms/pagination-item/pagination-item.component.d.ts +7 -0
- package/dist/types/components/molecules/pagination/pagination.component.d.ts +36 -0
- package/dist/types/components.d.ts +79 -0
- package/package.json +1 -1
|
@@ -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,234 @@
|
|
|
1
|
+
import { Component, Event, h, Host, Prop, State, Watch } from '@stencil/core';
|
|
2
|
+
export class Pagination {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* The current page
|
|
6
|
+
*/
|
|
7
|
+
this.page = 1;
|
|
8
|
+
/**
|
|
9
|
+
* The amount of items per page
|
|
10
|
+
*/
|
|
11
|
+
this.pageSize = 12;
|
|
12
|
+
this._pages = [];
|
|
13
|
+
this._set = [];
|
|
14
|
+
this._nextClick = () => {
|
|
15
|
+
const nextPage = this.page + 1;
|
|
16
|
+
if (nextPage > this._pages[this._pages.length - 1]) {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
this._changePage(nextPage);
|
|
20
|
+
};
|
|
21
|
+
this._pageClick = (p) => this._changePage(p);
|
|
22
|
+
this._generateSet = (range = 1, enableBoundaries = true) => {
|
|
23
|
+
const totalPages = this._pages.length;
|
|
24
|
+
if (!totalPages) {
|
|
25
|
+
return [];
|
|
26
|
+
}
|
|
27
|
+
let start = this.page - range;
|
|
28
|
+
let end = this.page + range;
|
|
29
|
+
if (end > totalPages) {
|
|
30
|
+
end = totalPages;
|
|
31
|
+
start = totalPages - range * 2;
|
|
32
|
+
start = start < 1 ? 1 : start;
|
|
33
|
+
}
|
|
34
|
+
if (start <= 1) {
|
|
35
|
+
start = 1;
|
|
36
|
+
end = Math.min(range * 2 + 1, totalPages);
|
|
37
|
+
}
|
|
38
|
+
const set = [];
|
|
39
|
+
const previous = {
|
|
40
|
+
type: 'previous',
|
|
41
|
+
value: h("p-icon", { variant: "chevron", rotate: 90 }),
|
|
42
|
+
};
|
|
43
|
+
const next = {
|
|
44
|
+
type: 'next',
|
|
45
|
+
value: h("p-icon", { variant: "chevron", rotate: -90 }),
|
|
46
|
+
};
|
|
47
|
+
// Disable page range, display all the pages
|
|
48
|
+
if (range === null) {
|
|
49
|
+
const p = this._pages.map(p => ({
|
|
50
|
+
type: 'page',
|
|
51
|
+
value: p,
|
|
52
|
+
}));
|
|
53
|
+
return enableBoundaries ? [previous, ...p, next] : p;
|
|
54
|
+
}
|
|
55
|
+
if (enableBoundaries) {
|
|
56
|
+
set.push(previous);
|
|
57
|
+
}
|
|
58
|
+
if (start <= 3) {
|
|
59
|
+
for (let i = 1; i < start; i++) {
|
|
60
|
+
set.push({
|
|
61
|
+
type: 'page',
|
|
62
|
+
value: this._pages[i - 1],
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
set.push({
|
|
68
|
+
type: 'page',
|
|
69
|
+
value: 1,
|
|
70
|
+
});
|
|
71
|
+
set.push({
|
|
72
|
+
type: 'ellipsis',
|
|
73
|
+
value: 'ellipsis',
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
for (let i = start; i <= end; i++) {
|
|
77
|
+
set.push({
|
|
78
|
+
type: 'page',
|
|
79
|
+
value: this._pages[i - 1],
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
if (end >= totalPages - 2) {
|
|
83
|
+
for (let i = end + 1; i <= totalPages; i++) {
|
|
84
|
+
set.push({
|
|
85
|
+
type: 'page',
|
|
86
|
+
value: this._pages[i - 1],
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
set.push({
|
|
92
|
+
type: 'ellipsis',
|
|
93
|
+
});
|
|
94
|
+
set.push({
|
|
95
|
+
type: 'page',
|
|
96
|
+
value: this._pages[this._pages.length - 1],
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
if (enableBoundaries) {
|
|
100
|
+
set.push(next);
|
|
101
|
+
}
|
|
102
|
+
return set;
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
componentWillRender() {
|
|
106
|
+
this._generate();
|
|
107
|
+
}
|
|
108
|
+
render() {
|
|
109
|
+
var _a;
|
|
110
|
+
return (h(Host, { class: "p-pagination" }, (_a = this._set) === null || _a === void 0 ? void 0 : _a.map(p => {
|
|
111
|
+
if (p.type === 'previous' || p.type === 'next') {
|
|
112
|
+
return h("p-pagination-item", { onClick: () => (p.type === 'previous' ? this._previousClick() : this._nextClick()) }, p.value);
|
|
113
|
+
}
|
|
114
|
+
if (p.type === 'ellipsis') {
|
|
115
|
+
return h("p-pagination-item", null, "...");
|
|
116
|
+
}
|
|
117
|
+
return (h("p-pagination-item", { active: p.value === this.page, onClick: () => this._pageClick(p.value) }, p.value));
|
|
118
|
+
})));
|
|
119
|
+
}
|
|
120
|
+
pageChangeHandler() {
|
|
121
|
+
console.log('Page changed!');
|
|
122
|
+
this._generate();
|
|
123
|
+
}
|
|
124
|
+
_generate() {
|
|
125
|
+
this._pages = this._generatePages();
|
|
126
|
+
this._set = this._generateSet();
|
|
127
|
+
}
|
|
128
|
+
_changePage(p) {
|
|
129
|
+
if (!p) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
this.pageChange.emit(p);
|
|
133
|
+
this.page = p;
|
|
134
|
+
}
|
|
135
|
+
_previousClick() {
|
|
136
|
+
const previousPage = this.page - 1;
|
|
137
|
+
if (previousPage < this._pages[0]) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
this._changePage(previousPage);
|
|
141
|
+
}
|
|
142
|
+
_generatePages() {
|
|
143
|
+
if (!this.total || !this.pageSize) {
|
|
144
|
+
return [];
|
|
145
|
+
}
|
|
146
|
+
const pages = Math.ceil(this.total / this.pageSize);
|
|
147
|
+
return new Array(pages).fill(undefined).map((_, i) => i + 1);
|
|
148
|
+
}
|
|
149
|
+
static get is() { return "p-pagination"; }
|
|
150
|
+
static get originalStyleUrls() { return {
|
|
151
|
+
"$": ["pagination.component.scss"]
|
|
152
|
+
}; }
|
|
153
|
+
static get styleUrls() { return {
|
|
154
|
+
"$": ["pagination.component.css"]
|
|
155
|
+
}; }
|
|
156
|
+
static get properties() { return {
|
|
157
|
+
"page": {
|
|
158
|
+
"type": "number",
|
|
159
|
+
"mutable": false,
|
|
160
|
+
"complexType": {
|
|
161
|
+
"original": "number",
|
|
162
|
+
"resolved": "number",
|
|
163
|
+
"references": {}
|
|
164
|
+
},
|
|
165
|
+
"required": false,
|
|
166
|
+
"optional": false,
|
|
167
|
+
"docs": {
|
|
168
|
+
"tags": [],
|
|
169
|
+
"text": "The current page"
|
|
170
|
+
},
|
|
171
|
+
"attribute": "page",
|
|
172
|
+
"reflect": false,
|
|
173
|
+
"defaultValue": "1"
|
|
174
|
+
},
|
|
175
|
+
"pageSize": {
|
|
176
|
+
"type": "number",
|
|
177
|
+
"mutable": false,
|
|
178
|
+
"complexType": {
|
|
179
|
+
"original": "number",
|
|
180
|
+
"resolved": "number",
|
|
181
|
+
"references": {}
|
|
182
|
+
},
|
|
183
|
+
"required": false,
|
|
184
|
+
"optional": false,
|
|
185
|
+
"docs": {
|
|
186
|
+
"tags": [],
|
|
187
|
+
"text": "The amount of items per page"
|
|
188
|
+
},
|
|
189
|
+
"attribute": "page-size",
|
|
190
|
+
"reflect": false,
|
|
191
|
+
"defaultValue": "12"
|
|
192
|
+
},
|
|
193
|
+
"total": {
|
|
194
|
+
"type": "number",
|
|
195
|
+
"mutable": false,
|
|
196
|
+
"complexType": {
|
|
197
|
+
"original": "number",
|
|
198
|
+
"resolved": "number",
|
|
199
|
+
"references": {}
|
|
200
|
+
},
|
|
201
|
+
"required": true,
|
|
202
|
+
"optional": false,
|
|
203
|
+
"docs": {
|
|
204
|
+
"tags": [],
|
|
205
|
+
"text": "The total amount of items"
|
|
206
|
+
},
|
|
207
|
+
"attribute": "total",
|
|
208
|
+
"reflect": false
|
|
209
|
+
}
|
|
210
|
+
}; }
|
|
211
|
+
static get states() { return {
|
|
212
|
+
"page": {}
|
|
213
|
+
}; }
|
|
214
|
+
static get events() { return [{
|
|
215
|
+
"method": "pageChange",
|
|
216
|
+
"name": "pageChange",
|
|
217
|
+
"bubbles": true,
|
|
218
|
+
"cancelable": true,
|
|
219
|
+
"composed": true,
|
|
220
|
+
"docs": {
|
|
221
|
+
"tags": [],
|
|
222
|
+
"text": "Button click event"
|
|
223
|
+
},
|
|
224
|
+
"complexType": {
|
|
225
|
+
"original": "number",
|
|
226
|
+
"resolved": "number",
|
|
227
|
+
"references": {}
|
|
228
|
+
}
|
|
229
|
+
}]; }
|
|
230
|
+
static get watchers() { return [{
|
|
231
|
+
"propName": "page",
|
|
232
|
+
"methodName": "pageChangeHandler"
|
|
233
|
+
}]; }
|
|
234
|
+
}
|
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
export { Avatar as PAvatar } from '../types/components/p-avatar/p-avatar';
|
|
3
3
|
export { Button as PButton } from '../types/components/p-button/p-button';
|
|
4
4
|
export { Counter as PCounter } from '../types/components/p-counter/p-counter';
|
|
5
|
+
export { Divider as PDivider } from '../types/components/p-divider/p-divider';
|
|
5
6
|
export { Helper as PHelper } from '../types/components/p-helper/p-helper';
|
|
6
7
|
export { Icon as PIcon } from '../types/components/p-icon/p-icon';
|
|
7
8
|
export { Illustration as PIllustration } from '../types/components/p-illustration/p-illustration';
|
|
8
9
|
export { InfoPanel as PInfoPanel } from '../types/components/p-info-panel/p-info-panel';
|
|
9
10
|
export { Loader as PLoader } from '../types/components/p-loader/p-loader';
|
|
11
|
+
export { Pagination as PPagination } from '../types/components/p-pagination/p-pagination';
|
|
12
|
+
export { PaginationItem as PPaginationItem } from '../types/components/p-pagination-item/p-pagination-item';
|
|
10
13
|
export { Tooltip as PTooltip } from '../types/components/p-tooltip/p-tooltip';
|
|
11
14
|
|
|
12
15
|
/**
|
package/dist/components/index.js
CHANGED
|
@@ -2,9 +2,12 @@ export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client'
|
|
|
2
2
|
export { PAvatar, defineCustomElement as defineCustomElementPAvatar } from './p-avatar.js';
|
|
3
3
|
export { PButton, defineCustomElement as defineCustomElementPButton } from './p-button.js';
|
|
4
4
|
export { PCounter, defineCustomElement as defineCustomElementPCounter } from './p-counter.js';
|
|
5
|
+
export { PDivider, defineCustomElement as defineCustomElementPDivider } from './p-divider.js';
|
|
5
6
|
export { PHelper, defineCustomElement as defineCustomElementPHelper } from './p-helper.js';
|
|
6
7
|
export { PIcon, defineCustomElement as defineCustomElementPIcon } from './p-icon.js';
|
|
7
8
|
export { PIllustration, defineCustomElement as defineCustomElementPIllustration } from './p-illustration.js';
|
|
8
9
|
export { PInfoPanel, defineCustomElement as defineCustomElementPInfoPanel } from './p-info-panel.js';
|
|
9
10
|
export { PLoader, defineCustomElement as defineCustomElementPLoader } from './p-loader.js';
|
|
11
|
+
export { PPagination, defineCustomElement as defineCustomElementPPagination } from './p-pagination.js';
|
|
12
|
+
export { PPaginationItem, defineCustomElement as defineCustomElementPPaginationItem } from './p-pagination-item.js';
|
|
10
13
|
export { PTooltip, defineCustomElement as defineCustomElementPTooltip } from './p-tooltip.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PDivider extends Components.PDivider, HTMLElement {}
|
|
4
|
+
export const PDivider: {
|
|
5
|
+
prototype: PDivider;
|
|
6
|
+
new (): PDivider;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const dividerComponentCss = "/*! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com*/*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.my-2{margin-bottom:.5rem!important;margin-top:.5rem!important}.h-px{height:1px!important}.bg-mystic-medium{--tw-bg-opacity:1!important;background-color:rgb(227 236 243/var(--tw-bg-opacity))!important}:host{--tw-bg-opacity:1;background-color:rgb(227 236 243/var(--tw-bg-opacity));height:1px;margin-bottom:.5rem;margin-top:.5rem;width:100%}.static{position:static!important}";
|
|
4
|
+
|
|
5
|
+
const Divider = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
}
|
|
11
|
+
render() {
|
|
12
|
+
return h(Host, { class: "p-divider" });
|
|
13
|
+
}
|
|
14
|
+
static get style() { return dividerComponentCss; }
|
|
15
|
+
}, [1, "p-divider"]);
|
|
16
|
+
function defineCustomElement$1() {
|
|
17
|
+
if (typeof customElements === "undefined") {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const components = ["p-divider"];
|
|
21
|
+
components.forEach(tagName => { switch (tagName) {
|
|
22
|
+
case "p-divider":
|
|
23
|
+
if (!customElements.get(tagName)) {
|
|
24
|
+
customElements.define(tagName, Divider);
|
|
25
|
+
}
|
|
26
|
+
break;
|
|
27
|
+
} });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const PDivider = Divider;
|
|
31
|
+
const defineCustomElement = defineCustomElement$1;
|
|
32
|
+
|
|
33
|
+
export { PDivider, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PPaginationItem extends Components.PPaginationItem, HTMLElement {}
|
|
4
|
+
export const PPaginationItem: {
|
|
5
|
+
prototype: PPaginationItem;
|
|
6
|
+
new (): PPaginationItem;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface PPagination extends Components.PPagination, HTMLElement {}
|
|
4
|
+
export const PPagination: {
|
|
5
|
+
prototype: PPagination;
|
|
6
|
+
new (): PPagination;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$3 } from './icon.component.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './pagination-item.component.js';
|
|
4
|
+
|
|
5
|
+
const paginationComponentCss = "/*! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com*/*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.flex{display:flex!important}p-pagination{display:flex}.static{position:static!important}";
|
|
6
|
+
|
|
7
|
+
const Pagination = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super();
|
|
10
|
+
this.__registerHost();
|
|
11
|
+
this.pageChange = createEvent(this, "pageChange", 7);
|
|
12
|
+
/**
|
|
13
|
+
* The current page
|
|
14
|
+
*/
|
|
15
|
+
this.page = 1;
|
|
16
|
+
/**
|
|
17
|
+
* The amount of items per page
|
|
18
|
+
*/
|
|
19
|
+
this.pageSize = 12;
|
|
20
|
+
this._pages = [];
|
|
21
|
+
this._set = [];
|
|
22
|
+
this._nextClick = () => {
|
|
23
|
+
const nextPage = this.page + 1;
|
|
24
|
+
if (nextPage > this._pages[this._pages.length - 1]) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this._changePage(nextPage);
|
|
28
|
+
};
|
|
29
|
+
this._pageClick = (p) => this._changePage(p);
|
|
30
|
+
this._generateSet = (range = 1, enableBoundaries = true) => {
|
|
31
|
+
const totalPages = this._pages.length;
|
|
32
|
+
if (!totalPages) {
|
|
33
|
+
return [];
|
|
34
|
+
}
|
|
35
|
+
let start = this.page - range;
|
|
36
|
+
let end = this.page + range;
|
|
37
|
+
if (end > totalPages) {
|
|
38
|
+
end = totalPages;
|
|
39
|
+
start = totalPages - range * 2;
|
|
40
|
+
start = start < 1 ? 1 : start;
|
|
41
|
+
}
|
|
42
|
+
if (start <= 1) {
|
|
43
|
+
start = 1;
|
|
44
|
+
end = Math.min(range * 2 + 1, totalPages);
|
|
45
|
+
}
|
|
46
|
+
const set = [];
|
|
47
|
+
const previous = {
|
|
48
|
+
type: 'previous',
|
|
49
|
+
value: h("p-icon", { variant: "chevron", rotate: 90 }),
|
|
50
|
+
};
|
|
51
|
+
const next = {
|
|
52
|
+
type: 'next',
|
|
53
|
+
value: h("p-icon", { variant: "chevron", rotate: -90 }),
|
|
54
|
+
};
|
|
55
|
+
// Disable page range, display all the pages
|
|
56
|
+
if (range === null) {
|
|
57
|
+
const p = this._pages.map(p => ({
|
|
58
|
+
type: 'page',
|
|
59
|
+
value: p,
|
|
60
|
+
}));
|
|
61
|
+
return enableBoundaries ? [previous, ...p, next] : p;
|
|
62
|
+
}
|
|
63
|
+
if (enableBoundaries) {
|
|
64
|
+
set.push(previous);
|
|
65
|
+
}
|
|
66
|
+
if (start <= 3) {
|
|
67
|
+
for (let i = 1; i < start; i++) {
|
|
68
|
+
set.push({
|
|
69
|
+
type: 'page',
|
|
70
|
+
value: this._pages[i - 1],
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
set.push({
|
|
76
|
+
type: 'page',
|
|
77
|
+
value: 1,
|
|
78
|
+
});
|
|
79
|
+
set.push({
|
|
80
|
+
type: 'ellipsis',
|
|
81
|
+
value: 'ellipsis',
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
for (let i = start; i <= end; i++) {
|
|
85
|
+
set.push({
|
|
86
|
+
type: 'page',
|
|
87
|
+
value: this._pages[i - 1],
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
if (end >= totalPages - 2) {
|
|
91
|
+
for (let i = end + 1; i <= totalPages; i++) {
|
|
92
|
+
set.push({
|
|
93
|
+
type: 'page',
|
|
94
|
+
value: this._pages[i - 1],
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
set.push({
|
|
100
|
+
type: 'ellipsis',
|
|
101
|
+
});
|
|
102
|
+
set.push({
|
|
103
|
+
type: 'page',
|
|
104
|
+
value: this._pages[this._pages.length - 1],
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (enableBoundaries) {
|
|
108
|
+
set.push(next);
|
|
109
|
+
}
|
|
110
|
+
return set;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
componentWillRender() {
|
|
114
|
+
this._generate();
|
|
115
|
+
}
|
|
116
|
+
render() {
|
|
117
|
+
var _a;
|
|
118
|
+
return (h(Host, { class: "p-pagination" }, (_a = this._set) === null || _a === void 0 ? void 0 : _a.map(p => {
|
|
119
|
+
if (p.type === 'previous' || p.type === 'next') {
|
|
120
|
+
return h("p-pagination-item", { onClick: () => (p.type === 'previous' ? this._previousClick() : this._nextClick()) }, p.value);
|
|
121
|
+
}
|
|
122
|
+
if (p.type === 'ellipsis') {
|
|
123
|
+
return h("p-pagination-item", null, "...");
|
|
124
|
+
}
|
|
125
|
+
return (h("p-pagination-item", { active: p.value === this.page, onClick: () => this._pageClick(p.value) }, p.value));
|
|
126
|
+
})));
|
|
127
|
+
}
|
|
128
|
+
pageChangeHandler() {
|
|
129
|
+
console.log('Page changed!');
|
|
130
|
+
this._generate();
|
|
131
|
+
}
|
|
132
|
+
_generate() {
|
|
133
|
+
this._pages = this._generatePages();
|
|
134
|
+
this._set = this._generateSet();
|
|
135
|
+
}
|
|
136
|
+
_changePage(p) {
|
|
137
|
+
if (!p) {
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
this.pageChange.emit(p);
|
|
141
|
+
this.page = p;
|
|
142
|
+
}
|
|
143
|
+
_previousClick() {
|
|
144
|
+
const previousPage = this.page - 1;
|
|
145
|
+
if (previousPage < this._pages[0]) {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
this._changePage(previousPage);
|
|
149
|
+
}
|
|
150
|
+
_generatePages() {
|
|
151
|
+
if (!this.total || !this.pageSize) {
|
|
152
|
+
return [];
|
|
153
|
+
}
|
|
154
|
+
const pages = Math.ceil(this.total / this.pageSize);
|
|
155
|
+
return new Array(pages).fill(undefined).map((_, i) => i + 1);
|
|
156
|
+
}
|
|
157
|
+
static get watchers() { return {
|
|
158
|
+
"page": ["pageChangeHandler"]
|
|
159
|
+
}; }
|
|
160
|
+
static get style() { return paginationComponentCss; }
|
|
161
|
+
}, [0, "p-pagination", {
|
|
162
|
+
"page": [32],
|
|
163
|
+
"pageSize": [2, "page-size"],
|
|
164
|
+
"total": [2]
|
|
165
|
+
}]);
|
|
166
|
+
function defineCustomElement$1() {
|
|
167
|
+
if (typeof customElements === "undefined") {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
const components = ["p-pagination", "p-icon", "p-pagination-item"];
|
|
171
|
+
components.forEach(tagName => { switch (tagName) {
|
|
172
|
+
case "p-pagination":
|
|
173
|
+
if (!customElements.get(tagName)) {
|
|
174
|
+
customElements.define(tagName, Pagination);
|
|
175
|
+
}
|
|
176
|
+
break;
|
|
177
|
+
case "p-icon":
|
|
178
|
+
if (!customElements.get(tagName)) {
|
|
179
|
+
defineCustomElement$3();
|
|
180
|
+
}
|
|
181
|
+
break;
|
|
182
|
+
case "p-pagination-item":
|
|
183
|
+
if (!customElements.get(tagName)) {
|
|
184
|
+
defineCustomElement$2();
|
|
185
|
+
}
|
|
186
|
+
break;
|
|
187
|
+
} });
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
const PPagination = Pagination;
|
|
191
|
+
const defineCustomElement = defineCustomElement$1;
|
|
192
|
+
|
|
193
|
+
export { PPagination, defineCustomElement };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const paginationItemComponentCss = "/*! tailwindcss v3.1.4 | MIT License | https://tailwindcss.com*/*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;border:0 solid;box-sizing:border-box}:after,:before{--tw-content:\"\"}html{-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}::-webkit-backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.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))}.static{position:static!important}";
|
|
4
|
+
|
|
5
|
+
const PaginationItem = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.__attachShadow();
|
|
10
|
+
/**
|
|
11
|
+
* Wether the pagination item is active
|
|
12
|
+
*/
|
|
13
|
+
this.active = false;
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return (h(Host, { class: `p-pagination-item ${this.active && 'active'}` }, h("slot", null)));
|
|
17
|
+
}
|
|
18
|
+
static get style() { return paginationItemComponentCss; }
|
|
19
|
+
}, [1, "p-pagination-item", {
|
|
20
|
+
"active": [4]
|
|
21
|
+
}]);
|
|
22
|
+
function defineCustomElement() {
|
|
23
|
+
if (typeof customElements === "undefined") {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const components = ["p-pagination-item"];
|
|
27
|
+
components.forEach(tagName => { switch (tagName) {
|
|
28
|
+
case "p-pagination-item":
|
|
29
|
+
if (!customElements.get(tagName)) {
|
|
30
|
+
customElements.define(tagName, PaginationItem);
|
|
31
|
+
}
|
|
32
|
+
break;
|
|
33
|
+
} });
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export { PaginationItem as P, defineCustomElement as d };
|