@superdispatch/ui-lab 0.21.8 → 0.21.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.
- package/.babelrc.js +5 -0
- package/.turbo/turbo-version.log +28 -0
- package/package.json +59 -34
- package/pkg/README.md +10 -0
- package/{dist-node → pkg/dist-node}/index.js +25 -23
- package/pkg/dist-node/index.js.map +1 -0
- package/{dist-src → pkg/dist-src}/alert/Alert.js +2 -4
- package/{dist-src → pkg/dist-src}/banner/Banner.js +0 -0
- package/{dist-src → pkg/dist-src}/box/Box.js +0 -0
- package/{dist-src → pkg/dist-src}/button/Button.js +0 -0
- package/{dist-src → pkg/dist-src}/button-area/ButtonArea.js +0 -0
- package/{dist-src → pkg/dist-src}/container/Container.js +0 -0
- package/{dist-src → pkg/dist-src}/description-item/DescriptionItem.js +0 -0
- package/{dist-src → pkg/dist-src}/file-drop-zone/FileDropZone.js +0 -0
- package/{dist-src → pkg/dist-src}/file-list-item/FileListItem.js +0 -0
- package/{dist-src → pkg/dist-src}/index.js +0 -0
- package/{dist-src → pkg/dist-src}/linked-text/LinkedText.js +0 -0
- package/{dist-src → pkg/dist-src}/multiline-text/MultilineText.js +0 -0
- package/{dist-src → pkg/dist-src}/navbar/Navbar.js +0 -0
- package/{dist-src → pkg/dist-src}/navbar/NavbarAccordion.js +5 -10
- package/{dist-src → pkg/dist-src}/navbar/NavbarAvatar.js +0 -0
- package/{dist-src → pkg/dist-src}/navbar/NavbarBottomBar.js +16 -6
- package/{dist-src → pkg/dist-src}/navbar/NavbarContext.js +0 -0
- package/{dist-src → pkg/dist-src}/navbar/NavbarItem.js +0 -0
- package/{dist-src → pkg/dist-src}/navbar/NavbarList.js +0 -0
- package/{dist-src → pkg/dist-src}/navbar/NavbarMenu.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/Sidebar.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarBackButton.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarContainer.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarContent.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarDivider.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarMenuItem.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarMenuItemAction.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarMenuItemAvatar.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarMenuItemContext.js +0 -0
- package/{dist-src → pkg/dist-src}/sidebar/SidebarSubheader.js +0 -0
- package/{dist-src → pkg/dist-src}/text-box/TextBox.js +0 -0
- package/{dist-src → pkg/dist-src}/utils/RuleNormalizer.js +0 -0
- package/{dist-src → pkg/dist-src}/utils/mergeStyles.js +0 -0
- package/{dist-types → pkg/dist-types}/index.d.ts +308 -308
- package/{dist-web → pkg/dist-web}/index.js +26 -24
- package/pkg/dist-web/index.js.map +1 -0
- package/pkg/package.json +34 -0
- package/playroom.ts +23 -0
- package/src/alert/Alert.stories.tsx +105 -0
- package/src/alert/Alert.tsx +108 -0
- package/src/banner/Banner.stories.tsx +64 -0
- package/src/banner/Banner.tsx +120 -0
- package/src/box/Box.stories.tsx +20 -0
- package/src/box/Box.tsx +252 -0
- package/src/button/Button.stories.tsx +717 -0
- package/src/button/Button.tsx +460 -0
- package/src/button-area/ButtonArea.stories.tsx +65 -0
- package/src/button-area/ButtonArea.tsx +88 -0
- package/src/container/Container.tsx +48 -0
- package/src/description-item/DescriptionItem.stories.tsx +163 -0
- package/src/description-item/DescriptionItem.tsx +104 -0
- package/src/file-drop-zone/FileDropZone.stories.tsx +44 -0
- package/src/file-drop-zone/FileDropZone.tsx +170 -0
- package/src/file-list-item/FileListItem.stories.tsx +37 -0
- package/src/file-list-item/FileListItem.tsx +145 -0
- package/src/file-list-item/__tests__/FileListItem.spec.tsx +339 -0
- package/src/index.spec.ts +43 -0
- package/src/index.ts +28 -0
- package/src/linked-text/LinkeText.stories.tsx +42 -0
- package/src/linked-text/LinkedText.tsx +47 -0
- package/src/multiline-text/MultilineText.stories.tsx +30 -0
- package/src/multiline-text/MultilineText.ts +16 -0
- package/src/navbar/Navbar.stories.tsx +135 -0
- package/src/navbar/Navbar.tsx +111 -0
- package/src/navbar/NavbarAccordion.tsx +171 -0
- package/src/navbar/NavbarAvatar.tsx +51 -0
- package/src/navbar/NavbarBottomBar.tsx +135 -0
- package/src/navbar/NavbarContext.tsx +23 -0
- package/src/navbar/NavbarItem.tsx +119 -0
- package/src/navbar/NavbarList.tsx +225 -0
- package/src/navbar/NavbarMenu.tsx +102 -0
- package/src/sidebar/Sidebar.stories.tsx +363 -0
- package/src/sidebar/Sidebar.tsx +73 -0
- package/src/sidebar/SidebarBackButton.tsx +33 -0
- package/src/sidebar/SidebarContainer.tsx +114 -0
- package/src/sidebar/SidebarContent.tsx +119 -0
- package/src/sidebar/SidebarDivider.tsx +15 -0
- package/src/sidebar/SidebarMenuItem.tsx +211 -0
- package/src/sidebar/SidebarMenuItemAction.tsx +27 -0
- package/src/sidebar/SidebarMenuItemAvatar.tsx +59 -0
- package/src/sidebar/SidebarMenuItemContext.tsx +33 -0
- package/src/sidebar/SidebarSubheader.tsx +38 -0
- package/src/styled.d.ts +12 -0
- package/src/text-box/TextBox.stories.tsx +108 -0
- package/src/text-box/TextBox.tsx +229 -0
- package/src/utils/RuleNormalizer.ts +24 -0
- package/src/utils/mergeStyles.ts +28 -0
- package/tsconfig.json +19 -0
- package/LICENSE +0 -21
- package/dist-node/index.js.map +0 -1
- package/dist-web/index.js.map +0 -1
package/.babelrc.js
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[33m@superdispatch/ui-lab:version[0m: cache hit, replaying output [2m45a0d783a7139ee5[0m
|
|
2
|
+
[33m@superdispatch/ui-lab:version: [0m$ pika build
|
|
3
|
+
[33m@superdispatch/ui-lab:version: [0m@pika/pack v0.5.0
|
|
4
|
+
[33m@superdispatch/ui-lab:version: [0m[1/8] Validating source...
|
|
5
|
+
[33m@superdispatch/ui-lab:version: [0m[2/8] Preparing pipeline...
|
|
6
|
+
[33m@superdispatch/ui-lab:version: [0m ❇️ pkg/
|
|
7
|
+
[33m@superdispatch/ui-lab:version: [0m[3/8] Running @pika/plugin-standard-pkg...
|
|
8
|
+
[33m@superdispatch/ui-lab:version: [0mBrowserslist: caniuse-lite is outdated. Please run:
|
|
9
|
+
[33m@superdispatch/ui-lab:version: [0m npx browserslist@latest --update-db
|
|
10
|
+
[33m@superdispatch/ui-lab:version: [0m Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating
|
|
11
|
+
[33m@superdispatch/ui-lab:version: [0m 📝 pkg/dist-src/index.js [esnext]
|
|
12
|
+
[33m@superdispatch/ui-lab:version: [0m » Linting with standard-pkg...
|
|
13
|
+
[33m@superdispatch/ui-lab:version: [0m[4/8] Running @pika/plugin-build-web...
|
|
14
|
+
[33m@superdispatch/ui-lab:version: [0m 📝 pkg/dist-web/index.js [module]
|
|
15
|
+
[33m@superdispatch/ui-lab:version: [0m[5/8] Running @pika/plugin-build-node...
|
|
16
|
+
[33m@superdispatch/ui-lab:version: [0m 📝 pkg/dist-node/index.js [main]
|
|
17
|
+
[33m@superdispatch/ui-lab:version: [0m[6/8] Running @pika/plugin-build-types...
|
|
18
|
+
[33m@superdispatch/ui-lab:version: [0m » no manual type definitions found, auto-generating...
|
|
19
|
+
[33m@superdispatch/ui-lab:version: [0m 📝 pkg/dist-types/index.d.ts [types]
|
|
20
|
+
[33m@superdispatch/ui-lab:version: [0m[7/8] Running @pika/plugin-bundle-types...
|
|
21
|
+
[33m@superdispatch/ui-lab:version: [0mCircular dependency: pkg/dist-types/navbar/NavbarList.d.ts -> pkg/dist-types/navbar/NavbarAccordion.d.ts -> pkg/dist-types/navbar/NavbarList.d.ts
|
|
22
|
+
[33m@superdispatch/ui-lab:version: [0m'Context' is imported from external module 'react' but never used
|
|
23
|
+
[33m@superdispatch/ui-lab:version: [0m 📝 pkg/dist-types/index.d.ts
|
|
24
|
+
[33m@superdispatch/ui-lab:version: [0m[8/8] Finalizing package...
|
|
25
|
+
[33m@superdispatch/ui-lab:version: [0m » copying README.md...
|
|
26
|
+
[33m@superdispatch/ui-lab:version: [0m 📝 pkg/package.json
|
|
27
|
+
[33m@superdispatch/ui-lab:version: [0m 📦 pkg/
|
|
28
|
+
[33m@superdispatch/ui-lab:version: [0mDone in 14.05s.
|
package/package.json
CHANGED
|
@@ -1,34 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@superdispatch/ui-lab",
|
|
3
|
-
"version": "0.21.
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"@superdispatch/
|
|
18
|
-
"
|
|
19
|
-
"react-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
"
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@superdispatch/ui-lab",
|
|
3
|
+
"version": "0.21.12",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/superdispatch/ui.git"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"main": "src/index.ts",
|
|
10
|
+
"module": "src/index.ts",
|
|
11
|
+
"browser": "pkg/dist-web/index.js",
|
|
12
|
+
"types": "src/index.ts",
|
|
13
|
+
"scripts": {
|
|
14
|
+
"version": "pika build"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@superdispatch/hooks": "^0.21.0",
|
|
18
|
+
"@superdispatch/ui": "^0.21.8",
|
|
19
|
+
"react-anchorme": "^2.2.1",
|
|
20
|
+
"react-dropzone": "^11.3.4"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@babel/runtime": "^7.0.0",
|
|
24
|
+
"react": "^17.0.2",
|
|
25
|
+
"styled-components": "^5.2.1"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"directory": "pkg"
|
|
30
|
+
},
|
|
31
|
+
"@pika/pack": {
|
|
32
|
+
"pipeline": [
|
|
33
|
+
[
|
|
34
|
+
"@pika/plugin-standard-pkg",
|
|
35
|
+
{
|
|
36
|
+
"exclude": [
|
|
37
|
+
"**/*.spec.*",
|
|
38
|
+
"**/*.stories.*",
|
|
39
|
+
"**/*.playroom.*",
|
|
40
|
+
"**/__tests__/**",
|
|
41
|
+
"**/__testutils__/**"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
"@pika/plugin-build-web"
|
|
47
|
+
],
|
|
48
|
+
[
|
|
49
|
+
"@pika/plugin-build-node"
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
"@pika/plugin-build-types"
|
|
53
|
+
],
|
|
54
|
+
[
|
|
55
|
+
"@pika/plugin-bundle-types"
|
|
56
|
+
]
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
}
|
package/pkg/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
### `@superdispatch/ui-lab`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@superdispatch/ui-lab)
|
|
4
|
+
[](https://bundlephobia.com/result?p=@superdispatch/ui-lab)
|
|
5
|
+
|
|
6
|
+
#### Installation
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
yarn add @superdispatch/ui-lab
|
|
10
|
+
```
|
|
@@ -41,7 +41,7 @@ var iconMapping = {
|
|
|
41
41
|
var Alert = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
42
42
|
var {
|
|
43
43
|
children,
|
|
44
|
-
onClose
|
|
44
|
+
onClose,
|
|
45
45
|
severity = 'positive'
|
|
46
46
|
} = _ref;
|
|
47
47
|
return /*#__PURE__*/jsxRuntime.jsx(StyledAlert, {
|
|
@@ -49,9 +49,7 @@ var Alert = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
49
49
|
variant: "outlined",
|
|
50
50
|
iconMapping: iconMapping,
|
|
51
51
|
severity: toMaterialSeverity(severity),
|
|
52
|
-
onClose:
|
|
53
|
-
_onClose === null || _onClose === void 0 ? void 0 : _onClose();
|
|
54
|
-
},
|
|
52
|
+
onClose: onClose,
|
|
55
53
|
children: children
|
|
56
54
|
});
|
|
57
55
|
});
|
|
@@ -1076,6 +1074,7 @@ function useNavbarContext() {
|
|
|
1076
1074
|
return react.useContext(NavbarContext);
|
|
1077
1075
|
}
|
|
1078
1076
|
|
|
1077
|
+
var _excluded$7 = ["active", "hasBadge"];
|
|
1079
1078
|
var StyledBottomNavigation = /*#__PURE__*/styled__default(core.BottomNavigation).withConfig({
|
|
1080
1079
|
displayName: "NavbarBottomBar__StyledBottomNavigation",
|
|
1081
1080
|
componentId: "SD__sc-9z6v3k-0"
|
|
@@ -1114,12 +1113,20 @@ function NavbarBottomBar(_ref) {
|
|
|
1114
1113
|
}
|
|
1115
1114
|
}
|
|
1116
1115
|
},
|
|
1117
|
-
children: [items.map(
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
}
|
|
1122
|
-
|
|
1116
|
+
children: [items.map(_ref2 => {
|
|
1117
|
+
var {
|
|
1118
|
+
active,
|
|
1119
|
+
hasBadge
|
|
1120
|
+
} = _ref2,
|
|
1121
|
+
item = _objectWithoutProperties(_ref2, _excluded$7);
|
|
1122
|
+
|
|
1123
|
+
return /*#__PURE__*/react.createElement(StyledBottomNavigationAction, _objectSpread(_objectSpread({}, item), {}, {
|
|
1124
|
+
key: item.value,
|
|
1125
|
+
icon: hasBadge ? /*#__PURE__*/jsxRuntime.jsxs(IconWrapper, {
|
|
1126
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(IconLabel, {}), item.icon]
|
|
1127
|
+
}) : item.icon
|
|
1128
|
+
}));
|
|
1129
|
+
}), /*#__PURE__*/jsxRuntime.jsx(StyledBottomNavigationAction, {
|
|
1123
1130
|
value: "menu",
|
|
1124
1131
|
label: "Menu",
|
|
1125
1132
|
icon: hasMenuBadge ? /*#__PURE__*/jsxRuntime.jsxs(IconWrapper, {
|
|
@@ -1190,12 +1197,7 @@ var NavbarAccordionLabel = /*#__PURE__*/styled__default.span.withConfig({
|
|
|
1190
1197
|
var NavbarAccordionRoot = /*#__PURE__*/styled__default(core.Accordion).withConfig({
|
|
1191
1198
|
displayName: "NavbarAccordion__NavbarAccordionRoot",
|
|
1192
1199
|
componentId: "SD__sc-1s7g3kw-1"
|
|
1193
|
-
})(
|
|
1194
|
-
var {
|
|
1195
|
-
gutter
|
|
1196
|
-
} = _ref;
|
|
1197
|
-
return styled.css(["width:100%;color:#c2c4c9;font-size:14px;font-weight:400;line-height:20px;text-decoration:none;outline:none;cursor:pointer;background-color:#1b2638;margin-top:", ";&[aria-current]{background-color:#2f394a;color:", ";}&.MuiAccordion-root:before{background-color:#1b2638;}&.MuiPaper-elevation0{border:0px;}&.MuiAccordion-root.Mui-expanded{margin-top:", ";}"], gutter ? '16px' : '0', ui.Color.White, gutter ? '16px' : '0');
|
|
1198
|
-
});
|
|
1200
|
+
})(["width:100%;color:#c2c4c9;font-size:14px;font-weight:400;line-height:20px;text-decoration:none;outline:none;cursor:pointer;background-color:#1b2638;&[aria-current]{background-color:#2f394a;color:", ";}&.MuiAccordion-root:before{background-color:#1b2638;}&.MuiPaper-elevation0{border:0px;}&[data-gutter]{margin-top:16px;}&[data-gutter].MuiAccordion-root.Mui-expanded{margin-top:16px;}"], ui.Color.White);
|
|
1199
1201
|
var NavbarAccordionSummary = /*#__PURE__*/styled__default(core.AccordionSummary).withConfig({
|
|
1200
1202
|
displayName: "NavbarAccordion__NavbarAccordionSummary",
|
|
1201
1203
|
componentId: "SD__sc-1s7g3kw-2"
|
|
@@ -1204,14 +1206,14 @@ var IconWrapper$2 = /*#__PURE__*/styled__default.div.withConfig({
|
|
|
1204
1206
|
displayName: "NavbarAccordion__IconWrapper",
|
|
1205
1207
|
componentId: "SD__sc-1s7g3kw-3"
|
|
1206
1208
|
})(["width:24px;margin-right:8px;& svg{font-size:24px;}"]);
|
|
1207
|
-
function NavbarAccordion(
|
|
1209
|
+
function NavbarAccordion(_ref) {
|
|
1208
1210
|
var {
|
|
1209
1211
|
label,
|
|
1210
1212
|
icon,
|
|
1211
1213
|
gutter,
|
|
1212
1214
|
items,
|
|
1213
1215
|
onClick: _onClick
|
|
1214
|
-
} =
|
|
1216
|
+
} = _ref;
|
|
1215
1217
|
var uid = ui.useUID();
|
|
1216
1218
|
var {
|
|
1217
1219
|
setDrawerOpen,
|
|
@@ -1224,7 +1226,7 @@ function NavbarAccordion(_ref2) {
|
|
|
1224
1226
|
}, [isNavbarExpanded]);
|
|
1225
1227
|
return /*#__PURE__*/jsxRuntime.jsxs(NavbarAccordionRoot, {
|
|
1226
1228
|
square: true,
|
|
1227
|
-
gutter:
|
|
1229
|
+
"data-gutter": !gutter,
|
|
1228
1230
|
"aria-labelledby": uid,
|
|
1229
1231
|
expanded: isExpanded,
|
|
1230
1232
|
onClick: event => {
|
|
@@ -1472,7 +1474,7 @@ function Navbar(_ref) {
|
|
|
1472
1474
|
});
|
|
1473
1475
|
}
|
|
1474
1476
|
|
|
1475
|
-
var _excluded$
|
|
1477
|
+
var _excluded$8 = ["title", "subtitle", "children"];
|
|
1476
1478
|
var StyledTypography = /*#__PURE__*/styled__default(core.Typography).withConfig({
|
|
1477
1479
|
displayName: "NavbarAvatar__StyledTypography",
|
|
1478
1480
|
componentId: "SD__sc-19q2zd0-0"
|
|
@@ -1483,7 +1485,7 @@ function NavbarAvatar(_ref) {
|
|
|
1483
1485
|
subtitle,
|
|
1484
1486
|
children
|
|
1485
1487
|
} = _ref,
|
|
1486
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1488
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
1487
1489
|
|
|
1488
1490
|
var {
|
|
1489
1491
|
isNavbarExpanded
|
|
@@ -1701,7 +1703,7 @@ var SidebarContainer = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
|
1701
1703
|
});
|
|
1702
1704
|
if (process.env.NODE_ENV !== "production") SidebarContainer.displayName = "SidebarContainer";
|
|
1703
1705
|
|
|
1704
|
-
var _excluded$
|
|
1706
|
+
var _excluded$9 = ["onClick", "children"];
|
|
1705
1707
|
function SidebarBackButton(_ref) {
|
|
1706
1708
|
var {
|
|
1707
1709
|
onClick: _onClick,
|
|
@@ -1709,7 +1711,7 @@ function SidebarBackButton(_ref) {
|
|
|
1709
1711
|
fontSize: "small"
|
|
1710
1712
|
})
|
|
1711
1713
|
} = _ref,
|
|
1712
|
-
props = _objectWithoutProperties(_ref, _excluded$
|
|
1714
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
1713
1715
|
|
|
1714
1716
|
var isCollapsed = ui.useCollapseBreakpoint('sm');
|
|
1715
1717
|
var {
|