@rubenpazch/pagination 3.0.0 → 3.2.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 CHANGED
@@ -1,3 +1,53 @@
1
1
  # Pagination
2
2
 
3
3
  Generated component package.
4
+
5
+ <!-- catalogo:inicio (generado por pnpm catalogo, no editar) -->
6
+
7
+ Paginación con variantes, tamaños y formas; incluye PaginationItem.
8
+
9
+ - **Usar cuando:** Listados paginados en el servidor (tablas, resultados de búsqueda).
10
+ - **Evitar cuando:** Pocas páginas que caben en una sola vista.
11
+
12
+ Se recomienda instalar el paquete completo `@rubenpazch/ui` (incluye este). Por separado:
13
+
14
+ ```bash
15
+ npm install @rubenpazch/pagination
16
+ ```
17
+
18
+ ## Pagination
19
+
20
+ | Prop | Tipo | Req. | Por defecto | Descripción |
21
+ | ----------------- | -------------------------------------------------------------- | ---- | ------------ | ----------------------------------------------------------------------------------- |
22
+ | `aria-label` | `string` | | `Paginación` | Nombre accesible de la navegación (por defecto "Paginación"). |
23
+ | `boundaryCount` | `number` | | `1` | Number of always visible pages at the beginning and end |
24
+ | `count` | `number` | | `1` | Total number of pages |
25
+ | `defaultPage` | `number` | | `1` | Default page if uncontrolled |
26
+ | `disabled` | `boolean` | | `false` | If true, the component is disabled |
27
+ | `hideNextButton` | `boolean` | | `false` | If true, hide the next-page button |
28
+ | `hidePrevButton` | `boolean` | | `false` | If true, hide the previous-page button |
29
+ | `onChange` | `(event: ChangeEvent<unknown, Element>, page: number) => void` | | | Al cambiar de página, estilo MUI: (evento, página). Se mantiene por compatibilidad. |
30
+ | `onPageChange` | `(page: number) => void` | | | Al cambiar de página (recibe solo el número). Preferido sobre onChange. |
31
+ | `page` | `number` | | | The current page (1-based) |
32
+ | `renderItem` | `(item: PaginationItemType) => ReactNode` | | | Custom render function for items |
33
+ | `shape` | `"rounded" \| "circular"` | | `rounded` | The shape of the pagination items |
34
+ | `showFirstButton` | `boolean` | | `false` | If true, show the first-page button |
35
+ | `showLastButton` | `boolean` | | `false` | If true, show the last-page button |
36
+ | `siblingCount` | `number` | | `1` | Number of always visible pages before and after the current page |
37
+ | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | | `medium` | The size of the pagination component |
38
+ | `variant` | `"text" \| "outlined"` | | `text` | The variant to use |
39
+
40
+ ## PaginationItem
41
+
42
+ | Prop | Tipo | Req. | Por defecto | Descripción |
43
+ | ---------- | ------------------------------------------------------------------------------------------- | ---- | ----------- | ------------------------------------ |
44
+ | `page` | `number` | sí | | The page number |
45
+ | `type` | `"page" \| "next" \| "previous" \| "first" \| "last" \| "start-ellipsis" \| "end-ellipsis"` | sí | | The type of pagination item |
46
+ | `selected` | `boolean` | | `false` | If true, the item is selected/active |
47
+ | `shape` | `"rounded" \| "circular"` | | `rounded` | The shape of the pagination items |
48
+ | `size` | `"small" \| "medium" \| "large" \| "sm" \| "md" \| "lg"` | | `medium` | The size of the component |
49
+ | `variant` | `"text" \| "outlined"` | | `text` | The variant to use |
50
+
51
+ Tipos: `PaginationProps`, `PaginationShape`, `PaginationSize`, `PaginationVariant`, `PaginationItemType`, `PaginationItemProps`.
52
+
53
+ <!-- catalogo:fin -->
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  export type PaginationShape = "rounded" | "circular";
3
- export type PaginationSize = "small" | "medium" | "large";
3
+ /** Tamaño: sm, md, lg (estándar) o small, medium, large. */
4
+ export type PaginationSize = "small" | "medium" | "large" | "sm" | "md" | "lg";
4
5
  export type PaginationVariant = "text" | "outlined";
