@trionesdev/antd-taro-react 0.0.2-beta.0 → 0.0.2-beta.2

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.
@@ -1,231 +1,231 @@
1
- @import "@trionesdev/antd-mobile-base-react/dist/style/variable";
2
-
3
- $trionesButtonPendingInlineSm: 7Px;
4
- $trionesButtonHeightSm: 24Px;
5
-
6
- $trionesButtonPendingInline: 15Px;
7
- $trionesButtonHeight: 32Px;
8
-
9
- $trionesButtonContentFontSizeLg: $trionesFontSizeLg;
10
- $trionesButtonPendingInlineLg: 15Px;
11
- $trionesButtonHeightLg: 40Px;
12
-
13
- button::after {
14
- content: none;
15
- width: 100%;
16
- }
17
-
18
- $buttonCls: 'triones-antm-button';
19
- .#{$buttonCls} {
20
- width: auto;
21
- position: relative;
22
- display: inline-flex;
23
- flex-direction: column;
24
- justify-self: center;
25
- align-items: center;
26
- justify-content: center;
27
- height: auto;
28
- line-height: normal;
29
- border-radius: 4Px;
30
- border: 1Px none;
31
- box-sizing: border-box;
32
- font-size: 14Px;
33
- z-index: 2;
34
- margin-top: 0;
35
-
36
- &:active {
37
- filter: brightness(92%);
38
- }
39
- &::after{
40
- content: none;
41
- }
42
-
43
- &[disabled] {
44
- opacity: 0.4;
45
-
46
- &:active {
47
- filter: none;
48
- }
49
- }
50
- &:not([disabled]):active{}
51
-
52
- &-color {
53
- &-default {
54
- background-color: #ffffff;
55
-
56
- &.#{$buttonCls} {
57
- &-variant {
58
- &-solid {
59
- color: #ffffff;
60
- background-color: rgba(0, 0, 0, 0.75);
61
- box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.75);
62
- }
63
-
64
- &-outlined {
65
- color: rgba(0, 0, 0, 0.75);
66
- border: 1px solid rgba(0, 0, 0, 0.75);
67
- background-color: white;
68
- }
69
-
70
- &-dashed {
71
- color: rgba(0, 0, 0, 0.75);
72
- border: 1px dashed rgba(0, 0, 0, 0.75);
73
- background-color: #ffffff;
74
- }
75
-
76
- &-filled {
77
- color: rgba(0, 0, 0, 0.75);
78
- background-color: rgba(0, 0, 0, 0.06);
79
- }
80
-
81
- &-text {
82
- color: rgba(0, 0, 0, 0.75);
83
- background-color: #ffffff;
84
- }
85
-
86
- &-link {
87
- color: rgba(0, 0, 0, 0.75);
88
- background-color: #ffffff;
89
-
90
- &:active {
91
- filter: none;
92
- }
93
- }
94
- }
95
- }
96
- }
97
-
98
- &-primary {
99
- &.#{$buttonCls} {
100
- &-variant {
101
- &-solid {
102
- color: #ffffff;
103
- background-color: $trionesColorPrimaryText;
104
- box-shadow: inset 0 0 0 1px $trionesColorPrimaryText;
105
- }
106
-
107
- &-outlined {
108
- color: #1677ff;
109
- background-color: white;
110
- border: 1px solid $trionesColorPrimaryText;
111
- }
112
-
113
- &-dashed {
114
- color: $trionesColorPrimaryText;
115
- border: 1px dashed $trionesColorPrimaryText;
116
- background-color: #ffffff;
117
- }
118
-
119
- &-filled {
120
- color: $trionesColorPrimaryText;
121
- background-color: $trionesColorPrimaryBg;
122
- }
123
-
124
- &-text {
125
- color: $trionesColorPrimaryText;
126
- background-color: #ffffff;
127
- }
128
-
129
- &-link {
130
- color: $trionesColorPrimaryText;
131
- background-color: #ffffff;
132
-
133
- &:active {
134
- filter: none;
135
- }
136
- }
137
- }
138
- }
139
- }
140
-
141
- &-danger {
142
- &.#{$buttonCls} {
143
- &-variant {
144
- &-solid {
145
- color: #ffffff;
146
- background-color: $trionesColorErrorText;
147
- box-shadow: inset 0 0 0 1px $trionesColorErrorText;
148
- }
149
-
150
- &-outlined {
151
- color: $trionesColorErrorText;
152
- background-color: #ffffff;
153
- border: 1px solid $trionesColorErrorText;
154
- }
155
-
156
- &-dashed {
157
- color: $trionesColorErrorText;
158
- border: 1px dashed $trionesColorErrorText;
159
- background-color: #ffffff;
160
- }
161
-
162
- &-filled {
163
- color: $trionesColorErrorText;
164
- background-color: #ffdfdc;
165
- }
166
-
167
- &-text {
168
- color: $trionesColorErrorText;
169
- background-color: #ffffff;
170
- }
171
-
172
- &-link {
173
- color: $trionesColorErrorText;
174
- background-color: #ffffff;
175
-
176
- &:active {
177
- filter: none;
178
- }
179
- }
180
- }
181
- }
182
- }
183
- }
184
-
185
- &-variant {
186
- &-solid {
187
- }
188
-
189
- &-outlined {
190
- background-color: #ffffff;
191
- }
192
-
193
- &-dashed {
194
- border: 1px dashed #d9d9d9;
195
- background-color: #ffffff;
196
- }
197
-
198
- &-text {
199
- background-color: #ffffff;
200
- }
201
-
202
- &-link {
203
- background-color: #ffffff;
204
- }
205
- }
206
-
207
- &-block {
208
- display: flex;
209
- width: 100%;
210
- }
211
-
212
- &-small {
213
- font-size: $trionesFontSizeSm;
214
- padding-inline: $trionesButtonPendingInlineSm;
215
- height: $trionesButtonHeightSm;
216
- border-radius: $trionesBorderRadiusSm;
217
- }
218
-
219
- &-middle {
220
- padding-inline: $trionesButtonPendingInline;
221
- height: $trionesButtonHeight;
222
- border-radius: $trionesBorderRadius;
223
- }
224
-
225
- &-large {
226
- font-size: $trionesButtonContentFontSizeLg;
227
- padding-inline: $trionesButtonPendingInlineLg;
228
- height: $trionesButtonHeightLg;
229
- border-radius: $trionesBorderRadiusLg;
230
- }
231
- }
1
+ @use "../style/variable" as *;
2
+
3
+ $trionesButtonPendingInlineSm: 7Px;
4
+ $trionesButtonHeightSm: 24Px;
5
+
6
+ $trionesButtonPendingInline: 15Px;
7
+ $trionesButtonHeight: 32Px;
8
+
9
+ $trionesButtonContentFontSizeLg: $trionesFontSizeLg;
10
+ $trionesButtonPendingInlineLg: 15Px;
11
+ $trionesButtonHeightLg: 40Px;
12
+
13
+ button::after {
14
+ content: none;
15
+ width: 100%;
16
+ }
17
+
18
+ $buttonCls: 'triones-antm-button';
19
+ .#{$buttonCls} {
20
+ width: auto;
21
+ position: relative;
22
+ display: inline-flex;
23
+ flex-direction: column;
24
+ justify-self: center;
25
+ align-items: center;
26
+ justify-content: center;
27
+ height: auto;
28
+ line-height: normal;
29
+ border-radius: 4Px;
30
+ border: 1Px none;
31
+ box-sizing: border-box;
32
+ font-size: 14Px;
33
+ z-index: 2;
34
+ margin-top: 0;
35
+
36
+ &:active {
37
+ filter: brightness(92%);
38
+ }
39
+ &::after{
40
+ content: none;
41
+ }
42
+
43
+ &[disabled] {
44
+ opacity: 0.4;
45
+
46
+ &:active {
47
+ filter: none;
48
+ }
49
+ }
50
+ &:not([disabled]):active{}
51
+
52
+ &-color {
53
+ &-default {
54
+ background-color: #ffffff;
55
+
56
+ &.#{$buttonCls} {
57
+ &-variant {
58
+ &-solid {
59
+ color: #ffffff;
60
+ background-color: rgba(0, 0, 0, 0.75);
61
+ box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.75);
62
+ }
63
+
64
+ &-outlined {
65
+ color: rgba(0, 0, 0, 0.75);
66
+ border: 1px solid rgba(0, 0, 0, 0.75);
67
+ background-color: white;
68
+ }
69
+
70
+ &-dashed {
71
+ color: rgba(0, 0, 0, 0.75);
72
+ border: 1px dashed rgba(0, 0, 0, 0.75);
73
+ background-color: #ffffff;
74
+ }
75
+
76
+ &-filled {
77
+ color: rgba(0, 0, 0, 0.75);
78
+ background-color: rgba(0, 0, 0, 0.06);
79
+ }
80
+
81
+ &-text {
82
+ color: rgba(0, 0, 0, 0.75);
83
+ background-color: #ffffff;
84
+ }
85
+
86
+ &-link {
87
+ color: rgba(0, 0, 0, 0.75);
88
+ background-color: #ffffff;
89
+
90
+ &:active {
91
+ filter: none;
92
+ }
93
+ }
94
+ }
95
+ }
96
+ }
97
+
98
+ &-primary {
99
+ &.#{$buttonCls} {
100
+ &-variant {
101
+ &-solid {
102
+ color: #ffffff;
103
+ background-color: $trionesColorPrimaryText;
104
+ box-shadow: inset 0 0 0 1px $trionesColorPrimaryText;
105
+ }
106
+
107
+ &-outlined {
108
+ color: #1677ff;
109
+ background-color: white;
110
+ border: 1px solid $trionesColorPrimaryText;
111
+ }
112
+
113
+ &-dashed {
114
+ color: $trionesColorPrimaryText;
115
+ border: 1px dashed $trionesColorPrimaryText;
116
+ background-color: #ffffff;
117
+ }
118
+
119
+ &-filled {
120
+ color: $trionesColorPrimaryText;
121
+ background-color: $trionesColorPrimaryBg;
122
+ }
123
+
124
+ &-text {
125
+ color: $trionesColorPrimaryText;
126
+ background-color: #ffffff;
127
+ }
128
+
129
+ &-link {
130
+ color: $trionesColorPrimaryText;
131
+ background-color: #ffffff;
132
+
133
+ &:active {
134
+ filter: none;
135
+ }
136
+ }
137
+ }
138
+ }
139
+ }
140
+
141
+ &-danger {
142
+ &.#{$buttonCls} {
143
+ &-variant {
144
+ &-solid {
145
+ color: #ffffff;
146
+ background-color: $trionesColorErrorText;
147
+ box-shadow: inset 0 0 0 1px $trionesColorErrorText;
148
+ }
149
+
150
+ &-outlined {
151
+ color: $trionesColorErrorText;
152
+ background-color: #ffffff;
153
+ border: 1px solid $trionesColorErrorText;
154
+ }
155
+
156
+ &-dashed {
157
+ color: $trionesColorErrorText;
158
+ border: 1px dashed $trionesColorErrorText;
159
+ background-color: #ffffff;
160
+ }
161
+
162
+ &-filled {
163
+ color: $trionesColorErrorText;
164
+ background-color: #ffdfdc;
165
+ }
166
+
167
+ &-text {
168
+ color: $trionesColorErrorText;
169
+ background-color: #ffffff;
170
+ }
171
+
172
+ &-link {
173
+ color: $trionesColorErrorText;
174
+ background-color: #ffffff;
175
+
176
+ &:active {
177
+ filter: none;
178
+ }
179
+ }
180
+ }
181
+ }
182
+ }
183
+ }
184
+
185
+ &-variant {
186
+ &-solid {
187
+ }
188
+
189
+ &-outlined {
190
+ background-color: #ffffff;
191
+ }
192
+
193
+ &-dashed {
194
+ border: 1px dashed #d9d9d9;
195
+ background-color: #ffffff;
196
+ }
197
+
198
+ &-text {
199
+ background-color: #ffffff;
200
+ }
201
+
202
+ &-link {
203
+ background-color: #ffffff;
204
+ }
205
+ }
206
+
207
+ &-block {
208
+ display: flex;
209
+ width: 100%;
210
+ }
211
+
212
+ &-small {
213
+ font-size: $trionesFontSizeSm;
214
+ padding-inline: $trionesButtonPendingInlineSm;
215
+ height: $trionesButtonHeightSm;
216
+ border-radius: $trionesBorderRadiusSm;
217
+ }
218
+
219
+ &-middle {
220
+ padding-inline: $trionesButtonPendingInline;
221
+ height: $trionesButtonHeight;
222
+ border-radius: $trionesBorderRadius;
223
+ }
224
+
225
+ &-large {
226
+ font-size: $trionesButtonContentFontSizeLg;
227
+ padding-inline: $trionesButtonPendingInlineLg;
228
+ height: $trionesButtonHeightLg;
229
+ border-radius: $trionesBorderRadiusLg;
230
+ }
231
+ }
@@ -13,7 +13,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  import classNames from 'classnames';
16
- import { isEmpty } from 'lodash';
16
+ import { isEmpty } from 'lodash-es';
17
17
  import React, { forwardRef, memo, useEffect, useMemo, useState } from 'react';
