@helpwave/hightide 0.1.17 → 0.1.19
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/branding/HelpwaveBadge.js +7 -7
- package/dist/components/branding/HelpwaveBadge.js.map +1 -1
- package/dist/components/branding/HelpwaveBadge.mjs +7 -7
- package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
- package/dist/components/date/DatePicker.js +65 -38
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +54 -27
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.js +3 -3
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs +3 -3
- package/dist/components/date/DayPicker.mjs.map +1 -1
- package/dist/components/date/TimePicker.js +4 -4
- package/dist/components/date/TimePicker.js.map +1 -1
- package/dist/components/date/TimePicker.mjs +4 -4
- package/dist/components/date/TimePicker.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +46 -19
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +44 -17
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.js +32 -28
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +18 -14
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.js +2 -2
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.mjs +2 -2
- package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Ring.js +2 -2
- package/dist/components/icons-and-geometry/Ring.js.map +1 -1
- package/dist/components/icons-and-geometry/Ring.mjs +2 -2
- package/dist/components/icons-and-geometry/Ring.mjs.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.js +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.mjs +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +84 -15
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +76 -7
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Chip.js +1 -1
- package/dist/components/layout-and-navigation/Chip.js.map +1 -1
- package/dist/components/layout-and-navigation/Chip.mjs +1 -1
- package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.d.mts +7 -1
- package/dist/components/layout-and-navigation/Expandable.d.ts +7 -1
- package/dist/components/layout-and-navigation/Expandable.js +36 -9
- package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.mjs +36 -10
- package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.js +34 -11
- package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.mjs +36 -13
- package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js +92 -19
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +81 -8
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.js +82 -10
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +79 -7
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js +127 -26
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +126 -25
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.js +22 -16
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +19 -13
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.js +7 -3
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +7 -3
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Tile.d.mts +2 -2
- package/dist/components/layout-and-navigation/Tile.d.ts +2 -2
- package/dist/components/layout-and-navigation/Tile.js +7 -7
- package/dist/components/layout-and-navigation/Tile.js.map +1 -1
- package/dist/components/layout-and-navigation/Tile.mjs +7 -7
- package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.js +6 -2
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +6 -2
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js +5 -1
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +5 -1
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/LoadingButton.js +8 -6
- package/dist/components/loading-states/LoadingButton.js.map +1 -1
- package/dist/components/loading-states/LoadingButton.mjs +8 -6
- package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js +32 -28
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +18 -14
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js +28 -24
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +18 -14
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.js +32 -29
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +18 -15
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +728 -435
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +728 -431
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +732 -439
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +731 -434
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +110 -35
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +110 -35
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +118 -42
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +114 -38
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +10 -3
- package/dist/components/properties/MultiSelectProperty.d.ts +10 -3
- package/dist/components/properties/MultiSelectProperty.js +915 -464
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +920 -465
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +101 -19
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +101 -19
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +103 -20
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +99 -16
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +9 -2
- package/dist/components/properties/SelectProperty.d.ts +9 -2
- package/dist/components/properties/SelectProperty.js +682 -244
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +686 -244
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +133 -47
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +133 -47
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js +285 -186
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +270 -167
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +179 -79
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +160 -56
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/table/TableSortButton.js +72 -3
- package/dist/components/table/TableSortButton.js.map +1 -1
- package/dist/components/table/TableSortButton.mjs +72 -3
- package/dist/components/table/TableSortButton.mjs.map +1 -1
- package/dist/components/user-action/Button.d.mts +15 -2
- package/dist/components/user-action/Button.d.ts +15 -2
- package/dist/components/user-action/Button.js +12 -12
- package/dist/components/user-action/Button.js.map +1 -1
- package/dist/components/user-action/Button.mjs +12 -12
- package/dist/components/user-action/Button.mjs.map +1 -1
- package/dist/components/user-action/Checkbox.js +6 -15
- package/dist/components/user-action/Checkbox.js.map +1 -1
- package/dist/components/user-action/Checkbox.mjs +6 -15
- package/dist/components/user-action/Checkbox.mjs.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.js +6 -2
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.mjs +6 -2
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +79 -48
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +65 -34
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Input.js +0 -1
- package/dist/components/user-action/Input.js.map +1 -1
- package/dist/components/user-action/Input.mjs +0 -1
- package/dist/components/user-action/Input.mjs.map +1 -1
- package/dist/components/user-action/Menu.d.mts +11 -6
- package/dist/components/user-action/Menu.d.ts +11 -6
- package/dist/components/user-action/Menu.js +128 -31
- package/dist/components/user-action/Menu.js.map +1 -1
- package/dist/components/user-action/Menu.mjs +134 -33
- package/dist/components/user-action/Menu.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +17 -7
- package/dist/components/user-action/MultiSelect.d.ts +17 -7
- package/dist/components/user-action/MultiSelect.js +796 -376
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +781 -357
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/ScrollPicker.js +2 -2
- package/dist/components/user-action/ScrollPicker.js.map +1 -1
- package/dist/components/user-action/ScrollPicker.mjs +2 -2
- package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.d.mts +14 -0
- package/dist/components/user-action/SearchBar.d.ts +14 -0
- package/dist/components/user-action/SearchBar.js +673 -0
- package/dist/components/user-action/SearchBar.js.map +1 -0
- package/dist/components/user-action/SearchBar.mjs +637 -0
- package/dist/components/user-action/SearchBar.mjs.map +1 -0
- package/dist/components/user-action/Select.d.mts +18 -5
- package/dist/components/user-action/Select.d.ts +18 -5
- package/dist/components/user-action/Select.js +764 -356
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +761 -350
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/components/user-action/Textarea.d.mts +1 -1
- package/dist/components/user-action/Textarea.d.ts +1 -1
- package/dist/components/user-action/Textarea.js +13 -4
- package/dist/components/user-action/Textarea.js.map +1 -1
- package/dist/components/user-action/Textarea.mjs +13 -4
- package/dist/components/user-action/Textarea.mjs.map +1 -1
- package/dist/components/user-action/ToggleableInput.js +2 -3
- package/dist/components/user-action/ToggleableInput.js.map +1 -1
- package/dist/components/user-action/ToggleableInput.mjs +2 -3
- package/dist/components/user-action/ToggleableInput.mjs.map +1 -1
- package/dist/css/globals.css +251 -113
- package/dist/css/uncompiled/globals.css +19 -13
- package/dist/css/uncompiled/theme/colors-component.css +12 -3
- package/dist/css/uncompiled/theme/colors-semantic.css +10 -7
- package/dist/css/uncompiled/utitlity/animation.css +70 -1
- package/dist/css/uncompiled/utitlity/general.css +16 -0
- package/dist/hooks/useDelay.js +0 -1
- package/dist/hooks/useDelay.js.map +1 -1
- package/dist/hooks/useDelay.mjs +0 -1
- package/dist/hooks/useDelay.mjs.map +1 -1
- package/dist/hooks/usePopoverPosition.d.mts +15 -0
- package/dist/hooks/usePopoverPosition.d.ts +15 -0
- package/dist/hooks/usePopoverPosition.js +81 -0
- package/dist/hooks/usePopoverPosition.js.map +1 -0
- package/dist/hooks/usePopoverPosition.mjs +57 -0
- package/dist/hooks/usePopoverPosition.mjs.map +1 -0
- package/dist/hooks/useSearch.d.mts +7 -2
- package/dist/hooks/useSearch.d.ts +7 -2
- package/dist/hooks/useSearch.js +44 -15
- package/dist/hooks/useSearch.js.map +1 -1
- package/dist/hooks/useSearch.mjs +45 -16
- package/dist/hooks/useSearch.mjs.map +1 -1
- package/dist/index.d.mts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +1102 -820
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1001 -719
- package/dist/index.mjs.map +1 -1
- package/dist/localization/defaults/form.d.mts +2 -0
- package/dist/localization/defaults/form.d.ts +2 -0
- package/dist/localization/defaults/form.js +4 -0
- package/dist/localization/defaults/form.js.map +1 -1
- package/dist/localization/defaults/form.mjs +4 -0
- package/dist/localization/defaults/form.mjs.map +1 -1
- package/dist/util/simpleSearch.d.mts +1 -1
- package/dist/util/simpleSearch.d.ts +1 -1
- package/dist/util/simpleSearch.js +4 -1
- package/dist/util/simpleSearch.js.map +1 -1
- package/dist/util/simpleSearch.mjs +4 -1
- package/dist/util/simpleSearch.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// src/components/user-action/Button.tsx
|
|
2
|
+
import { forwardRef } from "react";
|
|
2
3
|
import clsx from "clsx";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
var ButtonColorUtil = {
|
|
@@ -24,7 +25,7 @@ var ButtonUtil = {
|
|
|
24
25
|
paddingMapping,
|
|
25
26
|
iconPaddingMapping
|
|
26
27
|
};
|
|
27
|
-
var SolidButton = ({
|
|
28
|
+
var SolidButton = forwardRef(function SolidButton2({
|
|
28
29
|
children,
|
|
29
30
|
disabled = false,
|
|
30
31
|
color = "primary",
|
|
@@ -34,7 +35,7 @@ var SolidButton = ({
|
|
|
34
35
|
onClick,
|
|
35
36
|
className,
|
|
36
37
|
...restProps
|
|
37
|
-
})
|
|
38
|
+
}, ref) {
|
|
38
39
|
const colorClasses = {
|
|
39
40
|
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
40
41
|
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
@@ -56,8 +57,9 @@ var SolidButton = ({
|
|
|
56
57
|
return /* @__PURE__ */ jsxs(
|
|
57
58
|
"button",
|
|
58
59
|
{
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
ref,
|
|
61
|
+
onClick,
|
|
62
|
+
disabled,
|
|
61
63
|
className: clsx(
|
|
62
64
|
{
|
|
63
65
|
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
@@ -92,13 +94,12 @@ var SolidButton = ({
|
|
|
92
94
|
]
|
|
93
95
|
}
|
|
94
96
|
);
|
|
95
|
-
};
|
|
97
|
+
});
|
|
96
98
|
var IconButton = ({
|
|
97
99
|
children,
|
|
98
100
|
disabled = false,
|
|
99
101
|
color = "primary",
|
|
100
102
|
size = "medium",
|
|
101
|
-
onClick,
|
|
102
103
|
className,
|
|
103
104
|
...restProps
|
|
104
105
|
}) => {
|
|
@@ -115,8 +116,7 @@ var IconButton = ({
|
|
|
115
116
|
return /* @__PURE__ */ jsx(
|
|
116
117
|
"button",
|
|
117
118
|
{
|
|
118
|
-
|
|
119
|
-
disabled: disabled || onClick === void 0,
|
|
119
|
+
disabled,
|
|
120
120
|
className: clsx(
|
|
121
121
|
{
|
|
122
122
|
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
|
|
@@ -134,7 +134,7 @@ var IconButton = ({
|
|
|
134
134
|
};
|
|
135
135
|
|
|
136
136
|
// src/components/user-action/Input.tsx
|
|
137
|
-
import { forwardRef, useEffect as useEffect3, useImperativeHandle, useRef, useState as useState2 } from "react";
|
|
137
|
+
import { forwardRef as forwardRef2, useEffect as useEffect3, useImperativeHandle, useRef, useState as useState2 } from "react";
|
|
138
138
|
import clsx3 from "clsx";
|
|
139
139
|
|
|
140
140
|
// src/hooks/useDelay.ts
|
|
@@ -174,7 +174,6 @@ function useDelay(options) {
|
|
|
174
174
|
setTimer(void 0);
|
|
175
175
|
}
|
|
176
176
|
}, [disabled, timer]);
|
|
177
|
-
console.log(timer);
|
|
178
177
|
return { restartTimer, clearTimer, hasActiveTimer: !!timer };
|
|
179
178
|
}
|
|
180
179
|
|
|
@@ -296,7 +295,7 @@ var defaultEditCompleteOptions = {
|
|
|
296
295
|
afterDelay: true,
|
|
297
296
|
delay: 2500
|
|
298
297
|
};
|
|
299
|
-
var Input =
|
|
298
|
+
var Input = forwardRef2(function Input2({
|
|
300
299
|
id,
|
|
301
300
|
type = "text",
|
|
302
301
|
value,
|
|
@@ -371,7 +370,7 @@ var Input = forwardRef(function Input2({
|
|
|
371
370
|
)
|
|
372
371
|
] });
|
|
373
372
|
});
|
|
374
|
-
var FormInput =
|
|
373
|
+
var FormInput = forwardRef2(function FormInput2({
|
|
375
374
|
id,
|
|
376
375
|
labelText,
|
|
377
376
|
errorText,
|
|
@@ -410,7 +409,11 @@ var FormInput = forwardRef(function FormInput2({
|
|
|
410
409
|
import { FilterIcon } from "lucide-react";
|
|
411
410
|
|
|
412
411
|
// src/components/user-action/Menu.tsx
|
|
413
|
-
import {
|
|
412
|
+
import {
|
|
413
|
+
useEffect as useEffect6,
|
|
414
|
+
useRef as useRef2,
|
|
415
|
+
useState as useState4
|
|
416
|
+
} from "react";
|
|
414
417
|
import clsx4 from "clsx";
|
|
415
418
|
|
|
416
419
|
// src/hooks/useOutsideClick.ts
|
|
@@ -488,56 +491,153 @@ var BagFunctionUtil = {
|
|
|
488
491
|
resolve
|
|
489
492
|
};
|
|
490
493
|
|
|
494
|
+
// src/hooks/usePopoverPosition.ts
|
|
495
|
+
var defaultPopoverPositionOptions = {
|
|
496
|
+
edgePadding: 16,
|
|
497
|
+
outerGap: 4,
|
|
498
|
+
horizontalAlignment: "leftInside",
|
|
499
|
+
verticalAlignment: "bottomOutside",
|
|
500
|
+
disabled: false
|
|
501
|
+
};
|
|
502
|
+
var usePopoverPosition = (trigger, options) => {
|
|
503
|
+
const {
|
|
504
|
+
edgePadding,
|
|
505
|
+
outerGap,
|
|
506
|
+
verticalAlignment,
|
|
507
|
+
horizontalAlignment,
|
|
508
|
+
disabled
|
|
509
|
+
} = { ...defaultPopoverPositionOptions, ...options };
|
|
510
|
+
if (disabled || !trigger) {
|
|
511
|
+
return {};
|
|
512
|
+
}
|
|
513
|
+
const left = {
|
|
514
|
+
leftOutside: trigger.left - outerGap,
|
|
515
|
+
leftInside: trigger.left,
|
|
516
|
+
rightOutside: trigger.right + outerGap,
|
|
517
|
+
rightInside: trigger.right,
|
|
518
|
+
center: trigger.left + trigger.width / 2
|
|
519
|
+
}[horizontalAlignment];
|
|
520
|
+
const top = {
|
|
521
|
+
topOutside: trigger.top - outerGap,
|
|
522
|
+
topInside: trigger.top,
|
|
523
|
+
bottomOutside: trigger.bottom + outerGap,
|
|
524
|
+
bottomInside: trigger.bottom,
|
|
525
|
+
center: trigger.top + trigger.height / 2
|
|
526
|
+
}[verticalAlignment];
|
|
527
|
+
const translateX = {
|
|
528
|
+
leftOutside: "-100%",
|
|
529
|
+
leftInside: void 0,
|
|
530
|
+
rightOutside: void 0,
|
|
531
|
+
rightInside: "-100%",
|
|
532
|
+
center: "-50%"
|
|
533
|
+
}[horizontalAlignment];
|
|
534
|
+
const translateY = {
|
|
535
|
+
topOutside: "-100%",
|
|
536
|
+
topInside: void 0,
|
|
537
|
+
bottomOutside: void 0,
|
|
538
|
+
bottomInside: "-100%",
|
|
539
|
+
center: "-50%"
|
|
540
|
+
}[verticalAlignment];
|
|
541
|
+
return {
|
|
542
|
+
left: Math.max(left, edgePadding),
|
|
543
|
+
top: Math.max(top, edgePadding),
|
|
544
|
+
translate: [translateX ?? "0", translateY ?? "0"].join(" ")
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
|
|
491
548
|
// src/components/user-action/Menu.tsx
|
|
492
|
-
import {
|
|
549
|
+
import { createPortal } from "react-dom";
|
|
550
|
+
import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
551
|
+
function getScrollableParents(element) {
|
|
552
|
+
const scrollables = [];
|
|
553
|
+
let parent = element.parentElement;
|
|
554
|
+
while (parent) {
|
|
555
|
+
scrollables.push(parent);
|
|
556
|
+
parent = parent.parentElement;
|
|
557
|
+
}
|
|
558
|
+
return scrollables;
|
|
559
|
+
}
|
|
493
560
|
var Menu = ({
|
|
494
561
|
trigger,
|
|
495
562
|
children,
|
|
496
|
-
|
|
563
|
+
alignmentHorizontal = "leftInside",
|
|
564
|
+
alignmentVertical = "bottomOutside",
|
|
497
565
|
showOnHover = false,
|
|
566
|
+
disabled = false,
|
|
498
567
|
menuClassName = ""
|
|
499
568
|
}) => {
|
|
500
|
-
const { isHovered: isOpen, setIsHovered: setIsOpen
|
|
569
|
+
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
501
570
|
const triggerRef = useRef2(null);
|
|
502
571
|
const menuRef = useRef2(null);
|
|
503
572
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
504
|
-
const
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
573
|
+
const [isHidden, setIsHidden] = useState4(true);
|
|
574
|
+
const bag = {
|
|
575
|
+
isOpen,
|
|
576
|
+
close: () => setIsOpen(false),
|
|
577
|
+
toggleOpen: () => setIsOpen((prevState) => !prevState),
|
|
578
|
+
disabled
|
|
579
|
+
};
|
|
580
|
+
const menuPosition = usePopoverPosition(
|
|
581
|
+
triggerRef.current?.getBoundingClientRect(),
|
|
582
|
+
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
583
|
+
);
|
|
584
|
+
useEffect6(() => {
|
|
585
|
+
if (!isOpen) return;
|
|
586
|
+
const triggerEl = triggerRef.current;
|
|
587
|
+
if (!triggerEl) return;
|
|
588
|
+
const scrollableParents = getScrollableParents(triggerEl);
|
|
589
|
+
const close = () => setIsOpen(false);
|
|
590
|
+
scrollableParents.forEach((parent) => {
|
|
591
|
+
parent.addEventListener("scroll", close);
|
|
592
|
+
});
|
|
593
|
+
window.addEventListener("resize", close);
|
|
594
|
+
return () => {
|
|
595
|
+
scrollableParents.forEach((parent) => {
|
|
596
|
+
parent.removeEventListener("scroll", close);
|
|
597
|
+
});
|
|
598
|
+
window.removeEventListener("resize", close);
|
|
599
|
+
};
|
|
600
|
+
}, [isOpen, setIsOpen]);
|
|
601
|
+
useEffect6(() => {
|
|
602
|
+
if (isOpen) {
|
|
603
|
+
setIsHidden(false);
|
|
604
|
+
}
|
|
605
|
+
}, [isOpen]);
|
|
606
|
+
return /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
607
|
+
trigger(bag, triggerRef),
|
|
608
|
+
createPortal(/* @__PURE__ */ jsx4(
|
|
609
|
+
"div",
|
|
610
|
+
{
|
|
611
|
+
ref: menuRef,
|
|
612
|
+
onClick: (e) => e.stopPropagation(),
|
|
613
|
+
className: clsx4(
|
|
614
|
+
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-10",
|
|
514
615
|
{
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
"hidden": !isOpen
|
|
525
|
-
},
|
|
526
|
-
menuClassName
|
|
527
|
-
),
|
|
528
|
-
children: BagFunctionUtil.resolve(children, bag)
|
|
616
|
+
"animate-pop-in": isOpen,
|
|
617
|
+
"animate-pop-out": !isOpen,
|
|
618
|
+
"hidden": isHidden
|
|
619
|
+
},
|
|
620
|
+
menuClassName
|
|
621
|
+
),
|
|
622
|
+
onAnimationEnd: () => {
|
|
623
|
+
if (!isOpen) {
|
|
624
|
+
setIsHidden(true);
|
|
529
625
|
}
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
626
|
+
},
|
|
627
|
+
style: {
|
|
628
|
+
...menuPosition
|
|
629
|
+
},
|
|
630
|
+
children: BagFunctionUtil.resolve(children, bag)
|
|
631
|
+
}
|
|
632
|
+
), document.body)
|
|
633
|
+
] });
|
|
534
634
|
};
|
|
535
635
|
|
|
536
636
|
// src/localization/LanguageProvider.tsx
|
|
537
|
-
import { createContext, useContext, useEffect as
|
|
637
|
+
import { createContext, useContext, useEffect as useEffect8, useState as useState6 } from "react";
|
|
538
638
|
|
|
539
639
|
// src/hooks/useLocalStorage.ts
|
|
540
|
-
import { useCallback as useCallback2, useEffect as
|
|
640
|
+
import { useCallback as useCallback2, useEffect as useEffect7, useState as useState5 } from "react";
|
|
541
641
|
|
|
542
642
|
// src/localization/util.ts
|
|
543
643
|
var languages = ["en", "de"];
|
|
@@ -623,6 +723,7 @@ var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
|
623
723
|
// src/localization/defaults/form.ts
|
|
624
724
|
var formTranslation = {
|
|
625
725
|
en: {
|
|
726
|
+
add: "Add",
|
|
626
727
|
all: "All",
|
|
627
728
|
apply: "Apply",
|
|
628
729
|
back: "Back",
|
|
@@ -635,6 +736,7 @@ var formTranslation = {
|
|
|
635
736
|
confirm: "Confirm",
|
|
636
737
|
copy: "Copy",
|
|
637
738
|
copied: "Copied",
|
|
739
|
+
create: "Create",
|
|
638
740
|
decline: "Decline",
|
|
639
741
|
delete: "Delete",
|
|
640
742
|
discard: "Discard",
|
|
@@ -677,6 +779,7 @@ var formTranslation = {
|
|
|
677
779
|
yes: "Yes"
|
|
678
780
|
},
|
|
679
781
|
de: {
|
|
782
|
+
add: "Hinzuf\xFCgen",
|
|
680
783
|
all: "Alle",
|
|
681
784
|
apply: "Anwenden",
|
|
682
785
|
back: "Zur\xFCck",
|
|
@@ -689,6 +792,7 @@ var formTranslation = {
|
|
|
689
792
|
confirm: "Best\xE4tigen",
|
|
690
793
|
copy: "Kopieren",
|
|
691
794
|
copied: "Kopiert",
|
|
795
|
+
create: "Erstellen",
|
|
692
796
|
decline: "Ablehnen",
|
|
693
797
|
delete: "L\xF6schen",
|
|
694
798
|
discard: "Verwerfen",
|
|
@@ -733,8 +837,8 @@ var formTranslation = {
|
|
|
733
837
|
};
|
|
734
838
|
|
|
735
839
|
// src/components/table/TableFilterButton.tsx
|
|
736
|
-
import { useEffect as
|
|
737
|
-
import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
840
|
+
import { useEffect as useEffect9, useState as useState7 } from "react";
|
|
841
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
738
842
|
var defaultTableFilterTranslation = {
|
|
739
843
|
en: {
|
|
740
844
|
filter: "Filter",
|
|
@@ -759,16 +863,16 @@ var TableFilterButton = ({
|
|
|
759
863
|
}) => {
|
|
760
864
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
761
865
|
const columnFilterValue = column.getFilterValue();
|
|
762
|
-
const [filterValue, setFilterValue] =
|
|
866
|
+
const [filterValue, setFilterValue] = useState7(columnFilterValue);
|
|
763
867
|
const hasFilter = !!filterValue;
|
|
764
|
-
|
|
868
|
+
useEffect9(() => {
|
|
765
869
|
setFilterValue(columnFilterValue);
|
|
766
870
|
}, [columnFilterValue]);
|
|
767
871
|
return /* @__PURE__ */ jsx6(
|
|
768
872
|
Menu,
|
|
769
873
|
{
|
|
770
|
-
trigger: (
|
|
771
|
-
/* @__PURE__ */ jsx6(IconButton, { color: "neutral", size: "tiny", onClick, children: /* @__PURE__ */ jsx6(FilterIcon, {}) }),
|
|
874
|
+
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ jsxs4("div", { ref, className: "relative", children: [
|
|
875
|
+
/* @__PURE__ */ jsx6(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ jsx6(FilterIcon, {}) }),
|
|
772
876
|
hasFilter && /* @__PURE__ */ jsx6(
|
|
773
877
|
"div",
|
|
774
878
|
{
|
|
@@ -777,7 +881,7 @@ var TableFilterButton = ({
|
|
|
777
881
|
}
|
|
778
882
|
)
|
|
779
883
|
] }),
|
|
780
|
-
children: ({ close }) => /* @__PURE__ */ jsxs4("div", { className: "col
|
|
884
|
+
children: ({ close }) => /* @__PURE__ */ jsxs4("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
|
|
781
885
|
/* @__PURE__ */ jsx6("h4", { className: "textstyle-title-sm", children: translation("filter") }),
|
|
782
886
|
filterType === "text" && /* @__PURE__ */ jsx6(
|
|
783
887
|
Input,
|
|
@@ -789,7 +893,7 @@ var TableFilterButton = ({
|
|
|
789
893
|
className: "h-10"
|
|
790
894
|
}
|
|
791
895
|
),
|
|
792
|
-
filterType === "range" && /* @__PURE__ */ jsxs4("div", { className: "row
|
|
896
|
+
filterType === "range" && /* @__PURE__ */ jsxs4("div", { className: "flex-row-2 items-center", children: [
|
|
793
897
|
/* @__PURE__ */ jsx6(
|
|
794
898
|
Input,
|
|
795
899
|
{
|
|
@@ -818,7 +922,7 @@ var TableFilterButton = ({
|
|
|
818
922
|
}
|
|
819
923
|
)
|
|
820
924
|
] }),
|
|
821
|
-
filterType === "dateRange" && /* @__PURE__ */ jsxs4(
|
|
925
|
+
filterType === "dateRange" && /* @__PURE__ */ jsxs4(Fragment2, { children: [
|
|
822
926
|
/* @__PURE__ */ jsx6(
|
|
823
927
|
Input,
|
|
824
928
|
{
|
|
@@ -846,7 +950,7 @@ var TableFilterButton = ({
|
|
|
846
950
|
}
|
|
847
951
|
)
|
|
848
952
|
] }),
|
|
849
|
-
/* @__PURE__ */ jsxs4("div", { className: "row justify-end w-full", children: [
|
|
953
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex-row-2 justify-end w-full", children: [
|
|
850
954
|
hasFilter && /* @__PURE__ */ jsx6(SolidButton, { color: "negative", size: "small", onClick: () => {
|
|
851
955
|
column.setFilterValue(void 0);
|
|
852
956
|
close();
|