itmar-block-packages 1.3.10 → 1.3.12
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/README.md +39 -8
- package/build/index.asset.php +1 -1
- package/build/index.js +2 -2
- package/package.json +1 -1
- package/src/BlockPlace.js +103 -80
- package/src/cssPropertes.js +26 -6
package/README.md
CHANGED
|
@@ -14,6 +14,14 @@ import {関数名又はコンポーネント名} from "itmar-block-packages"
|
|
|
14
14
|
npm i @wordpress/scripts@^27.6.0 --save-dev
|
|
15
15
|
|
|
16
16
|
## 更新履歴
|
|
17
|
+
= 1.3.12 =
|
|
18
|
+
- BlockPlaceの配置タイプが絶対位置の場合に縦横の中央揃えが設定できる機能を追加
|
|
19
|
+
- 中央揃えができるようにしたために、position_prmにそれに対応するCSSプロパティを返す機能を追加
|
|
20
|
+
|
|
21
|
+
= 1.3.11 =
|
|
22
|
+
- BlockPlace、BlockWidth、BlockHeightのfreeサイズにpx以外の単位を設定できるように修正
|
|
23
|
+
- freeサイズにpx以外の単位を設定できるようにしたことから、max_width_prm、width_prm、height_prmがそれに対応できるように修正
|
|
24
|
+
|
|
17
25
|
= 1.3.10 =
|
|
18
26
|
- useDuplicateBlockRemoveの不具合を修正。
|
|
19
27
|
- ブロックの幅、高さを設定するためのコンポーネントとしてBlockWidth、BlockHeightを追加
|
|
@@ -155,6 +163,29 @@ marginやpaddingに設定するプロパティを文字列で返します。
|
|
|
155
163
|
#### 引数
|
|
156
164
|
- `space` object
|
|
157
165
|
top,right,bottom,leftをキーとしてもつオブジェクト
|
|
166
|
+
|
|
167
|
+
### position_prm
|
|
168
|
+
絶対位置のポジションに関するCSSを返します。
|
|
169
|
+
#### 引数
|
|
170
|
+
- `pos` object,boolean
|
|
171
|
+
次の形式のオブジェクト又はboolean
|
|
172
|
+
```
|
|
173
|
+
"posValue": {
|
|
174
|
+
"vertBase": "top",
|
|
175
|
+
"horBase": "left",
|
|
176
|
+
"vertValue": "3em",
|
|
177
|
+
"horValue": "3em",
|
|
178
|
+
"isVertCenter": false,
|
|
179
|
+
"isHorCenter": false
|
|
180
|
+
},
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
- `type` string
|
|
184
|
+
staic, relative,absolute,fixed,stickyのいづれか
|
|
185
|
+
|
|
186
|
+
#### 戻り値
|
|
187
|
+
- typeがabsolute,fixed,stickyのときposの値に応じてtop,buttom,left,rightのcssプロパティを返す。 pos内の中央揃えのフラグがオンならtransformのcssプロパティも返す。
|
|
188
|
+
- posがtrueのとき`top:50%;left: 50%;transform: translate(-50%, -50%);`を返す。
|
|
158
189
|
|
|
159
190
|
|
|
160
191
|
### max_width_prm
|
|
@@ -162,12 +193,12 @@ top,right,bottom,leftをキーとしてもつオブジェクト
|
|
|
162
193
|
#### 引数
|
|
163
194
|
- `width` string
|
|
164
195
|
wideSize,contentSize,free,fullの文字列
|
|
165
|
-
- `free_val`
|
|
196
|
+
- `free_val` string
|
|
166
197
|
px値
|
|
167
198
|
#### 戻り値
|
|
168
199
|
- wideSizeのとき`width: 100%; max-width: var(--wp--style--global--wide-size);`
|
|
169
200
|
- contentSizeのとき`width: 100%; max-width: var(--wp--style--global--content-size);`
|
|
170
|
-
- freeのとき`width: 100%; max-width: ${free_val}
|
|
201
|
+
- freeのとき`width: 100%; max-width: ${free_val};`
|
|
171
202
|
- fullのとき`width: 100%; max-width: 100%;`
|
|
172
203
|
- その他の文字列`width: fit-content;`
|
|
173
204
|
|
|
@@ -177,12 +208,12 @@ widthのCSSを返します。
|
|
|
177
208
|
#### 引数
|
|
178
209
|
- `width` string
|
|
179
210
|
wideSize,contentSize,freeの文字列
|
|
180
|
-
- `free_val`
|
|
211
|
+
- `free_val` string
|
|
181
212
|
px値
|
|
182
213
|
#### 戻り値
|
|
183
214
|
- wideSizeのとき`width: var(--wp--style--global--wide-size);`
|
|
184
215
|
- contentSizeのとき`width: var(--wp--style--global--content-size);`
|
|
185
|
-
- freeのとき`width: ${free_val}
|
|
216
|
+
- freeのとき`width: ${free_val};`
|
|
186
217
|
- その他の文字列`width: fit-content;`
|
|
187
218
|
|
|
188
219
|
|
|
@@ -191,11 +222,11 @@ heightのCSSを返します。
|
|
|
191
222
|
#### 引数
|
|
192
223
|
- `height` string
|
|
193
224
|
fit, full, freeの文字列
|
|
194
|
-
- `free_val`
|
|
225
|
+
- `free_val` string
|
|
195
226
|
px値
|
|
196
227
|
#### 戻り値
|
|
197
228
|
- fitのとき`height: fit-content;`
|
|
198
|
-
- freeのとき`height: ${free_val}
|
|
229
|
+
- freeのとき`height: ${free_val};`
|
|
199
230
|
- その他の文字列`height: 100%;`
|
|
200
231
|
|
|
201
232
|
|
|
@@ -668,7 +699,7 @@ trueの場合はmax-widthを合わせて設定する
|
|
|
668
699
|
- `onWidthChange` function
|
|
669
700
|
widthの種別を設定するためのコールバック関数。返ってくる引数はfit,full,wideSize,contentSize,free
|
|
670
701
|
- `onFreeWidthChange` function
|
|
671
|
-
widthの種別がfree
|
|
702
|
+
widthの種別がfreeのとき幅を設定するためのコールバック関数。返ってくる引数は単位付きの文字列
|
|
672
703
|
|
|
673
704
|
```
|
|
674
705
|
<BlockWidth
|
|
@@ -702,7 +733,7 @@ widthの種別がfreeのとき幅を設定するためのコールバック関
|
|
|
702
733
|
- `onHeightChange` function
|
|
703
734
|
heightの種別を設定するためのコールバック関数。返ってくる引数はfit,full,free
|
|
704
735
|
- `onFreeHeightChange` function
|
|
705
|
-
heightの種別がfree
|
|
736
|
+
heightの種別がfreeのとき幅を設定するためのコールバック関数。返ってくる引数は単位付きの文字列
|
|
706
737
|
|
|
707
738
|
```
|
|
708
739
|
<BlockHeight
|
package/build/index.asset.php
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array('react', 'react-dom', 'wp-api-fetch', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => '871bd3daa44700fd87b5');
|