@helpwave/hightide 0.1.45 → 0.1.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.d.mts +1990 -0
- package/dist/index.d.ts +1990 -113
- package/dist/index.js +1514 -1353
- package/dist/index.js.map +1 -1
- package/dist/{components/index.js → index.mjs} +728 -18
- package/dist/index.mjs.map +1 -0
- package/package.json +5 -12
- package/dist/coloring/index.cjs +0 -85
- package/dist/coloring/index.cjs.map +0 -1
- package/dist/coloring/index.d.cts +0 -2
- package/dist/coloring/index.d.ts +0 -2
- package/dist/coloring/index.js +0 -48
- package/dist/coloring/index.js.map +0 -1
- package/dist/coloring/shading.cjs +0 -81
- package/dist/coloring/shading.cjs.map +0 -1
- package/dist/coloring/shading.d.cts +0 -5
- package/dist/coloring/shading.d.ts +0 -5
- package/dist/coloring/shading.js +0 -47
- package/dist/coloring/shading.js.map +0 -1
- package/dist/coloring/types.cjs +0 -30
- package/dist/coloring/types.cjs.map +0 -1
- package/dist/coloring/types.d.cts +0 -13
- package/dist/coloring/types.d.ts +0 -13
- package/dist/coloring/types.js +0 -6
- package/dist/coloring/types.js.map +0 -1
- package/dist/components/branding/HelpwaveBadge.cjs +0 -140
- package/dist/components/branding/HelpwaveBadge.cjs.map +0 -1
- package/dist/components/branding/HelpwaveBadge.d.cts +0 -13
- package/dist/components/branding/HelpwaveBadge.d.ts +0 -13
- package/dist/components/branding/HelpwaveBadge.js +0 -104
- package/dist/components/branding/HelpwaveBadge.js.map +0 -1
- package/dist/components/branding/index.cjs +0 -140
- package/dist/components/branding/index.cjs.map +0 -1
- package/dist/components/branding/index.d.cts +0 -3
- package/dist/components/branding/index.d.ts +0 -3
- package/dist/components/branding/index.js +0 -104
- package/dist/components/branding/index.js.map +0 -1
- package/dist/components/date/DatePicker.cjs +0 -1318
- package/dist/components/date/DatePicker.cjs.map +0 -1
- package/dist/components/date/DatePicker.d.cts +0 -26
- package/dist/components/date/DatePicker.d.ts +0 -26
- package/dist/components/date/DatePicker.js +0 -1283
- package/dist/components/date/DatePicker.js.map +0 -1
- package/dist/components/date/DayPicker.cjs +0 -261
- package/dist/components/date/DayPicker.cjs.map +0 -1
- package/dist/components/date/DayPicker.d.cts +0 -20
- package/dist/components/date/DayPicker.d.ts +0 -20
- package/dist/components/date/DayPicker.js +0 -224
- package/dist/components/date/DayPicker.js.map +0 -1
- package/dist/components/date/TimeDisplay.cjs +0 -638
- package/dist/components/date/TimeDisplay.cjs.map +0 -1
- package/dist/components/date/TimeDisplay.d.cts +0 -13
- package/dist/components/date/TimeDisplay.d.ts +0 -13
- package/dist/components/date/TimeDisplay.js +0 -612
- package/dist/components/date/TimeDisplay.js.map +0 -1
- package/dist/components/date/TimePicker.cjs +0 -237
- package/dist/components/date/TimePicker.cjs.map +0 -1
- package/dist/components/date/TimePicker.d.cts +0 -15
- package/dist/components/date/TimePicker.d.ts +0 -15
- package/dist/components/date/TimePicker.js +0 -202
- package/dist/components/date/TimePicker.js.map +0 -1
- package/dist/components/date/YearMonthPicker.cjs +0 -536
- package/dist/components/date/YearMonthPicker.cjs.map +0 -1
- package/dist/components/date/YearMonthPicker.d.cts +0 -15
- package/dist/components/date/YearMonthPicker.d.ts +0 -15
- package/dist/components/date/YearMonthPicker.js +0 -501
- package/dist/components/date/YearMonthPicker.js.map +0 -1
- package/dist/components/date/index.cjs +0 -1556
- package/dist/components/date/index.cjs.map +0 -1
- package/dist/components/date/index.d.cts +0 -7
- package/dist/components/date/index.d.ts +0 -7
- package/dist/components/date/index.js +0 -1512
- package/dist/components/date/index.js.map +0 -1
- package/dist/components/dialog/ConfirmDialog.cjs +0 -1165
- package/dist/components/dialog/ConfirmDialog.cjs.map +0 -1
- package/dist/components/dialog/ConfirmDialog.d.cts +0 -29
- package/dist/components/dialog/ConfirmDialog.d.ts +0 -29
- package/dist/components/dialog/ConfirmDialog.js +0 -1129
- package/dist/components/dialog/ConfirmDialog.js.map +0 -1
- package/dist/components/dialog/Dialog.cjs +0 -1108
- package/dist/components/dialog/Dialog.cjs.map +0 -1
- package/dist/components/dialog/Dialog.d.cts +0 -27
- package/dist/components/dialog/Dialog.d.ts +0 -27
- package/dist/components/dialog/Dialog.js +0 -1075
- package/dist/components/dialog/Dialog.js.map +0 -1
- package/dist/components/dialog/DiscardChangesDialog.cjs +0 -1192
- package/dist/components/dialog/DiscardChangesDialog.cjs.map +0 -1
- package/dist/components/dialog/DiscardChangesDialog.d.cts +0 -18
- package/dist/components/dialog/DiscardChangesDialog.d.ts +0 -18
- package/dist/components/dialog/DiscardChangesDialog.js +0 -1156
- package/dist/components/dialog/DiscardChangesDialog.js.map +0 -1
- package/dist/components/dialog/InputDialog.cjs +0 -1369
- package/dist/components/dialog/InputDialog.cjs.map +0 -1
- package/dist/components/dialog/InputDialog.d.cts +0 -17
- package/dist/components/dialog/InputDialog.d.ts +0 -17
- package/dist/components/dialog/InputDialog.js +0 -1333
- package/dist/components/dialog/InputDialog.js.map +0 -1
- package/dist/components/dialog/LanguageDialog.cjs +0 -2149
- package/dist/components/dialog/LanguageDialog.cjs.map +0 -1
- package/dist/components/dialog/LanguageDialog.d.cts +0 -16
- package/dist/components/dialog/LanguageDialog.d.ts +0 -16
- package/dist/components/dialog/LanguageDialog.js +0 -2124
- package/dist/components/dialog/LanguageDialog.js.map +0 -1
- package/dist/components/dialog/ThemeDialog.cjs +0 -2188
- package/dist/components/dialog/ThemeDialog.cjs.map +0 -1
- package/dist/components/dialog/ThemeDialog.d.cts +0 -16
- package/dist/components/dialog/ThemeDialog.d.ts +0 -16
- package/dist/components/dialog/ThemeDialog.js +0 -2163
- package/dist/components/dialog/ThemeDialog.js.map +0 -1
- package/dist/components/dialog/index.cjs +0 -2516
- package/dist/components/dialog/index.cjs.map +0 -1
- package/dist/components/dialog/index.d.cts +0 -11
- package/dist/components/dialog/index.d.ts +0 -11
- package/dist/components/dialog/index.js +0 -2486
- package/dist/components/dialog/index.js.map +0 -1
- package/dist/components/form/FormElementWrapper.cjs +0 -167
- package/dist/components/form/FormElementWrapper.cjs.map +0 -1
- package/dist/components/form/FormElementWrapper.d.cts +0 -35
- package/dist/components/form/FormElementWrapper.d.ts +0 -35
- package/dist/components/form/FormElementWrapper.js +0 -133
- package/dist/components/form/FormElementWrapper.js.map +0 -1
- package/dist/components/form/index.cjs +0 -169
- package/dist/components/form/index.cjs.map +0 -1
- package/dist/components/form/index.d.cts +0 -5
- package/dist/components/form/index.d.ts +0 -5
- package/dist/components/form/index.js +0 -133
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/icons-and-geometry/Avatar.cjs +0 -670
- package/dist/components/icons-and-geometry/Avatar.cjs.map +0 -1
- package/dist/components/icons-and-geometry/Avatar.d.cts +0 -36
- package/dist/components/icons-and-geometry/Avatar.d.ts +0 -36
- package/dist/components/icons-and-geometry/Avatar.js +0 -663
- package/dist/components/icons-and-geometry/Avatar.js.map +0 -1
- package/dist/components/icons-and-geometry/Circle.cjs +0 -61
- package/dist/components/icons-and-geometry/Circle.cjs.map +0 -1
- package/dist/components/icons-and-geometry/Circle.d.cts +0 -10
- package/dist/components/icons-and-geometry/Circle.d.ts +0 -10
- package/dist/components/icons-and-geometry/Circle.js +0 -27
- package/dist/components/icons-and-geometry/Circle.js.map +0 -1
- package/dist/components/icons-and-geometry/HelpwaveLogo.cjs +0 -98
- package/dist/components/icons-and-geometry/HelpwaveLogo.cjs.map +0 -1
- package/dist/components/icons-and-geometry/HelpwaveLogo.d.cts +0 -14
- package/dist/components/icons-and-geometry/HelpwaveLogo.d.ts +0 -14
- package/dist/components/icons-and-geometry/HelpwaveLogo.js +0 -74
- package/dist/components/icons-and-geometry/HelpwaveLogo.js.map +0 -1
- package/dist/components/icons-and-geometry/Ring.cjs +0 -333
- package/dist/components/icons-and-geometry/Ring.cjs.map +0 -1
- package/dist/components/icons-and-geometry/Ring.d.cts +0 -35
- package/dist/components/icons-and-geometry/Ring.d.ts +0 -35
- package/dist/components/icons-and-geometry/Ring.js +0 -296
- package/dist/components/icons-and-geometry/Ring.js.map +0 -1
- package/dist/components/icons-and-geometry/Tag.cjs +0 -2945
- package/dist/components/icons-and-geometry/Tag.cjs.map +0 -1
- package/dist/components/icons-and-geometry/Tag.d.cts +0 -16
- package/dist/components/icons-and-geometry/Tag.d.ts +0 -16
- package/dist/components/icons-and-geometry/Tag.js +0 -2940
- package/dist/components/icons-and-geometry/Tag.js.map +0 -1
- package/dist/components/icons-and-geometry/index.cjs +0 -3950
- package/dist/components/icons-and-geometry/index.cjs.map +0 -1
- package/dist/components/icons-and-geometry/index.d.cts +0 -7
- package/dist/components/icons-and-geometry/index.d.ts +0 -7
- package/dist/components/icons-and-geometry/index.js +0 -3934
- package/dist/components/icons-and-geometry/index.js.map +0 -1
- package/dist/components/index.cjs +0 -15692
- package/dist/components/index.cjs.map +0 -1
- package/dist/components/index.d.cts +0 -78
- package/dist/components/index.d.ts +0 -78
- package/dist/components/index.js.map +0 -1
- package/dist/components/layout/Carousel.cjs +0 -1128
- package/dist/components/layout/Carousel.cjs.map +0 -1
- package/dist/components/layout/Carousel.d.cts +0 -35
- package/dist/components/layout/Carousel.d.ts +0 -35
- package/dist/components/layout/Carousel.js +0 -1103
- package/dist/components/layout/Carousel.js.map +0 -1
- package/dist/components/layout/Chip.cjs +0 -123
- package/dist/components/layout/Chip.cjs.map +0 -1
- package/dist/components/layout/Chip.d.cts +0 -31
- package/dist/components/layout/Chip.d.ts +0 -31
- package/dist/components/layout/Chip.js +0 -87
- package/dist/components/layout/Chip.js.map +0 -1
- package/dist/components/layout/DividerInserter.cjs +0 -59
- package/dist/components/layout/DividerInserter.cjs.map +0 -1
- package/dist/components/layout/DividerInserter.d.cts +0 -15
- package/dist/components/layout/DividerInserter.d.ts +0 -15
- package/dist/components/layout/DividerInserter.js +0 -25
- package/dist/components/layout/DividerInserter.js.map +0 -1
- package/dist/components/layout/Expandable.cjs +0 -171
- package/dist/components/layout/Expandable.cjs.map +0 -1
- package/dist/components/layout/Expandable.d.cts +0 -67
- package/dist/components/layout/Expandable.d.ts +0 -67
- package/dist/components/layout/Expandable.js +0 -135
- package/dist/components/layout/Expandable.js.map +0 -1
- package/dist/components/layout/FAQSection.cjs +0 -421
- package/dist/components/layout/FAQSection.cjs.map +0 -1
- package/dist/components/layout/FAQSection.d.cts +0 -26
- package/dist/components/layout/FAQSection.d.ts +0 -26
- package/dist/components/layout/FAQSection.js +0 -387
- package/dist/components/layout/FAQSection.js.map +0 -1
- package/dist/components/layout/FloatingContainer.cjs +0 -220
- package/dist/components/layout/FloatingContainer.cjs.map +0 -1
- package/dist/components/layout/FloatingContainer.d.cts +0 -38
- package/dist/components/layout/FloatingContainer.d.ts +0 -38
- package/dist/components/layout/FloatingContainer.js +0 -196
- package/dist/components/layout/FloatingContainer.js.map +0 -1
- package/dist/components/layout/ListBox.cjs +0 -339
- package/dist/components/layout/ListBox.cjs.map +0 -1
- package/dist/components/layout/ListBox.d.cts +0 -44
- package/dist/components/layout/ListBox.d.ts +0 -44
- package/dist/components/layout/ListBox.js +0 -300
- package/dist/components/layout/ListBox.js.map +0 -1
- package/dist/components/layout/MarkdownInterpreter.cjs +0 -260
- package/dist/components/layout/MarkdownInterpreter.cjs.map +0 -1
- package/dist/components/layout/MarkdownInterpreter.d.cts +0 -28
- package/dist/components/layout/MarkdownInterpreter.d.ts +0 -28
- package/dist/components/layout/MarkdownInterpreter.js +0 -235
- package/dist/components/layout/MarkdownInterpreter.js.map +0 -1
- package/dist/components/layout/ScrollArea.cjs +0 -1252
- package/dist/components/layout/ScrollArea.cjs.map +0 -1
- package/dist/components/layout/ScrollArea.d.cts +0 -15
- package/dist/components/layout/ScrollArea.d.ts +0 -15
- package/dist/components/layout/ScrollArea.js +0 -1216
- package/dist/components/layout/ScrollArea.js.map +0 -1
- package/dist/components/layout/TextImage.cjs +0 -657
- package/dist/components/layout/TextImage.cjs.map +0 -1
- package/dist/components/layout/TextImage.d.cts +0 -19
- package/dist/components/layout/TextImage.d.ts +0 -19
- package/dist/components/layout/TextImage.js +0 -623
- package/dist/components/layout/TextImage.js.map +0 -1
- package/dist/components/layout/VerticalDivider.cjs +0 -80
- package/dist/components/layout/VerticalDivider.cjs.map +0 -1
- package/dist/components/layout/VerticalDivider.d.cts +0 -15
- package/dist/components/layout/VerticalDivider.d.ts +0 -15
- package/dist/components/layout/VerticalDivider.js +0 -56
- package/dist/components/layout/VerticalDivider.js.map +0 -1
- package/dist/components/layout/index.cjs +0 -3434
- package/dist/components/layout/index.cjs.map +0 -1
- package/dist/components/layout/index.d.cts +0 -15
- package/dist/components/layout/index.d.ts +0 -15
- package/dist/components/layout/index.js +0 -3387
- package/dist/components/layout/index.js.map +0 -1
- package/dist/components/loading-states/ErrorComponent.cjs +0 -622
- package/dist/components/loading-states/ErrorComponent.cjs.map +0 -1
- package/dist/components/loading-states/ErrorComponent.d.cts +0 -12
- package/dist/components/loading-states/ErrorComponent.d.ts +0 -12
- package/dist/components/loading-states/ErrorComponent.js +0 -588
- package/dist/components/loading-states/ErrorComponent.js.map +0 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.cjs +0 -67
- package/dist/components/loading-states/LoadingAndErrorComponent.cjs.map +0 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.d.cts +0 -20
- package/dist/components/loading-states/LoadingAndErrorComponent.d.ts +0 -20
- package/dist/components/loading-states/LoadingAndErrorComponent.js +0 -43
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +0 -1
- package/dist/components/loading-states/LoadingAnimation.cjs +0 -694
- package/dist/components/loading-states/LoadingAnimation.cjs.map +0 -1
- package/dist/components/loading-states/LoadingAnimation.d.cts +0 -12
- package/dist/components/loading-states/LoadingAnimation.d.ts +0 -12
- package/dist/components/loading-states/LoadingAnimation.js +0 -658
- package/dist/components/loading-states/LoadingAnimation.js.map +0 -1
- package/dist/components/loading-states/LoadingButton.cjs +0 -257
- package/dist/components/loading-states/LoadingButton.cjs.map +0 -1
- package/dist/components/loading-states/LoadingButton.d.cts +0 -10
- package/dist/components/loading-states/LoadingButton.d.ts +0 -10
- package/dist/components/loading-states/LoadingButton.js +0 -223
- package/dist/components/loading-states/LoadingButton.js.map +0 -1
- package/dist/components/loading-states/LoadingContainer.cjs +0 -34
- package/dist/components/loading-states/LoadingContainer.cjs.map +0 -1
- package/dist/components/loading-states/LoadingContainer.d.cts +0 -8
- package/dist/components/loading-states/LoadingContainer.d.ts +0 -8
- package/dist/components/loading-states/LoadingContainer.js +0 -10
- package/dist/components/loading-states/LoadingContainer.js.map +0 -1
- package/dist/components/loading-states/ProgressIndicator.cjs +0 -83
- package/dist/components/loading-states/ProgressIndicator.cjs.map +0 -1
- package/dist/components/loading-states/ProgressIndicator.d.cts +0 -24
- package/dist/components/loading-states/ProgressIndicator.d.ts +0 -24
- package/dist/components/loading-states/ProgressIndicator.js +0 -59
- package/dist/components/loading-states/ProgressIndicator.js.map +0 -1
- package/dist/components/loading-states/index.cjs +0 -966
- package/dist/components/loading-states/index.cjs.map +0 -1
- package/dist/components/loading-states/index.d.cts +0 -9
- package/dist/components/loading-states/index.d.ts +0 -9
- package/dist/components/loading-states/index.js +0 -925
- package/dist/components/loading-states/index.js.map +0 -1
- package/dist/components/navigation/BreadCrumb.cjs +0 -3516
- package/dist/components/navigation/BreadCrumb.cjs.map +0 -1
- package/dist/components/navigation/BreadCrumb.d.cts +0 -20
- package/dist/components/navigation/BreadCrumb.d.ts +0 -20
- package/dist/components/navigation/BreadCrumb.js +0 -3511
- package/dist/components/navigation/BreadCrumb.js.map +0 -1
- package/dist/components/navigation/Navigation.cjs +0 -4041
- package/dist/components/navigation/Navigation.cjs.map +0 -1
- package/dist/components/navigation/Navigation.d.cts +0 -21
- package/dist/components/navigation/Navigation.d.ts +0 -21
- package/dist/components/navigation/Navigation.js +0 -4035
- package/dist/components/navigation/Navigation.js.map +0 -1
- package/dist/components/navigation/Pagination.cjs +0 -1007
- package/dist/components/navigation/Pagination.cjs.map +0 -1
- package/dist/components/navigation/Pagination.d.cts +0 -16
- package/dist/components/navigation/Pagination.d.ts +0 -16
- package/dist/components/navigation/Pagination.js +0 -973
- package/dist/components/navigation/Pagination.js.map +0 -1
- package/dist/components/navigation/StepperBar.cjs +0 -903
- package/dist/components/navigation/StepperBar.cjs.map +0 -1
- package/dist/components/navigation/StepperBar.d.cts +0 -23
- package/dist/components/navigation/StepperBar.d.ts +0 -23
- package/dist/components/navigation/StepperBar.js +0 -868
- package/dist/components/navigation/StepperBar.js.map +0 -1
- package/dist/components/navigation/index.cjs +0 -5035
- package/dist/components/navigation/index.cjs.map +0 -1
- package/dist/components/navigation/index.d.cts +0 -6
- package/dist/components/navigation/index.d.ts +0 -6
- package/dist/components/navigation/index.js +0 -5023
- package/dist/components/navigation/index.js.map +0 -1
- package/dist/components/properties/CheckboxProperty.cjs +0 -1736
- package/dist/components/properties/CheckboxProperty.cjs.map +0 -1
- package/dist/components/properties/CheckboxProperty.d.cts +0 -14
- package/dist/components/properties/CheckboxProperty.d.ts +0 -14
- package/dist/components/properties/CheckboxProperty.js +0 -1702
- package/dist/components/properties/CheckboxProperty.js.map +0 -1
- package/dist/components/properties/DateProperty.cjs +0 -1119
- package/dist/components/properties/DateProperty.cjs.map +0 -1
- package/dist/components/properties/DateProperty.d.cts +0 -16
- package/dist/components/properties/DateProperty.d.ts +0 -16
- package/dist/components/properties/DateProperty.js +0 -1085
- package/dist/components/properties/DateProperty.js.map +0 -1
- package/dist/components/properties/MultiSelectProperty.cjs +0 -2058
- package/dist/components/properties/MultiSelectProperty.cjs.map +0 -1
- package/dist/components/properties/MultiSelectProperty.d.cts +0 -14
- package/dist/components/properties/MultiSelectProperty.d.ts +0 -14
- package/dist/components/properties/MultiSelectProperty.js +0 -2035
- package/dist/components/properties/MultiSelectProperty.js.map +0 -1
- package/dist/components/properties/NumberProperty.cjs +0 -1125
- package/dist/components/properties/NumberProperty.cjs.map +0 -1
- package/dist/components/properties/NumberProperty.d.cts +0 -16
- package/dist/components/properties/NumberProperty.d.ts +0 -16
- package/dist/components/properties/NumberProperty.js +0 -1091
- package/dist/components/properties/NumberProperty.js.map +0 -1
- package/dist/components/properties/PropertyBase.cjs +0 -875
- package/dist/components/properties/PropertyBase.cjs.map +0 -1
- package/dist/components/properties/PropertyBase.d.cts +0 -22
- package/dist/components/properties/PropertyBase.d.ts +0 -22
- package/dist/components/properties/PropertyBase.js +0 -841
- package/dist/components/properties/PropertyBase.js.map +0 -1
- package/dist/components/properties/SelectProperty.cjs +0 -2058
- package/dist/components/properties/SelectProperty.cjs.map +0 -1
- package/dist/components/properties/SelectProperty.d.cts +0 -16
- package/dist/components/properties/SelectProperty.d.ts +0 -16
- package/dist/components/properties/SelectProperty.js +0 -2035
- package/dist/components/properties/SelectProperty.js.map +0 -1
- package/dist/components/properties/TextProperty.cjs +0 -1033
- package/dist/components/properties/TextProperty.cjs.map +0 -1
- package/dist/components/properties/TextProperty.d.cts +0 -15
- package/dist/components/properties/TextProperty.d.ts +0 -15
- package/dist/components/properties/TextProperty.js +0 -999
- package/dist/components/properties/TextProperty.js.map +0 -1
- package/dist/components/properties/index.cjs +0 -3383
- package/dist/components/properties/index.cjs.map +0 -1
- package/dist/components/properties/index.d.cts +0 -9
- package/dist/components/properties/index.d.ts +0 -9
- package/dist/components/properties/index.js +0 -3352
- package/dist/components/properties/index.js.map +0 -1
- package/dist/components/table/FillerRowElement.cjs +0 -36
- package/dist/components/table/FillerRowElement.cjs.map +0 -1
- package/dist/components/table/FillerRowElement.d.cts +0 -8
- package/dist/components/table/FillerRowElement.d.ts +0 -8
- package/dist/components/table/FillerRowElement.js +0 -12
- package/dist/components/table/FillerRowElement.js.map +0 -1
- package/dist/components/table/Filter.cjs +0 -41
- package/dist/components/table/Filter.cjs.map +0 -1
- package/dist/components/table/Filter.d.cts +0 -5
- package/dist/components/table/Filter.d.ts +0 -5
- package/dist/components/table/Filter.js +0 -17
- package/dist/components/table/Filter.js.map +0 -1
- package/dist/components/table/Table.cjs +0 -2678
- package/dist/components/table/Table.cjs.map +0 -1
- package/dist/components/table/Table.d.cts +0 -42
- package/dist/components/table/Table.d.ts +0 -42
- package/dist/components/table/Table.js +0 -2649
- package/dist/components/table/Table.js.map +0 -1
- package/dist/components/table/TableCell.cjs +0 -37
- package/dist/components/table/TableCell.cjs.map +0 -1
- package/dist/components/table/TableCell.d.cts +0 -9
- package/dist/components/table/TableCell.d.ts +0 -9
- package/dist/components/table/TableCell.js +0 -13
- package/dist/components/table/TableCell.js.map +0 -1
- package/dist/components/table/TableFilterButton.cjs +0 -1269
- package/dist/components/table/TableFilterButton.cjs.map +0 -1
- package/dist/components/table/TableFilterButton.d.cts +0 -11
- package/dist/components/table/TableFilterButton.d.ts +0 -11
- package/dist/components/table/TableFilterButton.js +0 -1233
- package/dist/components/table/TableFilterButton.js.map +0 -1
- package/dist/components/table/TableSortButton.cjs +0 -206
- package/dist/components/table/TableSortButton.cjs.map +0 -1
- package/dist/components/table/TableSortButton.d.cts +0 -15
- package/dist/components/table/TableSortButton.d.ts +0 -15
- package/dist/components/table/TableSortButton.js +0 -172
- package/dist/components/table/TableSortButton.js.map +0 -1
- package/dist/components/table/index.cjs +0 -2690
- package/dist/components/table/index.cjs.map +0 -1
- package/dist/components/table/index.d.cts +0 -10
- package/dist/components/table/index.d.ts +0 -10
- package/dist/components/table/index.js +0 -2654
- package/dist/components/table/index.js.map +0 -1
- package/dist/components/user-action/Button.cjs +0 -308
- package/dist/components/user-action/Button.cjs.map +0 -1
- package/dist/components/user-action/Button.d.cts +0 -104
- package/dist/components/user-action/Button.d.ts +0 -104
- package/dist/components/user-action/Button.js +0 -268
- package/dist/components/user-action/Button.js.map +0 -1
- package/dist/components/user-action/Checkbox.cjs +0 -878
- package/dist/components/user-action/Checkbox.cjs.map +0 -1
- package/dist/components/user-action/Checkbox.d.cts +0 -25
- package/dist/components/user-action/Checkbox.d.ts +0 -25
- package/dist/components/user-action/Checkbox.js +0 -843
- package/dist/components/user-action/Checkbox.js.map +0 -1
- package/dist/components/user-action/CopyToClipboardWrapper.cjs +0 -695
- package/dist/components/user-action/CopyToClipboardWrapper.cjs.map +0 -1
- package/dist/components/user-action/CopyToClipboardWrapper.d.cts +0 -30
- package/dist/components/user-action/CopyToClipboardWrapper.d.ts +0 -30
- package/dist/components/user-action/CopyToClipboardWrapper.js +0 -671
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +0 -1
- package/dist/components/user-action/DateAndTimePicker.cjs +0 -1492
- package/dist/components/user-action/DateAndTimePicker.cjs.map +0 -1
- package/dist/components/user-action/DateAndTimePicker.d.cts +0 -25
- package/dist/components/user-action/DateAndTimePicker.d.ts +0 -25
- package/dist/components/user-action/DateAndTimePicker.js +0 -1458
- package/dist/components/user-action/DateAndTimePicker.js.map +0 -1
- package/dist/components/user-action/Label.cjs +0 -53
- package/dist/components/user-action/Label.cjs.map +0 -1
- package/dist/components/user-action/Label.d.cts +0 -14
- package/dist/components/user-action/Label.d.ts +0 -14
- package/dist/components/user-action/Label.js +0 -19
- package/dist/components/user-action/Label.js.map +0 -1
- package/dist/components/user-action/Menu.cjs +0 -282
- package/dist/components/user-action/Menu.cjs.map +0 -1
- package/dist/components/user-action/Menu.d.cts +0 -35
- package/dist/components/user-action/Menu.d.ts +0 -35
- package/dist/components/user-action/Menu.js +0 -247
- package/dist/components/user-action/Menu.js.map +0 -1
- package/dist/components/user-action/ScrollPicker.cjs +0 -301
- package/dist/components/user-action/ScrollPicker.cjs.map +0 -1
- package/dist/components/user-action/ScrollPicker.d.cts +0 -15
- package/dist/components/user-action/ScrollPicker.d.ts +0 -15
- package/dist/components/user-action/ScrollPicker.js +0 -267
- package/dist/components/user-action/ScrollPicker.js.map +0 -1
- package/dist/components/user-action/SearchBar.cjs +0 -956
- package/dist/components/user-action/SearchBar.cjs.map +0 -1
- package/dist/components/user-action/SearchBar.d.cts +0 -13
- package/dist/components/user-action/SearchBar.d.ts +0 -13
- package/dist/components/user-action/SearchBar.js +0 -920
- package/dist/components/user-action/SearchBar.js.map +0 -1
- package/dist/components/user-action/Textarea.cjs +0 -231
- package/dist/components/user-action/Textarea.cjs.map +0 -1
- package/dist/components/user-action/Textarea.d.cts +0 -41
- package/dist/components/user-action/Textarea.d.ts +0 -41
- package/dist/components/user-action/Textarea.js +0 -195
- package/dist/components/user-action/Textarea.js.map +0 -1
- package/dist/components/user-action/Tooltip.cjs +0 -139
- package/dist/components/user-action/Tooltip.cjs.map +0 -1
- package/dist/components/user-action/Tooltip.d.cts +0 -37
- package/dist/components/user-action/Tooltip.d.ts +0 -37
- package/dist/components/user-action/Tooltip.js +0 -113
- package/dist/components/user-action/Tooltip.js.map +0 -1
- package/dist/components/user-action/index.cjs +0 -4564
- package/dist/components/user-action/index.cjs.map +0 -1
- package/dist/components/user-action/index.d.cts +0 -26
- package/dist/components/user-action/index.d.ts +0 -26
- package/dist/components/user-action/index.js +0 -4503
- package/dist/components/user-action/index.js.map +0 -1
- package/dist/components/user-action/input/Input.cjs +0 -260
- package/dist/components/user-action/input/Input.cjs.map +0 -1
- package/dist/components/user-action/input/Input.d.cts +0 -37
- package/dist/components/user-action/input/Input.d.ts +0 -37
- package/dist/components/user-action/input/Input.js +0 -225
- package/dist/components/user-action/input/Input.js.map +0 -1
- package/dist/components/user-action/input/InsideLabelInput.cjs +0 -312
- package/dist/components/user-action/input/InsideLabelInput.cjs.map +0 -1
- package/dist/components/user-action/input/InsideLabelInput.d.cts +0 -20
- package/dist/components/user-action/input/InsideLabelInput.d.ts +0 -20
- package/dist/components/user-action/input/InsideLabelInput.js +0 -277
- package/dist/components/user-action/input/InsideLabelInput.js.map +0 -1
- package/dist/components/user-action/input/ToggleableInput.cjs +0 -315
- package/dist/components/user-action/input/ToggleableInput.cjs.map +0 -1
- package/dist/components/user-action/input/ToggleableInput.d.cts +0 -22
- package/dist/components/user-action/input/ToggleableInput.d.ts +0 -22
- package/dist/components/user-action/input/ToggleableInput.js +0 -280
- package/dist/components/user-action/input/ToggleableInput.js.map +0 -1
- package/dist/components/user-action/input/index.cjs +0 -403
- package/dist/components/user-action/input/index.cjs.map +0 -1
- package/dist/components/user-action/input/index.d.cts +0 -6
- package/dist/components/user-action/input/index.d.ts +0 -6
- package/dist/components/user-action/input/index.js +0 -362
- package/dist/components/user-action/input/index.js.map +0 -1
- package/dist/components/user-action/select/Select.cjs +0 -1970
- package/dist/components/user-action/select/Select.cjs.map +0 -1
- package/dist/components/user-action/select/Select.d.cts +0 -104
- package/dist/components/user-action/select/Select.d.ts +0 -104
- package/dist/components/user-action/select/Select.js +0 -1937
- package/dist/components/user-action/select/Select.js.map +0 -1
- package/dist/components/user-action/select/index.cjs +0 -1972
- package/dist/components/user-action/select/index.cjs.map +0 -1
- package/dist/components/user-action/select/index.d.cts +0 -4
- package/dist/components/user-action/select/index.d.ts +0 -4
- package/dist/components/user-action/select/index.js +0 -1937
- package/dist/components/user-action/select/index.js.map +0 -1
- package/dist/components/utils/FocusTrap.cjs +0 -252
- package/dist/components/utils/FocusTrap.cjs.map +0 -1
- package/dist/components/utils/FocusTrap.d.cts +0 -28
- package/dist/components/utils/FocusTrap.d.ts +0 -28
- package/dist/components/utils/FocusTrap.js +0 -229
- package/dist/components/utils/FocusTrap.js.map +0 -1
- package/dist/components/utils/Transition.cjs +0 -74
- package/dist/components/utils/Transition.cjs.map +0 -1
- package/dist/components/utils/Transition.d.cts +0 -26
- package/dist/components/utils/Transition.d.ts +0 -26
- package/dist/components/utils/Transition.js +0 -50
- package/dist/components/utils/Transition.js.map +0 -1
- package/dist/components/utils/index.cjs +0 -302
- package/dist/components/utils/index.cjs.map +0 -1
- package/dist/components/utils/index.d.cts +0 -4
- package/dist/components/utils/index.d.ts +0 -4
- package/dist/components/utils/index.js +0 -275
- package/dist/components/utils/index.js.map +0 -1
- package/dist/hooks/focus/index.cjs +0 -379
- package/dist/hooks/focus/index.cjs.map +0 -1
- package/dist/hooks/focus/index.d.cts +0 -6
- package/dist/hooks/focus/index.d.ts +0 -6
- package/dist/hooks/focus/index.js +0 -339
- package/dist/hooks/focus/index.js.map +0 -1
- package/dist/hooks/focus/useFocusGuards.cjs +0 -74
- package/dist/hooks/focus/useFocusGuards.cjs.map +0 -1
- package/dist/hooks/focus/useFocusGuards.d.cts +0 -3
- package/dist/hooks/focus/useFocusGuards.d.ts +0 -3
- package/dist/hooks/focus/useFocusGuards.js +0 -50
- package/dist/hooks/focus/useFocusGuards.js.map +0 -1
- package/dist/hooks/focus/useFocusManagement.cjs +0 -84
- package/dist/hooks/focus/useFocusManagement.cjs.map +0 -1
- package/dist/hooks/focus/useFocusManagement.d.cts +0 -9
- package/dist/hooks/focus/useFocusManagement.d.ts +0 -9
- package/dist/hooks/focus/useFocusManagement.js +0 -60
- package/dist/hooks/focus/useFocusManagement.js.map +0 -1
- package/dist/hooks/focus/useFocusOnceVisible.cjs +0 -60
- package/dist/hooks/focus/useFocusOnceVisible.cjs.map +0 -1
- package/dist/hooks/focus/useFocusOnceVisible.d.cts +0 -5
- package/dist/hooks/focus/useFocusOnceVisible.d.ts +0 -5
- package/dist/hooks/focus/useFocusOnceVisible.js +0 -26
- package/dist/hooks/focus/useFocusOnceVisible.js.map +0 -1
- package/dist/hooks/focus/useFocusTrap.cjs +0 -233
- package/dist/hooks/focus/useFocusTrap.cjs.map +0 -1
- package/dist/hooks/focus/useFocusTrap.d.cts +0 -16
- package/dist/hooks/focus/useFocusTrap.d.ts +0 -16
- package/dist/hooks/focus/useFocusTrap.js +0 -210
- package/dist/hooks/focus/useFocusTrap.js.map +0 -1
- package/dist/hooks/focus/useIsMounted.cjs +0 -43
- package/dist/hooks/focus/useIsMounted.cjs.map +0 -1
- package/dist/hooks/focus/useIsMounted.d.cts +0 -3
- package/dist/hooks/focus/useIsMounted.d.ts +0 -3
- package/dist/hooks/focus/useIsMounted.js +0 -20
- package/dist/hooks/focus/useIsMounted.js.map +0 -1
- package/dist/hooks/index.cjs +0 -1530
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.d.cts +0 -18
- package/dist/hooks/index.d.ts +0 -18
- package/dist/hooks/index.js +0 -1477
- package/dist/hooks/index.js.map +0 -1
- package/dist/hooks/useDelay.cjs +0 -67
- package/dist/hooks/useDelay.cjs.map +0 -1
- package/dist/hooks/useDelay.d.cts +0 -12
- package/dist/hooks/useDelay.d.ts +0 -12
- package/dist/hooks/useDelay.js +0 -43
- package/dist/hooks/useDelay.js.map +0 -1
- package/dist/hooks/useFloatingElement.cjs +0 -162
- package/dist/hooks/useFloatingElement.cjs.map +0 -1
- package/dist/hooks/useFloatingElement.d.cts +0 -22
- package/dist/hooks/useFloatingElement.d.ts +0 -22
- package/dist/hooks/useFloatingElement.js +0 -139
- package/dist/hooks/useFloatingElement.js.map +0 -1
- package/dist/hooks/useHoverState.cjs +0 -71
- package/dist/hooks/useHoverState.cjs.map +0 -1
- package/dist/hooks/useHoverState.d.cts +0 -42
- package/dist/hooks/useHoverState.d.ts +0 -42
- package/dist/hooks/useHoverState.js +0 -47
- package/dist/hooks/useHoverState.js.map +0 -1
- package/dist/hooks/useLocalStorage.cjs +0 -97
- package/dist/hooks/useLocalStorage.cjs.map +0 -1
- package/dist/hooks/useLocalStorage.d.cts +0 -17
- package/dist/hooks/useLocalStorage.d.ts +0 -17
- package/dist/hooks/useLocalStorage.js +0 -74
- package/dist/hooks/useLocalStorage.js.map +0 -1
- package/dist/hooks/useLogOnce.cjs +0 -53
- package/dist/hooks/useLogOnce.cjs.map +0 -1
- package/dist/hooks/useLogOnce.d.cts +0 -7
- package/dist/hooks/useLogOnce.d.ts +0 -7
- package/dist/hooks/useLogOnce.js +0 -29
- package/dist/hooks/useLogOnce.js.map +0 -1
- package/dist/hooks/useOutsideClick.cjs +0 -47
- package/dist/hooks/useOutsideClick.cjs.map +0 -1
- package/dist/hooks/useOutsideClick.d.cts +0 -5
- package/dist/hooks/useOutsideClick.d.ts +0 -5
- package/dist/hooks/useOutsideClick.js +0 -23
- package/dist/hooks/useOutsideClick.js.map +0 -1
- package/dist/hooks/useOverwritableState.cjs +0 -49
- package/dist/hooks/useOverwritableState.cjs.map +0 -1
- package/dist/hooks/useOverwritableState.d.cts +0 -5
- package/dist/hooks/useOverwritableState.d.ts +0 -5
- package/dist/hooks/useOverwritableState.js +0 -25
- package/dist/hooks/useOverwritableState.js.map +0 -1
- package/dist/hooks/usePopoverPosition.cjs +0 -81
- package/dist/hooks/usePopoverPosition.cjs.map +0 -1
- package/dist/hooks/usePopoverPosition.d.cts +0 -15
- package/dist/hooks/usePopoverPosition.d.ts +0 -15
- package/dist/hooks/usePopoverPosition.js +0 -57
- package/dist/hooks/usePopoverPosition.js.map +0 -1
- package/dist/hooks/useRerender.cjs +0 -33
- package/dist/hooks/useRerender.cjs.map +0 -1
- package/dist/hooks/useRerender.d.cts +0 -5
- package/dist/hooks/useRerender.d.ts +0 -5
- package/dist/hooks/useRerender.js +0 -9
- package/dist/hooks/useRerender.js.map +0 -1
- package/dist/hooks/useResizeCallbackWrapper.cjs +0 -38
- package/dist/hooks/useResizeCallbackWrapper.cjs.map +0 -1
- package/dist/hooks/useResizeCallbackWrapper.d.cts +0 -11
- package/dist/hooks/useResizeCallbackWrapper.d.ts +0 -11
- package/dist/hooks/useResizeCallbackWrapper.js +0 -14
- package/dist/hooks/useResizeCallbackWrapper.js.map +0 -1
- package/dist/hooks/useSearch.cjs +0 -95
- package/dist/hooks/useSearch.cjs.map +0 -1
- package/dist/hooks/useSearch.d.cts +0 -22
- package/dist/hooks/useSearch.d.ts +0 -22
- package/dist/hooks/useSearch.js +0 -71
- package/dist/hooks/useSearch.js.map +0 -1
- package/dist/hooks/useValidators.cjs +0 -687
- package/dist/hooks/useValidators.cjs.map +0 -1
- package/dist/hooks/useValidators.d.cts +0 -16
- package/dist/hooks/useValidators.d.ts +0 -16
- package/dist/hooks/useValidators.js +0 -660
- package/dist/hooks/useValidators.js.map +0 -1
- package/dist/i18n/LocaleProvider.cjs +0 -202
- package/dist/i18n/LocaleProvider.cjs.map +0 -1
- package/dist/i18n/LocaleProvider.d.cts +0 -23
- package/dist/i18n/LocaleProvider.d.ts +0 -23
- package/dist/i18n/LocaleProvider.js +0 -175
- package/dist/i18n/LocaleProvider.js.map +0 -1
- package/dist/i18n/index.cjs +0 -761
- package/dist/i18n/index.cjs.map +0 -1
- package/dist/i18n/index.d.cts +0 -8
- package/dist/i18n/index.d.ts +0 -8
- package/dist/i18n/index.js +0 -727
- package/dist/i18n/index.js.map +0 -1
- package/dist/i18n/translations.cjs +0 -507
- package/dist/i18n/translations.cjs.map +0 -1
- package/dist/i18n/translations.d.cts +0 -189
- package/dist/i18n/translations.d.ts +0 -189
- package/dist/i18n/translations.js +0 -482
- package/dist/i18n/translations.js.map +0 -1
- package/dist/i18n/useHightideTranslation.cjs +0 -618
- package/dist/i18n/useHightideTranslation.cjs.map +0 -1
- package/dist/i18n/useHightideTranslation.d.cts +0 -21
- package/dist/i18n/useHightideTranslation.d.ts +0 -21
- package/dist/i18n/useHightideTranslation.js +0 -591
- package/dist/i18n/useHightideTranslation.js.map +0 -1
- package/dist/i18n/util.cjs +0 -49
- package/dist/i18n/util.cjs.map +0 -1
- package/dist/i18n/util.d.cts +0 -15
- package/dist/i18n/util.d.ts +0 -15
- package/dist/i18n/util.js +0 -23
- package/dist/i18n/util.js.map +0 -1
- package/dist/index.cjs +0 -16470
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -113
- package/dist/storybook/helper.cjs +0 -61
- package/dist/storybook/helper.cjs.map +0 -1
- package/dist/storybook/helper.d.cts +0 -17
- package/dist/storybook/helper.d.ts +0 -17
- package/dist/storybook/helper.js +0 -37
- package/dist/storybook/helper.js.map +0 -1
- package/dist/theming/index.cjs +0 -190
- package/dist/theming/index.cjs.map +0 -1
- package/dist/theming/index.d.cts +0 -3
- package/dist/theming/index.d.ts +0 -3
- package/dist/theming/index.js +0 -161
- package/dist/theming/index.js.map +0 -1
- package/dist/theming/useTheme.cjs +0 -188
- package/dist/theming/useTheme.cjs.map +0 -1
- package/dist/theming/useTheme.d.cts +0 -26
- package/dist/theming/useTheme.d.ts +0 -26
- package/dist/theming/useTheme.js +0 -161
- package/dist/theming/useTheme.js.map +0 -1
- package/dist/utils/array.cjs +0 -172
- package/dist/utils/array.cjs.map +0 -1
- package/dist/utils/array.d.cts +0 -34
- package/dist/utils/array.d.ts +0 -34
- package/dist/utils/array.js +0 -142
- package/dist/utils/array.js.map +0 -1
- package/dist/utils/bagFunctions.cjs +0 -38
- package/dist/utils/bagFunctions.cjs.map +0 -1
- package/dist/utils/bagFunctions.d.cts +0 -15
- package/dist/utils/bagFunctions.d.ts +0 -15
- package/dist/utils/bagFunctions.js +0 -14
- package/dist/utils/bagFunctions.js.map +0 -1
- package/dist/utils/builder.cjs +0 -33
- package/dist/utils/builder.cjs.map +0 -1
- package/dist/utils/builder.d.cts +0 -8
- package/dist/utils/builder.d.ts +0 -8
- package/dist/utils/builder.js +0 -9
- package/dist/utils/builder.js.map +0 -1
- package/dist/utils/date.cjs +0 -193
- package/dist/utils/date.cjs.map +0 -1
- package/dist/utils/date.d.cts +0 -30
- package/dist/utils/date.d.ts +0 -30
- package/dist/utils/date.js +0 -156
- package/dist/utils/date.js.map +0 -1
- package/dist/utils/easeFunctions.cjs +0 -63
- package/dist/utils/easeFunctions.cjs.map +0 -1
- package/dist/utils/easeFunctions.d.cts +0 -11
- package/dist/utils/easeFunctions.d.ts +0 -11
- package/dist/utils/easeFunctions.js +0 -37
- package/dist/utils/easeFunctions.js.map +0 -1
- package/dist/utils/emailValidation.cjs +0 -32
- package/dist/utils/emailValidation.cjs.map +0 -1
- package/dist/utils/emailValidation.d.cts +0 -3
- package/dist/utils/emailValidation.d.ts +0 -3
- package/dist/utils/emailValidation.js +0 -8
- package/dist/utils/emailValidation.js.map +0 -1
- package/dist/utils/index.cjs +0 -562
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -16
- package/dist/utils/index.d.ts +0 -16
- package/dist/utils/index.js +0 -502
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/loopingArray.cjs +0 -96
- package/dist/utils/loopingArray.cjs.map +0 -1
- package/dist/utils/loopingArray.d.cts +0 -25
- package/dist/utils/loopingArray.d.ts +0 -25
- package/dist/utils/loopingArray.js +0 -72
- package/dist/utils/loopingArray.js.map +0 -1
- package/dist/utils/match.cjs +0 -32
- package/dist/utils/match.cjs.map +0 -1
- package/dist/utils/match.d.cts +0 -3
- package/dist/utils/match.d.ts +0 -3
- package/dist/utils/match.js +0 -8
- package/dist/utils/match.js.map +0 -1
- package/dist/utils/math.cjs +0 -33
- package/dist/utils/math.cjs.map +0 -1
- package/dist/utils/math.d.cts +0 -3
- package/dist/utils/math.d.ts +0 -3
- package/dist/utils/math.js +0 -9
- package/dist/utils/math.js.map +0 -1
- package/dist/utils/noop.cjs +0 -30
- package/dist/utils/noop.cjs.map +0 -1
- package/dist/utils/noop.d.cts +0 -3
- package/dist/utils/noop.d.ts +0 -3
- package/dist/utils/noop.js +0 -6
- package/dist/utils/noop.js.map +0 -1
- package/dist/utils/resolveSetState.cjs +0 -32
- package/dist/utils/resolveSetState.cjs.map +0 -1
- package/dist/utils/resolveSetState.d.cts +0 -5
- package/dist/utils/resolveSetState.d.ts +0 -5
- package/dist/utils/resolveSetState.js +0 -8
- package/dist/utils/resolveSetState.js.map +0 -1
- package/dist/utils/simpleSearch.cjs +0 -59
- package/dist/utils/simpleSearch.cjs.map +0 -1
- package/dist/utils/simpleSearch.d.cts +0 -50
- package/dist/utils/simpleSearch.d.ts +0 -50
- package/dist/utils/simpleSearch.js +0 -32
- package/dist/utils/simpleSearch.js.map +0 -1
- package/dist/utils/storage.cjs +0 -63
- package/dist/utils/storage.cjs.map +0 -1
- package/dist/utils/storage.d.cts +0 -16
- package/dist/utils/storage.d.ts +0 -16
- package/dist/utils/storage.js +0 -38
- package/dist/utils/storage.js.map +0 -1
- package/dist/utils/typing.cjs +0 -18
- package/dist/utils/typing.cjs.map +0 -1
- package/dist/utils/typing.d.cts +0 -8
- package/dist/utils/typing.d.ts +0 -8
- package/dist/utils/typing.js +0 -1
- package/dist/utils/typing.js.map +0 -1
- package/dist/utils/writeToClipboard.cjs +0 -33
- package/dist/utils/writeToClipboard.cjs.map +0 -1
- package/dist/utils/writeToClipboard.d.cts +0 -3
- package/dist/utils/writeToClipboard.d.ts +0 -3
- package/dist/utils/writeToClipboard.js +0 -10
- package/dist/utils/writeToClipboard.js.map +0 -1
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// src/hooks/useFloatingElement.ts
|
|
4
|
-
import { useCallback, useEffect as useEffect2, useState as useState2 } from "react";
|
|
5
|
-
|
|
6
|
-
// src/utils/math.ts
|
|
7
|
-
var clamp = (value, range = [0, 1]) => {
|
|
8
|
-
const [min, max] = range;
|
|
9
|
-
return Math.min(Math.max(value, min), max);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
// src/hooks/focus/useIsMounted.ts
|
|
13
|
-
import { useEffect, useLayoutEffect, useState } from "react";
|
|
14
|
-
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
15
|
-
var useIsomorphicEffect = isClient ? useLayoutEffect : useEffect;
|
|
16
|
-
var useIsMounted = () => {
|
|
17
|
-
const [isMounted, setIsMounted] = useState(false);
|
|
18
|
-
useIsomorphicEffect(() => {
|
|
19
|
-
setIsMounted(true);
|
|
20
|
-
return () => {
|
|
21
|
-
setIsMounted(false);
|
|
22
|
-
};
|
|
23
|
-
}, []);
|
|
24
|
-
return isMounted;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
// src/hooks/useFloatingElement.ts
|
|
28
|
-
function calculatePosition({
|
|
29
|
-
windowRect,
|
|
30
|
-
containerRect,
|
|
31
|
-
anchorRect,
|
|
32
|
-
options
|
|
33
|
-
}) {
|
|
34
|
-
const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
|
|
35
|
-
const windowWidth = windowRect.width;
|
|
36
|
-
const windowHeight = windowRect.height;
|
|
37
|
-
const maxWidth = windowWidth - 2 * screenPadding;
|
|
38
|
-
const maxHeight = windowHeight - 2 * screenPadding;
|
|
39
|
-
const width = Math.min(containerRect.width, maxWidth);
|
|
40
|
-
const height = Math.min(containerRect.height, maxHeight);
|
|
41
|
-
const leftSuggestion = {
|
|
42
|
-
beforeStart: anchorRect.left - width - gap,
|
|
43
|
-
afterStart: anchorRect.left,
|
|
44
|
-
center: anchorRect.left + anchorRect.width / 2 - width / 2,
|
|
45
|
-
beforeEnd: anchorRect.right - width,
|
|
46
|
-
afterEnd: anchorRect.right + gap
|
|
47
|
-
}[horizontalAlignment];
|
|
48
|
-
const topSuggestion = {
|
|
49
|
-
beforeStart: anchorRect.top - height - gap,
|
|
50
|
-
afterStart: anchorRect.top,
|
|
51
|
-
center: anchorRect.top + anchorRect.height / 2 - height / 2,
|
|
52
|
-
beforeEnd: anchorRect.bottom - height,
|
|
53
|
-
afterEnd: anchorRect.bottom + gap
|
|
54
|
-
}[verticalAlignment];
|
|
55
|
-
const left = clamp(leftSuggestion, [
|
|
56
|
-
screenPadding,
|
|
57
|
-
windowWidth - screenPadding - width
|
|
58
|
-
]);
|
|
59
|
-
const top = clamp(topSuggestion, [
|
|
60
|
-
screenPadding,
|
|
61
|
-
windowHeight - screenPadding - height
|
|
62
|
-
]);
|
|
63
|
-
return {
|
|
64
|
-
left,
|
|
65
|
-
top,
|
|
66
|
-
maxWidth,
|
|
67
|
-
maxHeight
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function useFloatingElement({
|
|
71
|
-
active = true,
|
|
72
|
-
windowRef,
|
|
73
|
-
anchorRef,
|
|
74
|
-
containerRef,
|
|
75
|
-
isPolling = false,
|
|
76
|
-
pollingInterval = 100,
|
|
77
|
-
verticalAlignment = "afterEnd",
|
|
78
|
-
horizontalAlignment = "afterStart",
|
|
79
|
-
screenPadding = 16,
|
|
80
|
-
gap = 4
|
|
81
|
-
}) {
|
|
82
|
-
const [style, setStyle] = useState2();
|
|
83
|
-
const isMounted = useIsMounted();
|
|
84
|
-
const calculate = useCallback(() => {
|
|
85
|
-
const containerRect = containerRef.current.getBoundingClientRect();
|
|
86
|
-
const windowRect = windowRef?.current.getBoundingClientRect() ?? {
|
|
87
|
-
top: 0,
|
|
88
|
-
bottom: window.innerHeight,
|
|
89
|
-
left: 0,
|
|
90
|
-
right: window.innerWidth,
|
|
91
|
-
width: window.innerWidth,
|
|
92
|
-
height: window.innerHeight
|
|
93
|
-
};
|
|
94
|
-
const anchorElement = anchorRef?.current;
|
|
95
|
-
if (anchorRef && !anchorElement) {
|
|
96
|
-
console.warn("FloatingContainer anchor provided, but its value is undefined");
|
|
97
|
-
}
|
|
98
|
-
const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
|
|
99
|
-
const calculateProps = {
|
|
100
|
-
windowRect,
|
|
101
|
-
anchorRect,
|
|
102
|
-
containerRect,
|
|
103
|
-
options: {
|
|
104
|
-
horizontalAlignment,
|
|
105
|
-
verticalAlignment,
|
|
106
|
-
screenPadding,
|
|
107
|
-
gap
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
setStyle(calculatePosition(calculateProps));
|
|
111
|
-
}, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
|
|
112
|
-
const height = containerRef.current?.getBoundingClientRect().height;
|
|
113
|
-
const width = containerRef.current?.getBoundingClientRect().width;
|
|
114
|
-
useEffect2(() => {
|
|
115
|
-
if (active && isMounted) {
|
|
116
|
-
calculate();
|
|
117
|
-
} else {
|
|
118
|
-
setStyle(void 0);
|
|
119
|
-
}
|
|
120
|
-
}, [calculate, active, isMounted, height, width]);
|
|
121
|
-
useEffect2(() => {
|
|
122
|
-
window.addEventListener("resize", calculate);
|
|
123
|
-
let timeout;
|
|
124
|
-
if (isPolling) {
|
|
125
|
-
timeout = setInterval(calculate, pollingInterval);
|
|
126
|
-
}
|
|
127
|
-
return () => {
|
|
128
|
-
window.removeEventListener("resize", calculate);
|
|
129
|
-
if (timeout) {
|
|
130
|
-
clearInterval(timeout);
|
|
131
|
-
}
|
|
132
|
-
};
|
|
133
|
-
}, [calculate, isPolling, pollingInterval]);
|
|
134
|
-
return style;
|
|
135
|
-
}
|
|
136
|
-
export {
|
|
137
|
-
useFloatingElement
|
|
138
|
-
};
|
|
139
|
-
//# sourceMappingURL=useFloatingElement.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useFloatingElement.ts","../../src/utils/math.ts","../../src/hooks/focus/useIsMounted.ts"],"sourcesContent":["'use client'\n\nimport type { CSSProperties, MutableRefObject } from 'react'\nimport { useCallback, useEffect, useState } from 'react'\nimport { clamp } from '@/src/utils/math'\nimport { useIsMounted } from '@/src/hooks/focus/useIsMounted'\n\nexport type FloatingElementAlignment = 'beforeStart' | 'afterStart' | 'center' | 'beforeEnd' | 'afterEnd'\n\ntype RectangleBounds = {\n top: number,\n right: number,\n bottom: number,\n left: number,\n width: number,\n height: number,\n}\n\ntype CalculatePositionOptions = {\n verticalAlignment?: FloatingElementAlignment,\n horizontalAlignment?: FloatingElementAlignment,\n screenPadding?: number,\n gap?: number,\n}\n\ntype CalculatePositionProps = {\n windowRect: RectangleBounds,\n containerRect: RectangleBounds,\n anchorRect: RectangleBounds,\n options: CalculatePositionOptions,\n}\n\ntype UseFloatingElementStyle = {\n left: number,\n top: number,\n maxWidth: number,\n maxHeight: number,\n}\n\nfunction calculatePosition({\n windowRect,\n containerRect,\n anchorRect,\n options,\n }: CalculatePositionProps): UseFloatingElementStyle {\n const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options\n const windowWidth = windowRect.width\n const windowHeight = windowRect.height\n\n const maxWidth = windowWidth - 2 * screenPadding\n const maxHeight = windowHeight - 2 * screenPadding\n\n const width = Math.min(containerRect.width, maxWidth)\n const height = Math.min(containerRect.height, maxHeight)\n\n const leftSuggestion = {\n beforeStart: anchorRect.left - width - gap,\n afterStart: anchorRect.left,\n center: anchorRect.left + anchorRect.width / 2 - width / 2,\n beforeEnd: anchorRect.right - width,\n afterEnd: anchorRect.right + gap,\n }[horizontalAlignment]\n\n const topSuggestion = {\n beforeStart: anchorRect.top - height - gap,\n afterStart: anchorRect.top,\n center: anchorRect.top + anchorRect.height / 2 - height / 2,\n beforeEnd: anchorRect.bottom - height,\n afterEnd: anchorRect.bottom + gap,\n }[verticalAlignment]\n\n const left = clamp(leftSuggestion, [\n screenPadding,\n windowWidth - screenPadding - width,\n ])\n\n const top = clamp(topSuggestion, [\n screenPadding,\n windowHeight - screenPadding - height,\n ])\n\n return {\n left,\n top,\n maxWidth,\n maxHeight,\n }\n}\n\nexport type UseFloatingElementOptions = CalculatePositionOptions & {\n isPolling?: boolean,\n pollingInterval?: number,\n}\n\nexport type UseFloatingElementProps = UseFloatingElementOptions & {\n containerRef: MutableRefObject<HTMLElement>,\n anchorRef: MutableRefObject<HTMLElement>,\n windowRef?: MutableRefObject<HTMLElement>,\n active?: boolean,\n}\n\nexport function useFloatingElement({\n active = true,\n windowRef,\n anchorRef,\n containerRef,\n isPolling = false,\n pollingInterval = 100,\n verticalAlignment = 'afterEnd',\n horizontalAlignment = 'afterStart',\n screenPadding = 16,\n gap = 4,\n }: UseFloatingElementProps) {\n const [style, setStyle] = useState<CSSProperties>()\n const isMounted = useIsMounted()\n\n const calculate = useCallback(() => {\n const containerRect = containerRef.current.getBoundingClientRect()\n const windowRect: RectangleBounds = windowRef?.current.getBoundingClientRect() ?? {\n top: 0,\n bottom: window.innerHeight,\n left: 0,\n right: window.innerWidth,\n width: window.innerWidth,\n height: window.innerHeight,\n }\n const anchorElement = anchorRef?.current\n if (anchorRef && !anchorElement) {\n console.warn('FloatingContainer anchor provided, but its value is undefined')\n }\n const anchorRect: RectangleBounds = anchorElement?.getBoundingClientRect() ?? windowRect\n\n const calculateProps: CalculatePositionProps = {\n windowRect,\n anchorRect,\n containerRect,\n options: {\n horizontalAlignment,\n verticalAlignment,\n screenPadding,\n gap,\n }\n }\n setStyle(calculatePosition(calculateProps))\n }, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef])\n\n\n const height = containerRef.current?.getBoundingClientRect().height\n const width = containerRef.current?.getBoundingClientRect().width\n useEffect(() => {\n if (active && isMounted) {\n calculate()\n } else {\n setStyle(undefined)\n }\n }, [calculate, active, isMounted, height, width])\n\n useEffect(() => {\n window.addEventListener('resize', calculate)\n let timeout: NodeJS.Timeout\n if (isPolling) {\n timeout = setInterval(calculate, pollingInterval)\n }\n return () => {\n window.removeEventListener('resize', calculate)\n if (timeout) {\n clearInterval(timeout)\n }\n }\n }, [calculate, isPolling, pollingInterval])\n\n return style\n}","export const clamp = (value: number, range: [number, number] = [0, 1]): number => {\n const [min, max] = range\n return Math.min(Math.max(value, min), max)\n}\n","'use client'\n\nimport { useEffect, useLayoutEffect, useState } from 'react'\n\nconst isClient = typeof window !== 'undefined' && typeof document !== 'undefined'\nconst useIsomorphicEffect = isClient ? useLayoutEffect : useEffect\n\nexport const useIsMounted = () => {\n const [isMounted, setIsMounted] = useState(false)\n\n useIsomorphicEffect(() => {\n setIsMounted(true)\n return () => {\n setIsMounted(false)\n }\n }, [])\n return isMounted\n}"],"mappings":";;;AAGA,SAAS,aAAa,aAAAA,YAAW,YAAAC,iBAAgB;;;ACH1C,IAAM,QAAQ,CAAC,OAAe,QAA0B,CAAC,GAAG,CAAC,MAAc;AAChF,QAAM,CAAC,KAAK,GAAG,IAAI;AACnB,SAAO,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,GAAG;AAC3C;;;ACDA,SAAS,WAAW,iBAAiB,gBAAgB;AAErD,IAAM,WAAW,OAAO,WAAW,eAAe,OAAO,aAAa;AACtE,IAAM,sBAAsB,WAAW,kBAAkB;AAElD,IAAM,eAAe,MAAM;AAChC,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAEhD,sBAAoB,MAAM;AACxB,iBAAa,IAAI;AACjB,WAAO,MAAM;AACX,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,CAAC;AACL,SAAO;AACT;;;AFsBA,SAAS,kBAAkB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAAoD;AAC7E,QAAM,EAAE,mBAAmB,qBAAqB,KAAK,cAAc,IAAI;AACvE,QAAM,cAAc,WAAW;AAC/B,QAAM,eAAe,WAAW;AAEhC,QAAM,WAAW,cAAc,IAAI;AACnC,QAAM,YAAY,eAAe,IAAI;AAErC,QAAM,QAAQ,KAAK,IAAI,cAAc,OAAO,QAAQ;AACpD,QAAM,SAAS,KAAK,IAAI,cAAc,QAAQ,SAAS;AAEvD,QAAM,iBAAiB;AAAA,IACrB,aAAa,WAAW,OAAO,QAAQ;AAAA,IACvC,YAAY,WAAW;AAAA,IACvB,QAAQ,WAAW,OAAO,WAAW,QAAQ,IAAI,QAAQ;AAAA,IACzD,WAAW,WAAW,QAAQ;AAAA,IAC9B,UAAU,WAAW,QAAQ;AAAA,EAC/B,EAAE,mBAAmB;AAErB,QAAM,gBAAgB;AAAA,IACpB,aAAa,WAAW,MAAM,SAAS;AAAA,IACvC,YAAY,WAAW;AAAA,IACvB,QAAQ,WAAW,MAAM,WAAW,SAAS,IAAI,SAAS;AAAA,IAC1D,WAAW,WAAW,SAAS;AAAA,IAC/B,UAAU,WAAW,SAAS;AAAA,EAChC,EAAE,iBAAiB;AAEnB,QAAM,OAAO,MAAM,gBAAgB;AAAA,IACjC;AAAA,IACA,cAAc,gBAAgB;AAAA,EAChC,CAAC;AAED,QAAM,MAAM,MAAM,eAAe;AAAA,IAC/B;AAAA,IACA,eAAe,gBAAgB;AAAA,EACjC,CAAC;AAED,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAcO,SAAS,mBAAmB;AAAA,EACE,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,EAChB,MAAM;AACR,GAA4B;AAC7D,QAAM,CAAC,OAAO,QAAQ,IAAIC,UAAwB;AAClD,QAAM,YAAY,aAAa;AAE/B,QAAM,YAAY,YAAY,MAAM;AAClC,UAAM,gBAAgB,aAAa,QAAQ,sBAAsB;AACjE,UAAM,aAA8B,WAAW,QAAQ,sBAAsB,KAAK;AAAA,MAChF,KAAK;AAAA,MACL,QAAQ,OAAO;AAAA,MACf,MAAM;AAAA,MACN,OAAO,OAAO;AAAA,MACd,OAAO,OAAO;AAAA,MACd,QAAQ,OAAO;AAAA,IACjB;AACA,UAAM,gBAAgB,WAAW;AACjC,QAAI,aAAa,CAAC,eAAe;AAC/B,cAAQ,KAAK,+DAA+D;AAAA,IAC9E;AACA,UAAM,aAA8B,eAAe,sBAAsB,KAAK;AAE9E,UAAM,iBAAyC;AAAA,MAC7C;AAAA,MACA;AAAA,MACA;AAAA,MACA,SAAS;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AACA,aAAS,kBAAkB,cAAc,CAAC;AAAA,EAC5C,GAAG,CAAC,WAAW,cAAc,KAAK,qBAAqB,eAAe,mBAAmB,SAAS,CAAC;AAGnG,QAAM,SAAS,aAAa,SAAS,sBAAsB,EAAE;AAC7D,QAAM,QAAQ,aAAa,SAAS,sBAAsB,EAAE;AAC5D,EAAAC,WAAU,MAAM;AACd,QAAI,UAAU,WAAW;AACvB,gBAAU;AAAA,IACZ,OAAO;AACL,eAAS,MAAS;AAAA,IACpB;AAAA,EACF,GAAG,CAAC,WAAW,QAAQ,WAAW,QAAQ,KAAK,CAAC;AAEhD,EAAAA,WAAU,MAAM;AACd,WAAO,iBAAiB,UAAU,SAAS;AAC3C,QAAI;AACJ,QAAI,WAAW;AACb,gBAAU,YAAY,WAAW,eAAe;AAAA,IAClD;AACA,WAAO,MAAM;AACX,aAAO,oBAAoB,UAAU,SAAS;AAC9C,UAAI,SAAS;AACX,sBAAc,OAAO;AAAA,MACvB;AAAA,IACF;AAAA,EACF,GAAG,CAAC,WAAW,WAAW,eAAe,CAAC;AAE1C,SAAO;AACT;","names":["useEffect","useState","useState","useEffect"]}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/hooks/useHoverState.ts
|
|
20
|
-
var useHoverState_exports = {};
|
|
21
|
-
__export(useHoverState_exports, {
|
|
22
|
-
useHoverState: () => useHoverState
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useHoverState_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var defaultUseHoverStateProps = {
|
|
27
|
-
closingDelay: 200,
|
|
28
|
-
isDisabled: false
|
|
29
|
-
};
|
|
30
|
-
var useHoverState = (props = void 0) => {
|
|
31
|
-
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
32
|
-
const [isHovered, setIsHovered] = (0, import_react.useState)(false);
|
|
33
|
-
const [timer, setTimer] = (0, import_react.useState)();
|
|
34
|
-
const onMouseEnter = () => {
|
|
35
|
-
if (isDisabled) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
clearTimeout(timer);
|
|
39
|
-
setIsHovered(true);
|
|
40
|
-
};
|
|
41
|
-
const onMouseLeave = () => {
|
|
42
|
-
if (isDisabled) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
setTimer(setTimeout(() => {
|
|
46
|
-
setIsHovered(false);
|
|
47
|
-
}, closingDelay));
|
|
48
|
-
};
|
|
49
|
-
(0, import_react.useEffect)(() => {
|
|
50
|
-
if (timer) {
|
|
51
|
-
return () => {
|
|
52
|
-
clearTimeout(timer);
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
(0, import_react.useEffect)(() => {
|
|
57
|
-
if (timer) {
|
|
58
|
-
clearTimeout(timer);
|
|
59
|
-
}
|
|
60
|
-
}, [isDisabled]);
|
|
61
|
-
return {
|
|
62
|
-
isHovered,
|
|
63
|
-
setIsHovered,
|
|
64
|
-
handlers: { onMouseEnter, onMouseLeave }
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
-
0 && (module.exports = {
|
|
69
|
-
useHoverState
|
|
70
|
-
});
|
|
71
|
-
//# sourceMappingURL=useHoverState.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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,42 +0,0 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
|
|
3
|
-
type UseHoverStateProps = {
|
|
4
|
-
/**
|
|
5
|
-
* The delay after which the menu is closed in milliseconds
|
|
6
|
-
*
|
|
7
|
-
* default: 200ms
|
|
8
|
-
*/
|
|
9
|
-
closingDelay: number;
|
|
10
|
-
/**
|
|
11
|
-
* Whether the hover state management should be disabled
|
|
12
|
-
*
|
|
13
|
-
* default: false
|
|
14
|
-
*/
|
|
15
|
-
isDisabled: boolean;
|
|
16
|
-
};
|
|
17
|
-
type UseHoverStateReturnType = {
|
|
18
|
-
/**
|
|
19
|
-
* Whether the element is hovered
|
|
20
|
-
*/
|
|
21
|
-
isHovered: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Function to change the current hover status
|
|
24
|
-
*/
|
|
25
|
-
setIsHovered: Dispatch<SetStateAction<boolean>>;
|
|
26
|
-
/**
|
|
27
|
-
* Handlers to pass on to the component that should be hovered
|
|
28
|
-
*/
|
|
29
|
-
handlers: {
|
|
30
|
-
onMouseEnter: () => void;
|
|
31
|
-
onMouseLeave: () => void;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* @param props See UseHoverStateProps
|
|
36
|
-
*
|
|
37
|
-
* A react hook for managing the hover state of a component. The handlers provided should be
|
|
38
|
-
* forwarded to the component which should be hovered over
|
|
39
|
-
*/
|
|
40
|
-
declare const useHoverState: (props?: Partial<UseHoverStateProps> | undefined) => UseHoverStateReturnType;
|
|
41
|
-
|
|
42
|
-
export { useHoverState };
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
|
|
3
|
-
type UseHoverStateProps = {
|
|
4
|
-
/**
|
|
5
|
-
* The delay after which the menu is closed in milliseconds
|
|
6
|
-
*
|
|
7
|
-
* default: 200ms
|
|
8
|
-
*/
|
|
9
|
-
closingDelay: number;
|
|
10
|
-
/**
|
|
11
|
-
* Whether the hover state management should be disabled
|
|
12
|
-
*
|
|
13
|
-
* default: false
|
|
14
|
-
*/
|
|
15
|
-
isDisabled: boolean;
|
|
16
|
-
};
|
|
17
|
-
type UseHoverStateReturnType = {
|
|
18
|
-
/**
|
|
19
|
-
* Whether the element is hovered
|
|
20
|
-
*/
|
|
21
|
-
isHovered: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Function to change the current hover status
|
|
24
|
-
*/
|
|
25
|
-
setIsHovered: Dispatch<SetStateAction<boolean>>;
|
|
26
|
-
/**
|
|
27
|
-
* Handlers to pass on to the component that should be hovered
|
|
28
|
-
*/
|
|
29
|
-
handlers: {
|
|
30
|
-
onMouseEnter: () => void;
|
|
31
|
-
onMouseLeave: () => void;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* @param props See UseHoverStateProps
|
|
36
|
-
*
|
|
37
|
-
* A react hook for managing the hover state of a component. The handlers provided should be
|
|
38
|
-
* forwarded to the component which should be hovered over
|
|
39
|
-
*/
|
|
40
|
-
declare const useHoverState: (props?: Partial<UseHoverStateProps> | undefined) => UseHoverStateReturnType;
|
|
41
|
-
|
|
42
|
-
export { useHoverState };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
// src/hooks/useHoverState.ts
|
|
2
|
-
import { useEffect, useState } from "react";
|
|
3
|
-
var defaultUseHoverStateProps = {
|
|
4
|
-
closingDelay: 200,
|
|
5
|
-
isDisabled: false
|
|
6
|
-
};
|
|
7
|
-
var useHoverState = (props = void 0) => {
|
|
8
|
-
const { closingDelay, isDisabled } = { ...defaultUseHoverStateProps, ...props };
|
|
9
|
-
const [isHovered, setIsHovered] = useState(false);
|
|
10
|
-
const [timer, setTimer] = useState();
|
|
11
|
-
const onMouseEnter = () => {
|
|
12
|
-
if (isDisabled) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
clearTimeout(timer);
|
|
16
|
-
setIsHovered(true);
|
|
17
|
-
};
|
|
18
|
-
const onMouseLeave = () => {
|
|
19
|
-
if (isDisabled) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
setTimer(setTimeout(() => {
|
|
23
|
-
setIsHovered(false);
|
|
24
|
-
}, closingDelay));
|
|
25
|
-
};
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (timer) {
|
|
28
|
-
return () => {
|
|
29
|
-
clearTimeout(timer);
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
if (timer) {
|
|
35
|
-
clearTimeout(timer);
|
|
36
|
-
}
|
|
37
|
-
}, [isDisabled]);
|
|
38
|
-
return {
|
|
39
|
-
isHovered,
|
|
40
|
-
setIsHovered,
|
|
41
|
-
handlers: { onMouseEnter, onMouseLeave }
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export {
|
|
45
|
-
useHoverState
|
|
46
|
-
};
|
|
47
|
-
//# sourceMappingURL=useHoverState.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":[]}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
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/utils/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/utils/resolveSetState.ts
|
|
58
|
-
function resolveSetState(action, prev) {
|
|
59
|
-
return typeof action === "function" ? action(prev) : action;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
// src/hooks/useLocalStorage.ts
|
|
63
|
-
var useLocalStorage = (key, backupValue) => {
|
|
64
|
-
const get = (0, import_react.useCallback)(() => {
|
|
65
|
-
if (typeof window === "undefined") {
|
|
66
|
-
return backupValue;
|
|
67
|
-
}
|
|
68
|
-
const storageService = new LocalStorageService();
|
|
69
|
-
try {
|
|
70
|
-
const value = storageService.get(key);
|
|
71
|
-
return value || backupValue;
|
|
72
|
-
} catch (_) {
|
|
73
|
-
console.warn("useLocalStorage: Error while reading the stored value. Make sure your typing is correct.");
|
|
74
|
-
storageService.delete(key);
|
|
75
|
-
console.info(`useLocalStorage: deleted erroneous value for key: ${key}`);
|
|
76
|
-
return backupValue;
|
|
77
|
-
}
|
|
78
|
-
}, [backupValue, key]);
|
|
79
|
-
const [storedValue, setStoredValue] = (0, import_react.useState)(get);
|
|
80
|
-
const setValue = (0, import_react.useCallback)((action) => {
|
|
81
|
-
const newValue = resolveSetState(action, storedValue);
|
|
82
|
-
const storageService = new LocalStorageService();
|
|
83
|
-
storageService.set(key, newValue);
|
|
84
|
-
setStoredValue(newValue);
|
|
85
|
-
}, [storedValue, setStoredValue, key]);
|
|
86
|
-
const deleteValue = () => {
|
|
87
|
-
const storageService = new LocalStorageService();
|
|
88
|
-
storageService.delete(key);
|
|
89
|
-
setStoredValue(backupValue);
|
|
90
|
-
};
|
|
91
|
-
return { value: storedValue, setValue, deleteValue };
|
|
92
|
-
};
|
|
93
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
-
0 && (module.exports = {
|
|
95
|
-
useLocalStorage
|
|
96
|
-
});
|
|
97
|
-
//# sourceMappingURL=useLocalStorage.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useLocalStorage.ts","../../src/utils/storage.ts","../../src/utils/resolveSetState.ts"],"sourcesContent":["'use client'\n\nimport type { Dispatch, SetStateAction } from 'react'\nimport { useCallback, useState } from 'react'\nimport { LocalStorageService } from '@/src/utils/storage'\nimport { resolveSetState } from '@/src/utils/resolveSetState'\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\n\ntype UseLocalStorageResult<T> = {\n value: T,\n setValue: SetValue<T>,\n deleteValue: () => void,\n}\n\n/**\n * @param key Key under which to save the data\n * @param backupValue Used if the storage is unavailable or no value is present\n *\n * The backup value will never be saved to the storage unless you explicitly\n */\nexport const useLocalStorage = <T>(key: string, backupValue: T): UseLocalStorageResult<T> => {\n const get = useCallback((): T => {\n if (typeof window === 'undefined') {\n return backupValue\n }\n const storageService = new LocalStorageService()\n try {\n const value = storageService.get<T>(key)\n return value || backupValue\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (_) {\n console.warn('useLocalStorage: Error while reading the stored value. Make sure your typing is correct.')\n storageService.delete(key)\n console.info(`useLocalStorage: deleted erroneous value for key: ${key}`)\n return backupValue\n }\n }, [backupValue, key])\n\n const [storedValue, setStoredValue] = useState<T>(get)\n\n const setValue: SetValue<T> = useCallback(action => {\n const newValue = resolveSetState(action, storedValue)\n const storageService = new LocalStorageService()\n storageService.set(key, newValue)\n\n setStoredValue(newValue)\n }, [storedValue, setStoredValue, key])\n\n const deleteValue = () => {\n const storageService = new LocalStorageService()\n storageService.delete(key)\n setStoredValue(backupValue)\n }\n\n return { value: storedValue, setValue, deleteValue }\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","import type { SetStateAction } from 'react'\n\nexport function resolveSetState<T>(action: SetStateAction<T>, prev: T): T {\n return typeof action === 'function' ? (action as (prev: T) => T)(prev) : action\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,mBAAsC;;;ACHtC,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;;;AC7BO,SAAS,gBAAmB,QAA2B,MAAY;AACxE,SAAO,OAAO,WAAW,aAAc,OAA0B,IAAI,IAAI;AAC3E;;;AFiBO,IAAM,kBAAkB,CAAI,KAAa,gBAA6C;AAC3F,QAAM,UAAM,0BAAY,MAAS;AAC/B,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AACA,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,QAAI;AACF,YAAM,QAAQ,eAAe,IAAO,GAAG;AACvC,aAAO,SAAS;AAAA,IAElB,SAAS,GAAG;AACV,cAAQ,KAAK,0FAA0F;AACvG,qBAAe,OAAO,GAAG;AACzB,cAAQ,KAAK,qDAAqD,GAAG,EAAE;AACvE,aAAO;AAAA,IACT;AAAA,EACF,GAAG,CAAC,aAAa,GAAG,CAAC;AAErB,QAAM,CAAC,aAAa,cAAc,QAAI,uBAAY,GAAG;AAErD,QAAM,eAAwB,0BAAY,YAAU;AAClD,UAAM,WAAW,gBAAgB,QAAQ,WAAW;AACpD,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,mBAAe,IAAI,KAAK,QAAQ;AAEhC,mBAAe,QAAQ;AAAA,EACzB,GAAG,CAAC,aAAa,gBAAgB,GAAG,CAAC;AAErC,QAAM,cAAc,MAAM;AACxB,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,mBAAe,OAAO,GAAG;AACzB,mBAAe,WAAW;AAAA,EAC5B;AAEA,SAAO,EAAE,OAAO,aAAa,UAAU,YAAY;AACrD;","names":[]}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
|
|
3
|
-
type SetValue<T> = Dispatch<SetStateAction<T>>;
|
|
4
|
-
type UseLocalStorageResult<T> = {
|
|
5
|
-
value: T;
|
|
6
|
-
setValue: SetValue<T>;
|
|
7
|
-
deleteValue: () => void;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* @param key Key under which to save the data
|
|
11
|
-
* @param backupValue Used if the storage is unavailable or no value is present
|
|
12
|
-
*
|
|
13
|
-
* The backup value will never be saved to the storage unless you explicitly
|
|
14
|
-
*/
|
|
15
|
-
declare const useLocalStorage: <T>(key: string, backupValue: T) => UseLocalStorageResult<T>;
|
|
16
|
-
|
|
17
|
-
export { useLocalStorage };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
-
|
|
3
|
-
type SetValue<T> = Dispatch<SetStateAction<T>>;
|
|
4
|
-
type UseLocalStorageResult<T> = {
|
|
5
|
-
value: T;
|
|
6
|
-
setValue: SetValue<T>;
|
|
7
|
-
deleteValue: () => void;
|
|
8
|
-
};
|
|
9
|
-
/**
|
|
10
|
-
* @param key Key under which to save the data
|
|
11
|
-
* @param backupValue Used if the storage is unavailable or no value is present
|
|
12
|
-
*
|
|
13
|
-
* The backup value will never be saved to the storage unless you explicitly
|
|
14
|
-
*/
|
|
15
|
-
declare const useLocalStorage: <T>(key: string, backupValue: T) => UseLocalStorageResult<T>;
|
|
16
|
-
|
|
17
|
-
export { useLocalStorage };
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
// src/hooks/useLocalStorage.ts
|
|
4
|
-
import { useCallback, useState } from "react";
|
|
5
|
-
|
|
6
|
-
// src/utils/storage.ts
|
|
7
|
-
var StorageService = class {
|
|
8
|
-
// this seems to be a bug in eslint as 'paramter-properties' is a special syntax of typescript
|
|
9
|
-
constructor(storage) {
|
|
10
|
-
this.storage = storage;
|
|
11
|
-
}
|
|
12
|
-
get(key) {
|
|
13
|
-
const value = this.storage.getItem(key);
|
|
14
|
-
if (value === null) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
return JSON.parse(value);
|
|
18
|
-
}
|
|
19
|
-
set(key, value) {
|
|
20
|
-
this.storage.setItem(key, JSON.stringify(value));
|
|
21
|
-
}
|
|
22
|
-
delete(key) {
|
|
23
|
-
this.storage.removeItem(key);
|
|
24
|
-
}
|
|
25
|
-
deleteAll() {
|
|
26
|
-
this.storage.clear();
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var LocalStorageService = class extends StorageService {
|
|
30
|
-
constructor() {
|
|
31
|
-
super(window.localStorage);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
// src/utils/resolveSetState.ts
|
|
36
|
-
function resolveSetState(action, prev) {
|
|
37
|
-
return typeof action === "function" ? action(prev) : action;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// src/hooks/useLocalStorage.ts
|
|
41
|
-
var useLocalStorage = (key, backupValue) => {
|
|
42
|
-
const get = useCallback(() => {
|
|
43
|
-
if (typeof window === "undefined") {
|
|
44
|
-
return backupValue;
|
|
45
|
-
}
|
|
46
|
-
const storageService = new LocalStorageService();
|
|
47
|
-
try {
|
|
48
|
-
const value = storageService.get(key);
|
|
49
|
-
return value || backupValue;
|
|
50
|
-
} catch (_) {
|
|
51
|
-
console.warn("useLocalStorage: Error while reading the stored value. Make sure your typing is correct.");
|
|
52
|
-
storageService.delete(key);
|
|
53
|
-
console.info(`useLocalStorage: deleted erroneous value for key: ${key}`);
|
|
54
|
-
return backupValue;
|
|
55
|
-
}
|
|
56
|
-
}, [backupValue, key]);
|
|
57
|
-
const [storedValue, setStoredValue] = useState(get);
|
|
58
|
-
const setValue = useCallback((action) => {
|
|
59
|
-
const newValue = resolveSetState(action, storedValue);
|
|
60
|
-
const storageService = new LocalStorageService();
|
|
61
|
-
storageService.set(key, newValue);
|
|
62
|
-
setStoredValue(newValue);
|
|
63
|
-
}, [storedValue, setStoredValue, key]);
|
|
64
|
-
const deleteValue = () => {
|
|
65
|
-
const storageService = new LocalStorageService();
|
|
66
|
-
storageService.delete(key);
|
|
67
|
-
setStoredValue(backupValue);
|
|
68
|
-
};
|
|
69
|
-
return { value: storedValue, setValue, deleteValue };
|
|
70
|
-
};
|
|
71
|
-
export {
|
|
72
|
-
useLocalStorage
|
|
73
|
-
};
|
|
74
|
-
//# sourceMappingURL=useLocalStorage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useLocalStorage.ts","../../src/utils/storage.ts","../../src/utils/resolveSetState.ts"],"sourcesContent":["'use client'\n\nimport type { Dispatch, SetStateAction } from 'react'\nimport { useCallback, useState } from 'react'\nimport { LocalStorageService } from '@/src/utils/storage'\nimport { resolveSetState } from '@/src/utils/resolveSetState'\n\ntype SetValue<T> = Dispatch<SetStateAction<T>>\n\ntype UseLocalStorageResult<T> = {\n value: T,\n setValue: SetValue<T>,\n deleteValue: () => void,\n}\n\n/**\n * @param key Key under which to save the data\n * @param backupValue Used if the storage is unavailable or no value is present\n *\n * The backup value will never be saved to the storage unless you explicitly\n */\nexport const useLocalStorage = <T>(key: string, backupValue: T): UseLocalStorageResult<T> => {\n const get = useCallback((): T => {\n if (typeof window === 'undefined') {\n return backupValue\n }\n const storageService = new LocalStorageService()\n try {\n const value = storageService.get<T>(key)\n return value || backupValue\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n } catch (_) {\n console.warn('useLocalStorage: Error while reading the stored value. Make sure your typing is correct.')\n storageService.delete(key)\n console.info(`useLocalStorage: deleted erroneous value for key: ${key}`)\n return backupValue\n }\n }, [backupValue, key])\n\n const [storedValue, setStoredValue] = useState<T>(get)\n\n const setValue: SetValue<T> = useCallback(action => {\n const newValue = resolveSetState(action, storedValue)\n const storageService = new LocalStorageService()\n storageService.set(key, newValue)\n\n setStoredValue(newValue)\n }, [storedValue, setStoredValue, key])\n\n const deleteValue = () => {\n const storageService = new LocalStorageService()\n storageService.delete(key)\n setStoredValue(backupValue)\n }\n\n return { value: storedValue, setValue, deleteValue }\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","import type { SetStateAction } from 'react'\n\nexport function resolveSetState<T>(action: SetStateAction<T>, prev: T): T {\n return typeof action === 'function' ? (action as (prev: T) => T)(prev) : action\n}"],"mappings":";;;AAGA,SAAS,aAAa,gBAAgB;;;ACHtC,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;;;AC7BO,SAAS,gBAAmB,QAA2B,MAAY;AACxE,SAAO,OAAO,WAAW,aAAc,OAA0B,IAAI,IAAI;AAC3E;;;AFiBO,IAAM,kBAAkB,CAAI,KAAa,gBAA6C;AAC3F,QAAM,MAAM,YAAY,MAAS;AAC/B,QAAI,OAAO,WAAW,aAAa;AACjC,aAAO;AAAA,IACT;AACA,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,QAAI;AACF,YAAM,QAAQ,eAAe,IAAO,GAAG;AACvC,aAAO,SAAS;AAAA,IAElB,SAAS,GAAG;AACV,cAAQ,KAAK,0FAA0F;AACvG,qBAAe,OAAO,GAAG;AACzB,cAAQ,KAAK,qDAAqD,GAAG,EAAE;AACvE,aAAO;AAAA,IACT;AAAA,EACF,GAAG,CAAC,aAAa,GAAG,CAAC;AAErB,QAAM,CAAC,aAAa,cAAc,IAAI,SAAY,GAAG;AAErD,QAAM,WAAwB,YAAY,YAAU;AAClD,UAAM,WAAW,gBAAgB,QAAQ,WAAW;AACpD,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,mBAAe,IAAI,KAAK,QAAQ;AAEhC,mBAAe,QAAQ;AAAA,EACzB,GAAG,CAAC,aAAa,gBAAgB,GAAG,CAAC;AAErC,QAAM,cAAc,MAAM;AACxB,UAAM,iBAAiB,IAAI,oBAAoB;AAC/C,mBAAe,OAAO,GAAG;AACzB,mBAAe,WAAW;AAAA,EAC5B;AAEA,SAAO,EAAE,OAAO,aAAa,UAAU,YAAY;AACrD;","names":[]}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
|
|
19
|
-
// src/hooks/useLogOnce.ts
|
|
20
|
-
var useLogOnce_exports = {};
|
|
21
|
-
__export(useLogOnce_exports, {
|
|
22
|
-
useLogOnce: () => useLogOnce
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useLogOnce_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var defaultOptions = {
|
|
27
|
-
type: "warning"
|
|
28
|
-
};
|
|
29
|
-
var useLogOnce = (message, condition, options) => {
|
|
30
|
-
const [hasLogged, setHasLogged] = (0, import_react.useState)(false);
|
|
31
|
-
const { type } = { ...defaultOptions, ...options };
|
|
32
|
-
(0, import_react.useEffect)(() => {
|
|
33
|
-
if (!hasLogged && condition) {
|
|
34
|
-
switch (type) {
|
|
35
|
-
case "info":
|
|
36
|
-
console.info(message);
|
|
37
|
-
break;
|
|
38
|
-
case "error":
|
|
39
|
-
console.error(message);
|
|
40
|
-
break;
|
|
41
|
-
case "warning":
|
|
42
|
-
console.warn(message);
|
|
43
|
-
break;
|
|
44
|
-
}
|
|
45
|
-
setHasLogged(true);
|
|
46
|
-
}
|
|
47
|
-
}, [condition]);
|
|
48
|
-
};
|
|
49
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
-
0 && (module.exports = {
|
|
51
|
-
useLogOnce
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=useLogOnce.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/useLogOnce.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\ntype OptionsResolved = {\n type?: 'info' | 'error' | 'warning',\n}\n\nconst defaultOptions: OptionsResolved = {\n type: 'warning',\n}\n\ntype Options = Partial<OptionsResolved>\n\nexport const useLogOnce = (\n message: string,\n condition: boolean,\n options?: Options\n) => {\n const [hasLogged, setHasLogged] = useState<boolean>(false)\n const { type } = { ...defaultOptions, ...options }\n\n useEffect(() => {\n if (!hasLogged && condition) {\n switch (type) {\n case 'info':\n console.info(message)\n break\n case 'error':\n console.error(message)\n break\n case 'warning':\n console.warn(message)\n break\n }\n setHasLogged(true)\n }\n }, [condition]) // eslint-disable-line react-hooks/exhaustive-deps\n}"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAoC;AAMpC,IAAM,iBAAkC;AAAA,EACtC,MAAM;AACR;AAIO,IAAM,aAAa,CACxB,SACA,WACA,YACG;AACH,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAkB,KAAK;AACzD,QAAM,EAAE,KAAK,IAAI,EAAE,GAAG,gBAAgB,GAAG,QAAQ;AAEjD,8BAAU,MAAM;AACd,QAAI,CAAC,aAAa,WAAW;AAC3B,cAAQ,MAAM;AAAA,QACZ,KAAK;AACH,kBAAQ,KAAK,OAAO;AACpB;AAAA,QACF,KAAK;AACH,kBAAQ,MAAM,OAAO;AACrB;AAAA,QACF,KAAK;AACH,kBAAQ,KAAK,OAAO;AACpB;AAAA,MACJ;AACA,mBAAa,IAAI;AAAA,IACnB;AAAA,EACF,GAAG,CAAC,SAAS,CAAC;AAChB;","names":[]}
|