@digital-ai/dot-components 2.6.1 → 2.7.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/CHANGE_LOG.md +17 -7
- package/index.esm.js +11 -3
- package/index.umd.js +11 -3
- package/lib/components/button/Button.d.ts +2 -0
- package/lib/components/button/Button.stories.d.ts +4 -3
- package/lib/components/button/Button.stories.styles.d.ts +2 -0
- package/lib/components/date-picker/DatePicker.d.ts +4 -2
- package/lib/components/date-picker/DatePicker.stories.d.ts +2 -1
- package/lib/components/date-picker/DatePicker.stories.styles.d.ts +2 -0
- package/lib/components/time-picker/TimePicker.d.ts +6 -2
- package/lib/components/time-picker/TimePicker.stories.d.ts +2 -1
- package/lib/components/time-picker/TimePicker.stories.styles.d.ts +2 -0
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.7.0](https://www.npmjs.com/package/@digital-ai/dot-components) (04/14/2023)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.6.1...2.7.0)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- S-91919: `DotDatePicker`, `DotTimePicker`: expose `onBlur` prop [\#1443](https://github.com/digital-ai/dot-components/pull/1443) ([dmiletic85](https://github.com/dmiletic85))
|
|
10
|
+
- S-91870 `DotButton`: expose `tabIndex` prop [\#1439](https://github.com/digital-ai/dot-components/pull/1439) ([dmiletic85](https://github.com/dmiletic85))
|
|
11
|
+
|
|
12
|
+
**Fixed bugs:**
|
|
13
|
+
|
|
14
|
+
- D-24793: `DotTimePicker` - set clock instead of calendar icon [\#1444](https://github.com/digital-ai/dot-components/pull/1444) ([dmiletic85](https://github.com/dmiletic85))
|
|
15
|
+
|
|
3
16
|
## [2.6.1](https://www.npmjs.com/package/@digital-ai/dot-components) (04/06/2023)
|
|
4
17
|
|
|
5
18
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.6.0...2.6.1)
|
|
@@ -292,10 +305,6 @@
|
|
|
292
305
|
|
|
293
306
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/1.21.4...2.0.0-rc.3)
|
|
294
307
|
|
|
295
|
-
**Features:**
|
|
296
|
-
|
|
297
|
-
- S-87620 Adjust height for inputs and for medium sized buttons [\#1263](https://github.com/digital-ai/dot-components/pull/1263) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
298
|
-
|
|
299
308
|
**Fixed bugs:**
|
|
300
309
|
|
|
301
310
|
- D-22512: Design differences between 2.0 and 1.x [\#1285](https://github.com/digital-ai/dot-components/pull/1285) ([CWSites](https://github.com/CWSites))
|
|
@@ -325,6 +334,7 @@
|
|
|
325
334
|
**Features:**
|
|
326
335
|
|
|
327
336
|
- S-87726 Align input content with helper text [\#1265](https://github.com/digital-ai/dot-components/pull/1265) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
337
|
+
- S-87620 Adjust height for inputs and for medium sized buttons [\#1263](https://github.com/digital-ai/dot-components/pull/1263) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
328
338
|
- S-87616 Adjust left margin for helper text [\#1262](https://github.com/digital-ai/dot-components/pull/1262) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
329
339
|
- S-87599: `DotAutocomplete` Add optional `persistentLabel` prop [\#1258](https://github.com/digital-ai/dot-components/pull/1258) ([dmiletic85](https://github.com/dmiletic85))
|
|
330
340
|
|
|
@@ -354,6 +364,7 @@
|
|
|
354
364
|
|
|
355
365
|
**Fixed bugs:**
|
|
356
366
|
|
|
367
|
+
- S-86692: component cleanup [\#1238](https://github.com/digital-ai/dot-components/pull/1238) ([CWSites](https://github.com/CWSites))
|
|
357
368
|
- S-84151: fix e2e tests for Release 2.0 [\#1146](https://github.com/digital-ai/dot-components/pull/1146) ([CWSites](https://github.com/CWSites))
|
|
358
369
|
|
|
359
370
|
**Misc:**
|
|
@@ -384,7 +395,6 @@
|
|
|
384
395
|
|
|
385
396
|
**Fixed bugs:**
|
|
386
397
|
|
|
387
|
-
- S-86692: component cleanup [\#1238](https://github.com/digital-ai/dot-components/pull/1238) ([CWSites](https://github.com/CWSites))
|
|
388
398
|
- D-20931: `DotAccordion` - display top border correctly when expanded [\#1232](https://github.com/digital-ai/dot-components/pull/1232) ([CWSites](https://github.com/CWSites))
|
|
389
399
|
- D-22087: `DotRadioGroup` / `DotCheckboxGroup` helper texts do not follow the same styles as other helper texts [\#1225](https://github.com/digital-ai/dot-components/pull/1225) ([dmiletic85](https://github.com/dmiletic85))
|
|
390
400
|
|
|
@@ -895,7 +905,6 @@
|
|
|
895
905
|
- S-79571: DotInput - expose onKeyDown [\#846](https://github.com/digital-ai/dot-components/pull/846) ([monapatel91](https://github.com/monapatel91))
|
|
896
906
|
- S-79357: evaluate codebase and remove old references to core Tooltip [\#844](https://github.com/digital-ai/dot-components/pull/844) ([CWSites](https://github.com/CWSites))
|
|
897
907
|
- S-80621: file upload [\#840](https://github.com/digital-ai/dot-components/pull/840) ([CWSites](https://github.com/CWSites))
|
|
898
|
-
- S-80473: Expose onFocus and onBlur callbacks for DotInputText and DotInputSelect components [\#832](https://github.com/digital-ai/dot-components/pull/832) ([selsemore](https://github.com/selsemore))
|
|
899
908
|
- S-76922: file upload [\#820](https://github.com/digital-ai/dot-components/pull/820) ([CWSites](https://github.com/CWSites))
|
|
900
909
|
|
|
901
910
|
**Fixed bugs:**
|
|
@@ -914,6 +923,7 @@
|
|
|
914
923
|
|
|
915
924
|
**Features:**
|
|
916
925
|
|
|
926
|
+
- S-80473: Expose onFocus and onBlur callbacks for DotInputText and DotInputSelect components [\#832](https://github.com/digital-ai/dot-components/pull/832) ([selsemore](https://github.com/selsemore))
|
|
917
927
|
- S-80268: `DotDynamicForm` improvements [\#821](https://github.com/digital-ai/dot-components/pull/821) ([dmiletic85](https://github.com/dmiletic85))
|
|
918
928
|
|
|
919
929
|
**Fixed bugs:**
|
|
@@ -1090,6 +1100,7 @@
|
|
|
1090
1100
|
|
|
1091
1101
|
- MINOR release [\#695](https://github.com/digital-ai/dot-components/pull/695) ([CWSites](https://github.com/CWSites))
|
|
1092
1102
|
- pass value to tab [\#694](https://github.com/digital-ai/dot-components/pull/694) ([kmmarsh](https://github.com/kmmarsh))
|
|
1103
|
+
- S-78831: update AppToolbar component for Agility [\#691](https://github.com/digital-ai/dot-components/pull/691) ([CWSites](https://github.com/CWSites))
|
|
1093
1104
|
|
|
1094
1105
|
## [1.0.12](https://www.npmjs.com/package/@digital-ai/dot-components) (09/23/2021)
|
|
1095
1106
|
|
|
@@ -1108,7 +1119,6 @@
|
|
|
1108
1119
|
|
|
1109
1120
|
**Misc:**
|
|
1110
1121
|
|
|
1111
|
-
- S-78831: update AppToolbar component for Agility [\#691](https://github.com/digital-ai/dot-components/pull/691) ([CWSites](https://github.com/CWSites))
|
|
1112
1122
|
- Next Release [\#689](https://github.com/digital-ai/dot-components/pull/689) ([CWSites](https://github.com/CWSites))
|
|
1113
1123
|
|
|
1114
1124
|
## [1.0.11](https://www.npmjs.com/package/@digital-ai/dot-components) (09/16/2021)
|
package/index.esm.js
CHANGED
|
@@ -1730,6 +1730,7 @@ const DotButton = /*#__PURE__*/forwardRef(({
|
|
|
1730
1730
|
onClick,
|
|
1731
1731
|
size: _size = 'medium',
|
|
1732
1732
|
startIcon,
|
|
1733
|
+
tabIndex,
|
|
1733
1734
|
tooltip,
|
|
1734
1735
|
type: _type = 'primary'
|
|
1735
1736
|
}, ref) => {
|
|
@@ -1773,6 +1774,7 @@ const DotButton = /*#__PURE__*/forwardRef(({
|
|
|
1773
1774
|
ref: ref,
|
|
1774
1775
|
size: _size,
|
|
1775
1776
|
startIcon: startIcon,
|
|
1777
|
+
tabIndex: tabIndex,
|
|
1776
1778
|
type: _isSubmit ? 'submit' : 'button',
|
|
1777
1779
|
variant: variant
|
|
1778
1780
|
}, {
|
|
@@ -9492,6 +9494,7 @@ const DotDatePicker = ({
|
|
|
9492
9494
|
label,
|
|
9493
9495
|
locale,
|
|
9494
9496
|
onAccept,
|
|
9497
|
+
onBlur,
|
|
9495
9498
|
onChange,
|
|
9496
9499
|
onClose,
|
|
9497
9500
|
onError,
|
|
@@ -9587,7 +9590,8 @@ const DotDatePicker = ({
|
|
|
9587
9590
|
focused: _readOnly ? false : undefined,
|
|
9588
9591
|
inputProps: {
|
|
9589
9592
|
className: 'dot-input',
|
|
9590
|
-
'data-testid': 'dot-date-picker-input'
|
|
9593
|
+
'data-testid': 'dot-date-picker-input',
|
|
9594
|
+
onBlur
|
|
9591
9595
|
},
|
|
9592
9596
|
fullWidth: _fullWidth,
|
|
9593
9597
|
name: inputName
|
|
@@ -9701,6 +9705,8 @@ const DotTimePicker = ({
|
|
|
9701
9705
|
inputId,
|
|
9702
9706
|
inputName,
|
|
9703
9707
|
label,
|
|
9708
|
+
onAccept,
|
|
9709
|
+
onBlur,
|
|
9704
9710
|
onChange,
|
|
9705
9711
|
onClose,
|
|
9706
9712
|
onOpen,
|
|
@@ -9780,6 +9786,7 @@ const DotTimePicker = ({
|
|
|
9780
9786
|
onChange === null || onChange === void 0 ? void 0 : onChange(pickerTime.format(timeFormat), {
|
|
9781
9787
|
validationError: null
|
|
9782
9788
|
});
|
|
9789
|
+
onAccept === null || onAccept === void 0 ? void 0 : onAccept(pickerTime.format(timeFormat));
|
|
9783
9790
|
};
|
|
9784
9791
|
const scrollToSelectedTime = () => {
|
|
9785
9792
|
if (!(hoursRef === null || hoursRef === void 0 ? void 0 : hoursRef.current) || !(minutesRef === null || minutesRef === void 0 ? void 0 : minutesRef.current)) return;
|
|
@@ -9835,7 +9842,7 @@ const DotTimePicker = ({
|
|
|
9835
9842
|
iconId: "error-solid"
|
|
9836
9843
|
}, void 0), !_disableOpenPicker && !_readOnly && !disabled && jsx(DotIconButton, {
|
|
9837
9844
|
"data-testid": dataTestId && `${dataTestId}-open-btn`,
|
|
9838
|
-
iconId: "
|
|
9845
|
+
iconId: "pending-clock",
|
|
9839
9846
|
onClick: _event => handleTimePickerButtonClick(),
|
|
9840
9847
|
size: "small"
|
|
9841
9848
|
}, void 0)]
|
|
@@ -9843,7 +9850,8 @@ const DotTimePicker = ({
|
|
|
9843
9850
|
},
|
|
9844
9851
|
inputProps: {
|
|
9845
9852
|
className: 'dot-input',
|
|
9846
|
-
'data-testid': dataTestId && `${dataTestId}-input
|
|
9853
|
+
'data-testid': dataTestId && `${dataTestId}-input`,
|
|
9854
|
+
onBlur
|
|
9847
9855
|
},
|
|
9848
9856
|
fullWidth: _fullWidth,
|
|
9849
9857
|
name: inputName
|
package/index.umd.js
CHANGED
|
@@ -1957,6 +1957,7 @@
|
|
|
1957
1957
|
_g = _a.size,
|
|
1958
1958
|
size = _g === void 0 ? 'medium' : _g,
|
|
1959
1959
|
startIcon = _a.startIcon,
|
|
1960
|
+
tabIndex = _a.tabIndex,
|
|
1960
1961
|
tooltip = _a.tooltip,
|
|
1961
1962
|
_h = _a.type,
|
|
1962
1963
|
type = _h === void 0 ? 'primary' : _h;
|
|
@@ -2002,6 +2003,7 @@
|
|
|
2002
2003
|
ref: ref,
|
|
2003
2004
|
size: size,
|
|
2004
2005
|
startIcon: startIcon,
|
|
2006
|
+
tabIndex: tabIndex,
|
|
2005
2007
|
type: isSubmit ? 'submit' : 'button',
|
|
2006
2008
|
variant: variant
|
|
2007
2009
|
}, {
|
|
@@ -10323,6 +10325,7 @@
|
|
|
10323
10325
|
label = _a.label,
|
|
10324
10326
|
locale = _a.locale,
|
|
10325
10327
|
onAccept = _a.onAccept,
|
|
10328
|
+
onBlur = _a.onBlur,
|
|
10326
10329
|
onChange = _a.onChange,
|
|
10327
10330
|
onClose = _a.onClose,
|
|
10328
10331
|
onError = _a.onError,
|
|
@@ -10423,7 +10426,8 @@
|
|
|
10423
10426
|
focused: readOnly ? false : undefined,
|
|
10424
10427
|
inputProps: {
|
|
10425
10428
|
className: 'dot-input',
|
|
10426
|
-
'data-testid': 'dot-date-picker-input'
|
|
10429
|
+
'data-testid': 'dot-date-picker-input',
|
|
10430
|
+
onBlur: onBlur
|
|
10427
10431
|
},
|
|
10428
10432
|
fullWidth: fullWidth,
|
|
10429
10433
|
name: inputName
|
|
@@ -10554,6 +10558,8 @@
|
|
|
10554
10558
|
inputId = _a.inputId,
|
|
10555
10559
|
inputName = _a.inputName,
|
|
10556
10560
|
label = _a.label,
|
|
10561
|
+
onAccept = _a.onAccept,
|
|
10562
|
+
onBlur = _a.onBlur,
|
|
10557
10563
|
onChange = _a.onChange,
|
|
10558
10564
|
onClose = _a.onClose,
|
|
10559
10565
|
onOpen = _a.onOpen,
|
|
@@ -10640,6 +10646,7 @@
|
|
|
10640
10646
|
onChange === null || onChange === void 0 ? void 0 : onChange(pickerTime.format(timeFormat), {
|
|
10641
10647
|
validationError: null
|
|
10642
10648
|
});
|
|
10649
|
+
onAccept === null || onAccept === void 0 ? void 0 : onAccept(pickerTime.format(timeFormat));
|
|
10643
10650
|
};
|
|
10644
10651
|
var scrollToSelectedTime = function scrollToSelectedTime() {
|
|
10645
10652
|
if (!(hoursRef === null || hoursRef === void 0 ? void 0 : hoursRef.current) || !(minutesRef === null || minutesRef === void 0 ? void 0 : minutesRef.current)) return;
|
|
@@ -10695,7 +10702,7 @@
|
|
|
10695
10702
|
iconId: "error-solid"
|
|
10696
10703
|
}, void 0), !disableOpenPicker && !readOnly && !disabled && jsxRuntime.jsx(DotIconButton, {
|
|
10697
10704
|
"data-testid": dataTestId && dataTestId + "-open-btn",
|
|
10698
|
-
iconId: "
|
|
10705
|
+
iconId: "pending-clock",
|
|
10699
10706
|
onClick: function (_event) {
|
|
10700
10707
|
return handleTimePickerButtonClick();
|
|
10701
10708
|
},
|
|
@@ -10705,7 +10712,8 @@
|
|
|
10705
10712
|
},
|
|
10706
10713
|
inputProps: {
|
|
10707
10714
|
className: 'dot-input',
|
|
10708
|
-
'data-testid': dataTestId && dataTestId + "-input"
|
|
10715
|
+
'data-testid': dataTestId && dataTestId + "-input",
|
|
10716
|
+
onBlur: onBlur
|
|
10709
10717
|
},
|
|
10710
10718
|
fullWidth: fullWidth,
|
|
10711
10719
|
name: inputName
|
|
@@ -7,6 +7,8 @@ export interface ButtonProps extends BaseButtonProps {
|
|
|
7
7
|
endIcon?: ReactNode;
|
|
8
8
|
/** Icon placed before the children. */
|
|
9
9
|
startIcon?: ReactNode;
|
|
10
|
+
/** Tab order for the button. */
|
|
11
|
+
tabIndex?: number;
|
|
10
12
|
}
|
|
11
13
|
/** This component wraps the Button component from @material-ui. */
|
|
12
14
|
export declare const DotButton: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { ComponentMeta } from '@storybook/react';
|
|
1
|
+
import { ComponentMeta, Story } from '@storybook/react';
|
|
3
2
|
import { ButtonProps } from './Button';
|
|
4
|
-
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>>;
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const Default: any;
|
|
7
7
|
export declare const WithStartIcon: any;
|
|
@@ -9,3 +9,4 @@ export declare const WithEndIcon: any;
|
|
|
9
9
|
export declare const WithDestructiveType: any;
|
|
10
10
|
export declare const WithOutlinedType: any;
|
|
11
11
|
export declare const WithTextType: any;
|
|
12
|
+
export declare const WithTabbableLinkAsChildren: Story<ButtonProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { FocusEvent, ReactNode } from 'react';
|
|
2
2
|
import { PickersDayProps } from '@mui/x-date-pickers';
|
|
3
3
|
import { FieldChangeHandlerContext } from '@mui/x-date-pickers/internals';
|
|
4
4
|
import { CommonProps } from '../CommonProps';
|
|
@@ -39,6 +39,8 @@ export interface DatePickerProps extends CommonProps {
|
|
|
39
39
|
locale?: DatePickerLocale;
|
|
40
40
|
/** Callback fired when the value is accepted. */
|
|
41
41
|
onAccept?: (value: string) => void;
|
|
42
|
+
/** A function that should be executed when the input loses focus */
|
|
43
|
+
onBlur?: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement, Element>) => void;
|
|
42
44
|
/** Callback fired when the value changes. */
|
|
43
45
|
onChange?: (value: string, context: FieldChangeHandlerContext<string>) => void;
|
|
44
46
|
/** Callback fired when the popup requests to be closed. Use in controlled mode (see `open`). */
|
|
@@ -65,4 +67,4 @@ export interface DatePickerProps extends CommonProps {
|
|
|
65
67
|
/** The selected value. Used when the component is controlled. */
|
|
66
68
|
value?: string;
|
|
67
69
|
}
|
|
68
|
-
export declare const DotDatePicker: ({ ariaLabel, autoFocus, className, closeOnSelect, "data-testid": dataTestId, disableOpenPicker, disablePast, disabled, displayWeekNumber, displayClearButton, error, fixedWeekNumber, format, fullWidth, helperText, inputId, inputName, label, locale, onAccept, onChange, onClose, onError, onOpen, open, persistentLabel, readOnly, required, showDaysOutsideCurrentMonth, value, }: DatePickerProps) => JSX.Element;
|
|
70
|
+
export declare const DotDatePicker: ({ ariaLabel, autoFocus, className, closeOnSelect, "data-testid": dataTestId, disableOpenPicker, disablePast, disabled, displayWeekNumber, displayClearButton, error, fixedWeekNumber, format, fullWidth, helperText, inputId, inputName, label, locale, onAccept, onBlur, onChange, onClose, onError, onOpen, open, persistentLabel, readOnly, required, showDaysOutsideCurrentMonth, value, }: DatePickerProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta, Story } from '@storybook/react';
|
|
2
2
|
import { DatePickerProps } from './';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, autoFocus, className, closeOnSelect, "data-testid": dataTestId, disableOpenPicker, disablePast, disabled, displayWeekNumber, displayClearButton, error, fixedWeekNumber, format, fullWidth, helperText, inputId, inputName, label, locale, onAccept, onChange, onClose, onError, onOpen, open, persistentLabel, readOnly, required, showDaysOutsideCurrentMonth, value, }: DatePickerProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, autoFocus, className, closeOnSelect, "data-testid": dataTestId, disableOpenPicker, disablePast, disabled, displayWeekNumber, displayClearButton, error, fixedWeekNumber, format, fullWidth, helperText, inputId, inputName, label, locale, onAccept, onBlur, onChange, onClose, onError, onOpen, open, persistentLabel, readOnly, required, showDaysOutsideCurrentMonth, value, }: DatePickerProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: DatePickerProps;
|
|
6
6
|
export declare const WithHelperText: any;
|
|
@@ -18,3 +18,4 @@ export declare const WithFullWidth: any;
|
|
|
18
18
|
export declare const WithoutClearButton: any;
|
|
19
19
|
export declare const WithControlledMode: Story<DatePickerProps>;
|
|
20
20
|
export declare const WithLocaleConfiguration: Story<DatePickerProps>;
|
|
21
|
+
export declare const WithChangeOnBlur: Story<DatePickerProps>;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export declare const datePickerWithControlledModeClassName = "dot-date-picker-with-controlled-mode";
|
|
2
2
|
export declare const datePickerWithLocaleClassName = "dot-date-picker-with-locale";
|
|
3
|
+
export declare const datePickerWithBlurClassName = "dot-date-picker-with-blur";
|
|
3
4
|
export declare const StyledDatePickerWithControlledMode: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const StyledDatePickerWithChangeOnBlur: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
6
|
export declare const StyledDatePickerWithLocale: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { FocusEvent, ReactNode } from 'react';
|
|
2
2
|
import { FieldChangeHandlerContext } from '@mui/x-date-pickers/internals';
|
|
3
3
|
import { CommonProps } from '../CommonProps';
|
|
4
4
|
export interface TimePickerProps extends CommonProps {
|
|
@@ -25,6 +25,10 @@ export interface TimePickerProps extends CommonProps {
|
|
|
25
25
|
inputName?: string;
|
|
26
26
|
/** The label content. */
|
|
27
27
|
label?: string;
|
|
28
|
+
/** Callback fired when the value is changed from the popper. */
|
|
29
|
+
onAccept?: (value: string) => void;
|
|
30
|
+
/** A function that should be executed when the input loses focus */
|
|
31
|
+
onBlur?: (event: FocusEvent<HTMLInputElement | HTMLTextAreaElement, Element>) => void;
|
|
28
32
|
/** Callback fired when the value changes. */
|
|
29
33
|
onChange?: (value: string, context: FieldChangeHandlerContext<string>) => void;
|
|
30
34
|
/** Callback fired when the popup requests to be closed. Use in controlled mode (see `open`). */
|
|
@@ -45,4 +49,4 @@ export interface TimePickerProps extends CommonProps {
|
|
|
45
49
|
export declare const DEFAULT_PICKER_TIME_FORMAT = "hh:mm";
|
|
46
50
|
export declare const DEFAULT_TIME_FORMAT = "hh:mm A";
|
|
47
51
|
export declare const DEFAULT_TIME = "01:00";
|
|
48
|
-
export declare const DotTimePicker: ({ ampm, ariaLabel, autoFocus, className, "data-testid": dataTestId, disableOpenPicker, disabled, error, format, fullWidth, helperText, hideActionButtons, inputId, inputName, label, onChange, onClose, onOpen, open, persistentLabel, readOnly, required, value, }: TimePickerProps) => JSX.Element;
|
|
52
|
+
export declare const DotTimePicker: ({ ampm, ariaLabel, autoFocus, className, "data-testid": dataTestId, disableOpenPicker, disabled, error, format, fullWidth, helperText, hideActionButtons, inputId, inputName, label, onAccept, onBlur, onChange, onClose, onOpen, open, persistentLabel, readOnly, required, value, }: TimePickerProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta, Story } from '@storybook/react';
|
|
2
2
|
import { TimePickerProps } from './';
|
|
3
|
-
declare const _default: ComponentMeta<({ ampm, ariaLabel, autoFocus, className, "data-testid": dataTestId, disableOpenPicker, disabled, error, format, fullWidth, helperText, hideActionButtons, inputId, inputName, label, onChange, onClose, onOpen, open, persistentLabel, readOnly, required, value, }: TimePickerProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ampm, ariaLabel, autoFocus, className, "data-testid": dataTestId, disableOpenPicker, disabled, error, format, fullWidth, helperText, hideActionButtons, inputId, inputName, label, onAccept, onBlur, onChange, onClose, onOpen, open, persistentLabel, readOnly, required, value, }: TimePickerProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: TimePickerProps;
|
|
6
6
|
export declare const WithAutoFocus: any;
|
|
@@ -18,3 +18,4 @@ export declare const WithOpenedTimePopper: any;
|
|
|
18
18
|
export declare const WithControlledMode: Story<TimePickerProps>;
|
|
19
19
|
export declare const WithHourFormatPicker: Story<TimePickerProps>;
|
|
20
20
|
export declare const WithOutsideTimeSetter: Story<TimePickerProps>;
|
|
21
|
+
export declare const WithChangeOnBlur: Story<TimePickerProps>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const timePickerWithControlledModeClassName = "dot-time-picker-with-controlled-mode";
|
|
2
2
|
export declare const timePickerWithHourFormatPickerClassName = "dot-time-picker-with-hour-format-picker";
|
|
3
3
|
export declare const timePickerWithOutsideTimeSetterClassName = "dot-time-picker-with-outside-time-setter";
|
|
4
|
+
export declare const timePickerWithBlurClassName = "dot-time-picker-with-blur";
|
|
4
5
|
export declare const StyledTimePickerWithControlledMode: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
6
|
export declare const StyledTimePickerWithHourFormatPicker: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
7
|
export declare const StyledTimePickerWithOutsideTimeSetter: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const StyledTimePickerWithChangeOnBlur: import("styled-components").StyledComponent<"div", any, {}, never>;
|