@italia/pagination 1.0.0-alpha.5
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/AUTHORS +1 -0
- package/LICENSE +11 -0
- package/README.md +29 -0
- package/custom-elements.json +735 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/it-pagination-item.d.ts +26 -0
- package/dist/src/it-pagination-item.d.ts.map +1 -0
- package/dist/src/it-pagination-item.js +490 -0
- package/dist/src/it-pagination-item.js.map +1 -0
- package/dist/src/it-pagination.d.ts +49 -0
- package/dist/src/it-pagination.d.ts.map +1 -0
- package/dist/src/it-pagination.js +818 -0
- package/dist/src/it-pagination.js.map +1 -0
- package/dist/src/types.d.ts +5 -0
- package/dist/src/types.d.ts.map +1 -0
- package/package.json +70 -0
- package/styles/globals.scss +167 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"it-pagination.js","sources":["../../../src/it-pagination.ts"],"sourcesContent":["/* eslint-disable lit-a11y/click-events-have-key-events */\n\nimport { BaseComponent } from '@italia/globals';\nimport { html } from 'lit';\nimport { when } from 'lit/directives/when.js';\nimport { customElement, property, queryAssignedElements } from 'lit/decorators.js';\nimport type { ItPaginationItem } from './it-pagination-item.js';\nimport type { PaginationAlignment } from './types.js';\nimport styles from './pagination.scss';\n\n@customElement('it-pagination')\nexport class ItPagination extends BaseComponent {\n static styles = styles;\n\n static shadowRootOptions = { ...BaseComponent.shadowRootOptions, delegatesFocus: true };\n\n @queryAssignedElements({ selector: 'it-pagination-item' })\n private paginationItems!: ItPaginationItem[];\n\n @queryAssignedElements({ slot: 'prev' })\n private prevElements!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'next' })\n private nextElements!: HTMLElement[];\n\n @queryAssignedElements({ slot: 'total' })\n private totalElements!: HTMLElement[];\n\n @property({ type: String, reflect: true })\n value = '1';\n\n @property({ type: String, reflect: true })\n total = undefined;\n\n @property({ type: String, reflect: true })\n align: PaginationAlignment = 'center';\n\n @property({ type: Boolean, reflect: true })\n disableResponsive = false;\n\n @property({ type: Boolean, reflect: true, attribute: 'simple-mode' })\n simpleMode = false;\n\n @property({ type: Number, reflect: true, attribute: 'visible-pages' })\n visiblePages = 5;\n\n @property({ type: String, attribute: 'it-aria-label', reflect: true })\n itAriaLabel = '';\n\n override updated(changedProperties: Map<string | number | symbol, unknown>) {\n super.updated?.(changedProperties);\n\n if (\n changedProperties.has('value') ||\n changedProperties.has('total') ||\n changedProperties.has('simpleMode') ||\n changedProperties.has('visiblePages')\n ) {\n this.updatePaginationItems();\n this.updatePaginationItemsClasses();\n this.updateNavigationButtons();\n }\n if (changedProperties.has('disableResponsive') && changedProperties.get('disableResponsive') !== undefined) {\n this.updatePaginationItemsClasses();\n }\n }\n\n private emitPageChange(newPage: number) {\n const currentPage = parseInt(this.value, 10);\n const totalPages = this.total ? parseInt(this.total, 10) : this.paginationItems.length;\n\n if (newPage < 1) return;\n if (totalPages > 0 && newPage > totalPages) return;\n\n if (newPage === currentPage) return;\n const event = new CustomEvent('it-pagination-change', {\n detail: { page: newPage },\n bubbles: true,\n composed: true,\n });\n this.dispatchEvent(event);\n this.value = newPage.toString();\n }\n\n private handleItemClick(e: CustomEvent) {\n e.stopPropagation(); // Fermiamo l'evento interno, non serve che esca\n const page = parseInt(e.detail.page, 10);\n if (!Number.isNaN(page)) {\n this.emitPageChange(page);\n }\n }\n\n private handlePrevClick(e: MouseEvent) {\n e.preventDefault();\n\n const currentPage = parseInt(this.value, 10);\n if (currentPage > 1) {\n this.emitPageChange(currentPage - 1);\n }\n }\n\n private handleNextClick(e: MouseEvent) {\n e.preventDefault();\n const currentPage = parseInt(this.value, 10);\n const totalPages = this.total ? parseInt(this.total, 10) : this.paginationItems.length;\n\n // Se non c'è 'total', assumiamo che ci siano altre pagine finché ci sono items\n if (!totalPages || currentPage < totalPages) {\n this.emitPageChange(currentPage + 1);\n }\n }\n\n private updatePaginationItemsClasses() {\n if (this.paginationItems.length) {\n const pages = this.calculatePages();\n\n this.paginationItems.forEach((item) => {\n const isCurrentPage = item.page === this.value;\n const itemPageNum = parseInt(item.page, 10);\n const isInVisiblePages = pages.includes(itemPageNum);\n\n // Remove all classes first\n item.classList.remove('d-none', 'd-sm-flex');\n\n // In simple mode, hide all pagination items (we render current/total instead)\n if (this.simpleMode) {\n item.classList.add('d-none');\n return;\n }\n\n // In more mode, hide items not in visible pages\n if (!isInVisiblePages) {\n item.classList.add('d-none');\n return;\n }\n\n // Apply responsive hiding for non-current pages (when NOT disabled)\n if (!this.disableResponsive && !isCurrentPage) {\n item.classList.add('d-none', 'd-sm-flex');\n }\n });\n }\n }\n\n private updatePaginationItems() {\n if (this.paginationItems.length) {\n this.paginationItems.forEach((item) => {\n const isCurrentPage = item.page === this.value;\n // eslint-disable-next-line no-param-reassign\n item.current = isCurrentPage;\n });\n }\n }\n\n private updateNavigationButtons() {\n const currentPage = parseInt(this.value, 10);\n const totalPages = this.total ? parseInt(this.total, 10) : this.paginationItems.length;\n\n // Update prev button visual state\n if (this.prevElements.length) {\n this.prevElements.forEach((el) => {\n if (currentPage <= 1) {\n el.setAttribute('aria-disabled', 'true');\n el.classList.add('disabled');\n // el.setAttribute('tabindex', '-1');\n } else {\n el.removeAttribute('aria-disabled');\n el.classList.remove('disabled');\n }\n el.classList.add('page-link');\n });\n }\n\n // Update next button visual state\n if (this.nextElements.length) {\n this.nextElements.forEach((el) => {\n if (totalPages && currentPage >= totalPages) {\n el.setAttribute('aria-disabled', 'true');\n el.classList.add('disabled');\n } else {\n el.removeAttribute('aria-disabled');\n el.classList.remove('disabled');\n }\n el.classList.add('page-link');\n });\n }\n }\n\n private handleSlotChange() {\n this.updatePaginationItems();\n this.updatePaginationItemsClasses();\n this.updateNavigationButtons();\n }\n\n private handlePrevSlotChange() {\n this.updateNavigationButtons();\n }\n\n private handleNextSlotChange() {\n this.updateNavigationButtons();\n }\n\n private handleTotalSlotChange() {\n // Update component and rerender when total slot changes\n this.requestUpdate();\n }\n\n /**\n * Calculate which pages to display based on simpleMode and visiblePages\n * Returns an array of page numbers to show\n */\n private calculatePages(): number[] {\n const currentPage = parseInt(this.value, 10);\n const totalPages = this.total ? parseInt(this.total, 10) : this.paginationItems.length;\n\n if (this.simpleMode) {\n return [currentPage];\n }\n\n if (totalPages <= this.visiblePages) {\n // If total pages is less than visiblePages, show all\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n // More mode: calculate which pages to show\n const halfVisiblePages = Math.floor(this.visiblePages / 2);\n let start = currentPage > halfVisiblePages ? currentPage - halfVisiblePages : 1;\n\n // Calculate the length based on visible pages\n const length = this.visiblePages;\n\n // Adjust start if we're near the end\n if (currentPage >= totalPages) {\n start -= halfVisiblePages;\n } else if (currentPage >= totalPages - halfVisiblePages) {\n start -= totalPages - (currentPage + 1);\n }\n\n // Make sure start is at least 1\n if (start < 1) {\n start = 1;\n }\n\n return Array.from({ length }, (_, i) => i + start).filter((page) => page <= totalPages);\n }\n\n override render() {\n const navClasses = this.composeClass('pagination-wrapper', this.totalElements.length > 0 && 'pagination-total');\n const ulClasses = this.composeClass('pagination', this.disableResponsive && 'pagination-responsive');\n\n const currentPage = parseInt(this.value, 10);\n const totalPages = this.total ? parseInt(this.total, 10) : this.paginationItems.length;\n const pages = this.calculatePages();\n\n const showFirstPage = totalPages > this.visiblePages && pages[0] > 1;\n const showFirstEllipsis = totalPages > this.visiblePages && pages[0] > 2;\n const showLastPage = totalPages > this.visiblePages && pages[pages.length - 1] < totalPages;\n const showLastEllipsis = totalPages > this.visiblePages && pages[pages.length - 1] < totalPages - 1;\n\n return html`\n <nav class=\"${navClasses}\" aria-label=\"${this.itAriaLabel}\">\n <ul class=\"${ulClasses}\" @it-item-click=\"${this.handleItemClick}\" part=\"pagination-list\">\n <li class=\"pagination-prev-wrapper page-item\" @click=\"${this.handlePrevClick}\">\n <slot name=\"prev\" @slotchange=\"${this.handlePrevSlotChange}\"></slot>\n </li>\n\n ${when(\n this.simpleMode,\n () => html`\n <li class=\"page-item visually-hidden\">\n <a class=\"page-link\" href=\"#\" aria-current=\"page\"> Pagina ${currentPage} di ${totalPages} </a>\n </li>\n <li class=\"page-item active\" part=\"current-page-simple-mode\">\n <span class=\"page-link\" aria-current=\"page\">${currentPage}</span>\n </li>\n <li class=\"page-item\" aria-hidden=\"true\"><span class=\"page-link\">/</span></li>\n <li class=\"page-item\" part=\"total-pages-simple-mode\">\n <span class=\"page-link\">${totalPages}</span>\n </li>\n `,\n () => html`\n ${when(\n showFirstPage,\n () => html`\n <li class=\"page-item more\">\n <a class=\"page-link\" href=\"#\" @click=\"${(e: MouseEvent) => this.handlePageClick(e, 1)}\">1</a>\n </li>\n `,\n )}\n ${when(\n showFirstEllipsis,\n () => html`\n <li class=\"page-item more\">\n <span class=\"page-link\">...</span>\n </li>\n `,\n )}\n <slot @slotchange=\"${this.handleSlotChange}\"></slot>\n ${when(\n showLastEllipsis,\n () => html`\n <li class=\"page-item more\">\n <span class=\"page-link\">...</span>\n </li>\n `,\n )}\n ${when(\n showLastPage,\n () => html`\n <li class=\"page-item more\">\n <a class=\"page-link\" href=\"#\" @click=\"${(e: MouseEvent) => this.handlePageClick(e, totalPages)}\">\n ${totalPages}\n </a>\n </li>\n `,\n )}\n `,\n )}\n\n <li class=\"pagination-next-wrapper page-item\" @click=\"${this.handleNextClick}\">\n <slot name=\"next\" @slotchange=\"${this.handleNextSlotChange}\"></slot>\n </li>\n </ul>\n\n <slot name=\"page-changer\"></slot>\n <slot name=\"jump-to-page\"></slot>\n <slot name=\"total\" @slotchange=\"${this.handleTotalSlotChange}\"></slot>\n </nav>\n `;\n }\n\n private handlePageClick(e: MouseEvent, page: number) {\n e.preventDefault();\n this.emitPageChange(page);\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'it-pagination': ItPagination;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;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,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAGjB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;AACrD,CAAA,EAAA,YAAA,CAAA,SAAA,EAAA,aAAA,EAAA,MAAA,CAAA;AApCN,YAAY,GAAA,UAAA,CAAA;IADxB,aAAa,CAAC,eAAe;AACjB,CAAA,EAAA,YAAY,CAoUxB;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const PAGINATION_SIZES: readonly ["sm", "lg"];
|
|
2
|
+
export declare const PAGINATION_ALIGNMENTS: readonly ["start", "center", "end"];
|
|
3
|
+
export type PaginationSize = (typeof PAGINATION_SIZES)[number];
|
|
4
|
+
export type PaginationAlignment = (typeof PAGINATION_ALIGNMENTS)[number];
|
|
5
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,uBAAwB,CAAC;AACtD,eAAO,MAAM,qBAAqB,qCAAsC,CAAC;AAEzE,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/D,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@italia/pagination",
|
|
3
|
+
"description": "Web component it-pagination del Design system .italia",
|
|
4
|
+
"version": "1.0.0-alpha.5",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"license": "BSD-3-Clause",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/italia/dev-kit-italia.git",
|
|
12
|
+
"directory": "packages/pagination"
|
|
13
|
+
},
|
|
14
|
+
"author": "Presidenza del Consiglio dei Ministri",
|
|
15
|
+
"homepage": "https://italia.github.io/dev-kit-italia",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/italia/dev-kit-italia/issues"
|
|
18
|
+
},
|
|
19
|
+
"type": "module",
|
|
20
|
+
"main": "./dist/src/index.js",
|
|
21
|
+
"module": "./dist/src/index.js",
|
|
22
|
+
"types": "./dist/src/it-pagination.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./dist/src/index.js",
|
|
25
|
+
"./it-pagination.js": "./dist/src/it-pagination.js",
|
|
26
|
+
"./it-pagination-item.js": "./dist/src/it-pagination-item.js",
|
|
27
|
+
"./styles/*": "./styles/*"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist/src",
|
|
31
|
+
"styles",
|
|
32
|
+
"README.md",
|
|
33
|
+
"AUTHORS",
|
|
34
|
+
"LICENSE",
|
|
35
|
+
"custom-elements.json"
|
|
36
|
+
],
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"bootstrap-italia": "3.0.0-alpha.0",
|
|
39
|
+
"lit": "^3.2.1",
|
|
40
|
+
"@italia/globals": "^1.0.0-alpha.5"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@custom-elements-manifest/analyzer": "^0.10.3",
|
|
44
|
+
"@open-wc/testing": "^4.0.0",
|
|
45
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
46
|
+
"@rollup/plugin-typescript": "^12.1.2",
|
|
47
|
+
"@types/mocha": "^10.0.10",
|
|
48
|
+
"@web/test-runner": "^0.18.2",
|
|
49
|
+
"rimraf": "^6.0.1",
|
|
50
|
+
"rollup": "^4.42.0",
|
|
51
|
+
"rollup-plugin-scss-lit": "^2.1.0",
|
|
52
|
+
"sass": "^1.89.0",
|
|
53
|
+
"tslib": "^2.6.3",
|
|
54
|
+
"typescript": "^5.5.3",
|
|
55
|
+
"@italia/icon": "^1.0.0-alpha.5",
|
|
56
|
+
"@italia/test-config": "^0.0.0",
|
|
57
|
+
"@italia/typescript-config": "^0.0.0"
|
|
58
|
+
},
|
|
59
|
+
"customElements": "custom-elements.json",
|
|
60
|
+
"scripts": {
|
|
61
|
+
"analyze": "cem analyze --litelement --exclude dist",
|
|
62
|
+
"build": "rollup --config rollup.config.js",
|
|
63
|
+
"clean": "rimraf node_modules .turbo .rollup.cache dist coverage",
|
|
64
|
+
"prepublish": "pnpm build",
|
|
65
|
+
"lint": "eslint --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint \"styles/**/*.scss\" \"src/**/*.scss\" && prettier \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" --check",
|
|
66
|
+
"format": "eslint --fix --ext .ts \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\" && stylelint --fix \"styles/**/*.scss\" \"src/**/*.scss\" && prettier --write \"src/**/*.ts\" \"stories/**/*.ts\" \"test/**/*.ts\"",
|
|
67
|
+
"test": "wtr --coverage --node-resolve --config web-test-runner.config.js",
|
|
68
|
+
"test:watch": "wtr --coverage --node-resolve --config web-test-runner.config.js --watch"
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
$pagination-color: var(--#{$prefix}color-link);
|
|
2
|
+
|
|
3
|
+
/* ========================================
|
|
4
|
+
FOUC Styles - Flash of Unstyled Content
|
|
5
|
+
======================================== */
|
|
6
|
+
|
|
7
|
+
/* it-pagination: simulate pagination wrapper */
|
|
8
|
+
it-pagination:not(:defined) {
|
|
9
|
+
--it-host-display: flex;
|
|
10
|
+
display: flex !important;
|
|
11
|
+
width: 100%;
|
|
12
|
+
align-items: center;
|
|
13
|
+
gap: 8px;
|
|
14
|
+
overflow-x: clip;
|
|
15
|
+
|
|
16
|
+
/* Hide total slot until defined */
|
|
17
|
+
[slot='total'] {
|
|
18
|
+
display: none !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* Alignment variants */
|
|
22
|
+
&[align='start'] {
|
|
23
|
+
justify-content: flex-start;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&[align='center'] {
|
|
27
|
+
justify-content: center;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&[align='end'] {
|
|
31
|
+
justify-content: flex-end;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
it-input:not(:defined) {
|
|
35
|
+
display: contents;
|
|
36
|
+
margin: 0;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
it-input:not(:defined)::after {
|
|
40
|
+
content: none !important;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&[simple-mode] {
|
|
44
|
+
a[slot='prev'] {
|
|
45
|
+
display: inline-flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
a[slot='prev']::after {
|
|
50
|
+
display: inline-flex;
|
|
51
|
+
width: 8rem;
|
|
52
|
+
height: 3rem;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
padding: var(--#{$prefix}spacing-xxs, 4px) var(--#{$prefix}spacing-s, 12px);
|
|
56
|
+
border: 2px solid transparent;
|
|
57
|
+
border-radius: 4px;
|
|
58
|
+
color: var(--#{$prefix}color-link, #0066cc);
|
|
59
|
+
content: '';
|
|
60
|
+
font-size: var(--#{$prefix}label-font-size, 16px);
|
|
61
|
+
font-weight: var(--#{$prefix}font-weight-solid, 600);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* it-pagination-item: simulate page-link appearance */
|
|
67
|
+
it-pagination-item:not(:defined) {
|
|
68
|
+
--it-host-display: flex;
|
|
69
|
+
display: flex !important;
|
|
70
|
+
min-width: 3rem;
|
|
71
|
+
height: 3rem;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: center;
|
|
74
|
+
padding: var(--#{$prefix}spacing-xxs, 4px) var(--#{$prefix}spacing-s, 12px);
|
|
75
|
+
border: 2px solid transparent;
|
|
76
|
+
border-radius: 4px;
|
|
77
|
+
color: var(--#{$prefix}color-link, #0066cc);
|
|
78
|
+
font-size: var(--#{$prefix}label-font-size, 16px);
|
|
79
|
+
font-weight: var(--#{$prefix}font-weight-solid, 600);
|
|
80
|
+
|
|
81
|
+
/* Show slotted link content with proper styling */
|
|
82
|
+
a {
|
|
83
|
+
color: inherit;
|
|
84
|
+
text-decoration: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Simulate active state for specific pages if needed */
|
|
88
|
+
&[page='1']:first-of-type,
|
|
89
|
+
&[current] {
|
|
90
|
+
border-color: var(--#{$prefix}color-border-primary-active, #0059b3);
|
|
91
|
+
color: var(--#{$prefix}color-link-active, #0059b3);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* Remove FOUC styles when components are defined */
|
|
96
|
+
it-pagination:defined,
|
|
97
|
+
it-pagination-item:defined {
|
|
98
|
+
&::before,
|
|
99
|
+
&::after {
|
|
100
|
+
content: none !important;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Magic ahead: adapting bsi pagination styles to web components Shadow DOM scoping.
|
|
105
|
+
// This is in globals because otherwise you cannot target slotted icons
|
|
106
|
+
a.page-link {
|
|
107
|
+
it-icon::part(icon) {
|
|
108
|
+
fill: var(--#{$prefix}pagination-color);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
a.page-link:not(.disabled):hover {
|
|
113
|
+
--#{$prefix}pagination-link-color: var(--#{$prefix}color-link-hover);
|
|
114
|
+
text-decoration: underline !important;
|
|
115
|
+
|
|
116
|
+
it-icon::part(icon) {
|
|
117
|
+
fill: var(--#{$prefix}pagination-link-color);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
a.page-link[aria-disabled] {
|
|
122
|
+
--#{$prefix}pagination-link-color: var(--#{$prefix}pagination-disabled-color);
|
|
123
|
+
cursor: not-allowed;
|
|
124
|
+
|
|
125
|
+
it-icon::part(icon) {
|
|
126
|
+
fill: var(--#{$prefix}pagination-link-color);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
it-pagination a[slot='next'],
|
|
131
|
+
it-pagination a[slot='prev'] {
|
|
132
|
+
text-decoration: none !important;
|
|
133
|
+
|
|
134
|
+
&:not(.disabled):hover {
|
|
135
|
+
--#{$prefix}pagination-link-color: var(--#{$prefix}color-link-hover);
|
|
136
|
+
text-decoration: underline !important;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
it-pagination it-pagination-item a {
|
|
141
|
+
text-decoration: unset;
|
|
142
|
+
|
|
143
|
+
&:not(.disabled):hover {
|
|
144
|
+
--#{$prefix}pagination-link-color: var(--#{$prefix}color-link-hover);
|
|
145
|
+
text-decoration: underline !important;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:focus-visible {
|
|
149
|
+
outline: 2px solid var(--#{$prefix}color-border-primary-active);
|
|
150
|
+
outline-offset: 2px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
it-pagination it-pagination-item a.pagination-generated-link:focus-visible {
|
|
155
|
+
outline: 2px solid var(--#{$prefix}color-border-primary-active) !important;
|
|
156
|
+
outline-offset: 2px !important;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.page-link[aria-current] {
|
|
160
|
+
--#{$prefix}pagination-border-color: var(--#{$prefix}color-border-primary-active);
|
|
161
|
+
--#{$prefix}pagination-link-color: var(--#{$prefix}color-link-active);
|
|
162
|
+
pointer-events: none;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
it-pagination it-input::part(input-wrapper) {
|
|
166
|
+
margin: 0;
|
|
167
|
+
}
|