react-better-html 1.1.163 → 1.1.165
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 +46 -36
- package/dist/index.d.ts +46 -36
- package/dist/index.js +242 -189
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +309 -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
|
|
|
@@ -5408,6 +5454,11 @@ var colorThemeControls = {
|
|
|
5408
5454
|
}, 0.01 * 1e3);
|
|
5409
5455
|
}
|
|
5410
5456
|
};
|
|
5457
|
+
var filterHover = {
|
|
5458
|
+
z1: externalBetterHtmlContextValue?.colorTheme === "dark" ? "brightness(1.1)" : "brightness(0.9)",
|
|
5459
|
+
z2: externalBetterHtmlContextValue?.colorTheme === "dark" ? "brightness(1.2)" : "brightness(0.8)",
|
|
5460
|
+
z3: externalBetterHtmlContextValue?.colorTheme === "dark" ? "brightness(1.3)" : "brightness(0.7)"
|
|
5461
|
+
};
|
|
5411
5462
|
|
|
5412
5463
|
// src/utils/functions.ts
|
|
5413
5464
|
var generateRandomString = (stringLength, options) => {
|
|
@@ -5517,10 +5568,10 @@ var decryptString = (text) => {
|
|
|
5517
5568
|
|
|
5518
5569
|
// src/components/Label.tsx
|
|
5519
5570
|
import { memo as memo15 } from "react";
|
|
5520
|
-
import { jsxs as
|
|
5571
|
+
import { jsxs as jsxs10 } from "react/jsx-runtime";
|
|
5521
5572
|
function Label({ text, required, isError, color, htmlFor }) {
|
|
5522
5573
|
const theme2 = useTheme();
|
|
5523
|
-
return /* @__PURE__ */
|
|
5574
|
+
return /* @__PURE__ */ jsxs10(
|
|
5524
5575
|
Text_default,
|
|
5525
5576
|
{
|
|
5526
5577
|
as: "label",
|
|
@@ -5532,7 +5583,7 @@ function Label({ text, required, isError, color, htmlFor }) {
|
|
|
5532
5583
|
"aria-required": required,
|
|
5533
5584
|
children: [
|
|
5534
5585
|
text,
|
|
5535
|
-
required && /* @__PURE__ */
|
|
5586
|
+
required && /* @__PURE__ */ jsxs10(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, children: [
|
|
5536
5587
|
" ",
|
|
5537
5588
|
"*"
|
|
5538
5589
|
] })
|
|
@@ -5544,7 +5595,7 @@ var Label_default = memo15(Label);
|
|
|
5544
5595
|
|
|
5545
5596
|
// src/components/Dropdown.tsx
|
|
5546
5597
|
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
|
|
5598
|
+
import { Fragment as Fragment4, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5548
5599
|
var DropdownComponent = forwardRef10(function Dropdown({
|
|
5549
5600
|
label,
|
|
5550
5601
|
labelColor,
|
|
@@ -5671,13 +5722,13 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
5671
5722
|
);
|
|
5672
5723
|
const selectedOption = useMemo4(() => options.find((option) => option.value === value), [options, value]);
|
|
5673
5724
|
const renderedOptions = useMemo4(
|
|
5674
|
-
() => /* @__PURE__ */
|
|
5725
|
+
() => /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
5675
5726
|
renderOptionDivider ? renderOptionDivider(void 0, filteredOptions[0], -1, 0) : void 0,
|
|
5676
5727
|
filteredOptions.map((option, index) => {
|
|
5677
5728
|
const isSelected = option.value === value;
|
|
5678
5729
|
const isDisabled = option.disabled;
|
|
5679
5730
|
const isFocused2 = index === focusedOptionIndex;
|
|
5680
|
-
return /* @__PURE__ */
|
|
5731
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
5681
5732
|
/* @__PURE__ */ jsx15(
|
|
5682
5733
|
Div_default,
|
|
5683
5734
|
{
|
|
@@ -5743,7 +5794,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
5743
5794
|
const displayValue = withSearch && isFocused ? searchQuery : selectedOption?.label ?? "";
|
|
5744
5795
|
const withClearButton = isOpen && selectedOption;
|
|
5745
5796
|
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__ */
|
|
5797
|
+
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
5798
|
/* @__PURE__ */ jsx15(
|
|
5748
5799
|
InputField_default,
|
|
5749
5800
|
{
|
|
@@ -5801,7 +5852,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
5801
5852
|
ref: inputRef
|
|
5802
5853
|
}
|
|
5803
5854
|
),
|
|
5804
|
-
/* @__PURE__ */
|
|
5855
|
+
/* @__PURE__ */ jsxs11(
|
|
5805
5856
|
Div_default.row,
|
|
5806
5857
|
{
|
|
5807
5858
|
position: "absolute",
|
|
@@ -5850,7 +5901,7 @@ var DropdownComponent = forwardRef10(function Dropdown({
|
|
|
5850
5901
|
DropdownComponent.countries = forwardRef10(function Countries({ ...props }, ref) {
|
|
5851
5902
|
const theme2 = useTheme();
|
|
5852
5903
|
const renderOption = useCallback7(
|
|
5853
|
-
(option, index, isSelected) => /* @__PURE__ */
|
|
5904
|
+
(option, index, isSelected) => /* @__PURE__ */ jsxs11(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
5854
5905
|
/* @__PURE__ */ jsx15(Image_default, { src: `https://flagcdn.com/w80/${option.data?.code.toString().toLowerCase()}.webp`, width: 20 }),
|
|
5855
5906
|
/* @__PURE__ */ jsx15(Text_default, { children: option.label })
|
|
5856
5907
|
] }),
|
|
@@ -5886,7 +5937,7 @@ var Dropdown_default = Dropdown2;
|
|
|
5886
5937
|
// src/components/Calendar.tsx
|
|
5887
5938
|
import { useCallback as useCallback8, useMemo as useMemo5, useState as useState6, memo as memo17, useEffect as useEffect7, useId } from "react";
|
|
5888
5939
|
import styled9 from "styled-components";
|
|
5889
|
-
import { jsx as jsx16, jsxs as
|
|
5940
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5890
5941
|
var getMonthName = (month, short = false) => {
|
|
5891
5942
|
return [
|
|
5892
5943
|
short ? "Jan" : "January",
|
|
@@ -6000,12 +6051,12 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6000
6051
|
setCurrentMonth(date.getMonth());
|
|
6001
6052
|
setCurrentYear(date.getFullYear());
|
|
6002
6053
|
}, [value]);
|
|
6003
|
-
return /* @__PURE__ */
|
|
6004
|
-
/* @__PURE__ */
|
|
6054
|
+
return /* @__PURE__ */ jsxs12(Div_default.column, { width: "100%", maxWidth: 320, gap: theme2.styles.gap, padding: theme2.styles.space / 2, userSelect: "none", children: [
|
|
6055
|
+
/* @__PURE__ */ jsxs12(Div_default.row, { width: "100%", justifyContent: "space-between", alignItems: "center", children: [
|
|
6005
6056
|
/* @__PURE__ */ jsx16(Button_default.icon, { icon: "chevronLeft", onClick: onClickPreviousMonthButton }),
|
|
6006
|
-
/* @__PURE__ */
|
|
6057
|
+
/* @__PURE__ */ jsxs12(Div_default.row, { alignItems: "center", gap: 4, children: [
|
|
6007
6058
|
/* @__PURE__ */ jsx16(Text_default, { fontWeight: 700, children: getMonthName(currentMonth) }),
|
|
6008
|
-
/* @__PURE__ */ jsx16(SelectWrapperComponent, { children: /* @__PURE__ */
|
|
6059
|
+
/* @__PURE__ */ jsx16(SelectWrapperComponent, { children: /* @__PURE__ */ jsxs12(Div_default.row, { position: "relative", alignItems: "center", gap: 2, children: [
|
|
6009
6060
|
/* @__PURE__ */ jsx16(Text_default, { fontWeight: 700, children: currentYear }),
|
|
6010
6061
|
/* @__PURE__ */ jsx16(Icon_default, { name: "chevronDown", size: 12 }),
|
|
6011
6062
|
/* @__PURE__ */ jsx16(
|
|
@@ -6022,14 +6073,14 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6022
6073
|
] }),
|
|
6023
6074
|
/* @__PURE__ */ jsx16(Button_default.icon, { icon: "chevronRight", onClick: onClickNextMonthButton })
|
|
6024
6075
|
] }),
|
|
6025
|
-
/* @__PURE__ */
|
|
6076
|
+
/* @__PURE__ */ jsxs12(Div_default.grid, { width: "100%", gridTemplateColumns: "repeat(7, 1fr)", gap: theme2.styles.gap / 2, children: [
|
|
6026
6077
|
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
6078
|
days.map((day, index) => {
|
|
6028
6079
|
const thisDayDate = new Date(currentYear, currentMonth, day);
|
|
6029
6080
|
const isSelected = day !== void 0 && day === currentDate?.getDate() && currentMonth === currentDate.getMonth() && currentYear === currentDate.getFullYear();
|
|
6030
6081
|
const isWeekend = thisDayDate.getDay() === 6 || thisDayDate.getDay() === 0;
|
|
6031
6082
|
const isDisabled = minDate && thisDayDate.getTime() < minDate.getTime() || maxDate && thisDayDate.getTime() > maxDate.getTime();
|
|
6032
|
-
return /* @__PURE__ */
|
|
6083
|
+
return /* @__PURE__ */ jsxs12(
|
|
6033
6084
|
Div_default.row,
|
|
6034
6085
|
{
|
|
6035
6086
|
position: "relative",
|
|
@@ -6073,7 +6124,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6073
6124
|
);
|
|
6074
6125
|
})
|
|
6075
6126
|
] }),
|
|
6076
|
-
/* @__PURE__ */
|
|
6127
|
+
/* @__PURE__ */ jsxs12(Div_default.row, { width: "100%", justifyContent: "space-between", alignItems: "center", children: [
|
|
6077
6128
|
/* @__PURE__ */ jsx16(Div_default, { isTabAccessed: true, cursor: "pointer", onClick: onClickClear, children: /* @__PURE__ */ jsx16(
|
|
6078
6129
|
Text_default,
|
|
6079
6130
|
{
|
|
@@ -6100,7 +6151,7 @@ function Calendar({ value, minDate, maxDate, onChange }) {
|
|
|
6100
6151
|
var Calendar_default = memo17(Calendar);
|
|
6101
6152
|
|
|
6102
6153
|
// src/components/InputField.tsx
|
|
6103
|
-
import { jsx as jsx17, jsxs as
|
|
6154
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
6104
6155
|
var buttonWidth = 50;
|
|
6105
6156
|
var colorPickerSpacing = 4;
|
|
6106
6157
|
var colorPickerColorWidth = 12 + 27 + colorPickerSpacing;
|
|
@@ -6318,9 +6369,9 @@ var InputFieldComponent = forwardRef11(function InputField({
|
|
|
6318
6369
|
onChangeValue?.(debouncedValue);
|
|
6319
6370
|
}, [withDebounce, onChangeValue, debouncedValue]);
|
|
6320
6371
|
const readyId = id ?? internalId;
|
|
6321
|
-
return /* @__PURE__ */
|
|
6372
|
+
return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, ...styledComponentStylesWithExcluded, children: [
|
|
6322
6373
|
label && /* @__PURE__ */ jsx17(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
|
|
6323
|
-
/* @__PURE__ */
|
|
6374
|
+
/* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "stretch", width: "100%", children: [
|
|
6324
6375
|
prefix && /* @__PURE__ */ jsx17(
|
|
6325
6376
|
Div_default.row,
|
|
6326
6377
|
{
|
|
@@ -6335,7 +6386,7 @@ var InputFieldComponent = forwardRef11(function InputField({
|
|
|
6335
6386
|
children: prefix
|
|
6336
6387
|
}
|
|
6337
6388
|
),
|
|
6338
|
-
/* @__PURE__ */
|
|
6389
|
+
/* @__PURE__ */ jsxs13(Div_default, { position: "relative", width: "100%", height: "fit-content", ref: holderRef, children: [
|
|
6339
6390
|
leftIcon && /* @__PURE__ */ jsx17(
|
|
6340
6391
|
Icon_default,
|
|
6341
6392
|
{
|
|
@@ -6445,9 +6496,9 @@ InputFieldComponent.multiline = forwardRef11(function Multiline({
|
|
|
6445
6496
|
[onChange, onChangeValue]
|
|
6446
6497
|
);
|
|
6447
6498
|
const readyId = id ?? internalId;
|
|
6448
|
-
return /* @__PURE__ */
|
|
6499
|
+
return /* @__PURE__ */ jsxs13(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
6449
6500
|
label && /* @__PURE__ */ jsx17(Label_default, { text: label, required, isError: !!errorText, htmlFor: readyId }),
|
|
6450
|
-
/* @__PURE__ */
|
|
6501
|
+
/* @__PURE__ */ jsxs13(Div_default, { position: "relative", width: "100%", children: [
|
|
6451
6502
|
leftIcon && /* @__PURE__ */ jsx17(
|
|
6452
6503
|
Icon_default,
|
|
6453
6504
|
{
|
|
@@ -6591,7 +6642,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
|
|
|
6591
6642
|
const [dropdownValue, setDropdownValue] = useState7();
|
|
6592
6643
|
const [inputFieldValue, setInputFieldValue] = useState7(value?.toString() ?? "");
|
|
6593
6644
|
const renderOption = useCallback9(
|
|
6594
|
-
(option, index, isSelected) => /* @__PURE__ */
|
|
6645
|
+
(option, index, isSelected) => /* @__PURE__ */ jsxs13(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
6595
6646
|
/* @__PURE__ */ jsx17(Image_default, { src: `https://flagcdn.com/w80/${option.data?.code.toString().toLowerCase()}.webp`, width: 20 }),
|
|
6596
6647
|
/* @__PURE__ */ jsx17(Text_default, { children: option.label })
|
|
6597
6648
|
] }),
|
|
@@ -6636,7 +6687,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
|
|
|
6636
6687
|
setInputFieldValue(newValue.slice(country?.phoneNumberExtension.length + 1));
|
|
6637
6688
|
}, [value]);
|
|
6638
6689
|
const readyId = id ?? internalId;
|
|
6639
|
-
return /* @__PURE__ */
|
|
6690
|
+
return /* @__PURE__ */ jsxs13(Div_default.column, { width: "100%", gap: theme2.styles.gap / 2, children: [
|
|
6640
6691
|
label && /* @__PURE__ */ jsx17(
|
|
6641
6692
|
Label_default,
|
|
6642
6693
|
{
|
|
@@ -6647,7 +6698,7 @@ InputFieldComponent.phoneNumber = forwardRef11(function PhoneNumber({ label, val
|
|
|
6647
6698
|
htmlFor: readyId
|
|
6648
6699
|
}
|
|
6649
6700
|
),
|
|
6650
|
-
/* @__PURE__ */
|
|
6701
|
+
/* @__PURE__ */ jsxs13(Div_default.row, { children: [
|
|
6651
6702
|
/* @__PURE__ */ jsx17(
|
|
6652
6703
|
Dropdown_default,
|
|
6653
6704
|
{
|
|
@@ -6782,9 +6833,9 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
|
|
|
6782
6833
|
overflow: "hidden",
|
|
6783
6834
|
userSelect: "none",
|
|
6784
6835
|
...insideInputFieldComponentProps,
|
|
6785
|
-
children: /* @__PURE__ */
|
|
6836
|
+
children: /* @__PURE__ */ jsxs13(Div_default.row, { gap: theme2.styles.space, children: [
|
|
6786
6837
|
/* @__PURE__ */ jsx17(Calendar_default, { value: internalValue, minDate, maxDate, onChange }),
|
|
6787
|
-
/* @__PURE__ */
|
|
6838
|
+
/* @__PURE__ */ jsxs13(
|
|
6788
6839
|
Div_default.row,
|
|
6789
6840
|
{
|
|
6790
6841
|
height: 276,
|
|
@@ -6793,7 +6844,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
|
|
|
6793
6844
|
paddingBottom: theme2.styles.space / 2,
|
|
6794
6845
|
paddingRight: theme2.styles.space / 2,
|
|
6795
6846
|
children: [
|
|
6796
|
-
/* @__PURE__ */
|
|
6847
|
+
/* @__PURE__ */ jsxs13(Div_default, { height: "100%", children: [
|
|
6797
6848
|
/* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme2.styles.gap / 2, children: "H" }),
|
|
6798
6849
|
/* @__PURE__ */ jsx17(
|
|
6799
6850
|
Div_default,
|
|
@@ -6827,7 +6878,7 @@ InputFieldComponent.dateTime = forwardRef11(function DateTime({ minDate, maxDate
|
|
|
6827
6878
|
}
|
|
6828
6879
|
)
|
|
6829
6880
|
] }),
|
|
6830
|
-
/* @__PURE__ */
|
|
6881
|
+
/* @__PURE__ */ jsxs13(Div_default, { height: "100%", children: [
|
|
6831
6882
|
/* @__PURE__ */ jsx17(Text_default, { fontSize: 14, fontWeight: 700, textAlign: "center", marginBottom: theme2.styles.gap / 2, children: "M" }),
|
|
6832
6883
|
/* @__PURE__ */ jsx17(
|
|
6833
6884
|
Div_default,
|
|
@@ -6924,7 +6975,7 @@ InputFieldComponent.time = forwardRef11(function Time({ ...props }, ref) {
|
|
|
6924
6975
|
overflowY: "auto",
|
|
6925
6976
|
userSelect: "none",
|
|
6926
6977
|
...insideInputFieldComponentProps,
|
|
6927
|
-
children: /* @__PURE__ */
|
|
6978
|
+
children: /* @__PURE__ */ jsxs13(Div_default.row, { height: "100%", children: [
|
|
6928
6979
|
/* @__PURE__ */ jsx17(
|
|
6929
6980
|
Div_default,
|
|
6930
6981
|
{
|
|
@@ -7049,7 +7100,7 @@ var InputField_default = InputField2;
|
|
|
7049
7100
|
// src/components/ToggleInput.tsx
|
|
7050
7101
|
import { forwardRef as forwardRef12, useCallback as useCallback10, useId as useId3, useState as useState8 } from "react";
|
|
7051
7102
|
import styled11 from "styled-components";
|
|
7052
|
-
import { jsx as jsx18, jsxs as
|
|
7103
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
7053
7104
|
var componentSize = 26;
|
|
7054
7105
|
var switchComponentBallGap = 3;
|
|
7055
7106
|
var switchComponentMouseDownDifference = 4;
|
|
@@ -7180,10 +7231,10 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
7180
7231
|
onChange?.(newIsChecked, value);
|
|
7181
7232
|
}, [checked, controlledChecked, onChange, value]);
|
|
7182
7233
|
const readyId = id ?? internalId;
|
|
7183
|
-
return /* @__PURE__ */
|
|
7234
|
+
return /* @__PURE__ */ jsxs14(Div_default.column, { gap: theme2.styles.gap, ...styledComponentStylesWithExcluded, children: [
|
|
7184
7235
|
label && /* @__PURE__ */ jsx18(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
|
|
7185
|
-
/* @__PURE__ */
|
|
7186
|
-
/* @__PURE__ */
|
|
7236
|
+
/* @__PURE__ */ jsxs14(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
7237
|
+
/* @__PURE__ */ jsxs14(Div_default.row, { position: "relative", alignItems: "center", children: [
|
|
7187
7238
|
/* @__PURE__ */ jsx18(
|
|
7188
7239
|
InputElement2,
|
|
7189
7240
|
{
|
|
@@ -7228,15 +7279,15 @@ var ToggleInputComponent = forwardRef12(function ToggleInput({
|
|
|
7228
7279
|
}
|
|
7229
7280
|
) : void 0
|
|
7230
7281
|
] }),
|
|
7231
|
-
text ? /* @__PURE__ */
|
|
7282
|
+
text ? /* @__PURE__ */ jsxs14(Text_default, { color, userSelect: "none", cursor: "pointer", onClick: onClickText, children: [
|
|
7232
7283
|
text,
|
|
7233
|
-
required && !label && /* @__PURE__ */
|
|
7284
|
+
required && !label && /* @__PURE__ */ jsxs14(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, children: [
|
|
7234
7285
|
" ",
|
|
7235
7286
|
"*"
|
|
7236
7287
|
] })
|
|
7237
|
-
] }) : textAdvanced ? /* @__PURE__ */
|
|
7288
|
+
] }) : textAdvanced ? /* @__PURE__ */ jsxs14(Div_default.row, { userSelect: "none", cursor: "pointer", onClick: onClickText, children: [
|
|
7238
7289
|
textAdvanced,
|
|
7239
|
-
required && !label && /* @__PURE__ */
|
|
7290
|
+
required && !label && /* @__PURE__ */ jsxs14(Text_default, { as: "span", fontSize: 16, color: theme2.colors.error, marginLeft: 4, children: [
|
|
7240
7291
|
" ",
|
|
7241
7292
|
"*"
|
|
7242
7293
|
] })
|
|
@@ -7291,7 +7342,7 @@ var ToggleInput_default = {
|
|
|
7291
7342
|
onChange?.(newIsChecked, value);
|
|
7292
7343
|
}, [disabled, checked, onChange, controlledChecked, value]);
|
|
7293
7344
|
const readyId = id ?? internalId;
|
|
7294
|
-
return /* @__PURE__ */
|
|
7345
|
+
return /* @__PURE__ */ jsxs14(Div_default.column, { width: "fit-content", gap: theme2.styles.gap, ...styledComponentStylesWithExcluded, children: [
|
|
7295
7346
|
label && /* @__PURE__ */ jsx18(Label_default, { text: label, color: labelColor, required, isError: !!errorText, htmlFor: readyId }),
|
|
7296
7347
|
/* @__PURE__ */ jsx18(
|
|
7297
7348
|
Div_default.row,
|
|
@@ -7342,7 +7393,7 @@ var ToggleInput_default = {
|
|
|
7342
7393
|
|
|
7343
7394
|
// src/components/Form.tsx
|
|
7344
7395
|
import { Children, forwardRef as forwardRef13, Fragment as Fragment5, memo as memo19, useMemo as useMemo7 } from "react";
|
|
7345
|
-
import { jsx as jsx19, jsxs as
|
|
7396
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
7346
7397
|
var FormComponent = forwardRef13(function Form({
|
|
7347
7398
|
form,
|
|
7348
7399
|
submitButtonText,
|
|
@@ -7370,12 +7421,12 @@ var FormComponent = forwardRef13(function Form({
|
|
|
7370
7421
|
}, [form]);
|
|
7371
7422
|
const SubmitButtonTag = isDestructive ? Button_default.destructive : Button_default;
|
|
7372
7423
|
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__ */
|
|
7424
|
+
return /* @__PURE__ */ jsx19(Div_default, { width: "100%", ...props, children: /* @__PURE__ */ jsxs15("form", { onSubmit: onSubmit ?? form?.onSubmit, ref, children: [
|
|
7425
|
+
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
7426
|
child,
|
|
7376
7427
|
index < Children.toArray(children).length - 1 && /* @__PURE__ */ jsx19(Divider_default.horizontal, {})
|
|
7377
7428
|
] }, index)) : children }) : children,
|
|
7378
|
-
submitButtonText && /* @__PURE__ */
|
|
7429
|
+
submitButtonText && /* @__PURE__ */ jsxs15(
|
|
7379
7430
|
Div_default.row,
|
|
7380
7431
|
{
|
|
7381
7432
|
alignItems: "center",
|
|
@@ -7406,13 +7457,13 @@ var Form_default = Form2;
|
|
|
7406
7457
|
|
|
7407
7458
|
// src/components/FormRow.tsx
|
|
7408
7459
|
import { forwardRef as forwardRef14, memo as memo20 } from "react";
|
|
7409
|
-
import { jsx as jsx20, jsxs as
|
|
7460
|
+
import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
7410
7461
|
var FormRowComponent = forwardRef14(function FormRow({ oneItemOnly, noBreakingPoint, asColumn, gap, children, ...props }, ref) {
|
|
7411
7462
|
const theme2 = useTheme();
|
|
7412
7463
|
const mediaQuery = useMediaQuery();
|
|
7413
7464
|
const breakingPoint = asColumn ?? (!noBreakingPoint ? mediaQuery.size900 : false);
|
|
7414
7465
|
const readyGap = breakingPoint || noBreakingPoint && mediaQuery.size900 ? theme2.styles.gap : theme2.styles.space * 2;
|
|
7415
|
-
return /* @__PURE__ */
|
|
7466
|
+
return /* @__PURE__ */ jsxs16(Div_default.row, { alignItems: "center", gap: gap ?? readyGap, invertFlexDirection: breakingPoint, ...props, ref, children: [
|
|
7416
7467
|
children,
|
|
7417
7468
|
oneItemOnly && /* @__PURE__ */ jsx20(Div_default, { width: "100%" })
|
|
7418
7469
|
] });
|
|
@@ -7433,16 +7484,16 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
7433
7484
|
const theme2 = useTheme();
|
|
7434
7485
|
const mediaQuery = useMediaQuery();
|
|
7435
7486
|
const titleGap = theme2.styles.space;
|
|
7436
|
-
return /* @__PURE__ */
|
|
7437
|
-
/* @__PURE__ */
|
|
7487
|
+
return /* @__PURE__ */ jsxs16(FormRowComponent, { ...props, ref, children: [
|
|
7488
|
+
/* @__PURE__ */ jsxs16(Div_default.row, { width: "100%", alignItems: "center", gap: titleGap, children: [
|
|
7438
7489
|
icon && /* @__PURE__ */ jsx20(Icon_default, { name: icon }),
|
|
7439
|
-
/* @__PURE__ */
|
|
7490
|
+
/* @__PURE__ */ jsxs16(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
7440
7491
|
/* @__PURE__ */ jsx20(Text_default, { as: "h3", children: title }),
|
|
7441
7492
|
description && /* @__PURE__ */ jsx20(Text_default, { color: theme2.colors.textSecondary, children: description })
|
|
7442
7493
|
] }),
|
|
7443
7494
|
isLoading && /* @__PURE__ */ jsx20(Div_default, { width: 26 - titleGap })
|
|
7444
7495
|
] }),
|
|
7445
|
-
/* @__PURE__ */
|
|
7496
|
+
/* @__PURE__ */ jsxs16(
|
|
7446
7497
|
Div_default.row,
|
|
7447
7498
|
{
|
|
7448
7499
|
position: "relative",
|
|
@@ -7463,7 +7514,7 @@ FormRowComponent.withTitle = forwardRef14(function WithTitle({
|
|
|
7463
7514
|
}
|
|
7464
7515
|
),
|
|
7465
7516
|
children,
|
|
7466
|
-
withActions && /* @__PURE__ */
|
|
7517
|
+
withActions && /* @__PURE__ */ jsxs16(Div_default.row, { alignItems: "center", gap: theme2.styles.gap, children: [
|
|
7467
7518
|
onClickReset && /* @__PURE__ */ jsx20(Button_default.icon, { icon: "XMark", loaderName: resetButtonLoaderName, onClick: onClickReset }),
|
|
7468
7519
|
/* @__PURE__ */ jsx20(Button_default.icon, { icon: "check", loaderName: saveButtonLoaderName, onClick: onClickSave })
|
|
7469
7520
|
] })
|
|
@@ -7478,7 +7529,7 @@ var FormRow_default = FormRow2;
|
|
|
7478
7529
|
|
|
7479
7530
|
// src/components/ColorThemeSwitch.tsx
|
|
7480
7531
|
import { memo as memo21, useEffect as useEffect9 } from "react";
|
|
7481
|
-
import { jsx as jsx21, jsxs as
|
|
7532
|
+
import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
7482
7533
|
var ColorThemeSwitchComponent = function ColorThemeSwitch({
|
|
7483
7534
|
withMoon,
|
|
7484
7535
|
className,
|
|
@@ -7520,7 +7571,7 @@ var ColorThemeSwitchComponent = function ColorThemeSwitch({
|
|
|
7520
7571
|
};
|
|
7521
7572
|
ColorThemeSwitchComponent.withText = function WithText({ withMoon, className, ...props }) {
|
|
7522
7573
|
const theme2 = useTheme();
|
|
7523
|
-
return /* @__PURE__ */
|
|
7574
|
+
return /* @__PURE__ */ jsxs17(Div_default.row, { width: "fit-content", alignItems: "center", gap: theme2.styles.gap, userSelect: "none", ...props, children: [
|
|
7524
7575
|
/* @__PURE__ */ jsx21(Text_default, { children: "Light" }),
|
|
7525
7576
|
/* @__PURE__ */ jsx21(ColorThemeSwitchComponent, { withMoon, className }),
|
|
7526
7577
|
/* @__PURE__ */ jsx21(Text_default, { children: "Dark" })
|
|
@@ -7543,7 +7594,7 @@ import {
|
|
|
7543
7594
|
Fragment as Fragment6
|
|
7544
7595
|
} from "react";
|
|
7545
7596
|
import styled12, { css as css2 } from "styled-components";
|
|
7546
|
-
import { Fragment as Fragment7, jsx as jsx22, jsxs as
|
|
7597
|
+
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
7547
7598
|
var defaultImageWidth = 160;
|
|
7548
7599
|
var maximumVisiblePages = 11;
|
|
7549
7600
|
var TableStyledComponent = styled12.table.withConfig({
|
|
@@ -8072,7 +8123,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8072
8123
|
);
|
|
8073
8124
|
const withFooter = pageSize !== void 0 && pageCountInternal > 1;
|
|
8074
8125
|
const mobileFooterBreakingPoint = mediaQuery.size700 && pageCountInternal > maximumVisiblePages / 1.4;
|
|
8075
|
-
return /* @__PURE__ */
|
|
8126
|
+
return /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
8076
8127
|
/* @__PURE__ */ jsx22(
|
|
8077
8128
|
Div_default,
|
|
8078
8129
|
{
|
|
@@ -8081,7 +8132,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8081
8132
|
overflow: !containsOverflowComponents ? "auto" : void 0,
|
|
8082
8133
|
...props,
|
|
8083
8134
|
ref: wrapperComponentRef,
|
|
8084
|
-
children: /* @__PURE__ */
|
|
8135
|
+
children: /* @__PURE__ */ jsxs18(
|
|
8085
8136
|
TableStyledComponent,
|
|
8086
8137
|
{
|
|
8087
8138
|
isStriped,
|
|
@@ -8099,7 +8150,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8099
8150
|
minWidth: column.minWidth,
|
|
8100
8151
|
maxWidth: column.maxWidth,
|
|
8101
8152
|
textAlign: column.align,
|
|
8102
|
-
children: /* @__PURE__ */
|
|
8153
|
+
children: /* @__PURE__ */ jsxs18(
|
|
8103
8154
|
Div_default.row,
|
|
8104
8155
|
{
|
|
8105
8156
|
width: "100%",
|
|
@@ -8130,7 +8181,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8130
8181
|
},
|
|
8131
8182
|
column.type + column.label + index
|
|
8132
8183
|
)) }) }),
|
|
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__ */
|
|
8184
|
+
/* @__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
8185
|
/* @__PURE__ */ jsx22(
|
|
8135
8186
|
"tr",
|
|
8136
8187
|
{
|
|
@@ -8152,7 +8203,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8152
8203
|
),
|
|
8153
8204
|
expandedRows[rowIndex] && /* @__PURE__ */ jsx22("tr", { className: "withoutHover isExpandRow", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: renderExpandedRow(item, rowIndex) }) })
|
|
8154
8205
|
] }, 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__ */
|
|
8206
|
+
withFooter && /* @__PURE__ */ jsx22("tfoot", { children: /* @__PURE__ */ jsx22("tr", { className: "isFooter", children: /* @__PURE__ */ jsx22("td", { colSpan: columns.length, children: /* @__PURE__ */ jsxs18(
|
|
8156
8207
|
Div_default.column,
|
|
8157
8208
|
{
|
|
8158
8209
|
position: "relative",
|
|
@@ -8161,7 +8212,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8161
8212
|
flexReverse: true,
|
|
8162
8213
|
gap: theme2.styles.gap / 2,
|
|
8163
8214
|
children: [
|
|
8164
|
-
/* @__PURE__ */
|
|
8215
|
+
/* @__PURE__ */ jsxs18(
|
|
8165
8216
|
Text_default,
|
|
8166
8217
|
{
|
|
8167
8218
|
position: mobileFooterBreakingPoint ? "relative" : "absolute",
|
|
@@ -8176,7 +8227,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8176
8227
|
]
|
|
8177
8228
|
}
|
|
8178
8229
|
),
|
|
8179
|
-
/* @__PURE__ */
|
|
8230
|
+
/* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", justifyContent: "center", gap: theme2.styles.gap * 2, children: [
|
|
8180
8231
|
pageCountInternal > maximumVisiblePages && /* @__PURE__ */ jsx22(
|
|
8181
8232
|
Button_default.icon,
|
|
8182
8233
|
{
|
|
@@ -8265,12 +8316,12 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8265
8316
|
submitButtonText: "Filter",
|
|
8266
8317
|
cancelButtonText: "Clear",
|
|
8267
8318
|
onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
|
|
8268
|
-
children: /* @__PURE__ */
|
|
8319
|
+
children: /* @__PURE__ */ jsxs18(FormRow_default, { children: [
|
|
8269
8320
|
/* @__PURE__ */ jsx22(InputField_default, { type: "number", label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
8270
8321
|
/* @__PURE__ */ jsx22(InputField_default, { type: "number", label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
8271
8322
|
] })
|
|
8272
8323
|
}
|
|
8273
|
-
) : openedFilterColumn.filter === "date" || openedFilterColumn.filter === "date-time" ? /* @__PURE__ */
|
|
8324
|
+
) : openedFilterColumn.filter === "date" || openedFilterColumn.filter === "date-time" ? /* @__PURE__ */ jsxs18(
|
|
8274
8325
|
Form_default,
|
|
8275
8326
|
{
|
|
8276
8327
|
form: filterForm,
|
|
@@ -8279,14 +8330,14 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8279
8330
|
cancelButtonText: "Clear",
|
|
8280
8331
|
onClickCancel: openedFilterData ? onClickCancelFormFilter : void 0,
|
|
8281
8332
|
children: [
|
|
8282
|
-
/* @__PURE__ */ jsx22(FormRow_default, { children: openedFilterColumn.filter === "date" ? /* @__PURE__ */
|
|
8333
|
+
/* @__PURE__ */ jsx22(FormRow_default, { children: openedFilterColumn.filter === "date" ? /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
8283
8334
|
/* @__PURE__ */ jsx22(InputField_default.date, { label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
8284
8335
|
/* @__PURE__ */ jsx22(InputField_default.date, { label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
8285
|
-
] }) : /* @__PURE__ */
|
|
8336
|
+
] }) : /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
8286
8337
|
/* @__PURE__ */ jsx22(InputField_default.dateTime, { label: "Min", ...filterForm.getInputFieldProps("min") }),
|
|
8287
8338
|
/* @__PURE__ */ jsx22(InputField_default.dateTime, { label: "Max", ...filterForm.getInputFieldProps("max") })
|
|
8288
8339
|
] }) }),
|
|
8289
|
-
openedFilterColumn.presets && /* @__PURE__ */
|
|
8340
|
+
openedFilterColumn.presets && /* @__PURE__ */ jsxs18(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
8290
8341
|
/* @__PURE__ */ jsx22(Label_default, { text: "Presets" }),
|
|
8291
8342
|
/* @__PURE__ */ jsx22(Div_default.row, { alignItems: "center", flexWrap: "wrap", gap: theme2.styles.gap, children: openedFilterColumn.presets.map((preset) => /* @__PURE__ */ jsx22(
|
|
8292
8343
|
Button_default.secondary,
|
|
@@ -8301,13 +8352,13 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8301
8352
|
] })
|
|
8302
8353
|
]
|
|
8303
8354
|
}
|
|
8304
|
-
) : openedFilterColumn.filter === "list" ? /* @__PURE__ */
|
|
8355
|
+
) : openedFilterColumn.filter === "list" ? /* @__PURE__ */ jsxs18(
|
|
8305
8356
|
Form_default,
|
|
8306
8357
|
{
|
|
8307
8358
|
gap: theme2.styles.space,
|
|
8308
8359
|
submitButtonText: "Filter",
|
|
8309
8360
|
cancelButtonText: "Clear",
|
|
8310
|
-
renderActionButtons: /* @__PURE__ */
|
|
8361
|
+
renderActionButtons: /* @__PURE__ */ jsxs18(Div_default.row, { marginRight: "auto", alignItems: "center", gap: theme2.styles.gap, children: [
|
|
8311
8362
|
/* @__PURE__ */ jsx22(
|
|
8312
8363
|
Button_default.secondary,
|
|
8313
8364
|
{
|
|
@@ -8338,7 +8389,7 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8338
8389
|
...filterForm.getInputFieldProps("search")
|
|
8339
8390
|
}
|
|
8340
8391
|
) }),
|
|
8341
|
-
/* @__PURE__ */
|
|
8392
|
+
/* @__PURE__ */ jsxs18(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
8342
8393
|
/* @__PURE__ */ jsx22(Label_default, { text: "Possible values" }),
|
|
8343
8394
|
/* @__PURE__ */ jsx22(Div_default.row, { flexWrap: "wrap", gap: theme2.styles.gap, children: possibleFilterListValues.length > 0 ? possibleFilterListValues.map((value) => {
|
|
8344
8395
|
const isActive = filterListSelectedItems?.includes(value.value);
|
|
@@ -8348,9 +8399,9 @@ var TableComponent = forwardRef15(function Table({
|
|
|
8348
8399
|
isActive,
|
|
8349
8400
|
value: value.value,
|
|
8350
8401
|
onClickWithValue: onClickFilterListItem,
|
|
8351
|
-
children: /* @__PURE__ */
|
|
8402
|
+
children: /* @__PURE__ */ jsxs18(Div_default.row, { alignItems: "center", gap: theme2.styles.gap / 2, children: [
|
|
8352
8403
|
/* @__PURE__ */ jsx22(Text_default, { children: value.label ?? value.value }),
|
|
8353
|
-
openedFilterColumn.withTotalNumber && /* @__PURE__ */
|
|
8404
|
+
openedFilterColumn.withTotalNumber && /* @__PURE__ */ jsxs18(
|
|
8354
8405
|
Text_default,
|
|
8355
8406
|
{
|
|
8356
8407
|
fontSize: 14,
|
|
@@ -8382,7 +8433,7 @@ var Table_default = Table2;
|
|
|
8382
8433
|
// src/components/Tooltip.tsx
|
|
8383
8434
|
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
8435
|
import styled13, { css as css3 } from "styled-components";
|
|
8385
|
-
import { jsx as jsx23, jsxs as
|
|
8436
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
8386
8437
|
var tooltipContainerStyle = (props) => ({
|
|
8387
8438
|
top: css3`
|
|
8388
8439
|
bottom: calc(100% + ${props.gap}px + ${props.arrowSize}px);
|
|
@@ -8618,7 +8669,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
8618
8669
|
},
|
|
8619
8670
|
[isOpen, openTooltip, closeTooltip]
|
|
8620
8671
|
);
|
|
8621
|
-
return /* @__PURE__ */
|
|
8672
|
+
return /* @__PURE__ */ jsxs19(
|
|
8622
8673
|
Div_default,
|
|
8623
8674
|
{
|
|
8624
8675
|
position: "relative",
|
|
@@ -8650,7 +8701,7 @@ var TooltipComponent = forwardRef16(function Tooltip({
|
|
|
8650
8701
|
isOpen,
|
|
8651
8702
|
role: "tooltip",
|
|
8652
8703
|
ref: tooltipContainerRef,
|
|
8653
|
-
children: (isOpen || isOpenLate) && /* @__PURE__ */
|
|
8704
|
+
children: (isOpen || isOpenLate) && /* @__PURE__ */ jsxs19(Div_default, { position: "relative", ref: contentRef, children: [
|
|
8654
8705
|
/* @__PURE__ */ jsx23(
|
|
8655
8706
|
Div_default.box,
|
|
8656
8707
|
{
|
|
@@ -8711,7 +8762,7 @@ TooltipComponent.item = forwardRef16(function Item({
|
|
|
8711
8762
|
onClickWithValue
|
|
8712
8763
|
}, ref) {
|
|
8713
8764
|
const theme2 = useTheme();
|
|
8714
|
-
return /* @__PURE__ */
|
|
8765
|
+
return /* @__PURE__ */ jsxs19(
|
|
8715
8766
|
Div_default.row,
|
|
8716
8767
|
{
|
|
8717
8768
|
alignItems: "center",
|
|
@@ -8730,7 +8781,7 @@ TooltipComponent.item = forwardRef16(function Item({
|
|
|
8730
8781
|
ref,
|
|
8731
8782
|
children: [
|
|
8732
8783
|
icon && /* @__PURE__ */ jsx23(Icon_default, { name: icon, color: iconColor ?? (!isActive ? theme2.colors.textSecondary : void 0) }),
|
|
8733
|
-
/* @__PURE__ */
|
|
8784
|
+
/* @__PURE__ */ jsxs19(Div_default.column, { flex: 1, gap: theme2.styles.gap / 2, children: [
|
|
8734
8785
|
/* @__PURE__ */ jsx23(Text_default, { fontWeight: isActive ? 700 : void 0, color: textColor ?? theme2.colors.textPrimary, children: text }),
|
|
8735
8786
|
description && /* @__PURE__ */ jsx23(Text_default, { fontSize: 14, color: theme2.colors.textSecondary, children: description })
|
|
8736
8787
|
] })
|
|
@@ -8766,7 +8817,7 @@ var Tooltip_default = Tooltip2;
|
|
|
8766
8817
|
|
|
8767
8818
|
// src/components/Tabs.tsx
|
|
8768
8819
|
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
|
|
8820
|
+
import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
8770
8821
|
var tabBottomLineWidth = 2;
|
|
8771
8822
|
var tabDotSize = 6;
|
|
8772
8823
|
var defaultTabName = "tab";
|
|
@@ -8865,11 +8916,11 @@ var TabsComponent = forwardRef17(function Tabs({ tabs, name, accentColor, style
|
|
|
8865
8916
|
},
|
|
8866
8917
|
[selectedTab, onClickTab]
|
|
8867
8918
|
);
|
|
8868
|
-
return /* @__PURE__ */
|
|
8869
|
-
/* @__PURE__ */
|
|
8919
|
+
return /* @__PURE__ */ jsxs20(Div_default.column, { width: "100%", gap: theme2.styles.space, ...props, children: [
|
|
8920
|
+
/* @__PURE__ */ jsxs20(Div_default, { position: "relative", className: "react-better-html-no-scrollbar", overflowY: "auto", children: [
|
|
8870
8921
|
/* @__PURE__ */ jsx24(Div_default.row, { position: "relative", width: "fit-content", gap: tabsGap, userSelect: "none", children: tabs.map((tab) => {
|
|
8871
8922
|
const selected = tab === selectedTab;
|
|
8872
|
-
return /* @__PURE__ */
|
|
8923
|
+
return /* @__PURE__ */ jsxs20(
|
|
8873
8924
|
Div_default,
|
|
8874
8925
|
{
|
|
8875
8926
|
position: "relative",
|
|
@@ -8957,7 +9008,7 @@ var Tabs_default = Tabs2;
|
|
|
8957
9008
|
|
|
8958
9009
|
// src/components/Foldable.tsx
|
|
8959
9010
|
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
|
|
9011
|
+
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
8961
9012
|
var animationDurationClose = 0.15;
|
|
8962
9013
|
var animationDurationOpen = animationDurationClose * 2;
|
|
8963
9014
|
var FoldableComponent = forwardRef18(function Foldable({
|
|
@@ -9026,8 +9077,8 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
9026
9077
|
},
|
|
9027
9078
|
[open, close, toggleOpen, isOpen]
|
|
9028
9079
|
);
|
|
9029
|
-
return /* @__PURE__ */
|
|
9030
|
-
renderHeader ? renderHeader(isOpen, toggleOpen) : /* @__PURE__ */
|
|
9080
|
+
return /* @__PURE__ */ jsxs21(Div_default.column, { width: "100%", ...props, children: [
|
|
9081
|
+
renderHeader ? renderHeader(isOpen, toggleOpen) : /* @__PURE__ */ jsxs21(
|
|
9031
9082
|
Div_default.row,
|
|
9032
9083
|
{
|
|
9033
9084
|
width: "100%",
|
|
@@ -9039,10 +9090,10 @@ var FoldableComponent = forwardRef18(function Foldable({
|
|
|
9039
9090
|
onClick: toggleOpen,
|
|
9040
9091
|
userSelect: "none",
|
|
9041
9092
|
children: [
|
|
9042
|
-
/* @__PURE__ */
|
|
9093
|
+
/* @__PURE__ */ jsxs21(Div_default.row, { flex: 1, alignItems: "center", gap: theme2.styles.space, children: [
|
|
9043
9094
|
icon && /* @__PURE__ */ jsx25(Icon_default, { name: icon, size: 20, flexShrink: 0 }),
|
|
9044
9095
|
image && /* @__PURE__ */ jsx25(Image_default.profileImage, { name: image, size: 24, flexShrink: 0 }),
|
|
9045
|
-
/* @__PURE__ */
|
|
9096
|
+
/* @__PURE__ */ jsxs21(Div_default.column, { gap: theme2.styles.gap / 2, children: [
|
|
9046
9097
|
title && /* @__PURE__ */ jsx25(Text_default, { as: "h3", fontWeight: 700, lineHeight: "20px", children: title }),
|
|
9047
9098
|
description && /* @__PURE__ */ jsx25(Text_default, { color: theme2.colors.textSecondary, children: description })
|
|
9048
9099
|
] })
|
|
@@ -9192,6 +9243,7 @@ export {
|
|
|
9192
9243
|
eventPreventDefault,
|
|
9193
9244
|
eventPreventStop,
|
|
9194
9245
|
eventStopPropagation,
|
|
9246
|
+
filterHover,
|
|
9195
9247
|
formatPhoneNumber,
|
|
9196
9248
|
generateLocalStorage,
|
|
9197
9249
|
generateRandomString,
|