smartsell-ui-kit 0.1.13 → 0.1.15
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/README.md +2 -0
- package/dist/index.cjs +361 -146
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -388
- package/dist/index.d.ts +18 -388
- package/dist/index.js +360 -146
- package/dist/index.js.map +1 -1
- package/dist/types-ENHTzCG6.d.cts +392 -0
- package/dist/types-ENHTzCG6.d.ts +392 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -27,6 +27,7 @@ __export(src_exports, {
|
|
|
27
27
|
ComposableModal: () => ComposableModal,
|
|
28
28
|
DatePicker: () => DatePicker,
|
|
29
29
|
Input: () => Input,
|
|
30
|
+
Loading: () => Loading,
|
|
30
31
|
Modal: () => Modal,
|
|
31
32
|
Select: () => Select,
|
|
32
33
|
SelectAsync: () => SelectAsync,
|
|
@@ -2328,8 +2329,221 @@ function DatePicker({
|
|
|
2328
2329
|
);
|
|
2329
2330
|
}
|
|
2330
2331
|
|
|
2331
|
-
// src/components/
|
|
2332
|
+
// src/components/Loading.tsx
|
|
2332
2333
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2334
|
+
var SIZE_BY_CONTROL_SIZE = {
|
|
2335
|
+
sm: 28,
|
|
2336
|
+
md: 40,
|
|
2337
|
+
lg: 56
|
|
2338
|
+
};
|
|
2339
|
+
var BASE_DROP_MS = 1500;
|
|
2340
|
+
var BASE_WHEEL_MS = 900;
|
|
2341
|
+
var BASE_BOB_MS = 1500;
|
|
2342
|
+
var ITEM_DELAY_RATIOS = [0, 0.26, 0.52];
|
|
2343
|
+
var ITEM_FILL_OPACITIES = [1, 0.72, 0.88];
|
|
2344
|
+
var LOADING_KEYFRAMES = `
|
|
2345
|
+
@keyframes ss-loading-drop {
|
|
2346
|
+
0% { transform: translateY(-18px) scale(0.55); opacity: 0; }
|
|
2347
|
+
12% { opacity: 1; }
|
|
2348
|
+
45% { transform: translateY(0) scale(1); opacity: 1; }
|
|
2349
|
+
56% { transform: translateY(-2.5px) scale(1); opacity: 1; }
|
|
2350
|
+
66% { transform: translateY(0) scale(1); opacity: 1; }
|
|
2351
|
+
82%, 100% { transform: translateY(0) scale(0.72); opacity: 0; }
|
|
2352
|
+
}
|
|
2353
|
+
@keyframes ss-loading-bob {
|
|
2354
|
+
0%, 50%, 100% { transform: translateY(0) rotate(0deg); }
|
|
2355
|
+
25% { transform: translateY(-0.9px) rotate(-1.2deg); }
|
|
2356
|
+
75% { transform: translateY(-0.5px) rotate(0.8deg); }
|
|
2357
|
+
}
|
|
2358
|
+
@keyframes ss-loading-wheel {
|
|
2359
|
+
from { transform: rotate(0deg); }
|
|
2360
|
+
to { transform: rotate(360deg); }
|
|
2361
|
+
}
|
|
2362
|
+
@keyframes ss-loading-pulse {
|
|
2363
|
+
0%, 100% { opacity: 1; }
|
|
2364
|
+
50% { opacity: 0.45; }
|
|
2365
|
+
}
|
|
2366
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2367
|
+
.ss-loading-cart,
|
|
2368
|
+
.ss-loading-wheel,
|
|
2369
|
+
.ss-loading-item {
|
|
2370
|
+
animation: none !important;
|
|
2371
|
+
opacity: 1 !important;
|
|
2372
|
+
transform: none !important;
|
|
2373
|
+
}
|
|
2374
|
+
.ss-loading-svg {
|
|
2375
|
+
animation: ss-loading-pulse 1600ms ease-in-out infinite;
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
`;
|
|
2379
|
+
var resolveSize = (size) => {
|
|
2380
|
+
return typeof size === "number" ? size : SIZE_BY_CONTROL_SIZE[size];
|
|
2381
|
+
};
|
|
2382
|
+
var WHEELS = [
|
|
2383
|
+
{ cx: 18, cy: 32.6 },
|
|
2384
|
+
{ cx: 35, cy: 32.6 }
|
|
2385
|
+
];
|
|
2386
|
+
function Loading({
|
|
2387
|
+
size = "md",
|
|
2388
|
+
color,
|
|
2389
|
+
label,
|
|
2390
|
+
accessibleLabel = "Loading",
|
|
2391
|
+
speed = 1,
|
|
2392
|
+
className,
|
|
2393
|
+
style,
|
|
2394
|
+
...rest
|
|
2395
|
+
}) {
|
|
2396
|
+
useUiKitTheme();
|
|
2397
|
+
const pixelSize = resolveSize(size);
|
|
2398
|
+
const safeSpeed = Math.max(0.1, speed);
|
|
2399
|
+
const dropDuration = BASE_DROP_MS / safeSpeed;
|
|
2400
|
+
const strokeColor = color != null ? color : "var(--theme-primary)";
|
|
2401
|
+
const itemAnimation = (index) => ({
|
|
2402
|
+
transformBox: "fill-box",
|
|
2403
|
+
transformOrigin: "center",
|
|
2404
|
+
animation: `ss-loading-drop ${dropDuration}ms cubic-bezier(0.45, 0, 0.35, 1) infinite`,
|
|
2405
|
+
animationDelay: `${ITEM_DELAY_RATIOS[index] * dropDuration}ms`
|
|
2406
|
+
});
|
|
2407
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2408
|
+
"div",
|
|
2409
|
+
{
|
|
2410
|
+
...rest,
|
|
2411
|
+
role: "status",
|
|
2412
|
+
"aria-live": "polite",
|
|
2413
|
+
"aria-busy": "true",
|
|
2414
|
+
className: cx(UI_KIT_ROOT_CLASSNAME, "inline-flex flex-col items-center justify-center", className),
|
|
2415
|
+
style: {
|
|
2416
|
+
gap: Math.round(pixelSize * 0.2),
|
|
2417
|
+
backgroundColor: "transparent",
|
|
2418
|
+
...style
|
|
2419
|
+
},
|
|
2420
|
+
children: [
|
|
2421
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2422
|
+
"svg",
|
|
2423
|
+
{
|
|
2424
|
+
className: "ss-loading-svg",
|
|
2425
|
+
width: pixelSize,
|
|
2426
|
+
height: pixelSize,
|
|
2427
|
+
viewBox: "0 0 48 48",
|
|
2428
|
+
fill: "none",
|
|
2429
|
+
"aria-hidden": "true",
|
|
2430
|
+
style: { color: strokeColor, overflow: "hidden" },
|
|
2431
|
+
children: [
|
|
2432
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("style", { children: LOADING_KEYFRAMES }),
|
|
2433
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2434
|
+
"g",
|
|
2435
|
+
{
|
|
2436
|
+
className: "ss-loading-cart",
|
|
2437
|
+
style: {
|
|
2438
|
+
transformBox: "view-box",
|
|
2439
|
+
transformOrigin: "26px 32px",
|
|
2440
|
+
animation: `ss-loading-bob ${BASE_BOB_MS / safeSpeed}ms ease-in-out infinite`
|
|
2441
|
+
},
|
|
2442
|
+
children: [
|
|
2443
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2444
|
+
"rect",
|
|
2445
|
+
{
|
|
2446
|
+
className: "ss-loading-item",
|
|
2447
|
+
x: 15.5,
|
|
2448
|
+
y: 16.5,
|
|
2449
|
+
width: 7.5,
|
|
2450
|
+
height: 7,
|
|
2451
|
+
rx: 1.8,
|
|
2452
|
+
fill: "currentColor",
|
|
2453
|
+
fillOpacity: ITEM_FILL_OPACITIES[0],
|
|
2454
|
+
style: itemAnimation(0)
|
|
2455
|
+
}
|
|
2456
|
+
),
|
|
2457
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2458
|
+
"circle",
|
|
2459
|
+
{
|
|
2460
|
+
className: "ss-loading-item",
|
|
2461
|
+
cx: 27.5,
|
|
2462
|
+
cy: 20,
|
|
2463
|
+
r: 3.6,
|
|
2464
|
+
fill: "currentColor",
|
|
2465
|
+
fillOpacity: ITEM_FILL_OPACITIES[1],
|
|
2466
|
+
style: itemAnimation(1)
|
|
2467
|
+
}
|
|
2468
|
+
),
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2470
|
+
"rect",
|
|
2471
|
+
{
|
|
2472
|
+
className: "ss-loading-item",
|
|
2473
|
+
x: 32,
|
|
2474
|
+
y: 16.5,
|
|
2475
|
+
width: 6.6,
|
|
2476
|
+
height: 7,
|
|
2477
|
+
rx: 1.8,
|
|
2478
|
+
fill: "currentColor",
|
|
2479
|
+
fillOpacity: ITEM_FILL_OPACITIES[2],
|
|
2480
|
+
style: itemAnimation(2)
|
|
2481
|
+
}
|
|
2482
|
+
),
|
|
2483
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("g", { stroke: "currentColor", strokeWidth: 2.6, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2484
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M3.5 7.5h4.6l1.6 5" }),
|
|
2485
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M9.7 12.5H43l-4.4 13.5H14.1z" }),
|
|
2486
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M18 26v3.4" }),
|
|
2487
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M35 26v3.4" })
|
|
2488
|
+
] }),
|
|
2489
|
+
WHEELS.map((wheel) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2490
|
+
"g",
|
|
2491
|
+
{
|
|
2492
|
+
className: "ss-loading-wheel",
|
|
2493
|
+
style: {
|
|
2494
|
+
transformBox: "view-box",
|
|
2495
|
+
transformOrigin: `${wheel.cx}px ${wheel.cy}px`,
|
|
2496
|
+
animation: `ss-loading-wheel ${BASE_WHEEL_MS / safeSpeed}ms linear infinite`
|
|
2497
|
+
},
|
|
2498
|
+
children: [
|
|
2499
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2500
|
+
"circle",
|
|
2501
|
+
{
|
|
2502
|
+
cx: wheel.cx,
|
|
2503
|
+
cy: wheel.cy,
|
|
2504
|
+
r: 3.2,
|
|
2505
|
+
stroke: "currentColor",
|
|
2506
|
+
strokeWidth: 2.2,
|
|
2507
|
+
fill: "none"
|
|
2508
|
+
}
|
|
2509
|
+
),
|
|
2510
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2511
|
+
"path",
|
|
2512
|
+
{
|
|
2513
|
+
d: `M${wheel.cx} ${wheel.cy}V${wheel.cy - 3.2}`,
|
|
2514
|
+
stroke: "currentColor",
|
|
2515
|
+
strokeWidth: 2.2,
|
|
2516
|
+
strokeLinecap: "round"
|
|
2517
|
+
}
|
|
2518
|
+
)
|
|
2519
|
+
]
|
|
2520
|
+
},
|
|
2521
|
+
wheel.cx
|
|
2522
|
+
))
|
|
2523
|
+
]
|
|
2524
|
+
}
|
|
2525
|
+
)
|
|
2526
|
+
]
|
|
2527
|
+
}
|
|
2528
|
+
),
|
|
2529
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2530
|
+
"span",
|
|
2531
|
+
{
|
|
2532
|
+
style: {
|
|
2533
|
+
color: "var(--theme-textLight)",
|
|
2534
|
+
fontSize: Math.max(12, Math.round(pixelSize * 0.3)),
|
|
2535
|
+
lineHeight: 1.4
|
|
2536
|
+
},
|
|
2537
|
+
children: label
|
|
2538
|
+
}
|
|
2539
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ui-kit-sr-only", children: accessibleLabel })
|
|
2540
|
+
]
|
|
2541
|
+
}
|
|
2542
|
+
);
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
// src/components/Separator.tsx
|
|
2546
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
2333
2547
|
function Separator({
|
|
2334
2548
|
orientation = "vertical",
|
|
2335
2549
|
color,
|
|
@@ -2346,7 +2560,7 @@ function Separator({
|
|
|
2346
2560
|
height: orientation === "vertical" ? usesVerticalStretch ? "auto" : size : 3,
|
|
2347
2561
|
...style
|
|
2348
2562
|
};
|
|
2349
|
-
return /* @__PURE__ */ (0,
|
|
2563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2350
2564
|
"div",
|
|
2351
2565
|
{
|
|
2352
2566
|
...rest,
|
|
@@ -2413,13 +2627,13 @@ function filterSelectGroups(groups, query) {
|
|
|
2413
2627
|
}
|
|
2414
2628
|
|
|
2415
2629
|
// src/componentsBase/select/SelectBase.tsx
|
|
2416
|
-
var
|
|
2630
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
2417
2631
|
var MENU_OFFSET = 8;
|
|
2418
2632
|
var MENU_MAX_HEIGHT = 280;
|
|
2419
2633
|
var emptySubscribe = () => () => {
|
|
2420
2634
|
};
|
|
2421
2635
|
function SearchIcon({ size }) {
|
|
2422
|
-
return /* @__PURE__ */ (0,
|
|
2636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2423
2637
|
"path",
|
|
2424
2638
|
{
|
|
2425
2639
|
d: "m21 21-4.35-4.35M10.5 18a7.5 7.5 0 1 1 0-15 7.5 7.5 0 0 1 0 15Z",
|
|
@@ -2800,7 +3014,7 @@ function SelectBase({
|
|
|
2800
3014
|
const hasSomeVisibleSelected = visibleSelectedCount > 0 && visibleSelectedCount < visibleEnabledValues.length;
|
|
2801
3015
|
const hasAllVisibleSelected = visibleEnabledValues.length > 0 && visibleSelectedCount === visibleEnabledValues.length;
|
|
2802
3016
|
const canToggleVisibleSelection = !disabled && visibleEnabledValues.length > 0;
|
|
2803
|
-
const bulkToggleControl = isMultiSelect ? /* @__PURE__ */ (0,
|
|
3017
|
+
const bulkToggleControl = isMultiSelect ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2804
3018
|
"button",
|
|
2805
3019
|
{
|
|
2806
3020
|
type: "button",
|
|
@@ -2820,7 +3034,7 @@ function SelectBase({
|
|
|
2820
3034
|
"m-0 inline-flex h-5 w-5 shrink-0 items-center justify-center border-0 bg-transparent p-0",
|
|
2821
3035
|
canToggleVisibleSelection ? "cursor-pointer opacity-100" : "cursor-not-allowed opacity-45"
|
|
2822
3036
|
),
|
|
2823
|
-
children: /* @__PURE__ */ (0,
|
|
3037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2824
3038
|
CheckboxIndicator,
|
|
2825
3039
|
{
|
|
2826
3040
|
checked: hasAllVisibleSelected,
|
|
@@ -2977,7 +3191,7 @@ function SelectBase({
|
|
|
2977
3191
|
}
|
|
2978
3192
|
};
|
|
2979
3193
|
const emptyState = isLoading ? loadingMessage : emptyMessage;
|
|
2980
|
-
return /* @__PURE__ */ (0,
|
|
3194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
2981
3195
|
ControlFrame,
|
|
2982
3196
|
{
|
|
2983
3197
|
label,
|
|
@@ -2988,8 +3202,8 @@ function SelectBase({
|
|
|
2988
3202
|
size,
|
|
2989
3203
|
hasValue: hasSelection || isOpen,
|
|
2990
3204
|
floatingPlaceholder,
|
|
2991
|
-
children: /* @__PURE__ */ (0,
|
|
2992
|
-
/* @__PURE__ */ (0,
|
|
3205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { ref: shellRef, className: "relative w-full", children: [
|
|
3206
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
2993
3207
|
"button",
|
|
2994
3208
|
{
|
|
2995
3209
|
...buttonPassthroughProps,
|
|
@@ -3018,12 +3232,12 @@ function SelectBase({
|
|
|
3018
3232
|
...isTriggerDisabled ? { opacity: DISABLED_FIELD_OPACITY } : {}
|
|
3019
3233
|
},
|
|
3020
3234
|
children: [
|
|
3021
|
-
/* @__PURE__ */ (0,
|
|
3235
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3022
3236
|
"span",
|
|
3023
3237
|
{
|
|
3024
3238
|
className: "block min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap",
|
|
3025
3239
|
style: controlTextNudgeStyle,
|
|
3026
|
-
children: hasSelection ? displayContent : /* @__PURE__ */ (0,
|
|
3240
|
+
children: hasSelection ? displayContent : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3027
3241
|
"span",
|
|
3028
3242
|
{
|
|
3029
3243
|
className: floatingPlaceholder ? "" : "text-[var(--theme-textLight)]",
|
|
@@ -3032,7 +3246,7 @@ function SelectBase({
|
|
|
3032
3246
|
)
|
|
3033
3247
|
}
|
|
3034
3248
|
),
|
|
3035
|
-
/* @__PURE__ */ (0,
|
|
3249
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3036
3250
|
"span",
|
|
3037
3251
|
{
|
|
3038
3252
|
"aria-hidden": "true",
|
|
@@ -3045,7 +3259,7 @@ function SelectBase({
|
|
|
3045
3259
|
right: indicatorOffset,
|
|
3046
3260
|
transform: `translateY(-50%) rotate(${isOpen ? 180 : 0}deg)`
|
|
3047
3261
|
},
|
|
3048
|
-
children: /* @__PURE__ */ (0,
|
|
3262
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { width: "18", height: "18", viewBox: "0 0 20 20", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3049
3263
|
"path",
|
|
3050
3264
|
{
|
|
3051
3265
|
d: "M5.75 7.75L10 12l4.25-4.25",
|
|
@@ -3060,7 +3274,7 @@ function SelectBase({
|
|
|
3060
3274
|
]
|
|
3061
3275
|
}
|
|
3062
3276
|
),
|
|
3063
|
-
/* @__PURE__ */ (0,
|
|
3277
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3064
3278
|
"select",
|
|
3065
3279
|
{
|
|
3066
3280
|
...rest,
|
|
@@ -3078,8 +3292,8 @@ function SelectBase({
|
|
|
3078
3292
|
}
|
|
3079
3293
|
),
|
|
3080
3294
|
isMounted && isOpen ? (0, import_react_dom.createPortal)(
|
|
3081
|
-
/* @__PURE__ */ (0,
|
|
3082
|
-
/* @__PURE__ */ (0,
|
|
3295
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("style", { children: `
|
|
3083
3297
|
#${listboxId} {
|
|
3084
3298
|
scrollbar-width: thin;
|
|
3085
3299
|
scrollbar-color: ${scrollbarThumbColor} transparent;
|
|
@@ -3110,7 +3324,7 @@ function SelectBase({
|
|
|
3110
3324
|
opacity: 1;
|
|
3111
3325
|
}
|
|
3112
3326
|
` }),
|
|
3113
|
-
/* @__PURE__ */ (0,
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3114
3328
|
"div",
|
|
3115
3329
|
{
|
|
3116
3330
|
ref: menuRef,
|
|
@@ -3133,7 +3347,7 @@ function SelectBase({
|
|
|
3133
3347
|
visibility: isPlacementResolved ? "visible" : "hidden"
|
|
3134
3348
|
},
|
|
3135
3349
|
children: [
|
|
3136
|
-
hasFilter ? /* @__PURE__ */ (0,
|
|
3350
|
+
hasFilter ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3137
3351
|
"div",
|
|
3138
3352
|
{
|
|
3139
3353
|
className: cx(
|
|
@@ -3141,20 +3355,20 @@ function SelectBase({
|
|
|
3141
3355
|
),
|
|
3142
3356
|
children: [
|
|
3143
3357
|
bulkToggleControl,
|
|
3144
|
-
/* @__PURE__ */ (0,
|
|
3358
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3145
3359
|
"div",
|
|
3146
3360
|
{
|
|
3147
3361
|
className: "flex-1",
|
|
3148
3362
|
onClick: (event) => event.stopPropagation(),
|
|
3149
3363
|
onMouseDown: (event) => event.stopPropagation(),
|
|
3150
3364
|
onPointerDown: (event) => event.stopPropagation(),
|
|
3151
|
-
children: /* @__PURE__ */ (0,
|
|
3365
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3152
3366
|
Input,
|
|
3153
3367
|
{
|
|
3154
3368
|
id: searchInputId,
|
|
3155
3369
|
ref: searchInputRef,
|
|
3156
3370
|
type: "text",
|
|
3157
|
-
icon: /* @__PURE__ */ (0,
|
|
3371
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SearchIcon, { size: 16 }),
|
|
3158
3372
|
disableFloatingLabel: true,
|
|
3159
3373
|
value: currentSearchQuery,
|
|
3160
3374
|
onChange: (event) => {
|
|
@@ -3174,7 +3388,7 @@ function SelectBase({
|
|
|
3174
3388
|
)
|
|
3175
3389
|
]
|
|
3176
3390
|
}
|
|
3177
|
-
) : isMultiSelect ? /* @__PURE__ */ (0,
|
|
3391
|
+
) : isMultiSelect ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3178
3392
|
"div",
|
|
3179
3393
|
{
|
|
3180
3394
|
className: cx(
|
|
@@ -3183,8 +3397,8 @@ function SelectBase({
|
|
|
3183
3397
|
children: bulkToggleControl
|
|
3184
3398
|
}
|
|
3185
3399
|
) : null,
|
|
3186
|
-
hasFilter && /* @__PURE__ */ (0,
|
|
3187
|
-
/* @__PURE__ */ (0,
|
|
3400
|
+
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Separator, {}),
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3188
3402
|
"div",
|
|
3189
3403
|
{
|
|
3190
3404
|
id: listboxId,
|
|
@@ -3193,7 +3407,7 @@ function SelectBase({
|
|
|
3193
3407
|
"aria-multiselectable": isMultiSelect || void 0,
|
|
3194
3408
|
onScroll: onListboxScroll,
|
|
3195
3409
|
className: "min-h-0 flex-1 overflow-y-auto overflow-x-hidden py-1",
|
|
3196
|
-
children: visibleGroups.length === 0 ? /* @__PURE__ */ (0,
|
|
3410
|
+
children: visibleGroups.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "px-3 py-[14px] text-center text-[13px] text-[var(--theme-textLight)]", children: emptyState }) : visibleGroups.map((group) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3197
3411
|
"div",
|
|
3198
3412
|
{
|
|
3199
3413
|
className: cx(
|
|
@@ -3201,7 +3415,7 @@ function SelectBase({
|
|
|
3201
3415
|
group.label ? "mt-1" : "mt-0"
|
|
3202
3416
|
),
|
|
3203
3417
|
children: [
|
|
3204
|
-
group.label ? /* @__PURE__ */ (0,
|
|
3418
|
+
group.label ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3205
3419
|
"span",
|
|
3206
3420
|
{
|
|
3207
3421
|
className: cx(
|
|
@@ -3219,7 +3433,7 @@ function SelectBase({
|
|
|
3219
3433
|
);
|
|
3220
3434
|
const isHighlighted = option.value === highlightedValue;
|
|
3221
3435
|
const isActive = isSelected || isHighlighted;
|
|
3222
|
-
return /* @__PURE__ */ (0,
|
|
3436
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3223
3437
|
"div",
|
|
3224
3438
|
{
|
|
3225
3439
|
role: "option",
|
|
@@ -3246,10 +3460,10 @@ function SelectBase({
|
|
|
3246
3460
|
className: cx(
|
|
3247
3461
|
"w-full min-w-0 box-border py-0.5 leading-5",
|
|
3248
3462
|
option.disabled ? "cursor-not-allowed text-[var(--theme-secondary)]" : "cursor-pointer",
|
|
3249
|
-
!option.disabled && isActive ? "text-[var(--theme-
|
|
3463
|
+
!option.disabled && isActive ? "text-[var(--theme-onPrimary)]" : null,
|
|
3250
3464
|
!option.disabled && !isActive ? "text-[var(--theme-text)]" : null
|
|
3251
3465
|
),
|
|
3252
|
-
children: /* @__PURE__ */ (0,
|
|
3466
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
3253
3467
|
"div",
|
|
3254
3468
|
{
|
|
3255
3469
|
className: cx(
|
|
@@ -3262,8 +3476,8 @@ function SelectBase({
|
|
|
3262
3476
|
!isSelected && !isHighlighted ? "bg-[var(--theme-surface)] font-medium" : null
|
|
3263
3477
|
),
|
|
3264
3478
|
children: [
|
|
3265
|
-
/* @__PURE__ */ (0,
|
|
3266
|
-
isMultiSelect ? /* @__PURE__ */ (0,
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "flex min-w-0 flex-1 items-center gap-2.5", children: [
|
|
3480
|
+
isMultiSelect ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3267
3481
|
CheckboxIndicator,
|
|
3268
3482
|
{
|
|
3269
3483
|
checked: isSelected,
|
|
@@ -3275,21 +3489,21 @@ function SelectBase({
|
|
|
3275
3489
|
uncheckedBackgroundColor: "transparent"
|
|
3276
3490
|
}
|
|
3277
3491
|
) : null,
|
|
3278
|
-
/* @__PURE__ */ (0,
|
|
3492
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "block min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap", children: option.label })
|
|
3279
3493
|
] }),
|
|
3280
|
-
!isMultiSelect && isSelected ? /* @__PURE__ */ (0,
|
|
3494
|
+
!isMultiSelect && isSelected ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3281
3495
|
"span",
|
|
3282
3496
|
{
|
|
3283
3497
|
"aria-hidden": "true",
|
|
3284
|
-
className: "flex shrink-0 items-center justify-center text-[var(--theme-
|
|
3285
|
-
children: /* @__PURE__ */ (0,
|
|
3498
|
+
className: "flex shrink-0 items-center justify-center text-[var(--theme-onPrimary)]",
|
|
3499
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3286
3500
|
"svg",
|
|
3287
3501
|
{
|
|
3288
3502
|
width: "16",
|
|
3289
3503
|
height: "16",
|
|
3290
3504
|
viewBox: "0 0 20 20",
|
|
3291
3505
|
fill: "none",
|
|
3292
|
-
children: /* @__PURE__ */ (0,
|
|
3506
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3293
3507
|
"path",
|
|
3294
3508
|
{
|
|
3295
3509
|
d: "M5.75 10.25L8.5 13l5.75-6",
|
|
@@ -3316,9 +3530,9 @@ function SelectBase({
|
|
|
3316
3530
|
))
|
|
3317
3531
|
}
|
|
3318
3532
|
),
|
|
3319
|
-
menuFooter ? /* @__PURE__ */ (0,
|
|
3320
|
-
/* @__PURE__ */ (0,
|
|
3321
|
-
/* @__PURE__ */ (0,
|
|
3533
|
+
menuFooter ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
3534
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Separator, {}),
|
|
3535
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "shrink-0 px-2 pb-1 pt-2.5", children: menuFooter })
|
|
3322
3536
|
] }) : null
|
|
3323
3537
|
]
|
|
3324
3538
|
}
|
|
@@ -3402,17 +3616,17 @@ function parseSelectChildren(children) {
|
|
|
3402
3616
|
}
|
|
3403
3617
|
|
|
3404
3618
|
// src/components/Select.tsx
|
|
3405
|
-
var
|
|
3619
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
3406
3620
|
function Select({ children, options, ...props }) {
|
|
3407
|
-
const actualChildren = options ? options.map((option) => /* @__PURE__ */ (0,
|
|
3408
|
-
return /* @__PURE__ */ (0,
|
|
3621
|
+
const actualChildren = options ? options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("option", { value: option.value, children: option.label }, option.value)) : children;
|
|
3622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(SelectBase, { ...props, groups: parseSelectChildren(actualChildren), nativeOptions: actualChildren });
|
|
3409
3623
|
}
|
|
3410
3624
|
|
|
3411
3625
|
// src/components/SelectAsync.tsx
|
|
3412
3626
|
var import_react9 = require("react");
|
|
3413
3627
|
|
|
3414
3628
|
// src/componentsBase/select/objectOptionsAdapter.tsx
|
|
3415
|
-
var
|
|
3629
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3416
3630
|
var getOptionKey = (option) => {
|
|
3417
3631
|
return String(option.value);
|
|
3418
3632
|
};
|
|
@@ -3468,13 +3682,13 @@ var buildNativeOptionsFromObjectOptions = (options) => {
|
|
|
3468
3682
|
return options.map((option) => {
|
|
3469
3683
|
const optionValue = getOptionKey(option);
|
|
3470
3684
|
const optionText = getTextContent(option.label).trim() || optionValue;
|
|
3471
|
-
return /* @__PURE__ */ (0,
|
|
3685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("option", { value: optionValue, disabled: option.disabled, children: optionText }, `native-${optionValue}`);
|
|
3472
3686
|
});
|
|
3473
3687
|
};
|
|
3474
3688
|
var getSelectObjectOptionKey = getOptionKey;
|
|
3475
3689
|
|
|
3476
3690
|
// src/components/SelectAsync.tsx
|
|
3477
|
-
var
|
|
3691
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
3478
3692
|
var DEFAULT_LOAD_MORE_THRESHOLD = 24;
|
|
3479
3693
|
var normalizeAsyncValue = (value, isMulti) => {
|
|
3480
3694
|
if (value == null) {
|
|
@@ -3667,15 +3881,15 @@ function SelectAsync({
|
|
|
3667
3881
|
}
|
|
3668
3882
|
onChange == null ? void 0 : onChange(nextValue);
|
|
3669
3883
|
};
|
|
3670
|
-
const menuFooter = isLoadingMore || hasMore ? /* @__PURE__ */ (0,
|
|
3884
|
+
const menuFooter = isLoadingMore || hasMore ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
3671
3885
|
"div",
|
|
3672
3886
|
{
|
|
3673
3887
|
"aria-live": "polite",
|
|
3674
3888
|
className: "flex items-center gap-3 text-xs leading-[1.4] text-[var(--theme-textLight)]",
|
|
3675
3889
|
style: { justifyContent: hasMore ? "space-between" : "center" },
|
|
3676
3890
|
children: [
|
|
3677
|
-
/* @__PURE__ */ (0,
|
|
3678
|
-
isLoadingMore ? /* @__PURE__ */ (0,
|
|
3891
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: isLoadingMore ? loadingMoreMessage : hasMore ? loadMoreHintMessage : null }),
|
|
3892
|
+
isLoadingMore ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3679
3893
|
"span",
|
|
3680
3894
|
{
|
|
3681
3895
|
"aria-hidden": "true",
|
|
@@ -3687,7 +3901,7 @@ function SelectAsync({
|
|
|
3687
3901
|
) : null;
|
|
3688
3902
|
const resolvedEmptyMessage = loadError && remoteOptions.length === 0 ? loadError : emptyMessage;
|
|
3689
3903
|
const resolvedValue = selectedOptions.map((option) => getSelectObjectOptionKey(option));
|
|
3690
|
-
return /* @__PURE__ */ (0,
|
|
3904
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
3691
3905
|
SelectBase,
|
|
3692
3906
|
{
|
|
3693
3907
|
...props,
|
|
@@ -4100,10 +4314,10 @@ var downloadTableAsPdf = (matrix, fileBaseName, title, page, totalPages) => {
|
|
|
4100
4314
|
};
|
|
4101
4315
|
|
|
4102
4316
|
// src/componentsBase/table/TableBase.tsx
|
|
4103
|
-
var
|
|
4317
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
4104
4318
|
var OVERFLOW_MENU_WIDTH = 220;
|
|
4105
4319
|
function SettingsIcon() {
|
|
4106
|
-
return /* @__PURE__ */ (0,
|
|
4320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4107
4321
|
"svg",
|
|
4108
4322
|
{
|
|
4109
4323
|
width: "16",
|
|
@@ -4112,7 +4326,7 @@ function SettingsIcon() {
|
|
|
4112
4326
|
fill: "none",
|
|
4113
4327
|
"aria-hidden": "true",
|
|
4114
4328
|
children: [
|
|
4115
|
-
/* @__PURE__ */ (0,
|
|
4329
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4116
4330
|
"path",
|
|
4117
4331
|
{
|
|
4118
4332
|
d: "M12 15.2a3.2 3.2 0 1 0 0-6.4 3.2 3.2 0 0 0 0 6.4Z",
|
|
@@ -4120,7 +4334,7 @@ function SettingsIcon() {
|
|
|
4120
4334
|
strokeWidth: "2"
|
|
4121
4335
|
}
|
|
4122
4336
|
),
|
|
4123
|
-
/* @__PURE__ */ (0,
|
|
4337
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4124
4338
|
"path",
|
|
4125
4339
|
{
|
|
4126
4340
|
d: `
|
|
@@ -4144,7 +4358,7 @@ function SettingsIcon() {
|
|
|
4144
4358
|
);
|
|
4145
4359
|
}
|
|
4146
4360
|
function MoreActionsIcon() {
|
|
4147
|
-
return /* @__PURE__ */ (0,
|
|
4361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4148
4362
|
"svg",
|
|
4149
4363
|
{
|
|
4150
4364
|
width: "16",
|
|
@@ -4153,16 +4367,16 @@ function MoreActionsIcon() {
|
|
|
4153
4367
|
fill: "currentColor",
|
|
4154
4368
|
"aria-hidden": "true",
|
|
4155
4369
|
children: [
|
|
4156
|
-
/* @__PURE__ */ (0,
|
|
4157
|
-
/* @__PURE__ */ (0,
|
|
4158
|
-
/* @__PURE__ */ (0,
|
|
4370
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "5", cy: "12", r: "1.8" }),
|
|
4371
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "12", cy: "12", r: "1.8" }),
|
|
4372
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("circle", { cx: "19", cy: "12", r: "1.8" })
|
|
4159
4373
|
]
|
|
4160
4374
|
}
|
|
4161
4375
|
);
|
|
4162
4376
|
}
|
|
4163
4377
|
function ChevronIcon({ direction }) {
|
|
4164
4378
|
const isLeft = direction === "left";
|
|
4165
|
-
return /* @__PURE__ */ (0,
|
|
4379
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4166
4380
|
"svg",
|
|
4167
4381
|
{
|
|
4168
4382
|
width: "14",
|
|
@@ -4170,7 +4384,7 @@ function ChevronIcon({ direction }) {
|
|
|
4170
4384
|
viewBox: "0 0 24 24",
|
|
4171
4385
|
fill: "none",
|
|
4172
4386
|
"aria-hidden": "true",
|
|
4173
|
-
children: /* @__PURE__ */ (0,
|
|
4387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4174
4388
|
"path",
|
|
4175
4389
|
{
|
|
4176
4390
|
d: isLeft ? "M15 6 9 12l6 6" : "m9 6 6 6-6 6",
|
|
@@ -4230,8 +4444,8 @@ function OverflowMenu({ label, children }) {
|
|
|
4230
4444
|
window.removeEventListener("scroll", updateMenuPosition, true);
|
|
4231
4445
|
};
|
|
4232
4446
|
}, [isOpen]);
|
|
4233
|
-
return /* @__PURE__ */ (0,
|
|
4234
|
-
/* @__PURE__ */ (0,
|
|
4447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { ref: containerRef, className: "relative", children: [
|
|
4448
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4235
4449
|
"button",
|
|
4236
4450
|
{
|
|
4237
4451
|
type: "button",
|
|
@@ -4250,11 +4464,11 @@ function OverflowMenu({ label, children }) {
|
|
|
4250
4464
|
"cursor-pointer border-0 bg-transparent text-[var(--theme-text)]",
|
|
4251
4465
|
"transition-colors hover:text-[var(--theme-primary)]"
|
|
4252
4466
|
].join(" "),
|
|
4253
|
-
children: /* @__PURE__ */ (0,
|
|
4467
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(MoreActionsIcon, {})
|
|
4254
4468
|
}
|
|
4255
4469
|
),
|
|
4256
4470
|
isOpen && menuPosition && typeof document !== "undefined" ? (0, import_react_dom2.createPortal)(
|
|
4257
|
-
/* @__PURE__ */ (0,
|
|
4471
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4258
4472
|
"div",
|
|
4259
4473
|
{
|
|
4260
4474
|
ref: menuRef,
|
|
@@ -4443,7 +4657,7 @@ function TableBase({
|
|
|
4443
4657
|
const tone = (_a = action.tone) != null ? _a : "default";
|
|
4444
4658
|
const iconOnly = appearance === "inline" && action.icon != null;
|
|
4445
4659
|
const isMenuAction = appearance === "menu";
|
|
4446
|
-
return /* @__PURE__ */ (0,
|
|
4660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4447
4661
|
"button",
|
|
4448
4662
|
{
|
|
4449
4663
|
type: "button",
|
|
@@ -4468,7 +4682,7 @@ function TableBase({
|
|
|
4468
4682
|
),
|
|
4469
4683
|
children: [
|
|
4470
4684
|
action.icon,
|
|
4471
|
-
appearance === "menu" || !iconOnly ? /* @__PURE__ */ (0,
|
|
4685
|
+
appearance === "menu" || !iconOnly ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: action.label }) : null
|
|
4472
4686
|
]
|
|
4473
4687
|
},
|
|
4474
4688
|
(_b = action.id) != null ? _b : `${action.label}-${rowIndex}`
|
|
@@ -4481,7 +4695,7 @@ function TableBase({
|
|
|
4481
4695
|
}
|
|
4482
4696
|
const inlineActions = resolvedActions.slice(0, visibleInlineActions);
|
|
4483
4697
|
const overflowActions = resolvedActions.slice(visibleInlineActions);
|
|
4484
|
-
return /* @__PURE__ */ (0,
|
|
4698
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4485
4699
|
"div",
|
|
4486
4700
|
{
|
|
4487
4701
|
className: cx(
|
|
@@ -4494,7 +4708,7 @@ function TableBase({
|
|
|
4494
4708
|
inlineActions.map(
|
|
4495
4709
|
(action) => renderActionButton(action, item, rowIndex, "inline")
|
|
4496
4710
|
),
|
|
4497
|
-
overflowActions.length > 0 ? /* @__PURE__ */ (0,
|
|
4711
|
+
overflowActions.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(OverflowMenu, { label: resolvedLabels.actionsMenuLabel, children: overflowActions.map(
|
|
4498
4712
|
(action) => renderActionButton(action, item, rowIndex, "menu")
|
|
4499
4713
|
) }) : null
|
|
4500
4714
|
]
|
|
@@ -4505,7 +4719,7 @@ function TableBase({
|
|
|
4505
4719
|
var _a;
|
|
4506
4720
|
const content = resolveColumnContent(column, item, rowIndex);
|
|
4507
4721
|
const align = (_a = column.align) != null ? _a : column.type === "actions" ? "right" : "left";
|
|
4508
|
-
return /* @__PURE__ */ (0,
|
|
4722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4509
4723
|
"td",
|
|
4510
4724
|
{
|
|
4511
4725
|
colSpan: column.colSpan,
|
|
@@ -4518,29 +4732,29 @@ function TableBase({
|
|
|
4518
4732
|
width: column.width,
|
|
4519
4733
|
minWidth: column.minWidth
|
|
4520
4734
|
},
|
|
4521
|
-
children: hasRenderableContent(content) ? content : /* @__PURE__ */ (0,
|
|
4735
|
+
children: hasRenderableContent(content) ? content : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-[var(--theme-textLight)]", children: "-" })
|
|
4522
4736
|
},
|
|
4523
4737
|
`${getColumnKey(column, columnIndex)}-${rowIndex}`
|
|
4524
4738
|
);
|
|
4525
4739
|
};
|
|
4526
4740
|
const renderEmptyState = () => {
|
|
4527
4741
|
const message = error ? error : loading ? resolvedLabels.loadingMessage : hasSearchValue ? resolvedLabels.noResultsMessage : resolvedLabels.emptyMessage;
|
|
4528
|
-
return /* @__PURE__ */ (0,
|
|
4742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4529
4743
|
"div",
|
|
4530
4744
|
{
|
|
4531
4745
|
className: [
|
|
4532
4746
|
"flex min-h-[220px] flex-col items-center justify-center gap-3 rounded-[20px]",
|
|
4533
|
-
"border border-dashed border-[var(--theme-
|
|
4747
|
+
"border border-dashed border-[var(--theme-background)] bg-[var(--theme-surface)]",
|
|
4534
4748
|
"p-6 text-center text-[var(--theme-text)] shadow-none"
|
|
4535
4749
|
].join(" "),
|
|
4536
4750
|
children: [
|
|
4537
|
-
/* @__PURE__ */ (0,
|
|
4538
|
-
error && onRetry ? /* @__PURE__ */ (0,
|
|
4751
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { className: "text-base", children: message }),
|
|
4752
|
+
error && onRetry ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { variant: "secondary", onClick: onRetry, children: resolvedLabels.retryLabel }) : null
|
|
4539
4753
|
]
|
|
4540
4754
|
}
|
|
4541
4755
|
);
|
|
4542
4756
|
};
|
|
4543
|
-
return /* @__PURE__ */ (0,
|
|
4757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4544
4758
|
"div",
|
|
4545
4759
|
{
|
|
4546
4760
|
ref: containerRef,
|
|
@@ -4552,8 +4766,8 @@ function TableBase({
|
|
|
4552
4766
|
),
|
|
4553
4767
|
style,
|
|
4554
4768
|
children: [
|
|
4555
|
-
shouldRenderToolbar ? /* @__PURE__ */ (0,
|
|
4556
|
-
shouldRenderToolbarPrimaryGroup ? /* @__PURE__ */ (0,
|
|
4769
|
+
shouldRenderToolbar ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex min-w-0 flex-wrap items-center justify-between gap-3", children: [
|
|
4770
|
+
shouldRenderToolbarPrimaryGroup ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4557
4771
|
"div",
|
|
4558
4772
|
{
|
|
4559
4773
|
className: cx(
|
|
@@ -4566,7 +4780,7 @@ function TableBase({
|
|
|
4566
4780
|
// to the Input would land on the inner <input>, which lives inside a
|
|
4567
4781
|
// flex-column ControlFrame — there flex-basis becomes height and the
|
|
4568
4782
|
// field grows absurdly tall.
|
|
4569
|
-
/* @__PURE__ */ (0,
|
|
4783
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "min-w-0 max-w-[360px] flex-[1_1_260px]", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4570
4784
|
Input,
|
|
4571
4785
|
{
|
|
4572
4786
|
type: "search",
|
|
@@ -4577,7 +4791,7 @@ function TableBase({
|
|
|
4577
4791
|
}
|
|
4578
4792
|
) })
|
|
4579
4793
|
) : null,
|
|
4580
|
-
showSettingsButton && !loading ? /* @__PURE__ */ (0,
|
|
4794
|
+
showSettingsButton && !loading ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4581
4795
|
Button,
|
|
4582
4796
|
{
|
|
4583
4797
|
variant: "secondary",
|
|
@@ -4585,13 +4799,13 @@ function TableBase({
|
|
|
4585
4799
|
title: resolvedLabels.settingsButtonLabel,
|
|
4586
4800
|
onClick: () => setIsSettingsModalOpen(true),
|
|
4587
4801
|
className: "shrink-0",
|
|
4588
|
-
children: /* @__PURE__ */ (0,
|
|
4802
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(SettingsIcon, {})
|
|
4589
4803
|
}
|
|
4590
4804
|
) : null
|
|
4591
4805
|
]
|
|
4592
4806
|
}
|
|
4593
4807
|
) : null,
|
|
4594
|
-
shouldShowToolbarStatus ? /* @__PURE__ */ (0,
|
|
4808
|
+
shouldShowToolbarStatus ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4595
4809
|
"div",
|
|
4596
4810
|
{
|
|
4597
4811
|
className: cx(
|
|
@@ -4599,17 +4813,17 @@ function TableBase({
|
|
|
4599
4813
|
shouldRenderToolbarPrimaryGroup ? "ml-auto" : ""
|
|
4600
4814
|
),
|
|
4601
4815
|
children: [
|
|
4602
|
-
loading ? /* @__PURE__ */ (0,
|
|
4603
|
-
!loading && error && hasRows ? /* @__PURE__ */ (0,
|
|
4604
|
-
/* @__PURE__ */ (0,
|
|
4605
|
-
onRetry ? /* @__PURE__ */ (0,
|
|
4816
|
+
loading ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-[13px] font-semibold text-[var(--theme-textLight)]", children: resolvedLabels.loadingMessage }) : null,
|
|
4817
|
+
!loading && error && hasRows ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "inline-flex items-center gap-2.5", children: [
|
|
4818
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-[13px] font-semibold text-[var(--theme-negative)]", children: resolvedLabels.errorMessage }),
|
|
4819
|
+
onRetry ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Button, { variant: "ghost", onClick: onRetry, children: resolvedLabels.retryLabel }) : null
|
|
4606
4820
|
] }) : null
|
|
4607
4821
|
]
|
|
4608
4822
|
}
|
|
4609
4823
|
) : null
|
|
4610
4824
|
] }) : null,
|
|
4611
4825
|
!hasRows && (!loading || error) ? renderEmptyState() : null,
|
|
4612
|
-
hasRows ? isCollapsed ? /* @__PURE__ */ (0,
|
|
4826
|
+
hasRows ? isCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4613
4827
|
"div",
|
|
4614
4828
|
{
|
|
4615
4829
|
role: "list",
|
|
@@ -4617,7 +4831,7 @@ function TableBase({
|
|
|
4617
4831
|
className: "flex min-w-0 flex-col gap-3.5",
|
|
4618
4832
|
children: items.map((item, rowIndex) => {
|
|
4619
4833
|
const rowActions = renderActions(item, rowIndex);
|
|
4620
|
-
return /* @__PURE__ */ (0,
|
|
4834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4621
4835
|
"article",
|
|
4622
4836
|
{
|
|
4623
4837
|
role: "listitem",
|
|
@@ -4628,7 +4842,7 @@ function TableBase({
|
|
|
4628
4842
|
"px-3.5 py-3 shadow-none"
|
|
4629
4843
|
].join(" "),
|
|
4630
4844
|
children: [
|
|
4631
|
-
/* @__PURE__ */ (0,
|
|
4845
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4632
4846
|
"div",
|
|
4633
4847
|
{
|
|
4634
4848
|
className: cx(
|
|
@@ -4647,7 +4861,7 @@ function TableBase({
|
|
|
4647
4861
|
1,
|
|
4648
4862
|
Math.min((_b = column.colSpan) != null ? _b : 1, mobileGridColumnCount)
|
|
4649
4863
|
);
|
|
4650
|
-
return /* @__PURE__ */ (0,
|
|
4864
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4651
4865
|
"div",
|
|
4652
4866
|
{
|
|
4653
4867
|
className: cx(
|
|
@@ -4655,7 +4869,7 @@ function TableBase({
|
|
|
4655
4869
|
span === 2 ? "col-span-2" : "col-span-1"
|
|
4656
4870
|
),
|
|
4657
4871
|
children: [
|
|
4658
|
-
!column.hideLabel && column.label ? /* @__PURE__ */ (0,
|
|
4872
|
+
!column.hideLabel && column.label ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4659
4873
|
"span",
|
|
4660
4874
|
{
|
|
4661
4875
|
className: [
|
|
@@ -4667,14 +4881,14 @@ function TableBase({
|
|
|
4667
4881
|
children: column.label
|
|
4668
4882
|
}
|
|
4669
4883
|
) : null,
|
|
4670
|
-
/* @__PURE__ */ (0,
|
|
4884
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4671
4885
|
"div",
|
|
4672
4886
|
{
|
|
4673
4887
|
className: cx(
|
|
4674
4888
|
"min-w-0 max-w-full",
|
|
4675
4889
|
mobileGridColumnCount === 2 ? "" : "flex-1"
|
|
4676
4890
|
),
|
|
4677
|
-
children: /* @__PURE__ */ (0,
|
|
4891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4678
4892
|
"div",
|
|
4679
4893
|
{
|
|
4680
4894
|
className: cx(
|
|
@@ -4682,7 +4896,7 @@ function TableBase({
|
|
|
4682
4896
|
"text-[var(--theme-text)] [overflow-wrap:anywhere]",
|
|
4683
4897
|
getAlignClassName(align)
|
|
4684
4898
|
),
|
|
4685
|
-
children: hasRenderableContent(content) ? content : /* @__PURE__ */ (0,
|
|
4899
|
+
children: hasRenderableContent(content) ? content : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-[var(--theme-textLight)]", children: "-" })
|
|
4686
4900
|
}
|
|
4687
4901
|
)
|
|
4688
4902
|
}
|
|
@@ -4694,15 +4908,15 @@ function TableBase({
|
|
|
4694
4908
|
})
|
|
4695
4909
|
}
|
|
4696
4910
|
),
|
|
4697
|
-
rowActions ? /* @__PURE__ */ (0,
|
|
4911
|
+
rowActions ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "flex justify-end pt-1", children: rowActions }) : null
|
|
4698
4912
|
]
|
|
4699
4913
|
},
|
|
4700
4914
|
getRowId(item, rowIndex, getCustomRowId)
|
|
4701
4915
|
);
|
|
4702
4916
|
})
|
|
4703
4917
|
}
|
|
4704
|
-
) : /* @__PURE__ */ (0,
|
|
4705
|
-
/* @__PURE__ */ (0,
|
|
4918
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
4919
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("style", { children: `
|
|
4706
4920
|
#${scrollRegionId} {
|
|
4707
4921
|
scrollbar-width: thin;
|
|
4708
4922
|
scrollbar-color: var(--theme-secondary) transparent;
|
|
@@ -4729,7 +4943,7 @@ function TableBase({
|
|
|
4729
4943
|
background-clip: padding-box;
|
|
4730
4944
|
}
|
|
4731
4945
|
` }),
|
|
4732
|
-
/* @__PURE__ */ (0,
|
|
4946
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4733
4947
|
"div",
|
|
4734
4948
|
{
|
|
4735
4949
|
id: scrollRegionId,
|
|
@@ -4740,12 +4954,12 @@ function TableBase({
|
|
|
4740
4954
|
"rounded-[20px] border-2 border-solid border-[var(--theme-background)]",
|
|
4741
4955
|
"bg-[var(--theme-surface)] shadow-none"
|
|
4742
4956
|
),
|
|
4743
|
-
children: /* @__PURE__ */ (0,
|
|
4744
|
-
/* @__PURE__ */ (0,
|
|
4957
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("table", { className: "w-max min-w-full max-w-none border-separate border-spacing-0", children: [
|
|
4958
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("tr", { children: [
|
|
4745
4959
|
desktopColumns.map((column, columnIndex) => {
|
|
4746
4960
|
var _a, _b;
|
|
4747
4961
|
const align = (_a = column.align) != null ? _a : column.type === "actions" ? "right" : "left";
|
|
4748
|
-
return /* @__PURE__ */ (0,
|
|
4962
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4749
4963
|
"th",
|
|
4750
4964
|
{
|
|
4751
4965
|
colSpan: (_b = column.headerColSpan) != null ? _b : column.colSpan,
|
|
@@ -4765,7 +4979,7 @@ function TableBase({
|
|
|
4765
4979
|
getColumnKey(column, columnIndex)
|
|
4766
4980
|
);
|
|
4767
4981
|
}),
|
|
4768
|
-
actions ? /* @__PURE__ */ (0,
|
|
4982
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4769
4983
|
"th",
|
|
4770
4984
|
{
|
|
4771
4985
|
scope: "col",
|
|
@@ -4786,11 +5000,11 @@ function TableBase({
|
|
|
4786
5000
|
}
|
|
4787
5001
|
) : null
|
|
4788
5002
|
] }) }),
|
|
4789
|
-
/* @__PURE__ */ (0,
|
|
5003
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("tbody", { children: items.map((item, rowIndex) => {
|
|
4790
5004
|
const rowActions = renderActions(item, rowIndex);
|
|
4791
5005
|
const isAlternateRow = rowIndex % 2 !== 0;
|
|
4792
5006
|
const stickyRowBackgroundImage = rowIndex % 2 === 0 ? void 0 : "linear-gradient(var(--theme-background), var(--theme-background))";
|
|
4793
|
-
return /* @__PURE__ */ (0,
|
|
5007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4794
5008
|
"tr",
|
|
4795
5009
|
{
|
|
4796
5010
|
className: isAlternateRow ? "bg-[var(--theme-background)]" : "bg-[var(--theme-surface)]",
|
|
@@ -4803,7 +5017,7 @@ function TableBase({
|
|
|
4803
5017
|
columnIndex
|
|
4804
5018
|
);
|
|
4805
5019
|
}),
|
|
4806
|
-
actions ? /* @__PURE__ */ (0,
|
|
5020
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4807
5021
|
"td",
|
|
4808
5022
|
{
|
|
4809
5023
|
className: cx(
|
|
@@ -4829,9 +5043,9 @@ function TableBase({
|
|
|
4829
5043
|
}
|
|
4830
5044
|
)
|
|
4831
5045
|
] }) : null,
|
|
4832
|
-
hasRows && shouldRenderFooter ? /* @__PURE__ */ (0,
|
|
4833
|
-
shouldShowPaginationControls ? /* @__PURE__ */ (0,
|
|
4834
|
-
/* @__PURE__ */ (0,
|
|
5046
|
+
hasRows && shouldRenderFooter ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "-mt-2 flex flex-wrap items-center justify-between gap-3", children: [
|
|
5047
|
+
shouldShowPaginationControls ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
5048
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4835
5049
|
Button,
|
|
4836
5050
|
{
|
|
4837
5051
|
variant: "secondary",
|
|
@@ -4842,7 +5056,7 @@ function TableBase({
|
|
|
4842
5056
|
children: 1
|
|
4843
5057
|
}
|
|
4844
5058
|
),
|
|
4845
|
-
/* @__PURE__ */ (0,
|
|
5059
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4846
5060
|
Button,
|
|
4847
5061
|
{
|
|
4848
5062
|
variant: "secondary",
|
|
@@ -4850,10 +5064,10 @@ function TableBase({
|
|
|
4850
5064
|
disabled: !canGoToPreviousPage,
|
|
4851
5065
|
"aria-label": resolvedLabels.previousPageLabel,
|
|
4852
5066
|
style: paginationButtonStyle,
|
|
4853
|
-
children: /* @__PURE__ */ (0,
|
|
5067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronIcon, { direction: "left" })
|
|
4854
5068
|
}
|
|
4855
5069
|
),
|
|
4856
|
-
/* @__PURE__ */ (0,
|
|
5070
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4857
5071
|
Button,
|
|
4858
5072
|
{
|
|
4859
5073
|
variant: "secondary",
|
|
@@ -4863,7 +5077,7 @@ function TableBase({
|
|
|
4863
5077
|
children: normalizedPage
|
|
4864
5078
|
}
|
|
4865
5079
|
),
|
|
4866
|
-
/* @__PURE__ */ (0,
|
|
5080
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4867
5081
|
Button,
|
|
4868
5082
|
{
|
|
4869
5083
|
variant: "secondary",
|
|
@@ -4871,10 +5085,10 @@ function TableBase({
|
|
|
4871
5085
|
disabled: !canGoToNextPage,
|
|
4872
5086
|
"aria-label": resolvedLabels.nextPageLabel,
|
|
4873
5087
|
style: paginationButtonStyle,
|
|
4874
|
-
children: /* @__PURE__ */ (0,
|
|
5088
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChevronIcon, { direction: "right" })
|
|
4875
5089
|
}
|
|
4876
5090
|
),
|
|
4877
|
-
/* @__PURE__ */ (0,
|
|
5091
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4878
5092
|
Button,
|
|
4879
5093
|
{
|
|
4880
5094
|
variant: "secondary",
|
|
@@ -4886,16 +5100,16 @@ function TableBase({
|
|
|
4886
5100
|
}
|
|
4887
5101
|
)
|
|
4888
5102
|
] }) : null,
|
|
4889
|
-
/* @__PURE__ */ (0,
|
|
5103
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4890
5104
|
"div",
|
|
4891
5105
|
{
|
|
4892
5106
|
className: cx(
|
|
4893
5107
|
"flex items-center gap-2.5 text-[13px] text-[var(--theme-textLight)]",
|
|
4894
5108
|
shouldShowRowsPerPageControl ? "ml-auto" : ""
|
|
4895
5109
|
),
|
|
4896
|
-
children: shouldShowRowsPerPageControl ? /* @__PURE__ */ (0,
|
|
4897
|
-
resolvedLabels.rowsPerPageLabel ? /* @__PURE__ */ (0,
|
|
4898
|
-
/* @__PURE__ */ (0,
|
|
5110
|
+
children: shouldShowRowsPerPageControl ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_jsx_runtime15.Fragment, { children: [
|
|
5111
|
+
resolvedLabels.rowsPerPageLabel ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: resolvedLabels.rowsPerPageLabel }) : null,
|
|
5112
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "w-[72px]", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4899
5113
|
Select,
|
|
4900
5114
|
{
|
|
4901
5115
|
value: String(pageSize),
|
|
@@ -4914,7 +5128,7 @@ function TableBase({
|
|
|
4914
5128
|
}
|
|
4915
5129
|
)
|
|
4916
5130
|
] }) : null,
|
|
4917
|
-
/* @__PURE__ */ (0,
|
|
5131
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4918
5132
|
Modal,
|
|
4919
5133
|
{
|
|
4920
5134
|
isOpen: isSettingsModalOpen,
|
|
@@ -4931,9 +5145,9 @@ function TableBase({
|
|
|
4931
5145
|
paddingTop: 8
|
|
4932
5146
|
},
|
|
4933
5147
|
children: [
|
|
4934
|
-
/* @__PURE__ */ (0,
|
|
4935
|
-
/* @__PURE__ */ (0,
|
|
4936
|
-
/* @__PURE__ */ (0,
|
|
5148
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "grid gap-3", children: [
|
|
5149
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { className: "text-sm text-[var(--theme-text)]", children: resolvedLabels.tableInfoSectionTitle }),
|
|
5150
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
4937
5151
|
"div",
|
|
4938
5152
|
{
|
|
4939
5153
|
className: cx(
|
|
@@ -4941,31 +5155,31 @@ function TableBase({
|
|
|
4941
5155
|
"border-2 border-[var(--theme-background)] bg-[var(--theme-surface)]"
|
|
4942
5156
|
),
|
|
4943
5157
|
children: [
|
|
4944
|
-
/* @__PURE__ */ (0,
|
|
4945
|
-
/* @__PURE__ */ (0,
|
|
4946
|
-
/* @__PURE__ */ (0,
|
|
5158
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "grid gap-1", children: [
|
|
5159
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-[var(--theme-textLight)]", children: resolvedLabels.totalItemsInfoLabel }),
|
|
5160
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { className: "font-medium text-[var(--theme-text)]", children: totalItemCount })
|
|
4947
5161
|
] }),
|
|
4948
|
-
/* @__PURE__ */ (0,
|
|
4949
|
-
/* @__PURE__ */ (0,
|
|
4950
|
-
/* @__PURE__ */ (0,
|
|
5162
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "grid gap-1", children: [
|
|
5163
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-[var(--theme-textLight)]", children: resolvedLabels.totalPagesInfoLabel }),
|
|
5164
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { className: "font-medium text-[var(--theme-text)]", children: totalPages })
|
|
4951
5165
|
] }),
|
|
4952
|
-
/* @__PURE__ */ (0,
|
|
4953
|
-
/* @__PURE__ */ (0,
|
|
4954
|
-
/* @__PURE__ */ (0,
|
|
5166
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "grid gap-1", children: [
|
|
5167
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-[var(--theme-textLight)]", children: resolvedLabels.currentPageItemsInfoLabel }),
|
|
5168
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { className: "font-medium text-[var(--theme-text)]", children: currentPageItemCount })
|
|
4955
5169
|
] }),
|
|
4956
|
-
/* @__PURE__ */ (0,
|
|
4957
|
-
/* @__PURE__ */ (0,
|
|
4958
|
-
/* @__PURE__ */ (0,
|
|
5170
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "grid gap-1", children: [
|
|
5171
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "text-xs text-[var(--theme-textLight)]", children: resolvedLabels.currentPageInfoLabel }),
|
|
5172
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { className: "font-medium text-[var(--theme-text)]", children: normalizedPage })
|
|
4959
5173
|
] })
|
|
4960
5174
|
]
|
|
4961
5175
|
}
|
|
4962
5176
|
)
|
|
4963
5177
|
] }),
|
|
4964
|
-
/* @__PURE__ */ (0,
|
|
4965
|
-
/* @__PURE__ */ (0,
|
|
4966
|
-
/* @__PURE__ */ (0,
|
|
4967
|
-
/* @__PURE__ */ (0,
|
|
4968
|
-
/* @__PURE__ */ (0,
|
|
5178
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "py-[18px]", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Separator, {}) }),
|
|
5179
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "grid gap-3", children: [
|
|
5180
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("strong", { className: "text-sm text-[var(--theme-text)]", children: resolvedLabels.downloadSectionTitle }),
|
|
5181
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex flex-wrap gap-2.5", children: [
|
|
5182
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4969
5183
|
Button,
|
|
4970
5184
|
{
|
|
4971
5185
|
variant: "secondary",
|
|
@@ -4974,7 +5188,7 @@ function TableBase({
|
|
|
4974
5188
|
children: resolvedLabels.downloadCsvLabel
|
|
4975
5189
|
}
|
|
4976
5190
|
),
|
|
4977
|
-
/* @__PURE__ */ (0,
|
|
5191
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4978
5192
|
Button,
|
|
4979
5193
|
{
|
|
4980
5194
|
variant: "secondary",
|
|
@@ -4983,7 +5197,7 @@ function TableBase({
|
|
|
4983
5197
|
children: resolvedLabels.downloadXlsLabel
|
|
4984
5198
|
}
|
|
4985
5199
|
),
|
|
4986
|
-
/* @__PURE__ */ (0,
|
|
5200
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
4987
5201
|
Button,
|
|
4988
5202
|
{
|
|
4989
5203
|
variant: "secondary",
|
|
@@ -5003,7 +5217,7 @@ function TableBase({
|
|
|
5003
5217
|
}
|
|
5004
5218
|
|
|
5005
5219
|
// src/components/Table.tsx
|
|
5006
|
-
var
|
|
5220
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
5007
5221
|
function Table({
|
|
5008
5222
|
items,
|
|
5009
5223
|
desktopColumns,
|
|
@@ -5062,7 +5276,7 @@ function Table({
|
|
|
5062
5276
|
const startIndex = (normalizedPage - 1) * pageSize;
|
|
5063
5277
|
return filteredItems.slice(startIndex, startIndex + pageSize);
|
|
5064
5278
|
}, [filteredItems, normalizedPage, pageSize]);
|
|
5065
|
-
return /* @__PURE__ */ (0,
|
|
5279
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
5066
5280
|
TableBase,
|
|
5067
5281
|
{
|
|
5068
5282
|
...props,
|
|
@@ -5099,7 +5313,7 @@ function Table({
|
|
|
5099
5313
|
|
|
5100
5314
|
// src/components/TableAsync.tsx
|
|
5101
5315
|
var import_react13 = require("react");
|
|
5102
|
-
var
|
|
5316
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
5103
5317
|
var areUnknownArraysEqual2 = (left, right) => {
|
|
5104
5318
|
if (left.length !== right.length) {
|
|
5105
5319
|
return false;
|
|
@@ -5218,7 +5432,7 @@ function TableAsync({
|
|
|
5218
5432
|
setPage(normalizedPage);
|
|
5219
5433
|
onPageChange == null ? void 0 : onPageChange(normalizedPage);
|
|
5220
5434
|
}, [normalizedPage, onPageChange, page]);
|
|
5221
|
-
return /* @__PURE__ */ (0,
|
|
5435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
5222
5436
|
TableBase,
|
|
5223
5437
|
{
|
|
5224
5438
|
...props,
|
|
@@ -5257,7 +5471,7 @@ function TableAsync({
|
|
|
5257
5471
|
}
|
|
5258
5472
|
|
|
5259
5473
|
// src/components/Textarea.tsx
|
|
5260
|
-
var
|
|
5474
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
5261
5475
|
function Textarea({
|
|
5262
5476
|
label,
|
|
5263
5477
|
hint,
|
|
@@ -5274,7 +5488,7 @@ function Textarea({
|
|
|
5274
5488
|
const resolvedPlaceholder = placeholder != null ? placeholder : " ";
|
|
5275
5489
|
const placeholderClass = floatingPlaceholder ? "placeholder-transparent" : "placeholder-[var(--theme-textLight)]";
|
|
5276
5490
|
const isPopulated = rest.value !== void 0 && rest.value !== "" && rest.value !== null;
|
|
5277
|
-
const textarea = /* @__PURE__ */ (0,
|
|
5491
|
+
const textarea = /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5278
5492
|
"textarea",
|
|
5279
5493
|
{
|
|
5280
5494
|
...rest,
|
|
@@ -5299,7 +5513,7 @@ function Textarea({
|
|
|
5299
5513
|
}
|
|
5300
5514
|
}
|
|
5301
5515
|
);
|
|
5302
|
-
return /* @__PURE__ */ (0,
|
|
5516
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
5303
5517
|
ControlFrame,
|
|
5304
5518
|
{
|
|
5305
5519
|
label,
|
|
@@ -5327,6 +5541,7 @@ injectUiKitFonts();
|
|
|
5327
5541
|
ComposableModal,
|
|
5328
5542
|
DatePicker,
|
|
5329
5543
|
Input,
|
|
5544
|
+
Loading,
|
|
5330
5545
|
Modal,
|
|
5331
5546
|
Select,
|
|
5332
5547
|
SelectAsync,
|