@helpwave/hightide 0.6.7 → 0.6.9
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 +68 -26
- package/dist/index.d.ts +68 -26
- package/dist/index.js +562 -478
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +558 -478
- package/dist/index.mjs.map +1 -1
- package/dist/style/globals.css +60 -31
- package/dist/style/uncompiled/theme/components/checkbox.css +6 -5
- package/dist/style/uncompiled/theme/components/expandable.css +3 -3
- package/dist/style/uncompiled/theme/components/expansion-icon.css +1 -1
- package/dist/style/uncompiled/theme/components/form-field.css +4 -4
- package/dist/style/uncompiled/theme/components/input-elements.css +3 -3
- package/dist/style/uncompiled/theme/components/property.css +10 -10
- package/dist/style/uncompiled/theme/components/table.css +8 -1
- package/dist/style/uncompiled/theme/components/textarea.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6297,6 +6297,8 @@ __export(index_exports, {
|
|
|
6297
6297
|
FormContext: () => FormContext,
|
|
6298
6298
|
FormField: () => FormField,
|
|
6299
6299
|
FormFieldLayout: () => FormFieldLayout,
|
|
6300
|
+
FormObserver: () => FormObserver,
|
|
6301
|
+
FormObserverKey: () => FormObserverKey,
|
|
6300
6302
|
FormProvider: () => FormProvider,
|
|
6301
6303
|
FormStore: () => FormStore,
|
|
6302
6304
|
GenericFilter: () => GenericFilter,
|
|
@@ -6461,6 +6463,8 @@ __export(index_exports, {
|
|
|
6461
6463
|
useFocusTrap: () => useFocusTrap,
|
|
6462
6464
|
useForm: () => useForm,
|
|
6463
6465
|
useFormField: () => useFormField,
|
|
6466
|
+
useFormObserver: () => useFormObserver,
|
|
6467
|
+
useFormObserverKey: () => useFormObserverKey,
|
|
6464
6468
|
useHandleRefs: () => useHandleRefs,
|
|
6465
6469
|
useHightideConfig: () => useHightideConfig,
|
|
6466
6470
|
useHightideTranslation: () => useHightideTranslation,
|
|
@@ -7167,277 +7171,7 @@ var TagIcon = ({
|
|
|
7167
7171
|
|
|
7168
7172
|
// src/components/form/FieldLayout.tsx
|
|
7169
7173
|
var import_react5 = require("react");
|
|
7170
|
-
|
|
7171
|
-
// src/utils/array.ts
|
|
7172
|
-
var equalSizeGroups = (array, groupSize) => {
|
|
7173
|
-
if (groupSize <= 0) {
|
|
7174
|
-
console.warn(`group size should be greater than 0: groupSize = ${groupSize}`);
|
|
7175
|
-
return [[...array]];
|
|
7176
|
-
}
|
|
7177
|
-
const groups = [];
|
|
7178
|
-
for (let i = 0; i < array.length; i += groupSize) {
|
|
7179
|
-
groups.push(array.slice(i, Math.min(i + groupSize, array.length)));
|
|
7180
|
-
}
|
|
7181
|
-
return groups;
|
|
7182
|
-
};
|
|
7183
|
-
var defaultRangeOptions = {
|
|
7184
|
-
allowEmptyRange: false,
|
|
7185
|
-
stepSize: 1,
|
|
7186
|
-
exclusiveStart: false,
|
|
7187
|
-
exclusiveEnd: true
|
|
7188
|
-
};
|
|
7189
|
-
var range = (endOrRange, options) => {
|
|
7190
|
-
const { allowEmptyRange, stepSize, exclusiveStart, exclusiveEnd } = { ...defaultRangeOptions, ...options };
|
|
7191
|
-
let start = 0;
|
|
7192
|
-
let end;
|
|
7193
|
-
if (typeof endOrRange === "number") {
|
|
7194
|
-
end = endOrRange;
|
|
7195
|
-
} else {
|
|
7196
|
-
start = endOrRange[0];
|
|
7197
|
-
end = endOrRange[1];
|
|
7198
|
-
}
|
|
7199
|
-
if (!exclusiveEnd) {
|
|
7200
|
-
end -= 1;
|
|
7201
|
-
}
|
|
7202
|
-
if (exclusiveStart) {
|
|
7203
|
-
start += 1;
|
|
7204
|
-
}
|
|
7205
|
-
if (end - 1 < start) {
|
|
7206
|
-
if (!allowEmptyRange) {
|
|
7207
|
-
console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set options.allowEmptyRange to true`);
|
|
7208
|
-
}
|
|
7209
|
-
return [];
|
|
7210
|
-
}
|
|
7211
|
-
return Array.from({ length: end - start }, (_, index) => index * stepSize + start);
|
|
7212
|
-
};
|
|
7213
|
-
var closestMatch = (list, firstCloser) => {
|
|
7214
|
-
return list.reduce((item1, item2) => {
|
|
7215
|
-
return firstCloser(item1, item2) ? item1 : item2;
|
|
7216
|
-
});
|
|
7217
|
-
};
|
|
7218
|
-
var getNeighbours = (list, item, neighbourDistance = 2) => {
|
|
7219
|
-
const index = list.indexOf(item);
|
|
7220
|
-
const totalItems = neighbourDistance * 2 + 1;
|
|
7221
|
-
if (list.length < totalItems) {
|
|
7222
|
-
console.warn("List is to short");
|
|
7223
|
-
return list;
|
|
7224
|
-
}
|
|
7225
|
-
if (index === -1) {
|
|
7226
|
-
console.error("item not found in list");
|
|
7227
|
-
return list.splice(0, totalItems);
|
|
7228
|
-
}
|
|
7229
|
-
let start = index - neighbourDistance;
|
|
7230
|
-
if (start < 0) {
|
|
7231
|
-
start += list.length;
|
|
7232
|
-
}
|
|
7233
|
-
const end = (index + neighbourDistance + 1) % list.length;
|
|
7234
|
-
const result = [];
|
|
7235
|
-
let ignoreOnce = list.length === totalItems;
|
|
7236
|
-
for (let i = start; i !== end || ignoreOnce; i = (i + 1) % list.length) {
|
|
7237
|
-
result.push(list[i]);
|
|
7238
|
-
if (end === i && ignoreOnce) {
|
|
7239
|
-
ignoreOnce = false;
|
|
7240
|
-
}
|
|
7241
|
-
}
|
|
7242
|
-
return result;
|
|
7243
|
-
};
|
|
7244
|
-
var createLoopingListWithIndex = (list, startIndex = 0, length = 0, forwards = true) => {
|
|
7245
|
-
if (length < 0) {
|
|
7246
|
-
console.warn(`createLoopingList: length must be >= 0, given ${length}`);
|
|
7247
|
-
} else if (length === 0) {
|
|
7248
|
-
length = list.length;
|
|
7249
|
-
}
|
|
7250
|
-
const returnList = [];
|
|
7251
|
-
if (forwards) {
|
|
7252
|
-
for (let i = startIndex; returnList.length < length; i = (i + 1) % list.length) {
|
|
7253
|
-
returnList.push([i, list[i]]);
|
|
7254
|
-
}
|
|
7255
|
-
} else {
|
|
7256
|
-
for (let i = startIndex; returnList.length < length; i = i === 0 ? i = list.length - 1 : i - 1) {
|
|
7257
|
-
returnList.push([i, list[i]]);
|
|
7258
|
-
}
|
|
7259
|
-
}
|
|
7260
|
-
return returnList;
|
|
7261
|
-
};
|
|
7262
|
-
var createLoopingList = (list, startIndex = 0, length = 0, forwards = true) => {
|
|
7263
|
-
return createLoopingListWithIndex(list, startIndex, length, forwards).map(([_, item]) => item);
|
|
7264
|
-
};
|
|
7265
|
-
var moveItems = (list, move = 0) => {
|
|
7266
|
-
const result = [];
|
|
7267
|
-
let start = move;
|
|
7268
|
-
if (start < 0) {
|
|
7269
|
-
start = list.length - move;
|
|
7270
|
-
}
|
|
7271
|
-
start = start % list.length;
|
|
7272
|
-
for (let i = 0; i < list.length; i++) {
|
|
7273
|
-
result[i] = list[(i + start) % list.length];
|
|
7274
|
-
}
|
|
7275
|
-
return result;
|
|
7276
|
-
};
|
|
7277
|
-
function resolveSingleOrArray(value) {
|
|
7278
|
-
if (Array.isArray(value)) {
|
|
7279
|
-
return value;
|
|
7280
|
-
} else if (value) {
|
|
7281
|
-
return [value];
|
|
7282
|
-
}
|
|
7283
|
-
return [];
|
|
7284
|
-
}
|
|
7285
|
-
var ArrayUtil = {
|
|
7286
|
-
unique: (list) => {
|
|
7287
|
-
const seen = /* @__PURE__ */ new Set();
|
|
7288
|
-
return list.filter((item) => {
|
|
7289
|
-
if (seen.has(item)) {
|
|
7290
|
-
return false;
|
|
7291
|
-
}
|
|
7292
|
-
seen.add(item);
|
|
7293
|
-
return true;
|
|
7294
|
-
});
|
|
7295
|
-
},
|
|
7296
|
-
difference: (list, removeList) => {
|
|
7297
|
-
const remove = new Set(removeList);
|
|
7298
|
-
return list.filter((item) => !remove.has(item));
|
|
7299
|
-
},
|
|
7300
|
-
moveItems,
|
|
7301
|
-
resolveSingleOrArray
|
|
7302
|
-
};
|
|
7303
|
-
|
|
7304
|
-
// src/utils/propsUtil.ts
|
|
7305
|
-
function bool(isActive) {
|
|
7306
|
-
return isActive ? "" : void 0;
|
|
7307
|
-
}
|
|
7308
|
-
function name(name2, props = {}) {
|
|
7309
|
-
return props["data-name"] ? String(props["data-name"]) : name2;
|
|
7310
|
-
}
|
|
7311
|
-
function interactionStatesData(interactionStates) {
|
|
7312
|
-
return {
|
|
7313
|
-
"data-disabled": bool(!!interactionStates.disabled),
|
|
7314
|
-
"data-invalid": bool(!!interactionStates.invalid),
|
|
7315
|
-
"data-readonly": bool(!!interactionStates.readOnly),
|
|
7316
|
-
"data-required": bool(!!interactionStates.required)
|
|
7317
|
-
};
|
|
7318
|
-
}
|
|
7319
|
-
var dataAttributes = {
|
|
7320
|
-
bool,
|
|
7321
|
-
name,
|
|
7322
|
-
interactionStates: interactionStatesData
|
|
7323
|
-
};
|
|
7324
|
-
function mouseEventExtender({
|
|
7325
|
-
fromProps,
|
|
7326
|
-
extensions
|
|
7327
|
-
}) {
|
|
7328
|
-
return (event) => {
|
|
7329
|
-
fromProps?.(event);
|
|
7330
|
-
ArrayUtil.resolveSingleOrArray(extensions).forEach((element) => element(event));
|
|
7331
|
-
};
|
|
7332
|
-
}
|
|
7333
|
-
function keyboardEventExtender({
|
|
7334
|
-
fromProps,
|
|
7335
|
-
extensions
|
|
7336
|
-
}) {
|
|
7337
|
-
return (event) => {
|
|
7338
|
-
fromProps?.(event);
|
|
7339
|
-
ArrayUtil.resolveSingleOrArray(extensions).forEach((element) => element(event));
|
|
7340
|
-
};
|
|
7341
|
-
}
|
|
7342
|
-
var extender = {
|
|
7343
|
-
mouseEvent: mouseEventExtender,
|
|
7344
|
-
keyboardEvent: keyboardEventExtender
|
|
7345
|
-
};
|
|
7346
|
-
function click(onClick) {
|
|
7347
|
-
const keyboardEventHandler = (event) => {
|
|
7348
|
-
if (event.key === "Enter" || event.key === " ") {
|
|
7349
|
-
event.preventDefault();
|
|
7350
|
-
event.stopPropagation();
|
|
7351
|
-
onClick();
|
|
7352
|
-
}
|
|
7353
|
-
};
|
|
7354
|
-
return {
|
|
7355
|
-
onClick,
|
|
7356
|
-
onKeyDown: keyboardEventHandler
|
|
7357
|
-
};
|
|
7358
|
-
}
|
|
7359
|
-
function close2(onClose) {
|
|
7360
|
-
return (event) => {
|
|
7361
|
-
if (event.key === "Escape") {
|
|
7362
|
-
event.preventDefault();
|
|
7363
|
-
event.stopPropagation();
|
|
7364
|
-
onClose?.();
|
|
7365
|
-
}
|
|
7366
|
-
};
|
|
7367
|
-
}
|
|
7368
|
-
function navigate({
|
|
7369
|
-
left,
|
|
7370
|
-
right,
|
|
7371
|
-
up: up2,
|
|
7372
|
-
down: down2
|
|
7373
|
-
}) {
|
|
7374
|
-
return (event) => {
|
|
7375
|
-
switch (event.key) {
|
|
7376
|
-
case "ArrowLeft":
|
|
7377
|
-
left(event);
|
|
7378
|
-
event.preventDefault();
|
|
7379
|
-
event.stopPropagation();
|
|
7380
|
-
break;
|
|
7381
|
-
case "ArrowRight":
|
|
7382
|
-
right(event);
|
|
7383
|
-
event.preventDefault();
|
|
7384
|
-
event.stopPropagation();
|
|
7385
|
-
break;
|
|
7386
|
-
case "ArrowUp":
|
|
7387
|
-
up2(event);
|
|
7388
|
-
event.preventDefault();
|
|
7389
|
-
event.stopPropagation();
|
|
7390
|
-
break;
|
|
7391
|
-
case "ArrowDown":
|
|
7392
|
-
down2(event);
|
|
7393
|
-
event.preventDefault();
|
|
7394
|
-
event.stopPropagation();
|
|
7395
|
-
break;
|
|
7396
|
-
}
|
|
7397
|
-
};
|
|
7398
|
-
}
|
|
7399
|
-
function mergeProps(slotProps, childProps) {
|
|
7400
|
-
const result = { ...childProps };
|
|
7401
|
-
for (const key in slotProps) {
|
|
7402
|
-
const slotValue = slotProps[key];
|
|
7403
|
-
const childValue = childProps[key];
|
|
7404
|
-
if (key === "className") {
|
|
7405
|
-
result.className = [slotValue, childValue].filter(Boolean).join(" ");
|
|
7406
|
-
} else if (key === "style") {
|
|
7407
|
-
result.style = { ...slotValue, ...childValue };
|
|
7408
|
-
} else if (key.startsWith("on") && typeof slotValue === "function" && typeof childValue === "function") {
|
|
7409
|
-
result[key] = (...args) => {
|
|
7410
|
-
slotValue(...args);
|
|
7411
|
-
childValue(...args);
|
|
7412
|
-
};
|
|
7413
|
-
} else {
|
|
7414
|
-
result[key] = childValue ?? slotValue;
|
|
7415
|
-
}
|
|
7416
|
-
}
|
|
7417
|
-
return result;
|
|
7418
|
-
}
|
|
7419
|
-
function interactionStatesAria(interactionStates, props = {}) {
|
|
7420
|
-
return {
|
|
7421
|
-
"aria-disabled": props["aria-disabled"] ?? interactionStates.disabled,
|
|
7422
|
-
"aria-invalid": props["aria-invalid"] ?? interactionStates.invalid,
|
|
7423
|
-
"aria-readonly": props["aria-readonly"] ?? interactionStates.readOnly,
|
|
7424
|
-
"aria-required": props["aria-required"] ?? interactionStates.required
|
|
7425
|
-
};
|
|
7426
|
-
}
|
|
7427
|
-
var aria = {
|
|
7428
|
-
close: close2,
|
|
7429
|
-
click,
|
|
7430
|
-
navigate,
|
|
7431
|
-
interactionStates: interactionStatesAria
|
|
7432
|
-
};
|
|
7433
|
-
var PropsUtil = {
|
|
7434
|
-
extender,
|
|
7435
|
-
dataAttributes,
|
|
7436
|
-
aria,
|
|
7437
|
-
mergeProps
|
|
7438
|
-
};
|
|
7439
|
-
|
|
7440
|
-
// src/components/form/FieldLayout.tsx
|
|
7174
|
+
var import_clsx5 = __toESM(require("clsx"));
|
|
7441
7175
|
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
7442
7176
|
var FormFieldLayout = (0, import_react5.forwardRef)(function FormFieldLayout2({
|
|
7443
7177
|
children,
|
|
@@ -7451,6 +7185,7 @@ var FormFieldLayout = (0, import_react5.forwardRef)(function FormFieldLayout2({
|
|
|
7451
7185
|
invalidDescriptionProps,
|
|
7452
7186
|
description,
|
|
7453
7187
|
descriptionProps,
|
|
7188
|
+
showRequiredIndicator = true,
|
|
7454
7189
|
...props
|
|
7455
7190
|
}, ref) {
|
|
7456
7191
|
const generatedId = (0, import_react5.useId)();
|
|
@@ -7488,7 +7223,7 @@ var FormFieldLayout = (0, import_react5.forwardRef)(function FormFieldLayout2({
|
|
|
7488
7223
|
{
|
|
7489
7224
|
...props,
|
|
7490
7225
|
ref,
|
|
7491
|
-
|
|
7226
|
+
className: (0, import_clsx5.default)("form-field-container", props.className),
|
|
7492
7227
|
children: [
|
|
7493
7228
|
label && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
7494
7229
|
"label",
|
|
@@ -7496,10 +7231,10 @@ var FormFieldLayout = (0, import_react5.forwardRef)(function FormFieldLayout2({
|
|
|
7496
7231
|
...labelProps,
|
|
7497
7232
|
id: ids.label,
|
|
7498
7233
|
htmlFor: ids.input,
|
|
7499
|
-
|
|
7234
|
+
className: (0, import_clsx5.default)("form-field-label", labelProps?.className),
|
|
7500
7235
|
children: [
|
|
7501
7236
|
label,
|
|
7502
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { role: "none", className: "bg-primary w-2 h-2 rounded-full" })
|
|
7237
|
+
showRequiredIndicator && required && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { role: "none", className: "bg-primary w-2 h-2 rounded-full" })
|
|
7503
7238
|
]
|
|
7504
7239
|
}
|
|
7505
7240
|
),
|
|
@@ -7508,7 +7243,7 @@ var FormFieldLayout = (0, import_react5.forwardRef)(function FormFieldLayout2({
|
|
|
7508
7243
|
{
|
|
7509
7244
|
...descriptionProps,
|
|
7510
7245
|
id: ids.description,
|
|
7511
|
-
|
|
7246
|
+
className: (0, import_clsx5.default)("form-field-description", descriptionProps?.className),
|
|
7512
7247
|
children: description
|
|
7513
7248
|
}
|
|
7514
7249
|
),
|
|
@@ -7518,10 +7253,10 @@ var FormFieldLayout = (0, import_react5.forwardRef)(function FormFieldLayout2({
|
|
|
7518
7253
|
{
|
|
7519
7254
|
...invalidDescriptionProps,
|
|
7520
7255
|
id: ids.description,
|
|
7521
|
-
"data-name": "form-field-error",
|
|
7522
7256
|
role: "alert",
|
|
7523
7257
|
"aria-hidden": !invalid,
|
|
7524
7258
|
"aria-live": "polite",
|
|
7259
|
+
className: (0, import_clsx5.default)("form-field-error", invalidDescriptionProps?.className),
|
|
7525
7260
|
children: invalidDescription
|
|
7526
7261
|
}
|
|
7527
7262
|
)
|
|
@@ -7542,13 +7277,18 @@ function useForm() {
|
|
|
7542
7277
|
if (!ctx) throw new Error("FormContext is only available inside a <Form>");
|
|
7543
7278
|
return ctx;
|
|
7544
7279
|
}
|
|
7545
|
-
function useFormField(key, { triggerUpdate = true }) {
|
|
7280
|
+
function useFormField(key, { triggerUpdate = true, validationBehaviour = "touched" }) {
|
|
7546
7281
|
const context = (0, import_react6.useContext)(FormContext);
|
|
7547
7282
|
const subscribe = (0, import_react6.useCallback)((cb) => {
|
|
7548
7283
|
if (!context) return () => {
|
|
7549
7284
|
};
|
|
7550
7285
|
return context.store.subscribe(key, cb);
|
|
7551
7286
|
}, [context, key]);
|
|
7287
|
+
const subscribeAll = (0, import_react6.useCallback)((cb) => {
|
|
7288
|
+
if (!context) return () => {
|
|
7289
|
+
};
|
|
7290
|
+
return context.store.subscribe("ALL", cb);
|
|
7291
|
+
}, [context]);
|
|
7552
7292
|
const value = (0, import_react6.useSyncExternalStore)(
|
|
7553
7293
|
subscribe,
|
|
7554
7294
|
() => context ? context.store.getValue(key) : void 0
|
|
@@ -7557,31 +7297,85 @@ function useFormField(key, { triggerUpdate = true }) {
|
|
|
7557
7297
|
subscribe,
|
|
7558
7298
|
() => context ? context.store.getError(key) : void 0
|
|
7559
7299
|
);
|
|
7300
|
+
const touched = (0, import_react6.useSyncExternalStore)(
|
|
7301
|
+
subscribe,
|
|
7302
|
+
() => context ? context.store.getTouched(key) : void 0
|
|
7303
|
+
);
|
|
7304
|
+
const hasTriedSubmitting = (0, import_react6.useSyncExternalStore)(
|
|
7305
|
+
subscribeAll,
|
|
7306
|
+
() => context ? context.store.getHasTriedSubmitting() : void 0
|
|
7307
|
+
);
|
|
7308
|
+
const isShowingErrors = validationBehaviour === "always" || validationBehaviour === "touched" && (touched ?? false) || validationBehaviour === "submit" && (hasTriedSubmitting ?? false);
|
|
7560
7309
|
const getDataProps = (0, import_react6.useCallback)(() => {
|
|
7561
7310
|
return {
|
|
7562
|
-
value
|
|
7311
|
+
value,
|
|
7563
7312
|
onValueChange: (val) => context?.store.setValue(key, val),
|
|
7564
7313
|
onEditComplete: (val) => {
|
|
7565
7314
|
context?.store.setTouched(key);
|
|
7566
7315
|
context?.store.setValue(key, val, triggerUpdate);
|
|
7567
7316
|
}
|
|
7568
7317
|
};
|
|
7569
|
-
}, [context, key, triggerUpdate]);
|
|
7318
|
+
}, [context?.store, key, triggerUpdate, value]);
|
|
7570
7319
|
if (!context) return null;
|
|
7571
7320
|
const { registerRef } = context;
|
|
7572
7321
|
return {
|
|
7573
7322
|
store: context.store,
|
|
7574
7323
|
value,
|
|
7575
|
-
error,
|
|
7324
|
+
error: isShowingErrors ? error : void 0,
|
|
7325
|
+
touched: touched ?? false,
|
|
7326
|
+
hasTriedSubmitting: hasTriedSubmitting ?? false,
|
|
7576
7327
|
dataProps: getDataProps(),
|
|
7577
7328
|
registerRef: registerRef(key)
|
|
7578
7329
|
};
|
|
7579
7330
|
}
|
|
7331
|
+
function useFormObserver({ formStore } = {}) {
|
|
7332
|
+
const context = (0, import_react6.useContext)(FormContext);
|
|
7333
|
+
const store = formStore ?? context?.store;
|
|
7334
|
+
const subscribe = (0, import_react6.useCallback)((cb) => {
|
|
7335
|
+
if (!store) return () => {
|
|
7336
|
+
};
|
|
7337
|
+
return store.subscribe("ALL", cb);
|
|
7338
|
+
}, [store]);
|
|
7339
|
+
const values = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getAllValues() : void 0);
|
|
7340
|
+
const errors = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getErrors() : void 0);
|
|
7341
|
+
const touched = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getAllTouched() : void 0);
|
|
7342
|
+
const hasErrors = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getHasError() : void 0);
|
|
7343
|
+
const hasTriedSubmitting = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getHasTriedSubmitting() : void 0);
|
|
7344
|
+
if (!store) return null;
|
|
7345
|
+
return {
|
|
7346
|
+
store,
|
|
7347
|
+
values,
|
|
7348
|
+
errors,
|
|
7349
|
+
touched,
|
|
7350
|
+
hasErrors,
|
|
7351
|
+
hasTriedSubmitting
|
|
7352
|
+
};
|
|
7353
|
+
}
|
|
7354
|
+
function useFormObserverKey({ formStore, key }) {
|
|
7355
|
+
const context = (0, import_react6.useContext)(FormContext);
|
|
7356
|
+
const store = formStore ?? context?.store;
|
|
7357
|
+
const subscribe = (0, import_react6.useCallback)((cb) => {
|
|
7358
|
+
if (!store) return () => {
|
|
7359
|
+
};
|
|
7360
|
+
return store.subscribe(key, cb);
|
|
7361
|
+
}, [store, key]);
|
|
7362
|
+
const value = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getValue(key) : void 0);
|
|
7363
|
+
const error = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getError(key) : void 0);
|
|
7364
|
+
const touched = (0, import_react6.useSyncExternalStore)(subscribe, () => store ? store.getTouched(key) : void 0);
|
|
7365
|
+
if (!store) return null;
|
|
7366
|
+
return {
|
|
7367
|
+
store,
|
|
7368
|
+
value,
|
|
7369
|
+
error,
|
|
7370
|
+
touched,
|
|
7371
|
+
hasError: !!error
|
|
7372
|
+
};
|
|
7373
|
+
}
|
|
7580
7374
|
|
|
7581
7375
|
// src/components/form/FormField.tsx
|
|
7582
7376
|
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
7583
|
-
var FormField = ({ children, name: name2, triggerUpdateOnEditComplete, ...props }) => {
|
|
7584
|
-
const formField = useFormField(name2, { triggerUpdate: triggerUpdateOnEditComplete });
|
|
7377
|
+
var FormField = ({ children, name: name2, triggerUpdateOnEditComplete, validationBehaviour, ...props }) => {
|
|
7378
|
+
const formField = useFormField(name2, { triggerUpdate: triggerUpdateOnEditComplete, validationBehaviour });
|
|
7585
7379
|
if (!formField) {
|
|
7586
7380
|
throw new Error("<FormField> can only be used inside a FormContext try wrapping your app in a <FormProvider>");
|
|
7587
7381
|
}
|
|
@@ -7593,20 +7387,47 @@ var FormField = ({ children, name: name2, triggerUpdateOnEditComplete, ...props
|
|
|
7593
7387
|
ref: formField.registerRef
|
|
7594
7388
|
},
|
|
7595
7389
|
interactionStates: formFieldLayoutBag.interactionStates,
|
|
7390
|
+
touched: formField.touched,
|
|
7596
7391
|
other: {
|
|
7597
7392
|
updateValue: (value) => formField.store.setValue(name2, value, true)
|
|
7598
7393
|
}
|
|
7599
7394
|
}) });
|
|
7600
7395
|
};
|
|
7601
7396
|
|
|
7397
|
+
// src/utils/bagFunctions.ts
|
|
7398
|
+
var resolve = (bagFunctionOrValue, bag) => {
|
|
7399
|
+
if (typeof bagFunctionOrValue === "function") {
|
|
7400
|
+
return bagFunctionOrValue(bag);
|
|
7401
|
+
}
|
|
7402
|
+
return bagFunctionOrValue;
|
|
7403
|
+
};
|
|
7404
|
+
var BagFunctionUtil = {
|
|
7405
|
+
resolve
|
|
7406
|
+
};
|
|
7407
|
+
|
|
7408
|
+
// src/components/form/FormObserver.tsx
|
|
7409
|
+
var FormObserver = ({ children, formStore }) => {
|
|
7410
|
+
const formObserver = useFormObserver({ formStore });
|
|
7411
|
+
if (!formObserver) {
|
|
7412
|
+
throw new Error("<FormObserver> can only be used inside a <FormProvider>");
|
|
7413
|
+
}
|
|
7414
|
+
return BagFunctionUtil.resolve(children, formObserver);
|
|
7415
|
+
};
|
|
7416
|
+
var FormObserverKey = ({ children, formStore, key }) => {
|
|
7417
|
+
const formObserver = useFormObserverKey({ formStore, key });
|
|
7418
|
+
if (!formObserver) {
|
|
7419
|
+
throw new Error("<FormObserverKey> can only be used inside a <FormProvider>");
|
|
7420
|
+
}
|
|
7421
|
+
return BagFunctionUtil.resolve(children, formObserver);
|
|
7422
|
+
};
|
|
7423
|
+
|
|
7602
7424
|
// src/components/form/FormStore.ts
|
|
7603
7425
|
var FormStore = class {
|
|
7604
7426
|
constructor({
|
|
7605
7427
|
initialValues,
|
|
7606
7428
|
hasTriedSubmitting,
|
|
7607
7429
|
submittingTouchesAll = true,
|
|
7608
|
-
validators = {}
|
|
7609
|
-
validationBehaviour = "touched"
|
|
7430
|
+
validators = {}
|
|
7610
7431
|
}) {
|
|
7611
7432
|
this.hasTriedSubmitting = false;
|
|
7612
7433
|
this.errors = {};
|
|
@@ -7623,7 +7444,6 @@ var FormStore = class {
|
|
|
7623
7444
|
});
|
|
7624
7445
|
}
|
|
7625
7446
|
this.validators = validators;
|
|
7626
|
-
this.validationBehaviour = validationBehaviour;
|
|
7627
7447
|
this.validateAll();
|
|
7628
7448
|
}
|
|
7629
7449
|
// Values
|
|
@@ -7636,8 +7456,8 @@ var FormStore = class {
|
|
|
7636
7456
|
setValue(key, value, triggerUpdate = false) {
|
|
7637
7457
|
if (this.values[key] !== value) {
|
|
7638
7458
|
this.values[key] = value;
|
|
7639
|
-
this.validate(key);
|
|
7640
7459
|
this.notify({ type: "onChange", key, value, values: this.values });
|
|
7460
|
+
this.validate(key);
|
|
7641
7461
|
}
|
|
7642
7462
|
if (triggerUpdate) {
|
|
7643
7463
|
this.notify({
|
|
@@ -7669,10 +7489,12 @@ var FormStore = class {
|
|
|
7669
7489
|
getTouched(key) {
|
|
7670
7490
|
return !!this.touched[key];
|
|
7671
7491
|
}
|
|
7492
|
+
getAllTouched() {
|
|
7493
|
+
return { ...this.touched };
|
|
7494
|
+
}
|
|
7672
7495
|
setTouched(key, isTouched = true) {
|
|
7673
7496
|
if (this.touched[key] === isTouched) return;
|
|
7674
7497
|
this.touched[key] = isTouched;
|
|
7675
|
-
this.validate(key);
|
|
7676
7498
|
this.notify({ type: "onTouched", key, value: this.values[key], values: { ...this.values } });
|
|
7677
7499
|
}
|
|
7678
7500
|
// Error and Validation
|
|
@@ -7694,10 +7516,8 @@ var FormStore = class {
|
|
|
7694
7516
|
}
|
|
7695
7517
|
this.notify({ type: "onError", key, value: this.values[key], error, values: { ...this.values } });
|
|
7696
7518
|
}
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
this.validationBehaviour = validationBehaviour;
|
|
7700
|
-
this.validateAll();
|
|
7519
|
+
getHasTriedSubmitting() {
|
|
7520
|
+
return this.hasTriedSubmitting;
|
|
7701
7521
|
}
|
|
7702
7522
|
changeValidators(validators) {
|
|
7703
7523
|
this.validators = { ...this.validators, ...validators };
|
|
@@ -7705,8 +7525,7 @@ var FormStore = class {
|
|
|
7705
7525
|
}
|
|
7706
7526
|
validate(key) {
|
|
7707
7527
|
const validator = this.validators[key];
|
|
7708
|
-
|
|
7709
|
-
if (!validator || !shouldValidate) {
|
|
7528
|
+
if (!validator) {
|
|
7710
7529
|
this.setError(key, void 0);
|
|
7711
7530
|
return;
|
|
7712
7531
|
}
|
|
@@ -7744,7 +7563,6 @@ var FormStore = class {
|
|
|
7744
7563
|
if (this.submittingTouchesAll) {
|
|
7745
7564
|
Object.keys(this.initialValues).forEach((k) => {
|
|
7746
7565
|
this.touched[k] = true;
|
|
7747
|
-
this.validate(k);
|
|
7748
7566
|
});
|
|
7749
7567
|
}
|
|
7750
7568
|
const hasErrors = Object.keys(this.errors).length > 0;
|
|
@@ -7779,7 +7597,6 @@ function useCreateForm({
|
|
|
7779
7597
|
initialValues,
|
|
7780
7598
|
hasTriedSubmitting,
|
|
7781
7599
|
validators,
|
|
7782
|
-
validationBehaviour,
|
|
7783
7600
|
scrollToElements = true,
|
|
7784
7601
|
scrollOptions = { behavior: "smooth", block: "center" }
|
|
7785
7602
|
}) {
|
|
@@ -7787,13 +7604,9 @@ function useCreateForm({
|
|
|
7787
7604
|
new FormStore({
|
|
7788
7605
|
initialValues,
|
|
7789
7606
|
hasTriedSubmitting,
|
|
7790
|
-
validators
|
|
7791
|
-
validationBehaviour
|
|
7607
|
+
validators
|
|
7792
7608
|
})
|
|
7793
7609
|
);
|
|
7794
|
-
(0, import_react7.useEffect)(() => {
|
|
7795
|
-
storeRef.current.changeValidationBehavoir(validationBehaviour);
|
|
7796
|
-
}, [validationBehaviour]);
|
|
7797
7610
|
(0, import_react7.useEffect)(() => {
|
|
7798
7611
|
storeRef.current.changeValidators(validators);
|
|
7799
7612
|
}, [validators]);
|
|
@@ -7864,12 +7677,7 @@ function useCreateForm({
|
|
|
7864
7677
|
storeRef.current.setValues(updater);
|
|
7865
7678
|
}
|
|
7866
7679
|
},
|
|
7867
|
-
validateAll: () => storeRef.current.validateAll()
|
|
7868
|
-
getError: (key) => storeRef.current.getError(key),
|
|
7869
|
-
getErrors: () => storeRef.current.getErrors(),
|
|
7870
|
-
getIsValid: () => !storeRef.current.getHasError(),
|
|
7871
|
-
getValue: (key) => storeRef.current.getValue(key),
|
|
7872
|
-
getValues: () => storeRef.current.getAllValues()
|
|
7680
|
+
validateAll: () => storeRef.current.validateAll()
|
|
7873
7681
|
}), []);
|
|
7874
7682
|
return {
|
|
7875
7683
|
store: storeRef.current,
|
|
@@ -8162,9 +7970,142 @@ var AnchoredFloatingContainer = (0, import_react9.forwardRef)(function FloatingC
|
|
|
8162
7970
|
|
|
8163
7971
|
// src/components/layout/Carousel.tsx
|
|
8164
7972
|
var import_react14 = require("react");
|
|
8165
|
-
var
|
|
7973
|
+
var import_clsx6 = __toESM(require("clsx"));
|
|
8166
7974
|
var import_lucide_react3 = require("lucide-react");
|
|
8167
7975
|
|
|
7976
|
+
// src/utils/array.ts
|
|
7977
|
+
var equalSizeGroups = (array, groupSize) => {
|
|
7978
|
+
if (groupSize <= 0) {
|
|
7979
|
+
console.warn(`group size should be greater than 0: groupSize = ${groupSize}`);
|
|
7980
|
+
return [[...array]];
|
|
7981
|
+
}
|
|
7982
|
+
const groups = [];
|
|
7983
|
+
for (let i = 0; i < array.length; i += groupSize) {
|
|
7984
|
+
groups.push(array.slice(i, Math.min(i + groupSize, array.length)));
|
|
7985
|
+
}
|
|
7986
|
+
return groups;
|
|
7987
|
+
};
|
|
7988
|
+
var defaultRangeOptions = {
|
|
7989
|
+
allowEmptyRange: false,
|
|
7990
|
+
stepSize: 1,
|
|
7991
|
+
exclusiveStart: false,
|
|
7992
|
+
exclusiveEnd: true
|
|
7993
|
+
};
|
|
7994
|
+
var range = (endOrRange, options) => {
|
|
7995
|
+
const { allowEmptyRange, stepSize, exclusiveStart, exclusiveEnd } = { ...defaultRangeOptions, ...options };
|
|
7996
|
+
let start = 0;
|
|
7997
|
+
let end;
|
|
7998
|
+
if (typeof endOrRange === "number") {
|
|
7999
|
+
end = endOrRange;
|
|
8000
|
+
} else {
|
|
8001
|
+
start = endOrRange[0];
|
|
8002
|
+
end = endOrRange[1];
|
|
8003
|
+
}
|
|
8004
|
+
if (!exclusiveEnd) {
|
|
8005
|
+
end -= 1;
|
|
8006
|
+
}
|
|
8007
|
+
if (exclusiveStart) {
|
|
8008
|
+
start += 1;
|
|
8009
|
+
}
|
|
8010
|
+
if (end - 1 < start) {
|
|
8011
|
+
if (!allowEmptyRange) {
|
|
8012
|
+
console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set options.allowEmptyRange to true`);
|
|
8013
|
+
}
|
|
8014
|
+
return [];
|
|
8015
|
+
}
|
|
8016
|
+
return Array.from({ length: end - start }, (_, index) => index * stepSize + start);
|
|
8017
|
+
};
|
|
8018
|
+
var closestMatch = (list, firstCloser) => {
|
|
8019
|
+
return list.reduce((item1, item2) => {
|
|
8020
|
+
return firstCloser(item1, item2) ? item1 : item2;
|
|
8021
|
+
});
|
|
8022
|
+
};
|
|
8023
|
+
var getNeighbours = (list, item, neighbourDistance = 2) => {
|
|
8024
|
+
const index = list.indexOf(item);
|
|
8025
|
+
const totalItems = neighbourDistance * 2 + 1;
|
|
8026
|
+
if (list.length < totalItems) {
|
|
8027
|
+
console.warn("List is to short");
|
|
8028
|
+
return list;
|
|
8029
|
+
}
|
|
8030
|
+
if (index === -1) {
|
|
8031
|
+
console.error("item not found in list");
|
|
8032
|
+
return list.splice(0, totalItems);
|
|
8033
|
+
}
|
|
8034
|
+
let start = index - neighbourDistance;
|
|
8035
|
+
if (start < 0) {
|
|
8036
|
+
start += list.length;
|
|
8037
|
+
}
|
|
8038
|
+
const end = (index + neighbourDistance + 1) % list.length;
|
|
8039
|
+
const result = [];
|
|
8040
|
+
let ignoreOnce = list.length === totalItems;
|
|
8041
|
+
for (let i = start; i !== end || ignoreOnce; i = (i + 1) % list.length) {
|
|
8042
|
+
result.push(list[i]);
|
|
8043
|
+
if (end === i && ignoreOnce) {
|
|
8044
|
+
ignoreOnce = false;
|
|
8045
|
+
}
|
|
8046
|
+
}
|
|
8047
|
+
return result;
|
|
8048
|
+
};
|
|
8049
|
+
var createLoopingListWithIndex = (list, startIndex = 0, length = 0, forwards = true) => {
|
|
8050
|
+
if (length < 0) {
|
|
8051
|
+
console.warn(`createLoopingList: length must be >= 0, given ${length}`);
|
|
8052
|
+
} else if (length === 0) {
|
|
8053
|
+
length = list.length;
|
|
8054
|
+
}
|
|
8055
|
+
const returnList = [];
|
|
8056
|
+
if (forwards) {
|
|
8057
|
+
for (let i = startIndex; returnList.length < length; i = (i + 1) % list.length) {
|
|
8058
|
+
returnList.push([i, list[i]]);
|
|
8059
|
+
}
|
|
8060
|
+
} else {
|
|
8061
|
+
for (let i = startIndex; returnList.length < length; i = i === 0 ? i = list.length - 1 : i - 1) {
|
|
8062
|
+
returnList.push([i, list[i]]);
|
|
8063
|
+
}
|
|
8064
|
+
}
|
|
8065
|
+
return returnList;
|
|
8066
|
+
};
|
|
8067
|
+
var createLoopingList = (list, startIndex = 0, length = 0, forwards = true) => {
|
|
8068
|
+
return createLoopingListWithIndex(list, startIndex, length, forwards).map(([_, item]) => item);
|
|
8069
|
+
};
|
|
8070
|
+
var moveItems = (list, move = 0) => {
|
|
8071
|
+
const result = [];
|
|
8072
|
+
let start = move;
|
|
8073
|
+
if (start < 0) {
|
|
8074
|
+
start = list.length - move;
|
|
8075
|
+
}
|
|
8076
|
+
start = start % list.length;
|
|
8077
|
+
for (let i = 0; i < list.length; i++) {
|
|
8078
|
+
result[i] = list[(i + start) % list.length];
|
|
8079
|
+
}
|
|
8080
|
+
return result;
|
|
8081
|
+
};
|
|
8082
|
+
function resolveSingleOrArray(value) {
|
|
8083
|
+
if (Array.isArray(value)) {
|
|
8084
|
+
return value;
|
|
8085
|
+
} else if (value) {
|
|
8086
|
+
return [value];
|
|
8087
|
+
}
|
|
8088
|
+
return [];
|
|
8089
|
+
}
|
|
8090
|
+
var ArrayUtil = {
|
|
8091
|
+
unique: (list) => {
|
|
8092
|
+
const seen = /* @__PURE__ */ new Set();
|
|
8093
|
+
return list.filter((item) => {
|
|
8094
|
+
if (seen.has(item)) {
|
|
8095
|
+
return false;
|
|
8096
|
+
}
|
|
8097
|
+
seen.add(item);
|
|
8098
|
+
return true;
|
|
8099
|
+
});
|
|
8100
|
+
},
|
|
8101
|
+
difference: (list, removeList) => {
|
|
8102
|
+
const remove = new Set(removeList);
|
|
8103
|
+
return list.filter((item) => !remove.has(item));
|
|
8104
|
+
},
|
|
8105
|
+
moveItems,
|
|
8106
|
+
resolveSingleOrArray
|
|
8107
|
+
};
|
|
8108
|
+
|
|
8168
8109
|
// src/global-contexts/LocaleContext.tsx
|
|
8169
8110
|
var import_react12 = require("react");
|
|
8170
8111
|
|
|
@@ -9078,7 +9019,7 @@ function CarouselTabs({
|
|
|
9078
9019
|
},
|
|
9079
9020
|
onClick: () => onChange(index),
|
|
9080
9021
|
onKeyDown: (e) => handleKeyDown(e, index),
|
|
9081
|
-
className: (0,
|
|
9022
|
+
className: (0, import_clsx6.default)(
|
|
9082
9023
|
"w-8 min-w-8 h-3 min-h-3 first:rounded-l-md last:rounded-r-md",
|
|
9083
9024
|
{
|
|
9084
9025
|
"bg-carousel-dot-disabled hover:bg-carousel-dot-active": currentIndex !== index,
|
|
@@ -9113,7 +9054,7 @@ var CarouselSlide = (0, import_react14.forwardRef)(
|
|
|
9113
9054
|
...props,
|
|
9114
9055
|
ref,
|
|
9115
9056
|
id: `${id}-slide-${index}`,
|
|
9116
|
-
className: (0,
|
|
9057
|
+
className: (0, import_clsx6.default)("focus-style-none group/slide", props.className),
|
|
9117
9058
|
tabIndex: isSelected ? 0 : void 0,
|
|
9118
9059
|
role: "group",
|
|
9119
9060
|
"aria-roledescription": translation("slide"),
|
|
@@ -9262,7 +9203,7 @@ var Carousel = ({
|
|
|
9262
9203
|
{
|
|
9263
9204
|
ref: carouselContainerRef,
|
|
9264
9205
|
...props,
|
|
9265
|
-
className: (0,
|
|
9206
|
+
className: (0, import_clsx6.default)("flex-col-2 items-center w-full", props.className),
|
|
9266
9207
|
id,
|
|
9267
9208
|
role: "region",
|
|
9268
9209
|
"aria-roledescription": translation("slide"),
|
|
@@ -9271,7 +9212,7 @@ var Carousel = ({
|
|
|
9271
9212
|
"div",
|
|
9272
9213
|
{
|
|
9273
9214
|
...slideContainerProps,
|
|
9274
|
-
className: (0,
|
|
9215
|
+
className: (0, import_clsx6.default)(`relative w-full overflow-hidden`, heightClassName, slideContainerProps?.className),
|
|
9275
9216
|
children: [
|
|
9276
9217
|
hintNext ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
9277
9218
|
"div",
|
|
@@ -9280,7 +9221,7 @@ var Carousel = ({
|
|
|
9280
9221
|
onPointerMove: handlePointerMove,
|
|
9281
9222
|
onPointerUp: handlePointerUp,
|
|
9282
9223
|
onPointerLeave: handlePointerUp,
|
|
9283
|
-
className: (0,
|
|
9224
|
+
className: (0, import_clsx6.default)(`flex-row-2 relative h-full`, heightClassName),
|
|
9284
9225
|
children: [
|
|
9285
9226
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "flex-row-2 relative h-full w-full px-2 overflow-hidden", children: items.map(({
|
|
9286
9227
|
item,
|
|
@@ -9293,7 +9234,7 @@ var Carousel = ({
|
|
|
9293
9234
|
ref: isInItems ? slideRefs[index] : void 0,
|
|
9294
9235
|
index,
|
|
9295
9236
|
isSelected: isInItems && currentIndex === index,
|
|
9296
|
-
className: (0,
|
|
9237
|
+
className: (0, import_clsx6.default)(
|
|
9297
9238
|
`absolute left-[50%] h-full overflow-hidden transition-transform ease-in-out`,
|
|
9298
9239
|
slideClassName
|
|
9299
9240
|
),
|
|
@@ -9310,13 +9251,13 @@ var Carousel = ({
|
|
|
9310
9251
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
9311
9252
|
"div",
|
|
9312
9253
|
{
|
|
9313
|
-
className: (0,
|
|
9254
|
+
className: (0, import_clsx6.default)(`hidden desktop:block pointer-events-none absolute left-0 h-full w-[20%] bg-gradient-to-r to-transparent`, blurColor)
|
|
9314
9255
|
}
|
|
9315
9256
|
),
|
|
9316
9257
|
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
9317
9258
|
"div",
|
|
9318
9259
|
{
|
|
9319
|
-
className: (0,
|
|
9260
|
+
className: (0, import_clsx6.default)(`hidden desktop:block pointer-events-none absolute right-0 h-full w-[20%] bg-gradient-to-l to-transparent`, blurColor)
|
|
9320
9261
|
}
|
|
9321
9262
|
)
|
|
9322
9263
|
]
|
|
@@ -9325,7 +9266,7 @@ var Carousel = ({
|
|
|
9325
9266
|
"div",
|
|
9326
9267
|
{
|
|
9327
9268
|
ref: slideRefs[currentIndex],
|
|
9328
|
-
className: (0,
|
|
9269
|
+
className: (0, import_clsx6.default)("px-16 h-full"),
|
|
9329
9270
|
tabIndex: 0,
|
|
9330
9271
|
role: "group",
|
|
9331
9272
|
"aria-roledescription": translation("slide"),
|
|
@@ -9342,7 +9283,7 @@ var Carousel = ({
|
|
|
9342
9283
|
{
|
|
9343
9284
|
layout: "icon",
|
|
9344
9285
|
color: "neutral",
|
|
9345
|
-
className: (0,
|
|
9286
|
+
className: (0, import_clsx6.default)("absolute z-10 left-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoLeft() }),
|
|
9346
9287
|
disabled: !canGoLeft(),
|
|
9347
9288
|
onClick: () => left(),
|
|
9348
9289
|
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react3.ChevronLeft, { size: 24 })
|
|
@@ -9353,7 +9294,7 @@ var Carousel = ({
|
|
|
9353
9294
|
{
|
|
9354
9295
|
layout: "icon",
|
|
9355
9296
|
color: "neutral",
|
|
9356
|
-
className: (0,
|
|
9297
|
+
className: (0, import_clsx6.default)("absolute z-10 right-2 top-1/2 -translate-y-1/2 shadow-md", { hidden: !canGoRight() }),
|
|
9357
9298
|
disabled: !canGoRight(),
|
|
9358
9299
|
onClick: () => right(),
|
|
9359
9300
|
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_lucide_react3.ChevronRight, { size: 24 })
|
|
@@ -9370,7 +9311,7 @@ var Carousel = ({
|
|
|
9370
9311
|
};
|
|
9371
9312
|
|
|
9372
9313
|
// src/components/layout/DividerInserter.tsx
|
|
9373
|
-
var
|
|
9314
|
+
var import_clsx7 = __toESM(require("clsx"));
|
|
9374
9315
|
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
9375
9316
|
var DividerInserter = ({
|
|
9376
9317
|
children,
|
|
@@ -9388,7 +9329,7 @@ var DividerInserter = ({
|
|
|
9388
9329
|
}
|
|
9389
9330
|
}
|
|
9390
9331
|
}
|
|
9391
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0,
|
|
9332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: (0, import_clsx7.default)(className), ...restProps, children: nodes });
|
|
9392
9333
|
};
|
|
9393
9334
|
|
|
9394
9335
|
// src/hooks/focus/useFocusTrap.ts
|
|
@@ -9795,6 +9736,142 @@ var useTransitionState = ({
|
|
|
9795
9736
|
};
|
|
9796
9737
|
};
|
|
9797
9738
|
|
|
9739
|
+
// src/utils/propsUtil.ts
|
|
9740
|
+
function bool(isActive) {
|
|
9741
|
+
return isActive ? "" : void 0;
|
|
9742
|
+
}
|
|
9743
|
+
function name(name2, props = {}) {
|
|
9744
|
+
return props["data-name"] ? String(props["data-name"]) : name2;
|
|
9745
|
+
}
|
|
9746
|
+
function interactionStatesData(interactionStates) {
|
|
9747
|
+
return {
|
|
9748
|
+
"data-disabled": bool(!!interactionStates.disabled),
|
|
9749
|
+
"data-invalid": bool(!!interactionStates.invalid),
|
|
9750
|
+
"data-readonly": bool(!!interactionStates.readOnly),
|
|
9751
|
+
"data-required": bool(!!interactionStates.required)
|
|
9752
|
+
};
|
|
9753
|
+
}
|
|
9754
|
+
var dataAttributes = {
|
|
9755
|
+
bool,
|
|
9756
|
+
name,
|
|
9757
|
+
interactionStates: interactionStatesData
|
|
9758
|
+
};
|
|
9759
|
+
function mouseEventExtender({
|
|
9760
|
+
fromProps,
|
|
9761
|
+
extensions
|
|
9762
|
+
}) {
|
|
9763
|
+
return (event) => {
|
|
9764
|
+
fromProps?.(event);
|
|
9765
|
+
ArrayUtil.resolveSingleOrArray(extensions).forEach((element) => element(event));
|
|
9766
|
+
};
|
|
9767
|
+
}
|
|
9768
|
+
function keyboardEventExtender({
|
|
9769
|
+
fromProps,
|
|
9770
|
+
extensions
|
|
9771
|
+
}) {
|
|
9772
|
+
return (event) => {
|
|
9773
|
+
fromProps?.(event);
|
|
9774
|
+
ArrayUtil.resolveSingleOrArray(extensions).forEach((element) => element(event));
|
|
9775
|
+
};
|
|
9776
|
+
}
|
|
9777
|
+
var extender = {
|
|
9778
|
+
mouseEvent: mouseEventExtender,
|
|
9779
|
+
keyboardEvent: keyboardEventExtender
|
|
9780
|
+
};
|
|
9781
|
+
function click(onClick) {
|
|
9782
|
+
const keyboardEventHandler = (event) => {
|
|
9783
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
9784
|
+
event.preventDefault();
|
|
9785
|
+
event.stopPropagation();
|
|
9786
|
+
onClick();
|
|
9787
|
+
}
|
|
9788
|
+
};
|
|
9789
|
+
return {
|
|
9790
|
+
onClick,
|
|
9791
|
+
onKeyDown: keyboardEventHandler
|
|
9792
|
+
};
|
|
9793
|
+
}
|
|
9794
|
+
function close2(onClose) {
|
|
9795
|
+
return (event) => {
|
|
9796
|
+
if (event.key === "Escape") {
|
|
9797
|
+
event.preventDefault();
|
|
9798
|
+
event.stopPropagation();
|
|
9799
|
+
onClose?.();
|
|
9800
|
+
}
|
|
9801
|
+
};
|
|
9802
|
+
}
|
|
9803
|
+
function navigate({
|
|
9804
|
+
left,
|
|
9805
|
+
right,
|
|
9806
|
+
up: up2,
|
|
9807
|
+
down: down2
|
|
9808
|
+
}) {
|
|
9809
|
+
return (event) => {
|
|
9810
|
+
switch (event.key) {
|
|
9811
|
+
case "ArrowLeft":
|
|
9812
|
+
left(event);
|
|
9813
|
+
event.preventDefault();
|
|
9814
|
+
event.stopPropagation();
|
|
9815
|
+
break;
|
|
9816
|
+
case "ArrowRight":
|
|
9817
|
+
right(event);
|
|
9818
|
+
event.preventDefault();
|
|
9819
|
+
event.stopPropagation();
|
|
9820
|
+
break;
|
|
9821
|
+
case "ArrowUp":
|
|
9822
|
+
up2(event);
|
|
9823
|
+
event.preventDefault();
|
|
9824
|
+
event.stopPropagation();
|
|
9825
|
+
break;
|
|
9826
|
+
case "ArrowDown":
|
|
9827
|
+
down2(event);
|
|
9828
|
+
event.preventDefault();
|
|
9829
|
+
event.stopPropagation();
|
|
9830
|
+
break;
|
|
9831
|
+
}
|
|
9832
|
+
};
|
|
9833
|
+
}
|
|
9834
|
+
function mergeProps(slotProps, childProps) {
|
|
9835
|
+
const result = { ...childProps };
|
|
9836
|
+
for (const key in slotProps) {
|
|
9837
|
+
const slotValue = slotProps[key];
|
|
9838
|
+
const childValue = childProps[key];
|
|
9839
|
+
if (key === "className") {
|
|
9840
|
+
result.className = [slotValue, childValue].filter(Boolean).join(" ");
|
|
9841
|
+
} else if (key === "style") {
|
|
9842
|
+
result.style = { ...slotValue, ...childValue };
|
|
9843
|
+
} else if (key.startsWith("on") && typeof slotValue === "function" && typeof childValue === "function") {
|
|
9844
|
+
result[key] = (...args) => {
|
|
9845
|
+
slotValue(...args);
|
|
9846
|
+
childValue(...args);
|
|
9847
|
+
};
|
|
9848
|
+
} else {
|
|
9849
|
+
result[key] = childValue ?? slotValue;
|
|
9850
|
+
}
|
|
9851
|
+
}
|
|
9852
|
+
return result;
|
|
9853
|
+
}
|
|
9854
|
+
function interactionStatesAria(interactionStates, props = {}) {
|
|
9855
|
+
return {
|
|
9856
|
+
"aria-disabled": props["aria-disabled"] ?? interactionStates.disabled,
|
|
9857
|
+
"aria-invalid": props["aria-invalid"] ?? interactionStates.invalid,
|
|
9858
|
+
"aria-readonly": props["aria-readonly"] ?? interactionStates.readOnly,
|
|
9859
|
+
"aria-required": props["aria-required"] ?? interactionStates.required
|
|
9860
|
+
};
|
|
9861
|
+
}
|
|
9862
|
+
var aria = {
|
|
9863
|
+
close: close2,
|
|
9864
|
+
click,
|
|
9865
|
+
navigate,
|
|
9866
|
+
interactionStates: interactionStatesAria
|
|
9867
|
+
};
|
|
9868
|
+
var PropsUtil = {
|
|
9869
|
+
extender,
|
|
9870
|
+
dataAttributes,
|
|
9871
|
+
aria,
|
|
9872
|
+
mergeProps
|
|
9873
|
+
};
|
|
9874
|
+
|
|
9798
9875
|
// src/components/layout/Drawer.tsx
|
|
9799
9876
|
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
9800
9877
|
var Drawer = (0, import_react18.forwardRef)(function Drawer2({
|
|
@@ -9903,7 +9980,7 @@ var Drawer = (0, import_react18.forwardRef)(function Drawer2({
|
|
|
9903
9980
|
var import_react20 = require("react");
|
|
9904
9981
|
var import_react21 = require("react");
|
|
9905
9982
|
var import_react22 = require("react");
|
|
9906
|
-
var
|
|
9983
|
+
var import_clsx8 = __toESM(require("clsx"));
|
|
9907
9984
|
|
|
9908
9985
|
// src/hooks/useOverwritableState.ts
|
|
9909
9986
|
var import_react19 = require("react");
|
|
@@ -10069,7 +10146,7 @@ var Expandable = (0, import_react22.forwardRef)(function Expandable2({
|
|
|
10069
10146
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ExpandableContext.Consumer, { children: (ctx) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
10070
10147
|
ExpandableContent,
|
|
10071
10148
|
{
|
|
10072
|
-
className: (0,
|
|
10149
|
+
className: (0, import_clsx8.default)(contentClassName, { [contentExpandedClassName ?? ""]: !!ctx?.isExpanded }),
|
|
10073
10150
|
children
|
|
10074
10151
|
}
|
|
10075
10152
|
) })
|
|
@@ -10114,7 +10191,7 @@ var FAQSection = ({
|
|
|
10114
10191
|
|
|
10115
10192
|
// src/components/layout/InifiniteScroll.tsx
|
|
10116
10193
|
var import_react23 = require("react");
|
|
10117
|
-
var
|
|
10194
|
+
var import_clsx9 = __toESM(require("clsx"));
|
|
10118
10195
|
var import_lucide_react5 = require("lucide-react");
|
|
10119
10196
|
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
10120
10197
|
function InfiniteScroll({
|
|
@@ -10191,7 +10268,7 @@ function InfiniteScroll({
|
|
|
10191
10268
|
{
|
|
10192
10269
|
ref: containerRef,
|
|
10193
10270
|
onScroll: isUsingInfiteScroll ? handleScroll : void 0,
|
|
10194
|
-
className: (0,
|
|
10271
|
+
className: (0, import_clsx9.default)("overflow-y-auto", className),
|
|
10195
10272
|
style,
|
|
10196
10273
|
children: [
|
|
10197
10274
|
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Visibility, { isVisible: windowState.start > 0, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(Button, { color: "neutral", onClick: () => addToStart(), children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_lucide_react5.ChevronUp, {}) }) }),
|
|
@@ -10204,7 +10281,7 @@ function InfiniteScroll({
|
|
|
10204
10281
|
|
|
10205
10282
|
// src/components/layout/ListBox.tsx
|
|
10206
10283
|
var import_react24 = __toESM(require("react"));
|
|
10207
|
-
var
|
|
10284
|
+
var import_clsx10 = require("clsx");
|
|
10208
10285
|
|
|
10209
10286
|
// src/utils/match.ts
|
|
10210
10287
|
var match = (key, values) => {
|
|
@@ -10254,7 +10331,7 @@ var ListBoxItem = (0, import_react24.forwardRef)(
|
|
|
10254
10331
|
"data-highlighted": isHighlighted ? "" : void 0,
|
|
10255
10332
|
"data-selected": selected ? "" : void 0,
|
|
10256
10333
|
"data-disabled": disabled ? "" : void 0,
|
|
10257
|
-
className: (0,
|
|
10334
|
+
className: (0, import_clsx10.clsx)(
|
|
10258
10335
|
"flex-row-1 items-center px-2 py-1 rounded-md",
|
|
10259
10336
|
"data-highlighted:bg-primary/20",
|
|
10260
10337
|
"data-disabled:text-disabled data-disabled:cursor-not-allowed",
|
|
@@ -10869,7 +10946,7 @@ function TabPanel({ label, ...props }) {
|
|
|
10869
10946
|
}
|
|
10870
10947
|
|
|
10871
10948
|
// src/components/layout/TextImage.tsx
|
|
10872
|
-
var
|
|
10949
|
+
var import_clsx11 = __toESM(require("clsx"));
|
|
10873
10950
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
10874
10951
|
var TextImage = ({
|
|
10875
10952
|
title,
|
|
@@ -10895,7 +10972,7 @@ var TextImage = ({
|
|
|
10895
10972
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
10896
10973
|
"div",
|
|
10897
10974
|
{
|
|
10898
|
-
className: (0,
|
|
10975
|
+
className: (0, import_clsx11.default)("rounded-2xl w-full", className),
|
|
10899
10976
|
style: {
|
|
10900
10977
|
backgroundImage: `url(${imageUrl})`,
|
|
10901
10978
|
backgroundSize: "cover"
|
|
@@ -10903,9 +10980,9 @@ var TextImage = ({
|
|
|
10903
10980
|
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
10904
10981
|
"div",
|
|
10905
10982
|
{
|
|
10906
|
-
className: (0,
|
|
10983
|
+
className: (0, import_clsx11.default)(`flex-col-2 px-6 py-12 rounded-2xl h-full`, colorMapping[color], contentClassName),
|
|
10907
10984
|
children: [
|
|
10908
|
-
badge && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: (0,
|
|
10985
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: (0, import_clsx11.default)(`chip-full mb-2 py-2 px-4 w-fit`, chipColorMapping[color]), children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-lg font-bold", children: badge }) }),
|
|
10909
10986
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "flex-col-1 overflow-hidden", children: [
|
|
10910
10987
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "typography-title-lg", children: title }),
|
|
10911
10988
|
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "text-ellipsis overflow-hidden", children: description })
|
|
@@ -11016,7 +11093,7 @@ var Portal = ({ children, container }) => {
|
|
|
11016
11093
|
};
|
|
11017
11094
|
|
|
11018
11095
|
// src/components/layout/dialog/Dialog.tsx
|
|
11019
|
-
var
|
|
11096
|
+
var import_clsx12 = __toESM(require("clsx"));
|
|
11020
11097
|
|
|
11021
11098
|
// src/components/utils/FocusTrap.tsx
|
|
11022
11099
|
var import_react28 = require("react");
|
|
@@ -11128,7 +11205,7 @@ var Dialog = (0, import_react33.forwardRef)(function Dialog2({
|
|
|
11128
11205
|
ref: containerRef,
|
|
11129
11206
|
id: ids.container,
|
|
11130
11207
|
"data-open": PropsUtil.dataAttributes.bool(isOpen),
|
|
11131
|
-
className: (0,
|
|
11208
|
+
className: (0, import_clsx12.default)("dialog-container", containerClassName),
|
|
11132
11209
|
style: { zIndex },
|
|
11133
11210
|
children: [
|
|
11134
11211
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
@@ -11138,7 +11215,7 @@ var Dialog = (0, import_react33.forwardRef)(function Dialog2({
|
|
|
11138
11215
|
onClick: onCloseWrapper,
|
|
11139
11216
|
"data-state": transitionState,
|
|
11140
11217
|
"aria-hidden": true,
|
|
11141
|
-
className: (0,
|
|
11218
|
+
className: (0, import_clsx12.default)("dialog-background", backgroundClassName)
|
|
11142
11219
|
}
|
|
11143
11220
|
),
|
|
11144
11221
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FocusTrap, { active: isPresent && isOpen, container: ref, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
@@ -11154,7 +11231,7 @@ var Dialog = (0, import_react33.forwardRef)(function Dialog2({
|
|
|
11154
11231
|
"aria-modal": isModal,
|
|
11155
11232
|
"aria-labelledby": ids.title,
|
|
11156
11233
|
"aria-describedby": hasDescription ? ids.description : void 0,
|
|
11157
|
-
className: (0,
|
|
11234
|
+
className: (0, import_clsx12.default)("dialog-content", props.className),
|
|
11158
11235
|
children: [
|
|
11159
11236
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "typography-title-lg mr-8", children: titleElement }),
|
|
11160
11237
|
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Visibility, { isVisible: hasDescription, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: "text-description", children: description }) }),
|
|
@@ -11190,19 +11267,6 @@ var Dialog = (0, import_react33.forwardRef)(function Dialog2({
|
|
|
11190
11267
|
|
|
11191
11268
|
// src/components/layout/dialog/DialogOpener.tsx
|
|
11192
11269
|
var import_react34 = require("react");
|
|
11193
|
-
|
|
11194
|
-
// src/utils/bagFunctions.ts
|
|
11195
|
-
var resolve = (bagFunctionOrValue, bag) => {
|
|
11196
|
-
if (typeof bagFunctionOrValue === "function") {
|
|
11197
|
-
return bagFunctionOrValue(bag);
|
|
11198
|
-
}
|
|
11199
|
-
return bagFunctionOrValue;
|
|
11200
|
-
};
|
|
11201
|
-
var BagFunctionUtil = {
|
|
11202
|
-
resolve
|
|
11203
|
-
};
|
|
11204
|
-
|
|
11205
|
-
// src/components/layout/dialog/DialogOpener.tsx
|
|
11206
11270
|
function DialogOpenerWrapper({ children }) {
|
|
11207
11271
|
const context = useDialogContext();
|
|
11208
11272
|
const bag = (0, import_react34.useMemo)(() => ({
|
|
@@ -11262,7 +11326,7 @@ function DialogRoot({
|
|
|
11262
11326
|
}
|
|
11263
11327
|
|
|
11264
11328
|
// src/components/layout/dialog/premade/ConfirmDialog.tsx
|
|
11265
|
-
var
|
|
11329
|
+
var import_clsx13 = __toESM(require("clsx"));
|
|
11266
11330
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
11267
11331
|
var ConfirmDialog = ({
|
|
11268
11332
|
children,
|
|
@@ -11281,7 +11345,7 @@ var ConfirmDialog = ({
|
|
|
11281
11345
|
positive: "positive",
|
|
11282
11346
|
primary: "primary"
|
|
11283
11347
|
};
|
|
11284
|
-
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Dialog, { ...restProps, onClose: onCancel, className: (0,
|
|
11348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(Dialog, { ...restProps, onClose: onCancel, className: (0, import_clsx13.default)("justify-between", className), children: [
|
|
11285
11349
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "flex-col-2 grow", children }),
|
|
11286
11350
|
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
|
|
11287
11351
|
onCancel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
@@ -11789,12 +11853,12 @@ var MultiSelectRoot = ({ value, onValueChange, onEditComplete, ...props }) => {
|
|
|
11789
11853
|
|
|
11790
11854
|
// src/components/user-interaction/select/SelectComponents.tsx
|
|
11791
11855
|
var import_react43 = require("react");
|
|
11792
|
-
var
|
|
11856
|
+
var import_clsx15 = __toESM(require("clsx"));
|
|
11793
11857
|
var import_lucide_react7 = require("lucide-react");
|
|
11794
11858
|
|
|
11795
11859
|
// src/components/layout/popup/PopUp.tsx
|
|
11796
11860
|
var import_react42 = require("react");
|
|
11797
|
-
var
|
|
11861
|
+
var import_clsx14 = require("clsx");
|
|
11798
11862
|
|
|
11799
11863
|
// src/hooks/useOutsideClick.ts
|
|
11800
11864
|
var import_react40 = require("react");
|
|
@@ -11884,7 +11948,7 @@ var PopUp = (0, import_react42.forwardRef)(function PopUp2({
|
|
|
11884
11948
|
transition: `top ${props.options?.pollingInterval ?? 100}ms linear, left ${props.options?.pollingInterval ?? 100}ms linear`,
|
|
11885
11949
|
...props.style
|
|
11886
11950
|
},
|
|
11887
|
-
className: (0,
|
|
11951
|
+
className: (0, import_clsx14.clsx)("pop-up", props.className),
|
|
11888
11952
|
children
|
|
11889
11953
|
}
|
|
11890
11954
|
) }) }) });
|
|
@@ -11926,7 +11990,7 @@ var SelectOption = (0, import_react43.forwardRef)(
|
|
|
11926
11990
|
"data-highlighted": isHighlighted ? "" : void 0,
|
|
11927
11991
|
"data-selected": isSelected ? "" : void 0,
|
|
11928
11992
|
"data-disabled": disabled ? "" : void 0,
|
|
11929
|
-
className: (0,
|
|
11993
|
+
className: (0, import_clsx15.default)(
|
|
11930
11994
|
"flex-row-1 items-center px-2 py-1 rounded-md",
|
|
11931
11995
|
"data-highlighted:bg-primary/20",
|
|
11932
11996
|
"data-disabled:text-disabled data-disabled:cursor-not-allowed",
|
|
@@ -11952,7 +12016,7 @@ var SelectOption = (0, import_react43.forwardRef)(
|
|
|
11952
12016
|
iconAppearance === "left" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
11953
12017
|
import_lucide_react7.CheckIcon,
|
|
11954
12018
|
{
|
|
11955
|
-
className: (0,
|
|
12019
|
+
className: (0, import_clsx15.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
11956
12020
|
"aria-hidden": true
|
|
11957
12021
|
}
|
|
11958
12022
|
),
|
|
@@ -11960,7 +12024,7 @@ var SelectOption = (0, import_react43.forwardRef)(
|
|
|
11960
12024
|
iconAppearance === "right" && (state.value.length > 0 || config.isMultiSelect) && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
11961
12025
|
import_lucide_react7.CheckIcon,
|
|
11962
12026
|
{
|
|
11963
|
-
className: (0,
|
|
12027
|
+
className: (0, import_clsx15.default)("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
11964
12028
|
"aria-hidden": true
|
|
11965
12029
|
}
|
|
11966
12030
|
)
|
|
@@ -12032,7 +12096,7 @@ var SelectButton = (0, import_react43.forwardRef)(function SelectButton2({
|
|
|
12032
12096
|
"aria-expanded": state.isOpen,
|
|
12033
12097
|
"aria-controls": state.isOpen ? ids.content : void 0,
|
|
12034
12098
|
children: [
|
|
12035
|
-
hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: (0,
|
|
12099
|
+
hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: (0, import_clsx15.default)("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("span", { className: "flex-row-0", children: [
|
|
12036
12100
|
label,
|
|
12037
12101
|
index < state.value.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { children: "," })
|
|
12038
12102
|
] }, value)) }) : placeholder ?? translation("clickToSelect"),
|
|
@@ -12104,7 +12168,7 @@ var SelectContent = (0, import_react43.forwardRef)(function SelectContent2({
|
|
|
12104
12168
|
break;
|
|
12105
12169
|
}
|
|
12106
12170
|
},
|
|
12107
|
-
className: (0,
|
|
12171
|
+
className: (0, import_clsx15.default)("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-outline-within overflow-auto", props.className),
|
|
12108
12172
|
role: "listbox",
|
|
12109
12173
|
"aria-multiselectable": config.isMultiSelect,
|
|
12110
12174
|
"aria-orientation": "vertical",
|
|
@@ -12197,7 +12261,7 @@ var LanguageDialog = ({
|
|
|
12197
12261
|
|
|
12198
12262
|
// src/components/layout/dialog/premade/ThemeDialog.tsx
|
|
12199
12263
|
var import_lucide_react8 = require("lucide-react");
|
|
12200
|
-
var
|
|
12264
|
+
var import_clsx16 = __toESM(require("clsx"));
|
|
12201
12265
|
|
|
12202
12266
|
// src/global-contexts/ThemeContext.tsx
|
|
12203
12267
|
var import_react45 = require("react");
|
|
@@ -12288,11 +12352,11 @@ var useTheme = () => {
|
|
|
12288
12352
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
12289
12353
|
var ThemeIcon = ({ theme, className }) => {
|
|
12290
12354
|
if (theme === "dark") {
|
|
12291
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react8.MoonIcon, { className: (0,
|
|
12355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react8.MoonIcon, { className: (0, import_clsx16.default)("w-4 h-4", className) });
|
|
12292
12356
|
} else if (theme === "light") {
|
|
12293
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react8.SunIcon, { className: (0,
|
|
12357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react8.SunIcon, { className: (0, import_clsx16.default)("w-4 h-4", className) });
|
|
12294
12358
|
} else {
|
|
12295
|
-
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react8.MonitorCog, { className: (0,
|
|
12359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react8.MonitorCog, { className: (0, import_clsx16.default)("w-4 h-4", className) });
|
|
12296
12360
|
}
|
|
12297
12361
|
};
|
|
12298
12362
|
var ThemeDialog = ({
|
|
@@ -12338,14 +12402,14 @@ var ThemeDialog = ({
|
|
|
12338
12402
|
|
|
12339
12403
|
// src/components/layout/loading/ErrorComponent.tsx
|
|
12340
12404
|
var import_lucide_react9 = require("lucide-react");
|
|
12341
|
-
var
|
|
12405
|
+
var import_clsx17 = __toESM(require("clsx"));
|
|
12342
12406
|
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
12343
12407
|
var ErrorComponent = ({
|
|
12344
12408
|
errorText,
|
|
12345
12409
|
classname
|
|
12346
12410
|
}) => {
|
|
12347
12411
|
const translation = useHightideTranslation();
|
|
12348
|
-
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: (0,
|
|
12412
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", { className: (0, import_clsx17.default)("flex-col-4 items-center justify-center w-full h-24", classname), children: [
|
|
12349
12413
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_lucide_react9.AlertOctagon, { size: 64, className: "text-warning" }),
|
|
12350
12414
|
errorText ?? `${translation("errorOccurred")} :(`
|
|
12351
12415
|
] });
|
|
@@ -12355,14 +12419,14 @@ var ErrorComponent = ({
|
|
|
12355
12419
|
var import_react46 = require("react");
|
|
12356
12420
|
|
|
12357
12421
|
// src/components/layout/loading/LoadingContainer.tsx
|
|
12358
|
-
var
|
|
12422
|
+
var import_clsx18 = require("clsx");
|
|
12359
12423
|
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
12360
12424
|
var LoadingContainer = ({ className }) => {
|
|
12361
|
-
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: (0,
|
|
12425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: (0, import_clsx18.clsx)("relative overflow-hidden shimmer bg-disabled/30 rounded-md", className) });
|
|
12362
12426
|
};
|
|
12363
12427
|
|
|
12364
12428
|
// src/components/layout/loading/LoadingAndErrorComponent.tsx
|
|
12365
|
-
var
|
|
12429
|
+
var import_clsx19 = require("clsx");
|
|
12366
12430
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
12367
12431
|
var LoadingAndErrorComponent = ({
|
|
12368
12432
|
children,
|
|
@@ -12383,23 +12447,23 @@ var LoadingAndErrorComponent = ({
|
|
|
12383
12447
|
}, minimumLoadingDuration);
|
|
12384
12448
|
}
|
|
12385
12449
|
if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
|
|
12386
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingContainer, { className: (0,
|
|
12450
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: loadingComponent ?? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingContainer, { className: (0, import_clsx19.clsx)(className) }) });
|
|
12387
12451
|
}
|
|
12388
12452
|
if (hasError) {
|
|
12389
|
-
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingContainer, { className: (0,
|
|
12453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children: errorComponent ?? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(LoadingContainer, { className: (0, import_clsx19.clsx)("bg-negative", className) }) });
|
|
12390
12454
|
}
|
|
12391
12455
|
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_jsx_runtime45.Fragment, { children });
|
|
12392
12456
|
};
|
|
12393
12457
|
|
|
12394
12458
|
// src/components/layout/loading/LoadingAnimation.tsx
|
|
12395
|
-
var
|
|
12459
|
+
var import_clsx20 = __toESM(require("clsx"));
|
|
12396
12460
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
12397
12461
|
var LoadingAnimation = ({
|
|
12398
12462
|
loadingText,
|
|
12399
12463
|
classname
|
|
12400
12464
|
}) => {
|
|
12401
12465
|
const translation = useHightideTranslation();
|
|
12402
|
-
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: (0,
|
|
12466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: (0, import_clsx20.default)("flex-col-2 items-center justify-center w-full h-24", classname), children: [
|
|
12403
12467
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(HelpwaveLogo, { animate: "loading" }),
|
|
12404
12468
|
loadingText ?? `${translation("loading")}...`
|
|
12405
12469
|
] });
|
|
@@ -12439,7 +12503,7 @@ var import_lucide_react10 = require("lucide-react");
|
|
|
12439
12503
|
var import_react47 = require("react");
|
|
12440
12504
|
var import_react48 = require("react");
|
|
12441
12505
|
var import_link2 = __toESM(require_link2());
|
|
12442
|
-
var
|
|
12506
|
+
var import_clsx21 = __toESM(require("clsx"));
|
|
12443
12507
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
12444
12508
|
function isSubItem(item) {
|
|
12445
12509
|
return "items" in item && Array.isArray(item.items);
|
|
@@ -12503,7 +12567,7 @@ var NavigationItemWithSubItem = ({
|
|
|
12503
12567
|
},
|
|
12504
12568
|
onBlur,
|
|
12505
12569
|
hidden: !isOpen,
|
|
12506
|
-
className: (0,
|
|
12570
|
+
className: (0, import_clsx21.default)(
|
|
12507
12571
|
"fixed flex-col-4 p-4 bg-surface text-on-surface shadow-side shadow-hw-bottom rounded-md",
|
|
12508
12572
|
{ "opacity-0": !style }
|
|
12509
12573
|
),
|
|
@@ -12522,7 +12586,7 @@ var NavigationItemWithSubItem = ({
|
|
|
12522
12586
|
] });
|
|
12523
12587
|
};
|
|
12524
12588
|
var NavigationItemList = ({ items, ...restProps }) => {
|
|
12525
|
-
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("ul", { ...restProps, className: (0,
|
|
12589
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("ul", { ...restProps, className: (0, import_clsx21.default)("flex-row-6 items-center", restProps.className), children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("li", { children: isSubItem(item) ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NavigationItemWithSubItem, { ...item }) : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_link2.default, { href: item.link, target: item.external ? "_blank" : void 0, className: "link", children: item.label }) }, index)) });
|
|
12526
12590
|
};
|
|
12527
12591
|
var Navigation = ({ ...props }) => {
|
|
12528
12592
|
const [isMobileOpen, setIsMobileOpen] = (0, import_react48.useState)(false);
|
|
@@ -12537,7 +12601,7 @@ var Navigation = ({ ...props }) => {
|
|
|
12537
12601
|
NavigationItemList,
|
|
12538
12602
|
{
|
|
12539
12603
|
...props,
|
|
12540
|
-
className: (0,
|
|
12604
|
+
className: (0, import_clsx21.default)("hidden", { "desktop:flex": !isMobileOpen }, props.className)
|
|
12541
12605
|
}
|
|
12542
12606
|
),
|
|
12543
12607
|
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
@@ -12567,7 +12631,7 @@ var Navigation = ({ ...props }) => {
|
|
|
12567
12631
|
event.stopPropagation();
|
|
12568
12632
|
}
|
|
12569
12633
|
},
|
|
12570
|
-
className: (0,
|
|
12634
|
+
className: (0, import_clsx21.default)(
|
|
12571
12635
|
"flex-col-8 items-center justify-center fixed inset-0 p-8 w-screen h-screen bg-surface text-on-surface",
|
|
12572
12636
|
{
|
|
12573
12637
|
"desktop:hidden": isMobileOpen
|
|
@@ -12586,7 +12650,7 @@ var Navigation = ({ ...props }) => {
|
|
|
12586
12650
|
children: /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(import_lucide_react10.XIcon, {})
|
|
12587
12651
|
}
|
|
12588
12652
|
),
|
|
12589
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NavigationItemList, { ...props, className: (0,
|
|
12653
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(NavigationItemList, { ...props, className: (0, import_clsx21.default)("flex-col-8", props.className) })
|
|
12590
12654
|
]
|
|
12591
12655
|
}
|
|
12592
12656
|
)
|
|
@@ -12595,14 +12659,14 @@ var Navigation = ({ ...props }) => {
|
|
|
12595
12659
|
|
|
12596
12660
|
// src/components/layout/navigation/Pagination.tsx
|
|
12597
12661
|
var import_lucide_react11 = require("lucide-react");
|
|
12598
|
-
var
|
|
12662
|
+
var import_clsx23 = __toESM(require("clsx"));
|
|
12599
12663
|
var import_react52 = require("react");
|
|
12600
12664
|
|
|
12601
12665
|
// src/components/user-interaction/Tooltip.tsx
|
|
12602
12666
|
var import_react49 = require("react");
|
|
12603
12667
|
var import_react50 = require("react");
|
|
12604
12668
|
var import_react51 = require("react");
|
|
12605
|
-
var
|
|
12669
|
+
var import_clsx22 = require("clsx");
|
|
12606
12670
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
12607
12671
|
var Tooltip = ({
|
|
12608
12672
|
tooltip,
|
|
@@ -12682,7 +12746,7 @@ var Tooltip = ({
|
|
|
12682
12746
|
"div",
|
|
12683
12747
|
{
|
|
12684
12748
|
ref: anchor,
|
|
12685
|
-
className: (0,
|
|
12749
|
+
className: (0, import_clsx22.clsx)("relative inline-block", containerClassName),
|
|
12686
12750
|
"aria-describedby": isVisible ? id : void 0,
|
|
12687
12751
|
onPointerEnter: openWithDelay,
|
|
12688
12752
|
onPointerLeave: close3,
|
|
@@ -12705,7 +12769,7 @@ var Tooltip = ({
|
|
|
12705
12769
|
"data-state": transitionState,
|
|
12706
12770
|
"data-animated": isAnimated ? "" : void 0,
|
|
12707
12771
|
role: "tooltip",
|
|
12708
|
-
className: (0,
|
|
12772
|
+
className: (0, import_clsx22.clsx)("tooltip", tooltipClassName),
|
|
12709
12773
|
style: { zIndex, position: "fixed" },
|
|
12710
12774
|
children: tooltip
|
|
12711
12775
|
}
|
|
@@ -12739,7 +12803,7 @@ var Pagination = ({
|
|
|
12739
12803
|
const changePage = (page) => {
|
|
12740
12804
|
onPageIndexChanged(page);
|
|
12741
12805
|
};
|
|
12742
|
-
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: (0,
|
|
12806
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: (0, import_clsx23.default)("flex-row-1", className), style, children: [
|
|
12743
12807
|
/* @__PURE__ */ (0, import_jsx_runtime50.jsx)(Tooltip, { tooltip: translation("first"), children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
12744
12808
|
Button,
|
|
12745
12809
|
{
|
|
@@ -12767,7 +12831,7 @@ var Pagination = ({
|
|
|
12767
12831
|
Input,
|
|
12768
12832
|
{
|
|
12769
12833
|
value,
|
|
12770
|
-
className: (0,
|
|
12834
|
+
className: (0, import_clsx23.default)(
|
|
12771
12835
|
"w-24 text-center font-bold input-indicator-hidden h-10"
|
|
12772
12836
|
),
|
|
12773
12837
|
type: "number",
|
|
@@ -12823,7 +12887,7 @@ var Pagination = ({
|
|
|
12823
12887
|
|
|
12824
12888
|
// src/components/layout/navigation/StepperBar.tsx
|
|
12825
12889
|
var import_lucide_react12 = require("lucide-react");
|
|
12826
|
-
var
|
|
12890
|
+
var import_clsx24 = __toESM(require("clsx"));
|
|
12827
12891
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
12828
12892
|
var defaultState = {
|
|
12829
12893
|
currentStep: 0,
|
|
@@ -12849,7 +12913,7 @@ var StepperBar = ({
|
|
|
12849
12913
|
return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
12850
12914
|
"div",
|
|
12851
12915
|
{
|
|
12852
|
-
className: (0,
|
|
12916
|
+
className: (0, import_clsx24.default)("flex-row-2 justify-between", className),
|
|
12853
12917
|
children: [
|
|
12854
12918
|
/* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "flex-row-2 flex-[2] justify-start", children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
|
|
12855
12919
|
Button,
|
|
@@ -12871,7 +12935,7 @@ var StepperBar = ({
|
|
|
12871
12935
|
"div",
|
|
12872
12936
|
{
|
|
12873
12937
|
onClick: () => seen && update(index),
|
|
12874
|
-
className: (0,
|
|
12938
|
+
className: (0, import_clsx24.default)(
|
|
12875
12939
|
"rounded-full w-4 h-4",
|
|
12876
12940
|
{
|
|
12877
12941
|
"bg-stepperbar-dot-active hover:brightness-75": index === currentStep && seen && !disabledSteps.has(currentStep),
|
|
@@ -12988,7 +13052,7 @@ function PopUpRoot({
|
|
|
12988
13052
|
}
|
|
12989
13053
|
|
|
12990
13054
|
// src/components/layout/table/FillerCell.tsx
|
|
12991
|
-
var
|
|
13055
|
+
var import_clsx25 = __toESM(require("clsx"));
|
|
12992
13056
|
var import_lucide_react13 = require("lucide-react");
|
|
12993
13057
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
12994
13058
|
var FillerCell = ({ ...props }) => {
|
|
@@ -12996,7 +13060,7 @@ var FillerCell = ({ ...props }) => {
|
|
|
12996
13060
|
"div",
|
|
12997
13061
|
{
|
|
12998
13062
|
...props,
|
|
12999
|
-
className: (0,
|
|
13063
|
+
className: (0, import_clsx25.default)("table-filler-cell", props.className),
|
|
13000
13064
|
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_lucide_react13.Minus, { className: "max-w-4 max-h-4" })
|
|
13001
13065
|
}
|
|
13002
13066
|
);
|
|
@@ -13347,13 +13411,13 @@ var useResizeCallbackWrapper = (callback) => {
|
|
|
13347
13411
|
};
|
|
13348
13412
|
|
|
13349
13413
|
// src/components/layout/table/TableCell.tsx
|
|
13350
|
-
var
|
|
13414
|
+
var import_clsx26 = require("clsx");
|
|
13351
13415
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
13352
13416
|
var TableCell = ({
|
|
13353
13417
|
children,
|
|
13354
13418
|
className
|
|
13355
13419
|
}) => {
|
|
13356
|
-
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: (0,
|
|
13420
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: (0, import_clsx26.clsx)("table-default-cell", className), children });
|
|
13357
13421
|
};
|
|
13358
13422
|
|
|
13359
13423
|
// src/components/layout/table/TableProvider.tsx
|
|
@@ -13361,9 +13425,10 @@ var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
|
13361
13425
|
var TableProvider = ({
|
|
13362
13426
|
data,
|
|
13363
13427
|
isUsingFillerRows = true,
|
|
13364
|
-
|
|
13428
|
+
fillerRowCell,
|
|
13365
13429
|
initialState,
|
|
13366
13430
|
onRowClick,
|
|
13431
|
+
onFillerRowClick,
|
|
13367
13432
|
defaultColumn: defaultColumnOverwrite,
|
|
13368
13433
|
state,
|
|
13369
13434
|
columns: columnsProp,
|
|
@@ -13502,15 +13567,16 @@ var TableProvider = ({
|
|
|
13502
13567
|
pagination,
|
|
13503
13568
|
rowSelection,
|
|
13504
13569
|
isUsingFillerRows,
|
|
13505
|
-
|
|
13570
|
+
fillerRowCell,
|
|
13506
13571
|
onRowClick,
|
|
13572
|
+
onFillerRowClick,
|
|
13507
13573
|
rows,
|
|
13508
13574
|
columnOrder,
|
|
13509
13575
|
columnFilters,
|
|
13510
13576
|
columnVisibility,
|
|
13511
13577
|
columnPinning,
|
|
13512
13578
|
columnSorting
|
|
13513
|
-
}), [table, data, pagination, rowSelection, isUsingFillerRows,
|
|
13579
|
+
}), [table, data, pagination, rowSelection, isUsingFillerRows, fillerRowCell, onRowClick, onFillerRowClick, columns, rows, columnOrder, columnFilters, columnVisibility, columnPinning, columnSorting]);
|
|
13514
13580
|
const tableColumnDefinitionContextValue = (0, import_react57.useMemo)(() => ({
|
|
13515
13581
|
table,
|
|
13516
13582
|
registerColumn
|
|
@@ -13529,20 +13595,31 @@ var TableProvider = ({
|
|
|
13529
13595
|
// src/components/layout/table/TableBody.tsx
|
|
13530
13596
|
var import_react_table2 = require("@tanstack/react-table");
|
|
13531
13597
|
var import_react58 = __toESM(require("react"));
|
|
13532
|
-
var
|
|
13598
|
+
var import_clsx27 = __toESM(require("clsx"));
|
|
13533
13599
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
13534
13600
|
var TableBody = import_react58.default.memo(function TableBodyVisual() {
|
|
13535
|
-
const { table, onRowClick, isUsingFillerRows,
|
|
13536
|
-
const
|
|
13601
|
+
const { table, onRowClick, onFillerRowClick, isUsingFillerRows, fillerRowCell, pagination, rows } = useTableDataContext();
|
|
13602
|
+
const pinnedColumnsLeft = table.getState().columnPinning?.left ?? [];
|
|
13603
|
+
const pinnedColumnsRight = table.getState().columnPinning?.right ?? [];
|
|
13604
|
+
let columnOrder = table.getState().columnOrder;
|
|
13605
|
+
columnOrder = [...pinnedColumnsLeft, ...columnOrder.filter((id) => !pinnedColumnsLeft.includes(id) && !pinnedColumnsRight.includes(id)), ...pinnedColumnsRight];
|
|
13606
|
+
const columnVisibility = table.getState().columnVisibility;
|
|
13607
|
+
const columns = columnOrder.map((id) => {
|
|
13608
|
+
const column = table.getColumn(id);
|
|
13609
|
+
if (!column) return null;
|
|
13610
|
+
if (columnVisibility[id] === false) return null;
|
|
13611
|
+
return column;
|
|
13612
|
+
}).filter(Boolean);
|
|
13537
13613
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("tbody", { children: [
|
|
13538
13614
|
rows.map((row) => {
|
|
13539
13615
|
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13540
13616
|
"tr",
|
|
13541
13617
|
{
|
|
13542
13618
|
onClick: () => onRowClick?.(row, table),
|
|
13543
|
-
|
|
13619
|
+
"data-clickable": PropsUtil.dataAttributes.bool(!!onRowClick),
|
|
13620
|
+
className: (0, import_clsx27.default)("table-body-row", BagFunctionUtil.resolve(table.options.meta?.bodyRowClassName, row.original)),
|
|
13544
13621
|
children: row.getVisibleCells().map((cell) => {
|
|
13545
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("td", { className: (0,
|
|
13622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("td", { className: (0, import_clsx27.default)("table-body-cell", cell.column.columnDef.meta?.className), children: (0, import_react_table2.flexRender)(
|
|
13546
13623
|
cell.column.columnDef.cell,
|
|
13547
13624
|
cell.getContext()
|
|
13548
13625
|
) }, cell.id);
|
|
@@ -13551,21 +13628,30 @@ var TableBody = import_react58.default.memo(function TableBodyVisual() {
|
|
|
13551
13628
|
row.id
|
|
13552
13629
|
);
|
|
13553
13630
|
}),
|
|
13554
|
-
isUsingFillerRows
|
|
13555
|
-
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13556
|
-
|
|
13557
|
-
|
|
13558
|
-
|
|
13631
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Visibility, { isVisible: isUsingFillerRows, children: range(pagination.pageSize - rows.length, { allowEmptyRange: true }).map((index) => {
|
|
13632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
13633
|
+
"tr",
|
|
13634
|
+
{
|
|
13635
|
+
className: (0, import_clsx27.default)("table-body-filler-row"),
|
|
13636
|
+
onClick: () => onFillerRowClick?.(index, table),
|
|
13637
|
+
"data-clickable": PropsUtil.dataAttributes.bool(!!onFillerRowClick),
|
|
13638
|
+
children: columns.map((column) => {
|
|
13639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("td", { className: (0, import_clsx27.default)("table-body-filler-cell", column.columnDef.meta?.className), children: fillerRowCell ? fillerRowCell(column.id, table) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(FillerCell, {}) }, column.id);
|
|
13640
|
+
})
|
|
13641
|
+
},
|
|
13642
|
+
"filler-row-" + index
|
|
13643
|
+
);
|
|
13644
|
+
}) })
|
|
13559
13645
|
] });
|
|
13560
13646
|
});
|
|
13561
13647
|
|
|
13562
13648
|
// src/components/layout/table/TableHeader.tsx
|
|
13563
13649
|
var import_react_table3 = require("@tanstack/react-table");
|
|
13564
|
-
var
|
|
13650
|
+
var import_clsx33 = __toESM(require("clsx"));
|
|
13565
13651
|
|
|
13566
13652
|
// src/components/layout/table/TableSortButton.tsx
|
|
13567
13653
|
var import_lucide_react14 = require("lucide-react");
|
|
13568
|
-
var
|
|
13654
|
+
var import_clsx28 = __toESM(require("clsx"));
|
|
13569
13655
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
13570
13656
|
var TableSortButton = ({
|
|
13571
13657
|
sortDirection,
|
|
@@ -13593,13 +13679,13 @@ var TableSortButton = ({
|
|
|
13593
13679
|
layout: hasSortingIndex ? "default" : "icon",
|
|
13594
13680
|
color,
|
|
13595
13681
|
size,
|
|
13596
|
-
className: (0,
|
|
13682
|
+
className: (0, import_clsx28.default)("relative", className),
|
|
13597
13683
|
...props,
|
|
13598
13684
|
children: [
|
|
13599
13685
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Visibility, { isVisible: hasSortingIndex, children: /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
13600
13686
|
"div",
|
|
13601
13687
|
{
|
|
13602
|
-
className: (0,
|
|
13688
|
+
className: (0, import_clsx28.default)("absolute bottom-0 right-1/2 translate-x-1/2 translate-y-2/3 z-1 primary coloring-solid rounded-full h-4 w-5 text-sm"),
|
|
13603
13689
|
children: `${index}.`
|
|
13604
13690
|
}
|
|
13605
13691
|
) }),
|
|
@@ -13616,7 +13702,7 @@ var import_react67 = require("react");
|
|
|
13616
13702
|
// src/components/user-interaction/input/DateTimeInput.tsx
|
|
13617
13703
|
var import_react64 = require("react");
|
|
13618
13704
|
var import_lucide_react16 = require("lucide-react");
|
|
13619
|
-
var
|
|
13705
|
+
var import_clsx32 = __toESM(require("clsx"));
|
|
13620
13706
|
|
|
13621
13707
|
// src/utils/date.ts
|
|
13622
13708
|
var monthsList = ["january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december"];
|
|
@@ -13789,7 +13875,7 @@ var DateUtils = {
|
|
|
13789
13875
|
};
|
|
13790
13876
|
|
|
13791
13877
|
// src/components/user-interaction/date/DateTimePicker.tsx
|
|
13792
|
-
var
|
|
13878
|
+
var import_clsx31 = __toESM(require("clsx"));
|
|
13793
13879
|
|
|
13794
13880
|
// src/components/user-interaction/date/TimePicker.tsx
|
|
13795
13881
|
var import_react59 = require("react");
|
|
@@ -13911,7 +13997,7 @@ var TimePickerUncontrolled = ({
|
|
|
13911
13997
|
// src/components/user-interaction/date/DatePicker.tsx
|
|
13912
13998
|
var import_react62 = require("react");
|
|
13913
13999
|
var import_lucide_react15 = require("lucide-react");
|
|
13914
|
-
var
|
|
14000
|
+
var import_clsx30 = __toESM(require("clsx"));
|
|
13915
14001
|
|
|
13916
14002
|
// src/components/user-interaction/date/DayPicker.tsx
|
|
13917
14003
|
var import_react60 = require("react");
|
|
@@ -13991,7 +14077,7 @@ var DayPickerUncontrolled = ({
|
|
|
13991
14077
|
|
|
13992
14078
|
// src/components/user-interaction/date/YearMonthPicker.tsx
|
|
13993
14079
|
var import_react61 = require("react");
|
|
13994
|
-
var
|
|
14080
|
+
var import_clsx29 = __toESM(require("clsx"));
|
|
13995
14081
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
13996
14082
|
var YearRow = (0, import_react61.memo)(function YearRow2({
|
|
13997
14083
|
year,
|
|
@@ -14017,7 +14103,7 @@ var YearRow = (0, import_react61.memo)(function YearRow2({
|
|
|
14017
14103
|
isExpanded,
|
|
14018
14104
|
onExpandedChange: setIsExpanded,
|
|
14019
14105
|
children: [
|
|
14020
|
-
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ExpandableHeader, { className: (0,
|
|
14106
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ExpandableHeader, { className: (0, import_clsx29.default)("px-2", { "text-primary font-bold": isSelectedYear }), children: year }),
|
|
14021
14107
|
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ExpandableContent, { className: "gap-y-1 px-2 expandable-content-h-39", children: isExpanded && monthGrid.map((group, groupIdx) => /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "flex-row-1", children: group.map((month) => {
|
|
14022
14108
|
const monthIndex = DateUtils.monthsList.indexOf(month);
|
|
14023
14109
|
const currentTimestamp = new Date(year, monthIndex).getTime();
|
|
@@ -14086,7 +14172,7 @@ var YearMonthPicker = ({
|
|
|
14086
14172
|
InfiniteScroll,
|
|
14087
14173
|
{
|
|
14088
14174
|
itemCount: years.length,
|
|
14089
|
-
className: (0,
|
|
14175
|
+
className: (0, import_clsx29.default)("flex-col-1 h-full select-none", className),
|
|
14090
14176
|
initialIndex: years.findIndex((year) => year === value.getFullYear()),
|
|
14091
14177
|
children: (index) => {
|
|
14092
14178
|
const year = years[index];
|
|
@@ -14141,14 +14227,14 @@ var DatePicker = ({
|
|
|
14141
14227
|
const { locale } = useLocale();
|
|
14142
14228
|
const [displayedMonth, setDisplayedMonth] = (0, import_react62.useState)(new Date(value.getFullYear(), value.getMonth(), 1));
|
|
14143
14229
|
const [displayMode, setDisplayMode] = (0, import_react62.useState)(initialDisplay);
|
|
14144
|
-
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: (0,
|
|
14230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: (0, import_clsx30.default)("flex-col-3", className), children: [
|
|
14145
14231
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: "flex-row-2 items-center justify-between", children: [
|
|
14146
14232
|
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
14147
14233
|
Button,
|
|
14148
14234
|
{
|
|
14149
14235
|
size: "sm",
|
|
14150
14236
|
coloringStyle: "text",
|
|
14151
|
-
className: (0,
|
|
14237
|
+
className: (0, import_clsx30.default)("flex-row-1 items-center cursor-pointer select-none", {
|
|
14152
14238
|
"text-disabled": displayMode !== "day"
|
|
14153
14239
|
}),
|
|
14154
14240
|
onClick: () => setDisplayMode(displayMode === "day" ? "yearMonth" : "day"),
|
|
@@ -14288,7 +14374,7 @@ var DateTimePicker = ({
|
|
|
14288
14374
|
...timePickerProps,
|
|
14289
14375
|
is24HourFormat,
|
|
14290
14376
|
minuteIncrement,
|
|
14291
|
-
className: (0,
|
|
14377
|
+
className: (0, import_clsx31.default)({ "justify-between": mode === "time" }),
|
|
14292
14378
|
value,
|
|
14293
14379
|
onValueChange,
|
|
14294
14380
|
onEditComplete
|
|
@@ -14444,11 +14530,7 @@ var DateTimeInput = (0, import_react64.forwardRef)(function DateTimeInput2({
|
|
|
14444
14530
|
label: `date-time-input-label-${id}`
|
|
14445
14531
|
}), [id]);
|
|
14446
14532
|
const innerRef = (0, import_react64.useRef)(null);
|
|
14447
|
-
|
|
14448
|
-
(0, import_react64.useImperativeHandle)(forwardedRef, () => ({
|
|
14449
|
-
input: innerRef.current,
|
|
14450
|
-
popup: containerRef.current
|
|
14451
|
-
}));
|
|
14533
|
+
(0, import_react64.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
14452
14534
|
(0, import_react64.useEffect)(() => {
|
|
14453
14535
|
if (readOnly || disabled) {
|
|
14454
14536
|
changeOpenWrapper(false);
|
|
@@ -14456,11 +14538,12 @@ var DateTimeInput = (0, import_react64.forwardRef)(function DateTimeInput2({
|
|
|
14456
14538
|
}, [changeOpenWrapper, readOnly, disabled]);
|
|
14457
14539
|
const clickHandler = PropsUtil.aria.click(() => changeOpenWrapper(true));
|
|
14458
14540
|
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
14459
|
-
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { ...containerProps,
|
|
14541
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { ...containerProps, className: (0, import_clsx32.default)("relative w-full", containerProps?.className), children: [
|
|
14460
14542
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
14461
14543
|
"div",
|
|
14462
14544
|
{
|
|
14463
14545
|
...props,
|
|
14546
|
+
ref: innerRef,
|
|
14464
14547
|
id: ids.input,
|
|
14465
14548
|
onClick: (event) => {
|
|
14466
14549
|
clickHandler.onClick();
|
|
@@ -14468,13 +14551,14 @@ var DateTimeInput = (0, import_react64.forwardRef)(function DateTimeInput2({
|
|
|
14468
14551
|
},
|
|
14469
14552
|
onKeyDown: clickHandler.onKeyDown,
|
|
14470
14553
|
...PropsUtil.dataAttributes.interactionStates({ disabled, readOnly, invalid, required }),
|
|
14554
|
+
"data-value": PropsUtil.dataAttributes.bool(!!state),
|
|
14471
14555
|
...PropsUtil.aria.interactionStates({ disabled, readOnly, invalid, required }, props),
|
|
14472
14556
|
tabIndex: 0,
|
|
14473
14557
|
role: "combobox",
|
|
14474
14558
|
"aria-haspopup": "dialog",
|
|
14475
14559
|
"aria-expanded": isOpen,
|
|
14476
14560
|
"aria-controls": isOpen ? ids.popup : void 0,
|
|
14477
|
-
className: (0,
|
|
14561
|
+
className: (0, import_clsx32.default)(
|
|
14478
14562
|
"pr-10 w-full flex-row-2 items-center justify-between h-10 px-3 rounded-md input-element",
|
|
14479
14563
|
"outline-offset-0 outline-primary focus:outline-1 focus:outline-offset-1 focus:border-primary duration-(--animation-duration-in)",
|
|
14480
14564
|
{ "hover:cursor-pointer": !readOnly },
|
|
@@ -14506,7 +14590,6 @@ var DateTimeInput = (0, import_react64.forwardRef)(function DateTimeInput2({
|
|
|
14506
14590
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
14507
14591
|
PopUp,
|
|
14508
14592
|
{
|
|
14509
|
-
ref: containerRef,
|
|
14510
14593
|
id: ids.popup,
|
|
14511
14594
|
isOpen,
|
|
14512
14595
|
anchor: innerRef,
|
|
@@ -15208,13 +15291,13 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15208
15291
|
},
|
|
15209
15292
|
header.id
|
|
15210
15293
|
)) }, headerGroup.id)),
|
|
15211
|
-
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("tr", { className: (0,
|
|
15294
|
+
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("tr", { className: (0, import_clsx33.default)("table-header-row", table.options.meta?.headerRowClassName), children: headerGroup.headers.map((header) => {
|
|
15212
15295
|
return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
|
|
15213
15296
|
"th",
|
|
15214
15297
|
{
|
|
15215
15298
|
colSpan: header.colSpan,
|
|
15216
15299
|
"data-sticky": isSticky ? "" : void 0,
|
|
15217
|
-
className: (0,
|
|
15300
|
+
className: (0, import_clsx33.default)("table-header-cell group/table-header-cell", header.column.columnDef.meta?.className),
|
|
15218
15301
|
children: [
|
|
15219
15302
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Visibility, { isVisible: !header.isPlaceholder, children: /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)("div", { className: "flex-row-1 items-center", children: [
|
|
15220
15303
|
/* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Visibility, { isVisible: header.column.getCanSort(), children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(
|
|
@@ -15286,7 +15369,7 @@ var TableHeader = ({ table: tableOverride, isSticky = false }) => {
|
|
|
15286
15369
|
};
|
|
15287
15370
|
|
|
15288
15371
|
// src/components/layout/table/TableDisplay.tsx
|
|
15289
|
-
var
|
|
15372
|
+
var import_clsx34 = __toESM(require("clsx"));
|
|
15290
15373
|
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
15291
15374
|
var TableDisplay = ({
|
|
15292
15375
|
children,
|
|
@@ -15297,11 +15380,11 @@ var TableDisplay = ({
|
|
|
15297
15380
|
const { table } = useTableDataContext();
|
|
15298
15381
|
const { containerRef } = useTableContainerContext();
|
|
15299
15382
|
const { sizeVars } = useTableHeaderContext();
|
|
15300
|
-
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { ...containerProps, ref: containerRef, className: (0,
|
|
15383
|
+
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { ...containerProps, ref: containerRef, className: (0, import_clsx34.default)("table-container", containerProps?.className), children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(
|
|
15301
15384
|
"table",
|
|
15302
15385
|
{
|
|
15303
15386
|
...props,
|
|
15304
|
-
className: (0,
|
|
15387
|
+
className: (0, import_clsx34.default)("table", props.className),
|
|
15305
15388
|
style: {
|
|
15306
15389
|
...sizeVars,
|
|
15307
15390
|
width: Math.floor(Math.max(table.getTotalSize(), containerRef.current?.offsetWidth ?? table.getTotalSize()))
|
|
@@ -15317,7 +15400,7 @@ var TableDisplay = ({
|
|
|
15317
15400
|
|
|
15318
15401
|
// src/components/layout/table/TablePagination.tsx
|
|
15319
15402
|
var import_react69 = require("react");
|
|
15320
|
-
var
|
|
15403
|
+
var import_clsx35 = __toESM(require("clsx"));
|
|
15321
15404
|
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
15322
15405
|
var TablePaginationMenu = () => {
|
|
15323
15406
|
const { table } = useTableDataContext();
|
|
@@ -15355,18 +15438,16 @@ var TablePageSizeSelect = ({
|
|
|
15355
15438
|
);
|
|
15356
15439
|
};
|
|
15357
15440
|
var TablePagination = ({ allowChangingPageSize = true, pageSizeOptions, ...props }) => {
|
|
15358
|
-
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { ...props, className: (0,
|
|
15441
|
+
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { ...props, className: (0, import_clsx35.default)("flex-row-2 items-center justify-center", props.className), children: /* @__PURE__ */ (0, import_jsx_runtime70.jsxs)("div", { className: "relative", children: [
|
|
15359
15442
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TablePaginationMenu, {}),
|
|
15360
15443
|
/* @__PURE__ */ (0, import_jsx_runtime70.jsx)(Visibility, { isVisible: allowChangingPageSize, children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(TablePageSizeSelect, { pageSizeOptions, buttonProps: { className: "absolute left-1/1 top-1/2 -translate-y-1/2 translate-x-4 h-10 min-w-24" } }) })
|
|
15361
15444
|
] }) });
|
|
15362
15445
|
};
|
|
15363
15446
|
|
|
15364
|
-
// src/components/layout/table/TableWithSelectionProvider.tsx
|
|
15365
|
-
var import_clsx35 = __toESM(require("clsx"));
|
|
15366
|
-
|
|
15367
15447
|
// src/components/user-interaction/Checkbox.tsx
|
|
15368
15448
|
var import_lucide_react19 = require("lucide-react");
|
|
15369
15449
|
var import_react70 = require("react");
|
|
15450
|
+
var import_clsx36 = __toESM(require("clsx"));
|
|
15370
15451
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
15371
15452
|
var Checkbox = ({
|
|
15372
15453
|
value = false,
|
|
@@ -15403,7 +15484,6 @@ var Checkbox = ({
|
|
|
15403
15484
|
props.onKeyDown?.(event);
|
|
15404
15485
|
}
|
|
15405
15486
|
},
|
|
15406
|
-
"data-name": PropsUtil.dataAttributes.name("checkbox", props),
|
|
15407
15487
|
"data-checked": !indeterminate ? value : "indeterminate",
|
|
15408
15488
|
"data-size": size ?? void 0,
|
|
15409
15489
|
...PropsUtil.dataAttributes.interactionStates({ disabled, invalid, readOnly, required }),
|
|
@@ -15411,9 +15491,10 @@ var Checkbox = ({
|
|
|
15411
15491
|
tabIndex: disabled ? -1 : 0,
|
|
15412
15492
|
"aria-checked": indeterminate ? "mixed" : value,
|
|
15413
15493
|
...PropsUtil.aria.interactionStates({ disabled, invalid, readOnly, required }, props),
|
|
15494
|
+
className: (0, import_clsx36.default)("checkbox", props.className),
|
|
15414
15495
|
children: [
|
|
15415
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react19.Minus, {
|
|
15416
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react19.Check, {
|
|
15496
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Visibility, { isVisible: indeterminate, children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react19.Minus, { className: "checkbox-indicator", "aria-hidden": true }) }),
|
|
15497
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Visibility, { isVisible: !indeterminate && (alwaysShowCheckIcon || value), children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_lucide_react19.Check, { className: "checkbox-indicator", "aria-hidden": true }) })
|
|
15417
15498
|
]
|
|
15418
15499
|
}
|
|
15419
15500
|
);
|
|
@@ -15440,12 +15521,11 @@ var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
|
15440
15521
|
var TableWithSelectionProvider = ({
|
|
15441
15522
|
children,
|
|
15442
15523
|
state,
|
|
15443
|
-
|
|
15524
|
+
fillerRowCell,
|
|
15444
15525
|
rowSelection,
|
|
15445
15526
|
disableClickRowClickSelection = false,
|
|
15446
15527
|
selectionRowId = "selection",
|
|
15447
15528
|
onRowClick,
|
|
15448
|
-
meta,
|
|
15449
15529
|
...props
|
|
15450
15530
|
}) => {
|
|
15451
15531
|
const columnDef = (0, import_react71.useMemo)(() => [
|
|
@@ -15465,7 +15545,14 @@ var TableWithSelectionProvider = ({
|
|
|
15465
15545
|
);
|
|
15466
15546
|
},
|
|
15467
15547
|
cell: ({ row }) => {
|
|
15468
|
-
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
15548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
15549
|
+
Checkbox,
|
|
15550
|
+
{
|
|
15551
|
+
disabled: !row.getCanSelect(),
|
|
15552
|
+
value: row.getIsSelected(),
|
|
15553
|
+
onValueChange: row.getToggleSelectedHandler()
|
|
15554
|
+
}
|
|
15555
|
+
);
|
|
15469
15556
|
},
|
|
15470
15557
|
size: 60,
|
|
15471
15558
|
minSize: 60,
|
|
@@ -15481,12 +15568,12 @@ var TableWithSelectionProvider = ({
|
|
|
15481
15568
|
TableProvider,
|
|
15482
15569
|
{
|
|
15483
15570
|
...props,
|
|
15484
|
-
|
|
15571
|
+
fillerRowCell: (0, import_react71.useCallback)((columnId, table) => {
|
|
15485
15572
|
if (columnId === selectionRowId) {
|
|
15486
|
-
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Checkbox, { value: false, disabled: true
|
|
15573
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Checkbox, { value: false, disabled: true });
|
|
15487
15574
|
}
|
|
15488
|
-
return
|
|
15489
|
-
}, [
|
|
15575
|
+
return fillerRowCell?.(columnId, table) ?? /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(FillerCell, {});
|
|
15576
|
+
}, [fillerRowCell, selectionRowId]),
|
|
15490
15577
|
columns: columnDef,
|
|
15491
15578
|
initialState: {
|
|
15492
15579
|
...props.initialState,
|
|
@@ -15505,24 +15592,17 @@ var TableWithSelectionProvider = ({
|
|
|
15505
15592
|
}
|
|
15506
15593
|
onRowClick?.(row, table);
|
|
15507
15594
|
}, [disableClickRowClickSelection, onRowClick]),
|
|
15508
|
-
meta: {
|
|
15509
|
-
...meta,
|
|
15510
|
-
bodyRowClassName: (0, import_clsx35.default)(
|
|
15511
|
-
{ "cursor-pointer": !disableClickRowClickSelection },
|
|
15512
|
-
meta?.bodyRowClassName
|
|
15513
|
-
)
|
|
15514
|
-
},
|
|
15515
15595
|
children
|
|
15516
15596
|
}
|
|
15517
15597
|
);
|
|
15518
15598
|
};
|
|
15519
15599
|
|
|
15520
15600
|
// src/components/layout/table/Table.tsx
|
|
15521
|
-
var
|
|
15601
|
+
var import_clsx37 = __toESM(require("clsx"));
|
|
15522
15602
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
15523
15603
|
var Table = ({ children, table, paginationOptions, displayProps, header, footer, ...props }) => {
|
|
15524
15604
|
const { showPagination = true, allowChangingPageSize, pageSizeOptions } = paginationOptions ?? {};
|
|
15525
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { ...props, className: (0,
|
|
15605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { ...props, className: (0, import_clsx37.default)("flex-col-3", props.className), children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(TableProvider, { ...table, children: [
|
|
15526
15606
|
header,
|
|
15527
15607
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TableDisplay, { ...displayProps, children }),
|
|
15528
15608
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Visibility, { isVisible: showPagination, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TablePagination, { allowChangingPageSize, pageSizeOptions }) }),
|
|
@@ -15539,7 +15619,7 @@ var TableWithSelection = ({
|
|
|
15539
15619
|
...props
|
|
15540
15620
|
}) => {
|
|
15541
15621
|
const { showPagination = true, allowChangingPageSize, pageSizeOptions } = paginationOptions ?? {};
|
|
15542
|
-
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { ...props, className: (0,
|
|
15622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { ...props, className: (0, import_clsx37.default)("flex-col-3", props.className), children: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(TableWithSelectionProvider, { ...table, children: [
|
|
15543
15623
|
header,
|
|
15544
15624
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TableDisplay, { ...displayProps, children }),
|
|
15545
15625
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Visibility, { isVisible: showPagination, children: /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(TablePagination, { allowChangingPageSize, pageSizeOptions }) }),
|
|
@@ -15849,7 +15929,7 @@ var TableColumnSwitcher = ({ buttonProps, ...props }) => {
|
|
|
15849
15929
|
|
|
15850
15930
|
// src/components/user-interaction/CopyToClipboardWrapper.tsx
|
|
15851
15931
|
var import_react74 = require("react");
|
|
15852
|
-
var
|
|
15932
|
+
var import_clsx38 = require("clsx");
|
|
15853
15933
|
|
|
15854
15934
|
// src/utils/writeToClipboard.ts
|
|
15855
15935
|
var writeToClipboard = (text) => {
|
|
@@ -15892,7 +15972,7 @@ var CopyToClipboardWrapper = ({
|
|
|
15892
15972
|
return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
15893
15973
|
"div",
|
|
15894
15974
|
{
|
|
15895
|
-
className: (0,
|
|
15975
|
+
className: (0, import_clsx38.clsx)("relative inline-block cursor-copy", containerClassName),
|
|
15896
15976
|
onMouseEnter: () => {
|
|
15897
15977
|
setIsShowingIndication(true);
|
|
15898
15978
|
},
|
|
@@ -15910,7 +15990,7 @@ var CopyToClipboardWrapper = ({
|
|
|
15910
15990
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
|
|
15911
15991
|
"div",
|
|
15912
15992
|
{
|
|
15913
|
-
className: (0,
|
|
15993
|
+
className: (0, import_clsx38.clsx)(
|
|
15914
15994
|
`absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
|
|
15915
15995
|
shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
|
|
15916
15996
|
"transition-opacity duration-200",
|
|
@@ -15933,7 +16013,7 @@ var CopyToClipboardWrapper = ({
|
|
|
15933
16013
|
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
15934
16014
|
"div",
|
|
15935
16015
|
{
|
|
15936
|
-
className: (0,
|
|
16016
|
+
className: (0, import_clsx38.clsx)(`absolute w-0 h-0`, triangleClasses[position]),
|
|
15937
16017
|
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
15938
16018
|
}
|
|
15939
16019
|
)
|
|
@@ -15947,7 +16027,7 @@ var CopyToClipboardWrapper = ({
|
|
|
15947
16027
|
|
|
15948
16028
|
// src/components/user-interaction/Menu.tsx
|
|
15949
16029
|
var import_react76 = require("react");
|
|
15950
|
-
var
|
|
16030
|
+
var import_clsx39 = __toESM(require("clsx"));
|
|
15951
16031
|
|
|
15952
16032
|
// src/hooks/useHoverState.ts
|
|
15953
16033
|
var import_react75 = require("react");
|
|
@@ -16003,7 +16083,7 @@ var MenuItem = ({
|
|
|
16003
16083
|
}) => /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
16004
16084
|
"div",
|
|
16005
16085
|
{
|
|
16006
|
-
className: (0,
|
|
16086
|
+
className: (0, import_clsx39.default)("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold text-nowrap", {
|
|
16007
16087
|
"text-disabled cursor-not-allowed": isDisabled,
|
|
16008
16088
|
"text-menu-text hover:bg-primary/20": !isDisabled,
|
|
16009
16089
|
"cursor-pointer": !!onClick
|
|
@@ -16051,7 +16131,7 @@ var Menu = ({
|
|
|
16051
16131
|
|
|
16052
16132
|
// src/components/user-interaction/ScrollPicker.tsx
|
|
16053
16133
|
var import_react77 = require("react");
|
|
16054
|
-
var
|
|
16134
|
+
var import_clsx40 = __toESM(require("clsx"));
|
|
16055
16135
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
16056
16136
|
var up = 1;
|
|
16057
16137
|
var down = -1;
|
|
@@ -16221,7 +16301,7 @@ var ScrollPicker = ({
|
|
|
16221
16301
|
children: shownItems.map(({ name: name2, index }, arrayIndex) => /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
|
|
16222
16302
|
"div",
|
|
16223
16303
|
{
|
|
16224
|
-
className: (0,
|
|
16304
|
+
className: (0, import_clsx40.default)(
|
|
16225
16305
|
`flex-col-2 items-center justify-center rounded-md`,
|
|
16226
16306
|
{
|
|
16227
16307
|
"text-primary font-bold": currentIndex === index,
|
|
@@ -16249,7 +16329,7 @@ var ScrollPicker = ({
|
|
|
16249
16329
|
|
|
16250
16330
|
// src/components/user-interaction/Textarea.tsx
|
|
16251
16331
|
var import_react78 = require("react");
|
|
16252
|
-
var
|
|
16332
|
+
var import_clsx41 = __toESM(require("clsx"));
|
|
16253
16333
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
16254
16334
|
var Textarea = (0, import_react78.forwardRef)(function Textarea2({
|
|
16255
16335
|
invalid = false,
|
|
@@ -16316,7 +16396,7 @@ var TextareaWithHeadline = ({
|
|
|
16316
16396
|
return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
|
|
16317
16397
|
"div",
|
|
16318
16398
|
{
|
|
16319
|
-
className: (0,
|
|
16399
|
+
className: (0, import_clsx41.default)(
|
|
16320
16400
|
"group flex-col-3 border-2 rounded-lg",
|
|
16321
16401
|
{
|
|
16322
16402
|
"bg-input-background text-input-text hover:border-primary focus-within:border-primary": !disabled,
|
|
@@ -16325,13 +16405,13 @@ var TextareaWithHeadline = ({
|
|
|
16325
16405
|
containerClassName
|
|
16326
16406
|
),
|
|
16327
16407
|
children: [
|
|
16328
|
-
headline && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("label", { ...headlineProps, htmlFor: usedId, className: (0,
|
|
16408
|
+
headline && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("label", { ...headlineProps, htmlFor: usedId, className: (0, import_clsx41.default)("typography-lable-md text-label", headlineProps.className), children: headline }),
|
|
16329
16409
|
/* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
|
|
16330
16410
|
Textarea,
|
|
16331
16411
|
{
|
|
16332
16412
|
...props,
|
|
16333
16413
|
id: usedId,
|
|
16334
|
-
className: (0,
|
|
16414
|
+
className: (0, import_clsx41.default)(
|
|
16335
16415
|
"border-transparent focus:ring-0 focus-visible:ring-0 resize-none h-32",
|
|
16336
16416
|
className
|
|
16337
16417
|
)
|
|
@@ -16386,7 +16466,7 @@ var TimeDisplay = ({
|
|
|
16386
16466
|
// src/components/user-interaction/input/InsideLabelInput.tsx
|
|
16387
16467
|
var import_react79 = require("react");
|
|
16388
16468
|
var import_react80 = require("react");
|
|
16389
|
-
var
|
|
16469
|
+
var import_clsx42 = __toESM(require("clsx"));
|
|
16390
16470
|
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
16391
16471
|
var InsideLabelInput = (0, import_react80.forwardRef)(function InsideLabelInput2({
|
|
16392
16472
|
id: customId,
|
|
@@ -16397,13 +16477,13 @@ var InsideLabelInput = (0, import_react80.forwardRef)(function InsideLabelInput2
|
|
|
16397
16477
|
const [isFocused, setIsFocused] = (0, import_react80.useState)(false);
|
|
16398
16478
|
const generatedId = (0, import_react79.useId)();
|
|
16399
16479
|
const id = customId ?? generatedId;
|
|
16400
|
-
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: (0,
|
|
16480
|
+
return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: (0, import_clsx42.default)("relative"), children: [
|
|
16401
16481
|
/* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
|
|
16402
16482
|
Input,
|
|
16403
16483
|
{
|
|
16404
16484
|
...props,
|
|
16405
16485
|
id,
|
|
16406
|
-
className: (0,
|
|
16486
|
+
className: (0, import_clsx42.default)("h-14 px-4 pb-2 py-6.5", props.className),
|
|
16407
16487
|
ref: forwardedRef,
|
|
16408
16488
|
"aria-labelledby": id + "-label",
|
|
16409
16489
|
onFocus: (event) => {
|
|
@@ -16422,7 +16502,7 @@ var InsideLabelInput = (0, import_react80.forwardRef)(function InsideLabelInput2
|
|
|
16422
16502
|
id: id + "-label",
|
|
16423
16503
|
"aria-hidden": true,
|
|
16424
16504
|
"data-display": isFocused || !!value ? "small" : "full",
|
|
16425
|
-
className: (0,
|
|
16505
|
+
className: (0, import_clsx42.default)(
|
|
16426
16506
|
// margin left to account for the border which is ignored for absolute positions
|
|
16427
16507
|
"absolute left-4 ml-0.5 top-2 transition-all delay-25 pointer-events-none touch-none",
|
|
16428
16508
|
"data-[display=small]:top-2 data-[display=small]:h-force-4.5 data-[display=small]:typography-caption-sm data-[display=small]:overflow-y-hidden",
|
|
@@ -16450,7 +16530,7 @@ var InsideLabelInputUncontrolled = ({
|
|
|
16450
16530
|
|
|
16451
16531
|
// src/components/user-interaction/input/SearchBar.tsx
|
|
16452
16532
|
var import_lucide_react22 = require("lucide-react");
|
|
16453
|
-
var
|
|
16533
|
+
var import_clsx43 = require("clsx");
|
|
16454
16534
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
16455
16535
|
var SearchBar = ({
|
|
16456
16536
|
value: initialValue,
|
|
@@ -16462,7 +16542,7 @@ var SearchBar = ({
|
|
|
16462
16542
|
}) => {
|
|
16463
16543
|
const translation = useHightideTranslation();
|
|
16464
16544
|
const [value, setValue] = useOverwritableState(initialValue, onValueChange);
|
|
16465
|
-
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { ...containerProps, className: (0,
|
|
16545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { ...containerProps, className: (0, import_clsx43.clsx)("relative", containerProps?.className), children: [
|
|
16466
16546
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
16467
16547
|
InputUncontrolled,
|
|
16468
16548
|
{
|
|
@@ -16471,7 +16551,7 @@ var SearchBar = ({
|
|
|
16471
16551
|
onValueChange: setValue,
|
|
16472
16552
|
onEditComplete: onSearch,
|
|
16473
16553
|
placeholder: inputProps.placeholder ?? translation("search"),
|
|
16474
|
-
className: (0,
|
|
16554
|
+
className: (0, import_clsx43.clsx)("pr-10 w-full", inputProps.className)
|
|
16475
16555
|
}
|
|
16476
16556
|
),
|
|
16477
16557
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
@@ -16483,7 +16563,7 @@ var SearchBar = ({
|
|
|
16483
16563
|
color: "neutral",
|
|
16484
16564
|
coloringStyle: "text",
|
|
16485
16565
|
onClick: () => onSearch(value),
|
|
16486
|
-
className: (0,
|
|
16566
|
+
className: (0, import_clsx43.clsx)("absolute right-1 top-1/2 -translate-y-1/2", searchButtonProps?.className),
|
|
16487
16567
|
children: /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(import_lucide_react22.Search, { className: "w-full h-full" })
|
|
16488
16568
|
}
|
|
16489
16569
|
)
|
|
@@ -16493,7 +16573,7 @@ var SearchBar = ({
|
|
|
16493
16573
|
// src/components/user-interaction/input/ToggleableInput.tsx
|
|
16494
16574
|
var import_react81 = require("react");
|
|
16495
16575
|
var import_lucide_react23 = require("lucide-react");
|
|
16496
|
-
var
|
|
16576
|
+
var import_clsx44 = __toESM(require("clsx"));
|
|
16497
16577
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
16498
16578
|
var ToggleableInput = (0, import_react81.forwardRef)(function ToggleableInput2({
|
|
16499
16579
|
value,
|
|
@@ -16509,7 +16589,7 @@ var ToggleableInput = (0, import_react81.forwardRef)(function ToggleableInput2({
|
|
|
16509
16589
|
innerRef.current?.focus();
|
|
16510
16590
|
}
|
|
16511
16591
|
}, [isEditing]);
|
|
16512
|
-
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: (0,
|
|
16592
|
+
return /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: (0, import_clsx44.default)("relative flex-row-2", { "flex-1": isEditing }), children: [
|
|
16513
16593
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
16514
16594
|
Input,
|
|
16515
16595
|
{
|
|
@@ -16531,14 +16611,14 @@ var ToggleableInput = (0, import_react81.forwardRef)(function ToggleableInput2({
|
|
|
16531
16611
|
},
|
|
16532
16612
|
"data-name": props["data-name"] ?? "togglable-input",
|
|
16533
16613
|
"data-isEditing": isEditing ? "" : void 0,
|
|
16534
|
-
className: (0,
|
|
16614
|
+
className: (0, import_clsx44.default)(`w-full rounded-md`, {
|
|
16535
16615
|
"text-transparent": !isEditing
|
|
16536
16616
|
})
|
|
16537
16617
|
}
|
|
16538
16618
|
),
|
|
16539
16619
|
!isEditing && /* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: "absolute left-0 flex-row-2 items-center pointer-events-none touch-none w-full overflow-hidden", children: [
|
|
16540
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: (0,
|
|
16541
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react23.Pencil, { className: (0,
|
|
16620
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)("span", { className: (0, import_clsx44.default)(" truncate"), children: value }),
|
|
16621
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_lucide_react23.Pencil, { className: (0, import_clsx44.default)(`size-force-4`, { "text-transparent": isEditing }) })
|
|
16542
16622
|
] })
|
|
16543
16623
|
] });
|
|
16544
16624
|
});
|
|
@@ -17687,6 +17767,8 @@ var PromiseUtils = {
|
|
|
17687
17767
|
FormContext,
|
|
17688
17768
|
FormField,
|
|
17689
17769
|
FormFieldLayout,
|
|
17770
|
+
FormObserver,
|
|
17771
|
+
FormObserverKey,
|
|
17690
17772
|
FormProvider,
|
|
17691
17773
|
FormStore,
|
|
17692
17774
|
GenericFilter,
|
|
@@ -17851,6 +17933,8 @@ var PromiseUtils = {
|
|
|
17851
17933
|
useFocusTrap,
|
|
17852
17934
|
useForm,
|
|
17853
17935
|
useFormField,
|
|
17936
|
+
useFormObserver,
|
|
17937
|
+
useFormObserverKey,
|
|
17854
17938
|
useHandleRefs,
|
|
17855
17939
|
useHightideConfig,
|
|
17856
17940
|
useHightideTranslation,
|