@prokodo/ui 0.1.15 → 1.0.1
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.css +180 -68
- 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.module.css +120 -67
- package/dist/components/accordion/Accordion.module.scss.js +12 -5
- package/dist/components/accordion/Accordion.view.js +3 -3
- package/dist/components/autocomplete/Autocomplete.css +111 -95
- 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 +3 -1
- package/dist/components/avatar/Avatar.css +11 -8
- 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 +5 -5
- package/dist/components/button/Button.client.js +12 -16
- package/dist/components/button/Button.css +85 -137
- 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 +6 -2
- package/dist/components/calendly/Calendly.css +132 -0
- 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.module.css +67 -32
- package/dist/components/card/Card.module.scss.js +8 -2
- package/dist/components/card/Card.view.js +3 -3
- package/dist/components/carousel/Carousel.client.js +2 -4
- package/dist/components/carousel/Carousel.css +8 -4
- package/dist/components/carousel/Carousel.module.css +8 -4
- package/dist/components/checkbox/Checkbox.css +100 -79
- 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 +3 -1
- package/dist/components/checkbox-group/CheckboxGroup.css +39 -6
- 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 +3 -1
- package/dist/components/chip/Chip.css +185 -61
- 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 +3 -4
- package/dist/components/datePicker/DatePicker.client.js +211 -66
- package/dist/components/datePicker/DatePicker.css +940 -0
- 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.module.css +107 -132
- package/dist/components/dialog/Dialog.module.scss.js +13 -8
- package/dist/components/drawer/Drawer.css +8 -8
- package/dist/components/drawer/Drawer.module.css +8 -8
- package/dist/components/dynamic-list/DynamicList.css +20 -12
- 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 +78 -46
- package/dist/components/form/Form.view.js +3 -3
- package/dist/components/form/FormField.client.js +51 -2
- package/dist/components/form/FormField.server.js +10 -4
- package/dist/components/form/FormResponse.js +2 -2
- 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 +5 -6
- 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.module.css +14 -14
- package/dist/components/image/Image.css +4 -3
- package/dist/components/image/Image.module.css +4 -3
- package/dist/components/image-text/ImageText.css +43 -14
- package/dist/components/image-text/ImageText.js +61 -53
- 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.css +197 -115
- 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 +87 -57
- package/dist/components/inputOTP/InputOTP.client.js +165 -0
- package/dist/components/inputOTP/InputOTP.css +155 -7
- package/dist/components/inputOTP/InputOTP.js +10 -195
- 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.module.css +13 -13
- package/dist/components/link/Link.view.js +14 -12
- package/dist/components/list/List.css +71 -32
- package/dist/components/list/List.js +25 -8
- package/dist/components/list/List.module.css +71 -32
- package/dist/components/list/List.module.scss.js +1 -1
- package/dist/components/loading/Loading.view.js +22 -2
- package/dist/components/lottie/Lottie.css +16 -0
- 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 +5 -2
- 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.module.css +127 -11
- package/dist/components/pagination/Pagination.module.scss.js +12 -4
- package/dist/components/pagination/Pagination.view.js +13 -1
- package/dist/components/post-item/PostItem.css +16 -16
- package/dist/components/post-item/PostItem.module.css +16 -16
- package/dist/components/post-item/PostItem.view.js +14 -5
- package/dist/components/post-teaser/PostTeaser.css +13 -13
- package/dist/components/post-teaser/PostTeaser.module.css +13 -13
- package/dist/components/post-teaser/PostTeaser.view.js +10 -3
- package/dist/components/post-widget/PostWidget.css +6 -8
- package/dist/components/post-widget/PostWidget.module.css +6 -8
- package/dist/components/post-widget/PostWidget.view.js +12 -5
- package/dist/components/post-widget-carousel/PostWidgetCarousel.css +7 -7
- package/dist/components/post-widget-carousel/PostWidgetCarousel.module.css +7 -7
- package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +30 -13
- package/dist/components/progressBar/ProgressBar.css +4 -4
- package/dist/components/progressBar/ProgressBar.module.css +4 -4
- package/dist/components/progressBar/ProgressBar.view.js +2 -2
- 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.css +34 -21
- 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 +3 -3
- package/dist/components/rich-text/RichText.css +47 -31
- package/dist/components/rich-text/RichText.module.css +47 -31
- package/dist/components/rich-text/RichText.server.js +1 -1
- package/dist/components/select/Select.client.js +154 -1
- package/dist/components/select/Select.css +542 -221
- 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 +40 -14
- package/dist/components/sidenav/SideNav.client.js +24 -1
- package/dist/components/sidenav/SideNav.css +89 -21
- 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.css +177 -112
- 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 +113 -101
- package/dist/components/snackbar/Snackbar.css +125 -64
- 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/stepper/Stepper.client.js +21 -6
- package/dist/components/stepper/Stepper.css +46 -11
- 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.module.css +108 -84
- package/dist/components/switch/Switch.module.scss.js +14 -12
- package/dist/components/switch/Switch.view.js +9 -8
- package/dist/components/table/Table.css +19 -14
- package/dist/components/table/Table.module.css +19 -14
- package/dist/components/tabs/Tabs.css +53 -27
- 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 +4 -2
- 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 +14 -4
- package/dist/components/tooltip/Tooltip.css +46 -9
- 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 +6 -1
- package/dist/constants/project.js +1 -1
- package/dist/theme.css +3269 -1588
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/components/RTE/RTE.d.ts +5 -0
- package/dist/types/components/RTE/RTE.lazy.d.ts +5 -0
- 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/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 +2 -0
- 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 +1 -1
- 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 +37 -22
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
const styles = {
|
|
2
2
|
"prokodo-Rating": "prokodo-Rating",
|
|
3
3
|
"prokodo-Rating--full-width": "prokodo-Rating--full-width",
|
|
4
|
+
"prokodo-Rating--primary": "prokodo-Rating--primary",
|
|
5
|
+
"prokodo-Rating--secondary": "prokodo-Rating--secondary",
|
|
6
|
+
"prokodo-Rating--success": "prokodo-Rating--success",
|
|
7
|
+
"prokodo-Rating--warning": "prokodo-Rating--warning",
|
|
8
|
+
"prokodo-Rating--error": "prokodo-Rating--error",
|
|
9
|
+
"prokodo-Rating--info": "prokodo-Rating--info",
|
|
10
|
+
"prokodo-Rating--inherit": "prokodo-Rating--inherit",
|
|
11
|
+
"prokodo-Rating--white": "prokodo-Rating--white",
|
|
4
12
|
"prokodo-Rating__inner": "prokodo-Rating__inner",
|
|
5
13
|
"prokodo-Rating__label": "prokodo-Rating__label",
|
|
6
14
|
"prokodo-Rating__field": "prokodo-Rating__field",
|
|
@@ -31,7 +31,8 @@ function RatingView(props) {
|
|
|
31
31
|
onClick,
|
|
32
32
|
onMouseEnter,
|
|
33
33
|
onMouseLeave,
|
|
34
|
-
inputRef
|
|
34
|
+
inputRef,
|
|
35
|
+
color
|
|
35
36
|
} = props;
|
|
36
37
|
const isError = typeof errorText === "string";
|
|
37
38
|
const hasHelperText = isString(helperText);
|
|
@@ -46,7 +47,7 @@ function RatingView(props) {
|
|
|
46
47
|
{
|
|
47
48
|
className: bem(
|
|
48
49
|
void 0,
|
|
49
|
-
{ "full-width": Boolean(fullWidth) },
|
|
50
|
+
{ "full-width": Boolean(fullWidth), ...color && { [color]: true } },
|
|
50
51
|
className
|
|
51
52
|
),
|
|
52
53
|
children: [
|
|
@@ -55,6 +56,7 @@ function RatingView(props) {
|
|
|
55
56
|
Label,
|
|
56
57
|
{
|
|
57
58
|
...labelProps,
|
|
59
|
+
color,
|
|
58
60
|
error: isError,
|
|
59
61
|
htmlFor: name,
|
|
60
62
|
label,
|
|
@@ -89,7 +89,7 @@ function RichTextClient({
|
|
|
89
89
|
children,
|
|
90
90
|
animated,
|
|
91
91
|
animationProps = {},
|
|
92
|
-
|
|
92
|
+
color = "primary",
|
|
93
93
|
schema = {},
|
|
94
94
|
itemProp,
|
|
95
95
|
linkComponent,
|
|
@@ -292,12 +292,12 @@ function RichTextClient({
|
|
|
292
292
|
...baseProps,
|
|
293
293
|
"aria-label": childReactNodes.map(extractText).join(""),
|
|
294
294
|
className: cls,
|
|
295
|
+
color: "primary",
|
|
295
296
|
href,
|
|
296
297
|
linkComponent,
|
|
297
298
|
rel,
|
|
298
299
|
target,
|
|
299
300
|
title,
|
|
300
|
-
variant: "primary",
|
|
301
301
|
children: linkText
|
|
302
302
|
}
|
|
303
303
|
);
|
|
@@ -376,7 +376,7 @@ function RichTextClient({
|
|
|
376
376
|
Icon,
|
|
377
377
|
{
|
|
378
378
|
className: bem("li__icon"),
|
|
379
|
-
color
|
|
379
|
+
color,
|
|
380
380
|
name: "ArrowRight01Icon",
|
|
381
381
|
size: 18
|
|
382
382
|
},
|
|
@@ -125,10 +125,10 @@
|
|
|
125
125
|
* content.
|
|
126
126
|
*/
|
|
127
127
|
.prokodo-RichText__a {
|
|
128
|
-
color: var(--color-
|
|
128
|
+
color: var(--pk-color-brand);
|
|
129
129
|
}
|
|
130
130
|
.prokodo-RichText__p {
|
|
131
|
-
color: var(--color-
|
|
131
|
+
color: var(--pk-color-muted);
|
|
132
132
|
font-weight: 400;
|
|
133
133
|
font-size: 1.125rem;
|
|
134
134
|
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
@@ -152,15 +152,12 @@
|
|
|
152
152
|
.prokodo-RichText__p {
|
|
153
153
|
text-align: inherit;
|
|
154
154
|
}
|
|
155
|
-
html[data-theme=dark] .prokodo-RichText__p {
|
|
156
|
-
color: var(--color-grey-700);
|
|
157
|
-
}
|
|
158
155
|
.prokodo-RichText__pre {
|
|
159
|
-
color: var(--color-
|
|
156
|
+
color: var(--pk-color-muted);
|
|
160
157
|
padding: 0;
|
|
161
|
-
border: 1px solid var(--color-
|
|
162
|
-
border-radius:
|
|
163
|
-
background-color: var(--color-
|
|
158
|
+
border: 1px solid var(--pk-color-border);
|
|
159
|
+
border-radius: var(--pk-radius-sm);
|
|
160
|
+
background-color: var(--pk-color-surface-raised);
|
|
164
161
|
overflow-x: auto;
|
|
165
162
|
overflow-wrap: break-word;
|
|
166
163
|
font-weight: 400;
|
|
@@ -188,19 +185,16 @@ html[data-theme=dark] .prokodo-RichText__p {
|
|
|
188
185
|
.prokodo-RichText__pre {
|
|
189
186
|
text-align: inherit;
|
|
190
187
|
}
|
|
191
|
-
html[data-theme=dark] .prokodo-RichText__pre {
|
|
192
|
-
background-color: var(--color-grey-50);
|
|
193
|
-
}
|
|
194
188
|
.prokodo-RichText__blockquote {
|
|
195
|
-
background-color: var(--color-
|
|
196
|
-
border-left: 3px solid var(--color-
|
|
197
|
-
padding: 1px
|
|
189
|
+
background-color: var(--pk-color-surface-raised);
|
|
190
|
+
border-left: 3px solid var(--pk-color-border);
|
|
191
|
+
padding: 1px var(--pk-space-lg);
|
|
198
192
|
margin: 0;
|
|
199
193
|
}
|
|
200
194
|
.prokodo-RichText__image {
|
|
201
195
|
-o-object-fit: cover;
|
|
202
196
|
object-fit: cover;
|
|
203
|
-
border-radius:
|
|
197
|
+
border-radius: var(--pk-radius-md);
|
|
204
198
|
}
|
|
205
199
|
.prokodo-RichText__image__wrapper {
|
|
206
200
|
position: relative;
|
|
@@ -208,7 +202,7 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
208
202
|
width: 100%;
|
|
209
203
|
height: 300px;
|
|
210
204
|
overflow: hidden;
|
|
211
|
-
border-radius:
|
|
205
|
+
border-radius: var(--pk-radius-md);
|
|
212
206
|
}
|
|
213
207
|
.prokodo-RichText__ul, .prokodo-RichText__ol {
|
|
214
208
|
padding: 0;
|
|
@@ -217,14 +211,14 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
217
211
|
.prokodo-RichText__li {
|
|
218
212
|
display: flex;
|
|
219
213
|
align-items: flex-start;
|
|
220
|
-
padding-bottom:
|
|
214
|
+
padding-bottom: var(--pk-space-xs);
|
|
221
215
|
margin-top: 2px;
|
|
222
216
|
}
|
|
223
217
|
.prokodo-RichText__li__icon {
|
|
224
218
|
flex: 0 0 20px;
|
|
225
219
|
width: 20px;
|
|
226
220
|
height: 20px;
|
|
227
|
-
margin-right:
|
|
221
|
+
margin-right: var(--pk-space-sm);
|
|
228
222
|
padding-top: 2px;
|
|
229
223
|
line-height: 1;
|
|
230
224
|
}
|
|
@@ -233,6 +227,28 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
233
227
|
min-width: 0;
|
|
234
228
|
overflow-wrap: anywhere;
|
|
235
229
|
display: inline;
|
|
230
|
+
font-weight: 400;
|
|
231
|
+
font-size: 1.125rem;
|
|
232
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
233
|
+
font-style: normal;
|
|
234
|
+
line-height: 1.55;
|
|
235
|
+
letter-spacing: 0.03em;
|
|
236
|
+
text-transform: none;
|
|
237
|
+
text-align: left;
|
|
238
|
+
text-decoration: none;
|
|
239
|
+
}
|
|
240
|
+
@media screen and (min-width: 480px) {
|
|
241
|
+
.prokodo-RichText__li__content {
|
|
242
|
+
font-size: 1rem;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
@media screen and (min-width: 960px) {
|
|
246
|
+
.prokodo-RichText__li__content {
|
|
247
|
+
font-size: 1rem;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
.prokodo-RichText__li__content {
|
|
251
|
+
color: var(--pk-color-fg);
|
|
236
252
|
}
|
|
237
253
|
.prokodo-RichText__ol__decimal {
|
|
238
254
|
display: flex;
|
|
@@ -240,11 +256,11 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
240
256
|
align-items: center;
|
|
241
257
|
width: 19px;
|
|
242
258
|
height: 19px;
|
|
243
|
-
background-color: var(--color-
|
|
244
|
-
color: var(--
|
|
245
|
-
border: 1px solid var(--color-
|
|
259
|
+
background-color: var(--pk-color-brand);
|
|
260
|
+
color: var(--pk-palette-white);
|
|
261
|
+
border: 1px solid var(--pk-color-brand);
|
|
246
262
|
border-radius: 200px;
|
|
247
|
-
margin-right:
|
|
263
|
+
margin-right: var(--pk-space-sm);
|
|
248
264
|
font-weight: 400;
|
|
249
265
|
font-size: 1rem;
|
|
250
266
|
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
@@ -274,26 +290,26 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
274
290
|
display: -webkit-box;
|
|
275
291
|
}
|
|
276
292
|
.prokodo-RichText__ol > li icon--inherit {
|
|
277
|
-
color: var(--color-
|
|
293
|
+
color: var(--pk-color-fg);
|
|
278
294
|
}
|
|
279
295
|
.prokodo-RichText__ol > li icon--primary {
|
|
280
|
-
color: var(--color-
|
|
296
|
+
color: var(--pk-color-brand);
|
|
281
297
|
}
|
|
282
298
|
.prokodo-RichText__ol > li icon--secondary {
|
|
283
|
-
color: var(--color-
|
|
299
|
+
color: var(--pk-color-accent);
|
|
284
300
|
}
|
|
285
301
|
.prokodo-RichText__ol > li icon--info {
|
|
286
|
-
color: var(--color-
|
|
302
|
+
color: var(--pk-color-muted);
|
|
287
303
|
}
|
|
288
304
|
.prokodo-RichText__ol > li icon--success {
|
|
289
|
-
color: var(--color-success);
|
|
305
|
+
color: var(--pk-color-success);
|
|
290
306
|
}
|
|
291
307
|
.prokodo-RichText__ol > li icon--error {
|
|
292
|
-
color: var(--color-error);
|
|
308
|
+
color: var(--pk-color-error);
|
|
293
309
|
}
|
|
294
310
|
.prokodo-RichText__ol > li icon--warning {
|
|
295
|
-
color: var(--color-warning);
|
|
311
|
+
color: var(--pk-color-warning);
|
|
296
312
|
}
|
|
297
313
|
.prokodo-RichText__ol > li icon--white {
|
|
298
|
-
color: var(--
|
|
314
|
+
color: var(--pk-palette-white);
|
|
299
315
|
}
|
|
@@ -125,10 +125,10 @@
|
|
|
125
125
|
* content.
|
|
126
126
|
*/
|
|
127
127
|
.prokodo-RichText__a {
|
|
128
|
-
color: var(--color-
|
|
128
|
+
color: var(--pk-color-brand);
|
|
129
129
|
}
|
|
130
130
|
.prokodo-RichText__p {
|
|
131
|
-
color: var(--color-
|
|
131
|
+
color: var(--pk-color-muted);
|
|
132
132
|
font-weight: 400;
|
|
133
133
|
font-size: 1.125rem;
|
|
134
134
|
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
@@ -152,15 +152,12 @@
|
|
|
152
152
|
.prokodo-RichText__p {
|
|
153
153
|
text-align: inherit;
|
|
154
154
|
}
|
|
155
|
-
html[data-theme=dark] .prokodo-RichText__p {
|
|
156
|
-
color: var(--color-grey-700);
|
|
157
|
-
}
|
|
158
155
|
.prokodo-RichText__pre {
|
|
159
|
-
color: var(--color-
|
|
156
|
+
color: var(--pk-color-muted);
|
|
160
157
|
padding: 0;
|
|
161
|
-
border: 1px solid var(--color-
|
|
162
|
-
border-radius:
|
|
163
|
-
background-color: var(--color-
|
|
158
|
+
border: 1px solid var(--pk-color-border);
|
|
159
|
+
border-radius: var(--pk-radius-sm);
|
|
160
|
+
background-color: var(--pk-color-surface-raised);
|
|
164
161
|
overflow-x: auto;
|
|
165
162
|
overflow-wrap: break-word;
|
|
166
163
|
font-weight: 400;
|
|
@@ -188,19 +185,16 @@ html[data-theme=dark] .prokodo-RichText__p {
|
|
|
188
185
|
.prokodo-RichText__pre {
|
|
189
186
|
text-align: inherit;
|
|
190
187
|
}
|
|
191
|
-
html[data-theme=dark] .prokodo-RichText__pre {
|
|
192
|
-
background-color: var(--color-grey-50);
|
|
193
|
-
}
|
|
194
188
|
.prokodo-RichText__blockquote {
|
|
195
|
-
background-color: var(--color-
|
|
196
|
-
border-left: 3px solid var(--color-
|
|
197
|
-
padding: 1px
|
|
189
|
+
background-color: var(--pk-color-surface-raised);
|
|
190
|
+
border-left: 3px solid var(--pk-color-border);
|
|
191
|
+
padding: 1px var(--pk-space-lg);
|
|
198
192
|
margin: 0;
|
|
199
193
|
}
|
|
200
194
|
.prokodo-RichText__image {
|
|
201
195
|
-o-object-fit: cover;
|
|
202
196
|
object-fit: cover;
|
|
203
|
-
border-radius:
|
|
197
|
+
border-radius: var(--pk-radius-md);
|
|
204
198
|
}
|
|
205
199
|
.prokodo-RichText__image__wrapper {
|
|
206
200
|
position: relative;
|
|
@@ -208,7 +202,7 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
208
202
|
width: 100%;
|
|
209
203
|
height: 300px;
|
|
210
204
|
overflow: hidden;
|
|
211
|
-
border-radius:
|
|
205
|
+
border-radius: var(--pk-radius-md);
|
|
212
206
|
}
|
|
213
207
|
.prokodo-RichText__ul, .prokodo-RichText__ol {
|
|
214
208
|
padding: 0;
|
|
@@ -217,14 +211,14 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
217
211
|
.prokodo-RichText__li {
|
|
218
212
|
display: flex;
|
|
219
213
|
align-items: flex-start;
|
|
220
|
-
padding-bottom:
|
|
214
|
+
padding-bottom: var(--pk-space-xs);
|
|
221
215
|
margin-top: 2px;
|
|
222
216
|
}
|
|
223
217
|
.prokodo-RichText__li__icon {
|
|
224
218
|
flex: 0 0 20px;
|
|
225
219
|
width: 20px;
|
|
226
220
|
height: 20px;
|
|
227
|
-
margin-right:
|
|
221
|
+
margin-right: var(--pk-space-sm);
|
|
228
222
|
padding-top: 2px;
|
|
229
223
|
line-height: 1;
|
|
230
224
|
}
|
|
@@ -233,6 +227,28 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
233
227
|
min-width: 0;
|
|
234
228
|
overflow-wrap: anywhere;
|
|
235
229
|
display: inline;
|
|
230
|
+
font-weight: 400;
|
|
231
|
+
font-size: 1.125rem;
|
|
232
|
+
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
233
|
+
font-style: normal;
|
|
234
|
+
line-height: 1.55;
|
|
235
|
+
letter-spacing: 0.03em;
|
|
236
|
+
text-transform: none;
|
|
237
|
+
text-align: left;
|
|
238
|
+
text-decoration: none;
|
|
239
|
+
}
|
|
240
|
+
@media screen and (min-width: 480px) {
|
|
241
|
+
.prokodo-RichText__li__content {
|
|
242
|
+
font-size: 1rem;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
@media screen and (min-width: 960px) {
|
|
246
|
+
.prokodo-RichText__li__content {
|
|
247
|
+
font-size: 1rem;
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
.prokodo-RichText__li__content {
|
|
251
|
+
color: var(--pk-color-fg);
|
|
236
252
|
}
|
|
237
253
|
.prokodo-RichText__ol__decimal {
|
|
238
254
|
display: flex;
|
|
@@ -240,11 +256,11 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
240
256
|
align-items: center;
|
|
241
257
|
width: 19px;
|
|
242
258
|
height: 19px;
|
|
243
|
-
background-color: var(--color-
|
|
244
|
-
color: var(--
|
|
245
|
-
border: 1px solid var(--color-
|
|
259
|
+
background-color: var(--pk-color-brand);
|
|
260
|
+
color: var(--pk-palette-white);
|
|
261
|
+
border: 1px solid var(--pk-color-brand);
|
|
246
262
|
border-radius: 200px;
|
|
247
|
-
margin-right:
|
|
263
|
+
margin-right: var(--pk-space-sm);
|
|
248
264
|
font-weight: 400;
|
|
249
265
|
font-size: 1rem;
|
|
250
266
|
font-family: var(--font-secondary), -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
@@ -274,26 +290,26 @@ html[data-theme=dark] .prokodo-RichText__pre {
|
|
|
274
290
|
display: -webkit-box;
|
|
275
291
|
}
|
|
276
292
|
.prokodo-RichText__ol > li icon--inherit {
|
|
277
|
-
color: var(--color-
|
|
293
|
+
color: var(--pk-color-fg);
|
|
278
294
|
}
|
|
279
295
|
.prokodo-RichText__ol > li icon--primary {
|
|
280
|
-
color: var(--color-
|
|
296
|
+
color: var(--pk-color-brand);
|
|
281
297
|
}
|
|
282
298
|
.prokodo-RichText__ol > li icon--secondary {
|
|
283
|
-
color: var(--color-
|
|
299
|
+
color: var(--pk-color-accent);
|
|
284
300
|
}
|
|
285
301
|
.prokodo-RichText__ol > li icon--info {
|
|
286
|
-
color: var(--color-
|
|
302
|
+
color: var(--pk-color-muted);
|
|
287
303
|
}
|
|
288
304
|
.prokodo-RichText__ol > li icon--success {
|
|
289
|
-
color: var(--color-success);
|
|
305
|
+
color: var(--pk-color-success);
|
|
290
306
|
}
|
|
291
307
|
.prokodo-RichText__ol > li icon--error {
|
|
292
|
-
color: var(--color-error);
|
|
308
|
+
color: var(--pk-color-error);
|
|
293
309
|
}
|
|
294
310
|
.prokodo-RichText__ol > li icon--warning {
|
|
295
|
-
color: var(--color-warning);
|
|
311
|
+
color: var(--pk-color-warning);
|
|
296
312
|
}
|
|
297
313
|
.prokodo-RichText__ol > li icon--white {
|
|
298
|
-
color: var(--
|
|
314
|
+
color: var(--pk-palette-white);
|
|
299
315
|
}
|
|
@@ -14,7 +14,7 @@ function RichTextServer(props) {
|
|
|
14
14
|
schema = {},
|
|
15
15
|
animated: _animated,
|
|
16
16
|
animationProps: _animationProps,
|
|
17
|
-
|
|
17
|
+
color: _color,
|
|
18
18
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
19
19
|
itemProp,
|
|
20
20
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
5
5
|
import { memo, useRef, useState, useEffect, useCallback, useMemo } from "react";
|
|
6
6
|
import { createPortal } from "react-dom";
|
|
7
|
+
import { create } from "../../helpers/bem.js";
|
|
8
|
+
import styles from "./Select.module.scss.js";
|
|
7
9
|
import { SelectView } from "./Select.view.js";
|
|
10
|
+
import { Icon } from "../icon/Icon.js";
|
|
11
|
+
const bem = create(styles, "Select");
|
|
8
12
|
function isMulti(v) {
|
|
9
13
|
return Array.isArray(v);
|
|
10
14
|
}
|
|
@@ -43,6 +47,8 @@ function SelectClient({
|
|
|
43
47
|
);
|
|
44
48
|
const [popupStyle, setPopupStyle] = useState({});
|
|
45
49
|
const [popupReady, setPopupReady] = useState(false);
|
|
50
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
51
|
+
const sheetSwipeStart = useRef(null);
|
|
46
52
|
const hasPlaceholder = !Boolean(required) && !Boolean(multiple);
|
|
47
53
|
const optionCount = (hasPlaceholder ? 1 : 0) + items.length;
|
|
48
54
|
useEffect(() => {
|
|
@@ -155,6 +161,13 @@ function SelectClient({
|
|
|
155
161
|
window.addEventListener("click", handleOutside);
|
|
156
162
|
return () => window.removeEventListener("click", handleOutside);
|
|
157
163
|
}, [open, close]);
|
|
164
|
+
useEffect(() => {
|
|
165
|
+
const mq = window.matchMedia("(max-width: 480px)");
|
|
166
|
+
setIsMobile(mq.matches);
|
|
167
|
+
const handler = /* @__PURE__ */ __name((e) => setIsMobile(e.matches), "handler");
|
|
168
|
+
mq.addEventListener("change", handler);
|
|
169
|
+
return () => mq.removeEventListener("change", handler);
|
|
170
|
+
}, []);
|
|
158
171
|
const handleKey = (
|
|
159
172
|
/* istanbul ignore next */
|
|
160
173
|
/* @__PURE__ */ __name((e) => {
|
|
@@ -275,6 +288,146 @@ function SelectClient({
|
|
|
275
288
|
}
|
|
276
289
|
}, "onListKeyDown")
|
|
277
290
|
);
|
|
291
|
+
if (isMobile) {
|
|
292
|
+
const sheetVariant = rest.color ?? "primary";
|
|
293
|
+
const handleSheetTouchStart = /* @__PURE__ */ __name((e) => {
|
|
294
|
+
var _a;
|
|
295
|
+
sheetSwipeStart.current = ((_a = e.touches[0]) == null ? void 0 : _a.clientY) ?? null;
|
|
296
|
+
}, "handleSheetTouchStart");
|
|
297
|
+
const handleSheetTouchEnd = /* @__PURE__ */ __name((e) => {
|
|
298
|
+
var _a;
|
|
299
|
+
const startY = sheetSwipeStart.current;
|
|
300
|
+
sheetSwipeStart.current = null;
|
|
301
|
+
if (startY === null) return;
|
|
302
|
+
const dy = (((_a = e.changedTouches[0]) == null ? void 0 : _a.clientY) ?? startY) - startY;
|
|
303
|
+
if (dy > 60) close();
|
|
304
|
+
}, "handleSheetTouchEnd");
|
|
305
|
+
const sheet = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
306
|
+
/* @__PURE__ */ jsx(
|
|
307
|
+
"div",
|
|
308
|
+
{
|
|
309
|
+
"aria-hidden": "true",
|
|
310
|
+
className: bem("sheet__backdrop"),
|
|
311
|
+
onClick: close
|
|
312
|
+
}
|
|
313
|
+
),
|
|
314
|
+
/* @__PURE__ */ jsxs(
|
|
315
|
+
"div",
|
|
316
|
+
{
|
|
317
|
+
"aria-label": rest.label,
|
|
318
|
+
"aria-modal": "true",
|
|
319
|
+
className: bem("sheet", { [sheetVariant]: true }),
|
|
320
|
+
role: "dialog",
|
|
321
|
+
onTouchEnd: handleSheetTouchEnd,
|
|
322
|
+
onTouchStart: handleSheetTouchStart,
|
|
323
|
+
children: [
|
|
324
|
+
/* @__PURE__ */ jsxs("div", { className: bem("sheet__header"), children: [
|
|
325
|
+
/* @__PURE__ */ jsx("span", { className: bem("sheet__title"), children: rest.label }),
|
|
326
|
+
/* @__PURE__ */ jsx(
|
|
327
|
+
"button",
|
|
328
|
+
{
|
|
329
|
+
"aria-label": "Close",
|
|
330
|
+
className: bem("sheet__close"),
|
|
331
|
+
type: "button",
|
|
332
|
+
onClick: close,
|
|
333
|
+
children: /* @__PURE__ */ jsx(Icon, { name: "Cancel01Icon", size: "sm" })
|
|
334
|
+
}
|
|
335
|
+
)
|
|
336
|
+
] }),
|
|
337
|
+
/* @__PURE__ */ jsxs(
|
|
338
|
+
"ul",
|
|
339
|
+
{
|
|
340
|
+
ref: listRef,
|
|
341
|
+
"aria-multiselectable": Boolean(args.multiple) || void 0,
|
|
342
|
+
className: bem("sheet__list"),
|
|
343
|
+
id: args.id,
|
|
344
|
+
role: "listbox",
|
|
345
|
+
tabIndex: 0,
|
|
346
|
+
"aria-activedescendant": activeIndex >= 0 ? `${args.id}-opt-${activeIndex}` : void 0,
|
|
347
|
+
onKeyDown: onListKeyDown,
|
|
348
|
+
children: [
|
|
349
|
+
!Boolean(args.required) && !Boolean(args.multiple) && /* @__PURE__ */ jsx(
|
|
350
|
+
"li",
|
|
351
|
+
{
|
|
352
|
+
id: `${args.id}-opt-0`,
|
|
353
|
+
role: "option",
|
|
354
|
+
tabIndex: -1,
|
|
355
|
+
"aria-selected": (
|
|
356
|
+
/* istanbul ignore next */
|
|
357
|
+
Array.isArray(args.value) ? args.value.length === 0 : String(args.value ?? "") === ""
|
|
358
|
+
),
|
|
359
|
+
className: bem("sheet__item", {
|
|
360
|
+
selected: (
|
|
361
|
+
/* istanbul ignore next */
|
|
362
|
+
Array.isArray(args.value) ? args.value.length === 0 : String(args.value ?? "") === ""
|
|
363
|
+
),
|
|
364
|
+
active: activeIndex === 0
|
|
365
|
+
}),
|
|
366
|
+
onClick: (
|
|
367
|
+
/* istanbul ignore next */
|
|
368
|
+
/* @__PURE__ */ __name(() => args.onOptionClick(null), "onClick")
|
|
369
|
+
),
|
|
370
|
+
onKeyDown: (
|
|
371
|
+
/* istanbul ignore next */
|
|
372
|
+
/* @__PURE__ */ __name((e) => onOptionKeyDown(e, null), "onKeyDown")
|
|
373
|
+
),
|
|
374
|
+
onMouseMove: (
|
|
375
|
+
/* istanbul ignore next */
|
|
376
|
+
/* @__PURE__ */ __name(() => setActiveIndex(0), "onMouseMove")
|
|
377
|
+
),
|
|
378
|
+
children: args.placeholder
|
|
379
|
+
},
|
|
380
|
+
"placeholder"
|
|
381
|
+
),
|
|
382
|
+
args.items.map((opt) => {
|
|
383
|
+
var _a;
|
|
384
|
+
const hasPh = !Boolean(args.required) && !Boolean(args.multiple);
|
|
385
|
+
const idx = args.items.findIndex(
|
|
386
|
+
(x) => x.value === opt.value
|
|
387
|
+
);
|
|
388
|
+
const index = idx + (hasPh ? 1 : 0);
|
|
389
|
+
const selected = Array.isArray(args.value) ? args.value.includes(opt.value) : opt.value === args.value;
|
|
390
|
+
return /* @__PURE__ */ jsxs(
|
|
391
|
+
"li",
|
|
392
|
+
{
|
|
393
|
+
"aria-selected": selected,
|
|
394
|
+
id: `${args.id}-opt-${index}`,
|
|
395
|
+
role: "option",
|
|
396
|
+
tabIndex: -1,
|
|
397
|
+
className: bem("sheet__item", {
|
|
398
|
+
selected,
|
|
399
|
+
active: activeIndex === index
|
|
400
|
+
}),
|
|
401
|
+
onClick: /* @__PURE__ */ __name(() => args.onOptionClick(opt.value), "onClick"),
|
|
402
|
+
onMouseMove: /* @__PURE__ */ __name(() => setActiveIndex(index), "onMouseMove"),
|
|
403
|
+
onKeyDown: /* @__PURE__ */ __name((e) => onOptionKeyDown(e, opt.value), "onKeyDown"),
|
|
404
|
+
children: [
|
|
405
|
+
Boolean(args.iconVisible) && /* istanbul ignore next */
|
|
406
|
+
((_a = opt.icon) == null ? void 0 : _a.call(opt)),
|
|
407
|
+
opt.label
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
`${args.id}-${opt.value}`
|
|
411
|
+
);
|
|
412
|
+
})
|
|
413
|
+
]
|
|
414
|
+
}
|
|
415
|
+
),
|
|
416
|
+
Boolean(args.multiple) && /* @__PURE__ */ jsx("div", { className: bem("sheet__footer"), children: /* @__PURE__ */ jsx(
|
|
417
|
+
"button",
|
|
418
|
+
{
|
|
419
|
+
className: bem("sheet__done"),
|
|
420
|
+
type: "button",
|
|
421
|
+
onClick: close,
|
|
422
|
+
children: "Done"
|
|
423
|
+
}
|
|
424
|
+
) })
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
)
|
|
428
|
+
] });
|
|
429
|
+
return createPortal(sheet, document.body);
|
|
430
|
+
}
|
|
278
431
|
const listbox = /* @__PURE__ */ jsxs(
|
|
279
432
|
"ul",
|
|
280
433
|
{
|