@tipp/ui 1.6.33 → 1.6.34
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/app/index.cjs.map +1 -1
- package/dist/app/index.js +11 -11
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +1 -1
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +1 -1
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +4 -4
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +4 -4
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +4 -4
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +1 -1
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +4 -4
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +1 -1
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +4 -4
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +6 -6
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +1 -1
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +1 -1
- package/dist/atoms/drawer.cjs +15 -2
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.d.cts +1 -0
- package/dist/atoms/drawer.d.ts +1 -0
- package/dist/atoms/drawer.js +1 -1
- package/dist/atoms/index.cjs +15 -2
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +1 -1
- package/dist/{chunk-77A65DFR.js → chunk-2CZ4RJLO.js} +66 -68
- package/dist/chunk-2CZ4RJLO.js.map +1 -0
- package/dist/chunk-3D3QOYOC.js +87 -0
- package/dist/chunk-3D3QOYOC.js.map +1 -0
- package/dist/chunk-3J2KX4P6.js +192 -0
- package/dist/chunk-3J2KX4P6.js.map +1 -0
- package/dist/chunk-6RT2RUZ2.js +145 -0
- package/dist/chunk-6RT2RUZ2.js.map +1 -0
- package/dist/chunk-74O5ORS3.js +87 -0
- package/dist/chunk-74O5ORS3.js.map +1 -0
- package/dist/chunk-ACWGF5TI.js +357 -0
- package/dist/chunk-ACWGF5TI.js.map +1 -0
- package/dist/chunk-CO3KW264.js +39 -0
- package/dist/chunk-CO3KW264.js.map +1 -0
- package/dist/chunk-DEQLZ43V.js +117 -0
- package/dist/chunk-DEQLZ43V.js.map +1 -0
- package/dist/chunk-I2CWZAD4.js +87 -0
- package/dist/chunk-I2CWZAD4.js.map +1 -0
- package/dist/chunk-JC2D53VF.js +165 -0
- package/dist/chunk-JC2D53VF.js.map +1 -0
- package/dist/chunk-K5YQF7KJ.js +87 -0
- package/dist/chunk-K5YQF7KJ.js.map +1 -0
- package/dist/chunk-KBTV24Y4.js +80 -0
- package/dist/chunk-KBTV24Y4.js.map +1 -0
- package/dist/chunk-KGA3ZCJ5.js +99 -0
- package/dist/chunk-KGA3ZCJ5.js.map +1 -0
- package/dist/chunk-QJ6K6ITU.js +284 -0
- package/dist/chunk-QJ6K6ITU.js.map +1 -0
- package/dist/chunk-QUEDUGJF.js +196 -0
- package/dist/chunk-QUEDUGJF.js.map +1 -0
- package/dist/chunk-RYOOMWGK.js +192 -0
- package/dist/chunk-RYOOMWGK.js.map +1 -0
- package/dist/chunk-THHUFQEU.js +97 -0
- package/dist/chunk-THHUFQEU.js.map +1 -0
- package/dist/chunk-WCX5NKJS.js +84 -0
- package/dist/chunk-WCX5NKJS.js.map +1 -0
- package/dist/chunk-XWUFK43Q.js +192 -0
- package/dist/chunk-XWUFK43Q.js.map +1 -0
- package/dist/chunk-ZWVC35OM.js +169 -0
- package/dist/chunk-ZWVC35OM.js.map +1 -0
- package/dist/index.cjs +77 -66
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -32
- package/dist/index.js +15 -15
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +1 -1
- package/dist/molecules/expand-table/index.cjs +62 -64
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +2 -2
- package/dist/molecules/expand-table/row.cjs.map +1 -1
- package/dist/molecules/expand-table/row.js +1 -1
- package/dist/molecules/index.cjs +62 -64
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +8 -8
- package/dist/molecules/navigation.cjs.map +1 -1
- package/dist/molecules/navigation.js +1 -1
- package/dist/molecules/radio-button-card.cjs.map +1 -1
- package/dist/molecules/radio-button-card.js +1 -1
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +1 -1
- package/dist/molecules/time-select.cjs.map +1 -1
- package/dist/molecules/time-select.js +1 -1
- package/package.json +1 -1
- package/src/atoms/drawer.tsx +10 -2
- package/src/molecules/expand-table/index.tsx +70 -76
- package/dist/chunk-77A65DFR.js.map +0 -1
- package/dist/chunk-GQJH7GRZ.js +0 -145
- package/dist/chunk-GQJH7GRZ.js.map +0 -1
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Typo
|
|
3
|
+
} from "./chunk-52MVZ6AN.js";
|
|
4
|
+
import {
|
|
5
|
+
Flex
|
|
6
|
+
} from "./chunk-25HMMI7R.js";
|
|
7
|
+
import {
|
|
8
|
+
Avatar
|
|
9
|
+
} from "./chunk-JYJA2PMG.js";
|
|
10
|
+
import {
|
|
11
|
+
CheckIcon
|
|
12
|
+
} from "./chunk-HLFG5ZTU.js";
|
|
13
|
+
|
|
14
|
+
// src/molecules/stepper.tsx
|
|
15
|
+
import { createContext, Children, useContext, useMemo } from "react";
|
|
16
|
+
import { Separator } from "@radix-ui/themes";
|
|
17
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
18
|
+
var StepContext = createContext({
|
|
19
|
+
active: false,
|
|
20
|
+
completed: false,
|
|
21
|
+
index: 0
|
|
22
|
+
});
|
|
23
|
+
function Root(props) {
|
|
24
|
+
const {
|
|
25
|
+
activeStep = 0,
|
|
26
|
+
children,
|
|
27
|
+
width,
|
|
28
|
+
minWidth,
|
|
29
|
+
maxWidth,
|
|
30
|
+
direction = "vertical"
|
|
31
|
+
} = props;
|
|
32
|
+
return /* @__PURE__ */ jsx(
|
|
33
|
+
Flex,
|
|
34
|
+
{
|
|
35
|
+
gap: "3",
|
|
36
|
+
style: {
|
|
37
|
+
width,
|
|
38
|
+
minWidth,
|
|
39
|
+
maxWidth
|
|
40
|
+
},
|
|
41
|
+
children: Children.map(children, (child, index) => {
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
StepContext.Provider,
|
|
44
|
+
{
|
|
45
|
+
value: {
|
|
46
|
+
active: index === activeStep,
|
|
47
|
+
completed: index < activeStep,
|
|
48
|
+
index,
|
|
49
|
+
direction
|
|
50
|
+
},
|
|
51
|
+
children: child
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
function Step(props) {
|
|
59
|
+
const { Icon, children } = props;
|
|
60
|
+
const {
|
|
61
|
+
active,
|
|
62
|
+
completed,
|
|
63
|
+
index,
|
|
64
|
+
direction = "vertical"
|
|
65
|
+
} = useContext(StepContext);
|
|
66
|
+
const connector = index > 0 ? /* @__PURE__ */ jsx(
|
|
67
|
+
Separator,
|
|
68
|
+
{
|
|
69
|
+
style: {
|
|
70
|
+
width: `calc(100% - 40px)`,
|
|
71
|
+
position: "absolute",
|
|
72
|
+
top: 16,
|
|
73
|
+
right: `calc(50% + 26px)`
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
) : null;
|
|
77
|
+
const InnerStep = useMemo(() => {
|
|
78
|
+
if (active) {
|
|
79
|
+
return ActiveStep;
|
|
80
|
+
}
|
|
81
|
+
if (completed) {
|
|
82
|
+
return CompleteStep;
|
|
83
|
+
}
|
|
84
|
+
return IncompleteStep;
|
|
85
|
+
}, [completed, active]);
|
|
86
|
+
return /* @__PURE__ */ jsxs(
|
|
87
|
+
Flex,
|
|
88
|
+
{
|
|
89
|
+
align: "center",
|
|
90
|
+
direction: direction === "horizontal" ? "row" : "column",
|
|
91
|
+
gap: "4",
|
|
92
|
+
position: "relative",
|
|
93
|
+
style: { flex: 1 },
|
|
94
|
+
children: [
|
|
95
|
+
connector,
|
|
96
|
+
/* @__PURE__ */ jsx(InnerStep, { Icon, children })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function CompleteStep(props) {
|
|
102
|
+
const { Icon, children } = props;
|
|
103
|
+
const { completed, active } = useContext(StepContext);
|
|
104
|
+
const background = "var(--accent-a4)";
|
|
105
|
+
const border = "1px solid var(--accent-7)";
|
|
106
|
+
const color = "var(--accent-contrast)";
|
|
107
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
108
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { active, completed }) : /* @__PURE__ */ jsx(
|
|
109
|
+
Avatar,
|
|
110
|
+
{
|
|
111
|
+
fallback: /* @__PURE__ */ jsx(CheckIcon, { fill: color, height: 16, width: 16 }),
|
|
112
|
+
radius: "full",
|
|
113
|
+
size: "medium",
|
|
114
|
+
style: {
|
|
115
|
+
border,
|
|
116
|
+
background
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", variant: "caption", children })
|
|
121
|
+
] });
|
|
122
|
+
}
|
|
123
|
+
function IncompleteStep(props) {
|
|
124
|
+
const { Icon, children } = props;
|
|
125
|
+
const { completed, active, index } = useContext(StepContext);
|
|
126
|
+
const background = "var(--gray-5)";
|
|
127
|
+
const color = "var(--gray-a11)";
|
|
128
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
129
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { active, completed }) : /* @__PURE__ */ jsx(
|
|
130
|
+
Avatar,
|
|
131
|
+
{
|
|
132
|
+
fallback: /* @__PURE__ */ jsx(Typo, { style: { color }, children: index + 1 }),
|
|
133
|
+
radius: "full",
|
|
134
|
+
size: "medium",
|
|
135
|
+
style: {
|
|
136
|
+
background
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", style: { color }, variant: "caption", children })
|
|
141
|
+
] });
|
|
142
|
+
}
|
|
143
|
+
function ActiveStep(props) {
|
|
144
|
+
const { Icon, children } = props;
|
|
145
|
+
const { completed, active, index } = useContext(StepContext);
|
|
146
|
+
const background = "var(--accent-10)";
|
|
147
|
+
const color = "var(--accent-contrast)";
|
|
148
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
149
|
+
Icon ? /* @__PURE__ */ jsx(Icon, { active, completed }) : /* @__PURE__ */ jsx(
|
|
150
|
+
Avatar,
|
|
151
|
+
{
|
|
152
|
+
fallback: /* @__PURE__ */ jsx(Typo, { style: { color }, weight: "bold", children: index + 1 }),
|
|
153
|
+
radius: "full",
|
|
154
|
+
size: "medium",
|
|
155
|
+
style: { background }
|
|
156
|
+
}
|
|
157
|
+
),
|
|
158
|
+
/* @__PURE__ */ jsx(Typo, { align: "center", variant: "caption", weight: "bold", children })
|
|
159
|
+
] });
|
|
160
|
+
}
|
|
161
|
+
var Stepper = {
|
|
162
|
+
Root,
|
|
163
|
+
Step
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
export {
|
|
167
|
+
Stepper
|
|
168
|
+
};
|
|
169
|
+
//# sourceMappingURL=chunk-ZWVC35OM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/molecules/stepper.tsx"],"sourcesContent":["import React, { createContext, Children, useContext, useMemo } from 'react';\nimport { Separator } from '@radix-ui/themes';\nimport { Flex } from '../atoms/flex';\nimport { Avatar } from '../atoms/avatar';\nimport { CheckIcon } from '../icon';\nimport { Typo } from '../atoms/typo';\n\ninterface StepState extends Pick<StepperProps, 'direction'> {\n active: boolean;\n completed: boolean;\n index: number;\n}\n\nconst StepContext = createContext<StepState>({\n active: false,\n completed: false,\n index: 0,\n});\n\ninterface StepperProps {\n // 활성화된 스텝 인덱스. 0부터 시작\n activeStep?: number;\n children?: React.ReactElement | React.ReactElement[];\n width?: string;\n maxWidth?: string;\n minWidth?: string;\n /** icon과 children의 배치 방향. 기본 값 vertical */\n direction?: 'horizontal' | 'vertical';\n}\n\nfunction Root(props: StepperProps): React.ReactElement {\n const {\n activeStep = 0,\n children,\n width,\n minWidth,\n maxWidth,\n direction = 'vertical',\n } = props;\n\n return (\n <Flex\n gap=\"3\"\n style={{\n width,\n minWidth,\n maxWidth,\n }}\n >\n {Children.map(children, (child, index) => {\n return (\n <StepContext.Provider\n value={{\n active: index === activeStep,\n completed: index < activeStep,\n index,\n direction,\n }}\n >\n {child}\n </StepContext.Provider>\n );\n })}\n </Flex>\n );\n}\n\ninterface StepProps {\n children?: React.ReactNode;\n /** 아이콘 커스텀 필요시 사용 */\n Icon?: (args: { completed: boolean; active: boolean }) => React.ReactElement;\n}\n\nfunction Step(props: StepProps): React.ReactElement {\n const { Icon, children } = props;\n const {\n active,\n completed,\n index,\n direction = 'vertical',\n } = useContext(StepContext);\n\n const connector =\n index > 0 ? (\n <Separator\n style={{\n width: `calc(100% - 40px)`,\n position: 'absolute',\n top: 16,\n right: `calc(50% + 26px)`,\n }}\n />\n ) : null;\n\n const InnerStep = useMemo<(props: StepProps) => React.ReactElement>(() => {\n if (active) {\n return ActiveStep;\n }\n if (completed) {\n return CompleteStep;\n }\n return IncompleteStep;\n }, [completed, active]);\n\n return (\n <Flex\n align=\"center\"\n direction={direction === 'horizontal' ? 'row' : 'column'}\n gap=\"4\"\n position=\"relative\"\n style={{ flex: 1 }}\n >\n {connector}\n <InnerStep Icon={Icon}>{children}</InnerStep>\n </Flex>\n );\n}\n\nfunction CompleteStep(props: StepProps): React.ReactElement {\n const { Icon, children } = props;\n const { completed, active } = useContext(StepContext);\n const background = 'var(--accent-a4)';\n const border = '1px solid var(--accent-7)';\n const color = 'var(--accent-contrast)';\n\n return (\n <>\n {Icon ? (\n <Icon active={active} completed={completed} />\n ) : (\n <Avatar\n fallback={<CheckIcon fill={color} height={16} width={16} />}\n radius=\"full\"\n size=\"medium\"\n style={{\n border,\n background,\n }}\n />\n )}\n <Typo align=\"center\" variant=\"caption\">\n {children}\n </Typo>\n </>\n );\n}\n\nfunction IncompleteStep(props: StepProps): React.ReactElement {\n const { Icon, children } = props;\n const { completed, active, index } = useContext(StepContext);\n const background = 'var(--gray-5)';\n const color = 'var(--gray-a11)';\n return (\n <>\n {Icon ? (\n <Icon active={active} completed={completed} />\n ) : (\n <Avatar\n fallback={<Typo style={{ color }}>{index + 1}</Typo>}\n radius=\"full\"\n size=\"medium\"\n style={{\n background,\n }}\n />\n )}\n <Typo align=\"center\" style={{ color }} variant=\"caption\">\n {children}\n </Typo>\n </>\n );\n}\n\nfunction ActiveStep(props: StepProps): React.ReactElement {\n const { Icon, children } = props;\n const { completed, active, index } = useContext(StepContext);\n const background = 'var(--accent-10)';\n const color = 'var(--accent-contrast)';\n\n return (\n <>\n {Icon ? (\n <Icon active={active} completed={completed} />\n ) : (\n <Avatar\n fallback={\n <Typo style={{ color }} weight=\"bold\">\n {index + 1}\n </Typo>\n }\n radius=\"full\"\n size=\"medium\"\n style={{ background }}\n />\n )}\n <Typo align=\"center\" variant=\"caption\" weight=\"bold\">\n {children}\n </Typo>\n </>\n );\n}\n\nexport const Stepper = {\n Root,\n Step,\n};\n"],"mappings":"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","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -1371,7 +1371,17 @@ var preventDefault2 = (e) => {
|
|
|
1371
1371
|
e.preventDefault();
|
|
1372
1372
|
};
|
|
1373
1373
|
function Content6(props) {
|
|
1374
|
-
const _a = props, {
|
|
1374
|
+
const _a = props, {
|
|
1375
|
+
position = "right",
|
|
1376
|
+
className,
|
|
1377
|
+
children,
|
|
1378
|
+
HeaderContent
|
|
1379
|
+
} = _a, rest = __objRest(_a, [
|
|
1380
|
+
"position",
|
|
1381
|
+
"className",
|
|
1382
|
+
"children",
|
|
1383
|
+
"HeaderContent"
|
|
1384
|
+
]);
|
|
1375
1385
|
const mobileHeaderSize = 48;
|
|
1376
1386
|
const desktopHeaderSize = 64;
|
|
1377
1387
|
const separatorSize = 1;
|
|
@@ -1394,7 +1404,10 @@ function Content6(props) {
|
|
|
1394
1404
|
sm: `${desktopHeaderSize}px ${separatorSize}px calc(100% - ${desktopHeaderSize + separatorSize}px)`
|
|
1395
1405
|
},
|
|
1396
1406
|
children: [
|
|
1397
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.
|
|
1407
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_themes22.Flex, { align: "center", gap: "3", px: { initial: "4", md: "6" }, children: [
|
|
1408
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Dialog2.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_themes18.IconButton, { color: "gray", variant: "outline", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ClosePanelArrowIcon, {}) }) }),
|
|
1409
|
+
HeaderContent
|
|
1410
|
+
] }),
|
|
1398
1411
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_themes39.Separator, { orientation: "horizontal", size: "4" }),
|
|
1399
1412
|
children
|
|
1400
1413
|
]
|
|
@@ -1805,72 +1818,70 @@ function ExpandTable(props) {
|
|
|
1805
1818
|
return Math.ceil(data.length / pageSize);
|
|
1806
1819
|
}, [data, pageSize]);
|
|
1807
1820
|
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { className: "expand-table", style: tableStyle, children: [
|
|
1808
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "
|
|
1809
|
-
|
|
1810
|
-
|
|
1821
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "thead", children: getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1822
|
+
"div",
|
|
1823
|
+
{
|
|
1824
|
+
className: "tr",
|
|
1825
|
+
style: { gridTemplateColumns },
|
|
1826
|
+
children: headerGroup.headers.map((header) => {
|
|
1827
|
+
var _a;
|
|
1828
|
+
const sortable = header.column.getCanSort();
|
|
1829
|
+
const sortedState = header.column.getIsSorted();
|
|
1830
|
+
const justifyContent = ((_a = header.column.columnDef.meta) == null ? void 0 : _a.align) || defaultAlign;
|
|
1831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${justifyContent} th`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1832
|
+
"button",
|
|
1833
|
+
{
|
|
1834
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
1835
|
+
style: sortable ? { cursor: "pointer" } : { cursor: "default" },
|
|
1836
|
+
type: "button",
|
|
1837
|
+
children: [
|
|
1838
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typo, { as: "div", variant: "body", children: (0, import_react_table2.flexRender)(
|
|
1839
|
+
header.column.columnDef.header,
|
|
1840
|
+
header.getContext()
|
|
1841
|
+
) }),
|
|
1842
|
+
sortable ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1843
|
+
import_themes22.Flex,
|
|
1844
|
+
{
|
|
1845
|
+
direction: "column",
|
|
1846
|
+
style: { marginLeft: "var(--space-2)" },
|
|
1847
|
+
children: [
|
|
1848
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1849
|
+
TriangleArrowUpIcon,
|
|
1850
|
+
{
|
|
1851
|
+
color: sortedState === "asc" ? "var(--iris-10)" : "var(--iris-6)"
|
|
1852
|
+
}
|
|
1853
|
+
),
|
|
1854
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1855
|
+
TriangleArrowDownIcon,
|
|
1856
|
+
{
|
|
1857
|
+
color: sortedState === "desc" ? "var(--iris-10)" : "var(--iris-6)"
|
|
1858
|
+
}
|
|
1859
|
+
)
|
|
1860
|
+
]
|
|
1861
|
+
}
|
|
1862
|
+
) : null
|
|
1863
|
+
]
|
|
1864
|
+
}
|
|
1865
|
+
) }, header.id);
|
|
1866
|
+
})
|
|
1867
|
+
},
|
|
1868
|
+
headerGroup.id
|
|
1869
|
+
)) }),
|
|
1870
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "tbody", children: helpCompRender(rowModels.rows.length) || rowModels.rows.map((row) => {
|
|
1871
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1872
|
+
Row,
|
|
1811
1873
|
{
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: `${justifyContent} th`, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1820
|
-
"button",
|
|
1821
|
-
{
|
|
1822
|
-
onClick: header.column.getToggleSortingHandler(),
|
|
1823
|
-
style: sortable ? { cursor: "pointer" } : { cursor: "default" },
|
|
1824
|
-
type: "button",
|
|
1825
|
-
children: [
|
|
1826
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Typo, { as: "div", variant: "body", children: (0, import_react_table2.flexRender)(
|
|
1827
|
-
header.column.columnDef.header,
|
|
1828
|
-
header.getContext()
|
|
1829
|
-
) }),
|
|
1830
|
-
sortable ? /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
1831
|
-
import_themes22.Flex,
|
|
1832
|
-
{
|
|
1833
|
-
direction: "column",
|
|
1834
|
-
style: { marginLeft: "var(--space-2)" },
|
|
1835
|
-
children: [
|
|
1836
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1837
|
-
TriangleArrowUpIcon,
|
|
1838
|
-
{
|
|
1839
|
-
color: sortedState === "asc" ? "var(--iris-10)" : "var(--iris-6)"
|
|
1840
|
-
}
|
|
1841
|
-
),
|
|
1842
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1843
|
-
TriangleArrowDownIcon,
|
|
1844
|
-
{
|
|
1845
|
-
color: sortedState === "desc" ? "var(--iris-10)" : "var(--iris-6)"
|
|
1846
|
-
}
|
|
1847
|
-
)
|
|
1848
|
-
]
|
|
1849
|
-
}
|
|
1850
|
-
) : null
|
|
1851
|
-
]
|
|
1852
|
-
}
|
|
1853
|
-
) }, header.id);
|
|
1854
|
-
})
|
|
1874
|
+
ExpandComp,
|
|
1875
|
+
defaultAlign,
|
|
1876
|
+
getCellStyle,
|
|
1877
|
+
getRowStyle,
|
|
1878
|
+
gridTemplateColumns,
|
|
1879
|
+
onRowClick,
|
|
1880
|
+
row
|
|
1855
1881
|
},
|
|
1856
|
-
|
|
1857
|
-
)
|
|
1858
|
-
|
|
1859
|
-
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1860
|
-
Row,
|
|
1861
|
-
{
|
|
1862
|
-
ExpandComp,
|
|
1863
|
-
defaultAlign,
|
|
1864
|
-
getCellStyle,
|
|
1865
|
-
getRowStyle,
|
|
1866
|
-
gridTemplateColumns,
|
|
1867
|
-
onRowClick,
|
|
1868
|
-
row
|
|
1869
|
-
},
|
|
1870
|
-
`row_${row.id}`
|
|
1871
|
-
);
|
|
1872
|
-
}) })
|
|
1873
|
-
] }) }),
|
|
1882
|
+
`row_${row.id}`
|
|
1883
|
+
);
|
|
1884
|
+
}) }),
|
|
1874
1885
|
showPagination ? /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_themes22.Flex, { justify: "end", pt: "3", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
1875
1886
|
Pagination,
|
|
1876
1887
|
{
|