@trionesdev/antd-taro-react 0.0.1-beta.3 → 0.0.1-beta.4
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/dist/Result/use-result-icon.d.ts +1 -1
- package/dist/SafeArea/style.scss +3 -3
- package/dist/Scaffold/scaffold.d.ts +2 -0
- package/dist/Scaffold/scaffold.js +5 -2
- package/dist/Switch/switch.d.ts +3 -0
- package/dist/Switch/switch.js +2 -1
- package/dist/TabBar/tab-bar.d.ts +2 -0
- package/dist/TabBar/tab-bar.js +5 -2
- package/dist/utils/use-isomorphic-update-layout-effect.d.ts +1 -1
- package/dist/utils/use-props-value.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const useResultIcon: (status?: 'success' | 'error' | 'info' | 'waiting' | 'warning') => string | number | boolean |
|
|
2
|
+
export declare const useResultIcon: (status?: 'success' | 'error' | 'info' | 'waiting' | 'warning') => string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null;
|
package/dist/SafeArea/style.scss
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
$class-prefix-safe-area: 'triones-antm-safe-area';
|
|
4
4
|
|
|
5
5
|
.#{$class-prefix-safe-area} {
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
display: block;
|
|
8
8
|
width: 100%;
|
|
9
9
|
|
|
10
10
|
&-position-top {
|
|
11
|
-
padding-top: calc(env(safe-area-inset-top) *
|
|
11
|
+
padding-top: calc(env(safe-area-inset-top) * $trionesSafeAreaMultiple);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
&-position-bottom {
|
|
15
|
-
padding-bottom: calc(env(safe-area-inset-bottom) *
|
|
15
|
+
padding-bottom: calc(env(safe-area-inset-bottom) * $trionesSafeAreaMultiple);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -3,12 +3,15 @@ import React from 'react';
|
|
|
3
3
|
import SafeArea from "../SafeArea";
|
|
4
4
|
import "./style.scss";
|
|
5
5
|
export var Scaffold = function Scaffold(_ref) {
|
|
6
|
-
var
|
|
6
|
+
var className = _ref.className,
|
|
7
|
+
style = _ref.style,
|
|
8
|
+
appBar = _ref.appBar,
|
|
7
9
|
children = _ref.children,
|
|
8
10
|
bottomNavigationBar = _ref.bottomNavigationBar;
|
|
9
11
|
var scaffoldCls = 'triones-antm-scaffold';
|
|
10
12
|
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
-
className: classNames(scaffoldCls)
|
|
13
|
+
className: classNames(scaffoldCls, className),
|
|
14
|
+
style: style
|
|
12
15
|
}, appBar && /*#__PURE__*/React.createElement(SafeArea, {
|
|
13
16
|
position: 'top'
|
|
14
17
|
}, appBar), /*#__PURE__*/React.createElement("div", {
|
package/dist/Switch/switch.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { FC, ReactNode } from 'react';
|
|
2
3
|
import { NativeProps } from '../utils/native-props';
|
|
3
4
|
import './style.scss';
|
|
4
5
|
export type SwitchProps = {
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
5
8
|
loading?: boolean;
|
|
6
9
|
disabled?: boolean;
|
|
7
10
|
checked?: boolean;
|
package/dist/Switch/switch.js
CHANGED
|
@@ -103,7 +103,8 @@ export var Switch = function Switch(p) {
|
|
|
103
103
|
}
|
|
104
104
|
return withNativeProps(props, /*#__PURE__*/React.createElement("div", {
|
|
105
105
|
onClick: onClick,
|
|
106
|
-
className: classNames(classPrefix, _defineProperty(_defineProperty({}, "".concat(classPrefix, "-checked"), checked), "".concat(classPrefix, "-disabled"), disabled || changing)),
|
|
106
|
+
className: classNames(classPrefix, p.className, _defineProperty(_defineProperty({}, "".concat(classPrefix, "-checked"), checked), "".concat(classPrefix, "-disabled"), disabled || changing)),
|
|
107
|
+
style: p.style,
|
|
107
108
|
role: "switch",
|
|
108
109
|
"aria-label": locale.Switch.name,
|
|
109
110
|
"aria-checked": checked,
|
package/dist/TabBar/tab-bar.d.ts
CHANGED
package/dist/TabBar/tab-bar.js
CHANGED
|
@@ -51,7 +51,9 @@ export var TabBarItem = function TabBarItem(_ref) {
|
|
|
51
51
|
}, label)));
|
|
52
52
|
};
|
|
53
53
|
export var TabBar = function TabBar(_ref2) {
|
|
54
|
-
var
|
|
54
|
+
var className = _ref2.className,
|
|
55
|
+
style = _ref2.style,
|
|
56
|
+
activeKey = _ref2.activeKey,
|
|
55
57
|
defaultActiveKey = _ref2.defaultActiveKey,
|
|
56
58
|
items = _ref2.items,
|
|
57
59
|
children = _ref2.children,
|
|
@@ -70,7 +72,8 @@ export var TabBar = function TabBar(_ref2) {
|
|
|
70
72
|
onTabClick: onClick
|
|
71
73
|
}
|
|
72
74
|
}, /*#__PURE__*/React.createElement("div", {
|
|
73
|
-
className: classNames(tabBarCls)
|
|
75
|
+
className: classNames(tabBarCls, className),
|
|
76
|
+
style: style
|
|
74
77
|
}, /*#__PURE__*/React.createElement("div", {
|
|
75
78
|
className: classNames("".concat(tabBarCls, "-wrap"))
|
|
76
79
|
}, !_.isEmpty(items) && items.map(function (item) {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare const useIsomorphicUpdateLayoutEffect: typeof import("react").
|
|
2
|
+
export declare const useIsomorphicUpdateLayoutEffect: typeof import("react").useLayoutEffect | typeof import("react").useEffect;
|
|
@@ -4,5 +4,5 @@ type Options<T> = {
|
|
|
4
4
|
defaultValue: T;
|
|
5
5
|
onChange?: (v: T) => void;
|
|
6
6
|
};
|
|
7
|
-
export declare function usePropsValue<T>(options: Options<T>): readonly [T, (
|
|
7
|
+
export declare function usePropsValue<T>(options: Options<T>): readonly [T, (v: SetStateAction<T>, forceTrigger?: boolean) => void];
|
|
8
8
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trionesdev/antd-taro-react",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.4",
|
|
4
4
|
"description": "antd taro react ",
|
|
5
5
|
"module": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"optionalDependencies": {
|
|
103
103
|
"@trionesdev/antd-taro-icons-react": "^0.0.1-beta.1"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "953e90e7f4bc98d4d14f32f823e592bed8aa1da8"
|
|
106
106
|
}
|