@superdispatch/ui-lab 0.42.0 → 0.44.0
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-node/index.js +113 -10
- package/dist-node/index.js.map +1 -1
- package/dist-src/flag-list/FlagList.js +33 -0
- package/dist-src/flag-list/FlagListItem.js +77 -0
- package/dist-src/index.js +2 -0
- package/dist-types/index.d.ts +18 -1
- package/dist-web/index.js +113 -12
- package/dist-web/index.js.map +1 -1
- package/package.json +3 -3
package/dist-node/index.js
CHANGED
|
@@ -1102,7 +1102,108 @@ var FileListItem = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
|
|
|
1102
1102
|
});
|
|
1103
1103
|
if (process.env.NODE_ENV !== "production") FileListItem.displayName = "FileListItem";
|
|
1104
1104
|
|
|
1105
|
-
var
|
|
1105
|
+
var FlagListHeader = /*#__PURE__*/styled__default.div.withConfig({
|
|
1106
|
+
displayName: "FlagList__FlagListHeader",
|
|
1107
|
+
componentId: "SD__sc-te7hyy-0"
|
|
1108
|
+
})(["display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding:12px 16px;background:", ";border:1px solid ", ";border-bottom:none;border-radius:4px 4px 0 0;", "{flex-direction:column;align-items:flex-start;}"], ui.ColorDynamic.Silver200, ui.ColorDynamic.Silver400, _ref => {
|
|
1109
|
+
var {
|
|
1110
|
+
theme
|
|
1111
|
+
} = _ref;
|
|
1112
|
+
return theme.breakpoints.down('xs');
|
|
1113
|
+
});
|
|
1114
|
+
var FlagListContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
1115
|
+
displayName: "FlagList__FlagListContainer",
|
|
1116
|
+
componentId: "SD__sc-te7hyy-1"
|
|
1117
|
+
})(["display:flex;flex-direction:column;"]);
|
|
1118
|
+
var FlagList = /*#__PURE__*/react.forwardRef((_ref2, ref) => {
|
|
1119
|
+
var {
|
|
1120
|
+
isStandalone = false,
|
|
1121
|
+
title,
|
|
1122
|
+
endAction,
|
|
1123
|
+
children
|
|
1124
|
+
} = _ref2;
|
|
1125
|
+
return /*#__PURE__*/jsxRuntime.jsxs(FlagListContainer, {
|
|
1126
|
+
"data-variant": isStandalone ? 'standalone' : 'with-header',
|
|
1127
|
+
ref: ref,
|
|
1128
|
+
children: [(title || endAction) && /*#__PURE__*/jsxRuntime.jsxs(FlagListHeader, {
|
|
1129
|
+
children: [title, endAction]
|
|
1130
|
+
}), children]
|
|
1131
|
+
});
|
|
1132
|
+
});
|
|
1133
|
+
if (process.env.NODE_ENV !== "production") FlagList.displayName = "FlagList";
|
|
1134
|
+
|
|
1135
|
+
var _excluded$6 = ["variant", "showHelpIcon", "endAction", "children"];
|
|
1136
|
+
var IconContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
1137
|
+
displayName: "FlagListItem__IconContainer",
|
|
1138
|
+
componentId: "SD__sc-o5bqru-0"
|
|
1139
|
+
})(["padding:4px;border-radius:50%;background:", ";color:", ";transition:", ";& .MuiSvgIcon-root{font-size:16px;}"], ui.ColorDynamic.Silver200, ui.ColorDynamic.Blue300, _ref => {
|
|
1140
|
+
var {
|
|
1141
|
+
theme
|
|
1142
|
+
} = _ref;
|
|
1143
|
+
return theme.transitions.create(['color', 'background-color']);
|
|
1144
|
+
});
|
|
1145
|
+
var Content = /*#__PURE__*/styled__default.div.withConfig({
|
|
1146
|
+
displayName: "FlagListItem__Content",
|
|
1147
|
+
componentId: "SD__sc-o5bqru-1"
|
|
1148
|
+
})(["display:flex;align-items:center;gap:8px;"]);
|
|
1149
|
+
var EndActions = /*#__PURE__*/styled__default.div.withConfig({
|
|
1150
|
+
displayName: "FlagListItem__EndActions",
|
|
1151
|
+
componentId: "SD__sc-o5bqru-2"
|
|
1152
|
+
})(["display:flex;align-items:center;margin-left:auto;gap:8px;& > svg{font-size:16px;color:", ";}", "{margin-left:0;width:100%;}"], ui.ColorDynamic.Dark500, _ref2 => {
|
|
1153
|
+
var {
|
|
1154
|
+
theme
|
|
1155
|
+
} = _ref2;
|
|
1156
|
+
return theme.breakpoints.down('xs');
|
|
1157
|
+
});
|
|
1158
|
+
var BannerListItemDanger = /*#__PURE__*/styled.css(["& ", "{background:", ";color:", ";}&:hover{background:", ";}"], IconContainer, ui.ColorDynamic.Red50, ui.ColorDynamic.Red300, ui.ColorDynamic.Red50);
|
|
1159
|
+
var BannerListItemStandalone = /*#__PURE__*/styled.css(["background:", ";"], ui.ColorDynamic.Silver200);
|
|
1160
|
+
var BannerListContainer = /*#__PURE__*/styled__default.div.withConfig({
|
|
1161
|
+
displayName: "FlagListItem__BannerListContainer",
|
|
1162
|
+
componentId: "SD__sc-o5bqru-3"
|
|
1163
|
+
})(["display:inline-flex;align-items:center;padding:8px 16px 8px 12px;border:1px solid ", ";background:", ";cursor:default;transition:", ";& + &{border-top:none;}&:last-child{border-radius:0 0 4px 4px;}&:hover{background:", ";& ", "{background:", ";}& ", " > svg{color:", ";}}[data-variant='standalone'] &:not(:hover){", "}", " ", "{flex-direction:column;align-items:flex-start;}"], ui.ColorDynamic.Silver400, ui.ColorDynamic.White, _ref3 => {
|
|
1164
|
+
var {
|
|
1165
|
+
theme
|
|
1166
|
+
} = _ref3;
|
|
1167
|
+
return theme.transitions.create(['color', 'background-color']);
|
|
1168
|
+
}, ui.ColorDynamic.Blue50, IconContainer, ui.ColorDynamic.White, EndActions, _ref4 => {
|
|
1169
|
+
var {
|
|
1170
|
+
$variant
|
|
1171
|
+
} = _ref4;
|
|
1172
|
+
return $variant === 'danger' ? ui.ColorDynamic.Red300 : ui.ColorDynamic.Blue300;
|
|
1173
|
+
}, BannerListItemStandalone, _ref5 => {
|
|
1174
|
+
var {
|
|
1175
|
+
$variant
|
|
1176
|
+
} = _ref5;
|
|
1177
|
+
return $variant === 'danger' ? BannerListItemDanger : null;
|
|
1178
|
+
}, _ref6 => {
|
|
1179
|
+
var {
|
|
1180
|
+
theme
|
|
1181
|
+
} = _ref6;
|
|
1182
|
+
return theme.breakpoints.down('xs');
|
|
1183
|
+
});
|
|
1184
|
+
var FlagListItem = /*#__PURE__*/react.forwardRef((_ref7, ref) => {
|
|
1185
|
+
var {
|
|
1186
|
+
variant = 'primary',
|
|
1187
|
+
showHelpIcon,
|
|
1188
|
+
endAction,
|
|
1189
|
+
children
|
|
1190
|
+
} = _ref7,
|
|
1191
|
+
rest = _objectWithoutProperties(_ref7, _excluded$6);
|
|
1192
|
+
return /*#__PURE__*/jsxRuntime.jsxs(BannerListContainer, _objectSpread(_objectSpread({}, rest), {}, {
|
|
1193
|
+
ref: ref,
|
|
1194
|
+
$variant: variant,
|
|
1195
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Content, {
|
|
1196
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(IconContainer, {
|
|
1197
|
+
children: variant === 'danger' ? /*#__PURE__*/jsxRuntime.jsx(icons.Error, {}) : variant === 'warning' ? /*#__PURE__*/jsxRuntime.jsx(icons.Warning, {}) : /*#__PURE__*/jsxRuntime.jsx(icons.Flag, {})
|
|
1198
|
+
}), children]
|
|
1199
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(EndActions, {
|
|
1200
|
+
children: [endAction, showHelpIcon && /*#__PURE__*/jsxRuntime.jsx(icons.Help, {})]
|
|
1201
|
+
})]
|
|
1202
|
+
}));
|
|
1203
|
+
});
|
|
1204
|
+
if (process.env.NODE_ENV !== "production") FlagListItem.displayName = "FlagListItem";
|
|
1205
|
+
|
|
1206
|
+
var _excluded$7 = ["color", "target", "rel"],
|
|
1106
1207
|
_excluded2$2 = ["children", "linkComponent"];
|
|
1107
1208
|
var DefaultLinkComponent = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
1108
1209
|
var {
|
|
@@ -1110,7 +1211,7 @@ var DefaultLinkComponent = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
1110
1211
|
target = '_blank',
|
|
1111
1212
|
rel = 'noreferrer noopener'
|
|
1112
1213
|
} = _ref,
|
|
1113
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1214
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
1114
1215
|
return /*#__PURE__*/jsxRuntime.jsx(core.Link, _objectSpread(_objectSpread({}, props), {}, {
|
|
1115
1216
|
ref: ref,
|
|
1116
1217
|
rel: rel,
|
|
@@ -1156,7 +1257,7 @@ function useNavbarContext() {
|
|
|
1156
1257
|
return react.useContext(NavbarContext);
|
|
1157
1258
|
}
|
|
1158
1259
|
|
|
1159
|
-
var _excluded$
|
|
1260
|
+
var _excluded$8 = ["active", "hasBadge"];
|
|
1160
1261
|
var StyledBottomNavigation = /*#__PURE__*/styled__default(core.BottomNavigation).withConfig({
|
|
1161
1262
|
displayName: "NavbarBottomBar__StyledBottomNavigation",
|
|
1162
1263
|
componentId: "SD__sc-9z6v3k-0"
|
|
@@ -1200,7 +1301,7 @@ function NavbarBottomBar(_ref) {
|
|
|
1200
1301
|
active,
|
|
1201
1302
|
hasBadge
|
|
1202
1303
|
} = _ref2,
|
|
1203
|
-
item = _objectWithoutProperties(_ref2, _excluded$
|
|
1304
|
+
item = _objectWithoutProperties(_ref2, _excluded$8);
|
|
1204
1305
|
return /*#__PURE__*/react.createElement(StyledBottomNavigationAction, _objectSpread(_objectSpread({}, item), {}, {
|
|
1205
1306
|
key: item.value,
|
|
1206
1307
|
icon: hasBadge ? /*#__PURE__*/jsxRuntime.jsxs(IconWrapper, {
|
|
@@ -1417,7 +1518,7 @@ function NavbarMenuItem(_ref5) {
|
|
|
1417
1518
|
})
|
|
1418
1519
|
});
|
|
1419
1520
|
}
|
|
1420
|
-
var Content = /*#__PURE__*/styled__default.div.withConfig({
|
|
1521
|
+
var Content$1 = /*#__PURE__*/styled__default.div.withConfig({
|
|
1421
1522
|
displayName: "NavbarList__Content",
|
|
1422
1523
|
componentId: "SD__sc-19zrmxc-5"
|
|
1423
1524
|
})(["height:100%;min-height:50px;overflow-y:auto;overflow-x:hidden;&[aria-expanded='false']{", ",", "{display:none;}}&::-webkit-scrollbar{width:10px;height:10px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-thumb{background-color:", ";border-radius:100vw;margin-bottom:100px;}"], NavbarBadge, NavbarLabel, ui.ColorDark.Silver500);
|
|
@@ -1455,7 +1556,7 @@ function NavbarList(_ref6) {
|
|
|
1455
1556
|
},
|
|
1456
1557
|
children: isMenuExpanded ? /*#__PURE__*/jsxRuntime.jsx(icons.MenuOpen, {}) : /*#__PURE__*/jsxRuntime.jsx(icons.Menu, {})
|
|
1457
1558
|
})]
|
|
1458
|
-
}), /*#__PURE__*/jsxRuntime.jsx(Content, {
|
|
1559
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Content$1, {
|
|
1459
1560
|
"aria-expanded": isSidebarOpened,
|
|
1460
1561
|
children: filteredItems.map(item => {
|
|
1461
1562
|
var index = filteredItems.indexOf(item);
|
|
@@ -1560,7 +1661,7 @@ function Navbar(_ref) {
|
|
|
1560
1661
|
});
|
|
1561
1662
|
}
|
|
1562
1663
|
|
|
1563
|
-
var _excluded$
|
|
1664
|
+
var _excluded$9 = ["title", "subtitle", "children"];
|
|
1564
1665
|
var StyledTypography = /*#__PURE__*/styled__default(core.Typography).withConfig({
|
|
1565
1666
|
displayName: "NavbarAvatar__StyledTypography",
|
|
1566
1667
|
componentId: "SD__sc-19q2zd0-0"
|
|
@@ -1571,7 +1672,7 @@ function NavbarAvatar(_ref) {
|
|
|
1571
1672
|
subtitle,
|
|
1572
1673
|
children
|
|
1573
1674
|
} = _ref,
|
|
1574
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1675
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
1575
1676
|
var {
|
|
1576
1677
|
isNavbarExpanded
|
|
1577
1678
|
} = useNavbarContext();
|
|
@@ -1781,7 +1882,7 @@ var SidebarContainer = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
1781
1882
|
});
|
|
1782
1883
|
if (process.env.NODE_ENV !== "production") SidebarContainer.displayName = "SidebarContainer";
|
|
1783
1884
|
|
|
1784
|
-
var _excluded$
|
|
1885
|
+
var _excluded$a = ["onClick", "children"];
|
|
1785
1886
|
function SidebarBackButton(_ref) {
|
|
1786
1887
|
var {
|
|
1787
1888
|
onClick: _onClick,
|
|
@@ -1789,7 +1890,7 @@ function SidebarBackButton(_ref) {
|
|
|
1789
1890
|
fontSize: "small"
|
|
1790
1891
|
})
|
|
1791
1892
|
} = _ref,
|
|
1792
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1893
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
1793
1894
|
var isCollapsed = ui.useCollapseBreakpoint('sm');
|
|
1794
1895
|
var {
|
|
1795
1896
|
openSidebar
|
|
@@ -2169,6 +2270,8 @@ exports.DescriptionLineItem = DescriptionLineItem;
|
|
|
2169
2270
|
exports.DottedLine = DottedLine;
|
|
2170
2271
|
exports.FileDropZone = FileDropZone;
|
|
2171
2272
|
exports.FileListItem = FileListItem;
|
|
2273
|
+
exports.FlagList = FlagList;
|
|
2274
|
+
exports.FlagListItem = FlagListItem;
|
|
2172
2275
|
exports.LinkedText = LinkedText;
|
|
2173
2276
|
exports.MultilineText = MultilineText;
|
|
2174
2277
|
exports.Navbar = Navbar;
|