itmar-block-packages 1.6.0 → 1.6.2

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.
Files changed (29) hide show
  1. package/README.md +2 -0
  2. package/build/index.asset.php +1 -1
  3. package/build/index.js +3 -3
  4. package/languages/itmar-block-packages-ja-2e59d6ebc088ea4b3d475a06e1e94824.json +1 -0
  5. package/languages/itmar-block-packages-ja-314423d5ad20380dc5fb85a96050381e.json +1 -0
  6. package/languages/itmar-block-packages-ja-3e946be5d900b4a727047c8a51bb058e.json +1 -0
  7. package/languages/itmar-block-packages-ja-5f1760422a0125b48fdcca644f4db89f.json +1 -0
  8. package/languages/itmar-block-packages-ja-800102e626a7ce0305d324a5bb0ee61e.json +1 -0
  9. package/languages/itmar-block-packages-ja-865f209aff5ee1f8efb51f6a62e8d8e1.json +1 -0
  10. package/languages/itmar-block-packages-ja-88eb778e4da0e010ceace8232ab1a901.json +1 -0
  11. package/languages/itmar-block-packages-ja-a418e2f5e97a053f5e0785a30f28b854.json +1 -0
  12. package/languages/itmar-block-packages-ja-ce2d14d174f0af0f13cd9a1302cebdd7.json +1 -0
  13. package/languages/itmar-block-packages-ja-f55909920e3bd84845271a62dbfb8dfe.json +1 -0
  14. package/languages/itmar-block-packages-ja-f6bd3c69ad85ee9ae9f1315af8f44e4a.json +1 -0
  15. package/languages/itmar-block-packages-ja.mo +0 -0
  16. package/languages/itmar-block-packages-ja.po +1485 -0
  17. package/languages/itmar-block-packages.pot +530 -0
  18. package/package.json +1 -1
  19. package/src/AnimationBlock.js +8 -8
  20. package/src/BlockPlace.js +76 -62
  21. package/src/DateElm.js +7 -7
  22. package/src/DraggableBox.js +4 -4
  23. package/src/GridControls.js +9 -9
  24. package/src/IconSelectControl.js +70 -30
  25. package/src/ShadowStyle.js +215 -158
  26. package/src/TypographyControls.js +62 -30
  27. package/src/ZipAddress.js +3 -3
  28. package/src/customFooks.js +1 -1
  29. package/src/wordpressApi.js +9 -9
@@ -22,17 +22,22 @@ const helpTextCode = createElement(
22
22
  helpLink,
23
23
  __(
24
24
  "Select the icon from and enter Unicode (the upper right four digits of the selection dialog). ",
25
- "block-collections"
25
+ "itmar-block-packages"
26
26
  )
27
27
  );
28
28
 
29
+ const helpImageURL = createElement(
30
+ "span",
31
+ {},
32
+ __("Enter the URL for the image.", "itmar-block-packages")
33
+ );
34
+
29
35
  const helpTextFamily = createElement(
30
36
  "span",
31
37
  {},
32
- helpLink,
33
38
  __(
34
39
  "Please select the first class name shown in the HTML code field of the selection dialog. ",
35
- "block-collections"
40
+ "itmar-block-packages"
36
41
  )
37
42
  );
38
43
 
