PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
tablepress / admin / img / toolbar-icons.jsx

toolbar-icons.jsx in TablePress – Tables in WordPress made easy 3.4, at admin/img/toolbar-icons.jsx

145 lines 7.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * JavaScript code for the icons in the toolbar on the "Edit" screen.
3 *
4 * @package TablePress
5 * @subpackage Images
6 * @author Tobias Bäthge
7 * @since 3.4.0
8 */
9
10 /**
11 * WordPress dependencies.
12 */
13 import { SVG, Path } from '@wordpress/primitives';
14
15 export const cellsMerge = (
16 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-3 -3 24 24" overflow="visible" fill="none" stroke="currentColor" strokeWidth="1.5" strokeMiterlimit="10">
17 <Path d="M6.25 17.25V.75M.75 2v14m0-4.25h5.5m0-5.5h11" fill="none"/>
18 <Path d="M.75 6.25h5.5m5.5 0V.75M17.25 2v14" fill="none"/>
19 <Path d="M16 17.25A1.25 1.25 0 0 0 17.25 16V2A1.25 1.25 0 0 0 16 .75H2A1.25 1.25 0 0 0 .75 2v14A1.25 1.25 0 0 0 2 17.25h14z" fill="none"/>
20 </SVG>
21 );
22
23 export const cut = (
24 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-2.722 -2 24 24" overflow="visible">
25 <Path d="M3.833 18.75A3.84 3.84 0 0 1 0 14.917a3.84 3.84 0 0 1 3.833-3.834 3.84 3.84 0 0 1 3.833 3.834 3.84 3.84 0 0 1-3.833 3.833zm0-6.167c-1.287 0-2.333 1.047-2.333 2.334s1.047 2.333 2.333 2.333 2.333-1.047 2.333-2.333-1.046-2.334-2.333-2.334z"/>
26 <Path d="M8.629 11.276l1.299.75-2.776 4.807-1.299-.75zm2.261 3.641a3.84 3.84 0 0 1 3.834-3.834 3.84 3.84 0 0 1 3.833 3.834 3.84 3.84 0 0 1-3.833 3.833 3.84 3.84 0 0 1-3.834-3.833zm1.5 0c0 1.286 1.047 2.333 2.334 2.333s2.333-1.047 2.333-2.333a2.34 2.34 0 0 0-2.333-2.334 2.34 2.34 0 0 0-2.334 2.334z"/>
27 <Path d="M12.703 16.083l-1.299.75-2.776-4.807 1.299-.75z"/>
28 <Path d="M14.85 0v4l-4.705 8.15-1.733-1z"/>
29 <Path d="M3.707 0v4l4.705 8.15 1.733-1z"/>
30 </SVG>
31 );
32
33 export const formatting = (
34 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-2.15 -4 24 24" overflow="visible">
35 <Path d="M0 14.598L4.45 2.275l1.884.05 4.379 12.27H8.864l-1.08-3.17-4.785-.05-1.22 3.27L0 14.598zm3.469-4.683H7.13L5.3 4.668 3.469 9.915zm16.848 3.655l-.378.27c-.286.199-.934.306-.934-.736l-.019-5.66c0-1.24-.359-2.605-2.03-2.911s-2.965.108-3.54.396-1.491 1.042-1.258 1.904.772.971 1.204.971 1.168-.252 1.168-1.186c0-.791-.719-1.114-.719-1.114.126-.323 1.006-.683 1.743-.611.935.091 1.401.791 1.401 1.563v1.581c0 .629-1.33 1.097-2.462 1.42-.837.239-1.936.711-2.443 1.474-.575.862-.521 2.677.719 3.324.989.515 2.071.412 2.893-.019.576-.302.972-.766 1.312-1.239 0 0-.035 1.275.988 1.509 1.254.286 2.156-.27 2.57-.61l-.215-.326zm-3.36-1.401c-.216.449-.898 1.51-1.851 1.51s-1.438-.772-1.438-1.617.557-1.6 1.474-2.066 1.635-.755 1.814-1.024v3.197z"/>
36 </SVG>
37 );
38
39 export const insertColumn = (
40 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible" fill="currentColor">
41 <Path d="M14.5 0H16v16h-1.5zM0 0h1.5v16H0zm12.03 1.061l-3.5 3.5-.53.53-.53-.53-3.5-3.5L5.03 0 8 2.97 10.97 0z"/>
42 </SVG>
43 );
44
45 export const insertColumnBefore = (
46 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-0.65 -4 24 24" overflow="visible" fill="currentColor">
47 <Path d="M10.6 0h1.5v16h-1.5zM7 0L4 3 1 0 0 1l4 4 4-4z"/>
48 </SVG>
49 );
50
51 export const insertColumnAfter = (
52 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible" fill="currentColor">
53 <Path d="M7.25 0h1.5v16h-1.5zm4.1 1l4 4 4-4-1-1-3 3-3-3z"/>
54 </SVG>
55 );
56
57 export const insertRow = (
58 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible" fill="currentColor">
59 <Path d="M0 0h16v1.5H0zm0 14.5h16V16H0zM1.061 3.97l3.5 3.5.53.53-.53.53-3.5 3.5L0 10.97 2.97 8 0 5.03z"/>
60 </SVG>
61 );
62
63 export const insertRowBefore = (
64 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible" fill="currentColor">
65 <Path d="M0 12.05h16v1.5H0zm1-2.6l4-4-4-4-1 1 3 3-3 3z"/>
66 </SVG>
67 );
68
69 export const insertRowAfter = (
70 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible" fill="currentColor">
71 <Path d="M0 2.45h16v1.5H0zm0 5.1l3 3-3 3 1 1 4-4-4-4z"/>
72 </SVG>
73 );
74
75 export const moveFirst = (
76 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-3.599 -4 24 24" overflow="visible" fill="none" stroke="currentColor">
77 <Path d="M10.514 2.5l-5 5.5 5 5.5m-4.5-11l-5 5.5 5 5.5" strokeWidth="1.5" fill="none"/>
78 <Path strokeWidth="1.6" d="M5.514 8h10.887" fill="none"/>
79 </SVG>
80 );
81
82 export const moveLast = (
83 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible" fill="none" stroke="currentColor">
84 <Path d="M5.888 13.5l5-5.5-5-5.5m4.5 11l5-5.5-5-5.5" strokeWidth="1.5" fill="none"/>
85 <Path strokeWidth="1.6" d="M10.888 8H0" fill="none"/>
86 </SVG>
87 );
88
89 export const moveLeftRight = (
90 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-3.9 -3.843 24 24" overflow="visible" fill="currentColor">
91 <Path d="M4.725 9.281l1.008-1.008L2.899 5.44h13.2v-1.6h-13.2l2.833-2.833L4.725 0 0 4.641l4.725 4.64zm6.75-2.248L10.467 8.04l2.833 2.833H.1v1.6h13.2l-2.833 2.834 1.008 1.008 4.725-4.641-4.725-4.641z"/>
92 </SVG>
93 );
94
95 export const moveTop = (
96 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -3.599 24 24" overflow="visible" fill="none" stroke="currentColor">
97 <Path d="M13.5 10.514l-5.5-5-5.5 5m11-4.5l-5.5-5-5.5 5" strokeWidth="1.5" fill="none"/>
98 <Path strokeWidth="1.6" d="M8 5.514v10.887" fill="none"/>
99 </SVG>
100 );
101
102 export const moveBottom = (
103 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible" fill="none" stroke="currentColor">
104 <Path d="M2.5 5.888l5.5 5 5.5-5m-11 4.5l5.5 5 5.5-5" strokeWidth="1.5" fill="none"/>
105 <Path strokeWidth="1.6" d="M8 10.888V0" fill="none"/>
106 </SVG>
107 );
108
109 export const moveUpDown = (
110 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-3.843 -3.9 24 24" overflow="visible" fill="currentColor">
111 <Path d="M4.641 0L0 4.725l1.008 1.008L3.841 2.9v13.2h1.6V2.9l2.833 2.833 1.008-1.008L4.641 0zm7.033 16.199l4.641-4.725-1.008-1.008-2.834 2.834V.1h-1.6v13.2L8.04 10.467l-1.007 1.008 4.641 4.724z"/>
112 </SVG>
113 );
114
115 export const paste = (
116 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-3.25 -1.75 24 24" overflow="visible">
117 <Path d="M11.75 3.75h3.75a.5.5 0 0 1 .5.5v13.5a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5V4.25a.5.5 0 0 1 .5-.5h3.75v-1.5H2a2 2 0 0 0-2 2v13.5a2 2 0 0 0 2 2h13.5a2 2 0 0 0 2-2V4.25a2 2 0 0 0-2-2h-3.75v1.5z"/>
118 <Path d="M11.25 0h-5a2 2 0 0 0-2 2v4h9V2a2 2 0 0 0-2-2zm-2.5 4.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 1 1 0 3z"/>
119 </SVG>
120 );
121
122 export const row = (
123 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-3.5 -5.5 24 24" overflow="visible">
124 <Path d="M15 0H2C.9 0 0 .9 0 2v9c0 1.1.9 2 2 2h13c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm.5 11a.47.47 0 0 1-.5.5H2a.47.47 0 0 1-.5-.5V9h14v2zm0-7h-14V2a.47.47 0 0 1 .5-.5h13a.47.47 0 0 1 .5.5v2z"/>
125 </SVG>
126 );
127
128 export const sort = (
129 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -2.4 24 24" overflow="visible">
130 <Path fill="none" stroke="currentColor" strokeWidth="1.5" strokeMiterlimit="10" d="M8 1.5l3.521 6.1H4.479zm0 16.2l-3.521-6.1h7.042z"/>
131 </SVG>
132 );
133
134 export const sortAsc = (
135 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible">
136 <Path fill="none" stroke="currentColor" strokeWidth="1.5" strokeMiterlimit="10" d="M8 2.325l5.976 10.35H2.024z"/>
137 </SVG>
138 );
139
140 export const sortDesc = (
141 <SVG xmlns="http://www.w3.org/2000/svg" viewBox="-4 -4 24 24" overflow="visible">
142 <Path fill="none" stroke="currentColor" strokeWidth="1.5" strokeMiterlimit="10" d="M8 13.675L2.024 3.325h11.952z"/>
143 </SVG>
144 );
145