@mittwald/flow-react-components 0.2.0-alpha.994 → 0.2.0-alpha.995

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.
@@ -1,7 +1,8 @@
1
1
  "use client"
2
2
  /* */
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
- import CodeMirror from '@uiw/react-codemirror';
4
+ import CodeMirror, { EditorView } from '@uiw/react-codemirror';
5
+ import { useId } from 'react';
5
6
  import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
6
7
  import { useControlledHostValueProps } from '../../lib/remote/useControlledHostValueProps.mjs';
7
8
  import { useFieldComponent } from '../../lib/hooks/useFieldComponent.mjs';
@@ -14,6 +15,7 @@ import { useObjectRef } from 'react-aria';
14
15
  import { defaultLightTheme } from './themes/defaultEditorTheme.mjs';
15
16
  import { useCodeEditorExtensions } from './hooks/useCodeEditorExtensions.mjs';
16
17
  import { CopyButton } from '../CopyButton/CopyButton.mjs';
18
+ import { UiComponentTunnelExit } from '../UiComponentTunnel/UiComponentTunnelExit.mjs';
17
19
 
18
20
  const CodeEditor = flowComponent("CodeEditor", (props) => {
19
21
  const {
@@ -35,6 +37,8 @@ const CodeEditor = flowComponent("CodeEditor", (props) => {
35
37
  copyable = true,
36
38
  height,
37
39
  minHeight,
40
+ "aria-label": ariaLabel,
41
+ "aria-labelledby": ariaLabelledBy,
38
42
  ...rest
39
43
  } = useControlledHostValueProps(props);
40
44
  const {
@@ -48,15 +52,40 @@ const CodeEditor = flowComponent("CodeEditor", (props) => {
48
52
  styles.codeEditor,
49
53
  className
50
54
  );
55
+ const labelId = useId();
56
+ const descriptionId = useId();
57
+ const propsContext = {
58
+ ...fieldPropsContext,
59
+ Label: {
60
+ ...fieldPropsContext.Label,
61
+ id: labelId,
62
+ tunnel: { id: "label", component: "CodeEditor" }
63
+ },
64
+ FieldDescription: {
65
+ ...fieldPropsContext.FieldDescription,
66
+ id: descriptionId,
67
+ tunnel: { id: "fieldDescription", component: "CodeEditor" }
68
+ }
69
+ };
51
70
  const enabledExtensions = useCodeEditorExtensions(language, extensions, {
52
71
  showLineNumbers,
53
72
  showCodeIndentationMakers,
54
73
  showCodeFolding,
55
74
  showLinterMarkers
56
75
  });
76
+ const labelledBy = [ariaLabelledBy, labelId].filter(Boolean).join(" ");
77
+ const describedBy = [descriptionId, fieldProps["aria-describedby"]].filter(Boolean).join(" ") || void 0;
78
+ const contentAttributes = EditorView.contentAttributes.of({
79
+ "aria-labelledby": labelledBy,
80
+ ...ariaLabel ? { "aria-label": ariaLabel } : {},
81
+ ...describedBy ? { "aria-describedby": describedBy } : {},
82
+ ...isRequired ? { "aria-required": "true" } : {},
83
+ ...isInvalid ? { "aria-invalid": "true" } : {}
84
+ });
57
85
  const localRef = useObjectRef(ref);
58
86
  useMakeFocusable(localRef);
59
- return /* @__PURE__ */ jsx("div", { className: rootClassName, children: /* @__PURE__ */ jsxs(PropsContextProvider, { props: fieldPropsContext, children: [
87
+ return /* @__PURE__ */ jsx("div", { className: rootClassName, children: /* @__PURE__ */ jsxs(PropsContextProvider, { props: propsContext, children: [
88
+ /* @__PURE__ */ jsx(UiComponentTunnelExit, { id: "label", component: "CodeEditor" }),
60
89
  /* @__PURE__ */ jsx(FieldErrorCaptureContext, { children: /* @__PURE__ */ jsxs(
61
90
  CodeMirror,
62
91
  {
@@ -71,8 +100,7 @@ const CodeEditor = flowComponent("CodeEditor", (props) => {
71
100
  highlightSelectionMatches: false
72
101
  },
73
102
  theme: defaultLightTheme,
74
- "aria-required": isRequired,
75
- "aria-invalid": isInvalid,
103
+ "data-invalid": isInvalid || void 0,
76
104
  readOnly: isReadOnly,
77
105
  className: clsx(styles.codeMirror, isReadOnly && styles.readonly),
78
106
  ref: (codeMirrorRef) => {
@@ -80,7 +108,7 @@ const CodeEditor = flowComponent("CodeEditor", (props) => {
80
108
  localRef.current = codeMirrorRef.editor;
81
109
  }
82
110
  },
83
- extensions: enabledExtensions,
111
+ extensions: [...enabledExtensions, contentAttributes],
84
112
  height: height ?? minHeight,
85
113
  children: [
86
114
  copyable && /* @__PURE__ */ jsx(
@@ -96,6 +124,7 @@ const CodeEditor = flowComponent("CodeEditor", (props) => {
96
124
  ]
97
125
  }
98
126
  ) }),
127
+ /* @__PURE__ */ jsx(UiComponentTunnelExit, { id: "fieldDescription", component: "CodeEditor" }),
99
128
  /* @__PURE__ */ jsx(FieldErrorView, {})
100
129
  ] }) });
101
130
  });
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.mjs","sources":["../../../../../../../src/components/CodeEditor/CodeEditor.tsx"],"sourcesContent":["import type { ReactCodeMirrorProps } from \"@uiw/react-codemirror\";\nimport CodeMirror from \"@uiw/react-codemirror\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport styles from \"./CodeEditor.module.scss\";\nimport { type CodeEditorLanguage } from \"@/components/CodeEditor/languages\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\nimport { useObjectRef } from \"react-aria\";\nimport { defaultLightTheme } from \"@/components/CodeEditor/themes/defaultEditorTheme\";\nimport {\n type CodeEditorSetup,\n useCodeEditorExtensions,\n} from \"@/components/CodeEditor/hooks/useCodeEditorExtensions\";\nimport { CopyButton } from \"@/components/CopyButton\";\n\nexport interface CodeEditorProps\n extends\n Omit<ReactCodeMirrorProps, \"theme\" | \"lang\" | \"basicSetup\" | \"readOnly\">,\n CodeEditorSetup,\n FlowComponentProps {\n defaultValue?: string;\n isReadOnly?: boolean;\n isInvalid?: boolean;\n className?: string;\n language?: CodeEditorLanguage;\n copyable?: boolean;\n isRequired?: boolean;\n validationBehavior?: unknown;\n}\n\n/**\n * @flr-generate all\n * @flowStatus new\n */\nexport const CodeEditor = flowComponent(\"CodeEditor\", (props) => {\n const {\n ref,\n children,\n className,\n language,\n extensions,\n isReadOnly,\n isInvalid,\n isRequired,\n validationBehavior: _ignoredValidationBehavior,\n value,\n showLineNumbers = true,\n showCodeFolding = true,\n showCodeIndentationMakers = true,\n showLinterMarkers = true,\n showActiveLineMarker = true,\n copyable = true,\n height,\n minHeight,\n ...rest\n } = useControlledHostValueProps(props);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"CodeEditor\");\n\n const rootClassName = clsx(\n fieldProps.className,\n styles.codeEditor,\n className,\n );\n\n const enabledExtensions = useCodeEditorExtensions(language, extensions, {\n showLineNumbers: showLineNumbers,\n showCodeIndentationMakers: showCodeIndentationMakers,\n showCodeFolding: showCodeFolding,\n showLinterMarkers: showLinterMarkers,\n });\n\n const localRef = useObjectRef(ref);\n\n useMakeFocusable(localRef);\n\n return (\n <div className={rootClassName}>\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>\n <CodeMirror\n {...rest}\n value={value}\n basicSetup={{\n highlightActiveLine: showActiveLineMarker,\n highlightActiveLineGutter: showActiveLineMarker,\n autocompletion: false,\n lineNumbers: false,\n foldGutter: false,\n highlightSelectionMatches: false,\n }}\n theme={defaultLightTheme}\n aria-required={isRequired}\n aria-invalid={isInvalid}\n readOnly={isReadOnly}\n className={clsx(styles.codeMirror, isReadOnly && styles.readonly)}\n ref={(codeMirrorRef) => {\n if (codeMirrorRef?.editor) {\n localRef.current = codeMirrorRef.editor;\n }\n }}\n extensions={enabledExtensions}\n height={height ?? minHeight}\n >\n {copyable && (\n <CopyButton\n className={styles.copyButton}\n size=\"s\"\n variant=\"soft\"\n text={value}\n />\n )}\n {children}\n </CodeMirror>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </div>\n );\n});\n\nexport default CodeEditor;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAwCO,MAAM,UA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MAAC,UAAA;AAAA,MAAA;AAAA,QACE,GAAG,IAAA;AAAA,QACJ,KAAA;AAAA,QACA,UAAA,EAAY;AAAA,UACV,mBAAA,EAAqB,oBAAA;AAAA,UACrB,yBAAA,EAA2B,oBAAA;AAAA,UAC3B,cAAA,EAAgB,KAAA;AAAA,UAChB,WAAA,EAAa,KAAA;AAAA,UACb,UAAA,EAAY,KAAA;AAAA,UACZ,yBAAA,EAA2B;AAAA,SAC7B;AAAA,QACA,KAAA,EAAO,iBAAA;AAAA,QACP,eAAA,EAAe,UAAA;AAAA,QACf,cAAA,EAAc,SAAA;AAAA,QACd,QAAA,EAAU,UAAA;AAAA,QACV,WAAW,IAAA,CAAK,MAAA,CAAO,UAAA,EAAY,UAAA,IAAc,OAAO,QAAQ,CAAA;AAAA,QAChE,GAAA,EAAK,CAAC,aAAA,KAAkB;AACtB,UAAA,IAAI,eAAe,MAAA,EAAQ;AACzB,YAAA,QAAA,CAAS,UAAU,aAAA,CAAc,MAAA;AAAA,UACnC;AAAA,QACF,CAAA;AAAA,QACA,UAAA,EAAY,iBAAA;AAAA,QACZ,QAAQ,MAAA,IAAU,SAAA;AAAA,QAEjB,QAAA,EAAA;AAAA,UAAA,QAAA,oBACC,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,WAAW,MAAA,CAAO,UAAA;AAAA,cAClB,IAAA,EAAK,GAAA;AAAA,cACL,OAAA,EAAQ,MAAA;AAAA,cACR,IAAA,EAAM;AAAA;AAAA,WACR;AAAA,UAED;AAAA;AAAA;AAAA,KACH,EACF,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe;AAAA,GAAA,EAClB,CAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"CodeEditor.mjs","sources":["../../../../../../../src/components/CodeEditor/CodeEditor.tsx"],"sourcesContent":["import type { ReactCodeMirrorProps } from \"@uiw/react-codemirror\";\nimport CodeMirror, { EditorView } from \"@uiw/react-codemirror\";\nimport { useId } from \"react\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport styles from \"./CodeEditor.module.scss\";\nimport { type CodeEditorLanguage } from \"@/components/CodeEditor/languages\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\nimport { useObjectRef } from \"react-aria\";\nimport { defaultLightTheme } from \"@/components/CodeEditor/themes/defaultEditorTheme\";\nimport {\n type CodeEditorSetup,\n useCodeEditorExtensions,\n} from \"@/components/CodeEditor/hooks/useCodeEditorExtensions\";\nimport { CopyButton } from \"@/components/CopyButton\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface CodeEditorProps\n extends\n Omit<ReactCodeMirrorProps, \"theme\" | \"lang\" | \"basicSetup\" | \"readOnly\">,\n CodeEditorSetup,\n FlowComponentProps {\n defaultValue?: string;\n isReadOnly?: boolean;\n isInvalid?: boolean;\n className?: string;\n language?: CodeEditorLanguage;\n copyable?: boolean;\n isRequired?: boolean;\n validationBehavior?: unknown;\n}\n\n/**\n * @flr-generate all\n * @flowStatus new\n */\nexport const CodeEditor = flowComponent(\"CodeEditor\", (props) => {\n const {\n ref,\n children,\n className,\n language,\n extensions,\n isReadOnly,\n isInvalid,\n isRequired,\n validationBehavior: _ignoredValidationBehavior,\n value,\n showLineNumbers = true,\n showCodeFolding = true,\n showCodeIndentationMakers = true,\n showLinterMarkers = true,\n showActiveLineMarker = true,\n copyable = true,\n height,\n minHeight,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n ...rest\n } = useControlledHostValueProps(props);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldProps,\n fieldPropsContext,\n } = useFieldComponent(props, \"CodeEditor\");\n\n const rootClassName = clsx(\n fieldProps.className,\n styles.codeEditor,\n className,\n );\n\n const labelId = useId();\n const descriptionId = useId();\n\n /**\n * The label and the field description are declared as children of the code\n * editor, but must be rendered outside of the editor itself. They are\n * tunneled out of the editor – just like the field error. Their ids are the\n * ones the editor references.\n */\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Label: {\n ...fieldPropsContext.Label,\n id: labelId,\n tunnel: { id: \"label\", component: \"CodeEditor\" },\n },\n FieldDescription: {\n ...fieldPropsContext.FieldDescription,\n id: descriptionId,\n tunnel: { id: \"fieldDescription\", component: \"CodeEditor\" },\n },\n };\n\n const enabledExtensions = useCodeEditorExtensions(language, extensions, {\n showLineNumbers: showLineNumbers,\n showCodeIndentationMakers: showCodeIndentationMakers,\n showCodeFolding: showCodeFolding,\n showLinterMarkers: showLinterMarkers,\n });\n\n /**\n * The editable element of CodeMirror is the `.cm-content` element – not the\n * root element the props are applied to. Its ARIA attributes are set through\n * the content attributes facet.\n *\n * The label reference only resolves when a label is given. Without one, an\n * `aria-label` names the editor instead – the name computation skips\n * references that point at nothing.\n */\n const labelledBy = [ariaLabelledBy, labelId].filter(Boolean).join(\" \");\n\n const describedBy =\n [descriptionId, fieldProps[\"aria-describedby\"]].filter(Boolean).join(\" \") ||\n undefined;\n\n const contentAttributes = EditorView.contentAttributes.of({\n \"aria-labelledby\": labelledBy,\n ...(ariaLabel ? { \"aria-label\": ariaLabel } : {}),\n ...(describedBy ? { \"aria-describedby\": describedBy } : {}),\n ...(isRequired ? { \"aria-required\": \"true\" } : {}),\n ...(isInvalid ? { \"aria-invalid\": \"true\" } : {}),\n });\n\n const localRef = useObjectRef(ref);\n\n useMakeFocusable(localRef);\n\n return (\n <div className={rootClassName}>\n <PropsContextProvider props={propsContext}>\n <UiComponentTunnelExit id=\"label\" component=\"CodeEditor\" />\n <FieldErrorCaptureContext>\n <CodeMirror\n {...rest}\n value={value}\n basicSetup={{\n highlightActiveLine: showActiveLineMarker,\n highlightActiveLineGutter: showActiveLineMarker,\n autocompletion: false,\n lineNumbers: false,\n foldGutter: false,\n highlightSelectionMatches: false,\n }}\n theme={defaultLightTheme}\n data-invalid={isInvalid || undefined}\n readOnly={isReadOnly}\n className={clsx(styles.codeMirror, isReadOnly && styles.readonly)}\n ref={(codeMirrorRef) => {\n if (codeMirrorRef?.editor) {\n localRef.current = codeMirrorRef.editor;\n }\n }}\n extensions={[...enabledExtensions, contentAttributes]}\n height={height ?? minHeight}\n >\n {copyable && (\n <CopyButton\n className={styles.copyButton}\n size=\"s\"\n variant=\"soft\"\n text={value}\n />\n )}\n {children}\n </CodeMirror>\n </FieldErrorCaptureContext>\n <UiComponentTunnelExit id=\"fieldDescription\" component=\"CodeEditor\" />\n <FieldErrorView />\n </PropsContextProvider>\n </div>\n );\n});\n\nexport default CodeEditor;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AA0CO,MAAM,UAAA,GAAa,aAAA,CAAc,YAAA,EAAc,CAAC,KAAA,KAAU;AAC/D,EAAA,MAAM;AAAA,IACJ,GAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,UAAA;AAAA,IACA,kBAAA,EAAoB,0BAAA;AAAA,IACpB,KAAA;AAAA,IACA,eAAA,GAAkB,IAAA;AAAA,IAClB,eAAA,GAAkB,IAAA;AAAA,IAClB,yBAAA,GAA4B,IAAA;AAAA,IAC5B,iBAAA,GAAoB,IAAA;AAAA,IACpB,oBAAA,GAAuB,IAAA;AAAA,IACvB,QAAA,GAAW,IAAA;AAAA,IACX,MAAA;AAAA,IACA,SAAA;AAAA,IACA,YAAA,EAAc,SAAA;AAAA,IACd,iBAAA,EAAmB,cAAA;AAAA,IACnB,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA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,UACnC;AAAA,QACF,CAAA;AAAA,QACA,UAAA,EAAY,CAAC,GAAG,iBAAA,EAAmB,iBAAiB,CAAA;AAAA,QACpD,QAAQ,MAAA,IAAU,SAAA;AAAA,QAEjB,QAAA,EAAA;AAAA,UAAA,QAAA,oBACC,GAAA;AAAA,YAAC,UAAA;AAAA,YAAA;AAAA,cACC,WAAW,MAAA,CAAO,UAAA;AAAA,cAClB,IAAA,EAAK,GAAA;AAAA,cACL,OAAA,EAAQ,MAAA;AAAA,cACR,IAAA,EAAM;AAAA;AAAA,WACR;AAAA,UAED;AAAA;AAAA;AAAA,KACH,EACF,CAAA;AAAA,oBACA,GAAA,CAAC,qBAAA,EAAA,EAAsB,EAAA,EAAG,kBAAA,EAAmB,WAAU,YAAA,EAAa,CAAA;AAAA,wBACnE,cAAA,EAAA,EAAe;AAAA,GAAA,EAClB,CAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CodeEditor.browser.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CodeEditor.browser.test.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeEditor/CodeEditor.browser.test.tsx"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"CodeEditor.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeEditor/CodeEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAElE,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAM9C,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AAI5E,OAAO,EACL,KAAK,eAAe,EAErB,MAAM,uDAAuD,CAAC;AAG/D,MAAM,WAAW,eACf,SACE,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,MAAM,GAAG,YAAY,GAAG,UAAU,CAAC,EACxE,eAAe,EACf,kBAAk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4 +4,7 @@ declare const meta: Meta<typeof CodeEditor>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof CodeEditor>;
6
6
  export declare const Default: Story;
7
+ export declare const WithFieldDescription: Story;
8
+ export declare const WithFieldError: Story;
9
+ export declare const WithoutGutters: Story;
7
10
  //# sourceMappingURL=Default.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/CodeEditor/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAkCjC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC"}
1
+ {"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/CodeEditor/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,UAAU,CAoCjC,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,UAAU,CAAC,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,oBAAoB,EAAE,KAOlC,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAO5B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,KAM5B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.994",
3
+ "version": "0.2.0-alpha.995",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://flow.mittwald.de",
@@ -72,9 +72,9 @@
72
72
  "@internationalized/string-compiler": "^3.4.1",
73
73
  "@lezer/common": "^1.5.2",
74
74
  "@lezer/highlight": "^1.2.3",
75
- "@mittwald/flow-icons": "0.2.0-alpha.994",
75
+ "@mittwald/flow-icons": "0.2.0-alpha.995",
76
76
  "@mittwald/password-tools-js": "3.0.0-alpha.31",
77
- "@mittwald/react-tunnel": "0.2.0-alpha.994",
77
+ "@mittwald/react-tunnel": "0.2.0-alpha.995",
78
78
  "@mittwald/react-use-promise": "^4.2.2",
79
79
  "@react-aria/form": "^3.2.1",
80
80
  "@react-aria/i18n": "^3.13.1",
@@ -129,7 +129,7 @@
129
129
  "@lezer/generator": "^1.8.0",
130
130
  "@lezer/lr": "^1.4.10",
131
131
  "@mittwald/flow-core": "",
132
- "@mittwald/flow-design-tokens": "0.2.0-alpha.994",
132
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.995",
133
133
  "@mittwald/flow-icons-base": "",
134
134
  "@mittwald/react-use-promise": "^4.2.2",
135
135
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
@@ -184,7 +184,7 @@
184
184
  },
185
185
  "peerDependencies": {
186
186
  "@internationalized/date": "^3.12.2",
187
- "@mittwald/flow-icons-pro": "0.2.0-alpha.994",
187
+ "@mittwald/flow-icons-pro": "0.2.0-alpha.995",
188
188
  "@mittwald/react-use-promise": "^4.2.2",
189
189
  "next": "^16.2.3",
190
190
  "react": "^19.2.0",
@@ -205,5 +205,5 @@
205
205
  "optional": true
206
206
  }
207
207
  },
208
- "gitHead": "034ee16074757c02799b0aa7a1cef20001a5ce48"
208
+ "gitHead": "3ae43320fd8370cb80589a345aa9a130b0bb6c3b"
209
209
  }