@ctlyst.id/internal-ui 2.1.11 → 2.1.14
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/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +684 -649
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +366 -332
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -5,13 +5,29 @@ var __export = (target, all) => {
|
|
5
5
|
__defProp(target, name, { get: all[name], enumerable: true });
|
6
6
|
};
|
7
7
|
|
8
|
-
// src/components/accordion/components/accordion-
|
9
|
-
import { Box
|
8
|
+
// src/components/accordion/components/accordion-eye.tsx
|
9
|
+
import { Box } from "@chakra-ui/react";
|
10
|
+
import { Eye } from "@ctlyst.id/internal-icon";
|
10
11
|
import { jsx } from "react/jsx-runtime";
|
12
|
+
var AccordionEye = ({ position = "left" }) => {
|
13
|
+
return /* @__PURE__ */ jsx(
|
14
|
+
Box,
|
15
|
+
{
|
16
|
+
className: "eye-icon",
|
17
|
+
backgroundColor: "white",
|
18
|
+
...position === "right" ? { position: "absolute", right: 4, zIndex: 2 } : {},
|
19
|
+
children: /* @__PURE__ */ jsx(Eye, { size: 4 })
|
20
|
+
}
|
21
|
+
);
|
22
|
+
};
|
23
|
+
|
24
|
+
// src/components/accordion/components/accordion-indicator.tsx
|
25
|
+
import { Box as Box2, useAccordionItemState } from "@chakra-ui/react";
|
26
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
11
27
|
var AccordionIndicator = () => {
|
12
28
|
const { isOpen } = useAccordionItemState();
|
13
29
|
if (isOpen) {
|
14
|
-
return /* @__PURE__ */
|
30
|
+
return /* @__PURE__ */ jsx2(Box2, { position: "absolute", left: 0, width: "2px", height: "100%", bg: "primary.500" });
|
15
31
|
}
|
16
32
|
return null;
|
17
33
|
};
|
@@ -49,15 +65,15 @@ import { createContext } from "@chakra-ui/react-context";
|
|
49
65
|
|
50
66
|
// src/components/alert/components/icons.tsx
|
51
67
|
import { AlertTriangle, CheckCircle, Info } from "@ctlyst.id/internal-icon";
|
52
|
-
import { jsx as
|
68
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
53
69
|
function CheckIcon() {
|
54
|
-
return /* @__PURE__ */
|
70
|
+
return /* @__PURE__ */ jsx3(CheckCircle, { color: "inherit", size: 4 });
|
55
71
|
}
|
56
72
|
function InfoIcon() {
|
57
|
-
return /* @__PURE__ */
|
73
|
+
return /* @__PURE__ */ jsx3(Info, { color: "inherit", size: 4 });
|
58
74
|
}
|
59
75
|
function WarningIcon() {
|
60
|
-
return /* @__PURE__ */
|
76
|
+
return /* @__PURE__ */ jsx3(AlertTriangle, { color: "inherit", size: 4 });
|
61
77
|
}
|
62
78
|
|
63
79
|
// src/components/alert/components/alert-context.ts
|
@@ -86,7 +102,7 @@ function getStatusIcon(status) {
|
|
86
102
|
}
|
87
103
|
|
88
104
|
// src/components/alert/components/alert.tsx
|
89
|
-
import { jsx as
|
105
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
90
106
|
var Alert = forwardRef(function Alert2(props, ref) {
|
91
107
|
var _a;
|
92
108
|
const { status = "info", addRole = true, children, ...rest } = omitThemingProps(props);
|
@@ -101,7 +117,7 @@ var Alert = forwardRef(function Alert2(props, ref) {
|
|
101
117
|
overflow: "hidden",
|
102
118
|
...styles.container
|
103
119
|
};
|
104
|
-
return /* @__PURE__ */
|
120
|
+
return /* @__PURE__ */ jsx4(AlertProvider, { value: { status }, children: /* @__PURE__ */ jsx4(AlertStylesProvider, { value: styles, children: /* @__PURE__ */ jsx4(
|
105
121
|
chakra.div,
|
106
122
|
{
|
107
123
|
"data-status": status,
|
@@ -123,11 +139,11 @@ import { cx as cx2 } from "@chakra-ui/shared-utils";
|
|
123
139
|
import { Button as ButtonChakra, forwardRef as forwardRef3 } from "@chakra-ui/react";
|
124
140
|
|
125
141
|
// src/components/loader/components/loader.tsx
|
126
|
-
import { Box as
|
127
|
-
import { jsx as
|
142
|
+
import { Box as Box3, forwardRef as forwardRef2, useStyleConfig } from "@chakra-ui/react";
|
143
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
128
144
|
var Loader = forwardRef2((props, ref) => {
|
129
145
|
const styles = useStyleConfig("LoaderStyle", props);
|
130
|
-
return /* @__PURE__ */
|
146
|
+
return /* @__PURE__ */ jsx5(Box3, { ref, __css: styles });
|
131
147
|
});
|
132
148
|
Loader.defaultProps = {
|
133
149
|
size: "md"
|
@@ -138,7 +154,7 @@ var loader_default = Loader;
|
|
138
154
|
import { Skeleton } from "@chakra-ui/react";
|
139
155
|
|
140
156
|
// src/components/button/components/button.tsx
|
141
|
-
import { jsx as
|
157
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
142
158
|
var Button = forwardRef3((props, ref) => {
|
143
159
|
const { children, variant, size: size2, ...rest } = props;
|
144
160
|
const getLoaderSize = () => {
|
@@ -151,12 +167,12 @@ var Button = forwardRef3((props, ref) => {
|
|
151
167
|
if (variant === "outline-danger") return "danger";
|
152
168
|
return "primary";
|
153
169
|
};
|
154
|
-
return /* @__PURE__ */
|
170
|
+
return /* @__PURE__ */ jsx6(
|
155
171
|
ButtonChakra,
|
156
172
|
{
|
157
173
|
size: size2,
|
158
174
|
variant,
|
159
|
-
spinner: /* @__PURE__ */
|
175
|
+
spinner: /* @__PURE__ */ jsx6(loader_default, { size: getLoaderSize(), color: getLoaderColor2() }),
|
160
176
|
ref,
|
161
177
|
...rest,
|
162
178
|
children
|
@@ -166,11 +182,11 @@ var Button = forwardRef3((props, ref) => {
|
|
166
182
|
var button_default = Button;
|
167
183
|
|
168
184
|
// src/components/alert/components/alert-action.tsx
|
169
|
-
import { jsx as
|
185
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
170
186
|
function AlertAction({ children, className }) {
|
171
187
|
const styles = useAlertStyles();
|
172
188
|
const css4 = styles.action;
|
173
|
-
return /* @__PURE__ */
|
189
|
+
return /* @__PURE__ */ jsx7(
|
174
190
|
button_default,
|
175
191
|
{
|
176
192
|
"data-test-id": "alert-action",
|
@@ -188,11 +204,11 @@ AlertAction.displayName = "AlertAction";
|
|
188
204
|
import { cx as cx3 } from "@chakra-ui/shared-utils";
|
189
205
|
import { chakra as chakra2 } from "@chakra-ui/system";
|
190
206
|
import { Close } from "@ctlyst.id/internal-icon";
|
191
|
-
import { jsx as
|
207
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
192
208
|
function AlertClose({ className, children, ...rest }) {
|
193
209
|
const styles = useAlertStyles();
|
194
210
|
const css4 = styles.close;
|
195
|
-
return /* @__PURE__ */
|
211
|
+
return /* @__PURE__ */ jsx8(
|
196
212
|
chakra2.span,
|
197
213
|
{
|
198
214
|
display: "inherit",
|
@@ -200,7 +216,7 @@ function AlertClose({ className, children, ...rest }) {
|
|
200
216
|
...rest,
|
201
217
|
className: cx3("chakra-alert__close", className),
|
202
218
|
__css: css4,
|
203
|
-
children: children || /* @__PURE__ */
|
219
|
+
children: children || /* @__PURE__ */ jsx8(Close, { color: "inherit", size: 4 })
|
204
220
|
}
|
205
221
|
);
|
206
222
|
}
|
@@ -209,7 +225,7 @@ AlertClose.displayName = "AlertClose";
|
|
209
225
|
// src/components/alert/components/alert-description.tsx
|
210
226
|
import { cx as cx4 } from "@chakra-ui/shared-utils";
|
211
227
|
import { chakra as chakra3, forwardRef as forwardRef4 } from "@chakra-ui/system";
|
212
|
-
import { jsx as
|
228
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
213
229
|
var AlertDescription = forwardRef4(function AlertDescription2(props, ref) {
|
214
230
|
const styles = useAlertStyles();
|
215
231
|
const { status } = useAlertContext();
|
@@ -217,7 +233,7 @@ var AlertDescription = forwardRef4(function AlertDescription2(props, ref) {
|
|
217
233
|
display: "inline",
|
218
234
|
...styles.description
|
219
235
|
};
|
220
|
-
return /* @__PURE__ */
|
236
|
+
return /* @__PURE__ */ jsx9(
|
221
237
|
chakra3.div,
|
222
238
|
{
|
223
239
|
ref,
|
@@ -233,13 +249,13 @@ AlertDescription.displayName = "AlertDescription";
|
|
233
249
|
// src/components/alert/components/alert-icon.tsx
|
234
250
|
import { cx as cx5 } from "@chakra-ui/shared-utils";
|
235
251
|
import { chakra as chakra4 } from "@chakra-ui/system";
|
236
|
-
import { jsx as
|
252
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
237
253
|
function AlertIcon({ className, children, ...rest }) {
|
238
254
|
const { status } = useAlertContext();
|
239
255
|
const BaseIcon = getStatusIcon(status);
|
240
256
|
const styles = useAlertStyles();
|
241
257
|
const css4 = styles.icon;
|
242
|
-
return /* @__PURE__ */
|
258
|
+
return /* @__PURE__ */ jsx10(
|
243
259
|
chakra4.span,
|
244
260
|
{
|
245
261
|
display: "inherit",
|
@@ -247,7 +263,7 @@ function AlertIcon({ className, children, ...rest }) {
|
|
247
263
|
...rest,
|
248
264
|
className: cx5("chakra-alert__icon", className),
|
249
265
|
__css: css4,
|
250
|
-
children: children || /* @__PURE__ */
|
266
|
+
children: children || /* @__PURE__ */ jsx10(BaseIcon, {})
|
251
267
|
}
|
252
268
|
);
|
253
269
|
}
|
@@ -256,11 +272,11 @@ AlertIcon.displayName = "AlertIcon";
|
|
256
272
|
// src/components/alert/components/alert-title.tsx
|
257
273
|
import { cx as cx6 } from "@chakra-ui/shared-utils";
|
258
274
|
import { chakra as chakra5, forwardRef as forwardRef5 } from "@chakra-ui/system";
|
259
|
-
import { jsx as
|
275
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
260
276
|
var AlertTitle = forwardRef5(function AlertTitle2(props, ref) {
|
261
277
|
const styles = useAlertStyles();
|
262
278
|
const { status } = useAlertContext();
|
263
|
-
return /* @__PURE__ */
|
279
|
+
return /* @__PURE__ */ jsx11(
|
264
280
|
chakra5.div,
|
265
281
|
{
|
266
282
|
ref,
|
@@ -312,10 +328,10 @@ Anchor.defaultProps = {
|
|
312
328
|
|
313
329
|
// src/components/badge/components/badge.tsx
|
314
330
|
import { Badge as BadgeChakra } from "@chakra-ui/react";
|
315
|
-
import { jsx as
|
331
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
316
332
|
var Badge = (props) => {
|
317
333
|
const { children, pill, ...rest } = props;
|
318
|
-
return /* @__PURE__ */
|
334
|
+
return /* @__PURE__ */ jsx12(
|
319
335
|
BadgeChakra,
|
320
336
|
{
|
321
337
|
borderRadius: pill ? "xl" : "sm",
|
@@ -334,7 +350,7 @@ Badge.defaultProps = {
|
|
334
350
|
var badge_default = Badge;
|
335
351
|
|
336
352
|
// src/components/breadcrumb/components/bread-crumb.tsx
|
337
|
-
import { Box as
|
353
|
+
import { Box as Box4, Breadcrumb, BreadcrumbItem, BreadcrumbLink, Text, theme, useToken } from "@chakra-ui/react";
|
338
354
|
import { FiChevronLeft, FiChevronsRight, FiHome } from "react-icons/fi";
|
339
355
|
|
340
356
|
// src/components/button/index.ts
|
@@ -348,12 +364,12 @@ import {
|
|
348
364
|
} from "@chakra-ui/react";
|
349
365
|
|
350
366
|
// src/components/breadcrumb/components/bread-crumb.tsx
|
351
|
-
import { jsx as
|
367
|
+
import { jsx as jsx13, jsxs as jsxs2 } from "react/jsx-runtime";
|
352
368
|
var BreadCrumb = (props) => {
|
353
369
|
const { title, children, parents, className, disableHome, spacing: spacing2 = 2, backButton } = props;
|
354
370
|
const [neutral600, primary500] = useToken("colors", ["neutral.600", "primary.500"]);
|
355
371
|
return /* @__PURE__ */ jsxs2(
|
356
|
-
|
372
|
+
Box4,
|
357
373
|
{
|
358
374
|
"data-test-id": "CT_component_breadcrumb_breadcrumb",
|
359
375
|
className,
|
@@ -362,14 +378,14 @@ var BreadCrumb = (props) => {
|
|
362
378
|
alignItems: "center",
|
363
379
|
paddingY: 2,
|
364
380
|
children: [
|
365
|
-
/* @__PURE__ */ jsxs2(
|
366
|
-
backButton && /* @__PURE__ */
|
367
|
-
/* @__PURE__ */
|
368
|
-
/* @__PURE__ */
|
381
|
+
/* @__PURE__ */ jsxs2(Box4, { display: "flex", alignItems: "center", children: [
|
382
|
+
backButton && /* @__PURE__ */ jsx13(button_default, { variant: "icon", "data-test-id": "button", size: "md", mr: "2", onClick: backButton, children: /* @__PURE__ */ jsx13(FiChevronLeft, { size: theme.sizes[5] }) }),
|
383
|
+
/* @__PURE__ */ jsx13(Text, { pr: "2", textStyle: "heading.6", color: "neutral.700", children: title }),
|
384
|
+
/* @__PURE__ */ jsx13(Box4, { h: "5.5", borderLeft: "1px solid", borderColor: neutral600 }),
|
369
385
|
/* @__PURE__ */ jsxs2(
|
370
386
|
Breadcrumb,
|
371
387
|
{
|
372
|
-
separator: /* @__PURE__ */
|
388
|
+
separator: /* @__PURE__ */ jsx13(FiChevronsRight, { color: neutral600, size: theme.sizes["3.5"] }),
|
373
389
|
pl: "2",
|
374
390
|
pr: "4",
|
375
391
|
spacing: spacing2,
|
@@ -378,8 +394,8 @@ var BreadCrumb = (props) => {
|
|
378
394
|
alignItems: "center",
|
379
395
|
className: "breadcrumb-wrapper",
|
380
396
|
children: [
|
381
|
-
/* @__PURE__ */
|
382
|
-
parents == null ? void 0 : parents.map((val) => /* @__PURE__ */
|
397
|
+
/* @__PURE__ */ jsx13(BreadcrumbItem, { children: /* @__PURE__ */ jsx13(BreadcrumbLink, { href: !disableHome ? "/" : void 0, style: { ...disableHome && { cursor: "default" } }, children: /* @__PURE__ */ jsx13(FiHome, { className: "align-top", size: theme.sizes["3.5"], color: primary500 }) }) }),
|
398
|
+
parents == null ? void 0 : parents.map((val) => /* @__PURE__ */ jsx13(BreadcrumbItem, { children: /* @__PURE__ */ jsx13(
|
383
399
|
BreadcrumbLink,
|
384
400
|
{
|
385
401
|
"data-test-id": "iadKcMAul3QAdvmfIQjRE",
|
@@ -391,15 +407,15 @@ var BreadCrumb = (props) => {
|
|
391
407
|
}
|
392
408
|
},
|
393
409
|
_hover: { textDecoration: "none" },
|
394
|
-
children: /* @__PURE__ */
|
410
|
+
children: /* @__PURE__ */ jsx13(Text, { color: val.disable ? neutral600 : primary500, textStyle: "text.sm", children: val.name })
|
395
411
|
}
|
396
412
|
) }, val.name)),
|
397
|
-
/* @__PURE__ */
|
413
|
+
/* @__PURE__ */ jsx13(BreadcrumbItem, { children: /* @__PURE__ */ jsx13(BreadcrumbLink, { _hover: { textDecor: "none", cursor: "default" }, children: /* @__PURE__ */ jsx13(Text, { color: "neutral.600", textStyle: "text.sm", children: title }) }) })
|
398
414
|
]
|
399
415
|
}
|
400
416
|
)
|
401
417
|
] }),
|
402
|
-
children && /* @__PURE__ */
|
418
|
+
children && /* @__PURE__ */ jsx13(Box4, { children })
|
403
419
|
]
|
404
420
|
}
|
405
421
|
);
|
@@ -417,10 +433,10 @@ var bread_crumb_default = BreadCrumb;
|
|
417
433
|
// src/components/card/components/card.tsx
|
418
434
|
import { Card, useStyleConfig as useStyleConfig2 } from "@chakra-ui/react";
|
419
435
|
import { forwardRef as forwardRef6 } from "react";
|
420
|
-
import { jsx as
|
436
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
421
437
|
var CardCustom = forwardRef6(({ children, ...rest }, ref) => {
|
422
438
|
const styles = useStyleConfig2("Card", rest);
|
423
|
-
return /* @__PURE__ */
|
439
|
+
return /* @__PURE__ */ jsx14(Card, { __css: styles, backgroundColor: "white.high", ref, ...rest, children });
|
424
440
|
});
|
425
441
|
CardCustom.defaultProps = {
|
426
442
|
withShadow: true,
|
@@ -429,14 +445,14 @@ CardCustom.defaultProps = {
|
|
429
445
|
var card_default = CardCustom;
|
430
446
|
|
431
447
|
// src/components/checkbox/components/checkbox.tsx
|
432
|
-
import { Box as
|
433
|
-
import { jsx as
|
448
|
+
import { Box as Box5, Checkbox, forwardRef as forwardRef7, Text as Text2 } from "@chakra-ui/react";
|
449
|
+
import { jsx as jsx15, jsxs as jsxs3 } from "react/jsx-runtime";
|
434
450
|
var CheckboxComponent = forwardRef7(
|
435
451
|
({ isError = false, helpText = "", errorText = "", boxProps, children, isDisabled, ...rest }, ref) => {
|
436
452
|
const variant = isError ? "errors" : "unstyled";
|
437
|
-
return /* @__PURE__ */ jsxs3(
|
438
|
-
/* @__PURE__ */
|
439
|
-
(isError || helpText) && /* @__PURE__ */
|
453
|
+
return /* @__PURE__ */ jsxs3(Box5, { ...boxProps, children: [
|
454
|
+
/* @__PURE__ */ jsx15(Box5, { display: "flex", children: /* @__PURE__ */ jsx15(Checkbox, { variant, ref, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx15(Text2, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
455
|
+
(isError || helpText) && /* @__PURE__ */ jsx15(Box5, { mt: "5px", ml: "24px", children: isError ? /* @__PURE__ */ jsx15(Text2, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) : /* @__PURE__ */ jsx15(Text2, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) })
|
440
456
|
] });
|
441
457
|
}
|
442
458
|
);
|
@@ -449,11 +465,11 @@ CheckboxComponent.defaultProps = {
|
|
449
465
|
var checkbox_default = CheckboxComponent;
|
450
466
|
|
451
467
|
// src/components/checkbox/components/checkbox-group.tsx
|
452
|
-
import { Box as
|
468
|
+
import { Box as Box7, CheckboxGroup, Stack } from "@chakra-ui/react";
|
453
469
|
|
454
470
|
// src/components/field/components/field.tsx
|
455
|
-
import { Box as
|
456
|
-
import { jsx as
|
471
|
+
import { Box as Box6, FormControl, FormErrorMessage, FormHelperText, FormLabel } from "@chakra-ui/react";
|
472
|
+
import { jsx as jsx16, jsxs as jsxs4 } from "react/jsx-runtime";
|
457
473
|
var Field = (props) => {
|
458
474
|
const {
|
459
475
|
label,
|
@@ -479,13 +495,13 @@ var Field = (props) => {
|
|
479
495
|
const justifyHelper = getJustifyContentHelper();
|
480
496
|
return /* @__PURE__ */ jsxs4(FormControl, { isInvalid: isError, ...boxProps, children: [
|
481
497
|
label && (typeof label === "string" ? /* @__PURE__ */ jsxs4(FormLabel, { mb: 1, fontSize: "text.sm", requiredIndicator: void 0, children: [
|
482
|
-
isRequired && /* @__PURE__ */
|
498
|
+
isRequired && /* @__PURE__ */ jsx16(Box6, { as: "span", color: "danger.500", ml: 0, mr: 1, children: "*" }),
|
483
499
|
label
|
484
500
|
] }) : label),
|
485
501
|
children,
|
486
|
-
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */ jsxs4(
|
487
|
-
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */
|
488
|
-
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */
|
502
|
+
(isError && errorMessage || leftHelperText || rightHelperText) && /* @__PURE__ */ jsxs4(Box6, { display: "flex", width: "full", justifyContent: justifyHelper, children: [
|
503
|
+
!isError ? leftHelperText && (typeof leftHelperText === "string" ? /* @__PURE__ */ jsx16(FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: leftHelperText }) : leftHelperText) : typeof errorMessage === "string" ? /* @__PURE__ */ jsx16(FormErrorMessage, { fontSize: "text.xs", color: "danger.500", mt: 1, children: errorMessage }) : errorMessage,
|
504
|
+
rightHelperText && (typeof rightHelperText === "string" ? /* @__PURE__ */ jsx16(FormHelperText, { fontSize: "text.xs", color: helperColor, mt: 1, children: rightHelperText }) : rightHelperText)
|
489
505
|
] })
|
490
506
|
] });
|
491
507
|
};
|
@@ -502,10 +518,10 @@ Field.defaultProps = {
|
|
502
518
|
var field_default = Field;
|
503
519
|
|
504
520
|
// src/components/checkbox/components/checkbox-group.tsx
|
505
|
-
import { jsx as
|
521
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
506
522
|
function CheckboxGroupComponent(props) {
|
507
523
|
const { children, label, helpText, isError, errorMessage, ...rest } = props;
|
508
|
-
return /* @__PURE__ */
|
524
|
+
return /* @__PURE__ */ jsx17(field_default, { ...rest, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ jsx17(Box7, { mt: "12px", children: /* @__PURE__ */ jsx17(CheckboxGroup, { ...rest, children: /* @__PURE__ */ jsx17(Stack, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
509
525
|
}
|
510
526
|
CheckboxGroupComponent.defaultProps = {
|
511
527
|
helpText: "",
|
@@ -530,10 +546,10 @@ import {
|
|
530
546
|
} from "@chakra-ui/react";
|
531
547
|
|
532
548
|
// src/components/chips/components/chips.tsx
|
533
|
-
import { Box as
|
549
|
+
import { Box as Box8, useStyleConfig as useStyleConfig3 } from "@chakra-ui/react";
|
534
550
|
import { Close as Close2 } from "@ctlyst.id/internal-icon";
|
535
551
|
import { useMemo } from "react";
|
536
|
-
import { jsx as
|
552
|
+
import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
537
553
|
var Chips = ({ children, ...rest }) => {
|
538
554
|
const { isActive, isDisabled, onClose } = rest;
|
539
555
|
const styles = useStyleConfig3("Chips", rest);
|
@@ -542,10 +558,10 @@ var Chips = ({ children, ...rest }) => {
|
|
542
558
|
if (isDisabled) return "black.low";
|
543
559
|
return "primary.500";
|
544
560
|
}, [isActive, isDisabled]);
|
545
|
-
return /* @__PURE__ */ jsxs5(
|
561
|
+
return /* @__PURE__ */ jsxs5(Box8, { __css: styles, display: "inline-flex", alignItems: "center", justifyContent: "center", ...rest, children: [
|
546
562
|
children,
|
547
|
-
onClose && /* @__PURE__ */
|
548
|
-
|
563
|
+
onClose && /* @__PURE__ */ jsx18(
|
564
|
+
Box8,
|
549
565
|
{
|
550
566
|
onClick: isDisabled ? void 0 : onClose,
|
551
567
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
@@ -553,7 +569,7 @@ var Chips = ({ children, ...rest }) => {
|
|
553
569
|
display: "flex",
|
554
570
|
alignItems: "center",
|
555
571
|
justifyContent: "center",
|
556
|
-
children: /* @__PURE__ */
|
572
|
+
children: /* @__PURE__ */ jsx18(Close2, { color: closeColor, size: 4 })
|
557
573
|
}
|
558
574
|
)
|
559
575
|
] });
|
@@ -568,17 +584,17 @@ Chips.defaultProps = {
|
|
568
584
|
var chips_default = Chips;
|
569
585
|
|
570
586
|
// src/components/counter/components/counter.tsx
|
571
|
-
import { Box as
|
587
|
+
import { Box as Box11, HStack, IconButton as IconButton2, Text as Text3 } from "@chakra-ui/react";
|
572
588
|
import { FiMinus, FiPlus } from "react-icons/fi";
|
573
589
|
|
574
590
|
// src/components/form/components/input-addon.tsx
|
575
591
|
import { InputLeftAddon, InputRightAddon } from "@chakra-ui/react";
|
576
|
-
import { jsx as
|
592
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
577
593
|
var InputAddonLeft = ({ children }) => {
|
578
|
-
return /* @__PURE__ */
|
594
|
+
return /* @__PURE__ */ jsx19(InputLeftAddon, { backgroundColor: "neutral.200", px: 3, py: 2.5, style: { border: 0, marginInlineEnd: 0 }, children });
|
579
595
|
};
|
580
596
|
var InputAddonRight = ({ children }) => {
|
581
|
-
return /* @__PURE__ */
|
597
|
+
return /* @__PURE__ */ jsx19(InputRightAddon, { backgroundColor: "neutral.200", px: 3, py: 2.5, style: { border: 0, marginInlineStart: 0 }, children });
|
582
598
|
};
|
583
599
|
|
584
600
|
// src/components/form/components/input-element.tsx
|
@@ -586,8 +602,8 @@ import { InputLeftElement } from "@chakra-ui/react";
|
|
586
602
|
import { InputRightElement } from "@chakra-ui/react";
|
587
603
|
|
588
604
|
// src/components/form/components/input-field.tsx
|
589
|
-
import { Box as
|
590
|
-
import { Close as Close3, Eye, EyeOff } from "@ctlyst.id/internal-icon";
|
605
|
+
import { Box as Box9, Input as ChakraInput, InputGroup } from "@chakra-ui/react";
|
606
|
+
import { Close as Close3, Eye as Eye2, EyeOff } from "@ctlyst.id/internal-icon";
|
591
607
|
import React3, { useMemo as useMemo2, useState } from "react";
|
592
608
|
|
593
609
|
// src/components/form/styles/input-field.ts
|
@@ -623,7 +639,7 @@ var getWrapperStyle = (props) => {
|
|
623
639
|
var input_field_default = getWrapperStyle;
|
624
640
|
|
625
641
|
// src/components/form/components/input-field.tsx
|
626
|
-
import { jsx as
|
642
|
+
import { jsx as jsx20, jsxs as jsxs6 } from "react/jsx-runtime";
|
627
643
|
var InputField = React3.forwardRef((props, ref) => {
|
628
644
|
const {
|
629
645
|
value,
|
@@ -658,7 +674,7 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
658
674
|
const iconColor = useMemo2(() => {
|
659
675
|
return isDisabled ? "black.low" : "black.medium";
|
660
676
|
}, [isDisabled]);
|
661
|
-
return /* @__PURE__ */
|
677
|
+
return /* @__PURE__ */ jsx20(
|
662
678
|
field_default,
|
663
679
|
{
|
664
680
|
label,
|
@@ -668,7 +684,7 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
668
684
|
leftHelperText,
|
669
685
|
rightHelperText,
|
670
686
|
isRequired,
|
671
|
-
children: /* @__PURE__ */
|
687
|
+
children: /* @__PURE__ */ jsx20(Box9, { __css: wrapperStyle, children: /* @__PURE__ */ jsxs6(
|
672
688
|
InputGroup,
|
673
689
|
{
|
674
690
|
size: size2,
|
@@ -677,7 +693,7 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
677
693
|
cursor: isDisabled ? "not-allowed" : "default",
|
678
694
|
children: [
|
679
695
|
addOnLeft,
|
680
|
-
/* @__PURE__ */
|
696
|
+
/* @__PURE__ */ jsx20(
|
681
697
|
ChakraInput,
|
682
698
|
{
|
683
699
|
ref,
|
@@ -690,7 +706,7 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
690
706
|
}
|
691
707
|
),
|
692
708
|
(withClear || isLoading || type === "password") && /* @__PURE__ */ jsxs6(
|
693
|
-
|
709
|
+
Box9,
|
694
710
|
{
|
695
711
|
"data-test-id": "CT_Component_ClearInput",
|
696
712
|
display: "flex",
|
@@ -699,18 +715,18 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
699
715
|
width: "16px",
|
700
716
|
mr: "10px",
|
701
717
|
children: [
|
702
|
-
withClear && !isLoading && /* @__PURE__ */
|
703
|
-
|
718
|
+
withClear && !isLoading && /* @__PURE__ */ jsx20(
|
719
|
+
Box9,
|
704
720
|
{
|
705
721
|
display: "flex",
|
706
722
|
justifyContent: "center",
|
707
723
|
onClick: !isDisabled ? onClear : void 0,
|
708
724
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
709
|
-
children: /* @__PURE__ */
|
725
|
+
children: /* @__PURE__ */ jsx20(Close3, { size: 4, color: iconColor })
|
710
726
|
}
|
711
727
|
),
|
712
|
-
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */
|
713
|
-
|
728
|
+
type === "password" && !isShowPassword && !isLoading && /* @__PURE__ */ jsx20(
|
729
|
+
Box9,
|
714
730
|
{
|
715
731
|
"data-test-id": "q2Bj2G4FlamXyHuRKMZ1Q",
|
716
732
|
onClick: () => {
|
@@ -719,11 +735,11 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
719
735
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
720
736
|
display: "flex",
|
721
737
|
justifyContent: "center",
|
722
|
-
children: /* @__PURE__ */
|
738
|
+
children: /* @__PURE__ */ jsx20(EyeOff, { size: 4, color: iconColor })
|
723
739
|
}
|
724
740
|
),
|
725
|
-
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */
|
726
|
-
|
741
|
+
type === "password" && isShowPassword && !isLoading && /* @__PURE__ */ jsx20(
|
742
|
+
Box9,
|
727
743
|
{
|
728
744
|
"data-test-id": "sfc2388bmeXBmdla45Ibk",
|
729
745
|
onClick: () => {
|
@@ -732,10 +748,10 @@ var InputField = React3.forwardRef((props, ref) => {
|
|
732
748
|
cursor: isDisabled ? "not-allowed" : "pointer",
|
733
749
|
display: "flex",
|
734
750
|
justifyContent: "center",
|
735
|
-
children: /* @__PURE__ */
|
751
|
+
children: /* @__PURE__ */ jsx20(Eye2, { size: 4, color: iconColor })
|
736
752
|
}
|
737
753
|
),
|
738
|
-
isLoading && /* @__PURE__ */
|
754
|
+
isLoading && /* @__PURE__ */ jsx20(loader_default, { size: "sm" })
|
739
755
|
]
|
740
756
|
}
|
741
757
|
),
|
@@ -756,14 +772,14 @@ InputField.defaultProps = {
|
|
756
772
|
var input_field_default2 = InputField;
|
757
773
|
|
758
774
|
// src/components/form/components/textarea.tsx
|
759
|
-
import { Box as
|
775
|
+
import { Box as Box10, Textarea as ChakraTextarea } from "@chakra-ui/react";
|
760
776
|
import React4 from "react";
|
761
|
-
import { jsx as
|
777
|
+
import { jsx as jsx21, jsxs as jsxs7 } from "react/jsx-runtime";
|
762
778
|
var TextareaField = React4.forwardRef((props, ref) => {
|
763
779
|
const { value, isLoading, ...inputProps } = props;
|
764
|
-
return /* @__PURE__ */
|
765
|
-
/* @__PURE__ */
|
766
|
-
isLoading && /* @__PURE__ */
|
780
|
+
return /* @__PURE__ */ jsx21(field_default, { ...inputProps, children: /* @__PURE__ */ jsxs7(Box10, { position: "relative", children: [
|
781
|
+
/* @__PURE__ */ jsx21(ChakraTextarea, { ref, value, ...inputProps }),
|
782
|
+
isLoading && /* @__PURE__ */ jsx21(Box10, { zIndex: 999, top: 2, right: 2, position: "absolute", children: /* @__PURE__ */ jsx21(loader_default, { size: "sm" }) })
|
767
783
|
] }) });
|
768
784
|
});
|
769
785
|
TextareaField.defaultProps = {
|
@@ -795,7 +811,7 @@ import {
|
|
795
811
|
} from "@chakra-ui/react";
|
796
812
|
|
797
813
|
// src/components/counter/components/counter.tsx
|
798
|
-
import { jsx as
|
814
|
+
import { jsx as jsx22, jsxs as jsxs8 } from "react/jsx-runtime";
|
799
815
|
var Counter = ({
|
800
816
|
value,
|
801
817
|
size: size2 = "xs",
|
@@ -823,9 +839,9 @@ var Counter = ({
|
|
823
839
|
const handleChange = (e) => {
|
824
840
|
onChange(+e.target.value);
|
825
841
|
};
|
826
|
-
return /* @__PURE__ */ jsxs8(
|
827
|
-
/* @__PURE__ */ jsxs8(HStack, { children: [
|
828
|
-
/* @__PURE__ */
|
842
|
+
return /* @__PURE__ */ jsxs8(Box11, { children: [
|
843
|
+
/* @__PURE__ */ jsxs8(HStack, { gap: "1", children: [
|
844
|
+
/* @__PURE__ */ jsx22(
|
829
845
|
IconButton2,
|
830
846
|
{
|
831
847
|
"aria-label": "minus",
|
@@ -833,10 +849,10 @@ var Counter = ({
|
|
833
849
|
onClick: decrement,
|
834
850
|
isDisabled: disabled || +value <= min,
|
835
851
|
size: size2,
|
836
|
-
icon: /* @__PURE__ */
|
852
|
+
icon: /* @__PURE__ */ jsx22(FiMinus, {})
|
837
853
|
}
|
838
854
|
),
|
839
|
-
/* @__PURE__ */
|
855
|
+
/* @__PURE__ */ jsx22(
|
840
856
|
input_field_default2,
|
841
857
|
{
|
842
858
|
"data-test-id": "CT_Component_Counter_input",
|
@@ -850,10 +866,11 @@ var Counter = ({
|
|
850
866
|
onChange: handleChange,
|
851
867
|
isReadOnly,
|
852
868
|
width: 12,
|
853
|
-
type: "number"
|
869
|
+
type: "number",
|
870
|
+
borderColor: "neutral.200"
|
854
871
|
}
|
855
872
|
),
|
856
|
-
/* @__PURE__ */
|
873
|
+
/* @__PURE__ */ jsx22(
|
857
874
|
IconButton2,
|
858
875
|
{
|
859
876
|
"aria-label": "plus",
|
@@ -861,11 +878,11 @@ var Counter = ({
|
|
861
878
|
onClick: increment,
|
862
879
|
isDisabled: disabled || +value >= max,
|
863
880
|
size: size2,
|
864
|
-
icon: /* @__PURE__ */
|
881
|
+
icon: /* @__PURE__ */ jsx22(FiPlus, {})
|
865
882
|
}
|
866
883
|
)
|
867
884
|
] }),
|
868
|
-
!isError ? /* @__PURE__ */
|
885
|
+
!isError ? /* @__PURE__ */ jsx22(Text3, { mt: 1, color: "black.medium", textStyle: "text.xs", children: helperText }) : /* @__PURE__ */ jsx22(Text3, { mt: 1, color: "danger.500", textStyle: "text.xs", children: error })
|
869
886
|
] });
|
870
887
|
};
|
871
888
|
var counter_default = Counter;
|
@@ -873,7 +890,7 @@ var counter_default = Counter;
|
|
873
890
|
// src/components/data-table/components/data-table.tsx
|
874
891
|
import { ChevronDownIcon, ChevronUpIcon, UpDownIcon } from "@chakra-ui/icons";
|
875
892
|
import {
|
876
|
-
Box as
|
893
|
+
Box as Box12,
|
877
894
|
Checkbox as Checkbox2,
|
878
895
|
Flex,
|
879
896
|
Skeleton as Skeleton2,
|
@@ -890,20 +907,46 @@ import { css } from "@emotion/react";
|
|
890
907
|
import { flexRender, getCoreRowModel, getSortedRowModel, useReactTable } from "@tanstack/react-table";
|
891
908
|
import * as React5 from "react";
|
892
909
|
import { useRef } from "react";
|
893
|
-
import { jsx as
|
910
|
+
import { jsx as jsx23, jsxs as jsxs9 } from "react/jsx-runtime";
|
894
911
|
var getCommonPinningStyles = (column) => {
|
895
912
|
const isPinned = column.getIsPinned();
|
896
913
|
const isLastLeftPinnedColumn = isPinned === "left" && column.getIsLastColumn("left");
|
897
914
|
const isFirstRightPinnedColumn = isPinned === "right" && column.getIsFirstColumn("right");
|
898
915
|
return {
|
899
|
-
// eslint-disable-next-line no-nested-ternary
|
900
|
-
boxShadow: isLastLeftPinnedColumn ? "-4px 0 4px -4px gray inset" : isFirstRightPinnedColumn ? "4px 0 4px -4px gray inset" : void 0,
|
901
916
|
left: isPinned === "left" ? `${column.getStart("left")}px` : void 0,
|
902
917
|
right: isPinned === "right" ? `${column.getAfter("right")}px` : void 0,
|
903
|
-
opacity: isPinned ? 0.95 : 1,
|
904
918
|
position: isPinned ? "sticky" : "relative",
|
905
919
|
width: column.getSize(),
|
906
|
-
zIndex: isPinned ? 1 : 0
|
920
|
+
zIndex: isPinned ? 1 : 0,
|
921
|
+
backgroundColor: "white",
|
922
|
+
...isLastLeftPinnedColumn ? {
|
923
|
+
padding: 0,
|
924
|
+
"&:after": {
|
925
|
+
content: "''",
|
926
|
+
position: "absolute",
|
927
|
+
width: "20%",
|
928
|
+
height: "100%",
|
929
|
+
right: "0px",
|
930
|
+
top: 0,
|
931
|
+
zIndex: -1,
|
932
|
+
boxShadow: "-10px 0px 20px 10px #00000010",
|
933
|
+
clipPath: "inset(0px -38px 0px 0px)"
|
934
|
+
}
|
935
|
+
} : {},
|
936
|
+
...isFirstRightPinnedColumn ? {
|
937
|
+
padding: "0px 0px 0px 8px",
|
938
|
+
"&:after": {
|
939
|
+
content: "''",
|
940
|
+
position: "absolute",
|
941
|
+
width: "20%",
|
942
|
+
height: "100%",
|
943
|
+
left: "0%",
|
944
|
+
top: 0,
|
945
|
+
zIndex: -1,
|
946
|
+
boxShadow: "10px 0px 20px 10px #00000010",
|
947
|
+
clipPath: "inset(0px 0px 0px -38px )"
|
948
|
+
}
|
949
|
+
} : {}
|
907
950
|
};
|
908
951
|
};
|
909
952
|
var useDataTable = ({
|
@@ -926,7 +969,7 @@ var useDataTable = ({
|
|
926
969
|
{
|
927
970
|
id: "select",
|
928
971
|
size: 32,
|
929
|
-
header: ({ table: table2 }) => /* @__PURE__ */
|
972
|
+
header: ({ table: table2 }) => /* @__PURE__ */ jsx23(
|
930
973
|
Checkbox2,
|
931
974
|
{
|
932
975
|
"data-test-id": "select-header-data-table",
|
@@ -937,7 +980,7 @@ var useDataTable = ({
|
|
937
980
|
}
|
938
981
|
}
|
939
982
|
),
|
940
|
-
cell: ({ row }) => /* @__PURE__ */
|
983
|
+
cell: ({ row }) => /* @__PURE__ */ jsx23(
|
941
984
|
Checkbox2,
|
942
985
|
{
|
943
986
|
"data-test-id": `select-data-table-${row.index}`,
|
@@ -1000,20 +1043,20 @@ var useDataTable = ({
|
|
1000
1043
|
};
|
1001
1044
|
};
|
1002
1045
|
var DataTable = React5.forwardRef((props, ref) => {
|
1003
|
-
const { isLoading, styles, headerSticky, onRowClick } = props;
|
1046
|
+
const { isLoading, styles, headerSticky, onRowClick, container } = props;
|
1004
1047
|
const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
|
1005
1048
|
React5.useImperativeHandle(ref, () => ({
|
1006
1049
|
toggleAllRowsSelected
|
1007
1050
|
}));
|
1008
|
-
return /* @__PURE__ */ jsxs9(
|
1051
|
+
return /* @__PURE__ */ jsxs9(Box12, { overflowX: "auto", position: "relative", maxW: "100%", minH: 400, w: "full", ...container, children: [
|
1009
1052
|
isLoading && /* @__PURE__ */ jsxs9(Table, { ...styles == null ? void 0 : styles.table, children: [
|
1010
|
-
/* @__PURE__ */
|
1053
|
+
/* @__PURE__ */ jsx23(Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx23(Tr, { mx: "2", ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => /* @__PURE__ */ jsx23(
|
1011
1054
|
Th,
|
1012
1055
|
{
|
1013
1056
|
colSpan: header.colSpan,
|
1014
1057
|
width: `${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`,
|
1015
1058
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1016
|
-
children: /* @__PURE__ */
|
1059
|
+
children: /* @__PURE__ */ jsx23(
|
1017
1060
|
Flex,
|
1018
1061
|
{
|
1019
1062
|
"data-test-id": "CT_component_data-table_loader",
|
@@ -1026,39 +1069,41 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1026
1069
|
},
|
1027
1070
|
header.id
|
1028
1071
|
)) }, headerGroup.id)) }),
|
1029
|
-
/* @__PURE__ */
|
1072
|
+
/* @__PURE__ */ jsx23(Tbody, { children: [...Array(5)].map((num) => /* @__PURE__ */ jsx23(Tr, { mx: "2", children: [...Array(generateColumn().length)].map((i) => /* @__PURE__ */ jsx23(Td, { width: 210, children: /* @__PURE__ */ jsx23(Skeleton2, { startColor: "gray.50", endColor: "gray.100", h: "30px", w: "100%" }, i) }, i)) }, num)) })
|
1030
1073
|
] }),
|
1031
1074
|
/* @__PURE__ */ jsxs9(Table, { ...styles == null ? void 0 : styles.table, children: [
|
1032
|
-
/* @__PURE__ */
|
1075
|
+
/* @__PURE__ */ jsx23(Thead, { ...(styles == null ? void 0 : styles.tableHead, headerSticky ? { position: "sticky", top: 0, bg: "white", zIndex: 1 } : {}), children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx23(Tr, { bg: useColorModeValue("initial", "ebony-clay.700"), ...styles == null ? void 0 : styles.tableRow, children: headerGroup.headers.map((header, index) => {
|
1033
1076
|
var _a;
|
1034
|
-
return /* @__PURE__ */
|
1077
|
+
return /* @__PURE__ */ jsx23(
|
1035
1078
|
Th,
|
1036
1079
|
{
|
1037
1080
|
colSpan: header.colSpan,
|
1038
1081
|
width: `${header.getSize() + (index === 0 || index === headerGroup.headers.length - 1 ? 16 : 0)}px`,
|
1039
|
-
|
1082
|
+
sx: getCommonPinningStyles(header.column),
|
1040
1083
|
...styles == null ? void 0 : styles.tableColumnHeader,
|
1041
1084
|
children: /* @__PURE__ */ jsxs9(
|
1042
1085
|
Flex,
|
1043
1086
|
{
|
1087
|
+
backgroundColor: "white",
|
1088
|
+
height: "100%",
|
1044
1089
|
"data-test-id": `CT_Container_TableHeader_${header.id}`,
|
1045
1090
|
textTransform: "capitalize",
|
1046
1091
|
userSelect: "none",
|
1047
1092
|
align: "center",
|
1048
1093
|
gap: 2,
|
1049
1094
|
children: [
|
1050
|
-
/* @__PURE__ */
|
1051
|
-
/* @__PURE__ */
|
1052
|
-
|
1095
|
+
/* @__PURE__ */ jsx23(Text4, { children: flexRender(header.column.columnDef.header, header.getContext()) }),
|
1096
|
+
/* @__PURE__ */ jsx23(
|
1097
|
+
Box12,
|
1053
1098
|
{
|
1054
1099
|
as: "span",
|
1055
1100
|
cursor: header.column.getCanSort() ? "pointer" : "default",
|
1056
1101
|
"data-test-id": `CT_Container_SortingIcon_${header.id}`,
|
1057
1102
|
onClick: header.column.getToggleSortingHandler(),
|
1058
1103
|
children: (_a = header.column.getCanSort() && {
|
1059
|
-
asc: /* @__PURE__ */
|
1060
|
-
desc: /* @__PURE__ */
|
1061
|
-
}[header.column.getIsSorted()]) != null ? _a : /* @__PURE__ */
|
1104
|
+
asc: /* @__PURE__ */ jsx23(ChevronUpIcon, {}),
|
1105
|
+
desc: /* @__PURE__ */ jsx23(ChevronDownIcon, {})
|
1106
|
+
}[header.column.getIsSorted()]) != null ? _a : /* @__PURE__ */ jsx23(UpDownIcon, { h: 2 })
|
1062
1107
|
}
|
1063
1108
|
)
|
1064
1109
|
]
|
@@ -1068,9 +1113,9 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1068
1113
|
header.id
|
1069
1114
|
);
|
1070
1115
|
}) }, headerGroup.id)) }),
|
1071
|
-
/* @__PURE__ */
|
1116
|
+
/* @__PURE__ */ jsx23(Tbody, { ...styles == null ? void 0 : styles.tableBody, children: table.getRowModel().rows.map((row) => {
|
1072
1117
|
const trRef = useRef();
|
1073
|
-
return /* @__PURE__ */
|
1118
|
+
return /* @__PURE__ */ jsx23(
|
1074
1119
|
Tr,
|
1075
1120
|
{
|
1076
1121
|
"data-test-id": "-RU0hNYGRzeVM3HQ4cXHl",
|
@@ -1097,16 +1142,16 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1097
1142
|
onRowClick(row.original);
|
1098
1143
|
}
|
1099
1144
|
},
|
1100
|
-
children: row.getVisibleCells().map((cell) => /* @__PURE__ */
|
1145
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx23(
|
1101
1146
|
Td,
|
1102
1147
|
{
|
1103
1148
|
"data-test-id": `CT_Component_TableCell_${cell.id}`,
|
1104
1149
|
fontSize: "text.sm",
|
1105
1150
|
color: useColorModeValue("dark.800", "dark.300"),
|
1106
|
-
|
1151
|
+
sx: getCommonPinningStyles(cell.column),
|
1107
1152
|
...styles == null ? void 0 : styles.tableCell,
|
1108
|
-
children: /* @__PURE__ */
|
1109
|
-
|
1153
|
+
children: /* @__PURE__ */ jsx23(Flex, { height: "100%", backgroundColor: "white", align: "center", children: /* @__PURE__ */ jsx23(
|
1154
|
+
Box12,
|
1110
1155
|
{
|
1111
1156
|
tabIndex: 0,
|
1112
1157
|
display: "inline-block",
|
@@ -1119,7 +1164,7 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1119
1164
|
},
|
1120
1165
|
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
1121
1166
|
}
|
1122
|
-
)
|
1167
|
+
) })
|
1123
1168
|
},
|
1124
1169
|
cell.id
|
1125
1170
|
))
|
@@ -1131,12 +1176,8 @@ var DataTable = React5.forwardRef((props, ref) => {
|
|
1131
1176
|
] });
|
1132
1177
|
});
|
1133
1178
|
DataTable.defaultProps = {
|
1179
|
+
container: void 0,
|
1134
1180
|
withSelectedRow: false,
|
1135
|
-
overflowX: "scroll",
|
1136
|
-
pos: "relative",
|
1137
|
-
maxW: "100%",
|
1138
|
-
minH: 400,
|
1139
|
-
w: "full",
|
1140
1181
|
styles: void 0,
|
1141
1182
|
isLoading: void 0,
|
1142
1183
|
onSelectedRow: void 0,
|
@@ -1167,10 +1208,10 @@ import { FiCalendar, FiX } from "react-icons/fi";
|
|
1167
1208
|
// src/components/datepicker/components/styles.tsx
|
1168
1209
|
import { useColorMode } from "@chakra-ui/system";
|
1169
1210
|
import { Global } from "@emotion/react";
|
1170
|
-
import { jsx as
|
1211
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
1171
1212
|
var Styles = () => {
|
1172
1213
|
const { colorMode } = useColorMode();
|
1173
|
-
return /* @__PURE__ */
|
1214
|
+
return /* @__PURE__ */ jsx24(
|
1174
1215
|
Global,
|
1175
1216
|
{
|
1176
1217
|
styles: `
|
@@ -1984,7 +2025,7 @@ var styles_default = Styles;
|
|
1984
2025
|
// src/components/datepicker/components/time-input.tsx
|
1985
2026
|
import { Flex as Flex2, Input, InputGroup as InputGroup3, InputRightAddon as InputRightAddon3, Text as Text5 } from "@chakra-ui/react";
|
1986
2027
|
import React6 from "react";
|
1987
|
-
import { jsx as
|
2028
|
+
import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
|
1988
2029
|
var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
1989
2030
|
const [time, setTime] = React6.useState(value || "00:00");
|
1990
2031
|
const handleChange = (e) => {
|
@@ -1993,10 +2034,10 @@ var TimeInput = ({ value, onChange, label, rightAddon }) => {
|
|
1993
2034
|
if (onChange) onChange(((_b = e.target) == null ? void 0 : _b.value) || "00:00");
|
1994
2035
|
};
|
1995
2036
|
return /* @__PURE__ */ jsxs10(Flex2, { flexDir: "column", alignItems: "center", justifyContent: "center", p: 4, pt: 0, children: [
|
1996
|
-
/* @__PURE__ */
|
2037
|
+
/* @__PURE__ */ jsx25(Text5, { mb: 2, children: label }),
|
1997
2038
|
/* @__PURE__ */ jsxs10(InputGroup3, { alignItems: "center", justifyContent: "center", children: [
|
1998
|
-
/* @__PURE__ */
|
1999
|
-
rightAddon && /* @__PURE__ */
|
2039
|
+
/* @__PURE__ */ jsx25(Input, { onChange: handleChange, type: "time", value: time, "data-test-id": "CT_Component_datepicker_input_time" }),
|
2040
|
+
rightAddon && /* @__PURE__ */ jsx25(InputRightAddon3, { children: rightAddon })
|
2000
2041
|
] })
|
2001
2042
|
] });
|
2002
2043
|
};
|
@@ -2010,7 +2051,7 @@ TimeInput.defaultProps = {
|
|
2010
2051
|
var time_input_default = TimeInput;
|
2011
2052
|
|
2012
2053
|
// src/components/datepicker/components/datepicker.tsx
|
2013
|
-
import { Fragment, jsx as
|
2054
|
+
import { Fragment, jsx as jsx26, jsxs as jsxs11 } from "react/jsx-runtime";
|
2014
2055
|
var Datepicker = ({
|
2015
2056
|
id,
|
2016
2057
|
label,
|
@@ -2035,18 +2076,18 @@ var Datepicker = ({
|
|
2035
2076
|
return {
|
2036
2077
|
timeInputLabel: "",
|
2037
2078
|
showTimeInput: true,
|
2038
|
-
customTimeInput: /* @__PURE__ */
|
2079
|
+
customTimeInput: /* @__PURE__ */ jsx26(time_input_default, {})
|
2039
2080
|
};
|
2040
2081
|
};
|
2041
2082
|
const component = /* @__PURE__ */ jsxs11(Fragment, { children: [
|
2042
|
-
/* @__PURE__ */
|
2043
|
-
/* @__PURE__ */
|
2083
|
+
/* @__PURE__ */ jsx26(styles_default, {}),
|
2084
|
+
/* @__PURE__ */ jsx26(
|
2044
2085
|
ReactDatePicker,
|
2045
2086
|
{
|
2046
2087
|
id,
|
2047
2088
|
name,
|
2048
2089
|
selected,
|
2049
|
-
customInput: /* @__PURE__ */
|
2090
|
+
customInput: /* @__PURE__ */ jsx26(Input2, { autoComplete: "off", ...wrapperStyle }),
|
2050
2091
|
dateFormat,
|
2051
2092
|
showPopperArrow: false,
|
2052
2093
|
calendarClassName: cx8({ inline: props.inline }),
|
@@ -2061,15 +2102,15 @@ var Datepicker = ({
|
|
2061
2102
|
return component;
|
2062
2103
|
}
|
2063
2104
|
return /* @__PURE__ */ jsxs11(FormControl3, { isRequired, "data-test-id": "CT_Component_datepicker_wrapper", isInvalid: isError, children: [
|
2064
|
-
label && /* @__PURE__ */
|
2105
|
+
label && /* @__PURE__ */ jsx26(FormLabel3, { fontSize: "text.sm", children: label }),
|
2065
2106
|
/* @__PURE__ */ jsxs11(InputGroup4, { children: [
|
2066
2107
|
component,
|
2067
2108
|
/* @__PURE__ */ jsxs11(InputRightElement3, { children: [
|
2068
|
-
!value && /* @__PURE__ */
|
2069
|
-
value && /* @__PURE__ */
|
2109
|
+
!value && /* @__PURE__ */ jsx26(FiCalendar, {}),
|
2110
|
+
value && /* @__PURE__ */ jsx26(FiX, { "data-test-id": "bcpJJyCP0z_RIAGZXDU6s", onClick: onClear, cursor: "pointer" })
|
2070
2111
|
] })
|
2071
2112
|
] }),
|
2072
|
-
!isError ? /* @__PURE__ */
|
2113
|
+
!isError ? /* @__PURE__ */ jsx26(FormHelperText3, { fontSize: "text.xs", mt: 1, children: helperText }) : /* @__PURE__ */ jsx26(FormErrorMessage3, { fontSize: "text.xs", mt: 1, children: error })
|
2073
2114
|
] });
|
2074
2115
|
};
|
2075
2116
|
Datepicker.defaultProps = {
|
@@ -2087,14 +2128,14 @@ Datepicker.defaultProps = {
|
|
2087
2128
|
var datepicker_default = Datepicker;
|
2088
2129
|
|
2089
2130
|
// src/components/datepicker/components/datepicker-month/datepicker-month.tsx
|
2090
|
-
import { Box as
|
2131
|
+
import { Box as Box13, Input as Input3 } from "@chakra-ui/react";
|
2091
2132
|
import { css as css2 } from "@emotion/react";
|
2092
2133
|
import React7 from "react";
|
2093
|
-
import { jsx as
|
2134
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
2094
2135
|
var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
2095
2136
|
const [date, setDate] = React7.useState(null);
|
2096
|
-
return /* @__PURE__ */
|
2097
|
-
|
2137
|
+
return /* @__PURE__ */ jsx27(
|
2138
|
+
Box13,
|
2098
2139
|
{
|
2099
2140
|
fontSize: "12px",
|
2100
2141
|
lineHeight: "18px",
|
@@ -2108,7 +2149,7 @@ var DatePickerMonth = ({ onChange, min, max, ...props }) => {
|
|
2108
2149
|
width: 58px;
|
2109
2150
|
}
|
2110
2151
|
`,
|
2111
|
-
children: /* @__PURE__ */
|
2152
|
+
children: /* @__PURE__ */ jsx27(
|
2112
2153
|
Input3,
|
2113
2154
|
{
|
2114
2155
|
"data-test-id": props["data-test-id"],
|
@@ -2146,11 +2187,11 @@ DatePickerMonth.defaultProps = {
|
|
2146
2187
|
var datepicker_month_default = DatePickerMonth;
|
2147
2188
|
|
2148
2189
|
// src/components/datepicker/components/datepicker-month/multi-datepicker-month.tsx
|
2149
|
-
import { Box as
|
2190
|
+
import { Box as Box14 } from "@chakra-ui/react";
|
2150
2191
|
import styled from "@emotion/styled";
|
2151
2192
|
import React8 from "react";
|
2152
|
-
import { jsx as
|
2153
|
-
var MultiDateWrapper = styled(
|
2193
|
+
import { jsx as jsx28, jsxs as jsxs12 } from "react/jsx-runtime";
|
2194
|
+
var MultiDateWrapper = styled(Box14)`
|
2154
2195
|
display: flex;
|
2155
2196
|
align-items: center;
|
2156
2197
|
width: fit-content;
|
@@ -2167,7 +2208,7 @@ var MultiDatePickerMonth = ({
|
|
2167
2208
|
}) => {
|
2168
2209
|
const [date, setDate] = React8.useState([null, null]);
|
2169
2210
|
return /* @__PURE__ */ jsxs12(MultiDateWrapper, { isError, children: [
|
2170
|
-
/* @__PURE__ */
|
2211
|
+
/* @__PURE__ */ jsx28(
|
2171
2212
|
datepicker_month_default,
|
2172
2213
|
{
|
2173
2214
|
"data-test-id": "CT_DatePickerMonth_StartDate",
|
@@ -2179,8 +2220,8 @@ var MultiDatePickerMonth = ({
|
|
2179
2220
|
max
|
2180
2221
|
}
|
2181
2222
|
),
|
2182
|
-
/* @__PURE__ */
|
2183
|
-
/* @__PURE__ */
|
2223
|
+
/* @__PURE__ */ jsx28(Box14, { children: "-" }),
|
2224
|
+
/* @__PURE__ */ jsx28(
|
2184
2225
|
datepicker_month_default,
|
2185
2226
|
{
|
2186
2227
|
"data-test-id": "CT_DatePickerMonth_EndDate",
|
@@ -2203,7 +2244,7 @@ var multi_datepicker_month_default = MultiDatePickerMonth;
|
|
2203
2244
|
|
2204
2245
|
// src/components/dialog/components/dialog.tsx
|
2205
2246
|
import { Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, Text as Text6 } from "@chakra-ui/react";
|
2206
|
-
import { jsx as
|
2247
|
+
import { jsx as jsx29, jsxs as jsxs13 } from "react/jsx-runtime";
|
2207
2248
|
var Dialog = ({
|
2208
2249
|
title,
|
2209
2250
|
content,
|
@@ -2214,11 +2255,11 @@ var Dialog = ({
|
|
2214
2255
|
...props
|
2215
2256
|
}) => {
|
2216
2257
|
return /* @__PURE__ */ jsxs13(Modal, { ...props, children: [
|
2217
|
-
isModalOverlay && /* @__PURE__ */
|
2218
|
-
/* @__PURE__ */ jsxs13(ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, children: [
|
2219
|
-
/* @__PURE__ */
|
2220
|
-
/* @__PURE__ */
|
2221
|
-
/* @__PURE__ */
|
2258
|
+
isModalOverlay && /* @__PURE__ */ jsx29(ModalOverlay, { pointerEvents: isOverlayClickable ? "auto" : "none" }),
|
2259
|
+
/* @__PURE__ */ jsxs13(ModalContent, { bgColor: "neutral.50", fontFamily: "Poppins", width, minW: "400px", children: [
|
2260
|
+
/* @__PURE__ */ jsx29(ModalHeader, { bgColor: "neutral.200", py: 2, px: 4, borderTopRadius: "sm", children: /* @__PURE__ */ jsx29(Text6, { textStyle: "text.lg", fontWeight: "normal", children: title }) }),
|
2261
|
+
/* @__PURE__ */ jsx29(ModalBody, { p: 4, textStyle: "text.md", children: content }),
|
2262
|
+
/* @__PURE__ */ jsx29(ModalFooter, { bgColor: "neutral.200", p: 4, borderBottomRadius: "sm", children: footer })
|
2222
2263
|
] })
|
2223
2264
|
] });
|
2224
2265
|
};
|
@@ -2233,12 +2274,12 @@ var dialog_default = Dialog;
|
|
2233
2274
|
import { Flex as Flex4, HStack as HStack3 } from "@chakra-ui/react";
|
2234
2275
|
|
2235
2276
|
// src/components/header/components/logo.tsx
|
2236
|
-
import { Box as
|
2237
|
-
import { jsx as
|
2277
|
+
import { Box as Box15, Image, useColorModeValue as useColorModeValue2 } from "@chakra-ui/react";
|
2278
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
2238
2279
|
var Logo = ({ url, imageUrl, height }) => {
|
2239
2280
|
if (url)
|
2240
|
-
return /* @__PURE__ */
|
2241
|
-
return /* @__PURE__ */
|
2281
|
+
return /* @__PURE__ */ jsx30(Box15, { as: "a", href: url, cursor: "pointer", target: "_self", children: /* @__PURE__ */ jsx30(Image, { w: "100%", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl }) });
|
2282
|
+
return /* @__PURE__ */ jsx30(Image, { w: "100%", h: height != null ? height : 9, maxH: height != null ? height : 9, src: imageUrl, alt: imageUrl });
|
2242
2283
|
};
|
2243
2284
|
Logo.defaultProps = {
|
2244
2285
|
url: void 0,
|
@@ -2248,7 +2289,7 @@ Logo.defaultProps = {
|
|
2248
2289
|
// src/components/header/components/profile.tsx
|
2249
2290
|
import {
|
2250
2291
|
Avatar,
|
2251
|
-
Box as
|
2292
|
+
Box as Box16,
|
2252
2293
|
Flex as Flex3,
|
2253
2294
|
HStack as HStack2,
|
2254
2295
|
Popover,
|
@@ -2262,13 +2303,13 @@ import {
|
|
2262
2303
|
VStack
|
2263
2304
|
} from "@chakra-ui/react";
|
2264
2305
|
import { FiPower } from "react-icons/fi";
|
2265
|
-
import { Fragment as Fragment2, jsx as
|
2306
|
+
import { Fragment as Fragment2, jsx as jsx31, jsxs as jsxs14 } from "react/jsx-runtime";
|
2266
2307
|
var Profile = ({ color, brandColor, data, onLogout }) => {
|
2267
2308
|
var _a;
|
2268
2309
|
const { isOpen, onToggle, onClose } = useDisclosure();
|
2269
2310
|
return /* @__PURE__ */ jsxs14(Popover, { placement: "bottom-end", isOpen, onClose, children: [
|
2270
|
-
/* @__PURE__ */
|
2271
|
-
|
2311
|
+
/* @__PURE__ */ jsx31(
|
2312
|
+
Box16,
|
2272
2313
|
{
|
2273
2314
|
"data-test-id": "WE0UYbA93LOZy6S09IhDO",
|
2274
2315
|
as: "button",
|
@@ -2280,20 +2321,20 @@ var Profile = ({ color, brandColor, data, onLogout }) => {
|
|
2280
2321
|
color,
|
2281
2322
|
children: /* @__PURE__ */ jsxs14(HStack2, { children: [
|
2282
2323
|
/* @__PURE__ */ jsxs14(VStack, { alignItems: "flex-end", spacing: 0, ml: "2", color, children: [
|
2283
|
-
/* @__PURE__ */
|
2324
|
+
/* @__PURE__ */ jsx31(Text7, { textStyle: "text.xs", mb: 1, children: data == null ? void 0 : data.email }),
|
2284
2325
|
/* @__PURE__ */ jsxs14(Flex3, { alignItems: "center", children: [
|
2285
|
-
(data == null ? void 0 : data.userRole) && /* @__PURE__ */
|
2286
|
-
/* @__PURE__ */
|
2326
|
+
(data == null ? void 0 : data.userRole) && /* @__PURE__ */ jsx31(Text7, { textStyle: "text.xs", children: (data == null ? void 0 : data.userRole) || "user" }),
|
2327
|
+
/* @__PURE__ */ jsx31(Box16, { h: "3", mx: "1", borderLeft: "1px solid", borderColor: "neutral.400" }),
|
2287
2328
|
typeof (data == null ? void 0 : data.office) === "object" ? /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
2288
|
-
/* @__PURE__ */
|
2329
|
+
/* @__PURE__ */ jsx31(Text7, { textStyle: "text.xs", children: data.office[0] }),
|
2289
2330
|
data.office.length > 1 && /* @__PURE__ */ jsxs14(badge_default, { ml: "1", pill: true, variant: "neutral-light", children: [
|
2290
2331
|
data.office.length - 1,
|
2291
2332
|
"+"
|
2292
2333
|
] })
|
2293
|
-
] }) : /* @__PURE__ */
|
2334
|
+
] }) : /* @__PURE__ */ jsx31(Text7, { textStyle: "text.xs", children: (data == null ? void 0 : data.office) || "office" })
|
2294
2335
|
] })
|
2295
2336
|
] }),
|
2296
|
-
/* @__PURE__ */
|
2337
|
+
/* @__PURE__ */ jsx31(PopoverTrigger, { children: /* @__PURE__ */ jsx31(
|
2297
2338
|
Avatar,
|
2298
2339
|
{
|
2299
2340
|
size: "sm",
|
@@ -2310,8 +2351,8 @@ var Profile = ({ color, brandColor, data, onLogout }) => {
|
|
2310
2351
|
}
|
2311
2352
|
),
|
2312
2353
|
/* @__PURE__ */ jsxs14(PopoverContent, { bg: "white", maxW: 200, children: [
|
2313
|
-
/* @__PURE__ */
|
2314
|
-
/* @__PURE__ */
|
2354
|
+
/* @__PURE__ */ jsx31(PopoverArrow, { bg: "white" }),
|
2355
|
+
/* @__PURE__ */ jsx31(PopoverBody, { p: 1, children: /* @__PURE__ */ jsxs14(
|
2315
2356
|
Flex3,
|
2316
2357
|
{
|
2317
2358
|
"data-test-id": "gA7F9pucPX_Q3_dkgXIYZ",
|
@@ -2324,8 +2365,8 @@ var Profile = ({ color, brandColor, data, onLogout }) => {
|
|
2324
2365
|
onClick: onLogout,
|
2325
2366
|
textStyle: "text.xs",
|
2326
2367
|
children: [
|
2327
|
-
/* @__PURE__ */
|
2328
|
-
/* @__PURE__ */
|
2368
|
+
/* @__PURE__ */ jsx31(FiPower, {}),
|
2369
|
+
/* @__PURE__ */ jsx31(Text7, { ml: 2, children: "Logout" })
|
2329
2370
|
]
|
2330
2371
|
}
|
2331
2372
|
) })
|
@@ -2341,17 +2382,17 @@ Profile.defaultProps = {
|
|
2341
2382
|
var profile_default = Profile;
|
2342
2383
|
|
2343
2384
|
// src/components/header/components/switch-mode.tsx
|
2344
|
-
import { Box as
|
2385
|
+
import { Box as Box17, useColorMode as useColorMode2 } from "@chakra-ui/react";
|
2345
2386
|
import { FiMoon, FiSun } from "react-icons/fi";
|
2346
|
-
import { jsx as
|
2387
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
2347
2388
|
var SwitchMode = () => {
|
2348
2389
|
const { colorMode, toggleColorMode } = useColorMode2();
|
2349
|
-
return /* @__PURE__ */
|
2390
|
+
return /* @__PURE__ */ jsx32(Box17, { "data-test-id": "rhYuTDCiWkFqr96upiEEh", mx: 5, onClick: toggleColorMode, cursor: "pointer", children: colorMode === "light" ? /* @__PURE__ */ jsx32(FiMoon, { size: 20 }) : /* @__PURE__ */ jsx32(FiSun, { size: 20 }) });
|
2350
2391
|
};
|
2351
2392
|
var switch_mode_default = SwitchMode;
|
2352
2393
|
|
2353
2394
|
// src/components/header/components/version.tsx
|
2354
|
-
import { Box as
|
2395
|
+
import { Box as Box18 } from "@chakra-ui/react";
|
2355
2396
|
|
2356
2397
|
// src/components/header/utils/formatter.ts
|
2357
2398
|
function environmentName(env) {
|
@@ -2366,9 +2407,9 @@ function environmentName(env) {
|
|
2366
2407
|
}
|
2367
2408
|
|
2368
2409
|
// src/components/header/components/version.tsx
|
2369
|
-
import { Fragment as Fragment3, jsx as
|
2410
|
+
import { Fragment as Fragment3, jsx as jsx33, jsxs as jsxs15 } from "react/jsx-runtime";
|
2370
2411
|
var Version = ({ hideEnv, version, environment, onOpenModalRelease }) => /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
2371
|
-
version && /* @__PURE__ */
|
2412
|
+
version && /* @__PURE__ */ jsx33(
|
2372
2413
|
badge_default,
|
2373
2414
|
{
|
2374
2415
|
fontSize: "8px",
|
@@ -2379,8 +2420,8 @@ var Version = ({ hideEnv, version, environment, onOpenModalRelease }) => /* @__P
|
|
2379
2420
|
children: version
|
2380
2421
|
}
|
2381
2422
|
),
|
2382
|
-
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */
|
2383
|
-
|
2423
|
+
!hideEnv && environmentName(environment) !== null && version && /* @__PURE__ */ jsx33(
|
2424
|
+
Box18,
|
2384
2425
|
{
|
2385
2426
|
background: "primary.50",
|
2386
2427
|
color: "primary.500",
|
@@ -2402,7 +2443,7 @@ Version.defaultProps = {
|
|
2402
2443
|
var version_default = Version;
|
2403
2444
|
|
2404
2445
|
// src/components/header/components/header.tsx
|
2405
|
-
import { jsx as
|
2446
|
+
import { jsx as jsx34, jsxs as jsxs16 } from "react/jsx-runtime";
|
2406
2447
|
var Header = ({
|
2407
2448
|
brandColor,
|
2408
2449
|
data,
|
@@ -2419,14 +2460,14 @@ var Header = ({
|
|
2419
2460
|
profile,
|
2420
2461
|
bg = "white",
|
2421
2462
|
...props
|
2422
|
-
}) => /* @__PURE__ */
|
2463
|
+
}) => /* @__PURE__ */ jsx34(Flex4, { minH: 15, bg, shadow: "raised", px: 6, py: 3, alignItems: "center", ...props, children: /* @__PURE__ */ jsxs16(Flex4, { h: "auto", w: "full", alignItems: "center", justifyContent: profile ? "flex-end" : "space-between", pos: "relative", children: [
|
2423
2464
|
mainLogo && /* @__PURE__ */ jsxs16(Flex4, { alignItems: "center", children: [
|
2424
|
-
/* @__PURE__ */
|
2465
|
+
/* @__PURE__ */ jsx34(Logo, { url: urlLogo, imageUrl: mainLogo, height: mainLogoSize }),
|
2425
2466
|
children && children
|
2426
2467
|
] }),
|
2427
2468
|
centerLogo && /* @__PURE__ */ jsxs16(HStack3, { w: "fit-content", spacing: 2, alignItems: "center", pos: "absolute", left: "50%", transform: "translate(-50%,0)", children: [
|
2428
|
-
/* @__PURE__ */
|
2429
|
-
/* @__PURE__ */
|
2469
|
+
/* @__PURE__ */ jsx34(Logo, { url: urlLogo, imageUrl: centerLogo, height: centerLogoSize }),
|
2470
|
+
/* @__PURE__ */ jsx34(
|
2430
2471
|
version_default,
|
2431
2472
|
{
|
2432
2473
|
hideEnv,
|
@@ -2437,8 +2478,8 @@ var Header = ({
|
|
2437
2478
|
)
|
2438
2479
|
] }),
|
2439
2480
|
profile || /* @__PURE__ */ jsxs16(Flex4, { alignItems: "center", children: [
|
2440
|
-
!hideSwitchMode && /* @__PURE__ */
|
2441
|
-
/* @__PURE__ */
|
2481
|
+
!hideSwitchMode && /* @__PURE__ */ jsx34(switch_mode_default, {}),
|
2482
|
+
/* @__PURE__ */ jsx34(profile_default, { color: props.color, brandColor, data, onLogout })
|
2442
2483
|
] })
|
2443
2484
|
] }) });
|
2444
2485
|
Header.defaultProps = {
|
@@ -2462,7 +2503,7 @@ import { Icon, IconProps, Image as Image2, ImageProps } from "@chakra-ui/react";
|
|
2462
2503
|
|
2463
2504
|
// src/components/layouting/index.ts
|
2464
2505
|
import {
|
2465
|
-
Box as
|
2506
|
+
Box as Box19,
|
2466
2507
|
BoxProps,
|
2467
2508
|
Center,
|
2468
2509
|
Container,
|
@@ -2493,12 +2534,12 @@ import { List, ListIcon, ListItem, ListItemProps, ListProps, OrderedList, Unorde
|
|
2493
2534
|
// src/components/modal/components/modal-back-button.tsx
|
2494
2535
|
import { ChevronLeftIcon } from "@chakra-ui/icons";
|
2495
2536
|
import { IconButton as IconButton3 } from "@chakra-ui/react";
|
2496
|
-
import { jsx as
|
2537
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
2497
2538
|
var ModalBackButton = ({ onClick }) => {
|
2498
|
-
return /* @__PURE__ */
|
2539
|
+
return /* @__PURE__ */ jsx35(
|
2499
2540
|
IconButton3,
|
2500
2541
|
{
|
2501
|
-
icon: /* @__PURE__ */
|
2542
|
+
icon: /* @__PURE__ */ jsx35(ChevronLeftIcon, { w: "4.5", h: "4.5" }),
|
2502
2543
|
size: "sm",
|
2503
2544
|
minW: "6",
|
2504
2545
|
h: "6",
|
@@ -2518,18 +2559,18 @@ var modal_back_button_default = ModalBackButton;
|
|
2518
2559
|
// src/components/modal/components/modal-body.tsx
|
2519
2560
|
import { ModalBody as ChakraModalBody, useColorModeValue as useColorModeValue4 } from "@chakra-ui/react";
|
2520
2561
|
import React9 from "react";
|
2521
|
-
import { jsx as
|
2562
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
2522
2563
|
var ModalBody2 = React9.forwardRef(({ children, ...rest }, ref) => {
|
2523
|
-
return /* @__PURE__ */
|
2564
|
+
return /* @__PURE__ */ jsx36(ChakraModalBody, { px: 4, py: 2, ref, background: useColorModeValue4("white", "mirage.900"), ...rest, children });
|
2524
2565
|
});
|
2525
2566
|
var modal_body_default = ModalBody2;
|
2526
2567
|
|
2527
2568
|
// src/components/modal/components/modal-close-button.tsx
|
2528
2569
|
import { ModalCloseButton as ChakraModalCloseButton, useColorModeValue as useColorModeValue5 } from "@chakra-ui/react";
|
2529
2570
|
import { forwardRef as forwardRef9 } from "react";
|
2530
|
-
import { jsx as
|
2571
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
2531
2572
|
var ModalCloseButton = forwardRef9((props, ref) => {
|
2532
|
-
return /* @__PURE__ */
|
2573
|
+
return /* @__PURE__ */ jsx37(
|
2533
2574
|
ChakraModalCloseButton,
|
2534
2575
|
{
|
2535
2576
|
ref,
|
@@ -2547,9 +2588,9 @@ var modal_close_button_default = ModalCloseButton;
|
|
2547
2588
|
// src/components/modal/components/modal-footer.tsx
|
2548
2589
|
import { ModalFooter as ChakraModalFooter, useColorModeValue as useColorModeValue6 } from "@chakra-ui/react";
|
2549
2590
|
import { forwardRef as forwardRef10 } from "react";
|
2550
|
-
import { jsx as
|
2591
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
2551
2592
|
var ModalFooter2 = forwardRef10(({ children, ...rest }, ref) => {
|
2552
|
-
return /* @__PURE__ */
|
2593
|
+
return /* @__PURE__ */ jsx38(
|
2553
2594
|
ChakraModalFooter,
|
2554
2595
|
{
|
2555
2596
|
ref,
|
@@ -2565,9 +2606,9 @@ var modal_footer_default = ModalFooter2;
|
|
2565
2606
|
// src/components/modal/components/modal-header.tsx
|
2566
2607
|
import { ModalHeader as ChakraModalHeader, useColorModeValue as useColorModeValue7 } from "@chakra-ui/react";
|
2567
2608
|
import { forwardRef as forwardRef11 } from "react";
|
2568
|
-
import { jsx as
|
2609
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
2569
2610
|
var ModalHeader2 = forwardRef11(({ children, ...rest }, ref) => {
|
2570
|
-
return /* @__PURE__ */
|
2611
|
+
return /* @__PURE__ */ jsx39(
|
2571
2612
|
ChakraModalHeader,
|
2572
2613
|
{
|
2573
2614
|
ref,
|
@@ -2625,7 +2666,7 @@ import {
|
|
2625
2666
|
// src/components/navigation/components/navigation.tsx
|
2626
2667
|
import { ChevronDownIcon as ChevronDownIcon2 } from "@chakra-ui/icons";
|
2627
2668
|
import {
|
2628
|
-
Box as
|
2669
|
+
Box as Box20,
|
2629
2670
|
Flex as Flex6,
|
2630
2671
|
HStack as HStack5,
|
2631
2672
|
Icon as Icon2,
|
@@ -2656,12 +2697,12 @@ import {
|
|
2656
2697
|
|
2657
2698
|
// src/components/navigation/components/customer-icon.tsx
|
2658
2699
|
import { createIcon } from "@chakra-ui/react";
|
2659
|
-
import { jsx as
|
2700
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
2660
2701
|
var CustomerIcon = createIcon({
|
2661
2702
|
displayName: "CustomerIcon",
|
2662
2703
|
viewBox: "0 0 16 16",
|
2663
2704
|
path: [
|
2664
|
-
/* @__PURE__ */
|
2705
|
+
/* @__PURE__ */ jsx40(
|
2665
2706
|
"path",
|
2666
2707
|
{
|
2667
2708
|
fill: "currentColor",
|
@@ -2670,14 +2711,14 @@ var CustomerIcon = createIcon({
|
|
2670
2711
|
clipRule: "inherit"
|
2671
2712
|
}
|
2672
2713
|
),
|
2673
|
-
/* @__PURE__ */
|
2714
|
+
/* @__PURE__ */ jsx40(
|
2674
2715
|
"path",
|
2675
2716
|
{
|
2676
2717
|
fill: "currentColor",
|
2677
2718
|
d: "M12.416 12.698a1.997 1.997 0 0 0-1.75-1.031H5.334a2 2 0 0 0-1.864 1.277 7.722 7.722 0 0 1-.943-1.074 3.329 3.329 0 0 1 2.807-1.537h5.334a3.333 3.333 0 0 1 2.703 1.384c-.275.325-.594.66-.954.98Z"
|
2678
2719
|
}
|
2679
2720
|
),
|
2680
|
-
/* @__PURE__ */
|
2721
|
+
/* @__PURE__ */ jsx40(
|
2681
2722
|
"path",
|
2682
2723
|
{
|
2683
2724
|
fill: "currentColor",
|
@@ -2707,22 +2748,22 @@ var mappingIcon = /* @__PURE__ */ new Map([
|
|
2707
2748
|
]);
|
2708
2749
|
|
2709
2750
|
// src/components/navigation/components/navigation.tsx
|
2710
|
-
import { Fragment as Fragment4, jsx as
|
2751
|
+
import { Fragment as Fragment4, jsx as jsx41, jsxs as jsxs17 } from "react/jsx-runtime";
|
2711
2752
|
var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
2712
|
-
return /* @__PURE__ */
|
2713
|
-
|
2753
|
+
return /* @__PURE__ */ jsx41(
|
2754
|
+
Box20,
|
2714
2755
|
{
|
2715
2756
|
bg: useColorModeValue8("white", "ebony-clay.800"),
|
2716
2757
|
boxShadow: "0 4px 20px 0 rgb(0 0 0 / 5%)",
|
2717
2758
|
borderRadius: "md",
|
2718
2759
|
overflowX: "auto",
|
2719
2760
|
...props,
|
2720
|
-
children: /* @__PURE__ */
|
2761
|
+
children: /* @__PURE__ */ jsx41(Flex6, { alignItems: "center", p: 2, children: /* @__PURE__ */ jsx41(HStack5, { spacing: 2, children: navigations == null ? void 0 : navigations.map((navigation) => {
|
2721
2762
|
const isActive = activePath.startsWith(navigation.navLink || "");
|
2722
2763
|
const activeBg = isActive ? "primary.500" : void 0;
|
2723
|
-
return /* @__PURE__ */
|
2724
|
-
/* @__PURE__ */
|
2725
|
-
|
2764
|
+
return /* @__PURE__ */ jsx41(Popover2, { trigger: "hover", placement: "bottom-start", children: ({ isOpen }) => /* @__PURE__ */ jsxs17(Fragment4, { children: [
|
2765
|
+
/* @__PURE__ */ jsx41(PopoverTrigger2, { children: /* @__PURE__ */ jsxs17(
|
2766
|
+
Box20,
|
2726
2767
|
{
|
2727
2768
|
display: "flex",
|
2728
2769
|
alignItems: "center",
|
@@ -2735,13 +2776,13 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2735
2776
|
color: isActive ? "white" : "inherit",
|
2736
2777
|
p: 2,
|
2737
2778
|
children: [
|
2738
|
-
/* @__PURE__ */
|
2739
|
-
/* @__PURE__ */
|
2740
|
-
/* @__PURE__ */
|
2779
|
+
/* @__PURE__ */ jsx41(Icon2, { as: mappingIcon.get(navigation.title), mr: 2 }),
|
2780
|
+
/* @__PURE__ */ jsx41(Text8, { whiteSpace: "nowrap", fontSize: "text.sm", fontWeight: 400, children: navigation.title }),
|
2781
|
+
/* @__PURE__ */ jsx41(ChevronDownIcon2, { ml: 2 })
|
2741
2782
|
]
|
2742
2783
|
}
|
2743
2784
|
) }),
|
2744
|
-
navigation.children && /* @__PURE__ */
|
2785
|
+
navigation.children && /* @__PURE__ */ jsx41(Portal, { children: /* @__PURE__ */ jsx41(Box20, { zIndex: "popover", children: /* @__PURE__ */ jsx41(
|
2745
2786
|
PopoverContent2,
|
2746
2787
|
{
|
2747
2788
|
bg: useColorModeValue8("white", "ebony-clay.800"),
|
@@ -2753,7 +2794,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2753
2794
|
const link = navHost ? `${navHost}${navLink}` : navLink;
|
2754
2795
|
const isLocalLink = host === navHost;
|
2755
2796
|
const isActiveSub = activePath === navLink;
|
2756
|
-
return /* @__PURE__ */
|
2797
|
+
return /* @__PURE__ */ jsx41(
|
2757
2798
|
Link2,
|
2758
2799
|
{
|
2759
2800
|
as: isLocalLink ? as : void 0,
|
@@ -2762,7 +2803,7 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2762
2803
|
textDecoration: "none"
|
2763
2804
|
},
|
2764
2805
|
children: /* @__PURE__ */ jsxs17(
|
2765
|
-
|
2806
|
+
Box20,
|
2766
2807
|
{
|
2767
2808
|
display: "flex",
|
2768
2809
|
position: "relative",
|
@@ -2784,10 +2825,10 @@ var Navigation = ({ navigations, activePath, as, host, ...props }) => {
|
|
2784
2825
|
px: 6,
|
2785
2826
|
py: 4,
|
2786
2827
|
children: [
|
2787
|
-
/* @__PURE__ */
|
2788
|
-
/* @__PURE__ */
|
2789
|
-
isActiveSub && /* @__PURE__ */
|
2790
|
-
|
2828
|
+
/* @__PURE__ */ jsx41(Icon2, { as: mappingIcon.get(navigation.title), mr: 3 }),
|
2829
|
+
/* @__PURE__ */ jsx41(Text8, { fontSize: "text.sm", children: title }),
|
2830
|
+
isActiveSub && /* @__PURE__ */ jsx41(
|
2831
|
+
Box20,
|
2791
2832
|
{
|
2792
2833
|
width: 0.5,
|
2793
2834
|
height: 8,
|
@@ -2820,9 +2861,9 @@ Navigation.defaultProps = {
|
|
2820
2861
|
var navigation_default = Navigation;
|
2821
2862
|
|
2822
2863
|
// src/components/navigation/components/navigation-bar.tsx
|
2823
|
-
import { Box as
|
2864
|
+
import { Box as Box21, Button as Button2, Flex as Flex7, Link as Link3, Popover as Popover3, PopoverContent as PopoverContent3, PopoverTrigger as PopoverTrigger3, Text as Text9 } from "@chakra-ui/react";
|
2824
2865
|
import * as Icon3 from "@ctlyst.id/internal-icon";
|
2825
|
-
import { Fragment as Fragment5, jsx as
|
2866
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs18 } from "react/jsx-runtime";
|
2826
2867
|
var NavigationBar = ({
|
2827
2868
|
navigations,
|
2828
2869
|
isFetched,
|
@@ -2837,14 +2878,14 @@ var NavigationBar = ({
|
|
2837
2878
|
}
|
2838
2879
|
return subMenu.navHost + subMenu.navLink;
|
2839
2880
|
};
|
2840
|
-
return /* @__PURE__ */
|
2841
|
-
|
2881
|
+
return /* @__PURE__ */ jsx42(
|
2882
|
+
Box21,
|
2842
2883
|
{
|
2843
2884
|
hidden: isFetched && navigations === void 0,
|
2844
2885
|
backgroundRepeat: "repeat-x",
|
2845
2886
|
"data-test-id": "CT_component_navigation_cms",
|
2846
2887
|
...props,
|
2847
|
-
children: /* @__PURE__ */
|
2888
|
+
children: /* @__PURE__ */ jsx42(
|
2848
2889
|
Flex7,
|
2849
2890
|
{
|
2850
2891
|
bg: "white",
|
@@ -2861,8 +2902,8 @@ var NavigationBar = ({
|
|
2861
2902
|
const childMenu = item.children.filter((subMenu) => asPath == null ? void 0 : asPath.includes(subMenu.navLink));
|
2862
2903
|
const isActive = pathname == null ? void 0 : pathname.startsWith((_a = childMenu[0]) == null ? void 0 : _a.navLink);
|
2863
2904
|
const activeBg = isActive ? "primary.500" : void 0;
|
2864
|
-
return /* @__PURE__ */
|
2865
|
-
/* @__PURE__ */
|
2905
|
+
return /* @__PURE__ */ jsx42(Popover3, { isLazy: true, trigger: "hover", placement: "bottom-start", openDelay: 100, closeDelay: 100, children: ({ isOpen, onClose }) => /* @__PURE__ */ jsxs18(Fragment5, { children: [
|
2906
|
+
/* @__PURE__ */ jsx42(PopoverTrigger3, { children: /* @__PURE__ */ jsx42(
|
2866
2907
|
Button2,
|
2867
2908
|
{
|
2868
2909
|
h: 7.5,
|
@@ -2876,11 +2917,11 @@ var NavigationBar = ({
|
|
2876
2917
|
backgroundColor: isOpen && !isActive ? "neutral.400" : activeBg,
|
2877
2918
|
color: isActive ? "primary.50" : "black.high",
|
2878
2919
|
leftIcon: mappingIcon2.get(item.title),
|
2879
|
-
rightIcon: /* @__PURE__ */
|
2920
|
+
rightIcon: /* @__PURE__ */ jsx42(Icon3.ChevronDown, { size: 4, color: "inherit" }),
|
2880
2921
|
children: item.title
|
2881
2922
|
}
|
2882
2923
|
) }),
|
2883
|
-
item.children && /* @__PURE__ */
|
2924
|
+
item.children && /* @__PURE__ */ jsx42(PopoverContent3, { border: "none", shadow: "raised", py: 1, width: 240, children: item.children.map((subMenu) => /* @__PURE__ */ jsxs18(
|
2884
2925
|
Link3,
|
2885
2926
|
{
|
2886
2927
|
href: urlMenu(subMenu),
|
@@ -2900,7 +2941,7 @@ var NavigationBar = ({
|
|
2900
2941
|
"data-test-id": `CT_component_navigation_link-${item.id}`,
|
2901
2942
|
children: [
|
2902
2943
|
mappingIcon2.get(item.title),
|
2903
|
-
/* @__PURE__ */
|
2944
|
+
/* @__PURE__ */ jsx42(Text9, { textStyle: "text-sm", ml: 3, children: subMenu.title })
|
2904
2945
|
]
|
2905
2946
|
},
|
2906
2947
|
subMenu.id
|
@@ -2919,17 +2960,17 @@ var navigation_bar_default = NavigationBar;
|
|
2919
2960
|
|
2920
2961
|
// src/components/pagination/components/pagination.tsx
|
2921
2962
|
import { ArrowLeftIcon, ArrowRightIcon, ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon } from "@chakra-ui/icons";
|
2922
|
-
import { Box as
|
2963
|
+
import { Box as Box22, Text as Text10, useColorModeValue as useColorModeValue10 } from "@chakra-ui/react";
|
2923
2964
|
|
2924
2965
|
// src/components/pagination/components/pagination-button.tsx
|
2925
2966
|
import { Button as Button3, forwardRef as forwardRef12, useColorModeValue as useColorModeValue9 } from "@chakra-ui/react";
|
2926
|
-
import { jsx as
|
2967
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
2927
2968
|
var PaginationButton = forwardRef12(({ className, style, isActive, children, ...rest }, ref) => {
|
2928
2969
|
const btnBg = useColorModeValue9("neutral.300", "mirage.900");
|
2929
2970
|
const btnColor = useColorModeValue9("black.high", "primary.300");
|
2930
2971
|
const btnNotActiveBg = useColorModeValue9("secondary.50", "primary.500");
|
2931
2972
|
const btnNotActiveColor = useColorModeValue9("primary.500", "white");
|
2932
|
-
return /* @__PURE__ */
|
2973
|
+
return /* @__PURE__ */ jsx43(
|
2933
2974
|
Button3,
|
2934
2975
|
{
|
2935
2976
|
"data-test-id": "Pagination-Button",
|
@@ -2968,7 +3009,7 @@ var pagination_button_default = PaginationButton;
|
|
2968
3009
|
|
2969
3010
|
// src/components/pagination/components/pagination-button-trigger.tsx
|
2970
3011
|
import { VisuallyHidden } from "@chakra-ui/react";
|
2971
|
-
import { jsx as
|
3012
|
+
import { jsx as jsx44, jsxs as jsxs19 } from "react/jsx-runtime";
|
2972
3013
|
var PaginationButtonTrigger = ({
|
2973
3014
|
color,
|
2974
3015
|
isDisabled,
|
@@ -2976,7 +3017,7 @@ var PaginationButtonTrigger = ({
|
|
2976
3017
|
visuallyHidden,
|
2977
3018
|
icon
|
2978
3019
|
}) => /* @__PURE__ */ jsxs19(pagination_button_default, { "data-test-id": "DLVCc_fBK35spHm5WxjcJ", color, isDisabled, onClick, children: [
|
2979
|
-
/* @__PURE__ */
|
3020
|
+
/* @__PURE__ */ jsx44(VisuallyHidden, { children: visuallyHidden }),
|
2980
3021
|
icon
|
2981
3022
|
] });
|
2982
3023
|
PaginationButtonTrigger.defaultProps = {
|
@@ -2989,7 +3030,7 @@ PaginationButtonTrigger.defaultProps = {
|
|
2989
3030
|
var pagination_button_trigger_default = PaginationButtonTrigger;
|
2990
3031
|
|
2991
3032
|
// src/components/pagination/components/pagination.tsx
|
2992
|
-
import { jsx as
|
3033
|
+
import { jsx as jsx45, jsxs as jsxs20 } from "react/jsx-runtime";
|
2993
3034
|
var Pagination = ({ className, current, total, onSelect }) => {
|
2994
3035
|
const btnColorDisabled = useColorModeValue10("secondary.100", "primary.500");
|
2995
3036
|
const btnColor = useColorModeValue10("primary.500", "secondary.100");
|
@@ -3019,8 +3060,8 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3019
3060
|
}
|
3020
3061
|
return pageButtons;
|
3021
3062
|
};
|
3022
|
-
return /* @__PURE__ */ jsxs20(
|
3023
|
-
/* @__PURE__ */
|
3063
|
+
return /* @__PURE__ */ jsxs20(Box22, { className, display: "inline-flex", alignItems: "center", children: [
|
3064
|
+
/* @__PURE__ */ jsx45(Box22, { mr: 1, children: /* @__PURE__ */ jsx45(
|
3024
3065
|
pagination_button_trigger_default,
|
3025
3066
|
{
|
3026
3067
|
"data-test-id": "Pagination-Button",
|
@@ -3028,11 +3069,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3028
3069
|
isDisabled: disabledPrevious,
|
3029
3070
|
onClick: () => handleSelectPage(1),
|
3030
3071
|
visuallyHidden: "First Page",
|
3031
|
-
icon: /* @__PURE__ */
|
3072
|
+
icon: /* @__PURE__ */ jsx45(ArrowLeftIcon, { width: 2 })
|
3032
3073
|
}
|
3033
3074
|
) }),
|
3034
|
-
/* @__PURE__ */ jsxs20(
|
3035
|
-
/* @__PURE__ */
|
3075
|
+
/* @__PURE__ */ jsxs20(Box22, { bg: "neutral.300", borderRadius: "full", children: [
|
3076
|
+
/* @__PURE__ */ jsx45(
|
3036
3077
|
pagination_button_trigger_default,
|
3037
3078
|
{
|
3038
3079
|
"data-test-id": "Pagination-Button",
|
@@ -3040,22 +3081,22 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3040
3081
|
isDisabled: disabledPrevious,
|
3041
3082
|
onClick: () => handleSelectPage(current - 1),
|
3042
3083
|
visuallyHidden: "Previous Page",
|
3043
|
-
icon: /* @__PURE__ */
|
3084
|
+
icon: /* @__PURE__ */ jsx45(ChevronLeftIcon2, {})
|
3044
3085
|
}
|
3045
3086
|
),
|
3046
3087
|
generatePages().map((page) => {
|
3047
|
-
return /* @__PURE__ */
|
3088
|
+
return /* @__PURE__ */ jsx45(
|
3048
3089
|
pagination_button_default,
|
3049
3090
|
{
|
3050
3091
|
"data-test-id": "Pagination-Button",
|
3051
3092
|
isActive: page === current,
|
3052
3093
|
onClick: () => typeof page === "number" ? handleSelectPage(page) : null,
|
3053
|
-
children: /* @__PURE__ */
|
3094
|
+
children: /* @__PURE__ */ jsx45(Text10, { scale: 300, fontSize: "text.sm", lineHeight: 18, fontWeight: 500, children: page })
|
3054
3095
|
},
|
3055
3096
|
page
|
3056
3097
|
);
|
3057
3098
|
}),
|
3058
|
-
/* @__PURE__ */
|
3099
|
+
/* @__PURE__ */ jsx45(
|
3059
3100
|
pagination_button_trigger_default,
|
3060
3101
|
{
|
3061
3102
|
"data-test-id": "Pagination-Button",
|
@@ -3063,11 +3104,11 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3063
3104
|
isDisabled: disabledNext,
|
3064
3105
|
onClick: () => handleSelectPage(current + 1),
|
3065
3106
|
visuallyHidden: "Next Page",
|
3066
|
-
icon: /* @__PURE__ */
|
3107
|
+
icon: /* @__PURE__ */ jsx45(ChevronRightIcon, {})
|
3067
3108
|
}
|
3068
3109
|
)
|
3069
3110
|
] }),
|
3070
|
-
/* @__PURE__ */
|
3111
|
+
/* @__PURE__ */ jsx45(Box22, { ml: 1, children: /* @__PURE__ */ jsx45(
|
3071
3112
|
pagination_button_trigger_default,
|
3072
3113
|
{
|
3073
3114
|
"data-test-id": "Pagination-Button",
|
@@ -3075,7 +3116,7 @@ var Pagination = ({ className, current, total, onSelect }) => {
|
|
3075
3116
|
isDisabled: disabledNext,
|
3076
3117
|
onClick: () => handleSelectPage(total),
|
3077
3118
|
visuallyHidden: "Last Page",
|
3078
|
-
icon: /* @__PURE__ */
|
3119
|
+
icon: /* @__PURE__ */ jsx45(ArrowRightIcon, { width: 2 })
|
3079
3120
|
}
|
3080
3121
|
) })
|
3081
3122
|
] });
|
@@ -3089,7 +3130,7 @@ var pagination_default = Pagination;
|
|
3089
3130
|
|
3090
3131
|
// src/components/pagination/components/pagination-detail.tsx
|
3091
3132
|
import { Text as Text11 } from "@chakra-ui/react";
|
3092
|
-
import { jsx as
|
3133
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
3093
3134
|
var PaginationDetail = ({
|
3094
3135
|
page,
|
3095
3136
|
limit,
|
@@ -3099,15 +3140,15 @@ var PaginationDetail = ({
|
|
3099
3140
|
lineHeight = 18,
|
3100
3141
|
...rest
|
3101
3142
|
}) => {
|
3102
|
-
return /* @__PURE__ */
|
3143
|
+
return /* @__PURE__ */ jsx46(Text11, { scale, fontSize, lineHeight, ...rest, children: `${(page - 1) * limit + 1}-${limit * page < length ? limit * page : length} dari ${length} item` });
|
3103
3144
|
};
|
3104
3145
|
var pagination_detail_default = PaginationDetail;
|
3105
3146
|
|
3106
3147
|
// src/components/pagination/components/pagination-filter.tsx
|
3107
|
-
import { Box as
|
3148
|
+
import { Box as Box23, Select, Text as Text12, useColorModeValue as useColorModeValue11 } from "@chakra-ui/react";
|
3108
3149
|
import * as React13 from "react";
|
3109
3150
|
import { FiChevronDown } from "react-icons/fi";
|
3110
|
-
import { jsx as
|
3151
|
+
import { jsx as jsx47, jsxs as jsxs21 } from "react/jsx-runtime";
|
3111
3152
|
var PaginationFilter = ({
|
3112
3153
|
limit,
|
3113
3154
|
label = "Baris per halaman:",
|
@@ -3116,9 +3157,9 @@ var PaginationFilter = ({
|
|
3116
3157
|
...rest
|
3117
3158
|
}) => {
|
3118
3159
|
const [value, setValue] = React13.useState(limit);
|
3119
|
-
return /* @__PURE__ */ jsxs21(
|
3120
|
-
/* @__PURE__ */
|
3121
|
-
/* @__PURE__ */
|
3160
|
+
return /* @__PURE__ */ jsxs21(Box23, { display: "flex", flexDirection: "row", alignItems: "center", children: [
|
3161
|
+
/* @__PURE__ */ jsx47(Text12, { fontSize: "text.sm", lineHeight: 18, color: useColorModeValue11("neutral.900", "white"), ...rest, children: label }),
|
3162
|
+
/* @__PURE__ */ jsx47(
|
3122
3163
|
Select,
|
3123
3164
|
{
|
3124
3165
|
textAlign: "center",
|
@@ -3127,7 +3168,7 @@ var PaginationFilter = ({
|
|
3127
3168
|
border: "none",
|
3128
3169
|
boxShadow: "none",
|
3129
3170
|
width: 18,
|
3130
|
-
icon: /* @__PURE__ */
|
3171
|
+
icon: /* @__PURE__ */ jsx47(FiChevronDown, {}),
|
3131
3172
|
_focusVisible: { boxShadow: "none" },
|
3132
3173
|
onChange: (e) => {
|
3133
3174
|
const numberValue = Number(e.target.value);
|
@@ -3136,7 +3177,7 @@ var PaginationFilter = ({
|
|
3136
3177
|
},
|
3137
3178
|
value,
|
3138
3179
|
children: items.map((item) => {
|
3139
|
-
return /* @__PURE__ */
|
3180
|
+
return /* @__PURE__ */ jsx47("option", { value: item, children: item }, item);
|
3140
3181
|
})
|
3141
3182
|
}
|
3142
3183
|
)
|
@@ -3170,8 +3211,8 @@ import {
|
|
3170
3211
|
} from "@chakra-ui/react";
|
3171
3212
|
|
3172
3213
|
// src/components/radio/components/radio.tsx
|
3173
|
-
import { Box as
|
3174
|
-
import { jsx as
|
3214
|
+
import { Box as Box24, Radio as ChakraRadio, Text as Text13 } from "@chakra-ui/react";
|
3215
|
+
import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
|
3175
3216
|
var Radio = ({
|
3176
3217
|
isError = false,
|
3177
3218
|
helpText = "",
|
@@ -3181,9 +3222,9 @@ var Radio = ({
|
|
3181
3222
|
...rest
|
3182
3223
|
}) => {
|
3183
3224
|
const variant = isError ? "errors" : "unstyled";
|
3184
|
-
return /* @__PURE__ */ jsxs22(
|
3185
|
-
/* @__PURE__ */
|
3186
|
-
/* @__PURE__ */
|
3225
|
+
return /* @__PURE__ */ jsxs22(Box24, { children: [
|
3226
|
+
/* @__PURE__ */ jsx48(Box24, { display: "flex", children: /* @__PURE__ */ jsx48(ChakraRadio, { variant, ...rest, isDisabled, children: children && /* @__PURE__ */ jsx48(Text13, { as: "span", display: "block", textStyle: "text.sm", color: isDisabled ? "black.medium" : "black.high", children }) }) }),
|
3227
|
+
/* @__PURE__ */ jsx48(Box24, { mt: "5px", ml: "24px", children: isError ? /* @__PURE__ */ jsx48(Text13, { as: "span", display: "block", textStyle: "text.xs", color: "danger.500", children: errorText }) : /* @__PURE__ */ jsx48(Text13, { as: "span", display: "block", textStyle: "text.xs", color: "black.medium", children: helpText }) })
|
3187
3228
|
] });
|
3188
3229
|
};
|
3189
3230
|
Radio.displayName = "Radio";
|
@@ -3194,8 +3235,8 @@ Radio.defaultProps = {
|
|
3194
3235
|
};
|
3195
3236
|
|
3196
3237
|
// src/components/radio/components/radio-group.tsx
|
3197
|
-
import { Box as
|
3198
|
-
import { jsx as
|
3238
|
+
import { Box as Box25, RadioGroup as ChakraRadioGroup, Stack as Stack3 } from "@chakra-ui/react";
|
3239
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
3199
3240
|
var RadioGroup = ({
|
3200
3241
|
children,
|
3201
3242
|
label,
|
@@ -3204,7 +3245,7 @@ var RadioGroup = ({
|
|
3204
3245
|
errorMessage,
|
3205
3246
|
...props
|
3206
3247
|
}) => {
|
3207
|
-
return /* @__PURE__ */
|
3248
|
+
return /* @__PURE__ */ jsx49(field_default, { ...props, label, leftHelperText: helpText, isError, errorMessage, children: /* @__PURE__ */ jsx49(Box25, { mt: "12px", children: /* @__PURE__ */ jsx49(ChakraRadioGroup, { ...props, children: /* @__PURE__ */ jsx49(Stack3, { spacing: [1, "16px"], direction: ["column", "row"], children }) }) }) });
|
3208
3249
|
};
|
3209
3250
|
RadioGroup.displayName = "RadioGroup";
|
3210
3251
|
RadioGroup.defaultProps = {
|
@@ -3227,9 +3268,9 @@ import {
|
|
3227
3268
|
// src/components/rating/components/rating.tsx
|
3228
3269
|
import { Grid as Grid2 } from "@chakra-ui/react";
|
3229
3270
|
import { Rating as RatingIcon } from "@ctlyst.id/internal-icon";
|
3230
|
-
import { jsx as
|
3271
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
3231
3272
|
var Rating = ({ value }) => {
|
3232
|
-
return /* @__PURE__ */
|
3273
|
+
return /* @__PURE__ */ jsx50(Grid2, { gap: "4px", display: "flex", children: [...Array(5)].map((_, i) => /* @__PURE__ */ jsx50(RatingIcon, { color: i < value ? "#FFA230" : "#E0E0E0", size: 24 })) });
|
3233
3274
|
};
|
3234
3275
|
var rating_default = Rating;
|
3235
3276
|
|
@@ -3237,17 +3278,6 @@ var rating_default = Rating;
|
|
3237
3278
|
import { useColorMode as useColorMode3 } from "@chakra-ui/system";
|
3238
3279
|
import ReactSelect from "react-select";
|
3239
3280
|
|
3240
|
-
// src/components/select/components/select-wrapper.tsx
|
3241
|
-
import { Box as Box25 } from "@chakra-ui/react";
|
3242
|
-
import { jsx as jsx50 } from "react/jsx-runtime";
|
3243
|
-
var SelectWrapper = ({ children }) => {
|
3244
|
-
return /* @__PURE__ */ jsx50(Box25, { children });
|
3245
|
-
};
|
3246
|
-
SelectWrapper.defaultProps = {
|
3247
|
-
isError: false
|
3248
|
-
};
|
3249
|
-
var select_wrapper_default = SelectWrapper;
|
3250
|
-
|
3251
3281
|
// src/config/theme/foundations/shadows.ts
|
3252
3282
|
import { theme as theme2 } from "@chakra-ui/react";
|
3253
3283
|
var shadows = {
|
@@ -3513,37 +3543,32 @@ var selectStyle = {
|
|
3513
3543
|
lineHeight: styleMd.lineHeight,
|
3514
3544
|
letterSpacing: 0
|
3515
3545
|
};
|
3516
|
-
var boxShadow = (color) => `0 0 0 1px ${color}`;
|
3517
3546
|
function selectStyles(colorMode, _isError) {
|
3518
|
-
const boxShadowLight = (isFocused = false, isError = false) => {
|
3519
|
-
if (isError && isFocused || isError) {
|
3520
|
-
return boxShadow("danger.500");
|
3521
|
-
}
|
3522
|
-
if (isFocused) {
|
3523
|
-
return boxShadow("primary.500");
|
3524
|
-
}
|
3525
|
-
return boxShadow("neutral.400");
|
3526
|
-
};
|
3527
3547
|
return {
|
3528
|
-
control: (base,
|
3529
|
-
|
3530
|
-
|
3531
|
-
|
3532
|
-
|
3533
|
-
|
3534
|
-
|
3535
|
-
|
3536
|
-
|
3537
|
-
|
3538
|
-
|
3539
|
-
|
3548
|
+
control: (base, { isDisabled, isFocused }) => {
|
3549
|
+
const style = {
|
3550
|
+
...base,
|
3551
|
+
flexWrap: "nowrap",
|
3552
|
+
borderColor: isFocused ? "var(--chakra-colors-primary-500)" : "var(--chakra-colors-neutral-400)",
|
3553
|
+
boxShadow: "none",
|
3554
|
+
color: isDisabled ? "var(--chakra-colors-black-low)" : "var(--chakra-colors-black-high)",
|
3555
|
+
"&:hover": {
|
3556
|
+
borderColor: _isError ? "" : isFocused ? "var(--chakra-colors-primary-500)" : "var(--chakra-colors-neutral-500)"
|
3557
|
+
}
|
3558
|
+
};
|
3559
|
+
if (_isError) {
|
3560
|
+
return {
|
3561
|
+
...style,
|
3562
|
+
borderColor: "var(--chakra-colors-danger-500)"
|
3563
|
+
};
|
3564
|
+
}
|
3565
|
+
return style;
|
3540
3566
|
},
|
3541
|
-
option: (base
|
3567
|
+
option: (base) => ({
|
3542
3568
|
...base,
|
3543
3569
|
...selectStyle,
|
3544
|
-
|
3545
|
-
|
3546
|
-
} : { ...base, ...selectStyle },
|
3570
|
+
color: "var(--chakra-colors-neutral-900)"
|
3571
|
+
}),
|
3547
3572
|
menu: (base) => colorMode === "dark" ? {
|
3548
3573
|
...base,
|
3549
3574
|
...selectStyle,
|
@@ -3568,10 +3593,10 @@ var themeSelect = (theme6) => {
|
|
3568
3593
|
...theme6,
|
3569
3594
|
colors: {
|
3570
3595
|
...theme6.colors,
|
3571
|
-
primary: "primary
|
3572
|
-
primary25: "primary
|
3573
|
-
primary50: "primary
|
3574
|
-
primary75: "primary
|
3596
|
+
primary: "var(--chakra-colors-primary-100)",
|
3597
|
+
primary25: "var(--chakra-colors-primary-50)",
|
3598
|
+
primary50: "var(--chakra-colors-primary-100)",
|
3599
|
+
primary75: "var(--chakra-colors-primary-200)"
|
3575
3600
|
}
|
3576
3601
|
};
|
3577
3602
|
};
|
@@ -3584,7 +3609,7 @@ function Select2({
|
|
3584
3609
|
...rest
|
3585
3610
|
}) {
|
3586
3611
|
const { colorMode } = useColorMode3();
|
3587
|
-
return /* @__PURE__ */ jsx51(
|
3612
|
+
return /* @__PURE__ */ jsx51(
|
3588
3613
|
ReactSelect,
|
3589
3614
|
{
|
3590
3615
|
classNamePrefix: "react-select",
|
@@ -3592,7 +3617,7 @@ function Select2({
|
|
3592
3617
|
styles: { ...selectStyles(colorMode, isError) },
|
3593
3618
|
theme: themeSelect
|
3594
3619
|
}
|
3595
|
-
)
|
3620
|
+
);
|
3596
3621
|
}
|
3597
3622
|
var select_default = Select2;
|
3598
3623
|
|
@@ -3606,7 +3631,7 @@ function SelectAsync({
|
|
3606
3631
|
...rest
|
3607
3632
|
}) {
|
3608
3633
|
const { colorMode } = useColorMode4();
|
3609
|
-
return /* @__PURE__ */ jsx52(
|
3634
|
+
return /* @__PURE__ */ jsx52(
|
3610
3635
|
AsyncPaginate,
|
3611
3636
|
{
|
3612
3637
|
classNamePrefix: "react-select",
|
@@ -3614,7 +3639,7 @@ function SelectAsync({
|
|
3614
3639
|
styles: { ...selectStyles(colorMode, isError), ...styles },
|
3615
3640
|
theme: themeSelect
|
3616
3641
|
}
|
3617
|
-
)
|
3642
|
+
);
|
3618
3643
|
}
|
3619
3644
|
var select_async_default = SelectAsync;
|
3620
3645
|
|
@@ -3624,7 +3649,7 @@ import ReactSelectAsyncCreatable from "react-select/async-creatable";
|
|
3624
3649
|
import { jsx as jsx53 } from "react/jsx-runtime";
|
3625
3650
|
function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
3626
3651
|
const { colorMode } = useColorMode5();
|
3627
|
-
return /* @__PURE__ */ jsx53(
|
3652
|
+
return /* @__PURE__ */ jsx53(
|
3628
3653
|
ReactSelectAsyncCreatable,
|
3629
3654
|
{
|
3630
3655
|
classNamePrefix: "react-select",
|
@@ -3632,7 +3657,7 @@ function SelectAsyncCreatable({ styles, isError = false, ...rest }) {
|
|
3632
3657
|
styles: { ...selectStyles(colorMode, isError), ...styles },
|
3633
3658
|
theme: themeSelect
|
3634
3659
|
}
|
3635
|
-
)
|
3660
|
+
);
|
3636
3661
|
}
|
3637
3662
|
|
3638
3663
|
// src/components/select/components/select-creatable.tsx
|
@@ -3641,7 +3666,7 @@ import ReactSelectCreatable from "react-select/creatable";
|
|
3641
3666
|
import { jsx as jsx54 } from "react/jsx-runtime";
|
3642
3667
|
function SelectCreatable({ styles, isError = false, ...rest }) {
|
3643
3668
|
const { colorMode } = useColorMode6();
|
3644
|
-
return /* @__PURE__ */ jsx54(
|
3669
|
+
return /* @__PURE__ */ jsx54(
|
3645
3670
|
ReactSelectCreatable,
|
3646
3671
|
{
|
3647
3672
|
classNamePrefix: "react-select",
|
@@ -3649,7 +3674,7 @@ function SelectCreatable({ styles, isError = false, ...rest }) {
|
|
3649
3674
|
styles: { ...selectStyles(colorMode, isError), ...styles },
|
3650
3675
|
theme: themeSelect
|
3651
3676
|
}
|
3652
|
-
)
|
3677
|
+
);
|
3653
3678
|
}
|
3654
3679
|
|
3655
3680
|
// src/components/switch/components/switch.tsx
|
@@ -4031,7 +4056,12 @@ var baseStyleButton = defineStyle2({
|
|
4031
4056
|
bg: "neutral.100"
|
4032
4057
|
},
|
4033
4058
|
_hover: {
|
4034
|
-
bg: "neutral.100"
|
4059
|
+
bg: "neutral.100",
|
4060
|
+
".eye-icon": {
|
4061
|
+
display: "block",
|
4062
|
+
opacity: 1,
|
4063
|
+
visibility: "visible"
|
4064
|
+
}
|
4035
4065
|
},
|
4036
4066
|
_disabled: {
|
4037
4067
|
opacity: 0.4,
|
@@ -4039,7 +4069,10 @@ var baseStyleButton = defineStyle2({
|
|
4039
4069
|
},
|
4040
4070
|
py: 2,
|
4041
4071
|
px: 4,
|
4042
|
-
position: "relative"
|
4072
|
+
position: "relative",
|
4073
|
+
".eye-icon": {
|
4074
|
+
visibility: "hidden"
|
4075
|
+
}
|
4043
4076
|
});
|
4044
4077
|
var baseStylePanel = defineStyle2({
|
4045
4078
|
pt: "2",
|
@@ -5552,6 +5585,7 @@ export {
|
|
5552
5585
|
Accordion,
|
5553
5586
|
AccordionButton,
|
5554
5587
|
AccordionButtonProps,
|
5588
|
+
AccordionEye,
|
5555
5589
|
AccordionIcon,
|
5556
5590
|
AccordionIconProps,
|
5557
5591
|
AccordionIndicator,
|
@@ -5583,7 +5617,7 @@ export {
|
|
5583
5617
|
AvatarGroupProps,
|
5584
5618
|
AvatarProps,
|
5585
5619
|
badge_default as Badge,
|
5586
|
-
|
5620
|
+
Box19 as Box,
|
5587
5621
|
BoxProps,
|
5588
5622
|
bread_crumb_default as BreadCrumb,
|
5589
5623
|
button_default as Button,
|