5
6
  export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {
6
7
  /** Total number of pages */
@@ -9,8 +10,12 @@ export interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>,
9
10
  page?: number;
10
11
  /** Default page if uncontrolled */
11
12
  defaultPage?: number;
12
- /** Callback when page changes */
13
+ /** Al cambiar de página (recibe solo el número). Preferido sobre onChange. */
14
+ onPageChange?: (page: number) => void;
15
+ /** Al cambiar de página, estilo MUI: (evento, página). Se mantiene por compatibilidad. */
13
16
  onChange?: (event: React.ChangeEvent<unknown>, page: number) => void;
17
+ /** Nombre accesible de la navegación (por defecto "Paginación"). */
18
+ "aria-label"?: string;
14
19
  /** If true, the component is disabled */
15
20
  disabled?: boolean;
16
21
  /** If true, hide the next-page button */
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../src/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC;AACrD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEpD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,UAAU,CACX;IACC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yCAAyC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,yBAAyB;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,uCAAuC;IACvC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,KAAK,CAAC,SAAS,CAAC;CAC5D;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EACA,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,GACV,gBAAgB,GAChB,cAAc,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC/D;AAgID,QAAA,MAAM,UAAU,qFA8Gf,CAAC;AAIF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"Pagination.d.ts","sourceRoot":"","sources":["../src/Pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,UAAU,CAAC;AACrD,4DAA4D;AAC5D,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC/E,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,UAAU,CAAC;AAEpD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAC3C,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC,EACjC,UAAU,CACX;IACC,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,8EAA8E;IAC9E,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,0FAA0F;IAC1F,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrE,oEAAoE;IACpE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,yCAAyC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0CAA0C;IAC1C,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yCAAyC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,uEAAuE;IACvE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,2CAA2C;IAC3C,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,yBAAyB;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,uCAAuC;IACvC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,kBAAkB,KAAK,KAAK,CAAC,SAAS,CAAC;CAC5D;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EACA,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,GACV,gBAAgB,GAChB,cAAc,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;CAC/D;AAgID,QAAA,MAAM,UAAU,qFAkHf,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PaginationItem.d.ts","sourceRoot":"","sources":["../src/PaginationItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,MAAM,CACP;IACC,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,EACA,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,GACV,gBAAgB,GAChB,cAAc,CAAC;IACnB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,gCAAgC;IAChC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,yBAAyB;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAWD,QAAA,MAAM,cAAc,+FAuInB,CAAC;AAIF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"PaginationItem.d.ts","sourceRoot":"","sources":["../src/PaginationItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,iBAAiB,EAClB,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EAC7C,MAAM,CACP;IACC,sBAAsB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,kCAAkC;IAClC,IAAI,EACA,MAAM,GACN,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,GACV,gBAAgB,GAChB,cAAc,CAAC;IACnB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,gCAAgC;IAChC,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,yBAAyB;IACzB,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B;AAWD,QAAA,MAAM,cAAc,+FAwInB,CAAC;AAIF,eAAe,cAAc,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
+ var shared = require('@rubenpazch/shared');
4
5
 
5
6
  function _interopNamespaceDefault(e) {
6
7
  var n = Object.create(null);
@@ -443,7 +444,7 @@ function requireJsxRuntime () {
443
444
 
444
445
  var jsxRuntimeExports = requireJsxRuntime();
445
446
 
446
- var r,o={exports:{}},t={};var l,n,a={};
447
+ var t,r={exports:{}},o={};var l,n,a={};
447
448
  /**
448
449
  * @license React
449
450
  * react-jsx-runtime.development.js
@@ -452,7 +453,7 @@ var r,o={exports:{}},t={};var l,n,a={};
452
453
  *
453
454
  * This source code is licensed under the MIT license found in the
454
455
  * LICENSE file in the root directory of this source tree.
455
- */function i(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case x:return "Fragment";case p:return "Profiler";case v:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case u:return "Portal";case j:return s.displayName||"Context";case g:return (s._context.displayName||"Context")+".Consumer";case k:var r=s.render;return (s=s.displayName)||(s=""!==(s=r.displayName||r.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(r=s.displayName||null)?r:e(s.type)||"Memo";case y:r=s._payload,s=s._init;try{return e(s(r))}catch(e){}}return null}function r(e){return ""+e}function o(e){try{r(e);var s=!1;}catch(e){s=true;}if(s){var o=(s=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),r(e)}}function t(s){if(s===x)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var r=e(s);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(s=this.props.ref)?s:null}function i(s,r,t,l,a,i){var h,m=r.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(b.call(r,"key")){m=e(s);var u=Object.keys(r).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,u,m),W[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),m=""+r.key),"key"in r)for(var x in t={},r)"key"!==x&&(t[x]=r[x]);else t=r;return m&&function(e,s){function r(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s));}r.isReactWarning=true,Object.defineProperty(e,"key",{get:r,configurable:true});}(t,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,r,o,t,l){var a=r.ref;return e={$$typeof:w,type:e,key:s,props:r,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,t,null===(h=$.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=React,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(t(l)),W={};a.Fragment=x,a.jsx=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,false,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)},a.jsxs=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,true,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)};}()),a}var c=(n||(n=1,"production"===process.env.NODE_ENV?o.exports=function(){if(r)return t;r=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(s,r,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==r.key&&(t=""+r.key),"key"in r)for(var l in o={},r)"key"!==l&&(o[l]=r[l]);else o=r;return r=o.ref,{$$typeof:e,type:s,key:t,ref:void 0!==r?r:null,props:o}}return t.Fragment=s,t.jsx=o,t.jsxs=o,t}():o.exports=i()),o.exports);const C={sm:16,md:20,lg:28},L=({size:e="md",direction:s="right",...r})=>{const o=C[e],t="left"===s;return c.jsx("svg",{width:o,height:o,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...r,children:c.jsxs("g",{transform:t?"scale(-1,1) translate(-20,0)":void 0,children:[c.jsx("path",{d:"M7.22 5.22a.75.75 0 011.06 0l4 4a.75.75 0 010 1.06l-4 4a.75.75 0 11-1.06-1.06L10.94 10 7.22 6.28a.75.75 0 010-1.06z"}),c.jsx("path",{d:"M15.25 4a.75.75 0 10-1.5 0v12a.75.75 0 101.5 0V4z"})]})})},y=({className:e="",size:s="md",color:r="currentColor",direction:o="down"})=>c.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[o]} ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M6 9l6 6 6-6"})});const Xe={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ye=React__namespace.forwardRef(({name:e,variant:s="outlined",size:r="md",fill:o=0,weight:t=400,grade:l=0,opticalSize:n=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(r),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${l}, "opsz" ${n}`;return c.jsx("span",{ref:d,"aria-hidden":"true",className:Xe[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ye.displayName="MaterialIcon";
456
+ */function i(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case u:return "Fragment";case v:return "Profiler";case x:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case g:return "Portal";case j:return s.displayName||"Context";case p:return (s._context.displayName||"Context")+".Consumer";case k:var t=s.render;return (s=s.displayName)||(s=""!==(s=t.displayName||t.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(t=s.displayName||null)?t:e(s.type)||"Memo";case y:t=s._payload,s=s._init;try{return e(s(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var s=!1;}catch(e){s=true;}if(s){var r=(s=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(s){if(s===u)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var t=e(s);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(s=this.props.ref)?s:null}function i(s,t,o,l,a,i){var c,m=t.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)h(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(m);if(b.call(t,"key")){m=e(s);var g=Object.keys(t).filter(function(e){return "key"!==e});l=0<g.length?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(g=0<g.length?"{"+g.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,g,m),W[m+l]=true);}if(m=null,void 0!==o&&(r(o),m=""+o),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),m=""+t.key),"key"in t)for(var u in o={},t)"key"!==u&&(o[u]=t[u]);else o=t;return m&&function(e,s){function t(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,t,r,o,l){var a=t.ref;return e={$$typeof:w,type:e,key:s,props:t,_owner:r},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,o,null===(c=$.A)?null:c.getOwner(),a,i)}function h(e){c(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?c(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function c(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=React,w=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(o(l)),W={};a.Fragment=u,a.jsx=function(e,s,t){var r=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,t,false,r?Error("react-stack-top-frame"):V,r?H(o(e)):Z)},a.jsxs=function(e,s,t){var r=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,t,true,r?Error("react-stack-top-frame"):V,r?H(o(e)):Z)};}()),a}var h=(n||(n=1,"production"===process.env.NODE_ENV?r.exports=function(){if(t)return o;t=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(s,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var l in r={},t)"key"!==l&&(r[l]=t[l]);else r=t;return t=r.ref,{$$typeof:e,type:s,key:o,ref:void 0!==t?t:null,props:r}}return o.Fragment=s,o.jsx=r,o.jsxs=r,o}():r.exports=i()),r.exports);const C={sm:16,md:20,lg:28},L=({size:e="md",direction:s="right",...t})=>{const r=C[e],o="left"===s;return h.jsx("svg",{width:r,height:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...t,children:h.jsxs("g",{transform:o?"scale(-1,1) translate(-20,0)":void 0,children:[h.jsx("path",{d:"M7.22 5.22a.75.75 0 011.06 0l4 4a.75.75 0 010 1.06l-4 4a.75.75 0 11-1.06-1.06L10.94 10 7.22 6.28a.75.75 0 010-1.06z"}),h.jsx("path",{d:"M15.25 4a.75.75 0 10-1.5 0v12a.75.75 0 101.5 0V4z"})]})})},y=({className:e="",size:s="md",color:t="currentColor",direction:r="down"})=>{const o={sm:16,md:20,lg:24};return h.jsx("svg",{width:o[s],height:o[s],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[r]} ${e}`,fill:"none",stroke:t,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"M6 9l6 6 6-6"})})};const ds={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},ms=React__namespace.forwardRef(({name:e,variant:s="outlined",size:t="md",fill:r=0,weight:o=400,grade:l=0,opticalSize:n=24,style:a,className:i,...c},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(t),w=`"FILL" ${r}, "wght" ${o}, "GRAD" ${l}, "opsz" ${n}`;return h.jsx("span",{ref:d,"aria-hidden":"true",className:ds[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...c,children:e})});ms.displayName="MaterialIcon";
456
457
 
457
458
  function styleInject(css, ref) {
458
459
  if ( ref === void 0 ) ref = {};
@@ -481,7 +482,7 @@ function styleInject(css, ref) {
481
482
  }
482
483
  }
483
484
 
484
- var css_248z$1 = "/* Pagination Item */\n.PaginationItem-module_item__pRz10 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n font-family:\n -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial,\n sans-serif;\n font-weight: 500;\n line-height: 1.5;\n user-select: none;\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.PaginationItem-module_button__vvMNc {\n border: none;\n background: transparent;\n cursor: pointer;\n color: var(--lb-color-foreground);\n margin: 0;\n}\n\n.PaginationItem-module_button__vvMNc:hover:not(.PaginationItem-module_disabled__pjZg5) {\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.PaginationItem-module_button__vvMNc:focus-visible {\n outline: 2px solid var(--lb-color-ring);\n outline-offset: 2px;\n}\n\n.PaginationItem-module_ellipsis__O3uKM {\n color: var(--lb-color-muted-foreground);\n pointer-events: none;\n}\n\n/* Sizes */\n.PaginationItem-module_size-small__EL1RS {\n min-width: 26px;\n height: 26px;\n font-size: 0.75rem;\n padding: 0 6px;\n}\n\n.PaginationItem-module_size-medium__BhNiF {\n min-width: 32px;\n height: 32px;\n font-size: 0.875rem;\n padding: 0 6px;\n}\n\n.PaginationItem-module_size-large__gFIDd {\n min-width: 40px;\n height: 40px;\n font-size: 1rem;\n padding: 0 10px;\n}\n\n/* Circular items must be true circles (equal width/height, no horizontal padding) */\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-small__EL1RS {\n width: 26px;\n height: 26px;\n padding: 0;\n}\n\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-medium__BhNiF {\n width: 32px;\n height: 32px;\n padding: 0;\n}\n\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-large__gFIDd {\n width: 40px;\n height: 40px;\n padding: 0;\n}\n\n/* Shapes */\n.PaginationItem-module_shape-rounded__UttZK {\n border-radius: 4px;\n}\n\n.PaginationItem-module_shape-circular__maeDw {\n border-radius: 50%;\n}\n\n/* Variants */\n.PaginationItem-module_variant-text__tlyX0.PaginationItem-module_selected__HrXZ7 {\n background-color: color-mix(in srgb, var(--lb-color-primary) 12%, transparent);\n color: var(--lb-color-primary);\n font-weight: 600;\n}\n\n.PaginationItem-module_variant-outlined__sukDY {\n border: 1px solid rgba(0, 0, 0, 0.23);\n}\n\n.PaginationItem-module_variant-outlined__sukDY:hover:not(.PaginationItem-module_disabled__pjZg5) {\n border-color: rgba(0, 0, 0, 0.87);\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.PaginationItem-module_variant-outlined__sukDY.PaginationItem-module_selected__HrXZ7 {\n background-color: color-mix(in srgb, var(--lb-color-primary) 12%, transparent);\n color: var(--lb-color-primary);\n border-color: var(--lb-color-primary);\n font-weight: 600;\n}\n\n/* States */\n.PaginationItem-module_disabled__pjZg5 {\n opacity: 0.38;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n/* Navigation buttons */\n.PaginationItem-module_navigation__9oiE2 {\n min-width: auto;\n}\n\n.PaginationItem-module_icon__f5p0K {\n width: 20px;\n height: 20px;\n fill: currentColor;\n}\n\n.PaginationItem-module_size-small__EL1RS .PaginationItem-module_icon__f5p0K {\n width: 18px;\n height: 18px;\n}\n\n.PaginationItem-module_size-large__gFIDd .PaginationItem-module_icon__f5p0K {\n width: 22px;\n height: 22px;\n}\n";
485
+ var css_248z$1 = "/* Pagination Item */\n.PaginationItem-module_item__pRz10 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n font-family:\n -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial,\n sans-serif;\n font-weight: 500;\n line-height: 1.5;\n user-select: none;\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.PaginationItem-module_button__vvMNc {\n border: none;\n background: transparent;\n cursor: pointer;\n color: var(--lb-color-foreground);\n margin: 0;\n}\n\n.PaginationItem-module_button__vvMNc:hover:not(.PaginationItem-module_disabled__pjZg5) {\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.PaginationItem-module_button__vvMNc:focus-visible {\n outline: 2px solid var(--lb-color-ring);\n outline-offset: 2px;\n}\n\n.PaginationItem-module_ellipsis__O3uKM {\n color: var(--lb-color-muted-foreground);\n pointer-events: none;\n}\n\n/* Sizes */\n.PaginationItem-module_size-small__EL1RS {\n min-width: 26px;\n height: 26px;\n font-size: 0.75rem;\n padding: 0 6px;\n}\n\n.PaginationItem-module_size-medium__BhNiF {\n min-width: 32px;\n height: 32px;\n font-size: 0.875rem;\n padding: 0 6px;\n}\n\n.PaginationItem-module_size-large__gFIDd {\n min-width: 40px;\n height: 40px;\n font-size: 1rem;\n padding: 0 10px;\n}\n\n/* Circular items must be true circles (equal width/height, no horizontal padding) */\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-small__EL1RS {\n width: 26px;\n height: 26px;\n padding: 0;\n}\n\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-medium__BhNiF {\n width: 32px;\n height: 32px;\n padding: 0;\n}\n\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-large__gFIDd {\n width: 40px;\n height: 40px;\n padding: 0;\n}\n\n/* Shapes */\n.PaginationItem-module_shape-rounded__UttZK {\n border-radius: 4px;\n}\n\n.PaginationItem-module_shape-circular__maeDw {\n border-radius: 50%;\n}\n\n/* Variants */\n.PaginationItem-module_variant-text__tlyX0.PaginationItem-module_selected__HrXZ7 {\n background-color: color-mix(\n in srgb,\n var(--lb-color-primary) 12%,\n transparent\n );\n color: var(--lb-color-primary);\n font-weight: 600;\n}\n\n.PaginationItem-module_variant-outlined__sukDY {\n border: 1px solid rgba(0, 0, 0, 0.23);\n}\n\n.PaginationItem-module_variant-outlined__sukDY:hover:not(.PaginationItem-module_disabled__pjZg5) {\n border-color: rgba(0, 0, 0, 0.87);\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.PaginationItem-module_variant-outlined__sukDY.PaginationItem-module_selected__HrXZ7 {\n background-color: color-mix(\n in srgb,\n var(--lb-color-primary) 12%,\n transparent\n );\n color: var(--lb-color-primary);\n border-color: var(--lb-color-primary);\n font-weight: 600;\n}\n\n/* States */\n.PaginationItem-module_disabled__pjZg5 {\n opacity: 0.38;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n/* Navigation buttons */\n.PaginationItem-module_navigation__9oiE2 {\n min-width: auto;\n}\n\n.PaginationItem-module_icon__f5p0K {\n width: 20px;\n height: 20px;\n fill: currentColor;\n}\n\n.PaginationItem-module_size-small__EL1RS .PaginationItem-module_icon__f5p0K {\n width: 18px;\n height: 18px;\n}\n\n.PaginationItem-module_size-large__gFIDd .PaginationItem-module_icon__f5p0K {\n width: 22px;\n height: 22px;\n}\n";
485
486
  var styles$1 = {"item":"PaginationItem-module_item__pRz10","button":"PaginationItem-module_button__vvMNc","disabled":"PaginationItem-module_disabled__pjZg5","ellipsis":"PaginationItem-module_ellipsis__O3uKM","size-small":"PaginationItem-module_size-small__EL1RS","size-medium":"PaginationItem-module_size-medium__BhNiF","size-large":"PaginationItem-module_size-large__gFIDd","shape-circular":"PaginationItem-module_shape-circular__maeDw","shape-rounded":"PaginationItem-module_shape-rounded__UttZK","variant-text":"PaginationItem-module_variant-text__tlyX0","selected":"PaginationItem-module_selected__HrXZ7","variant-outlined":"PaginationItem-module_variant-outlined__sukDY","navigation":"PaginationItem-module_navigation__9oiE2","icon":"PaginationItem-module_icon__f5p0K"};
486
487
  styleInject(css_248z$1);
487
488
 
@@ -491,7 +492,8 @@ const iconSizeMap = {
491
492
  medium: "md",
492
493
  large: "lg",
493
494
  };
494
- const PaginationItem = React.forwardRef(({ page, type, selected = false, disabled = false, shape = "rounded", size = "medium", variant = "text", className, ...props }, ref) => {
495
+ const PaginationItem = React.forwardRef(({ page, type, selected = false, disabled = false, shape = "rounded", size: sizeProp = "medium", variant = "text", className, ...props }, ref) => {
496
+ const size = shared.toLegacySize(sizeProp);
495
497
  // Ellipsis are not interactive
496
498
  if (type === "start-ellipsis" || type === "end-ellipsis") {
497
499
  // Use ASCII ellipsis to keep output portable across environments
@@ -530,14 +532,14 @@ const PaginationItem = React.forwardRef(({ page, type, selected = false, disable
530
532
  };
531
533
  const classes = classNames$1(styles$1.item, styles$1.button, styles$1[`size-${size}`], styles$1[`shape-${shape}`], styles$1[`variant-${variant}`], selected && styles$1.selected, disabled && styles$1.disabled, isNavigationButton && styles$1.navigation, className);
532
534
  return (jsxRuntimeExports.jsx("button", { ref: ref, type: "button", className: classes, disabled: disabled, "aria-label": type === "first"
533
- ? "Go to first page"
535
+ ? "Ir a la primera página"
534
536
  : type === "last"
535
- ? "Go to last page"
537
+ ? "Ir a la última página"
536
538
  : type === "next"
537
- ? "Go to next page"
539
+ ? "Página siguiente"
538
540
  : type === "previous"
539
- ? "Go to previous page"
540
- : `Go to page ${page}`, "aria-current": selected ? "true" : undefined, ...props, children: getButtonContent() }));
541
+ ? "Página anterior"
542
+ : `Página ${page}`, "aria-current": selected ? "page" : undefined, ...props, children: getButtonContent() }));
541
543
  });
542
544
  PaginationItem.displayName = "PaginationItem";
543
545
 
@@ -620,7 +622,8 @@ const usePagination = (props) => {
620
622
  }
621
623
  return items;
622
624
  };
623
- const Pagination = React.forwardRef(({ count = 1, page: controlledPage, defaultPage = 1, onChange, disabled = false, hideNextButton = false, hidePrevButton = false, showFirstButton = false, showLastButton = false, boundaryCount = 1, siblingCount = 1, shape = "rounded", size = "medium", variant = "text", renderItem, className, ...props }, ref) => {
625
+ const Pagination = React.forwardRef(({ count = 1, page: controlledPage, defaultPage = 1, onChange, onPageChange, "aria-label": ariaLabel = "Paginación", disabled = false, hideNextButton = false, hidePrevButton = false, showFirstButton = false, showLastButton = false, boundaryCount = 1, siblingCount = 1, shape = "rounded", size: sizeProp = "medium", variant = "text", renderItem, className, ...props }, ref) => {
626
+ const size = shared.toLegacySize(sizeProp);
624
627
  const [page, setPage] = React.useState(defaultPage);
625
628
  const currentPage = controlledPage ?? page;
626
629
  const handleClick = (event, value) => {
@@ -630,6 +633,7 @@ const Pagination = React.forwardRef(({ count = 1, page: controlledPage, defaultP
630
633
  if (onChange) {
631
634
  onChange(event, value);
632
635
  }
636
+ onPageChange?.(value);
633
637
  };
634
638
  const items = usePagination({
635
639
  count,
@@ -642,7 +646,7 @@ const Pagination = React.forwardRef(({ count = 1, page: controlledPage, defaultP
642
646
  hidePrevButton,
643
647
  });
644
648
  const classes = classNames(styles.root, className);
645
- return (jsxRuntimeExports.jsx("nav", { ref: ref, className: classes, ...props, children: jsxRuntimeExports.jsx("ul", { className: styles.ul, children: items.map((item, index) => {
649
+ return (jsxRuntimeExports.jsx("nav", { ref: ref, className: classes, "aria-label": ariaLabel, ...props, children: jsxRuntimeExports.jsx("ul", { className: styles.ul, children: items.map((item, index) => {
646
650
  const isDisabled = disabled || item.disabled;
647
651
  if (renderItem) {
648
652
  return (jsxRuntimeExports.jsx("li", { children: renderItem({
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
 
3
3
  type PaginationShape = "rounded" | "circular";
4
- type PaginationSize = "small" | "medium" | "large";
4
+ /** Tamaño: sm, md, lg (estándar) o small, medium, large. */
5
+ type PaginationSize = "small" | "medium" | "large" | "sm" | "md" | "lg";
5
6
  type PaginationVariant = "text" | "outlined";
6
7
  interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onChange"> {
7
8
  /** Total number of pages */
@@ -10,8 +11,12 @@ interface PaginationProps extends Omit<React.HTMLAttributes<HTMLElement>, "onCha
10
11
  page?: number;
11
12
  /** Default page if uncontrolled */
12
13
  defaultPage?: number;
13
- /** Callback when page changes */
14
+ /** Al cambiar de página (recibe solo el número). Preferido sobre onChange. */
15
+ onPageChange?: (page: number) => void;
16
+ /** Al cambiar de página, estilo MUI: (evento, página). Se mantiene por compatibilidad. */
14
17
  onChange?: (event: React.ChangeEvent<unknown>, page: number) => void;
18
+ /** Nombre accesible de la navegación (por defecto "Paginación"). */
19
+ "aria-label"?: string;
15
20
  /** If true, the component is disabled */
16
21
  disabled?: boolean;
17
22
  /** If true, hide the next-page button */
package/dist/index.esm.js CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
+ import { toLegacySize } from '@rubenpazch/shared';
3
4
 
4
5
  var jsxRuntime = {exports: {}};
5
6
 
@@ -423,7 +424,7 @@ function requireJsxRuntime () {
423
424
 
424
425
  var jsxRuntimeExports = requireJsxRuntime();
425
426
 
426
- var r,o={exports:{}},t={};var l,n,a={};
427
+ var t,r={exports:{}},o={};var l,n,a={};
427
428
  /**
428
429
  * @license React
429
430
  * react-jsx-runtime.development.js
@@ -432,7 +433,7 @@ var r,o={exports:{}},t={};var l,n,a={};
432
433
  *
433
434
  * This source code is licensed under the MIT license found in the
434
435
  * LICENSE file in the root directory of this source tree.
435
- */function i(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case x:return "Fragment";case p:return "Profiler";case v:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case u:return "Portal";case j:return s.displayName||"Context";case g:return (s._context.displayName||"Context")+".Consumer";case k:var r=s.render;return (s=s.displayName)||(s=""!==(s=r.displayName||r.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(r=s.displayName||null)?r:e(s.type)||"Memo";case y:r=s._payload,s=s._init;try{return e(s(r))}catch(e){}}return null}function r(e){return ""+e}function o(e){try{r(e);var s=!1;}catch(e){s=true;}if(s){var o=(s=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),r(e)}}function t(s){if(s===x)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var r=e(s);return r?"<"+r+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(s=this.props.ref)?s:null}function i(s,r,t,l,a,i){var h,m=r.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)c(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else c(m);if(b.call(r,"key")){m=e(s);var u=Object.keys(r).filter(function(e){return "key"!==e});l=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,u,m),W[m+l]=true);}if(m=null,void 0!==t&&(o(t),m=""+t),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(r)&&(o(r.key),m=""+r.key),"key"in r)for(var x in t={},r)"key"!==x&&(t[x]=r[x]);else t=r;return m&&function(e,s){function r(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s));}r.isReactWarning=true,Object.defineProperty(e,"key",{get:r,configurable:true});}(t,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,r,o,t,l){var a=r.ref;return e={$$typeof:w,type:e,key:s,props:r,_owner:o},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:t}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,t,null===(h=$.A)?null:h.getOwner(),a,i)}function c(e){h(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?h(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function h(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=React__default,w=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),v=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(t(l)),W={};a.Fragment=x,a.jsx=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,false,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)},a.jsxs=function(e,s,r){var o=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,r,true,o?Error("react-stack-top-frame"):V,o?H(t(e)):Z)};}()),a}var c=(n||(n=1,"production"===process.env.NODE_ENV?o.exports=function(){if(r)return t;r=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(s,r,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==r.key&&(t=""+r.key),"key"in r)for(var l in o={},r)"key"!==l&&(o[l]=r[l]);else o=r;return r=o.ref,{$$typeof:e,type:s,key:t,ref:void 0!==r?r:null,props:o}}return t.Fragment=s,t.jsx=o,t.jsxs=o,t}():o.exports=i()),o.exports);const C={sm:16,md:20,lg:28},L=({size:e="md",direction:s="right",...r})=>{const o=C[e],t="left"===s;return c.jsx("svg",{width:o,height:o,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...r,children:c.jsxs("g",{transform:t?"scale(-1,1) translate(-20,0)":void 0,children:[c.jsx("path",{d:"M7.22 5.22a.75.75 0 011.06 0l4 4a.75.75 0 010 1.06l-4 4a.75.75 0 11-1.06-1.06L10.94 10 7.22 6.28a.75.75 0 010-1.06z"}),c.jsx("path",{d:"M15.25 4a.75.75 0 10-1.5 0v12a.75.75 0 101.5 0V4z"})]})})},y=({className:e="",size:s="md",color:r="currentColor",direction:o="down"})=>c.jsx("svg",{className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[o]} ${e}`,fill:"none",stroke:r,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:c.jsx("path",{d:"M6 9l6 6 6-6"})});const Xe={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},Ye=React.forwardRef(({name:e,variant:s="outlined",size:r="md",fill:o=0,weight:t=400,grade:l=0,opticalSize:n=24,style:a,className:i,...h},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(r),w=`"FILL" ${o}, "wght" ${t}, "GRAD" ${l}, "opsz" ${n}`;return c.jsx("span",{ref:d,"aria-hidden":"true",className:Xe[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...h,children:e})});Ye.displayName="MaterialIcon";
436
+ */function i(){return l||(l=1,"production"!==process.env.NODE_ENV&&function(){function e(s){if(null==s)return null;if("function"==typeof s)return s.$$typeof===M?null:s.displayName||s.name||null;if("string"==typeof s)return s;switch(s){case u:return "Fragment";case v:return "Profiler";case x:return "StrictMode";case f:return "Suspense";case C:return "SuspenseList";case N:return "Activity"}if("object"==typeof s)switch("number"==typeof s.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),s.$$typeof){case g:return "Portal";case j:return s.displayName||"Context";case p:return (s._context.displayName||"Context")+".Consumer";case k:var t=s.render;return (s=s.displayName)||(s=""!==(s=t.displayName||t.name||"")?"ForwardRef("+s+")":"ForwardRef"),s;case L:return null!==(t=s.displayName||null)?t:e(s.type)||"Memo";case y:t=s._payload,s=s._init;try{return e(s(t))}catch(e){}}return null}function t(e){return ""+e}function r(e){try{t(e);var s=!1;}catch(e){s=true;}if(s){var r=(s=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(s,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),t(e)}}function o(s){if(s===u)return "<>";if("object"==typeof s&&null!==s&&s.$$typeof===y)return "<...>";try{var t=e(s);return t?"<"+t+">":"<...>"}catch(e){return "<...>"}}function l(){return Error("react-stack-top-frame")}function n(){var s=e(this.type);return B[s]||(B[s]=true,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(s=this.props.ref)?s:null}function i(s,t,o,l,a,i){var c,m=t.children;if(void 0!==m)if(l)if(z(m)){for(l=0;l<m.length;l++)h(m[l]);Object.freeze&&Object.freeze(m);}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else h(m);if(b.call(t,"key")){m=e(s);var g=Object.keys(t).filter(function(e){return "key"!==e});l=0<g.length?"{key: someKey, "+g.join(": ..., ")+": ...}":"{key: someKey}",W[m+l]||(g=0<g.length?"{"+g.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',l,m,g,m),W[m+l]=true);}if(m=null,void 0!==o&&(r(o),m=""+o),function(e){if(b.call(e,"key")){var s=Object.getOwnPropertyDescriptor(e,"key").get;if(s&&s.isReactWarning)return false}return void 0!==e.key}(t)&&(r(t.key),m=""+t.key),"key"in t)for(var u in o={},t)"key"!==u&&(o[u]=t[u]);else o=t;return m&&function(e,s){function t(){d||(d=true,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",s));}t.isReactWarning=true,Object.defineProperty(e,"key",{get:t,configurable:true});}(o,"function"==typeof s?s.displayName||s.name||"Unknown":s),function(e,s,t,r,o,l){var a=t.ref;return e={$$typeof:w,type:e,key:s,props:t,_owner:r},null!==(void 0!==a?a:null)?Object.defineProperty(e,"ref",{enumerable:false,get:n}):Object.defineProperty(e,"ref",{enumerable:false,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:false,enumerable:false,writable:true,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:false,enumerable:false,writable:true,value:null}),Object.defineProperty(e,"_debugStack",{configurable:false,enumerable:false,writable:true,value:o}),Object.defineProperty(e,"_debugTask",{configurable:false,enumerable:false,writable:true,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(s,m,o,null===(c=$.A)?null:c.getOwner(),a,i)}function h(e){c(e)?e._store&&(e._store.validated=1):"object"==typeof e&&null!==e&&e.$$typeof===y&&("fulfilled"===e._payload.status?c(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1));}function c(e){return "object"==typeof e&&null!==e&&e.$$typeof===w}var d,m=React__default,w=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),x=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),j=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),L=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),M=Symbol.for("react.client.reference"),$=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,b=Object.prototype.hasOwnProperty,z=Array.isArray,H=console.createTask?console.createTask:function(){return null},B={},V=(m={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(m,l)(),Z=H(o(l)),W={};a.Fragment=u,a.jsx=function(e,s,t){var r=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,t,false,r?Error("react-stack-top-frame"):V,r?H(o(e)):Z)},a.jsxs=function(e,s,t){var r=1e4>$.recentlyCreatedOwnerStacks++;return i(e,s,t,true,r?Error("react-stack-top-frame"):V,r?H(o(e)):Z)};}()),a}var h=(n||(n=1,"production"===process.env.NODE_ENV?r.exports=function(){if(t)return o;t=1;var e=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function r(s,t,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==t.key&&(o=""+t.key),"key"in t)for(var l in r={},t)"key"!==l&&(r[l]=t[l]);else r=t;return t=r.ref,{$$typeof:e,type:s,key:o,ref:void 0!==t?t:null,props:r}}return o.Fragment=s,o.jsx=r,o.jsxs=r,o}():r.exports=i()),r.exports);const C={sm:16,md:20,lg:28},L=({size:e="md",direction:s="right",...t})=>{const r=C[e],o="left"===s;return h.jsx("svg",{width:r,height:r,viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",...t,children:h.jsxs("g",{transform:o?"scale(-1,1) translate(-20,0)":void 0,children:[h.jsx("path",{d:"M7.22 5.22a.75.75 0 011.06 0l4 4a.75.75 0 010 1.06l-4 4a.75.75 0 11-1.06-1.06L10.94 10 7.22 6.28a.75.75 0 010-1.06z"}),h.jsx("path",{d:"M15.25 4a.75.75 0 10-1.5 0v12a.75.75 0 101.5 0V4z"})]})})},y=({className:e="",size:s="md",color:t="currentColor",direction:r="down"})=>{const o={sm:16,md:20,lg:24};return h.jsx("svg",{width:o[s],height:o[s],className:`${{sm:"w-4 h-4",md:"w-5 h-5",lg:"w-6 h-6"}[s]} ${{up:"rotate-180",down:"",left:"rotate-90",right:"-rotate-90"}[r]} ${e}`,fill:"none",stroke:t,viewBox:"0 0 24 24",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:h.jsx("path",{d:"M6 9l6 6 6-6"})})};const ds={outlined:"material-symbols-outlined",rounded:"material-symbols-rounded",sharp:"material-symbols-sharp"},ms=React.forwardRef(({name:e,variant:s="outlined",size:t="md",fill:r=0,weight:o=400,grade:l=0,opticalSize:n=24,style:a,className:i,...c},d)=>{const m=(e=>"number"==typeof e?e:"sm"===e?16:"md"===e?20:24)(t),w=`"FILL" ${r}, "wght" ${o}, "GRAD" ${l}, "opsz" ${n}`;return h.jsx("span",{ref:d,"aria-hidden":"true",className:ds[s]+(i?` ${i}`:""),style:{fontVariationSettings:w,fontSize:m,lineHeight:1,display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",...a},...c,children:e})});ms.displayName="MaterialIcon";
436
437
 
437
438
  function styleInject(css, ref) {
438
439
  if ( ref === void 0 ) ref = {};
@@ -461,7 +462,7 @@ function styleInject(css, ref) {
461
462
  }
462
463
  }
463
464
 
464
- var css_248z$1 = "/* Pagination Item */\n.PaginationItem-module_item__pRz10 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n font-family:\n -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial,\n sans-serif;\n font-weight: 500;\n line-height: 1.5;\n user-select: none;\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.PaginationItem-module_button__vvMNc {\n border: none;\n background: transparent;\n cursor: pointer;\n color: var(--lb-color-foreground);\n margin: 0;\n}\n\n.PaginationItem-module_button__vvMNc:hover:not(.PaginationItem-module_disabled__pjZg5) {\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.PaginationItem-module_button__vvMNc:focus-visible {\n outline: 2px solid var(--lb-color-ring);\n outline-offset: 2px;\n}\n\n.PaginationItem-module_ellipsis__O3uKM {\n color: var(--lb-color-muted-foreground);\n pointer-events: none;\n}\n\n/* Sizes */\n.PaginationItem-module_size-small__EL1RS {\n min-width: 26px;\n height: 26px;\n font-size: 0.75rem;\n padding: 0 6px;\n}\n\n.PaginationItem-module_size-medium__BhNiF {\n min-width: 32px;\n height: 32px;\n font-size: 0.875rem;\n padding: 0 6px;\n}\n\n.PaginationItem-module_size-large__gFIDd {\n min-width: 40px;\n height: 40px;\n font-size: 1rem;\n padding: 0 10px;\n}\n\n/* Circular items must be true circles (equal width/height, no horizontal padding) */\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-small__EL1RS {\n width: 26px;\n height: 26px;\n padding: 0;\n}\n\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-medium__BhNiF {\n width: 32px;\n height: 32px;\n padding: 0;\n}\n\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-large__gFIDd {\n width: 40px;\n height: 40px;\n padding: 0;\n}\n\n/* Shapes */\n.PaginationItem-module_shape-rounded__UttZK {\n border-radius: 4px;\n}\n\n.PaginationItem-module_shape-circular__maeDw {\n border-radius: 50%;\n}\n\n/* Variants */\n.PaginationItem-module_variant-text__tlyX0.PaginationItem-module_selected__HrXZ7 {\n background-color: color-mix(in srgb, var(--lb-color-primary) 12%, transparent);\n color: var(--lb-color-primary);\n font-weight: 600;\n}\n\n.PaginationItem-module_variant-outlined__sukDY {\n border: 1px solid rgba(0, 0, 0, 0.23);\n}\n\n.PaginationItem-module_variant-outlined__sukDY:hover:not(.PaginationItem-module_disabled__pjZg5) {\n border-color: rgba(0, 0, 0, 0.87);\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.PaginationItem-module_variant-outlined__sukDY.PaginationItem-module_selected__HrXZ7 {\n background-color: color-mix(in srgb, var(--lb-color-primary) 12%, transparent);\n color: var(--lb-color-primary);\n border-color: var(--lb-color-primary);\n font-weight: 600;\n}\n\n/* States */\n.PaginationItem-module_disabled__pjZg5 {\n opacity: 0.38;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n/* Navigation buttons */\n.PaginationItem-module_navigation__9oiE2 {\n min-width: auto;\n}\n\n.PaginationItem-module_icon__f5p0K {\n width: 20px;\n height: 20px;\n fill: currentColor;\n}\n\n.PaginationItem-module_size-small__EL1RS .PaginationItem-module_icon__f5p0K {\n width: 18px;\n height: 18px;\n}\n\n.PaginationItem-module_size-large__gFIDd .PaginationItem-module_icon__f5p0K {\n width: 22px;\n height: 22px;\n}\n";
465
+ var css_248z$1 = "/* Pagination Item */\n.PaginationItem-module_item__pRz10 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n font-family:\n -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial,\n sans-serif;\n font-weight: 500;\n line-height: 1.5;\n user-select: none;\n transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n.PaginationItem-module_button__vvMNc {\n border: none;\n background: transparent;\n cursor: pointer;\n color: var(--lb-color-foreground);\n margin: 0;\n}\n\n.PaginationItem-module_button__vvMNc:hover:not(.PaginationItem-module_disabled__pjZg5) {\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.PaginationItem-module_button__vvMNc:focus-visible {\n outline: 2px solid var(--lb-color-ring);\n outline-offset: 2px;\n}\n\n.PaginationItem-module_ellipsis__O3uKM {\n color: var(--lb-color-muted-foreground);\n pointer-events: none;\n}\n\n/* Sizes */\n.PaginationItem-module_size-small__EL1RS {\n min-width: 26px;\n height: 26px;\n font-size: 0.75rem;\n padding: 0 6px;\n}\n\n.PaginationItem-module_size-medium__BhNiF {\n min-width: 32px;\n height: 32px;\n font-size: 0.875rem;\n padding: 0 6px;\n}\n\n.PaginationItem-module_size-large__gFIDd {\n min-width: 40px;\n height: 40px;\n font-size: 1rem;\n padding: 0 10px;\n}\n\n/* Circular items must be true circles (equal width/height, no horizontal padding) */\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-small__EL1RS {\n width: 26px;\n height: 26px;\n padding: 0;\n}\n\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-medium__BhNiF {\n width: 32px;\n height: 32px;\n padding: 0;\n}\n\n.PaginationItem-module_shape-circular__maeDw.PaginationItem-module_size-large__gFIDd {\n width: 40px;\n height: 40px;\n padding: 0;\n}\n\n/* Shapes */\n.PaginationItem-module_shape-rounded__UttZK {\n border-radius: 4px;\n}\n\n.PaginationItem-module_shape-circular__maeDw {\n border-radius: 50%;\n}\n\n/* Variants */\n.PaginationItem-module_variant-text__tlyX0.PaginationItem-module_selected__HrXZ7 {\n background-color: color-mix(\n in srgb,\n var(--lb-color-primary) 12%,\n transparent\n );\n color: var(--lb-color-primary);\n font-weight: 600;\n}\n\n.PaginationItem-module_variant-outlined__sukDY {\n border: 1px solid rgba(0, 0, 0, 0.23);\n}\n\n.PaginationItem-module_variant-outlined__sukDY:hover:not(.PaginationItem-module_disabled__pjZg5) {\n border-color: rgba(0, 0, 0, 0.87);\n background-color: rgba(0, 0, 0, 0.04);\n}\n\n.PaginationItem-module_variant-outlined__sukDY.PaginationItem-module_selected__HrXZ7 {\n background-color: color-mix(\n in srgb,\n var(--lb-color-primary) 12%,\n transparent\n );\n color: var(--lb-color-primary);\n border-color: var(--lb-color-primary);\n font-weight: 600;\n}\n\n/* States */\n.PaginationItem-module_disabled__pjZg5 {\n opacity: 0.38;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n/* Navigation buttons */\n.PaginationItem-module_navigation__9oiE2 {\n min-width: auto;\n}\n\n.PaginationItem-module_icon__f5p0K {\n width: 20px;\n height: 20px;\n fill: currentColor;\n}\n\n.PaginationItem-module_size-small__EL1RS .PaginationItem-module_icon__f5p0K {\n width: 18px;\n height: 18px;\n}\n\n.PaginationItem-module_size-large__gFIDd .PaginationItem-module_icon__f5p0K {\n width: 22px;\n height: 22px;\n}\n";
465
466
  var styles$1 = {"item":"PaginationItem-module_item__pRz10","button":"PaginationItem-module_button__vvMNc","disabled":"PaginationItem-module_disabled__pjZg5","ellipsis":"PaginationItem-module_ellipsis__O3uKM","size-small":"PaginationItem-module_size-small__EL1RS","size-medium":"PaginationItem-module_size-medium__BhNiF","size-large":"PaginationItem-module_size-large__gFIDd","shape-circular":"PaginationItem-module_shape-circular__maeDw","shape-rounded":"PaginationItem-module_shape-rounded__UttZK","variant-text":"PaginationItem-module_variant-text__tlyX0","selected":"PaginationItem-module_selected__HrXZ7","variant-outlined":"PaginationItem-module_variant-outlined__sukDY","navigation":"PaginationItem-module_navigation__9oiE2","icon":"PaginationItem-module_icon__f5p0K"};
466
467
  styleInject(css_248z$1);
467
468
 
@@ -471,7 +472,8 @@ const iconSizeMap = {
471
472
  medium: "md",
472
473
  large: "lg",
473
474
  };
474
- const PaginationItem = React__default.forwardRef(({ page, type, selected = false, disabled = false, shape = "rounded", size = "medium", variant = "text", className, ...props }, ref) => {
475
+ const PaginationItem = React__default.forwardRef(({ page, type, selected = false, disabled = false, shape = "rounded", size: sizeProp = "medium", variant = "text", className, ...props }, ref) => {
476
+ const size = toLegacySize(sizeProp);
475
477
  // Ellipsis are not interactive
476
478
  if (type === "start-ellipsis" || type === "end-ellipsis") {
477
479
  // Use ASCII ellipsis to keep output portable across environments
@@ -510,14 +512,14 @@ const PaginationItem = React__default.forwardRef(({ page, type, selected = false
510
512
  };
511
513
  const classes = classNames$1(styles$1.item, styles$1.button, styles$1[`size-${size}`], styles$1[`shape-${shape}`], styles$1[`variant-${variant}`], selected && styles$1.selected, disabled && styles$1.disabled, isNavigationButton && styles$1.navigation, className);
512
514
  return (jsxRuntimeExports.jsx("button", { ref: ref, type: "button", className: classes, disabled: disabled, "aria-label": type === "first"
513
- ? "Go to first page"
515
+ ? "Ir a la primera página"
514
516
  : type === "last"
515
- ? "Go to last page"
517
+ ? "Ir a la última página"
516
518
  : type === "next"
517
- ? "Go to next page"
519
+ ? "Página siguiente"
518
520
  : type === "previous"
519
- ? "Go to previous page"
520
- : `Go to page ${page}`, "aria-current": selected ? "true" : undefined, ...props, children: getButtonContent() }));
521
+ ? "Página anterior"
522
+ : `Página ${page}`, "aria-current": selected ? "page" : undefined, ...props, children: getButtonContent() }));
521
523
  });
522
524
  PaginationItem.displayName = "PaginationItem";
523
525
 
@@ -600,7 +602,8 @@ const usePagination = (props) => {
600
602
  }
601
603
  return items;
602
604
  };
603
- const Pagination = React__default.forwardRef(({ count = 1, page: controlledPage, defaultPage = 1, onChange, disabled = false, hideNextButton = false, hidePrevButton = false, showFirstButton = false, showLastButton = false, boundaryCount = 1, siblingCount = 1, shape = "rounded", size = "medium", variant = "text", renderItem, className, ...props }, ref) => {
605
+ const Pagination = React__default.forwardRef(({ count = 1, page: controlledPage, defaultPage = 1, onChange, onPageChange, "aria-label": ariaLabel = "Paginación", disabled = false, hideNextButton = false, hidePrevButton = false, showFirstButton = false, showLastButton = false, boundaryCount = 1, siblingCount = 1, shape = "rounded", size: sizeProp = "medium", variant = "text", renderItem, className, ...props }, ref) => {
606
+ const size = toLegacySize(sizeProp);
604
607
  const [page, setPage] = React__default.useState(defaultPage);
605
608
  const currentPage = controlledPage ?? page;
606
609
  const handleClick = (event, value) => {
@@ -610,6 +613,7 @@ const Pagination = React__default.forwardRef(({ count = 1, page: controlledPage,
610
613
  if (onChange) {
611
614
  onChange(event, value);
612
615
  }
616
+ onPageChange?.(value);
613
617
  };
614
618
  const items = usePagination({
615
619
  count,
@@ -622,7 +626,7 @@ const Pagination = React__default.forwardRef(({ count = 1, page: controlledPage,
622
626
  hidePrevButton,
623
627
  });
624
628
  const classes = classNames(styles.root, className);
625
- return (jsxRuntimeExports.jsx("nav", { ref: ref, className: classes, ...props, children: jsxRuntimeExports.jsx("ul", { className: styles.ul, children: items.map((item, index) => {
629
+ return (jsxRuntimeExports.jsx("nav", { ref: ref, className: classes, "aria-label": ariaLabel, ...props, children: jsxRuntimeExports.jsx("ul", { className: styles.ul, children: items.map((item, index) => {
626
630
  const isDisabled = disabled || item.disabled;
627
631
  if (renderItem) {
628
632
  return (jsxRuntimeExports.jsx("li", { children: renderItem({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rubenpazch/pagination",
3
- "version": "3.0.0",
3
+ "version": "3.2.0",
4
4
  "description": "Pagination component",
5
5
  "private": false,
6
6
  "main": "dist/index.cjs.js",
@@ -20,7 +20,8 @@
20
20
  "**/*.css"
21
21
  ],
22
22
  "dependencies": {
23
- "@rubenpazch/icons": "6.0.0"
23
+ "@rubenpazch/icons": "6.2.0",
24
+ "@rubenpazch/shared": "5.2.0"
24
25
  },
25
26
  "exports": {
26
27
  ".": {
@@ -32,31 +33,37 @@
32
33
  "peerDependencies": {
33
34
  "react": "^19.0.0",
34
35
  "react-dom": "^19.0.0",
35
- "@rubenpazch/tokens": "0.1.0"
36
+ "@rubenpazch/tokens": "0.4.0"
36
37
  },
37
38
  "devDependencies": {
38
- "@rollup/plugin-commonjs": "^28.0.2",
39
- "@rollup/plugin-node-resolve": "^16.0.0",
40
- "@rollup/plugin-typescript": "^12.1.2",
41
- "@testing-library/react": "^16.1.0",
39
+ "@rollup/plugin-commonjs": "^29.0.3",
40
+ "@rollup/plugin-node-resolve": "^16.0.3",
41
+ "@rollup/plugin-typescript": "^12.3.0",
42
+ "@testing-library/react": "^16.3.3",
42
43
  "@types/jest": "^30.0.0",
43
- "@types/react": "^19.0.2",
44
- "@types/react-dom": "^19.0.2",
45
- "autoprefixer": "^10.4.14",
44
+ "@types/react": "^19.2.18",
45
+ "@types/react-dom": "^19.2.5",
46
+ "autoprefixer": "^10.5.4",
46
47
  "identity-obj-proxy": "^3.0.0",
47
- "jest": "^30.2.0",
48
- "jest-environment-jsdom": "^30.2.0",
49
- "postcss": "^8.4.24",
50
- "rollup": "^4.53.5",
51
- "rollup-plugin-dts": "^6.1.1",
48
+ "jest": "^30.5.0",
49
+ "jest-environment-jsdom": "^30.5.0",
50
+ "postcss": "^8.5.26",
51
+ "rollup": "^4.63.1",
52
+ "rollup-plugin-dts": "^6.5.1",
52
53
  "rollup-plugin-postcss": "^4.0.2",
53
- "rollup-plugin-typescript2": "^0.36.0",
54
- "typescript": "^5.7.3",
54
+ "rollup-plugin-typescript2": "^0.37.0",
55
+ "typescript": "^6.0.3",
55
56
  "@rubenpazch/typescript-config": "3.0.0"
56
57
  },
57
58
  "publishConfig": {
58
59
  "access": "public"
59
60
  },
61
+ "lbyte": {
62
+ "categoria": "navegacion",
63
+ "resumen": "Paginación con variantes, tamaños y formas; incluye PaginationItem.",
64
+ "usarCuando": "Listados paginados en el servidor (tablas, resultados de búsqueda).",
65
+ "evitarCuando": "Pocas páginas que caben en una sola vista."
66
+ },
60
67
  "scripts": {
61
68
  "build": "rollup -c",
62
69
  "test": "jest --passWithNoTests"