@gridui/pagination 1.0.1 → 1.0.2
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 +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +2 -2
- package/dist/styles.css +22 -22
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -5,4 +5,4 @@ Core family. Public API: `Pagination`, `PaginationLabels`, `PaginationProps`.
|
|
|
5
5
|
Import components from `@gridui/pagination` and load `@gridui/pagination/styles.css` after Theme.
|
|
6
6
|
Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
|
|
7
7
|
|
|
8
|
-
See [component ownership](
|
|
8
|
+
See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/pagination/.changeset/history).
|
package/dist/index.js
CHANGED
|
@@ -69,7 +69,7 @@ var Pagination = (props) => {
|
|
|
69
69
|
"aria-current": active ? "page" : void 0,
|
|
70
70
|
variant: active ? "secondary" : "quiet",
|
|
71
71
|
layout: "icon",
|
|
72
|
-
className: typeof children === "number" ? "h-auto min-h-11 w-auto min-w-11 px-gridui-8 whitespace-nowrap" : void 0
|
|
72
|
+
className: typeof children === "number" ? "gridui-u-h-auto gridui-u-min-h-11 gridui-u-w-auto gridui-u-min-w-11 gridui-u-px-gridui-8 gridui-u-whitespace-nowrap" : void 0
|
|
73
73
|
};
|
|
74
74
|
if (getPageHref && !disabled) {
|
|
75
75
|
return /* @__PURE__ */ jsx(
|
|
@@ -104,7 +104,7 @@ var Pagination = (props) => {
|
|
|
104
104
|
"span",
|
|
105
105
|
{
|
|
106
106
|
role: "img",
|
|
107
|
-
className: "inline-flex min-h-11 min-w-11 items-center justify-center text-muted",
|
|
107
|
+
className: "gridui-u-inline-flex gridui-u-min-h-11 gridui-u-min-w-11 gridui-u-items-center gridui-u-justify-center gridui-u-text-muted",
|
|
108
108
|
"aria-label": labels.ellipsis,
|
|
109
109
|
children: /* @__PURE__ */ jsx(
|
|
110
110
|
Ellipsis,
|
|
@@ -122,16 +122,16 @@ var Pagination = (props) => {
|
|
|
122
122
|
{
|
|
123
123
|
...restProps,
|
|
124
124
|
"aria-label": labels.navigation,
|
|
125
|
-
className: cn("min-w-0", className),
|
|
125
|
+
className: cn("gridui-u-min-w-0", className),
|
|
126
126
|
children: /* @__PURE__ */ jsxs(
|
|
127
127
|
"ul",
|
|
128
128
|
{
|
|
129
|
-
className: "m-0 flex list-none flex-wrap items-center gap-0 p-0 md:gap-gridui-4",
|
|
129
|
+
className: "gridui-u-m-0 gridui-u-flex gridui-u-list-none gridui-u-flex-wrap gridui-u-items-center gridui-u-gap-0 gridui-u-p-0 gridui-u-md:gap-gridui-4",
|
|
130
130
|
children: [
|
|
131
131
|
/* @__PURE__ */ jsx("li", { children: control(current - 1, labels.previous, /* @__PURE__ */ jsx(
|
|
132
132
|
ChevronLeft,
|
|
133
133
|
{
|
|
134
|
-
className: "rtl:rotate-180",
|
|
134
|
+
className: "gridui-u-rtl:rotate-180",
|
|
135
135
|
"aria-hidden": "true"
|
|
136
136
|
}
|
|
137
137
|
), pageCount === 0 || current === 1) }),
|
|
@@ -140,9 +140,9 @@ var Pagination = (props) => {
|
|
|
140
140
|
Fragment,
|
|
141
141
|
{
|
|
142
142
|
children: [
|
|
143
|
-
entry === pageCount && compactEntries.includes("end-ellipsis") && !entries.includes("end-ellipsis") && renderEntry("end-ellipsis", "md:hidden"),
|
|
144
|
-
renderEntry(entry, compactEntries.includes(entry) ? void 0 : "hidden md:block"),
|
|
145
|
-
entry === 1 && compactEntries.includes("start-ellipsis") && !entries.includes("start-ellipsis") && renderEntry("start-ellipsis", "md:hidden")
|
|
143
|
+
entry === pageCount && compactEntries.includes("end-ellipsis") && !entries.includes("end-ellipsis") && renderEntry("end-ellipsis", cn("gridui-u-md:hidden")),
|
|
144
|
+
renderEntry(entry, compactEntries.includes(entry) ? void 0 : cn("gridui-u-hidden gridui-u-md:block")),
|
|
145
|
+
entry === 1 && compactEntries.includes("start-ellipsis") && !entries.includes("start-ellipsis") && renderEntry("start-ellipsis", cn("gridui-u-md:hidden"))
|
|
146
146
|
]
|
|
147
147
|
},
|
|
148
148
|
entry
|
|
@@ -151,7 +151,7 @@ var Pagination = (props) => {
|
|
|
151
151
|
/* @__PURE__ */ jsx("li", { children: control(current + 1, labels.next, /* @__PURE__ */ jsx(
|
|
152
152
|
ChevronRight,
|
|
153
153
|
{
|
|
154
|
-
className: "rtl:rotate-180",
|
|
154
|
+
className: "gridui-u-rtl:rotate-180",
|
|
155
155
|
"aria-hidden": "true"
|
|
156
156
|
}
|
|
157
157
|
), pageCount === 0 || current >= pageCount) })
|
package/dist/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/pagination/range.ts", "../src/pagination/pagination.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @author WMXPY\n * @package Pagination\n * @namespace Pagination\n * @description Range\n */\n\nexport type PaginationEntry = number | \"start-ellipsis\" | \"end-ellipsis\";\n\nexport const paginationRange = (page: number, pageCount: number, compact = false): PaginationEntry[] => {\n if (!Number.isSafeInteger(pageCount) || pageCount < 0 || !Number.isSafeInteger(page) || page < 1) {\n throw new RangeError(\"Pagination requires a positive integer page and a non-negative integer pageCount.\");\n }\n if (pageCount === 0) {\n return [];\n }\n if (pageCount <= (compact ? 5 : 7)) {\n return Array.from({ length: pageCount }, (_, index) => {\n return index + 1;\n });\n }\n const current = Math.min(page, pageCount);\n if (compact) {\n const positions = [\n ...new Set([\n 1,\n current,\n pageCount,\n ]),\n ];\n const entries: PaginationEntry[] = [];\n for (const [\n index,\n position,\n ] of positions.entries()) {\n if (index > 0 && position - positions[index - 1]! > 1) {\n entries.push(position <= current ? \"start-ellipsis\" : \"end-ellipsis\");\n }\n entries.push(position);\n }\n return entries;\n }\n const start = Math.max(2, Math.min(current - 1, pageCount - 4));\n const end = Math.min(pageCount - 1, Math.max(current + 1, 5));\n const entries: PaginationEntry[] = [1];\n if (start === 3) {\n entries.push(2);\n } else if (start > 3) {\n entries.push(\"start-ellipsis\");\n }\n for (let index = start; index <= end; index++) { entries.push(index); }\n if (end === pageCount - 2) {\n entries.push(pageCount - 1);\n } else if (end < pageCount - 2) {\n entries.push(\"end-ellipsis\");\n }\n entries.push(pageCount);\n return entries;\n};\n", "/**\n * @author WMXPY\n * @package Pagination\n * @namespace Pagination\n * @description Pagination\n */\n\nimport { type PaginationEntry, paginationRange } from \"./range\";\nimport { Button, ButtonLink } from \"@gridui/button\";\nimport { cn } from \"@gridui/style-utils\";\nimport { ChevronLeft, ChevronRight, Ellipsis } from \"lucide-react\";\nimport { type ComponentPropsWithRef, type FC, Fragment, type ReactNode } from \"react\";\n\nexport type PaginationLabels = {\n readonly navigation: string;\n readonly previous: string;\n readonly next: string;\n readonly page: (page: number) => string;\n readonly ellipsis: string;\n};\n\nexport type PaginationProps = Omit<ComponentPropsWithRef<\"nav\">, \"children\" | \"aria-label\"> & {\n readonly page: number;\n readonly pageCount: number;\n readonly labels: PaginationLabels;\n} & ({\n readonly onPageChange: (page: number) => void;\n readonly getPageHref?: never;\n} | {\n readonly getPageHref: (page: number) => string;\n readonly onPageChange?: never;\n});\n\nexport const Pagination: FC<PaginationProps> = (props: PaginationProps) => {\n const { page, pageCount, labels, onPageChange, getPageHref, className, ...restProps } = props;\n const entries = paginationRange(page, pageCount);\n const compactEntries = paginationRange(page, pageCount, true);\n const current = Math.max(1, Math.min(page, pageCount));\n const control = (target: number, label: string, children: ReactNode, disabled: boolean, active = false) => {\n const shared = {\n \"aria-label\": label,\n \"aria-current\": active ? \"page\" as const : undefined,\n variant: active ? \"secondary\" as const : \"quiet\" as const,\n layout: \"icon\" as const,\n className: typeof children === \"number\" ? \"h-auto min-h-11 w-auto min-w-11 px-gridui-8 whitespace-nowrap\" : undefined,\n };\n if (getPageHref && !disabled) {\n return (<ButtonLink\n {...shared}\n href={getPageHref(target)}\n >\n {children}\n </ButtonLink>);\n }\n return (<Button\n {...shared}\n disabled={disabled}\n onClick={() => {\n if (target !== current) {\n onPageChange?.(target);\n }\n }}\n >\n {children}\n </Button>);\n };\n const renderEntry = (entry: PaginationEntry, entryClassName?: string) => {\n return (<li\n className={entryClassName}\n >\n {typeof entry === \"number\"\n ? control(entry, labels.page(entry), entry, false, entry === current)\n : (<span\n role=\"img\"\n className=\"inline-flex min-h-11 min-w-11 items-center justify-center text-muted\"\n aria-label={labels.ellipsis}\n >\n <Ellipsis\n aria-hidden=\"true\"\n />\n </span>)}\n </li>);\n };\n return (<nav\n {...restProps}\n aria-label={labels.navigation}\n className={cn(\"min-w-0\", className)}\n >\n <ul\n className=\"m-0 flex list-none flex-wrap items-center gap-0 p-0 md:gap-gridui-4\"\n >\n <li>\n {control(current - 1, labels.previous, (<ChevronLeft\n className=\"rtl:rotate-180\"\n aria-hidden=\"true\"\n />), pageCount === 0 || current === 1)}\n </li>\n {entries.map(entry => {\n return (<Fragment\n key={entry}\n >\n {entry === pageCount && compactEntries.includes(\"end-ellipsis\") && !entries.includes(\"end-ellipsis\")\n && renderEntry(\"end-ellipsis\", \"md:hidden\")}\n {renderEntry(entry, compactEntries.includes(entry) ? undefined : \"hidden md:block\")}\n {entry === 1 && compactEntries.includes(\"start-ellipsis\") && !entries.includes(\"start-ellipsis\")\n && renderEntry(\"start-ellipsis\", \"md:hidden\")}\n </Fragment>);\n })}\n <li>\n {control(current + 1, labels.next, (<ChevronRight\n className=\"rtl:rotate-180\"\n aria-hidden=\"true\"\n />), pageCount === 0 || current >= pageCount)}\n </li>\n </ul>\n </nav>);\n};\n"],
|
|
5
|
-
"mappings": ";AASO,IAAM,kBAAkB,CAAC,MAAc,WAAmB,UAAU,UAA6B;AACpG,MAAI,CAAC,OAAO,cAAc,SAAS,KAAK,YAAY,KAAK,CAAC,OAAO,cAAc,IAAI,KAAK,OAAO,GAAG;A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/B;AACA,UAAQ,KAAK,SAAS;AACtB,SAAO;AACX;;;AClDA,SAAS,QAAQ,kBAAkB;AACnC,SAAS,UAAU;AACnB,SAAS,aAAa,cAAc,gBAAgB;AACpD,SAA8C,gBAAgC;AAoC1D,cAmDI,YAnDJ;AAdb,IAAM,aAAkC,CAAC,UAA2B;AACvE,QAAM,EAAE,MAAM,WAAW,QAAQ,cAAc,aAAa,WAAW,GAAG,UAAU,IAAI;AACxF,QAAM,UAAU,gBAAgB,MAAM,SAAS;AAC/C,QAAM,iBAAiB,gBAAgB,MAAM,WAAW,IAAI;AAC5D,QAAM,UAAU,KAAK,IAAI,GAAG,KAAK,IAAI,MAAM,SAAS,CAAC;AACrD,QAAM,UAAU,CAAC,QAAgB,OAAe,UAAqB,UAAmB,SAAS,UAAU;AACvG,UAAM,SAAS;AAAA,MACX,cAAc;AAAA,MACd,gBAAgB,SAAS,SAAkB;AAAA,MAC3C,SAAS,SAAS,cAAuB;AAAA,MACzC,QAAQ;AAAA,MACR,WAAW,OAAO,aAAa,WAAW,
|
|
4
|
+
"sourcesContent": ["/**\n * @author WMXPY\n * @package Pagination\n * @namespace Pagination\n * @description Range\n */\n\nexport type PaginationEntry = number | \"start-ellipsis\" | \"end-ellipsis\";\n\nexport const paginationRange = (page: number, pageCount: number, compact = false): PaginationEntry[] => {\n if (!Number.isSafeInteger(pageCount) || pageCount < 0 || !Number.isSafeInteger(page) || page < 1) {\n throw new RangeError(\"Pagination requires a positive integer page and a non-negative integer pageCount.\");\n }\n if (pageCount === 0) {\n return [];\n }\n if (pageCount <= (compact ? 5 : 7)) {\n return Array.from({ length: pageCount }, (_, index) => {\n return index + 1;\n });\n }\n const current = Math.min(page, pageCount);\n if (compact) {\n const positions = [\n ...new Set([\n 1,\n current,\n pageCount,\n ]),\n ];\n const entries: PaginationEntry[] = [];\n for (const [\n index,\n position,\n ] of positions.entries()) {\n if (index > 0 && position - positions[index - 1]! > 1) {\n entries.push(position <= current ? \"start-ellipsis\" : \"end-ellipsis\");\n }\n entries.push(position);\n }\n return entries;\n }\n const start = Math.max(2, Math.min(current - 1, pageCount - 4));\n const end = Math.min(pageCount - 1, Math.max(current + 1, 5));\n const entries: PaginationEntry[] = [1];\n if (start === 3) {\n entries.push(2);\n } else if (start > 3) {\n entries.push(\"start-ellipsis\");\n }\n for (let index = start; index <= end; index++) { entries.push(index); }\n if (end === pageCount - 2) {\n entries.push(pageCount - 1);\n } else if (end < pageCount - 2) {\n entries.push(\"end-ellipsis\");\n }\n entries.push(pageCount);\n return entries;\n};\n", "/**\n * @author WMXPY\n * @package Pagination\n * @namespace Pagination\n * @description Pagination\n */\n\nimport { type PaginationEntry, paginationRange } from \"./range\";\nimport { Button, ButtonLink } from \"@gridui/button\";\nimport { cn } from \"@gridui/style-utils\";\nimport { ChevronLeft, ChevronRight, Ellipsis } from \"lucide-react\";\nimport { type ComponentPropsWithRef, type FC, Fragment, type ReactNode } from \"react\";\n\nexport type PaginationLabels = {\n readonly navigation: string;\n readonly previous: string;\n readonly next: string;\n readonly page: (page: number) => string;\n readonly ellipsis: string;\n};\n\nexport type PaginationProps = Omit<ComponentPropsWithRef<\"nav\">, \"children\" | \"aria-label\"> & {\n readonly page: number;\n readonly pageCount: number;\n readonly labels: PaginationLabels;\n} & ({\n readonly onPageChange: (page: number) => void;\n readonly getPageHref?: never;\n} | {\n readonly getPageHref: (page: number) => string;\n readonly onPageChange?: never;\n});\n\nexport const Pagination: FC<PaginationProps> = (props: PaginationProps) => {\n const { page, pageCount, labels, onPageChange, getPageHref, className, ...restProps } = props;\n const entries = paginationRange(page, pageCount);\n const compactEntries = paginationRange(page, pageCount, true);\n const current = Math.max(1, Math.min(page, pageCount));\n const control = (target: number, label: string, children: ReactNode, disabled: boolean, active = false) => {\n const shared = {\n \"aria-label\": label,\n \"aria-current\": active ? \"page\" as const : undefined,\n variant: active ? \"secondary\" as const : \"quiet\" as const,\n layout: \"icon\" as const,\n className: typeof children === \"number\" ? \"gridui-u-h-auto gridui-u-min-h-11 gridui-u-w-auto gridui-u-min-w-11 gridui-u-px-gridui-8 gridui-u-whitespace-nowrap\" : undefined,\n };\n if (getPageHref && !disabled) {\n return (<ButtonLink\n {...shared}\n href={getPageHref(target)}\n >\n {children}\n </ButtonLink>);\n }\n return (<Button\n {...shared}\n disabled={disabled}\n onClick={() => {\n if (target !== current) {\n onPageChange?.(target);\n }\n }}\n >\n {children}\n </Button>);\n };\n const renderEntry = (entry: PaginationEntry, entryClassName?: string) => {\n return (<li\n className={entryClassName}\n >\n {typeof entry === \"number\"\n ? control(entry, labels.page(entry), entry, false, entry === current)\n : (<span\n role=\"img\"\n className=\"gridui-u-inline-flex gridui-u-min-h-11 gridui-u-min-w-11 gridui-u-items-center gridui-u-justify-center gridui-u-text-muted\"\n aria-label={labels.ellipsis}\n >\n <Ellipsis\n aria-hidden=\"true\"\n />\n </span>)}\n </li>);\n };\n return (<nav\n {...restProps}\n aria-label={labels.navigation}\n className={cn(\"gridui-u-min-w-0\", className)}\n >\n <ul\n className=\"gridui-u-m-0 gridui-u-flex gridui-u-list-none gridui-u-flex-wrap gridui-u-items-center gridui-u-gap-0 gridui-u-p-0 gridui-u-md:gap-gridui-4\"\n >\n <li>\n {control(current - 1, labels.previous, (<ChevronLeft\n className=\"gridui-u-rtl:rotate-180\"\n aria-hidden=\"true\"\n />), pageCount === 0 || current === 1)}\n </li>\n {entries.map(entry => {\n return (<Fragment\n key={entry}\n >\n {entry === pageCount && compactEntries.includes(\"end-ellipsis\") && !entries.includes(\"end-ellipsis\")\n && renderEntry(\"end-ellipsis\", cn(\"gridui-u-md:hidden\"))}\n {renderEntry(entry, compactEntries.includes(entry) ? undefined : cn(\"gridui-u-hidden gridui-u-md:block\"))}\n {entry === 1 && compactEntries.includes(\"start-ellipsis\") && !entries.includes(\"start-ellipsis\")\n && renderEntry(\"start-ellipsis\", cn(\"gridui-u-md:hidden\"))}\n </Fragment>);\n })}\n <li>\n {control(current + 1, labels.next, (<ChevronRight\n className=\"gridui-u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,MAAO;AAAA,cAAC;AAAA;AAAA,gBACjC,WAAU;AAAA,gBACV,eAAY;AAAA;AAAA,YAChB,GAAK,cAAc,KAAK,WAAW,SAAS,GAChD;AAAA;AAAA;AAAA,MACJ;AAAA;AAAA,EACJ;AACJ;",
|
|
6
6
|
"names": ["entries"]
|
|
7
7
|
}
|
package/dist/styles.css
CHANGED
|
@@ -6,72 +6,72 @@
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
@layer utilities {
|
|
9
|
-
.m-0 {
|
|
9
|
+
.gridui-u-m-0 {
|
|
10
10
|
margin: 0px;
|
|
11
11
|
}
|
|
12
|
-
.flex {
|
|
12
|
+
.gridui-u-flex {
|
|
13
13
|
display: flex;
|
|
14
14
|
}
|
|
15
|
-
.hidden {
|
|
15
|
+
.gridui-u-hidden {
|
|
16
16
|
display: none;
|
|
17
17
|
}
|
|
18
|
-
.inline-flex {
|
|
18
|
+
.gridui-u-inline-flex {
|
|
19
19
|
display: inline-flex;
|
|
20
20
|
}
|
|
21
|
-
.h-auto {
|
|
21
|
+
.gridui-u-h-auto {
|
|
22
22
|
height: auto;
|
|
23
23
|
}
|
|
24
|
-
.min-h-11 {
|
|
24
|
+
.gridui-u-min-h-11 {
|
|
25
25
|
min-height: calc(var(--spacing) * 11);
|
|
26
26
|
}
|
|
27
|
-
.w-auto {
|
|
27
|
+
.gridui-u-w-auto {
|
|
28
28
|
width: auto;
|
|
29
29
|
}
|
|
30
|
-
.min-w-0 {
|
|
30
|
+
.gridui-u-min-w-0 {
|
|
31
31
|
min-width: 0px;
|
|
32
32
|
}
|
|
33
|
-
.min-w-11 {
|
|
33
|
+
.gridui-u-min-w-11 {
|
|
34
34
|
min-width: calc(var(--spacing) * 11);
|
|
35
35
|
}
|
|
36
|
-
.list-none {
|
|
36
|
+
.gridui-u-list-none {
|
|
37
37
|
list-style-type: none;
|
|
38
38
|
}
|
|
39
|
-
.flex-wrap {
|
|
39
|
+
.gridui-u-flex-wrap {
|
|
40
40
|
flex-wrap: wrap;
|
|
41
41
|
}
|
|
42
|
-
.items-center {
|
|
42
|
+
.gridui-u-items-center {
|
|
43
43
|
align-items: center;
|
|
44
44
|
}
|
|
45
|
-
.justify-center {
|
|
45
|
+
.gridui-u-justify-center {
|
|
46
46
|
justify-content: center;
|
|
47
47
|
}
|
|
48
|
-
.gap-0 {
|
|
48
|
+
.gridui-u-gap-0 {
|
|
49
49
|
gap: 0px;
|
|
50
50
|
}
|
|
51
|
-
.p-0 {
|
|
51
|
+
.gridui-u-p-0 {
|
|
52
52
|
padding: 0px;
|
|
53
53
|
}
|
|
54
|
-
.px-gridui-8 {
|
|
54
|
+
.gridui-u-px-gridui-8 {
|
|
55
55
|
padding-inline: var(--gridui-space-8);
|
|
56
56
|
}
|
|
57
|
-
.whitespace-nowrap {
|
|
57
|
+
.gridui-u-whitespace-nowrap {
|
|
58
58
|
white-space: nowrap;
|
|
59
59
|
}
|
|
60
|
-
.text-muted {
|
|
60
|
+
.gridui-u-text-muted {
|
|
61
61
|
color: var(--gridui-muted);
|
|
62
62
|
}
|
|
63
63
|
@media (width >= 48rem) {
|
|
64
|
-
.md\:block {
|
|
64
|
+
.gridui-u-md\:block {
|
|
65
65
|
display: block;
|
|
66
66
|
}
|
|
67
|
-
.md\:hidden {
|
|
67
|
+
.gridui-u-md\:hidden {
|
|
68
68
|
display: none;
|
|
69
69
|
}
|
|
70
|
-
.md\:gap-gridui-4 {
|
|
70
|
+
.gridui-u-md\:gap-gridui-4 {
|
|
71
71
|
gap: var(--gridui-space-4);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
.rtl\:rotate-180:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
|
|
74
|
+
.gridui-u-rtl\:rotate-180:where(:dir(rtl), [dir="rtl"], [dir="rtl"] *) {
|
|
75
75
|
rotate: 180deg;
|
|
76
76
|
}
|
|
77
77
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gridui/pagination",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "GridUI React pagination",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"react-dom": "^19.2.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@gridui/button": "^2.
|
|
30
|
-
"@gridui/style-utils": "^2.1.
|
|
31
|
-
"@gridui/theme": "^2.2
|
|
32
|
-
"lucide-react": "1.
|
|
29
|
+
"@gridui/button": "^2.2.0",
|
|
30
|
+
"@gridui/style-utils": "^2.1.4",
|
|
31
|
+
"@gridui/theme": "^2.3.2",
|
|
32
|
+
"lucide-react": "1.65.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@gridui-internal/configuration": "0.0.0-internal",
|