itmar-block-packages 1.0.0 → 1.0.1
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/babel.config.js +16 -0
- package/build/index.asset.php +1 -0
- package/build/index.js +20 -0
- package/package.json +7 -2
- package/src/Arrow.js +35 -0
- package/src/DraggableBox.js +55 -0
- package/src/PseudoElm.js +21 -0
- package/{ShadowStyle.js → src/ShadowCtrl.js} +3 -236
- package/src/ShadowElm.js +235 -0
- package/src/draggingFook.js +88 -0
- package/{index.js → src/index.js} +18 -15
- package/src/mediaUpload.js +70 -0
- package/webpack.config.js +28 -0
- package/DraggableBox.js +0 -139
- package/mediaUpload.js +0 -90
- package/pseudo.js +0 -55
- /package/{BlockEditWrapper.js → src/BlockEditWrapper.js} +0 -0
- /package/{cssPropertes.js → src/cssPropertes.js} +0 -0
- /package/{customFooks.js → src/customFooks.js} +0 -0
- /package/{hslToRgb.js → src/hslToRgb.js} +0 -0
package/pseudo.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { css } from 'styled-components';
|
|
3
|
-
import {
|
|
4
|
-
RadioControl
|
|
5
|
-
} from '@wordpress/components';
|
|
6
|
-
|
|
7
|
-
// 矢印の向きに応じたスタイルを生成するヘルパー関数
|
|
8
|
-
const arrowDirectionStyles = (direction) => {
|
|
9
|
-
switch (direction) {
|
|
10
|
-
case 'left':
|
|
11
|
-
return 'transform: translate(-50%, -50%) rotate(-135deg);';
|
|
12
|
-
case 'right':
|
|
13
|
-
return 'transform: translate(-50%, -50%) rotate(45deg);';
|
|
14
|
-
case 'upper':
|
|
15
|
-
return 'transform: translate(-50%, -50%) rotate(-45deg);';
|
|
16
|
-
case 'under':
|
|
17
|
-
return 'transform: translate(-50%, -50%) rotate(135deg);';
|
|
18
|
-
default:
|
|
19
|
-
return 'transform: translate(-50%, -50%) rotate(45deg);'; // default to 'down'
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// 矢印のスタイルを適用するコンポーネント
|
|
24
|
-
export const Arrow = ({ direction = 'down' }) => css`
|
|
25
|
-
&::after {
|
|
26
|
-
content: "";
|
|
27
|
-
position: absolute;
|
|
28
|
-
display: block;
|
|
29
|
-
width: 15%;
|
|
30
|
-
height: 15%;
|
|
31
|
-
border-top: 3px solid var(--wp--preset--color--accent-2);
|
|
32
|
-
border-right: 3px solid var(--wp--preset--color--accent-2);
|
|
33
|
-
top: 50%;
|
|
34
|
-
left: 50%;
|
|
35
|
-
${arrowDirectionStyles(direction)}
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
|
|
39
|
-
//擬似要素の出力を選択させるインスペクターコントロール
|
|
40
|
-
const PseudoElm = ({ direction, onChange }) => {
|
|
41
|
-
return (
|
|
42
|
-
<RadioControl
|
|
43
|
-
selected={direction}
|
|
44
|
-
options={[
|
|
45
|
-
{ label: __("Upper", 'itmar_block_collections'), value: 'upper' },
|
|
46
|
-
{ label: __("Left", 'itmar_block_collections'), value: 'left' },
|
|
47
|
-
{ label: __("Right", 'itmar_block_collections'), value: 'right' },
|
|
48
|
-
{ label: __("Under", 'itmar_block_collections'), value: 'under' },
|
|
49
|
-
]}
|
|
50
|
-
onChange={(changeOption) => { onChange(changeOption) }
|
|
51
|
-
}
|
|
52
|
-
/>
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
export default PseudoElm;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|