@clayui/time-picker 3.95.2 → 3.99.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.js CHANGED
@@ -116,7 +116,7 @@ var ClayTimePicker = function ClayTimePicker(_ref) {
116
116
  value = _ref.value,
117
117
  values = _ref.values;
118
118
 
119
- var _useInternalState = (0, _shared.useInternalState)({
119
+ var _useControlledState = (0, _shared.useControlledState)({
120
120
  defaultName: 'defaultValue',
121
121
  defaultValue: defaultValue,
122
122
  handleName: 'onChange',
@@ -124,9 +124,9 @@ var ClayTimePicker = function ClayTimePicker(_ref) {
124
124
  onChange: onChange !== null && onChange !== void 0 ? onChange : onInputChange,
125
125
  value: value !== null && value !== void 0 ? value : values
126
126
  }),
127
- _useInternalState2 = _slicedToArray(_useInternalState, 2),
128
- internalValue = _useInternalState2[0],
129
- setValue = _useInternalState2[1];
127
+ _useControlledState2 = _slicedToArray(_useControlledState, 2),
128
+ internalValue = _useControlledState2[0],
129
+ setValue = _useControlledState2[1];
130
130
 
131
131
  var useConfig = config[use12Hours ? 'use12Hours' : 'use24Hours'];
132
132
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clayui/time-picker",
3
- "version": "3.95.2",
3
+ "version": "3.99.0",
4
4
  "description": "ClayTimePicker component",
5
5
  "license": "BSD-3-Clause",
6
6
  "repository": "https://github.com/liferay/clay",
@@ -23,9 +23,9 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "@clayui/button": "^3.92.0",
26
- "@clayui/form": "^3.95.2",
26
+ "@clayui/form": "^3.99.0",
27
27
  "@clayui/icon": "^3.56.0",
28
- "@clayui/shared": "^3.95.2",
28
+ "@clayui/shared": "^3.96.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": "68ebdcf79dab1ba0af5846b23f64fb8776156df7"
39
+ "gitHead": "235bbede3613b988cc481abc7a76c74c76729c9e"
40
40
  }
package/src/index.tsx CHANGED
@@ -6,7 +6,7 @@
6
6
  import ClayButton from '@clayui/button';
7
7
  import {ClayInput} from '@clayui/form';
8
8
  import ClayIcon from '@clayui/icon';
9
- import {FocusScope, InternalDispatch, useInternalState} from '@clayui/shared';
9
+ import {FocusScope, InternalDispatch, useControlledState} from '@clayui/shared';
10
10
  import classNames from 'classnames';
11
11
  import React, {useEffect, useRef, useState} from 'react';
12
12
 
@@ -190,7 +190,7 @@ const ClayTimePicker = ({
190
190
  value,
191
191
  values,
192
192
  }: IProps) => {
193
- const [internalValue, setValue] = useInternalState({
193
+ const [internalValue, setValue] = useControlledState({
194
194
  defaultName: 'defaultValue',
195
195
  defaultValue,
196
196
  handleName: 'onChange',