@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.cjs
CHANGED
|
@@ -485,10 +485,97 @@ var attributes$e = {
|
|
|
485
485
|
"default": {
|
|
486
486
|
},
|
|
487
487
|
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
488
|
+
},
|
|
489
|
+
onClick: {
|
|
490
|
+
type: "string",
|
|
491
|
+
"default": "",
|
|
492
|
+
description: "Name of JavaScript function to call on click (e.g., 'myFunction'). Function receives click event and button element context."
|
|
488
493
|
}
|
|
489
494
|
};
|
|
490
495
|
var editorScript$e = "times-design-system";
|
|
491
496
|
var script$e = "times-design-system";
|
|
497
|
+
var style$e = "file:./style.css";
|
|
498
|
+
var preview$5 = {
|
|
499
|
+
combinations: [
|
|
500
|
+
{
|
|
501
|
+
label: "Primary",
|
|
502
|
+
intent: "primary",
|
|
503
|
+
size: "medium"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
label: "Primary Small",
|
|
507
|
+
intent: "primary",
|
|
508
|
+
size: "small"
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
label: "Primary Small",
|
|
512
|
+
intent: "primary",
|
|
513
|
+
size: "small",
|
|
514
|
+
iconRight: "filled_arrow_right"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
label: "Primary Large",
|
|
518
|
+
intent: "primary",
|
|
519
|
+
size: "large"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
label: "Secondary",
|
|
523
|
+
intent: "secondary",
|
|
524
|
+
size: "medium"
|
|
525
|
+
},
|
|
526
|
+
{
|
|
527
|
+
label: "Negative",
|
|
528
|
+
intent: "negative",
|
|
529
|
+
size: "medium"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
label: "Disabled",
|
|
533
|
+
disabled: true,
|
|
534
|
+
intent: "primary",
|
|
535
|
+
size: "medium"
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
label: "Loading",
|
|
539
|
+
isLoading: true,
|
|
540
|
+
intent: "primary",
|
|
541
|
+
size: "medium"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
label: "Rounded",
|
|
545
|
+
isRounded: true,
|
|
546
|
+
intent: "primary",
|
|
547
|
+
size: "medium"
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
label: "Icon Left",
|
|
551
|
+
iconLeft: "filled_circle",
|
|
552
|
+
intent: "primary"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
label: "Icon Right",
|
|
556
|
+
iconRight: "filled_circle",
|
|
557
|
+
intent: "primary"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
label: "Full Width",
|
|
561
|
+
behaviour: "full",
|
|
562
|
+
intent: "primary",
|
|
563
|
+
size: "large"
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
label: "Full Width",
|
|
567
|
+
behaviour: "full",
|
|
568
|
+
intent: "primary",
|
|
569
|
+
iconRight: "filled_search"
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
label: "With onClick",
|
|
573
|
+
intent: "primary",
|
|
574
|
+
size: "medium",
|
|
575
|
+
onClick: "handleButtonClick"
|
|
576
|
+
}
|
|
577
|
+
]
|
|
578
|
+
};
|
|
492
579
|
var metadata$9 = {
|
|
493
580
|
$schema: $schema$e,
|
|
494
581
|
apiVersion: apiVersion$e,
|
|
@@ -502,7 +589,9 @@ var metadata$9 = {
|
|
|
502
589
|
render: render$e,
|
|
503
590
|
attributes: attributes$e,
|
|
504
591
|
editorScript: editorScript$e,
|
|
505
|
-
script: script$e
|
|
592
|
+
script: script$e,
|
|
593
|
+
style: style$e,
|
|
594
|
+
preview: preview$5
|
|
506
595
|
};
|
|
507
596
|
|
|
508
597
|
blocks.registerBlockType(metadata$9.name, _objectSpread2(_objectSpread2({}, metadata$9), {}, {
|
|
@@ -555,6 +644,7 @@ var attributes$d = {
|
|
|
555
644
|
};
|
|
556
645
|
var example$8 = {
|
|
557
646
|
};
|
|
647
|
+
var style$d = "file:./style.css";
|
|
558
648
|
var script$d = "times-design-system";
|
|
559
649
|
var editorScript$d = "times-design-system";
|
|
560
650
|
var metadata$8 = {
|
|
@@ -569,6 +659,7 @@ var metadata$8 = {
|
|
|
569
659
|
render: render$d,
|
|
570
660
|
attributes: attributes$d,
|
|
571
661
|
example: example$8,
|
|
662
|
+
style: style$d,
|
|
572
663
|
script: script$d,
|
|
573
664
|
editorScript: editorScript$d
|
|
574
665
|
};
|
|
@@ -713,6 +804,7 @@ var attributes$c = {
|
|
|
713
804
|
};
|
|
714
805
|
var example$7 = {
|
|
715
806
|
};
|
|
807
|
+
var style$c = "file:./style.css";
|
|
716
808
|
var script$c = "times-design-system";
|
|
717
809
|
var editorScript$c = "times-design-system";
|
|
718
810
|
var metadata$7 = {
|
|
@@ -727,6 +819,7 @@ var metadata$7 = {
|
|
|
727
819
|
render: render$c,
|
|
728
820
|
attributes: attributes$c,
|
|
729
821
|
example: example$7,
|
|
822
|
+
style: style$c,
|
|
730
823
|
script: script$c,
|
|
731
824
|
editorScript: editorScript$c
|
|
732
825
|
};
|
|
@@ -907,6 +1000,7 @@ var attributes$b = {
|
|
|
907
1000
|
};
|
|
908
1001
|
var example$6 = {
|
|
909
1002
|
};
|
|
1003
|
+
var style$b = "file:./style.css";
|
|
910
1004
|
var script$b = "times-design-system";
|
|
911
1005
|
var editorScript$b = "times-design-system";
|
|
912
1006
|
var metadata$6 = {
|
|
@@ -921,6 +1015,7 @@ var metadata$6 = {
|
|
|
921
1015
|
render: render$b,
|
|
922
1016
|
attributes: attributes$b,
|
|
923
1017
|
example: example$6,
|
|
1018
|
+
style: style$b,
|
|
924
1019
|
script: script$b,
|
|
925
1020
|
editorScript: editorScript$b
|
|
926
1021
|
};
|
|
@@ -1114,6 +1209,16 @@ var attributes$a = {
|
|
|
1114
1209
|
type: "boolean",
|
|
1115
1210
|
"default": false
|
|
1116
1211
|
},
|
|
1212
|
+
intent: {
|
|
1213
|
+
type: "string",
|
|
1214
|
+
"enum": [
|
|
1215
|
+
"primary",
|
|
1216
|
+
"secondary",
|
|
1217
|
+
"negative"
|
|
1218
|
+
],
|
|
1219
|
+
"default": "primary",
|
|
1220
|
+
description: "Visual style variant matching button intents"
|
|
1221
|
+
},
|
|
1117
1222
|
isLoading: {
|
|
1118
1223
|
type: "boolean",
|
|
1119
1224
|
"default": false,
|
|
@@ -1151,10 +1256,62 @@ var attributes$a = {
|
|
|
1151
1256
|
"default": {
|
|
1152
1257
|
},
|
|
1153
1258
|
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
1259
|
+
},
|
|
1260
|
+
onClick: {
|
|
1261
|
+
type: "string",
|
|
1262
|
+
"default": "",
|
|
1263
|
+
description: "Name of JavaScript function to call on click (e.g., 'myFunction'). Function receives click event and icon button element context."
|
|
1154
1264
|
}
|
|
1155
1265
|
};
|
|
1266
|
+
var preview$4 = {
|
|
1267
|
+
combinations: [
|
|
1268
|
+
{
|
|
1269
|
+
iconName: "filled_add",
|
|
1270
|
+
iconSize: "medium",
|
|
1271
|
+
intent: "primary"
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
iconName: "filled_add",
|
|
1275
|
+
iconSize: "medium",
|
|
1276
|
+
intent: "secondary"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
iconName: "filled_add",
|
|
1280
|
+
iconSize: "medium",
|
|
1281
|
+
intent: "negative"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
iconName: "filled_search",
|
|
1285
|
+
iconSize: "medium",
|
|
1286
|
+
intent: "primary"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
iconName: "filled_close",
|
|
1290
|
+
iconSize: "small",
|
|
1291
|
+
intent: "primary"
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
iconName: "filled_settings",
|
|
1295
|
+
iconSize: "large",
|
|
1296
|
+
intent: "primary"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
iconName: "filled_add",
|
|
1300
|
+
iconSize: "medium",
|
|
1301
|
+
intent: "primary",
|
|
1302
|
+
round: true
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
iconName: "filled_add",
|
|
1306
|
+
iconSize: "medium",
|
|
1307
|
+
intent: "primary",
|
|
1308
|
+
onClick: "handleIconButtonClick"
|
|
1309
|
+
}
|
|
1310
|
+
]
|
|
1311
|
+
};
|
|
1156
1312
|
var example$5 = {
|
|
1157
1313
|
};
|
|
1314
|
+
var style$a = "file:./style.css";
|
|
1158
1315
|
var script$a = "times-design-system";
|
|
1159
1316
|
var editorScript$a = "times-design-system";
|
|
1160
1317
|
var metadata$5 = {
|
|
@@ -1168,7 +1325,9 @@ var metadata$5 = {
|
|
|
1168
1325
|
supports: supports$a,
|
|
1169
1326
|
render: render$a,
|
|
1170
1327
|
attributes: attributes$a,
|
|
1328
|
+
preview: preview$4,
|
|
1171
1329
|
example: example$5,
|
|
1330
|
+
style: style$a,
|
|
1172
1331
|
script: script$a,
|
|
1173
1332
|
editorScript: editorScript$a
|
|
1174
1333
|
};
|
|
@@ -1347,7 +1506,7 @@ var attributes$9 = {
|
|
|
1347
1506
|
},
|
|
1348
1507
|
intent: {
|
|
1349
1508
|
type: "string",
|
|
1350
|
-
"default": "
|
|
1509
|
+
"default": "primary",
|
|
1351
1510
|
"enum": [
|
|
1352
1511
|
"primary",
|
|
1353
1512
|
"secondary"
|
|
@@ -1355,7 +1514,7 @@ var attributes$9 = {
|
|
|
1355
1514
|
},
|
|
1356
1515
|
size: {
|
|
1357
1516
|
type: "string",
|
|
1358
|
-
"default": "
|
|
1517
|
+
"default": "small",
|
|
1359
1518
|
"enum": [
|
|
1360
1519
|
"small",
|
|
1361
1520
|
"large"
|
|
@@ -1383,6 +1542,11 @@ var attributes$9 = {
|
|
|
1383
1542
|
type: "string",
|
|
1384
1543
|
"default": ""
|
|
1385
1544
|
},
|
|
1545
|
+
onClick: {
|
|
1546
|
+
type: "string",
|
|
1547
|
+
"default": "",
|
|
1548
|
+
description: "Name of JavaScript function to call on click (e.g., 'myFunction'). Function receives click event and chip element context."
|
|
1549
|
+
},
|
|
1386
1550
|
classes: {
|
|
1387
1551
|
type: "string",
|
|
1388
1552
|
"default": "",
|
|
@@ -1397,8 +1561,39 @@ var attributes$9 = {
|
|
|
1397
1561
|
};
|
|
1398
1562
|
var example$4 = {
|
|
1399
1563
|
};
|
|
1564
|
+
var style$9 = "file:./style.css";
|
|
1400
1565
|
var script$9 = "times-design-system";
|
|
1401
1566
|
var editorScript$9 = "times-design-system";
|
|
1567
|
+
var preview$3 = {
|
|
1568
|
+
combinations: [
|
|
1569
|
+
{
|
|
1570
|
+
content: "Primary Small",
|
|
1571
|
+
intent: "primary",
|
|
1572
|
+
size: "small"
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
content: "Primary Large",
|
|
1576
|
+
intent: "primary",
|
|
1577
|
+
size: "large"
|
|
1578
|
+
},
|
|
1579
|
+
{
|
|
1580
|
+
content: "Secondary",
|
|
1581
|
+
intent: "secondary",
|
|
1582
|
+
size: "small"
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
content: "Channel",
|
|
1586
|
+
channel: true,
|
|
1587
|
+
size: "small"
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
content: "Toggle",
|
|
1591
|
+
intent: "primary",
|
|
1592
|
+
toggle: true,
|
|
1593
|
+
size: "small"
|
|
1594
|
+
}
|
|
1595
|
+
]
|
|
1596
|
+
};
|
|
1402
1597
|
var metadata$4 = {
|
|
1403
1598
|
$schema: $schema$9,
|
|
1404
1599
|
apiVersion: apiVersion$9,
|
|
@@ -1411,8 +1606,10 @@ var metadata$4 = {
|
|
|
1411
1606
|
render: render$9,
|
|
1412
1607
|
attributes: attributes$9,
|
|
1413
1608
|
example: example$4,
|
|
1609
|
+
style: style$9,
|
|
1414
1610
|
script: script$9,
|
|
1415
|
-
editorScript: editorScript$9
|
|
1611
|
+
editorScript: editorScript$9,
|
|
1612
|
+
preview: preview$3
|
|
1416
1613
|
};
|
|
1417
1614
|
|
|
1418
1615
|
var edit$9 = function edit(_ref) {
|
|
@@ -1588,11 +1785,11 @@ blocks.registerBlockType(metadata$4.name, _objectSpread2(_objectSpread2({}, meta
|
|
|
1588
1785
|
|
|
1589
1786
|
var $schema$8 = "https://schemas.wp.org/trunk/block.json";
|
|
1590
1787
|
var apiVersion$8 = 3;
|
|
1591
|
-
var name$8 = "tds/
|
|
1592
|
-
var title$8 = "
|
|
1788
|
+
var name$8 = "tds/tag";
|
|
1789
|
+
var title$8 = "Tag";
|
|
1593
1790
|
var category$8 = "common";
|
|
1594
1791
|
var description$8 = "Badge or status indicator component";
|
|
1595
|
-
var icon$8 = "
|
|
1792
|
+
var icon$8 = "tag";
|
|
1596
1793
|
var supports$8 = {
|
|
1597
1794
|
html: false,
|
|
1598
1795
|
spacing: {
|
|
@@ -1605,18 +1802,13 @@ var attributes$8 = {
|
|
|
1605
1802
|
type: "string",
|
|
1606
1803
|
"default": ""
|
|
1607
1804
|
},
|
|
1608
|
-
content: {
|
|
1609
|
-
type: "string",
|
|
1610
|
-
"default": ""
|
|
1611
|
-
},
|
|
1612
1805
|
intent: {
|
|
1613
1806
|
type: "string",
|
|
1614
1807
|
"default": "secondary",
|
|
1615
1808
|
"enum": [
|
|
1616
1809
|
"primary",
|
|
1617
1810
|
"secondary",
|
|
1618
|
-
"
|
|
1619
|
-
"positive"
|
|
1811
|
+
"tertiary"
|
|
1620
1812
|
]
|
|
1621
1813
|
},
|
|
1622
1814
|
size: {
|
|
@@ -1628,6 +1820,20 @@ var attributes$8 = {
|
|
|
1628
1820
|
"large"
|
|
1629
1821
|
]
|
|
1630
1822
|
},
|
|
1823
|
+
callout: {
|
|
1824
|
+
type: "boolean",
|
|
1825
|
+
"default": false,
|
|
1826
|
+
description: "Applies a callout style to the tag"
|
|
1827
|
+
},
|
|
1828
|
+
channel: {
|
|
1829
|
+
type: "boolean",
|
|
1830
|
+
"default": false
|
|
1831
|
+
},
|
|
1832
|
+
ariaLabel: {
|
|
1833
|
+
type: "string",
|
|
1834
|
+
"default": "",
|
|
1835
|
+
description: "ARIA label for accessibility"
|
|
1836
|
+
},
|
|
1631
1837
|
iconLeft: {
|
|
1632
1838
|
type: "string",
|
|
1633
1839
|
"default": "",
|
|
@@ -1638,14 +1844,10 @@ var attributes$8 = {
|
|
|
1638
1844
|
"default": "",
|
|
1639
1845
|
description: "Icon on the right with variant prefix (e.g., 'outlined_check')"
|
|
1640
1846
|
},
|
|
1641
|
-
ariaLabel: {
|
|
1642
|
-
type: "string",
|
|
1643
|
-
"default": ""
|
|
1644
|
-
},
|
|
1645
1847
|
classes: {
|
|
1646
1848
|
type: "string",
|
|
1647
1849
|
"default": "",
|
|
1648
|
-
description: "Additional CSS classes applied to the rendered
|
|
1850
|
+
description: "Additional CSS classes applied to the rendered tag element"
|
|
1649
1851
|
},
|
|
1650
1852
|
dataAttributes: {
|
|
1651
1853
|
type: "object",
|
|
@@ -1656,8 +1858,47 @@ var attributes$8 = {
|
|
|
1656
1858
|
};
|
|
1657
1859
|
var example$3 = {
|
|
1658
1860
|
};
|
|
1861
|
+
var style$8 = "file:./style.css";
|
|
1659
1862
|
var script$8 = "times-design-system";
|
|
1660
1863
|
var editorScript$8 = "times-design-system";
|
|
1864
|
+
var preview$2 = {
|
|
1865
|
+
combinations: [
|
|
1866
|
+
{
|
|
1867
|
+
label: "Primary",
|
|
1868
|
+
intent: "primary",
|
|
1869
|
+
size: "small"
|
|
1870
|
+
},
|
|
1871
|
+
{
|
|
1872
|
+
label: "Secondary",
|
|
1873
|
+
intent: "secondary",
|
|
1874
|
+
size: "medium"
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
label: "Tertiary",
|
|
1878
|
+
intent: "tertiary",
|
|
1879
|
+
size: "large"
|
|
1880
|
+
},
|
|
1881
|
+
{
|
|
1882
|
+
label: "Callout",
|
|
1883
|
+
intent: "primary",
|
|
1884
|
+
callout: true,
|
|
1885
|
+
size: "medium",
|
|
1886
|
+
iconLeft: "filled_check"
|
|
1887
|
+
},
|
|
1888
|
+
{
|
|
1889
|
+
label: "Channel",
|
|
1890
|
+
intent: "primary",
|
|
1891
|
+
channel: true,
|
|
1892
|
+
size: "medium"
|
|
1893
|
+
},
|
|
1894
|
+
{
|
|
1895
|
+
label: "With Icon",
|
|
1896
|
+
intent: "primary",
|
|
1897
|
+
iconLeft: "filled_check",
|
|
1898
|
+
size: "large"
|
|
1899
|
+
}
|
|
1900
|
+
]
|
|
1901
|
+
};
|
|
1661
1902
|
var metadata$3 = {
|
|
1662
1903
|
$schema: $schema$8,
|
|
1663
1904
|
apiVersion: apiVersion$8,
|
|
@@ -1670,15 +1911,16 @@ var metadata$3 = {
|
|
|
1670
1911
|
render: render$8,
|
|
1671
1912
|
attributes: attributes$8,
|
|
1672
1913
|
example: example$3,
|
|
1914
|
+
style: style$8,
|
|
1673
1915
|
script: script$8,
|
|
1674
|
-
editorScript: editorScript$8
|
|
1916
|
+
editorScript: editorScript$8,
|
|
1917
|
+
preview: preview$2
|
|
1675
1918
|
};
|
|
1676
1919
|
|
|
1677
1920
|
var edit$8 = function edit(_ref) {
|
|
1678
1921
|
var attributes = _ref.attributes,
|
|
1679
1922
|
setAttributes = _ref.setAttributes;
|
|
1680
1923
|
var label = attributes.label,
|
|
1681
|
-
content = attributes.content,
|
|
1682
1924
|
intent = attributes.intent,
|
|
1683
1925
|
size = attributes.size,
|
|
1684
1926
|
iconLeft = attributes.iconLeft,
|
|
@@ -1688,13 +1930,13 @@ var edit$8 = function edit(_ref) {
|
|
|
1688
1930
|
attributes.dataAttributes;
|
|
1689
1931
|
var blockProps = blockEditor.useBlockProps();
|
|
1690
1932
|
var buildClass = function buildClass() {
|
|
1691
|
-
var classes = ['tds-
|
|
1692
|
-
classes.push("tds-
|
|
1693
|
-
classes.push("tds-
|
|
1933
|
+
var classes = ['tds-tag'];
|
|
1934
|
+
classes.push("tds-tag--intent-".concat(intent));
|
|
1935
|
+
classes.push("tds-tag--size-".concat(size));
|
|
1694
1936
|
return classes.join(' ');
|
|
1695
1937
|
};
|
|
1696
1938
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(blockEditor.InspectorControls, null, /*#__PURE__*/React.createElement(components.PanelBody, {
|
|
1697
|
-
title: "
|
|
1939
|
+
title: "Tag Settings"
|
|
1698
1940
|
}, /*#__PURE__*/React.createElement(components.TextControl, {
|
|
1699
1941
|
label: "Label",
|
|
1700
1942
|
value: label,
|
|
@@ -1778,7 +2020,7 @@ var edit$8 = function edit(_ref) {
|
|
|
1778
2020
|
});
|
|
1779
2021
|
},
|
|
1780
2022
|
placeholder: "class-name-1 class-name-2",
|
|
1781
|
-
help: "Space-separated CSS classes added to the
|
|
2023
|
+
help: "Space-separated CSS classes added to the tag element"
|
|
1782
2024
|
}), /*#__PURE__*/React.createElement("p", {
|
|
1783
2025
|
style: {
|
|
1784
2026
|
fontSize: '12px',
|
|
@@ -1789,27 +2031,17 @@ var edit$8 = function edit(_ref) {
|
|
|
1789
2031
|
className: buildClass(),
|
|
1790
2032
|
"aria-label": ariaLabel
|
|
1791
2033
|
}), label && /*#__PURE__*/React.createElement("div", {
|
|
1792
|
-
className: "tds-
|
|
2034
|
+
className: "tds-tag__label"
|
|
1793
2035
|
}, label), iconLeft && /*#__PURE__*/React.createElement("span", {
|
|
1794
|
-
className: "tds-
|
|
1795
|
-
}, iconLeft), /*#__PURE__*/React.createElement(
|
|
1796
|
-
|
|
1797
|
-
onChange: function onChange(val) {
|
|
1798
|
-
return setAttributes({
|
|
1799
|
-
content: val
|
|
1800
|
-
});
|
|
1801
|
-
},
|
|
1802
|
-
placeholder: "Flag content",
|
|
1803
|
-
className: "tds-flag__content"
|
|
1804
|
-
}), iconRight && /*#__PURE__*/React.createElement("span", {
|
|
1805
|
-
className: "tds-flag__icon-right"
|
|
2036
|
+
className: "tds-tag__icon-left"
|
|
2037
|
+
}, iconLeft), iconRight && /*#__PURE__*/React.createElement("span", {
|
|
2038
|
+
className: "tds-tag__icon-right"
|
|
1806
2039
|
}, iconRight)));
|
|
1807
2040
|
};
|
|
1808
2041
|
|
|
1809
2042
|
var save$8 = function save(_ref) {
|
|
1810
2043
|
var attributes = _ref.attributes;
|
|
1811
2044
|
var label = attributes.label,
|
|
1812
|
-
content = attributes.content,
|
|
1813
2045
|
intent = attributes.intent,
|
|
1814
2046
|
size = attributes.size,
|
|
1815
2047
|
iconLeft = attributes.iconLeft,
|
|
@@ -1817,23 +2049,20 @@ var save$8 = function save(_ref) {
|
|
|
1817
2049
|
ariaLabel = attributes.ariaLabel;
|
|
1818
2050
|
var blockProps = blockEditor.useBlockProps.save();
|
|
1819
2051
|
var buildClass = function buildClass() {
|
|
1820
|
-
var classes = ['tds-
|
|
1821
|
-
classes.push("tds-
|
|
1822
|
-
classes.push("tds-
|
|
2052
|
+
var classes = ['tds-tag'];
|
|
2053
|
+
classes.push("tds-tag--intent-".concat(intent));
|
|
2054
|
+
classes.push("tds-tag--size-".concat(size));
|
|
1823
2055
|
return classes.join(' ');
|
|
1824
2056
|
};
|
|
1825
2057
|
return /*#__PURE__*/React.createElement("div", _extends({}, blockProps, {
|
|
1826
2058
|
className: buildClass(),
|
|
1827
2059
|
"aria-label": ariaLabel
|
|
1828
2060
|
}), label && /*#__PURE__*/React.createElement("div", {
|
|
1829
|
-
className: "tds-
|
|
2061
|
+
className: "tds-tag__label"
|
|
1830
2062
|
}, label), iconLeft && /*#__PURE__*/React.createElement("span", {
|
|
1831
|
-
className: "tds-
|
|
1832
|
-
}, iconLeft), /*#__PURE__*/React.createElement(
|
|
1833
|
-
|
|
1834
|
-
className: "tds-flag__content"
|
|
1835
|
-
}), iconRight && /*#__PURE__*/React.createElement("span", {
|
|
1836
|
-
className: "tds-flag__icon-right"
|
|
2063
|
+
className: "tds-tag__icon-left"
|
|
2064
|
+
}, iconLeft), iconRight && /*#__PURE__*/React.createElement("span", {
|
|
2065
|
+
className: "tds-tag__icon-right"
|
|
1837
2066
|
}, iconRight));
|
|
1838
2067
|
};
|
|
1839
2068
|
|
|
@@ -1897,6 +2126,7 @@ var attributes$7 = {
|
|
|
1897
2126
|
};
|
|
1898
2127
|
var example$2 = {
|
|
1899
2128
|
};
|
|
2129
|
+
var style$7 = "file:./style.css";
|
|
1900
2130
|
var script$7 = "times-design-system";
|
|
1901
2131
|
var editorScript$7 = "times-design-system";
|
|
1902
2132
|
var metadata$2 = {
|
|
@@ -1911,6 +2141,7 @@ var metadata$2 = {
|
|
|
1911
2141
|
render: render$7,
|
|
1912
2142
|
attributes: attributes$7,
|
|
1913
2143
|
example: example$2,
|
|
2144
|
+
style: style$7,
|
|
1914
2145
|
script: script$7,
|
|
1915
2146
|
editorScript: editorScript$7
|
|
1916
2147
|
};
|
|
@@ -2089,8 +2320,9 @@ var attributes$6 = {
|
|
|
2089
2320
|
"enum": [
|
|
2090
2321
|
"primary",
|
|
2091
2322
|
"secondary",
|
|
2092
|
-
"
|
|
2093
|
-
]
|
|
2323
|
+
"danger"
|
|
2324
|
+
],
|
|
2325
|
+
description: "Link color and style variant"
|
|
2094
2326
|
},
|
|
2095
2327
|
sentiment: {
|
|
2096
2328
|
type: "string",
|
|
@@ -2104,10 +2336,12 @@ var attributes$6 = {
|
|
|
2104
2336
|
type: "string",
|
|
2105
2337
|
"default": "medium",
|
|
2106
2338
|
"enum": [
|
|
2339
|
+
"xsmall",
|
|
2107
2340
|
"small",
|
|
2108
2341
|
"medium",
|
|
2109
2342
|
"large"
|
|
2110
|
-
]
|
|
2343
|
+
],
|
|
2344
|
+
description: "Link size variant"
|
|
2111
2345
|
},
|
|
2112
2346
|
iconLeft: {
|
|
2113
2347
|
type: "string",
|
|
@@ -2151,12 +2385,106 @@ var attributes$6 = {
|
|
|
2151
2385
|
"default": {
|
|
2152
2386
|
},
|
|
2153
2387
|
description: "Custom data-* attributes for extensibility (allowlisted server-side)"
|
|
2388
|
+
},
|
|
2389
|
+
isDisabled: {
|
|
2390
|
+
type: "boolean",
|
|
2391
|
+
"default": false,
|
|
2392
|
+
description: "Disables the link and prevents navigation"
|
|
2393
|
+
},
|
|
2394
|
+
onClick: {
|
|
2395
|
+
type: "string",
|
|
2396
|
+
"default": "",
|
|
2397
|
+
description: "Name of JavaScript function to call on click (e.g., 'myFunction'). Function receives click event and link element context."
|
|
2154
2398
|
}
|
|
2155
2399
|
};
|
|
2156
2400
|
var example$1 = {
|
|
2157
2401
|
};
|
|
2402
|
+
var style$6 = "file:./style.css";
|
|
2158
2403
|
var script$6 = "times-design-system";
|
|
2159
2404
|
var editorScript$6 = "times-design-system";
|
|
2405
|
+
var preview$1 = {
|
|
2406
|
+
combinations: [
|
|
2407
|
+
{
|
|
2408
|
+
content: "Primary",
|
|
2409
|
+
href: "#",
|
|
2410
|
+
intent: "primary",
|
|
2411
|
+
size: "medium"
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
content: "Primary",
|
|
2415
|
+
href: "#",
|
|
2416
|
+
intent: "primary",
|
|
2417
|
+
size: "medium",
|
|
2418
|
+
iconLeft: "filled_arrow_left"
|
|
2419
|
+
},
|
|
2420
|
+
{
|
|
2421
|
+
content: "Primary",
|
|
2422
|
+
href: "#",
|
|
2423
|
+
intent: "primary",
|
|
2424
|
+
size: "medium",
|
|
2425
|
+
iconRight: "filled_arrow_right"
|
|
2426
|
+
},
|
|
2427
|
+
{
|
|
2428
|
+
content: "Secondary",
|
|
2429
|
+
href: "#",
|
|
2430
|
+
intent: "secondary",
|
|
2431
|
+
size: "medium"
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
content: "Danger",
|
|
2435
|
+
href: "#",
|
|
2436
|
+
intent: "danger",
|
|
2437
|
+
size: "medium"
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
content: "XSmall",
|
|
2441
|
+
href: "#",
|
|
2442
|
+
size: "xsmall"
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
content: "Small",
|
|
2446
|
+
href: "#",
|
|
2447
|
+
size: "small"
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
content: "Large",
|
|
2451
|
+
href: "#",
|
|
2452
|
+
size: "large"
|
|
2453
|
+
},
|
|
2454
|
+
{
|
|
2455
|
+
content: "Brand",
|
|
2456
|
+
href: "#",
|
|
2457
|
+
sentiment: "brand",
|
|
2458
|
+
size: "medium"
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
content: "Utility",
|
|
2462
|
+
href: "#",
|
|
2463
|
+
sentiment: "utility",
|
|
2464
|
+
size: "medium"
|
|
2465
|
+
},
|
|
2466
|
+
{
|
|
2467
|
+
content: "External",
|
|
2468
|
+
href: "#",
|
|
2469
|
+
target: "_blank",
|
|
2470
|
+
size: "medium"
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
content: "With onClick",
|
|
2474
|
+
href: "#",
|
|
2475
|
+
intent: "primary",
|
|
2476
|
+
size: "medium",
|
|
2477
|
+
onClick: "handleLinkClick"
|
|
2478
|
+
},
|
|
2479
|
+
{
|
|
2480
|
+
content: "Disabled",
|
|
2481
|
+
href: "#",
|
|
2482
|
+
intent: "primary",
|
|
2483
|
+
size: "medium",
|
|
2484
|
+
isDisabled: true
|
|
2485
|
+
}
|
|
2486
|
+
]
|
|
2487
|
+
};
|
|
2160
2488
|
var metadata$1 = {
|
|
2161
2489
|
$schema: $schema$6,
|
|
2162
2490
|
apiVersion: apiVersion$6,
|
|
@@ -2169,8 +2497,10 @@ var metadata$1 = {
|
|
|
2169
2497
|
render: render$6,
|
|
2170
2498
|
attributes: attributes$6,
|
|
2171
2499
|
example: example$1,
|
|
2500
|
+
style: style$6,
|
|
2172
2501
|
script: script$6,
|
|
2173
|
-
editorScript: editorScript$6
|
|
2502
|
+
editorScript: editorScript$6,
|
|
2503
|
+
preview: preview$1
|
|
2174
2504
|
};
|
|
2175
2505
|
|
|
2176
2506
|
var edit$6 = function edit(_ref) {
|
|
@@ -2449,6 +2779,7 @@ var attributes$5 = {
|
|
|
2449
2779
|
};
|
|
2450
2780
|
var example = {
|
|
2451
2781
|
};
|
|
2782
|
+
var style$5 = "file:./style.css";
|
|
2452
2783
|
var script$5 = "times-design-system";
|
|
2453
2784
|
var editorScript$5 = "times-design-system";
|
|
2454
2785
|
var metadata = {
|
|
@@ -2463,6 +2794,7 @@ var metadata = {
|
|
|
2463
2794
|
render: render$5,
|
|
2464
2795
|
attributes: attributes$5,
|
|
2465
2796
|
example: example,
|
|
2797
|
+
style: style$5,
|
|
2466
2798
|
script: script$5,
|
|
2467
2799
|
editorScript: editorScript$5
|
|
2468
2800
|
};
|
|
@@ -2652,6 +2984,7 @@ var attributes$4 = {
|
|
|
2652
2984
|
}
|
|
2653
2985
|
};
|
|
2654
2986
|
var render$4 = "file:./render.php";
|
|
2987
|
+
var style$4 = "file:./style.css";
|
|
2655
2988
|
var editorScript$4 = "times-design-system";
|
|
2656
2989
|
var script$4 = "times-design-system";
|
|
2657
2990
|
var blockConfig$4 = {
|
|
@@ -2666,6 +2999,7 @@ var blockConfig$4 = {
|
|
|
2666
2999
|
textdomain: textdomain$4,
|
|
2667
3000
|
attributes: attributes$4,
|
|
2668
3001
|
render: render$4,
|
|
3002
|
+
style: style$4,
|
|
2669
3003
|
editorScript: editorScript$4,
|
|
2670
3004
|
script: script$4
|
|
2671
3005
|
};
|
|
@@ -2783,6 +3117,7 @@ var attributes$3 = {
|
|
|
2783
3117
|
}
|
|
2784
3118
|
};
|
|
2785
3119
|
var render$3 = "file:./render.php";
|
|
3120
|
+
var style$3 = "file:./style.css";
|
|
2786
3121
|
var editorScript$3 = "times-design-system";
|
|
2787
3122
|
var script$3 = "times-design-system";
|
|
2788
3123
|
var blockConfig$3 = {
|
|
@@ -2797,6 +3132,7 @@ var blockConfig$3 = {
|
|
|
2797
3132
|
textdomain: textdomain$3,
|
|
2798
3133
|
attributes: attributes$3,
|
|
2799
3134
|
render: render$3,
|
|
3135
|
+
style: style$3,
|
|
2800
3136
|
editorScript: editorScript$3,
|
|
2801
3137
|
script: script$3
|
|
2802
3138
|
};
|
|
@@ -2914,6 +3250,7 @@ var attributes$2 = {
|
|
|
2914
3250
|
}
|
|
2915
3251
|
};
|
|
2916
3252
|
var render$2 = "file:./render.php";
|
|
3253
|
+
var style$2 = "file:./style.css";
|
|
2917
3254
|
var editorScript$2 = "times-design-system";
|
|
2918
3255
|
var script$2 = "times-design-system";
|
|
2919
3256
|
var blockConfig$2 = {
|
|
@@ -2928,6 +3265,7 @@ var blockConfig$2 = {
|
|
|
2928
3265
|
textdomain: textdomain$2,
|
|
2929
3266
|
attributes: attributes$2,
|
|
2930
3267
|
render: render$2,
|
|
3268
|
+
style: style$2,
|
|
2931
3269
|
editorScript: editorScript$2,
|
|
2932
3270
|
script: script$2
|
|
2933
3271
|
};
|
|
@@ -3045,6 +3383,7 @@ var attributes$1 = {
|
|
|
3045
3383
|
}
|
|
3046
3384
|
};
|
|
3047
3385
|
var render$1 = "file:./render.php";
|
|
3386
|
+
var style$1 = "file:./style.css";
|
|
3048
3387
|
var editorScript$1 = "times-design-system";
|
|
3049
3388
|
var script$1 = "times-design-system";
|
|
3050
3389
|
var blockConfig$1 = {
|
|
@@ -3059,6 +3398,7 @@ var blockConfig$1 = {
|
|
|
3059
3398
|
textdomain: textdomain$1,
|
|
3060
3399
|
attributes: attributes$1,
|
|
3061
3400
|
render: render$1,
|
|
3401
|
+
style: style$1,
|
|
3062
3402
|
editorScript: editorScript$1,
|
|
3063
3403
|
script: script$1
|
|
3064
3404
|
};
|
|
@@ -3193,6 +3533,31 @@ var attributes = {
|
|
|
3193
3533
|
var render = "file:./render.php";
|
|
3194
3534
|
var editorScript = "times-design-system";
|
|
3195
3535
|
var script = "times-design-system";
|
|
3536
|
+
var style = "file:./style.css";
|
|
3537
|
+
var preview = {
|
|
3538
|
+
combinations: [
|
|
3539
|
+
{
|
|
3540
|
+
iconName: "filled_circle",
|
|
3541
|
+
size: "small"
|
|
3542
|
+
},
|
|
3543
|
+
{
|
|
3544
|
+
iconName: "filled_circle",
|
|
3545
|
+
size: "medium"
|
|
3546
|
+
},
|
|
3547
|
+
{
|
|
3548
|
+
iconName: "filled_circle",
|
|
3549
|
+
size: "large"
|
|
3550
|
+
},
|
|
3551
|
+
{
|
|
3552
|
+
iconName: "outlined_check",
|
|
3553
|
+
size: "medium"
|
|
3554
|
+
},
|
|
3555
|
+
{
|
|
3556
|
+
iconName: "filled_arrow_right",
|
|
3557
|
+
size: "medium"
|
|
3558
|
+
}
|
|
3559
|
+
]
|
|
3560
|
+
};
|
|
3196
3561
|
var blockConfig = {
|
|
3197
3562
|
$schema: $schema,
|
|
3198
3563
|
apiVersion: apiVersion,
|
|
@@ -3206,7 +3571,9 @@ var blockConfig = {
|
|
|
3206
3571
|
attributes: attributes,
|
|
3207
3572
|
render: render,
|
|
3208
3573
|
editorScript: editorScript,
|
|
3209
|
-
script: script
|
|
3574
|
+
script: script,
|
|
3575
|
+
style: style,
|
|
3576
|
+
preview: preview
|
|
3210
3577
|
};
|
|
3211
3578
|
|
|
3212
3579
|
blocks.registerBlockType(blockConfig.name, _objectSpread2(_objectSpread2({}, blockConfig), {}, {
|