@times-design-system/components-wordpress 1.8.0 → 1.8.1-alpha.0
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 +3 -0
- package/dist/blocks/button/block.json +2 -2
- package/dist/blocks/button/render.php +10 -10
- package/dist/blocks/chip/block.json +4 -2
- package/dist/blocks/flag/block.json +4 -2
- package/dist/blocks/icon/block.json +1 -1
- package/dist/blocks/icon/render.php +1 -1
- package/dist/blocks/icon-button/block.json +2 -1
- package/dist/blocks/link/block.json +4 -2
- package/dist/icon-data.json +3895 -1952
- package/dist/index.cjs +16 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/dist/utils/render-icon.php +32 -6
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -846,9 +846,12 @@ Then follow the [BLOCK_CREATION_CHECKLIST.md](./BLOCK_CREATION_CHECKLIST.md) whi
|
|
|
846
846
|
|
|
847
847
|
For detailed context on component patterns, see [TRANSFORMATION_GUIDE.md](./TRANSFORMATION_GUIDE.md).
|
|
848
848
|
|
|
849
|
+
For icon handling in blocks (variants, extraction, color transformation), see [ICON_HANDLING.md](./ICON_HANDLING.md).
|
|
850
|
+
|
|
849
851
|
## Resources
|
|
850
852
|
|
|
851
853
|
- [Complete Transformation Guide](./TRANSFORMATION_GUIDE.md) — Detailed step-by-step process
|
|
854
|
+
- [Icon Handling Guide](./ICON_HANDLING.md) — Icons, variants, color theming
|
|
852
855
|
- [Block Creation Checklist](./BLOCK_CREATION_CHECKLIST.md) — Quality assurance checklist
|
|
853
856
|
- [WordPress Blocks Documentation](https://developer.wordpress.org/block-editor/)
|
|
854
857
|
- [Gutenberg Block API](https://developer.wordpress.org/block-editor/reference-guides/block-api/)
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
},
|
|
78
78
|
"iconLeft": {
|
|
79
79
|
"type": "string",
|
|
80
|
-
"description": "Icon
|
|
80
|
+
"description": "Icon on the left with variant prefix (e.g., 'filled_circle', 'outlined_circle')"
|
|
81
81
|
},
|
|
82
82
|
"iconRight": {
|
|
83
83
|
"type": "string",
|
|
84
|
-
"description": "Icon
|
|
84
|
+
"description": "Icon on the right with variant prefix (e.g., 'filled_circle', 'outlined_circle')"
|
|
85
85
|
},
|
|
86
86
|
"ariaLabel": {
|
|
87
87
|
"type": "string",
|
|
@@ -83,11 +83,11 @@ $wrapper_attrs = get_block_wrapper_attributes(['class' => 'tds-button-wrapper'])
|
|
|
83
83
|
>
|
|
84
84
|
<span class="tds-button__label-container">
|
|
85
85
|
<?php if ($icon_left) : ?>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
<span class="tds-button__icon tds-button__icon--left"><?php echo wp_kses_post(tds_render_icon($icon_left, $icon_size)); ?></span>
|
|
87
|
+
<?php endif; ?>
|
|
88
|
+
<span class="tds-button__label"><?php echo wp_kses_post($label); ?></span>
|
|
89
|
+
<?php if ($icon_right) : ?>
|
|
90
|
+
<span class="tds-button__icon tds-button__icon--right"><?php echo wp_kses_post(tds_render_icon($icon_right, $icon_size)); ?></span>
|
|
91
91
|
<?php endif; ?>
|
|
92
92
|
</span>
|
|
93
93
|
</a>
|
|
@@ -103,11 +103,11 @@ $wrapper_attrs = get_block_wrapper_attributes(['class' => 'tds-button-wrapper'])
|
|
|
103
103
|
>
|
|
104
104
|
<span class="tds-button__label-container">
|
|
105
105
|
<?php if ($icon_left) : ?>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
<span class="tds-button__icon tds-button__icon--left"><?php echo wp_kses_post(tds_render_icon($icon_left, $icon_size)); ?></span>
|
|
107
|
+
<?php endif; ?>
|
|
108
|
+
<span class="tds-button__label"><?php echo wp_kses_post($label); ?></span>
|
|
109
|
+
<?php if ($icon_right) : ?>
|
|
110
|
+
<span class="tds-button__icon tds-button__icon--right"><?php echo wp_kses_post(tds_render_icon($icon_right, $icon_size)); ?></span>
|
|
111
111
|
<?php endif; ?>
|
|
112
112
|
</span>
|
|
113
113
|
</button>
|
|
@@ -38,11 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"iconLeft": {
|
|
40
40
|
"type": "string",
|
|
41
|
-
"default": ""
|
|
41
|
+
"default": "",
|
|
42
|
+
"description": "Icon on the left with variant prefix (e.g., 'filled_circle')"
|
|
42
43
|
},
|
|
43
44
|
"iconRight": {
|
|
44
45
|
"type": "string",
|
|
45
|
-
"default": ""
|
|
46
|
+
"default": "",
|
|
47
|
+
"description": "Icon on the right with variant prefix (e.g., 'outlined_circle')"
|
|
46
48
|
},
|
|
47
49
|
"ariaLabel": {
|
|
48
50
|
"type": "string",
|
|
@@ -34,11 +34,13 @@
|
|
|
34
34
|
},
|
|
35
35
|
"iconLeft": {
|
|
36
36
|
"type": "string",
|
|
37
|
-
"default": ""
|
|
37
|
+
"default": "",
|
|
38
|
+
"description": "Icon on the left with variant prefix (e.g., 'filled_check')"
|
|
38
39
|
},
|
|
39
40
|
"iconRight": {
|
|
40
41
|
"type": "string",
|
|
41
|
-
"default": ""
|
|
42
|
+
"default": "",
|
|
43
|
+
"description": "Icon on the right with variant prefix (e.g., 'outlined_check')"
|
|
42
44
|
},
|
|
43
45
|
"ariaLabel": {
|
|
44
46
|
"type": "string",
|
|
@@ -33,7 +33,7 @@ if ($classes) {
|
|
|
33
33
|
$wrapper_class = implode(' ', $wrapper_classes);
|
|
34
34
|
$wrapper_attrs = get_block_wrapper_attributes(['class' => $wrapper_class]);
|
|
35
35
|
|
|
36
|
-
// Render icon
|
|
36
|
+
// Render icon (icon name includes variant: filled_circle, outlined_circle, etc.)
|
|
37
37
|
$svg_content = tds_render_icon($icon_name, $size);
|
|
38
38
|
?>
|
|
39
39
|
|
|
@@ -39,11 +39,13 @@
|
|
|
39
39
|
},
|
|
40
40
|
"iconLeft": {
|
|
41
41
|
"type": "string",
|
|
42
|
-
"default": ""
|
|
42
|
+
"default": "",
|
|
43
|
+
"description": "Icon on the left with variant prefix (e.g., 'filled_external-link')"
|
|
43
44
|
},
|
|
44
45
|
"iconRight": {
|
|
45
46
|
"type": "string",
|
|
46
|
-
"default": ""
|
|
47
|
+
"default": "",
|
|
48
|
+
"description": "Icon on the right with variant prefix (e.g., 'outlined_external-link')"
|
|
47
49
|
},
|
|
48
50
|
"inline": {
|
|
49
51
|
"type": "boolean",
|