@semcore/time-picker 3.0.33 → 3.0.34
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 +6 -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 +3 -2
- package/lib/cjs/index.d.ts +0 -49
- package/lib/es6/index.d.ts +0 -49
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.0.34] - 2022-10-04
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/utils` [3.37.1 ~> 3.37.2], `@semcore/flex-box` [4.5.11 ~> 4.5.12], `@semcore/button` [4.0.17 ~> 4.0.18], `@semcore/input` [3.0.15 ~> 3.0.16], `@semcore/select` [3.1.4 ~> 3.1.5]).
|
|
10
|
+
|
|
5
11
|
## [3.0.33] - 2022-09-29
|
|
6
12
|
|
|
7
13
|
### Changed
|
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
|
+
".___STimePicker_thfjf_gg_{position:relative;width:auto}.___STimePicker_thfjf_gg_.__disabled_thfjf_gg_{color:rgba(25,27,35,.3);cursor:default}.___SPickerInput_thfjf_gg_{box-sizing:content-box;text-align:center;z-index:1}.___SPickerInput_thfjf_gg_.__placeholder_thfjf_gg_{text-overflow:clip}.___SPickerInput_thfjf_gg_._size_m_thfjf_gg_{width:19px}.___SPickerInput_thfjf_gg_._size_l_thfjf_gg_{width:21px}.___SPickerFormat_thfjf_gg_{flex-shrink:0;position:relative;display:inline-flex;padding:0;white-space:nowrap;font-family:inherit;font-weight:500;line-height:normal;text-decoration:none;align-items:center;border:1px solid #c4c7cf;border-radius:0 6px 6px 0;outline:0;box-shadow:none;cursor:pointer;box-sizing:border-box;overflow:visible;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;color:#6c6e79;background-color:rgba(138,142,155,.1)}.___SPickerFormat_thfjf_gg_:hover{color:#6c6e79;background-color:rgba(138,142,155,.2)}.___SPickerFormat_thfjf_gg_:active,.___SPickerFormat_thfjf_gg_.__active_thfjf_gg_{color:#6c6e79;background-color:rgba(138,142,155,.3)}.___SPickerFormat_thfjf_gg_._size_m_thfjf_gg_{height:28px;font-size:14px;margin:0 -1px 0 0}.___SPickerFormat_thfjf_gg_._size_m_thfjf_gg_ .___SPickerFormatText_thfjf_gg_{margin:0 8px}.___SPickerFormat_thfjf_gg_._size_l_thfjf_gg_{height:40px;font-size:16px;margin:0 -4px 0 0}.___SPickerFormat_thfjf_gg_._size_l_thfjf_gg_ .___SPickerFormatText_thfjf_gg_{margin:0 12px}.___SPickerFormat_thfjf_gg_.__disabled_thfjf_gg_{opacity:0.3;cursor:default;pointer-events:none;border-color:transparent transparent transparent #c4c7cf}.___SPickerFormat_thfjf_gg_.__keyboardFocused_thfjf_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___STimePickerSeparator_thfjf_gg_.__disabled_thfjf_gg_{opacity:0.3;pointer-events:none}"
|
|
65
65
|
/*__inner_css_end__*/
|
|
66
|
-
, "
|
|
66
|
+
, "thfjf_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_thfjf_gg_",
|
|
70
|
+
"_disabled": "__disabled_thfjf_gg_",
|
|
71
|
+
"__SPickerInput": "___SPickerInput_thfjf_gg_",
|
|
72
|
+
"_placeholder": "__placeholder_thfjf_gg_",
|
|
73
|
+
"_size_m": "_size_m_thfjf_gg_",
|
|
74
|
+
"_size_l": "_size_l_thfjf_gg_",
|
|
75
|
+
"__SPickerFormat": "___SPickerFormat_thfjf_gg_",
|
|
76
|
+
"_active": "__active_thfjf_gg_",
|
|
77
|
+
"__SPickerFormatText": "___SPickerFormatText_thfjf_gg_",
|
|
78
|
+
"_keyboardFocused": "__keyboardFocused_thfjf_gg_",
|
|
79
|
+
"__STimePickerSeparator": "___STimePickerSeparator_thfjf_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
|
+
".___STimePicker_thfjf_gg_{position:relative;width:auto}.___STimePicker_thfjf_gg_.__disabled_thfjf_gg_{color:rgba(25,27,35,.3);cursor:default}.___SPickerInput_thfjf_gg_{box-sizing:content-box;text-align:center;z-index:1}.___SPickerInput_thfjf_gg_.__placeholder_thfjf_gg_{text-overflow:clip}.___SPickerInput_thfjf_gg_._size_m_thfjf_gg_{width:19px}.___SPickerInput_thfjf_gg_._size_l_thfjf_gg_{width:21px}.___SPickerFormat_thfjf_gg_{flex-shrink:0;position:relative;display:inline-flex;padding:0;white-space:nowrap;font-family:inherit;font-weight:500;line-height:normal;text-decoration:none;align-items:center;border:1px solid #c4c7cf;border-radius:0 6px 6px 0;outline:0;box-shadow:none;cursor:pointer;box-sizing:border-box;overflow:visible;-webkit-user-select:none;-moz-user-select:none;user-select:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;color:#6c6e79;background-color:rgba(138,142,155,.1)}.___SPickerFormat_thfjf_gg_:hover{color:#6c6e79;background-color:rgba(138,142,155,.2)}.___SPickerFormat_thfjf_gg_:active,.___SPickerFormat_thfjf_gg_.__active_thfjf_gg_{color:#6c6e79;background-color:rgba(138,142,155,.3)}.___SPickerFormat_thfjf_gg_._size_m_thfjf_gg_{height:28px;font-size:14px;margin:0 -1px 0 0}.___SPickerFormat_thfjf_gg_._size_m_thfjf_gg_ .___SPickerFormatText_thfjf_gg_{margin:0 8px}.___SPickerFormat_thfjf_gg_._size_l_thfjf_gg_{height:40px;font-size:16px;margin:0 -4px 0 0}.___SPickerFormat_thfjf_gg_._size_l_thfjf_gg_ .___SPickerFormatText_thfjf_gg_{margin:0 12px}.___SPickerFormat_thfjf_gg_.__disabled_thfjf_gg_{opacity:0.3;cursor:default;pointer-events:none;border-color:transparent transparent transparent #c4c7cf}.___SPickerFormat_thfjf_gg_.__keyboardFocused_thfjf_gg_{box-shadow:0 0 0 3px rgba(0, 143, 248, 0.2)}.___STimePickerSeparator_thfjf_gg_.__disabled_thfjf_gg_{opacity:0.3;pointer-events:none}"
|
|
34
34
|
/*__inner_css_end__*/
|
|
35
|
-
, "
|
|
35
|
+
, "thfjf_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_thfjf_gg_",
|
|
39
|
+
"_disabled": "__disabled_thfjf_gg_",
|
|
40
|
+
"__SPickerInput": "___SPickerInput_thfjf_gg_",
|
|
41
|
+
"_placeholder": "__placeholder_thfjf_gg_",
|
|
42
|
+
"_size_m": "_size_m_thfjf_gg_",
|
|
43
|
+
"_size_l": "_size_l_thfjf_gg_",
|
|
44
|
+
"__SPickerFormat": "___SPickerFormat_thfjf_gg_",
|
|
45
|
+
"_active": "__active_thfjf_gg_",
|
|
46
|
+
"__SPickerFormatText": "___SPickerFormatText_thfjf_gg_",
|
|
47
|
+
"_keyboardFocused": "__keyboardFocused_thfjf_gg_",
|
|
48
|
+
"__STimePickerSeparator": "___STimePickerSeparator_thfjf_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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/time-picker",
|
|
3
3
|
"description": "Semrush TimePicker Component",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.34",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"scripts": {
|
|
12
|
-
"build": "
|
|
12
|
+
"build": "pnpm semcore-builder --source=js",
|
|
13
13
|
"test": "jest --no-cache"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"directory": "semcore/time-picker"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
+
"@types/react": "16.8 - 17",
|
|
35
36
|
"@semcore/jest-preset-ui": "1.0.0"
|
|
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;
|