q2-tecton-elements 1.27.1 → 1.28.1
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/cjs/click-elsewhere_2.cjs.entry.js +258 -0
- package/dist/cjs/{index-ffd19146.js → index-7a73e106.js} +12 -52
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/q2-action-sheet.cjs.entry.js +1 -1
- package/dist/cjs/q2-avatar.cjs.entry.js +1 -1
- package/dist/cjs/q2-badge_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-btn_2.cjs.entry.js +1 -1
- package/dist/cjs/q2-calendar.cjs.entry.js +128 -83
- package/dist/cjs/q2-card.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-carousel.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-area.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-bar.cjs.entry.js +1 -1
- package/dist/cjs/q2-chart-donut.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown-item.cjs.entry.js +1 -1
- package/dist/cjs/q2-dropdown.cjs.entry.js +44 -45
- package/dist/cjs/q2-editable-field.cjs.entry.js +1 -1
- package/dist/cjs/q2-icon.cjs.entry.js +1 -1
- package/dist/cjs/q2-loc.cjs.entry.js +1 -1
- package/dist/cjs/q2-message.cjs.entry.js +1 -1
- package/dist/cjs/q2-month-picker.cjs.entry.js +1 -1
- package/dist/cjs/q2-optgroup_2.cjs.entry.js +1 -1
- package/dist/cjs/{q2-option-list_2.cjs.entry.js → q2-option-list.cjs.entry.js} +3 -167
- package/dist/cjs/q2-pagination.cjs.entry.js +1 -1
- package/dist/cjs/q2-pill.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio-group.cjs.entry.js +1 -1
- package/dist/cjs/q2-radio.cjs.entry.js +1 -1
- package/dist/cjs/q2-section.cjs.entry.js +1 -1
- package/dist/cjs/q2-select.cjs.entry.js +11 -6
- package/dist/cjs/q2-stepper-pane.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper-vertical.cjs.entry.js +1 -1
- package/dist/cjs/q2-stepper.cjs.entry.js +1 -1
- package/dist/cjs/q2-tab-container.cjs.entry.js +1 -1
- package/dist/cjs/q2-tag.cjs.entry.js +1 -1
- package/dist/cjs/q2-tecton-elements.cjs.js +1 -1
- package/dist/cjs/q2-textarea.cjs.entry.js +1 -1
- package/dist/cjs/q2-tooltip.cjs.entry.js +1 -1
- package/dist/collection/components/q2-avatar/styles.css +3 -7
- package/dist/collection/components/q2-calendar/helpers.js +37 -11
- package/dist/collection/components/q2-calendar/index.js +174 -91
- package/dist/collection/components/q2-calendar/styles.css +5 -68
- package/dist/collection/components/q2-dropdown/index.js +123 -66
- package/dist/collection/components/q2-dropdown/styles.css +3 -89
- package/dist/collection/components/q2-select/index.js +10 -5
- package/dist/collection/utils/index.js +11 -51
- package/dist/components/index11.js +1 -1
- package/dist/components/index15.js +12 -52
- package/dist/components/index3.js +1 -1
- package/dist/components/index7.js +1 -1
- package/dist/components/index8.js +1 -1
- package/dist/components/q2-calendar.js +154 -101
- package/dist/components/q2-card.js +1 -1
- package/dist/components/q2-carousel.js +1 -1
- package/dist/components/q2-checkbox-group.js +1 -1
- package/dist/components/q2-checkbox.js +1 -1
- package/dist/components/q2-dropdown.js +66 -59
- package/dist/components/q2-radio-group.js +1 -1
- package/dist/components/q2-radio.js +1 -1
- package/dist/components/q2-select.js +11 -6
- package/dist/components/q2-stepper-pane.js +1 -1
- package/dist/components/q2-stepper-vertical.js +1 -1
- package/dist/components/q2-stepper.js +1 -1
- package/dist/components/q2-tab-container.js +1 -1
- package/dist/components/q2-textarea.js +1 -1
- package/dist/docs.json +144 -4
- package/dist/esm/click-elsewhere_2.entry.js +253 -0
- package/dist/esm/{index-a0cc60e3.js → index-576f618c.js} +12 -52
- package/dist/esm/loader.js +1 -1
- package/dist/esm/q2-action-sheet.entry.js +1 -1
- package/dist/esm/q2-avatar.entry.js +1 -1
- package/dist/esm/q2-badge_2.entry.js +1 -1
- package/dist/esm/q2-btn_2.entry.js +1 -1
- package/dist/esm/q2-calendar.entry.js +128 -83
- package/dist/esm/q2-card.entry.js +1 -1
- package/dist/esm/q2-carousel-pane.entry.js +1 -1
- package/dist/esm/q2-carousel.entry.js +1 -1
- package/dist/esm/q2-chart-area.entry.js +1 -1
- package/dist/esm/q2-chart-bar.entry.js +1 -1
- package/dist/esm/q2-chart-donut.entry.js +1 -1
- package/dist/esm/q2-checkbox-group.entry.js +1 -1
- package/dist/esm/q2-checkbox.entry.js +1 -1
- package/dist/esm/q2-dropdown-item.entry.js +1 -1
- package/dist/esm/q2-dropdown.entry.js +44 -45
- package/dist/esm/q2-editable-field.entry.js +1 -1
- package/dist/esm/q2-icon.entry.js +1 -1
- package/dist/esm/q2-loc.entry.js +1 -1
- package/dist/esm/q2-message.entry.js +1 -1
- package/dist/esm/q2-month-picker.entry.js +1 -1
- package/dist/esm/q2-optgroup_2.entry.js +1 -1
- package/dist/esm/{q2-option-list_2.entry.js → q2-option-list.entry.js} +4 -167
- package/dist/esm/q2-pagination.entry.js +1 -1
- package/dist/esm/q2-pill.entry.js +1 -1
- package/dist/esm/q2-radio-group.entry.js +1 -1
- package/dist/esm/q2-radio.entry.js +1 -1
- package/dist/esm/q2-section.entry.js +1 -1
- package/dist/esm/q2-select.entry.js +11 -6
- package/dist/esm/q2-stepper-pane.entry.js +1 -1
- package/dist/esm/q2-stepper-vertical.entry.js +1 -1
- package/dist/esm/q2-stepper.entry.js +1 -1
- package/dist/esm/q2-tab-container.entry.js +1 -1
- package/dist/esm/q2-tag.entry.js +1 -1
- package/dist/esm/q2-tecton-elements.js +1 -1
- package/dist/esm/q2-textarea.entry.js +1 -1
- package/dist/esm/q2-tooltip.entry.js +1 -1
- package/dist/q2-tecton-elements/p-0b7003c4.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-0b8943da.entry.js → p-0d92ab4a.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-138db98d.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-a298cbfb.entry.js → p-1b9e07b4.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-bafb5e70.entry.js → p-1e57a843.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-ac6dd5b1.entry.js → p-2423b9a9.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-396fd275.entry.js → p-2bb447c3.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-85e780b2.entry.js → p-3422207a.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-edcf49fd.entry.js → p-39989362.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-3dca7465.entry.js → p-3aad6a45.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-ef657f8f.entry.js → p-4d2b7f2e.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-869e899c.entry.js → p-4ffde81a.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-d06d752f.entry.js → p-55bdd480.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-590adc15.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-949fa312.entry.js → p-5cd51157.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-5e14a790.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-12e65423.entry.js → p-6524d5f3.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-521c9085.entry.js → p-68908be9.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9367dc29.entry.js → p-6975e5e4.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-6bb3789b.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-5a670d93.entry.js → p-6db208c7.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-78b7ea4e.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-2b8a8981.entry.js → p-7a702d92.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-fb768d19.entry.js → p-7e1a14ea.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-921ea070.js +1 -0
- package/dist/q2-tecton-elements/{p-04b9a7ee.entry.js → p-a63e64f0.entry.js} +1 -1
- package/dist/q2-tecton-elements/p-b9bbfaf7.entry.js +1 -0
- package/dist/q2-tecton-elements/{p-d69cb7d1.entry.js → p-bbd2c530.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-05bdc0aa.entry.js → p-c19e143e.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-256e5161.entry.js → p-c8525f80.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-fcad1609.entry.js → p-c93341d5.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-8545c3cb.entry.js → p-d6824ce5.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-f3e4bb52.entry.js → p-ddfb393a.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-9292bd80.entry.js → p-df3fb1e7.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-fe3625ad.entry.js → p-ed77f0c2.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-25ea01d3.entry.js → p-ed91f837.entry.js} +1 -1
- package/dist/q2-tecton-elements/{p-1d28c600.entry.js → p-fa0e471c.entry.js} +1 -1
- package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
- package/dist/test/helpers.js +1 -1
- package/dist/types/components/q2-calendar/helpers.d.ts +1 -0
- package/dist/types/components/q2-calendar/index.d.ts +22 -12
- package/dist/types/components/q2-dropdown/index.d.ts +12 -8
- package/dist/types/components.d.ts +24 -0
- package/dist/types/utils/index.d.ts +4 -9
- package/dist/types/workspace/workspace/{tecton-production_release_1.27.x → tecton-production_release_1.28.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cjs/click-elsewhere.cjs.entry.js +0 -93
- package/dist/esm/click-elsewhere.entry.js +0 -89
- package/dist/q2-tecton-elements/p-2453cd92.js +0 -1
- package/dist/q2-tecton-elements/p-31b655b6.entry.js +0 -1
- package/dist/q2-tecton-elements/p-72374b8e.entry.js +0 -1
- package/dist/q2-tecton-elements/p-8e652d59.entry.js +0 -1
- package/dist/q2-tecton-elements/p-aae8b9fc.entry.js +0 -1
- package/dist/q2-tecton-elements/p-be0d3bfe.entry.js +0 -1
- package/dist/q2-tecton-elements/p-c1d33fd2.entry.js +0 -1
- package/dist/q2-tecton-elements/p-ee1f3114.entry.js +0 -1
package/dist/docs.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2023-
|
|
2
|
+
"timestamp": "2023-07-13T16:58:53",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "2.19.2",
|
|
@@ -855,7 +855,7 @@
|
|
|
855
855
|
{
|
|
856
856
|
"name": "ariaLabel",
|
|
857
857
|
"type": "string",
|
|
858
|
-
"mutable":
|
|
858
|
+
"mutable": true,
|
|
859
859
|
"attr": "aria-label",
|
|
860
860
|
"reflectToAttr": true,
|
|
861
861
|
"docs": "",
|
|
@@ -1162,6 +1162,22 @@
|
|
|
1162
1162
|
"optional": false,
|
|
1163
1163
|
"required": false
|
|
1164
1164
|
},
|
|
1165
|
+
{
|
|
1166
|
+
"name": "open",
|
|
1167
|
+
"type": "boolean",
|
|
1168
|
+
"mutable": true,
|
|
1169
|
+
"attr": "open",
|
|
1170
|
+
"reflectToAttr": true,
|
|
1171
|
+
"docs": "",
|
|
1172
|
+
"docsTags": [],
|
|
1173
|
+
"values": [
|
|
1174
|
+
{
|
|
1175
|
+
"type": "boolean"
|
|
1176
|
+
}
|
|
1177
|
+
],
|
|
1178
|
+
"optional": false,
|
|
1179
|
+
"required": false
|
|
1180
|
+
},
|
|
1165
1181
|
{
|
|
1166
1182
|
"name": "optional",
|
|
1167
1183
|
"type": "boolean",
|
|
@@ -1201,6 +1217,32 @@
|
|
|
1201
1217
|
"attr": "pop-direction",
|
|
1202
1218
|
"reflectToAttr": true,
|
|
1203
1219
|
"docs": "",
|
|
1220
|
+
"docsTags": [
|
|
1221
|
+
{
|
|
1222
|
+
"name": "deprecated"
|
|
1223
|
+
}
|
|
1224
|
+
],
|
|
1225
|
+
"deprecation": "",
|
|
1226
|
+
"values": [
|
|
1227
|
+
{
|
|
1228
|
+
"value": "down",
|
|
1229
|
+
"type": "string"
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
"value": "up",
|
|
1233
|
+
"type": "string"
|
|
1234
|
+
}
|
|
1235
|
+
],
|
|
1236
|
+
"optional": false,
|
|
1237
|
+
"required": false
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"name": "popoverDirection",
|
|
1241
|
+
"type": "\"down\" | \"up\"",
|
|
1242
|
+
"mutable": true,
|
|
1243
|
+
"attr": "popover-direction",
|
|
1244
|
+
"reflectToAttr": false,
|
|
1245
|
+
"docs": "",
|
|
1204
1246
|
"docsTags": [],
|
|
1205
1247
|
"values": [
|
|
1206
1248
|
{
|
|
@@ -1215,6 +1257,23 @@
|
|
|
1215
1257
|
"optional": false,
|
|
1216
1258
|
"required": false
|
|
1217
1259
|
},
|
|
1260
|
+
{
|
|
1261
|
+
"name": "popoverMinHeight",
|
|
1262
|
+
"type": "number",
|
|
1263
|
+
"mutable": false,
|
|
1264
|
+
"attr": "popover-min-height",
|
|
1265
|
+
"reflectToAttr": false,
|
|
1266
|
+
"docs": "",
|
|
1267
|
+
"docsTags": [],
|
|
1268
|
+
"default": "355",
|
|
1269
|
+
"values": [
|
|
1270
|
+
{
|
|
1271
|
+
"type": "number"
|
|
1272
|
+
}
|
|
1273
|
+
],
|
|
1274
|
+
"optional": false,
|
|
1275
|
+
"required": false
|
|
1276
|
+
},
|
|
1218
1277
|
{
|
|
1219
1278
|
"name": "readonly",
|
|
1220
1279
|
"type": "boolean",
|
|
@@ -1353,6 +1412,11 @@
|
|
|
1353
1412
|
"event": "clear",
|
|
1354
1413
|
"capture": false,
|
|
1355
1414
|
"passive": false
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
"event": "popoverStateChanged",
|
|
1418
|
+
"capture": false,
|
|
1419
|
+
"passive": false
|
|
1356
1420
|
}
|
|
1357
1421
|
],
|
|
1358
1422
|
"styles": [],
|
|
@@ -1361,6 +1425,7 @@
|
|
|
1361
1425
|
"dependents": [],
|
|
1362
1426
|
"dependencies": [
|
|
1363
1427
|
"click-elsewhere",
|
|
1428
|
+
"q2-popover",
|
|
1364
1429
|
"q2-message",
|
|
1365
1430
|
"q2-input",
|
|
1366
1431
|
"q2-btn",
|
|
@@ -1369,6 +1434,7 @@
|
|
|
1369
1434
|
"dependencyGraph": {
|
|
1370
1435
|
"q2-calendar": [
|
|
1371
1436
|
"click-elsewhere",
|
|
1437
|
+
"q2-popover",
|
|
1372
1438
|
"q2-message",
|
|
1373
1439
|
"q2-input",
|
|
1374
1440
|
"q2-btn",
|
|
@@ -3462,6 +3528,22 @@
|
|
|
3462
3528
|
"optional": false,
|
|
3463
3529
|
"required": false
|
|
3464
3530
|
},
|
|
3531
|
+
{
|
|
3532
|
+
"name": "open",
|
|
3533
|
+
"type": "boolean",
|
|
3534
|
+
"mutable": true,
|
|
3535
|
+
"attr": "open",
|
|
3536
|
+
"reflectToAttr": true,
|
|
3537
|
+
"docs": "",
|
|
3538
|
+
"docsTags": [],
|
|
3539
|
+
"values": [
|
|
3540
|
+
{
|
|
3541
|
+
"type": "boolean"
|
|
3542
|
+
}
|
|
3543
|
+
],
|
|
3544
|
+
"optional": false,
|
|
3545
|
+
"required": false
|
|
3546
|
+
},
|
|
3465
3547
|
{
|
|
3466
3548
|
"name": "popDirection",
|
|
3467
3549
|
"type": "\"down\" | \"up\"",
|
|
@@ -3469,6 +3551,32 @@
|
|
|
3469
3551
|
"attr": "pop-direction",
|
|
3470
3552
|
"reflectToAttr": true,
|
|
3471
3553
|
"docs": "",
|
|
3554
|
+
"docsTags": [
|
|
3555
|
+
{
|
|
3556
|
+
"name": "deprecated"
|
|
3557
|
+
}
|
|
3558
|
+
],
|
|
3559
|
+
"deprecation": "",
|
|
3560
|
+
"values": [
|
|
3561
|
+
{
|
|
3562
|
+
"value": "down",
|
|
3563
|
+
"type": "string"
|
|
3564
|
+
},
|
|
3565
|
+
{
|
|
3566
|
+
"value": "up",
|
|
3567
|
+
"type": "string"
|
|
3568
|
+
}
|
|
3569
|
+
],
|
|
3570
|
+
"optional": false,
|
|
3571
|
+
"required": false
|
|
3572
|
+
},
|
|
3573
|
+
{
|
|
3574
|
+
"name": "popoverDirection",
|
|
3575
|
+
"type": "\"down\" | \"up\"",
|
|
3576
|
+
"mutable": true,
|
|
3577
|
+
"attr": "popover-direction",
|
|
3578
|
+
"reflectToAttr": false,
|
|
3579
|
+
"docs": "",
|
|
3472
3580
|
"docsTags": [],
|
|
3473
3581
|
"values": [
|
|
3474
3582
|
{
|
|
@@ -3483,6 +3591,23 @@
|
|
|
3483
3591
|
"optional": false,
|
|
3484
3592
|
"required": false
|
|
3485
3593
|
},
|
|
3594
|
+
{
|
|
3595
|
+
"name": "popoverMinHeight",
|
|
3596
|
+
"type": "number",
|
|
3597
|
+
"mutable": false,
|
|
3598
|
+
"attr": "popover-min-height",
|
|
3599
|
+
"reflectToAttr": false,
|
|
3600
|
+
"docs": "",
|
|
3601
|
+
"docsTags": [],
|
|
3602
|
+
"default": "150",
|
|
3603
|
+
"values": [
|
|
3604
|
+
{
|
|
3605
|
+
"type": "number"
|
|
3606
|
+
}
|
|
3607
|
+
],
|
|
3608
|
+
"optional": false,
|
|
3609
|
+
"required": false
|
|
3610
|
+
},
|
|
3486
3611
|
{
|
|
3487
3612
|
"name": "resolvedType",
|
|
3488
3613
|
"type": "string",
|
|
@@ -3545,6 +3670,11 @@
|
|
|
3545
3670
|
"event": "focus",
|
|
3546
3671
|
"capture": false,
|
|
3547
3672
|
"passive": false
|
|
3673
|
+
},
|
|
3674
|
+
{
|
|
3675
|
+
"event": "popoverStateChanged",
|
|
3676
|
+
"capture": false,
|
|
3677
|
+
"passive": false
|
|
3548
3678
|
}
|
|
3549
3679
|
],
|
|
3550
3680
|
"styles": [],
|
|
@@ -3555,14 +3685,16 @@
|
|
|
3555
3685
|
"q2-dropdown-item",
|
|
3556
3686
|
"click-elsewhere",
|
|
3557
3687
|
"q2-btn",
|
|
3558
|
-
"q2-icon"
|
|
3688
|
+
"q2-icon",
|
|
3689
|
+
"q2-popover"
|
|
3559
3690
|
],
|
|
3560
3691
|
"dependencyGraph": {
|
|
3561
3692
|
"q2-dropdown": [
|
|
3562
3693
|
"q2-dropdown-item",
|
|
3563
3694
|
"click-elsewhere",
|
|
3564
3695
|
"q2-btn",
|
|
3565
|
-
"q2-icon"
|
|
3696
|
+
"q2-icon",
|
|
3697
|
+
"q2-popover"
|
|
3566
3698
|
],
|
|
3567
3699
|
"q2-dropdown-item": [
|
|
3568
3700
|
"q2-btn",
|
|
@@ -6623,12 +6755,20 @@
|
|
|
6623
6755
|
"slots": [],
|
|
6624
6756
|
"parts": [],
|
|
6625
6757
|
"dependents": [
|
|
6758
|
+
"q2-calendar",
|
|
6759
|
+
"q2-dropdown",
|
|
6626
6760
|
"q2-pill",
|
|
6627
6761
|
"q2-select",
|
|
6628
6762
|
"q2-tag"
|
|
6629
6763
|
],
|
|
6630
6764
|
"dependencies": [],
|
|
6631
6765
|
"dependencyGraph": {
|
|
6766
|
+
"q2-calendar": [
|
|
6767
|
+
"q2-popover"
|
|
6768
|
+
],
|
|
6769
|
+
"q2-dropdown": [
|
|
6770
|
+
"q2-popover"
|
|
6771
|
+
],
|
|
6632
6772
|
"q2-pill": [
|
|
6633
6773
|
"q2-popover"
|
|
6634
6774
|
],
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, g as getElement, h } from './index-bb1c8c7f.js';
|
|
2
|
+
import { r as resizeIframe, w as waitForNextPaint } from './index-576f618c.js';
|
|
3
|
+
|
|
4
|
+
const ClickElsewhere = class {
|
|
5
|
+
constructor(hostRef) {
|
|
6
|
+
registerInstance(this, hostRef);
|
|
7
|
+
this.change = createEvent(this, "change", 7);
|
|
8
|
+
/**
|
|
9
|
+
* Listens for mouse and window events that happen outside this click-elsewhere element so we can close popovers when users click outside them
|
|
10
|
+
*/
|
|
11
|
+
this.mouseEventList = ['mousedown', 'dragstart', 'touchstart'];
|
|
12
|
+
this.isCurrentlyFocused = false;
|
|
13
|
+
this.mouseHandler = (event) => {
|
|
14
|
+
const isCurrentlyFocused = this.shadowContains(this.findActiveElement());
|
|
15
|
+
const aboutToBeFocused = this.shadowContains(this.shadowEventTarget(event)) || this.originatesInSlots(event.target);
|
|
16
|
+
if (!aboutToBeFocused && (this.isCurrentlyFocused || isCurrentlyFocused)) {
|
|
17
|
+
this.isCurrentlyFocused = false;
|
|
18
|
+
this.change.emit();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
this.isCurrentlyFocused = aboutToBeFocused || isCurrentlyFocused;
|
|
22
|
+
};
|
|
23
|
+
this.windowBlurHandler = () => {
|
|
24
|
+
const activeElement = this.findActiveElement();
|
|
25
|
+
if (activeElement === document.body && this.isCurrentlyFocused) {
|
|
26
|
+
this.isCurrentlyFocused = false;
|
|
27
|
+
this.change.emit();
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/* TODO: Stencil/Rollup is having issues compiling without this here. Will try to remove in future Stencil upgrade. */
|
|
33
|
+
/* tslint:disable:no-empty */
|
|
34
|
+
componentWillLoad() { }
|
|
35
|
+
/* tslint:enable:no-empty */
|
|
36
|
+
connectedCallback() {
|
|
37
|
+
this.mouseEventList.forEach((eventName) => {
|
|
38
|
+
document.addEventListener(eventName, this.mouseHandler);
|
|
39
|
+
});
|
|
40
|
+
window.addEventListener('blur', this.windowBlurHandler);
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
this.mouseEventList.forEach((eventName) => {
|
|
44
|
+
document.removeEventListener(eventName, this.mouseHandler);
|
|
45
|
+
});
|
|
46
|
+
window.removeEventListener('blur', this.windowBlurHandler);
|
|
47
|
+
}
|
|
48
|
+
findActiveElement() {
|
|
49
|
+
let workingElement = document.activeElement;
|
|
50
|
+
while (true) {
|
|
51
|
+
if (!workingElement || !workingElement.shadowRoot) {
|
|
52
|
+
return workingElement;
|
|
53
|
+
}
|
|
54
|
+
workingElement = workingElement.shadowRoot.activeElement;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
shadowEventTarget(event) {
|
|
58
|
+
return event.composedPath()[0] || event.target;
|
|
59
|
+
}
|
|
60
|
+
shadowContains(child) {
|
|
61
|
+
/**
|
|
62
|
+
* shadow-dom enabled version of Node.contains()
|
|
63
|
+
*/
|
|
64
|
+
while (true) {
|
|
65
|
+
if (child === this.hostElement) {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
if (!child) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
child = child.parentNode || child.host;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
originatesInSlots(target) {
|
|
75
|
+
const slots = this.hostElement.querySelectorAll('slot');
|
|
76
|
+
for (const currentSlot of Array.from(slots)) {
|
|
77
|
+
const lightNodes = (currentSlot && currentSlot.assignedNodes && currentSlot.assignedNodes()) ||
|
|
78
|
+
this.hostElement.childNodes;
|
|
79
|
+
for (const currentNode of Array.from(lightNodes)) {
|
|
80
|
+
if (currentNode.contains(target)) {
|
|
81
|
+
return true;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return false;
|
|
86
|
+
}
|
|
87
|
+
get hostElement() { return getElement(this); }
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const stylesCss = "*{box-sizing:border-box}*:active{outline:none}*:focus{outline:none;box-shadow:var(--const-double-focus-ring, 0 0 0 2px #ffffff, 0 0 0 4px #33b4ff #06C)}:host{box-shadow:none !important}::-moz-focus-inner{border:none}input,textarea,button{font-family:inherit;font-size:inherit;font-stretch:inherit}:host(.sr),:host(.sr) button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.sr,.sr button{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap}.hidden{display:none}:host([hidden]){display:none}.invisible{visibility:hidden}:host{display:block;width:100%}:host([align=right]){display:block;position:absolute;right:0;text-align:end;left:unset}.container{display:none;overflow:hidden;opacity:0;height:0;position:absolute;top:var(--tct-popover-top, var(--t-popover-top, initial));visibility:hidden;background-color:var(--tct-popover-background-color, var(--t-popover-background-color, var(--app-white, #ffffff)));color:var(--tct-popover-text-color, var(--t-popover-text-color, var(--t-text, #4d4d4d)));z-index:var(--tct-popover-z-index, var(--t-popover-z-index, 100));width:max-content;min-width:var(--tct-popover-min-width, var(--t-popover-min-width, 135px));box-shadow:var(--tct-popover-box-shadow, var(--t-popover-box-shadow, var(--app-shadow-1, 0 2px 4px rgba(0, 0, 0, 0.3))));text-align:start;left:0;transition:opacity var(--app-tween-1, 0.2s ease), max-height var(--app-tween-1, 0.2s ease);border-radius:var(--tct-popover-border-radius, var(--t-popover-border-radius, 0));max-height:var(--comp-pop-max-height);--comp-scrollbar-size:var(--tct-scrollbar-size, var(--t-scrollbar-size, var(--app-scale-1x, 5px)));--comp-scrollbar-border-radius:var(--tct-scrollbar-border-radius, var(--t-scrollbar-border-radius, var(--app-border-radius-1, 3px)));--comp-scrollbar-color:var(--tct-scrollbar-color, var(--t-scrollbar-color, var(--t-a11y-gray-color, #747474)));scrollbar-width:thin;scrollbar-color:var(--comp-scrollbar-color) transparent}.container::-webkit-scrollbar{width:var(--comp-scrollbar-size);height:var(--comp-scrollbar-size);margin:5px}.container::-webkit-scrollbar-thumb{background:var(--comp-scrollbar-color);border-radius:var(--comp-scrollbar-border-radius)}.container::-webkit-scrollbar-track{background:transparent;border-radius:var(--comp-scrollbar-border-radius)}:host([block]) .container{left:unset;right:unset;width:100%;min-width:unset}:host([align=right]) .container{right:0;text-align:end;left:unset}.container :host([open]){display:block}:host([open]) .container.show{height:auto;overflow:auto;opacity:1;visibility:visible}.container.up{bottom:var(--comp-pop-offset)}click-elsewhere{position:relative;display:block}.content{height:auto}";
|
|
91
|
+
|
|
92
|
+
const Q2Popover = class {
|
|
93
|
+
constructor(hostRef) {
|
|
94
|
+
registerInstance(this, hostRef);
|
|
95
|
+
this.popoverStateChanged = createEvent(this, "popoverStateChanged", 7);
|
|
96
|
+
this.scheduledAfterRender = [];
|
|
97
|
+
/// Helpers ///
|
|
98
|
+
this.viewPortChanged = () => {
|
|
99
|
+
if (!this.open)
|
|
100
|
+
return;
|
|
101
|
+
this.determinePopDirection();
|
|
102
|
+
};
|
|
103
|
+
this.direction = undefined;
|
|
104
|
+
this.align = undefined;
|
|
105
|
+
this.open = undefined;
|
|
106
|
+
this.block = undefined;
|
|
107
|
+
this.minHeight = undefined;
|
|
108
|
+
this.controlElement = undefined;
|
|
109
|
+
this.currentDirection = undefined;
|
|
110
|
+
this.show = false;
|
|
111
|
+
}
|
|
112
|
+
/// Lifecycle hooks ///
|
|
113
|
+
componentDidLoad() {
|
|
114
|
+
if (this.open)
|
|
115
|
+
this.determinePopDirection();
|
|
116
|
+
}
|
|
117
|
+
componentDidRender() {
|
|
118
|
+
setTimeout(() => {
|
|
119
|
+
this.scheduledAfterRender.forEach(fn => fn());
|
|
120
|
+
this.scheduledAfterRender = [];
|
|
121
|
+
}, 25);
|
|
122
|
+
}
|
|
123
|
+
disconnectedCallback() {
|
|
124
|
+
this.removeViewportListeners();
|
|
125
|
+
}
|
|
126
|
+
/// Methods ///
|
|
127
|
+
async toggle() {
|
|
128
|
+
this.open = !this.open;
|
|
129
|
+
}
|
|
130
|
+
/// Watchers ///
|
|
131
|
+
openChanged(open) {
|
|
132
|
+
this.popoverStateChanged.emit({ open });
|
|
133
|
+
this.scheduledAfterRender.push(resizeIframe);
|
|
134
|
+
if (open) {
|
|
135
|
+
this.addViewportListeners();
|
|
136
|
+
this.determinePopDirection();
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
this.removeViewportListeners();
|
|
140
|
+
// Reset currentDirection after close transition completes
|
|
141
|
+
this.containerElement.addEventListener('transitionend', () => {
|
|
142
|
+
if (this.open)
|
|
143
|
+
return;
|
|
144
|
+
this.currentDirection = undefined;
|
|
145
|
+
this.containerElement.style.removeProperty('display');
|
|
146
|
+
this.containerElement.style.removeProperty('--comp-pop-max-height');
|
|
147
|
+
}, { once: true });
|
|
148
|
+
this.show = false;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/// Listeners ///
|
|
152
|
+
popoverStateHandler(event) {
|
|
153
|
+
const { detail: { open }, } = event;
|
|
154
|
+
if (open === this.open)
|
|
155
|
+
return;
|
|
156
|
+
this.open = open;
|
|
157
|
+
event.stopPropagation();
|
|
158
|
+
}
|
|
159
|
+
addViewportListeners() {
|
|
160
|
+
// window.visualViewport.addEventListener('scroll', this.viewPortChanged);
|
|
161
|
+
window.visualViewport.addEventListener('resize', this.viewPortChanged);
|
|
162
|
+
}
|
|
163
|
+
removeViewportListeners() {
|
|
164
|
+
// window.visualViewport.removeEventListener('scroll', this.viewPortChanged);
|
|
165
|
+
window.visualViewport.removeEventListener('resize', this.viewPortChanged);
|
|
166
|
+
}
|
|
167
|
+
async setDirectionAndShow(direction) {
|
|
168
|
+
if (direction === 'up') {
|
|
169
|
+
this.determinePopOffset();
|
|
170
|
+
}
|
|
171
|
+
this.currentDirection = direction;
|
|
172
|
+
this.show = true;
|
|
173
|
+
}
|
|
174
|
+
async determinePopDirection() {
|
|
175
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
176
|
+
const { containerElement, contentElement, direction, controlElement, currentDirection } = this;
|
|
177
|
+
if (containerElement)
|
|
178
|
+
containerElement.style.maxHeight = null;
|
|
179
|
+
// If the direction is already set then use it, otherwise use the current direction
|
|
180
|
+
const currentOrStatedDirection = direction !== null && direction !== void 0 ? direction : currentDirection;
|
|
181
|
+
// Set the container to block so we can get the height
|
|
182
|
+
containerElement.style.setProperty('display', 'block');
|
|
183
|
+
await waitForNextPaint();
|
|
184
|
+
// Determine the dimensions of the control element
|
|
185
|
+
const { top: topOffset, height } = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect()) !== null && _a !== void 0 ? _a : {
|
|
186
|
+
top: 0,
|
|
187
|
+
height: 0,
|
|
188
|
+
};
|
|
189
|
+
const contentHeight = contentElement.clientHeight;
|
|
190
|
+
const scrollY = ((_c = (_b = window.Tecton) === null || _b === void 0 ? void 0 : _b.platformDimensions) === null || _c === void 0 ? void 0 : _c.scrollY) ||
|
|
191
|
+
((_d = window.visualViewport) === null || _d === void 0 ? void 0 : _d.offsetTop) || // Only Android Chrome provides this which we need when scrolled
|
|
192
|
+
0;
|
|
193
|
+
const innerHeight = ((_f = (_e = window.Tecton) === null || _e === void 0 ? void 0 : _e.platformDimensions) === null || _f === void 0 ? void 0 : _f.innerHeight) || ((_g = window.visualViewport) === null || _g === void 0 ? void 0 : _g.height) || window.innerHeight;
|
|
194
|
+
const bottomOffset = scrollY + innerHeight - topOffset - height;
|
|
195
|
+
const canShowFullSizeBelow = bottomOffset > contentHeight;
|
|
196
|
+
const canShowFullSizeAbove = contentHeight <= topOffset;
|
|
197
|
+
let determinedDirection;
|
|
198
|
+
// Show the full-size popover below or above if it will fit
|
|
199
|
+
if (currentOrStatedDirection === 'down' && canShowFullSizeBelow)
|
|
200
|
+
return this.setDirectionAndShow('down');
|
|
201
|
+
else if (currentOrStatedDirection === 'up' && canShowFullSizeAbove)
|
|
202
|
+
return this.setDirectionAndShow('up');
|
|
203
|
+
else if (currentOrStatedDirection === undefined && canShowFullSizeBelow)
|
|
204
|
+
determinedDirection = 'down';
|
|
205
|
+
else if (currentOrStatedDirection === undefined && canShowFullSizeAbove)
|
|
206
|
+
determinedDirection = 'up';
|
|
207
|
+
if (determinedDirection)
|
|
208
|
+
return this.setDirectionAndShow(determinedDirection);
|
|
209
|
+
// If full size will not fit then make it as tall as possible
|
|
210
|
+
const { minHeight = 150 } = this;
|
|
211
|
+
const displayBuffer = 5;
|
|
212
|
+
const canShowMinHeightBelow = bottomOffset >= minHeight + displayBuffer;
|
|
213
|
+
let maxHeight;
|
|
214
|
+
if (currentOrStatedDirection === 'down') {
|
|
215
|
+
maxHeight = Math.max(bottomOffset - displayBuffer, minHeight);
|
|
216
|
+
determinedDirection = 'down';
|
|
217
|
+
}
|
|
218
|
+
else if (currentOrStatedDirection === 'up') {
|
|
219
|
+
maxHeight = Math.max(topOffset - displayBuffer, minHeight);
|
|
220
|
+
determinedDirection = 'up';
|
|
221
|
+
}
|
|
222
|
+
else if (canShowMinHeightBelow) {
|
|
223
|
+
maxHeight = Math.max(bottomOffset - displayBuffer, minHeight);
|
|
224
|
+
determinedDirection = 'down';
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
maxHeight = Math.max(topOffset - scrollY - displayBuffer, minHeight);
|
|
228
|
+
determinedDirection = 'up';
|
|
229
|
+
}
|
|
230
|
+
containerElement.style.setProperty('--comp-pop-max-height', `${maxHeight}px`);
|
|
231
|
+
return this.setDirectionAndShow(determinedDirection);
|
|
232
|
+
}
|
|
233
|
+
determinePopOffset() {
|
|
234
|
+
var _a;
|
|
235
|
+
const { controlElement, containerElement } = this;
|
|
236
|
+
const dropdownHeight = (_a = controlElement === null || controlElement === void 0 ? void 0 : controlElement.getBoundingClientRect().height) !== null && _a !== void 0 ? _a : 0;
|
|
237
|
+
containerElement.style.setProperty('--comp-pop-offset', `${dropdownHeight}px`);
|
|
238
|
+
}
|
|
239
|
+
/// DOM ///
|
|
240
|
+
render() {
|
|
241
|
+
const containerClasses = ['container', this.currentDirection];
|
|
242
|
+
if (this.show)
|
|
243
|
+
containerClasses.push('show');
|
|
244
|
+
return (h("div", { ref: el => (this.containerElement = el), class: containerClasses.join(' '), "test-id": "outerContainer" }, h("div", { ref: el => (this.contentElement = el), class: "content" }, h("slot", null))));
|
|
245
|
+
}
|
|
246
|
+
get hostElement() { return getElement(this); }
|
|
247
|
+
static get watchers() { return {
|
|
248
|
+
"open": ["openChanged"]
|
|
249
|
+
}; }
|
|
250
|
+
};
|
|
251
|
+
Q2Popover.style = stylesCss;
|
|
252
|
+
|
|
253
|
+
export { ClickElsewhere as click_elsewhere, Q2Popover as q2_popover };
|
|
@@ -540,6 +540,17 @@ function handleAriaLabel(target) {
|
|
|
540
540
|
target.label = loc(ariaLabel);
|
|
541
541
|
target.ariaLabel = undefined;
|
|
542
542
|
}
|
|
543
|
+
/**
|
|
544
|
+
* Handles when a prop has been renamed on a component without introducing a breaking change.
|
|
545
|
+
*/
|
|
546
|
+
function handleRenamedProp(target, oldProp, newProp, removeOldProp) {
|
|
547
|
+
if (typeof target[oldProp] === 'undefined')
|
|
548
|
+
return;
|
|
549
|
+
target[newProp] = target[oldProp];
|
|
550
|
+
if (removeOldProp) {
|
|
551
|
+
delete target[oldProp];
|
|
552
|
+
}
|
|
553
|
+
}
|
|
543
554
|
function messagesDOM(target) {
|
|
544
555
|
const type = target.hasError ? 'danger' : 'info';
|
|
545
556
|
return (h("div", { class: "messages-container" },
|
|
@@ -563,57 +574,6 @@ function setMessageHeight(target) {
|
|
|
563
574
|
}
|
|
564
575
|
});
|
|
565
576
|
}
|
|
566
|
-
function setPopProperties(target) {
|
|
567
|
-
var _a, _b, _c, _d;
|
|
568
|
-
const { dropdownContainer, popDirection } = target;
|
|
569
|
-
if (dropdownContainer) {
|
|
570
|
-
dropdownContainer.style.maxHeight = null;
|
|
571
|
-
}
|
|
572
|
-
if (popDirection) {
|
|
573
|
-
return (target.privatePopDirection = popDirection);
|
|
574
|
-
}
|
|
575
|
-
const controlElement = target.inputField || target.controlElement;
|
|
576
|
-
const minPopHeight = target.minPopHeight || null;
|
|
577
|
-
// Add sizable so that we can capture the height
|
|
578
|
-
dropdownContainer.classList.add('sizable');
|
|
579
|
-
const dropdownHeight = dropdownContainer.getBoundingClientRect().height;
|
|
580
|
-
dropdownContainer.classList.remove('sizable');
|
|
581
|
-
const { top: topOffset, height } = controlElement.getBoundingClientRect();
|
|
582
|
-
const scrollY = ((_b = (_a = window.Tecton) === null || _a === void 0 ? void 0 : _a.platformDimensions) === null || _b === void 0 ? void 0 : _b.scrollY) || 0;
|
|
583
|
-
const innerHeight = ((_d = (_c = window.Tecton) === null || _c === void 0 ? void 0 : _c.platformDimensions) === null || _d === void 0 ? void 0 : _d.innerHeight) || window.innerHeight;
|
|
584
|
-
const bottomOffset = scrollY + innerHeight - topOffset - height;
|
|
585
|
-
const canShowFullSizeBelow = bottomOffset > dropdownHeight;
|
|
586
|
-
const canShowFullSizeAbove = dropdownHeight <= topOffset;
|
|
587
|
-
// Prefer full size above or below
|
|
588
|
-
if (canShowFullSizeBelow) {
|
|
589
|
-
return (target.privatePopDirection = 'down');
|
|
590
|
-
}
|
|
591
|
-
else if (canShowFullSizeAbove || !minPopHeight) {
|
|
592
|
-
determinePopOffset(target);
|
|
593
|
-
return (target.privatePopDirection = 'up');
|
|
594
|
-
}
|
|
595
|
-
// If full size will not fit and minHeight is set, then make as tall as possible
|
|
596
|
-
const displayBuffer = 5;
|
|
597
|
-
const canShowSmallBelow = bottomOffset >= minPopHeight + displayBuffer;
|
|
598
|
-
if (canShowSmallBelow) {
|
|
599
|
-
const maxBelowHeight = Math.max(bottomOffset - displayBuffer, minPopHeight);
|
|
600
|
-
dropdownContainer.style.maxHeight = `${maxBelowHeight}px`;
|
|
601
|
-
return (target.privatePopDirection = 'down');
|
|
602
|
-
}
|
|
603
|
-
else {
|
|
604
|
-
const maxAboveHeight = Math.max(topOffset, minPopHeight);
|
|
605
|
-
dropdownContainer.style.maxHeight = `${maxAboveHeight}px`;
|
|
606
|
-
determinePopOffset(target);
|
|
607
|
-
return (target.privatePopDirection = 'up');
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
const determinePopOffset = ({ dropdownContainer, inputField }) => {
|
|
611
|
-
var _a, _b;
|
|
612
|
-
if (!inputField)
|
|
613
|
-
return;
|
|
614
|
-
const inputFieldHeight = (_b = (_a = inputField.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.input-field')) === null || _b === void 0 ? void 0 : _b.getBoundingClientRect().height;
|
|
615
|
-
dropdownContainer.style.setProperty('--comp-dropup-offset', `${inputFieldHeight}px`);
|
|
616
|
-
};
|
|
617
577
|
const resizeIframe = () => {
|
|
618
578
|
var _a, _b;
|
|
619
579
|
return (_b = (_a = window.TectonElements) === null || _a === void 0 ? void 0 : _a.resizeIframe) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
@@ -626,4 +586,4 @@ const handleColor = (target) => {
|
|
|
626
586
|
}
|
|
627
587
|
};
|
|
628
588
|
|
|
629
|
-
export { isEventFromElement as a,
|
|
589
|
+
export { isEventFromElement as a, handleRenamedProp as b, isTouchDevice as c, createGuid as d, isRelatedTargetWithinHost as e, isHostLosingFocus as f, addSmoothScrollPolyfill as g, handleAriaLabel as h, isMobile as i, labelDOM as j, isFirefox as k, loc as l, messagesDOM as m, nextPaint as n, overrideFocus as o, handleColor as p, resizeIframe as r, setMessageHeight as s, waitForNextPaint as w };
|