@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,2031 @@
|
|
|
1
|
+
// src/components/user-action/Button.tsx
|
|
2
|
+
import { forwardRef } from "react";
|
|
3
|
+
import clsx from "clsx";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
var ButtonColorUtil = {
|
|
6
|
+
solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
|
|
7
|
+
text: ["primary", "negative", "neutral"],
|
|
8
|
+
outline: ["primary"]
|
|
9
|
+
};
|
|
10
|
+
var IconButtonUtil = {
|
|
11
|
+
icon: [...ButtonColorUtil.solid, "transparent"]
|
|
12
|
+
};
|
|
13
|
+
var paddingMapping = {
|
|
14
|
+
small: "btn-sm",
|
|
15
|
+
medium: "btn-md",
|
|
16
|
+
large: "btn-lg"
|
|
17
|
+
};
|
|
18
|
+
var iconPaddingMapping = {
|
|
19
|
+
tiny: "icon-btn-xs",
|
|
20
|
+
small: "icon-btn-sm",
|
|
21
|
+
medium: "icon-btn-md",
|
|
22
|
+
large: "icon-btn-lg"
|
|
23
|
+
};
|
|
24
|
+
var ButtonUtil = {
|
|
25
|
+
paddingMapping,
|
|
26
|
+
iconPaddingMapping
|
|
27
|
+
};
|
|
28
|
+
var SolidButton = forwardRef(function SolidButton2({
|
|
29
|
+
children,
|
|
30
|
+
color = "primary",
|
|
31
|
+
size = "medium",
|
|
32
|
+
startIcon,
|
|
33
|
+
endIcon,
|
|
34
|
+
onClick,
|
|
35
|
+
className,
|
|
36
|
+
...restProps
|
|
37
|
+
}, ref) {
|
|
38
|
+
const colorClasses = {
|
|
39
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
40
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
41
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
42
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
43
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
44
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
45
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
|
|
46
|
+
}[color];
|
|
47
|
+
const iconColorClasses = {
|
|
48
|
+
primary: "not-group-disabled:text-button-solid-primary-icon",
|
|
49
|
+
secondary: "not-group-disabled:text-button-solid-secondary-icon",
|
|
50
|
+
tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
|
|
51
|
+
positive: "not-group-disabled:text-button-solid-positive-icon",
|
|
52
|
+
warning: "not-group-disabled:text-button-solid-warning-icon",
|
|
53
|
+
negative: "not-group-disabled:text-button-solid-negative-icon",
|
|
54
|
+
neutral: "not-group-disabled:text-button-solid-neutral-icon"
|
|
55
|
+
}[color];
|
|
56
|
+
return /* @__PURE__ */ jsxs(
|
|
57
|
+
"button",
|
|
58
|
+
{
|
|
59
|
+
ref,
|
|
60
|
+
onClick,
|
|
61
|
+
className: clsx(
|
|
62
|
+
"group font-semibold",
|
|
63
|
+
colorClasses,
|
|
64
|
+
"not-disabled:hover:brightness-90",
|
|
65
|
+
"disabled:text-disabled-text disabled:bg-disabled-background",
|
|
66
|
+
ButtonUtil.paddingMapping[size],
|
|
67
|
+
className
|
|
68
|
+
),
|
|
69
|
+
...restProps,
|
|
70
|
+
children: [
|
|
71
|
+
startIcon && /* @__PURE__ */ jsx(
|
|
72
|
+
"span",
|
|
73
|
+
{
|
|
74
|
+
className: clsx(
|
|
75
|
+
iconColorClasses,
|
|
76
|
+
"group-disabled:text-disabled-icon"
|
|
77
|
+
),
|
|
78
|
+
children: startIcon
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
children,
|
|
82
|
+
endIcon && /* @__PURE__ */ jsx(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
className: clsx(
|
|
86
|
+
iconColorClasses,
|
|
87
|
+
"group-disabled:text-disabled-icon"
|
|
88
|
+
),
|
|
89
|
+
children: endIcon
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
]
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
});
|
|
96
|
+
var IconButton = forwardRef(function IconButton2({
|
|
97
|
+
children,
|
|
98
|
+
color = "primary",
|
|
99
|
+
size = "medium",
|
|
100
|
+
className,
|
|
101
|
+
...restProps
|
|
102
|
+
}, ref) {
|
|
103
|
+
const colorClasses = {
|
|
104
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
105
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
106
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
107
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
108
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
109
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
110
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
|
|
111
|
+
transparent: "not-disabled:bg-transparent"
|
|
112
|
+
}[color];
|
|
113
|
+
return /* @__PURE__ */ jsx(
|
|
114
|
+
"button",
|
|
115
|
+
{
|
|
116
|
+
ref,
|
|
117
|
+
className: clsx(
|
|
118
|
+
colorClasses,
|
|
119
|
+
"not-disabled:hover:brightness-90",
|
|
120
|
+
"disabled:text-disabled-text",
|
|
121
|
+
{
|
|
122
|
+
"disabled:bg-disabled-background": color !== "transparent",
|
|
123
|
+
"disabled:opacity-70": color === "transparent",
|
|
124
|
+
"not-disabled:hover:bg-button-text-hover-background": color === "transparent"
|
|
125
|
+
},
|
|
126
|
+
ButtonUtil.iconPaddingMapping[size],
|
|
127
|
+
className
|
|
128
|
+
),
|
|
129
|
+
...restProps,
|
|
130
|
+
children
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
// src/localization/LanguageProvider.tsx
|
|
136
|
+
import { createContext, useContext, useEffect, useState as useState2 } from "react";
|
|
137
|
+
|
|
138
|
+
// src/hooks/useLocalStorage.ts
|
|
139
|
+
import { useCallback, useState } from "react";
|
|
140
|
+
|
|
141
|
+
// src/localization/util.ts
|
|
142
|
+
var languages = ["en", "de"];
|
|
143
|
+
var languagesLocalNames = {
|
|
144
|
+
en: "English",
|
|
145
|
+
de: "Deutsch"
|
|
146
|
+
};
|
|
147
|
+
var DEFAULT_LANGUAGE = "en";
|
|
148
|
+
var LanguageUtil = {
|
|
149
|
+
languages,
|
|
150
|
+
DEFAULT_LANGUAGE,
|
|
151
|
+
languagesLocalNames
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// src/localization/LanguageProvider.tsx
|
|
155
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
156
|
+
var LanguageContext = createContext({
|
|
157
|
+
language: LanguageUtil.DEFAULT_LANGUAGE,
|
|
158
|
+
setLanguage: (v) => v
|
|
159
|
+
});
|
|
160
|
+
var useLanguage = () => useContext(LanguageContext);
|
|
161
|
+
|
|
162
|
+
// src/localization/useTranslation.ts
|
|
163
|
+
var TranslationPluralCount = {
|
|
164
|
+
zero: 0,
|
|
165
|
+
one: 1,
|
|
166
|
+
two: 2,
|
|
167
|
+
few: 3,
|
|
168
|
+
many: 11,
|
|
169
|
+
other: -1
|
|
170
|
+
};
|
|
171
|
+
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
172
|
+
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
173
|
+
const { language: inferredLanguage } = useLanguage();
|
|
174
|
+
const usedLanguage = languageProp ?? inferredLanguage;
|
|
175
|
+
const usedTranslations = [...translations];
|
|
176
|
+
if (overwrite) {
|
|
177
|
+
usedTranslations.push(overwrite);
|
|
178
|
+
}
|
|
179
|
+
return (key, options) => {
|
|
180
|
+
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
181
|
+
try {
|
|
182
|
+
for (let i = translations.length - 1; i >= 0; i--) {
|
|
183
|
+
const translation = translations[i];
|
|
184
|
+
const localizedTranslation = translation[usedLanguage];
|
|
185
|
+
if (!localizedTranslation) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
const value = localizedTranslation[key];
|
|
189
|
+
if (!value) {
|
|
190
|
+
continue;
|
|
191
|
+
}
|
|
192
|
+
let forProcessing;
|
|
193
|
+
if (typeof value !== "string") {
|
|
194
|
+
if (count === TranslationPluralCount.zero && value?.zero) {
|
|
195
|
+
forProcessing = value.zero;
|
|
196
|
+
} else if (count === TranslationPluralCount.one && value?.one) {
|
|
197
|
+
forProcessing = value.one;
|
|
198
|
+
} else if (count === TranslationPluralCount.two && value?.two) {
|
|
199
|
+
forProcessing = value.two;
|
|
200
|
+
} else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
|
|
201
|
+
forProcessing = value.few;
|
|
202
|
+
} else if (count > TranslationPluralCount.many && value?.many) {
|
|
203
|
+
forProcessing = value.many;
|
|
204
|
+
} else {
|
|
205
|
+
forProcessing = value.other;
|
|
206
|
+
}
|
|
207
|
+
} else {
|
|
208
|
+
forProcessing = value;
|
|
209
|
+
}
|
|
210
|
+
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
211
|
+
return replacements[placeholder] ?? `{{key:${placeholder}}}`;
|
|
212
|
+
});
|
|
213
|
+
return forProcessing;
|
|
214
|
+
}
|
|
215
|
+
} catch (e) {
|
|
216
|
+
console.error(e);
|
|
217
|
+
}
|
|
218
|
+
return `{{${usedLanguage}:${key}}}`;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
// src/components/dialog/ConfirmDialog.tsx
|
|
223
|
+
import clsx4 from "clsx";
|
|
224
|
+
|
|
225
|
+
// src/components/dialog/Dialog.tsx
|
|
226
|
+
import { useRef as useRef3 } from "react";
|
|
227
|
+
import clsx3 from "clsx";
|
|
228
|
+
import { X } from "lucide-react";
|
|
229
|
+
|
|
230
|
+
// src/localization/defaults/form.ts
|
|
231
|
+
var formTranslation = {
|
|
232
|
+
en: {
|
|
233
|
+
add: "Add",
|
|
234
|
+
all: "All",
|
|
235
|
+
apply: "Apply",
|
|
236
|
+
back: "Back",
|
|
237
|
+
cancel: "Cancel",
|
|
238
|
+
change: "Change",
|
|
239
|
+
clear: "Clear",
|
|
240
|
+
click: "Click",
|
|
241
|
+
clickToCopy: "Click to Copy",
|
|
242
|
+
close: "Close",
|
|
243
|
+
confirm: "Confirm",
|
|
244
|
+
copy: "Copy",
|
|
245
|
+
copied: "Copied",
|
|
246
|
+
create: "Create",
|
|
247
|
+
decline: "Decline",
|
|
248
|
+
delete: "Delete",
|
|
249
|
+
discard: "Discard",
|
|
250
|
+
discardChanges: "Discard Changes",
|
|
251
|
+
done: "Done",
|
|
252
|
+
edit: "Edit",
|
|
253
|
+
enterText: "Enter text here",
|
|
254
|
+
error: "Error",
|
|
255
|
+
exit: "Exit",
|
|
256
|
+
fieldRequiredError: "This field is required.",
|
|
257
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
258
|
+
less: "Less",
|
|
259
|
+
loading: "Loading",
|
|
260
|
+
maxLengthError: "Maximum length exceeded.",
|
|
261
|
+
minLengthError: "Minimum length not met.",
|
|
262
|
+
more: "More",
|
|
263
|
+
next: "Next",
|
|
264
|
+
no: "No",
|
|
265
|
+
none: "None",
|
|
266
|
+
nothingFound: "Nothing found",
|
|
267
|
+
of: "of",
|
|
268
|
+
optional: "Optional",
|
|
269
|
+
pleaseWait: "Please wait...",
|
|
270
|
+
previous: "Previous",
|
|
271
|
+
remove: "Remove",
|
|
272
|
+
required: "Required",
|
|
273
|
+
reset: "Reset",
|
|
274
|
+
save: "Save",
|
|
275
|
+
saved: "Saved",
|
|
276
|
+
search: "Search",
|
|
277
|
+
select: "Select",
|
|
278
|
+
selectOption: "Select an option",
|
|
279
|
+
show: "Show",
|
|
280
|
+
showMore: "Show more",
|
|
281
|
+
showLess: "Show less",
|
|
282
|
+
submit: "Submit",
|
|
283
|
+
success: "Success",
|
|
284
|
+
update: "Update",
|
|
285
|
+
unsavedChanges: "Unsaved Changes",
|
|
286
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
287
|
+
yes: "Yes"
|
|
288
|
+
},
|
|
289
|
+
de: {
|
|
290
|
+
add: "Hinzuf\xFCgen",
|
|
291
|
+
all: "Alle",
|
|
292
|
+
apply: "Anwenden",
|
|
293
|
+
back: "Zur\xFCck",
|
|
294
|
+
cancel: "Abbrechen",
|
|
295
|
+
change: "\xC4ndern",
|
|
296
|
+
clear: "L\xF6schen",
|
|
297
|
+
click: "Klicken",
|
|
298
|
+
clickToCopy: "Zum kopieren klicken",
|
|
299
|
+
close: "Schlie\xDFen",
|
|
300
|
+
confirm: "Best\xE4tigen",
|
|
301
|
+
copy: "Kopieren",
|
|
302
|
+
copied: "Kopiert",
|
|
303
|
+
create: "Erstellen",
|
|
304
|
+
decline: "Ablehnen",
|
|
305
|
+
delete: "L\xF6schen",
|
|
306
|
+
discard: "Verwerfen",
|
|
307
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
308
|
+
done: "Fertig",
|
|
309
|
+
edit: "Bearbeiten",
|
|
310
|
+
enterText: "Text hier eingeben",
|
|
311
|
+
error: "Fehler",
|
|
312
|
+
exit: "Beenden",
|
|
313
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
314
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
315
|
+
less: "Weniger",
|
|
316
|
+
loading: "L\xE4dt",
|
|
317
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
318
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
319
|
+
more: "Mehr",
|
|
320
|
+
next: "Weiter",
|
|
321
|
+
no: "Nein",
|
|
322
|
+
none: "Nichts",
|
|
323
|
+
nothingFound: "Nichts gefunden",
|
|
324
|
+
of: "von",
|
|
325
|
+
optional: "Optional",
|
|
326
|
+
pleaseWait: "Bitte warten...",
|
|
327
|
+
previous: "Vorherige",
|
|
328
|
+
remove: "Entfernen",
|
|
329
|
+
required: "Erforderlich",
|
|
330
|
+
reset: "Zur\xFCcksetzen",
|
|
331
|
+
save: "Speichern",
|
|
332
|
+
saved: "Gespeichert",
|
|
333
|
+
search: "Suche",
|
|
334
|
+
select: "Select",
|
|
335
|
+
selectOption: "Option ausw\xE4hlen",
|
|
336
|
+
show: "Anzeigen",
|
|
337
|
+
showMore: "Mehr anzeigen",
|
|
338
|
+
showLess: "Weniger anzeigen",
|
|
339
|
+
submit: "Abschicken",
|
|
340
|
+
success: "Erfolg",
|
|
341
|
+
update: "Update",
|
|
342
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
343
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
344
|
+
yes: "Ja"
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
// src/components/layout-and-navigation/FloatingContainer.tsx
|
|
349
|
+
import { forwardRef as forwardRef2, useImperativeHandle, useRef } from "react";
|
|
350
|
+
import { createPortal } from "react-dom";
|
|
351
|
+
import { clsx as clsx2 } from "clsx";
|
|
352
|
+
|
|
353
|
+
// src/hooks/useFloatingElement.ts
|
|
354
|
+
import { useCallback as useCallback2, useEffect as useEffect3, useState as useState4 } from "react";
|
|
355
|
+
|
|
356
|
+
// src/utils/math.ts
|
|
357
|
+
var clamp = (value, range = [0, 1]) => {
|
|
358
|
+
const [min, max] = range;
|
|
359
|
+
return Math.min(Math.max(value, min), max);
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
// src/hooks/focus/useIsMounted.ts
|
|
363
|
+
import { useEffect as useEffect2, useLayoutEffect, useState as useState3 } from "react";
|
|
364
|
+
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
365
|
+
var useIsomorphicEffect = isClient ? useLayoutEffect : useEffect2;
|
|
366
|
+
var useIsMounted = () => {
|
|
367
|
+
const [isMounted, setIsMounted] = useState3(false);
|
|
368
|
+
useIsomorphicEffect(() => {
|
|
369
|
+
setIsMounted(true);
|
|
370
|
+
return () => {
|
|
371
|
+
setIsMounted(false);
|
|
372
|
+
};
|
|
373
|
+
}, []);
|
|
374
|
+
return isMounted;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
// src/hooks/useFloatingElement.ts
|
|
378
|
+
function calculatePosition({
|
|
379
|
+
windowRect,
|
|
380
|
+
containerRect,
|
|
381
|
+
anchorRect,
|
|
382
|
+
options
|
|
383
|
+
}) {
|
|
384
|
+
const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
|
|
385
|
+
const windowWidth = windowRect.width;
|
|
386
|
+
const windowHeight = windowRect.height;
|
|
387
|
+
const maxWidth = windowWidth - 2 * screenPadding;
|
|
388
|
+
const maxHeight = windowHeight - 2 * screenPadding;
|
|
389
|
+
const width = Math.min(containerRect.width, maxWidth);
|
|
390
|
+
const height = Math.min(containerRect.height, maxHeight);
|
|
391
|
+
const leftSuggestion = {
|
|
392
|
+
beforeStart: anchorRect.left - width - gap,
|
|
393
|
+
afterStart: anchorRect.left,
|
|
394
|
+
center: anchorRect.left + anchorRect.width / 2 - width / 2,
|
|
395
|
+
beforeEnd: anchorRect.right - width,
|
|
396
|
+
afterEnd: anchorRect.right + gap
|
|
397
|
+
}[horizontalAlignment];
|
|
398
|
+
const topSuggestion = {
|
|
399
|
+
beforeStart: anchorRect.top - height - gap,
|
|
400
|
+
afterStart: anchorRect.top,
|
|
401
|
+
center: anchorRect.top + anchorRect.height / 2 - height / 2,
|
|
402
|
+
beforeEnd: anchorRect.bottom - height,
|
|
403
|
+
afterEnd: anchorRect.bottom + gap
|
|
404
|
+
}[verticalAlignment];
|
|
405
|
+
const left = clamp(leftSuggestion, [
|
|
406
|
+
screenPadding,
|
|
407
|
+
windowWidth - screenPadding - width
|
|
408
|
+
]);
|
|
409
|
+
const top = clamp(topSuggestion, [
|
|
410
|
+
screenPadding,
|
|
411
|
+
windowHeight - screenPadding - height
|
|
412
|
+
]);
|
|
413
|
+
return {
|
|
414
|
+
left,
|
|
415
|
+
top,
|
|
416
|
+
maxWidth,
|
|
417
|
+
maxHeight
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
function useFloatingElement({
|
|
421
|
+
active = true,
|
|
422
|
+
windowRef,
|
|
423
|
+
anchorRef,
|
|
424
|
+
containerRef,
|
|
425
|
+
isPolling = false,
|
|
426
|
+
pollingInterval = 100,
|
|
427
|
+
verticalAlignment = "afterEnd",
|
|
428
|
+
horizontalAlignment = "afterStart",
|
|
429
|
+
screenPadding = 16,
|
|
430
|
+
gap = 4
|
|
431
|
+
}) {
|
|
432
|
+
const [style, setStyle] = useState4();
|
|
433
|
+
const isMounted = useIsMounted();
|
|
434
|
+
const calculate = useCallback2(() => {
|
|
435
|
+
const containerRect = containerRef.current.getBoundingClientRect();
|
|
436
|
+
const windowRect = windowRef?.current.getBoundingClientRect() ?? {
|
|
437
|
+
top: 0,
|
|
438
|
+
bottom: window.innerHeight,
|
|
439
|
+
left: 0,
|
|
440
|
+
right: window.innerWidth,
|
|
441
|
+
width: window.innerWidth,
|
|
442
|
+
height: window.innerHeight
|
|
443
|
+
};
|
|
444
|
+
const anchorElement = anchorRef?.current;
|
|
445
|
+
if (anchorRef && !anchorElement) {
|
|
446
|
+
console.warn("FloatingContainer anchor provided, but its value is undefined");
|
|
447
|
+
}
|
|
448
|
+
const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
|
|
449
|
+
const calculateProps = {
|
|
450
|
+
windowRect,
|
|
451
|
+
anchorRect,
|
|
452
|
+
containerRect,
|
|
453
|
+
options: {
|
|
454
|
+
horizontalAlignment,
|
|
455
|
+
verticalAlignment,
|
|
456
|
+
screenPadding,
|
|
457
|
+
gap
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
setStyle(calculatePosition(calculateProps));
|
|
461
|
+
}, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
|
|
462
|
+
const height = containerRef.current?.getBoundingClientRect().height;
|
|
463
|
+
const width = containerRef.current?.getBoundingClientRect().width;
|
|
464
|
+
useEffect3(() => {
|
|
465
|
+
if (active && isMounted) {
|
|
466
|
+
calculate();
|
|
467
|
+
} else {
|
|
468
|
+
setStyle(void 0);
|
|
469
|
+
}
|
|
470
|
+
}, [calculate, active, isMounted, height, width]);
|
|
471
|
+
useEffect3(() => {
|
|
472
|
+
window.addEventListener("resize", calculate);
|
|
473
|
+
let timeout;
|
|
474
|
+
if (isPolling) {
|
|
475
|
+
timeout = setInterval(calculate, pollingInterval);
|
|
476
|
+
}
|
|
477
|
+
return () => {
|
|
478
|
+
window.removeEventListener("resize", calculate);
|
|
479
|
+
if (timeout) {
|
|
480
|
+
clearInterval(timeout);
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
}, [calculate, isPolling, pollingInterval]);
|
|
484
|
+
return style;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
// src/components/layout-and-navigation/FloatingContainer.tsx
|
|
488
|
+
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
489
|
+
var FloatingContainer = forwardRef2(function FloatingContainer2({
|
|
490
|
+
children,
|
|
491
|
+
backgroundOverlay,
|
|
492
|
+
anchor,
|
|
493
|
+
isPolling = false,
|
|
494
|
+
pollingInterval = 100,
|
|
495
|
+
verticalAlignment = "afterEnd",
|
|
496
|
+
horizontalAlignment = "afterStart",
|
|
497
|
+
screenPadding = 16,
|
|
498
|
+
gap = 4,
|
|
499
|
+
...props
|
|
500
|
+
}, forwardRef6) {
|
|
501
|
+
const innerRef = useRef(null);
|
|
502
|
+
useImperativeHandle(forwardRef6, () => innerRef.current);
|
|
503
|
+
const position = useFloatingElement({
|
|
504
|
+
active: !props.hidden,
|
|
505
|
+
containerRef: innerRef,
|
|
506
|
+
anchorRef: anchor,
|
|
507
|
+
isPolling,
|
|
508
|
+
pollingInterval,
|
|
509
|
+
verticalAlignment,
|
|
510
|
+
horizontalAlignment,
|
|
511
|
+
gap,
|
|
512
|
+
screenPadding
|
|
513
|
+
});
|
|
514
|
+
return createPortal(
|
|
515
|
+
/* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
516
|
+
backgroundOverlay,
|
|
517
|
+
/* @__PURE__ */ jsx3(
|
|
518
|
+
"div",
|
|
519
|
+
{
|
|
520
|
+
...props,
|
|
521
|
+
ref: innerRef,
|
|
522
|
+
style: {
|
|
523
|
+
position: "fixed",
|
|
524
|
+
overflow: "hidden",
|
|
525
|
+
opacity: position ? void 0 : 0,
|
|
526
|
+
// hide when position calculation isn't done yet
|
|
527
|
+
transition: position ? `top ${pollingInterval}ms linear, left ${pollingInterval}ms linear` : void 0,
|
|
528
|
+
...position,
|
|
529
|
+
...props.style
|
|
530
|
+
},
|
|
531
|
+
className: clsx2("motion-safe:duration-100 motion-reduce:duration-0", props.className),
|
|
532
|
+
children
|
|
533
|
+
}
|
|
534
|
+
)
|
|
535
|
+
] }),
|
|
536
|
+
document.body
|
|
537
|
+
);
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
// src/hooks/focus/useFocusTrap.ts
|
|
541
|
+
import { useCallback as useCallback3, useEffect as useEffect4, useId, useRef as useRef2, useState as useState5 } from "react";
|
|
542
|
+
var createFocusGuard = () => {
|
|
543
|
+
const div = document.createElement("div");
|
|
544
|
+
Object.assign(div.style, {
|
|
545
|
+
opacity: "0",
|
|
546
|
+
outline: "none",
|
|
547
|
+
boxShadow: "none",
|
|
548
|
+
position: "fixed",
|
|
549
|
+
pointerEvents: "none",
|
|
550
|
+
touchAction: "none"
|
|
551
|
+
});
|
|
552
|
+
div.tabIndex = 0;
|
|
553
|
+
div.setAttribute("data-hw-focus-guard", "");
|
|
554
|
+
document.body.appendChild(div);
|
|
555
|
+
return div;
|
|
556
|
+
};
|
|
557
|
+
function getContainedFocusableElements(element) {
|
|
558
|
+
return element?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
559
|
+
}
|
|
560
|
+
var FocusTrapService = class {
|
|
561
|
+
constructor() {
|
|
562
|
+
// The last entry is always the active one
|
|
563
|
+
this.listeners = [];
|
|
564
|
+
this.onFocusIn = (event) => {
|
|
565
|
+
const active = this.getActive();
|
|
566
|
+
if (!active || !active.container.current) return;
|
|
567
|
+
const { container } = active;
|
|
568
|
+
if (!container.current.contains(event.target)) {
|
|
569
|
+
this.focusElement();
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
getActive() {
|
|
574
|
+
if (this.listeners.length === 0) return void 0;
|
|
575
|
+
return this.listeners[this.listeners.length - 1];
|
|
576
|
+
}
|
|
577
|
+
focusElement() {
|
|
578
|
+
const active = this.getActive();
|
|
579
|
+
if (!active) return;
|
|
580
|
+
const { container, initialFocusElement } = active;
|
|
581
|
+
const containerElement = container.current;
|
|
582
|
+
if (initialFocusElement?.current) {
|
|
583
|
+
initialFocusElement.current.focus();
|
|
584
|
+
} else {
|
|
585
|
+
const elements = getContainedFocusableElements(containerElement);
|
|
586
|
+
if (elements && elements.length > 0) {
|
|
587
|
+
const first = elements.item(0);
|
|
588
|
+
first.focus();
|
|
589
|
+
} else {
|
|
590
|
+
containerElement.focus();
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
removeGuards() {
|
|
595
|
+
document.querySelectorAll("[data-hw-focus-guard]").forEach((node) => node.remove());
|
|
596
|
+
}
|
|
597
|
+
addGuards() {
|
|
598
|
+
document.body.insertAdjacentElement("afterbegin", createFocusGuard());
|
|
599
|
+
document.body.insertAdjacentElement("beforeend", createFocusGuard());
|
|
600
|
+
}
|
|
601
|
+
activate() {
|
|
602
|
+
document.addEventListener("focusin", this.onFocusIn);
|
|
603
|
+
this.addGuards();
|
|
604
|
+
}
|
|
605
|
+
deactivate() {
|
|
606
|
+
document.removeEventListener("focusin", this.onFocusIn);
|
|
607
|
+
this.removeGuards();
|
|
608
|
+
}
|
|
609
|
+
register(listener) {
|
|
610
|
+
this.listeners.push(listener);
|
|
611
|
+
if (this.listeners.length === 1) {
|
|
612
|
+
this.activate();
|
|
613
|
+
}
|
|
614
|
+
const active = listener;
|
|
615
|
+
this.listeners.forEach((listener2) => {
|
|
616
|
+
const { focus, pause } = listener2;
|
|
617
|
+
if (listener2 === active) {
|
|
618
|
+
focus();
|
|
619
|
+
} else {
|
|
620
|
+
pause();
|
|
621
|
+
}
|
|
622
|
+
});
|
|
623
|
+
}
|
|
624
|
+
unregister(id) {
|
|
625
|
+
const index = this.listeners.findIndex((trap) => trap.id === id);
|
|
626
|
+
if (index !== -1) {
|
|
627
|
+
const isActive = index === this.listeners.length - 1;
|
|
628
|
+
const listener = this.listeners[index];
|
|
629
|
+
this.listeners = this.listeners.filter((listener2) => listener2.id !== id);
|
|
630
|
+
if (isActive) {
|
|
631
|
+
this.deactivate();
|
|
632
|
+
listener.focusLast();
|
|
633
|
+
const active = this.getActive();
|
|
634
|
+
this.listeners.forEach((listener2) => {
|
|
635
|
+
const { pause, unpause } = listener2;
|
|
636
|
+
if (listener2 === active) {
|
|
637
|
+
unpause();
|
|
638
|
+
} else {
|
|
639
|
+
pause();
|
|
640
|
+
}
|
|
641
|
+
});
|
|
642
|
+
if (this.listeners.length > 0) {
|
|
643
|
+
this.activate();
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
} else {
|
|
647
|
+
console.warn(`Unable to unregister id ${id}: not found`);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
};
|
|
651
|
+
var service = new FocusTrapService();
|
|
652
|
+
var useFocusTrap = ({
|
|
653
|
+
container,
|
|
654
|
+
active = true,
|
|
655
|
+
initialFocus,
|
|
656
|
+
focusFirst = true
|
|
657
|
+
}) => {
|
|
658
|
+
const lastFocusRef = useRef2(null);
|
|
659
|
+
const [paused, setPaused] = useState5(false);
|
|
660
|
+
const isMounted = useIsMounted();
|
|
661
|
+
const id = useId();
|
|
662
|
+
const focusElement = useCallback3(() => {
|
|
663
|
+
const containerElement = container.current;
|
|
664
|
+
if (initialFocus?.current) {
|
|
665
|
+
initialFocus.current.focus();
|
|
666
|
+
} else {
|
|
667
|
+
const elements = getContainedFocusableElements(containerElement);
|
|
668
|
+
if (elements && elements.length > 0) {
|
|
669
|
+
const first = elements.item(0);
|
|
670
|
+
first.focus();
|
|
671
|
+
} else {
|
|
672
|
+
containerElement.focus();
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
}, [container, initialFocus]);
|
|
676
|
+
useEffect4(() => {
|
|
677
|
+
if (active && isMounted) {
|
|
678
|
+
let pause = function() {
|
|
679
|
+
setPaused(true);
|
|
680
|
+
}, unpause = function() {
|
|
681
|
+
setPaused(false);
|
|
682
|
+
if (!container.current.contains(document.activeElement)) {
|
|
683
|
+
focusElement();
|
|
684
|
+
}
|
|
685
|
+
}, focus = function() {
|
|
686
|
+
focusElement();
|
|
687
|
+
setPaused(false);
|
|
688
|
+
}, focusLast = function() {
|
|
689
|
+
lastFocusRef.current?.focus();
|
|
690
|
+
};
|
|
691
|
+
if (!lastFocusRef.current) {
|
|
692
|
+
lastFocusRef.current = document.activeElement;
|
|
693
|
+
}
|
|
694
|
+
service.register({ id, pause, focus, focusLast, unpause, container, initialFocusElement: initialFocus });
|
|
695
|
+
return () => {
|
|
696
|
+
service.unregister(id);
|
|
697
|
+
lastFocusRef.current = void 0;
|
|
698
|
+
};
|
|
699
|
+
}
|
|
700
|
+
}, [active, container, focusElement, id, initialFocus, isMounted]);
|
|
701
|
+
useEffect4(() => {
|
|
702
|
+
if (active && !paused && isMounted) {
|
|
703
|
+
let onKeyDown = function(event) {
|
|
704
|
+
const key = event.key;
|
|
705
|
+
const elements = getContainedFocusableElements(containerElement);
|
|
706
|
+
const active2 = document.activeElement;
|
|
707
|
+
const index = [...elements].findIndex((value) => value === active2);
|
|
708
|
+
if (index === -1 || event.altKey || event.ctrlKey || event.metaKey) {
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
if (key === "Tab") {
|
|
712
|
+
const next = event.shiftKey ? -1 : 1;
|
|
713
|
+
const nextIndex = (index + next + elements.length) % elements.length;
|
|
714
|
+
const nextElement = elements[nextIndex];
|
|
715
|
+
nextElement.focus();
|
|
716
|
+
event.preventDefault();
|
|
717
|
+
}
|
|
718
|
+
};
|
|
719
|
+
const containerElement = container.current;
|
|
720
|
+
containerElement.addEventListener("keydown", onKeyDown);
|
|
721
|
+
return () => {
|
|
722
|
+
containerElement.removeEventListener("keydown", onKeyDown);
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
}, [active, paused, isMounted, container, initialFocus, focusFirst, focusElement]);
|
|
726
|
+
};
|
|
727
|
+
|
|
728
|
+
// src/hooks/useLogOnce.ts
|
|
729
|
+
import { useEffect as useEffect5, useState as useState6 } from "react";
|
|
730
|
+
var defaultOptions = {
|
|
731
|
+
type: "warning"
|
|
732
|
+
};
|
|
733
|
+
var useLogOnce = (message, condition, options) => {
|
|
734
|
+
const [hasLogged, setHasLogged] = useState6(false);
|
|
735
|
+
const { type } = { ...defaultOptions, ...options };
|
|
736
|
+
useEffect5(() => {
|
|
737
|
+
if (!hasLogged && condition) {
|
|
738
|
+
switch (type) {
|
|
739
|
+
case "info":
|
|
740
|
+
console.info(message);
|
|
741
|
+
break;
|
|
742
|
+
case "error":
|
|
743
|
+
console.error(message);
|
|
744
|
+
break;
|
|
745
|
+
case "warning":
|
|
746
|
+
console.warn(message);
|
|
747
|
+
break;
|
|
748
|
+
}
|
|
749
|
+
setHasLogged(true);
|
|
750
|
+
}
|
|
751
|
+
}, [condition]);
|
|
752
|
+
};
|
|
753
|
+
|
|
754
|
+
// src/components/dialog/Dialog.tsx
|
|
755
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
756
|
+
var Dialog = ({
|
|
757
|
+
children,
|
|
758
|
+
isOpen,
|
|
759
|
+
titleElement,
|
|
760
|
+
description,
|
|
761
|
+
isModal = true,
|
|
762
|
+
onClose,
|
|
763
|
+
horizontalAlignment = "center",
|
|
764
|
+
verticalAlignment = "center",
|
|
765
|
+
className,
|
|
766
|
+
backgroundClassName
|
|
767
|
+
}) => {
|
|
768
|
+
const translation = useTranslation([formTranslation]);
|
|
769
|
+
const ref = useRef3(null);
|
|
770
|
+
const onCloseWrapper = () => {
|
|
771
|
+
if (!isModal) return;
|
|
772
|
+
onClose?.();
|
|
773
|
+
};
|
|
774
|
+
useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
|
|
775
|
+
useFocusTrap({
|
|
776
|
+
container: ref,
|
|
777
|
+
active: isOpen,
|
|
778
|
+
focusFirst: true
|
|
779
|
+
});
|
|
780
|
+
if (!isOpen) return void 0;
|
|
781
|
+
return /* @__PURE__ */ jsxs3(
|
|
782
|
+
FloatingContainer,
|
|
783
|
+
{
|
|
784
|
+
ref,
|
|
785
|
+
hidden: !isOpen,
|
|
786
|
+
onKeyDown: (event) => {
|
|
787
|
+
if (event.key === "Escape") {
|
|
788
|
+
onCloseWrapper();
|
|
789
|
+
}
|
|
790
|
+
},
|
|
791
|
+
horizontalAlignment,
|
|
792
|
+
verticalAlignment,
|
|
793
|
+
backgroundOverlay: /* @__PURE__ */ jsx4(
|
|
794
|
+
"div",
|
|
795
|
+
{
|
|
796
|
+
className: clsx3(
|
|
797
|
+
"fixed inset-0 h-screen w-screen bg-overlay-shadow",
|
|
798
|
+
{
|
|
799
|
+
"motion-safe:animate-fade-in animation-delay-3000": isOpen,
|
|
800
|
+
"motion-safe:animate-fade-out": !isOpen
|
|
801
|
+
},
|
|
802
|
+
backgroundClassName
|
|
803
|
+
),
|
|
804
|
+
hidden: !isOpen,
|
|
805
|
+
"aria-hidden": true,
|
|
806
|
+
onClick: onCloseWrapper
|
|
807
|
+
}
|
|
808
|
+
),
|
|
809
|
+
className: clsx3(
|
|
810
|
+
"flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom",
|
|
811
|
+
{
|
|
812
|
+
"motion-safe:animate-pop-in": isOpen,
|
|
813
|
+
"motion-safe:animate-pop-out": !isOpen
|
|
814
|
+
},
|
|
815
|
+
className
|
|
816
|
+
),
|
|
817
|
+
children: [
|
|
818
|
+
/* @__PURE__ */ jsx4("div", { className: "typography-title-lg-semibold mr-8", children: titleElement }),
|
|
819
|
+
/* @__PURE__ */ jsx4("div", { className: "text-description", children: description }),
|
|
820
|
+
isModal && /* @__PURE__ */ jsx4(
|
|
821
|
+
"div",
|
|
822
|
+
{
|
|
823
|
+
className: "absolute top-0 right-0",
|
|
824
|
+
style: {
|
|
825
|
+
paddingTop: "inherit",
|
|
826
|
+
paddingRight: "inherit"
|
|
827
|
+
},
|
|
828
|
+
children: /* @__PURE__ */ jsx4(
|
|
829
|
+
IconButton,
|
|
830
|
+
{
|
|
831
|
+
color: "neutral",
|
|
832
|
+
size: "tiny",
|
|
833
|
+
"aria-label": translation("close"),
|
|
834
|
+
onClick: onCloseWrapper,
|
|
835
|
+
children: /* @__PURE__ */ jsx4(X, {})
|
|
836
|
+
}
|
|
837
|
+
)
|
|
838
|
+
}
|
|
839
|
+
),
|
|
840
|
+
children
|
|
841
|
+
]
|
|
842
|
+
}
|
|
843
|
+
);
|
|
844
|
+
};
|
|
845
|
+
|
|
846
|
+
// src/components/dialog/ConfirmDialog.tsx
|
|
847
|
+
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
848
|
+
var ConfirmDialog = ({
|
|
849
|
+
overwriteTranslation,
|
|
850
|
+
children,
|
|
851
|
+
onCancel,
|
|
852
|
+
onConfirm,
|
|
853
|
+
onDecline,
|
|
854
|
+
confirmType = "positive",
|
|
855
|
+
buttonOverwrites,
|
|
856
|
+
className,
|
|
857
|
+
...restProps
|
|
858
|
+
}) => {
|
|
859
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
860
|
+
const mapping = {
|
|
861
|
+
neutral: "neutral",
|
|
862
|
+
negative: "negative",
|
|
863
|
+
positive: "positive",
|
|
864
|
+
primary: "primary"
|
|
865
|
+
};
|
|
866
|
+
return /* @__PURE__ */ jsxs4(Dialog, { ...restProps, onClose: onCancel, className: clsx4("justify-between", className), children: [
|
|
867
|
+
/* @__PURE__ */ jsx5("div", { className: "flex-col-2 grow", children }),
|
|
868
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex-row-4 mt-3 justify-end", children: [
|
|
869
|
+
onCancel && /* @__PURE__ */ jsx5(
|
|
870
|
+
SolidButton,
|
|
871
|
+
{
|
|
872
|
+
color: buttonOverwrites?.[0].color ?? "neutral",
|
|
873
|
+
onClick: onCancel,
|
|
874
|
+
disabled: buttonOverwrites?.[0].disabled ?? false,
|
|
875
|
+
children: buttonOverwrites?.[0].text ?? translation("cancel")
|
|
876
|
+
}
|
|
877
|
+
),
|
|
878
|
+
onDecline && /* @__PURE__ */ jsx5(
|
|
879
|
+
SolidButton,
|
|
880
|
+
{
|
|
881
|
+
color: buttonOverwrites?.[1].color ?? "negative",
|
|
882
|
+
onClick: onDecline,
|
|
883
|
+
disabled: buttonOverwrites?.[1].disabled ?? false,
|
|
884
|
+
children: buttonOverwrites?.[1].text ?? translation("decline")
|
|
885
|
+
}
|
|
886
|
+
),
|
|
887
|
+
/* @__PURE__ */ jsx5(
|
|
888
|
+
SolidButton,
|
|
889
|
+
{
|
|
890
|
+
color: buttonOverwrites?.[2].color ?? mapping[confirmType],
|
|
891
|
+
onClick: onConfirm,
|
|
892
|
+
disabled: buttonOverwrites?.[2].disabled ?? false,
|
|
893
|
+
children: buttonOverwrites?.[2].text ?? translation("confirm")
|
|
894
|
+
}
|
|
895
|
+
)
|
|
896
|
+
] })
|
|
897
|
+
] });
|
|
898
|
+
};
|
|
899
|
+
|
|
900
|
+
// src/components/dialog/DiscardChangesDialog.tsx
|
|
901
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
902
|
+
var DiscardChangesDialog = ({
|
|
903
|
+
overwriteTranslation,
|
|
904
|
+
children,
|
|
905
|
+
onCancel,
|
|
906
|
+
onSave,
|
|
907
|
+
onDontSave,
|
|
908
|
+
titleOverwrite,
|
|
909
|
+
descriptionOverwrite,
|
|
910
|
+
...props
|
|
911
|
+
}) => {
|
|
912
|
+
const translation = useTranslation([formTranslation], overwriteTranslation);
|
|
913
|
+
return /* @__PURE__ */ jsx6(
|
|
914
|
+
ConfirmDialog,
|
|
915
|
+
{
|
|
916
|
+
...props,
|
|
917
|
+
titleElement: titleOverwrite ?? translation("unsavedChanges"),
|
|
918
|
+
description: descriptionOverwrite ?? translation("unsavedChangesSaveQuestion"),
|
|
919
|
+
onConfirm: onSave,
|
|
920
|
+
onCancel,
|
|
921
|
+
onDecline: onDontSave,
|
|
922
|
+
buttonOverwrites: [{ text: translation("cancel") }, { text: translation("discardChanges") }, { text: translation("save") }],
|
|
923
|
+
children
|
|
924
|
+
}
|
|
925
|
+
);
|
|
926
|
+
};
|
|
927
|
+
|
|
928
|
+
// src/components/user-action/input/Input.tsx
|
|
929
|
+
import { forwardRef as forwardRef3, useEffect as useEffect7, useImperativeHandle as useImperativeHandle2, useRef as useRef4, useState as useState8 } from "react";
|
|
930
|
+
import clsx5 from "clsx";
|
|
931
|
+
|
|
932
|
+
// src/hooks/useDelay.ts
|
|
933
|
+
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
934
|
+
var defaultOptions2 = {
|
|
935
|
+
delay: 3e3,
|
|
936
|
+
disabled: false
|
|
937
|
+
};
|
|
938
|
+
function useDelay(options) {
|
|
939
|
+
const [timer, setTimer] = useState7(void 0);
|
|
940
|
+
const { delay, disabled } = {
|
|
941
|
+
...defaultOptions2,
|
|
942
|
+
...options
|
|
943
|
+
};
|
|
944
|
+
const clearTimer = () => {
|
|
945
|
+
clearTimeout(timer);
|
|
946
|
+
setTimer(void 0);
|
|
947
|
+
};
|
|
948
|
+
const restartTimer = (onDelayFinish) => {
|
|
949
|
+
if (disabled) {
|
|
950
|
+
return;
|
|
951
|
+
}
|
|
952
|
+
clearTimeout(timer);
|
|
953
|
+
setTimer(setTimeout(() => {
|
|
954
|
+
onDelayFinish();
|
|
955
|
+
setTimer(void 0);
|
|
956
|
+
}, delay));
|
|
957
|
+
};
|
|
958
|
+
useEffect6(() => {
|
|
959
|
+
return () => {
|
|
960
|
+
clearTimeout(timer);
|
|
961
|
+
};
|
|
962
|
+
}, [timer]);
|
|
963
|
+
useEffect6(() => {
|
|
964
|
+
if (disabled) {
|
|
965
|
+
clearTimeout(timer);
|
|
966
|
+
setTimer(void 0);
|
|
967
|
+
}
|
|
968
|
+
}, [disabled, timer]);
|
|
969
|
+
return { restartTimer, clearTimer, hasActiveTimer: !!timer };
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
// src/hooks/focus/useFocusManagement.ts
|
|
973
|
+
import { useCallback as useCallback4 } from "react";
|
|
974
|
+
function useFocusManagement() {
|
|
975
|
+
const getFocusableElements = useCallback4(() => {
|
|
976
|
+
return Array.from(
|
|
977
|
+
document.querySelectorAll(
|
|
978
|
+
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
979
|
+
)
|
|
980
|
+
).filter(
|
|
981
|
+
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
982
|
+
);
|
|
983
|
+
}, []);
|
|
984
|
+
const getNextFocusElement = useCallback4(() => {
|
|
985
|
+
const elements = getFocusableElements();
|
|
986
|
+
if (elements.length === 0) {
|
|
987
|
+
return void 0;
|
|
988
|
+
}
|
|
989
|
+
let nextElement = elements[0];
|
|
990
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
991
|
+
const currentIndex = elements.indexOf(document.activeElement);
|
|
992
|
+
nextElement = elements[(currentIndex + 1) % elements.length];
|
|
993
|
+
}
|
|
994
|
+
return nextElement;
|
|
995
|
+
}, [getFocusableElements]);
|
|
996
|
+
const focusNext = useCallback4(() => {
|
|
997
|
+
const nextElement = getNextFocusElement();
|
|
998
|
+
nextElement?.focus();
|
|
999
|
+
}, [getNextFocusElement]);
|
|
1000
|
+
const getPreviousFocusElement = useCallback4(() => {
|
|
1001
|
+
const elements = getFocusableElements();
|
|
1002
|
+
if (elements.length === 0) {
|
|
1003
|
+
return void 0;
|
|
1004
|
+
}
|
|
1005
|
+
let previousElement = elements[0];
|
|
1006
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
1007
|
+
const currentIndex = elements.indexOf(document.activeElement);
|
|
1008
|
+
if (currentIndex === 0) {
|
|
1009
|
+
previousElement = elements[elements.length - 1];
|
|
1010
|
+
} else {
|
|
1011
|
+
previousElement = elements[currentIndex - 1];
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
return previousElement;
|
|
1015
|
+
}, [getFocusableElements]);
|
|
1016
|
+
const focusPrevious = useCallback4(() => {
|
|
1017
|
+
const previousElement = getPreviousFocusElement();
|
|
1018
|
+
if (previousElement) previousElement.focus();
|
|
1019
|
+
}, [getPreviousFocusElement]);
|
|
1020
|
+
return {
|
|
1021
|
+
getFocusableElements,
|
|
1022
|
+
getNextFocusElement,
|
|
1023
|
+
getPreviousFocusElement,
|
|
1024
|
+
focusNext,
|
|
1025
|
+
focusPrevious
|
|
1026
|
+
};
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
// src/components/user-action/input/Input.tsx
|
|
1030
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1031
|
+
var defaultEditCompleteOptions = {
|
|
1032
|
+
allowEnterComplete: false,
|
|
1033
|
+
onBlur: true,
|
|
1034
|
+
afterDelay: true,
|
|
1035
|
+
delay: 2500
|
|
1036
|
+
};
|
|
1037
|
+
var Input = forwardRef3(function Input2({
|
|
1038
|
+
value,
|
|
1039
|
+
onChange,
|
|
1040
|
+
onChangeText,
|
|
1041
|
+
onEditCompleted,
|
|
1042
|
+
editCompleteOptions,
|
|
1043
|
+
disabled = false,
|
|
1044
|
+
invalid = false,
|
|
1045
|
+
defaultStyle = true,
|
|
1046
|
+
className,
|
|
1047
|
+
...props
|
|
1048
|
+
}, forwardedRef) {
|
|
1049
|
+
const {
|
|
1050
|
+
onBlur: allowEditCompleteOnBlur,
|
|
1051
|
+
afterDelay,
|
|
1052
|
+
delay,
|
|
1053
|
+
allowEnterComplete
|
|
1054
|
+
} = { ...defaultEditCompleteOptions, ...editCompleteOptions };
|
|
1055
|
+
const {
|
|
1056
|
+
restartTimer,
|
|
1057
|
+
clearTimer
|
|
1058
|
+
} = useDelay({ delay, disabled: !afterDelay });
|
|
1059
|
+
const innerRef = useRef4(null);
|
|
1060
|
+
useImperativeHandle2(forwardedRef, () => innerRef.current);
|
|
1061
|
+
const { focusNext } = useFocusManagement();
|
|
1062
|
+
return /* @__PURE__ */ jsx7(
|
|
1063
|
+
"input",
|
|
1064
|
+
{
|
|
1065
|
+
...props,
|
|
1066
|
+
ref: innerRef,
|
|
1067
|
+
value,
|
|
1068
|
+
disabled,
|
|
1069
|
+
className: defaultStyle ? clsx5(
|
|
1070
|
+
"px-2.5 py-1.75 rounded-md border-1 text-sm",
|
|
1071
|
+
{
|
|
1072
|
+
"bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !invalid,
|
|
1073
|
+
"bg-on-negative text-negative border-negative-border hover:border-negative-border-hover focus-visible:ring-negative-border": !disabled && invalid,
|
|
1074
|
+
"bg-disabled-background text-disabled-text border-disabled-border": disabled
|
|
1075
|
+
},
|
|
1076
|
+
className
|
|
1077
|
+
) : className,
|
|
1078
|
+
onKeyDown: (event) => {
|
|
1079
|
+
props.onKeyDown?.(event);
|
|
1080
|
+
if (!allowEnterComplete) {
|
|
1081
|
+
return;
|
|
1082
|
+
}
|
|
1083
|
+
if (event.key === "Enter" && !event.shiftKey) {
|
|
1084
|
+
event.preventDefault();
|
|
1085
|
+
innerRef.current?.blur();
|
|
1086
|
+
onEditCompleted?.(event.target.value);
|
|
1087
|
+
focusNext();
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
onBlur: (event) => {
|
|
1091
|
+
props.onBlur?.(event);
|
|
1092
|
+
if (allowEditCompleteOnBlur) {
|
|
1093
|
+
onEditCompleted?.(event.target.value);
|
|
1094
|
+
clearTimer();
|
|
1095
|
+
}
|
|
1096
|
+
},
|
|
1097
|
+
onChange: (event) => {
|
|
1098
|
+
onChange?.(event);
|
|
1099
|
+
const value2 = event.target.value;
|
|
1100
|
+
restartTimer(() => {
|
|
1101
|
+
innerRef.current?.blur();
|
|
1102
|
+
onEditCompleted?.(value2);
|
|
1103
|
+
});
|
|
1104
|
+
onChangeText?.(value2);
|
|
1105
|
+
},
|
|
1106
|
+
"aria-invalid": props["aria-invalid"] ?? invalid,
|
|
1107
|
+
"aria-disabled": props["aria-disabled"] ?? disabled
|
|
1108
|
+
}
|
|
1109
|
+
);
|
|
1110
|
+
});
|
|
1111
|
+
|
|
1112
|
+
// src/components/dialog/InputDialog.tsx
|
|
1113
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
1114
|
+
var InputDialog = ({
|
|
1115
|
+
inputs,
|
|
1116
|
+
buttonOverwrites,
|
|
1117
|
+
...props
|
|
1118
|
+
}) => {
|
|
1119
|
+
return /* @__PURE__ */ jsx8(
|
|
1120
|
+
ConfirmDialog,
|
|
1121
|
+
{
|
|
1122
|
+
buttonOverwrites,
|
|
1123
|
+
...props,
|
|
1124
|
+
children: inputs.map((inputProps, index) => /* @__PURE__ */ jsx8(Input, { ...inputProps }, `input ${index}`))
|
|
1125
|
+
}
|
|
1126
|
+
);
|
|
1127
|
+
};
|
|
1128
|
+
|
|
1129
|
+
// src/components/user-action/select/Select.tsx
|
|
1130
|
+
import {
|
|
1131
|
+
createContext as createContext2,
|
|
1132
|
+
forwardRef as forwardRef5,
|
|
1133
|
+
useCallback as useCallback6,
|
|
1134
|
+
useContext as useContext2,
|
|
1135
|
+
useEffect as useEffect9,
|
|
1136
|
+
useId as useId3,
|
|
1137
|
+
useImperativeHandle as useImperativeHandle3,
|
|
1138
|
+
useRef as useRef5,
|
|
1139
|
+
useState as useState10
|
|
1140
|
+
} from "react";
|
|
1141
|
+
import clsx8 from "clsx";
|
|
1142
|
+
|
|
1143
|
+
// src/components/layout-and-navigation/Expandable.tsx
|
|
1144
|
+
import { forwardRef as forwardRef4, useCallback as useCallback5, useEffect as useEffect8, useId as useId2, useState as useState9 } from "react";
|
|
1145
|
+
import { ChevronDown } from "lucide-react";
|
|
1146
|
+
import clsx6 from "clsx";
|
|
1147
|
+
|
|
1148
|
+
// src/utils/noop.ts
|
|
1149
|
+
var noop = () => void 0;
|
|
1150
|
+
|
|
1151
|
+
// src/components/layout-and-navigation/Expandable.tsx
|
|
1152
|
+
import { jsx as jsx9, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1153
|
+
var ExpansionIcon = ({ isExpanded, className }) => {
|
|
1154
|
+
return /* @__PURE__ */ jsx9(
|
|
1155
|
+
ChevronDown,
|
|
1156
|
+
{
|
|
1157
|
+
"aria-hidden": true,
|
|
1158
|
+
className: clsx6(
|
|
1159
|
+
"min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
|
|
1160
|
+
{ "rotate-180": isExpanded },
|
|
1161
|
+
className
|
|
1162
|
+
)
|
|
1163
|
+
}
|
|
1164
|
+
);
|
|
1165
|
+
};
|
|
1166
|
+
var Expandable = forwardRef4(function Expandable2({
|
|
1167
|
+
children,
|
|
1168
|
+
id: providedId,
|
|
1169
|
+
label,
|
|
1170
|
+
icon,
|
|
1171
|
+
isExpanded = false,
|
|
1172
|
+
onChange = noop,
|
|
1173
|
+
clickOnlyOnHeader = true,
|
|
1174
|
+
disabled = false,
|
|
1175
|
+
className,
|
|
1176
|
+
headerClassName,
|
|
1177
|
+
contentClassName,
|
|
1178
|
+
contentExpandedClassName
|
|
1179
|
+
}, ref) {
|
|
1180
|
+
const defaultIcon = useCallback5((expanded) => /* @__PURE__ */ jsx9(ExpansionIcon, { isExpanded: expanded }), []);
|
|
1181
|
+
icon ??= defaultIcon;
|
|
1182
|
+
const generatedId = useId2();
|
|
1183
|
+
const id = providedId ?? generatedId;
|
|
1184
|
+
return /* @__PURE__ */ jsxs5(
|
|
1185
|
+
"div",
|
|
1186
|
+
{
|
|
1187
|
+
ref,
|
|
1188
|
+
onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
1189
|
+
className: clsx6(
|
|
1190
|
+
"flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
|
|
1191
|
+
{ "cursor-pointer": !clickOnlyOnHeader && !disabled },
|
|
1192
|
+
className
|
|
1193
|
+
),
|
|
1194
|
+
children: [
|
|
1195
|
+
/* @__PURE__ */ jsxs5(
|
|
1196
|
+
"button",
|
|
1197
|
+
{
|
|
1198
|
+
onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
1199
|
+
className: clsx6(
|
|
1200
|
+
"flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
|
|
1201
|
+
{
|
|
1202
|
+
"group-hover:brightness-97": !isExpanded,
|
|
1203
|
+
"hover:brightness-97": isExpanded && !disabled,
|
|
1204
|
+
"cursor-pointer": clickOnlyOnHeader && !disabled
|
|
1205
|
+
},
|
|
1206
|
+
headerClassName
|
|
1207
|
+
),
|
|
1208
|
+
"aria-expanded": isExpanded,
|
|
1209
|
+
"aria-controls": `${id}-content`,
|
|
1210
|
+
"aria-disabled": disabled ?? void 0,
|
|
1211
|
+
children: [
|
|
1212
|
+
label,
|
|
1213
|
+
icon(isExpanded)
|
|
1214
|
+
]
|
|
1215
|
+
}
|
|
1216
|
+
),
|
|
1217
|
+
/* @__PURE__ */ jsx9(
|
|
1218
|
+
"div",
|
|
1219
|
+
{
|
|
1220
|
+
id: `${id}-content`,
|
|
1221
|
+
className: clsx6(
|
|
1222
|
+
"flex-col-2 px-4 transition-all duration-300 ease-in-out",
|
|
1223
|
+
{
|
|
1224
|
+
[clsx6("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
|
|
1225
|
+
"max-h-0 opacity-0 overflow-hidden": !isExpanded
|
|
1226
|
+
},
|
|
1227
|
+
contentClassName
|
|
1228
|
+
),
|
|
1229
|
+
role: "region",
|
|
1230
|
+
children
|
|
1231
|
+
}
|
|
1232
|
+
)
|
|
1233
|
+
]
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
});
|
|
1237
|
+
var ExpandableUncontrolled = forwardRef4(function ExpandableUncontrolled2({
|
|
1238
|
+
isExpanded,
|
|
1239
|
+
onChange = noop,
|
|
1240
|
+
...props
|
|
1241
|
+
}, ref) {
|
|
1242
|
+
const [usedIsExpanded, setUsedIsExpanded] = useState9(isExpanded);
|
|
1243
|
+
useEffect8(() => {
|
|
1244
|
+
setUsedIsExpanded(isExpanded);
|
|
1245
|
+
}, [isExpanded]);
|
|
1246
|
+
return /* @__PURE__ */ jsx9(
|
|
1247
|
+
Expandable,
|
|
1248
|
+
{
|
|
1249
|
+
...props,
|
|
1250
|
+
ref,
|
|
1251
|
+
isExpanded: usedIsExpanded,
|
|
1252
|
+
onChange: (value) => {
|
|
1253
|
+
onChange(value);
|
|
1254
|
+
setUsedIsExpanded(value);
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
);
|
|
1258
|
+
});
|
|
1259
|
+
|
|
1260
|
+
// src/utils/match.ts
|
|
1261
|
+
var match = (key, values) => {
|
|
1262
|
+
return values[key];
|
|
1263
|
+
};
|
|
1264
|
+
|
|
1265
|
+
// src/components/user-action/select/Select.tsx
|
|
1266
|
+
import { CheckIcon, Plus, XIcon } from "lucide-react";
|
|
1267
|
+
|
|
1268
|
+
// src/components/layout-and-navigation/Chip.tsx
|
|
1269
|
+
import clsx7 from "clsx";
|
|
1270
|
+
import { jsx as jsx10, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1271
|
+
var Chip = ({
|
|
1272
|
+
children,
|
|
1273
|
+
trailingIcon,
|
|
1274
|
+
color = "default",
|
|
1275
|
+
size = "md",
|
|
1276
|
+
icon = false,
|
|
1277
|
+
variant = "normal",
|
|
1278
|
+
className = "",
|
|
1279
|
+
...restProps
|
|
1280
|
+
}) => {
|
|
1281
|
+
const colorMapping = {
|
|
1282
|
+
default: "text-tag-default-text bg-tag-default-background",
|
|
1283
|
+
dark: "text-tag-dark-text bg-tag-dark-background",
|
|
1284
|
+
red: "text-tag-red-text bg-tag-red-background",
|
|
1285
|
+
yellow: "text-tag-yellow-text bg-tag-yellow-background",
|
|
1286
|
+
green: "text-tag-green-text bg-tag-green-background",
|
|
1287
|
+
blue: "text-tag-blue-text bg-tag-blue-background",
|
|
1288
|
+
pink: "text-tag-pink-text bg-tag-pink-background",
|
|
1289
|
+
orange: "text-tag-orange-text bg-tag-orange-background"
|
|
1290
|
+
}[color];
|
|
1291
|
+
const colorMappingIcon = {
|
|
1292
|
+
default: "text-tag-default-icon",
|
|
1293
|
+
dark: "text-tag-dark-icon",
|
|
1294
|
+
red: "text-tag-red-icon",
|
|
1295
|
+
yellow: "text-tag-yellow-icon",
|
|
1296
|
+
green: "text-tag-green-icon",
|
|
1297
|
+
blue: "text-tag-blue-icon",
|
|
1298
|
+
pink: "text-tag-pink-icon",
|
|
1299
|
+
orange: "text-tag-orange-icon"
|
|
1300
|
+
}[color];
|
|
1301
|
+
return /* @__PURE__ */ jsxs6(
|
|
1302
|
+
"div",
|
|
1303
|
+
{
|
|
1304
|
+
...restProps,
|
|
1305
|
+
className: clsx7(
|
|
1306
|
+
`flex-row-0 w-fit font-semibold`,
|
|
1307
|
+
colorMapping,
|
|
1308
|
+
!icon ? {
|
|
1309
|
+
"px-1 py-0.5": size === "sm",
|
|
1310
|
+
"px-2 py-1": size === "md",
|
|
1311
|
+
"px-4 py-2": size === "lg"
|
|
1312
|
+
} : {
|
|
1313
|
+
"p-0.5": size === "sm",
|
|
1314
|
+
"p-1": size === "md",
|
|
1315
|
+
"p-2": size === "lg"
|
|
1316
|
+
},
|
|
1317
|
+
{
|
|
1318
|
+
"rounded-md": variant === "normal",
|
|
1319
|
+
"rounded-full": variant === "fullyRounded"
|
|
1320
|
+
},
|
|
1321
|
+
className
|
|
1322
|
+
),
|
|
1323
|
+
children: [
|
|
1324
|
+
children,
|
|
1325
|
+
trailingIcon && /* @__PURE__ */ jsx10("span", { className: colorMappingIcon, children: trailingIcon })
|
|
1326
|
+
]
|
|
1327
|
+
}
|
|
1328
|
+
);
|
|
1329
|
+
};
|
|
1330
|
+
|
|
1331
|
+
// src/components/user-action/select/Select.tsx
|
|
1332
|
+
import { createPortal as createPortal2 } from "react-dom";
|
|
1333
|
+
import { Fragment as Fragment2, jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1334
|
+
var defaultToggleOpenOptions = {
|
|
1335
|
+
highlightStartPosition: "first"
|
|
1336
|
+
};
|
|
1337
|
+
var SelectContext = createContext2(null);
|
|
1338
|
+
function useSelectContext() {
|
|
1339
|
+
const ctx = useContext2(SelectContext);
|
|
1340
|
+
if (!ctx) {
|
|
1341
|
+
throw new Error("SelectContext must be used within a ListBoxPrimitive");
|
|
1342
|
+
}
|
|
1343
|
+
return ctx;
|
|
1344
|
+
}
|
|
1345
|
+
var SelectRoot = ({
|
|
1346
|
+
children,
|
|
1347
|
+
id,
|
|
1348
|
+
value,
|
|
1349
|
+
onValueChanged,
|
|
1350
|
+
values,
|
|
1351
|
+
onValuesChanged,
|
|
1352
|
+
isOpen = false,
|
|
1353
|
+
disabled = false,
|
|
1354
|
+
invalid = false,
|
|
1355
|
+
isMultiSelect = false
|
|
1356
|
+
}) => {
|
|
1357
|
+
const optionsRef = useRef5([]);
|
|
1358
|
+
const triggerRef = useRef5(null);
|
|
1359
|
+
const generatedId = useId3();
|
|
1360
|
+
const usedId = id ?? generatedId;
|
|
1361
|
+
const [internalState, setInternalState] = useState10({
|
|
1362
|
+
isOpen
|
|
1363
|
+
});
|
|
1364
|
+
const state = {
|
|
1365
|
+
...internalState,
|
|
1366
|
+
id: usedId,
|
|
1367
|
+
disabled,
|
|
1368
|
+
invalid,
|
|
1369
|
+
value: isMultiSelect ? values ?? [] : [value].filter(Boolean),
|
|
1370
|
+
isMultiSelect
|
|
1371
|
+
};
|
|
1372
|
+
const registerItem = useCallback6((item) => {
|
|
1373
|
+
optionsRef.current.push(item);
|
|
1374
|
+
optionsRef.current.sort((a, b) => {
|
|
1375
|
+
const aEl = a.ref.current;
|
|
1376
|
+
const bEl = b.ref.current;
|
|
1377
|
+
if (!aEl || !bEl) return 0;
|
|
1378
|
+
return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
1379
|
+
});
|
|
1380
|
+
}, []);
|
|
1381
|
+
const unregisterItem = useCallback6((value2) => {
|
|
1382
|
+
optionsRef.current = optionsRef.current.filter((i) => i.value !== value2);
|
|
1383
|
+
}, []);
|
|
1384
|
+
const toggleSelection = (value2, isSelected) => {
|
|
1385
|
+
if (disabled) {
|
|
1386
|
+
return;
|
|
1387
|
+
}
|
|
1388
|
+
const option = optionsRef.current.find((i) => i.value === value2);
|
|
1389
|
+
if (!option) {
|
|
1390
|
+
console.error(`SelectOption with value: ${value2} not found`);
|
|
1391
|
+
return;
|
|
1392
|
+
}
|
|
1393
|
+
let newValue;
|
|
1394
|
+
if (isMultiSelect) {
|
|
1395
|
+
const isSelectedBefore = state.value.includes(value2);
|
|
1396
|
+
const isSelectedAfter = isSelected ?? !isSelectedBefore;
|
|
1397
|
+
if (!isSelectedAfter) {
|
|
1398
|
+
newValue = state.value.filter((v) => v !== value2);
|
|
1399
|
+
} else {
|
|
1400
|
+
newValue = [...state.value, value2];
|
|
1401
|
+
}
|
|
1402
|
+
} else {
|
|
1403
|
+
newValue = [value2];
|
|
1404
|
+
}
|
|
1405
|
+
if (!isMultiSelect) {
|
|
1406
|
+
onValueChanged?.(newValue[0]);
|
|
1407
|
+
} else {
|
|
1408
|
+
onValuesChanged?.(newValue);
|
|
1409
|
+
}
|
|
1410
|
+
setInternalState((prevState) => ({
|
|
1411
|
+
...prevState,
|
|
1412
|
+
highlightedValue: value2
|
|
1413
|
+
}));
|
|
1414
|
+
};
|
|
1415
|
+
const highlightItem = (value2) => {
|
|
1416
|
+
if (disabled) {
|
|
1417
|
+
return;
|
|
1418
|
+
}
|
|
1419
|
+
setInternalState((prevState) => ({
|
|
1420
|
+
...prevState,
|
|
1421
|
+
highlightedValue: value2
|
|
1422
|
+
}));
|
|
1423
|
+
};
|
|
1424
|
+
const registerTrigger = useCallback6((ref) => {
|
|
1425
|
+
triggerRef.current = ref.current;
|
|
1426
|
+
}, []);
|
|
1427
|
+
const unregisterTrigger = useCallback6(() => {
|
|
1428
|
+
triggerRef.current = null;
|
|
1429
|
+
}, []);
|
|
1430
|
+
const toggleOpen = (isOpen2, options) => {
|
|
1431
|
+
const { highlightStartPosition } = { ...defaultToggleOpenOptions, ...options };
|
|
1432
|
+
let highlightedIndex;
|
|
1433
|
+
if (highlightStartPosition === "first") {
|
|
1434
|
+
highlightedIndex = optionsRef.current.findIndex((option) => !option.disabled);
|
|
1435
|
+
} else {
|
|
1436
|
+
highlightedIndex = optionsRef.current.length - 1 - [...optionsRef.current].reverse().findIndex((option) => !option.disabled);
|
|
1437
|
+
}
|
|
1438
|
+
if (highlightedIndex === -1 || highlightedIndex === optionsRef.current.length) {
|
|
1439
|
+
highlightedIndex = 0;
|
|
1440
|
+
}
|
|
1441
|
+
setInternalState((prevState) => ({
|
|
1442
|
+
...prevState,
|
|
1443
|
+
isOpen: isOpen2 ?? !prevState.isOpen,
|
|
1444
|
+
highlightedValue: optionsRef.current[highlightedIndex].value
|
|
1445
|
+
}));
|
|
1446
|
+
};
|
|
1447
|
+
const moveHighlightedIndex = (delta) => {
|
|
1448
|
+
let highlightedIndex = optionsRef.current.findIndex((value2) => value2.value === internalState.highlightedValue);
|
|
1449
|
+
if (highlightedIndex === -1) {
|
|
1450
|
+
highlightedIndex = 0;
|
|
1451
|
+
}
|
|
1452
|
+
const optionLength = optionsRef.current.length;
|
|
1453
|
+
const startIndex = (highlightedIndex + delta % optionLength + optionLength) % optionLength;
|
|
1454
|
+
const isForward = delta >= 0;
|
|
1455
|
+
let highlightedValue = optionsRef.current[startIndex].value;
|
|
1456
|
+
for (let i = 0; i < optionsRef.current.length; i++) {
|
|
1457
|
+
const index = (startIndex + (isForward ? i : -i) + optionLength) % optionLength;
|
|
1458
|
+
if (!optionsRef.current[index].disabled) {
|
|
1459
|
+
highlightedValue = optionsRef.current[index].value;
|
|
1460
|
+
break;
|
|
1461
|
+
}
|
|
1462
|
+
}
|
|
1463
|
+
setInternalState((prevState) => ({
|
|
1464
|
+
...prevState,
|
|
1465
|
+
highlightedValue
|
|
1466
|
+
}));
|
|
1467
|
+
};
|
|
1468
|
+
useEffect9(() => {
|
|
1469
|
+
if (!internalState.highlightedValue) return;
|
|
1470
|
+
const highlighted = optionsRef.current.find((value2) => value2.value === internalState.highlightedValue);
|
|
1471
|
+
if (highlighted) {
|
|
1472
|
+
highlighted.ref.current.scrollIntoView({ behavior: "instant", block: "nearest" });
|
|
1473
|
+
} else {
|
|
1474
|
+
console.error(`SelectRoot: Could not find highlighted value (${internalState.highlightedValue})`);
|
|
1475
|
+
}
|
|
1476
|
+
}, [internalState.highlightedValue]);
|
|
1477
|
+
const contextValue = {
|
|
1478
|
+
state,
|
|
1479
|
+
item: {
|
|
1480
|
+
register: registerItem,
|
|
1481
|
+
unregister: unregisterItem,
|
|
1482
|
+
toggleSelection,
|
|
1483
|
+
highlightItem,
|
|
1484
|
+
moveHighlightedIndex
|
|
1485
|
+
},
|
|
1486
|
+
trigger: {
|
|
1487
|
+
ref: triggerRef,
|
|
1488
|
+
register: registerTrigger,
|
|
1489
|
+
unregister: unregisterTrigger,
|
|
1490
|
+
toggleOpen
|
|
1491
|
+
}
|
|
1492
|
+
};
|
|
1493
|
+
return /* @__PURE__ */ jsx11(SelectContext.Provider, { value: contextValue, children });
|
|
1494
|
+
};
|
|
1495
|
+
var SelectOption = forwardRef5(
|
|
1496
|
+
function SelectOption2({ value, disabled = false, children, className, ...restProps }, ref) {
|
|
1497
|
+
const { state, item, trigger } = useSelectContext();
|
|
1498
|
+
const { register, unregister, toggleSelection, highlightItem } = item;
|
|
1499
|
+
const itemRef = useRef5(null);
|
|
1500
|
+
useEffect9(() => {
|
|
1501
|
+
register({
|
|
1502
|
+
value,
|
|
1503
|
+
disabled,
|
|
1504
|
+
ref: itemRef
|
|
1505
|
+
});
|
|
1506
|
+
return () => unregister(value);
|
|
1507
|
+
}, [value, disabled, register, unregister, children]);
|
|
1508
|
+
const isHighlighted = state.highlightedValue === value;
|
|
1509
|
+
const isSelected = state.value.includes(value);
|
|
1510
|
+
return /* @__PURE__ */ jsxs7(
|
|
1511
|
+
"li",
|
|
1512
|
+
{
|
|
1513
|
+
...restProps,
|
|
1514
|
+
ref: (node) => {
|
|
1515
|
+
itemRef.current = node;
|
|
1516
|
+
if (typeof ref === "function") ref(node);
|
|
1517
|
+
else if (ref) ref.current = node;
|
|
1518
|
+
},
|
|
1519
|
+
id: value,
|
|
1520
|
+
role: "option",
|
|
1521
|
+
"aria-disabled": disabled,
|
|
1522
|
+
"aria-selected": isSelected,
|
|
1523
|
+
"data-highlighted": isHighlighted ? "" : void 0,
|
|
1524
|
+
"data-selected": isSelected ? "" : void 0,
|
|
1525
|
+
"data-disabled": disabled ? "" : void 0,
|
|
1526
|
+
className: clsx8(
|
|
1527
|
+
"flex-row-1 items-center px-2 py-1 rounded-md",
|
|
1528
|
+
"data-highlighted:bg-primary/20",
|
|
1529
|
+
"data-disabled:text-disabled data-disabled:cursor-not-allowed",
|
|
1530
|
+
"not-data-disabled:cursor-pointer",
|
|
1531
|
+
className
|
|
1532
|
+
),
|
|
1533
|
+
onClick: (event) => {
|
|
1534
|
+
if (!disabled) {
|
|
1535
|
+
toggleSelection(value);
|
|
1536
|
+
if (!state.isMultiSelect) {
|
|
1537
|
+
trigger.toggleOpen(false);
|
|
1538
|
+
}
|
|
1539
|
+
restProps.onClick?.(event);
|
|
1540
|
+
}
|
|
1541
|
+
},
|
|
1542
|
+
onMouseEnter: (event) => {
|
|
1543
|
+
if (!disabled) {
|
|
1544
|
+
highlightItem(value);
|
|
1545
|
+
restProps.onMouseEnter?.(event);
|
|
1546
|
+
}
|
|
1547
|
+
},
|
|
1548
|
+
children: [
|
|
1549
|
+
/* @__PURE__ */ jsx11(
|
|
1550
|
+
CheckIcon,
|
|
1551
|
+
{
|
|
1552
|
+
className: clsx8("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
1553
|
+
"aria-hidden": true
|
|
1554
|
+
}
|
|
1555
|
+
),
|
|
1556
|
+
children ?? value
|
|
1557
|
+
]
|
|
1558
|
+
}
|
|
1559
|
+
);
|
|
1560
|
+
}
|
|
1561
|
+
);
|
|
1562
|
+
var defaultSelectButtonTranslation = {
|
|
1563
|
+
en: {
|
|
1564
|
+
clickToSelect: "Click to select"
|
|
1565
|
+
},
|
|
1566
|
+
de: {
|
|
1567
|
+
clickToSelect: "Zum ausw\xE4hlen dr\xFCcken"
|
|
1568
|
+
}
|
|
1569
|
+
};
|
|
1570
|
+
var SelectButton = forwardRef5(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
|
|
1571
|
+
const translation = useTranslation([defaultSelectButtonTranslation]);
|
|
1572
|
+
const { state, trigger } = useSelectContext();
|
|
1573
|
+
const { register, unregister, toggleOpen } = trigger;
|
|
1574
|
+
const innerRef = useRef5(null);
|
|
1575
|
+
useImperativeHandle3(ref, () => innerRef.current);
|
|
1576
|
+
useEffect9(() => {
|
|
1577
|
+
register(innerRef);
|
|
1578
|
+
return () => unregister();
|
|
1579
|
+
}, [register, unregister]);
|
|
1580
|
+
const disabled = !!props?.disabled || !!state.disabled;
|
|
1581
|
+
const invalid = state.invalid;
|
|
1582
|
+
const hasValue = state.value.length > 0;
|
|
1583
|
+
return /* @__PURE__ */ jsxs7(
|
|
1584
|
+
"button",
|
|
1585
|
+
{
|
|
1586
|
+
...props,
|
|
1587
|
+
ref: innerRef,
|
|
1588
|
+
id: state.id,
|
|
1589
|
+
className: clsx8(
|
|
1590
|
+
"flex-row-2 items-center justify-between bg-input-background text-input-text rounded-md px-2.5 py-2.5",
|
|
1591
|
+
"data-placeholder:text-description",
|
|
1592
|
+
props.className
|
|
1593
|
+
),
|
|
1594
|
+
onClick: () => toggleOpen(!state.isOpen),
|
|
1595
|
+
onKeyDown: (event) => {
|
|
1596
|
+
switch (event.key) {
|
|
1597
|
+
case "ArrowDown":
|
|
1598
|
+
toggleOpen(true, { highlightStartPosition: "first" });
|
|
1599
|
+
break;
|
|
1600
|
+
case "ArrowUp":
|
|
1601
|
+
toggleOpen(true, { highlightStartPosition: "last" });
|
|
1602
|
+
break;
|
|
1603
|
+
}
|
|
1604
|
+
},
|
|
1605
|
+
"data-placeholder": !hasValue ? "" : void 0,
|
|
1606
|
+
"data-disabled": disabled ? "" : void 0,
|
|
1607
|
+
"data-invalid": invalid ? "" : void 0,
|
|
1608
|
+
"aria-invalid": invalid,
|
|
1609
|
+
"aria-disabled": disabled,
|
|
1610
|
+
"aria-haspopup": "listbox",
|
|
1611
|
+
"aria-expanded": state.isOpen,
|
|
1612
|
+
"aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
|
|
1613
|
+
children: [
|
|
1614
|
+
hasValue ? selectedDisplay?.(state.value) ?? state.value.join(", ") : placeholder ?? translation("clickToSelect"),
|
|
1615
|
+
/* @__PURE__ */ jsx11(ExpansionIcon, { isExpanded: state.isOpen })
|
|
1616
|
+
]
|
|
1617
|
+
}
|
|
1618
|
+
);
|
|
1619
|
+
});
|
|
1620
|
+
var SelectChipDisplay = forwardRef5(function SelectChipDisplay2({ ...props }, ref) {
|
|
1621
|
+
const { state, trigger, item } = useSelectContext();
|
|
1622
|
+
const { register, unregister, toggleOpen } = trigger;
|
|
1623
|
+
const innerRef = useRef5(null);
|
|
1624
|
+
useImperativeHandle3(ref, () => innerRef.current);
|
|
1625
|
+
useEffect9(() => {
|
|
1626
|
+
register(innerRef);
|
|
1627
|
+
return () => unregister();
|
|
1628
|
+
}, [register, unregister]);
|
|
1629
|
+
const disabled = !!props?.disabled || !!state.disabled;
|
|
1630
|
+
const invalid = state.invalid;
|
|
1631
|
+
return /* @__PURE__ */ jsxs7(
|
|
1632
|
+
"div",
|
|
1633
|
+
{
|
|
1634
|
+
...props,
|
|
1635
|
+
ref: innerRef,
|
|
1636
|
+
className: clsx8(
|
|
1637
|
+
"flex flex-wrap flex-row gap-2 items-center bg-input-background text-input-text rounded-md px-2.5 py-2.5",
|
|
1638
|
+
props.className
|
|
1639
|
+
),
|
|
1640
|
+
"data-disabled": disabled ? "" : void 0,
|
|
1641
|
+
"data-invalid": invalid ? "" : void 0,
|
|
1642
|
+
"aria-invalid": invalid,
|
|
1643
|
+
"aria-disabled": disabled,
|
|
1644
|
+
children: [
|
|
1645
|
+
state.value.map((value) => /* @__PURE__ */ jsxs7(Chip, { className: "gap-x-2", children: [
|
|
1646
|
+
value,
|
|
1647
|
+
/* @__PURE__ */ jsx11(
|
|
1648
|
+
"button",
|
|
1649
|
+
{
|
|
1650
|
+
onClick: () => {
|
|
1651
|
+
item.toggleSelection(value, false);
|
|
1652
|
+
},
|
|
1653
|
+
className: "focus-within:text-negative hover:bg-negative/20 hover:text-negative rounded-md focus-style-none focus-visible:ring-2 focus-visible:ring-negative focus-visible:bg-negative/20",
|
|
1654
|
+
children: /* @__PURE__ */ jsx11(XIcon, {})
|
|
1655
|
+
}
|
|
1656
|
+
)
|
|
1657
|
+
] }, value)),
|
|
1658
|
+
/* @__PURE__ */ jsx11(
|
|
1659
|
+
IconButton,
|
|
1660
|
+
{
|
|
1661
|
+
id: state.id,
|
|
1662
|
+
onClick: () => toggleOpen(),
|
|
1663
|
+
onKeyDown: (event) => {
|
|
1664
|
+
switch (event.key) {
|
|
1665
|
+
case "ArrowDown":
|
|
1666
|
+
toggleOpen(true, { highlightStartPosition: "first" });
|
|
1667
|
+
break;
|
|
1668
|
+
case "ArrowUp":
|
|
1669
|
+
toggleOpen(true, { highlightStartPosition: "last" });
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
|
+
size: "small",
|
|
1673
|
+
color: "neutral",
|
|
1674
|
+
"aria-invalid": invalid,
|
|
1675
|
+
"aria-disabled": disabled,
|
|
1676
|
+
"aria-haspopup": "listbox",
|
|
1677
|
+
"aria-expanded": state.isOpen,
|
|
1678
|
+
"aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
|
|
1679
|
+
children: /* @__PURE__ */ jsx11(Plus, {})
|
|
1680
|
+
}
|
|
1681
|
+
)
|
|
1682
|
+
]
|
|
1683
|
+
}
|
|
1684
|
+
);
|
|
1685
|
+
});
|
|
1686
|
+
var SelectContent = forwardRef5(
|
|
1687
|
+
function SelectContent2({
|
|
1688
|
+
alignment,
|
|
1689
|
+
orientation = "vertical",
|
|
1690
|
+
...props
|
|
1691
|
+
}, ref) {
|
|
1692
|
+
const innerRef = useRef5(null);
|
|
1693
|
+
useImperativeHandle3(ref, () => innerRef.current);
|
|
1694
|
+
const { trigger, state, item } = useSelectContext();
|
|
1695
|
+
const position = useFloatingElement({
|
|
1696
|
+
active: state.isOpen,
|
|
1697
|
+
anchorRef: trigger.ref,
|
|
1698
|
+
containerRef: innerRef,
|
|
1699
|
+
...alignment
|
|
1700
|
+
});
|
|
1701
|
+
useFocusTrap({
|
|
1702
|
+
container: innerRef,
|
|
1703
|
+
active: state.isOpen && !!position
|
|
1704
|
+
});
|
|
1705
|
+
return createPortal2(
|
|
1706
|
+
/* @__PURE__ */ jsxs7(Fragment2, { children: [
|
|
1707
|
+
/* @__PURE__ */ jsx11(
|
|
1708
|
+
"div",
|
|
1709
|
+
{
|
|
1710
|
+
hidden: !state.isOpen,
|
|
1711
|
+
onClick: () => trigger.toggleOpen(false),
|
|
1712
|
+
className: clsx8("fixed w-screen h-screen inset-0")
|
|
1713
|
+
}
|
|
1714
|
+
),
|
|
1715
|
+
/* @__PURE__ */ jsx11(
|
|
1716
|
+
"ul",
|
|
1717
|
+
{
|
|
1718
|
+
...props,
|
|
1719
|
+
id: `${state.id}-listbox`,
|
|
1720
|
+
ref: innerRef,
|
|
1721
|
+
hidden: !state.isOpen,
|
|
1722
|
+
onKeyDown: (event) => {
|
|
1723
|
+
switch (event.key) {
|
|
1724
|
+
case "Escape":
|
|
1725
|
+
trigger.toggleOpen(false);
|
|
1726
|
+
event.preventDefault();
|
|
1727
|
+
event.stopPropagation();
|
|
1728
|
+
break;
|
|
1729
|
+
case match(orientation, {
|
|
1730
|
+
vertical: "ArrowDown",
|
|
1731
|
+
horizontal: "ArrowUp"
|
|
1732
|
+
}):
|
|
1733
|
+
item.moveHighlightedIndex(1);
|
|
1734
|
+
event.preventDefault();
|
|
1735
|
+
break;
|
|
1736
|
+
case match(orientation, {
|
|
1737
|
+
vertical: "ArrowUp",
|
|
1738
|
+
horizontal: "ArrowDown"
|
|
1739
|
+
}):
|
|
1740
|
+
item.moveHighlightedIndex(-1);
|
|
1741
|
+
event.preventDefault();
|
|
1742
|
+
break;
|
|
1743
|
+
case "Home":
|
|
1744
|
+
event.preventDefault();
|
|
1745
|
+
break;
|
|
1746
|
+
case "End":
|
|
1747
|
+
event.preventDefault();
|
|
1748
|
+
break;
|
|
1749
|
+
case "Enter":
|
|
1750
|
+
// Fall through
|
|
1751
|
+
case " ":
|
|
1752
|
+
if (state.highlightedValue) {
|
|
1753
|
+
item.toggleSelection(state.highlightedValue);
|
|
1754
|
+
if (!state.isMultiSelect) {
|
|
1755
|
+
trigger.toggleOpen(false);
|
|
1756
|
+
}
|
|
1757
|
+
event.preventDefault();
|
|
1758
|
+
}
|
|
1759
|
+
break;
|
|
1760
|
+
}
|
|
1761
|
+
},
|
|
1762
|
+
className: clsx8("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
|
|
1763
|
+
style: {
|
|
1764
|
+
opacity: position ? void 0 : 0,
|
|
1765
|
+
position: "fixed",
|
|
1766
|
+
...position
|
|
1767
|
+
},
|
|
1768
|
+
role: "listbox",
|
|
1769
|
+
"aria-multiselectable": state.isMultiSelect,
|
|
1770
|
+
"aria-orientation": orientation,
|
|
1771
|
+
tabIndex: position ? 0 : void 0,
|
|
1772
|
+
children: props.children
|
|
1773
|
+
}
|
|
1774
|
+
)
|
|
1775
|
+
] }),
|
|
1776
|
+
document.body
|
|
1777
|
+
);
|
|
1778
|
+
}
|
|
1779
|
+
);
|
|
1780
|
+
var Select = forwardRef5(function Select2({
|
|
1781
|
+
children,
|
|
1782
|
+
contentPanelProps,
|
|
1783
|
+
buttonProps,
|
|
1784
|
+
...props
|
|
1785
|
+
}, ref) {
|
|
1786
|
+
return /* @__PURE__ */ jsxs7(SelectRoot, { ...props, isMultiSelect: false, children: [
|
|
1787
|
+
/* @__PURE__ */ jsx11(
|
|
1788
|
+
SelectButton,
|
|
1789
|
+
{
|
|
1790
|
+
ref,
|
|
1791
|
+
...buttonProps,
|
|
1792
|
+
selectedDisplay: (values) => {
|
|
1793
|
+
const value = values[0];
|
|
1794
|
+
if (!buttonProps?.selectedDisplay) return void 0;
|
|
1795
|
+
return buttonProps.selectedDisplay(value);
|
|
1796
|
+
}
|
|
1797
|
+
}
|
|
1798
|
+
),
|
|
1799
|
+
/* @__PURE__ */ jsx11(SelectContent, { ...contentPanelProps, children })
|
|
1800
|
+
] });
|
|
1801
|
+
});
|
|
1802
|
+
var SelectUncontrolled = forwardRef5(function SelectUncontrolled2({
|
|
1803
|
+
value: initialValue,
|
|
1804
|
+
onValueChanged,
|
|
1805
|
+
...props
|
|
1806
|
+
}, ref) {
|
|
1807
|
+
const [value, setValue] = useState10(initialValue);
|
|
1808
|
+
useEffect9(() => {
|
|
1809
|
+
setValue(initialValue);
|
|
1810
|
+
}, [initialValue]);
|
|
1811
|
+
return /* @__PURE__ */ jsx11(
|
|
1812
|
+
Select,
|
|
1813
|
+
{
|
|
1814
|
+
...props,
|
|
1815
|
+
ref,
|
|
1816
|
+
value,
|
|
1817
|
+
onValueChanged: (value2) => {
|
|
1818
|
+
setValue(value2);
|
|
1819
|
+
onValueChanged?.(value2);
|
|
1820
|
+
}
|
|
1821
|
+
}
|
|
1822
|
+
);
|
|
1823
|
+
});
|
|
1824
|
+
var MultiSelect = forwardRef5(function MultiSelect2({
|
|
1825
|
+
children,
|
|
1826
|
+
contentPanelProps,
|
|
1827
|
+
buttonProps,
|
|
1828
|
+
...props
|
|
1829
|
+
}, ref) {
|
|
1830
|
+
return /* @__PURE__ */ jsxs7(SelectRoot, { ...props, isMultiSelect: true, children: [
|
|
1831
|
+
/* @__PURE__ */ jsx11(SelectButton, { ref, ...buttonProps }),
|
|
1832
|
+
/* @__PURE__ */ jsx11(SelectContent, { ...contentPanelProps, children })
|
|
1833
|
+
] });
|
|
1834
|
+
});
|
|
1835
|
+
var MultiSelectUncontrolled = forwardRef5(function MultiSelectUncontrolled2({
|
|
1836
|
+
values: initialValues,
|
|
1837
|
+
onValuesChanged,
|
|
1838
|
+
...props
|
|
1839
|
+
}, ref) {
|
|
1840
|
+
const [values, setValues] = useState10(initialValues);
|
|
1841
|
+
useEffect9(() => {
|
|
1842
|
+
setValues(initialValues);
|
|
1843
|
+
}, [initialValues]);
|
|
1844
|
+
return /* @__PURE__ */ jsx11(
|
|
1845
|
+
MultiSelect,
|
|
1846
|
+
{
|
|
1847
|
+
...props,
|
|
1848
|
+
ref,
|
|
1849
|
+
values,
|
|
1850
|
+
onValuesChanged: (value) => {
|
|
1851
|
+
setValues(value);
|
|
1852
|
+
onValuesChanged?.(value);
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
);
|
|
1856
|
+
});
|
|
1857
|
+
var MultiSelectChipDisplay = forwardRef5(function MultiSelectChipDisplay2({
|
|
1858
|
+
children,
|
|
1859
|
+
contentPanelProps,
|
|
1860
|
+
chipDisplayProps,
|
|
1861
|
+
...props
|
|
1862
|
+
}, ref) {
|
|
1863
|
+
return /* @__PURE__ */ jsxs7(SelectRoot, { ...props, isMultiSelect: true, children: [
|
|
1864
|
+
/* @__PURE__ */ jsx11(SelectChipDisplay, { ref, ...chipDisplayProps }),
|
|
1865
|
+
/* @__PURE__ */ jsx11(SelectContent, { ...contentPanelProps, children })
|
|
1866
|
+
] });
|
|
1867
|
+
});
|
|
1868
|
+
var MultiSelectChipDisplayUncontrolled = forwardRef5(function MultiSelectChipDisplayUncontrolled2({
|
|
1869
|
+
values: initialValues,
|
|
1870
|
+
onValuesChanged,
|
|
1871
|
+
...props
|
|
1872
|
+
}, ref) {
|
|
1873
|
+
const [values, setValues] = useState10(initialValues);
|
|
1874
|
+
useEffect9(() => {
|
|
1875
|
+
setValues(initialValues);
|
|
1876
|
+
}, [initialValues]);
|
|
1877
|
+
return /* @__PURE__ */ jsx11(
|
|
1878
|
+
MultiSelectChipDisplay,
|
|
1879
|
+
{
|
|
1880
|
+
...props,
|
|
1881
|
+
ref,
|
|
1882
|
+
values,
|
|
1883
|
+
onValuesChanged: (value) => {
|
|
1884
|
+
setValues(value);
|
|
1885
|
+
onValuesChanged?.(value);
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
);
|
|
1889
|
+
});
|
|
1890
|
+
|
|
1891
|
+
// src/components/dialog/LanguageDialog.tsx
|
|
1892
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1893
|
+
var defaultLanguageDialogTranslation = {
|
|
1894
|
+
en: {
|
|
1895
|
+
language: "Language",
|
|
1896
|
+
chooseLanguage: "Choose your language",
|
|
1897
|
+
done: "Done",
|
|
1898
|
+
...LanguageUtil.languagesLocalNames
|
|
1899
|
+
},
|
|
1900
|
+
de: {
|
|
1901
|
+
language: "Sprache",
|
|
1902
|
+
chooseLanguage: "W\xE4hle deine bevorzugte Sprache",
|
|
1903
|
+
done: "Fertig",
|
|
1904
|
+
...LanguageUtil.languagesLocalNames
|
|
1905
|
+
}
|
|
1906
|
+
};
|
|
1907
|
+
var LanguageDialog = ({
|
|
1908
|
+
overwriteTranslation,
|
|
1909
|
+
onClose,
|
|
1910
|
+
titleOverwrite,
|
|
1911
|
+
descriptionOverwrite,
|
|
1912
|
+
...props
|
|
1913
|
+
}) => {
|
|
1914
|
+
const { language, setLanguage } = useLanguage();
|
|
1915
|
+
const translation = useTranslation([defaultLanguageDialogTranslation], overwriteTranslation);
|
|
1916
|
+
return /* @__PURE__ */ jsx12(
|
|
1917
|
+
Dialog,
|
|
1918
|
+
{
|
|
1919
|
+
titleElement: titleOverwrite ?? translation("language"),
|
|
1920
|
+
description: descriptionOverwrite ?? translation("chooseLanguage"),
|
|
1921
|
+
onClose,
|
|
1922
|
+
...props,
|
|
1923
|
+
children: /* @__PURE__ */ jsxs8("div", { className: "w-64", children: [
|
|
1924
|
+
/* @__PURE__ */ jsx12(
|
|
1925
|
+
Select,
|
|
1926
|
+
{
|
|
1927
|
+
value: language,
|
|
1928
|
+
onValueChanged: (language2) => setLanguage(language2),
|
|
1929
|
+
contentPanelProps: { className: "z-100" },
|
|
1930
|
+
buttonProps: {
|
|
1931
|
+
selectedDisplay: (value) => translation(value)
|
|
1932
|
+
},
|
|
1933
|
+
children: LanguageUtil.languages.map((language2) => /* @__PURE__ */ jsx12(SelectOption, { value: language2, children: translation(language2) }, language2))
|
|
1934
|
+
}
|
|
1935
|
+
),
|
|
1936
|
+
/* @__PURE__ */ jsx12("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx12(SolidButton, { color: "positive", onClick: onClose, children: translation("done") }) })
|
|
1937
|
+
] })
|
|
1938
|
+
}
|
|
1939
|
+
);
|
|
1940
|
+
};
|
|
1941
|
+
|
|
1942
|
+
// src/theming/useTheme.tsx
|
|
1943
|
+
import { useMemo } from "react";
|
|
1944
|
+
import { createContext as createContext3, useContext as useContext3, useEffect as useEffect10, useState as useState11 } from "react";
|
|
1945
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1946
|
+
var themes = ["light", "dark", "system"];
|
|
1947
|
+
var defaultThemeTypeTranslation = {
|
|
1948
|
+
en: {
|
|
1949
|
+
dark: "Dark",
|
|
1950
|
+
light: "Light",
|
|
1951
|
+
system: "System",
|
|
1952
|
+
theme: {
|
|
1953
|
+
one: "Theme",
|
|
1954
|
+
other: "Themes"
|
|
1955
|
+
}
|
|
1956
|
+
},
|
|
1957
|
+
de: {
|
|
1958
|
+
dark: "Dunkel",
|
|
1959
|
+
light: "Hell",
|
|
1960
|
+
system: "System",
|
|
1961
|
+
theme: {
|
|
1962
|
+
one: "Farbschema",
|
|
1963
|
+
other: "Farbschemas"
|
|
1964
|
+
}
|
|
1965
|
+
}
|
|
1966
|
+
};
|
|
1967
|
+
var ThemeUtil = {
|
|
1968
|
+
themes,
|
|
1969
|
+
translation: defaultThemeTypeTranslation
|
|
1970
|
+
};
|
|
1971
|
+
var ThemeContext = createContext3({
|
|
1972
|
+
theme: "light",
|
|
1973
|
+
setTheme: noop
|
|
1974
|
+
});
|
|
1975
|
+
var useTheme = () => useContext3(ThemeContext);
|
|
1976
|
+
|
|
1977
|
+
// src/components/dialog/ThemeDialog.tsx
|
|
1978
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1979
|
+
var defaultConfirmDialogTranslation = {
|
|
1980
|
+
en: {
|
|
1981
|
+
chooseTheme: "Choose your preferred theme"
|
|
1982
|
+
},
|
|
1983
|
+
de: {
|
|
1984
|
+
chooseTheme: "W\xE4hle dein bevorzugtes Farbschema"
|
|
1985
|
+
}
|
|
1986
|
+
};
|
|
1987
|
+
var ThemeDialog = ({
|
|
1988
|
+
overwriteTranslation,
|
|
1989
|
+
onClose,
|
|
1990
|
+
titleOverwrite,
|
|
1991
|
+
descriptionOverwrite,
|
|
1992
|
+
...props
|
|
1993
|
+
}) => {
|
|
1994
|
+
const { theme, setTheme } = useTheme();
|
|
1995
|
+
const translation = useTranslation([defaultConfirmDialogTranslation, formTranslation, ThemeUtil.translation], overwriteTranslation);
|
|
1996
|
+
return /* @__PURE__ */ jsx14(
|
|
1997
|
+
Dialog,
|
|
1998
|
+
{
|
|
1999
|
+
titleElement: titleOverwrite ?? translation("theme"),
|
|
2000
|
+
description: descriptionOverwrite ?? translation("chooseTheme"),
|
|
2001
|
+
onClose,
|
|
2002
|
+
...props,
|
|
2003
|
+
children: /* @__PURE__ */ jsxs9("div", { className: "w-64", children: [
|
|
2004
|
+
/* @__PURE__ */ jsx14(
|
|
2005
|
+
Select,
|
|
2006
|
+
{
|
|
2007
|
+
value: theme,
|
|
2008
|
+
onValueChanged: (theme2) => setTheme(theme2),
|
|
2009
|
+
contentPanelProps: {
|
|
2010
|
+
className: "z-100"
|
|
2011
|
+
},
|
|
2012
|
+
buttonProps: {
|
|
2013
|
+
selectedDisplay: (value) => translation(value)
|
|
2014
|
+
},
|
|
2015
|
+
children: ThemeUtil.themes.map((theme2) => /* @__PURE__ */ jsx14(SelectOption, { value: theme2, children: translation(theme2) }, theme2))
|
|
2016
|
+
}
|
|
2017
|
+
),
|
|
2018
|
+
/* @__PURE__ */ jsx14("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx14(SolidButton, { autoFocus: true, color: "positive", onClick: onClose, children: translation("done") }) })
|
|
2019
|
+
] })
|
|
2020
|
+
}
|
|
2021
|
+
);
|
|
2022
|
+
};
|
|
2023
|
+
export {
|
|
2024
|
+
ConfirmDialog,
|
|
2025
|
+
Dialog,
|
|
2026
|
+
DiscardChangesDialog,
|
|
2027
|
+
InputDialog,
|
|
2028
|
+
LanguageDialog,
|
|
2029
|
+
ThemeDialog
|
|
2030
|
+
};
|
|
2031
|
+
//# sourceMappingURL=index.mjs.map
|