@commercetools-uikit/time-input 19.20.1 → 19.21.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.
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
|
+
var _objectDestructuringEmpty = require('@babel/runtime-corejs3/helpers/objectDestructuringEmpty');
|
|
7
|
+
var _extends = require('@babel/runtime-corejs3/helpers/extends');
|
|
6
8
|
var _pt = require('prop-types');
|
|
7
9
|
var _padStartInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/pad-start');
|
|
8
10
|
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -272,7 +274,8 @@ const dispatchReactChangeEvent = (node, value) => {
|
|
|
272
274
|
bubbles: true
|
|
273
275
|
}));
|
|
274
276
|
};
|
|
275
|
-
const TimeInput =
|
|
277
|
+
const TimeInput = _ref2 => {
|
|
278
|
+
let props = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
276
279
|
const id = hooks.useFieldId(props.id, sequentialId);
|
|
277
280
|
const intl = reactIntl.useIntl();
|
|
278
281
|
const element = react$1.useRef(null);
|
|
@@ -325,7 +328,7 @@ const TimeInput = props => {
|
|
|
325
328
|
hasWarning: props.hasWarning,
|
|
326
329
|
onClear: handleClear,
|
|
327
330
|
placeholder: typeof props.placeholder === 'string' ? props.placeholder : intl.formatMessage(messages.placeholder)
|
|
328
|
-
}, utils.filterDataAttributes(props)), {}, {
|
|
331
|
+
}, utils.filterDataAttributes(_objectSpread({}, props))), {}, {
|
|
329
332
|
/* ARIA */
|
|
330
333
|
"aria-invalid": props['aria-invalid'],
|
|
331
334
|
"aria-errormessage": props['aria-errormessage']
|
|
@@ -359,9 +362,6 @@ TimeInput.to24h = time => {
|
|
|
359
362
|
const parsedTime = utils.parseTime(time);
|
|
360
363
|
return parsedTime ? format24hr(parsedTime) : '';
|
|
361
364
|
};
|
|
362
|
-
TimeInput.defaultProps = {
|
|
363
|
-
horizontalConstraint: 'scale'
|
|
364
|
-
};
|
|
365
365
|
|
|
366
366
|
// Converts any value to either a formatted value or an empty string
|
|
367
367
|
// The resulting format might use 12h or 24h, unless the time contains
|
|
@@ -391,7 +391,7 @@ TimeInput.toLocaleTime = (time, locale) => {
|
|
|
391
391
|
var TimeInput$1 = TimeInput;
|
|
392
392
|
|
|
393
393
|
// NOTE: This string will be replaced on build time with the package version.
|
|
394
|
-
var version = "19.
|
|
394
|
+
var version = "19.21.0";
|
|
395
395
|
|
|
396
396
|
exports["default"] = TimeInput$1;
|
|
397
397
|
exports.version = version;
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
6
|
+
var _objectDestructuringEmpty = require('@babel/runtime-corejs3/helpers/objectDestructuringEmpty');
|
|
7
|
+
var _extends = require('@babel/runtime-corejs3/helpers/extends');
|
|
6
8
|
require('prop-types');
|
|
7
9
|
var _padStartInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/pad-start');
|
|
8
10
|
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
@@ -247,7 +249,8 @@ const dispatchReactChangeEvent = (node, value) => {
|
|
|
247
249
|
bubbles: true
|
|
248
250
|
}));
|
|
249
251
|
};
|
|
250
|
-
const TimeInput =
|
|
252
|
+
const TimeInput = _ref2 => {
|
|
253
|
+
let props = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
251
254
|
const id = hooks.useFieldId(props.id, sequentialId);
|
|
252
255
|
const intl = reactIntl.useIntl();
|
|
253
256
|
const element = react$1.useRef(null);
|
|
@@ -298,7 +301,7 @@ const TimeInput = props => {
|
|
|
298
301
|
hasWarning: props.hasWarning,
|
|
299
302
|
onClear: handleClear,
|
|
300
303
|
placeholder: typeof props.placeholder === 'string' ? props.placeholder : intl.formatMessage(messages.placeholder)
|
|
301
|
-
}, utils.filterDataAttributes(props)), {}, {
|
|
304
|
+
}, utils.filterDataAttributes(_objectSpread({}, props))), {}, {
|
|
302
305
|
/* ARIA */
|
|
303
306
|
"aria-invalid": props['aria-invalid'],
|
|
304
307
|
"aria-errormessage": props['aria-errormessage']
|
|
@@ -314,9 +317,6 @@ TimeInput.to24h = time => {
|
|
|
314
317
|
const parsedTime = utils.parseTime(time);
|
|
315
318
|
return parsedTime ? format24hr(parsedTime) : '';
|
|
316
319
|
};
|
|
317
|
-
TimeInput.defaultProps = {
|
|
318
|
-
horizontalConstraint: 'scale'
|
|
319
|
-
};
|
|
320
320
|
|
|
321
321
|
// Converts any value to either a formatted value or an empty string
|
|
322
322
|
// The resulting format might use 12h or 24h, unless the time contains
|
|
@@ -346,7 +346,7 @@ TimeInput.toLocaleTime = (time, locale) => {
|
|
|
346
346
|
var TimeInput$1 = TimeInput;
|
|
347
347
|
|
|
348
348
|
// NOTE: This string will be replaced on build time with the package version.
|
|
349
|
-
var version = "19.
|
|
349
|
+
var version = "19.21.0";
|
|
350
350
|
|
|
351
351
|
exports["default"] = TimeInput$1;
|
|
352
352
|
exports.version = version;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
2
|
+
import _objectDestructuringEmpty from '@babel/runtime-corejs3/helpers/esm/objectDestructuringEmpty';
|
|
3
|
+
import _extends from '@babel/runtime-corejs3/helpers/esm/extends';
|
|
2
4
|
import _pt from 'prop-types';
|
|
3
5
|
import _padStartInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/pad-start';
|
|
4
6
|
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
@@ -251,7 +253,8 @@ const dispatchReactChangeEvent = (node, value) => {
|
|
|
251
253
|
bubbles: true
|
|
252
254
|
}));
|
|
253
255
|
};
|
|
254
|
-
const TimeInput =
|
|
256
|
+
const TimeInput = _ref2 => {
|
|
257
|
+
let props = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
|
|
255
258
|
const id = useFieldId(props.id, sequentialId);
|
|
256
259
|
const intl = useIntl();
|
|
257
260
|
const element = useRef(null);
|
|
@@ -304,7 +307,7 @@ const TimeInput = props => {
|
|
|
304
307
|
hasWarning: props.hasWarning,
|
|
305
308
|
onClear: handleClear,
|
|
306
309
|
placeholder: typeof props.placeholder === 'string' ? props.placeholder : intl.formatMessage(messages.placeholder)
|
|
307
|
-
}, filterDataAttributes(props)), {}, {
|
|
310
|
+
}, filterDataAttributes(_objectSpread({}, props))), {}, {
|
|
308
311
|
/* ARIA */
|
|
309
312
|
"aria-invalid": props['aria-invalid'],
|
|
310
313
|
"aria-errormessage": props['aria-errormessage']
|
|
@@ -338,9 +341,6 @@ TimeInput.to24h = time => {
|
|
|
338
341
|
const parsedTime = parseTime(time);
|
|
339
342
|
return parsedTime ? format24hr(parsedTime) : '';
|
|
340
343
|
};
|
|
341
|
-
TimeInput.defaultProps = {
|
|
342
|
-
horizontalConstraint: 'scale'
|
|
343
|
-
};
|
|
344
344
|
|
|
345
345
|
// Converts any value to either a formatted value or an empty string
|
|
346
346
|
// The resulting format might use 12h or 24h, unless the time contains
|
|
@@ -370,6 +370,6 @@ TimeInput.toLocaleTime = (time, locale) => {
|
|
|
370
370
|
var TimeInput$1 = TimeInput;
|
|
371
371
|
|
|
372
372
|
// NOTE: This string will be replaced on build time with the package version.
|
|
373
|
-
var version = "19.
|
|
373
|
+
var version = "19.21.0";
|
|
374
374
|
|
|
375
375
|
export { TimeInput$1 as default, version };
|
|
@@ -70,10 +70,9 @@ export type TTimeInputProps = {
|
|
|
70
70
|
isReadOnly?: boolean;
|
|
71
71
|
};
|
|
72
72
|
declare const TimeInput: {
|
|
73
|
-
(props: TTimeInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
73
|
+
({ ...props }: TTimeInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
74
74
|
displayName: string;
|
|
75
75
|
to24h(time: string): string;
|
|
76
|
-
defaultProps: Pick<TTimeInputProps, "horizontalConstraint">;
|
|
77
76
|
toLocaleTime(time: string | undefined, locale: string): string;
|
|
78
77
|
};
|
|
79
78
|
export default TimeInput;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-uikit/time-input",
|
|
3
3
|
"description": "The TimeInput component allows the user to select a time.",
|
|
4
|
-
"version": "19.
|
|
4
|
+
"version": "19.21.0",
|
|
5
5
|
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@babel/runtime": "^7.20.13",
|
|
23
23
|
"@babel/runtime-corejs3": "^7.20.13",
|
|
24
|
-
"@commercetools-uikit/accessible-button": "19.
|
|
25
|
-
"@commercetools-uikit/constraints": "19.
|
|
26
|
-
"@commercetools-uikit/design-system": "19.
|
|
27
|
-
"@commercetools-uikit/hooks": "19.
|
|
28
|
-
"@commercetools-uikit/icons": "19.
|
|
29
|
-
"@commercetools-uikit/input-utils": "19.
|
|
30
|
-
"@commercetools-uikit/spacings-inline": "19.
|
|
31
|
-
"@commercetools-uikit/utils": "19.
|
|
24
|
+
"@commercetools-uikit/accessible-button": "19.21.0",
|
|
25
|
+
"@commercetools-uikit/constraints": "19.21.0",
|
|
26
|
+
"@commercetools-uikit/design-system": "19.21.0",
|
|
27
|
+
"@commercetools-uikit/hooks": "19.21.0",
|
|
28
|
+
"@commercetools-uikit/icons": "19.21.0",
|
|
29
|
+
"@commercetools-uikit/input-utils": "19.21.0",
|
|
30
|
+
"@commercetools-uikit/spacings-inline": "19.21.0",
|
|
31
|
+
"@commercetools-uikit/utils": "19.21.0",
|
|
32
32
|
"@emotion/is-prop-valid": "1.3.1",
|
|
33
33
|
"@emotion/react": "^11.10.5",
|
|
34
34
|
"@emotion/styled": "^11.10.5",
|