@bonprix-ds/react-pagination 1.1.8 → 1.1.9

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,17 +1,18 @@
1
1
  import "react";
2
2
  import e from "@bonprix-ds/react-icon-button";
3
- import { jsx as t } from "react/jsx-runtime";
3
+ import { ArrowLeftIcon as t, ArrowRightIcon as n } from "@bonprix-ds/react-icon/icons";
4
+ import { jsx as r } from "react/jsx-runtime";
4
5
  //#region src/PaginationArrow.tsx
5
- var n = ({ position: n = "left", href: r, onClick: i, disabled: a = !1 }) => a ? /* @__PURE__ */ t("div", { className: "h-8 w-8" }) : /* @__PURE__ */ t(e, {
6
+ var i = ({ position: i = "left", href: a, onClick: o, disabled: s = !1 }) => s ? /* @__PURE__ */ r("div", { className: "h-8 w-8" }) : /* @__PURE__ */ r(e, {
6
7
  component: "a",
7
- href: r,
8
+ href: a,
8
9
  onClick: (e) => {
9
- e.preventDefault(), i();
10
+ e.preventDefault(), o();
10
11
  },
11
- label: n === "left" ? "vorherige Seite" : "nächste Seite",
12
- icon: n === "left" ? "arrow-left" : "arrow-right"
12
+ label: i === "left" ? "vorherige Seite" : "nächste Seite",
13
+ icon: r(i === "left" ? t : n, {})
13
14
  });
14
15
  //#endregion
15
- export { n as default };
16
+ export { i as default };
16
17
 
17
18
  //# sourceMappingURL=PaginationArrow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationArrow.js","names":["IconButton","PaginationArrow","disabled","event","onClick","position"],"sources":["../../src/PaginationArrow.tsx"],"sourcesContent":["import React from \"react\";\n\nimport IconButton from \"@bonprix-ds/react-icon-button\";\n\nexport interface PaginationArrowProps {\n position: \"left\" | \"right\";\n onClick: () => void;\n href: string;\n disabled?: boolean;\n}\n\nconst PaginationArrow = ({ position = \"left\", href, onClick, disabled = false }: PaginationArrowProps) => {\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n onClick();\n };\n\n if (disabled) {\n return <div className=\"h-8 w-8\"></div>;\n }\n\n const previousPageLabel = \"vorherige Seite\";\n const nextPageLabel = \"nächste Seite\";\n const label = position === \"left\" ? previousPageLabel : nextPageLabel;\n const iconVariant = position === \"left\" ? \"arrow-left\" : \"arrow-right\";\n\n return <IconButton component=\"a\" href={href} onClick={handleClick} label={label} icon={iconVariant} />;\n};\n\nexport default PaginationArrow;\n"],"mappings":";;;;AAWA,IAAMC,KAAmB,EAAE,cAAW,QAAQ,SAAM,YAAS,cAAW,SAMlEC,IACK,kBAAC,OAAD,EAAK,WAAU,UAAe,CAAA,IAQhC,kBAACF,GAAD;CAAY,WAAU;CAAU;CAAM,UAdxB,MAA+C;EAElE,AADAG,EAAM,eAAe,GACrBC,EAAQ;CACV;CAW0E,OAH5DC,MAAa,SAAS,oBAAoB;CAGyB,MAF7DA,MAAa,SAAS,eAAe;AAE4C,CAAA"}
1
+ {"version":3,"file":"PaginationArrow.js","names":["IconButton","PaginationArrow","disabled","event","onClick","position","jsx","ArrowLeftIcon","ArrowRightIcon"],"sources":["../../src/PaginationArrow.tsx"],"sourcesContent":["import React from \"react\";\n\nimport IconButton from \"@bonprix-ds/react-icon-button\";\nimport { ArrowLeftIcon, ArrowRightIcon } from \"@bonprix-ds/react-icon/icons\";\n\nexport interface PaginationArrowProps {\n position: \"left\" | \"right\";\n onClick: () => void;\n href: string;\n disabled?: boolean;\n}\n\nconst PaginationArrow = ({ position = \"left\", href, onClick, disabled = false }: PaginationArrowProps) => {\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n event.preventDefault();\n onClick();\n };\n\n if (disabled) {\n return <div className=\"h-8 w-8\"></div>;\n }\n\n const previousPageLabel = \"vorherige Seite\";\n const nextPageLabel = \"nächste Seite\";\n const label = position === \"left\" ? previousPageLabel : nextPageLabel;\n const icon = position === \"left\" ? <ArrowLeftIcon /> : <ArrowRightIcon />;\n\n return <IconButton component=\"a\" href={href} onClick={handleClick} label={label} icon={icon} />;\n};\n\nexport default PaginationArrow;\n"],"mappings":";;;;;AAYA,IAAMC,KAAmB,EAAE,cAAW,QAAQ,SAAM,YAAS,cAAW,SAMlEC,IACK,kBAAC,OAAD,EAAK,WAAU,UAAe,CAAA,IAQhC,kBAACF,GAAD;CAAY,WAAU;CAAU;CAAM,UAdxB,MAA+C;EAElE,AADAG,EAAM,eAAe,GACrBC,EAAQ;CACV;CAW0E,OAH5DC,MAAa,SAAS,oBAAoB;CAG+B,MAFpDC,EAAtBD,MAAa,SAAUE,IAAoBC,GAArB,CAAgB,CAAqB;AAEsB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bonprix-ds/react-pagination",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "Pagination component, implemented in React, for the Bonprix Design System.",
5
5
  "keywords": [],
6
6
  "license": "UNLICENSED",
@@ -32,8 +32,9 @@
32
32
  "provenance": true
33
33
  },
34
34
  "dependencies": {
35
- "@bonprix-ds/react-icon-button": "1.2.2",
36
- "@bonprix-ds/utils": "0.3.0"
35
+ "@bonprix-ds/react-icon": "1.3.0",
36
+ "@bonprix-ds/react-icon-button": "1.2.3",
37
+ "@bonprix-ds/utils": "0.4.0"
37
38
  },
38
39
  "devDependencies": {
39
40
  "@types/react": "19.3.0",