@bifrostui/react 1.0.5 → 1.1.5
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/ActionSheet/ActionSheet.less +31 -0
- package/dist/ActionSheet/ActionSheetItem.less +62 -0
- package/dist/Alert/index.less +112 -0
- package/dist/Avatar/Avatar.less +52 -0
- package/dist/Avatar/AvatarGroup.less +39 -0
- package/dist/Backdrop/{Backdrop.css → Backdrop.less} +4 -3
- package/dist/Badge/Badge.less +118 -0
- package/dist/Button/Button.less +244 -0
- package/dist/Calendar/Calendar.less +126 -0
- package/{es/Card/Card.css → dist/Card/Card.less} +1 -0
- package/dist/Card/CardHeader.less +53 -0
- package/dist/Checkbox/Checkbox.less +55 -0
- package/dist/CitySelector/CitySelector.d.ts +4 -0
- package/dist/CitySelector/CitySelector.js +36 -0
- package/dist/CitySelector/CitySelector.less +122 -0
- package/dist/CitySelector/CitySelector.miniapp.d.ts +5 -0
- package/dist/CitySelector/CitySelector.miniapp.js +79 -0
- package/dist/CitySelector/CitySelector.types.d.ts +47 -0
- package/dist/CitySelector/CitySelector.types.js +5 -0
- package/dist/CitySelector/CitySelectorCore.d.ts +5 -0
- package/dist/CitySelector/CitySelectorCore.js +183 -0
- package/dist/CitySelector/Selector/index.d.ts +9 -0
- package/dist/CitySelector/Selector/index.js +22 -0
- package/dist/CitySelector/Selector/index.less +13 -0
- package/dist/CitySelector/index.d.ts +2 -0
- package/dist/CitySelector/index.js +34 -0
- package/dist/CitySelector/miniapp.less +4 -0
- package/dist/Countdown/Countdown.less +39 -0
- package/dist/Divider/Divider.less +50 -0
- package/dist/Drawer/Drawer.less +40 -0
- package/dist/IconButton/IconButton.less +167 -0
- package/dist/Image/index.less +40 -0
- package/dist/Input/Input.less +72 -0
- package/dist/List/{List.css → List.less} +1 -0
- package/dist/List/{ListItem.css → ListItem.less} +17 -6
- package/dist/List/{ListItemContent.css → ListItemContent.less} +7 -2
- package/dist/List/{ListItemFooter.css → ListItemFooter.less} +4 -3
- package/dist/Loading/Loading.less +40 -0
- package/dist/Modal/{Modal.css → Modal.less} +8 -6
- package/dist/Modal/Modal.miniapp.d.ts +16 -0
- package/dist/Modal/Modal.miniapp.js +73 -0
- package/dist/NavBar/NavBar.less +67 -0
- package/dist/Picker/Picker.d.ts +5 -0
- package/dist/Picker/Picker.js +155 -0
- package/dist/Picker/Picker.less +62 -0
- package/dist/Picker/Picker.types.d.ts +98 -0
- package/dist/Picker/Picker.types.js +5 -0
- package/dist/Picker/PickerPanel.d.ts +5 -0
- package/dist/Picker/PickerPanel.js +210 -0
- package/dist/Picker/PickerPanel.less +67 -0
- package/dist/Picker/index.d.ts +2 -0
- package/dist/Picker/index.js +34 -0
- package/dist/Picker/utils.d.ts +13 -0
- package/dist/Picker/utils.js +66 -0
- package/dist/Progress/Progress.less +24 -0
- package/dist/Radio/Radio.less +81 -0
- package/dist/Rating/Rating.less +64 -0
- package/dist/ScrollView/{ScrollView.css → ScrollView.less} +4 -0
- package/dist/Select/Select.less +105 -0
- package/dist/Skeleton/Skeleton.less +72 -0
- package/dist/Slider/Slider.less +108 -0
- package/dist/Stack/demo/index.less +27 -0
- package/dist/Steps/Step.less +228 -0
- package/{es/Steps/Steps.css → dist/Steps/Steps.less} +5 -3
- package/dist/Swiper/Swiper.less +25 -0
- package/dist/Switch/Switch.less +177 -0
- package/dist/TabBar/TabBarItem.less +54 -0
- package/dist/Tabs/Tab.js +1 -1
- package/dist/Tabs/Tab.less +60 -0
- package/dist/Tabs/TabPanel.less +11 -0
- package/dist/Tabs/Tabs.less +77 -0
- package/dist/Tag/Tag.less +119 -0
- package/dist/Tag/TagGroup.less +52 -0
- package/dist/TextArea/{TextArea.css → TextArea.less} +27 -19
- package/dist/index.d.ts +2 -0
- package/dist/index.js +22 -0
- package/es/ActionSheet/ActionSheet.less +31 -0
- package/es/ActionSheet/ActionSheetItem.less +62 -0
- package/es/Alert/index.less +112 -0
- package/es/Avatar/Avatar.less +52 -0
- package/es/Avatar/AvatarGroup.less +39 -0
- package/es/Backdrop/{Backdrop.css → Backdrop.less} +4 -3
- package/es/Badge/Badge.less +118 -0
- package/es/Button/Button.less +244 -0
- package/es/Calendar/Calendar.less +126 -0
- package/{dist/Card/Card.css → es/Card/Card.less} +1 -0
- package/es/Card/CardHeader.less +53 -0
- package/es/Checkbox/Checkbox.less +55 -0
- package/es/CitySelector/CitySelector.d.ts +4 -0
- package/es/CitySelector/CitySelector.js +36 -0
- package/es/CitySelector/CitySelector.less +122 -0
- package/es/CitySelector/CitySelector.miniapp.d.ts +5 -0
- package/es/CitySelector/CitySelector.miniapp.js +77 -0
- package/es/CitySelector/CitySelector.types.d.ts +47 -0
- package/es/CitySelector/CitySelector.types.js +1 -0
- package/es/CitySelector/CitySelectorCore.d.ts +5 -0
- package/es/CitySelector/CitySelectorCore.js +194 -0
- package/es/CitySelector/Selector/index.d.ts +9 -0
- package/es/CitySelector/Selector/index.js +13 -0
- package/es/CitySelector/Selector/index.less +13 -0
- package/es/CitySelector/index.d.ts +2 -0
- package/es/CitySelector/index.js +2 -0
- package/es/CitySelector/miniapp.less +4 -0
- package/es/Countdown/Countdown.less +39 -0
- package/es/Divider/Divider.less +50 -0
- package/es/Drawer/Drawer.less +40 -0
- package/es/IconButton/IconButton.less +167 -0
- package/es/Image/index.less +40 -0
- package/es/Input/Input.less +72 -0
- package/es/List/{List.css → List.less} +1 -0
- package/es/List/{ListItem.css → ListItem.less} +17 -6
- package/es/List/{ListItemContent.css → ListItemContent.less} +7 -2
- package/es/List/{ListItemFooter.css → ListItemFooter.less} +4 -3
- package/es/Loading/Loading.less +40 -0
- package/es/Modal/{Modal.css → Modal.less} +8 -6
- package/es/Modal/Modal.miniapp.d.ts +16 -0
- package/es/Modal/Modal.miniapp.js +78 -0
- package/es/NavBar/NavBar.less +67 -0
- package/es/Picker/Picker.d.ts +5 -0
- package/es/Picker/Picker.js +171 -0
- package/es/Picker/Picker.less +62 -0
- package/es/Picker/Picker.types.d.ts +98 -0
- package/es/Picker/Picker.types.js +1 -0
- package/es/Picker/PickerPanel.d.ts +5 -0
- package/es/Picker/PickerPanel.js +234 -0
- package/es/Picker/PickerPanel.less +67 -0
- package/es/Picker/index.d.ts +2 -0
- package/es/Picker/index.js +2 -0
- package/es/Picker/utils.d.ts +13 -0
- package/es/Picker/utils.js +65 -0
- package/es/Progress/Progress.less +24 -0
- package/es/Radio/Radio.less +81 -0
- package/es/Rating/Rating.less +64 -0
- package/es/ScrollView/{ScrollView.css → ScrollView.less} +4 -0
- package/es/Select/Select.less +105 -0
- package/es/Skeleton/Skeleton.less +72 -0
- package/es/Slider/Slider.less +108 -0
- package/es/Stack/demo/index.less +27 -0
- package/es/Steps/Step.less +228 -0
- package/{dist/Steps/Steps.css → es/Steps/Steps.less} +5 -3
- package/es/Swiper/Swiper.less +25 -0
- package/es/Switch/Switch.less +177 -0
- package/es/TabBar/TabBarItem.less +54 -0
- package/es/Tabs/Tab.js +1 -1
- package/es/Tabs/Tab.less +60 -0
- package/es/Tabs/TabPanel.less +11 -0
- package/es/Tabs/Tabs.less +77 -0
- package/es/Tag/Tag.less +119 -0
- package/es/Tag/TagGroup.less +52 -0
- package/es/TextArea/{TextArea.css → TextArea.less} +27 -19
- package/es/index.d.ts +2 -0
- package/es/index.js +3 -1
- package/package.json +6 -6
- package/dist/ActionSheet/ActionSheet.css +0 -27
- package/dist/ActionSheet/ActionSheetItem.css +0 -51
- package/dist/Alert/index.css +0 -89
- package/dist/Avatar/Avatar.css +0 -43
- package/dist/Avatar/AvatarGroup.css +0 -31
- package/dist/Badge/Badge.css +0 -95
- package/dist/Button/Button.css +0 -200
- package/dist/Calendar/Calendar.css +0 -105
- package/dist/Card/CardHeader.css +0 -45
- package/dist/Checkbox/Checkbox.css +0 -45
- package/dist/Countdown/Countdown.css +0 -28
- package/dist/Divider/Divider.css +0 -41
- package/dist/Drawer/Drawer.css +0 -35
- package/dist/IconButton/IconButton.css +0 -130
- package/dist/Image/index.css +0 -35
- package/dist/Input/Input.css +0 -59
- package/dist/Loading/Loading.css +0 -31
- package/dist/NavBar/NavBar.css +0 -57
- package/dist/Progress/Progress.css +0 -22
- package/dist/Radio/Radio.css +0 -65
- package/dist/Rating/Rating.css +0 -52
- package/dist/Select/Select.css +0 -89
- package/dist/Skeleton/Skeleton.css +0 -54
- package/dist/Slider/Slider.css +0 -95
- package/dist/Stack/demo/index.css +0 -23
- package/dist/Steps/Step.css +0 -174
- package/dist/Swiper/Swiper.css +0 -20
- package/dist/Switch/Switch.css +0 -127
- package/dist/TabBar/TabBarItem.css +0 -38
- package/dist/Tabs/Tab.css +0 -52
- package/dist/Tabs/TabPanel.css +0 -9
- package/dist/Tabs/Tabs.css +0 -56
- package/dist/Tag/Tag.css +0 -97
- package/dist/Tag/TagGroup.css +0 -43
- package/es/ActionSheet/ActionSheet.css +0 -27
- package/es/ActionSheet/ActionSheetItem.css +0 -51
- package/es/Alert/index.css +0 -89
- package/es/Avatar/Avatar.css +0 -43
- package/es/Avatar/AvatarGroup.css +0 -31
- package/es/Badge/Badge.css +0 -95
- package/es/Button/Button.css +0 -200
- package/es/Calendar/Calendar.css +0 -105
- package/es/Card/CardHeader.css +0 -45
- package/es/Checkbox/Checkbox.css +0 -45
- package/es/Countdown/Countdown.css +0 -28
- package/es/Divider/Divider.css +0 -41
- package/es/Drawer/Drawer.css +0 -35
- package/es/IconButton/IconButton.css +0 -130
- package/es/Image/index.css +0 -35
- package/es/Input/Input.css +0 -59
- package/es/Loading/Loading.css +0 -31
- package/es/NavBar/NavBar.css +0 -57
- package/es/Progress/Progress.css +0 -22
- package/es/Radio/Radio.css +0 -65
- package/es/Rating/Rating.css +0 -52
- package/es/Select/Select.css +0 -89
- package/es/Skeleton/Skeleton.css +0 -54
- package/es/Slider/Slider.css +0 -95
- package/es/Stack/demo/index.css +0 -23
- package/es/Steps/Step.css +0 -174
- package/es/Swiper/Swiper.css +0 -20
- package/es/Switch/Switch.css +0 -127
- package/es/TabBar/TabBarItem.css +0 -38
- package/es/Tabs/Tab.css +0 -52
- package/es/Tabs/TabPanel.css +0 -9
- package/es/Tabs/Tabs.css +0 -56
- package/es/Tag/Tag.css +0 -97
- package/es/Tag/TagGroup.css +0 -43
- /package/dist/Card/{CardContent.css → CardContent.less} +0 -0
- /package/dist/Card/{CardFooter.css → CardFooter.less} +0 -0
- /package/dist/List/{ListItemExtra.css → ListItemExtra.less} +0 -0
- /package/dist/List/{ListItemHeader.css → ListItemHeader.less} +0 -0
- /package/dist/Stack/{Stack.css → Stack.less} +0 -0
- /package/dist/TabBar/{TabBar.css → TabBar.less} +0 -0
- /package/es/Card/{CardContent.css → CardContent.less} +0 -0
- /package/es/Card/{CardFooter.css → CardFooter.less} +0 -0
- /package/es/List/{ListItemExtra.css → ListItemExtra.less} +0 -0
- /package/es/List/{ListItemHeader.css → ListItemHeader.less} +0 -0
- /package/es/Stack/{Stack.css → Stack.less} +0 -0
- /package/es/TabBar/{TabBar.css → TabBar.less} +0 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
@import '~@bifrostui/styles/mixins/index.less';
|
|
2
|
+
|
|
3
|
+
.btn-icon-default(@color) {
|
|
4
|
+
color: var(~'--bui-color-@{color}');
|
|
5
|
+
}
|
|
6
|
+
.btn-icon-outline(@color) {
|
|
7
|
+
color: var(~'--bui-color-@{color}');
|
|
8
|
+
border-color: var(~'--bui-color-@{color}');
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.btn-icon-contained(@color) {
|
|
12
|
+
color: var(--bui-color-white);
|
|
13
|
+
.linear-gradient(var(~'--bui-color-@{color}-start'), var(~'--bui-color-@{color}-end'));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.bui-icon-btn {
|
|
17
|
+
--bg-color: var(--bui-color-neutral-5);
|
|
18
|
+
--color: var(--bui-color-fg-muted);
|
|
19
|
+
--icon-size: 17px;
|
|
20
|
+
--user-area: 5px;
|
|
21
|
+
position: relative;
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
height: auto;
|
|
24
|
+
margin: 0;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
background-color: transparent;
|
|
28
|
+
border: 1px solid transparent;
|
|
29
|
+
color: var(--color);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
font-family: var(--bui-font-family);
|
|
32
|
+
|
|
33
|
+
&::before {
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: 50%;
|
|
37
|
+
width: 100%;
|
|
38
|
+
height: 100%;
|
|
39
|
+
background-color: var(--bui-color-black);
|
|
40
|
+
border: inherit;
|
|
41
|
+
border-color: var(--bui-color-black);
|
|
42
|
+
border-radius: inherit;
|
|
43
|
+
transform: translate(-50%, -50%);
|
|
44
|
+
opacity: 0;
|
|
45
|
+
content: ' ';
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:active::before {
|
|
49
|
+
opacity: 0.04;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&::after {
|
|
53
|
+
border: 0;
|
|
54
|
+
}
|
|
55
|
+
font-size: var(--icon-size);
|
|
56
|
+
padding: var(--user-area);
|
|
57
|
+
|
|
58
|
+
&-small {
|
|
59
|
+
font-size: var(--bui-text-size-4);
|
|
60
|
+
padding: var(--bui-spacing-xs);
|
|
61
|
+
|
|
62
|
+
&.bui-icon-btn-outlined,
|
|
63
|
+
&.bui-icon-btn-contained {
|
|
64
|
+
padding: var(--bui-spacing-xs);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&-medium {
|
|
69
|
+
&.bui-icon-btn-outlined,
|
|
70
|
+
&.bui-icon-btn-contained {
|
|
71
|
+
padding: 5px;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&-large {
|
|
76
|
+
font-size: 23px;
|
|
77
|
+
padding: var(--bui-spacing-sm);
|
|
78
|
+
|
|
79
|
+
&.bui-icon-btn-outlined,
|
|
80
|
+
&.bui-icon-btn-contained {
|
|
81
|
+
padding: var(--bui-spacing-sm);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&-disabled {
|
|
86
|
+
pointer-events: none;
|
|
87
|
+
opacity: 0.5;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&-circular {
|
|
91
|
+
border-radius: 100%;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&-rounded {
|
|
95
|
+
border-radius: var(--bui-shape-radius-default);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&-square {
|
|
99
|
+
border-radius: 0;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&-default {
|
|
103
|
+
&.bui-icon-btn-primary {
|
|
104
|
+
.btn-icon-default(primary);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.bui-icon-btn-success {
|
|
108
|
+
.btn-icon-default(success);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
&.bui-icon-btn-info {
|
|
112
|
+
.btn-icon-default(info);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
&.bui-icon-btn-warning {
|
|
116
|
+
.btn-icon-default(warning);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&-outlined {
|
|
121
|
+
border: solid 1px;
|
|
122
|
+
|
|
123
|
+
&.bui-icon-btn-primary {
|
|
124
|
+
.btn-icon-outline(primary);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.bui-icon-btn-success {
|
|
128
|
+
.btn-icon-outline(success);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&.bui-icon-btn-info {
|
|
132
|
+
.btn-icon-outline(info);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.bui-icon-btn-warning {
|
|
136
|
+
.btn-icon-outline(warning);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
&.bui-icon-btn-danger {
|
|
140
|
+
.btn-icon-outline(danger);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&-contained {
|
|
145
|
+
background-color: var(--bg-color);
|
|
146
|
+
|
|
147
|
+
&.bui-icon-btn-primary {
|
|
148
|
+
.btn-icon-contained(primary);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
&.bui-icon-btn-success {
|
|
152
|
+
.btn-icon-contained(success);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&.bui-icon-btn-info {
|
|
156
|
+
.btn-icon-contained(info);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&.bui-icon-btn-warning {
|
|
160
|
+
.btn-icon-contained(warning);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&.bui-icon-btn-danger {
|
|
164
|
+
.btn-icon-contained(danger);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
.bui-image {
|
|
2
|
+
width: auto;
|
|
3
|
+
height: auto;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
position: relative;
|
|
7
|
+
font-family: var(--bui-font-family);
|
|
8
|
+
|
|
9
|
+
.bui-image-img {
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
display: block;
|
|
14
|
+
opacity: 0;
|
|
15
|
+
|
|
16
|
+
&.bui-image-loaded {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-default-icon-wrap {
|
|
22
|
+
top: 0;
|
|
23
|
+
left: 0;
|
|
24
|
+
z-index: 1;
|
|
25
|
+
opacity: 1;
|
|
26
|
+
position: absolute;
|
|
27
|
+
width: 100%;
|
|
28
|
+
height: 100%;
|
|
29
|
+
|
|
30
|
+
&.bui-image-loaded {
|
|
31
|
+
opacity: 0;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&-default-icon-item {
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
background-color: rgba(127, 127, 127, 0.2);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@import '~@bifrostui/styles/mixins/index.less';
|
|
2
|
+
|
|
3
|
+
.bui-input {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
height: 32px;
|
|
8
|
+
padding: 4px 10px;
|
|
9
|
+
box-sizing: border-box;
|
|
10
|
+
border-radius: var(--bui-shape-radius-default);
|
|
11
|
+
border: 1px solid var(--bui-color-border-default);
|
|
12
|
+
font-family: var(--bui-font-family);
|
|
13
|
+
|
|
14
|
+
&-icon {
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
color: var(--bui-color-fg-subtle);
|
|
18
|
+
font-size: var(--bui-title-size-3);
|
|
19
|
+
|
|
20
|
+
&-start {
|
|
21
|
+
margin-right: 3px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&-end {
|
|
25
|
+
margin-left: 3px;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&-input {
|
|
30
|
+
flex: 1;
|
|
31
|
+
display: flex;
|
|
32
|
+
align-items: center;
|
|
33
|
+
padding: 0;
|
|
34
|
+
height: 100%;
|
|
35
|
+
color: var(--bui-color-fg-default);
|
|
36
|
+
border: none;
|
|
37
|
+
outline: none;
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
font-size: var(--bui-text-size-2);
|
|
40
|
+
|
|
41
|
+
&::placeholder {
|
|
42
|
+
color: var(--bui-color-fg-subtle);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&-disabled {
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
background-color: rgba(0, 0, 0, 0.04);
|
|
49
|
+
|
|
50
|
+
.bui-input-input {
|
|
51
|
+
color: var(--bui-color-fg-disabled);
|
|
52
|
+
|
|
53
|
+
&::placeholder {
|
|
54
|
+
color: var(--bui-color-fg-disabled);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&-clear {
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
color: var(--bui-color-fg-disabled);
|
|
64
|
+
height: 100%;
|
|
65
|
+
font-size: var(--bui-title-size-3);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.bui-mini-placeholder {
|
|
69
|
+
// 处理小程序placeholder较长被截断问题
|
|
70
|
+
width: auto;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -4,20 +4,31 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
font-family: var(--bui-font-family);
|
|
6
6
|
}
|
|
7
|
+
|
|
7
8
|
.bui-list-item-disabled {
|
|
8
9
|
pointer-events: none;
|
|
9
10
|
background-color: var(--bui-color-bg-default);
|
|
10
11
|
color: var(--bui-color-fg-subtle);
|
|
11
12
|
}
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
.bui-list-small {
|
|
15
|
+
.bui-list-item {
|
|
16
|
+
padding: 5px 12px;
|
|
17
|
+
}
|
|
14
18
|
}
|
|
15
|
-
|
|
16
|
-
|
|
19
|
+
|
|
20
|
+
.bui-list-medium {
|
|
21
|
+
.bui-list-item {
|
|
22
|
+
padding: 18px 12px;
|
|
23
|
+
}
|
|
17
24
|
}
|
|
18
|
-
|
|
19
|
-
|
|
25
|
+
|
|
26
|
+
.bui-list-large {
|
|
27
|
+
.bui-list-item {
|
|
28
|
+
padding: 20px 12px;
|
|
29
|
+
}
|
|
20
30
|
}
|
|
31
|
+
|
|
21
32
|
.bui-list-item-divider:not(:last-child) {
|
|
22
33
|
border-bottom: 1px solid var(--bui-color-border-default);
|
|
23
34
|
}
|
|
@@ -6,12 +6,17 @@
|
|
|
6
6
|
width: 100%;
|
|
7
7
|
font-family: var(--bui-font-family);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
|
|
10
|
+
.bui-list-small {
|
|
11
|
+
.bui-list-item-content {
|
|
12
|
+
font-size: var(--bui-text-size-2);
|
|
13
|
+
}
|
|
11
14
|
}
|
|
15
|
+
|
|
12
16
|
.bui-list-item-content-primary {
|
|
13
17
|
flex: 1 1 auto;
|
|
14
18
|
}
|
|
19
|
+
|
|
15
20
|
.bui-list-item-content-secondary {
|
|
16
21
|
font-size: 13px;
|
|
17
22
|
color: var(--bui-color-fg-muted);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@import '~@bifrostui/styles/mixins/index.less';
|
|
2
|
+
|
|
3
|
+
.bui-loading {
|
|
4
|
+
--animation-duration: var(--bui-loading-animation-duration, 1.6s);
|
|
5
|
+
|
|
6
|
+
width: fit-content;
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: var(--bui-spacing-md);
|
|
11
|
+
font-family: var(--bui-font-family);
|
|
12
|
+
|
|
13
|
+
&-icon {
|
|
14
|
+
font-size: 30px;
|
|
15
|
+
animation: loading var(--animation-duration) linear infinite;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&-text {
|
|
19
|
+
padding: 10px;
|
|
20
|
+
font-size: var(--bui-title-size-3);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&-vertical {
|
|
24
|
+
flex-direction: row;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&-horizontal {
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@keyframes loading {
|
|
32
|
+
0% {
|
|
33
|
+
transform: rotate(0deg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
100% {
|
|
37
|
+
transform: rotate(360deg);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
top: 0;
|
|
7
7
|
z-index: var(--bui-z-index-modal);
|
|
8
8
|
font-family: var(--bui-font-family);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
|
|
10
|
+
&-exited {
|
|
11
|
+
visibility: hidden;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&-backdrop {
|
|
15
|
+
z-index: -1;
|
|
16
|
+
}
|
|
15
17
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewProps } from '@tarojs/components';
|
|
3
|
+
import './Modal.less';
|
|
4
|
+
declare const Modal: React.ForwardRefExoticComponent<Omit<ViewProps & {
|
|
5
|
+
open?: boolean;
|
|
6
|
+
container?: Element | (() => Element);
|
|
7
|
+
hideBackdrop?: boolean;
|
|
8
|
+
BackdropProps?: Partial<import("../Backdrop").BackdropProps>;
|
|
9
|
+
onClose?: (e: React.SyntheticEvent<Element, Event>, detail: import("./Modal.types").CloseDetail) => void;
|
|
10
|
+
disableScrollLock?: boolean;
|
|
11
|
+
disablePortal?: boolean;
|
|
12
|
+
keepMounted?: boolean;
|
|
13
|
+
} & import("../../../bui-types/src").ICommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
14
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
15
|
+
}, "open" | keyof import("../../../bui-types/src").ICommonProps | "container" | "disablePortal" | "hideBackdrop" | "BackdropProps" | "onClose" | "disableScrollLock" | "keepMounted">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export default Modal;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var _excluded = ["className", "open", "BackdropProps", "children", "container", "disablePortal", "disableScrollLock", "hideBackdrop", "onClose", "keepMounted"];
|
|
2
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
4
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
7
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
8
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import { useForkRef } from '@bifrostui/utils';
|
|
12
|
+
import clsx from 'clsx';
|
|
13
|
+
import React, { useState } from 'react';
|
|
14
|
+
import { View } from '@tarojs/components';
|
|
15
|
+
import Backdrop from "../Backdrop";
|
|
16
|
+
import Portal from "../Portal";
|
|
17
|
+
import "./Modal.css";
|
|
18
|
+
var prefixCls = 'bui-modal';
|
|
19
|
+
var Modal = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
20
|
+
var className = props.className,
|
|
21
|
+
open = props.open,
|
|
22
|
+
BackdropProps = props.BackdropProps,
|
|
23
|
+
children = props.children,
|
|
24
|
+
container = props.container,
|
|
25
|
+
disablePortal = props.disablePortal,
|
|
26
|
+
disableScrollLock = props.disableScrollLock,
|
|
27
|
+
hideBackdrop = props.hideBackdrop,
|
|
28
|
+
onClose = props.onClose,
|
|
29
|
+
keepMounted = props.keepMounted,
|
|
30
|
+
others = _objectWithoutProperties(props, _excluded);
|
|
31
|
+
var modalRef = React.useRef(null);
|
|
32
|
+
var handleRef = useForkRef(modalRef, ref);
|
|
33
|
+
var _useState = useState(hideBackdrop || !open),
|
|
34
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
35
|
+
backdropExited = _useState2[0],
|
|
36
|
+
setBackDropExited = _useState2[1];
|
|
37
|
+
var mounted = open || !backdropExited || keepMounted;
|
|
38
|
+
var handleBackdropClick = function handleBackdropClick(event) {
|
|
39
|
+
if (event.target.id !== event.currentTarget.id) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (onClose) {
|
|
43
|
+
onClose(event, {
|
|
44
|
+
from: 'backdrop'
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
if (!mounted) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
return /*#__PURE__*/React.createElement(Portal, {
|
|
52
|
+
container: container,
|
|
53
|
+
disablePortal: disablePortal
|
|
54
|
+
}, /*#__PURE__*/React.createElement(View, _extends({
|
|
55
|
+
className: clsx(prefixCls, className),
|
|
56
|
+
ref: handleRef,
|
|
57
|
+
catchMove: !disableScrollLock
|
|
58
|
+
}, others), !hideBackdrop ? /*#__PURE__*/React.createElement(Backdrop, _extends({
|
|
59
|
+
open: open,
|
|
60
|
+
onClick: handleBackdropClick,
|
|
61
|
+
onEnter: function onEnter() {
|
|
62
|
+
return setBackDropExited(false);
|
|
63
|
+
},
|
|
64
|
+
onExited: function onExited() {
|
|
65
|
+
return setBackDropExited(true);
|
|
66
|
+
}
|
|
67
|
+
}, BackdropProps, {
|
|
68
|
+
className: clsx("".concat(prefixCls, "-backdrop"), BackdropProps === null || BackdropProps === void 0 ? void 0 : BackdropProps.className)
|
|
69
|
+
})) : null, (open || keepMounted) && children));
|
|
70
|
+
});
|
|
71
|
+
Modal.displayName = 'BuiModal';
|
|
72
|
+
Modal.defaultProps = {
|
|
73
|
+
open: false,
|
|
74
|
+
disablePortal: false,
|
|
75
|
+
disableScrollLock: false,
|
|
76
|
+
hideBackdrop: false
|
|
77
|
+
};
|
|
78
|
+
export default Modal;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@import '~@bifrostui/styles/mixins/index.less';
|
|
2
|
+
|
|
3
|
+
.bui-navbar {
|
|
4
|
+
--height: var(--bui-navbar-height, 45px);
|
|
5
|
+
--icon-size: var(--bui-navbar-icon-size, 24px);
|
|
6
|
+
--background-color: var(
|
|
7
|
+
--bui-navbar-background-color,
|
|
8
|
+
var(--bui-color-white)
|
|
9
|
+
);
|
|
10
|
+
--border-bottom: var(--bui-navbar-border-bottom, none);
|
|
11
|
+
--z-index: var(--bui-navbar-z-index, auto);
|
|
12
|
+
|
|
13
|
+
position: relative;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: var(--height);
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
padding: 0 8px;
|
|
18
|
+
display: flex;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
align-items: center;
|
|
21
|
+
background-color: var(--background-color);
|
|
22
|
+
border-bottom: var(--border-bottom);
|
|
23
|
+
user-select: none;
|
|
24
|
+
z-index: var(--z-index);
|
|
25
|
+
font-family: var(--bui-font-family);
|
|
26
|
+
|
|
27
|
+
&-fixed {
|
|
28
|
+
position: fixed;
|
|
29
|
+
top: 0;
|
|
30
|
+
left: 0;
|
|
31
|
+
width: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&-title {
|
|
35
|
+
max-width: 60%;
|
|
36
|
+
padding: 0 8px;
|
|
37
|
+
font-size: var(--bui-title-size-2);
|
|
38
|
+
.ellipsis();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&-left,
|
|
42
|
+
&-right {
|
|
43
|
+
flex: 1;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-items: center;
|
|
46
|
+
font-size: var(--bui-title-size-3);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&-left {
|
|
50
|
+
justify-content: flex-start;
|
|
51
|
+
text-align: left;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-right {
|
|
55
|
+
justify-content: flex-end;
|
|
56
|
+
text-align: right;
|
|
57
|
+
align-self: stretch;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&-icon {
|
|
61
|
+
font-size: var(--icon-size);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&-placeholder {
|
|
65
|
+
width: 100%;
|
|
66
|
+
}
|
|
67
|
+
}
|