Skip to content

Commit

Permalink
Merge branch 'feat_v3.x' into feat_sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-huxiyang authored Dec 27, 2024
2 parents 846e4c7 + 811527a commit 1977729
Show file tree
Hide file tree
Showing 100 changed files with 1,657 additions and 630 deletions.
11 changes: 11 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# codecov.yml
coverage:
status:
project:
default:
threshold: 0.5%
target: 85%
patch:
default:
target: 90%

17 changes: 11 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nutui/nutui-react",
"version": "3.0.0-beta.8",
"name": "@nutui/nutui-react-taro",
"version": "3.0.0-beta.9",
"style": "dist/style.css",
"main": "dist/nutui.react.umd.js",
"module": "dist/es/packages/nutui.react.build.js",
Expand Down Expand Up @@ -102,8 +102,8 @@
},
"dependencies": {
"@babel/runtime": "^7.23.9",
"@nutui/icons-react": "^3.0.0-beta.1",
"@nutui/icons-react-taro": "^3.0.1-beta.0",
"@nutui/icons-react": "^3.0.0-beta.2",
"@nutui/icons-react-taro": "^3.0.0-beta.2",
"@nutui/jdesign-icons-react-taro": "1.0.6-beta.2",
"@nutui/touch-emulator": "^1.0.0",
"@react-spring/web": "~9.6.1",
Expand All @@ -113,6 +113,8 @@
"classnames": "^2.5.1",
"lodash.isequal": "^4.5.0",
"lodash.kebabcase": "^4.1.1",
"lottie-miniprogram": "^1.0.12",
"lottie-react": "^2.4.0",
"react-transition-group": "^4.4.5"
},
"devDependencies": {
Expand All @@ -131,8 +133,8 @@
"@swc/core": "^1.4.8",
"@tarojs/components": "4.0.8-beta.1",
"@tarojs/plugin-platform-alipay": "4.0.8-beta.1",
"@tarojs/plugin-platform-weapp": "4.0.8-beta.1",
"@tarojs/plugin-platform-jd": "4.0.8-beta.1",
"@tarojs/plugin-platform-weapp": "4.0.8-beta.1",
"@tarojs/react": "4.0.8-beta.1",
"@tarojs/taro": "4.0.8-beta.1",
"@testing-library/jest-dom": "^6.4.2",
Expand Down Expand Up @@ -228,6 +230,9 @@
},
"resolutions": {
"@types/react": "^18.2.57",
"@types/react-dom": "^18.2.19"
"@types/react-dom": "^18.2.19",
"sass": "1.77.6",
"@tarojs/api": "4.0.8-beta.1",
"@tarojs/components": "4.0.8-beta.1"
}
}
5 changes: 0 additions & 5 deletions packages/nutui-taro-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,5 @@
"postcss": "^8.4.35",
"stylelint": "^16.7.0",
"typescript": "^5.3.3"
},
"resolutions": {
"sass": "1.77.6",
"@tarojs/api": "4.0.8-beta.1",
"@tarojs/components": "4.0.8-beta.1"
}
}
470 changes: 367 additions & 103 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion src/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@
"desc": "多选按钮组",
"sort": 11,
"show": false,
"v15": true,
"exportEmpty": true,
"author": "oasis"
},
Expand Down Expand Up @@ -575,6 +576,7 @@
"sort": 3,
"show": true,
"taro": true,
"v15": true,
"author": "swag~jun"
}
]
Expand Down Expand Up @@ -649,6 +651,7 @@
"sort": 10,
"exportEmpty": true,
"show": false,
"v15": true,
"author": "oasis"
},
{
Expand Down Expand Up @@ -840,6 +843,7 @@
"sort": 15,
"show": true,
"taro": true,
"v15":true,
"author": "mike8625"
},
{
Expand All @@ -866,14 +870,15 @@
"author": "vickyYE"
},
{
"version": "2.0.0",
"version": "3.0.0",
"name": "Popover",
"type": "component",
"cName": "气泡弹出框",
"desc": "气泡弹出框",
"sort": 19,
"show": true,
"taro": true,
"v15": true,
"author": "lzz"
},
{
Expand Down Expand Up @@ -1075,6 +1080,18 @@
"v15": true,
"author": "liukun"
},
{
"version": "3.0.0",
"name": "Lottie",
"type": "component",
"cName": "动画/动效",
"desc": "给子元素添加动画效果",
"sort": 27,
"show": true,
"taro": true,
"v15": true,
"author": "swag~jun"
},
{
"version": "3.0.0",
"name": "Pagination",
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ exports[`icon type test 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M2 20h1.006C3.278 8.875 12.609 0 24 0s20.722 8.875 20.994 20H46a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-.508c-.269 7.663-6.658 13.743-14.49 13.992a.49.49 0 0 1-.502-.492v-2c0-.276.224-.499.5-.51 6.27-.245 11.223-5.075 11.49-10.99H41a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h.993C41.721 10.6 33.805 3 24 3S6.279 10.6 6.007 20H7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2m1 3v6h3v-6zm39 6h3v-6h-3zm-13.063-.858a.53.53 0 0 1 .72.011l1.413 1.415a.483.483 0 0 1-.007.698c-3.998 3.64-10.127 3.64-14.126 0a.483.483 0 0 1-.009-.698l1.415-1.415a.527.527 0 0 1 .718-.011 7.5 7.5 0 0 0 9.876 0"
d="M2 20h1.006C3.278 8.875 12.609 0 24 0c11.39 0 20.722 8.875 20.994 20H46a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-.508c-.269 7.663-6.658 13.743-14.49 13.992a.488.488 0 0 1-.502-.492v-2c0-.276.224-.499.5-.51 6.27-.245 11.223-5.075 11.49-10.99H41a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h.993C41.721 10.6 33.805 3 24 3 14.195 3 6.279 10.6 6.007 20H7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2m1 3v6h3v-6zm39 6h3v-6h-3zm-13.063-.858a.528.528 0 0 1 .72.011l1.413 1.415a.483.483 0 0 1-.007.698c-3.998 3.64-10.127 3.64-14.126 0a.483.483 0 0 1-.009-.698l1.415-1.415a.527.527 0 0 1 .718-.011 7.501 7.501 0 0 0 9.876 0"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ exports[`backtop custom test 1`] = `
<path
d="M43.042 18.666a.6.6 0 0 1 .062.846l-1.506 1.743a.6.6 0 0 1-.846.062L23.753 6.64V42.9a.6.6 0 0 1-.6.599H20.85a.6.6 0 0 1-.6-.6V6.64L3.25 21.318a.6.6 0 0 1-.846-.062L.898 19.512a.6.6 0 0 1 .062-.846L22.001.5z"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ exports[`should match custom icon 1`] = `
<path
d="M45.121 16.121 47.243 14 43 9.757l-2.121 2.122L19 33.757 7.121 21.88 5 19.757.757 24l2.122 2.121L14.757 38l2.122 2.121L19 42.243l2.121-2.122L23.243 38z"
fill="currentColor"
fill-opacity="0.9"
/>
</svg>
</div>
Expand Down
19 changes: 15 additions & 4 deletions src/packages/button/button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@
&-round {
border-radius: $button-border-radius;

&-xlarge,
&-xlarge {
border-radius: $button-xlarge-border-radius;
}

&-large {
border-radius: $button-large-border-radius;
}
Expand Down Expand Up @@ -178,7 +181,7 @@
padding: $button-large-padding;
font-size: $button-large-font-size;
font-weight: $button-large-font-weight;
border-radius: $radius-base;
border-radius: $radius-s;

.nut-button-text {
margin-left: $button-xlarge-text-icon-margin;
Expand All @@ -203,7 +206,7 @@
height: $button-small-height;
padding: $button-small-padding;
font-size: $button-small-font-size;
border-radius: $radius-s;
border-radius: $radius-xs;

.nut-icon {
font-size: $button-small-font-size;
Expand All @@ -220,7 +223,7 @@
height: $button-mini-height;
padding: $button-mini-padding;
font-size: $button-mini-font-size;
border-radius: $radius-s;
border-radius: $radius-xs;

.nut-icon {
font-size: $button-mini-font-size;
Expand All @@ -246,6 +249,11 @@
background: $button-primary-background-color;
color: $button-primary-color;
border-color: transparent;
font-weight: $font-weight-bold;
&.nut-button-small,
&.nut-button-mini {
font-weight: $font-weight;
}
}

&-disabled,
Expand Down Expand Up @@ -283,6 +291,9 @@
}
}
}
&-primary.nut-button-solid.nut-button-normal {
font-weight: $font-weight-bold;
}

&-success {
color: $button-success-color;
Expand Down
8 changes: 3 additions & 5 deletions src/packages/button/demos/h5/demo8.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,9 @@ import { Button } from '@nutui/nutui-react'

const Demo8 = () => {
return (
<>
<Button block type="primary">
Block Button
</Button>
</>
<Button block type="primary">
Block Button
</Button>
)
}
export default Demo8
22 changes: 6 additions & 16 deletions src/packages/button/demos/taro/demo10.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,13 @@
import React from 'react'
import { Button, Cell } from '@nutui/nutui-react-taro'
import { harmonyAndRn } from '@/utils/platform-taro'
import pxTransform from '@/utils/px-transform'
import { harmony } from '@/utils/platform-taro'

const App = () => {
const marginStyle = harmonyAndRn()
? {
width: pxTransform(120),
marginRight: pxTransform(8),
marginTop: pxTransform(8),
marginLeft: pxTransform(8),
marginBottom: pxTransform(8),
}
: {
marginRight: 8,
marginTop: 8,
marginLeft: 8,
marginBottom: 8,
}
const marginStyle = {
width: harmony() ? 120 : 'auto',
margin: 8,
}

return (
<Cell style={{ flexWrap: 'wrap' }}>
<Button color="blue" style={marginStyle}>
Expand Down
19 changes: 3 additions & 16 deletions src/packages/button/demos/taro/demo2.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
import React from 'react'
import { Button, Cell } from '@nutui/nutui-react-taro'
import { harmony } from '@/utils/platform-taro'
import pxTransform from '@/utils/px-transform'

const Demo2 = () => {
const marginStyle = harmony()
? {
width: pxTransform(90),
marginRight: pxTransform(8),
marginTop: pxTransform(8),
marginLeft: pxTransform(8),
marginBottom: pxTransform(8),
}
: {
marginRight: 8,
marginTop: 8,
marginLeft: 8,
marginBottom: 8,
}
const marginStyle = {
margin: 8,
}
return (
<Cell style={{ flexWrap: 'wrap' }}>
<Button type="primary" style={marginStyle}>
Expand Down
7 changes: 1 addition & 6 deletions src/packages/button/demos/taro/demo3.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
import React from 'react'
import { Button, Cell } from '@nutui/nutui-react-taro'
import pxTransform from '@/utils/px-transform'

const Demo3 = () => {
const marginStyle = {
width: pxTransform(80),
marginRight: pxTransform(8),
marginTop: pxTransform(8),
marginLeft: pxTransform(8),
marginBottom: pxTransform(8),
margin: 8,
}
return (
<Cell style={{ flexWrap: 'wrap' }}>
Expand Down
Loading

0 comments on commit 1977729

Please sign in to comment.