wimui 0.63.2 → 0.63.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_root_1nbrn_29`,t=`_header_1nbrn_45`,n=`_headerLeft_1nbrn_55`,r=`_filename_1nbrn_61`,i=`_viewToggle_1nbrn_69`,a=`_viewBtn_1nbrn_75`,o=`_active_1nbrn_87`,s=`_headerActions_1nbrn_101`,c=`_iconButton_1nbrn_107`,l=`_copied_1nbrn_131`,u=`_actionButton_1nbrn_137`,d=`_applyButton_1nbrn_157`,f=`_applying_1nbrn_166`,p=`_applied_1nbrn_170`,m=`_spin_1nbrn_179`,h=`_rejectButton_1nbrn_187`,g=`_body_1nbrn_196`,_=`_unified_1nbrn_201`,v=`_row_1nbrn_206`,y=`_added_1nbrn_209`,b=`_removed_1nbrn_212`,x=`_split_1nbrn_219`,S=`_splitPane_1nbrn_223`,C=`_splitDivider_1nbrn_228`,w=`_splitCell_1nbrn_233`,T=`_empty_1nbrn_243`,E=`_lineNum_1nbrn_253`,D=`_prefix_1nbrn_268`,O=`_lineContent_1nbrn_283`,k={root:e,header:t,headerLeft:n,filename:r,viewToggle:i,viewBtn:a,active:o,headerActions:s,iconButton:c,copied:l,actionButton:u,applyButton:d,applying:f,applied:p,spin:m,"code-spin":`_code-spin_1nbrn_1`,rejectButton:h,body:g,unified:_,row:v,added:y,removed:b,split:x,splitPane:S,splitDivider:C,splitCell:w,empty:T,lineNum:E,prefix:D,lineContent:O};exports.actionButton=u,exports.active=o,exports.added=y,exports.applied=p,exports.applyButton=d,exports.applying=f,exports.body=g,exports.copied=l,exports.default=k,exports.empty=T,exports.filename=r,exports.header=t,exports.headerActions=s,exports.headerLeft=n,exports.iconButton=c,exports.lineContent=O,exports.lineNum=E,exports.prefix=D,exports.rejectButton=h,exports.removed=b,exports.root=e,exports.row=v,exports.spin=m,exports.split=x,exports.splitCell=w,exports.splitDivider=C,exports.splitPane=S,exports.unified=_,exports.viewBtn=a,exports.viewToggle=i;
2
+ var e=`_root_ykmne_29`,t=`_header_ykmne_45`,n=`_headerLeft_ykmne_55`,r=`_filename_ykmne_61`,i=`_viewToggle_ykmne_69`,a=`_viewBtn_ykmne_75`,o=`_active_ykmne_87`,s=`_headerActions_ykmne_101`,c=`_iconButton_ykmne_107`,l=`_copied_ykmne_131`,u=`_actionButton_ykmne_137`,d=`_applyButton_ykmne_157`,f=`_applying_ykmne_166`,p=`_applied_ykmne_170`,m=`_spin_ykmne_179`,h=`_rejectButton_ykmne_187`,g=`_body_ykmne_196`,_=`_unified_ykmne_201`,v=`_row_ykmne_206`,y=`_added_ykmne_209`,b=`_removed_ykmne_212`,x=`_split_ykmne_219`,S=`_splitPane_ykmne_223`,C=`_splitDivider_ykmne_228`,w=`_splitCell_ykmne_233`,T=`_empty_ykmne_243`,E=`_lineNum_ykmne_253`,D=`_prefix_ykmne_268`,O=`_lineContent_ykmne_283`,k={root:e,header:t,headerLeft:n,filename:r,viewToggle:i,viewBtn:a,active:o,headerActions:s,iconButton:c,copied:l,actionButton:u,applyButton:d,applying:f,applied:p,spin:m,"code-spin":`_code-spin_ykmne_1`,rejectButton:h,body:g,unified:_,row:v,added:y,removed:b,split:x,splitPane:S,splitDivider:C,splitCell:w,empty:T,lineNum:E,prefix:D,lineContent:O};exports.actionButton=u,exports.active=o,exports.added=y,exports.applied=p,exports.applyButton=d,exports.applying=f,exports.body=g,exports.copied=l,exports.default=k,exports.empty=T,exports.filename=r,exports.header=t,exports.headerActions=s,exports.headerLeft=n,exports.iconButton=c,exports.lineContent=O,exports.lineNum=E,exports.prefix=D,exports.rejectButton=h,exports.removed=b,exports.root=e,exports.row=v,exports.spin=m,exports.split=x,exports.splitCell=w,exports.splitDivider=C,exports.splitPane=S,exports.unified=_,exports.viewBtn=a,exports.viewToggle=i;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/ai/CodeDiffViewer/code-diff-viewer.module.scss
3
- var e = "_root_1nbrn_29", t = "_header_1nbrn_45", n = "_headerLeft_1nbrn_55", r = "_filename_1nbrn_61", i = "_viewToggle_1nbrn_69", a = "_viewBtn_1nbrn_75", o = "_active_1nbrn_87", s = "_headerActions_1nbrn_101", c = "_iconButton_1nbrn_107", l = "_copied_1nbrn_131", u = "_actionButton_1nbrn_137", d = "_applyButton_1nbrn_157", f = "_applying_1nbrn_166", p = "_applied_1nbrn_170", m = "_spin_1nbrn_179", h = "_rejectButton_1nbrn_187", g = "_body_1nbrn_196", _ = "_unified_1nbrn_201", v = "_row_1nbrn_206", y = "_added_1nbrn_209", b = "_removed_1nbrn_212", x = "_split_1nbrn_219", S = "_splitPane_1nbrn_223", C = "_splitDivider_1nbrn_228", w = "_splitCell_1nbrn_233", T = "_empty_1nbrn_243", E = "_lineNum_1nbrn_253", D = "_prefix_1nbrn_268", O = "_lineContent_1nbrn_283", k = {
3
+ var e = "_root_ykmne_29", t = "_header_ykmne_45", n = "_headerLeft_ykmne_55", r = "_filename_ykmne_61", i = "_viewToggle_ykmne_69", a = "_viewBtn_ykmne_75", o = "_active_ykmne_87", s = "_headerActions_ykmne_101", c = "_iconButton_ykmne_107", l = "_copied_ykmne_131", u = "_actionButton_ykmne_137", d = "_applyButton_ykmne_157", f = "_applying_ykmne_166", p = "_applied_ykmne_170", m = "_spin_ykmne_179", h = "_rejectButton_ykmne_187", g = "_body_ykmne_196", _ = "_unified_ykmne_201", v = "_row_ykmne_206", y = "_added_ykmne_209", b = "_removed_ykmne_212", x = "_split_ykmne_219", S = "_splitPane_ykmne_223", C = "_splitDivider_ykmne_228", w = "_splitCell_ykmne_233", T = "_empty_ykmne_243", E = "_lineNum_ykmne_253", D = "_prefix_ykmne_268", O = "_lineContent_ykmne_283", k = {
4
4
  root: e,
5
5
  header: t,
6
6
  headerLeft: n,
@@ -16,7 +16,7 @@ var e = "_root_1nbrn_29", t = "_header_1nbrn_45", n = "_headerLeft_1nbrn_55", r
16
16
  applying: f,
17
17
  applied: p,
18
18
  spin: m,
19
- "code-spin": "_code-spin_1nbrn_1",
19
+ "code-spin": "_code-spin_ykmne_1",
20
20
  rejectButton: h,
21
21
  body: g,
22
22
  unified: _,
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../overlay/Portal/Portal.cjs"),i=require("../../overlay/FocusTrap/FocusTrap.cjs"),a=require("../../form/Button/Button.cjs"),o=require("./tour.module.cjs"),s=require("../../_internal/observeMove.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("classnames");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d=16;function f(e){let t=getComputedStyle(e);return`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`}async function p(e){let t=document.fonts;if(t&&typeof t.load==`function`){try{await t.load(f(e))}catch{}for(;t.status===`loading`;)await new Promise(e=>{t.addEventListener(`loadingdone`,()=>e(),{once:!0})})}}function m(e){let t=document.fonts;return!t||typeof t.load!=`function`?!1:t.status===`loading`||typeof t.check==`function`&&!t.check(f(e))}function h(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.width)===Math.round(t.width)&&Math.round(e.height)===Math.round(t.height)}function g(e){return e.top>=d&&e.bottom<=window.innerHeight-d&&e.left>=d&&e.right<=window.innerWidth-d}var _=({steps:e,open:d,onClose:f,onFinish:_})=>{let{t:v}=t.useWimTranslation(n.commonNs),[y,b]=(0,c.useState)(0),[x,S]=(0,c.useState)(null),C=e[y],w=C?.target;(0,c.useLayoutEffect)(()=>{if(!d||!w){S(null);return}let e=!1,t=t=>{e||S(e=>t?e&&h(e,t)?e:t:null)},n=()=>{let e=document.querySelector(w);if(!e){t(null);return}g(e.getBoundingClientRect())||e.scrollIntoView({block:`center`,inline:`nearest`}),t(e.getBoundingClientRect())},r=()=>{let e=document.querySelector(w);t(e?e.getBoundingClientRect():null)},i,a=()=>{window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0);let e=document.querySelector(w);e&&(i=s.observeMove(e,r))},o=async()=>{let t=document.querySelector(w);t&&await p(t),!e&&(n(),a())},c=document.querySelector(w);return c&&m(c)?o():(n(),a()),()=>{e=!0,window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0),i?.()}},[d,y,w]);let T=(0,c.useId)(),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=d&&!!C&&!!x;if((0,c.useEffect)(()=>{if(!O)return;let e=E.current;e&&!e.contains(document.activeElement)&&D.current?.focus()},[O,y]),(0,c.useEffect)(()=>{if(!d)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),f())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[d,f]),!d||!C)return null;let k=()=>{y<e.length-1?b(y+1):(_?_():f(),b(0))},A=()=>{y>0&&b(y-1)},j={},M=C.placement||`bottom`;if(x){let e=window.innerWidth,t=Math.min(300,e-32),n=M;if(e<640&&(n===`left`||n===`right`)&&(n=`bottom`),M=n,n===`top`||n===`bottom`){let r=x.left+x.width/2,i=t/2+16,a=e-t/2-16;r=i>a?e/2:Math.max(i,Math.min(a,r)),j.left=r,n===`top`?(j.top=x.top-12,j.transform=`translate(-50%, -100%)`):(j.top=x.bottom+12,j.transform=`translateX(-50%)`)}else n===`left`?(j.left=x.left-12,j.top=x.top+x.height/2,j.transform=`translate(-100%, -50%)`):n===`right`&&(j.left=x.right+12,j.top=x.top+x.height/2,j.transform=`translateY(-50%)`)}return(0,u.jsx)(r.Portal,{children:(0,u.jsx)(i.FocusTrap,{initialFocus:!1,children:(0,u.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":C.title,"aria-describedby":x?T:void 0,children:[x&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:o.default.highlight,style:{top:x.top-4,left:x.left-4,width:x.width+8,height:x.height+8}}),(0,u.jsx)(`div`,{ref:E,className:(0,l.default)(`wim-tour`,o.default.bubble),"data-placement":M,style:j,children:(0,u.jsxs)(`div`,{className:o.default.inner,children:[(0,u.jsx)(`h3`,{className:o.default.title,children:C.title}),(0,u.jsx)(`p`,{id:T,className:o.default.description,children:C.description}),(0,u.jsxs)(`div`,{className:o.default.footer,children:[(0,u.jsxs)(`span`,{className:o.default.progress,children:[y+1,` / `,e.length]}),(0,u.jsxs)(`div`,{className:o.default.buttons,children:[y>0&&(0,u.jsx)(a.Button,{size:`sm`,variant:`outline`,onClick:A,children:v(`action.back`)}),(0,u.jsx)(a.Button,{ref:D,size:`sm`,variant:`solid`,onClick:k,children:y===e.length-1?v(`action.finish`):v(`action.next`)})]})]})]})})]}),(0,u.jsx)(`div`,{className:o.default.mask,onClick:f,role:`button`,tabIndex:0,"aria-label":v(`a11y.close_tour`),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&f()}})]})})})};exports.Tour=_;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../overlay/Portal/Portal.cjs"),i=require("../../overlay/FocusTrap/FocusTrap.cjs"),a=require("../../form/Button/Button.cjs"),o=require("./tour.module.cjs"),s=require("../../_internal/observeMove.cjs");let c=require("react");c=e.__toESM(c,1);let l=require("classnames");l=e.__toESM(l,1);let u=require("react/jsx-runtime");var d=16;function f(e){let t=getComputedStyle(e);return`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`}async function p(e){let t=document.fonts;if(t&&typeof t.load==`function`){try{await t.load(f(e))}catch{}for(;t.status===`loading`;)await new Promise(e=>{t.addEventListener(`loadingdone`,()=>e(),{once:!0})})}}function m(e){let t=document.fonts;return!t||typeof t.load!=`function`?!1:t.status===`loading`||typeof t.check==`function`&&!t.check(f(e))}function h(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.width)===Math.round(t.width)&&Math.round(e.height)===Math.round(t.height)}function g(e){return e.top>=d&&e.bottom<=window.innerHeight-d&&e.left>=d&&e.right<=window.innerWidth-d}var _=({steps:e,open:d,onClose:f,onFinish:_})=>{let{t:v}=t.useWimTranslation(n.commonNs),[y,b]=(0,c.useState)(0),[x,S]=(0,c.useState)(null),C=e[y],w=C?.target;(0,c.useLayoutEffect)(()=>{if(!d||!w){S(null);return}let e=!1,t=t=>{e||S(e=>t?e&&h(e,t)?e:t:null)},n=()=>{let e=document.querySelector(w);if(!e){t(null);return}g(e.getBoundingClientRect())||e.scrollIntoView({block:`center`,inline:`nearest`}),t(e.getBoundingClientRect())},r=()=>{let e=document.querySelector(w);t(e?e.getBoundingClientRect():null)},i,a=()=>{window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0);let e=document.querySelector(w);e&&(i=s.observeMove(e,r))},o=async()=>{let t=document.querySelector(w);t&&await p(t),!e&&(n(),a())},c=document.querySelector(w);return c&&m(c)?o():(n(),a()),()=>{e=!0,window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0),i?.()}},[d,y,w]);let T=(0,c.useId)(),E=(0,c.useRef)(null),D=(0,c.useRef)(null),O=d&&!!C&&!!x;if((0,c.useEffect)(()=>{if(!O)return;let e=E.current;e&&!e.contains(document.activeElement)&&D.current?.focus()},[O,y]),(0,c.useEffect)(()=>{if(!d)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),f())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[d,f]),!d||!C)return null;let k=()=>{y<e.length-1?b(y+1):(_?_():f(),b(0))},A=()=>{y>0&&b(y-1)},j={},M=C.placement||`bottom`;if(x){let e=window.innerWidth,t=Math.min(300,e-32),n=M;if(e<640&&(n===`left`||n===`right`)&&(n=`bottom`),M=n,n===`top`||n===`bottom`){let r=x.left+x.width/2,i=t/2+16,a=e-t/2-16;r=i>a?e/2:Math.max(i,Math.min(a,r)),j.left=r,n===`top`?(j.top=x.top-12,j.transform=`translate(-50%, -100%)`):(j.top=x.bottom+12,j.transform=`translateX(-50%)`)}else n===`left`?(j.left=x.left-12,j.top=x.top+x.height/2,j.transform=`translate(-100%, -50%)`):n===`right`&&(j.left=x.right+12,j.top=x.top+x.height/2,j.transform=`translateY(-50%)`)}return(0,u.jsx)(r.Portal,{children:(0,u.jsx)(i.FocusTrap,{initialFocus:!1,children:(0,u.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":C.title,"aria-describedby":x?T:void 0,children:[x&&(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(`div`,{className:o.default.highlight,style:{top:x.top-4,left:x.left-4,width:x.width+8,height:x.height+8}}),(0,u.jsx)(`div`,{ref:E,className:(0,l.default)(`wim-tour`,o.default.bubble),"data-placement":M,style:j,children:(0,u.jsxs)(`div`,{className:o.default.inner,children:[(0,u.jsx)(`h3`,{className:o.default.title,children:C.title}),(0,u.jsx)(`p`,{id:T,className:o.default.description,children:C.description}),(0,u.jsxs)(`div`,{className:o.default.footer,children:[(0,u.jsxs)(`span`,{className:o.default.progress,children:[y+1,` / `,e.length]}),(0,u.jsxs)(`div`,{className:o.default.buttons,children:[y>0&&(0,u.jsx)(a.Button,{size:`sm`,variant:`outline`,onClick:A,children:v(`action.back`)}),(0,u.jsx)(a.Button,{ref:D,size:`sm`,variant:`solid`,onClick:k,children:y===e.length-1?v(`action.finish`):v(`action.next`)})]})]})]})})]}),(0,u.jsx)(`div`,{className:o.default.mask,onClick:f,role:`button`,tabIndex:0,"aria-label":v(`a11y.close_tour`),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&f()}})]},y)})})};exports.Tour=_;
@@ -167,7 +167,7 @@ var S = ({ steps: g, open: _, onClose: S, onFinish: C }) => {
167
167
  (e.key === "Enter" || e.key === " ") && S();
168
168
  }
169
169
  })]
170
- })
170
+ }, T)
171
171
  }) });
172
172
  };
173
173
  //#endregion
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- var e=`_mask_q23ul_3`,t=`_highlight_q23ul_9`,n=`_bubble_q23ul_17`,r=`_inner_q23ul_27`,i=`_title_q23ul_30`,a=`_description_q23ul_35`,o=`_footer_q23ul_40`,s=`_progress_q23ul_45`,c=`_buttons_q23ul_49`,l={mask:e,highlight:t,bubble:n,inner:r,title:i,description:a,footer:o,progress:s,buttons:c};exports.bubble=n,exports.buttons=c,exports.default=l,exports.description=a,exports.footer=o,exports.highlight=t,exports.inner=r,exports.mask=e,exports.progress=s,exports.title=i;
2
+ var e=`_mask_15j7q_3`,t=`_highlight_15j7q_9`,n=`_bubble_15j7q_17`,r=`_inner_15j7q_27`,i=`_title_15j7q_30`,a=`_description_15j7q_35`,o=`_footer_15j7q_40`,s=`_progress_15j7q_45`,c=`_buttons_15j7q_49`,l={mask:e,highlight:t,bubble:n,inner:r,title:i,description:a,footer:o,progress:s,buttons:c};exports.bubble=n,exports.buttons=c,exports.default=l,exports.description=a,exports.footer=o,exports.highlight=t,exports.inner=r,exports.mask=e,exports.progress=s,exports.title=i;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  //#region src/components/feedback/Tour/tour.module.scss
3
- var e = "_mask_q23ul_3", t = "_highlight_q23ul_9", n = "_bubble_q23ul_17", r = "_inner_q23ul_27", i = "_title_q23ul_30", a = "_description_q23ul_35", o = "_footer_q23ul_40", s = "_progress_q23ul_45", c = "_buttons_q23ul_49", l = {
3
+ var e = "_mask_15j7q_3", t = "_highlight_15j7q_9", n = "_bubble_15j7q_17", r = "_inner_15j7q_27", i = "_title_15j7q_30", a = "_description_15j7q_35", o = "_footer_15j7q_40", s = "_progress_15j7q_45", c = "_buttons_15j7q_49", l = {
4
4
  mask: e,
5
5
  highlight: t,
6
6
  bubble: n,
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/style-utils.cjs"),n=require("./icon.module.cjs"),r=require("../../../icon/registry.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=[`danger`,`success`,`warning`,`info`,`primary`,`secondary`,`tertiary`,`disabled`],c=({name:e,component:i,size:c=`md`,color:l,spin:u,className:d,style:f,...p})=>{let m=i||(e?r.registeredIcons[e]:null);if(!m)return e&&r.warnUnregisteredIcon(e),null;let h=typeof l==`string`&&s.includes(l);return(0,o.jsx)(m,{style:!h&&l?{color:t.getColorValue(l),...f}:f,className:(0,a.default)(`wim-icon`,n.default.root,c&&n.default[`size-${c}`],h&&n.default[l],(u||e&&(e===`LoadingIcon`||e===`SpinnerIcon`))&&n.default.loading,d),...p})};exports.Icon=c;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../utilities/style-utils.cjs"),n=require("./icon.module.cjs"),r=require("../../../icon/registry.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=[`danger`,`success`,`warning`,`info`,`primary`,`secondary`,`tertiary`,`disabled`],c=({name:e,component:i,size:c=`md`,color:l,spin:u,className:d,style:f,...p})=>{let m=i||(e?r.registeredIcons[e]:null);if(!m)return e&&r.warnUnregisteredIcon(e),null;let h=typeof l==`string`&&s.includes(l),g=p[`aria-label`]!=null||p[`aria-labelledby`]!=null;return(0,o.jsx)(m,{"aria-hidden":!g||void 0,role:g?`img`:void 0,style:!h&&l?{color:t.getColorValue(l),...f}:f,className:(0,a.default)(`wim-icon`,n.default.root,c&&n.default[`size-${c}`],h&&n.default[l],(u||e&&(e===`LoadingIcon`||e===`SpinnerIcon`))&&n.default.loading,d),...p})};exports.Icon=c;
@@ -18,8 +18,10 @@ var o = [
18
18
  ], s = ({ name: s, component: c, size: l = "md", color: u, spin: d, className: f, style: p, ...m }) => {
19
19
  let h = c || (s ? n[s] : null);
20
20
  if (!h) return s && r(s), null;
21
- let g = typeof u == "string" && o.includes(u);
21
+ let g = typeof u == "string" && o.includes(u), _ = m["aria-label"] != null || m["aria-labelledby"] != null;
22
22
  return /* @__PURE__ */ a(h, {
23
+ "aria-hidden": !_ || void 0,
24
+ role: _ ? "img" : void 0,
23
25
  style: !g && u ? {
24
26
  color: e(u),
25
27
  ...p
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../../i18n/generated/common.cjs"),i=require("../../../icon/chevron-left.cjs"),a=require("../../../icon/chevron-right.cjs"),o=require("../../media/Icon/Icon.cjs"),s=require("../../form/Button/Button.cjs"),c=require("../../form/Input/Input.cjs"),l=require("../../form/Select/Select.cjs"),u=require("./pagination.module.cjs");let d=require("react");d=e.__toESM(d,1);let f=require("classnames");f=e.__toESM(f,1);let p=require("react/jsx-runtime");var m=d.default.forwardRef(({asChild:e=!1,className:n,children:r,page:i,isActive:a,...o},s)=>(0,p.jsx)(e?t.Root:`button`,{ref:s,type:e?void 0:`button`,className:(0,f.default)(u.default.button,n),"aria-current":a?`page`:void 0,...o,children:e?(0,p.jsx)(t.Slottable,{children:r}):r}));m.displayName=`PaginationPage`;var h=`...`,g=({total:e,pageSize:g=10,current:_=1,onChange:v,onPageSizeChange:y,siblingCount:b=1,className:x,asChild:S=!1,children:C,renderPage:w,hideOnSinglePage:T=!1,simple:E=!1,showSizeChanger:D=!1,pageSizeOptions:ee=[10,20,50,100],showTotal:O,showQuickJumper:k=!1,labels:A={},"aria-label":j,"aria-labelledby":M})=>{let{t:N}=n.useWimTranslation(r.commonNs),{prevPage:P=N(`a11y.go_to_prev_page`),nextPage:F=N(`a11y.go_to_next_page`),pageAriaLabel:I=e=>N(`a11y.go_to_page`,{page:String(e)}),itemsPerPage:L=N(`pagination.items_per_page`),goTo:R=N(`pagination.go_to`),go:z=N(`pagination.go`),pageSizeAriaLabel:B=N(`a11y.items_per_page`),jumpToPageAriaLabel:V=N(`a11y.jump_to_page`),navAriaLabel:H=N(`a11y.pagination_nav`)}=A,[U,W]=(0,d.useState)(g),[G,K]=(0,d.useState)(``),q=U,J=Math.ceil(e/q),Y=(0,d.useMemo)(()=>{if(b+5>=J)return Array.from({length:J},(e,t)=>t+1);let e=Math.max(_-b,1),t=Math.min(_+b,J),n=e>2,r=t<J-2,i=J;if(!n&&r){let e=3+2*b;return[...Array.from({length:e},(e,t)=>t+1),h,J]}if(n&&!r){let e=3+2*b;return[1,h,...Array.from({length:e},(t,n)=>J-e+n+1)]}return n&&r?[1,h,...Array.from({length:t-e+1},(t,n)=>e+n),h,i]:[]},[J,b,_]);if(T&&J<=1)return null;let X=e=>{e<1||e>J||e===_||v?.(e,q)},Z=e=>{W(e),y?.(e),v?.(1,e)},Q=()=>{let e=parseInt(G);!isNaN(e)&&e>=1&&e<=J&&(X(e),K(``))},te=e=>{e.key===`Enter`&&Q()},ne=(_-1)*q+1,re=Math.min(_*q,e),$=S?t.Root:`nav`,ie=e=>{let t={page:e,isActive:e===_,onClick:()=>X(e),"aria-label":I(e)};return w?w(e,t):(0,p.jsx)(m,{...t,children:e})};return E?(0,p.jsxs)($,{className:(0,f.default)(`wim-pagination`,u.default.root,u.default.simple,x),"aria-label":M?void 0:j??H,"aria-labelledby":M,children:[(0,p.jsx)(t.Slottable,{children:C}),(0,p.jsxs)(`ul`,{className:u.default.root,children:[(0,p.jsx)(`li`,{className:(0,f.default)(u.default.item,_===1&&u.default.disabled),children:(0,p.jsx)(`button`,{className:u.default.button,onClick:()=>X(_-1),disabled:_===1,"aria-label":P,children:(0,p.jsx)(o.Icon,{component:i.default,size:`sm`})})}),(0,p.jsx)(`li`,{className:(0,f.default)(u.default.item,u.default.simplePager),children:(0,p.jsxs)(`span`,{children:[_,` / `,J]})}),(0,p.jsx)(`li`,{className:(0,f.default)(u.default.item,_===J&&u.default.disabled),children:(0,p.jsx)(`button`,{className:u.default.button,onClick:()=>X(_+1),disabled:_===J,"aria-label":F,children:(0,p.jsx)(o.Icon,{component:a.default,size:`sm`})})})]})]}):(0,p.jsx)(`div`,{className:(0,f.default)(`wim-pagination`,u.default.container,x),children:(0,p.jsxs)(`div`,{className:u.default.wrapper,children:[O&&(0,p.jsx)(`div`,{className:u.default.total,children:O(e,[ne,re])}),(0,p.jsxs)($,{className:u.default.root,"aria-label":M?void 0:j??H,"aria-labelledby":M,children:[(0,p.jsx)(t.Slottable,{children:C}),(0,p.jsxs)(`ul`,{className:u.default.root,children:[(0,p.jsx)(`li`,{className:(0,f.default)(u.default.item,_===1&&u.default.disabled),children:(0,p.jsx)(`button`,{className:u.default.button,onClick:()=>X(_-1),disabled:_===1,"aria-label":P,children:(0,p.jsx)(o.Icon,{component:i.default,size:`sm`})})}),(0,p.jsx)(`li`,{className:(0,f.default)(u.default.item,u.default.mobileIndicator),children:(0,p.jsxs)(`span`,{children:[_,` / `,J]})}),Y.map((e,t)=>e===h?(0,p.jsx)(`li`,{className:(0,f.default)(u.default.item,u.default.ellipsis),"aria-hidden":`true`,children:h},`ellipsis-${t}`):(0,p.jsx)(`li`,{className:(0,f.default)(u.default.item,u.default.number,e===_&&u.default.active),children:ie(e)},e)),(0,p.jsx)(`li`,{className:(0,f.default)(u.default.item,_===J&&u.default.disabled),children:(0,p.jsx)(`button`,{className:u.default.button,onClick:()=>X(_+1),disabled:_===J,"aria-label":F,children:(0,p.jsx)(o.Icon,{component:a.default,size:`sm`})})})]})]}),D&&(0,p.jsx)(`div`,{className:u.default.sizeChanger,children:(0,p.jsx)(l.Select,{value:String(q),onChange:e=>Z(Number(e)),options:ee.map(e=>({label:`${e} ${L}`,value:String(e)})),width:`auto`,"aria-label":B})}),k&&(0,p.jsxs)(`div`,{className:u.default.quickJumper,children:[(0,p.jsx)(`span`,{children:R}),(0,p.jsx)(c.Input,{type:`number`,min:1,max:J,value:G,onChange:e=>K(e.target.value),onKeyDown:te,width:`60px`,"aria-label":V}),(0,p.jsx)(s.Button,{size:`sm`,variant:`outline`,onClick:Q,disabled:!G,children:z})]})]})})};exports.Pagination=g,exports.default=g,exports.PaginationPage=m;
2
+ const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../i18n/useWimTranslation.cjs"),r=require("../../../i18n/generated/common.cjs"),i=require("../../layout/VisuallyHidden/VisuallyHidden.cjs"),a=require("../../../icon/chevron-left.cjs"),o=require("../../../icon/chevron-right.cjs"),s=require("../../media/Icon/Icon.cjs"),ee=require("../../form/Button/Button.cjs"),te=require("../../form/Input/Input.cjs"),c=require("../../form/Select/Select.cjs"),l=require("./pagination.module.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("classnames");d=e.__toESM(d,1);let f=require("react/jsx-runtime");var p=u.default.forwardRef(({asChild:e=!1,className:n,children:r,page:i,isActive:a,...o},s)=>(0,f.jsx)(e?t.Root:`button`,{ref:s,type:e?void 0:`button`,className:(0,d.default)(l.default.button,n),"aria-current":a?`page`:void 0,...o,children:e?(0,f.jsx)(t.Slottable,{children:r}):r}));p.displayName=`PaginationPage`;var m=`...`,h=({total:e,pageSize:h=10,current:g=1,onChange:_,onPageSizeChange:v,siblingCount:y=1,className:b,asChild:x=!1,children:S,renderPage:C,hideOnSinglePage:w=!1,simple:ne=!1,showSizeChanger:re=!1,pageSizeOptions:T=[10,20,50,100],showTotal:E,showQuickJumper:D=!1,labels:O={},"aria-label":k,"aria-labelledby":A})=>{let{t:j}=n.useWimTranslation(r.commonNs),{prevPage:M=j(`a11y.go_to_prev_page`),nextPage:N=j(`a11y.go_to_next_page`),pageAriaLabel:P=e=>j(`a11y.go_to_page`,{page:String(e)}),itemsPerPage:F=j(`pagination.items_per_page`),goTo:I=j(`pagination.go_to`),go:L=j(`pagination.go`),pageSizeAriaLabel:R=j(`a11y.items_per_page`),jumpToPageAriaLabel:z=j(`a11y.jump_to_page`),navAriaLabel:B=j(`a11y.pagination_nav`),pageStatus:V=(e,t)=>j(`pagination.page_status`,{current:String(e),total:String(t)})}=O,[H,U]=(0,u.useState)(h),[W,G]=(0,u.useState)(``),K=H,q=Math.ceil(e/K),[J,Y]=(0,u.useState)(g),[ie,ae]=(0,u.useState)(``);g!==J&&(Y(g),ae(V(g,q)));let X=(0,f.jsx)(i.VisuallyHidden,{role:`status`,"aria-atomic":`true`,children:ie}),oe=(0,u.useMemo)(()=>{if(y+5>=q)return Array.from({length:q},(e,t)=>t+1);let e=Math.max(g-y,1),t=Math.min(g+y,q),n=e>2,r=t<q-2,i=q;if(!n&&r){let e=3+2*y;return[...Array.from({length:e},(e,t)=>t+1),m,q]}if(n&&!r){let e=3+2*y;return[1,m,...Array.from({length:e},(t,n)=>q-e+n+1)]}return n&&r?[1,m,...Array.from({length:t-e+1},(t,n)=>e+n),m,i]:[]},[q,y,g]);if(w&&q<=1)return null;let Z=e=>{e<1||e>q||e===g||_?.(e,K)},se=e=>{U(e),v?.(e),_?.(1,e)},Q=()=>{let e=parseInt(W);!isNaN(e)&&e>=1&&e<=q&&(Z(e),G(``))},ce=e=>{e.key===`Enter`&&Q()},le=(g-1)*K+1,ue=Math.min(g*K,e),$=x?t.Root:`nav`,de=e=>{let t={page:e,isActive:e===g,onClick:()=>Z(e),"aria-label":P(e)};return C?C(e,t):(0,f.jsx)(p,{...t,children:e})};return ne?(0,f.jsxs)($,{className:(0,d.default)(`wim-pagination`,l.default.root,l.default.simple,b),"aria-label":A?void 0:k??B,"aria-labelledby":A,children:[(0,f.jsx)(t.Slottable,{children:S}),X,(0,f.jsxs)(`ul`,{className:l.default.root,children:[(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,g===1&&l.default.disabled),children:(0,f.jsx)(`button`,{className:l.default.button,onClick:()=>Z(g-1),disabled:g===1,"aria-label":M,children:(0,f.jsx)(s.Icon,{component:a.default,size:`sm`})})}),(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,l.default.simplePager),children:(0,f.jsxs)(`span`,{children:[g,` / `,q]})}),(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,g===q&&l.default.disabled),children:(0,f.jsx)(`button`,{className:l.default.button,onClick:()=>Z(g+1),disabled:g===q,"aria-label":N,children:(0,f.jsx)(s.Icon,{component:o.default,size:`sm`})})})]})]}):(0,f.jsx)(`div`,{className:(0,d.default)(`wim-pagination`,l.default.container,b),children:(0,f.jsxs)(`div`,{className:l.default.wrapper,children:[E&&(0,f.jsx)(`div`,{className:l.default.total,children:E(e,[le,ue])}),(0,f.jsxs)($,{className:l.default.root,"aria-label":A?void 0:k??B,"aria-labelledby":A,children:[(0,f.jsx)(t.Slottable,{children:S}),X,(0,f.jsxs)(`ul`,{className:l.default.root,children:[(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,g===1&&l.default.disabled),children:(0,f.jsx)(`button`,{className:l.default.button,onClick:()=>Z(g-1),disabled:g===1,"aria-label":M,children:(0,f.jsx)(s.Icon,{component:a.default,size:`sm`})})}),(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,l.default.mobileIndicator),children:(0,f.jsxs)(`span`,{children:[g,` / `,q]})}),oe.map((e,t)=>e===m?(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,l.default.ellipsis),"aria-hidden":`true`,children:m},`ellipsis-${t}`):(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,l.default.number,e===g&&l.default.active),children:de(e)},e)),(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,g===q&&l.default.disabled),children:(0,f.jsx)(`button`,{className:l.default.button,onClick:()=>Z(g+1),disabled:g===q,"aria-label":N,children:(0,f.jsx)(s.Icon,{component:o.default,size:`sm`})})})]})]}),re&&(0,f.jsx)(`div`,{className:l.default.sizeChanger,children:(0,f.jsx)(c.Select,{value:String(K),onChange:e=>se(Number(e)),options:T.map(e=>({label:`${e} ${F}`,value:String(e)})),width:`auto`,"aria-label":R})}),D&&(0,f.jsxs)(`div`,{className:l.default.quickJumper,children:[(0,f.jsx)(`span`,{children:I}),(0,f.jsx)(te.Input,{type:`number`,min:1,max:q,value:W,onChange:e=>G(e.target.value),onKeyDown:ce,width:`60px`,"aria-label":z}),(0,f.jsx)(ee.Button,{size:`sm`,variant:`outline`,onClick:Q,disabled:!W,children:L})]})]})})};exports.Pagination=h,exports.default=h,exports.PaginationPage=p;
@@ -76,6 +76,8 @@ export interface PaginationProps {
76
76
  jumpToPageAriaLabel?: string;
77
77
  navAriaLabel?: string;
78
78
  totalLabel?: string;
79
+ /** Announced to screen readers when the page changes. Receives the current page and the page count. */
80
+ pageStatus?: (current: number, totalPages: number) => string;
79
81
  };
80
82
  /** Accessible name for the navigation landmark. Takes precedence over `labels.navAriaLabel`. */
81
83
  "aria-label"?: string;
@@ -2,222 +2,240 @@
2
2
  import { Root as e, Slottable as t } from "../../../node_modules/@radix-ui/react-slot/dist/index.js";
3
3
  import { useWimTranslation as n } from "../../../i18n/useWimTranslation.js";
4
4
  import { commonNs as r } from "../../../i18n/generated/common.js";
5
- import i from "../../../icon/chevron-left.js";
6
- import a from "../../../icon/chevron-right.js";
7
- import { Icon as o } from "../../media/Icon/Icon.js";
8
- import { Button as s } from "../../form/Button/Button.js";
9
- import { Input as c } from "../../form/Input/Input.js";
10
- import { Select as ee } from "../../form/Select/Select.js";
5
+ import { VisuallyHidden as i } from "../../layout/VisuallyHidden/VisuallyHidden.js";
6
+ import a from "../../../icon/chevron-left.js";
7
+ import o from "../../../icon/chevron-right.js";
8
+ import { Icon as s } from "../../media/Icon/Icon.js";
9
+ import { Button as c } from "../../form/Button/Button.js";
10
+ import { Input as ee } from "../../form/Input/Input.js";
11
+ import { Select as te } from "../../form/Select/Select.js";
11
12
  import l from "./pagination.module.js";
12
- import u, { useMemo as d, useState as f } from "react";
13
- import p from "classnames";
14
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
13
+ import u, { useMemo as ne, useState as d } from "react";
14
+ import f from "classnames";
15
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
15
16
  //#region src/components/navigation/Pagination/Pagination.tsx
16
- var g = u.forwardRef(({ asChild: n = !1, className: r, children: i, page: a, isActive: o, ...s }, c) => /* @__PURE__ */ m(n ? e : "button", {
17
+ var h = u.forwardRef(({ asChild: n = !1, className: r, children: i, page: a, isActive: o, ...s }, c) => /* @__PURE__ */ p(n ? e : "button", {
17
18
  ref: c,
18
19
  type: n ? void 0 : "button",
19
- className: p(l.button, r),
20
+ className: f(l.button, r),
20
21
  "aria-current": o ? "page" : void 0,
21
22
  ...s,
22
- children: n ? /* @__PURE__ */ m(t, { children: i }) : i
23
+ children: n ? /* @__PURE__ */ p(t, { children: i }) : i
23
24
  }));
24
- g.displayName = "PaginationPage";
25
- var _ = "...", v = ({ total: u, pageSize: v = 10, current: y = 1, onChange: b, onPageSizeChange: x, siblingCount: S = 1, className: C, asChild: w = !1, children: T, renderPage: E, hideOnSinglePage: te = !1, simple: ne = !1, showSizeChanger: D = !1, pageSizeOptions: O = [
25
+ h.displayName = "PaginationPage";
26
+ var g = "...", _ = ({ total: u, pageSize: _ = 10, current: v = 1, onChange: y, onPageSizeChange: re, siblingCount: b = 1, className: x, asChild: S = !1, children: C, renderPage: w, hideOnSinglePage: T = !1, simple: ie = !1, showSizeChanger: ae = !1, pageSizeOptions: E = [
26
27
  10,
27
28
  20,
28
29
  50,
29
30
  100
30
- ], showTotal: k, showQuickJumper: A = !1, labels: j = {}, "aria-label": M, "aria-labelledby": N }) => {
31
- let { t: P } = n(r), { prevPage: F = P("a11y.go_to_prev_page"), nextPage: I = P("a11y.go_to_next_page"), pageAriaLabel: L = (e) => P("a11y.go_to_page", { page: String(e) }), itemsPerPage: R = P("pagination.items_per_page"), goTo: z = P("pagination.go_to"), go: B = P("pagination.go"), pageSizeAriaLabel: V = P("a11y.items_per_page"), jumpToPageAriaLabel: H = P("a11y.jump_to_page"), navAriaLabel: U = P("a11y.pagination_nav") } = j, [W, G] = f(v), [K, q] = f(""), J = W, Y = Math.ceil(u / J), X = d(() => {
32
- if (S + 5 >= Y) return Array.from({ length: Y }, (e, t) => t + 1);
33
- let e = Math.max(y - S, 1), t = Math.min(y + S, Y), n = e > 2, r = t < Y - 2, i = Y;
31
+ ], showTotal: D, showQuickJumper: O = !1, labels: k = {}, "aria-label": A, "aria-labelledby": j }) => {
32
+ let { t: M } = n(r), { prevPage: N = M("a11y.go_to_prev_page"), nextPage: P = M("a11y.go_to_next_page"), pageAriaLabel: F = (e) => M("a11y.go_to_page", { page: String(e) }), itemsPerPage: I = M("pagination.items_per_page"), goTo: L = M("pagination.go_to"), go: R = M("pagination.go"), pageSizeAriaLabel: z = M("a11y.items_per_page"), jumpToPageAriaLabel: B = M("a11y.jump_to_page"), navAriaLabel: V = M("a11y.pagination_nav"), pageStatus: H = (e, t) => M("pagination.page_status", {
33
+ current: String(e),
34
+ total: String(t)
35
+ }) } = k, [U, W] = d(_), [G, K] = d(""), q = U, J = Math.ceil(u / q), [oe, se] = d(v), [ce, le] = d("");
36
+ v !== oe && (se(v), le(H(v, J)));
37
+ let Y = /* @__PURE__ */ p(i, {
38
+ role: "status",
39
+ "aria-atomic": "true",
40
+ children: ce
41
+ }), X = ne(() => {
42
+ if (b + 5 >= J) return Array.from({ length: J }, (e, t) => t + 1);
43
+ let e = Math.max(v - b, 1), t = Math.min(v + b, J), n = e > 2, r = t < J - 2, i = J;
34
44
  if (!n && r) {
35
- let e = 3 + 2 * S;
45
+ let e = 3 + 2 * b;
36
46
  return [
37
47
  ...Array.from({ length: e }, (e, t) => t + 1),
38
- _,
39
- Y
48
+ g,
49
+ J
40
50
  ];
41
51
  }
42
52
  if (n && !r) {
43
- let e = 3 + 2 * S;
53
+ let e = 3 + 2 * b;
44
54
  return [
45
55
  1,
46
- _,
47
- ...Array.from({ length: e }, (t, n) => Y - e + n + 1)
56
+ g,
57
+ ...Array.from({ length: e }, (t, n) => J - e + n + 1)
48
58
  ];
49
59
  }
50
60
  return n && r ? [
51
61
  1,
52
- _,
62
+ g,
53
63
  ...Array.from({ length: t - e + 1 }, (t, n) => e + n),
54
- _,
64
+ g,
55
65
  i
56
66
  ] : [];
57
67
  }, [
58
- Y,
59
- S,
60
- y
68
+ J,
69
+ b,
70
+ v
61
71
  ]);
62
- if (te && Y <= 1) return null;
72
+ if (T && J <= 1) return null;
63
73
  let Z = (e) => {
64
- e < 1 || e > Y || e === y || b?.(e, J);
65
- }, re = (e) => {
66
- G(e), x?.(e), b?.(1, e);
74
+ e < 1 || e > J || e === v || y?.(e, q);
75
+ }, ue = (e) => {
76
+ W(e), re?.(e), y?.(1, e);
67
77
  }, Q = () => {
68
- let e = parseInt(K);
69
- !isNaN(e) && e >= 1 && e <= Y && (Z(e), q(""));
70
- }, ie = (e) => {
78
+ let e = parseInt(G);
79
+ !isNaN(e) && e >= 1 && e <= J && (Z(e), K(""));
80
+ }, de = (e) => {
71
81
  e.key === "Enter" && Q();
72
- }, ae = (y - 1) * J + 1, oe = Math.min(y * J, u), $ = w ? e : "nav", se = (e) => {
82
+ }, fe = (v - 1) * q + 1, pe = Math.min(v * q, u), $ = S ? e : "nav", me = (e) => {
73
83
  let t = {
74
84
  page: e,
75
- isActive: e === y,
85
+ isActive: e === v,
76
86
  onClick: () => Z(e),
77
- "aria-label": L(e)
87
+ "aria-label": F(e)
78
88
  };
79
- return E ? E(e, t) : /* @__PURE__ */ m(g, {
89
+ return w ? w(e, t) : /* @__PURE__ */ p(h, {
80
90
  ...t,
81
91
  children: e
82
92
  });
83
93
  };
84
- return ne ? /* @__PURE__ */ h($, {
85
- className: p("wim-pagination", l.root, l.simple, C),
86
- "aria-label": N ? void 0 : M ?? U,
87
- "aria-labelledby": N,
88
- children: [/* @__PURE__ */ m(t, { children: T }), /* @__PURE__ */ h("ul", {
89
- className: l.root,
90
- children: [
91
- /* @__PURE__ */ m("li", {
92
- className: p(l.item, y === 1 && l.disabled),
93
- children: /* @__PURE__ */ m("button", {
94
- className: l.button,
95
- onClick: () => Z(y - 1),
96
- disabled: y === 1,
97
- "aria-label": F,
98
- children: /* @__PURE__ */ m(o, {
99
- component: i,
100
- size: "sm"
94
+ return ie ? /* @__PURE__ */ m($, {
95
+ className: f("wim-pagination", l.root, l.simple, x),
96
+ "aria-label": j ? void 0 : A ?? V,
97
+ "aria-labelledby": j,
98
+ children: [
99
+ /* @__PURE__ */ p(t, { children: C }),
100
+ Y,
101
+ /* @__PURE__ */ m("ul", {
102
+ className: l.root,
103
+ children: [
104
+ /* @__PURE__ */ p("li", {
105
+ className: f(l.item, v === 1 && l.disabled),
106
+ children: /* @__PURE__ */ p("button", {
107
+ className: l.button,
108
+ onClick: () => Z(v - 1),
109
+ disabled: v === 1,
110
+ "aria-label": N,
111
+ children: /* @__PURE__ */ p(s, {
112
+ component: a,
113
+ size: "sm"
114
+ })
101
115
  })
102
- })
103
- }),
104
- /* @__PURE__ */ m("li", {
105
- className: p(l.item, l.simplePager),
106
- children: /* @__PURE__ */ h("span", { children: [
107
- y,
108
- " / ",
109
- Y
110
- ] })
111
- }),
112
- /* @__PURE__ */ m("li", {
113
- className: p(l.item, y === Y && l.disabled),
114
- children: /* @__PURE__ */ m("button", {
115
- className: l.button,
116
- onClick: () => Z(y + 1),
117
- disabled: y === Y,
118
- "aria-label": I,
119
- children: /* @__PURE__ */ m(o, {
120
- component: a,
121
- size: "sm"
116
+ }),
117
+ /* @__PURE__ */ p("li", {
118
+ className: f(l.item, l.simplePager),
119
+ children: /* @__PURE__ */ m("span", { children: [
120
+ v,
121
+ " / ",
122
+ J
123
+ ] })
124
+ }),
125
+ /* @__PURE__ */ p("li", {
126
+ className: f(l.item, v === J && l.disabled),
127
+ children: /* @__PURE__ */ p("button", {
128
+ className: l.button,
129
+ onClick: () => Z(v + 1),
130
+ disabled: v === J,
131
+ "aria-label": P,
132
+ children: /* @__PURE__ */ p(s, {
133
+ component: o,
134
+ size: "sm"
135
+ })
122
136
  })
123
137
  })
124
- })
125
- ]
126
- })]
127
- }) : /* @__PURE__ */ m("div", {
128
- className: p("wim-pagination", l.container, C),
129
- children: /* @__PURE__ */ h("div", {
138
+ ]
139
+ })
140
+ ]
141
+ }) : /* @__PURE__ */ p("div", {
142
+ className: f("wim-pagination", l.container, x),
143
+ children: /* @__PURE__ */ m("div", {
130
144
  className: l.wrapper,
131
145
  children: [
132
- k && /* @__PURE__ */ m("div", {
146
+ D && /* @__PURE__ */ p("div", {
133
147
  className: l.total,
134
- children: k(u, [ae, oe])
148
+ children: D(u, [fe, pe])
135
149
  }),
136
- /* @__PURE__ */ h($, {
150
+ /* @__PURE__ */ m($, {
137
151
  className: l.root,
138
- "aria-label": N ? void 0 : M ?? U,
139
- "aria-labelledby": N,
140
- children: [/* @__PURE__ */ m(t, { children: T }), /* @__PURE__ */ h("ul", {
141
- className: l.root,
142
- children: [
143
- /* @__PURE__ */ m("li", {
144
- className: p(l.item, y === 1 && l.disabled),
145
- children: /* @__PURE__ */ m("button", {
146
- className: l.button,
147
- onClick: () => Z(y - 1),
148
- disabled: y === 1,
149
- "aria-label": F,
150
- children: /* @__PURE__ */ m(o, {
151
- component: i,
152
- size: "sm"
152
+ "aria-label": j ? void 0 : A ?? V,
153
+ "aria-labelledby": j,
154
+ children: [
155
+ /* @__PURE__ */ p(t, { children: C }),
156
+ Y,
157
+ /* @__PURE__ */ m("ul", {
158
+ className: l.root,
159
+ children: [
160
+ /* @__PURE__ */ p("li", {
161
+ className: f(l.item, v === 1 && l.disabled),
162
+ children: /* @__PURE__ */ p("button", {
163
+ className: l.button,
164
+ onClick: () => Z(v - 1),
165
+ disabled: v === 1,
166
+ "aria-label": N,
167
+ children: /* @__PURE__ */ p(s, {
168
+ component: a,
169
+ size: "sm"
170
+ })
153
171
  })
154
- })
155
- }),
156
- /* @__PURE__ */ m("li", {
157
- className: p(l.item, l.mobileIndicator),
158
- children: /* @__PURE__ */ h("span", { children: [
159
- y,
160
- " / ",
161
- Y
162
- ] })
163
- }),
164
- X.map((e, t) => e === _ ? /* @__PURE__ */ m("li", {
165
- className: p(l.item, l.ellipsis),
166
- "aria-hidden": "true",
167
- children: _
168
- }, `ellipsis-${t}`) : /* @__PURE__ */ m("li", {
169
- className: p(l.item, l.number, e === y && l.active),
170
- children: se(e)
171
- }, e)),
172
- /* @__PURE__ */ m("li", {
173
- className: p(l.item, y === Y && l.disabled),
174
- children: /* @__PURE__ */ m("button", {
175
- className: l.button,
176
- onClick: () => Z(y + 1),
177
- disabled: y === Y,
178
- "aria-label": I,
179
- children: /* @__PURE__ */ m(o, {
180
- component: a,
181
- size: "sm"
172
+ }),
173
+ /* @__PURE__ */ p("li", {
174
+ className: f(l.item, l.mobileIndicator),
175
+ children: /* @__PURE__ */ m("span", { children: [
176
+ v,
177
+ " / ",
178
+ J
179
+ ] })
180
+ }),
181
+ X.map((e, t) => e === g ? /* @__PURE__ */ p("li", {
182
+ className: f(l.item, l.ellipsis),
183
+ "aria-hidden": "true",
184
+ children: g
185
+ }, `ellipsis-${t}`) : /* @__PURE__ */ p("li", {
186
+ className: f(l.item, l.number, e === v && l.active),
187
+ children: me(e)
188
+ }, e)),
189
+ /* @__PURE__ */ p("li", {
190
+ className: f(l.item, v === J && l.disabled),
191
+ children: /* @__PURE__ */ p("button", {
192
+ className: l.button,
193
+ onClick: () => Z(v + 1),
194
+ disabled: v === J,
195
+ "aria-label": P,
196
+ children: /* @__PURE__ */ p(s, {
197
+ component: o,
198
+ size: "sm"
199
+ })
182
200
  })
183
201
  })
184
- })
185
- ]
186
- })]
202
+ ]
203
+ })
204
+ ]
187
205
  }),
188
- D && /* @__PURE__ */ m("div", {
206
+ ae && /* @__PURE__ */ p("div", {
189
207
  className: l.sizeChanger,
190
- children: /* @__PURE__ */ m(ee, {
191
- value: String(J),
192
- onChange: (e) => re(Number(e)),
193
- options: O.map((e) => ({
194
- label: `${e} ${R}`,
208
+ children: /* @__PURE__ */ p(te, {
209
+ value: String(q),
210
+ onChange: (e) => ue(Number(e)),
211
+ options: E.map((e) => ({
212
+ label: `${e} ${I}`,
195
213
  value: String(e)
196
214
  })),
197
215
  width: "auto",
198
- "aria-label": V
216
+ "aria-label": z
199
217
  })
200
218
  }),
201
- A && /* @__PURE__ */ h("div", {
219
+ O && /* @__PURE__ */ m("div", {
202
220
  className: l.quickJumper,
203
221
  children: [
204
- /* @__PURE__ */ m("span", { children: z }),
205
- /* @__PURE__ */ m(c, {
222
+ /* @__PURE__ */ p("span", { children: L }),
223
+ /* @__PURE__ */ p(ee, {
206
224
  type: "number",
207
225
  min: 1,
208
- max: Y,
209
- value: K,
210
- onChange: (e) => q(e.target.value),
211
- onKeyDown: ie,
226
+ max: J,
227
+ value: G,
228
+ onChange: (e) => K(e.target.value),
229
+ onKeyDown: de,
212
230
  width: "60px",
213
- "aria-label": H
231
+ "aria-label": B
214
232
  }),
215
- /* @__PURE__ */ m(s, {
233
+ /* @__PURE__ */ p(c, {
216
234
  size: "sm",
217
235
  variant: "outline",
218
236
  onClick: Q,
219
- disabled: !K,
220
- children: B
237
+ disabled: !G,
238
+ children: R
221
239
  })
222
240
  ]
223
241
  })
@@ -226,4 +244,4 @@ var _ = "...", v = ({ total: u, pageSize: v = 10, current: y = 1, onChange: b, o
226
244
  });
227
245
  };
228
246
  //#endregion
229
- export { v as Pagination, v as default, g as PaginationPage };
247
+ export { _ as Pagination, _ as default, h as PaginationPage };