@mittwald/flow-react-components 0.2.0-alpha.834 → 0.2.0-alpha.836

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 (39) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/assets/doc-properties.json +14042 -13902
  3. package/dist/css/all.css +1 -1
  4. package/dist/js/_virtual/_.locale.json@4119db69ca94e24d796b8e08482bc927.mjs +2 -0
  5. package/dist/js/_virtual/_.locale.json@4119db69ca94e24d796b8e08482bc927.mjs.map +1 -1
  6. package/dist/js/packages/components/src/components/Modal/Modal.mjs +18 -5
  7. package/dist/js/packages/components/src/components/Modal/Modal.mjs.map +1 -1
  8. package/dist/js/packages/components/src/components/Modal/Modal.module.scss.mjs +9 -3
  9. package/dist/js/packages/components/src/components/Modal/Modal.module.scss.mjs.map +1 -1
  10. package/dist/js/packages/components/src/components/Rating/Rating.mjs +5 -1
  11. package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/Rating/Rating.module.scss.mjs +5 -5
  13. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs +27 -0
  14. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/EmptySegment.mjs.map +1 -0
  15. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs +27 -0
  16. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/FilledSegment.mjs.map +1 -0
  17. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs +5 -5
  18. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingSegment.mjs.map +1 -1
  19. package/dist/types/components/Modal/Modal.d.ts +2 -0
  20. package/dist/types/components/Modal/Modal.d.ts.map +1 -1
  21. package/dist/types/components/Rating/Rating.d.ts +5 -1
  22. package/dist/types/components/Rating/Rating.d.ts.map +1 -1
  23. package/dist/types/components/Rating/components/RatingSegment/EmptySegment.d.ts +8 -0
  24. package/dist/types/components/Rating/components/RatingSegment/EmptySegment.d.ts.map +1 -0
  25. package/dist/types/components/Rating/components/RatingSegment/FilledSegment.d.ts +8 -0
  26. package/dist/types/components/Rating/components/RatingSegment/FilledSegment.d.ts.map +1 -0
  27. package/dist/types/components/Rating/components/RatingSegment/RatingSegment.d.ts +4 -2
  28. package/dist/types/components/Rating/components/RatingSegment/RatingSegment.d.ts.map +1 -1
  29. package/dist/types/components/Rating/stories/Default.stories.d.ts +1 -3
  30. package/dist/types/components/Rating/stories/Default.stories.d.ts.map +1 -1
  31. package/package.json +8 -8
  32. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingStar.mjs +0 -18
  33. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingStar.mjs.map +0 -1
  34. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingStarFilled.mjs +0 -18
  35. package/dist/js/packages/components/src/components/Rating/components/RatingSegment/RatingStarFilled.mjs.map +0 -1
  36. package/dist/types/components/Rating/components/RatingSegment/RatingStar.d.ts +0 -8
  37. package/dist/types/components/Rating/components/RatingSegment/RatingStar.d.ts.map +0 -1
  38. package/dist/types/components/Rating/components/RatingSegment/RatingStarFilled.d.ts +0 -8
  39. package/dist/types/components/Rating/components/RatingSegment/RatingStarFilled.d.ts.map +0 -1
@@ -1,12 +1,14 @@
1
1
  "use client"
2
2
  /* */
