react-better-html 1.1.163 → 1.1.164
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 +40 -35
- package/dist/index.d.ts +40 -35
- package/dist/index.js +235 -189
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +303 -257
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/components/Div.tsx
|
|
2
|
-
import { forwardRef as
|
|
2
|
+
import { forwardRef as forwardRef6, memo as memo11, useCallback as useCallback5 } from "react";
|
|
3
3
|
import styled7 from "styled-components";
|
|
4
4
|
|
|
5
5
|
// src/constants.ts
|
|
@@ -3108,8 +3108,117 @@ function useUrlQuery() {
|
|
|
3108
3108
|
};
|
|
3109
3109
|
}
|
|
3110
3110
|
|
|
3111
|
+
// src/components/Divider.tsx
|
|
3112
|
+
import { forwardRef as forwardRef4, memo as memo9 } from "react";
|
|
3113
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3114
|
+
var Divider_default = {
|
|
3115
|
+
vertical: memo9(
|
|
3116
|
+
forwardRef4(function Divider({ width = 1, backgroundColor, height, ...props }, ref) {
|
|
3117
|
+
const theme2 = useTheme();
|
|
3118
|
+
return /* @__PURE__ */ jsx9(
|
|
3119
|
+
Div_default,
|
|
3120
|
+
{
|
|
3121
|
+
width,
|
|
3122
|
+
height: height ?? "100%",
|
|
3123
|
+
flexShrink: 0,
|
|
3124
|
+
backgroundColor: backgroundColor ?? theme2.colors.border,
|
|
3125
|
+
...props,
|
|
3126
|
+
ref
|
|
3127
|
+
}
|
|
3128
|
+
);
|
|
3129
|
+
})
|
|
3130
|
+
),
|
|
3131
|
+
horizontal: memo9(
|
|
3132
|
+
forwardRef4(function Divider2({ width = 1, backgroundColor, text, textFontSize, textColor, ...props }, ref) {
|
|
3133
|
+
const theme2 = useTheme();
|
|
3134
|
+
return /* @__PURE__ */ jsxs5(Div_default.row, { width: "100%", alignItems: "center", gap: text ? theme2.styles.space : void 0, ...props, ref, children: [
|
|
3135
|
+
/* @__PURE__ */ jsx9(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border }),
|
|
3136
|
+
text && /* @__PURE__ */ jsx9(Text_default, { fontSize: textFontSize, color: textColor ?? theme2.colors.textSecondary, children: text }),
|
|
3137
|
+
/* @__PURE__ */ jsx9(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border })
|
|
3138
|
+
] });
|
|
3139
|
+
})
|
|
3140
|
+
)
|
|
3141
|
+
};
|
|
3142
|
+
|
|
3143
|
+
// src/components/PageHeader.tsx
|
|
3144
|
+
import { forwardRef as forwardRef5, memo as memo10 } from "react";
|
|
3145
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3146
|
+
var PageHeaderComponent = forwardRef5(function PageHeader({
|
|
3147
|
+
imageUrl,
|
|
3148
|
+
imageSize = 60,
|
|
3149
|
+
title,
|
|
3150
|
+
titleAs,
|
|
3151
|
+
titleColor,
|
|
3152
|
+
titleRightElement,
|
|
3153
|
+
description,
|
|
3154
|
+
descriptionColor,
|
|
3155
|
+
textAlign,
|
|
3156
|
+
rightElement,
|
|
3157
|
+
lightMode,
|
|
3158
|
+
marginBottom
|
|
3159
|
+
}, ref) {
|
|
3160
|
+
const theme2 = useTheme();
|
|
3161
|
+
const { app } = useBetterHtmlContextInternal();
|
|
3162
|
+
const mediaQuery = useMediaQuery();
|
|
3163
|
+
return /* @__PURE__ */ jsxs6(
|
|
3164
|
+
Div_default.row,
|
|
3165
|
+
{
|
|
3166
|
+
alignItems: "center",
|
|
3167
|
+
gap: theme2.styles.space,
|
|
3168
|
+
marginBottom: marginBottom ?? theme2.styles.space * 2,
|
|
3169
|
+
ref,
|
|
3170
|
+
children: [
|
|
3171
|
+
imageUrl && /* @__PURE__ */ jsx10(Image_default.profileImage, { src: imageUrl, size: imageSize ?? (mediaQuery.size600 ? 46 : 60) }),
|
|
3172
|
+
/* @__PURE__ */ jsxs6(
|
|
3173
|
+
Div_default.column,
|
|
3174
|
+
{
|
|
3175
|
+
alignItems: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
3176
|
+
flex: 1,
|
|
3177
|
+
gap: theme2.styles.gap / 2,
|
|
3178
|
+
children: [
|
|
3179
|
+
/* @__PURE__ */ jsxs6(
|
|
3180
|
+
Div_default.row,
|
|
3181
|
+
{
|
|
3182
|
+
alignItems: "center",
|
|
3183
|
+
justifyContent: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
3184
|
+
gap: theme2.styles.space,
|
|
3185
|
+
children: [
|
|
3186
|
+
/* @__PURE__ */ jsx10(
|
|
3187
|
+
Text_default,
|
|
3188
|
+
{
|
|
3189
|
+
as: titleAs ?? "h1",
|
|
3190
|
+
textAlign,
|
|
3191
|
+
color: titleColor ?? (lightMode ? theme2.colors.base : theme2.colors.textPrimary),
|
|
3192
|
+
children: title
|
|
3193
|
+
}
|
|
3194
|
+
),
|
|
3195
|
+
titleRightElement
|
|
3196
|
+
]
|
|
3197
|
+
}
|
|
3198
|
+
),
|
|
3199
|
+
description && /* @__PURE__ */ jsx10(
|
|
3200
|
+
Text_default,
|
|
3201
|
+
{
|
|
3202
|
+
maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
|
|
3203
|
+
textAlign,
|
|
3204
|
+
color: descriptionColor ?? (lightMode ? theme2.colors.base : theme2.colors.textSecondary),
|
|
3205
|
+
opacity: lightMode ? 0.7 : void 0,
|
|
3206
|
+
children: description
|
|
3207
|
+
}
|
|
3208
|
+
)
|
|
3209
|
+
]
|
|
3210
|
+
}
|
|
3211
|
+
),
|
|
3212
|
+
rightElement
|
|
3213
|
+
]
|
|
3214
|
+
}
|
|
3215
|
+
);
|
|
3216
|
+
});
|
|
3217
|
+
var PageHeader2 = memo10(PageHeaderComponent);
|
|
3218
|
+
var PageHeader_default = PageHeader2;
|
|
3219
|
+
|
|
3111
3220
|
// src/components/Div.tsx
|
|
3112
|
-
import { jsx as
|
|
3221
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3113
3222
|
var DivStyledComponent = styled7.div.withConfig({
|
|
3114
3223
|
shouldForwardProp: (prop) => !["normalStyle", "hoverStyle"].includes(prop)
|
|
3115
3224
|
})`
|
|
@@ -3119,7 +3228,7 @@ var DivStyledComponent = styled7.div.withConfig({
|
|
|
3119
3228
|
${(props) => props.hoverStyle}
|
|
3120
3229
|
}
|
|
3121
3230
|
`;
|
|
3122
|
-
var DivComponent =
|
|
3231
|
+
var DivComponent = forwardRef6(function Div({
|
|
3123
3232
|
as = "div",
|
|
3124
3233
|
value,
|
|
3125
3234
|
isTabAccessed,
|
|
@@ -3154,7 +3263,7 @@ var DivComponent = forwardRef4(function Div({
|
|
|
3154
3263
|
},
|
|
3155
3264
|
[onKeyDown, isTabAccessed]
|
|
3156
3265
|
);
|
|
3157
|
-
return /* @__PURE__ */
|
|
3266
|
+
return /* @__PURE__ */ jsx11(
|
|
3158
3267
|
DivStyledComponent,
|
|
3159
3268
|
{
|
|
3160
3269
|
as,
|
|
@@ -3172,9 +3281,9 @@ var DivComponent = forwardRef4(function Div({
|
|
|
3172
3281
|
}
|
|
3173
3282
|
);
|
|
3174
3283
|
});
|
|
3175
|
-
DivComponent.row =
|
|
3284
|
+
DivComponent.row = forwardRef6(function Row({ flexReverse, invertFlexDirection, ...props }, ref) {
|
|
3176
3285
|
const reverseSuffix = flexReverse ? "-reverse" : "";
|
|
3177
|
-
return /* @__PURE__ */
|
|
3286
|
+
return /* @__PURE__ */ jsx11(
|
|
3178
3287
|
DivComponent,
|
|
3179
3288
|
{
|
|
3180
3289
|
display: "flex",
|
|
@@ -3184,9 +3293,9 @@ DivComponent.row = forwardRef4(function Row({ flexReverse, invertFlexDirection,
|
|
|
3184
3293
|
}
|
|
3185
3294
|
);
|
|
3186
3295
|
});
|
|
3187
|
-
DivComponent.column =
|
|
3296
|
+
DivComponent.column = forwardRef6(function Column({ flexReverse, invertFlexDirection, ...props }, ref) {
|
|
3188
3297
|
const reverseSuffix = flexReverse ? "-reverse" : "";
|
|
3189
|
-
return /* @__PURE__ */
|
|
3298
|
+
return /* @__PURE__ */ jsx11(
|
|
3190
3299
|
DivComponent,
|
|
3191
3300
|
{
|
|
3192
3301
|
display: "flex",
|
|
@@ -3196,13 +3305,29 @@ DivComponent.column = forwardRef4(function Column({ flexReverse, invertFlexDirec
|
|
|
3196
3305
|
}
|
|
3197
3306
|
);
|
|
3198
3307
|
});
|
|
3199
|
-
DivComponent.grid =
|
|
3200
|
-
return /* @__PURE__ */
|
|
3308
|
+
DivComponent.grid = forwardRef6(function Grid(props, ref) {
|
|
3309
|
+
return /* @__PURE__ */ jsx11(DivComponent, { display: "grid", ref, ...props });
|
|
3201
3310
|
});
|
|
3202
|
-
DivComponent.box =
|
|
3311
|
+
DivComponent.box = forwardRef6(function Box2({
|
|
3312
|
+
imageUrl,
|
|
3313
|
+
imageSize,
|
|
3314
|
+
title,
|
|
3315
|
+
titleAs,
|
|
3316
|
+
titleColor,
|
|
3317
|
+
titleRightElement,
|
|
3318
|
+
description,
|
|
3319
|
+
descriptionColor,
|
|
3320
|
+
textAlign,
|
|
3321
|
+
rightElement,
|
|
3322
|
+
lightMode,
|
|
3323
|
+
headerBackgroundColor,
|
|
3324
|
+
isActive,
|
|
3325
|
+
children,
|
|
3326
|
+
...props
|
|
3327
|
+
}, ref) {
|
|
3203
3328
|
const theme2 = useTheme();
|
|
3204
3329
|
const withClick = props.onClick || props.onClickWithValue;
|
|
3205
|
-
return /* @__PURE__ */
|
|
3330
|
+
return /* @__PURE__ */ jsxs7(
|
|
3206
3331
|
DivComponent,
|
|
3207
3332
|
{
|
|
3208
3333
|
color: isActive ? theme2.colors.base : void 0,
|
|
@@ -3212,57 +3337,61 @@ DivComponent.box = forwardRef4(function Box2({ isActive, ...props }, ref) {
|
|
|
3212
3337
|
borderColorHover: withClick && !isActive ? theme2.colors.primary : void 0,
|
|
3213
3338
|
filterHover: withClick && isActive ? "brightness(0.9)" : void 0,
|
|
3214
3339
|
cursor: withClick ? "pointer" : void 0,
|
|
3215
|
-
paddingBlock: theme2.styles.gap,
|
|
3340
|
+
paddingBlock: title ? theme2.styles.space : theme2.styles.gap,
|
|
3216
3341
|
paddingInline: theme2.styles.space,
|
|
3217
3342
|
ref,
|
|
3218
|
-
...props
|
|
3343
|
+
...props,
|
|
3344
|
+
children: [
|
|
3345
|
+
title && /* @__PURE__ */ jsxs7(
|
|
3346
|
+
Div2,
|
|
3347
|
+
{
|
|
3348
|
+
backgroundColor: headerBackgroundColor,
|
|
3349
|
+
borderTopLeftRadius: props.borderTopLeftRadius ?? props.borderRadius ?? theme2.styles.borderRadius - 1,
|
|
3350
|
+
borderTopRightRadius: props.borderTopRightRadius ?? props.borderRadius ?? theme2.styles.borderRadius - 1,
|
|
3351
|
+
marginInline: -theme2.styles.space,
|
|
3352
|
+
marginTop: -theme2.styles.space,
|
|
3353
|
+
marginBottom: theme2.styles.space,
|
|
3354
|
+
paddingInline: theme2.styles.space,
|
|
3355
|
+
paddingTop: theme2.styles.space,
|
|
3356
|
+
children: [
|
|
3357
|
+
/* @__PURE__ */ jsx11(
|
|
3358
|
+
PageHeader_default,
|
|
3359
|
+
{
|
|
3360
|
+
imageUrl,
|
|
3361
|
+
imageSize,
|
|
3362
|
+
title,
|
|
3363
|
+
titleAs,
|
|
3364
|
+
titleColor,
|
|
3365
|
+
titleRightElement,
|
|
3366
|
+
description,
|
|
3367
|
+
descriptionColor,
|
|
3368
|
+
textAlign,
|
|
3369
|
+
rightElement,
|
|
3370
|
+
lightMode,
|
|
3371
|
+
marginBottom: theme2.styles.space
|
|
3372
|
+
}
|
|
3373
|
+
),
|
|
3374
|
+
/* @__PURE__ */ jsx11(Div2, { width: `calc(100% + ${theme2.styles.space * 2}px)`, marginLeft: -theme2.styles.space, children: /* @__PURE__ */ jsx11(Divider_default.horizontal, {}) })
|
|
3375
|
+
]
|
|
3376
|
+
}
|
|
3377
|
+
),
|
|
3378
|
+
children
|
|
3379
|
+
]
|
|
3219
3380
|
}
|
|
3220
3381
|
);
|
|
3221
3382
|
});
|
|
3222
|
-
var Div2 =
|
|
3383
|
+
var Div2 = memo11(DivComponent);
|
|
3223
3384
|
Div2.row = DivComponent.row;
|
|
3224
3385
|
Div2.column = DivComponent.column;
|
|
3225
3386
|
Div2.grid = DivComponent.grid;
|
|
3226
3387
|
Div2.box = DivComponent.box;
|
|
3227
3388
|
var Div_default = Div2;
|
|
3228
3389
|
|
|
3229
|
-
// src/components/Divider.tsx
|
|
3230
|
-
import { forwardRef as forwardRef5, memo as memo10 } from "react";
|
|
3231
|
-
import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
3232
|
-
var Divider_default = {
|
|
3233
|
-
vertical: memo10(
|
|
3234
|
-
forwardRef5(function Divider({ width = 1, backgroundColor, height, ...props }, ref) {
|
|
3235
|
-
const theme2 = useTheme();
|
|
3236
|
-
return /* @__PURE__ */ jsx10(
|
|
3237
|
-
Div_default,
|
|
3238
|
-
{
|
|
3239
|
-
width,
|
|
3240
|
-
height: height ?? "100%",
|
|
3241
|
-
flexShrink: 0,
|
|
3242
|
-
backgroundColor: backgroundColor ?? theme2.colors.border,
|
|
3243
|
-
...props,
|
|
3244
|
-
ref
|
|
3245
|
-
}
|
|
3246
|
-
);
|
|
3247
|
-
})
|
|
3248
|
-
),
|
|
3249
|
-
horizontal: memo10(
|
|
3250
|
-
forwardRef5(function Divider2({ width = 1, backgroundColor, text, textFontSize, textColor, ...props }, ref) {
|
|
3251
|
-
const theme2 = useTheme();
|
|
3252
|
-
return /* @__PURE__ */ jsxs5(Div_default.row, { width: "100%", alignItems: "center", gap: text ? theme2.styles.space : void 0, ...props, ref, children: [
|
|
3253
|
-
/* @__PURE__ */ jsx10(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border }),
|
|
3254
|
-
text && /* @__PURE__ */ jsx10(Text_default, { fontSize: textFontSize, color: textColor ?? theme2.colors.textSecondary, children: text }),
|
|
3255
|
-
/* @__PURE__ */ jsx10(Div_default, { flex: 1, height: width, flexShrink: 0, backgroundColor: backgroundColor ?? theme2.colors.border })
|
|
3256
|
-
] });
|
|
3257
|
-
})
|
|
3258
|
-
)
|
|
3259
|
-
};
|
|
3260
|
-
|
|
3261
3390
|
// src/components/Modal.tsx
|
|
3262
|
-
import { memo as
|
|
3391
|
+
import { memo as memo12, useCallback as useCallback6, forwardRef as forwardRef7, useImperativeHandle, useRef as useRef3, useState as useState4 } from "react";
|
|
3263
3392
|
import { createPortal } from "react-dom";
|
|
3264
3393
|
import styled8 from "styled-components";
|
|
3265
|
-
import { Fragment as Fragment2, jsx as
|
|
3394
|
+
import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3266
3395
|
var DialogStylesElement = styled8.dialog.withConfig({
|
|
3267
3396
|
shouldForwardProp: (prop) => !["theme", "colorTheme", "opacity"].includes(prop)
|
|
3268
3397
|
})`
|
|
@@ -3303,7 +3432,7 @@ var DialogStylesElement = styled8.dialog.withConfig({
|
|
|
3303
3432
|
}
|
|
3304
3433
|
}
|
|
3305
3434
|
`;
|
|
3306
|
-
var ModalComponent =
|
|
3435
|
+
var ModalComponent = forwardRef7(function Modal({
|
|
3307
3436
|
maxWidth,
|
|
3308
3437
|
title,
|
|
3309
3438
|
titleColor,
|
|
@@ -3368,7 +3497,7 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3368
3497
|
[onClickOpen, onClickClose, isOpened]
|
|
3369
3498
|
);
|
|
3370
3499
|
return createPortal(
|
|
3371
|
-
/* @__PURE__ */
|
|
3500
|
+
/* @__PURE__ */ jsx12(
|
|
3372
3501
|
DialogStylesElement,
|
|
3373
3502
|
{
|
|
3374
3503
|
theme: theme2,
|
|
@@ -3377,7 +3506,7 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3377
3506
|
onClose: onClickClose,
|
|
3378
3507
|
onKeyDown,
|
|
3379
3508
|
ref: dialogRef,
|
|
3380
|
-
children: isOpenedLate ? /* @__PURE__ */
|
|
3509
|
+
children: isOpenedLate ? /* @__PURE__ */ jsx12(
|
|
3381
3510
|
Div_default.column,
|
|
3382
3511
|
{
|
|
3383
3512
|
position: "relative",
|
|
@@ -3391,7 +3520,7 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3391
3520
|
transform: `translateY(${theme2.styles.space}px)`,
|
|
3392
3521
|
transition: theme2.styles.transition,
|
|
3393
3522
|
animation: isOpened ? "fadeInAnimation 0.2s ease forwards" : "fadeOutAnimation 0.2s ease forwards",
|
|
3394
|
-
children: /* @__PURE__ */
|
|
3523
|
+
children: /* @__PURE__ */ jsxs8(
|
|
3395
3524
|
Div_default,
|
|
3396
3525
|
{
|
|
3397
3526
|
position: "relative",
|
|
@@ -3399,12 +3528,11 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3399
3528
|
minHeight: 32 + theme2.styles.space * 2,
|
|
3400
3529
|
backgroundColor: theme2.colors.backgroundBase,
|
|
3401
3530
|
borderRadius: theme2.styles.borderRadius * 2,
|
|
3402
|
-
|
|
3403
|
-
paddingBlock: !title ? theme2.styles.space : void 0,
|
|
3531
|
+
padding: !title ? theme2.styles.space : void 0,
|
|
3404
3532
|
overflow,
|
|
3405
3533
|
children: [
|
|
3406
|
-
title ? /* @__PURE__ */
|
|
3407
|
-
/* @__PURE__ */
|
|
3534
|
+
title ? /* @__PURE__ */ jsxs8(Fragment2, { children: [
|
|
3535
|
+
/* @__PURE__ */ jsxs8(
|
|
3408
3536
|
Div_default.row,
|
|
3409
3537
|
{
|
|
3410
3538
|
alignItems: "center",
|
|
@@ -3412,12 +3540,12 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3412
3540
|
backgroundColor: headerBackgroundColor,
|
|
3413
3541
|
borderTopLeftRadius: theme2.styles.borderRadius * 2 - 1,
|
|
3414
3542
|
borderTopRightRadius: theme2.styles.borderRadius * 2 - 1,
|
|
3415
|
-
paddingInline: theme2.styles.space
|
|
3543
|
+
paddingInline: theme2.styles.space,
|
|
3416
3544
|
paddingBlock: theme2.styles.space,
|
|
3417
3545
|
transition: theme2.styles.transition,
|
|
3418
3546
|
children: [
|
|
3419
|
-
/* @__PURE__ */
|
|
3420
|
-
/* @__PURE__ */
|
|
3547
|
+
/* @__PURE__ */ jsxs8(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
3548
|
+
/* @__PURE__ */ jsx12(
|
|
3421
3549
|
Text_default,
|
|
3422
3550
|
{
|
|
3423
3551
|
as: "h1",
|
|
@@ -3426,7 +3554,7 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3426
3554
|
children: title
|
|
3427
3555
|
}
|
|
3428
3556
|
),
|
|
3429
|
-
description && /* @__PURE__ */
|
|
3557
|
+
description && /* @__PURE__ */ jsx12(
|
|
3430
3558
|
Text_default,
|
|
3431
3559
|
{
|
|
3432
3560
|
color: descriptionColor ?? theme2.colors.textSecondary,
|
|
@@ -3435,7 +3563,7 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3435
3563
|
}
|
|
3436
3564
|
)
|
|
3437
3565
|
] }),
|
|
3438
|
-
!withoutCloseButton && /* @__PURE__ */
|
|
3566
|
+
!withoutCloseButton && /* @__PURE__ */ jsx12(
|
|
3439
3567
|
Button_default.icon,
|
|
3440
3568
|
{
|
|
3441
3569
|
icon: "XMark",
|
|
@@ -3448,16 +3576,9 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3448
3576
|
]
|
|
3449
3577
|
}
|
|
3450
3578
|
),
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
] }) : /* @__PURE__ */
|
|
3453
|
-
/* @__PURE__ */
|
|
3454
|
-
Div_default,
|
|
3455
|
-
{
|
|
3456
|
-
paddingInline: title ? theme2.styles.space + theme2.styles.gap : void 0,
|
|
3457
|
-
paddingBlock: title ? theme2.styles.space : void 0,
|
|
3458
|
-
children
|
|
3459
|
-
}
|
|
3460
|
-
)
|
|
3579
|
+
/* @__PURE__ */ jsx12(Divider_default.horizontal, {})
|
|
3580
|
+
] }) : /* @__PURE__ */ jsx12(Fragment2, { children: !withoutCloseButton && /* @__PURE__ */ jsx12(Div_default, { position: "absolute", top: theme2.styles.space, right: theme2.styles.space, children: /* @__PURE__ */ jsx12(Button_default.icon, { icon: "XMark", onClick: onClickClose }) }) }),
|
|
3581
|
+
/* @__PURE__ */ jsx12(Div_default, { padding: title ? theme2.styles.space : void 0, children })
|
|
3461
3582
|
]
|
|
3462
3583
|
}
|
|
3463
3584
|
)
|
|
@@ -3468,7 +3589,7 @@ var ModalComponent = forwardRef6(function Modal({
|
|
|
3468
3589
|
document.body
|
|
3469
3590
|
);
|
|
3470
3591
|
});
|
|
3471
|
-
ModalComponent.confirmation =
|
|
3592
|
+
ModalComponent.confirmation = forwardRef7(function Confirmation({ message, continueButtonLoaderName, onContinue, onCancel, ...props }, ref) {
|
|
3472
3593
|
const theme2 = useTheme();
|
|
3473
3594
|
const modalRef = useRef3(null);
|
|
3474
3595
|
const onCancelElement = useCallback6(() => {
|
|
@@ -3480,9 +3601,9 @@ ModalComponent.confirmation = forwardRef6(function Confirmation({ message, conti
|
|
|
3480
3601
|
modalRef.current?.close();
|
|
3481
3602
|
}, [onContinue]);
|
|
3482
3603
|
useImperativeHandle(ref, () => modalRef.current, []);
|
|
3483
|
-
return /* @__PURE__ */
|
|
3484
|
-
/* @__PURE__ */
|
|
3485
|
-
/* @__PURE__ */
|
|
3604
|
+
return /* @__PURE__ */ jsxs8(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
|
|
3605
|
+
/* @__PURE__ */ jsx12(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue? This action may be irreversible." }),
|
|
3606
|
+
/* @__PURE__ */ jsxs8(
|
|
3486
3607
|
Div_default.row,
|
|
3487
3608
|
{
|
|
3488
3609
|
alignItems: "center",
|
|
@@ -3490,14 +3611,14 @@ ModalComponent.confirmation = forwardRef6(function Confirmation({ message, conti
|
|
|
3490
3611
|
gap: theme2.styles.gap,
|
|
3491
3612
|
marginTop: theme2.styles.space * 2,
|
|
3492
3613
|
children: [
|
|
3493
|
-
/* @__PURE__ */
|
|
3494
|
-
/* @__PURE__ */
|
|
3614
|
+
/* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
|
|
3615
|
+
/* @__PURE__ */ jsx12(Button_default, { text: "Continue", loaderName: continueButtonLoaderName, onClick: onContinueElement })
|
|
3495
3616
|
]
|
|
3496
3617
|
}
|
|
3497
3618
|
)
|
|
3498
3619
|
] });
|
|
3499
3620
|
});
|
|
3500
|
-
ModalComponent.destructive =
|
|
3621
|
+
ModalComponent.destructive = forwardRef7(function Destructive2({ message, deleteButtonLoaderName, onDelete, onCancel, ...props }, ref) {
|
|
3501
3622
|
const theme2 = useTheme();
|
|
3502
3623
|
const modalRef = useRef3(null);
|
|
3503
3624
|
const onCancelElement = useCallback6(() => {
|
|
@@ -3509,9 +3630,9 @@ ModalComponent.destructive = forwardRef6(function Destructive2({ message, delete
|
|
|
3509
3630
|
modalRef.current?.close();
|
|
3510
3631
|
}, [onDelete]);
|
|
3511
3632
|
useImperativeHandle(ref, () => modalRef.current, []);
|
|
3512
|
-
return /* @__PURE__ */
|
|
3513
|
-
/* @__PURE__ */
|
|
3514
|
-
/* @__PURE__ */
|
|
3633
|
+
return /* @__PURE__ */ jsxs8(ModalComponent, { title: "Are you sure?", maxWidth: 660, ...props, ref: modalRef, children: [
|
|
3634
|
+
/* @__PURE__ */ jsx12(Text_default, { color: theme2.colors.textSecondary, children: message ?? "Do you really want to continue with the deleting of the item? This action may be irreversible." }),
|
|
3635
|
+
/* @__PURE__ */ jsxs8(
|
|
3515
3636
|
Div_default.row,
|
|
3516
3637
|
{
|
|
3517
3638
|
alignItems: "center",
|
|
@@ -3519,8 +3640,8 @@ ModalComponent.destructive = forwardRef6(function Destructive2({ message, delete
|
|
|
3519
3640
|
gap: theme2.styles.gap,
|
|
3520
3641
|
marginTop: theme2.styles.space * 2,
|
|
3521
3642
|
children: [
|
|
3522
|
-
/* @__PURE__ */
|
|
3523
|
-
/* @__PURE__ */
|
|
3643
|
+
/* @__PURE__ */ jsx12(Button_default.secondary, { text: "Cancel", onClick: onCancelElement }),
|
|
3644
|
+
/* @__PURE__ */ jsx12(
|
|
3524
3645
|
Button_default.destructive,
|
|
3525
3646
|
{
|
|
3526
3647
|
icon: "trash",
|
|
@@ -3534,18 +3655,18 @@ ModalComponent.destructive = forwardRef6(function Destructive2({ message, delete
|
|
|
3534
3655
|
)
|
|
3535
3656
|
] });
|
|
3536
3657
|
});
|
|
3537
|
-
var Modal2 =
|
|
3658
|
+
var Modal2 = memo12(ModalComponent);
|
|
3538
3659
|
Modal2.confirmation = ModalComponent.confirmation;
|
|
3539
3660
|
Modal2.destructive = ModalComponent.destructive;
|
|
3540
3661
|
var Modal_default = Modal2;
|
|
3541
3662
|
|
|
3542
3663
|
// src/components/PageHolder.tsx
|
|
3543
|
-
import { forwardRef as
|
|
3544
|
-
import { jsx as
|
|
3545
|
-
var PageHolderComponent =
|
|
3664
|
+
import { forwardRef as forwardRef8, memo as memo13 } from "react";
|
|
3665
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3666
|
+
var PageHolderComponent = forwardRef8(function PageHolder({ noMaxContentWidth, children, ...props }, ref) {
|
|
3546
3667
|
const theme2 = useTheme();
|
|
3547
3668
|
const { app } = useBetterHtmlContextInternal();
|
|
3548
|
-
return /* @__PURE__ */
|
|
3669
|
+
return /* @__PURE__ */ jsx13(
|
|
3549
3670
|
Div_default,
|
|
3550
3671
|
{
|
|
3551
3672
|
as: "main",
|
|
@@ -3559,7 +3680,7 @@ var PageHolderComponent = forwardRef7(function PageHolder({ noMaxContentWidth, c
|
|
|
3559
3680
|
}
|
|
3560
3681
|
);
|
|
3561
3682
|
});
|
|
3562
|
-
PageHolderComponent.center =
|
|
3683
|
+
PageHolderComponent.center = forwardRef8(function Center({
|
|
3563
3684
|
pageBackgroundColor,
|
|
3564
3685
|
pageBackgroundImage,
|
|
3565
3686
|
contentMaxWidth,
|
|
@@ -3575,7 +3696,7 @@ PageHolderComponent.center = forwardRef7(function Center({
|
|
|
3575
3696
|
const { app } = useBetterHtmlContextInternal();
|
|
3576
3697
|
const breakingPoint = mediaQuery.size1000;
|
|
3577
3698
|
const withSideComponent = sideComponent && !breakingPoint;
|
|
3578
|
-
return /* @__PURE__ */
|
|
3699
|
+
return /* @__PURE__ */ jsxs9(
|
|
3579
3700
|
Div_default.row,
|
|
3580
3701
|
{
|
|
3581
3702
|
position: "relative",
|
|
@@ -3586,7 +3707,7 @@ PageHolderComponent.center = forwardRef7(function Center({
|
|
|
3586
3707
|
backgroundColor: pageBackgroundColor,
|
|
3587
3708
|
backgroundImage: pageBackgroundImage,
|
|
3588
3709
|
children: [
|
|
3589
|
-
behindComponent && /* @__PURE__ */
|
|
3710
|
+
behindComponent && /* @__PURE__ */ jsx13(
|
|
3590
3711
|
Div_default,
|
|
3591
3712
|
{
|
|
3592
3713
|
position: "fixed",
|
|
@@ -3599,8 +3720,8 @@ PageHolderComponent.center = forwardRef7(function Center({
|
|
|
3599
3720
|
children: behindComponent
|
|
3600
3721
|
}
|
|
3601
3722
|
),
|
|
3602
|
-
sideComponentPosition === "left" && withSideComponent && /* @__PURE__ */
|
|
3603
|
-
/* @__PURE__ */
|
|
3723
|
+
sideComponentPosition === "left" && withSideComponent && /* @__PURE__ */ jsx13(Div_default, { width: "50%" }),
|
|
3724
|
+
/* @__PURE__ */ jsx13(Div_default.column, { position: "relative", width: `${withSideComponent ? 50 : 100}%`, alignItems: "center", zIndex: 2, children: /* @__PURE__ */ jsx13(
|
|
3604
3725
|
Div_default.box,
|
|
3605
3726
|
{
|
|
3606
3727
|
width: `calc(100% - ${theme2.styles.space * 2}px)`,
|
|
@@ -3612,8 +3733,8 @@ PageHolderComponent.center = forwardRef7(function Center({
|
|
|
3612
3733
|
children
|
|
3613
3734
|
}
|
|
3614
3735
|
) }),
|
|
3615
|
-
sideComponentPosition === "right" && withSideComponent && /* @__PURE__ */
|
|
3616
|
-
withSideComponent && /* @__PURE__ */
|
|
3736
|
+
sideComponentPosition === "right" && withSideComponent && /* @__PURE__ */ jsx13(Div_default, { width: "50%" }),
|
|
3737
|
+
withSideComponent && /* @__PURE__ */ jsx13(
|
|
3617
3738
|
Div_default,
|
|
3618
3739
|
{
|
|
3619
3740
|
position: "fixed",
|
|
@@ -3629,85 +3750,10 @@ PageHolderComponent.center = forwardRef7(function Center({
|
|
|
3629
3750
|
}
|
|
3630
3751
|
);
|
|
3631
3752
|
});
|
|
3632
|
-
var PageHolder2 =
|
|
3753
|
+
var PageHolder2 = memo13(PageHolderComponent);
|
|
3633
3754
|
PageHolder2.center = PageHolderComponent.center;
|
|
3634
3755
|
var PageHolder_default = PageHolder2;
|
|
3635
3756
|
|
|
3636
|
-
// src/components/PageHeader.tsx
|
|
3637
|
-
import { forwardRef as forwardRef8, memo as memo13 } from "react";
|
|
3638
|
-
import { jsx as jsx13, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3639
|
-
var PageHeaderComponent = forwardRef8(function PageHeader({
|
|
3640
|
-
imageUrl,
|
|
3641
|
-
imageSize = 60,
|
|
3642
|
-
title,
|
|
3643
|
-
titleAs,
|
|
3644
|
-
titleRightElement,
|
|
3645
|
-
description,
|
|
3646
|
-
textAlign,
|
|
3647
|
-
rightElement,
|
|
3648
|
-
lightMode,
|
|
3649
|
-
marginBottom
|
|
3650
|
-
}, ref) {
|
|
3651
|
-
const theme2 = useTheme();
|
|
3652
|
-
const { app } = useBetterHtmlContextInternal();
|
|
3653
|
-
const mediaQuery = useMediaQuery();
|
|
3654
|
-
return /* @__PURE__ */ jsxs8(
|
|
3655
|
-
Div_default.row,
|
|
3656
|
-
{
|
|
3657
|
-
alignItems: "center",
|
|
3658
|
-
gap: theme2.styles.space,
|
|
3659
|
-
marginBottom: marginBottom ?? theme2.styles.space * 2,
|
|
3660
|
-
ref,
|
|
3661
|
-
children: [
|
|
3662
|
-
imageUrl && /* @__PURE__ */ jsx13(Image_default.profileImage, { src: imageUrl, size: imageSize ?? (mediaQuery.size600 ? 46 : 60) }),
|
|
3663
|
-
/* @__PURE__ */ jsxs8(
|
|
3664
|
-
Div_default.column,
|
|
3665
|
-
{
|
|
3666
|
-
alignItems: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
3667
|
-
flex: 1,
|
|
3668
|
-
gap: theme2.styles.gap / 2,
|
|
3669
|
-
children: [
|
|
3670
|
-
/* @__PURE__ */ jsxs8(
|
|
3671
|
-
Div_default.row,
|
|
3672
|
-
{
|
|
3673
|
-
alignItems: "center",
|
|
3674
|
-
justifyContent: textAlign === "center" ? "center" : textAlign === "right" ? "flex-end" : void 0,
|
|
3675
|
-
gap: theme2.styles.space,
|
|
3676
|
-
children: [
|
|
3677
|
-
/* @__PURE__ */ jsx13(
|
|
3678
|
-
Text_default,
|
|
3679
|
-
{
|
|
3680
|
-
as: titleAs ?? "h1",
|
|
3681
|
-
textAlign,
|
|
3682
|
-
color: lightMode ? theme2.colors.base : theme2.colors.textPrimary,
|
|
3683
|
-
children: title
|
|
3684
|
-
}
|
|
3685
|
-
),
|
|
3686
|
-
titleRightElement
|
|
3687
|
-
]
|
|
3688
|
-
}
|
|
3689
|
-
),
|
|
3690
|
-
description && /* @__PURE__ */ jsx13(
|
|
3691
|
-
Text_default,
|
|
3692
|
-
{
|
|
3693
|
-
maxWidth: !mediaQuery.size600 ? app.contentMaxWidth * 0.6 : void 0,
|
|
3694
|
-
textAlign,
|
|
3695
|
-
color: lightMode ? theme2.colors.base : theme2.colors.textSecondary,
|
|
3696
|
-
opacity: lightMode ? 0.7 : void 0,
|
|
3697
|
-
children: description
|
|
3698
|
-
}
|
|
3699
|
-
)
|
|
3700
|
-
]
|
|
3701
|
-
}
|
|
3702
|
-
),
|
|
3703
|
-
rightElement
|
|
3704
|
-
]
|
|
3705
|
-
}
|
|
3706
|
-
);
|
|
3707
|
-
});
|
|
3708
|
-
var PageHeader2 = memo13(PageHeaderComponent);
|
|
3709
|
-
var PageHeader_default = PageHeader2;
|
|
3710
|
-
|
|
3711
3757
|
// src/components/Chip.tsx
|
|
3712
3758
|
import { forwardRef as forwardRef9, memo as memo14 } from "react";
|
|
3713
3759
|
|
|
@@ -5517,10 +5563,10 @@ var decryptString = (text) => {
|
|
|
5517
5563
|
|
|
5518
5564
|
// src/components/Label.tsx
|
|
5519
5565
|
import { memo as memo15 } from "react";
|
|
5520
|
-
import { jsxs as
|
|
5566
|
+
import { jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5521
5567
|
function Label({ text, required, isError, color, htmlFor }) {
|
|
5522
5568
|
const theme2 = useTheme();
|
|
5523
|
-
return /* @__PURE__ */
|
|
5569
|
+
return /* @__PURE__ */ jsxs10(
|
|
5524
5570
|
Text_default,
|
|
5525
5571
|
{
|
|
5526
5572
|
as: "label",
|
|
@@ -5532,7 +5578,7 @@ function Label({ text, required, isError, color, htmlFor }) {
|
|
|
5532
5578
|
"aria-required": required,
|
|
5533
5579
|
children: [
|
|
5534
5580
|
text,
|
|
5535
|
-
required && /* @__PURE__ */
|
|
5581
|
+
required && /* @__PURE__ */ jsxs10(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, children: [
|
|
5536
5582
|
" ",
|
|
5537
5583
|
"*"
|
|
5538
5584
|
] })
|
|
@@ -5544,7 +5590,7 @@ var Label_default = memo15(Label);
|
|
|
5544
5590
|
|
|
5545
5591
|
// src/components/Dropdown.tsx
|
|
5546
5592
|
import { forwardRef as forwardRef10, Fragment as Fragment3, memo as memo16, useCallback as useCallback7, useEffect as useEffect6, useMemo as useMemo4, useRef as useRef4, useState as useState5 } from "react";
|
|
5547
|
-
import { Fragment as Fragment4, jsx as jsx15, jsxs as
|
|
5593
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5548
5594
|
var DropdownComponent = forwardRef10(function Dropdown({
|
|
5549
5595
|
label,
|
|
5550
5596
|
labelColor,
|
|
@@ -5671,13 +5717,13 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
5671
5717
|
);
|
|
5672
5718
|
const selectedOption = useMemo4(() => options.find((option) => option.value === value), [options, value]);
|
|
5673
5719
|
const renderedOptions = useMemo4(
|
|
5674
|
-
() => /* @__PURE__ */
|
|
5720
|
+
() => /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
5675
5721
|
renderOptionDivider ? renderOptionDivider(void 0, filteredOptions[0], -1, 0) : void 0,
|
|
5676
5722
|
filteredOptions.map((option, index) => {
|
|
5677
5723
|
const isSelected = option.value === value;
|
|
5678
5724
|
const isDisabled = option.disabled;
|
|
5679
5725
|
const isFocused2 = index === focusedOptionIndex;
|
|
5680
|
-
return /* @__PURE__ */
|
|
5726
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
5681
5727
|
/* @__PURE__ */ jsx15(
|
|
5682
5728
|
Div_default,
|
|
5683
5729
|
{
|
|
@@ -5743,7 +5789,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
5743
5789
|
const displayValue = withSearch && isFocused ? searchQuery : selectedOption?.label ?? "";
|
|
5744
5790
|
const withClearButton = isOpen && selectedOption;
|
|
5745
5791
|
const readyPlaceholder = placeholder ? placeholder : `Select an ${label?.toLowerCase() ?? "option"}`;
|
|
5746
|
-
return /* @__PURE__ */ jsx15(Div_default.column, { width: "100%", position: "relative", userSelect: "none", ...props, children: /* @__PURE__ */
|
|
5792
|
+
return /* @__PURE__ */ jsx15(Div_default.column, { width: "100%", position: "relative", userSelect: "none", ...props, children: /* @__PURE__ */ jsxs11(Div_default.row, { position: "relative", width: "100%", children: [
|
|
5747
5793
|
/* @__PURE__ */ jsx15(
|
|
5748
5794
|
InputField_default,
|
|
5749
5795
|
{
|
|
@@ -5801,7 +5847,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
5801
5847
|
ref: inputRef
|
|
5802
5848
|
}
|
|
5803
5849
|
),
|
|
5804
|
-
/* @__PURE__ */
|
|
5850
|
+
/* @__PURE__ */ jsxs11(
|
|
5805
5851
|
Div_default.row,
|
|
5806
5852
|
{
|
|
5807
5853
|
position: "absolute",
|
|
@@ -5850,7 +5896,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
5850
5896
|
DropdownComponent.countries = forwardRef10(function Countries({ ...props }, ref) {
|
|
5851
5897
|
const theme2 = useTheme();
|
|
5852
5898
|
const renderOption = useCallback7(
|
|
5853
|
-
(option, index, isSelected) => /* @__PURE__ */
|
|
5899
|
+
(option, index, isSelected) => /* @__PURE__ */ jsxs11(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
5854
5900
|
/* @__PURE__ */ jsx15(Image_default, { src: `https://flagcdn.com/w80/${option.data?.code.toString().toLowerCase()}.webp`, width: 20 }),
|
|
5855
5901
|
/* @__PURE__ */ jsx15(Text_default, { children: option.label })
|
|
5856
5902
|
] }),
|
|
@@ -5886,7 +5932,7 @@ var Dropdown_default = Dropdown2;
|
|
|
5886
5932
|
// src/components/Calendar.tsx
|
|
5887
5933
|
import { useCallback as useCallback8, useMemo as useMemo5, useState as useState6, memo as memo17, useEffect as useEffect7, useId } from "react";
|
|
5888
5934
|
import styled9 from "styled-components";
|
|
5889
|
-
import { jsx as jsx16, jsxs as
|
|
5935
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5890
5936
|
var getMonthName = (month, short = false) => {
|
|
5891
5937
|
return [
|
|
5892
5938
|
short ? "Jan" : "January",
|
|
@@ -6000,12 +6046,12 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6000
6046
|
setCurrentMonth(date.getMonth());
|
|
6001
6047
|
setCurrentYear(date.getFullYear());
|
|
6002
6048
|
}, [value]);
|
|
6003
|
-
return /* @__PURE__ */
|
|
6004
|
-
/* @__PURE__ */
|
|
6049
|
+
return /* @__PURE__ */ jsxs12(Div_default.column, { width: "100%", maxWidth: 320, gap: theme2.styles.gap, padding: theme2.styles.space / 2, userSelect: "none", children: [
|
|
6050
|
+
/* @__PURE__ */ jsxs12(Div_default.row, { width: "100%", justifyContent: "space-between", alignItems: "center", children: [
|
|
6005
6051
|
/* @__PURE__ */ jsx16(Button_default.icon, { icon: "chevronLeft", onClick: onClickPreviousMonthButton }),
|
|
6006
|
-
/* @__PURE__ */
|
|
6052
|
+
/* @__PURE__ */ jsxs12(Div_default.row, { alignItems: "center", gap: 4, children: [
|
|
6007
6053
|
/* @__PURE__ */ jsx16(Text_default, { fontWeight: 700, children: getMonthName(currentMonth) }),
|
|
6008
|
-
/* @__PURE__ */ jsx16(SelectWrapperComponent, { children: /* @__PURE__ */
|
|
6054
|
+
/* @__PURE__ */ jsx16(SelectWrapperComponent, { children: /* @__PURE__ */ jsxs12(Div_default.row, { position: "relative", alignItems: "center", gap: 2, children: [
|
|
6009
6055
|
/* @__PURE__ */ jsx16(Text_default, { fontWeight: 700, children: currentYear }),
|
|
6010
6056
|
/* @__PURE__ */ jsx16(Icon_default, { name: "chevronDown", size: 12 }),
|
|
6011
6057
|
/* @__PURE__ */ jsx16(
|
|
@@ -6022,14 +6068,14 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6022
6068
|
] }),
|
|
6023
6069
|
/* @__PURE__ */ jsx16(Button_default.icon, { icon: "chevronRight", onClick: onClickNextMonthButton })
|
|
6024
6070
|
] }),
|
|
6025
|
-
/* @__PURE__ */
|
|
6071
|
+
/* @__PURE__ */ jsxs12(Div_default.grid, { width: "100%", gridTemplateColumns: "repeat(7, 1fr)", gap: theme2.styles.gap / 2, children: [
|
|
6026
6072
|
weekDaysIndex.map((day) => /* @__PURE__ */ jsx16(Div_default.row, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx16(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", children: getWeekDayName(day, true) }) }, day)),
|
|
6027
6073
|
days.map((day, index) => {
|
|
6028
6074
|
const thisDayDate = new Date(currentYear, currentMonth, day);
|
|
6029
6075
|
const isSelected = day !== void 0 && day === currentDate?.getDate() && currentMonth === currentDate.getMonth() && currentYear === currentDate.getFullYear();
|
|
6030
6076
|
const isWeekend = thisDayDate.getDay() === 6 || thisDayDate.getDay() === 0;
|
|
6031
6077
|
const isDisabled = minDate && thisDayDate.getTime() < minDate.getTime() || maxDate && thisDayDate.getTime() > maxDate.getTime();
|
|
6032
|
-
return /* @__PURE__ */
|
|
6078
|
+
return /* @__PURE__ */ jsxs12(
|
|
6033
6079
|
Div_default.row,
|
|
6034
6080
|
{
|
|
6035
6081
|
position: "relative",
|
|
@@ -6073,7 +6119,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6073
6119
|
);
|
|
6074
6120
|
})
|
|
6075
6121
|
] }),
|
|
6076
|
-
/* @__PURE__ */
|
|
6122
|
+
/* @__PURE__ */ jsxs12(Div_default.row, { width: "100%", justifyContent: "space-between", alignItems: "center", children: [
|
|
6077
6123
|
/* @__PURE__ */ jsx16(Div_default, { isTabAccessed: true, cursor: "pointer", onClick: onClickClear, children: /* @__PURE__ */ jsx16(
|
|
6078
6124
|
Text_default,
|
|
6079
6125
|
{
|
|
@@ -6100,7 +6146,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6100
6146
|
var Calendar_default = memo17(Calendar);
|
|
6101
6147
|
|
|
6102
6148
|
// src/components/InputField.tsx
|
|
6103
|
-
import { jsx as jsx17, jsxs as
|
|
6149
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6104
6150
|
var buttonWidth = 50;
|
|
6105
6151
|
var colorPickerSpacing = 4;
|
|
6106
6152
|
var colorPickerColorWidth = 12 + 27 + colorPickerSpacing;
|
|
@@ -6318,9 +6364,9 @@ var InputFieldComponent = forwardRef11(function InputField({
|
|
|
6318
6364
|
onChangeValue?.(debouncedValue);
|
|
6319
6365
|
}, [withDebounce, onChangeValue, debouncedValue]);
|
|
6320
6366
|
const readyId = id ?? internalId;
|
|
6321
|
-
return /* @__PURE__ */
|
|
6367
|
+
return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, ...styledComponentStylesWithExcluded, children: [
|
|
6322
6368
|
label && /* @__PURE__ */ jsx17(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
|
|
6323
|
-
/* @__PURE__ */
|
|
6369
|
+
/* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "stretch", width: "100%", children: [
|
|
6324
6370
|
prefix && /* @__PURE__ */ jsx17(
|
|
6325
6371
|
Div_default.row,
|
|
6326
6372
|
{
|
|
@@ -6335,7 +6381,7 @@ var InputFieldComponent = forwardRef11(function InputField({
|
|
|
6335
6381
|
children: prefix
|
|
6336
6382
|
}
|
|
6337
6383
|
),
|
|
6338
|
-
/* @__PURE__ */
|
|
6384
|
+
/* @__PURE__ */ jsxs13(Div_default, { position: "relative", width: "100%", height: "fit-content", ref: holderRef, children: [
|
|
6339
6385
|
leftIcon && /* @__PURE__ */ jsx17(
|
|
6340
6386
|
Icon_default,
|
|
6341
6387
|
{
|
|
@@ -6445,9 +6491,9 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
|
|
|
6445
6491
|
[onChange, onChangeValue]
|
|
6446
6492
|
);
|
|
6447
6493
|
const readyId = id ?? internalId;
|
|
6448
|
-
return /* @__PURE__ */
|
|
6494
|
+
return /* @__PURE__ */ jsxs13(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
6449
6495
|
label && /* @__PURE__ */ jsx17(Label_default, { text: label, required, isError: !!errorText, htmlFor: readyId }),
|
|
6450
|
-
/* @__PURE__ */
|
|
6496
|
+
/* @__PURE__ */ jsxs13(Div_default, { position: "relative", width: "100%", children: [
|
|
6451
6497
|
leftIcon && /* @__PURE__ */ jsx17(
|
|
6452
6498
|
Icon_default,
|
|
6453
6499
|
{
|
|
@@ -6591,7 +6637,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
|
|
|
6591
6637
|
const [dropdownValue, setDropdownValue] = useState7();
|
|
6592
6638
|
const [inputFieldValue, setInputFieldValue] = useState7(value?.toString() ?? "");
|
|
6593
6639
|
const renderOption = useCallback9(
|
|
6594
|
-
(option, index, isSelected) => /* @__PURE__ */
|
|
6640
|
+
(option, index, isSelected) => /* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
6595
6641
|
/* @__PURE__ */ jsx17(Image_default, { src: `https://flagcdn.com/w80/${option.data?.code.toString().toLowerCase()}.webp`, width: 20 }),
|
|
6596
6642
|
/* @__PURE__ */ jsx17(Text_default, { children: option.label })
|
|
6597
6643
|
] }),
|
|
@@ -6636,7 +6682,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
|
|
|
6636
6682
|
setInputFieldValue(newValue.slice(country?.phoneNumberExtension.length + 1));
|
|
6637
6683
|
}, [value]);
|
|
6638
6684
|
const readyId = id ?? internalId;
|
|
6639
|
-
return /* @__PURE__ */
|
|
6685
|
+
return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, children: [
|
|
6640
6686
|
label && /* @__PURE__ */ jsx17(
|
|
6641
6687
|
Label_default,
|
|
6642
6688
|
{
|
|
@@ -6647,7 +6693,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
|
|
|
6647
6693
|
htmlFor: readyId
|
|
6648
6694
|
}
|
|
6649
6695
|
),
|
|
6650
|
-
/* @__PURE__ */
|
|
6696
|
+
/* @__PURE__ */ jsxs13(Div_default.row, { children: [
|
|
6651
6697
|
/* @__PURE__ */ jsx17(
|
|
6652
6698
|
Dropdown_default,
|
|
6653
6699
|
{
|
|
@@ -6782,9 +6828,9 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
|
|
|
6782
6828
|
overflow: "hidden",
|
|
6783
6829
|
userSelect: "none",
|
|
6784
6830
|
...insideInputFieldComponentProps,
|
|
6785
|
-
children: /* @__PURE__ */
|
|
6831
|
+
children: /* @__PURE__ */ jsxs13(Div_default.row, { gap: theme2.styles.space, children: [
|
|
6786
6832
|
/* @__PURE__ */ jsx17(Calendar_default, { value: internalValue, minDate, maxDate, onChange }),
|
|
6787
|
-
/* @__PURE__ */
|
|
6833
|
+
/* @__PURE__ */ jsxs13(
|
|
6788
6834
|
Div_default.row,
|
|
6789
6835
|
{
|
|
6790
6836
|
height: 276,
|
|
@@ -6793,7 +6839,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
|
|
|
6793
6839
|
paddingBottom: theme2.styles.space / 2,
|
|
6794
6840
|
paddingRight: theme2.styles.space / 2,
|
|
6795
6841
|
children: [
|
|
6796
|
-
/* @__PURE__ */
|
|
6842
|
+
/* @__PURE__ */ jsxs13(Div_default, { height: "100%", children: [
|
|
6797
6843
|
/* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme2.styles.gap / 2, children: "H" }),
|
|
6798
6844
|
/* @__PURE__ */ jsx17(
|
|
6799
6845
|
Div_default,
|
|
@@ -6827,7 +6873,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
|
|
|
6827
6873
|
}
|
|
6828
6874
|
)
|
|
6829
6875
|
] }),
|
|
6830
|
-
/* @__PURE__ */
|
|
6876
|
+
/* @__PURE__ */ jsxs13(Div_default, { height: "100%", children: [
|
|
6831
6877
|
/* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme2.styles.gap / 2, children: "M" }),
|
|
6832
6878
|
/* @__PURE__ */ jsx17(
|
|
6833
6879
|
Div_default,
|
|
@@ -6924,7 +6970,7 @@ InputFieldComponent.time = forwardRef11(function Time({ ...props }, ref) {
|
|
|
6924
6970
|
overflowY: "auto",
|
|
6925
6971
|
userSelect: "none",
|
|
6926
6972
|
...insideInputFieldComponentProps,
|
|
6927
|
-
children: /* @__PURE__ */
|
|
6973
|
+
children: /* @__PURE__ */ jsxs13(Div_default.row, { height: "100%", children: [
|
|
6928
6974
|
/* @__PURE__ */ jsx17(
|
|
6929
6975
|
Div_default,
|
|
6930
6976
|
{
|
|
@@ -7049,7 +7095,7 @@ var InputField_default = InputField2;
|
|
|
7049
7095
|
// src/components/ToggleInput.tsx
|
|
7050
7096
|
import { forwardRef as forwardRef12, useCallback as useCallback10, useId as useId3, useState as useState8 } from "react";
|
|
7051
7097
|
import styled11 from "styled-components";
|
|
7052
|
-
import { jsx as jsx18, jsxs as
|
|
7098
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
7053
7099
|
var componentSize = 26;
|
|
7054
7100
|
var switchComponentBallGap = 3;
|
|
7055
7101
|
var switchComponentMouseDownDifference = 4;
|
|
@@ -7180,10 +7226,10 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
7180
7226
|
onChange?.(newIsChecked, value);
|
|
7181
7227
|
}, [checked, controlledChecked, onChange, value]);
|
|
7182
7228
|
const readyId = id ?? internalId;
|
|
7183
|
-
return /* @__PURE__ */
|
|
7229
|
+
return /* @__PURE__ */ jsxs14(Div_default.column, { gap: theme2.styles.gap, ...styledComponentStylesWithExcluded, children: [
|
|
7184
7230
|
label && /* @__PURE__ */ jsx18(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
|
|
7185
|
-
/* @__PURE__ */
|
|
7186
|
-
/* @__PURE__ */
|
|
7231
|
+
/* @__PURE__ */ jsxs14(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
7232
|
+
/* @__PURE__ */ jsxs14(Div_default.row, { position: "relative", alignItems: "center", children: [
|
|
7187
7233
|
/* @__PURE__ */ jsx18(
|
|
7188
7234
|
InputElement2,
|
|
7189
7235
|
{
|
|
@@ -7228,15 +7274,15 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
7228
7274
|
}
|
|
7229
7275
|
) : void 0
|
|
7230
7276
|
] }),
|
|
7231
|
-
text ? /* @__PURE__ */
|
|
7277
|
+
text ? /* @__PURE__ */ jsxs14(Text_default, { color, userSelect: "none", cursor: "pointer", onClick: onClickText, children: [
|
|
7232
7278
|
text,
|
|
7233
|
-
required && !label && /* @__PURE__ */
|
|
7279
|
+
required && !label && /* @__PURE__ */ jsxs14(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, children: [
|
|
7234
7280
|
" ",
|
|
7235
7281
|
"*"
|
|
7236
7282
|
] })
|
|
7237
|
-
] }) : textAdvanced ? /* @__PURE__ */
|
|
7283
|
+
] }) : textAdvanced ? /* @__PURE__ */ jsxs14(Div_default.row, { userSelect: "none", cursor: "pointer", onClick: onClickText, children: [
|
|
7238
7284
|
textAdvanced,
|
|
7239
|
-
required && !label && /* @__PURE__ */
|
|
7285
|
+
required && !label && /* @__PURE__ */ jsxs14(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, marginLeft: 4, children: [
|
|
7240
7286
|
" ",
|
|
7241
7287
|
"*"
|
|
7242
7288
|
] })
|
|
@@ -7291,7 +7337,7 @@ var ToggleInput_default = {
|
|
|
7291
7337
|
onChange?.(newIsChecked, value);
|
|
7292
7338
|
}, [disabled, checked, onChange, controlledChecked, value]);
|
|
7293
7339
|
const readyId = id ?? internalId;
|
|
7294
|
-
return /* @__PURE__ */
|
|
7340
|
+
return /* @__PURE__ */ jsxs14(Div_default.column, { width: "fit-content", gap: theme2.styles.gap, ...styledComponentStylesWithExcluded, children: [
|
|
7295
7341
|
label && /* @__PURE__ */ jsx18(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
|
|
7296
7342
|
/* @__PURE__ */ jsx18(
|
|
7297
7343
|
Div_default.row,
|
|
@@ -7342,7 +7388,7 @@ var ToggleInput_default = {
|
|
|
7342
7388
|
|
|
7343
7389
|
// src/components/Form.tsx
|
|
7344
7390
|
import { Children, forwardRef as forwardRef13, Fragment as Fragment5, memo as memo19, useMemo as useMemo7 } from "react";
|
|
7345
|
-
import { jsx as jsx19, jsxs as
|
|
7391
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
7346
7392
|
var FormComponent = forwardRef13(function Form({
|
|
7347
7393
|
form,
|
|
7348
7394
|
submitButtonText,
|
|
@@ -7370,12 +7416,12 @@ var FormComponent = forwardRef13(function Form({
|
|
|
7370
7416
|
}, [form]);
|
|
7371
7417
|
const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
|
|
7372
7418
|
const submitButtonIsDisabledFinal = submitButtonIsDisabled || submitButtonIsDisabledInternal;
|
|
7373
|
-
return /* @__PURE__ */ jsx19(Div_default, { width: "100%", ...props, children: /* @__PURE__ */
|
|
7374
|
-
gap !== void 0 || withDividers ? /* @__PURE__ */ jsx19(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */
|
|
7419
|
+
return /* @__PURE__ */ jsx19(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ jsxs15("form", { onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
|
|
7420
|
+
gap !== void 0 || withDividers ? /* @__PURE__ */ jsx19(Div_default.column, { gap: gap ?? (withDividers ? theme2.styles.space : theme2.styles.gap), children: withDividers ? Children.toArray(children).map((child, index) => /* @__PURE__ */ jsxs15(Fragment5, { children: [
|
|
7375
7421
|
child,
|
|
7376
7422
|
index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx19(Divider_default.horizontal, {})
|
|
7377
7423
|
] }, index)) : children }) : children,
|
|
7378
|
-
submitButtonText && /* @__PURE__ */
|
|
7424
|
+
submitButtonText && /* @__PURE__ */ jsxs15(
|
|
7379
7425
|
Div_default.row,
|
|
7380
7426
|
{
|
|
7381
7427
|
alignItems: "center",
|
|
@@ -7406,13 +7452,13 @@ var Form_default = Form2;
|
|
|
7406
7452
|
|
|
7407
7453
|
// src/components/FormRow.tsx
|
|
7408
7454
|
import { forwardRef as forwardRef14, memo as memo20 } from "react";
|
|
7409
|
-
import { jsx as jsx20, jsxs as
|
|
7455
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
7410
7456
|
var FormRowComponent = forwardRef14(function FormRow({ oneItemOnly, noBreakingPoint, asColumn, gap, children, ...props }, ref) {
|
|
7411
7457
|
const theme2 = useTheme();
|
|
7412
7458
|
const mediaQuery = useMediaQuery();
|
|
7413
7459
|
const breakingPoint = asColumn ?? (!noBreakingPoint ? mediaQuery.size900 : false);
|
|
7414
7460
|
const readyGap = breakingPoint || noBreakingPoint && mediaQuery.size900 ? theme2.styles.gap : theme2.styles.space * 2;
|
|
7415
|
-
return /* @__PURE__ */
|
|
7461
|
+
return /* @__PURE__ */ jsxs16(Div_default.row, { alignItems: "center", gap: gap ?? readyGap, invertFlexDirection: breakingPoint, ...props, ref, children: [
|
|
7416
7462
|
children,
|
|
7417
7463
|
oneItemOnly && /* @__PURE__ */ jsx20(Div_default, { width: "100%" })
|
|
7418
7464
|
] });
|
|
@@ -7433,16 +7479,16 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
7433
7479
|
const theme2 = useTheme();
|
|
7434
7480
|
const mediaQuery = useMediaQuery();
|
|
7435
7481
|
const titleGap = theme2.styles.space;
|
|
7436
|
-
return /* @__PURE__ */
|
|
7437
|
-
/* @__PURE__ */
|
|
7482
|
+
return /* @__PURE__ */ jsxs16(FormRowComponent, { ...props, ref, children: [
|
|
7483
|
+
/* @__PURE__ */ jsxs16(Div_default.row, { width: "100%", alignItems: "center", gap: titleGap, children: [
|
|
7438
7484
|
icon && /* @__PURE__ */ jsx20(Icon_default, { name: icon }),
|
|
7439
|
-
/* @__PURE__ */
|
|
7485
|
+
/* @__PURE__ */ jsxs16(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
7440
7486
|
/* @__PURE__ */ jsx20(Text_default, { as: "h3", children: title }),
|
|
7441
7487
|
description && /* @__PURE__ */ jsx20(Text_default, { color: theme2.colors.textSecondary, children: description })
|
|
7442
7488
|
] }),
|
|
7443
7489
|
isLoading && /* @__PURE__ */ jsx20(Div_default, { width: 26 - titleGap })
|
|
7444
7490
|
] }),
|
|
7445
|
-
/* @__PURE__ */
|
|
7491
|
+
/* @__PURE__ */ jsxs16(
|
|
7446
7492
|
Div_default.row,
|
|
7447
7493
|
{
|
|
7448
7494
|
position: "relative",
|
|
@@ -7463,7 +7509,7 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
7463
7509
|
}
|
|
7464
7510
|
),
|
|
7465
7511
|
children,
|
|
7466
|
-
withActions && /* @__PURE__ */
|
|
7512
|
+
withActions && /* @__PURE__ */ jsxs16(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
7467
7513
|
onClickReset && /* @__PURE__ */ jsx20(Button_default.icon, { icon: "XMark", loaderName: resetButtonLoaderName, onClick: onClickReset }),
|
|
7468
7514
|
/* @__PURE__ */ jsx20(Button_default.icon, { icon: "check", loaderName: saveButtonLoaderName, onClick: onClickSave })
|
|
7469
7515
|
] })
|
|
@@ -7478,7 +7524,7 @@ var FormRow_default = FormRow2;
|
|
|
7478
7524
|
|
|
7479
7525
|
// src/components/ColorThemeSwitch.tsx
|
|
7480
7526
|
import { memo as memo21, useEffect as useEffect9 } from "react";
|
|
7481
|
-
import { jsx as jsx21, jsxs as
|
|
7527
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7482
7528
|
var ColorThemeSwitchComponent = function ColorThemeSwitch({
|
|
7483
7529
|
withMoon,
|
|
7484
7530
|
className,
|
|
@@ -7520,7 +7566,7 @@ var ColorThemeSwitchComponent = function ColorThemeSwitch({
|
|
|
7520
7566
|
};
|
|
7521
7567
|
ColorThemeSwitchComponent.withText = function WithText({ withMoon, className, ...props }) {
|
|
7522
7568
|
const theme2 = useTheme();
|
|
7523
|
-
return /* @__PURE__ */
|
|
7569
|
+
return /* @__PURE__ */ jsxs17(Div_default.row, { width: "fit-content", alignItems: "center", gap: theme2.styles.gap, userSelect: "none", ...props, children: [
|
|
7524
7570
|
/* @__PURE__ */ jsx21(Text_default, { children: "Light" }),
|
|
7525
7571
|
/* @__PURE__ */ jsx21(ColorThemeSwitchComponent, { withMoon, className }),
|
|
7526
7572
|
/* @__PURE__ */ jsx21(Text_default, { children: "Dark" })
|
|
@@ -7543,7 +7589,7 @@ import {
|
|
|
7543
7589
|
Fragment as Fragment6
|
|
7544
7590
|
} from "react";
|
|
7545
7591
|
import styled12, { css as css2 } from "styled-components";
|
|
7546
|
-
import { Fragment as Fragment7, jsx as jsx22, jsxs as
|
|
7592
|
+
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7547
7593
|
var defaultImageWidth = 160;
|
|
7548
7594
|
var maximumVisiblePages = 11;
|
|
7549
7595
|
var TableStyledComponent = styled12.table.withConfig({
|
|
@@ -8072,7 +8118,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8072
8118
|
);
|
|
8073
8119
|
const withFooter = pageSize !== void 0 && pageCountInternal > 1;
|
|
8074
8120
|
const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages / 1.4;
|
|
8075
|
-
return /* @__PURE__ */
|
|
8121
|
+
return /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
8076
8122
|
/* @__PURE__ */ jsx22(
|
|
8077
8123
|
Div_default,
|
|
8078
8124
|
{
|
|
@@ -8081,7 +8127,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8081
8127
|
overflow: !containsOverflowComponents ? "auto" : void 0,
|
|
8082
8128
|
...props,
|
|
8083
8129
|
ref: wrapperComponentRef,
|
|
8084
|
-
children: /* @__PURE__ */
|
|
8130
|
+
children: /* @__PURE__ */ jsxs18(
|
|
8085
8131
|
TableStyledComponent,
|
|
8086
8132
|
{
|
|
8087
8133
|
isStriped,
|
|
@@ -8099,7 +8145,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8099
8145
|
minWidth: column.minWidth,
|
|
8100
8146
|
maxWidth: column.maxWidth,
|
|
8101
8147
|
textAlign: column.align,
|
|
8102
|
-
children: /* @__PURE__ */
|
|
8148
|
+
children: /* @__PURE__ */ jsxs18(
|
|
8103
8149
|
Div_default.row,
|
|
8104
8150
|
{
|
|
8105
8151
|
width: "100%",
|
|
@@ -8130,7 +8176,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8130
8176
|
},
|
|
8131
8177
|
column.type + column.label + index
|
|
8132
8178
|
)) }) }),
|
|
8133
|
-
/* @__PURE__ */ jsx22("tbody", { children: isLoading ? /* @__PURE__ */ jsx22("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx22("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ jsx22(Loader_default.box, {}) }) }) : dataAfterPagination.length > 0 ? dataAfterPagination.map((item, rowIndex) => /* @__PURE__ */
|
|
8179
|
+
/* @__PURE__ */ jsx22("tbody", { children: isLoading ? /* @__PURE__ */ jsx22("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx22("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ jsx22(Loader_default.box, {}) }) }) : dataAfterPagination.length > 0 ? dataAfterPagination.map((item, rowIndex) => /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
8134
8180
|
/* @__PURE__ */ jsx22(
|
|
8135
8181
|
"tr",
|
|
8136
8182
|
{
|
|
@@ -8152,7 +8198,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8152
8198
|
),
|
|
8153
8199
|
expandedRows[rowIndex] && /* @__PURE__ */ jsx22("tr", { className: "withoutHover isExpandRow", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: renderExpandedRow(item, rowIndex) }) })
|
|
8154
8200
|
] }, JSON.stringify(item) + rowIndex)) : /* @__PURE__ */ jsx22("tr", { className: "withoutHover", children: /* @__PURE__ */ jsx22("td", { className: "noData", colSpan: columns.length, children: /* @__PURE__ */ jsx22(Text_default.unknown, { children: noDataItemsMessage }) }) }) }),
|
|
8155
|
-
withFooter && /* @__PURE__ */ jsx22("tfoot", { children: /* @__PURE__ */ jsx22("tr", { className: "isFooter", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: /* @__PURE__ */
|
|
8201
|
+
withFooter && /* @__PURE__ */ jsx22("tfoot", { children: /* @__PURE__ */ jsx22("tr", { className: "isFooter", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: /* @__PURE__ */ jsxs18(
|
|
8156
8202
|
Div_default.column,
|
|
8157
8203
|
{
|
|
8158
8204
|
position: "relative",
|
|
@@ -8161,7 +8207,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8161
8207
|
flexReverse: true,
|
|
8162
8208
|
gap: theme2.styles.gap / 2,
|
|
8163
8209
|
children: [
|
|
8164
|
-
/* @__PURE__ */
|
|
8210
|
+
/* @__PURE__ */ jsxs18(
|
|
8165
8211
|
Text_default,
|
|
8166
8212
|
{
|
|
8167
8213
|
position: mobileFooterBreakingPoint ? "relative" : "absolute",
|
|
@@ -8176,7 +8222,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8176
8222
|
]
|
|
8177
8223
|
}
|
|
8178
8224
|
),
|
|
8179
|
-
/* @__PURE__ */
|
|
8225
|
+
/* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", justifyContent: "center", gap: theme2.styles.gap * 2, children: [
|
|
8180
8226
|
pageCountInternal > maximumVisiblePages && /* @__PURE__ */ jsx22(
|
|
8181
8227
|
Button_default.icon,
|
|
8182
8228
|
{
|
|
@@ -8265,12 +8311,12 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8265
8311
|
submitButtonText: "Filter",
|
|
8266
8312
|
cancelButtonText: "Clear",
|
|
8267
8313
|
onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
|
|
8268
|
-
children: /* @__PURE__ */
|
|
8314
|
+
children: /* @__PURE__ */ jsxs18(FormRow_default, { children: [
|
|
8269
8315
|
/* @__PURE__ */ jsx22(InputField_default, { type: "number", label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
8270
8316
|
/* @__PURE__ */ jsx22(InputField_default, { type: "number", label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
8271
8317
|
] })
|
|
8272
8318
|
}
|
|
8273
|
-
) : openedFilterColumn.filter === "date" || openedFilterColumn.filter === "date-time" ? /* @__PURE__ */
|
|
8319
|
+
) : openedFilterColumn.filter === "date" || openedFilterColumn.filter === "date-time" ? /* @__PURE__ */ jsxs18(
|
|
8274
8320
|
Form_default,
|
|
8275
8321
|
{
|
|
8276
8322
|
form: filterForm,
|
|
@@ -8279,14 +8325,14 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8279
8325
|
cancelButtonText: "Clear",
|
|
8280
8326
|
onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
|
|
8281
8327
|
children: [
|
|
8282
|
-
/* @__PURE__ */ jsx22(FormRow_default, { children: openedFilterColumn.filter === "date" ? /* @__PURE__ */
|
|
8328
|
+
/* @__PURE__ */ jsx22(FormRow_default, { children: openedFilterColumn.filter === "date" ? /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
8283
8329
|
/* @__PURE__ */ jsx22(InputField_default.date, { label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
8284
8330
|
/* @__PURE__ */ jsx22(InputField_default.date, { label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
8285
|
-
] }) : /* @__PURE__ */
|
|
8331
|
+
] }) : /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
8286
8332
|
/* @__PURE__ */ jsx22(InputField_default.dateTime, { label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
8287
8333
|
/* @__PURE__ */ jsx22(InputField_default.dateTime, { label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
8288
8334
|
] }) }),
|
|
8289
|
-
openedFilterColumn.presets && /* @__PURE__ */
|
|
8335
|
+
openedFilterColumn.presets && /* @__PURE__ */ jsxs18(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
8290
8336
|
/* @__PURE__ */ jsx22(Label_default, { text: "Presets" }),
|
|
8291
8337
|
/* @__PURE__ */ jsx22(Div_default.row, { alignItems: "center", flexWrap: "wrap", gap: theme2.styles.gap, children: openedFilterColumn.presets.map((preset) => /* @__PURE__ */ jsx22(
|
|
8292
8338
|
Button_default.secondary,
|
|
@@ -8301,13 +8347,13 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8301
8347
|
] })
|
|
8302
8348
|
]
|
|
8303
8349
|
}
|
|
8304
|
-
) : openedFilterColumn.filter === "list" ? /* @__PURE__ */
|
|
8350
|
+
) : openedFilterColumn.filter === "list" ? /* @__PURE__ */ jsxs18(
|
|
8305
8351
|
Form_default,
|
|
8306
8352
|
{
|
|
8307
8353
|
gap: theme2.styles.space,
|
|
8308
8354
|
submitButtonText: "Filter",
|
|
8309
8355
|
cancelButtonText: "Clear",
|
|
8310
|
-
renderActionButtons: /* @__PURE__ */
|
|
8356
|
+
renderActionButtons: /* @__PURE__ */ jsxs18(Div_default.row, { marginRight: "auto", alignItems: "center", gap: theme2.styles.gap, children: [
|
|
8311
8357
|
/* @__PURE__ */ jsx22(
|
|
8312
8358
|
Button_default.secondary,
|
|
8313
8359
|
{
|
|
@@ -8338,7 +8384,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8338
8384
|
...filterForm.getInputFieldProps("search")
|
|
8339
8385
|
}
|
|
8340
8386
|
) }),
|
|
8341
|
-
/* @__PURE__ */
|
|
8387
|
+
/* @__PURE__ */ jsxs18(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
8342
8388
|
/* @__PURE__ */ jsx22(Label_default, { text: "Possible values" }),
|
|
8343
8389
|
/* @__PURE__ */ jsx22(Div_default.row, { flexWrap: "wrap", gap: theme2.styles.gap, children: possibleFilterListValues.length > 0 ? possibleFilterListValues.map((value) => {
|
|
8344
8390
|
const isActive = filterListSelectedItems?.includes(value.value);
|
|
@@ -8348,9 +8394,9 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8348
8394
|
isActive,
|
|
8349
8395
|
value: value.value,
|
|
8350
8396
|
onClickWithValue: onClickFilterListItem,
|
|
8351
|
-
children: /* @__PURE__ */
|
|
8397
|
+
children: /* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", gap: theme2.styles.gap / 2, children: [
|
|
8352
8398
|
/* @__PURE__ */ jsx22(Text_default, { children: value.label ?? value.value }),
|
|
8353
|
-
openedFilterColumn.withTotalNumber && /* @__PURE__ */
|
|
8399
|
+
openedFilterColumn.withTotalNumber && /* @__PURE__ */ jsxs18(
|
|
8354
8400
|
Text_default,
|
|
8355
8401
|
{
|
|
8356
8402
|
fontSize: 14,
|
|
@@ -8382,7 +8428,7 @@ var Table_default = Table2;
|
|
|
8382
8428
|
// src/components/Tooltip.tsx
|
|
8383
8429
|
import { memo as memo23, useCallback as useCallback12, useRef as useRef7, useState as useState10, useEffect as useEffect11, forwardRef as forwardRef16, useImperativeHandle as useImperativeHandle3, useMemo as useMemo9 } from "react";
|
|
8384
8430
|
import styled13, { css as css3 } from "styled-components";
|
|
8385
|
-
import { jsx as jsx23, jsxs as
|
|
8431
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
8386
8432
|
var tooltipContainerStyle = (props) => ({
|
|
8387
8433
|
top: css3`
|
|
8388
8434
|
bottom: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
@@ -8618,7 +8664,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
8618
8664
|
},
|
|
8619
8665
|
[isOpen, openTooltip, closeTooltip]
|
|
8620
8666
|
);
|
|
8621
|
-
return /* @__PURE__ */
|
|
8667
|
+
return /* @__PURE__ */ jsxs19(
|
|
8622
8668
|
Div_default,
|
|
8623
8669
|
{
|
|
8624
8670
|
position: "relative",
|
|
@@ -8650,7 +8696,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
8650
8696
|
isOpen,
|
|
8651
8697
|
role: "tooltip",
|
|
8652
8698
|
ref: tooltipContainerRef,
|
|
8653
|
-
children: (isOpen || isOpenLate) && /* @__PURE__ */
|
|
8699
|
+
children: (isOpen || isOpenLate) && /* @__PURE__ */ jsxs19(Div_default, { position: "relative", ref: contentRef, children: [
|
|
8654
8700
|
/* @__PURE__ */ jsx23(
|
|
8655
8701
|
Div_default.box,
|
|
8656
8702
|
{
|
|
@@ -8711,7 +8757,7 @@ TooltipComponent.item = forwardRef16(function Item({
|
|
|
8711
8757
|
onClickWithValue
|
|
8712
8758
|
}, ref) {
|
|
8713
8759
|
const theme2 = useTheme();
|
|
8714
|
-
return /* @__PURE__ */
|
|
8760
|
+
return /* @__PURE__ */ jsxs19(
|
|
8715
8761
|
Div_default.row,
|
|
8716
8762
|
{
|
|
8717
8763
|
alignItems: "center",
|
|
@@ -8730,7 +8776,7 @@ TooltipComponent.item = forwardRef16(function Item({
|
|
|
8730
8776
|
ref,
|
|
8731
8777
|
children: [
|
|
8732
8778
|
icon && /* @__PURE__ */ jsx23(Icon_default, { name: icon, color: iconColor ?? (!isActive ? theme2.colors.textSecondary : void 0) }),
|
|
8733
|
-
/* @__PURE__ */
|
|
8779
|
+
/* @__PURE__ */ jsxs19(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
8734
8780
|
/* @__PURE__ */ jsx23(Text_default, { fontWeight: isActive ? 700 : void 0, color: textColor ?? theme2.colors.textPrimary, children: text }),
|
|
8735
8781
|
description && /* @__PURE__ */ jsx23(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: description })
|
|
8736
8782
|
] })
|
|
@@ -8766,7 +8812,7 @@ var Tooltip_default = Tooltip2;
|
|
|
8766
8812
|
|
|
8767
8813
|
// src/components/Tabs.tsx
|
|
8768
8814
|
import { forwardRef as forwardRef17, memo as memo24, useCallback as useCallback13, useEffect as useEffect12, useImperativeHandle as useImperativeHandle4, useMemo as useMemo10, useRef as useRef8, useState as useState11 } from "react";
|
|
8769
|
-
import { jsx as jsx24, jsxs as
|
|
8815
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
8770
8816
|
var tabBottomLineWidth = 2;
|
|
8771
8817
|
var tabDotSize = 6;
|
|
8772
8818
|
var defaultTabName = "tab";
|
|
@@ -8865,11 +8911,11 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
|
|
|
8865
8911
|
},
|
|
8866
8912
|
[selectedTab, onClickTab]
|
|
8867
8913
|
);
|
|
8868
|
-
return /* @__PURE__ */
|
|
8869
|
-
/* @__PURE__ */
|
|
8914
|
+
return /* @__PURE__ */ jsxs20(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
|
|
8915
|
+
/* @__PURE__ */ jsxs20(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
|
|
8870
8916
|
/* @__PURE__ */ jsx24(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", children: tabs.map((tab) => {
|
|
8871
8917
|
const selected = tab === selectedTab;
|
|
8872
|
-
return /* @__PURE__ */
|
|
8918
|
+
return /* @__PURE__ */ jsxs20(
|
|
8873
8919
|
Div_default,
|
|
8874
8920
|
{
|
|
8875
8921
|
position: "relative",
|
|
@@ -8957,7 +9003,7 @@ var Tabs_default = Tabs2;
|
|
|
8957
9003
|
|
|
8958
9004
|
// src/components/Foldable.tsx
|
|
8959
9005
|
import { forwardRef as forwardRef18, memo as memo25, useCallback as useCallback14, useEffect as useEffect13, useImperativeHandle as useImperativeHandle5, useRef as useRef9, useState as useState12 } from "react";
|
|
8960
|
-
import { jsx as jsx25, jsxs as
|
|
9006
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8961
9007
|
var animationDurationClose = 0.15;
|
|
8962
9008
|
var animationDurationOpen = animationDurationClose * 2;
|
|
8963
9009
|
var FoldableComponent = forwardRef18(function Foldable({
|
|
@@ -9026,8 +9072,8 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
9026
9072
|
},
|
|
9027
9073
|
[open, close, toggleOpen, isOpen]
|
|
9028
9074
|
);
|
|
9029
|
-
return /* @__PURE__ */
|
|
9030
|
-
renderHeader ? renderHeader(isOpen, toggleOpen) : /* @__PURE__ */
|
|
9075
|
+
return /* @__PURE__ */ jsxs21(Div_default.column, { width: "100%", ...props, children: [
|
|
9076
|
+
renderHeader ? renderHeader(isOpen, toggleOpen) : /* @__PURE__ */ jsxs21(
|
|
9031
9077
|
Div_default.row,
|
|
9032
9078
|
{
|
|
9033
9079
|
width: "100%",
|
|
@@ -9039,10 +9085,10 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
9039
9085
|
onClick: toggleOpen,
|
|
9040
9086
|
userSelect: "none",
|
|
9041
9087
|
children: [
|
|
9042
|
-
/* @__PURE__ */
|
|
9088
|
+
/* @__PURE__ */ jsxs21(Div_default.row, { flex: 1, alignItems: "center", gap: theme2.styles.space, children: [
|
|
9043
9089
|
icon && /* @__PURE__ */ jsx25(Icon_default, { name: icon, size: 20, flexShrink: 0 }),
|
|
9044
9090
|
image && /* @__PURE__ */ jsx25(Image_default.profileImage, { name: image, size: 24, flexShrink: 0 }),
|
|
9045
|
-
/* @__PURE__ */
|
|
9091
|
+
/* @__PURE__ */ jsxs21(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
9046
9092
|
title && /* @__PURE__ */ jsx25(Text_default, { as: "h3", fontWeight: 700, lineHeight: "20px", children: title }),
|
|
9047
9093
|
description && /* @__PURE__ */ jsx25(Text_default, { color: theme2.colors.textSecondary, children: description })
|
|
9048
9094
|
] })
|