@duskmoon-dev/components 2.2.0 → 2.3.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.
@@ -1631,6 +1631,8 @@ var paginationCompactClass = "pagination-compact";
1631
1631
  var paginationInfoClass = "pagination-info";
1632
1632
  var paginationInfoTextClass = "pagination-info-text";
1633
1633
  var paginationInputClass = "pagination-input";
1634
+ var paginationJumperClass = "pagination-jumper";
1635
+ var paginationSizeChangerClass = "pagination-size-changer";
1634
1636
  var paginationResponsiveClass = "pagination-responsive";
1635
1637
  var paginationSizeClasses = {
1636
1638
  sm: "pagination-sm",
@@ -3532,9 +3534,11 @@ export {
3532
3534
  paginationItemActiveClass,
3533
3535
  paginationItemClass,
3534
3536
  paginationItemDisabledClass,
3537
+ paginationJumperClass,
3535
3538
  paginationNextClass,
3536
3539
  paginationPrevClass,
3537
3540
  paginationResponsiveClass,
3541
+ paginationSizeChangerClass,
3538
3542
  paginationSizeClasses,
3539
3543
  popconfirmActionsClass,
3540
3544
  popconfirmArrowClass,
@@ -10,6 +10,8 @@ export declare const paginationCompactClass = "pagination-compact";
10
10
  export declare const paginationInfoClass = "pagination-info";
11
11
  export declare const paginationInfoTextClass = "pagination-info-text";
12
12
  export declare const paginationInputClass = "pagination-input";
13
+ export declare const paginationJumperClass = "pagination-jumper";
14
+ export declare const paginationSizeChangerClass = "pagination-size-changer";
13
15
  export declare const paginationResponsiveClass = "pagination-responsive";
14
16
  export declare const paginationSizeClasses: Record<PaginationSize, string>;
15
17
  export declare function getPaginationClasses({ size, compact, className, }: {
@@ -44,6 +44,8 @@ var paginationCompactClass = "pagination-compact";
44
44
  var paginationInfoClass = "pagination-info";
45
45
  var paginationInfoTextClass = "pagination-info-text";
46
46
  var paginationInputClass = "pagination-input";
47
+ var paginationJumperClass = "pagination-jumper";
48
+ var paginationSizeChangerClass = "pagination-size-changer";
47
49
  var paginationResponsiveClass = "pagination-responsive";
48
50
  var paginationSizeClasses = {
49
51
  sm: "pagination-sm",
@@ -159,6 +161,8 @@ var Pagination = forwardRef(({
159
161
  changePage(nextPage, nextPageSize);
160
162
  }
161
163
  function jumpToInputPage(value) {
164
+ if (value === "")
165
+ return;
162
166
  const nextPage = Number(value);
163
167
  if (!Number.isFinite(nextPage)) {
164
168
  return;
@@ -192,7 +196,20 @@ var Pagination = forwardRef(({
192
196
  disabled: previousDisabled,
193
197
  "aria-label": "Previous page",
194
198
  onClick: () => changePage(mergedCurrent - 1),
195
- children: "Prev"
199
+ children: /* @__PURE__ */ jsx("svg", {
200
+ "aria-hidden": "true",
201
+ width: "16",
202
+ height: "16",
203
+ viewBox: "0 0 24 24",
204
+ fill: "none",
205
+ stroke: "currentColor",
206
+ strokeWidth: "2",
207
+ strokeLinecap: "round",
208
+ strokeLinejoin: "round",
209
+ children: /* @__PURE__ */ jsx("path", {
210
+ d: "m15 19-7-7 7-7"
211
+ })
212
+ })
196
213
  }),
197
214
  simple ? /* @__PURE__ */ jsxs("div", {
198
215
  className: paginationInputClass,
@@ -241,36 +258,92 @@ var Pagination = forwardRef(({
241
258
  disabled: nextDisabled,
242
259
  "aria-label": "Next page",
243
260
  onClick: () => changePage(mergedCurrent + 1),
244
- children: "Next"
245
- }),
246
- showSizeChanger ? /* @__PURE__ */ jsx("div", {
247
- className: paginationInputClass,
248
- children: /* @__PURE__ */ jsx("select", {
249
- "aria-label": "Page size",
250
- value: mergedPageSize,
251
- disabled,
252
- onChange: handlePageSizeChange,
253
- children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsxs("option", {
254
- value: option,
255
- children: [
256
- option,
257
- " / page"
258
- ]
259
- }, option))
261
+ children: /* @__PURE__ */ jsx("svg", {
262
+ "aria-hidden": "true",
263
+ width: "16",
264
+ height: "16",
265
+ viewBox: "0 0 24 24",
266
+ fill: "none",
267
+ stroke: "currentColor",
268
+ strokeWidth: "2",
269
+ strokeLinecap: "round",
270
+ strokeLinejoin: "round",
271
+ children: /* @__PURE__ */ jsx("path", {
272
+ d: "m9 5 7 7-7 7"
273
+ })
260
274
  })
275
+ }),
276
+ showSizeChanger ? /* @__PURE__ */ jsxs("div", {
277
+ className: paginationSizeChangerClass,
278
+ children: [
279
+ /* @__PURE__ */ jsx("svg", {
280
+ "aria-hidden": "true",
281
+ width: "14",
282
+ height: "14",
283
+ viewBox: "0 0 24 24",
284
+ fill: "none",
285
+ stroke: "currentColor",
286
+ strokeWidth: "2",
287
+ strokeLinecap: "round",
288
+ strokeLinejoin: "round",
289
+ children: /* @__PURE__ */ jsx("path", {
290
+ d: "m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M3 16l9 5 9-5"
291
+ })
292
+ }),
293
+ /* @__PURE__ */ jsx("select", {
294
+ "aria-label": "Page size",
295
+ value: mergedPageSize,
296
+ disabled,
297
+ onChange: handlePageSizeChange,
298
+ children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsx("option", {
299
+ value: option,
300
+ children: option
301
+ }, option))
302
+ }),
303
+ /* @__PURE__ */ jsx("svg", {
304
+ "aria-hidden": "true",
305
+ width: "12",
306
+ height: "12",
307
+ viewBox: "0 0 24 24",
308
+ fill: "none",
309
+ stroke: "currentColor",
310
+ strokeWidth: "2",
311
+ strokeLinecap: "round",
312
+ strokeLinejoin: "round",
313
+ children: /* @__PURE__ */ jsx("path", {
314
+ d: "m6 9 6 6 6-6"
315
+ })
316
+ })
317
+ ]
261
318
  }) : null,
262
- showQuickJumper && !simple ? /* @__PURE__ */ jsx("div", {
263
- className: paginationInputClass,
264
- children: /* @__PURE__ */ jsx("input", {
265
- "aria-label": "Jump to page",
266
- type: "number",
267
- min: 1,
268
- max: pageCount,
269
- value: quickJumpValue,
270
- disabled,
271
- onChange: (event) => setQuickJumpValue(event.currentTarget.value),
272
- onKeyDown: handleQuickJumpKeyDown
273
- })
319
+ showQuickJumper && !simple ? /* @__PURE__ */ jsxs("div", {
320
+ className: `${paginationInputClass} ${paginationJumperClass}`,
321
+ children: [
322
+ /* @__PURE__ */ jsx("svg", {
323
+ "aria-hidden": "true",
324
+ width: "14",
325
+ height: "14",
326
+ viewBox: "0 0 24 24",
327
+ fill: "none",
328
+ stroke: "currentColor",
329
+ strokeWidth: "2",
330
+ strokeLinecap: "round",
331
+ strokeLinejoin: "round",
332
+ children: /* @__PURE__ */ jsx("path", {
333
+ d: "M4 12h12m-5-5 5 5-5 5m9-12v14"
334
+ })
335
+ }),
336
+ /* @__PURE__ */ jsx("input", {
337
+ "aria-label": "Jump to page",
338
+ type: "number",
339
+ min: 1,
340
+ max: pageCount,
341
+ value: quickJumpValue,
342
+ disabled,
343
+ onChange: (event) => setQuickJumpValue(event.currentTarget.value),
344
+ onKeyDown: handleQuickJumpKeyDown
345
+ })
346
+ ]
274
347
  }) : null
275
348
  ]
276
349
  });
@@ -1658,6 +1658,8 @@ var paginationCompactClass = "pagination-compact";
1658
1658
  var paginationInfoClass = "pagination-info";
1659
1659
  var paginationInfoTextClass = "pagination-info-text";
1660
1660
  var paginationInputClass = "pagination-input";
1661
+ var paginationJumperClass = "pagination-jumper";
1662
+ var paginationSizeChangerClass = "pagination-size-changer";
1661
1663
  var paginationResponsiveClass = "pagination-responsive";
1662
1664
  var paginationSizeClasses = {
1663
1665
  sm: "pagination-sm",
@@ -1773,6 +1775,8 @@ var Pagination = forwardRef4(({
1773
1775
  changePage(nextPage, nextPageSize);
1774
1776
  }
1775
1777
  function jumpToInputPage(value) {
1778
+ if (value === "")
1779
+ return;
1776
1780
  const nextPage = Number(value);
1777
1781
  if (!Number.isFinite(nextPage)) {
1778
1782
  return;
@@ -1806,7 +1810,20 @@ var Pagination = forwardRef4(({
1806
1810
  disabled: previousDisabled,
1807
1811
  "aria-label": "Previous page",
1808
1812
  onClick: () => changePage(mergedCurrent - 1),
1809
- children: "Prev"
1813
+ children: /* @__PURE__ */ jsx7("svg", {
1814
+ "aria-hidden": "true",
1815
+ width: "16",
1816
+ height: "16",
1817
+ viewBox: "0 0 24 24",
1818
+ fill: "none",
1819
+ stroke: "currentColor",
1820
+ strokeWidth: "2",
1821
+ strokeLinecap: "round",
1822
+ strokeLinejoin: "round",
1823
+ children: /* @__PURE__ */ jsx7("path", {
1824
+ d: "m15 19-7-7 7-7"
1825
+ })
1826
+ })
1810
1827
  }),
1811
1828
  simple ? /* @__PURE__ */ jsxs6("div", {
1812
1829
  className: paginationInputClass,
@@ -1855,36 +1872,92 @@ var Pagination = forwardRef4(({
1855
1872
  disabled: nextDisabled,
1856
1873
  "aria-label": "Next page",
1857
1874
  onClick: () => changePage(mergedCurrent + 1),
1858
- children: "Next"
1859
- }),
1860
- showSizeChanger ? /* @__PURE__ */ jsx7("div", {
1861
- className: paginationInputClass,
1862
- children: /* @__PURE__ */ jsx7("select", {
1863
- "aria-label": "Page size",
1864
- value: mergedPageSize,
1865
- disabled,
1866
- onChange: handlePageSizeChange,
1867
- children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsxs6("option", {
1868
- value: option,
1869
- children: [
1870
- option,
1871
- " / page"
1872
- ]
1873
- }, option))
1875
+ children: /* @__PURE__ */ jsx7("svg", {
1876
+ "aria-hidden": "true",
1877
+ width: "16",
1878
+ height: "16",
1879
+ viewBox: "0 0 24 24",
1880
+ fill: "none",
1881
+ stroke: "currentColor",
1882
+ strokeWidth: "2",
1883
+ strokeLinecap: "round",
1884
+ strokeLinejoin: "round",
1885
+ children: /* @__PURE__ */ jsx7("path", {
1886
+ d: "m9 5 7 7-7 7"
1887
+ })
1874
1888
  })
1889
+ }),
1890
+ showSizeChanger ? /* @__PURE__ */ jsxs6("div", {
1891
+ className: paginationSizeChangerClass,
1892
+ children: [
1893
+ /* @__PURE__ */ jsx7("svg", {
1894
+ "aria-hidden": "true",
1895
+ width: "14",
1896
+ height: "14",
1897
+ viewBox: "0 0 24 24",
1898
+ fill: "none",
1899
+ stroke: "currentColor",
1900
+ strokeWidth: "2",
1901
+ strokeLinecap: "round",
1902
+ strokeLinejoin: "round",
1903
+ children: /* @__PURE__ */ jsx7("path", {
1904
+ d: "m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M3 16l9 5 9-5"
1905
+ })
1906
+ }),
1907
+ /* @__PURE__ */ jsx7("select", {
1908
+ "aria-label": "Page size",
1909
+ value: mergedPageSize,
1910
+ disabled,
1911
+ onChange: handlePageSizeChange,
1912
+ children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsx7("option", {
1913
+ value: option,
1914
+ children: option
1915
+ }, option))
1916
+ }),
1917
+ /* @__PURE__ */ jsx7("svg", {
1918
+ "aria-hidden": "true",
1919
+ width: "12",
1920
+ height: "12",
1921
+ viewBox: "0 0 24 24",
1922
+ fill: "none",
1923
+ stroke: "currentColor",
1924
+ strokeWidth: "2",
1925
+ strokeLinecap: "round",
1926
+ strokeLinejoin: "round",
1927
+ children: /* @__PURE__ */ jsx7("path", {
1928
+ d: "m6 9 6 6 6-6"
1929
+ })
1930
+ })
1931
+ ]
1875
1932
  }) : null,
1876
- showQuickJumper && !simple ? /* @__PURE__ */ jsx7("div", {
1877
- className: paginationInputClass,
1878
- children: /* @__PURE__ */ jsx7("input", {
1879
- "aria-label": "Jump to page",
1880
- type: "number",
1881
- min: 1,
1882
- max: pageCount,
1883
- value: quickJumpValue,
1884
- disabled,
1885
- onChange: (event) => setQuickJumpValue(event.currentTarget.value),
1886
- onKeyDown: handleQuickJumpKeyDown
1887
- })
1933
+ showQuickJumper && !simple ? /* @__PURE__ */ jsxs6("div", {
1934
+ className: `${paginationInputClass} ${paginationJumperClass}`,
1935
+ children: [
1936
+ /* @__PURE__ */ jsx7("svg", {
1937
+ "aria-hidden": "true",
1938
+ width: "14",
1939
+ height: "14",
1940
+ viewBox: "0 0 24 24",
1941
+ fill: "none",
1942
+ stroke: "currentColor",
1943
+ strokeWidth: "2",
1944
+ strokeLinecap: "round",
1945
+ strokeLinejoin: "round",
1946
+ children: /* @__PURE__ */ jsx7("path", {
1947
+ d: "M4 12h12m-5-5 5 5-5 5m9-12v14"
1948
+ })
1949
+ }),
1950
+ /* @__PURE__ */ jsx7("input", {
1951
+ "aria-label": "Jump to page",
1952
+ type: "number",
1953
+ min: 1,
1954
+ max: pageCount,
1955
+ value: quickJumpValue,
1956
+ disabled,
1957
+ onChange: (event) => setQuickJumpValue(event.currentTarget.value),
1958
+ onKeyDown: handleQuickJumpKeyDown
1959
+ })
1960
+ ]
1888
1961
  }) : null
1889
1962
  ]
1890
1963
  });
@@ -1204,6 +1204,8 @@ var paginationCompactClass = "pagination-compact";
1204
1204
  var paginationInfoClass = "pagination-info";
1205
1205
  var paginationInfoTextClass = "pagination-info-text";
1206
1206
  var paginationInputClass = "pagination-input";
1207
+ var paginationJumperClass = "pagination-jumper";
1208
+ var paginationSizeChangerClass = "pagination-size-changer";
1207
1209
  var paginationResponsiveClass = "pagination-responsive";
1208
1210
  var paginationSizeClasses = {
1209
1211
  sm: "pagination-sm",
@@ -1319,6 +1321,8 @@ var Pagination = forwardRef3(({
1319
1321
  changePage(nextPage, nextPageSize);
1320
1322
  }
1321
1323
  function jumpToInputPage(value) {
1324
+ if (value === "")
1325
+ return;
1322
1326
  const nextPage = Number(value);
1323
1327
  if (!Number.isFinite(nextPage)) {
1324
1328
  return;
@@ -1352,7 +1356,20 @@ var Pagination = forwardRef3(({
1352
1356
  disabled: previousDisabled,
1353
1357
  "aria-label": "Previous page",
1354
1358
  onClick: () => changePage(mergedCurrent - 1),
1355
- children: "Prev"
1359
+ children: /* @__PURE__ */ jsx5("svg", {
1360
+ "aria-hidden": "true",
1361
+ width: "16",
1362
+ height: "16",
1363
+ viewBox: "0 0 24 24",
1364
+ fill: "none",
1365
+ stroke: "currentColor",
1366
+ strokeWidth: "2",
1367
+ strokeLinecap: "round",
1368
+ strokeLinejoin: "round",
1369
+ children: /* @__PURE__ */ jsx5("path", {
1370
+ d: "m15 19-7-7 7-7"
1371
+ })
1372
+ })
1356
1373
  }),
1357
1374
  simple ? /* @__PURE__ */ jsxs4("div", {
1358
1375
  className: paginationInputClass,
@@ -1401,36 +1418,92 @@ var Pagination = forwardRef3(({
1401
1418
  disabled: nextDisabled,
1402
1419
  "aria-label": "Next page",
1403
1420
  onClick: () => changePage(mergedCurrent + 1),
1404
- children: "Next"
1405
- }),
1406
- showSizeChanger ? /* @__PURE__ */ jsx5("div", {
1407
- className: paginationInputClass,
1408
- children: /* @__PURE__ */ jsx5("select", {
1409
- "aria-label": "Page size",
1410
- value: mergedPageSize,
1411
- disabled,
1412
- onChange: handlePageSizeChange,
1413
- children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsxs4("option", {
1414
- value: option,
1415
- children: [
1416
- option,
1417
- " / page"
1418
- ]
1419
- }, option))
1421
+ children: /* @__PURE__ */ jsx5("svg", {
1422
+ "aria-hidden": "true",
1423
+ width: "16",
1424
+ height: "16",
1425
+ viewBox: "0 0 24 24",
1426
+ fill: "none",
1427
+ stroke: "currentColor",
1428
+ strokeWidth: "2",
1429
+ strokeLinecap: "round",
1430
+ strokeLinejoin: "round",
1431
+ children: /* @__PURE__ */ jsx5("path", {
1432
+ d: "m9 5 7 7-7 7"
1433
+ })
1420
1434
  })
1435
+ }),
1436
+ showSizeChanger ? /* @__PURE__ */ jsxs4("div", {
1437
+ className: paginationSizeChangerClass,
1438
+ children: [
1439
+ /* @__PURE__ */ jsx5("svg", {
1440
+ "aria-hidden": "true",
1441
+ width: "14",
1442
+ height: "14",
1443
+ viewBox: "0 0 24 24",
1444
+ fill: "none",
1445
+ stroke: "currentColor",
1446
+ strokeWidth: "2",
1447
+ strokeLinecap: "round",
1448
+ strokeLinejoin: "round",
1449
+ children: /* @__PURE__ */ jsx5("path", {
1450
+ d: "m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M3 16l9 5 9-5"
1451
+ })
1452
+ }),
1453
+ /* @__PURE__ */ jsx5("select", {
1454
+ "aria-label": "Page size",
1455
+ value: mergedPageSize,
1456
+ disabled,
1457
+ onChange: handlePageSizeChange,
1458
+ children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsx5("option", {
1459
+ value: option,
1460
+ children: option
1461
+ }, option))
1462
+ }),
1463
+ /* @__PURE__ */ jsx5("svg", {
1464
+ "aria-hidden": "true",
1465
+ width: "12",
1466
+ height: "12",
1467
+ viewBox: "0 0 24 24",
1468
+ fill: "none",
1469
+ stroke: "currentColor",
1470
+ strokeWidth: "2",
1471
+ strokeLinecap: "round",
1472
+ strokeLinejoin: "round",
1473
+ children: /* @__PURE__ */ jsx5("path", {
1474
+ d: "m6 9 6 6 6-6"
1475
+ })
1476
+ })
1477
+ ]
1421
1478
  }) : null,
1422
- showQuickJumper && !simple ? /* @__PURE__ */ jsx5("div", {
1423
- className: paginationInputClass,
1424
- children: /* @__PURE__ */ jsx5("input", {
1425
- "aria-label": "Jump to page",
1426
- type: "number",
1427
- min: 1,
1428
- max: pageCount,
1429
- value: quickJumpValue,
1430
- disabled,
1431
- onChange: (event) => setQuickJumpValue(event.currentTarget.value),
1432
- onKeyDown: handleQuickJumpKeyDown
1433
- })
1479
+ showQuickJumper && !simple ? /* @__PURE__ */ jsxs4("div", {
1480
+ className: `${paginationInputClass} ${paginationJumperClass}`,
1481
+ children: [
1482
+ /* @__PURE__ */ jsx5("svg", {
1483
+ "aria-hidden": "true",
1484
+ width: "14",
1485
+ height: "14",
1486
+ viewBox: "0 0 24 24",
1487
+ fill: "none",
1488
+ stroke: "currentColor",
1489
+ strokeWidth: "2",
1490
+ strokeLinecap: "round",
1491
+ strokeLinejoin: "round",
1492
+ children: /* @__PURE__ */ jsx5("path", {
1493
+ d: "M4 12h12m-5-5 5 5-5 5m9-12v14"
1494
+ })
1495
+ }),
1496
+ /* @__PURE__ */ jsx5("input", {
1497
+ "aria-label": "Jump to page",
1498
+ type: "number",
1499
+ min: 1,
1500
+ max: pageCount,
1501
+ value: quickJumpValue,
1502
+ disabled,
1503
+ onChange: (event) => setQuickJumpValue(event.currentTarget.value),
1504
+ onKeyDown: handleQuickJumpKeyDown
1505
+ })
1506
+ ]
1434
1507
  }) : null
1435
1508
  ]
1436
1509
  });
@@ -44,6 +44,8 @@ var paginationCompactClass = "pagination-compact";
44
44
  var paginationInfoClass = "pagination-info";
45
45
  var paginationInfoTextClass = "pagination-info-text";
46
46
  var paginationInputClass = "pagination-input";
47
+ var paginationJumperClass = "pagination-jumper";
48
+ var paginationSizeChangerClass = "pagination-size-changer";
47
49
  var paginationResponsiveClass = "pagination-responsive";
48
50
  var paginationSizeClasses = {
49
51
  sm: "pagination-sm",
@@ -159,6 +161,8 @@ var Pagination = forwardRef(({
159
161
  changePage(nextPage, nextPageSize);
160
162
  }
161
163
  function jumpToInputPage(value) {
164
+ if (value === "")
165
+ return;
162
166
  const nextPage = Number(value);
163
167
  if (!Number.isFinite(nextPage)) {
164
168
  return;
@@ -192,7 +196,20 @@ var Pagination = forwardRef(({
192
196
  disabled: previousDisabled,
193
197
  "aria-label": "Previous page",
194
198
  onClick: () => changePage(mergedCurrent - 1),
195
- children: "Prev"
199
+ children: /* @__PURE__ */ jsx("svg", {
200
+ "aria-hidden": "true",
201
+ width: "16",
202
+ height: "16",
203
+ viewBox: "0 0 24 24",
204
+ fill: "none",
205
+ stroke: "currentColor",
206
+ strokeWidth: "2",
207
+ strokeLinecap: "round",
208
+ strokeLinejoin: "round",
209
+ children: /* @__PURE__ */ jsx("path", {
210
+ d: "m15 19-7-7 7-7"
211
+ })
212
+ })
196
213
  }),
197
214
  simple ? /* @__PURE__ */ jsxs("div", {
198
215
  className: paginationInputClass,
@@ -241,36 +258,92 @@ var Pagination = forwardRef(({
241
258
  disabled: nextDisabled,
242
259
  "aria-label": "Next page",
243
260
  onClick: () => changePage(mergedCurrent + 1),
244
- children: "Next"
245
- }),
246
- showSizeChanger ? /* @__PURE__ */ jsx("div", {
247
- className: paginationInputClass,
248
- children: /* @__PURE__ */ jsx("select", {
249
- "aria-label": "Page size",
250
- value: mergedPageSize,
251
- disabled,
252
- onChange: handlePageSizeChange,
253
- children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsxs("option", {
254
- value: option,
255
- children: [
256
- option,
257
- " / page"
258
- ]
259
- }, option))
261
+ children: /* @__PURE__ */ jsx("svg", {
262
+ "aria-hidden": "true",
263
+ width: "16",
264
+ height: "16",
265
+ viewBox: "0 0 24 24",
266
+ fill: "none",
267
+ stroke: "currentColor",
268
+ strokeWidth: "2",
269
+ strokeLinecap: "round",
270
+ strokeLinejoin: "round",
271
+ children: /* @__PURE__ */ jsx("path", {
272
+ d: "m9 5 7 7-7 7"
273
+ })
260
274
  })
275
+ }),
276
+ showSizeChanger ? /* @__PURE__ */ jsxs("div", {
277
+ className: paginationSizeChangerClass,
278
+ children: [
279
+ /* @__PURE__ */ jsx("svg", {
280
+ "aria-hidden": "true",
281
+ width: "14",
282
+ height: "14",
283
+ viewBox: "0 0 24 24",
284
+ fill: "none",
285
+ stroke: "currentColor",
286
+ strokeWidth: "2",
287
+ strokeLinecap: "round",
288
+ strokeLinejoin: "round",
289
+ children: /* @__PURE__ */ jsx("path", {
290
+ d: "m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M3 16l9 5 9-5"
291
+ })
292
+ }),
293
+ /* @__PURE__ */ jsx("select", {
294
+ "aria-label": "Page size",
295
+ value: mergedPageSize,
296
+ disabled,
297
+ onChange: handlePageSizeChange,
298
+ children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsx("option", {
299
+ value: option,
300
+ children: option
301
+ }, option))
302
+ }),
303
+ /* @__PURE__ */ jsx("svg", {
304
+ "aria-hidden": "true",
305
+ width: "12",
306
+ height: "12",
307
+ viewBox: "0 0 24 24",
308
+ fill: "none",
309
+ stroke: "currentColor",
310
+ strokeWidth: "2",
311
+ strokeLinecap: "round",
312
+ strokeLinejoin: "round",
313
+ children: /* @__PURE__ */ jsx("path", {
314
+ d: "m6 9 6 6 6-6"
315
+ })
316
+ })
317
+ ]
261
318
  }) : null,
262
- showQuickJumper && !simple ? /* @__PURE__ */ jsx("div", {
263
- className: paginationInputClass,
264
- children: /* @__PURE__ */ jsx("input", {
265
- "aria-label": "Jump to page",
266
- type: "number",
267
- min: 1,
268
- max: pageCount,
269
- value: quickJumpValue,
270
- disabled,
271
- onChange: (event) => setQuickJumpValue(event.currentTarget.value),
272
- onKeyDown: handleQuickJumpKeyDown
273
- })
319
+ showQuickJumper && !simple ? /* @__PURE__ */ jsxs("div", {
320
+ className: `${paginationInputClass} ${paginationJumperClass}`,
321
+ children: [
322
+ /* @__PURE__ */ jsx("svg", {
323
+ "aria-hidden": "true",
324
+ width: "14",
325
+ height: "14",
326
+ viewBox: "0 0 24 24",
327
+ fill: "none",
328
+ stroke: "currentColor",
329
+ strokeWidth: "2",
330
+ strokeLinecap: "round",
331
+ strokeLinejoin: "round",
332
+ children: /* @__PURE__ */ jsx("path", {
333
+ d: "M4 12h12m-5-5 5 5-5 5m9-12v14"
334
+ })
335
+ }),
336
+ /* @__PURE__ */ jsx("input", {
337
+ "aria-label": "Jump to page",
338
+ type: "number",
339
+ min: 1,
340
+ max: pageCount,
341
+ value: quickJumpValue,
342
+ disabled,
343
+ onChange: (event) => setQuickJumpValue(event.currentTarget.value),
344
+ onKeyDown: handleQuickJumpKeyDown
345
+ })
346
+ ]
274
347
  }) : null
275
348
  ]
276
349
  });
@@ -1 +1 @@
1
- export declare const version = "2.2.0";
1
+ export declare const version = "2.3.0";
package/dist/index.js CHANGED
@@ -79,7 +79,7 @@ var ThemeInitScript = () => {
79
79
  import { useCallback as useCallback2, useState as useState2 } from "react";
80
80
 
81
81
  // src/generated/version.ts
82
- var version = "2.2.0";
82
+ var version = "2.3.0";
83
83
 
84
84
  // src/infrastructure.ts
85
85
  var theme = {
@@ -13052,6 +13052,8 @@ var paginationCompactClass = "pagination-compact";
13052
13052
  var paginationInfoClass = "pagination-info";
13053
13053
  var paginationInfoTextClass = "pagination-info-text";
13054
13054
  var paginationInputClass = "pagination-input";
13055
+ var paginationJumperClass = "pagination-jumper";
13056
+ var paginationSizeChangerClass = "pagination-size-changer";
13055
13057
  var paginationResponsiveClass = "pagination-responsive";
13056
13058
  var paginationSizeClasses = {
13057
13059
  sm: "pagination-sm",
@@ -13167,6 +13169,8 @@ var Pagination = forwardRef44(({
13167
13169
  changePage(nextPage, nextPageSize);
13168
13170
  }
13169
13171
  function jumpToInputPage(value) {
13172
+ if (value === "")
13173
+ return;
13170
13174
  const nextPage = Number(value);
13171
13175
  if (!Number.isFinite(nextPage)) {
13172
13176
  return;
@@ -13200,7 +13204,20 @@ var Pagination = forwardRef44(({
13200
13204
  disabled: previousDisabled,
13201
13205
  "aria-label": "Previous page",
13202
13206
  onClick: () => changePage(mergedCurrent - 1),
13203
- children: "Prev"
13207
+ children: /* @__PURE__ */ jsx60("svg", {
13208
+ "aria-hidden": "true",
13209
+ width: "16",
13210
+ height: "16",
13211
+ viewBox: "0 0 24 24",
13212
+ fill: "none",
13213
+ stroke: "currentColor",
13214
+ strokeWidth: "2",
13215
+ strokeLinecap: "round",
13216
+ strokeLinejoin: "round",
13217
+ children: /* @__PURE__ */ jsx60("path", {
13218
+ d: "m15 19-7-7 7-7"
13219
+ })
13220
+ })
13204
13221
  }),
13205
13222
  simple ? /* @__PURE__ */ jsxs44("div", {
13206
13223
  className: paginationInputClass,
@@ -13249,36 +13266,92 @@ var Pagination = forwardRef44(({
13249
13266
  disabled: nextDisabled,
13250
13267
  "aria-label": "Next page",
13251
13268
  onClick: () => changePage(mergedCurrent + 1),
13252
- children: "Next"
13253
- }),
13254
- showSizeChanger ? /* @__PURE__ */ jsx60("div", {
13255
- className: paginationInputClass,
13256
- children: /* @__PURE__ */ jsx60("select", {
13257
- "aria-label": "Page size",
13258
- value: mergedPageSize,
13259
- disabled,
13260
- onChange: handlePageSizeChange,
13261
- children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsxs44("option", {
13262
- value: option,
13263
- children: [
13264
- option,
13265
- " / page"
13266
- ]
13267
- }, option))
13269
+ children: /* @__PURE__ */ jsx60("svg", {
13270
+ "aria-hidden": "true",
13271
+ width: "16",
13272
+ height: "16",
13273
+ viewBox: "0 0 24 24",
13274
+ fill: "none",
13275
+ stroke: "currentColor",
13276
+ strokeWidth: "2",
13277
+ strokeLinecap: "round",
13278
+ strokeLinejoin: "round",
13279
+ children: /* @__PURE__ */ jsx60("path", {
13280
+ d: "m9 5 7 7-7 7"
13281
+ })
13268
13282
  })
13283
+ }),
13284
+ showSizeChanger ? /* @__PURE__ */ jsxs44("div", {
13285
+ className: paginationSizeChangerClass,
13286
+ children: [
13287
+ /* @__PURE__ */ jsx60("svg", {
13288
+ "aria-hidden": "true",
13289
+ width: "14",
13290
+ height: "14",
13291
+ viewBox: "0 0 24 24",
13292
+ fill: "none",
13293
+ stroke: "currentColor",
13294
+ strokeWidth: "2",
13295
+ strokeLinecap: "round",
13296
+ strokeLinejoin: "round",
13297
+ children: /* @__PURE__ */ jsx60("path", {
13298
+ d: "m12 3 9 5-9 5-9-5 9-5Zm-9 9 9 5 9-5M3 16l9 5 9-5"
13299
+ })
13300
+ }),
13301
+ /* @__PURE__ */ jsx60("select", {
13302
+ "aria-label": "Page size",
13303
+ value: mergedPageSize,
13304
+ disabled,
13305
+ onChange: handlePageSizeChange,
13306
+ children: getSizeOptions(mergedPageSize).map((option) => /* @__PURE__ */ jsx60("option", {
13307
+ value: option,
13308
+ children: option
13309
+ }, option))
13310
+ }),
13311
+ /* @__PURE__ */ jsx60("svg", {
13312
+ "aria-hidden": "true",
13313
+ width: "12",
13314
+ height: "12",
13315
+ viewBox: "0 0 24 24",
13316
+ fill: "none",
13317
+ stroke: "currentColor",
13318
+ strokeWidth: "2",
13319
+ strokeLinecap: "round",
13320
+ strokeLinejoin: "round",
13321
+ children: /* @__PURE__ */ jsx60("path", {
13322
+ d: "m6 9 6 6 6-6"
13323
+ })
13324
+ })
13325
+ ]
13269
13326
  }) : null,
13270
- showQuickJumper && !simple ? /* @__PURE__ */ jsx60("div", {
13271
- className: paginationInputClass,
13272
- children: /* @__PURE__ */ jsx60("input", {
13273
- "aria-label": "Jump to page",
13274
- type: "number",
13275
- min: 1,
13276
- max: pageCount,
13277
- value: quickJumpValue,
13278
- disabled,
13279
- onChange: (event) => setQuickJumpValue(event.currentTarget.value),
13280
- onKeyDown: handleQuickJumpKeyDown
13281
- })
13327
+ showQuickJumper && !simple ? /* @__PURE__ */ jsxs44("div", {
13328
+ className: `${paginationInputClass} ${paginationJumperClass}`,
13329
+ children: [
13330
+ /* @__PURE__ */ jsx60("svg", {
13331
+ "aria-hidden": "true",
13332
+ width: "14",
13333
+ height: "14",
13334
+ viewBox: "0 0 24 24",
13335
+ fill: "none",
13336
+ stroke: "currentColor",
13337
+ strokeWidth: "2",
13338
+ strokeLinecap: "round",
13339
+ strokeLinejoin: "round",
13340
+ children: /* @__PURE__ */ jsx60("path", {
13341
+ d: "M4 12h12m-5-5 5 5-5 5m9-12v14"
13342
+ })
13343
+ }),
13344
+ /* @__PURE__ */ jsx60("input", {
13345
+ "aria-label": "Jump to page",
13346
+ type: "number",
13347
+ min: 1,
13348
+ max: pageCount,
13349
+ value: quickJumpValue,
13350
+ disabled,
13351
+ onChange: (event) => setQuickJumpValue(event.currentTarget.value),
13352
+ onKeyDown: handleQuickJumpKeyDown
13353
+ })
13354
+ ]
13282
13355
  }) : null
13283
13356
  ]
13284
13357
  });
@@ -4,7 +4,7 @@
4
4
  import { useCallback, useState } from "react";
5
5
 
6
6
  // src/generated/version.ts
7
- var version = "2.2.0";
7
+ var version = "2.3.0";
8
8
 
9
9
  // src/infrastructure.ts
10
10
  var theme = {
package/dist/styles.css CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @duskmoon-dev/core v2.2.0
2
+ * @duskmoon-dev/core v2.3.0
3
3
  * Material Design 3 color system with Tailwind CSS v4
4
4
  * https://github.com/duskmoon-dev/duskmoon-web
5
5
  *
@@ -5221,6 +5221,84 @@ html {
5221
5221
  box-shadow: 0 0 0 3px color-mix(in oklch, currentColor 20%, transparent);
5222
5222
  }
5223
5223
 
5224
+ .pagination-size-changer,
5225
+ .pagination-jumper {
5226
+ position: relative;
5227
+ display: inline-flex;
5228
+ align-items: center;
5229
+ color: var(--color-on-surface);
5230
+ }
5231
+
5232
+ .pagination-size-changer > select,
5233
+ .pagination-jumper > input {
5234
+ box-sizing: border-box;
5235
+ block-size: 2.5rem;
5236
+ padding-block: 0;
5237
+ font-size: 0.875rem;
5238
+ font-variant-numeric: tabular-nums;
5239
+ color: inherit;
5240
+ background-color: var(--color-surface);
5241
+ border: 1px solid var(--color-outline);
5242
+ border-radius: var(--radius-sm);
5243
+ }
5244
+
5245
+ .pagination-size-changer > select {
5246
+ appearance: none;
5247
+ padding-inline: 1.75rem 1.5rem;
5248
+ cursor: pointer;
5249
+ }
5250
+
5251
+ .pagination-jumper > input {
5252
+ appearance: textfield;
5253
+ inline-size: 4.25rem;
5254
+ padding-inline: 1.75rem 0.5rem;
5255
+ text-align: center;
5256
+ }
5257
+
5258
+ .pagination-jumper > input::-webkit-inner-spin-button {
5259
+ appearance: none;
5260
+ }
5261
+
5262
+ .pagination-size-changer > select:hover:not(:disabled) {
5263
+ background-color: var(--color-surface-container);
5264
+ }
5265
+
5266
+ .pagination-size-changer > select:focus-visible,
5267
+ .pagination-jumper > input:focus-visible {
5268
+ outline: 2px solid var(--color-primary);
5269
+ outline-offset: 2px;
5270
+ box-shadow: none;
5271
+ }
5272
+
5273
+ .pagination-size-changer:has(> select:disabled),
5274
+ .pagination-jumper:has(> input:disabled) {
5275
+ opacity: 0.5;
5276
+ }
5277
+
5278
+ .pagination-size-changer > select:disabled,
5279
+ .pagination-jumper > input:disabled {
5280
+ cursor: not-allowed;
5281
+ }
5282
+
5283
+ .pagination-size-changer > svg,
5284
+ .pagination-jumper > svg {
5285
+ position: absolute;
5286
+ pointer-events: none;
5287
+ }
5288
+
5289
+ .pagination-size-changer > svg:first-child,
5290
+ .pagination-jumper > svg {
5291
+ inset-inline-start: 0.5rem;
5292
+ }
5293
+
5294
+ .pagination-jumper:dir(rtl) > svg {
5295
+ transform: scaleX(-1);
5296
+ }
5297
+
5298
+ .pagination-size-changer > svg:last-child {
5299
+ inset-inline-end: 0.5rem;
5300
+ }
5301
+
5224
5302
  .pagination-outlined .pagination-item,
5225
5303
  .pagination-outlined .pagination-prev,
5226
5304
  .pagination-outlined .pagination-next {
@@ -5243,6 +5321,18 @@ html {
5243
5321
  font-size: 0.75rem;
5244
5322
  }
5245
5323
 
5324
+ .pagination-xs .pagination-size-changer > select,
5325
+ .pagination-xs .pagination-jumper > input {
5326
+ block-size: 1.5rem;
5327
+ font-size: 0.75rem;
5328
+ }
5329
+
5330
+ .pagination-sm .pagination-size-changer > select,
5331
+ .pagination-sm .pagination-jumper > input {
5332
+ block-size: 2rem;
5333
+ font-size: 0.75rem;
5334
+ }
5335
+
5246
5336
  .pagination-lg .pagination-item,
5247
5337
  .pagination-lg .pagination-prev,
5248
5338
  .pagination-lg .pagination-next {
@@ -5252,6 +5342,12 @@ html {
5252
5342
  font-size: 1rem;
5253
5343
  }
5254
5344
 
5345
+ .pagination-lg .pagination-size-changer > select,
5346
+ .pagination-lg .pagination-jumper > input {
5347
+ block-size: 3rem;
5348
+ font-size: 1rem;
5349
+ }
5350
+
5255
5351
  .pagination-compact {
5256
5352
  gap: 0;
5257
5353
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@duskmoon-dev/components",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -481,7 +481,7 @@
481
481
  }
482
482
  ],
483
483
  "peerDependencies": {
484
- "@duskmoon-dev/core": "2.2.0",
484
+ "@duskmoon-dev/core": "2.3.0",
485
485
  "react": ">=19.0.0",
486
486
  "react-dom": ">=19.0.0",
487
487
  "lexical": "0.53.0",
@@ -497,7 +497,7 @@
497
497
  "ajv-formats": "^3.0.1"
498
498
  },
499
499
  "devDependencies": {
500
- "@duskmoon-dev/core": "2.2.0",
500
+ "@duskmoon-dev/core": "2.3.0",
501
501
  "@lexical/history": "0.53.0",
502
502
  "@lexical/plain-text": "0.53.0",
503
503
  "@testing-library/react": "16.3.2",