@mittwald/flow-react-components 0.2.0-alpha.983 → 0.2.0-alpha.985

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.
@@ -6,13 +6,24 @@ import styles from './InlineCode.module.scss.mjs';
6
6
  import { isAlphaColor } from '../../lib/types/props.mjs';
7
7
 
8
8
  const InlineCode = (props) => {
9
- const { children, className, color = "default", ...rest } = props;
9
+ const {
10
+ children,
11
+ className,
12
+ color = "default",
13
+ style: styleFromProps,
14
+ whiteSpace,
15
+ ...rest
16
+ } = props;
10
17
  const rootClassName = clsx(
11
18
  styles.inlineCode,
12
19
  isAlphaColor(color) && styles[color],
13
20
  className
14
21
  );
15
- return /* @__PURE__ */ jsx("code", { ...rest, className: rootClassName, children });
22
+ const style = {
23
+ whiteSpace,
24
+ ...styleFromProps
25
+ };
26
+ return /* @__PURE__ */ jsx("code", { ...rest, style, className: rootClassName, children });
16
27
  };
17
28
 
18
29
  export { InlineCode };
@@ -1 +1 @@
1
- {"version":3,"file":"InlineCode.mjs","sources":["../../../../../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":["import type { ComponentProps, FC, PropsWithChildren } from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./InlineCode.module.scss\";\nimport { type AlphaColor, isAlphaColor } from \"@/lib/types/props\";\n\nexport interface InlineCodeProps extends PropsWithChildren<\n ComponentProps<\"code\">\n> {\n /** The color schema of the inline code component. @default \"default\" */\n color?: \"default\" | AlphaColor;\n}\n\n/** @flr-generate all */\nexport const InlineCode: FC<InlineCodeProps> = (props) => {\n const { children, className, color = \"default\", ...rest } = props;\n\n const rootClassName = clsx(\n styles.inlineCode,\n isAlphaColor(color) && styles[color],\n className,\n );\n\n return (\n <code {...rest} className={rootClassName}>\n {children}\n </code>\n );\n};\n\nexport default InlineCode;\n"],"names":[],"mappings":";;;;;AAaO,MAAM,UAAA,GAAkC,CAAC,KAAA,KAAU;AACxD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,QAAQ,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AAE5D,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,UAAA;AAAA,IACP,YAAA,CAAa,KAAK,CAAA,IAAK,MAAA,CAAO,KAAK,CAAA;AAAA,IACnC;AAAA,GACF;AAEA,EAAA,2BACG,MAAA,EAAA,EAAM,GAAG,IAAA,EAAM,SAAA,EAAW,eACxB,QAAA,EACH,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"InlineCode.mjs","sources":["../../../../../../../src/components/InlineCode/InlineCode.tsx"],"sourcesContent":["import type {\n ComponentProps,\n CSSProperties,\n FC,\n PropsWithChildren,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./InlineCode.module.scss\";\nimport { type AlphaColor, isAlphaColor } from \"@/lib/types/props\";\n\nexport interface InlineCodeProps extends PropsWithChildren<\n ComponentProps<\"code\">\n> {\n /** The color schema of the inline code component. @default \"default\" */\n color?: \"default\" | AlphaColor;\n /** The white-space property of the inline code component. @default undefined */\n whiteSpace?: CSSProperties[\"whiteSpace\"];\n}\n\n/** @flr-generate all */\nexport const InlineCode: FC<InlineCodeProps> = (props) => {\n const {\n children,\n className,\n color = \"default\",\n style: styleFromProps,\n whiteSpace,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.inlineCode,\n isAlphaColor(color) && styles[color],\n className,\n );\n\n const style = {\n whiteSpace,\n ...styleFromProps,\n };\n\n return (\n <code {...rest} style={style} className={rootClassName}>\n {children}\n </code>\n );\n};\n\nexport default InlineCode;\n"],"names":[],"mappings":";;;;;AAoBO,MAAM,UAAA,GAAkC,CAAC,KAAA,KAAU;AACxD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA,GAAQ,SAAA;AAAA,IACR,KAAA,EAAO,cAAA;AAAA,IACP,UAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,UAAA;AAAA,IACP,YAAA,CAAa,KAAK,CAAA,IAAK,MAAA,CAAO,KAAK,CAAA;AAAA,IACnC;AAAA,GACF;AAEA,EAAA,MAAM,KAAA,GAAQ;AAAA,IACZ,UAAA;AAAA,IACA,GAAG;AAAA,GACL;AAEA,EAAA,2BACG,MAAA,EAAA,EAAM,GAAG,MAAM,KAAA,EAAc,SAAA,EAAW,eACtC,QAAA,EACH,CAAA;AAEJ;;;;"}
@@ -1,8 +1,10 @@
1
- import { ComponentProps, FC, PropsWithChildren } from 'react';
1
+ import { ComponentProps, CSSProperties, FC, PropsWithChildren } from 'react';
2
2
  import { AlphaColor } from '../../lib/types/props';
3
3
  export interface InlineCodeProps extends PropsWithChildren<ComponentProps<"code">> {
4
4
  /** The color schema of the inline code component. @default "default" */
5
5
  color?: "default" | AlphaColor;
6
+ /** The white-space property of the inline code component. @default undefined */
7
+ whiteSpace?: CSSProperties["whiteSpace"];
6
8
  }
7
9
  /** @flr-generate all */
8
10
  export declare const InlineCode: FC<InlineCodeProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"InlineCode.d.ts","sourceRoot":"","sources":["../../../../src/components/InlineCode/InlineCode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAElE,MAAM,WAAW,eAAgB,SAAQ,iBAAiB,CACxD,cAAc,CAAC,MAAM,CAAC,CACvB;IACC,wEAAwE;IACxE,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;CAChC;AAED,wBAAwB;AACxB,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CAc1C,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"InlineCode.d.ts","sourceRoot":"","sources":["../../../../src/components/InlineCode/InlineCode.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,EAAE,EACF,iBAAiB,EAClB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAE,KAAK,UAAU,EAAgB,MAAM,mBAAmB,CAAC;AAElE,MAAM,WAAW,eAAgB,SAAQ,iBAAiB,CACxD,cAAc,CAAC,MAAM,CAAC,CACvB;IACC,wEAAwE;IACxE,KAAK,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC/B,gFAAgF;IAChF,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;CAC1C;AAED,wBAAwB;AACxB,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA0B1C,CAAC;AAEF,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.983",
3
+ "version": "0.2.0-alpha.985",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://flow.mittwald.de",
@@ -68,9 +68,9 @@
68
68
  "@internationalized/string-compiler": "^3.4.1",
69
69
  "@lezer/common": "^1.5.2",
70
70
  "@lezer/highlight": "^1.2.3",
71
- "@mittwald/flow-icons": "0.2.0-alpha.983",
71
+ "@mittwald/flow-icons": "0.2.0-alpha.985",
72
72
  "@mittwald/password-tools-js": "3.0.0-alpha.31",
73
- "@mittwald/react-tunnel": "0.2.0-alpha.983",
73
+ "@mittwald/react-tunnel": "0.2.0-alpha.985",
74
74
  "@mittwald/react-use-promise": "^4.2.2",
75
75
  "@react-aria/form": "^3.2.1",
76
76
  "@react-aria/i18n": "^3.13.1",
@@ -125,7 +125,7 @@
125
125
  "@lezer/generator": "^1.8.0",
126
126
  "@lezer/lr": "^1.4.10",
127
127
  "@mittwald/flow-core": "",
128
- "@mittwald/flow-design-tokens": "0.2.0-alpha.983",
128
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.985",
129
129
  "@mittwald/flow-icons-base": "",
130
130
  "@mittwald/react-use-promise": "^4.2.2",
131
131
  "@mittwald/remote-dom-react": "1.2.2-mittwald.10",
@@ -180,7 +180,7 @@
180
180
  },
181
181
  "peerDependencies": {
182
182
  "@internationalized/date": "^3.12.2",
183
- "@mittwald/flow-icons-pro": "0.2.0-alpha.983",
183
+ "@mittwald/flow-icons-pro": "0.2.0-alpha.985",
184
184
  "@mittwald/react-use-promise": "^4.2.2",
185
185
  "next": "^16.2.3",
186
186
  "react": "^19.2.0",
@@ -201,5 +201,5 @@
201
201
  "optional": true
202
202
  }
203
203
  },
204
- "gitHead": "0bb7eac3a69560c1525cbebf429997f0c818defe"
204
+ "gitHead": "710b0f89aba7447784149ff03db50b09090e7770"
205
205
  }