@yamada-ui/pagination 0.2.17 → 0.4.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,3 +1,5 @@
1
+ "use client"
2
+
1
3
  // src/pagination-icon.tsx
2
4
  import { Icon } from "@yamada-ui/icon";
3
5
  import { jsx } from "react/jsx-runtime";
@@ -1,3 +1,5 @@
1
+ "use client"
2
+
1
3
  // src/use-pagination.ts
2
4
  import { useControllableState } from "@yamada-ui/use-controllable-state";
3
5
  import { useValue } from "@yamada-ui/use-value";
@@ -1,10 +1,11 @@
1
+ "use client"
1
2
  import {
2
3
  PaginationItem
3
- } from "./chunk-SGJ63NEB.mjs";
4
+ } from "./chunk-YHCPL4SM.mjs";
4
5
  import {
5
6
  PaginationProvider,
6
7
  usePagination
7
- } from "./chunk-QYITLVQJ.mjs";
8
+ } from "./chunk-5ILRVOTK.mjs";
8
9
 
9
10
  // src/pagination.tsx
10
11
  import {
@@ -25,6 +26,7 @@ var Pagination = forwardRef((props, ref) => {
25
26
  itemProps,
26
27
  withControls = true,
27
28
  withEdges = false,
29
+ innerProps,
28
30
  controlProps,
29
31
  controlPrevProps,
30
32
  controlNextProps,
@@ -75,7 +77,15 @@ var Pagination = forwardRef((props, ref) => {
75
77
  className: cx("ui-pagination", className),
76
78
  role: "navigation",
77
79
  __css: css,
78
- ...omitObject(rest, ["onChange"]),
80
+ ...omitObject(rest, [
81
+ "page",
82
+ "defaultPage",
83
+ "total",
84
+ "siblings",
85
+ "boundaries",
86
+ "isDisabled",
87
+ "onChange"
88
+ ]),
79
89
  "data-disabled": dataAttr(isDisabled),
80
90
  children: [
81
91
  computedWithEdges ? /* @__PURE__ */ jsx(
@@ -108,7 +118,20 @@ var Pagination = forwardRef((props, ref) => {
108
118
  )
109
119
  }
110
120
  ) : null,
111
- children,
121
+ /* @__PURE__ */ jsx(
122
+ ui.div,
123
+ {
124
+ className: "ui-pagination-inner",
125
+ __css: {
126
+ display: "flex",
127
+ justifyContent: "center",
128
+ alignItems: "center",
129
+ ...styles.inner
130
+ },
131
+ ...innerProps,
132
+ children
133
+ }
134
+ ),
112
135
  computedWithControls ? /* @__PURE__ */ jsx(
113
136
  Component,
114
137
  {
@@ -1,13 +1,14 @@
1
+ "use client"
1
2
  import {
2
3
  DotsIcon,
3
4
  FirstIcon,
4
5
  LastIcon,
5
6
  NextIcon,
6
7
  PrevIcon
7
- } from "./chunk-IXTXZCRI.mjs";
8
+ } from "./chunk-2P67WSOL.mjs";
8
9
  import {
9
10
  usePaginationContext
10
- } from "./chunk-QYITLVQJ.mjs";
11
+ } from "./chunk-5ILRVOTK.mjs";
11
12
 
12
13
  // src/pagination-item.tsx
13
14
  import { ui } from "@yamada-ui/core";
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use client"
1
2
  "use strict";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -231,6 +232,7 @@ var Pagination = (0, import_core2.forwardRef)((props, ref) => {
231
232
  itemProps,
232
233
  withControls = true,
233
234
  withEdges = false,
235
+ innerProps,
234
236
  controlProps,
235
237
  controlPrevProps,
236
238
  controlNextProps,
@@ -281,7 +283,15 @@ var Pagination = (0, import_core2.forwardRef)((props, ref) => {
281
283
  className: (0, import_utils3.cx)("ui-pagination", className),
282
284
  role: "navigation",
283
285
  __css: css,
284
- ...(0, import_utils3.omitObject)(rest, ["onChange"]),
286
+ ...(0, import_utils3.omitObject)(rest, [
287
+ "page",
288
+ "defaultPage",
289
+ "total",
290
+ "siblings",
291
+ "boundaries",
292
+ "isDisabled",
293
+ "onChange"
294
+ ]),
285
295
  "data-disabled": (0, import_utils3.dataAttr)(isDisabled),
286
296
  children: [
287
297
  computedWithEdges ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -314,7 +324,20 @@ var Pagination = (0, import_core2.forwardRef)((props, ref) => {
314
324
  )
315
325
  }
316
326
  ) : null,
317
- children,
327
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
328
+ import_core2.ui.div,
329
+ {
330
+ className: "ui-pagination-inner",
331
+ __css: {
332
+ display: "flex",
333
+ justifyContent: "center",
334
+ alignItems: "center",
335
+ ...styles.inner
336
+ },
337
+ ...innerProps,
338
+ children
339
+ }
340
+ ),
318
341
  computedWithControls ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
319
342
  Component,
320
343
  {
package/dist/index.mjs CHANGED
@@ -1,11 +1,12 @@
1
+ "use client"
1
2
  import {
2
3
  Pagination
3
- } from "./chunk-TE22MBG6.mjs";
4
- import "./chunk-SGJ63NEB.mjs";
5
- import "./chunk-IXTXZCRI.mjs";
4
+ } from "./chunk-YH7A5X2I.mjs";
5
+ import "./chunk-YHCPL4SM.mjs";
6
+ import "./chunk-2P67WSOL.mjs";
6
7
  import {
7
8
  usePagination
8
- } from "./chunk-QYITLVQJ.mjs";
9
+ } from "./chunk-5ILRVOTK.mjs";
9
10
  export {
10
11
  Pagination,
11
12
  usePagination
@@ -1,3 +1,4 @@
1
+ "use client"
1
2
  "use strict";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,10 +1,11 @@
1
+ "use client"
1
2
  import {
2
3
  DotsIcon,
3
4
  FirstIcon,
4
5
  LastIcon,
5
6
  NextIcon,
6
7
  PrevIcon
7
- } from "./chunk-IXTXZCRI.mjs";
8
+ } from "./chunk-2P67WSOL.mjs";
8
9
  export {
9
10
  DotsIcon,
10
11
  FirstIcon,
@@ -1,3 +1,4 @@
1
+ "use client"
1
2
  "use strict";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,8 +1,9 @@
1
+ "use client"
1
2
  import {
2
3
  PaginationItem
3
- } from "./chunk-SGJ63NEB.mjs";
4
- import "./chunk-IXTXZCRI.mjs";
5
- import "./chunk-QYITLVQJ.mjs";
4
+ } from "./chunk-YHCPL4SM.mjs";
5
+ import "./chunk-2P67WSOL.mjs";
6
+ import "./chunk-5ILRVOTK.mjs";
6
7
  export {
7
8
  PaginationItem
8
9
  };
@@ -19,6 +19,10 @@ type PaginationOptions = {
19
19
  * @default true
20
20
  */
21
21
  withControls?: Token<boolean>;
22
+ /**
23
+ * Props for inner element.
24
+ */
25
+ innerProps?: HTMLUIProps<'div'>;
22
26
  /**
23
27
  * Props for control button element.
24
28
  */
@@ -19,6 +19,10 @@ type PaginationOptions = {
19
19
  * @default true
20
20
  */
21
21
  withControls?: Token<boolean>;
22
+ /**
23
+ * Props for inner element.
24
+ */
25
+ innerProps?: HTMLUIProps<'div'>;
22
26
  /**
23
27
  * Props for control button element.
24
28
  */
@@ -1,3 +1,4 @@
1
+ "use client"
1
2
  "use strict";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -228,6 +229,7 @@ var Pagination = (0, import_core2.forwardRef)((props, ref) => {
228
229
  itemProps,
229
230
  withControls = true,
230
231
  withEdges = false,
232
+ innerProps,
231
233
  controlProps,
232
234
  controlPrevProps,
233
235
  controlNextProps,
@@ -278,7 +280,15 @@ var Pagination = (0, import_core2.forwardRef)((props, ref) => {
278
280
  className: (0, import_utils3.cx)("ui-pagination", className),
279
281
  role: "navigation",
280
282
  __css: css,
281
- ...(0, import_utils3.omitObject)(rest, ["onChange"]),
283
+ ...(0, import_utils3.omitObject)(rest, [
284
+ "page",
285
+ "defaultPage",
286
+ "total",
287
+ "siblings",
288
+ "boundaries",
289
+ "isDisabled",
290
+ "onChange"
291
+ ]),
282
292
  "data-disabled": (0, import_utils3.dataAttr)(isDisabled),
283
293
  children: [
284
294
  computedWithEdges ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -311,7 +321,20 @@ var Pagination = (0, import_core2.forwardRef)((props, ref) => {
311
321
  )
312
322
  }
313
323
  ) : null,
314
- children,
324
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
325
+ import_core2.ui.div,
326
+ {
327
+ className: "ui-pagination-inner",
328
+ __css: {
329
+ display: "flex",
330
+ justifyContent: "center",
331
+ alignItems: "center",
332
+ ...styles.inner
333
+ },
334
+ ...innerProps,
335
+ children
336
+ }
337
+ ),
315
338
  computedWithControls ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
316
339
  Component,
317
340
  {
@@ -1,9 +1,10 @@
1
+ "use client"
1
2
  import {
2
3
  Pagination
3
- } from "./chunk-TE22MBG6.mjs";
4
- import "./chunk-SGJ63NEB.mjs";
5
- import "./chunk-IXTXZCRI.mjs";
6
- import "./chunk-QYITLVQJ.mjs";
4
+ } from "./chunk-YH7A5X2I.mjs";
5
+ import "./chunk-YHCPL4SM.mjs";
6
+ import "./chunk-2P67WSOL.mjs";
7
+ import "./chunk-5ILRVOTK.mjs";
7
8
  export {
8
9
  Pagination
9
10
  };
@@ -1,3 +1,4 @@
1
+ "use client"
1
2
  "use strict";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -1,9 +1,10 @@
1
+ "use client"
1
2
  import {
2
3
  PaginationProvider,
3
4
  computedRange,
4
5
  usePagination,
5
6
  usePaginationContext
6
- } from "./chunk-QYITLVQJ.mjs";
7
+ } from "./chunk-5ILRVOTK.mjs";
7
8
  export {
8
9
  PaginationProvider,
9
10
  computedRange,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yamada-ui/pagination",
3
- "version": "0.2.17",
3
+ "version": "0.4.0",
4
4
  "description": "Yamada UI pagination component",
5
5
  "keywords": [
6
6
  "yamada",
@@ -35,11 +35,11 @@
35
35
  "url": "https://github.com/hirotomoyamada/yamada-ui/issues"
36
36
  },
37
37
  "dependencies": {
38
- "@yamada-ui/core": "0.8.0",
38
+ "@yamada-ui/core": "0.9.0",
39
39
  "@yamada-ui/utils": "0.2.0",
40
- "@yamada-ui/icon": "0.2.17",
41
- "@yamada-ui/use-controllable-state": "0.1.7",
42
- "@yamada-ui/use-value": "0.1.29"
40
+ "@yamada-ui/icon": "0.3.0",
41
+ "@yamada-ui/use-controllable-state": "0.2.0",
42
+ "@yamada-ui/use-value": "0.2.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "react": "^18.0.0",
@@ -55,7 +55,10 @@
55
55
  "format": [
56
56
  "cjs",
57
57
  "esm"
58
- ]
58
+ ],
59
+ "banner": {
60
+ "js": "\"use client\""
61
+ }
59
62
  },
60
63
  "module": "dist/index.mjs",
61
64
  "types": "dist/index.d.ts",