@helpwave/hightide 0.0.13 → 0.0.16
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/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/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/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 +86 -0
- package/dist/index.d.ts +86 -0
- package/dist/index.js +5716 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +5542 -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 +12 -7
- 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 +20 -9
- package/dist/components/Span.d.ts +0 -0
- package/dist/components/Span.js +0 -1
- package/dist/components/examples/InputGroupExample.d.ts +0 -6
- package/dist/components/examples/InputGroupExample.js +0 -21
- package/dist/components/examples/MultiSelectExample.d.ts +0 -7
- package/dist/components/examples/MultiSelectExample.js +0 -27
- package/dist/components/examples/SearchableSelectExample.d.ts +0 -6
- package/dist/components/examples/SearchableSelectExample.js +0 -17
- package/dist/components/examples/SelectExample.d.ts +0 -4
- package/dist/components/examples/SelectExample.js +0 -15
- package/dist/components/examples/StackingModals.d.ts +0 -4
- package/dist/components/examples/StackingModals.js +0 -15
- package/dist/components/examples/TableExample.d.ts +0 -9
- package/dist/components/examples/TableExample.js +0 -92
- package/dist/components/examples/TextareaExample.d.ts +0 -6
- package/dist/components/examples/TextareaExample.js +0 -10
- package/dist/components/examples/TileExample.d.ts +0 -9
- package/dist/components/examples/TileExample.js +0 -9
- package/dist/components/examples/Title.d.ts +0 -0
- package/dist/components/examples/Title.js +0 -1
- package/dist/components/examples/date/DateTimePickerExample.d.ts +0 -10
- package/dist/components/examples/date/DateTimePickerExample.js +0 -21
- package/dist/components/examples/properties/CheckboxPropertyExample.d.ts +0 -8
- package/dist/components/examples/properties/CheckboxPropertyExample.js +0 -13
- package/dist/components/examples/properties/DatePropertyExample.d.ts +0 -8
- package/dist/components/examples/properties/DatePropertyExample.js +0 -23
- package/dist/components/examples/properties/MultiSelectPropertyExample.d.ts +0 -8
- package/dist/components/examples/properties/MultiSelectPropertyExample.js +0 -16
- package/dist/components/examples/properties/NumberPropertyExample.d.ts +0 -6
- package/dist/components/examples/properties/NumberPropertyExample.js +0 -13
- package/dist/components/examples/properties/SelectPropertyExample.d.ts +0 -6
- package/dist/components/examples/properties/SelectPropertyExample.js +0 -18
- package/dist/components/examples/properties/TextPropertyExample.d.ts +0 -8
- package/dist/components/examples/properties/TextPropertyExample.js +0 -13
|
@@ -1,15 +1,70 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (!disabled) {
|
|
12
|
-
setOpen(!open);
|
|
13
|
-
}
|
|
14
|
-
}, children: [_jsx("div", { children: header }), !disabled && (open ? _jsx(ChevronUp, {}) : _jsx(ChevronDown, {}))] }), open && (_jsx("div", { children: children }))] }));
|
|
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 });
|
|
15
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/HideableContentSection.tsx
|
|
31
|
+
var HideableContentSection_exports = {};
|
|
32
|
+
__export(HideableContentSection_exports, {
|
|
33
|
+
HideableContentSection: () => HideableContentSection
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(HideableContentSection_exports);
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_lucide_react = require("lucide-react");
|
|
38
|
+
var import_clsx = __toESM(require("clsx"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var HideableContentSection = ({
|
|
41
|
+
initiallyOpen = true,
|
|
42
|
+
disabled,
|
|
43
|
+
children,
|
|
44
|
+
header
|
|
45
|
+
}) => {
|
|
46
|
+
const [open, setOpen] = (0, import_react.useState)(initiallyOpen);
|
|
47
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "col", children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: (0, import_clsx.default)("row justify-between items-center", { "cursor-pointer": !disabled }),
|
|
52
|
+
onClick: () => {
|
|
53
|
+
if (!disabled) {
|
|
54
|
+
setOpen(!open);
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
children: [
|
|
58
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children: header }),
|
|
59
|
+
!disabled && (open ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDown, {}))
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
open && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { children })
|
|
64
|
+
] });
|
|
65
|
+
};
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
HideableContentSection
|
|
69
|
+
});
|
|
70
|
+
//# sourceMappingURL=HideableContentSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/HideableContentSection.tsx"],"sourcesContent":["import { useState, type PropsWithChildren, type ReactNode } from 'react'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport clsx from 'clsx'\n\nexport type HideableContentSectionProps = PropsWithChildren & {\n initiallyOpen?: boolean,\n disabled: boolean,\n header: ReactNode,\n}\n\n/**\n * A Component to hide and show\n */\nexport const HideableContentSection = ({\n initiallyOpen = true,\n disabled,\n children,\n header\n}: HideableContentSectionProps) => {\n const [open, setOpen] = useState(initiallyOpen)\n return (\n <div className=\"col\">\n <div\n className={clsx('row justify-between items-center', { 'cursor-pointer': !disabled })}\n onClick={() => {\n if (!disabled) {\n setOpen(!open)\n }\n }}\n >\n <div>\n {header}\n </div>\n {!disabled && (open ? <ChevronUp/> : <ChevronDown/>)}\n </div>\n {open && (\n <div>\n {children}\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAiE;AACjE,0BAAuC;AACvC,kBAAiB;AAoBX;AATC,IAAM,yBAAyB,CAAC;AAAA,EACrC,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AACF,MAAmC;AACjC,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,aAAa;AAC9C,SACE,6CAAC,SAAI,WAAU,OACb;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,YAAAA,SAAK,oCAAoC,EAAE,kBAAkB,CAAC,SAAS,CAAC;AAAA,QACnF,SAAS,MAAM;AACb,cAAI,CAAC,UAAU;AACb,oBAAQ,CAAC,IAAI;AAAA,UACf;AAAA,QACF;AAAA,QAEA;AAAA,sDAAC,SACE,kBACH;AAAA,UACC,CAAC,aAAa,OAAO,4CAAC,iCAAS,IAAK,4CAAC,mCAAW;AAAA;AAAA;AAAA,IACnD;AAAA,IACC,QACC,4CAAC,SACE,UACH;AAAA,KAEJ;AAEJ;","names":["clsx"]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/components/HideableContentSection.tsx
|
|
2
|
+
import { useState } from "react";
|
|
3
|
+
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var HideableContentSection = ({
|
|
7
|
+
initiallyOpen = true,
|
|
8
|
+
disabled,
|
|
9
|
+
children,
|
|
10
|
+
header
|
|
11
|
+
}) => {
|
|
12
|
+
const [open, setOpen] = useState(initiallyOpen);
|
|
13
|
+
return /* @__PURE__ */ jsxs("div", { className: "col", children: [
|
|
14
|
+
/* @__PURE__ */ jsxs(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
className: clsx("row justify-between items-center", { "cursor-pointer": !disabled }),
|
|
18
|
+
onClick: () => {
|
|
19
|
+
if (!disabled) {
|
|
20
|
+
setOpen(!open);
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ jsx("div", { children: header }),
|
|
25
|
+
!disabled && (open ? /* @__PURE__ */ jsx(ChevronUp, {}) : /* @__PURE__ */ jsx(ChevronDown, {}))
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
open && /* @__PURE__ */ jsx("div", { children })
|
|
30
|
+
] });
|
|
31
|
+
};
|
|
32
|
+
export {
|
|
33
|
+
HideableContentSection
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=HideableContentSection.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/HideableContentSection.tsx"],"sourcesContent":["import { useState, type PropsWithChildren, type ReactNode } from 'react'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport clsx from 'clsx'\n\nexport type HideableContentSectionProps = PropsWithChildren & {\n initiallyOpen?: boolean,\n disabled: boolean,\n header: ReactNode,\n}\n\n/**\n * A Component to hide and show\n */\nexport const HideableContentSection = ({\n initiallyOpen = true,\n disabled,\n children,\n header\n}: HideableContentSectionProps) => {\n const [open, setOpen] = useState(initiallyOpen)\n return (\n <div className=\"col\">\n <div\n className={clsx('row justify-between items-center', { 'cursor-pointer': !disabled })}\n onClick={() => {\n if (!disabled) {\n setOpen(!open)\n }\n }}\n >\n <div>\n {header}\n </div>\n {!disabled && (open ? <ChevronUp/> : <ChevronDown/>)}\n </div>\n {open && (\n <div>\n {children}\n </div>\n )}\n </div>\n )\n}\n"],"mappings":";AAAA,SAAS,gBAAwD;AACjE,SAAS,aAAa,iBAAiB;AACvC,OAAO,UAAU;AAoBX,SAQE,KARF;AATC,IAAM,yBAAyB,CAAC;AAAA,EACrC,gBAAgB;AAAA,EAChB;AAAA,EACA;AAAA,EACA;AACF,MAAmC;AACjC,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,aAAa;AAC9C,SACE,qBAAC,SAAI,WAAU,OACb;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW,KAAK,oCAAoC,EAAE,kBAAkB,CAAC,SAAS,CAAC;AAAA,QACnF,SAAS,MAAM;AACb,cAAI,CAAC,UAAU;AACb,oBAAQ,CAAC,IAAI;AAAA,UACf;AAAA,QACF;AAAA,QAEA;AAAA,8BAAC,SACE,kBACH;AAAA,UACC,CAAC,aAAa,OAAO,oBAAC,aAAS,IAAK,oBAAC,eAAW;AAAA;AAAA;AAAA,IACnD;AAAA,IACC,QACC,oBAAC,SACE,UACH;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
type InputGroupProps = PropsWithChildren<{
|
|
5
|
+
title: string;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
isExpandable?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
onChange?: (value: boolean) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* A Component for layouting inputs in an expandable group
|
|
14
|
+
*/
|
|
15
|
+
declare const InputGroup: ({ children, title, expanded, isExpandable, disabled, onChange, className, }: InputGroupProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { InputGroup, type InputGroupProps };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
type InputGroupProps = PropsWithChildren<{
|
|
3
5
|
title: string;
|
|
4
6
|
expanded?: boolean;
|
|
5
7
|
isExpandable?: boolean;
|
|
@@ -10,4 +12,6 @@ export type InputGroupProps = PropsWithChildren<{
|
|
|
10
12
|
/**
|
|
11
13
|
* A Component for layouting inputs in an expandable group
|
|
12
14
|
*/
|
|
13
|
-
|
|
15
|
+
declare const InputGroup: ({ children, title, expanded, isExpandable, disabled, onChange, className, }: InputGroupProps) => react_jsx_runtime.JSX.Element;
|
|
16
|
+
|
|
17
|
+
export { InputGroup, type InputGroupProps };
|
|
@@ -1,33 +1,97 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
useEffect(() => {
|
|
12
|
-
setIsExpanded(expanded);
|
|
13
|
-
}, [expanded]);
|
|
14
|
-
return (_jsxs("div", { className: clsx('col gap-y-4 p-4 bg-white rounded-xl', className), children: [_jsxs("div", { className: clsx('row justify-between items-center', {
|
|
15
|
-
'cursor-pointer': isExpandable && !disabled,
|
|
16
|
-
'cursor-not-allowed': disabled,
|
|
17
|
-
}, {
|
|
18
|
-
'text-primary': !disabled,
|
|
19
|
-
'text-primary/40': disabled
|
|
20
|
-
}), onClick: () => {
|
|
21
|
-
if (!isExpandable) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const updatedIsExpanded = !isExpanded;
|
|
25
|
-
onChange(updatedIsExpanded);
|
|
26
|
-
setIsExpanded(updatedIsExpanded);
|
|
27
|
-
}, children: [_jsx("span", { className: "textstyle-title-md", children: title }), _jsx("div", { className: clsx('rounded-full text-white w-6 h-6', {
|
|
28
|
-
'bg-primary': (isExpandable && !disabled) || expanded,
|
|
29
|
-
'bg-primary/40': disabled,
|
|
30
|
-
}), children: isExpanded
|
|
31
|
-
? _jsx(ChevronUp, { className: "-translate-y-[1px]", size: 24 })
|
|
32
|
-
: _jsx(ChevronDown, { className: "translate-y-[1px]", size: 24 }) })] }), isExpanded && (_jsx("div", { className: "col gap-y-2 h-full", children: children }))] }));
|
|
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 });
|
|
33
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/InputGroup.tsx
|
|
31
|
+
var InputGroup_exports = {};
|
|
32
|
+
__export(InputGroup_exports, {
|
|
33
|
+
InputGroup: () => InputGroup
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(InputGroup_exports);
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_lucide_react = require("lucide-react");
|
|
38
|
+
var import_clsx = __toESM(require("clsx"));
|
|
39
|
+
|
|
40
|
+
// src/util/noop.ts
|
|
41
|
+
var noop = () => void 0;
|
|
42
|
+
|
|
43
|
+
// src/components/InputGroup.tsx
|
|
44
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
45
|
+
var InputGroup = ({
|
|
46
|
+
children,
|
|
47
|
+
title,
|
|
48
|
+
expanded = true,
|
|
49
|
+
isExpandable = true,
|
|
50
|
+
disabled = false,
|
|
51
|
+
onChange = noop,
|
|
52
|
+
className = ""
|
|
53
|
+
}) => {
|
|
54
|
+
const [isExpanded, setIsExpanded] = (0, import_react.useState)(expanded);
|
|
55
|
+
(0, import_react.useEffect)(() => {
|
|
56
|
+
setIsExpanded(expanded);
|
|
57
|
+
}, [expanded]);
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_clsx.default)("col gap-y-4 p-4 bg-white rounded-xl", className), children: [
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
60
|
+
"div",
|
|
61
|
+
{
|
|
62
|
+
className: (0, import_clsx.default)(
|
|
63
|
+
"row justify-between items-center",
|
|
64
|
+
{
|
|
65
|
+
"cursor-pointer": isExpandable && !disabled,
|
|
66
|
+
"cursor-not-allowed": disabled
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"text-primary": !disabled,
|
|
70
|
+
"text-primary/40": disabled
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
onClick: () => {
|
|
74
|
+
if (!isExpandable) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const updatedIsExpanded = !isExpanded;
|
|
78
|
+
onChange(updatedIsExpanded);
|
|
79
|
+
setIsExpanded(updatedIsExpanded);
|
|
80
|
+
},
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "textstyle-title-md", children: title }),
|
|
83
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_clsx.default)("rounded-full text-white w-6 h-6", {
|
|
84
|
+
"bg-primary": isExpandable && !disabled || expanded,
|
|
85
|
+
"bg-primary/40": disabled
|
|
86
|
+
}), children: isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronUp, { className: "-translate-y-[1px]", size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ChevronDown, { className: "translate-y-[1px]", size: 24 }) })
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "col gap-y-2 h-full", children })
|
|
91
|
+
] });
|
|
92
|
+
};
|
|
93
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
+
0 && (module.exports = {
|
|
95
|
+
InputGroup
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=InputGroup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/InputGroup.tsx","../../src/util/noop.ts"],"sourcesContent":["import type { PropsWithChildren } from 'react'\nimport { useEffect, useState } from 'react'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport clsx from 'clsx'\nimport { noop } from '../util/noop'\n\nexport type InputGroupProps = PropsWithChildren<{\n title: string,\n expanded?: boolean,\n isExpandable?: boolean,\n disabled?: boolean,\n onChange?: (value: boolean) => void,\n className?: string,\n}>\n\n/**\n * A Component for layouting inputs in an expandable group\n */\nexport const InputGroup = ({\n children,\n title,\n expanded = true,\n isExpandable = true,\n disabled = false,\n onChange = noop,\n className = '',\n}: InputGroupProps) => {\n const [isExpanded, setIsExpanded] = useState<boolean>(expanded)\n\n useEffect(() => {\n setIsExpanded(expanded)\n }, [expanded])\n\n return (\n <div className={clsx('col gap-y-4 p-4 bg-white rounded-xl', className)}>\n <div\n className={clsx('row justify-between items-center', {\n 'cursor-pointer': isExpandable && !disabled,\n 'cursor-not-allowed': disabled,\n },\n {\n 'text-primary': !disabled,\n 'text-primary/40': disabled\n })}\n onClick={() => {\n if (!isExpandable) {\n return\n }\n const updatedIsExpanded = !isExpanded\n onChange(updatedIsExpanded)\n setIsExpanded(updatedIsExpanded)\n }}\n >\n <span className=\"textstyle-title-md\">{title}</span>\n <div className={clsx('rounded-full text-white w-6 h-6', {\n 'bg-primary': (isExpandable && !disabled) || expanded,\n 'bg-primary/40': disabled,\n })}>\n {isExpanded\n ? <ChevronUp className=\"-translate-y-[1px]\" size={24}/>\n : <ChevronDown className=\"translate-y-[1px]\" size={24}/>\n }\n </div>\n </div>\n {isExpanded && (\n <div className=\"col gap-y-2 h-full\">\n {children}\n </div>\n )}\n </div>\n )\n}\n","export const noop = () => undefined\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAoC;AACpC,0BAAuC;AACvC,kBAAiB;;;ACHV,IAAM,OAAO,MAAM;;;ADmCpB;AAjBC,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,eAAe;AAAA,EACf,WAAW;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AACd,MAAuB;AACrB,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAkB,QAAQ;AAE9D,8BAAU,MAAM;AACd,kBAAc,QAAQ;AAAA,EACxB,GAAG,CAAC,QAAQ,CAAC;AAEb,SACE,6CAAC,SAAI,eAAW,YAAAA,SAAK,uCAAuC,SAAS,GACnE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAW,YAAAA;AAAA,UAAK;AAAA,UAAoC;AAAA,YAClD,kBAAkB,gBAAgB,CAAC;AAAA,YACnC,sBAAsB;AAAA,UACxB;AAAA,UACA;AAAA,YACE,gBAAgB,CAAC;AAAA,YACjB,mBAAmB;AAAA,UACrB;AAAA,QAAC;AAAA,QACD,SAAS,MAAM;AACb,cAAI,CAAC,cAAc;AACjB;AAAA,UACF;AACA,gBAAM,oBAAoB,CAAC;AAC3B,mBAAS,iBAAiB;AAC1B,wBAAc,iBAAiB;AAAA,QACjC;AAAA,QAEA;AAAA,sDAAC,UAAK,WAAU,sBAAsB,iBAAM;AAAA,UAC5C,4CAAC,SAAI,eAAW,YAAAA,SAAK,mCAAmC;AAAA,YACtD,cAAe,gBAAgB,CAAC,YAAa;AAAA,YAC7C,iBAAiB;AAAA,UACnB,CAAC,GACE,uBACG,4CAAC,iCAAU,WAAU,sBAAqB,MAAM,IAAG,IACnD,4CAAC,mCAAY,WAAU,qBAAoB,MAAM,IAAG,GAE1D;AAAA;AAAA;AAAA,IACF;AAAA,IACC,cACC,4CAAC,SAAI,WAAU,sBACZ,UACH;AAAA,KAEJ;AAEJ;","names":["clsx"]}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// src/components/InputGroup.tsx
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { ChevronDown, ChevronUp } from "lucide-react";
|
|
4
|
+
import clsx from "clsx";
|
|
5
|
+
|
|
6
|
+
// src/util/noop.ts
|
|
7
|
+
var noop = () => void 0;
|
|
8
|
+
|
|
9
|
+
// src/components/InputGroup.tsx
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var InputGroup = ({
|
|
12
|
+
children,
|
|
13
|
+
title,
|
|
14
|
+
expanded = true,
|
|
15
|
+
isExpandable = true,
|
|
16
|
+
disabled = false,
|
|
17
|
+
onChange = noop,
|
|
18
|
+
className = ""
|
|
19
|
+
}) => {
|
|
20
|
+
const [isExpanded, setIsExpanded] = useState(expanded);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
setIsExpanded(expanded);
|
|
23
|
+
}, [expanded]);
|
|
24
|
+
return /* @__PURE__ */ jsxs("div", { className: clsx("col gap-y-4 p-4 bg-white rounded-xl", className), children: [
|
|
25
|
+
/* @__PURE__ */ jsxs(
|
|
26
|
+
"div",
|
|
27
|
+
{
|
|
28
|
+
className: clsx(
|
|
29
|
+
"row justify-between items-center",
|
|
30
|
+
{
|
|
31
|
+
"cursor-pointer": isExpandable && !disabled,
|
|
32
|
+
"cursor-not-allowed": disabled
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"text-primary": !disabled,
|
|
36
|
+
"text-primary/40": disabled
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
onClick: () => {
|
|
40
|
+
if (!isExpandable) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const updatedIsExpanded = !isExpanded;
|
|
44
|
+
onChange(updatedIsExpanded);
|
|
45
|
+
setIsExpanded(updatedIsExpanded);
|
|
46
|
+
},
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ jsx("span", { className: "textstyle-title-md", children: title }),
|
|
49
|
+
/* @__PURE__ */ jsx("div", { className: clsx("rounded-full text-white w-6 h-6", {
|
|
50
|
+
"bg-primary": isExpandable && !disabled || expanded,
|
|
51
|
+
"bg-primary/40": disabled
|
|
52
|
+
}), children: isExpanded ? /* @__PURE__ */ jsx(ChevronUp, { className: "-translate-y-[1px]", size: 24 }) : /* @__PURE__ */ jsx(ChevronDown, { className: "translate-y-[1px]", size: 24 }) })
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
isExpanded && /* @__PURE__ */ jsx("div", { className: "col gap-y-2 h-full", children })
|
|
57
|
+
] });
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
InputGroup
|
|
61
|
+
};
|
|
62
|
+
//# sourceMappingURL=InputGroup.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/InputGroup.tsx","../../src/util/noop.ts"],"sourcesContent":["import type { PropsWithChildren } from 'react'\nimport { useEffect, useState } from 'react'\nimport { ChevronDown, ChevronUp } from 'lucide-react'\nimport clsx from 'clsx'\nimport { noop } from '../util/noop'\n\nexport type InputGroupProps = PropsWithChildren<{\n title: string,\n expanded?: boolean,\n isExpandable?: boolean,\n disabled?: boolean,\n onChange?: (value: boolean) => void,\n className?: string,\n}>\n\n/**\n * A Component for layouting inputs in an expandable group\n */\nexport const InputGroup = ({\n children,\n title,\n expanded = true,\n isExpandable = true,\n disabled = false,\n onChange = noop,\n className = '',\n}: InputGroupProps) => {\n const [isExpanded, setIsExpanded] = useState<boolean>(expanded)\n\n useEffect(() => {\n setIsExpanded(expanded)\n }, [expanded])\n\n return (\n <div className={clsx('col gap-y-4 p-4 bg-white rounded-xl', className)}>\n <div\n className={clsx('row justify-between items-center', {\n 'cursor-pointer': isExpandable && !disabled,\n 'cursor-not-allowed': disabled,\n },\n {\n 'text-primary': !disabled,\n 'text-primary/40': disabled\n })}\n onClick={() => {\n if (!isExpandable) {\n return\n }\n const updatedIsExpanded = !isExpanded\n onChange(updatedIsExpanded)\n setIsExpanded(updatedIsExpanded)\n }}\n >\n <span className=\"textstyle-title-md\">{title}</span>\n <div className={clsx('rounded-full text-white w-6 h-6', {\n 'bg-primary': (isExpandable && !disabled) || expanded,\n 'bg-primary/40': disabled,\n })}>\n {isExpanded\n ? <ChevronUp className=\"-translate-y-[1px]\" size={24}/>\n : <ChevronDown className=\"translate-y-[1px]\" size={24}/>\n }\n </div>\n </div>\n {isExpanded && (\n <div className=\"col gap-y-2 h-full\">\n {children}\n </div>\n )}\n </div>\n )\n}\n","export const noop = () => undefined\n"],"mappings":";AACA,SAAS,WAAW,gBAAgB;AACpC,SAAS,aAAa,iBAAiB;AACvC,OAAO,UAAU;;;ACHV,IAAM,OAAO,MAAM;;;ADmCpB,SAkBE,KAlBF;AAjBC,IAAM,aAAa,CAAC;AAAA,EACzB;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,eAAe;AAAA,EACf,WAAW;AAAA,EACX,WAAW;AAAA,EACX,YAAY;AACd,MAAuB;AACrB,QAAM,CAAC,YAAY,aAAa,IAAI,SAAkB,QAAQ;AAE9D,YAAU,MAAM;AACd,kBAAc,QAAQ;AAAA,EACxB,GAAG,CAAC,QAAQ,CAAC;AAEb,SACE,qBAAC,SAAI,WAAW,KAAK,uCAAuC,SAAS,GACnE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UAAK;AAAA,UAAoC;AAAA,YAClD,kBAAkB,gBAAgB,CAAC;AAAA,YACnC,sBAAsB;AAAA,UACxB;AAAA,UACA;AAAA,YACE,gBAAgB,CAAC;AAAA,YACjB,mBAAmB;AAAA,UACrB;AAAA,QAAC;AAAA,QACD,SAAS,MAAM;AACb,cAAI,CAAC,cAAc;AACjB;AAAA,UACF;AACA,gBAAM,oBAAoB,CAAC;AAC3B,mBAAS,iBAAiB;AAC1B,wBAAc,iBAAiB;AAAA,QACjC;AAAA,QAEA;AAAA,8BAAC,UAAK,WAAU,sBAAsB,iBAAM;AAAA,UAC5C,oBAAC,SAAI,WAAW,KAAK,mCAAmC;AAAA,YACtD,cAAe,gBAAgB,CAAC,YAAa;AAAA,YAC7C,iBAAiB;AAAA,UACnB,CAAC,GACE,uBACG,oBAAC,aAAU,WAAU,sBAAqB,MAAM,IAAG,IACnD,oBAAC,eAAY,WAAU,qBAAoB,MAAM,IAAG,GAE1D;AAAA;AAAA;AAAA,IACF;AAAA,IACC,cACC,oBAAC,SAAI,WAAU,sBACZ,UACH;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { LoadingAnimationProps } from './LoadingAnimation.mjs';
|
|
5
|
+
import { ErrorComponentProps } from './ErrorComponent.mjs';
|
|
6
|
+
import '../hooks/useTranslation.mjs';
|
|
7
|
+
import '../hooks/useLanguage.mjs';
|
|
8
|
+
|
|
9
|
+
type LoadingAndErrorComponentProps = PropsWithChildren<{
|
|
10
|
+
isLoading?: boolean;
|
|
11
|
+
hasError?: boolean;
|
|
12
|
+
loadingProps?: LoadingAnimationProps;
|
|
13
|
+
errorProps?: ErrorComponentProps;
|
|
14
|
+
/**
|
|
15
|
+
* in milliseconds
|
|
16
|
+
*/
|
|
17
|
+
minimumLoadingDuration?: number;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* A Component that shows the Error and Loading animation, when appropriate and the children otherwise
|
|
21
|
+
*/
|
|
22
|
+
declare const LoadingAndErrorComponent: ({ children, isLoading, hasError, errorProps, loadingProps, minimumLoadingDuration }: LoadingAndErrorComponentProps) => string | number | boolean | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode> | null | undefined;
|
|
23
|
+
|
|
24
|
+
export { LoadingAndErrorComponent, type LoadingAndErrorComponentProps };
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
+
import { LoadingAnimationProps } from './LoadingAnimation.js';
|
|
5
|
+
import { ErrorComponentProps } from './ErrorComponent.js';
|
|
6
|
+
import '../hooks/useTranslation.js';
|
|
7
|
+
import '../hooks/useLanguage.js';
|
|
8
|
+
|
|
9
|
+
type LoadingAndErrorComponentProps = PropsWithChildren<{
|
|
5
10
|
isLoading?: boolean;
|
|
6
11
|
hasError?: boolean;
|
|
7
12
|
loadingProps?: LoadingAnimationProps;
|
|
@@ -14,4 +19,6 @@ export type LoadingAndErrorComponentProps = PropsWithChildren<{
|
|
|
14
19
|
/**
|
|
15
20
|
* A Component that shows the Error and Loading animation, when appropriate and the children otherwise
|
|
16
21
|
*/
|
|
17
|
-
|
|
22
|
+
declare const LoadingAndErrorComponent: ({ children, isLoading, hasError, errorProps, loadingProps, minimumLoadingDuration }: LoadingAndErrorComponentProps) => string | number | boolean | react_jsx_runtime.JSX.Element | Iterable<react.ReactNode> | null | undefined;
|
|
23
|
+
|
|
24
|
+
export { LoadingAndErrorComponent, type LoadingAndErrorComponentProps };
|
|
@@ -1,25 +1,180 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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 });
|
|
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/LoadingAndErrorComponent.tsx
|
|
31
|
+
var LoadingAndErrorComponent_exports = {};
|
|
32
|
+
__export(LoadingAndErrorComponent_exports, {
|
|
33
|
+
LoadingAndErrorComponent: () => LoadingAndErrorComponent
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(LoadingAndErrorComponent_exports);
|
|
36
|
+
var import_react3 = require("react");
|
|
37
|
+
|
|
38
|
+
// src/hooks/useLanguage.tsx
|
|
39
|
+
var import_react2 = require("react");
|
|
40
|
+
|
|
41
|
+
// src/hooks/useLocalStorage.tsx
|
|
42
|
+
var import_react = require("react");
|
|
43
|
+
|
|
44
|
+
// src/hooks/useLanguage.tsx
|
|
45
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
46
|
+
var DEFAULT_LANGUAGE = "en";
|
|
47
|
+
var LanguageContext = (0, import_react2.createContext)({ language: DEFAULT_LANGUAGE, setLanguage: (v) => v });
|
|
48
|
+
var useLanguage = () => (0, import_react2.useContext)(LanguageContext);
|
|
49
|
+
|
|
50
|
+
// src/hooks/useTranslation.ts
|
|
51
|
+
var useTranslation = (defaults, translationOverwrite = {}) => {
|
|
52
|
+
const { language: languageProp, translation: overwrite } = translationOverwrite;
|
|
53
|
+
const { language: inferredLanguage } = useLanguage();
|
|
54
|
+
const usedLanguage = languageProp ?? inferredLanguage;
|
|
55
|
+
let defaultValues = defaults[usedLanguage];
|
|
56
|
+
if (overwrite && overwrite[usedLanguage]) {
|
|
57
|
+
defaultValues = { ...defaultValues, ...overwrite[usedLanguage] };
|
|
58
|
+
}
|
|
59
|
+
return defaultValues;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// src/components/icons/Helpwave.tsx
|
|
63
|
+
var import_clsx = require("clsx");
|
|
64
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
65
|
+
var Helpwave = ({
|
|
66
|
+
color = "currentColor",
|
|
67
|
+
animate = "none",
|
|
68
|
+
size = 64,
|
|
69
|
+
...props
|
|
70
|
+
}) => {
|
|
71
|
+
const isLoadingAnimation = animate === "loading";
|
|
72
|
+
let svgAnimationKey = "";
|
|
73
|
+
if (animate === "pulse") {
|
|
74
|
+
svgAnimationKey = "animate-pulse";
|
|
75
|
+
} else if (animate === "bounce") {
|
|
76
|
+
svgAnimationKey = "animate-bounce";
|
|
77
|
+
}
|
|
78
|
+
if (size < 0) {
|
|
79
|
+
console.error("size cannot be less than 0");
|
|
80
|
+
size = 64;
|
|
81
|
+
}
|
|
82
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
83
|
+
"svg",
|
|
84
|
+
{
|
|
85
|
+
width: size,
|
|
86
|
+
height: size,
|
|
87
|
+
viewBox: "0 0 888 888",
|
|
88
|
+
fill: "none",
|
|
89
|
+
strokeLinecap: "round",
|
|
90
|
+
strokeWidth: 48,
|
|
91
|
+
...props,
|
|
92
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { className: (0, import_clsx.clsx)(svgAnimationKey), children: [
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { className: (0, import_clsx.clsx)({ "animate-wave-big-left-up": isLoadingAnimation }), d: "M144 543.235C144 423.259 232.164 326 340.92 326", stroke: color, strokeDasharray: "1000" }),
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { className: (0, import_clsx.clsx)({ "animate-wave-big-right-down": isLoadingAnimation }), d: "M537.84 544.104C429.084 544.104 340.92 446.844 340.92 326.869", stroke: color, strokeDasharray: "1000" }),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { className: (0, import_clsx.clsx)({ "animate-wave-small-left-up": isLoadingAnimation }), d: "M462.223 518.035C462.223 432.133 525.348 362.495 603.217 362.495", stroke: color, strokeDasharray: "1000" }),
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { className: (0, import_clsx.clsx)({ "animate-wave-small-right-down": isLoadingAnimation }), d: "M745.001 519.773C666.696 519.773 603.218 450.136 603.218 364.233", stroke: color, strokeDasharray: "1000" })
|
|
97
|
+
] })
|
|
23
98
|
}
|
|
24
|
-
|
|
99
|
+
);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
// src/components/LoadingAnimation.tsx
|
|
103
|
+
var import_clsx2 = __toESM(require("clsx"));
|
|
104
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
105
|
+
var defaultLoadingAnimationTranslation = {
|
|
106
|
+
en: {
|
|
107
|
+
loading: "Loading data"
|
|
108
|
+
},
|
|
109
|
+
de: {
|
|
110
|
+
loading: "Lade Daten"
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
var LoadingAnimation = ({
|
|
114
|
+
overwriteTranslation,
|
|
115
|
+
loadingText,
|
|
116
|
+
classname
|
|
117
|
+
}) => {
|
|
118
|
+
const translation = useTranslation(defaultLoadingAnimationTranslation, overwriteTranslation);
|
|
119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: (0, import_clsx2.default)("col items-center justify-center w-full h-24", classname), children: [
|
|
120
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Helpwave, { animate: "loading" }),
|
|
121
|
+
loadingText ?? `${translation.loading}...`
|
|
122
|
+
] });
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// src/components/ErrorComponent.tsx
|
|
126
|
+
var import_lucide_react = require("lucide-react");
|
|
127
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
128
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
129
|
+
var defaultErrorComponentTranslation = {
|
|
130
|
+
en: {
|
|
131
|
+
errorOccurred: "An error occurred"
|
|
132
|
+
},
|
|
133
|
+
de: {
|
|
134
|
+
errorOccurred: "Ein Fehler ist aufgetreten"
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
var ErrorComponent = ({
|
|
138
|
+
overwriteTranslation,
|
|
139
|
+
errorText,
|
|
140
|
+
classname
|
|
141
|
+
}) => {
|
|
142
|
+
const translation = useTranslation(defaultErrorComponentTranslation, overwriteTranslation);
|
|
143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: (0, import_clsx3.default)("col items-center justify-center gap-y-4 w-full h-24", classname), children: [
|
|
144
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react.AlertOctagon, { size: 64, className: "text-warning" }),
|
|
145
|
+
errorText ?? `${translation.errorOccurred} :(`
|
|
146
|
+
] });
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
// src/components/LoadingAndErrorComponent.tsx
|
|
150
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
151
|
+
var LoadingAndErrorComponent = ({
|
|
152
|
+
children,
|
|
153
|
+
isLoading = false,
|
|
154
|
+
hasError = false,
|
|
155
|
+
errorProps,
|
|
156
|
+
loadingProps,
|
|
157
|
+
minimumLoadingDuration
|
|
158
|
+
}) => {
|
|
159
|
+
const [isInMinimumLoading, setIsInMinimumLoading] = (0, import_react3.useState)(false);
|
|
160
|
+
const [hasUsedMinimumLoading, setHasUsedMinimumLoading] = (0, import_react3.useState)(false);
|
|
161
|
+
if (minimumLoadingDuration && !isInMinimumLoading && !hasUsedMinimumLoading) {
|
|
162
|
+
setIsInMinimumLoading(true);
|
|
163
|
+
setTimeout(() => {
|
|
164
|
+
setIsInMinimumLoading(false);
|
|
165
|
+
setHasUsedMinimumLoading(true);
|
|
166
|
+
}, minimumLoadingDuration);
|
|
167
|
+
}
|
|
168
|
+
if (isLoading || minimumLoadingDuration && isInMinimumLoading) {
|
|
169
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(LoadingAnimation, { ...loadingProps });
|
|
170
|
+
}
|
|
171
|
+
if (hasError) {
|
|
172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ErrorComponent, { ...errorProps });
|
|
173
|
+
}
|
|
174
|
+
return children;
|
|
25
175
|
};
|
|
176
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
177
|
+
0 && (module.exports = {
|
|
178
|
+
LoadingAndErrorComponent
|
|
179
|
+
});
|
|
180
|
+
//# sourceMappingURL=LoadingAndErrorComponent.js.map
|