@helpwave/hightide 0.1.19 → 0.1.20
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/components/date/DatePicker.js +3 -2
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +3 -2
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +3 -2
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +3 -2
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.d.mts +3 -0
- package/dist/components/layout-and-navigation/Expandable.d.ts +3 -0
- package/dist/components/layout-and-navigation/Expandable.js +3 -2
- package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.mjs +3 -2
- package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.js +3 -2
- package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.mjs +3 -2
- package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +5 -10
- package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +5 -10
- package/dist/components/loading-states/LoadingAndErrorComponent.js +14 -331
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +15 -322
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingContainer.d.mts +8 -0
- package/dist/components/loading-states/LoadingContainer.d.ts +8 -0
- package/dist/components/loading-states/LoadingContainer.js +34 -0
- package/dist/components/loading-states/LoadingContainer.js.map +1 -0
- package/dist/components/loading-states/LoadingContainer.mjs +10 -0
- package/dist/components/loading-states/LoadingContainer.mjs.map +1 -0
- package/dist/components/modals/LanguageModal.js +3 -2
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +3 -2
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +3 -2
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +3 -2
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +3 -2
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +3 -2
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.js +3 -2
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +3 -2
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +3 -2
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +3 -2
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.js +3 -2
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +3 -2
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/Select.js +3 -2
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +3 -2
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/css/globals.css +33 -0
- package/dist/css/uncompiled/utitlity/animation.css +27 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +296 -284
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +260 -249
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3738,7 +3738,8 @@ var Expandable = forwardRef2(function Expandable2({
|
|
|
3738
3738
|
disabled = false,
|
|
3739
3739
|
className,
|
|
3740
3740
|
headerClassName,
|
|
3741
|
-
contentClassName
|
|
3741
|
+
contentClassName,
|
|
3742
|
+
contentExpandedClassName
|
|
3742
3743
|
}, ref) {
|
|
3743
3744
|
const defaultIcon = useCallback2((expanded) => /* @__PURE__ */ jsx6(ExpansionIcon, { isExpanded: expanded }), []);
|
|
3744
3745
|
icon ??= defaultIcon;
|
|
@@ -3774,7 +3775,7 @@ var Expandable = forwardRef2(function Expandable2({
|
|
|
3774
3775
|
className: clsx5(
|
|
3775
3776
|
"flex-col-2 px-4 transition-all duration-300 ease-in-out",
|
|
3776
3777
|
{
|
|
3777
|
-
"max-h-96 opacity-100 pb-2": isExpanded,
|
|
3778
|
+
[clsx5("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
|
|
3778
3779
|
"max-h-0 opacity-0 overflow-hidden": !isExpanded
|
|
3779
3780
|
},
|
|
3780
3781
|
contentClassName
|
|
@@ -6745,30 +6746,24 @@ var ErrorComponent = ({
|
|
|
6745
6746
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
6746
6747
|
import { useState as useState17 } from "react";
|
|
6747
6748
|
|
|
6748
|
-
// src/components/loading-states/
|
|
6749
|
-
import clsx28 from "clsx";
|
|
6750
|
-
import { jsx as jsx33
|
|
6751
|
-
var
|
|
6752
|
-
|
|
6753
|
-
loadingText,
|
|
6754
|
-
classname
|
|
6755
|
-
}) => {
|
|
6756
|
-
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6757
|
-
return /* @__PURE__ */ jsxs23("div", { className: clsx28("flex-col-2 items-center justify-center w-full h-24", classname), children: [
|
|
6758
|
-
/* @__PURE__ */ jsx33(Helpwave, { animate: "loading" }),
|
|
6759
|
-
loadingText ?? `${translation("loading")}...`
|
|
6760
|
-
] });
|
|
6749
|
+
// src/components/loading-states/LoadingContainer.tsx
|
|
6750
|
+
import { clsx as clsx28 } from "clsx";
|
|
6751
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
6752
|
+
var LoadingContainer = ({ className }) => {
|
|
6753
|
+
return /* @__PURE__ */ jsx33("div", { className: clsx28("relative overflow-hidden shimmer bg-disabled-background rounded-md", className) });
|
|
6761
6754
|
};
|
|
6762
6755
|
|
|
6763
6756
|
// src/components/loading-states/LoadingAndErrorComponent.tsx
|
|
6757
|
+
import { clsx as clsx29 } from "clsx";
|
|
6764
6758
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
6765
6759
|
var LoadingAndErrorComponent = ({
|
|
6766
6760
|
children,
|
|
6767
6761
|
isLoading = false,
|
|
6768
6762
|
hasError = false,
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
minimumLoadingDuration
|
|
6763
|
+
loadingComponent,
|
|
6764
|
+
errorComponent,
|
|
6765
|
+
minimumLoadingDuration,
|
|
6766
|
+
className
|
|
6772
6767
|
}) => {
|
|
6773
6768
|
const [isInMinimumLoading, setIsInMinimumLoading] = useState17(false);
|
|
6774
6769
|
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = useState17(false);
|
|
@@ -6780,27 +6775,42 @@ var LoadingAndErrorComponent = ({
|
|
|
6780
6775
|
}, minimumLoadingDuration);
|
|
6781
6776
|
}
|
|
6782
6777
|
if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
|
|
6783
|
-
return /* @__PURE__ */ jsx34(
|
|
6778
|
+
return loadingComponent ?? /* @__PURE__ */ jsx34(LoadingContainer, { className: clsx29(className) });
|
|
6784
6779
|
}
|
|
6785
6780
|
if (hasError) {
|
|
6786
|
-
return /* @__PURE__ */ jsx34(
|
|
6781
|
+
return errorComponent ?? /* @__PURE__ */ jsx34(LoadingContainer, { className: clsx29("bg-negative", className) });
|
|
6787
6782
|
}
|
|
6788
6783
|
return children;
|
|
6789
6784
|
};
|
|
6790
6785
|
|
|
6786
|
+
// src/components/loading-states/LoadingAnimation.tsx
|
|
6787
|
+
import clsx30 from "clsx";
|
|
6788
|
+
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6789
|
+
var LoadingAnimation = ({
|
|
6790
|
+
overwriteTranslation,
|
|
6791
|
+
loadingText,
|
|
6792
|
+
classname
|
|
6793
|
+
}) => {
|
|
6794
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6795
|
+
return /* @__PURE__ */ jsxs23("div", { className: clsx30("flex-col-2 items-center justify-center w-full h-24", classname), children: [
|
|
6796
|
+
/* @__PURE__ */ jsx35(Helpwave, { animate: "loading" }),
|
|
6797
|
+
loadingText ?? `${translation("loading")}...`
|
|
6798
|
+
] });
|
|
6799
|
+
};
|
|
6800
|
+
|
|
6791
6801
|
// src/components/loading-states/LoadingButton.tsx
|
|
6792
|
-
import
|
|
6793
|
-
import { jsx as
|
|
6802
|
+
import clsx31 from "clsx";
|
|
6803
|
+
import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6794
6804
|
var LoadingButton = ({ isLoading = false, size = "medium", onClick, ...rest }) => {
|
|
6795
6805
|
const paddingClass = ButtonUtil.paddingMapping[size];
|
|
6796
6806
|
return /* @__PURE__ */ jsxs24("div", { className: "inline-block relative", children: [
|
|
6797
|
-
isLoading && /* @__PURE__ */
|
|
6798
|
-
/* @__PURE__ */
|
|
6807
|
+
isLoading && /* @__PURE__ */ jsx36("div", { className: clsx31("flex-row-2 absolute inset-0 items-center justify-center bg-white/40", paddingClass), children: /* @__PURE__ */ jsx36(Helpwave, { animate: "loading", className: "text-white" }) }),
|
|
6808
|
+
/* @__PURE__ */ jsx36(SolidButton, { ...rest, disabled: rest.disabled, onClick: isLoading ? noop : onClick })
|
|
6799
6809
|
] });
|
|
6800
6810
|
};
|
|
6801
6811
|
|
|
6802
6812
|
// src/components/loading-states/ProgressIndicator.tsx
|
|
6803
|
-
import { jsx as
|
|
6813
|
+
import { jsx as jsx37, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
6804
6814
|
var sizeMapping = { small: 16, medium: 24, big: 48 };
|
|
6805
6815
|
var ProgressIndicator = ({
|
|
6806
6816
|
progress,
|
|
@@ -6826,7 +6836,7 @@ var ProgressIndicator = ({
|
|
|
6826
6836
|
transform: `rotate(${rotation}deg)`
|
|
6827
6837
|
},
|
|
6828
6838
|
children: [
|
|
6829
|
-
/* @__PURE__ */
|
|
6839
|
+
/* @__PURE__ */ jsx37(
|
|
6830
6840
|
"circle",
|
|
6831
6841
|
{
|
|
6832
6842
|
cx: center,
|
|
@@ -6837,7 +6847,7 @@ var ProgressIndicator = ({
|
|
|
6837
6847
|
className: "stroke-progress-indicator-fill"
|
|
6838
6848
|
}
|
|
6839
6849
|
),
|
|
6840
|
-
/* @__PURE__ */
|
|
6850
|
+
/* @__PURE__ */ jsx37(
|
|
6841
6851
|
"circle",
|
|
6842
6852
|
{
|
|
6843
6853
|
cx: center,
|
|
@@ -6856,8 +6866,8 @@ var ProgressIndicator = ({
|
|
|
6856
6866
|
};
|
|
6857
6867
|
|
|
6858
6868
|
// src/components/modals/ConfirmModal.tsx
|
|
6859
|
-
import
|
|
6860
|
-
import { jsx as
|
|
6869
|
+
import clsx32 from "clsx";
|
|
6870
|
+
import { jsx as jsx38, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
6861
6871
|
var ConfirmModal = ({
|
|
6862
6872
|
overwriteTranslation,
|
|
6863
6873
|
children,
|
|
@@ -6876,10 +6886,10 @@ var ConfirmModal = ({
|
|
|
6876
6886
|
positive: "positive",
|
|
6877
6887
|
primary: "primary"
|
|
6878
6888
|
};
|
|
6879
|
-
return /* @__PURE__ */ jsxs26(Modal, { ...restProps, onClose: onCancel, className:
|
|
6880
|
-
/* @__PURE__ */
|
|
6889
|
+
return /* @__PURE__ */ jsxs26(Modal, { ...restProps, onClose: onCancel, className: clsx32("justify-between", className), children: [
|
|
6890
|
+
/* @__PURE__ */ jsx38("div", { className: "flex-col-2 grow", children }),
|
|
6881
6891
|
/* @__PURE__ */ jsxs26("div", { className: "flex-row-4 mt-3 justify-end", children: [
|
|
6882
|
-
onCancel && /* @__PURE__ */
|
|
6892
|
+
onCancel && /* @__PURE__ */ jsx38(
|
|
6883
6893
|
SolidButton,
|
|
6884
6894
|
{
|
|
6885
6895
|
color: buttonOverwrites?.[0].color ?? "neutral",
|
|
@@ -6888,7 +6898,7 @@ var ConfirmModal = ({
|
|
|
6888
6898
|
children: buttonOverwrites?.[0].text ?? translation("cancel")
|
|
6889
6899
|
}
|
|
6890
6900
|
),
|
|
6891
|
-
onDecline && /* @__PURE__ */
|
|
6901
|
+
onDecline && /* @__PURE__ */ jsx38(
|
|
6892
6902
|
SolidButton,
|
|
6893
6903
|
{
|
|
6894
6904
|
color: buttonOverwrites?.[1].color ?? "negative",
|
|
@@ -6897,7 +6907,7 @@ var ConfirmModal = ({
|
|
|
6897
6907
|
children: buttonOverwrites?.[1].text ?? translation("decline")
|
|
6898
6908
|
}
|
|
6899
6909
|
),
|
|
6900
|
-
/* @__PURE__ */
|
|
6910
|
+
/* @__PURE__ */ jsx38(
|
|
6901
6911
|
SolidButton,
|
|
6902
6912
|
{
|
|
6903
6913
|
autoFocus: true,
|
|
@@ -6912,7 +6922,7 @@ var ConfirmModal = ({
|
|
|
6912
6922
|
};
|
|
6913
6923
|
|
|
6914
6924
|
// src/components/modals/DiscardChangesModal.tsx
|
|
6915
|
-
import { jsx as
|
|
6925
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
6916
6926
|
var DiscardChangesModal = ({
|
|
6917
6927
|
overwriteTranslation,
|
|
6918
6928
|
children,
|
|
@@ -6923,7 +6933,7 @@ var DiscardChangesModal = ({
|
|
|
6923
6933
|
...modalProps
|
|
6924
6934
|
}) => {
|
|
6925
6935
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
6926
|
-
return /* @__PURE__ */
|
|
6936
|
+
return /* @__PURE__ */ jsx39(
|
|
6927
6937
|
ConfirmModal,
|
|
6928
6938
|
{
|
|
6929
6939
|
headerProps: {
|
|
@@ -6942,18 +6952,18 @@ var DiscardChangesModal = ({
|
|
|
6942
6952
|
};
|
|
6943
6953
|
|
|
6944
6954
|
// src/components/modals/InputModal.tsx
|
|
6945
|
-
import { jsx as
|
|
6955
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
6946
6956
|
var InputModal = ({
|
|
6947
6957
|
inputs,
|
|
6948
6958
|
buttonOverwrites,
|
|
6949
6959
|
...restProps
|
|
6950
6960
|
}) => {
|
|
6951
|
-
return /* @__PURE__ */
|
|
6961
|
+
return /* @__PURE__ */ jsx40(
|
|
6952
6962
|
ConfirmModal,
|
|
6953
6963
|
{
|
|
6954
6964
|
buttonOverwrites,
|
|
6955
6965
|
...restProps,
|
|
6956
|
-
children: inputs.map((inputProps, index) => /* @__PURE__ */
|
|
6966
|
+
children: inputs.map((inputProps, index) => /* @__PURE__ */ jsx40(Input, { ...inputProps }, `input ${index}`))
|
|
6957
6967
|
}
|
|
6958
6968
|
);
|
|
6959
6969
|
};
|
|
@@ -6961,7 +6971,7 @@ var InputModal = ({
|
|
|
6961
6971
|
// src/components/user-action/Select.tsx
|
|
6962
6972
|
import { useCallback as useCallback7 } from "react";
|
|
6963
6973
|
import { useEffect as useEffect20, useState as useState19 } from "react";
|
|
6964
|
-
import
|
|
6974
|
+
import clsx35 from "clsx";
|
|
6965
6975
|
|
|
6966
6976
|
// src/components/user-action/Menu.tsx
|
|
6967
6977
|
import {
|
|
@@ -6969,7 +6979,7 @@ import {
|
|
|
6969
6979
|
useRef as useRef6,
|
|
6970
6980
|
useState as useState18
|
|
6971
6981
|
} from "react";
|
|
6972
|
-
import
|
|
6982
|
+
import clsx33 from "clsx";
|
|
6973
6983
|
|
|
6974
6984
|
// src/hooks/useOutsideClick.ts
|
|
6975
6985
|
import { useEffect as useEffect18 } from "react";
|
|
@@ -7058,17 +7068,17 @@ var usePopoverPosition = (trigger, options) => {
|
|
|
7058
7068
|
|
|
7059
7069
|
// src/components/user-action/Menu.tsx
|
|
7060
7070
|
import { createPortal } from "react-dom";
|
|
7061
|
-
import { Fragment as Fragment3, jsx as
|
|
7071
|
+
import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7062
7072
|
var MenuItem = ({
|
|
7063
7073
|
children,
|
|
7064
7074
|
onClick,
|
|
7065
7075
|
alignment = "left",
|
|
7066
7076
|
isDisabled = false,
|
|
7067
7077
|
className
|
|
7068
|
-
}) => /* @__PURE__ */
|
|
7078
|
+
}) => /* @__PURE__ */ jsx41(
|
|
7069
7079
|
"div",
|
|
7070
7080
|
{
|
|
7071
|
-
className:
|
|
7081
|
+
className: clsx33("block px-3 py-1.5 first:rounded-t-md last:rounded-b-md text-sm font-semibold", {
|
|
7072
7082
|
"text-right": alignment === "right",
|
|
7073
7083
|
"text-left": alignment === "left",
|
|
7074
7084
|
"text-disabled-text cursor-not-allowed": isDisabled,
|
|
@@ -7136,12 +7146,12 @@ var Menu = ({
|
|
|
7136
7146
|
}, [isOpen]);
|
|
7137
7147
|
return /* @__PURE__ */ jsxs27(Fragment3, { children: [
|
|
7138
7148
|
trigger(bag, triggerRef),
|
|
7139
|
-
createPortal(/* @__PURE__ */
|
|
7149
|
+
createPortal(/* @__PURE__ */ jsx41(
|
|
7140
7150
|
"div",
|
|
7141
7151
|
{
|
|
7142
7152
|
ref: menuRef,
|
|
7143
7153
|
onClick: (e) => e.stopPropagation(),
|
|
7144
|
-
className:
|
|
7154
|
+
className: clsx33(
|
|
7145
7155
|
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-10",
|
|
7146
7156
|
{
|
|
7147
7157
|
"animate-pop-in": isOpen,
|
|
@@ -7166,8 +7176,8 @@ var Menu = ({
|
|
|
7166
7176
|
|
|
7167
7177
|
// src/components/user-action/SearchBar.tsx
|
|
7168
7178
|
import { Search as Search2 } from "lucide-react";
|
|
7169
|
-
import { clsx as
|
|
7170
|
-
import { jsx as
|
|
7179
|
+
import { clsx as clsx34 } from "clsx";
|
|
7180
|
+
import { jsx as jsx42, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7171
7181
|
var SearchBar = ({
|
|
7172
7182
|
placeholder,
|
|
7173
7183
|
onSearch,
|
|
@@ -7176,31 +7186,31 @@ var SearchBar = ({
|
|
|
7176
7186
|
...inputProps
|
|
7177
7187
|
}) => {
|
|
7178
7188
|
const translation = useTranslation([formTranslation]);
|
|
7179
|
-
return /* @__PURE__ */ jsxs28("div", { className:
|
|
7180
|
-
/* @__PURE__ */
|
|
7189
|
+
return /* @__PURE__ */ jsxs28("div", { className: clsx34("flex-row-2 justify-between items-center", containerClassName), children: [
|
|
7190
|
+
/* @__PURE__ */ jsx42(
|
|
7181
7191
|
Input,
|
|
7182
7192
|
{
|
|
7183
7193
|
...inputProps,
|
|
7184
7194
|
placeholder: placeholder ?? translation("search")
|
|
7185
7195
|
}
|
|
7186
7196
|
),
|
|
7187
|
-
onSearch && /* @__PURE__ */
|
|
7197
|
+
onSearch && /* @__PURE__ */ jsx42(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ jsx42(Search2, { className: "w-full h-full" }) })
|
|
7188
7198
|
] });
|
|
7189
7199
|
};
|
|
7190
7200
|
|
|
7191
7201
|
// src/components/user-action/Select.tsx
|
|
7192
|
-
import { Fragment as Fragment4, jsx as
|
|
7202
|
+
import { Fragment as Fragment4, jsx as jsx43, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7193
7203
|
var SelectTile = ({
|
|
7194
7204
|
className,
|
|
7195
7205
|
disabledClassName,
|
|
7196
7206
|
title,
|
|
7197
7207
|
...restProps
|
|
7198
7208
|
}) => {
|
|
7199
|
-
return /* @__PURE__ */
|
|
7209
|
+
return /* @__PURE__ */ jsx43(
|
|
7200
7210
|
Tile,
|
|
7201
7211
|
{
|
|
7202
7212
|
...restProps,
|
|
7203
|
-
className:
|
|
7213
|
+
className: clsx35("px-2 py-1 rounded-md", className),
|
|
7204
7214
|
disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
|
|
7205
7215
|
title: { ...title, className: title.className ?? "font-semibold" }
|
|
7206
7216
|
}
|
|
@@ -7230,9 +7240,9 @@ var Select = ({
|
|
|
7230
7240
|
searchMapping: useCallback7((item) => item.searchTags, []),
|
|
7231
7241
|
...searchOptions
|
|
7232
7242
|
});
|
|
7233
|
-
return /* @__PURE__ */ jsxs29("div", { className:
|
|
7234
|
-
label && /* @__PURE__ */
|
|
7235
|
-
/* @__PURE__ */
|
|
7243
|
+
return /* @__PURE__ */ jsxs29("div", { className: clsx35(className), children: [
|
|
7244
|
+
label && /* @__PURE__ */ jsx43(Label, { ...label, labelType: label.labelType ?? "labelBig", className: clsx35("mb-1", label.className) }),
|
|
7245
|
+
/* @__PURE__ */ jsx43(
|
|
7236
7246
|
Menu,
|
|
7237
7247
|
{
|
|
7238
7248
|
...menuProps,
|
|
@@ -7240,7 +7250,7 @@ var Select = ({
|
|
|
7240
7250
|
"button",
|
|
7241
7251
|
{
|
|
7242
7252
|
ref,
|
|
7243
|
-
className:
|
|
7253
|
+
className: clsx35(
|
|
7244
7254
|
"btn-md justify-between w-full border-2",
|
|
7245
7255
|
{
|
|
7246
7256
|
"rounded-b-lg": !open,
|
|
@@ -7252,17 +7262,17 @@ var Select = ({
|
|
|
7252
7262
|
onClick: toggleOpen,
|
|
7253
7263
|
disabled,
|
|
7254
7264
|
children: [
|
|
7255
|
-
!isShowingHint && /* @__PURE__ */
|
|
7256
|
-
isShowingHint && /* @__PURE__ */
|
|
7257
|
-
/* @__PURE__ */
|
|
7265
|
+
!isShowingHint && /* @__PURE__ */ jsx43("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? selectedOption?.label }),
|
|
7266
|
+
isShowingHint && /* @__PURE__ */ jsx43("span", { className: clsx35("textstyle-description", hintTextClassName), children: hintText }),
|
|
7267
|
+
/* @__PURE__ */ jsx43(ExpansionIcon, { isExpanded: isOpen })
|
|
7258
7268
|
]
|
|
7259
7269
|
}
|
|
7260
7270
|
),
|
|
7261
|
-
menuClassName:
|
|
7271
|
+
menuClassName: clsx35("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
|
|
7262
7272
|
children: (bag) => {
|
|
7263
7273
|
const { close } = bag;
|
|
7264
7274
|
return /* @__PURE__ */ jsxs29(Fragment4, { children: [
|
|
7265
|
-
!searchOptions?.disabled && /* @__PURE__ */
|
|
7275
|
+
!searchOptions?.disabled && /* @__PURE__ */ jsx43(
|
|
7266
7276
|
SearchBar,
|
|
7267
7277
|
{
|
|
7268
7278
|
value: search,
|
|
@@ -7271,7 +7281,7 @@ var Select = ({
|
|
|
7271
7281
|
}
|
|
7272
7282
|
),
|
|
7273
7283
|
/* @__PURE__ */ jsxs29("div", { className: "flex-col-2 overflow-y-auto", children: [
|
|
7274
|
-
result.map((option, index) => /* @__PURE__ */
|
|
7284
|
+
result.map((option, index) => /* @__PURE__ */ jsx43(
|
|
7275
7285
|
SelectTile,
|
|
7276
7286
|
{
|
|
7277
7287
|
isSelected: option === selectedOption,
|
|
@@ -7305,7 +7315,7 @@ var SelectUncontrolled = ({
|
|
|
7305
7315
|
setSelected(value);
|
|
7306
7316
|
}
|
|
7307
7317
|
}, [options, value]);
|
|
7308
|
-
return /* @__PURE__ */
|
|
7318
|
+
return /* @__PURE__ */ jsx43(
|
|
7309
7319
|
Select,
|
|
7310
7320
|
{
|
|
7311
7321
|
value: selected,
|
|
@@ -7321,7 +7331,7 @@ var SelectUncontrolled = ({
|
|
|
7321
7331
|
};
|
|
7322
7332
|
|
|
7323
7333
|
// src/components/modals/LanguageModal.tsx
|
|
7324
|
-
import { jsx as
|
|
7334
|
+
import { jsx as jsx44, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
7325
7335
|
var defaultLanguageModalTranslation = {
|
|
7326
7336
|
en: {
|
|
7327
7337
|
language: "Language",
|
|
@@ -7344,7 +7354,7 @@ var LanguageModal = ({
|
|
|
7344
7354
|
}) => {
|
|
7345
7355
|
const { language, setLanguage } = useLanguage();
|
|
7346
7356
|
const translation = useTranslation([defaultLanguageModalTranslation], overwriteTranslation);
|
|
7347
|
-
return /* @__PURE__ */
|
|
7357
|
+
return /* @__PURE__ */ jsx44(
|
|
7348
7358
|
Modal,
|
|
7349
7359
|
{
|
|
7350
7360
|
headerProps: {
|
|
@@ -7355,7 +7365,7 @@ var LanguageModal = ({
|
|
|
7355
7365
|
onClose,
|
|
7356
7366
|
...modalProps,
|
|
7357
7367
|
children: /* @__PURE__ */ jsxs30("div", { className: "w-64", children: [
|
|
7358
|
-
/* @__PURE__ */
|
|
7368
|
+
/* @__PURE__ */ jsx44(
|
|
7359
7369
|
Select,
|
|
7360
7370
|
{
|
|
7361
7371
|
className: "mt-2",
|
|
@@ -7364,7 +7374,7 @@ var LanguageModal = ({
|
|
|
7364
7374
|
onChange: (language2) => setLanguage(language2)
|
|
7365
7375
|
}
|
|
7366
7376
|
),
|
|
7367
|
-
/* @__PURE__ */
|
|
7377
|
+
/* @__PURE__ */ jsx44("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx44(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
7368
7378
|
] })
|
|
7369
7379
|
}
|
|
7370
7380
|
);
|
|
@@ -7372,7 +7382,7 @@ var LanguageModal = ({
|
|
|
7372
7382
|
|
|
7373
7383
|
// src/theming/useTheme.tsx
|
|
7374
7384
|
import { createContext as createContext2, useContext as useContext2, useEffect as useEffect21, useState as useState20 } from "react";
|
|
7375
|
-
import { jsx as
|
|
7385
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
7376
7386
|
var themes = ["light", "dark"];
|
|
7377
7387
|
var defaultThemeTypeTranslation = {
|
|
7378
7388
|
en: {
|
|
@@ -7411,12 +7421,12 @@ var ThemeProvider = ({ children, initialTheme = "light" }) => {
|
|
|
7411
7421
|
useEffect21(() => {
|
|
7412
7422
|
document.documentElement.setAttribute("data-theme", theme);
|
|
7413
7423
|
}, [theme]);
|
|
7414
|
-
return /* @__PURE__ */
|
|
7424
|
+
return /* @__PURE__ */ jsx45(ThemeContext.Provider, { value: { theme, setTheme }, children });
|
|
7415
7425
|
};
|
|
7416
7426
|
var useTheme = () => useContext2(ThemeContext);
|
|
7417
7427
|
|
|
7418
7428
|
// src/components/modals/ThemeModal.tsx
|
|
7419
|
-
import { jsx as
|
|
7429
|
+
import { jsx as jsx46, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
7420
7430
|
var defaultConfirmDialogTranslation = {
|
|
7421
7431
|
en: {
|
|
7422
7432
|
chooseTheme: "Choose your preferred theme"
|
|
@@ -7433,7 +7443,7 @@ var ThemeModal = ({
|
|
|
7433
7443
|
}) => {
|
|
7434
7444
|
const { theme, setTheme } = useTheme();
|
|
7435
7445
|
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
7436
|
-
return /* @__PURE__ */
|
|
7446
|
+
return /* @__PURE__ */ jsx46(
|
|
7437
7447
|
Modal,
|
|
7438
7448
|
{
|
|
7439
7449
|
headerProps: {
|
|
@@ -7444,7 +7454,7 @@ var ThemeModal = ({
|
|
|
7444
7454
|
onClose,
|
|
7445
7455
|
...modalProps,
|
|
7446
7456
|
children: /* @__PURE__ */ jsxs31("div", { className: "w-64", children: [
|
|
7447
|
-
/* @__PURE__ */
|
|
7457
|
+
/* @__PURE__ */ jsx46(
|
|
7448
7458
|
Select,
|
|
7449
7459
|
{
|
|
7450
7460
|
className: "mt-2",
|
|
@@ -7453,7 +7463,7 @@ var ThemeModal = ({
|
|
|
7453
7463
|
onChange: (theme2) => setTheme(theme2)
|
|
7454
7464
|
}
|
|
7455
7465
|
),
|
|
7456
|
-
/* @__PURE__ */
|
|
7466
|
+
/* @__PURE__ */ jsx46("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx46(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
7457
7467
|
] })
|
|
7458
7468
|
}
|
|
7459
7469
|
);
|
|
@@ -7466,8 +7476,8 @@ import { Check as Check4 } from "lucide-react";
|
|
|
7466
7476
|
import { useState as useState21 } from "react";
|
|
7467
7477
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
7468
7478
|
import { Check as Check3, Minus } from "lucide-react";
|
|
7469
|
-
import
|
|
7470
|
-
import { jsx as
|
|
7479
|
+
import clsx36 from "clsx";
|
|
7480
|
+
import { jsx as jsx47, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
7471
7481
|
var checkboxSizeMapping = {
|
|
7472
7482
|
small: "size-5",
|
|
7473
7483
|
medium: "size-6",
|
|
@@ -7503,27 +7513,27 @@ var Checkbox = ({
|
|
|
7503
7513
|
const newValue = checked === "indeterminate" ? false : !checked;
|
|
7504
7514
|
propagateChange(newValue);
|
|
7505
7515
|
};
|
|
7506
|
-
return /* @__PURE__ */ jsxs32("div", { className:
|
|
7507
|
-
/* @__PURE__ */
|
|
7516
|
+
return /* @__PURE__ */ jsxs32("div", { className: clsx36("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
|
|
7517
|
+
/* @__PURE__ */ jsx47(
|
|
7508
7518
|
CheckboxPrimitive.Root,
|
|
7509
7519
|
{
|
|
7510
7520
|
onCheckedChange: propagateChange,
|
|
7511
7521
|
checked,
|
|
7512
7522
|
disabled,
|
|
7513
7523
|
id,
|
|
7514
|
-
className:
|
|
7524
|
+
className: clsx36(usedSizeClass, `items-center border-2 rounded outline-none `, {
|
|
7515
7525
|
"text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
|
|
7516
7526
|
"focus:border-primary group-hover:border-primary ": !disabled,
|
|
7517
7527
|
"bg-surface": !disabled && !checked,
|
|
7518
7528
|
"bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
|
|
7519
7529
|
}, className),
|
|
7520
7530
|
children: /* @__PURE__ */ jsxs32(CheckboxPrimitive.Indicator, { children: [
|
|
7521
|
-
checked === true && /* @__PURE__ */
|
|
7522
|
-
checked === "indeterminate" && /* @__PURE__ */
|
|
7531
|
+
checked === true && /* @__PURE__ */ jsx47(Check3, { className: innerIconSize }),
|
|
7532
|
+
checked === "indeterminate" && /* @__PURE__ */ jsx47(Minus, { className: innerIconSize })
|
|
7523
7533
|
] })
|
|
7524
7534
|
}
|
|
7525
7535
|
),
|
|
7526
|
-
label && /* @__PURE__ */
|
|
7536
|
+
label && /* @__PURE__ */ jsx47(Label, { ...label, className: clsx36(label.className), htmlFor: id })
|
|
7527
7537
|
] });
|
|
7528
7538
|
};
|
|
7529
7539
|
var CheckboxUncontrolled = ({
|
|
@@ -7542,7 +7552,7 @@ var CheckboxUncontrolled = ({
|
|
|
7542
7552
|
}
|
|
7543
7553
|
setChecked(checked2);
|
|
7544
7554
|
};
|
|
7545
|
-
return /* @__PURE__ */
|
|
7555
|
+
return /* @__PURE__ */ jsx47(
|
|
7546
7556
|
Checkbox,
|
|
7547
7557
|
{
|
|
7548
7558
|
...props,
|
|
@@ -7554,8 +7564,8 @@ var CheckboxUncontrolled = ({
|
|
|
7554
7564
|
|
|
7555
7565
|
// src/components/properties/PropertyBase.tsx
|
|
7556
7566
|
import { AlertTriangle } from "lucide-react";
|
|
7557
|
-
import
|
|
7558
|
-
import { jsx as
|
|
7567
|
+
import clsx37 from "clsx";
|
|
7568
|
+
import { jsx as jsx48, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
7559
7569
|
var PropertyBase = ({
|
|
7560
7570
|
overwriteTranslation,
|
|
7561
7571
|
name,
|
|
@@ -7569,11 +7579,11 @@ var PropertyBase = ({
|
|
|
7569
7579
|
}) => {
|
|
7570
7580
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7571
7581
|
const requiredAndNoValue = softRequired && !hasValue;
|
|
7572
|
-
return /* @__PURE__ */ jsxs33("div", { className:
|
|
7582
|
+
return /* @__PURE__ */ jsxs33("div", { className: clsx37("flex-row-0 group", className), children: [
|
|
7573
7583
|
/* @__PURE__ */ jsxs33(
|
|
7574
7584
|
"div",
|
|
7575
7585
|
{
|
|
7576
|
-
className:
|
|
7586
|
+
className: clsx37(
|
|
7577
7587
|
"flex-row-2 max-w-48 min-w-48 px-3 py-2 items-center rounded-l-xl border-2 border-r-0",
|
|
7578
7588
|
{
|
|
7579
7589
|
"bg-property-title-background text-property-title-text group-hover:border-primary": !requiredAndNoValue,
|
|
@@ -7582,15 +7592,15 @@ var PropertyBase = ({
|
|
|
7582
7592
|
className
|
|
7583
7593
|
),
|
|
7584
7594
|
children: [
|
|
7585
|
-
/* @__PURE__ */
|
|
7586
|
-
/* @__PURE__ */
|
|
7595
|
+
/* @__PURE__ */ jsx48("div", { className: "max-w-6 min-w-6 text-text-default", children: icon }),
|
|
7596
|
+
/* @__PURE__ */ jsx48("span", { className: "font-semibold", children: name })
|
|
7587
7597
|
]
|
|
7588
7598
|
}
|
|
7589
7599
|
),
|
|
7590
7600
|
/* @__PURE__ */ jsxs33(
|
|
7591
7601
|
"div",
|
|
7592
7602
|
{
|
|
7593
|
-
className:
|
|
7603
|
+
className: clsx37(
|
|
7594
7604
|
"flex-row-2 grow px-3 py-2 justify-between items-center rounded-r-xl border-2 border-l-0 min-h-15",
|
|
7595
7605
|
{
|
|
7596
7606
|
"bg-surface group-hover:border-primary": !requiredAndNoValue,
|
|
@@ -7600,13 +7610,13 @@ var PropertyBase = ({
|
|
|
7600
7610
|
),
|
|
7601
7611
|
children: [
|
|
7602
7612
|
input({ softRequired, hasValue }),
|
|
7603
|
-
requiredAndNoValue && /* @__PURE__ */
|
|
7604
|
-
onRemove && hasValue && /* @__PURE__ */
|
|
7613
|
+
requiredAndNoValue && /* @__PURE__ */ jsx48("div", { className: "text-warning", children: /* @__PURE__ */ jsx48(AlertTriangle, { size: 24 }) }),
|
|
7614
|
+
onRemove && hasValue && /* @__PURE__ */ jsx48(
|
|
7605
7615
|
TextButton,
|
|
7606
7616
|
{
|
|
7607
7617
|
onClick: onRemove,
|
|
7608
7618
|
color: "negative",
|
|
7609
|
-
className:
|
|
7619
|
+
className: clsx37("items-center", { "!text-transparent": !hasValue || readOnly }),
|
|
7610
7620
|
disabled: !hasValue || readOnly,
|
|
7611
7621
|
children: translation("remove")
|
|
7612
7622
|
}
|
|
@@ -7618,7 +7628,7 @@ var PropertyBase = ({
|
|
|
7618
7628
|
};
|
|
7619
7629
|
|
|
7620
7630
|
// src/components/properties/CheckboxProperty.tsx
|
|
7621
|
-
import { jsx as
|
|
7631
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
7622
7632
|
var CheckboxProperty = ({
|
|
7623
7633
|
overwriteTranslation,
|
|
7624
7634
|
value,
|
|
@@ -7627,14 +7637,14 @@ var CheckboxProperty = ({
|
|
|
7627
7637
|
...baseProps
|
|
7628
7638
|
}) => {
|
|
7629
7639
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7630
|
-
return /* @__PURE__ */
|
|
7640
|
+
return /* @__PURE__ */ jsx49(
|
|
7631
7641
|
PropertyBase,
|
|
7632
7642
|
{
|
|
7633
7643
|
...baseProps,
|
|
7634
7644
|
hasValue: true,
|
|
7635
7645
|
readOnly,
|
|
7636
|
-
icon: /* @__PURE__ */
|
|
7637
|
-
input: () => /* @__PURE__ */
|
|
7646
|
+
icon: /* @__PURE__ */ jsx49(Check4, { size: 24 }),
|
|
7647
|
+
input: () => /* @__PURE__ */ jsx49(
|
|
7638
7648
|
Checkbox,
|
|
7639
7649
|
{
|
|
7640
7650
|
checked: value ?? true,
|
|
@@ -7650,8 +7660,8 @@ var CheckboxProperty = ({
|
|
|
7650
7660
|
|
|
7651
7661
|
// src/components/properties/DateProperty.tsx
|
|
7652
7662
|
import { CalendarDays } from "lucide-react";
|
|
7653
|
-
import
|
|
7654
|
-
import { jsx as
|
|
7663
|
+
import clsx38 from "clsx";
|
|
7664
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
7655
7665
|
var DateProperty = ({
|
|
7656
7666
|
value,
|
|
7657
7667
|
onChange = noop,
|
|
@@ -7662,16 +7672,16 @@ var DateProperty = ({
|
|
|
7662
7672
|
}) => {
|
|
7663
7673
|
const hasValue = !!value;
|
|
7664
7674
|
const dateText = value ? type === "dateTime" ? formatDateTime(value) : formatDate(value) : "";
|
|
7665
|
-
return /* @__PURE__ */
|
|
7675
|
+
return /* @__PURE__ */ jsx50(
|
|
7666
7676
|
PropertyBase,
|
|
7667
7677
|
{
|
|
7668
7678
|
...baseProps,
|
|
7669
7679
|
hasValue,
|
|
7670
|
-
icon: /* @__PURE__ */
|
|
7671
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
7680
|
+
icon: /* @__PURE__ */ jsx50(CalendarDays, { size: 24 }),
|
|
7681
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsx50(
|
|
7672
7682
|
Input,
|
|
7673
7683
|
{
|
|
7674
|
-
className:
|
|
7684
|
+
className: clsx38("!ring-0 !border-0 !outline-0 !p-0 !m-0 !shadow-none !w-fit !rounded-none", { "bg-surface-warning": softRequired && !hasValue }),
|
|
7675
7685
|
value: dateText,
|
|
7676
7686
|
type: type === "dateTime" ? "datetime-local" : "date",
|
|
7677
7687
|
readOnly,
|
|
@@ -7693,14 +7703,14 @@ var DateProperty = ({
|
|
|
7693
7703
|
|
|
7694
7704
|
// src/components/properties/MultiSelectProperty.tsx
|
|
7695
7705
|
import { List, Plus as Plus2 } from "lucide-react";
|
|
7696
|
-
import
|
|
7706
|
+
import clsx40 from "clsx";
|
|
7697
7707
|
|
|
7698
7708
|
// src/components/user-action/MultiSelect.tsx
|
|
7699
7709
|
import { useCallback as useCallback8 } from "react";
|
|
7700
7710
|
import { useEffect as useEffect22, useState as useState22 } from "react";
|
|
7701
|
-
import
|
|
7711
|
+
import clsx39 from "clsx";
|
|
7702
7712
|
import { Plus } from "lucide-react";
|
|
7703
|
-
import { Fragment as Fragment5, jsx as
|
|
7713
|
+
import { Fragment as Fragment5, jsx as jsx51, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
7704
7714
|
var defaultMultiSelectTranslation = {
|
|
7705
7715
|
en: {
|
|
7706
7716
|
selected: `{{amount}} selected`
|
|
@@ -7732,25 +7742,25 @@ var MultiSelect = ({
|
|
|
7732
7742
|
});
|
|
7733
7743
|
const selectedItems = options.filter((value) => value.selected);
|
|
7734
7744
|
const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
|
|
7735
|
-
return /* @__PURE__ */ jsxs34("div", { className:
|
|
7736
|
-
label && /* @__PURE__ */
|
|
7745
|
+
return /* @__PURE__ */ jsxs34("div", { className: clsx39(className), children: [
|
|
7746
|
+
label && /* @__PURE__ */ jsx51(
|
|
7737
7747
|
Label,
|
|
7738
7748
|
{
|
|
7739
7749
|
...label,
|
|
7740
7750
|
htmlFor: label.name,
|
|
7741
|
-
className:
|
|
7751
|
+
className: clsx39(" mb-1", label.className),
|
|
7742
7752
|
labelType: label.labelType ?? "labelBig"
|
|
7743
7753
|
}
|
|
7744
7754
|
),
|
|
7745
|
-
/* @__PURE__ */
|
|
7755
|
+
/* @__PURE__ */ jsx51(
|
|
7746
7756
|
Menu,
|
|
7747
7757
|
{
|
|
7748
7758
|
...menuProps,
|
|
7749
|
-
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */
|
|
7759
|
+
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ jsx51(
|
|
7750
7760
|
"button",
|
|
7751
7761
|
{
|
|
7752
7762
|
ref,
|
|
7753
|
-
className:
|
|
7763
|
+
className: clsx39(
|
|
7754
7764
|
"btn-md justify-between w-full border-2 h-auto",
|
|
7755
7765
|
{
|
|
7756
7766
|
"min-h-14": useChipDisplay,
|
|
@@ -7761,18 +7771,18 @@ var MultiSelect = ({
|
|
|
7761
7771
|
),
|
|
7762
7772
|
onClick: toggleOpen,
|
|
7763
7773
|
disabled,
|
|
7764
|
-
children: useChipDisplay ? /* @__PURE__ */
|
|
7765
|
-
!isShowingHint && /* @__PURE__ */
|
|
7766
|
-
isShowingHint && /* @__PURE__ */
|
|
7767
|
-
/* @__PURE__ */
|
|
7774
|
+
children: useChipDisplay ? /* @__PURE__ */ jsx51(Fragment5, { children: isShowingHint ? /* @__PURE__ */ jsx51(IconButton, { disabled, size: "small", color: "neutral", children: /* @__PURE__ */ jsx51(Plus, {}) }) : /* @__PURE__ */ jsx51(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ jsxs34(Fragment5, { children: [
|
|
7775
|
+
!isShowingHint && /* @__PURE__ */ jsx51("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
|
|
7776
|
+
isShowingHint && /* @__PURE__ */ jsx51("span", { className: clsx39("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
|
|
7777
|
+
/* @__PURE__ */ jsx51(ExpansionIcon, { isExpanded: isOpen })
|
|
7768
7778
|
] })
|
|
7769
7779
|
}
|
|
7770
7780
|
),
|
|
7771
|
-
menuClassName:
|
|
7781
|
+
menuClassName: clsx39("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
|
|
7772
7782
|
children: (bag) => {
|
|
7773
7783
|
const { close } = bag;
|
|
7774
7784
|
return /* @__PURE__ */ jsxs34(Fragment5, { children: [
|
|
7775
|
-
!searchOptions?.disabled && /* @__PURE__ */
|
|
7785
|
+
!searchOptions?.disabled && /* @__PURE__ */ jsx51(
|
|
7776
7786
|
SearchBar,
|
|
7777
7787
|
{
|
|
7778
7788
|
value: search,
|
|
@@ -7788,10 +7798,10 @@ var MultiSelect = ({
|
|
|
7788
7798
|
selected: !value.selected
|
|
7789
7799
|
} : value));
|
|
7790
7800
|
};
|
|
7791
|
-
return /* @__PURE__ */
|
|
7801
|
+
return /* @__PURE__ */ jsx51(
|
|
7792
7802
|
SelectTile,
|
|
7793
7803
|
{
|
|
7794
|
-
prefix: /* @__PURE__ */
|
|
7804
|
+
prefix: /* @__PURE__ */ jsx51(
|
|
7795
7805
|
Checkbox,
|
|
7796
7806
|
{
|
|
7797
7807
|
checked: option.selected,
|
|
@@ -7811,7 +7821,7 @@ var MultiSelect = ({
|
|
|
7811
7821
|
] }),
|
|
7812
7822
|
/* @__PURE__ */ jsxs34("div", { className: "flex-row-2 justify-between", children: [
|
|
7813
7823
|
/* @__PURE__ */ jsxs34("div", { className: "flex-row-2", children: [
|
|
7814
|
-
/* @__PURE__ */
|
|
7824
|
+
/* @__PURE__ */ jsx51(
|
|
7815
7825
|
SolidButton,
|
|
7816
7826
|
{
|
|
7817
7827
|
color: "neutral",
|
|
@@ -7826,7 +7836,7 @@ var MultiSelect = ({
|
|
|
7826
7836
|
children: translation("all")
|
|
7827
7837
|
}
|
|
7828
7838
|
),
|
|
7829
|
-
/* @__PURE__ */
|
|
7839
|
+
/* @__PURE__ */ jsx51(
|
|
7830
7840
|
SolidButton,
|
|
7831
7841
|
{
|
|
7832
7842
|
color: "neutral",
|
|
@@ -7841,7 +7851,7 @@ var MultiSelect = ({
|
|
|
7841
7851
|
}
|
|
7842
7852
|
)
|
|
7843
7853
|
] }),
|
|
7844
|
-
/* @__PURE__ */
|
|
7854
|
+
/* @__PURE__ */ jsx51(SolidButton, { size: "small", onClick: close, children: "Done" })
|
|
7845
7855
|
] })
|
|
7846
7856
|
] });
|
|
7847
7857
|
}
|
|
@@ -7858,7 +7868,7 @@ var MultiSelectUncontrolled = ({
|
|
|
7858
7868
|
useEffect22(() => {
|
|
7859
7869
|
setUsedOptions(options);
|
|
7860
7870
|
}, [options]);
|
|
7861
|
-
return /* @__PURE__ */
|
|
7871
|
+
return /* @__PURE__ */ jsx51(
|
|
7862
7872
|
MultiSelect,
|
|
7863
7873
|
{
|
|
7864
7874
|
...props,
|
|
@@ -7872,7 +7882,7 @@ var MultiSelectUncontrolled = ({
|
|
|
7872
7882
|
};
|
|
7873
7883
|
|
|
7874
7884
|
// src/components/properties/MultiSelectProperty.tsx
|
|
7875
|
-
import { jsx as
|
|
7885
|
+
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
7876
7886
|
var MultiSelectProperty = ({
|
|
7877
7887
|
overwriteTranslation,
|
|
7878
7888
|
options,
|
|
@@ -7885,7 +7895,7 @@ var MultiSelectProperty = ({
|
|
|
7885
7895
|
}) => {
|
|
7886
7896
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
7887
7897
|
const hasValue = options.some((value) => value.selected);
|
|
7888
|
-
return /* @__PURE__ */
|
|
7898
|
+
return /* @__PURE__ */ jsx52(
|
|
7889
7899
|
PropertyBase,
|
|
7890
7900
|
{
|
|
7891
7901
|
name,
|
|
@@ -7893,12 +7903,12 @@ var MultiSelectProperty = ({
|
|
|
7893
7903
|
readOnly,
|
|
7894
7904
|
softRequired,
|
|
7895
7905
|
hasValue,
|
|
7896
|
-
icon: /* @__PURE__ */
|
|
7897
|
-
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */
|
|
7906
|
+
icon: /* @__PURE__ */ jsx52(List, { size: 24 }),
|
|
7907
|
+
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx52(
|
|
7898
7908
|
MultiSelect,
|
|
7899
7909
|
{
|
|
7900
7910
|
...multiSelectProps,
|
|
7901
|
-
className:
|
|
7911
|
+
className: clsx40("w-full", { "bg-surface-warning": softRequired2 && !hasValue }),
|
|
7902
7912
|
options,
|
|
7903
7913
|
disabled: readOnly,
|
|
7904
7914
|
useChipDisplay: true,
|
|
@@ -7911,10 +7921,10 @@ var MultiSelectProperty = ({
|
|
|
7911
7921
|
if (!onAddNew && !search.trim()) {
|
|
7912
7922
|
return void 0;
|
|
7913
7923
|
}
|
|
7914
|
-
return /* @__PURE__ */
|
|
7924
|
+
return /* @__PURE__ */ jsx52(
|
|
7915
7925
|
SelectTile,
|
|
7916
7926
|
{
|
|
7917
|
-
prefix: /* @__PURE__ */
|
|
7927
|
+
prefix: /* @__PURE__ */ jsx52(Plus2, {}),
|
|
7918
7928
|
title: { value: `${translation("add")} ${search.trim()}` },
|
|
7919
7929
|
onClick: () => {
|
|
7920
7930
|
onAddNew(search);
|
|
@@ -7924,7 +7934,7 @@ var MultiSelectProperty = ({
|
|
|
7924
7934
|
}
|
|
7925
7935
|
);
|
|
7926
7936
|
},
|
|
7927
|
-
triggerClassName:
|
|
7937
|
+
triggerClassName: clsx40(
|
|
7928
7938
|
"!border-none !p-0 !min-h-10",
|
|
7929
7939
|
{
|
|
7930
7940
|
"!bg-warning !text-surface-warning": softRequired2 && !hasValue,
|
|
@@ -7939,8 +7949,8 @@ var MultiSelectProperty = ({
|
|
|
7939
7949
|
|
|
7940
7950
|
// src/components/properties/NumberProperty.tsx
|
|
7941
7951
|
import { Binary } from "lucide-react";
|
|
7942
|
-
import
|
|
7943
|
-
import { jsx as
|
|
7952
|
+
import clsx41 from "clsx";
|
|
7953
|
+
import { jsx as jsx53, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
7944
7954
|
var defaultNumberPropertyTranslation = {
|
|
7945
7955
|
en: {
|
|
7946
7956
|
value: "Value"
|
|
@@ -7961,23 +7971,23 @@ var NumberProperty = ({
|
|
|
7961
7971
|
}) => {
|
|
7962
7972
|
const translation = useTranslation([defaultNumberPropertyTranslation], overwriteTranslation);
|
|
7963
7973
|
const hasValue = value !== void 0;
|
|
7964
|
-
return /* @__PURE__ */
|
|
7974
|
+
return /* @__PURE__ */ jsx53(
|
|
7965
7975
|
PropertyBase,
|
|
7966
7976
|
{
|
|
7967
7977
|
...baseProps,
|
|
7968
7978
|
onRemove,
|
|
7969
7979
|
hasValue,
|
|
7970
|
-
icon: /* @__PURE__ */
|
|
7980
|
+
icon: /* @__PURE__ */ jsx53(Binary, { size: 24 }),
|
|
7971
7981
|
input: ({ softRequired }) => /* @__PURE__ */ jsxs35(
|
|
7972
7982
|
"div",
|
|
7973
7983
|
{
|
|
7974
|
-
className:
|
|
7984
|
+
className: clsx41("flex-row-2 grow", { "text-warning": softRequired && !hasValue }),
|
|
7975
7985
|
children: [
|
|
7976
|
-
/* @__PURE__ */
|
|
7986
|
+
/* @__PURE__ */ jsx53(
|
|
7977
7987
|
Input,
|
|
7978
7988
|
{
|
|
7979
7989
|
expanded: false,
|
|
7980
|
-
className:
|
|
7990
|
+
className: clsx41("!ring-0 !border-0 !outline-0 !p-0 !m-0 !w-fit !shadow-none !rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
|
|
7981
7991
|
value: value?.toString() ?? "",
|
|
7982
7992
|
type: "number",
|
|
7983
7993
|
readOnly,
|
|
@@ -8000,7 +8010,7 @@ var NumberProperty = ({
|
|
|
8000
8010
|
}
|
|
8001
8011
|
}
|
|
8002
8012
|
),
|
|
8003
|
-
suffix && /* @__PURE__ */
|
|
8013
|
+
suffix && /* @__PURE__ */ jsx53("span", { className: clsx41("ml-1", { "bg-surface-warning": softRequired && !hasValue }), children: suffix })
|
|
8004
8014
|
]
|
|
8005
8015
|
}
|
|
8006
8016
|
)
|
|
@@ -8010,8 +8020,8 @@ var NumberProperty = ({
|
|
|
8010
8020
|
|
|
8011
8021
|
// src/components/properties/SelectProperty.tsx
|
|
8012
8022
|
import { List as List2, Plus as Plus3 } from "lucide-react";
|
|
8013
|
-
import
|
|
8014
|
-
import { jsx as
|
|
8023
|
+
import clsx42 from "clsx";
|
|
8024
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
8015
8025
|
var SingleSelectProperty = ({
|
|
8016
8026
|
overwriteTranslation,
|
|
8017
8027
|
value,
|
|
@@ -8025,7 +8035,7 @@ var SingleSelectProperty = ({
|
|
|
8025
8035
|
}) => {
|
|
8026
8036
|
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
8027
8037
|
const hasValue = value !== void 0;
|
|
8028
|
-
return /* @__PURE__ */
|
|
8038
|
+
return /* @__PURE__ */ jsx54(
|
|
8029
8039
|
PropertyBase,
|
|
8030
8040
|
{
|
|
8031
8041
|
name,
|
|
@@ -8033,15 +8043,15 @@ var SingleSelectProperty = ({
|
|
|
8033
8043
|
readOnly,
|
|
8034
8044
|
softRequired,
|
|
8035
8045
|
hasValue,
|
|
8036
|
-
icon: /* @__PURE__ */
|
|
8037
|
-
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */
|
|
8046
|
+
icon: /* @__PURE__ */ jsx54(List2, { size: 24 }),
|
|
8047
|
+
input: ({ softRequired: softRequired2 }) => /* @__PURE__ */ jsx54(
|
|
8038
8048
|
Select,
|
|
8039
8049
|
{
|
|
8040
8050
|
...selectProps,
|
|
8041
8051
|
value,
|
|
8042
8052
|
options,
|
|
8043
8053
|
disabled: readOnly,
|
|
8044
|
-
className:
|
|
8054
|
+
className: clsx42("w-full"),
|
|
8045
8055
|
hintText: `${translation("select")}...`,
|
|
8046
8056
|
searchOptions: {
|
|
8047
8057
|
sortingFunction: (a, b) => a.value.localeCompare(b.value),
|
|
@@ -8051,10 +8061,10 @@ var SingleSelectProperty = ({
|
|
|
8051
8061
|
if (!onAddNew && !search.trim()) {
|
|
8052
8062
|
return void 0;
|
|
8053
8063
|
}
|
|
8054
|
-
return /* @__PURE__ */
|
|
8064
|
+
return /* @__PURE__ */ jsx54(
|
|
8055
8065
|
SelectTile,
|
|
8056
8066
|
{
|
|
8057
|
-
prefix: /* @__PURE__ */
|
|
8067
|
+
prefix: /* @__PURE__ */ jsx54(Plus3, {}),
|
|
8058
8068
|
title: { value: `${translation("add")} ${search.trim()}` },
|
|
8059
8069
|
onClick: () => {
|
|
8060
8070
|
onAddNew(search);
|
|
@@ -8064,7 +8074,7 @@ var SingleSelectProperty = ({
|
|
|
8064
8074
|
}
|
|
8065
8075
|
);
|
|
8066
8076
|
},
|
|
8067
|
-
triggerClassName:
|
|
8077
|
+
triggerClassName: clsx42(
|
|
8068
8078
|
"!border-none",
|
|
8069
8079
|
{
|
|
8070
8080
|
"!bg-warning !text-surface-warning": softRequired2 && !hasValue,
|
|
@@ -8080,12 +8090,12 @@ var SingleSelectProperty = ({
|
|
|
8080
8090
|
|
|
8081
8091
|
// src/components/properties/TextProperty.tsx
|
|
8082
8092
|
import { Text } from "lucide-react";
|
|
8083
|
-
import
|
|
8093
|
+
import clsx44 from "clsx";
|
|
8084
8094
|
|
|
8085
8095
|
// src/components/user-action/Textarea.tsx
|
|
8086
8096
|
import { useEffect as useEffect23, useState as useState23 } from "react";
|
|
8087
|
-
import
|
|
8088
|
-
import { jsx as
|
|
8097
|
+
import clsx43 from "clsx";
|
|
8098
|
+
import { jsx as jsx55, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
8089
8099
|
var Textarea = ({
|
|
8090
8100
|
label,
|
|
8091
8101
|
headline,
|
|
@@ -8109,19 +8119,19 @@ var Textarea = ({
|
|
|
8109
8119
|
clearTimer();
|
|
8110
8120
|
};
|
|
8111
8121
|
return /* @__PURE__ */ jsxs36("div", { className: "w-full", children: [
|
|
8112
|
-
label && /* @__PURE__ */
|
|
8122
|
+
label && /* @__PURE__ */ jsx55(
|
|
8113
8123
|
Label,
|
|
8114
8124
|
{
|
|
8115
8125
|
...label,
|
|
8116
8126
|
htmlFor: id,
|
|
8117
|
-
className:
|
|
8127
|
+
className: clsx43("mb-1", label.className),
|
|
8118
8128
|
labelType: label.labelType ?? "labelSmall"
|
|
8119
8129
|
}
|
|
8120
8130
|
),
|
|
8121
8131
|
/* @__PURE__ */ jsxs36(
|
|
8122
8132
|
"div",
|
|
8123
8133
|
{
|
|
8124
|
-
className:
|
|
8134
|
+
className: clsx43(
|
|
8125
8135
|
"bg-surface text-on-surface relative",
|
|
8126
8136
|
{
|
|
8127
8137
|
"shadow border-2 rounded-lg": defaultStyle,
|
|
@@ -8130,12 +8140,12 @@ var Textarea = ({
|
|
|
8130
8140
|
}
|
|
8131
8141
|
),
|
|
8132
8142
|
children: [
|
|
8133
|
-
headline && /* @__PURE__ */
|
|
8134
|
-
/* @__PURE__ */
|
|
8143
|
+
headline && /* @__PURE__ */ jsx55("span", { className: "mx-3 mt-3 block textstyle-label-md", children: headline }),
|
|
8144
|
+
/* @__PURE__ */ jsx55(
|
|
8135
8145
|
"textarea",
|
|
8136
8146
|
{
|
|
8137
8147
|
id,
|
|
8138
|
-
className:
|
|
8148
|
+
className: clsx43("pt-0 px-3 border-transparent appearance-none w-full leading-tight focus:ring-0 focus:outline-none", {
|
|
8139
8149
|
"resize-none": !resizable,
|
|
8140
8150
|
"h-32": defaultStyle,
|
|
8141
8151
|
"mt-3": !headline,
|
|
@@ -8164,7 +8174,7 @@ var Textarea = ({
|
|
|
8164
8174
|
]
|
|
8165
8175
|
}
|
|
8166
8176
|
),
|
|
8167
|
-
hasFocus && disclaimer && /* @__PURE__ */
|
|
8177
|
+
hasFocus && disclaimer && /* @__PURE__ */ jsx55("label", { className: "text-negative", children: disclaimer })
|
|
8168
8178
|
] });
|
|
8169
8179
|
};
|
|
8170
8180
|
var TextareaUncontrolled = ({
|
|
@@ -8176,7 +8186,7 @@ var TextareaUncontrolled = ({
|
|
|
8176
8186
|
useEffect23(() => {
|
|
8177
8187
|
setText(value);
|
|
8178
8188
|
}, [value]);
|
|
8179
|
-
return /* @__PURE__ */
|
|
8189
|
+
return /* @__PURE__ */ jsx55(
|
|
8180
8190
|
Textarea,
|
|
8181
8191
|
{
|
|
8182
8192
|
...props,
|
|
@@ -8190,7 +8200,7 @@ var TextareaUncontrolled = ({
|
|
|
8190
8200
|
};
|
|
8191
8201
|
|
|
8192
8202
|
// src/components/properties/TextProperty.tsx
|
|
8193
|
-
import { jsx as
|
|
8203
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
8194
8204
|
var defaultTextPropertyTranslation = {
|
|
8195
8205
|
en: {
|
|
8196
8206
|
text: "Text"
|
|
@@ -8210,17 +8220,17 @@ var TextProperty = ({
|
|
|
8210
8220
|
}) => {
|
|
8211
8221
|
const translation = useTranslation([defaultTextPropertyTranslation], overwriteTranslation);
|
|
8212
8222
|
const hasValue = value !== void 0;
|
|
8213
|
-
return /* @__PURE__ */
|
|
8223
|
+
return /* @__PURE__ */ jsx56(
|
|
8214
8224
|
PropertyBase,
|
|
8215
8225
|
{
|
|
8216
8226
|
...baseProps,
|
|
8217
8227
|
onRemove,
|
|
8218
8228
|
hasValue,
|
|
8219
|
-
icon: /* @__PURE__ */
|
|
8220
|
-
input: ({ softRequired }) => /* @__PURE__ */
|
|
8229
|
+
icon: /* @__PURE__ */ jsx56(Text, { size: 24 }),
|
|
8230
|
+
input: ({ softRequired }) => /* @__PURE__ */ jsx56(
|
|
8221
8231
|
Textarea,
|
|
8222
8232
|
{
|
|
8223
|
-
className:
|
|
8233
|
+
className: clsx44("ring-0 border-0 outline-0 !px-0 p-0 m-0 shadow-none rounded-none", { "bg-surface-warning placeholder-warning": softRequired && !hasValue }),
|
|
8224
8234
|
rows: 5,
|
|
8225
8235
|
defaultStyle: false,
|
|
8226
8236
|
value: value ?? "",
|
|
@@ -8247,12 +8257,12 @@ var TextProperty = ({
|
|
|
8247
8257
|
};
|
|
8248
8258
|
|
|
8249
8259
|
// src/components/table/FillerRowElement.tsx
|
|
8250
|
-
import { clsx as
|
|
8251
|
-
import { jsx as
|
|
8260
|
+
import { clsx as clsx45 } from "clsx";
|
|
8261
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
8252
8262
|
var FillerRowElement = ({
|
|
8253
8263
|
className
|
|
8254
8264
|
}) => {
|
|
8255
|
-
return /* @__PURE__ */
|
|
8265
|
+
return /* @__PURE__ */ jsx57("div", { className: clsx45("flex flex-row items-center w-1/2 h-4 text-disabled-text font-bold", className), children: "-" });
|
|
8256
8266
|
};
|
|
8257
8267
|
|
|
8258
8268
|
// src/components/table/Filter.ts
|
|
@@ -8271,7 +8281,7 @@ var TableFilters = {
|
|
|
8271
8281
|
|
|
8272
8282
|
// src/components/table/Table.tsx
|
|
8273
8283
|
import { useCallback as useCallback9, useEffect as useEffect26, useMemo as useMemo3, useRef as useRef7, useState as useState25 } from "react";
|
|
8274
|
-
import
|
|
8284
|
+
import clsx48 from "clsx";
|
|
8275
8285
|
import {
|
|
8276
8286
|
flexRender,
|
|
8277
8287
|
getCoreRowModel,
|
|
@@ -8285,7 +8295,7 @@ import { Scrollbars as Scrollbars3 } from "react-custom-scrollbars-2";
|
|
|
8285
8295
|
// src/components/table/TableFilterButton.tsx
|
|
8286
8296
|
import { FilterIcon } from "lucide-react";
|
|
8287
8297
|
import { useEffect as useEffect24, useState as useState24 } from "react";
|
|
8288
|
-
import { Fragment as Fragment6, jsx as
|
|
8298
|
+
import { Fragment as Fragment6, jsx as jsx58, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
8289
8299
|
var defaultTableFilterTranslation = {
|
|
8290
8300
|
en: {
|
|
8291
8301
|
filter: "Filter",
|
|
@@ -8315,12 +8325,12 @@ var TableFilterButton = ({
|
|
|
8315
8325
|
useEffect24(() => {
|
|
8316
8326
|
setFilterValue(columnFilterValue);
|
|
8317
8327
|
}, [columnFilterValue]);
|
|
8318
|
-
return /* @__PURE__ */
|
|
8328
|
+
return /* @__PURE__ */ jsx58(
|
|
8319
8329
|
Menu,
|
|
8320
8330
|
{
|
|
8321
8331
|
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs37("div", { ref, className: "relative", children: [
|
|
8322
|
-
/* @__PURE__ */
|
|
8323
|
-
hasFilter && /* @__PURE__ */
|
|
8332
|
+
/* @__PURE__ */ jsx58(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ jsx58(FilterIcon, {}) }),
|
|
8333
|
+
hasFilter && /* @__PURE__ */ jsx58(
|
|
8324
8334
|
"div",
|
|
8325
8335
|
{
|
|
8326
8336
|
className: "absolute top-0.5 right-0.5 w-2 h-2 rounded-full bg-primary pointer-events-none",
|
|
@@ -8329,8 +8339,8 @@ var TableFilterButton = ({
|
|
|
8329
8339
|
)
|
|
8330
8340
|
] }),
|
|
8331
8341
|
children: ({ close }) => /* @__PURE__ */ jsxs37("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
|
|
8332
|
-
/* @__PURE__ */
|
|
8333
|
-
filterType === "text" && /* @__PURE__ */
|
|
8342
|
+
/* @__PURE__ */ jsx58("h4", { className: "textstyle-title-sm", children: translation("filter") }),
|
|
8343
|
+
filterType === "text" && /* @__PURE__ */ jsx58(
|
|
8334
8344
|
Input,
|
|
8335
8345
|
{
|
|
8336
8346
|
value: filterValue ?? "",
|
|
@@ -8341,7 +8351,7 @@ var TableFilterButton = ({
|
|
|
8341
8351
|
}
|
|
8342
8352
|
),
|
|
8343
8353
|
filterType === "range" && /* @__PURE__ */ jsxs37("div", { className: "flex-row-2 items-center", children: [
|
|
8344
|
-
/* @__PURE__ */
|
|
8354
|
+
/* @__PURE__ */ jsx58(
|
|
8345
8355
|
Input,
|
|
8346
8356
|
{
|
|
8347
8357
|
value: filterValue?.[0] ?? "",
|
|
@@ -8354,8 +8364,8 @@ var TableFilterButton = ({
|
|
|
8354
8364
|
className: "h-10 input-indicator-hidden w-40"
|
|
8355
8365
|
}
|
|
8356
8366
|
),
|
|
8357
|
-
/* @__PURE__ */
|
|
8358
|
-
/* @__PURE__ */
|
|
8367
|
+
/* @__PURE__ */ jsx58("span", { className: "font-bold", children: "-" }),
|
|
8368
|
+
/* @__PURE__ */ jsx58(
|
|
8359
8369
|
Input,
|
|
8360
8370
|
{
|
|
8361
8371
|
value: filterValue?.[1] ?? "",
|
|
@@ -8370,7 +8380,7 @@ var TableFilterButton = ({
|
|
|
8370
8380
|
)
|
|
8371
8381
|
] }),
|
|
8372
8382
|
filterType === "dateRange" && /* @__PURE__ */ jsxs37(Fragment6, { children: [
|
|
8373
|
-
/* @__PURE__ */
|
|
8383
|
+
/* @__PURE__ */ jsx58(
|
|
8374
8384
|
Input,
|
|
8375
8385
|
{
|
|
8376
8386
|
value: filterValue?.[0] ? filterValue?.[0].toISOString().slice(0, 16) : "",
|
|
@@ -8383,7 +8393,7 @@ var TableFilterButton = ({
|
|
|
8383
8393
|
className: "h-10 w-50"
|
|
8384
8394
|
}
|
|
8385
8395
|
),
|
|
8386
|
-
/* @__PURE__ */
|
|
8396
|
+
/* @__PURE__ */ jsx58(
|
|
8387
8397
|
Input,
|
|
8388
8398
|
{
|
|
8389
8399
|
value: filterValue?.[1] ? filterValue?.[1].toISOString().slice(0, 16) : "",
|
|
@@ -8398,11 +8408,11 @@ var TableFilterButton = ({
|
|
|
8398
8408
|
)
|
|
8399
8409
|
] }),
|
|
8400
8410
|
/* @__PURE__ */ jsxs37("div", { className: "flex-row-2 justify-end w-full", children: [
|
|
8401
|
-
hasFilter && /* @__PURE__ */
|
|
8411
|
+
hasFilter && /* @__PURE__ */ jsx58(SolidButton, { color: "negative", size: "small", onClick: () => {
|
|
8402
8412
|
column.setFilterValue(void 0);
|
|
8403
8413
|
close();
|
|
8404
8414
|
}, children: translation("remove") }),
|
|
8405
|
-
/* @__PURE__ */
|
|
8415
|
+
/* @__PURE__ */ jsx58(SolidButton, { size: "small", onClick: () => {
|
|
8406
8416
|
column.setFilterValue(filterValue);
|
|
8407
8417
|
close();
|
|
8408
8418
|
}, children: translation("apply") })
|
|
@@ -8414,8 +8424,8 @@ var TableFilterButton = ({
|
|
|
8414
8424
|
|
|
8415
8425
|
// src/components/table/TableSortButton.tsx
|
|
8416
8426
|
import { ChevronDown as ChevronDown3, ChevronsUpDown, ChevronUp } from "lucide-react";
|
|
8417
|
-
import
|
|
8418
|
-
import { jsx as
|
|
8427
|
+
import clsx46 from "clsx";
|
|
8428
|
+
import { jsx as jsx59 } from "react/jsx-runtime";
|
|
8419
8429
|
var TableSortButton = ({
|
|
8420
8430
|
sortDirection,
|
|
8421
8431
|
invert = false,
|
|
@@ -8423,20 +8433,20 @@ var TableSortButton = ({
|
|
|
8423
8433
|
className,
|
|
8424
8434
|
...buttonProps
|
|
8425
8435
|
}) => {
|
|
8426
|
-
let icon = /* @__PURE__ */
|
|
8436
|
+
let icon = /* @__PURE__ */ jsx59(ChevronsUpDown, { className: "w-full h-full" });
|
|
8427
8437
|
if (sortDirection) {
|
|
8428
8438
|
let usedSortDirection = sortDirection;
|
|
8429
8439
|
if (invert) {
|
|
8430
8440
|
usedSortDirection = usedSortDirection === "desc" ? "asc" : "desc";
|
|
8431
8441
|
}
|
|
8432
|
-
icon = usedSortDirection === "asc" ? /* @__PURE__ */
|
|
8442
|
+
icon = usedSortDirection === "asc" ? /* @__PURE__ */ jsx59(ChevronUp, { className: "w-full h-full" }) : /* @__PURE__ */ jsx59(ChevronDown3, { className: "w-full h-full" });
|
|
8433
8443
|
}
|
|
8434
|
-
return /* @__PURE__ */
|
|
8444
|
+
return /* @__PURE__ */ jsx59(
|
|
8435
8445
|
IconButton,
|
|
8436
8446
|
{
|
|
8437
8447
|
size: "tiny",
|
|
8438
8448
|
color,
|
|
8439
|
-
className:
|
|
8449
|
+
className: clsx46(className),
|
|
8440
8450
|
...buttonProps,
|
|
8441
8451
|
children: icon
|
|
8442
8452
|
}
|
|
@@ -8455,17 +8465,17 @@ var useResizeCallbackWrapper = (callback) => {
|
|
|
8455
8465
|
};
|
|
8456
8466
|
|
|
8457
8467
|
// src/components/table/TableCell.tsx
|
|
8458
|
-
import { clsx as
|
|
8459
|
-
import { jsx as
|
|
8468
|
+
import { clsx as clsx47 } from "clsx";
|
|
8469
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
8460
8470
|
var TableCell = ({
|
|
8461
8471
|
children,
|
|
8462
8472
|
className
|
|
8463
8473
|
}) => {
|
|
8464
|
-
return /* @__PURE__ */
|
|
8474
|
+
return /* @__PURE__ */ jsx60("span", { className: clsx47("block max-w-full overflow-ellipsis truncate", className), children });
|
|
8465
8475
|
};
|
|
8466
8476
|
|
|
8467
8477
|
// src/components/table/Table.tsx
|
|
8468
|
-
import { jsx as
|
|
8478
|
+
import { jsx as jsx61, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
8469
8479
|
var Table = ({
|
|
8470
8480
|
data,
|
|
8471
8481
|
fillerRow,
|
|
@@ -8584,7 +8594,7 @@ var Table = ({
|
|
|
8584
8594
|
minSize: 60,
|
|
8585
8595
|
maxSize: 700,
|
|
8586
8596
|
cell: ({ cell }) => {
|
|
8587
|
-
return /* @__PURE__ */
|
|
8597
|
+
return /* @__PURE__ */ jsx61(TableCell, { children: cell.getValue() });
|
|
8588
8598
|
},
|
|
8589
8599
|
...defaultColumn
|
|
8590
8600
|
},
|
|
@@ -8669,8 +8679,8 @@ var Table = ({
|
|
|
8669
8679
|
}
|
|
8670
8680
|
return colSizes;
|
|
8671
8681
|
}, [table.getState().columnSizingInfo, table.getState().columnSizing]);
|
|
8672
|
-
return /* @__PURE__ */ jsxs38("div", { ref, className:
|
|
8673
|
-
/* @__PURE__ */
|
|
8682
|
+
return /* @__PURE__ */ jsxs38("div", { ref, className: clsx48("flex-col-4", className), children: [
|
|
8683
|
+
/* @__PURE__ */ jsx61(
|
|
8674
8684
|
Scrollbars3,
|
|
8675
8685
|
{
|
|
8676
8686
|
autoHeight: true,
|
|
@@ -8680,13 +8690,13 @@ var Table = ({
|
|
|
8680
8690
|
"table",
|
|
8681
8691
|
{
|
|
8682
8692
|
ref: tableRef,
|
|
8683
|
-
className:
|
|
8693
|
+
className: clsx48(tableClassName),
|
|
8684
8694
|
style: {
|
|
8685
8695
|
...columnSizeVars,
|
|
8686
8696
|
width: Math.floor(Math.max(table.getTotalSize() - columns.length, ref.current?.offsetWidth ?? table.getTotalSize()))
|
|
8687
8697
|
},
|
|
8688
8698
|
children: [
|
|
8689
|
-
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */
|
|
8699
|
+
table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx61("colgroup", { children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx61(
|
|
8690
8700
|
"col",
|
|
8691
8701
|
{
|
|
8692
8702
|
style: {
|
|
@@ -8697,22 +8707,22 @@ var Table = ({
|
|
|
8697
8707
|
},
|
|
8698
8708
|
header.id
|
|
8699
8709
|
)) }, headerGroup.id)),
|
|
8700
|
-
/* @__PURE__ */
|
|
8710
|
+
/* @__PURE__ */ jsx61("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx61("tr", { className: table.options.meta?.headerRowClassName, children: headerGroup.headers.map((header) => {
|
|
8701
8711
|
return /* @__PURE__ */ jsxs38(
|
|
8702
8712
|
"th",
|
|
8703
8713
|
{
|
|
8704
8714
|
colSpan: header.colSpan,
|
|
8705
|
-
className:
|
|
8715
|
+
className: clsx48("relative group", header.column.columnDef.meta?.className),
|
|
8706
8716
|
children: [
|
|
8707
|
-
/* @__PURE__ */
|
|
8708
|
-
header.column.getCanSort() && /* @__PURE__ */
|
|
8717
|
+
/* @__PURE__ */ jsx61("div", { className: "flex-row-2 w-full", children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs38("div", { className: "flex-row-1 items-center", children: [
|
|
8718
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx61(
|
|
8709
8719
|
TableSortButton,
|
|
8710
8720
|
{
|
|
8711
8721
|
sortDirection: header.column.getIsSorted(),
|
|
8712
8722
|
onClick: () => header.column.toggleSorting()
|
|
8713
8723
|
}
|
|
8714
8724
|
),
|
|
8715
|
-
header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */
|
|
8725
|
+
header.column.getCanFilter() && header.column.columnDef.meta?.filterType ? /* @__PURE__ */ jsx61(
|
|
8716
8726
|
TableFilterButton,
|
|
8717
8727
|
{
|
|
8718
8728
|
column: header.column,
|
|
@@ -8724,7 +8734,7 @@ var Table = ({
|
|
|
8724
8734
|
header.getContext()
|
|
8725
8735
|
)
|
|
8726
8736
|
] }) }),
|
|
8727
|
-
header.column.getCanResize() && /* @__PURE__ */
|
|
8737
|
+
header.column.getCanResize() && /* @__PURE__ */ jsx61(
|
|
8728
8738
|
"div",
|
|
8729
8739
|
{
|
|
8730
8740
|
onMouseDown: header.getResizeHandler(),
|
|
@@ -8745,16 +8755,16 @@ var Table = ({
|
|
|
8745
8755
|
}) }, headerGroup.id)) }),
|
|
8746
8756
|
/* @__PURE__ */ jsxs38("tbody", { children: [
|
|
8747
8757
|
table.getRowModel().rows.map((row) => {
|
|
8748
|
-
return /* @__PURE__ */
|
|
8749
|
-
return /* @__PURE__ */
|
|
8758
|
+
return /* @__PURE__ */ jsx61("tr", { onClick: () => onRowClick(row, table), className: table.options.meta?.bodyRowClassName, children: row.getVisibleCells().map((cell) => {
|
|
8759
|
+
return /* @__PURE__ */ jsx61("td", { children: flexRender(
|
|
8750
8760
|
cell.column.columnDef.cell,
|
|
8751
8761
|
cell.getContext()
|
|
8752
8762
|
) }, cell.id);
|
|
8753
8763
|
}) }, row.id);
|
|
8754
8764
|
}),
|
|
8755
8765
|
range(table.getState().pagination.pageSize - table.getRowModel().rows.length, { allowEmptyRange: true }).map((row, index) => {
|
|
8756
|
-
return /* @__PURE__ */
|
|
8757
|
-
return /* @__PURE__ */
|
|
8766
|
+
return /* @__PURE__ */ jsx61("tr", { children: columns.map((column) => {
|
|
8767
|
+
return /* @__PURE__ */ jsx61("td", { children: fillerRow ? fillerRow(column.id, table) : /* @__PURE__ */ jsx61(FillerRowElement, {}) }, column.id);
|
|
8758
8768
|
}) }, "filler-row-" + index);
|
|
8759
8769
|
})
|
|
8760
8770
|
] })
|
|
@@ -8763,7 +8773,7 @@ var Table = ({
|
|
|
8763
8773
|
)
|
|
8764
8774
|
}
|
|
8765
8775
|
),
|
|
8766
|
-
/* @__PURE__ */
|
|
8776
|
+
/* @__PURE__ */ jsx61("div", { className: "flex-row-2 justify-center", children: /* @__PURE__ */ jsx61(
|
|
8767
8777
|
Pagination,
|
|
8768
8778
|
{
|
|
8769
8779
|
pageIndex: table.getState().pagination.pageIndex,
|
|
@@ -8778,7 +8788,7 @@ var TableUncontrolled = ({ data, ...props }) => {
|
|
|
8778
8788
|
useEffect26(() => {
|
|
8779
8789
|
setUsedData(data);
|
|
8780
8790
|
}, [data]);
|
|
8781
|
-
return /* @__PURE__ */
|
|
8791
|
+
return /* @__PURE__ */ jsx61(
|
|
8782
8792
|
Table,
|
|
8783
8793
|
{
|
|
8784
8794
|
...props,
|
|
@@ -8802,7 +8812,7 @@ var TableWithSelection = ({
|
|
|
8802
8812
|
{
|
|
8803
8813
|
id: selectionRowId,
|
|
8804
8814
|
header: ({ table }) => {
|
|
8805
|
-
return /* @__PURE__ */
|
|
8815
|
+
return /* @__PURE__ */ jsx61(
|
|
8806
8816
|
Checkbox,
|
|
8807
8817
|
{
|
|
8808
8818
|
checked: table.getIsSomeRowsSelected() ? "indeterminate" : table.getIsAllRowsSelected(),
|
|
@@ -8815,7 +8825,7 @@ var TableWithSelection = ({
|
|
|
8815
8825
|
);
|
|
8816
8826
|
},
|
|
8817
8827
|
cell: ({ row }) => {
|
|
8818
|
-
return /* @__PURE__ */
|
|
8828
|
+
return /* @__PURE__ */ jsx61(
|
|
8819
8829
|
Checkbox,
|
|
8820
8830
|
{
|
|
8821
8831
|
disabled: !row.getCanSelect(),
|
|
@@ -8834,15 +8844,15 @@ var TableWithSelection = ({
|
|
|
8834
8844
|
...columns
|
|
8835
8845
|
];
|
|
8836
8846
|
}, [columns, selectionRowId]);
|
|
8837
|
-
return /* @__PURE__ */
|
|
8847
|
+
return /* @__PURE__ */ jsx61(
|
|
8838
8848
|
Table,
|
|
8839
8849
|
{
|
|
8840
8850
|
columns: columnsWithSelection,
|
|
8841
8851
|
fillerRow: (columnId, table) => {
|
|
8842
8852
|
if (columnId === selectionRowId) {
|
|
8843
|
-
return /* @__PURE__ */
|
|
8853
|
+
return /* @__PURE__ */ jsx61(Checkbox, { checked: false, disabled: true, containerClassName: "max-w-6" });
|
|
8844
8854
|
}
|
|
8845
|
-
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */
|
|
8855
|
+
return fillerRow ? fillerRow(columnId, table) : /* @__PURE__ */ jsx61(FillerRowElement, {});
|
|
8846
8856
|
},
|
|
8847
8857
|
state: {
|
|
8848
8858
|
rowSelection,
|
|
@@ -8856,7 +8866,7 @@ var TableWithSelection = ({
|
|
|
8856
8866
|
},
|
|
8857
8867
|
meta: {
|
|
8858
8868
|
...meta,
|
|
8859
|
-
bodyRowClassName:
|
|
8869
|
+
bodyRowClassName: clsx48(
|
|
8860
8870
|
{ "cursor-pointer": !disableClickRowClickSelection },
|
|
8861
8871
|
meta?.bodyRowClassName
|
|
8862
8872
|
)
|
|
@@ -8868,7 +8878,7 @@ var TableWithSelection = ({
|
|
|
8868
8878
|
|
|
8869
8879
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
8870
8880
|
import { useState as useState26 } from "react";
|
|
8871
|
-
import { clsx as
|
|
8881
|
+
import { clsx as clsx49 } from "clsx";
|
|
8872
8882
|
|
|
8873
8883
|
// src/util/writeToClipboard.ts
|
|
8874
8884
|
var writeToClipboard = (text) => {
|
|
@@ -8877,7 +8887,7 @@ var writeToClipboard = (text) => {
|
|
|
8877
8887
|
|
|
8878
8888
|
// src/components/user-action/CopyToClipboardWrapper.tsx
|
|
8879
8889
|
import { CheckIcon, Copy } from "lucide-react";
|
|
8880
|
-
import { jsx as
|
|
8890
|
+
import { jsx as jsx62, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
8881
8891
|
var CopyToClipboardWrapper = ({
|
|
8882
8892
|
children,
|
|
8883
8893
|
textToCopy,
|
|
@@ -8911,7 +8921,7 @@ var CopyToClipboardWrapper = ({
|
|
|
8911
8921
|
return /* @__PURE__ */ jsxs39(
|
|
8912
8922
|
"div",
|
|
8913
8923
|
{
|
|
8914
|
-
className:
|
|
8924
|
+
className: clsx49("relative inline-block cursor-copy", containerClassName),
|
|
8915
8925
|
onMouseEnter: () => {
|
|
8916
8926
|
setIsShowingIndication(true);
|
|
8917
8927
|
},
|
|
@@ -8929,7 +8939,7 @@ var CopyToClipboardWrapper = ({
|
|
|
8929
8939
|
/* @__PURE__ */ jsxs39(
|
|
8930
8940
|
"div",
|
|
8931
8941
|
{
|
|
8932
|
-
className:
|
|
8942
|
+
className: clsx49(
|
|
8933
8943
|
`absolute text-xs font-semibold text-tooltip-text px-2 py-1 rounded whitespace-nowrap
|
|
8934
8944
|
shadow-around-md bg-tooltip-background cursor-default pointer-events-none`,
|
|
8935
8945
|
"transition-opacity duration-200",
|
|
@@ -8942,17 +8952,17 @@ var CopyToClipboardWrapper = ({
|
|
|
8942
8952
|
},
|
|
8943
8953
|
children: [
|
|
8944
8954
|
isShowingConfirmation && /* @__PURE__ */ jsxs39("div", { className: "flex-row-1", children: [
|
|
8945
|
-
/* @__PURE__ */
|
|
8955
|
+
/* @__PURE__ */ jsx62(CheckIcon, { size: 16, className: "text-positive" }),
|
|
8946
8956
|
translation("copied")
|
|
8947
8957
|
] }),
|
|
8948
8958
|
isShowingIndication && /* @__PURE__ */ jsxs39("div", { className: "flex-row-1 text-description", children: [
|
|
8949
|
-
/* @__PURE__ */
|
|
8959
|
+
/* @__PURE__ */ jsx62(Copy, { size: 16 }),
|
|
8950
8960
|
translation("clickToCopy")
|
|
8951
8961
|
] }),
|
|
8952
|
-
/* @__PURE__ */
|
|
8962
|
+
/* @__PURE__ */ jsx62(
|
|
8953
8963
|
"div",
|
|
8954
8964
|
{
|
|
8955
|
-
className:
|
|
8965
|
+
className: clsx49(`absolute w-0 h-0`, triangleClasses[position]),
|
|
8956
8966
|
style: { ...triangleStyle[position], zIndex: zIndex + 1 }
|
|
8957
8967
|
}
|
|
8958
8968
|
)
|
|
@@ -8965,8 +8975,8 @@ var CopyToClipboardWrapper = ({
|
|
|
8965
8975
|
};
|
|
8966
8976
|
|
|
8967
8977
|
// src/components/user-action/DateAndTimePicker.tsx
|
|
8968
|
-
import
|
|
8969
|
-
import { jsx as
|
|
8978
|
+
import clsx50 from "clsx";
|
|
8979
|
+
import { jsx as jsx63, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
8970
8980
|
var DateTimePicker = ({
|
|
8971
8981
|
overwriteTranslation,
|
|
8972
8982
|
value = /* @__PURE__ */ new Date(),
|
|
@@ -8985,7 +8995,7 @@ var DateTimePicker = ({
|
|
|
8985
8995
|
let dateDisplay;
|
|
8986
8996
|
let timeDisplay;
|
|
8987
8997
|
if (useDate) {
|
|
8988
|
-
dateDisplay = /* @__PURE__ */
|
|
8998
|
+
dateDisplay = /* @__PURE__ */ jsx63(
|
|
8989
8999
|
DatePicker,
|
|
8990
9000
|
{
|
|
8991
9001
|
...datePickerProps,
|
|
@@ -8999,11 +9009,11 @@ var DateTimePicker = ({
|
|
|
8999
9009
|
);
|
|
9000
9010
|
}
|
|
9001
9011
|
if (useTime) {
|
|
9002
|
-
timeDisplay = /* @__PURE__ */
|
|
9012
|
+
timeDisplay = /* @__PURE__ */ jsx63(
|
|
9003
9013
|
TimePicker,
|
|
9004
9014
|
{
|
|
9005
9015
|
...timePickerProps,
|
|
9006
|
-
className:
|
|
9016
|
+
className: clsx50("h-full", { "justify-between w-full": mode === "time" }),
|
|
9007
9017
|
maxHeight: 250,
|
|
9008
9018
|
time: value,
|
|
9009
9019
|
onChange
|
|
@@ -9015,9 +9025,9 @@ var DateTimePicker = ({
|
|
|
9015
9025
|
dateDisplay,
|
|
9016
9026
|
timeDisplay
|
|
9017
9027
|
] }),
|
|
9018
|
-
/* @__PURE__ */
|
|
9019
|
-
/* @__PURE__ */
|
|
9020
|
-
/* @__PURE__ */
|
|
9028
|
+
/* @__PURE__ */ jsx63("div", { className: "flex-row-2 justify-end", children: /* @__PURE__ */ jsxs40("div", { className: "flex-row-2 mt-1", children: [
|
|
9029
|
+
/* @__PURE__ */ jsx63(SolidButton, { size: "medium", color: "negative", onClick: onRemove, children: translation("clear") }),
|
|
9030
|
+
/* @__PURE__ */ jsx63(
|
|
9021
9031
|
SolidButton,
|
|
9022
9032
|
{
|
|
9023
9033
|
size: "medium",
|
|
@@ -9031,8 +9041,8 @@ var DateTimePicker = ({
|
|
|
9031
9041
|
|
|
9032
9042
|
// src/components/user-action/ScrollPicker.tsx
|
|
9033
9043
|
import { useCallback as useCallback10, useEffect as useEffect27, useState as useState27 } from "react";
|
|
9034
|
-
import
|
|
9035
|
-
import { jsx as
|
|
9044
|
+
import clsx51 from "clsx";
|
|
9045
|
+
import { jsx as jsx64, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
9036
9046
|
var up = 1;
|
|
9037
9047
|
var down = -1;
|
|
9038
9048
|
var ScrollPicker = ({
|
|
@@ -9171,7 +9181,7 @@ var ScrollPicker = ({
|
|
|
9171
9181
|
}
|
|
9172
9182
|
return clamp(1 - opacityValue / max);
|
|
9173
9183
|
};
|
|
9174
|
-
return /* @__PURE__ */
|
|
9184
|
+
return /* @__PURE__ */ jsx64(
|
|
9175
9185
|
"div",
|
|
9176
9186
|
{
|
|
9177
9187
|
className: "relative overflow-hidden",
|
|
@@ -9182,14 +9192,14 @@ var ScrollPicker = ({
|
|
|
9182
9192
|
}
|
|
9183
9193
|
},
|
|
9184
9194
|
children: /* @__PURE__ */ jsxs41("div", { className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2", children: [
|
|
9185
|
-
/* @__PURE__ */
|
|
9195
|
+
/* @__PURE__ */ jsx64(
|
|
9186
9196
|
"div",
|
|
9187
9197
|
{
|
|
9188
9198
|
className: "absolute z-[1] top-1/2 -translate-y-1/2 -translate-x-1/2 left-1/2 w-full min-w-[40px] border border-divider/30 border-y-2 border-x-0 ",
|
|
9189
9199
|
style: { height: `${itemHeight}px` }
|
|
9190
9200
|
}
|
|
9191
9201
|
),
|
|
9192
|
-
/* @__PURE__ */
|
|
9202
|
+
/* @__PURE__ */ jsx64(
|
|
9193
9203
|
"div",
|
|
9194
9204
|
{
|
|
9195
9205
|
className: "flex-col-2 select-none",
|
|
@@ -9197,10 +9207,10 @@ var ScrollPicker = ({
|
|
|
9197
9207
|
transform: `translateY(${-transition * (distance + itemHeight)}px)`,
|
|
9198
9208
|
columnGap: `${distance}px`
|
|
9199
9209
|
},
|
|
9200
|
-
children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */
|
|
9210
|
+
children: shownItems.map(({ name, index }, arrayIndex) => /* @__PURE__ */ jsx64(
|
|
9201
9211
|
"div",
|
|
9202
9212
|
{
|
|
9203
|
-
className:
|
|
9213
|
+
className: clsx51(
|
|
9204
9214
|
`flex-col-2 items-center justify-center rounded-md`,
|
|
9205
9215
|
{
|
|
9206
9216
|
"text-primary font-bold": currentIndex === index,
|
|
@@ -9229,8 +9239,8 @@ var ScrollPicker = ({
|
|
|
9229
9239
|
// src/components/user-action/ToggleableInput.tsx
|
|
9230
9240
|
import { useEffect as useEffect28, useRef as useRef8, useState as useState28 } from "react";
|
|
9231
9241
|
import { Pencil } from "lucide-react";
|
|
9232
|
-
import
|
|
9233
|
-
import { jsx as
|
|
9242
|
+
import clsx52 from "clsx";
|
|
9243
|
+
import { jsx as jsx65, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
9234
9244
|
var ToggleableInput = ({
|
|
9235
9245
|
type = "text",
|
|
9236
9246
|
value,
|
|
@@ -9261,10 +9271,10 @@ var ToggleableInput = ({
|
|
|
9261
9271
|
/* @__PURE__ */ jsxs42(
|
|
9262
9272
|
"div",
|
|
9263
9273
|
{
|
|
9264
|
-
className:
|
|
9274
|
+
className: clsx52("flex-row-2 items-center w-full overflow-hidden", { "cursor-pointer": !isEditing }),
|
|
9265
9275
|
onClick: () => !isEditing ? setIsEditing(!isEditing) : void 0,
|
|
9266
9276
|
children: [
|
|
9267
|
-
/* @__PURE__ */
|
|
9277
|
+
/* @__PURE__ */ jsx65("div", { className: clsx52("flex-row-2 overflow-hidden", { "flex-1": isEditing }), children: isEditing ? /* @__PURE__ */ jsx65(
|
|
9268
9278
|
"input",
|
|
9269
9279
|
{
|
|
9270
9280
|
ref,
|
|
@@ -9292,16 +9302,16 @@ var ToggleableInput = ({
|
|
|
9292
9302
|
onEditCompletedWrapper(value);
|
|
9293
9303
|
}
|
|
9294
9304
|
},
|
|
9295
|
-
className:
|
|
9305
|
+
className: clsx52(`w-full border-none rounded-none ring-0 outline-0 text-inherit bg-inherit shadow-transparent decoration-primary p-0 underline-offset-4`, {
|
|
9296
9306
|
underline: isEditing
|
|
9297
9307
|
}, labelClassName),
|
|
9298
9308
|
onFocus: (event) => event.target.select()
|
|
9299
9309
|
}
|
|
9300
|
-
) : /* @__PURE__ */
|
|
9301
|
-
/* @__PURE__ */
|
|
9310
|
+
) : /* @__PURE__ */ jsx65("span", { className: clsx52("max-w-xs break-words overflow-hidden", labelClassName), children: value }) }),
|
|
9311
|
+
/* @__PURE__ */ jsx65(
|
|
9302
9312
|
Pencil,
|
|
9303
9313
|
{
|
|
9304
|
-
className:
|
|
9314
|
+
className: clsx52(`cursor-pointer`, { "text-transparent": isEditing }),
|
|
9305
9315
|
size,
|
|
9306
9316
|
style: { minWidth: `${size}px` }
|
|
9307
9317
|
}
|
|
@@ -9309,7 +9319,7 @@ var ToggleableInput = ({
|
|
|
9309
9319
|
]
|
|
9310
9320
|
}
|
|
9311
9321
|
),
|
|
9312
|
-
isEditing && disclaimer && /* @__PURE__ */
|
|
9322
|
+
isEditing && disclaimer && /* @__PURE__ */ jsx65("label", { className: "text-negative", children: disclaimer })
|
|
9313
9323
|
] });
|
|
9314
9324
|
};
|
|
9315
9325
|
var ToggleableInputUncontrolled = ({
|
|
@@ -9321,7 +9331,7 @@ var ToggleableInputUncontrolled = ({
|
|
|
9321
9331
|
useEffect28(() => {
|
|
9322
9332
|
setValue(initialValue);
|
|
9323
9333
|
}, [initialValue]);
|
|
9324
|
-
return /* @__PURE__ */
|
|
9334
|
+
return /* @__PURE__ */ jsx65(
|
|
9325
9335
|
ToggleableInput,
|
|
9326
9336
|
{
|
|
9327
9337
|
value,
|
|
@@ -9435,6 +9445,7 @@ export {
|
|
|
9435
9445
|
LoadingAndErrorComponent,
|
|
9436
9446
|
LoadingAnimation,
|
|
9437
9447
|
LoadingButton,
|
|
9448
|
+
LoadingContainer,
|
|
9438
9449
|
LocalStorageService,
|
|
9439
9450
|
LoopingArrayCalculator,
|
|
9440
9451
|
MarkdownInterpreter,
|