@times-design-system/components-wordpress 1.9.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/ad-container/block.json +1 -0
- package/dist/blocks/ad-container/style.css +1 -30
- package/dist/blocks/ad-container/style.scss +70 -0
- package/dist/blocks/button/block.json +68 -1
- package/dist/blocks/button/init.js +45 -0
- package/dist/blocks/button/render.php +2 -0
- package/dist/blocks/button/style.css +1 -203
- package/dist/blocks/button/style.scss +204 -0
- package/dist/blocks/chip/ONCLICK_USAGE.md +263 -0
- package/dist/blocks/chip/block.json +23 -3
- package/dist/blocks/chip/init.js +60 -0
- package/dist/blocks/chip/render.php +7 -2
- package/dist/blocks/chip/style.css +1 -108
- package/dist/blocks/chip/style.scss +213 -0
- package/dist/blocks/dialog-box/block.json +1 -0
- package/dist/blocks/dialog-box/style.css +1 -23
- package/dist/blocks/dialog-box/style.scss +113 -0
- package/dist/blocks/divider/block.json +1 -0
- package/dist/blocks/divider/style.css +1 -37
- package/dist/blocks/divider/style.scss +40 -0
- package/dist/blocks/icon/block.json +11 -1
- package/dist/blocks/icon/style.css +1 -23
- package/dist/blocks/icon/style.scss +10 -0
- package/dist/blocks/icon-button/block.json +42 -0
- package/dist/blocks/icon-button/init.js +56 -0
- package/dist/blocks/icon-button/render.php +5 -0
- package/dist/blocks/icon-button/style.css +1 -66
- package/dist/blocks/icon-button/style.scss +189 -0
- package/dist/blocks/input/block.json +1 -0
- package/dist/blocks/input/style.css +1 -67
- package/dist/blocks/input/style.scss +72 -0
- package/dist/blocks/input-helper-message/block.json +1 -0
- package/dist/blocks/input-helper-message/style.css +1 -23
- package/dist/blocks/input-helper-message/style.scss +45 -0
- package/dist/blocks/link/block.json +87 -3
- package/dist/blocks/link/init.js +54 -0
- package/dist/blocks/link/render.php +22 -12
- package/dist/blocks/link/style.css +1 -221
- package/dist/blocks/link/style.scss +163 -0
- package/dist/blocks/tab/block.json +1 -0
- package/dist/blocks/tab/style.css +1 -152
- package/dist/blocks/tab/style.scss +159 -0
- package/dist/blocks/tab-group/block.json +1 -0
- package/dist/blocks/tab-group/style.css +1 -23
- package/dist/blocks/tab-group/style.scss +32 -0
- package/dist/blocks/{flag → tag}/block.json +47 -14
- package/dist/blocks/{flag → tag}/edit.js +9 -20
- package/dist/blocks/{flag → tag}/index.js +2 -2
- package/dist/blocks/{flag → tag}/render.php +24 -19
- package/dist/blocks/tag/save.js +23 -0
- package/dist/blocks/{chip → tag}/style-editor.css +2 -2
- package/dist/blocks/tag/style.css +1 -0
- package/dist/blocks/tag/style.scss +115 -0
- package/dist/blocks/text/block.json +1 -0
- package/dist/blocks/text/style.css +1 -7
- package/dist/blocks/text/style.scss +11 -0
- package/dist/blocks/toast/block.json +1 -0
- package/dist/blocks/toast/style.css +1 -68
- package/dist/blocks/toast/style.scss +67 -0
- package/dist/blocks/utils/render-icon.php +72 -5
- package/dist/icon-data.json +1 -1
- package/dist/index.cjs +421 -54
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +421 -54
- package/dist/index.js.map +1 -1
- package/dist/plugin.php +42 -0
- package/dist/utils/render-icon.php +11 -2
- package/package.json +6 -4
- package/plugin.php +42 -0
- package/dist/blocks/flag/save.js +0 -25
- package/dist/blocks/flag/style-editor.css +0 -5
- package/dist/blocks/flag/style.css +0 -72
package/dist/index.js
CHANGED
|
@@ -483,10 +483,97 @@ var attributes$e = {
|
|
|
483
483
|
"default": {
|
|
484
484
|
},
|
|
485
485
|
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
486
|
+
},
|
|
487
|
+
onClick: {
|
|
488
|
+
type: "string",
|
|
489
|
+
"default": "",
|
|
490
|
+
description: "Name of JavaScript function to call on click (e.g., 'myFunction'). Function receives click event and button element context."
|
|
486
491
|
}
|
|
487
492
|
};
|
|
488
493
|
var editorScript$e = "times-design-system";
|
|
489
494
|
var script$e = "times-design-system";
|
|
495
|
+
var style$e = "file:./style.css";
|
|
496
|
+
var preview$5 = {
|
|
497
|
+
combinations: [
|
|
498
|
+
{
|
|
499
|
+
label: "Primary",
|
|
500
|
+
intent: "primary",
|
|
501
|
+
size: "medium"
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
label: "Primary Small",
|
|
505
|
+
intent: "primary",
|
|
506
|
+
size: "small"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
label: "Primary Small",
|
|
510
|
+
intent: "primary",
|
|
511
|
+
size: "small",
|
|
512
|
+
iconRight: "filled_arrow_right"
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
label: "Primary Large",
|
|
516
|
+
intent: "primary",
|
|
517
|
+
size: "large"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
label: "Secondary",
|
|
521
|
+
intent: "secondary",
|
|
522
|
+
size: "medium"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
label: "Negative",
|
|
526
|
+
intent: "negative",
|
|
527
|
+
size: "medium"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
label: "Disabled",
|
|
531
|
+
disabled: true,
|
|
532
|
+
intent: "primary",
|
|
533
|
+
size: "medium"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
label: "Loading",
|
|
537
|
+
isLoading: true,
|
|
538
|
+
intent: "primary",
|
|
539
|
+
size: "medium"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
label: "Rounded",
|
|
543
|
+
isRounded: true,
|
|
544
|
+
intent: "primary",
|
|
545
|
+
size: "medium"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
label: "Icon Left",
|
|
549
|
+
iconLeft: "filled_circle",
|
|
550
|
+
intent: "primary"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
label: "Icon Right",
|
|
554
|
+
iconRight: "filled_circle",
|
|
555
|
+
intent: "primary"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
label: "Full Width",
|
|
559
|
+
behaviour: "full",
|
|
560
|
+
intent: "primary",
|
|
561
|
+
size: "large"
|
|
562
|
+
},
|
|
563
|
+
{
|
|
564
|
+
label: "Full Width",
|
|
565
|
+
behaviour: "full",
|
|
566
|
+
intent: "primary",
|
|
567
|
+
iconRight: "filled_search"
|
|
568
|
+
},
|
|
569
|
+
{
|
|
570
|
+
label: "With onClick",
|
|
571
|
+
intent: "primary",
|
|
572
|
+
size: "medium",
|
|
573
|
+
onClick: "handleButtonClick"
|
|
574
|
+
}
|
|
575
|
+
]
|
|
576
|
+
};
|
|
490
577
|
var metadata$9 = {
|
|
491
578
|
$schema: $schema$e,
|
|
492
579
|
apiVersion: apiVersion$e,
|
|
@@ -500,7 +587,9 @@ var metadata$9 = {
|
|
|
500
587
|
render: render$e,
|
|
501
588
|
attributes: attributes$e,
|
|
502
589
|
editorScript: editorScript$e,
|
|
503
|
-
script: script$e
|
|
590
|
+
script: script$e,
|
|
591
|
+
style: style$e,
|
|
592
|
+
preview: preview$5
|
|
504
593
|
};
|
|
505
594
|
|
|
506
595
|
registerBlockType(metadata$9.name, _objectSpread2(_objectSpread2({}, metadata$9), {}, {
|
|
@@ -553,6 +642,7 @@ var attributes$d = {
|
|
|
553
642
|
};
|
|
554
643
|
var example$8 = {
|
|
555
644
|
};
|
|
645
|
+
var style$d = "file:./style.css";
|
|
556
646
|
var script$d = "times-design-system";
|
|
557
647
|
var editorScript$d = "times-design-system";
|
|
558
648
|
var metadata$8 = {
|
|
@@ -567,6 +657,7 @@ var metadata$8 = {
|
|
|
567
657
|
render: render$d,
|
|
568
658
|
attributes: attributes$d,
|
|
569
659
|
example: example$8,
|
|
660
|
+
style: style$d,
|
|
570
661
|
script: script$d,
|
|
571
662
|
editorScript: editorScript$d
|
|
572
663
|
};
|
|
@@ -711,6 +802,7 @@ var attributes$c = {
|
|
|
711
802
|
};
|
|
712
803
|
var example$7 = {
|
|
713
804
|
};
|
|
805
|
+
var style$c = "file:./style.css";
|
|
714
806
|
var script$c = "times-design-system";
|
|
715
807
|
var editorScript$c = "times-design-system";
|
|
716
808
|
var metadata$7 = {
|
|
@@ -725,6 +817,7 @@ var metadata$7 = {
|
|
|
725
817
|
render: render$c,
|
|
726
818
|
attributes: attributes$c,
|
|
727
819
|
example: example$7,
|
|
820
|
+
style: style$c,
|
|
728
821
|
script: script$c,
|
|
729
822
|
editorScript: editorScript$c
|
|
730
823
|
};
|
|
@@ -905,6 +998,7 @@ var attributes$b = {
|
|
|
905
998
|
};
|
|
906
999
|
var example$6 = {
|
|
907
1000
|
};
|
|
1001
|
+
var style$b = "file:./style.css";
|
|
908
1002
|
var script$b = "times-design-system";
|
|
909
1003
|
var editorScript$b = "times-design-system";
|
|
910
1004
|
var metadata$6 = {
|
|
@@ -919,6 +1013,7 @@ var metadata$6 = {
|
|
|
919
1013
|
render: render$b,
|
|
920
1014
|
attributes: attributes$b,
|
|
921
1015
|
example: example$6,
|
|
1016
|
+
style: style$b,
|
|
922
1017
|
script: script$b,
|
|
923
1018
|
editorScript: editorScript$b
|
|
924
1019
|
};
|
|
@@ -1112,6 +1207,16 @@ var attributes$a = {
|
|
|
1112
1207
|
type: "boolean",
|
|
1113
1208
|
"default": false
|
|
1114
1209
|
},
|
|
1210
|
+
intent: {
|
|
1211
|
+
type: "string",
|
|
1212
|
+
"enum": [
|
|
1213
|
+
"primary",
|
|
1214
|
+
"secondary",
|
|
1215
|
+
"negative"
|
|
1216
|
+
],
|
|
1217
|
+
"default": "primary",
|
|
1218
|
+
description: "Visual style variant matching button intents"
|
|
1219
|
+
},
|
|
1115
1220
|
isLoading: {
|
|
1116
1221
|
type: "boolean",
|
|
1117
1222
|
"default": false,
|
|
@@ -1149,10 +1254,62 @@ var attributes$a = {
|
|
|
1149
1254
|
"default": {
|
|
1150
1255
|
},
|
|
1151
1256
|
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
1257
|
+
},
|
|
1258
|
+
onClick: {
|
|
1259
|
+
type: "string",
|
|
1260
|
+
"default": "",
|
|
1261
|
+
description: "Name of JavaScript function to call on click (e.g., 'myFunction'). Function receives click event and icon button element context."
|
|
1152
1262
|
}
|
|
1153
1263
|
};
|
|
1264
|
+
var preview$4 = {
|
|
1265
|
+
combinations: [
|
|
1266
|
+
{
|
|
1267
|
+
iconName: "filled_add",
|
|
1268
|
+
iconSize: "medium",
|
|
1269
|
+
intent: "primary"
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
iconName: "filled_add",
|
|
1273
|
+
iconSize: "medium",
|
|
1274
|
+
intent: "secondary"
|
|
1275
|
+
},
|
|
1276
|
+
{
|
|
1277
|
+
iconName: "filled_add",
|
|
1278
|
+
iconSize: "medium",
|
|
1279
|
+
intent: "negative"
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
iconName: "filled_search",
|
|
1283
|
+
iconSize: "medium",
|
|
1284
|
+
intent: "primary"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
iconName: "filled_close",
|
|
1288
|
+
iconSize: "small",
|
|
1289
|
+
intent: "primary"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
iconName: "filled_settings",
|
|
1293
|
+
iconSize: "large",
|
|
1294
|
+
intent: "primary"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
iconName: "filled_add",
|
|
1298
|
+
iconSize: "medium",
|
|
1299
|
+
intent: "primary",
|
|
1300
|
+
round: true
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
iconName: "filled_add",
|
|
1304
|
+
iconSize: "medium",
|
|
1305
|
+
intent: "primary",
|
|
1306
|
+
onClick: "handleIconButtonClick"
|
|
1307
|
+
}
|
|
1308
|
+
]
|
|
1309
|
+
};
|
|
1154
1310
|
var example$5 = {
|
|
1155
1311
|
};
|
|
1312
|
+
var style$a = "file:./style.css";
|
|
1156
1313
|
var script$a = "times-design-system";
|
|
1157
1314
|
var editorScript$a = "times-design-system";
|
|
1158
1315
|
var metadata$5 = {
|
|
@@ -1166,7 +1323,9 @@ var metadata$5 = {
|
|
|
1166
1323
|
supports: supports$a,
|
|
1167
1324
|
render: render$a,
|
|
1168
1325
|
attributes: attributes$a,
|
|
1326
|
+
preview: preview$4,
|
|
1169
1327
|
example: example$5,
|
|
1328
|
+
style: style$a,
|
|
1170
1329
|
script: script$a,
|
|
1171
1330
|
editorScript: editorScript$a
|
|
1172
1331
|
};
|
|
@@ -1345,7 +1504,7 @@ var attributes$9 = {
|
|
|
1345
1504
|
},
|
|
1346
1505
|
intent: {
|
|
1347
1506
|
type: "string",
|
|
1348
|
-
"default": "
|
|
1507
|
+
"default": "primary",
|
|
1349
1508
|
"enum": [
|
|
1350
1509
|
"primary",
|
|
1351
1510
|
"secondary"
|
|
@@ -1353,7 +1512,7 @@ var attributes$9 = {
|
|
|
1353
1512
|
},
|
|
1354
1513
|
size: {
|
|
1355
1514
|
type: "string",
|
|
1356
|
-
"default": "
|
|
1515
|
+
"default": "small",
|
|
1357
1516
|
"enum": [
|
|
1358
1517
|
"small",
|
|
1359
1518
|
"large"
|
|
@@ -1381,6 +1540,11 @@ var attributes$9 = {
|
|
|
1381
1540
|
type: "string",
|
|
1382
1541
|
"default": ""
|
|
1383
1542
|
},
|
|
1543
|
+
onClick: {
|
|
1544
|
+
type: "string",
|
|
1545
|
+
"default": "",
|
|
1546
|
+
description: "Name of JavaScript function to call on click (e.g., 'myFunction'). Function receives click event and chip element context."
|
|
1547
|
+
},
|
|
1384
1548
|
classes: {
|
|
1385
1549
|
type: "string",
|
|
1386
1550
|
"default": "",
|
|
@@ -1395,8 +1559,39 @@ var attributes$9 = {
|
|
|
1395
1559
|
};
|
|
1396
1560
|
var example$4 = {
|
|
1397
1561
|
};
|
|
1562
|
+
var style$9 = "file:./style.css";
|
|
1398
1563
|
var script$9 = "times-design-system";
|
|
1399
1564
|
var editorScript$9 = "times-design-system";
|
|
1565
|
+
var preview$3 = {
|
|
1566
|
+
combinations: [
|
|
1567
|
+
{
|
|
1568
|
+
content: "Primary Small",
|
|
1569
|
+
intent: "primary",
|
|
1570
|
+
size: "small"
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
content: "Primary Large",
|
|
1574
|
+
intent: "primary",
|
|
1575
|
+
size: "large"
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
content: "Secondary",
|
|
1579
|
+
intent: "secondary",
|
|
1580
|
+
size: "small"
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
content: "Channel",
|
|
1584
|
+
channel: true,
|
|
1585
|
+
size: "small"
|
|
1586
|
+
},
|
|
1587
|
+
{
|
|
1588
|
+
content: "Toggle",
|
|
1589
|
+
intent: "primary",
|
|
1590
|
+
toggle: true,
|
|
1591
|
+
size: "small"
|
|
1592
|
+
}
|
|
1593
|
+
]
|
|
1594
|
+
};
|
|
1400
1595
|
var metadata$4 = {
|
|
1401
1596
|
$schema: $schema$9,
|
|
1402
1597
|
apiVersion: apiVersion$9,
|
|
@@ -1409,8 +1604,10 @@ var metadata$4 = {
|
|
|
1409
1604
|
render: render$9,
|
|
1410
1605
|
attributes: attributes$9,
|
|
1411
1606
|
example: example$4,
|
|
1607
|
+
style: style$9,
|
|
1412
1608
|
script: script$9,
|
|
1413
|
-
editorScript: editorScript$9
|
|
1609
|
+
editorScript: editorScript$9,
|
|
1610
|
+
preview: preview$3
|
|
1414
1611
|
};
|
|
1415
1612
|
|
|
1416
1613
|
var edit$9 = function edit(_ref) {
|
|
@@ -1586,11 +1783,11 @@ registerBlockType(metadata$4.name, _objectSpread2(_objectSpread2({}, metadata$4)
|
|
|
1586
1783
|
|
|
1587
1784
|
var $schema$8 = "https://schemas.wp.org/trunk/block.json";
|
|
1588
1785
|
var apiVersion$8 = 3;
|
|
1589
|
-
var name$8 = "tds/
|
|
1590
|
-
var title$8 = "
|
|
1786
|
+
var name$8 = "tds/tag";
|
|
1787
|
+
var title$8 = "Tag";
|
|
1591
1788
|
var category$8 = "common";
|
|
1592
1789
|
var description$8 = "Badge or status indicator component";
|
|
1593
|
-
var icon$8 = "
|
|
1790
|
+
var icon$8 = "tag";
|
|
1594
1791
|
var supports$8 = {
|
|
1595
1792
|
html: false,
|
|
1596
1793
|
spacing: {
|
|
@@ -1603,18 +1800,13 @@ var attributes$8 = {
|
|
|
1603
1800
|
type: "string",
|
|
1604
1801
|
"default": ""
|
|
1605
1802
|
},
|
|
1606
|
-
content: {
|
|
1607
|
-
type: "string",
|
|
1608
|
-
"default": ""
|
|
1609
|
-
},
|
|
1610
1803
|
intent: {
|
|
1611
1804
|
type: "string",
|
|
1612
1805
|
"default": "secondary",
|
|
1613
1806
|
"enum": [
|
|
1614
1807
|
"primary",
|
|
1615
1808
|
"secondary",
|
|
1616
|
-
"
|
|
1617
|
-
"positive"
|
|
1809
|
+
"tertiary"
|
|
1618
1810
|
]
|
|
1619
1811
|
},
|
|
1620
1812
|
size: {
|
|
@@ -1626,6 +1818,20 @@ var attributes$8 = {
|
|
|
1626
1818
|
"large"
|
|
1627
1819
|
]
|
|
1628
1820
|
},
|
|
1821
|
+
callout: {
|
|
1822
|
+
type: "boolean",
|
|
1823
|
+
"default": false,
|
|
1824
|
+
description: "Applies a callout style to the tag"
|
|
1825
|
+
},
|
|
1826
|
+
channel: {
|
|
1827
|
+
type: "boolean",
|
|
1828
|
+
"default": false
|
|
1829
|
+
},
|
|
1830
|
+
ariaLabel: {
|
|
1831
|
+
type: "string",
|
|
1832
|
+
"default": "",
|
|
1833
|
+
description: "ARIA label for accessibility"
|
|
1834
|
+
},
|
|
1629
1835
|
iconLeft: {
|
|
1630
1836
|
type: "string",
|
|
1631
1837
|
"default": "",
|
|
@@ -1636,14 +1842,10 @@ var attributes$8 = {
|
|
|
1636
1842
|
"default": "",
|
|
1637
1843
|
description: "Icon on the right with variant prefix (e.g., 'outlined_check')"
|
|
1638
1844
|
},
|
|
1639
|
-
ariaLabel: {
|
|
1640
|
-
type: "string",
|
|
1641
|
-
"default": ""
|
|
1642
|
-
},
|
|
1643
1845
|
classes: {
|
|
1644
1846
|
type: "string",
|
|
1645
1847
|
"default": "",
|
|
1646
|
-
description: "Additional CSS classes applied to the rendered
|
|
1848
|
+
description: "Additional CSS classes applied to the rendered tag element"
|
|
1647
1849
|
},
|
|
1648
1850
|
dataAttributes: {
|
|
1649
1851
|
type: "object",
|
|
@@ -1654,8 +1856,47 @@ var attributes$8 = {
|
|
|
1654
1856
|
};
|
|
1655
1857
|
var example$3 = {
|
|
1656
1858
|
};
|
|
1859
|
+
var style$8 = "file:./style.css";
|
|
1657
1860
|
var script$8 = "times-design-system";
|
|
1658
1861
|
var editorScript$8 = "times-design-system";
|
|
1862
|
+
var preview$2 = {
|
|
1863
|
+
combinations: [
|
|
1864
|
+
{
|
|
1865
|
+
label: "Primary",
|
|
1866
|
+
intent: "primary",
|
|
1867
|
+
size: "small"
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
label: "Secondary",
|
|
1871
|
+
intent: "secondary",
|
|
1872
|
+
size: "medium"
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
label: "Tertiary",
|
|
1876
|
+
intent: "tertiary",
|
|
1877
|
+
size: "large"
|
|
1878
|
+
},
|
|
1879
|
+
{
|
|
1880
|
+
label: "Callout",
|
|
1881
|
+
intent: "primary",
|
|
1882
|
+
callout: true,
|
|
1883
|
+
size: "medium",
|
|
1884
|
+
iconLeft: "filled_check"
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
label: "Channel",
|
|
1888
|
+
intent: "primary",
|
|
1889
|
+
channel: true,
|
|
1890
|
+
size: "medium"
|
|
1891
|
+
},
|
|
1892
|
+
{
|
|
1893
|
+
label: "With Icon",
|
|
1894
|
+
intent: "primary",
|
|
1895
|
+
iconLeft: "filled_check",
|
|
1896
|
+
size: "large"
|
|
1897
|
+
}
|
|
1898
|
+
]
|
|
1899
|
+
};
|
|
1659
1900
|
var metadata$3 = {
|
|
1660
1901
|
$schema: $schema$8,
|
|
1661
1902
|
apiVersion: apiVersion$8,
|
|
@@ -1668,15 +1909,16 @@ var metadata$3 = {
|
|
|
1668
1909
|
render: render$8,
|
|
1669
1910
|
attributes: attributes$8,
|
|
1670
1911
|
example: example$3,
|
|
1912
|
+
style: style$8,
|
|
1671
1913
|
script: script$8,
|
|
1672
|
-
editorScript: editorScript$8
|
|
1914
|
+
editorScript: editorScript$8,
|
|
1915
|
+
preview: preview$2
|
|
1673
1916
|
};
|
|
1674
1917
|
|
|
1675
1918
|
var edit$8 = function edit(_ref) {
|
|
1676
1919
|
var attributes = _ref.attributes,
|
|
1677
1920
|
setAttributes = _ref.setAttributes;
|
|
1678
1921
|
var label = attributes.label,
|
|
1679
|
-
content = attributes.content,
|
|
1680
1922
|
intent = attributes.intent,
|
|
1681
1923
|
size = attributes.size,
|
|
1682
1924
|
iconLeft = attributes.iconLeft,
|
|
@@ -1686,13 +1928,13 @@ var edit$8 = function edit(_ref) {
|
|
|
1686
1928
|
attributes.dataAttributes;
|
|
1687
1929
|
var blockProps = useBlockProps();
|
|
1688
1930
|
var buildClass = function buildClass() {
|
|
1689
|
-
var classes = ['tds-
|
|
1690
|
-
classes.push("tds-
|
|
1691
|
-
classes.push("tds-
|
|
1931
|
+
var classes = ['tds-tag'];
|
|
1932
|
+
classes.push("tds-tag--intent-".concat(intent));
|
|
1933
|
+
classes.push("tds-tag--size-".concat(size));
|
|
1692
1934
|
return classes.join(' ');
|
|
1693
1935
|
};
|
|
1694
1936
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(InspectorControls, null, /*#__PURE__*/React.createElement(PanelBody, {
|
|
1695
|
-
title: "
|
|
1937
|
+
title: "Tag Settings"
|
|
1696
1938
|
}, /*#__PURE__*/React.createElement(TextControl, {
|
|
1697
1939
|
label: "Label",
|
|
1698
1940
|
value: label,
|
|
@@ -1776,7 +2018,7 @@ var edit$8 = function edit(_ref) {
|
|
|
1776
2018
|
});
|
|
1777
2019
|
},
|
|
1778
2020
|
placeholder: "class-name-1 class-name-2",
|
|
1779
|
-
help: "Space-separated CSS classes added to the
|
|
2021
|
+
help: "Space-separated CSS classes added to the tag element"
|
|
1780
2022
|
}), /*#__PURE__*/React.createElement("p", {
|
|
1781
2023
|
style: {
|
|
1782
2024
|
fontSize: '12px',
|
|
@@ -1787,27 +2029,17 @@ var edit$8 = function edit(_ref) {
|
|
|
1787
2029
|
className: buildClass(),
|
|
1788
2030
|
"aria-label": ariaLabel
|
|
1789
2031
|
}), label && /*#__PURE__*/React.createElement("div", {
|
|
1790
|
-
className: "tds-
|
|
2032
|
+
className: "tds-tag__label"
|
|
1791
2033
|
}, label), iconLeft && /*#__PURE__*/React.createElement("span", {
|
|
1792
|
-
className: "tds-
|
|
1793
|
-
}, iconLeft), /*#__PURE__*/React.createElement(
|
|
1794
|
-
|
|
1795
|
-
onChange: function onChange(val) {
|
|
1796
|
-
return setAttributes({
|
|
1797
|
-
content: val
|
|
1798
|
-
});
|
|
1799
|
-
},
|
|
1800
|
-
placeholder: "Flag content",
|
|
1801
|
-
className: "tds-flag__content"
|
|
1802
|
-
}), iconRight && /*#__PURE__*/React.createElement("span", {
|
|
1803
|
-
className: "tds-flag__icon-right"
|
|
2034
|
+
className: "tds-tag__icon-left"
|
|
2035
|
+
}, iconLeft), iconRight && /*#__PURE__*/React.createElement("span", {
|
|
2036
|
+
className: "tds-tag__icon-right"
|
|
1804
2037
|
}, iconRight)));
|
|
1805
2038
|
};
|
|
1806
2039
|
|
|
1807
2040
|
var save$8 = function save(_ref) {
|
|
1808
2041
|
var attributes = _ref.attributes;
|
|
1809
2042
|
var label = attributes.label,
|
|
1810
|
-
content = attributes.content,
|
|
1811
2043
|
intent = attributes.intent,
|
|
1812
2044
|
size = attributes.size,
|
|
1813
2045
|
iconLeft = attributes.iconLeft,
|
|
@@ -1815,23 +2047,20 @@ var save$8 = function save(_ref) {
|
|
|
1815
2047
|
ariaLabel = attributes.ariaLabel;
|
|
1816
2048
|
var blockProps = useBlockProps.save();
|
|
1817
2049
|
var buildClass = function buildClass() {
|
|
1818
|
-
var classes = ['tds-
|
|
1819
|
-
classes.push("tds-
|
|
1820
|
-
classes.push("tds-
|
|
2050
|
+
var classes = ['tds-tag'];
|
|
2051
|
+
classes.push("tds-tag--intent-".concat(intent));
|
|
2052
|
+
classes.push("tds-tag--size-".concat(size));
|
|
1821
2053
|
return classes.join(' ');
|
|
1822
2054
|
};
|
|
1823
2055
|
return /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
|
|
1824
2056
|
className: buildClass(),
|
|
1825
2057
|
"aria-label": ariaLabel
|
|
1826
2058
|
}), label && /*#__PURE__*/React.createElement("div", {
|
|
1827
|
-
className: "tds-
|
|
2059
|
+
className: "tds-tag__label"
|
|
1828
2060
|
}, label), iconLeft && /*#__PURE__*/React.createElement("span", {
|
|
1829
|
-
className: "tds-
|
|
1830
|
-
}, iconLeft), /*#__PURE__*/React.createElement(
|
|
1831
|
-
|
|
1832
|
-
className: "tds-flag__content"
|
|
1833
|
-
}), iconRight && /*#__PURE__*/React.createElement("span", {
|
|
1834
|
-
className: "tds-flag__icon-right"
|
|
2061
|
+
className: "tds-tag__icon-left"
|
|
2062
|
+
}, iconLeft), iconRight && /*#__PURE__*/React.createElement("span", {
|
|
2063
|
+
className: "tds-tag__icon-right"
|
|
1835
2064
|
}, iconRight));
|
|
1836
2065
|
};
|
|
1837
2066
|
|
|
@@ -1895,6 +2124,7 @@ var attributes$7 = {
|
|
|
1895
2124
|
};
|
|
1896
2125
|
var example$2 = {
|
|
1897
2126
|
};
|
|
2127
|
+
var style$7 = "file:./style.css";
|
|
1898
2128
|
var script$7 = "times-design-system";
|
|
1899
2129
|
var editorScript$7 = "times-design-system";
|
|
1900
2130
|
var metadata$2 = {
|
|
@@ -1909,6 +2139,7 @@ var metadata$2 = {
|
|
|
1909
2139
|
render: render$7,
|
|
1910
2140
|
attributes: attributes$7,
|
|
1911
2141
|
example: example$2,
|
|
2142
|
+
style: style$7,
|
|
1912
2143
|
script: script$7,
|
|
1913
2144
|
editorScript: editorScript$7
|
|
1914
2145
|
};
|
|
@@ -2087,8 +2318,9 @@ var attributes$6 = {
|
|
|
2087
2318
|
"enum": [
|
|
2088
2319
|
"primary",
|
|
2089
2320
|
"secondary",
|
|
2090
|
-
"
|
|
2091
|
-
]
|
|
2321
|
+
"danger"
|
|
2322
|
+
],
|
|
2323
|
+
description: "Link color and style variant"
|
|
2092
2324
|
},
|
|
2093
2325
|
sentiment: {
|
|
2094
2326
|
type: "string",
|
|
@@ -2102,10 +2334,12 @@ var attributes$6 = {
|
|
|
2102
2334
|
type: "string",
|
|
2103
2335
|
"default": "medium",
|
|
2104
2336
|
"enum": [
|
|
2337
|
+
"xsmall",
|
|
2105
2338
|
"small",
|
|
2106
2339
|
"medium",
|
|
2107
2340
|
"large"
|
|
2108
|
-
]
|
|
2341
|
+
],
|
|
2342
|
+
description: "Link size variant"
|
|
2109
2343
|
},
|
|
2110
2344
|
iconLeft: {
|
|
2111
2345
|
type: "string",
|
|
@@ -2149,12 +2383,106 @@ var attributes$6 = {
|
|
|
2149
2383
|
"default": {
|
|
2150
2384
|
},
|
|
2151
2385
|
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
2386
|
+
},
|
|
2387
|
+
isDisabled: {
|
|
2388
|
+
type: "boolean",
|
|
2389
|
+
"default": false,
|
|
2390
|
+
description: "Disables the link and prevents navigation"
|
|
2391
|
+
},
|
|
2392
|
+
onClick: {
|
|
2393
|
+
type: "string",
|
|
2394
|
+
"default": "",
|
|
2395
|
+
description: "Name of JavaScript function to call on click (e.g., 'myFunction'). Function receives click event and link element context."
|
|
2152
2396
|
}
|
|
2153
2397
|
};
|
|
2154
2398
|
var example$1 = {
|
|
2155
2399
|
};
|
|
2400
|
+
var style$6 = "file:./style.css";
|
|
2156
2401
|
var script$6 = "times-design-system";
|
|
2157
2402
|
var editorScript$6 = "times-design-system";
|
|
2403
|
+
var preview$1 = {
|
|
2404
|
+
combinations: [
|
|
2405
|
+
{
|
|
2406
|
+
content: "Primary",
|
|
2407
|
+
href: "#",
|
|
2408
|
+
intent: "primary",
|
|
2409
|
+
size: "medium"
|
|
2410
|
+
},
|
|
2411
|
+
{
|
|
2412
|
+
content: "Primary",
|
|
2413
|
+
href: "#",
|
|
2414
|
+
intent: "primary",
|
|
2415
|
+
size: "medium",
|
|
2416
|
+
iconLeft: "filled_arrow_left"
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
content: "Primary",
|
|
2420
|
+
href: "#",
|
|
2421
|
+
intent: "primary",
|
|
2422
|
+
size: "medium",
|
|
2423
|
+
iconRight: "filled_arrow_right"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
content: "Secondary",
|
|
2427
|
+
href: "#",
|
|
2428
|
+
intent: "secondary",
|
|
2429
|
+
size: "medium"
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
content: "Danger",
|
|
2433
|
+
href: "#",
|
|
2434
|
+
intent: "danger",
|
|
2435
|
+
size: "medium"
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
content: "XSmall",
|
|
2439
|
+
href: "#",
|
|
2440
|
+
size: "xsmall"
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
content: "Small",
|
|
2444
|
+
href: "#",
|
|
2445
|
+
size: "small"
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
content: "Large",
|
|
2449
|
+
href: "#",
|
|
2450
|
+
size: "large"
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
content: "Brand",
|
|
2454
|
+
href: "#",
|
|
2455
|
+
sentiment: "brand",
|
|
2456
|
+
size: "medium"
|
|
2457
|
+
},
|
|
2458
|
+
{
|
|
2459
|
+
content: "Utility",
|
|
2460
|
+
href: "#",
|
|
2461
|
+
sentiment: "utility",
|
|
2462
|
+
size: "medium"
|
|
2463
|
+
},
|
|
2464
|
+
{
|
|
2465
|
+
content: "External",
|
|
2466
|
+
href: "#",
|
|
2467
|
+
target: "_blank",
|
|
2468
|
+
size: "medium"
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
content: "With onClick",
|
|
2472
|
+
href: "#",
|
|
2473
|
+
intent: "primary",
|
|
2474
|
+
size: "medium",
|
|
2475
|
+
onClick: "handleLinkClick"
|
|
2476
|
+
},
|
|
2477
|
+
{
|
|
2478
|
+
content: "Disabled",
|
|
2479
|
+
href: "#",
|
|
2480
|
+
intent: "primary",
|
|
2481
|
+
size: "medium",
|
|
2482
|
+
isDisabled: true
|
|
2483
|
+
}
|
|
2484
|
+
]
|
|
2485
|
+
};
|
|
2158
2486
|
var metadata$1 = {
|
|
2159
2487
|
$schema: $schema$6,
|
|
2160
2488
|
apiVersion: apiVersion$6,
|
|
@@ -2167,8 +2495,10 @@ var metadata$1 = {
|
|
|
2167
2495
|
render: render$6,
|
|
2168
2496
|
attributes: attributes$6,
|
|
2169
2497
|
example: example$1,
|
|
2498
|
+
style: style$6,
|
|
2170
2499
|
script: script$6,
|
|
2171
|
-
editorScript: editorScript$6
|
|
2500
|
+
editorScript: editorScript$6,
|
|
2501
|
+
preview: preview$1
|
|
2172
2502
|
};
|
|
2173
2503
|
|
|
2174
2504
|
var edit$6 = function edit(_ref) {
|
|
@@ -2447,6 +2777,7 @@ var attributes$5 = {
|
|
|
2447
2777
|
};
|
|
2448
2778
|
var example = {
|
|
2449
2779
|
};
|
|
2780
|
+
var style$5 = "file:./style.css";
|
|
2450
2781
|
var script$5 = "times-design-system";
|
|
2451
2782
|
var editorScript$5 = "times-design-system";
|
|
2452
2783
|
var metadata = {
|
|
@@ -2461,6 +2792,7 @@ var metadata = {
|
|
|
2461
2792
|
render: render$5,
|
|
2462
2793
|
attributes: attributes$5,
|
|
2463
2794
|
example: example,
|
|
2795
|
+
style: style$5,
|
|
2464
2796
|
script: script$5,
|
|
2465
2797
|
editorScript: editorScript$5
|
|
2466
2798
|
};
|
|
@@ -2650,6 +2982,7 @@ var attributes$4 = {
|
|
|
2650
2982
|
}
|
|
2651
2983
|
};
|
|
2652
2984
|
var render$4 = "file:./render.php";
|
|
2985
|
+
var style$4 = "file:./style.css";
|
|
2653
2986
|
var editorScript$4 = "times-design-system";
|
|
2654
2987
|
var script$4 = "times-design-system";
|
|
2655
2988
|
var blockConfig$4 = {
|
|
@@ -2664,6 +2997,7 @@ var blockConfig$4 = {
|
|
|
2664
2997
|
textdomain: textdomain$4,
|
|
2665
2998
|
attributes: attributes$4,
|
|
2666
2999
|
render: render$4,
|
|
3000
|
+
style: style$4,
|
|
2667
3001
|
editorScript: editorScript$4,
|
|
2668
3002
|
script: script$4
|
|
2669
3003
|
};
|
|
@@ -2781,6 +3115,7 @@ var attributes$3 = {
|
|
|
2781
3115
|
}
|
|
2782
3116
|
};
|
|
2783
3117
|
var render$3 = "file:./render.php";
|
|
3118
|
+
var style$3 = "file:./style.css";
|
|
2784
3119
|
var editorScript$3 = "times-design-system";
|
|
2785
3120
|
var script$3 = "times-design-system";
|
|
2786
3121
|
var blockConfig$3 = {
|
|
@@ -2795,6 +3130,7 @@ var blockConfig$3 = {
|
|
|
2795
3130
|
textdomain: textdomain$3,
|
|
2796
3131
|
attributes: attributes$3,
|
|
2797
3132
|
render: render$3,
|
|
3133
|
+
style: style$3,
|
|
2798
3134
|
editorScript: editorScript$3,
|
|
2799
3135
|
script: script$3
|
|
2800
3136
|
};
|
|
@@ -2912,6 +3248,7 @@ var attributes$2 = {
|
|
|
2912
3248
|
}
|
|
2913
3249
|
};
|
|
2914
3250
|
var render$2 = "file:./render.php";
|
|
3251
|
+
var style$2 = "file:./style.css";
|
|
2915
3252
|
var editorScript$2 = "times-design-system";
|
|
2916
3253
|
var script$2 = "times-design-system";
|
|
2917
3254
|
var blockConfig$2 = {
|
|
@@ -2926,6 +3263,7 @@ var blockConfig$2 = {
|
|
|
2926
3263
|
textdomain: textdomain$2,
|
|
2927
3264
|
attributes: attributes$2,
|
|
2928
3265
|
render: render$2,
|
|
3266
|
+
style: style$2,
|
|
2929
3267
|
editorScript: editorScript$2,
|
|
2930
3268
|
script: script$2
|
|
2931
3269
|
};
|
|
@@ -3043,6 +3381,7 @@ var attributes$1 = {
|
|
|
3043
3381
|
}
|
|
3044
3382
|
};
|
|
3045
3383
|
var render$1 = "file:./render.php";
|
|
3384
|
+
var style$1 = "file:./style.css";
|
|
3046
3385
|
var editorScript$1 = "times-design-system";
|
|
3047
3386
|
var script$1 = "times-design-system";
|
|
3048
3387
|
var blockConfig$1 = {
|
|
@@ -3057,6 +3396,7 @@ var blockConfig$1 = {
|
|
|
3057
3396
|
textdomain: textdomain$1,
|
|
3058
3397
|
attributes: attributes$1,
|
|
3059
3398
|
render: render$1,
|
|
3399
|
+
style: style$1,
|
|
3060
3400
|
editorScript: editorScript$1,
|
|
3061
3401
|
script: script$1
|
|
3062
3402
|
};
|
|
@@ -3191,6 +3531,31 @@ var attributes = {
|
|
|
3191
3531
|
var render = "file:./render.php";
|
|
3192
3532
|
var editorScript = "times-design-system";
|
|
3193
3533
|
var script = "times-design-system";
|
|
3534
|
+
var style = "file:./style.css";
|
|
3535
|
+
var preview = {
|
|
3536
|
+
combinations: [
|
|
3537
|
+
{
|
|
3538
|
+
iconName: "filled_circle",
|
|
3539
|
+
size: "small"
|
|
3540
|
+
},
|
|
3541
|
+
{
|
|
3542
|
+
iconName: "filled_circle",
|
|
3543
|
+
size: "medium"
|
|
3544
|
+
},
|
|
3545
|
+
{
|
|
3546
|
+
iconName: "filled_circle",
|
|
3547
|
+
size: "large"
|
|
3548
|
+
},
|
|
3549
|
+
{
|
|
3550
|
+
iconName: "outlined_check",
|
|
3551
|
+
size: "medium"
|
|
3552
|
+
},
|
|
3553
|
+
{
|
|
3554
|
+
iconName: "filled_arrow_right",
|
|
3555
|
+
size: "medium"
|
|
3556
|
+
}
|
|
3557
|
+
]
|
|
3558
|
+
};
|
|
3194
3559
|
var blockConfig = {
|
|
3195
3560
|
$schema: $schema,
|
|
3196
3561
|
apiVersion: apiVersion,
|
|
@@ -3204,7 +3569,9 @@ var blockConfig = {
|
|
|
3204
3569
|
attributes: attributes,
|
|
3205
3570
|
render: render,
|
|
3206
3571
|
editorScript: editorScript,
|
|
3207
|
-
script: script
|
|
3572
|
+
script: script,
|
|
3573
|
+
style: style,
|
|
3574
|
+
preview: preview
|
|
3208
3575
|
};
|
|
3209
3576
|
|
|
3210
3577
|
registerBlockType(blockConfig.name, _objectSpread2(_objectSpread2({}, blockConfig), {}, {
|