@torq-north/react-tools 1.4.0 → 1.4.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/index.cjs +9 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.es.js +9 -5
- package/dist/index.es.js.map +1 -1
- package/dist/src/IRC/Components/IrcAddressDisplay.d.ts +5 -0
- package/dist/src/IRC/Components/IrcPersonDetails.d.ts +9 -0
- package/dist/src/IRC/Components/IrcPersonHeader.d.ts +9 -0
- package/dist/src/IRC/Components/IrcProfile.d.ts +27 -0
- package/dist/src/IRC/Components/ProfileSection.d.ts +10 -0
- package/dist/src/IRC/Types/IrcPerson.d.ts +30 -0
- package/dist/src/IRC/index.d.ts +5 -0
- package/dist/src/MUI/Components/TabbedLayout/TabbedLayout.d.ts +24 -0
- package/dist/src/MUI/Components/TabbedLayout/index.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -608,9 +608,9 @@ function buildCheckboxOption(option, values) {
|
|
|
608
608
|
}
|
|
609
609
|
function render(option, showCheckbox, isSelected) {
|
|
610
610
|
if (typeof option === "string") {
|
|
611
|
-
return (jsx(MenuItem, { value: option, sx: { display: "block" }, children: jsxs(Stack, { direction: "row", gap: 1, alignItems: "center", children: [showCheckbox && jsx(Checkbox, { checked: isSelected }), jsx(Box, { children: jsx(Typography, { sx: { textWrap: "wrap" }, children: option }) })] }) }, option));
|
|
611
|
+
return (jsx(MenuItem, { value: option, sx: { display: "block" }, children: jsxs(Stack, { direction: "row", gap: 1, alignItems: "center", children: [showCheckbox && (jsx(Checkbox, { checked: isSelected, sx: { padding: 0, marginX: 1 } })), jsx(Box, { children: jsx(Typography, { sx: { textWrap: "wrap" }, children: option }) })] }) }, option));
|
|
612
612
|
}
|
|
613
|
-
return (jsx(MenuItem, { value: option.value, sx: { display: "block" }, disabled: option.disabled, children: jsxs(Stack, { direction: "row", gap: 1, alignItems: "center", children: [showCheckbox && jsx(Checkbox, { checked: isSelected }), jsxs(Box, { children: [jsx(Typography, { fontWeight: option.subText ? "bold" : undefined, sx: { textWrap: "wrap" }, children: option.text }), option.subText && (jsx(Box, { children: jsx(Typography, { variant: "body2", sx: { textWrap: "wrap" }, children: option.subText }) }))] })] }) }, option.value));
|
|
613
|
+
return (jsx(MenuItem, { value: option.value, sx: { display: "block" }, disabled: option.disabled, children: jsxs(Stack, { direction: "row", gap: 1, alignItems: "center", children: [showCheckbox && (jsx(Checkbox, { checked: isSelected, sx: { padding: 0, marginX: 1 } })), jsxs(Box, { children: [jsx(Typography, { fontWeight: option.subText ? "bold" : undefined, sx: { textWrap: "wrap" }, children: option.text }), option.subText && (jsx(Box, { children: jsx(Typography, { variant: "body2", sx: { textWrap: "wrap" }, children: option.subText }) }))] })] }) }, option.value));
|
|
614
614
|
}
|
|
615
615
|
|
|
616
616
|
function SelectFormField(_a) {
|
|
@@ -643,7 +643,10 @@ function findTextFor(value, options) {
|
|
|
643
643
|
for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
|
|
644
644
|
var option = options_1[_i];
|
|
645
645
|
if (isGroup(option)) {
|
|
646
|
-
|
|
646
|
+
var foundOption = findTextFor(value, option.options);
|
|
647
|
+
if (foundOption) {
|
|
648
|
+
return foundOption;
|
|
649
|
+
}
|
|
647
650
|
}
|
|
648
651
|
else if (typeof option === "string") {
|
|
649
652
|
if (option === value) {
|
|
@@ -656,7 +659,6 @@ function findTextFor(value, options) {
|
|
|
656
659
|
}
|
|
657
660
|
}
|
|
658
661
|
}
|
|
659
|
-
return "Unknown";
|
|
660
662
|
}
|
|
661
663
|
function MultiSelectFormField(_a) {
|
|
662
664
|
var _b, _c;
|
|
@@ -678,7 +680,9 @@ function MultiSelectFormField(_a) {
|
|
|
678
680
|
select: {
|
|
679
681
|
endAdornment: isClearable ? (jsx(Box, { pr: 2, children: jsx(IconButton, { size: (_b = slotProps === null || slotProps === void 0 ? void 0 : slotProps.textField) === null || _b === void 0 ? void 0 : _b.size, onClick: function () { return onChange([]); }, children: jsx(CloseIcon, { fontSize: "inherit" }) }) })) : undefined,
|
|
680
682
|
multiple: true,
|
|
681
|
-
renderValue: function (selected) { return (jsx(Box, { whiteSpace: "normal", children: selected
|
|
683
|
+
renderValue: function (selected) { return (jsx(Box, { whiteSpace: "normal", children: selected
|
|
684
|
+
.map(function (s) { var _a; return (_a = findTextFor(s, options)) !== null && _a !== void 0 ? _a : "Unknown"; })
|
|
685
|
+
.join(", ") })); },
|
|
682
686
|
},
|
|
683
687
|
},
|
|
684
688
|
}, (_c = slotProps === null || slotProps === void 0 ? void 0 : slotProps.textField) !== null && _c !== void 0 ? _c : {});
|