@sikt/sds-pagination 0.1.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/README.md +39 -0
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +17 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +23 -0
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# `@sikt/sds-pagination`
|
|
2
|
+
|
|
3
|
+
## Consume
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm i -s @sikt/sds-pagination
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
### React
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { Pagination } from "@sikt/sds-pagination";
|
|
13
|
+
import "@sikt/sds-pagination/dist/index.css";
|
|
14
|
+
|
|
15
|
+
<Pagination ariaLabel="Liste over studier" count={10} limit={7} />;
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### Stylesheets & custom markup
|
|
19
|
+
|
|
20
|
+
Import stylesheet:
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
@import url("@sikt/sds-pagination");
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Create custom markup:
|
|
27
|
+
|
|
28
|
+
```html
|
|
29
|
+
<nav class="sds-pagination" aria-label="Liste over studier">
|
|
30
|
+
<ol class="sds-pagination__list">
|
|
31
|
+
<li class="sds-pagination__list-item">
|
|
32
|
+
<button class="sds-pagination__button" aria-label="Vis side 1">1</button>
|
|
33
|
+
</li>
|
|
34
|
+
<li class="sds-pagination__list-item">
|
|
35
|
+
<button class="sds-pagination__button" aria-label="Vis side 2">2</button>
|
|
36
|
+
</li>
|
|
37
|
+
</ol>
|
|
38
|
+
</nav>
|
|
39
|
+
```
|
package/dist/index.css
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.sds-icon{fill:currentcolor;stroke:currentcolor;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;height:1em;width:1em}.sds-pagination__list-item{align-items:center;display:inline-flex;justify-content:center;margin-right:var(--sds-size-base-s)}.sds-pagination__list-item:last-of-type{margin-right:0}.sds-pagination__button{align-items:center;background-color:var(--sds-color-base-background-white);border:1px solid var(--sds-color-base-lilla-02);border-radius:50%;color:var(--sds-color-base-background-dark);cursor:pointer;display:inline-flex;font-size:var(--sds-fontsize-base-s2);height:var(--sds-fontsize-base-l);justify-content:center;line-height:var(--sds-fontsize-base-m);padding:0;text-align:center;width:var(--sds-fontsize-base-l)}.sds-pagination__button:focus-visible{border-color:#0000;outline:var(--sds-size-base-xxs) dashed var(--sds-color-base-bla-01)}.sds-pagination__button[aria-current]{background-color:var(--sds-color-base-background-dark);border-color:var(--sds-color-base-background-dark);color:var(--sds-color-base-background-white)}.sds-pagination__button--spacer,.sds-pagination__button[disabled]{cursor:inherit}
|
|
2
|
+
/*# sourceMappingURL=index.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["icon.pcss","pagination.pcss"],"names":[],"mappings":"AAAA,UACE,iBAAkB,CAClB,mBAAoB,CACpB,cAAe,CACf,oBAAqB,CACrB,qBAAsB,CAEtB,UAAW,CADX,SAEF,CCHE,2BACE,kBAAmB,CACnB,mBAAoB,CACpB,sBAAuB,CACvB,mCAKF,CAHE,wCACE,cACF,CAGF,wBACE,kBAAmB,CAGnB,uDAAwD,CACxD,+CAAgD,CAChD,iBAAkB,CAClB,2CAA4C,CAC5C,cAAe,CANf,mBAAoB,CAOpB,qCAAsC,CAItC,iCAAkC,CAVlC,sBAAuB,CAOvB,sCAAuC,CAIvC,SAAU,CAHV,iBAAkB,CAClB,gCAgCF,CAvBE,sCACE,kBAAyB,CACzB,oEACF,CAMA,sCAEE,sDAAuD,CACvD,kDAAmD,CACnD,4CACF,CAMA,kEACE,cACF","file":"index.css","sourcesContent":[".sds-icon {\n fill: currentcolor;\n stroke: currentcolor;\n stroke-width: 1;\n stroke-linecap: round;\n stroke-linejoin: round;\n width: 1em;\n height: 1em;\n}\n",".sds-pagination {\n &__list {\n /* TODO */\n }\n\n &__list-item {\n align-items: center;\n display: inline-flex;\n justify-content: center;\n margin-right: var(--sds-size-base-s);\n\n &:last-of-type {\n margin-right: 0;\n }\n }\n\n &__button {\n align-items: center;\n display: inline-flex;\n justify-content: center;\n background-color: var(--sds-color-base-background-white);\n border: 1px solid var(--sds-color-base-lilla-02);\n border-radius: 50%;\n color: var(--sds-color-base-background-dark);\n cursor: pointer;\n font-size: var(--sds-fontsize-base-s2);\n line-height: var(--sds-fontsize-base-m);\n text-align: center;\n width: var(--sds-fontsize-base-l);\n height: var(--sds-fontsize-base-l);\n padding: 0;\n\n &:hover,\n &:focus-visible {\n /* TODO: hover style */\n }\n\n &:focus-visible {\n border-color: transparent;\n outline: var(--sds-size-base-xxs) dashed var(--sds-color-base-bla-01);\n }\n\n &:active {\n /* TODO: hover style */\n }\n\n &[aria-current] {\n /* TODO: background-dark is not active color of other elements */\n background-color: var(--sds-color-base-background-dark);\n border-color: var(--sds-color-base-background-dark);\n color: var(--sds-color-base-background-white);\n }\n\n &[disabled] {\n cursor: inherit;\n }\n\n &--spacer {\n cursor: inherit;\n }\n }\n}\n"]}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { HTMLAttributes } from "react";
|
|
3
|
+
interface PaginationProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
className?: string;
|
|
5
|
+
ariaLabel: string;
|
|
6
|
+
ariaLabelPrevious?: string;
|
|
7
|
+
ariaLabelNext?: string;
|
|
8
|
+
ariaLabelItem?: string;
|
|
9
|
+
count: number;
|
|
10
|
+
currentIndex: number;
|
|
11
|
+
/** Total limit of elements, this includes previous/next/first/last. */
|
|
12
|
+
limit?: number;
|
|
13
|
+
handleClick: (index: number) => void;
|
|
14
|
+
}
|
|
15
|
+
declare const Pagination: ({ ariaLabel, ariaLabelNext, ariaLabelPrevious, ariaLabelItem, count, currentIndex, limit, handleClick, className, ...rest }: PaginationProps) => JSX.Element;
|
|
16
|
+
export type { PaginationProps };
|
|
17
|
+
export { Pagination };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{jsx as C,jsxs as a}from"react/jsx-runtime";import l,{clsx as i}from"clsx";import"react";const s=({icon:a,className:i,...s})=>C("svg",{className:l("sds-icon",i),"aria-hidden":"true",...s,children:C("use",{href:`data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3C!DOCTYPE%20svg%20PUBLIC%20%22-%2F%2FW3C%2F%2FDTD%20SVG%201.1%2F%2FEN%22%20%22http%3A%2F%2Fwww.w3.org%2FGraphics%2FSVG%2F1.1%2FDTD%2Fsvg11.dtd%22%3E%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22%3E%3Cdefs%2F%3E%3Csymbol%20id%3D%22arrow-down%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M205.7%2C149.7l-72%2C72a8.2%2C8.2%2C0%2C0%2C1-11.4%2C0l-72-72a8.1%2C8.1%2C0%2C0%2C1%2C11.4-11.4L120%2C196.7V40a8%2C8%2C0%2C0%2C1%2C16%2C0V196.7l58.3-58.4a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C11.4Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22arrow-left%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M224%2C128a8%2C8%2C0%2C0%2C1-8%2C8H59.3l58.4%2C58.3a8.1%2C8.1%2C0%2C0%2C1%2C0%2C11.4%2C8.2%2C8.2%2C0%2C0%2C1-11.4%2C0l-72-72a8.1%2C8.1%2C0%2C0%2C1%2C0-11.4l72-72a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C11.4L59.3%2C120H216A8%2C8%2C0%2C0%2C1%2C224%2C128Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22arrow-right%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M221.7%2C133.7l-72%2C72a8.2%2C8.2%2C0%2C0%2C1-11.4%2C0%2C8.1%2C8.1%2C0%2C0%2C1%2C0-11.4L196.7%2C136H40a8%2C8%2C0%2C0%2C1%2C0-16H196.7L138.3%2C61.7a8.1%2C8.1%2C0%2C0%2C1%2C11.4-11.4l72%2C72A8.1%2C8.1%2C0%2C0%2C1%2C221.7%2C133.7Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22arrow-square-out%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M224%2C100a8%2C8%2C0%2C0%2C1-16%2C0V59.3l-58.4%2C58.4A8%2C8%2C0%2C0%2C1%2C144%2C120a8.3%2C8.3%2C0%2C0%2C1-5.7-2.3%2C8%2C8%2C0%2C0%2C1%2C0-11.3L196.7%2C48H156a8%2C8%2C0%2C0%2C1%2C0-16h60a8%2C8%2C0%2C0%2C1%2C8%2C8Zm-40%2C36a8%2C8%2C0%2C0%2C0-8%2C8v64H48V80h64a8%2C8%2C0%2C0%2C0%2C0-16H48A16%2C16%2C0%2C0%2C0%2C32%2C80V208a16%2C16%2C0%2C0%2C0%2C16%2C16H176a16%2C16%2C0%2C0%2C0%2C16-16V144A8%2C8%2C0%2C0%2C0%2C184%2C136Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22arrow-up%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M205.7%2C117.7a8.2%2C8.2%2C0%2C0%2C1-11.4%2C0L136%2C59.3V216a8%2C8%2C0%2C0%2C1-16%2C0V59.3L61.7%2C117.7a8.1%2C8.1%2C0%2C0%2C1-11.4-11.4l72-72a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C0l72%2C72A8.1%2C8.1%2C0%2C0%2C1%2C205.7%2C117.7Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22caret-down%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M128%2C184a8.5%2C8.5%2C0%2C0%2C1-5.7-2.3l-80-80A8.1%2C8.1%2C0%2C0%2C1%2C53.7%2C90.3L128%2C164.7l74.3-74.4a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C11.4l-80%2C80A8.5%2C8.5%2C0%2C0%2C1%2C128%2C184Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22caret-left%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M160%2C216a8.5%2C8.5%2C0%2C0%2C1-5.7-2.3l-80-80a8.1%2C8.1%2C0%2C0%2C1%2C0-11.4l80-80a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C11.4L91.3%2C128l74.4%2C74.3a8.1%2C8.1%2C0%2C0%2C1%2C0%2C11.4A8.5%2C8.5%2C0%2C0%2C1%2C160%2C216Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22caret-right%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M96%2C216a8.5%2C8.5%2C0%2C0%2C1-5.7-2.3%2C8.1%2C8.1%2C0%2C0%2C1%2C0-11.4L164.7%2C128%2C90.3%2C53.7a8.1%2C8.1%2C0%2C0%2C1%2C11.4-11.4l80%2C80a8.1%2C8.1%2C0%2C0%2C1%2C0%2C11.4l-80%2C80A8.5%2C8.5%2C0%2C0%2C1%2C96%2C216Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22caret-up%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M208%2C168a8.5%2C8.5%2C0%2C0%2C1-5.7-2.3L128%2C91.3%2C53.7%2C165.7a8.1%2C8.1%2C0%2C0%2C1-11.4-11.4l80-80a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C0l80%2C80a8.1%2C8.1%2C0%2C0%2C1%2C0%2C11.4A8.5%2C8.5%2C0%2C0%2C1%2C208%2C168Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22check%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M104%2C192a8.5%2C8.5%2C0%2C0%2C1-5.7-2.3l-56-56a8.1%2C8.1%2C0%2C0%2C1%2C11.4-11.4L104%2C172.7%2C210.3%2C66.3a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C11.4l-112%2C112A8.5%2C8.5%2C0%2C0%2C1%2C104%2C192Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22copy-simple%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M224%2C40V184a8%2C8%2C0%2C0%2C1-16%2C0V48H72a8%2C8%2C0%2C0%2C1%2C0-16H216A8%2C8%2C0%2C0%2C1%2C224%2C40ZM192%2C72V216a8%2C8%2C0%2C0%2C1-8%2C8H40a8%2C8%2C0%2C0%2C1-8-8V72a8%2C8%2C0%2C0%2C1%2C8-8H184A8%2C8%2C0%2C0%2C1%2C192%2C72Zm-16%2C8H48V208H176Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22download-simple%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M80.3%2C115.7a8%2C8%2C0%2C0%2C1%2C11.4-11.3L120%2C132.7V40a8%2C8%2C0%2C0%2C1%2C16%2C0v92.7l28.3-28.3a8%2C8%2C0%2C0%2C1%2C11.4%2C11.3l-42%2C42a8.2%2C8.2%2C0%2C0%2C1-11.4%2C0ZM216%2C144a8%2C8%2C0%2C0%2C0-8%2C8v56H48V152a8%2C8%2C0%2C0%2C0-16%2C0v56a16%2C16%2C0%2C0%2C0%2C16%2C16H208a16%2C16%2C0%2C0%2C0%2C16-16V152A8%2C8%2C0%2C0%2C0%2C216%2C144Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22envelope-simple%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M224%2C48H32a8%2C8%2C0%2C0%2C0-8%2C8V192a16%2C16%2C0%2C0%2C0%2C16%2C16H216a16%2C16%2C0%2C0%2C0%2C16-16V56A8%2C8%2C0%2C0%2C0%2C224%2C48ZM203.4%2C64%2C128%2C133.1%2C52.6%2C64ZM216%2C192H40V74.2l82.6%2C75.7a8%2C8%2C0%2C0%2C0%2C10.8%2C0L216%2C74.2V192Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22faders%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M136%2C120v96a8%2C8%2C0%2C0%2C1-16%2C0V120a8%2C8%2C0%2C0%2C1%2C16%2C0Zm64%2C72a8%2C8%2C0%2C0%2C0-8%2C8v16a8%2C8%2C0%2C0%2C0%2C16%2C0V200A8%2C8%2C0%2C0%2C0%2C200%2C192Zm24-32H208V40a8%2C8%2C0%2C0%2C0-8-8h0a8%2C8%2C0%2C0%2C0-8%2C8V160H176a8%2C8%2C0%2C0%2C0%2C0%2C16h48a8%2C8%2C0%2C0%2C0%2C0-16ZM56%2C160h0a8%2C8%2C0%2C0%2C0-8%2C8v48a8%2C8%2C0%2C0%2C0%2C8%2C8h0a8%2C8%2C0%2C0%2C0%2C8-8V168A8%2C8%2C0%2C0%2C0%2C56%2C160Zm24-32H64V40a8%2C8%2C0%2C0%2C0-16%2C0v88H32a8%2C8%2C0%2C0%2C0%2C0%2C16H80a8%2C8%2C0%2C0%2C0%2C0-16Zm72-48H136V40a8%2C8%2C0%2C0%2C0-16%2C0V80H104a8%2C8%2C0%2C0%2C0%2C0%2C16h48a8%2C8%2C0%2C0%2C0%2C0-16Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22info%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M128%2C24A104%2C104%2C0%2C1%2C0%2C232%2C128%2C104.1%2C104.1%2C0%2C0%2C0%2C128%2C24Zm0%2C192a88%2C88%2C0%2C1%2C1%2C88-88A88.1%2C88.1%2C0%2C0%2C1%2C128%2C216Zm16-40a8%2C8%2C0%2C0%2C1-8%2C8h-8a8%2C8%2C0%2C0%2C1-8-8V128a8%2C8%2C0%2C0%2C1%2C0-16h8a8%2C8%2C0%2C0%2C1%2C8%2C8v48A8%2C8%2C0%2C0%2C1%2C144%2C176ZM114%2C84a12%2C12%2C0%2C1%2C1%2C12%2C12A12%2C12%2C0%2C0%2C1%2C114%2C84Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22magnifying-glass%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M229.7%2C218.3l-43.3-43.2a92.2%2C92.2%2C0%2C1%2C0-11.3%2C11.3l43.2%2C43.3a8.2%2C8.2%2C0%2C0%2C0%2C11.4%2C0A8.1%2C8.1%2C0%2C0%2C0%2C229.7%2C218.3ZM40%2C116a76%2C76%2C0%2C1%2C1%2C76%2C76A76.1%2C76.1%2C0%2C0%2C1%2C40%2C116Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22map-pin%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M128.1%2C64a40%2C40%2C0%2C1%2C0%2C40%2C40A40.1%2C40.1%2C0%2C0%2C0%2C128.1%2C64Zm0%2C64a24%2C24%2C0%2C1%2C1%2C24-24A24.1%2C24.1%2C0%2C0%2C1%2C128.1%2C128Zm0-112a88.1%2C88.1%2C0%2C0%2C0-88%2C88c0%2C31.4%2C14.5%2C64.7%2C42%2C96.2a259.4%2C259.4%2C0%2C0%2C0%2C41.4%2C38.4%2C8.3%2C8.3%2C0%2C0%2C0%2C9.2%2C0%2C257.6%2C257.6%2C0%2C0%2C0%2C41.5-38.4c27.4-31.5%2C41.9-64.8%2C41.9-96.2A88.1%2C88.1%2C0%2C0%2C0%2C128.1%2C16Zm0%2C206c-16.5-13-72-60.8-72-118a72%2C72%2C0%2C0%2C1%2C144%2C0C200.1%2C161.2%2C144.6%2C209%2C128.1%2C222Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22map-trifold%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M229%2C49.7a7.9%2C7.9%2C0%2C0%2C0-6.8-1.5L161%2C63.5%2C99.7%2C32.8h-.1l-.8-.3h-.2l-.7-.2h-.3l-.7-.2H94.2l-64%2C16A8%2C8%2C0%2C0%2C0%2C24.1%2C56V200a7.8%2C7.8%2C0%2C0%2C0%2C3.1%2C6.3%2C7.9%2C7.9%2C0%2C0%2C0%2C4.9%2C1.7l2-.2%2C61.1-15.3%2C61.3%2C30.7h.1l.7.3h.1l.8.3h3.9l64-16a8%2C8%2C0%2C0%2C0%2C6-7.8V56A7.8%2C7.8%2C0%2C0%2C0%2C229%2C49.7ZM40.1%2C62.2l48-12V177.8l-48%2C12Zm112%2C140.9-48-24V52.9l48%2C24Zm64-9.3-48%2C12V78.2l48-12Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22minus-circle%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M128%2C24A104%2C104%2C0%2C1%2C0%2C232%2C128%2C104.1%2C104.1%2C0%2C0%2C0%2C128%2C24Zm0%2C192a88%2C88%2C0%2C1%2C1%2C88-88A88.1%2C88.1%2C0%2C0%2C1%2C128%2C216Zm48-88a8%2C8%2C0%2C0%2C1-8%2C8H88a8%2C8%2C0%2C0%2C1%2C0-16h80A8%2C8%2C0%2C0%2C1%2C176%2C128Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22minus%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M216%2C136H40a8%2C8%2C0%2C0%2C1%2C0-16H216a8%2C8%2C0%2C0%2C1%2C0%2C16Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22paperclip%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M209.7%2C122.3a8.1%2C8.1%2C0%2C0%2C1%2C0%2C11.4l-82.1%2C81.9a56%2C56%2C0%2C0%2C1-79.2-79.2L147.7%2C35.8a40%2C40%2C0%2C1%2C1%2C56.6%2C56.5L105%2C192.9A23.8%2C23.8%2C0%2C0%2C1%2C88%2C200a24%2C24%2C0%2C0%2C1-17-41l83.3-84.6a8%2C8%2C0%2C1%2C1%2C11.4%2C11.2L82.4%2C170.3A8%2C8%2C0%2C0%2C0%2C80%2C176a8.1%2C8.1%2C0%2C0%2C0%2C2.3%2C5.7A8.3%2C8.3%2C0%2C0%2C0%2C88%2C184a8.1%2C8.1%2C0%2C0%2C0%2C5.7-2.3L192.9%2C81A23.8%2C23.8%2C0%2C0%2C0%2C200%2C64a24%2C24%2C0%2C0%2C0-41-17L59.8%2C147.7a40%2C40%2C0%2C1%2C0%2C56.5%2C56.6l82-82A8.1%2C8.1%2C0%2C0%2C1%2C209.7%2C122.3Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22phone%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M176%2C224C96.6%2C224%2C32%2C159.4%2C32%2C80A56.2%2C56.2%2C0%2C0%2C1%2C80.9%2C24.4%2C16.3%2C16.3%2C0%2C0%2C1%2C97.6%2C34l20.1%2C46.9A15.9%2C15.9%2C0%2C0%2C1%2C116.3%2C96L99.7%2C121.4h0a76.5%2C76.5%2C0%2C0%2C0%2C35.2%2C35L160%2C139.7a15.6%2C15.6%2C0%2C0%2C1%2C15.1-1.3l46.9%2C20a16.3%2C16.3%2C0%2C0%2C1%2C9.6%2C16.7A56.2%2C56.2%2C0%2C0%2C1%2C176%2C224ZM82.9%2C40.3A40%2C40%2C0%2C0%2C0%2C48%2C80%2C128.1%2C128.1%2C0%2C0%2C0%2C176%2C208a40%2C40%2C0%2C0%2C0%2C39.7-34.9l-46.9-20-25%2C16.7a16%2C16%2C0%2C0%2C1-15.7%2C1.1%2C92.5%2C92.5%2C0%2C0%2C1-42.8-42.6%2C16%2C16%2C0%2C0%2C1%2C1-15.7L103%2C87.2ZM135%2C156.5Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22plus-circle%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M128%2C24A104%2C104%2C0%2C1%2C0%2C232%2C128%2C104.1%2C104.1%2C0%2C0%2C0%2C128%2C24Zm0%2C192a88%2C88%2C0%2C1%2C1%2C88-88A88.1%2C88.1%2C0%2C0%2C1%2C128%2C216Zm48-88a8%2C8%2C0%2C0%2C1-8%2C8H136v32a8%2C8%2C0%2C0%2C1-16%2C0V136H88a8%2C8%2C0%2C0%2C1%2C0-16h32V88a8%2C8%2C0%2C0%2C1%2C16%2C0v32h32A8%2C8%2C0%2C0%2C1%2C176%2C128Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22plus%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M224%2C128a8%2C8%2C0%2C0%2C1-8%2C8H136v80a8%2C8%2C0%2C0%2C1-16%2C0V136H40a8%2C8%2C0%2C0%2C1%2C0-16h80V40a8%2C8%2C0%2C0%2C1%2C16%2C0v80h80A8%2C8%2C0%2C0%2C1%2C224%2C128Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22sign-in%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M141.7%2C133.7l-42%2C42A8.3%2C8.3%2C0%2C0%2C1%2C94%2C178a8%2C8%2C0%2C0%2C1-5.6-13.7L116.7%2C136H24a8%2C8%2C0%2C0%2C1%2C0-16h92.7L88.4%2C91.7A8%2C8%2C0%2C0%2C1%2C99.7%2C80.3l42%2C42A8.1%2C8.1%2C0%2C0%2C1%2C141.7%2C133.7ZM192%2C32H136a8%2C8%2C0%2C0%2C0%2C0%2C16h56V208H136a8%2C8%2C0%2C0%2C0%2C0%2C16h56a16%2C16%2C0%2C0%2C0%2C16-16V48A16%2C16%2C0%2C0%2C0%2C192%2C32Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22sign-out%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M221.7%2C133.7l-42%2C42A8.3%2C8.3%2C0%2C0%2C1%2C174%2C178a8%2C8%2C0%2C0%2C1-5.6-13.7L196.7%2C136H104a8%2C8%2C0%2C0%2C1%2C0-16h92.7L168.4%2C91.7a8%2C8%2C0%2C0%2C1%2C11.3-11.4l42%2C42A8.1%2C8.1%2C0%2C0%2C1%2C221.7%2C133.7ZM104%2C208H48V48h56a8%2C8%2C0%2C0%2C0%2C0-16H48A16%2C16%2C0%2C0%2C0%2C32%2C48V208a16%2C16%2C0%2C0%2C0%2C16%2C16h56a8%2C8%2C0%2C0%2C0%2C0-16Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22star%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M187.3%2C232a16.1%2C16.1%2C0%2C0%2C1-8.7-2.6l-50.5-31.9h-.2L81%2C227.2a18%2C18%2C0%2C0%2C1-20.1-.6%2C18.6%2C18.6%2C0%2C0%2C1-7-19.6l13.5-53.1a.8.8%2C0%2C0%2C0-.2-.8L22%2C115.5a16.8%2C16.8%2C0%2C0%2C1-5.2-18.1A16.4%2C16.4%2C0%2C0%2C1%2C31.4%2C86l59-3.8a.5.5%2C0%2C0%2C0%2C.4-.3l22-55.5a16.3%2C16.3%2C0%2C0%2C1%2C30.4%2C0l22%2C55.5a.5.5%2C0%2C0%2C0%2C.4.3l59%2C3.8a16.4%2C16.4%2C0%2C0%2C1%2C14.6%2C11.4%2C16.8%2C16.8%2C0%2C0%2C1-5.2%2C18.1l-45.2%2C37.6a.8.8%2C0%2C0%2C0-.2.8l14.5%2C57.3a16.6%2C16.6%2C0%2C0%2C1-6.3%2C17.7A16.8%2C16.8%2C0%2C0%2C1%2C187.3%2C232ZM128%2C181.5a16%2C16%2C0%2C0%2C1%2C8.7%2C2.5h0l50.4%2C31.9h.2a.7.7%2C0%2C0%2C0%2C.3-.3c.1-.1.1-.2%2C0-.6l-14.5-57.3a16.8%2C16.8%2C0%2C0%2C1%2C5.4-17l45.3-37.6c.1-.1.3-.3.1-.8s-.2-.4-.3-.4l-59.1-3.8a16.4%2C16.4%2C0%2C0%2C1-14.1-10.4L128.3%2C32.3c-.1-.3-.2-.3-.3-.3s-.2%2C0-.3.3L105.6%2C87.8A16.4%2C16.4%2C0%2C0%2C1%2C91.5%2C98.2L32.4%2C102c-.1%2C0-.2%2C0-.3.4s0%2C.7.1.8l45.3%2C37.6a16.8%2C16.8%2C0%2C0%2C1%2C5.4%2C17L69.4%2C211a2.5%2C2.5%2C0%2C0%2C0%2C.9%2C2.6%2C1.6%2C1.6%2C0%2C0%2C0%2C2.1.1L119.3%2C184A16%2C16%2C0%2C0%2C1%2C128%2C181.5Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22thumbs-down%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M237.7%2C157l-12-96a24.1%2C24.1%2C0%2C0%2C0-23.8-21H32A16%2C16%2C0%2C0%2C0%2C16%2C56v88a16%2C16%2C0%2C0%2C0%2C16%2C16H75l37.8%2C75.6A8.2%2C8.2%2C0%2C0%2C0%2C120%2C240a40.1%2C40.1%2C0%2C0%2C0%2C40-40V184h53.9a23.9%2C23.9%2C0%2C0%2C0%2C23.8-27ZM72%2C144H32V56H72Zm147.9%2C21.3a8.2%2C8.2%2C0%2C0%2C1-6%2C2.7H152a8%2C8%2C0%2C0%2C0-8%2C8v24a24%2C24%2C0%2C0%2C1-19.3%2C23.5L88%2C150.1V56H201.9a8%2C8%2C0%2C0%2C1%2C7.9%2C7l12%2C96A8.1%2C8.1%2C0%2C0%2C1%2C219.9%2C165.3Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22thumbs-up%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M231.9%2C80.1a24.3%2C24.3%2C0%2C0%2C0-18-8.1H160V56a40.1%2C40.1%2C0%2C0%2C0-40-40%2C8.2%2C8.2%2C0%2C0%2C0-7.2%2C4.4L75%2C96H32a16%2C16%2C0%2C0%2C0-16%2C16v88a16%2C16%2C0%2C0%2C0%2C16%2C16H201.9a24.1%2C24.1%2C0%2C0%2C0%2C23.8-21l12-96A24.5%2C24.5%2C0%2C0%2C0%2C231.9%2C80.1ZM32%2C112H72v88H32ZM221.8%2C97l-12%2C96a8%2C8%2C0%2C0%2C1-7.9%2C7H88V105.9l36.7-73.4A24%2C24%2C0%2C0%2C1%2C144%2C56V80a8%2C8%2C0%2C0%2C0%2C8%2C8h61.9a8.2%2C8.2%2C0%2C0%2C1%2C6%2C2.7A8.1%2C8.1%2C0%2C0%2C1%2C221.8%2C97Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22trash-simple%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M216%2C48H40a8%2C8%2C0%2C0%2C0%2C0%2C16h8V208a16%2C16%2C0%2C0%2C0%2C16%2C16H192a16%2C16%2C0%2C0%2C0%2C16-16V64h8a8%2C8%2C0%2C0%2C0%2C0-16ZM192%2C208H64V64H192ZM80%2C24a8%2C8%2C0%2C0%2C1%2C8-8h80a8%2C8%2C0%2C0%2C1%2C0%2C16H88A8%2C8%2C0%2C0%2C1%2C80%2C24Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22upload-simple%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M80.3%2C87.6a8%2C8%2C0%2C0%2C1%2C0-11.3l42-42a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C0l42%2C42a8%2C8%2C0%2C0%2C1%2C0%2C11.3%2C8%2C8%2C0%2C0%2C1-11.4%2C0L136%2C59.3V152a8%2C8%2C0%2C0%2C1-16%2C0V59.3L91.7%2C87.6A8%2C8%2C0%2C0%2C1%2C80.3%2C87.6ZM216%2C144a8%2C8%2C0%2C0%2C0-8%2C8v56H48V152a8%2C8%2C0%2C0%2C0-16%2C0v56a16%2C16%2C0%2C0%2C0%2C16%2C16H208a16%2C16%2C0%2C0%2C0%2C16-16V152A8%2C8%2C0%2C0%2C0%2C216%2C144Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22user%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M231.9%2C212a120.7%2C120.7%2C0%2C0%2C0-67.1-54.2%2C72%2C72%2C0%2C1%2C0-73.6%2C0A120.7%2C120.7%2C0%2C0%2C0%2C24.1%2C212a8%2C8%2C0%2C1%2C0%2C13.8%2C8%2C104.1%2C104.1%2C0%2C0%2C1%2C180.2%2C0%2C8%2C8%2C0%2C1%2C0%2C13.8-8ZM72%2C96a56%2C56%2C0%2C1%2C1%2C56%2C56A56%2C56%2C0%2C0%2C1%2C72%2C96Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22users%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M121.2%2C157.9a60%2C60%2C0%2C1%2C0-66.4%2C0A95.5%2C95.5%2C0%2C0%2C0%2C9.5%2C192.8a8%2C8%2C0%2C1%2C0%2C13%2C9.2%2C80.1%2C80.1%2C0%2C0%2C1%2C131%2C0%2C8%2C8%2C0%2C1%2C0%2C13-9.2A95.5%2C95.5%2C0%2C0%2C0%2C121.2%2C157.9ZM44%2C108a44%2C44%2C0%2C1%2C1%2C44%2C44A44%2C44%2C0%2C0%2C1%2C44%2C108Zm202.1%2C95.9A7.9%2C7.9%2C0%2C0%2C1%2C235%2C202a80.2%2C80.2%2C0%2C0%2C0-65.5-34%2C8%2C8%2C0%2C0%2C1%2C0-16%2C44%2C44%2C0%2C0%2C0%2C0-88%2C47.4%2C47.4%2C0%2C0%2C0-11.9%2C1.6%2C8%2C8%2C0%2C0%2C1-9.9-5.5%2C8.1%2C8.1%2C0%2C0%2C1%2C5.5-9.9A64%2C64%2C0%2C0%2C1%2C169.5%2C48a59.9%2C59.9%2C0%2C0%2C1%2C33.2%2C109.9%2C96.3%2C96.3%2C0%2C0%2C1%2C45.4%2C34.9A8%2C8%2C0%2C0%2C1%2C246.1%2C203.9Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22warning%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M120%2C144V104a8%2C8%2C0%2C0%2C1%2C16%2C0v40a8%2C8%2C0%2C0%2C1-16%2C0Zm116.8%2C68A23.9%2C23.9%2C0%2C0%2C1%2C216%2C224H40a23.9%2C23.9%2C0%2C0%2C1-20.7-36L107.2%2C36a24%2C24%2C0%2C0%2C1%2C41.6%2C0l87.9%2C152A23.7%2C23.7%2C0%2C0%2C1%2C236.8%2C212Zm-13.9-16-88-152a8%2C8%2C0%2C0%2C0-13.8%2C0h0l-88%2C152a7.8%2C7.8%2C0%2C0%2C0%2C0%2C8%2C7.9%2C7.9%2C0%2C0%2C0%2C6.9%2C4H216a7.9%2C7.9%2C0%2C0%2C0%2C6.9-4A7.8%2C7.8%2C0%2C0%2C0%2C222.9%2C196ZM128%2C168a12%2C12%2C0%2C1%2C0%2C12%2C12A12%2C12%2C0%2C0%2C0%2C128%2C168Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22x-circle%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M128%2C24A104%2C104%2C0%2C1%2C0%2C232%2C128%2C104.1%2C104.1%2C0%2C0%2C0%2C128%2C24Zm0%2C192a88%2C88%2C0%2C1%2C1%2C88-88A88.1%2C88.1%2C0%2C0%2C1%2C128%2C216Zm37.7-61.7a8.1%2C8.1%2C0%2C0%2C1%2C0%2C11.4%2C8.2%2C8.2%2C0%2C0%2C1-11.4%2C0L128%2C139.3l-26.3%2C26.4a8.2%2C8.2%2C0%2C0%2C1-11.4%2C0%2C8.1%2C8.1%2C0%2C0%2C1%2C0-11.4L116.7%2C128%2C90.3%2C101.7a8.1%2C8.1%2C0%2C0%2C1%2C11.4-11.4L128%2C116.7l26.3-26.4a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C11.4L139.3%2C128Z%22%2F%3E%3C%2Fsymbol%3E%3Csymbol%20id%3D%22x%22%20viewBox%3D%220%200%20256%20256%22%3E%3Cpath%20d%3D%22M205.7%2C194.3a8.1%2C8.1%2C0%2C0%2C1%2C0%2C11.4%2C8.2%2C8.2%2C0%2C0%2C1-11.4%2C0L128%2C139.3%2C61.7%2C205.7a8.2%2C8.2%2C0%2C0%2C1-11.4%2C0%2C8.1%2C8.1%2C0%2C0%2C1%2C0-11.4L116.7%2C128%2C50.3%2C61.7A8.1%2C8.1%2C0%2C0%2C1%2C61.7%2C50.3L128%2C116.7l66.3-66.4a8.1%2C8.1%2C0%2C0%2C1%2C11.4%2C11.4L139.3%2C128Z%22%2F%3E%3C%2Fsymbol%3E%3C%2Fsvg%3E#${a}`})}),o=({ariaLabel:l,ariaLabelNext:o="Vis neste side",ariaLabelPrevious:m="Vis forrige side",ariaLabelItem:e="Vis side",count:d,currentIndex:t,limit:D=7,handleClick:E,className:h,...F})=>{const b=Math.ceil(D/2)-2-1,A=t+b,n=t-b,Z=d-1-A-1,r=n-1;let p=d-1>A?A-1:A;p=r<0?p-r:p;let y=1<n?n+1:n;return y=Z<0?y+Z:y,C("nav",{className:i("sds-pagination",h),"aria-label":l,...F,children:a("ol",{className:"sds-pagination__list",children:[C("li",{className:"sds-pagination__list-item",children:C("button",{className:"sds-pagination__button","aria-label":`${m} ${t}`,disabled:0===t,onClick:()=>E(t-1),children:C(s,{icon:"caret-left"})})}),[...Array(d).keys()].map((a=>0===a||a===d-1||a>=y&&a<=p?C("li",{className:"sds-pagination__list-item",children:C("button",{className:"sds-pagination__button","aria-current":a===t||void 0,"aria-label":`${e} ${a+1}`,disabled:a===t,onClick:()=>E(a),children:a+1})},a):a==p+1||a==y-1?C("li",{className:"sds-pagination__list-item",children:C("div",{className:"sds-pagination__button sds-pagination__button--spacer",children:"…"})},a):void 0)),C("li",{className:"sds-pagination__list-item",children:C("button",{className:"sds-pagination__button","aria-label":`${o} ${t+2}`,disabled:t===d-1,onClick:()=>E(t+1),children:C(s,{icon:"caret-right"})})})]})})};export{o as Pagination};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../icons/Icon.tsx","../Pagination.tsx"],"sourcesContent":["import React, { SVGAttributes } from \"react\";\nimport clsx from \"clsx\";\nimport config from \"./icons.config\";\nimport SdsIcons from \"./dist/sds-icons.svg\";\nimport \"./icon.pcss\";\n\ntype IconType = (typeof config.icons)[number];\n\nexport interface IconProps extends SVGAttributes<SVGElement> {\n icon: IconType;\n}\n\nexport const Icon = ({ icon, className, ...rest }: IconProps) => (\n <svg className={clsx(\"sds-icon\", className)} aria-hidden=\"true\" {...rest}>\n <use href={`${SdsIcons}#${icon}`}></use>\n </svg>\n);\n","import React, { HTMLAttributes } from \"react\";\nimport { Icon } from \"@sikt/sds-icons/Icon\";\nimport { clsx } from \"clsx\";\nimport \"./pagination.pcss\";\n\nexport interface PaginationProps extends HTMLAttributes<HTMLElement> {\n className?: string;\n ariaLabel: string;\n ariaLabelPrevious?: string;\n ariaLabelNext?: string;\n ariaLabelItem?: string;\n count: number;\n currentIndex: number;\n /** Total limit of elements, this includes previous/next/first/last. */\n limit?: number;\n handleClick: (index: number) => void;\n}\n\nexport const Pagination = ({\n ariaLabel,\n ariaLabelNext = \"Vis neste side\",\n ariaLabelPrevious = \"Vis forrige side\",\n ariaLabelItem = \"Vis side\",\n count,\n currentIndex,\n limit = 7,\n handleClick,\n className,\n ...rest\n}: PaginationProps) => {\n const constantCount = 2;\n const delimiter = Math.ceil(limit / 2) - constantCount - 1;\n const max = currentIndex + delimiter;\n const min = currentIndex - delimiter;\n const hasMaxSpacer = count - 1 > max;\n const hasMinSpacer = 1 < min;\n const maxModifier = count - 1 - max - 1;\n const minModifier = min - 1;\n const hasLessBeforeIndex = minModifier < 0;\n const hasLessAfterIndex = maxModifier < 0;\n let maxLimit = hasMaxSpacer ? max - 1 : max;\n maxLimit = hasLessBeforeIndex ? maxLimit - minModifier : maxLimit;\n let minLimit = hasMinSpacer ? min + 1 : min;\n minLimit = hasLessAfterIndex ? minLimit + maxModifier : minLimit;\n\n return (\n <nav\n className={clsx(\"sds-pagination\", className)}\n aria-label={ariaLabel}\n {...rest}\n >\n <ol className=\"sds-pagination__list\">\n <li className=\"sds-pagination__list-item\">\n <button\n className=\"sds-pagination__button\"\n aria-label={`${ariaLabelPrevious} ${currentIndex}`}\n disabled={currentIndex === 0}\n onClick={() => handleClick(currentIndex - 1)}\n >\n <Icon icon=\"caret-left\" />\n </button>\n </li>\n {[...Array(count).keys()].map((value) => {\n if (\n value === 0 ||\n value === count - 1 ||\n (value >= minLimit && value <= maxLimit)\n ) {\n return (\n <li className=\"sds-pagination__list-item\" key={value}>\n <button\n className=\"sds-pagination__button\"\n aria-current={value === currentIndex ? true : undefined}\n aria-label={`${ariaLabelItem} ${value + 1}`}\n disabled={value === currentIndex}\n onClick={() => handleClick(value)}\n >\n {value + 1}\n </button>\n </li>\n );\n } else if (value == maxLimit + 1 || value == minLimit - 1) {\n return (\n <li className=\"sds-pagination__list-item\" key={value}>\n <div className=\"sds-pagination__button sds-pagination__button--spacer\">\n …\n </div>\n </li>\n );\n }\n })}\n <li className=\"sds-pagination__list-item\">\n <button\n className=\"sds-pagination__button\"\n aria-label={`${ariaLabelNext} ${currentIndex + 2}`}\n disabled={currentIndex === count - 1}\n onClick={() => handleClick(currentIndex + 1)}\n >\n <Icon icon=\"caret-right\" />\n </button>\n </li>\n </ol>\n </nav>\n );\n};\n"],"names":["Icon","icon","className","rest","_jsx","clsx","children","href","Pagination","ariaLabel","ariaLabelNext","ariaLabelPrevious","ariaLabelItem","count","currentIndex","limit","handleClick","delimiter","Math","ceil","max","min","maxModifier","minModifier","maxLimit","minLimit","_jsxs","disabled","onClick","Array","keys","map","value","undefined"],"mappings":"+FAYO,MAAMA,EAAO,EAAGC,OAAMC,eAAcC,KACzCC,EAAA,MAAA,CAAKF,UAAWG,EAAK,WAAYH,iBAAwB,UAAWC,EAClEG,SAAAF,EAAA,MAAA,CAAKG,KAAM,s7hBAAeN,QCIjBO,EAAa,EACxBC,YACAC,gBAAgB,iBAChBC,oBAAoB,mBACpBC,gBAAgB,WAChBC,QACAC,eACAC,QAAQ,EACRC,cACAd,eACGC,MAEH,MACMc,EAAYC,KAAKC,KAAKJ,EAAQ,GADd,EACmC,EACnDK,EAAMN,EAAeG,EACrBI,EAAMP,EAAeG,EAGrBK,EAAcT,EAAQ,EAAIO,EAAM,EAChCG,EAAcF,EAAM,EAG1B,IAAIG,EANiBX,EAAQ,EAAIO,EAMHA,EAAM,EAAIA,EACxCI,EAH2BD,EAAc,EAGTC,EAAWD,EAAcC,EACzD,IAAIC,EAPiB,EAAIJ,EAOKA,EAAM,EAAIA,EAGxC,OAFAI,EAJ0BH,EAAc,EAITG,EAAWH,EAAcG,EAGtDrB,EACE,MAAA,CAAAF,UAAWG,EAAK,iBAAkBH,gBACtBO,KACRN,EAEJG,SAAAoB,EAAA,KAAA,CAAIxB,UAAU,uBACZI,SAAA,CAAAF,EAAA,KAAA,CAAIF,UAAU,4BACZI,SAAAF,EAAA,SAAA,CACEF,UAAU,yBACE,aAAA,GAAGS,KAAqBG,IACpCa,SAA2B,IAAjBb,EACVc,QAAS,IAAMZ,EAAYF,EAAe,GAE1CR,SAAAF,EAACJ,EAAK,CAAAC,KAAK,mBAGd,IAAI4B,MAAMhB,GAAOiB,QAAQC,KAAKC,GAEjB,IAAVA,GACAA,IAAUnB,EAAQ,GACjBmB,GAASP,GAAYO,GAASR,EAG7BpB,EAAI,KAAA,CAAAF,UAAU,qCACZE,EACE,SAAA,CAAAF,UAAU,yBACI,eAAA8B,IAAUlB,QAAsBmB,EAAS,aAC3C,GAAGrB,KAAiBoB,EAAQ,IACxCL,SAAUK,IAAUlB,EACpBc,QAAS,IAAMZ,EAAYgB,GAAM1B,SAEhC0B,EAAQ,KARkCA,GAYxCA,GAASR,EAAW,GAAKQ,GAASP,EAAW,EAEpDrB,EAAA,KAAA,CAAIF,UAAU,4BACZI,SAAAF,EAAA,MAAA,CAAKF,UAAU,wDAETI,SAAA,OAHuC0B,QAF5C,IAUT5B,EAAA,KAAA,CAAIF,UAAU,4BACZI,SAAAF,EAAA,SAAA,CACEF,UAAU,yBAAwB,aACtB,GAAGQ,KAAiBI,EAAe,IAC/Ca,SAAUb,IAAiBD,EAAQ,EACnCe,QAAS,IAAMZ,EAAYF,EAAe,GAAER,SAE5CF,EAACJ,EAAI,CAACC,KAAK,wBAKnB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sikt/sds-pagination",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"license": "UNLICENSED",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.js",
|
|
7
|
+
"style": "dist/index.css",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "rollup -c ../../rollup.config.mjs"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"@sikt/sds-icons": "^0.1.0"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"@sikt/sds-core": "^0.2.0",
|
|
19
|
+
"clsx": "^1.2.1",
|
|
20
|
+
"react": "^18.0.0",
|
|
21
|
+
"react-dom": "^18.0.0"
|
|
22
|
+
}
|
|
23
|
+
}
|