@helpwave/hightide 0.1.25 → 0.1.27
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 +65 -14
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +66 -15
- 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 +59 -8
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +60 -9
- 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 +1697 -0
- package/dist/components/dialog/LanguageDialog.js.map +1 -0
- package/dist/components/dialog/LanguageDialog.mjs +1671 -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 +1751 -0
- package/dist/components/dialog/ThemeDialog.js.map +1 -0
- package/dist/components/dialog/ThemeDialog.mjs +1725 -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 +2098 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/dialog/index.mjs +2067 -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/Carousel.d.mts +33 -0
- package/dist/components/layout/Carousel.d.ts +33 -0
- package/dist/components/layout/Carousel.js +684 -0
- package/dist/components/layout/Carousel.js.map +1 -0
- package/dist/components/layout/Carousel.mjs +659 -0
- package/dist/components/layout/Carousel.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/Chip.d.mts +8 -5
- package/dist/components/{layout-and-navigation → layout}/Chip.d.ts +8 -5
- package/dist/components/{layout-and-navigation → layout}/Chip.js +18 -5
- package/dist/components/layout/Chip.js.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/Chip.mjs +18 -5
- package/dist/components/layout/Chip.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/DividerInserter.js +1 -1
- package/dist/components/layout/DividerInserter.js.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/DividerInserter.mjs +1 -1
- package/dist/components/layout/DividerInserter.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/Expandable.d.mts +13 -10
- package/dist/components/{layout-and-navigation → layout}/Expandable.d.ts +13 -10
- package/dist/components/{layout-and-navigation → layout}/Expandable.js +20 -7
- package/dist/components/layout/Expandable.js.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/Expandable.mjs +21 -8
- package/dist/components/layout/Expandable.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/FAQSection.js +26 -13
- package/dist/components/layout/FAQSection.js.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/FAQSection.mjs +27 -14
- package/dist/components/layout/FAQSection.mjs.map +1 -0
- package/dist/components/layout/FloatingContainer.d.mts +38 -0
- package/dist/components/layout/FloatingContainer.d.ts +38 -0
- package/dist/components/layout/FloatingContainer.js +219 -0
- package/dist/components/layout/FloatingContainer.js.map +1 -0
- package/dist/components/layout/FloatingContainer.mjs +195 -0
- package/dist/components/layout/FloatingContainer.mjs.map +1 -0
- package/dist/components/layout/ListBox.d.mts +44 -0
- package/dist/components/layout/ListBox.d.ts +44 -0
- package/dist/components/layout/ListBox.js +329 -0
- package/dist/components/layout/ListBox.js.map +1 -0
- package/dist/components/layout/ListBox.mjs +290 -0
- package/dist/components/layout/ListBox.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.js +1 -1
- package/dist/components/layout/MarkdownInterpreter.js.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.mjs +1 -1
- package/dist/components/layout/MarkdownInterpreter.mjs.map +1 -0
- package/dist/components/layout/ScrollArea.d.mts +15 -0
- package/dist/components/layout/ScrollArea.d.ts +15 -0
- package/dist/components/layout/ScrollArea.js +1252 -0
- package/dist/components/layout/ScrollArea.js.map +1 -0
- package/dist/components/layout/ScrollArea.mjs +1216 -0
- package/dist/components/layout/ScrollArea.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/TextImage.js +6 -4
- package/dist/components/layout/TextImage.js.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/TextImage.mjs +5 -3
- package/dist/components/layout/TextImage.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/VerticalDivider.js +1 -1
- package/dist/components/layout/VerticalDivider.js.map +1 -0
- package/dist/components/{layout-and-navigation → layout}/VerticalDivider.mjs +1 -1
- package/dist/components/layout/VerticalDivider.mjs.map +1 -0
- 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/{layout-and-navigation → navigation}/BreadCrumb.js +668 -23
- package/dist/components/navigation/BreadCrumb.js.map +1 -0
- package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.mjs +668 -23
- package/dist/components/navigation/BreadCrumb.mjs.map +1 -0
- package/dist/components/navigation/Navigation.d.mts +21 -0
- package/dist/components/navigation/Navigation.d.ts +21 -0
- package/dist/components/navigation/Navigation.js +4018 -0
- package/dist/components/navigation/Navigation.js.map +1 -0
- package/dist/components/navigation/Navigation.mjs +4012 -0
- package/dist/components/navigation/Navigation.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → navigation}/Pagination.js +107 -192
- package/dist/components/navigation/Pagination.js.map +1 -0
- package/dist/components/{layout-and-navigation → navigation}/Pagination.mjs +102 -187
- package/dist/components/navigation/Pagination.mjs.map +1 -0
- package/dist/components/{layout-and-navigation → navigation}/StepperBar.js +44 -4
- package/dist/components/navigation/StepperBar.js.map +1 -0
- package/dist/components/{layout-and-navigation → navigation}/StepperBar.mjs +44 -4
- package/dist/components/navigation/StepperBar.mjs.map +1 -0
- 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 +1156 -1160
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +1169 -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 +1062 -836
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +1077 -841
- 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 +1619 -994
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +1626 -1001
- 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 +67 -14
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +68 -15
- 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 +102 -0
- package/dist/components/user-action/select/Select.d.ts +102 -0
- package/dist/components/user-action/select/Select.js +1367 -0
- package/dist/components/user-action/select/Select.js.map +1 -0
- package/dist/components/user-action/select/Select.mjs +1333 -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 +836 -378
- package/dist/{css → style}/uncompiled/globals.css +80 -17
- 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 +9 -1
- package/dist/style/uncompiled/utitlity/sizing.css +29 -0
- package/dist/theming/useTheme.d.mts +5 -3
- package/dist/theming/useTheme.d.ts +5 -3
- package/dist/theming/useTheme.js +42 -19
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +40 -17
- 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/BreadCrumb.js.map +0 -1
- package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +0 -1
- package/dist/components/layout-and-navigation/Carousel.d.mts +0 -25
- package/dist/components/layout-and-navigation/Carousel.d.ts +0 -25
- package/dist/components/layout-and-navigation/Carousel.js +0 -641
- package/dist/components/layout-and-navigation/Carousel.js.map +0 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +0 -607
- package/dist/components/layout-and-navigation/Carousel.mjs.map +0 -1
- package/dist/components/layout-and-navigation/Chip.js.map +0 -1
- package/dist/components/layout-and-navigation/Chip.mjs.map +0 -1
- package/dist/components/layout-and-navigation/DividerInserter.js.map +0 -1
- package/dist/components/layout-and-navigation/DividerInserter.mjs.map +0 -1
- package/dist/components/layout-and-navigation/Expandable.js.map +0 -1
- package/dist/components/layout-and-navigation/Expandable.mjs.map +0 -1
- package/dist/components/layout-and-navigation/FAQSection.js.map +0 -1
- package/dist/components/layout-and-navigation/FAQSection.mjs.map +0 -1
- package/dist/components/layout-and-navigation/MarkdownInterpreter.js.map +0 -1
- package/dist/components/layout-and-navigation/MarkdownInterpreter.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/Pagination.js.map +0 -1
- package/dist/components/layout-and-navigation/Pagination.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/StepperBar.js.map +0 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +0 -1
- package/dist/components/layout-and-navigation/TextImage.js.map +0 -1
- package/dist/components/layout-and-navigation/TextImage.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/layout-and-navigation/VerticalDivider.js.map +0 -1
- package/dist/components/layout-and-navigation/VerticalDivider.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/components/{layout-and-navigation → layout}/DividerInserter.d.mts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/DividerInserter.d.ts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/FAQSection.d.mts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/FAQSection.d.ts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.d.mts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/MarkdownInterpreter.d.ts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/TextImage.d.mts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/TextImage.d.ts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/VerticalDivider.d.mts +0 -0
- /package/dist/components/{layout-and-navigation → layout}/VerticalDivider.d.ts +0 -0
- /package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.d.mts +0 -0
- /package/dist/components/{layout-and-navigation → navigation}/BreadCrumb.d.ts +0 -0
- /package/dist/components/{layout-and-navigation → navigation}/Pagination.d.mts +0 -0
- /package/dist/components/{layout-and-navigation → navigation}/Pagination.d.ts +0 -0
- /package/dist/components/{layout-and-navigation → navigation}/StepperBar.d.mts +0 -0
- /package/dist/components/{layout-and-navigation → navigation}/StepperBar.d.ts +0 -0
- /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
|
@@ -1,1236 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/components/user-action/Select.tsx
|
|
30
|
-
var Select_exports = {};
|
|
31
|
-
__export(Select_exports, {
|
|
32
|
-
Select: () => Select,
|
|
33
|
-
SelectUncontrolled: () => SelectUncontrolled
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(Select_exports);
|
|
36
|
-
var import_react13 = require("react");
|
|
37
|
-
var import_react14 = require("react");
|
|
38
|
-
var import_clsx8 = __toESM(require("clsx"));
|
|
39
|
-
|
|
40
|
-
// src/components/user-action/Label.tsx
|
|
41
|
-
var import_clsx = __toESM(require("clsx"));
|
|
42
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
43
|
-
var styleMapping = {
|
|
44
|
-
labelSmall: "textstyle-label-sm",
|
|
45
|
-
labelMedium: "textstyle-label-md",
|
|
46
|
-
labelBig: "textstyle-label-lg"
|
|
47
|
-
};
|
|
48
|
-
var Label = ({
|
|
49
|
-
children,
|
|
50
|
-
name,
|
|
51
|
-
labelType = "labelSmall",
|
|
52
|
-
className,
|
|
53
|
-
...props
|
|
54
|
-
}) => {
|
|
55
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { ...props, className: (0, import_clsx.default)(styleMapping[labelType], className), children: children ? children : name });
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
// src/components/layout-and-navigation/Tile.tsx
|
|
59
|
-
var import_clsx2 = __toESM(require("clsx"));
|
|
60
|
-
var import_lucide_react = require("lucide-react");
|
|
61
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
62
|
-
var Tile = ({
|
|
63
|
-
title,
|
|
64
|
-
titleClassName,
|
|
65
|
-
description,
|
|
66
|
-
descriptionClassName,
|
|
67
|
-
onClick,
|
|
68
|
-
isSelected = false,
|
|
69
|
-
disabled = false,
|
|
70
|
-
prefix,
|
|
71
|
-
suffix,
|
|
72
|
-
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
73
|
-
selectedClassName = "bg-primary/20",
|
|
74
|
-
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
75
|
-
className
|
|
76
|
-
}) => {
|
|
77
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
78
|
-
"div",
|
|
79
|
-
{
|
|
80
|
-
className: (0, import_clsx2.default)(
|
|
81
|
-
"flex-row-2 w-full items-center",
|
|
82
|
-
{
|
|
83
|
-
[normalClassName]: onClick && !disabled,
|
|
84
|
-
[selectedClassName]: isSelected && !disabled,
|
|
85
|
-
[disabledClassName]: disabled
|
|
86
|
-
},
|
|
87
|
-
className
|
|
88
|
-
),
|
|
89
|
-
onClick: disabled ? void 0 : onClick,
|
|
90
|
-
children: [
|
|
91
|
-
prefix,
|
|
92
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: "flex-col-0 w-full", children: [
|
|
93
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: (0, import_clsx2.default)(titleClassName ?? "textstyle-title-normal"), children: title }),
|
|
94
|
-
!!description && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: (0, import_clsx2.default)(descriptionClassName ?? "textstyle-description"), children: description })
|
|
95
|
-
] }),
|
|
96
|
-
suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Check, { size: 24 }) : void 0)
|
|
97
|
-
]
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
var ListTile = ({
|
|
102
|
-
...props
|
|
103
|
-
}) => {
|
|
104
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
105
|
-
Tile,
|
|
106
|
-
{
|
|
107
|
-
...props,
|
|
108
|
-
titleClassName: props.titleClassName ?? "font-semibold",
|
|
109
|
-
className: (0, import_clsx2.default)("px-2 py-1 rounded-md", props.className),
|
|
110
|
-
disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
|
|
111
|
-
}
|
|
112
|
-
);
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
// src/components/layout-and-navigation/Expandable.tsx
|
|
116
|
-
var import_react = require("react");
|
|
117
|
-
var import_lucide_react2 = require("lucide-react");
|
|
118
|
-
var import_clsx3 = __toESM(require("clsx"));
|
|
119
|
-
|
|
120
|
-
// src/util/noop.ts
|
|
121
|
-
var noop = () => void 0;
|
|
122
|
-
|
|
123
|
-
// src/components/layout-and-navigation/Expandable.tsx
|
|
124
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
125
|
-
var ExpansionIcon = ({ isExpanded, className }) => {
|
|
126
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
127
|
-
import_lucide_react2.ChevronDown,
|
|
128
|
-
{
|
|
129
|
-
className: (0, import_clsx3.default)(
|
|
130
|
-
"min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
|
|
131
|
-
{ "rotate-180": isExpanded },
|
|
132
|
-
className
|
|
133
|
-
)
|
|
134
|
-
}
|
|
135
|
-
);
|
|
136
|
-
};
|
|
137
|
-
var Expandable = (0, import_react.forwardRef)(function Expandable2({
|
|
138
|
-
children,
|
|
139
|
-
label,
|
|
140
|
-
icon,
|
|
141
|
-
isExpanded = false,
|
|
142
|
-
onChange = noop,
|
|
143
|
-
clickOnlyOnHeader = true,
|
|
144
|
-
disabled = false,
|
|
145
|
-
className,
|
|
146
|
-
headerClassName,
|
|
147
|
-
contentClassName,
|
|
148
|
-
contentExpandedClassName
|
|
149
|
-
}, ref) {
|
|
150
|
-
const defaultIcon = (0, import_react.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
|
|
151
|
-
icon ??= defaultIcon;
|
|
152
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
153
|
-
"div",
|
|
154
|
-
{
|
|
155
|
-
ref,
|
|
156
|
-
className: (0, import_clsx3.default)("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
|
|
157
|
-
onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
158
|
-
children: [
|
|
159
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
160
|
-
"div",
|
|
161
|
-
{
|
|
162
|
-
className: (0, import_clsx3.default)(
|
|
163
|
-
"flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
|
|
164
|
-
{
|
|
165
|
-
"group-hover:brightness-97": !isExpanded,
|
|
166
|
-
"hover:brightness-97": isExpanded && !disabled,
|
|
167
|
-
"cursor-pointer": clickOnlyOnHeader && !disabled
|
|
168
|
-
},
|
|
169
|
-
headerClassName
|
|
170
|
-
),
|
|
171
|
-
onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
172
|
-
children: [
|
|
173
|
-
label,
|
|
174
|
-
icon(isExpanded)
|
|
175
|
-
]
|
|
176
|
-
}
|
|
177
|
-
),
|
|
178
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
179
|
-
"div",
|
|
180
|
-
{
|
|
181
|
-
className: (0, import_clsx3.default)(
|
|
182
|
-
"flex-col-2 px-4 transition-all duration-300 ease-in-out",
|
|
183
|
-
{
|
|
184
|
-
[(0, import_clsx3.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
|
|
185
|
-
"max-h-0 opacity-0 overflow-hidden": !isExpanded
|
|
186
|
-
},
|
|
187
|
-
contentClassName
|
|
188
|
-
),
|
|
189
|
-
children
|
|
190
|
-
}
|
|
191
|
-
)
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
);
|
|
195
|
-
});
|
|
196
|
-
var ExpandableUncontrolled = (0, import_react.forwardRef)(function ExpandableUncontrolled2({
|
|
197
|
-
isExpanded,
|
|
198
|
-
onChange = noop,
|
|
199
|
-
...props
|
|
200
|
-
}, ref) {
|
|
201
|
-
const [usedIsExpanded, setUsedIsExpanded] = (0, import_react.useState)(isExpanded);
|
|
202
|
-
(0, import_react.useEffect)(() => {
|
|
203
|
-
setUsedIsExpanded(isExpanded);
|
|
204
|
-
}, [isExpanded]);
|
|
205
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
206
|
-
Expandable,
|
|
207
|
-
{
|
|
208
|
-
...props,
|
|
209
|
-
ref,
|
|
210
|
-
isExpanded: usedIsExpanded,
|
|
211
|
-
onChange: (value) => {
|
|
212
|
-
onChange(value);
|
|
213
|
-
setUsedIsExpanded(value);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
);
|
|
217
|
-
});
|
|
218
|
-
|
|
219
|
-
// src/components/user-action/Menu.tsx
|
|
220
|
-
var import_react4 = require("react");
|
|
221
|
-
var import_clsx4 = __toESM(require("clsx"));
|
|
222
|
-
|
|
223
|
-
// src/hooks/useOutsideClick.ts
|
|
224
|
-
var import_react2 = require("react");
|
|
225
|
-
var useOutsideClick = (refs, handler) => {
|
|
226
|
-
(0, import_react2.useEffect)(() => {
|
|
227
|
-
const listener = (event) => {
|
|
228
|
-
if (event.target === null) return;
|
|
229
|
-
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
230
|
-
return;
|
|
231
|
-
}
|
|
232
|
-
handler();
|
|
233
|
-
};
|
|
234
|
-
document.addEventListener("mousedown", listener);
|
|
235
|
-
document.addEventListener("touchstart", listener);
|
|
236
|
-
return () => {
|
|
237
|
-
document.removeEventListener("mousedown", listener);
|
|
238
|
-
document.removeEventListener("touchstart", listener);
|
|
239
|
-
};
|
|
240
|
-
}, [refs, handler]);
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
// src/hooks/useHoverState.ts
|
|
244
|
-
var import_react3 = require("react");
|
|
245
|
-
var defaultUseHoverStateProps = {
|
|
246
|
-
closingDelay: 200,
|
|
247
|
-
isDisabled: false
|
|
248
|
-
};
|
|
249
|
-
var useHoverState = (props = void 0) => {
|
|
250
|
-
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
251
|
-
const [isHovered, setIsHovered] = (0, import_react3.useState)(false);
|
|
252
|
-
const [timer, setTimer] = (0, import_react3.useState)();
|
|
253
|
-
const onMouseEnter = () => {
|
|
254
|
-
if (isDisabled) {
|
|
255
|
-
return;
|
|
256
|
-
}
|
|
257
|
-
clearTimeout(timer);
|
|
258
|
-
setIsHovered(true);
|
|
259
|
-
};
|
|
260
|
-
const onMouseLeave = () => {
|
|
261
|
-
if (isDisabled) {
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
264
|
-
setTimer(setTimeout(() => {
|
|
265
|
-
setIsHovered(false);
|
|
266
|
-
}, closingDelay));
|
|
267
|
-
};
|
|
268
|
-
(0, import_react3.useEffect)(() => {
|
|
269
|
-
if (timer) {
|
|
270
|
-
return () => {
|
|
271
|
-
clearTimeout(timer);
|
|
272
|
-
};
|
|
273
|
-
}
|
|
274
|
-
});
|
|
275
|
-
(0, import_react3.useEffect)(() => {
|
|
276
|
-
if (timer) {
|
|
277
|
-
clearTimeout(timer);
|
|
278
|
-
}
|
|
279
|
-
}, [isDisabled]);
|
|
280
|
-
return {
|
|
281
|
-
isHovered,
|
|
282
|
-
setIsHovered,
|
|
283
|
-
handlers: { onMouseEnter, onMouseLeave }
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
// src/util/PropsWithFunctionChildren.ts
|
|
288
|
-
var resolve = (children, bag) => {
|
|
289
|
-
if (typeof children === "function") {
|
|
290
|
-
return children(bag);
|
|
291
|
-
}
|
|
292
|
-
return children ?? void 0;
|
|
293
|
-
};
|
|
294
|
-
var BagFunctionUtil = {
|
|
295
|
-
resolve
|
|
296
|
-
};
|
|
297
|
-
|
|
298
|
-
// src/hooks/usePopoverPosition.ts
|
|
299
|
-
var defaultPopoverPositionOptions = {
|
|
300
|
-
edgePadding: 16,
|
|
301
|
-
outerGap: 4,
|
|
302
|
-
horizontalAlignment: "leftInside",
|
|
303
|
-
verticalAlignment: "bottomOutside",
|
|
304
|
-
disabled: false
|
|
305
|
-
};
|
|
306
|
-
var usePopoverPosition = (trigger, options) => {
|
|
307
|
-
const {
|
|
308
|
-
edgePadding,
|
|
309
|
-
outerGap,
|
|
310
|
-
verticalAlignment,
|
|
311
|
-
horizontalAlignment,
|
|
312
|
-
disabled
|
|
313
|
-
} = { ...defaultPopoverPositionOptions, ...options };
|
|
314
|
-
if (disabled || !trigger) {
|
|
315
|
-
return {};
|
|
316
|
-
}
|
|
317
|
-
const left = {
|
|
318
|
-
leftOutside: trigger.left - outerGap,
|
|
319
|
-
leftInside: trigger.left,
|
|
320
|
-
rightOutside: trigger.right + outerGap,
|
|
321
|
-
rightInside: trigger.right,
|
|
322
|
-
center: trigger.left + trigger.width / 2
|
|
323
|
-
}[horizontalAlignment];
|
|
324
|
-
const top = {
|
|
325
|
-
topOutside: trigger.top - outerGap,
|
|
326
|
-
topInside: trigger.top,
|
|
327
|
-
bottomOutside: trigger.bottom + outerGap,
|
|
328
|
-
bottomInside: trigger.bottom,
|
|
329
|
-
center: trigger.top + trigger.height / 2
|
|
330
|
-
}[verticalAlignment];
|
|
331
|
-
const translateX = {
|
|
332
|
-
leftOutside: "-100%",
|
|
333
|
-
leftInside: void 0,
|
|
334
|
-
rightOutside: void 0,
|
|
335
|
-
rightInside: "-100%",
|
|
336
|
-
center: "-50%"
|
|
337
|
-
}[horizontalAlignment];
|
|
338
|
-
const translateY = {
|
|
339
|
-
topOutside: "-100%",
|
|
340
|
-
topInside: void 0,
|
|
341
|
-
bottomOutside: void 0,
|
|
342
|
-
bottomInside: "-100%",
|
|
343
|
-
center: "-50%"
|
|
344
|
-
}[verticalAlignment];
|
|
345
|
-
return {
|
|
346
|
-
left: Math.max(left, edgePadding),
|
|
347
|
-
top: Math.max(top, edgePadding),
|
|
348
|
-
translate: [translateX ?? "0", translateY ?? "0"].join(" ")
|
|
349
|
-
};
|
|
350
|
-
};
|
|
351
|
-
|
|
352
|
-
// src/components/user-action/Menu.tsx
|
|
353
|
-
var import_react_dom = require("react-dom");
|
|
354
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
355
|
-
function getScrollableParents(element) {
|
|
356
|
-
const scrollables = [];
|
|
357
|
-
let parent = element.parentElement;
|
|
358
|
-
while (parent) {
|
|
359
|
-
scrollables.push(parent);
|
|
360
|
-
parent = parent.parentElement;
|
|
361
|
-
}
|
|
362
|
-
return scrollables;
|
|
363
|
-
}
|
|
364
|
-
var Menu = ({
|
|
365
|
-
trigger,
|
|
366
|
-
children,
|
|
367
|
-
alignmentHorizontal = "leftInside",
|
|
368
|
-
alignmentVertical = "bottomOutside",
|
|
369
|
-
showOnHover = false,
|
|
370
|
-
disabled = false,
|
|
371
|
-
menuClassName = ""
|
|
372
|
-
}) => {
|
|
373
|
-
const { isHovered: isOpen, setIsHovered: setIsOpen } = useHoverState({ isDisabled: !showOnHover || disabled });
|
|
374
|
-
const triggerRef = (0, import_react4.useRef)(null);
|
|
375
|
-
const menuRef = (0, import_react4.useRef)(null);
|
|
376
|
-
useOutsideClick([triggerRef, menuRef], () => setIsOpen(false));
|
|
377
|
-
const [isHidden, setIsHidden] = (0, import_react4.useState)(true);
|
|
378
|
-
const bag = {
|
|
379
|
-
isOpen,
|
|
380
|
-
close: () => setIsOpen(false),
|
|
381
|
-
toggleOpen: () => setIsOpen((prevState) => !prevState),
|
|
382
|
-
disabled
|
|
383
|
-
};
|
|
384
|
-
const menuPosition = usePopoverPosition(
|
|
385
|
-
triggerRef.current?.getBoundingClientRect(),
|
|
386
|
-
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
387
|
-
);
|
|
388
|
-
(0, import_react4.useEffect)(() => {
|
|
389
|
-
if (!isOpen) return;
|
|
390
|
-
const triggerEl = triggerRef.current;
|
|
391
|
-
if (!triggerEl) return;
|
|
392
|
-
const scrollableParents = getScrollableParents(triggerEl);
|
|
393
|
-
const close = () => setIsOpen(false);
|
|
394
|
-
scrollableParents.forEach((parent) => {
|
|
395
|
-
parent.addEventListener("scroll", close);
|
|
396
|
-
});
|
|
397
|
-
window.addEventListener("resize", close);
|
|
398
|
-
return () => {
|
|
399
|
-
scrollableParents.forEach((parent) => {
|
|
400
|
-
parent.removeEventListener("scroll", close);
|
|
401
|
-
});
|
|
402
|
-
window.removeEventListener("resize", close);
|
|
403
|
-
};
|
|
404
|
-
}, [isOpen, setIsOpen]);
|
|
405
|
-
(0, import_react4.useEffect)(() => {
|
|
406
|
-
if (isOpen) {
|
|
407
|
-
setIsHidden(false);
|
|
408
|
-
}
|
|
409
|
-
}, [isOpen]);
|
|
410
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
411
|
-
trigger(bag, triggerRef),
|
|
412
|
-
(0, import_react_dom.createPortal)(/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
413
|
-
"div",
|
|
414
|
-
{
|
|
415
|
-
ref: menuRef,
|
|
416
|
-
onClick: (e) => e.stopPropagation(),
|
|
417
|
-
className: (0, import_clsx4.default)(
|
|
418
|
-
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
|
|
419
|
-
{
|
|
420
|
-
"animate-pop-in": isOpen,
|
|
421
|
-
"animate-pop-out": !isOpen,
|
|
422
|
-
"hidden": isHidden
|
|
423
|
-
},
|
|
424
|
-
menuClassName
|
|
425
|
-
),
|
|
426
|
-
onAnimationEnd: () => {
|
|
427
|
-
if (!isOpen) {
|
|
428
|
-
setIsHidden(true);
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
|
-
style: {
|
|
432
|
-
...menuPosition
|
|
433
|
-
},
|
|
434
|
-
children: BagFunctionUtil.resolve(children, bag)
|
|
435
|
-
}
|
|
436
|
-
), document.body)
|
|
437
|
-
] });
|
|
438
|
-
};
|
|
439
|
-
|
|
440
|
-
// src/components/user-action/Input.tsx
|
|
441
|
-
var import_react8 = require("react");
|
|
442
|
-
var import_clsx5 = __toESM(require("clsx"));
|
|
443
|
-
|
|
444
|
-
// src/hooks/useDelay.ts
|
|
445
|
-
var import_react5 = require("react");
|
|
446
|
-
var defaultOptions = {
|
|
447
|
-
delay: 3e3,
|
|
448
|
-
disabled: false
|
|
449
|
-
};
|
|
450
|
-
function useDelay(options) {
|
|
451
|
-
const [timer, setTimer] = (0, import_react5.useState)(void 0);
|
|
452
|
-
const { delay, disabled } = {
|
|
453
|
-
...defaultOptions,
|
|
454
|
-
...options
|
|
455
|
-
};
|
|
456
|
-
const clearTimer = () => {
|
|
457
|
-
clearTimeout(timer);
|
|
458
|
-
setTimer(void 0);
|
|
459
|
-
};
|
|
460
|
-
const restartTimer = (onDelayFinish) => {
|
|
461
|
-
if (disabled) {
|
|
462
|
-
return;
|
|
463
|
-
}
|
|
464
|
-
clearTimeout(timer);
|
|
465
|
-
setTimer(setTimeout(() => {
|
|
466
|
-
onDelayFinish();
|
|
467
|
-
setTimer(void 0);
|
|
468
|
-
}, delay));
|
|
469
|
-
};
|
|
470
|
-
(0, import_react5.useEffect)(() => {
|
|
471
|
-
return () => {
|
|
472
|
-
clearTimeout(timer);
|
|
473
|
-
};
|
|
474
|
-
}, [timer]);
|
|
475
|
-
(0, import_react5.useEffect)(() => {
|
|
476
|
-
if (disabled) {
|
|
477
|
-
clearTimeout(timer);
|
|
478
|
-
setTimer(void 0);
|
|
479
|
-
}
|
|
480
|
-
}, [disabled, timer]);
|
|
481
|
-
return { restartTimer, clearTimer, hasActiveTimer: !!timer };
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
// src/hooks/useFocusManagement.ts
|
|
485
|
-
var import_react6 = require("react");
|
|
486
|
-
function useFocusManagement() {
|
|
487
|
-
const getFocusableElements = (0, import_react6.useCallback)(() => {
|
|
488
|
-
return Array.from(
|
|
489
|
-
document.querySelectorAll(
|
|
490
|
-
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
491
|
-
)
|
|
492
|
-
).filter(
|
|
493
|
-
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
494
|
-
);
|
|
495
|
-
}, []);
|
|
496
|
-
const getNextFocusElement = (0, import_react6.useCallback)(() => {
|
|
497
|
-
const elements = getFocusableElements();
|
|
498
|
-
if (elements.length === 0) {
|
|
499
|
-
return void 0;
|
|
500
|
-
}
|
|
501
|
-
let nextElement = elements[0];
|
|
502
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
503
|
-
const currentIndex = elements.indexOf(document.activeElement);
|
|
504
|
-
nextElement = elements[(currentIndex + 1) % elements.length];
|
|
505
|
-
}
|
|
506
|
-
return nextElement;
|
|
507
|
-
}, [getFocusableElements]);
|
|
508
|
-
const focusNext = (0, import_react6.useCallback)(() => {
|
|
509
|
-
const nextElement = getNextFocusElement();
|
|
510
|
-
nextElement?.focus();
|
|
511
|
-
}, [getNextFocusElement]);
|
|
512
|
-
const getPreviousFocusElement = (0, import_react6.useCallback)(() => {
|
|
513
|
-
const elements = getFocusableElements();
|
|
514
|
-
if (elements.length === 0) {
|
|
515
|
-
return void 0;
|
|
516
|
-
}
|
|
517
|
-
let previousElement = elements[0];
|
|
518
|
-
if (document.activeElement instanceof HTMLElement) {
|
|
519
|
-
const currentIndex = elements.indexOf(document.activeElement);
|
|
520
|
-
if (currentIndex === 0) {
|
|
521
|
-
previousElement = elements[elements.length - 1];
|
|
522
|
-
} else {
|
|
523
|
-
previousElement = elements[currentIndex - 1];
|
|
524
|
-
}
|
|
525
|
-
}
|
|
526
|
-
return previousElement;
|
|
527
|
-
}, [getFocusableElements]);
|
|
528
|
-
const focusPrevious = (0, import_react6.useCallback)(() => {
|
|
529
|
-
const previousElement = getPreviousFocusElement();
|
|
530
|
-
if (previousElement) previousElement.focus();
|
|
531
|
-
}, [getPreviousFocusElement]);
|
|
532
|
-
return {
|
|
533
|
-
getFocusableElements,
|
|
534
|
-
getNextFocusElement,
|
|
535
|
-
getPreviousFocusElement,
|
|
536
|
-
focusNext,
|
|
537
|
-
focusPrevious
|
|
538
|
-
};
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
// src/hooks/useFocusOnceVisible.ts
|
|
542
|
-
var import_react7 = __toESM(require("react"));
|
|
543
|
-
var useFocusOnceVisible = (ref, disable = false) => {
|
|
544
|
-
const [hasUsedFocus, setHasUsedFocus] = import_react7.default.useState(false);
|
|
545
|
-
(0, import_react7.useEffect)(() => {
|
|
546
|
-
if (disable || hasUsedFocus) {
|
|
547
|
-
return;
|
|
548
|
-
}
|
|
549
|
-
const observer = new IntersectionObserver(([entry]) => {
|
|
550
|
-
if (entry.isIntersecting && !hasUsedFocus) {
|
|
551
|
-
ref.current?.focus();
|
|
552
|
-
setHasUsedFocus(hasUsedFocus);
|
|
553
|
-
}
|
|
554
|
-
}, {
|
|
555
|
-
threshold: 0.1
|
|
556
|
-
});
|
|
557
|
-
if (ref.current) {
|
|
558
|
-
observer.observe(ref.current);
|
|
559
|
-
}
|
|
560
|
-
return () => observer.disconnect();
|
|
561
|
-
}, [disable, hasUsedFocus, ref]);
|
|
562
|
-
};
|
|
563
|
-
|
|
564
|
-
// src/components/user-action/Input.tsx
|
|
565
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
566
|
-
var getInputClassName = ({ disabled = false, hasError = false }) => {
|
|
567
|
-
return (0, import_clsx5.default)(
|
|
568
|
-
"px-2 py-1.5 rounded-md border-2",
|
|
569
|
-
{
|
|
570
|
-
"bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
|
|
571
|
-
"bg-on-negative text-negative border-negative-border hover:border-negative-border-hover": !disabled && hasError,
|
|
572
|
-
"bg-disabled-background text-disabled-text border-disabled-border": disabled
|
|
573
|
-
}
|
|
574
|
-
);
|
|
575
|
-
};
|
|
576
|
-
var defaultEditCompleteOptions = {
|
|
577
|
-
onBlur: true,
|
|
578
|
-
afterDelay: true,
|
|
579
|
-
delay: 2500
|
|
580
|
-
};
|
|
581
|
-
var Input = (0, import_react8.forwardRef)(function Input2({
|
|
582
|
-
id,
|
|
583
|
-
type = "text",
|
|
584
|
-
value,
|
|
585
|
-
label,
|
|
586
|
-
onChange = noop,
|
|
587
|
-
onChangeText = noop,
|
|
588
|
-
onEditCompleted,
|
|
589
|
-
className = "",
|
|
590
|
-
allowEnterComplete = true,
|
|
591
|
-
expanded = true,
|
|
592
|
-
autoFocus = false,
|
|
593
|
-
onBlur,
|
|
594
|
-
editCompleteOptions,
|
|
595
|
-
containerClassName,
|
|
596
|
-
disabled,
|
|
597
|
-
...restProps
|
|
598
|
-
}, forwardedRef) {
|
|
599
|
-
const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
|
|
600
|
-
const {
|
|
601
|
-
restartTimer,
|
|
602
|
-
clearTimer
|
|
603
|
-
} = useDelay({ delay, disabled: !afterDelay });
|
|
604
|
-
const innerRef = (0, import_react8.useRef)(null);
|
|
605
|
-
const { focusNext } = useFocusManagement();
|
|
606
|
-
useFocusOnceVisible(innerRef, !autoFocus);
|
|
607
|
-
(0, import_react8.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
608
|
-
const handleKeyDown = (e) => {
|
|
609
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
610
|
-
e.preventDefault();
|
|
611
|
-
innerRef.current?.blur();
|
|
612
|
-
focusNext();
|
|
613
|
-
}
|
|
614
|
-
};
|
|
615
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx5.default)({ "w-full": expanded }, containerClassName), children: [
|
|
616
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx5.default)("mb-1", label.className) }),
|
|
617
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
618
|
-
"input",
|
|
619
|
-
{
|
|
620
|
-
...restProps,
|
|
621
|
-
ref: innerRef,
|
|
622
|
-
value,
|
|
623
|
-
id,
|
|
624
|
-
type,
|
|
625
|
-
disabled,
|
|
626
|
-
className: (0, import_clsx5.default)(getInputClassName({ disabled }), className),
|
|
627
|
-
onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
|
|
628
|
-
onBlur: (event) => {
|
|
629
|
-
onBlur?.(event);
|
|
630
|
-
if (onEditCompleted && allowEditCompleteOnBlur) {
|
|
631
|
-
onEditCompleted(event.target.value);
|
|
632
|
-
clearTimer();
|
|
633
|
-
}
|
|
634
|
-
},
|
|
635
|
-
onChange: (e) => {
|
|
636
|
-
const value2 = e.target.value;
|
|
637
|
-
if (onEditCompleted) {
|
|
638
|
-
restartTimer(() => {
|
|
639
|
-
if (innerRef.current) {
|
|
640
|
-
innerRef.current.blur();
|
|
641
|
-
if (!allowEditCompleteOnBlur) {
|
|
642
|
-
onEditCompleted(value2);
|
|
643
|
-
}
|
|
644
|
-
} else {
|
|
645
|
-
onEditCompleted(value2);
|
|
646
|
-
}
|
|
647
|
-
});
|
|
648
|
-
}
|
|
649
|
-
onChange(e);
|
|
650
|
-
onChangeText(value2);
|
|
651
|
-
}
|
|
652
|
-
}
|
|
653
|
-
)
|
|
654
|
-
] });
|
|
655
|
-
});
|
|
656
|
-
var FormInput = (0, import_react8.forwardRef)(function FormInput2({
|
|
657
|
-
id,
|
|
658
|
-
labelText,
|
|
659
|
-
errorText,
|
|
660
|
-
className,
|
|
661
|
-
labelClassName,
|
|
662
|
-
errorClassName,
|
|
663
|
-
containerClassName,
|
|
664
|
-
required,
|
|
665
|
-
disabled,
|
|
666
|
-
...restProps
|
|
667
|
-
}, ref) {
|
|
668
|
-
const input = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
669
|
-
"input",
|
|
670
|
-
{
|
|
671
|
-
...restProps,
|
|
672
|
-
ref,
|
|
673
|
-
id,
|
|
674
|
-
disabled,
|
|
675
|
-
className: (0, import_clsx5.default)(
|
|
676
|
-
getInputClassName({ disabled, hasError: !!errorText }),
|
|
677
|
-
className
|
|
678
|
-
)
|
|
679
|
-
}
|
|
680
|
-
);
|
|
681
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx5.default)("flex flex-col gap-y-1", containerClassName), children: [
|
|
682
|
-
labelText && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("label", { htmlFor: id, className: (0, import_clsx5.default)("textstyle-label-md", labelClassName), children: [
|
|
683
|
-
labelText,
|
|
684
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "text-primary font-bold", children: "*" })
|
|
685
|
-
] }),
|
|
686
|
-
input,
|
|
687
|
-
errorText && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: id, className: (0, import_clsx5.default)("text-negative", errorClassName), children: errorText })
|
|
688
|
-
] });
|
|
689
|
-
});
|
|
690
|
-
|
|
691
|
-
// src/localization/LanguageProvider.tsx
|
|
692
|
-
var import_react10 = require("react");
|
|
693
|
-
|
|
694
|
-
// src/hooks/useLocalStorage.ts
|
|
695
|
-
var import_react9 = require("react");
|
|
696
|
-
|
|
697
|
-
// src/localization/util.ts
|
|
698
|
-
var languages = ["en", "de"];
|
|
699
|
-
var languagesLocalNames = {
|
|
700
|
-
en: "English",
|
|
701
|
-
de: "Deutsch"
|
|
702
|
-
};
|
|
703
|
-
var DEFAULT_LANGUAGE = "en";
|
|
704
|
-
var LanguageUtil = {
|
|
705
|
-
languages,
|
|
706
|
-
DEFAULT_LANGUAGE,
|
|
707
|
-
languagesLocalNames
|
|
708
|
-
};
|
|
709
|
-
|
|
710
|
-
// src/localization/LanguageProvider.tsx
|
|
711
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
712
|
-
var LanguageContext = (0, import_react10.createContext)({
|
|
713
|
-
language: LanguageUtil.DEFAULT_LANGUAGE,
|
|
714
|
-
setLanguage: (v) => v
|
|
715
|
-
});
|
|
716
|
-
var useLanguage = () => (0, import_react10.useContext)(LanguageContext);
|
|
717
|
-
|
|
718
|
-
// src/localization/useTranslation.ts
|
|
719
|
-
var TranslationPluralCount = {
|
|
720
|
-
zero: 0,
|
|
721
|
-
one: 1,
|
|
722
|
-
two: 2,
|
|
723
|
-
few: 3,
|
|
724
|
-
many: 11,
|
|
725
|
-
other: -1
|
|
726
|
-
};
|
|
727
|
-
var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
728
|
-
const { language: languageProp, translation: overwrite } = overwriteTranslation;
|
|
729
|
-
const { language: inferredLanguage } = useLanguage();
|
|
730
|
-
const usedLanguage = languageProp ?? inferredLanguage;
|
|
731
|
-
const usedTranslations = [...translations];
|
|
732
|
-
if (overwrite) {
|
|
733
|
-
usedTranslations.push(overwrite);
|
|
734
|
-
}
|
|
735
|
-
return (key, options) => {
|
|
736
|
-
const { count, replacements } = { ...{ count: 0, replacements: {} }, ...options };
|
|
737
|
-
try {
|
|
738
|
-
for (let i = translations.length - 1; i >= 0; i--) {
|
|
739
|
-
const translation = translations[i];
|
|
740
|
-
const localizedTranslation = translation[usedLanguage];
|
|
741
|
-
if (!localizedTranslation) {
|
|
742
|
-
continue;
|
|
743
|
-
}
|
|
744
|
-
const value = localizedTranslation[key];
|
|
745
|
-
if (!value) {
|
|
746
|
-
continue;
|
|
747
|
-
}
|
|
748
|
-
let forProcessing;
|
|
749
|
-
if (typeof value !== "string") {
|
|
750
|
-
if (count === TranslationPluralCount.zero && value?.zero) {
|
|
751
|
-
forProcessing = value.zero;
|
|
752
|
-
} else if (count === TranslationPluralCount.one && value?.one) {
|
|
753
|
-
forProcessing = value.one;
|
|
754
|
-
} else if (count === TranslationPluralCount.two && value?.two) {
|
|
755
|
-
forProcessing = value.two;
|
|
756
|
-
} else if (TranslationPluralCount.few <= count && count < TranslationPluralCount.many && value?.few) {
|
|
757
|
-
forProcessing = value.few;
|
|
758
|
-
} else if (count > TranslationPluralCount.many && value?.many) {
|
|
759
|
-
forProcessing = value.many;
|
|
760
|
-
} else {
|
|
761
|
-
forProcessing = value.other;
|
|
762
|
-
}
|
|
763
|
-
} else {
|
|
764
|
-
forProcessing = value;
|
|
765
|
-
}
|
|
766
|
-
forProcessing = forProcessing.replace(/\{\{(\w+)}}/g, (_, placeholder) => {
|
|
767
|
-
return replacements[placeholder] ?? `{{key:${placeholder}}}`;
|
|
768
|
-
});
|
|
769
|
-
return forProcessing;
|
|
770
|
-
}
|
|
771
|
-
} catch (e) {
|
|
772
|
-
console.error(e);
|
|
773
|
-
}
|
|
774
|
-
return `{{${usedLanguage}:${key}}}`;
|
|
775
|
-
};
|
|
776
|
-
};
|
|
777
|
-
|
|
778
|
-
// src/localization/defaults/form.ts
|
|
779
|
-
var formTranslation = {
|
|
780
|
-
en: {
|
|
781
|
-
add: "Add",
|
|
782
|
-
all: "All",
|
|
783
|
-
apply: "Apply",
|
|
784
|
-
back: "Back",
|
|
785
|
-
cancel: "Cancel",
|
|
786
|
-
change: "Change",
|
|
787
|
-
clear: "Clear",
|
|
788
|
-
click: "Click",
|
|
789
|
-
clickToCopy: "Click to Copy",
|
|
790
|
-
close: "Close",
|
|
791
|
-
confirm: "Confirm",
|
|
792
|
-
copy: "Copy",
|
|
793
|
-
copied: "Copied",
|
|
794
|
-
create: "Create",
|
|
795
|
-
decline: "Decline",
|
|
796
|
-
delete: "Delete",
|
|
797
|
-
discard: "Discard",
|
|
798
|
-
discardChanges: "Discard Changes",
|
|
799
|
-
done: "Done",
|
|
800
|
-
edit: "Edit",
|
|
801
|
-
enterText: "Enter text here",
|
|
802
|
-
error: "Error",
|
|
803
|
-
exit: "Exit",
|
|
804
|
-
fieldRequiredError: "This field is required.",
|
|
805
|
-
invalidEmailError: "Please enter a valid email address.",
|
|
806
|
-
less: "Less",
|
|
807
|
-
loading: "Loading",
|
|
808
|
-
maxLengthError: "Maximum length exceeded.",
|
|
809
|
-
minLengthError: "Minimum length not met.",
|
|
810
|
-
more: "More",
|
|
811
|
-
next: "Next",
|
|
812
|
-
no: "No",
|
|
813
|
-
none: "None",
|
|
814
|
-
of: "of",
|
|
815
|
-
optional: "Optional",
|
|
816
|
-
pleaseWait: "Please wait...",
|
|
817
|
-
previous: "Previous",
|
|
818
|
-
remove: "Remove",
|
|
819
|
-
required: "Required",
|
|
820
|
-
reset: "Reset",
|
|
821
|
-
save: "Save",
|
|
822
|
-
saved: "Saved",
|
|
823
|
-
search: "Search",
|
|
824
|
-
select: "Select",
|
|
825
|
-
selectOption: "Select an option",
|
|
826
|
-
show: "Show",
|
|
827
|
-
showMore: "Show more",
|
|
828
|
-
showLess: "Show less",
|
|
829
|
-
submit: "Submit",
|
|
830
|
-
success: "Success",
|
|
831
|
-
update: "Update",
|
|
832
|
-
unsavedChanges: "Unsaved Changes",
|
|
833
|
-
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
834
|
-
yes: "Yes"
|
|
835
|
-
},
|
|
836
|
-
de: {
|
|
837
|
-
add: "Hinzuf\xFCgen",
|
|
838
|
-
all: "Alle",
|
|
839
|
-
apply: "Anwenden",
|
|
840
|
-
back: "Zur\xFCck",
|
|
841
|
-
cancel: "Abbrechen",
|
|
842
|
-
change: "\xC4ndern",
|
|
843
|
-
clear: "L\xF6schen",
|
|
844
|
-
click: "Klicken",
|
|
845
|
-
clickToCopy: "Zum kopieren klicken",
|
|
846
|
-
close: "Schlie\xDFen",
|
|
847
|
-
confirm: "Best\xE4tigen",
|
|
848
|
-
copy: "Kopieren",
|
|
849
|
-
copied: "Kopiert",
|
|
850
|
-
create: "Erstellen",
|
|
851
|
-
decline: "Ablehnen",
|
|
852
|
-
delete: "L\xF6schen",
|
|
853
|
-
discard: "Verwerfen",
|
|
854
|
-
discardChanges: "\xC4nderungen Verwerfen",
|
|
855
|
-
done: "Fertig",
|
|
856
|
-
edit: "Bearbeiten",
|
|
857
|
-
enterText: "Text hier eingeben",
|
|
858
|
-
error: "Fehler",
|
|
859
|
-
exit: "Beenden",
|
|
860
|
-
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
861
|
-
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
862
|
-
less: "Weniger",
|
|
863
|
-
loading: "L\xE4dt",
|
|
864
|
-
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
865
|
-
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
866
|
-
more: "Mehr",
|
|
867
|
-
next: "Weiter",
|
|
868
|
-
no: "Nein",
|
|
869
|
-
none: "Nichts",
|
|
870
|
-
of: "von",
|
|
871
|
-
optional: "Optional",
|
|
872
|
-
pleaseWait: "Bitte warten...",
|
|
873
|
-
previous: "Vorherige",
|
|
874
|
-
remove: "Entfernen",
|
|
875
|
-
required: "Erforderlich",
|
|
876
|
-
reset: "Zur\xFCcksetzen",
|
|
877
|
-
save: "Speichern",
|
|
878
|
-
saved: "Gespeichert",
|
|
879
|
-
search: "Suche",
|
|
880
|
-
select: "Select",
|
|
881
|
-
selectOption: "Option ausw\xE4hlen",
|
|
882
|
-
show: "Anzeigen",
|
|
883
|
-
showMore: "Mehr anzeigen",
|
|
884
|
-
showLess: "Weniger anzeigen",
|
|
885
|
-
submit: "Abschicken",
|
|
886
|
-
success: "Erfolg",
|
|
887
|
-
update: "Update",
|
|
888
|
-
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
889
|
-
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
890
|
-
yes: "Ja"
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
|
|
894
|
-
// src/components/user-action/Button.tsx
|
|
895
|
-
var import_react11 = require("react");
|
|
896
|
-
var import_clsx6 = __toESM(require("clsx"));
|
|
897
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
898
|
-
var ButtonColorUtil = {
|
|
899
|
-
solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
|
|
900
|
-
text: ["primary", "negative", "neutral"],
|
|
901
|
-
outline: ["primary"]
|
|
902
|
-
};
|
|
903
|
-
var IconButtonUtil = {
|
|
904
|
-
icon: [...ButtonColorUtil.solid, "transparent"]
|
|
905
|
-
};
|
|
906
|
-
var paddingMapping = {
|
|
907
|
-
small: "btn-sm",
|
|
908
|
-
medium: "btn-md",
|
|
909
|
-
large: "btn-lg"
|
|
910
|
-
};
|
|
911
|
-
var iconPaddingMapping = {
|
|
912
|
-
tiny: "icon-btn-xs",
|
|
913
|
-
small: "icon-btn-sm",
|
|
914
|
-
medium: "icon-btn-md",
|
|
915
|
-
large: "icon-btn-lg"
|
|
916
|
-
};
|
|
917
|
-
var ButtonUtil = {
|
|
918
|
-
paddingMapping,
|
|
919
|
-
iconPaddingMapping
|
|
920
|
-
};
|
|
921
|
-
var SolidButton = (0, import_react11.forwardRef)(function SolidButton2({
|
|
922
|
-
children,
|
|
923
|
-
color = "primary",
|
|
924
|
-
size = "medium",
|
|
925
|
-
startIcon,
|
|
926
|
-
endIcon,
|
|
927
|
-
onClick,
|
|
928
|
-
className,
|
|
929
|
-
...restProps
|
|
930
|
-
}, ref) {
|
|
931
|
-
const colorClasses = {
|
|
932
|
-
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
933
|
-
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
934
|
-
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
935
|
-
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
936
|
-
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
937
|
-
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
938
|
-
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
|
|
939
|
-
}[color];
|
|
940
|
-
const iconColorClasses = {
|
|
941
|
-
primary: "not-group-disabled:text-button-solid-primary-icon",
|
|
942
|
-
secondary: "not-group-disabled:text-button-solid-secondary-icon",
|
|
943
|
-
tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
|
|
944
|
-
positive: "not-group-disabled:text-button-solid-positive-icon",
|
|
945
|
-
warning: "not-group-disabled:text-button-solid-warning-icon",
|
|
946
|
-
negative: "not-group-disabled:text-button-solid-negative-icon",
|
|
947
|
-
neutral: "not-group-disabled:text-button-solid-neutral-icon"
|
|
948
|
-
}[color];
|
|
949
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
950
|
-
"button",
|
|
951
|
-
{
|
|
952
|
-
ref,
|
|
953
|
-
onClick,
|
|
954
|
-
className: (0, import_clsx6.default)(
|
|
955
|
-
"group font-semibold",
|
|
956
|
-
colorClasses,
|
|
957
|
-
"not-disabled:hover:brightness-90",
|
|
958
|
-
"disabled:text-disabled-text disabled:bg-disabled-background",
|
|
959
|
-
ButtonUtil.paddingMapping[size],
|
|
960
|
-
className
|
|
961
|
-
),
|
|
962
|
-
...restProps,
|
|
963
|
-
children: [
|
|
964
|
-
startIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
965
|
-
"span",
|
|
966
|
-
{
|
|
967
|
-
className: (0, import_clsx6.default)(
|
|
968
|
-
iconColorClasses,
|
|
969
|
-
"group-disabled:text-disabled-icon"
|
|
970
|
-
),
|
|
971
|
-
children: startIcon
|
|
972
|
-
}
|
|
973
|
-
),
|
|
974
|
-
children,
|
|
975
|
-
endIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
976
|
-
"span",
|
|
977
|
-
{
|
|
978
|
-
className: (0, import_clsx6.default)(
|
|
979
|
-
iconColorClasses,
|
|
980
|
-
"group-disabled:text-disabled-icon"
|
|
981
|
-
),
|
|
982
|
-
children: endIcon
|
|
983
|
-
}
|
|
984
|
-
)
|
|
985
|
-
]
|
|
986
|
-
}
|
|
987
|
-
);
|
|
988
|
-
});
|
|
989
|
-
var IconButton = ({
|
|
990
|
-
children,
|
|
991
|
-
color = "primary",
|
|
992
|
-
size = "medium",
|
|
993
|
-
className,
|
|
994
|
-
...restProps
|
|
995
|
-
}) => {
|
|
996
|
-
const colorClasses = {
|
|
997
|
-
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
998
|
-
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
999
|
-
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
1000
|
-
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
1001
|
-
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
1002
|
-
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
1003
|
-
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
|
|
1004
|
-
transparent: "not-disabled:bg-transparent"
|
|
1005
|
-
}[color];
|
|
1006
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1007
|
-
"button",
|
|
1008
|
-
{
|
|
1009
|
-
className: (0, import_clsx6.default)(
|
|
1010
|
-
colorClasses,
|
|
1011
|
-
"not-disabled:hover:brightness-90",
|
|
1012
|
-
"disabled:text-disabled-text",
|
|
1013
|
-
{
|
|
1014
|
-
"disabled:bg-disabled-background": color !== "transparent",
|
|
1015
|
-
"disabled:opacity-70": color === "transparent",
|
|
1016
|
-
"not-disabled:hover:bg-button-text-hover-background": color === "transparent"
|
|
1017
|
-
},
|
|
1018
|
-
ButtonUtil.iconPaddingMapping[size],
|
|
1019
|
-
className
|
|
1020
|
-
),
|
|
1021
|
-
...restProps,
|
|
1022
|
-
children
|
|
1023
|
-
}
|
|
1024
|
-
);
|
|
1025
|
-
};
|
|
1026
|
-
|
|
1027
|
-
// src/components/user-action/SearchBar.tsx
|
|
1028
|
-
var import_lucide_react3 = require("lucide-react");
|
|
1029
|
-
var import_clsx7 = require("clsx");
|
|
1030
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1031
|
-
var SearchBar = ({
|
|
1032
|
-
placeholder,
|
|
1033
|
-
onSearch,
|
|
1034
|
-
disableOnSearch,
|
|
1035
|
-
containerClassName,
|
|
1036
|
-
...inputProps
|
|
1037
|
-
}) => {
|
|
1038
|
-
const translation = useTranslation([formTranslation]);
|
|
1039
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: (0, import_clsx7.clsx)("flex-row-2 justify-between items-center", containerClassName), children: [
|
|
1040
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1041
|
-
Input,
|
|
1042
|
-
{
|
|
1043
|
-
...inputProps,
|
|
1044
|
-
placeholder: placeholder ?? translation("search")
|
|
1045
|
-
}
|
|
1046
|
-
),
|
|
1047
|
-
onSearch && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react3.Search, { className: "w-full h-full" }) })
|
|
1048
|
-
] });
|
|
1049
|
-
};
|
|
1050
|
-
|
|
1051
|
-
// src/hooks/useSearch.ts
|
|
1052
|
-
var import_react12 = require("react");
|
|
1053
|
-
|
|
1054
|
-
// src/util/simpleSearch.ts
|
|
1055
|
-
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
1056
|
-
return objects.filter((object) => {
|
|
1057
|
-
const mappedSearchKeywords = mapping(object)?.map((value) => value.toLowerCase().trim());
|
|
1058
|
-
if (!mappedSearchKeywords) {
|
|
1059
|
-
return true;
|
|
1060
|
-
}
|
|
1061
|
-
return search.every((searchValue) => !!mappedSearchKeywords.find((value) => !!value && value.includes(searchValue.toLowerCase().trim())));
|
|
1062
|
-
});
|
|
1063
|
-
};
|
|
1064
|
-
|
|
1065
|
-
// src/hooks/useSearch.ts
|
|
1066
|
-
var useSearch = ({
|
|
1067
|
-
list,
|
|
1068
|
-
initialSearch,
|
|
1069
|
-
searchMapping,
|
|
1070
|
-
additionalSearchTags,
|
|
1071
|
-
isSearchInstant = true,
|
|
1072
|
-
sortingFunction,
|
|
1073
|
-
filter,
|
|
1074
|
-
disabled = false
|
|
1075
|
-
}) => {
|
|
1076
|
-
const [search, setSearch] = (0, import_react12.useState)(initialSearch ?? "");
|
|
1077
|
-
const [result, setResult] = (0, import_react12.useState)(list);
|
|
1078
|
-
const searchTags = (0, import_react12.useMemo)(() => additionalSearchTags ?? [], [additionalSearchTags]);
|
|
1079
|
-
const updateSearch = (0, import_react12.useCallback)((newSearch) => {
|
|
1080
|
-
const usedSearch = newSearch ?? search;
|
|
1081
|
-
if (newSearch) {
|
|
1082
|
-
setSearch(search);
|
|
1083
|
-
}
|
|
1084
|
-
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
1085
|
-
}, [searchTags, list, search, searchMapping]);
|
|
1086
|
-
(0, import_react12.useEffect)(() => {
|
|
1087
|
-
if (isSearchInstant) {
|
|
1088
|
-
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
1089
|
-
}
|
|
1090
|
-
}, [searchTags, isSearchInstant, list, search, searchMapping, additionalSearchTags]);
|
|
1091
|
-
const filteredResult = (0, import_react12.useMemo)(() => {
|
|
1092
|
-
if (!filter) {
|
|
1093
|
-
return result;
|
|
1094
|
-
}
|
|
1095
|
-
return result.filter(filter);
|
|
1096
|
-
}, [result, filter]);
|
|
1097
|
-
const sortedAndFilteredResult = (0, import_react12.useMemo)(() => {
|
|
1098
|
-
if (!sortingFunction) {
|
|
1099
|
-
return filteredResult;
|
|
1100
|
-
}
|
|
1101
|
-
return filteredResult.sort(sortingFunction);
|
|
1102
|
-
}, [filteredResult, sortingFunction]);
|
|
1103
|
-
const usedResult = (0, import_react12.useMemo)(() => {
|
|
1104
|
-
if (!disabled) {
|
|
1105
|
-
return sortedAndFilteredResult;
|
|
1106
|
-
}
|
|
1107
|
-
return list;
|
|
1108
|
-
}, [disabled, list, sortedAndFilteredResult]);
|
|
1109
|
-
return {
|
|
1110
|
-
result: usedResult,
|
|
1111
|
-
hasResult: usedResult.length > 0,
|
|
1112
|
-
allItems: list,
|
|
1113
|
-
updateSearch,
|
|
1114
|
-
search,
|
|
1115
|
-
setSearch
|
|
1116
|
-
};
|
|
1117
|
-
};
|
|
1118
|
-
|
|
1119
|
-
// src/components/user-action/Select.tsx
|
|
1120
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1121
|
-
var Select = ({
|
|
1122
|
-
value,
|
|
1123
|
-
label,
|
|
1124
|
-
options,
|
|
1125
|
-
onChange,
|
|
1126
|
-
hintText = "",
|
|
1127
|
-
selectedDisplayOverwrite,
|
|
1128
|
-
searchOptions,
|
|
1129
|
-
additionalItems,
|
|
1130
|
-
className,
|
|
1131
|
-
triggerClassName,
|
|
1132
|
-
hintTextClassName,
|
|
1133
|
-
...menuProps
|
|
1134
|
-
}) => {
|
|
1135
|
-
const selectedOption = options.find((option) => option.value === value);
|
|
1136
|
-
if (value !== void 0 && selectedOption === void 0 && selectedDisplayOverwrite === void 0) {
|
|
1137
|
-
console.warn("The selected value is not found in the options list. This might be an error on your part or default behavior if it is complex data type on which === does not work. In case of the latter use selectedDisplayOverwrite to set your selected text or component");
|
|
1138
|
-
}
|
|
1139
|
-
const isShowingHint = !selectedDisplayOverwrite && !selectedOption?.label;
|
|
1140
|
-
const { result, search, setSearch } = useSearch({
|
|
1141
|
-
list: options,
|
|
1142
|
-
searchMapping: (0, import_react13.useCallback)((item) => item.searchTags, []),
|
|
1143
|
-
...searchOptions
|
|
1144
|
-
});
|
|
1145
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_clsx8.default)(className), children: [
|
|
1146
|
-
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Label, { ...label, labelType: label.labelType ?? "labelSmall", className: (0, import_clsx8.default)("mb-1", label.className) }),
|
|
1147
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1148
|
-
Menu,
|
|
1149
|
-
{
|
|
1150
|
-
...menuProps,
|
|
1151
|
-
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1152
|
-
"button",
|
|
1153
|
-
{
|
|
1154
|
-
ref,
|
|
1155
|
-
className: (0, import_clsx8.default)(
|
|
1156
|
-
"btn-md justify-between w-full border-2",
|
|
1157
|
-
"not-disabled:bg-input-background not-disabled:text-input-text not-disabled:hover:border-primary",
|
|
1158
|
-
"disabled:bg-disabled-background disabled:text-disabled-text disabled:border-disabled-border",
|
|
1159
|
-
triggerClassName
|
|
1160
|
-
),
|
|
1161
|
-
onClick: toggleOpen,
|
|
1162
|
-
disabled,
|
|
1163
|
-
children: [
|
|
1164
|
-
!isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? selectedOption?.label }),
|
|
1165
|
-
isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: (0, import_clsx8.default)("textstyle-description", hintTextClassName), children: hintText }),
|
|
1166
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ExpansionIcon, { isExpanded: isOpen })
|
|
1167
|
-
]
|
|
1168
|
-
}
|
|
1169
|
-
),
|
|
1170
|
-
menuClassName: (0, import_clsx8.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
|
|
1171
|
-
children: (bag) => {
|
|
1172
|
-
const { close } = bag;
|
|
1173
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
1174
|
-
!searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1175
|
-
SearchBar,
|
|
1176
|
-
{
|
|
1177
|
-
value: search,
|
|
1178
|
-
onChangeText: setSearch,
|
|
1179
|
-
autoFocus: true
|
|
1180
|
-
}
|
|
1181
|
-
),
|
|
1182
|
-
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
|
|
1183
|
-
result.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1184
|
-
ListTile,
|
|
1185
|
-
{
|
|
1186
|
-
isSelected: option === selectedOption,
|
|
1187
|
-
title: option.label,
|
|
1188
|
-
onClick: () => {
|
|
1189
|
-
onChange(option.value);
|
|
1190
|
-
close();
|
|
1191
|
-
},
|
|
1192
|
-
disabled: option.disabled
|
|
1193
|
-
},
|
|
1194
|
-
index
|
|
1195
|
-
)),
|
|
1196
|
-
additionalItems && additionalItems({ ...bag, search, selected: value })
|
|
1197
|
-
] })
|
|
1198
|
-
] });
|
|
1199
|
-
}
|
|
1200
|
-
}
|
|
1201
|
-
)
|
|
1202
|
-
] });
|
|
1203
|
-
};
|
|
1204
|
-
var SelectUncontrolled = ({
|
|
1205
|
-
options,
|
|
1206
|
-
onChange,
|
|
1207
|
-
value,
|
|
1208
|
-
hintText,
|
|
1209
|
-
...props
|
|
1210
|
-
}) => {
|
|
1211
|
-
const [selected, setSelected] = (0, import_react14.useState)(value);
|
|
1212
|
-
(0, import_react14.useEffect)(() => {
|
|
1213
|
-
if (options.find((options2) => options2.value === value)) {
|
|
1214
|
-
setSelected(value);
|
|
1215
|
-
}
|
|
1216
|
-
}, [options, value]);
|
|
1217
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1218
|
-
Select,
|
|
1219
|
-
{
|
|
1220
|
-
value: selected,
|
|
1221
|
-
options,
|
|
1222
|
-
onChange: (value2) => {
|
|
1223
|
-
setSelected(value2);
|
|
1224
|
-
onChange(value2);
|
|
1225
|
-
},
|
|
1226
|
-
hintText,
|
|
1227
|
-
...props
|
|
1228
|
-
}
|
|
1229
|
-
);
|
|
1230
|
-
};
|
|
1231
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1232
|
-
0 && (module.exports = {
|
|
1233
|
-
Select,
|
|
1234
|
-
SelectUncontrolled
|
|
1235
|
-
});
|
|
1236
|
-
//# sourceMappingURL=Select.js.map
|