@prokodo/ui 0.1.2 → 0.1.3

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.
Files changed (54) hide show
  1. package/README.md +1 -0
  2. package/dist/components/accordion/Accordion.base.module.scss.js +6 -1
  3. package/dist/components/accordion/Accordion.view.js +73 -48
  4. package/dist/components/card/Card.view.js +0 -1
  5. package/dist/components/dialog/Dialog.view.js +76 -62
  6. package/dist/components/form/Form.view.js +78 -67
  7. package/dist/components/form/FormField.client.js +18 -1
  8. package/dist/components/image/Image.client.js +2 -2
  9. package/dist/components/image/Image.js +1 -1
  10. package/dist/components/image/Image.lazy.js +1 -1
  11. package/dist/components/image/Image.server.js +7 -9
  12. package/dist/components/post-teaser/PostTeaser.view.js +9 -5
  13. package/dist/components/post-widget/PostWidget.view.js +1 -3
  14. package/dist/components/post-widget-carousel/PostWidgetCarousel.view.js +1 -3
  15. package/dist/components/rating/Rating.client.js +162 -0
  16. package/dist/components/rating/Rating.js +12 -0
  17. package/dist/components/rating/Rating.lazy.js +12 -0
  18. package/dist/components/rating/Rating.module.scss.js +22 -0
  19. package/dist/components/rating/Rating.server.js +11 -0
  20. package/dist/components/rating/Rating.validation.js +18 -0
  21. package/dist/components/rating/Rating.view.js +165 -0
  22. package/dist/components/rating/index.js +4 -0
  23. package/dist/components/snackbar/Snackbar.module.scss.js +2 -3
  24. package/dist/components/snackbar/Snackbar.view.js +20 -4
  25. package/dist/constants/project.js +1 -1
  26. package/dist/helpers/createIsland.js +17 -9
  27. package/dist/helpers/createLazyWrapper.js +9 -8
  28. package/dist/index.js +2 -0
  29. package/dist/tsconfig.build.tsbuildinfo +1 -1
  30. package/dist/types/components/accordion/Accordion.model.d.ts +1 -0
  31. package/dist/types/components/card/Card.model.d.ts +2 -3
  32. package/dist/types/components/dialog/Dialog.model.d.ts +1 -0
  33. package/dist/types/components/dialog/Dialog.view.d.ts +1 -1
  34. package/dist/types/components/form/Form.model.d.ts +7 -3
  35. package/dist/types/components/image/Image.d.ts +26 -2
  36. package/dist/types/components/image/Image.lazy.d.ts +26 -2
  37. package/dist/types/components/image/Image.model.d.ts +2 -7
  38. package/dist/types/components/post-teaser/PostTeaser.view.d.ts +1 -1
  39. package/dist/types/components/post-widget/PostWidget.view.d.ts +1 -1
  40. package/dist/types/components/post-widget-carousel/PostWidgetCarousel.view.d.ts +1 -1
  41. package/dist/types/components/rating/Rating.client.d.ts +5 -0
  42. package/dist/types/components/rating/Rating.d.ts +4 -0
  43. package/dist/types/components/rating/Rating.lazy.d.ts +5 -0
  44. package/dist/types/components/rating/Rating.model.d.ts +52 -0
  45. package/dist/types/components/rating/Rating.server.d.ts +3 -0
  46. package/dist/types/components/rating/Rating.validation.d.ts +2 -0
  47. package/dist/types/components/rating/Rating.view.d.ts +3 -0
  48. package/dist/types/components/rating/index.d.ts +2 -0
  49. package/dist/types/components/snackbar/Snackbar.model.d.ts +4 -1
  50. package/dist/types/components/snackbar/Snackbar.view.d.ts +1 -1
  51. package/dist/types/components/snackbar/SnackbarProvider.model.d.ts +3 -13
  52. package/dist/types/index.d.ts +1 -0
  53. package/dist/ui.css +298 -26
  54. package/package.json +5 -1
