@times-design-system/components-wordpress 1.5.3 → 1.7.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.
Files changed (175) hide show
  1. package/dist/blocks/ad-container/block.json +10 -0
  2. package/dist/blocks/ad-container/edit.js +17 -1
  3. package/dist/blocks/ad-container/render.php +14 -0
  4. package/dist/blocks/button/block.json +19 -5
  5. package/dist/blocks/button/edit.js +33 -15
  6. package/dist/blocks/button/render.php +38 -2
  7. package/dist/blocks/button/style.css +63 -0
  8. package/dist/blocks/chip/block.json +12 -7
  9. package/dist/blocks/chip/edit.js +20 -17
  10. package/dist/blocks/chip/render.php +25 -3
  11. package/dist/blocks/dialog-box/block.json +10 -0
  12. package/dist/blocks/dialog-box/edit.js +17 -0
  13. package/dist/blocks/dialog-box/render.php +18 -7
  14. package/dist/blocks/divider/block.json +10 -0
  15. package/dist/blocks/divider/edit.js +18 -2
  16. package/dist/blocks/divider/render.php +14 -1
  17. package/dist/blocks/flag/block.json +10 -0
  18. package/dist/blocks/flag/edit.js +27 -2
  19. package/dist/blocks/flag/render.php +25 -1
  20. package/dist/blocks/icon/block.json +10 -0
  21. package/dist/blocks/icon/edit.js +17 -0
  22. package/dist/blocks/icon/render.php +19 -8
  23. package/dist/blocks/icon-button/block.json +15 -0
  24. package/dist/blocks/icon-button/edit.js +33 -1
  25. package/dist/blocks/icon-button/render.php +19 -0
  26. package/dist/blocks/icon-button/style.css +37 -3
  27. package/dist/blocks/input/block.json +10 -0
  28. package/dist/blocks/input/edit.js +27 -1
  29. package/dist/blocks/input/render.php +17 -1
  30. package/dist/blocks/input-helper-message/block.json +10 -0
  31. package/dist/blocks/input-helper-message/edit.js +17 -0
  32. package/dist/blocks/input-helper-message/render.php +18 -7
  33. package/dist/blocks/link/block.json +12 -7
  34. package/dist/blocks/link/edit.js +21 -18
  35. package/dist/blocks/link/render.php +25 -3
  36. package/dist/blocks/tab/block.json +10 -0
  37. package/dist/blocks/tab/edit.js +17 -0
  38. package/dist/blocks/tab/render.php +18 -7
  39. package/dist/blocks/tab-group/block.json +10 -0
  40. package/dist/blocks/tab-group/edit.js +17 -0
  41. package/dist/blocks/tab-group/render.php +18 -7
  42. package/dist/blocks/text/block.json +10 -0
  43. package/dist/blocks/text/edit.js +18 -2
  44. package/dist/blocks/text/render.php +14 -1
  45. package/dist/blocks/toast/block.json +10 -0
  46. package/dist/blocks/toast/edit.js +18 -1
  47. package/dist/blocks/toast/render.php +14 -0
  48. package/dist/index.cjs +389 -148
  49. package/dist/index.cjs.map +1 -1
  50. package/dist/index.js +389 -148
  51. package/dist/index.js.map +1 -1
  52. package/dist/utils/DATA_ATTRIBUTES_USAGE.md +377 -0
  53. package/dist/utils/sanitize-data-attributes.php +109 -0
  54. package/package.json +9 -3
  55. package/BLOCK_CREATION_CHECKLIST.md +0 -385
  56. package/BUILD.md +0 -411
  57. package/CHANGELOG.md +0 -85
  58. package/SCSS_VARIABLES_REFERENCE.md +0 -316
  59. package/STYLING_SYNC_GUIDE.md +0 -306
  60. package/TESTING.md +0 -152
  61. package/TRANSFORMATION_GUIDE.md +0 -908
  62. package/dist/blocks/button/style-resolved.css +0 -153
  63. package/lib/wordpress.js +0 -7
  64. package/rollup.config.js +0 -75
  65. package/scripts/build-plugin.cjs +0 -121
  66. package/scripts/create-block.sh +0 -141
  67. package/scripts/create-wordpress-block-tests.cjs +0 -438
  68. package/scripts/create-wordpress-block.cjs +0 -681
  69. package/src/blocks/ad-container/block.json +0 -29
  70. package/src/blocks/ad-container/edit.js +0 -42
  71. package/src/blocks/ad-container/index.js +0 -10
  72. package/src/blocks/ad-container/render.php +0 -27
  73. package/src/blocks/ad-container/save.js +0 -16
  74. package/src/blocks/ad-container/style-editor.css +0 -4
  75. package/src/blocks/ad-container/style.css +0 -30
  76. package/src/blocks/button/block.json +0 -90
  77. package/src/blocks/button/edit.js +0 -187
  78. package/src/blocks/button/index.js +0 -11
  79. package/src/blocks/button/render.php +0 -71
  80. package/src/blocks/button/save.js +0 -52
  81. package/src/blocks/button/style-editor.css +0 -15
  82. package/src/blocks/button/style-resolved.css +0 -153
  83. package/src/blocks/button/style.css +0 -157
  84. package/src/blocks/chip/block.json +0 -58
  85. package/src/blocks/chip/edit.js +0 -113
  86. package/src/blocks/chip/index.js +0 -10
  87. package/src/blocks/chip/render.php +0 -40
  88. package/src/blocks/chip/save.js +0 -36
  89. package/src/blocks/chip/style-editor.css +0 -5
  90. package/src/blocks/chip/style.css +0 -87
  91. package/src/blocks/dialog-box/block.json +0 -24
  92. package/src/blocks/dialog-box/edit.js +0 -41
  93. package/src/blocks/dialog-box/index.js +0 -17
  94. package/src/blocks/dialog-box/render.php +0 -24
  95. package/src/blocks/dialog-box/save.js +0 -23
  96. package/src/blocks/dialog-box/style.css +0 -23
  97. package/src/blocks/divider/block.json +0 -32
  98. package/src/blocks/divider/edit.js +0 -42
  99. package/src/blocks/divider/index.js +0 -10
  100. package/src/blocks/divider/render.php +0 -31
  101. package/src/blocks/divider/save.js +0 -18
  102. package/src/blocks/divider/style-editor.css +0 -4
  103. package/src/blocks/divider/style.css +0 -37
  104. package/src/blocks/flag/block.json +0 -49
  105. package/src/blocks/flag/edit.js +0 -82
  106. package/src/blocks/flag/index.js +0 -10
  107. package/src/blocks/flag/render.php +0 -34
  108. package/src/blocks/flag/save.js +0 -25
  109. package/src/blocks/flag/style-editor.css +0 -5
  110. package/src/blocks/flag/style.css +0 -54
  111. package/src/blocks/icon/block.json +0 -24
  112. package/src/blocks/icon/edit.js +0 -41
  113. package/src/blocks/icon/index.js +0 -17
  114. package/src/blocks/icon/render.php +0 -24
  115. package/src/blocks/icon/save.js +0 -23
  116. package/src/blocks/icon/style.css +0 -23
  117. package/src/blocks/icon-button/block.json +0 -44
  118. package/src/blocks/icon-button/edit.js +0 -82
  119. package/src/blocks/icon-button/index.js +0 -10
  120. package/src/blocks/icon-button/render.php +0 -46
  121. package/src/blocks/icon-button/save.js +0 -29
  122. package/src/blocks/icon-button/style-editor.css +0 -5
  123. package/src/blocks/icon-button/style.css +0 -31
  124. package/src/blocks/input/block.json +0 -48
  125. package/src/blocks/input/edit.js +0 -78
  126. package/src/blocks/input/index.js +0 -10
  127. package/src/blocks/input/render.php +0 -39
  128. package/src/blocks/input/save.js +0 -27
  129. package/src/blocks/input/style-editor.css +0 -8
  130. package/src/blocks/input/style.css +0 -53
  131. package/src/blocks/input-helper-message/block.json +0 -24
  132. package/src/blocks/input-helper-message/edit.js +0 -42
  133. package/src/blocks/input-helper-message/index.js +0 -17
  134. package/src/blocks/input-helper-message/render.php +0 -24
  135. package/src/blocks/input-helper-message/save.js +0 -23
  136. package/src/blocks/input-helper-message/style.css +0 -23
  137. package/src/blocks/link/block.json +0 -72
  138. package/src/blocks/link/edit.js +0 -151
  139. package/src/blocks/link/index.js +0 -10
  140. package/src/blocks/link/render.php +0 -44
  141. package/src/blocks/link/save.js +0 -46
  142. package/src/blocks/link/style-editor.css +0 -5
  143. package/src/blocks/link/style.css +0 -119
  144. package/src/blocks/tab/block.json +0 -24
  145. package/src/blocks/tab/edit.js +0 -41
  146. package/src/blocks/tab/index.js +0 -17
  147. package/src/blocks/tab/render.php +0 -24
  148. package/src/blocks/tab/save.js +0 -23
  149. package/src/blocks/tab/style.css +0 -23
  150. package/src/blocks/tab-group/block.json +0 -24
  151. package/src/blocks/tab-group/edit.js +0 -41
  152. package/src/blocks/tab-group/index.js +0 -17
  153. package/src/blocks/tab-group/render.php +0 -24
  154. package/src/blocks/tab-group/save.js +0 -23
  155. package/src/blocks/tab-group/style.css +0 -23
  156. package/src/blocks/text/block.json +0 -33
  157. package/src/blocks/text/edit.js +0 -56
  158. package/src/blocks/text/index.js +0 -10
  159. package/src/blocks/text/render.php +0 -26
  160. package/src/blocks/text/save.js +0 -18
  161. package/src/blocks/text/style-editor.css +0 -4
  162. package/src/blocks/text/style.css +0 -7
  163. package/src/blocks/toast/block.json +0 -40
  164. package/src/blocks/toast/edit.js +0 -85
  165. package/src/blocks/toast/index.js +0 -10
  166. package/src/blocks/toast/render.php +0 -37
  167. package/src/blocks/toast/save.js +0 -29
  168. package/src/blocks/toast/style-editor.css +0 -4
  169. package/src/blocks/toast/style.css +0 -67
  170. package/src/index.js +0 -16
  171. package/src/utils/classBuilder.js +0 -53
  172. package/tsconfig.json +0 -116
  173. package/vitest.config.js +0 -28
  174. package/vitest.config.ts +0 -28
  175. package/vitest.setup.ts +0 -129