@@ -49,6 +54,8 @@ const family_option = [
49
54
 
50
55
  export default ({ iconStyle, setPosition, onChange }) => {
51
56
  const {
57
+ icon_type,
58
+ icon_url,
52
59
  icon_name,
53
60
  icon_pos,
54
61
  icon_size,
@@ -59,29 +66,62 @@ export default ({ iconStyle, setPosition, onChange }) => {
59
66
 
60
67
  return (
61
68
  <>
62
- <TextControl
63
- label={__("icon name", "block-collections")}
64
- help={helpTextCode}
65
- labelPosition="top"
66
- value={icon_name}
67
- isPressEnterToChange
68
- onChange={(newValue) => {
69
- const newStyle = { ...iconStyle, icon_name: newValue };
70
- onChange(newStyle);
71
- }}
72
- />
73
-
74
- <ComboboxControl
75
- label={__("Icon Family", "block-collections")}
76
- help={helpTextFamily}
77
- options={family_option}
78
- value={icon_family ? icon_family : "Font Awesome 6 Free"}
79
- onChange={(newValue) => {
80
- const newStyle = { ...iconStyle, icon_family: newValue };
81
- onChange(newStyle);
82
- }}
83
- />
69
+ <label className="components-base-control__label">
70
+ {__("Icon Types", "itmar-block-packages")}
71
+ </label>
72
+ <PanelRow className="itmar_position_row">
73
+ <RadioControl
74
+ selected={icon_type}
75
+ options={[
76
+ { label: __("Awesome", "itmar-block-packages"), value: "awesome" },
77
+ { label: __("Image", "itmar-block-packages"), value: "image" },
78
+ { label: __("Avatar", "itmar-block-packages"), value: "avatar" },
79
+ ]}
80
+ onChange={(newValue) => {
81
+ const newStyle = { ...iconStyle, icon_type: newValue };
82
+ onChange(newStyle);
83
+ }}
84
+ />
85
+ </PanelRow>
86
+ {icon_type === "awesome" && (
87
+ <>
88
+ <TextControl
89
+ label={__("icon name", "itmar-block-packages")}
90
+ help={helpTextCode}
91
+ labelPosition="top"
92
+ value={icon_name}
93
+ isPressEnterToChange
94
+ onChange={(newValue) => {
95
+ const newStyle = { ...iconStyle, icon_name: newValue };
96
+ onChange(newStyle);
97
+ }}
98
+ />
84
99
 
100
+ <ComboboxControl
101
+ label={__("Icon Family", "itmar-block-packages")}
102
+ help={helpTextFamily}
103
+ options={family_option}
104
+ value={icon_family ? icon_family : "Font Awesome 6 Free"}
105
+ onChange={(newValue) => {
106
+ const newStyle = { ...iconStyle, icon_family: newValue };
107
+ onChange(newStyle);
108
+ }}
109
+ />
110
+ </>
111
+ )}
112
+ {icon_type === "image" && (
113
+ <TextControl
114
+ label={__("icon url", "itmar-block-packages")}
115
+ help={helpImageURL}
116
+ labelPosition="top"
117
+ value={icon_url}
118
+ isPressEnterToChange
119
+ onChange={(newValue) => {
120
+ const newStyle = { ...iconStyle, icon_url: newValue };
121
+ onChange(newStyle);
122
+ }}
123
+ />
124
+ )}
85
125
  <PanelRow className="sizing_row">
86
126
  <UnitControl
87
127
  dragDirection="e"
@@ -89,7 +129,7 @@ export default ({ iconStyle, setPosition, onChange }) => {
89
129
  const newStyle = { ...iconStyle, icon_size: newValue };
90
130
  onChange(newStyle);
91
131
  }}
92
- label={__("Size", "block-collections")}
132
+ label={__("Size", "itmar-block-packages")}
93
133
  value={icon_size}
94
134
  units={units}
95
135
  />
@@ -100,7 +140,7 @@ export default ({ iconStyle, setPosition, onChange }) => {
100
140
  const newStyle = { ...iconStyle, icon_space: newValue };
101
141
  onChange(newStyle);
102
142
  }}
103
- label={__("spacing to end", "block-collections")}
143
+ label={__("spacing to end", "itmar-block-packages")}
104
144
  value={icon_space}
105
145
  units={units}
106
146
  />
@@ -124,14 +164,14 @@ export default ({ iconStyle, setPosition, onChange }) => {
124
164
  {setPosition && (
125
165
  <>
126
166
  <label className="components-base-control__label">
127
- {__("Arrangement", "block-collections")}
167
+ {__("Arrangement", "itmar-block-packages")}
128
168
  </label>
129
169
  <PanelRow className="itmar_position_row">
130
170
  <RadioControl
131
171
  selected={icon_pos}
132
172
  options={[
133
- { label: __("left", "block-collections"), value: "left" },
134
- { label: __("right", "block-collections"), value: "right" },
173
+ { label: __("left", "itmar-block-packages"), value: "left" },
174
+ { label: __("right", "itmar-block-packages"), value: "right" },
135
175
  ]}
136
176
  onChange={(newValue) => {
137
177
  const newStyle = { ...iconStyle, icon_pos: newValue };