package/README.md CHANGED
@@ -192,6 +192,7 @@ export default function GalleryPage() {
192
192
  | PostWidgetCarousel | ✅ | ✅ |
193
193
  | ProgressBar | ✅ | ✅ |
194
194
  | Quote | ✅ | – |
195
+ | Rating | ✅ | ✅ |
195
196
  | RichText | ✅ | ✅ |
196
197
  | Select | ✅ | ✅ |
197
198
  | SideNav | ✅ | ✅ |
@@ -4,8 +4,13 @@ const styles = {
4
4
  "prokodo-Accordion__item": "prokodo-Accordion__item",
5
5
  "prokodo-Accordion__item--is-expanded": "prokodo-Accordion__item--is-expanded",
6
6
  "prokodo-Accordion__header": "prokodo-Accordion__header",
7
+ "prokodo-Accordion__header__toggle": "prokodo-Accordion__header__toggle",
8
+ "prokodo-Accordion__header__actions": "prokodo-Accordion__header__actions",
9
+ "prokodo-Accordion__header__actions__wrapper": "prokodo-Accordion__header__actions__wrapper",
10
+ "prokodo-Accordion__header__icons": "prokodo-Accordion__header__icons",
11
+ "prokodo-Accordion__header__wrapper": "prokodo-Accordion__header__wrapper",
7
12
  accordionBorderShift,
8
- "prokodo-Accordion__header--is-expanded": "prokodo-Accordion__header--is-expanded",
13
+ "prokodo-Accordion__header__wrapper--is-expanded": "prokodo-Accordion__header__wrapper--is-expanded",
9
14
  "prokodo-Accordion__title": "prokodo-Accordion__title",
10
15
  "prokodo-Accordion__icon": "prokodo-Accordion__icon",
11
16
  "prokodo-Accordion__icon--is-hidden": "prokodo-Accordion__icon--is-hidden",
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
  import { jsxs, jsx } from "react/jsx-runtime";
4
4
  import { create } from "../../helpers/bem.js";
5
- import { isNull } from "../../helpers/validations.js";
5
+ import { isNull, isArray } from "../../helpers/validations.js";
6
6
  import styles from "./Accordion.base.module.scss.js";
7
7
  import { AccordionEffectsLoader } from "./Accordion.effects.client.js";
8
8
  import { Headline } from "../headline/Headline.js";
@@ -32,65 +32,90 @@ function AccordionView({
32
32
  const {
33
33
  title,
34
34
  renderHeader,
35
+ renderHeaderActions,
35
36
  renderContent,
36
37
  actions,
37
38
  className: itemCls
38
39
  } = item;
39
40
  const accId = `${id}-${title}`;
40
41
  const isExpanded = expandedIndex === index;
42
+ const accHeaderProps = {
43
+ "aria-controls": `${accId}-content`,
44
+ "aria-expanded": isExpanded,
45
+ role: "button",
46
+ tabIndex: 0,
47
+ onClick: onToggle ? (e) => onToggle(index, e) : void 0,
48
+ onKeyDown: onToggle ? (e) => {
49
+ if (e.key === "Enter" || e.key === " ") onToggle(index, e);
50
+ } : void 0
51
+ };
41
52
  return /* @__PURE__ */ jsxs(
42
53
  "div",
43
54
  {
44
55
  className: bem("item", { "is-expanded": isExpanded }, itemCls),
45
56
  children: [
46
- /* @__PURE__ */ jsxs(
57
+ /* @__PURE__ */ jsx(
47
58
  "div",
48
59
  {
49
- "aria-controls": `${accId}-content`,
50
- "aria-expanded": isExpanded,
51
- className: bem("header", { "is-expanded": isExpanded }),
52
- id: `${accId}-header`,
53
- role: "button",
54
- tabIndex: 0,
55
- onClick: onToggle ? (e) => onToggle(index, e) : void 0,
56
- onKeyDown: onToggle ? (e) => {
57
- if (e.key === "Enter" || e.key === " ") onToggle(index, e);
58
- } : void 0,
59
- children: [
60
- !isNull(renderHeader) ? renderHeader : /* @__PURE__ */ jsx(
61
- Headline,
62
- {
63
- animated: true,
64
- className: bem("title"),
65
- highlight: isExpanded,
66
- size: "xs",
67
- type: "h3",
68
- variant: isExpanded ? "primary" : "inherit",
69
- ...item.titleOptions ?? titleOptions,
70
- children: title
71
- }
72
- ),
73
- /* @__PURE__ */ jsx(
74
- Icon,
75
- {
76
- className: bem("icon", { "is-hidden": isExpanded }),
77
- color: "inherit",
78
- name: "PlusSignIcon",
79
- size: "sm",
80
- ...iconProps
81
- }
82
- ),
83
- /* @__PURE__ */ jsx(
84
- Icon,
85
- {
86
- className: bem("icon", { "is-hidden": !isExpanded }),
87
- color: "inherit",
88
- name: "MinusSignIcon",
89
- size: "sm",
90
- ...iconProps
91
- }
92
- )
93
- ]
60
+ className: bem("header__wrapper", { "is-expanded": isExpanded }),
61
+ children: /* @__PURE__ */ jsxs(
62
+ "div",
63
+ {
64
+ ...accHeaderProps,
65
+ className: bem("header__toggle", { "is-expanded": isExpanded }),
66
+ id: `${accId}-header`,
67
+ children: [
68
+ !isNull(renderHeader) ? renderHeader : /* @__PURE__ */ jsx(
69
+ Headline,
70
+ {
71
+ animated: true,
72
+ className: bem("title"),
73
+ highlight: isExpanded,
74
+ size: "xs",
75
+ type: "h3",
76
+ variant: isExpanded ? "primary" : "inherit",
77
+ ...item.titleOptions ?? titleOptions,
78
+ children: title
79
+ }
80
+ ),
81
+ /* @__PURE__ */ jsxs("div", { className: bem("header__actions__wrapper"), children: [
82
+ !isNull(renderHeaderActions) && // eslint-disable-next-line jsx-a11y/no-static-element-interactions
83
+ /* @__PURE__ */ jsx(
84
+ "div",
85
+ {
86
+ className: bem("header__actions"),
87
+ onClick: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onClick"),
88
+ onMouseDown: /* @__PURE__ */ __name((e) => e.stopPropagation(), "onMouseDown"),
89
+ onKeyDown: /* @__PURE__ */ __name((e) => e.key === "Enter" ? e.stopPropagation() : void 0, "onKeyDown"),
90
+ children: renderHeaderActions
91
+ }
92
+ ),
93
+ /* @__PURE__ */ jsxs("div", { className: bem("header__icons"), children: [
94
+ /* @__PURE__ */ jsx(
95
+ Icon,
96
+ {
97
+ className: bem("icon", { "is-hidden": isExpanded }),
98
+ color: "inherit",
99
+ name: "PlusSignIcon",
100
+ size: "sm",
101
+ ...iconProps
102
+ }
103
+ ),
104
+ /* @__PURE__ */ jsx(
105
+ Icon,
106
+ {
107
+ className: bem("icon", { "is-hidden": !isExpanded }),
108
+ color: "inherit",
109
+ name: "MinusSignIcon",
110
+ size: "sm",
111
+ ...iconProps
112
+ }
113
+ )
114
+ ] })
115
+ ] })
116
+ ]
117
+ }
118
+ )
94
119
  }
95
120
  ),
96
121
  /* @__PURE__ */ jsxs(
@@ -103,7 +128,7 @@ function AccordionView({
103
128
  role: "region",
104
129
  children: [
105
130
  !isNull(renderContent) && /* @__PURE__ */ jsx(Animated, { children: renderContent }),
106
- actions !== void 0 && (actions == null ? void 0 : actions.length) ? /* @__PURE__ */ jsx("div", { className: bem("actions"), children: actions.map((action) => /* @__PURE__ */ jsx(
131
+ isArray(actions) ? /* @__PURE__ */ jsx("div", { className: bem("actions"), children: actions.map((action) => /* @__PURE__ */ jsx(
107
132
  Button,
108
133
  {
109
134
  ...action
@@ -101,7 +101,6 @@ function CardView({
101
101
  {
102
102
  alt: "card background",
103
103
  className: bem("background", void 0, backgroundProps == null ? void 0 : backgroundProps.className),
104
- imageComponent: (backgroundProps == null ? void 0 : backgroundProps.imageComponent) ?? "img",
105
104
  src: background,
106
105
  ...backgroundProps
107
106
  }
@@ -2,6 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
  import { jsxs, jsx } from "react/jsx-runtime";
4
4
  import { create } from "../../helpers/bem.js";
5
+ import { isNumber } from "../../helpers/validations.js";
5
6
  import styles from "./Dialog.module.scss.js";
6
7
  import { Button } from "../button/Button.js";
7
8
  import { Headline } from "../headline/Headline.js";
@@ -21,6 +22,7 @@ function DialogView({
21
22
  containerChildren,
22
23
  className,
23
24
  classNameHeader,
25
+ height,
24
26
  scroll = "paper",
25
27
  fullScreen = false,
26
28
  titleProps = {},
@@ -41,6 +43,9 @@ function DialogView({
41
43
  fullScreen,
42
44
  "is-visible": Boolean(open)
43
45
  };
46
+ const styleModifier = isNumber(height) ? {
47
+ maxHeight: `${height}px`
48
+ } : void 0;
44
49
  const renderDialog = /* @__PURE__ */ __name(() => {
45
50
  var _a;
46
51
  return /* @__PURE__ */ jsxs(
@@ -52,74 +57,83 @@ function DialogView({
52
57
  role: "dialog",
53
58
  ...rest,
54
59
  className: bem(void 0, wrapperMods, className),
60
+ style: styleModifier,
55
61
  children: [
56
- /* @__PURE__ */ jsxs("div", { ref: containerRef, className: bem("container", containerMods), children: [
57
- /* @__PURE__ */ jsxs("div", { className: bem("header", void 0, classNameHeader), children: [
58
- /* @__PURE__ */ jsxs("div", { children: [
59
- /* @__PURE__ */ jsx(
60
- Headline,
61
- {
62
- ...titleProps,
63
- className: bem("title", { "is-hidden": hideTitle }),
64
- id: "dialog-title",
65
- children: title
66
- }
67
- ),
68
- renderHeader == null ? void 0 : renderHeader()
69
- ] }),
70
- !Boolean(hideCloseButton) && /* @__PURE__ */ jsxs(
71
- "button",
72
- {
73
- ...closeButtonProps,
74
- ref: closeButtonRef,
75
- "aria-label": (closeButtonProps == null ? void 0 : closeButtonProps["aria-label"]) ?? (translations == null ? void 0 : translations.close),
76
- className: bem(
77
- "header__button",
78
- void 0,
79
- closeButtonProps == null ? void 0 : closeButtonProps.className
80
- ),
81
- onClick: onClose,
82
- onKeyDown: onCloseKeyDown,
83
- children: [
62
+ /* @__PURE__ */ jsxs(
63
+ "div",
64
+ {
65
+ ref: containerRef,
66
+ className: bem("container", containerMods),
67
+ style: styleModifier,
68
+ children: [
69
+ /* @__PURE__ */ jsxs("div", { className: bem("header", void 0, classNameHeader), children: [
70
+ /* @__PURE__ */ jsxs("div", { children: [
84
71
  /* @__PURE__ */ jsx(
85
- Icon,
72
+ Headline,
86
73
  {
87
- name: "Cancel01Icon",
88
- size: "xs",
89
- ...closeButtonProps == null ? void 0 : closeButtonProps.iconProps,
90
- className: bem(
91
- "header__button__icon",
92
- void 0,
93
- (_a = closeButtonProps == null ? void 0 : closeButtonProps.iconProps) == null ? void 0 : _a.className
94
- )
74
+ ...titleProps,
75
+ className: bem("title", { "is-hidden": hideTitle }),
76
+ id: "dialog-title",
77
+ children: title
95
78
  }
96
79
  ),
97
- (closeButtonProps == null ? void 0 : closeButtonProps.title) ?? (translations == null ? void 0 : translations.close) ?? "Close"
98
- ]
99
- }
100
- )
101
- ] }),
102
- /* @__PURE__ */ jsx("div", { "aria-hidden": "true", tabIndex: 0 }),
103
- /* @__PURE__ */ jsx(
104
- "div",
105
- {
106
- ...contentProps,
107
- ref: contentRef,
108
- id: "dialog-content",
109
- className: bem(
110
- "content",
111
- { [`scroll-${scroll}`]: true },
112
- contentProps.className
80
+ renderHeader == null ? void 0 : renderHeader()
81
+ ] }),
82
+ !Boolean(hideCloseButton) && /* @__PURE__ */ jsxs(
83
+ "button",
84
+ {
85
+ ...closeButtonProps,
86
+ ref: closeButtonRef,
87
+ "aria-label": (closeButtonProps == null ? void 0 : closeButtonProps["aria-label"]) ?? (translations == null ? void 0 : translations.close),
88
+ className: bem(
89
+ "header__button",
90
+ void 0,
91
+ closeButtonProps == null ? void 0 : closeButtonProps.className
92
+ ),
93
+ onClick: onClose,
94
+ onKeyDown: onCloseKeyDown,
95
+ children: [
96
+ /* @__PURE__ */ jsx(
97
+ Icon,
98
+ {
99
+ name: "Cancel01Icon",
100
+ size: "xs",
101
+ ...closeButtonProps == null ? void 0 : closeButtonProps.iconProps,
102
+ className: bem(
103
+ "header__button__icon",
104
+ void 0,
105
+ (_a = closeButtonProps == null ? void 0 : closeButtonProps.iconProps) == null ? void 0 : _a.className
106
+ )
107
+ }
108
+ ),
109
+ (closeButtonProps == null ? void 0 : closeButtonProps.title) ?? (translations == null ? void 0 : translations.close) ?? "Close"
110
+ ]
111
+ }
112
+ )
113
+ ] }),
114
+ /* @__PURE__ */ jsx("div", { "aria-hidden": "true", tabIndex: 0 }),
115
+ /* @__PURE__ */ jsx(
116
+ "div",
117
+ {
118
+ ...contentProps,
119
+ ref: contentRef,
120
+ id: "dialog-content",
121
+ className: bem(
122
+ "content",
123
+ { [`scroll-${scroll}`]: true },
124
+ contentProps.className
125
+ ),
126
+ children
127
+ }
113
128
  ),
114
- children
115
- }
116
- ),
117
- actions.length > 0 && /* @__PURE__ */ jsxs("div", { className: bem("actions"), children: [
118
- /* @__PURE__ */ jsx("div", { "aria-hidden": "true", tabIndex: 0 }),
119
- actions.map((action) => /* @__PURE__ */ jsx(Button, { ...action, title: (action == null ? void 0 : action.title) ?? "" }, action.id)),
120
- /* @__PURE__ */ jsx("div", { "aria-hidden": "true", tabIndex: 0 })
121
- ] })
122
- ] }),
129
+ actions.length > 0 && /* @__PURE__ */ jsxs("div", { className: bem("actions"), children: [
130
+ /* @__PURE__ */ jsx("div", { "aria-hidden": "true", tabIndex: 0 }),
131
+ actions.map((action) => /* @__PURE__ */ jsx(Button, { ...action, title: (action == null ? void 0 : action.title) ?? "" }, action.id)),
132
+ /* @__PURE__ */ jsx("div", { "aria-hidden": "true", tabIndex: 0 })
133
+ ] })
134
+ ]
135
+ }
136
+ ),
123
137
  containerChildren
124
138
  ]
125
139
  }
@@ -36,76 +36,87 @@ const FormView = /* @__PURE__ */ __name(({
36
36
  defaultFields: _defaultFields,
37
37
  messages: _messages,
38
38
  ...htmlProps
39
- }) => /* @__PURE__ */ jsxs(
40
- "form",
41
- {
42
- ...htmlProps,
43
- noValidate: true,
44
- action,
45
- "aria-labelledby": `${id}-heading`,
46
- className: bem(void 0, void 0, className),
47
- id,
48
- onSubmit: typeof action === "function" || typeof action === "string" ? void 0 : onFormSubmit,
49
- children: [
50
- /* @__PURE__ */ jsx(
51
- Headline,
52
- {
53
- type: "h2",
54
- ...headlineProps,
55
- id: `${id}-heading`,
56
- className: bem(
57
- "label",
58
- {
59
- "is-hidden": Boolean(hideHeadline)
60
- },
61
- headlineProps == null ? void 0 : headlineProps.className
62
- ),
63
- children: label
64
- }
65
- ),
66
- /* @__PURE__ */ jsxs(Grid, { className: bem("grid"), spacing: 2, children: [
67
- isArray(formState) && formState.map((field) => /* @__PURE__ */ createElement(
68
- FormField,
69
- {
70
- ...field,
71
- key: field.name,
72
- disabled: disabled !== void 0 ? disabled : field == null ? void 0 : field.disabled,
73
- messagesFields,
74
- variant,
75
- ...fieldProps
76
- }
77
- )),
78
- children,
39
+ }) => {
40
+ const {
41
+ value: hpValue,
42
+ onChange: hpOnChange,
43
+ readOnly: hpReadOnly,
44
+ ...honeypotRest
45
+ } = honeypot;
46
+ const honeypotReadOnly = hpReadOnly !== void 0 ? hpReadOnly : hpValue !== void 0 && hpOnChange == null;
47
+ return /* @__PURE__ */ jsxs(
48
+ "form",
49
+ {
50
+ ...htmlProps,
51
+ noValidate: true,
52
+ action,
53
+ "aria-labelledby": `${id}-heading`,
54
+ className: bem(void 0, void 0, className),
55
+ id,
56
+ onSubmit: typeof action === "function" || typeof action === "string" ? void 0 : onFormSubmit,
57
+ children: [
79
58
  /* @__PURE__ */ jsx(
80
- "input",
81
- {
82
- "aria-hidden": "true",
83
- className: bem("hp"),
84
- id: "hp",
85
- name: "hp",
86
- type: "text",
87
- ...honeypot
88
- }
89
- )
90
- ] }),
91
- /* @__PURE__ */ jsxs("div", { className: bem("footer"), children: [
92
- (hideResponse === false || hideResponse === void 0) && /* @__PURE__ */ jsx(FormResponse, { messages: formMessages }),
93
- !isNull(button) && Boolean(isHoneypotEmpty) && /* @__PURE__ */ jsx(
94
- Button,
59
+ Headline,
95
60
  {
96
- "aria-label": "Submit form",
97
- title: "Submit",
98
- type: "submit",
99
- ...button,
100
- className: bem("footer__submit", void 0, button == null ? void 0 : button.className),
101
- color: (button == null ? void 0 : button.color) ?? variant,
102
- disabled: Boolean(formMessages == null ? void 0 : formMessages.errors) || !isFormValid
61
+ type: "h2",
62
+ ...headlineProps,
63
+ id: `${id}-heading`,
64
+ className: bem(
65
+ "label",
66
+ {
67
+ "is-hidden": Boolean(hideHeadline)
68
+ },
69
+ headlineProps == null ? void 0 : headlineProps.className
70
+ ),
71
+ children: label
103
72
  }
104
- )
105
- ] })
106
- ]
107
- }
108
- ), "FormView");
73
+ ),
74
+ /* @__PURE__ */ jsxs(Grid, { className: bem("grid"), spacing: 2, children: [
75
+ isArray(formState) && formState.map((field) => /* @__PURE__ */ createElement(
76
+ FormField,
77
+ {
78
+ ...field,
79
+ key: field.name,
80
+ disabled: disabled !== void 0 ? disabled : field == null ? void 0 : field.disabled,
81
+ messagesFields,
82
+ variant,
83
+ ...fieldProps
84
+ }
85
+ )),
86
+ children,
87
+ /* @__PURE__ */ jsx(
88
+ "input",
89
+ {
90
+ "aria-hidden": "true",
91
+ className: bem("hp"),
92
+ id: "hp",
93
+ name: "hp",
94
+ type: "text",
95
+ ...honeypotRest,
96
+ readOnly: honeypotReadOnly,
97
+ value: hpValue
98
+ }
99
+ )
100
+ ] }),
101
+ /* @__PURE__ */ jsxs("div", { className: bem("footer"), children: [
102
+ (hideResponse === false || hideResponse === void 0) && /* @__PURE__ */ jsx(FormResponse, { messages: formMessages }),
103
+ !isNull(button) && Boolean(isHoneypotEmpty) && /* @__PURE__ */ jsx(
104
+ Button,
105
+ {
106
+ "aria-label": "Submit form",
107
+ title: "Submit",
108
+ type: "submit",
109
+ ...button,
110
+ className: bem("footer__submit", void 0, button == null ? void 0 : button.className),
111
+ color: (button == null ? void 0 : button.color) ?? variant,
112
+ disabled: Boolean(formMessages == null ? void 0 : formMessages.errors) || !isFormValid
113
+ }
114
+ )
115
+ ] })
116
+ ]
117
+ }
118
+ );
119
+ }, "FormView");
109
120
  export {
110
121
  FormView
111
122
  };
@@ -5,6 +5,7 @@ import { jsx } from "react/jsx-runtime";
5
5
  import { useCallback } from "react";
6
6
  import { create } from "../../helpers/bem.js";
7
7
  import styles from "./FormField.module.scss.js";
8
+ import { Rating } from "../rating/Rating.js";
8
9
  import { DynamicList } from "../dynamic-list/DynamicList.js";
9
10
  import { GridRow } from "../grid/GridRow.js";
10
11
  import { DatePicker } from "../datePicker/DatePicker.js";
@@ -22,7 +23,7 @@ function FormFieldClient({
22
23
  onValidate,
23
24
  ...props
24
25
  }) {
25
- var _a, _b, _c;
26
+ var _a, _b, _c, _d;
26
27
  const renderFieldContainer = useCallback(
27
28
  (children) => /* @__PURE__ */ jsx(GridRow, { className: bem(), xs: 12, children }),
28
29
  []
@@ -110,6 +111,22 @@ function FormFieldClient({
110
111
  }
111
112
  )
112
113
  );
114
+ case "rating":
115
+ return renderFieldContainer(
116
+ /* @__PURE__ */ jsx(
117
+ Rating,
118
+ {
119
+ priority: true,
120
+ ...props,
121
+ errorTranslations: (_d = messagesFields == null ? void 0 : messagesFields.errors) == null ? void 0 : _d.input,
122
+ onValidate: /* @__PURE__ */ __name((_, err) => onValidate == null ? void 0 : onValidate(props, err), "onValidate"),
123
+ onChange: /* @__PURE__ */ __name((e) => {
124
+ var _a2;
125
+ return onChange == null ? void 0 : onChange(props, (_a2 = e == null ? void 0 : e.value) == null ? void 0 : _a2.toString());
126
+ }, "onChange")
127
+ }
128
+ )
129
+ );
113
130
  default:
114
131
  return null;
115
132
  }
@@ -13,11 +13,11 @@ const ImageClient = /* @__PURE__ */ __name(({
13
13
  containerClassName,
14
14
  captionClassName,
15
15
  className,
16
- imageComponent,
17
16
  ...props
18
17
  }) => {
18
+ console.log(props);
19
19
  const { imageComponent: ctxImage } = useUIRuntime();
20
- const CustomImage = imageComponent ?? ctxImage ?? "img";
20
+ const CustomImage = ctxImage ?? "img";
21
21
  const renderImage = /* @__PURE__ */ __name(() => /* @__PURE__ */ jsx(
22
22
  CustomImage,
23
23
  {
@@ -6,7 +6,7 @@ const Image = createIsland({
6
6
  name: "Image",
7
7
  Server: ImageServer,
8
8
  loadLazy: /* @__PURE__ */ __name(() => import("./Image.lazy.js"), "loadLazy"),
9
- isInteractive: /* @__PURE__ */ __name((p) => typeof p.imageComponent === "function", "isInteractive")
9
+ isInteractive: /* @__PURE__ */ __name(() => true, "isInteractive")
10
10
  });
11
11
  export {
12
12
  Image
@@ -9,7 +9,7 @@ const Image_lazy = createLazyWrapper({
9
9
  Client: ImageClient,
10
10
  Server: ImageServer,
11
11
  // treat as interactive if a custom image component is a function (e.g. NextImage)
12
- isInteractive: /* @__PURE__ */ __name((p) => typeof p.imageComponent === "function", "isInteractive")
12
+ isInteractive: /* @__PURE__ */ __name(() => true, "isInteractive")
13
13
  });
14
14
  export {
15
15
  Image_lazy as default
@@ -14,11 +14,12 @@ function toImgOnlyProps(p) {
14
14
  _placeholder,
15
15
  _blurDataURL,
16
16
  _priority,
17
+ // internal next/image flag – ignorieren
18
+ // unsere öffentliche API: <Image priority /> → auf <img> mappen
19
+ priority,
17
20
  _quality,
18
21
  // Note: sizes *is* valid on <img> when it's a string, so we won't strip it
19
22
  _onLoadingComplete,
20
- // our runtime wiring we never want on <img>
21
- _imageComponent,
22
23
  ...rest
23
24
  } = p;
24
25
  let src;
@@ -42,6 +43,10 @@ function toImgOnlyProps(p) {
42
43
  width,
43
44
  height
44
45
  };
46
+ if (Boolean(priority)) {
47
+ imgProps.loading = "eager";
48
+ imgProps.fetchPriority = "high";
49
+ }
45
50
  return imgProps;
46
51
  }
47
52
  __name(toImgOnlyProps, "toImgOnlyProps");
@@ -53,14 +58,7 @@ const ImageServer = /* @__PURE__ */ __name(({
53
58
  className,
54
59
  ...rawProps
55
60
  }) => {
56
- if (process.env.NODE_ENV !== "production" && typeof rawProps.imageComponent === "function") {
57
- console.error(
58
- "[UI] Do not pass function props (imageComponent) to <Image> on the server. Use UIRuntimeProvider in the parent app instead.",
59
- rawProps
60
- );
61
- }
62
61
  const {
63
- imageComponent: _dropImageComponent,
64
62
  onClick: _dropClick,
65
63
  onKeyDown: _dropKey,
66
64
  ...rest