package/dist/index.cjs CHANGED
@@ -94,7 +94,8 @@ function Edit(_ref) {
94
94
  intent = attributes.intent,
95
95
  size = attributes.size,
96
96
  behaviour = attributes.behaviour,
97
- state = attributes.state,
97
+ isRounded = attributes.isRounded,
98
+ isLoading = attributes.isLoading,
98
99
  disabled = attributes.disabled,
99
100
  href = attributes.href,
100
101
  target = attributes.target,
@@ -102,7 +103,9 @@ function Edit(_ref) {
102
103
  type = attributes.type,
103
104
  iconLeft = attributes.iconLeft,
104
105
  iconRight = attributes.iconRight,
105
- ariaLabel = attributes.ariaLabel;
106
+ ariaLabel = attributes.ariaLabel,
107
+ classes = attributes.classes;
108
+ attributes.dataAttributes;
106
109
  var blockProps = blockEditor.useBlockProps({
107
110
  className: 'tds-button-wrapper'
108
111
  });
@@ -110,7 +113,6 @@ function Edit(_ref) {
110
113
  intent: intent,
111
114
  size: size,
112
115
  behaviour: behaviour,
113
- state: state,
114
116
  disabled: disabled
115
117
  });
116
118
  var Element = href ? 'a' : 'button';
@@ -188,33 +190,24 @@ function Edit(_ref) {
188
190
  behaviour: value
189
191
  });
