@patternfly/elements 2.0.1 → 2.0.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/custom-elements.json +86 -59
- package/package.json +1 -1
- package/pf-accordion/BaseAccordionHeader.d.ts +2 -2
- package/pf-accordion/BaseAccordionHeader.js +29 -23
- package/pf-accordion/BaseAccordionHeader.js.map +1 -1
- package/pf-accordion/BaseAccordionPanel.css +1 -0
- package/pf-accordion/BaseAccordionPanel.js +1 -1
- package/pf-accordion/pf-accordion-header.js.map +1 -1
- package/pf-accordion/pf-accordion-panel.js.map +1 -1
- package/pf-avatar/BaseAvatar.js.map +1 -1
- package/pf-avatar/pf-avatar.js.map +1 -1
- package/pf-badge/pf-badge.js.map +1 -1
- package/pf-button/BaseButton.js.map +1 -1
- package/pf-button/pf-button.js.map +1 -1
- package/pf-icon/BaseIcon.js.map +1 -1
- package/pf-icon/pf-icon.js.map +1 -1
- package/pf-panel/pf-panel.css +12 -4
- package/pf-panel/pf-panel.js +1 -1
- package/pf-panel/pf-panel.js.map +1 -1
- package/pf-progress-stepper/pf-progress-step.js.map +1 -1
- package/pf-spinner/BaseSpinner.js.map +1 -1
- package/pf-switch/pf-switch.d.ts +2 -0
- package/pf-switch/pf-switch.js +2 -0
- package/pf-switch/pf-switch.js.map +1 -1
- package/pf-tabs/BaseTabs.js.map +1 -1
- package/pf-tooltip/BaseTooltip.js.map +1 -1
- package/pfe.min.js +106 -108
- package/pfe.min.js.map +3 -3
package/custom-elements.json
CHANGED
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"kind": "field",
|
|
144
144
|
"name": "bordered",
|
|
145
145
|
"type": {
|
|
146
|
-
"text": "'true'|'false' | undefined"
|
|
146
|
+
"text": "'true' | 'false' | undefined"
|
|
147
147
|
},
|
|
148
148
|
"attribute": "bordered",
|
|
149
149
|
"reflects": true
|
|
@@ -218,9 +218,8 @@
|
|
|
218
218
|
"kind": "field",
|
|
219
219
|
"name": "headingText",
|
|
220
220
|
"type": {
|
|
221
|
-
"text": "string"
|
|
221
|
+
"text": "string | undefined"
|
|
222
222
|
},
|
|
223
|
-
"default": "''",
|
|
224
223
|
"attribute": "heading-text",
|
|
225
224
|
"reflects": true,
|
|
226
225
|
"inheritedFrom": {
|
|
@@ -232,9 +231,8 @@
|
|
|
232
231
|
"kind": "field",
|
|
233
232
|
"name": "headingTag",
|
|
234
233
|
"type": {
|
|
235
|
-
"text": "string"
|
|
234
|
+
"text": "string | undefined"
|
|
236
235
|
},
|
|
237
|
-
"default": "'h3'",
|
|
238
236
|
"attribute": "heading-tag",
|
|
239
237
|
"reflects": true,
|
|
240
238
|
"inheritedFrom": {
|
|
@@ -264,6 +262,18 @@
|
|
|
264
262
|
"module": "pf-accordion/BaseAccordionHeader.js"
|
|
265
263
|
}
|
|
266
264
|
},
|
|
265
|
+
{
|
|
266
|
+
"kind": "field",
|
|
267
|
+
"name": "#header",
|
|
268
|
+
"privacy": "private",
|
|
269
|
+
"type": {
|
|
270
|
+
"text": "HTMLElement | undefined"
|
|
271
|
+
},
|
|
272
|
+
"inheritedFrom": {
|
|
273
|
+
"name": "BaseAccordionHeader",
|
|
274
|
+
"module": "pf-accordion/BaseAccordionHeader.js"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
267
277
|
{
|
|
268
278
|
"kind": "method",
|
|
269
279
|
"name": "#initHeader",
|
|
@@ -273,12 +283,21 @@
|
|
|
273
283
|
"module": "pf-accordion/BaseAccordionHeader.js"
|
|
274
284
|
}
|
|
275
285
|
},
|
|
286
|
+
{
|
|
287
|
+
"kind": "method",
|
|
288
|
+
"name": "#renderHeaderContent",
|
|
289
|
+
"privacy": "private",
|
|
290
|
+
"inheritedFrom": {
|
|
291
|
+
"name": "BaseAccordionHeader",
|
|
292
|
+
"module": "pf-accordion/BaseAccordionHeader.js"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
276
295
|
{
|
|
277
296
|
"kind": "method",
|
|
278
297
|
"name": "#getOrCreateHeader",
|
|
279
298
|
"return": {
|
|
280
299
|
"type": {
|
|
281
|
-
"text": "HTMLElement|undefined"
|
|
300
|
+
"text": "HTMLElement | undefined"
|
|
282
301
|
}
|
|
283
302
|
},
|
|
284
303
|
"privacy": "private",
|
|
@@ -318,7 +337,7 @@
|
|
|
318
337
|
{
|
|
319
338
|
"name": "bordered",
|
|
320
339
|
"type": {
|
|
321
|
-
"text": "'true'|'false' | undefined"
|
|
340
|
+
"text": "'true' | 'false' | undefined"
|
|
322
341
|
},
|
|
323
342
|
"fieldName": "bordered"
|
|
324
343
|
},
|
|
@@ -351,9 +370,8 @@
|
|
|
351
370
|
{
|
|
352
371
|
"name": "heading-text",
|
|
353
372
|
"type": {
|
|
354
|
-
"text": "string"
|
|
373
|
+
"text": "string | undefined"
|
|
355
374
|
},
|
|
356
|
-
"default": "''",
|
|
357
375
|
"fieldName": "headingText",
|
|
358
376
|
"inheritedFrom": {
|
|
359
377
|
"name": "BaseAccordionHeader",
|
|
@@ -363,9 +381,8 @@
|
|
|
363
381
|
{
|
|
364
382
|
"name": "heading-tag",
|
|
365
383
|
"type": {
|
|
366
|
-
"text": "string"
|
|
384
|
+
"text": "string | undefined"
|
|
367
385
|
},
|
|
368
|
-
"default": "'h3'",
|
|
369
386
|
"fieldName": "headingTag",
|
|
370
387
|
"inheritedFrom": {
|
|
371
388
|
"name": "BaseAccordionHeader",
|
|
@@ -486,7 +503,7 @@
|
|
|
486
503
|
"kind": "field",
|
|
487
504
|
"name": "bordered",
|
|
488
505
|
"type": {
|
|
489
|
-
"text": "'true'|'false' | undefined"
|
|
506
|
+
"text": "'true' | 'false' | undefined"
|
|
490
507
|
},
|
|
491
508
|
"attribute": "bordered",
|
|
492
509
|
"reflects": true
|
|
@@ -510,7 +527,7 @@
|
|
|
510
527
|
{
|
|
511
528
|
"name": "bordered",
|
|
512
529
|
"type": {
|
|
513
|
-
"text": "'true'|'false' | undefined"
|
|
530
|
+
"text": "'true' | 'false' | undefined"
|
|
514
531
|
},
|
|
515
532
|
"fieldName": "bordered"
|
|
516
533
|
},
|
|
@@ -1293,7 +1310,7 @@
|
|
|
1293
1310
|
"kind": "field",
|
|
1294
1311
|
"name": "size",
|
|
1295
1312
|
"type": {
|
|
1296
|
-
"text": "'sm'|'md'|'lg'|'xl'"
|
|
1313
|
+
"text": "'sm' | 'md' | 'lg' | 'xl'"
|
|
1297
1314
|
},
|
|
1298
1315
|
"default": "'sm'",
|
|
1299
1316
|
"description": "Size of the Avatar",
|
|
@@ -1308,7 +1325,7 @@
|
|
|
1308
1325
|
"kind": "field",
|
|
1309
1326
|
"name": "border",
|
|
1310
1327
|
"type": {
|
|
1311
|
-
"text": "'light'|'dark' | undefined"
|
|
1328
|
+
"text": "'light' | 'dark' | undefined"
|
|
1312
1329
|
},
|
|
1313
1330
|
"description": "Whether to display a border around the avatar",
|
|
1314
1331
|
"attribute": "border",
|
|
@@ -1362,7 +1379,7 @@
|
|
|
1362
1379
|
{
|
|
1363
1380
|
"name": "size",
|
|
1364
1381
|
"type": {
|
|
1365
|
-
"text": "'sm'|'md'|'lg'|'xl'"
|
|
1382
|
+
"text": "'sm' | 'md' | 'lg' | 'xl'"
|
|
1366
1383
|
},
|
|
1367
1384
|
"default": "'sm'",
|
|
1368
1385
|
"description": "Size of the Avatar",
|
|
@@ -1375,7 +1392,7 @@
|
|
|
1375
1392
|
{
|
|
1376
1393
|
"name": "border",
|
|
1377
1394
|
"type": {
|
|
1378
|
-
"text": "'light'|'dark' | undefined"
|
|
1395
|
+
"text": "'light' | 'dark' | undefined"
|
|
1379
1396
|
},
|
|
1380
1397
|
"description": "Whether to display a border around the avatar",
|
|
1381
1398
|
"fieldName": "border"
|
|
@@ -1591,7 +1608,7 @@
|
|
|
1591
1608
|
{
|
|
1592
1609
|
"name": "state",
|
|
1593
1610
|
"type": {
|
|
1594
|
-
"text": "'unread'|'read' | undefined"
|
|
1611
|
+
"text": "'unread' | 'read' | undefined"
|
|
1595
1612
|
},
|
|
1596
1613
|
"description": "Denotes the state-of-affairs this badge represents\nOptions include read and unread",
|
|
1597
1614
|
"fieldName": "state"
|
|
@@ -2446,7 +2463,7 @@
|
|
|
2446
2463
|
"kind": "field",
|
|
2447
2464
|
"name": "type",
|
|
2448
2465
|
"type": {
|
|
2449
|
-
"text": "'button'|'submit'|'reset' | undefined"
|
|
2466
|
+
"text": "'button' | 'submit' | 'reset' | undefined"
|
|
2450
2467
|
},
|
|
2451
2468
|
"attribute": "type",
|
|
2452
2469
|
"reflects": true,
|
|
@@ -2573,7 +2590,7 @@
|
|
|
2573
2590
|
{
|
|
2574
2591
|
"name": "size",
|
|
2575
2592
|
"type": {
|
|
2576
|
-
"text": "'small'|'large' | undefined"
|
|
2593
|
+
"text": "'small' | 'large' | undefined"
|
|
2577
2594
|
},
|
|
2578
2595
|
"fieldName": "size"
|
|
2579
2596
|
},
|
|
@@ -2618,7 +2635,7 @@
|
|
|
2618
2635
|
{
|
|
2619
2636
|
"name": "type",
|
|
2620
2637
|
"type": {
|
|
2621
|
-
"text": "'button'|'submit'|'reset' | undefined"
|
|
2638
|
+
"text": "'button' | 'submit' | 'reset' | undefined"
|
|
2622
2639
|
},
|
|
2623
2640
|
"fieldName": "type",
|
|
2624
2641
|
"inheritedFrom": {
|
|
@@ -3747,7 +3764,7 @@
|
|
|
3747
3764
|
"kind": "field",
|
|
3748
3765
|
"name": "loading",
|
|
3749
3766
|
"type": {
|
|
3750
|
-
"text": "'idle'|'lazy'|'eager' | undefined"
|
|
3767
|
+
"text": "'idle' | 'lazy' | 'eager' | undefined"
|
|
3751
3768
|
},
|
|
3752
3769
|
"default": "'lazy'",
|
|
3753
3770
|
"description": "Controls how eager the element will be to load the icon data\n- `eager`: eagerly load the icon, blocking the main thread\n- `idle`: wait for the browser to attain an idle state before loading\n- `lazy` (default): wait for the element to enter the viewport before loading",
|
|
@@ -3859,7 +3876,7 @@
|
|
|
3859
3876
|
{
|
|
3860
3877
|
"name": "size",
|
|
3861
3878
|
"type": {
|
|
3862
|
-
"text": "'sm'|'md'|'lg'|'xl'"
|
|
3879
|
+
"text": "'sm' | 'md' | 'lg' | 'xl'"
|
|
3863
3880
|
},
|
|
3864
3881
|
"default": "'sm'",
|
|
3865
3882
|
"description": "Size of the icon",
|
|
@@ -3890,7 +3907,7 @@
|
|
|
3890
3907
|
{
|
|
3891
3908
|
"name": "loading",
|
|
3892
3909
|
"type": {
|
|
3893
|
-
"text": "'idle'|'lazy'|'eager' | undefined"
|
|
3910
|
+
"text": "'idle' | 'lazy' | 'eager' | undefined"
|
|
3894
3911
|
},
|
|
3895
3912
|
"default": "'lazy'",
|
|
3896
3913
|
"description": "Controls how eager the element will be to load the icon data\n- `eager`: eagerly load the icon, blocking the main thread\n- `idle`: wait for the browser to attain an idle state before loading\n- `lazy` (default): wait for the element to enter the viewport before loading",
|
|
@@ -5674,7 +5691,7 @@
|
|
|
5674
5691
|
"kind": "field",
|
|
5675
5692
|
"name": "variant",
|
|
5676
5693
|
"type": {
|
|
5677
|
-
"text": "'raised'|'bordered' | undefined"
|
|
5694
|
+
"text": "'raised' | 'bordered' | undefined"
|
|
5678
5695
|
},
|
|
5679
5696
|
"attribute": "variant",
|
|
5680
5697
|
"reflects": true
|
|
@@ -5698,7 +5715,7 @@
|
|
|
5698
5715
|
{
|
|
5699
5716
|
"name": "variant",
|
|
5700
5717
|
"type": {
|
|
5701
|
-
"text": "'raised'|'bordered' | undefined"
|
|
5718
|
+
"text": "'raised' | 'bordered' | undefined"
|
|
5702
5719
|
},
|
|
5703
5720
|
"fieldName": "variant"
|
|
5704
5721
|
}
|
|
@@ -5802,7 +5819,7 @@
|
|
|
5802
5819
|
"kind": "field",
|
|
5803
5820
|
"name": "variant",
|
|
5804
5821
|
"type": {
|
|
5805
|
-
"text": "'pending'|'info'|'success'|'warning'|'danger' | undefined"
|
|
5822
|
+
"text": "'pending' | 'info' | 'success' | 'warning' | 'danger' | undefined"
|
|
5806
5823
|
},
|
|
5807
5824
|
"description": "Describes the state of the current item",
|
|
5808
5825
|
"attribute": "variant",
|
|
@@ -5860,7 +5877,7 @@
|
|
|
5860
5877
|
{
|
|
5861
5878
|
"name": "variant",
|
|
5862
5879
|
"type": {
|
|
5863
|
-
"text": "'pending'|'info'|'success'|'warning'|'danger' | undefined"
|
|
5880
|
+
"text": "'pending' | 'info' | 'success' | 'warning' | 'danger' | undefined"
|
|
5864
5881
|
},
|
|
5865
5882
|
"description": "Describes the state of the current item",
|
|
5866
5883
|
"fieldName": "variant"
|
|
@@ -6164,7 +6181,7 @@
|
|
|
6164
6181
|
"kind": "field",
|
|
6165
6182
|
"name": "diameter",
|
|
6166
6183
|
"type": {
|
|
6167
|
-
"text": "`${string}${'px'|'%'|'rem'|'em'|'fr'|'pt'}` | undefined"
|
|
6184
|
+
"text": "`${string}${'px' | '%' | 'rem' | 'em' | 'fr' | 'pt'}` | undefined"
|
|
6168
6185
|
},
|
|
6169
6186
|
"description": "Custom diameter of spinner set as CSS variable",
|
|
6170
6187
|
"attribute": "diameter",
|
|
@@ -6198,7 +6215,7 @@
|
|
|
6198
6215
|
{
|
|
6199
6216
|
"name": "diameter",
|
|
6200
6217
|
"type": {
|
|
6201
|
-
"text": "`${string}${'px'|'%'|'rem'|'em'|'fr'|'pt'}` | undefined"
|
|
6218
|
+
"text": "`${string}${'px' | '%' | 'rem' | 'em' | 'fr' | 'pt'}` | undefined"
|
|
6202
6219
|
},
|
|
6203
6220
|
"description": "Custom diameter of spinner set as CSS variable",
|
|
6204
6221
|
"fieldName": "diameter",
|
|
@@ -6611,6 +6628,19 @@
|
|
|
6611
6628
|
}
|
|
6612
6629
|
}
|
|
6613
6630
|
],
|
|
6631
|
+
"events": [
|
|
6632
|
+
{
|
|
6633
|
+
"name": "change",
|
|
6634
|
+
"type": {
|
|
6635
|
+
"text": "Event"
|
|
6636
|
+
},
|
|
6637
|
+
"description": "Fires when the switch selection changes.",
|
|
6638
|
+
"inheritedFrom": {
|
|
6639
|
+
"name": "BaseSwitch",
|
|
6640
|
+
"module": "pf-switch/BaseSwitch.ts"
|
|
6641
|
+
}
|
|
6642
|
+
}
|
|
6643
|
+
],
|
|
6614
6644
|
"superclass": {
|
|
6615
6645
|
"name": "BaseSwitch",
|
|
6616
6646
|
"module": "/pf-switch/BaseSwitch.js"
|
|
@@ -6654,18 +6684,6 @@
|
|
|
6654
6684
|
}
|
|
6655
6685
|
}
|
|
6656
6686
|
],
|
|
6657
|
-
"events": [
|
|
6658
|
-
{
|
|
6659
|
-
"name": "change",
|
|
6660
|
-
"type": {
|
|
6661
|
-
"text": "Event"
|
|
6662
|
-
},
|
|
6663
|
-
"inheritedFrom": {
|
|
6664
|
-
"name": "BaseSwitch",
|
|
6665
|
-
"module": "pf-switch/BaseSwitch.ts"
|
|
6666
|
-
}
|
|
6667
|
-
}
|
|
6668
|
-
],
|
|
6669
6687
|
"demos": [
|
|
6670
6688
|
{
|
|
6671
6689
|
"url": "https://patternflyelements.org/components/switch/demo/",
|
|
@@ -8922,9 +8940,8 @@
|
|
|
8922
8940
|
"kind": "field",
|
|
8923
8941
|
"name": "headingText",
|
|
8924
8942
|
"type": {
|
|
8925
|
-
"text": "string"
|
|
8943
|
+
"text": "string | undefined"
|
|
8926
8944
|
},
|
|
8927
|
-
"default": "''",
|
|
8928
8945
|
"attribute": "heading-text",
|
|
8929
8946
|
"reflects": true
|
|
8930
8947
|
},
|
|
@@ -8932,9 +8949,8 @@
|
|
|
8932
8949
|
"kind": "field",
|
|
8933
8950
|
"name": "headingTag",
|
|
8934
8951
|
"type": {
|
|
8935
|
-
"text": "string"
|
|
8952
|
+
"text": "string | undefined"
|
|
8936
8953
|
},
|
|
8937
|
-
"default": "'h3'",
|
|
8938
8954
|
"attribute": "heading-tag",
|
|
8939
8955
|
"reflects": true
|
|
8940
8956
|
},
|
|
@@ -8952,6 +8968,14 @@
|
|
|
8952
8968
|
"privacy": "private",
|
|
8953
8969
|
"default": "new Logger(this)"
|
|
8954
8970
|
},
|
|
8971
|
+
{
|
|
8972
|
+
"kind": "field",
|
|
8973
|
+
"name": "#header",
|
|
8974
|
+
"privacy": "private",
|
|
8975
|
+
"type": {
|
|
8976
|
+
"text": "HTMLElement | undefined"
|
|
8977
|
+
}
|
|
8978
|
+
},
|
|
8955
8979
|
{
|
|
8956
8980
|
"kind": "method",
|
|
8957
8981
|
"name": "#initHeader",
|
|
@@ -8967,12 +8991,17 @@
|
|
|
8967
8991
|
},
|
|
8968
8992
|
"description": "Template hook: before </button>"
|
|
8969
8993
|
},
|
|
8994
|
+
{
|
|
8995
|
+
"kind": "method",
|
|
8996
|
+
"name": "#renderHeaderContent",
|
|
8997
|
+
"privacy": "private"
|
|
8998
|
+
},
|
|
8970
8999
|
{
|
|
8971
9000
|
"kind": "method",
|
|
8972
9001
|
"name": "#getOrCreateHeader",
|
|
8973
9002
|
"return": {
|
|
8974
9003
|
"type": {
|
|
8975
|
-
"text": "HTMLElement|undefined"
|
|
9004
|
+
"text": "HTMLElement | undefined"
|
|
8976
9005
|
}
|
|
8977
9006
|
},
|
|
8978
9007
|
"privacy": "private"
|
|
@@ -9003,17 +9032,15 @@
|
|
|
9003
9032
|
{
|
|
9004
9033
|
"name": "heading-text",
|
|
9005
9034
|
"type": {
|
|
9006
|
-
"text": "string"
|
|
9035
|
+
"text": "string | undefined"
|
|
9007
9036
|
},
|
|
9008
|
-
"default": "''",
|
|
9009
9037
|
"fieldName": "headingText"
|
|
9010
9038
|
},
|
|
9011
9039
|
{
|
|
9012
9040
|
"name": "heading-tag",
|
|
9013
9041
|
"type": {
|
|
9014
|
-
"text": "string"
|
|
9042
|
+
"text": "string | undefined"
|
|
9015
9043
|
},
|
|
9016
|
-
"default": "'h3'",
|
|
9017
9044
|
"fieldName": "headingTag"
|
|
9018
9045
|
}
|
|
9019
9046
|
],
|
|
@@ -9144,7 +9171,7 @@
|
|
|
9144
9171
|
"kind": "field",
|
|
9145
9172
|
"name": "size",
|
|
9146
9173
|
"type": {
|
|
9147
|
-
"text": "'sm'|'md'|'lg'|'xl'"
|
|
9174
|
+
"text": "'sm' | 'md' | 'lg' | 'xl'"
|
|
9148
9175
|
},
|
|
9149
9176
|
"default": "'sm'",
|
|
9150
9177
|
"description": "Size of the Avatar",
|
|
@@ -9184,7 +9211,7 @@
|
|
|
9184
9211
|
{
|
|
9185
9212
|
"name": "size",
|
|
9186
9213
|
"type": {
|
|
9187
|
-
"text": "'sm'|'md'|'lg'|'xl'"
|
|
9214
|
+
"text": "'sm' | 'md' | 'lg' | 'xl'"
|
|
9188
9215
|
},
|
|
9189
9216
|
"default": "'sm'",
|
|
9190
9217
|
"description": "Size of the Avatar",
|
|
@@ -9337,7 +9364,7 @@
|
|
|
9337
9364
|
"kind": "field",
|
|
9338
9365
|
"name": "type",
|
|
9339
9366
|
"type": {
|
|
9340
|
-
"text": "'button'|'submit'|'reset' | undefined"
|
|
9367
|
+
"text": "'button' | 'submit' | 'reset' | undefined"
|
|
9341
9368
|
},
|
|
9342
9369
|
"attribute": "type",
|
|
9343
9370
|
"reflects": true
|
|
@@ -9439,7 +9466,7 @@
|
|
|
9439
9466
|
{
|
|
9440
9467
|
"name": "type",
|
|
9441
9468
|
"type": {
|
|
9442
|
-
"text": "'button'|'submit'|'reset' | undefined"
|
|
9469
|
+
"text": "'button' | 'submit' | 'reset' | undefined"
|
|
9443
9470
|
},
|
|
9444
9471
|
"fieldName": "type"
|
|
9445
9472
|
},
|
|
@@ -9799,7 +9826,7 @@
|
|
|
9799
9826
|
"kind": "field",
|
|
9800
9827
|
"name": "loading",
|
|
9801
9828
|
"type": {
|
|
9802
|
-
"text": "'idle'|'lazy'|'eager' | undefined"
|
|
9829
|
+
"text": "'idle' | 'lazy' | 'eager' | undefined"
|
|
9803
9830
|
},
|
|
9804
9831
|
"default": "'lazy'",
|
|
9805
9832
|
"description": "Controls how eager the element will be to load the icon data\n- `eager`: eagerly load the icon, blocking the main thread\n- `idle`: wait for the browser to attain an idle state before loading\n- `lazy` (default): wait for the element to enter the viewport before loading",
|
|
@@ -9885,7 +9912,7 @@
|
|
|
9885
9912
|
{
|
|
9886
9913
|
"name": "loading",
|
|
9887
9914
|
"type": {
|
|
9888
|
-
"text": "'idle'|'lazy'|'eager' | undefined"
|
|
9915
|
+
"text": "'idle' | 'lazy' | 'eager' | undefined"
|
|
9889
9916
|
},
|
|
9890
9917
|
"default": "'lazy'",
|
|
9891
9918
|
"description": "Controls how eager the element will be to load the icon data\n- `eager`: eagerly load the icon, blocking the main thread\n- `idle`: wait for the browser to attain an idle state before loading\n- `lazy` (default): wait for the element to enter the viewport before loading",
|
|
@@ -10098,7 +10125,7 @@
|
|
|
10098
10125
|
"kind": "field",
|
|
10099
10126
|
"name": "diameter",
|
|
10100
10127
|
"type": {
|
|
10101
|
-
"text": "`${string}${'px'|'%'|'rem'|'em'|'fr'|'pt'}` | undefined"
|
|
10128
|
+
"text": "`${string}${'px' | '%' | 'rem' | 'em' | 'fr' | 'pt'}` | undefined"
|
|
10102
10129
|
},
|
|
10103
10130
|
"description": "Custom diameter of spinner set as CSS variable",
|
|
10104
10131
|
"attribute": "diameter",
|
|
@@ -10118,7 +10145,7 @@
|
|
|
10118
10145
|
{
|
|
10119
10146
|
"name": "diameter",
|
|
10120
10147
|
"type": {
|
|
10121
|
-
"text": "`${string}${'px'|'%'|'rem'|'em'|'fr'|'pt'}` | undefined"
|
|
10148
|
+
"text": "`${string}${'px' | '%' | 'rem' | 'em' | 'fr' | 'pt'}` | undefined"
|
|
10122
10149
|
},
|
|
10123
10150
|
"description": "Custom diameter of spinner set as CSS variable",
|
|
10124
10151
|
"fieldName": "diameter"
|
package/package.json
CHANGED
|
@@ -18,8 +18,8 @@ export declare abstract class BaseAccordionHeader extends LitElement {
|
|
|
18
18
|
customElements?: CustomElementRegistry | undefined;
|
|
19
19
|
};
|
|
20
20
|
expanded: boolean;
|
|
21
|
-
headingText
|
|
22
|
-
headingTag
|
|
21
|
+
headingText?: string;
|
|
22
|
+
headingTag?: string;
|
|
23
23
|
connectedCallback(): void;
|
|
24
24
|
/** Template hook: before </button> */
|
|
25
25
|
renderAfterButton?(): TemplateResult;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
var _BaseAccordionHeader_instances, _BaseAccordionHeader_generatedHtag, _BaseAccordionHeader_logger, _BaseAccordionHeader_initHeader, _BaseAccordionHeader_getOrCreateHeader, _BaseAccordionHeader_onClick;
|
|
1
|
+
var _BaseAccordionHeader_instances, _BaseAccordionHeader_generatedHtag, _BaseAccordionHeader_logger, _BaseAccordionHeader_header, _BaseAccordionHeader_initHeader, _BaseAccordionHeader_renderHeaderContent, _BaseAccordionHeader_getOrCreateHeader, _BaseAccordionHeader_onClick;
|
|
2
2
|
import { __classPrivateFieldGet, __classPrivateFieldSet, __decorate } from "tslib";
|
|
3
3
|
import { LitElement, html } from 'lit';
|
|
4
4
|
import { property } from 'lit/decorators/property.js';
|
|
5
|
-
import { unsafeStatic, html as staticH } from 'lit/static-html.js';
|
|
6
5
|
import { BaseAccordion } from './BaseAccordion.js';
|
|
7
6
|
import { ComposedEvent } from '@patternfly/pfe-core';
|
|
8
7
|
import { getRandomId } from '@patternfly/pfe-core/functions/random.js';
|
|
@@ -23,10 +22,9 @@ export class BaseAccordionHeader extends LitElement {
|
|
|
23
22
|
super(...arguments);
|
|
24
23
|
_BaseAccordionHeader_instances.add(this);
|
|
25
24
|
this.expanded = false;
|
|
26
|
-
this.headingText = '';
|
|
27
|
-
this.headingTag = 'h3';
|
|
28
25
|
_BaseAccordionHeader_generatedHtag.set(this, void 0);
|
|
29
26
|
_BaseAccordionHeader_logger.set(this, new Logger(this));
|
|
27
|
+
_BaseAccordionHeader_header.set(this, void 0);
|
|
30
28
|
}
|
|
31
29
|
connectedCallback() {
|
|
32
30
|
super.connectedCallback();
|
|
@@ -36,35 +34,43 @@ export class BaseAccordionHeader extends LitElement {
|
|
|
36
34
|
__classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_initHeader).call(this);
|
|
37
35
|
}
|
|
38
36
|
render() {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</span>
|
|
49
|
-
${this.renderAfterButton?.()}
|
|
50
|
-
</button>
|
|
51
|
-
</${tag}>
|
|
52
|
-
`;
|
|
37
|
+
switch (this.headingTag) {
|
|
38
|
+
case 'h1': return html `<h1 id="heading">${__classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_renderHeaderContent).call(this)}</h1>`;
|
|
39
|
+
case 'h2': return html `<h2 id="heading">${__classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_renderHeaderContent).call(this)}</h2>`;
|
|
40
|
+
case 'h3': return html `<h3 id="heading">${__classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_renderHeaderContent).call(this)}</h3>`;
|
|
41
|
+
case 'h4': return html `<h4 id="heading">${__classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_renderHeaderContent).call(this)}</h4>`;
|
|
42
|
+
case 'h5': return html `<h5 id="heading">${__classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_renderHeaderContent).call(this)}</h5>`;
|
|
43
|
+
case 'h6': return html `<h6 id="heading">${__classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_renderHeaderContent).call(this)}</h6>`;
|
|
44
|
+
default: return __classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_renderHeaderContent).call(this);
|
|
45
|
+
}
|
|
53
46
|
}
|
|
54
47
|
}
|
|
55
|
-
_BaseAccordionHeader_generatedHtag = new WeakMap(), _BaseAccordionHeader_logger = new WeakMap(), _BaseAccordionHeader_instances = new WeakSet(), _BaseAccordionHeader_initHeader = async function _BaseAccordionHeader_initHeader() {
|
|
56
|
-
|
|
48
|
+
_BaseAccordionHeader_generatedHtag = new WeakMap(), _BaseAccordionHeader_logger = new WeakMap(), _BaseAccordionHeader_header = new WeakMap(), _BaseAccordionHeader_instances = new WeakSet(), _BaseAccordionHeader_initHeader = async function _BaseAccordionHeader_initHeader() {
|
|
49
|
+
if (this.headingText && !this.headingTag) {
|
|
50
|
+
this.headingTag = 'h3';
|
|
51
|
+
}
|
|
52
|
+
__classPrivateFieldSet(this, _BaseAccordionHeader_header, __classPrivateFieldGet(this, _BaseAccordionHeader_instances, "m", _BaseAccordionHeader_getOrCreateHeader).call(this), "f");
|
|
57
53
|
// prevent double-logging
|
|
58
|
-
if (
|
|
54
|
+
if (__classPrivateFieldGet(this, _BaseAccordionHeader_header, "f") !== __classPrivateFieldGet(this, _BaseAccordionHeader_generatedHtag, "f")) {
|
|
59
55
|
__classPrivateFieldSet(this, _BaseAccordionHeader_generatedHtag, undefined, "f");
|
|
60
56
|
}
|
|
61
|
-
this.headingTag = header?.tagName.toLowerCase() ?? 'h3';
|
|
62
|
-
this.headingText = header?.textContent?.trim() ?? '';
|
|
63
57
|
do {
|
|
64
58
|
await this.updateComplete;
|
|
65
59
|
} while (!await this.updateComplete);
|
|
66
60
|
// Remove the hidden attribute after upgrade
|
|
67
61
|
this.hidden = false;
|
|
62
|
+
}, _BaseAccordionHeader_renderHeaderContent = function _BaseAccordionHeader_renderHeaderContent() {
|
|
63
|
+
const headingText = this.headingText?.trim() ?? __classPrivateFieldGet(this, _BaseAccordionHeader_header, "f")?.textContent?.trim();
|
|
64
|
+
return html `
|
|
65
|
+
<button id="button"
|
|
66
|
+
class="toggle"
|
|
67
|
+
aria-expanded="${String(!!this.expanded)}">
|
|
68
|
+
<span part="text">${headingText ?? html `
|
|
69
|
+
<slot></slot>`}
|
|
70
|
+
</span>
|
|
71
|
+
${this.renderAfterButton?.()}
|
|
72
|
+
</button>
|
|
73
|
+
`;
|
|
68
74
|
}, _BaseAccordionHeader_getOrCreateHeader = function _BaseAccordionHeader_getOrCreateHeader() {
|
|
69
75
|
// Check if there is no nested element or nested textNodes
|
|
70
76
|
if (!this.firstElementChild && !this.firstChild) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseAccordionHeader.js","sourceRoot":"","sources":["BaseAccordionHeader.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseAccordionHeader.js","sourceRoot":"","sources":["BaseAccordionHeader.ts"],"names":[],"mappings":";;AAEA,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,4CAA4C,CAAC;;;AAIpE,MAAM,WAAW,GACf,CAAC,EAAQ,EAAqB,EAAE,CAC9B,EAAE,YAAY,WAAW,IAAI,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AAEjE,MAAM,OAAO,0BAA2B,SAAQ,aAAa;IAC3D,YACS,QAAiB,EACjB,MAA2B,EAC3B,SAAwB;QAE/B,KAAK,CAAC,QAAQ,CAAC,CAAC;QAJT,aAAQ,GAAR,QAAQ,CAAS;QACjB,WAAM,GAAN,MAAM,CAAqB;QAC3B,cAAS,GAAT,SAAS,CAAe;IAGjC,CAAC;CACF;AAED,MAAM,OAAgB,mBAAoB,SAAQ,UAAU;IAA5D;;;QAK8C,aAAQ,GAAG,KAAK,CAAC;QAM7D,qDAAoC;QAEpC,sCAAU,IAAI,MAAM,CAAC,IAAI,CAAC,EAAC;QAE3B,8CAAsB;IAm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;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qDAAkB;AAEL;IAAvD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC;wDAAsB;AAEtB;IAAtD,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;uDAAqB","sourcesContent":["import type { TemplateResult } from 'lit';\n\nimport { LitElement, html } from 'lit';\nimport { property } from 'lit/decorators/property.js';\n\nimport { BaseAccordion } from './BaseAccordion.js';\nimport { ComposedEvent } from '@patternfly/pfe-core';\nimport { getRandomId } from '@patternfly/pfe-core/functions/random.js';\nimport { Logger } from '@patternfly/pfe-core/controllers/logger.js';\n\nimport style from './BaseAccordionHeader.css';\n\nconst isPorHeader =\n (el: Node): el is HTMLElement =>\n el instanceof HTMLElement && !!el.tagName.match(/P|^H[1-6]/);\n\nexport class AccordionHeaderChangeEvent extends ComposedEvent {\n constructor(\n public expanded: boolean,\n public toggle: BaseAccordionHeader,\n public accordion: BaseAccordion\n ) {\n super('change');\n }\n}\n\nexport abstract class BaseAccordionHeader extends LitElement {\n static readonly styles = [style];\n\n static override readonly shadowRootOptions = { ...LitElement.shadowRootOptions, delegatesFocus: true };\n\n @property({ type: Boolean, reflect: true }) expanded = false;\n\n @property({ reflect: true, attribute: 'heading-text' }) headingText?: string;\n\n @property({ reflect: true, attribute: 'heading-tag' }) headingTag?: string;\n\n #generatedHtag?: HTMLHeadingElement;\n\n #logger = new Logger(this);\n\n #header?: HTMLElement;\n\n override connectedCallback() {\n super.connectedCallback();\n this.addEventListener('click', this.#onClick);\n this.hidden = true;\n this.id ||= getRandomId(this.localName);\n this.#initHeader();\n }\n\n async #initHeader() {\n if (this.headingText && !this.headingTag) {\n this.headingTag = 'h3';\n }\n this.#header = this.#getOrCreateHeader();\n\n // prevent double-logging\n if (this.#header !== this.#generatedHtag) {\n this.#generatedHtag = undefined;\n }\n\n do {\n await this.updateComplete;\n } while (!await this.updateComplete);\n\n // Remove the hidden attribute after upgrade\n this.hidden = false;\n }\n\n /** Template hook: before </button> */\n renderAfterButton?(): TemplateResult;\n\n override render(): TemplateResult {\n switch (this.headingTag) {\n case 'h1': return html`<h1 id=\"heading\">${this.#renderHeaderContent()}</h1>`;\n case 'h2': return html`<h2 id=\"heading\">${this.#renderHeaderContent()}</h2>`;\n case 'h3': return html`<h3 id=\"heading\">${this.#renderHeaderContent()}</h3>`;\n case 'h4': return html`<h4 id=\"heading\">${this.#renderHeaderContent()}</h4>`;\n case 'h5': return html`<h5 id=\"heading\">${this.#renderHeaderContent()}</h5>`;\n case 'h6': return html`<h6 id=\"heading\">${this.#renderHeaderContent()}</h6>`;\n default: return this.#renderHeaderContent();\n }\n }\n\n #renderHeaderContent() {\n const headingText = this.headingText?.trim() ?? this.#header?.textContent?.trim();\n return html`\n <button id=\"button\"\n class=\"toggle\"\n aria-expanded=\"${String(!!this.expanded) as 'true' | 'false'}\">\n <span part=\"text\">${headingText ?? html`\n <slot></slot>`}\n </span>\n ${this.renderAfterButton?.()}\n </button>\n `;\n }\n\n #getOrCreateHeader(): HTMLElement | undefined {\n // Check if there is no nested element or nested textNodes\n if (!this.firstElementChild && !this.firstChild) {\n return void this.#logger.warn('No header content provided');\n } else if (this.firstElementChild) {\n const [heading, ...otherContent] = Array.from(this.children)\n .filter((x): x is HTMLElement => !x.hasAttribute('slot') && isPorHeader(x));\n\n // If there is no content inside the slot, return empty with a warning\n // else, if there is more than 1 element in the slot, capture the first h-tag\n if (!heading) {\n return void this.#logger.warn('No heading information was provided.');\n } else if (otherContent.length) {\n this.#logger.warn('Heading currently only supports 1 tag; extra tags will be ignored.');\n }\n return heading;\n } else {\n if (!this.#generatedHtag) {\n this.#logger.warn('Header should contain at least 1 heading tag for correct semantics.');\n }\n this.#generatedHtag = document.createElement('h3');\n\n // If a text node was provided but no semantics, default to an h3\n // otherwise, incorrect semantics were used, create an H3 and try to capture the content\n if (this.firstChild?.nodeType === Node.TEXT_NODE) {\n this.#generatedHtag.textContent = this.firstChild.textContent;\n } else {\n this.#generatedHtag.textContent = this.textContent;\n }\n\n return this.#generatedHtag;\n }\n }\n\n #onClick(event: MouseEvent) {\n const expanded = !this.expanded;\n const acc = event.composedPath().find(BaseAccordion.isAccordion);\n if (acc) {\n this.dispatchEvent(new AccordionHeaderChangeEvent(expanded, this, acc));\n }\n }\n}\n"]}
|
|
@@ -3,7 +3,7 @@ import { LitElement, html } from 'lit';
|
|
|
3
3
|
import { property } from 'lit/decorators/property.js';
|
|
4
4
|
import { getRandomId } from '@patternfly/pfe-core/functions/random.js';
|
|
5
5
|
import { css } from "lit";
|
|
6
|
-
const style = css `:host{display:none;overflow:hidden;will-change:height}:host([expanded]){display:block;position:relative}:host(.animating){display:block;transition:height .3s ease-in-out}:host([fixed]){overflow-y:auto}.body{position:relative}.body:after{content:"";position:absolute;top:0;bottom:0;left:0}`;
|
|
6
|
+
const style = css `:host{display:none;overflow:hidden;will-change:height}:host([expanded]){display:block;position:relative}:host(.animating){display:block;transition:height .3s ease-in-out}:host([fixed]){overflow-y:auto}.body{position:relative;overflow:hidden}.body:after{content:"";position:absolute;top:0;bottom:0;left:0}`;
|
|
7
7
|
export class BaseAccordionPanel extends LitElement {
|
|
8
8
|
constructor() {
|
|
9
9
|
super(...arguments);
|