@xyo-network/react-property 2.26.9 → 2.26.12
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.
|
@@ -5,12 +5,12 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
7
|
const react_flexbox_1 = require("@xylabs/react-flexbox");
|
|
8
|
-
const
|
|
8
|
+
const core_1 = require("@xyo-network/core");
|
|
9
9
|
const Title_1 = require("./Title");
|
|
10
10
|
const PropertyGroupBox = (_a) => {
|
|
11
11
|
var { titleProps, children, title, tip } = _a, props = tslib_1.__rest(_a, ["titleProps", "children", "title", "tip"]);
|
|
12
12
|
const theme = (0, material_1.useTheme)();
|
|
13
|
-
const childrenArray = (0,
|
|
13
|
+
const childrenArray = (0, core_1.typeOf)(children) === 'array' ? children : undefined;
|
|
14
14
|
return ((0, jsx_runtime_1.jsx)(react_flexbox_1.FlexCol, Object.assign({ alignItems: "stretch", overflow: "hidden" }, props, { children: (0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ overflow: "hidden", justifyContent: "stretch", alignItems: "stretch" }, { children: [(0, jsx_runtime_1.jsx)(Title_1.PropertyTitle, Object.assign({ alignItems: "flex-start", size: "full", title: title, tip: tip }, titleProps)), childrenArray ? ((0, jsx_runtime_1.jsx)(react_flexbox_1.FlexGrowRow, { children: childrenArray === null || childrenArray === void 0 ? void 0 : childrenArray.map((child, index) => {
|
|
15
15
|
return child ? ((0, jsx_runtime_1.jsx)(react_flexbox_1.FlexGrowRow, Object.assign({ borderLeft: 1, borderColor: theme.palette.divider }, { children: child }), index)) : null;
|
|
16
16
|
}) })) : ((0, jsx_runtime_1.jsx)(react_flexbox_1.FlexGrowRow, Object.assign({ overflow: "hidden" }, { children: children })))] })) })));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA+C;AAC/C,yDAAqE;AACrE,
|
|
1
|
+
{"version":3,"file":"Group.js","sourceRoot":"","sources":["../../../src/components/Group.tsx"],"names":[],"mappings":";;;;;AAAA,4CAA+C;AAC/C,yDAAqE;AACrE,4CAA0C;AAI1C,mCAAuC;AAEvC,MAAM,gBAAgB,GAAoC,CAAC,EAA8C,EAAE,EAAE;QAAlD,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,OAAY,EAAP,KAAK,sBAA5C,0CAA8C,CAAF;IACrG,MAAM,KAAK,GAAG,IAAA,mBAAQ,GAAE,CAAA;IACxB,MAAM,aAAa,GAAG,IAAA,aAAM,EAAC,QAAQ,CAAC,KAAK,OAAO,CAAC,CAAC,CAAE,QAA2B,CAAC,CAAC,CAAC,SAAS,CAAA;IAC7F,OAAO,CACL,uBAAC,uBAAO,kBAAC,UAAU,EAAC,SAAS,EAAC,QAAQ,EAAC,QAAQ,IAAK,KAAK,cACvD,wBAAC,uBAAO,kBAAC,QAAQ,EAAC,QAAQ,EAAC,cAAc,EAAC,SAAS,EAAC,UAAU,EAAC,SAAS,iBACtE,uBAAC,qBAAa,kBAAC,UAAU,EAAC,YAAY,EAAC,IAAI,EAAC,MAAM,EAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,IAAM,UAAU,EAAI,EAC5F,aAAa,CAAC,CAAC,CAAC,CACf,uBAAC,2BAAW,cACT,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;wBACnC,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,uBAAC,2BAAW,kBAAa,UAAU,EAAE,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,gBACvE,KAAK,KADU,KAAK,CAET,CACf,CAAC,CAAC,CAAC,IAAI,CAAA;oBACV,CAAC,CAAC,GACU,CACf,CAAC,CAAC,CAAC,CACF,uBAAC,2BAAW,kBAAC,QAAQ,EAAC,QAAQ,gBAAE,QAAQ,IAAe,CACxD,KACO,IACF,CACX,CAAA;AACH,CAAC,CAAA;AAED,MAAM,kBAAkB,GAAsC,CAAC,EAA+C,EAAE,EAAE;QAAnD,EAAE,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAY,EAAP,KAAK,sBAA7C,2CAA+C,CAAF;IAC1G,OAAO,CACL,uBAAC,gBAAK,kBAAC,KAAK,kBAAI,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,IAAK,KAAK,GAAI,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,gBACjH,uBAAC,gBAAgB,oBAAK,KAAK,IAAE,KAAK,EAAE,KAAK,IAAI,IACvC,CACT,CAAA;AACH,CAAC,CAAA;AAEM,MAAM,aAAa,GAAiC,CAAC,KAAK,EAAE,EAAE;IACnE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAC,kBAAkB,oBAAK,KAAK,EAAI,CAAC,CAAC,CAAC,uBAAC,gBAAgB,oBAAK,KAAK,EAAI,CAAA;AAC1F,CAAC,CAAA;AAFY,QAAA,aAAa,iBAEzB"}
|
|
@@ -4,8 +4,8 @@ exports.PropertyTitle = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const material_1 = require("@mui/material");
|
|
7
|
+
const react_common_1 = require("@xylabs/react-common");
|
|
7
8
|
const react_flexbox_1 = require("@xylabs/react-flexbox");
|
|
8
|
-
const react_quick_tip_button_1 = require("@xylabs/react-quick-tip-button");
|
|
9
9
|
const PropertyTitle = (_a) => {
|
|
10
10
|
var { elevation = 1, size = 'medium', tip, more, title } = _a, props = tslib_1.__rest(_a, ["elevation", "size", "tip", "more", "title"]);
|
|
11
11
|
const sizeVariants = {
|
|
@@ -28,7 +28,7 @@ const PropertyTitle = (_a) => {
|
|
|
28
28
|
};
|
|
29
29
|
const quickTipSize = sizeFontSize[size] < 16 ? sizeFontSize[size] : 16;
|
|
30
30
|
const theme = (0, material_1.useTheme)();
|
|
31
|
-
return ((0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ bgcolor: theme.palette.mode === 'dark' ? (0, material_1.lighten)(theme.palette.background.paper, 0.05 * elevation) : (0, material_1.darken)(theme.palette.background.paper, 0.025 * elevation), alignItems: "center", height: sizeTitleHeight[size], justifyContent: "space-between" }, props, { children: [(0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ paddingX: 1, paddingY: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontWeight: 500, noWrap: true, variant: sizeVariants[size], fontSize: sizeFontSize[size] }, { children: (0, jsx_runtime_1.jsx)("small", { children: (0, jsx_runtime_1.jsx)("strong", { children: title }) }) })), tip ? ((0, jsx_runtime_1.jsx)(
|
|
31
|
+
return ((0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ bgcolor: theme.palette.mode === 'dark' ? (0, material_1.lighten)(theme.palette.background.paper, 0.05 * elevation) : (0, material_1.darken)(theme.palette.background.paper, 0.025 * elevation), alignItems: "center", height: sizeTitleHeight[size], justifyContent: "space-between" }, props, { children: [(0, jsx_runtime_1.jsxs)(react_flexbox_1.FlexRow, Object.assign({ paddingX: 1, paddingY: 0.5 }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ fontWeight: 500, noWrap: true, variant: sizeVariants[size], fontSize: sizeFontSize[size] }, { children: (0, jsx_runtime_1.jsx)("small", { children: (0, jsx_runtime_1.jsx)("strong", { children: title }) }) })), tip ? ((0, jsx_runtime_1.jsx)(react_common_1.QuickTipButton, Object.assign({ style: { fontSize: quickTipSize }, color: "inherit", title: title !== null && title !== void 0 ? title : '' }, { children: tip }))) : null] })), more] })));
|
|
32
32
|
};
|
|
33
33
|
exports.PropertyTitle = PropertyTitle;
|
|
34
34
|
//# sourceMappingURL=Title.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Title.js","sourceRoot":"","sources":["../../../src/components/Title.tsx"],"names":[],"mappings":";;;;;AAAA,4CAAwF;AACxF,
|
|
1
|
+
{"version":3,"file":"Title.js","sourceRoot":"","sources":["../../../src/components/Title.tsx"],"names":[],"mappings":";;;;;AAAA,4CAAwF;AACxF,uDAAqD;AACrD,yDAA6D;AActD,MAAM,aAAa,GAAiC,CAAC,EAA8D,EAAE,EAAE;QAAlE,EAAE,SAAS,GAAG,CAAC,EAAE,IAAI,GAAG,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,OAAY,EAAP,KAAK,sBAA5D,6CAA8D,CAAF;IACtH,MAAM,YAAY,GAA6C;QAC7D,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;KACjB,CAAA;IAED,MAAM,eAAe,GAA8C;QACjE,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV,CAAA;IAED,MAAM,YAAY,GAAkC;QAClD,IAAI,EAAE,EAAE;QACR,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,KAAK,EAAE,EAAE;KACV,CAAA;IAED,MAAM,YAAY,GAAG,YAAY,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;IAEtE,MAAM,KAAK,GAAG,IAAA,mBAAQ,GAAE,CAAA;IAExB,OAAO,CACL,wBAAC,uBAAO,kBACN,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,IAAA,kBAAO,EAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,IAAA,iBAAM,EAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,EAAE,KAAK,GAAG,SAAS,CAAC,EAC9J,UAAU,EAAC,QAAQ,EACnB,MAAM,EAAE,eAAe,CAAC,IAAI,CAAC,EAC7B,cAAc,EAAC,eAAe,IAC1B,KAAK,eAET,wBAAC,uBAAO,kBAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,GAAG,iBACjC,uBAAC,qBAAU,kBAAC,UAAU,EAAE,GAAG,EAAE,MAAM,QAAC,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,YAAY,CAAC,IAAI,CAAC,gBAC3F,4CACE,6CAAS,KAAK,GAAU,GAClB,IACG,EACZ,GAAG,CAAC,CAAC,CAAC,CACL,uBAAC,6BAAc,kBAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,YAAY,EAAE,EAAE,KAAK,EAAC,SAAS,EAAC,KAAK,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,gBAClF,GAAG,IACW,CAClB,CAAC,CAAC,CAAC,IAAI,KACA,EACT,IAAI,KACG,CACX,CAAA;AACH,CAAC,CAAA;AAjDY,QAAA,aAAa,iBAiDzB"}
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@xylabs/react-flexbox": "^2.14.5",
|
|
19
19
|
"@xylabs/react-identicon": "^2.14.5",
|
|
20
20
|
"@xylabs/react-quick-tip-button": "^2.14.5",
|
|
21
|
-
"@xyo-network/react-shared": "^2.26.
|
|
21
|
+
"@xyo-network/react-shared": "^2.26.12",
|
|
22
22
|
"@xyo-network/typeof": "^2.21.14",
|
|
23
23
|
"react": "^18.2.0",
|
|
24
24
|
"react-dom": "^18.2.0",
|
|
@@ -80,6 +80,6 @@
|
|
|
80
80
|
},
|
|
81
81
|
"sideEffects": false,
|
|
82
82
|
"types": "dist/esm/index.d.ts",
|
|
83
|
-
"version": "2.26.
|
|
83
|
+
"version": "2.26.12",
|
|
84
84
|
"packageManager": "yarn@3.1.1"
|
|
85
85
|
}
|