18
18
  import "./style.scss";
19
19
  var calendarCls = 'triones-antm-calendar';
@@ -5,7 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
5
5
  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; } }
6
6
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
7
  import classNames from 'classnames';
8
- import _ from 'lodash';
8
+ import _ from 'lodash-es';
9
9
  import React, { memo, useEffect, useRef, useState } from 'react';
10
10
  import { CalendarGrid } from "./calendar-grid";
11
11
  import { CalendarHeader } from "./calendar-header";
@@ -1,85 +1,85 @@
1
- @import "@trionesdev/antd-mobile-base-react/dist/style/variable";
2
-
3
- $calendarCls: 'triones-antm-calendar';
4
-
5
- .#{$calendarCls}-grid {
6
- //display: flex;
7
- //flex-wrap: wrap;
8
- display: grid;
9
- grid-template-columns: repeat(7, 1fr);
10
- }
11
-
12
- .#{$calendarCls}-cell {
13
- aspect-ratio: 1;
14
- display: flex;
15
- justify-content: center;
16
- align-items: center;
17
- border-radius: $trionesBorderRadius;
18
- cursor: default;
19
- flex-direction: column;
20
-
21
- &-date {
22
- display: flex;
23
- width: 100%;
24
- justify-content: center;
25
- align-items: center;
26
- }
27
-
28
- &-mouth {
29
- display: flex;
30
- width: 100%;
31
- justify-content: center;
32
- align-items: center;
33
- font-size: 8Px;
34
- }
35
-
36
- &.#{$calendarCls}-cell {
37
- &-disabled {
38
- color: #999999;
39
- }
40
-
41
- &-selected {
42
- background-color: $trionesColorPrimary;
43
- color: white;
44
- }
45
-
46
- &-selected-range {
47
- border-radius: 0;
48
- background-color: $trionesColorPrimaryBg;
49
- color: black;
50
- }
51
- }
52
- }
53
-
54
- .#{$calendarCls} {
55
- &-header {
56
- display: flex;
57
- justify-content: space-between;
58
- align-items: center;
59
-
60
- &-title {
61
- font-size: 16Px;
62
- padding: 8Px;
63
- text-align: center;
64
- }
65
-
66
- &-button {
67
- padding-left: 12Px;
68
- padding-right: 12Px;
69
- cursor: pointer;
70
- }
71
- }
72
-
73
- &-week {
74
- display: grid;
75
- grid-template-columns: repeat(7, 1fr);
76
-
77
- &-cell {
78
- display: flex;
79
- justify-content: center;
80
- align-items: center;
81
- padding-top: 8Px;
82
- padding-bottom: 8Px;
83
- }
84
- }
85
- }
1
+ @use "../style/variable" as *;
2
+
3
+ $calendarCls: 'triones-antm-calendar';
4
+
5
+ .#{$calendarCls}-grid {
6
+ //display: flex;
7
+ //flex-wrap: wrap;
8
+ display: grid;
9
+ grid-template-columns: repeat(7, 1fr);
10
+ }
11
+
12
+ .#{$calendarCls}-cell {
13
+ aspect-ratio: 1;
14
+ display: flex;
15
+ justify-content: center;
16
+ align-items: center;
17
+ border-radius: $trionesBorderRadius;
18
+ cursor: default;
19
+ flex-direction: column;
20
+
21
+ &-date {
22
+ display: flex;
23
+ width: 100%;
24
+ justify-content: center;
25
+ align-items: center;
26
+ }
27
+
28
+ &-mouth {
29
+ display: flex;
30
+ width: 100%;
31
+ justify-content: center;
32
+ align-items: center;
33
+ font-size: 8Px;
34
+ }
35
+
36
+ &.#{$calendarCls}-cell {
37
+ &-disabled {
38
+ color: #999999;
39
+ }
40
+
41
+ &-selected {
42
+ background-color: $trionesColorPrimary;
43
+ color: white;
44
+ }
45
+
46
+ &-selected-range {
47
+ border-radius: 0;
48
+ background-color: $trionesColorPrimaryBg;
49
+ color: black;
50
+ }
51
+ }
52
+ }
53
+
54
+ .#{$calendarCls} {
55
+ &-header {
56
+ display: flex;
57
+ justify-content: space-between;
58
+ align-items: center;
59
+
60
+ &-title {
61
+ font-size: 16Px;
62
+ padding: 8Px;
63
+ text-align: center;
64
+ }
65
+
66
+ &-button {
67
+ padding-left: 12Px;
68
+ padding-right: 12Px;
69
+ cursor: pointer;
70
+ }
71
+ }
72
+
73
+ &-week {
74
+ display: grid;
75
+ grid-template-columns: repeat(7, 1fr);
76
+
77
+ &-cell {
78
+ display: flex;
79
+ justify-content: center;
80
+ align-items: center;
81
+ padding-top: 8Px;
82
+ padding-bottom: 8Px;
83
+ }
84
+ }
85
+ }