@blocklet/list 0.9.1 → 0.9.4
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/lib/base.js +8 -13
- package/lib/components/aside.js +6 -5
- package/lib/components/custom-select/button.js +6 -5
- package/lib/components/custom-select/custom-select.js +9 -11
- package/lib/components/filter/custom-chip.js +6 -5
- package/lib/components/filter/group.js +6 -5
- package/lib/components/filter/icon.js +6 -5
- package/lib/components/list/index.js +8 -13
- package/lib/components/search.js +8 -13
- package/package.json +3 -6
- package/src/base.js +1 -1
- package/src/components/aside.js +1 -1
- package/src/components/custom-select/button.js +1 -1
- package/src/components/custom-select/custom-select.js +2 -2
- package/src/components/filter/custom-chip.js +1 -1
- package/src/components/filter/group.js +1 -1
- package/src/components/filter/icon.js +1 -1
- package/src/components/list/index.js +1 -1
- package/src/components/search.js +1 -1
package/lib/base.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
|
|
10
10
|
var _Sort = _interopRequireDefault(require("@mui/icons-material/Sort"));
|
|
11
11
|
|
|
@@ -33,8 +33,12 @@ var _search = _interopRequireDefault(require("./components/search"));
|
|
|
33
33
|
|
|
34
34
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
35
|
|
|
36
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
37
|
+
|
|
36
38
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
37
39
|
|
|
40
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
41
|
+
|
|
38
42
|
function ListBase() {
|
|
39
43
|
var _sortOptions$find, _priceOptions$find;
|
|
40
44
|
|
|
@@ -127,20 +131,11 @@ function ListBase() {
|
|
|
127
131
|
});
|
|
128
132
|
}
|
|
129
133
|
|
|
130
|
-
const StyledMin =
|
|
131
|
-
displayName: "base__StyledMin",
|
|
132
|
-
componentId: "sc-wumzlv-0"
|
|
133
|
-
})(["display:flex;flex-direction:column;flex:1;width:100%;height:100%;.filter-bar{justify-content:space-between;margin-bottom:", ";}.sort-button{white-space:nowrap;}.search-container{flex:2;margin-left:0px;}.filter-container{flex:1;display:flex;justify-content:flex-end;}@media (max-width:", "px){.search-container{width:100%;margin-bottom:", ";}.filter-container{margin-left:0;display:flex;justify-content:flex-start;}.filter-bar{display:flex;flex-direction:column;align-items:flex-start;}}@media (max-width:", "px){.sort-button{font-size:12px;}}"], props => props.theme.spacing(2), props => props.theme.breakpoints.values.md, props => props.theme.spacing(2), props => props.theme.breakpoints.values.md);
|
|
134
|
+
const StyledMin = _styled.default.main(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: column;\n flex: 1;\n width: 100%;\n height: 100%;\n .filter-bar {\n justify-content: space-between;\n margin-bottom: ", ";\n }\n .sort-button {\n white-space: nowrap;\n }\n .search-container {\n flex: 2;\n margin-left: 0px;\n }\n\n .filter-container {\n flex: 1;\n display: flex;\n justify-content: flex-end;\n }\n @media (max-width: ", "px) {\n .search-container {\n width: 100%;\n margin-bottom: ", ";\n }\n .filter-container {\n margin-left: 0;\n display: flex;\n justify-content: flex-start;\n }\n .filter-bar {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n }\n }\n @media (max-width: ", "px) {\n .sort-button {\n font-size: 12px;\n }\n }\n"])), props => props.theme.spacing(2), props => props.theme.breakpoints.values.md, props => props.theme.spacing(2), props => props.theme.breakpoints.values.md);
|
|
134
135
|
|
|
135
|
-
const StyledSearch = (0,
|
|
136
|
-
displayName: "base__StyledSearch",
|
|
137
|
-
componentId: "sc-wumzlv-1"
|
|
138
|
-
})(["background-color:", ";"], props => props.theme.palette.grey[50]);
|
|
136
|
+
const StyledSearch = (0, _styled.default)(_search.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: ", ";\n"])), props => props.theme.palette.grey[50]);
|
|
139
137
|
|
|
140
|
-
const FilterContainer =
|
|
141
|
-
displayName: "base__FilterContainer",
|
|
142
|
-
componentId: "sc-wumzlv-2"
|
|
143
|
-
})(["position:sticky;top:0;z-index:999;background-color:white;"]);
|
|
138
|
+
const FilterContainer = _styled.default.div(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: sticky;\n top: 0;\n z-index: 999;\n background-color: white;\n"])));
|
|
144
139
|
|
|
145
140
|
var _default = ListBase;
|
|
146
141
|
exports.default = _default;
|
package/lib/components/aside.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
9
9
|
|
|
10
10
|
var _filter = require("../contexts/filter");
|
|
11
11
|
|
|
@@ -13,8 +13,12 @@ var _filter2 = require("./filter");
|
|
|
13
13
|
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
|
|
16
|
+
var _templateObject;
|
|
17
|
+
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
19
|
|
|
20
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
+
|
|
18
22
|
function Aside() {
|
|
19
23
|
const {
|
|
20
24
|
selectedCategory,
|
|
@@ -47,10 +51,7 @@ function Aside() {
|
|
|
47
51
|
});
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
const StyledAside =
|
|
51
|
-
displayName: "aside__StyledAside",
|
|
52
|
-
componentId: "sc-1wkvsv6-0"
|
|
53
|
-
})(["width:220px;margin-right:", ";height:100%;position:sticky;top:0;overflow-y:auto;z-index:999;"], props => props.theme.spacing(2));
|
|
54
|
+
const StyledAside = _styled.default.aside(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n width: 220px;\n margin-right: ", ";\n height: 100%;\n position: sticky;\n top: 0;\n overflow-y: auto;\n z-index: 999;\n"])), props => props.theme.spacing(2));
|
|
54
55
|
|
|
55
56
|
Aside.propTypes = {};
|
|
56
57
|
Aside.defaultProps = {};
|
|
@@ -11,12 +11,14 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
11
11
|
|
|
12
12
|
var _material = require("@mui/material");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
15
15
|
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
|
|
18
18
|
const _excluded = ["children", "rounded", "loading", "disabled"];
|
|
19
19
|
|
|
20
|
+
var _templateObject;
|
|
21
|
+
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -29,10 +31,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
29
31
|
|
|
30
32
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
})(["border-radius:4px;"]);
|
|
34
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
35
|
+
|
|
36
|
+
const StyledButton = (0, _styled.default)(_material.Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: 4px;\n"])));
|
|
36
37
|
const Button = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
37
38
|
let {
|
|
38
39
|
children,
|
|
@@ -7,9 +7,9 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _styles = require("@mui/material/styles");
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
15
|
|
|
@@ -23,10 +23,14 @@ var _button = _interopRequireDefault(require("./button"));
|
|
|
23
23
|
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
|
|
26
|
+
var _templateObject, _templateObject2;
|
|
27
|
+
|
|
26
28
|
const _excluded = ["title", "value", "icon", "prepend", "options", "onChange", "itemRender"];
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
31
|
|
|
32
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
33
|
+
|
|
30
34
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
35
|
|
|
32
36
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -50,7 +54,7 @@ function CustomSelect(_ref) {
|
|
|
50
54
|
buttonProps = _objectWithoutProperties(_ref, _excluded);
|
|
51
55
|
|
|
52
56
|
const anchorRef = (0, _react.useRef)(null);
|
|
53
|
-
const theme = (0,
|
|
57
|
+
const theme = (0, _styles.useTheme)();
|
|
54
58
|
const [open, setOpen] = (0, _react.useState)(false);
|
|
55
59
|
const [currentValue, setCurrentValue] = (0, _react.useState)(value !== null ? value : '');
|
|
56
60
|
const isSm = (0, _material.useMediaQuery)(theme.breakpoints.down('sm'));
|
|
@@ -152,13 +156,7 @@ CustomSelect.defaultProps = {
|
|
|
152
156
|
itemRender: null,
|
|
153
157
|
onChange: () => {}
|
|
154
158
|
};
|
|
155
|
-
const StyledButton = (0,
|
|
156
|
-
|
|
157
|
-
componentId: "sc-15u16ye-0"
|
|
158
|
-
})(["border:1px solid #f0f0f0;padding:6px 8px 6px 12px;font-weight:", ";font-size:16px;color:#666;line-height:1;text-transform:none;min-width:100px;& + &{margin-left:10px;}&.my-select__selector--active{&,.my-select__arrowdown,.my-select__icon svg{color:", ";}}.my-select__arrowdown{color:#999;font-size:16px;margin-left:6px;}.my-select__icon{font-size:0;svg{color:#999;font-size:18px;margin-right:3px;}}"], props => props.theme.typography.fontWeightBold, props => props.theme.palette.primary.main);
|
|
159
|
-
const StyledMenuList = (0, _styledComponents.default)(_material.MenuList).withConfig({
|
|
160
|
-
displayName: "custom-select__StyledMenuList",
|
|
161
|
-
componentId: "sc-15u16ye-1"
|
|
162
|
-
})([".my-select__option__icon{color:transparent;font-size:16px;margin:0 3px 0 -5px;}.my-select__option{font-size:16px;color:#999;}.my-select__option--active{&,.my-select__option__icon{color:", ";}}"], props => props.theme.palette.primary.main);
|
|
159
|
+
const StyledButton = (0, _styled.default)(_button.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border: 1px solid #f0f0f0;\n padding: 6px 8px 6px 12px;\n font-weight: ", ";\n font-size: 16px;\n color: #666;\n line-height: 1;\n text-transform: none;\n min-width: 100px;\n & + & {\n margin-left: 10px;\n }\n &.my-select__selector--active {\n &,\n .my-select__arrowdown,\n .my-select__icon svg {\n color: ", ";\n }\n }\n .my-select__arrowdown {\n color: #999;\n font-size: 16px;\n margin-left: 6px;\n }\n .my-select__icon {\n font-size: 0;\n svg {\n color: #999;\n font-size: 18px;\n margin-right: 3px;\n }\n }\n"])), props => props.theme.typography.fontWeightBold, props => props.theme.palette.primary.main);
|
|
160
|
+
const StyledMenuList = (0, _styled.default)(_material.MenuList)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n .my-select__option__icon {\n color: transparent;\n font-size: 16px;\n margin: 0 3px 0 -5px;\n }\n .my-select__option {\n font-size: 16px;\n color: #999;\n }\n .my-select__option--active {\n &,\n .my-select__option__icon {\n color: ", ";\n }\n }\n"])), props => props.theme.palette.primary.main);
|
|
163
161
|
var _default = CustomSelect;
|
|
164
162
|
exports.default = _default;
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
11
|
|
|
12
12
|
var _material = require("@mui/material");
|
|
13
13
|
|
|
@@ -15,6 +15,8 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
15
15
|
|
|
16
16
|
const _excluded = ["label", "icon", "onDelete"];
|
|
17
17
|
|
|
18
|
+
var _templateObject;
|
|
19
|
+
|
|
18
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
21
|
|
|
20
22
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
@@ -27,10 +29,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
27
29
|
|
|
28
30
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})([".MuiChip-root{border-radius:4px;height:initial;text-transform:capitalize;margin-right:", ";padding:4px 0;}"], props => props.theme.spacing(2));
|
|
32
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
33
|
+
|
|
34
|
+
const StyleDiv = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .MuiChip-root {\n border-radius: 4px;\n height: initial;\n text-transform: capitalize;\n margin-right: ", ";\n padding: 4px 0;\n }\n"])), props => props.theme.spacing(2));
|
|
34
35
|
|
|
35
36
|
function FilterChip(_ref) {
|
|
36
37
|
let {
|
|
@@ -7,12 +7,16 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
11
|
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
|
|
14
|
+
var _templateObject;
|
|
15
|
+
|
|
14
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
17
|
|
|
18
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
+
|
|
16
20
|
function FilterGroup(_ref) {
|
|
17
21
|
let {
|
|
18
22
|
options,
|
|
@@ -39,10 +43,7 @@ function FilterGroup(_ref) {
|
|
|
39
43
|
});
|
|
40
44
|
}
|
|
41
45
|
|
|
42
|
-
const StyledDiv =
|
|
43
|
-
displayName: "group__StyledDiv",
|
|
44
|
-
componentId: "sc-1lj02tr-0"
|
|
45
|
-
})([".title{font-size:18px;font-weight:bold;margin-bottom:", ";}.list{}.item{font-size:16px;padding:", ";color:#9397a1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-transform:capitalize;cursor:pointer;&:hover{background-color:", ";color:initial;font-weight:bold;}}.select{color:", ";font-weight:bold;}"], props => props.theme.spacing(1), props => props.theme.spacing(1), props => props.theme.palette.grey[50], props => props.theme.palette.primary.main);
|
|
46
|
+
const StyledDiv = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .title {\n font-size: 18px;\n font-weight: bold;\n margin-bottom: ", ";\n }\n .list {\n }\n .item {\n font-size: 16px;\n padding: ", ";\n color: #9397a1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n text-transform: capitalize;\n cursor: pointer;\n &:hover {\n background-color: ", ";\n color: initial;\n font-weight: bold;\n }\n }\n .select {\n color: ", ";\n font-weight: bold;\n }\n"])), props => props.theme.spacing(1), props => props.theme.spacing(1), props => props.theme.palette.grey[50], props => props.theme.palette.primary.main);
|
|
46
47
|
|
|
47
48
|
FilterGroup.propTypes = {
|
|
48
49
|
title: _propTypes.default.string.isRequired,
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
11
11
|
|
|
12
12
|
var _FilterAltOutlined = _interopRequireDefault(require("@mui/icons-material/FilterAltOutlined"));
|
|
13
13
|
|
|
@@ -21,8 +21,12 @@ var _group = _interopRequireDefault(require("./group"));
|
|
|
21
21
|
|
|
22
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
23
|
|
|
24
|
+
var _templateObject;
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
27
|
|
|
28
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
29
|
+
|
|
26
30
|
function FilterIcon() {
|
|
27
31
|
const {
|
|
28
32
|
selectedCategory,
|
|
@@ -85,10 +89,7 @@ function FilterIcon() {
|
|
|
85
89
|
});
|
|
86
90
|
}
|
|
87
91
|
|
|
88
|
-
const StyledDiv =
|
|
89
|
-
displayName: "icon__StyledDiv",
|
|
90
|
-
componentId: "sc-17rafy1-0"
|
|
91
|
-
})([".filter-button{margin-right:16px;border-color:rgb(240,240,240);padding:5px 8px;min-width:initial;}.filter-icon{cursor:pointer;color:", ";}"], props => props.theme.palette.grey[500]);
|
|
92
|
+
const StyledDiv = _styled.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .filter-button {\n margin-right: 16px;\n border-color: rgb(240, 240, 240);\n padding: 5px 8px;\n min-width: initial;\n }\n .filter-icon {\n cursor: pointer;\n color: ", ";\n }\n"])), props => props.theme.palette.grey[500]);
|
|
92
93
|
|
|
93
94
|
FilterIcon.propTypes = {};
|
|
94
95
|
FilterIcon.defaultProps = {};
|
|
@@ -9,7 +9,7 @@ var _react = require("react");
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
-
var
|
|
12
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
13
|
|
|
14
14
|
var _Empty = _interopRequireDefault(require("@arcblock/ux/lib/Empty"));
|
|
15
15
|
|
|
@@ -29,10 +29,14 @@ var _filter = require("../../contexts/filter");
|
|
|
29
29
|
|
|
30
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
31
31
|
|
|
32
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
33
|
+
|
|
32
34
|
const _excluded = ["blocklets"];
|
|
33
35
|
|
|
34
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
37
|
|
|
38
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
39
|
+
|
|
36
40
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
37
41
|
|
|
38
42
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -163,15 +167,6 @@ BlockletList.propTypes = {
|
|
|
163
167
|
blocklets: _propTypes.default.array.isRequired
|
|
164
168
|
};
|
|
165
169
|
BlockletList.defaultProps = {};
|
|
166
|
-
const StyledGrid = (0,
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
})(["&.MuiGrid-root{width:100%;margin:0 -16px;}"]);
|
|
170
|
-
const StyledGridItem = /*#__PURE__*/(0, _react.memo)((0, _styledComponents.default)(_Grid.default).withConfig({
|
|
171
|
-
displayName: "list__StyledGridItem",
|
|
172
|
-
componentId: "sc-1guvpon-1"
|
|
173
|
-
})(["@media (max-width:", "px){&.MuiGrid-item{padding-bottom:0px;}}@media (min-width:", "px){&.MuiGrid-item{margin-bottom:", ";}}"], props => props.theme.breakpoints.values.sm, props => props.theme.breakpoints.values.sm, props => props.theme.spacing(2)));
|
|
174
|
-
const CustomEmpty = (0, _styledComponents.default)(_Empty.default).withConfig({
|
|
175
|
-
displayName: "list__CustomEmpty",
|
|
176
|
-
componentId: "sc-1guvpon-2"
|
|
177
|
-
})(["text-align:center;.primary{color:", ";}.tips{margin-top:", ";}"], props => props.theme.palette.primary.main, props => props.theme.spacing(1));
|
|
170
|
+
const StyledGrid = (0, _styled.default)(_Grid.default)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n &.MuiGrid-root {\n width: 100%;\n margin: 0 -16px;\n }\n"])));
|
|
171
|
+
const StyledGridItem = /*#__PURE__*/(0, _react.memo)((0, _styled.default)(_Grid.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n @media (max-width: ", "px) {\n &.MuiGrid-item {\n padding-bottom: 0px;\n }\n }\n @media (min-width: ", "px) {\n &.MuiGrid-item {\n margin-bottom: ", ";\n }\n }\n"])), props => props.theme.breakpoints.values.sm, props => props.theme.breakpoints.values.sm, props => props.theme.spacing(2)));
|
|
172
|
+
const CustomEmpty = (0, _styled.default)(_Empty.default)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n text-align: center;\n .primary {\n color: ", ";\n }\n .tips {\n margin-top: ", ";\n }\n"])), props => props.theme.palette.primary.main, props => props.theme.spacing(1));
|
package/lib/components/search.js
CHANGED
|
@@ -17,16 +17,20 @@ var _material = require("@mui/material");
|
|
|
17
17
|
|
|
18
18
|
var _ahooks = require("ahooks");
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
21
21
|
|
|
22
22
|
var _filter = require("../contexts/filter");
|
|
23
23
|
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
|
|
26
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
27
|
+
|
|
26
28
|
const _excluded = ["placeholder"];
|
|
27
29
|
|
|
28
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
31
|
|
|
32
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
33
|
+
|
|
30
34
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
35
|
|
|
32
36
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -97,17 +101,8 @@ Search.propTypes = {
|
|
|
97
101
|
Search.defaultProps = {
|
|
98
102
|
placeholder: 'Type to search...'
|
|
99
103
|
};
|
|
100
|
-
const StyledSearch = (0,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
})(["background-color:#fff;font-size:14px;border-radius:6px;.MuiInputBase-input{padding:8px 0 8px 10px;}.MuiOutlinedInput-notchedOutline{border:none;}.Mui-focused{background-color:#f6f6f6;.MuiInputBase-input::placeholder{color:transparent;}}"]);
|
|
104
|
-
const StyledSearchIcon = (0, _styledComponents.default)(_Search.default).withConfig({
|
|
105
|
-
displayName: "search__StyledSearchIcon",
|
|
106
|
-
componentId: "sc-1ehlqka-1"
|
|
107
|
-
})(["color:", ";font-size:28px;@media (max-width:", "px){font-size:24px;}"], props => props.theme.palette.grey[500], props => props.theme.breakpoints.values.md);
|
|
108
|
-
const StyledCloseIcon = (0, _styledComponents.default)(_Close.default).withConfig({
|
|
109
|
-
displayName: "search__StyledCloseIcon",
|
|
110
|
-
componentId: "sc-1ehlqka-2"
|
|
111
|
-
})(["color:", ";font-size:16px;cursor:pointer;"], props => props.theme.palette.grey[500]);
|
|
104
|
+
const StyledSearch = (0, _styled.default)(_material.OutlinedInput)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n background-color: #fff;\n font-size: 14px;\n border-radius: 6px;\n .MuiInputBase-input {\n padding: 8px 0 8px 10px;\n }\n .MuiOutlinedInput-notchedOutline {\n border: none;\n }\n .Mui-focused {\n background-color: #f6f6f6;\n .MuiInputBase-input::placeholder {\n color: transparent;\n }\n }\n"])));
|
|
105
|
+
const StyledSearchIcon = (0, _styled.default)(_Search.default)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 28px;\n @media (max-width: ", "px) {\n font-size: 24px;\n }\n"])), props => props.theme.palette.grey[500], props => props.theme.breakpoints.values.md);
|
|
106
|
+
const StyledCloseIcon = (0, _styled.default)(_Close.default)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n font-size: 16px;\n cursor: pointer;\n"])), props => props.theme.palette.grey[500]);
|
|
112
107
|
var _default = Search;
|
|
113
108
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blocklet/list",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.4",
|
|
4
4
|
"description": "Common ux components of blocklet",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -34,11 +34,10 @@
|
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@mui/material": ">=5.6.4",
|
|
37
|
-
"@mui/styles": ">=5.6.2",
|
|
38
37
|
"react": ">=18.1.0"
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
41
|
-
"@arcblock/ux": "^2.
|
|
40
|
+
"@arcblock/ux": "^2.4.0",
|
|
42
41
|
"@emotion/react": "^11.10.0",
|
|
43
42
|
"@emotion/styled": "^11.10.0",
|
|
44
43
|
"@mui/icons-material": "^5.8.4",
|
|
@@ -49,7 +48,6 @@
|
|
|
49
48
|
"prop-types": "^15.8.1",
|
|
50
49
|
"react-error-boundary": "^3.1.4",
|
|
51
50
|
"react-infinite-scroll-hook": "^4.0.3",
|
|
52
|
-
"styled-components": "5.3.5",
|
|
53
51
|
"url-join": "^4.0.1"
|
|
54
52
|
},
|
|
55
53
|
"devDependencies": {
|
|
@@ -60,9 +58,8 @@
|
|
|
60
58
|
"@babel/preset-react": "^7.18.6",
|
|
61
59
|
"@emotion/babel-plugin": "^11.10.0",
|
|
62
60
|
"babel-plugin-inline-react-svg": "^2.0.1",
|
|
63
|
-
"babel-plugin-styled-components": "^1.13.3",
|
|
64
61
|
"eslint": "^8.21.0",
|
|
65
62
|
"prettier": "^2.7.1"
|
|
66
63
|
},
|
|
67
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "13e84872c589d4b967c290bb2ba6248ffc242730"
|
|
68
65
|
}
|
package/src/base.js
CHANGED
package/src/components/aside.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Button as MuiButton, CircularProgress } from '@mui/material';
|
|
4
|
-
import styled from 'styled
|
|
4
|
+
import styled from '@emotion/styled';
|
|
5
5
|
|
|
6
6
|
const StyledButton = styled(MuiButton)`
|
|
7
7
|
border-radius: 4px;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-unused-expressions */
|
|
2
2
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
|
-
import useTheme from '@mui/styles
|
|
4
|
-
import styled from 'styled
|
|
3
|
+
import { useTheme } from '@mui/material/styles';
|
|
4
|
+
import styled from '@emotion/styled';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { ClickAwayListener, Grow, MenuItem, MenuList, Paper, Popper, SvgIcon, useMediaQuery } from '@mui/material';
|
|
7
7
|
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
|
-
import styled from 'styled
|
|
2
|
+
import styled from '@emotion/styled';
|
|
3
3
|
import FilterAltOutlinedIcon from '@mui/icons-material/FilterAltOutlined';
|
|
4
4
|
import Dialog from '@arcblock/ux/lib/Dialog';
|
|
5
5
|
import Button from '@mui/material/Button';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { memo } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import styled from 'styled
|
|
3
|
+
import styled from '@emotion/styled';
|
|
4
4
|
import Empty from '@arcblock/ux/lib/Empty';
|
|
5
5
|
import Box from '@mui/material/Box';
|
|
6
6
|
import Grid from '@mui/material/Grid';
|
package/src/components/search.js
CHANGED
|
@@ -4,7 +4,7 @@ import SearchIcon from '@mui/icons-material/Search';
|
|
|
4
4
|
import CloseIcon from '@mui/icons-material/Close';
|
|
5
5
|
import { OutlinedInput, InputAdornment } from '@mui/material';
|
|
6
6
|
import { useDebounceFn } from 'ahooks';
|
|
7
|
-
import styled from 'styled
|
|
7
|
+
import styled from '@emotion/styled';
|
|
8
8
|
|
|
9
9
|
import { useFilterContext } from '../contexts/filter';
|
|
10
10
|
|