@kickstartds/ds-agency-premium 1.6.69--canary.45.1736.0 → 1.6.70--canary.45.1743.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.
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 26 Jun 2025 12:39:02 GMT
3
+ * Generated on Fri, 27 Jun 2025 07:25:01 GMT
4
4
  */
5
5
  :root, [ks-theme] {
6
6
  --ks-background-color-accent-base: var(--ks-color-fg-to-bg-9-base);
@@ -7,6 +7,28 @@ import { HTMLAttributes } from "react";
7
7
  * and run json-schema-to-typescript to regenerate this file.
8
8
  */
9
9
  interface PaginationProps {
10
+ ariaLabels?: {
11
+ /**
12
+ * Aria label for the previous page link
13
+ */
14
+ previousPage: string;
15
+ /**
16
+ * Aria label for the next page link
17
+ */
18
+ nextPage: string;
19
+ /**
20
+ * Aria label for the link to skip to the first page
21
+ */
22
+ skipToFirstPage: string;
23
+ /**
24
+ * Aria label for the link to skip to the last page
25
+ */
26
+ skipToLastPage: string;
27
+ /**
28
+ * Aria label for the link to go to a specific page (will be placed before the page number)
29
+ */
30
+ goToPage?: string;
31
+ };
10
32
  pages?: {
11
33
  /**
12
34
  * The URL to the page
@@ -5,8 +5,8 @@ import { forwardRef, createContext, useContext } from 'react';
5
5
  import { Icon } from '@kickstartds/base/lib/icon';
6
6
  import { Link } from '@kickstartds/base/lib/link';
7
7
 
8
- const PaginationContextDefault = forwardRef(({ pages }, ref) => {
9
- return (jsxs("div", { className: "dsa-pagination", ref: ref, children: [pages.findIndex((page) => page.active) !== 0 && (jsxs(Fragment, { children: [jsx(Link, { className: "dsa-pagination__link dsa-pagination__link--icon dsa-pagination__link--skip-back", href: pages[0]?.url, children: jsx(Icon, { icon: "skip-back" }) }), jsx(Link, { className: "dsa-pagination__link dsa-pagination__link--icon dsa-pagination__link--prev", href: (() => {
8
+ const PaginationContextDefault = forwardRef(({ pages, ariaLabels }, ref) => {
9
+ return (jsxs("div", { className: "dsa-pagination", ref: ref, children: [pages.findIndex((page) => page.active) !== 0 && (jsxs(Fragment, { children: [jsx(Link, { "aria-label": ariaLabels.skipToFirstPage || "Skip to first page", className: "dsa-pagination__link dsa-pagination__link--icon dsa-pagination__link--skip-back", href: pages[0]?.url, children: jsx(Icon, { icon: "skip-back" }) }), jsx(Link, { "aria-label": ariaLabels.previousPage || "Go to previous page", className: "dsa-pagination__link dsa-pagination__link--icon dsa-pagination__link--prev", href: (() => {
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 || "#";
@@ -31,15 +31,16 @@ const PaginationContextDefault = forwardRef(({ pages }, ref) => {
31
31
  }
32
32
  return;
33
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));
34
+ result.push(jsx(Link, { className: classnames("dsa-pagination__link", page.active && "dsa-pagination__link--active"), "aria-label": `${ariaLabels.goToPage} ${index + 1}` ||
35
+ `Go to page ${index + 1}`, href: page.url, children: (index + 1).toString() }, index));
35
36
  lastRenderedIndex = index;
36
37
  });
37
38
  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: (() => {
39
+ })(), 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", "aria-label": ariaLabels.nextPage || "Go to next page", href: (() => {
39
40
  const activeIndex = pages.findIndex((page) => page.active);
40
41
  // Use the url of the next item after the active one, or "#" if at the end
41
42
  return pages[activeIndex + 1]?.url || "#";
42
- })(), children: jsx(Icon, { icon: "chevron-right" }) }), jsx(Link, { className: "dsa-pagination__link dsa-pagination__link--icon dsa-pagination__link--skip-forward", href: pages[pages.length - 1]?.url, children: jsx(Icon, { icon: "skip-forward" }) })] }))] }));
43
+ })(), children: jsx(Icon, { icon: "chevron-right" }) }), jsx(Link, { "aria-label": ariaLabels.skipToLastPage || "Skip to last page", className: "dsa-pagination__link dsa-pagination__link--icon dsa-pagination__link--skip-forward", href: pages[pages.length - 1]?.url, children: jsx(Icon, { icon: "skip-forward" }) })] }))] }));
43
44
  });
44
45
  const PaginationContext = createContext(PaginationContextDefault);
45
46
  const Pagination = forwardRef((props, ref) => {
@@ -1,32 +1,62 @@
1
+ .dsa-pagination {
2
+ --dsa-pagination--gap: var(--ks-spacing-stack-xs);
3
+ --dsa-pagination--background: transparent;
4
+ --dsa-pagination--background_hover: var(--ks-color-fg-alpha-8);
5
+ --dsa-pagination--color: var(--ks-text-color-interface-interactive);
6
+ --dsa-pagination--color_hover: var(--ks-text-color-interface-interactive);
7
+ --dsa-pagination--border-radius: var(--ks-border-radius-control);
8
+ --dsa-pagination--border: var(--ks-border-width-default) solid var(--ks-border-color-interface-interactive);
9
+ --dsa-pagination--width: 3.75em;
10
+ --dsa-pagination--font: var(--ks-font-interface-s);
11
+ --dsa-pagination--padding: 0.5em;
12
+ --dsa-pagination__icon--size: 1.25em;
13
+ --dsa-pagination--background_active: var(--ks-background-color-primary-interactive);
14
+ --dsa-pagination--background_active_hover: var(--ks-background-color-primary-interactive-hover);
15
+ --dsa-pagination--color_active: var(--dsa-text-color-on-primary);
16
+ --dsa-pagination--color_active_hover: var(--dsa-text-color-on-primary);
17
+ }
18
+ @media (min-width: 768px) {
19
+ .dsa-pagination {
20
+ --dsa-pagination--border: none;
21
+ --dsa-pagination--width: 3em;
22
+ }
23
+ }
24
+
1
25
  .dsa-pagination {
2
26
  display: flex;
3
27
  gap: var(--dsa-pagination--gap, var(--ks-spacing-stack-xs));
28
+ flex-wrap: wrap;
29
+ justify-content: center;
4
30
  }
5
31
  .dsa-pagination__link, .dsa-pagination__placeholder {
6
- --g-link--background: transparent;
7
- --g-link--background-hover: var(--ks-color-fg-alpha-8);
8
- --g-link--color: var(--ks-text-color-interface-interactive);
9
- --g-link--color-hover: var(--ks-text-color-interface-interactive);
10
- --g-link--border-radius: var(--ks-border-radius-control);
11
- font: var(--ks-font-interface-s);
32
+ --g-link--background: var(--dsa-pagination--background, transparent);
33
+ --g-link--background-hover: var(--dsa-pagination--background_hover, var(--ks-color-fg-alpha-8));
34
+ --g-link--color: var(--dsa-pagination--color, var(--ks-text-color-interface-interactive));
35
+ --g-link--color-hover: var(--dsa-pagination--color_hover, var(--ks-text-color-interface-interactive));
36
+ --g-link--border-radius: var(--dsa-pagination--border-radius, var(--ks-border-radius-control));
37
+ border: var(--dsa-pagination--border, var(--ks-border-width-default) solid var(--ks-border-color-interface-interactive));
38
+ border-radius: var(--dsa-pagination--border-radius, var(--ks-border-radius-control));
39
+ width: var(--dsa-pagination--width, 4em);
40
+ font: var(--dsa-pagination--font, var(--ks-font-interface-s));
12
41
  line-height: 1;
13
42
  display: flex;
14
43
  align-items: center;
15
44
  justify-content: center;
16
- width: 3em;
17
- padding: 0.5em;
45
+ padding: var(--dsa-pagination--padding, 0.5em);
18
46
  aspect-ratio: 1;
19
47
  }
20
48
  .dsa-pagination__link--icon .icon, .dsa-pagination__placeholder--icon .icon {
21
- width: 1.25em;
22
- height: 1.25em;
23
- fill: var(--g-link--color);
49
+ width: var(--dsa-pagination__icon--size, 1.25em);
50
+ height: var(--dsa-pagination__icon--size, 1.25em);
24
51
  }
25
52
  .dsa-pagination__link--active, .dsa-pagination__placeholder--active {
26
- --g-link--background: var(--ks-background-color-primary-interactive);
27
- --g-link--background-hover: var(--ks-background-color-primary-interactive-hover);
28
- --g-link--color: var(--dsa-text-color-on-primary);
29
- --g-link--color-hover: var(--dsa-text-color-on-primary);
53
+ --g-link--background: var(--dsa-pagination--background_active, var(--ks-background-color-primary-interactive));
54
+ --g-link--background-hover: var(
55
+ --dsa-pagination--background_active,
56
+ var(--ks-background-color-primary-interactive-hover)
57
+ );
58
+ --g-link--color: var(--dsa-pagination--color_active, var(--dsa-text-color-on-primary));
59
+ --g-link--color-hover: var(--dsa-pagination--color_active_hover, var(--dsa-text-color-on-primary));
30
60
  }
31
61
  .dsa-pagination__placeholder {
32
62
  line-height: 0.25;
@@ -4,6 +4,43 @@
4
4
  "title": "Pagination",
5
5
  "type": "object",
6
6
  "properties": {
7
+ "ariaLabels": {
8
+ "type": "object",
9
+ "properties": {
10
+ "previousPage": {
11
+ "type": "string",
12
+ "description": "Aria label for the previous page link",
13
+ "default": "Go to previous page"
14
+ },
15
+ "nextPage": {
16
+ "type": "string",
17
+ "description": "Aria label for the next page link",
18
+ "default": "Go to next page"
19
+ },
20
+ "skipToFirstPage": {
21
+ "type": "string",
22
+ "description": "Aria label for the link to skip to the first page",
23
+ "default": "Skip to first page"
24
+ },
25
+ "skipToLastPage": {
26
+ "type": "string",
27
+ "description": "Aria label for the link to skip to the last page",
28
+ "default": "Skip to last page"
29
+ },
30
+ "goToPage": {
31
+ "type": "string",
32
+ "description": "Aria label for the link to go to a specific page (will be placed before the page number)",
33
+ "default": "Go to page"
34
+ }
35
+ },
36
+ "required": [
37
+ "previousPage",
38
+ "nextPage",
39
+ "skipToFirstPage",
40
+ "skipToLastPage"
41
+ ],
42
+ "additionalProperties": false
43
+ },
7
44
  "pages": {
8
45
  "type": "array",
9
46
  "items": {
@@ -4,6 +4,42 @@
4
4
  "title": "Pagination",
5
5
  "type": "object",
6
6
  "properties": {
7
+ "ariaLabels": {
8
+ "type": "object",
9
+ "properties": {
10
+ "previousPage": {
11
+ "type": "string",
12
+ "description": "Aria label for the previous page link",
13
+ "default": "Go to previous page"
14
+ },
15
+ "nextPage": {
16
+ "type": "string",
17
+ "description": "Aria label for the next page link",
18
+ "default": "Go to next page"
19
+ },
20
+ "skipToFirstPage": {
21
+ "type": "string",
22
+ "description": "Aria label for the link to skip to the first page",
23
+ "default": "Skip to first page"
24
+ },
25
+ "skipToLastPage": {
26
+ "type": "string",
27
+ "description": "Aria label for the link to skip to the last page",
28
+ "default": "Skip to last page"
29
+ },
30
+ "goToPage": {
31
+ "type": "string",
32
+ "description": "Aria label for the link to go to a specific page (will be placed before the page number)",
33
+ "default": "Go to page"
34
+ }
35
+ },
36
+ "required": [
37
+ "previousPage",
38
+ "nextPage",
39
+ "skipToFirstPage",
40
+ "skipToLastPage"
41
+ ]
42
+ },
7
43
  "pages": {
8
44
  "type": "array",
9
45
  "items": {
@@ -3012,8 +3012,15 @@
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: 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 />",
3015
+ "code": "<Pagination\n ariaLabels={{\n goToPage: 'Go to page',\n nextPage: 'Go to next page',\n previousPage: 'Go to previous page',\n skipToFirstPage: 'Skip to first page',\n skipToLastPage: 'Skip to last page'\n }}\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
+ "ariaLabels": {
3018
+ "previousPage": "Go to previous page",
3019
+ "nextPage": "Go to next page",
3020
+ "skipToFirstPage": "Skip to first page",
3021
+ "skipToLastPage": "Skip to last page",
3022
+ "goToPage": "Go to page"
3023
+ },
3017
3024
  "pages": [
3018
3025
  {
3019
3026
  "active": false,
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 26 Jun 2025 12:39:04 GMT
3
+ * Generated on Fri, 27 Jun 2025 07:25:05 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 12:39:08 GMT
2730
+ * Generated on Fri, 27 Jun 2025 07:25:12 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 12:39:06 GMT
5461
+ * Generated on Fri, 27 Jun 2025 07:25:09 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 12:39:10 GMT
8462
+ * Generated on Fri, 27 Jun 2025 07:25:16 GMT
8463
8463
  */
8464
8464
  :root [ks-theme=telekom] {
8465
8465
  --ks-background-color-accent-base: var(--ks-color-primary-to-bg-8-base);
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 26 Jun 2025 12:39:02 GMT
3
+ * Generated on Fri, 27 Jun 2025 07:25:01 GMT
4
4
  */
5
5
 
6
6
  :root, [ks-theme] {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Thu, 26 Jun 2025 12:39:02 GMT
3
+ * Generated on Fri, 27 Jun 2025 07:25:02 GMT
4
4
  */
5
5
 
6
6
  export const KsBackgroundColorAccentBase = "#f3f3f4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kickstartds/ds-agency-premium",
3
- "version": "1.6.69--canary.45.1736.0",
3
+ "version": "1.6.70--canary.45.1743.0",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/kickstartDS/ds-agency-premium#readme",
6
6
  "bugs": {