@kickstartds/ds-agency-premium 1.6.69--canary.45.1732.0 → 1.6.69--canary.45.1736.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/components/page-wrapper/tokens.css +1 -1
- package/dist/components/pagination/index.js +26 -1
- package/dist/components/pagination/pagination.css +9 -3
- package/dist/components/presets.json +21 -3
- package/dist/tokens/themes.css +4 -4
- package/dist/tokens/tokens.css +1 -1
- package/dist/tokens/tokens.js +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,32 @@ const PaginationContextDefault = forwardRef(({ pages }, ref) => {
|
|
|
10
10
|
const activeIndex = pages.findIndex((page) => page.active);
|
|
11
11
|
// Use the url of the next item after the active one, or "#" if at the end
|
|
12
12
|
return pages[activeIndex - 1]?.url || "#";
|
|
13
|
-
})(), children: jsx(Icon, { icon: "chevron-left" }) })] })),
|
|
13
|
+
})(), children: jsx(Icon, { icon: "chevron-left" }) })] })), (() => {
|
|
14
|
+
const activeIndex = pages.findIndex((page) => page.active);
|
|
15
|
+
let lastRenderedIndex = -1;
|
|
16
|
+
const result = [];
|
|
17
|
+
pages.forEach((page, index) => {
|
|
18
|
+
const isFirst = index === 0;
|
|
19
|
+
const isLast = index === pages.length - 1;
|
|
20
|
+
const isActive = page.active;
|
|
21
|
+
const isBeforeActive = index === activeIndex - 1;
|
|
22
|
+
const isAfterActive = index === activeIndex + 1;
|
|
23
|
+
const shouldRender = isFirst || isLast || isActive || isBeforeActive || isAfterActive;
|
|
24
|
+
if (!shouldRender) {
|
|
25
|
+
if (index - lastRenderedIndex > 1 &&
|
|
26
|
+
(result.length === 0 ||
|
|
27
|
+
result[result.length - 1]?.type !== "div" ||
|
|
28
|
+
result[result.length - 1]?.props?.className !==
|
|
29
|
+
"dsa-pagination__placeholder")) {
|
|
30
|
+
result.push(jsx("div", { className: "dsa-pagination__placeholder", children: jsx("span", { children: "\u2026" }) }, `dsa-pagination__placeholder-${index}`));
|
|
31
|
+
}
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
result.push(jsx(Link, { className: classnames("dsa-pagination__link", page.active && "dsa-pagination__link--active"), href: page.url, children: (index + 1).toString() }, index));
|
|
35
|
+
lastRenderedIndex = index;
|
|
36
|
+
});
|
|
37
|
+
return result;
|
|
38
|
+
})(), pages.findIndex((page) => page.active) !== pages.length - 1 && (jsxs(Fragment, { children: [jsx(Link, { className: "dsa-pagination__link dsa-pagination__link--icon dsa-pagination__link--next", href: (() => {
|
|
14
39
|
const activeIndex = pages.findIndex((page) => page.active);
|
|
15
40
|
// Use the url of the next item after the active one, or "#" if at the end
|
|
16
41
|
return pages[activeIndex + 1]?.url || "#";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
display: flex;
|
|
3
3
|
gap: var(--dsa-pagination--gap, var(--ks-spacing-stack-xs));
|
|
4
4
|
}
|
|
5
|
-
.dsa-pagination__link {
|
|
5
|
+
.dsa-pagination__link, .dsa-pagination__placeholder {
|
|
6
6
|
--g-link--background: transparent;
|
|
7
7
|
--g-link--background-hover: var(--ks-color-fg-alpha-8);
|
|
8
8
|
--g-link--color: var(--ks-text-color-interface-interactive);
|
|
@@ -17,14 +17,20 @@
|
|
|
17
17
|
padding: 0.5em;
|
|
18
18
|
aspect-ratio: 1;
|
|
19
19
|
}
|
|
20
|
-
.dsa-pagination__link--icon .icon {
|
|
20
|
+
.dsa-pagination__link--icon .icon, .dsa-pagination__placeholder--icon .icon {
|
|
21
21
|
width: 1.25em;
|
|
22
22
|
height: 1.25em;
|
|
23
23
|
fill: var(--g-link--color);
|
|
24
24
|
}
|
|
25
|
-
.dsa-pagination__link--active {
|
|
25
|
+
.dsa-pagination__link--active, .dsa-pagination__placeholder--active {
|
|
26
26
|
--g-link--background: var(--ks-background-color-primary-interactive);
|
|
27
27
|
--g-link--background-hover: var(--ks-background-color-primary-interactive-hover);
|
|
28
28
|
--g-link--color: var(--dsa-text-color-on-primary);
|
|
29
29
|
--g-link--color-hover: var(--dsa-text-color-on-primary);
|
|
30
|
+
}
|
|
31
|
+
.dsa-pagination__placeholder {
|
|
32
|
+
line-height: 0.25;
|
|
33
|
+
}
|
|
34
|
+
.dsa-pagination__placeholder span {
|
|
35
|
+
transform: translateY(-0.15em);
|
|
30
36
|
}
|
|
@@ -3012,7 +3012,7 @@
|
|
|
3012
3012
|
"id": "industry-pagination--default",
|
|
3013
3013
|
"group": "Industry/Pagination",
|
|
3014
3014
|
"name": "Default",
|
|
3015
|
-
"code": "<Pagination\n pages={[\n {\n active: false,\n url: 'https://example.com/page1'\n },\n {\n active: false,\n url: 'https://example.com/page2'\n },\n {\n active: false,\n url: 'https://example.com/page3'\n },\n {\n active: false,\n url: 'https://example.com/page4'\n },\n {\n active: false,\n url: 'https://example.com/page5'\n },\n {\n active:
|
|
3015
|
+
"code": "<Pagination\n pages={[\n {\n active: false,\n url: 'https://example.com/page1'\n },\n {\n active: false,\n url: 'https://example.com/page2'\n },\n {\n active: false,\n url: 'https://example.com/page3'\n },\n {\n active: false,\n url: 'https://example.com/page4'\n },\n {\n active: false,\n url: 'https://example.com/page5'\n },\n {\n active: true,\n url: 'https://example.com/page6'\n },\n {\n active: false,\n url: 'https://example.com/page7'\n },\n {\n active: false,\n url: 'https://example.com/page8'\n },\n {\n active: false,\n url: 'https://example.com/page9'\n },\n {\n active: false,\n url: 'https://example.com/page10'\n },\n {\n url: 'https://example.com/page11'\n },\n {\n url: 'https://example.com/page12'\n }\n ]}\n />",
|
|
3016
3016
|
"args": {
|
|
3017
3017
|
"pages": [
|
|
3018
3018
|
{
|
|
@@ -3036,12 +3036,30 @@
|
|
|
3036
3036
|
"url": "https://example.com/page5"
|
|
3037
3037
|
},
|
|
3038
3038
|
{
|
|
3039
|
-
"active":
|
|
3039
|
+
"active": true,
|
|
3040
3040
|
"url": "https://example.com/page6"
|
|
3041
3041
|
},
|
|
3042
3042
|
{
|
|
3043
|
-
"active":
|
|
3043
|
+
"active": false,
|
|
3044
3044
|
"url": "https://example.com/page7"
|
|
3045
|
+
},
|
|
3046
|
+
{
|
|
3047
|
+
"active": false,
|
|
3048
|
+
"url": "https://example.com/page8"
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
"active": false,
|
|
3052
|
+
"url": "https://example.com/page9"
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
"active": false,
|
|
3056
|
+
"url": "https://example.com/page10"
|
|
3057
|
+
},
|
|
3058
|
+
{
|
|
3059
|
+
"url": "https://example.com/page11"
|
|
3060
|
+
},
|
|
3061
|
+
{
|
|
3062
|
+
"url": "https://example.com/page12"
|
|
3045
3063
|
}
|
|
3046
3064
|
]
|
|
3047
3065
|
},
|
package/dist/tokens/themes.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Do not edit directly
|
|
3
|
-
* Generated on Thu, 26 Jun 2025
|
|
3
|
+
* Generated on Thu, 26 Jun 2025 12:39:04 GMT
|
|
4
4
|
*/
|
|
5
5
|
:root [ks-theme=business] {
|
|
6
6
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
|
@@ -2727,7 +2727,7 @@
|
|
|
2727
2727
|
}
|
|
2728
2728
|
/**
|
|
2729
2729
|
* Do not edit directly
|
|
2730
|
-
* Generated on Thu, 26 Jun 2025
|
|
2730
|
+
* Generated on Thu, 26 Jun 2025 12:39:08 GMT
|
|
2731
2731
|
*/
|
|
2732
2732
|
:root [ks-theme=google] {
|
|
2733
2733
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
|
@@ -5458,7 +5458,7 @@
|
|
|
5458
5458
|
}
|
|
5459
5459
|
/**
|
|
5460
5460
|
* Do not edit directly
|
|
5461
|
-
* Generated on Thu, 26 Jun 2025
|
|
5461
|
+
* Generated on Thu, 26 Jun 2025 12:39:06 GMT
|
|
5462
5462
|
*/
|
|
5463
5463
|
:root [ks-theme=ngo] {
|
|
5464
5464
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
|
@@ -8459,7 +8459,7 @@
|
|
|
8459
8459
|
}
|
|
8460
8460
|
/**
|
|
8461
8461
|
* Do not edit directly
|
|
8462
|
-
* Generated on Thu, 26 Jun 2025
|
|
8462
|
+
* Generated on Thu, 26 Jun 2025 12:39:10 GMT
|
|
8463
8463
|
*/
|
|
8464
8464
|
:root [ks-theme=telekom] {
|
|
8465
8465
|
--ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
|
package/dist/tokens/tokens.css
CHANGED
package/dist/tokens/tokens.js
CHANGED