bm-core-ui 2.8.2 → 2.9.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/build/@types/index.d.ts +327 -31
- package/build/BMCollectionView/BMCollectionView.js +33 -16
- package/build/BMCollectionView/BMCollectionViewFlowLayout.js +159 -39
- package/build/BMCollectionView/BMCollectionViewLayout.js +4 -1
- package/build/BMCoreUI.css +161 -13
- package/build/BMView/BMLayoutConstraint_v2.5.js +1 -1
- package/build/BMView/BMMenu.js +790 -65
- package/build/BMView/BMScrollView.js +1 -1
- package/build/BMView/BMTextFieldDelegate.js +6 -6
- package/build/BMViewLayoutEditor/BMLayoutEditorSettingCells.js +2 -2
- package/build/BMViewLayoutEditor/BMLayoutEditorViewSettings.js +5 -2
- package/build/BMWindow/BMConfirmationPopup.js +21 -1
- package/build/BMWindow/BMPopover/BMPopover.js +310 -52
- package/build/BMWindow/BMWindow.js +61 -18
- package/lib/@types/BMCoreUI.min.d.ts +327 -31
- package/lib/BMCoreUI.min.js +1 -1
- package/package.json +1 -1
- package/CHANGELOG.md +0 -1739
- package/build/BMViewLayoutEditor/BMLayoutEditorDelegate.js +0 -59
- package/build/BMViewLayoutEditor/BMLayoutEditorSettingsDelegate.js +0 -46
- package/build/BMViewLayoutEditor/BMLayoutVariableProvider.js +0 -202
package/build/BMCoreUI.css
CHANGED
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
position: fixed;
|
|
33
33
|
|
|
34
34
|
box-shadow: 0px 4px 12px rgba(0, 0, 0, .33);
|
|
35
|
+
|
|
36
|
+
pointer-events: none;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
39
|
.BMDragIndicatorRed {
|
|
@@ -624,7 +626,7 @@
|
|
|
624
626
|
background: rgba(0, 128, 255, 1);
|
|
625
627
|
|
|
626
628
|
color: white;
|
|
627
|
-
font-family: -apple-system,
|
|
629
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica', 'Segoe UI', sans-serif;
|
|
628
630
|
font-size: 14px;
|
|
629
631
|
font-weight: bold;
|
|
630
632
|
|
|
@@ -1118,10 +1120,11 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1118
1120
|
}
|
|
1119
1121
|
|
|
1120
1122
|
|
|
1121
|
-
/* MARK: Layout editor popup */
|
|
1123
|
+
/* MARK: Menu and container, Layout editor popup */
|
|
1124
|
+
/* #region - Menu container */
|
|
1122
1125
|
|
|
1123
1126
|
.BMLayoutEditorConstraintPopupContainer, .BMMenuContainer {
|
|
1124
|
-
position:
|
|
1127
|
+
position: fixed;
|
|
1125
1128
|
|
|
1126
1129
|
left: 0px;
|
|
1127
1130
|
top: 0px;
|
|
@@ -1132,6 +1135,12 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1132
1135
|
z-index: 9999999;
|
|
1133
1136
|
}
|
|
1134
1137
|
|
|
1138
|
+
/* A class that is temporarily added to the menu container to allow the user
|
|
1139
|
+
to move over menu items without triggering them while moving torwards the submenu */
|
|
1140
|
+
.BMMenuContainer.BMMenuContainerSubmenuActive > * {
|
|
1141
|
+
pointer-events: none !important;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1135
1144
|
.BMMenuContainerFullScreen {
|
|
1136
1145
|
background-color: rgba(0, 0, 0, .33);
|
|
1137
1146
|
}
|
|
@@ -1144,7 +1153,8 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1144
1153
|
}
|
|
1145
1154
|
}
|
|
1146
1155
|
|
|
1147
|
-
.BMLayoutEditorConstraintPopup,
|
|
1156
|
+
.BMLayoutEditorConstraintPopup,
|
|
1157
|
+
.BMMenu {
|
|
1148
1158
|
position: absolute;
|
|
1149
1159
|
|
|
1150
1160
|
display: flex;
|
|
@@ -1156,6 +1166,8 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1156
1166
|
background-color: rgba(255, 255, 255, .8);
|
|
1157
1167
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, .1), 0px 0px 1px 1px rgba(0, 0, 0, .1);
|
|
1158
1168
|
|
|
1169
|
+
color: rgba(0, 0, 0, .8);
|
|
1170
|
+
|
|
1159
1171
|
border-radius: 8px;
|
|
1160
1172
|
}
|
|
1161
1173
|
|
|
@@ -1190,10 +1202,39 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1190
1202
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, .1), 0px 0px 1px 1px rgba(0, 0, 0, .1);
|
|
1191
1203
|
z-index: 9999999 !important;
|
|
1192
1204
|
overflow: hidden !important;
|
|
1205
|
+
|
|
1206
|
+
-webkit-touch-callout: none;
|
|
1207
|
+
-webkit-user-select: none;
|
|
1208
|
+
-khtml-user-select: none;
|
|
1209
|
+
-moz-user-select: none;
|
|
1210
|
+
-ms-user-select: none;
|
|
1211
|
+
user-select: none;
|
|
1212
|
+
|
|
1213
|
+
-webkit-tap-highlight-color: transparent;
|
|
1193
1214
|
}
|
|
1194
1215
|
|
|
1195
1216
|
.BMMenuSourceNode {
|
|
1196
|
-
|
|
1217
|
+
visibility: hidden !important;
|
|
1218
|
+
}
|
|
1219
|
+
|
|
1220
|
+
/* While a touch menu has a submenu, its menu items should not respond to events */
|
|
1221
|
+
.BMMenuTouchSubmenu.BMMenu > .BMMenuItem {
|
|
1222
|
+
pointer-events: none;
|
|
1223
|
+
|
|
1224
|
+
/* Additionally add an opacity transition to the items to be used in an animation */
|
|
1225
|
+
transition: opacity .2s ease;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
.BMMenuTouchSubmenu.BMMenu {
|
|
1229
|
+
transition: filter .2s ease;
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
.BMMenuTouchSubmenu.BMMenu.BMMenuInactive > * {
|
|
1233
|
+
opacity: .75 !important;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
.BMMenuTouchSubmenu.BMMenu.BMMenuInactive {
|
|
1237
|
+
filter: brightness(95%);
|
|
1197
1238
|
}
|
|
1198
1239
|
|
|
1199
1240
|
@media (prefers-color-scheme: dark) {
|
|
@@ -1203,7 +1244,8 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1203
1244
|
}
|
|
1204
1245
|
|
|
1205
1246
|
@media (prefers-color-scheme: dark) {
|
|
1206
|
-
.BMLayoutEditorConstraintPopup,
|
|
1247
|
+
.BMLayoutEditorConstraintPopup,
|
|
1248
|
+
.BMMenu {
|
|
1207
1249
|
background-color: rgba(50, 50, 50, .75);
|
|
1208
1250
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, .66), 0px 0px 0px 1px rgba(0, 0, 0, .66);
|
|
1209
1251
|
}
|
|
@@ -1221,13 +1263,16 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1221
1263
|
}
|
|
1222
1264
|
}
|
|
1223
1265
|
|
|
1266
|
+
/* #endregion */
|
|
1267
|
+
|
|
1268
|
+
/* #region - Menu item */
|
|
1269
|
+
|
|
1224
1270
|
.BMLayoutEditorConstraintPopupOption, .BMMenuItem {
|
|
1225
1271
|
height: 28px;
|
|
1226
1272
|
line-height: 28px;
|
|
1227
1273
|
vertical-align: middle;
|
|
1228
1274
|
|
|
1229
1275
|
padding-left: 16px;
|
|
1230
|
-
padding-right: 64px;
|
|
1231
1276
|
|
|
1232
1277
|
font-family: -apple-system, BlinkMacSystemFont, Roboto, 'Segoe UI', sans-serif !important;
|
|
1233
1278
|
font-size: 14px !important;
|
|
@@ -1238,16 +1283,37 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1238
1283
|
|
|
1239
1284
|
display: flex;
|
|
1240
1285
|
align-items: center;
|
|
1286
|
+
|
|
1287
|
+
-webkit-touch-callout: none;
|
|
1288
|
+
-webkit-user-select: none;
|
|
1289
|
+
-khtml-user-select: none;
|
|
1290
|
+
-moz-user-select: none;
|
|
1291
|
+
-ms-user-select: none;
|
|
1292
|
+
user-select: none;
|
|
1293
|
+
|
|
1294
|
+
-webkit-tap-highlight-color: transparent;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
.BMLayoutEditorConstraintPopupOption {
|
|
1298
|
+
padding-right: 64px;
|
|
1241
1299
|
}
|
|
1242
1300
|
|
|
1243
1301
|
.BMMenuTouch > .BMMenuItem {
|
|
1244
1302
|
height: 44px;
|
|
1245
1303
|
line-height: 44px;
|
|
1246
|
-
border-
|
|
1304
|
+
border-top: 1px solid rgba(0, 0, 0, .1);
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
.BMMenuTouch > .BMMenuItem:first-child {
|
|
1308
|
+
border-top-width: 0px;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
.BMMenuTouch > .BMMenuItem.BMMenuItemHighlighted + .BMMenuItem {
|
|
1312
|
+
border-top-color: rgba(0, 0, 0, .2);
|
|
1247
1313
|
}
|
|
1248
1314
|
|
|
1249
|
-
.BMMenuTouch > .BMMenuItem
|
|
1250
|
-
|
|
1315
|
+
.BMMenuTouch > .BMMenuItem.BMMenuItemHighlighted + .BMMenuDivider {
|
|
1316
|
+
box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, .1) inset;
|
|
1251
1317
|
}
|
|
1252
1318
|
|
|
1253
1319
|
.BMMenuIcon {
|
|
@@ -1259,6 +1325,30 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1259
1325
|
margin-right: 16px;
|
|
1260
1326
|
}
|
|
1261
1327
|
|
|
1328
|
+
/* The menu's text element should expand to fill all available space */
|
|
1329
|
+
.BMMenuItem > span {
|
|
1330
|
+
flex-grow: 1;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
.BMMenuItemDisclosure {
|
|
1334
|
+
width: 24px;
|
|
1335
|
+
height: 24px;
|
|
1336
|
+
|
|
1337
|
+
margin-left: 48px;
|
|
1338
|
+
|
|
1339
|
+
font-weight: 600;
|
|
1340
|
+
|
|
1341
|
+
font-size: 18px;
|
|
1342
|
+
|
|
1343
|
+
display: flex;
|
|
1344
|
+
align-items: center;
|
|
1345
|
+
justify-content: center;
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
.BMMenuItemDisclosureSubmenu::after {
|
|
1349
|
+
content: '›';
|
|
1350
|
+
}
|
|
1351
|
+
|
|
1262
1352
|
@keyframes BMMenuItemActiveAnimation {
|
|
1263
1353
|
from {
|
|
1264
1354
|
background: transparent;
|
|
@@ -1286,16 +1376,31 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1286
1376
|
color: white;
|
|
1287
1377
|
}
|
|
1288
1378
|
|
|
1379
|
+
.BMMenuSourceNodeShadow.BMMenuItem.BMMenuItemHighlighted {
|
|
1380
|
+
background: white;
|
|
1381
|
+
color: rgba(0, 0, 0, .8);
|
|
1382
|
+
}
|
|
1383
|
+
|
|
1289
1384
|
.BMLayoutEditorConstraintPopupOption:active, .BMMenuTouch > .BMMenuItem:hover {
|
|
1290
1385
|
background: transparent;
|
|
1291
1386
|
color: rgba(0, 0, 0, .8);
|
|
1292
1387
|
}
|
|
1293
1388
|
|
|
1294
1389
|
.BMMenuItem.BMMenuItemActive {
|
|
1295
|
-
animation: .
|
|
1390
|
+
animation: .15s linear BMMenuItemActiveAnimation;
|
|
1296
1391
|
animation-fill-mode: both;
|
|
1297
1392
|
}
|
|
1298
1393
|
|
|
1394
|
+
.BMMenuTouch > .BMMenuItem.BMMenuItemActive,
|
|
1395
|
+
.BMMenuTouch > .BMMenuItem.BMMenuItemHighlighted {
|
|
1396
|
+
animation: none;
|
|
1397
|
+
background: transparent;
|
|
1398
|
+
color: rgba(0, 0, 0, .8);
|
|
1399
|
+
|
|
1400
|
+
backdrop-filter: brightness(90%);
|
|
1401
|
+
-webkit-backdrop-filter: brightness(90%);
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1299
1404
|
.BMLayoutEditorConstraintPopupOptionHighlighted, .BMMenuItemHighlighted {
|
|
1300
1405
|
background: rgba(0, 128, 255, .5);
|
|
1301
1406
|
}
|
|
@@ -1305,7 +1410,7 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1305
1410
|
color: rgba(255, 255, 255, .9);
|
|
1306
1411
|
}
|
|
1307
1412
|
|
|
1308
|
-
.BMLayoutEditorConstraintPopupOption:active, .
|
|
1413
|
+
.BMLayoutEditorConstraintPopupOption:active, .BMMenuTouch > .BMMenuItem:hover {
|
|
1309
1414
|
background: transparent;
|
|
1310
1415
|
color: white;
|
|
1311
1416
|
}
|
|
@@ -1313,8 +1418,45 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1313
1418
|
.BMMenuTouch > .BMMenuItem {
|
|
1314
1419
|
border-bottom-color: rgba(255, 255, 255, .1);
|
|
1315
1420
|
}
|
|
1421
|
+
|
|
1422
|
+
.BMMenuTouch > .BMMenuItem.BMMenuItemActive,
|
|
1423
|
+
.BMMenuTouch > .BMMenuItem.BMMenuItemHighlighted {
|
|
1424
|
+
color: rgba(255, 255, 255, 1);
|
|
1425
|
+
|
|
1426
|
+
backdrop-filter: brightness(110%);
|
|
1427
|
+
-webkit-backdrop-filter: brightness(110%);
|
|
1428
|
+
}
|
|
1429
|
+
|
|
1430
|
+
.BMMenuSourceNodeShadow.BMMenuItem.BMMenuItemHighlighted {
|
|
1431
|
+
background: rgba(33, 33, 33, 1);
|
|
1432
|
+
color: rgba(255, 255, 255, .9);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
@keyframes BMMenuItemActiveAnimation {
|
|
1436
|
+
from {
|
|
1437
|
+
background: transparent;
|
|
1438
|
+
color: rgba(255, 255, 255, .9);
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
49% {
|
|
1442
|
+
background: transparent;
|
|
1443
|
+
color: rgba(255, 255, 255, .9);
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
50% {
|
|
1447
|
+
background: rgb(0, 128, 255);
|
|
1448
|
+
color: white;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1451
|
+
to {
|
|
1452
|
+
background: rgb(0, 128, 255);
|
|
1453
|
+
color: white;
|
|
1454
|
+
}
|
|
1455
|
+
}
|
|
1316
1456
|
}
|
|
1317
1457
|
|
|
1458
|
+
/* #endregion */
|
|
1459
|
+
|
|
1318
1460
|
.BMLayoutEditorWorkspaceToolbarSizeClass .BMLayoutEditorConstraintPopupOption {
|
|
1319
1461
|
color: rgba(255, 255, 255, .9);
|
|
1320
1462
|
}
|
|
@@ -1443,6 +1585,12 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1443
1585
|
flex-shrink: 0;
|
|
1444
1586
|
}
|
|
1445
1587
|
|
|
1588
|
+
.BMMenuTouch > .BMMenuDivider {
|
|
1589
|
+
margin: 0;
|
|
1590
|
+
height: 3px;
|
|
1591
|
+
background: rgba(0, 0, 0, .1);
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1446
1594
|
.BMLayoutEditorDetailsDividerCell {
|
|
1447
1595
|
background: rgba(0, 0, 0, .05);
|
|
1448
1596
|
}
|
|
@@ -1466,7 +1614,7 @@ input:not(:checked) + .BMWindowSwitchGutter > .BMWindowSwitchKnob, .BMWindowSwit
|
|
|
1466
1614
|
flex-shrink: 0;
|
|
1467
1615
|
}
|
|
1468
1616
|
|
|
1469
|
-
BMLayoutEditorDetailsItemBadge {
|
|
1617
|
+
.BMLayoutEditorDetailsItemBadge {
|
|
1470
1618
|
height: 16px;
|
|
1471
1619
|
|
|
1472
1620
|
border: 1px solid rgba(0, 0, 0, .1);
|
|
@@ -154,7 +154,7 @@ const _BMLayoutConstraintClasses = {BMLayoutConstraint, BMEqualAttributeLayoutCo
|
|
|
154
154
|
* A constraint is a linear equation that takes the form of
|
|
155
155
|
* ```js
|
|
156
156
|
view1.attribute1 = multiplier * view2.attribute2 + constant
|
|
157
|
-
```
|
|
157
|
+
```
|
|
158
158
|
* where the equals sign can be replaced with an inequality sign as needed.
|
|
159
159
|
* Note that despite looking like an assignment statement, the constraint expression is a mathematical equation and the layout
|
|
160
160
|
* system may choose to modify either side (or even both) of the equation to fulfill the constraint's requirements.
|