@helpwave/hightide 0.1.25 → 0.1.26
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/README.md +1 -1
- package/dist/components/branding/HelpwaveBadge.d.mts +4 -5
- package/dist/components/branding/HelpwaveBadge.d.ts +4 -5
- package/dist/components/branding/HelpwaveBadge.js +46 -87
- package/dist/components/branding/HelpwaveBadge.js.map +1 -1
- package/dist/components/branding/HelpwaveBadge.mjs +46 -89
- package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
- package/dist/components/date/DatePicker.d.mts +1 -1
- package/dist/components/date/DatePicker.d.ts +1 -1
- package/dist/components/date/DatePicker.js +64 -13
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +65 -14
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.d.mts +1 -1
- package/dist/components/date/DayPicker.d.ts +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/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/date/TimePicker.js +2 -2
- package/dist/components/date/TimePicker.js.map +1 -1
- package/dist/components/date/TimePicker.mjs +2 -2
- package/dist/components/date/TimePicker.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +58 -7
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +59 -8
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/{dialogs → dialog}/ConfirmDialog.d.mts +9 -8
- package/dist/components/{dialogs → dialog}/ConfirmDialog.d.ts +9 -8
- package/dist/components/dialog/ConfirmDialog.js +938 -0
- package/dist/components/dialog/ConfirmDialog.js.map +1 -0
- package/dist/components/dialog/ConfirmDialog.mjs +902 -0
- package/dist/components/dialog/ConfirmDialog.mjs.map +1 -0
- package/dist/components/dialog/Dialog.d.mts +27 -0
- package/dist/components/dialog/Dialog.d.ts +27 -0
- package/dist/components/dialog/Dialog.js +879 -0
- package/dist/components/dialog/Dialog.js.map +1 -0
- package/dist/components/dialog/Dialog.mjs +845 -0
- package/dist/components/dialog/Dialog.mjs.map +1 -0
- package/dist/components/dialog/DiscardChangesDialog.d.mts +24 -0
- package/dist/components/dialog/DiscardChangesDialog.d.ts +24 -0
- package/dist/components/dialog/DiscardChangesDialog.js +966 -0
- package/dist/components/dialog/DiscardChangesDialog.js.map +1 -0
- package/dist/components/dialog/DiscardChangesDialog.mjs +930 -0
- package/dist/components/dialog/DiscardChangesDialog.mjs.map +1 -0
- package/dist/components/dialog/InputDialog.d.mts +22 -0
- package/dist/components/dialog/InputDialog.d.ts +22 -0
- package/dist/components/dialog/InputDialog.js +1139 -0
- package/dist/components/dialog/InputDialog.js.map +1 -0
- package/dist/components/dialog/InputDialog.mjs +1103 -0
- package/dist/components/dialog/InputDialog.mjs.map +1 -0
- package/dist/components/dialog/LanguageDialog.d.mts +25 -0
- package/dist/components/dialog/LanguageDialog.d.ts +25 -0
- package/dist/components/dialog/LanguageDialog.js +1684 -0
- package/dist/components/dialog/LanguageDialog.js.map +1 -0
- package/dist/components/dialog/LanguageDialog.mjs +1658 -0
- package/dist/components/dialog/LanguageDialog.mjs.map +1 -0
- package/dist/components/dialog/ThemeDialog.d.mts +26 -0
- package/dist/components/dialog/ThemeDialog.d.ts +26 -0
- package/dist/components/dialog/ThemeDialog.js +1715 -0
- package/dist/components/dialog/ThemeDialog.js.map +1 -0
- package/dist/components/dialog/ThemeDialog.mjs +1689 -0
- package/dist/components/dialog/ThemeDialog.mjs.map +1 -0
- package/dist/components/dialog/index.d.mts +17 -0
- package/dist/components/dialog/index.d.ts +17 -0
- package/dist/components/dialog/index.js +2062 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/dialog/index.mjs +2031 -0
- package/dist/components/dialog/index.mjs.map +1 -0
- package/dist/components/form/FormElementWrapper.d.mts +29 -0
- package/dist/components/form/FormElementWrapper.d.ts +29 -0
- package/dist/components/form/FormElementWrapper.js +98 -0
- package/dist/components/form/FormElementWrapper.js.map +1 -0
- package/dist/components/form/FormElementWrapper.mjs +64 -0
- package/dist/components/form/FormElementWrapper.mjs.map +1 -0
- package/dist/components/icons-and-geometry/Avatar.js +498 -2886
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.mjs +490 -2878
- package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
- package/dist/components/icons-and-geometry/{Helpwave.d.mts → HelpwaveLogo.d.mts} +3 -3
- package/dist/components/icons-and-geometry/{Helpwave.d.ts → HelpwaveLogo.d.ts} +3 -3
- package/dist/components/icons-and-geometry/{Helpwave.js → HelpwaveLogo.js} +21 -22
- package/dist/components/icons-and-geometry/HelpwaveLogo.js.map +1 -0
- package/dist/components/icons-and-geometry/{Helpwave.mjs → HelpwaveLogo.mjs} +17 -18
- package/dist/components/icons-and-geometry/HelpwaveLogo.mjs.map +1 -0
- package/dist/components/icons-and-geometry/Ring.js +1 -1
- package/dist/components/icons-and-geometry/Ring.js.map +1 -1
- package/dist/components/icons-and-geometry/Ring.mjs +1 -1
- package/dist/components/icons-and-geometry/Ring.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Tag.js +8 -20
- package/dist/components/icons-and-geometry/Tag.js.map +1 -1
- package/dist/components/icons-and-geometry/Tag.mjs +8 -20
- package/dist/components/icons-and-geometry/Tag.mjs.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.js +667 -22
- package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.mjs +667 -22
- package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +12 -10
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +12 -10
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Chip.d.mts +8 -5
- package/dist/components/layout-and-navigation/Chip.d.ts +8 -5
- package/dist/components/layout-and-navigation/Chip.js +17 -4
- package/dist/components/layout-and-navigation/Chip.js.map +1 -1
- package/dist/components/layout-and-navigation/Chip.mjs +17 -4
- package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.d.mts +13 -10
- package/dist/components/layout-and-navigation/Expandable.d.ts +13 -10
- package/dist/components/layout-and-navigation/Expandable.js +18 -5
- package/dist/components/layout-and-navigation/Expandable.js.map +1 -1
- package/dist/components/layout-and-navigation/Expandable.mjs +19 -6
- package/dist/components/layout-and-navigation/Expandable.mjs.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.js +21 -8
- package/dist/components/layout-and-navigation/FAQSection.js.map +1 -1
- package/dist/components/layout-and-navigation/FAQSection.mjs +22 -9
- package/dist/components/layout-and-navigation/FAQSection.mjs.map +1 -1
- package/dist/components/layout-and-navigation/FloatingContainer.d.mts +38 -0
- package/dist/components/layout-and-navigation/FloatingContainer.d.ts +38 -0
- package/dist/components/layout-and-navigation/FloatingContainer.js +219 -0
- package/dist/components/layout-and-navigation/FloatingContainer.js.map +1 -0
- package/dist/components/layout-and-navigation/FloatingContainer.mjs +195 -0
- package/dist/components/layout-and-navigation/FloatingContainer.mjs.map +1 -0
- package/dist/components/layout-and-navigation/ListBox.d.mts +44 -0
- package/dist/components/layout-and-navigation/ListBox.d.ts +44 -0
- package/dist/components/layout-and-navigation/ListBox.js +329 -0
- package/dist/components/layout-and-navigation/ListBox.js.map +1 -0
- package/dist/components/layout-and-navigation/ListBox.mjs +290 -0
- package/dist/components/layout-and-navigation/ListBox.mjs.map +1 -0
- package/dist/components/layout-and-navigation/Pagination.js +104 -189
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +99 -184
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/ScrollArea.d.mts +15 -0
- package/dist/components/layout-and-navigation/ScrollArea.d.ts +15 -0
- package/dist/components/layout-and-navigation/ScrollArea.js +1252 -0
- package/dist/components/layout-and-navigation/ScrollArea.js.map +1 -0
- package/dist/components/layout-and-navigation/ScrollArea.mjs +1216 -0
- package/dist/components/layout-and-navigation/ScrollArea.mjs.map +1 -0
- package/dist/components/layout-and-navigation/StepperBar.js +41 -1
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +41 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.js +3 -1
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs +3 -1
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.d.mts +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +1 -1
- package/dist/components/loading-states/LoadingAnimation.js +18 -17
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +18 -17
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/LoadingButton.js +55 -18
- package/dist/components/loading-states/LoadingButton.js.map +1 -1
- package/dist/components/loading-states/LoadingButton.mjs +55 -18
- package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +890 -135
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +897 -142
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +153 -198
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +146 -191
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +5 -10
- package/dist/components/properties/MultiSelectProperty.d.ts +5 -10
- package/dist/components/properties/MultiSelectProperty.js +1143 -1160
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +1156 -1163
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +155 -201
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +148 -194
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +49 -9
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +49 -9
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +5 -8
- package/dist/components/properties/SelectProperty.d.ts +5 -8
- package/dist/components/properties/SelectProperty.js +1047 -834
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +1063 -840
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +97 -100
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +100 -103
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js +1618 -993
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +1625 -1000
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +116 -201
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +105 -190
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/table/TableSortButton.js +4 -3
- package/dist/components/table/TableSortButton.js.map +1 -1
- package/dist/components/table/TableSortButton.mjs +4 -3
- package/dist/components/table/TableSortButton.mjs.map +1 -1
- package/dist/components/user-action/Button.d.mts +15 -11
- package/dist/components/user-action/Button.d.ts +15 -11
- package/dist/components/user-action/Button.js +10 -9
- package/dist/components/user-action/Button.js.map +1 -1
- package/dist/components/user-action/Button.mjs +10 -9
- package/dist/components/user-action/Button.mjs.map +1 -1
- package/dist/components/user-action/Checkbox.d.mts +9 -25
- package/dist/components/user-action/Checkbox.d.ts +9 -25
- package/dist/components/user-action/Checkbox.js +793 -103
- package/dist/components/user-action/Checkbox.js.map +1 -1
- package/dist/components/user-action/Checkbox.mjs +794 -104
- package/dist/components/user-action/Checkbox.mjs.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.js +3 -1
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.mjs +3 -1
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.d.mts +1 -1
- package/dist/components/user-action/DateAndTimePicker.d.ts +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +66 -13
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +67 -14
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Label.d.mts +6 -8
- package/dist/components/user-action/Label.d.ts +6 -8
- package/dist/components/user-action/Label.js +4 -6
- package/dist/components/user-action/Label.js.map +1 -1
- package/dist/components/user-action/Label.mjs +4 -6
- package/dist/components/user-action/Label.mjs.map +1 -1
- package/dist/components/user-action/Menu.d.mts +2 -2
- package/dist/components/user-action/Menu.d.ts +2 -2
- package/dist/components/user-action/Menu.js +1 -1
- package/dist/components/user-action/Menu.js.map +1 -1
- package/dist/components/user-action/Menu.mjs +1 -1
- package/dist/components/user-action/Menu.mjs.map +1 -1
- package/dist/components/user-action/ScrollPicker.js +8 -6
- package/dist/components/user-action/ScrollPicker.js.map +1 -1
- package/dist/components/user-action/ScrollPicker.mjs +8 -6
- package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.d.mts +1 -2
- package/dist/components/user-action/SearchBar.d.ts +1 -2
- package/dist/components/user-action/SearchBar.js +93 -178
- package/dist/components/user-action/SearchBar.js.map +1 -1
- package/dist/components/user-action/SearchBar.mjs +86 -171
- package/dist/components/user-action/SearchBar.mjs.map +1 -1
- package/dist/components/user-action/Textarea.d.mts +22 -11
- package/dist/components/user-action/Textarea.d.ts +22 -11
- package/dist/components/user-action/Textarea.js +101 -92
- package/dist/components/user-action/Textarea.js.map +1 -1
- package/dist/components/user-action/Textarea.mjs +100 -92
- package/dist/components/user-action/Textarea.mjs.map +1 -1
- package/dist/components/user-action/input/Input.d.mts +37 -0
- package/dist/components/user-action/input/Input.d.ts +37 -0
- package/dist/components/user-action/input/Input.js +244 -0
- package/dist/components/user-action/input/Input.js.map +1 -0
- package/dist/components/user-action/input/Input.mjs +209 -0
- package/dist/components/user-action/input/Input.mjs.map +1 -0
- package/dist/components/user-action/input/InsideLabelInput.d.mts +20 -0
- package/dist/components/user-action/input/InsideLabelInput.d.ts +20 -0
- package/dist/components/user-action/input/InsideLabelInput.js +295 -0
- package/dist/components/user-action/input/InsideLabelInput.js.map +1 -0
- package/dist/components/user-action/input/InsideLabelInput.mjs +260 -0
- package/dist/components/user-action/input/InsideLabelInput.mjs.map +1 -0
- package/dist/components/user-action/input/ToggleableInput.d.mts +22 -0
- package/dist/components/user-action/input/ToggleableInput.d.ts +22 -0
- package/dist/components/user-action/{Input.js → input/ToggleableInput.js} +136 -171
- package/dist/components/user-action/input/ToggleableInput.js.map +1 -0
- package/dist/components/user-action/input/ToggleableInput.mjs +264 -0
- package/dist/components/user-action/input/ToggleableInput.mjs.map +1 -0
- package/dist/components/user-action/select/Select.d.mts +98 -0
- package/dist/components/user-action/select/Select.d.ts +98 -0
- package/dist/components/user-action/select/Select.js +1354 -0
- package/dist/components/user-action/select/Select.js.map +1 -0
- package/dist/components/user-action/select/Select.mjs +1320 -0
- package/dist/components/user-action/select/Select.mjs.map +1 -0
- package/dist/components/utils/FocusTrap.d.mts +28 -0
- package/dist/components/utils/FocusTrap.d.ts +28 -0
- package/dist/components/utils/FocusTrap.js +252 -0
- package/dist/components/utils/FocusTrap.js.map +1 -0
- package/dist/components/utils/FocusTrap.mjs +229 -0
- package/dist/components/utils/FocusTrap.mjs.map +1 -0
- package/dist/components/utils/Transition.d.mts +26 -0
- package/dist/components/utils/Transition.d.ts +26 -0
- package/dist/components/utils/Transition.js +74 -0
- package/dist/components/utils/Transition.js.map +1 -0
- package/dist/components/utils/Transition.mjs +50 -0
- package/dist/components/utils/Transition.mjs.map +1 -0
- package/dist/hooks/focus/useFocusGuards.d.mts +3 -0
- package/dist/hooks/focus/useFocusGuards.d.ts +3 -0
- package/dist/hooks/focus/useFocusGuards.js +74 -0
- package/dist/hooks/focus/useFocusGuards.js.map +1 -0
- package/dist/hooks/focus/useFocusGuards.mjs +50 -0
- package/dist/hooks/focus/useFocusGuards.mjs.map +1 -0
- package/dist/hooks/{useFocusManagement.js → focus/useFocusManagement.js} +1 -1
- package/dist/hooks/focus/useFocusManagement.js.map +1 -0
- package/dist/hooks/{useFocusManagement.mjs → focus/useFocusManagement.mjs} +1 -1
- package/dist/hooks/focus/useFocusManagement.mjs.map +1 -0
- package/dist/hooks/{useFocusOnceVisible.js → focus/useFocusOnceVisible.js} +1 -1
- package/dist/hooks/focus/useFocusOnceVisible.js.map +1 -0
- package/dist/hooks/{useFocusOnceVisible.mjs → focus/useFocusOnceVisible.mjs} +1 -1
- package/dist/hooks/focus/useFocusOnceVisible.mjs.map +1 -0
- package/dist/hooks/focus/useFocusTrap.d.mts +16 -0
- package/dist/hooks/focus/useFocusTrap.d.ts +16 -0
- package/dist/hooks/focus/useFocusTrap.js +233 -0
- package/dist/hooks/focus/useFocusTrap.js.map +1 -0
- package/dist/hooks/focus/useFocusTrap.mjs +210 -0
- package/dist/hooks/focus/useFocusTrap.mjs.map +1 -0
- package/dist/hooks/focus/useIsMounted.d.mts +3 -0
- package/dist/hooks/focus/useIsMounted.d.ts +3 -0
- package/dist/hooks/focus/useIsMounted.js +43 -0
- package/dist/hooks/focus/useIsMounted.js.map +1 -0
- package/dist/hooks/focus/useIsMounted.mjs +20 -0
- package/dist/hooks/focus/useIsMounted.mjs.map +1 -0
- package/dist/hooks/useFloatingElement.d.mts +22 -0
- package/dist/hooks/useFloatingElement.d.ts +22 -0
- package/dist/hooks/useFloatingElement.js +162 -0
- package/dist/hooks/useFloatingElement.js.map +1 -0
- package/dist/hooks/useFloatingElement.mjs +139 -0
- package/dist/hooks/useFloatingElement.mjs.map +1 -0
- package/dist/hooks/useLocalStorage.js +2 -2
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +2 -2
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/hooks/useLogOnce.d.mts +3 -4
- package/dist/hooks/useLogOnce.d.ts +3 -4
- package/dist/hooks/useLogOnce.js +5 -5
- package/dist/hooks/useLogOnce.js.map +1 -1
- package/dist/hooks/useLogOnce.mjs +5 -5
- package/dist/hooks/useLogOnce.mjs.map +1 -1
- package/dist/hooks/useRerender.d.mts +2 -2
- package/dist/hooks/useRerender.d.ts +2 -2
- package/dist/hooks/useSearch.d.mts +2 -2
- package/dist/hooks/useSearch.d.ts +2 -2
- package/dist/hooks/useSearch.js +1 -1
- package/dist/hooks/useSearch.js.map +1 -1
- package/dist/hooks/useSearch.mjs +1 -1
- package/dist/hooks/useSearch.mjs.map +1 -1
- package/dist/localization/LanguageProvider.d.mts +2 -2
- package/dist/localization/LanguageProvider.d.ts +2 -2
- package/dist/localization/LanguageProvider.js +2 -2
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +2 -2
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/defaults/form.d.mts +1 -0
- package/dist/localization/defaults/form.d.ts +1 -0
- package/dist/localization/defaults/form.js +2 -0
- package/dist/localization/defaults/form.js.map +1 -1
- package/dist/localization/defaults/form.mjs +2 -0
- package/dist/localization/defaults/form.mjs.map +1 -1
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/storybook/helper.d.mts +17 -0
- package/dist/storybook/helper.d.ts +17 -0
- package/dist/storybook/helper.js +61 -0
- package/dist/storybook/helper.js.map +1 -0
- package/dist/storybook/helper.mjs +37 -0
- package/dist/storybook/helper.mjs.map +1 -0
- package/dist/{css → style}/globals.css +779 -374
- package/dist/{css → style}/uncompiled/globals.css +75 -13
- package/dist/{css → style}/uncompiled/theme/colors-component.css +18 -4
- package/dist/{css → style}/uncompiled/theme/colors-semantic.css +2 -9
- package/dist/style/uncompiled/typography.css +171 -0
- package/dist/{css → style}/uncompiled/utitlity/animation.css +54 -42
- package/dist/{css → style}/uncompiled/utitlity/index.css +2 -1
- package/dist/{css → style}/uncompiled/utitlity/shadow.css +5 -1
- package/dist/style/uncompiled/utitlity/sizing.css +29 -0
- package/dist/theming/useTheme.d.mts +2 -2
- package/dist/theming/useTheme.d.ts +2 -2
- package/dist/theming/useTheme.js +3 -3
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +3 -3
- package/dist/theming/useTheme.mjs.map +1 -1
- package/dist/{util → utils}/array.d.mts +1 -0
- package/dist/{util → utils}/array.d.ts +1 -0
- package/dist/{util → utils}/array.js +15 -2
- package/dist/utils/array.js.map +1 -0
- package/dist/{util → utils}/array.mjs +15 -2
- package/dist/utils/array.mjs.map +1 -0
- package/dist/utils/bagFunctions.d.mts +15 -0
- package/dist/utils/bagFunctions.d.ts +15 -0
- package/dist/{util/PropsWithFunctionChildren.js → utils/bagFunctions.js} +5 -5
- package/dist/utils/bagFunctions.js.map +1 -0
- package/dist/{util/PropsWithFunctionChildren.mjs → utils/bagFunctions.mjs} +2 -2
- package/dist/utils/bagFunctions.mjs.map +1 -0
- package/dist/{util → utils}/builder.js +1 -1
- package/dist/utils/builder.js.map +1 -0
- package/dist/{util → utils}/builder.mjs +1 -1
- package/dist/utils/builder.mjs.map +1 -0
- package/dist/{util → utils}/date.js +3 -3
- package/dist/utils/date.js.map +1 -0
- package/dist/{util → utils}/date.mjs +2 -2
- package/dist/utils/date.mjs.map +1 -0
- package/dist/{util → utils}/easeFunctions.js +5 -4
- package/dist/utils/easeFunctions.js.map +1 -0
- package/dist/{util → utils}/easeFunctions.mjs +4 -3
- package/dist/utils/easeFunctions.mjs.map +1 -0
- package/dist/{util → utils}/emailValidation.js +1 -1
- package/dist/utils/emailValidation.js.map +1 -0
- package/dist/{util → utils}/emailValidation.mjs +1 -1
- package/dist/utils/emailValidation.mjs.map +1 -0
- package/dist/{util → utils}/loopingArray.js +1 -1
- package/dist/utils/loopingArray.js.map +1 -0
- package/dist/{util → utils}/loopingArray.mjs +1 -1
- package/dist/utils/loopingArray.mjs.map +1 -0
- package/dist/utils/match.d.mts +3 -0
- package/dist/utils/match.d.ts +3 -0
- package/dist/utils/match.js +32 -0
- package/dist/utils/match.js.map +1 -0
- package/dist/utils/match.mjs +8 -0
- package/dist/utils/match.mjs.map +1 -0
- package/dist/utils/math.d.mts +3 -0
- package/dist/utils/math.d.ts +3 -0
- package/dist/{util → utils}/math.js +3 -2
- package/dist/utils/math.js.map +1 -0
- package/dist/utils/math.mjs +9 -0
- package/dist/utils/math.mjs.map +1 -0
- package/dist/{util → utils}/noop.js +1 -1
- package/dist/utils/noop.js.map +1 -0
- package/dist/utils/noop.mjs +6 -0
- package/dist/utils/noop.mjs.map +1 -0
- package/dist/{util → utils}/resolveSetState.js +1 -1
- package/dist/utils/resolveSetState.js.map +1 -0
- package/dist/{util → utils}/resolveSetState.mjs +1 -1
- package/dist/utils/resolveSetState.mjs.map +1 -0
- package/dist/{util → utils}/simpleSearch.js +1 -1
- package/dist/utils/simpleSearch.js.map +1 -0
- package/dist/{util → utils}/simpleSearch.mjs +1 -1
- package/dist/utils/simpleSearch.mjs.map +1 -0
- package/dist/{util → utils}/storage.js +1 -1
- package/dist/utils/storage.js.map +1 -0
- package/dist/{util → utils}/storage.mjs +1 -1
- package/dist/utils/storage.mjs.map +1 -0
- package/dist/{util → utils}/writeToClipboard.js +2 -1
- package/dist/utils/writeToClipboard.js.map +1 -0
- package/dist/{util → utils}/writeToClipboard.mjs +3 -1
- package/dist/utils/writeToClipboard.mjs.map +1 -0
- package/package.json +8 -8
- package/dist/components/dialogs/ConfirmDialog.js +0 -674
- package/dist/components/dialogs/ConfirmDialog.js.map +0 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +0 -638
- package/dist/components/dialogs/ConfirmDialog.mjs.map +0 -1
- package/dist/components/icons-and-geometry/Helpwave.js.map +0 -1
- package/dist/components/icons-and-geometry/Helpwave.mjs.map +0 -1
- package/dist/components/layout-and-navigation/Overlay.d.mts +0 -67
- package/dist/components/layout-and-navigation/Overlay.d.ts +0 -67
- package/dist/components/layout-and-navigation/Overlay.js +0 -702
- package/dist/components/layout-and-navigation/Overlay.js.map +0 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +0 -665
- package/dist/components/layout-and-navigation/Overlay.mjs.map +0 -1
- package/dist/components/layout-and-navigation/SearchableList.d.mts +0 -24
- package/dist/components/layout-and-navigation/SearchableList.d.ts +0 -24
- package/dist/components/layout-and-navigation/SearchableList.js +0 -758
- package/dist/components/layout-and-navigation/SearchableList.js.map +0 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +0 -724
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +0 -1
- package/dist/components/layout-and-navigation/Tile.d.mts +0 -27
- package/dist/components/layout-and-navigation/Tile.d.ts +0 -27
- package/dist/components/layout-and-navigation/Tile.js +0 -96
- package/dist/components/layout-and-navigation/Tile.js.map +0 -1
- package/dist/components/layout-and-navigation/Tile.mjs +0 -61
- package/dist/components/layout-and-navigation/Tile.mjs.map +0 -1
- package/dist/components/modals/ConfirmModal.d.mts +0 -33
- package/dist/components/modals/ConfirmModal.d.ts +0 -33
- package/dist/components/modals/ConfirmModal.js +0 -687
- package/dist/components/modals/ConfirmModal.js.map +0 -1
- package/dist/components/modals/ConfirmModal.mjs +0 -651
- package/dist/components/modals/ConfirmModal.mjs.map +0 -1
- package/dist/components/modals/DiscardChangesModal.d.mts +0 -20
- package/dist/components/modals/DiscardChangesModal.d.ts +0 -20
- package/dist/components/modals/DiscardChangesModal.js +0 -717
- package/dist/components/modals/DiscardChangesModal.js.map +0 -1
- package/dist/components/modals/DiscardChangesModal.mjs +0 -681
- package/dist/components/modals/DiscardChangesModal.mjs.map +0 -1
- package/dist/components/modals/InputModal.d.mts +0 -21
- package/dist/components/modals/InputModal.d.ts +0 -21
- package/dist/components/modals/InputModal.js +0 -976
- package/dist/components/modals/InputModal.js.map +0 -1
- package/dist/components/modals/InputModal.mjs +0 -940
- package/dist/components/modals/InputModal.mjs.map +0 -1
- package/dist/components/modals/LanguageModal.d.mts +0 -21
- package/dist/components/modals/LanguageModal.d.ts +0 -21
- package/dist/components/modals/LanguageModal.js +0 -1468
- package/dist/components/modals/LanguageModal.js.map +0 -1
- package/dist/components/modals/LanguageModal.mjs +0 -1432
- package/dist/components/modals/LanguageModal.mjs.map +0 -1
- package/dist/components/modals/ThemeModal.d.mts +0 -21
- package/dist/components/modals/ThemeModal.d.ts +0 -21
- package/dist/components/modals/ThemeModal.js +0 -1497
- package/dist/components/modals/ThemeModal.js.map +0 -1
- package/dist/components/modals/ThemeModal.mjs +0 -1461
- package/dist/components/modals/ThemeModal.mjs.map +0 -1
- package/dist/components/user-action/Input.d.mts +0 -77
- package/dist/components/user-action/Input.d.ts +0 -77
- package/dist/components/user-action/Input.js.map +0 -1
- package/dist/components/user-action/Input.mjs +0 -298
- package/dist/components/user-action/Input.mjs.map +0 -1
- package/dist/components/user-action/MultiSelect.d.mts +0 -42
- package/dist/components/user-action/MultiSelect.d.ts +0 -42
- package/dist/components/user-action/MultiSelect.js +0 -1468
- package/dist/components/user-action/MultiSelect.js.map +0 -1
- package/dist/components/user-action/MultiSelect.mjs +0 -1433
- package/dist/components/user-action/MultiSelect.mjs.map +0 -1
- package/dist/components/user-action/Select.d.mts +0 -41
- package/dist/components/user-action/Select.d.ts +0 -41
- package/dist/components/user-action/Select.js +0 -1236
- package/dist/components/user-action/Select.js.map +0 -1
- package/dist/components/user-action/Select.mjs +0 -1201
- package/dist/components/user-action/Select.mjs.map +0 -1
- package/dist/components/user-action/ToggleableInput.d.mts +0 -37
- package/dist/components/user-action/ToggleableInput.d.ts +0 -37
- package/dist/components/user-action/ToggleableInput.js +0 -192
- package/dist/components/user-action/ToggleableInput.js.map +0 -1
- package/dist/components/user-action/ToggleableInput.mjs +0 -157
- package/dist/components/user-action/ToggleableInput.mjs.map +0 -1
- package/dist/css/uncompiled/textstyles.css +0 -69
- package/dist/hooks/useFocusManagement.js.map +0 -1
- package/dist/hooks/useFocusManagement.mjs.map +0 -1
- package/dist/hooks/useFocusOnceVisible.js.map +0 -1
- package/dist/hooks/useFocusOnceVisible.mjs.map +0 -1
- package/dist/index.d.mts +0 -103
- package/dist/index.d.ts +0 -103
- package/dist/index.js +0 -12610
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -12447
- package/dist/index.mjs.map +0 -1
- package/dist/util/PropsWithFunctionChildren.d.mts +0 -14
- package/dist/util/PropsWithFunctionChildren.d.ts +0 -14
- package/dist/util/PropsWithFunctionChildren.js.map +0 -1
- package/dist/util/PropsWithFunctionChildren.mjs.map +0 -1
- package/dist/util/array.js.map +0 -1
- package/dist/util/array.mjs.map +0 -1
- package/dist/util/builder.js.map +0 -1
- package/dist/util/builder.mjs.map +0 -1
- package/dist/util/date.js.map +0 -1
- package/dist/util/date.mjs.map +0 -1
- package/dist/util/easeFunctions.js.map +0 -1
- package/dist/util/easeFunctions.mjs.map +0 -1
- package/dist/util/emailValidation.js.map +0 -1
- package/dist/util/emailValidation.mjs.map +0 -1
- package/dist/util/loopingArray.js.map +0 -1
- package/dist/util/loopingArray.mjs.map +0 -1
- package/dist/util/math.d.mts +0 -3
- package/dist/util/math.d.ts +0 -3
- package/dist/util/math.js.map +0 -1
- package/dist/util/math.mjs +0 -8
- package/dist/util/math.mjs.map +0 -1
- package/dist/util/news.d.mts +0 -101
- package/dist/util/news.d.ts +0 -101
- package/dist/util/news.js +0 -76
- package/dist/util/news.js.map +0 -1
- package/dist/util/news.mjs +0 -49
- package/dist/util/news.mjs.map +0 -1
- package/dist/util/noop.js.map +0 -1
- package/dist/util/noop.mjs +0 -6
- package/dist/util/noop.mjs.map +0 -1
- package/dist/util/resolveSetState.js.map +0 -1
- package/dist/util/resolveSetState.mjs.map +0 -1
- package/dist/util/simpleSearch.js.map +0 -1
- package/dist/util/simpleSearch.mjs.map +0 -1
- package/dist/util/storage.js.map +0 -1
- package/dist/util/storage.mjs.map +0 -1
- package/dist/util/types.d.mts +0 -3
- package/dist/util/types.d.ts +0 -3
- package/dist/util/types.js +0 -18
- package/dist/util/types.js.map +0 -1
- package/dist/util/types.mjs +0 -1
- package/dist/util/types.mjs.map +0 -1
- package/dist/util/writeToClipboard.js.map +0 -1
- package/dist/util/writeToClipboard.mjs.map +0 -1
- /package/dist/hooks/{useFocusManagement.d.mts → focus/useFocusManagement.d.mts} +0 -0
- /package/dist/hooks/{useFocusManagement.d.ts → focus/useFocusManagement.d.ts} +0 -0
- /package/dist/hooks/{useFocusOnceVisible.d.mts → focus/useFocusOnceVisible.d.mts} +0 -0
- /package/dist/hooks/{useFocusOnceVisible.d.ts → focus/useFocusOnceVisible.d.ts} +0 -0
- /package/dist/{css → style}/uncompiled/theme/colors-basic.css +0 -0
- /package/dist/{css → style}/uncompiled/theme/index.css +0 -0
- /package/dist/{css → style}/uncompiled/theme/variants.css +0 -0
- /package/dist/{css → style}/uncompiled/utitlity/borderradius.css +0 -0
- /package/dist/{css → style}/uncompiled/utitlity/general.css +0 -0
- /package/dist/{util → utils}/builder.d.mts +0 -0
- /package/dist/{util → utils}/builder.d.ts +0 -0
- /package/dist/{util → utils}/date.d.mts +0 -0
- /package/dist/{util → utils}/date.d.ts +0 -0
- /package/dist/{util → utils}/easeFunctions.d.mts +0 -0
- /package/dist/{util → utils}/easeFunctions.d.ts +0 -0
- /package/dist/{util → utils}/emailValidation.d.mts +0 -0
- /package/dist/{util → utils}/emailValidation.d.ts +0 -0
- /package/dist/{util → utils}/loopingArray.d.mts +0 -0
- /package/dist/{util → utils}/loopingArray.d.ts +0 -0
- /package/dist/{util → utils}/noop.d.mts +0 -0
- /package/dist/{util → utils}/noop.d.ts +0 -0
- /package/dist/{util → utils}/resolveSetState.d.mts +0 -0
- /package/dist/{util → utils}/resolveSetState.d.ts +0 -0
- /package/dist/{util → utils}/simpleSearch.d.mts +0 -0
- /package/dist/{util → utils}/simpleSearch.d.ts +0 -0
- /package/dist/{util → utils}/storage.d.mts +0 -0
- /package/dist/{util → utils}/storage.d.ts +0 -0
- /package/dist/{util → utils}/writeToClipboard.d.mts +0 -0
- /package/dist/{util → utils}/writeToClipboard.d.ts +0 -0
|
@@ -0,0 +1,938 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
|
|
29
|
+
// src/components/dialog/ConfirmDialog.tsx
|
|
30
|
+
var ConfirmDialog_exports = {};
|
|
31
|
+
__export(ConfirmDialog_exports, {
|
|
32
|
+
ConfirmDialog: () => ConfirmDialog
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(ConfirmDialog_exports);
|
|
35
|
+
|
|
36
|
+
// src/components/user-action/Button.tsx
|
|
37
|
+
var import_react = require("react");
|
|
38
|
+
var import_clsx = __toESM(require("clsx"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var ButtonColorUtil = {
|
|
41
|
+
solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
|
|
42
|
+
text: ["primary", "negative", "neutral"],
|
|
43
|
+
outline: ["primary"]
|
|
44
|
+
};
|
|
45
|
+
var IconButtonUtil = {
|
|
46
|
+
icon: [...ButtonColorUtil.solid, "transparent"]
|
|
47
|
+
};
|
|
48
|
+
var paddingMapping = {
|
|
49
|
+
small: "btn-sm",
|
|
50
|
+
medium: "btn-md",
|
|
51
|
+
large: "btn-lg"
|
|
52
|
+
};
|
|
53
|
+
var iconPaddingMapping = {
|
|
54
|
+
tiny: "icon-btn-xs",
|
|
55
|
+
small: "icon-btn-sm",
|
|
56
|
+
medium: "icon-btn-md",
|
|
57
|
+
large: "icon-btn-lg"
|
|
58
|
+
};
|
|
59
|
+
var ButtonUtil = {
|
|
60
|
+
paddingMapping,
|
|
61
|
+
iconPaddingMapping
|
|
62
|
+
};
|
|
63
|
+
var SolidButton = (0, import_react.forwardRef)(function SolidButton2({
|
|
64
|
+
children,
|
|
65
|
+
color = "primary",
|
|
66
|
+
size = "medium",
|
|
67
|
+
startIcon,
|
|
68
|
+
endIcon,
|
|
69
|
+
onClick,
|
|
70
|
+
className,
|
|
71
|
+
...restProps
|
|
72
|
+
}, ref) {
|
|
73
|
+
const colorClasses = {
|
|
74
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
75
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
76
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
77
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
78
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
79
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
80
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
|
|
81
|
+
}[color];
|
|
82
|
+
const iconColorClasses = {
|
|
83
|
+
primary: "not-group-disabled:text-button-solid-primary-icon",
|
|
84
|
+
secondary: "not-group-disabled:text-button-solid-secondary-icon",
|
|
85
|
+
tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
|
|
86
|
+
positive: "not-group-disabled:text-button-solid-positive-icon",
|
|
87
|
+
warning: "not-group-disabled:text-button-solid-warning-icon",
|
|
88
|
+
negative: "not-group-disabled:text-button-solid-negative-icon",
|
|
89
|
+
neutral: "not-group-disabled:text-button-solid-neutral-icon"
|
|
90
|
+
}[color];
|
|
91
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
ref,
|
|
95
|
+
onClick,
|
|
96
|
+
className: (0, import_clsx.default)(
|
|
97
|
+
"group font-semibold",
|
|
98
|
+
colorClasses,
|
|
99
|
+
"not-disabled:hover:brightness-90",
|
|
100
|
+
"disabled:text-disabled-text disabled:bg-disabled-background",
|
|
101
|
+
ButtonUtil.paddingMapping[size],
|
|
102
|
+
className
|
|
103
|
+
),
|
|
104
|
+
...restProps,
|
|
105
|
+
children: [
|
|
106
|
+
startIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
+
"span",
|
|
108
|
+
{
|
|
109
|
+
className: (0, import_clsx.default)(
|
|
110
|
+
iconColorClasses,
|
|
111
|
+
"group-disabled:text-disabled-icon"
|
|
112
|
+
),
|
|
113
|
+
children: startIcon
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
children,
|
|
117
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
|
+
"span",
|
|
119
|
+
{
|
|
120
|
+
className: (0, import_clsx.default)(
|
|
121
|
+
iconColorClasses,
|
|
122
|
+
"group-disabled:text-disabled-icon"
|
|
123
|
+
),
|
|
124
|
+
children: endIcon
|
|
125
|
+
}
|
|
126
|
+
)
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
});
|
|
131
|
+
var IconButton = (0, import_react.forwardRef)(function IconButton2({
|
|
132
|
+
children,
|
|
133
|
+
color = "primary",
|
|
134
|
+
size = "medium",
|
|
135
|
+
className,
|
|
136
|
+
...restProps
|
|
137
|
+
}, ref) {
|
|
138
|
+
const colorClasses = {
|
|
139
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
140
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
141
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
142
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
143
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
144
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
145
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
|
|
146
|
+
transparent: "not-disabled:bg-transparent"
|
|
147
|
+
}[color];
|
|
148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
149
|
+
"button",
|
|
150
|
+
{
|
|
151
|
+
ref,
|
|
152
|
+
className: (0, import_clsx.default)(
|
|
153
|
+
colorClasses,
|
|
154
|
+
"not-disabled:hover:brightness-90",
|
|
155
|
+
"disabled:text-disabled-text",
|
|
156
|
+
{
|
|
157
|
+
"disabled:bg-disabled-background": color !== "transparent",
|
|
158
|
+
"disabled:opacity-70": color === "transparent",
|
|
159
|
+
"not-disabled:hover:bg-button-text-hover-background": color === "transparent"
|
|
160
|
+
},
|
|
161
|
+
ButtonUtil.iconPaddingMapping[size],
|
|
162
|
+
className
|
|
163
|
+
),
|
|
164
|
+
...restProps,
|
|
165
|
+
children
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// src/localization/LanguageProvider.tsx
|
|
171
|
+
var import_react3 = require("react");
|
|
172
|
+
|
|
173
|
+
// src/hooks/useLocalStorage.ts
|
|
174
|
+
var import_react2 = require("react");
|
|
175
|
+
|
|
176
|
+
// src/localization/util.ts
|
|
177
|
+
var languages = ["en", "de"];
|
|
178
|
+
var languagesLocalNames = {
|
|
179
|
+
en: "English",
|
|
180
|
+
de: "Deutsch"
|
|
181
|
+
};
|
|
182
|
+
var DEFAULT_LANGUAGE = "en";
|
|
183
|
+
var LanguageUtil = {
|
|
184
|
+
languages,
|
|
185
|
+
DEFAULT_LANGUAGE,
|
|
186
|
+
languagesLocalNames
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// src/localization/LanguageProvider.tsx
|
|
190
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
191
|
+
var LanguageContext = (0, import_react3.createContext)({
|
|
192
|
+
language: LanguageUtil.DEFAULT_LANGUAGE,
|
|
193
|
+
setLanguage: (v) => v
|
|
194
|
+
});
|
|
195
|
+
var useLanguage = () => (0, import_react3.useContext)(LanguageContext);
|
|
196
|
+
|
|
197
|
+
// src/localization/useTranslation.ts
|
|
198
|
+
var TranslationPluralCount = {
|
|
199
|
+
zero: 0,
|
|
200
|
+
one: 1,
|
|
201
|
+
two: 2,
|
|
202
|
+
few: 3,
|
|
203
|
+
many: 11,
|
|
204
|
+
other: -1
|
|
205
|
+
};
|
|
206
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
207
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
208
|
+
const { language: inferredLanguage } = useLanguage();
|
|
209
|
+
const usedLanguage = languageProp ?? inferredLanguage;
|
|
210
|
+
const usedTranslations = [...translations];
|
|
211
|
+
if (overwrite) {
|
|
212
|
+
usedTranslations.push(overwrite);
|
|
213
|
+
}
|
|
214
|
+
return (key, options) => {
|
|
215
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
216
|
+
try {
|
|
217
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
218
|
+
const translation = translations[i];
|
|
219
|
+
const localizedTranslation = translation[usedLanguage];
|
|
220
|
+
if (!localizedTranslation) {
|
|
221
|
+
continue;
|
|
222
|
+
}
|
|
223
|
+
const value = localizedTranslation[key];
|
|
224
|
+
if (!value) {
|
|
225
|
+
continue;
|
|
226
|
+
}
|
|
227
|
+
let forProcessing;
|
|
228
|
+
if (typeof value !== "string") {
|
|
229
|
+
if (count === TranslationPluralCount.zero && value?.zero) {
|
|
230
|
+
forProcessing = value.zero;
|
|
231
|
+
} else if (count === TranslationPluralCount.one && value?.one) {
|
|
232
|
+
forProcessing = value.one;
|
|
233
|
+
} else if (count === TranslationPluralCount.two && value?.two) {
|
|
234
|
+
forProcessing = value.two;
|
|
235
|
+
} else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
|
|
236
|
+
forProcessing = value.few;
|
|
237
|
+
} else if (count > TranslationPluralCount.many && value?.many) {
|
|
238
|
+
forProcessing = value.many;
|
|
239
|
+
} else {
|
|
240
|
+
forProcessing = value.other;
|
|
241
|
+
}
|
|
242
|
+
} else {
|
|
243
|
+
forProcessing = value;
|
|
244
|
+
}
|
|
245
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
246
|
+
return replacements[placeholder] ?? `{{key:${placeholder}}}`;
|
|
247
|
+
});
|
|
248
|
+
return forProcessing;
|
|
249
|
+
}
|
|
250
|
+
} catch (e) {
|
|
251
|
+
console.error(e);
|
|
252
|
+
}
|
|
253
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
254
|
+
};
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
// src/components/dialog/ConfirmDialog.tsx
|
|
258
|
+
var import_clsx4 = __toESM(require("clsx"));
|
|
259
|
+
|
|
260
|
+
// src/components/dialog/Dialog.tsx
|
|
261
|
+
var import_react9 = require("react");
|
|
262
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
263
|
+
var import_lucide_react = require("lucide-react");
|
|
264
|
+
|
|
265
|
+
// src/localization/defaults/form.ts
|
|
266
|
+
var formTranslation = {
|
|
267
|
+
en: {
|
|
268
|
+
add: "Add",
|
|
269
|
+
all: "All",
|
|
270
|
+
apply: "Apply",
|
|
271
|
+
back: "Back",
|
|
272
|
+
cancel: "Cancel",
|
|
273
|
+
change: "Change",
|
|
274
|
+
clear: "Clear",
|
|
275
|
+
click: "Click",
|
|
276
|
+
clickToCopy: "Click to Copy",
|
|
277
|
+
close: "Close",
|
|
278
|
+
confirm: "Confirm",
|
|
279
|
+
copy: "Copy",
|
|
280
|
+
copied: "Copied",
|
|
281
|
+
create: "Create",
|
|
282
|
+
decline: "Decline",
|
|
283
|
+
delete: "Delete",
|
|
284
|
+
discard: "Discard",
|
|
285
|
+
discardChanges: "Discard Changes",
|
|
286
|
+
done: "Done",
|
|
287
|
+
edit: "Edit",
|
|
288
|
+
enterText: "Enter text here",
|
|
289
|
+
error: "Error",
|
|
290
|
+
exit: "Exit",
|
|
291
|
+
fieldRequiredError: "This field is required.",
|
|
292
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
293
|
+
less: "Less",
|
|
294
|
+
loading: "Loading",
|
|
295
|
+
maxLengthError: "Maximum length exceeded.",
|
|
296
|
+
minLengthError: "Minimum length not met.",
|
|
297
|
+
more: "More",
|
|
298
|
+
next: "Next",
|
|
299
|
+
no: "No",
|
|
300
|
+
none: "None",
|
|
301
|
+
nothingFound: "Nothing found",
|
|
302
|
+
of: "of",
|
|
303
|
+
optional: "Optional",
|
|
304
|
+
pleaseWait: "Please wait...",
|
|
305
|
+
previous: "Previous",
|
|
306
|
+
remove: "Remove",
|
|
307
|
+
required: "Required",
|
|
308
|
+
reset: "Reset",
|
|
309
|
+
save: "Save",
|
|
310
|
+
saved: "Saved",
|
|
311
|
+
search: "Search",
|
|
312
|
+
select: "Select",
|
|
313
|
+
selectOption: "Select an option",
|
|
314
|
+
show: "Show",
|
|
315
|
+
showMore: "Show more",
|
|
316
|
+
showLess: "Show less",
|
|
317
|
+
submit: "Submit",
|
|
318
|
+
success: "Success",
|
|
319
|
+
update: "Update",
|
|
320
|
+
unsavedChanges: "Unsaved Changes",
|
|
321
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
322
|
+
yes: "Yes"
|
|
323
|
+
},
|
|
324
|
+
de: {
|
|
325
|
+
add: "Hinzuf\xFCgen",
|
|
326
|
+
all: "Alle",
|
|
327
|
+
apply: "Anwenden",
|
|
328
|
+
back: "Zur\xFCck",
|
|
329
|
+
cancel: "Abbrechen",
|
|
330
|
+
change: "\xC4ndern",
|
|
331
|
+
clear: "L\xF6schen",
|
|
332
|
+
click: "Klicken",
|
|
333
|
+
clickToCopy: "Zum kopieren klicken",
|
|
334
|
+
close: "Schlie\xDFen",
|
|
335
|
+
confirm: "Best\xE4tigen",
|
|
336
|
+
copy: "Kopieren",
|
|
337
|
+
copied: "Kopiert",
|
|
338
|
+
create: "Erstellen",
|
|
339
|
+
decline: "Ablehnen",
|
|
340
|
+
delete: "L\xF6schen",
|
|
341
|
+
discard: "Verwerfen",
|
|
342
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
343
|
+
done: "Fertig",
|
|
344
|
+
edit: "Bearbeiten",
|
|
345
|
+
enterText: "Text hier eingeben",
|
|
346
|
+
error: "Fehler",
|
|
347
|
+
exit: "Beenden",
|
|
348
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
349
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
350
|
+
less: "Weniger",
|
|
351
|
+
loading: "L\xE4dt",
|
|
352
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
353
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
354
|
+
more: "Mehr",
|
|
355
|
+
next: "Weiter",
|
|
356
|
+
no: "Nein",
|
|
357
|
+
none: "Nichts",
|
|
358
|
+
nothingFound: "Nichts gefunden",
|
|
359
|
+
of: "von",
|
|
360
|
+
optional: "Optional",
|
|
361
|
+
pleaseWait: "Bitte warten...",
|
|
362
|
+
previous: "Vorherige",
|
|
363
|
+
remove: "Entfernen",
|
|
364
|
+
required: "Erforderlich",
|
|
365
|
+
reset: "Zur\xFCcksetzen",
|
|
366
|
+
save: "Speichern",
|
|
367
|
+
saved: "Gespeichert",
|
|
368
|
+
search: "Suche",
|
|
369
|
+
select: "Select",
|
|
370
|
+
selectOption: "Option ausw\xE4hlen",
|
|
371
|
+
show: "Anzeigen",
|
|
372
|
+
showMore: "Mehr anzeigen",
|
|
373
|
+
showLess: "Weniger anzeigen",
|
|
374
|
+
submit: "Abschicken",
|
|
375
|
+
success: "Erfolg",
|
|
376
|
+
update: "Update",
|
|
377
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
378
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
379
|
+
yes: "Ja"
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
// src/components/layout-and-navigation/FloatingContainer.tsx
|
|
384
|
+
var import_react6 = require("react");
|
|
385
|
+
var import_react_dom = require("react-dom");
|
|
386
|
+
var import_clsx2 = require("clsx");
|
|
387
|
+
|
|
388
|
+
// src/hooks/useFloatingElement.ts
|
|
389
|
+
var import_react5 = require("react");
|
|
390
|
+
|
|
391
|
+
// src/utils/math.ts
|
|
392
|
+
var clamp = (value, range = [0, 1]) => {
|
|
393
|
+
const [min, max] = range;
|
|
394
|
+
return Math.min(Math.max(value, min), max);
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
// src/hooks/focus/useIsMounted.ts
|
|
398
|
+
var import_react4 = require("react");
|
|
399
|
+
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
400
|
+
var useIsomorphicEffect = isClient ? import_react4.useLayoutEffect : import_react4.useEffect;
|
|
401
|
+
var useIsMounted = () => {
|
|
402
|
+
const [isMounted, setIsMounted] = (0, import_react4.useState)(false);
|
|
403
|
+
useIsomorphicEffect(() => {
|
|
404
|
+
setIsMounted(true);
|
|
405
|
+
return () => {
|
|
406
|
+
setIsMounted(false);
|
|
407
|
+
};
|
|
408
|
+
}, []);
|
|
409
|
+
return isMounted;
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
// src/hooks/useFloatingElement.ts
|
|
413
|
+
function calculatePosition({
|
|
414
|
+
windowRect,
|
|
415
|
+
containerRect,
|
|
416
|
+
anchorRect,
|
|
417
|
+
options
|
|
418
|
+
}) {
|
|
419
|
+
const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
|
|
420
|
+
const windowWidth = windowRect.width;
|
|
421
|
+
const windowHeight = windowRect.height;
|
|
422
|
+
const maxWidth = windowWidth - 2 * screenPadding;
|
|
423
|
+
const maxHeight = windowHeight - 2 * screenPadding;
|
|
424
|
+
const width = Math.min(containerRect.width, maxWidth);
|
|
425
|
+
const height = Math.min(containerRect.height, maxHeight);
|
|
426
|
+
const leftSuggestion = {
|
|
427
|
+
beforeStart: anchorRect.left - width - gap,
|
|
428
|
+
afterStart: anchorRect.left,
|
|
429
|
+
center: anchorRect.left + anchorRect.width / 2 - width / 2,
|
|
430
|
+
beforeEnd: anchorRect.right - width,
|
|
431
|
+
afterEnd: anchorRect.right + gap
|
|
432
|
+
}[horizontalAlignment];
|
|
433
|
+
const topSuggestion = {
|
|
434
|
+
beforeStart: anchorRect.top - height - gap,
|
|
435
|
+
afterStart: anchorRect.top,
|
|
436
|
+
center: anchorRect.top + anchorRect.height / 2 - height / 2,
|
|
437
|
+
beforeEnd: anchorRect.bottom - height,
|
|
438
|
+
afterEnd: anchorRect.bottom + gap
|
|
439
|
+
}[verticalAlignment];
|
|
440
|
+
const left = clamp(leftSuggestion, [
|
|
441
|
+
screenPadding,
|
|
442
|
+
windowWidth - screenPadding - width
|
|
443
|
+
]);
|
|
444
|
+
const top = clamp(topSuggestion, [
|
|
445
|
+
screenPadding,
|
|
446
|
+
windowHeight - screenPadding - height
|
|
447
|
+
]);
|
|
448
|
+
return {
|
|
449
|
+
left,
|
|
450
|
+
top,
|
|
451
|
+
maxWidth,
|
|
452
|
+
maxHeight
|
|
453
|
+
};
|
|
454
|
+
}
|
|
455
|
+
function useFloatingElement({
|
|
456
|
+
active = true,
|
|
457
|
+
windowRef,
|
|
458
|
+
anchorRef,
|
|
459
|
+
containerRef,
|
|
460
|
+
isPolling = false,
|
|
461
|
+
pollingInterval = 100,
|
|
462
|
+
verticalAlignment = "afterEnd",
|
|
463
|
+
horizontalAlignment = "afterStart",
|
|
464
|
+
screenPadding = 16,
|
|
465
|
+
gap = 4
|
|
466
|
+
}) {
|
|
467
|
+
const [style, setStyle] = (0, import_react5.useState)();
|
|
468
|
+
const isMounted = useIsMounted();
|
|
469
|
+
const calculate = (0, import_react5.useCallback)(() => {
|
|
470
|
+
const containerRect = containerRef.current.getBoundingClientRect();
|
|
471
|
+
const windowRect = windowRef?.current.getBoundingClientRect() ?? {
|
|
472
|
+
top: 0,
|
|
473
|
+
bottom: window.innerHeight,
|
|
474
|
+
left: 0,
|
|
475
|
+
right: window.innerWidth,
|
|
476
|
+
width: window.innerWidth,
|
|
477
|
+
height: window.innerHeight
|
|
478
|
+
};
|
|
479
|
+
const anchorElement = anchorRef?.current;
|
|
480
|
+
if (anchorRef && !anchorElement) {
|
|
481
|
+
console.warn("FloatingContainer anchor provided, but its value is undefined");
|
|
482
|
+
}
|
|
483
|
+
const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
|
|
484
|
+
const calculateProps = {
|
|
485
|
+
windowRect,
|
|
486
|
+
anchorRect,
|
|
487
|
+
containerRect,
|
|
488
|
+
options: {
|
|
489
|
+
horizontalAlignment,
|
|
490
|
+
verticalAlignment,
|
|
491
|
+
screenPadding,
|
|
492
|
+
gap
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
setStyle(calculatePosition(calculateProps));
|
|
496
|
+
}, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
|
|
497
|
+
const height = containerRef.current?.getBoundingClientRect().height;
|
|
498
|
+
const width = containerRef.current?.getBoundingClientRect().width;
|
|
499
|
+
(0, import_react5.useEffect)(() => {
|
|
500
|
+
if (active && isMounted) {
|
|
501
|
+
calculate();
|
|
502
|
+
} else {
|
|
503
|
+
setStyle(void 0);
|
|
504
|
+
}
|
|
505
|
+
}, [calculate, active, isMounted, height, width]);
|
|
506
|
+
(0, import_react5.useEffect)(() => {
|
|
507
|
+
window.addEventListener("resize", calculate);
|
|
508
|
+
let timeout;
|
|
509
|
+
if (isPolling) {
|
|
510
|
+
timeout = setInterval(calculate, pollingInterval);
|
|
511
|
+
}
|
|
512
|
+
return () => {
|
|
513
|
+
window.removeEventListener("resize", calculate);
|
|
514
|
+
if (timeout) {
|
|
515
|
+
clearInterval(timeout);
|
|
516
|
+
}
|
|
517
|
+
};
|
|
518
|
+
}, [calculate, isPolling, pollingInterval]);
|
|
519
|
+
return style;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
// src/components/layout-and-navigation/FloatingContainer.tsx
|
|
523
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
524
|
+
var FloatingContainer = (0, import_react6.forwardRef)(function FloatingContainer2({
|
|
525
|
+
children,
|
|
526
|
+
backgroundOverlay,
|
|
527
|
+
anchor,
|
|
528
|
+
isPolling = false,
|
|
529
|
+
pollingInterval = 100,
|
|
530
|
+
verticalAlignment = "afterEnd",
|
|
531
|
+
horizontalAlignment = "afterStart",
|
|
532
|
+
screenPadding = 16,
|
|
533
|
+
gap = 4,
|
|
534
|
+
...props
|
|
535
|
+
}, forwardRef3) {
|
|
536
|
+
const innerRef = (0, import_react6.useRef)(null);
|
|
537
|
+
(0, import_react6.useImperativeHandle)(forwardRef3, () => innerRef.current);
|
|
538
|
+
const position = useFloatingElement({
|
|
539
|
+
active: !props.hidden,
|
|
540
|
+
containerRef: innerRef,
|
|
541
|
+
anchorRef: anchor,
|
|
542
|
+
isPolling,
|
|
543
|
+
pollingInterval,
|
|
544
|
+
verticalAlignment,
|
|
545
|
+
horizontalAlignment,
|
|
546
|
+
gap,
|
|
547
|
+
screenPadding
|
|
548
|
+
});
|
|
549
|
+
return (0, import_react_dom.createPortal)(
|
|
550
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
551
|
+
backgroundOverlay,
|
|
552
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
553
|
+
"div",
|
|
554
|
+
{
|
|
555
|
+
...props,
|
|
556
|
+
ref: innerRef,
|
|
557
|
+
style: {
|
|
558
|
+
position: "fixed",
|
|
559
|
+
overflow: "hidden",
|
|
560
|
+
opacity: position ? void 0 : 0,
|
|
561
|
+
// hide when position calculation isn't done yet
|
|
562
|
+
transition: position ? `top ${pollingInterval}ms linear, left ${pollingInterval}ms linear` : void 0,
|
|
563
|
+
...position,
|
|
564
|
+
...props.style
|
|
565
|
+
},
|
|
566
|
+
className: (0, import_clsx2.clsx)("motion-safe:duration-100 motion-reduce:duration-0", props.className),
|
|
567
|
+
children
|
|
568
|
+
}
|
|
569
|
+
)
|
|
570
|
+
] }),
|
|
571
|
+
document.body
|
|
572
|
+
);
|
|
573
|
+
});
|
|
574
|
+
|
|
575
|
+
// src/hooks/focus/useFocusTrap.ts
|
|
576
|
+
var import_react7 = require("react");
|
|
577
|
+
var createFocusGuard = () => {
|
|
578
|
+
const div = document.createElement("div");
|
|
579
|
+
Object.assign(div.style, {
|
|
580
|
+
opacity: "0",
|
|
581
|
+
outline: "none",
|
|
582
|
+
boxShadow: "none",
|
|
583
|
+
position: "fixed",
|
|
584
|
+
pointerEvents: "none",
|
|
585
|
+
touchAction: "none"
|
|
586
|
+
});
|
|
587
|
+
div.tabIndex = 0;
|
|
588
|
+
div.setAttribute("data-hw-focus-guard", "");
|
|
589
|
+
document.body.appendChild(div);
|
|
590
|
+
return div;
|
|
591
|
+
};
|
|
592
|
+
function getContainedFocusableElements(element) {
|
|
593
|
+
return element?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
594
|
+
}
|
|
595
|
+
var FocusTrapService = class {
|
|
596
|
+
constructor() {
|
|
597
|
+
// The last entry is always the active one
|
|
598
|
+
this.listeners = [];
|
|
599
|
+
this.onFocusIn = (event) => {
|
|
600
|
+
const active = this.getActive();
|
|
601
|
+
if (!active || !active.container.current) return;
|
|
602
|
+
const { container } = active;
|
|
603
|
+
if (!container.current.contains(event.target)) {
|
|
604
|
+
this.focusElement();
|
|
605
|
+
}
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
getActive() {
|
|
609
|
+
if (this.listeners.length === 0) return void 0;
|
|
610
|
+
return this.listeners[this.listeners.length - 1];
|
|
611
|
+
}
|
|
612
|
+
focusElement() {
|
|
613
|
+
const active = this.getActive();
|
|
614
|
+
if (!active) return;
|
|
615
|
+
const { container, initialFocusElement } = active;
|
|
616
|
+
const containerElement = container.current;
|
|
617
|
+
if (initialFocusElement?.current) {
|
|
618
|
+
initialFocusElement.current.focus();
|
|
619
|
+
} else {
|
|
620
|
+
const elements = getContainedFocusableElements(containerElement);
|
|
621
|
+
if (elements && elements.length > 0) {
|
|
622
|
+
const first = elements.item(0);
|
|
623
|
+
first.focus();
|
|
624
|
+
} else {
|
|
625
|
+
containerElement.focus();
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
removeGuards() {
|
|
630
|
+
document.querySelectorAll("[data-hw-focus-guard]").forEach((node) => node.remove());
|
|
631
|
+
}
|
|
632
|
+
addGuards() {
|
|
633
|
+
document.body.insertAdjacentElement("afterbegin", createFocusGuard());
|
|
634
|
+
document.body.insertAdjacentElement("beforeend", createFocusGuard());
|
|
635
|
+
}
|
|
636
|
+
activate() {
|
|
637
|
+
document.addEventListener("focusin", this.onFocusIn);
|
|
638
|
+
this.addGuards();
|
|
639
|
+
}
|
|
640
|
+
deactivate() {
|
|
641
|
+
document.removeEventListener("focusin", this.onFocusIn);
|
|
642
|
+
this.removeGuards();
|
|
643
|
+
}
|
|
644
|
+
register(listener) {
|
|
645
|
+
this.listeners.push(listener);
|
|
646
|
+
if (this.listeners.length === 1) {
|
|
647
|
+
this.activate();
|
|
648
|
+
}
|
|
649
|
+
const active = listener;
|
|
650
|
+
this.listeners.forEach((listener2) => {
|
|
651
|
+
const { focus, pause } = listener2;
|
|
652
|
+
if (listener2 === active) {
|
|
653
|
+
focus();
|
|
654
|
+
} else {
|
|
655
|
+
pause();
|
|
656
|
+
}
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
unregister(id) {
|
|
660
|
+
const index = this.listeners.findIndex((trap) => trap.id === id);
|
|
661
|
+
if (index !== -1) {
|
|
662
|
+
const isActive = index === this.listeners.length - 1;
|
|
663
|
+
const listener = this.listeners[index];
|
|
664
|
+
this.listeners = this.listeners.filter((listener2) => listener2.id !== id);
|
|
665
|
+
if (isActive) {
|
|
666
|
+
this.deactivate();
|
|
667
|
+
listener.focusLast();
|
|
668
|
+
const active = this.getActive();
|
|
669
|
+
this.listeners.forEach((listener2) => {
|
|
670
|
+
const { pause, unpause } = listener2;
|
|
671
|
+
if (listener2 === active) {
|
|
672
|
+
unpause();
|
|
673
|
+
} else {
|
|
674
|
+
pause();
|
|
675
|
+
}
|
|
676
|
+
});
|
|
677
|
+
if (this.listeners.length > 0) {
|
|
678
|
+
this.activate();
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
} else {
|
|
682
|
+
console.warn(`Unable to unregister id ${id}: not found`);
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
var service = new FocusTrapService();
|
|
687
|
+
var useFocusTrap = ({
|
|
688
|
+
container,
|
|
689
|
+
active = true,
|
|
690
|
+
initialFocus,
|
|
691
|
+
focusFirst = true
|
|
692
|
+
}) => {
|
|
693
|
+
const lastFocusRef = (0, import_react7.useRef)(null);
|
|
694
|
+
const [paused, setPaused] = (0, import_react7.useState)(false);
|
|
695
|
+
const isMounted = useIsMounted();
|
|
696
|
+
const id = (0, import_react7.useId)();
|
|
697
|
+
const focusElement = (0, import_react7.useCallback)(() => {
|
|
698
|
+
const containerElement = container.current;
|
|
699
|
+
if (initialFocus?.current) {
|
|
700
|
+
initialFocus.current.focus();
|
|
701
|
+
} else {
|
|
702
|
+
const elements = getContainedFocusableElements(containerElement);
|
|
703
|
+
if (elements && elements.length > 0) {
|
|
704
|
+
const first = elements.item(0);
|
|
705
|
+
first.focus();
|
|
706
|
+
} else {
|
|
707
|
+
containerElement.focus();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
}, [container, initialFocus]);
|
|
711
|
+
(0, import_react7.useEffect)(() => {
|
|
712
|
+
if (active && isMounted) {
|
|
713
|
+
let pause = function() {
|
|
714
|
+
setPaused(true);
|
|
715
|
+
}, unpause = function() {
|
|
716
|
+
setPaused(false);
|
|
717
|
+
if (!container.current.contains(document.activeElement)) {
|
|
718
|
+
focusElement();
|
|
719
|
+
}
|
|
720
|
+
}, focus = function() {
|
|
721
|
+
focusElement();
|
|
722
|
+
setPaused(false);
|
|
723
|
+
}, focusLast = function() {
|
|
724
|
+
lastFocusRef.current?.focus();
|
|
725
|
+
};
|
|
726
|
+
if (!lastFocusRef.current) {
|
|
727
|
+
lastFocusRef.current = document.activeElement;
|
|
728
|
+
}
|
|
729
|
+
service.register({ id, pause, focus, focusLast, unpause, container, initialFocusElement: initialFocus });
|
|
730
|
+
return () => {
|
|
731
|
+
service.unregister(id);
|
|
732
|
+
lastFocusRef.current = void 0;
|
|
733
|
+
};
|
|
734
|
+
}
|
|
735
|
+
}, [active, container, focusElement, id, initialFocus, isMounted]);
|
|
736
|
+
(0, import_react7.useEffect)(() => {
|
|
737
|
+
if (active && !paused && isMounted) {
|
|
738
|
+
let onKeyDown = function(event) {
|
|
739
|
+
const key = event.key;
|
|
740
|
+
const elements = getContainedFocusableElements(containerElement);
|
|
741
|
+
const active2 = document.activeElement;
|
|
742
|
+
const index = [...elements].findIndex((value) => value === active2);
|
|
743
|
+
if (index === -1 || event.altKey || event.ctrlKey || event.metaKey) {
|
|
744
|
+
return;
|
|
745
|
+
}
|
|
746
|
+
if (key === "Tab") {
|
|
747
|
+
const next = event.shiftKey ? -1 : 1;
|
|
748
|
+
const nextIndex = (index + next + elements.length) % elements.length;
|
|
749
|
+
const nextElement = elements[nextIndex];
|
|
750
|
+
nextElement.focus();
|
|
751
|
+
event.preventDefault();
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
const containerElement = container.current;
|
|
755
|
+
containerElement.addEventListener("keydown", onKeyDown);
|
|
756
|
+
return () => {
|
|
757
|
+
containerElement.removeEventListener("keydown", onKeyDown);
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
}, [active, paused, isMounted, container, initialFocus, focusFirst, focusElement]);
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
// src/hooks/useLogOnce.ts
|
|
764
|
+
var import_react8 = require("react");
|
|
765
|
+
var defaultOptions = {
|
|
766
|
+
type: "warning"
|
|
767
|
+
};
|
|
768
|
+
var useLogOnce = (message, condition, options) => {
|
|
769
|
+
const [hasLogged, setHasLogged] = (0, import_react8.useState)(false);
|
|
770
|
+
const { type } = { ...defaultOptions, ...options };
|
|
771
|
+
(0, import_react8.useEffect)(() => {
|
|
772
|
+
if (!hasLogged && condition) {
|
|
773
|
+
switch (type) {
|
|
774
|
+
case "info":
|
|
775
|
+
console.info(message);
|
|
776
|
+
break;
|
|
777
|
+
case "error":
|
|
778
|
+
console.error(message);
|
|
779
|
+
break;
|
|
780
|
+
case "warning":
|
|
781
|
+
console.warn(message);
|
|
782
|
+
break;
|
|
783
|
+
}
|
|
784
|
+
setHasLogged(true);
|
|
785
|
+
}
|
|
786
|
+
}, [condition]);
|
|
787
|
+
};
|
|
788
|
+
|
|
789
|
+
// src/components/dialog/Dialog.tsx
|
|
790
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
791
|
+
var Dialog = ({
|
|
792
|
+
children,
|
|
793
|
+
isOpen,
|
|
794
|
+
titleElement,
|
|
795
|
+
description,
|
|
796
|
+
isModal = true,
|
|
797
|
+
onClose,
|
|
798
|
+
horizontalAlignment = "center",
|
|
799
|
+
verticalAlignment = "center",
|
|
800
|
+
className,
|
|
801
|
+
backgroundClassName
|
|
802
|
+
}) => {
|
|
803
|
+
const translation = useTranslation([formTranslation]);
|
|
804
|
+
const ref = (0, import_react9.useRef)(null);
|
|
805
|
+
const onCloseWrapper = () => {
|
|
806
|
+
if (!isModal) return;
|
|
807
|
+
onClose?.();
|
|
808
|
+
};
|
|
809
|
+
useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
|
|
810
|
+
useFocusTrap({
|
|
811
|
+
container: ref,
|
|
812
|
+
active: isOpen,
|
|
813
|
+
focusFirst: true
|
|
814
|
+
});
|
|
815
|
+
if (!isOpen) return void 0;
|
|
816
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
817
|
+
FloatingContainer,
|
|
818
|
+
{
|
|
819
|
+
ref,
|
|
820
|
+
hidden: !isOpen,
|
|
821
|
+
onKeyDown: (event) => {
|
|
822
|
+
if (event.key === "Escape") {
|
|
823
|
+
onCloseWrapper();
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
horizontalAlignment,
|
|
827
|
+
verticalAlignment,
|
|
828
|
+
backgroundOverlay: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
829
|
+
"div",
|
|
830
|
+
{
|
|
831
|
+
className: (0, import_clsx3.default)(
|
|
832
|
+
"fixed inset-0 h-screen w-screen bg-overlay-shadow",
|
|
833
|
+
{
|
|
834
|
+
"motion-safe:animate-fade-in animation-delay-3000": isOpen,
|
|
835
|
+
"motion-safe:animate-fade-out": !isOpen
|
|
836
|
+
},
|
|
837
|
+
backgroundClassName
|
|
838
|
+
),
|
|
839
|
+
hidden: !isOpen,
|
|
840
|
+
"aria-hidden": true,
|
|
841
|
+
onClick: onCloseWrapper
|
|
842
|
+
}
|
|
843
|
+
),
|
|
844
|
+
className: (0, import_clsx3.default)(
|
|
845
|
+
"flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom",
|
|
846
|
+
{
|
|
847
|
+
"motion-safe:animate-pop-in": isOpen,
|
|
848
|
+
"motion-safe:animate-pop-out": !isOpen
|
|
849
|
+
},
|
|
850
|
+
className
|
|
851
|
+
),
|
|
852
|
+
children: [
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "typography-title-lg-semibold mr-8", children: titleElement }),
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-description", children: description }),
|
|
855
|
+
isModal && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
856
|
+
"div",
|
|
857
|
+
{
|
|
858
|
+
className: "absolute top-0 right-0",
|
|
859
|
+
style: {
|
|
860
|
+
paddingTop: "inherit",
|
|
861
|
+
paddingRight: "inherit"
|
|
862
|
+
},
|
|
863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
864
|
+
IconButton,
|
|
865
|
+
{
|
|
866
|
+
color: "neutral",
|
|
867
|
+
size: "tiny",
|
|
868
|
+
"aria-label": translation("close"),
|
|
869
|
+
onClick: onCloseWrapper,
|
|
870
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.X, {})
|
|
871
|
+
}
|
|
872
|
+
)
|
|
873
|
+
}
|
|
874
|
+
),
|
|
875
|
+
children
|
|
876
|
+
]
|
|
877
|
+
}
|
|
878
|
+
);
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
// src/components/dialog/ConfirmDialog.tsx
|
|
882
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
883
|
+
var ConfirmDialog = ({
|
|
884
|
+
overwriteTranslation,
|
|
885
|
+
children,
|
|
886
|
+
onCancel,
|
|
887
|
+
onConfirm,
|
|
888
|
+
onDecline,
|
|
889
|
+
confirmType = "positive",
|
|
890
|
+
buttonOverwrites,
|
|
891
|
+
className,
|
|
892
|
+
...restProps
|
|
893
|
+
}) => {
|
|
894
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
895
|
+
const mapping = {
|
|
896
|
+
neutral: "neutral",
|
|
897
|
+
negative: "negative",
|
|
898
|
+
positive: "positive",
|
|
899
|
+
primary: "primary"
|
|
900
|
+
};
|
|
901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Dialog, { ...restProps, onClose: onCancel, className: (0, import_clsx4.default)("justify-between", className), children: [
|
|
902
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-col-2 grow", children }),
|
|
903
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex-row-4 mt-3 justify-end", children: [
|
|
904
|
+
onCancel && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
905
|
+
SolidButton,
|
|
906
|
+
{
|
|
907
|
+
color: buttonOverwrites?.[0].color ?? "neutral",
|
|
908
|
+
onClick: onCancel,
|
|
909
|
+
disabled: buttonOverwrites?.[0].disabled ?? false,
|
|
910
|
+
children: buttonOverwrites?.[0].text ?? translation("cancel")
|
|
911
|
+
}
|
|
912
|
+
),
|
|
913
|
+
onDecline && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
914
|
+
SolidButton,
|
|
915
|
+
{
|
|
916
|
+
color: buttonOverwrites?.[1].color ?? "negative",
|
|
917
|
+
onClick: onDecline,
|
|
918
|
+
disabled: buttonOverwrites?.[1].disabled ?? false,
|
|
919
|
+
children: buttonOverwrites?.[1].text ?? translation("decline")
|
|
920
|
+
}
|
|
921
|
+
),
|
|
922
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
923
|
+
SolidButton,
|
|
924
|
+
{
|
|
925
|
+
color: buttonOverwrites?.[2].color ?? mapping[confirmType],
|
|
926
|
+
onClick: onConfirm,
|
|
927
|
+
disabled: buttonOverwrites?.[2].disabled ?? false,
|
|
928
|
+
children: buttonOverwrites?.[2].text ?? translation("confirm")
|
|
929
|
+
}
|
|
930
|
+
)
|
|
931
|
+
] })
|
|
932
|
+
] });
|
|
933
|
+
};
|
|
934
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
935
|
+
0 && (module.exports = {
|
|
936
|
+
ConfirmDialog
|
|
937
|
+
});
|
|
938
|
+
//# sourceMappingURL=ConfirmDialog.js.map
|