@times-design-system/components-wordpress 1.8.0 → 1.8.1-alpha.3
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 +44 -0
- package/dist/blocks/ad-container/block.json +3 -1
- package/dist/blocks/button/block.json +5 -6
- package/dist/blocks/button/edit.js +15 -21
- package/dist/blocks/button/render.php +43 -46
- package/dist/blocks/button/save.js +13 -19
- package/dist/blocks/button/style.css +8 -25
- package/dist/blocks/chip/block.json +7 -3
- package/dist/blocks/chip/render.php +1 -1
- package/dist/blocks/chip/style.css +3 -3
- package/dist/blocks/dialog-box/block.json +2 -1
- package/dist/blocks/divider/block.json +3 -1
- package/dist/blocks/flag/block.json +7 -3
- package/dist/blocks/flag/style.css +19 -22
- package/dist/blocks/icon/block.json +3 -2
- package/dist/blocks/icon/render.php +1 -1
- package/dist/blocks/icon-button/block.json +5 -2
- package/dist/blocks/icon-button/render.php +3 -2
- package/dist/blocks/icon-button/style.css +9 -8
- package/dist/blocks/input/block.json +3 -1
- package/dist/blocks/input/style.css +31 -17
- package/dist/blocks/input-helper-message/block.json +2 -1
- package/dist/blocks/link/block.json +7 -3
- package/dist/blocks/link/style.css +123 -21
- package/dist/blocks/tab/block.json +2 -1
- package/dist/blocks/tab/style.css +146 -17
- package/dist/blocks/tab-group/block.json +2 -1
- package/dist/blocks/text/block.json +3 -1
- package/dist/blocks/toast/block.json +3 -1
- package/dist/blocks/toast/style.css +32 -31
- package/dist/blocks/utils/render-icon.php +39 -0
- package/dist/blocks/utils/sanitize-data-attributes.php +37 -0
- package/dist/icon-data.json +3895 -1952
- package/dist/index.cjs +997 -278
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +998 -279
- package/dist/index.js.map +1 -1
- package/dist/plugin.php +162 -12
- package/dist/utils/render-icon.php +32 -6
- package/package.json +9 -6
- package/plugin.php +162 -12
- package/dist/blocks/button/style-editor.css +0 -15
package/dist/index.cjs
CHANGED
|
@@ -106,9 +106,6 @@ function Edit(_ref) {
|
|
|
106
106
|
ariaLabel = attributes.ariaLabel,
|
|
107
107
|
classes = attributes.classes;
|
|
108
108
|
attributes.dataAttributes;
|
|
109
|
-
var blockProps = blockEditor.useBlockProps({
|
|
110
|
-
className: 'tds-button-wrapper'
|
|
111
|
-
});
|
|
112
109
|
var buttonClass = buildButtonClass({
|
|
113
110
|
intent: intent,
|
|
114
111
|
size: size,
|
|
@@ -116,7 +113,7 @@ function Edit(_ref) {
|
|
|
116
113
|
disabled: disabled
|
|
117
114
|
});
|
|
118
115
|
var Element = href ? 'a' : 'button';
|
|
119
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(
|
|
116
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Element, {
|
|
120
117
|
className: buttonClass,
|
|
121
118
|
disabled: !href && disabled,
|
|
122
119
|
href: href,
|
|
@@ -128,7 +125,7 @@ function Edit(_ref) {
|
|
|
128
125
|
className: "tds-button__label-container"
|
|
129
126
|
}, /*#__PURE__*/React.createElement("span", {
|
|
130
127
|
className: "tds-button__label"
|
|
131
|
-
}, label)))
|
|
128
|
+
}, label))), /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
132
129
|
title: "Button Settings"
|
|
133
130
|
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
134
131
|
label: "Label",
|
|
@@ -169,6 +166,9 @@ function Edit(_ref) {
|
|
|
169
166
|
}, {
|
|
170
167
|
label: 'Large',
|
|
171
168
|
value: 'large'
|
|
169
|
+
}, {
|
|
170
|
+
label: 'XLarge',
|
|
171
|
+
value: 'xlarge'
|
|
172
172
|
}],
|
|
173
173
|
onChange: function onChange(value) {
|
|
174
174
|
return setAttributes({
|
|
@@ -343,9 +343,6 @@ function Save(_ref) {
|
|
|
343
343
|
attributes.iconLeft;
|
|
344
344
|
attributes.iconRight;
|
|
345
345
|
var ariaLabel = attributes.ariaLabel;
|
|
346
|
-
var blockProps = blockEditor.useBlockProps.save({
|
|
347
|
-
className: 'tds-button-wrapper'
|
|
348
|
-
});
|
|
349
346
|
var buttonClass = buildButtonClass({
|
|
350
347
|
intent: intent,
|
|
351
348
|
size: size,
|
|
@@ -354,7 +351,7 @@ function Save(_ref) {
|
|
|
354
351
|
disabled: disabled
|
|
355
352
|
});
|
|
356
353
|
var Element = href ? 'a' : 'button';
|
|
357
|
-
return /*#__PURE__*/React.createElement(
|
|
354
|
+
return /*#__PURE__*/React.createElement(Element, {
|
|
358
355
|
className: buttonClass,
|
|
359
356
|
disabled: !href && disabled,
|
|
360
357
|
href: href,
|
|
@@ -366,17 +363,17 @@ function Save(_ref) {
|
|
|
366
363
|
className: "tds-button__label-container"
|
|
367
364
|
}, /*#__PURE__*/React.createElement("span", {
|
|
368
365
|
className: "tds-button__label"
|
|
369
|
-
}, label)))
|
|
366
|
+
}, label)));
|
|
370
367
|
}
|
|
371
368
|
|
|
372
|
-
var $schema$
|
|
373
|
-
var apiVersion$
|
|
374
|
-
var name$
|
|
375
|
-
var title$
|
|
376
|
-
var category$
|
|
377
|
-
var description$
|
|
378
|
-
var icon$
|
|
379
|
-
var supports$
|
|
369
|
+
var $schema$e = "https://schemas.wp.org/trunk/block.json";
|
|
370
|
+
var apiVersion$e = 3;
|
|
371
|
+
var name$e = "tds/button";
|
|
372
|
+
var title$e = "Button";
|
|
373
|
+
var category$e = "common";
|
|
374
|
+
var description$e = "A customizable button component for user interactions";
|
|
375
|
+
var icon$e = "admin-generic";
|
|
376
|
+
var supports$e = {
|
|
380
377
|
html: false,
|
|
381
378
|
spacing: {
|
|
382
379
|
margin: true,
|
|
@@ -385,9 +382,9 @@ var supports$9 = {
|
|
|
385
382
|
align: true,
|
|
386
383
|
customClassName: true
|
|
387
384
|
};
|
|
388
|
-
var textdomain = "times-design-system";
|
|
389
|
-
var render$
|
|
390
|
-
var attributes$
|
|
385
|
+
var textdomain$5 = "times-design-system";
|
|
386
|
+
var render$e = "file:./render.php";
|
|
387
|
+
var attributes$e = {
|
|
391
388
|
label: {
|
|
392
389
|
type: "string",
|
|
393
390
|
"default": "Button label",
|
|
@@ -408,7 +405,8 @@ var attributes$9 = {
|
|
|
408
405
|
"enum": [
|
|
409
406
|
"small",
|
|
410
407
|
"medium",
|
|
411
|
-
"large"
|
|
408
|
+
"large",
|
|
409
|
+
"xlarge"
|
|
412
410
|
],
|
|
413
411
|
"default": "large",
|
|
414
412
|
description: "Controls the overall dimensions of the button"
|
|
@@ -467,11 +465,11 @@ var attributes$9 = {
|
|
|
467
465
|
},
|
|
468
466
|
iconLeft: {
|
|
469
467
|
type: "string",
|
|
470
|
-
description: "Icon
|
|
468
|
+
description: "Icon on the left with variant prefix (e.g., 'filled_circle', 'outlined_circle')"
|
|
471
469
|
},
|
|
472
470
|
iconRight: {
|
|
473
471
|
type: "string",
|
|
474
|
-
description: "Icon
|
|
472
|
+
description: "Icon on the right with variant prefix (e.g., 'filled_circle', 'outlined_circle')"
|
|
475
473
|
},
|
|
476
474
|
ariaLabel: {
|
|
477
475
|
type: "string",
|
|
@@ -489,24 +487,22 @@ var attributes$9 = {
|
|
|
489
487
|
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
490
488
|
}
|
|
491
489
|
};
|
|
492
|
-
var editorScript = "
|
|
493
|
-
var
|
|
494
|
-
var style = "file:./style.css";
|
|
490
|
+
var editorScript$e = "times-design-system";
|
|
491
|
+
var script$e = "times-design-system";
|
|
495
492
|
var metadata$9 = {
|
|
496
|
-
$schema: $schema$
|
|
497
|
-
apiVersion: apiVersion$
|
|
498
|
-
name: name$
|
|
499
|
-
title: title$
|
|
500
|
-
category: category$
|
|
501
|
-
description: description$
|
|
502
|
-
icon: icon$
|
|
503
|
-
supports: supports$
|
|
504
|
-
textdomain: textdomain,
|
|
505
|
-
render: render$
|
|
506
|
-
attributes: attributes$
|
|
507
|
-
editorScript: editorScript,
|
|
508
|
-
|
|
509
|
-
style: style
|
|
493
|
+
$schema: $schema$e,
|
|
494
|
+
apiVersion: apiVersion$e,
|
|
495
|
+
name: name$e,
|
|
496
|
+
title: title$e,
|
|
497
|
+
category: category$e,
|
|
498
|
+
description: description$e,
|
|
499
|
+
icon: icon$e,
|
|
500
|
+
supports: supports$e,
|
|
501
|
+
textdomain: textdomain$5,
|
|
502
|
+
render: render$e,
|
|
503
|
+
attributes: attributes$e,
|
|
504
|
+
editorScript: editorScript$e,
|
|
505
|
+
script: script$e
|
|
510
506
|
};
|
|
511
507
|
|
|
512
508
|
blocks.registerBlockType(metadata$9.name, _objectSpread2(_objectSpread2({}, metadata$9), {}, {
|
|
@@ -514,14 +510,14 @@ blocks.registerBlockType(metadata$9.name, _objectSpread2(_objectSpread2({}, meta
|
|
|
514
510
|
save: Save
|
|
515
511
|
}));
|
|
516
512
|
|
|
517
|
-
var $schema$
|
|
518
|
-
var apiVersion$
|
|
519
|
-
var name$
|
|
520
|
-
var title$
|
|
521
|
-
var category$
|
|
522
|
-
var description$
|
|
523
|
-
var icon$
|
|
524
|
-
var supports$
|
|
513
|
+
var $schema$d = "https://schemas.wp.org/trunk/block.json";
|
|
514
|
+
var apiVersion$d = 3;
|
|
515
|
+
var name$d = "tds/divider";
|
|
516
|
+
var title$d = "Divider";
|
|
517
|
+
var category$d = "common";
|
|
518
|
+
var description$d = "A horizontal line divider component";
|
|
519
|
+
var icon$d = "minus";
|
|
520
|
+
var supports$d = {
|
|
525
521
|
html: false,
|
|
526
522
|
spacing: {
|
|
527
523
|
margin: true
|
|
@@ -531,8 +527,8 @@ var supports$8 = {
|
|
|
531
527
|
"full"
|
|
532
528
|
]
|
|
533
529
|
};
|
|
534
|
-
var render$
|
|
535
|
-
var attributes$
|
|
530
|
+
var render$d = "file:./render.php";
|
|
531
|
+
var attributes$d = {
|
|
536
532
|
isDashed: {
|
|
537
533
|
type: "boolean",
|
|
538
534
|
"default": false
|
|
@@ -559,21 +555,25 @@ var attributes$8 = {
|
|
|
559
555
|
};
|
|
560
556
|
var example$8 = {
|
|
561
557
|
};
|
|
558
|
+
var script$d = "times-design-system";
|
|
559
|
+
var editorScript$d = "times-design-system";
|
|
562
560
|
var metadata$8 = {
|
|
563
|
-
$schema: $schema$
|
|
564
|
-
apiVersion: apiVersion$
|
|
565
|
-
name: name$
|
|
566
|
-
title: title$
|
|
567
|
-
category: category$
|
|
568
|
-
description: description$
|
|
569
|
-
icon: icon$
|
|
570
|
-
supports: supports$
|
|
571
|
-
render: render$
|
|
572
|
-
attributes: attributes$
|
|
573
|
-
example: example$8
|
|
561
|
+
$schema: $schema$d,
|
|
562
|
+
apiVersion: apiVersion$d,
|
|
563
|
+
name: name$d,
|
|
564
|
+
title: title$d,
|
|
565
|
+
category: category$d,
|
|
566
|
+
description: description$d,
|
|
567
|
+
icon: icon$d,
|
|
568
|
+
supports: supports$d,
|
|
569
|
+
render: render$d,
|
|
570
|
+
attributes: attributes$d,
|
|
571
|
+
example: example$8,
|
|
572
|
+
script: script$d,
|
|
573
|
+
editorScript: editorScript$d
|
|
574
574
|
};
|
|
575
575
|
|
|
576
|
-
var edit$
|
|
576
|
+
var edit$d = function edit(_ref) {
|
|
577
577
|
var attributes = _ref.attributes,
|
|
578
578
|
setAttributes = _ref.setAttributes;
|
|
579
579
|
var isDashed = attributes.isDashed,
|
|
@@ -639,7 +639,7 @@ var edit$8 = function edit(_ref) {
|
|
|
639
639
|
})));
|
|
640
640
|
};
|
|
641
641
|
|
|
642
|
-
var save$
|
|
642
|
+
var save$d = function save(_ref) {
|
|
643
643
|
var attributes = _ref.attributes;
|
|
644
644
|
var isDashed = attributes.isDashed,
|
|
645
645
|
isVertical = attributes.isVertical,
|
|
@@ -658,26 +658,26 @@ var save$8 = function save(_ref) {
|
|
|
658
658
|
};
|
|
659
659
|
|
|
660
660
|
blocks.registerBlockType(metadata$8.name, _objectSpread2(_objectSpread2({}, metadata$8), {}, {
|
|
661
|
-
edit: edit$
|
|
662
|
-
save: save$
|
|
661
|
+
edit: edit$d,
|
|
662
|
+
save: save$d
|
|
663
663
|
}));
|
|
664
664
|
|
|
665
|
-
var $schema$
|
|
666
|
-
var apiVersion$
|
|
667
|
-
var name$
|
|
668
|
-
var title$
|
|
669
|
-
var category$
|
|
670
|
-
var description$
|
|
671
|
-
var icon$
|
|
672
|
-
var supports$
|
|
665
|
+
var $schema$c = "https://schemas.wp.org/trunk/block.json";
|
|
666
|
+
var apiVersion$c = 3;
|
|
667
|
+
var name$c = "tds/text";
|
|
668
|
+
var title$c = "Text";
|
|
669
|
+
var category$c = "common";
|
|
670
|
+
var description$c = "Typography component for displaying text with style variants";
|
|
671
|
+
var icon$c = "editor-paragraph";
|
|
672
|
+
var supports$c = {
|
|
673
673
|
html: false,
|
|
674
674
|
spacing: {
|
|
675
675
|
margin: true,
|
|
676
676
|
padding: false
|
|
677
677
|
}
|
|
678
678
|
};
|
|
679
|
-
var render$
|
|
680
|
-
var attributes$
|
|
679
|
+
var render$c = "file:./render.php";
|
|
680
|
+
var attributes$c = {
|
|
681
681
|
as: {
|
|
682
682
|
type: "string",
|
|
683
683
|
"default": "p",
|
|
@@ -713,21 +713,25 @@ var attributes$7 = {
|
|
|
713
713
|
};
|
|
714
714
|
var example$7 = {
|
|
715
715
|
};
|
|
716
|
+
var script$c = "times-design-system";
|
|
717
|
+
var editorScript$c = "times-design-system";
|
|
716
718
|
var metadata$7 = {
|
|
717
|
-
$schema: $schema$
|
|
718
|
-
apiVersion: apiVersion$
|
|
719
|
-
name: name$
|
|
720
|
-
title: title$
|
|
721
|
-
category: category$
|
|
722
|
-
description: description$
|
|
723
|
-
icon: icon$
|
|
724
|
-
supports: supports$
|
|
725
|
-
render: render$
|
|
726
|
-
attributes: attributes$
|
|
727
|
-
example: example$7
|
|
719
|
+
$schema: $schema$c,
|
|
720
|
+
apiVersion: apiVersion$c,
|
|
721
|
+
name: name$c,
|
|
722
|
+
title: title$c,
|
|
723
|
+
category: category$c,
|
|
724
|
+
description: description$c,
|
|
725
|
+
icon: icon$c,
|
|
726
|
+
supports: supports$c,
|
|
727
|
+
render: render$c,
|
|
728
|
+
attributes: attributes$c,
|
|
729
|
+
example: example$7,
|
|
730
|
+
script: script$c,
|
|
731
|
+
editorScript: editorScript$c
|
|
728
732
|
};
|
|
729
733
|
|
|
730
|
-
var edit$
|
|
734
|
+
var edit$c = function edit(_ref) {
|
|
731
735
|
var attributes = _ref.attributes,
|
|
732
736
|
setAttributes = _ref.setAttributes;
|
|
733
737
|
var as = attributes.as,
|
|
@@ -819,7 +823,7 @@ var edit$7 = function edit(_ref) {
|
|
|
819
823
|
})));
|
|
820
824
|
};
|
|
821
825
|
|
|
822
|
-
var save$
|
|
826
|
+
var save$c = function save(_ref) {
|
|
823
827
|
var attributes = _ref.attributes;
|
|
824
828
|
var as = attributes.as,
|
|
825
829
|
typographyStyle = attributes.typographyStyle,
|
|
@@ -834,25 +838,25 @@ var save$7 = function save(_ref) {
|
|
|
834
838
|
};
|
|
835
839
|
|
|
836
840
|
blocks.registerBlockType(metadata$7.name, _objectSpread2(_objectSpread2({}, metadata$7), {}, {
|
|
837
|
-
edit: edit$
|
|
838
|
-
save: save$
|
|
841
|
+
edit: edit$c,
|
|
842
|
+
save: save$c
|
|
839
843
|
}));
|
|
840
844
|
|
|
841
|
-
var $schema$
|
|
842
|
-
var apiVersion$
|
|
843
|
-
var name$
|
|
844
|
-
var title$
|
|
845
|
-
var category$
|
|
846
|
-
var description$
|
|
847
|
-
var icon$
|
|
848
|
-
var supports$
|
|
845
|
+
var $schema$b = "https://schemas.wp.org/trunk/block.json";
|
|
846
|
+
var apiVersion$b = 3;
|
|
847
|
+
var name$b = "tds/input";
|
|
848
|
+
var title$b = "Input";
|
|
849
|
+
var category$b = "common";
|
|
850
|
+
var description$b = "Form input field component";
|
|
851
|
+
var icon$b = "text";
|
|
852
|
+
var supports$b = {
|
|
849
853
|
html: false,
|
|
850
854
|
spacing: {
|
|
851
855
|
margin: true
|
|
852
856
|
}
|
|
853
857
|
};
|
|
854
|
-
var render$
|
|
855
|
-
var attributes$
|
|
858
|
+
var render$b = "file:./render.php";
|
|
859
|
+
var attributes$b = {
|
|
856
860
|
label: {
|
|
857
861
|
type: "string",
|
|
858
862
|
"default": ""
|
|
@@ -903,21 +907,25 @@ var attributes$6 = {
|
|
|
903
907
|
};
|
|
904
908
|
var example$6 = {
|
|
905
909
|
};
|
|
910
|
+
var script$b = "times-design-system";
|
|
911
|
+
var editorScript$b = "times-design-system";
|
|
906
912
|
var metadata$6 = {
|
|
907
|
-
$schema: $schema$
|
|
908
|
-
apiVersion: apiVersion$
|
|
909
|
-
name: name$
|
|
910
|
-
title: title$
|
|
911
|
-
category: category$
|
|
912
|
-
description: description$
|
|
913
|
-
icon: icon$
|
|
914
|
-
supports: supports$
|
|
915
|
-
render: render$
|
|
916
|
-
attributes: attributes$
|
|
917
|
-
example: example$6
|
|
913
|
+
$schema: $schema$b,
|
|
914
|
+
apiVersion: apiVersion$b,
|
|
915
|
+
name: name$b,
|
|
916
|
+
title: title$b,
|
|
917
|
+
category: category$b,
|
|
918
|
+
description: description$b,
|
|
919
|
+
icon: icon$b,
|
|
920
|
+
supports: supports$b,
|
|
921
|
+
render: render$b,
|
|
922
|
+
attributes: attributes$b,
|
|
923
|
+
example: example$6,
|
|
924
|
+
script: script$b,
|
|
925
|
+
editorScript: editorScript$b
|
|
918
926
|
};
|
|
919
927
|
|
|
920
|
-
var edit$
|
|
928
|
+
var edit$b = function edit(_ref) {
|
|
921
929
|
var attributes = _ref.attributes,
|
|
922
930
|
setAttributes = _ref.setAttributes;
|
|
923
931
|
var label = attributes.label,
|
|
@@ -1039,7 +1047,7 @@ var edit$6 = function edit(_ref) {
|
|
|
1039
1047
|
})));
|
|
1040
1048
|
};
|
|
1041
1049
|
|
|
1042
|
-
var save$
|
|
1050
|
+
var save$b = function save(_ref) {
|
|
1043
1051
|
var attributes = _ref.attributes;
|
|
1044
1052
|
var label = attributes.label,
|
|
1045
1053
|
placeholder = attributes.placeholder,
|
|
@@ -1064,28 +1072,29 @@ var save$6 = function save(_ref) {
|
|
|
1064
1072
|
};
|
|
1065
1073
|
|
|
1066
1074
|
blocks.registerBlockType(metadata$6.name, _objectSpread2(_objectSpread2({}, metadata$6), {}, {
|
|
1067
|
-
edit: edit$
|
|
1068
|
-
save: save$
|
|
1075
|
+
edit: edit$b,
|
|
1076
|
+
save: save$b
|
|
1069
1077
|
}));
|
|
1070
1078
|
|
|
1071
|
-
var $schema$
|
|
1072
|
-
var apiVersion$
|
|
1073
|
-
var name$
|
|
1074
|
-
var title$
|
|
1075
|
-
var category$
|
|
1076
|
-
var description$
|
|
1077
|
-
var icon$
|
|
1078
|
-
var supports$
|
|
1079
|
+
var $schema$a = "https://schemas.wp.org/trunk/block.json";
|
|
1080
|
+
var apiVersion$a = 3;
|
|
1081
|
+
var name$a = "tds/icon-button";
|
|
1082
|
+
var title$a = "Icon Button";
|
|
1083
|
+
var category$a = "common";
|
|
1084
|
+
var description$a = "Button component displaying only an icon";
|
|
1085
|
+
var icon$a = "button";
|
|
1086
|
+
var supports$a = {
|
|
1079
1087
|
html: false,
|
|
1080
1088
|
spacing: {
|
|
1081
1089
|
margin: true
|
|
1082
1090
|
}
|
|
1083
1091
|
};
|
|
1084
|
-
var render$
|
|
1085
|
-
var attributes$
|
|
1092
|
+
var render$a = "file:./render.php";
|
|
1093
|
+
var attributes$a = {
|
|
1086
1094
|
iconName: {
|
|
1087
1095
|
type: "string",
|
|
1088
|
-
"default": ""
|
|
1096
|
+
"default": "",
|
|
1097
|
+
description: "Icon name with variant prefix (e.g., 'filled_accessibility', 'outlined_accessibility')"
|
|
1089
1098
|
},
|
|
1090
1099
|
iconSize: {
|
|
1091
1100
|
type: "string",
|
|
@@ -1146,21 +1155,25 @@ var attributes$5 = {
|
|
|
1146
1155
|
};
|
|
1147
1156
|
var example$5 = {
|
|
1148
1157
|
};
|
|
1158
|
+
var script$a = "times-design-system";
|
|
1159
|
+
var editorScript$a = "times-design-system";
|
|
1149
1160
|
var metadata$5 = {
|
|
1150
|
-
$schema: $schema$
|
|
1151
|
-
apiVersion: apiVersion$
|
|
1152
|
-
name: name$
|
|
1153
|
-
title: title$
|
|
1154
|
-
category: category$
|
|
1155
|
-
description: description$
|
|
1156
|
-
icon: icon$
|
|
1157
|
-
supports: supports$
|
|
1158
|
-
render: render$
|
|
1159
|
-
attributes: attributes$
|
|
1160
|
-
example: example$5
|
|
1161
|
+
$schema: $schema$a,
|
|
1162
|
+
apiVersion: apiVersion$a,
|
|
1163
|
+
name: name$a,
|
|
1164
|
+
title: title$a,
|
|
1165
|
+
category: category$a,
|
|
1166
|
+
description: description$a,
|
|
1167
|
+
icon: icon$a,
|
|
1168
|
+
supports: supports$a,
|
|
1169
|
+
render: render$a,
|
|
1170
|
+
attributes: attributes$a,
|
|
1171
|
+
example: example$5,
|
|
1172
|
+
script: script$a,
|
|
1173
|
+
editorScript: editorScript$a
|
|
1161
1174
|
};
|
|
1162
1175
|
|
|
1163
|
-
var edit$
|
|
1176
|
+
var edit$a = function edit(_ref) {
|
|
1164
1177
|
var attributes = _ref.attributes,
|
|
1165
1178
|
setAttributes = _ref.setAttributes;
|
|
1166
1179
|
var iconName = attributes.iconName,
|
|
@@ -1282,7 +1295,7 @@ var edit$5 = function edit(_ref) {
|
|
|
1282
1295
|
}, iconName)));
|
|
1283
1296
|
};
|
|
1284
1297
|
|
|
1285
|
-
var save$
|
|
1298
|
+
var save$a = function save(_ref) {
|
|
1286
1299
|
var attributes = _ref.attributes;
|
|
1287
1300
|
var iconName = attributes.iconName,
|
|
1288
1301
|
round = attributes.round,
|
|
@@ -1309,25 +1322,25 @@ var save$5 = function save(_ref) {
|
|
|
1309
1322
|
};
|
|
1310
1323
|
|
|
1311
1324
|
blocks.registerBlockType(metadata$5.name, _objectSpread2(_objectSpread2({}, metadata$5), {}, {
|
|
1312
|
-
edit: edit$
|
|
1313
|
-
save: save$
|
|
1325
|
+
edit: edit$a,
|
|
1326
|
+
save: save$a
|
|
1314
1327
|
}));
|
|
1315
1328
|
|
|
1316
|
-
var $schema$
|
|
1317
|
-
var apiVersion$
|
|
1318
|
-
var name$
|
|
1319
|
-
var title$
|
|
1320
|
-
var category$
|
|
1321
|
-
var description$
|
|
1322
|
-
var icon$
|
|
1323
|
-
var supports$
|
|
1329
|
+
var $schema$9 = "https://schemas.wp.org/trunk/block.json";
|
|
1330
|
+
var apiVersion$9 = 3;
|
|
1331
|
+
var name$9 = "tds/chip";
|
|
1332
|
+
var title$9 = "Chip";
|
|
1333
|
+
var category$9 = "common";
|
|
1334
|
+
var description$9 = "Small component for displaying labels, tags, or filter options";
|
|
1335
|
+
var icon$9 = "tag";
|
|
1336
|
+
var supports$9 = {
|
|
1324
1337
|
html: false,
|
|
1325
1338
|
spacing: {
|
|
1326
1339
|
margin: true
|
|
1327
1340
|
}
|
|
1328
1341
|
};
|
|
1329
|
-
var render$
|
|
1330
|
-
var attributes$
|
|
1342
|
+
var render$9 = "file:./render.php";
|
|
1343
|
+
var attributes$9 = {
|
|
1331
1344
|
content: {
|
|
1332
1345
|
type: "string",
|
|
1333
1346
|
"default": ""
|
|
@@ -1358,11 +1371,13 @@ var attributes$4 = {
|
|
|
1358
1371
|
},
|
|
1359
1372
|
iconLeft: {
|
|
1360
1373
|
type: "string",
|
|
1361
|
-
"default": ""
|
|
1374
|
+
"default": "",
|
|
1375
|
+
description: "Icon on the left with variant prefix (e.g., 'filled_circle')"
|
|
1362
1376
|
},
|
|
1363
1377
|
iconRight: {
|
|
1364
1378
|
type: "string",
|
|
1365
|
-
"default": ""
|
|
1379
|
+
"default": "",
|
|
1380
|
+
description: "Icon on the right with variant prefix (e.g., 'outlined_circle')"
|
|
1366
1381
|
},
|
|
1367
1382
|
ariaLabel: {
|
|
1368
1383
|
type: "string",
|
|
@@ -1382,21 +1397,25 @@ var attributes$4 = {
|
|
|
1382
1397
|
};
|
|
1383
1398
|
var example$4 = {
|
|
1384
1399
|
};
|
|
1400
|
+
var script$9 = "times-design-system";
|
|
1401
|
+
var editorScript$9 = "times-design-system";
|
|
1385
1402
|
var metadata$4 = {
|
|
1386
|
-
$schema: $schema$
|
|
1387
|
-
apiVersion: apiVersion$
|
|
1388
|
-
name: name$
|
|
1389
|
-
title: title$
|
|
1390
|
-
category: category$
|
|
1391
|
-
description: description$
|
|
1392
|
-
icon: icon$
|
|
1393
|
-
supports: supports$
|
|
1394
|
-
render: render$
|
|
1395
|
-
attributes: attributes$
|
|
1396
|
-
example: example$4
|
|
1403
|
+
$schema: $schema$9,
|
|
1404
|
+
apiVersion: apiVersion$9,
|
|
1405
|
+
name: name$9,
|
|
1406
|
+
title: title$9,
|
|
1407
|
+
category: category$9,
|
|
1408
|
+
description: description$9,
|
|
1409
|
+
icon: icon$9,
|
|
1410
|
+
supports: supports$9,
|
|
1411
|
+
render: render$9,
|
|
1412
|
+
attributes: attributes$9,
|
|
1413
|
+
example: example$4,
|
|
1414
|
+
script: script$9,
|
|
1415
|
+
editorScript: editorScript$9
|
|
1397
1416
|
};
|
|
1398
1417
|
|
|
1399
|
-
var edit$
|
|
1418
|
+
var edit$9 = function edit(_ref) {
|
|
1400
1419
|
var attributes = _ref.attributes,
|
|
1401
1420
|
setAttributes = _ref.setAttributes;
|
|
1402
1421
|
var content = attributes.content,
|
|
@@ -1528,7 +1547,7 @@ var edit$4 = function edit(_ref) {
|
|
|
1528
1547
|
}, iconRight)));
|
|
1529
1548
|
};
|
|
1530
1549
|
|
|
1531
|
-
var save$
|
|
1550
|
+
var save$9 = function save(_ref) {
|
|
1532
1551
|
var attributes = _ref.attributes;
|
|
1533
1552
|
var content = attributes.content,
|
|
1534
1553
|
intent = attributes.intent,
|
|
@@ -1563,25 +1582,25 @@ var save$4 = function save(_ref) {
|
|
|
1563
1582
|
};
|
|
1564
1583
|
|
|
1565
1584
|
blocks.registerBlockType(metadata$4.name, _objectSpread2(_objectSpread2({}, metadata$4), {}, {
|
|
1566
|
-
edit: edit$
|
|
1567
|
-
save: save$
|
|
1585
|
+
edit: edit$9,
|
|
1586
|
+
save: save$9
|
|
1568
1587
|
}));
|
|
1569
1588
|
|
|
1570
|
-
var $schema$
|
|
1571
|
-
var apiVersion$
|
|
1572
|
-
var name$
|
|
1573
|
-
var title$
|
|
1574
|
-
var category$
|
|
1575
|
-
var description$
|
|
1576
|
-
var icon$
|
|
1577
|
-
var supports$
|
|
1589
|
+
var $schema$8 = "https://schemas.wp.org/trunk/block.json";
|
|
1590
|
+
var apiVersion$8 = 3;
|
|
1591
|
+
var name$8 = "tds/flag";
|
|
1592
|
+
var title$8 = "Flag";
|
|
1593
|
+
var category$8 = "common";
|
|
1594
|
+
var description$8 = "Badge or status indicator component";
|
|
1595
|
+
var icon$8 = "flag";
|
|
1596
|
+
var supports$8 = {
|
|
1578
1597
|
html: false,
|
|
1579
1598
|
spacing: {
|
|
1580
1599
|
margin: true
|
|
1581
1600
|
}
|
|
1582
1601
|
};
|
|
1583
|
-
var render$
|
|
1584
|
-
var attributes$
|
|
1602
|
+
var render$8 = "file:./render.php";
|
|
1603
|
+
var attributes$8 = {
|
|
1585
1604
|
label: {
|
|
1586
1605
|
type: "string",
|
|
1587
1606
|
"default": ""
|
|
@@ -1611,11 +1630,13 @@ var attributes$3 = {
|
|
|
1611
1630
|
},
|
|
1612
1631
|
iconLeft: {
|
|
1613
1632
|
type: "string",
|
|
1614
|
-
"default": ""
|
|
1633
|
+
"default": "",
|
|
1634
|
+
description: "Icon on the left with variant prefix (e.g., 'filled_check')"
|
|
1615
1635
|
},
|
|
1616
1636
|
iconRight: {
|
|
1617
1637
|
type: "string",
|
|
1618
|
-
"default": ""
|
|
1638
|
+
"default": "",
|
|
1639
|
+
description: "Icon on the right with variant prefix (e.g., 'outlined_check')"
|
|
1619
1640
|
},
|
|
1620
1641
|
ariaLabel: {
|
|
1621
1642
|
type: "string",
|
|
@@ -1635,21 +1656,25 @@ var attributes$3 = {
|
|
|
1635
1656
|
};
|
|
1636
1657
|
var example$3 = {
|
|
1637
1658
|
};
|
|
1659
|
+
var script$8 = "times-design-system";
|
|
1660
|
+
var editorScript$8 = "times-design-system";
|
|
1638
1661
|
var metadata$3 = {
|
|
1639
|
-
$schema: $schema$
|
|
1640
|
-
apiVersion: apiVersion$
|
|
1641
|
-
name: name$
|
|
1642
|
-
title: title$
|
|
1643
|
-
category: category$
|
|
1644
|
-
description: description$
|
|
1645
|
-
icon: icon$
|
|
1646
|
-
supports: supports$
|
|
1647
|
-
render: render$
|
|
1648
|
-
attributes: attributes$
|
|
1649
|
-
example: example$3
|
|
1662
|
+
$schema: $schema$8,
|
|
1663
|
+
apiVersion: apiVersion$8,
|
|
1664
|
+
name: name$8,
|
|
1665
|
+
title: title$8,
|
|
1666
|
+
category: category$8,
|
|
1667
|
+
description: description$8,
|
|
1668
|
+
icon: icon$8,
|
|
1669
|
+
supports: supports$8,
|
|
1670
|
+
render: render$8,
|
|
1671
|
+
attributes: attributes$8,
|
|
1672
|
+
example: example$3,
|
|
1673
|
+
script: script$8,
|
|
1674
|
+
editorScript: editorScript$8
|
|
1650
1675
|
};
|
|
1651
1676
|
|
|
1652
|
-
var edit$
|
|
1677
|
+
var edit$8 = function edit(_ref) {
|
|
1653
1678
|
var attributes = _ref.attributes,
|
|
1654
1679
|
setAttributes = _ref.setAttributes;
|
|
1655
1680
|
var label = attributes.label,
|
|
@@ -1781,7 +1806,7 @@ var edit$3 = function edit(_ref) {
|
|
|
1781
1806
|
}, iconRight)));
|
|
1782
1807
|
};
|
|
1783
1808
|
|
|
1784
|
-
var save$
|
|
1809
|
+
var save$8 = function save(_ref) {
|
|
1785
1810
|
var attributes = _ref.attributes;
|
|
1786
1811
|
var label = attributes.label,
|
|
1787
1812
|
content = attributes.content,
|
|
@@ -1813,25 +1838,25 @@ var save$3 = function save(_ref) {
|
|
|
1813
1838
|
};
|
|
1814
1839
|
|
|
1815
1840
|
blocks.registerBlockType(metadata$3.name, _objectSpread2(_objectSpread2({}, metadata$3), {}, {
|
|
1816
|
-
edit: edit$
|
|
1817
|
-
save: save$
|
|
1841
|
+
edit: edit$8,
|
|
1842
|
+
save: save$8
|
|
1818
1843
|
}));
|
|
1819
1844
|
|
|
1820
|
-
var $schema$
|
|
1821
|
-
var apiVersion$
|
|
1822
|
-
var name$
|
|
1823
|
-
var title$
|
|
1824
|
-
var category$
|
|
1825
|
-
var description$
|
|
1826
|
-
var icon$
|
|
1827
|
-
var supports$
|
|
1845
|
+
var $schema$7 = "https://schemas.wp.org/trunk/block.json";
|
|
1846
|
+
var apiVersion$7 = 3;
|
|
1847
|
+
var name$7 = "tds/toast";
|
|
1848
|
+
var title$7 = "Toast";
|
|
1849
|
+
var category$7 = "common";
|
|
1850
|
+
var description$7 = "Notification toast component";
|
|
1851
|
+
var icon$7 = "bell";
|
|
1852
|
+
var supports$7 = {
|
|
1828
1853
|
html: false,
|
|
1829
1854
|
spacing: {
|
|
1830
1855
|
margin: true
|
|
1831
1856
|
}
|
|
1832
1857
|
};
|
|
1833
|
-
var render$
|
|
1834
|
-
var attributes$
|
|
1858
|
+
var render$7 = "file:./render.php";
|
|
1859
|
+
var attributes$7 = {
|
|
1835
1860
|
label: {
|
|
1836
1861
|
type: "string",
|
|
1837
1862
|
"default": ""
|
|
@@ -1872,21 +1897,25 @@ var attributes$2 = {
|
|
|
1872
1897
|
};
|
|
1873
1898
|
var example$2 = {
|
|
1874
1899
|
};
|
|
1900
|
+
var script$7 = "times-design-system";
|
|
1901
|
+
var editorScript$7 = "times-design-system";
|
|
1875
1902
|
var metadata$2 = {
|
|
1876
|
-
$schema: $schema$
|
|
1877
|
-
apiVersion: apiVersion$
|
|
1878
|
-
name: name$
|
|
1879
|
-
title: title$
|
|
1880
|
-
category: category$
|
|
1881
|
-
description: description$
|
|
1882
|
-
icon: icon$
|
|
1883
|
-
supports: supports$
|
|
1884
|
-
render: render$
|
|
1885
|
-
attributes: attributes$
|
|
1886
|
-
example: example$2
|
|
1903
|
+
$schema: $schema$7,
|
|
1904
|
+
apiVersion: apiVersion$7,
|
|
1905
|
+
name: name$7,
|
|
1906
|
+
title: title$7,
|
|
1907
|
+
category: category$7,
|
|
1908
|
+
description: description$7,
|
|
1909
|
+
icon: icon$7,
|
|
1910
|
+
supports: supports$7,
|
|
1911
|
+
render: render$7,
|
|
1912
|
+
attributes: attributes$7,
|
|
1913
|
+
example: example$2,
|
|
1914
|
+
script: script$7,
|
|
1915
|
+
editorScript: editorScript$7
|
|
1887
1916
|
};
|
|
1888
1917
|
|
|
1889
|
-
var edit$
|
|
1918
|
+
var edit$7 = function edit(_ref) {
|
|
1890
1919
|
var attributes = _ref.attributes,
|
|
1891
1920
|
setAttributes = _ref.setAttributes;
|
|
1892
1921
|
var label = attributes.label,
|
|
@@ -1998,7 +2027,7 @@ var edit$2 = function edit(_ref) {
|
|
|
1998
2027
|
}, linkLabel)));
|
|
1999
2028
|
};
|
|
2000
2029
|
|
|
2001
|
-
var save$
|
|
2030
|
+
var save$7 = function save(_ref) {
|
|
2002
2031
|
var attributes = _ref.attributes;
|
|
2003
2032
|
var label = attributes.label,
|
|
2004
2033
|
intent = attributes.intent,
|
|
@@ -2027,25 +2056,25 @@ var save$2 = function save(_ref) {
|
|
|
2027
2056
|
};
|
|
2028
2057
|
|
|
2029
2058
|
blocks.registerBlockType(metadata$2.name, _objectSpread2(_objectSpread2({}, metadata$2), {}, {
|
|
2030
|
-
edit: edit$
|
|
2031
|
-
save: save$
|
|
2059
|
+
edit: edit$7,
|
|
2060
|
+
save: save$7
|
|
2032
2061
|
}));
|
|
2033
2062
|
|
|
2034
|
-
var $schema$
|
|
2035
|
-
var apiVersion$
|
|
2036
|
-
var name$
|
|
2037
|
-
var title$
|
|
2038
|
-
var category$
|
|
2039
|
-
var description$
|
|
2040
|
-
var icon$
|
|
2041
|
-
var supports$
|
|
2063
|
+
var $schema$6 = "https://schemas.wp.org/trunk/block.json";
|
|
2064
|
+
var apiVersion$6 = 3;
|
|
2065
|
+
var name$6 = "tds/link";
|
|
2066
|
+
var title$6 = "Link";
|
|
2067
|
+
var category$6 = "common";
|
|
2068
|
+
var description$6 = "Styled link component with variants and states";
|
|
2069
|
+
var icon$6 = "link";
|
|
2070
|
+
var supports$6 = {
|
|
2042
2071
|
html: false,
|
|
2043
2072
|
spacing: {
|
|
2044
2073
|
margin: true
|
|
2045
2074
|
}
|
|
2046
2075
|
};
|
|
2047
|
-
var render$
|
|
2048
|
-
var attributes$
|
|
2076
|
+
var render$6 = "file:./render.php";
|
|
2077
|
+
var attributes$6 = {
|
|
2049
2078
|
href: {
|
|
2050
2079
|
type: "string",
|
|
2051
2080
|
"default": ""
|
|
@@ -2082,11 +2111,13 @@ var attributes$1 = {
|
|
|
2082
2111
|
},
|
|
2083
2112
|
iconLeft: {
|
|
2084
2113
|
type: "string",
|
|
2085
|
-
"default": ""
|
|
2114
|
+
"default": "",
|
|
2115
|
+
description: "Icon on the left with variant prefix (e.g., 'filled_external-link')"
|
|
2086
2116
|
},
|
|
2087
2117
|
iconRight: {
|
|
2088
2118
|
type: "string",
|
|
2089
|
-
"default": ""
|
|
2119
|
+
"default": "",
|
|
2120
|
+
description: "Icon on the right with variant prefix (e.g., 'outlined_external-link')"
|
|
2090
2121
|
},
|
|
2091
2122
|
inline: {
|
|
2092
2123
|
type: "boolean",
|
|
@@ -2124,26 +2155,30 @@ var attributes$1 = {
|
|
|
2124
2155
|
};
|
|
2125
2156
|
var example$1 = {
|
|
2126
2157
|
};
|
|
2158
|
+
var script$6 = "times-design-system";
|
|
2159
|
+
var editorScript$6 = "times-design-system";
|
|
2127
2160
|
var metadata$1 = {
|
|
2128
|
-
$schema: $schema$
|
|
2129
|
-
apiVersion: apiVersion$
|
|
2130
|
-
name: name$
|
|
2131
|
-
title: title$
|
|
2132
|
-
category: category$
|
|
2133
|
-
description: description$
|
|
2134
|
-
icon: icon$
|
|
2135
|
-
supports: supports$
|
|
2136
|
-
render: render$
|
|
2137
|
-
attributes: attributes$
|
|
2138
|
-
example: example$1
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
var
|
|
2145
|
-
|
|
2146
|
-
|
|
2161
|
+
$schema: $schema$6,
|
|
2162
|
+
apiVersion: apiVersion$6,
|
|
2163
|
+
name: name$6,
|
|
2164
|
+
title: title$6,
|
|
2165
|
+
category: category$6,
|
|
2166
|
+
description: description$6,
|
|
2167
|
+
icon: icon$6,
|
|
2168
|
+
supports: supports$6,
|
|
2169
|
+
render: render$6,
|
|
2170
|
+
attributes: attributes$6,
|
|
2171
|
+
example: example$1,
|
|
2172
|
+
script: script$6,
|
|
2173
|
+
editorScript: editorScript$6
|
|
2174
|
+
};
|
|
2175
|
+
|
|
2176
|
+
var edit$6 = function edit(_ref) {
|
|
2177
|
+
var attributes = _ref.attributes,
|
|
2178
|
+
setAttributes = _ref.setAttributes;
|
|
2179
|
+
var href = attributes.href,
|
|
2180
|
+
content = attributes.content,
|
|
2181
|
+
intent = attributes.intent,
|
|
2147
2182
|
sentiment = attributes.sentiment,
|
|
2148
2183
|
size = attributes.size,
|
|
2149
2184
|
iconLeft = attributes.iconLeft,
|
|
@@ -2327,7 +2362,7 @@ var edit$1 = function edit(_ref) {
|
|
|
2327
2362
|
}, iconRight)));
|
|
2328
2363
|
};
|
|
2329
2364
|
|
|
2330
|
-
var save$
|
|
2365
|
+
var save$6 = function save(_ref) {
|
|
2331
2366
|
var attributes = _ref.attributes;
|
|
2332
2367
|
var href = attributes.href,
|
|
2333
2368
|
content = attributes.content,
|
|
@@ -2368,26 +2403,26 @@ var save$1 = function save(_ref) {
|
|
|
2368
2403
|
};
|
|
2369
2404
|
|
|
2370
2405
|
blocks.registerBlockType(metadata$1.name, _objectSpread2(_objectSpread2({}, metadata$1), {}, {
|
|
2371
|
-
edit: edit$
|
|
2372
|
-
save: save$
|
|
2406
|
+
edit: edit$6,
|
|
2407
|
+
save: save$6
|
|
2373
2408
|
}));
|
|
2374
2409
|
|
|
2375
|
-
var $schema = "https://schemas.wp.org/trunk/block.json";
|
|
2376
|
-
var apiVersion = 3;
|
|
2377
|
-
var name = "tds/ad-container";
|
|
2378
|
-
var title = "Ad Container";
|
|
2379
|
-
var category = "common";
|
|
2380
|
-
var description = "Advertising container placeholder";
|
|
2381
|
-
var icon = "image";
|
|
2382
|
-
var supports = {
|
|
2410
|
+
var $schema$5 = "https://schemas.wp.org/trunk/block.json";
|
|
2411
|
+
var apiVersion$5 = 3;
|
|
2412
|
+
var name$5 = "tds/ad-container";
|
|
2413
|
+
var title$5 = "Ad Container";
|
|
2414
|
+
var category$5 = "common";
|
|
2415
|
+
var description$5 = "Advertising container placeholder";
|
|
2416
|
+
var icon$5 = "image";
|
|
2417
|
+
var supports$5 = {
|
|
2383
2418
|
html: false,
|
|
2384
2419
|
spacing: {
|
|
2385
2420
|
margin: true,
|
|
2386
2421
|
padding: true
|
|
2387
2422
|
}
|
|
2388
2423
|
};
|
|
2389
|
-
var render = "file:./render.php";
|
|
2390
|
-
var attributes = {
|
|
2424
|
+
var render$5 = "file:./render.php";
|
|
2425
|
+
var attributes$5 = {
|
|
2391
2426
|
type: {
|
|
2392
2427
|
type: "string",
|
|
2393
2428
|
"default": "inline",
|
|
@@ -2414,21 +2449,25 @@ var attributes = {
|
|
|
2414
2449
|
};
|
|
2415
2450
|
var example = {
|
|
2416
2451
|
};
|
|
2452
|
+
var script$5 = "times-design-system";
|
|
2453
|
+
var editorScript$5 = "times-design-system";
|
|
2417
2454
|
var metadata = {
|
|
2418
|
-
$schema: $schema,
|
|
2419
|
-
apiVersion: apiVersion,
|
|
2420
|
-
name: name,
|
|
2421
|
-
title: title,
|
|
2422
|
-
category: category,
|
|
2423
|
-
description: description,
|
|
2424
|
-
icon: icon,
|
|
2425
|
-
supports: supports,
|
|
2426
|
-
render: render,
|
|
2427
|
-
attributes: attributes,
|
|
2428
|
-
example: example
|
|
2455
|
+
$schema: $schema$5,
|
|
2456
|
+
apiVersion: apiVersion$5,
|
|
2457
|
+
name: name$5,
|
|
2458
|
+
title: title$5,
|
|
2459
|
+
category: category$5,
|
|
2460
|
+
description: description$5,
|
|
2461
|
+
icon: icon$5,
|
|
2462
|
+
supports: supports$5,
|
|
2463
|
+
render: render$5,
|
|
2464
|
+
attributes: attributes$5,
|
|
2465
|
+
example: example,
|
|
2466
|
+
script: script$5,
|
|
2467
|
+
editorScript: editorScript$5
|
|
2429
2468
|
};
|
|
2430
2469
|
|
|
2431
|
-
var edit = function edit(_ref) {
|
|
2470
|
+
var edit$5 = function edit(_ref) {
|
|
2432
2471
|
var attributes = _ref.attributes,
|
|
2433
2472
|
setAttributes = _ref.setAttributes;
|
|
2434
2473
|
var type = attributes.type,
|
|
@@ -2489,7 +2528,7 @@ var edit = function edit(_ref) {
|
|
|
2489
2528
|
}, /*#__PURE__*/React.createElement("p", null, "Ad Slot: ", slotID || '(not configured)'))));
|
|
2490
2529
|
};
|
|
2491
2530
|
|
|
2492
|
-
var save = function save(_ref) {
|
|
2531
|
+
var save$5 = function save(_ref) {
|
|
2493
2532
|
var attributes = _ref.attributes;
|
|
2494
2533
|
var type = attributes.type,
|
|
2495
2534
|
slotID = attributes.slotID;
|
|
@@ -2501,7 +2540,687 @@ var save = function save(_ref) {
|
|
|
2501
2540
|
};
|
|
2502
2541
|
|
|
2503
2542
|
blocks.registerBlockType(metadata.name, _objectSpread2(_objectSpread2({}, metadata), {}, {
|
|
2543
|
+
edit: edit$5,
|
|
2544
|
+
save: save$5
|
|
2545
|
+
}));
|
|
2546
|
+
|
|
2547
|
+
/**
|
|
2548
|
+
* Block Editor Component: Tab
|
|
2549
|
+
*
|
|
2550
|
+
* Renders the editor UI for the Tab block in Gutenberg.
|
|
2551
|
+
* Reference: packages/components-react/src/Tab/
|
|
2552
|
+
*/
|
|
2553
|
+
|
|
2554
|
+
function edit$4(props) {
|
|
2555
|
+
var attributes = props.attributes,
|
|
2556
|
+
setAttributes = props.setAttributes;
|
|
2557
|
+
attributes.content;
|
|
2558
|
+
var classes = attributes.classes;
|
|
2559
|
+
attributes.dataAttributes;
|
|
2560
|
+
var blockProps = blockEditor.useBlockProps();
|
|
2561
|
+
|
|
2562
|
+
// TODO: Implement editor UI based on component props
|
|
2563
|
+
// - Add inspector controls for attributes
|
|
2564
|
+
// - Render preview of component in editor
|
|
2565
|
+
// - Handle attribute changes via setAttributes()
|
|
2566
|
+
|
|
2567
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
2568
|
+
title: "Tab Settings",
|
|
2569
|
+
initialOpen: true
|
|
2570
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
2571
|
+
label: "Content",
|
|
2572
|
+
value: attributes.content || '',
|
|
2573
|
+
onChange: function onChange(content) {
|
|
2574
|
+
return setAttributes({
|
|
2575
|
+
content: content
|
|
2576
|
+
});
|
|
2577
|
+
},
|
|
2578
|
+
placeholder: "Enter content..."
|
|
2579
|
+
})), /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
2580
|
+
title: "Extensibility",
|
|
2581
|
+
initialOpen: false
|
|
2582
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
2583
|
+
label: "Custom Classes",
|
|
2584
|
+
value: classes || '',
|
|
2585
|
+
onChange: function onChange(val) {
|
|
2586
|
+
return setAttributes({
|
|
2587
|
+
classes: val
|
|
2588
|
+
});
|
|
2589
|
+
},
|
|
2590
|
+
placeholder: "class-name-1 class-name-2",
|
|
2591
|
+
help: "Space-separated CSS classes added to the tab element"
|
|
2592
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
2593
|
+
style: {
|
|
2594
|
+
fontSize: '12px',
|
|
2595
|
+
color: '#666',
|
|
2596
|
+
marginTop: '8px'
|
|
2597
|
+
}
|
|
2598
|
+
}, /*#__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, /*#__PURE__*/React.createElement("p", null, "\uD83D\uDCDD Tab block editor"), /*#__PURE__*/React.createElement("p", {
|
|
2599
|
+
style: {
|
|
2600
|
+
fontSize: '12px',
|
|
2601
|
+
color: '#666'
|
|
2602
|
+
}
|
|
2603
|
+
}, "TODO: Render the Tab component here with current attributes")));
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
/**
|
|
2607
|
+
* Block Save Component: Tab
|
|
2608
|
+
*
|
|
2609
|
+
* Renders the static output saved to the database.
|
|
2610
|
+
* Reference: packages/components-react/src/Tab/
|
|
2611
|
+
*/
|
|
2612
|
+
|
|
2613
|
+
function save$4(props) {
|
|
2614
|
+
var attributes = props.attributes;
|
|
2615
|
+
var blockProps = blockEditor.useBlockProps.save();
|
|
2616
|
+
|
|
2617
|
+
// TODO: Render the actual Tab component with attributes
|
|
2618
|
+
// This output is saved to the database and displayed on the frontend
|
|
2619
|
+
|
|
2620
|
+
return /*#__PURE__*/React.createElement("div", blockProps, attributes.content && /*#__PURE__*/React.createElement("p", null, attributes.content));
|
|
2621
|
+
}
|
|
2622
|
+
|
|
2623
|
+
var $schema$4 = "https://schemas.wp.org/trunk/block.json";
|
|
2624
|
+
var apiVersion$4 = 3;
|
|
2625
|
+
var name$4 = "tds/tab";
|
|
2626
|
+
var title$4 = "Times Design System - Tab";
|
|
2627
|
+
var category$4 = "common";
|
|
2628
|
+
var description$4 = "WordPress block for Times Design System Tab component";
|
|
2629
|
+
var icon$4 = "block-default";
|
|
2630
|
+
var supports$4 = {
|
|
2631
|
+
html: false,
|
|
2632
|
+
multiple: true,
|
|
2633
|
+
reusable: true,
|
|
2634
|
+
customClassName: true
|
|
2635
|
+
};
|
|
2636
|
+
var textdomain$4 = "times-blocks";
|
|
2637
|
+
var attributes$4 = {
|
|
2638
|
+
content: {
|
|
2639
|
+
type: "string",
|
|
2640
|
+
"default": ""
|
|
2641
|
+
},
|
|
2642
|
+
classes: {
|
|
2643
|
+
type: "string",
|
|
2644
|
+
"default": "",
|
|
2645
|
+
description: "Additional CSS classes applied to the rendered tab element"
|
|
2646
|
+
},
|
|
2647
|
+
dataAttributes: {
|
|
2648
|
+
type: "object",
|
|
2649
|
+
"default": {
|
|
2650
|
+
},
|
|
2651
|
+
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
2652
|
+
}
|
|
2653
|
+
};
|
|
2654
|
+
var render$4 = "file:./render.php";
|
|
2655
|
+
var editorScript$4 = "times-design-system";
|
|
2656
|
+
var script$4 = "times-design-system";
|
|
2657
|
+
var blockConfig$4 = {
|
|
2658
|
+
$schema: $schema$4,
|
|
2659
|
+
apiVersion: apiVersion$4,
|
|
2660
|
+
name: name$4,
|
|
2661
|
+
title: title$4,
|
|
2662
|
+
category: category$4,
|
|
2663
|
+
description: description$4,
|
|
2664
|
+
icon: icon$4,
|
|
2665
|
+
supports: supports$4,
|
|
2666
|
+
textdomain: textdomain$4,
|
|
2667
|
+
attributes: attributes$4,
|
|
2668
|
+
render: render$4,
|
|
2669
|
+
editorScript: editorScript$4,
|
|
2670
|
+
script: script$4
|
|
2671
|
+
};
|
|
2672
|
+
|
|
2673
|
+
blocks.registerBlockType(blockConfig$4.name, _objectSpread2(_objectSpread2({}, blockConfig$4), {}, {
|
|
2674
|
+
edit: edit$4,
|
|
2675
|
+
save: save$4
|
|
2676
|
+
}));
|
|
2677
|
+
|
|
2678
|
+
/**
|
|
2679
|
+
* Block Editor Component: TabGroup
|
|
2680
|
+
*
|
|
2681
|
+
* Renders the editor UI for the TabGroup block in Gutenberg.
|
|
2682
|
+
* Reference: packages/components-react/src/TabGroup/
|
|
2683
|
+
*/
|
|
2684
|
+
|
|
2685
|
+
function edit$3(props) {
|
|
2686
|
+
var attributes = props.attributes,
|
|
2687
|
+
setAttributes = props.setAttributes;
|
|
2688
|
+
attributes.content;
|
|
2689
|
+
var classes = attributes.classes;
|
|
2690
|
+
attributes.dataAttributes;
|
|
2691
|
+
var blockProps = blockEditor.useBlockProps();
|
|
2692
|
+
|
|
2693
|
+
// TODO: Implement editor UI based on component props
|
|
2694
|
+
// - Add inspector controls for attributes
|
|
2695
|
+
// - Render preview of component in editor
|
|
2696
|
+
// - Handle attribute changes via setAttributes()
|
|
2697
|
+
|
|
2698
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
2699
|
+
title: "TabGroup Settings",
|
|
2700
|
+
initialOpen: true
|
|
2701
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
2702
|
+
label: "Content",
|
|
2703
|
+
value: attributes.content || '',
|
|
2704
|
+
onChange: function onChange(content) {
|
|
2705
|
+
return setAttributes({
|
|
2706
|
+
content: content
|
|
2707
|
+
});
|
|
2708
|
+
},
|
|
2709
|
+
placeholder: "Enter content..."
|
|
2710
|
+
})), /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
2711
|
+
title: "Extensibility",
|
|
2712
|
+
initialOpen: false
|
|
2713
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
2714
|
+
label: "Custom Classes",
|
|
2715
|
+
value: classes || '',
|
|
2716
|
+
onChange: function onChange(val) {
|
|
2717
|
+
return setAttributes({
|
|
2718
|
+
classes: val
|
|
2719
|
+
});
|
|
2720
|
+
},
|
|
2721
|
+
placeholder: "class-name-1 class-name-2",
|
|
2722
|
+
help: "Space-separated CSS classes added to the tab-group element"
|
|
2723
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
2724
|
+
style: {
|
|
2725
|
+
fontSize: '12px',
|
|
2726
|
+
color: '#666',
|
|
2727
|
+
marginTop: '8px'
|
|
2728
|
+
}
|
|
2729
|
+
}, /*#__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, /*#__PURE__*/React.createElement("p", null, "\uD83D\uDCDD TabGroup block editor"), /*#__PURE__*/React.createElement("p", {
|
|
2730
|
+
style: {
|
|
2731
|
+
fontSize: '12px',
|
|
2732
|
+
color: '#666'
|
|
2733
|
+
}
|
|
2734
|
+
}, "TODO: Render the TabGroup component here with current attributes")));
|
|
2735
|
+
}
|
|
2736
|
+
|
|
2737
|
+
/**
|
|
2738
|
+
* Block Save Component: TabGroup
|
|
2739
|
+
*
|
|
2740
|
+
* Renders the static output saved to the database.
|
|
2741
|
+
* Reference: packages/components-react/src/TabGroup/
|
|
2742
|
+
*/
|
|
2743
|
+
|
|
2744
|
+
function save$3(props) {
|
|
2745
|
+
var attributes = props.attributes;
|
|
2746
|
+
var blockProps = blockEditor.useBlockProps.save();
|
|
2747
|
+
|
|
2748
|
+
// TODO: Render the actual TabGroup component with attributes
|
|
2749
|
+
// This output is saved to the database and displayed on the frontend
|
|
2750
|
+
|
|
2751
|
+
return /*#__PURE__*/React.createElement("div", blockProps, attributes.content && /*#__PURE__*/React.createElement("p", null, attributes.content));
|
|
2752
|
+
}
|
|
2753
|
+
|
|
2754
|
+
var $schema$3 = "https://schemas.wp.org/trunk/block.json";
|
|
2755
|
+
var apiVersion$3 = 3;
|
|
2756
|
+
var name$3 = "tds/tab-group";
|
|
2757
|
+
var title$3 = "Times Design System - TabGroup";
|
|
2758
|
+
var category$3 = "common";
|
|
2759
|
+
var description$3 = "WordPress block for Times Design System TabGroup component";
|
|
2760
|
+
var icon$3 = "block-default";
|
|
2761
|
+
var supports$3 = {
|
|
2762
|
+
html: false,
|
|
2763
|
+
multiple: true,
|
|
2764
|
+
reusable: true,
|
|
2765
|
+
customClassName: true
|
|
2766
|
+
};
|
|
2767
|
+
var textdomain$3 = "times-blocks";
|
|
2768
|
+
var attributes$3 = {
|
|
2769
|
+
content: {
|
|
2770
|
+
type: "string",
|
|
2771
|
+
"default": ""
|
|
2772
|
+
},
|
|
2773
|
+
classes: {
|
|
2774
|
+
type: "string",
|
|
2775
|
+
"default": "",
|
|
2776
|
+
description: "Additional CSS classes applied to the rendered tab group element"
|
|
2777
|
+
},
|
|
2778
|
+
dataAttributes: {
|
|
2779
|
+
type: "object",
|
|
2780
|
+
"default": {
|
|
2781
|
+
},
|
|
2782
|
+
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
2783
|
+
}
|
|
2784
|
+
};
|
|
2785
|
+
var render$3 = "file:./render.php";
|
|
2786
|
+
var editorScript$3 = "times-design-system";
|
|
2787
|
+
var script$3 = "times-design-system";
|
|
2788
|
+
var blockConfig$3 = {
|
|
2789
|
+
$schema: $schema$3,
|
|
2790
|
+
apiVersion: apiVersion$3,
|
|
2791
|
+
name: name$3,
|
|
2792
|
+
title: title$3,
|
|
2793
|
+
category: category$3,
|
|
2794
|
+
description: description$3,
|
|
2795
|
+
icon: icon$3,
|
|
2796
|
+
supports: supports$3,
|
|
2797
|
+
textdomain: textdomain$3,
|
|
2798
|
+
attributes: attributes$3,
|
|
2799
|
+
render: render$3,
|
|
2800
|
+
editorScript: editorScript$3,
|
|
2801
|
+
script: script$3
|
|
2802
|
+
};
|
|
2803
|
+
|
|
2804
|
+
blocks.registerBlockType(blockConfig$3.name, _objectSpread2(_objectSpread2({}, blockConfig$3), {}, {
|
|
2805
|
+
edit: edit$3,
|
|
2806
|
+
save: save$3
|
|
2807
|
+
}));
|
|
2808
|
+
|
|
2809
|
+
/**
|
|
2810
|
+
* Block Editor Component: DialogBox
|
|
2811
|
+
*
|
|
2812
|
+
* Renders the editor UI for the DialogBox block in Gutenberg.
|
|
2813
|
+
* Reference: packages/components-react/src/DialogBox/
|
|
2814
|
+
*/
|
|
2815
|
+
|
|
2816
|
+
function edit$2(props) {
|
|
2817
|
+
var attributes = props.attributes,
|
|
2818
|
+
setAttributes = props.setAttributes;
|
|
2819
|
+
attributes.content;
|
|
2820
|
+
var classes = attributes.classes;
|
|
2821
|
+
attributes.dataAttributes;
|
|
2822
|
+
var blockProps = blockEditor.useBlockProps();
|
|
2823
|
+
|
|
2824
|
+
// TODO: Implement editor UI based on component props
|
|
2825
|
+
// - Add inspector controls for attributes
|
|
2826
|
+
// - Render preview of component in editor
|
|
2827
|
+
// - Handle attribute changes via setAttributes()
|
|
2828
|
+
|
|
2829
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
2830
|
+
title: "DialogBox Settings",
|
|
2831
|
+
initialOpen: true
|
|
2832
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
2833
|
+
label: "Content",
|
|
2834
|
+
value: attributes.content || '',
|
|
2835
|
+
onChange: function onChange(content) {
|
|
2836
|
+
return setAttributes({
|
|
2837
|
+
content: content
|
|
2838
|
+
});
|
|
2839
|
+
},
|
|
2840
|
+
placeholder: "Enter content..."
|
|
2841
|
+
})), /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
2842
|
+
title: "Extensibility",
|
|
2843
|
+
initialOpen: false
|
|
2844
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
2845
|
+
label: "Custom Classes",
|
|
2846
|
+
value: classes || '',
|
|
2847
|
+
onChange: function onChange(val) {
|
|
2848
|
+
return setAttributes({
|
|
2849
|
+
classes: val
|
|
2850
|
+
});
|
|
2851
|
+
},
|
|
2852
|
+
placeholder: "class-name-1 class-name-2",
|
|
2853
|
+
help: "Space-separated CSS classes added to the dialog-box element"
|
|
2854
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
2855
|
+
style: {
|
|
2856
|
+
fontSize: '12px',
|
|
2857
|
+
color: '#666',
|
|
2858
|
+
marginTop: '8px'
|
|
2859
|
+
}
|
|
2860
|
+
}, /*#__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, /*#__PURE__*/React.createElement("p", null, "\uD83D\uDCDD DialogBox block editor"), /*#__PURE__*/React.createElement("p", {
|
|
2861
|
+
style: {
|
|
2862
|
+
fontSize: '12px',
|
|
2863
|
+
color: '#666'
|
|
2864
|
+
}
|
|
2865
|
+
}, "TODO: Render the DialogBox component here with current attributes")));
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
/**
|
|
2869
|
+
* Block Save Component: DialogBox
|
|
2870
|
+
*
|
|
2871
|
+
* Renders the static output saved to the database.
|
|
2872
|
+
* Reference: packages/components-react/src/DialogBox/
|
|
2873
|
+
*/
|
|
2874
|
+
|
|
2875
|
+
function save$2(props) {
|
|
2876
|
+
var attributes = props.attributes;
|
|
2877
|
+
var blockProps = blockEditor.useBlockProps.save();
|
|
2878
|
+
|
|
2879
|
+
// TODO: Render the actual DialogBox component with attributes
|
|
2880
|
+
// This output is saved to the database and displayed on the frontend
|
|
2881
|
+
|
|
2882
|
+
return /*#__PURE__*/React.createElement("div", blockProps, attributes.content && /*#__PURE__*/React.createElement("p", null, attributes.content));
|
|
2883
|
+
}
|
|
2884
|
+
|
|
2885
|
+
var $schema$2 = "https://schemas.wp.org/trunk/block.json";
|
|
2886
|
+
var apiVersion$2 = 3;
|
|
2887
|
+
var name$2 = "tds/dialog-box";
|
|
2888
|
+
var title$2 = "Times Design System - DialogBox";
|
|
2889
|
+
var category$2 = "common";
|
|
2890
|
+
var description$2 = "WordPress block for Times Design System DialogBox component";
|
|
2891
|
+
var icon$2 = "block-default";
|
|
2892
|
+
var supports$2 = {
|
|
2893
|
+
html: false,
|
|
2894
|
+
multiple: true,
|
|
2895
|
+
reusable: true,
|
|
2896
|
+
customClassName: true
|
|
2897
|
+
};
|
|
2898
|
+
var textdomain$2 = "times-blocks";
|
|
2899
|
+
var attributes$2 = {
|
|
2900
|
+
content: {
|
|
2901
|
+
type: "string",
|
|
2902
|
+
"default": ""
|
|
2903
|
+
},
|
|
2904
|
+
classes: {
|
|
2905
|
+
type: "string",
|
|
2906
|
+
"default": "",
|
|
2907
|
+
description: "Additional CSS classes applied to the rendered dialog element"
|
|
2908
|
+
},
|
|
2909
|
+
dataAttributes: {
|
|
2910
|
+
type: "object",
|
|
2911
|
+
"default": {
|
|
2912
|
+
},
|
|
2913
|
+
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
2914
|
+
}
|
|
2915
|
+
};
|
|
2916
|
+
var render$2 = "file:./render.php";
|
|
2917
|
+
var editorScript$2 = "times-design-system";
|
|
2918
|
+
var script$2 = "times-design-system";
|
|
2919
|
+
var blockConfig$2 = {
|
|
2920
|
+
$schema: $schema$2,
|
|
2921
|
+
apiVersion: apiVersion$2,
|
|
2922
|
+
name: name$2,
|
|
2923
|
+
title: title$2,
|
|
2924
|
+
category: category$2,
|
|
2925
|
+
description: description$2,
|
|
2926
|
+
icon: icon$2,
|
|
2927
|
+
supports: supports$2,
|
|
2928
|
+
textdomain: textdomain$2,
|
|
2929
|
+
attributes: attributes$2,
|
|
2930
|
+
render: render$2,
|
|
2931
|
+
editorScript: editorScript$2,
|
|
2932
|
+
script: script$2
|
|
2933
|
+
};
|
|
2934
|
+
|
|
2935
|
+
blocks.registerBlockType(blockConfig$2.name, _objectSpread2(_objectSpread2({}, blockConfig$2), {}, {
|
|
2936
|
+
edit: edit$2,
|
|
2937
|
+
save: save$2
|
|
2938
|
+
}));
|
|
2939
|
+
|
|
2940
|
+
/**
|
|
2941
|
+
* Block Editor Component: InputHelperMessage
|
|
2942
|
+
*
|
|
2943
|
+
* Renders the editor UI for the InputHelperMessage block in Gutenberg.
|
|
2944
|
+
* Reference: packages/components-react/src/InputHelperMessage/
|
|
2945
|
+
*/
|
|
2946
|
+
|
|
2947
|
+
function edit$1(props) {
|
|
2948
|
+
var attributes = props.attributes,
|
|
2949
|
+
setAttributes = props.setAttributes;
|
|
2950
|
+
attributes.content;
|
|
2951
|
+
var classes = attributes.classes;
|
|
2952
|
+
attributes.dataAttributes;
|
|
2953
|
+
var blockProps = blockEditor.useBlockProps();
|
|
2954
|
+
|
|
2955
|
+
// TODO: Implement editor UI based on component props
|
|
2956
|
+
// - Add inspector controls for attributes
|
|
2957
|
+
// - Render preview of component in editor
|
|
2958
|
+
// - Handle attribute changes via setAttributes()
|
|
2959
|
+
|
|
2960
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
2961
|
+
title: "InputHelperMessage Settings",
|
|
2962
|
+
initialOpen: true
|
|
2963
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
2964
|
+
label: "Content",
|
|
2965
|
+
value: attributes.content || '',
|
|
2966
|
+
onChange: function onChange(content) {
|
|
2967
|
+
return setAttributes({
|
|
2968
|
+
content: content
|
|
2969
|
+
});
|
|
2970
|
+
},
|
|
2971
|
+
placeholder: "Enter content..."
|
|
2972
|
+
})), /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
2973
|
+
title: "Extensibility",
|
|
2974
|
+
initialOpen: false
|
|
2975
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
2976
|
+
label: "Custom Classes",
|
|
2977
|
+
value: classes || '',
|
|
2978
|
+
onChange: function onChange(val) {
|
|
2979
|
+
return setAttributes({
|
|
2980
|
+
classes: val
|
|
2981
|
+
});
|
|
2982
|
+
},
|
|
2983
|
+
placeholder: "class-name-1 class-name-2",
|
|
2984
|
+
help: "Space-separated CSS classes added to the input-helper-message element"
|
|
2985
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
2986
|
+
style: {
|
|
2987
|
+
fontSize: '12px',
|
|
2988
|
+
color: '#666',
|
|
2989
|
+
marginTop: '8px'
|
|
2990
|
+
}
|
|
2991
|
+
}, /*#__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, /*#__PURE__*/React.createElement("p", null, "\uD83D\uDCDD InputHelperMessage block editor"), /*#__PURE__*/React.createElement("p", {
|
|
2992
|
+
style: {
|
|
2993
|
+
fontSize: '12px',
|
|
2994
|
+
color: '#666'
|
|
2995
|
+
}
|
|
2996
|
+
}, "TODO: Render the InputHelperMessage component here with current attributes")));
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
/**
|
|
3000
|
+
* Block Save Component: InputHelperMessage
|
|
3001
|
+
*
|
|
3002
|
+
* Renders the static output saved to the database.
|
|
3003
|
+
* Reference: packages/components-react/src/InputHelperMessage/
|
|
3004
|
+
*/
|
|
3005
|
+
|
|
3006
|
+
function save$1(props) {
|
|
3007
|
+
var attributes = props.attributes;
|
|
3008
|
+
var blockProps = blockEditor.useBlockProps.save();
|
|
3009
|
+
|
|
3010
|
+
// TODO: Render the actual InputHelperMessage component with attributes
|
|
3011
|
+
// This output is saved to the database and displayed on the frontend
|
|
3012
|
+
|
|
3013
|
+
return /*#__PURE__*/React.createElement("div", blockProps, attributes.content && /*#__PURE__*/React.createElement("p", null, attributes.content));
|
|
3014
|
+
}
|
|
3015
|
+
|
|
3016
|
+
var $schema$1 = "https://schemas.wp.org/trunk/block.json";
|
|
3017
|
+
var apiVersion$1 = 3;
|
|
3018
|
+
var name$1 = "tds/input-helper-message";
|
|
3019
|
+
var title$1 = "Times Design System - InputHelperMessage";
|
|
3020
|
+
var category$1 = "common";
|
|
3021
|
+
var description$1 = "WordPress block for Times Design System InputHelperMessage component";
|
|
3022
|
+
var icon$1 = "block-default";
|
|
3023
|
+
var supports$1 = {
|
|
3024
|
+
html: false,
|
|
3025
|
+
multiple: true,
|
|
3026
|
+
reusable: true,
|
|
3027
|
+
customClassName: true
|
|
3028
|
+
};
|
|
3029
|
+
var textdomain$1 = "times-blocks";
|
|
3030
|
+
var attributes$1 = {
|
|
3031
|
+
content: {
|
|
3032
|
+
type: "string",
|
|
3033
|
+
"default": ""
|
|
3034
|
+
},
|
|
3035
|
+
classes: {
|
|
3036
|
+
type: "string",
|
|
3037
|
+
"default": "",
|
|
3038
|
+
description: "Additional CSS classes applied to the rendered message element"
|
|
3039
|
+
},
|
|
3040
|
+
dataAttributes: {
|
|
3041
|
+
type: "object",
|
|
3042
|
+
"default": {
|
|
3043
|
+
},
|
|
3044
|
+
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
3045
|
+
}
|
|
3046
|
+
};
|
|
3047
|
+
var render$1 = "file:./render.php";
|
|
3048
|
+
var editorScript$1 = "times-design-system";
|
|
3049
|
+
var script$1 = "times-design-system";
|
|
3050
|
+
var blockConfig$1 = {
|
|
3051
|
+
$schema: $schema$1,
|
|
3052
|
+
apiVersion: apiVersion$1,
|
|
3053
|
+
name: name$1,
|
|
3054
|
+
title: title$1,
|
|
3055
|
+
category: category$1,
|
|
3056
|
+
description: description$1,
|
|
3057
|
+
icon: icon$1,
|
|
3058
|
+
supports: supports$1,
|
|
3059
|
+
textdomain: textdomain$1,
|
|
3060
|
+
attributes: attributes$1,
|
|
3061
|
+
render: render$1,
|
|
3062
|
+
editorScript: editorScript$1,
|
|
3063
|
+
script: script$1
|
|
3064
|
+
};
|
|
3065
|
+
|
|
3066
|
+
blocks.registerBlockType(blockConfig$1.name, _objectSpread2(_objectSpread2({}, blockConfig$1), {}, {
|
|
3067
|
+
edit: edit$1,
|
|
3068
|
+
save: save$1
|
|
3069
|
+
}));
|
|
3070
|
+
|
|
3071
|
+
/**
|
|
3072
|
+
* Block Editor Component: Icon
|
|
3073
|
+
*
|
|
3074
|
+
* Renders the editor UI for the Icon block in Gutenberg.
|
|
3075
|
+
* Reference: packages/components-react/src/Icon/
|
|
3076
|
+
*/
|
|
3077
|
+
|
|
3078
|
+
function edit(props) {
|
|
3079
|
+
var attributes = props.attributes,
|
|
3080
|
+
setAttributes = props.setAttributes;
|
|
3081
|
+
attributes.content;
|
|
3082
|
+
var classes = attributes.classes;
|
|
3083
|
+
attributes.dataAttributes;
|
|
3084
|
+
var blockProps = blockEditor.useBlockProps();
|
|
3085
|
+
|
|
3086
|
+
// TODO: Implement editor UI based on component props
|
|
3087
|
+
// - Add inspector controls for attributes
|
|
3088
|
+
// - Render preview of component in editor
|
|
3089
|
+
// - Handle attribute changes via setAttributes()
|
|
3090
|
+
|
|
3091
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
3092
|
+
title: "Icon Settings",
|
|
3093
|
+
initialOpen: true
|
|
3094
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
3095
|
+
label: "Content",
|
|
3096
|
+
value: attributes.content || '',
|
|
3097
|
+
onChange: function onChange(content) {
|
|
3098
|
+
return setAttributes({
|
|
3099
|
+
content: content
|
|
3100
|
+
});
|
|
3101
|
+
},
|
|
3102
|
+
placeholder: "Enter content..."
|
|
3103
|
+
})), /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
3104
|
+
title: "Extensibility",
|
|
3105
|
+
initialOpen: false
|
|
3106
|
+
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
3107
|
+
label: "Custom Classes",
|
|
3108
|
+
value: classes || '',
|
|
3109
|
+
onChange: function onChange(val) {
|
|
3110
|
+
return setAttributes({
|
|
3111
|
+
classes: val
|
|
3112
|
+
});
|
|
3113
|
+
},
|
|
3114
|
+
placeholder: "class-name-1 class-name-2",
|
|
3115
|
+
help: "Space-separated CSS classes added to the icon element"
|
|
3116
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
3117
|
+
style: {
|
|
3118
|
+
fontSize: '12px',
|
|
3119
|
+
color: '#666',
|
|
3120
|
+
marginTop: '8px'
|
|
3121
|
+
}
|
|
3122
|
+
}, /*#__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, /*#__PURE__*/React.createElement("p", null, "\uD83D\uDCDD Icon block editor"), /*#__PURE__*/React.createElement("p", {
|
|
3123
|
+
style: {
|
|
3124
|
+
fontSize: '12px',
|
|
3125
|
+
color: '#666'
|
|
3126
|
+
}
|
|
3127
|
+
}, "TODO: Render the Icon component here with current attributes")));
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
/**
|
|
3131
|
+
* Block Save Component: Icon
|
|
3132
|
+
*
|
|
3133
|
+
* Renders the static output saved to the database.
|
|
3134
|
+
* Reference: packages/components-react/src/Icon/
|
|
3135
|
+
*/
|
|
3136
|
+
|
|
3137
|
+
function save(props) {
|
|
3138
|
+
var attributes = props.attributes;
|
|
3139
|
+
var blockProps = blockEditor.useBlockProps.save();
|
|
3140
|
+
|
|
3141
|
+
// TODO: Render the actual Icon component with attributes
|
|
3142
|
+
// This output is saved to the database and displayed on the frontend
|
|
3143
|
+
|
|
3144
|
+
return /*#__PURE__*/React.createElement("div", blockProps, attributes.content && /*#__PURE__*/React.createElement("p", null, attributes.content));
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
var $schema = "https://schemas.wp.org/trunk/block.json";
|
|
3148
|
+
var apiVersion = 3;
|
|
3149
|
+
var name = "tds/icon";
|
|
3150
|
+
var title = "Times Design System - Icon";
|
|
3151
|
+
var category = "common";
|
|
3152
|
+
var description = "WordPress block for Times Design System Icon component";
|
|
3153
|
+
var icon = "block-default";
|
|
3154
|
+
var supports = {
|
|
3155
|
+
html: false,
|
|
3156
|
+
multiple: true,
|
|
3157
|
+
reusable: true,
|
|
3158
|
+
customClassName: true
|
|
3159
|
+
};
|
|
3160
|
+
var textdomain = "times-blocks";
|
|
3161
|
+
var attributes = {
|
|
3162
|
+
iconName: {
|
|
3163
|
+
type: "string",
|
|
3164
|
+
"default": "",
|
|
3165
|
+
description: "The name of the icon to display (e.g., 'filled_circle', 'outlined_check')"
|
|
3166
|
+
},
|
|
3167
|
+
size: {
|
|
3168
|
+
type: "string",
|
|
3169
|
+
"enum": [
|
|
3170
|
+
"2xsmall",
|
|
3171
|
+
"xsmall",
|
|
3172
|
+
"small",
|
|
3173
|
+
"medium",
|
|
3174
|
+
"large",
|
|
3175
|
+
"xlarge",
|
|
3176
|
+
"2xlarge"
|
|
3177
|
+
],
|
|
3178
|
+
"default": "medium",
|
|
3179
|
+
description: "Size of the icon"
|
|
3180
|
+
},
|
|
3181
|
+
classes: {
|
|
3182
|
+
type: "string",
|
|
3183
|
+
"default": "",
|
|
3184
|
+
description: "Additional CSS classes applied to the rendered icon element"
|
|
3185
|
+
},
|
|
3186
|
+
dataAttributes: {
|
|
3187
|
+
type: "object",
|
|
3188
|
+
"default": {
|
|
3189
|
+
},
|
|
3190
|
+
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
3191
|
+
}
|
|
3192
|
+
};
|
|
3193
|
+
var render = "file:./render.php";
|
|
3194
|
+
var editorScript = "times-design-system";
|
|
3195
|
+
var script = "times-design-system";
|
|
3196
|
+
var blockConfig = {
|
|
3197
|
+
$schema: $schema,
|
|
3198
|
+
apiVersion: apiVersion,
|
|
3199
|
+
name: name,
|
|
3200
|
+
title: title,
|
|
3201
|
+
category: category,
|
|
3202
|
+
description: description,
|
|
3203
|
+
icon: icon,
|
|
3204
|
+
supports: supports,
|
|
3205
|
+
textdomain: textdomain,
|
|
3206
|
+
attributes: attributes,
|
|
3207
|
+
render: render,
|
|
3208
|
+
editorScript: editorScript,
|
|
3209
|
+
script: script
|
|
3210
|
+
};
|
|
3211
|
+
|
|
3212
|
+
blocks.registerBlockType(blockConfig.name, _objectSpread2(_objectSpread2({}, blockConfig), {}, {
|
|
2504
3213
|
edit: edit,
|
|
2505
3214
|
save: save
|
|
2506
3215
|
}));
|
|
3216
|
+
|
|
3217
|
+
/**
|
|
3218
|
+
* WordPress Blocks Entry Point
|
|
3219
|
+
* Registers all Times Design System blocks with Gutenberg
|
|
3220
|
+
* Imports block styles to be bundled by rollup-plugin-postcss
|
|
3221
|
+
*/
|
|
3222
|
+
|
|
3223
|
+
// Debug: Log that entry point is loading
|
|
3224
|
+
console.log('[TDS] WordPress Blocks entry point loading...');
|
|
3225
|
+
console.log('[TDS] All blocks imported and registered');
|
|
2507
3226
|
//# sourceMappingURL=index.cjs.map
|