@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
|
@@ -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,18 +198,17 @@ 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);
|
|
210
210
|
}
|
|
211
211
|
}, [disabled, timer]);
|
|
212
|
-
console.log(timer);
|
|
213
212
|
return { restartTimer, clearTimer, hasActiveTimer: !!timer };
|
|
214
213
|
}
|
|
215
214
|
|
|
@@ -235,9 +234,9 @@ var Label = ({
|
|
|
235
234
|
};
|
|
236
235
|
|
|
237
236
|
// src/hooks/useFocusManagement.ts
|
|
238
|
-
var
|
|
237
|
+
var import_react3 = require("react");
|
|
239
238
|
function useFocusManagement() {
|
|
240
|
-
const getFocusableElements = (0,
|
|
239
|
+
const getFocusableElements = (0, import_react3.useCallback)(() => {
|
|
241
240
|
return Array.from(
|
|
242
241
|
document.querySelectorAll(
|
|
243
242
|
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
@@ -246,7 +245,7 @@ function useFocusManagement() {
|
|
|
246
245
|
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
247
246
|
);
|
|
248
247
|
}, []);
|
|
249
|
-
const getNextFocusElement = (0,
|
|
248
|
+
const getNextFocusElement = (0, import_react3.useCallback)(() => {
|
|
250
249
|
const elements = getFocusableElements();
|
|
251
250
|
if (elements.length === 0) {
|
|
252
251
|
return void 0;
|
|
@@ -258,11 +257,11 @@ function useFocusManagement() {
|
|
|
258
257
|
}
|
|
259
258
|
return nextElement;
|
|
260
259
|
}, [getFocusableElements]);
|
|
261
|
-
const focusNext = (0,
|
|
260
|
+
const focusNext = (0, import_react3.useCallback)(() => {
|
|
262
261
|
const nextElement = getNextFocusElement();
|
|
263
262
|
nextElement?.focus();
|
|
264
263
|
}, [getNextFocusElement]);
|
|
265
|
-
const getPreviousFocusElement = (0,
|
|
264
|
+
const getPreviousFocusElement = (0, import_react3.useCallback)(() => {
|
|
266
265
|
const elements = getFocusableElements();
|
|
267
266
|
if (elements.length === 0) {
|
|
268
267
|
return void 0;
|
|
@@ -278,7 +277,7 @@ function useFocusManagement() {
|
|
|
278
277
|
}
|
|
279
278
|
return previousElement;
|
|
280
279
|
}, [getFocusableElements]);
|
|
281
|
-
const focusPrevious = (0,
|
|
280
|
+
const focusPrevious = (0, import_react3.useCallback)(() => {
|
|
282
281
|
const previousElement = getPreviousFocusElement();
|
|
283
282
|
if (previousElement) previousElement.focus();
|
|
284
283
|
}, [getPreviousFocusElement]);
|
|
@@ -292,10 +291,10 @@ function useFocusManagement() {
|
|
|
292
291
|
}
|
|
293
292
|
|
|
294
293
|
// src/hooks/useFocusOnceVisible.ts
|
|
295
|
-
var
|
|
294
|
+
var import_react4 = __toESM(require("react"));
|
|
296
295
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
297
|
-
const [hasUsedFocus, setHasUsedFocus] =
|
|
298
|
-
(0,
|
|
296
|
+
const [hasUsedFocus, setHasUsedFocus] = import_react4.default.useState(false);
|
|
297
|
+
(0, import_react4.useEffect)(() => {
|
|
299
298
|
if (disable || hasUsedFocus) {
|
|
300
299
|
return;
|
|
301
300
|
}
|
|
@@ -331,7 +330,7 @@ var defaultEditCompleteOptions = {
|
|
|
331
330
|
afterDelay: true,
|
|
332
331
|
delay: 2500
|
|
333
332
|
};
|
|
334
|
-
var Input = (0,
|
|
333
|
+
var Input = (0, import_react5.forwardRef)(function Input2({
|
|
335
334
|
id,
|
|
336
335
|
type = "text",
|
|
337
336
|
value,
|
|
@@ -354,10 +353,10 @@ var Input = (0, import_react4.forwardRef)(function Input2({
|
|
|
354
353
|
restartTimer,
|
|
355
354
|
clearTimer
|
|
356
355
|
} = useDelay({ delay, disabled: !afterDelay });
|
|
357
|
-
const innerRef = (0,
|
|
356
|
+
const innerRef = (0, import_react5.useRef)(null);
|
|
358
357
|
const { focusNext } = useFocusManagement();
|
|
359
358
|
useFocusOnceVisible(innerRef, !autoFocus);
|
|
360
|
-
(0,
|
|
359
|
+
(0, import_react5.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
361
360
|
const handleKeyDown = (e) => {
|
|
362
361
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
363
362
|
e.preventDefault();
|
|
@@ -406,7 +405,7 @@ var Input = (0, import_react4.forwardRef)(function Input2({
|
|
|
406
405
|
)
|
|
407
406
|
] });
|
|
408
407
|
});
|
|
409
|
-
var FormInput = (0,
|
|
408
|
+
var FormInput = (0, import_react5.forwardRef)(function FormInput2({
|
|
410
409
|
id,
|
|
411
410
|
labelText,
|
|
412
411
|
errorText,
|
|
@@ -445,13 +444,13 @@ var FormInput = (0, import_react4.forwardRef)(function FormInput2({
|
|
|
445
444
|
var import_lucide_react = require("lucide-react");
|
|
446
445
|
|
|
447
446
|
// src/components/user-action/Menu.tsx
|
|
448
|
-
var
|
|
447
|
+
var import_react8 = require("react");
|
|
449
448
|
var import_clsx4 = __toESM(require("clsx"));
|
|
450
449
|
|
|
451
450
|
// src/hooks/useOutsideClick.ts
|
|
452
|
-
var
|
|
451
|
+
var import_react6 = require("react");
|
|
453
452
|
var useOutsideClick = (refs, handler) => {
|
|
454
|
-
(0,
|
|
453
|
+
(0, import_react6.useEffect)(() => {
|
|
455
454
|
const listener = (event) => {
|
|
456
455
|
if (event.target === null) return;
|
|
457
456
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -469,15 +468,15 @@ var useOutsideClick = (refs, handler) => {
|
|
|
469
468
|
};
|
|
470
469
|
|
|
471
470
|
// src/hooks/useHoverState.ts
|
|
472
|
-
var
|
|
471
|
+
var import_react7 = require("react");
|
|
473
472
|
var defaultUseHoverStateProps = {
|
|
474
473
|
closingDelay: 200,
|
|
475
474
|
isDisabled: false
|
|
476
475
|
};
|
|
477
476
|
var useHoverState = (props = void 0) => {
|
|
478
477
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
479
|
-
const [isHovered, setIsHovered] = (0,
|
|
480
|
-
const [timer, setTimer] = (0,
|
|
478
|
+
const [isHovered, setIsHovered] = (0, import_react7.useState)(false);
|
|
479
|
+
const [timer, setTimer] = (0, import_react7.useState)();
|
|
481
480
|
const onMouseEnter = () => {
|
|
482
481
|
if (isDisabled) {
|
|
483
482
|
return;
|
|
@@ -493,14 +492,14 @@ var useHoverState = (props = void 0) => {
|
|
|
493
492
|
setIsHovered(false);
|
|
494
493
|
}, closingDelay));
|
|
495
494
|
};
|
|
496
|
-
(0,
|
|
495
|
+
(0, import_react7.useEffect)(() => {
|
|
497
496
|
if (timer) {
|
|
498
497
|
return () => {
|
|
499
498
|
clearTimeout(timer);
|
|
500
499
|
};
|
|
501
500
|
}
|
|
502
501
|
});
|
|
503
|
-
(0,
|
|
502
|
+
(0, import_react7.useEffect)(() => {
|
|
504
503
|
if (timer) {
|
|
505
504
|
clearTimeout(timer);
|
|
506
505
|
}
|
|
@@ -523,56 +522,153 @@ var BagFunctionUtil = {
|
|
|
523
522
|
resolve
|
|
524
523
|
};
|
|
525
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
|
+
|
|
526
579
|
// src/components/user-action/Menu.tsx
|
|
580
|
+
var import_react_dom = require("react-dom");
|
|
527
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
|
+
}
|
|
528
591
|
var Menu = ({
|
|
529
592
|
trigger,
|
|
530
593
|
children,
|
|
531
|
-
|
|
594
|
+
alignmentHorizontal = "leftInside",
|
|
595
|
+
alignmentVertical = "bottomOutside",
|
|
532
596
|
showOnHover = false,
|
|
597
|
+
disabled = false,
|
|
533
598
|
menuClassName = ""
|
|
534
599
|
}) => {
|
|
535
|
-
const { isHovered: isOpen, setIsHovered: setIsOpen
|
|
536
|
-
const triggerRef = (0,
|
|
537
|
-
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);
|
|
538
603
|
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
539
|
-
const
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
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",
|
|
549
646
|
{
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
"hidden": !isOpen
|
|
560
|
-
},
|
|
561
|
-
menuClassName
|
|
562
|
-
),
|
|
563
|
-
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);
|
|
564
656
|
}
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
657
|
+
},
|
|
658
|
+
style: {
|
|
659
|
+
...menuPosition
|
|
660
|
+
},
|
|
661
|
+
children: BagFunctionUtil.resolve(children, bag)
|
|
662
|
+
}
|
|
663
|
+
), document.body)
|
|
664
|
+
] });
|
|
569
665
|
};
|
|
570
666
|
|
|
571
667
|
// src/localization/LanguageProvider.tsx
|
|
572
|
-
var
|
|
668
|
+
var import_react10 = require("react");
|
|
573
669
|
|
|
574
670
|
// src/hooks/useLocalStorage.ts
|
|
575
|
-
var
|
|
671
|
+
var import_react9 = require("react");
|
|
576
672
|
|
|
577
673
|
// src/localization/util.ts
|
|
578
674
|
var languages = ["en", "de"];
|
|
@@ -589,11 +685,11 @@ var LanguageUtil = {
|
|
|
589
685
|
|
|
590
686
|
// src/localization/LanguageProvider.tsx
|
|
591
687
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
592
|
-
var LanguageContext = (0,
|
|
688
|
+
var LanguageContext = (0, import_react10.createContext)({
|
|
593
689
|
language: LanguageUtil.DEFAULT_LANGUAGE,
|
|
594
690
|
setLanguage: (v) => v
|
|
595
691
|
});
|
|
596
|
-
var useLanguage = () => (0,
|
|
692
|
+
var useLanguage = () => (0, import_react10.useContext)(LanguageContext);
|
|
597
693
|
|
|
598
694
|
// src/localization/useTranslation.ts
|
|
599
695
|
var TranslationPluralCount = {
|
|
@@ -658,6 +754,7 @@ var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
|
658
754
|
// src/localization/defaults/form.ts
|
|
659
755
|
var formTranslation = {
|
|
660
756
|
en: {
|
|
757
|
+
add: "Add",
|
|
661
758
|
all: "All",
|
|
662
759
|
apply: "Apply",
|
|
663
760
|
back: "Back",
|
|
@@ -670,6 +767,7 @@ var formTranslation = {
|
|
|
670
767
|
confirm: "Confirm",
|
|
671
768
|
copy: "Copy",
|
|
672
769
|
copied: "Copied",
|
|
770
|
+
create: "Create",
|
|
673
771
|
decline: "Decline",
|
|
674
772
|
delete: "Delete",
|
|
675
773
|
discard: "Discard",
|
|
@@ -712,6 +810,7 @@ var formTranslation = {
|
|
|
712
810
|
yes: "Yes"
|
|
713
811
|
},
|
|
714
812
|
de: {
|
|
813
|
+
add: "Hinzuf\xFCgen",
|
|
715
814
|
all: "Alle",
|
|
716
815
|
apply: "Anwenden",
|
|
717
816
|
back: "Zur\xFCck",
|
|
@@ -724,6 +823,7 @@ var formTranslation = {
|
|
|
724
823
|
confirm: "Best\xE4tigen",
|
|
725
824
|
copy: "Kopieren",
|
|
726
825
|
copied: "Kopiert",
|
|
826
|
+
create: "Erstellen",
|
|
727
827
|
decline: "Ablehnen",
|
|
728
828
|
delete: "L\xF6schen",
|
|
729
829
|
discard: "Verwerfen",
|
|
@@ -768,7 +868,7 @@ var formTranslation = {
|
|
|
768
868
|
};
|
|
769
869
|
|
|
770
870
|
// src/components/table/TableFilterButton.tsx
|
|
771
|
-
var
|
|
871
|
+
var import_react11 = require("react");
|
|
772
872
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
773
873
|
var defaultTableFilterTranslation = {
|
|
774
874
|
en: {
|
|
@@ -794,16 +894,16 @@ var TableFilterButton = ({
|
|
|
794
894
|
}) => {
|
|
795
895
|
const translation = useTranslation([formTranslation, defaultTableFilterTranslation]);
|
|
796
896
|
const columnFilterValue = column.getFilterValue();
|
|
797
|
-
const [filterValue, setFilterValue] = (0,
|
|
897
|
+
const [filterValue, setFilterValue] = (0, import_react11.useState)(columnFilterValue);
|
|
798
898
|
const hasFilter = !!filterValue;
|
|
799
|
-
(0,
|
|
899
|
+
(0, import_react11.useEffect)(() => {
|
|
800
900
|
setFilterValue(columnFilterValue);
|
|
801
901
|
}, [columnFilterValue]);
|
|
802
902
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
803
903
|
Menu,
|
|
804
904
|
{
|
|
805
|
-
trigger: (
|
|
806
|
-
/* @__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, {}) }),
|
|
807
907
|
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
808
908
|
"div",
|
|
809
909
|
{
|
|
@@ -812,7 +912,7 @@ var TableFilterButton = ({
|
|
|
812
912
|
}
|
|
813
913
|
)
|
|
814
914
|
] }),
|
|
815
|
-
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: [
|
|
816
916
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("h4", { className: "textstyle-title-sm", children: translation("filter") }),
|
|
817
917
|
filterType === "text" && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
818
918
|
Input,
|
|
@@ -824,7 +924,7 @@ var TableFilterButton = ({
|
|
|
824
924
|
className: "h-10"
|
|
825
925
|
}
|
|
826
926
|
),
|
|
827
|
-
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: [
|
|
828
928
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
829
929
|
Input,
|
|
830
930
|
{
|
|
@@ -881,7 +981,7 @@ var TableFilterButton = ({
|
|
|
881
981
|
}
|
|
882
982
|
)
|
|
883
983
|
] }),
|
|
884
|
-
/* @__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: [
|
|
885
985
|
hasFilter && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SolidButton, { color: "negative", size: "small", onClick: () => {
|
|
886
986
|
column.setFilterValue(void 0);
|
|
887
987
|
close();
|