@clayui/time-picker 3.55.0 → 3.56.0
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/lib/index.d.ts +47 -0
- package/package.json +8 -8
package/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
|
|
3
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
4
|
+
*/
|
|
1
5
|
import { InternalDispatch } from '@clayui/shared';
|
|
2
6
|
import React from 'react';
|
|
3
7
|
declare type ConfigMaxMin = {
|
|
@@ -20,6 +24,11 @@ export declare type Input = {
|
|
|
20
24
|
minutes: '--' | string;
|
|
21
25
|
};
|
|
22
26
|
interface IProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' | 'defaultValue'> {
|
|
27
|
+
/**
|
|
28
|
+
* Add the labels for the input elements and the input clear button,
|
|
29
|
+
* use this to provide accessibility and internationalization.
|
|
30
|
+
* By default the text is in English.
|
|
31
|
+
*/
|
|
23
32
|
ariaLabels?: {
|
|
24
33
|
ampm: string;
|
|
25
34
|
hours: string;
|
|
@@ -28,20 +37,58 @@ interface IProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange' |
|
|
|
28
37
|
timeDown: string;
|
|
29
38
|
timeUp: string;
|
|
30
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Range settings for 12 or 24 hours.
|
|
42
|
+
*/
|
|
31
43
|
config?: {
|
|
32
44
|
use12Hours: Config;
|
|
33
45
|
use24Hours: Config;
|
|
34
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* Flag to disable user interactions on the component.
|
|
49
|
+
*/
|
|
35
50
|
disabled?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Property to set the default value (uncontrolled).
|
|
53
|
+
*/
|
|
36
54
|
defaultValue?: Input;
|
|
55
|
+
/**
|
|
56
|
+
* Flag to indicate if show time icon or not.
|
|
57
|
+
*/
|
|
37
58
|
icon?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Called when input values change hour, minutes or ampm (controlled).
|
|
61
|
+
*/
|
|
38
62
|
onChange?: InternalDispatch<Input>;
|
|
63
|
+
/**
|
|
64
|
+
* Called when input values change hour, minutes or ampm (controlled).
|
|
65
|
+
* @deprecated since v3.52.0 - use `onChange` instead.
|
|
66
|
+
*/
|
|
39
67
|
onInputChange?: InternalDispatch<Input>;
|
|
68
|
+
/**
|
|
69
|
+
* Name attribute for the hidden input (used for form submission).
|
|
70
|
+
*/
|
|
40
71
|
name?: string;
|
|
72
|
+
/**
|
|
73
|
+
* The path to the SVG spritemap file containing the icons.
|
|
74
|
+
*/
|
|
41
75
|
spritemap?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Flag to indicate the timezone of the user.
|
|
78
|
+
*/
|
|
42
79
|
timezone?: string;
|
|
80
|
+
/**
|
|
81
|
+
* Flag to indicate if 12-hour use, when true, should show am/pm input.
|
|
82
|
+
*/
|
|
43
83
|
use12Hours?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* Sets the values for the hour, minute, or am/pm input (controlled).
|
|
86
|
+
* @deprecated since v3.52.0 - use `value` instead.
|
|
87
|
+
*/
|
|
44
88
|
values?: Input;
|
|
89
|
+
/**
|
|
90
|
+
* Sets the values for the hour, minute, or am/pm input (controlled).
|
|
91
|
+
*/
|
|
45
92
|
value?: Input;
|
|
46
93
|
}
|
|
47
94
|
declare const ClayTimePicker: React.FunctionComponent<IProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clayui/time-picker",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.56.0",
|
|
4
4
|
"description": "ClayTimePicker component",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"repository": "https://github.com/liferay/clay",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
],
|
|
14
14
|
"scripts": {
|
|
15
15
|
"build": "cross-env NODE_ENV=production babel src --root-mode upward --out-dir lib --extensions .ts,.tsx",
|
|
16
|
-
"
|
|
17
|
-
"prepublishOnly": "yarn build && yarn
|
|
16
|
+
"buildTypes": "cross-env NODE_ENV=production tsc --project ./tsconfig.declarations.json",
|
|
17
|
+
"prepublishOnly": "yarn build && yarn buildTypes",
|
|
18
18
|
"test": "jest --config ../../jest.config.js"
|
|
19
19
|
},
|
|
20
20
|
"keywords": [
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"react"
|
|
23
23
|
],
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@clayui/button": "^3.
|
|
26
|
-
"@clayui/form": "^3.
|
|
27
|
-
"@clayui/icon": "^3.
|
|
28
|
-
"@clayui/shared": "^3.
|
|
25
|
+
"@clayui/button": "^3.56.0",
|
|
26
|
+
"@clayui/form": "^3.56.0",
|
|
27
|
+
"@clayui/icon": "^3.56.0",
|
|
28
|
+
"@clayui/shared": "^3.56.0",
|
|
29
29
|
"classnames": "^2.2.6"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"browserslist": [
|
|
37
37
|
"extends browserslist-config-clay"
|
|
38
38
|
],
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "1c33d9c709d8ce071862f0087c76ac23ce11465b"
|
|
40
40
|
}
|