@nutui/nutui-react-taro 2.0.0-alpha.1 → 2.0.0-alpha.2
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/CHANGELOG.md +14 -0
- package/dist/esm/Address.js +2 -2
- package/dist/esm/Animate.js +2 -3
- package/dist/esm/Badge.js +1 -3
- package/dist/esm/Divider.js +2 -1
- package/dist/esm/Drag.js +2 -3
- package/dist/esm/Elevator.js +3 -3
- package/dist/esm/Menu.js +1 -1
- package/dist/esm/MenuItem.js +3 -4
- package/dist/esm/NavBar.js +1 -4
- package/dist/esm/Progress.js +1 -4
- package/dist/esm/Uploader.js +2 -4
- package/dist/esm/{address.taro-632ca799.js → address.taro-2f915873.js} +2 -2
- package/dist/esm/{animate.taro-fb7986d6.js → animate.taro-9e65d07a.js} +4 -3
- package/dist/esm/{badge.taro-ae154f41.js → badge.taro-1d5df601.js} +11 -16
- package/dist/esm/{divider.taro-6c1657ce.js → divider.taro-67e9f757.js} +2 -0
- package/dist/esm/{drag.taro-79bb8744.js → drag.taro-2d3d9d11.js} +4 -3
- package/dist/esm/{elevator.taro-81a11ecc.js → elevator.taro-588e219b.js} +31 -24
- package/dist/esm/menu.taro-b61442a7.js +111 -0
- package/dist/esm/{menuitem.taro-86a6bb6c.js → menuitem.taro-bca78e07.js} +31 -30
- package/dist/esm/navbar.taro-02c69d66.js +57 -0
- package/dist/esm/nutui-react.es.js +13 -13
- package/dist/esm/progress.taro-1c199fbe.js +40 -0
- package/dist/esm/{uploader.taro-2151eec6.js → uploader.taro-17569890.js} +2 -2
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.mjs +702 -795
- package/dist/nutui.react.umd.js +702 -795
- package/dist/packages/badge/badge.scss +8 -17
- package/dist/packages/elevator/elevator.scss +2 -28
- package/dist/packages/menu/menu.scss +44 -55
- package/dist/packages/menuitem/menuitem.scss +16 -26
- package/dist/packages/navbar/navbar.scss +16 -115
- package/dist/packages/progress/progress.scss +19 -58
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +23 -114
- package/dist/styles/variables.scss +31 -122
- package/dist/types/index.d.ts +18 -51
- package/package.json +1 -1
- package/dist/esm/menu.taro-54951911.js +0 -98
- package/dist/esm/navbar.taro-69f47d51.js +0 -77
- package/dist/esm/progress.taro-24392ef3.js +0 -88
package/dist/style.mjs
CHANGED
|
@@ -1520,108 +1520,36 @@ $popover-menu-name-line-height: var(
|
|
|
1520
1520
|
normal
|
|
1521
1521
|
) !default;
|
|
1522
1522
|
|
|
1523
|
-
//
|
|
1523
|
+
//progress(✅)
|
|
1524
|
+
$progress-height: var(--nutui-progress-height, 10px) !default;
|
|
1525
|
+
$progress-color: var(
|
|
1526
|
+
--nutui-progress-color,
|
|
1527
|
+
linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)
|
|
1528
|
+
) !default;
|
|
1529
|
+
$progress-background: var(--nutui-progress-background, #f3f3f3) !default;
|
|
1524
1530
|
$progress-border-radius: var(--nutui-progress-border-radius, 12px) !default;
|
|
1525
|
-
$progress-text-
|
|
1526
|
-
|
|
1527
|
-
$progress-text-color: var(--nutui-progress-text-color, $title-color) !default;
|
|
1528
|
-
$progress-text-inner-color: var(
|
|
1529
|
-
--nutui-progress-text-inner-color,
|
|
1531
|
+
$progress-text-color: var(
|
|
1532
|
+
--nutui-progress-text-color,
|
|
1530
1533
|
$primary-text-color
|
|
1531
1534
|
) !default;
|
|
1532
|
-
$progress-
|
|
1533
|
-
--nutui-progress-
|
|
1534
|
-
-
|
|
1535
|
+
$progress-text-background: var(
|
|
1536
|
+
--nutui-progress-text-background,
|
|
1537
|
+
$progress-color
|
|
1535
1538
|
) !default;
|
|
1536
|
-
$progress-
|
|
1537
|
-
|
|
1539
|
+
$progress-text-padding: var(--nutui-progress-text-padding, 0 5px) !default;
|
|
1540
|
+
$progress-text-font-size: var(--nutui-progress-text-font-size, 9px) !default;
|
|
1541
|
+
$progress-text-position-top: var(
|
|
1542
|
+
--nutui-progress-text-position-top,
|
|
1538
1543
|
-4px
|
|
1539
1544
|
) !default;
|
|
1540
|
-
$progress-
|
|
1541
|
-
--nutui-progress-
|
|
1542
|
-
|
|
1543
|
-
) !default;
|
|
1544
|
-
$progress-inner-background-color: linear-gradient(
|
|
1545
|
-
135deg,
|
|
1546
|
-
$primary-color 0%,
|
|
1547
|
-
$primary-color-end 100%
|
|
1548
|
-
) !default;
|
|
1549
|
-
$progress-insidetext-background: var(
|
|
1550
|
-
--nutui-progress-insidetext-background,
|
|
1551
|
-
$progress-inner-background-color
|
|
1552
|
-
) !default;
|
|
1553
|
-
$progress-outer-background-color: var(
|
|
1554
|
-
--nutui-progress-outer-background-color,
|
|
1555
|
-
#f3f3f3
|
|
1556
|
-
) !default;
|
|
1557
|
-
$progress-outer-border-radius: var(
|
|
1558
|
-
--nutui-progress-outer-border-radius,
|
|
1559
|
-
12px
|
|
1545
|
+
$progress-text-position-bottom: var(
|
|
1546
|
+
--nutui-progress-text-position-bottom,
|
|
1547
|
+
-4px
|
|
1560
1548
|
) !default;
|
|
1561
|
-
$progress-
|
|
1562
|
-
--nutui-progress-
|
|
1549
|
+
$progress-text-border-radius: var(
|
|
1550
|
+
--nutui-progress-text-border-radius,
|
|
1563
1551
|
5px
|
|
1564
1552
|
) !default;
|
|
1565
|
-
$progress-insidetext-padding: var(
|
|
1566
|
-
--nutui-progress-insidetext-padding,
|
|
1567
|
-
3px 5px 3px 6px
|
|
1568
|
-
) !default;
|
|
1569
|
-
$progress-insidetext-top: var(--nutui-progress-insidetext-top, -42%) !default;
|
|
1570
|
-
$progress-small-text-top: var(--nutui-progress-small-text-top, -100%) !default;
|
|
1571
|
-
$progress-small-font-size: var(--nutui-progress-small-font-size, 7px) !default;
|
|
1572
|
-
$progress-small-padding: var(--nutui-progress-small-padding, 0 4px) !default;
|
|
1573
|
-
$progress-small-height: var(--nutui-progress-small-height, 5px) !default;
|
|
1574
|
-
$progress-small-text-font-size: var(
|
|
1575
|
-
--nutui-progress-small-text-font-size,
|
|
1576
|
-
7px
|
|
1577
|
-
) !default;
|
|
1578
|
-
$progress-small-text-line-height: var(
|
|
1579
|
-
--nutui-progress-small-text-line-height,
|
|
1580
|
-
10px
|
|
1581
|
-
) !default;
|
|
1582
|
-
$progress-small-text-padding: var(
|
|
1583
|
-
--nutui-progress-small-text-padding,
|
|
1584
|
-
2px 4px
|
|
1585
|
-
) !default;
|
|
1586
|
-
$progress-small-text-top: var(--nutui-progress-small-text-top, -100%) !default;
|
|
1587
|
-
$progress-base-font-size: var(--nutui-progress-base-font-size, 9px) !default;
|
|
1588
|
-
$progress-base-padding: var(--nutui-progress-base-padding, 0 5px) !default;
|
|
1589
|
-
$progress-base-height: var(--nutui-progress-base-height, 10px) !default;
|
|
1590
|
-
$progress-base-text-font-size: var(
|
|
1591
|
-
--nutui-progress-base-text-font-size,
|
|
1592
|
-
9px
|
|
1593
|
-
) !default;
|
|
1594
|
-
$progress-base-text-line-height: var(
|
|
1595
|
-
--nutui-progress-base-text-line-height,
|
|
1596
|
-
13px
|
|
1597
|
-
) !default;
|
|
1598
|
-
$progress-base-text-padding: var(
|
|
1599
|
-
--nutui-progress-base-text-padding,
|
|
1600
|
-
$progress-insidetext-padding
|
|
1601
|
-
) !default;
|
|
1602
|
-
$progress-base-text-top: var(
|
|
1603
|
-
--nutui-progress-base-text-top,
|
|
1604
|
-
$progress-insidetext-top
|
|
1605
|
-
) !default;
|
|
1606
|
-
$progress-large-font-size: var(--nutui-progress-large-font-size, 13px) !default;
|
|
1607
|
-
$progress-large-padding: var(--nutui-progress-large-padding, 0 5px) !default;
|
|
1608
|
-
$progress-large-height: var(--nutui-progress-large-height, 15px) !default;
|
|
1609
|
-
$progress-large-text-font-size: var(
|
|
1610
|
-
--nutui-progress-large-text-font-size,
|
|
1611
|
-
13px
|
|
1612
|
-
) !default;
|
|
1613
|
-
$progress-large-text-line-height: var(
|
|
1614
|
-
--nutui-progress-large-text-line-height,
|
|
1615
|
-
18px
|
|
1616
|
-
) !default;
|
|
1617
|
-
$progress-large-text-padding: var(
|
|
1618
|
-
--nutui-progress-large-text-padding,
|
|
1619
|
-
$progress-insidetext-padding
|
|
1620
|
-
) !default;
|
|
1621
|
-
$progress-large-text-top: var(
|
|
1622
|
-
--nutui-progress-large-text-top,
|
|
1623
|
-
$progress-insidetext-top
|
|
1624
|
-
) !default;
|
|
1625
1553
|
|
|
1626
1554
|
//pagination(✅)
|
|
1627
1555
|
$pagination-color: var(--nutui-pagination-color, $primary-color) !default;
|
|
@@ -2196,21 +2124,14 @@ $navbar-box-shadow: var(
|
|
|
2196
2124
|
0px 1px 7px 0px rgba(237, 238, 241, 1)
|
|
2197
2125
|
) !default;
|
|
2198
2126
|
$navbar-color: var(--nutui-navbar-color, $gray1) !default;
|
|
2199
|
-
$navbar-
|
|
2200
|
-
|
|
2201
|
-
$font-size-2
|
|
2202
|
-
) !default;
|
|
2203
|
-
$navbar-title-font: var(--nutui-navbar-title-font, $font-size-2) !default;
|
|
2127
|
+
$navbar-font-size: var(--nutui-navbar-font-size, $font-size-2) !default;
|
|
2128
|
+
$navbar-title-font: var(--nutui-navbar-title-font-size, $font-size-2) !default;
|
|
2204
2129
|
$navbar-title-font-weight: var(--nutui-navbar-title-font-weight, 0) !default;
|
|
2205
2130
|
$navbar-title-font-color: var(
|
|
2206
2131
|
--nutui-navbar-title-font-color,
|
|
2207
2132
|
$navbar-color
|
|
2208
2133
|
) !default;
|
|
2209
2134
|
$navbar-title-width: var(--nutui-navbar-title-width, 100px) !default;
|
|
2210
|
-
$navbar-title-icon-margin: var(
|
|
2211
|
-
--nutui-navbar-title-icon-margin,
|
|
2212
|
-
0 0 0 13px
|
|
2213
|
-
) !default;
|
|
2214
2135
|
|
|
2215
2136
|
// sidenavbar(✅)
|
|
2216
2137
|
$sidenavbar-content-bg-color: var(
|
|
@@ -2328,18 +2249,6 @@ $elevator-list-item-code-line-height: var(
|
|
|
2328
2249
|
--nutui-elevator-list-item-code-line-height,
|
|
2329
2250
|
35px
|
|
2330
2251
|
) !default;
|
|
2331
|
-
$elevator-list-item-code-after-width: var(
|
|
2332
|
-
--nutui-elevator-list-item-code-after-width,
|
|
2333
|
-
100%
|
|
2334
|
-
) !default;
|
|
2335
|
-
$elevator-list-item-code-after-height: var(
|
|
2336
|
-
--nutui-elevator-list-item-code-after-height,
|
|
2337
|
-
1px
|
|
2338
|
-
) !default;
|
|
2339
|
-
$elevator-list-item-code-after-bg-color: var(
|
|
2340
|
-
--nutui-elevator-list-item-code-after-bg-color,
|
|
2341
|
-
#f5f5f5
|
|
2342
|
-
) !default;
|
|
2343
2252
|
$elevator-list-item-code-current-box-shadow: 0 3px 3px 1px
|
|
2344
2253
|
rgba(240, 240, 240, 1) !default;
|
|
2345
2254
|
$elevator-list-item-code-current-bg-color: var(
|
|
@@ -1419,26 +1419,19 @@ $badge-background-color: var(
|
|
|
1419
1419
|
) !default;
|
|
1420
1420
|
$badge-color: var(--nutui-badge-color, #fff) !default;
|
|
1421
1421
|
$badge-font-size: var(--nutui-badge-font-size, $font-size-1) !default;
|
|
1422
|
-
$badge-default-background-color: var(
|
|
1423
|
-
--nutui-badge-default-background-color,
|
|
1424
|
-
rgba(255, 255, 255, 1)
|
|
1425
|
-
) !default;
|
|
1426
1422
|
$badge-border: var(
|
|
1427
1423
|
--nutui-badge-border,
|
|
1428
1424
|
0px solid $primary-text-color
|
|
1429
1425
|
) !default;
|
|
1430
1426
|
$badge-border-radius: var(--nutui-badge-border-radius, 14px) !default;
|
|
1431
1427
|
$badge-padding: var(--nutui-badge-padding, 0 5px) !default;
|
|
1432
|
-
$badge-icon-padding: var(--nutui-badge-icon-padding,
|
|
1428
|
+
$badge-icon-padding: var(--nutui-badge-icon-padding, 3px) !default;
|
|
1433
1429
|
$badge-content-transform: var(
|
|
1434
1430
|
--nutui-badge-content-transform,
|
|
1435
1431
|
translateY(-50%) translateX(100%)
|
|
1436
1432
|
) !default;
|
|
1437
1433
|
$badge-z-index: var(--nutui-badge-z-index, 1) !default;
|
|
1438
1434
|
$badge-dot-width: var(--nutui-badge-dot-width, 7px) !default;
|
|
1439
|
-
$badge-dot-height: var(--nutui-badge-dot-height, 7px) !default;
|
|
1440
|
-
$badge-dot-border-radius: var(--nutui-badge-dot-border-radius, 7px) !default;
|
|
1441
|
-
$badge-dot-padding: var(--nutui-badge-dot-padding, 0px) !default;
|
|
1442
1435
|
|
|
1443
1436
|
//popover(✅)
|
|
1444
1437
|
$popover-border-radius: var(--nutui-popover-border-radius, 8px) !default;
|
|
@@ -1505,108 +1498,36 @@ $popover-menu-name-line-height: var(
|
|
|
1505
1498
|
normal
|
|
1506
1499
|
) !default;
|
|
1507
1500
|
|
|
1508
|
-
//
|
|
1501
|
+
//progress(✅)
|
|
1502
|
+
$progress-height: var(--nutui-progress-height, 10px) !default;
|
|
1503
|
+
$progress-color: var(
|
|
1504
|
+
--nutui-progress-color,
|
|
1505
|
+
linear-gradient(135deg, #fa2c19 0%, #fa6419 100%)
|
|
1506
|
+
) !default;
|
|
1507
|
+
$progress-background: var(--nutui-progress-background, #f3f3f3) !default;
|
|
1509
1508
|
$progress-border-radius: var(--nutui-progress-border-radius, 12px) !default;
|
|
1510
|
-
$progress-text-
|
|
1511
|
-
|
|
1512
|
-
$progress-text-color: var(--nutui-progress-text-color, $title-color) !default;
|
|
1513
|
-
$progress-text-inner-color: var(
|
|
1514
|
-
--nutui-progress-text-inner-color,
|
|
1509
|
+
$progress-text-color: var(
|
|
1510
|
+
--nutui-progress-text-color,
|
|
1515
1511
|
$primary-text-color
|
|
1516
1512
|
) !default;
|
|
1517
|
-
$progress-
|
|
1518
|
-
--nutui-progress-
|
|
1519
|
-
-
|
|
1513
|
+
$progress-text-background: var(
|
|
1514
|
+
--nutui-progress-text-background,
|
|
1515
|
+
$progress-color
|
|
1520
1516
|
) !default;
|
|
1521
|
-
$progress-
|
|
1522
|
-
|
|
1517
|
+
$progress-text-padding: var(--nutui-progress-text-padding, 0 5px) !default;
|
|
1518
|
+
$progress-text-font-size: var(--nutui-progress-text-font-size, 9px) !default;
|
|
1519
|
+
$progress-text-position-top: var(
|
|
1520
|
+
--nutui-progress-text-position-top,
|
|
1523
1521
|
-4px
|
|
1524
1522
|
) !default;
|
|
1525
|
-
$progress-
|
|
1526
|
-
--nutui-progress-
|
|
1527
|
-
|
|
1528
|
-
) !default;
|
|
1529
|
-
$progress-inner-background-color: linear-gradient(
|
|
1530
|
-
135deg,
|
|
1531
|
-
$primary-color 0%,
|
|
1532
|
-
$primary-color-end 100%
|
|
1533
|
-
) !default;
|
|
1534
|
-
$progress-insidetext-background: var(
|
|
1535
|
-
--nutui-progress-insidetext-background,
|
|
1536
|
-
$progress-inner-background-color
|
|
1537
|
-
) !default;
|
|
1538
|
-
$progress-outer-background-color: var(
|
|
1539
|
-
--nutui-progress-outer-background-color,
|
|
1540
|
-
#f3f3f3
|
|
1541
|
-
) !default;
|
|
1542
|
-
$progress-outer-border-radius: var(
|
|
1543
|
-
--nutui-progress-outer-border-radius,
|
|
1544
|
-
12px
|
|
1523
|
+
$progress-text-position-bottom: var(
|
|
1524
|
+
--nutui-progress-text-position-bottom,
|
|
1525
|
+
-4px
|
|
1545
1526
|
) !default;
|
|
1546
|
-
$progress-
|
|
1547
|
-
--nutui-progress-
|
|
1527
|
+
$progress-text-border-radius: var(
|
|
1528
|
+
--nutui-progress-text-border-radius,
|
|
1548
1529
|
5px
|
|
1549
1530
|
) !default;
|
|
1550
|
-
$progress-insidetext-padding: var(
|
|
1551
|
-
--nutui-progress-insidetext-padding,
|
|
1552
|
-
3px 5px 3px 6px
|
|
1553
|
-
) !default;
|
|
1554
|
-
$progress-insidetext-top: var(--nutui-progress-insidetext-top, -42%) !default;
|
|
1555
|
-
$progress-small-text-top: var(--nutui-progress-small-text-top, -100%) !default;
|
|
1556
|
-
$progress-small-font-size: var(--nutui-progress-small-font-size, 7px) !default;
|
|
1557
|
-
$progress-small-padding: var(--nutui-progress-small-padding, 0 4px) !default;
|
|
1558
|
-
$progress-small-height: var(--nutui-progress-small-height, 5px) !default;
|
|
1559
|
-
$progress-small-text-font-size: var(
|
|
1560
|
-
--nutui-progress-small-text-font-size,
|
|
1561
|
-
7px
|
|
1562
|
-
) !default;
|
|
1563
|
-
$progress-small-text-line-height: var(
|
|
1564
|
-
--nutui-progress-small-text-line-height,
|
|
1565
|
-
10px
|
|
1566
|
-
) !default;
|
|
1567
|
-
$progress-small-text-padding: var(
|
|
1568
|
-
--nutui-progress-small-text-padding,
|
|
1569
|
-
2px 4px
|
|
1570
|
-
) !default;
|
|
1571
|
-
$progress-small-text-top: var(--nutui-progress-small-text-top, -100%) !default;
|
|
1572
|
-
$progress-base-font-size: var(--nutui-progress-base-font-size, 9px) !default;
|
|
1573
|
-
$progress-base-padding: var(--nutui-progress-base-padding, 0 5px) !default;
|
|
1574
|
-
$progress-base-height: var(--nutui-progress-base-height, 10px) !default;
|
|
1575
|
-
$progress-base-text-font-size: var(
|
|
1576
|
-
--nutui-progress-base-text-font-size,
|
|
1577
|
-
9px
|
|
1578
|
-
) !default;
|
|
1579
|
-
$progress-base-text-line-height: var(
|
|
1580
|
-
--nutui-progress-base-text-line-height,
|
|
1581
|
-
13px
|
|
1582
|
-
) !default;
|
|
1583
|
-
$progress-base-text-padding: var(
|
|
1584
|
-
--nutui-progress-base-text-padding,
|
|
1585
|
-
$progress-insidetext-padding
|
|
1586
|
-
) !default;
|
|
1587
|
-
$progress-base-text-top: var(
|
|
1588
|
-
--nutui-progress-base-text-top,
|
|
1589
|
-
$progress-insidetext-top
|
|
1590
|
-
) !default;
|
|
1591
|
-
$progress-large-font-size: var(--nutui-progress-large-font-size, 13px) !default;
|
|
1592
|
-
$progress-large-padding: var(--nutui-progress-large-padding, 0 5px) !default;
|
|
1593
|
-
$progress-large-height: var(--nutui-progress-large-height, 15px) !default;
|
|
1594
|
-
$progress-large-text-font-size: var(
|
|
1595
|
-
--nutui-progress-large-text-font-size,
|
|
1596
|
-
13px
|
|
1597
|
-
) !default;
|
|
1598
|
-
$progress-large-text-line-height: var(
|
|
1599
|
-
--nutui-progress-large-text-line-height,
|
|
1600
|
-
18px
|
|
1601
|
-
) !default;
|
|
1602
|
-
$progress-large-text-padding: var(
|
|
1603
|
-
--nutui-progress-large-text-padding,
|
|
1604
|
-
$progress-insidetext-padding
|
|
1605
|
-
) !default;
|
|
1606
|
-
$progress-large-text-top: var(
|
|
1607
|
-
--nutui-progress-large-text-top,
|
|
1608
|
-
$progress-insidetext-top
|
|
1609
|
-
) !default;
|
|
1610
1531
|
|
|
1611
1532
|
//pagination(✅)
|
|
1612
1533
|
$pagination-color: var(--nutui-pagination-color, $primary-color) !default;
|
|
@@ -2180,22 +2101,14 @@ $navbar-box-shadow: var(
|
|
|
2180
2101
|
--nutui-navbar-box-shadow,
|
|
2181
2102
|
0px 1px 7px 0px rgba(237, 238, 241, 1)
|
|
2182
2103
|
) !default;
|
|
2183
|
-
$navbar-color: var(--nutui-navbar-color, $
|
|
2184
|
-
$navbar-
|
|
2185
|
-
|
|
2104
|
+
$navbar-color: var(--nutui-navbar-color, $gray2) !default;
|
|
2105
|
+
$navbar-font-size: var(--nutui-navbar-font-size, $font-size-2) !default;
|
|
2106
|
+
$navbar-title-font-size: var(
|
|
2107
|
+
--nutui-navbar-title-font-size,
|
|
2186
2108
|
$font-size-2
|
|
2187
2109
|
) !default;
|
|
2188
|
-
$navbar-title-font: var(--nutui-navbar-title-font, $font-size-2) !default;
|
|
2189
2110
|
$navbar-title-font-weight: var(--nutui-navbar-title-font-weight, 0) !default;
|
|
2190
|
-
$navbar-title-font-color: var(
|
|
2191
|
-
--nutui-navbar-title-font-color,
|
|
2192
|
-
$navbar-color
|
|
2193
|
-
) !default;
|
|
2194
|
-
$navbar-title-width: var(--nutui-navbar-title-width, 100px) !default;
|
|
2195
|
-
$navbar-title-icon-margin: var(
|
|
2196
|
-
--nutui-navbar-title-icon-margin,
|
|
2197
|
-
0 0 0 13px
|
|
2198
|
-
) !default;
|
|
2111
|
+
$navbar-title-font-color: var(--nutui-navbar-title-font-color, $gray1) !default;
|
|
2199
2112
|
|
|
2200
2113
|
// sidenavbar(✅)
|
|
2201
2114
|
$sidenavbar-content-bg-color: var(
|
|
@@ -2313,16 +2226,12 @@ $elevator-list-item-code-line-height: var(
|
|
|
2313
2226
|
--nutui-elevator-list-item-code-line-height,
|
|
2314
2227
|
35px
|
|
2315
2228
|
) !default;
|
|
2316
|
-
$elevator-list-item-code-
|
|
2317
|
-
--nutui-elevator-list-item-code-
|
|
2318
|
-
100%
|
|
2319
|
-
) !default;
|
|
2320
|
-
$elevator-list-item-code-after-height: var(
|
|
2321
|
-
--nutui-elevator-list-item-code-after-height,
|
|
2229
|
+
$elevator-list-item-code-border-bottom: var(
|
|
2230
|
+
--nutui-elevator-list-item-code-border-bottom,
|
|
2322
2231
|
1px
|
|
2323
2232
|
) !default;
|
|
2324
|
-
$elevator-list-item-code-
|
|
2325
|
-
--nutui-elevator-list-item-code-
|
|
2233
|
+
$elevator-list-item-code-border-bottom-color: var(
|
|
2234
|
+
--nutui-elevator-list-item-code-border-bottom-color,
|
|
2326
2235
|
#f5f5f5
|
|
2327
2236
|
) !default;
|
|
2328
2237
|
$elevator-list-item-code-current-box-shadow: 0 3px 3px 1px
|
package/dist/types/index.d.ts
CHANGED
|
@@ -248,10 +248,8 @@ declare const Col: FunctionComponent<Partial<ColProps> & Omit<React__default.HTM
|
|
|
248
248
|
|
|
249
249
|
type ContentPositionType = 'left' | 'center' | 'right';
|
|
250
250
|
type DirectionType = 'horizontal' | 'vertical';
|
|
251
|
-
interface DividerProps {
|
|
251
|
+
interface DividerProps extends BasicComponent {
|
|
252
252
|
contentPosition: ContentPositionType;
|
|
253
|
-
style?: React__default.CSSProperties;
|
|
254
|
-
className?: string;
|
|
255
253
|
direction?: DirectionType;
|
|
256
254
|
}
|
|
257
255
|
declare const Divider: FunctionComponent<Partial<DividerProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -310,14 +308,13 @@ interface StickyProps extends BasicComponent {
|
|
|
310
308
|
declare const Sticky: FunctionComponent<Partial<StickyProps>>;
|
|
311
309
|
|
|
312
310
|
declare const elevatorContext: React__default.Context<ElevatorData>;
|
|
313
|
-
interface ElevatorProps {
|
|
311
|
+
interface ElevatorProps extends BasicComponent {
|
|
314
312
|
height: number | string;
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
313
|
+
floorKey: string;
|
|
314
|
+
list: any[];
|
|
315
|
+
sticky: boolean;
|
|
318
316
|
spaceHeight: number;
|
|
319
317
|
titleHeight: number;
|
|
320
|
-
className: string;
|
|
321
318
|
style: React__default.CSSProperties;
|
|
322
319
|
children: React__default.ReactNode;
|
|
323
320
|
onClickItem: (key: string, item: ElevatorData) => void;
|
|
@@ -359,13 +356,11 @@ interface IndicatorProps {
|
|
|
359
356
|
declare const Indicator: FunctionComponent<Partial<IndicatorProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
360
357
|
|
|
361
358
|
interface MenuProps extends BasicComponent {
|
|
362
|
-
className: string;
|
|
363
|
-
style: React__default.CSSProperties;
|
|
364
359
|
activeColor: string;
|
|
365
360
|
closeOnClickOverlay: boolean;
|
|
366
361
|
scrollFixed: boolean | string | number;
|
|
367
362
|
lockScroll: boolean;
|
|
368
|
-
|
|
363
|
+
icon: React__default.ReactNode;
|
|
369
364
|
children: React__default.ReactNode;
|
|
370
365
|
}
|
|
371
366
|
declare const Menu: FunctionComponent<Partial<MenuProps>>;
|
|
@@ -375,13 +370,12 @@ interface OptionItem {
|
|
|
375
370
|
value: string | number;
|
|
376
371
|
}
|
|
377
372
|
interface MenuItemProps extends BasicComponent {
|
|
378
|
-
className: string;
|
|
379
|
-
style: React__default.CSSProperties;
|
|
380
373
|
title: React__default.ReactNode;
|
|
381
374
|
options: OptionItem[];
|
|
382
375
|
disabled: boolean;
|
|
383
376
|
columns: number;
|
|
384
|
-
|
|
377
|
+
icon: React__default.ReactNode;
|
|
378
|
+
closeOnClickAway: boolean;
|
|
385
379
|
direction: string;
|
|
386
380
|
activeTitleClass: string;
|
|
387
381
|
inactiveTitleClass: string;
|
|
@@ -392,21 +386,14 @@ interface MenuItemProps extends BasicComponent {
|
|
|
392
386
|
declare const MenuItem: React__default.ForwardRefExoticComponent<Partial<MenuItemProps> & React__default.RefAttributes<unknown>>;
|
|
393
387
|
|
|
394
388
|
interface NavBarProps$1 extends BasicComponent {
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
description: string;
|
|
399
|
-
className: string;
|
|
389
|
+
left: React__default.ReactNode;
|
|
390
|
+
back: React__default.ReactNode;
|
|
391
|
+
right: React__default.ReactNode;
|
|
400
392
|
fixed: boolean;
|
|
401
393
|
safeAreaInsetTop: boolean;
|
|
402
|
-
border: boolean;
|
|
403
394
|
placeholder: boolean;
|
|
404
395
|
zIndex: number | string;
|
|
405
|
-
style: React__default.CSSProperties;
|
|
406
|
-
onClickTitle: (e: React__default.MouseEvent<HTMLDivElement>) => void;
|
|
407
|
-
onClickIcon: (e: React__default.MouseEvent<HTMLDivElement>) => void;
|
|
408
396
|
onClickBack: (e: React__default.MouseEvent<HTMLElement>) => void;
|
|
409
|
-
onClickRight: (e: React__default.MouseEvent<HTMLDivElement>) => void;
|
|
410
397
|
children?: React__default.ReactNode;
|
|
411
398
|
}
|
|
412
399
|
declare const NavBar: FunctionComponent<Partial<NavBarProps$1>>;
|
|
@@ -1273,7 +1260,7 @@ interface BasicDialogProps {
|
|
|
1273
1260
|
type DialogProps = BasicDialogProps;
|
|
1274
1261
|
declare const BaseDialog: React__default.ForwardRefExoticComponent<Partial<BasicDialogProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, "title" | "content"> & React__default.RefAttributes<unknown>>;
|
|
1275
1262
|
|
|
1276
|
-
interface DragProps {
|
|
1263
|
+
interface DragProps extends BasicComponent {
|
|
1277
1264
|
attract: boolean;
|
|
1278
1265
|
direction: 'x' | 'y' | 'lock' | undefined;
|
|
1279
1266
|
boundary: {
|
|
@@ -1282,8 +1269,6 @@ interface DragProps {
|
|
|
1282
1269
|
right: number;
|
|
1283
1270
|
bottom: number;
|
|
1284
1271
|
};
|
|
1285
|
-
className: string;
|
|
1286
|
-
style: React__default.CSSProperties;
|
|
1287
1272
|
}
|
|
1288
1273
|
declare const Drag: FunctionComponent<Partial<DragProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1289
1274
|
|
|
@@ -1424,12 +1409,10 @@ declare const Toast: FunctionComponent<Partial<ToastProps> & React__default.HTML
|
|
|
1424
1409
|
type AnimateType = 'shake' | 'ripple' | 'breath' | 'float' | 'slide-right' | 'slide-left' | 'slide-top' | 'slide-bottom' | 'jump' | 'twinkle' | 'flicker';
|
|
1425
1410
|
type AnimateAction = 'initial' | 'click';
|
|
1426
1411
|
|
|
1427
|
-
interface AnimateProps {
|
|
1412
|
+
interface AnimateProps extends BasicComponent {
|
|
1428
1413
|
type: AnimateType;
|
|
1429
1414
|
action: AnimateAction;
|
|
1430
1415
|
loop: boolean;
|
|
1431
|
-
className: string;
|
|
1432
|
-
style: React__default.CSSProperties;
|
|
1433
1416
|
onClick: (event: React__default.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
1434
1417
|
}
|
|
1435
1418
|
declare const Animate: FunctionComponent<Partial<AnimateProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -1503,15 +1486,12 @@ interface AvatarGroupProps {
|
|
|
1503
1486
|
declare const AvatarGroup: FunctionComponent<Partial<AvatarGroupProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1504
1487
|
|
|
1505
1488
|
interface BadgeProps extends BasicComponent {
|
|
1506
|
-
value:
|
|
1489
|
+
value: ReactNode;
|
|
1507
1490
|
dot: boolean;
|
|
1508
1491
|
max: number;
|
|
1509
1492
|
top: string;
|
|
1510
1493
|
right: string;
|
|
1511
|
-
zIndex: string;
|
|
1512
1494
|
color: string;
|
|
1513
|
-
icon: ReactNode;
|
|
1514
|
-
children?: ReactNode;
|
|
1515
1495
|
}
|
|
1516
1496
|
declare const Badge: FunctionComponent<Partial<BadgeProps>>;
|
|
1517
1497
|
|
|
@@ -1677,26 +1657,13 @@ interface PriceProps {
|
|
|
1677
1657
|
}
|
|
1678
1658
|
declare const Price: FunctionComponent<Partial<PriceProps>>;
|
|
1679
1659
|
|
|
1680
|
-
type ProgressSize = 'small' | 'base' | 'large';
|
|
1681
|
-
type TextType = 'icon' | 'text';
|
|
1682
1660
|
interface ProgressProps extends BasicComponent {
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
percentage: number;
|
|
1687
|
-
fillColor: string;
|
|
1688
|
-
strokeColor: string;
|
|
1661
|
+
percent: number;
|
|
1662
|
+
background: string;
|
|
1663
|
+
color: string;
|
|
1689
1664
|
strokeWidth: string;
|
|
1690
|
-
size: ProgressSize;
|
|
1691
|
-
textColor: string;
|
|
1692
|
-
textWidth: string;
|
|
1693
1665
|
showText: boolean;
|
|
1694
|
-
|
|
1695
|
-
textBackground: string;
|
|
1696
|
-
textType: TextType;
|
|
1697
|
-
status: boolean;
|
|
1698
|
-
icon: ReactNode;
|
|
1699
|
-
children: ReactNode;
|
|
1666
|
+
animated: boolean;
|
|
1700
1667
|
}
|
|
1701
1668
|
declare const Progress: FunctionComponent<Partial<ProgressProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1702
1669
|
|
package/package.json
CHANGED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import React__default, { useRef, useEffect, useState } from 'react';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { RectUp, RectDown } from '@nutui/icons-react-taro';
|
|
4
|
-
import { C as ComponentDefaults } from './typings-d8491423.js';
|
|
5
|
-
|
|
6
|
-
const defaultProps = {
|
|
7
|
-
...ComponentDefaults,
|
|
8
|
-
className: '',
|
|
9
|
-
style: {},
|
|
10
|
-
activeColor: '',
|
|
11
|
-
closeOnClickOverlay: true,
|
|
12
|
-
scrollFixed: false,
|
|
13
|
-
lockScroll: true,
|
|
14
|
-
titleIcon: null,
|
|
15
|
-
};
|
|
16
|
-
const Menu = (props) => {
|
|
17
|
-
const { className, titleIcon, scrollFixed, lockScroll, closeOnClickOverlay, children, activeColor, ...rest } = {
|
|
18
|
-
...defaultProps,
|
|
19
|
-
...props,
|
|
20
|
-
};
|
|
21
|
-
const parentRef = useRef(null);
|
|
22
|
-
const onScroll = () => { };
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
if (scrollFixed) {
|
|
25
|
-
window.addEventListener('scroll', onScroll);
|
|
26
|
-
}
|
|
27
|
-
return () => window.removeEventListener('scroll', onScroll);
|
|
28
|
-
}, []);
|
|
29
|
-
const [itemShow, setItemShow] = useState([]);
|
|
30
|
-
const [itemTitle, setItemTitle] = useState([]);
|
|
31
|
-
const toggleItemShow = (index) => {
|
|
32
|
-
itemShow[index] = !itemShow[index];
|
|
33
|
-
const temp = itemShow.map((i, idx) => (idx === index ? i : false));
|
|
34
|
-
setItemShow([...temp]);
|
|
35
|
-
};
|
|
36
|
-
const hideItemShow = (index) => {
|
|
37
|
-
itemShow[index] = false;
|
|
38
|
-
setItemShow([...itemShow]);
|
|
39
|
-
};
|
|
40
|
-
const updateTitle = (text, index) => {
|
|
41
|
-
itemTitle[index] = text;
|
|
42
|
-
setItemTitle([...itemTitle]);
|
|
43
|
-
};
|
|
44
|
-
const parent = () => {
|
|
45
|
-
return parentRef;
|
|
46
|
-
};
|
|
47
|
-
const cloneChildren = () => {
|
|
48
|
-
return React__default.Children.map(children, (child, index) => {
|
|
49
|
-
return React__default.cloneElement(child, {
|
|
50
|
-
showPopup: itemShow[index],
|
|
51
|
-
orderKey: index,
|
|
52
|
-
activeColor,
|
|
53
|
-
parent: {
|
|
54
|
-
closeOnClickOverlay,
|
|
55
|
-
lockScroll,
|
|
56
|
-
toggleItemShow,
|
|
57
|
-
updateTitle,
|
|
58
|
-
hideItemShow,
|
|
59
|
-
parent,
|
|
60
|
-
},
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
};
|
|
64
|
-
return (React__default.createElement("div", { className: `nut-menu ${className}`, ...rest, ref: parentRef },
|
|
65
|
-
React__default.createElement("div", { className: "nut-menu-relative" },
|
|
66
|
-
React__default.createElement("div", { className: `nut-menu__bar ${itemShow.includes(true) ? 'opened' : ''} ${className}` }, React__default.Children.toArray(children).map((child, index) => {
|
|
67
|
-
if (!child)
|
|
68
|
-
return null;
|
|
69
|
-
const { disabled, title, value, direction, options, className } = child.props;
|
|
70
|
-
const currentTitle = options?.filter((option) => option.value === value);
|
|
71
|
-
function finallyTitle() {
|
|
72
|
-
if (title)
|
|
73
|
-
return title;
|
|
74
|
-
if (itemTitle && itemTitle[index])
|
|
75
|
-
return itemTitle[index];
|
|
76
|
-
if (currentTitle && currentTitle[0] && currentTitle[0].text)
|
|
77
|
-
return currentTitle[0].text;
|
|
78
|
-
return '';
|
|
79
|
-
}
|
|
80
|
-
return (React__default.createElement("div", { className: `nut-menu__item ${classNames({
|
|
81
|
-
active: itemShow[index],
|
|
82
|
-
disabled,
|
|
83
|
-
})} ${className}`, style: { color: itemShow[index] ? activeColor : '' }, key: index, onClick: () => {
|
|
84
|
-
!disabled && toggleItemShow(index);
|
|
85
|
-
} },
|
|
86
|
-
React__default.createElement("div", { className: `nut-menu__title ${classNames({
|
|
87
|
-
active: itemShow[index],
|
|
88
|
-
disabled,
|
|
89
|
-
})}` },
|
|
90
|
-
React__default.createElement("div", { className: "nut-menu__title-text" }, finallyTitle()),
|
|
91
|
-
titleIcon || (React__default.createElement(React__default.Fragment, null, direction === 'up' ? (React__default.createElement(RectUp, { className: "nut-menu__title-icon", size: "14px" })) : (React__default.createElement(RectDown, { className: "nut-menu__title-icon", size: "14px" })))))));
|
|
92
|
-
})),
|
|
93
|
-
cloneChildren())));
|
|
94
|
-
};
|
|
95
|
-
Menu.defaultProps = defaultProps;
|
|
96
|
-
Menu.displayName = 'NutMenu';
|
|
97
|
-
|
|
98
|
-
export { Menu as M };
|