@helpwave/hightide 0.0.18 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -2
- package/dist/coloring/shading.cjs +556 -0
- package/dist/coloring/shading.cjs.map +1 -0
- package/dist/coloring/{shading.d.mts → shading.d.cts} +1 -1
- package/dist/coloring/shading.js +476 -37
- package/dist/coloring/shading.js.map +1 -1
- package/dist/coloring/types.cjs +31 -0
- package/dist/coloring/{types.mjs.map → types.cjs.map} +1 -1
- package/dist/coloring/types.js +2 -27
- package/dist/coloring/types.js.map +1 -1
- package/dist/components/{HelpwaveBadge.js → branding/HelpwaveBadge.cjs} +65 -33
- package/dist/components/branding/HelpwaveBadge.cjs.map +1 -0
- package/dist/components/branding/HelpwaveBadge.js +123 -0
- package/dist/components/branding/HelpwaveBadge.js.map +1 -0
- package/dist/components/date/{DatePicker.mjs → DatePicker.cjs} +158 -94
- package/dist/components/date/DatePicker.cjs.map +1 -0
- package/dist/components/date/{DatePicker.d.mts → DatePicker.d.cts} +7 -8
- package/dist/components/date/DatePicker.d.ts +4 -5
- package/dist/components/date/DatePicker.js +121 -129
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/{DayPicker.mjs → DayPicker.cjs} +77 -24
- package/dist/components/date/DayPicker.cjs.map +1 -0
- package/dist/components/date/{DayPicker.d.mts → DayPicker.d.cts} +3 -3
- package/dist/components/date/DayPicker.d.ts +2 -2
- package/dist/components/date/DayPicker.js +38 -61
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/{TimeDisplay.js → date/TimeDisplay.cjs} +24 -9
- package/dist/components/date/TimeDisplay.cjs.map +1 -0
- package/dist/components/{TimeDisplay.d.mts → date/TimeDisplay.d.cts} +2 -3
- package/dist/components/{TimeDisplay.d.ts → date/TimeDisplay.d.ts} +2 -3
- package/dist/components/{TimeDisplay.mjs → date/TimeDisplay.js} +23 -8
- package/dist/components/date/TimeDisplay.js.map +1 -0
- package/dist/components/date/{TimePicker.mjs → TimePicker.cjs} +62 -26
- package/dist/components/date/TimePicker.cjs.map +1 -0
- package/dist/components/date/{TimePicker.d.mts → TimePicker.d.cts} +2 -2
- package/dist/components/date/TimePicker.d.ts +2 -2
- package/dist/components/date/TimePicker.js +25 -61
- package/dist/components/date/TimePicker.js.map +1 -1
- package/dist/components/date/{YearMonthPicker.mjs → YearMonthPicker.cjs} +93 -42
- package/dist/components/date/YearMonthPicker.cjs.map +1 -0
- package/dist/components/date/{YearMonthPicker.d.mts → YearMonthPicker.d.cts} +2 -2
- package/dist/components/date/YearMonthPicker.d.ts +2 -2
- package/dist/components/date/YearMonthPicker.js +56 -77
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/{AvatarGroup.js → icons-and-geometry/Avatar.cjs} +23 -19
- package/dist/components/icons-and-geometry/Avatar.cjs.map +1 -0
- package/dist/components/icons-and-geometry/Avatar.d.cts +30 -0
- package/dist/components/icons-and-geometry/Avatar.d.ts +30 -0
- package/dist/components/{AvatarGroup.mjs → icons-and-geometry/Avatar.js} +13 -10
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -0
- package/dist/components/{Circle.js → icons-and-geometry/Circle.cjs} +3 -3
- package/dist/components/icons-and-geometry/Circle.cjs.map +1 -0
- package/dist/components/{Circle.mjs → icons-and-geometry/Circle.js} +2 -2
- package/dist/components/icons-and-geometry/Circle.js.map +1 -0
- package/dist/components/{icons/Helpwave.js → icons-and-geometry/Helpwave.cjs} +38 -6
- package/dist/components/icons-and-geometry/Helpwave.cjs.map +1 -0
- package/dist/components/icons-and-geometry/Helpwave.js +75 -0
- package/dist/components/icons-and-geometry/Helpwave.js.map +1 -0
- package/dist/components/{Ring.js → icons-and-geometry/Ring.cjs} +6 -6
- package/dist/components/icons-and-geometry/Ring.cjs.map +1 -0
- package/dist/components/{Ring.mjs → icons-and-geometry/Ring.js} +4 -4
- package/dist/components/icons-and-geometry/Ring.js.map +1 -0
- package/dist/components/{icons/Tag.js → icons-and-geometry/Tag.cjs} +3 -3
- package/dist/components/icons-and-geometry/Tag.cjs.map +1 -0
- package/dist/components/{icons/Tag.mjs → icons-and-geometry/Tag.js} +2 -2
- package/dist/components/icons-and-geometry/Tag.js.map +1 -0
- package/dist/components/{BreadCrumb.js → layout-and-navigation/BreadCrumb.cjs} +12 -5
- package/dist/components/layout-and-navigation/BreadCrumb.cjs.map +1 -0
- package/dist/components/{BreadCrumb.mjs → layout-and-navigation/BreadCrumb.js} +10 -3
- package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -0
- package/dist/components/{layout/Carousel.js → layout-and-navigation/Carousel.cjs} +4 -4
- package/dist/components/layout-and-navigation/Carousel.cjs.map +1 -0
- package/dist/components/{layout/Carousel.mjs → layout-and-navigation/Carousel.js} +4 -4
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -0
- package/dist/components/{ChipList.js → layout-and-navigation/Chip.cjs} +6 -6
- package/dist/components/layout-and-navigation/Chip.cjs.map +1 -0
- package/dist/components/{ChipList.mjs → layout-and-navigation/Chip.js} +2 -2
- package/dist/components/layout-and-navigation/Chip.js.map +1 -0
- package/dist/components/{layout/DividerInserter.js → layout-and-navigation/DividerInserter.cjs} +3 -3
- package/dist/components/layout-and-navigation/DividerInserter.cjs.map +1 -0
- package/dist/components/{layout/DividerInserter.mjs → layout-and-navigation/DividerInserter.js} +2 -2
- package/dist/components/layout-and-navigation/DividerInserter.js.map +1 -0
- package/dist/components/{Expandable.js → layout-and-navigation/Expandable.cjs} +3 -3
- package/dist/components/layout-and-navigation/Expandable.cjs.map +1 -0
- package/dist/components/{Expandable.mjs → layout-and-navigation/Expandable.js} +2 -2
- package/dist/components/layout-and-navigation/Expandable.js.map +1 -0
- package/dist/components/{layout/FAQSection.js → layout-and-navigation/FAQSection.cjs} +7 -7
- package/dist/components/layout-and-navigation/FAQSection.cjs.map +1 -0
- package/dist/components/{layout/FAQSection.d.mts → layout-and-navigation/FAQSection.d.cts} +1 -1
- package/dist/components/{layout → layout-and-navigation}/FAQSection.d.ts +1 -1
- package/dist/components/{layout/FAQSection.mjs → layout-and-navigation/FAQSection.js} +5 -5
- package/dist/components/layout-and-navigation/FAQSection.js.map +1 -0
- package/dist/components/{MarkdownInterpreter.js → layout-and-navigation/MarkdownInterpreter.cjs} +2 -2
- package/dist/components/layout-and-navigation/MarkdownInterpreter.cjs.map +1 -0
- package/dist/components/{MarkdownInterpreter.mjs → layout-and-navigation/MarkdownInterpreter.js} +2 -2
- package/dist/components/layout-and-navigation/MarkdownInterpreter.js.map +1 -0
- package/dist/components/layout-and-navigation/Overlay.cjs +467 -0
- package/dist/components/layout-and-navigation/Overlay.cjs.map +1 -0
- package/dist/components/layout-and-navigation/Overlay.d.cts +63 -0
- package/dist/components/layout-and-navigation/Overlay.d.ts +63 -0
- package/dist/components/layout-and-navigation/Overlay.js +429 -0
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -0
- package/dist/components/{Pagination.js → layout-and-navigation/Pagination.cjs} +25 -10
- package/dist/components/layout-and-navigation/Pagination.cjs.map +1 -0
- package/dist/components/{Pagination.d.mts → layout-and-navigation/Pagination.d.cts} +2 -3
- package/dist/components/{Pagination.d.ts → layout-and-navigation/Pagination.d.ts} +2 -3
- package/dist/components/{Pagination.mjs → layout-and-navigation/Pagination.js} +25 -10
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -0
- package/dist/components/{SearchableList.js → layout-and-navigation/SearchableList.cjs} +51 -34
- package/dist/components/layout-and-navigation/SearchableList.cjs.map +1 -0
- package/dist/components/{SearchableList.d.mts → layout-and-navigation/SearchableList.d.cts} +2 -2
- package/dist/components/{SearchableList.d.ts → layout-and-navigation/SearchableList.d.ts} +2 -2
- package/dist/components/{SearchableList.mjs → layout-and-navigation/SearchableList.js} +52 -40
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -0
- package/dist/components/{StepperBar.js → layout-and-navigation/StepperBar.cjs} +42 -16
- package/dist/components/layout-and-navigation/StepperBar.cjs.map +1 -0
- package/dist/components/{StepperBar.d.mts → layout-and-navigation/StepperBar.d.cts} +2 -3
- package/dist/components/{StepperBar.d.ts → layout-and-navigation/StepperBar.d.ts} +2 -3
- package/dist/components/{StepperBar.mjs → layout-and-navigation/StepperBar.js} +40 -14
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -0
- package/dist/components/{Table.js → layout-and-navigation/Table.cjs} +176 -40
- package/dist/components/layout-and-navigation/Table.cjs.map +1 -0
- package/dist/components/{Table.d.mts → layout-and-navigation/Table.d.cts} +10 -1
- package/dist/components/{Table.d.ts → layout-and-navigation/Table.d.ts} +10 -1
- package/dist/components/{Table.mjs → layout-and-navigation/Table.js} +175 -40
- package/dist/components/layout-and-navigation/Table.js.map +1 -0
- package/dist/components/{TextImage.js → layout-and-navigation/TextImage.cjs} +25 -10
- package/dist/components/layout-and-navigation/TextImage.cjs.map +1 -0
- package/dist/components/{TextImage.d.mts → layout-and-navigation/TextImage.d.cts} +2 -3
- package/dist/components/{TextImage.d.ts → layout-and-navigation/TextImage.d.ts} +2 -3
- package/dist/components/{TextImage.mjs → layout-and-navigation/TextImage.js} +23 -8
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -0
- package/dist/components/{layout/Tile.js → layout-and-navigation/Tile.cjs} +4 -4
- package/dist/components/layout-and-navigation/Tile.cjs.map +1 -0
- package/dist/components/{layout/Tile.mjs → layout-and-navigation/Tile.js} +2 -2
- package/dist/components/layout-and-navigation/Tile.js.map +1 -0
- package/dist/components/{VerticalDivider.js → layout-and-navigation/VerticalDivider.cjs} +2 -2
- package/dist/components/layout-and-navigation/VerticalDivider.cjs.map +1 -0
- package/dist/components/{VerticalDivider.mjs → layout-and-navigation/VerticalDivider.js} +2 -2
- package/dist/components/layout-and-navigation/VerticalDivider.js.map +1 -0
- package/dist/components/{ErrorComponent.js → loading-states/ErrorComponent.cjs} +25 -10
- package/dist/components/loading-states/ErrorComponent.cjs.map +1 -0
- package/dist/components/{ErrorComponent.d.mts → loading-states/ErrorComponent.d.cts} +2 -3
- package/dist/components/{ErrorComponent.d.ts → loading-states/ErrorComponent.d.ts} +2 -3
- package/dist/components/{ErrorComponent.mjs → loading-states/ErrorComponent.js} +24 -9
- package/dist/components/loading-states/ErrorComponent.js.map +1 -0
- package/dist/components/{LoadingAndErrorComponent.js → loading-states/LoadingAndErrorComponent.cjs} +67 -18
- package/dist/components/loading-states/LoadingAndErrorComponent.cjs.map +1 -0
- package/dist/components/{LoadingAndErrorComponent.d.mts → loading-states/LoadingAndErrorComponent.d.cts} +6 -6
- package/dist/components/{LoadingAndErrorComponent.d.ts → loading-states/LoadingAndErrorComponent.d.ts} +4 -4
- package/dist/components/{LoadingAndErrorComponent.mjs → loading-states/LoadingAndErrorComponent.js} +66 -17
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -0
- package/dist/components/{LoadingAnimation.js → loading-states/LoadingAnimation.cjs} +64 -15
- package/dist/components/loading-states/LoadingAnimation.cjs.map +1 -0
- package/dist/components/{LoadingAnimation.d.mts → loading-states/LoadingAnimation.d.cts} +2 -3
- package/dist/components/{LoadingAnimation.d.ts → loading-states/LoadingAnimation.d.ts} +2 -3
- package/dist/components/{LoadingAnimation.mjs → loading-states/LoadingAnimation.js} +63 -14
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -0
- package/dist/components/{LoadingButton.js → loading-states/LoadingButton.cjs} +101 -58
- package/dist/components/loading-states/LoadingButton.cjs.map +1 -0
- package/dist/components/{LoadingButton.d.mts → loading-states/LoadingButton.d.cts} +1 -1
- package/dist/components/{LoadingButton.d.ts → loading-states/LoadingButton.d.ts} +1 -1
- package/dist/components/{LoadingButton.mjs → loading-states/LoadingButton.js} +100 -57
- package/dist/components/loading-states/LoadingButton.js.map +1 -0
- package/dist/components/{ProgressIndicator.js → loading-states/ProgressIndicator.cjs} +2 -2
- package/dist/components/loading-states/ProgressIndicator.cjs.map +1 -0
- package/dist/components/{ProgressIndicator.mjs → loading-states/ProgressIndicator.js} +2 -2
- package/dist/components/loading-states/ProgressIndicator.js.map +1 -0
- package/dist/components/modals/ConfirmDialog.cjs +353 -0
- package/dist/components/modals/ConfirmDialog.cjs.map +1 -0
- package/dist/components/modals/{ConfirmDialog.d.mts → ConfirmDialog.d.cts} +6 -6
- package/dist/components/modals/ConfirmDialog.d.ts +6 -6
- package/dist/components/modals/ConfirmDialog.js +157 -266
- package/dist/components/modals/ConfirmDialog.js.map +1 -1
- package/dist/components/modals/{DiscardChangesDialog.js → DiscardChangesModal.cjs} +213 -117
- package/dist/components/modals/DiscardChangesModal.cjs.map +1 -0
- package/dist/components/modals/DiscardChangesModal.d.cts +23 -0
- package/dist/components/modals/DiscardChangesModal.d.ts +23 -0
- package/dist/components/modals/{DiscardChangesDialog.mjs → DiscardChangesModal.js} +202 -106
- package/dist/components/modals/DiscardChangesModal.js.map +1 -0
- package/dist/components/modals/InputModal.cjs +533 -0
- package/dist/components/modals/InputModal.cjs.map +1 -0
- package/dist/components/modals/{InputModal.d.mts → InputModal.d.cts} +7 -7
- package/dist/components/modals/InputModal.d.ts +6 -6
- package/dist/components/modals/InputModal.js +197 -299
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.cjs +667 -0
- package/dist/components/modals/LanguageModal.cjs.map +1 -0
- package/dist/components/modals/LanguageModal.d.cts +20 -0
- package/dist/components/modals/LanguageModal.d.ts +7 -8
- package/dist/components/modals/LanguageModal.js +308 -204
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.cjs +694 -0
- package/dist/components/modals/ThemeModal.cjs.map +1 -0
- package/dist/components/modals/ThemeModal.d.cts +21 -0
- package/dist/components/modals/ThemeModal.d.ts +21 -0
- package/dist/components/modals/ThemeModal.js +657 -0
- package/dist/components/modals/ThemeModal.js.map +1 -0
- package/dist/components/properties/CheckboxProperty.cjs +362 -0
- package/dist/components/properties/CheckboxProperty.cjs.map +1 -0
- package/dist/components/properties/{CheckboxProperty.d.mts → CheckboxProperty.d.cts} +3 -3
- package/dist/components/properties/CheckboxProperty.d.ts +2 -2
- package/dist/components/properties/CheckboxProperty.js +94 -93
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.cjs +451 -0
- package/dist/components/properties/DateProperty.cjs.map +1 -0
- package/dist/components/properties/{DateProperty.d.mts → DateProperty.d.cts} +3 -3
- package/dist/components/properties/DateProperty.d.ts +2 -2
- package/dist/components/properties/DateProperty.js +110 -116
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/{MultiSelectProperty.mjs → MultiSelectProperty.cjs} +216 -155
- package/dist/components/properties/MultiSelectProperty.cjs.map +1 -0
- package/dist/components/properties/{MultiSelectProperty.d.mts → MultiSelectProperty.d.cts} +5 -5
- package/dist/components/properties/MultiSelectProperty.d.ts +4 -4
- package/dist/components/properties/MultiSelectProperty.js +180 -184
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.cjs +459 -0
- package/dist/components/properties/NumberProperty.cjs.map +1 -0
- package/dist/components/properties/{NumberProperty.d.mts → NumberProperty.d.cts} +3 -3
- package/dist/components/properties/NumberProperty.d.ts +2 -2
- package/dist/components/properties/NumberProperty.js +109 -116
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/PropertyBase.cjs +223 -0
- package/dist/components/properties/PropertyBase.cjs.map +1 -0
- package/dist/components/properties/{PropertyBase.d.mts → PropertyBase.d.cts} +2 -2
- package/dist/components/properties/PropertyBase.d.ts +2 -2
- package/dist/components/properties/PropertyBase.js +60 -69
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/{SelectProperty.mjs → SelectProperty.cjs} +251 -199
- package/dist/components/properties/SelectProperty.cjs.map +1 -0
- package/dist/components/properties/{SelectProperty.d.mts → SelectProperty.d.cts} +5 -6
- package/dist/components/properties/SelectProperty.d.ts +4 -5
- package/dist/components/properties/SelectProperty.js +215 -228
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.cjs +428 -0
- package/dist/components/properties/TextProperty.cjs.map +1 -0
- package/dist/components/properties/{TextProperty.d.mts → TextProperty.d.cts} +3 -3
- package/dist/components/properties/TextProperty.d.ts +2 -2
- package/dist/components/properties/TextProperty.js +134 -121
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/{Button.js → user-action/Button.cjs} +70 -12
- package/dist/components/user-action/Button.cjs.map +1 -0
- package/dist/components/{Button.d.mts → user-action/Button.d.cts} +32 -5
- package/dist/components/{Button.d.ts → user-action/Button.d.ts} +32 -5
- package/dist/components/{Button.mjs → user-action/Button.js} +66 -10
- package/dist/components/user-action/Button.js.map +1 -0
- package/dist/components/{user-input/Checkbox.js → user-action/Checkbox.cjs} +26 -16
- package/dist/components/user-action/Checkbox.cjs.map +1 -0
- package/dist/components/{user-input/Checkbox.d.mts → user-action/Checkbox.d.cts} +5 -5
- package/dist/components/{user-input → user-action}/Checkbox.d.ts +4 -4
- package/dist/components/{user-input/Checkbox.mjs → user-action/Checkbox.js} +24 -14
- package/dist/components/user-action/Checkbox.js.map +1 -0
- package/dist/components/{user-input/DateAndTimePicker.js → user-action/DateAndTimePicker.cjs} +51 -23
- package/dist/components/user-action/DateAndTimePicker.cjs.map +1 -0
- package/dist/components/{user-input/DateAndTimePicker.d.mts → user-action/DateAndTimePicker.d.cts} +7 -8
- package/dist/components/{user-input → user-action}/DateAndTimePicker.d.ts +2 -3
- package/dist/components/{user-input/DateAndTimePicker.mjs → user-action/DateAndTimePicker.js} +44 -16
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -0
- package/dist/components/{user-input/Input.js → user-action/Input.cjs} +35 -34
- package/dist/components/user-action/Input.cjs.map +1 -0
- package/dist/components/{user-input/Input.d.mts → user-action/Input.d.cts} +9 -16
- package/dist/components/{user-input → user-action}/Input.d.ts +8 -15
- package/dist/components/{user-input/Input.mjs → user-action/Input.js} +35 -39
- package/dist/components/user-action/Input.js.map +1 -0
- package/dist/components/{user-input/Label.js → user-action/Label.cjs} +15 -3
- package/dist/components/user-action/Label.cjs.map +1 -0
- package/dist/components/{user-input/Label.d.mts → user-action/Label.d.cts} +1 -1
- package/dist/components/{user-input → user-action}/Label.d.ts +1 -1
- package/dist/components/{user-input/Label.mjs → user-action/Label.js} +5 -3
- package/dist/components/user-action/Label.js.map +1 -0
- package/dist/components/{user-input/Menu.js → user-action/Menu.cjs} +4 -4
- package/dist/components/user-action/Menu.cjs.map +1 -0
- package/dist/components/{user-input/Menu.mjs → user-action/Menu.js} +3 -3
- package/dist/components/user-action/Menu.js.map +1 -0
- package/dist/components/{user-input/MultiSelect.js → user-action/MultiSelect.cjs} +76 -51
- package/dist/components/user-action/MultiSelect.cjs.map +1 -0
- package/dist/components/{user-input/MultiSelect.d.mts → user-action/MultiSelect.d.cts} +3 -3
- package/dist/components/{user-input → user-action}/MultiSelect.d.ts +2 -2
- package/dist/components/{user-input/MultiSelect.mjs → user-action/MultiSelect.js} +75 -55
- package/dist/components/user-action/MultiSelect.js.map +1 -0
- package/dist/components/{user-input/ScrollPicker.js → user-action/ScrollPicker.cjs} +4 -4
- package/dist/components/user-action/ScrollPicker.cjs.map +1 -0
- package/dist/components/{user-input/ScrollPicker.mjs → user-action/ScrollPicker.js} +3 -3
- package/dist/components/user-action/ScrollPicker.js.map +1 -0
- package/dist/components/{user-input/SearchableSelect.js → user-action/Select.cjs} +181 -152
- package/dist/components/user-action/Select.cjs.map +1 -0
- package/dist/components/user-action/Select.d.cts +49 -0
- package/dist/components/user-action/Select.d.ts +49 -0
- package/dist/components/{user-input/SearchableSelect.mjs → user-action/Select.js} +167 -145
- package/dist/components/user-action/Select.js.map +1 -0
- package/dist/components/{user-input/Textarea.js → user-action/Textarea.cjs} +80 -35
- package/dist/components/user-action/Textarea.cjs.map +1 -0
- package/dist/components/user-action/Textarea.d.cts +28 -0
- package/dist/components/{user-input → user-action}/Textarea.d.ts +9 -5
- package/dist/components/user-action/Textarea.js +163 -0
- package/dist/components/user-action/Textarea.js.map +1 -0
- package/dist/components/{user-input/ToggleableInput.js → user-action/ToggleableInput.cjs} +9 -15
- package/dist/components/user-action/ToggleableInput.cjs.map +1 -0
- package/dist/components/{user-input/ToggleableInput.mjs → user-action/ToggleableInput.js} +8 -14
- package/dist/components/user-action/ToggleableInput.js.map +1 -0
- package/dist/components/{Tooltip.js → user-action/Tooltip.cjs} +13 -9
- package/dist/components/user-action/Tooltip.cjs.map +1 -0
- package/dist/components/{Tooltip.d.mts → user-action/Tooltip.d.cts} +1 -1
- package/dist/components/{Tooltip.d.ts → user-action/Tooltip.d.ts} +1 -1
- package/dist/components/{Tooltip.mjs → user-action/Tooltip.js} +12 -8
- package/dist/components/user-action/Tooltip.js.map +1 -0
- package/dist/css/globals.css +178 -126
- package/dist/css/uncompiled/globals.css +65 -29
- package/dist/hooks/useHoverState.cjs +72 -0
- package/dist/hooks/{useHoverState.mjs.map → useHoverState.cjs.map} +1 -1
- package/dist/hooks/useHoverState.js +7 -32
- package/dist/hooks/useHoverState.js.map +1 -1
- package/dist/hooks/useLocalStorage.cjs +83 -0
- package/dist/hooks/useLocalStorage.cjs.map +1 -0
- package/dist/hooks/useLocalStorage.js +9 -34
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useOutsideClick.cjs +48 -0
- package/dist/hooks/{useOutsideClick.mjs.map → useOutsideClick.cjs.map} +1 -1
- package/dist/hooks/useOutsideClick.js +4 -29
- package/dist/hooks/useOutsideClick.js.map +1 -1
- package/dist/hooks/useSaveDelay.cjs +68 -0
- package/dist/hooks/{useSaveDelay.mjs.map → useSaveDelay.cjs.map} +1 -1
- package/dist/hooks/useSaveDelay.js +6 -31
- package/dist/hooks/useSaveDelay.js.map +1 -1
- package/dist/{index.mjs → index.cjs} +4008 -3882
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +82 -0
- package/dist/index.d.ts +49 -55
- package/dist/index.js +3825 -4056
- package/dist/index.js.map +1 -1
- package/dist/{hooks/useLanguage.js → localization/LanguageProvider.cjs} +30 -26
- package/dist/localization/LanguageProvider.cjs.map +1 -0
- package/dist/localization/LanguageProvider.d.cts +18 -0
- package/dist/localization/LanguageProvider.d.ts +18 -0
- package/dist/{hooks/useLanguage.mjs → localization/LanguageProvider.js} +26 -19
- package/dist/localization/LanguageProvider.js.map +1 -0
- package/dist/{hooks/useTranslation.js → localization/useTranslation.cjs} +23 -8
- package/dist/localization/useTranslation.cjs.map +1 -0
- package/dist/{hooks/useTranslation.d.mts → localization/useTranslation.d.cts} +5 -7
- package/dist/{hooks → localization}/useTranslation.d.ts +5 -7
- package/dist/{hooks/useTranslation.mjs → localization/useTranslation.js} +22 -7
- package/dist/localization/useTranslation.js.map +1 -0
- package/dist/localization/util.cjs +41 -0
- package/dist/localization/util.cjs.map +1 -0
- package/dist/localization/util.d.cts +18 -0
- package/dist/localization/util.d.ts +18 -0
- package/dist/localization/util.js +16 -0
- package/dist/localization/util.js.map +1 -0
- package/dist/{hooks/useTheme.js → theming/useTheme.cjs} +19 -11
- package/dist/theming/useTheme.cjs.map +1 -0
- package/dist/{hooks/useTheme.d.mts → theming/useTheme.d.cts} +9 -5
- package/dist/{hooks → theming}/useTheme.d.ts +9 -5
- package/dist/{hooks/useTheme.mjs → theming/useTheme.js} +15 -7
- package/dist/theming/useTheme.js.map +1 -0
- package/dist/util/{array.mjs → array.cjs} +34 -3
- package/dist/util/array.cjs.map +1 -0
- package/dist/util/array.js +2 -33
- package/dist/util/array.js.map +1 -1
- package/dist/util/builder.cjs +34 -0
- package/dist/util/{builder.mjs.map → builder.cjs.map} +1 -1
- package/dist/util/builder.js +2 -27
- package/dist/util/builder.js.map +1 -1
- package/dist/util/{date.mjs → date.cjs} +41 -3
- package/dist/util/date.cjs.map +1 -0
- package/dist/util/date.js +2 -40
- package/dist/util/date.js.map +1 -1
- package/dist/util/easeFunctions.cjs +63 -0
- package/dist/util/easeFunctions.cjs.map +1 -0
- package/dist/util/easeFunctions.js +2 -29
- package/dist/util/easeFunctions.js.map +1 -1
- package/dist/util/emailValidation.cjs +33 -0
- package/dist/util/{emailValidation.mjs.map → emailValidation.cjs.map} +1 -1
- package/dist/util/emailValidation.js +2 -27
- package/dist/util/emailValidation.js.map +1 -1
- package/dist/util/{loopingArray.mjs → loopingArray.cjs} +28 -3
- package/dist/util/{loopingArray.mjs.map → loopingArray.cjs.map} +1 -1
- package/dist/util/loopingArray.js +2 -27
- package/dist/util/loopingArray.js.map +1 -1
- package/dist/util/math.cjs +33 -0
- package/dist/util/{math.mjs.map → math.cjs.map} +1 -1
- package/dist/util/math.js +2 -27
- package/dist/util/math.js.map +1 -1
- package/dist/util/news.cjs +77 -0
- package/dist/util/news.cjs.map +1 -0
- package/dist/util/{news.d.mts → news.d.cts} +11 -13
- package/dist/util/news.d.ts +11 -13
- package/dist/util/news.js +22 -49
- package/dist/util/news.js.map +1 -1
- package/dist/util/noop.cjs +31 -0
- package/dist/util/noop.cjs.map +1 -0
- package/dist/util/noop.js +2 -27
- package/dist/util/noop.js.map +1 -1
- package/dist/util/simpleSearch.cjs +54 -0
- package/dist/util/simpleSearch.cjs.map +1 -0
- package/dist/util/simpleSearch.js +2 -30
- package/dist/util/simpleSearch.js.map +1 -1
- package/dist/util/storage.cjs +64 -0
- package/dist/util/storage.cjs.map +1 -0
- package/dist/util/storage.js +2 -28
- package/dist/util/storage.js.map +1 -1
- package/dist/util/types.cjs +19 -0
- package/dist/util/types.cjs.map +1 -0
- package/dist/util/types.js +0 -18
- package/dist/util/types.js.map +1 -1
- package/package.json +9 -12
- package/dist/coloring/shading.mjs +0 -47
- package/dist/coloring/shading.mjs.map +0 -1
- package/dist/coloring/types.mjs +0 -6
- package/dist/components/Avatar.d.mts +0 -17
- package/dist/components/Avatar.d.ts +0 -17
- package/dist/components/Avatar.js +0 -85
- package/dist/components/Avatar.js.map +0 -1
- package/dist/components/Avatar.mjs +0 -48
- package/dist/components/Avatar.mjs.map +0 -1
- package/dist/components/AvatarGroup.d.mts +0 -14
- package/dist/components/AvatarGroup.d.ts +0 -14
- package/dist/components/AvatarGroup.js.map +0 -1
- package/dist/components/AvatarGroup.mjs.map +0 -1
- package/dist/components/BreadCrumb.js.map +0 -1
- package/dist/components/BreadCrumb.mjs.map +0 -1
- package/dist/components/Button.js.map +0 -1
- package/dist/components/Button.mjs.map +0 -1
- package/dist/components/ChipList.js.map +0 -1
- package/dist/components/ChipList.mjs.map +0 -1
- package/dist/components/Circle.js.map +0 -1
- package/dist/components/Circle.mjs.map +0 -1
- package/dist/components/ErrorComponent.js.map +0 -1
- package/dist/components/ErrorComponent.mjs.map +0 -1
- package/dist/components/Expandable.js.map +0 -1
- package/dist/components/Expandable.mjs.map +0 -1
- package/dist/components/HelpwaveBadge.js.map +0 -1
- package/dist/components/HelpwaveBadge.mjs +0 -91
- package/dist/components/HelpwaveBadge.mjs.map +0 -1
- package/dist/components/HideableContentSection.d.mts +0 -14
- package/dist/components/HideableContentSection.d.ts +0 -14
- package/dist/components/HideableContentSection.js +0 -70
- package/dist/components/HideableContentSection.js.map +0 -1
- package/dist/components/HideableContentSection.mjs +0 -35
- package/dist/components/HideableContentSection.mjs.map +0 -1
- package/dist/components/InputGroup.d.mts +0 -17
- package/dist/components/InputGroup.d.ts +0 -17
- package/dist/components/InputGroup.js +0 -97
- package/dist/components/InputGroup.js.map +0 -1
- package/dist/components/InputGroup.mjs +0 -62
- package/dist/components/InputGroup.mjs.map +0 -1
- package/dist/components/LoadingAndErrorComponent.js.map +0 -1
- package/dist/components/LoadingAndErrorComponent.mjs.map +0 -1
- package/dist/components/LoadingAnimation.js.map +0 -1
- package/dist/components/LoadingAnimation.mjs.map +0 -1
- package/dist/components/LoadingButton.js.map +0 -1
- package/dist/components/LoadingButton.mjs.map +0 -1
- package/dist/components/MarkdownInterpreter.js.map +0 -1
- package/dist/components/MarkdownInterpreter.mjs.map +0 -1
- package/dist/components/Pagination.js.map +0 -1
- package/dist/components/Pagination.mjs.map +0 -1
- package/dist/components/Profile.d.mts +0 -31
- package/dist/components/Profile.d.ts +0 -31
- package/dist/components/Profile.js +0 -197
- package/dist/components/Profile.js.map +0 -1
- package/dist/components/Profile.mjs +0 -162
- package/dist/components/Profile.mjs.map +0 -1
- package/dist/components/ProgressIndicator.js.map +0 -1
- package/dist/components/ProgressIndicator.mjs.map +0 -1
- package/dist/components/Ring.js.map +0 -1
- package/dist/components/Ring.mjs.map +0 -1
- package/dist/components/SearchableList.js.map +0 -1
- package/dist/components/SearchableList.mjs.map +0 -1
- package/dist/components/SortButton.d.mts +0 -15
- package/dist/components/SortButton.d.ts +0 -15
- package/dist/components/SortButton.js +0 -132
- package/dist/components/SortButton.js.map +0 -1
- package/dist/components/SortButton.mjs +0 -97
- package/dist/components/SortButton.mjs.map +0 -1
- package/dist/components/StepperBar.js.map +0 -1
- package/dist/components/StepperBar.mjs.map +0 -1
- package/dist/components/Table.js.map +0 -1
- package/dist/components/Table.mjs.map +0 -1
- package/dist/components/TechRadar.d.mts +0 -39
- package/dist/components/TechRadar.d.ts +0 -39
- package/dist/components/TechRadar.js +0 -243
- package/dist/components/TechRadar.js.map +0 -1
- package/dist/components/TechRadar.mjs +0 -208
- package/dist/components/TechRadar.mjs.map +0 -1
- package/dist/components/TextImage.js.map +0 -1
- package/dist/components/TextImage.mjs.map +0 -1
- package/dist/components/TimeDisplay.js.map +0 -1
- package/dist/components/TimeDisplay.mjs.map +0 -1
- package/dist/components/Tooltip.js.map +0 -1
- package/dist/components/Tooltip.mjs.map +0 -1
- package/dist/components/VerticalDivider.js.map +0 -1
- package/dist/components/VerticalDivider.mjs.map +0 -1
- package/dist/components/date/DatePicker.mjs.map +0 -1
- package/dist/components/date/DayPicker.mjs.map +0 -1
- package/dist/components/date/TimePicker.mjs.map +0 -1
- package/dist/components/date/YearMonthPicker.mjs.map +0 -1
- package/dist/components/icons/Helpwave.js.map +0 -1
- package/dist/components/icons/Helpwave.mjs +0 -43
- package/dist/components/icons/Helpwave.mjs.map +0 -1
- package/dist/components/icons/Tag.js.map +0 -1
- package/dist/components/icons/Tag.mjs.map +0 -1
- package/dist/components/layout/Carousel.js.map +0 -1
- package/dist/components/layout/Carousel.mjs.map +0 -1
- package/dist/components/layout/DividerInserter.js.map +0 -1
- package/dist/components/layout/DividerInserter.mjs.map +0 -1
- package/dist/components/layout/FAQSection.js.map +0 -1
- package/dist/components/layout/FAQSection.mjs.map +0 -1
- package/dist/components/layout/Tile.js.map +0 -1
- package/dist/components/layout/Tile.mjs.map +0 -1
- package/dist/components/modals/ConfirmDialog.mjs +0 -388
- package/dist/components/modals/ConfirmDialog.mjs.map +0 -1
- package/dist/components/modals/DiscardChangesDialog.d.mts +0 -23
- package/dist/components/modals/DiscardChangesDialog.d.ts +0 -23
- package/dist/components/modals/DiscardChangesDialog.js.map +0 -1
- package/dist/components/modals/DiscardChangesDialog.mjs.map +0 -1
- package/dist/components/modals/InputModal.mjs +0 -566
- package/dist/components/modals/InputModal.mjs.map +0 -1
- package/dist/components/modals/LanguageModal.d.mts +0 -21
- package/dist/components/modals/LanguageModal.mjs +0 -489
- package/dist/components/modals/LanguageModal.mjs.map +0 -1
- package/dist/components/modals/Modal.d.mts +0 -43
- package/dist/components/modals/Modal.d.ts +0 -43
- package/dist/components/modals/Modal.js +0 -286
- package/dist/components/modals/Modal.js.map +0 -1
- package/dist/components/modals/Modal.mjs +0 -249
- package/dist/components/modals/Modal.mjs.map +0 -1
- package/dist/components/modals/ModalRegister.d.mts +0 -16
- package/dist/components/modals/ModalRegister.d.ts +0 -16
- package/dist/components/modals/ModalRegister.js +0 -63
- package/dist/components/modals/ModalRegister.js.map +0 -1
- package/dist/components/modals/ModalRegister.mjs +0 -37
- package/dist/components/modals/ModalRegister.mjs.map +0 -1
- package/dist/components/properties/CheckboxProperty.mjs +0 -291
- package/dist/components/properties/CheckboxProperty.mjs.map +0 -1
- package/dist/components/properties/DateProperty.mjs +0 -392
- package/dist/components/properties/DateProperty.mjs.map +0 -1
- package/dist/components/properties/MultiSelectProperty.mjs.map +0 -1
- package/dist/components/properties/NumberProperty.mjs +0 -401
- package/dist/components/properties/NumberProperty.mjs.map +0 -1
- package/dist/components/properties/PropertyBase.mjs +0 -162
- package/dist/components/properties/PropertyBase.mjs.map +0 -1
- package/dist/components/properties/SelectProperty.mjs.map +0 -1
- package/dist/components/properties/TextProperty.mjs +0 -345
- package/dist/components/properties/TextProperty.mjs.map +0 -1
- package/dist/components/user-input/Checkbox.js.map +0 -1
- package/dist/components/user-input/Checkbox.mjs.map +0 -1
- package/dist/components/user-input/DateAndTimePicker.js.map +0 -1
- package/dist/components/user-input/DateAndTimePicker.mjs.map +0 -1
- package/dist/components/user-input/Input.js.map +0 -1
- package/dist/components/user-input/Input.mjs.map +0 -1
- package/dist/components/user-input/Label.js.map +0 -1
- package/dist/components/user-input/Label.mjs.map +0 -1
- package/dist/components/user-input/Menu.js.map +0 -1
- package/dist/components/user-input/Menu.mjs.map +0 -1
- package/dist/components/user-input/MultiSelect.js.map +0 -1
- package/dist/components/user-input/MultiSelect.mjs.map +0 -1
- package/dist/components/user-input/ScrollPicker.js.map +0 -1
- package/dist/components/user-input/ScrollPicker.mjs.map +0 -1
- package/dist/components/user-input/SearchableSelect.d.mts +0 -14
- package/dist/components/user-input/SearchableSelect.d.ts +0 -14
- package/dist/components/user-input/SearchableSelect.js.map +0 -1
- package/dist/components/user-input/SearchableSelect.mjs.map +0 -1
- package/dist/components/user-input/Select.d.mts +0 -36
- package/dist/components/user-input/Select.d.ts +0 -36
- package/dist/components/user-input/Select.js +0 -153
- package/dist/components/user-input/Select.js.map +0 -1
- package/dist/components/user-input/Select.mjs +0 -118
- package/dist/components/user-input/Select.mjs.map +0 -1
- package/dist/components/user-input/Textarea.d.mts +0 -24
- package/dist/components/user-input/Textarea.js.map +0 -1
- package/dist/components/user-input/Textarea.mjs +0 -119
- package/dist/components/user-input/Textarea.mjs.map +0 -1
- package/dist/components/user-input/ToggleableInput.js.map +0 -1
- package/dist/components/user-input/ToggleableInput.mjs.map +0 -1
- package/dist/hooks/useHoverState.mjs +0 -47
- package/dist/hooks/useLanguage.d.mts +0 -21
- package/dist/hooks/useLanguage.d.ts +0 -21
- package/dist/hooks/useLanguage.js.map +0 -1
- package/dist/hooks/useLanguage.mjs.map +0 -1
- package/dist/hooks/useLocalStorage.mjs +0 -58
- package/dist/hooks/useLocalStorage.mjs.map +0 -1
- package/dist/hooks/useOutsideClick.mjs +0 -23
- package/dist/hooks/useSaveDelay.mjs +0 -43
- package/dist/hooks/useTheme.js.map +0 -1
- package/dist/hooks/useTheme.mjs.map +0 -1
- package/dist/hooks/useTranslation.js.map +0 -1
- package/dist/hooks/useTranslation.mjs.map +0 -1
- package/dist/index.d.mts +0 -88
- package/dist/index.mjs.map +0 -1
- package/dist/util/array.mjs.map +0 -1
- package/dist/util/builder.mjs +0 -9
- package/dist/util/date.mjs.map +0 -1
- package/dist/util/easeFunctions.mjs +0 -36
- package/dist/util/easeFunctions.mjs.map +0 -1
- package/dist/util/emailValidation.mjs +0 -8
- package/dist/util/math.mjs +0 -8
- package/dist/util/news.mjs +0 -48
- package/dist/util/news.mjs.map +0 -1
- package/dist/util/noop.mjs +0 -6
- package/dist/util/noop.mjs.map +0 -1
- package/dist/util/simpleSearch.mjs +0 -26
- package/dist/util/simpleSearch.mjs.map +0 -1
- package/dist/util/storage.mjs +0 -38
- package/dist/util/storage.mjs.map +0 -1
- package/dist/util/types.mjs +0 -1
- package/dist/util/types.mjs.map +0 -1
- /package/dist/coloring/{types.d.mts → types.d.cts} +0 -0
- /package/dist/components/{HelpwaveBadge.d.mts → branding/HelpwaveBadge.d.cts} +0 -0
- /package/dist/components/{HelpwaveBadge.d.ts → branding/HelpwaveBadge.d.ts} +0 -0
- /package/dist/components/{Circle.d.mts → icons-and-geometry/Circle.d.cts} +0 -0
- /package/dist/components/{Circle.d.ts → icons-and-geometry/Circle.d.ts} +0 -0
- /package/dist/components/{icons/Helpwave.d.mts → icons-and-geometry/Helpwave.d.cts} +0 -0
- /package/dist/components/{icons → icons-and-geometry}/Helpwave.d.ts +0 -0
- /package/dist/components/{Ring.d.mts → icons-and-geometry/Ring.d.cts} +0 -0
- /package/dist/components/{Ring.d.ts → icons-and-geometry/Ring.d.ts} +0 -0
- /package/dist/components/{icons/Tag.d.mts → icons-and-geometry/Tag.d.cts} +0 -0
- /package/dist/components/{icons → icons-and-geometry}/Tag.d.ts +0 -0
- /package/dist/components/{BreadCrumb.d.mts → layout-and-navigation/BreadCrumb.d.cts} +0 -0
- /package/dist/components/{BreadCrumb.d.ts → layout-and-navigation/BreadCrumb.d.ts} +0 -0
- /package/dist/components/{layout/Carousel.d.mts → layout-and-navigation/Carousel.d.cts} +0 -0
- /package/dist/components/{layout → layout-and-navigation}/Carousel.d.ts +0 -0
- /package/dist/components/{ChipList.d.mts → layout-and-navigation/Chip.d.cts} +0 -0
- /package/dist/components/{ChipList.d.ts → layout-and-navigation/Chip.d.ts} +0 -0
- /package/dist/components/{layout/DividerInserter.d.mts → layout-and-navigation/DividerInserter.d.cts} +0 -0
- /package/dist/components/{layout → layout-and-navigation}/DividerInserter.d.ts +0 -0
- /package/dist/components/{Expandable.d.mts → layout-and-navigation/Expandable.d.cts} +0 -0
- /package/dist/components/{Expandable.d.ts → layout-and-navigation/Expandable.d.ts} +0 -0
- /package/dist/components/{MarkdownInterpreter.d.mts → layout-and-navigation/MarkdownInterpreter.d.cts} +0 -0
- /package/dist/components/{MarkdownInterpreter.d.ts → layout-and-navigation/MarkdownInterpreter.d.ts} +0 -0
- /package/dist/components/{layout/Tile.d.mts → layout-and-navigation/Tile.d.cts} +0 -0
- /package/dist/components/{layout → layout-and-navigation}/Tile.d.ts +0 -0
- /package/dist/components/{VerticalDivider.d.mts → layout-and-navigation/VerticalDivider.d.cts} +0 -0
- /package/dist/components/{VerticalDivider.d.ts → layout-and-navigation/VerticalDivider.d.ts} +0 -0
- /package/dist/components/{ProgressIndicator.d.mts → loading-states/ProgressIndicator.d.cts} +0 -0
- /package/dist/components/{ProgressIndicator.d.ts → loading-states/ProgressIndicator.d.ts} +0 -0
- /package/dist/components/{user-input/Menu.d.mts → user-action/Menu.d.cts} +0 -0
- /package/dist/components/{user-input → user-action}/Menu.d.ts +0 -0
- /package/dist/components/{user-input/ScrollPicker.d.mts → user-action/ScrollPicker.d.cts} +0 -0
- /package/dist/components/{user-input → user-action}/ScrollPicker.d.ts +0 -0
- /package/dist/components/{user-input/ToggleableInput.d.mts → user-action/ToggleableInput.d.cts} +0 -0
- /package/dist/components/{user-input → user-action}/ToggleableInput.d.ts +0 -0
- /package/dist/hooks/{useHoverState.d.mts → useHoverState.d.cts} +0 -0
- /package/dist/hooks/{useLocalStorage.d.mts → useLocalStorage.d.cts} +0 -0
- /package/dist/hooks/{useOutsideClick.d.mts → useOutsideClick.d.cts} +0 -0
- /package/dist/hooks/{useSaveDelay.d.mts → useSaveDelay.d.cts} +0 -0
- /package/dist/util/{array.d.mts → array.d.cts} +0 -0
- /package/dist/util/{builder.d.mts → builder.d.cts} +0 -0
- /package/dist/util/{date.d.mts → date.d.cts} +0 -0
- /package/dist/util/{easeFunctions.d.mts → easeFunctions.d.cts} +0 -0
- /package/dist/util/{emailValidation.d.mts → emailValidation.d.cts} +0 -0
- /package/dist/util/{loopingArray.d.mts → loopingArray.d.cts} +0 -0
- /package/dist/util/{math.d.mts → math.d.cts} +0 -0
- /package/dist/util/{noop.d.mts → noop.d.cts} +0 -0
- /package/dist/util/{simpleSearch.d.mts → simpleSearch.d.cts} +0 -0
- /package/dist/util/{storage.d.mts → storage.d.cts} +0 -0
- /package/dist/util/{types.d.mts → types.d.cts} +0 -0
|
@@ -248,33 +248,39 @@
|
|
|
248
248
|
--color-disabled-icon: #555555;
|
|
249
249
|
--color-disabled-outline: #555555;
|
|
250
250
|
|
|
251
|
-
--color-button-solid-primary-background: var(--color-
|
|
252
|
-
--color-button-solid-primary-text:
|
|
253
|
-
--color-button-solid-primary-icon:
|
|
254
|
-
--color-button-solid-secondary-background:
|
|
255
|
-
--color-button-solid-secondary-text: var(--color-
|
|
256
|
-
--color-button-solid-secondary-icon: var(--color-
|
|
251
|
+
--color-button-solid-primary-background: var(--color-primary);
|
|
252
|
+
--color-button-solid-primary-text: var(--color-on-primary);
|
|
253
|
+
--color-button-solid-primary-icon: var(--color-on-primary);
|
|
254
|
+
--color-button-solid-secondary-background: var(--color-purple-50);
|
|
255
|
+
--color-button-solid-secondary-text: var(--color-primary);
|
|
256
|
+
--color-button-solid-secondary-icon: var(--color-primary);
|
|
257
257
|
--color-button-solid-tertiary-background: #F2F2F2;
|
|
258
258
|
--color-button-solid-tertiary-icon: #888888;
|
|
259
259
|
--color-button-solid-tertiary-text: #888888;
|
|
260
|
-
--color-button-
|
|
261
|
-
--color-button-
|
|
262
|
-
--color-button-
|
|
263
|
-
--color-button-solid-positive-background:
|
|
264
|
-
--color-button-solid-positive-icon:
|
|
265
|
-
--color-button-solid-positive-text:
|
|
266
|
-
--color-button-solid-warning-background:
|
|
267
|
-
--color-button-solid-warning-icon:
|
|
268
|
-
--color-button-solid-warning-text:
|
|
269
|
-
--color-button-solid-negative-background:
|
|
270
|
-
--color-button-solid-negative-icon:
|
|
271
|
-
--color-button-solid-negative-text:
|
|
272
|
-
|
|
273
|
-
--color-button-
|
|
260
|
+
--color-button-solid-neutral-background: #D6D6D6;
|
|
261
|
+
--color-button-solid-neutral-icon: #1A1A1A;
|
|
262
|
+
--color-button-solid-neutral-text: #1A1A1A;
|
|
263
|
+
--color-button-solid-positive-background: var(--color-positive);
|
|
264
|
+
--color-button-solid-positive-icon: var(--color-on-positive);
|
|
265
|
+
--color-button-solid-positive-text: var(--color-on-positive);
|
|
266
|
+
--color-button-solid-warning-background: var(--color-warning);
|
|
267
|
+
--color-button-solid-warning-icon: var(--color-on-warning);
|
|
268
|
+
--color-button-solid-warning-text: var(--color-on-warning);
|
|
269
|
+
--color-button-solid-negative-background: var(--color-negative);
|
|
270
|
+
--color-button-solid-negative-icon: var(--color-on-negative);
|
|
271
|
+
--color-button-solid-negative-text: var(--color-on-negative);
|
|
272
|
+
|
|
273
|
+
--color-button-outline-primary-outline: var(--color-primary);
|
|
274
|
+
--color-button-outline-primary-icon: var(--color-primary);
|
|
275
|
+
--color-button-outline-primary-text: var(--color-primary);
|
|
276
|
+
|
|
277
|
+
--color-button-text-hover-background: #77777733;
|
|
274
278
|
--color-button-text-neutral-text: #333333;
|
|
275
279
|
--color-button-text-neutral-icon: #333333;
|
|
276
|
-
--color-button-text-negative-text:
|
|
277
|
-
--color-button-text-negative-icon:
|
|
280
|
+
--color-button-text-negative-text: var(--color-negative);
|
|
281
|
+
--color-button-text-negative-icon: var(--color-negative);
|
|
282
|
+
--color-button-text-primary-text: var(--color-primary);
|
|
283
|
+
--color-button-text-primary-icon: var(--color-primary);
|
|
278
284
|
|
|
279
285
|
--color-menu-background: #FFFFFF;
|
|
280
286
|
--color-menu-text: #1A1A1A;
|
|
@@ -304,13 +310,19 @@
|
|
|
304
310
|
|
|
305
311
|
--color-tabel-header-background: #F6FAFF;
|
|
306
312
|
|
|
307
|
-
--color-text-image-primary-background: var(--color-
|
|
308
|
-
--color-text-image-primary-text:
|
|
313
|
+
--color-text-image-primary-background: var(--color-primary);
|
|
314
|
+
--color-text-image-primary-text: var(--color-on-primary);
|
|
309
315
|
--color-text-image-secondary-background: #3171DE;
|
|
310
316
|
--color-text-image-secondary-text: #FFFFFF;
|
|
311
317
|
--color-text-image-dark-background: #11243E;
|
|
312
318
|
--color-text-image-dark-text: #FFFFFF;
|
|
313
319
|
|
|
320
|
+
--color-overlay-background: #FFFFFF;
|
|
321
|
+
--color-overlay-text: #1A1A1A;
|
|
322
|
+
|
|
323
|
+
--color-tooltip-background: var(--color-overlay-background);
|
|
324
|
+
--color-tooltip-text: var(--color-description);
|
|
325
|
+
|
|
314
326
|
/* breakpoints */
|
|
315
327
|
--breakpoint-tablet: 48rem; /* 768px for 16px font-size */
|
|
316
328
|
--breakpoint-desktop: 64rem; /* 1024px for 16px font-size*/
|
|
@@ -350,7 +362,12 @@
|
|
|
350
362
|
--color-disabled-background: #555555;
|
|
351
363
|
--color-disabled-text: #888888;
|
|
352
364
|
|
|
353
|
-
|
|
365
|
+
|
|
366
|
+
--color-button-solid-neutral-background: #3F3F3F;
|
|
367
|
+
--color-button-solid-neutral-icon: #EEEEEE;
|
|
368
|
+
--color-button-solid-neutral-text: #EEEEEE;
|
|
369
|
+
|
|
370
|
+
--color-button-text-hover-background: #3F3F3F;
|
|
354
371
|
--color-button-text-neutral-text: #EEEEEE;
|
|
355
372
|
--color-button-text-neutral-icon: #EEEEEE;
|
|
356
373
|
|
|
@@ -359,21 +376,36 @@
|
|
|
359
376
|
--color-menu-border: #999999;
|
|
360
377
|
|
|
361
378
|
--color-tabel-header-background: #F6FAFF;
|
|
379
|
+
|
|
380
|
+
--color-overlay-background: #222222;
|
|
381
|
+
--color-overlay-text: #FFFFFF;
|
|
362
382
|
}
|
|
363
383
|
}
|
|
364
384
|
|
|
365
385
|
/* Styles that can be overwritten by utils */
|
|
366
386
|
@layer components {
|
|
367
387
|
.btn-sm {
|
|
368
|
-
@apply row items-center justify-center gap-x-1 px-[0.625rem] py-[0.25rem] rounded-[0.375rem];
|
|
388
|
+
@apply row items-center justify-center gap-x-1 px-[0.625rem] py-[0.25rem] rounded-[0.375rem] h-8;
|
|
369
389
|
}
|
|
370
390
|
|
|
371
391
|
.btn-md {
|
|
372
|
-
@apply row items-center justify-center gap-x-2 px-[0.75rem] py-[0.5rem] rounded-[0.375rem];
|
|
392
|
+
@apply row items-center justify-center gap-x-2 px-[0.75rem] py-[0.5rem] rounded-[0.375rem] h-10;
|
|
373
393
|
}
|
|
374
394
|
|
|
375
395
|
.btn-lg {
|
|
376
|
-
@apply row items-center justify-center gap-x-2 px-[1rem] py-[0.675rem] rounded-[0.375rem];
|
|
396
|
+
@apply row items-center justify-center gap-x-2 px-[1rem] py-[0.675rem] rounded-[0.375rem] h-12;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
.icon-btn-sm {
|
|
400
|
+
@apply row items-center justify-center gap-x-1 p-[0.375rem] rounded-[0.375rem] h-8;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.icon-btn-md {
|
|
404
|
+
@apply row items-center justify-center gap-x-2 p-[0.5rem] rounded-[0.375rem] h-10;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.icon-btn-lg {
|
|
408
|
+
@apply row items-center justify-center gap-x-2 p-[0.75rem] rounded-[0.375rem] h-12;
|
|
377
409
|
}
|
|
378
410
|
|
|
379
411
|
.card-sm {
|
|
@@ -418,6 +450,10 @@
|
|
|
418
450
|
@apply cursor-pointer;
|
|
419
451
|
}
|
|
420
452
|
|
|
453
|
+
input {
|
|
454
|
+
@apply block bg-surface text-on-surface px-3 py-2 rounded-md border-2 border-gray-200 hover:border-primary focus:outline-none focus:border-primary focus:ring-primary;
|
|
455
|
+
}
|
|
456
|
+
|
|
421
457
|
.textstyle-title-3xl {
|
|
422
458
|
@apply text-5xl font-space font-bold;
|
|
423
459
|
}
|
|
@@ -451,7 +487,7 @@
|
|
|
451
487
|
}
|
|
452
488
|
|
|
453
489
|
.textstyle-description {
|
|
454
|
-
@apply text-
|
|
490
|
+
@apply text-description;
|
|
455
491
|
}
|
|
456
492
|
|
|
457
493
|
.textstyle-label-lg {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/hooks/useHoverState.ts
|
|
21
|
+
var useHoverState_exports = {};
|
|
22
|
+
__export(useHoverState_exports, {
|
|
23
|
+
useHoverState: () => useHoverState
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(useHoverState_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var defaultUseHoverStateProps = {
|
|
28
|
+
closingDelay: 200,
|
|
29
|
+
isDisabled: false
|
|
30
|
+
};
|
|
31
|
+
var useHoverState = (props = void 0) => {
|
|
32
|
+
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
33
|
+
const [isHovered, setIsHovered] = (0, import_react.useState)(false);
|
|
34
|
+
const [timer, setTimer] = (0, import_react.useState)();
|
|
35
|
+
const onMouseEnter = () => {
|
|
36
|
+
if (isDisabled) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
clearTimeout(timer);
|
|
40
|
+
setIsHovered(true);
|
|
41
|
+
};
|
|
42
|
+
const onMouseLeave = () => {
|
|
43
|
+
if (isDisabled) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
setTimer(setTimeout(() => {
|
|
47
|
+
setIsHovered(false);
|
|
48
|
+
}, closingDelay));
|
|
49
|
+
};
|
|
50
|
+
(0, import_react.useEffect)(() => {
|
|
51
|
+
if (timer) {
|
|
52
|
+
return () => {
|
|
53
|
+
clearTimeout(timer);
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
(0, import_react.useEffect)(() => {
|
|
58
|
+
if (timer) {
|
|
59
|
+
clearTimeout(timer);
|
|
60
|
+
}
|
|
61
|
+
}, [isDisabled]);
|
|
62
|
+
return {
|
|
63
|
+
isHovered,
|
|
64
|
+
setIsHovered,
|
|
65
|
+
handlers: { onMouseEnter, onMouseLeave }
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
useHoverState
|
|
71
|
+
});
|
|
72
|
+
//# sourceMappingURL=useHoverState.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useHoverState.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n"],"mappings":";AACA,
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useHoverState.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAoC;AAmCpC,IAAM,4BAAgD;AAAA,EACpD,cAAc;AAAA,EACd,YAAY;AACd;AAQO,IAAM,gBAAgB,CAAC,QAAiD,WAAuC;AACpH,QAAM,EAAE,cAAc,WAAW,IAAI,EAAE,GAAG,2BAA2B,GAAG,MAAM;AAE9E,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,KAAK;AAChD,QAAM,CAAC,OAAO,QAAQ,QAAI,uBAAyB;AAEnD,QAAM,eAAe,MAAM;AACzB,QAAI,YAAY;AACd;AAAA,IACF;AACA,iBAAa,KAAK;AAClB,iBAAa,IAAI;AAAA,EACnB;AAEA,QAAM,eAAe,MAAM;AACzB,QAAI,YAAY;AACd;AAAA,IACF;AACA,aAAS,WAAW,MAAM;AACxB,mBAAa,KAAK;AAAA,IACpB,GAAG,YAAY,CAAC;AAAA,EAClB;AAEA,8BAAU,MAAM;AACd,QAAI,OAAO;AACT,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,CAAC;AAED,8BAAU,MAAM;AACd,QAAI,OAAO;AACT,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AAEf,SAAO;AAAA,IACL;AAAA,IAAW;AAAA,IAAc,UAAU,EAAE,cAAc,aAAa;AAAA,EAClE;AACF;","names":[]}
|
|
@@ -1,37 +1,13 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
1
|
// src/hooks/useHoverState.ts
|
|
21
|
-
|
|
22
|
-
__export(useHoverState_exports, {
|
|
23
|
-
useHoverState: () => useHoverState
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(useHoverState_exports);
|
|
26
|
-
var import_react = require("react");
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
27
3
|
var defaultUseHoverStateProps = {
|
|
28
4
|
closingDelay: 200,
|
|
29
5
|
isDisabled: false
|
|
30
6
|
};
|
|
31
7
|
var useHoverState = (props = void 0) => {
|
|
32
8
|
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
33
|
-
const [isHovered, setIsHovered] =
|
|
34
|
-
const [timer, setTimer] =
|
|
9
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
10
|
+
const [timer, setTimer] = useState();
|
|
35
11
|
const onMouseEnter = () => {
|
|
36
12
|
if (isDisabled) {
|
|
37
13
|
return;
|
|
@@ -47,14 +23,14 @@ var useHoverState = (props = void 0) => {
|
|
|
47
23
|
setIsHovered(false);
|
|
48
24
|
}, closingDelay));
|
|
49
25
|
};
|
|
50
|
-
|
|
26
|
+
useEffect(() => {
|
|
51
27
|
if (timer) {
|
|
52
28
|
return () => {
|
|
53
29
|
clearTimeout(timer);
|
|
54
30
|
};
|
|
55
31
|
}
|
|
56
32
|
});
|
|
57
|
-
|
|
33
|
+
useEffect(() => {
|
|
58
34
|
if (timer) {
|
|
59
35
|
clearTimeout(timer);
|
|
60
36
|
}
|
|
@@ -65,8 +41,7 @@ var useHoverState = (props = void 0) => {
|
|
|
65
41
|
handlers: { onMouseEnter, onMouseLeave }
|
|
66
42
|
};
|
|
67
43
|
};
|
|
68
|
-
|
|
69
|
-
0 && (module.exports = {
|
|
44
|
+
export {
|
|
70
45
|
useHoverState
|
|
71
|
-
}
|
|
46
|
+
};
|
|
72
47
|
//# sourceMappingURL=useHoverState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useHoverState.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useHoverState.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { useEffect, useState } from 'react'\n\ntype UseHoverStateProps = {\n /**\n * The delay after which the menu is closed in milliseconds\n *\n * default: 200ms\n */\n closingDelay: number,\n /**\n * Whether the hover state management should be disabled\n *\n * default: false\n */\n isDisabled: boolean,\n}\n\ntype UseHoverStateReturnType = {\n /**\n * Whether the element is hovered\n */\n isHovered: boolean,\n /**\n * Function to change the current hover status\n */\n setIsHovered: Dispatch<SetStateAction<boolean>>,\n /**\n * Handlers to pass on to the component that should be hovered\n */\n handlers: {\n onMouseEnter: () => void,\n onMouseLeave: () => void,\n },\n}\n\nconst defaultUseHoverStateProps: UseHoverStateProps = {\n closingDelay: 200,\n isDisabled: false,\n}\n\n/**\n * @param props See UseHoverStateProps\n *\n * A react hook for managing the hover state of a component. The handlers provided should be\n * forwarded to the component which should be hovered over\n */\nexport const useHoverState = (props: Partial<UseHoverStateProps> | undefined = undefined): UseHoverStateReturnType => {\n const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props }\n\n const [isHovered, setIsHovered] = useState(false)\n const [timer, setTimer] = useState<NodeJS.Timeout>()\n\n const onMouseEnter = () => {\n if (isDisabled) {\n return\n }\n clearTimeout(timer)\n setIsHovered(true)\n }\n\n const onMouseLeave = () => {\n if (isDisabled) {\n return\n }\n setTimer(setTimeout(() => {\n setIsHovered(false)\n }, closingDelay))\n }\n\n useEffect(() => {\n if (timer) {\n return () => {\n clearTimeout(timer)\n }\n }\n })\n\n useEffect(() => {\n if (timer) {\n clearTimeout(timer)\n }\n }, [isDisabled]) // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n isHovered, setIsHovered, handlers: { onMouseEnter, onMouseLeave }\n }\n}\n"],"mappings":";AACA,SAAS,WAAW,gBAAgB;AAmCpC,IAAM,4BAAgD;AAAA,EACpD,cAAc;AAAA,EACd,YAAY;AACd;AAQO,IAAM,gBAAgB,CAAC,QAAiD,WAAuC;AACpH,QAAM,EAAE,cAAc,WAAW,IAAI,EAAE,GAAG,2BAA2B,GAAG,MAAM;AAE9E,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAyB;AAEnD,QAAM,eAAe,MAAM;AACzB,QAAI,YAAY;AACd;AAAA,IACF;AACA,iBAAa,KAAK;AAClB,iBAAa,IAAI;AAAA,EACnB;AAEA,QAAM,eAAe,MAAM;AACzB,QAAI,YAAY;AACd;AAAA,IACF;AACA,aAAS,WAAW,MAAM;AACxB,mBAAa,KAAK;AAAA,IACpB,GAAG,YAAY,CAAC;AAAA,EAClB;AAEA,YAAU,MAAM;AACd,QAAI,OAAO;AACT,aAAO,MAAM;AACX,qBAAa,KAAK;AAAA,MACpB;AAAA,IACF;AAAA,EACF,CAAC;AAED,YAAU,MAAM;AACd,QAAI,OAAO;AACT,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,UAAU,CAAC;AAEf,SAAO;AAAA,IACL;AAAA,IAAW;AAAA,IAAc,UAAU,EAAE,cAAc,aAAa;AAAA,EAClE;AACF;","names":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/hooks/useLocalStorage.ts
|
|
21
|
+
var useLocalStorage_exports = {};
|
|
22
|
+
__export(useLocalStorage_exports, {
|
|
23
|
+
useLocalStorage: () => useLocalStorage
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(useLocalStorage_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
|
|
28
|
+
// src/util/storage.ts
|
|
29
|
+
var StorageService = class {
|
|
30
|
+
// this seems to be a bug in eslint as 'paramter-properties' is a special syntax of typescript
|
|
31
|
+
constructor(storage) {
|
|
32
|
+
this.storage = storage;
|
|
33
|
+
}
|
|
34
|
+
get(key) {
|
|
35
|
+
const value = this.storage.getItem(key);
|
|
36
|
+
if (value === null) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return JSON.parse(value);
|
|
40
|
+
}
|
|
41
|
+
set(key, value) {
|
|
42
|
+
this.storage.setItem(key, JSON.stringify(value));
|
|
43
|
+
}
|
|
44
|
+
delete(key) {
|
|
45
|
+
this.storage.removeItem(key);
|
|
46
|
+
}
|
|
47
|
+
deleteAll() {
|
|
48
|
+
this.storage.clear();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var LocalStorageService = class extends StorageService {
|
|
52
|
+
constructor() {
|
|
53
|
+
super(window.localStorage);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// src/hooks/useLocalStorage.ts
|
|
58
|
+
var useLocalStorage = (key, initValue) => {
|
|
59
|
+
const get = (0, import_react.useCallback)(() => {
|
|
60
|
+
if (typeof window === "undefined") {
|
|
61
|
+
return initValue;
|
|
62
|
+
}
|
|
63
|
+
const storageService = new LocalStorageService();
|
|
64
|
+
const value = storageService.get(key);
|
|
65
|
+
return value || initValue;
|
|
66
|
+
}, [initValue, key]);
|
|
67
|
+
const [storedValue, setStoredValue] = (0, import_react.useState)(get);
|
|
68
|
+
const setValue = (0, import_react.useCallback)((value) => {
|
|
69
|
+
const newValue = value instanceof Function ? value(storedValue) : value;
|
|
70
|
+
const storageService = new LocalStorageService();
|
|
71
|
+
storageService.set(key, value);
|
|
72
|
+
setStoredValue(newValue);
|
|
73
|
+
}, [storedValue, setStoredValue, key]);
|
|
74
|
+
(0, import_react.useEffect)(() => {
|
|
75
|
+
setStoredValue(get());
|
|
76
|
+
}, []);
|
|
77
|
+
return [storedValue, setValue];
|
|
78
|
+
};
|
|
79
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
80
|
+
0 && (module.exports = {
|
|
81
|
+
useLocalStorage
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=useLocalStorage.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useLocalStorage.ts","../../src/util/storage.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport { LocalStorageService } from '../util/storage'\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\nexport const 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}","class StorageService {\n // this seems to be a bug in eslint as 'paramter-properties' is a special syntax of typescript\n\n constructor(private storage: Storage) {\n }\n\n public get<T>(key: string): T | null {\n const value = this.storage.getItem(key)\n if (value === null) {\n return null\n }\n return JSON.parse(value)\n }\n\n public set<T>(key: string, value: T) {\n this.storage.setItem(key, JSON.stringify(value))\n }\n\n public delete(key: string) {\n this.storage.removeItem(key)\n }\n\n public deleteAll() {\n this.storage.clear()\n }\n}\n\nexport class LocalStorageService extends StorageService {\n constructor() {\n super(window.localStorage)\n }\n}\n\nexport class SessionStorageService extends StorageService {\n constructor() {\n super(window.sessionStorage)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAiD;;;ACDjD,IAAM,iBAAN,MAAqB;AAAA;AAAA,EAGnB,YAAoB,SAAkB;AAAlB;AAAA,EACpB;AAAA,EAEO,IAAO,KAAuB;AACnC,UAAM,QAAQ,KAAK,QAAQ,QAAQ,GAAG;AACtC,QAAI,UAAU,MAAM;AAClB,aAAO;AAAA,IACT;AACA,WAAO,KAAK,MAAM,KAAK;AAAA,EACzB;AAAA,EAEO,IAAO,KAAa,OAAU;AACnC,SAAK,QAAQ,QAAQ,KAAK,KAAK,UAAU,KAAK,CAAC;AAAA,EACjD;AAAA,EAEO,OAAO,KAAa;AACzB,SAAK,QAAQ,WAAW,GAAG;AAAA,EAC7B;AAAA,EAEO,YAAY;AACjB,SAAK,QAAQ,MAAM;AAAA,EACrB;AACF;AAEO,IAAM,sBAAN,cAAkC,eAAe;AAAA,EACtD,cAAc;AACZ,UAAM,OAAO,YAAY;AAAA,EAC3B;AACF;;;AD1BO,IAAM,kBAAkB,CAAI,KAAa,cAAmC;AACjF,QAAM,UAAM,0BAAY,MAAS;AAC/B,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AACA,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,UAAM,QAAQ,eAAe,IAAO,GAAG;AACvC,WAAO,SAAS;AAAA,EAClB,GAAG,CAAC,WAAW,GAAG,CAAC;AAEnB,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAY,GAAG;AAErD,QAAM,eAAwB,0BAAY,WAAS;AACjD,UAAM,WAAW,iBAAiB,WAAW,MAAM,WAAW,IAAI;AAClE,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,mBAAe,IAAI,KAAK,KAAK;AAE7B,mBAAe,QAAQ;AAAA,EACzB,GAAG,CAAC,aAAa,gBAAgB,GAAG,CAAC;AAErC,8BAAU,MAAM;AACd,mBAAe,IAAI,CAAC;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,SAAO,CAAC,aAAa,QAAQ;AAC/B;","names":[]}
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/hooks/useLocalStorage.tsx
|
|
21
|
-
var useLocalStorage_exports = {};
|
|
22
|
-
__export(useLocalStorage_exports, {
|
|
23
|
-
useLocalStorage: () => useLocalStorage
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(useLocalStorage_exports);
|
|
26
|
-
var import_react = require("react");
|
|
1
|
+
// src/hooks/useLocalStorage.ts
|
|
2
|
+
import { useCallback, useEffect, useState } from "react";
|
|
27
3
|
|
|
28
4
|
// src/util/storage.ts
|
|
29
5
|
var StorageService = class {
|
|
@@ -54,9 +30,9 @@ var LocalStorageService = class extends StorageService {
|
|
|
54
30
|
}
|
|
55
31
|
};
|
|
56
32
|
|
|
57
|
-
// src/hooks/useLocalStorage.
|
|
33
|
+
// src/hooks/useLocalStorage.ts
|
|
58
34
|
var useLocalStorage = (key, initValue) => {
|
|
59
|
-
const get =
|
|
35
|
+
const get = useCallback(() => {
|
|
60
36
|
if (typeof window === "undefined") {
|
|
61
37
|
return initValue;
|
|
62
38
|
}
|
|
@@ -64,20 +40,19 @@ var useLocalStorage = (key, initValue) => {
|
|
|
64
40
|
const value = storageService.get(key);
|
|
65
41
|
return value || initValue;
|
|
66
42
|
}, [initValue, key]);
|
|
67
|
-
const [storedValue, setStoredValue] =
|
|
68
|
-
const setValue =
|
|
43
|
+
const [storedValue, setStoredValue] = useState(get);
|
|
44
|
+
const setValue = useCallback((value) => {
|
|
69
45
|
const newValue = value instanceof Function ? value(storedValue) : value;
|
|
70
46
|
const storageService = new LocalStorageService();
|
|
71
47
|
storageService.set(key, value);
|
|
72
48
|
setStoredValue(newValue);
|
|
73
49
|
}, [storedValue, setStoredValue, key]);
|
|
74
|
-
|
|
50
|
+
useEffect(() => {
|
|
75
51
|
setStoredValue(get());
|
|
76
52
|
}, []);
|
|
77
53
|
return [storedValue, setValue];
|
|
78
54
|
};
|
|
79
|
-
|
|
80
|
-
0 && (module.exports = {
|
|
55
|
+
export {
|
|
81
56
|
useLocalStorage
|
|
82
|
-
}
|
|
57
|
+
};
|
|
83
58
|
//# sourceMappingURL=useLocalStorage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useLocalStorage.
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useLocalStorage.ts","../../src/util/storage.ts"],"sourcesContent":["import type { Dispatch, SetStateAction } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport { LocalStorageService } from '../util/storage'\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\nexport const 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}","class StorageService {\n // this seems to be a bug in eslint as 'paramter-properties' is a special syntax of typescript\n\n constructor(private storage: Storage) {\n }\n\n public get<T>(key: string): T | null {\n const value = this.storage.getItem(key)\n if (value === null) {\n return null\n }\n return JSON.parse(value)\n }\n\n public set<T>(key: string, value: T) {\n this.storage.setItem(key, JSON.stringify(value))\n }\n\n public delete(key: string) {\n this.storage.removeItem(key)\n }\n\n public deleteAll() {\n this.storage.clear()\n }\n}\n\nexport class LocalStorageService extends StorageService {\n constructor() {\n super(window.localStorage)\n }\n}\n\nexport class SessionStorageService extends StorageService {\n constructor() {\n super(window.sessionStorage)\n }\n}\n"],"mappings":";AACA,SAAS,aAAa,WAAW,gBAAgB;;;ACDjD,IAAM,iBAAN,MAAqB;AAAA;AAAA,EAGnB,YAAoB,SAAkB;AAAlB;AAAA,EACpB;AAAA,EAEO,IAAO,KAAuB;AACnC,UAAM,QAAQ,KAAK,QAAQ,QAAQ,GAAG;AACtC,QAAI,UAAU,MAAM;AAClB,aAAO;AAAA,IACT;AACA,WAAO,KAAK,MAAM,KAAK;AAAA,EACzB;AAAA,EAEO,IAAO,KAAa,OAAU;AACnC,SAAK,QAAQ,QAAQ,KAAK,KAAK,UAAU,KAAK,CAAC;AAAA,EACjD;AAAA,EAEO,OAAO,KAAa;AACzB,SAAK,QAAQ,WAAW,GAAG;AAAA,EAC7B;AAAA,EAEO,YAAY;AACjB,SAAK,QAAQ,MAAM;AAAA,EACrB;AACF;AAEO,IAAM,sBAAN,cAAkC,eAAe;AAAA,EACtD,cAAc;AACZ,UAAM,OAAO,YAAY;AAAA,EAC3B;AACF;;;AD1BO,IAAM,kBAAkB,CAAI,KAAa,cAAmC;AACjF,QAAM,MAAM,YAAY,MAAS;AAC/B,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AACA,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,UAAM,QAAQ,eAAe,IAAO,GAAG;AACvC,WAAO,SAAS;AAAA,EAClB,GAAG,CAAC,WAAW,GAAG,CAAC;AAEnB,QAAM,CAAC,aAAa,cAAc,IAAI,SAAY,GAAG;AAErD,QAAM,WAAwB,YAAY,WAAS;AACjD,UAAM,WAAW,iBAAiB,WAAW,MAAM,WAAW,IAAI;AAClE,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,mBAAe,IAAI,KAAK,KAAK;AAE7B,mBAAe,QAAQ;AAAA,EACzB,GAAG,CAAC,aAAa,gBAAgB,GAAG,CAAC;AAErC,YAAU,MAAM;AACd,mBAAe,IAAI,CAAC;AAAA,EACtB,GAAG,CAAC,CAAC;AAEL,SAAO,CAAC,aAAa,QAAQ;AAC/B;","names":[]}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/hooks/useOutsideClick.ts
|
|
21
|
+
var useOutsideClick_exports = {};
|
|
22
|
+
__export(useOutsideClick_exports, {
|
|
23
|
+
useOutsideClick: () => useOutsideClick
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(useOutsideClick_exports);
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var useOutsideClick = (refs, handler) => {
|
|
28
|
+
(0, import_react.useEffect)(() => {
|
|
29
|
+
const listener = (event) => {
|
|
30
|
+
if (event.target === null) return;
|
|
31
|
+
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
handler();
|
|
35
|
+
};
|
|
36
|
+
document.addEventListener("mousedown", listener);
|
|
37
|
+
document.addEventListener("touchstart", listener);
|
|
38
|
+
return () => {
|
|
39
|
+
document.removeEventListener("mousedown", listener);
|
|
40
|
+
document.removeEventListener("touchstart", listener);
|
|
41
|
+
};
|
|
42
|
+
}, [refs, handler]);
|
|
43
|
+
};
|
|
44
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
+
0 && (module.exports = {
|
|
46
|
+
useOutsideClick
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=useOutsideClick.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useOutsideClick.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useOutsideClick.ts"],"sourcesContent":["import type { RefObject } from 'react'\nimport { useEffect } from 'react'\n\nexport const useOutsideClick = <Ts extends RefObject<HTMLElement>[]>(refs: Ts, handler: () => void) => {\n useEffect(() => {\n const listener = (event: MouseEvent | TouchEvent) => {\n // returning means not \"not clicking outside\"\n\n // if no target exists, return\n if (event.target === null) return\n // if the target is a ref's element or descendent thereof, return\n if (refs.some((ref) => !ref.current || ref.current.contains(event.target as Node))) {\n return\n }\n\n handler()\n }\n document.addEventListener('mousedown', listener)\n document.addEventListener('touchstart', listener)\n return () => {\n document.removeEventListener('mousedown', listener)\n document.removeEventListener('touchstart', listener)\n }\n }, [refs, handler])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAA0B;AAEnB,IAAM,kBAAkB,CAAsC,MAAU,YAAwB;AACrG,8BAAU,MAAM;AACd,UAAM,WAAW,CAAC,UAAmC;AAInD,UAAI,MAAM,WAAW,KAAM;AAE3B,UAAI,KAAK,KAAK,CAAC,QAAQ,CAAC,IAAI,WAAW,IAAI,QAAQ,SAAS,MAAM,MAAc,CAAC,GAAG;AAClF;AAAA,MACF;AAEA,cAAQ;AAAA,IACV;AACA,aAAS,iBAAiB,aAAa,QAAQ;AAC/C,aAAS,iBAAiB,cAAc,QAAQ;AAChD,WAAO,MAAM;AACX,eAAS,oBAAoB,aAAa,QAAQ;AAClD,eAAS,oBAAoB,cAAc,QAAQ;AAAA,IACrD;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,CAAC;AACpB;","names":[]}
|
|
@@ -1,31 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
1
|
// src/hooks/useOutsideClick.ts
|
|
21
|
-
|
|
22
|
-
__export(useOutsideClick_exports, {
|
|
23
|
-
useOutsideClick: () => useOutsideClick
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(useOutsideClick_exports);
|
|
26
|
-
var import_react = require("react");
|
|
2
|
+
import { useEffect } from "react";
|
|
27
3
|
var useOutsideClick = (refs, handler) => {
|
|
28
|
-
|
|
4
|
+
useEffect(() => {
|
|
29
5
|
const listener = (event) => {
|
|
30
6
|
if (event.target === null) return;
|
|
31
7
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -41,8 +17,7 @@ var useOutsideClick = (refs, handler) => {
|
|
|
41
17
|
};
|
|
42
18
|
}, [refs, handler]);
|
|
43
19
|
};
|
|
44
|
-
|
|
45
|
-
0 && (module.exports = {
|
|
20
|
+
export {
|
|
46
21
|
useOutsideClick
|
|
47
|
-
}
|
|
22
|
+
};
|
|
48
23
|
//# sourceMappingURL=useOutsideClick.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useOutsideClick.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useOutsideClick.ts"],"sourcesContent":["import type { RefObject } from 'react'\nimport { useEffect } from 'react'\n\nexport const useOutsideClick = <Ts extends RefObject<HTMLElement>[]>(refs: Ts, handler: () => void) => {\n useEffect(() => {\n const listener = (event: MouseEvent | TouchEvent) => {\n // returning means not \"not clicking outside\"\n\n // if no target exists, return\n if (event.target === null) return\n // if the target is a ref's element or descendent thereof, return\n if (refs.some((ref) => !ref.current || ref.current.contains(event.target as Node))) {\n return\n }\n\n handler()\n }\n document.addEventListener('mousedown', listener)\n document.addEventListener('touchstart', listener)\n return () => {\n document.removeEventListener('mousedown', listener)\n document.removeEventListener('touchstart', listener)\n }\n }, [refs, handler])\n}\n"],"mappings":";AACA,SAAS,iBAAiB;AAEnB,IAAM,kBAAkB,CAAsC,MAAU,YAAwB;AACrG,YAAU,MAAM;AACd,UAAM,WAAW,CAAC,UAAmC;AAInD,UAAI,MAAM,WAAW,KAAM;AAE3B,UAAI,KAAK,KAAK,CAAC,QAAQ,CAAC,IAAI,WAAW,IAAI,QAAQ,SAAS,MAAM,MAAc,CAAC,GAAG;AAClF;AAAA,MACF;AAEA,cAAQ;AAAA,IACV;AACA,aAAS,iBAAiB,aAAa,QAAQ;AAC/C,aAAS,iBAAiB,cAAc,QAAQ;AAChD,WAAO,MAAM;AACX,eAAS,oBAAoB,aAAa,QAAQ;AAClD,eAAS,oBAAoB,cAAc,QAAQ;AAAA,IACrD;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,CAAC;AACpB;","names":[]}
|