mlola-ui 1.1.15 → 1.1.19
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/agents.md +1 -0
- package/registry/contract.json +3 -0
- package/registry/examples.json +8 -0
- package/registry/index.json +83 -59
- package/registry/source/packages/components/dropdown-menu/dropdown-menu.tsx +10 -3
- package/registry/source/packages/components/toast/toast.tsx +17 -5
- package/registry/source-manifest.json +2 -2
package/package.json
CHANGED
package/registry/agents.md
CHANGED
|
@@ -204,6 +204,7 @@ correct. This table is read out of the stylesheet, so it is never stale.
|
|
|
204
204
|
| `.ml-dropdown-menu` | `data-align` | `end` |
|
|
205
205
|
| `.ml-dropdown-menu` | `data-side` | `top` |
|
|
206
206
|
| `.ml-dropdown-trigger` | `aria-expanded` | `true` |
|
|
207
|
+
| `.ml-dropdown-trigger` | `data-variant` | `icon` |
|
|
207
208
|
| `.ml-dropzone` | `aria-disabled` | _presence only_ |
|
|
208
209
|
| `.ml-dropzone` | `data-dragging` | _presence only_ |
|
|
209
210
|
| `.ml-dropzone-file` | `data-status` | `error` |
|
package/registry/contract.json
CHANGED
package/registry/examples.json
CHANGED
|
@@ -682,6 +682,9 @@
|
|
|
682
682
|
"attributes": {
|
|
683
683
|
"aria-expanded": [
|
|
684
684
|
"true"
|
|
685
|
+
],
|
|
686
|
+
"data-variant": [
|
|
687
|
+
"icon"
|
|
685
688
|
]
|
|
686
689
|
}
|
|
687
690
|
},
|
|
@@ -741,6 +744,11 @@
|
|
|
741
744
|
"data-state": [
|
|
742
745
|
"closed"
|
|
743
746
|
]
|
|
747
|
+
},
|
|
748
|
+
"ml-dropdown-trigger": {
|
|
749
|
+
"data-variant": [
|
|
750
|
+
"icon"
|
|
751
|
+
]
|
|
744
752
|
}
|
|
745
753
|
},
|
|
746
754
|
"gallery": [
|
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.19",
|
|
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.19",
|
|
181
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
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.19"
|
|
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.19"
|
|
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.19"
|
|
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.19"
|
|
550
550
|
},
|
|
551
551
|
"options": [
|
|
552
552
|
{
|
|
@@ -580,7 +580,8 @@
|
|
|
580
580
|
"auto",
|
|
581
581
|
"full"
|
|
582
582
|
],
|
|
583
|
-
"default": "auto"
|
|
583
|
+
"default": "auto",
|
|
584
|
+
"description": "\"full\" fills the container's width, as on a phone form; \"auto\" (the default) fits the label."
|
|
584
585
|
}
|
|
585
586
|
],
|
|
586
587
|
"variants": [
|
|
@@ -713,8 +714,8 @@
|
|
|
713
714
|
},
|
|
714
715
|
"registryDependencies": [],
|
|
715
716
|
"engineDependencies": {
|
|
716
|
-
"@mlola-ui/behavior": "^1.1.
|
|
717
|
-
"@mlola-ui/icons": "^1.1.
|
|
717
|
+
"@mlola-ui/behavior": "^1.1.19",
|
|
718
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
718
719
|
},
|
|
719
720
|
"options": [
|
|
720
721
|
{
|
|
@@ -725,7 +726,8 @@
|
|
|
725
726
|
"counter",
|
|
726
727
|
"none"
|
|
727
728
|
],
|
|
728
|
-
"default": "dots"
|
|
729
|
+
"default": "dots",
|
|
730
|
+
"description": "Dots under the slides, a counter, or nothing."
|
|
729
731
|
}
|
|
730
732
|
],
|
|
731
733
|
"variants": [],
|
|
@@ -782,7 +784,7 @@
|
|
|
782
784
|
},
|
|
783
785
|
"registryDependencies": [],
|
|
784
786
|
"engineDependencies": {
|
|
785
|
-
"@mlola-ui/icons": "^1.1.
|
|
787
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
786
788
|
},
|
|
787
789
|
"options": [],
|
|
788
790
|
"variants": [],
|
|
@@ -837,7 +839,7 @@
|
|
|
837
839
|
"modal"
|
|
838
840
|
],
|
|
839
841
|
"engineDependencies": {
|
|
840
|
-
"@mlola-ui/icons": "^1.1.
|
|
842
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
841
843
|
},
|
|
842
844
|
"options": [],
|
|
843
845
|
"variants": [],
|
|
@@ -901,8 +903,8 @@
|
|
|
901
903
|
},
|
|
902
904
|
"registryDependencies": [],
|
|
903
905
|
"engineDependencies": {
|
|
904
|
-
"@mlola-ui/behavior": "^1.1.
|
|
905
|
-
"@mlola-ui/icons": "^1.1.
|
|
906
|
+
"@mlola-ui/behavior": "^1.1.19",
|
|
907
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
906
908
|
},
|
|
907
909
|
"options": [
|
|
908
910
|
{
|
|
@@ -913,9 +915,22 @@
|
|
|
913
915
|
"end"
|
|
914
916
|
],
|
|
915
917
|
"default": "start"
|
|
918
|
+
},
|
|
919
|
+
{
|
|
920
|
+
"component": "DropdownMenu",
|
|
921
|
+
"prop": "variant",
|
|
922
|
+
"values": [
|
|
923
|
+
"button",
|
|
924
|
+
"icon"
|
|
925
|
+
],
|
|
926
|
+
"default": "button",
|
|
927
|
+
"description": "`button` shows the trigger with a chevron; `icon` is a small icon-only trigger, such as a card's or a column's \"…\" menu."
|
|
916
928
|
}
|
|
917
929
|
],
|
|
918
|
-
"variants": [
|
|
930
|
+
"variants": [
|
|
931
|
+
"button",
|
|
932
|
+
"icon"
|
|
933
|
+
],
|
|
919
934
|
"sizes": [],
|
|
920
935
|
"files": [
|
|
921
936
|
{
|
|
@@ -940,7 +955,7 @@
|
|
|
940
955
|
"path": "packages/components/dropdown-menu/dropdown-menu.tsx",
|
|
941
956
|
"target": "{{aliases.components}}/dropdown-menu.tsx",
|
|
942
957
|
"type": "registry:ui",
|
|
943
|
-
"integrity": "sha256
|
|
958
|
+
"integrity": "sha256-TSAsDWcx8mVwLdZVEaCrO0Fkeuiaui7Jw/BbZQmJH1Y="
|
|
944
959
|
}
|
|
945
960
|
],
|
|
946
961
|
"themeContract": {
|
|
@@ -978,7 +993,7 @@
|
|
|
978
993
|
"input"
|
|
979
994
|
],
|
|
980
995
|
"engineDependencies": {
|
|
981
|
-
"@mlola-ui/icons": "^1.1.
|
|
996
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
982
997
|
},
|
|
983
998
|
"options": [],
|
|
984
999
|
"variants": [],
|
|
@@ -1030,7 +1045,8 @@
|
|
|
1030
1045
|
"inline",
|
|
1031
1046
|
"page"
|
|
1032
1047
|
],
|
|
1033
|
-
"default": "inline"
|
|
1048
|
+
"default": "inline",
|
|
1049
|
+
"description": "\"page\" centers in a large area; \"inline\" sits inside a card or table."
|
|
1034
1050
|
}
|
|
1035
1051
|
],
|
|
1036
1052
|
"variants": [],
|
|
@@ -1202,8 +1218,8 @@
|
|
|
1202
1218
|
},
|
|
1203
1219
|
"registryDependencies": [],
|
|
1204
1220
|
"engineDependencies": {
|
|
1205
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1206
|
-
"@mlola-ui/icons": "^1.1.
|
|
1221
|
+
"@mlola-ui/behavior": "^1.1.19",
|
|
1222
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
1207
1223
|
},
|
|
1208
1224
|
"options": [
|
|
1209
1225
|
{
|
|
@@ -1302,7 +1318,8 @@
|
|
|
1302
1318
|
"numeric",
|
|
1303
1319
|
"alphanumeric"
|
|
1304
1320
|
],
|
|
1305
|
-
"default": "numeric"
|
|
1321
|
+
"default": "numeric",
|
|
1322
|
+
"description": "\"numeric\" (default) or \"alphanumeric\"."
|
|
1306
1323
|
}
|
|
1307
1324
|
],
|
|
1308
1325
|
"variants": [],
|
|
@@ -1353,7 +1370,7 @@
|
|
|
1353
1370
|
},
|
|
1354
1371
|
"registryDependencies": [],
|
|
1355
1372
|
"engineDependencies": {
|
|
1356
|
-
"@mlola-ui/icons": "^1.1.
|
|
1373
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
1357
1374
|
},
|
|
1358
1375
|
"options": [],
|
|
1359
1376
|
"variants": [],
|
|
@@ -1404,7 +1421,7 @@
|
|
|
1404
1421
|
},
|
|
1405
1422
|
"registryDependencies": [],
|
|
1406
1423
|
"engineDependencies": {
|
|
1407
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1424
|
+
"@mlola-ui/behavior": "^1.1.19"
|
|
1408
1425
|
},
|
|
1409
1426
|
"options": [
|
|
1410
1427
|
{
|
|
@@ -1709,7 +1726,8 @@
|
|
|
1709
1726
|
"first",
|
|
1710
1727
|
"second"
|
|
1711
1728
|
],
|
|
1712
|
-
"default": "first"
|
|
1729
|
+
"default": "first",
|
|
1730
|
+
"description": "Which pane holds the size; the other takes the rest. A right-hand inspector anchors \"second\"."
|
|
1713
1731
|
},
|
|
1714
1732
|
{
|
|
1715
1733
|
"component": "Resizable",
|
|
@@ -1718,7 +1736,8 @@
|
|
|
1718
1736
|
"horizontal",
|
|
1719
1737
|
"vertical"
|
|
1720
1738
|
],
|
|
1721
|
-
"default": "horizontal"
|
|
1739
|
+
"default": "horizontal",
|
|
1740
|
+
"description": "\"horizontal\" puts the panes side by side."
|
|
1722
1741
|
},
|
|
1723
1742
|
{
|
|
1724
1743
|
"component": "Resizable",
|
|
@@ -1727,7 +1746,8 @@
|
|
|
1727
1746
|
"percent",
|
|
1728
1747
|
"pixels"
|
|
1729
1748
|
],
|
|
1730
|
-
"default": "percent"
|
|
1749
|
+
"default": "percent",
|
|
1750
|
+
"description": "\"percent\" of the whole, or \"pixels\" for panes that should keep their width as the window grows."
|
|
1731
1751
|
}
|
|
1732
1752
|
],
|
|
1733
1753
|
"variants": [],
|
|
@@ -1779,7 +1799,7 @@
|
|
|
1779
1799
|
},
|
|
1780
1800
|
"registryDependencies": [],
|
|
1781
1801
|
"engineDependencies": {
|
|
1782
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1802
|
+
"@mlola-ui/behavior": "^1.1.19"
|
|
1783
1803
|
},
|
|
1784
1804
|
"options": [],
|
|
1785
1805
|
"variants": [],
|
|
@@ -1832,8 +1852,8 @@
|
|
|
1832
1852
|
"input"
|
|
1833
1853
|
],
|
|
1834
1854
|
"engineDependencies": {
|
|
1835
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1836
|
-
"@mlola-ui/icons": "^1.1.
|
|
1855
|
+
"@mlola-ui/behavior": "^1.1.19",
|
|
1856
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
1837
1857
|
},
|
|
1838
1858
|
"options": [
|
|
1839
1859
|
{
|
|
@@ -1911,8 +1931,8 @@
|
|
|
1911
1931
|
},
|
|
1912
1932
|
"registryDependencies": [],
|
|
1913
1933
|
"engineDependencies": {
|
|
1914
|
-
"@mlola-ui/behavior": "^1.1.
|
|
1915
|
-
"@mlola-ui/icons": "^1.1.
|
|
1934
|
+
"@mlola-ui/behavior": "^1.1.19",
|
|
1935
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
1916
1936
|
},
|
|
1917
1937
|
"options": [
|
|
1918
1938
|
{
|
|
@@ -2058,7 +2078,7 @@
|
|
|
2058
2078
|
"input"
|
|
2059
2079
|
],
|
|
2060
2080
|
"engineDependencies": {
|
|
2061
|
-
"@mlola-ui/behavior": "^1.1.
|
|
2081
|
+
"@mlola-ui/behavior": "^1.1.19"
|
|
2062
2082
|
},
|
|
2063
2083
|
"options": [
|
|
2064
2084
|
{
|
|
@@ -2203,7 +2223,7 @@
|
|
|
2203
2223
|
},
|
|
2204
2224
|
"registryDependencies": [],
|
|
2205
2225
|
"engineDependencies": {
|
|
2206
|
-
"@mlola-ui/behavior": "^1.1.
|
|
2226
|
+
"@mlola-ui/behavior": "^1.1.19"
|
|
2207
2227
|
},
|
|
2208
2228
|
"options": [
|
|
2209
2229
|
{
|
|
@@ -2335,7 +2355,7 @@
|
|
|
2335
2355
|
},
|
|
2336
2356
|
"registryDependencies": [],
|
|
2337
2357
|
"engineDependencies": {
|
|
2338
|
-
"@mlola-ui/icons": "^1.1.
|
|
2358
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
2339
2359
|
},
|
|
2340
2360
|
"options": [
|
|
2341
2361
|
{
|
|
@@ -2346,7 +2366,8 @@
|
|
|
2346
2366
|
"current",
|
|
2347
2367
|
"upcoming"
|
|
2348
2368
|
],
|
|
2349
|
-
"default": "upcoming"
|
|
2369
|
+
"default": "upcoming",
|
|
2370
|
+
"description": "Progress through a sequence: done, happening now, or still to come."
|
|
2350
2371
|
},
|
|
2351
2372
|
{
|
|
2352
2373
|
"component": "TimelineItem",
|
|
@@ -2358,7 +2379,8 @@
|
|
|
2358
2379
|
"success",
|
|
2359
2380
|
"warning",
|
|
2360
2381
|
"danger"
|
|
2361
|
-
]
|
|
2382
|
+
],
|
|
2383
|
+
"description": "Colors an event marker, for activity feeds: a failed deploy, a merged change."
|
|
2362
2384
|
},
|
|
2363
2385
|
{
|
|
2364
2386
|
"component": "TimelineDot",
|
|
@@ -2421,7 +2443,7 @@
|
|
|
2421
2443
|
"spinner"
|
|
2422
2444
|
],
|
|
2423
2445
|
"engineDependencies": {
|
|
2424
|
-
"@mlola-ui/icons": "^1.1.
|
|
2446
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
2425
2447
|
},
|
|
2426
2448
|
"options": [
|
|
2427
2449
|
{
|
|
@@ -2449,7 +2471,7 @@
|
|
|
2449
2471
|
"path": "packages/components/toast/toast.tsx",
|
|
2450
2472
|
"target": "{{aliases.components}}/toast.tsx",
|
|
2451
2473
|
"type": "registry:ui",
|
|
2452
|
-
"integrity": "sha256-
|
|
2474
|
+
"integrity": "sha256-6hKQ8wLN6uTnfVebpEeuvAxqAXDppWdjzGi33wtW8Y4="
|
|
2453
2475
|
}
|
|
2454
2476
|
],
|
|
2455
2477
|
"themeContract": {
|
|
@@ -2564,7 +2586,7 @@
|
|
|
2564
2586
|
},
|
|
2565
2587
|
"registryDependencies": [],
|
|
2566
2588
|
"engineDependencies": {
|
|
2567
|
-
"@mlola-ui/behavior": "^1.1.
|
|
2589
|
+
"@mlola-ui/behavior": "^1.1.19"
|
|
2568
2590
|
},
|
|
2569
2591
|
"options": [
|
|
2570
2592
|
{
|
|
@@ -2703,7 +2725,7 @@
|
|
|
2703
2725
|
},
|
|
2704
2726
|
"registryDependencies": [],
|
|
2705
2727
|
"engineDependencies": {
|
|
2706
|
-
"@mlola-ui/icons": "^1.1.
|
|
2728
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
2707
2729
|
},
|
|
2708
2730
|
"options": [
|
|
2709
2731
|
{
|
|
@@ -2775,7 +2797,7 @@
|
|
|
2775
2797
|
"popover"
|
|
2776
2798
|
],
|
|
2777
2799
|
"engineDependencies": {
|
|
2778
|
-
"@mlola-ui/icons": "^1.1.
|
|
2800
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
2779
2801
|
},
|
|
2780
2802
|
"options": [
|
|
2781
2803
|
{
|
|
@@ -2845,7 +2867,7 @@
|
|
|
2845
2867
|
"popover"
|
|
2846
2868
|
],
|
|
2847
2869
|
"engineDependencies": {
|
|
2848
|
-
"@mlola-ui/icons": "^1.1.
|
|
2870
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
2849
2871
|
},
|
|
2850
2872
|
"options": [],
|
|
2851
2873
|
"variants": [],
|
|
@@ -3043,7 +3065,7 @@
|
|
|
3043
3065
|
"input"
|
|
3044
3066
|
],
|
|
3045
3067
|
"engineDependencies": {
|
|
3046
|
-
"@mlola-ui/icons": "^1.1.
|
|
3068
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3047
3069
|
},
|
|
3048
3070
|
"options": [
|
|
3049
3071
|
{
|
|
@@ -3120,7 +3142,7 @@
|
|
|
3120
3142
|
"input"
|
|
3121
3143
|
],
|
|
3122
3144
|
"engineDependencies": {
|
|
3123
|
-
"@mlola-ui/icons": "^1.1.
|
|
3145
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3124
3146
|
},
|
|
3125
3147
|
"options": [],
|
|
3126
3148
|
"variants": [],
|
|
@@ -3175,7 +3197,7 @@
|
|
|
3175
3197
|
"input"
|
|
3176
3198
|
],
|
|
3177
3199
|
"engineDependencies": {
|
|
3178
|
-
"@mlola-ui/icons": "^1.1.
|
|
3200
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3179
3201
|
},
|
|
3180
3202
|
"options": [],
|
|
3181
3203
|
"variants": [],
|
|
@@ -3238,7 +3260,7 @@
|
|
|
3238
3260
|
"popover"
|
|
3239
3261
|
],
|
|
3240
3262
|
"engineDependencies": {
|
|
3241
|
-
"@mlola-ui/icons": "^1.1.
|
|
3263
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3242
3264
|
},
|
|
3243
3265
|
"options": [
|
|
3244
3266
|
{
|
|
@@ -3249,7 +3271,8 @@
|
|
|
3249
3271
|
"rgb",
|
|
3250
3272
|
"oklch"
|
|
3251
3273
|
],
|
|
3252
|
-
"default": "hex"
|
|
3274
|
+
"default": "hex",
|
|
3275
|
+
"description": "The format the value comes back in."
|
|
3253
3276
|
}
|
|
3254
3277
|
],
|
|
3255
3278
|
"variants": [],
|
|
@@ -3308,7 +3331,7 @@
|
|
|
3308
3331
|
},
|
|
3309
3332
|
"registryDependencies": [],
|
|
3310
3333
|
"engineDependencies": {
|
|
3311
|
-
"@mlola-ui/icons": "^1.1.
|
|
3334
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3312
3335
|
},
|
|
3313
3336
|
"options": [
|
|
3314
3337
|
{
|
|
@@ -3427,8 +3450,8 @@
|
|
|
3427
3450
|
},
|
|
3428
3451
|
"registryDependencies": [],
|
|
3429
3452
|
"engineDependencies": {
|
|
3430
|
-
"@mlola-ui/behavior": "^1.1.
|
|
3431
|
-
"@mlola-ui/icons": "^1.1.
|
|
3453
|
+
"@mlola-ui/behavior": "^1.1.19",
|
|
3454
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3432
3455
|
},
|
|
3433
3456
|
"options": [],
|
|
3434
3457
|
"variants": [],
|
|
@@ -3492,7 +3515,7 @@
|
|
|
3492
3515
|
},
|
|
3493
3516
|
"registryDependencies": [],
|
|
3494
3517
|
"engineDependencies": {
|
|
3495
|
-
"@mlola-ui/behavior": "^1.1.
|
|
3518
|
+
"@mlola-ui/behavior": "^1.1.19"
|
|
3496
3519
|
},
|
|
3497
3520
|
"options": [
|
|
3498
3521
|
{
|
|
@@ -3579,8 +3602,8 @@
|
|
|
3579
3602
|
},
|
|
3580
3603
|
"registryDependencies": [],
|
|
3581
3604
|
"engineDependencies": {
|
|
3582
|
-
"@mlola-ui/behavior": "^1.1.
|
|
3583
|
-
"@mlola-ui/icons": "^1.1.
|
|
3605
|
+
"@mlola-ui/behavior": "^1.1.19",
|
|
3606
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3584
3607
|
},
|
|
3585
3608
|
"options": [],
|
|
3586
3609
|
"variants": [],
|
|
@@ -3654,7 +3677,7 @@
|
|
|
3654
3677
|
"sheet"
|
|
3655
3678
|
],
|
|
3656
3679
|
"engineDependencies": {
|
|
3657
|
-
"@mlola-ui/icons": "^1.1.
|
|
3680
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3658
3681
|
},
|
|
3659
3682
|
"options": [],
|
|
3660
3683
|
"variants": [],
|
|
@@ -3777,7 +3800,7 @@
|
|
|
3777
3800
|
"button"
|
|
3778
3801
|
],
|
|
3779
3802
|
"engineDependencies": {
|
|
3780
|
-
"@mlola-ui/icons": "^1.1.
|
|
3803
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3781
3804
|
},
|
|
3782
3805
|
"options": [
|
|
3783
3806
|
{
|
|
@@ -3809,7 +3832,8 @@
|
|
|
3809
3832
|
"values": [
|
|
3810
3833
|
"auto",
|
|
3811
3834
|
"full"
|
|
3812
|
-
]
|
|
3835
|
+
],
|
|
3836
|
+
"description": "\"full\" fills the container's width, as on a phone form; \"auto\" (the default) fits the label."
|
|
3813
3837
|
}
|
|
3814
3838
|
],
|
|
3815
3839
|
"variants": [
|
|
@@ -3880,8 +3904,8 @@
|
|
|
3880
3904
|
"input"
|
|
3881
3905
|
],
|
|
3882
3906
|
"engineDependencies": {
|
|
3883
|
-
"@mlola-ui/behavior": "^1.1.
|
|
3884
|
-
"@mlola-ui/icons": "^1.1.
|
|
3907
|
+
"@mlola-ui/behavior": "^1.1.19",
|
|
3908
|
+
"@mlola-ui/icons": "^1.1.19"
|
|
3885
3909
|
},
|
|
3886
3910
|
"options": [
|
|
3887
3911
|
{
|
|
@@ -19,14 +19,17 @@ interface DropdownMenuItem {
|
|
|
19
19
|
interface DropdownMenuProps {
|
|
20
20
|
trigger: React.ReactNode;
|
|
21
21
|
items: DropdownMenuItem[];
|
|
22
|
+
/** Names the menu; with `variant="icon"` it also names and titles the trigger. */
|
|
22
23
|
label?: string;
|
|
24
|
+
/** `button` shows the trigger with a chevron; `icon` is a small icon-only trigger, such as a card's or a column's "…" menu. */
|
|
25
|
+
variant?: "button" | "icon";
|
|
23
26
|
align?: "start" | "end";
|
|
24
27
|
onSelect?: (label: string) => void;
|
|
25
28
|
className?: string;
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
const DropdownMenu = React.forwardRef<HTMLDivElement, DropdownMenuProps>(
|
|
29
|
-
({ trigger, items, label = "Menu", align = "start", onSelect, className }, ref) => {
|
|
32
|
+
({ trigger, items, label = "Menu", variant = "button", align = "start", onSelect, className }, ref) => {
|
|
30
33
|
const [open, setOpen] = React.useState(false);
|
|
31
34
|
const [activeIndex, setActiveIndex] = React.useState(-1);
|
|
32
35
|
const rootRef = React.useRef<HTMLDivElement>(null);
|
|
@@ -89,6 +92,10 @@ const DropdownMenu = React.forwardRef<HTMLDivElement, DropdownMenuProps>(
|
|
|
89
92
|
type="button"
|
|
90
93
|
aria-haspopup="menu"
|
|
91
94
|
aria-expanded={open}
|
|
95
|
+
aria-label={variant === "icon" ? label : undefined}
|
|
96
|
+
title={variant === "icon" ? label : undefined}
|
|
97
|
+
data-variant={variant === "icon" ? "icon" : undefined}
|
|
98
|
+
data-hit={variant === "icon" ? "expand" : undefined}
|
|
92
99
|
className="ml-dropdown-trigger"
|
|
93
100
|
onClick={() => open ? close() : openAt(enabled[0] ?? -1)}
|
|
94
101
|
onKeyDown={(event) => {
|
|
@@ -105,8 +112,8 @@ const DropdownMenu = React.forwardRef<HTMLDivElement, DropdownMenuProps>(
|
|
|
105
112
|
}
|
|
106
113
|
}}
|
|
107
114
|
>
|
|
108
|
-
<span className="ml-dropdown-trigger-label">{trigger}</span>
|
|
109
|
-
<IconChevronDown aria-hidden="true" className="ml-dropdown-chevron" size="1em" />
|
|
115
|
+
<span className="ml-dropdown-trigger-label" aria-hidden={variant === "icon" || undefined}>{trigger}</span>
|
|
116
|
+
{variant === "icon" ? null : <IconChevronDown aria-hidden="true" className="ml-dropdown-chevron" size="1em" />}
|
|
110
117
|
</button>
|
|
111
118
|
{open && portal ? createPortal(
|
|
112
119
|
<div
|
|
@@ -175,6 +175,8 @@ const SWIPE_DISMISS_PX = 72;
|
|
|
175
175
|
function ToastCard({ item, paused }: { item: ToastItem; paused: boolean }) {
|
|
176
176
|
const remaining = React.useRef(item.duration);
|
|
177
177
|
const [drag, setDrag] = React.useState<{ start: number; offset: number } | null>(null);
|
|
178
|
+
// Swiped away, it carries on the way it was thrown (1 right, -1 left) instead of snapping back to fade.
|
|
179
|
+
const [thrown, setThrown] = React.useState<1 | -1 | null>(null);
|
|
178
180
|
|
|
179
181
|
// A changed toast (loading → success) gets its full time again.
|
|
180
182
|
React.useEffect(() => {
|
|
@@ -182,16 +184,17 @@ function ToastCard({ item, paused }: { item: ToastItem; paused: boolean }) {
|
|
|
182
184
|
}, [item.revision, item.duration]);
|
|
183
185
|
|
|
184
186
|
// The timer counts only while the toast can actually be read: not while
|
|
185
|
-
// hovered, focused, or in a hidden tab. It resumes where it paused.
|
|
187
|
+
// hovered, focused, held by a finger, or in a hidden tab. It resumes where it paused.
|
|
188
|
+
const held = drag !== null;
|
|
186
189
|
React.useEffect(() => {
|
|
187
|
-
if (paused || item.closing || !Number.isFinite(item.duration) || item.duration <= 0) return;
|
|
190
|
+
if (paused || held || item.closing || !Number.isFinite(item.duration) || item.duration <= 0) return;
|
|
188
191
|
const started = Date.now();
|
|
189
192
|
const timer = window.setTimeout(() => dismissToast(item.id), remaining.current);
|
|
190
193
|
return () => {
|
|
191
194
|
window.clearTimeout(timer);
|
|
192
195
|
remaining.current = Math.max(0, remaining.current - (Date.now() - started));
|
|
193
196
|
};
|
|
194
|
-
}, [paused, item.closing, item.duration, item.id, item.revision]);
|
|
197
|
+
}, [paused, held, item.closing, item.duration, item.id, item.revision]);
|
|
195
198
|
|
|
196
199
|
const urgent = item.tone === "danger" || item.tone === "warning";
|
|
197
200
|
const icon = item.loading ? <Spinner /> : item.icon === undefined ? TONE_ICONS[item.tone] : item.icon;
|
|
@@ -207,7 +210,13 @@ function ToastCard({ item, paused }: { item: ToastItem; paused: boolean }) {
|
|
|
207
210
|
data-has-description={item.description ? "" : undefined}
|
|
208
211
|
data-swiping={drag ? "" : undefined}
|
|
209
212
|
className="ml-toast"
|
|
210
|
-
style={
|
|
213
|
+
style={
|
|
214
|
+
drag
|
|
215
|
+
? { transform: `translateX(${drag.offset}px)`, opacity: Math.max(0.2, 1 - Math.abs(drag.offset) / 200) }
|
|
216
|
+
: thrown
|
|
217
|
+
? { transform: `translateX(${thrown * 110}%)`, opacity: 0 }
|
|
218
|
+
: undefined
|
|
219
|
+
}
|
|
211
220
|
onPointerDown={(event) => {
|
|
212
221
|
if (event.pointerType === "mouse" || (event.target as HTMLElement).closest("button")) return;
|
|
213
222
|
event.currentTarget.setPointerCapture(event.pointerId);
|
|
@@ -217,7 +226,10 @@ function ToastCard({ item, paused }: { item: ToastItem; paused: boolean }) {
|
|
|
217
226
|
if (drag) setDrag({ ...drag, offset: event.clientX - drag.start });
|
|
218
227
|
}}
|
|
219
228
|
onPointerUp={() => {
|
|
220
|
-
if (drag && Math.abs(drag.offset) > SWIPE_DISMISS_PX)
|
|
229
|
+
if (drag && Math.abs(drag.offset) > SWIPE_DISMISS_PX) {
|
|
230
|
+
setThrown(drag.offset > 0 ? 1 : -1);
|
|
231
|
+
dismissToast(item.id);
|
|
232
|
+
}
|
|
221
233
|
setDrag(null);
|
|
222
234
|
}}
|
|
223
235
|
onPointerCancel={() => setDrag(null)}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"packages/components/context-menu/context-menu.tsx": "sha256-OGaKzthZJGaV5T+4sRWYecA64wEEg2KImKnIzMMg1i4=",
|
|
30
30
|
"packages/components/copy-button/copy-button.tsx": "sha256-6fvfifoiDOtW+WxKWon4SGEn3THtERuCX2hqGSZDtVM=",
|
|
31
31
|
"packages/components/date-picker/date-picker.tsx": "sha256-QABmZzPKHc706/Rs+ln3ifDK3T2lXl34rehhuRXW+8o=",
|
|
32
|
-
"packages/components/dropdown-menu/dropdown-menu.tsx": "sha256
|
|
32
|
+
"packages/components/dropdown-menu/dropdown-menu.tsx": "sha256-TSAsDWcx8mVwLdZVEaCrO0Fkeuiaui7Jw/BbZQmJH1Y=",
|
|
33
33
|
"packages/components/dropzone/dropzone.tsx": "sha256-tHCCpEWE6839UeLOszTo+R2vAL4Sp9UxuRdLkFLfnq4=",
|
|
34
34
|
"packages/components/empty-state/empty-state.tsx": "sha256-/phk3A6TDaiqo61fCcAc/4Bi85e1yBGAtKXFaGhrjyw=",
|
|
35
35
|
"packages/components/hover-card/hover-card.tsx": "sha256-xLBQc3vVIfQbnN85F34r9SHMGQf8FubSYfk7uP+IS2g=",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"packages/components/time-picker/time-picker.tsx": "sha256-HquGogkQB7YGs/1iTSqftSJ310hgXqKdAc+fU1RtQ5Y=",
|
|
65
65
|
"packages/components/time-picker/times.ts": "sha256-V/4uqFZPn9gVnyx8cB9vwp/RocmTYaPmLxjfy8DPQOI=",
|
|
66
66
|
"packages/components/timeline/timeline.tsx": "sha256-nVg7lBcAUAzqEb0YrHagJXSaHE2aWWE9bUbQMWQY6PU=",
|
|
67
|
-
"packages/components/toast/toast.tsx": "sha256-
|
|
67
|
+
"packages/components/toast/toast.tsx": "sha256-6hKQ8wLN6uTnfVebpEeuvAxqAXDppWdjzGi33wtW8Y4=",
|
|
68
68
|
"packages/components/toggle/toggle.tsx": "sha256-8qPHeSliHNdzQS7OLJ47BrvRR75MYyUGJlK4s21XS/U=",
|
|
69
69
|
"packages/components/tooltip/tooltip.tsx": "sha256-PYjLEr+GFmu8VrLua1d4yzk0plXYbjIKMAUlwfIn+1c=",
|
|
70
70
|
"packages/components/tour/tour.tsx": "sha256-b2XJokzSio2N9MFDbAbXn6w2f7diJb1KWedSCycRMmE=",
|