190
192
  }
191
- }), /*#__PURE__*/React.createElement(components.SelectControl, {
192
- label: "State",
193
- value: state,
194
- options: [{
195
- label: 'Base',
196
- value: 'base'
197
- }, {
198
- label: 'Hover',
199
- value: 'hover'
200
- }, {
201
- label: 'Pressed',
202
- value: 'pressed'
203
- }, {
204
- label: 'Loading',
205
- value: 'loading'
206
- }, {
207
- label: 'Disabled',
208
- value: 'disabled'
209
- }, {
210
- label: 'Focus',
211
- value: 'focus'
212
- }],
193
+ }), /*#__PURE__*/React.createElement(components.ToggleControl, {
194
+ label: "Rounded Corners",
195
+ checked: isRounded,
213
196
  onChange: function onChange(value) {
214
197
  return setAttributes({
215
- state: value
198
+ isRounded: value
216
199
  });
217
- }
200
+ },
201
+ help: "Apply rounded corner styling"
202
+ }), /*#__PURE__*/React.createElement(components.ToggleControl, {
203
+ label: "Loading",
204
+ checked: isLoading,
205
+ onChange: function onChange(value) {
206
+ return setAttributes({
207
+ isLoading: value
208
+ });
209
+ },
210
+ help: "Show loading state with spinner"
218
211
  }), /*#__PURE__*/React.createElement(components.ToggleControl, {
219
212
  label: "Disabled",
220
213
  checked: disabled,
@@ -313,7 +306,26 @@ function Edit(_ref) {
313
306
  });
314
307
  },
315
308
  placeholder: "Icon name"
316
- }))));
309
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
310
+ title: "Extensibility",
311
+ initialOpen: false
312
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
313
+ label: "Custom Classes",
314
+ value: classes,
315
+ onChange: function onChange(value) {
316
+ return setAttributes({
317
+ classes: value
318
+ });
319
+ },
320
+ placeholder: "class-name-1 class-name-2",
321
+ help: "Space-separated CSS classes added to the button element"
322
+ }), /*#__PURE__*/React.createElement("p", {
323
+ style: {
324
+ fontSize: '12px',
325
+ color: '#666',
326
+ marginTop: '8px'
327
+ }
328
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))));
317
329
  }
318
330
 
319
331
  function Save(_ref) {
@@ -410,18 +422,15 @@ var attributes$9 = {
410
422
  "default": "hug",
411
423
  description: "Controls the width behaviour"
412
424
  },
413
- state: {
414
- type: "string",
415
- "enum": [
416
- "base",
417
- "hover",
418
- "pressed",
419
- "loading",
420
- "disabled",
421
- "focus"
422
- ],
423
- "default": "base",
424
- description: "The interaction state"
425
+ isRounded: {
426
+ type: "boolean",
427
+ "default": false,
428
+ description: "Applies rounded corner styling to the button"
429
+ },
430
+ isLoading: {
431
+ type: "boolean",
432
+ "default": false,
433
+ description: "Show loading state with spinner and disable interaction"
425
434
  },
426
435
  disabled: {
427
436
  type: "boolean",
@@ -467,6 +476,17 @@ var attributes$9 = {
467
476
  ariaLabel: {
468
477
  type: "string",
469
478
  description: "Accessible name for icon-only buttons"
479
+ },
480
+ classes: {
481
+ type: "string",
482
+ "default": "",
483
+ description: "Additional CSS classes applied to the rendered button/link element"
484
+ },
485
+ dataAttributes: {
486
+ type: "object",
487
+ "default": {
488
+ },
489
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
470
490
  }
471
491
  };
472
492
  var editorScript = "file:./index.js";
@@ -524,6 +544,17 @@ var attributes$8 = {
524
544
  padding: {
525
545
  type: "boolean",
526
546
  "default": false
547
+ },
548
+ classes: {
549
+ type: "string",
550
+ "default": "",
551
+ description: "Additional CSS classes applied to the rendered divider element"
552
+ },
553
+ dataAttributes: {
554
+ type: "object",
555
+ "default": {
556
+ },
557
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
527
558
  }
528
559
  };
529
560
  var example$8 = {
@@ -547,7 +578,9 @@ var edit$8 = function edit(_ref) {
547
578
  setAttributes = _ref.setAttributes;
548
579
  var isDashed = attributes.isDashed,
549
580
  isVertical = attributes.isVertical,
550
- padding = attributes.padding;
581
+ padding = attributes.padding,
582
+ classes = attributes.classes;
583
+ attributes.dataAttributes;
551
584
  var blockProps = blockEditor.useBlockProps();
552
585
  var buildDividerClass = function buildDividerClass() {
553
586
  var classes = ['tds-divider'];
@@ -582,7 +615,26 @@ var edit$8 = function edit(_ref) {
582
615
  padding: val
583
616
  });
584
617
  }
585
- }))), /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
618
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
619
+ title: "Extensibility",
620
+ initialOpen: false
621
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
622
+ label: "Custom Classes",
623
+ value: classes,
624
+ onChange: function onChange(val) {
625
+ return setAttributes({
626
+ classes: val
627
+ });
628
+ },
629
+ placeholder: "class-name-1 class-name-2",
630
+ help: "Space-separated CSS classes added to the divider element"
631
+ }), /*#__PURE__*/React.createElement("p", {
632
+ style: {
633
+ fontSize: '12px',
634
+ color: '#666',
635
+ marginTop: '8px'
636
+ }
637
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
586
638
  className: buildDividerClass()
587
639
  })));
