chordia-ui 3.7.2 → 3.7.4
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/CustomFilterChips.cjs.js +1 -1
- package/dist/CustomFilterChips.cjs.js.map +1 -1
- package/dist/CustomFilterChips.es.js +239 -125
- package/dist/CustomFilterChips.es.js.map +1 -1
- package/dist/DataTable2.cjs.js +2 -0
- package/dist/DataTable2.cjs.js.map +1 -0
- package/dist/DataTable2.es.js +1863 -0
- package/dist/DataTable2.es.js.map +1 -0
- package/dist/components/UpdatedInteractionDetails.cjs.js +2 -2
- package/dist/components/UpdatedInteractionDetails.cjs.js.map +1 -1
- package/dist/components/UpdatedInteractionDetails.es.js +14 -13
- package/dist/components/UpdatedInteractionDetails.es.js.map +1 -1
- package/dist/components/data.cjs.js +1 -1
- package/dist/components/data.cjs.js.map +1 -1
- package/dist/components/data.es.js +157 -153
- package/dist/components/data.es.js.map +1 -1
- package/dist/components/performance.cjs.js +1 -1
- package/dist/components/performance.cjs.js.map +1 -1
- package/dist/components/performance.es.js +1900 -480
- package/dist/components/performance.es.js.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +94 -89
- package/dist/index.es.js.map +1 -1
- package/package.json +1 -1
- package/src/components/UpdatedInteractionDetails/UpdatedInteractionDetails.jsx +13 -13
- package/src/components/UpdatedInteractionDetails/UpdatedThreads.jsx +1 -0
- package/src/components/common/CustomFilterChips.jsx +5 -1
- package/src/components/common/Pagination.jsx +152 -39
- package/src/components/data/DataTable2.jsx +2449 -0
- package/src/components/data/DataTableFilters2.jsx +186 -0
- package/src/components/data/index.js +2 -0
- package/src/components/index.js +2 -2
- package/src/components/performance/PerformanceDetailsPage.jsx +940 -0
- package/src/components/performance/PerformancePanel.jsx +423 -297
- package/src/components/performance/SupervisorSelect.jsx +386 -0
- package/src/components/performance/index.js +3 -1
package/dist/index.es.js
CHANGED
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { C as c, a as C, D as S, S as f, T as x } from "./SmallButton.es.js";
|
|
2
|
-
import { T as g, b as
|
|
3
|
-
import { Badge as
|
|
2
|
+
import { T as g, b as D, c as I, a as b } from "./Tooltip.es.js";
|
|
3
|
+
import { Badge as P, Checkbox as U, ColorPalette as v, FormLabel as h, InlineConfirm as F, MultiSelect as w, Select as y, TextArea as N } from "./components/primitives.es.js";
|
|
4
4
|
import { S as B, T as L } from "./SectionLabel.es.js";
|
|
5
5
|
import { T as O } from "./TextInput.es.js";
|
|
6
|
-
import { DataTable as G,
|
|
7
|
-
import {
|
|
6
|
+
import { DataTable as G, DataTableFilters2 as R, SummaryStatsPanel as j } from "./components/data.es.js";
|
|
7
|
+
import { D as H, a as V } from "./DataTable2.es.js";
|
|
8
|
+
import { A as z, a as J, b as K, F as Q, T as W, c as X } from "./Toast.es.js";
|
|
8
9
|
import "react/jsx-runtime";
|
|
9
10
|
import "react";
|
|
10
11
|
import "lucide-react";
|
|
11
|
-
import { C as
|
|
12
|
-
import { T as
|
|
13
|
-
import { D as
|
|
14
|
-
import { C as
|
|
15
|
-
import { InteractionSummaryCard as
|
|
16
|
-
import { ChatHistoryPanel as
|
|
17
|
-
import { a as
|
|
18
|
-
import { NavDropdown as
|
|
19
|
-
import { DemoProjectBanner as
|
|
20
|
-
import { I as
|
|
21
|
-
import { NotificationItem as
|
|
22
|
-
import { PerformancePanel as
|
|
23
|
-
import { OverlayPanel as
|
|
24
|
-
import { U as
|
|
25
|
-
import { AddTeammates as
|
|
26
|
-
import { LoginPage as
|
|
27
|
-
import { UpdatedCoachingSynthesisCard as
|
|
28
|
-
import { U as
|
|
12
|
+
import { C as Z, M as _, O as $, b as aa, c as ra, S as ea, a as ta, d as oa } from "./SummarySection.es.js";
|
|
13
|
+
import { T as na } from "./TourGuideTooltip.es.js";
|
|
14
|
+
import { D as pa, b as ma, a as da, S as la } from "./SideDrawer.es.js";
|
|
15
|
+
import { C as Ca, a as Sa, T as fa } from "./Timeline.es.js";
|
|
16
|
+
import { InteractionSummaryCard as Ta } from "./components/media.es.js";
|
|
17
|
+
import { ChatHistoryPanel as Da, ChatInterface as Ia, MessageThread as ba, ThinkingIndicator as ua } from "./components/chat.es.js";
|
|
18
|
+
import { a as Ua, C as va } from "./ChatMessage.es.js";
|
|
19
|
+
import { NavDropdown as Fa, NavDropdownItem as wa, NavPill as ya, NavigationBar as Na, Sidebar as Aa, StatusIndicator as Ba } from "./components/navigation.es.js";
|
|
20
|
+
import { DemoProjectBanner as Ma, FirstCallScreen as Oa, LoginForm as ka, OnboardingChecklist as Ga, SplitPane as Ra } from "./components/layout.es.js";
|
|
21
|
+
import { I as Ea } from "./IntegrationCard.es.js";
|
|
22
|
+
import { NotificationItem as Va, NotificationPanel as qa } from "./components/notifications.es.js";
|
|
23
|
+
import { PerformanceDetailsPage as Ja, PerformancePanel as Ka, SupervisorSelect as Qa } from "./components/performance.es.js";
|
|
24
|
+
import { OverlayPanel as Xa } from "./components/models.es.js";
|
|
25
|
+
import { U as Za, a as _a } from "./UploadInteraction.es.js";
|
|
26
|
+
import { AddTeammates as ar, ConnectData as rr, GettingStarted as er } from "./components/onboarding.es.js";
|
|
27
|
+
import { LoginPage as or, SignUpPage as ir } from "./components/login.es.js";
|
|
28
|
+
import { UpdatedCoachingSynthesisCard as sr, UpdatedCompassScore as pr, UpdatedGuidance as mr, UpdatedInteractionContext as dr, UpdatedInteractionDetails as lr, UpdatedInteractionScores as cr, UpdatedInteractionSignals as Cr } from "./components/UpdatedInteractionDetails.es.js";
|
|
29
|
+
import { U as fr } from "./UpdatedInteractionRecording.es.js";
|
|
29
30
|
import "react-dom";
|
|
30
31
|
import "./sortable.esm.es.js";
|
|
31
32
|
import "./CustomFilterChips.es.js";
|
|
@@ -34,88 +35,92 @@ import "recharts";
|
|
|
34
35
|
import "@descope/react-sdk";
|
|
35
36
|
import "./colors.es.js";
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
ar as AddTeammates,
|
|
39
|
+
z as AskCompass,
|
|
40
|
+
J as AutoSearch,
|
|
41
|
+
P as Badge,
|
|
41
42
|
c as Card,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
43
|
+
Ua as ChartRenderer,
|
|
44
|
+
Da as ChatHistoryPanel,
|
|
45
|
+
Ia as ChatInterface,
|
|
46
|
+
va as ChatMessage,
|
|
47
|
+
U as Checkbox,
|
|
48
|
+
v as ColorPalette,
|
|
49
|
+
Z as ConditionCard,
|
|
50
|
+
rr as ConnectData,
|
|
51
|
+
Ca as ConversationTurn,
|
|
51
52
|
G as DataTable,
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
H as DataTable2,
|
|
54
|
+
V as DataTableFilters,
|
|
55
|
+
R as DataTableFilters2,
|
|
56
|
+
Ma as DemoProjectBanner,
|
|
54
57
|
C as DetailCard,
|
|
55
58
|
S as DeviationIndicator,
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
pa as DrawerButton,
|
|
60
|
+
ma as DrawerInput,
|
|
61
|
+
da as DrawerLabel,
|
|
62
|
+
K as FileUploadSuccessState,
|
|
63
|
+
Q as FileUploadingState,
|
|
64
|
+
Oa as FirstCallScreen,
|
|
62
65
|
h as FormLabel,
|
|
63
|
-
|
|
66
|
+
er as GettingStarted,
|
|
64
67
|
F as InlineConfirm,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
Ea as IntegrationCard,
|
|
69
|
+
Ta as InteractionSummaryCard,
|
|
70
|
+
ka as LoginForm,
|
|
71
|
+
or as LoginPage,
|
|
72
|
+
ba as MessageThread,
|
|
73
|
+
_ as ModelScoreCard,
|
|
71
74
|
w as MultiSelect,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
75
|
+
Fa as NavDropdown,
|
|
76
|
+
wa as NavDropdownItem,
|
|
77
|
+
ya as NavPill,
|
|
78
|
+
Na as NavigationBar,
|
|
79
|
+
Va as NotificationItem,
|
|
80
|
+
qa as NotificationPanel,
|
|
81
|
+
$ as ObservationCard,
|
|
82
|
+
Ga as OnboardingChecklist,
|
|
83
|
+
Xa as OverlayPanel,
|
|
84
|
+
Ja as PerformanceDetailsPage,
|
|
85
|
+
Ka as PerformancePanel,
|
|
86
|
+
aa as ScoreDriverCard,
|
|
87
|
+
ra as ScoreDriverCardVariant,
|
|
84
88
|
B as SectionLabel,
|
|
85
89
|
y as Select,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
+
la as SideDrawer,
|
|
91
|
+
Aa as Sidebar,
|
|
92
|
+
ir as SignUpPage,
|
|
93
|
+
ea as SignalCard,
|
|
90
94
|
f as SmallButton,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
ta as SmallObservationCard,
|
|
96
|
+
Ra as SplitPane,
|
|
97
|
+
Ba as StatusIndicator,
|
|
98
|
+
oa as SummarySection,
|
|
95
99
|
j as SummaryStatsPanel,
|
|
100
|
+
Qa as SupervisorSelect,
|
|
96
101
|
L as Tabs,
|
|
97
102
|
x as Tag,
|
|
98
103
|
N as TextArea,
|
|
99
104
|
O as TextInput,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
105
|
+
ua as ThinkingIndicator,
|
|
106
|
+
Sa as Timeline,
|
|
107
|
+
W as Toast,
|
|
108
|
+
X as ToastContainer,
|
|
104
109
|
g as Tooltip,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
110
|
+
D as TooltipContent,
|
|
111
|
+
I as TooltipProvider,
|
|
112
|
+
b as TooltipTrigger,
|
|
113
|
+
na as TourGuideTooltip,
|
|
114
|
+
fa as TranscriptCard,
|
|
115
|
+
sr as UpdatedCoachingSynthesisCard,
|
|
116
|
+
pr as UpdatedCompassScore,
|
|
117
|
+
mr as UpdatedGuidance,
|
|
118
|
+
dr as UpdatedInteractionContext,
|
|
119
|
+
lr as UpdatedInteractionDetails,
|
|
120
|
+
fr as UpdatedInteractionRecording,
|
|
121
|
+
cr as UpdatedInteractionScores,
|
|
122
|
+
Cr as UpdatedInteractionSignals,
|
|
123
|
+
Za as UploadEvaluate,
|
|
124
|
+
_a as UploadInteraction
|
|
120
125
|
};
|
|
121
126
|
//# sourceMappingURL=index.es.js.map
|
package/dist/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -455,7 +455,7 @@ const UpdatedInteractionDetails = ({
|
|
|
455
455
|
fontFamily: 'var(--default-font-family)',
|
|
456
456
|
whiteSpace: 'nowrap',
|
|
457
457
|
}}>
|
|
458
|
-
Previous
|
|
458
|
+
Previous Interaction
|
|
459
459
|
</span>
|
|
460
460
|
</button>
|
|
461
461
|
</NameTooltip>
|
|
@@ -492,7 +492,7 @@ const UpdatedInteractionDetails = ({
|
|
|
492
492
|
fontFamily: 'var(--default-font-family)',
|
|
493
493
|
whiteSpace: 'nowrap',
|
|
494
494
|
}}>
|
|
495
|
-
Next
|
|
495
|
+
Next Interaction
|
|
496
496
|
</span>
|
|
497
497
|
<ArrowRight size={16} color="var(--Neutral-800, #323232)" strokeWidth={1.5} />
|
|
498
498
|
</button>
|
|
@@ -569,7 +569,7 @@ const UpdatedInteractionDetails = ({
|
|
|
569
569
|
fontFamily: 'var(--default-font-family)',
|
|
570
570
|
whiteSpace: 'nowrap',
|
|
571
571
|
}}>
|
|
572
|
-
Previous
|
|
572
|
+
Previous Interaction
|
|
573
573
|
</span>
|
|
574
574
|
</button>
|
|
575
575
|
</NameTooltip>
|
|
@@ -604,7 +604,7 @@ const UpdatedInteractionDetails = ({
|
|
|
604
604
|
fontFamily: 'var(--default-font-family)',
|
|
605
605
|
whiteSpace: 'nowrap',
|
|
606
606
|
}}>
|
|
607
|
-
Next
|
|
607
|
+
Next Interaction
|
|
608
608
|
</span>
|
|
609
609
|
<ArrowRight size={16} color="var(--Neutral-800, #323232)" strokeWidth={1.5} />
|
|
610
610
|
</button>
|
|
@@ -706,7 +706,7 @@ const UpdatedInteractionDetails = ({
|
|
|
706
706
|
<CircleUser size={16} color="var(--Grey-Strong, #2E3236)" strokeWidth={1.5} />
|
|
707
707
|
<span style={{ fontSize: 13, fontWeight: 400, color: 'var(--Grey-Strong, #2E3236)', lineHeight: 1.2, whiteSpace: 'nowrap' }}>
|
|
708
708
|
<span style={{ fontWeight: 600 }}>{customerName}</span>{' '}
|
|
709
|
-
<span>({sessionCount}
|
|
709
|
+
<span>({sessionCount} Interactions)</span>
|
|
710
710
|
</span>
|
|
711
711
|
</div>
|
|
712
712
|
<ChevronRight size={16} color="var(--Grey-Strong, #2E3236)" strokeWidth={1.7} />
|
|
@@ -943,7 +943,7 @@ const UpdatedInteractionDetails = ({
|
|
|
943
943
|
color: 'var(--Grey-Muted, #808183)',
|
|
944
944
|
lineHeight: 1.5,
|
|
945
945
|
}}>
|
|
946
|
-
{sessionCount}
|
|
946
|
+
{sessionCount} Interactions in Past
|
|
947
947
|
</span>
|
|
948
948
|
) : null}
|
|
949
949
|
width={470}
|
|
@@ -955,20 +955,20 @@ const UpdatedInteractionDetails = ({
|
|
|
955
955
|
onClick={() => { if (onViewAllSessions) onViewAllSessions(); setShowSessionDrawer(false); }}
|
|
956
956
|
style={{
|
|
957
957
|
display: 'flex',
|
|
958
|
-
height:
|
|
959
|
-
padding: '0
|
|
958
|
+
height: 40,
|
|
959
|
+
padding: '0 20px 0 18px',
|
|
960
960
|
justifyContent: 'center',
|
|
961
961
|
alignItems: 'center',
|
|
962
|
-
gap:
|
|
962
|
+
gap: 7,
|
|
963
963
|
background: 'var(--Grey-White, #FFF)',
|
|
964
964
|
border: '1px solid var(--Grey-absent, #D9D9D9)',
|
|
965
965
|
borderRadius: 10,
|
|
966
966
|
cursor: 'pointer',
|
|
967
967
|
}}
|
|
968
968
|
>
|
|
969
|
-
<History size={
|
|
970
|
-
<span style={{ fontSize:
|
|
971
|
-
View All
|
|
969
|
+
<History size={18} color="var(--Grey-Muted, #808183)" strokeWidth={1.5} />
|
|
970
|
+
<span style={{ fontSize: 15, fontWeight: 600, color: 'var(--Grey-Strong, #2E3236)' }}>
|
|
971
|
+
View All Interactions
|
|
972
972
|
</span>
|
|
973
973
|
</button>
|
|
974
974
|
</div>
|
|
@@ -1040,7 +1040,7 @@ const UpdatedInteractionDetails = ({
|
|
|
1040
1040
|
textAlign: 'center',
|
|
1041
1041
|
}}
|
|
1042
1042
|
>
|
|
1043
|
-
No
|
|
1043
|
+
No other interactions available
|
|
1044
1044
|
</div>
|
|
1045
1045
|
)}
|
|
1046
1046
|
</div>
|
|
@@ -54,9 +54,13 @@ export default function CustomFilterChips({
|
|
|
54
54
|
});
|
|
55
55
|
} else if (typeof value === "string" && value.trim() !== "") {
|
|
56
56
|
const displayValue = getDisplayLabel(key, value);
|
|
57
|
+
const label =
|
|
58
|
+
key === "contact_id"
|
|
59
|
+
? "Contact Id"
|
|
60
|
+
: `${formatLabel(key)}: ${displayValue}`;
|
|
57
61
|
chips.push({
|
|
58
62
|
key,
|
|
59
|
-
label
|
|
63
|
+
label,
|
|
60
64
|
onRemove: () => onChange({ ...filters, [key]: "" }),
|
|
61
65
|
});
|
|
62
66
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
2
|
|
|
3
|
-
import React, { useMemo } from "react";
|
|
3
|
+
import React, { useEffect, useMemo, useRef, useState } from "react";
|
|
4
|
+
import { ChevronDown, ChevronLeft, ChevronRight } from "lucide-react";
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
|
-
* Pagination Component
|
|
7
|
+
* Pagination Component (Figma DS — node 218:7058)
|
|
7
8
|
* @param {number} page - current page number (1-based)
|
|
8
9
|
* @param {number} pageSize - rows per page
|
|
9
10
|
* @param {number} totalCount - total row count (for pagination)
|
|
@@ -35,6 +36,20 @@ export default function Pagination({
|
|
|
35
36
|
totalCount
|
|
36
37
|
);
|
|
37
38
|
|
|
39
|
+
const [pageSizeOpen, setPageSizeOpen] = useState(false);
|
|
40
|
+
const pageSizeRef = useRef(null);
|
|
41
|
+
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (!pageSizeOpen) return;
|
|
44
|
+
const onMouseDown = (e) => {
|
|
45
|
+
if (pageSizeRef.current && !pageSizeRef.current.contains(e.target)) {
|
|
46
|
+
setPageSizeOpen(false);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
document.addEventListener("mousedown", onMouseDown);
|
|
50
|
+
return () => document.removeEventListener("mousedown", onMouseDown);
|
|
51
|
+
}, [pageSizeOpen]);
|
|
52
|
+
|
|
38
53
|
const pageNumbers = useMemo(() => {
|
|
39
54
|
if (totalPages <= 1) return [];
|
|
40
55
|
|
|
@@ -84,75 +99,168 @@ export default function Pagination({
|
|
|
84
99
|
const shouldShowPageSizeSelector =
|
|
85
100
|
showPageSizeSelector && typeof onPageSizeChange === "function";
|
|
86
101
|
|
|
102
|
+
const labelStyle = {
|
|
103
|
+
fontFamily: "var(--font-sans)",
|
|
104
|
+
fontSize: 16,
|
|
105
|
+
lineHeight: "24px",
|
|
106
|
+
color: "#323232",
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const pillBase = {
|
|
110
|
+
height: 24,
|
|
111
|
+
display: "inline-flex",
|
|
112
|
+
alignItems: "center",
|
|
113
|
+
justifyContent: "center",
|
|
114
|
+
padding: "0 8px",
|
|
115
|
+
borderRadius: 10,
|
|
116
|
+
fontFamily: "var(--font-sans)",
|
|
117
|
+
fontSize: 12,
|
|
118
|
+
lineHeight: "16px",
|
|
119
|
+
border: "1px solid #E6E6E6",
|
|
120
|
+
background: "#FFFFFF",
|
|
121
|
+
color: "#0B0B0B",
|
|
122
|
+
cursor: "pointer",
|
|
123
|
+
gap: 4,
|
|
124
|
+
whiteSpace: "nowrap",
|
|
125
|
+
};
|
|
126
|
+
|
|
87
127
|
return (
|
|
88
128
|
<div
|
|
89
|
-
className={
|
|
129
|
+
className={className}
|
|
130
|
+
style={{
|
|
131
|
+
display: "flex",
|
|
132
|
+
alignItems: "center",
|
|
133
|
+
justifyContent: "space-between",
|
|
134
|
+
padding: "12px 0",
|
|
135
|
+
gap: 16,
|
|
136
|
+
background: "transparent",
|
|
137
|
+
}}
|
|
90
138
|
>
|
|
91
|
-
<div
|
|
139
|
+
<div style={{ display: "inline-flex", alignItems: "center", gap: 16 }}>
|
|
92
140
|
{shouldShowPageSizeSelector && (
|
|
93
|
-
<div
|
|
94
|
-
<span
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
141
|
+
<div ref={pageSizeRef} style={{ position: "relative", display: "inline-flex", alignItems: "center", gap: 8 }}>
|
|
142
|
+
<span style={labelStyle}>Result per page</span>
|
|
143
|
+
<button
|
|
144
|
+
type="button"
|
|
145
|
+
onClick={() => setPageSizeOpen((v) => !v)}
|
|
146
|
+
aria-haspopup="listbox"
|
|
147
|
+
aria-expanded={pageSizeOpen}
|
|
148
|
+
style={{ ...pillBase, minWidth: 47 }}
|
|
99
149
|
>
|
|
100
|
-
{
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
150
|
+
{pageSize}
|
|
151
|
+
<ChevronDown size={12} strokeWidth={1.75} />
|
|
152
|
+
</button>
|
|
153
|
+
{pageSizeOpen && (
|
|
154
|
+
<div
|
|
155
|
+
role="listbox"
|
|
156
|
+
style={{
|
|
157
|
+
position: "absolute",
|
|
158
|
+
bottom: "calc(100% + 4px)",
|
|
159
|
+
right: 0,
|
|
160
|
+
zIndex: 30,
|
|
161
|
+
background: "#FFFFFF",
|
|
162
|
+
border: "1px solid #E6E6E6",
|
|
163
|
+
borderRadius: 10,
|
|
164
|
+
boxShadow: "0 8px 24px rgba(11, 11, 11, 0.10)",
|
|
165
|
+
padding: 4,
|
|
166
|
+
display: "flex",
|
|
167
|
+
flexDirection: "column",
|
|
168
|
+
gap: 2,
|
|
169
|
+
minWidth: 60,
|
|
170
|
+
}}
|
|
171
|
+
>
|
|
172
|
+
{pageSizeOptions.map((size) => {
|
|
173
|
+
const selected = size === pageSize;
|
|
174
|
+
return (
|
|
175
|
+
<button
|
|
176
|
+
key={size}
|
|
177
|
+
type="button"
|
|
178
|
+
role="option"
|
|
179
|
+
aria-selected={selected}
|
|
180
|
+
onClick={() => {
|
|
181
|
+
onPageSizeChange(size);
|
|
182
|
+
setPageSizeOpen(false);
|
|
183
|
+
}}
|
|
184
|
+
style={{
|
|
185
|
+
background: selected ? "#F2F2F0" : "transparent",
|
|
186
|
+
border: "none",
|
|
187
|
+
padding: "6px 10px",
|
|
188
|
+
borderRadius: 6,
|
|
189
|
+
fontFamily: "var(--font-sans)",
|
|
190
|
+
fontSize: 13,
|
|
191
|
+
color: "#0B0B0B",
|
|
192
|
+
textAlign: "left",
|
|
193
|
+
cursor: "pointer",
|
|
194
|
+
}}
|
|
195
|
+
>
|
|
196
|
+
{size}
|
|
197
|
+
</button>
|
|
198
|
+
);
|
|
199
|
+
})}
|
|
200
|
+
</div>
|
|
201
|
+
)}
|
|
106
202
|
</div>
|
|
107
203
|
)}
|
|
108
204
|
{showRecordCounter && (
|
|
109
|
-
<span
|
|
110
|
-
Showing{" "}
|
|
205
|
+
<span style={labelStyle}>
|
|
111
206
|
{currentRecordEnd > 0
|
|
112
|
-
? `${currentRecordStart}-${currentRecordEnd}`
|
|
113
|
-
: 0
|
|
114
|
-
of {totalCount}
|
|
207
|
+
? `${currentRecordStart}-${currentRecordEnd} of ${totalCount}`
|
|
208
|
+
: `0 of ${totalCount}`}
|
|
115
209
|
</span>
|
|
116
210
|
)}
|
|
117
211
|
</div>
|
|
118
212
|
|
|
119
|
-
<div
|
|
213
|
+
<div style={{ display: "inline-flex", alignItems: "center", gap: 6 }}>
|
|
120
214
|
<button
|
|
121
|
-
|
|
215
|
+
type="button"
|
|
122
216
|
onClick={() => onPageChange(page - 1)}
|
|
123
217
|
disabled={page <= 1}
|
|
124
218
|
aria-label="Previous page"
|
|
219
|
+
style={{
|
|
220
|
+
...pillBase,
|
|
221
|
+
opacity: page <= 1 ? 0.5 : 1,
|
|
222
|
+
cursor: page <= 1 ? "default" : "pointer",
|
|
223
|
+
}}
|
|
125
224
|
>
|
|
126
|
-
|
|
225
|
+
<ChevronLeft size={12} strokeWidth={1.75} />
|
|
226
|
+
Back
|
|
127
227
|
</button>
|
|
128
228
|
|
|
129
229
|
{pageNumbers.map((pageNum, index) => {
|
|
130
230
|
if (pageNum === "ellipsis-start" || pageNum === "ellipsis-end") {
|
|
131
231
|
return (
|
|
132
|
-
<
|
|
232
|
+
<span
|
|
133
233
|
key={`ellipsis-${index}`}
|
|
134
|
-
className="w-8 h-8 rounded-full text-gray-500 flex items-center justify-center cursor-default"
|
|
135
|
-
disabled
|
|
136
234
|
aria-hidden="true"
|
|
235
|
+
style={{
|
|
236
|
+
fontFamily: "var(--font-sans)",
|
|
237
|
+
fontSize: 12,
|
|
238
|
+
color: "#676767",
|
|
239
|
+
padding: "0 4px",
|
|
240
|
+
userSelect: "none",
|
|
241
|
+
}}
|
|
137
242
|
>
|
|
138
|
-
|
|
139
|
-
</
|
|
243
|
+
…
|
|
244
|
+
</span>
|
|
140
245
|
);
|
|
141
246
|
}
|
|
142
247
|
|
|
143
248
|
const isActive = pageNum === page;
|
|
144
|
-
|
|
145
249
|
return (
|
|
146
250
|
<button
|
|
147
251
|
key={pageNum}
|
|
148
|
-
|
|
149
|
-
isActive
|
|
150
|
-
? "bg-green-2 text-black font-semibold"
|
|
151
|
-
: "bg-white border border-gray-300 text-gray-700 hover:bg-gray-50"
|
|
152
|
-
}`}
|
|
252
|
+
type="button"
|
|
153
253
|
onClick={() => onPageChange(pageNum)}
|
|
154
254
|
aria-label={`Go to page ${pageNum}`}
|
|
155
255
|
aria-current={isActive ? "page" : undefined}
|
|
256
|
+
style={{
|
|
257
|
+
...pillBase,
|
|
258
|
+
minWidth: 22,
|
|
259
|
+
padding: "0 6px",
|
|
260
|
+
background: isActive ? "#0B0B0B" : "#FFFFFF",
|
|
261
|
+
border: isActive ? "none" : "1px solid #E6E6E6",
|
|
262
|
+
color: isActive ? "#FFFFFF" : "#0B0B0B",
|
|
263
|
+
}}
|
|
156
264
|
>
|
|
157
265
|
{pageNum}
|
|
158
266
|
</button>
|
|
@@ -160,15 +268,20 @@ export default function Pagination({
|
|
|
160
268
|
})}
|
|
161
269
|
|
|
162
270
|
<button
|
|
163
|
-
|
|
271
|
+
type="button"
|
|
164
272
|
onClick={() => onPageChange(page + 1)}
|
|
165
273
|
disabled={page >= totalPages}
|
|
166
274
|
aria-label="Next page"
|
|
275
|
+
style={{
|
|
276
|
+
...pillBase,
|
|
277
|
+
opacity: page >= totalPages ? 0.5 : 1,
|
|
278
|
+
cursor: page >= totalPages ? "default" : "pointer",
|
|
279
|
+
}}
|
|
167
280
|
>
|
|
168
|
-
Next
|
|
281
|
+
Next
|
|
282
|
+
<ChevronRight size={12} strokeWidth={1.75} />
|
|
169
283
|
</button>
|
|
170
284
|
</div>
|
|
171
285
|
</div>
|
|
172
286
|
);
|
|
173
287
|
}
|
|
174
|
-
|