@clayui/time-picker 3.141.2-alpha.0 → 3.143.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.
Files changed (2) hide show
  1. package/lib/index.d.ts +99 -0
  2. package/package.json +8 -8
package/lib/index.d.ts ADDED
@@ -0,0 +1,99 @@
1
+ /**
2
+ * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>
3
+ * SPDX-License-Identifier: BSD-3-Clause
4
+ */
5
+ import { InternalDispatch } from '@clayui/shared';
6
+ import React from 'react';
7
+ declare type ConfigMaxMin = {
8
+ max: number;
9
+ min: number;
10
+ };
11
+ declare type ConfigAmpm = {
12
+ am: string;
13
+ pm: string;
14
+ };
15
+ declare type Config = {
16
+ ampm: ConfigAmpm;
17
+ hours: ConfigMaxMin;
18
+ minutes: ConfigMaxMin;
19
+ };
20
+ export declare type InputAmPm = '--' | 'AM' | 'PM';
21
+ export declare type Input = {
22
+ ampm?: InputAmPm;
23
+ hours: '--' | string;
24
+ minutes: '--' | string;
25
+ };
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
+ */
32
+ ariaLabels?: {
33
+ ampm: string;
34
+ hours: string;
35
+ minutes: string;
36
+ clear: string;
37
+ timeDown: string;
38
+ timeUp: string;
39
+ };
40
+ /**
41
+ * Range settings for 12 or 24 hours.
42
+ */
43
+ config?: {
44
+ use12Hours: Config;
45
+ use24Hours: Config;
46
+ };
47
+ /**
48
+ * Flag to disable user interactions on the component.
49
+ */
50
+ disabled?: boolean;
51
+ /**
52
+ * Property to set the default value (uncontrolled).
53
+ */
54
+ defaultValue?: Input;
55
+ /**
56
+ * Flag to indicate if show time icon or not.
57
+ */
58
+ icon?: boolean;
59
+ /**
60
+ * Id to be applied to `clay-time-hours` input.
61
+ */
62
+ id?: string;
63
+ /**
64
+ * Called when input values change hour, minutes or ampm (controlled).
65
+ */
66
+ onChange?: InternalDispatch<Input>;
67
+ /**
68
+ * Called when input values change hour, minutes or ampm (controlled).
69
+ * @deprecated since v3.52.0 - use `onChange` instead.
70
+ */
71
+ onInputChange?: InternalDispatch<Input>;
72
+ /**
73
+ * Name attribute for the hidden input (used for form submission).
74
+ */
75
+ name?: string;
76
+ /**
77
+ * The path to the SVG spritemap file containing the icons.
78
+ */
79
+ spritemap?: string;
80
+ /**
81
+ * Flag to indicate the timezone of the user.
82
+ */
83
+ timezone?: string;
84
+ /**
85
+ * Flag to indicate if 12-hour use, when true, should show am/pm input.
86
+ */
87
+ use12Hours?: boolean;
88
+ /**
89
+ * Sets the values for the hour, minute, or am/pm input (controlled).
90
+ * @deprecated since v3.52.0 - use `value` instead.
91
+ */
92
+ values?: Input;
93
+ /**
94
+ * Sets the values for the hour, minute, or am/pm input (controlled).
95
+ */
96
+ value?: Input;
97
+ }
98
+ declare const TimePicker: ({ ariaLabels, config, disabled, defaultValue, icon, id, name, onChange, onInputChange, spritemap, timezone, use12Hours, value, values, }: IProps) => JSX.Element;
99
+ export default TimePicker;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clayui/time-picker",
3
- "version": "3.141.2-alpha.0",
3
+ "version": "3.143.0",
4
4
  "description": "ClayTimePicker component",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": "https://github.com/liferay/clay",
@@ -27,19 +27,19 @@
27
27
  "react"
28
28
  ],
29
29
  "dependencies": {
30
- "@clayui/button": "^3.141.2-alpha.0",
31
- "@clayui/form": "^3.141.2-alpha.0",
32
- "@clayui/icon": "^3.141.2-alpha.0",
33
- "@clayui/shared": "^3.141.2-alpha.0",
30
+ "@clayui/button": "^3.143.0",
31
+ "@clayui/form": "^3.143.0",
32
+ "@clayui/icon": "^3.143.0",
33
+ "@clayui/shared": "^3.143.0",
34
34
  "classnames": "^2.2.6"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@clayui/css": "3.x",
38
- "react": "^16.12.0",
39
- "react-dom": "^16.12.0"
38
+ "react": "^18.2.0",
39
+ "react-dom": "^18.2.0"
40
40
  },
41
41
  "browserslist": [
42
42
  "extends browserslist-config-clay"
43
43
  ],
44
- "gitHead": "aea6ecdaee62ccc374009982f934e1b193785668"
44
+ "gitHead": "aacf20646cc7fb25c4d60e865ec77d2d503d23e9"
45
45
  }