@maggioli-design-system/mds-paginator 2.2.0 → 3.0.0
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/dist/cjs/mds-paginator.cjs.entry.js +3 -3
- package/dist/collection/components/mds-paginator/mds-paginator.js +3 -3
- package/dist/components/mds-paginator.js +3 -3
- package/dist/esm/mds-paginator.entry.js +3 -3
- package/dist/esm-es5/mds-paginator.entry.js +1 -1
- package/dist/mds-paginator/mds-paginator.esm.js +1 -1
- package/dist/mds-paginator/p-c09061dd.entry.js +1 -0
- package/dist/mds-paginator/p-d375dd5d.system.js +1 -1
- package/dist/mds-paginator/p-e927fd87.system.entry.js +1 -0
- package/dist/stats.json +36 -36
- package/dist/types/components.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +3 -3
- package/src/components/mds-paginator/mds-paginator.tsx +4 -4
- package/src/components/mds-paginator/readme.md +3 -3
- package/src/components.d.ts +1 -1
- package/www/build/mds-paginator.esm.js +1 -1
- package/www/build/p-c09061dd.entry.js +1 -0
- package/www/build/p-d375dd5d.system.js +1 -1
- package/www/build/p-e927fd87.system.entry.js +1 -0
- package/dist/mds-paginator/p-2a7d3df7.system.entry.js +0 -1
- package/dist/mds-paginator/p-2f9cc631.entry.js +0 -1
- package/www/build/p-2a7d3df7.system.entry.js +0 -1
- package/www/build/p-2f9cc631.entry.js +0 -1
- /package/dist/collection/{types → type}/autocomplete.js +0 -0
- /package/dist/collection/{types → type}/button.js +0 -0
- /package/dist/collection/{types → type}/floating-ui.js +0 -0
- /package/dist/collection/{types → type}/form-rel.js +0 -0
- /package/dist/collection/{types → type}/input-text-type.js +0 -0
- /package/dist/collection/{types → type}/input-value-type.js +0 -0
- /package/dist/collection/{types → type}/loading.js +0 -0
- /package/dist/collection/{types → type}/typography.js +0 -0
- /package/dist/collection/{types → type}/variant.js +0 -0
- /package/dist/types/{types → type}/autocomplete.d.ts +0 -0
- /package/dist/types/{types → type}/button.d.ts +0 -0
- /package/dist/types/{types → type}/floating-ui.d.ts +0 -0
- /package/dist/types/{types → type}/form-rel.d.ts +0 -0
- /package/dist/types/{types → type}/input-text-type.d.ts +0 -0
- /package/dist/types/{types → type}/input-value-type.d.ts +0 -0
- /package/dist/types/{types → type}/loading.d.ts +0 -0
- /package/dist/types/{types → type}/typography.d.ts +0 -0
- /package/dist/types/{types → type}/variant.d.ts +0 -0
- /package/src/{types → type}/autocomplete.ts +0 -0
- /package/src/{types → type}/button.ts +0 -0
- /package/src/{types → type}/floating-ui.ts +0 -0
- /package/src/{types → type}/form-rel.ts +0 -0
- /package/src/{types → type}/input-text-type.ts +0 -0
- /package/src/{types → type}/input-value-type.ts +0 -0
- /package/src/{types → type}/loading.ts +0 -0
- /package/src/{types → type}/typography.ts +0 -0
- /package/src/{types → type}/variant.ts +0 -0
|
@@ -9,7 +9,7 @@ const mdsPaginatorCss = "@tailwind components; .fixed{position:fixed}.absolute{p
|
|
|
9
9
|
const MdsPaginator = class {
|
|
10
10
|
constructor(hostRef) {
|
|
11
11
|
index.registerInstance(this, hostRef);
|
|
12
|
-
this.pageChangedEvent = index.createEvent(this, "
|
|
12
|
+
this.pageChangedEvent = index.createEvent(this, "mdsPaginatorChange", 7);
|
|
13
13
|
this.scrollPage = () => {
|
|
14
14
|
const elementIndex = this.currentPage - 2;
|
|
15
15
|
const pagesElement = this.element.shadowRoot.querySelector('.pages');
|
|
@@ -45,8 +45,8 @@ const MdsPaginator = class {
|
|
|
45
45
|
}, 10);
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
|
-
return (index.h(index.Host, null, index.h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }), this.pages > 0 && index.h("mds-paginator-item", {
|
|
49
|
-
index.h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => index.h("mds-paginator-item", { key: i,
|
|
48
|
+
return (index.h(index.Host, null, index.h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }), this.pages > 0 && index.h("mds-paginator-item", { selected: this.currentPage === 1, onClick: () => this.goToPage(1) }, "1"), this.pages > 2 &&
|
|
49
|
+
index.h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => index.h("mds-paginator-item", { key: i, selected: this.currentPage === i + 2, onClick: () => this.goToPage(i + 2) }, i + 2))), this.pages > 1 && index.h("mds-paginator-item", { selected: this.currentPage === this.pages, onClick: () => this.goToPage(this.pages) }, this.pages), index.h("mds-paginator-item", { icon: "mi/baseline/arrow-forward", disabled: this.currentPage === this.pages, onClick: () => this.goToPage(this.currentPage + 1) })));
|
|
50
50
|
}
|
|
51
51
|
get element() { return index.getElement(this); }
|
|
52
52
|
};
|
|
@@ -36,8 +36,8 @@ export class MdsPaginator {
|
|
|
36
36
|
}, 10);
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h(Host, null, h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }), this.pages > 0 && h("mds-paginator-item", {
|
|
40
|
-
h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i,
|
|
39
|
+
return (h(Host, null, h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }), this.pages > 0 && h("mds-paginator-item", { selected: this.currentPage === 1, onClick: () => this.goToPage(1) }, "1"), this.pages > 2 &&
|
|
40
|
+
h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, selected: this.currentPage === i + 2, onClick: () => this.goToPage(i + 2) }, i + 2))), this.pages > 1 && h("mds-paginator-item", { selected: this.currentPage === this.pages, onClick: () => this.goToPage(this.pages) }, this.pages), h("mds-paginator-item", { icon: "mi/baseline/arrow-forward", disabled: this.currentPage === this.pages, onClick: () => this.goToPage(this.currentPage + 1) })));
|
|
41
41
|
}
|
|
42
42
|
static get is() { return "mds-paginator"; }
|
|
43
43
|
static get encapsulation() { return "shadow"; }
|
|
@@ -94,7 +94,7 @@ export class MdsPaginator {
|
|
|
94
94
|
static get events() {
|
|
95
95
|
return [{
|
|
96
96
|
"method": "pageChangedEvent",
|
|
97
|
-
"name": "
|
|
97
|
+
"name": "mdsPaginatorChange",
|
|
98
98
|
"bubbles": true,
|
|
99
99
|
"cancelable": true,
|
|
100
100
|
"composed": true,
|
|
@@ -7,7 +7,7 @@ const MdsPaginator$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
7
7
|
super();
|
|
8
8
|
this.__registerHost();
|
|
9
9
|
this.__attachShadow();
|
|
10
|
-
this.pageChangedEvent = createEvent(this, "
|
|
10
|
+
this.pageChangedEvent = createEvent(this, "mdsPaginatorChange", 7);
|
|
11
11
|
this.scrollPage = () => {
|
|
12
12
|
const elementIndex = this.currentPage - 2;
|
|
13
13
|
const pagesElement = this.element.shadowRoot.querySelector('.pages');
|
|
@@ -43,8 +43,8 @@ const MdsPaginator$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElemen
|
|
|
43
43
|
}, 10);
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, null, h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }), this.pages > 0 && h("mds-paginator-item", {
|
|
47
|
-
h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i,
|
|
46
|
+
return (h(Host, null, h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }), this.pages > 0 && h("mds-paginator-item", { selected: this.currentPage === 1, onClick: () => this.goToPage(1) }, "1"), this.pages > 2 &&
|
|
47
|
+
h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, selected: this.currentPage === i + 2, onClick: () => this.goToPage(i + 2) }, i + 2))), this.pages > 1 && h("mds-paginator-item", { selected: this.currentPage === this.pages, onClick: () => this.goToPage(this.pages) }, this.pages), h("mds-paginator-item", { icon: "mi/baseline/arrow-forward", disabled: this.currentPage === this.pages, onClick: () => this.goToPage(this.currentPage + 1) })));
|
|
48
48
|
}
|
|
49
49
|
get element() { return this; }
|
|
50
50
|
static get style() { return mdsPaginatorCss; }
|
|
@@ -5,7 +5,7 @@ const mdsPaginatorCss = "@tailwind components; .fixed{position:fixed}.absolute{p
|
|
|
5
5
|
const MdsPaginator = class {
|
|
6
6
|
constructor(hostRef) {
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
|
-
this.pageChangedEvent = createEvent(this, "
|
|
8
|
+
this.pageChangedEvent = createEvent(this, "mdsPaginatorChange", 7);
|
|
9
9
|
this.scrollPage = () => {
|
|
10
10
|
const elementIndex = this.currentPage - 2;
|
|
11
11
|
const pagesElement = this.element.shadowRoot.querySelector('.pages');
|
|
@@ -41,8 +41,8 @@ const MdsPaginator = class {
|
|
|
41
41
|
}, 10);
|
|
42
42
|
}
|
|
43
43
|
render() {
|
|
44
|
-
return (h(Host, null, h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }), this.pages > 0 && h("mds-paginator-item", {
|
|
45
|
-
h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i,
|
|
44
|
+
return (h(Host, null, h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }), this.pages > 0 && h("mds-paginator-item", { selected: this.currentPage === 1, onClick: () => this.goToPage(1) }, "1"), this.pages > 2 &&
|
|
45
|
+
h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, selected: this.currentPage === i + 2, onClick: () => this.goToPage(i + 2) }, i + 2))), this.pages > 1 && h("mds-paginator-item", { selected: this.currentPage === this.pages, onClick: () => this.goToPage(this.pages) }, this.pages), h("mds-paginator-item", { icon: "mi/baseline/arrow-forward", disabled: this.currentPage === this.pages, onClick: () => this.goToPage(this.currentPage + 1) })));
|
|
46
46
|
}
|
|
47
47
|
get element() { return getElement(this); }
|
|
48
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-af99740b.js";var mdsPaginatorCss="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";var MdsPaginator=function(){function e(e){var t=this;registerInstance(this,e);this.pageChangedEvent=createEvent(this,"
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-af99740b.js";var mdsPaginatorCss="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";var MdsPaginator=function(){function e(e){var t=this;registerInstance(this,e);this.pageChangedEvent=createEvent(this,"mdsPaginatorChange",7);this.scrollPage=function(){var e=t.currentPage-2;var r=t.element.shadowRoot.querySelector(".pages");var a=r.querySelectorAll("mds-paginator-item");if(e<0){r.scrollLeft=0;return}if(e>a.length-1){var o=a[a.length-1];r.scrollLeft=o.offsetLeft-r.offsetLeft;return}var n=a[e];r.scrollLeft=n.offsetLeft-r.offsetLeft-r.offsetWidth/2+n.offsetWidth/2};this.goToPage=function(e){if(e<1||e>t.pages){return}t.currentPage=e;if(t.pages>2){t.scrollPage()}t.pageChangedEvent.emit(t.currentPage)};this.pages=0;this.currentPage=1}e.prototype.componentDidLoad=function(){var e=this;setTimeout((function(){e.goToPage(e.currentPage)}),10)};e.prototype.render=function(){var e=this;return h(Host,null,h("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:this.currentPage===1,onClick:function(){return e.goToPage(e.currentPage-1)}}),this.pages>0&&h("mds-paginator-item",{selected:this.currentPage===1,onClick:function(){return e.goToPage(1)}},"1"),this.pages>2&&h("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((function(t){return h("mds-paginator-item",{key:t,selected:e.currentPage===t+2,onClick:function(){return e.goToPage(t+2)}},t+2)}))),this.pages>1&&h("mds-paginator-item",{selected:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.pages)}},this.pages),h("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.currentPage+1)}}))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();MdsPaginator.style=mdsPaginatorCss;export{MdsPaginator as mds_paginator};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as r,b as a}from"./p-bc44a1b3.js";export{s as setNonce}from"./p-bc44a1b3.js";(()=>{const a=import.meta.url,e={};return""!==a&&(e.resourcesUrl=new URL(".",a).href),r(e)})().then((r=>a([["p-
|
|
1
|
+
import{p as r,b as a}from"./p-bc44a1b3.js";export{s as setNonce}from"./p-bc44a1b3.js";(()=>{const a=import.meta.url,e={};return""!==a&&(e.resourcesUrl=new URL(".",a).href),r(e)})().then((r=>a([["p-c09061dd",[[1,"mds-paginator",{pages:[2],currentPage:[1538,"current-page"]}]]]],r)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as i,h as t,H as o,g as a}from"./p-bc44a1b3.js";const e=class{constructor(t){s(this,t),this.pageChangedEvent=i(this,"mdsPaginatorChange",7),this.scrollPage=()=>{const s=this.currentPage-2,i=this.element.shadowRoot.querySelector(".pages"),t=i.querySelectorAll("mds-paginator-item");if(s<0)return void(i.scrollLeft=0);if(s>t.length-1)return void(i.scrollLeft=t[t.length-1].offsetLeft-i.offsetLeft);const o=t[s];i.scrollLeft=o.offsetLeft-i.offsetLeft-i.offsetWidth/2+o.offsetWidth/2},this.goToPage=s=>{s<1||s>this.pages||(this.currentPage=s,this.pages>2&&this.scrollPage(),this.pageChangedEvent.emit(this.currentPage))},this.pages=0,this.currentPage=1}componentDidLoad(){setTimeout((()=>{this.goToPage(this.currentPage)}),10)}render(){return t(o,null,t("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:1===this.currentPage,onClick:()=>this.goToPage(this.currentPage-1)}),this.pages>0&&t("mds-paginator-item",{selected:1===this.currentPage,onClick:()=>this.goToPage(1)},"1"),this.pages>2&&t("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((s=>t("mds-paginator-item",{key:s,selected:this.currentPage===s+2,onClick:()=>this.goToPage(s+2)},s+2)))),this.pages>1&&t("mds-paginator-item",{selected:this.currentPage===this.pages,onClick:()=>this.goToPage(this.pages)},this.pages),t("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:()=>this.goToPage(this.currentPage+1)}))}get element(){return a(this)}};e.style="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";export{e as mds_paginator}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-a53254ac.system.js"],(function(e,r){"use strict";var t,n;return{setters:[function(r){t=r.p;n=r.b;e("setNonce",r.s)}],execute:function(){var e=function(){var e=r.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};e().then((function(e){return n([["p-
|
|
1
|
+
System.register(["./p-a53254ac.system.js"],(function(e,r){"use strict";var t,n;return{setters:[function(r){t=r.p;n=r.b;e("setNonce",r.s)}],execute:function(){var e=function(){var e=r.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};e().then((function(e){return n([["p-e927fd87.system",[[1,"mds-paginator",{pages:[2],currentPage:[1538,"current-page"]}]]]],e)}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-a53254ac.system.js"],(function(e){"use strict";var t,r,a,o,n;return{setters:[function(e){t=e.r;r=e.c;a=e.h;o=e.H;n=e.g}],execute:function(){var s="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";var i=e("mds_paginator",function(){function e(e){var a=this;t(this,e);this.pageChangedEvent=r(this,"mdsPaginatorChange",7);this.scrollPage=function(){var e=a.currentPage-2;var t=a.element.shadowRoot.querySelector(".pages");var r=t.querySelectorAll("mds-paginator-item");if(e<0){t.scrollLeft=0;return}if(e>r.length-1){var o=r[r.length-1];t.scrollLeft=o.offsetLeft-t.offsetLeft;return}var n=r[e];t.scrollLeft=n.offsetLeft-t.offsetLeft-t.offsetWidth/2+n.offsetWidth/2};this.goToPage=function(e){if(e<1||e>a.pages){return}a.currentPage=e;if(a.pages>2){a.scrollPage()}a.pageChangedEvent.emit(a.currentPage)};this.pages=0;this.currentPage=1}e.prototype.componentDidLoad=function(){var e=this;setTimeout((function(){e.goToPage(e.currentPage)}),10)};e.prototype.render=function(){var e=this;return a(o,null,a("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:this.currentPage===1,onClick:function(){return e.goToPage(e.currentPage-1)}}),this.pages>0&&a("mds-paginator-item",{selected:this.currentPage===1,onClick:function(){return e.goToPage(1)}},"1"),this.pages>2&&a("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((function(t){return a("mds-paginator-item",{key:t,selected:e.currentPage===t+2,onClick:function(){return e.goToPage(t+2)}},t+2)}))),this.pages>1&&a("mds-paginator-item",{selected:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.pages)}},this.pages),a("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.currentPage+1)}}))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());i.style=s}}}));
|
package/dist/stats.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2023-03-
|
|
2
|
+
"timestamp": "2023-03-09T10:55:16",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "node",
|
|
5
5
|
"version": "18.3.0"
|
|
@@ -30,15 +30,15 @@
|
|
|
30
30
|
"./dist/collection/dictionary/variant.js",
|
|
31
31
|
"./dist/collection/fixtures/cities.js",
|
|
32
32
|
"./dist/collection/interface/input-value.js",
|
|
33
|
-
"./dist/collection/
|
|
34
|
-
"./dist/collection/
|
|
35
|
-
"./dist/collection/
|
|
36
|
-
"./dist/collection/
|
|
37
|
-
"./dist/collection/
|
|
38
|
-
"./dist/collection/
|
|
39
|
-
"./dist/collection/
|
|
40
|
-
"./dist/collection/
|
|
41
|
-
"./dist/collection/
|
|
33
|
+
"./dist/collection/type/autocomplete.js",
|
|
34
|
+
"./dist/collection/type/button.js",
|
|
35
|
+
"./dist/collection/type/floating-ui.js",
|
|
36
|
+
"./dist/collection/type/form-rel.js",
|
|
37
|
+
"./dist/collection/type/input-text-type.js",
|
|
38
|
+
"./dist/collection/type/input-value-type.js",
|
|
39
|
+
"./dist/collection/type/loading.js",
|
|
40
|
+
"./dist/collection/type/typography.js",
|
|
41
|
+
"./dist/collection/type/variant.js"
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
{
|
|
@@ -75,21 +75,21 @@
|
|
|
75
75
|
"./dist/mds-paginator/index.esm.js",
|
|
76
76
|
"./dist/mds-paginator/mds-paginator.esm.js",
|
|
77
77
|
"./dist/mds-paginator/mds-paginator.js",
|
|
78
|
-
"./dist/mds-paginator/p-2a7d3df7.system.entry.js",
|
|
79
|
-
"./dist/mds-paginator/p-2f9cc631.entry.js",
|
|
80
78
|
"./dist/mds-paginator/p-50ea2036.system.js",
|
|
81
79
|
"./dist/mds-paginator/p-a53254ac.system.js",
|
|
82
80
|
"./dist/mds-paginator/p-bc44a1b3.js",
|
|
81
|
+
"./dist/mds-paginator/p-c09061dd.entry.js",
|
|
83
82
|
"./dist/mds-paginator/p-d375dd5d.system.js",
|
|
83
|
+
"./dist/mds-paginator/p-e927fd87.system.entry.js",
|
|
84
84
|
"./www/build/index.esm.js",
|
|
85
85
|
"./www/build/mds-paginator.esm.js",
|
|
86
86
|
"./www/build/mds-paginator.js",
|
|
87
|
-
"./www/build/p-2a7d3df7.system.entry.js",
|
|
88
|
-
"./www/build/p-2f9cc631.entry.js",
|
|
89
87
|
"./www/build/p-50ea2036.system.js",
|
|
90
88
|
"./www/build/p-a53254ac.system.js",
|
|
91
89
|
"./www/build/p-bc44a1b3.js",
|
|
92
|
-
"./www/build/p-
|
|
90
|
+
"./www/build/p-c09061dd.entry.js",
|
|
91
|
+
"./www/build/p-d375dd5d.system.js",
|
|
92
|
+
"./www/build/p-e927fd87.system.entry.js"
|
|
93
93
|
]
|
|
94
94
|
},
|
|
95
95
|
{
|
|
@@ -122,12 +122,12 @@
|
|
|
122
122
|
"components": [
|
|
123
123
|
"mds-paginator"
|
|
124
124
|
],
|
|
125
|
-
"bundleId": "p-
|
|
126
|
-
"fileName": "p-
|
|
125
|
+
"bundleId": "p-c09061dd",
|
|
126
|
+
"fileName": "p-c09061dd.entry.js",
|
|
127
127
|
"imports": [
|
|
128
128
|
"p-bc44a1b3.js"
|
|
129
129
|
],
|
|
130
|
-
"originalByteSize":
|
|
130
|
+
"originalByteSize": 3472
|
|
131
131
|
}
|
|
132
132
|
],
|
|
133
133
|
"esm": [
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
"imports": [
|
|
142
142
|
"index-af99740b.js"
|
|
143
143
|
],
|
|
144
|
-
"originalByteSize":
|
|
144
|
+
"originalByteSize": 3476
|
|
145
145
|
}
|
|
146
146
|
],
|
|
147
147
|
"es5": [
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"imports": [
|
|
156
156
|
"index-af99740b.js"
|
|
157
157
|
],
|
|
158
|
-
"originalByteSize":
|
|
158
|
+
"originalByteSize": 3476
|
|
159
159
|
}
|
|
160
160
|
],
|
|
161
161
|
"system": [
|
|
@@ -164,12 +164,12 @@
|
|
|
164
164
|
"components": [
|
|
165
165
|
"mds-paginator"
|
|
166
166
|
],
|
|
167
|
-
"bundleId": "p-
|
|
168
|
-
"fileName": "p-
|
|
167
|
+
"bundleId": "p-e927fd87.system",
|
|
168
|
+
"fileName": "p-e927fd87.system.entry.js",
|
|
169
169
|
"imports": [
|
|
170
170
|
"p-a53254ac.system.js"
|
|
171
171
|
],
|
|
172
|
-
"originalByteSize":
|
|
172
|
+
"originalByteSize": 3997
|
|
173
173
|
}
|
|
174
174
|
],
|
|
175
175
|
"commonjs": [
|
|
@@ -183,7 +183,7 @@
|
|
|
183
183
|
"imports": [
|
|
184
184
|
"index-0a1b6680.js"
|
|
185
185
|
],
|
|
186
|
-
"originalByteSize":
|
|
186
|
+
"originalByteSize": 3553
|
|
187
187
|
}
|
|
188
188
|
]
|
|
189
189
|
},
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"excludeFromCollection": false,
|
|
208
208
|
"events": [
|
|
209
209
|
{
|
|
210
|
-
"name": "
|
|
210
|
+
"name": "mdsPaginatorChange",
|
|
211
211
|
"method": "pageChangedEvent",
|
|
212
212
|
"bubbles": true,
|
|
213
213
|
"cancelable": true,
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
"listeners": [],
|
|
338
338
|
"events": [
|
|
339
339
|
{
|
|
340
|
-
"name": "
|
|
340
|
+
"name": "mdsPaginatorChange",
|
|
341
341
|
"method": "pageChangedEvent",
|
|
342
342
|
"bubbles": true,
|
|
343
343
|
"cancelable": true,
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
"icon",
|
|
439
439
|
"disabled",
|
|
440
440
|
"onClick",
|
|
441
|
-
"
|
|
441
|
+
"selected",
|
|
442
442
|
"class",
|
|
443
443
|
"key"
|
|
444
444
|
],
|
|
@@ -484,15 +484,15 @@
|
|
|
484
484
|
"./src/dictionary/variant.ts": [],
|
|
485
485
|
"./src/fixtures/cities.ts": [],
|
|
486
486
|
"./src/interface/input-value.ts": [],
|
|
487
|
-
"./src/
|
|
488
|
-
"./src/
|
|
489
|
-
"./src/
|
|
490
|
-
"./src/
|
|
491
|
-
"./src/
|
|
492
|
-
"./src/
|
|
493
|
-
"./src/
|
|
494
|
-
"./src/
|
|
495
|
-
"./src/
|
|
487
|
+
"./src/type/autocomplete.ts": [],
|
|
488
|
+
"./src/type/button.ts": [],
|
|
489
|
+
"./src/type/floating-ui.ts": [],
|
|
490
|
+
"./src/type/form-rel.ts": [],
|
|
491
|
+
"./src/type/input-text-type.ts": [],
|
|
492
|
+
"./src/type/input-value-type.ts": [],
|
|
493
|
+
"./src/type/loading.ts": [],
|
|
494
|
+
"./src/type/typography.ts": [],
|
|
495
|
+
"./src/type/variant.ts": []
|
|
496
496
|
},
|
|
497
497
|
"collections": []
|
|
498
498
|
}
|
|
@@ -41,7 +41,7 @@ declare namespace LocalJSX {
|
|
|
41
41
|
/**
|
|
42
42
|
* Emits when a page is changed
|
|
43
43
|
*/
|
|
44
|
-
"
|
|
44
|
+
"onMdsPaginatorChange"?: (event: MdsPaginatorCustomEvent<number>) => void;
|
|
45
45
|
/**
|
|
46
46
|
* Specifies the number of total pages to be handled
|
|
47
47
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maggioli-design-system/mds-paginator",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "mds-paginator is a web-component from Maggioli Design System Magma, built with StencilJS, TypeScript, Storybook. It's based on the web-component standard and it's designed to be agnostic from the JavaScirpt framework you are using.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
package/readme.md
CHANGED
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
## Events
|
|
17
17
|
|
|
18
|
-
| Event
|
|
19
|
-
|
|
|
20
|
-
| `
|
|
18
|
+
| Event | Description | Type |
|
|
19
|
+
| -------------------- | ---------------------------- | --------------------- |
|
|
20
|
+
| `mdsPaginatorChange` | Emits when a page is changed | `CustomEvent<number>` |
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
## CSS Custom Properties
|
|
@@ -28,7 +28,7 @@ export class MdsPaginator {
|
|
|
28
28
|
/**
|
|
29
29
|
* Emits when a page is changed
|
|
30
30
|
*/
|
|
31
|
-
@Event() pageChangedEvent: EventEmitter<number>
|
|
31
|
+
@Event({ eventName: 'mdsPaginatorChange' }) pageChangedEvent: EventEmitter<number>
|
|
32
32
|
|
|
33
33
|
private scrollPage = (): void => {
|
|
34
34
|
const elementIndex = this.currentPage - 2
|
|
@@ -65,13 +65,13 @@ export class MdsPaginator {
|
|
|
65
65
|
return (
|
|
66
66
|
<Host>
|
|
67
67
|
<mds-paginator-item icon="mi/baseline/arrow-back" disabled={this.currentPage === 1} onClick={() => this.goToPage(this.currentPage - 1)}/>
|
|
68
|
-
{ this.pages > 0 && <mds-paginator-item
|
|
68
|
+
{ this.pages > 0 && <mds-paginator-item selected={this.currentPage === 1} onClick={() => this.goToPage(1)}>1</mds-paginator-item>}
|
|
69
69
|
{ this.pages > 2 &&
|
|
70
70
|
<div class="pages">
|
|
71
|
-
{ Array.from(Array(this.pages - 2).keys()).map( i => <mds-paginator-item key={i}
|
|
71
|
+
{ Array.from(Array(this.pages - 2).keys()).map( i => <mds-paginator-item key={i} selected={this.currentPage === i + 2} onClick={() => this.goToPage(i + 2)}>{ i + 2 }</mds-paginator-item>) }
|
|
72
72
|
</div>
|
|
73
73
|
}
|
|
74
|
-
{ this.pages > 1 && <mds-paginator-item
|
|
74
|
+
{ this.pages > 1 && <mds-paginator-item selected={this.currentPage === this.pages} onClick={() => this.goToPage(this.pages)}>{ this.pages }</mds-paginator-item>}
|
|
75
75
|
<mds-paginator-item icon="mi/baseline/arrow-forward" disabled={this.currentPage === this.pages} onClick={() => this.goToPage(this.currentPage + 1)}/>
|
|
76
76
|
</Host>
|
|
77
77
|
)
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
|
|
16
16
|
## Events
|
|
17
17
|
|
|
18
|
-
| Event
|
|
19
|
-
|
|
|
20
|
-
| `
|
|
18
|
+
| Event | Description | Type |
|
|
19
|
+
| -------------------- | ---------------------------- | --------------------- |
|
|
20
|
+
| `mdsPaginatorChange` | Emits when a page is changed | `CustomEvent<number>` |
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
## CSS Custom Properties
|
package/src/components.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ declare namespace LocalJSX {
|
|
|
41
41
|
/**
|
|
42
42
|
* Emits when a page is changed
|
|
43
43
|
*/
|
|
44
|
-
"
|
|
44
|
+
"onMdsPaginatorChange"?: (event: MdsPaginatorCustomEvent<number>) => void;
|
|
45
45
|
/**
|
|
46
46
|
* Specifies the number of total pages to be handled
|
|
47
47
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as r,b as a}from"./p-bc44a1b3.js";export{s as setNonce}from"./p-bc44a1b3.js";(()=>{const a=import.meta.url,e={};return""!==a&&(e.resourcesUrl=new URL(".",a).href),r(e)})().then((r=>a([["p-
|
|
1
|
+
import{p as r,b as a}from"./p-bc44a1b3.js";export{s as setNonce}from"./p-bc44a1b3.js";(()=>{const a=import.meta.url,e={};return""!==a&&(e.resourcesUrl=new URL(".",a).href),r(e)})().then((r=>a([["p-c09061dd",[[1,"mds-paginator",{pages:[2],currentPage:[1538,"current-page"]}]]]],r)));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as i,h as t,H as o,g as a}from"./p-bc44a1b3.js";const e=class{constructor(t){s(this,t),this.pageChangedEvent=i(this,"mdsPaginatorChange",7),this.scrollPage=()=>{const s=this.currentPage-2,i=this.element.shadowRoot.querySelector(".pages"),t=i.querySelectorAll("mds-paginator-item");if(s<0)return void(i.scrollLeft=0);if(s>t.length-1)return void(i.scrollLeft=t[t.length-1].offsetLeft-i.offsetLeft);const o=t[s];i.scrollLeft=o.offsetLeft-i.offsetLeft-i.offsetWidth/2+o.offsetWidth/2},this.goToPage=s=>{s<1||s>this.pages||(this.currentPage=s,this.pages>2&&this.scrollPage(),this.pageChangedEvent.emit(this.currentPage))},this.pages=0,this.currentPage=1}componentDidLoad(){setTimeout((()=>{this.goToPage(this.currentPage)}),10)}render(){return t(o,null,t("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:1===this.currentPage,onClick:()=>this.goToPage(this.currentPage-1)}),this.pages>0&&t("mds-paginator-item",{selected:1===this.currentPage,onClick:()=>this.goToPage(1)},"1"),this.pages>2&&t("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((s=>t("mds-paginator-item",{key:s,selected:this.currentPage===s+2,onClick:()=>this.goToPage(s+2)},s+2)))),this.pages>1&&t("mds-paginator-item",{selected:this.currentPage===this.pages,onClick:()=>this.goToPage(this.pages)},this.pages),t("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:()=>this.goToPage(this.currentPage+1)}))}get element(){return a(this)}};e.style="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";export{e as mds_paginator}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-a53254ac.system.js"],(function(e,r){"use strict";var t,n;return{setters:[function(r){t=r.p;n=r.b;e("setNonce",r.s)}],execute:function(){var e=function(){var e=r.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};e().then((function(e){return n([["p-
|
|
1
|
+
System.register(["./p-a53254ac.system.js"],(function(e,r){"use strict";var t,n;return{setters:[function(r){t=r.p;n=r.b;e("setNonce",r.s)}],execute:function(){var e=function(){var e=r.meta.url;var n={};if(e!==""){n.resourcesUrl=new URL(".",e).href}return t(n)};e().then((function(e){return n([["p-e927fd87.system",[[1,"mds-paginator",{pages:[2],currentPage:[1538,"current-page"]}]]]],e)}))}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-a53254ac.system.js"],(function(e){"use strict";var t,r,a,o,n;return{setters:[function(e){t=e.r;r=e.c;a=e.h;o=e.H;n=e.g}],execute:function(){var s="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";var i=e("mds_paginator",function(){function e(e){var a=this;t(this,e);this.pageChangedEvent=r(this,"mdsPaginatorChange",7);this.scrollPage=function(){var e=a.currentPage-2;var t=a.element.shadowRoot.querySelector(".pages");var r=t.querySelectorAll("mds-paginator-item");if(e<0){t.scrollLeft=0;return}if(e>r.length-1){var o=r[r.length-1];t.scrollLeft=o.offsetLeft-t.offsetLeft;return}var n=r[e];t.scrollLeft=n.offsetLeft-t.offsetLeft-t.offsetWidth/2+n.offsetWidth/2};this.goToPage=function(e){if(e<1||e>a.pages){return}a.currentPage=e;if(a.pages>2){a.scrollPage()}a.pageChangedEvent.emit(a.currentPage)};this.pages=0;this.currentPage=1}e.prototype.componentDidLoad=function(){var e=this;setTimeout((function(){e.goToPage(e.currentPage)}),10)};e.prototype.render=function(){var e=this;return a(o,null,a("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:this.currentPage===1,onClick:function(){return e.goToPage(e.currentPage-1)}}),this.pages>0&&a("mds-paginator-item",{selected:this.currentPage===1,onClick:function(){return e.goToPage(1)}},"1"),this.pages>2&&a("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((function(t){return a("mds-paginator-item",{key:t,selected:e.currentPage===t+2,onClick:function(){return e.goToPage(t+2)}},t+2)}))),this.pages>1&&a("mds-paginator-item",{selected:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.pages)}},this.pages),a("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.currentPage+1)}}))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());i.style=s}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-a53254ac.system.js"],(function(e){"use strict";var t,r,a,o,n;return{setters:[function(e){t=e.r;r=e.c;a=e.h;o=e.H;n=e.g}],execute:function(){var i="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";var s=e("mds_paginator",function(){function e(e){var a=this;t(this,e);this.pageChangedEvent=r(this,"pageChangedEvent",7);this.scrollPage=function(){var e=a.currentPage-2;var t=a.element.shadowRoot.querySelector(".pages");var r=t.querySelectorAll("mds-paginator-item");if(e<0){t.scrollLeft=0;return}if(e>r.length-1){var o=r[r.length-1];t.scrollLeft=o.offsetLeft-t.offsetLeft;return}var n=r[e];t.scrollLeft=n.offsetLeft-t.offsetLeft-t.offsetWidth/2+n.offsetWidth/2};this.goToPage=function(e){if(e<1||e>a.pages){return}a.currentPage=e;if(a.pages>2){a.scrollPage()}a.pageChangedEvent.emit(a.currentPage)};this.pages=0;this.currentPage=1}e.prototype.componentDidLoad=function(){var e=this;setTimeout((function(){e.goToPage(e.currentPage)}),10)};e.prototype.render=function(){var e=this;return a(o,null,a("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:this.currentPage===1,onClick:function(){return e.goToPage(e.currentPage-1)}}),this.pages>0&&a("mds-paginator-item",{active:this.currentPage===1,onClick:function(){return e.goToPage(1)}},"1"),this.pages>2&&a("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((function(t){return a("mds-paginator-item",{key:t,active:e.currentPage===t+2,onClick:function(){return e.goToPage(t+2)}},t+2)}))),this.pages>1&&a("mds-paginator-item",{active:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.pages)}},this.pages),a("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.currentPage+1)}}))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());s.style=i}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as s,h as t,H as a,g as o}from"./p-bc44a1b3.js";const r=class{constructor(t){i(this,t),this.pageChangedEvent=s(this,"pageChangedEvent",7),this.scrollPage=()=>{const i=this.currentPage-2,s=this.element.shadowRoot.querySelector(".pages"),t=s.querySelectorAll("mds-paginator-item");if(i<0)return void(s.scrollLeft=0);if(i>t.length-1)return void(s.scrollLeft=t[t.length-1].offsetLeft-s.offsetLeft);const a=t[i];s.scrollLeft=a.offsetLeft-s.offsetLeft-s.offsetWidth/2+a.offsetWidth/2},this.goToPage=i=>{i<1||i>this.pages||(this.currentPage=i,this.pages>2&&this.scrollPage(),this.pageChangedEvent.emit(this.currentPage))},this.pages=0,this.currentPage=1}componentDidLoad(){setTimeout((()=>{this.goToPage(this.currentPage)}),10)}render(){return t(a,null,t("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:1===this.currentPage,onClick:()=>this.goToPage(this.currentPage-1)}),this.pages>0&&t("mds-paginator-item",{active:1===this.currentPage,onClick:()=>this.goToPage(1)},"1"),this.pages>2&&t("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((i=>t("mds-paginator-item",{key:i,active:this.currentPage===i+2,onClick:()=>this.goToPage(i+2)},i+2)))),this.pages>1&&t("mds-paginator-item",{active:this.currentPage===this.pages,onClick:()=>this.goToPage(this.pages)},this.pages),t("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:()=>this.goToPage(this.currentPage+1)}))}get element(){return o(this)}};r.style="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";export{r as mds_paginator}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-a53254ac.system.js"],(function(e){"use strict";var t,r,a,o,n;return{setters:[function(e){t=e.r;r=e.c;a=e.h;o=e.H;n=e.g}],execute:function(){var i="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";var s=e("mds_paginator",function(){function e(e){var a=this;t(this,e);this.pageChangedEvent=r(this,"pageChangedEvent",7);this.scrollPage=function(){var e=a.currentPage-2;var t=a.element.shadowRoot.querySelector(".pages");var r=t.querySelectorAll("mds-paginator-item");if(e<0){t.scrollLeft=0;return}if(e>r.length-1){var o=r[r.length-1];t.scrollLeft=o.offsetLeft-t.offsetLeft;return}var n=r[e];t.scrollLeft=n.offsetLeft-t.offsetLeft-t.offsetWidth/2+n.offsetWidth/2};this.goToPage=function(e){if(e<1||e>a.pages){return}a.currentPage=e;if(a.pages>2){a.scrollPage()}a.pageChangedEvent.emit(a.currentPage)};this.pages=0;this.currentPage=1}e.prototype.componentDidLoad=function(){var e=this;setTimeout((function(){e.goToPage(e.currentPage)}),10)};e.prototype.render=function(){var e=this;return a(o,null,a("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:this.currentPage===1,onClick:function(){return e.goToPage(e.currentPage-1)}}),this.pages>0&&a("mds-paginator-item",{active:this.currentPage===1,onClick:function(){return e.goToPage(1)}},"1"),this.pages>2&&a("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((function(t){return a("mds-paginator-item",{key:t,active:e.currentPage===t+2,onClick:function(){return e.goToPage(t+2)}},t+2)}))),this.pages>1&&a("mds-paginator-item",{active:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.pages)}},this.pages),a("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:function(){return e.goToPage(e.currentPage+1)}}))};Object.defineProperty(e.prototype,"element",{get:function(){return n(this)},enumerable:false,configurable:true});return e}());s.style=i}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as s,h as t,H as a,g as o}from"./p-bc44a1b3.js";const r=class{constructor(t){i(this,t),this.pageChangedEvent=s(this,"pageChangedEvent",7),this.scrollPage=()=>{const i=this.currentPage-2,s=this.element.shadowRoot.querySelector(".pages"),t=s.querySelectorAll("mds-paginator-item");if(i<0)return void(s.scrollLeft=0);if(i>t.length-1)return void(s.scrollLeft=t[t.length-1].offsetLeft-s.offsetLeft);const a=t[i];s.scrollLeft=a.offsetLeft-s.offsetLeft-s.offsetWidth/2+a.offsetWidth/2},this.goToPage=i=>{i<1||i>this.pages||(this.currentPage=i,this.pages>2&&this.scrollPage(),this.pageChangedEvent.emit(this.currentPage))},this.pages=0,this.currentPage=1}componentDidLoad(){setTimeout((()=>{this.goToPage(this.currentPage)}),10)}render(){return t(a,null,t("mds-paginator-item",{icon:"mi/baseline/arrow-back",disabled:1===this.currentPage,onClick:()=>this.goToPage(this.currentPage-1)}),this.pages>0&&t("mds-paginator-item",{active:1===this.currentPage,onClick:()=>this.goToPage(1)},"1"),this.pages>2&&t("div",{class:"pages"},Array.from(Array(this.pages-2).keys()).map((i=>t("mds-paginator-item",{key:i,active:this.currentPage===i+2,onClick:()=>this.goToPage(i+2)},i+2)))),this.pages>1&&t("mds-paginator-item",{active:this.currentPage===this.pages,onClick:()=>this.goToPage(this.pages)},this.pages),t("mds-paginator-item",{icon:"mi/baseline/arrow-forward",disabled:this.currentPage===this.pages,onClick:()=>this.goToPage(this.currentPage+1)}))}get element(){return o(this)}};r.style="@tailwind components; .fixed{position:fixed}.absolute{position:absolute}.border{border-width:1px}.shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);-webkit-box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}:host{--mds-paginator-background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{-webkit-overflow-scrolling:touch;-ms-overflow-style:none;scrollbar-width:none;margin-left:0.5rem;margin-right:0.5rem;display:-ms-flexbox;display:flex;-ms-flex-negative:1;flex-shrink:1;-ms-flex-align:center;align-items:center;overflow:auto;scroll-behavior:smooth;border-radius:9999px;padding:0.5rem;background-color:var(--mds-paginator-background);gap:2px}.pages::-webkit-scrollbar{display:none}";export{r as mds_paginator}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|