wimui 0.67.0 → 0.69.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/dist/components/_internal/InlineDisclosure.cjs +2 -0
- package/dist/components/_internal/InlineDisclosure.d.ts +22 -0
- package/dist/components/_internal/InlineDisclosure.js +47 -0
- package/dist/components/_internal/inline-disclosure.module.cjs +2 -0
- package/dist/components/_internal/inline-disclosure.module.js +9 -0
- package/dist/components/_internal/useAnnounce.cjs +2 -0
- package/dist/components/_internal/useAnnounce.d.ts +39 -0
- package/dist/components/_internal/useAnnounce.js +41 -0
- package/dist/components/data-display/AvatarGroup/AvatarGroup.cjs +1 -1
- package/dist/components/data-display/AvatarGroup/AvatarGroup.d.ts +10 -3
- package/dist/components/data-display/AvatarGroup/AvatarGroup.js +55 -27
- package/dist/components/data-display/AvatarGroup/avatar-group.module.cjs +1 -1
- package/dist/components/data-display/AvatarGroup/avatar-group.module.js +8 -6
- package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
- package/dist/components/data-display/Carousel/Carousel.js +61 -65
- package/dist/components/data-display/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.js +78 -74
- package/dist/components/data-display/DataGrid/useFixedColumns.cjs +1 -1
- package/dist/components/data-display/DataGrid/useFixedColumns.d.ts +6 -1
- package/dist/components/data-display/DataGrid/useFixedColumns.js +22 -17
- package/dist/components/data-display/SelectionBar/SelectionBar.cjs +2 -0
- package/dist/components/data-display/SelectionBar/SelectionBar.d.ts +77 -0
- package/dist/components/data-display/SelectionBar/SelectionBar.js +68 -0
- package/dist/components/data-display/SelectionBar/selection-bar.module.cjs +2 -0
- package/dist/components/data-display/SelectionBar/selection-bar.module.js +10 -0
- package/dist/components/data-display/Table/table.module.cjs +1 -1
- package/dist/components/data-display/Table/table.module.js +1 -1
- package/dist/components/feedback/Snackbar/Snackbar.cjs +1 -1
- package/dist/components/feedback/Snackbar/Snackbar.js +8 -9
- package/dist/components/feedback/Toast/Toast.cjs +1 -1
- package/dist/components/feedback/Toast/Toast.js +60 -71
- package/dist/components/form/Cascader/Cascader.cjs +1 -1
- package/dist/components/form/Cascader/Cascader.js +4 -4
- package/dist/components/form/Combobox/Combobox.cjs +1 -1
- package/dist/components/form/Combobox/Combobox.js +11 -11
- package/dist/components/form/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/form/DatePicker/DatePicker.js +4 -4
- package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/form/FileUpload/FileUpload.js +13 -18
- package/dist/components/form/MultiSelect/MultiSelect.cjs +1 -1
- package/dist/components/form/MultiSelect/MultiSelect.js +66 -66
- package/dist/components/form/Select/Select.cjs +1 -1
- package/dist/components/form/Select/Select.js +114 -114
- package/dist/components/form/Transfer/Transfer.cjs +1 -1
- package/dist/components/form/Transfer/Transfer.js +84 -88
- package/dist/components/form/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/form/TreeSelect/TreeSelect.js +4 -4
- package/dist/components/layout/OverflowList/OverflowList.cjs +2 -0
- package/dist/components/layout/OverflowList/OverflowList.d.ts +81 -0
- package/dist/components/layout/OverflowList/OverflowList.js +85 -0
- package/dist/components/layout/OverflowList/getVisibleCount.cjs +2 -0
- package/dist/components/layout/OverflowList/getVisibleCount.d.ts +30 -0
- package/dist/components/layout/OverflowList/getVisibleCount.js +26 -0
- package/dist/components/layout/OverflowList/overflow-list.module.cjs +2 -0
- package/dist/components/layout/OverflowList/overflow-list.module.js +10 -0
- package/dist/components/layout/SimpleGrid/SimpleGrid.cjs +1 -1
- package/dist/components/layout/SimpleGrid/SimpleGrid.js +1 -1
- package/dist/components/layout/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/layout/Toolbar/Toolbar.d.ts +15 -0
- package/dist/components/layout/Toolbar/Toolbar.js +85 -60
- package/dist/components/layout/Toolbar/toolbar.module.cjs +1 -1
- package/dist/components/layout/Toolbar/toolbar.module.js +8 -6
- package/dist/components/media/Lightbox/Lightbox.cjs +1 -1
- package/dist/components/media/Lightbox/Lightbox.js +46 -47
- package/dist/components/navigation/Breadcrumb/Breadcrumb.cjs +1 -1
- package/dist/components/navigation/Breadcrumb/Breadcrumb.d.ts +12 -0
- package/dist/components/navigation/Breadcrumb/Breadcrumb.js +88 -53
- package/dist/components/navigation/Menubar/Menubar.cjs +1 -1
- package/dist/components/navigation/Menubar/Menubar.js +10 -10
- package/dist/components/navigation/Pagination/Pagination.cjs +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +110 -112
- package/dist/data-display-core.d.ts +1 -0
- package/dist/data-display.cjs +1 -1
- package/dist/data-display.js +2 -1
- package/dist/i18n/generated/components.d.ts +1 -1
- package/dist/i18n/generated/data-display.cjs +1 -1
- package/dist/i18n/generated/data-display.d.ts +1 -1
- package/dist/i18n/generated/data-display.js +30 -3
- package/dist/i18n/generated/keys.d.ts +3 -1
- package/dist/i18n/generated/layout.cjs +2 -0
- package/dist/i18n/generated/layout.d.ts +3 -0
- package/dist/i18n/generated/layout.js +12 -0
- package/dist/i18n/generated/navigation.cjs +2 -0
- package/dist/i18n/generated/navigation.d.ts +3 -0
- package/dist/i18n/generated/navigation.js +12 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +173 -171
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.ts +1 -0
- package/dist/layout.js +3 -2
- package/dist/llms-full.txt +58 -3
- package/dist/llms.txt +3 -1
- package/dist/locales/en/components.json +3 -1
- package/dist/locales/en/data-display.json +9 -0
- package/dist/locales/ja/components.json +3 -1
- package/dist/locales/ja/data-display.json +9 -0
- package/dist/locales/pt/components.json +3 -1
- package/dist/locales/pt/data-display.json +9 -0
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +38 -35
|
@@ -3,65 +3,100 @@ import { Root as e, Slottable as t } from "../../../node_modules/@radix-ui/react
|
|
|
3
3
|
import { useWimTranslation as n } from "../../../i18n/useWimTranslation.js";
|
|
4
4
|
import { commonNs as r } from "../../../i18n/generated/common.js";
|
|
5
5
|
import i from "../../../icon/chevron-right.js";
|
|
6
|
-
import
|
|
7
|
-
import o from "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import l from "
|
|
11
|
-
import
|
|
6
|
+
import a from "../../../icon/more-horizontal.js";
|
|
7
|
+
import { Icon as o } from "../../media/Icon/Icon.js";
|
|
8
|
+
import { InlineDisclosure as s } from "../../_internal/InlineDisclosure.js";
|
|
9
|
+
import { OverflowList as c } from "../../layout/OverflowList/OverflowList.js";
|
|
10
|
+
import { navigationNs as l } from "../../../i18n/generated/navigation.js";
|
|
11
|
+
import u from "./breadcrumb.module.js";
|
|
12
|
+
import { Link as d } from "../Link/Link.js";
|
|
13
|
+
import { forwardRef as f } from "react";
|
|
14
|
+
import p from "classnames";
|
|
15
|
+
import { jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
12
16
|
//#region src/components/navigation/Breadcrumb/Breadcrumb.tsx
|
|
13
|
-
var
|
|
14
|
-
let { t:
|
|
17
|
+
var g = f(({ items: f, separator: g, size: _ = "md", overflow: v = "wrap", moreLabel: y, className: b, ariaLabel: x, asChild: S, children: C, ...w }, T) => {
|
|
18
|
+
let { t: E } = n([r, l]), D = x ?? E("a11y.breadcrumb"), O = S ? e : "nav", k = /* @__PURE__ */ m(o, {
|
|
15
19
|
component: i,
|
|
16
|
-
size:
|
|
17
|
-
className:
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
size: _,
|
|
21
|
+
className: u.separatorIcon
|
|
22
|
+
}), A = (e, t) => {
|
|
23
|
+
let n = t === f.length - 1;
|
|
24
|
+
return /* @__PURE__ */ h("li", {
|
|
25
|
+
className: u.item,
|
|
26
|
+
children: [/* @__PURE__ */ m("div", {
|
|
27
|
+
className: u.content,
|
|
28
|
+
children: e.href && !n ? /* @__PURE__ */ m(d, {
|
|
29
|
+
href: e.href,
|
|
30
|
+
size: _,
|
|
31
|
+
priority: "secondary",
|
|
32
|
+
iconName: e.iconName,
|
|
33
|
+
className: u.link,
|
|
34
|
+
styles: { label: u.linkLabel },
|
|
35
|
+
children: e.label
|
|
36
|
+
}) : /* @__PURE__ */ h("span", {
|
|
37
|
+
className: p(u.label, n && u.current),
|
|
38
|
+
"aria-current": n ? "page" : void 0,
|
|
39
|
+
tabIndex: n ? 0 : void 0,
|
|
40
|
+
role: n ? "link" : void 0,
|
|
41
|
+
children: [e.iconName && /* @__PURE__ */ m(o, {
|
|
42
|
+
name: e.iconName,
|
|
43
|
+
size: _,
|
|
44
|
+
className: u.labelIcon
|
|
45
|
+
}), e.label]
|
|
46
|
+
})
|
|
47
|
+
}), !n && /* @__PURE__ */ m("span", {
|
|
48
|
+
className: u.separator,
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
children: g || k
|
|
51
|
+
})]
|
|
52
|
+
}, t);
|
|
53
|
+
};
|
|
54
|
+
return /* @__PURE__ */ h(O, {
|
|
55
|
+
ref: T,
|
|
56
|
+
"aria-label": D,
|
|
57
|
+
className: p("wim-breadcrumb", u.root, u[_], b),
|
|
23
58
|
onKeyDown: (e) => {
|
|
24
|
-
let t = e.currentTarget, n = Array.from(t.querySelectorAll(`.${
|
|
59
|
+
let t = e.currentTarget, n = Array.from(t.querySelectorAll(`.${u.link}, .${u.label}.${u.current}, button[aria-expanded]`)).filter((e) => !e.closest("[aria-hidden=\"true\"]")), r = n.indexOf(document.activeElement);
|
|
25
60
|
r !== -1 && (e.key === "ArrowRight" ? (e.preventDefault(), n[(r + 1) % n.length].focus()) : e.key === "ArrowLeft" && (e.preventDefault(), n[(r - 1 + n.length) % n.length].focus()));
|
|
26
61
|
},
|
|
27
|
-
...
|
|
28
|
-
children: [/* @__PURE__ */
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
children: f || C
|
|
59
|
-
})]
|
|
60
|
-
}, t);
|
|
62
|
+
...w,
|
|
63
|
+
children: [v === "collapse" ? /* @__PURE__ */ m(c, {
|
|
64
|
+
listElement: "ol",
|
|
65
|
+
collapseFrom: "middle",
|
|
66
|
+
minVisibleItems: Math.min(f.length, 2),
|
|
67
|
+
gap: "0",
|
|
68
|
+
items: f,
|
|
69
|
+
renderItem: (e, t) => A(e, t),
|
|
70
|
+
renderOverflow: (e) => /* @__PURE__ */ h("li", {
|
|
71
|
+
className: u.item,
|
|
72
|
+
children: [/* @__PURE__ */ m(s, {
|
|
73
|
+
trigger: /* @__PURE__ */ m(o, {
|
|
74
|
+
component: a,
|
|
75
|
+
size: _
|
|
76
|
+
}),
|
|
77
|
+
label: (y ?? ((e) => E("a11y.breadcrumb_more", { count: e })))(e.length),
|
|
78
|
+
children: e.map((e, t) => /* @__PURE__ */ m("li", { children: e.href ? /* @__PURE__ */ m(d, {
|
|
79
|
+
href: e.href,
|
|
80
|
+
size: _,
|
|
81
|
+
priority: "secondary",
|
|
82
|
+
iconName: e.iconName,
|
|
83
|
+
children: e.label
|
|
84
|
+
}) : /* @__PURE__ */ m("span", {
|
|
85
|
+
className: u.label,
|
|
86
|
+
children: e.label
|
|
87
|
+
}) }, t))
|
|
88
|
+
}), /* @__PURE__ */ m("span", {
|
|
89
|
+
className: u.separator,
|
|
90
|
+
"aria-hidden": "true",
|
|
91
|
+
children: g || k
|
|
92
|
+
})]
|
|
61
93
|
})
|
|
62
|
-
})
|
|
94
|
+
}) : /* @__PURE__ */ m("ol", {
|
|
95
|
+
className: u.list,
|
|
96
|
+
children: f.map((e, t) => A(e, t))
|
|
97
|
+
}), S ? /* @__PURE__ */ m(t, { children: C }) : null]
|
|
63
98
|
});
|
|
64
99
|
});
|
|
65
|
-
|
|
100
|
+
g.displayName = "Breadcrumb";
|
|
66
101
|
//#endregion
|
|
67
|
-
export {
|
|
102
|
+
export { g as Breadcrumb };
|
|
@@ -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("../../layout/Transition/Transition.cjs"),r=require("../../_internal/
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../layout/Transition/Transition.cjs"),r=require("../../_internal/useInlineFloating.cjs"),i=require("../../_internal/BaseListItem/BaseListItem.cjs"),a=require("./menubar.module.cjs");let o=require("react");o=e.__toESM(o,1);let s=require("classnames");s=e.__toESM(s,1);let c=require("react/jsx-runtime");var l=(0,o.createContext)(null),u=(0,o.createContext)(null),d=()=>{let e=(0,o.useContext)(l);if(!e)throw Error(`Menubar compound parts must be used within <Menubar>`);return e},f=()=>{let e=(0,o.useContext)(u);if(!e)throw Error(`Menubar.Trigger/Content/Item must be used within <Menubar.Menu>`);return e},p=o.default.forwardRef(({asChild:e=!1,className:n,children:r,onKeyDown:i,...u},d)=>{let[f,p]=(0,o.useState)(null),m=(0,o.useRef)(new Map),h=(0,o.useRef)(null),g=(0,o.useCallback)(e=>{h.current=e,typeof d==`function`?d(e):d&&(d.current=e)},[d]),_=(0,o.useCallback)((e,t)=>{t?m.current.set(e,t):m.current.delete(e)},[]),v=(0,o.useCallback)(()=>Array.from(m.current.keys()),[]),y=(0,o.useCallback)(e=>{m.current.get(e)?.focus()},[]);(0,o.useEffect)(()=>{if(!f)return;let e=e=>{h.current&&!h.current.contains(e.target)&&p(null)},t=e=>{e.key===`Escape`&&(p(null),f&&y(f))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[f,y]);let b=e=>{if(i?.(e),e.defaultPrevented)return;let t=v();if(t.length===0)return;let n=f??t.find(e=>m.current.get(e)===document.activeElement)??null;if(!n)return;let r=t.indexOf(n);if(!(r<0)){if(e.key===`ArrowRight`){e.preventDefault();let n=t[(r+1)%t.length];f&&p(n),y(n)}else if(e.key===`ArrowLeft`){e.preventDefault();let n=t[(r-1+t.length)%t.length];f&&p(n),y(n)}else if(e.key===`Home`){e.preventDefault();let n=t[0];f&&p(n),y(n)}else if(e.key===`End`){e.preventDefault();let n=t[t.length-1];f&&p(n),y(n)}}},x=(0,o.useMemo)(()=>({openMenuId:f,setOpenMenuId:p,registerTrigger:_,getTriggerIds:v,focusTrigger:y}),[f,_,v,y]),S=e?t.Root:`div`;return(0,c.jsx)(l.Provider,{value:x,children:(0,c.jsx)(S,{ref:g,role:`menubar`,className:(0,s.default)(`wim-menubar`,a.default.root,n),onKeyDown:b,...u,children:(0,c.jsx)(t.Slottable,{children:r})})})});p.displayName=`Menubar`;var m=o.default.forwardRef(({value:e,disabled:t=!1,className:n,children:r,...i},l)=>{let{openMenuId:f,setOpenMenuId:p,focusTrigger:m}=d(),h=(0,o.useId)(),[g,_]=(0,o.useState)(void 0),[v,y]=(0,o.useState)(void 0),b=g??`wim-menubar-trigger-${e}-${h}`,x=v??`wim-menubar-content-${e}-${h}`,S=f===e,C=()=>{t||p(e)},w=()=>{m(e),p(null)},T=()=>{t||p(S?null:e)},E=(0,o.useMemo)(()=>({menuId:e,triggerId:b,contentId:x,setTriggerIdOverride:_,setContentIdOverride:y,isOpen:S,open:C,close:w,toggle:T}),[e,b,x,S,t]);return(0,c.jsx)(u.Provider,{value:E,children:(0,c.jsx)(`div`,{ref:l,role:`none`,"data-disabled":t||void 0,className:(0,s.default)(a.default.menu,n),...i,children:r})})});m.displayName=`Menubar.Menu`;var h=o.default.forwardRef(({asChild:e=!1,className:n,children:r,onKeyDown:i,onMouseEnter:l,id:u,...p},m)=>{let{openMenuId:h,registerTrigger:g}=d(),{triggerId:_,contentId:v,isOpen:y,open:b,toggle:x,menuId:S,setTriggerIdOverride:C}=f();(0,o.useEffect)(()=>(C(u),()=>C(void 0)),[u,C]);let w=!!p.disabled,T=(0,o.useCallback)(e=>{g(S,e),typeof m==`function`?m(e):m&&(m.current=e)},[g,S,m]),E=e=>{i?.(e),!(e.defaultPrevented||w)&&(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),b())},D=e=>{l?.(e),h&&!w&&b()};return(0,c.jsx)(e?t.Root:`button`,{...p,ref:T,type:e?void 0:`button`,id:u??_,role:`menuitem`,"aria-haspopup":`menu`,"aria-expanded":y,"aria-controls":y?v:void 0,disabled:w,className:(0,s.default)(a.default.trigger,y&&a.default.triggerOpen,n),onClick:x,onKeyDown:E,onMouseEnter:D,children:(0,c.jsx)(t.Slottable,{children:r})})});h.displayName=`Menubar.Trigger`;var g=o.default.forwardRef(({align:e=`start`,className:t,children:i,id:l,"aria-labelledby":u,...d},p)=>{let{contentId:m,triggerId:h,isOpen:g,close:_,setContentIdOverride:v}=f();(0,o.useEffect)(()=>(v(l),()=>v(void 0)),[l,v]);let[y,b]=(0,o.useState)(-1),[x,S]=(0,o.useState)(g),C=(0,o.useRef)(null);g!==x&&(S(g),b(g?0:-1));let{setReference:w,setFloating:T,floatingProps:E}=r.useInlineFloating({open:g}),D=(0,o.useCallback)(e=>{C.current=e,T(e),w(e?.parentElement??null),typeof p==`function`?p(e):p&&(p.current=e)},[p,T,w]);(0,o.useEffect)(()=>{!g||y<0||Array.from(C.current?.querySelectorAll(`[role="menuitem"]:not([aria-disabled="true"])`)??[])[y]?.focus()},[y,g]);let O=e=>{let t=Array.from(C.current?.querySelectorAll(`[role="menuitem"]:not([aria-disabled="true"])`)??[]);if(t.length!==0)switch(e.key){case`ArrowDown`:e.preventDefault(),b(e=>e<t.length-1?e+1:0);break;case`ArrowUp`:e.preventDefault(),b(e=>e>0?e-1:t.length-1);break;case`Home`:e.preventDefault(),b(0);break;case`End`:e.preventDefault(),b(t.length-1);break;case`Tab`:_()}};return(0,c.jsx)(n.Transition,{...d,ref:D,show:g,preset:`fade`,id:l??m,role:`menu`,"aria-labelledby":u??h,className:(0,s.default)(a.default.content,e===`end`?a.default.alignEnd:a.default.alignStart,t),onKeyDown:O,"data-side":E[`data-side`],style:{...d.style,...E.style},children:i})});g.displayName=`Menubar.Content`;var _=o.default.forwardRef(({children:e,onSelect:t,onClick:n,disabled:r=!1,className:o,...l},u)=>{let{close:d}=f(),p=e=>{r||(e.stopPropagation(),t?.(),n?.(e),d())};return(0,c.jsx)(i.BaseListItem,{...l,ref:u,className:(0,s.default)(a.default.item,o),disabled:r,role:`menuitem`,tabIndex:-1,onClick:p,onKeyDown:e=>{!r&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),p(e))},children:e})});_.displayName=`Menubar.Item`;var v=o.default.forwardRef(({className:e,...t},n)=>(0,c.jsx)(`div`,{ref:n,role:`separator`,className:(0,s.default)(a.default.separator,e),...t}));v.displayName=`Menubar.Separator`;var y=p;y.Menu=m,y.Trigger=h,y.Content=g,y.Item=_,y.Separator=v,exports.Menubar=y,exports.default=y;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Root as e, Slottable as t } from "../../../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
3
3
|
import { Transition as n } from "../../layout/Transition/Transition.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { useInlineFloating as r } from "../../_internal/useInlineFloating.js";
|
|
5
|
+
import { BaseListItem as i } from "../../_internal/BaseListItem/BaseListItem.js";
|
|
6
6
|
import a from "./menubar.module.js";
|
|
7
7
|
import o, { createContext as s, useCallback as c, useContext as l, useEffect as u, useId as d, useMemo as f, useRef as p, useState as m } from "react";
|
|
8
8
|
import h from "classnames";
|
|
@@ -155,12 +155,12 @@ var C = o.forwardRef(({ asChild: n = !1, className: r, children: i, onKeyDown: o
|
|
|
155
155
|
});
|
|
156
156
|
});
|
|
157
157
|
C.displayName = "Menubar.Trigger";
|
|
158
|
-
var w = o.forwardRef(({ align: e = "start", className: t, children:
|
|
158
|
+
var w = o.forwardRef(({ align: e = "start", className: t, children: i, id: o, "aria-labelledby": s, ...l }, d) => {
|
|
159
159
|
let { contentId: f, triggerId: _, isOpen: v, close: y, setContentIdOverride: x } = b();
|
|
160
160
|
u(() => (x(o), () => x(void 0)), [o, x]);
|
|
161
161
|
let [S, C] = m(-1), [w, T] = m(v), E = p(null);
|
|
162
162
|
v !== w && (T(v), C(v ? 0 : -1));
|
|
163
|
-
let { setReference: D, setFloating: O, floatingProps: k } =
|
|
163
|
+
let { setReference: D, setFloating: O, floatingProps: k } = r({ open: v }), A = c((e) => {
|
|
164
164
|
E.current = e, O(e), D(e?.parentElement ?? null), typeof d == "function" ? d(e) : d && (d.current = e);
|
|
165
165
|
}, [
|
|
166
166
|
d,
|
|
@@ -203,24 +203,24 @@ var w = o.forwardRef(({ align: e = "start", className: t, children: r, id: o, "a
|
|
|
203
203
|
...l.style,
|
|
204
204
|
...k.style
|
|
205
205
|
},
|
|
206
|
-
children:
|
|
206
|
+
children: i
|
|
207
207
|
});
|
|
208
208
|
});
|
|
209
209
|
w.displayName = "Menubar.Content";
|
|
210
|
-
var T = o.forwardRef(({ children: e, onSelect: t, onClick: n, disabled:
|
|
210
|
+
var T = o.forwardRef(({ children: e, onSelect: t, onClick: n, disabled: r = !1, className: o, ...s }, c) => {
|
|
211
211
|
let { close: l } = b(), u = (e) => {
|
|
212
|
-
|
|
212
|
+
r || (e.stopPropagation(), t?.(), n?.(e), l());
|
|
213
213
|
};
|
|
214
|
-
return /* @__PURE__ */ g(
|
|
214
|
+
return /* @__PURE__ */ g(i, {
|
|
215
215
|
...s,
|
|
216
216
|
ref: c,
|
|
217
217
|
className: h(a.item, o),
|
|
218
|
-
disabled:
|
|
218
|
+
disabled: r,
|
|
219
219
|
role: "menuitem",
|
|
220
220
|
tabIndex: -1,
|
|
221
221
|
onClick: u,
|
|
222
222
|
onKeyDown: (e) => {
|
|
223
|
-
!
|
|
223
|
+
!r && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), u(e));
|
|
224
224
|
},
|
|
225
225
|
children: e
|
|
226
226
|
});
|
|
@@ -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("
|
|
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"),ee=require("../../_internal/useAnnounce.cjs"),te=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:ne,siblingCount:v=1,className:y,asChild:re=!1,children:b,renderPage:x,hideOnSinglePage:ie=!1,simple:S=!1,showSizeChanger:C=!1,pageSizeOptions:w=[10,20,50,100],showTotal:T,showQuickJumper:E=!1,labels:D={},"aria-label":O,"aria-labelledby":k})=>{let{t:A}=n.useWimTranslation(r.commonNs),{prevPage:j=A(`a11y.go_to_prev_page`),nextPage:M=A(`a11y.go_to_next_page`),pageAriaLabel:N=e=>A(`a11y.go_to_page`,{page:String(e)}),itemsPerPage:P=A(`pagination.items_per_page`),goTo:F=A(`pagination.go_to`),go:I=A(`pagination.go`),pageSizeAriaLabel:L=A(`a11y.items_per_page`),jumpToPageAriaLabel:R=A(`a11y.jump_to_page`),navAriaLabel:z=A(`a11y.pagination_nav`),pageStatus:B=(e,t)=>A(`pagination.page_status`,{current:String(e),total:String(t)})}=D,[V,H]=(0,u.useState)(h),[U,W]=(0,u.useState)(``),G=V,K=Math.ceil(e/G),{announce:q,region:J}=ee.useAnnounce(),Y=(0,u.useRef)(g);(0,u.useEffect)(()=>{Y.current!==g&&(Y.current=g,q(B(g,K)))},[g]);let ae=(0,u.useMemo)(()=>{if(v+5>=K)return Array.from({length:K},(e,t)=>t+1);let e=Math.max(g-v,1),t=Math.min(g+v,K),n=e>2,r=t<K-2,i=K;if(!n&&r){let e=3+2*v;return[...Array.from({length:e},(e,t)=>t+1),m,K]}if(n&&!r){let e=3+2*v;return[1,m,...Array.from({length:e},(t,n)=>K-e+n+1)]}return n&&r?[1,m,...Array.from({length:t-e+1},(t,n)=>e+n),m,i]:[]},[K,v,g]);if(ie&&K<=1)return null;let X=e=>{e<1||e>K||e===g||_?.(e,G)},oe=e=>{H(e),ne?.(e),_?.(1,e)},Z=()=>{let e=parseInt(U);!isNaN(e)&&e>=1&&e<=K&&(X(e),W(``))},se=e=>{e.key===`Enter`&&Z()},ce=(g-1)*G+1,le=Math.min(g*G,e),Q=re?t.Root:`nav`,$=e=>{let t={page:e,isActive:e===g,onClick:()=>X(e),"aria-label":N(e)};return x?x(e,t):(0,f.jsx)(p,{...t,children:e})};return S?(0,f.jsxs)(Q,{className:(0,d.default)(`wim-pagination`,l.default.root,l.default.simple,y),"aria-label":k?void 0:O??z,"aria-labelledby":k,children:[(0,f.jsx)(t.Slottable,{children:b}),J,(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:()=>X(g-1),disabled:g===1,"aria-label":j,children:(0,f.jsx)(o.Icon,{component:i.default,size:`sm`})})}),(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,l.default.simplePager),children:(0,f.jsxs)(`span`,{children:[g,` / `,K]})}),(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,g===K&&l.default.disabled),children:(0,f.jsx)(`button`,{className:l.default.button,onClick:()=>X(g+1),disabled:g===K,"aria-label":M,children:(0,f.jsx)(o.Icon,{component:a.default,size:`sm`})})})]})]}):(0,f.jsx)(`div`,{className:(0,d.default)(`wim-pagination`,l.default.container,y),children:(0,f.jsxs)(`div`,{className:l.default.wrapper,children:[T&&(0,f.jsx)(`div`,{className:l.default.total,children:T(e,[ce,le])}),(0,f.jsxs)(Q,{className:l.default.root,"aria-label":k?void 0:O??z,"aria-labelledby":k,children:[(0,f.jsx)(t.Slottable,{children:b}),J,(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:()=>X(g-1),disabled:g===1,"aria-label":j,children:(0,f.jsx)(o.Icon,{component:i.default,size:`sm`})})}),(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,l.default.mobileIndicator),children:(0,f.jsxs)(`span`,{children:[g,` / `,K]})}),ae.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:$(e)},e)),(0,f.jsx)(`li`,{className:(0,d.default)(l.default.item,g===K&&l.default.disabled),children:(0,f.jsx)(`button`,{className:l.default.button,onClick:()=>X(g+1),disabled:g===K,"aria-label":M,children:(0,f.jsx)(o.Icon,{component:a.default,size:`sm`})})})]})]}),C&&(0,f.jsx)(`div`,{className:l.default.sizeChanger,children:(0,f.jsx)(te.Select,{value:String(G),onChange:e=>oe(Number(e)),options:w.map(e=>({label:`${e} ${P}`,value:String(e)})),width:`auto`,"aria-label":L})}),E&&(0,f.jsxs)(`div`,{className:l.default.quickJumper,children:[(0,f.jsx)(`span`,{children:F}),(0,f.jsx)(c.Input,{type:`number`,min:1,max:K,value:U,onChange:e=>W(e.target.value),onKeyDown:se,width:`60px`,"aria-label":R}),(0,f.jsx)(s.Button,{size:`sm`,variant:`outline`,onClick:Z,disabled:!U,children:I})]})]})})};exports.Pagination=h,exports.default=h,exports.PaginationPage=p;
|
|
@@ -2,135 +2,133 @@
|
|
|
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
|
|
6
|
-
import a from "../../../icon/chevron-
|
|
7
|
-
import o from "
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Select as
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { jsx as
|
|
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 { useAnnounce as l } from "../../_internal/useAnnounce.js";
|
|
11
|
+
import { Select as ee } from "../../form/Select/Select.js";
|
|
12
|
+
import u from "./pagination.module.js";
|
|
13
|
+
import d, { useEffect as te, useMemo as f, useRef as ne, useState as p } from "react";
|
|
14
|
+
import m from "classnames";
|
|
15
|
+
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
16
16
|
//#region src/components/navigation/Pagination/Pagination.tsx
|
|
17
|
-
var
|
|
17
|
+
var _ = d.forwardRef(({ asChild: n = !1, className: r, children: i, page: a, isActive: o, ...s }, c) => /* @__PURE__ */ h(n ? e : "button", {
|
|
18
18
|
ref: c,
|
|
19
19
|
type: n ? void 0 : "button",
|
|
20
|
-
className:
|
|
20
|
+
className: m(u.button, r),
|
|
21
21
|
"aria-current": o ? "page" : void 0,
|
|
22
22
|
...s,
|
|
23
|
-
children: n ? /* @__PURE__ */
|
|
23
|
+
children: n ? /* @__PURE__ */ h(t, { children: i }) : i
|
|
24
24
|
}));
|
|
25
|
-
|
|
26
|
-
var
|
|
25
|
+
_.displayName = "PaginationPage";
|
|
26
|
+
var v = "...", y = ({ total: d, pageSize: y = 10, current: b = 1, onChange: x, onPageSizeChange: re, siblingCount: S = 1, className: C, asChild: ie = !1, children: w, renderPage: T, hideOnSinglePage: ae = !1, simple: E = !1, showSizeChanger: D = !1, pageSizeOptions: O = [
|
|
27
27
|
10,
|
|
28
28
|
20,
|
|
29
29
|
50,
|
|
30
30
|
100
|
|
31
|
-
], showTotal:
|
|
31
|
+
], showTotal: k, showQuickJumper: oe = !1, labels: se = {}, "aria-label": A, "aria-labelledby": j }) => {
|
|
32
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
33
|
current: String(e),
|
|
34
34
|
total: String(t)
|
|
35
|
-
}) } =
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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;
|
|
35
|
+
}) } = se, [U, W] = p(y), [G, K] = p(""), q = U, J = Math.ceil(d / q), { announce: ce, region: Y } = l(), X = ne(b);
|
|
36
|
+
te(() => {
|
|
37
|
+
X.current !== b && (X.current = b, ce(H(b, J)));
|
|
38
|
+
}, [b]);
|
|
39
|
+
let le = f(() => {
|
|
40
|
+
if (S + 5 >= J) return Array.from({ length: J }, (e, t) => t + 1);
|
|
41
|
+
let e = Math.max(b - S, 1), t = Math.min(b + S, J), n = e > 2, r = t < J - 2, i = J;
|
|
44
42
|
if (!n && r) {
|
|
45
|
-
let e = 3 + 2 *
|
|
43
|
+
let e = 3 + 2 * S;
|
|
46
44
|
return [
|
|
47
45
|
...Array.from({ length: e }, (e, t) => t + 1),
|
|
48
|
-
|
|
46
|
+
v,
|
|
49
47
|
J
|
|
50
48
|
];
|
|
51
49
|
}
|
|
52
50
|
if (n && !r) {
|
|
53
|
-
let e = 3 + 2 *
|
|
51
|
+
let e = 3 + 2 * S;
|
|
54
52
|
return [
|
|
55
53
|
1,
|
|
56
|
-
|
|
54
|
+
v,
|
|
57
55
|
...Array.from({ length: e }, (t, n) => J - e + n + 1)
|
|
58
56
|
];
|
|
59
57
|
}
|
|
60
58
|
return n && r ? [
|
|
61
59
|
1,
|
|
62
|
-
|
|
60
|
+
v,
|
|
63
61
|
...Array.from({ length: t - e + 1 }, (t, n) => e + n),
|
|
64
|
-
|
|
62
|
+
v,
|
|
65
63
|
i
|
|
66
64
|
] : [];
|
|
67
65
|
}, [
|
|
68
66
|
J,
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
S,
|
|
68
|
+
b
|
|
71
69
|
]);
|
|
72
|
-
if (
|
|
70
|
+
if (ae && J <= 1) return null;
|
|
73
71
|
let Z = (e) => {
|
|
74
|
-
e < 1 || e > J || e ===
|
|
72
|
+
e < 1 || e > J || e === b || x?.(e, q);
|
|
75
73
|
}, ue = (e) => {
|
|
76
|
-
W(e), re?.(e),
|
|
74
|
+
W(e), re?.(e), x?.(1, e);
|
|
77
75
|
}, Q = () => {
|
|
78
76
|
let e = parseInt(G);
|
|
79
77
|
!isNaN(e) && e >= 1 && e <= J && (Z(e), K(""));
|
|
80
78
|
}, de = (e) => {
|
|
81
79
|
e.key === "Enter" && Q();
|
|
82
|
-
}, fe = (
|
|
80
|
+
}, fe = (b - 1) * q + 1, pe = Math.min(b * q, d), $ = ie ? e : "nav", me = (e) => {
|
|
83
81
|
let t = {
|
|
84
82
|
page: e,
|
|
85
|
-
isActive: e ===
|
|
83
|
+
isActive: e === b,
|
|
86
84
|
onClick: () => Z(e),
|
|
87
85
|
"aria-label": F(e)
|
|
88
86
|
};
|
|
89
|
-
return
|
|
87
|
+
return T ? T(e, t) : /* @__PURE__ */ h(_, {
|
|
90
88
|
...t,
|
|
91
89
|
children: e
|
|
92
90
|
});
|
|
93
91
|
};
|
|
94
|
-
return
|
|
95
|
-
className:
|
|
92
|
+
return E ? /* @__PURE__ */ g($, {
|
|
93
|
+
className: m("wim-pagination", u.root, u.simple, C),
|
|
96
94
|
"aria-label": j ? void 0 : A ?? V,
|
|
97
95
|
"aria-labelledby": j,
|
|
98
96
|
children: [
|
|
99
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ h(t, { children: w }),
|
|
100
98
|
Y,
|
|
101
|
-
/* @__PURE__ */
|
|
102
|
-
className:
|
|
99
|
+
/* @__PURE__ */ g("ul", {
|
|
100
|
+
className: u.root,
|
|
103
101
|
children: [
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
className:
|
|
106
|
-
children: /* @__PURE__ */
|
|
107
|
-
className:
|
|
108
|
-
onClick: () => Z(
|
|
109
|
-
disabled:
|
|
102
|
+
/* @__PURE__ */ h("li", {
|
|
103
|
+
className: m(u.item, b === 1 && u.disabled),
|
|
104
|
+
children: /* @__PURE__ */ h("button", {
|
|
105
|
+
className: u.button,
|
|
106
|
+
onClick: () => Z(b - 1),
|
|
107
|
+
disabled: b === 1,
|
|
110
108
|
"aria-label": N,
|
|
111
|
-
children: /* @__PURE__ */
|
|
112
|
-
component:
|
|
109
|
+
children: /* @__PURE__ */ h(o, {
|
|
110
|
+
component: i,
|
|
113
111
|
size: "sm"
|
|
114
112
|
})
|
|
115
113
|
})
|
|
116
114
|
}),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
className:
|
|
119
|
-
children: /* @__PURE__ */
|
|
120
|
-
|
|
115
|
+
/* @__PURE__ */ h("li", {
|
|
116
|
+
className: m(u.item, u.simplePager),
|
|
117
|
+
children: /* @__PURE__ */ g("span", { children: [
|
|
118
|
+
b,
|
|
121
119
|
" / ",
|
|
122
120
|
J
|
|
123
121
|
] })
|
|
124
122
|
}),
|
|
125
|
-
/* @__PURE__ */
|
|
126
|
-
className:
|
|
127
|
-
children: /* @__PURE__ */
|
|
128
|
-
className:
|
|
129
|
-
onClick: () => Z(
|
|
130
|
-
disabled:
|
|
123
|
+
/* @__PURE__ */ h("li", {
|
|
124
|
+
className: m(u.item, b === J && u.disabled),
|
|
125
|
+
children: /* @__PURE__ */ h("button", {
|
|
126
|
+
className: u.button,
|
|
127
|
+
onClick: () => Z(b + 1),
|
|
128
|
+
disabled: b === J,
|
|
131
129
|
"aria-label": P,
|
|
132
|
-
children: /* @__PURE__ */
|
|
133
|
-
component:
|
|
130
|
+
children: /* @__PURE__ */ h(o, {
|
|
131
|
+
component: a,
|
|
134
132
|
size: "sm"
|
|
135
133
|
})
|
|
136
134
|
})
|
|
@@ -138,63 +136,63 @@ var g = "...", _ = ({ total: u, pageSize: _ = 10, current: v = 1, onChange: y, o
|
|
|
138
136
|
]
|
|
139
137
|
})
|
|
140
138
|
]
|
|
141
|
-
}) : /* @__PURE__ */
|
|
142
|
-
className:
|
|
143
|
-
children: /* @__PURE__ */
|
|
144
|
-
className:
|
|
139
|
+
}) : /* @__PURE__ */ h("div", {
|
|
140
|
+
className: m("wim-pagination", u.container, C),
|
|
141
|
+
children: /* @__PURE__ */ g("div", {
|
|
142
|
+
className: u.wrapper,
|
|
145
143
|
children: [
|
|
146
|
-
|
|
147
|
-
className:
|
|
148
|
-
children:
|
|
144
|
+
k && /* @__PURE__ */ h("div", {
|
|
145
|
+
className: u.total,
|
|
146
|
+
children: k(d, [fe, pe])
|
|
149
147
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
className:
|
|
148
|
+
/* @__PURE__ */ g($, {
|
|
149
|
+
className: u.root,
|
|
152
150
|
"aria-label": j ? void 0 : A ?? V,
|
|
153
151
|
"aria-labelledby": j,
|
|
154
152
|
children: [
|
|
155
|
-
/* @__PURE__ */
|
|
153
|
+
/* @__PURE__ */ h(t, { children: w }),
|
|
156
154
|
Y,
|
|
157
|
-
/* @__PURE__ */
|
|
158
|
-
className:
|
|
155
|
+
/* @__PURE__ */ g("ul", {
|
|
156
|
+
className: u.root,
|
|
159
157
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
className:
|
|
162
|
-
children: /* @__PURE__ */
|
|
163
|
-
className:
|
|
164
|
-
onClick: () => Z(
|
|
165
|
-
disabled:
|
|
158
|
+
/* @__PURE__ */ h("li", {
|
|
159
|
+
className: m(u.item, b === 1 && u.disabled),
|
|
160
|
+
children: /* @__PURE__ */ h("button", {
|
|
161
|
+
className: u.button,
|
|
162
|
+
onClick: () => Z(b - 1),
|
|
163
|
+
disabled: b === 1,
|
|
166
164
|
"aria-label": N,
|
|
167
|
-
children: /* @__PURE__ */
|
|
168
|
-
component:
|
|
165
|
+
children: /* @__PURE__ */ h(o, {
|
|
166
|
+
component: i,
|
|
169
167
|
size: "sm"
|
|
170
168
|
})
|
|
171
169
|
})
|
|
172
170
|
}),
|
|
173
|
-
/* @__PURE__ */
|
|
174
|
-
className:
|
|
175
|
-
children: /* @__PURE__ */
|
|
176
|
-
|
|
171
|
+
/* @__PURE__ */ h("li", {
|
|
172
|
+
className: m(u.item, u.mobileIndicator),
|
|
173
|
+
children: /* @__PURE__ */ g("span", { children: [
|
|
174
|
+
b,
|
|
177
175
|
" / ",
|
|
178
176
|
J
|
|
179
177
|
] })
|
|
180
178
|
}),
|
|
181
|
-
|
|
182
|
-
className:
|
|
179
|
+
le.map((e, t) => e === v ? /* @__PURE__ */ h("li", {
|
|
180
|
+
className: m(u.item, u.ellipsis),
|
|
183
181
|
"aria-hidden": "true",
|
|
184
|
-
children:
|
|
185
|
-
}, `ellipsis-${t}`) : /* @__PURE__ */
|
|
186
|
-
className:
|
|
182
|
+
children: v
|
|
183
|
+
}, `ellipsis-${t}`) : /* @__PURE__ */ h("li", {
|
|
184
|
+
className: m(u.item, u.number, e === b && u.active),
|
|
187
185
|
children: me(e)
|
|
188
186
|
}, e)),
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
className:
|
|
191
|
-
children: /* @__PURE__ */
|
|
192
|
-
className:
|
|
193
|
-
onClick: () => Z(
|
|
194
|
-
disabled:
|
|
187
|
+
/* @__PURE__ */ h("li", {
|
|
188
|
+
className: m(u.item, b === J && u.disabled),
|
|
189
|
+
children: /* @__PURE__ */ h("button", {
|
|
190
|
+
className: u.button,
|
|
191
|
+
onClick: () => Z(b + 1),
|
|
192
|
+
disabled: b === J,
|
|
195
193
|
"aria-label": P,
|
|
196
|
-
children: /* @__PURE__ */
|
|
197
|
-
component:
|
|
194
|
+
children: /* @__PURE__ */ h(o, {
|
|
195
|
+
component: a,
|
|
198
196
|
size: "sm"
|
|
199
197
|
})
|
|
200
198
|
})
|
|
@@ -203,12 +201,12 @@ var g = "...", _ = ({ total: u, pageSize: _ = 10, current: v = 1, onChange: y, o
|
|
|
203
201
|
})
|
|
204
202
|
]
|
|
205
203
|
}),
|
|
206
|
-
|
|
207
|
-
className:
|
|
208
|
-
children: /* @__PURE__ */
|
|
204
|
+
D && /* @__PURE__ */ h("div", {
|
|
205
|
+
className: u.sizeChanger,
|
|
206
|
+
children: /* @__PURE__ */ h(ee, {
|
|
209
207
|
value: String(q),
|
|
210
208
|
onChange: (e) => ue(Number(e)),
|
|
211
|
-
options:
|
|
209
|
+
options: O.map((e) => ({
|
|
212
210
|
label: `${e} ${I}`,
|
|
213
211
|
value: String(e)
|
|
214
212
|
})),
|
|
@@ -216,11 +214,11 @@ var g = "...", _ = ({ total: u, pageSize: _ = 10, current: v = 1, onChange: y, o
|
|
|
216
214
|
"aria-label": z
|
|
217
215
|
})
|
|
218
216
|
}),
|
|
219
|
-
|
|
220
|
-
className:
|
|
217
|
+
oe && /* @__PURE__ */ g("div", {
|
|
218
|
+
className: u.quickJumper,
|
|
221
219
|
children: [
|
|
222
|
-
/* @__PURE__ */
|
|
223
|
-
/* @__PURE__ */
|
|
220
|
+
/* @__PURE__ */ h("span", { children: L }),
|
|
221
|
+
/* @__PURE__ */ h(c, {
|
|
224
222
|
type: "number",
|
|
225
223
|
min: 1,
|
|
226
224
|
max: J,
|
|
@@ -230,7 +228,7 @@ var g = "...", _ = ({ total: u, pageSize: _ = 10, current: v = 1, onChange: y, o
|
|
|
230
228
|
width: "60px",
|
|
231
229
|
"aria-label": B
|
|
232
230
|
}),
|
|
233
|
-
/* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ h(s, {
|
|
234
232
|
size: "sm",
|
|
235
233
|
variant: "outline",
|
|
236
234
|
onClick: Q,
|
|
@@ -244,4 +242,4 @@ var g = "...", _ = ({ total: u, pageSize: _ = 10, current: v = 1, onChange: y, o
|
|
|
244
242
|
});
|
|
245
243
|
};
|
|
246
244
|
//#endregion
|
|
247
|
-
export {
|
|
245
|
+
export { y as Pagination, y as default, _ as PaginationPage };
|