@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
|
@@ -126,7 +126,68 @@
|
|
|
126
126
|
*/
|
|
127
127
|
.prokodo-InputOTP {
|
|
128
128
|
display: flex;
|
|
129
|
-
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
gap: 0;
|
|
131
|
+
}
|
|
132
|
+
.prokodo-InputOTP--primary {
|
|
133
|
+
--pk-otp-gradient-from: var(--pk-color-brand);
|
|
134
|
+
--pk-otp-gradient-to: var(--pk-color-accent);
|
|
135
|
+
--pk-input-gradient-from: var(--pk-color-brand);
|
|
136
|
+
--pk-input-gradient-to: var(--pk-color-accent);
|
|
137
|
+
--pk-input-border-focus: var(--pk-color-brand);
|
|
138
|
+
--pk-input-label-focused-fg: var(--pk-color-brand);
|
|
139
|
+
--pk-input-shadow-color-focus: color-mix(in srgb, var(--pk-color-brand) 30%, transparent);
|
|
140
|
+
}
|
|
141
|
+
.prokodo-InputOTP--secondary {
|
|
142
|
+
--pk-otp-gradient-from: var(--pk-color-accent);
|
|
143
|
+
--pk-otp-gradient-to: var(--pk-color-brand);
|
|
144
|
+
--pk-input-gradient-from: var(--pk-color-accent);
|
|
145
|
+
--pk-input-gradient-to: var(--pk-color-brand);
|
|
146
|
+
--pk-input-border-focus: var(--pk-color-accent);
|
|
147
|
+
--pk-input-label-focused-fg: var(--pk-color-accent);
|
|
148
|
+
--pk-input-shadow-color-focus: color-mix(in srgb, var(--pk-color-accent) 30%, transparent);
|
|
149
|
+
}
|
|
150
|
+
.prokodo-InputOTP--success {
|
|
151
|
+
--pk-otp-gradient-from: var(--pk-color-success);
|
|
152
|
+
--pk-otp-gradient-to: #10CCB8;
|
|
153
|
+
--pk-input-gradient-from: var(--pk-color-success);
|
|
154
|
+
--pk-input-gradient-to: #10CCB8;
|
|
155
|
+
--pk-input-border-focus: var(--pk-color-success);
|
|
156
|
+
--pk-input-label-focused-fg: var(--pk-color-success);
|
|
157
|
+
--pk-input-shadow-color-focus: color-mix(in srgb, var(--pk-color-success) 30%, transparent);
|
|
158
|
+
}
|
|
159
|
+
.prokodo-InputOTP--warning {
|
|
160
|
+
--pk-otp-gradient-from: var(--pk-color-warning);
|
|
161
|
+
--pk-otp-gradient-to: #f7cc6a;
|
|
162
|
+
--pk-input-gradient-from: var(--pk-color-warning);
|
|
163
|
+
--pk-input-gradient-to: #f7cc6a;
|
|
164
|
+
--pk-input-border-focus: var(--pk-color-warning);
|
|
165
|
+
--pk-input-label-focused-fg: var(--pk-color-warning);
|
|
166
|
+
--pk-input-shadow-color-focus: color-mix(in srgb, var(--pk-color-warning) 30%, transparent);
|
|
167
|
+
}
|
|
168
|
+
.prokodo-InputOTP--error {
|
|
169
|
+
--pk-otp-gradient-from: var(--pk-color-error);
|
|
170
|
+
--pk-otp-gradient-to: #ff6b6b;
|
|
171
|
+
--pk-input-gradient-from: var(--pk-color-error);
|
|
172
|
+
--pk-input-gradient-to: #ff6b6b;
|
|
173
|
+
--pk-input-border-focus: var(--pk-color-error);
|
|
174
|
+
--pk-input-label-focused-fg: var(--pk-color-error);
|
|
175
|
+
--pk-input-shadow-color-focus: color-mix(in srgb, var(--pk-color-error) 30%, transparent);
|
|
176
|
+
}
|
|
177
|
+
.prokodo-InputOTP--info, .prokodo-InputOTP--inherit, .prokodo-InputOTP--white {
|
|
178
|
+
--pk-otp-gradient-from: var(--pk-color-muted);
|
|
179
|
+
--pk-otp-gradient-to: var(--pk-color-border);
|
|
180
|
+
--pk-input-gradient-from: var(--pk-color-muted);
|
|
181
|
+
--pk-input-gradient-to: var(--pk-color-border);
|
|
182
|
+
--pk-input-border-focus: var(--pk-color-muted);
|
|
183
|
+
--pk-input-label-focused-fg: var(--pk-color-muted);
|
|
184
|
+
}
|
|
185
|
+
.prokodo-InputOTP--disabled {
|
|
186
|
+
opacity: 0.5;
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
pointer-events: none;
|
|
189
|
+
--pk-otp-gradient-from: var(--pk-color-border);
|
|
190
|
+
--pk-otp-gradient-to: var(--pk-color-muted);
|
|
130
191
|
}
|
|
131
192
|
.prokodo-InputOTP__label, .prokodo-InputOTP__instruction {
|
|
132
193
|
position: absolute;
|
|
@@ -136,20 +197,107 @@
|
|
|
136
197
|
height: 0;
|
|
137
198
|
text-indent: -99999px;
|
|
138
199
|
}
|
|
200
|
+
.prokodo-InputOTP__visible-label {
|
|
201
|
+
margin-bottom: var(--pk-space-sm);
|
|
202
|
+
}
|
|
203
|
+
.prokodo-InputOTP__row {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
gap: var(--pk-otp-gap);
|
|
207
|
+
}
|
|
208
|
+
.prokodo-InputOTP__footer {
|
|
209
|
+
display: flex;
|
|
210
|
+
margin-top: var(--pk-space-xs);
|
|
211
|
+
}
|
|
212
|
+
.prokodo-InputOTP__helperText {
|
|
213
|
+
color: var(--pk-input-helper-fg);
|
|
214
|
+
font-weight: 400;
|
|
215
|
+
font-size: 1rem;
|
|
216
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
217
|
+
font-style: normal;
|
|
218
|
+
line-height: 1.45;
|
|
219
|
+
letter-spacing: 0.03em;
|
|
220
|
+
text-transform: none;
|
|
221
|
+
text-align: left;
|
|
222
|
+
text-decoration: none;
|
|
223
|
+
}
|
|
224
|
+
@media screen and (min-width: 480px) {
|
|
225
|
+
.prokodo-InputOTP__helperText {
|
|
226
|
+
font-size: 0.875rem;
|
|
227
|
+
line-height: 1.4;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
@media screen and (min-width: 960px) {
|
|
231
|
+
.prokodo-InputOTP__helperText {
|
|
232
|
+
font-size: 0.875rem;
|
|
233
|
+
line-height: 1.4;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
.prokodo-InputOTP__helperText__content--is-error {
|
|
237
|
+
color: var(--pk-color-error);
|
|
238
|
+
}
|
|
139
239
|
.prokodo-InputOTP__field {
|
|
140
|
-
|
|
141
|
-
|
|
240
|
+
position: relative;
|
|
241
|
+
width: var(--pk-otp-cell-size);
|
|
242
|
+
height: var(--pk-otp-cell-size);
|
|
243
|
+
border-radius: var(--pk-otp-cell-radius) !important;
|
|
244
|
+
flex-shrink: 0;
|
|
245
|
+
}
|
|
246
|
+
.prokodo-InputOTP__field::before {
|
|
247
|
+
content: "";
|
|
248
|
+
position: absolute;
|
|
249
|
+
inset: 0;
|
|
250
|
+
border-radius: var(--pk-otp-cell-radius);
|
|
251
|
+
padding: 2px;
|
|
252
|
+
background: conic-gradient(from 180deg, var(--pk-otp-gradient-from), var(--pk-otp-gradient-to), var(--pk-otp-gradient-from));
|
|
253
|
+
-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
254
|
+
mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
|
|
255
|
+
-webkit-mask-composite: destination-out;
|
|
256
|
+
mask-composite: exclude;
|
|
257
|
+
pointer-events: none;
|
|
258
|
+
z-index: 1;
|
|
142
259
|
}
|
|
143
260
|
.prokodo-InputOTP__input {
|
|
144
|
-
width:
|
|
145
|
-
height:
|
|
261
|
+
width: var(--pk-otp-cell-size);
|
|
262
|
+
height: var(--pk-otp-cell-size);
|
|
146
263
|
}
|
|
147
264
|
.prokodo-InputOTP__input__container {
|
|
148
265
|
width: 100%;
|
|
149
266
|
height: 100%;
|
|
150
|
-
border-radius:
|
|
267
|
+
border-radius: var(--pk-otp-cell-radius);
|
|
268
|
+
overflow: hidden;
|
|
269
|
+
background: transparent !important;
|
|
270
|
+
animation: none !important;
|
|
151
271
|
}
|
|
152
272
|
.prokodo-InputOTP__input__node {
|
|
153
273
|
width: 100%;
|
|
154
|
-
|
|
274
|
+
height: 100%;
|
|
275
|
+
padding: 0;
|
|
276
|
+
background: var(--pk-input-bg);
|
|
277
|
+
border-radius: var(--pk-otp-cell-radius);
|
|
278
|
+
font-weight: 700;
|
|
279
|
+
font-feature-settings: "tnum";
|
|
280
|
+
font-variant-numeric: tabular-nums;
|
|
281
|
+
font-weight: 400;
|
|
282
|
+
font-size: 1.125rem;
|
|
283
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
284
|
+
font-style: normal;
|
|
285
|
+
line-height: 1.55;
|
|
286
|
+
letter-spacing: 0.03em;
|
|
287
|
+
text-transform: none;
|
|
288
|
+
text-align: left;
|
|
289
|
+
text-decoration: none;
|
|
290
|
+
}
|
|
291
|
+
@media screen and (min-width: 480px) {
|
|
292
|
+
.prokodo-InputOTP__input__node {
|
|
293
|
+
font-size: 1rem;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
@media screen and (min-width: 960px) {
|
|
297
|
+
.prokodo-InputOTP__input__node {
|
|
298
|
+
font-size: 1rem;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
.prokodo-InputOTP__input__node {
|
|
302
|
+
text-align: center;
|
|
155
303
|
}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
const styles = {
|
|
2
2
|
"prokodo-InputOTP": "prokodo-InputOTP",
|
|
3
|
+
"prokodo-InputOTP--primary": "prokodo-InputOTP--primary",
|
|
4
|
+
"prokodo-InputOTP--secondary": "prokodo-InputOTP--secondary",
|
|
5
|
+
"prokodo-InputOTP--success": "prokodo-InputOTP--success",
|
|
6
|
+
"prokodo-InputOTP--warning": "prokodo-InputOTP--warning",
|
|
7
|
+
"prokodo-InputOTP--error": "prokodo-InputOTP--error",
|
|
8
|
+
"prokodo-InputOTP--info": "prokodo-InputOTP--info",
|
|
9
|
+
"prokodo-InputOTP--inherit": "prokodo-InputOTP--inherit",
|
|
10
|
+
"prokodo-InputOTP--white": "prokodo-InputOTP--white",
|
|
11
|
+
"prokodo-InputOTP--disabled": "prokodo-InputOTP--disabled",
|
|
3
12
|
"prokodo-InputOTP__label": "prokodo-InputOTP__label",
|
|
4
13
|
"prokodo-InputOTP__instruction": "prokodo-InputOTP__instruction",
|
|
14
|
+
"prokodo-InputOTP__visible-label": "prokodo-InputOTP__visible-label",
|
|
15
|
+
"prokodo-InputOTP__row": "prokodo-InputOTP__row",
|
|
16
|
+
"prokodo-InputOTP__footer": "prokodo-InputOTP__footer",
|
|
17
|
+
"prokodo-InputOTP__helperText": "prokodo-InputOTP__helperText",
|
|
18
|
+
"prokodo-InputOTP__helperText__content--is-error": "prokodo-InputOTP__helperText__content--is-error",
|
|
5
19
|
"prokodo-InputOTP__field": "prokodo-InputOTP__field",
|
|
6
20
|
"prokodo-InputOTP__input": "prokodo-InputOTP__input",
|
|
7
21
|
"prokodo-InputOTP__input__container": "prokodo-InputOTP__input__container",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { InputOTPView } from "./InputOTP.view.js";
|
|
5
|
+
function InputOTPServer({
|
|
6
|
+
length = 6,
|
|
7
|
+
...props
|
|
8
|
+
}) {
|
|
9
|
+
const emptyOtp = Array(length).fill("");
|
|
10
|
+
const noop = /* @__PURE__ */ __name(() => {
|
|
11
|
+
}, "noop");
|
|
12
|
+
const noopRef = /* @__PURE__ */ __name(() => () => {
|
|
13
|
+
}, "noopRef");
|
|
14
|
+
return /* @__PURE__ */ jsx(
|
|
15
|
+
InputOTPView,
|
|
16
|
+
{
|
|
17
|
+
...props,
|
|
18
|
+
readOnly: true,
|
|
19
|
+
getInputRef: noopRef,
|
|
20
|
+
length,
|
|
21
|
+
otp: emptyOtp,
|
|
22
|
+
onDigitChange: noop,
|
|
23
|
+
onDigitFocus: noop,
|
|
24
|
+
onDigitKeyDown: noop,
|
|
25
|
+
onGroupPaste: noop
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
__name(InputOTPServer, "InputOTPServer");
|
|
30
|
+
export {
|
|
31
|
+
InputOTPServer as default
|
|
32
|
+
};
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
4
|
+
import { create } from "../../helpers/bem.js";
|
|
5
|
+
import { isString } from "../../helpers/validations.js";
|
|
6
|
+
import styles from "./InputOTP.module.scss.js";
|
|
7
|
+
import { Label } from "../label/Label.js";
|
|
8
|
+
import { Input } from "../input/Input.js";
|
|
9
|
+
const bem = create(styles, "InputOTP");
|
|
10
|
+
function InputOTPView({
|
|
11
|
+
className,
|
|
12
|
+
groupLabel,
|
|
13
|
+
groupInstruction,
|
|
14
|
+
label,
|
|
15
|
+
labelProps = {},
|
|
16
|
+
helperText,
|
|
17
|
+
errorText,
|
|
18
|
+
name = "otp",
|
|
19
|
+
length = 6,
|
|
20
|
+
otp,
|
|
21
|
+
color = "primary",
|
|
22
|
+
disabled,
|
|
23
|
+
required,
|
|
24
|
+
getInputRef,
|
|
25
|
+
onDigitFocus,
|
|
26
|
+
onDigitChange,
|
|
27
|
+
onDigitKeyDown,
|
|
28
|
+
onGroupPaste,
|
|
29
|
+
...props
|
|
30
|
+
}) {
|
|
31
|
+
const isError = typeof errorText === "string";
|
|
32
|
+
const hasHelperText = isString(helperText);
|
|
33
|
+
const labelId = `${name}-label`;
|
|
34
|
+
const errorId = isError ? `${name}-error` : void 0;
|
|
35
|
+
const helperId = !isError && hasHelperText ? `${name}-helper` : void 0;
|
|
36
|
+
const describedBy = [`${name}-instructions`, errorId, helperId].filter(Boolean).join(" ") || /* istanbul ignore next */
|
|
37
|
+
void 0;
|
|
38
|
+
return /* @__PURE__ */ jsxs(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
"aria-describedby": describedBy,
|
|
42
|
+
"aria-disabled": disabled || void 0,
|
|
43
|
+
"aria-labelledby": label ? labelId : `${name}-group-label`,
|
|
44
|
+
role: "group",
|
|
45
|
+
className: bem(
|
|
46
|
+
void 0,
|
|
47
|
+
{ [color]: true, disabled: !!disabled, required: !!required },
|
|
48
|
+
className
|
|
49
|
+
),
|
|
50
|
+
onPaste: onGroupPaste,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ jsx("span", { className: bem("label"), id: `${name}-group-label`, children: groupLabel ?? "Enter your OTP" }),
|
|
53
|
+
/* @__PURE__ */ jsx("span", { className: bem("instruction"), id: `${name}-instructions`, children: groupInstruction ?? "Use the arrow keys to navigate between digits." }),
|
|
54
|
+
typeof label === "string" && /* @__PURE__ */ jsx(
|
|
55
|
+
Label,
|
|
56
|
+
{
|
|
57
|
+
...labelProps,
|
|
58
|
+
className: bem("visible-label", void 0, labelProps.className),
|
|
59
|
+
color,
|
|
60
|
+
error: isError,
|
|
61
|
+
htmlFor: `${name}-0`,
|
|
62
|
+
id: labelId,
|
|
63
|
+
label,
|
|
64
|
+
required
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ jsx("div", { className: bem("row"), children: Array.from({ length }, (_, index) => /* @__PURE__ */ jsx(
|
|
68
|
+
Input,
|
|
69
|
+
{
|
|
70
|
+
...props,
|
|
71
|
+
hideCounter: true,
|
|
72
|
+
"aria-label": `${(props == null ? void 0 : props["aria-label"]) ?? "OTP digit"} ${index + 1}`,
|
|
73
|
+
autoComplete: "one-time-code",
|
|
74
|
+
className: bem("input"),
|
|
75
|
+
color,
|
|
76
|
+
disabled,
|
|
77
|
+
fieldClassName: bem("field"),
|
|
78
|
+
inputClassName: bem("input__node"),
|
|
79
|
+
inputContainerClassName: bem("input__container"),
|
|
80
|
+
inputMode: "numeric",
|
|
81
|
+
inputRef: getInputRef(index),
|
|
82
|
+
maxLength: 1,
|
|
83
|
+
name: `${name}-${index}`,
|
|
84
|
+
pattern: "\\\\d*",
|
|
85
|
+
placeholder: "•",
|
|
86
|
+
type: "text",
|
|
87
|
+
value: otp[index] ?? "",
|
|
88
|
+
onChange: /* @__PURE__ */ __name((e) => onDigitChange(e, index), "onChange"),
|
|
89
|
+
onFocus: /* @__PURE__ */ __name(() => onDigitFocus(index), "onFocus"),
|
|
90
|
+
onKeyDown: /* @__PURE__ */ __name((e) => onDigitKeyDown(e, index), "onKeyDown")
|
|
91
|
+
},
|
|
92
|
+
`${name}-${index}`
|
|
93
|
+
)) }),
|
|
94
|
+
(isError || hasHelperText) && /* @__PURE__ */ jsx("div", { className: bem("footer"), children: /* @__PURE__ */ jsx(
|
|
95
|
+
"div",
|
|
96
|
+
{
|
|
97
|
+
"aria-live": isError ? "assertive" : "polite",
|
|
98
|
+
className: bem("helperText"),
|
|
99
|
+
id: errorId ?? helperId,
|
|
100
|
+
role: isError ? "alert" : void 0,
|
|
101
|
+
children: /* @__PURE__ */ jsx(
|
|
102
|
+
"span",
|
|
103
|
+
{
|
|
104
|
+
className: bem("helperText__content", { "is-error": isError }),
|
|
105
|
+
children: errorText ?? helperText
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
}
|
|
109
|
+
) })
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
__name(InputOTPView, "InputOTPView");
|
|
115
|
+
export {
|
|
116
|
+
InputOTPView
|
|
117
|
+
};
|
|
@@ -155,26 +155,45 @@
|
|
|
155
155
|
.prokodo-Label {
|
|
156
156
|
filter: drop-shadow(var(--elevation-1--text));
|
|
157
157
|
}
|
|
158
|
+
.prokodo-Label--primary {
|
|
159
|
+
--pk-label-gradient-from: var(--pk-color-brand);
|
|
160
|
+
--pk-label-gradient-to: var(--pk-color-accent);
|
|
161
|
+
}
|
|
162
|
+
.prokodo-Label--secondary {
|
|
163
|
+
--pk-label-gradient-from: var(--pk-color-accent);
|
|
164
|
+
--pk-label-gradient-to: var(--pk-color-brand);
|
|
165
|
+
}
|
|
166
|
+
.prokodo-Label--success {
|
|
167
|
+
--pk-label-gradient-from: var(--pk-color-success);
|
|
168
|
+
--pk-label-gradient-to: #10CCB8;
|
|
169
|
+
}
|
|
170
|
+
.prokodo-Label--warning {
|
|
171
|
+
--pk-label-gradient-from: var(--pk-color-warning);
|
|
172
|
+
--pk-label-gradient-to: #f7cc6a;
|
|
173
|
+
}
|
|
174
|
+
.prokodo-Label--error {
|
|
175
|
+
--pk-label-gradient-from: var(--pk-color-error);
|
|
176
|
+
--pk-label-gradient-to: #ff6b6b;
|
|
177
|
+
}
|
|
178
|
+
.prokodo-Label--info, .prokodo-Label--inherit, .prokodo-Label--white {
|
|
179
|
+
--pk-label-gradient-from: var(--pk-color-muted);
|
|
180
|
+
--pk-label-gradient-to: var(--pk-color-border);
|
|
181
|
+
}
|
|
158
182
|
.prokodo-Label__highlighted {
|
|
159
183
|
font-style: normal;
|
|
160
|
-
background
|
|
161
|
-
-webkit-background-clip: text;
|
|
184
|
+
background: linear-gradient(to right, color-mix(in srgb, var(--pk-label-gradient-from) 80%, #000000), color-mix(in srgb, var(--pk-label-gradient-to) 65%, #000000));
|
|
162
185
|
background-clip: text;
|
|
186
|
+
-webkit-background-clip: text;
|
|
163
187
|
-webkit-text-fill-color: transparent;
|
|
188
|
+
color: var(--pk-label-gradient-from);
|
|
164
189
|
}
|
|
165
|
-
html[data-theme=dark] .prokodo-Label__highlighted {
|
|
166
|
-
background
|
|
167
|
-
-webkit-background-clip: text;
|
|
190
|
+
html[data-theme="dark"] .prokodo-Label__highlighted, [data-theme="dark"] .prokodo-Label__highlighted, .pk-theme-dark .prokodo-Label__highlighted {
|
|
191
|
+
background: linear-gradient(to right, var(--pk-label-gradient-from), var(--pk-label-gradient-to));
|
|
168
192
|
background-clip: text;
|
|
169
|
-
-webkit-
|
|
193
|
+
-webkit-background-clip: text;
|
|
170
194
|
}
|
|
171
195
|
.prokodo-Label__highlighted--error {
|
|
172
|
-
background
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
color: var(--color-grey-500);
|
|
176
|
-
font-style: normal;
|
|
177
|
-
}
|
|
178
|
-
html[data-theme=dark] .prokodo-Label__text {
|
|
179
|
-
color: var(--color-grey-800);
|
|
196
|
+
background: linear-gradient(to right, var(--pk-label-error-from), var(--pk-label-error-to));
|
|
197
|
+
background-clip: text;
|
|
198
|
+
-webkit-background-clip: text;
|
|
180
199
|
}
|
|
@@ -12,53 +12,55 @@ const Label = /* @__PURE__ */ __name(({
|
|
|
12
12
|
contentProps,
|
|
13
13
|
textProps,
|
|
14
14
|
error,
|
|
15
|
+
color,
|
|
15
16
|
children,
|
|
16
17
|
...props
|
|
17
18
|
}) => {
|
|
18
|
-
const splittedLabel = label == null ? void 0 : label.split(" ");
|
|
19
19
|
const renderContent = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */ jsxs(
|
|
39
|
-
"i",
|
|
40
|
-
{
|
|
41
|
-
...textProps,
|
|
42
|
-
className: bem("text", void 0, textProps == null ? void 0 : textProps.className),
|
|
43
|
-
children: [
|
|
44
|
-
splittedLabel == null ? void 0 : splittedLabel.slice(1).join(" "),
|
|
45
|
-
" ",
|
|
46
|
-
Boolean(required) && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "*" })
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
] }),
|
|
20
|
+
/* @__PURE__ */ jsx("span", { ...contentProps, children: /* @__PURE__ */ jsxs(
|
|
21
|
+
"i",
|
|
22
|
+
{
|
|
23
|
+
...textProps,
|
|
24
|
+
className: bem(
|
|
25
|
+
"highlighted",
|
|
26
|
+
{
|
|
27
|
+
error: Boolean(error)
|
|
28
|
+
},
|
|
29
|
+
textProps == null ? void 0 : textProps.className
|
|
30
|
+
),
|
|
31
|
+
children: [
|
|
32
|
+
label,
|
|
33
|
+
" ",
|
|
34
|
+
Boolean(required) && /* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: "*" })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
) }),
|
|
51
38
|
children
|
|
52
39
|
] }), "renderContent");
|
|
53
|
-
if (!
|
|
40
|
+
if (!label) return children;
|
|
54
41
|
if (type === "legend") {
|
|
55
|
-
return /* @__PURE__ */ jsx(
|
|
42
|
+
return /* @__PURE__ */ jsx(
|
|
43
|
+
"legend",
|
|
44
|
+
{
|
|
45
|
+
...props,
|
|
46
|
+
className: bem(
|
|
47
|
+
void 0,
|
|
48
|
+
color ? { [color]: true } : void 0,
|
|
49
|
+
className
|
|
50
|
+
),
|
|
51
|
+
children: renderContent()
|
|
52
|
+
}
|
|
53
|
+
);
|
|
56
54
|
}
|
|
57
55
|
return /* @__PURE__ */ jsx(
|
|
58
56
|
"label",
|
|
59
57
|
{
|
|
60
58
|
...props,
|
|
61
|
-
className: bem(
|
|
59
|
+
className: bem(
|
|
60
|
+
void 0,
|
|
61
|
+
color ? { [color]: true } : void 0,
|
|
62
|
+
className
|
|
63
|
+
),
|
|
62
64
|
children: renderContent()
|
|
63
65
|
}
|
|
64
66
|
);
|
|
@@ -155,26 +155,45 @@
|
|
|
155
155
|
.prokodo-Label {
|
|
156
156
|
filter: drop-shadow(var(--elevation-1--text));
|
|
157
157
|
}
|
|
158
|
+
.prokodo-Label--primary {
|
|
159
|
+
--pk-label-gradient-from: var(--pk-color-brand);
|
|
160
|
+
--pk-label-gradient-to: var(--pk-color-accent);
|
|
161
|
+
}
|
|
162
|
+
.prokodo-Label--secondary {
|
|
163
|
+
--pk-label-gradient-from: var(--pk-color-accent);
|
|
164
|
+
--pk-label-gradient-to: var(--pk-color-brand);
|
|
165
|
+
}
|
|
166
|
+
.prokodo-Label--success {
|
|
167
|
+
--pk-label-gradient-from: var(--pk-color-success);
|
|
168
|
+
--pk-label-gradient-to: #10CCB8;
|
|
169
|
+
}
|
|
170
|
+
.prokodo-Label--warning {
|
|
171
|
+
--pk-label-gradient-from: var(--pk-color-warning);
|
|
172
|
+
--pk-label-gradient-to: #f7cc6a;
|
|
173
|
+
}
|
|
174
|
+
.prokodo-Label--error {
|
|
175
|
+
--pk-label-gradient-from: var(--pk-color-error);
|
|
176
|
+
--pk-label-gradient-to: #ff6b6b;
|
|
177
|
+
}
|
|
178
|
+
.prokodo-Label--info, .prokodo-Label--inherit, .prokodo-Label--white {
|
|
179
|
+
--pk-label-gradient-from: var(--pk-color-muted);
|
|
180
|
+
--pk-label-gradient-to: var(--pk-color-border);
|
|
181
|
+
}
|
|
158
182
|
.prokodo-Label__highlighted {
|
|
159
183
|
font-style: normal;
|
|
160
|
-
background
|
|
161
|
-
-webkit-background-clip: text;
|
|
184
|
+
background: linear-gradient(to right, color-mix(in srgb, var(--pk-label-gradient-from) 80%, #000000), color-mix(in srgb, var(--pk-label-gradient-to) 65%, #000000));
|
|
162
185
|
background-clip: text;
|
|
186
|
+
-webkit-background-clip: text;
|
|
163
187
|
-webkit-text-fill-color: transparent;
|
|
188
|
+
color: var(--pk-label-gradient-from);
|
|
164
189
|
}
|
|
165
|
-
html[data-theme=dark] .prokodo-Label__highlighted {
|
|
166
|
-
background
|
|
167
|
-
-webkit-background-clip: text;
|
|
190
|
+
html[data-theme="dark"] .prokodo-Label__highlighted, [data-theme="dark"] .prokodo-Label__highlighted, .pk-theme-dark .prokodo-Label__highlighted {
|
|
191
|
+
background: linear-gradient(to right, var(--pk-label-gradient-from), var(--pk-label-gradient-to));
|
|
168
192
|
background-clip: text;
|
|
169
|
-
-webkit-
|
|
193
|
+
-webkit-background-clip: text;
|
|
170
194
|
}
|
|
171
195
|
.prokodo-Label__highlighted--error {
|
|
172
|
-
background
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
color: var(--color-grey-500);
|
|
176
|
-
font-style: normal;
|
|
177
|
-
}
|
|
178
|
-
html[data-theme=dark] .prokodo-Label__text {
|
|
179
|
-
color: var(--color-grey-800);
|
|
196
|
+
background: linear-gradient(to right, var(--pk-label-error-from), var(--pk-label-error-to));
|
|
197
|
+
background-clip: text;
|
|
198
|
+
-webkit-background-clip: text;
|
|
180
199
|
}
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
const styles = {
|
|
2
2
|
"prokodo-Label": "prokodo-Label",
|
|
3
|
+
"prokodo-Label--primary": "prokodo-Label--primary",
|
|
4
|
+
"prokodo-Label--secondary": "prokodo-Label--secondary",
|
|
5
|
+
"prokodo-Label--success": "prokodo-Label--success",
|
|
6
|
+
"prokodo-Label--warning": "prokodo-Label--warning",
|
|
7
|
+
"prokodo-Label--error": "prokodo-Label--error",
|
|
8
|
+
"prokodo-Label--info": "prokodo-Label--info",
|
|
9
|
+
"prokodo-Label--inherit": "prokodo-Label--inherit",
|
|
10
|
+
"prokodo-Label--white": "prokodo-Label--white",
|
|
3
11
|
"prokodo-Label__highlighted": "prokodo-Label__highlighted",
|
|
4
|
-
"prokodo-Label__highlighted--error": "prokodo-Label__highlighted--error"
|
|
5
|
-
"prokodo-Label__text": "prokodo-Label__text"
|
|
12
|
+
"prokodo-Label__highlighted--error": "prokodo-Label__highlighted--error"
|
|
6
13
|
};
|
|
7
14
|
export {
|
|
8
15
|
styles as default
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
.prokodo-Link {
|
|
128
128
|
text-decoration: none;
|
|
129
129
|
cursor: pointer;
|
|
130
|
-
color: var(--
|
|
130
|
+
color: var(--pk-link-color);
|
|
131
131
|
font-weight: 500;
|
|
132
132
|
font-size: 1.125rem;
|
|
133
133
|
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
@@ -155,38 +155,38 @@
|
|
|
155
155
|
}
|
|
156
156
|
.prokodo-Link--has-no-background:hover {
|
|
157
157
|
text-decoration: underline;
|
|
158
|
-
color: var(--color-
|
|
158
|
+
color: var(--pk-link-color-hover);
|
|
159
159
|
}
|
|
160
160
|
.prokodo-Link--has-no-background:focus {
|
|
161
|
-
color: var(--color-
|
|
161
|
+
color: var(--pk-link-color-hover);
|
|
162
162
|
}
|
|
163
163
|
.prokodo-Link--has-no-background--primary {
|
|
164
|
-
color: var(--color-primary
|
|
164
|
+
color: var(--pk-link-color-primary);
|
|
165
165
|
}
|
|
166
166
|
.prokodo-Link--has-no-background--secondary {
|
|
167
|
-
color: var(--color-secondary
|
|
167
|
+
color: var(--pk-link-color-secondary);
|
|
168
168
|
}
|
|
169
169
|
.prokodo-Link--has-no-background--info {
|
|
170
|
-
color: var(--color-
|
|
170
|
+
color: var(--pk-link-color-info);
|
|
171
171
|
}
|
|
172
172
|
.prokodo-Link--has-no-background--success {
|
|
173
|
-
color: var(--color-success);
|
|
173
|
+
color: var(--pk-link-color-success);
|
|
174
174
|
}
|
|
175
175
|
.prokodo-Link--has-no-background--warning {
|
|
176
|
-
color: var(--color-warning);
|
|
176
|
+
color: var(--pk-link-color-warning);
|
|
177
177
|
}
|
|
178
178
|
.prokodo-Link--has-no-background--error {
|
|
179
|
-
color: var(--color-error);
|
|
179
|
+
color: var(--pk-link-color-error);
|
|
180
180
|
}
|
|
181
181
|
.prokodo-Link--has-no-background--white {
|
|
182
|
-
color: var(--color-white);
|
|
182
|
+
color: var(--pk-link-color-white);
|
|
183
183
|
}
|
|
184
184
|
.prokodo-Link--has-no-background--white:hover {
|
|
185
|
-
color: var(--color-white);
|
|
185
|
+
color: var(--pk-link-color-white);
|
|
186
186
|
}
|
|
187
187
|
.prokodo-Link--has-no-background--primary:hover, .prokodo-Link--has-no-background--secondary:hover, .prokodo-Link--has-no-background--success:hover, .prokodo-Link--has-no-background--error:hover, .prokodo-Link--has-no-background--info:hover, .prokodo-Link--has-no-background--warning:hover {
|
|
188
|
-
color: var(--color-
|
|
188
|
+
color: var(--pk-link-color-variant-hover);
|
|
189
189
|
}
|
|
190
190
|
.prokodo-Link--has-no-background--primary:focus, .prokodo-Link--has-no-background--secondary:focus, .prokodo-Link--has-no-background--success:focus, .prokodo-Link--has-no-background--error:focus, .prokodo-Link--has-no-background--info:focus, .prokodo-Link--has-no-background--warning:focus {
|
|
191
|
-
color: var(--color-
|
|
191
|
+
color: var(--pk-link-color-variant-hover);
|
|
192
192
|
}
|
|
@@ -5,9 +5,11 @@ import LinkServer from "./Link.server.js";
|
|
|
5
5
|
const Link = createIsland({
|
|
6
6
|
name: "Link",
|
|
7
7
|
Server: LinkServer,
|
|
8
|
-
loadLazy:
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
loadLazy: (
|
|
9
|
+
/* istanbul ignore next */
|
|
10
|
+
/* @__PURE__ */ __name(() => import("./Link.lazy.js"), "loadLazy")
|
|
11
|
+
)
|
|
12
|
+
// optional: custom predicate (e.g. always interactive if target="_blank") isInteractive: /* istanbul ignore next */ p => typeof p.linkComponent === "function",
|
|
11
13
|
});
|
|
12
14
|
export {
|
|
13
15
|
Link
|