mlola-ui 1.1.13 → 1.1.14
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/package.json +1 -1
- package/registry/index.json +49 -49
- package/registry/source/packages/components/hover-card/hover-card.tsx +6 -3
- package/registry/source/packages/components/popover/popover.tsx +5 -4
- package/registry/source/packages/components/select/select.tsx +2 -0
- package/registry/source/packages/components/tooltip/tooltip.tsx +6 -3
- package/registry/source-manifest.json +4 -4
- package/src/knowledge.js +3 -1
package/package.json
CHANGED
package/registry/index.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "./schema/registry-index.schema.json",
|
|
3
3
|
"schemaVersion": 2,
|
|
4
4
|
"name": "mlola-ui",
|
|
5
|
-
"version": "1.1.
|
|
5
|
+
"version": "1.1.14",
|
|
6
6
|
"homepage": "https://ui.mlola.com",
|
|
7
7
|
"themeContract": {
|
|
8
8
|
"attribute": "data-theme",
|
|
@@ -177,8 +177,8 @@
|
|
|
177
177
|
},
|
|
178
178
|
"registryDependencies": [],
|
|
179
179
|
"engineDependencies": {
|
|
180
|
-
"@mlola-ui/behavior": "^1.1.
|
|
181
|
-
"@mlola-ui/icons": "^1.1.
|
|
180
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
181
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
182
182
|
},
|
|
183
183
|
"options": [
|
|
184
184
|
{
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
},
|
|
240
240
|
"registryDependencies": [],
|
|
241
241
|
"engineDependencies": {
|
|
242
|
-
"@mlola-ui/icons": "^1.1.
|
|
242
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
243
243
|
},
|
|
244
244
|
"options": [
|
|
245
245
|
{
|
|
@@ -401,7 +401,7 @@
|
|
|
401
401
|
},
|
|
402
402
|
"registryDependencies": [],
|
|
403
403
|
"engineDependencies": {
|
|
404
|
-
"@mlola-ui/icons": "^1.1.
|
|
404
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
405
405
|
},
|
|
406
406
|
"options": [
|
|
407
407
|
{
|
|
@@ -493,7 +493,7 @@
|
|
|
493
493
|
},
|
|
494
494
|
"registryDependencies": [],
|
|
495
495
|
"engineDependencies": {
|
|
496
|
-
"@mlola-ui/icons": "^1.1.
|
|
496
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
497
497
|
},
|
|
498
498
|
"options": [],
|
|
499
499
|
"variants": [],
|
|
@@ -546,7 +546,7 @@
|
|
|
546
546
|
"spinner"
|
|
547
547
|
],
|
|
548
548
|
"engineDependencies": {
|
|
549
|
-
"@mlola-ui/motion": "^1.1.
|
|
549
|
+
"@mlola-ui/motion": "^1.1.14"
|
|
550
550
|
},
|
|
551
551
|
"options": [
|
|
552
552
|
{
|
|
@@ -713,8 +713,8 @@
|
|
|
713
713
|
},
|
|
714
714
|
"registryDependencies": [],
|
|
715
715
|
"engineDependencies": {
|
|
716
|
-
"@mlola-ui/behavior": "^1.1.
|
|
717
|
-
"@mlola-ui/icons": "^1.1.
|
|
716
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
717
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
718
718
|
},
|
|
719
719
|
"options": [
|
|
720
720
|
{
|
|
@@ -782,7 +782,7 @@
|
|
|
782
782
|
},
|
|
783
783
|
"registryDependencies": [],
|
|
784
784
|
"engineDependencies": {
|
|
785
|
-
"@mlola-ui/icons": "^1.1.
|
|
785
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
786
786
|
},
|
|
787
787
|
"options": [],
|
|
788
788
|
"variants": [],
|
|
@@ -837,7 +837,7 @@
|
|
|
837
837
|
"modal"
|
|
838
838
|
],
|
|
839
839
|
"engineDependencies": {
|
|
840
|
-
"@mlola-ui/icons": "^1.1.
|
|
840
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
841
841
|
},
|
|
842
842
|
"options": [],
|
|
843
843
|
"variants": [],
|
|
@@ -900,8 +900,8 @@
|
|
|
900
900
|
},
|
|
901
901
|
"registryDependencies": [],
|
|
902
902
|
"engineDependencies": {
|
|
903
|
-
"@mlola-ui/behavior": "^1.1.
|
|
904
|
-
"@mlola-ui/icons": "^1.1.
|
|
903
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
904
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
905
905
|
},
|
|
906
906
|
"options": [
|
|
907
907
|
{
|
|
@@ -977,7 +977,7 @@
|
|
|
977
977
|
"input"
|
|
978
978
|
],
|
|
979
979
|
"engineDependencies": {
|
|
980
|
-
"@mlola-ui/icons": "^1.1.
|
|
980
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
981
981
|
},
|
|
982
982
|
"options": [],
|
|
983
983
|
"variants": [],
|
|
@@ -1201,8 +1201,8 @@
|
|
|
1201
1201
|
},
|
|
1202
1202
|
"registryDependencies": [],
|
|
1203
1203
|
"engineDependencies": {
|
|
1204
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1205
|
-
"@mlola-ui/icons": "^1.1.
|
|
1204
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
1205
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
1206
1206
|
},
|
|
1207
1207
|
"options": [
|
|
1208
1208
|
{
|
|
@@ -1352,7 +1352,7 @@
|
|
|
1352
1352
|
},
|
|
1353
1353
|
"registryDependencies": [],
|
|
1354
1354
|
"engineDependencies": {
|
|
1355
|
-
"@mlola-ui/icons": "^1.1.
|
|
1355
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
1356
1356
|
},
|
|
1357
1357
|
"options": [],
|
|
1358
1358
|
"variants": [],
|
|
@@ -1403,7 +1403,7 @@
|
|
|
1403
1403
|
},
|
|
1404
1404
|
"registryDependencies": [],
|
|
1405
1405
|
"engineDependencies": {
|
|
1406
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1406
|
+
"@mlola-ui/behavior": "^1.1.14"
|
|
1407
1407
|
},
|
|
1408
1408
|
"options": [
|
|
1409
1409
|
{
|
|
@@ -1453,7 +1453,7 @@
|
|
|
1453
1453
|
"path": "packages/components/popover/popover.tsx",
|
|
1454
1454
|
"target": "{{aliases.components}}/popover.tsx",
|
|
1455
1455
|
"type": "registry:ui",
|
|
1456
|
-
"integrity": "sha256-
|
|
1456
|
+
"integrity": "sha256-V4e+a/JdVJBj6j3CMWsREuhFW7ZuaNsa2LAl/BuWGxE="
|
|
1457
1457
|
}
|
|
1458
1458
|
],
|
|
1459
1459
|
"themeContract": {
|
|
@@ -1778,7 +1778,7 @@
|
|
|
1778
1778
|
},
|
|
1779
1779
|
"registryDependencies": [],
|
|
1780
1780
|
"engineDependencies": {
|
|
1781
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1781
|
+
"@mlola-ui/behavior": "^1.1.14"
|
|
1782
1782
|
},
|
|
1783
1783
|
"options": [],
|
|
1784
1784
|
"variants": [],
|
|
@@ -1831,8 +1831,8 @@
|
|
|
1831
1831
|
"input"
|
|
1832
1832
|
],
|
|
1833
1833
|
"engineDependencies": {
|
|
1834
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1835
|
-
"@mlola-ui/icons": "^1.1.
|
|
1834
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
1835
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
1836
1836
|
},
|
|
1837
1837
|
"options": [
|
|
1838
1838
|
{
|
|
@@ -1874,7 +1874,7 @@
|
|
|
1874
1874
|
"path": "packages/components/select/select.tsx",
|
|
1875
1875
|
"target": "{{aliases.components}}/select.tsx",
|
|
1876
1876
|
"type": "registry:ui",
|
|
1877
|
-
"integrity": "sha256-
|
|
1877
|
+
"integrity": "sha256-IInFSuCUOPVgNMdtEsnjpqwMeVYYk+4fx33K21z0xQE="
|
|
1878
1878
|
}
|
|
1879
1879
|
],
|
|
1880
1880
|
"themeContract": {
|
|
@@ -1909,8 +1909,8 @@
|
|
|
1909
1909
|
},
|
|
1910
1910
|
"registryDependencies": [],
|
|
1911
1911
|
"engineDependencies": {
|
|
1912
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1913
|
-
"@mlola-ui/icons": "^1.1.
|
|
1912
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
1913
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
1914
1914
|
},
|
|
1915
1915
|
"options": [
|
|
1916
1916
|
{
|
|
@@ -2056,7 +2056,7 @@
|
|
|
2056
2056
|
"input"
|
|
2057
2057
|
],
|
|
2058
2058
|
"engineDependencies": {
|
|
2059
|
-
"@mlola-ui/behavior": "^1.1.
|
|
2059
|
+
"@mlola-ui/behavior": "^1.1.14"
|
|
2060
2060
|
},
|
|
2061
2061
|
"options": [
|
|
2062
2062
|
{
|
|
@@ -2201,7 +2201,7 @@
|
|
|
2201
2201
|
},
|
|
2202
2202
|
"registryDependencies": [],
|
|
2203
2203
|
"engineDependencies": {
|
|
2204
|
-
"@mlola-ui/behavior": "^1.1.
|
|
2204
|
+
"@mlola-ui/behavior": "^1.1.14"
|
|
2205
2205
|
},
|
|
2206
2206
|
"options": [
|
|
2207
2207
|
{
|
|
@@ -2333,7 +2333,7 @@
|
|
|
2333
2333
|
},
|
|
2334
2334
|
"registryDependencies": [],
|
|
2335
2335
|
"engineDependencies": {
|
|
2336
|
-
"@mlola-ui/icons": "^1.1.
|
|
2336
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
2337
2337
|
},
|
|
2338
2338
|
"options": [
|
|
2339
2339
|
{
|
|
@@ -2419,7 +2419,7 @@
|
|
|
2419
2419
|
"spinner"
|
|
2420
2420
|
],
|
|
2421
2421
|
"engineDependencies": {
|
|
2422
|
-
"@mlola-ui/icons": "^1.1.
|
|
2422
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
2423
2423
|
},
|
|
2424
2424
|
"options": [
|
|
2425
2425
|
{
|
|
@@ -2562,7 +2562,7 @@
|
|
|
2562
2562
|
},
|
|
2563
2563
|
"registryDependencies": [],
|
|
2564
2564
|
"engineDependencies": {
|
|
2565
|
-
"@mlola-ui/behavior": "^1.1.
|
|
2565
|
+
"@mlola-ui/behavior": "^1.1.14"
|
|
2566
2566
|
},
|
|
2567
2567
|
"options": [
|
|
2568
2568
|
{
|
|
@@ -2596,7 +2596,7 @@
|
|
|
2596
2596
|
"path": "packages/components/tooltip/tooltip.tsx",
|
|
2597
2597
|
"target": "{{aliases.components}}/tooltip.tsx",
|
|
2598
2598
|
"type": "registry:ui",
|
|
2599
|
-
"integrity": "sha256-
|
|
2599
|
+
"integrity": "sha256-PYjLEr+GFmu8VrLua1d4yzk0plXYbjIKMAUlwfIn+1c="
|
|
2600
2600
|
}
|
|
2601
2601
|
],
|
|
2602
2602
|
"themeContract": {
|
|
@@ -2701,7 +2701,7 @@
|
|
|
2701
2701
|
},
|
|
2702
2702
|
"registryDependencies": [],
|
|
2703
2703
|
"engineDependencies": {
|
|
2704
|
-
"@mlola-ui/icons": "^1.1.
|
|
2704
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
2705
2705
|
},
|
|
2706
2706
|
"options": [
|
|
2707
2707
|
{
|
|
@@ -2773,7 +2773,7 @@
|
|
|
2773
2773
|
"popover"
|
|
2774
2774
|
],
|
|
2775
2775
|
"engineDependencies": {
|
|
2776
|
-
"@mlola-ui/icons": "^1.1.
|
|
2776
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
2777
2777
|
},
|
|
2778
2778
|
"options": [
|
|
2779
2779
|
{
|
|
@@ -2843,7 +2843,7 @@
|
|
|
2843
2843
|
"popover"
|
|
2844
2844
|
],
|
|
2845
2845
|
"engineDependencies": {
|
|
2846
|
-
"@mlola-ui/icons": "^1.1.
|
|
2846
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
2847
2847
|
},
|
|
2848
2848
|
"options": [],
|
|
2849
2849
|
"variants": [],
|
|
@@ -3041,7 +3041,7 @@
|
|
|
3041
3041
|
"input"
|
|
3042
3042
|
],
|
|
3043
3043
|
"engineDependencies": {
|
|
3044
|
-
"@mlola-ui/icons": "^1.1.
|
|
3044
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3045
3045
|
},
|
|
3046
3046
|
"options": [
|
|
3047
3047
|
{
|
|
@@ -3118,7 +3118,7 @@
|
|
|
3118
3118
|
"input"
|
|
3119
3119
|
],
|
|
3120
3120
|
"engineDependencies": {
|
|
3121
|
-
"@mlola-ui/icons": "^1.1.
|
|
3121
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3122
3122
|
},
|
|
3123
3123
|
"options": [],
|
|
3124
3124
|
"variants": [],
|
|
@@ -3173,7 +3173,7 @@
|
|
|
3173
3173
|
"input"
|
|
3174
3174
|
],
|
|
3175
3175
|
"engineDependencies": {
|
|
3176
|
-
"@mlola-ui/icons": "^1.1.
|
|
3176
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3177
3177
|
},
|
|
3178
3178
|
"options": [],
|
|
3179
3179
|
"variants": [],
|
|
@@ -3236,7 +3236,7 @@
|
|
|
3236
3236
|
"popover"
|
|
3237
3237
|
],
|
|
3238
3238
|
"engineDependencies": {
|
|
3239
|
-
"@mlola-ui/icons": "^1.1.
|
|
3239
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3240
3240
|
},
|
|
3241
3241
|
"options": [
|
|
3242
3242
|
{
|
|
@@ -3306,7 +3306,7 @@
|
|
|
3306
3306
|
},
|
|
3307
3307
|
"registryDependencies": [],
|
|
3308
3308
|
"engineDependencies": {
|
|
3309
|
-
"@mlola-ui/icons": "^1.1.
|
|
3309
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3310
3310
|
},
|
|
3311
3311
|
"options": [
|
|
3312
3312
|
{
|
|
@@ -3425,8 +3425,8 @@
|
|
|
3425
3425
|
},
|
|
3426
3426
|
"registryDependencies": [],
|
|
3427
3427
|
"engineDependencies": {
|
|
3428
|
-
"@mlola-ui/behavior": "^1.1.
|
|
3429
|
-
"@mlola-ui/icons": "^1.1.
|
|
3428
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
3429
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3430
3430
|
},
|
|
3431
3431
|
"options": [],
|
|
3432
3432
|
"variants": [],
|
|
@@ -3490,7 +3490,7 @@
|
|
|
3490
3490
|
},
|
|
3491
3491
|
"registryDependencies": [],
|
|
3492
3492
|
"engineDependencies": {
|
|
3493
|
-
"@mlola-ui/behavior": "^1.1.
|
|
3493
|
+
"@mlola-ui/behavior": "^1.1.14"
|
|
3494
3494
|
},
|
|
3495
3495
|
"options": [
|
|
3496
3496
|
{
|
|
@@ -3540,7 +3540,7 @@
|
|
|
3540
3540
|
"path": "packages/components/hover-card/hover-card.tsx",
|
|
3541
3541
|
"target": "{{aliases.components}}/hover-card.tsx",
|
|
3542
3542
|
"type": "registry:ui",
|
|
3543
|
-
"integrity": "sha256-
|
|
3543
|
+
"integrity": "sha256-xLBQc3vVIfQbnN85F34r9SHMGQf8FubSYfk7uP+IS2g="
|
|
3544
3544
|
}
|
|
3545
3545
|
],
|
|
3546
3546
|
"themeContract": {
|
|
@@ -3577,8 +3577,8 @@
|
|
|
3577
3577
|
},
|
|
3578
3578
|
"registryDependencies": [],
|
|
3579
3579
|
"engineDependencies": {
|
|
3580
|
-
"@mlola-ui/behavior": "^1.1.
|
|
3581
|
-
"@mlola-ui/icons": "^1.1.
|
|
3580
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
3581
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3582
3582
|
},
|
|
3583
3583
|
"options": [],
|
|
3584
3584
|
"variants": [],
|
|
@@ -3652,7 +3652,7 @@
|
|
|
3652
3652
|
"sheet"
|
|
3653
3653
|
],
|
|
3654
3654
|
"engineDependencies": {
|
|
3655
|
-
"@mlola-ui/icons": "^1.1.
|
|
3655
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3656
3656
|
},
|
|
3657
3657
|
"options": [],
|
|
3658
3658
|
"variants": [],
|
|
@@ -3775,7 +3775,7 @@
|
|
|
3775
3775
|
"button"
|
|
3776
3776
|
],
|
|
3777
3777
|
"engineDependencies": {
|
|
3778
|
-
"@mlola-ui/icons": "^1.1.
|
|
3778
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3779
3779
|
},
|
|
3780
3780
|
"options": [
|
|
3781
3781
|
{
|
|
@@ -3878,8 +3878,8 @@
|
|
|
3878
3878
|
"input"
|
|
3879
3879
|
],
|
|
3880
3880
|
"engineDependencies": {
|
|
3881
|
-
"@mlola-ui/behavior": "^1.1.
|
|
3882
|
-
"@mlola-ui/icons": "^1.1.
|
|
3881
|
+
"@mlola-ui/behavior": "^1.1.14",
|
|
3882
|
+
"@mlola-ui/icons": "^1.1.14"
|
|
3883
3883
|
},
|
|
3884
3884
|
"options": [
|
|
3885
3885
|
{
|
|
@@ -42,11 +42,14 @@ export function HoverCard({ children, content, side = "bottom", align = "start",
|
|
|
42
42
|
|
|
43
43
|
React.useEffect(() => {
|
|
44
44
|
if (!open) return;
|
|
45
|
+
// Heard before a dialog around it (capture), and marked as used, so one Escape closes one layer.
|
|
45
46
|
const onKey = (event: KeyboardEvent) => {
|
|
46
|
-
if (event.key
|
|
47
|
+
if (event.key !== "Escape" || event.defaultPrevented) return;
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
setOpen(false);
|
|
47
50
|
};
|
|
48
|
-
document.addEventListener("keydown", onKey);
|
|
49
|
-
return () => document.removeEventListener("keydown", onKey);
|
|
51
|
+
document.addEventListener("keydown", onKey, true);
|
|
52
|
+
return () => document.removeEventListener("keydown", onKey, true);
|
|
50
53
|
}, [open]);
|
|
51
54
|
|
|
52
55
|
const child = children.props as Record<string, unknown> & { ref?: React.Ref<HTMLElement> };
|
|
@@ -52,18 +52,19 @@ export function Popover({ trigger, children, label, side = "bottom", align = "st
|
|
|
52
52
|
const target = event.target as Node;
|
|
53
53
|
if (!layer.current?.contains(target) && !anchor.current?.contains(target)) close(false);
|
|
54
54
|
};
|
|
55
|
+
// Heard before a dialog around it (capture), and marked as used, so one Escape closes one layer.
|
|
55
56
|
const onKeyDown = (event: KeyboardEvent) => {
|
|
56
|
-
if (event.key === "Escape") {
|
|
57
|
-
event.
|
|
57
|
+
if (event.key === "Escape" && !event.defaultPrevented) {
|
|
58
|
+
event.preventDefault();
|
|
58
59
|
close(true);
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
document.addEventListener("pointerdown", onPointerDown);
|
|
62
|
-
document.addEventListener("keydown", onKeyDown);
|
|
63
|
+
document.addEventListener("keydown", onKeyDown, true);
|
|
63
64
|
return () => {
|
|
64
65
|
cancelAnimationFrame(frame);
|
|
65
66
|
document.removeEventListener("pointerdown", onPointerDown);
|
|
66
|
-
document.removeEventListener("keydown", onKeyDown);
|
|
67
|
+
document.removeEventListener("keydown", onKeyDown, true);
|
|
67
68
|
};
|
|
68
69
|
}, [isOpen, portal, close]);
|
|
69
70
|
|
|
@@ -190,6 +190,8 @@ export const Select = React.forwardRef<HTMLButtonElement, SelectProps>(function
|
|
|
190
190
|
const onKeyDown = (event: React.KeyboardEvent) => {
|
|
191
191
|
if (disabled) return;
|
|
192
192
|
if (event.key === "Escape") {
|
|
193
|
+
// Closed, the Escape belongs to whatever holds the select, such as a dialog.
|
|
194
|
+
if (!open) return;
|
|
193
195
|
event.preventDefault();
|
|
194
196
|
close(true);
|
|
195
197
|
} else if (event.key === "Tab") {
|
|
@@ -48,11 +48,14 @@ function Tooltip({ content, placement = "top", delay = 200, children, className
|
|
|
48
48
|
}, [open, placement]);
|
|
49
49
|
React.useEffect(() => {
|
|
50
50
|
if (!open) return;
|
|
51
|
+
// Heard before a dialog around it (capture), and marked as used, so one Escape closes one layer.
|
|
51
52
|
const onKeyDown = (event: KeyboardEvent) => {
|
|
52
|
-
if (event.key
|
|
53
|
+
if (event.key !== "Escape" || event.defaultPrevented) return;
|
|
54
|
+
event.preventDefault();
|
|
55
|
+
hideRef.current();
|
|
53
56
|
};
|
|
54
|
-
document.addEventListener("keydown", onKeyDown);
|
|
55
|
-
return () => document.removeEventListener("keydown", onKeyDown);
|
|
57
|
+
document.addEventListener("keydown", onKeyDown, true);
|
|
58
|
+
return () => document.removeEventListener("keydown", onKeyDown, true);
|
|
56
59
|
}, [open, hideRef]);
|
|
57
60
|
type Handlers = {
|
|
58
61
|
onMouseEnter?: React.MouseEventHandler;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"packages/components/dropdown-menu/dropdown-menu.tsx": "sha256-/LLytsatKd5giWMlpsZI2uUvh88pHi8qGQalNd7/wQA=",
|
|
33
33
|
"packages/components/dropzone/dropzone.tsx": "sha256-tHCCpEWE6839UeLOszTo+R2vAL4Sp9UxuRdLkFLfnq4=",
|
|
34
34
|
"packages/components/empty-state/empty-state.tsx": "sha256-/phk3A6TDaiqo61fCcAc/4Bi85e1yBGAtKXFaGhrjyw=",
|
|
35
|
-
"packages/components/hover-card/hover-card.tsx": "sha256-
|
|
35
|
+
"packages/components/hover-card/hover-card.tsx": "sha256-xLBQc3vVIfQbnN85F34r9SHMGQf8FubSYfk7uP+IS2g=",
|
|
36
36
|
"packages/components/input/input.tsx": "sha256-K0YrpEsEJZTzw64t+Cyg/OGYwlU6LU1/yXTNUxYUIAI=",
|
|
37
37
|
"packages/components/kbd/kbd.tsx": "sha256-e8EO2Gw6JiUyrU0YcEZOaQNMel1pe/EcJrxwwgd1Ggk=",
|
|
38
38
|
"packages/components/modal/modal.tsx": "sha256-gqrMncs7lEgUjsWXXEl5FYIUoYAxj93gcVh1pZTuatQ=",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"packages/components/otp-input/otp-input.tsx": "sha256-0KeyDLCC27/GqOocMWXggJ255PCEpCOCcINAcabksSk=",
|
|
42
42
|
"packages/components/pagination/pagination.tsx": "sha256-FBwk8tq4JcsK2D0dlWEYiDSRx3owgBmGzEIlVRaNBoE=",
|
|
43
43
|
"packages/components/password-input/password-input.tsx": "sha256-oY//vTILhUicJyfAWZrSUTl8WWsf4P2S1Bh0x4OxwLs=",
|
|
44
|
-
"packages/components/popover/popover.tsx": "sha256-
|
|
44
|
+
"packages/components/popover/popover.tsx": "sha256-V4e+a/JdVJBj6j3CMWsREuhFW7ZuaNsa2LAl/BuWGxE=",
|
|
45
45
|
"packages/components/priority-icon/labels.ts": "sha256-zhmJIb7/gS16wU+xCJ7hkReBi9q5RI3SMwdjkJvvvKU=",
|
|
46
46
|
"packages/components/priority-icon/priority-icon.tsx": "sha256-3D6hFRpht3YuWouLhakE2DFdldavmJx0B/povEDwrtQ=",
|
|
47
47
|
"packages/components/progress/progress.tsx": "sha256-oDxj1Ccl1pKV4+e6A7aaJL1FThW8qs9r4Gb0hEmExeM=",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"packages/components/rating/rating.tsx": "sha256-zgPOQXzAiRE4qGNPQ8qat3SP1XSI/7567kA5VaT51P0=",
|
|
50
50
|
"packages/components/resizable/resizable.tsx": "sha256-RFBpg/a2O82mmx+O5wT+um+y3y2w0rUMJJdBzRu9ONU=",
|
|
51
51
|
"packages/components/segmented-control/segmented-control.tsx": "sha256-MCBG5XHFWCwbACctsYKbqe8mvSSR6pf60tyRgdCDKDA=",
|
|
52
|
-
"packages/components/select/select.tsx": "sha256-
|
|
52
|
+
"packages/components/select/select.tsx": "sha256-IInFSuCUOPVgNMdtEsnjpqwMeVYYk+4fx33K21z0xQE=",
|
|
53
53
|
"packages/components/sheet/sheet.tsx": "sha256-gmc8rZ87NHfN/bErEWHm6HlaAoeNT/Fw6y2PrW88WFI=",
|
|
54
54
|
"packages/components/skeleton/skeleton.tsx": "sha256-2Fk72NbLr3+CrXH7jGbHNsc3t+vskMqSyySe/UwbGCs=",
|
|
55
55
|
"packages/components/slider/slider.tsx": "sha256-o37Xi4J8+d/fhWFf2LdpPluuKDVXECNl4quKTlrqCU4=",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"packages/components/timeline/timeline.tsx": "sha256-nVg7lBcAUAzqEb0YrHagJXSaHE2aWWE9bUbQMWQY6PU=",
|
|
67
67
|
"packages/components/toast/toast.tsx": "sha256-f0DwN0XuV46fSsQf3i9RJcfQbAs2mSz7A8UJoIIICHg=",
|
|
68
68
|
"packages/components/toggle/toggle.tsx": "sha256-8qPHeSliHNdzQS7OLJ47BrvRR75MYyUGJlK4s21XS/U=",
|
|
69
|
-
"packages/components/tooltip/tooltip.tsx": "sha256-
|
|
69
|
+
"packages/components/tooltip/tooltip.tsx": "sha256-PYjLEr+GFmu8VrLua1d4yzk0plXYbjIKMAUlwfIn+1c=",
|
|
70
70
|
"packages/components/tour/tour.tsx": "sha256-b2XJokzSio2N9MFDbAbXn6w2f7diJb1KWedSCycRMmE=",
|
|
71
71
|
"packages/components/virtual-list/virtual-list.tsx": "sha256-oA8xFCwUgskmM+symA4gZxFqSyBCpeKfyM5zHyJaYaQ=",
|
|
72
72
|
"packages/components/virtual-list/virtual.ts": "sha256-PyDIj3C2Vwb1i4ZssxSlYjgKmZPBIFLZFNq8YCW2Z78="
|
package/src/knowledge.js
CHANGED
|
@@ -339,7 +339,9 @@ export function checkMarkup(markup) {
|
|
|
339
339
|
// Faded text: its contrast now depends on the theme behind it.
|
|
340
340
|
// opacity: 0 hides; only a value between 0 and 1 fades what is still read.
|
|
341
341
|
const opacity = /(?:^|;)\s*opacity\s*:\s*(0?\.\d+)\s*(?:;|$)/.exec(body);
|
|
342
|
-
|
|
342
|
+
// A shape (an SVG area, line or mark, painted with fill or stroke) holds no text to fade.
|
|
343
|
+
const shape = /(?:^|;)\s*(?:fill|stroke)\s*:/.test(body) || /\b(?:path|rect|circle|ellipse|line|polyline|polygon|svg)\b/.test(selector);
|
|
344
|
+
if (opacity && Number(opacity[1]) > 0 && !shape && !/disabled|:empty|::?placeholder|\[hidden\]|inert/.test(selector)) {
|
|
343
345
|
note("warning", where, `opacity: ${opacity[1]} fades whatever text is inside, and how far it falls below the contrast floor depends on the theme and the fill behind it.`, "For quieter text use color: var(--ml-text-muted); on a filled control, its -foreground role. Keep opacity for disabled or decorative parts.");
|
|
344
346
|
}
|
|
345
347
|
}
|