@prokodo/ui 0.1.14 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +187 -26
- package/NOTICE +24 -0
- package/README.md +32 -302
- package/dist/components/RTE/RTE.client.js +0 -1
- package/dist/components/RTE/RTE.css +180 -68
- package/dist/components/RTE/RTE.js +4 -1
- package/dist/components/RTE/RTE.module.css +180 -68
- package/dist/components/RTE/RTE.module.scss.js +10 -0
- package/dist/components/RTE/RTE.view.js +5 -1
- package/dist/components/accordion/Accordion.css +120 -67
- package/dist/components/accordion/Accordion.js +8 -2
- package/dist/components/accordion/Accordion.module.css +120 -67
- package/dist/components/accordion/Accordion.module.scss.js +12 -5
- package/dist/components/accordion/Accordion.view.js +4 -4
- package/dist/components/animated/Animated.client.js +13 -5
- package/dist/components/animated/Animated.js +8 -2
- package/dist/components/animatedText/AnimatedText.client.js +10 -2
- package/dist/components/animatedText/AnimatedText.js +8 -2
- package/dist/components/autocomplete/Autocomplete.client.js +5 -1
- package/dist/components/autocomplete/Autocomplete.css +111 -95
- package/dist/components/autocomplete/Autocomplete.js +4 -1
- package/dist/components/autocomplete/Autocomplete.module.css +111 -95
- package/dist/components/autocomplete/Autocomplete.module.scss.js +11 -4
- package/dist/components/autocomplete/Autocomplete.view.js +16 -5
- package/dist/components/avatar/Avatar.css +11 -8
- package/dist/components/avatar/Avatar.js +4 -1
- package/dist/components/avatar/Avatar.module.css +11 -8
- package/dist/components/avatar/Avatar.module.scss.js +1 -0
- package/dist/components/avatar/Avatar.view.js +22 -15
- package/dist/components/base-link/BaseLink.js +4 -1
- package/dist/components/base-link/BaseLink.view.js +3 -0
- package/dist/components/button/Button.client.js +12 -16
- package/dist/components/button/Button.css +85 -137
- package/dist/components/button/Button.js +4 -1
- package/dist/components/button/Button.module.css +85 -137
- package/dist/components/button/Button.module.scss.js +15 -19
- package/dist/components/button/Button.view.js +8 -2
- package/dist/components/calendly/Calendly.css +132 -0
- package/dist/components/calendly/Calendly.js +8 -2
- package/dist/components/calendly/Calendly.module.css +132 -0
- package/dist/components/calendly/Calendly.module.scss.js +6 -0
- package/dist/components/calendly/Calendly.view.js +12 -6
- package/dist/components/card/Card.client.js +6 -1
- package/dist/components/card/Card.css +67 -32
- package/dist/components/card/Card.js +11 -5
- package/dist/components/card/Card.module.css +67 -32
- package/dist/components/card/Card.module.scss.js +8 -2
- package/dist/components/card/Card.view.js +25 -8
- package/dist/components/carousel/Carousel.client.js +138 -129
- package/dist/components/carousel/Carousel.css +8 -4
- package/dist/components/carousel/Carousel.js +8 -2
- package/dist/components/carousel/Carousel.module.css +8 -4
- package/dist/components/carousel/Carousel.view.js +10 -0
- package/dist/components/checkbox/Checkbox.css +100 -79
- package/dist/components/checkbox/Checkbox.js +4 -1
- package/dist/components/checkbox/Checkbox.module.css +100 -79
- package/dist/components/checkbox/Checkbox.module.scss.js +11 -4
- package/dist/components/checkbox/Checkbox.view.js +7 -2
- package/dist/components/checkbox-group/CheckboxGroup.css +39 -6
- package/dist/components/checkbox-group/CheckboxGroup.js +4 -1
- package/dist/components/checkbox-group/CheckboxGroup.module.css +39 -6
- package/dist/components/checkbox-group/CheckboxGroup.module.scss.js +8 -0
- package/dist/components/checkbox-group/CheckboxGroup.view.js +7 -2
- package/dist/components/chip/Chip.css +185 -61
- package/dist/components/chip/Chip.js +4 -1
- package/dist/components/chip/Chip.module.css +185 -61
- package/dist/components/chip/Chip.module.scss.js +13 -17
- package/dist/components/chip/Chip.view.js +7 -4
- package/dist/components/datePicker/DatePicker.client.js +211 -66
- package/dist/components/datePicker/DatePicker.css +940 -0
- package/dist/components/datePicker/DatePicker.js +4 -1
- package/dist/components/datePicker/DatePicker.module.css +940 -0
- package/dist/components/datePicker/DatePicker.module.scss.js +62 -0
- package/dist/components/datePicker/DatePicker.server.js +31 -1
- package/dist/components/datePicker/DatePicker.utils.js +103 -0
- package/dist/components/datePicker/DatePicker.view.js +113 -41
- package/dist/components/datePicker/DatePickerDialog.view.js +291 -0
- package/dist/components/dialog/Dialog.css +107 -132
- package/dist/components/dialog/Dialog.js +8 -2
- package/dist/components/dialog/Dialog.module.css +107 -132
- package/dist/components/dialog/Dialog.module.scss.js +13 -8
- package/dist/components/dialog/Dialog.view.js +23 -5
- package/dist/components/drawer/Drawer.client.js +0 -1
- package/dist/components/drawer/Drawer.css +8 -8
- package/dist/components/drawer/Drawer.js +4 -1
- package/dist/components/drawer/Drawer.module.css +8 -8
- package/dist/components/drawer/Drawer.view.js +14 -3
- package/dist/components/dynamic-list/DynamicList.client.js +1 -0
- package/dist/components/dynamic-list/DynamicList.css +20 -12
- package/dist/components/dynamic-list/DynamicList.js +4 -1
- package/dist/components/dynamic-list/DynamicList.module.css +20 -12
- package/dist/components/dynamic-list/DynamicList.module.scss.js +1 -0
- package/dist/components/dynamic-list/DynamicList.view.js +89 -44
- package/dist/components/form/Form.client.js +4 -1
- package/dist/components/form/Form.js +4 -1
- package/dist/components/form/Form.view.js +6 -4
- package/dist/components/form/FormField.client.js +59 -4
- package/dist/components/form/FormField.js +4 -1
- package/dist/components/form/FormField.server.js +10 -4
- package/dist/components/form/FormResponse.js +6 -3
- package/dist/components/grid/Grid.css +1 -1
- package/dist/components/grid/Grid.module.css +1 -1
- package/dist/components/headline/Headline.css +16 -16
- package/dist/components/headline/Headline.js +13 -8
- package/dist/components/headline/Headline.module.css +16 -16
- package/dist/components/headline/Headline.module.scss.js +1 -1
- package/dist/components/headline/Headline.variants.js +4 -1
- package/dist/components/icon/Icon.css +14 -14
- package/dist/components/icon/Icon.js +8 -2
- package/dist/components/icon/Icon.module.css +14 -14
- package/dist/components/image/Image.client.js +9 -5
- package/dist/components/image/Image.css +4 -3
- package/dist/components/image/Image.js +8 -2
- package/dist/components/image/Image.module.css +4 -3
- package/dist/components/image/Image.server.js +2 -1
- package/dist/components/image-text/ImageText.css +43 -14
- package/dist/components/image-text/ImageText.js +68 -50
- package/dist/components/image-text/ImageText.module.css +43 -14
- package/dist/components/image-text/ImageText.module.scss.js +11 -2
- package/dist/components/input/Input.client.js +15 -2
- package/dist/components/input/Input.css +197 -115
- package/dist/components/input/Input.js +4 -1
- package/dist/components/input/Input.module.css +197 -115
- package/dist/components/input/Input.module.scss.js +19 -3
- package/dist/components/input/Input.view.js +102 -63
- package/dist/components/input/InputValidation.js +6 -2
- package/dist/components/inputOTP/InputOTP.client.js +165 -0
- package/dist/components/inputOTP/InputOTP.css +155 -7
- package/dist/components/inputOTP/InputOTP.js +10 -194
- package/dist/components/inputOTP/InputOTP.lazy.js +12 -0
- package/dist/components/inputOTP/InputOTP.module.css +155 -7
- package/dist/components/inputOTP/InputOTP.module.scss.js +14 -0
- package/dist/components/inputOTP/InputOTP.server.js +32 -0
- package/dist/components/inputOTP/InputOTP.view.js +117 -0
- package/dist/components/label/Label.css +33 -14
- package/dist/components/label/Label.js +37 -35
- package/dist/components/label/Label.module.css +33 -14
- package/dist/components/label/Label.module.scss.js +9 -2
- package/dist/components/link/Link.css +13 -13
- package/dist/components/link/Link.js +5 -3
- package/dist/components/link/Link.module.css +13 -13
- package/dist/components/link/Link.view.js +16 -13
- package/dist/components/list/List.css +71 -32
- package/dist/components/list/List.js +74 -28
- package/dist/components/list/List.module.css +71 -32
- package/dist/components/list/List.module.scss.js +1 -1
- package/dist/components/loading/Loading.js +4 -1
- package/dist/components/loading/Loading.view.js +47 -7
- package/dist/components/lottie/Lottie.css +16 -0
- package/dist/components/lottie/Lottie.js +9 -5
- package/dist/components/lottie/Lottie.module.css +16 -0
- package/dist/components/lottie/Lottie.module.scss.js +6 -2
- package/dist/components/map/Map.css +130 -0
- package/dist/components/map/Map.js +67 -46
- package/dist/components/map/Map.module.css +130 -0
- package/dist/components/map/Map.module.scss.js +6 -0
- package/dist/components/pagination/Pagination.css +127 -11
- package/dist/components/pagination/Pagination.js +4 -1
- package/dist/components/pagination/Pagination.module.css +127 -11
- package/dist/components/pagination/Pagination.module.scss.js +12 -4
- package/dist/components/pagination/Pagination.view.js +16 -2
- package/dist/components/post-item/PostItem.css +16 -16
- package/dist/components/post-item/PostItem.js +4 -1
- package/dist/components/post-item/PostItem.module.css +16 -16
- package/dist/components/post-item/PostItem.view.js +14 -5
- package/dist/components/post-item/PostItemAuthor.js +4 -1
- package/dist/components/post-teaser/PostTeaser.css +13 -13
- package/dist/components/post-teaser/PostTeaser.js +4 -1
- package/dist/components/post-teaser/PostTeaser.module.css +13 -13
- package/dist/components/post-teaser/PostTeaser.view.js +14 -5
- package/dist/components/post-widget/PostWidget.css +6 -8
- package/dist/components/post-widget/PostWidget.js +5 -3
- package/dist/components/post-widget/PostWidget.module.css +6 -8
- package/dist/components/post-widget/PostWidget.view.js +21 -8
- package/dist/components/post-widget-carousel/PostWidgetCarousel.css +7 -7
- package/dist/components/post-widget-carousel/PostWidgetCarousel.js +8 -2
- package/dist/components/post-widget-carousel/PostWidgetCarousel.module.css +7 -7
- package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +32 -14
- package/dist/components/progressBar/ProgressBar.css +4 -4
- package/dist/components/progressBar/ProgressBar.js +8 -2
- package/dist/components/progressBar/ProgressBar.module.css +4 -4
- package/dist/components/progressBar/ProgressBar.view.js +6 -3
- package/dist/components/quote/Quote.css +21 -6
- package/dist/components/quote/Quote.js +5 -5
- package/dist/components/quote/Quote.module.css +21 -6
- package/dist/components/quote/Quote.module.scss.js +5 -0
- package/dist/components/rating/Rating.client.js +6 -1
- package/dist/components/rating/Rating.css +34 -21
- package/dist/components/rating/Rating.js +4 -1
- package/dist/components/rating/Rating.module.css +34 -21
- package/dist/components/rating/Rating.module.scss.js +8 -0
- package/dist/components/rating/Rating.view.js +4 -2
- package/dist/components/rich-text/RichText.client.js +55 -20
- package/dist/components/rich-text/RichText.css +47 -31
- package/dist/components/rich-text/RichText.js +8 -2
- package/dist/components/rich-text/RichText.module.css +47 -31
- package/dist/components/rich-text/RichText.server.js +3 -0
- package/dist/components/select/Select.client.js +303 -102
- package/dist/components/select/Select.css +542 -221
- package/dist/components/select/Select.js +8 -2
- package/dist/components/select/Select.module.css +542 -221
- package/dist/components/select/Select.module.scss.js +57 -14
- package/dist/components/select/Select.view.js +75 -25
- package/dist/components/sidenav/SideNav.client.js +24 -1
- package/dist/components/sidenav/SideNav.css +89 -21
- package/dist/components/sidenav/SideNav.js +8 -2
- package/dist/components/sidenav/SideNav.module.css +89 -21
- package/dist/components/sidenav/SideNav.module.scss.js +6 -1
- package/dist/components/sidenav/SideNav.view.js +69 -14
- package/dist/components/skeleton/Skeleton.css +7 -7
- package/dist/components/skeleton/Skeleton.module.css +7 -7
- package/dist/components/slider/Slider.client.js +11 -2
- package/dist/components/slider/Slider.css +177 -112
- package/dist/components/slider/Slider.js +4 -1
- package/dist/components/slider/Slider.module.css +177 -112
- package/dist/components/slider/Slider.module.scss.js +11 -2
- package/dist/components/slider/Slider.view.js +140 -90
- package/dist/components/snackbar/Snackbar.client.js +5 -1
- package/dist/components/snackbar/Snackbar.css +125 -64
- package/dist/components/snackbar/Snackbar.js +4 -1
- package/dist/components/snackbar/Snackbar.module.css +125 -64
- package/dist/components/snackbar/Snackbar.module.scss.js +11 -13
- package/dist/components/snackbar/Snackbar.view.js +2 -2
- package/dist/components/snackbar/SnackbarProvider.js +8 -2
- package/dist/components/stepper/Stepper.client.js +27 -9
- package/dist/components/stepper/Stepper.css +46 -11
- package/dist/components/stepper/Stepper.js +4 -1
- package/dist/components/stepper/Stepper.module.css +46 -11
- package/dist/components/stepper/Stepper.module.scss.js +7 -0
- package/dist/components/stepper/Stepper.server.js +2 -0
- package/dist/components/stepper/Stepper.view.js +6 -1
- package/dist/components/switch/Switch.css +108 -84
- package/dist/components/switch/Switch.js +4 -1
- package/dist/components/switch/Switch.module.css +108 -84
- package/dist/components/switch/Switch.module.scss.js +14 -12
- package/dist/components/switch/Switch.view.js +10 -8
- package/dist/components/table/Table.css +19 -14
- package/dist/components/table/Table.js +1 -0
- package/dist/components/table/Table.module.css +19 -14
- package/dist/components/tabs/Tabs.client.js +1 -0
- package/dist/components/tabs/Tabs.css +53 -27
- package/dist/components/tabs/Tabs.js +8 -2
- package/dist/components/tabs/Tabs.module.css +53 -27
- package/dist/components/tabs/Tabs.module.scss.js +7 -2
- package/dist/components/tabs/Tabs.view.js +12 -4
- package/dist/components/teaser/Teaser.css +5 -5
- package/dist/components/teaser/Teaser.js +4 -4
- package/dist/components/teaser/Teaser.module.css +5 -5
- package/dist/components/tooltip/Tooltip.client.js +140 -95
- package/dist/components/tooltip/Tooltip.css +46 -9
- package/dist/components/tooltip/Tooltip.js +10 -4
- package/dist/components/tooltip/Tooltip.module.css +46 -9
- package/dist/components/tooltip/Tooltip.module.scss.js +5 -1
- package/dist/components/tooltip/Tooltip.view.js +7 -1
- package/dist/constants/project.js +1 -1
- package/dist/helpers/createIsland.js +1 -0
- package/dist/helpers/createLazyWrapper.js +1 -0
- package/dist/hooks/useGoogleMaps.js +0 -1
- package/dist/theme.css +3269 -1588
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/RTE/RTE.d.ts +6 -1
- package/dist/types/components/RTE/RTE.lazy.d.ts +6 -1
- package/dist/types/components/RTE/RTE.view.d.ts +1 -1
- package/dist/types/components/accordion/Accordion.d.ts +1 -1
- package/dist/types/components/accordion/Accordion.lazy.d.ts +1 -1
- package/dist/types/components/accordion/Accordion.model.d.ts +1 -1
- package/dist/types/components/accordion/Accordion.view.d.ts +1 -1
- package/dist/types/components/autocomplete/Autocomplete.model.d.ts +2 -0
- package/dist/types/components/autocomplete/Autocomplete.view.d.ts +1 -1
- package/dist/types/components/avatar/Avatar.d.ts +1 -1
- package/dist/types/components/avatar/Avatar.lazy.d.ts +1 -1
- package/dist/types/components/avatar/Avatar.model.d.ts +1 -1
- package/dist/types/components/avatar/Avatar.view.d.ts +1 -1
- package/dist/types/components/calendly/Calendly.view.d.ts +1 -1
- package/dist/types/components/card/Card.model.d.ts +1 -1
- package/dist/types/components/card/Card.view.d.ts +1 -1
- package/dist/types/components/carousel/Carousel.view.d.ts +1 -1
- package/dist/types/components/checkbox/Checkbox.d.ts +1 -0
- package/dist/types/components/checkbox/Checkbox.lazy.d.ts +1 -0
- package/dist/types/components/checkbox/Checkbox.model.d.ts +2 -0
- package/dist/types/components/checkbox/Checkbox.view.d.ts +1 -1
- package/dist/types/components/checkbox-group/CheckboxGroup.model.d.ts +2 -0
- package/dist/types/components/checkbox-group/CheckboxGroup.view.d.ts +1 -1
- package/dist/types/components/datePicker/DatePicker.model.d.ts +70 -1
- package/dist/types/components/datePicker/DatePicker.utils.d.ts +10 -0
- package/dist/types/components/datePicker/DatePicker.view.d.ts +7 -4
- package/dist/types/components/datePicker/DatePickerDialog.view.d.ts +4 -0
- package/dist/types/components/dynamic-list/DynamicList.model.d.ts +3 -1
- package/dist/types/components/dynamic-list/DynamicList.view.d.ts +1 -1
- package/dist/types/components/form/Form.d.ts +1 -1
- package/dist/types/components/form/Form.lazy.d.ts +1 -1
- package/dist/types/components/form/Form.model.d.ts +19 -4
- package/dist/types/components/form/FormField.client.d.ts +2 -2
- package/dist/types/components/form/FormField.d.ts +1 -1
- package/dist/types/components/form/FormField.lazy.d.ts +1 -1
- package/dist/types/components/form/FormField.server.d.ts +2 -2
- package/dist/types/components/headline/Headline.model.d.ts +2 -2
- package/dist/types/components/input/Input.model.d.ts +8 -1
- package/dist/types/components/input/Input.view.d.ts +1 -1
- package/dist/types/components/inputOTP/InputOTP.client.d.ts +4 -0
- package/dist/types/components/inputOTP/InputOTP.d.ts +10 -3
- package/dist/types/components/inputOTP/InputOTP.lazy.d.ts +11 -0
- package/dist/types/components/inputOTP/InputOTP.model.d.ts +10 -0
- package/dist/types/components/inputOTP/InputOTP.server.d.ts +3 -0
- package/dist/types/components/inputOTP/InputOTP.view.d.ts +3 -0
- package/dist/types/components/inputOTP/index.d.ts +1 -1
- package/dist/types/components/label/Label.model.d.ts +2 -0
- package/dist/types/components/link/Link.model.d.ts +1 -1
- package/dist/types/components/link/Link.view.d.ts +1 -1
- package/dist/types/components/list/List.d.ts +1 -1
- package/dist/types/components/list/List.model.d.ts +14 -5
- package/dist/types/components/list/index.d.ts +1 -1
- package/dist/types/components/loading/Loading.model.d.ts +2 -0
- package/dist/types/components/loading/index.d.ts +1 -1
- package/dist/types/components/pagination/Pagination.model.d.ts +2 -0
- package/dist/types/components/pagination/Pagination.view.d.ts +1 -1
- package/dist/types/components/post-item/PostItem.model.d.ts +2 -1
- package/dist/types/components/post-teaser/PostTeaser.model.d.ts +2 -1
- package/dist/types/components/post-widget/PostWidget.view.d.ts +1 -1
- package/dist/types/components/progressBar/ProgressBar.d.ts +1 -1
- package/dist/types/components/progressBar/ProgressBar.lazy.d.ts +1 -1
- package/dist/types/components/progressBar/ProgressBar.model.d.ts +3 -2
- package/dist/types/components/progressBar/ProgressBar.view.d.ts +1 -1
- package/dist/types/components/progressBar/index.d.ts +1 -1
- package/dist/types/components/quote/Quote.model.d.ts +1 -1
- package/dist/types/components/rating/Rating.model.d.ts +2 -0
- package/dist/types/components/rich-text/RichText.client.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.lazy.d.ts +1 -1
- package/dist/types/components/rich-text/RichText.model.d.ts +1 -1
- package/dist/types/components/select/Select.model.d.ts +2 -0
- package/dist/types/components/select/Select.view.d.ts +1 -1
- package/dist/types/components/sidenav/SideNav.client.d.ts +1 -1
- package/dist/types/components/sidenav/SideNav.model.d.ts +16 -2
- package/dist/types/components/sidenav/SideNav.view.d.ts +1 -1
- package/dist/types/components/slider/Slider.model.d.ts +2 -0
- package/dist/types/components/snackbar/Snackbar.model.d.ts +3 -2
- package/dist/types/components/snackbar/Snackbar.view.d.ts +3 -2
- package/dist/types/components/snackbar/index.d.ts +1 -1
- package/dist/types/components/stepper/Stepper.d.ts +1 -0
- package/dist/types/components/stepper/Stepper.lazy.d.ts +1 -0
- package/dist/types/components/stepper/Stepper.model.d.ts +3 -0
- package/dist/types/components/stepper/Stepper.server.d.ts +1 -1
- package/dist/types/components/switch/Switch.d.ts +2 -2
- package/dist/types/components/switch/Switch.lazy.d.ts +2 -2
- package/dist/types/components/switch/Switch.model.d.ts +3 -4
- package/dist/types/components/tabs/Tabs.model.d.ts +2 -0
- package/dist/types/components/tabs/Tabs.view.d.ts +1 -1
- package/dist/types/components/teaser/Teaser.model.d.ts +1 -1
- package/dist/types/components/tooltip/Tooltip.model.d.ts +2 -0
- package/package.json +53 -24
|
@@ -5,8 +5,14 @@ import TabsServer from "./Tabs.server.js";
|
|
|
5
5
|
const Tabs = createIsland({
|
|
6
6
|
name: "Tabs",
|
|
7
7
|
Server: TabsServer,
|
|
8
|
-
loadLazy:
|
|
9
|
-
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Tabs.lazy.js"), "loadLazy")
|
|
11
|
+
),
|
|
12
|
+
isInteractive: (
|
|
13
|
+
/* istanbul ignore next */
|
|
14
|
+
/* @__PURE__ */ __name(() => true, "isInteractive")
|
|
15
|
+
)
|
|
10
16
|
});
|
|
11
17
|
export {
|
|
12
18
|
Tabs
|
|
@@ -127,15 +127,18 @@
|
|
|
127
127
|
.prokodo-Tabs {
|
|
128
128
|
width: 100%;
|
|
129
129
|
}
|
|
130
|
+
.pk-theme-dark .prokodo-Tabs {
|
|
131
|
+
--pk-tabs-border: var(--pk-palette-grey-500);
|
|
132
|
+
}
|
|
130
133
|
.prokodo-Tabs--vertical {
|
|
131
134
|
display: grid;
|
|
132
|
-
grid-gap:
|
|
133
|
-
gap:
|
|
135
|
+
grid-gap: var(--pk-tabs-gap);
|
|
136
|
+
gap: var(--pk-tabs-gap);
|
|
134
137
|
grid-template-columns: minmax(px-to-rem(180px), px-to-rem(260px)) 1fr;
|
|
135
138
|
}
|
|
136
139
|
.prokodo-Tabs__list {
|
|
137
140
|
align-items: stretch;
|
|
138
|
-
border-bottom: 1px solid var(--
|
|
141
|
+
border-bottom: 1px solid var(--pk-tabs-border);
|
|
139
142
|
display: flex;
|
|
140
143
|
gap: 0;
|
|
141
144
|
overflow-x: auto;
|
|
@@ -143,35 +146,26 @@
|
|
|
143
146
|
position: relative;
|
|
144
147
|
scrollbar-width: none;
|
|
145
148
|
}
|
|
146
|
-
html[data-theme=dark] .prokodo-Tabs__list {
|
|
147
|
-
border-bottom-color: var(--color-grey-700);
|
|
148
|
-
}
|
|
149
149
|
.prokodo-Tabs__list--vertical {
|
|
150
150
|
border-bottom: none;
|
|
151
|
-
border-right: 1px solid var(--
|
|
151
|
+
border-right: 1px solid var(--pk-tabs-border);
|
|
152
152
|
flex-direction: column;
|
|
153
153
|
overflow-x: visible;
|
|
154
154
|
}
|
|
155
|
-
html[data-theme=dark] .prokodo-Tabs__list--vertical {
|
|
156
|
-
border-right-color: var(--color-grey-700);
|
|
157
|
-
}
|
|
158
|
-
.prokodo-Tabs__list--disabled {
|
|
159
|
-
opacity: 0.7;
|
|
160
|
-
}
|
|
161
155
|
.prokodo-Tabs__tab {
|
|
162
156
|
align-items: center;
|
|
163
157
|
background: transparent;
|
|
164
158
|
border: none;
|
|
165
|
-
border-top-left-radius:
|
|
166
|
-
border-top-right-radius:
|
|
159
|
+
border-top-left-radius: var(--pk-tabs-radius);
|
|
160
|
+
border-top-right-radius: var(--pk-tabs-radius);
|
|
167
161
|
box-shadow: none;
|
|
168
|
-
color: var(--
|
|
162
|
+
color: var(--pk-tabs-tab-color);
|
|
169
163
|
cursor: pointer;
|
|
170
164
|
display: inline-flex;
|
|
171
|
-
gap:
|
|
165
|
+
gap: var(--pk-tabs-pad-sm);
|
|
172
166
|
justify-content: center;
|
|
173
167
|
min-height: px-to-rem(44px);
|
|
174
|
-
padding:
|
|
168
|
+
padding: var(--pk-tabs-pad-md) var(--pk-tabs-pad-lg);
|
|
175
169
|
position: relative;
|
|
176
170
|
transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
|
|
177
171
|
font-weight: 400;
|
|
@@ -199,11 +193,13 @@ html[data-theme=dark] .prokodo-Tabs__list--vertical {
|
|
|
199
193
|
border-top-right-radius: 0;
|
|
200
194
|
}
|
|
201
195
|
.prokodo-Tabs__tab:hover {
|
|
202
|
-
background: var(--
|
|
196
|
+
background: var(--pk-tabs-tab-hover-bg);
|
|
197
|
+
border-radius: var(--pk-tabs-radius) var(--pk-tabs-radius) 0 0;
|
|
203
198
|
}
|
|
204
199
|
.prokodo-Tabs__tab:focus-visible {
|
|
205
200
|
outline: 0;
|
|
206
|
-
background: var(--
|
|
201
|
+
background: var(--pk-tabs-tab-hover-bg);
|
|
202
|
+
border-radius: var(--pk-tabs-radius) var(--pk-tabs-radius) 0 0;
|
|
207
203
|
}
|
|
208
204
|
.prokodo-Tabs__tab::after {
|
|
209
205
|
background: transparent;
|
|
@@ -221,14 +217,14 @@ html[data-theme=dark] .prokodo-Tabs__list--vertical {
|
|
|
221
217
|
flex: 1 1;
|
|
222
218
|
}
|
|
223
219
|
.prokodo-Tabs__tab--selected {
|
|
224
|
-
color: var(--
|
|
220
|
+
color: var(--pk-tabs-tab-selected-color);
|
|
225
221
|
}
|
|
226
222
|
.prokodo-Tabs__tab--selected::after {
|
|
227
|
-
background: var(--
|
|
223
|
+
background: var(--pk-tabs-indicator-gradient);
|
|
228
224
|
transform: scaleX(1);
|
|
229
225
|
}
|
|
230
226
|
.prokodo-Tabs__tab--disabled {
|
|
231
|
-
color: var(--
|
|
227
|
+
color: var(--pk-tabs-tab-disabled-color);
|
|
232
228
|
cursor: not-allowed;
|
|
233
229
|
opacity: 0.58;
|
|
234
230
|
}
|
|
@@ -242,6 +238,12 @@ html[data-theme=dark] .prokodo-Tabs__list--vertical {
|
|
|
242
238
|
justify-content: flex-start;
|
|
243
239
|
text-align: left;
|
|
244
240
|
}
|
|
241
|
+
.prokodo-Tabs__list--vertical .prokodo-Tabs__tab:hover {
|
|
242
|
+
border-radius: var(--pk-tabs-radius) 0 0 var(--pk-tabs-radius);
|
|
243
|
+
}
|
|
244
|
+
.prokodo-Tabs__list--vertical .prokodo-Tabs__tab:focus-visible {
|
|
245
|
+
border-radius: var(--pk-tabs-radius) 0 0 var(--pk-tabs-radius);
|
|
246
|
+
}
|
|
245
247
|
.prokodo-Tabs__list--vertical .prokodo-Tabs__tab::after {
|
|
246
248
|
bottom: 0;
|
|
247
249
|
height: auto;
|
|
@@ -263,13 +265,13 @@ html[data-theme=dark] .prokodo-Tabs__list--vertical {
|
|
|
263
265
|
}
|
|
264
266
|
.prokodo-Tabs__badge {
|
|
265
267
|
align-items: center;
|
|
266
|
-
background: var(--
|
|
268
|
+
background: var(--pk-tabs-badge-bg);
|
|
267
269
|
border-radius: px-to-rem(999px);
|
|
268
|
-
color: var(--
|
|
270
|
+
color: var(--pk-tabs-badge-fg);
|
|
269
271
|
display: inline-flex;
|
|
270
272
|
justify-content: center;
|
|
271
273
|
min-width: px-to-rem(20px);
|
|
272
|
-
padding: 0
|
|
274
|
+
padding: 0 var(--pk-tabs-pad-xs);
|
|
273
275
|
font-size: px-to-rem(12px);
|
|
274
276
|
font-weight: 400;
|
|
275
277
|
font-size: 1.125rem;
|
|
@@ -319,7 +321,7 @@ html[data-theme=dark] .prokodo-Tabs__list--vertical {
|
|
|
319
321
|
background: transparent;
|
|
320
322
|
border-radius: 0;
|
|
321
323
|
box-shadow: none;
|
|
322
|
-
padding:
|
|
324
|
+
padding: var(--pk-tabs-pad-lg);
|
|
323
325
|
}
|
|
324
326
|
.prokodo-Tabs__panel[hidden] {
|
|
325
327
|
display: none !important;
|
|
@@ -327,4 +329,28 @@ html[data-theme=dark] .prokodo-Tabs__list--vertical {
|
|
|
327
329
|
.prokodo-Tabs__panel:focus-visible {
|
|
328
330
|
outline: 0;
|
|
329
331
|
background: var(--gradient-border-4);
|
|
332
|
+
}
|
|
333
|
+
.prokodo-Tabs--color-primary {
|
|
334
|
+
--pk-tabs-indicator-gradient: var(--gradient-border-4);
|
|
335
|
+
--pk-tabs-tab-hover-bg: color-mix(in srgb, var(--pk-color-brand) 10%, transparent);
|
|
336
|
+
}
|
|
337
|
+
.prokodo-Tabs--color-secondary {
|
|
338
|
+
--pk-tabs-indicator-gradient: var(--gradient-border-2);
|
|
339
|
+
--pk-tabs-tab-hover-bg: color-mix(in srgb, var(--pk-color-accent) 10%, transparent);
|
|
340
|
+
}
|
|
341
|
+
.prokodo-Tabs--color-success {
|
|
342
|
+
--pk-tabs-indicator-gradient: var(--gradient-border-success);
|
|
343
|
+
--pk-tabs-tab-hover-bg: color-mix(in srgb, var(--pk-color-success) 10%, transparent);
|
|
344
|
+
}
|
|
345
|
+
.prokodo-Tabs--color-error {
|
|
346
|
+
--pk-tabs-indicator-gradient: var(--gradient-border-error);
|
|
347
|
+
--pk-tabs-tab-hover-bg: color-mix(in srgb, var(--pk-color-error) 10%, transparent);
|
|
348
|
+
}
|
|
349
|
+
.prokodo-Tabs--color-warning {
|
|
350
|
+
--pk-tabs-indicator-gradient: var(--gradient-border-warning);
|
|
351
|
+
--pk-tabs-tab-hover-bg: color-mix(in srgb, var(--pk-color-warning) 10%, transparent);
|
|
352
|
+
}
|
|
353
|
+
.prokodo-Tabs--color-info {
|
|
354
|
+
--pk-tabs-indicator-gradient: var(--gradient-border-info);
|
|
355
|
+
--pk-tabs-tab-hover-bg: color-mix(in srgb, var(--pk-color-muted) 20%, transparent);
|
|
330
356
|
}
|
|
@@ -3,7 +3,6 @@ const styles = {
|
|
|
3
3
|
"prokodo-Tabs--vertical": "prokodo-Tabs--vertical",
|
|
4
4
|
"prokodo-Tabs__list": "prokodo-Tabs__list",
|
|
5
5
|
"prokodo-Tabs__list--vertical": "prokodo-Tabs__list--vertical",
|
|
6
|
-
"prokodo-Tabs__list--disabled": "prokodo-Tabs__list--disabled",
|
|
7
6
|
"prokodo-Tabs__tab": "prokodo-Tabs__tab",
|
|
8
7
|
"prokodo-Tabs__tab--vertical": "prokodo-Tabs__tab--vertical",
|
|
9
8
|
"prokodo-Tabs__tab--fullWidth": "prokodo-Tabs__tab--fullWidth",
|
|
@@ -12,7 +11,13 @@ const styles = {
|
|
|
12
11
|
"prokodo-Tabs__tabLabel": "prokodo-Tabs__tabLabel",
|
|
13
12
|
"prokodo-Tabs__badge": "prokodo-Tabs__badge",
|
|
14
13
|
"prokodo-Tabs__badgeChip": "prokodo-Tabs__badgeChip",
|
|
15
|
-
"prokodo-Tabs__panel": "prokodo-Tabs__panel"
|
|
14
|
+
"prokodo-Tabs__panel": "prokodo-Tabs__panel",
|
|
15
|
+
"prokodo-Tabs--color-primary": "prokodo-Tabs--color-primary",
|
|
16
|
+
"prokodo-Tabs--color-secondary": "prokodo-Tabs--color-secondary",
|
|
17
|
+
"prokodo-Tabs--color-success": "prokodo-Tabs--color-success",
|
|
18
|
+
"prokodo-Tabs--color-error": "prokodo-Tabs--color-error",
|
|
19
|
+
"prokodo-Tabs--color-warning": "prokodo-Tabs--color-warning",
|
|
20
|
+
"prokodo-Tabs--color-info": "prokodo-Tabs--color-info"
|
|
16
21
|
};
|
|
17
22
|
export {
|
|
18
23
|
styles as default
|
|
@@ -27,6 +27,7 @@ function TabsView({
|
|
|
27
27
|
items,
|
|
28
28
|
value,
|
|
29
29
|
defaultValue,
|
|
30
|
+
color,
|
|
30
31
|
orientation = "horizontal",
|
|
31
32
|
disabled,
|
|
32
33
|
fullWidth,
|
|
@@ -46,7 +47,8 @@ function TabsView({
|
|
|
46
47
|
className: bem(
|
|
47
48
|
void 0,
|
|
48
49
|
{
|
|
49
|
-
vertical: orientation === "vertical"
|
|
50
|
+
vertical: orientation === "vertical",
|
|
51
|
+
[`color-${color}`]: Boolean(color)
|
|
50
52
|
},
|
|
51
53
|
className
|
|
52
54
|
),
|
|
@@ -98,13 +100,19 @@ function TabsView({
|
|
|
98
100
|
{
|
|
99
101
|
disabled: isDisabled,
|
|
100
102
|
fullWidth: fullWidth === true,
|
|
101
|
-
selected: isSelected,
|
|
103
|
+
selected: isSelected && disabled !== true,
|
|
102
104
|
vertical: orientation === "vertical"
|
|
103
105
|
},
|
|
104
106
|
tabClassName
|
|
105
107
|
),
|
|
106
|
-
onClick:
|
|
107
|
-
|
|
108
|
+
onClick: (
|
|
109
|
+
/* istanbul ignore next */
|
|
110
|
+
/* @__PURE__ */ __name((event) => _clientState == null ? void 0 : _clientState.onTabClick(index, event), "onClick")
|
|
111
|
+
),
|
|
112
|
+
onKeyDown: (
|
|
113
|
+
/* istanbul ignore next */
|
|
114
|
+
/* @__PURE__ */ __name((event) => _clientState == null ? void 0 : _clientState.onTabKeyDown(index, event), "onKeyDown")
|
|
115
|
+
),
|
|
108
116
|
children: [
|
|
109
117
|
/* @__PURE__ */ jsx("span", { className: bem("tabLabel"), children: item.label }),
|
|
110
118
|
item.badge ? /* @__PURE__ */ jsx(
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
padding: 0;
|
|
132
132
|
}
|
|
133
133
|
.prokodo-Teaser__card__content {
|
|
134
|
-
padding:
|
|
134
|
+
padding: var(--pk-space-lg);
|
|
135
135
|
}
|
|
136
136
|
.prokodo-Teaser__image {
|
|
137
137
|
-o-object-fit: cover;
|
|
@@ -143,10 +143,10 @@
|
|
|
143
143
|
height: 230px;
|
|
144
144
|
}
|
|
145
145
|
.prokodo-Teaser__image__caption {
|
|
146
|
-
bottom:
|
|
146
|
+
bottom: var(--pk-space-sm);
|
|
147
147
|
text-align: right;
|
|
148
|
-
padding-right:
|
|
149
|
-
width: calc(100% -
|
|
148
|
+
padding-right: var(--pk-space-sm);
|
|
149
|
+
width: calc(100% - var(--pk-space-sm));
|
|
150
150
|
}
|
|
151
151
|
.prokodo-Teaser__animation {
|
|
152
152
|
width: 100%;
|
|
@@ -197,5 +197,5 @@
|
|
|
197
197
|
align-items: center;
|
|
198
198
|
}
|
|
199
199
|
.prokodo-Teaser__link__icon {
|
|
200
|
-
margin-right:
|
|
200
|
+
margin-right: var(--pk-space-xs);
|
|
201
201
|
}
|
|
@@ -13,7 +13,7 @@ import { Icon } from "../icon/Icon.js";
|
|
|
13
13
|
const bem = create(styles, "Teaser");
|
|
14
14
|
const Teaser = /* @__PURE__ */ __name(({
|
|
15
15
|
className,
|
|
16
|
-
|
|
16
|
+
color = "primary",
|
|
17
17
|
animation,
|
|
18
18
|
lineClamp,
|
|
19
19
|
align,
|
|
@@ -27,7 +27,7 @@ const Teaser = /* @__PURE__ */ __name(({
|
|
|
27
27
|
return /* @__PURE__ */ jsxs(
|
|
28
28
|
Card,
|
|
29
29
|
{
|
|
30
|
-
|
|
30
|
+
color,
|
|
31
31
|
...props,
|
|
32
32
|
className: bem(void 0, void 0, className),
|
|
33
33
|
contentClassName: bem("card"),
|
|
@@ -51,7 +51,7 @@ const Teaser = /* @__PURE__ */ __name(({
|
|
|
51
51
|
size: "md",
|
|
52
52
|
type: "h3",
|
|
53
53
|
...title,
|
|
54
|
-
|
|
54
|
+
color: (title == null ? void 0 : title.color) ?? color,
|
|
55
55
|
className: bem(
|
|
56
56
|
"headline",
|
|
57
57
|
{
|
|
@@ -76,7 +76,7 @@ const Teaser = /* @__PURE__ */ __name(({
|
|
|
76
76
|
/* @__PURE__ */ jsx(
|
|
77
77
|
Icon,
|
|
78
78
|
{
|
|
79
|
-
color
|
|
79
|
+
color,
|
|
80
80
|
name: "ArrowRight01Icon",
|
|
81
81
|
size: "xs",
|
|
82
82
|
...redirect == null ? void 0 : redirect.icon,
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
padding: 0;
|
|
132
132
|
}
|
|
133
133
|
.prokodo-Teaser__card__content {
|
|
134
|
-
padding:
|
|
134
|
+
padding: var(--pk-space-lg);
|
|
135
135
|
}
|
|
136
136
|
.prokodo-Teaser__image {
|
|
137
137
|
-o-object-fit: cover;
|
|
@@ -143,10 +143,10 @@
|
|
|
143
143
|
height: 230px;
|
|
144
144
|
}
|
|
145
145
|
.prokodo-Teaser__image__caption {
|
|
146
|
-
bottom:
|
|
146
|
+
bottom: var(--pk-space-sm);
|
|
147
147
|
text-align: right;
|
|
148
|
-
padding-right:
|
|
149
|
-
width: calc(100% -
|
|
148
|
+
padding-right: var(--pk-space-sm);
|
|
149
|
+
width: calc(100% - var(--pk-space-sm));
|
|
150
150
|
}
|
|
151
151
|
.prokodo-Teaser__animation {
|
|
152
152
|
width: 100%;
|
|
@@ -197,5 +197,5 @@
|
|
|
197
197
|
align-items: center;
|
|
198
198
|
}
|
|
199
199
|
.prokodo-Teaser__link__icon {
|
|
200
|
-
margin-right:
|
|
200
|
+
margin-right: var(--pk-space-xs);
|
|
201
201
|
}
|
|
@@ -154,6 +154,7 @@ function TooltipClient(props) {
|
|
|
154
154
|
triggerProps,
|
|
155
155
|
placement = "top",
|
|
156
156
|
tooltipClassName,
|
|
157
|
+
color = "default",
|
|
157
158
|
...rest
|
|
158
159
|
} = props;
|
|
159
160
|
const isControlled = controlledOpen !== void 0;
|
|
@@ -204,7 +205,10 @@ function TooltipClient(props) {
|
|
|
204
205
|
if (anchor === "pointer")
|
|
205
206
|
lastPointer.current = { x: e.clientX, y: e.clientY };
|
|
206
207
|
scheduleOpen();
|
|
207
|
-
} :
|
|
208
|
+
} : (
|
|
209
|
+
/* istanbul ignore next */
|
|
210
|
+
triggerProps == null ? void 0 : triggerProps.onMouseEnter
|
|
211
|
+
),
|
|
208
212
|
onMouseLeave: openOnHover ? (e) => {
|
|
209
213
|
var _a, _b;
|
|
210
214
|
(_a = triggerProps == null ? void 0 : triggerProps.onMouseLeave) == null ? void 0 : _a.call(triggerProps, e);
|
|
@@ -212,31 +216,49 @@ function TooltipClient(props) {
|
|
|
212
216
|
if (nextTarget && ((_b = bubbleRef.current) == null ? void 0 : _b.contains(nextTarget))) return;
|
|
213
217
|
if (anchor === "pointer") lastPointer.current = null;
|
|
214
218
|
scheduleClose();
|
|
215
|
-
} :
|
|
219
|
+
} : (
|
|
220
|
+
/* istanbul ignore next */
|
|
221
|
+
triggerProps == null ? void 0 : triggerProps.onMouseLeave
|
|
222
|
+
),
|
|
216
223
|
onMouseMove: anchor === "pointer" ? (e) => {
|
|
217
224
|
var _a;
|
|
218
225
|
(_a = triggerProps == null ? void 0 : triggerProps.onMouseMove) == null ? void 0 : _a.call(triggerProps, e);
|
|
219
226
|
lastPointer.current = { x: e.clientX, y: e.clientY };
|
|
220
|
-
} :
|
|
227
|
+
} : (
|
|
228
|
+
/* istanbul ignore next */
|
|
229
|
+
triggerProps == null ? void 0 : triggerProps.onMouseMove
|
|
230
|
+
),
|
|
221
231
|
onFocus: openOnFocus ? (e) => {
|
|
222
232
|
var _a;
|
|
223
233
|
(_a = triggerProps == null ? void 0 : triggerProps.onFocus) == null ? void 0 : _a.call(triggerProps, e);
|
|
224
234
|
scheduleOpen();
|
|
225
|
-
} :
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
clearTimers();
|
|
236
|
-
setOpen(false);
|
|
237
|
-
(_c = (_b = e.currentTarget) == null ? void 0 : _b.blur) == null ? void 0 : _c.call(_b);
|
|
235
|
+
} : (
|
|
236
|
+
/* istanbul ignore next */
|
|
237
|
+
triggerProps == null ? void 0 : triggerProps.onFocus
|
|
238
|
+
),
|
|
239
|
+
onBlur: openOnFocus ? (
|
|
240
|
+
/* istanbul ignore next */
|
|
241
|
+
(e) => {
|
|
242
|
+
var _a;
|
|
243
|
+
(_a = triggerProps == null ? void 0 : triggerProps.onBlur) == null ? void 0 : _a.call(triggerProps, e);
|
|
244
|
+
scheduleClose();
|
|
238
245
|
}
|
|
239
|
-
|
|
246
|
+
) : (
|
|
247
|
+
/* istanbul ignore next */
|
|
248
|
+
triggerProps == null ? void 0 : triggerProps.onBlur
|
|
249
|
+
),
|
|
250
|
+
onKeyDown: (
|
|
251
|
+
/* istanbul ignore next */
|
|
252
|
+
/* @__PURE__ */ __name((e) => {
|
|
253
|
+
var _a, _b, _c;
|
|
254
|
+
(_a = triggerProps == null ? void 0 : triggerProps.onKeyDown) == null ? void 0 : _a.call(triggerProps, e);
|
|
255
|
+
if (e.key === "Escape") {
|
|
256
|
+
clearTimers();
|
|
257
|
+
setOpen(false);
|
|
258
|
+
(_c = (_b = e.currentTarget) == null ? void 0 : _b.blur) == null ? void 0 : _c.call(_b);
|
|
259
|
+
}
|
|
260
|
+
}, "onKeyDown")
|
|
261
|
+
)
|
|
240
262
|
}),
|
|
241
263
|
[
|
|
242
264
|
triggerProps,
|
|
@@ -250,90 +272,106 @@ function TooltipClient(props) {
|
|
|
250
272
|
]
|
|
251
273
|
);
|
|
252
274
|
const portalBubbleClassBase = useMemo(
|
|
253
|
-
() => bem(
|
|
254
|
-
|
|
275
|
+
() => bem(
|
|
276
|
+
"bubble",
|
|
277
|
+
{ ...color !== "default" ? { [color]: true } : {} },
|
|
278
|
+
tooltipClassName
|
|
279
|
+
),
|
|
280
|
+
[color, tooltipClassName]
|
|
255
281
|
);
|
|
256
282
|
const portalBubbleClassFinal = useMemo(
|
|
257
283
|
() => bem(
|
|
258
284
|
"bubble",
|
|
259
|
-
{
|
|
285
|
+
{
|
|
286
|
+
open: Boolean(open && bubbleStyle),
|
|
287
|
+
[effectivePlacement]: true,
|
|
288
|
+
...color !== "default" ? { [color]: true } : {}
|
|
289
|
+
},
|
|
260
290
|
tooltipClassName
|
|
261
291
|
),
|
|
262
|
-
[open, bubbleStyle, effectivePlacement, tooltipClassName]
|
|
292
|
+
[open, bubbleStyle, effectivePlacement, color, tooltipClassName]
|
|
263
293
|
);
|
|
264
|
-
const compute = useCallback(
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
294
|
+
const compute = useCallback(
|
|
295
|
+
/* istanbul ignore next */
|
|
296
|
+
() => {
|
|
297
|
+
if (!portal || !open || disabled) return;
|
|
298
|
+
const triggerEl = triggerRef.current;
|
|
299
|
+
const bubbleEl = bubbleRef.current;
|
|
300
|
+
if (!triggerEl || !bubbleEl) return;
|
|
301
|
+
const anchorEl = triggerEl.querySelector("[data-tooltip-anchor]") ?? triggerEl;
|
|
302
|
+
const gutter = 8;
|
|
303
|
+
const arrowSize = 8;
|
|
304
|
+
const triggerRect = anchorEl.getBoundingClientRect();
|
|
305
|
+
const bubbleSize = {
|
|
306
|
+
w: bubbleEl.offsetWidth,
|
|
307
|
+
h: bubbleEl.offsetHeight
|
|
308
|
+
};
|
|
309
|
+
if (!bubbleSize.w || !bubbleSize.h) return;
|
|
310
|
+
const isMobile = window.innerWidth < mobileBreakpoint;
|
|
311
|
+
const preferred = isMobile && (placement === "left" || placement === "right") ? "top" : placement;
|
|
312
|
+
const ar = anchorEl.getBoundingClientRect();
|
|
313
|
+
const anchorX = ar.left + ar.width / 2;
|
|
314
|
+
const anchorY = ar.top + ar.height / 2;
|
|
315
|
+
const chosen = choosePlacement({
|
|
316
|
+
preferred,
|
|
317
|
+
anchorX,
|
|
318
|
+
anchorY,
|
|
319
|
+
triggerRect,
|
|
320
|
+
bubbleSize,
|
|
321
|
+
gutter,
|
|
322
|
+
offset,
|
|
323
|
+
arrowSize,
|
|
324
|
+
preventOverflow
|
|
325
|
+
});
|
|
326
|
+
const { x, y, arrowX, arrowY } = computeFixedPosition({
|
|
327
|
+
placement: chosen,
|
|
328
|
+
anchorX,
|
|
329
|
+
anchorY,
|
|
330
|
+
bubbleSize,
|
|
331
|
+
gutter,
|
|
332
|
+
offset,
|
|
333
|
+
arrowSize
|
|
334
|
+
});
|
|
335
|
+
setEffectivePlacement(chosen);
|
|
336
|
+
setBubbleStyle({
|
|
337
|
+
["--pk-tt-x"]: `${x}px`,
|
|
338
|
+
["--pk-tt-y"]: `${y}px`,
|
|
339
|
+
["--pk-tt-arrow-x"]: arrowX != null ? `${arrowX}px` : void 0,
|
|
340
|
+
["--pk-tt-arrow-y"]: arrowY != null ? `${arrowY}px` : void 0,
|
|
341
|
+
["--pk-tt-z"]: String(zIndex)
|
|
342
|
+
});
|
|
343
|
+
},
|
|
344
|
+
[
|
|
345
|
+
portal,
|
|
346
|
+
open,
|
|
347
|
+
disabled,
|
|
348
|
+
placement,
|
|
349
|
+
preventOverflow,
|
|
300
350
|
offset,
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
requestAnimationFrame(() => compute());
|
|
326
|
-
});
|
|
327
|
-
const onResize = /* @__PURE__ */ __name(() => compute(), "onResize");
|
|
328
|
-
const onScroll = /* @__PURE__ */ __name(() => compute(), "onScroll");
|
|
329
|
-
window.addEventListener("resize", onResize);
|
|
330
|
-
window.addEventListener("scroll", onScroll, true);
|
|
331
|
-
return () => {
|
|
332
|
-
cancelAnimationFrame(raf1);
|
|
333
|
-
window.removeEventListener("resize", onResize);
|
|
334
|
-
window.removeEventListener("scroll", onScroll, true);
|
|
335
|
-
};
|
|
336
|
-
}, [portal, open, compute]);
|
|
351
|
+
zIndex,
|
|
352
|
+
mobileBreakpoint
|
|
353
|
+
]
|
|
354
|
+
);
|
|
355
|
+
useLayoutEffect(
|
|
356
|
+
/* istanbul ignore next */
|
|
357
|
+
() => {
|
|
358
|
+
if (!portal || !open) return;
|
|
359
|
+
setBubbleStyle(void 0);
|
|
360
|
+
const raf1 = requestAnimationFrame(() => {
|
|
361
|
+
requestAnimationFrame(() => compute());
|
|
362
|
+
});
|
|
363
|
+
const onResize = /* @__PURE__ */ __name(() => compute(), "onResize");
|
|
364
|
+
const onScroll = /* @__PURE__ */ __name(() => compute(), "onScroll");
|
|
365
|
+
window.addEventListener("resize", onResize);
|
|
366
|
+
window.addEventListener("scroll", onScroll, true);
|
|
367
|
+
return () => {
|
|
368
|
+
cancelAnimationFrame(raf1);
|
|
369
|
+
window.removeEventListener("resize", onResize);
|
|
370
|
+
window.removeEventListener("scroll", onScroll, true);
|
|
371
|
+
};
|
|
372
|
+
},
|
|
373
|
+
[portal, open, compute]
|
|
374
|
+
);
|
|
337
375
|
const overlayRoot = typeof document !== "undefined" && portal ? getOverlayRoot(overlayRootId, zIndex) : null;
|
|
338
376
|
const portalOpen = open && Boolean(bubbleStyle);
|
|
339
377
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -345,6 +383,7 @@ function TooltipClient(props) {
|
|
|
345
383
|
__placement: portal ? effectivePlacement : placement,
|
|
346
384
|
__renderVisualBubble: !portal,
|
|
347
385
|
__triggerRef: triggerRef,
|
|
386
|
+
color,
|
|
348
387
|
content,
|
|
349
388
|
disabled,
|
|
350
389
|
placement,
|
|
@@ -357,10 +396,16 @@ function TooltipClient(props) {
|
|
|
357
396
|
"span",
|
|
358
397
|
{
|
|
359
398
|
ref: bubbleRef,
|
|
360
|
-
"aria-hidden": open === void 0 ? void 0 : !open,
|
|
361
399
|
role: "tooltip",
|
|
362
400
|
style: bubbleStyle,
|
|
363
|
-
|
|
401
|
+
"aria-hidden": (
|
|
402
|
+
/* istanbul ignore next */
|
|
403
|
+
open === void 0 ? void 0 : !open
|
|
404
|
+
),
|
|
405
|
+
className: (
|
|
406
|
+
/* istanbul ignore next */
|
|
407
|
+
bubbleStyle ? portalBubbleClassFinal : portalBubbleClassBase
|
|
408
|
+
),
|
|
364
409
|
onMouseEnter: openOnHover ? () => {
|
|
365
410
|
clearTimers();
|
|
366
411
|
setOpen(true);
|