3
3
  const locales = {"de-DE":{
4
+ "close": "Schließen",
4
5
  "unsavedChangesConfirmationModal.close": "Schließen",
5
6
  "unsavedChangesConfirmationModal.heading": "Ungespeicherte Änderungen",
6
7
  "unsavedChangesConfirmationModal.keepOpen": "Weiter bearbeiten",
7
8
  "unsavedChangesConfirmationModal.text": "Du hast ungespeicherte Änderungen. Möchtest du das Modal wirklich schließen? Alle Änderungen gehen dabei verloren."
8
9
  }
9
10
  ,"en-US":{
11
+ "close": "Close",
10
12
  "unsavedChangesConfirmationModal.close": "Close",
11
13
  "unsavedChangesConfirmationModal.heading": "Unsaved changes",
12
14
  "unsavedChangesConfirmationModal.keepOpen": "Keep editing",
@@ -1 +1 @@
1
- {"version":3,"file":"_.locale.json@4119db69ca94e24d796b8e08482bc927.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"_.locale.json@4119db69ca94e24d796b8e08482bc927.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;"}
@@ -15,10 +15,7 @@ import 'dot-prop';
15
15
  import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
16
16
  import { Overlay } from '../Overlay/Overlay.mjs';
17
17
  import { Action } from '../Action/Action.mjs';
18
- import '../TranslationProvider/TranslationProvider.mjs';
19
- import 'intl-messageformat';
20
- import '@react-aria/i18n';
21
- import 'react-aria';
18
+ import { useLocalizedStringFormatter } from '../TranslationProvider/useLocalizedStringFormatter.mjs';
22
19
  import '@react-aria/live-announcer';
23
20
  import '@mittwald/flow-icons';
24
21
  import '../Icon/components/IconSetProvider.mjs';
@@ -29,6 +26,8 @@ import ButtonView from '../../views/ButtonView.mjs';
29
26
  import { OffCanvasSuspenseFallback } from './components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs';
30
27
  import { Wrap } from '../Wrap/Wrap.mjs';
31
28
  import { ClearPropsContext } from '../../lib/propsContext/components/ClearPropsContext.mjs';
29
+ import '../TranslationProvider/TranslationProvider.mjs';
30
+ import locales from '../../../../../_virtual/_.locale.json@4119db69ca94e24d796b8e08482bc927.mjs';
32
31
 
33
32
  const Modal = flowComponent("Modal", (props) => {
34
33
  const {
@@ -39,8 +38,10 @@ const Modal = flowComponent("Modal", (props) => {
39
38
  ref,
40
39
  className,
41
40
  offCanvasOrientation = "right",
41
+ showCloseButton,
42
42
  ...overlayProps
43
43
  } = props;
44
+ const stringFormatter = useLocalizedStringFormatter(locales, "Modal");
44
45
  const rootClassName = clsx(
45
46
  offCanvas ? styles.offCanvas : styles.modal,
46
47
  styles[`size-${size}`],
@@ -49,7 +50,19 @@ const Modal = flowComponent("Modal", (props) => {
49
50
  );
50
51
  const header = (children2) => /* @__PURE__ */ jsxs(Fragment, { children: [
51
52
  children2,
52
- /* @__PURE__ */ jsx(Action, { closeModal: { bypassConfirmation: true }, children: /* @__PURE__ */ jsx(ButtonView, { variant: "plain", color: "secondary", children: /* @__PURE__ */ jsx(IconClose, {}) }) })
53
+ /* @__PURE__ */ jsx(Action, { closeModal: { bypassConfirmation: true }, children: /* @__PURE__ */ jsx(
54
+ ButtonView,
55
+ {
56
+ variant: "plain",
57
+ color: "secondary",
58
+ "aria-label": stringFormatter.format("close"),
59
+ className: clsx(
60
+ styles.closeButton,
61
+ showCloseButton === true ? styles.alwaysVisible : showCloseButton === false ? styles.alwaysHidden : void 0
62
+ ),
63
+ children: /* @__PURE__ */ jsx(IconClose, {})
64
+ }
65
+ ) })
53
66
  ] });
54
67
  const nestedHeadingLevel = 3;
55
68
  const nestedHeadingProps = {
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.mjs","sources":["../../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { type PropsWithChildren, type ReactNode, Suspense } from \"react\";\nimport styles from \"./Modal.module.scss\";\nimport clsx from \"clsx\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { OverlayController } from \"@/lib/controller/overlay\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Overlay, type OverlayProps } from \"@/components/Overlay/Overlay\";\nimport { Action } from \"@/components/Action\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport ButtonView from \"@/views/ButtonView\";\nimport { OffCanvasSuspenseFallback } from \"@/components/Modal/components/OffCanvasSuspenseFallback\";\nimport Wrap from \"@/components/Wrap\";\nimport { ClearPropsContext } from \"@/components/ClearPropsContext/ClearPropsContext\";\n\ntype SupportedOverlayProps = Pick<\n OverlayProps,\n \"isOpen\" | \"isDefaultOpen\" | \"onOpen\" | \"onClose\" | \"onOpenChange\"\n>;\n\nexport interface ModalProps\n extends\n PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName,\n SupportedOverlayProps {\n /** The size of the modal. @default \"s\" */\n size?: \"s\" | \"m\" | \"l\";\n /** Whether the modal should be displayed as an off canvas. */\n offCanvas?: boolean;\n /**\n * Whether the off canvas should be displayed on the right or left side of the\n * screen. @default \"right\"\n */\n offCanvasOrientation?: \"left\" | \"right\";\n /** An overlay controller to control the modal state. */\n controller?: OverlayController;\n /**\n * Accepts \"actionConfirm\" to use the modal as a confirmation modal for an\n * action.\n */\n slot?: string;\n /** Whether the modal can be closed by clicking outside of it. */\n isDismissable?: boolean;\n}\n\nexport const Modal = flowComponent(\"Modal\", (props) => {\n const {\n size = \"s\",\n offCanvas,\n controller,\n children,\n ref,\n className,\n offCanvasOrientation = \"right\",\n ...overlayProps\n } = props;\n\n const rootClassName = clsx(\n offCanvas ? styles.offCanvas : styles.modal,\n styles[`size-${size}`],\n offCanvasOrientation === \"left\" && styles[\"left\"],\n className,\n );\n\n const header = (children: ReactNode) => (\n <>\n {children}\n <Action closeModal={{ bypassConfirmation: true }}>\n <ButtonView variant=\"plain\" color=\"secondary\">\n <IconClose />\n </ButtonView>\n </Action>\n </>\n );\n\n const nestedHeadingLevel = 3;\n\n const nestedHeadingProps: PropsContext = {\n Heading: { level: nestedHeadingLevel },\n Section: {\n Header: { Heading: { level: nestedHeadingLevel } },\n Heading: { level: nestedHeadingLevel },\n },\n Header: { Heading: { level: nestedHeadingLevel } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n ...nestedHeadingProps,\n className: styles.content,\n },\n ColumnLayout: {\n ...nestedHeadingProps,\n l: [2, 1],\n m: [1],\n className: styles.columnLayout,\n AccentBox: { className: styles.accentBox, backgroundColor: \"neutral\" },\n wrapWith: <ClearPropsContext />,\n },\n Heading: {\n className: styles.header,\n level: 2,\n slot: \"title\",\n children: dynamic((props) => header(props.children)),\n },\n ActionGroup: {\n className: styles.actionGroup,\n spacing: \"m\",\n Action: {\n closeModal: dynamic((props) => {\n if (props.closeModal === undefined) {\n return;\n }\n if (props.closeModal === true) {\n return { bypassConfirmation: true };\n }\n return {\n bypassConfirmation: true,\n ...props.closeModal,\n };\n }),\n closeOverlay: dynamic((props) => {\n if (props.closeOverlay === undefined) {\n return;\n }\n if (\n props.closeOverlay instanceof OverlayController ||\n typeof props.closeOverlay === \"string\"\n ) {\n return {\n bypassConfirmation: true,\n overlay: props.closeOverlay,\n };\n }\n return {\n bypassConfirmation: true,\n ...props.closeOverlay,\n };\n }),\n },\n },\n };\n\n return (\n <Overlay\n className={rootClassName}\n controller={controller}\n ref={ref}\n {...overlayProps}\n >\n <PropsContextProvider props={propsContext}>\n <Wrap if={offCanvas}>\n <Suspense fallback={<OffCanvasSuspenseFallback />}>\n {children}\n </Suspense>\n </Wrap>\n </PropsContextProvider>\n </Overlay>\n );\n});\n\nexport default Modal;\n"],"names":["children","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,MAAM,KAAA,GAAQ,aAAA,CAAc,OAAA,EAAS,CAAC,KAAA,KAAU;AACrD,EAAA,MAAM;AAAA,IACJ,IAAA,GAAO,GAAA;AAAA,IACP,SAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAA;AAAA,IACA,SAAA;AAAA,IACA,oBAAA,GAAuB,OAAA;AAAA,IACvB,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,SAAA,GAAY,MAAA,CAAO,SAAA,GAAY,MAAA,CAAO,KAAA;AAAA,IACtC,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,IACrB,oBAAA,KAAyB,MAAA,IAAU,MAAA,CAAO,MAAM,CAAA;AAAA,IAChD;AAAA,GACF;AAEA,E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O,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,QAAK,EAAA,EAAI,SAAA,EACR,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,0BAAU,GAAA,CAAC,yBAAA,EAAA,EAA0B,CAAA,EAC5C,QAAA,EACH,GACF,CAAA,EACF;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Modal.mjs","sources":["../../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { type PropsWithChildren, type ReactNode, Suspense } from \"react\";\nimport styles from \"./Modal.module.scss\";\nimport clsx from \"clsx\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport { OverlayController } from \"@/lib/controller/overlay\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Overlay, type OverlayProps } from \"@/components/Overlay/Overlay\";\nimport { Action } from \"@/components/Action\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport ButtonView from \"@/views/ButtonView\";\nimport { OffCanvasSuspenseFallback } from \"@/components/Modal/components/OffCanvasSuspenseFallback\";\nimport Wrap from \"@/components/Wrap\";\nimport { ClearPropsContext } from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport locales from \"./locales/*.locale.json\";\n\ntype SupportedOverlayProps = Pick<\n OverlayProps,\n \"isOpen\" | \"isDefaultOpen\" | \"onOpen\" | \"onClose\" | \"onOpenChange\"\n>;\n\nexport interface ModalProps\n extends\n PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName,\n SupportedOverlayProps {\n /** The size of the modal. @default \"s\" */\n size?: \"s\" | \"m\" | \"l\";\n /** Whether the modal should be displayed as an off canvas. */\n offCanvas?: boolean;\n /**\n * Whether the off canvas should be displayed on the right or left side of the\n * screen. @default \"right\"\n */\n offCanvasOrientation?: \"left\" | \"right\";\n /** An overlay controller to control the modal state. */\n controller?: OverlayController;\n /**\n * Accepts \"actionConfirm\" to use the modal as a confirmation modal for an\n * action.\n */\n slot?: string;\n /** Whether the modal can be closed by clicking outside of it. */\n isDismissable?: boolean;\n /** Whether the close button should be visible */\n showCloseButton?: boolean;\n}\n\nexport const Modal = flowComponent(\"Modal\", (props) => {\n const {\n size = \"s\",\n offCanvas,\n controller,\n children,\n ref,\n className,\n offCanvasOrientation = \"right\",\n showCloseButton,\n ...overlayProps\n } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Modal\");\n\n const rootClassName = clsx(\n offCanvas ? styles.offCanvas : styles.modal,\n styles[`size-${size}`],\n offCanvasOrientation === \"left\" && styles[\"left\"],\n className,\n );\n\n const header = (children: ReactNode) => (\n <>\n {children}\n <Action closeModal={{ bypassConfirmation: true }}>\n <ButtonView\n variant=\"plain\"\n color=\"secondary\"\n aria-label={stringFormatter.format(\"close\")}\n className={clsx(\n styles.closeButton,\n showCloseButton === true\n ? styles.alwaysVisible\n : showCloseButton === false\n ? styles.alwaysHidden\n : undefined,\n )}\n >\n <IconClose />\n </ButtonView>\n </Action>\n </>\n );\n\n const nestedHeadingLevel = 3;\n\n const nestedHeadingProps: PropsContext = {\n Heading: { level: nestedHeadingLevel },\n Section: {\n Header: { Heading: { level: nestedHeadingLevel } },\n Heading: { level: nestedHeadingLevel },\n },\n Header: { Heading: { level: nestedHeadingLevel } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n ...nestedHeadingProps,\n className: styles.content,\n },\n ColumnLayout: {\n ...nestedHeadingProps,\n l: [2, 1],\n m: [1],\n className: styles.columnLayout,\n AccentBox: { className: styles.accentBox, backgroundColor: \"neutral\" },\n wrapWith: <ClearPropsContext />,\n },\n Heading: {\n className: styles.header,\n level: 2,\n slot: \"title\",\n children: dynamic((props) => header(props.children)),\n },\n ActionGroup: {\n className: styles.actionGroup,\n spacing: \"m\",\n Action: {\n closeModal: dynamic((props) => {\n if (props.closeModal === undefined) {\n return;\n }\n if (props.closeModal === true) {\n return { bypassConfirmation: true };\n }\n return {\n bypassConfirmation: true,\n ...props.closeModal,\n };\n }),\n closeOverlay: dynamic((props) => {\n if (props.closeOverlay === undefined) {\n return;\n }\n if (\n props.closeOverlay instanceof OverlayController ||\n typeof props.closeOverlay === \"string\"\n ) {\n return {\n bypassConfirmation: true,\n overlay: props.closeOverlay,\n };\n }\n return {\n bypassConfirmation: true,\n ...props.closeOverlay,\n };\n }),\n },\n },\n };\n\n return (\n <Overlay\n className={rootClassName}\n controller={controller}\n ref={ref}\n {...overlayProps}\n >\n <PropsContextProvider props={propsContext}>\n <Wrap if={offCanvas}>\n <Suspense fallback={<OffCanvasSuspenseFallback />}>\n {children}\n </Suspense>\n </Wrap>\n </PropsContextProvider>\n </Overlay>\n );\n});\n\nexport default Modal;\n"],"names":["children","props"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDO,MAAM,KAAA,GAAQ,aAAA,CAAc,OAAA,EAAS,CAAC,KAAA,KAAU;AACrD,EAAA,MAAM;AAAA,IACJ,IAAA,GAAO,GAAA;AAAA,IACP,SAAA;AAAA,IACA,UAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAA;AAAA,IACA,SAAA;AAAA,IACA,oBAAA,GAAuB,OAAA;AAAA,IACvB,eAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,eAAA,GAAkB,2BAAA,CAA4B,OAAA,EAAS,OAAO,CAAA;AAEpE,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,SAAA,GAAY,MAAA,CAAO,SAAA,GAAY,MAAA,CAAO,KAAA;AAAA,IACtC,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,IACrB,oBAAA,KAAyB,MAAA,IAAU,MAAA,CAAO,MAAM,CAAA;AAAA,IAChD;AAAA,GACF;AAEA,EAAA,M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AAA,WACX;AAAA,QACF,CAAC;AAAA;AACH;AACF,GACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,OAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAW,aAAA;AAAA,MACX,UAAA;AAAA,MACA,GAAA;AAAA,MACC,GAAG,YAAA;AAAA,MAEJ,8BAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,QAAK,EAAA,EAAI,SAAA,EACR,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,0BAAU,GAAA,CAAC,yBAAA,EAAA,EAA0B,CAAA,EAC5C,QAAA,EACH,GACF,CAAA,EACF;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
@@ -2,19 +2,25 @@
2
2
  /* */
3
3
  const modal = "flow--modal";
4
4
  const offCanvas = "flow--modal--off-canvas";
5
+ const actionGroup = "flow--modal--action-group";
6
+ const closeButton = "flow--modal--close-button";
7
+ const alwaysVisible = "flow--modal--always-visible";
8
+ const alwaysHidden = "flow--modal--always-hidden";
5
9
  const header = "flow--modal--header";
6
10
  const content = "flow--modal--content";
7
11
  const columnLayout = "flow--modal--column-layout";
8
- const actionGroup = "flow--modal--action-group";
9
12
  const accentBox = "flow--modal--accent-box";
10
13
  const left = "flow--modal--left";
11
14
  const styles = {
12
15
  modal: modal,
13
16
  offCanvas: offCanvas,
17
+ actionGroup: actionGroup,
18
+ closeButton: closeButton,
19
+ alwaysVisible: alwaysVisible,
20
+ alwaysHidden: alwaysHidden,
14
21
  header: header,
15
22
  content: content,
16
23
  columnLayout: columnLayout,
17
- actionGroup: actionGroup,
18
24
  accentBox: accentBox,
19
25
  "size-s": "flow--modal--size-s",
20
26
  "size-m": "flow--modal--size-m",
@@ -26,5 +32,5 @@ const styles = {
26
32
  "modal-slide-up": "flow--modal--modal-slide-up"
27
33
  };
28
34
 
29
- export { accentBox, actionGroup, columnLayout, content, styles as default, header, left, modal, offCanvas };
35
+ export { accentBox, actionGroup, alwaysHidden, alwaysVisible, closeButton, columnLayout, content, styles as default, header, left, modal, offCanvas };
30
36
  //# sourceMappingURL=Modal.module.scss.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"Modal.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -21,6 +21,8 @@ const Rating = flowComponent("Rating", (props) => {
21
21
  className,
22
22
  children,
23
23
  ref,
24
+ iconEmpty,
25
+ iconFilled,
24
26
  ...rest
25
27
  } = props;
26
28
  const {
@@ -56,7 +58,9 @@ const Rating = flowComponent("Rating", (props) => {
56
58
  {
57
59
  index,
58
60
  selectedValue,
59
- size
61
+ size,
62
+ iconEmpty,
63
+ iconFilled
60
64
  },
61
65
  index
62
66
  )) })
@@ -1 +1 @@
1
- {"version":3,"file":"Rating.mjs","sources":["../../../../../../../src/components/Rating/Rating.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport styles from \"./Rating.module.scss\";\nimport clsx from \"clsx\";\nimport * as Aria from \"react-aria-components\";\nimport { RatingSegment } from \"@/components/Rating/components/RatingSegment\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\n\nexport interface RatingProps\n extends\n FlowComponentProps,\n PropsWithChildren,\n Omit<Aria.RadioGroupProps, \"children\" | \"value\" | \"defaultValue\"> {\n /** The value sets the amount of filled stars. @default: 0 */\n value?: number;\n /** The defaultValue sets the amount of default filled stars. @default: 0 */\n defaultValue?: number;\n /** The size of the component. @default: \"m\" */\n size?: \"s\" | \"m\";\n}\n\n/** @flr-generate all */\nexport const Rating = flowComponent(\"Rating\", (props) => {\n const {\n value,\n defaultValue = 0,\n size = \"m\",\n className,\n children,\n ref,\n ...rest\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"Rating\");\n\n const rootClassName = clsx(\n styles.rating,\n styles[`size-${size}`],\n fieldProps.className,\n className,\n );\n\n const localRef = useObjectRef(ref);\n useMakeFocusable(localRef);\n\n const stringValue = value?.toString();\n\n return (\n <Aria.RadioGroup\n {...rest}\n className={rootClassName}\n defaultValue={defaultValue.toString()}\n value={stringValue}\n ref={localRef}\n >\n {(renderProps) => {\n const selectedValue = parseInt(renderProps.state.selectedValue ?? \"0\");\n\n return (\n <>\n <FieldErrorCaptureContext>\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n <div className={styles.ratingSegments}>\n {Array(5)\n .fill(\"\")\n .map((_, index) => (\n <RatingSegment\n key={index}\n index={index}\n selectedValue={selectedValue}\n size={size}\n />\n ))}\n </div>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </>\n );\n }}\n </Aria.RadioGroup>\n );\n});\n\nexport default Rating;\n"],"names":[],"mappings":";;;;;;;;;;;;;AA4BO,MAAM,MAAA,GAAS,aAAA,CAAc,QAAA,EAAU,CAAC,KAAA,KAAU;AACvD,EAAA,MAAM;AAAA,IACJ,KAAA;AAAA,IACA,YAAA,GAAe,CAAA;AAAA,IACf,IAAA,GAAO,GAAA;AAAA,IACP,SAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,iBAAA,CAAkB,KAAA,EAAO,QAAQ,CAAA;AAErC,EAAA,MAAM,aAAA,GAAgB,I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A;AAAA,MAEJ;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Rating.mjs","sources":["../../../../../../../src/components/Rating/Rating.tsx"],"sourcesContent":["import { type PropsWithChildren, type ReactElement } from \"react\";\nimport styles from \"./Rating.module.scss\";\nimport clsx from \"clsx\";\nimport * as Aria from \"react-aria-components\";\nimport { RatingSegment } from \"@/components/Rating/components/RatingSegment\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\n\nexport interface RatingProps\n extends\n FlowComponentProps,\n PropsWithChildren,\n Omit<Aria.RadioGroupProps, \"children\" | \"value\" | \"defaultValue\"> {\n /** The value sets the amount of filled stars. @default: 0 */\n value?: number;\n /** The defaultValue sets the amount of default filled stars. @default: 0 */\n defaultValue?: number;\n /** The size of the component. @default: \"m\" */\n size?: \"s\" | \"m\";\n /** An alternative icon for the empty state */\n iconEmpty?: ReactElement;\n /** An alternative icon for the filled state */\n iconFilled?: ReactElement;\n}\n\n/** @flr-generate all */\nexport const Rating = flowComponent(\"Rating\", (props) => {\n const {\n value,\n defaultValue = 0,\n size = \"m\",\n className,\n children,\n ref,\n iconEmpty,\n iconFilled,\n ...rest\n } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"Rating\");\n\n const rootClassName = clsx(\n styles.rating,\n styles[`size-${size}`],\n fieldProps.className,\n className,\n );\n\n const localRef = useObjectRef(ref);\n\n useMakeFocusable(localRef);\n\n const stringValue = value?.toString();\n\n return (\n <Aria.RadioGroup\n {...rest}\n className={rootClassName}\n defaultValue={defaultValue.toString()}\n value={stringValue}\n ref={localRef}\n >\n {(renderProps) => {\n const selectedValue = parseInt(renderProps.state.selectedValue ?? \"0\");\n\n return (\n <>\n <FieldErrorCaptureContext>\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n <div className={styles.ratingSegments}>\n {Array(5)\n .fill(\"\")\n .map((_, index) => (\n <RatingSegment\n key={index}\n index={index}\n selectedValue={selectedValue}\n size={size}\n iconEmpty={iconEmpty}\n iconFilled={iconFilled}\n />\n ))}\n </div>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </>\n );\n }}\n </Aria.RadioGroup>\n );\n});\n\nexport default Rating;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAgCO,MAAM,MAAA,GAAS,aAAA,CAAc,QAAA,EAAU,CAAC,KAAA,KAAU;AACvD,EAAA,MAAM;AAAA,IACJ,KAAA;AAAA,IACA,YAAA,GAAe,CAAA;AAAA,IACf,IAAA,GAAO,GAAA;AAAA,IACP,SAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,iBAAA,CAAkB,KAAA,EAAO,QAAQ,CAAA;AAErC,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,MAAA;AAAA,IACP,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,IACrB,UAAA,CAAW,SAAA;AAAA,IACX;AAAA,GACF;AAEA,EAAA,MAAM,QAAA,GAAW,aAAa,GAAG,CAAA;AAEjC,EAAA,gBAAA,CAAiB,QAAQ,CAAA;AAEzB,EAAA,MAAM,WAAA,GAAc,OAAO,QAAA,EAAS;AAEpC,EAAA,uBACE,GAAA;AAAA,IAAC,IAAA,CAAK,UAAA;AAAA,IAAL;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,SAAA,EAAW,aAAA;AAAA,MACX,YAAA,EAAc,aAAa,QAAA,EAAS;AAAA,MACpC,KAAA,EAAO,WAAA;AAAA,MACP,GAAA,EAAK,QAAA;AAAA,MAEJ,WAAC,WAAA,KAAgB;AAChB,QAAA,MAAM,aAAA,GAAgB,QAAA,CAAS,WAAA,CAAY,KAAA,CAAM,iBAAiB,GAAG,CAAA;AAErE,QAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,wBAAA,EAAA,EACC,QAAA,kBAAA,IAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,iBAAA,EAC1B,QAAA,EAAA;AAAA,YAAA,QAAA;AAAA,4BACD,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,gBACpB,QAAA,EAAA,KAAA,CAAM,CAAC,CAAA,CACL,IAAA,CAAK,EAAE,CAAA,CACP,GAAA,CAAI,CAAC,GAAG,KAAA,qBACP,GAAA;AAAA,cAAC,aAAA;AAAA,cAAA;AAAA,gBAEC,KAAA;AAAA,gBACA,aAAA;AAAA,gBACA,IAAA;AAAA,gBACA,SAAA;AAAA,gBACA;AAAA,eAAA;AAAA,cALK;AAAA,aAOR,CAAA,EACL;AAAA,WAAA,EACF,CAAA,EACF,CAAA;AAAA,8BACC,cAAA,EAAA,EAAe;AAAA,SAAA,EAClB,CAAA;AAAA,MAEJ;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
@@ -3,19 +3,19 @@
3
3
  const rating = "flow--rating";
4
4
  const ratingSegments = "flow--rating--rating-segments";
5
5
  const ratingSegment = "flow--rating--rating-segment";
6
- const star = "flow--rating--star";
7
- const starFilled = "flow--rating--star-filled";
6
+ const empty = "flow--rating--empty";
7
+ const filled = "flow--rating--filled";
8
8
  const current = "flow--rating--current";
9
9
  const styles = {
10
10
  rating: rating,
11
11
  ratingSegments: ratingSegments,
12
12
  ratingSegment: ratingSegment,
13
- star: star,
14
- starFilled: starFilled,
13
+ empty: empty,
14
+ filled: filled,
15
15
  current: current,
16
16
  "size-s": "flow--rating--size-s",
17
17
  "size-m": "flow--rating--size-m"
18
18
  };
19
19
 
20
- export { current, styles as default, rating, ratingSegment, ratingSegments, star, starFilled };
20
+ export { current, styles as default, empty, filled, rating, ratingSegment, ratingSegments };
21
21
  //# sourceMappingURL=Rating.module.scss.mjs.map
@@ -0,0 +1,27 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import 'react';
5
+ import styles from '../../Rating.module.scss.mjs';
6
+ import '@mittwald/flow-icons';
7
+ import '../../../Icon/components/IconSetProvider.mjs';
8
+ import '../../../Icon/Icon.mjs';
9
+ import '../../../../views/IconView.mjs';
10
+ import { IconStar } from '../../../Icon/components/icons/IconStar.mjs';
11
+ import '../../../../lib/propsContext/propsContext.mjs';
12
+ import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
13
+
14
+ const EmptySegment = (props) => {
15
+ const { size, children } = props;
16
+ const propsContext = {
17
+ Icon: {
18
+ size,
19
+ "aria-hidden": true,
20
+ className: styles.empty
21
+ }
22
+ };
23
+ return /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: children ?? /* @__PURE__ */ jsx(IconStar, { "aria-hidden": true, size, className: styles.empty }) });
24
+ };
25
+
26
+ export { EmptySegment };
27
+ //# sourceMappingURL=EmptySegment.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptySegment.mjs","sources":["../../../../../../../../../src/components/Rating/components/RatingSegment/EmptySegment.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren } from \"react\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport styles from \"../../Rating.module.scss\";\nimport { IconStar } from \"@/components/Icon/components/icons\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\ninterface Props extends PropsWithChildren {\n size: RatingProps[\"size\"];\n}\n\nexport const EmptySegment: FC<Props> = (props) => {\n const { size, children } = props;\n\n const propsContext: PropsContext = {\n Icon: {\n size,\n \"aria-hidden\": true,\n className: styles.empty,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n {children ?? (\n <IconStar aria-hidden size={size} className={styles.empty} />\n )}\n </PropsContextProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,YAAA,GAA0B,CAAC,KAAA,KAAU;AAChD,EAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAS,GAAI,KAAA;AAE3B,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,IAAA,EAAM;AAAA,MACJ,IAAA;AAAA,MACA,aAAA,EAAe,IAAA;AAAA,MACf,WAAW,MAAA,CAAO;AAAA;AACpB,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EAAA,QAAA,oBACC,GAAA,CAAC,QAAA,EAAA,EAAS,aAAA,EAAW,IAAA,EAAC,IAAA,EAAY,SAAA,EAAW,MAAA,CAAO,OAAO,CAAA,EAE/D,CAAA;AAEJ;;;;"}
@@ -0,0 +1,27 @@
1
+ "use client"
2
+ /* */
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import 'react';
5
+ import styles from '../../Rating.module.scss.mjs';
6
+ import '@mittwald/flow-icons';
7
+ import '../../../Icon/components/IconSetProvider.mjs';
8
+ import '../../../Icon/Icon.mjs';
9
+ import '../../../../views/IconView.mjs';
10
+ import { IconStarFilled } from '../../../Icon/components/icons/IconStarFilled.mjs';
11
+ import '../../../../lib/propsContext/propsContext.mjs';
12
+ import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
13
+
14
+ const FilledSegment = (props) => {
15
+ const { size, children } = props;
16
+ const propsContext = {
17
+ Icon: {
18
+ size,
19
+ "aria-hidden": true,
20
+ className: styles.filled
21
+ }
22
+ };
23
+ return /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: children ?? /* @__PURE__ */ jsx(IconStarFilled, { "aria-hidden": true, size, className: styles.filled }) });
24
+ };
25
+
26
+ export { FilledSegment };
27
+ //# sourceMappingURL=FilledSegment.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilledSegment.mjs","sources":["../../../../../../../../../src/components/Rating/components/RatingSegment/FilledSegment.tsx"],"sourcesContent":["import { type FC, type PropsWithChildren } from \"react\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport styles from \"../../Rating.module.scss\";\nimport { IconStarFilled } from \"@/components/Icon/components/icons\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\ninterface Props extends PropsWithChildren {\n size: RatingProps[\"size\"];\n}\n\nexport const FilledSegment: FC<Props> = (props) => {\n const { size, children } = props;\n\n const propsContext: PropsContext = {\n Icon: {\n size,\n \"aria-hidden\": true,\n className: styles.filled,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n {children ?? (\n <IconStarFilled aria-hidden size={size} className={styles.filled} />\n )}\n </PropsContextProvider>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAUO,MAAM,aAAA,GAA2B,CAAC,KAAA,KAAU;AACjD,EAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAS,GAAI,KAAA;AAE3B,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,IAAA,EAAM;AAAA,MACJ,IAAA;AAAA,MACA,aAAA,EAAe,IAAA;AAAA,MACf,WAAW,MAAA,CAAO;AAAA;AACpB,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EAAA,QAAA,oBACC,GAAA,CAAC,cAAA,EAAA,EAAe,aAAA,EAAW,IAAA,EAAC,IAAA,EAAY,SAAA,EAAW,MAAA,CAAO,QAAQ,CAAA,EAEtE,CAAA;AAEJ;;;;"}
@@ -7,11 +7,11 @@ import styles from '../../Rating.module.scss.mjs';
7
7
  import * as Aria from 'react-aria-components';
8
8
  import { useLocalizedStringFormatter } from '../../../TranslationProvider/useLocalizedStringFormatter.mjs';
9
9
  import locales from '../../../../../../../_virtual/_.locale.json@656bcfe2b7d48c4324cbdf14a4866b19.mjs';
10
- import { RatingStar } from './RatingStar.mjs';
11
- import { RatingStarFilled } from './RatingStarFilled.mjs';
10
+ import { FilledSegment } from './FilledSegment.mjs';
11
+ import { EmptySegment } from './EmptySegment.mjs';
12
12
 
13
13
  const RatingSegment = (props) => {
14
- const { index, selectedValue, size } = props;
14
+ const { index, selectedValue, size, iconEmpty, iconFilled } = props;
15
15
  const value = index + 1;
16
16
  const stringFormatter = useLocalizedStringFormatter(locales, "Rating");
17
17
  return /* @__PURE__ */ jsxs(
@@ -24,8 +24,8 @@ const RatingSegment = (props) => {
24
24
  value === selectedValue && styles.current
25
25
  ),
26
26
  children: [
27
- /* @__PURE__ */ jsx(RatingStarFilled, { size }),
28
- /* @__PURE__ */ jsx(RatingStar, { size })
27
+ /* @__PURE__ */ jsx(FilledSegment, { size, children: iconFilled }),
28
+ /* @__PURE__ */ jsx(EmptySegment, { size, children: iconEmpty })
29
29
  ]
30
30
  }
31
31
  );
@@ -1 +1 @@
1
- {"version":3,"file":"RatingSegment.mjs","sources":["../../../../../../../../../src/components/Rating/components/RatingSegment/RatingSegment.tsx"],"sourcesContent":["import React, { type FC } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"@/components/Rating/Rating.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../../locales/*.locale.json\";\nimport { RatingStar } from \"@/components/Rating/components/RatingSegment/RatingStar\";\nimport { RatingStarFilled } from \"@/components/Rating/components/RatingSegment/RatingStarFilled\";\n\ninterface Props {\n index: number;\n selectedValue: number;\n size: RatingProps[\"size\"];\n}\nexport const RatingSegment: FC<Props> = (props) => {\n const { index, selectedValue, size } = props;\n\n const value = index + 1;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Rating\");\n\n return (\n <Aria.Radio\n aria-label={stringFormatter.format(`segment.${value}`)}\n value={value.toString()}\n className={clsx(\n styles.ratingSegment,\n value === selectedValue && styles.current,\n )}\n >\n <RatingStarFilled size={size} />\n <RatingStar size={size} />\n </Aria.Radio>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAeO,MAAM,aAAA,GAA2B,CAAC,KAAA,KAAU;AACjD,EAAA,MAAM,EAAE,KAAA,EAAO,aAAA,EAAe,IAAA,EAAK,GAAI,KAAA;AAEvC,EAAA,MAAM,QAAQ,KAAA,GAAQ,CAAA;AAEtB,EAAA,MAAM,eAAA,GAAkB,2BAAA,CAA4B,OAAA,EAAS,QAAQ,CAAA;AAErE,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA,CAAK,KAAA;AAAA,IAAL;AAAA,MACC,YAAA,EAAY,eAAA,CAAgB,MAAA,CAAO,CAAA,QAAA,EAAW,KAAK,CAAA,CAAE,CAAA;AAAA,MACrD,KAAA,EAAO,MAAM,QAAA,EAAS;AAAA,MACtB,SAAA,EAAW,IAAA;AAAA,QACT,MAAA,CAAO,aAAA;AAAA,QACP,KAAA,KAAU,iBAAiB,MAAA,CAAO;AAAA,OACpC;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,oBAAiB,IAAA,EAAY,CAAA;AAAA,wBAC9B,GAAA,CAAC,cAAW,IAAA,EAAY;AAAA;AAAA;AAAA,GAC1B;AAEJ;;;;"}
1
+ {"version":3,"file":"RatingSegment.mjs","sources":["../../../../../../../../../src/components/Rating/components/RatingSegment/RatingSegment.tsx"],"sourcesContent":["import React, {\n type FC,\n type PropsWithChildren,\n type ReactElement,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"@/components/Rating/Rating.module.scss\";\nimport * as Aria from \"react-aria-components\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"../../locales/*.locale.json\";\nimport { FilledSegment } from \"@/components/Rating/components/RatingSegment/FilledSegment\";\nimport { EmptySegment } from \"@/components/Rating/components/RatingSegment/EmptySegment\";\n\ninterface Props extends PropsWithChildren {\n index: number;\n selectedValue: number;\n size: RatingProps[\"size\"];\n iconEmpty?: ReactElement;\n iconFilled?: ReactElement;\n}\nexport const RatingSegment: FC<Props> = (props) => {\n const { index, selectedValue, size, iconEmpty, iconFilled } = props;\n\n const value = index + 1;\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Rating\");\n\n return (\n <Aria.Radio\n aria-label={stringFormatter.format(`segment.${value}`)}\n value={value.toString()}\n className={clsx(\n styles.ratingSegment,\n value === selectedValue && styles.current,\n )}\n >\n <FilledSegment size={size}>{iconFilled}</FilledSegment>\n <EmptySegment size={size}>{iconEmpty}</EmptySegment>\n </Aria.Radio>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAqBO,MAAM,aAAA,GAA2B,CAAC,KAAA,KAAU;AACjD,EAAA,MAAM,EAAE,KAAA,EAAO,aAAA,EAAe,IAAA,EAAM,SAAA,EAAW,YAAW,GAAI,KAAA;AAE9D,EAAA,MAAM,QAAQ,KAAA,GAAQ,CAAA;AAEtB,EAAA,MAAM,eAAA,GAAkB,2BAAA,CAA4B,OAAA,EAAS,QAAQ,CAAA;AAErE,EAAA,uBACE,IAAA;AAAA,IAAC,IAAA,CAAK,KAAA;AAAA,IAAL;AAAA,MACC,YAAA,EAAY,eAAA,CAAgB,MAAA,CAAO,CAAA,QAAA,EAAW,KAAK,CAAA,CAAE,CAAA;AAAA,MACrD,KAAA,EAAO,MAAM,QAAA,EAAS;AAAA,MACtB,SAAA,EAAW,IAAA;AAAA,QACT,MAAA,CAAO,aAAA;AAAA,QACP,KAAA,KAAU,iBAAiB,MAAA,CAAO;AAAA,OACpC;AAAA,MAEA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,aAAA,EAAA,EAAc,MAAa,QAAA,EAAA,UAAA,EAAW,CAAA;AAAA,wBACvC,GAAA,CAAC,YAAA,EAAA,EAAa,IAAA,EAAa,QAAA,EAAA,SAAA,EAAU;AAAA;AAAA;AAAA,GACvC;AAEJ;;;;"}
@@ -23,6 +23,8 @@ export interface ModalProps extends PropsWithChildren, FlowComponentProps, Props
23
23
  slot?: string;
24
24
  /** Whether the modal can be closed by clicking outside of it. */
25
25
  isDismissable?: boolean;
26
+ /** Whether the close button should be visible */
27
+ showCloseButton?: boolean;
26
28
  }
27
29
  export declare const Modal: import('react').FunctionComponent<ModalProps & import('react').RefAttributes<HTMLDivElement>>;
28
30
  export default Modal;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAA4B,MAAM,OAAO,CAAC;AAQzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG1E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAM5D,KAAK,qBAAqB,GAAG,IAAI,CAC/B,YAAY,EACZ,QAAQ,GAAG,eAAe,GAAG,QAAQ,GAAG,SAAS,GAAG,cAAc,CACnE,CAAC;AAEF,MAAM,WAAW,UACf,SACE,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,qBAAqB;IACvB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,wDAAwD;IACxD,UAAU,CAAC,EAAE,iBAAiB,CA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@
1
- import { PropsWithChildren } from 'react';
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
2
  import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
3
3
  import * as Aria from "react-aria-components";
4
4
  export interface RatingProps extends FlowComponentProps, PropsWithChildren, Omit<Aria.RadioGroupProps, "children" | "value" | "defaultValue"> {
@@ -8,6 +8,10 @@ export interface RatingProps extends FlowComponentProps, PropsWithChildren, Omit
8
8
  defaultValue?: number;
9
9
  /** The size of the component. @default: "m" */
10
10
  size?: "s" | "m";
11
+ /** An alternative icon for the empty state */
12
+ iconEmpty?: ReactElement;
13
+ /** An alternative icon for the filled state */
14
+ iconFilled?: ReactElement;
11
15
  }
12
16
  /** @flr-generate all */
13
17
  export declare const Rating: import('react').FunctionComponent<RatingProps & import('react').RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Rating.d.ts","sourceRoot":"","sources":["../../../../src/components/Rating/Rating.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAM9C,MAAM,WAAW,WACf,SACE,kBAAkB,EAClB,iBAAiB,EACjB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC;IACnE,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CAClB;AAED,wBAAwB;AACxB,eAAO,MAAM,MAAM,gGAkEjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Rating.d.ts","sourceRoot":"","sources":["../../../../src/components/Rating/Rating.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGlE,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAM9C,MAAM,WAAW,WACf,SACE,kBAAkB,EAClB,iBAAiB,EACjB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,OAAO,GAAG,cAAc,CAAC;IACnE,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,+CAA+C;IAC/C,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;IACjB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,+CAA+C;IAC/C,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AAED,wBAAwB;AACxB,eAAO,MAAM,MAAM,gGAuEjB,CAAC;AAEH,eAAe,MAAM,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { RatingProps } from '../..';
3
+ interface Props extends PropsWithChildren {
4
+ size: RatingProps["size"];
5
+ }
6
+ export declare const EmptySegment: FC<Props>;
7
+ export {};
8
+ //# sourceMappingURL=EmptySegment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptySegment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/RatingSegment/EmptySegment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,UAAU,KAAM,SAAQ,iBAAiB;IACvC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,KAAK,CAkBlC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { RatingProps } from '../..';
3
+ interface Props extends PropsWithChildren {
4
+ size: RatingProps["size"];
5
+ }
6
+ export declare const FilledSegment: FC<Props>;
7
+ export {};
8
+ //# sourceMappingURL=FilledSegment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FilledSegment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/RatingSegment/FilledSegment.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKvD,UAAU,KAAM,SAAQ,iBAAiB;IACvC,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CAkBnC,CAAC"}
@@ -1,9 +1,11 @@
1
- import { FC } from 'react';
1
+ import { FC, PropsWithChildren, ReactElement } from 'react';
2
2
  import { RatingProps } from '../..';
3
- interface Props {
3
+ interface Props extends PropsWithChildren {
4
4
  index: number;
5
5
  selectedValue: number;
6
6
  size: RatingProps["size"];
7
+ iconEmpty?: ReactElement;
8
+ iconFilled?: ReactElement;
7
9
  }
8
10
  export declare const RatingSegment: FC<Props>;
9
11
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"RatingSegment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/RatingSegment/RatingSegment.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAMvD,UAAU,KAAK;IACb,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B;AACD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CAoBnC,CAAC"}
1
+ {"version":3,"file":"RatingSegment.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/RatingSegment/RatingSegment.tsx"],"names":[],"mappings":"AAAA,OAAc,EACZ,KAAK,EAAE,EACP,KAAK,iBAAiB,EACtB,KAAK,YAAY,EAClB,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAMvD,UAAU,KAAM,SAAQ,iBAAiB;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,UAAU,CAAC,EAAE,YAAY,CAAC;CAC3B;AACD,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,KAAK,CAoBnC,CAAC"}
@@ -4,10 +4,8 @@ declare const meta: Meta<typeof Rating>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Rating>;
6
6
  export declare const Default: Story;
7
- export declare const Small: Story;
8
- export declare const ReadOnly: Story;
9
- export declare const WithLabel: Story;
10
7
  export declare const WithFieldError: Story;
11
8
  export declare const WithControlledValue: Story;
12
9
  export declare const WithForm: Story;
10
+ export declare const WithCustomIcon: Story;
13
11
  //# sourceMappingURL=Default.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Rating/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAM7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAK7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,KAAK,EAAE,KAA+B,CAAC;AAEpD,eAAO,MAAM,QAAQ,EAAE,KAAsC,CAAC;AAE9D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAUjC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAkBtB,CAAC"}
1
+ {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Rating/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,MAAM,CAa7B,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,MAAM,CAAC,CAAC;AAErC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,KAUjC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAqBtB,CAAC;AACF,eAAO,MAAM,cAAc,EAAE,KAa5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.834",
3
+ "version": "0.2.0-alpha.836",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -60,9 +60,9 @@
60
60
  "@codemirror/lint": "^6.9.5",
61
61
  "@internationalized/string": "^3.2.7",
62
62
  "@lezer/highlight": "^1.2.3",
63
- "@mittwald/flow-icons": "0.2.0-alpha.834",
63
+ "@mittwald/flow-icons": "0.2.0-alpha.836",
64
64
  "@mittwald/password-tools-js": "3.0.0-alpha.30",
65
- "@mittwald/react-tunnel": "0.2.0-alpha.834",
65
+ "@mittwald/react-tunnel": "0.2.0-alpha.836",
66
66
  "@mittwald/react-use-promise": "^4.2.2",
67
67
  "@react-aria/form": "^3.1.3",
68
68
  "@react-aria/i18n": "^3.12.16",
@@ -71,7 +71,7 @@
71
71
  "@react-stately/form": "^3.2.2",
72
72
  "@react-types/shared": "^3.32.1",
73
73
  "@replit/codemirror-indentation-markers": "^6.5.3",
74
- "@tabler/icons-react": "^3.36.1",
74
+ "@tabler/icons-react": "^3.44.0",
75
75
  "@tanstack/react-table": "^8.21.3",
76
76
  "@types/invariant": "^2.2.37",
77
77
  "@types/luxon": "^3.7.1",
@@ -116,7 +116,7 @@
116
116
  "@lezer/generator": "^1.8.0",
117
117
  "@lezer/lr": "^1.4.8",
118
118
  "@mittwald/flow-core": "",
119
- "@mittwald/flow-design-tokens": "0.2.0-alpha.834",
119
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.836",
120
120
  "@mittwald/flow-icons-base": "",
121
121
  "@mittwald/react-use-promise": "^4.2.2",
122
122
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
@@ -127,7 +127,7 @@
127
127
  "@storybook/addon-links": "^10.2.3",
128
128
  "@storybook/react": "^10.2.3",
129
129
  "@storybook/react-vite": "^10.2.3",
130
- "@tabler/icons-react": "^3.36.1",
130
+ "@tabler/icons-react": "^3.44.0",
131
131
  "@types/node": "24.10.1",
132
132
  "@vitejs/plugin-react": "^5.1.3",
133
133
  "@vitest/browser": "^4.0.18",
@@ -169,7 +169,7 @@
169
169
  },
170
170
  "peerDependencies": {
171
171
  "@internationalized/date": "^3.10.0",
172
- "@mittwald/flow-icons-pro": "0.2.0-alpha.833",
172
+ "@mittwald/flow-icons-pro": "0.2.0-alpha.835",
173
173
  "@mittwald/react-use-promise": "^4.2.2",
174
174
  "next": "^16.2.3",
175
175
  "react": "^19.2.0",
@@ -190,5 +190,5 @@
190
190
  "optional": true
191
191
  }
192
192
  },
193
- "gitHead": "868cb869053bb9768aef4c87f1eb99bdac679152"
193
+ "gitHead": "38c561cbd652db76155136d7a2af505746068f49"
194
194
  }
@@ -1,18 +0,0 @@
1
- "use client"
2
- /* */
3
- import { jsx } from 'react/jsx-runtime';
4
- import 'react';
5
- import styles from '../../Rating.module.scss.mjs';
6
- import '@mittwald/flow-icons';
7
- import '../../../Icon/components/IconSetProvider.mjs';
8
- import '../../../Icon/Icon.mjs';
9
- import '../../../../views/IconView.mjs';
10
- import { IconStar } from '../../../Icon/components/icons/IconStar.mjs';
11
-
12
- const RatingStar = (props) => {
13
- const { size } = props;
14
- return /* @__PURE__ */ jsx(IconStar, { "aria-hidden": true, size, className: styles.star });
15
- };
16
-
17
- export { RatingStar };
18
- //# sourceMappingURL=RatingStar.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RatingStar.mjs","sources":["../../../../../../../../../src/components/Rating/components/RatingSegment/RatingStar.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport styles from \"../../Rating.module.scss\";\nimport { IconStar } from \"@/components/Icon/components/icons\";\n\ninterface Props {\n size: RatingProps[\"size\"];\n}\n\nexport const RatingStar: FC<Props> = (props) => {\n const { size } = props;\n return <IconStar aria-hidden size={size} className={styles.star} />;\n};\n"],"names":[],"mappings":";;;;;;;;;AASO,MAAM,UAAA,GAAwB,CAAC,KAAA,KAAU;AAC9C,EAAA,MAAM,EAAE,MAAK,GAAI,KAAA;AACjB,EAAA,2BAAQ,QAAA,EAAA,EAAS,aAAA,EAAW,MAAC,IAAA,EAAY,SAAA,EAAW,OAAO,IAAA,EAAM,CAAA;AACnE;;;;"}
@@ -1,18 +0,0 @@
1
- "use client"
2
- /* */
3
- import { jsx } from 'react/jsx-runtime';
4
- import 'react';
5
- import styles from '../../Rating.module.scss.mjs';
6
- import '@mittwald/flow-icons';
7
- import '../../../Icon/components/IconSetProvider.mjs';
8
- import '../../../Icon/Icon.mjs';
9
- import '../../../../views/IconView.mjs';
10
- import { IconStarFilled } from '../../../Icon/components/icons/IconStarFilled.mjs';
11
-
12
- const RatingStarFilled = (props) => {
13
- const { size } = props;
14
- return /* @__PURE__ */ jsx(IconStarFilled, { "aria-hidden": true, size, className: styles.starFilled });
15
- };
16
-
17
- export { RatingStarFilled };
18
- //# sourceMappingURL=RatingStarFilled.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RatingStarFilled.mjs","sources":["../../../../../../../../../src/components/Rating/components/RatingSegment/RatingStarFilled.tsx"],"sourcesContent":["import { type FC } from \"react\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport styles from \"../../Rating.module.scss\";\nimport { IconStarFilled } from \"@/components/Icon/components/icons\";\n\ninterface Props {\n size: RatingProps[\"size\"];\n}\n\nexport const RatingStarFilled: FC<Props> = (props) => {\n const { size } = props;\n\n return (\n <IconStarFilled aria-hidden size={size} className={styles.starFilled} />\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AASO,MAAM,gBAAA,GAA8B,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAE,MAAK,GAAI,KAAA;AAEjB,EAAA,2BACG,cAAA,EAAA,EAAe,aAAA,EAAW,MAAC,IAAA,EAAY,SAAA,EAAW,OAAO,UAAA,EAAY,CAAA;AAE1E;;;;"}
@@ -1,8 +0,0 @@
1
- import { FC } from 'react';
2
- import { RatingProps } from '../..';
3
- interface Props {
4
- size: RatingProps["size"];
5
- }
6
- export declare const RatingStar: FC<Props>;
7
- export {};
8
- //# sourceMappingURL=RatingStar.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RatingStar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/RatingSegment/RatingStar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,UAAU,KAAK;IACb,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,KAAK,CAGhC,CAAC"}
@@ -1,8 +0,0 @@
1
- import { FC } from 'react';
2
- import { RatingProps } from '../..';
3
- interface Props {
4
- size: RatingProps["size"];
5
- }
6
- export declare const RatingStarFilled: FC<Props>;
7
- export {};
8
- //# sourceMappingURL=RatingStarFilled.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RatingStarFilled.d.ts","sourceRoot":"","sources":["../../../../../../src/components/Rating/components/RatingSegment/RatingStarFilled.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAIvD,UAAU,KAAK;IACb,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CAC3B;AAED,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CAMtC,CAAC"}