@helpwave/hightide 0.0.12 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/coloring/shading.d.mts +5 -0
- package/dist/coloring/shading.d.ts +5 -2
- package/dist/coloring/shading.js +80 -38
- package/dist/coloring/shading.js.map +1 -0
- package/dist/coloring/shading.mjs +47 -0
- package/dist/coloring/shading.mjs.map +1 -0
- package/dist/coloring/types.d.mts +13 -0
- package/dist/coloring/types.d.ts +8 -6
- package/dist/coloring/types.js +31 -1
- package/dist/coloring/types.js.map +1 -0
- package/dist/coloring/types.mjs +6 -0
- package/dist/coloring/types.mjs.map +1 -0
- package/dist/components/Avatar.d.mts +17 -0
- package/dist/components/Avatar.d.ts +9 -6
- package/dist/components/Avatar.js +79 -29
- package/dist/components/Avatar.js.map +1 -0
- package/dist/components/Avatar.mjs +48 -0
- package/dist/components/Avatar.mjs.map +1 -0
- package/dist/components/AvatarGroup.d.mts +14 -0
- package/dist/components/AvatarGroup.d.ts +7 -3
- package/dist/components/AvatarGroup.js +117 -12
- package/dist/components/AvatarGroup.js.map +1 -0
- package/dist/components/AvatarGroup.mjs +81 -0
- package/dist/components/AvatarGroup.mjs.map +1 -0
- package/dist/components/BreadCrumb.d.mts +19 -0
- package/dist/components/BreadCrumb.d.ts +6 -3
- package/dist/components/BreadCrumb.js +49 -11
- package/dist/components/BreadCrumb.js.map +1 -0
- package/dist/components/BreadCrumb.mjs +15 -0
- package/dist/components/BreadCrumb.mjs.map +1 -0
- package/dist/components/Button.d.mts +44 -0
- package/dist/components/Button.d.ts +16 -13
- package/dist/components/Button.js +232 -80
- package/dist/components/Button.js.map +1 -0
- package/dist/components/Button.mjs +198 -0
- package/dist/components/Button.mjs.map +1 -0
- package/dist/components/ChipList.d.mts +24 -0
- package/dist/components/ChipList.d.ts +10 -7
- package/dist/components/ChipList.js +103 -36
- package/dist/components/ChipList.js.map +1 -0
- package/dist/components/ChipList.mjs +69 -0
- package/dist/components/ChipList.mjs.map +1 -0
- package/dist/components/Circle.d.mts +10 -0
- package/dist/components/Circle.d.ts +7 -3
- package/dist/components/Circle.js +61 -9
- package/dist/components/Circle.js.map +1 -0
- package/dist/components/Circle.mjs +27 -0
- package/dist/components/Circle.mjs.map +1 -0
- package/dist/components/ErrorComponent.d.mts +18 -0
- package/dist/components/ErrorComponent.d.ts +9 -4
- package/dist/components/ErrorComponent.js +86 -17
- package/dist/components/ErrorComponent.js.map +1 -0
- package/dist/components/ErrorComponent.mjs +53 -0
- package/dist/components/ErrorComponent.mjs.map +1 -0
- package/dist/components/Expandable.d.mts +33 -0
- package/dist/components/Expandable.d.ts +8 -5
- package/dist/components/Expandable.js +79 -15
- package/dist/components/Expandable.js.map +1 -0
- package/dist/components/Expandable.mjs +45 -0
- package/dist/components/Expandable.mjs.map +1 -0
- package/dist/components/HelpwaveBadge.d.mts +14 -0
- package/dist/components/HelpwaveBadge.d.ts +6 -3
- package/dist/components/HelpwaveBadge.js +125 -13
- package/dist/components/HelpwaveBadge.js.map +1 -0
- package/dist/components/HelpwaveBadge.mjs +91 -0
- package/dist/components/HelpwaveBadge.mjs.map +1 -0
- package/dist/components/HideableContentSection.d.mts +14 -0
- package/dist/components/HideableContentSection.d.ts +7 -3
- package/dist/components/HideableContentSection.js +69 -14
- package/dist/components/HideableContentSection.js.map +1 -0
- package/dist/components/HideableContentSection.mjs +35 -0
- package/dist/components/HideableContentSection.mjs.map +1 -0
- package/dist/components/InputGroup.d.mts +17 -0
- package/dist/components/InputGroup.d.ts +7 -3
- package/dist/components/InputGroup.js +96 -32
- package/dist/components/InputGroup.js.map +1 -0
- package/dist/components/InputGroup.mjs +62 -0
- package/dist/components/InputGroup.mjs.map +1 -0
- package/dist/components/LoadingAndErrorComponent.d.mts +24 -0
- package/dist/components/LoadingAndErrorComponent.d.ts +12 -5
- package/dist/components/LoadingAndErrorComponent.js +178 -23
- package/dist/components/LoadingAndErrorComponent.js.map +1 -0
- package/dist/components/LoadingAndErrorComponent.mjs +145 -0
- package/dist/components/LoadingAndErrorComponent.mjs.map +1 -0
- package/dist/components/LoadingAnimation.d.mts +18 -0
- package/dist/components/LoadingAnimation.d.ts +9 -4
- package/dist/components/LoadingAnimation.js +124 -16
- package/dist/components/LoadingAnimation.js.map +1 -0
- package/dist/components/LoadingAnimation.mjs +90 -0
- package/dist/components/LoadingAnimation.mjs.map +1 -0
- package/dist/components/LoadingButton.d.mts +10 -0
- package/dist/components/LoadingButton.d.ts +7 -3
- package/dist/components/LoadingButton.js +169 -9
- package/dist/components/LoadingButton.js.map +1 -0
- package/dist/components/LoadingButton.mjs +135 -0
- package/dist/components/LoadingButton.mjs.map +1 -0
- package/dist/components/MarkdownInterpreter.d.mts +28 -0
- package/dist/components/MarkdownInterpreter.d.ts +8 -5
- package/dist/components/MarkdownInterpreter.js +246 -175
- package/dist/components/MarkdownInterpreter.js.map +1 -0
- package/dist/components/MarkdownInterpreter.mjs +235 -0
- package/dist/components/MarkdownInterpreter.mjs.map +1 -0
- package/dist/components/Pagination.d.mts +19 -0
- package/dist/components/Pagination.d.ts +9 -4
- package/dist/components/Pagination.js +100 -23
- package/dist/components/Pagination.js.map +1 -0
- package/dist/components/Pagination.mjs +67 -0
- package/dist/components/Pagination.mjs.map +1 -0
- package/dist/components/Profile.d.mts +31 -0
- package/dist/components/Profile.d.ts +8 -5
- package/dist/components/Profile.js +194 -42
- package/dist/components/Profile.js.map +1 -0
- package/dist/components/Profile.mjs +162 -0
- package/dist/components/Profile.mjs.map +1 -0
- package/dist/components/ProgressIndicator.d.mts +24 -0
- package/dist/components/ProgressIndicator.d.ts +6 -3
- package/dist/components/ProgressIndicator.js +82 -22
- package/dist/components/ProgressIndicator.js.map +1 -0
- package/dist/components/ProgressIndicator.mjs +59 -0
- package/dist/components/ProgressIndicator.mjs.map +1 -0
- package/dist/components/Ring.d.mts +35 -0
- package/dist/components/Ring.d.ts +13 -9
- package/dist/components/Ring.js +331 -107
- package/dist/components/Ring.js.map +1 -0
- package/dist/components/Ring.mjs +299 -0
- package/dist/components/Ring.mjs.map +1 -0
- package/dist/components/SearchableList.d.mts +22 -0
- package/dist/components/SearchableList.d.ts +9 -5
- package/dist/components/SearchableList.js +268 -24
- package/dist/components/SearchableList.js.map +1 -0
- package/dist/components/SearchableList.mjs +241 -0
- package/dist/components/SearchableList.mjs.map +1 -0
- package/dist/components/SortButton.d.mts +15 -0
- package/dist/components/SortButton.d.ts +9 -4
- package/dist/components/SortButton.js +131 -8
- package/dist/components/SortButton.js.map +1 -0
- package/dist/components/SortButton.mjs +97 -0
- package/dist/components/SortButton.mjs.map +1 -0
- package/dist/components/Span.d.mts +2 -0
- package/dist/components/Span.d.ts +2 -0
- package/dist/components/Span.js +1 -0
- package/dist/components/Span.js.map +1 -0
- package/dist/components/Span.mjs +1 -0
- package/dist/components/Span.mjs.map +1 -0
- package/dist/components/StepperBar.d.mts +28 -0
- package/dist/components/StepperBar.d.ts +10 -5
- package/dist/components/StepperBar.js +248 -44
- package/dist/components/StepperBar.js.map +1 -0
- package/dist/components/StepperBar.mjs +216 -0
- package/dist/components/StepperBar.mjs.map +1 -0
- package/dist/components/Table.d.mts +90 -0
- package/dist/components/Table.d.ts +20 -17
- package/dist/components/Table.js +396 -170
- package/dist/components/Table.js.map +1 -0
- package/dist/components/Table.mjs +370 -0
- package/dist/components/Table.mjs.map +1 -0
- package/dist/components/TechRadar.d.mts +39 -0
- package/dist/components/TechRadar.d.ts +5 -2
- package/dist/components/TechRadar.js +241 -189
- package/dist/components/TechRadar.js.map +1 -0
- package/dist/components/TechRadar.mjs +208 -0
- package/dist/components/TechRadar.mjs.map +1 -0
- package/dist/components/TextImage.d.mts +25 -0
- package/dist/components/TextImage.d.ts +9 -4
- package/dist/components/TextImage.js +121 -29
- package/dist/components/TextImage.js.map +1 -0
- package/dist/components/TextImage.mjs +86 -0
- package/dist/components/TextImage.mjs.map +1 -0
- package/dist/components/TimeDisplay.d.mts +35 -0
- package/dist/components/TimeDisplay.d.ts +8 -3
- package/dist/components/TimeDisplay.js +134 -81
- package/dist/components/TimeDisplay.js.map +1 -0
- package/dist/components/TimeDisplay.mjs +109 -0
- package/dist/components/TimeDisplay.mjs.map +1 -0
- package/dist/components/Tooltip.d.mts +37 -0
- package/dist/components/Tooltip.d.ts +7 -4
- package/dist/components/Tooltip.js +135 -37
- package/dist/components/Tooltip.js.map +1 -0
- package/dist/components/Tooltip.mjs +109 -0
- package/dist/components/Tooltip.mjs.map +1 -0
- package/dist/components/VerticalDivider.d.mts +15 -0
- package/dist/components/VerticalDivider.d.ts +6 -2
- package/dist/components/VerticalDivider.js +80 -6
- package/dist/components/VerticalDivider.js.map +1 -0
- package/dist/components/VerticalDivider.mjs +56 -0
- package/dist/components/VerticalDivider.mjs.map +1 -0
- package/dist/components/date/DatePicker.d.mts +32 -0
- package/dist/components/date/DatePicker.d.ts +13 -7
- package/dist/components/date/DatePicker.js +624 -55
- package/dist/components/date/DatePicker.js.map +1 -0
- package/dist/components/date/DatePicker.mjs +591 -0
- package/dist/components/date/DatePicker.mjs.map +1 -0
- package/dist/components/date/DayPicker.d.mts +20 -0
- package/dist/components/date/DayPicker.d.ts +8 -4
- package/dist/components/date/DayPicker.js +232 -36
- package/dist/components/date/DayPicker.js.map +1 -0
- package/dist/components/date/DayPicker.mjs +195 -0
- package/dist/components/date/DayPicker.mjs.map +1 -0
- package/dist/components/date/TimePicker.d.mts +15 -0
- package/dist/components/date/TimePicker.d.ts +7 -4
- package/dist/components/date/TimePicker.js +196 -75
- package/dist/components/date/TimePicker.js.map +1 -0
- package/dist/components/date/TimePicker.mjs +164 -0
- package/dist/components/date/TimePicker.mjs.map +1 -0
- package/dist/components/date/YearMonthPicker.d.mts +15 -0
- package/dist/components/date/YearMonthPicker.d.ts +7 -3
- package/dist/components/date/YearMonthPicker.js +281 -57
- package/dist/components/date/YearMonthPicker.js.map +1 -0
- package/dist/components/date/YearMonthPicker.mjs +247 -0
- package/dist/components/date/YearMonthPicker.mjs.map +1 -0
- package/dist/components/examples/InputGroupExample.d.mts +11 -0
- package/dist/components/examples/InputGroupExample.d.ts +8 -3
- package/dist/components/examples/InputGroupExample.js +465 -20
- package/dist/components/examples/InputGroupExample.js.map +1 -0
- package/dist/components/examples/InputGroupExample.mjs +436 -0
- package/dist/components/examples/InputGroupExample.mjs.map +1 -0
- package/dist/components/examples/MultiSelectExample.d.mts +14 -0
- package/dist/components/examples/MultiSelectExample.d.ts +10 -3
- package/dist/components/examples/MultiSelectExample.js +659 -25
- package/dist/components/examples/MultiSelectExample.js.map +1 -0
- package/dist/components/examples/MultiSelectExample.mjs +631 -0
- package/dist/components/examples/MultiSelectExample.mjs.map +1 -0
- package/dist/components/examples/SearchableSelectExample.d.mts +13 -0
- package/dist/components/examples/SearchableSelectExample.d.ts +10 -3
- package/dist/components/examples/SearchableSelectExample.js +364 -16
- package/dist/components/examples/SearchableSelectExample.js.map +1 -0
- package/dist/components/examples/SearchableSelectExample.mjs +335 -0
- package/dist/components/examples/SearchableSelectExample.mjs.map +1 -0
- package/dist/components/examples/SelectExample.d.mts +9 -0
- package/dist/components/examples/SelectExample.d.ts +8 -3
- package/dist/components/examples/SelectExample.js +178 -13
- package/dist/components/examples/SelectExample.js.map +1 -0
- package/dist/components/examples/SelectExample.mjs +145 -0
- package/dist/components/examples/SelectExample.mjs.map +1 -0
- package/dist/components/examples/StackingModals.d.mts +8 -0
- package/dist/components/examples/StackingModals.d.ts +5 -1
- package/dist/components/examples/StackingModals.js +497 -14
- package/dist/components/examples/StackingModals.js.map +1 -0
- package/dist/components/examples/StackingModals.mjs +463 -0
- package/dist/components/examples/StackingModals.mjs.map +1 -0
- package/dist/components/examples/TableExample.d.mts +13 -0
- package/dist/components/examples/TableExample.d.ts +9 -5
- package/dist/components/examples/TableExample.js +850 -89
- package/dist/components/examples/TableExample.js.map +1 -0
- package/dist/components/examples/TableExample.mjs +823 -0
- package/dist/components/examples/TableExample.mjs.map +1 -0
- package/dist/components/examples/TextareaExample.d.mts +12 -0
- package/dist/components/examples/TextareaExample.d.ts +9 -3
- package/dist/components/examples/TextareaExample.js +175 -9
- package/dist/components/examples/TextareaExample.js.map +1 -0
- package/dist/components/examples/TextareaExample.mjs +141 -0
- package/dist/components/examples/TextareaExample.mjs.map +1 -0
- package/dist/components/examples/TileExample.d.mts +14 -0
- package/dist/components/examples/TileExample.d.ts +8 -3
- package/dist/components/examples/TileExample.js +78 -8
- package/dist/components/examples/TileExample.js.map +1 -0
- package/dist/components/examples/TileExample.mjs +44 -0
- package/dist/components/examples/TileExample.mjs.map +1 -0
- package/dist/components/examples/Title.d.mts +2 -0
- package/dist/components/examples/Title.d.ts +2 -0
- package/dist/components/examples/Title.js +1 -0
- package/dist/components/examples/Title.js.map +1 -0
- package/dist/components/examples/Title.mjs +1 -0
- package/dist/components/examples/Title.mjs.map +1 -0
- package/dist/components/examples/date/DateTimePickerExample.d.mts +18 -0
- package/dist/components/examples/date/DateTimePickerExample.d.ts +15 -7
- package/dist/components/examples/date/DateTimePickerExample.js +877 -19
- package/dist/components/examples/date/DateTimePickerExample.js.map +1 -0
- package/dist/components/examples/date/DateTimePickerExample.mjs +844 -0
- package/dist/components/examples/date/DateTimePickerExample.mjs.map +1 -0
- package/dist/components/examples/properties/CheckboxPropertyExample.d.mts +16 -0
- package/dist/components/examples/properties/CheckboxPropertyExample.d.ts +11 -3
- package/dist/components/examples/properties/CheckboxPropertyExample.js +348 -12
- package/dist/components/examples/properties/CheckboxPropertyExample.js.map +1 -0
- package/dist/components/examples/properties/CheckboxPropertyExample.mjs +314 -0
- package/dist/components/examples/properties/CheckboxPropertyExample.mjs.map +1 -0
- package/dist/components/examples/properties/DatePropertyExample.d.mts +16 -0
- package/dist/components/examples/properties/DatePropertyExample.d.ts +11 -3
- package/dist/components/examples/properties/DatePropertyExample.js +459 -22
- package/dist/components/examples/properties/DatePropertyExample.js.map +1 -0
- package/dist/components/examples/properties/DatePropertyExample.mjs +430 -0
- package/dist/components/examples/properties/DatePropertyExample.mjs.map +1 -0
- package/dist/components/examples/properties/MultiSelectPropertyExample.d.mts +18 -0
- package/dist/components/examples/properties/MultiSelectPropertyExample.d.ts +13 -3
- package/dist/components/examples/properties/MultiSelectPropertyExample.js +847 -15
- package/dist/components/examples/properties/MultiSelectPropertyExample.js.map +1 -0
- package/dist/components/examples/properties/MultiSelectPropertyExample.mjs +818 -0
- package/dist/components/examples/properties/MultiSelectPropertyExample.mjs.map +1 -0
- package/dist/components/examples/properties/NumberPropertyExample.d.mts +14 -0
- package/dist/components/examples/properties/NumberPropertyExample.d.ts +11 -3
- package/dist/components/examples/properties/NumberPropertyExample.js +455 -12
- package/dist/components/examples/properties/NumberPropertyExample.js.map +1 -0
- package/dist/components/examples/properties/NumberPropertyExample.mjs +426 -0
- package/dist/components/examples/properties/NumberPropertyExample.mjs.map +1 -0
- package/dist/components/examples/properties/SelectPropertyExample.d.mts +17 -0
- package/dist/components/examples/properties/SelectPropertyExample.d.ts +14 -3
- package/dist/components/examples/properties/SelectPropertyExample.js +582 -16
- package/dist/components/examples/properties/SelectPropertyExample.js.map +1 -0
- package/dist/components/examples/properties/SelectPropertyExample.mjs +554 -0
- package/dist/components/examples/properties/SelectPropertyExample.mjs.map +1 -0
- package/dist/components/examples/properties/TextPropertyExample.d.mts +16 -0
- package/dist/components/examples/properties/TextPropertyExample.d.ts +11 -3
- package/dist/components/examples/properties/TextPropertyExample.js +404 -12
- package/dist/components/examples/properties/TextPropertyExample.js.map +1 -0
- package/dist/components/examples/properties/TextPropertyExample.mjs +370 -0
- package/dist/components/examples/properties/TextPropertyExample.mjs.map +1 -0
- package/dist/components/icons/Helpwave.d.mts +14 -0
- package/dist/components/icons/Helpwave.d.ts +7 -3
- package/dist/components/icons/Helpwave.js +66 -18
- package/dist/components/icons/Helpwave.js.map +1 -0
- package/dist/components/icons/Helpwave.mjs +43 -0
- package/dist/components/icons/Helpwave.mjs.map +1 -0
- package/dist/components/icons/Tag.d.mts +14 -0
- package/dist/components/icons/Tag.d.ts +7 -3
- package/dist/components/icons/Tag.js +59 -11
- package/dist/components/icons/Tag.js.map +1 -0
- package/dist/components/icons/Tag.mjs +25 -0
- package/dist/components/icons/Tag.mjs.map +1 -0
- package/dist/components/layout/Carousel.d.mts +25 -0
- package/dist/components/layout/Carousel.d.ts +6 -3
- package/dist/components/layout/Carousel.js +477 -226
- package/dist/components/layout/Carousel.js.map +1 -0
- package/dist/components/layout/Carousel.mjs +449 -0
- package/dist/components/layout/Carousel.mjs.map +1 -0
- package/dist/components/layout/DividerInserter.d.mts +15 -0
- package/dist/components/layout/DividerInserter.d.ts +7 -3
- package/dist/components/layout/DividerInserter.js +58 -18
- package/dist/components/layout/DividerInserter.js.map +1 -0
- package/dist/components/layout/DividerInserter.mjs +25 -0
- package/dist/components/layout/DividerInserter.mjs.map +1 -0
- package/dist/components/layout/FAQSection.d.mts +26 -0
- package/dist/components/layout/FAQSection.d.ts +9 -6
- package/dist/components/layout/FAQSection.js +336 -13
- package/dist/components/layout/FAQSection.js.map +1 -0
- package/dist/components/layout/FAQSection.mjs +302 -0
- package/dist/components/layout/FAQSection.mjs.map +1 -0
- package/dist/components/layout/Tile.d.mts +37 -0
- package/dist/components/layout/Tile.d.ts +9 -6
- package/dist/components/layout/Tile.js +76 -16
- package/dist/components/layout/Tile.js.map +1 -0
- package/dist/components/layout/Tile.mjs +42 -0
- package/dist/components/layout/Tile.mjs.map +1 -0
- package/dist/components/modals/ConfirmDialog.d.mts +38 -0
- package/dist/components/modals/ConfirmDialog.d.ts +13 -9
- package/dist/components/modals/ConfirmDialog.js +422 -28
- package/dist/components/modals/ConfirmDialog.js.map +1 -0
- package/dist/components/modals/ConfirmDialog.mjs +388 -0
- package/dist/components/modals/ConfirmDialog.mjs.map +1 -0
- package/dist/components/modals/DiscardChangesDialog.d.mts +23 -0
- package/dist/components/modals/DiscardChangesDialog.d.ts +9 -5
- package/dist/components/modals/DiscardChangesDialog.js +406 -23
- package/dist/components/modals/DiscardChangesDialog.js.map +1 -0
- package/dist/components/modals/DiscardChangesDialog.mjs +370 -0
- package/dist/components/modals/DiscardChangesDialog.mjs.map +1 -0
- package/dist/components/modals/InputModal.d.mts +19 -0
- package/dist/components/modals/InputModal.d.ts +14 -4
- package/dist/components/modals/InputModal.js +598 -8
- package/dist/components/modals/InputModal.js.map +1 -0
- package/dist/components/modals/InputModal.mjs +567 -0
- package/dist/components/modals/InputModal.mjs.map +1 -0
- package/dist/components/modals/LanguageModal.d.mts +21 -0
- package/dist/components/modals/LanguageModal.d.ts +9 -5
- package/dist/components/modals/LanguageModal.js +524 -33
- package/dist/components/modals/LanguageModal.js.map +1 -0
- package/dist/components/modals/LanguageModal.mjs +489 -0
- package/dist/components/modals/LanguageModal.mjs.map +1 -0
- package/dist/components/modals/Modal.d.mts +43 -0
- package/dist/components/modals/Modal.d.ts +13 -8
- package/dist/components/modals/Modal.js +280 -51
- package/dist/components/modals/Modal.js.map +1 -0
- package/dist/components/modals/Modal.mjs +249 -0
- package/dist/components/modals/Modal.mjs.map +1 -0
- package/dist/components/modals/ModalRegister.d.mts +16 -0
- package/dist/components/modals/ModalRegister.d.ts +9 -4
- package/dist/components/modals/ModalRegister.js +61 -26
- package/dist/components/modals/ModalRegister.js.map +1 -0
- package/dist/components/modals/ModalRegister.mjs +37 -0
- package/dist/components/modals/ModalRegister.mjs.map +1 -0
- package/dist/components/properties/CheckboxProperty.d.mts +20 -0
- package/dist/components/properties/CheckboxProperty.d.ts +10 -5
- package/dist/components/properties/CheckboxProperty.js +323 -24
- package/dist/components/properties/CheckboxProperty.js.map +1 -0
- package/dist/components/properties/CheckboxProperty.mjs +291 -0
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -0
- package/dist/components/properties/DateProperty.d.mts +18 -0
- package/dist/components/properties/DateProperty.d.ts +10 -3
- package/dist/components/properties/DateProperty.js +422 -21
- package/dist/components/properties/DateProperty.js.map +1 -0
- package/dist/components/properties/DateProperty.mjs +393 -0
- package/dist/components/properties/DateProperty.mjs.map +1 -0
- package/dist/components/properties/MultiSelectProperty.d.mts +18 -0
- package/dist/components/properties/MultiSelectProperty.d.ts +12 -6
- package/dist/components/properties/MultiSelectProperty.js +815 -31
- package/dist/components/properties/MultiSelectProperty.js.map +1 -0
- package/dist/components/properties/MultiSelectProperty.mjs +787 -0
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -0
- package/dist/components/properties/NumberProperty.d.mts +21 -0
- package/dist/components/properties/NumberProperty.d.ts +10 -5
- package/dist/components/properties/NumberProperty.js +429 -39
- package/dist/components/properties/NumberProperty.js.map +1 -0
- package/dist/components/properties/NumberProperty.mjs +402 -0
- package/dist/components/properties/NumberProperty.mjs.map +1 -0
- package/dist/components/properties/PropertyBase.d.mts +27 -0
- package/dist/components/properties/PropertyBase.d.ts +9 -5
- package/dist/components/properties/PropertyBase.js +194 -24
- package/dist/components/properties/PropertyBase.js.map +1 -0
- package/dist/components/properties/PropertyBase.mjs +162 -0
- package/dist/components/properties/PropertyBase.mjs.map +1 -0
- package/dist/components/properties/SelectProperty.d.mts +19 -0
- package/dist/components/properties/SelectProperty.d.ts +13 -6
- package/dist/components/properties/SelectProperty.js +547 -19
- package/dist/components/properties/SelectProperty.js.map +1 -0
- package/dist/components/properties/SelectProperty.mjs +520 -0
- package/dist/components/properties/SelectProperty.mjs.map +1 -0
- package/dist/components/properties/TextProperty.d.mts +20 -0
- package/dist/components/properties/TextProperty.d.ts +10 -5
- package/dist/components/properties/TextProperty.js +378 -34
- package/dist/components/properties/TextProperty.js.map +1 -0
- package/dist/components/properties/TextProperty.mjs +346 -0
- package/dist/components/properties/TextProperty.mjs.map +1 -0
- package/dist/components/user-input/Checkbox.d.mts +41 -0
- package/dist/components/user-input/Checkbox.d.ts +9 -5
- package/dist/components/user-input/Checkbox.js +148 -63
- package/dist/components/user-input/Checkbox.js.map +1 -0
- package/dist/components/user-input/Checkbox.mjs +112 -0
- package/dist/components/user-input/Checkbox.mjs.map +1 -0
- package/dist/components/user-input/DateAndTimePicker.d.mts +47 -0
- package/dist/components/user-input/DateAndTimePicker.d.ts +15 -7
- package/dist/components/user-input/DateAndTimePicker.js +831 -60
- package/dist/components/user-input/DateAndTimePicker.js.map +1 -0
- package/dist/components/user-input/DateAndTimePicker.mjs +801 -0
- package/dist/components/user-input/DateAndTimePicker.mjs.map +1 -0
- package/dist/components/user-input/Input.d.mts +64 -0
- package/dist/components/user-input/Input.d.ts +12 -9
- package/dist/components/user-input/Input.js +219 -57
- package/dist/components/user-input/Input.js.map +1 -0
- package/dist/components/user-input/Input.mjs +191 -0
- package/dist/components/user-input/Input.mjs.map +1 -0
- package/dist/components/user-input/Label.d.mts +16 -0
- package/dist/components/user-input/Label.d.ts +8 -4
- package/dist/components/user-input/Label.js +43 -11
- package/dist/components/user-input/Label.js.map +1 -0
- package/dist/components/user-input/Label.mjs +19 -0
- package/dist/components/user-input/Label.mjs.map +1 -0
- package/dist/components/user-input/Menu.d.mts +24 -0
- package/dist/components/user-input/Menu.d.ts +8 -5
- package/dist/components/user-input/Menu.js +162 -25
- package/dist/components/user-input/Menu.js.map +1 -0
- package/dist/components/user-input/Menu.mjs +127 -0
- package/dist/components/user-input/Menu.mjs.map +1 -0
- package/dist/components/user-input/MultiSelect.d.mts +43 -0
- package/dist/components/user-input/MultiSelect.d.ts +12 -8
- package/dist/components/user-input/MultiSelect.js +545 -56
- package/dist/components/user-input/MultiSelect.js.map +1 -0
- package/dist/components/user-input/MultiSelect.mjs +516 -0
- package/dist/components/user-input/MultiSelect.mjs.map +1 -0
- package/dist/components/user-input/ScrollPicker.d.mts +15 -0
- package/dist/components/user-input/ScrollPicker.d.ts +6 -2
- package/dist/components/user-input/ScrollPicker.js +276 -145
- package/dist/components/user-input/ScrollPicker.js.map +1 -0
- package/dist/components/user-input/ScrollPicker.mjs +247 -0
- package/dist/components/user-input/ScrollPicker.mjs.map +1 -0
- package/dist/components/user-input/SearchableSelect.d.mts +14 -0
- package/dist/components/user-input/SearchableSelect.d.ts +9 -3
- package/dist/components/user-input/SearchableSelect.js +334 -13
- package/dist/components/user-input/SearchableSelect.js.map +1 -0
- package/dist/components/user-input/SearchableSelect.mjs +305 -0
- package/dist/components/user-input/SearchableSelect.mjs.map +1 -0
- package/dist/components/user-input/Select.d.mts +36 -0
- package/dist/components/user-input/Select.d.ts +9 -5
- package/dist/components/user-input/Select.js +152 -47
- package/dist/components/user-input/Select.js.map +1 -0
- package/dist/components/user-input/Select.mjs +118 -0
- package/dist/components/user-input/Select.mjs.map +1 -0
- package/dist/components/user-input/Textarea.d.mts +24 -0
- package/dist/components/user-input/Textarea.d.ts +8 -4
- package/dist/components/user-input/Textarea.js +153 -31
- package/dist/components/user-input/Textarea.js.map +1 -0
- package/dist/components/user-input/Textarea.mjs +120 -0
- package/dist/components/user-input/Textarea.mjs.map +1 -0
- package/dist/components/user-input/ToggleableInput.d.mts +35 -0
- package/dist/components/user-input/ToggleableInput.d.ts +6 -3
- package/dist/components/user-input/ToggleableInput.js +161 -38
- package/dist/components/user-input/ToggleableInput.js.map +1 -0
- package/dist/components/user-input/ToggleableInput.mjs +128 -0
- package/dist/components/user-input/ToggleableInput.mjs.map +1 -0
- package/dist/css/uncompiled/globals.css +488 -0
- package/dist/hooks/useHoverState.d.mts +42 -0
- package/dist/hooks/useHoverState.d.ts +5 -3
- package/dist/hooks/useHoverState.js +69 -43
- package/dist/hooks/useHoverState.js.map +1 -0
- package/dist/hooks/useHoverState.mjs +47 -0
- package/dist/hooks/useHoverState.mjs.map +1 -0
- package/dist/hooks/useLanguage.d.mts +21 -0
- package/dist/hooks/useLanguage.d.ts +15 -11
- package/dist/hooks/useLanguage.js +145 -50
- package/dist/hooks/useLanguage.js.map +1 -0
- package/dist/hooks/useLanguage.mjs +115 -0
- package/dist/hooks/useLanguage.mjs.map +1 -0
- package/dist/hooks/useLocalStorage.d.mts +6 -0
- package/dist/hooks/useLocalStorage.d.ts +4 -2
- package/dist/hooks/useLocalStorage.js +79 -23
- package/dist/hooks/useLocalStorage.js.map +1 -0
- package/dist/hooks/useLocalStorage.mjs +59 -0
- package/dist/hooks/useLocalStorage.mjs.map +1 -0
- package/dist/hooks/useOutsideClick.d.mts +5 -0
- package/dist/hooks/useOutsideClick.d.ts +5 -2
- package/dist/hooks/useOutsideClick.js +47 -21
- package/dist/hooks/useOutsideClick.js.map +1 -0
- package/dist/hooks/useOutsideClick.mjs +23 -0
- package/dist/hooks/useOutsideClick.mjs.map +1 -0
- package/dist/hooks/useSaveDelay.d.mts +6 -0
- package/dist/hooks/useSaveDelay.d.ts +2 -1
- package/dist/hooks/useSaveDelay.js +62 -38
- package/dist/hooks/useSaveDelay.js.map +1 -0
- package/dist/hooks/useSaveDelay.mjs +44 -0
- package/dist/hooks/useSaveDelay.mjs.map +1 -0
- package/dist/hooks/useTheme.d.mts +21 -0
- package/dist/hooks/useTheme.d.ts +14 -9
- package/dist/hooks/useTheme.js +65 -29
- package/dist/hooks/useTheme.js.map +1 -0
- package/dist/hooks/useTheme.mjs +40 -0
- package/dist/hooks/useTheme.mjs.map +1 -0
- package/dist/hooks/useTranslation.d.mts +28 -0
- package/dist/hooks/useTranslation.d.ts +9 -5
- package/dist/hooks/useTranslation.js +53 -10
- package/dist/hooks/useTranslation.js.map +1 -0
- package/dist/hooks/useTranslation.mjs +27 -0
- package/dist/hooks/useTranslation.mjs.map +1 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1 -0
- package/dist/index.mjs.map +1 -0
- package/dist/util/array.d.mts +25 -0
- package/dist/util/array.d.ts +9 -7
- package/dist/util/array.js +119 -92
- package/dist/util/array.js.map +1 -0
- package/dist/util/array.mjs +99 -0
- package/dist/util/array.mjs.map +1 -0
- package/dist/util/builder.d.mts +8 -0
- package/dist/util/builder.d.ts +3 -1
- package/dist/util/builder.js +33 -8
- package/dist/util/builder.js.map +1 -0
- package/dist/util/builder.mjs +9 -0
- package/dist/util/builder.mjs.map +1 -0
- package/dist/util/date.d.mts +30 -0
- package/dist/util/date.d.ts +17 -15
- package/dist/util/date.js +184 -123
- package/dist/util/date.js.map +1 -0
- package/dist/util/date.mjs +156 -0
- package/dist/util/date.mjs.map +1 -0
- package/dist/util/easeFunctions.d.mts +11 -0
- package/dist/util/easeFunctions.d.ts +4 -2
- package/dist/util/easeFunctions.js +63 -30
- package/dist/util/easeFunctions.js.map +1 -0
- package/dist/util/easeFunctions.mjs +36 -0
- package/dist/util/easeFunctions.mjs.map +1 -0
- package/dist/util/emailValidation.d.mts +3 -0
- package/dist/util/emailValidation.d.ts +3 -1
- package/dist/util/emailValidation.js +32 -2
- package/dist/util/emailValidation.js.map +1 -0
- package/dist/util/emailValidation.mjs +8 -0
- package/dist/util/emailValidation.mjs.map +1 -0
- package/dist/util/loopingArray.d.mts +25 -0
- package/dist/util/loopingArray.d.ts +4 -2
- package/dist/util/loopingArray.js +89 -59
- package/dist/util/loopingArray.js.map +1 -0
- package/dist/util/loopingArray.mjs +72 -0
- package/dist/util/loopingArray.mjs.map +1 -0
- package/dist/util/math.d.mts +3 -0
- package/dist/util/math.d.ts +3 -1
- package/dist/util/math.js +32 -2
- package/dist/util/math.js.map +1 -0
- package/dist/util/math.mjs +8 -0
- package/dist/util/math.mjs.map +1 -0
- package/dist/util/news.d.mts +103 -0
- package/dist/util/news.d.ts +21 -16
- package/dist/util/news.js +73 -24
- package/dist/util/news.js.map +1 -0
- package/dist/util/news.mjs +48 -0
- package/dist/util/news.mjs.map +1 -0
- package/dist/util/noop.d.mts +3 -0
- package/dist/util/noop.d.ts +3 -1
- package/dist/util/noop.js +31 -1
- package/dist/util/noop.js.map +1 -0
- package/dist/util/noop.mjs +6 -0
- package/dist/util/noop.mjs.map +1 -0
- package/dist/util/simpleSearch.d.mts +50 -0
- package/dist/util/simpleSearch.d.ts +6 -4
- package/dist/util/simpleSearch.js +50 -58
- package/dist/util/simpleSearch.js.map +1 -0
- package/dist/util/simpleSearch.mjs +26 -0
- package/dist/util/simpleSearch.mjs.map +1 -0
- package/dist/util/storage.d.mts +16 -0
- package/dist/util/storage.d.ts +4 -3
- package/dist/util/storage.js +63 -31
- package/dist/util/storage.js.map +1 -0
- package/dist/util/storage.mjs +38 -0
- package/dist/util/storage.mjs.map +1 -0
- package/dist/util/types.d.mts +3 -0
- package/dist/util/types.d.ts +3 -1
- package/dist/util/types.js +19 -1
- package/dist/util/types.js.map +1 -0
- package/dist/util/types.mjs +1 -0
- package/dist/util/types.mjs.map +1 -0
- package/package.json +15 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/examples/date/DateTimePickerExample.tsx","../../../../src/components/user-input/DateAndTimePicker.tsx","../../../../src/hooks/useLanguage.tsx","../../../../src/hooks/useLocalStorage.tsx","../../../../src/hooks/useTranslation.ts","../../../../src/util/noop.ts","../../../../src/util/array.ts","../../../../src/util/date.ts","../../../../src/components/Button.tsx","../../../../src/components/date/TimePicker.tsx","../../../../src/components/date/DatePicker.tsx","../../../../src/components/date/YearMonthPicker.tsx","../../../../src/components/Expandable.tsx","../../../../src/components/date/DayPicker.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport type { DateTimePickerProps } from '../../user-input/DateAndTimePicker'\nimport { DateTimePicker } from '../../user-input/DateAndTimePicker'\nimport { noop } from '../../../util/noop'\nimport type { DatePickerProps } from '../../date/DatePicker'\nimport type { TimePickerProps } from '../../date/TimePicker'\nimport type { YearMonthPickerProps } from '../../date/YearMonthPicker'\nimport type { DayPickerProps } from '../../date/DayPicker'\n\nexport type DateTimePickerExampleProps = Omit<DateTimePickerProps, 'datePickerProps' | 'timePickerProps'> &\n Pick<DatePickerProps, 'initialDisplay'> & Pick<TimePickerProps, 'is24HourFormat' | 'minuteIncrement'> &\n Pick<YearMonthPickerProps, 'showValueOpen'> & Pick<DayPickerProps, 'markToday' | 'weekStart'>\n\n/**\n * Example for the DateTimePicker\n */\nexport const DateTimePickerExample = ({\n value,\n onChange = noop,\n onRemove = noop,\n onFinish = noop,\n initialDisplay,\n is24HourFormat,\n minuteIncrement,\n showValueOpen,\n markToday,\n weekStart,\n ...props\n}: DateTimePickerExampleProps) => {\n const [time, setTime] = useState(value)\n\n useEffect(() => setTime(value), [value])\n return (\n <DateTimePicker\n {...props}\n value={time}\n onChange={date => {\n onChange(date)\n setTime(date)\n }}\n onRemove={() => {\n onRemove()\n setTime(new Date())\n }}\n onFinish={date => {\n onFinish(date)\n setTime(date)\n }}\n timePickerProps={{ is24HourFormat, minuteIncrement }}\n datePickerProps={{ initialDisplay, dayPickerProps: { markToday, weekStart }, yearMonthPickerProps: { showValueOpen } }}\n />\n )\n}\n","import type { ReactNode } from 'react'\nimport clsx from 'clsx'\nimport type { Languages } from '../../hooks/useLanguage'\nimport type { PropsForTranslation } from '../../hooks/useTranslation'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport { noop } from '../../util/noop'\nimport { addDuration, subtractDuration } from '../../util/date'\nimport { SolidButton } from '../Button'\nimport type { TimePickerProps } from '../date/TimePicker'\nimport { TimePicker } from '../date/TimePicker'\nimport type { DatePickerProps } from '../date/DatePicker'\nimport { DatePicker } from '../date/DatePicker'\n\ntype TimeTranslation = {\n clear: string,\n change: string,\n year: string,\n month: string,\n day: string,\n january: string,\n february: string,\n march: string,\n april: string,\n may: string,\n june: string,\n july: string,\n august: string,\n september: string,\n october: string,\n november: string,\n december: string,\n}\n\nconst defaultTimeTranslation: Record<Languages, TimeTranslation> = {\n en: {\n clear: 'Clear',\n change: 'Change',\n year: 'Year',\n month: 'Month',\n day: 'Day',\n january: 'January',\n february: 'Febuary',\n march: 'March',\n april: 'April',\n may: 'May',\n june: 'June',\n july: 'July',\n august: 'August',\n september: 'September',\n october: 'October',\n november: 'November',\n december: 'December',\n },\n de: {\n clear: 'Entfernen',\n change: 'Ändern',\n year: 'Jahr',\n month: 'Monat',\n day: 'Tag',\n january: 'Januar',\n february: 'Febuar',\n march: 'März',\n april: 'April',\n may: 'Mai',\n june: 'Juni',\n july: 'Juli',\n august: 'August',\n september: 'September',\n october: 'October',\n november: 'November',\n december: 'December',\n }\n}\n\nexport type DateTimePickerMode = 'date' | 'time' | 'dateTime'\n\nexport type DateTimePickerProps = {\n mode?: DateTimePickerMode,\n value?: Date,\n start?: Date,\n end?: Date,\n onChange?: (date: Date) => void,\n onFinish?: (date: Date) => void,\n onRemove?: () => void,\n datePickerProps?: Omit<DatePickerProps, 'onChange' | 'value' | 'start' | 'end'>,\n timePickerProps?: Omit<TimePickerProps, 'onChange' | 'time' | 'maxHeight'>,\n}\n\n/**\n * A Component for picking a Date and Time\n */\nexport const DateTimePicker = ({\n overwriteTranslation,\n value = new Date(),\n start = subtractDuration(new Date(), { years: 50 }),\n end = addDuration(new Date(), { years: 50 }),\n mode = 'dateTime',\n onFinish = noop,\n onChange = noop,\n onRemove = noop,\n timePickerProps,\n datePickerProps,\n}: PropsForTranslation<TimeTranslation, DateTimePickerProps>) => {\n const translation = useTranslation(defaultTimeTranslation, overwriteTranslation)\n\n const useDate = mode === 'dateTime' || mode === 'date'\n const useTime = mode === 'dateTime' || mode === 'time'\n\n let dateDisplay: ReactNode\n let timeDisplay: ReactNode\n\n if (useDate) {\n dateDisplay = (\n <DatePicker\n {...datePickerProps}\n className=\"min-w-[320px] min-h-[250px]\"\n yearMonthPickerProps={{ maxHeight: 218 }}\n value={value}\n start={start}\n end={end}\n onChange={onChange}\n />\n )\n }\n if (useTime) {\n timeDisplay = (\n <TimePicker\n {...timePickerProps}\n className={clsx('h-full', { 'justify-between w-full': mode === 'time' })}\n maxHeight={250}\n time={value}\n onChange={onChange}\n />\n )\n }\n\n return (\n <div className=\"col w-fit\">\n <div className=\"row gap-x-4\">\n {dateDisplay}\n {timeDisplay}\n </div>\n <div className=\"row justify-end\">\n <div className=\"row gap-x-2 mt-1\">\n <SolidButton size=\"medium\" color=\"negative\" onClick={onRemove}>{translation.clear}</SolidButton>\n <SolidButton\n size=\"medium\"\n onClick={() => onFinish(value)}\n >\n {translation.change}\n </SolidButton>\n </div>\n </div>\n </div>\n )\n}\n","import type { Dispatch, PropsWithChildren, SetStateAction } from 'react'\nimport { createContext, useContext, useEffect, useState } from 'react'\nimport useLocalStorage from './useLocalStorage'\n\nexport const languages = ['en', 'de'] as const\nexport type Languages = typeof languages[number]\nexport const languagesLocalNames: Record<Languages, string> = {\n en: 'English',\n de: 'Deutsch',\n}\n\nexport const DEFAULT_LANGUAGE = 'en'\n\nexport type LanguageContextValue = {\n language: Languages,\n setLanguage: Dispatch<SetStateAction<Languages>>,\n}\n\nexport const LanguageContext = createContext<LanguageContextValue>({ language: DEFAULT_LANGUAGE, setLanguage: (v) => v })\n\nexport const useLanguage = () => useContext(LanguageContext)\n\nexport const useLocale = (overWriteLanguage?: Languages) => {\n const { language } = useLanguage()\n const mapping: Record<Languages, string> = {\n en: 'en-US',\n de: 'de-DE'\n }\n return mapping[overWriteLanguage ?? language]\n}\n\ntype ProvideLanguageProps = {\n initialLanguage?: Languages,\n}\n\nexport const ProvideLanguage = ({ initialLanguage, children }: PropsWithChildren<ProvideLanguageProps>) => {\n const [language, setLanguage] = useState<Languages>(initialLanguage ?? DEFAULT_LANGUAGE)\n const [storedLanguage, setStoredLanguage] = useLocalStorage<Languages>('language', initialLanguage ?? DEFAULT_LANGUAGE)\n\n useEffect(() => {\n if(language !== initialLanguage && initialLanguage){\n console.warn('LanguageProvider initial state changed: Prefer using useLanguages\\'s setLanguage instead')\n setLanguage(initialLanguage)\n }\n }, [initialLanguage]) // eslint-disable-line react-hooks/exhaustive-deps\n\n useEffect(() => {\n // TODO set locale of html tag here as well\n setStoredLanguage(language)\n }, [language, setStoredLanguage])\n\n useEffect(() => {\n if (storedLanguage !== null) {\n setLanguage(storedLanguage)\n return\n }\n\n const languagesToTestAgainst = Object.values(languages)\n\n const matchingBrowserLanguages = window.navigator.languages\n .map(language => languagesToTestAgainst.find((test) => language === test || language.split('-')[0] === test))\n .filter(entry => entry !== undefined)\n\n if (matchingBrowserLanguages.length === 0) return\n\n const firstMatch = matchingBrowserLanguages[0] as Languages\n setLanguage(firstMatch)\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <LanguageContext.Provider value={{\n language,\n setLanguage\n }}>\n {children}\n </LanguageContext.Provider>\n )\n}\n","import type { Dispatch, SetStateAction } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport { LocalStorageService } from '../util/storage'\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\nconst useLocalStorage = <T, >(key: string, initValue: T): [T, SetValue<T>] => {\n const get = useCallback((): T => {\n if (typeof window === 'undefined') {\n return initValue\n }\n const storageService = new LocalStorageService()\n const value = storageService.get<T>(key)\n return value || initValue\n }, [initValue, key])\n\n const [storedValue, setStoredValue] = useState<T>(get)\n\n const setValue: SetValue<T> = useCallback(value => {\n const newValue = value instanceof Function ? value(storedValue) : value\n const storageService = new LocalStorageService()\n storageService.set(key, value)\n\n setStoredValue(newValue)\n }, [storedValue, setStoredValue, key])\n\n useEffect(() => {\n setStoredValue(get())\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return [storedValue, setValue]\n}\n\nexport default useLocalStorage\n","import type { Languages } from './useLanguage'\nimport { useLanguage } from './useLanguage'\n\nexport type Translation<T> = Record<Languages, T>\n\ntype OverwriteTranslationType<Translation extends Record<string, unknown>> = {\n language?: Languages,\n translation?: Partial<Record<Languages, Partial<Translation>>>,\n}\n\n/**\n * Adds the `language` prop to the component props.\n *\n * @param Translation the type of the translation object\n *\n * @param Props the type of the component props, defaults to `Record<string, never>`,\n * if you don't expect any other props other than `language` and get an\n * error when using your component (because it uses `forwardRef` etc.)\n * you can try out `Record<string, unknown>`, this might resolve your\n * problem as `SomeType & never` is still `never` but `SomeType & unknown`\n * is `SomeType` which means that adding back props (like `ref` etc.)\n * works properly\n */\nexport type PropsForTranslation<\n Translation extends Record<string, unknown>,\n Props = Record<string, never>\n> = Props & {\n overwriteTranslation?: OverwriteTranslationType<Translation>,\n};\n\nexport const useTranslation = <Translation extends Record<string, unknown>>(\n defaults: Record<Languages, Translation>,\n translationOverwrite: OverwriteTranslationType<Translation> = {}\n) : Translation => {\n const { language: languageProp, translation: overwrite } = translationOverwrite\n const { language: inferredLanguage } = useLanguage()\n const usedLanguage = languageProp ?? inferredLanguage\n let defaultValues: Translation = defaults[usedLanguage]\n if (overwrite && overwrite[usedLanguage]) {\n defaultValues = { ...defaultValues, ...overwrite[usedLanguage] }\n }\n return defaultValues\n}\n","export const noop = () => undefined\n","export const equalSizeGroups = <T >(array: T[], groupSize: number): T[][] => {\n if (groupSize <= 0) {\n console.warn(`group size should be greater than 0: groupSize = ${groupSize}`)\n return [[...array]]\n }\n\n const groups = []\n for (let i = 0; i < array.length; i += groupSize) {\n groups.push(array.slice(i, Math.min(i + groupSize, array.length)))\n }\n return groups\n}\n\n/**\n * @param start\n * @param end inclusive\n * @param allowEmptyRange Whether the range can be defined empty via end < start\n */\nexport const range = (start: number, end: number, allowEmptyRange: boolean = false): number[] => {\n if (end < start) {\n if (!allowEmptyRange) {\n console.warn(`range: end (${end}) < start (${start}) should be allowed explicitly, set allowEmptyRange to true`)\n }\n return []\n }\n return Array.from({ length: end - start + 1 }, (_, index) => index + start)\n}\n\n/** Finds the closest match\n * @param list The list of all possible matches\n * @param firstCloser Return whether item1 is closer than item2\n */\nexport const closestMatch = <T >(list: T[], firstCloser: (item1: T, item2: T) => boolean) => {\n return list.reduce((item1, item2) => {\n return firstCloser(item1, item2) ? item1 : item2\n })\n}\n\n/**\n * returns the item in middle of a list and its neighbours before and after\n * e.g. [1,2,3,4,5,6] for item = 1 would return [5,6,1,2,3]\n */\nexport const getNeighbours = <T >(list: T[], item: T, neighbourDistance: number = 2) => {\n const index = list.indexOf(item)\n const totalItems = neighbourDistance * 2 + 1\n if (list.length < totalItems) {\n console.warn('List is to short')\n return list\n }\n\n if (index === -1) {\n console.error('item not found in list')\n return list.splice(0, totalItems)\n }\n\n let start = index - neighbourDistance\n if (start < 0) {\n start += list.length\n }\n const end = (index + neighbourDistance + 1) % list.length\n\n const result: T[] = []\n let ignoreOnce = list.length === totalItems\n for (let i = start; i !== end || ignoreOnce; i = (i + 1) % list.length) {\n result.push(list[i]!)\n if (end === i && ignoreOnce) {\n ignoreOnce = false\n }\n }\n return result\n}\n\nexport const createLoopingListWithIndex = <T >(list: T[], startIndex: number = 0, length: number = 0, forwards: boolean = true) => {\n if (length < 0) {\n console.warn(`createLoopingList: length must be >= 0, given ${length}`)\n } else if (length === 0) {\n length = list.length\n }\n\n const returnList: [number, T][] = []\n\n if (forwards) {\n for (let i = startIndex; returnList.length < length; i = (i + 1) % list.length) {\n returnList.push([i, list[i]!])\n }\n } else {\n for (let i = startIndex; returnList.length < length; i = i === 0 ? i = list.length - 1 : i - 1) {\n returnList.push([i, list[i]!])\n }\n }\n\n return returnList\n}\n\nexport const createLoopingList = <T >(list: T[], startIndex: number = 0, length: number = 0, forwards: boolean = true) => {\n return createLoopingListWithIndex(list, startIndex, length, forwards).map(([_, item]) => item)\n}\n\nexport const ArrayUtil = {\n unique: <T>(list: T[]): T[] => {\n const seen = new Set<T>()\n return list.filter((item) => {\n if (seen.has(item)) {\n return false\n }\n seen.add(item)\n return true\n })\n },\n\n difference: <T>(list: T[], removeList: T[]): T[] => {\n const remove = new Set<T>(removeList)\n return list.filter((item) => !remove.has(item))\n }\n}\n","import { equalSizeGroups } from './array'\n\nexport const monthsList = ['january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'] as const\nexport type Month = typeof monthsList[number]\n\nexport const weekDayList = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'] as const\nexport type WeekDay = typeof weekDayList[number]\n\nexport const formatDate = (date: Date) => {\n const year = date.getFullYear().toString().padStart(4, '0')\n const month = (date.getMonth() + 1).toString().padStart(2, '0')\n const day = (date.getDate()).toString().padStart(2, '0')\n return `${year}-${month}-${day}`\n}\n\nexport const formatDateTime = (date: Date) => {\n const dateString = formatDate(date)\n const hours = date.getHours().toString().padStart(2, '0')\n const minutes = date.getMinutes().toString().padStart(2, '0')\n return `${dateString}T${hours}:${minutes}`\n}\n\nexport const getDaysInMonth = (year: number, month: number): number => {\n const lastDayOfMonth = new Date(year, month + 1, 0)\n return lastDayOfMonth.getDate()\n}\n\nexport type Duration = {\n years?: number,\n months?: number,\n days?: number,\n hours?: number,\n minutes?: number,\n seconds?: number,\n milliseconds?: number,\n}\n\nexport const changeDuration = (date: Date, duration: Duration, isAdding?: boolean): Date => {\n const {\n years = 0,\n months = 0,\n days = 0,\n hours = 0,\n minutes = 0,\n seconds = 0,\n milliseconds = 0,\n } = duration\n\n // Check ranges\n if (years < 0) {\n console.error(`Range error years must be greater than 0: received ${years}`)\n return new Date(date)\n }\n if (months < 0 || months > 11) {\n console.error(`Range error month must be 0 <= month <= 11: received ${months}`)\n return new Date(date)\n }\n if (days < 0) {\n console.error(`Range error days must be greater than 0: received ${days}`)\n return new Date(date)\n }\n if (hours < 0 || hours > 23) {\n console.error(`Range error hours must be 0 <= hours <= 23: received ${hours}`)\n return new Date(date)\n }\n if (minutes < 0 || minutes > 59) {\n console.error(`Range error minutes must be 0 <= minutes <= 59: received ${minutes}`)\n return new Date(date)\n }\n if (seconds < 0 || seconds > 59) {\n console.error(`Range error seconds must be 0 <= seconds <= 59: received ${seconds}`)\n return new Date(date)\n }\n if (milliseconds < 0) {\n console.error(`Range error seconds must be greater than 0: received ${milliseconds}`)\n return new Date(date)\n }\n\n const multiplier = isAdding ? 1 : -1\n\n const newDate = new Date(date)\n\n newDate.setFullYear(newDate.getFullYear() + multiplier * years)\n\n newDate.setMonth(newDate.getMonth() + multiplier * months)\n\n newDate.setDate(newDate.getDate() + multiplier * days)\n\n newDate.setHours(newDate.getHours() + multiplier * hours)\n\n newDate.setMinutes(newDate.getMinutes() + multiplier * minutes)\n\n newDate.setSeconds(newDate.getSeconds() + multiplier * seconds)\n\n newDate.setMilliseconds(newDate.getMilliseconds() + multiplier * milliseconds)\n\n return newDate\n}\n\nexport const addDuration = (date: Date, duration: Duration): Date => {\n return changeDuration(date, duration, true)\n}\n\nexport const subtractDuration = (date: Date, duration: Duration): Date => {\n return changeDuration(date, duration, false)\n}\n\nexport const getBetweenDuration = (startDate: Date, endDate: Date): Duration => {\n const durationInMilliseconds = endDate.getTime() - startDate.getTime()\n\n const millisecondsInSecond = 1000\n const millisecondsInMinute = 60 * millisecondsInSecond\n const millisecondsInHour = 60 * millisecondsInMinute\n const millisecondsInDay = 24 * millisecondsInHour\n const millisecondsInMonth = 30 * millisecondsInDay // Rough estimation, can be adjusted\n\n const years = Math.floor(durationInMilliseconds / (365.25 * millisecondsInDay))\n const months = Math.floor(durationInMilliseconds / millisecondsInMonth)\n const days = Math.floor(durationInMilliseconds / millisecondsInDay)\n const hours = Math.floor((durationInMilliseconds % millisecondsInDay) / millisecondsInHour)\n const seconds = Math.floor((durationInMilliseconds % millisecondsInHour) / millisecondsInSecond)\n const milliseconds = durationInMilliseconds % millisecondsInSecond\n\n return {\n years,\n months,\n days,\n hours,\n seconds,\n milliseconds,\n }\n}\n\n/** Checks if a given date is in the range of two dates\n *\n * An undefined value for startDate or endDate means no bound for the start or end respectively\n */\nexport const isInTimeSpan = (value: Date, startDate?: Date, endDate?: Date): boolean => {\n if(startDate && endDate) {\n console.assert(startDate <= endDate)\n return startDate <= value && value <= endDate\n } else if (startDate) {\n return startDate <= value\n } else if(endDate) {\n return endDate >= value\n } else {\n return true\n }\n}\n\n/** Compare two dates on the year, month, day */\nexport const equalDate = (date1: Date, date2: Date) => {\n return date1.getFullYear() === date2.getFullYear()\n && date1.getMonth() === date2.getMonth()\n && date1.getDate() === date2.getDate()\n}\n\nexport const getWeeksForCalenderMonth = (date: Date, weekStart: WeekDay, weeks: number = 6) => {\n const month = date.getMonth()\n const year = date.getFullYear()\n\n const dayList: Date[] = []\n let currentDate = new Date(year, month, 1) // Start of month\n const weekStartIndex = weekDayList.indexOf(weekStart)\n\n // Move the current day to the week before\n while (currentDate.getDay() !== weekStartIndex) {\n currentDate = subtractDuration(currentDate, { days: 1 })\n }\n\n while (dayList.length < 7 * weeks) {\n const date = new Date(currentDate)\n date.setHours(date.getHours(), date.getMinutes()) // To make sure we are not overwriting the time\n dayList.push(date)\n currentDate = addDuration(currentDate, { days: 1 })\n }\n\n // weeks\n return equalSizeGroups(dayList, 7)\n}\n","import type { PropsWithChildren, ButtonHTMLAttributes, ReactNode } from 'react'\nimport clsx from 'clsx'\n\nexport type SolidButtonColor = 'primary' | 'secondary' | 'tertiary' | 'positive' | 'warning'| 'negative'\nexport type OutlineButtonColor = 'primary'\nexport type TextButtonColor = 'negative' | 'neutral'\n\ntype ButtonSizes = 'small' | 'medium' | 'large'\n\n/**\n * The shard properties between all button types\n */\nexport type ButtonProps = PropsWithChildren<{\n /**\n * @default 'medium'\n */\n size?: ButtonSizes,\n}> & ButtonHTMLAttributes<Element>\n\nexport const ButtonSizePaddings: Record<ButtonSizes, string> = {\n small: 'btn-sm',\n medium: 'btn-md',\n large: 'btn-lg'\n}\n\ntype ButtonWithIconsProps = ButtonProps & {\n startIcon?: ReactNode,\n endIcon?: ReactNode,\n}\n\nexport type SolidButtonProps = ButtonWithIconsProps & {\n color?: SolidButtonColor,\n}\n\nexport type OutlineButtonProps = ButtonWithIconsProps & {\n color?: OutlineButtonColor,\n}\n\nexport type TextButtonProps = ButtonWithIconsProps & {\n color?: TextButtonColor,\n}\n\n/**\n * A button with a solid background and different sizes\n */\nconst SolidButton = ({\n children,\n disabled = false,\n color = 'primary',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: SolidButtonProps) => {\n const colorClasses = {\n primary: 'bg-button-solid-primary-background text-button-solid-primary-text',\n secondary: 'bg-button-solid-secondary-background text-button-solid-secondary-text',\n tertiary: 'bg-button-solid-tertiary-background text-button-solid-tertiary-text',\n positive: 'bg-button-solid-positive-background text-button-solid-positive-text',\n warning: 'bg-button-solid-warning-background text-button-solid-warning-text',\n negative: 'bg-button-solid-negative-background text-button-solid-negative-text',\n }[color]\n\n const iconColorClasses = {\n primary: 'text-button-solid-primary-icon',\n secondary: 'text-button-solid-secondary-icon',\n tertiary: 'text-button-solid-tertiary-icon',\n positive: 'text-button-solid-positive-icon',\n warning: 'text-button-solid-warning-icon',\n negative: 'text-button-solid-negative-icon',\n }[color]\n\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className,\n {\n 'text-disabled-text bg-disabled-background': disabled,\n [clsx(colorClasses, 'hover:brightness-90')]: !disabled\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n/**\n * A button with an outline border and different sizes\n */\nconst OutlineButton = ({\n children,\n disabled = false,\n color = 'primary',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: OutlineButtonProps) => {\n const colorClasses = {\n primary: 'bg-transparent border-2 border-button-outline-primary-text text-button-outline-primary-text',\n }[color]\n\n const iconColorClasses = {\n primary: 'text-button-outline-primary-icon',\n }[color]\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className, {\n 'text-disabled-text border-disabled-outline)': disabled,\n [clsx(colorClasses, 'hover:brightness-80')]: !disabled,\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n/**\n * A text that is a button that can have different sizes\n */\nconst TextButton = ({\n children,\n disabled = false,\n color = 'neutral',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: TextButtonProps) => {\n const colorClasses = {\n negative: 'bg-transparent text-button-text-negative-text',\n neutral: 'bg-transparent text-button-text-neutral-text',\n }[color]\n\n const iconColorClasses = {\n negative: 'text-button-text-negative-icon',\n neutral: 'text-button-text-neutral-icon',\n }[color]\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className, {\n 'text-disabled-text': disabled,\n [clsx(colorClasses, 'hover:bg-button-text-hover-background rounded-full')]: !disabled,\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n// TODO Icon button\n\nexport { SolidButton, OutlineButton, TextButton }\n","import { useEffect, useRef, useState } from 'react'\nimport { Scrollbars } from 'react-custom-scrollbars-2'\nimport { noop } from '../../util/noop'\nimport { closestMatch, range } from '../../util/array'\nimport clsx from 'clsx'\n\ntype MinuteIncrement = '1min' | '5min' | '10min' | '15min' | '30min'\n\nexport type TimePickerProps = {\n time?: Date,\n onChange?: (time: Date) => void,\n is24HourFormat?: boolean,\n minuteIncrement?: MinuteIncrement,\n maxHeight?: number,\n className?: string,\n}\n\nexport const TimePicker = ({\n time = new Date(),\n onChange = noop,\n is24HourFormat = true,\n minuteIncrement = '5min',\n maxHeight = 300,\n className = ''\n}: TimePickerProps) => {\n const minuteRef = useRef<HTMLButtonElement>(null)\n const hourRef = useRef<HTMLButtonElement>(null)\n\n const isPM = time.getHours() >= 11\n const hours = is24HourFormat ? range(0, 23) : range(1, 12)\n let minutes = range(0, 59)\n\n useEffect(() => {\n const scrollToItem = () => {\n if (minuteRef.current) {\n const container = minuteRef.current.parentElement!\n\n const hasOverflow = container.scrollHeight > maxHeight\n if (hasOverflow) {\n minuteRef.current.scrollIntoView({\n behavior: 'instant',\n block: 'nearest',\n })\n }\n }\n }\n scrollToItem()\n }, [minuteRef, minuteRef.current]) // eslint-disable-line\n\n useEffect(() => {\n const scrollToItem = () => {\n if (hourRef.current) {\n const container = hourRef.current.parentElement!\n\n const hasOverflow = container.scrollHeight > maxHeight\n if (hasOverflow) {\n hourRef.current.scrollIntoView({\n behavior: 'instant',\n block: 'nearest',\n })\n }\n }\n }\n scrollToItem()\n }, [hourRef, hourRef.current]) // eslint-disable-line\n\n switch (minuteIncrement) {\n case '5min':\n minutes = minutes.filter(value => value % 5 === 0)\n break\n case '10min':\n minutes = minutes.filter(value => value % 10 === 0)\n break\n case '15min':\n minutes = minutes.filter(value => value % 15 === 0)\n break\n case '30min':\n minutes = minutes.filter(value => value % 30 === 0)\n break\n }\n\n const closestMinute = closestMatch(minutes, (item1, item2) => Math.abs(item1 - time.getMinutes()) < Math.abs(item2 - time.getMinutes()))\n\n const style = (selected: boolean) => clsx('chip-full hover:brightness-90 hover:bg-primary hover:text-on-primary rounded-md mr-3',\n { 'bg-primary text-on-primary': selected, 'bg-white text-black': !selected })\n\n const onChangeWrapper = (transformer: (newDate: Date) => void) => {\n const newDate = new Date(time)\n transformer(newDate)\n onChange(newDate)\n }\n\n return (\n <div className={clsx('row gap-x-2 w-fit min-w-[150px] select-none', className)}>\n <Scrollbars autoHeight autoHeightMax={maxHeight} style={{ height: '100%' }}>\n <div className=\"col gap-y-1 h-full\">\n {hours.map(hour => {\n const currentHour = hour === time.getHours() - (!is24HourFormat && isPM ? 12 : 0)\n return (\n <button\n key={hour}\n ref={currentHour ? hourRef : undefined}\n className={style(currentHour)}\n onClick={() => onChangeWrapper(newDate => newDate.setHours(hour + (!is24HourFormat && isPM ? 12 : 0)))}\n >\n {hour.toString().padStart(2, '0')}\n </button>\n )\n })}\n </div>\n </Scrollbars>\n <Scrollbars autoHeight autoHeightMax={maxHeight} style={{ height: '100%' }}>\n <div className=\"col gap-y-1 h-full\">\n {minutes.map(minute => {\n const currentMinute = minute === closestMinute\n return (\n <button\n key={minute + minuteIncrement} // minute increment so that scroll works\n ref={currentMinute ? minuteRef : undefined}\n className={style(currentMinute)}\n onClick={() => onChangeWrapper(newDate => newDate.setMinutes(minute))}\n >\n {minute.toString().padStart(2, '0')}\n </button>\n )\n })}\n </div>\n </Scrollbars>\n {!is24HourFormat && (\n <div className=\"col gap-y-1\">\n <button\n className={style(!isPM)}\n onClick={() => onChangeWrapper(newDate => isPM && newDate.setHours(newDate.getHours() - 12))}\n >\n AM\n </button>\n <button\n className={style(isPM)}\n onClick={() => onChangeWrapper(newDate => !isPM && newDate.setHours(newDate.getHours() + 12))}\n >\n PM\n </button>\n </div>\n )}\n </div>\n )\n}\n\nexport const ControlledTimePicker = ({\n time,\n onChange = noop,\n ...props\n }: TimePickerProps) => {\n const [value, setValue] = useState(time)\n useEffect(() => setValue(time), [time])\n\n return (\n <TimePicker\n {...props}\n time={value}\n onChange={time1 => {\n setValue(time1)\n onChange(time1)\n }}\n />\n )\n}\n","import { useEffect, useState } from 'react'\nimport { ArrowDown, ArrowUp, ChevronDown } from 'lucide-react'\nimport type { Languages } from '../../hooks/useLanguage'\nimport type { PropsForTranslation } from '../../hooks/useTranslation'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport { noop } from '../../util/noop'\nimport { addDuration, isInTimeSpan, subtractDuration } from '../../util/date'\nimport clsx from 'clsx'\nimport { SolidButton, TextButton } from '../Button'\nimport { useLocale } from '../../hooks/useLanguage'\nimport type { YearMonthPickerProps } from './YearMonthPicker'\nimport { YearMonthPicker } from './YearMonthPicker'\nimport type { DayPickerProps } from './DayPicker'\nimport { DayPicker } from './DayPicker'\n\ntype DatePickerTranslation = {\n today: string,\n}\n\nconst defaultDatePickerTranslation: Record<Languages, DatePickerTranslation> = {\n en: {\n today: 'Today',\n },\n de: {\n today: 'Heute',\n }\n}\n\ntype DisplayMode = 'yearMonth' | 'day'\n\nexport type DatePickerProps = {\n value?: Date,\n start?: Date,\n end?: Date,\n initialDisplay?: DisplayMode,\n onChange?: (date: Date) => void,\n dayPickerProps?: Omit<DayPickerProps, 'displayedMonth' | 'onChange' | 'selected'>,\n yearMonthPickerProps?: Omit<YearMonthPickerProps, 'displayedYearMonth' | 'onChange' | 'start' | 'end'>,\n className?: string,\n}\n\n/**\n * A Component for picking a date\n */\nexport const DatePicker = ({\n overwriteTranslation,\n value = new Date(),\n start = subtractDuration(new Date(), { years: 50 }),\n end = addDuration(new Date(), { years: 50 }),\n initialDisplay = 'day',\n onChange = noop,\n yearMonthPickerProps,\n dayPickerProps,\n className = ''\n }: PropsForTranslation<DatePickerTranslation, DatePickerProps>) => {\n const locale = useLocale()\n const translation = useTranslation(defaultDatePickerTranslation, overwriteTranslation)\n const [displayedMonth, setDisplayedMonth] = useState<Date>(value)\n const [displayMode, setDisplayMode] = useState<DisplayMode>(initialDisplay)\n\n useEffect(() => {\n setDisplayedMonth(value)\n }, [value])\n\n return (\n <div className={clsx('col gap-y-4', className)}>\n <div className=\"row items-center justify-between h-7\">\n <TextButton\n className={clsx('row gap-x-1 items-center cursor-pointer select-none', {\n 'text-disabled-text': displayMode !== 'day',\n })}\n onClick={() => setDisplayMode(displayMode === 'day' ? 'yearMonth' : 'day')}\n >\n {`${new Intl.DateTimeFormat(locale, { month: 'long' }).format(displayedMonth)} ${displayedMonth.getFullYear()}`}\n <ChevronDown size={16}/>\n </TextButton>\n {displayMode === 'day' && (\n <div className=\"row justify-end\">\n <SolidButton\n size=\"small\"\n color=\"primary\"\n disabled={!isInTimeSpan(subtractDuration(displayedMonth, { months: 1 }), start, end)}\n onClick={() => {\n setDisplayedMonth(subtractDuration(displayedMonth, { months: 1 }))\n }}\n >\n <ArrowUp size={20}/>\n </SolidButton>\n <SolidButton\n size=\"small\"\n color=\"primary\"\n disabled={!isInTimeSpan(addDuration(displayedMonth, { months: 1 }), start, end)}\n onClick={() => {\n setDisplayedMonth(addDuration(displayedMonth, { months: 1 }))\n }}\n >\n <ArrowDown size={20}/>\n </SolidButton>\n </div>\n )}\n </div>\n {displayMode === 'yearMonth' ? (\n <YearMonthPicker\n {...yearMonthPickerProps}\n displayedYearMonth={value}\n start={start}\n end={end}\n onChange={newDate => {\n setDisplayedMonth(newDate)\n setDisplayMode('day')\n }}\n />\n ) : (\n <div>\n <DayPicker\n {...dayPickerProps}\n displayedMonth={displayedMonth}\n start={start}\n end={end}\n selected={value}\n onChange={date => {\n onChange(date)\n }}\n />\n <div className=\"mt-2\">\n <TextButton\n onClick={() => {\n const newDate = new Date()\n newDate.setHours(value.getHours(), value.getMinutes())\n onChange(newDate)\n }}\n >\n {translation.today}\n </TextButton>\n </div>\n </div>\n )}\n </div>\n )\n}\n\n/**\n * Example for the Date Picker\n */\nexport const ControlledDatePicker = ({\n value = new Date(),\n onChange = noop,\n ...props\n }: DatePickerProps) => {\n const [date, setDate] = useState<Date>(value)\n\n useEffect(() => setDate(value), [value])\n\n return (\n <DatePicker\n {...props}\n value={date}\n onChange={date1 => {\n setDate(date1)\n onChange(date1)\n }}\n />\n )\n}\n","import { useEffect, useRef, useState } from 'react'\nimport { Scrollbars } from 'react-custom-scrollbars-2'\nimport { noop } from '../../util/noop'\nimport { equalSizeGroups, range } from '../../util/array'\nimport clsx from 'clsx'\nimport { Expandable } from '../Expandable'\nimport { addDuration, monthsList, subtractDuration } from '../../util/date'\nimport { useLocale } from '../../hooks/useLanguage'\n\nexport type YearMonthPickerProps = {\n displayedYearMonth?: Date,\n start?: Date,\n end?: Date,\n onChange?: (date: Date) => void,\n className?: string,\n maxHeight?: number,\n showValueOpen?: boolean,\n}\n\n// TODO use a dynamically loading infinite list here\nexport const YearMonthPicker = ({\n displayedYearMonth = new Date(),\n start = subtractDuration(new Date(), { years: 50 }),\n end = addDuration(new Date(), { years: 50 }),\n onChange = noop,\n className = '',\n maxHeight = 300,\n showValueOpen = true\n }: YearMonthPickerProps) => {\n const locale = useLocale()\n const ref = useRef<HTMLDivElement>(null)\n\n useEffect(() => {\n const scrollToItem = () => {\n if (ref.current) {\n ref.current.scrollIntoView({\n behavior: 'instant',\n block: 'center',\n })\n }\n }\n\n scrollToItem()\n }, [ref])\n\n if (end < start) {\n console.error(`startYear: (${start}) less than endYear: (${end})`)\n return null\n }\n\n const years = range(start.getFullYear(), end.getFullYear())\n\n return (\n <div className={clsx('col select-none', className)}>\n <Scrollbars autoHeight autoHeightMax={maxHeight} style={{ height: '100%' }}>\n <div className=\"col gap-y-1 mr-3\">\n {years.map(year => {\n const selectedYear = displayedYearMonth.getFullYear() === year\n return (\n <Expandable\n key={year}\n ref={(displayedYearMonth.getFullYear() ?? new Date().getFullYear()) === year ? ref : undefined}\n label={<span className={clsx({ 'text-primary font-bold': selectedYear })}>{year}</span>}\n initialExpansion={showValueOpen && selectedYear}\n >\n <div className=\"col gap-y-1 px-2 pb-2\">\n {equalSizeGroups([...monthsList], 3).map((monthList, index) => (\n <div key={index} className=\"row\">\n {monthList.map(month => {\n const monthIndex = monthsList.indexOf(month)\n const newDate = new Date(year, monthIndex)\n\n const selectedMonth = selectedYear && monthIndex === displayedYearMonth.getMonth()\n const firstOfMonth = new Date(year, monthIndex, 1)\n const lastOfMonth = new Date(year, monthIndex, 1)\n const isAfterStart = start === undefined || start <= addDuration(subtractDuration(lastOfMonth, { days: 1 }), { months: 1 })\n const isBeforeEnd = end === undefined || firstOfMonth <= end\n const isValid = isAfterStart && isBeforeEnd\n return (\n <button\n key={month}\n disabled={!isValid}\n className={clsx(\n 'chip hover:brightness-95 flex-1',\n {\n 'bg-gray-50 text-black': !selectedMonth && isValid,\n 'bg-primary text-on-primary': selectedMonth && isValid,\n 'bg-disabled-background text-disabled-text': !isValid\n }\n )}\n onClick={() => {\n onChange(newDate)\n }}\n >\n {new Intl.DateTimeFormat(locale, { month: 'short' }).format(newDate)}\n </button>\n )\n })}\n </div>\n ))}\n </div>\n </Expandable>\n )\n })}\n </div>\n </Scrollbars>\n </div>\n )\n}\n\nexport const ControlledYearMonthPicker = ({\n displayedYearMonth = new Date(),\n onChange = noop,\n ...props\n }: YearMonthPickerProps) => {\n const [yearMonth, setYearMonth] = useState<Date>(displayedYearMonth)\n\n useEffect(() => setYearMonth(displayedYearMonth), [displayedYearMonth])\n\n return (\n <YearMonthPicker\n displayedYearMonth={yearMonth}\n onChange={date => {\n setYearMonth(date)\n onChange(date)\n }}\n {...props}\n />\n )\n}\n","import type { PropsWithChildren, ReactNode } from 'react'\nimport { forwardRef, useState } from 'react'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport clsx from 'clsx'\n\ntype IconBuilder = (expanded: boolean) => ReactNode\n\nexport type ExpandableProps = PropsWithChildren<{\n label: ReactNode,\n icon?: IconBuilder,\n initialExpansion?: boolean,\n /**\n * Whether the expansion should only happen when the header is clicked or on the entire component\n */\n clickOnlyOnHeader?: boolean,\n className?: string,\n headerClassName?: string,\n}>\n\nconst DefaultIcon: IconBuilder = (expanded) => expanded ?\n (<ChevronUp size={16} className=\"min-w-[16px]\"/>)\n : (<ChevronDown size={16} className=\"min-w-[16px]\"/>)\n\n/**\n * A Component for showing and hiding content\n */\nexport const Expandable = forwardRef<HTMLDivElement, ExpandableProps>(({\n children,\n label,\n icon,\n initialExpansion = false,\n clickOnlyOnHeader = true,\n className = '',\n headerClassName = ''\n }, ref) => {\n const [isExpanded, setIsExpanded] = useState(initialExpansion)\n icon ??= DefaultIcon\n\n return (\n <div\n ref={ref}\n className={clsx('col bg-surface text-on-surface group rounded-lg shadow-sm', { 'cursor-pointer': !clickOnlyOnHeader }, className)}\n onClick={() => !clickOnlyOnHeader && setIsExpanded(!isExpanded)}\n >\n <button\n className={clsx('btn-md rounded-lg justify-between items-center bg-surface text-on-surface', { 'group-hover:brightness-95': !isExpanded }, headerClassName)}\n onClick={() => clickOnlyOnHeader && setIsExpanded(!isExpanded)}\n >\n {label}\n {icon(isExpanded)}\n </button>\n {isExpanded && (\n <div className=\"col\">\n {children}\n </div>\n )}\n </div>\n )\n})\n\nExpandable.displayName = 'Expandable'\n","import type { WeekDay } from '../../util/date'\nimport { isInTimeSpan } from '../../util/date'\nimport { equalDate, getWeeksForCalenderMonth } from '../../util/date'\nimport { noop } from '../../util/noop'\nimport clsx from 'clsx'\nimport { useLocale } from '../../hooks/useLanguage'\nimport { useEffect, useState } from 'react'\n\nexport type DayPickerProps = {\n displayedMonth: Date,\n selected?: Date,\n start?: Date,\n end?: Date,\n onChange?: (date: Date) => void,\n weekStart?: WeekDay,\n markToday?: boolean,\n className?: string,\n}\n\n/**\n * A component for selecting a day of a month\n */\nexport const DayPicker = ({\n displayedMonth,\n selected,\n start,\n end,\n onChange = noop,\n weekStart = 'monday',\n markToday = true,\n className = ''\n }: DayPickerProps) => {\n const locale = useLocale()\n const month = displayedMonth.getMonth()\n const weeks = getWeeksForCalenderMonth(displayedMonth, weekStart)\n\n return (\n <div className={clsx('col gap-y-1 min-w-[220px] select-none', className)}>\n <div className=\"row text-center\">\n {weeks[0]!.map((weekDay, index) => (\n <div key={index} className=\"flex-1 font-semibold\">\n {new Intl.DateTimeFormat(locale, { weekday: 'long' }).format(weekDay).substring(0, 2)}\n </div>\n ))}\n </div>\n {weeks.map((week, index) => (\n <div key={index} className=\"row text-center\">\n {week.map((date) => {\n const isSelected = !!selected && equalDate(selected, date)\n const isToday = equalDate(new Date(), date)\n const isSameMonth = date.getMonth() === month\n const isDayValid = isInTimeSpan(date, start, end)\n return (\n <button\n disabled={!isDayValid}\n key={date.getDate()}\n className={clsx(\n 'flex-1 rounded-full border-2 border-transparent shadow-sm',\n {\n 'text-gray-700 bg-gray-100': !isSameMonth && isDayValid,\n 'text-black bg-white': !isSelected && isSameMonth && isDayValid,\n 'text-on-primary bg-primary': isSelected,\n 'border-black': isToday && markToday,\n 'hover:brightness-90 hover:bg-primary hover:text-on-primary': isDayValid,\n 'text-disabled-text bg-disabled-background': !isDayValid\n }\n )}\n onClick={() => onChange(date)}\n >\n {date.getDate()}\n </button>\n )\n })}\n </div>\n ))}\n </div>\n )\n}\n\nexport const DayPickerControlled = ({ displayedMonth, onChange = noop, ...restProps }: DayPickerProps) => {\n const [date, setDate] = useState(displayedMonth)\n\n useEffect(() => setDate(displayedMonth), [displayedMonth])\n\n return (\n <DayPicker\n displayedMonth={date}\n onChange={newDate => {\n setDate(newDate)\n onChange(newDate)\n }}\n {...restProps}\n />\n )\n}\n"],"mappings":";AAAA,SAAS,aAAAA,YAAW,YAAAC,iBAAgB;;;ACCpC,OAAOC,WAAU;;;ACAjB,SAAS,eAAe,YAAY,aAAAC,YAAW,YAAAC,iBAAgB;;;ACA/D,SAAS,aAAa,WAAW,gBAAgB;;;ADqE7C;AA3DG,IAAM,mBAAmB;AAOzB,IAAM,kBAAkB,cAAoC,EAAE,UAAU,kBAAkB,aAAa,CAAC,MAAM,EAAE,CAAC;AAEjH,IAAM,cAAc,MAAM,WAAW,eAAe;AAEpD,IAAM,YAAY,CAAC,sBAAkC;AAC1D,QAAM,EAAE,SAAS,IAAI,YAAY;AACjC,QAAM,UAAqC;AAAA,IACzC,IAAI;AAAA,IACJ,IAAI;AAAA,EACN;AACA,SAAO,QAAQ,qBAAqB,QAAQ;AAC9C;;;AECO,IAAM,iBAAiB,CAC5B,UACA,uBAA8D,CAAC,MAC9C;AACjB,QAAM,EAAE,UAAU,cAAc,aAAa,UAAU,IAAI;AAC3D,QAAM,EAAE,UAAU,iBAAiB,IAAI,YAAY;AACnD,QAAM,eAAe,gBAAgB;AACrC,MAAI,gBAA6B,SAAS,YAAY;AACtD,MAAI,aAAa,UAAU,YAAY,GAAG;AACxC,oBAAgB,EAAE,GAAG,eAAe,GAAG,UAAU,YAAY,EAAE;AAAA,EACjE;AACA,SAAO;AACT;;;AC1CO,IAAM,OAAO,MAAM;;;ACAnB,IAAM,kBAAkB,CAAK,OAAY,cAA6B;AAC3E,MAAI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W,sBAAY,OAAM;AAAA,MAClF,gBAAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL,SAAS,MAAM,SAAS,KAAK;AAAA,UAE5B,sBAAY;AAAA;AAAA,MACf;AAAA,OACF,GACF;AAAA,KACF;AAEJ;;;AD1HI,gBAAAG,YAAA;AAjBG,IAAM,wBAAwB,CAAC;AAAA,EACpC;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AAAA,EACX,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAkC;AAChC,QAAM,CAAC,MAAM,OAAO,IAAIC,UAAS,KAAK;AAEtC,EAAAC,WAAU,MAAM,QAAQ,KAAK,GAAG,CAAC,KAAK,CAAC;AACvC,SACE,gBAAAF;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,OAAO;AAAA,MACP,UAAU,UAAQ;AAChB,iBAAS,IAAI;AACb,gBAAQ,IAAI;AAAA,MACd;AAAA,MACA,UAAU,MAAM;AACd,iBAAS;AACT,gBAAQ,oBAAI,KAAK,CAAC;AAAA,MACpB;AAAA,MACA,UAAU,UAAQ;AAChB,iBAAS,IAAI;AACb,gBAAQ,IAAI;AAAA,MACd;AAAA,MACA,iBAAiB,EAAE,gBAAgB,gBAAgB;AAAA,MACnD,iBAAiB,EAAE,gBAAgB,gBAAgB,EAAE,WAAW,UAAU,GAAG,sBAAsB,EAAE,cAAc,EAAE;AAAA;AAAA,EACvH;AAEJ;","names":["useEffect","useState","clsx","useEffect","useState","date","jsx","jsx","useEffect","useState","clsx","jsx","jsxs","useEffect","useEffect","useState","ChevronDown","clsx","useEffect","useRef","useState","Scrollbars","clsx","useState","clsx","jsx","jsxs","jsx","useRef","useEffect","clsx","Scrollbars","clsx","useEffect","useState","jsx","jsxs","clsx","jsx","jsxs","useState","useEffect","clsx","ChevronDown","jsx","jsxs","clsx","jsx","useState","useEffect"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CheckboxPropertyProps } from '../../properties/CheckboxProperty.mjs';
|
|
3
|
+
import '../../../hooks/useTranslation.mjs';
|
|
4
|
+
import '../../../hooks/useLanguage.mjs';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../properties/PropertyBase.mjs';
|
|
7
|
+
|
|
8
|
+
type CheckboxPropertyExampleProps = Omit<CheckboxPropertyProps, 'onChange' | 'onRemove'> & {
|
|
9
|
+
readOnly: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Example for using the CheckboxProperty
|
|
13
|
+
*/
|
|
14
|
+
declare const CheckboxPropertyExample: ({ value, ...restProps }: CheckboxPropertyExampleProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { CheckboxPropertyExample, type CheckboxPropertyExampleProps };
|
|
@@ -1,8 +1,16 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CheckboxPropertyProps } from '../../properties/CheckboxProperty.js';
|
|
3
|
+
import '../../../hooks/useTranslation.js';
|
|
4
|
+
import '../../../hooks/useLanguage.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../properties/PropertyBase.js';
|
|
7
|
+
|
|
8
|
+
type CheckboxPropertyExampleProps = Omit<CheckboxPropertyProps, 'onChange' | 'onRemove'> & {
|
|
3
9
|
readOnly: boolean;
|
|
4
10
|
};
|
|
5
11
|
/**
|
|
6
12
|
* Example for using the CheckboxProperty
|
|
7
13
|
*/
|
|
8
|
-
|
|
14
|
+
declare const CheckboxPropertyExample: ({ value, ...restProps }: CheckboxPropertyExampleProps) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
export { CheckboxPropertyExample, type CheckboxPropertyExampleProps };
|
|
@@ -1,13 +1,349 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}, [value]);
|
|
12
|
-
return (_jsx(CheckboxProperty, { ...restProps, onChange: setUsedValue, value: usedValue }));
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
13
11
|
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/components/examples/properties/CheckboxPropertyExample.tsx
|
|
31
|
+
var CheckboxPropertyExample_exports = {};
|
|
32
|
+
__export(CheckboxPropertyExample_exports, {
|
|
33
|
+
CheckboxPropertyExample: () => CheckboxPropertyExample
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(CheckboxPropertyExample_exports);
|
|
36
|
+
var import_react4 = require("react");
|
|
37
|
+
|
|
38
|
+
// src/components/properties/CheckboxProperty.tsx
|
|
39
|
+
var import_lucide_react3 = require("lucide-react");
|
|
40
|
+
|
|
41
|
+
// src/util/noop.ts
|
|
42
|
+
var noop = () => void 0;
|
|
43
|
+
|
|
44
|
+
// src/components/user-input/Checkbox.tsx
|
|
45
|
+
var import_react = require("react");
|
|
46
|
+
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
47
|
+
var import_lucide_react = require("lucide-react");
|
|
48
|
+
var import_clsx = __toESM(require("clsx"));
|
|
49
|
+
|
|
50
|
+
// src/components/user-input/Label.tsx
|
|
51
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
52
|
+
var styleMapping = {
|
|
53
|
+
labelSmall: "textstyle-label-sm",
|
|
54
|
+
labelMedium: "textstyle-label-md",
|
|
55
|
+
labelBig: "textstyle-label-lg"
|
|
56
|
+
};
|
|
57
|
+
var Label = ({
|
|
58
|
+
children,
|
|
59
|
+
name,
|
|
60
|
+
labelType = "labelSmall",
|
|
61
|
+
...props
|
|
62
|
+
}) => {
|
|
63
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { ...props, children: children ? children : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styleMapping[labelType], children: name }) });
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
// src/components/user-input/Checkbox.tsx
|
|
67
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
68
|
+
var checkboxSizeMapping = {
|
|
69
|
+
small: "size-4",
|
|
70
|
+
medium: "size-6",
|
|
71
|
+
large: "size-8"
|
|
72
|
+
};
|
|
73
|
+
var checkboxIconSizeMapping = {
|
|
74
|
+
small: "size-3",
|
|
75
|
+
medium: "size-5",
|
|
76
|
+
large: "size-7"
|
|
77
|
+
};
|
|
78
|
+
var ControlledCheckbox = ({
|
|
79
|
+
id,
|
|
80
|
+
label,
|
|
81
|
+
checked,
|
|
82
|
+
disabled,
|
|
83
|
+
onChange,
|
|
84
|
+
onChangeTristate,
|
|
85
|
+
size = "medium",
|
|
86
|
+
className = "",
|
|
87
|
+
containerClassName
|
|
88
|
+
}) => {
|
|
89
|
+
const usedSizeClass = checkboxSizeMapping[size];
|
|
90
|
+
const innerIconSize = checkboxIconSizeMapping[size];
|
|
91
|
+
const propagateChange = (checked2) => {
|
|
92
|
+
if (onChangeTristate) {
|
|
93
|
+
onChangeTristate(checked2);
|
|
94
|
+
}
|
|
95
|
+
if (onChange) {
|
|
96
|
+
onChange(checked2 === "indeterminate" ? false : checked2);
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const changeValue = () => {
|
|
100
|
+
const newValue = checked === "indeterminate" ? false : !checked;
|
|
101
|
+
propagateChange(newValue);
|
|
102
|
+
};
|
|
103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: (0, import_clsx.default)("row justify-center items-center", containerClassName), children: [
|
|
104
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
105
|
+
CheckboxPrimitive.Root,
|
|
106
|
+
{
|
|
107
|
+
onCheckedChange: propagateChange,
|
|
108
|
+
checked,
|
|
109
|
+
disabled,
|
|
110
|
+
id,
|
|
111
|
+
className: (0, import_clsx.default)(usedSizeClass, `items-center border-2 rounded outline-none focus:border-primary`, {
|
|
112
|
+
"text-disabled-text border-disabled-text": disabled,
|
|
113
|
+
"border-on-background": !disabled,
|
|
114
|
+
"bg-primary/30 border-primary text-primary": checked === true || checked === "indeterminate",
|
|
115
|
+
"hover:border-gray-400 focus:hover:border-primary": !checked
|
|
116
|
+
}, className),
|
|
117
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(CheckboxPrimitive.Indicator, { children: [
|
|
118
|
+
checked === true && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Check, { className: innerIconSize }),
|
|
119
|
+
checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Minus, { className: innerIconSize })
|
|
120
|
+
] })
|
|
121
|
+
}
|
|
122
|
+
),
|
|
123
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Label, { ...label, className: (0, import_clsx.default)("cursor-pointer", label.className), htmlFor: id, onClick: changeValue })
|
|
124
|
+
] });
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// src/hooks/useLanguage.tsx
|
|
128
|
+
var import_react3 = require("react");
|
|
129
|
+
|
|
130
|
+
// src/hooks/useLocalStorage.tsx
|
|
131
|
+
var import_react2 = require("react");
|
|
132
|
+
|
|
133
|
+
// src/hooks/useLanguage.tsx
|
|
134
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
135
|
+
var DEFAULT_LANGUAGE = "en";
|
|
136
|
+
var LanguageContext = (0, import_react3.createContext)({ language: DEFAULT_LANGUAGE, setLanguage: (v) => v });
|
|
137
|
+
var useLanguage = () => (0, import_react3.useContext)(LanguageContext);
|
|
138
|
+
|
|
139
|
+
// src/hooks/useTranslation.ts
|
|
140
|
+
var useTranslation = (defaults, translationOverwrite = {}) => {
|
|
141
|
+
const { language: languageProp, translation: overwrite } = translationOverwrite;
|
|
142
|
+
const { language: inferredLanguage } = useLanguage();
|
|
143
|
+
const usedLanguage = languageProp ?? inferredLanguage;
|
|
144
|
+
let defaultValues = defaults[usedLanguage];
|
|
145
|
+
if (overwrite && overwrite[usedLanguage]) {
|
|
146
|
+
defaultValues = { ...defaultValues, ...overwrite[usedLanguage] };
|
|
147
|
+
}
|
|
148
|
+
return defaultValues;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
// src/components/properties/PropertyBase.tsx
|
|
152
|
+
var import_lucide_react2 = require("lucide-react");
|
|
153
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
154
|
+
|
|
155
|
+
// src/components/Button.tsx
|
|
156
|
+
var import_clsx2 = __toESM(require("clsx"));
|
|
157
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
158
|
+
var ButtonSizePaddings = {
|
|
159
|
+
small: "btn-sm",
|
|
160
|
+
medium: "btn-md",
|
|
161
|
+
large: "btn-lg"
|
|
162
|
+
};
|
|
163
|
+
var TextButton = ({
|
|
164
|
+
children,
|
|
165
|
+
disabled = false,
|
|
166
|
+
color = "neutral",
|
|
167
|
+
size = "medium",
|
|
168
|
+
startIcon,
|
|
169
|
+
endIcon,
|
|
170
|
+
onClick,
|
|
171
|
+
className,
|
|
172
|
+
...restProps
|
|
173
|
+
}) => {
|
|
174
|
+
const colorClasses = {
|
|
175
|
+
negative: "bg-transparent text-button-text-negative-text",
|
|
176
|
+
neutral: "bg-transparent text-button-text-neutral-text"
|
|
177
|
+
}[color];
|
|
178
|
+
const iconColorClasses = {
|
|
179
|
+
negative: "text-button-text-negative-icon",
|
|
180
|
+
neutral: "text-button-text-neutral-icon"
|
|
181
|
+
}[color];
|
|
182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
183
|
+
"button",
|
|
184
|
+
{
|
|
185
|
+
onClick: disabled ? void 0 : onClick,
|
|
186
|
+
disabled: disabled || onClick === void 0,
|
|
187
|
+
className: (0, import_clsx2.default)(
|
|
188
|
+
className,
|
|
189
|
+
{
|
|
190
|
+
"text-disabled-text": disabled,
|
|
191
|
+
[(0, import_clsx2.default)(colorClasses, "hover:bg-button-text-hover-background rounded-full")]: !disabled
|
|
192
|
+
},
|
|
193
|
+
ButtonSizePaddings[size]
|
|
194
|
+
),
|
|
195
|
+
...restProps,
|
|
196
|
+
children: [
|
|
197
|
+
startIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
198
|
+
"span",
|
|
199
|
+
{
|
|
200
|
+
className: (0, import_clsx2.default)({
|
|
201
|
+
[iconColorClasses]: !disabled,
|
|
202
|
+
[`text-disabled-icon`]: disabled
|
|
203
|
+
}),
|
|
204
|
+
children: startIcon
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
children,
|
|
208
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
209
|
+
"span",
|
|
210
|
+
{
|
|
211
|
+
className: (0, import_clsx2.default)({
|
|
212
|
+
[iconColorClasses]: !disabled,
|
|
213
|
+
[`text-disabled-icon`]: disabled
|
|
214
|
+
}),
|
|
215
|
+
children: endIcon
|
|
216
|
+
}
|
|
217
|
+
)
|
|
218
|
+
]
|
|
219
|
+
}
|
|
220
|
+
);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
// src/components/properties/PropertyBase.tsx
|
|
224
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
225
|
+
var defaultPropertyBaseTranslation = {
|
|
226
|
+
en: {
|
|
227
|
+
remove: "Remove"
|
|
228
|
+
},
|
|
229
|
+
de: {
|
|
230
|
+
remove: "Entfernen"
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
var PropertyBase = ({
|
|
234
|
+
overwriteTranslation,
|
|
235
|
+
name,
|
|
236
|
+
input,
|
|
237
|
+
softRequired = false,
|
|
238
|
+
hasValue,
|
|
239
|
+
icon,
|
|
240
|
+
readOnly,
|
|
241
|
+
onRemove,
|
|
242
|
+
className = ""
|
|
243
|
+
}) => {
|
|
244
|
+
const translation = useTranslation(defaultPropertyBaseTranslation, overwriteTranslation);
|
|
245
|
+
const requiredAndNoValue = softRequired && !hasValue;
|
|
246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_clsx3.default)("row gap-x-0 group", className), children: [
|
|
247
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
248
|
+
"div",
|
|
249
|
+
{
|
|
250
|
+
className: (0, import_clsx3.default)("row gap-x-2 !w-[200px] px-4 py-2 items-center rounded-l-xl border-2 border-r-0", {
|
|
251
|
+
"bg-gray-100 text-black group-hover:border-primary border-gray-400": !requiredAndNoValue,
|
|
252
|
+
"bg-warning text-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
|
|
253
|
+
}, className),
|
|
254
|
+
children: [
|
|
255
|
+
icon,
|
|
256
|
+
name
|
|
257
|
+
]
|
|
258
|
+
}
|
|
259
|
+
),
|
|
260
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
261
|
+
"div",
|
|
262
|
+
{
|
|
263
|
+
className: (0, import_clsx3.default)("row grow justify-between items-center rounded-r-xl border-2 border-l-0", {
|
|
264
|
+
"bg-white group-hover:border-primary border-gray-400": !requiredAndNoValue,
|
|
265
|
+
"bg-surface-warning group-hover:border-warning border-warning/90": requiredAndNoValue
|
|
266
|
+
}, className),
|
|
267
|
+
children: [
|
|
268
|
+
input({ softRequired, hasValue }),
|
|
269
|
+
requiredAndNoValue && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "text-warning pr-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react2.AlertTriangle, { size: 24 }) }),
|
|
270
|
+
onRemove && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
271
|
+
TextButton,
|
|
272
|
+
{
|
|
273
|
+
onClick: onRemove,
|
|
274
|
+
color: "negative",
|
|
275
|
+
className: (0, import_clsx3.default)("pr-4 items-center", { "!text-transparent": !hasValue || readOnly }),
|
|
276
|
+
disabled: !hasValue || readOnly,
|
|
277
|
+
children: translation.remove
|
|
278
|
+
}
|
|
279
|
+
)
|
|
280
|
+
]
|
|
281
|
+
}
|
|
282
|
+
)
|
|
283
|
+
] });
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
// src/components/properties/CheckboxProperty.tsx
|
|
287
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
288
|
+
var defaultCheckboxPropertyTranslation = {
|
|
289
|
+
en: {
|
|
290
|
+
yes: "Yes",
|
|
291
|
+
no: "No"
|
|
292
|
+
},
|
|
293
|
+
de: {
|
|
294
|
+
yes: "Ja",
|
|
295
|
+
no: "Nein"
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
var CheckboxProperty = ({
|
|
299
|
+
overwriteTranslation,
|
|
300
|
+
value,
|
|
301
|
+
onChange = noop,
|
|
302
|
+
readOnly,
|
|
303
|
+
...baseProps
|
|
304
|
+
}) => {
|
|
305
|
+
const translation = useTranslation(defaultCheckboxPropertyTranslation, overwriteTranslation);
|
|
306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
307
|
+
PropertyBase,
|
|
308
|
+
{
|
|
309
|
+
...baseProps,
|
|
310
|
+
hasValue: true,
|
|
311
|
+
readOnly,
|
|
312
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_lucide_react3.Check, { size: 16 }),
|
|
313
|
+
input: () => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "row py-2 px-4 items-center", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
314
|
+
ControlledCheckbox,
|
|
315
|
+
{
|
|
316
|
+
checked: value ?? true,
|
|
317
|
+
disabled: readOnly,
|
|
318
|
+
onChange,
|
|
319
|
+
label: { name: `${translation.yes}/${translation.no}`, labelType: "labelMedium" }
|
|
320
|
+
}
|
|
321
|
+
) })
|
|
322
|
+
}
|
|
323
|
+
);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
// src/components/examples/properties/CheckboxPropertyExample.tsx
|
|
327
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
328
|
+
var CheckboxPropertyExample = ({
|
|
329
|
+
value = false,
|
|
330
|
+
...restProps
|
|
331
|
+
}) => {
|
|
332
|
+
const [usedValue, setUsedValue] = (0, import_react4.useState)(value);
|
|
333
|
+
(0, import_react4.useEffect)(() => {
|
|
334
|
+
setUsedValue(value);
|
|
335
|
+
}, [value]);
|
|
336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
337
|
+
CheckboxProperty,
|
|
338
|
+
{
|
|
339
|
+
...restProps,
|
|
340
|
+
onChange: setUsedValue,
|
|
341
|
+
value: usedValue
|
|
342
|
+
}
|
|
343
|
+
);
|
|
344
|
+
};
|
|
345
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
346
|
+
0 && (module.exports = {
|
|
347
|
+
CheckboxPropertyExample
|
|
348
|
+
});
|
|
349
|
+
//# sourceMappingURL=CheckboxPropertyExample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/examples/properties/CheckboxPropertyExample.tsx","../../../../src/components/properties/CheckboxProperty.tsx","../../../../src/util/noop.ts","../../../../src/components/user-input/Checkbox.tsx","../../../../src/components/user-input/Label.tsx","../../../../src/hooks/useLanguage.tsx","../../../../src/hooks/useLocalStorage.tsx","../../../../src/hooks/useTranslation.ts","../../../../src/components/properties/PropertyBase.tsx","../../../../src/components/Button.tsx"],"sourcesContent":["import { useEffect, useState } from 'react'\nimport type { CheckboxPropertyProps } from '../../properties/CheckboxProperty'\nimport { CheckboxProperty } from '../../properties/CheckboxProperty'\n\nexport type CheckboxPropertyExampleProps = Omit<CheckboxPropertyProps, 'onChange' | 'onRemove'> & {\n readOnly: boolean,\n}\n\n/**\n * Example for using the CheckboxProperty\n */\nexport const CheckboxPropertyExample = ({\n value = false,\n ...restProps\n}: CheckboxPropertyExampleProps) => {\n const [usedValue, setUsedValue] = useState<boolean>(value)\n\n useEffect(() => {\n setUsedValue(value)\n }, [value])\n\n return (\n <CheckboxProperty\n {...restProps}\n onChange={setUsedValue}\n value={usedValue}\n />\n )\n}\n","import { Check } from 'lucide-react'\nimport { noop } from '../../util/noop'\nimport { Checkbox } from '../user-input/Checkbox'\nimport type { Languages } from '../../hooks/useLanguage'\nimport type { PropsForTranslation } from '../../hooks/useTranslation'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport type { PropertyBaseProps } from './PropertyBase'\nimport { PropertyBase } from './PropertyBase'\n\ntype CheckboxPropertyTranslation = {\n yes: string,\n no: string,\n}\n\nconst defaultCheckboxPropertyTranslation: Record<Languages, CheckboxPropertyTranslation> = {\n en: {\n yes: 'Yes',\n no: 'No'\n },\n de: {\n yes: 'Ja',\n no: 'Nein'\n }\n}\n\nexport type CheckboxPropertyProps = Omit<PropertyBaseProps, 'icon' | 'input' | 'hasValue' | 'onRemove'> & {\n value?: boolean,\n onChange?: (value: boolean) => void,\n}\n\n/**\n * An Input for a boolen properties\n */\nexport const CheckboxProperty = ({\n overwriteTranslation,\n value,\n onChange = noop,\n readOnly,\n ...baseProps\n }: PropsForTranslation<CheckboxPropertyTranslation, CheckboxPropertyProps>) => {\n const translation = useTranslation(defaultCheckboxPropertyTranslation, overwriteTranslation)\n\n return (\n <PropertyBase\n {...baseProps}\n hasValue={true}\n readOnly={readOnly}\n icon={<Check size={16}/>}\n input={() => (\n <div className=\"row py-2 px-4 items-center\">\n <Checkbox\n // TODO make bigger as in #904\n checked={value ?? true}\n disabled={readOnly}\n onChange={onChange}\n label={{ name: `${translation.yes}/${translation.no}`, labelType: 'labelMedium' }}\n />\n </div>\n )}\n />\n )\n}\n","export const noop = () => undefined\n","import { useState } from 'react'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\nimport type { CheckedState } from '@radix-ui/react-checkbox'\nimport { Check, Minus } from 'lucide-react'\nimport clsx from 'clsx'\nimport type { LabelProps } from './Label'\nimport { Label } from './Label'\n\ntype CheckBoxSize = 'small' | 'medium' | 'large'\n\nconst checkboxSizeMapping: Record<CheckBoxSize, string> = {\n small: 'size-4',\n medium: 'size-6',\n large: 'size-8',\n}\n\nconst checkboxIconSizeMapping: Record<CheckBoxSize, string> = {\n small: 'size-3',\n medium: 'size-5',\n large: 'size-7',\n}\n\ntype CheckboxProps = {\n /** used for the label's `for` attribute */\n id?: string,\n label?: Omit<LabelProps, 'id'>,\n /**\n * @default false\n */\n checked: CheckedState,\n disabled?: boolean,\n onChange?: (checked: boolean) => void,\n onChangeTristate?: (checked: CheckedState) => void,\n size?: CheckBoxSize,\n className?: string,\n containerClassName?: string,\n}\n\n/**\n * A Tristate checkbox\n *\n * The state is managed by the parent\n */\nconst ControlledCheckbox = ({\n id,\n label,\n checked,\n disabled,\n onChange,\n onChangeTristate,\n size = 'medium',\n className = '',\n containerClassName\n }: CheckboxProps) => {\n const usedSizeClass = checkboxSizeMapping[size]\n const innerIconSize = checkboxIconSizeMapping[size]\n\n const propagateChange = (checked: CheckedState) => {\n if (onChangeTristate) {\n onChangeTristate(checked)\n }\n if (onChange) {\n onChange(checked === 'indeterminate' ? false : checked)\n }\n }\n\n const changeValue = () => {\n const newValue = checked === 'indeterminate' ? false : !checked\n propagateChange(newValue)\n }\n\n return (\n <div className={clsx('row justify-center items-center', containerClassName)}>\n <CheckboxPrimitive.Root\n onCheckedChange={propagateChange}\n checked={checked}\n disabled={disabled}\n id={id}\n className={clsx(usedSizeClass, `items-center border-2 rounded outline-none focus:border-primary`, {\n 'text-disabled-text border-disabled-text': disabled,\n 'border-on-background': !disabled,\n 'bg-primary/30 border-primary text-primary': checked === true || checked === 'indeterminate',\n 'hover:border-gray-400 focus:hover:border-primary': !checked\n }, className)}\n >\n <CheckboxPrimitive.Indicator>\n {checked === true && <Check className={innerIconSize}/>}\n {checked === 'indeterminate' && <Minus className={innerIconSize}/>}\n </CheckboxPrimitive.Indicator>\n </CheckboxPrimitive.Root>\n {label &&\n <Label {...label} className={clsx('cursor-pointer', label.className)} htmlFor={id} onClick={changeValue}/>}\n </div>\n )\n}\n\ntype UncontrolledCheckboxProps = Omit<CheckboxProps, 'value' | 'checked'> & {\n /**\n * @default false\n */\n defaultValue?: CheckedState,\n}\n\n/**\n * A Tristate checkbox\n *\n * The state is managed by this component\n */\nconst UncontrolledCheckbox = ({\n onChange,\n onChangeTristate,\n defaultValue = false,\n ...props\n }: UncontrolledCheckboxProps) => {\n const [checked, setChecked] = useState(defaultValue)\n\n const handleChange = (checked: CheckedState) => {\n if (onChangeTristate) {\n onChangeTristate(checked)\n }\n if (onChange) {\n onChange(checked === 'indeterminate' ? false : checked)\n }\n setChecked(checked)\n }\n\n return (\n <ControlledCheckbox\n {...props}\n checked={checked}\n onChangeTristate={handleChange}\n />\n )\n}\n\nexport {\n UncontrolledCheckbox,\n ControlledCheckbox as Checkbox\n}\n","import type { LabelHTMLAttributes } from 'react'\n\nexport type LabelType = 'labelSmall' | 'labelMedium' | 'labelBig'\nconst styleMapping: Record<LabelType, string> = {\n labelSmall: 'textstyle-label-sm',\n labelMedium: 'textstyle-label-md',\n labelBig: 'textstyle-label-lg',\n}\n\n\nexport type LabelProps = {\n /** The text for the label */\n name?: string,\n /** The styling for the label */\n labelType?: LabelType,\n} & LabelHTMLAttributes<HTMLLabelElement>\n\n/**\n * A Label component\n */\nexport const Label = ({\n children,\n name,\n labelType = 'labelSmall',\n ...props\n}: LabelProps) => {\n return (\n <label {...props}>\n {children ? children : (<span className={styleMapping[labelType]}>{name}</span>)}\n </label>\n )\n}\n","import type { Dispatch, PropsWithChildren, SetStateAction } from 'react'\nimport { createContext, useContext, useEffect, useState } from 'react'\nimport useLocalStorage from './useLocalStorage'\n\nexport const languages = ['en', 'de'] as const\nexport type Languages = typeof languages[number]\nexport const languagesLocalNames: Record<Languages, string> = {\n en: 'English',\n de: 'Deutsch',\n}\n\nexport const DEFAULT_LANGUAGE = 'en'\n\nexport type LanguageContextValue = {\n language: Languages,\n setLanguage: Dispatch<SetStateAction<Languages>>,\n}\n\nexport const LanguageContext = createContext<LanguageContextValue>({ language: DEFAULT_LANGUAGE, setLanguage: (v) => v })\n\nexport const useLanguage = () => useContext(LanguageContext)\n\nexport const useLocale = (overWriteLanguage?: Languages) => {\n const { language } = useLanguage()\n const mapping: Record<Languages, string> = {\n en: 'en-US',\n de: 'de-DE'\n }\n return mapping[overWriteLanguage ?? language]\n}\n\ntype ProvideLanguageProps = {\n initialLanguage?: Languages,\n}\n\nexport const ProvideLanguage = ({ initialLanguage, children }: PropsWithChildren<ProvideLanguageProps>) => {\n const [language, setLanguage] = useState<Languages>(initialLanguage ?? DEFAULT_LANGUAGE)\n const [storedLanguage, setStoredLanguage] = useLocalStorage<Languages>('language', initialLanguage ?? DEFAULT_LANGUAGE)\n\n useEffect(() => {\n if(language !== initialLanguage && initialLanguage){\n console.warn('LanguageProvider initial state changed: Prefer using useLanguages\\'s setLanguage instead')\n setLanguage(initialLanguage)\n }\n }, [initialLanguage]) // eslint-disable-line react-hooks/exhaustive-deps\n\n useEffect(() => {\n // TODO set locale of html tag here as well\n setStoredLanguage(language)\n }, [language, setStoredLanguage])\n\n useEffect(() => {\n if (storedLanguage !== null) {\n setLanguage(storedLanguage)\n return\n }\n\n const languagesToTestAgainst = Object.values(languages)\n\n const matchingBrowserLanguages = window.navigator.languages\n .map(language => languagesToTestAgainst.find((test) => language === test || language.split('-')[0] === test))\n .filter(entry => entry !== undefined)\n\n if (matchingBrowserLanguages.length === 0) return\n\n const firstMatch = matchingBrowserLanguages[0] as Languages\n setLanguage(firstMatch)\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return (\n <LanguageContext.Provider value={{\n language,\n setLanguage\n }}>\n {children}\n </LanguageContext.Provider>\n )\n}\n","import type { Dispatch, SetStateAction } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport { LocalStorageService } from '../util/storage'\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\nconst useLocalStorage = <T, >(key: string, initValue: T): [T, SetValue<T>] => {\n const get = useCallback((): T => {\n if (typeof window === 'undefined') {\n return initValue\n }\n const storageService = new LocalStorageService()\n const value = storageService.get<T>(key)\n return value || initValue\n }, [initValue, key])\n\n const [storedValue, setStoredValue] = useState<T>(get)\n\n const setValue: SetValue<T> = useCallback(value => {\n const newValue = value instanceof Function ? value(storedValue) : value\n const storageService = new LocalStorageService()\n storageService.set(key, value)\n\n setStoredValue(newValue)\n }, [storedValue, setStoredValue, key])\n\n useEffect(() => {\n setStoredValue(get())\n }, []) // eslint-disable-line react-hooks/exhaustive-deps\n\n return [storedValue, setValue]\n}\n\nexport default useLocalStorage\n","import type { Languages } from './useLanguage'\nimport { useLanguage } from './useLanguage'\n\nexport type Translation<T> = Record<Languages, T>\n\ntype OverwriteTranslationType<Translation extends Record<string, unknown>> = {\n language?: Languages,\n translation?: Partial<Record<Languages, Partial<Translation>>>,\n}\n\n/**\n * Adds the `language` prop to the component props.\n *\n * @param Translation the type of the translation object\n *\n * @param Props the type of the component props, defaults to `Record<string, never>`,\n * if you don't expect any other props other than `language` and get an\n * error when using your component (because it uses `forwardRef` etc.)\n * you can try out `Record<string, unknown>`, this might resolve your\n * problem as `SomeType & never` is still `never` but `SomeType & unknown`\n * is `SomeType` which means that adding back props (like `ref` etc.)\n * works properly\n */\nexport type PropsForTranslation<\n Translation extends Record<string, unknown>,\n Props = Record<string, never>\n> = Props & {\n overwriteTranslation?: OverwriteTranslationType<Translation>,\n};\n\nexport const useTranslation = <Translation extends Record<string, unknown>>(\n defaults: Record<Languages, Translation>,\n translationOverwrite: OverwriteTranslationType<Translation> = {}\n) : Translation => {\n const { language: languageProp, translation: overwrite } = translationOverwrite\n const { language: inferredLanguage } = useLanguage()\n const usedLanguage = languageProp ?? inferredLanguage\n let defaultValues: Translation = defaults[usedLanguage]\n if (overwrite && overwrite[usedLanguage]) {\n defaultValues = { ...defaultValues, ...overwrite[usedLanguage] }\n }\n return defaultValues\n}\n","import type { ReactNode } from 'react'\nimport { AlertTriangle } from 'lucide-react'\nimport clsx from 'clsx'\nimport type { Languages } from '../../hooks/useLanguage'\nimport { TextButton } from '../Button'\nimport type { PropsForTranslation } from '../../hooks/useTranslation'\nimport { useTranslation } from '../../hooks/useTranslation'\n\ntype PropertyBaseTranslation = {\n remove: string,\n}\n\nconst defaultPropertyBaseTranslation: Record<Languages, PropertyBaseTranslation> = {\n en: {\n remove: 'Remove'\n },\n de: {\n remove: 'Entfernen'\n }\n}\n\nexport type PropertyBaseProps = {\n name: string,\n input: (props: { softRequired: boolean, hasValue: boolean }) => ReactNode,\n onRemove?: () => void,\n hasValue: boolean,\n softRequired?: boolean,\n readOnly?: boolean,\n icon?: ReactNode,\n className?: string,\n}\n\n/**\n * A component for showing a properties with uniform styling\n */\nexport const PropertyBase = ({\n overwriteTranslation,\n name,\n input,\n softRequired = false,\n hasValue,\n icon,\n readOnly,\n onRemove,\n className = '',\n}: PropsForTranslation<PropertyBaseTranslation, PropertyBaseProps>) => {\n const translation = useTranslation(defaultPropertyBaseTranslation, overwriteTranslation)\n const requiredAndNoValue = softRequired && !hasValue\n return (\n <div className={clsx('row gap-x-0 group', className)}>\n <div\n className={\n clsx('row gap-x-2 !w-[200px] px-4 py-2 items-center rounded-l-xl border-2 border-r-0', {\n 'bg-gray-100 text-black group-hover:border-primary border-gray-400': !requiredAndNoValue,\n 'bg-warning text-surface-warning group-hover:border-warning border-warning/90': requiredAndNoValue,\n }, className)}\n >\n {icon}\n {name}\n </div>\n <div className={\n clsx('row grow justify-between items-center rounded-r-xl border-2 border-l-0', {\n 'bg-white group-hover:border-primary border-gray-400': !requiredAndNoValue,\n 'bg-surface-warning group-hover:border-warning border-warning/90': requiredAndNoValue,\n }, className)}\n >\n {input({ softRequired, hasValue })}\n {requiredAndNoValue && (\n <div className=\"text-warning pr-4\"><AlertTriangle size={24}/></div>\n )}\n {onRemove && (\n <TextButton\n onClick={onRemove}\n color=\"negative\"\n className={clsx('pr-4 items-center', { '!text-transparent': !hasValue || readOnly })}\n disabled={!hasValue || readOnly}\n >\n {translation.remove}\n </TextButton>\n )}\n </div>\n </div>\n )\n}\n","import type { PropsWithChildren, ButtonHTMLAttributes, ReactNode } from 'react'\nimport clsx from 'clsx'\n\nexport type SolidButtonColor = 'primary' | 'secondary' | 'tertiary' | 'positive' | 'warning'| 'negative'\nexport type OutlineButtonColor = 'primary'\nexport type TextButtonColor = 'negative' | 'neutral'\n\ntype ButtonSizes = 'small' | 'medium' | 'large'\n\n/**\n * The shard properties between all button types\n */\nexport type ButtonProps = PropsWithChildren<{\n /**\n * @default 'medium'\n */\n size?: ButtonSizes,\n}> & ButtonHTMLAttributes<Element>\n\nexport const ButtonSizePaddings: Record<ButtonSizes, string> = {\n small: 'btn-sm',\n medium: 'btn-md',\n large: 'btn-lg'\n}\n\ntype ButtonWithIconsProps = ButtonProps & {\n startIcon?: ReactNode,\n endIcon?: ReactNode,\n}\n\nexport type SolidButtonProps = ButtonWithIconsProps & {\n color?: SolidButtonColor,\n}\n\nexport type OutlineButtonProps = ButtonWithIconsProps & {\n color?: OutlineButtonColor,\n}\n\nexport type TextButtonProps = ButtonWithIconsProps & {\n color?: TextButtonColor,\n}\n\n/**\n * A button with a solid background and different sizes\n */\nconst SolidButton = ({\n children,\n disabled = false,\n color = 'primary',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: SolidButtonProps) => {\n const colorClasses = {\n primary: 'bg-button-solid-primary-background text-button-solid-primary-text',\n secondary: 'bg-button-solid-secondary-background text-button-solid-secondary-text',\n tertiary: 'bg-button-solid-tertiary-background text-button-solid-tertiary-text',\n positive: 'bg-button-solid-positive-background text-button-solid-positive-text',\n warning: 'bg-button-solid-warning-background text-button-solid-warning-text',\n negative: 'bg-button-solid-negative-background text-button-solid-negative-text',\n }[color]\n\n const iconColorClasses = {\n primary: 'text-button-solid-primary-icon',\n secondary: 'text-button-solid-secondary-icon',\n tertiary: 'text-button-solid-tertiary-icon',\n positive: 'text-button-solid-positive-icon',\n warning: 'text-button-solid-warning-icon',\n negative: 'text-button-solid-negative-icon',\n }[color]\n\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className,\n {\n 'text-disabled-text bg-disabled-background': disabled,\n [clsx(colorClasses, 'hover:brightness-90')]: !disabled\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n/**\n * A button with an outline border and different sizes\n */\nconst OutlineButton = ({\n children,\n disabled = false,\n color = 'primary',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: OutlineButtonProps) => {\n const colorClasses = {\n primary: 'bg-transparent border-2 border-button-outline-primary-text text-button-outline-primary-text',\n }[color]\n\n const iconColorClasses = {\n primary: 'text-button-outline-primary-icon',\n }[color]\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className, {\n 'text-disabled-text border-disabled-outline)': disabled,\n [clsx(colorClasses, 'hover:brightness-80')]: !disabled,\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n/**\n * A text that is a button that can have different sizes\n */\nconst TextButton = ({\n children,\n disabled = false,\n color = 'neutral',\n size = 'medium',\n startIcon,\n endIcon,\n onClick,\n className,\n ...restProps\n }: TextButtonProps) => {\n const colorClasses = {\n negative: 'bg-transparent text-button-text-negative-text',\n neutral: 'bg-transparent text-button-text-neutral-text',\n }[color]\n\n const iconColorClasses = {\n negative: 'text-button-text-negative-icon',\n neutral: 'text-button-text-neutral-icon',\n }[color]\n return (\n <button\n onClick={disabled ? undefined : onClick}\n disabled={disabled || onClick === undefined}\n className={clsx(\n className, {\n 'text-disabled-text': disabled,\n [clsx(colorClasses, 'hover:bg-button-text-hover-background rounded-full')]: !disabled,\n },\n ButtonSizePaddings[size]\n )}\n {...restProps}\n >\n {startIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {startIcon}\n </span>\n )}\n {children}\n {endIcon && (\n <span\n className={clsx({\n [iconColorClasses]: !disabled,\n [`text-disabled-icon`]: disabled\n })}\n >\n {endIcon}\n </span>\n )}\n </button>\n )\n}\n\n// TODO Icon button\n\nexport { SolidButton, OutlineButton, TextButton }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,gBAAoC;;;ACApC,IAAAC,uBAAsB;;;ACAf,IAAM,OAAO,MAAM;;;ACA1B,mBAAyB;AACzB,wBAAmC;AAEnC,0BAA6B;AAC7B,kBAAiB;;;ACwBa;AAzB9B,IAAM,eAA0C;AAAA,EAC9C,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,UAAU;AACZ;AAaO,IAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,GAAG;AACL,MAAkB;AAChB,SACE,4CAAC,WAAO,GAAG,OACR,qBAAW,WAAY,4CAAC,UAAK,WAAW,aAAa,SAAS,GAAI,gBAAK,GAC1E;AAEJ;;;ADsDQ,IAAAC,sBAAA;AA3ER,IAAM,sBAAoD;AAAA,EACxD,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AAEA,IAAM,0BAAwD;AAAA,EAC5D,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AACT;AAuBA,IAAM,qBAAqB,CAAC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,YAAY;AAAA,EACZ;AACF,MAAqB;AAC/C,QAAM,gBAAgB,oBA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AC,YAAY,SAAS,CAAC;AAAA,cACnF,UAAU,CAAC,YAAY;AAAA,cAEtB,sBAAY;AAAA;AAAA,UACf;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF;AAEJ;;;APpCY,IAAAC,sBAAA;AAjCZ,IAAM,qCAAqF;AAAA,EACzF,IAAI;AAAA,IACF,KAAK;AAAA,IACL,IAAI;AAAA,EACN;AAAA,EACA,IAAI;AAAA,IACF,KAAK;AAAA,IACL,IAAI;AAAA,EACN;AACF;AAUO,IAAM,mBAAmB,CAAC;AAAA,EACE;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,GAAG;AACL,MAA+E;AAC9G,QAAM,cAAc,eAAe,oCAAoC,oBAAoB;AAE3F,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU;AAAA,MACV;AAAA,MACA,MAAM,6CAAC,8BAAM,MAAM,IAAG;AAAA,MACtB,OAAO,MACL,6CAAC,SAAI,WAAU,8BACb;AAAA,QAAC;AAAA;AAAA,UAEC,SAAS,SAAS;AAAA,UAClB,UAAU;AAAA,UACV;AAAA,UACA,OAAO,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,YAAY,EAAE,IAAI,WAAW,cAAc;AAAA;AAAA,MAClF,GACF;AAAA;AAAA,EAEJ;AAEJ;;;ADvCI,IAAAC,sBAAA;AAXG,IAAM,0BAA0B,CAAC;AAAA,EACtC,QAAQ;AAAA,EACR,GAAG;AACL,MAAoC;AAClC,QAAM,CAAC,WAAW,YAAY,QAAI,wBAAkB,KAAK;AAEzD,+BAAU,MAAM;AACd,iBAAa,KAAK;AAAA,EACpB,GAAG,CAAC,KAAK,CAAC;AAEV,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,UAAU;AAAA,MACV,OAAO;AAAA;AAAA,EACT;AAEJ;","names":["import_react","import_lucide_react","import_jsx_runtime","checked","clsx","import_react","import_react","import_jsx_runtime","import_lucide_react","import_clsx","import_clsx","import_jsx_runtime","clsx","import_jsx_runtime","clsx","import_jsx_runtime","import_jsx_runtime"]}
|