funda-ui 2.7.155 → 2.9.305
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/CascadingSelect/index.css +1 -1
- package/CascadingSelect/index.js +2 -1
- package/CascadingSelectE2E/index.css +1 -1
- package/CascadingSelectE2E/index.js +2 -1
- package/Date/index.css +350 -0
- package/Date/index.d.ts +51 -0
- package/Date/index.js +1981 -0
- package/DropdownMenu/index.css +1 -1
- package/DropdownMenu/index.js +4 -1
- package/EventCalendar/index.js +30 -16
- package/EventCalendarTimeline/index.css +1 -1
- package/EventCalendarTimeline/index.js +34 -17
- package/Input/index.js +1 -1
- package/LiveSearch/index.css +1 -1
- package/LiveSearch/index.js +3 -2
- package/MultiFuncSelect/index.css +1 -1
- package/MultiFuncSelect/index.js +2 -1
- package/README.md +2 -1
- package/RangeSlider/index.js +1 -1
- package/SearchBar/index.js +1 -1
- package/Table/index.js +0 -1
- package/Tooltip/index.css +1 -1
- package/Tooltip/index.js +2 -1
- package/all.d.ts +1 -0
- package/all.js +1 -0
- package/lib/cjs/CascadingSelect/index.js +2 -1
- package/lib/cjs/CascadingSelectE2E/index.js +2 -1
- package/lib/cjs/Date/index.d.ts +51 -0
- package/lib/cjs/Date/index.js +1981 -0
- package/lib/cjs/DropdownMenu/index.js +4 -1
- package/lib/cjs/EventCalendar/index.js +30 -16
- package/lib/cjs/EventCalendarTimeline/index.js +34 -17
- package/lib/cjs/Input/index.js +1 -1
- package/lib/cjs/LiveSearch/index.js +3 -2
- package/lib/cjs/MultiFuncSelect/index.js +2 -1
- package/lib/cjs/RangeSlider/index.js +1 -1
- package/lib/cjs/SearchBar/index.js +1 -1
- package/lib/cjs/Table/index.js +0 -1
- package/lib/cjs/Tooltip/index.js +2 -1
- package/lib/cjs/index.d.ts +1 -0
- package/lib/cjs/index.js +1 -0
- package/lib/css/CascadingSelect/index.css +1 -1
- package/lib/css/CascadingSelectE2E/index.css +1 -1
- package/lib/css/Date/index.css +350 -0
- package/lib/css/DropdownMenu/index.css +1 -1
- package/lib/css/EventCalendarTimeline/index.css +1 -1
- package/lib/css/LiveSearch/index.css +1 -1
- package/lib/css/MultiFuncSelect/index.css +1 -1
- package/lib/css/Tooltip/index.css +1 -1
- package/lib/esm/CascadingSelect/index.scss +1 -1
- package/lib/esm/CascadingSelect/index.tsx +1 -1
- package/lib/esm/CascadingSelectE2E/index.scss +1 -1
- package/lib/esm/CascadingSelectE2E/index.tsx +1 -1
- package/lib/esm/Date/Calendar.tsx +516 -0
- package/lib/esm/Date/index.scss +447 -0
- package/lib/esm/Date/index.tsx +745 -0
- package/lib/esm/Date/localization/en_US.js +13 -0
- package/lib/esm/Date/localization/zh_CN.js +12 -0
- package/lib/esm/Date/utils/get-element-property.js +153 -0
- package/lib/esm/DropdownMenu/index.scss +1 -1
- package/lib/esm/DropdownMenu/index.tsx +1 -0
- package/lib/esm/EventCalendar/index.tsx +35 -16
- package/lib/esm/EventCalendarTimeline/index.scss +1 -1
- package/lib/esm/EventCalendarTimeline/index.tsx +36 -16
- package/lib/esm/Input/index.tsx +1 -1
- package/lib/esm/LiveSearch/index.scss +1 -1
- package/lib/esm/LiveSearch/index.tsx +1 -1
- package/lib/esm/MultiFuncSelect/index.scss +1 -1
- package/lib/esm/MultiFuncSelect/index.tsx +1 -1
- package/lib/esm/SearchBar/index.tsx +1 -1
- package/lib/esm/Table/TableFieldRow.tsx +0 -1
- package/lib/esm/Tooltip/index.scss +1 -1
- package/lib/esm/Tooltip/index.tsx +2 -1
- package/lib/esm/index.js +1 -0
- package/package.json +1 -1
package/CascadingSelect/index.js
CHANGED
|
@@ -1581,7 +1581,8 @@ var CascadingSelect = function CascadingSelect(props) {
|
|
|
1581
1581
|
id: "cas-select__items-wrapper-".concat(idRes),
|
|
1582
1582
|
className: "cas-select__items-wrapper position-absolute border shadow small",
|
|
1583
1583
|
style: {
|
|
1584
|
-
zIndex: depth ? depth : 1055
|
|
1584
|
+
zIndex: depth ? depth : 1055,
|
|
1585
|
+
display: 'none'
|
|
1585
1586
|
}
|
|
1586
1587
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
|
|
1587
1588
|
className: "cas-select__items-inner"
|
|
@@ -1957,7 +1957,8 @@ var CascadingSelectE2E = function CascadingSelectE2E(props) {
|
|
|
1957
1957
|
id: "cas-select-e2e__items-wrapper-".concat(idRes),
|
|
1958
1958
|
className: "cas-select-e2e__items-wrapper position-absolute border shadow small",
|
|
1959
1959
|
style: {
|
|
1960
|
-
zIndex: depth ? depth : 1055
|
|
1960
|
+
zIndex: depth ? depth : 1055,
|
|
1961
|
+
display: 'none'
|
|
1961
1962
|
}
|
|
1962
1963
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
|
|
1963
1964
|
className: "cas-select-e2e__items-inner"
|
package/Date/index.css
ADDED
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
/* ======================================================
|
|
2
|
+
<!-- Date -->
|
|
3
|
+
/* ====================================================== */
|
|
4
|
+
.date2d__trigger {
|
|
5
|
+
--date2d-focus-border-color:#86b7fe;
|
|
6
|
+
--date2d-focus-box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
|
|
7
|
+
}
|
|
8
|
+
.date2d__trigger.focus .date2d__control input {
|
|
9
|
+
box-shadow: var(--date2d-focus-box-shadow);
|
|
10
|
+
border-color: var(--date2d-focus-border-color);
|
|
11
|
+
outline: 0;
|
|
12
|
+
}
|
|
13
|
+
.date2d__trigger .date2d__control {
|
|
14
|
+
position: relative;
|
|
15
|
+
}
|
|
16
|
+
.date2d__trigger .date2d__control .date2d__control__icon {
|
|
17
|
+
position: absolute;
|
|
18
|
+
top: 0.3rem;
|
|
19
|
+
right: 0.5rem;
|
|
20
|
+
z-index: 6;
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.date2d__wrapper {
|
|
25
|
+
--date2d-box-shadow: 0 5px 15px 0 rgba(0,0,0,.07), 0 15px 35px 0 rgba(50,50,93,.1);
|
|
26
|
+
--date2d-bg: #fff;
|
|
27
|
+
--date2d-font-size: 0.75rem;
|
|
28
|
+
--date2d-title-font-size: 0.875rem;
|
|
29
|
+
--date2d-title-bg: #f8f9fa;
|
|
30
|
+
--date2d-border-color: #ddd;
|
|
31
|
+
--date2d-title-border-color: #eee;
|
|
32
|
+
--date2d-timeselected-bg: #0b5ed7;
|
|
33
|
+
--date2d-timeselected-text-color: #fff;
|
|
34
|
+
--date2d-time-btn-hover-bg: rgba(0, 58, 166, .1);
|
|
35
|
+
position: absolute;
|
|
36
|
+
z-index: 1055; /* --bs-modal-zindex */
|
|
37
|
+
display: none;
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
border-radius: 4px;
|
|
40
|
+
text-align: left;
|
|
41
|
+
box-shadow: var(--date2d-box-shadow);
|
|
42
|
+
background: var(--date2d-bg);
|
|
43
|
+
font-size: var(--date2d-font-size);
|
|
44
|
+
opacity: 0;
|
|
45
|
+
/* Time Control */
|
|
46
|
+
}
|
|
47
|
+
.date2d__wrapper.active {
|
|
48
|
+
display: block !important;
|
|
49
|
+
animation-name: date2d-show;
|
|
50
|
+
animation-duration: 0.05s;
|
|
51
|
+
animation-timing-function: linear;
|
|
52
|
+
animation-delay: 0.1s;
|
|
53
|
+
animation-iteration-count: 1;
|
|
54
|
+
animation-fill-mode: forwards;
|
|
55
|
+
}
|
|
56
|
+
.date2d__wrapper ul, .date2d__wrapper li {
|
|
57
|
+
white-space: normal;
|
|
58
|
+
margin: 0;
|
|
59
|
+
padding: 0;
|
|
60
|
+
list-style: none;
|
|
61
|
+
}
|
|
62
|
+
.date2d__wrapper .date2d__tools-container .date2d__hourslist,
|
|
63
|
+
.date2d__wrapper .date2d__tools-container .date2d__minuteslist,
|
|
64
|
+
.date2d__wrapper .date2d__tools-container .date2d__secondslist {
|
|
65
|
+
border-top: 1px solid var(--date2d-border-color);
|
|
66
|
+
border-bottom: 1px solid var(--date2d-border-color);
|
|
67
|
+
}
|
|
68
|
+
.date2d__wrapper .date2d__tools-container .date2d__hourslist h3,
|
|
69
|
+
.date2d__wrapper .date2d__tools-container .date2d__minuteslist h3,
|
|
70
|
+
.date2d__wrapper .date2d__tools-container .date2d__secondslist h3 {
|
|
71
|
+
font-size: var(--date2d-title-font-size);
|
|
72
|
+
padding: 0.2rem 0.5rem 0.3rem;
|
|
73
|
+
border-bottom: 1px solid var(--date2d-title-border-color);
|
|
74
|
+
background: var(--date2d-title-bg);
|
|
75
|
+
}
|
|
76
|
+
.date2d__wrapper .date2d__tools-container .date2d__hourslist ul,
|
|
77
|
+
.date2d__wrapper .date2d__tools-container .date2d__minuteslist ul,
|
|
78
|
+
.date2d__wrapper .date2d__tools-container .date2d__secondslist ul {
|
|
79
|
+
padding: 0.15rem;
|
|
80
|
+
width: 5.625rem;
|
|
81
|
+
}
|
|
82
|
+
.date2d__wrapper .date2d__tools-container .date2d__hourslist ul li,
|
|
83
|
+
.date2d__wrapper .date2d__tools-container .date2d__minuteslist ul li,
|
|
84
|
+
.date2d__wrapper .date2d__tools-container .date2d__secondslist ul li {
|
|
85
|
+
display: inline-block;
|
|
86
|
+
}
|
|
87
|
+
.date2d__wrapper .date2d__tools-container .date2d__hourslist ul li a,
|
|
88
|
+
.date2d__wrapper .date2d__tools-container .date2d__minuteslist ul li a,
|
|
89
|
+
.date2d__wrapper .date2d__tools-container .date2d__secondslist ul li a {
|
|
90
|
+
display: inline-block;
|
|
91
|
+
width: 1.75rem;
|
|
92
|
+
height: 1.75rem;
|
|
93
|
+
border-radius: 50%;
|
|
94
|
+
line-height: 2.2;
|
|
95
|
+
font-size: var(--date2d-font-size);
|
|
96
|
+
text-align: center;
|
|
97
|
+
text-decoration: none;
|
|
98
|
+
}
|
|
99
|
+
.date2d__wrapper .date2d__tools-container .date2d__hourslist ul li a.selected,
|
|
100
|
+
.date2d__wrapper .date2d__tools-container .date2d__minuteslist ul li a.selected,
|
|
101
|
+
.date2d__wrapper .date2d__tools-container .date2d__secondslist ul li a.selected {
|
|
102
|
+
color: var(--date2d-timeselected-text-color);
|
|
103
|
+
background-color: var(--date2d-timeselected-bg);
|
|
104
|
+
}
|
|
105
|
+
.date2d__wrapper .date2d__tools-container .date2d__hourslist ul li:hover,
|
|
106
|
+
.date2d__wrapper .date2d__tools-container .date2d__minuteslist ul li:hover,
|
|
107
|
+
.date2d__wrapper .date2d__tools-container .date2d__secondslist ul li:hover {
|
|
108
|
+
background-color: var(--date2d-time-btn-hover-bg);
|
|
109
|
+
}
|
|
110
|
+
.date2d__wrapper .date2d__tools-container .date2d__minuteslist ul,
|
|
111
|
+
.date2d__wrapper .date2d__tools-container .date2d__secondslist ul {
|
|
112
|
+
width: 10.9375rem;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@keyframes date2d-show {
|
|
116
|
+
0% {
|
|
117
|
+
opacity: 0;
|
|
118
|
+
}
|
|
119
|
+
100% {
|
|
120
|
+
opacity: 1;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
/*----------- Calendar ------------*/
|
|
124
|
+
.date2d-cal__wrapper {
|
|
125
|
+
--date2d-cal-wrapper-min-width: 300px;
|
|
126
|
+
--date2d-cal-body-bg: #fff;
|
|
127
|
+
--date2d-cal-border-color: #ddd;
|
|
128
|
+
--date2d-cal-border-color-hover: #333;
|
|
129
|
+
--date2d-cal-header-fs: 1.125rem;
|
|
130
|
+
--date2d-cal-default-border-color: #eee;
|
|
131
|
+
--date2d-cal-day-border-color: #ddd;
|
|
132
|
+
--date2d-cal-day-hover-bg: #f6f6f6;
|
|
133
|
+
--date2d-cal-dayselected-bg: #0b5ed7;
|
|
134
|
+
--date2d-cal-dayselected-text-color: #fff;
|
|
135
|
+
--date2d-cal-year-month-btn-border-color: #ddd;
|
|
136
|
+
--date2d-cal-year-month-btn-hover-bg: rgba(0, 58, 166, .1);
|
|
137
|
+
--date2d-cal-year-month-btn-selected-bg: rgba(0, 58, 166, 1);
|
|
138
|
+
--date2d-cal-year-month-btn-selected-color: #fff;
|
|
139
|
+
--date2d-cal-month-wrapper-w: 18.75rem;
|
|
140
|
+
--date2d-cal-year-wrapper-w: 18.75rem;
|
|
141
|
+
--date2d-cal-header-arrow-bg: #000;
|
|
142
|
+
--date2d-cal-header-text-color: #000;
|
|
143
|
+
--date2d-cal-header-prevnext-btn-bg: transparent;
|
|
144
|
+
--date2d-cal-header-prevnext-btn-color: #000;
|
|
145
|
+
--date2d-cal-header-prevnext-btn-radius: 0.25rem;
|
|
146
|
+
--date2d-cal-delete-btn-color: #ee4949;
|
|
147
|
+
--date2d-cal-footer-today-btn-bg: rgba(0, 58, 166, 1);
|
|
148
|
+
--date2d-cal-footer-today-btn-color: #fff;
|
|
149
|
+
--date2d-cal-event-bg: rgb(255, 240, 227);
|
|
150
|
+
position: relative;
|
|
151
|
+
min-width: var(--date2d-cal-wrapper-min-width);
|
|
152
|
+
border: 1px solid var(--date2d-cal-border-color);
|
|
153
|
+
/* --HEADER --*/
|
|
154
|
+
/*-- BODY --*/
|
|
155
|
+
/*-- CELL --*/
|
|
156
|
+
/*-- SELECTION --*/
|
|
157
|
+
/* --BUTTON --*/
|
|
158
|
+
}
|
|
159
|
+
.date2d-cal__wrapper .date2d-cal__header {
|
|
160
|
+
font-size: var(--date2d-cal-header-fs);
|
|
161
|
+
font-weight: bold;
|
|
162
|
+
padding: 10px 10px 5px 10px;
|
|
163
|
+
display: flex;
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
}
|
|
166
|
+
.date2d-cal__wrapper .date2d-cal__header .date2d-cal__header__btns .date2d-cal__btn {
|
|
167
|
+
margin-right: 1rem;
|
|
168
|
+
color: var(--date2d-cal-header-text-color);
|
|
169
|
+
}
|
|
170
|
+
.date2d-cal__wrapper .date2d-cal__header .date2d-cal__header__btns .date2d-cal__btn svg {
|
|
171
|
+
margin-left: 0.3rem;
|
|
172
|
+
}
|
|
173
|
+
.date2d-cal__wrapper .date2d-cal__header .date2d-cal__header__btns .date2d-cal__btn svg path {
|
|
174
|
+
fill: var(--date2d-cal-header-arrow-bg);
|
|
175
|
+
}
|
|
176
|
+
.date2d-cal__wrapper .date2d-cal__header .date2d-cal__header__btns .date2d-cal__btn.active svg {
|
|
177
|
+
transform: rotate(180deg);
|
|
178
|
+
}
|
|
179
|
+
.date2d-cal__wrapper .date2d-cal__body {
|
|
180
|
+
background: var(--date2d-cal-body-bg);
|
|
181
|
+
width: 100%;
|
|
182
|
+
display: flex;
|
|
183
|
+
flex-wrap: wrap;
|
|
184
|
+
}
|
|
185
|
+
.date2d-cal__wrapper .date2d-cal__row {
|
|
186
|
+
display: flex;
|
|
187
|
+
width: 100%;
|
|
188
|
+
}
|
|
189
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell {
|
|
190
|
+
flex: 1;
|
|
191
|
+
position: relative;
|
|
192
|
+
height: auto;
|
|
193
|
+
min-height: 3.5em;
|
|
194
|
+
display: flex;
|
|
195
|
+
align-items: center;
|
|
196
|
+
justify-content: center;
|
|
197
|
+
flex-direction: column;
|
|
198
|
+
text-align: center;
|
|
199
|
+
border-width: 0;
|
|
200
|
+
border-color: var(--date2d-cal-default-border-color);
|
|
201
|
+
border-style: solid;
|
|
202
|
+
border-top-width: 1px;
|
|
203
|
+
border-right-width: 1px;
|
|
204
|
+
}
|
|
205
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell.last-cell {
|
|
206
|
+
border-right-width: 0;
|
|
207
|
+
}
|
|
208
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell.last-row {
|
|
209
|
+
border-bottom-width: 1px;
|
|
210
|
+
}
|
|
211
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell.date2d-cal__day--week {
|
|
212
|
+
min-height: 2.75em;
|
|
213
|
+
align-items: end;
|
|
214
|
+
padding-inline-end: 0.75rem;
|
|
215
|
+
}
|
|
216
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell .date2d-cal__day__event {
|
|
217
|
+
background-color: var(--date2d-cal-event-bg);
|
|
218
|
+
width: 100%;
|
|
219
|
+
padding: 0.1rem 0.5rem;
|
|
220
|
+
margin: 0.5rem;
|
|
221
|
+
border-radius: 0;
|
|
222
|
+
margin-top: 2.5rem;
|
|
223
|
+
text-align: left;
|
|
224
|
+
font-size: 0.75rem;
|
|
225
|
+
}
|
|
226
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell .date2d-cal__day__eventdel {
|
|
227
|
+
position: absolute;
|
|
228
|
+
z-index: 1;
|
|
229
|
+
left: 0;
|
|
230
|
+
top: 0;
|
|
231
|
+
display: none;
|
|
232
|
+
color: var(--date2d-cal-delete-btn-color);
|
|
233
|
+
}
|
|
234
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell .date2d-cal__day__eventdel svg path {
|
|
235
|
+
fill: var(--date2d-cal-delete-btn-color);
|
|
236
|
+
}
|
|
237
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell > span {
|
|
238
|
+
position: absolute;
|
|
239
|
+
right: 0.25rem;
|
|
240
|
+
top: 0;
|
|
241
|
+
display: inline-block;
|
|
242
|
+
padding: 0.1rem;
|
|
243
|
+
border-radius: 50%;
|
|
244
|
+
width: 1.7rem;
|
|
245
|
+
height: 1.7rem;
|
|
246
|
+
line-height: 2;
|
|
247
|
+
margin: 0.5rem 0;
|
|
248
|
+
}
|
|
249
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell > span.disabled {
|
|
250
|
+
opacity: 0.2;
|
|
251
|
+
}
|
|
252
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell:not(.empty) {
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
}
|
|
255
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell.selected > span {
|
|
256
|
+
color: var(--date2d-cal-dayselected-text-color);
|
|
257
|
+
background-color: var(--date2d-cal-dayselected-bg);
|
|
258
|
+
}
|
|
259
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell:not(.empty):hover {
|
|
260
|
+
background-color: var(--date2d-cal-day-hover-bg);
|
|
261
|
+
}
|
|
262
|
+
.date2d-cal__wrapper .date2d-cal__row .date2d-cal__cell:not(.empty):hover .date2d-cal__day__eventdel {
|
|
263
|
+
display: block;
|
|
264
|
+
}
|
|
265
|
+
.date2d-cal__wrapper .date2d-cal__month-wrapper {
|
|
266
|
+
position: absolute;
|
|
267
|
+
width: var(--date2d-cal-month-wrapper-w);
|
|
268
|
+
height: auto;
|
|
269
|
+
z-index: 1;
|
|
270
|
+
top: calc(1rem + 22px);
|
|
271
|
+
left: 50%;
|
|
272
|
+
transform: translateX(-50%);
|
|
273
|
+
display: none;
|
|
274
|
+
}
|
|
275
|
+
.date2d-cal__wrapper .date2d-cal__month-wrapper.active {
|
|
276
|
+
display: block;
|
|
277
|
+
}
|
|
278
|
+
.date2d-cal__wrapper .date2d-cal__month-wrapper .date2d-cal__month-container {
|
|
279
|
+
display: grid;
|
|
280
|
+
grid-template-columns: repeat(3, 1fr);
|
|
281
|
+
grid-template-rows: repeat(4, 2.5em);
|
|
282
|
+
grid-gap: 10px;
|
|
283
|
+
}
|
|
284
|
+
.date2d-cal__wrapper .date2d-cal__year-wrapper {
|
|
285
|
+
position: absolute;
|
|
286
|
+
width: var(--date2d-cal-year-wrapper-w);
|
|
287
|
+
height: auto;
|
|
288
|
+
z-index: 1;
|
|
289
|
+
top: calc(1rem + 22px);
|
|
290
|
+
left: 50%;
|
|
291
|
+
transform: translateX(-50%);
|
|
292
|
+
display: none;
|
|
293
|
+
}
|
|
294
|
+
.date2d-cal__wrapper .date2d-cal__year-wrapper.active {
|
|
295
|
+
display: block;
|
|
296
|
+
}
|
|
297
|
+
.date2d-cal__wrapper .date2d-cal__year-wrapper .date2d-cal__year-container {
|
|
298
|
+
display: grid;
|
|
299
|
+
grid-template-columns: repeat(4, 1fr);
|
|
300
|
+
grid-template-rows: repeat(5, 2.5em);
|
|
301
|
+
grid-gap: 5px;
|
|
302
|
+
}
|
|
303
|
+
.date2d-cal__wrapper .date2d-cal__year,
|
|
304
|
+
.date2d-cal__wrapper .date2d-cal__month {
|
|
305
|
+
display: flex;
|
|
306
|
+
align-items: center;
|
|
307
|
+
justify-content: center;
|
|
308
|
+
padding: 5px;
|
|
309
|
+
font-size: 0.875em;
|
|
310
|
+
border: 1px solid var(--date2d-cal-year-month-btn-border-color);
|
|
311
|
+
border-radius: 0.25rem;
|
|
312
|
+
cursor: pointer;
|
|
313
|
+
}
|
|
314
|
+
.date2d-cal__wrapper .date2d-cal__year:hover,
|
|
315
|
+
.date2d-cal__wrapper .date2d-cal__month:hover {
|
|
316
|
+
background-color: var(--date2d-cal-year-month-btn-hover-bg);
|
|
317
|
+
}
|
|
318
|
+
.date2d-cal__wrapper .date2d-cal__year.selected,
|
|
319
|
+
.date2d-cal__wrapper .date2d-cal__month.selected {
|
|
320
|
+
background-color: var(--date2d-cal-year-month-btn-selected-bg);
|
|
321
|
+
color: var(--date2d-cal-year-month-btn-selected-color);
|
|
322
|
+
}
|
|
323
|
+
.date2d-cal__wrapper .date2d-cal__btn {
|
|
324
|
+
border: none;
|
|
325
|
+
outline: none;
|
|
326
|
+
background: none;
|
|
327
|
+
padding: 0;
|
|
328
|
+
margin: 0;
|
|
329
|
+
box-shadow: none;
|
|
330
|
+
cursor: pointer;
|
|
331
|
+
}
|
|
332
|
+
.date2d-cal__wrapper .date2d-cal__btn svg path {
|
|
333
|
+
fill: var(--date2d-cal-header-arrow-bg);
|
|
334
|
+
}
|
|
335
|
+
.date2d-cal__wrapper .date2d-cal__btn--prev, .date2d-cal__wrapper .date2d-cal__btn--next {
|
|
336
|
+
border-radius: var(--date2d-cal-header-prevnext-btn-radius);
|
|
337
|
+
color: var(--date2d-cal-header-prevnext-btn-color);
|
|
338
|
+
background-color: var(--date2d-cal-header-prevnext-btn-bg);
|
|
339
|
+
}
|
|
340
|
+
.date2d-cal__wrapper .date2d-cal__btn--prev svg path, .date2d-cal__wrapper .date2d-cal__btn--next svg path {
|
|
341
|
+
fill: var(--date2d-cal-header-prevnext-btn-color);
|
|
342
|
+
}
|
|
343
|
+
.date2d-cal__wrapper .date2d-cal__btn--today {
|
|
344
|
+
border: 1px solid var(--date2d-cal-border-color);
|
|
345
|
+
border-radius: 0.25rem;
|
|
346
|
+
font-size: 0.875em;
|
|
347
|
+
padding: 0.2rem 1rem;
|
|
348
|
+
color: var(--date2d-cal-footer-today-btn-color);
|
|
349
|
+
background-color: var(--date2d-cal-footer-today-btn-bg);
|
|
350
|
+
}
|
package/Date/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type DateProps = {
|
|
3
|
+
wrapperClassName?: string;
|
|
4
|
+
controlClassName?: string;
|
|
5
|
+
controlGroupWrapperClassName?: string;
|
|
6
|
+
controlGroupTextClassName?: string;
|
|
7
|
+
offset?: number;
|
|
8
|
+
exceededSidePosOffset?: number;
|
|
9
|
+
localization?: 'en_US' | 'zh_CN';
|
|
10
|
+
type?: 'date' | 'datetime-local' | 'time';
|
|
11
|
+
onlyTime?: boolean;
|
|
12
|
+
truncateSeconds?: boolean;
|
|
13
|
+
valueUseSlash?: boolean;
|
|
14
|
+
min?: any;
|
|
15
|
+
max?: any;
|
|
16
|
+
value?: string;
|
|
17
|
+
label?: React.ReactNode | string;
|
|
18
|
+
units?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
alt?: any;
|
|
21
|
+
disabled?: any;
|
|
22
|
+
required?: any;
|
|
23
|
+
readOnly?: any;
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
pattern?: any;
|
|
26
|
+
iconLeft?: React.ReactNode | string;
|
|
27
|
+
iconRight?: React.ReactNode | string;
|
|
28
|
+
/** -- */
|
|
29
|
+
id?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
autoComplete?: string;
|
|
32
|
+
tabIndex?: number;
|
|
33
|
+
[key: `data-${string}`]: string | undefined;
|
|
34
|
+
onChangeCallback?: (e: any) => void;
|
|
35
|
+
onInputCallback?: (e: any) => void;
|
|
36
|
+
onKeyPressedCallback?: (e: any) => void;
|
|
37
|
+
onLoad?: (e: any, data: any) => void;
|
|
38
|
+
onChange?: (e: any, data: any) => void;
|
|
39
|
+
onBlur?: (e: any) => void;
|
|
40
|
+
onFocus?: (e: any) => void;
|
|
41
|
+
langHoursTitle?: string;
|
|
42
|
+
langMinutesTitle?: string;
|
|
43
|
+
langSecondsTitle?: string;
|
|
44
|
+
langWeek?: string[];
|
|
45
|
+
langWeekFull?: string[];
|
|
46
|
+
langMonths?: string[];
|
|
47
|
+
langMonthsFull?: string[];
|
|
48
|
+
langToday?: string;
|
|
49
|
+
};
|
|
50
|
+
declare const Date: React.ForwardRefExoticComponent<DateProps & React.RefAttributes<unknown>>;
|
|
51
|
+
export default Date;
|