@semcore/time-picker 3.0.33 → 3.0.35
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/CHANGELOG.md +2 -200
- package/LICENSE +21 -0
- package/lib/cjs/TimePicker.js +13 -13
- package/lib/cjs/index.d.js +2 -0
- package/lib/cjs/index.d.js.map +1 -0
- package/lib/es6/TimePicker.js +13 -13
- package/lib/es6/index.d.js +2 -0
- package/lib/es6/index.d.js.map +1 -0
- package/package.json +7 -6
- package/lib/cjs/index.d.ts +0 -49
- package/lib/es6/index.d.ts +0 -49
package/CHANGELOG.md
CHANGED
|
@@ -2,53 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
-
## [3.0.
|
|
5
|
+
## [3.0.35] - 2022-10-06
|
|
6
6
|
|
|
7
7
|
### Changed
|
|
8
8
|
|
|
9
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.1.
|
|
10
|
-
|
|
11
|
-
## [3.0.32] - 2022-09-21
|
|
12
|
-
|
|
13
|
-
### Changed
|
|
14
|
-
|
|
15
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.1.1 ~> 3.1.2]).
|
|
16
|
-
|
|
17
|
-
## [3.0.31] - 2022-09-21
|
|
18
|
-
|
|
19
|
-
### Changed
|
|
20
|
-
|
|
21
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.1.0 ~> 3.1.1]).
|
|
22
|
-
|
|
23
|
-
## [3.0.30] - 2022-09-21
|
|
24
|
-
|
|
25
|
-
### Changed
|
|
26
|
-
|
|
27
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.25 ~> 3.1.0]).
|
|
28
|
-
|
|
29
|
-
## [3.0.29] - 2022-09-20
|
|
30
|
-
|
|
31
|
-
### Changed
|
|
32
|
-
|
|
33
|
-
- Version patch update due to children dependencies update (`@semcore/button` [4.0.16 ~> 4.0.17], `@semcore/select` [3.0.24 ~> 3.0.25]).
|
|
34
|
-
|
|
35
|
-
## [3.0.28] - 2022-08-30
|
|
36
|
-
|
|
37
|
-
### Changed
|
|
38
|
-
|
|
39
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.37.0 ~> 3.37.1], `@semcore/flex-box` [4.5.10 ~> 4.5.11], `@semcore/button` [4.0.15 ~> 4.0.16], `@semcore/input` [3.0.14 ~> 3.0.15], `@semcore/select` [3.0.23 ~> 3.0.24]).
|
|
40
|
-
|
|
41
|
-
## [3.0.27] - 2022-08-30
|
|
42
|
-
|
|
43
|
-
### Changed
|
|
44
|
-
|
|
45
|
-
- Version patch update due to children dependencies update (`@semcore/button` [4.0.14 ~> 4.0.15]).
|
|
46
|
-
|
|
47
|
-
## [3.0.26] - 2022-08-25
|
|
48
|
-
|
|
49
|
-
### Changed
|
|
50
|
-
|
|
51
|
-
- Version patch update due to children dependencies update (`@semcore/button` [4.0.13 ~> 4.0.14]).
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/select` [3.1.5 ~> 3.1.6]).
|
|
52
10
|
|
|
53
11
|
## [3.0.25] - 2022-08-23
|
|
54
12
|
|
|
@@ -62,96 +20,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
|
|
|
62
20
|
|
|
63
21
|
- Version patch update due to children dependencies update (`@semcore/button` [4.0.12 ~> 4.0.13]).
|
|
64
22
|
|
|
65
|
-
## [3.0.23] - 2022-08-18
|
|
66
|
-
|
|
67
|
-
### Changed
|
|
68
|
-
|
|
69
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.21 ~> 3.0.22]).
|
|
70
|
-
|
|
71
|
-
## [3.0.22] - 2022-08-18
|
|
72
|
-
|
|
73
|
-
### Changed
|
|
74
|
-
|
|
75
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.20 ~> 3.0.21]).
|
|
76
|
-
|
|
77
|
-
## [3.0.21] - 2022-08-18
|
|
78
|
-
|
|
79
|
-
### Changed
|
|
80
|
-
|
|
81
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.36.0 ~> 3.37.0], `@semcore/flex-box` [4.5.9 ~> 4.5.10], `@semcore/button` [4.0.11 ~> 4.0.12], `@semcore/input` [3.0.12 ~> 3.0.13], `@semcore/select` [3.0.19 ~> 3.0.20]).
|
|
82
|
-
|
|
83
|
-
## [3.0.20] - 2022-08-11
|
|
84
|
-
|
|
85
|
-
### Changed
|
|
86
|
-
|
|
87
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.35.1 ~> 3.36.0], `@semcore/flex-box` [4.5.8 ~> 4.5.9], `@semcore/button` [4.0.10 ~> 4.0.11], `@semcore/input` [3.0.11 ~> 3.0.12], `@semcore/select` [3.0.18 ~> 3.0.19]).
|
|
88
|
-
|
|
89
|
-
## [3.0.19] - 2022-07-25
|
|
90
|
-
|
|
91
|
-
### Changed
|
|
92
|
-
|
|
93
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.16 ~> 3.0.17]).
|
|
94
|
-
|
|
95
|
-
## [3.0.18] - 2022-07-25
|
|
96
|
-
|
|
97
|
-
### Changed
|
|
98
|
-
|
|
99
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.9 ~> 3.0.10], `@semcore/select` [3.0.15 ~> 3.0.16]).
|
|
100
|
-
|
|
101
|
-
## [3.0.17] - 2022-07-22
|
|
102
|
-
|
|
103
|
-
### Changed
|
|
104
|
-
|
|
105
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.34.0 ~> 3.35.0], `@semcore/flex-box` [4.5.6 ~> 4.5.7], `@semcore/button` [4.0.8 ~> 4.0.9], `@semcore/input` [3.0.8 ~> 3.0.9], `@semcore/select` [3.0.14 ~> 3.0.15]).
|
|
106
|
-
|
|
107
|
-
## [3.0.16] - 2022-07-21
|
|
108
|
-
|
|
109
|
-
### Changed
|
|
110
|
-
|
|
111
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.13 ~> 3.0.14]).
|
|
112
|
-
|
|
113
|
-
## [3.0.15] - 2022-07-18
|
|
114
|
-
|
|
115
|
-
### Changed
|
|
116
|
-
|
|
117
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.12 ~> 3.0.13]).
|
|
118
|
-
|
|
119
|
-
## [3.0.14] - 2022-07-14
|
|
120
|
-
|
|
121
|
-
### Changed
|
|
122
|
-
|
|
123
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.7 ~> 3.0.8], `@semcore/select` [3.0.11 ~> 3.0.12]).
|
|
124
|
-
|
|
125
|
-
## [3.0.13] - 2022-07-14
|
|
126
|
-
|
|
127
|
-
### Changed
|
|
128
|
-
|
|
129
|
-
- Version patch update due to children dependencies update (`@semcore/button` [4.0.7 ~> 4.0.8], `@semcore/input` [3.0.6 ~> 3.0.7], `@semcore/select` [3.0.10 ~> 3.0.11]).
|
|
130
|
-
|
|
131
|
-
## [3.0.12] - 2022-07-13
|
|
132
|
-
|
|
133
|
-
### Changed
|
|
134
|
-
|
|
135
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.9 ~> 3.0.10]).
|
|
136
|
-
|
|
137
|
-
## [3.0.11] - 2022-06-02
|
|
138
|
-
|
|
139
|
-
### Changed
|
|
140
|
-
|
|
141
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.2 ~> 3.33.0], `@semcore/flex-box` [4.5.4 ~> 4.5.5], `@semcore/button` [4.0.5 ~> 4.0.6], `@semcore/input` [3.0.4 ~> 3.0.5], `@semcore/select` [3.0.7 ~> 3.0.8]).
|
|
142
|
-
|
|
143
|
-
## [3.0.10] - 2022-05-31
|
|
144
|
-
|
|
145
|
-
### Changed
|
|
146
|
-
|
|
147
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.1 ~> 3.32.2], `@semcore/flex-box` [4.5.3 ~> 4.5.4], `@semcore/button` [4.0.4 ~> 4.0.5], `@semcore/input` [3.0.3 ~> 3.0.4], `@semcore/select` [3.0.6 ~> 3.0.7]).
|
|
148
|
-
|
|
149
|
-
## [3.0.9] - 2022-05-31
|
|
150
|
-
|
|
151
|
-
### Changed
|
|
152
|
-
|
|
153
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.5 ~> 3.0.6]).
|
|
154
|
-
|
|
155
23
|
## [3.0.8] - 2022-05-30
|
|
156
24
|
|
|
157
25
|
### Fixed
|
|
@@ -164,30 +32,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
|
|
|
164
32
|
|
|
165
33
|
- Version patch update due to children dependencies update (`@semcore/button` [4.0.3 ~> 4.0.4]).
|
|
166
34
|
|
|
167
|
-
## [3.0.6] - 2022-05-23
|
|
168
|
-
|
|
169
|
-
### Changed
|
|
170
|
-
|
|
171
|
-
- Version patch update due to children dependencies update (`@semcore/input` [3.0.2 ~> 3.0.3], `@semcore/select` [3.0.4 ~> 3.0.5]).
|
|
172
|
-
|
|
173
|
-
## [3.0.5] - 2022-05-23
|
|
174
|
-
|
|
175
|
-
### Changed
|
|
176
|
-
|
|
177
|
-
- Version patch update due to children dependencies update (`@semcore/button` [4.0.2 ~> 4.0.3]).
|
|
178
|
-
|
|
179
|
-
## [3.0.4] - 2022-05-19
|
|
180
|
-
|
|
181
|
-
### Changed
|
|
182
|
-
|
|
183
|
-
- Version patch update due to children dependencies update (`@semcore/select` [3.0.3 ~> 3.0.4]).
|
|
184
|
-
|
|
185
|
-
## [3.0.3] - 2022-05-19
|
|
186
|
-
|
|
187
|
-
### Changed
|
|
188
|
-
|
|
189
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.32.0 ~> 3.32.1], `@semcore/flex-box` [4.5.1 ~> 4.5.3], `@semcore/button` [4.0.1 ~> 4.0.2], `@semcore/input` [3.0.1 ~> 3.0.2], `@semcore/select` [3.0.2 ~> 3.0.3]).
|
|
190
|
-
|
|
191
35
|
## [3.0.2] - 2022-05-19
|
|
192
36
|
|
|
193
37
|
### Fixed
|
|
@@ -212,48 +56,6 @@ CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangel
|
|
|
212
56
|
|
|
213
57
|
- Version patch update due to children dependencies update (`@semcore/select` [2.7.11 ~> 2.7.12]).
|
|
214
58
|
|
|
215
|
-
## [2.4.15] - 2022-04-28
|
|
216
|
-
|
|
217
|
-
### Changed
|
|
218
|
-
|
|
219
|
-
- Version patch update due to children dependencies update (`@semcore/select` [2.7.10 ~> 2.7.11]).
|
|
220
|
-
|
|
221
|
-
## [2.4.14] - 2022-04-25
|
|
222
|
-
|
|
223
|
-
### Changed
|
|
224
|
-
|
|
225
|
-
- Version patch update due to children dependencies update (`@semcore/select` [2.7.9 ~> 2.7.10]).
|
|
226
|
-
|
|
227
|
-
## [2.4.13] - 2022-04-21
|
|
228
|
-
|
|
229
|
-
### Changed
|
|
230
|
-
|
|
231
|
-
- Version patch update due to children dependencies update (`@semcore/select` [2.7.8 ~> 2.7.9]).
|
|
232
|
-
|
|
233
|
-
## [2.4.12] - 2022-03-21
|
|
234
|
-
|
|
235
|
-
### Changed
|
|
236
|
-
|
|
237
|
-
- Version patch update due to children dependencies update (`@semcore/select` [2.7.7 ~> 2.7.8]).
|
|
238
|
-
|
|
239
|
-
## [2.4.11] - 2022-03-14
|
|
240
|
-
|
|
241
|
-
### Changed
|
|
242
|
-
|
|
243
|
-
- Version patch update due to children dependencies update (`@semcore/utils` [3.31.2 ~> 3.31.2], `@semcore/flex-box` [4.5.0 ~> 4.5.1], `@semcore/button` [3.3.6 ~> 3.3.7], `@semcore/input` [2.2.4 ~> 2.2.5], `@semcore/select` [2.7.6 ~> 2.7.7]).
|
|
244
|
-
|
|
245
|
-
## [2.4.10] - 2022-03-10
|
|
246
|
-
|
|
247
|
-
### Changed
|
|
248
|
-
|
|
249
|
-
- Version patch update due to children dependencies update (`@semcore/select` [2.7.5 ~> 2.7.6]).
|
|
250
|
-
|
|
251
|
-
## [2.4.9] - 2022-03-05
|
|
252
|
-
|
|
253
|
-
### Changed
|
|
254
|
-
|
|
255
|
-
- Version patch update due to children dependencies update (`@semcore/select` [2.7.4 ~> 2.7.5]).
|
|
256
|
-
|
|
257
59
|
## [2.4.6] - 2022-02-24
|
|
258
60
|
|
|
259
61
|
### Added
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright ©, 2022, Semrush Inc. (written by Roman Lysov, Sergey Kobets, Mikhail Karachev, Julia Mnizhek, Elena Krasnopolskaia, Mikhail Sereniti).
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/lib/cjs/TimePicker.js
CHANGED
|
@@ -61,22 +61,22 @@ var style = (
|
|
|
61
61
|
/*__reshadow_css_start__*/
|
|
62
62
|
_core.sstyled.insert(
|
|
63
63
|
/*__inner_css_start__*/
|
|
64
|
-
".
|
|
64
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___STimePicker_bd4ou_gg_ {\n position: relative;\n width: auto;\n}\n\n.___STimePicker_bd4ou_gg_.__disabled_bd4ou_gg_ {\n color: rgba(25, 27, 35, 0.3);\n cursor: default;\n}\n\n.___SPickerInput_bd4ou_gg_ {\n box-sizing: content-box;\n text-align: center;\n z-index: 1\n}\n\n.___SPickerInput_bd4ou_gg_.__placeholder_bd4ou_gg_ {\n text-overflow: initial;\n }\n\n.___SPickerInput_bd4ou_gg_._size_m_bd4ou_gg_ {\n width: 19px;\n}\n\n.___SPickerInput_bd4ou_gg_._size_l_bd4ou_gg_ {\n width: 21px;\n}\n\n.___SPickerFormat_bd4ou_gg_ {\n flex-shrink: 0;\n position: relative;\n display: inline-flex;\n padding: 0;\n white-space: nowrap;\n font-family: inherit;\n font-weight: 500;\n line-height: normal;\n text-decoration: none;\n align-items: center;\n border: 1px solid #c4c7cf;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-shadow: none;\n cursor: pointer;\n box-sizing: border-box;\n overflow: visible;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n touch-action: manipulation;\n -webkit-tap-highlight-color: transparent;\n color: #6c6e79;\n background-color: rgba(138, 142, 155, 0.1)\n}\n\n.___SPickerFormat_bd4ou_gg_:hover {\n color: #6c6e79;\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SPickerFormat_bd4ou_gg_:active,\n .___SPickerFormat_bd4ou_gg_.__active_bd4ou_gg_ {\n color: #6c6e79;\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SPickerFormat_bd4ou_gg_._size_m_bd4ou_gg_ {\n height: 28px;\n font-size: 14px;\n margin: 0 -1px 0 0\n}\n\n.___SPickerFormat_bd4ou_gg_._size_m_bd4ou_gg_ .___SPickerFormatText_bd4ou_gg_ {\n margin: 0 8px;\n }\n\n.___SPickerFormat_bd4ou_gg_._size_l_bd4ou_gg_ {\n height: 40px;\n font-size: 16px;\n margin: 0 -4px 0 0\n}\n\n.___SPickerFormat_bd4ou_gg_._size_l_bd4ou_gg_ .___SPickerFormatText_bd4ou_gg_ {\n margin: 0 12px;\n }\n\n.___SPickerFormat_bd4ou_gg_.__disabled_bd4ou_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n border-color: transparent transparent transparent #c4c7cf;\n}\n\n.___SPickerFormat_bd4ou_gg_.__keyboardFocused_bd4ou_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___STimePickerSeparator_bd4ou_gg_.__disabled_bd4ou_gg_ {\n opacity: 0.3;\n pointer-events: none;\n}\n"
|
|
65
65
|
/*__inner_css_end__*/
|
|
66
|
-
, "
|
|
66
|
+
, "bd4ou_gg_")
|
|
67
67
|
/*__reshadow_css_end__*/
|
|
68
68
|
, {
|
|
69
|
-
"__STimePicker": "
|
|
70
|
-
"_disabled": "
|
|
71
|
-
"__SPickerInput": "
|
|
72
|
-
"_placeholder": "
|
|
73
|
-
"_size_m": "
|
|
74
|
-
"_size_l": "
|
|
75
|
-
"__SPickerFormat": "
|
|
76
|
-
"_active": "
|
|
77
|
-
"__SPickerFormatText": "
|
|
78
|
-
"_keyboardFocused": "
|
|
79
|
-
"__STimePickerSeparator": "
|
|
69
|
+
"__STimePicker": "___STimePicker_bd4ou_gg_",
|
|
70
|
+
"_disabled": "__disabled_bd4ou_gg_",
|
|
71
|
+
"__SPickerInput": "___SPickerInput_bd4ou_gg_",
|
|
72
|
+
"_placeholder": "__placeholder_bd4ou_gg_",
|
|
73
|
+
"_size_m": "_size_m_bd4ou_gg_",
|
|
74
|
+
"_size_l": "_size_l_bd4ou_gg_",
|
|
75
|
+
"__SPickerFormat": "___SPickerFormat_bd4ou_gg_",
|
|
76
|
+
"_active": "__active_bd4ou_gg_",
|
|
77
|
+
"__SPickerFormatText": "___SPickerFormatText_bd4ou_gg_",
|
|
78
|
+
"_keyboardFocused": "__keyboardFocused_bd4ou_gg_",
|
|
79
|
+
"__STimePickerSeparator": "___STimePickerSeparator_bd4ou_gg_"
|
|
80
80
|
});
|
|
81
81
|
var MAP_MERIDIEM = {
|
|
82
82
|
AM: 'PM',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IInputProps, IInputValueProps } from '@semcore/input';\nimport { Box, IBoxProps } from '@semcore/flex-box';\nimport { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\nexport interface ITimePickerProps extends Omit<IInputProps, 'size'> {\n /** Time in the hh:mm format */\n value?: string;\n /** Default value if `value` property is not provided */\n defaultValue?: string;\n /** The event responses upon time changing */\n onChange?: (time: string, event?: React.SyntheticEvent) => void;\n /** In charge of the component blocking */\n disabled?: boolean;\n /** Control size\n * @default m */\n size?: 'm' | 'l';\n /** 12-hour time format */\n is12Hour?: boolean;\n}\n\nexport interface ITimePickerItemProps extends IInputValueProps {\n /** Step for changing of the values in the dropdown list */\n step?: number;\n}\n\nexport interface ITimePickerFormatProps extends IBoxProps, IKeyboardFocusProps {}\n\nexport interface ITimePickerContext {\n getHoursProps: PropGetterFn;\n getFormatProps: PropGetterFn;\n getMinutesProps: PropGetterFn;\n}\n\nexport interface ITimePickerHandlers {\n value: (value: string) => void;\n}\n\ndeclare const TimePicker: (<T>(\n props: CProps<ITimePickerProps & T, ITimePickerContext, ITimePickerHandlers>,\n) => ReturnEl) & {\n Hours: <T>(props: ITimePickerItemProps & T) => ReturnEl;\n Minutes: <T>(props: ITimePickerItemProps & T) => ReturnEl;\n Separator: typeof Box;\n Format: <T>(props: ITimePickerFormatProps & T) => ReturnEl;\n};\n\nexport default TimePicker;\n"],"mappings":""}
|
package/lib/es6/TimePicker.js
CHANGED
|
@@ -30,22 +30,22 @@ var style = (
|
|
|
30
30
|
/*__reshadow_css_start__*/
|
|
31
31
|
_sstyled.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
".
|
|
33
|
+
":root {\n\n /* DEPRECATED START\n Deprecated variables should never be used in\n components styles but preserved for backward\n compatibility if they used in projects\n like `<Badge bg=\"red\">alpha</Badge>`\n */\n /* DEPRECATED END */\n}\n\n.___STimePicker_bd4ou_gg_ {\n position: relative;\n width: auto;\n}\n\n.___STimePicker_bd4ou_gg_.__disabled_bd4ou_gg_ {\n color: rgba(25, 27, 35, 0.3);\n cursor: default;\n}\n\n.___SPickerInput_bd4ou_gg_ {\n box-sizing: content-box;\n text-align: center;\n z-index: 1\n}\n\n.___SPickerInput_bd4ou_gg_.__placeholder_bd4ou_gg_ {\n text-overflow: initial;\n }\n\n.___SPickerInput_bd4ou_gg_._size_m_bd4ou_gg_ {\n width: 19px;\n}\n\n.___SPickerInput_bd4ou_gg_._size_l_bd4ou_gg_ {\n width: 21px;\n}\n\n.___SPickerFormat_bd4ou_gg_ {\n flex-shrink: 0;\n position: relative;\n display: inline-flex;\n padding: 0;\n white-space: nowrap;\n font-family: inherit;\n font-weight: 500;\n line-height: normal;\n text-decoration: none;\n align-items: center;\n border: 1px solid #c4c7cf;\n border-radius: 0 6px 6px 0;\n outline: 0;\n box-shadow: none;\n cursor: pointer;\n box-sizing: border-box;\n overflow: visible;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n touch-action: manipulation;\n -webkit-tap-highlight-color: transparent;\n color: #6c6e79;\n background-color: rgba(138, 142, 155, 0.1)\n}\n\n.___SPickerFormat_bd4ou_gg_:hover {\n color: #6c6e79;\n background-color: rgba(138, 142, 155, 0.2);\n }\n\n.___SPickerFormat_bd4ou_gg_:active,\n .___SPickerFormat_bd4ou_gg_.__active_bd4ou_gg_ {\n color: #6c6e79;\n background-color: rgba(138, 142, 155, 0.3);\n }\n\n.___SPickerFormat_bd4ou_gg_._size_m_bd4ou_gg_ {\n height: 28px;\n font-size: 14px;\n margin: 0 -1px 0 0\n}\n\n.___SPickerFormat_bd4ou_gg_._size_m_bd4ou_gg_ .___SPickerFormatText_bd4ou_gg_ {\n margin: 0 8px;\n }\n\n.___SPickerFormat_bd4ou_gg_._size_l_bd4ou_gg_ {\n height: 40px;\n font-size: 16px;\n margin: 0 -4px 0 0\n}\n\n.___SPickerFormat_bd4ou_gg_._size_l_bd4ou_gg_ .___SPickerFormatText_bd4ou_gg_ {\n margin: 0 12px;\n }\n\n.___SPickerFormat_bd4ou_gg_.__disabled_bd4ou_gg_ {\n opacity: 0.3;\n cursor: default;\n pointer-events: none;\n border-color: transparent transparent transparent #c4c7cf;\n}\n\n.___SPickerFormat_bd4ou_gg_.__keyboardFocused_bd4ou_gg_ {\n box-shadow: 0 0 0 3px rgba(0, 143, 248, 0.2);\n}\n\n.___STimePickerSeparator_bd4ou_gg_.__disabled_bd4ou_gg_ {\n opacity: 0.3;\n pointer-events: none;\n}\n"
|
|
34
34
|
/*__inner_css_end__*/
|
|
35
|
-
, "
|
|
35
|
+
, "bd4ou_gg_")
|
|
36
36
|
/*__reshadow_css_end__*/
|
|
37
37
|
, {
|
|
38
|
-
"__STimePicker": "
|
|
39
|
-
"_disabled": "
|
|
40
|
-
"__SPickerInput": "
|
|
41
|
-
"_placeholder": "
|
|
42
|
-
"_size_m": "
|
|
43
|
-
"_size_l": "
|
|
44
|
-
"__SPickerFormat": "
|
|
45
|
-
"_active": "
|
|
46
|
-
"__SPickerFormatText": "
|
|
47
|
-
"_keyboardFocused": "
|
|
48
|
-
"__STimePickerSeparator": "
|
|
38
|
+
"__STimePicker": "___STimePicker_bd4ou_gg_",
|
|
39
|
+
"_disabled": "__disabled_bd4ou_gg_",
|
|
40
|
+
"__SPickerInput": "___SPickerInput_bd4ou_gg_",
|
|
41
|
+
"_placeholder": "__placeholder_bd4ou_gg_",
|
|
42
|
+
"_size_m": "_size_m_bd4ou_gg_",
|
|
43
|
+
"_size_l": "_size_l_bd4ou_gg_",
|
|
44
|
+
"__SPickerFormat": "___SPickerFormat_bd4ou_gg_",
|
|
45
|
+
"_active": "__active_bd4ou_gg_",
|
|
46
|
+
"__SPickerFormatText": "___SPickerFormatText_bd4ou_gg_",
|
|
47
|
+
"_keyboardFocused": "__keyboardFocused_bd4ou_gg_",
|
|
48
|
+
"__STimePickerSeparator": "___STimePickerSeparator_bd4ou_gg_"
|
|
49
49
|
});
|
|
50
50
|
var MAP_MERIDIEM = {
|
|
51
51
|
AM: 'PM',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import React from 'react';\nimport { CProps, PropGetterFn, ReturnEl } from '@semcore/core';\nimport { IInputProps, IInputValueProps } from '@semcore/input';\nimport { Box, IBoxProps } from '@semcore/flex-box';\nimport { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\nexport interface ITimePickerProps extends Omit<IInputProps, 'size'> {\n /** Time in the hh:mm format */\n value?: string;\n /** Default value if `value` property is not provided */\n defaultValue?: string;\n /** The event responses upon time changing */\n onChange?: (time: string, event?: React.SyntheticEvent) => void;\n /** In charge of the component blocking */\n disabled?: boolean;\n /** Control size\n * @default m */\n size?: 'm' | 'l';\n /** 12-hour time format */\n is12Hour?: boolean;\n}\n\nexport interface ITimePickerItemProps extends IInputValueProps {\n /** Step for changing of the values in the dropdown list */\n step?: number;\n}\n\nexport interface ITimePickerFormatProps extends IBoxProps, IKeyboardFocusProps {}\n\nexport interface ITimePickerContext {\n getHoursProps: PropGetterFn;\n getFormatProps: PropGetterFn;\n getMinutesProps: PropGetterFn;\n}\n\nexport interface ITimePickerHandlers {\n value: (value: string) => void;\n}\n\ndeclare const TimePicker: (<T>(\n props: CProps<ITimePickerProps & T, ITimePickerContext, ITimePickerHandlers>,\n) => ReturnEl) & {\n Hours: <T>(props: ITimePickerItemProps & T) => ReturnEl;\n Minutes: <T>(props: ITimePickerItemProps & T) => ReturnEl;\n Separator: typeof Box;\n Format: <T>(props: ITimePickerFormatProps & T) => ReturnEl;\n};\n\nexport default TimePicker;\n"],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/time-picker",
|
|
3
3
|
"description": "Semrush TimePicker Component",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.35",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"build": "build --source=js",
|
|
13
|
-
"test": "jest --no-cache"
|
|
14
|
-
},
|
|
15
11
|
"dependencies": {
|
|
16
12
|
"@semcore/utils": "^3.15",
|
|
17
13
|
"@semcore/flex-box": "^4",
|
|
@@ -32,6 +28,11 @@
|
|
|
32
28
|
"directory": "semcore/time-picker"
|
|
33
29
|
},
|
|
34
30
|
"devDependencies": {
|
|
31
|
+
"@types/react": "16.8 - 17",
|
|
35
32
|
"@semcore/jest-preset-ui": "1.0.0"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build": "pnpm semcore-builder --source=js",
|
|
36
|
+
"test": "jest --no-cache"
|
|
36
37
|
}
|
|
37
|
-
}
|
|
38
|
+
}
|
package/lib/cjs/index.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { IInputProps, IInputValueProps } from '@semcore/input';
|
|
4
|
-
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
5
|
-
import { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
6
|
-
|
|
7
|
-
export interface ITimePickerProps extends Omit<IInputProps, 'size'> {
|
|
8
|
-
/** Time in the hh:mm format */
|
|
9
|
-
value?: string;
|
|
10
|
-
/** Default value if `value` property is not provided */
|
|
11
|
-
defaultValue?: string;
|
|
12
|
-
/** The event responses upon time changing */
|
|
13
|
-
onChange?: (time: string, event?: React.SyntheticEvent) => void;
|
|
14
|
-
/** In charge of the component blocking */
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
/** Control size
|
|
17
|
-
* @default m */
|
|
18
|
-
size?: 'm' | 'l';
|
|
19
|
-
/** 12-hour time format */
|
|
20
|
-
is12Hour?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface ITimePickerItemProps extends IInputValueProps {
|
|
24
|
-
/** Step for changing of the values in the dropdown list */
|
|
25
|
-
step?: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface ITimePickerFormatProps extends IBoxProps, IKeyboardFocusProps {}
|
|
29
|
-
|
|
30
|
-
export interface ITimePickerContext {
|
|
31
|
-
getHoursProps: PropGetterFn;
|
|
32
|
-
getFormatProps: PropGetterFn;
|
|
33
|
-
getMinutesProps: PropGetterFn;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface ITimePickerHandlers {
|
|
37
|
-
value: (value: string) => void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare const TimePicker: (<T>(
|
|
41
|
-
props: CProps<ITimePickerProps & T, ITimePickerContext, ITimePickerHandlers>,
|
|
42
|
-
) => ReturnEl) & {
|
|
43
|
-
Hours: <T>(props: ITimePickerItemProps & T) => ReturnEl;
|
|
44
|
-
Minutes: <T>(props: ITimePickerItemProps & T) => ReturnEl;
|
|
45
|
-
Separator: typeof Box;
|
|
46
|
-
Format: <T>(props: ITimePickerFormatProps & T) => ReturnEl;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default TimePicker;
|
package/lib/es6/index.d.ts
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { CProps, PropGetterFn, ReturnEl } from '@semcore/core';
|
|
3
|
-
import { IInputProps, IInputValueProps } from '@semcore/input';
|
|
4
|
-
import { Box, IBoxProps } from '@semcore/flex-box';
|
|
5
|
-
import { IKeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
6
|
-
|
|
7
|
-
export interface ITimePickerProps extends Omit<IInputProps, 'size'> {
|
|
8
|
-
/** Time in the hh:mm format */
|
|
9
|
-
value?: string;
|
|
10
|
-
/** Default value if `value` property is not provided */
|
|
11
|
-
defaultValue?: string;
|
|
12
|
-
/** The event responses upon time changing */
|
|
13
|
-
onChange?: (time: string, event?: React.SyntheticEvent) => void;
|
|
14
|
-
/** In charge of the component blocking */
|
|
15
|
-
disabled?: boolean;
|
|
16
|
-
/** Control size
|
|
17
|
-
* @default m */
|
|
18
|
-
size?: 'm' | 'l';
|
|
19
|
-
/** 12-hour time format */
|
|
20
|
-
is12Hour?: boolean;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export interface ITimePickerItemProps extends IInputValueProps {
|
|
24
|
-
/** Step for changing of the values in the dropdown list */
|
|
25
|
-
step?: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export interface ITimePickerFormatProps extends IBoxProps, IKeyboardFocusProps {}
|
|
29
|
-
|
|
30
|
-
export interface ITimePickerContext {
|
|
31
|
-
getHoursProps: PropGetterFn;
|
|
32
|
-
getFormatProps: PropGetterFn;
|
|
33
|
-
getMinutesProps: PropGetterFn;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export interface ITimePickerHandlers {
|
|
37
|
-
value: (value: string) => void;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
declare const TimePicker: (<T>(
|
|
41
|
-
props: CProps<ITimePickerProps & T, ITimePickerContext, ITimePickerHandlers>,
|
|
42
|
-
) => ReturnEl) & {
|
|
43
|
-
Hours: <T>(props: ITimePickerItemProps & T) => ReturnEl;
|
|
44
|
-
Minutes: <T>(props: ITimePickerItemProps & T) => ReturnEl;
|
|
45
|
-
Separator: typeof Box;
|
|
46
|
-
Format: <T>(props: ITimePickerFormatProps & T) => ReturnEl;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
export default TimePicker;
|