@maggioli-design-system/mds-paginator 1.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/index-970ace02.js +1203 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +21 -0
- package/dist/cjs/mds-paginator.cjs.entry.js +59 -0
- package/dist/cjs/mds-paginator.cjs.js +19 -0
- package/dist/collection/collection-manifest.json +12 -0
- package/dist/collection/components/mds-paginator/mds-paginator.css +73 -0
- package/dist/collection/components/mds-paginator/mds-paginator.js +114 -0
- package/dist/collection/components/mds-paginator/test/mds-paginator.stories.js +26 -0
- package/dist/collection/dictionary/autocomplete.js +59 -0
- package/dist/collection/dictionary/button.js +26 -0
- package/dist/collection/dictionary/color.js +19 -0
- package/dist/collection/dictionary/floating-ui.js +19 -0
- package/dist/collection/dictionary/icon.js +3 -0
- package/dist/collection/dictionary/input-text-type.js +13 -0
- package/dist/collection/dictionary/loading.js +5 -0
- package/dist/collection/dictionary/typography.js +59 -0
- package/dist/collection/dictionary/variant.js +65 -0
- package/dist/collection/fixtures/cities.js +110 -0
- package/dist/collection/interface/input-value.js +1 -0
- package/dist/collection/types/autocomplete.js +1 -0
- package/dist/collection/types/button.js +1 -0
- package/dist/collection/types/floating-ui.js +1 -0
- package/dist/collection/types/form-rel.js +1 -0
- package/dist/collection/types/input-text-type.js +1 -0
- package/dist/collection/types/input-value-type.js +1 -0
- package/dist/collection/types/loading.js +1 -0
- package/dist/collection/types/typography.js +1 -0
- package/dist/collection/types/variant.js +1 -0
- package/dist/components/index.d.ts +22 -0
- package/dist/components/index.js +2 -0
- package/dist/components/mds-paginator.d.ts +11 -0
- package/dist/components/mds-paginator.js +76 -0
- package/dist/esm/index-2c9f4cc7.js +1175 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +17 -0
- package/dist/esm/mds-paginator.entry.js +55 -0
- package/dist/esm/mds-paginator.js +17 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm-es5/index-2c9f4cc7.js +2 -0
- package/dist/esm-es5/index.js +0 -0
- package/dist/esm-es5/loader.js +1 -0
- package/dist/esm-es5/mds-paginator.entry.js +1 -0
- package/dist/esm-es5/mds-paginator.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/mds-paginator/index.esm.js +0 -0
- package/dist/mds-paginator/mds-paginator.esm.js +1 -0
- package/dist/mds-paginator/mds-paginator.js +130 -0
- package/dist/mds-paginator/p-1af6182a.entry.js +1 -0
- package/dist/mds-paginator/p-4e602610.js +2 -0
- package/dist/mds-paginator/p-50ea2036.system.js +1 -0
- package/dist/mds-paginator/p-580a8708.system.js +2 -0
- package/dist/mds-paginator/p-628f5264.system.js +1 -0
- package/dist/mds-paginator/p-d71311fc.system.entry.js +1 -0
- package/dist/stats.json +487 -0
- package/dist/types/components/mds-paginator/mds-paginator.d.ts +20 -0
- package/dist/types/components/mds-paginator/test/mds-paginator.stories.d.ts +22 -0
- package/dist/types/components.d.ts +61 -0
- package/dist/types/dictionary/autocomplete.d.ts +2 -0
- package/dist/types/dictionary/button.d.ts +5 -0
- package/dist/types/dictionary/color.d.ts +3 -0
- package/dist/types/dictionary/floating-ui.d.ts +3 -0
- package/dist/types/dictionary/icon.d.ts +2 -0
- package/dist/types/dictionary/input-text-type.d.ts +2 -0
- package/dist/types/dictionary/loading.d.ts +2 -0
- package/dist/types/dictionary/typography.d.ts +9 -0
- package/dist/types/dictionary/variant.d.ts +9 -0
- package/dist/types/fixtures/cities.d.ts +2 -0
- package/dist/types/interface/input-value.d.ts +4 -0
- package/dist/types/stencil-public-runtime.d.ts +1565 -0
- package/dist/types/types/autocomplete.d.ts +2 -0
- package/dist/types/types/button.d.ts +4 -0
- package/dist/types/types/floating-ui.d.ts +2 -0
- package/dist/types/types/form-rel.d.ts +1 -0
- package/dist/types/types/input-text-type.d.ts +1 -0
- package/dist/types/types/input-value-type.d.ts +1 -0
- package/dist/types/types/loading.d.ts +1 -0
- package/dist/types/types/typography.d.ts +8 -0
- package/dist/types/types/variant.d.ts +10 -0
- package/loader/cdn.js +3 -0
- package/loader/index.cjs.js +3 -0
- package/loader/index.d.ts +12 -0
- package/loader/index.es2017.js +3 -0
- package/loader/index.js +4 -0
- package/loader/package.json +10 -0
- package/package.json +47 -0
- package/readme.md +40 -0
- package/src/components/mds-paginator/.gitlab-ci.yml +25 -0
- package/src/components/mds-paginator/mds-paginator.css +41 -0
- package/src/components/mds-paginator/mds-paginator.tsx +78 -0
- package/src/components/mds-paginator/readme.md +25 -0
- package/src/components/mds-paginator/test/mds-paginator.e2e.ts +12 -0
- package/src/components/mds-paginator/test/mds-paginator.spec.tsx +19 -0
- package/src/components/mds-paginator/test/mds-paginator.stories.tsx +31 -0
- package/src/components.d.ts +61 -0
- package/src/dictionary/autocomplete.ts +62 -0
- package/src/dictionary/button.ts +35 -0
- package/src/dictionary/color.ts +24 -0
- package/src/dictionary/floating-ui.ts +25 -0
- package/src/dictionary/icon.ts +5 -0
- package/src/dictionary/input-text-type.ts +17 -0
- package/src/dictionary/loading.ts +9 -0
- package/src/dictionary/typography.ts +76 -0
- package/src/dictionary/variant.ts +82 -0
- package/src/fixtures/cities.ts +116 -0
- package/src/fixtures/icons.json +65 -0
- package/src/interface/input-value.ts +5 -0
- package/src/tailwind/components.css +14 -0
- package/src/types/autocomplete.ts +69 -0
- package/src/types/button.ts +24 -0
- package/src/types/floating-ui.ts +17 -0
- package/src/types/form-rel.ts +11 -0
- package/src/types/input-text-type.ts +11 -0
- package/src/types/input-value-type.ts +5 -0
- package/src/types/loading.ts +3 -0
- package/src/types/typography.ts +57 -0
- package/src/types/variant.ts +73 -0
- package/www/build/index.esm.js +0 -0
- package/www/build/mds-paginator.esm.js +1 -0
- package/www/build/mds-paginator.js +130 -0
- package/www/build/p-1af6182a.entry.js +1 -0
- package/www/build/p-4e602610.js +2 -0
- package/www/build/p-50ea2036.system.js +1 -0
- package/www/build/p-580a8708.system.js +2 -0
- package/www/build/p-628f5264.system.js +1 -0
- package/www/build/p-d71311fc.system.entry.js +1 -0
- package/www/host.config.json +15 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-970ace02.js');
|
|
6
|
+
|
|
7
|
+
/*
|
|
8
|
+
Stencil Client Patch Esm v2.17.0 | MIT Licensed | https://stenciljs.com
|
|
9
|
+
*/
|
|
10
|
+
const patchEsm = () => {
|
|
11
|
+
return index.promiseResolve();
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const defineCustomElements = (win, options) => {
|
|
15
|
+
if (typeof window === 'undefined') return Promise.resolve();
|
|
16
|
+
return patchEsm().then(() => {
|
|
17
|
+
return index.bootstrapLazy([["mds-paginator.cjs",[[1,"mds-paginator",{"pages":[2],"currentPage":[1538,"current-page"]}]]]], options);
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
exports.defineCustomElements = defineCustomElements;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
const index = require('./index-970ace02.js');
|
|
6
|
+
|
|
7
|
+
const mdsPaginatorCss = ".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{--background:rgb(var(--tone-neutral-09));display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;gap:0.25rem}.pages{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(--background);gap:2px;}:host() .pages{-ms-overflow-style:none;scrollbar-width:none}.pages::-webkit-scrollbar{display:none}";
|
|
8
|
+
|
|
9
|
+
const MdsPaginator = class {
|
|
10
|
+
constructor(hostRef) {
|
|
11
|
+
index.registerInstance(this, hostRef);
|
|
12
|
+
this.pageChangedEvent = index.createEvent(this, "pageChangedEvent", 7);
|
|
13
|
+
/**
|
|
14
|
+
* Specifies the number of total pages to be handled
|
|
15
|
+
*/
|
|
16
|
+
this.pages = 0;
|
|
17
|
+
/**
|
|
18
|
+
* Specifies the current page selected in the paginator
|
|
19
|
+
*/
|
|
20
|
+
this.currentPage = 1;
|
|
21
|
+
this.scrollPage = () => {
|
|
22
|
+
const elementIndex = this.currentPage - 2;
|
|
23
|
+
const pagesElement = this.element.shadowRoot.querySelector('.pages');
|
|
24
|
+
const pagesItems = pagesElement.querySelectorAll('mds-paginator-item');
|
|
25
|
+
if (elementIndex < 0) {
|
|
26
|
+
pagesElement.scrollLeft = 0;
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (elementIndex > pagesItems.length - 1) {
|
|
30
|
+
const pageItem = pagesItems[pagesItems.length - 1];
|
|
31
|
+
pagesElement.scrollLeft = pageItem.offsetLeft - pagesElement.offsetLeft;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const pageItem = pagesItems[elementIndex];
|
|
35
|
+
pagesElement.scrollLeft = pageItem.offsetLeft - pagesElement.offsetLeft - (pagesElement.offsetWidth / 2) + (pageItem.offsetWidth / 2);
|
|
36
|
+
};
|
|
37
|
+
this.goToPage = (selectedPage) => {
|
|
38
|
+
if (selectedPage < 1 || selectedPage > this.pages) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
this.currentPage = selectedPage;
|
|
42
|
+
this.scrollPage();
|
|
43
|
+
this.pageChangedEvent.emit(this.currentPage);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
componentDidLoad() {
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
this.goToPage(this.currentPage);
|
|
49
|
+
}, 10);
|
|
50
|
+
}
|
|
51
|
+
render() {
|
|
52
|
+
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", { active: this.currentPage === 1, onClick: () => this.goToPage(1) }, "1"), this.pages > 2 &&
|
|
53
|
+
index.h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => index.h("mds-paginator-item", { key: i, active: this.currentPage === i + 2, onClick: () => this.goToPage(i + 2) }, i + 2))), this.pages && index.h("mds-paginator-item", { active: 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) })));
|
|
54
|
+
}
|
|
55
|
+
get element() { return index.getElement(this); }
|
|
56
|
+
};
|
|
57
|
+
MdsPaginator.style = mdsPaginatorCss;
|
|
58
|
+
|
|
59
|
+
exports.mds_paginator = MdsPaginator;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-970ace02.js');
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Stencil Client Patch Browser v2.17.0 | MIT Licensed | https://stenciljs.com
|
|
7
|
+
*/
|
|
8
|
+
const patchBrowser = () => {
|
|
9
|
+
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mds-paginator.cjs.js', document.baseURI).href));
|
|
10
|
+
const opts = {};
|
|
11
|
+
if (importMeta !== '') {
|
|
12
|
+
opts.resourcesUrl = new URL('.', importMeta).href;
|
|
13
|
+
}
|
|
14
|
+
return index.promiseResolve(opts);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
patchBrowser().then(options => {
|
|
18
|
+
return index.bootstrapLazy([["mds-paginator.cjs",[[1,"mds-paginator",{"pages":[2],"currentPage":[1538,"current-page"]}]]]], options);
|
|
19
|
+
});
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
.fixed {
|
|
2
|
+
|
|
3
|
+
position: fixed;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.absolute {
|
|
7
|
+
|
|
8
|
+
position: absolute;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.border {
|
|
12
|
+
|
|
13
|
+
border-width: 1px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.shadow {
|
|
17
|
+
|
|
18
|
+
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
19
|
+
|
|
20
|
+
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
21
|
+
|
|
22
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* @prop --background: Sets the background-color of the pages area and the item
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
:host {
|
|
30
|
+
|
|
31
|
+
--background: rgb(var(--tone-neutral-09));
|
|
32
|
+
|
|
33
|
+
display: flex;
|
|
34
|
+
|
|
35
|
+
align-items: center;
|
|
36
|
+
|
|
37
|
+
gap: 0.25rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.pages {
|
|
41
|
+
|
|
42
|
+
margin-left: 0.5rem;
|
|
43
|
+
|
|
44
|
+
margin-right: 0.5rem;
|
|
45
|
+
|
|
46
|
+
display: flex;
|
|
47
|
+
|
|
48
|
+
flex-shrink: 1;
|
|
49
|
+
|
|
50
|
+
align-items: center;
|
|
51
|
+
|
|
52
|
+
overflow: auto;
|
|
53
|
+
|
|
54
|
+
scroll-behavior: smooth;
|
|
55
|
+
|
|
56
|
+
border-radius: 9999px;
|
|
57
|
+
|
|
58
|
+
padding: 0.5rem;
|
|
59
|
+
|
|
60
|
+
background-color: var(--background);
|
|
61
|
+
gap: 2px;
|
|
62
|
+
|
|
63
|
+
/* scroll-snap-type: x mandatory; */
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host () .pages {
|
|
67
|
+
-ms-overflow-style: none;
|
|
68
|
+
scrollbar-width: none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.pages::-webkit-scrollbar {
|
|
72
|
+
display: none;
|
|
73
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { Component, Element, Event, Host, h, Prop } from '@stencil/core';
|
|
2
|
+
export class MdsPaginator {
|
|
3
|
+
constructor() {
|
|
4
|
+
/**
|
|
5
|
+
* Specifies the number of total pages to be handled
|
|
6
|
+
*/
|
|
7
|
+
this.pages = 0;
|
|
8
|
+
/**
|
|
9
|
+
* Specifies the current page selected in the paginator
|
|
10
|
+
*/
|
|
11
|
+
this.currentPage = 1;
|
|
12
|
+
this.scrollPage = () => {
|
|
13
|
+
const elementIndex = this.currentPage - 2;
|
|
14
|
+
const pagesElement = this.element.shadowRoot.querySelector('.pages');
|
|
15
|
+
const pagesItems = pagesElement.querySelectorAll('mds-paginator-item');
|
|
16
|
+
if (elementIndex < 0) {
|
|
17
|
+
pagesElement.scrollLeft = 0;
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (elementIndex > pagesItems.length - 1) {
|
|
21
|
+
const pageItem = pagesItems[pagesItems.length - 1];
|
|
22
|
+
pagesElement.scrollLeft = pageItem.offsetLeft - pagesElement.offsetLeft;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
const pageItem = pagesItems[elementIndex];
|
|
26
|
+
pagesElement.scrollLeft = pageItem.offsetLeft - pagesElement.offsetLeft - (pagesElement.offsetWidth / 2) + (pageItem.offsetWidth / 2);
|
|
27
|
+
};
|
|
28
|
+
this.goToPage = (selectedPage) => {
|
|
29
|
+
if (selectedPage < 1 || selectedPage > this.pages) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
this.currentPage = selectedPage;
|
|
33
|
+
this.scrollPage();
|
|
34
|
+
this.pageChangedEvent.emit(this.currentPage);
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
componentDidLoad() {
|
|
38
|
+
setTimeout(() => {
|
|
39
|
+
this.goToPage(this.currentPage);
|
|
40
|
+
}, 10);
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
return (h(Host, null,
|
|
44
|
+
h("mds-paginator-item", { icon: "mi/baseline/arrow-back", disabled: this.currentPage === 1, onClick: () => this.goToPage(this.currentPage - 1) }),
|
|
45
|
+
this.pages > 0 && h("mds-paginator-item", { active: this.currentPage === 1, onClick: () => this.goToPage(1) }, "1"),
|
|
46
|
+
this.pages > 2 &&
|
|
47
|
+
h("div", { class: "pages" }, Array.from(Array(this.pages - 2).keys()).map(i => h("mds-paginator-item", { key: i, active: this.currentPage === i + 2, onClick: () => this.goToPage(i + 2) }, i + 2))),
|
|
48
|
+
this.pages && h("mds-paginator-item", { active: this.currentPage === this.pages, onClick: () => this.goToPage(this.pages) }, this.pages),
|
|
49
|
+
h("mds-paginator-item", { icon: "mi/baseline/arrow-forward", disabled: this.currentPage === this.pages, onClick: () => this.goToPage(this.currentPage + 1) })));
|
|
50
|
+
}
|
|
51
|
+
static get is() { return "mds-paginator"; }
|
|
52
|
+
static get encapsulation() { return "shadow"; }
|
|
53
|
+
static get originalStyleUrls() { return {
|
|
54
|
+
"$": ["mds-paginator.css"]
|
|
55
|
+
}; }
|
|
56
|
+
static get styleUrls() { return {
|
|
57
|
+
"$": ["mds-paginator.css"]
|
|
58
|
+
}; }
|
|
59
|
+
static get properties() { return {
|
|
60
|
+
"pages": {
|
|
61
|
+
"type": "number",
|
|
62
|
+
"mutable": false,
|
|
63
|
+
"complexType": {
|
|
64
|
+
"original": "0",
|
|
65
|
+
"resolved": "0",
|
|
66
|
+
"references": {}
|
|
67
|
+
},
|
|
68
|
+
"required": false,
|
|
69
|
+
"optional": true,
|
|
70
|
+
"docs": {
|
|
71
|
+
"tags": [],
|
|
72
|
+
"text": "Specifies the number of total pages to be handled"
|
|
73
|
+
},
|
|
74
|
+
"attribute": "pages",
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"defaultValue": "0"
|
|
77
|
+
},
|
|
78
|
+
"currentPage": {
|
|
79
|
+
"type": "number",
|
|
80
|
+
"mutable": true,
|
|
81
|
+
"complexType": {
|
|
82
|
+
"original": "number",
|
|
83
|
+
"resolved": "number",
|
|
84
|
+
"references": {}
|
|
85
|
+
},
|
|
86
|
+
"required": false,
|
|
87
|
+
"optional": true,
|
|
88
|
+
"docs": {
|
|
89
|
+
"tags": [],
|
|
90
|
+
"text": "Specifies the current page selected in the paginator"
|
|
91
|
+
},
|
|
92
|
+
"attribute": "current-page",
|
|
93
|
+
"reflect": true,
|
|
94
|
+
"defaultValue": "1"
|
|
95
|
+
}
|
|
96
|
+
}; }
|
|
97
|
+
static get events() { return [{
|
|
98
|
+
"method": "pageChangedEvent",
|
|
99
|
+
"name": "pageChangedEvent",
|
|
100
|
+
"bubbles": true,
|
|
101
|
+
"cancelable": true,
|
|
102
|
+
"composed": true,
|
|
103
|
+
"docs": {
|
|
104
|
+
"tags": [],
|
|
105
|
+
"text": "Emits when a page is changed"
|
|
106
|
+
},
|
|
107
|
+
"complexType": {
|
|
108
|
+
"original": "number",
|
|
109
|
+
"resolved": "number",
|
|
110
|
+
"references": {}
|
|
111
|
+
}
|
|
112
|
+
}]; }
|
|
113
|
+
static get elementRef() { return "element"; }
|
|
114
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { lokiDisabled } from '@test/loki-disabled';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'UI / Paginator',
|
|
5
|
+
argTypes: {
|
|
6
|
+
pages: {
|
|
7
|
+
type: { name: 'number', required: false },
|
|
8
|
+
description: 'Specifies the number of total pages to be handled',
|
|
9
|
+
},
|
|
10
|
+
'current-page': {
|
|
11
|
+
type: { name: 'number', required: false },
|
|
12
|
+
description: 'Specifies the current page selected in the paginator',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
const Template = args => h("mds-paginator", Object.assign({}, args));
|
|
17
|
+
export const Default = Template.bind({});
|
|
18
|
+
Default.args = {
|
|
19
|
+
pages: 32,
|
|
20
|
+
};
|
|
21
|
+
export const currentPage = Template.bind({});
|
|
22
|
+
currentPage.args = {
|
|
23
|
+
'current-page': 16,
|
|
24
|
+
pages: 32,
|
|
25
|
+
};
|
|
26
|
+
currentPage.story = lokiDisabled;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const autoCompleteDictionary = [
|
|
2
|
+
'additional-name',
|
|
3
|
+
'address',
|
|
4
|
+
'address-level1',
|
|
5
|
+
'address-level2',
|
|
6
|
+
'address-level3',
|
|
7
|
+
'address-level4',
|
|
8
|
+
'address-line1',
|
|
9
|
+
'address-line2',
|
|
10
|
+
'address-line3',
|
|
11
|
+
'bday',
|
|
12
|
+
'bday-day',
|
|
13
|
+
'bday-month',
|
|
14
|
+
'bday-year',
|
|
15
|
+
'cc-additional-name',
|
|
16
|
+
'cc-csc',
|
|
17
|
+
'cc-exp',
|
|
18
|
+
'cc-exp-month',
|
|
19
|
+
'cc-exp-year',
|
|
20
|
+
'cc-family-name',
|
|
21
|
+
'cc-family-name',
|
|
22
|
+
'cc-given-name',
|
|
23
|
+
'cc-name',
|
|
24
|
+
'cc-number',
|
|
25
|
+
'cc-type',
|
|
26
|
+
'country',
|
|
27
|
+
'country-name',
|
|
28
|
+
'current-password',
|
|
29
|
+
'email',
|
|
30
|
+
'family-name',
|
|
31
|
+
'given-name',
|
|
32
|
+
'honorific-prefix',
|
|
33
|
+
'honorific-suffix',
|
|
34
|
+
'impp',
|
|
35
|
+
'language',
|
|
36
|
+
'name',
|
|
37
|
+
'new-password',
|
|
38
|
+
'nickname',
|
|
39
|
+
'off',
|
|
40
|
+
'on',
|
|
41
|
+
'one-time-code',
|
|
42
|
+
'organization',
|
|
43
|
+
'organization-title',
|
|
44
|
+
'photo',
|
|
45
|
+
'postal-code',
|
|
46
|
+
'sex',
|
|
47
|
+
'street-address',
|
|
48
|
+
'tel',
|
|
49
|
+
'tel-area-code',
|
|
50
|
+
'tel-country-code',
|
|
51
|
+
'tel-extension',
|
|
52
|
+
'tel-local',
|
|
53
|
+
'tel-national',
|
|
54
|
+
'transaction-amount',
|
|
55
|
+
'transaction-currency',
|
|
56
|
+
'url',
|
|
57
|
+
'username',
|
|
58
|
+
];
|
|
59
|
+
export { autoCompleteDictionary, };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const buttonVariantDictionary = [
|
|
2
|
+
'dark',
|
|
3
|
+
'error',
|
|
4
|
+
'info',
|
|
5
|
+
'light',
|
|
6
|
+
'primary',
|
|
7
|
+
'success',
|
|
8
|
+
'warning',
|
|
9
|
+
];
|
|
10
|
+
const buttonToneVariantDictionary = [
|
|
11
|
+
'strong',
|
|
12
|
+
'weak',
|
|
13
|
+
'ghost',
|
|
14
|
+
'quiet',
|
|
15
|
+
];
|
|
16
|
+
const buttonSizeDictionary = [
|
|
17
|
+
'sm',
|
|
18
|
+
'md',
|
|
19
|
+
'lg',
|
|
20
|
+
'xl',
|
|
21
|
+
];
|
|
22
|
+
const buttonIconPositionDictionary = [
|
|
23
|
+
'left',
|
|
24
|
+
'right',
|
|
25
|
+
];
|
|
26
|
+
export { buttonSizeDictionary, buttonToneVariantDictionary, buttonVariantDictionary, buttonIconPositionDictionary, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const colorLabelDictionary = [
|
|
2
|
+
'amaranth',
|
|
3
|
+
'aqua',
|
|
4
|
+
'blue',
|
|
5
|
+
'green',
|
|
6
|
+
'lime',
|
|
7
|
+
'orange',
|
|
8
|
+
'orchid',
|
|
9
|
+
'sky',
|
|
10
|
+
'violet',
|
|
11
|
+
'yellow',
|
|
12
|
+
];
|
|
13
|
+
const colorStatusDictionary = [
|
|
14
|
+
'error',
|
|
15
|
+
'info',
|
|
16
|
+
'success',
|
|
17
|
+
'warning',
|
|
18
|
+
];
|
|
19
|
+
export { colorLabelDictionary, colorStatusDictionary, };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const floatingUIPlacementDictionary = [
|
|
2
|
+
'bottom',
|
|
3
|
+
'bottom-end',
|
|
4
|
+
'bottom-start',
|
|
5
|
+
'left',
|
|
6
|
+
'left-end',
|
|
7
|
+
'left-start',
|
|
8
|
+
'right',
|
|
9
|
+
'right-end',
|
|
10
|
+
'right-start',
|
|
11
|
+
'top',
|
|
12
|
+
'top-end',
|
|
13
|
+
'top-start',
|
|
14
|
+
];
|
|
15
|
+
const floatingUIStrategyDictionary = [
|
|
16
|
+
'absolute',
|
|
17
|
+
'fixed',
|
|
18
|
+
];
|
|
19
|
+
export { floatingUIPlacementDictionary, floatingUIStrategyDictionary, };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const typographyDictionary = [
|
|
2
|
+
'action',
|
|
3
|
+
'caption',
|
|
4
|
+
'code',
|
|
5
|
+
'detail',
|
|
6
|
+
'h1',
|
|
7
|
+
'h2',
|
|
8
|
+
'h3',
|
|
9
|
+
'h4',
|
|
10
|
+
'h5',
|
|
11
|
+
'h6',
|
|
12
|
+
'hack',
|
|
13
|
+
'label',
|
|
14
|
+
'option',
|
|
15
|
+
'paragraph',
|
|
16
|
+
'tip',
|
|
17
|
+
];
|
|
18
|
+
const typographyVariationsDictionary = [
|
|
19
|
+
'title',
|
|
20
|
+
'info',
|
|
21
|
+
'read',
|
|
22
|
+
'mono',
|
|
23
|
+
];
|
|
24
|
+
const typographyMonoDictionary = [
|
|
25
|
+
'code',
|
|
26
|
+
'hack',
|
|
27
|
+
];
|
|
28
|
+
const typographyTitleDictionary = [
|
|
29
|
+
'action',
|
|
30
|
+
'h1',
|
|
31
|
+
'h2',
|
|
32
|
+
'h3',
|
|
33
|
+
'h4',
|
|
34
|
+
'h5',
|
|
35
|
+
'h6',
|
|
36
|
+
];
|
|
37
|
+
const typographyInfoDictionary = [
|
|
38
|
+
'caption',
|
|
39
|
+
'detail',
|
|
40
|
+
'label',
|
|
41
|
+
'option',
|
|
42
|
+
'paragraph',
|
|
43
|
+
'tip',
|
|
44
|
+
];
|
|
45
|
+
const typographyReadDictionary = [
|
|
46
|
+
'caption',
|
|
47
|
+
'detail',
|
|
48
|
+
'paragraph',
|
|
49
|
+
];
|
|
50
|
+
const typographySmallerDictionary = [
|
|
51
|
+
'option',
|
|
52
|
+
'tip',
|
|
53
|
+
];
|
|
54
|
+
const typographyTooltipDictionary = [
|
|
55
|
+
'caption',
|
|
56
|
+
'detail',
|
|
57
|
+
'tip',
|
|
58
|
+
];
|
|
59
|
+
export { typographyDictionary, typographyVariationsDictionary, typographyMonoDictionary, typographyTitleDictionary, typographyInfoDictionary, typographyReadDictionary, typographySmallerDictionary, typographyTooltipDictionary, };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const themeVariantDictionary = [
|
|
2
|
+
'dark',
|
|
3
|
+
'error',
|
|
4
|
+
'info',
|
|
5
|
+
'light',
|
|
6
|
+
'primary',
|
|
7
|
+
'success',
|
|
8
|
+
'warning',
|
|
9
|
+
];
|
|
10
|
+
const themeLuminanceVariantDictionary = [
|
|
11
|
+
'dark',
|
|
12
|
+
'light',
|
|
13
|
+
];
|
|
14
|
+
const themeStatusVariantDictionary = [
|
|
15
|
+
'error',
|
|
16
|
+
'info',
|
|
17
|
+
'success',
|
|
18
|
+
'warning',
|
|
19
|
+
];
|
|
20
|
+
const themeFullVariantDictionary = [
|
|
21
|
+
'amaranth',
|
|
22
|
+
'aqua',
|
|
23
|
+
'blue',
|
|
24
|
+
'dark',
|
|
25
|
+
'error',
|
|
26
|
+
'green',
|
|
27
|
+
'info',
|
|
28
|
+
'light',
|
|
29
|
+
'lime',
|
|
30
|
+
'orange',
|
|
31
|
+
'orchid',
|
|
32
|
+
'sky',
|
|
33
|
+
'success',
|
|
34
|
+
'violet',
|
|
35
|
+
'warning',
|
|
36
|
+
'yellow',
|
|
37
|
+
];
|
|
38
|
+
const themeLabelVariantDictionary = [
|
|
39
|
+
'amaranth',
|
|
40
|
+
'aqua',
|
|
41
|
+
'blue',
|
|
42
|
+
'green',
|
|
43
|
+
'lime',
|
|
44
|
+
'orange',
|
|
45
|
+
'orchid',
|
|
46
|
+
'sky',
|
|
47
|
+
'violet',
|
|
48
|
+
'yellow',
|
|
49
|
+
];
|
|
50
|
+
const toneVariantDictionary = [
|
|
51
|
+
'strong',
|
|
52
|
+
'weak',
|
|
53
|
+
'ghost',
|
|
54
|
+
'quiet',
|
|
55
|
+
];
|
|
56
|
+
const toneSimpleVariantDictionary = [
|
|
57
|
+
'strong',
|
|
58
|
+
'weak',
|
|
59
|
+
'quiet',
|
|
60
|
+
];
|
|
61
|
+
const toneMinimalVariantDictionary = [
|
|
62
|
+
'strong',
|
|
63
|
+
'weak',
|
|
64
|
+
];
|
|
65
|
+
export { themeFullVariantDictionary, themeLabelVariantDictionary, themeLuminanceVariantDictionary, themeStatusVariantDictionary, themeVariantDictionary, toneMinimalVariantDictionary, toneSimpleVariantDictionary, toneVariantDictionary, };
|