@devtools-ui/stacked-view 0.2.0-next.0 → 0.2.0-next.2
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/dist/cjs/index.cjs +22 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/index.legacy-esm.js +22 -1
- package/dist/index.mjs +22 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/component/index.tsx +17 -4
package/dist/cjs/index.cjs
CHANGED
|
@@ -41,7 +41,28 @@ var import_react2 = require("@player-ui/react");
|
|
|
41
41
|
var import_react3 = __toESM(require("react"));
|
|
42
42
|
var StackedViewComponent = (props) => {
|
|
43
43
|
const { header, main, footer } = props;
|
|
44
|
-
return /* @__PURE__ */ import_react3.default.createElement(
|
|
44
|
+
return /* @__PURE__ */ import_react3.default.createElement(
|
|
45
|
+
import_react.Grid,
|
|
46
|
+
{
|
|
47
|
+
h: "100%",
|
|
48
|
+
gap: "4",
|
|
49
|
+
templateAreas: '"header" "main" "footer"',
|
|
50
|
+
width: "full"
|
|
51
|
+
},
|
|
52
|
+
/* @__PURE__ */ import_react3.default.createElement(import_react.GridItem, { w: "100%", area: "header" }, header && /* @__PURE__ */ import_react3.default.createElement(import_react2.ReactAsset, { ...header })),
|
|
53
|
+
/* @__PURE__ */ import_react3.default.createElement(
|
|
54
|
+
import_react.GridItem,
|
|
55
|
+
{
|
|
56
|
+
w: "100%",
|
|
57
|
+
maxHeight: "70vh",
|
|
58
|
+
overflowX: "auto",
|
|
59
|
+
overflowY: "auto",
|
|
60
|
+
area: "main"
|
|
61
|
+
},
|
|
62
|
+
main && /* @__PURE__ */ import_react3.default.createElement(import_react2.ReactAsset, { ...main })
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ import_react3.default.createElement(import_react.GridItem, { w: "100%", overflowX: "auto", overflowY: "auto", area: "footer" }, footer && /* @__PURE__ */ import_react3.default.createElement(import_react2.ReactAsset, { ...footer }))
|
|
65
|
+
);
|
|
45
66
|
};
|
|
46
67
|
|
|
47
68
|
// ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/dsl/index.tsx
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/index.ts","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/component/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/dsl/index.tsx"],"sourcesContent":["export * from \"./types\";\nexport * from \"./component\";\nexport * from \"./dsl\";\n","import { Grid, GridItem } from \"@chakra-ui/react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport React from \"react\";\nimport type { StackedViewView } from \"../types\";\n\nexport const StackedViewComponent = (props: StackedViewView) => {\n const { header, main, footer } = props;\n\n return (\n <Grid
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/index.ts","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/component/index.tsx","../../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/dsl/index.tsx"],"sourcesContent":["export * from \"./types\";\nexport * from \"./component\";\nexport * from \"./dsl\";\n","import { Grid, GridItem } from \"@chakra-ui/react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport React from \"react\";\nimport type { StackedViewView } from \"../types\";\n\nexport const StackedViewComponent = (props: StackedViewView) => {\n const { header, main, footer } = props;\n\n return (\n <Grid\n h=\"100%\"\n gap=\"4\"\n templateAreas={'\"header\" \"main\" \"footer\"'}\n width=\"full\"\n >\n <GridItem w={\"100%\"} area={\"header\"}>\n {header && <ReactAsset {...header} />}\n </GridItem>\n <GridItem\n w={\"100%\"}\n maxHeight=\"70vh\"\n overflowX=\"auto\"\n overflowY=\"auto\"\n area={\"main\"}\n >\n {main && <ReactAsset {...main} />}\n </GridItem>\n <GridItem w={\"100%\"} overflowX=\"auto\" overflowY=\"auto\" area={\"footer\"}>\n {footer && <ReactAsset {...footer} />}\n </GridItem>\n </Grid>\n );\n};\n","import React from \"react\";\nimport { AssetPropsWithChildren, Asset, createSlot } from \"@player-tools/dsl\";\nimport type { Asset as AssetType } from \"@player-ui/player\";\nimport { Collection } from \"@devtools-ui/collection\";\nimport { Text } from \"@devtools-ui/text\";\nimport type { StackedViewView } from \"../types\";\n\n/**\n * Defines the component DSL representation for the StackedView view.\n */\nexport const StackedView = (props: AssetPropsWithChildren<StackedViewView>) => {\n const { children, ...rest } = props;\n\n return (\n <Asset type=\"stacked-view\" {...rest}>\n {children}\n </Asset>\n );\n};\n\nconst CollectionComp = (props: AssetPropsWithChildren<AssetType>) => {\n return (\n <Collection>\n <Collection.Values>{props.children}</Collection.Values>\n </Collection>\n );\n};\n\nStackedView.Header = createSlot({\n name: \"header\",\n TextComp: Text,\n CollectionComp,\n isArray: false,\n wrapInAsset: true,\n});\n\nStackedView.Main = createSlot({\n name: \"main\",\n TextComp: Text,\n CollectionComp,\n isArray: false,\n wrapInAsset: true,\n});\n\nStackedView.Footer = createSlot({\n name: \"footer\",\n TextComp: Text,\n CollectionComp,\n isArray: false,\n wrapInAsset: true,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAA+B;AAC/B,IAAAA,gBAA2B;AAC3B,IAAAA,gBAAkB;AAGX,IAAM,uBAAuB,CAAC,UAA2B;AAC9D,QAAM,EAAE,QAAQ,MAAM,OAAO,IAAI;AAEjC,SACE,8BAAAC,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,KAAI;AAAA,MACJ,eAAe;AAAA,MACf,OAAM;AAAA;AAAA,IAEN,8BAAAA,QAAA,cAAC,yBAAS,GAAG,QAAQ,MAAM,YACxB,UAAU,8BAAAA,QAAA,cAAC,4BAAY,GAAG,QAAQ,CACrC;AAAA,IACA,8BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACC,GAAG;AAAA,QACH,WAAU;AAAA,QACV,WAAU;AAAA,QACV,WAAU;AAAA,QACV,MAAM;AAAA;AAAA,MAEL,QAAQ,8BAAAA,QAAA,cAAC,4BAAY,GAAG,MAAM;AAAA,IACjC;AAAA,IACA,8BAAAA,QAAA,cAAC,yBAAS,GAAG,QAAQ,WAAU,QAAO,WAAU,QAAO,MAAM,YAC1D,UAAU,8BAAAA,QAAA,cAAC,4BAAY,GAAG,QAAQ,CACrC;AAAA,EACF;AAEJ;;;AChCA,IAAAC,gBAAkB;AAClB,iBAA0D;AAE1D,wBAA2B;AAC3B,kBAAqB;AAMd,IAAM,cAAc,CAAC,UAAmD;AAC7E,QAAM,EAAE,UAAU,GAAG,KAAK,IAAI;AAE9B,SACE,8BAAAC,QAAA,cAAC,oBAAM,MAAK,gBAAgB,GAAG,QAC5B,QACH;AAEJ;AAEA,IAAM,iBAAiB,CAAC,UAA6C;AACnE,SACE,8BAAAA,QAAA,cAAC,oCACC,8BAAAA,QAAA,cAAC,6BAAW,QAAX,MAAmB,MAAM,QAAS,CACrC;AAEJ;AAEA,YAAY,aAAS,uBAAW;AAAA,EAC9B,MAAM;AAAA,EACN,UAAU;AAAA,EACV;AAAA,EACA,SAAS;AAAA,EACT,aAAa;AACf,CAAC;AAED,YAAY,WAAO,uBAAW;AAAA,EAC5B,MAAM;AAAA,EACN,UAAU;AAAA,EACV;AAAA,EACA,SAAS;AAAA,EACT,aAAa;AACf,CAAC;AAED,YAAY,aAAS,uBAAW;AAAA,EAC9B,MAAM;AAAA,EACN,UAAU;AAAA,EACV;AAAA,EACA,SAAS;AAAA,EACT,aAAa;AACf,CAAC;","names":["import_react","React","import_react","React"]}
|
package/dist/index.legacy-esm.js
CHANGED
|
@@ -4,7 +4,28 @@ import { ReactAsset } from "@player-ui/react";
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
var StackedViewComponent = (props) => {
|
|
6
6
|
const { header, main, footer } = props;
|
|
7
|
-
return /* @__PURE__ */ React.createElement(
|
|
7
|
+
return /* @__PURE__ */ React.createElement(
|
|
8
|
+
Grid,
|
|
9
|
+
{
|
|
10
|
+
h: "100%",
|
|
11
|
+
gap: "4",
|
|
12
|
+
templateAreas: '"header" "main" "footer"',
|
|
13
|
+
width: "full"
|
|
14
|
+
},
|
|
15
|
+
/* @__PURE__ */ React.createElement(GridItem, { w: "100%", area: "header" }, header && /* @__PURE__ */ React.createElement(ReactAsset, { ...header })),
|
|
16
|
+
/* @__PURE__ */ React.createElement(
|
|
17
|
+
GridItem,
|
|
18
|
+
{
|
|
19
|
+
w: "100%",
|
|
20
|
+
maxHeight: "70vh",
|
|
21
|
+
overflowX: "auto",
|
|
22
|
+
overflowY: "auto",
|
|
23
|
+
area: "main"
|
|
24
|
+
},
|
|
25
|
+
main && /* @__PURE__ */ React.createElement(ReactAsset, { ...main })
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ React.createElement(GridItem, { w: "100%", overflowX: "auto", overflowY: "auto", area: "footer" }, footer && /* @__PURE__ */ React.createElement(ReactAsset, { ...footer }))
|
|
28
|
+
);
|
|
8
29
|
};
|
|
9
30
|
|
|
10
31
|
// ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/dsl/index.tsx
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,28 @@ import { ReactAsset } from "@player-ui/react";
|
|
|
4
4
|
import React from "react";
|
|
5
5
|
var StackedViewComponent = (props) => {
|
|
6
6
|
const { header, main, footer } = props;
|
|
7
|
-
return /* @__PURE__ */ React.createElement(
|
|
7
|
+
return /* @__PURE__ */ React.createElement(
|
|
8
|
+
Grid,
|
|
9
|
+
{
|
|
10
|
+
h: "100%",
|
|
11
|
+
gap: "4",
|
|
12
|
+
templateAreas: '"header" "main" "footer"',
|
|
13
|
+
width: "full"
|
|
14
|
+
},
|
|
15
|
+
/* @__PURE__ */ React.createElement(GridItem, { w: "100%", area: "header" }, header && /* @__PURE__ */ React.createElement(ReactAsset, { ...header })),
|
|
16
|
+
/* @__PURE__ */ React.createElement(
|
|
17
|
+
GridItem,
|
|
18
|
+
{
|
|
19
|
+
w: "100%",
|
|
20
|
+
maxHeight: "70vh",
|
|
21
|
+
overflowX: "auto",
|
|
22
|
+
overflowY: "auto",
|
|
23
|
+
area: "main"
|
|
24
|
+
},
|
|
25
|
+
main && /* @__PURE__ */ React.createElement(ReactAsset, { ...main })
|
|
26
|
+
),
|
|
27
|
+
/* @__PURE__ */ React.createElement(GridItem, { w: "100%", overflowX: "auto", overflowY: "auto", area: "footer" }, footer && /* @__PURE__ */ React.createElement(ReactAsset, { ...footer }))
|
|
28
|
+
);
|
|
8
29
|
};
|
|
9
30
|
|
|
10
31
|
// ../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/dsl/index.tsx
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/component/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/dsl/index.tsx"],"sourcesContent":["import { Grid, GridItem } from \"@chakra-ui/react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport React from \"react\";\nimport type { StackedViewView } from \"../types\";\n\nexport const StackedViewComponent = (props: StackedViewView) => {\n const { header, main, footer } = props;\n\n return (\n <Grid
|
|
1
|
+
{"version":3,"sources":["../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/component/index.tsx","../../../../../../../../../../execroot/_main/bazel-out/k8-fastbuild/bin/stacked-view/src/dsl/index.tsx"],"sourcesContent":["import { Grid, GridItem } from \"@chakra-ui/react\";\nimport { ReactAsset } from \"@player-ui/react\";\nimport React from \"react\";\nimport type { StackedViewView } from \"../types\";\n\nexport const StackedViewComponent = (props: StackedViewView) => {\n const { header, main, footer } = props;\n\n return (\n <Grid\n h=\"100%\"\n gap=\"4\"\n templateAreas={'\"header\" \"main\" \"footer\"'}\n width=\"full\"\n >\n <GridItem w={\"100%\"} area={\"header\"}>\n {header && <ReactAsset {...header} />}\n </GridItem>\n <GridItem\n w={\"100%\"}\n maxHeight=\"70vh\"\n overflowX=\"auto\"\n overflowY=\"auto\"\n area={\"main\"}\n >\n {main && <ReactAsset {...main} />}\n </GridItem>\n <GridItem w={\"100%\"} overflowX=\"auto\" overflowY=\"auto\" area={\"footer\"}>\n {footer && <ReactAsset {...footer} />}\n </GridItem>\n </Grid>\n );\n};\n","import React from \"react\";\nimport { AssetPropsWithChildren, Asset, createSlot } from \"@player-tools/dsl\";\nimport type { Asset as AssetType } from \"@player-ui/player\";\nimport { Collection } from \"@devtools-ui/collection\";\nimport { Text } from \"@devtools-ui/text\";\nimport type { StackedViewView } from \"../types\";\n\n/**\n * Defines the component DSL representation for the StackedView view.\n */\nexport const StackedView = (props: AssetPropsWithChildren<StackedViewView>) => {\n const { children, ...rest } = props;\n\n return (\n <Asset type=\"stacked-view\" {...rest}>\n {children}\n </Asset>\n );\n};\n\nconst CollectionComp = (props: AssetPropsWithChildren<AssetType>) => {\n return (\n <Collection>\n <Collection.Values>{props.children}</Collection.Values>\n </Collection>\n );\n};\n\nStackedView.Header = createSlot({\n name: \"header\",\n TextComp: Text,\n CollectionComp,\n isArray: false,\n wrapInAsset: true,\n});\n\nStackedView.Main = createSlot({\n name: \"main\",\n TextComp: Text,\n CollectionComp,\n isArray: false,\n wrapInAsset: true,\n});\n\nStackedView.Footer = createSlot({\n name: \"footer\",\n TextComp: Text,\n CollectionComp,\n isArray: false,\n wrapInAsset: true,\n});\n"],"mappings":";AAAA,SAAS,MAAM,gBAAgB;AAC/B,SAAS,kBAAkB;AAC3B,OAAO,WAAW;AAGX,IAAM,uBAAuB,CAAC,UAA2B;AAC9D,QAAM,EAAE,QAAQ,MAA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CAAC;","names":["React"]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtools-ui/stacked-view",
|
|
3
|
-
"version": "0.2.0-next.
|
|
3
|
+
"version": "0.2.0-next.2",
|
|
4
4
|
"main": "dist/cjs/index.cjs",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"@devtools-ui/text": "0.2.0-next.
|
|
7
|
-
"@devtools-ui/collection": "0.2.0-next.
|
|
6
|
+
"@devtools-ui/text": "0.2.0-next.2",
|
|
7
|
+
"@devtools-ui/collection": "0.2.0-next.2",
|
|
8
8
|
"@chakra-ui/react": "^2.8.2",
|
|
9
9
|
"@emotion/react": "^11.11.4",
|
|
10
10
|
"@emotion/styled": "^11.11.0",
|
package/src/component/index.tsx
CHANGED
|
@@ -7,12 +7,25 @@ export const StackedViewComponent = (props: StackedViewView) => {
|
|
|
7
7
|
const { header, main, footer } = props;
|
|
8
8
|
|
|
9
9
|
return (
|
|
10
|
-
<Grid
|
|
11
|
-
|
|
10
|
+
<Grid
|
|
11
|
+
h="100%"
|
|
12
|
+
gap="4"
|
|
13
|
+
templateAreas={'"header" "main" "footer"'}
|
|
14
|
+
width="full"
|
|
15
|
+
>
|
|
16
|
+
<GridItem w={"100%"} area={"header"}>
|
|
12
17
|
{header && <ReactAsset {...header} />}
|
|
13
18
|
</GridItem>
|
|
14
|
-
<GridItem
|
|
15
|
-
|
|
19
|
+
<GridItem
|
|
20
|
+
w={"100%"}
|
|
21
|
+
maxHeight="70vh"
|
|
22
|
+
overflowX="auto"
|
|
23
|
+
overflowY="auto"
|
|
24
|
+
area={"main"}
|
|
25
|
+
>
|
|
26
|
+
{main && <ReactAsset {...main} />}
|
|
27
|
+
</GridItem>
|
|
28
|
+
<GridItem w={"100%"} overflowX="auto" overflowY="auto" area={"footer"}>
|
|
16
29
|
{footer && <ReactAsset {...footer} />}
|
|
17
30
|
</GridItem>
|
|
18
31
|
</Grid>
|