mirror of
https://github.com/zhigang1992/react.git
synced 2026-04-27 19:25:05 +08:00
release 2.1.0 (#451)
* feat: optimize fonts rendering on windows (#385) * feat(styles): set Inter to highest font * docs(fonts): add guide for fonts rendering on windows * test: udpate snapshots * chore: release v2.1.0-canary.0 * feat(table): add update row action to Table (#378) * feat: add update to Table's actions. add test and doc fix(table): fix comments * feat(table): improve type for table actions chore: update docs chore: remove unused types chore(table): improve docs Co-authored-by: William Castandet <williamcastandet@williams-air.home> Co-authored-by: unix <unix.bio@gmail.com> * refactor(use-theme): move use-theme to the top directory (#397) * refactor(use-theme): move use-theme to the top directory * chore(jest): ignore use-theme of forwarding * chore: release v2.1.0-canary.1 * feat(select): add clearable option to select multiple with test and english doc (#396) * docs: add clearable option to select multiple with test and english doc * fix: fix types for onClear * fix: fix import path for use-theme add more test for coverage * docs(select): add chinese document Co-authored-by: unix <unix.bio@gmail.com> * chore: release v2.1.0-canary.2 * fix(tabs): scrollable (#404) docs(tabs): scroll behavior * feat(textarea): resize prop (#416) * feat: add resize prop to textarea * docs: add resize prop for textarea * docs(textarea): improve docs and attributes for cn * test(textarea): update snapshots Co-authored-by: unix <unix.bio@gmail.com> * fix(types): replace path aliases in type files (#432) * fix(types): replace path aliases in type files * chore(lint): upgrade eslint and optimize code style * chore: fix type error for context handler * test: update snapshots * fix: use ttsc to identify aliases in type paths * feat(hooks): add a tool hooks for react context (#439) * feat(hooks): add a tool hooks for react context * chore: move use-context-state to internal tools style: fix lint warning * chore: simplify the structure of the catalog * refactor(themes): refactor theme module to keep multiple themes (#440) * refactor(themes): refactor theme module to keep multiple themes * chore: migrate APIs to be compatible with new theme system * test: update snapshots * chore: migrate the path of the theme module * feat(themes): append static methods of themes * chore: hide custom theme when no custom content in the context * chore: manually add flush to preload styles in html * docs(themes): update to fit the new theme system * chore: release v2.1.0-canary.3 (#450) * docs: add link to GH discussions * chore: upgrade deps * chore: update code style for prettier * chore: release v2.1.0-canary.3 * chore(deps): upgrade babel * chore: replace enzyme adapter with community repo to fit react.17 * test: updatee snapshots for auto typesetting * test(config): ignore unexported parts of the tools Co-authored-by: William <wcastand@gmail.com> Co-authored-by: William Castandet <williamcastandet@williams-air.home> Co-authored-by: Vaibhav Acharya <vaibhavacharya111@gmail.com> Co-authored-by: Paul van Dyk <39598117+PaulPCIO@users.noreply.github.com>
This commit is contained in:
@@ -2,21 +2,21 @@
|
||||
|
||||
exports[`Capacity should override background color 1`] = `
|
||||
initialize {
|
||||
"0": Object {
|
||||
"0": Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "50%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -56,10 +56,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -88,7 +88,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -108,22 +108,17 @@ initialize {
|
||||
"name": "div",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": null,
|
||||
"prev": null,
|
||||
"root": Object {
|
||||
"attribs": Object {},
|
||||
"parent": Node {
|
||||
"children": Array [
|
||||
[Circular],
|
||||
],
|
||||
"name": "root",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": null,
|
||||
"prev": null,
|
||||
"type": "root",
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
"prev": null,
|
||||
"type": "tag",
|
||||
"x-attribsNamespace": Object {
|
||||
"class": undefined,
|
||||
@@ -138,8 +133,6 @@ initialize {
|
||||
"length": 1,
|
||||
"options": Object {
|
||||
"decodeEntities": true,
|
||||
"normalizeWhitespace": false,
|
||||
"withDomLvl1": true,
|
||||
"xml": false,
|
||||
},
|
||||
}
|
||||
@@ -147,24 +140,24 @@ initialize {
|
||||
|
||||
exports[`Capacity should render different widths based on limit-value 1`] = `
|
||||
initialize {
|
||||
"0": Object {
|
||||
"0": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "20%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -204,10 +197,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -236,7 +229,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -255,21 +248,21 @@ initialize {
|
||||
],
|
||||
"name": "div",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "40%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -309,10 +302,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -341,7 +334,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -360,21 +353,21 @@ initialize {
|
||||
],
|
||||
"name": "div",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "66.67%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -414,10 +407,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -446,7 +439,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -502,21 +495,21 @@ initialize {
|
||||
"title": undefined,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "40%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -556,10 +549,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -588,7 +581,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -607,21 +600,21 @@ initialize {
|
||||
],
|
||||
"name": "div",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "66.67%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -661,10 +654,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -693,7 +686,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -726,21 +719,21 @@ initialize {
|
||||
},
|
||||
},
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "20%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -780,10 +773,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -812,7 +805,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -854,21 +847,21 @@ initialize {
|
||||
"title": undefined,
|
||||
},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "66.67%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -908,10 +901,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -940,7 +933,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -961,21 +954,21 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "40%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -1015,10 +1008,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -1047,7 +1040,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -1068,21 +1061,21 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": [Circular],
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {
|
||||
"class": "capacity ",
|
||||
"title": "20%",
|
||||
},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": Object {
|
||||
"next": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -1122,10 +1115,10 @@ initialize {
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
Object {
|
||||
Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [
|
||||
Object {
|
||||
Node {
|
||||
"data": "
|
||||
.capacity {
|
||||
width: 50px;
|
||||
@@ -1154,7 +1147,7 @@ initialize {
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": [Circular],
|
||||
"prev": Object {
|
||||
"prev": Node {
|
||||
"attribs": Object {},
|
||||
"children": Array [],
|
||||
"name": "span",
|
||||
@@ -1210,22 +1203,17 @@ initialize {
|
||||
"name": "div",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": null,
|
||||
"prev": null,
|
||||
"root": Object {
|
||||
"attribs": Object {},
|
||||
"parent": Node {
|
||||
"children": Array [
|
||||
[Circular],
|
||||
],
|
||||
"name": "root",
|
||||
"namespace": "http://www.w3.org/1999/xhtml",
|
||||
"next": null,
|
||||
"parent": null,
|
||||
"prev": null,
|
||||
"type": "root",
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
},
|
||||
"prev": null,
|
||||
"type": "tag",
|
||||
"x-attribsNamespace": Object {},
|
||||
"x-attribsPrefix": Object {},
|
||||
@@ -1234,8 +1222,6 @@ initialize {
|
||||
"length": 1,
|
||||
"options": Object {
|
||||
"decodeEntities": true,
|
||||
"normalizeWhitespace": false,
|
||||
"withDomLvl1": true,
|
||||
"xml": false,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { useMemo } from 'react'
|
||||
import withDefaults from '../utils/with-defaults'
|
||||
import useTheme from '../styles/use-theme'
|
||||
import useTheme from '../use-theme'
|
||||
import { useProportions } from '../utils/calculations'
|
||||
import { GeistUIThemesPalette } from '../styles/themes'
|
||||
import { GeistUIThemesPalette } from '../themes/presets'
|
||||
|
||||
interface Props {
|
||||
value?: number
|
||||
|
||||
Reference in New Issue
Block a user