@yup/taro-ui 0.0.8 → 0.1.0
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/README.md +52 -1
- package/es/_virtual/_rollupPluginBabelHelpers.js +1 -1
- package/es/components/button/index.d.ts +19 -3
- package/es/components/button/index.js +1 -1
- package/es/components/button/style/index.css +81 -29
- package/es/components/button/style/index.d.ts +1 -0
- package/es/components/button/style/index.js +1 -0
- package/es/components/checkbox/checkbox-group.d.ts +6 -2
- package/es/components/checkbox/checkbox-group.js +1 -1
- package/es/components/checkbox/index.js +1 -1
- package/es/components/checkbox/style/index.css +2 -24
- package/es/components/checkbox/style/index.d.ts +1 -0
- package/es/components/checkbox/style/index.js +1 -0
- package/es/components/date-picker-view/index.d.ts +40 -0
- package/es/components/date-picker-view/index.js +1 -0
- package/es/components/date-picker-view/style/index.css +3 -0
- package/es/components/date-picker-view/style/index.d.ts +2 -0
- package/es/components/date-picker-view/style/index.js +2 -0
- package/es/components/date-picker-view/util.d.ts +7 -0
- package/es/components/date-picker-view/util.js +1 -0
- package/es/components/form/form-item.js +1 -1
- package/es/components/form/index.js +1 -1
- package/es/components/form/style/index.css +0 -22
- package/es/components/form/style/index.d.ts +1 -0
- package/es/components/form/style/index.js +1 -0
- package/es/components/icon/index.d.ts +12 -0
- package/es/components/icon/index.js +1 -0
- package/es/components/icon/style/iconfont.css +60 -0
- package/es/components/icon/style/iconfont.ttf +0 -0
- package/es/components/icon/style/iconfont.woff +0 -0
- package/es/components/icon/style/iconfont.woff2 +0 -0
- package/es/components/icon/style/index.d.ts +1 -0
- package/es/components/icon/style/index.js +1 -0
- package/es/components/input/index.d.ts +12 -0
- package/es/components/input/index.js +1 -1
- package/es/components/input/style/index.css +28 -27
- package/es/components/input/style/index.d.ts +2 -0
- package/es/components/input/style/index.js +2 -0
- package/es/components/input/style/search.css +21 -0
- package/es/components/picker-view/index.d.ts +25 -0
- package/es/components/picker-view/index.js +1 -0
- package/es/components/picker-view/style/index.css +62 -0
- package/es/components/picker-view/style/index.d.ts +2 -0
- package/es/components/picker-view/style/index.js +2 -0
- package/es/components/popup/index.d.ts +62 -0
- package/es/components/popup/index.js +1 -0
- package/es/components/popup/style/index.css +91 -0
- package/es/components/popup/style/index.d.ts +2 -0
- package/es/components/popup/style/index.js +2 -0
- package/es/components/radio/context.d.ts +5 -0
- package/es/components/radio/context.js +1 -0
- package/es/components/radio/index.js +1 -1
- package/es/components/radio/radio-group.js +1 -1
- package/es/components/radio/style/group.css +0 -22
- package/es/components/radio/style/index.d.ts +1 -0
- package/es/components/radio/style/index.js +1 -0
- package/es/components/radio/style/radio.css +11 -24
- package/es/components/safe-area/index.d.ts +13 -0
- package/es/components/safe-area/index.js +1 -0
- package/es/components/safe-area/style/index.css +3 -0
- package/es/components/safe-area/style/index.d.ts +2 -0
- package/es/components/safe-area/style/index.js +2 -0
- package/es/components/safe-area/util.d.ts +5 -0
- package/es/components/safe-area/util.js +1 -0
- package/es/components/switch/index.d.ts +6 -0
- package/es/components/switch/index.js +1 -0
- package/es/components/switch/style/index.css +38 -0
- package/es/components/switch/style/index.d.ts +2 -0
- package/es/components/switch/style/index.js +2 -0
- package/es/components/toast/style/index.css +0 -22
- package/es/components/toast/style/index.d.ts +1 -0
- package/es/components/toast/style/index.js +1 -0
- package/es/components/toast/toast.js +1 -1
- package/es/components/toast/withToast.js +1 -1
- package/es/global/global.css +18 -0
- package/es/global/index.d.ts +2 -1
- package/es/global/theme-default.css +18 -0
- package/es/global/variables.css +0 -0
- package/es/hooks/useRefState.d.ts +7 -0
- package/es/hooks/useRefState.js +1 -0
- package/es/index.d.ts +6 -0
- package/es/index.js +1 -1
- package/es/node_modules/@yup/taro-checkbox/dist/_virtual/_rollupPluginBabelHelpers.js +1 -0
- package/es/node_modules/@yup/taro-checkbox/dist/checkbox-group.js +1 -0
- package/es/node_modules/@yup/taro-checkbox/dist/context.js +1 -0
- package/es/node_modules/@yup/taro-checkbox/dist/index.js +1 -0
- package/es/node_modules/@yup/taro-form/dist/_virtual/_rollupPluginBabelHelpers.js +3 -0
- package/es/node_modules/@yup/taro-form/dist/context.js +1 -0
- package/es/node_modules/@yup/taro-form/dist/formItem.js +1 -0
- package/es/node_modules/@yup/taro-form/dist/fromStore.js +1 -0
- package/es/node_modules/@yup/taro-form/dist/index.js +1 -0
- package/es/node_modules/@yup/taro-form/dist/useForm.js +1 -0
- package/es/node_modules/@yup/taro-form/dist/useWatch.js +1 -0
- package/es/node_modules/@yup/taro-radio/dist/_virtual/_rollupPluginBabelHelpers.js +1 -0
- package/es/node_modules/@yup/taro-radio/dist/context.js +1 -0
- package/es/node_modules/@yup/taro-radio/dist/index.js +1 -0
- package/es/node_modules/@yup/taro-radio/dist/radio-group.js +1 -0
- package/es/style/iconfont.ttf +0 -0
- package/es/style/iconfont.woff +0 -0
- package/es/style/iconfont.woff2 +0 -0
- package/es/style/index.css +225 -203
- package/package.json +12 -7
- package/es/_virtual/_commonjsHelpers.js +0 -1
- package/es/_virtual/index.js +0 -1
- package/es/_virtual/jsx-runtime.js +0 -1
- package/es/_virtual/react-jsx-runtime.development.js +0 -1
- package/es/_virtual/react-jsx-runtime.production.min.js +0 -1
- package/es/global.css +0 -22
- package/es/node_modules/classnames/index.js +0 -1
- package/es/node_modules/react/cjs/react-jsx-runtime.development.js +0 -1
- package/es/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -10
- package/es/node_modules/react/jsx-runtime.js +0 -1
- package/es/utils/react.d.ts +0 -2
|
@@ -1,37 +1,23 @@
|
|
|
1
1
|
:root,
|
|
2
|
-
page {
|
|
3
|
-
--ypmini-hd: 2;
|
|
4
|
-
--yp-color-primary: #0092ff;
|
|
5
|
-
--yp-color-text: rgba(0, 0, 0, 0.85);
|
|
6
|
-
--yp-color-text-light: #0092ff;
|
|
7
|
-
--yp-color-text-weak: rgba(0, 0, 0, 0.45);
|
|
8
|
-
--yp-border-color: #e9edf3;
|
|
9
|
-
--yp-color-text-primary: #333;
|
|
10
|
-
--yp-color-text-link: var(--yp-color-primary);
|
|
11
|
-
--yp-color-text-secondary: #666;
|
|
12
|
-
--yp-color-text-disabled: #ccc;
|
|
13
|
-
--yp-color-text-placeholder: #999;
|
|
14
|
-
--yp-font-size-default: calc(17px * var(--ypmini-hd));
|
|
15
|
-
--yp-radio-circle-checked-color: var(--yp-color-primary);
|
|
16
|
-
--yp-radio-button-checked-color: var(--yp-color-primary);
|
|
17
|
-
--yp-checkbox-circle-checked-color: var(--yp-color-primary);
|
|
18
|
-
--yp-checkbox-button-checked-color: var(--yp-color-primary);
|
|
19
|
-
--yp-border-radius-base: calc(4px * var(--ypmini-hd));
|
|
20
|
-
--yp-border-radius-button: calc(8px * var(--ypmini-hd));
|
|
21
|
-
--yp-space-horizontal-base: calc(12px * var(--ypmini-hd));
|
|
22
|
-
}
|
|
23
|
-
:root,
|
|
24
2
|
page {
|
|
25
3
|
--input-placeholder-color: rgba(0, 0, 0, 0.25);
|
|
26
|
-
--input-text-color: var(--
|
|
27
|
-
--input-font-size: var(--
|
|
4
|
+
--input-text-color: var(--ypmini-color-text);
|
|
5
|
+
--input-font-size: var(--ypmini-font-size-default);
|
|
6
|
+
--input-delete-cion-color: #00000040;
|
|
7
|
+
--input-delete-cion-size: calc(var(--ypmini-hd) * 16px);
|
|
8
|
+
--input-height: calc(48px * var(--ypmini-hd));
|
|
9
|
+
--input-prefix-icon-size: calc(16px * var(--ypmini-hd));
|
|
10
|
+
--input-border-color: var(--ypmini-border-color);
|
|
11
|
+
--input-prefix-icon-color: #000000a6;
|
|
28
12
|
}
|
|
29
13
|
.ypmini-taro-input-wrapper {
|
|
30
14
|
display: flex;
|
|
15
|
+
align-items: center;
|
|
16
|
+
height: var(--input-height);
|
|
31
17
|
font-size: var(--input-font-size);
|
|
32
|
-
padding:
|
|
18
|
+
padding: 0px 24px;
|
|
33
19
|
border-radius: 16px;
|
|
34
|
-
border: 2px solid
|
|
20
|
+
border: 2px solid var(--input-border-color);
|
|
35
21
|
box-sizing: border-box;
|
|
36
22
|
}
|
|
37
23
|
.ypmini-taro-input-borderless-wrapper {
|
|
@@ -48,6 +34,14 @@ page {
|
|
|
48
34
|
.ypmini-input-placeholder {
|
|
49
35
|
color: var(--input-placeholder-color);
|
|
50
36
|
}
|
|
37
|
+
.ypmini-taro-input-clear {
|
|
38
|
+
display: flex;
|
|
39
|
+
align-items: center;
|
|
40
|
+
}
|
|
41
|
+
.ypmini-taro-input-clear-icon {
|
|
42
|
+
color: var(--input-delete-cion-color);
|
|
43
|
+
font-size: var(--input-delete-cion-size);
|
|
44
|
+
}
|
|
51
45
|
.ypmini-taro-input-count {
|
|
52
46
|
color: rgba(0, 0, 0, 0.45);
|
|
53
47
|
font-size: 30px;
|
|
@@ -56,5 +50,12 @@ page {
|
|
|
56
50
|
margin-left: 8px;
|
|
57
51
|
}
|
|
58
52
|
.ypmini-taro-input-count .ypmini-taro-input-count-current-light {
|
|
59
|
-
color: var(--
|
|
53
|
+
color: var(--ypmini-color-text-light);
|
|
54
|
+
}
|
|
55
|
+
.ypmini-taro-input-prefix-icon-wrapper {
|
|
56
|
+
display: flex;
|
|
57
|
+
align-items: center;
|
|
58
|
+
font-size: var(--input-prefix-icon-size);
|
|
59
|
+
margin-right: 16px;
|
|
60
|
+
color: var(--input-prefix-icon-color);
|
|
60
61
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page {
|
|
3
|
+
--search-input-backgroud: hsl(223, 54%, 97%);
|
|
4
|
+
--search-input-height: calc(var(--ypmini-hd) * 48px);
|
|
5
|
+
--search-input-font-size: calc(var(--ypmini-hd) * 15px);
|
|
6
|
+
}
|
|
7
|
+
.ypmini-search-input-wrapper {
|
|
8
|
+
padding: 0px 24px;
|
|
9
|
+
border-radius: 16px;
|
|
10
|
+
height: var(--search-input-height);
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
align-items: center;
|
|
13
|
+
font-size: var(--search-input-font-size);
|
|
14
|
+
background: var(--search-input-backgroud);
|
|
15
|
+
}
|
|
16
|
+
.ypmini-search-input {
|
|
17
|
+
font-size: var(--input-font-size);
|
|
18
|
+
}
|
|
19
|
+
.ypmini-search-input-icon {
|
|
20
|
+
font-size: 32px;
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PickerViewProps as TaroPickerViewProps } from '@tarojs/components';
|
|
3
|
+
export interface ColumnType {
|
|
4
|
+
label?: React.ReactNode;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
export interface PickerViewProps extends Omit<TaroPickerViewProps, 'children'> {
|
|
8
|
+
/**
|
|
9
|
+
* picker-view列配置数据
|
|
10
|
+
*/
|
|
11
|
+
columns: ColumnType[][];
|
|
12
|
+
/**
|
|
13
|
+
* 是否禁用
|
|
14
|
+
*/
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 自定义选项格式化
|
|
18
|
+
*/
|
|
19
|
+
cellRender?: (item: ColumnType, option: {
|
|
20
|
+
colIndex: number;
|
|
21
|
+
originNode: React.ReactNode;
|
|
22
|
+
}) => React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
declare const PickerView: React.FC<PickerViewProps>;
|
|
25
|
+
export default PickerView;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{objectWithoutProperties as i,objectSpread2 as e}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as r,jsx as a}from"react/jsx-runtime";import l from"classnames";import{View as n,PickerView as c,PickerViewColumn as s}from"@tarojs/components";var o=["columns","className","indicatorClass","cellRender","disabled"],m=function(m){var t=m.columns,p=m.className,u=m.indicatorClass,d=m.cellRender,v=m.disabled,f=i(m,o);return r(n,{className:l("ypmini-picker-view-wrapper",p),children:[v?a(n,{className:"ypmini-picker-view-mask"}):null,a(c,e(e({className:l("ypmini-picker-view"),indicatorClass:l("ypmini-picker-view-indicator",u)},f),{},{children:null==t?void 0:t.map(function(i,e){return a(s,{className:"ypmini-picker-view-column",children:null==i?void 0:i.map(function(i){return function(i,e){var r=a(n,{className:"ypmini-picker-view-column-item",children:i.label},i.value);return d?d(i,{colIndex:e,originNode:r}):r}(i,e)})},e)})}))]})};export{m as default};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page {
|
|
3
|
+
--ypmini-picker-view-column-font-size: var(--ypmini-font-size-large);
|
|
4
|
+
--ypmini-picker-view-column-font-color: #00000040;
|
|
5
|
+
--ypmini-picker-view-column-active-fot-color: ##000000a6;
|
|
6
|
+
--ypmini-picker-view-column-active-font-size: var(--ypmini-font-size-max);
|
|
7
|
+
--ypmini-picker-view-column-height: calc(var(--ypmini-hd) * 52px);
|
|
8
|
+
--ypmini-picker-view-indicator-background-color: #f5f7fc;
|
|
9
|
+
--ypmini-picker-view-indicator-border-radius: calc(var(--ypmini-hd) * 8px);
|
|
10
|
+
--ypmini-picker-view-disabled-mask-index: 100;
|
|
11
|
+
--ypmini-picker-view-disabled-mask-background-color: rgba(255, 255, 255, 0.6);
|
|
12
|
+
}
|
|
13
|
+
.ypmini-picker-view-wrapper {
|
|
14
|
+
position: relative;
|
|
15
|
+
height: 100%;
|
|
16
|
+
}
|
|
17
|
+
.ypmini-picker-view {
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
.ypmini-picker-view-column {
|
|
21
|
+
z-index: 20;
|
|
22
|
+
}
|
|
23
|
+
.ypmini-picker-view-column .ypmini-picker-view-indicator {
|
|
24
|
+
background: var(--ypmini-picker-view-indicator-background-color);
|
|
25
|
+
z-index: 0;
|
|
26
|
+
}
|
|
27
|
+
.ypmini-picker-view-column::first-child .ypmini-picker-view-indicator {
|
|
28
|
+
border-top-left-radius: var(--ypmini-picker-view-indicator-border-radius);
|
|
29
|
+
border-bottom-left-radius: var(--ypmini-picker-view-indicator-border-radius);
|
|
30
|
+
}
|
|
31
|
+
.ypmini-picker-view-column::last-child .ypmini-picker-view-indicator {
|
|
32
|
+
border-top-right-radius: var(--ypmini-picker-view-indicator-border-radius);
|
|
33
|
+
border-bottom-right-radius: var(--ypmini-picker-view-indicator-border-radius);
|
|
34
|
+
}
|
|
35
|
+
.ypmini-picker-view-column-item {
|
|
36
|
+
height: var(--ypmini-picker-view-column-height);
|
|
37
|
+
line-height: var(--ypmini-picker-view-column-height);
|
|
38
|
+
font-size: var(--ypmini-picker-view-column-font-size);
|
|
39
|
+
}
|
|
40
|
+
.ypmini-picker-view-indicator {
|
|
41
|
+
height: var(--ypmini-picker-view-column-height);
|
|
42
|
+
background: var(--ypmini-picker-view-indicator-background-color);
|
|
43
|
+
z-index: 0;
|
|
44
|
+
border-radius: 16px;
|
|
45
|
+
border-bottom: unset;
|
|
46
|
+
border-top: unset;
|
|
47
|
+
}
|
|
48
|
+
.ypmini-picker-view-indicator::before {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
.ypmini-picker-view-indicator::after {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
.ypmini-picker-view-mask {
|
|
55
|
+
position: absolute;
|
|
56
|
+
left: 0;
|
|
57
|
+
right: 0;
|
|
58
|
+
bottom: 0;
|
|
59
|
+
top: 0;
|
|
60
|
+
z-index: var(--ypmini-picker-view-disabled-mask-index);
|
|
61
|
+
background-color: var(--ypmini-picker-view-disabled-mask-background-color);
|
|
62
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewProps } from '@tarojs/components';
|
|
3
|
+
export interface PopupProps extends Omit<ViewProps, 'children'> {
|
|
4
|
+
/**
|
|
5
|
+
* 是否显示弹出层
|
|
6
|
+
*/
|
|
7
|
+
visible?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* 弹出层内容
|
|
10
|
+
*/
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* 是否显示遮罩层
|
|
14
|
+
*/
|
|
15
|
+
mask?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 点击遮罩层是否关闭
|
|
18
|
+
*/
|
|
19
|
+
maskClosable?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 弹出层圆角
|
|
22
|
+
*/
|
|
23
|
+
round?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 动画时长,单位毫秒
|
|
26
|
+
*/
|
|
27
|
+
duration?: number;
|
|
28
|
+
/**
|
|
29
|
+
* 关闭时触发
|
|
30
|
+
*/
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* 动画结束后触发
|
|
34
|
+
*/
|
|
35
|
+
afterClose?: () => void;
|
|
36
|
+
/**
|
|
37
|
+
* 点击取消触发
|
|
38
|
+
*/
|
|
39
|
+
onCancel?: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* 点击确认后触发
|
|
42
|
+
*/
|
|
43
|
+
onConfirm?: () => void;
|
|
44
|
+
/**
|
|
45
|
+
* 标题
|
|
46
|
+
*/
|
|
47
|
+
title?: React.ReactNode;
|
|
48
|
+
/**
|
|
49
|
+
* 取消按钮文字
|
|
50
|
+
*/
|
|
51
|
+
cancelText?: React.ReactNode;
|
|
52
|
+
/**
|
|
53
|
+
* 确认按钮文字
|
|
54
|
+
*/
|
|
55
|
+
confirmText?: React.ReactNode;
|
|
56
|
+
/**
|
|
57
|
+
* 自定义头
|
|
58
|
+
*/
|
|
59
|
+
customHeader?: React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
declare const Popup: React.FC<PopupProps>;
|
|
62
|
+
export default Popup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{objectWithoutProperties as i,slicedToArray as e,objectSpread2 as o}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";import{useState as a,useEffect as l}from"react";import p from"classnames";import{View as t}from"@tarojs/components";var s=["visible","children","className","mask","maskClosable","round","duration","onClose","afterClose","onCancel","onConfirm","cancelText","confirmText","title","style","customHeader"],c=function(c){var m=c.visible,u=void 0!==m&&m,d=c.children,f=c.className,v=c.mask,y=void 0===v||v,C=c.maskClosable,h=void 0===C||C,b=c.round,k=void 0===b||b,N=c.duration,T=void 0===N?300:N,x=c.onClose,j=c.afterClose,H=c.onCancel,P=c.onConfirm,g=c.cancelText,w=void 0===g?"取消":g,_=c.confirmText,A=void 0===_?"确定":_,B=c.title,S=c.style,W=c.customHeader,q=i(c,s),z=a(!1),D=e(z,2),E=D[0],F=D[1],G=a(!1),I=e(G,2),J=I[0],K=I[1];l(function(){if(u){K(!0);var i=setTimeout(function(){F(!0)},10);return function(){return clearTimeout(i)}}F(!1);var e=setTimeout(function(){K(!1),null==j||j()},T);return function(){return clearTimeout(e)}},[u,T,j]);return J?n(t,o(o({className:p("ypmini-popup-wrapper",{"ypmini-popup-wrapper-visible":E}),style:{"--ypmini-popup-duration":"".concat(T,"ms")}},q),{},{children:[y&&r(t,{className:p("ypmini-popup-mask",{"ypmini-popup-mask-visible":E}),onClick:function(){h&&(null==x||x())}}),n(t,{className:p("ypmini-popup",f,{"ypmini-popup-visible":E,"ypmini-popup-round":k}),style:S,onClick:function(i){i.stopPropagation()},children:[W||n(t,{className:"ypmini-popup-header",children:[r(t,{className:"ypmini-popup-header-cancel",onClick:function(){null==H||H()},children:w}),r(t,{className:"ypmini-popup-header-title",children:B}),r(t,{className:"ypmini-popup-header-confirm",onClick:function(){null==P||P()},children:A})]}),d]})]})):null};export{c as default};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page {
|
|
3
|
+
--ypmini-popup-background: #fff;
|
|
4
|
+
--ypmini-popup-border-radius: calc(12px * var(--ypmini-hd));
|
|
5
|
+
--ypmini-popup-mask-background: rgba(0, 0, 0, 0.5);
|
|
6
|
+
--ypmini-popup-z-index: 1000;
|
|
7
|
+
--ypmini-popup-duration: 300ms;
|
|
8
|
+
--ypmini-popup-title-font-size: var(--ypmini-font-size-large);
|
|
9
|
+
--ypmini-popup-title-font-color: rgba(0, 0, 0, 0.85);
|
|
10
|
+
--ypmini-popup-confirm-text-font-color: var(--ypmini-primary-color);
|
|
11
|
+
--ypmini-popup-cancel-text-font-color: rgba(0, 0, 0, 0.65);
|
|
12
|
+
--ypmini-popup-confirm-text-font-size: var(--ypmini-font-size-default);
|
|
13
|
+
--ypmini-popup-cancel-text-font-size: var(--ypmini-font-size-default);
|
|
14
|
+
}
|
|
15
|
+
.ypmini-popup-wrapper {
|
|
16
|
+
position: fixed;
|
|
17
|
+
top: 0;
|
|
18
|
+
left: 0;
|
|
19
|
+
right: 0;
|
|
20
|
+
bottom: 0;
|
|
21
|
+
z-index: var(--ypmini-popup-z-index);
|
|
22
|
+
pointer-events: none;
|
|
23
|
+
}
|
|
24
|
+
.ypmini-popup-wrapper-visible {
|
|
25
|
+
pointer-events: auto;
|
|
26
|
+
}
|
|
27
|
+
.ypmini-popup-mask {
|
|
28
|
+
position: absolute;
|
|
29
|
+
top: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
right: 0;
|
|
32
|
+
bottom: 0;
|
|
33
|
+
background: var(--ypmini-popup-mask-background);
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transition: opacity var(--ypmini-popup-duration) ease;
|
|
36
|
+
}
|
|
37
|
+
.ypmini-popup-mask-visible {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
}
|
|
40
|
+
.ypmini-popup {
|
|
41
|
+
position: absolute;
|
|
42
|
+
left: 0;
|
|
43
|
+
right: 0;
|
|
44
|
+
bottom: 0;
|
|
45
|
+
background: var(--ypmini-popup-background);
|
|
46
|
+
transform: translateY(100%);
|
|
47
|
+
transition: transform var(--ypmini-popup-duration) ease;
|
|
48
|
+
max-height: 80vh;
|
|
49
|
+
overflow-y: auto;
|
|
50
|
+
}
|
|
51
|
+
.ypmini-popup-visible {
|
|
52
|
+
transform: translateY(0);
|
|
53
|
+
}
|
|
54
|
+
.ypmini-popup-round {
|
|
55
|
+
border-radius: var(--ypmini-popup-border-radius) var(--ypmini-popup-border-radius) 0 0;
|
|
56
|
+
}
|
|
57
|
+
.ypmini-popup-header {
|
|
58
|
+
padding: 16px;
|
|
59
|
+
display: flex;
|
|
60
|
+
max-width: 100%;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: space-between;
|
|
63
|
+
}
|
|
64
|
+
.ypmini-popup-header-cancel {
|
|
65
|
+
color: var(--ypmini-popup-cancel-text-font-color);
|
|
66
|
+
font-weight: 400;
|
|
67
|
+
font-size: var(--ypmini-popup-cancel-text-fontsize);
|
|
68
|
+
flex: 0 0 56px;
|
|
69
|
+
white-space: nowrap;
|
|
70
|
+
text-align: left;
|
|
71
|
+
}
|
|
72
|
+
.ypmini-popup-header-title {
|
|
73
|
+
flex: 1;
|
|
74
|
+
text-align: center;
|
|
75
|
+
color: var(--ypmini-popup-title-font-color);
|
|
76
|
+
font-weight: 500;
|
|
77
|
+
font-size: var(--ypmini-font-size-large);
|
|
78
|
+
margin-left: 44px;
|
|
79
|
+
margin-right: 44px;
|
|
80
|
+
white-space: nowrap;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
text-overflow: ellipsis;
|
|
83
|
+
}
|
|
84
|
+
.ypmini-popup-header-confirm {
|
|
85
|
+
color: var(--ypmini-popup-confirm-text-font-color);
|
|
86
|
+
font-weight: 400;
|
|
87
|
+
font-size: var(--ypmini-popup-confirm-text-fontsize);
|
|
88
|
+
flex: 0 0 56px;
|
|
89
|
+
white-space: nowrap;
|
|
90
|
+
text-align: right;
|
|
91
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"react";var e=t.createContext({});export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{objectWithoutProperties as
|
|
1
|
+
import{objectWithoutProperties as r,objectSpread2 as o}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as t}from"react/jsx-runtime";import{View as i}from"@tarojs/components";import e from"classnames";import a from"react";import n from"../../node_modules/@yup/taro-radio/dist/index.js";import m from"./radio-group.js";import d from"./context.js";var p=["children","type"],u=function(m){var u=m.children,s=m.type,c=void 0===s?"button":s,l=r(m,p),f=a.useContext(d).type;return t(n,o({className:e("ypmini-taro-radio",{"ypmini-taro-radio-default":"default"===(f||c),"ypmini-taro-radio-button":"button"===(f||c)}),icon:function(r){return t(i,"default"===c?{className:e("ypmini-taro-radio-default-inner",{"ypmini-taro-radio-default-inner-checked":r}),children:u}:{className:e("ypmini-taro-radio-button-inner",{"ypmini-taro-radio-button-inner-checked":r}),children:u})}},l))};u.Group=m;export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{objectWithoutProperties as
|
|
1
|
+
import{objectWithoutProperties as r,objectSpread2 as o}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as i}from"react/jsx-runtime";import e from"classnames";import t from"../../node_modules/@yup/taro-radio/dist/index.js";import p from"./context.js";var a=["children","type","block"],l=function(l){var n=l.children,m=l.type,u=l.block,d=void 0!==u&&u,s=r(l,a);return i(p.Provider,{value:{type:m},children:i(t.Group,o(o({className:e("ypmini-radio-group",{"ypmini-radio-group-button":"button"===m,"ypmini-radio-group-block":d})},s),{},{children:n}))})};export{l as default};
|
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
:root,
|
|
2
|
-
page {
|
|
3
|
-
--ypmini-hd: 2;
|
|
4
|
-
--yp-color-primary: #0092ff;
|
|
5
|
-
--yp-color-text: rgba(0, 0, 0, 0.85);
|
|
6
|
-
--yp-color-text-light: #0092ff;
|
|
7
|
-
--yp-color-text-weak: rgba(0, 0, 0, 0.45);
|
|
8
|
-
--yp-border-color: #e9edf3;
|
|
9
|
-
--yp-color-text-primary: #333;
|
|
10
|
-
--yp-color-text-link: var(--yp-color-primary);
|
|
11
|
-
--yp-color-text-secondary: #666;
|
|
12
|
-
--yp-color-text-disabled: #ccc;
|
|
13
|
-
--yp-color-text-placeholder: #999;
|
|
14
|
-
--yp-font-size-default: calc(17px * var(--ypmini-hd));
|
|
15
|
-
--yp-radio-circle-checked-color: var(--yp-color-primary);
|
|
16
|
-
--yp-radio-button-checked-color: var(--yp-color-primary);
|
|
17
|
-
--yp-checkbox-circle-checked-color: var(--yp-color-primary);
|
|
18
|
-
--yp-checkbox-button-checked-color: var(--yp-color-primary);
|
|
19
|
-
--yp-border-radius-base: calc(4px * var(--ypmini-hd));
|
|
20
|
-
--yp-border-radius-button: calc(8px * var(--ypmini-hd));
|
|
21
|
-
--yp-space-horizontal-base: calc(12px * var(--ypmini-hd));
|
|
22
|
-
}
|
|
23
1
|
.ypmini-radio-group {
|
|
24
2
|
display: flex;
|
|
25
3
|
width: 100%;
|
|
@@ -1,35 +1,22 @@
|
|
|
1
1
|
:root,
|
|
2
|
-
page {
|
|
3
|
-
--ypmini-hd: 2;
|
|
4
|
-
--yp-color-primary: #0092ff;
|
|
5
|
-
--yp-color-text: rgba(0, 0, 0, 0.85);
|
|
6
|
-
--yp-color-text-light: #0092ff;
|
|
7
|
-
--yp-color-text-weak: rgba(0, 0, 0, 0.45);
|
|
8
|
-
--yp-border-color: #e9edf3;
|
|
9
|
-
--yp-color-text-primary: #333;
|
|
10
|
-
--yp-color-text-link: var(--yp-color-primary);
|
|
11
|
-
--yp-color-text-secondary: #666;
|
|
12
|
-
--yp-color-text-disabled: #ccc;
|
|
13
|
-
--yp-color-text-placeholder: #999;
|
|
14
|
-
--yp-font-size-default: calc(17px * var(--ypmini-hd));
|
|
15
|
-
--yp-radio-circle-checked-color: var(--yp-color-primary);
|
|
16
|
-
--yp-radio-button-checked-color: var(--yp-color-primary);
|
|
17
|
-
--yp-checkbox-circle-checked-color: var(--yp-color-primary);
|
|
18
|
-
--yp-checkbox-button-checked-color: var(--yp-color-primary);
|
|
19
|
-
--yp-border-radius-base: calc(4px * var(--ypmini-hd));
|
|
20
|
-
--yp-border-radius-button: calc(8px * var(--ypmini-hd));
|
|
21
|
-
--yp-space-horizontal-base: calc(12px * var(--ypmini-hd));
|
|
22
|
-
}
|
|
23
|
-
:root,
|
|
24
2
|
page {
|
|
25
3
|
--radio-button-font-size: calc(17px * var(--ypmini-hd));
|
|
26
4
|
--radio-button-border-radius: calc(8px * var(--ypmini-hd));
|
|
27
5
|
--radio-button-background-color: #f5f7fc;
|
|
28
6
|
--radio-button-text-color: #000000d9;
|
|
29
7
|
--radio-button-checked-background-color: #e0f3ff;
|
|
30
|
-
--radio-button-checked-text-color: var(--
|
|
31
|
-
--radio-button-checked-border-color: var(--
|
|
8
|
+
--radio-button-checked-text-color: var(--ypmini-primary-color);
|
|
9
|
+
--radio-button-checked-border-color: var(--ypmini-primary-color);
|
|
32
10
|
--radio-button-height: calc(52px * var(--ypmini-hd));
|
|
11
|
+
--radio-default-size: calc(16px * var(--ypmini-hd));
|
|
12
|
+
}
|
|
13
|
+
.ypmini-taro-radio-default-inner {
|
|
14
|
+
width: var(--radio-default-size);
|
|
15
|
+
height: var(--radio-default-size);
|
|
16
|
+
border-radius: 100%;
|
|
17
|
+
}
|
|
18
|
+
.ypmini-taro-radio-default-inner-checked::before {
|
|
19
|
+
content: "☑️";
|
|
33
20
|
}
|
|
34
21
|
.ypmini-taro-radio-button-inner {
|
|
35
22
|
background-color: var(--radio-button-background-color);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ViewProps } from '@tarojs/components';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface SafeAreaProps extends ViewProps {
|
|
4
|
+
/**
|
|
5
|
+
* 安全距离位置 top 顶部,bottom 底部
|
|
6
|
+
*/
|
|
7
|
+
position?: 'top' | 'bottom';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 安全区域组件 用于安全区域占位
|
|
11
|
+
*/
|
|
12
|
+
declare const SafeArea: React.FC<SafeAreaProps>;
|
|
13
|
+
export default SafeArea;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{objectWithoutProperties as t,slicedToArray as o,objectSpread2 as r}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as e}from"react/jsx-runtime";import{View as a}from"@tarojs/components";import{useState as i,useEffect as s}from"react";import m from"classnames";import{getSystemInfo as p}from"./util.js";var l=["position","className","style","children"],n=function(n){var c=n.position,d=void 0===c?"bottom":c,f=n.className,u=n.style,b=n.children,h=t(n,l),j=i({top:0,bottom:0}),v=o(j,2),g=v[0],y=v[1];return s(function(){var t=p(),o=t.bottomSafeAreaHeight,r=t.statusBarHeight;y({top:r,bottom:o})},[]),e(a,r(r({className:m("ypmini-safe-area-view",f),style:r({paddingTop:"top"===d?g.top:0,paddingBottom:"bottom"===d?g.bottom:0},u)},h),{},{children:b}))};export{n as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import t from"@tarojs/taro";var e=function(){try{var e,a=null==t||null===(e=t.getSystemInfoSync)||void 0===e?void 0:e.call(t);return{statusBarHeight:a.statusBarHeight||0,bottomSafeAreaHeight:null!=a&&a.safeArea&&a.safeArea.bottom>0?a.screenHeight-a.safeArea.bottom:0}}catch(t){return{statusBarHeight:0,bottomSafeAreaHeight:0}}};export{e as getSystemInfo};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{objectWithoutProperties as r,objectSpread2 as a}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as o}from"react/jsx-runtime";import s from"classnames";import{Switch as t}from"@tarojs/components";var e=["className"],m=function(m){var i=m.className,c=r(m,e);return o(t,a({className:s("ypmini-switch",i),color:"#0092ff"},c))};export{m as default};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
:root,
|
|
2
|
+
page {
|
|
3
|
+
--ypmini-witch-defalt-background-color: #e9edf3;
|
|
4
|
+
--ypmini-switch-inner-size: calc(var(--ypmini-hd) * 16px);
|
|
5
|
+
--yomini-switch-border-radius: calc(var(--ypmini-hd) * 12px);
|
|
6
|
+
--yomini-switch-width: calc(var(--ypmini-hd) * 24px);
|
|
7
|
+
--yomini-switch-height: calc(var(--ypmini-hd) * 48px);
|
|
8
|
+
}
|
|
9
|
+
.ypmini-switch {
|
|
10
|
+
height: var(--yomini-switch-width);
|
|
11
|
+
width: var(--yomini-switch-height);
|
|
12
|
+
border-radius: var(--yomini-switch-border-radius);
|
|
13
|
+
}
|
|
14
|
+
.ypmini-switch .weui-switch {
|
|
15
|
+
height: var(--yomini-switch-width);
|
|
16
|
+
width: var(--yomini-switch-height);
|
|
17
|
+
border-radius: var(--yomini-switch-border-radius);
|
|
18
|
+
}
|
|
19
|
+
.ypmini-switch .weui-switch:checked {
|
|
20
|
+
background-color: var(--ypmini-primary-color);
|
|
21
|
+
}
|
|
22
|
+
.ypmini-switch .weui-switch:checked:after {
|
|
23
|
+
transform: translate(46px);
|
|
24
|
+
}
|
|
25
|
+
.ypmini-switch .weui-switch::before,
|
|
26
|
+
.ypmini-switch .weui-switch::after {
|
|
27
|
+
width: var(--ypmini-switch-inner-size);
|
|
28
|
+
height: var(--ypmini-switch-inner-size);
|
|
29
|
+
border-radius: var(--ypmini-switch-inner-size);
|
|
30
|
+
left: 8px;
|
|
31
|
+
}
|
|
32
|
+
.ypmini-switch .weui-switch:before {
|
|
33
|
+
display: none;
|
|
34
|
+
background-color: var(--ypmini-witch-defalt-background-color);
|
|
35
|
+
}
|
|
36
|
+
.ypmini-switch .weui-switch::after {
|
|
37
|
+
top: 6px;
|
|
38
|
+
}
|
|
@@ -1,26 +1,4 @@
|
|
|
1
1
|
:root,
|
|
2
|
-
page {
|
|
3
|
-
--ypmini-hd: 2;
|
|
4
|
-
--yp-color-primary: #0092ff;
|
|
5
|
-
--yp-color-text: rgba(0, 0, 0, 0.85);
|
|
6
|
-
--yp-color-text-light: #0092ff;
|
|
7
|
-
--yp-color-text-weak: rgba(0, 0, 0, 0.45);
|
|
8
|
-
--yp-border-color: #e9edf3;
|
|
9
|
-
--yp-color-text-primary: #333;
|
|
10
|
-
--yp-color-text-link: var(--yp-color-primary);
|
|
11
|
-
--yp-color-text-secondary: #666;
|
|
12
|
-
--yp-color-text-disabled: #ccc;
|
|
13
|
-
--yp-color-text-placeholder: #999;
|
|
14
|
-
--yp-font-size-default: calc(17px * var(--ypmini-hd));
|
|
15
|
-
--yp-radio-circle-checked-color: var(--yp-color-primary);
|
|
16
|
-
--yp-radio-button-checked-color: var(--yp-color-primary);
|
|
17
|
-
--yp-checkbox-circle-checked-color: var(--yp-color-primary);
|
|
18
|
-
--yp-checkbox-button-checked-color: var(--yp-color-primary);
|
|
19
|
-
--yp-border-radius-base: calc(4px * var(--ypmini-hd));
|
|
20
|
-
--yp-border-radius-button: calc(8px * var(--ypmini-hd));
|
|
21
|
-
--yp-space-horizontal-base: calc(12px * var(--ypmini-hd));
|
|
22
|
-
}
|
|
23
|
-
:root,
|
|
24
2
|
page {
|
|
25
3
|
--toast-z-index: 9999;
|
|
26
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{slicedToArray as r,objectWithoutProperties as e,objectSpread2 as t}from"../../_virtual/_rollupPluginBabelHelpers.js";import{
|
|
1
|
+
import{slicedToArray as r,objectWithoutProperties as e,objectSpread2 as t}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsx as n}from"react/jsx-runtime";import o,{useState as i}from"react";import{View as a,Text as u}from"@tarojs/components";import s from"classnames";import{isNumber as c}from"../../utils/is.js";var l=["content","duration"],f=["className"],m={},d=o.forwardRef(function(m,d){var v=i(!1),p=r(v,2),h=p[0],j=p[1],T=i(""),w=r(T,2),y=w[0],N=w[1],R=o.useState(),b=r(R,2),g=b[0],x=b[1],H=o.useRef(2e3),P=o.useRef(null);if(o.useImperativeHandle(d,function(){return{show:function(r){if("string"==typeof r)N(r);else{var t=r.content,n=r.duration,o=void 0===n?2e3:n,i=e(r,l);c(o)&&(H.current=o),x(i),N(t)}P.current&&clearTimeout(P.current),j(!0);var a=setTimeout(function(){j(!1)},H.current);P.current=a},hide:function(){clearTimeout(P.current),j(!1)}}}),!h)return null;var S=g||{},W=S.className,_=e(S,f);return n(a,t(t({className:s("ypmini-toast-container",W)},_),{},{children:n(u,{className:"ypmini-toast-content",children:y})}))});var v={createToast:function(){var r;if(null===(r=m)||void 0===r||!r.ref){var e=o.createRef();m={ref:e,ToastWrapper:function(){return n(d,{ref:e})}}}return m},show:function(r){var e;null===(e=m)||void 0===e||null===(e=e.ref)||void 0===e||null===(e=e.current)||void 0===e||e.show(r)},hide:function(){var r;null===(r=m)||void 0===r||null===(r=r.ref)||void 0===r||null===(r=r.current)||void 0===r||r.hide()}};export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{objectSpread2 as r}from"../../_virtual/_rollupPluginBabelHelpers.js";import{
|
|
1
|
+
import{objectSpread2 as r}from"../../_virtual/_rollupPluginBabelHelpers.js";import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import a from"./toast.js";function i(i){var n=a.createToast().ToastWrapper;return function(a){return t(e,{children:[o(n,{}),o(i,r({},a))]})}}export{i as default};
|