@helpwave/hightide 0.1.23 → 0.1.25
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 +48 -53
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +58 -63
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs +4 -4
- package/dist/components/date/DayPicker.mjs.map +1 -1
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs +2 -2
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +26 -29
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +31 -34
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.js +40 -43
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +48 -51
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +40 -43
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +40 -43
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js +40 -43
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +46 -49
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.js +40 -43
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +50 -53
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js +40 -43
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +50 -53
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.js +26 -29
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +30 -33
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +2 -2
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +2 -2
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +2 -2
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/LoadingButton.js +26 -29
- package/dist/components/loading-states/LoadingButton.js.map +1 -1
- package/dist/components/loading-states/LoadingButton.mjs +26 -29
- package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js +40 -43
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +48 -51
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js +40 -43
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +48 -51
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.js +40 -43
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +48 -51
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +43 -49
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +67 -73
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +43 -49
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +68 -74
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +96 -75
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +98 -77
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +48 -53
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +50 -55
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +114 -93
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +135 -114
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +48 -53
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +50 -55
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +48 -53
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +50 -55
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.js +65 -73
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +86 -94
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +51 -56
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +57 -62
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js +88 -65
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +114 -91
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +40 -43
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +44 -47
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/table/TableSortButton.js +40 -43
- package/dist/components/table/TableSortButton.js.map +1 -1
- package/dist/components/table/TableSortButton.mjs +40 -43
- package/dist/components/table/TableSortButton.mjs.map +1 -1
- package/dist/components/user-action/Button.d.mts +3 -3
- package/dist/components/user-action/Button.d.ts +3 -3
- package/dist/components/user-action/Button.js +76 -84
- package/dist/components/user-action/Button.js.map +1 -1
- package/dist/components/user-action/Button.mjs +76 -84
- package/dist/components/user-action/Button.mjs.map +1 -1
- package/dist/components/user-action/Checkbox.js +48 -22
- package/dist/components/user-action/Checkbox.js.map +1 -1
- package/dist/components/user-action/Checkbox.mjs +48 -22
- package/dist/components/user-action/Checkbox.mjs.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.mjs +2 -2
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +48 -53
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +60 -65
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.js +92 -69
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +114 -91
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.js +40 -43
- package/dist/components/user-action/SearchBar.js.map +1 -1
- package/dist/components/user-action/SearchBar.mjs +42 -45
- package/dist/components/user-action/SearchBar.mjs.map +1 -1
- package/dist/components/user-action/Select.js +43 -49
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +49 -55
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/components/user-action/Textarea.js +3 -3
- package/dist/components/user-action/Textarea.js.map +1 -1
- package/dist/components/user-action/Textarea.mjs +3 -3
- package/dist/components/user-action/Textarea.mjs.map +1 -1
- package/dist/css/globals.css +269 -136
- package/dist/css/uncompiled/theme/index.css +1 -2
- package/dist/hooks/useLocalStorage.js +1 -3
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +3 -4
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/index.js +141 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +216 -204
- package/dist/index.mjs.map +1 -1
- package/dist/localization/LanguageProvider.js +0 -3
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +5 -8
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs +2 -2
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/theming/useTheme.js +3 -6
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +8 -11
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/css/uncompiled/theme/theme.css +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// src/components/user-action/MultiSelect.tsx
|
|
2
2
|
import { useCallback as useCallback5 } from "react";
|
|
3
|
-
import { useEffect as
|
|
3
|
+
import { useEffect as useEffect10, useState as useState10 } from "react";
|
|
4
4
|
|
|
5
5
|
// src/localization/LanguageProvider.tsx
|
|
6
|
-
import { createContext, useContext, useEffect
|
|
6
|
+
import { createContext, useContext, useEffect, useState as useState2 } from "react";
|
|
7
7
|
|
|
8
8
|
// src/hooks/useLocalStorage.ts
|
|
9
|
-
import { useCallback,
|
|
9
|
+
import { useCallback, useState } from "react";
|
|
10
10
|
|
|
11
11
|
// src/localization/util.ts
|
|
12
12
|
var languages = ["en", "de"];
|
|
@@ -139,7 +139,6 @@ var ButtonUtil = {
|
|
|
139
139
|
};
|
|
140
140
|
var SolidButton = forwardRef(function SolidButton2({
|
|
141
141
|
children,
|
|
142
|
-
disabled = false,
|
|
143
142
|
color = "primary",
|
|
144
143
|
size = "medium",
|
|
145
144
|
startIcon,
|
|
@@ -149,35 +148,33 @@ var SolidButton = forwardRef(function SolidButton2({
|
|
|
149
148
|
...restProps
|
|
150
149
|
}, ref) {
|
|
151
150
|
const colorClasses = {
|
|
152
|
-
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
153
|
-
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
154
|
-
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
155
|
-
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
156
|
-
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
157
|
-
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
158
|
-
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
|
|
151
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
152
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
153
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
154
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
155
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
156
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
157
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
|
|
159
158
|
}[color];
|
|
160
159
|
const iconColorClasses = {
|
|
161
|
-
primary: "text-button-solid-primary-icon",
|
|
162
|
-
secondary: "text-button-solid-secondary-icon",
|
|
163
|
-
tertiary: "text-button-solid-tertiary-icon",
|
|
164
|
-
positive: "text-button-solid-positive-icon",
|
|
165
|
-
warning: "text-button-solid-warning-icon",
|
|
166
|
-
negative: "text-button-solid-negative-icon",
|
|
167
|
-
neutral: "text-button-solid-neutral-icon"
|
|
160
|
+
primary: "not-group-disabled:text-button-solid-primary-icon",
|
|
161
|
+
secondary: "not-group-disabled:text-button-solid-secondary-icon",
|
|
162
|
+
tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
|
|
163
|
+
positive: "not-group-disabled:text-button-solid-positive-icon",
|
|
164
|
+
warning: "not-group-disabled:text-button-solid-warning-icon",
|
|
165
|
+
negative: "not-group-disabled:text-button-solid-negative-icon",
|
|
166
|
+
neutral: "not-group-disabled:text-button-solid-neutral-icon"
|
|
168
167
|
}[color];
|
|
169
168
|
return /* @__PURE__ */ jsxs(
|
|
170
169
|
"button",
|
|
171
170
|
{
|
|
172
171
|
ref,
|
|
173
172
|
onClick,
|
|
174
|
-
disabled,
|
|
175
173
|
className: clsx2(
|
|
176
|
-
"font-semibold",
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
},
|
|
174
|
+
"group font-semibold",
|
|
175
|
+
colorClasses,
|
|
176
|
+
"not-disabled:hover:brightness-90",
|
|
177
|
+
"disabled:text-disabled-text disabled:bg-disabled-background",
|
|
181
178
|
ButtonUtil.paddingMapping[size],
|
|
182
179
|
className
|
|
183
180
|
),
|
|
@@ -186,10 +183,10 @@ var SolidButton = forwardRef(function SolidButton2({
|
|
|
186
183
|
startIcon && /* @__PURE__ */ jsx3(
|
|
187
184
|
"span",
|
|
188
185
|
{
|
|
189
|
-
className: clsx2(
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
186
|
+
className: clsx2(
|
|
187
|
+
iconColorClasses,
|
|
188
|
+
"group-disabled:text-disabled-icon"
|
|
189
|
+
),
|
|
193
190
|
children: startIcon
|
|
194
191
|
}
|
|
195
192
|
),
|
|
@@ -197,10 +194,10 @@ var SolidButton = forwardRef(function SolidButton2({
|
|
|
197
194
|
endIcon && /* @__PURE__ */ jsx3(
|
|
198
195
|
"span",
|
|
199
196
|
{
|
|
200
|
-
className: clsx2(
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
197
|
+
className: clsx2(
|
|
198
|
+
iconColorClasses,
|
|
199
|
+
"group-disabled:text-disabled-icon"
|
|
200
|
+
),
|
|
204
201
|
children: endIcon
|
|
205
202
|
}
|
|
206
203
|
)
|
|
@@ -210,32 +207,32 @@ var SolidButton = forwardRef(function SolidButton2({
|
|
|
210
207
|
});
|
|
211
208
|
var IconButton = ({
|
|
212
209
|
children,
|
|
213
|
-
disabled = false,
|
|
214
210
|
color = "primary",
|
|
215
211
|
size = "medium",
|
|
216
212
|
className,
|
|
217
213
|
...restProps
|
|
218
214
|
}) => {
|
|
219
215
|
const colorClasses = {
|
|
220
|
-
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
221
|
-
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
222
|
-
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
223
|
-
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
224
|
-
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
225
|
-
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
226
|
-
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
|
|
227
|
-
transparent: "bg-transparent"
|
|
216
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
217
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
218
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
219
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
220
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
221
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
222
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
|
|
223
|
+
transparent: "not-disabled:bg-transparent"
|
|
228
224
|
}[color];
|
|
229
225
|
return /* @__PURE__ */ jsx3(
|
|
230
226
|
"button",
|
|
231
227
|
{
|
|
232
|
-
disabled,
|
|
233
228
|
className: clsx2(
|
|
229
|
+
colorClasses,
|
|
230
|
+
"not-disabled:hover:brightness-90",
|
|
231
|
+
"disabled:text-disabled-text",
|
|
234
232
|
{
|
|
235
|
-
"
|
|
236
|
-
"
|
|
237
|
-
"hover:bg-button-text-hover-background":
|
|
238
|
-
[clsx2(colorClasses, "hover:brightness-90")]: !disabled
|
|
233
|
+
"disabled:bg-disabled-background": color !== "transparent",
|
|
234
|
+
"disabled:opacity-70": color === "transparent",
|
|
235
|
+
"not-disabled:hover:bg-button-text-hover-background": color === "transparent"
|
|
239
236
|
},
|
|
240
237
|
ButtonUtil.iconPaddingMapping[size],
|
|
241
238
|
className
|
|
@@ -428,13 +425,13 @@ var formTranslation = {
|
|
|
428
425
|
};
|
|
429
426
|
|
|
430
427
|
// src/components/user-action/Menu.tsx
|
|
431
|
-
import { useEffect as
|
|
428
|
+
import { useEffect as useEffect4, useRef, useState as useState4 } from "react";
|
|
432
429
|
import clsx4 from "clsx";
|
|
433
430
|
|
|
434
431
|
// src/hooks/useOutsideClick.ts
|
|
435
|
-
import { useEffect as
|
|
432
|
+
import { useEffect as useEffect2 } from "react";
|
|
436
433
|
var useOutsideClick = (refs, handler) => {
|
|
437
|
-
|
|
434
|
+
useEffect2(() => {
|
|
438
435
|
const listener = (event) => {
|
|
439
436
|
if (event.target === null) return;
|
|
440
437
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -452,7 +449,7 @@ var useOutsideClick = (refs, handler) => {
|
|
|
452
449
|
};
|
|
453
450
|
|
|
454
451
|
// src/hooks/useHoverState.ts
|
|
455
|
-
import { useEffect as
|
|
452
|
+
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
456
453
|
var defaultUseHoverStateProps = {
|
|
457
454
|
closingDelay: 200,
|
|
458
455
|
isDisabled: false
|
|
@@ -476,14 +473,14 @@ var useHoverState = (props = void 0) => {
|
|
|
476
473
|
setIsHovered(false);
|
|
477
474
|
}, closingDelay));
|
|
478
475
|
};
|
|
479
|
-
|
|
476
|
+
useEffect3(() => {
|
|
480
477
|
if (timer) {
|
|
481
478
|
return () => {
|
|
482
479
|
clearTimeout(timer);
|
|
483
480
|
};
|
|
484
481
|
}
|
|
485
482
|
});
|
|
486
|
-
|
|
483
|
+
useEffect3(() => {
|
|
487
484
|
if (timer) {
|
|
488
485
|
clearTimeout(timer);
|
|
489
486
|
}
|
|
@@ -596,7 +593,7 @@ var Menu = ({
|
|
|
596
593
|
triggerRef.current?.getBoundingClientRect(),
|
|
597
594
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
598
595
|
);
|
|
599
|
-
|
|
596
|
+
useEffect4(() => {
|
|
600
597
|
if (!isOpen) return;
|
|
601
598
|
const triggerEl = triggerRef.current;
|
|
602
599
|
if (!triggerEl) return;
|
|
@@ -613,7 +610,7 @@ var Menu = ({
|
|
|
613
610
|
window.removeEventListener("resize", close);
|
|
614
611
|
};
|
|
615
612
|
}, [isOpen, setIsOpen]);
|
|
616
|
-
|
|
613
|
+
useEffect4(() => {
|
|
617
614
|
if (isOpen) {
|
|
618
615
|
setIsHidden(false);
|
|
619
616
|
}
|
|
@@ -649,7 +646,7 @@ var Menu = ({
|
|
|
649
646
|
};
|
|
650
647
|
|
|
651
648
|
// src/components/layout-and-navigation/Expandable.tsx
|
|
652
|
-
import { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as
|
|
649
|
+
import { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as useEffect5, useState as useState5 } from "react";
|
|
653
650
|
import { ChevronDown } from "lucide-react";
|
|
654
651
|
import clsx5 from "clsx";
|
|
655
652
|
|
|
@@ -735,7 +732,7 @@ var ExpandableUncontrolled = forwardRef2(function ExpandableUncontrolled2({
|
|
|
735
732
|
...props
|
|
736
733
|
}, ref) {
|
|
737
734
|
const [usedIsExpanded, setUsedIsExpanded] = useState5(isExpanded);
|
|
738
|
-
|
|
735
|
+
useEffect5(() => {
|
|
739
736
|
setUsedIsExpanded(isExpanded);
|
|
740
737
|
}, [isExpanded]);
|
|
741
738
|
return /* @__PURE__ */ jsx6(
|
|
@@ -753,11 +750,11 @@ var ExpandableUncontrolled = forwardRef2(function ExpandableUncontrolled2({
|
|
|
753
750
|
});
|
|
754
751
|
|
|
755
752
|
// src/components/user-action/Input.tsx
|
|
756
|
-
import { forwardRef as forwardRef3, useEffect as
|
|
753
|
+
import { forwardRef as forwardRef3, useEffect as useEffect8, useImperativeHandle, useRef as useRef2, useState as useState7 } from "react";
|
|
757
754
|
import clsx6 from "clsx";
|
|
758
755
|
|
|
759
756
|
// src/hooks/useDelay.ts
|
|
760
|
-
import { useEffect as
|
|
757
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
761
758
|
var defaultOptions = {
|
|
762
759
|
delay: 3e3,
|
|
763
760
|
disabled: false
|
|
@@ -782,12 +779,12 @@ function useDelay(options) {
|
|
|
782
779
|
setTimer(void 0);
|
|
783
780
|
}, delay));
|
|
784
781
|
};
|
|
785
|
-
|
|
782
|
+
useEffect6(() => {
|
|
786
783
|
return () => {
|
|
787
784
|
clearTimeout(timer);
|
|
788
785
|
};
|
|
789
786
|
}, [timer]);
|
|
790
|
-
|
|
787
|
+
useEffect6(() => {
|
|
791
788
|
if (disabled) {
|
|
792
789
|
clearTimeout(timer);
|
|
793
790
|
setTimer(void 0);
|
|
@@ -854,10 +851,10 @@ function useFocusManagement() {
|
|
|
854
851
|
}
|
|
855
852
|
|
|
856
853
|
// src/hooks/useFocusOnceVisible.ts
|
|
857
|
-
import React, { useEffect as
|
|
854
|
+
import React, { useEffect as useEffect7 } from "react";
|
|
858
855
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
859
856
|
const [hasUsedFocus, setHasUsedFocus] = React.useState(false);
|
|
860
|
-
|
|
857
|
+
useEffect7(() => {
|
|
861
858
|
if (disable || hasUsedFocus) {
|
|
862
859
|
return;
|
|
863
860
|
}
|
|
@@ -1028,7 +1025,7 @@ var SearchBar = ({
|
|
|
1028
1025
|
};
|
|
1029
1026
|
|
|
1030
1027
|
// src/hooks/useSearch.ts
|
|
1031
|
-
import { useCallback as useCallback4, useEffect as
|
|
1028
|
+
import { useCallback as useCallback4, useEffect as useEffect9, useMemo, useState as useState8 } from "react";
|
|
1032
1029
|
|
|
1033
1030
|
// src/util/simpleSearch.ts
|
|
1034
1031
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -1062,7 +1059,7 @@ var useSearch = ({
|
|
|
1062
1059
|
}
|
|
1063
1060
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
1064
1061
|
}, [searchTags, list, search, searchMapping]);
|
|
1065
|
-
|
|
1062
|
+
useEffect9(() => {
|
|
1066
1063
|
if (isSearchInstant) {
|
|
1067
1064
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
1068
1065
|
}
|
|
@@ -1133,31 +1130,57 @@ var Checkbox = ({
|
|
|
1133
1130
|
}
|
|
1134
1131
|
};
|
|
1135
1132
|
const changeValue = () => {
|
|
1133
|
+
if (disabled) {
|
|
1134
|
+
return;
|
|
1135
|
+
}
|
|
1136
1136
|
const newValue = checked === "indeterminate" ? false : !checked;
|
|
1137
1137
|
propagateChange(newValue);
|
|
1138
1138
|
};
|
|
1139
|
-
return /* @__PURE__ */ jsxs7(
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
{
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1139
|
+
return /* @__PURE__ */ jsxs7(
|
|
1140
|
+
"div",
|
|
1141
|
+
{
|
|
1142
|
+
className: clsx8("group flex-row-2 items-center", {
|
|
1143
|
+
"cursor-pointer": !disabled,
|
|
1144
|
+
"cursor-not-allowed": disabled
|
|
1145
|
+
}, containerClassName),
|
|
1146
|
+
onClick: changeValue,
|
|
1147
|
+
children: [
|
|
1148
|
+
/* @__PURE__ */ jsx9(
|
|
1149
|
+
CheckboxPrimitive.Root,
|
|
1150
|
+
{
|
|
1151
|
+
onCheckedChange: propagateChange,
|
|
1152
|
+
checked,
|
|
1153
|
+
disabled,
|
|
1154
|
+
id,
|
|
1155
|
+
className: clsx8(usedSizeClass, `items-center border-2 rounded outline-none `, {
|
|
1156
|
+
"text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
|
|
1157
|
+
"focus:border-primary group-hover:border-primary ": !disabled,
|
|
1158
|
+
"bg-input-background": !disabled && !checked,
|
|
1159
|
+
"bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
|
|
1160
|
+
}, className),
|
|
1161
|
+
children: /* @__PURE__ */ jsxs7(CheckboxPrimitive.Indicator, { children: [
|
|
1162
|
+
checked === true && /* @__PURE__ */ jsx9(Check, { className: innerIconSize }),
|
|
1163
|
+
checked === "indeterminate" && /* @__PURE__ */ jsx9(Minus, { className: innerIconSize })
|
|
1164
|
+
] })
|
|
1165
|
+
}
|
|
1166
|
+
),
|
|
1167
|
+
label && /* @__PURE__ */ jsx9(
|
|
1168
|
+
Label,
|
|
1169
|
+
{
|
|
1170
|
+
...label,
|
|
1171
|
+
className: clsx8(
|
|
1172
|
+
label.className,
|
|
1173
|
+
{
|
|
1174
|
+
"cursor-pointer": !disabled,
|
|
1175
|
+
"cursor-not-allowed": disabled
|
|
1176
|
+
}
|
|
1177
|
+
),
|
|
1178
|
+
htmlFor: id
|
|
1179
|
+
}
|
|
1180
|
+
)
|
|
1181
|
+
]
|
|
1182
|
+
}
|
|
1183
|
+
);
|
|
1161
1184
|
};
|
|
1162
1185
|
|
|
1163
1186
|
// src/components/user-action/MultiSelect.tsx
|
|
@@ -1260,7 +1283,7 @@ var MultiSelect = ({
|
|
|
1260
1283
|
...label,
|
|
1261
1284
|
htmlFor: label.name,
|
|
1262
1285
|
className: clsx10(" mb-1", label.className),
|
|
1263
|
-
labelType: label.labelType ?? "
|
|
1286
|
+
labelType: label.labelType ?? "labelSmall"
|
|
1264
1287
|
}
|
|
1265
1288
|
),
|
|
1266
1289
|
/* @__PURE__ */ jsx11(
|
|
@@ -1273,10 +1296,10 @@ var MultiSelect = ({
|
|
|
1273
1296
|
ref,
|
|
1274
1297
|
className: clsx10(
|
|
1275
1298
|
"group btn-md justify-between w-full border-2 h-auto",
|
|
1299
|
+
"not-disabled:bg-input-background not-disabled:text-input-text not-disabled:hover:border-primary",
|
|
1300
|
+
"disabled:bg-disabled-background disabled:text-disabled-text disabled:border-disabled-border",
|
|
1276
1301
|
{
|
|
1277
|
-
"min-h-14": useChipDisplay
|
|
1278
|
-
"bg-input-background text-input-text hover:border-primary": !disabled,
|
|
1279
|
-
"bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
|
|
1302
|
+
"min-h-14": useChipDisplay
|
|
1280
1303
|
},
|
|
1281
1304
|
triggerClassName
|
|
1282
1305
|
),
|
|
@@ -1388,7 +1411,7 @@ var MultiSelectUncontrolled = ({
|
|
|
1388
1411
|
...props
|
|
1389
1412
|
}) => {
|
|
1390
1413
|
const [usedOptions, setUsedOptions] = useState10(options);
|
|
1391
|
-
|
|
1414
|
+
useEffect10(() => {
|
|
1392
1415
|
setUsedOptions(options);
|
|
1393
1416
|
}, [options]);
|
|
1394
1417
|
return /* @__PURE__ */ jsx11(
|