@lobehub/icons 4.0.2 → 4.0.3
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.
|
@@ -7,7 +7,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
7
7
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
8
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
9
|
import * as Icons from "../..";
|
|
10
|
-
import { Flexbox, Grid, SearchBar } from '@lobehub/ui';
|
|
10
|
+
import { Flexbox, Grid, SearchBar, TooltipGroup } from '@lobehub/ui';
|
|
11
11
|
import { Empty, Segmented } from 'antd';
|
|
12
12
|
import { cssVar } from 'antd-style';
|
|
13
13
|
import { memo, useMemo, useState } from 'react';
|
|
@@ -76,25 +76,27 @@ var Dashboard = /*#__PURE__*/memo(function () {
|
|
|
76
76
|
border: "1px solid ".concat(cssVar.colorBorder)
|
|
77
77
|
}
|
|
78
78
|
})]
|
|
79
|
-
}),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
79
|
+
}), /*#__PURE__*/_jsx(TooltipGroup, {
|
|
80
|
+
children: iconsGroup.length > 0 ? /*#__PURE__*/_jsx(Grid, {
|
|
81
|
+
maxItemWidth: 160,
|
|
82
|
+
rows: 5,
|
|
83
|
+
children: iconsGroup.map(function (_ref3) {
|
|
84
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
85
|
+
key = _ref4[0],
|
|
86
|
+
Icon = _ref4[1];
|
|
87
|
+
var IconRender = isMono ? Icon : Icon.Color || Icon;
|
|
88
|
+
return /*#__PURE__*/_jsx(IconItem, {
|
|
89
|
+
color: Icon.colorPrimary,
|
|
90
|
+
id: key,
|
|
91
|
+
title: Icon.title,
|
|
92
|
+
children: /*#__PURE__*/_jsx(IconRender, {
|
|
93
|
+
size: 56
|
|
94
|
+
})
|
|
95
|
+
}, key);
|
|
96
|
+
})
|
|
97
|
+
}) : /*#__PURE__*/_jsx(Empty, {
|
|
98
|
+
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
95
99
|
})
|
|
96
|
-
}) : /*#__PURE__*/_jsx(Empty, {
|
|
97
|
-
image: Empty.PRESENTED_IMAGE_SIMPLE
|
|
98
100
|
})]
|
|
99
101
|
});
|
|
100
102
|
});
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
var GITHUB_ICON_CDN = function GITHUB_ICON_CDN(type) {
|
|
2
|
+
return "https://raw.githubusercontent.com/lobehub/lobe-icons/refs/heads/master/packages/static-".concat(type);
|
|
3
|
+
};
|
|
1
4
|
var ALIYUN_ICON_CDN = function ALIYUN_ICON_CDN(type) {
|
|
2
5
|
return "https://registry.npmmirror.com/@lobehub/icons-static-".concat(type, "/latest/files");
|
|
3
6
|
};
|
|
@@ -13,8 +16,24 @@ export var getLobeIconCDN = function getLobeIconCDN(id, config) {
|
|
|
13
16
|
_ref$type = _ref.type,
|
|
14
17
|
type = _ref$type === void 0 ? 'color' : _ref$type,
|
|
15
18
|
_ref$cdn = _ref.cdn,
|
|
16
|
-
cdn = _ref$cdn === void 0 ? '
|
|
17
|
-
var baseUrl =
|
|
19
|
+
cdn = _ref$cdn === void 0 ? 'github' : _ref$cdn;
|
|
20
|
+
var baseUrl = '';
|
|
21
|
+
switch (cdn) {
|
|
22
|
+
case 'github':
|
|
23
|
+
{
|
|
24
|
+
baseUrl = GITHUB_ICON_CDN(format);
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
case 'unpkg':
|
|
28
|
+
{
|
|
29
|
+
baseUrl = UNPKG_ICON_CDN(format);
|
|
30
|
+
break;
|
|
31
|
+
}
|
|
32
|
+
case 'aliyun':
|
|
33
|
+
{
|
|
34
|
+
baseUrl = ALIYUN_ICON_CDN(format);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
18
37
|
var addon = type === 'mono' ? '' : "-".concat(type);
|
|
19
38
|
switch (format) {
|
|
20
39
|
case 'svg':
|