@helpwave/hightide 0.1.18 → 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 -9
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +79 -6
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js +127 -25
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +126 -24
- 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 -28
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +18 -14
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +728 -434
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +728 -430
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +732 -438
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +731 -433
- 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 -41
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +114 -37
- 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 -463
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +920 -464
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +101 -18
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +101 -18
- 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 -243
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +686 -243
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +133 -46
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +133 -46
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js +285 -185
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +270 -166
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +179 -78
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +160 -55
- 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/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 -375
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +781 -356
- 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 -355
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +761 -349
- 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 -3
- package/dist/components/user-action/Textarea.js.map +1 -1
- package/dist/components/user-action/Textarea.mjs +13 -3
- package/dist/components/user-action/Textarea.mjs.map +1 -1
- package/dist/components/user-action/ToggleableInput.js +2 -2
- package/dist/components/user-action/ToggleableInput.js.map +1 -1
- package/dist/components/user-action/ToggleableInput.mjs +2 -2
- 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/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 -819
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1001 -718
- 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
|
@@ -34,6 +34,7 @@ __export(TableFilterButton_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(TableFilterButton_exports);
|
|
35
35
|
|
|
36
36
|
// src/components/user-action/Button.tsx
|
|
37
|
+
var import_react = require("react");
|
|
37
38
|
var import_clsx = __toESM(require("clsx"));
|
|
38
39
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
39
40
|
var ButtonColorUtil = {
|
|
@@ -59,7 +60,7 @@ var ButtonUtil = {
|
|
|
59
60
|
paddingMapping,
|
|
60
61
|
iconPaddingMapping
|
|
61
62
|
};
|
|
62
|
-
var SolidButton = ({
|
|
63
|
+
var SolidButton = (0, import_react.forwardRef)(function SolidButton2({
|
|
63
64
|
children,
|
|
64
65
|
disabled = false,
|
|
65
66
|
color = "primary",
|
|
@@ -69,7 +70,7 @@ var SolidButton = ({
|
|
|
69
70
|
onClick,
|
|
70
71
|
className,
|
|
71
72
|
...restProps
|
|
72
|
-
})
|
|
73
|
+
}, ref) {
|
|
73
74
|
const colorClasses = {
|
|
74
75
|
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
75
76
|
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
@@ -91,8 +92,9 @@ var SolidButton = ({
|
|
|
91
92
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
92
93
|
"button",
|
|
93
94
|
{
|
|
94
|
-
|
|
95
|
-
|
|
95
|
+
ref,
|
|
96
|
+
onClick,
|
|
97
|
+
disabled,
|
|
96
98
|
className: (0, import_clsx.default)(
|
|
97
99
|
{
|
|
98
100
|
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
@@ -127,13 +129,12 @@ var SolidButton = ({
|
|
|
127
129
|
]
|
|
128
130
|
}
|
|
129
131
|
);
|
|
130
|
-
};
|
|
132
|
+
});
|
|
131
133
|
var IconButton = ({
|
|
132
134
|
children,
|
|
133
135
|
disabled = false,
|
|
134
136
|
color = "primary",
|
|
135
137
|
size = "medium",
|
|
136
|
-
onClick,
|
|
137
138
|
className,
|
|
138
139
|
...restProps
|
|
139
140
|
}) => {
|
|
@@ -150,8 +151,7 @@ var IconButton = ({
|
|
|
150
151
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
151
152
|
"button",
|
|
152
153
|
{
|
|
153
|
-
|
|
154
|
-
disabled: disabled || onClick === void 0,
|
|
154
|
+
disabled,
|
|
155
155
|
className: (0, import_clsx.default)(
|
|
156
156
|
{
|
|
157
157
|
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
|
|
@@ -169,17 +169,17 @@ var IconButton = ({
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
// src/components/user-action/Input.tsx
|
|
172
|
-
var
|
|
172
|
+
var import_react5 = require("react");
|
|
173
173
|
var import_clsx3 = __toESM(require("clsx"));
|
|
174
174
|
|
|
175
175
|
// src/hooks/useDelay.ts
|
|
176
|
-
var
|
|
176
|
+
var import_react2 = require("react");
|
|
177
177
|
var defaultOptions = {
|
|
178
178
|
delay: 3e3,
|
|
179
179
|
disabled: false
|
|
180
180
|
};
|
|
181
181
|
function useDelay(options) {
|
|
182
|
-
const [timer, setTimer] = (0,
|
|
182
|
+
const [timer, setTimer] = (0, import_react2.useState)(void 0);
|
|
183
183
|
const { delay, disabled } = {
|
|
184
184
|
...defaultOptions,
|
|
185
185
|
...options
|
|
@@ -198,12 +198,12 @@ function useDelay(options) {
|
|
|
198
198
|
setTimer(void 0);
|
|
199
199
|
}, delay));
|
|
200
200
|
};
|
|
201
|
-
(0,
|
|
201
|
+
(0, import_react2.useEffect)(() => {
|
|
202
202
|
return () => {
|
|
203
203
|
clearTimeout(timer);
|
|
204
204
|
};
|
|
205
205
|
}, [timer]);
|
|
206
|
-
(0,
|
|
206
|
+
(0, import_react2.useEffect)(() => {
|
|
207
207
|
if (disabled) {
|
|
208
208
|
clearTimeout(timer);
|
|
209
209
|
setTimer(void 0);
|
|
@@ -234,9 +234,9 @@ var Label = ({
|
|
|
234
234
|
};
|
|
235
235
|
|
|
236
236
|
// src/hooks/useFocusManagement.ts
|
|
237
|
-
var
|
|
237
|
+
var import_react3 = require("react");
|
|
238
238
|
function useFocusManagement() {
|
|
239
|
-
const getFocusableElements = (0,
|
|
239
|
+
const getFocusableElements = (0, import_react3.useCallback)(() => {
|
|
240
240
|
return Array.from(
|
|
241
241
|
document.querySelectorAll(
|
|
242
242
|
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
@@ -245,7 +245,7 @@ function useFocusManagement() {
|
|
|
245
245
|
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
246
246
|
);
|
|
247
247
|
}, []);
|
|
248
|
-
const getNextFocusElement = (0,
|
|
248
|
+
const getNextFocusElement = (0, import_react3.useCallback)(() => {
|
|
249
249
|
const elements = getFocusableElements();
|
|
250
250
|
if (elements.length === 0) {
|
|
251
251
|
return void 0;
|
|
@@ -257,11 +257,11 @@ function useFocusManagement() {
|
|
|
257
257
|
}
|
|
258
258
|
return nextElement;
|
|
259
259
|
}, [getFocusableElements]);
|
|
260
|
-
const focusNext = (0,
|
|
260
|
+
const focusNext = (0, import_react3.useCallback)(() => {
|
|
261
261
|
const nextElement = getNextFocusElement();
|
|
262
262
|
nextElement?.focus();
|
|
263
263
|
}, [getNextFocusElement]);
|
|
264
|
-
const getPreviousFocusElement = (0,
|
|
264
|
+
const getPreviousFocusElement = (0, import_react3.useCallback)(() => {
|
|
265
265
|
const elements = getFocusableElements();
|
|
266
266
|
if (elements.length === 0) {
|
|
267
267
|
return void 0;
|
|
@@ -277,7 +277,7 @@ function useFocusManagement() {
|
|
|
277
277
|
}
|
|
278
278
|
return previousElement;
|
|
279
279
|
}, [getFocusableElements]);
|
|
280
|
-
const focusPrevious = (0,
|
|
280
|
+
const focusPrevious = (0, import_react3.useCallback)(() => {
|
|
281
281
|
const previousElement = getPreviousFocusElement();
|
|
282
282
|
if (previousElement) previousElement.focus();
|
|
283
283
|
}, [getPreviousFocusElement]);
|
|
@@ -291,10 +291,10 @@ function useFocusManagement() {
|
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
// src/hooks/useFocusOnceVisible.ts
|
|
294
|
-
var
|
|
294
|
+
var import_react4 = __toESM(require("react"));
|
|
295
295
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
296
|
-
const [hasUsedFocus, setHasUsedFocus] =
|
|
297
|
-
(0,
|
|
296
|
+
const [hasUsedFocus, setHasUsedFocus] = import_react4.default.useState(false);
|
|
297
|
+
(0, import_react4.useEffect)(() => {
|
|
298
298
|
if (disable || hasUsedFocus) {
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
@@ -330,7 +330,7 @@ var defaultEditCompleteOptions = {
|
|
|
330
330
|
afterDelay: true,
|
|
331
331
|
delay: 2500
|
|
332
332
|
};
|
|
333
|
-
var Input = (0,
|
|
333
|
+
var Input = (0, import_react5.forwardRef)(function Input2({
|
|
334
334
|
id,
|
|
335
335
|
type = "text",
|
|
336
336
|
value,
|
|
@@ -353,10 +353,10 @@ var Input = (0, import_react4.forwardRef)(function Input2({
|
|
|
353
353
|
restartTimer,
|
|
354
354
|
clearTimer
|
|
355
355
|
} = useDelay({ delay, disabled: !afterDelay });
|
|
356
|
-
const innerRef = (0,
|
|
356
|
+
const innerRef = (0, import_react5.useRef)(null);
|
|
357
357
|
const { focusNext } = useFocusManagement();
|
|
358
358
|
useFocusOnceVisible(innerRef, !autoFocus);
|
|
359
|
-
(0,
|
|
359
|
+
(0, import_react5.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
360
360
|
const handleKeyDown = (e) => {
|
|
361
361
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
362
362
|
e.preventDefault();
|
|
@@ -405,7 +405,7 @@ var Input = (0, import_react4.forwardRef)(function Input2({
|
|
|
405
405
|
)
|
|
406
406
|
] });
|
|
407
407
|
});
|
|
408
|
-
var FormInput = (0,
|
|
408
|
+
var FormInput = (0, import_react5.forwardRef)(function FormInput2({
|
|
409
409
|
id,
|
|
410
410
|
labelText,
|
|
411
411
|
errorText,
|
|
@@ -444,13 +444,13 @@ var FormInput = (0, import_react4.forwardRef)(function FormInput2({
|
|
|
444
444
|
var import_lucide_react = require("lucide-react");
|
|
445
445
|
|
|
446
446
|
// src/components/user-action/Menu.tsx
|
|
447
|
-
var
|
|
447
|
+
var import_react8 = require("react");
|
|
448
448
|
var import_clsx4 = __toESM(require("clsx"));
|
|
449
449
|
|
|
450
450
|
// src/hooks/useOutsideClick.ts
|
|
451
|
-
var
|
|
451
|
+
var import_react6 = require("react");
|
|
452
452
|
var useOutsideClick = (refs, handler) => {
|
|
453
|
-
(0,
|
|
453
|
+
(0, import_react6.useEffect)(() => {
|
|
454
454
|
const listener = (event) => {
|
|
455
455
|
if (event.target === null) return;
|
|
456
456
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -468,15 +468,15 @@ var useOutsideClick = (refs, handler) => {
|
|
|
468
468
|
};
|
|
469
469
|
|
|
470
470
|
// src/hooks/useHoverState.ts
|
|
471
|
-
var
|
|
471
|
+
var import_react7 = require("react");
|
|
472
472
|
var defaultUseHoverStateProps = {
|
|
473
473
|
closingDelay: 200,
|
|
474
474
|
isDisabled: false
|
|
475
475
|
};
|
|
476
476
|
var useHoverState = (props = void 0) => {
|
|
477
477
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
478
|
-
const [isHovered, setIsHovered] = (0,
|
|
479
|
-
const [timer, setTimer] = (0,
|
|
478
|
+
const [isHovered, setIsHovered] = (0, import_react7.useState)(false);
|
|
479
|
+
const [timer, setTimer] = (0, import_react7.useState)();
|
|
480
480
|
const onMouseEnter = () => {
|
|
481
481
|
if (isDisabled) {
|
|
482
482
|
return;
|
|
@@ -492,14 +492,14 @@ var useHoverState = (props = void 0) => {
|
|
|
492
492
|
setIsHovered(false);
|
|
493
493
|
}, closingDelay));
|
|
494
494
|
};
|
|
495
|
-
(0,
|
|
495
|
+
(0, import_react7.useEffect)(() => {
|
|
496
496
|
if (timer) {
|
|
497
497
|
return () => {
|
|
498
498
|
clearTimeout(timer);
|
|
499
499
|
};
|
|
500
500
|
}
|
|
501
501
|
});
|
|
502
|
-
(0,
|
|
502
|
+
(0, import_react7.useEffect)(() => {
|
|
503
503
|
if (timer) {
|
|
504
504
|
clearTimeout(timer);
|
|
505
505
|
}
|
|
@@ -522,56 +522,153 @@ var BagFunctionUtil = {
|
|
|
522
522
|
resolve
|
|
523
523
|
};
|
|
524
524
|
|
|
525
|
+
// src/hooks/usePopoverPosition.ts
|
|
526
|
+
var defaultPopoverPositionOptions = {
|
|
527
|
+
edgePadding: 16,
|
|
528
|
+
outerGap: 4,
|
|
529
|
+
horizontalAlignment: "leftInside",
|
|
530
|
+
verticalAlignment: "bottomOutside",
|
|
531
|
+
disabled: false
|
|
532
|
+
};
|
|
533
|
+
var usePopoverPosition = (trigger, options) => {
|
|
534
|
+
const {
|
|
535
|
+
edgePadding,
|
|
536
|
+
outerGap,
|
|
537
|
+
verticalAlignment,
|
|
538
|
+
horizontalAlignment,
|
|
539
|
+
disabled
|
|
540
|
+
} = { ...defaultPopoverPositionOptions, ...options };
|
|
541
|
+
if (disabled || !trigger) {
|
|
542
|
+
return {};
|
|
543
|
+
}
|
|
544
|
+
const left = {
|
|
545
|
+
leftOutside: trigger.left - outerGap,
|
|
546
|
+
leftInside: trigger.left,
|
|
547
|
+
rightOutside: trigger.right + outerGap,
|
|
548
|
+
rightInside: trigger.right,
|
|
549
|
+
center: trigger.left + trigger.width / 2
|
|
550
|
+
}[horizontalAlignment];
|
|
551
|
+
const top = {
|
|
552
|
+
topOutside: trigger.top - outerGap,
|
|
553
|
+
topInside: trigger.top,
|
|
554
|
+
bottomOutside: trigger.bottom + outerGap,
|
|
555
|
+
bottomInside: trigger.bottom,
|
|
556
|
+
center: trigger.top + trigger.height / 2
|
|
557
|
+
}[verticalAlignment];
|
|
558
|
+
const translateX = {
|
|
559
|
+
leftOutside: "-100%",
|
|
560
|
+
leftInside: void 0,
|
|
561
|
+
rightOutside: void 0,
|
|
562
|
+
rightInside: "-100%",
|
|
563
|
+
center: "-50%"
|
|
564
|
+
}[horizontalAlignment];
|
|
565
|
+
const translateY = {
|
|
566
|
+
topOutside: "-100%",
|
|
567
|
+
topInside: void 0,
|
|
568
|
+
bottomOutside: void 0,
|
|
569
|
+
bottomInside: "-100%",
|
|
570
|
+
center: "-50%"
|
|
571
|
+
}[verticalAlignment];
|
|
572
|
+
return {
|
|
573
|
+
left: Math.max(left, edgePadding),
|
|
574
|
+
top: Math.max(top, edgePadding),
|
|
575
|
+
translate: [translateX ?? "0", translateY ?? "0"].join(" ")
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
|
|
525
579
|
// src/components/user-action/Menu.tsx
|
|
580
|
+
var import_react_dom = require("react-dom");
|
|
526
581
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
582
|
+
function getScrollableParents(element) {
|
|
583
|
+
const scrollables = [];
|
|
584
|
+
let parent = element.parentElement;
|
|
585
|
+
while (parent) {
|
|
586
|
+
scrollables.push(parent);
|
|
587
|
+
parent = parent.parentElement;
|
|
588
|
+
}
|
|
589
|
+
return scrollables;
|
|
590
|
+
}
|
|
527
591
|
var Menu = ({
|
|
528
592
|
trigger,
|
|
529
593
|
children,
|
|
530
|
-
|
|
594
|
+
alignmentHorizontal = "leftInside",
|
|
595
|
+
alignmentVertical = "bottomOutside",
|
|
531
596
|
showOnHover = false,
|
|
597
|
+
disabled = false,
|
|
532
598
|
menuClassName = ""
|
|
533
599
|
}) => {
|
|
534
|
-
const { isHovered: isOpen, setIsHovered: setIsOpen
|
|
535
|
-
const triggerRef = (0,
|
|
536
|
-
const menuRef = (0,
|
|
600
|
+
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
601
|
+
const triggerRef = (0, import_react8.useRef)(null);
|
|
602
|
+
const menuRef = (0, import_react8.useRef)(null);
|
|
537
603
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
604
|
+
const [isHidden, setIsHidden] = (0, import_react8.useState)(true);
|
|
605
|
+
const bag = {
|
|
606
|
+
isOpen,
|
|
607
|
+
close: () => setIsOpen(false),
|
|
608
|
+
toggleOpen: () => setIsOpen((prevState) => !prevState),
|
|
609
|
+
disabled
|
|
610
|
+
};
|
|
611
|
+
const menuPosition = usePopoverPosition(
|
|
612
|
+
triggerRef.current?.getBoundingClientRect(),
|
|
613
|
+
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
614
|
+
);
|
|
615
|
+
(0, import_react8.useEffect)(() => {
|
|
616
|
+
if (!isOpen) return;
|
|
617
|
+
const triggerEl = triggerRef.current;
|
|
618
|
+
if (!triggerEl) return;
|
|
619
|
+
const scrollableParents = getScrollableParents(triggerEl);
|
|
620
|
+
const close = () => setIsOpen(false);
|
|
621
|
+
scrollableParents.forEach((parent) => {
|
|
622
|
+
parent.addEventListener("scroll", close);
|
|
623
|
+
});
|
|
624
|
+
window.addEventListener("resize", close);
|
|
625
|
+
return () => {
|
|
626
|
+
scrollableParents.forEach((parent) => {
|
|
627
|
+
parent.removeEventListener("scroll", close);
|
|
628
|
+
});
|
|
629
|
+
window.removeEventListener("resize", close);
|
|
630
|
+
};
|
|
631
|
+
}, [isOpen, setIsOpen]);
|
|
632
|
+
(0, import_react8.useEffect)(() => {
|
|
633
|
+
if (isOpen) {
|
|
634
|
+
setIsHidden(false);
|
|
635
|
+
}
|
|
636
|
+
}, [isOpen]);
|
|
637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
638
|
+
trigger(bag, triggerRef),
|
|
639
|
+
(0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
640
|
+
"div",
|
|
641
|
+
{
|
|
642
|
+
ref: menuRef,
|
|
643
|
+
onClick: (e) => e.stopPropagation(),
|
|
644
|
+
className: (0, import_clsx4.default)(
|
|
645
|
+
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-10",
|
|
548
646
|
{
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
"hidden": !isOpen
|
|
559
|
-
},
|
|
560
|
-
menuClassName
|
|
561
|
-
),
|
|
562
|
-
children: BagFunctionUtil.resolve(children, bag)
|
|
647
|
+
"animate-pop-in": isOpen,
|
|
648
|
+
"animate-pop-out": !isOpen,
|
|
649
|
+
"hidden": isHidden
|
|
650
|
+
},
|
|
651
|
+
menuClassName
|
|
652
|
+
),
|
|
653
|
+
onAnimationEnd: () => {
|
|
654
|
+
if (!isOpen) {
|
|
655
|
+
setIsHidden(true);
|
|
563
656
|
}
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
657
|
+
},
|
|
658
|
+
style: {
|
|
659
|
+
...menuPosition
|
|
660
|
+
},
|
|
661
|
+
children: BagFunctionUtil.resolve(children, bag)
|
|
662
|
+
}
|
|
663
|
+
), document.body)
|
|
664
|
+
] });
|
|
568
665
|
};
|
|
569
666
|
|
|
570
667
|
// src/localization/LanguageProvider.tsx
|
|
571
|
-
var
|
|
668
|
+
var import_react10 = require("react");
|
|
572
669
|
|
|
573
670
|
// src/hooks/useLocalStorage.ts
|
|
574
|
-
var
|
|
671
|
+
var import_react9 = require("react");
|
|
575
672
|
|
|
576
673
|
// src/localization/util.ts
|
|
577
674
|
var languages = ["en", "de"];
|
|
@@ -588,11 +685,11 @@ var LanguageUtil = {
|
|
|
588
685
|
|
|
589
686
|
// src/localization/LanguageProvider.tsx
|
|
590
687
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
591
|
-
var LanguageContext = (0,
|
|
688
|
+
var LanguageContext = (0, import_react10.createContext)({
|
|
592
689
|
language: LanguageUtil.DEFAULT_LANGUAGE,
|
|
593
690
|
setLanguage: (v) => v
|
|
594
691
|
});
|
|
595
|
-
var useLanguage = () => (0,
|
|
692
|
+
var useLanguage = () => (0, import_react10.useContext)(LanguageContext);
|
|
596
693
|
|
|
597
694
|
// src/localization/useTranslation.ts
|
|
598
695
|
var TranslationPluralCount = {
|
|
@@ -657,6 +754,7 @@ var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
|
657
754
|
// src/localization/defaults/form.ts
|
|
658
755
|
var formTranslation = {
|
|
659
756
|
en: {
|
|
757
|
+
add: "Add",
|
|
660
758
|
all: "All",
|
|
661
759
|
apply: "Apply",
|
|
662
760
|
back: "Back",
|
|
@@ -669,6 +767,7 @@ var formTranslation = {
|
|
|
669
767
|
confirm: "Confirm",
|
|
670
768
|
copy: "Copy",
|
|
671
769
|
copied: "Copied",
|
|
770
|
+
create: "Create",
|
|
672
771
|
decline: "Decline",
|
|
673
772
|
delete: "Delete",
|
|
674
773
|
discard: "Discard",
|
|
@@ -711,6 +810,7 @@ var formTranslation = {
|
|
|
711
810
|
yes: "Yes"
|
|
712
811
|
},
|
|
713
812
|
de: {
|
|
813
|
+
add: "Hinzuf\xFCgen",
|
|
714
814
|
all: "Alle",
|
|
715
815
|
apply: "Anwenden",
|
|
716
816
|
back: "Zur\xFCck",
|
|
@@ -723,6 +823,7 @@ var formTranslation = {
|
|
|
723
823
|
confirm: "Best\xE4tigen",
|
|
724
824
|
copy: "Kopieren",
|
|
725
825
|
copied: "Kopiert",
|
|
826
|
+
create: "Erstellen",
|
|
726
827
|
decline: "Ablehnen",
|
|
727
828
|
delete: "L\xF6schen",
|
|
728
829
|
discard: "Verwerfen",
|
|
@@ -767,7 +868,7 @@ var formTranslation = {
|
|
|
767
868
|
};
|
|
768
869
|
|
|
769
870
|
// src/components/table/TableFilterButton.tsx
|
|
770
|
-
var
|
|
871
|
+
var import_react11 = require("react");
|
|
771
872
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
772
873
|
var defaultTableFilterTranslation = {
|
|
773
874
|
en: {
|
|
@@ -793,16 +894,16 @@ var TableFilterButton = ({
|
|
|
793
894
|
}) => {
|
|
794
895
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
795
896
|
const columnFilterValue = column.getFilterValue();
|
|
796
|
-
const [filterValue, setFilterValue] = (0,
|
|
897
|
+
const [filterValue, setFilterValue] = (0, import_react11.useState)(columnFilterValue);
|
|
797
898
|
const hasFilter = !!filterValue;
|
|
798
|
-
(0,
|
|
899
|
+
(0, import_react11.useEffect)(() => {
|
|
799
900
|
setFilterValue(columnFilterValue);
|
|
800
901
|
}, [columnFilterValue]);
|
|
801
902
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
802
903
|
Menu,
|
|
803
904
|
{
|
|
804
|
-
trigger: (
|
|
805
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { color: "neutral", size: "tiny", onClick, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react.FilterIcon, {}) }),
|
|
905
|
+
trigger: ({ toggleOpen }, ref) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { ref, className: "relative", children: [
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconButton, { color: "neutral", size: "tiny", onClick: toggleOpen, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react.FilterIcon, {}) }),
|
|
806
907
|
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
807
908
|
"div",
|
|
808
909
|
{
|
|
@@ -811,7 +912,7 @@ var TableFilterButton = ({
|
|
|
811
912
|
}
|
|
812
913
|
)
|
|
813
914
|
] }),
|
|
814
|
-
children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "col
|
|
915
|
+
children: ({ close }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-col-1 p-2 items-start font-normal text-menu-text", children: [
|
|
815
916
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h4", { className: "textstyle-title-sm", children: translation("filter") }),
|
|
816
917
|
filterType === "text" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
817
918
|
Input,
|
|
@@ -823,7 +924,7 @@ var TableFilterButton = ({
|
|
|
823
924
|
className: "h-10"
|
|
824
925
|
}
|
|
825
926
|
),
|
|
826
|
-
filterType === "range" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "row
|
|
927
|
+
filterType === "range" && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-row-2 items-center", children: [
|
|
827
928
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
828
929
|
Input,
|
|
829
930
|
{
|
|
@@ -880,7 +981,7 @@ var TableFilterButton = ({
|
|
|
880
981
|
}
|
|
881
982
|
)
|
|
882
983
|
] }),
|
|
883
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "row justify-end w-full", children: [
|
|
984
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-row-2 justify-end w-full", children: [
|
|
884
985
|
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SolidButton, { color: "negative", size: "small", onClick: () => {
|
|
885
986
|
column.setFilterValue(void 0);
|
|
886
987
|
close();
|