588
640
  };
@@ -646,6 +698,17 @@ var attributes$7 = {
646
698
  content: {
647
699
  type: "string",
648
700
  "default": ""
701
+ },
702
+ classes: {
703
+ type: "string",
704
+ "default": "",
705
+ description: "Additional CSS classes applied to the rendered text element"
706
+ },
707
+ dataAttributes: {
708
+ type: "object",
709
+ "default": {
710
+ },
711
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
649
712
  }
650
713
  };
651
714
  var example$7 = {
@@ -669,7 +732,9 @@ var edit$7 = function edit(_ref) {
669
732
  setAttributes = _ref.setAttributes;
670
733
  var as = attributes.as,
671
734
  typographyStyle = attributes.typographyStyle,
672
- content = attributes.content;
735
+ content = attributes.content,
736
+ classes = attributes.classes;
737
+ attributes.dataAttributes;
673
738
  var blockProps = blockEditor.useBlockProps();
674
739
  var tagName = as || 'p';
675
740
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
@@ -722,7 +787,26 @@ var edit$7 = function edit(_ref) {
722
787
  typographyStyle: val
723
788
  });
724
789
  }
725
- }))), /*#__PURE__*/React.createElement(blockEditor.RichText, _extends({}, blockProps, {
790
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
791
+ title: "Extensibility",
792
+ initialOpen: false
793
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
794
+ label: "Custom Classes",
795
+ value: classes,
796
+ onChange: function onChange(val) {
797
+ return setAttributes({
798
+ classes: val
799
+ });
800
+ },
801
+ placeholder: "class-name-1 class-name-2",
802
+ help: "Space-separated CSS classes added to the text element"
803
+ }), /*#__PURE__*/React.createElement("p", {
804
+ style: {
805
+ fontSize: '12px',
806
+ color: '#666',
807
+ marginTop: '8px'
808
+ }
809
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement(blockEditor.RichText, _extends({}, blockProps, {
726
810
  tagName: tagName,
727
811
  value: content,
728
812
  onChange: function onChange(val) {
@@ -804,6 +888,17 @@ var attributes$6 = {
804
888
  id: {
805
889
  type: "string",
806
890
  "default": ""
891
+ },
892
+ classes: {
893
+ type: "string",
894
+ "default": "",
895
+ description: "Additional CSS classes applied to the rendered input element"
896
+ },
897
+ dataAttributes: {
898
+ type: "object",
899
+ "default": {
900
+ },
901
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
807
902
  }
808
903
  };
809
904
  var example$6 = {
@@ -831,7 +926,9 @@ var edit$6 = function edit(_ref) {
831
926
  disabled = attributes.disabled,
832
927
  required = attributes.required,
833
928
  name = attributes.name,
834
- id = attributes.id;
929
+ id = attributes.id,
930
+ classes = attributes.classes;
931
+ attributes.dataAttributes;
835
932
  var blockProps = blockEditor.useBlockProps();
836
933
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
837
934
  title: "Input Settings"
@@ -910,7 +1007,26 @@ var edit$6 = function edit(_ref) {
910
1007
  disabled: val
911
1008
  });
912
1009
  }
913
- }))), /*#__PURE__*/React.createElement("div", blockProps, label && /*#__PURE__*/React.createElement("label", {
1010
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
1011
+ title: "Extensibility",
1012
+ initialOpen: false
1013
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
1014
+ label: "Custom Classes",
1015
+ value: classes,
1016
+ onChange: function onChange(val) {
1017
+ return setAttributes({
1018
+ classes: val
1019
+ });
1020
+ },
1021
+ placeholder: "class-name-1 class-name-2",
1022
+ help: "Space-separated CSS classes added to the input element"
1023
+ }), /*#__PURE__*/React.createElement("p", {
1024
+ style: {
1025
+ fontSize: '12px',
1026
+ color: '#666',
1027
+ marginTop: '8px'
1028
+ }
1029
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement("div", blockProps, label && /*#__PURE__*/React.createElement("label", {
914
1030
  className: "tds-input__label"
915
1031
  }, label), /*#__PURE__*/React.createElement("input", {
916
1032
  type: type,
@@ -975,6 +1091,11 @@ var attributes$5 = {
975
1091
  type: "boolean",
976
1092
  "default": false
977
1093
  },
1094
+ isLoading: {
1095
+ type: "boolean",
1096
+ "default": false,
1097
+ description: "Show loading state with spinner and disable interaction"
1098
+ },
978
1099
  href: {
979
1100
  type: "string",
980
1101
  "default": ""
@@ -996,6 +1117,17 @@ var attributes$5 = {
996
1117
  ariaLabel: {
997
1118
  type: "string",
998
1119
  "default": ""
1120
+ },
1121
+ classes: {
1122
+ type: "string",
1123
+ "default": "",
1124
+ description: "Additional CSS classes applied to the rendered button/link element"
1125
+ },
1126
+ dataAttributes: {
1127
+ type: "object",
1128
+ "default": {
1129
+ },
1130
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
999
1131
  }
1000
1132
  };
1001
1133
  var example$5 = {
@@ -1019,10 +1151,13 @@ var edit$5 = function edit(_ref) {
1019
1151
  setAttributes = _ref.setAttributes;
1020
1152
  var iconName = attributes.iconName,
1021
1153
  round = attributes.round,
1154
+ isLoading = attributes.isLoading,
1022
1155
  href = attributes.href,
1023
1156
  target = attributes.target,
1024
1157
  rel = attributes.rel,
1025
- ariaLabel = attributes.ariaLabel;
1158
+ ariaLabel = attributes.ariaLabel,
1159
+ classes = attributes.classes;
1160
+ attributes.dataAttributes;
1026
1161
  var blockProps = blockEditor.useBlockProps();
1027
1162
  var buildClass = function buildClass() {
1028
1163
  var classes = ['tds-icon-button'];
@@ -1049,6 +1184,15 @@ var edit$5 = function edit(_ref) {
1049
1184
  round: val
1050
1185
  });
1051
1186
  }
1187
+ }), /*#__PURE__*/React.createElement(components.ToggleControl, {
1188
+ label: "Loading",
1189
+ checked: isLoading,
1190
+ onChange: function onChange(val) {
1191
+ return setAttributes({
1192
+ isLoading: val
1193
+ });
1194
+ },
1195
+ help: "Show loading state with spinner"
1052
1196
  }), /*#__PURE__*/React.createElement(components.TextControl, {
1053
1197
  label: "URL (Leave empty for button)",
1054
1198
  value: href,
@@ -1094,7 +1238,26 @@ var edit$5 = function edit(_ref) {
1094
1238
  ariaLabel: val
1095
1239
  });
1096
1240
  }
1097
- }))), /*#__PURE__*/React.createElement(Element, _extends({}, blockProps, {
1241
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
1242
+ title: "Extensibility",
1243
+ initialOpen: false
1244
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
1245
+ label: "Custom Classes",
1246
+ value: classes,
1247
+ onChange: function onChange(val) {
1248
+ return setAttributes({
1249
+ classes: val
1250
+ });
1251
+ },
1252
+ placeholder: "class-name-1 class-name-2",
1253
+ help: "Space-separated CSS classes added to the button/link element"
1254
+ }), /*#__PURE__*/React.createElement("p", {
1255
+ style: {
1256
+ fontSize: '12px',
1257
+ color: '#666',
1258
+ marginTop: '8px'
1259
+ }
1260
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement(Element, _extends({}, blockProps, {
1098
1261
  className: buildClass(),
1099
1262
  href: href || undefined,
1100
1263
  target: href ? target : undefined,
@@ -1160,8 +1323,7 @@ var attributes$4 = {
1160
1323
  "default": "secondary",
1161
1324
  "enum": [
1162
1325
  "primary",
1163
- "secondary",
1164
- "negative"
1326
+ "secondary"
1165
1327
  ]
1166
1328
  },
1167
1329
  size: {
@@ -1169,20 +1331,9 @@ var attributes$4 = {
1169
1331
  "default": "medium",
1170
1332
  "enum": [
1171
1333
  "small",
1172
- "medium",
1173
1334
  "large"
1174
1335
  ]
1175
1336
  },
1176
- state: {
1177
- type: "string",
1178
- "default": "base",
1179
- "enum": [
1180
- "base",
1181
- "hover",
1182
- "pressed",
1183
- "disabled"
1184
- ]
1185
- },
1186
1337
  channel: {
1187
1338
  type: "boolean",
1188
1339
  "default": false
@@ -1202,6 +1353,17 @@ var attributes$4 = {
1202
1353
  ariaLabel: {
1203
1354
  type: "string",
1204
1355
  "default": ""
1356
+ },
1357
+ classes: {
1358
+ type: "string",
1359
+ "default": "",
1360
+ description: "Additional CSS classes applied to the rendered chip element"
1361
+ },
1362
+ dataAttributes: {
1363
+ type: "object",
1364
+ "default": {
1365
+ },
1366
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
1205
1367
  }
1206
1368
  };
1207
1369
  var example$4 = {
@@ -1226,18 +1388,18 @@ var edit$4 = function edit(_ref) {
1226
1388
  var content = attributes.content,
1227
1389
  intent = attributes.intent,
1228
1390
  size = attributes.size,
1229
- state = attributes.state,
1230
1391
  channel = attributes.channel,
1231
1392
  toggle = attributes.toggle,
1232
1393
  iconLeft = attributes.iconLeft,
1233
1394
  iconRight = attributes.iconRight,
1234
- ariaLabel = attributes.ariaLabel;
1395
+ ariaLabel = attributes.ariaLabel,
1396
+ classes = attributes.classes;
1397
+ attributes.dataAttributes;
1235
1398
  var blockProps = blockEditor.useBlockProps();
1236
1399
  var buildClass = function buildClass() {
1237
1400
  var classes = ['tds-chip'];
1238
1401
  classes.push("tds-chip--intent-".concat(intent));
1239
1402
  classes.push("tds-chip--size-".concat(size));
1240
- classes.push("tds-chip--state-".concat(state));
1241
1403
  if (channel) classes.push('tds-chip--channel');
1242
1404
  if (toggle) classes.push('tds-chip--toggle');
1243
1405
  return classes.join(' ');
@@ -1253,9 +1415,6 @@ var edit$4 = function edit(_ref) {
1253
1415
  }, {
1254
1416
  label: 'Secondary',
1255
1417
  value: 'secondary'
1256
- }, {
1257
- label: 'Negative',
1258
- value: 'negative'
1259
1418
  }],
1260
1419
  onChange: function onChange(val) {
1261
1420
  return setAttributes({
@@ -1268,9 +1427,6 @@ var edit$4 = function edit(_ref) {
1268
1427
  options: [{
1269
1428
  label: 'Small',
1270
1429
  value: 'small'
1271
- }, {
1272
- label: 'Medium',
1273
- value: 'medium'
1274
1430
  }, {
1275
1431
  label: 'Large',
1276
1432
  value: 'large'
@@ -1280,27 +1436,6 @@ var edit$4 = function edit(_ref) {
1280
1436
  size: val
1281
1437
  });
1282
1438
  }
1283
- }), /*#__PURE__*/React.createElement(components.SelectControl, {
1284
- label: "State",
1285
- value: state,
1286
- options: [{
1287
- label: 'Base',
1288
- value: 'base'
1289
- }, {
1290
- label: 'Hover',
1291
- value: 'hover'
1292
- }, {
1293
- label: 'Pressed',
1294
- value: 'pressed'
1295
- }, {
1296
- label: 'Disabled',
1297
- value: 'disabled'
1298
- }],
1299
- onChange: function onChange(val) {
1300
- return setAttributes({
1301
- state: val
1302
- });
1303
- }
1304
1439
  }), /*#__PURE__*/React.createElement(components.ToggleControl, {
1305
1440
  label: "Channel",
1306
1441
  checked: channel,
@@ -1341,7 +1476,26 @@ var edit$4 = function edit(_ref) {
1341
1476
  ariaLabel: val
1342
1477
  });
1343
1478
  }
1344
- }))), /*#__PURE__*/React.createElement("button", _extends({}, blockProps, {
1479
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
1480
+ title: "Extensibility",
1481
+ initialOpen: false
1482
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
1483
+ label: "Custom Classes",
1484
+ value: classes,
1485
+ onChange: function onChange(val) {
1486
+ return setAttributes({
1487
+ classes: val
1488
+ });
1489
+ },
1490
+ placeholder: "class-name-1 class-name-2",
1491
+ help: "Space-separated CSS classes added to the chip element"
1492
+ }), /*#__PURE__*/React.createElement("p", {
1493
+ style: {
1494
+ fontSize: '12px',
1495
+ color: '#666',
1496
+ marginTop: '8px'
1497
+ }
1498
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement("button", _extends({}, blockProps, {
1345
1499
  className: buildClass(),
1346
1500
  "aria-label": ariaLabel
1347
1501
  }), iconLeft && /*#__PURE__*/React.createElement("span", {
@@ -1452,6 +1606,17 @@ var attributes$3 = {
1452
1606
  ariaLabel: {
1453
1607
  type: "string",
1454
1608
  "default": ""
1609
+ },
1610
+ classes: {
1611
+ type: "string",
1612
+ "default": "",
1613
+ description: "Additional CSS classes applied to the rendered flag element"
1614
+ },
1615
+ dataAttributes: {
1616
+ type: "object",
1617
+ "default": {
1618
+ },
1619
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
1455
1620
  }
1456
1621
  };
1457
1622
  var example$3 = {
@@ -1479,7 +1644,9 @@ var edit$3 = function edit(_ref) {
1479
1644
  size = attributes.size,
1480
1645
  iconLeft = attributes.iconLeft,
1481
1646
  iconRight = attributes.iconRight,
1482
- ariaLabel = attributes.ariaLabel;
1647
+ ariaLabel = attributes.ariaLabel,
1648
+ classes = attributes.classes;
1649
+ attributes.dataAttributes;
1483
1650
  var blockProps = blockEditor.useBlockProps();
1484
1651
  var buildClass = function buildClass() {
1485
1652
  var classes = ['tds-flag'];
@@ -1560,7 +1727,26 @@ var edit$3 = function edit(_ref) {
1560
1727
  ariaLabel: val
1561
1728
  });
1562
1729
  }
1563
- }))), /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
1730
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
1731
+ title: "Extensibility",
1732
+ initialOpen: false
1733
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
1734
+ label: "Custom Classes",
1735
+ value: classes,
1736
+ onChange: function onChange(val) {
1737
+ return setAttributes({
1738
+ classes: val
1739
+ });
1740
+ },
1741
+ placeholder: "class-name-1 class-name-2",
1742
+ help: "Space-separated CSS classes added to the flag element"
1743
+ }), /*#__PURE__*/React.createElement("p", {
1744
+ style: {
1745
+ fontSize: '12px',
1746
+ color: '#666',
1747
+ marginTop: '8px'
1748
+ }
1749
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
1564
1750
  className: buildClass(),
1565
1751
  "aria-label": ariaLabel
1566
1752
  }), label && /*#__PURE__*/React.createElement("div", {
@@ -1657,6 +1843,17 @@ var attributes$2 = {
1657
1843
  timeout: {
1658
1844
  type: "number",
1659
1845
  "default": 5000
1846
+ },
1847
+ classes: {
1848
+ type: "string",
1849
+ "default": "",
1850
+ description: "Additional CSS classes applied to the rendered toast element"
1851
+ },
1852
+ dataAttributes: {
1853
+ type: "object",
1854
+ "default": {
1855
+ },
1856
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
1660
1857
  }
1661
1858
  };
1662
1859
  var example$2 = {
@@ -1682,7 +1879,9 @@ var edit$2 = function edit(_ref) {
1682
1879
  intent = attributes.intent,
1683
1880
  link = attributes.link,
1684
1881
  linkLabel = attributes.linkLabel,
1685
- timeout = attributes.timeout;
1882
+ timeout = attributes.timeout,
1883
+ classes = attributes.classes;
1884
+ attributes.dataAttributes;
1686
1885
  var blockProps = blockEditor.useBlockProps();
1687
1886
  var buildClass = function buildClass() {
1688
1887
  var classes = ['tds-toast'];
@@ -1746,7 +1945,26 @@ var edit$2 = function edit(_ref) {
1746
1945
  },
1747
1946
  min: 0,
1748
1947
  step: 1000
1749
- }))), /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
1948
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
1949
+ title: "Extensibility",
1950
+ initialOpen: false
1951
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
1952
+ label: "Custom Classes",
1953
+ value: classes,
1954
+ onChange: function onChange(val) {
1955
+ return setAttributes({
1956
+ classes: val
1957
+ });
1958
+ },
1959
+ placeholder: "class-name-1 class-name-2",
1960
+ help: "Space-separated CSS classes added to the toast element"
1961
+ }), /*#__PURE__*/React.createElement("p", {
1962
+ style: {
1963
+ fontSize: '12px',
1964
+ color: '#666',
1965
+ marginTop: '8px'
1966
+ }
1967
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
1750
1968
  className: buildClass(),
1751
1969
  role: "status",
1752
1970
  "aria-live": "polite"
@@ -1833,11 +2051,10 @@ var attributes$1 = {
1833
2051
  },
1834
2052
  sentiment: {
1835
2053
  type: "string",
1836
- "default": "neutral",
2054
+ "default": "brand",
1837
2055
  "enum": [
1838
- "neutral",
1839
- "positive",
1840
- "negative"
2056
+ "brand",
2057
+ "utility"
1841
2058
  ]
1842
2059
  },
1843
2060
  size: {
@@ -1849,17 +2066,6 @@ var attributes$1 = {
1849
2066
  "large"
1850
2067
  ]
1851
2068
  },
1852
- state: {
1853
- type: "string",
1854
- "default": "base",
1855
- "enum": [
1856
- "base",
1857
- "hover",
1858
- "visited",
1859
- "focus",
1860
- "disabled"
1861
- ]
1862
- },
1863
2069
  iconLeft: {
1864
2070
  type: "string",
1865
2071
  "default": ""
@@ -1889,6 +2095,17 @@ var attributes$1 = {
1889
2095
  rel: {
1890
2096
  type: "string",
1891
2097
  "default": ""
2098
+ },
2099
+ classes: {
2100
+ type: "string",
2101
+ "default": "",
2102
+ description: "Additional CSS classes applied to the rendered link element"
2103
+ },
2104
+ dataAttributes: {
2105
+ type: "object",
2106
+ "default": {
2107
+ },
2108
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
1892
2109
  }
1893
2110
  };
1894
2111
  var example$1 = {
@@ -1915,20 +2132,20 @@ var edit$1 = function edit(_ref) {
1915
2132
  intent = attributes.intent,
1916
2133
  sentiment = attributes.sentiment,
1917
2134
  size = attributes.size,
1918
- state = attributes.state,
1919
2135
  iconLeft = attributes.iconLeft,
1920
2136
  iconRight = attributes.iconRight,
1921
2137
  inline = attributes.inline,
1922
2138
  ariaLabel = attributes.ariaLabel,
1923
2139
  target = attributes.target,
1924
- rel = attributes.rel;
2140
+ rel = attributes.rel,
2141
+ classes = attributes.classes;
2142
+ attributes.dataAttributes;
1925
2143
  var blockProps = blockEditor.useBlockProps();
1926
2144
  var buildClass = function buildClass() {
1927
2145
  var classes = ['tds-link'];
1928
2146
  classes.push("tds-link--intent-".concat(intent));
1929
2147
  classes.push("tds-link--sentiment-".concat(sentiment));
1930
2148
  classes.push("tds-link--size-".concat(size));
1931
- classes.push("tds-link--state-".concat(state));
1932
2149
  if (!inline) classes.push('tds-link--block');
1933
2150
  return classes.join(' ');
1934
2151
  };
@@ -1965,14 +2182,11 @@ var edit$1 = function edit(_ref) {
1965
2182
  label: "Sentiment",
1966
2183
  value: sentiment,
1967
2184
  options: [{
1968
- label: 'Neutral',
1969
- value: 'neutral'
2185
+ label: 'Brand',
2186
+ value: 'brand'
1970
2187
  }, {
1971
- label: 'Positive',
1972
- value: 'positive'
1973
- }, {
1974
- label: 'Negative',
1975
- value: 'negative'
2188
+ label: 'Utility',
2189
+ value: 'utility'
1976
2190
  }],
1977
2191
  onChange: function onChange(val) {
1978
2192
  return setAttributes({
@@ -1998,30 +2212,6 @@ var edit$1 = function edit(_ref) {
1998
2212
  });
1999
2213
  }
2000
2214
  }), /*#__PURE__*/React.createElement(components.SelectControl, {
2001
- label: "State",
2002
- value: state,
2003
- options: [{
2004
- label: 'Base',
2005
- value: 'base'
2006
- }, {
2007
- label: 'Hover',
2008
- value: 'hover'
2009
- }, {
2010
- label: 'Visited',
2011
- value: 'visited'
2012
- }, {
2013
- label: 'Focus',
2014
- value: 'focus'
2015
- }, {
2016
- label: 'Disabled',
2017
- value: 'disabled'
2018
- }],
2019
- onChange: function onChange(val) {
2020
- return setAttributes({
2021
- state: val
2022
- });
2023
- }
2024
- }), /*#__PURE__*/React.createElement(components.TextControl, {
2025
2215
  label: "Left Icon",
2026
2216
  value: iconLeft,
2027
2217
  onChange: function onChange(val) {
@@ -2082,7 +2272,26 @@ var edit$1 = function edit(_ref) {
2082
2272
  ariaLabel: val
2083
2273
  });
2084
2274
  }
2085
- }))), /*#__PURE__*/React.createElement("a", _extends({}, blockProps, {
2275
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
2276
+ title: "Extensibility",
2277
+ initialOpen: false
2278
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
2279
+ label: "Custom Classes",
2280
+ value: classes,
2281
+ onChange: function onChange(val) {
2282
+ return setAttributes({
2283
+ classes: val
2284
+ });
2285
+ },
2286
+ placeholder: "class-name-1 class-name-2",
2287
+ help: "Space-separated CSS classes added to the link element"
2288
+ }), /*#__PURE__*/React.createElement("p", {
2289
+ style: {
2290
+ fontSize: '12px',
2291
+ color: '#666',
2292
+ marginTop: '8px'
2293
+ }
2294
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement("a", _extends({}, blockProps, {
2086
2295
  href: href || '#',
2087
2296
  className: buildClass(),
2088
2297
  "aria-label": ariaLabel,
@@ -2176,6 +2385,17 @@ var attributes = {
2176
2385
  slotID: {
2177
2386
  type: "string",
2178
2387
  "default": ""
2388
+ },
2389
+ classes: {
2390
+ type: "string",
2391
+ "default": "",
2392
+ description: "Additional CSS classes applied to the rendered ad container element"
2393
+ },
2394
+ dataAttributes: {
2395
+ type: "object",
2396
+ "default": {
2397
+ },
2398
+ description: "Custom data-* attributes for extensibility (allowlisted server-side)"
2179
2399
  }
2180
2400
  };
2181
2401
  var example = {
@@ -2198,7 +2418,9 @@ var edit = function edit(_ref) {
2198
2418
  var attributes = _ref.attributes,
2199
2419
  setAttributes = _ref.setAttributes;
2200
2420
  var type = attributes.type,
2201
- slotID = attributes.slotID;
2421
+ slotID = attributes.slotID,
2422
+ classes = attributes.classes;
2423
+ attributes.dataAttributes;
2202
2424
  var blockProps = blockEditor.useBlockProps();
2203
2425
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
2204
2426
  title: "Ad Container Settings"
@@ -2226,7 +2448,26 @@ var edit = function edit(_ref) {
2226
2448
  });
2227
2449
  },
2228
2450
  placeholder: "e.g., /123456789/section/article-top"
2229
- }))), /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
2451
+ })), /*#__PURE__*/React.createElement(components.PanelBody, {
2452
+ title: "Extensibility",
2453
+ initialOpen: false
2454
+ }, /*#__PURE__*/React.createElement(components.TextControl, {
2455
+ label: "Custom Classes",
2456
+ value: classes,
2457
+ onChange: function onChange(val) {
2458
+ return setAttributes({
2459
+ classes: val
2460
+ });
2461
+ },
2462
+ placeholder: "class-name-1 class-name-2",
2463
+ help: "Space-separated CSS classes added to the ad-container element"
2464
+ }), /*#__PURE__*/React.createElement("p", {
2465
+ style: {
2466
+ fontSize: '12px',
2467
+ color: '#666',
2468
+ marginTop: '8px'
2469
+ }
2470
+ }, /*#__PURE__*/React.createElement("strong", null, "Data Attributes:"), " Custom data-* attributes are typically set via block templates or PHP filters for analytics, testing, and custom hooks. See the block documentation for examples."))), /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
2230
2471
  className: "tds-ad-container tds-ad-container--".concat(type),
2231
2472
  "data-slot-id": slotID
2232
2473
  }), /*#__PURE__*/React.createElement("div", {