@mittwald/flow-react-components 0.2.0-alpha.90 → 0.2.0-alpha.92
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 +10 -0
- package/dist/assets/doc-properties.json +8873 -8873
- package/dist/css/all.css +1 -1
- package/dist/js/components/LightBox/LightBox.mjs +2 -2
- package/dist/js/components/LightBox/LightBox.mjs.map +1 -1
- package/dist/types/components/Overlay/index.d.ts +1 -2
- package/dist/types/components/Overlay/index.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -50,8 +50,8 @@ const LightBox = flowComponent("LightBox", (props) => {
|
|
|
50
50
|
...rest,
|
|
51
51
|
children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsxs(TunnelProvider, { children: [
|
|
52
52
|
/* @__PURE__ */ jsx("div", { className: styles.content, children }),
|
|
53
|
-
/* @__PURE__ */ jsxs("div", { className: styles.actions, children: [
|
|
54
|
-
/* @__PURE__ */ jsx(Button, { color: "light", variant: "soft", onPress: controller
|
|
53
|
+
/* @__PURE__ */ jsxs("div", { className: styles.actions, onClick: controller.close, children: [
|
|
54
|
+
/* @__PURE__ */ jsx(Button, { color: "light", variant: "soft", onPress: controller.close, children: /* @__PURE__ */ jsx(IconClose, {}) }),
|
|
55
55
|
/* @__PURE__ */ jsx(TunnelExit, { id: "actionGroup" })
|
|
56
56
|
] })
|
|
57
57
|
] }) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LightBox.mjs","sources":["../../../../src/components/LightBox/LightBox.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { Overlay } from \"@/components/Overlay/Overlay\";\nimport clsx from \"clsx\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport styles from \"./LightBox.module.scss\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\n\nexport interface LightBoxProps\n extends PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName {\n /** An overlay controller to control the light box state. */\n controller?: OverlayController;\n /**\n * Whether content can be displayed larger than the available space in the\n * screen. @default true\n */\n fitScreen?: boolean;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const LightBox = flowComponent(\"LightBox\", (props) => {\n const {\n controller: controllerFromProps,\n children,\n ref: ignoredRef,\n className,\n fitScreen = true,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.lightBox,\n fitScreen && styles.fitScreen,\n className,\n );\n\n const propsContext: PropsContext = {\n ActionGroup: {\n className: styles.actionGroup,\n Button: { variant: \"soft\", color: \"light\" },\n tunnelId: \"actionGroup\",\n },\n };\n\n const controllerFromContext = useOverlayController(\"LightBox\", {\n reuseControllerFromContext: true,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n\n return (\n <Overlay\n overlayType=\"LightBox\"\n className={rootClassName}\n controller={controller}\n {...rest}\n >\n <PropsContextProvider props={propsContext}>\n <TunnelProvider>\n <div className={styles.content}>{children}</div>\n <div className={styles.actions}>\n <Button color=\"light\" variant=\"soft\" onPress={controller
|
|
1
|
+
{"version":3,"file":"LightBox.mjs","sources":["../../../../src/components/LightBox/LightBox.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithChildren } from \"react\";\nimport React from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { Overlay } from \"@/components/Overlay/Overlay\";\nimport clsx from \"clsx\";\nimport type { OverlayController } from \"@/lib/controller\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport styles from \"./LightBox.module.scss\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\n\nexport interface LightBoxProps\n extends PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName {\n /** An overlay controller to control the light box state. */\n controller?: OverlayController;\n /**\n * Whether content can be displayed larger than the available space in the\n * screen. @default true\n */\n fitScreen?: boolean;\n}\n\n/**\n * @flr-generate all\n * @flr-clear-props-context\n */\nexport const LightBox = flowComponent(\"LightBox\", (props) => {\n const {\n controller: controllerFromProps,\n children,\n ref: ignoredRef,\n className,\n fitScreen = true,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.lightBox,\n fitScreen && styles.fitScreen,\n className,\n );\n\n const propsContext: PropsContext = {\n ActionGroup: {\n className: styles.actionGroup,\n Button: { variant: \"soft\", color: \"light\" },\n tunnelId: \"actionGroup\",\n },\n };\n\n const controllerFromContext = useOverlayController(\"LightBox\", {\n reuseControllerFromContext: true,\n });\n\n const controller = controllerFromProps ?? controllerFromContext;\n\n return (\n <Overlay\n overlayType=\"LightBox\"\n className={rootClassName}\n controller={controller}\n {...rest}\n >\n <PropsContextProvider props={propsContext}>\n <TunnelProvider>\n <div className={styles.content}>{children}</div>\n <div className={styles.actions} onClick={controller.close}>\n <Button color=\"light\" variant=\"soft\" onPress={controller.close}>\n <IconClose />\n </Button>\n <TunnelExit id=\"actionGroup\" />\n </div>\n </TunnelProvider>\n </PropsContextProvider>\n </Overlay>\n );\n});\n\nexport default LightBox;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAmCO,MAAM,QAAW,GAAA,aAAA,CAAc,UAAY,EAAA,CAAC,KAAU,KAAA;AAC3D,EAAM,MAAA;AAAA,IACJ,UAAY,EAAA,mBAAA;AAAA,IACZ,QAAA;AAAA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CACb,EAAA,CAAA;AAAA,0BACA,GAAA,CAAC,UAAW,EAAA,EAAA,EAAA,EAAG,aAAc,EAAA;AAAA,SAC/B,EAAA;AAAA,OAAA,EACF,CACF,EAAA;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Overlay } from './Overlay';
|
|
2
1
|
export { type OverlayProps, Overlay } from './Overlay';
|
|
3
2
|
export { OverlayContent, type OverlayContentProps, } from './components/OverlayContent';
|
|
4
|
-
export default Overlay;
|
|
3
|
+
export { default } from './Overlay';
|
|
5
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Overlay/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,EACL,cAAc,EACd,KAAK,mBAAmB,GACzB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,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.92",
|
|
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.92",
|
|
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.92",
|
|
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": "6c83276f7161f64783abcf5c086636b39d8d9899"
|
|
176
176
|
}
|