Skip to content

Commit 3f5158c

Browse files
committed
chore: merge main
2 parents d0df64d + 90e8193 commit 3f5158c

File tree

43 files changed

+915
-919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+915
-919
lines changed

.github/workflows/pkg-pr-new.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish_Any_Commit
2+
on:
3+
push:
4+
branches: [develop]
5+
pull_request:
6+
branches: [develop]
7+
8+
jobs:
9+
build:
10+
if: ${{ github.repository == 'Tencent/tdesign-mobile-react' && !startsWith(github.head_ref, 'release/') }}
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
submodules: recursive
17+
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
21+
22+
- run: npm install
23+
24+
- run: npm run build
25+
26+
- run: npx pkg-pr-new publish --compact

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "tdesign-mobile-react",
3-
"version": "0.12.0",
3+
"version": "0.13.0-beta",
44
"description": "TDesign Component for Mobile React",
55
"title": "tdesign-mobile-react",
66
"main": "cjs/index.js",
@@ -150,8 +150,9 @@
150150
"rollup-plugin-styles": "^3.14.1",
151151
"rollup-plugin-terser": "^7.0.2",
152152
"rollup-plugin-typescript2": "^0.31.2",
153-
"tdesign-icons-view": "^0.3.4",
153+
"tdesign-icons-view": "^0.3.5",
154154
"tdesign-site-components": "^0.15.6",
155+
"tdesign-theme-generator": "^1.1.0",
155156
"typescript": "^4.5.3",
156157
"vite": "^2.7.0",
157158
"vite-plugin-pwa": "^0.11.11",
@@ -171,7 +172,7 @@
171172
"react-spring": "9.6.1",
172173
"react-transition-group": "^4.4.2",
173174
"smoothscroll-polyfill": "^0.4.4",
174-
"tdesign-icons-react": "^0.4.3",
175+
"tdesign-icons-react": "^0.4.4",
175176
"tinycolor2": "^1.6.0"
176177
},
177178
"config": {

site/mobile/App.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ function Components() {
3030
const location = useLocation();
3131
const name = location.pathname.slice(1);
3232
const title = getCurrentRoute(siteConfig.docs, name)?.title;
33-
console.log('title', title)
3433

3534
return (
3635
<>

site/style/mobile/demo.less

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.tdesign-mobile-demo {
2-
background-color: #f6f6f6;
2+
background-color: var(--bg-color-demo);
33
font-family: 'PingFang SC';
44
padding-bottom: 28px;
55
box-sizing: border-box;
@@ -9,21 +9,19 @@
99
font-weight: 700;
1010
line-height: 32px;
1111
padding: 24px 16px 0;
12-
color: rgba(0, 0, 0, 0.9);
1312
}
1413

1514
.summary {
1615
font-size: 14px;
17-
color: rgba(0, 0, 0, 0.6);
1816
margin: 8px 16px 0;
1917
line-height: 22px;
2018
}
2119

2220
&-block {
2321
margin: 32px 0 0;
22+
color: var(--text-primary);
2423

2524
&__header {
26-
color: #000;
2725
margin: 0 16px;
2826
}
2927

@@ -37,7 +35,7 @@
3735
margin-top: 8px;
3836
font-size: 14px;
3937
white-space: pre-line;
40-
color: rgba(0, 0, 0, 0.6);
38+
color: var(--text-secondary);
4139
line-height: 22px;
4240
}
4341

@@ -65,13 +63,13 @@
6563
font-weight: 700;
6664
line-height: 32px;
6765
padding: 24px 16px 0;
68-
color: rgba(0, 0, 0, 0.9);
66+
color: var(--text-primary);
6967
}
7068

7169
&__summary {
7270
font-size: 14px;
73-
color: rgba(0, 0, 0, 0.6);
7471
margin: 8px 16px 0;
7572
line-height: 22px;
73+
color: var(--text-secondary);
7674
}
7775
}

site/style/mobile/index.less

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
@import '../vars.less';
22
@import './demo.less';
33

4-
body {
5-
background-color: #f5f5f5;
4+
:root,
5+
:root[theme-mode='light'] {
6+
--bg-color-demo: #fff;
7+
--text-primary: #181818;
8+
--text-secondary: #181818;
9+
}
10+
11+
:root[theme-mode='dark'] {
12+
--bg-color-demo: #181818;
13+
--text-primary: rgba(255, 255, 255, 0.9);
14+
--text-secondary: rgba(255, 255, 255, .55);
615
}
716

817
.tdesign-demo-topnav {
@@ -11,7 +20,8 @@ body {
1120
align-items: center;
1221
justify-content: center;
1322
height: 50px;
14-
background-color: #fff;
23+
background-color: var(--bg-color-demo);
24+
color: var(--text-primary);
1525
box-shadow: @shadow-level-1;
1626
&-title {
1727
font-size: 18px;

site/web/App.jsx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import React, { useEffect, useRef, useState, lazy, Suspense } from 'react';
2-
import { BrowserRouter, Routes, Navigate, Route, useLocation, useNavigate, Outlet } from 'react-router-dom';
3-
import siteConfig from './site.config';
4-
import { getRoute, filterVersions } from './utils';
1+
import React, { lazy, Suspense, useEffect, useRef, useState } from 'react';
2+
import { BrowserRouter, Navigate, Outlet, Route, Routes, useLocation, useNavigate } from 'react-router-dom';
3+
54
import packageJson from '@/package.json';
5+
import siteConfig from './site.config';
6+
import { filterVersions, getRoute } from './utils';
67

78
const LazyDemo = lazy(() => import('./Demo'));
89

@@ -114,6 +115,8 @@ function Components() {
114115
<Outlet />
115116
<td-doc-footer slot="doc-footer" platform="mobile"></td-doc-footer>
116117
</td-doc-content>
118+
119+
<td-theme-generator device="mobile" />
117120
</td-doc-layout>
118121
);
119122
}

site/web/main.jsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from 'react';
22
import ReactDOM from 'react-dom';
3-
import { registerLocaleChange } from 'tdesign-site-components';
4-
import App from './App';
5-
6-
import '../style/web/index.less';
73

8-
import 'tdesign-site-components/lib/styles/style.css';
9-
import 'tdesign-site-components/lib/styles/prism-theme.less';
4+
import { registerLocaleChange } from 'tdesign-site-components';
105
import 'tdesign-site-components/lib/styles/prism-theme-dark.less';
6+
import 'tdesign-site-components/lib/styles/prism-theme.less';
7+
import 'tdesign-site-components/lib/styles/style.css';
118

12-
// import icons webcomponents
139
import 'tdesign-icons-view';
10+
import 'tdesign-theme-generator';
11+
12+
import App from './App';
13+
import '../style/web/index.less';
1414

1515
registerLocaleChange();
1616
ReactDOM.render(

src/avatar/_example/style/index.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,3 @@
3939
margin-left: 16px;
4040
margin-bottom: 16px;
4141
}
42-
43-
.tdesign-mobile-demo {
44-
background-color: var(--bg-color-demo, #fff);
45-
}

src/button/_example/style/index.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
.tdesign-mobile-demo {
2-
background-color: #ffffff;
32
padding-bottom: 28px;
43
box-sizing: border-box;
54

src/count-down/_example/style/index.less

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
.tdesign-mobile-demo {
2-
background-color: #fff;
3-
}
4-
51
.demo-count-down-desc {
62
color: var(--td-text-color-secondary, rgba(0, 0, 0, 0.6));
73
font-size: 14px;

0 commit comments

Comments
 (0)