@antscorp/antsomi-ui 1.3.5-beta.536 → 1.3.5-beta.538
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/es/components/icons/CloseIcon.js +1 -4
- package/es/components/icons/ExpandMoreRightIcon.js +2 -2
- package/es/components/icons/PlaneIcon.js +1 -4
- package/es/components/icons/UserIcon.js +1 -4
- package/es/components/icons/document/IconGallery.js +17 -17
- package/es/components/icons/document/styled.js +15 -5
- package/package.json +1 -1
|
@@ -4,9 +4,6 @@ export const CloseIcon = forwardRef((props, ref) => {
|
|
|
4
4
|
const { width, height } = useIcon(props);
|
|
5
5
|
return (React.createElement("svg", Object.assign({ viewBox: "0 0 24 25", version: "1.1", id: "svg5", fill: "currentColor" }, props, { ref: ref, width: width, height: height }),
|
|
6
6
|
React.createElement("defs", { id: "defs9" }),
|
|
7
|
-
React.createElement("g", { "aria-label": "close", id: "show_chart", style: {
|
|
8
|
-
fontSize: 24,
|
|
9
|
-
fill: '#666666',
|
|
10
|
-
} },
|
|
7
|
+
React.createElement("g", { "aria-label": "close", id: "show_chart", style: { fontSize: 24 } },
|
|
11
8
|
React.createElement("path", { d: "M 18.984375,6.421875 13.40625,12 l 5.578125,5.578125 -1.40625,1.40625 L 12,13.40625 6.421875,18.984375 5.015625,17.578125 10.59375,12 5.015625,6.421875 6.421875,5.015625 12,10.59375 17.578125,5.015625 Z", id: "path826" }))));
|
|
12
9
|
});
|
|
@@ -2,6 +2,6 @@ import React, { forwardRef } from 'react';
|
|
|
2
2
|
import { useIcon } from './hooks/useIcon';
|
|
3
3
|
export const ExpandMoreRightIcon = forwardRef((props, ref) => {
|
|
4
4
|
const { width, height } = useIcon(props);
|
|
5
|
-
return (React.createElement("svg", Object.assign({ viewBox: "0 0
|
|
6
|
-
React.createElement("path", { d: "
|
|
5
|
+
return (React.createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { ref: ref, width: width, height: height }),
|
|
6
|
+
React.createElement("path", { d: "M9.67969 12L6.49219 8.8125L7.89844 7.40625L12.4922 12L7.89844 16.5938L6.49219 15.1875L9.67969 12ZM14.6953 12L11.5078 8.8125L12.9141 7.40625L17.5078 12L12.9141 16.5938L11.5078 15.1875L14.6953 12Z", fill: "currentColor" })));
|
|
7
7
|
});
|
|
@@ -4,9 +4,6 @@ export const PlaneIcon = forwardRef((props, ref) => {
|
|
|
4
4
|
const { width, height } = useIcon(props);
|
|
5
5
|
return (React.createElement("svg", Object.assign({ viewBox: "0 0 24 25", version: "1.1", id: "svg5", fill: "currentColor" }, props, { ref: ref, width: width, height: height }),
|
|
6
6
|
React.createElement("defs", { id: "defs9" }),
|
|
7
|
-
React.createElement("g", { "aria-label": "send", style: {
|
|
8
|
-
fontSize: 24,
|
|
9
|
-
fill: '#666666',
|
|
10
|
-
} },
|
|
7
|
+
React.createElement("g", { "aria-label": "send", style: { fontSize: 24 } },
|
|
11
8
|
React.createElement("path", { d: "m 2.015625,21 v -6.984375 l 15,-2.015625 -15,-2.015625 V 3 l 21,9 z", id: "path826" }))));
|
|
12
9
|
});
|
|
@@ -4,9 +4,6 @@ export const UserIcon = forwardRef((props, ref) => {
|
|
|
4
4
|
const { width, height } = useIcon(props);
|
|
5
5
|
return (React.createElement("svg", Object.assign({ viewBox: "0 0 24 25", version: "1.1", fill: "currentColor" }, props, { ref: ref, width: width, height: height }),
|
|
6
6
|
React.createElement("defs", { id: "defs9" }),
|
|
7
|
-
React.createElement("g", { "aria-label": "person", id: "show_chart", style: {
|
|
8
|
-
fontSize: 24,
|
|
9
|
-
fill: '#666666',
|
|
10
|
-
} },
|
|
7
|
+
React.createElement("g", { "aria-label": "person", id: "show_chart", style: { fontSize: 24 } },
|
|
11
8
|
React.createElement("path", { d: "m 6.703125,15.140625 q 2.765625,-1.125 5.296875,-1.125 2.53125,0 5.25,1.125 Q 20.015625,16.21875 20.015625,18 v 2.015625 H 3.984375 V 18 q 0,-1.78125 2.71875,-2.859375 z m 8.109375,-4.3125 Q 13.640625,12 12,12 10.359375,12 9.1875,10.828125 8.015625,9.65625 8.015625,8.015625 8.015625,6.375 9.1875,5.203125 10.359375,3.984375 12,3.984375 q 1.640625,0 2.8125,1.21875 1.171875,1.171875 1.171875,2.8125 0,1.640625 -1.171875,2.8125 z", id: "path826" }))));
|
|
12
9
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { message, Input } from 'antd';
|
|
3
|
-
import { Col, Row } from '../../atoms';
|
|
4
|
-
import { IconGalleryStyled } from './styled';
|
|
5
1
|
import { useDebounce } from '@antscorp/antsomi-ui/es/hooks/useDebounceV2';
|
|
2
|
+
import { ConfigProvider } from '@antscorp/antsomi-ui/es/providers';
|
|
6
3
|
import { searchStringQuery } from '@antscorp/antsomi-ui/es/utils';
|
|
4
|
+
import { message } from 'antd';
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
import { Flex, Input } from '../../index';
|
|
7
|
+
import { IconGalleryStyled } from './styled';
|
|
7
8
|
const requireContext = require.context('../', false, /\.tsx$/);
|
|
8
9
|
const icons = requireContext
|
|
9
10
|
.keys()
|
|
@@ -22,24 +23,23 @@ export const IconGallery = () => {
|
|
|
22
23
|
invalidIcons.push(iconObj);
|
|
23
24
|
return iconObj.Component;
|
|
24
25
|
});
|
|
25
|
-
return (React.createElement(
|
|
26
|
-
|
|
27
|
-
React.createElement("
|
|
28
|
-
|
|
29
|
-
React.createElement("
|
|
30
|
-
|
|
31
|
-
React.createElement(Input, { value: search, onChange: e => setSearch(e.target.value) }),
|
|
32
|
-
validIcons
|
|
26
|
+
return (React.createElement(ConfigProvider, null,
|
|
27
|
+
React.createElement(IconGalleryStyled, null,
|
|
28
|
+
invalidIcons.length > 0 ? (React.createElement("div", null,
|
|
29
|
+
React.createElement("h4", null, "These components below are invalid (check name and file name is correct?)"),
|
|
30
|
+
invalidIcons.map(item => (React.createElement("strong", { key: item.name, style: { color: 'red' } },
|
|
31
|
+
React.createElement("pre", null, item.name)))))) : null,
|
|
32
|
+
React.createElement(Input, { placeholder: "Search Icon", value: search, onChange: e => setSearch(e.target.value), style: { fontSize: '20px' } }),
|
|
33
|
+
React.createElement(Flex, { className: "grid-container", gap: 16 }, validIcons
|
|
33
34
|
.filter(item => searchStringQuery(item.name, debounceSearchValue))
|
|
34
35
|
.map(item => {
|
|
35
36
|
const { Component, name } = item;
|
|
36
|
-
return (React.createElement(
|
|
37
|
+
return (React.createElement("div", { key: name, className: "grid-item", onClick: () => {
|
|
37
38
|
const copiedText = `<${name} />`;
|
|
38
39
|
navigator.clipboard.writeText(copiedText);
|
|
39
40
|
message.success(`${copiedText} copied to clipboard 🚀`);
|
|
40
41
|
} },
|
|
41
|
-
React.createElement(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}))));
|
|
42
|
+
React.createElement(Component, null),
|
|
43
|
+
React.createElement("span", null, name)));
|
|
44
|
+
})))));
|
|
45
45
|
};
|
|
@@ -3,11 +3,17 @@ import styled from 'styled-components';
|
|
|
3
3
|
export const IconGalleryStyled = styled.div `
|
|
4
4
|
.grid-container {
|
|
5
5
|
/* NOTE: I don't know why gutter of antd Row doesn't apply for row-gap */
|
|
6
|
-
row-gap: 16px;
|
|
6
|
+
/* row-gap: 16px; */
|
|
7
|
+
margin-top: 24px;
|
|
8
|
+
flex-wrap: wrap;
|
|
7
9
|
}
|
|
8
10
|
|
|
9
11
|
.grid-item {
|
|
10
|
-
|
|
12
|
+
width: calc((100% - 16px * 4) / 5);
|
|
13
|
+
flex-grow: 0;
|
|
14
|
+
flex-shrink: 0;
|
|
15
|
+
|
|
16
|
+
padding: 32px 16px;
|
|
11
17
|
display: flex;
|
|
12
18
|
flex-direction: column;
|
|
13
19
|
justify-content: center;
|
|
@@ -16,14 +22,18 @@ export const IconGalleryStyled = styled.div `
|
|
|
16
22
|
border-radius: ${globalToken === null || globalToken === void 0 ? void 0 : globalToken.borderRadius}px;
|
|
17
23
|
|
|
18
24
|
cursor: pointer;
|
|
19
|
-
transition: all
|
|
25
|
+
transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
|
|
20
26
|
|
|
21
27
|
&:hover {
|
|
22
|
-
background-color: ${globalToken === null || globalToken === void 0 ? void 0 : globalToken.
|
|
28
|
+
background-color: ${globalToken === null || globalToken === void 0 ? void 0 : globalToken.colorPrimary};
|
|
23
29
|
|
|
30
|
+
svg {
|
|
31
|
+
transform: scale(1.2);
|
|
32
|
+
}
|
|
24
33
|
svg,
|
|
25
34
|
span {
|
|
26
|
-
transition: all
|
|
35
|
+
transition: all 0.3s ease-in-out;
|
|
36
|
+
will-change: transform;
|
|
27
37
|
fill: white;
|
|
28
38
|
color: white;
|
|
29
39
|
}
|