@mittwald/flow-react-components 0.2.0-alpha.97 → 0.2.0-alpha.99
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/assets/doc-properties.json +9771 -9752
- package/dist/css/all.css +1 -1
- package/dist/js/components/Image/Image.mjs +15 -3
- package/dist/js/components/Image/Image.mjs.map +1 -1
- package/dist/js/components/Image/Image.module.scss.mjs +6 -2
- package/dist/js/components/Image/Image.module.scss.mjs.map +1 -1
- package/dist/types/components/Image/Image.d.ts +6 -1
- package/dist/types/components/Image/Image.d.ts.map +1 -1
- package/dist/types/components/Image/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/Image/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Section/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/Section/stories/Default.stories.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -7,9 +7,21 @@ import clsx from 'clsx';
|
|
|
7
7
|
import styles from './Image.module.scss.mjs';
|
|
8
8
|
|
|
9
9
|
const Image = flowComponent("Image", (props) => {
|
|
10
|
-
const { className, withBorder, ...rest } = props;
|
|
11
|
-
const rootClassName = clsx(
|
|
12
|
-
|
|
10
|
+
const { className, withBorder, style, aspectRatio, width, height, ...rest } = props;
|
|
11
|
+
const rootClassName = clsx(
|
|
12
|
+
styles.image,
|
|
13
|
+
withBorder && styles.border,
|
|
14
|
+
aspectRatio && styles.aspectRatio,
|
|
15
|
+
className
|
|
16
|
+
);
|
|
17
|
+
return /* @__PURE__ */ jsx(ClearPropsContext, { children: /* @__PURE__ */ jsx(
|
|
18
|
+
"img",
|
|
19
|
+
{
|
|
20
|
+
className: rootClassName,
|
|
21
|
+
style: { ...style, aspectRatio, width, height },
|
|
22
|
+
...rest
|
|
23
|
+
}
|
|
24
|
+
) });
|
|
13
25
|
});
|
|
14
26
|
|
|
15
27
|
export { Image, Image as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.mjs","sources":["../../../../src/components/Image/Image.tsx"],"sourcesContent":["import type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport clsx from \"clsx\";\nimport type { ComponentProps } from \"react\";\nimport styles from \"./Image.module.scss\";\n\nexport interface ImageProps extends ComponentProps<\"img\">, FlowComponentProps {\n /** Display the image with border and rounded edges */\n withBorder?: boolean;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const Image = flowComponent(\"Image\", (props) => {\n const { className, withBorder, ...rest }
|
|
1
|
+
{"version":3,"file":"Image.mjs","sources":["../../../../src/components/Image/Image.tsx"],"sourcesContent":["import type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport ClearPropsContext from \"@/components/ClearPropsContext/ClearPropsContext\";\nimport clsx from \"clsx\";\nimport type { ComponentProps } from \"react\";\nimport styles from \"./Image.module.scss\";\n\nexport interface ImageProps extends ComponentProps<\"img\">, FlowComponentProps {\n /** Display the image with border and rounded edges. */\n withBorder?: boolean;\n /**\n * The aspect ratio of the images container. Larger images will be centered\n * and their overflow will be hidden.\n */\n aspectRatio?: number;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const Image = flowComponent(\"Image\", (props) => {\n const { className, withBorder, style, aspectRatio, width, height, ...rest } =\n props;\n\n const rootClassName = clsx(\n styles.image,\n withBorder && styles.border,\n aspectRatio && styles.aspectRatio,\n className,\n );\n\n return (\n <ClearPropsContext>\n <img\n className={rootClassName}\n style={{ ...style, aspectRatio, width, height }}\n {...rest}\n />\n </ClearPropsContext>\n );\n});\n\nexport default Image;\n"],"names":[],"mappings":";;;;;;AAqBO,MAAM,KAAQ,GAAA,aAAA,CAAc,OAAS,EAAA,CAAC,KAAU,KAAA;AACrD,EAAM,MAAA,EAAE,WAAW,UAAY,EAAA,KAAA,EAAO,aAAa,KAAO,EAAA,MAAA,EAAQ,GAAG,IAAA,EACnE,GAAA,KAAA;AAEF,EAAA,MAAM,aAAgB,GAAA,IAAA;AAAA,IACpB,MAAO,CAAA,KAAA;AAAA,IACP,cAAc,MAAO,CAAA,MAAA;AAAA,IACrB,eAAe,MAAO,CAAA,WAAA;AAAA,IACtB;AAAA,GACF;AAEA,EAAA,2BACG,iBACC,EAAA,EAAA,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAW,EAAA,aAAA;AAAA,MACX,OAAO,EAAE,GAAG,KAAO,EAAA,WAAA,EAAa,OAAO,MAAO,EAAA;AAAA,MAC7C,GAAG;AAAA;AAAA,GAER,EAAA,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
+
const image = "flow--image";
|
|
3
4
|
const border = "flow--image--border";
|
|
5
|
+
const aspectRatio = "flow--image--aspect-ratio";
|
|
4
6
|
const styles = {
|
|
5
|
-
|
|
7
|
+
image: image,
|
|
8
|
+
border: border,
|
|
9
|
+
aspectRatio: aspectRatio
|
|
6
10
|
};
|
|
7
11
|
|
|
8
|
-
export { border, styles as default };
|
|
12
|
+
export { aspectRatio, border, styles as default, image };
|
|
9
13
|
//# sourceMappingURL=Image.module.scss.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Image.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
3
|
export interface ImageProps extends ComponentProps<"img">, FlowComponentProps {
|
|
4
|
-
/** Display the image with border and rounded edges */
|
|
4
|
+
/** Display the image with border and rounded edges. */
|
|
5
5
|
withBorder?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* The aspect ratio of the images container. Larger images will be centered
|
|
8
|
+
* and their overflow will be hidden.
|
|
9
|
+
*/
|
|
10
|
+
aspectRatio?: number;
|
|
6
11
|
}
|
|
7
12
|
/**
|
|
8
13
|
* @flr-generate all
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,KAAK,CAAC,EAAE,kBAAkB;IAC3E,
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,KAAK,CAAC,EAAE,kBAAkB;IAC3E,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,+FAoBhB,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Image/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,MAAM,UAAU,CAAC;AAI7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAI5B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,UAAU,EAAE,KAAsC,CAAC"}
|
|
1
|
+
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Image/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,MAAM,UAAU,CAAC;AAI7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAI5B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,KAAK,CAAC,CAAC;AAEpC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,UAAU,EAAE,KAAsC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,EAAE,KAAyC,CAAC"}
|
|
@@ -9,4 +9,5 @@ export declare const WithHeaderContent: Story;
|
|
|
9
9
|
export declare const WithSubHeadings: Story;
|
|
10
10
|
export declare const HideSeperator: Story;
|
|
11
11
|
export declare const WithFileField: Story;
|
|
12
|
+
export declare const WithForm: Story;
|
|
12
13
|
//# sourceMappingURL=Default.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Section/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,OAAO,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Default.stories.d.ts","sourceRoot":"","sources":["../../../../../src/components/Section/stories/Default.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,OAAO,MAAM,YAAY,CAAC;AA8BjC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,OAAO,CAc9B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,OAAO,CAAC,CAAC;AAEtC,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,gBAAgB,EAAE,KA0B9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAmE/B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAyB7B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KA0B3B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAe3B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAgCtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.99",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@chakra-ui/live-region": "^2.1.0",
|
|
55
55
|
"@internationalized/string-compiler": "^3.2.6",
|
|
56
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
56
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.99",
|
|
57
57
|
"@mittwald/react-use-promise": "^3.0.1",
|
|
58
58
|
"@react-aria/form": "^3.0.14",
|
|
59
59
|
"@react-aria/utils": "^3.28.1",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"@faker-js/faker": "^9.6.0",
|
|
93
93
|
"@internationalized/date": "^3.7.0",
|
|
94
94
|
"@mfalkenberg/remote-dom-react": "1.2.3",
|
|
95
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
95
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.99",
|
|
96
96
|
"@mittwald/react-use-promise": "^2.6.0",
|
|
97
97
|
"@mittwald/typescript-config": "",
|
|
98
98
|
"@nx/storybook": "^20.5.0",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"optional": true
|
|
173
173
|
}
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "a3012fb34f7c37e342fc9a40235fd9a754424c93"
|
|
176
176
|
}
|