@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,2124 +0,0 @@
|
|
|
1
|
-
// src/components/dialog/Dialog.tsx
|
|
2
|
-
import { useId as useId2 } from "react";
|
|
3
|
-
import { useEffect as useEffect5, useRef as useRef2, useState as useState6 } from "react";
|
|
4
|
-
import clsx2 from "clsx";
|
|
5
|
-
import { X } from "lucide-react";
|
|
6
|
-
|
|
7
|
-
// src/i18n/LocaleProvider.tsx
|
|
8
|
-
import { createContext, useContext, useEffect, useMemo, useState as useState2 } from "react";
|
|
9
|
-
|
|
10
|
-
// src/hooks/useLocalStorage.ts
|
|
11
|
-
import { useCallback, useState } from "react";
|
|
12
|
-
|
|
13
|
-
// src/utils/resolveSetState.ts
|
|
14
|
-
function resolveSetState(action, prev) {
|
|
15
|
-
return typeof action === "function" ? action(prev) : action;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// src/i18n/translations.ts
|
|
19
|
-
import { TranslationGen } from "@helpwave/internationalization";
|
|
20
|
-
var hightideTranslationLocales = ["de-DE", "en-US"];
|
|
21
|
-
var hightideTranslation = {
|
|
22
|
-
"de-DE": {
|
|
23
|
-
"add": `Hinzuf\xFCgen`,
|
|
24
|
-
"age": `Alter`,
|
|
25
|
-
"all": `Alle`,
|
|
26
|
-
"apply": `Anwenden`,
|
|
27
|
-
"back": `Zur\xFCck`,
|
|
28
|
-
"cancel": `Abbrechen`,
|
|
29
|
-
"carousel": `Karussell`,
|
|
30
|
-
"change": `\xC4ndern`,
|
|
31
|
-
"chooseLanguage": `W\xE4hle deine bevorzugte Sprache`,
|
|
32
|
-
"chooseSlide": `W\xE4hle die angezeigte Slide aus`,
|
|
33
|
-
"chooseTheme": `W\xE4hle dein bevorzugtes Farbschema.`,
|
|
34
|
-
"clear": `L\xF6schen`,
|
|
35
|
-
"click": `Klicken`,
|
|
36
|
-
"clickToCopy": `Zum kopieren klicken`,
|
|
37
|
-
"clickToSelect": `Zum Ausw\xE4hlen dr\xFCcken`,
|
|
38
|
-
"close": `Schlie\xDFen`,
|
|
39
|
-
"confirm": `Best\xE4tigen`,
|
|
40
|
-
"copied": `Kopiert`,
|
|
41
|
-
"copy": `Kopieren`,
|
|
42
|
-
"create": `Erstellen`,
|
|
43
|
-
"decline": `Ablehnen`,
|
|
44
|
-
"delete": `L\xF6schen`,
|
|
45
|
-
"discard": `Verwerfen`,
|
|
46
|
-
"discardChanges": `\xC4nderungen Verwerfen`,
|
|
47
|
-
"done": `Fertig`,
|
|
48
|
-
"edit": `Bearbeiten`,
|
|
49
|
-
"endDate": `Ende`,
|
|
50
|
-
"enterText": `Text hier eingeben`,
|
|
51
|
-
"entryDate": `Eintragsdatum`,
|
|
52
|
-
"error": `Fehler`,
|
|
53
|
-
"errorOccurred": `Ein Fehler ist aufgetreten`,
|
|
54
|
-
"exit": `Beenden`,
|
|
55
|
-
"fieldRequiredError": `Dieses Feld ist erforderlich.`,
|
|
56
|
-
"filter": `Filter`,
|
|
57
|
-
"gender": ({ gender }) => {
|
|
58
|
-
return TranslationGen.resolveSelect(gender, {
|
|
59
|
-
"male": `M\xE4nnlich`,
|
|
60
|
-
"female": `Weiblich`,
|
|
61
|
-
"other": `Divers`
|
|
62
|
-
});
|
|
63
|
-
},
|
|
64
|
-
"goodToSeeYou": `Sch\xF6n dich zu sehen`,
|
|
65
|
-
"identifier": `Identifikator`,
|
|
66
|
-
"invalidEmail": `Die E-Mail ist ung\xFCltig.`,
|
|
67
|
-
"invalidEmailError": `Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.`,
|
|
68
|
-
"language": `Sprache`,
|
|
69
|
-
"less": `Weniger`,
|
|
70
|
-
"loading": `L\xE4dt`,
|
|
71
|
-
"locale": `Locale`,
|
|
72
|
-
"max": `Max`,
|
|
73
|
-
"maxLengthError": `Maximale L\xE4nge \xFCberschritten.`,
|
|
74
|
-
"min": `Min`,
|
|
75
|
-
"minLengthError": `Mindestl\xE4nge nicht erreicht.`,
|
|
76
|
-
"more": `Mehr`,
|
|
77
|
-
"name": `Name`,
|
|
78
|
-
"next": `Weiter`,
|
|
79
|
-
"no": `Nein`,
|
|
80
|
-
"none": `Nichts`,
|
|
81
|
-
"notEmpty": `Das Feld darf nicht leer sein.`,
|
|
82
|
-
"nothingFound": `Nichts gefunden`,
|
|
83
|
-
"of": `von`,
|
|
84
|
-
"optional": `Optional`,
|
|
85
|
-
"outOfRangeNumber": ({ min, max }) => {
|
|
86
|
-
return `Der Wert muss zwischen ${min} und ${max} liegen.`;
|
|
87
|
-
},
|
|
88
|
-
"outOfRangeSelectionItems": ({ min, max }) => {
|
|
89
|
-
return `Es m\xFCssen zwischen ${min} und ${max} Elemente ausgew\xE4hlt werden.`;
|
|
90
|
-
},
|
|
91
|
-
"outOfRangeString": ({ min, max }) => {
|
|
92
|
-
return `Der Wert muss zwischen ${min} und ${max} Zeichen lang sein.`;
|
|
93
|
-
},
|
|
94
|
-
"pleaseWait": `Bitte warten...`,
|
|
95
|
-
"previous": `Vorherige`,
|
|
96
|
-
"remove": `Entfernen`,
|
|
97
|
-
"required": `Erforderlich`,
|
|
98
|
-
"reset": `Zur\xFCcksetzen`,
|
|
99
|
-
"save": `Speichern`,
|
|
100
|
-
"saved": `Gespeichert`,
|
|
101
|
-
"search": `Suche`,
|
|
102
|
-
"select": `Select`,
|
|
103
|
-
"selectOption": `Option ausw\xE4hlen`,
|
|
104
|
-
"show": `Anzeigen`,
|
|
105
|
-
"showLess": `Weniger anzeigen`,
|
|
106
|
-
"showMore": `Mehr anzeigen`,
|
|
107
|
-
"showSlide": ({ index }) => {
|
|
108
|
-
return `Zeige Slide ${index}`;
|
|
109
|
-
},
|
|
110
|
-
"slide": `Slide`,
|
|
111
|
-
"slideNavigation": `Slide Navigation`,
|
|
112
|
-
"slideOf": ({ index, length }) => {
|
|
113
|
-
return `Slide ${index} von ${length} slides`;
|
|
114
|
-
},
|
|
115
|
-
"startDate": `Start`,
|
|
116
|
-
"street": `Stra\xDFe`,
|
|
117
|
-
"submit": `Abschicken`,
|
|
118
|
-
"success": `Erfolg`,
|
|
119
|
-
"text": `Text`,
|
|
120
|
-
"themeMode": ({ theme }) => {
|
|
121
|
-
return TranslationGen.resolveSelect(theme, {
|
|
122
|
-
"dark": `Dunkel`,
|
|
123
|
-
"light": `Hell`,
|
|
124
|
-
"system": `System`
|
|
125
|
-
});
|
|
126
|
-
},
|
|
127
|
-
"themes": ({ count }) => {
|
|
128
|
-
return TranslationGen.resolveSelect(count, {
|
|
129
|
-
"=1": `Farbschema`,
|
|
130
|
-
"other": `Farbschemas`
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
"time.ago": `vor`,
|
|
134
|
-
"time.agoDays": ({ days }) => {
|
|
135
|
-
return `var ${days} Tagen`;
|
|
136
|
-
},
|
|
137
|
-
"time.april": `April`,
|
|
138
|
-
"time.august": `August`,
|
|
139
|
-
"time.century": ({ count }) => {
|
|
140
|
-
return TranslationGen.resolveSelect(count, {
|
|
141
|
-
"=1": `Jahrhundert`,
|
|
142
|
-
"other": `Jahrhunderte`
|
|
143
|
-
});
|
|
144
|
-
},
|
|
145
|
-
"time.day": ({ count }) => {
|
|
146
|
-
return TranslationGen.resolveSelect(count, {
|
|
147
|
-
"=1": `Tag`,
|
|
148
|
-
"other": `Tage`
|
|
149
|
-
});
|
|
150
|
-
},
|
|
151
|
-
"time.decade": ({ count }) => {
|
|
152
|
-
return TranslationGen.resolveSelect(count, {
|
|
153
|
-
"=1": `Jahrzehnt`,
|
|
154
|
-
"other": `Jahrzehnte`
|
|
155
|
-
});
|
|
156
|
-
},
|
|
157
|
-
"time.december": `December`,
|
|
158
|
-
"time.february": `Febuar`,
|
|
159
|
-
"time.hour": ({ count }) => {
|
|
160
|
-
return TranslationGen.resolveSelect(count, {
|
|
161
|
-
"=1": `Stunde`,
|
|
162
|
-
"other": `Stunden`
|
|
163
|
-
});
|
|
164
|
-
},
|
|
165
|
-
"time.in": `in`,
|
|
166
|
-
"time.inDays": ({ days }) => {
|
|
167
|
-
return `in ${days} Tagen`;
|
|
168
|
-
},
|
|
169
|
-
"time.january": `Januar`,
|
|
170
|
-
"time.july": `Juli`,
|
|
171
|
-
"time.june": `Juni`,
|
|
172
|
-
"time.march": `M\xE4rz`,
|
|
173
|
-
"time.may": `Mai`,
|
|
174
|
-
"time.microsecond": ({ count }) => {
|
|
175
|
-
return TranslationGen.resolveSelect(count, {
|
|
176
|
-
"=1": `Mikrosekunde`,
|
|
177
|
-
"other": `Mikrosekunden`
|
|
178
|
-
});
|
|
179
|
-
},
|
|
180
|
-
"time.millisecond": ({ count }) => {
|
|
181
|
-
return TranslationGen.resolveSelect(count, {
|
|
182
|
-
"=1": `Millisekunde`,
|
|
183
|
-
"other": `Millisekunden`
|
|
184
|
-
});
|
|
185
|
-
},
|
|
186
|
-
"time.minute": ({ count }) => {
|
|
187
|
-
return TranslationGen.resolveSelect(count, {
|
|
188
|
-
"=1": `Minute`,
|
|
189
|
-
"other": `Minuten`
|
|
190
|
-
});
|
|
191
|
-
},
|
|
192
|
-
"time.month": ({ count }) => {
|
|
193
|
-
return TranslationGen.resolveSelect(count, {
|
|
194
|
-
"=1": `Monat`,
|
|
195
|
-
"other": `Monate`
|
|
196
|
-
});
|
|
197
|
-
},
|
|
198
|
-
"time.monthName": ({ month }) => {
|
|
199
|
-
return TranslationGen.resolveSelect(month, {
|
|
200
|
-
"january": `Januar`,
|
|
201
|
-
"february": `Februar`,
|
|
202
|
-
"march": `M\xE4rz`,
|
|
203
|
-
"april": `April`,
|
|
204
|
-
"may": `Mai`,
|
|
205
|
-
"june": `Juni`,
|
|
206
|
-
"july": `Juli`,
|
|
207
|
-
"august": `August`,
|
|
208
|
-
"september": `September`,
|
|
209
|
-
"october": `Oktober`,
|
|
210
|
-
"november": `November`,
|
|
211
|
-
"december": `Dezember`,
|
|
212
|
-
"other": `Unbekannter Monat`
|
|
213
|
-
});
|
|
214
|
-
},
|
|
215
|
-
"time.nanosecond": ({ count }) => {
|
|
216
|
-
return TranslationGen.resolveSelect(count, {
|
|
217
|
-
"=1": `Nanosekunde`,
|
|
218
|
-
"other": `Nanosekunden`
|
|
219
|
-
});
|
|
220
|
-
},
|
|
221
|
-
"time.november": `November`,
|
|
222
|
-
"time.october": `October`,
|
|
223
|
-
"time.second": ({ count }) => {
|
|
224
|
-
return TranslationGen.resolveSelect(count, {
|
|
225
|
-
"=1": `Sekunde`,
|
|
226
|
-
"other": `Sekunden`
|
|
227
|
-
});
|
|
228
|
-
},
|
|
229
|
-
"time.september": `September`,
|
|
230
|
-
"time.today": `Heute`,
|
|
231
|
-
"time.tomorrow": `Morgen`,
|
|
232
|
-
"time.year": ({ count }) => {
|
|
233
|
-
return TranslationGen.resolveSelect(count, {
|
|
234
|
-
"=1": `Jahr`,
|
|
235
|
-
"other": `Jahre`
|
|
236
|
-
});
|
|
237
|
-
},
|
|
238
|
-
"time.yesterday": `Gestern`,
|
|
239
|
-
"tooFewSelectionItems": ({ min }) => {
|
|
240
|
-
return `Es m\xFCssen mindestens ${min} Elemente ausgew\xE4hlt werden.`;
|
|
241
|
-
},
|
|
242
|
-
"tooLong": ({ max }) => {
|
|
243
|
-
return `Der Wert darf h\xF6chstens ${max} Zeichen enthalten.`;
|
|
244
|
-
},
|
|
245
|
-
"tooManySelectionItems": ({ max }) => {
|
|
246
|
-
return `Es m\xFCssen maximal ${max} Elemente ausgew\xE4hlt werden.`;
|
|
247
|
-
},
|
|
248
|
-
"tooShort": ({ min }) => {
|
|
249
|
-
return `Der Wert muss mindestens ${min} Zeichen enthalten.`;
|
|
250
|
-
},
|
|
251
|
-
"unsavedChanges": `Ungespeicherte \xC4nderungen`,
|
|
252
|
-
"unsavedChangesSaveQuestion": `M\xF6chtest du die \xC4nderungen speichern?`,
|
|
253
|
-
"update": `Update`,
|
|
254
|
-
"value": `Wert`,
|
|
255
|
-
"welcome": `Willkommen`,
|
|
256
|
-
"yes": `Ja`
|
|
257
|
-
},
|
|
258
|
-
"en-US": {
|
|
259
|
-
"add": `Add`,
|
|
260
|
-
"age": `Age`,
|
|
261
|
-
"all": `All`,
|
|
262
|
-
"apply": `Apply`,
|
|
263
|
-
"back": `Back`,
|
|
264
|
-
"cancel": `Cancel`,
|
|
265
|
-
"carousel": `Carousel`,
|
|
266
|
-
"change": `Change`,
|
|
267
|
-
"chooseLanguage": `Choose your language`,
|
|
268
|
-
"chooseSlide": `Choose slide to display`,
|
|
269
|
-
"chooseTheme": `Choose your preferred color theme.`,
|
|
270
|
-
"clear": `Clear`,
|
|
271
|
-
"click": `Click`,
|
|
272
|
-
"clickToCopy": `Click to Copy`,
|
|
273
|
-
"clickToSelect": `Click to select`,
|
|
274
|
-
"close": `Close`,
|
|
275
|
-
"confirm": `Confirm`,
|
|
276
|
-
"copied": `Copied`,
|
|
277
|
-
"copy": `Copy`,
|
|
278
|
-
"create": `Create`,
|
|
279
|
-
"decline": `Decline`,
|
|
280
|
-
"delete": `Delete`,
|
|
281
|
-
"discard": `Discard`,
|
|
282
|
-
"discardChanges": `Discard Changes`,
|
|
283
|
-
"done": `Done`,
|
|
284
|
-
"edit": `Edit`,
|
|
285
|
-
"endDate": `End`,
|
|
286
|
-
"enterText": `Enter text here`,
|
|
287
|
-
"entryDate": `Entry Date`,
|
|
288
|
-
"error": `Error`,
|
|
289
|
-
"errorOccurred": `An error occurred`,
|
|
290
|
-
"exit": `Exit`,
|
|
291
|
-
"fieldRequiredError": `This field is required.`,
|
|
292
|
-
"filter": `Filter`,
|
|
293
|
-
"gender": ({ gender }) => {
|
|
294
|
-
return TranslationGen.resolveSelect(gender, {
|
|
295
|
-
"male": `Male`,
|
|
296
|
-
"female": `Female`,
|
|
297
|
-
"other": `Other`
|
|
298
|
-
});
|
|
299
|
-
},
|
|
300
|
-
"goodToSeeYou": `Good to see you`,
|
|
301
|
-
"identifier": `Identifier`,
|
|
302
|
-
"invalidEmail": `The email is not valid.`,
|
|
303
|
-
"invalidEmailError": `Please enter a valid email address.`,
|
|
304
|
-
"language": `Language`,
|
|
305
|
-
"less": `Less`,
|
|
306
|
-
"loading": `Loading`,
|
|
307
|
-
"locale": `Locale`,
|
|
308
|
-
"max": `Max`,
|
|
309
|
-
"maxLengthError": `Maximum length exceeded.`,
|
|
310
|
-
"min": `Min`,
|
|
311
|
-
"minLengthError": `Minimum length not met.`,
|
|
312
|
-
"more": `More`,
|
|
313
|
-
"name": `Name`,
|
|
314
|
-
"next": `Next`,
|
|
315
|
-
"no": `No`,
|
|
316
|
-
"none": `None`,
|
|
317
|
-
"notEmpty": `The field cannot be empty.`,
|
|
318
|
-
"nothingFound": `Nothing found`,
|
|
319
|
-
"of": `of`,
|
|
320
|
-
"optional": `Optional`,
|
|
321
|
-
"outOfRangeNumber": ({ min, max }) => {
|
|
322
|
-
return `The value must be between ${min} and ${max}.`;
|
|
323
|
-
},
|
|
324
|
-
"outOfRangeSelectionItems": ({ min, max }) => {
|
|
325
|
-
return `Between ${min} and ${max} items must be selected.`;
|
|
326
|
-
},
|
|
327
|
-
"outOfRangeString": ({ min, max }) => {
|
|
328
|
-
return `The value needs to have between ${min} and ${max} characters.`;
|
|
329
|
-
},
|
|
330
|
-
"pleaseWait": `Please wait...`,
|
|
331
|
-
"previous": `Previous`,
|
|
332
|
-
"remove": `Remove`,
|
|
333
|
-
"required": `Required`,
|
|
334
|
-
"reset": `Reset`,
|
|
335
|
-
"save": `Save`,
|
|
336
|
-
"saved": `Saved`,
|
|
337
|
-
"search": `Search`,
|
|
338
|
-
"select": `Select`,
|
|
339
|
-
"selectOption": `Select an option`,
|
|
340
|
-
"show": `Show`,
|
|
341
|
-
"showLess": `Show less`,
|
|
342
|
-
"showMore": `Show more`,
|
|
343
|
-
"showSlide": ({ index }) => {
|
|
344
|
-
return `Show Slide ${index}`;
|
|
345
|
-
},
|
|
346
|
-
"slide": `Slide`,
|
|
347
|
-
"slideNavigation": `Slide navigation`,
|
|
348
|
-
"slideOf": ({ index, length }) => {
|
|
349
|
-
return `Slide ${index} of ${length} slides`;
|
|
350
|
-
},
|
|
351
|
-
"startDate": `Start`,
|
|
352
|
-
"street": `Street`,
|
|
353
|
-
"submit": `Submit`,
|
|
354
|
-
"success": `Success`,
|
|
355
|
-
"text": `Text`,
|
|
356
|
-
"themeMode": ({ theme }) => {
|
|
357
|
-
return TranslationGen.resolveSelect(theme, {
|
|
358
|
-
"dark": `Dark`,
|
|
359
|
-
"light": `Light`,
|
|
360
|
-
"system": `System`
|
|
361
|
-
});
|
|
362
|
-
},
|
|
363
|
-
"themes": ({ count }) => {
|
|
364
|
-
return TranslationGen.resolveSelect(count, {
|
|
365
|
-
"=1": `Theme`,
|
|
366
|
-
"other": `Themes`
|
|
367
|
-
});
|
|
368
|
-
},
|
|
369
|
-
"time.ago": `ago`,
|
|
370
|
-
"time.agoDays": ({ days }) => {
|
|
371
|
-
return `days ${days} ago`;
|
|
372
|
-
},
|
|
373
|
-
"time.april": `April`,
|
|
374
|
-
"time.august": `August`,
|
|
375
|
-
"time.century": ({ count }) => {
|
|
376
|
-
return TranslationGen.resolveSelect(count, {
|
|
377
|
-
"=1": `Century`,
|
|
378
|
-
"other": `Centuries`
|
|
379
|
-
});
|
|
380
|
-
},
|
|
381
|
-
"time.day": ({ count }) => {
|
|
382
|
-
return TranslationGen.resolveSelect(count, {
|
|
383
|
-
"=1": `Day`,
|
|
384
|
-
"other": `Days`
|
|
385
|
-
});
|
|
386
|
-
},
|
|
387
|
-
"time.decade": ({ count }) => {
|
|
388
|
-
return TranslationGen.resolveSelect(count, {
|
|
389
|
-
"=1": `Decade`,
|
|
390
|
-
"other": `Decades`
|
|
391
|
-
});
|
|
392
|
-
},
|
|
393
|
-
"time.december": `December`,
|
|
394
|
-
"time.february": `Febuary`,
|
|
395
|
-
"time.hour": ({ count }) => {
|
|
396
|
-
return TranslationGen.resolveSelect(count, {
|
|
397
|
-
"=1": `Hour`,
|
|
398
|
-
"other": `Hours`
|
|
399
|
-
});
|
|
400
|
-
},
|
|
401
|
-
"time.in": `in`,
|
|
402
|
-
"time.inDays": ({ days }) => {
|
|
403
|
-
return `in ${days} days`;
|
|
404
|
-
},
|
|
405
|
-
"time.january": `January`,
|
|
406
|
-
"time.july": `July`,
|
|
407
|
-
"time.june": `June`,
|
|
408
|
-
"time.march": `March`,
|
|
409
|
-
"time.may": `May`,
|
|
410
|
-
"time.microsecond": ({ count }) => {
|
|
411
|
-
return TranslationGen.resolveSelect(count, {
|
|
412
|
-
"=1": `Microsecond`,
|
|
413
|
-
"other": `Microseconds`
|
|
414
|
-
});
|
|
415
|
-
},
|
|
416
|
-
"time.millisecond": ({ count }) => {
|
|
417
|
-
return TranslationGen.resolveSelect(count, {
|
|
418
|
-
"=1": `Millisecond`,
|
|
419
|
-
"other": `Milliseconds`
|
|
420
|
-
});
|
|
421
|
-
},
|
|
422
|
-
"time.minute": ({ count }) => {
|
|
423
|
-
return TranslationGen.resolveSelect(count, {
|
|
424
|
-
"=1": `Minute`,
|
|
425
|
-
"other": `Minutes`
|
|
426
|
-
});
|
|
427
|
-
},
|
|
428
|
-
"time.month": ({ count }) => {
|
|
429
|
-
return TranslationGen.resolveSelect(count, {
|
|
430
|
-
"=1": `Month`,
|
|
431
|
-
"other": `Months`
|
|
432
|
-
});
|
|
433
|
-
},
|
|
434
|
-
"time.monthName": ({ month }) => {
|
|
435
|
-
return TranslationGen.resolveSelect(month, {
|
|
436
|
-
"january": `January`,
|
|
437
|
-
"february": `February`,
|
|
438
|
-
"march": `March`,
|
|
439
|
-
"april": `April`,
|
|
440
|
-
"may": `May`,
|
|
441
|
-
"june": `June`,
|
|
442
|
-
"july": `July`,
|
|
443
|
-
"august": `August`,
|
|
444
|
-
"september": `September`,
|
|
445
|
-
"october": `October`,
|
|
446
|
-
"november": `November`,
|
|
447
|
-
"december": `December`,
|
|
448
|
-
"other": `Unknown Month`
|
|
449
|
-
});
|
|
450
|
-
},
|
|
451
|
-
"time.nanosecond": ({ count }) => {
|
|
452
|
-
return TranslationGen.resolveSelect(count, {
|
|
453
|
-
"=1": `Nanosecond`,
|
|
454
|
-
"other": `Nanoseconds`
|
|
455
|
-
});
|
|
456
|
-
},
|
|
457
|
-
"time.november": `November`,
|
|
458
|
-
"time.october": `October`,
|
|
459
|
-
"time.second": ({ count }) => {
|
|
460
|
-
return TranslationGen.resolveSelect(count, {
|
|
461
|
-
"=1": `Second`,
|
|
462
|
-
"other": `Seconds`
|
|
463
|
-
});
|
|
464
|
-
},
|
|
465
|
-
"time.september": `September`,
|
|
466
|
-
"time.today": `Today`,
|
|
467
|
-
"time.tomorrow": `Tomorrow`,
|
|
468
|
-
"time.year": ({ count }) => {
|
|
469
|
-
return TranslationGen.resolveSelect(count, {
|
|
470
|
-
"=1": `Year`,
|
|
471
|
-
"other": `Years`
|
|
472
|
-
});
|
|
473
|
-
},
|
|
474
|
-
"time.yesterday": `Yesterday`,
|
|
475
|
-
"tooFewSelectionItems": ({ min }) => {
|
|
476
|
-
return `Select at least ${min} items.`;
|
|
477
|
-
},
|
|
478
|
-
"tooLong": ({ max }) => {
|
|
479
|
-
return `The value requires less than ${max} characters.`;
|
|
480
|
-
},
|
|
481
|
-
"tooManySelectionItems": ({ max }) => {
|
|
482
|
-
return `Select at most ${max} items.`;
|
|
483
|
-
},
|
|
484
|
-
"tooShort": ({ min }) => {
|
|
485
|
-
return `The value requires at least ${min} characters.`;
|
|
486
|
-
},
|
|
487
|
-
"unsavedChanges": `Unsaved Changes`,
|
|
488
|
-
"unsavedChangesSaveQuestion": `Do you want to save your changes?`,
|
|
489
|
-
"update": `Update`,
|
|
490
|
-
"value": `Value`,
|
|
491
|
-
"welcome": `Welcome`,
|
|
492
|
-
"yes": `Yes`
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
|
|
496
|
-
// src/i18n/util.ts
|
|
497
|
-
var localsNames = {
|
|
498
|
-
"en-US": "English (US)",
|
|
499
|
-
"de-DE": "Deutsch"
|
|
500
|
-
};
|
|
501
|
-
var DEFAULT_LOCALE = "en-US";
|
|
502
|
-
function localeToLanguage(locale) {
|
|
503
|
-
return locale.split("-")[0];
|
|
504
|
-
}
|
|
505
|
-
var LocalizationUtil = {
|
|
506
|
-
locals: hightideTranslationLocales,
|
|
507
|
-
localToLanguage: localeToLanguage,
|
|
508
|
-
DEFAULT_LOCALE,
|
|
509
|
-
languagesLocalNames: localsNames
|
|
510
|
-
};
|
|
511
|
-
|
|
512
|
-
// src/i18n/LocaleProvider.tsx
|
|
513
|
-
import { jsx } from "react/jsx-runtime";
|
|
514
|
-
var LocaleContext = createContext({
|
|
515
|
-
locale: LocalizationUtil.DEFAULT_LOCALE,
|
|
516
|
-
setLocale: (v) => v
|
|
517
|
-
});
|
|
518
|
-
var useLocale = () => {
|
|
519
|
-
const context = useContext(LocaleContext);
|
|
520
|
-
if (!context) {
|
|
521
|
-
throw new Error("useLocale must be used within LocaleContext. Try adding a LocaleProvider around your app.");
|
|
522
|
-
}
|
|
523
|
-
return context;
|
|
524
|
-
};
|
|
525
|
-
|
|
526
|
-
// src/i18n/useHightideTranslation.ts
|
|
527
|
-
import { combineTranslation, ICUUtil } from "@helpwave/internationalization";
|
|
528
|
-
|
|
529
|
-
// src/utils/array.ts
|
|
530
|
-
var moveItems = (list, move = 0) => {
|
|
531
|
-
const result = [];
|
|
532
|
-
let start = move;
|
|
533
|
-
if (start < 0) {
|
|
534
|
-
start = list.length - move;
|
|
535
|
-
}
|
|
536
|
-
start = start % list.length;
|
|
537
|
-
for (let i = 0; i < list.length; i++) {
|
|
538
|
-
result[i] = list[(i + start) % list.length];
|
|
539
|
-
}
|
|
540
|
-
return result;
|
|
541
|
-
};
|
|
542
|
-
function resolveSingleOrArray(value) {
|
|
543
|
-
if (Array.isArray(value)) {
|
|
544
|
-
return value;
|
|
545
|
-
} else if (value) {
|
|
546
|
-
return [value];
|
|
547
|
-
}
|
|
548
|
-
return [];
|
|
549
|
-
}
|
|
550
|
-
var ArrayUtil = {
|
|
551
|
-
unique: (list) => {
|
|
552
|
-
const seen = /* @__PURE__ */ new Set();
|
|
553
|
-
return list.filter((item) => {
|
|
554
|
-
if (seen.has(item)) {
|
|
555
|
-
return false;
|
|
556
|
-
}
|
|
557
|
-
seen.add(item);
|
|
558
|
-
return true;
|
|
559
|
-
});
|
|
560
|
-
},
|
|
561
|
-
difference: (list, removeList) => {
|
|
562
|
-
const remove = new Set(removeList);
|
|
563
|
-
return list.filter((item) => !remove.has(item));
|
|
564
|
-
},
|
|
565
|
-
moveItems,
|
|
566
|
-
resolveSingleOrArray
|
|
567
|
-
};
|
|
568
|
-
|
|
569
|
-
// src/i18n/useHightideTranslation.ts
|
|
570
|
-
function useHightideTranslation(extensions, overwrites) {
|
|
571
|
-
const { locale: inferredLocale } = useLocale();
|
|
572
|
-
const locale = overwrites?.locale ?? inferredLocale;
|
|
573
|
-
const translationExtensions = ArrayUtil.resolveSingleOrArray(extensions);
|
|
574
|
-
return combineTranslation([
|
|
575
|
-
...translationExtensions,
|
|
576
|
-
hightideTranslation
|
|
577
|
-
], locale);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
// src/components/user-action/Button.tsx
|
|
581
|
-
import { forwardRef } from "react";
|
|
582
|
-
import clsx from "clsx";
|
|
583
|
-
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
584
|
-
var ButtonColorUtil = {
|
|
585
|
-
solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
|
|
586
|
-
text: ["primary", "negative", "neutral"],
|
|
587
|
-
outline: ["primary"]
|
|
588
|
-
};
|
|
589
|
-
var IconButtonUtil = {
|
|
590
|
-
icon: [...ButtonColorUtil.solid, "transparent"]
|
|
591
|
-
};
|
|
592
|
-
var paddingMapping = {
|
|
593
|
-
none: "",
|
|
594
|
-
small: "btn-sm",
|
|
595
|
-
medium: "btn-md",
|
|
596
|
-
large: "btn-lg"
|
|
597
|
-
};
|
|
598
|
-
var iconPaddingMapping = {
|
|
599
|
-
none: "",
|
|
600
|
-
tiny: "icon-btn-xs",
|
|
601
|
-
small: "icon-btn-sm",
|
|
602
|
-
medium: "icon-btn-md",
|
|
603
|
-
large: "icon-btn-lg"
|
|
604
|
-
};
|
|
605
|
-
var ButtonUtil = {
|
|
606
|
-
paddingMapping,
|
|
607
|
-
iconPaddingMapping
|
|
608
|
-
};
|
|
609
|
-
var SolidButton = forwardRef(function SolidButton2({
|
|
610
|
-
children,
|
|
611
|
-
color = "primary",
|
|
612
|
-
size = "medium",
|
|
613
|
-
startIcon,
|
|
614
|
-
endIcon,
|
|
615
|
-
onClick,
|
|
616
|
-
className,
|
|
617
|
-
...restProps
|
|
618
|
-
}, ref) {
|
|
619
|
-
const colorClasses = {
|
|
620
|
-
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
621
|
-
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
622
|
-
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
623
|
-
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
624
|
-
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
625
|
-
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
626
|
-
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
|
|
627
|
-
}[color];
|
|
628
|
-
const iconColorClasses = {
|
|
629
|
-
primary: "not-group-disabled:text-button-solid-primary-icon",
|
|
630
|
-
secondary: "not-group-disabled:text-button-solid-secondary-icon",
|
|
631
|
-
tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
|
|
632
|
-
positive: "not-group-disabled:text-button-solid-positive-icon",
|
|
633
|
-
warning: "not-group-disabled:text-button-solid-warning-icon",
|
|
634
|
-
negative: "not-group-disabled:text-button-solid-negative-icon",
|
|
635
|
-
neutral: "not-group-disabled:text-button-solid-neutral-icon"
|
|
636
|
-
}[color];
|
|
637
|
-
return /* @__PURE__ */ jsxs(
|
|
638
|
-
"button",
|
|
639
|
-
{
|
|
640
|
-
ref,
|
|
641
|
-
onClick,
|
|
642
|
-
className: clsx(
|
|
643
|
-
"group font-semibold",
|
|
644
|
-
colorClasses,
|
|
645
|
-
"not-disabled:hover:brightness-90",
|
|
646
|
-
"disabled:text-disabled disabled:bg-disabled-background",
|
|
647
|
-
ButtonUtil.paddingMapping[size],
|
|
648
|
-
className
|
|
649
|
-
),
|
|
650
|
-
...restProps,
|
|
651
|
-
children: [
|
|
652
|
-
startIcon && /* @__PURE__ */ jsx2(
|
|
653
|
-
"span",
|
|
654
|
-
{
|
|
655
|
-
className: clsx(
|
|
656
|
-
iconColorClasses,
|
|
657
|
-
"group-disabled:text-disabled-icon"
|
|
658
|
-
),
|
|
659
|
-
children: startIcon
|
|
660
|
-
}
|
|
661
|
-
),
|
|
662
|
-
children,
|
|
663
|
-
endIcon && /* @__PURE__ */ jsx2(
|
|
664
|
-
"span",
|
|
665
|
-
{
|
|
666
|
-
className: clsx(
|
|
667
|
-
iconColorClasses,
|
|
668
|
-
"group-disabled:text-disabled-icon"
|
|
669
|
-
),
|
|
670
|
-
children: endIcon
|
|
671
|
-
}
|
|
672
|
-
)
|
|
673
|
-
]
|
|
674
|
-
}
|
|
675
|
-
);
|
|
676
|
-
});
|
|
677
|
-
var TextButton = ({
|
|
678
|
-
children,
|
|
679
|
-
color = "neutral",
|
|
680
|
-
size = "medium",
|
|
681
|
-
startIcon,
|
|
682
|
-
endIcon,
|
|
683
|
-
onClick,
|
|
684
|
-
coloredHoverBackground = true,
|
|
685
|
-
className,
|
|
686
|
-
...restProps
|
|
687
|
-
}) => {
|
|
688
|
-
const colorClasses = {
|
|
689
|
-
primary: "not-disabled:bg-transparent not-disabled:text-button-text-primary-text not-disabled:focus-visible:outline-button-text-primary-text",
|
|
690
|
-
negative: "not-disabled:bg-transparent not-disabled:text-button-text-negative-text not-disabled:focus-visible:outline-button-text-negative-text",
|
|
691
|
-
neutral: "not-disabled:bg-transparent not-disabled:text-button-text-neutral-text not-disabled:focus-visible:outline-button-text-neutral-text"
|
|
692
|
-
}[color];
|
|
693
|
-
const backgroundColor = {
|
|
694
|
-
primary: "not-disabled:hover:bg-button-text-primary-text/20 not-disabled:focus-visible:bg-button-text-primary-text/20",
|
|
695
|
-
negative: "not-disabled:hover:bg-button-text-negative-text/20 not-disabled:focus-visible:bg-button-text-negative-text/20",
|
|
696
|
-
neutral: "not-disabled:hover:bg-button-text-neutral-text/20 not-disabled:focus-visible:bg-button-text-neutral-text/20"
|
|
697
|
-
}[color];
|
|
698
|
-
const iconColorClasses = {
|
|
699
|
-
primary: "not-group-disabled:text-button-text-primary-icon",
|
|
700
|
-
negative: "not-group-disabled:text-button-text-negative-icon",
|
|
701
|
-
neutral: "not-group-disabled:text-button-text-neutral-icon"
|
|
702
|
-
}[color];
|
|
703
|
-
return /* @__PURE__ */ jsxs(
|
|
704
|
-
"button",
|
|
705
|
-
{
|
|
706
|
-
onClick,
|
|
707
|
-
className: clsx(
|
|
708
|
-
"group font-semibold",
|
|
709
|
-
"disabled:text-disabled",
|
|
710
|
-
colorClasses,
|
|
711
|
-
{
|
|
712
|
-
[backgroundColor]: coloredHoverBackground,
|
|
713
|
-
"not-disabled:hover:bg-button-text-hover-background": !coloredHoverBackground
|
|
714
|
-
},
|
|
715
|
-
ButtonUtil.paddingMapping[size],
|
|
716
|
-
className
|
|
717
|
-
),
|
|
718
|
-
...restProps,
|
|
719
|
-
children: [
|
|
720
|
-
startIcon && /* @__PURE__ */ jsx2(
|
|
721
|
-
"span",
|
|
722
|
-
{
|
|
723
|
-
className: clsx(
|
|
724
|
-
iconColorClasses,
|
|
725
|
-
"group-disabled:text-disabled-icon"
|
|
726
|
-
),
|
|
727
|
-
children: startIcon
|
|
728
|
-
}
|
|
729
|
-
),
|
|
730
|
-
children,
|
|
731
|
-
endIcon && /* @__PURE__ */ jsx2(
|
|
732
|
-
"span",
|
|
733
|
-
{
|
|
734
|
-
className: clsx(
|
|
735
|
-
iconColorClasses,
|
|
736
|
-
"group-disabled:text-disabled-icon"
|
|
737
|
-
),
|
|
738
|
-
children: endIcon
|
|
739
|
-
}
|
|
740
|
-
)
|
|
741
|
-
]
|
|
742
|
-
}
|
|
743
|
-
);
|
|
744
|
-
};
|
|
745
|
-
var IconButton = forwardRef(function IconButton2({
|
|
746
|
-
children,
|
|
747
|
-
color = "primary",
|
|
748
|
-
size = "medium",
|
|
749
|
-
className,
|
|
750
|
-
...restProps
|
|
751
|
-
}, ref) {
|
|
752
|
-
const colorClasses = {
|
|
753
|
-
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
754
|
-
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
755
|
-
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
756
|
-
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
757
|
-
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
758
|
-
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
759
|
-
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
|
|
760
|
-
transparent: "not-disabled:bg-transparent"
|
|
761
|
-
}[color];
|
|
762
|
-
return /* @__PURE__ */ jsx2(
|
|
763
|
-
"button",
|
|
764
|
-
{
|
|
765
|
-
ref,
|
|
766
|
-
className: clsx(
|
|
767
|
-
colorClasses,
|
|
768
|
-
"not-disabled:hover:brightness-90",
|
|
769
|
-
"disabled:text-disabled",
|
|
770
|
-
{
|
|
771
|
-
"disabled:bg-disabled-background": color !== "transparent",
|
|
772
|
-
"disabled:opacity-70": color === "transparent",
|
|
773
|
-
"not-disabled:hover:bg-button-text-hover-background": color === "transparent"
|
|
774
|
-
},
|
|
775
|
-
ButtonUtil.iconPaddingMapping[size],
|
|
776
|
-
className
|
|
777
|
-
),
|
|
778
|
-
...restProps,
|
|
779
|
-
children
|
|
780
|
-
}
|
|
781
|
-
);
|
|
782
|
-
});
|
|
783
|
-
|
|
784
|
-
// src/hooks/focus/useFocusTrap.ts
|
|
785
|
-
import { useCallback as useCallback2, useEffect as useEffect3, useId, useRef, useState as useState4 } from "react";
|
|
786
|
-
|
|
787
|
-
// src/hooks/focus/useIsMounted.ts
|
|
788
|
-
import { useEffect as useEffect2, useLayoutEffect, useState as useState3 } from "react";
|
|
789
|
-
var isClient = typeof window !== "undefined" && typeof document !== "undefined";
|
|
790
|
-
var useIsomorphicEffect = isClient ? useLayoutEffect : useEffect2;
|
|
791
|
-
var useIsMounted = () => {
|
|
792
|
-
const [isMounted, setIsMounted] = useState3(false);
|
|
793
|
-
useIsomorphicEffect(() => {
|
|
794
|
-
setIsMounted(true);
|
|
795
|
-
return () => {
|
|
796
|
-
setIsMounted(false);
|
|
797
|
-
};
|
|
798
|
-
}, []);
|
|
799
|
-
return isMounted;
|
|
800
|
-
};
|
|
801
|
-
|
|
802
|
-
// src/hooks/focus/useFocusTrap.ts
|
|
803
|
-
var createFocusGuard = () => {
|
|
804
|
-
const div = document.createElement("div");
|
|
805
|
-
Object.assign(div.style, {
|
|
806
|
-
opacity: "0",
|
|
807
|
-
outline: "none",
|
|
808
|
-
boxShadow: "none",
|
|
809
|
-
position: "fixed",
|
|
810
|
-
pointerEvents: "none",
|
|
811
|
-
touchAction: "none"
|
|
812
|
-
});
|
|
813
|
-
div.tabIndex = 0;
|
|
814
|
-
div.setAttribute("data-hw-focus-guard", "");
|
|
815
|
-
document.body.appendChild(div);
|
|
816
|
-
return div;
|
|
817
|
-
};
|
|
818
|
-
function getContainedFocusableElements(element) {
|
|
819
|
-
return element?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
820
|
-
}
|
|
821
|
-
var FocusTrapService = class {
|
|
822
|
-
constructor() {
|
|
823
|
-
// The last entry is always the active one
|
|
824
|
-
this.listeners = [];
|
|
825
|
-
this.onFocusIn = (event) => {
|
|
826
|
-
const active = this.getActive();
|
|
827
|
-
if (!active || !active.container.current) return;
|
|
828
|
-
const { container } = active;
|
|
829
|
-
if (!container.current.contains(event.target)) {
|
|
830
|
-
this.focusElement();
|
|
831
|
-
}
|
|
832
|
-
};
|
|
833
|
-
}
|
|
834
|
-
getActive() {
|
|
835
|
-
if (this.listeners.length === 0) return void 0;
|
|
836
|
-
return this.listeners[this.listeners.length - 1];
|
|
837
|
-
}
|
|
838
|
-
focusElement() {
|
|
839
|
-
const active = this.getActive();
|
|
840
|
-
if (!active) return;
|
|
841
|
-
const { container, initialFocusElement } = active;
|
|
842
|
-
const containerElement = container.current;
|
|
843
|
-
if (initialFocusElement?.current) {
|
|
844
|
-
initialFocusElement.current.focus();
|
|
845
|
-
} else {
|
|
846
|
-
const elements = getContainedFocusableElements(containerElement);
|
|
847
|
-
if (elements && elements.length > 0) {
|
|
848
|
-
const first = elements.item(0);
|
|
849
|
-
first.focus();
|
|
850
|
-
} else {
|
|
851
|
-
containerElement.focus();
|
|
852
|
-
}
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
removeGuards() {
|
|
856
|
-
document.querySelectorAll("[data-hw-focus-guard]").forEach((node) => node.remove());
|
|
857
|
-
}
|
|
858
|
-
addGuards() {
|
|
859
|
-
document.body.insertAdjacentElement("afterbegin", createFocusGuard());
|
|
860
|
-
document.body.insertAdjacentElement("beforeend", createFocusGuard());
|
|
861
|
-
}
|
|
862
|
-
activate() {
|
|
863
|
-
document.addEventListener("focusin", this.onFocusIn);
|
|
864
|
-
this.addGuards();
|
|
865
|
-
}
|
|
866
|
-
deactivate() {
|
|
867
|
-
document.removeEventListener("focusin", this.onFocusIn);
|
|
868
|
-
this.removeGuards();
|
|
869
|
-
}
|
|
870
|
-
register(listener) {
|
|
871
|
-
this.listeners.push(listener);
|
|
872
|
-
if (this.listeners.length === 1) {
|
|
873
|
-
this.activate();
|
|
874
|
-
}
|
|
875
|
-
const active = listener;
|
|
876
|
-
this.listeners.forEach((listener2) => {
|
|
877
|
-
const { focus, pause } = listener2;
|
|
878
|
-
if (listener2 === active) {
|
|
879
|
-
focus();
|
|
880
|
-
} else {
|
|
881
|
-
pause();
|
|
882
|
-
}
|
|
883
|
-
});
|
|
884
|
-
}
|
|
885
|
-
unregister(id) {
|
|
886
|
-
const index = this.listeners.findIndex((trap) => trap.id === id);
|
|
887
|
-
if (index !== -1) {
|
|
888
|
-
const isActive = index === this.listeners.length - 1;
|
|
889
|
-
const listener = this.listeners[index];
|
|
890
|
-
this.listeners = this.listeners.filter((listener2) => listener2.id !== id);
|
|
891
|
-
if (isActive) {
|
|
892
|
-
this.deactivate();
|
|
893
|
-
listener.focusLast();
|
|
894
|
-
const active = this.getActive();
|
|
895
|
-
this.listeners.forEach((listener2) => {
|
|
896
|
-
const { pause, unpause } = listener2;
|
|
897
|
-
if (listener2 === active) {
|
|
898
|
-
unpause();
|
|
899
|
-
} else {
|
|
900
|
-
pause();
|
|
901
|
-
}
|
|
902
|
-
});
|
|
903
|
-
if (this.listeners.length > 0) {
|
|
904
|
-
this.activate();
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
} else {
|
|
908
|
-
console.warn(`Unable to unregister id ${id}: not found`);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
};
|
|
912
|
-
var service = new FocusTrapService();
|
|
913
|
-
var useFocusTrap = ({
|
|
914
|
-
container,
|
|
915
|
-
active = true,
|
|
916
|
-
initialFocus,
|
|
917
|
-
focusFirst = true
|
|
918
|
-
}) => {
|
|
919
|
-
const lastFocusRef = useRef(null);
|
|
920
|
-
const [paused, setPaused] = useState4(false);
|
|
921
|
-
const isMounted = useIsMounted();
|
|
922
|
-
const id = useId();
|
|
923
|
-
const focusElement = useCallback2(() => {
|
|
924
|
-
const containerElement = container.current;
|
|
925
|
-
if (initialFocus?.current) {
|
|
926
|
-
initialFocus.current.focus();
|
|
927
|
-
} else {
|
|
928
|
-
const elements = getContainedFocusableElements(containerElement);
|
|
929
|
-
if (elements && elements.length > 0) {
|
|
930
|
-
const first = elements.item(0);
|
|
931
|
-
first.focus();
|
|
932
|
-
} else {
|
|
933
|
-
containerElement.focus();
|
|
934
|
-
}
|
|
935
|
-
}
|
|
936
|
-
}, [container, initialFocus]);
|
|
937
|
-
useEffect3(() => {
|
|
938
|
-
if (active && isMounted) {
|
|
939
|
-
let pause = function() {
|
|
940
|
-
setPaused(true);
|
|
941
|
-
}, unpause = function() {
|
|
942
|
-
setPaused(false);
|
|
943
|
-
if (!container.current.contains(document.activeElement)) {
|
|
944
|
-
focusElement();
|
|
945
|
-
}
|
|
946
|
-
}, focus = function() {
|
|
947
|
-
focusElement();
|
|
948
|
-
setPaused(false);
|
|
949
|
-
}, focusLast = function() {
|
|
950
|
-
lastFocusRef.current?.focus();
|
|
951
|
-
};
|
|
952
|
-
if (!lastFocusRef.current) {
|
|
953
|
-
lastFocusRef.current = document.activeElement;
|
|
954
|
-
}
|
|
955
|
-
service.register({ id, pause, focus, focusLast, unpause, container, initialFocusElement: initialFocus });
|
|
956
|
-
return () => {
|
|
957
|
-
service.unregister(id);
|
|
958
|
-
lastFocusRef.current = void 0;
|
|
959
|
-
};
|
|
960
|
-
}
|
|
961
|
-
}, [active, container, focusElement, id, initialFocus, isMounted]);
|
|
962
|
-
useEffect3(() => {
|
|
963
|
-
if (active && !paused && isMounted) {
|
|
964
|
-
let onKeyDown = function(event) {
|
|
965
|
-
const key = event.key;
|
|
966
|
-
const elements = getContainedFocusableElements(containerElement);
|
|
967
|
-
const active2 = document.activeElement;
|
|
968
|
-
const index = [...elements].findIndex((value) => value === active2);
|
|
969
|
-
if (index === -1 || event.altKey || event.ctrlKey || event.metaKey) {
|
|
970
|
-
return;
|
|
971
|
-
}
|
|
972
|
-
if (key === "Tab") {
|
|
973
|
-
const next = event.shiftKey ? -1 : 1;
|
|
974
|
-
const nextIndex = (index + next + elements.length) % elements.length;
|
|
975
|
-
const nextElement = elements[nextIndex];
|
|
976
|
-
nextElement.focus();
|
|
977
|
-
event.preventDefault();
|
|
978
|
-
}
|
|
979
|
-
};
|
|
980
|
-
const containerElement = container.current;
|
|
981
|
-
containerElement.addEventListener("keydown", onKeyDown);
|
|
982
|
-
return () => {
|
|
983
|
-
containerElement.removeEventListener("keydown", onKeyDown);
|
|
984
|
-
};
|
|
985
|
-
}
|
|
986
|
-
}, [active, paused, isMounted, container, initialFocus, focusFirst, focusElement]);
|
|
987
|
-
};
|
|
988
|
-
|
|
989
|
-
// src/hooks/useLogOnce.ts
|
|
990
|
-
import { useEffect as useEffect4, useState as useState5 } from "react";
|
|
991
|
-
var defaultOptions = {
|
|
992
|
-
type: "warning"
|
|
993
|
-
};
|
|
994
|
-
var useLogOnce = (message, condition, options) => {
|
|
995
|
-
const [hasLogged, setHasLogged] = useState5(false);
|
|
996
|
-
const { type } = { ...defaultOptions, ...options };
|
|
997
|
-
useEffect4(() => {
|
|
998
|
-
if (!hasLogged && condition) {
|
|
999
|
-
switch (type) {
|
|
1000
|
-
case "info":
|
|
1001
|
-
console.info(message);
|
|
1002
|
-
break;
|
|
1003
|
-
case "error":
|
|
1004
|
-
console.error(message);
|
|
1005
|
-
break;
|
|
1006
|
-
case "warning":
|
|
1007
|
-
console.warn(message);
|
|
1008
|
-
break;
|
|
1009
|
-
}
|
|
1010
|
-
setHasLogged(true);
|
|
1011
|
-
}
|
|
1012
|
-
}, [condition]);
|
|
1013
|
-
};
|
|
1014
|
-
|
|
1015
|
-
// src/components/dialog/Dialog.tsx
|
|
1016
|
-
import { createPortal } from "react-dom";
|
|
1017
|
-
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1018
|
-
var Dialog = ({
|
|
1019
|
-
children,
|
|
1020
|
-
isOpen,
|
|
1021
|
-
titleElement,
|
|
1022
|
-
description,
|
|
1023
|
-
isModal = true,
|
|
1024
|
-
onClose,
|
|
1025
|
-
backgroundClassName,
|
|
1026
|
-
position = "center",
|
|
1027
|
-
isAnimated = true,
|
|
1028
|
-
containerClassName,
|
|
1029
|
-
...props
|
|
1030
|
-
}) => {
|
|
1031
|
-
const translation = useHightideTranslation();
|
|
1032
|
-
const [visible, setVisible] = useState6(isOpen);
|
|
1033
|
-
const generatedId = useId2();
|
|
1034
|
-
const id = props.id ?? generatedId;
|
|
1035
|
-
const ref = useRef2(null);
|
|
1036
|
-
useEffect5(() => {
|
|
1037
|
-
if (isOpen) {
|
|
1038
|
-
setVisible(true);
|
|
1039
|
-
} else {
|
|
1040
|
-
if (!isAnimated) {
|
|
1041
|
-
setVisible(false);
|
|
1042
|
-
}
|
|
1043
|
-
}
|
|
1044
|
-
}, [isAnimated, isOpen]);
|
|
1045
|
-
const onCloseWrapper = () => {
|
|
1046
|
-
if (!isModal) return;
|
|
1047
|
-
onClose?.();
|
|
1048
|
-
};
|
|
1049
|
-
useLogOnce("Dialog: onClose should be defined for modal dialogs", isModal && !onClose);
|
|
1050
|
-
useFocusTrap({
|
|
1051
|
-
container: ref,
|
|
1052
|
-
active: visible,
|
|
1053
|
-
focusFirst: true
|
|
1054
|
-
});
|
|
1055
|
-
const positionMap = {
|
|
1056
|
-
top: "fixed top-8 left-1/2 -translate-x-1/2",
|
|
1057
|
-
center: "fixed left-1/2 -translate-x-1/2 top-1/2 -translate-y-1/2",
|
|
1058
|
-
none: ""
|
|
1059
|
-
};
|
|
1060
|
-
const positionStyle = positionMap[position];
|
|
1061
|
-
if (!visible) return;
|
|
1062
|
-
return createPortal(
|
|
1063
|
-
/* @__PURE__ */ jsxs2("div", { id: `dialog-container-${id}`, className: clsx2("fixed inset-0 h-screen w-screen", containerClassName), children: [
|
|
1064
|
-
/* @__PURE__ */ jsx3(
|
|
1065
|
-
"div",
|
|
1066
|
-
{
|
|
1067
|
-
id: `dialog-background-${id}`,
|
|
1068
|
-
hidden: !visible,
|
|
1069
|
-
className: clsx2(
|
|
1070
|
-
"fixed inset-0 h-screen w-screen bg-overlay-shadow",
|
|
1071
|
-
{
|
|
1072
|
-
"motion-safe:animate-fade-in": isOpen,
|
|
1073
|
-
"motion-safe:animate-fade-out": !isOpen
|
|
1074
|
-
},
|
|
1075
|
-
backgroundClassName
|
|
1076
|
-
),
|
|
1077
|
-
onAnimationEnd: () => {
|
|
1078
|
-
if (!isOpen) {
|
|
1079
|
-
setVisible(false);
|
|
1080
|
-
}
|
|
1081
|
-
},
|
|
1082
|
-
onClick: onCloseWrapper,
|
|
1083
|
-
"aria-hidden": true
|
|
1084
|
-
}
|
|
1085
|
-
),
|
|
1086
|
-
/* @__PURE__ */ jsxs2(
|
|
1087
|
-
"div",
|
|
1088
|
-
{
|
|
1089
|
-
...props,
|
|
1090
|
-
id: `dialog-${id}`,
|
|
1091
|
-
ref,
|
|
1092
|
-
hidden: !visible,
|
|
1093
|
-
onKeyDown: (event) => {
|
|
1094
|
-
if (event.key === "Escape") {
|
|
1095
|
-
onCloseWrapper();
|
|
1096
|
-
}
|
|
1097
|
-
},
|
|
1098
|
-
onAnimationEnd: () => {
|
|
1099
|
-
if (!isOpen) {
|
|
1100
|
-
setVisible(false);
|
|
1101
|
-
}
|
|
1102
|
-
},
|
|
1103
|
-
className: clsx2(
|
|
1104
|
-
"flex-col-2 p-4 bg-overlay-background text-overlay-text rounded-xl shadow-hw-bottom max-w-[calc(100vw_-_2rem)] max-h-[calc(100vh_-_2rem)]",
|
|
1105
|
-
{
|
|
1106
|
-
"motion-safe:animate-pop-in": isOpen,
|
|
1107
|
-
"motion-safe:animate-pop-out": !isOpen
|
|
1108
|
-
},
|
|
1109
|
-
positionStyle,
|
|
1110
|
-
props.className
|
|
1111
|
-
),
|
|
1112
|
-
children: [
|
|
1113
|
-
/* @__PURE__ */ jsx3("div", { className: "typography-title-lg mr-8", children: titleElement }),
|
|
1114
|
-
description && /* @__PURE__ */ jsx3("div", { className: "text-description", children: description }),
|
|
1115
|
-
isModal && /* @__PURE__ */ jsx3(
|
|
1116
|
-
"div",
|
|
1117
|
-
{
|
|
1118
|
-
className: "absolute top-0 right-0",
|
|
1119
|
-
style: {
|
|
1120
|
-
paddingTop: "inherit",
|
|
1121
|
-
paddingRight: "inherit"
|
|
1122
|
-
},
|
|
1123
|
-
children: /* @__PURE__ */ jsx3(
|
|
1124
|
-
IconButton,
|
|
1125
|
-
{
|
|
1126
|
-
color: "neutral",
|
|
1127
|
-
size: "tiny",
|
|
1128
|
-
"aria-label": translation("close"),
|
|
1129
|
-
onClick: onCloseWrapper,
|
|
1130
|
-
children: /* @__PURE__ */ jsx3(X, {})
|
|
1131
|
-
}
|
|
1132
|
-
)
|
|
1133
|
-
}
|
|
1134
|
-
),
|
|
1135
|
-
children
|
|
1136
|
-
]
|
|
1137
|
-
}
|
|
1138
|
-
)
|
|
1139
|
-
] }),
|
|
1140
|
-
document.body
|
|
1141
|
-
);
|
|
1142
|
-
};
|
|
1143
|
-
|
|
1144
|
-
// src/components/user-action/select/Select.tsx
|
|
1145
|
-
import {
|
|
1146
|
-
createContext as createContext2,
|
|
1147
|
-
forwardRef as forwardRef3,
|
|
1148
|
-
useCallback as useCallback5,
|
|
1149
|
-
useContext as useContext2,
|
|
1150
|
-
useEffect as useEffect8,
|
|
1151
|
-
useId as useId4,
|
|
1152
|
-
useImperativeHandle,
|
|
1153
|
-
useMemo as useMemo2,
|
|
1154
|
-
useRef as useRef3,
|
|
1155
|
-
useState as useState9
|
|
1156
|
-
} from "react";
|
|
1157
|
-
import clsx5 from "clsx";
|
|
1158
|
-
|
|
1159
|
-
// src/components/layout/Expandable.tsx
|
|
1160
|
-
import { forwardRef as forwardRef2, useCallback as useCallback3, useId as useId3 } from "react";
|
|
1161
|
-
import { ChevronDown } from "lucide-react";
|
|
1162
|
-
import clsx3 from "clsx";
|
|
1163
|
-
|
|
1164
|
-
// src/hooks/useOverwritableState.ts
|
|
1165
|
-
import { useEffect as useEffect6, useState as useState7 } from "react";
|
|
1166
|
-
var useOverwritableState = (initialValue, onChange) => {
|
|
1167
|
-
const [state, setState] = useState7(initialValue);
|
|
1168
|
-
useEffect6(() => {
|
|
1169
|
-
setState(initialValue);
|
|
1170
|
-
}, [initialValue]);
|
|
1171
|
-
const onChangeWrapper = (action) => {
|
|
1172
|
-
const resolved = resolveSetState(action, state);
|
|
1173
|
-
setState(resolved);
|
|
1174
|
-
onChange?.(state);
|
|
1175
|
-
};
|
|
1176
|
-
return [state, onChangeWrapper];
|
|
1177
|
-
};
|
|
1178
|
-
|
|
1179
|
-
// src/components/layout/Expandable.tsx
|
|
1180
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1181
|
-
var ExpansionIcon = ({ isExpanded, className }) => {
|
|
1182
|
-
return /* @__PURE__ */ jsx4(
|
|
1183
|
-
ChevronDown,
|
|
1184
|
-
{
|
|
1185
|
-
"aria-hidden": true,
|
|
1186
|
-
className: clsx3(
|
|
1187
|
-
"min-w-6 w-6 min-h-6 h-6 transition-transform motion-safe:duration-200 motion-reduce:duration-0 ease-in-out",
|
|
1188
|
-
{ "rotate-180": isExpanded },
|
|
1189
|
-
className
|
|
1190
|
-
)
|
|
1191
|
-
}
|
|
1192
|
-
);
|
|
1193
|
-
};
|
|
1194
|
-
var Expandable = forwardRef2(function Expandable2({
|
|
1195
|
-
children,
|
|
1196
|
-
id: providedId,
|
|
1197
|
-
label,
|
|
1198
|
-
icon,
|
|
1199
|
-
isExpanded = false,
|
|
1200
|
-
onChange,
|
|
1201
|
-
clickOnlyOnHeader = true,
|
|
1202
|
-
disabled = false,
|
|
1203
|
-
className,
|
|
1204
|
-
headerClassName,
|
|
1205
|
-
contentClassName,
|
|
1206
|
-
contentExpandedClassName
|
|
1207
|
-
}, ref) {
|
|
1208
|
-
const defaultIcon = useCallback3((expanded) => /* @__PURE__ */ jsx4(ExpansionIcon, { isExpanded: expanded }), []);
|
|
1209
|
-
icon ??= defaultIcon;
|
|
1210
|
-
const generatedId = useId3();
|
|
1211
|
-
const id = providedId ?? generatedId;
|
|
1212
|
-
return /* @__PURE__ */ jsxs3(
|
|
1213
|
-
"div",
|
|
1214
|
-
{
|
|
1215
|
-
ref,
|
|
1216
|
-
onClick: () => !clickOnlyOnHeader && !disabled && onChange?.(!isExpanded),
|
|
1217
|
-
className: clsx3(
|
|
1218
|
-
"flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm",
|
|
1219
|
-
{ "cursor-pointer": !clickOnlyOnHeader && !disabled },
|
|
1220
|
-
className
|
|
1221
|
-
),
|
|
1222
|
-
children: [
|
|
1223
|
-
/* @__PURE__ */ jsxs3(
|
|
1224
|
-
"button",
|
|
1225
|
-
{
|
|
1226
|
-
onClick: () => clickOnlyOnHeader && !disabled && onChange?.(!isExpanded),
|
|
1227
|
-
className: clsx3(
|
|
1228
|
-
"flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
|
|
1229
|
-
{
|
|
1230
|
-
"group-hover:brightness-97": !isExpanded,
|
|
1231
|
-
"hover:brightness-97": isExpanded && !disabled,
|
|
1232
|
-
"cursor-pointer": clickOnlyOnHeader && !disabled
|
|
1233
|
-
},
|
|
1234
|
-
headerClassName
|
|
1235
|
-
),
|
|
1236
|
-
"aria-expanded": isExpanded,
|
|
1237
|
-
"aria-controls": `${id}-content`,
|
|
1238
|
-
"aria-disabled": disabled ?? void 0,
|
|
1239
|
-
children: [
|
|
1240
|
-
label,
|
|
1241
|
-
icon(isExpanded)
|
|
1242
|
-
]
|
|
1243
|
-
}
|
|
1244
|
-
),
|
|
1245
|
-
/* @__PURE__ */ jsx4(
|
|
1246
|
-
"div",
|
|
1247
|
-
{
|
|
1248
|
-
id: `${id}-content`,
|
|
1249
|
-
className: clsx3(
|
|
1250
|
-
"flex-col-2 px-4 transition-all duration-300 ease-in-out",
|
|
1251
|
-
{
|
|
1252
|
-
[clsx3("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
|
|
1253
|
-
"max-h-0 opacity-0 overflow-hidden": !isExpanded
|
|
1254
|
-
},
|
|
1255
|
-
contentClassName
|
|
1256
|
-
),
|
|
1257
|
-
role: "region",
|
|
1258
|
-
children
|
|
1259
|
-
}
|
|
1260
|
-
)
|
|
1261
|
-
]
|
|
1262
|
-
}
|
|
1263
|
-
);
|
|
1264
|
-
});
|
|
1265
|
-
var ExpandableUncontrolled = forwardRef2(function ExpandableUncontrolled2({
|
|
1266
|
-
isExpanded,
|
|
1267
|
-
onChange,
|
|
1268
|
-
...props
|
|
1269
|
-
}, ref) {
|
|
1270
|
-
const [usedIsExpanded, setUsedIsExpanded] = useOverwritableState(isExpanded, onChange);
|
|
1271
|
-
return /* @__PURE__ */ jsx4(
|
|
1272
|
-
Expandable,
|
|
1273
|
-
{
|
|
1274
|
-
...props,
|
|
1275
|
-
ref,
|
|
1276
|
-
isExpanded: usedIsExpanded,
|
|
1277
|
-
onChange: setUsedIsExpanded
|
|
1278
|
-
}
|
|
1279
|
-
);
|
|
1280
|
-
});
|
|
1281
|
-
|
|
1282
|
-
// src/utils/match.ts
|
|
1283
|
-
var match = (key, values) => {
|
|
1284
|
-
return values[key];
|
|
1285
|
-
};
|
|
1286
|
-
|
|
1287
|
-
// src/components/user-action/select/Select.tsx
|
|
1288
|
-
import { CheckIcon, Plus, XIcon } from "lucide-react";
|
|
1289
|
-
|
|
1290
|
-
// src/components/layout/Chip.tsx
|
|
1291
|
-
import clsx4 from "clsx";
|
|
1292
|
-
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
1293
|
-
var Chip = ({
|
|
1294
|
-
children,
|
|
1295
|
-
trailingIcon,
|
|
1296
|
-
color = "default",
|
|
1297
|
-
size = "md",
|
|
1298
|
-
icon = false,
|
|
1299
|
-
variant = "normal",
|
|
1300
|
-
className = "",
|
|
1301
|
-
...restProps
|
|
1302
|
-
}) => {
|
|
1303
|
-
const colorMapping = {
|
|
1304
|
-
default: "text-tag-default-text bg-tag-default-background",
|
|
1305
|
-
dark: "text-tag-dark-text bg-tag-dark-background",
|
|
1306
|
-
red: "text-tag-red-text bg-tag-red-background",
|
|
1307
|
-
yellow: "text-tag-yellow-text bg-tag-yellow-background",
|
|
1308
|
-
green: "text-tag-green-text bg-tag-green-background",
|
|
1309
|
-
blue: "text-tag-blue-text bg-tag-blue-background",
|
|
1310
|
-
pink: "text-tag-pink-text bg-tag-pink-background",
|
|
1311
|
-
orange: "text-tag-orange-text bg-tag-orange-background"
|
|
1312
|
-
}[color];
|
|
1313
|
-
const colorMappingIcon = {
|
|
1314
|
-
default: "text-tag-default-icon",
|
|
1315
|
-
dark: "text-tag-dark-icon",
|
|
1316
|
-
red: "text-tag-red-icon",
|
|
1317
|
-
yellow: "text-tag-yellow-icon",
|
|
1318
|
-
green: "text-tag-green-icon",
|
|
1319
|
-
blue: "text-tag-blue-icon",
|
|
1320
|
-
pink: "text-tag-pink-icon",
|
|
1321
|
-
orange: "text-tag-orange-icon"
|
|
1322
|
-
}[color];
|
|
1323
|
-
return /* @__PURE__ */ jsxs4(
|
|
1324
|
-
"div",
|
|
1325
|
-
{
|
|
1326
|
-
...restProps,
|
|
1327
|
-
className: clsx4(
|
|
1328
|
-
`flex-row-0 w-fit font-semibold`,
|
|
1329
|
-
colorMapping,
|
|
1330
|
-
!icon ? {
|
|
1331
|
-
"px-1 py-0.5": size === "sm",
|
|
1332
|
-
"px-2 py-1": size === "md",
|
|
1333
|
-
"px-4 py-2": size === "lg"
|
|
1334
|
-
} : {
|
|
1335
|
-
"p-0.5": size === "sm",
|
|
1336
|
-
"p-1": size === "md",
|
|
1337
|
-
"p-2": size === "lg"
|
|
1338
|
-
},
|
|
1339
|
-
{
|
|
1340
|
-
"rounded-md": variant === "normal",
|
|
1341
|
-
"rounded-full": variant === "fullyRounded"
|
|
1342
|
-
},
|
|
1343
|
-
className
|
|
1344
|
-
),
|
|
1345
|
-
children: [
|
|
1346
|
-
children,
|
|
1347
|
-
trailingIcon && /* @__PURE__ */ jsx5("span", { className: colorMappingIcon, children: trailingIcon })
|
|
1348
|
-
]
|
|
1349
|
-
}
|
|
1350
|
-
);
|
|
1351
|
-
};
|
|
1352
|
-
|
|
1353
|
-
// src/hooks/useFloatingElement.ts
|
|
1354
|
-
import { useCallback as useCallback4, useEffect as useEffect7, useState as useState8 } from "react";
|
|
1355
|
-
|
|
1356
|
-
// src/utils/math.ts
|
|
1357
|
-
var clamp = (value, range = [0, 1]) => {
|
|
1358
|
-
const [min, max] = range;
|
|
1359
|
-
return Math.min(Math.max(value, min), max);
|
|
1360
|
-
};
|
|
1361
|
-
|
|
1362
|
-
// src/hooks/useFloatingElement.ts
|
|
1363
|
-
function calculatePosition({
|
|
1364
|
-
windowRect,
|
|
1365
|
-
containerRect,
|
|
1366
|
-
anchorRect,
|
|
1367
|
-
options
|
|
1368
|
-
}) {
|
|
1369
|
-
const { verticalAlignment, horizontalAlignment, gap, screenPadding } = options;
|
|
1370
|
-
const windowWidth = windowRect.width;
|
|
1371
|
-
const windowHeight = windowRect.height;
|
|
1372
|
-
const maxWidth = windowWidth - 2 * screenPadding;
|
|
1373
|
-
const maxHeight = windowHeight - 2 * screenPadding;
|
|
1374
|
-
const width = Math.min(containerRect.width, maxWidth);
|
|
1375
|
-
const height = Math.min(containerRect.height, maxHeight);
|
|
1376
|
-
const leftSuggestion = {
|
|
1377
|
-
beforeStart: anchorRect.left - width - gap,
|
|
1378
|
-
afterStart: anchorRect.left,
|
|
1379
|
-
center: anchorRect.left + anchorRect.width / 2 - width / 2,
|
|
1380
|
-
beforeEnd: anchorRect.right - width,
|
|
1381
|
-
afterEnd: anchorRect.right + gap
|
|
1382
|
-
}[horizontalAlignment];
|
|
1383
|
-
const topSuggestion = {
|
|
1384
|
-
beforeStart: anchorRect.top - height - gap,
|
|
1385
|
-
afterStart: anchorRect.top,
|
|
1386
|
-
center: anchorRect.top + anchorRect.height / 2 - height / 2,
|
|
1387
|
-
beforeEnd: anchorRect.bottom - height,
|
|
1388
|
-
afterEnd: anchorRect.bottom + gap
|
|
1389
|
-
}[verticalAlignment];
|
|
1390
|
-
const left = clamp(leftSuggestion, [
|
|
1391
|
-
screenPadding,
|
|
1392
|
-
windowWidth - screenPadding - width
|
|
1393
|
-
]);
|
|
1394
|
-
const top = clamp(topSuggestion, [
|
|
1395
|
-
screenPadding,
|
|
1396
|
-
windowHeight - screenPadding - height
|
|
1397
|
-
]);
|
|
1398
|
-
return {
|
|
1399
|
-
left,
|
|
1400
|
-
top,
|
|
1401
|
-
maxWidth,
|
|
1402
|
-
maxHeight
|
|
1403
|
-
};
|
|
1404
|
-
}
|
|
1405
|
-
function useFloatingElement({
|
|
1406
|
-
active = true,
|
|
1407
|
-
windowRef,
|
|
1408
|
-
anchorRef,
|
|
1409
|
-
containerRef,
|
|
1410
|
-
isPolling = false,
|
|
1411
|
-
pollingInterval = 100,
|
|
1412
|
-
verticalAlignment = "afterEnd",
|
|
1413
|
-
horizontalAlignment = "afterStart",
|
|
1414
|
-
screenPadding = 16,
|
|
1415
|
-
gap = 4
|
|
1416
|
-
}) {
|
|
1417
|
-
const [style, setStyle] = useState8();
|
|
1418
|
-
const isMounted = useIsMounted();
|
|
1419
|
-
const calculate = useCallback4(() => {
|
|
1420
|
-
const containerRect = containerRef.current.getBoundingClientRect();
|
|
1421
|
-
const windowRect = windowRef?.current.getBoundingClientRect() ?? {
|
|
1422
|
-
top: 0,
|
|
1423
|
-
bottom: window.innerHeight,
|
|
1424
|
-
left: 0,
|
|
1425
|
-
right: window.innerWidth,
|
|
1426
|
-
width: window.innerWidth,
|
|
1427
|
-
height: window.innerHeight
|
|
1428
|
-
};
|
|
1429
|
-
const anchorElement = anchorRef?.current;
|
|
1430
|
-
if (anchorRef && !anchorElement) {
|
|
1431
|
-
console.warn("FloatingContainer anchor provided, but its value is undefined");
|
|
1432
|
-
}
|
|
1433
|
-
const anchorRect = anchorElement?.getBoundingClientRect() ?? windowRect;
|
|
1434
|
-
const calculateProps = {
|
|
1435
|
-
windowRect,
|
|
1436
|
-
anchorRect,
|
|
1437
|
-
containerRect,
|
|
1438
|
-
options: {
|
|
1439
|
-
horizontalAlignment,
|
|
1440
|
-
verticalAlignment,
|
|
1441
|
-
screenPadding,
|
|
1442
|
-
gap
|
|
1443
|
-
}
|
|
1444
|
-
};
|
|
1445
|
-
setStyle(calculatePosition(calculateProps));
|
|
1446
|
-
}, [anchorRef, containerRef, gap, horizontalAlignment, screenPadding, verticalAlignment, windowRef]);
|
|
1447
|
-
const height = containerRef.current?.getBoundingClientRect().height;
|
|
1448
|
-
const width = containerRef.current?.getBoundingClientRect().width;
|
|
1449
|
-
useEffect7(() => {
|
|
1450
|
-
if (active && isMounted) {
|
|
1451
|
-
calculate();
|
|
1452
|
-
} else {
|
|
1453
|
-
setStyle(void 0);
|
|
1454
|
-
}
|
|
1455
|
-
}, [calculate, active, isMounted, height, width]);
|
|
1456
|
-
useEffect7(() => {
|
|
1457
|
-
window.addEventListener("resize", calculate);
|
|
1458
|
-
let timeout;
|
|
1459
|
-
if (isPolling) {
|
|
1460
|
-
timeout = setInterval(calculate, pollingInterval);
|
|
1461
|
-
}
|
|
1462
|
-
return () => {
|
|
1463
|
-
window.removeEventListener("resize", calculate);
|
|
1464
|
-
if (timeout) {
|
|
1465
|
-
clearInterval(timeout);
|
|
1466
|
-
}
|
|
1467
|
-
};
|
|
1468
|
-
}, [calculate, isPolling, pollingInterval]);
|
|
1469
|
-
return style;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
// src/components/user-action/select/Select.tsx
|
|
1473
|
-
import { createPortal as createPortal2 } from "react-dom";
|
|
1474
|
-
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1475
|
-
var defaultToggleOpenOptions = {
|
|
1476
|
-
highlightStartPositionBehavior: "first"
|
|
1477
|
-
};
|
|
1478
|
-
var SelectContext = createContext2(null);
|
|
1479
|
-
function useSelectContext() {
|
|
1480
|
-
const ctx = useContext2(SelectContext);
|
|
1481
|
-
if (!ctx) {
|
|
1482
|
-
throw new Error("SelectContext must be used within a ListBoxPrimitive");
|
|
1483
|
-
}
|
|
1484
|
-
return ctx;
|
|
1485
|
-
}
|
|
1486
|
-
var SelectRoot = ({
|
|
1487
|
-
children,
|
|
1488
|
-
id,
|
|
1489
|
-
value,
|
|
1490
|
-
onValueChanged,
|
|
1491
|
-
values,
|
|
1492
|
-
onValuesChanged,
|
|
1493
|
-
isOpen = false,
|
|
1494
|
-
disabled = false,
|
|
1495
|
-
invalid = false,
|
|
1496
|
-
isMultiSelect = false,
|
|
1497
|
-
iconAppearance = "left"
|
|
1498
|
-
}) => {
|
|
1499
|
-
const triggerRef = useRef3(null);
|
|
1500
|
-
const generatedId = useId4();
|
|
1501
|
-
const usedId = id ?? generatedId;
|
|
1502
|
-
const [internalState, setInternalState] = useState9({
|
|
1503
|
-
isOpen,
|
|
1504
|
-
options: []
|
|
1505
|
-
});
|
|
1506
|
-
const selectedValues = useMemo2(
|
|
1507
|
-
() => isMultiSelect ? values ?? [] : [value].filter(Boolean),
|
|
1508
|
-
[isMultiSelect, value, values]
|
|
1509
|
-
);
|
|
1510
|
-
const selectedOptions = useMemo2(
|
|
1511
|
-
() => selectedValues.map((value2) => internalState.options.find((option) => value2 === option.value)).filter(Boolean),
|
|
1512
|
-
[selectedValues, internalState.options]
|
|
1513
|
-
);
|
|
1514
|
-
const state = {
|
|
1515
|
-
...internalState,
|
|
1516
|
-
id: usedId,
|
|
1517
|
-
disabled,
|
|
1518
|
-
invalid,
|
|
1519
|
-
value: selectedValues,
|
|
1520
|
-
selectedOptions
|
|
1521
|
-
};
|
|
1522
|
-
const config = {
|
|
1523
|
-
isMultiSelect,
|
|
1524
|
-
iconAppearance
|
|
1525
|
-
};
|
|
1526
|
-
const registerItem = useCallback5((item) => {
|
|
1527
|
-
setInternalState((prev) => {
|
|
1528
|
-
const updatedOptions = [...prev.options, item];
|
|
1529
|
-
updatedOptions.sort((a, b) => {
|
|
1530
|
-
const aEl = a.ref.current;
|
|
1531
|
-
const bEl = b.ref.current;
|
|
1532
|
-
if (!aEl || !bEl) return 0;
|
|
1533
|
-
return aEl.compareDocumentPosition(bEl) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1;
|
|
1534
|
-
});
|
|
1535
|
-
return {
|
|
1536
|
-
...prev,
|
|
1537
|
-
options: updatedOptions
|
|
1538
|
-
};
|
|
1539
|
-
});
|
|
1540
|
-
}, []);
|
|
1541
|
-
const unregisterItem = useCallback5((value2) => {
|
|
1542
|
-
setInternalState((prev) => {
|
|
1543
|
-
const updatedOptions = prev.options.filter((i) => i.value !== value2);
|
|
1544
|
-
return {
|
|
1545
|
-
...prev,
|
|
1546
|
-
options: updatedOptions
|
|
1547
|
-
};
|
|
1548
|
-
});
|
|
1549
|
-
}, []);
|
|
1550
|
-
const toggleSelection = (value2, isSelected) => {
|
|
1551
|
-
if (disabled) {
|
|
1552
|
-
return;
|
|
1553
|
-
}
|
|
1554
|
-
const option = state.options.find((i) => i.value === value2);
|
|
1555
|
-
if (!option) {
|
|
1556
|
-
console.error(`SelectOption with value: ${value2} not found`);
|
|
1557
|
-
return;
|
|
1558
|
-
}
|
|
1559
|
-
let newValue;
|
|
1560
|
-
if (isMultiSelect) {
|
|
1561
|
-
const isSelectedBefore = state.value.includes(value2);
|
|
1562
|
-
const isSelectedAfter = isSelected ?? !isSelectedBefore;
|
|
1563
|
-
if (!isSelectedAfter) {
|
|
1564
|
-
newValue = state.value.filter((v) => v !== value2);
|
|
1565
|
-
} else {
|
|
1566
|
-
newValue = [...state.value, value2];
|
|
1567
|
-
}
|
|
1568
|
-
} else {
|
|
1569
|
-
newValue = [value2];
|
|
1570
|
-
}
|
|
1571
|
-
if (!isMultiSelect) {
|
|
1572
|
-
onValueChanged?.(newValue[0]);
|
|
1573
|
-
} else {
|
|
1574
|
-
onValuesChanged?.(newValue);
|
|
1575
|
-
}
|
|
1576
|
-
setInternalState((prevState) => ({
|
|
1577
|
-
...prevState,
|
|
1578
|
-
highlightedValue: value2
|
|
1579
|
-
}));
|
|
1580
|
-
};
|
|
1581
|
-
const highlightItem = (value2) => {
|
|
1582
|
-
if (disabled) {
|
|
1583
|
-
return;
|
|
1584
|
-
}
|
|
1585
|
-
setInternalState((prevState) => ({
|
|
1586
|
-
...prevState,
|
|
1587
|
-
highlightedValue: value2
|
|
1588
|
-
}));
|
|
1589
|
-
};
|
|
1590
|
-
const registerTrigger = useCallback5((ref) => {
|
|
1591
|
-
triggerRef.current = ref.current;
|
|
1592
|
-
}, []);
|
|
1593
|
-
const unregisterTrigger = useCallback5(() => {
|
|
1594
|
-
triggerRef.current = null;
|
|
1595
|
-
}, []);
|
|
1596
|
-
const toggleOpen = (isOpen2, toggleOpenOptions) => {
|
|
1597
|
-
const { highlightStartPositionBehavior } = { ...defaultToggleOpenOptions, ...toggleOpenOptions };
|
|
1598
|
-
let firstSelectedValue;
|
|
1599
|
-
let firstEnabledValue;
|
|
1600
|
-
for (let i = 0; i < state.options.length; i++) {
|
|
1601
|
-
const currentOption = state.options[highlightStartPositionBehavior === "first" ? i : state.options.length - i - 1];
|
|
1602
|
-
if (!currentOption.disabled) {
|
|
1603
|
-
if (!firstEnabledValue) {
|
|
1604
|
-
firstEnabledValue = currentOption.value;
|
|
1605
|
-
}
|
|
1606
|
-
if (selectedValues.includes(currentOption.value)) {
|
|
1607
|
-
firstSelectedValue = currentOption.value;
|
|
1608
|
-
break;
|
|
1609
|
-
}
|
|
1610
|
-
}
|
|
1611
|
-
}
|
|
1612
|
-
setInternalState((prevState) => ({
|
|
1613
|
-
...prevState,
|
|
1614
|
-
isOpen: isOpen2 ?? !prevState.isOpen,
|
|
1615
|
-
highlightedValue: firstSelectedValue ?? firstEnabledValue
|
|
1616
|
-
}));
|
|
1617
|
-
};
|
|
1618
|
-
const moveHighlightedIndex = (delta) => {
|
|
1619
|
-
let highlightedIndex = state.options.findIndex((value2) => value2.value === internalState.highlightedValue);
|
|
1620
|
-
if (highlightedIndex === -1) {
|
|
1621
|
-
highlightedIndex = 0;
|
|
1622
|
-
}
|
|
1623
|
-
const optionLength = state.options.length;
|
|
1624
|
-
const startIndex = (highlightedIndex + delta % optionLength + optionLength) % optionLength;
|
|
1625
|
-
const isForward = delta >= 0;
|
|
1626
|
-
let highlightedValue = state.options[startIndex].value;
|
|
1627
|
-
for (let i = 0; i < state.options.length; i++) {
|
|
1628
|
-
const index = (startIndex + (isForward ? i : -i) + optionLength) % optionLength;
|
|
1629
|
-
if (!state.options[index].disabled) {
|
|
1630
|
-
highlightedValue = state.options[index].value;
|
|
1631
|
-
break;
|
|
1632
|
-
}
|
|
1633
|
-
}
|
|
1634
|
-
setInternalState((prevState) => ({
|
|
1635
|
-
...prevState,
|
|
1636
|
-
highlightedValue
|
|
1637
|
-
}));
|
|
1638
|
-
};
|
|
1639
|
-
useEffect8(() => {
|
|
1640
|
-
if (!internalState.highlightedValue) return;
|
|
1641
|
-
const highlighted = internalState.options.find((value2) => value2.value === internalState.highlightedValue);
|
|
1642
|
-
if (highlighted) {
|
|
1643
|
-
highlighted.ref.current?.scrollIntoView({ behavior: "instant", block: "nearest" });
|
|
1644
|
-
} else {
|
|
1645
|
-
console.error(`SelectRoot: Could not find highlighted value (${internalState.highlightedValue})`);
|
|
1646
|
-
}
|
|
1647
|
-
}, [internalState.highlightedValue]);
|
|
1648
|
-
const contextValue = {
|
|
1649
|
-
state,
|
|
1650
|
-
config,
|
|
1651
|
-
item: {
|
|
1652
|
-
register: registerItem,
|
|
1653
|
-
unregister: unregisterItem,
|
|
1654
|
-
toggleSelection,
|
|
1655
|
-
highlightItem,
|
|
1656
|
-
moveHighlightedIndex
|
|
1657
|
-
},
|
|
1658
|
-
trigger: {
|
|
1659
|
-
ref: triggerRef,
|
|
1660
|
-
register: registerTrigger,
|
|
1661
|
-
unregister: unregisterTrigger,
|
|
1662
|
-
toggleOpen
|
|
1663
|
-
}
|
|
1664
|
-
};
|
|
1665
|
-
return /* @__PURE__ */ jsx6(SelectContext.Provider, { value: contextValue, children });
|
|
1666
|
-
};
|
|
1667
|
-
var SelectOption = forwardRef3(
|
|
1668
|
-
function SelectOption2({ children, value, disabled = false, iconAppearance, className, ...restProps }, ref) {
|
|
1669
|
-
const { state, config, item, trigger } = useSelectContext();
|
|
1670
|
-
const { register, unregister, toggleSelection, highlightItem } = item;
|
|
1671
|
-
const itemRef = useRef3(null);
|
|
1672
|
-
iconAppearance ??= config.iconAppearance;
|
|
1673
|
-
const label = children ?? value;
|
|
1674
|
-
useEffect8(() => {
|
|
1675
|
-
register({
|
|
1676
|
-
value,
|
|
1677
|
-
label,
|
|
1678
|
-
disabled,
|
|
1679
|
-
ref: itemRef
|
|
1680
|
-
});
|
|
1681
|
-
return () => unregister(value);
|
|
1682
|
-
}, [value, disabled, register, unregister, children, label]);
|
|
1683
|
-
const isHighlighted = state.highlightedValue === value;
|
|
1684
|
-
const isSelected = state.value.includes(value);
|
|
1685
|
-
return /* @__PURE__ */ jsxs5(
|
|
1686
|
-
"li",
|
|
1687
|
-
{
|
|
1688
|
-
...restProps,
|
|
1689
|
-
ref: (node) => {
|
|
1690
|
-
itemRef.current = node;
|
|
1691
|
-
if (typeof ref === "function") ref(node);
|
|
1692
|
-
else if (ref) ref.current = node;
|
|
1693
|
-
},
|
|
1694
|
-
id: value,
|
|
1695
|
-
role: "option",
|
|
1696
|
-
"aria-disabled": disabled,
|
|
1697
|
-
"aria-selected": isSelected,
|
|
1698
|
-
"data-highlighted": isHighlighted ? "" : void 0,
|
|
1699
|
-
"data-selected": isSelected ? "" : void 0,
|
|
1700
|
-
"data-disabled": disabled ? "" : void 0,
|
|
1701
|
-
className: clsx5(
|
|
1702
|
-
"flex-row-1 items-center px-2 py-1 rounded-md",
|
|
1703
|
-
"data-highlighted:bg-primary/20",
|
|
1704
|
-
"data-disabled:text-disabled data-disabled:cursor-not-allowed",
|
|
1705
|
-
"not-data-disabled:cursor-pointer",
|
|
1706
|
-
className
|
|
1707
|
-
),
|
|
1708
|
-
onClick: (event) => {
|
|
1709
|
-
if (!disabled) {
|
|
1710
|
-
toggleSelection(value);
|
|
1711
|
-
if (!config.isMultiSelect) {
|
|
1712
|
-
trigger.toggleOpen(false);
|
|
1713
|
-
}
|
|
1714
|
-
restProps.onClick?.(event);
|
|
1715
|
-
}
|
|
1716
|
-
},
|
|
1717
|
-
onMouseEnter: (event) => {
|
|
1718
|
-
if (!disabled) {
|
|
1719
|
-
highlightItem(value);
|
|
1720
|
-
restProps.onMouseEnter?.(event);
|
|
1721
|
-
}
|
|
1722
|
-
},
|
|
1723
|
-
children: [
|
|
1724
|
-
iconAppearance === "left" && /* @__PURE__ */ jsx6(
|
|
1725
|
-
CheckIcon,
|
|
1726
|
-
{
|
|
1727
|
-
className: clsx5("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
1728
|
-
"aria-hidden": true
|
|
1729
|
-
}
|
|
1730
|
-
),
|
|
1731
|
-
label,
|
|
1732
|
-
iconAppearance === "right" && /* @__PURE__ */ jsx6(
|
|
1733
|
-
CheckIcon,
|
|
1734
|
-
{
|
|
1735
|
-
className: clsx5("w-4 h-4", { "opacity-0": !isSelected || disabled }),
|
|
1736
|
-
"aria-hidden": true
|
|
1737
|
-
}
|
|
1738
|
-
)
|
|
1739
|
-
]
|
|
1740
|
-
}
|
|
1741
|
-
);
|
|
1742
|
-
}
|
|
1743
|
-
);
|
|
1744
|
-
var SelectButton = forwardRef3(function SelectButton2({ placeholder, selectedDisplay, ...props }, ref) {
|
|
1745
|
-
const translation = useHightideTranslation();
|
|
1746
|
-
const { state, trigger } = useSelectContext();
|
|
1747
|
-
const { register, unregister, toggleOpen } = trigger;
|
|
1748
|
-
const innerRef = useRef3(null);
|
|
1749
|
-
useImperativeHandle(ref, () => innerRef.current);
|
|
1750
|
-
useEffect8(() => {
|
|
1751
|
-
register(innerRef);
|
|
1752
|
-
return () => unregister();
|
|
1753
|
-
}, [register, unregister]);
|
|
1754
|
-
const disabled = !!props?.disabled || !!state.disabled;
|
|
1755
|
-
const invalid = state.invalid;
|
|
1756
|
-
const hasValue = state.value.length > 0;
|
|
1757
|
-
return /* @__PURE__ */ jsxs5(
|
|
1758
|
-
"button",
|
|
1759
|
-
{
|
|
1760
|
-
...props,
|
|
1761
|
-
ref: innerRef,
|
|
1762
|
-
id: state.id,
|
|
1763
|
-
disabled,
|
|
1764
|
-
onClick: (event) => {
|
|
1765
|
-
props.onClick?.(event);
|
|
1766
|
-
toggleOpen(!state.isOpen);
|
|
1767
|
-
},
|
|
1768
|
-
onKeyDown: (event) => {
|
|
1769
|
-
props.onKeyDown?.(event);
|
|
1770
|
-
switch (event.key) {
|
|
1771
|
-
case "ArrowDown":
|
|
1772
|
-
toggleOpen(true, { highlightStartPositionBehavior: "first" });
|
|
1773
|
-
event.preventDefault();
|
|
1774
|
-
event.stopPropagation();
|
|
1775
|
-
break;
|
|
1776
|
-
case "ArrowUp":
|
|
1777
|
-
toggleOpen(true, { highlightStartPositionBehavior: "last" });
|
|
1778
|
-
event.preventDefault();
|
|
1779
|
-
event.stopPropagation();
|
|
1780
|
-
break;
|
|
1781
|
-
}
|
|
1782
|
-
},
|
|
1783
|
-
className: clsx5(
|
|
1784
|
-
"flex-row-2 items-center justify-between rounded-md px-3 py-2",
|
|
1785
|
-
{
|
|
1786
|
-
"bg-input-background text-placeholder": !hasValue && !disabled && !invalid,
|
|
1787
|
-
"bg-input-background text-input-text": hasValue && !disabled && !invalid,
|
|
1788
|
-
"bg-negative/20": !disabled && invalid,
|
|
1789
|
-
"text-placeholder": !hasValue && !disabled,
|
|
1790
|
-
"text-negative": hasValue && !disabled && invalid,
|
|
1791
|
-
"bg-disabled-background text-disabled": disabled
|
|
1792
|
-
},
|
|
1793
|
-
props.className
|
|
1794
|
-
),
|
|
1795
|
-
"data-placeholder": !hasValue ? "" : void 0,
|
|
1796
|
-
"data-disabled": disabled ? "" : void 0,
|
|
1797
|
-
"data-invalid": invalid ? "" : void 0,
|
|
1798
|
-
"aria-invalid": invalid,
|
|
1799
|
-
"aria-disabled": disabled,
|
|
1800
|
-
"aria-haspopup": "listbox",
|
|
1801
|
-
"aria-expanded": state.isOpen,
|
|
1802
|
-
"aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
|
|
1803
|
-
children: [
|
|
1804
|
-
hasValue ? selectedDisplay?.(state.value) ?? /* @__PURE__ */ jsx6("div", { className: clsx5("flex flex-wrap gap-x-1 gap-y-2"), children: state.selectedOptions.map(({ value, label }, index) => /* @__PURE__ */ jsxs5("span", { className: "flex-row-0", children: [
|
|
1805
|
-
label,
|
|
1806
|
-
index < state.value.length - 1 && /* @__PURE__ */ jsx6("span", { children: "," })
|
|
1807
|
-
] }, value)) }) : placeholder ?? translation("clickToSelect"),
|
|
1808
|
-
/* @__PURE__ */ jsx6(
|
|
1809
|
-
ExpansionIcon,
|
|
1810
|
-
{
|
|
1811
|
-
isExpanded: state.isOpen,
|
|
1812
|
-
className: clsx5({
|
|
1813
|
-
"text-input-text": !disabled && !invalid,
|
|
1814
|
-
"text-negative": !disabled && invalid,
|
|
1815
|
-
"text-disabled": disabled
|
|
1816
|
-
})
|
|
1817
|
-
}
|
|
1818
|
-
)
|
|
1819
|
-
]
|
|
1820
|
-
}
|
|
1821
|
-
);
|
|
1822
|
-
});
|
|
1823
|
-
var SelectChipDisplay = forwardRef3(function SelectChipDisplay2({ ...props }, ref) {
|
|
1824
|
-
const { state, trigger, item } = useSelectContext();
|
|
1825
|
-
const { register, unregister, toggleOpen } = trigger;
|
|
1826
|
-
const innerRef = useRef3(null);
|
|
1827
|
-
useImperativeHandle(ref, () => innerRef.current);
|
|
1828
|
-
useEffect8(() => {
|
|
1829
|
-
register(innerRef);
|
|
1830
|
-
return () => unregister();
|
|
1831
|
-
}, [register, unregister]);
|
|
1832
|
-
const disabled = !!props?.disabled || !!state.disabled;
|
|
1833
|
-
const invalid = state.invalid;
|
|
1834
|
-
return /* @__PURE__ */ jsxs5(
|
|
1835
|
-
"div",
|
|
1836
|
-
{
|
|
1837
|
-
...props,
|
|
1838
|
-
ref: innerRef,
|
|
1839
|
-
className: clsx5(
|
|
1840
|
-
"flex flex-wrap flex-row gap-2 items-center bg-input-background text-input-text rounded-md px-2.5 py-2.5",
|
|
1841
|
-
props.className
|
|
1842
|
-
),
|
|
1843
|
-
"data-disabled": disabled ? "" : void 0,
|
|
1844
|
-
"data-invalid": invalid ? "" : void 0,
|
|
1845
|
-
"aria-invalid": invalid,
|
|
1846
|
-
"aria-disabled": disabled,
|
|
1847
|
-
children: [
|
|
1848
|
-
state.selectedOptions.map(({ value, label }) => /* @__PURE__ */ jsxs5(Chip, { className: "gap-x-2", children: [
|
|
1849
|
-
label,
|
|
1850
|
-
/* @__PURE__ */ jsx6(
|
|
1851
|
-
TextButton,
|
|
1852
|
-
{
|
|
1853
|
-
onClick: () => {
|
|
1854
|
-
item.toggleSelection(value, false);
|
|
1855
|
-
},
|
|
1856
|
-
size: "none",
|
|
1857
|
-
color: "negative",
|
|
1858
|
-
className: "flex-row-0 items-center px-0.5 py-0.5 w-6 h-6 rounded",
|
|
1859
|
-
children: /* @__PURE__ */ jsx6(XIcon, { className: "w-5 h-5" })
|
|
1860
|
-
}
|
|
1861
|
-
)
|
|
1862
|
-
] }, value)),
|
|
1863
|
-
/* @__PURE__ */ jsx6(
|
|
1864
|
-
IconButton,
|
|
1865
|
-
{
|
|
1866
|
-
id: state.id,
|
|
1867
|
-
onClick: () => toggleOpen(),
|
|
1868
|
-
onKeyDown: (event) => {
|
|
1869
|
-
switch (event.key) {
|
|
1870
|
-
case "ArrowDown":
|
|
1871
|
-
toggleOpen(true, { highlightStartPositionBehavior: "first" });
|
|
1872
|
-
break;
|
|
1873
|
-
case "ArrowUp":
|
|
1874
|
-
toggleOpen(true, { highlightStartPositionBehavior: "last" });
|
|
1875
|
-
}
|
|
1876
|
-
},
|
|
1877
|
-
size: "small",
|
|
1878
|
-
color: "neutral",
|
|
1879
|
-
"aria-invalid": invalid,
|
|
1880
|
-
"aria-disabled": disabled,
|
|
1881
|
-
"aria-haspopup": "listbox",
|
|
1882
|
-
"aria-expanded": state.isOpen,
|
|
1883
|
-
"aria-controls": state.isOpen ? `${state.id}-listbox` : void 0,
|
|
1884
|
-
children: /* @__PURE__ */ jsx6(Plus, {})
|
|
1885
|
-
}
|
|
1886
|
-
)
|
|
1887
|
-
]
|
|
1888
|
-
}
|
|
1889
|
-
);
|
|
1890
|
-
});
|
|
1891
|
-
var SelectContent = forwardRef3(
|
|
1892
|
-
function SelectContent2({
|
|
1893
|
-
alignment,
|
|
1894
|
-
orientation = "vertical",
|
|
1895
|
-
containerClassName,
|
|
1896
|
-
...props
|
|
1897
|
-
}, ref) {
|
|
1898
|
-
const innerRef = useRef3(null);
|
|
1899
|
-
useImperativeHandle(ref, () => innerRef.current);
|
|
1900
|
-
const { trigger, state, config, item } = useSelectContext();
|
|
1901
|
-
const position = useFloatingElement({
|
|
1902
|
-
active: state.isOpen,
|
|
1903
|
-
anchorRef: trigger.ref,
|
|
1904
|
-
containerRef: innerRef,
|
|
1905
|
-
...alignment
|
|
1906
|
-
});
|
|
1907
|
-
useFocusTrap({
|
|
1908
|
-
container: innerRef,
|
|
1909
|
-
active: state.isOpen && !!position
|
|
1910
|
-
});
|
|
1911
|
-
return createPortal2(
|
|
1912
|
-
/* @__PURE__ */ jsxs5(
|
|
1913
|
-
"div",
|
|
1914
|
-
{
|
|
1915
|
-
id: `select-container-${state.id}`,
|
|
1916
|
-
className: clsx5("fixed inset-0 w-screen h-screen", containerClassName),
|
|
1917
|
-
hidden: !state.isOpen,
|
|
1918
|
-
children: [
|
|
1919
|
-
/* @__PURE__ */ jsx6(
|
|
1920
|
-
"div",
|
|
1921
|
-
{
|
|
1922
|
-
id: `select-background-${state.id}`,
|
|
1923
|
-
onClick: () => trigger.toggleOpen(false),
|
|
1924
|
-
className: clsx5("fixed inset-0 w-screen h-screen")
|
|
1925
|
-
}
|
|
1926
|
-
),
|
|
1927
|
-
/* @__PURE__ */ jsx6(
|
|
1928
|
-
"ul",
|
|
1929
|
-
{
|
|
1930
|
-
...props,
|
|
1931
|
-
id: `${state.id}-listbox`,
|
|
1932
|
-
ref: innerRef,
|
|
1933
|
-
onKeyDown: (event) => {
|
|
1934
|
-
switch (event.key) {
|
|
1935
|
-
case "Escape":
|
|
1936
|
-
trigger.toggleOpen(false);
|
|
1937
|
-
event.preventDefault();
|
|
1938
|
-
event.stopPropagation();
|
|
1939
|
-
break;
|
|
1940
|
-
case match(orientation, {
|
|
1941
|
-
vertical: "ArrowDown",
|
|
1942
|
-
horizontal: "ArrowUp"
|
|
1943
|
-
}):
|
|
1944
|
-
item.moveHighlightedIndex(1);
|
|
1945
|
-
event.preventDefault();
|
|
1946
|
-
break;
|
|
1947
|
-
case match(orientation, {
|
|
1948
|
-
vertical: "ArrowUp",
|
|
1949
|
-
horizontal: "ArrowDown"
|
|
1950
|
-
}):
|
|
1951
|
-
item.moveHighlightedIndex(-1);
|
|
1952
|
-
event.preventDefault();
|
|
1953
|
-
break;
|
|
1954
|
-
case "Home":
|
|
1955
|
-
event.preventDefault();
|
|
1956
|
-
break;
|
|
1957
|
-
case "End":
|
|
1958
|
-
event.preventDefault();
|
|
1959
|
-
break;
|
|
1960
|
-
case "Enter":
|
|
1961
|
-
// Fall through
|
|
1962
|
-
case " ":
|
|
1963
|
-
if (state.highlightedValue) {
|
|
1964
|
-
item.toggleSelection(state.highlightedValue);
|
|
1965
|
-
if (!config.isMultiSelect) {
|
|
1966
|
-
trigger.toggleOpen(false);
|
|
1967
|
-
}
|
|
1968
|
-
event.preventDefault();
|
|
1969
|
-
}
|
|
1970
|
-
break;
|
|
1971
|
-
}
|
|
1972
|
-
},
|
|
1973
|
-
className: clsx5("flex-col-0 p-2 bg-menu-background text-menu-text rounded-md shadow-hw-bottom focus-style-within overflow-auto", props.className),
|
|
1974
|
-
style: {
|
|
1975
|
-
opacity: position ? void 0 : 0,
|
|
1976
|
-
position: "fixed",
|
|
1977
|
-
...position
|
|
1978
|
-
},
|
|
1979
|
-
role: "listbox",
|
|
1980
|
-
"aria-multiselectable": config.isMultiSelect,
|
|
1981
|
-
"aria-orientation": orientation,
|
|
1982
|
-
tabIndex: position ? 0 : void 0,
|
|
1983
|
-
children: props.children
|
|
1984
|
-
}
|
|
1985
|
-
)
|
|
1986
|
-
]
|
|
1987
|
-
}
|
|
1988
|
-
),
|
|
1989
|
-
document.body
|
|
1990
|
-
);
|
|
1991
|
-
}
|
|
1992
|
-
);
|
|
1993
|
-
var Select = forwardRef3(function Select2({
|
|
1994
|
-
children,
|
|
1995
|
-
contentPanelProps,
|
|
1996
|
-
buttonProps,
|
|
1997
|
-
...props
|
|
1998
|
-
}, ref) {
|
|
1999
|
-
return /* @__PURE__ */ jsxs5(SelectRoot, { ...props, isMultiSelect: false, children: [
|
|
2000
|
-
/* @__PURE__ */ jsx6(
|
|
2001
|
-
SelectButton,
|
|
2002
|
-
{
|
|
2003
|
-
ref,
|
|
2004
|
-
...buttonProps,
|
|
2005
|
-
selectedDisplay: (values) => {
|
|
2006
|
-
const value = values[0];
|
|
2007
|
-
if (!buttonProps?.selectedDisplay) return void 0;
|
|
2008
|
-
return buttonProps.selectedDisplay(value);
|
|
2009
|
-
}
|
|
2010
|
-
}
|
|
2011
|
-
),
|
|
2012
|
-
/* @__PURE__ */ jsx6(SelectContent, { ...contentPanelProps, children })
|
|
2013
|
-
] });
|
|
2014
|
-
});
|
|
2015
|
-
var SelectUncontrolled = forwardRef3(function SelectUncontrolled2({
|
|
2016
|
-
value: initialValue,
|
|
2017
|
-
onValueChanged,
|
|
2018
|
-
...props
|
|
2019
|
-
}, ref) {
|
|
2020
|
-
const [value, setValue] = useOverwritableState(initialValue, onValueChanged);
|
|
2021
|
-
return /* @__PURE__ */ jsx6(
|
|
2022
|
-
Select,
|
|
2023
|
-
{
|
|
2024
|
-
...props,
|
|
2025
|
-
ref,
|
|
2026
|
-
value,
|
|
2027
|
-
onValueChanged: setValue
|
|
2028
|
-
}
|
|
2029
|
-
);
|
|
2030
|
-
});
|
|
2031
|
-
var MultiSelect = forwardRef3(function MultiSelect2({
|
|
2032
|
-
children,
|
|
2033
|
-
contentPanelProps,
|
|
2034
|
-
buttonProps,
|
|
2035
|
-
...props
|
|
2036
|
-
}, ref) {
|
|
2037
|
-
return /* @__PURE__ */ jsxs5(SelectRoot, { ...props, isMultiSelect: true, children: [
|
|
2038
|
-
/* @__PURE__ */ jsx6(SelectButton, { ref, ...buttonProps }),
|
|
2039
|
-
/* @__PURE__ */ jsx6(SelectContent, { ...contentPanelProps, children })
|
|
2040
|
-
] });
|
|
2041
|
-
});
|
|
2042
|
-
var MultiSelectUncontrolled = forwardRef3(function MultiSelectUncontrolled2({
|
|
2043
|
-
values: initialValues,
|
|
2044
|
-
onValuesChanged,
|
|
2045
|
-
...props
|
|
2046
|
-
}, ref) {
|
|
2047
|
-
const [values, setValues] = useOverwritableState(initialValues, onValuesChanged);
|
|
2048
|
-
return /* @__PURE__ */ jsx6(
|
|
2049
|
-
MultiSelect,
|
|
2050
|
-
{
|
|
2051
|
-
...props,
|
|
2052
|
-
ref,
|
|
2053
|
-
values,
|
|
2054
|
-
onValuesChanged: setValues
|
|
2055
|
-
}
|
|
2056
|
-
);
|
|
2057
|
-
});
|
|
2058
|
-
var MultiSelectChipDisplay = forwardRef3(function MultiSelectChipDisplay2({
|
|
2059
|
-
children,
|
|
2060
|
-
contentPanelProps,
|
|
2061
|
-
chipDisplayProps,
|
|
2062
|
-
...props
|
|
2063
|
-
}, ref) {
|
|
2064
|
-
return /* @__PURE__ */ jsxs5(SelectRoot, { ...props, isMultiSelect: true, children: [
|
|
2065
|
-
/* @__PURE__ */ jsx6(SelectChipDisplay, { ref, ...chipDisplayProps }),
|
|
2066
|
-
/* @__PURE__ */ jsx6(SelectContent, { ...contentPanelProps, children })
|
|
2067
|
-
] });
|
|
2068
|
-
});
|
|
2069
|
-
var MultiSelectChipDisplayUncontrolled = forwardRef3(function MultiSelectChipDisplayUncontrolled2({
|
|
2070
|
-
values: initialValues,
|
|
2071
|
-
onValuesChanged,
|
|
2072
|
-
...props
|
|
2073
|
-
}, ref) {
|
|
2074
|
-
const [values, setValues] = useOverwritableState(initialValues, onValuesChanged);
|
|
2075
|
-
return /* @__PURE__ */ jsx6(
|
|
2076
|
-
MultiSelectChipDisplay,
|
|
2077
|
-
{
|
|
2078
|
-
...props,
|
|
2079
|
-
ref,
|
|
2080
|
-
values,
|
|
2081
|
-
onValuesChanged: setValues
|
|
2082
|
-
}
|
|
2083
|
-
);
|
|
2084
|
-
});
|
|
2085
|
-
|
|
2086
|
-
// src/components/dialog/LanguageDialog.tsx
|
|
2087
|
-
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2088
|
-
var LanguageDialog = ({
|
|
2089
|
-
onClose,
|
|
2090
|
-
titleOverwrite,
|
|
2091
|
-
descriptionOverwrite,
|
|
2092
|
-
...props
|
|
2093
|
-
}) => {
|
|
2094
|
-
const { locale, setLocale } = useLocale();
|
|
2095
|
-
const translation = useHightideTranslation();
|
|
2096
|
-
return /* @__PURE__ */ jsx7(
|
|
2097
|
-
Dialog,
|
|
2098
|
-
{
|
|
2099
|
-
titleElement: titleOverwrite ?? translation("language"),
|
|
2100
|
-
description: descriptionOverwrite ?? translation("chooseLanguage"),
|
|
2101
|
-
onClose,
|
|
2102
|
-
...props,
|
|
2103
|
-
children: /* @__PURE__ */ jsxs6("div", { className: "w-64", children: [
|
|
2104
|
-
/* @__PURE__ */ jsx7(
|
|
2105
|
-
Select,
|
|
2106
|
-
{
|
|
2107
|
-
value: locale,
|
|
2108
|
-
onValueChanged: (language) => setLocale(language),
|
|
2109
|
-
contentPanelProps: { containerClassName: "z-200" },
|
|
2110
|
-
buttonProps: {
|
|
2111
|
-
selectedDisplay: (locale2) => LocalizationUtil.languagesLocalNames[locale2]
|
|
2112
|
-
},
|
|
2113
|
-
children: LocalizationUtil.locals.map((local) => /* @__PURE__ */ jsx7(SelectOption, { value: local, children: LocalizationUtil.languagesLocalNames[local] }, local))
|
|
2114
|
-
}
|
|
2115
|
-
),
|
|
2116
|
-
/* @__PURE__ */ jsx7("div", { className: "flex-row-4 mt-3 justify-end", children: /* @__PURE__ */ jsx7(SolidButton, { color: "positive", onClick: onClose, children: translation("done") }) })
|
|
2117
|
-
] })
|
|
2118
|
-
}
|
|
2119
|
-
);
|
|
2120
|
-
};
|
|
2121
|
-
export {
|
|
2122
|
-
LanguageDialog
|
|
2123
|
-
};
|
|
2124
|
-
//# sourceMappingURL=LanguageDialog.js.map
|