@digital-ai/dot-components 2.7.1 → 2.7.3
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 +29 -5
- package/index.esm.js +60 -7
- package/index.umd.js +87 -31
- package/lib/components/click-away-listener/ClickAwayListener.d.ts +10 -0
- package/lib/components/click-away-listener/ClickAwayListener.stories.d.ts +5 -0
- package/lib/components/click-away-listener/index.d.ts +2 -0
- package/lib/components/date-picker/DatePicker.d.ts +5 -1
- package/lib/components/date-picker/DatePicker.stories.d.ts +7 -1
- package/lib/components/date-picker/DatePicker.stories.styles.d.ts +2 -0
- package/lib/components/index.d.ts +2 -0
- package/lib/components/inline-edit/InlineEdit.d.ts +3 -1
- package/lib/components/inline-edit/InlineEdit.stories.d.ts +2 -1
- package/package.json +1 -1
package/CHANGE_LOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.7.3](https://www.npmjs.com/package/@digital-ai/dot-components) (05/01/2023)
|
|
4
|
+
|
|
5
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.2...2.7.3)
|
|
6
|
+
|
|
7
|
+
**Features:**
|
|
8
|
+
|
|
9
|
+
- D-24626: Add startEditable attribute to InlineEdit [\#1466](https://github.com/digital-ai/dot-components/pull/1466) ([jmcnally](https://github.com/jmcnally))
|
|
10
|
+
|
|
11
|
+
**Misc:**
|
|
12
|
+
|
|
13
|
+
- Updates to deprecated github action `set-output` [\#1465](https://github.com/digital-ai/dot-components/pull/1465) ([CWSites](https://github.com/CWSites))
|
|
14
|
+
- remove use of set-output [\#1464](https://github.com/digital-ai/dot-components/pull/1464) ([CWSites](https://github.com/CWSites))
|
|
15
|
+
- S-91985: Improve form input labelling for accessibility [\#1463](https://github.com/digital-ai/dot-components/pull/1463) ([jmcnally](https://github.com/jmcnally))
|
|
16
|
+
|
|
17
|
+
## [2.7.2](https://www.npmjs.com/package/@digital-ai/dot-components) (04/24/2023)
|
|
18
|
+
|
|
19
|
+
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.1...2.7.2)
|
|
20
|
+
|
|
21
|
+
**Features:**
|
|
22
|
+
|
|
23
|
+
- S-92086: `DotDatePicker` improvements [\#1461](https://github.com/digital-ai/dot-components/pull/1461) ([dmiletic85](https://github.com/dmiletic85))
|
|
24
|
+
|
|
3
25
|
## [2.7.1](https://www.npmjs.com/package/@digital-ai/dot-components) (04/20/2023)
|
|
4
26
|
|
|
5
27
|
[Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.0...2.7.1)
|
|
@@ -10,6 +32,7 @@
|
|
|
10
32
|
|
|
11
33
|
**Fixed bugs:**
|
|
12
34
|
|
|
35
|
+
- Issue-1449: Update status pills to have generally lighter backgrounds [\#1456](https://github.com/digital-ai/dot-components/pull/1456) ([jmcnally](https://github.com/jmcnally))
|
|
13
36
|
- `DotTimePicker`, `DotDatePicker`: fix issues with controlled and uncontrolled states [\#1454](https://github.com/digital-ai/dot-components/pull/1454) ([dmiletic85](https://github.com/dmiletic85))
|
|
14
37
|
- D-24807: `Demo app` - fix error when starting demo application [\#1451](https://github.com/digital-ai/dot-components/pull/1451) ([dmiletic85](https://github.com/dmiletic85))
|
|
15
38
|
|
|
@@ -340,7 +363,6 @@
|
|
|
340
363
|
**Features:**
|
|
341
364
|
|
|
342
365
|
- S-87871 Expose callback when sidebar collapses/expands [\#1274](https://github.com/digital-ai/dot-components/pull/1274) ([angel-git](https://github.com/angel-git))
|
|
343
|
-
- 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))
|
|
344
366
|
|
|
345
367
|
**Fixed bugs:**
|
|
346
368
|
|
|
@@ -353,6 +375,7 @@
|
|
|
353
375
|
**Features:**
|
|
354
376
|
|
|
355
377
|
- S-87726 Align input content with helper text [\#1265](https://github.com/digital-ai/dot-components/pull/1265) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
378
|
+
- 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))
|
|
356
379
|
- S-87616 Adjust left margin for helper text [\#1262](https://github.com/digital-ai/dot-components/pull/1262) ([nikolinadapic](https://github.com/nikolinadapic))
|
|
357
380
|
- S-87599: `DotAutocomplete` Add optional `persistentLabel` prop [\#1258](https://github.com/digital-ai/dot-components/pull/1258) ([dmiletic85](https://github.com/dmiletic85))
|
|
358
381
|
|
|
@@ -469,6 +492,7 @@
|
|
|
469
492
|
|
|
470
493
|
**Features:**
|
|
471
494
|
|
|
495
|
+
- S-84117: As a customer admin, I want the IdP creation flow to be more intuitive, as I find the existing user flow a little overwhelming [\#1185](https://github.com/digital-ai/dot-components/pull/1185) ([ryangamble](https://github.com/ryangamble))
|
|
472
496
|
- S-85256: `Map` component example in demo app [\#1184](https://github.com/digital-ai/dot-components/pull/1184) ([dmiletic85](https://github.com/dmiletic85))
|
|
473
497
|
|
|
474
498
|
**Fixed bugs:**
|
|
@@ -487,7 +511,6 @@
|
|
|
487
511
|
|
|
488
512
|
**Features:**
|
|
489
513
|
|
|
490
|
-
- S-84117: As a customer admin, I want the IdP creation flow to be more intuitive, as I find the existing user flow a little overwhelming [\#1185](https://github.com/digital-ai/dot-components/pull/1185) ([ryangamble](https://github.com/ryangamble))
|
|
491
514
|
- S-85283: `InlineEdit` component should provide a tooltip out the box [\#1181](https://github.com/digital-ai/dot-components/pull/1181) ([dmiletic85](https://github.com/dmiletic85))
|
|
492
515
|
|
|
493
516
|
**Fixed bugs:**
|
|
@@ -525,6 +548,7 @@
|
|
|
525
548
|
|
|
526
549
|
**Fixed bugs:**
|
|
527
550
|
|
|
551
|
+
- S-84816: `InlineEdit`: Disable Save button when value contains only spaces [\#1156](https://github.com/digital-ai/dot-components/pull/1156) ([dmiletic85](https://github.com/dmiletic85))
|
|
528
552
|
- D-20958: Safari animation jitter [\#1154](https://github.com/digital-ai/dot-components/pull/1154) ([CWSites](https://github.com/CWSites))
|
|
529
553
|
|
|
530
554
|
**Misc:**
|
|
@@ -541,7 +565,6 @@
|
|
|
541
565
|
|
|
542
566
|
**Fixed bugs:**
|
|
543
567
|
|
|
544
|
-
- S-84816: `InlineEdit`: Disable Save button when value contains only spaces [\#1156](https://github.com/digital-ai/dot-components/pull/1156) ([dmiletic85](https://github.com/dmiletic85))
|
|
545
568
|
- D-20970: DotTableActions component [\#1134](https://github.com/digital-ai/dot-components/pull/1134) ([selsemore](https://github.com/selsemore))
|
|
546
569
|
- D-20359: only display tooltip if string [\#1127](https://github.com/digital-ai/dot-components/pull/1127) ([CWSites](https://github.com/CWSites))
|
|
547
570
|
|
|
@@ -694,6 +717,7 @@
|
|
|
694
717
|
**Fixed bugs:**
|
|
695
718
|
|
|
696
719
|
- D-20004: Fix multiSelect for tables that use onUpdateData callback [\#1005](https://github.com/digital-ai/dot-components/pull/1005) ([selsemore](https://github.com/selsemore))
|
|
720
|
+
- D-19932: `Avatar` tooltip appears in wrong position [\#995](https://github.com/digital-ai/dot-components/pull/995) ([dmiletic85](https://github.com/dmiletic85))
|
|
697
721
|
|
|
698
722
|
**Misc:**
|
|
699
723
|
|
|
@@ -714,7 +738,6 @@
|
|
|
714
738
|
**Fixed bugs:**
|
|
715
739
|
|
|
716
740
|
- D-19944: `Drawer` close icon doesn't have enough padding [\#996](https://github.com/digital-ai/dot-components/pull/996) ([dmiletic85](https://github.com/dmiletic85))
|
|
717
|
-
- D-19932: `Avatar` tooltip appears in wrong position [\#995](https://github.com/digital-ai/dot-components/pull/995) ([dmiletic85](https://github.com/dmiletic85))
|
|
718
741
|
- D-19816: `SplitButton`: `data-testid` is assigned to multiple elements [\#986](https://github.com/digital-ai/dot-components/pull/986) ([dmiletic85](https://github.com/dmiletic85))
|
|
719
742
|
- D-19820: Failing `Table` unit tests on NX major upgrade branch [\#983](https://github.com/digital-ai/dot-components/pull/983) ([dmiletic85](https://github.com/dmiletic85))
|
|
720
743
|
|
|
@@ -991,6 +1014,7 @@
|
|
|
991
1014
|
- S-80109: Expose built-in `leaveDelay`, `onClose`, `open` props on `DotTooltip` component [\#786](https://github.com/digital-ai/dot-components/pull/786) ([dmiletic85](https://github.com/dmiletic85))
|
|
992
1015
|
- S-76907: update ButtonToggle styles, update unit tests and add e2e tests [\#785](https://github.com/digital-ai/dot-components/pull/785) ([CWSites](https://github.com/CWSites))
|
|
993
1016
|
- S-80048: product wrapper demo [\#782](https://github.com/digital-ai/dot-components/pull/782) ([CWSites](https://github.com/CWSites))
|
|
1017
|
+
- Add submitButtonProps prop to DotJsonSchemaForm component [\#775](https://github.com/digital-ai/dot-components/pull/775) ([selsemore](https://github.com/selsemore))
|
|
994
1018
|
|
|
995
1019
|
## [1.3.2](https://www.npmjs.com/package/@digital-ai/dot-components) (11/05/2021)
|
|
996
1020
|
|
|
@@ -1005,7 +1029,6 @@
|
|
|
1005
1029
|
|
|
1006
1030
|
- Patch release [\#780](https://github.com/digital-ai/dot-components/pull/780) ([TheKeithStewart](https://github.com/TheKeithStewart))
|
|
1007
1031
|
- S-79985: temporarily remove react-jsonschema-form from library [\#776](https://github.com/digital-ai/dot-components/pull/776) ([TheKeithStewart](https://github.com/TheKeithStewart))
|
|
1008
|
-
- Add submitButtonProps prop to DotJsonSchemaForm component [\#775](https://github.com/digital-ai/dot-components/pull/775) ([selsemore](https://github.com/selsemore))
|
|
1009
1032
|
- S-76893: Webpack 4 - update peer dependencies [\#768](https://github.com/digital-ai/dot-components/pull/768) ([CWSites](https://github.com/CWSites))
|
|
1010
1033
|
- S-79957: improve husky [\#765](https://github.com/digital-ai/dot-components/pull/765) ([CWSites](https://github.com/CWSites))
|
|
1011
1034
|
|
|
@@ -1266,6 +1289,7 @@
|
|
|
1266
1289
|
- S-77681: setup test-coverage for reporting on dot-components [\#610](https://github.com/digital-ai/dot-components/pull/610) ([CWSites](https://github.com/CWSites))
|
|
1267
1290
|
- S-76838: address Sonarcloud code issues [\#608](https://github.com/digital-ai/dot-components/pull/608) ([CWSites](https://github.com/CWSites))
|
|
1268
1291
|
- S-77317: Add 'height' prop to DotDrawer component [\#603](https://github.com/digital-ai/dot-components/pull/603) ([selsemore](https://github.com/selsemore))
|
|
1292
|
+
- Update GitHub prerelease [\#599](https://github.com/digital-ai/dot-components/pull/599) ([CWSites](https://github.com/CWSites))
|
|
1269
1293
|
- S-76917: remove progressionBoard styles from theme provider [\#597](https://github.com/digital-ai/dot-components/pull/597) ([CWSites](https://github.com/CWSites))
|
|
1270
1294
|
|
|
1271
1295
|
## [1.0.3](https://www.npmjs.com/package/@digital-ai/dot-components) (07/27/2021)
|
package/index.esm.js
CHANGED
|
@@ -4290,6 +4290,9 @@ const getChipsFromAutocomplete = ({
|
|
|
4290
4290
|
};
|
|
4291
4291
|
const checkIfDuplicateItem = (itemText, autocompleteOptions) => autocompleteOptions.some(autocompleteOption => autocompleteOption.title === itemText);
|
|
4292
4292
|
|
|
4293
|
+
function ariaLabelOrAlternates(ariaLabel, label, placeholder) {
|
|
4294
|
+
return ariaLabel || label || placeholder;
|
|
4295
|
+
}
|
|
4293
4296
|
const DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
4294
4297
|
const DotAutoComplete = ({
|
|
4295
4298
|
ListboxComponent,
|
|
@@ -4582,11 +4585,17 @@ const DotAutoComplete = ({
|
|
|
4582
4585
|
error: _error,
|
|
4583
4586
|
focused: _readOnly ? false : undefined,
|
|
4584
4587
|
helperText: helperText,
|
|
4588
|
+
id: inputId,
|
|
4585
4589
|
inputProps: Object.assign(Object.assign({}, inputProps), {
|
|
4590
|
+
'aria-label': ariaLabelOrAlternates(ariaLabel, label, placeholder),
|
|
4591
|
+
'data-testid': dataTestId && `${dataTestId}-input`,
|
|
4586
4592
|
id: inputId,
|
|
4587
4593
|
className: useStylesWithRootClass(inputProps.className, 'dot-input'),
|
|
4588
4594
|
readOnly: _readOnly
|
|
4589
4595
|
}),
|
|
4596
|
+
InputLabelProps: {
|
|
4597
|
+
htmlFor: inputId
|
|
4598
|
+
},
|
|
4590
4599
|
InputProps: Object.assign(Object.assign({}, params.InputProps), {
|
|
4591
4600
|
endAdornment: !_readOnly ? renderEndAdornment(params.InputProps.endAdornment) : undefined
|
|
4592
4601
|
}),
|
|
@@ -7054,6 +7063,7 @@ const DotInlineEdit = ({
|
|
|
7054
7063
|
onEditStateChange,
|
|
7055
7064
|
readOnly,
|
|
7056
7065
|
selectTextOnEdit,
|
|
7066
|
+
startEditable: _startEditable = false,
|
|
7057
7067
|
tabIndex: _tabIndex = 0,
|
|
7058
7068
|
tooltip,
|
|
7059
7069
|
typography: _typography = 'body1',
|
|
@@ -7065,6 +7075,11 @@ const DotInlineEdit = ({
|
|
|
7065
7075
|
const [inputValue, setInputValue] = useState(_value);
|
|
7066
7076
|
const inputRef = useRef();
|
|
7067
7077
|
const inlineEditRef = useRef();
|
|
7078
|
+
useEffect(() => {
|
|
7079
|
+
if (_startEditable && !readOnly) {
|
|
7080
|
+
enterEditMode();
|
|
7081
|
+
}
|
|
7082
|
+
}, []);
|
|
7068
7083
|
useEffect(() => {
|
|
7069
7084
|
if (_value !== inputValue) {
|
|
7070
7085
|
setInputValue(_value);
|
|
@@ -7077,10 +7092,13 @@ const DotInlineEdit = ({
|
|
|
7077
7092
|
setShowTooltip(visible);
|
|
7078
7093
|
}
|
|
7079
7094
|
};
|
|
7080
|
-
const
|
|
7081
|
-
if (editing) return;
|
|
7095
|
+
const enterEditMode = () => {
|
|
7082
7096
|
setOriginalValue(inputValue);
|
|
7083
7097
|
setEditing(true);
|
|
7098
|
+
};
|
|
7099
|
+
const handleInlineEditClick = () => {
|
|
7100
|
+
if (editing) return;
|
|
7101
|
+
enterEditMode();
|
|
7084
7102
|
if (onEditStateChange) {
|
|
7085
7103
|
onEditStateChange(true);
|
|
7086
7104
|
}
|
|
@@ -7185,7 +7203,7 @@ const DotInlineEdit = ({
|
|
|
7185
7203
|
error: false,
|
|
7186
7204
|
fullWidth: _fullWidth,
|
|
7187
7205
|
inputProps: {
|
|
7188
|
-
'data-testid': dataTestId
|
|
7206
|
+
'data-testid': `${dataTestId}-input`,
|
|
7189
7207
|
className: 'dot-input',
|
|
7190
7208
|
maxLength: charactersLimit === null || charactersLimit === void 0 ? void 0 : charactersLimit.maxLength
|
|
7191
7209
|
},
|
|
@@ -7324,7 +7342,7 @@ const StyledPill = styled(Chip).withConfig({
|
|
|
7324
7342
|
componentId: "l7oxi2-0"
|
|
7325
7343
|
})(["", ""], ({
|
|
7326
7344
|
theme
|
|
7327
|
-
}) => css(["&.", "{background-color:", ";color:", ";border-color:", ";&.error{background-color:", ";color:", ";}&.success{background-color:", ";color:", ";}&.warning{background-color:", ";color:", ";}&.in-progress{background-color:", ";color:", ";}"], rootClassName$n, ({
|
|
7345
|
+
}) => css(["&.", "{background-color:", ";color:", ";border-color:", ";&.error{background-color:", ";border-color:", ";.dot-icon{color:", ";}color:", ";}&.success{background-color:", ";border-color:", ";.dot-icon{color:", ";}color:", ";}&.warning{background-color:", ";border-color:", ";.dot-icon{color:", ";}color:", ";}&.in-progress{background-color:", ";border-color:", ";.dot-icon{color:", ";}color:", ";}"], rootClassName$n, ({
|
|
7328
7346
|
backgroundcolor
|
|
7329
7347
|
}) => {
|
|
7330
7348
|
return backgroundcolor || theme.palette.grey[200];
|
|
@@ -7336,7 +7354,7 @@ const StyledPill = styled(Chip).withConfig({
|
|
|
7336
7354
|
bordercolor
|
|
7337
7355
|
}) => {
|
|
7338
7356
|
return bordercolor ? bordercolor : theme.palette.layer.n700;
|
|
7339
|
-
}, theme.palette.error[
|
|
7357
|
+
}, theme.palette.error[100], theme.palette.error.main, theme.palette.error.main, theme.palette.layer.n700, theme.palette.success[100], theme.palette.success.main, theme.palette.success.main, theme.palette.layer.n700, theme.palette.warning[100], theme.palette.warning.main, theme.palette.warning.main, theme.palette.layer.n700, theme.palette.primary[100], theme.palette.primary.main, theme.palette.primary.main, theme.palette.layer.n700));
|
|
7340
7358
|
|
|
7341
7359
|
const DotPill = ({
|
|
7342
7360
|
ariaLabel,
|
|
@@ -9485,11 +9503,13 @@ const DotDatePicker = ({
|
|
|
9485
9503
|
defaultValue,
|
|
9486
9504
|
disableOpenPicker,
|
|
9487
9505
|
disablePast,
|
|
9506
|
+
disablePortal: _disablePortal = false,
|
|
9488
9507
|
disabled,
|
|
9489
9508
|
displayWeekNumber,
|
|
9490
9509
|
displayClearButton: _displayClearButton = true,
|
|
9491
9510
|
error,
|
|
9492
9511
|
fixedWeekNumber,
|
|
9512
|
+
focusInputOnPopperOpened,
|
|
9493
9513
|
format,
|
|
9494
9514
|
fullWidth: _fullWidth = false,
|
|
9495
9515
|
helperText,
|
|
@@ -9516,8 +9536,19 @@ const DotDatePicker = ({
|
|
|
9516
9536
|
const hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
|
|
9517
9537
|
const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
|
|
9518
9538
|
const isInputReadOnly = _readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
|
|
9539
|
+
const inputRef = useRef(null);
|
|
9519
9540
|
const rootClasses = useStylesWithRootClass(rootClassName$1, className, isInputReadOnly ? 'read-only' : '');
|
|
9520
9541
|
const containerClasses = useStylesWithRootClass(containerClassName$1, _fullWidth ? 'full-width' : '', className);
|
|
9542
|
+
const focusInput = ref => {
|
|
9543
|
+
setTimeout(() => {
|
|
9544
|
+
ref.current.focus();
|
|
9545
|
+
}, 0);
|
|
9546
|
+
};
|
|
9547
|
+
useEffect(() => {
|
|
9548
|
+
if (focusInputOnPopperOpened && open && inputRef.current) {
|
|
9549
|
+
focusInput(inputRef);
|
|
9550
|
+
}
|
|
9551
|
+
}, [open, focusInputOnPopperOpened]);
|
|
9521
9552
|
useEffect(() => {
|
|
9522
9553
|
if (hasValueWithoutChangeHandler) {
|
|
9523
9554
|
console.warn('Warning: You provided a `value` prop without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.');
|
|
@@ -9542,6 +9573,12 @@ const DotDatePicker = ({
|
|
|
9542
9573
|
onAccept(changedValue ? changedValue.format(dateFormat) : null);
|
|
9543
9574
|
};
|
|
9544
9575
|
const handleError = (validationError, currentValue) => onError === null || onError === void 0 ? void 0 : onError(validationError, dayjs(currentValue).format(dateFormat));
|
|
9576
|
+
const handleOpen = () => {
|
|
9577
|
+
if (focusInputOnPopperOpened && inputRef.current) {
|
|
9578
|
+
focusInput(inputRef);
|
|
9579
|
+
}
|
|
9580
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
9581
|
+
};
|
|
9545
9582
|
const createActionBar = () => {
|
|
9546
9583
|
const actionBar = {
|
|
9547
9584
|
actions: []
|
|
@@ -9584,7 +9621,7 @@ const DotDatePicker = ({
|
|
|
9584
9621
|
onChange: handleChange,
|
|
9585
9622
|
onClose: onClose,
|
|
9586
9623
|
onError: handleError,
|
|
9587
|
-
onOpen:
|
|
9624
|
+
onOpen: handleOpen,
|
|
9588
9625
|
open: open,
|
|
9589
9626
|
showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,
|
|
9590
9627
|
slots: {
|
|
@@ -9614,6 +9651,7 @@ const DotDatePicker = ({
|
|
|
9614
9651
|
'data-testid': 'dot-date-picker-input',
|
|
9615
9652
|
onBlur
|
|
9616
9653
|
},
|
|
9654
|
+
inputRef,
|
|
9617
9655
|
fullWidth: _fullWidth,
|
|
9618
9656
|
name: inputName
|
|
9619
9657
|
},
|
|
@@ -9622,6 +9660,9 @@ const DotDatePicker = ({
|
|
|
9622
9660
|
},
|
|
9623
9661
|
desktopTrapFocus: {
|
|
9624
9662
|
disableEnforceFocus: true
|
|
9663
|
+
},
|
|
9664
|
+
popper: {
|
|
9665
|
+
disablePortal: _disablePortal
|
|
9625
9666
|
}
|
|
9626
9667
|
},
|
|
9627
9668
|
value: value && dayjs(value, dateFormat)
|
|
@@ -10034,4 +10075,16 @@ const DotTimePicker = ({
|
|
|
10034
10075
|
}), void 0);
|
|
10035
10076
|
};
|
|
10036
10077
|
|
|
10037
|
-
|
|
10078
|
+
const DotClickAwayListener = ({
|
|
10079
|
+
children,
|
|
10080
|
+
disableReactTree: _disableReactTree = false,
|
|
10081
|
+
onClickAway
|
|
10082
|
+
}) => {
|
|
10083
|
+
return jsx(ClickAwayListener, {
|
|
10084
|
+
children: children,
|
|
10085
|
+
disableReactTree: _disableReactTree,
|
|
10086
|
+
onClickAway: onClickAway
|
|
10087
|
+
}, void 0);
|
|
10088
|
+
};
|
|
10089
|
+
|
|
10090
|
+
export { Cell, CreateUUID, CssCell, CssGrid, CssGridDebug, Daytime, DotAccordion, DotActionToolbar, DotAlertBanner, DotAppLogo, DotAppSwitcher, DotAppToolbar, DotAutoComplete, DotAvatar, DotAvatarGroup, DotBadge, DotBreadcrumbs, DotButton, DotButtonToggle, DotCard, DotCardContent, DotCardFooter, DotCardHeader, DotCheckbox, DotCheckboxGroup, DotChip, DotClickAwayListener, DotConfirmationDialog, DotCopyButton, DotCoreApiProvider, DotDatePicker, DotDialog, DotDivider, DotDraggableList, DotDrawer, DotDynamicForm, DotEmptyState, DotFileListItem, DotFileUpload, DotForm, DotFormGroup, DotHeaderRow, DotIcon, DotIconButton, DotInlineEdit, DotInputSelect, DotInputText, DotLinearProgress, DotLink, DotList, DotMenu, DotNavigationRail, DotPill, DotPopper, DotProgress, DotProgressButton, DotRadioButton, DotRadioGroup, DotSidebar, DotSkeleton, DotSnackbar, DotSnackbarContainer, DotSnackbarProvider, DotSplitButton, DotStepper, DotSwitch, DotTable, DotTableAction, DotTableActions, DotTablePagination, DotTabs, DotThemeProvider, DotTimePicker, DotTooltip, DotTruncateWithTooltip, DotTypography, avatarColors, lightThemeColors as lightColors, mockScrollIntoView, parseAutoCompleteValue, variables as themeVariables, typographyOptions, useDotCoreApiContext, useDotSnackbarContext };
|
package/index.umd.js
CHANGED
|
@@ -4723,6 +4723,9 @@
|
|
|
4723
4723
|
});
|
|
4724
4724
|
};
|
|
4725
4725
|
|
|
4726
|
+
function ariaLabelOrAlternates(ariaLabel, label, placeholder) {
|
|
4727
|
+
return ariaLabel || label || placeholder;
|
|
4728
|
+
}
|
|
4726
4729
|
var DEFAULT_ACTION_ITEM_TEXT = 'Add new item';
|
|
4727
4730
|
var DotAutoComplete = function DotAutoComplete(_a) {
|
|
4728
4731
|
var ListboxComponent = _a.ListboxComponent,
|
|
@@ -5041,11 +5044,17 @@
|
|
|
5041
5044
|
error: error,
|
|
5042
5045
|
focused: readOnly ? false : undefined,
|
|
5043
5046
|
helperText: helperText,
|
|
5047
|
+
id: inputId,
|
|
5044
5048
|
inputProps: __assign(__assign({}, inputProps), {
|
|
5049
|
+
'aria-label': ariaLabelOrAlternates(ariaLabel, label, placeholder),
|
|
5050
|
+
'data-testid': dataTestId && dataTestId + "-input",
|
|
5045
5051
|
id: inputId,
|
|
5046
5052
|
className: useStylesWithRootClass(inputProps.className, 'dot-input'),
|
|
5047
5053
|
readOnly: readOnly
|
|
5048
5054
|
}),
|
|
5055
|
+
InputLabelProps: {
|
|
5056
|
+
htmlFor: inputId
|
|
5057
|
+
},
|
|
5049
5058
|
InputProps: __assign(__assign({}, params.InputProps), {
|
|
5050
5059
|
endAdornment: !readOnly ? renderEndAdornment(params.InputProps.endAdornment) : undefined
|
|
5051
5060
|
}),
|
|
@@ -7601,27 +7610,34 @@
|
|
|
7601
7610
|
onEditStateChange = _a.onEditStateChange,
|
|
7602
7611
|
readOnly = _a.readOnly,
|
|
7603
7612
|
selectTextOnEdit = _a.selectTextOnEdit,
|
|
7604
|
-
_c = _a.
|
|
7605
|
-
|
|
7613
|
+
_c = _a.startEditable,
|
|
7614
|
+
startEditable = _c === void 0 ? false : _c,
|
|
7615
|
+
_d = _a.tabIndex,
|
|
7616
|
+
tabIndex = _d === void 0 ? 0 : _d,
|
|
7606
7617
|
tooltip = _a.tooltip,
|
|
7607
|
-
|
|
7608
|
-
typography =
|
|
7609
|
-
|
|
7610
|
-
value =
|
|
7611
|
-
var _f = React.useState(false),
|
|
7612
|
-
editing = _f[0],
|
|
7613
|
-
setEditing = _f[1];
|
|
7618
|
+
_e = _a.typography,
|
|
7619
|
+
typography = _e === void 0 ? 'body1' : _e,
|
|
7620
|
+
_f = _a.value,
|
|
7621
|
+
value = _f === void 0 ? '' : _f;
|
|
7614
7622
|
var _g = React.useState(false),
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
var _h = React.useState(
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
var _j = React.useState(
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
+
editing = _g[0],
|
|
7624
|
+
setEditing = _g[1];
|
|
7625
|
+
var _h = React.useState(false),
|
|
7626
|
+
showTooltip = _h[0],
|
|
7627
|
+
setShowTooltip = _h[1];
|
|
7628
|
+
var _j = React.useState(''),
|
|
7629
|
+
originalValue = _j[0],
|
|
7630
|
+
setOriginalValue = _j[1];
|
|
7631
|
+
var _k = React.useState(value),
|
|
7632
|
+
inputValue = _k[0],
|
|
7633
|
+
setInputValue = _k[1];
|
|
7623
7634
|
var inputRef = React.useRef();
|
|
7624
7635
|
var inlineEditRef = React.useRef();
|
|
7636
|
+
React.useEffect(function () {
|
|
7637
|
+
if (startEditable && !readOnly) {
|
|
7638
|
+
enterEditMode();
|
|
7639
|
+
}
|
|
7640
|
+
}, []);
|
|
7625
7641
|
React.useEffect(function () {
|
|
7626
7642
|
if (value !== inputValue) {
|
|
7627
7643
|
setInputValue(value);
|
|
@@ -7634,10 +7650,13 @@
|
|
|
7634
7650
|
setShowTooltip(visible);
|
|
7635
7651
|
}
|
|
7636
7652
|
};
|
|
7637
|
-
var
|
|
7638
|
-
if (editing) return;
|
|
7653
|
+
var enterEditMode = function enterEditMode() {
|
|
7639
7654
|
setOriginalValue(inputValue);
|
|
7640
7655
|
setEditing(true);
|
|
7656
|
+
};
|
|
7657
|
+
var handleInlineEditClick = function handleInlineEditClick() {
|
|
7658
|
+
if (editing) return;
|
|
7659
|
+
enterEditMode();
|
|
7641
7660
|
if (onEditStateChange) {
|
|
7642
7661
|
onEditStateChange(true);
|
|
7643
7662
|
}
|
|
@@ -7787,7 +7806,7 @@
|
|
|
7787
7806
|
error: false,
|
|
7788
7807
|
fullWidth: fullWidth,
|
|
7789
7808
|
inputProps: {
|
|
7790
|
-
'data-testid': dataTestId,
|
|
7809
|
+
'data-testid': dataTestId + "-input",
|
|
7791
7810
|
className: 'dot-input',
|
|
7792
7811
|
maxLength: charactersLimit === null || charactersLimit === void 0 ? void 0 : charactersLimit.maxLength
|
|
7793
7812
|
},
|
|
@@ -7948,7 +7967,7 @@
|
|
|
7948
7967
|
componentId: "l7oxi2-0"
|
|
7949
7968
|
})(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
|
|
7950
7969
|
var theme = _a.theme;
|
|
7951
|
-
return styled.css(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n &.", " {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n &.error {\n background-color: ", ";\n color: ", ";\n }\n\n &.success {\n background-color: ", ";\n color: ", ";\n }\n &.warning {\n background-color: ", ";\n color: ", ";\n }\n\n &.in-progress {\n background-color: ", ";\n color: ", ";\n }\n "], ["\n &.", " {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n &.error {\n background-color: ", ";\n color: ", ";\n }\n\n &.success {\n background-color: ", ";\n color: ", ";\n }\n &.warning {\n background-color: ", ";\n color: ", ";\n }\n\n &.in-progress {\n background-color: ", ";\n color: ", ";\n }\n "])), rootClassName$n, function (_a) {
|
|
7970
|
+
return styled.css(templateObject_1$n || (templateObject_1$n = __makeTemplateObject(["\n &.", " {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n &.error {\n background-color: ", ";\n border-color: ", ";\n .dot-icon {\n color: ", ";\n }\n color: ", ";\n }\n\n &.success {\n background-color: ", ";\n border-color: ", ";\n .dot-icon {\n color: ", ";\n }\n color: ", ";\n }\n\n &.warning {\n background-color: ", ";\n border-color: ", ";\n .dot-icon {\n color: ", ";\n }\n color: ", ";\n }\n\n &.in-progress {\n background-color: ", ";\n border-color: ", ";\n .dot-icon {\n color: ", ";\n }\n color: ", ";\n }\n "], ["\n &.", " {\n background-color: ", ";\n color: ", ";\n border-color: ", ";\n\n &.error {\n background-color: ", ";\n border-color: ", ";\n .dot-icon {\n color: ", ";\n }\n color: ", ";\n }\n\n &.success {\n background-color: ", ";\n border-color: ", ";\n .dot-icon {\n color: ", ";\n }\n color: ", ";\n }\n\n &.warning {\n background-color: ", ";\n border-color: ", ";\n .dot-icon {\n color: ", ";\n }\n color: ", ";\n }\n\n &.in-progress {\n background-color: ", ";\n border-color: ", ";\n .dot-icon {\n color: ", ";\n }\n color: ", ";\n }\n "])), rootClassName$n, function (_a) {
|
|
7952
7971
|
var backgroundcolor = _a.backgroundcolor;
|
|
7953
7972
|
return backgroundcolor || theme.palette.grey[200];
|
|
7954
7973
|
}, function (_a) {
|
|
@@ -7957,7 +7976,7 @@
|
|
|
7957
7976
|
}, function (_a) {
|
|
7958
7977
|
var bordercolor = _a.bordercolor;
|
|
7959
7978
|
return bordercolor ? bordercolor : theme.palette.layer.n700;
|
|
7960
|
-
}, theme.palette.error[
|
|
7979
|
+
}, theme.palette.error[100], theme.palette.error.main, theme.palette.error.main, theme.palette.layer.n700, theme.palette.success[100], theme.palette.success.main, theme.palette.success.main, theme.palette.layer.n700, theme.palette.warning[100], theme.palette.warning.main, theme.palette.warning.main, theme.palette.layer.n700, theme.palette.primary[100], theme.palette.primary.main, theme.palette.primary.main, theme.palette.layer.n700);
|
|
7961
7980
|
});
|
|
7962
7981
|
var templateObject_1$n, templateObject_2$m;
|
|
7963
7982
|
|
|
@@ -10319,15 +10338,18 @@
|
|
|
10319
10338
|
defaultValue = _a.defaultValue,
|
|
10320
10339
|
disableOpenPicker = _a.disableOpenPicker,
|
|
10321
10340
|
disablePast = _a.disablePast,
|
|
10341
|
+
_d = _a.disablePortal,
|
|
10342
|
+
disablePortal = _d === void 0 ? false : _d,
|
|
10322
10343
|
disabled = _a.disabled,
|
|
10323
10344
|
displayWeekNumber = _a.displayWeekNumber,
|
|
10324
|
-
|
|
10325
|
-
displayClearButton =
|
|
10345
|
+
_e = _a.displayClearButton,
|
|
10346
|
+
displayClearButton = _e === void 0 ? true : _e,
|
|
10326
10347
|
error = _a.error,
|
|
10327
10348
|
fixedWeekNumber = _a.fixedWeekNumber,
|
|
10349
|
+
focusInputOnPopperOpened = _a.focusInputOnPopperOpened,
|
|
10328
10350
|
format = _a.format,
|
|
10329
|
-
|
|
10330
|
-
fullWidth =
|
|
10351
|
+
_f = _a.fullWidth,
|
|
10352
|
+
fullWidth = _f === void 0 ? false : _f,
|
|
10331
10353
|
helperText = _a.helperText,
|
|
10332
10354
|
inputId = _a.inputId,
|
|
10333
10355
|
inputName = _a.inputName,
|
|
@@ -10343,18 +10365,29 @@
|
|
|
10343
10365
|
onOpen = _a.onOpen,
|
|
10344
10366
|
open = _a.open,
|
|
10345
10367
|
persistentLabel = _a.persistentLabel,
|
|
10346
|
-
|
|
10347
|
-
readOnly =
|
|
10348
|
-
|
|
10349
|
-
required =
|
|
10368
|
+
_g = _a.readOnly,
|
|
10369
|
+
readOnly = _g === void 0 ? false : _g,
|
|
10370
|
+
_h = _a.required,
|
|
10371
|
+
required = _h === void 0 ? false : _h,
|
|
10350
10372
|
showDaysOutsideCurrentMonth = _a.showDaysOutsideCurrentMonth,
|
|
10351
10373
|
value = _a.value;
|
|
10352
10374
|
var dateFormat = format || 'YYYY-MM-DD';
|
|
10353
10375
|
var hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
|
|
10354
10376
|
var hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
|
|
10355
10377
|
var isInputReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
|
|
10378
|
+
var inputRef = React.useRef(null);
|
|
10356
10379
|
var rootClasses = useStylesWithRootClass(rootClassName$1, className, isInputReadOnly ? 'read-only' : '');
|
|
10357
10380
|
var containerClasses = useStylesWithRootClass(containerClassName$1, fullWidth ? 'full-width' : '', className);
|
|
10381
|
+
var focusInput = function focusInput(ref) {
|
|
10382
|
+
setTimeout(function () {
|
|
10383
|
+
ref.current.focus();
|
|
10384
|
+
}, 0);
|
|
10385
|
+
};
|
|
10386
|
+
React.useEffect(function () {
|
|
10387
|
+
if (focusInputOnPopperOpened && open && inputRef.current) {
|
|
10388
|
+
focusInput(inputRef);
|
|
10389
|
+
}
|
|
10390
|
+
}, [open, focusInputOnPopperOpened]);
|
|
10358
10391
|
React.useEffect(function () {
|
|
10359
10392
|
if (hasValueWithoutChangeHandler) {
|
|
10360
10393
|
console.warn('Warning: You provided a `value` prop without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.');
|
|
@@ -10381,6 +10414,12 @@
|
|
|
10381
10414
|
var handleError = function handleError(validationError, currentValue) {
|
|
10382
10415
|
return onError === null || onError === void 0 ? void 0 : onError(validationError, dayjs__default["default"](currentValue).format(dateFormat));
|
|
10383
10416
|
};
|
|
10417
|
+
var handleOpen = function handleOpen() {
|
|
10418
|
+
if (focusInputOnPopperOpened && inputRef.current) {
|
|
10419
|
+
focusInput(inputRef);
|
|
10420
|
+
}
|
|
10421
|
+
onOpen === null || onOpen === void 0 ? void 0 : onOpen();
|
|
10422
|
+
};
|
|
10384
10423
|
var createActionBar = function createActionBar() {
|
|
10385
10424
|
var actionBar = {
|
|
10386
10425
|
actions: []
|
|
@@ -10423,7 +10462,7 @@
|
|
|
10423
10462
|
onChange: handleChange,
|
|
10424
10463
|
onClose: onClose,
|
|
10425
10464
|
onError: handleError,
|
|
10426
|
-
onOpen:
|
|
10465
|
+
onOpen: handleOpen,
|
|
10427
10466
|
open: open,
|
|
10428
10467
|
showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,
|
|
10429
10468
|
slots: {
|
|
@@ -10457,6 +10496,7 @@
|
|
|
10457
10496
|
'data-testid': 'dot-date-picker-input',
|
|
10458
10497
|
onBlur: onBlur
|
|
10459
10498
|
},
|
|
10499
|
+
inputRef: inputRef,
|
|
10460
10500
|
fullWidth: fullWidth,
|
|
10461
10501
|
name: inputName
|
|
10462
10502
|
},
|
|
@@ -10465,6 +10505,9 @@
|
|
|
10465
10505
|
},
|
|
10466
10506
|
desktopTrapFocus: {
|
|
10467
10507
|
disableEnforceFocus: true
|
|
10508
|
+
},
|
|
10509
|
+
popper: {
|
|
10510
|
+
disablePortal: disablePortal
|
|
10468
10511
|
}
|
|
10469
10512
|
},
|
|
10470
10513
|
value: value && dayjs__default["default"](value, dateFormat)
|
|
@@ -10921,6 +10964,18 @@
|
|
|
10921
10964
|
}), void 0);
|
|
10922
10965
|
};
|
|
10923
10966
|
|
|
10967
|
+
var DotClickAwayListener = function DotClickAwayListener(_a) {
|
|
10968
|
+
var children = _a.children,
|
|
10969
|
+
_b = _a.disableReactTree,
|
|
10970
|
+
disableReactTree = _b === void 0 ? false : _b,
|
|
10971
|
+
onClickAway = _a.onClickAway;
|
|
10972
|
+
return jsxRuntime.jsx(material.ClickAwayListener, {
|
|
10973
|
+
children: children,
|
|
10974
|
+
disableReactTree: disableReactTree,
|
|
10975
|
+
onClickAway: onClickAway
|
|
10976
|
+
}, void 0);
|
|
10977
|
+
};
|
|
10978
|
+
|
|
10924
10979
|
exports.Cell = Cell;
|
|
10925
10980
|
exports.CreateUUID = CreateUUID;
|
|
10926
10981
|
exports.CssCell = CssCell;
|
|
@@ -10946,6 +11001,7 @@
|
|
|
10946
11001
|
exports.DotCheckbox = DotCheckbox;
|
|
10947
11002
|
exports.DotCheckboxGroup = DotCheckboxGroup;
|
|
10948
11003
|
exports.DotChip = DotChip;
|
|
11004
|
+
exports.DotClickAwayListener = DotClickAwayListener;
|
|
10949
11005
|
exports.DotConfirmationDialog = DotConfirmationDialog;
|
|
10950
11006
|
exports.DotCopyButton = DotCopyButton;
|
|
10951
11007
|
exports.DotCoreApiProvider = DotCoreApiProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
export interface ClickAwayListenerProps {
|
|
3
|
+
/** The wrapped element. */
|
|
4
|
+
children: ReactElement;
|
|
5
|
+
/** If true, the React tree is ignored and only the DOM tree is considered. This prop changes how portaled elements are handled. */
|
|
6
|
+
disableReactTree?: boolean;
|
|
7
|
+
/** Callback fired when a "click away" event is detected. */
|
|
8
|
+
onClickAway: (event: MouseEvent | TouchEvent) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DotClickAwayListener: ({ children, disableReactTree, onClickAway, }: ClickAwayListenerProps) => JSX.Element;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ComponentMeta, Story } from '@storybook/react';
|
|
2
|
+
import { ClickAwayListenerProps } from './ClickAwayListener';
|
|
3
|
+
declare const _default: ComponentMeta<({ children, disableReactTree, onClickAway, }: ClickAwayListenerProps) => JSX.Element>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const Default: Story<ClickAwayListenerProps>;
|
|
@@ -15,6 +15,8 @@ export interface DatePickerProps extends CommonProps {
|
|
|
15
15
|
disableOpenPicker?: boolean;
|
|
16
16
|
/** If `true`, disable values before the current date for date components, time for time components and both for date time components. */
|
|
17
17
|
disablePast?: boolean;
|
|
18
|
+
/** Disable the portal behavior. If true, children stay within parent DOM hierarchy. */
|
|
19
|
+
disablePortal?: boolean;
|
|
18
20
|
/** If `true`, the picker and text field are disabled. */
|
|
19
21
|
disabled?: boolean;
|
|
20
22
|
/** If `true`, 'Clear' button will be displayed in the calendar popper. `True` by default. */
|
|
@@ -25,6 +27,8 @@ export interface DatePickerProps extends CommonProps {
|
|
|
25
27
|
error?: boolean;
|
|
26
28
|
/** Calendar will show more weeks in order to match this value. Put it to 6 for having fix number of week in Gregorian calendars */
|
|
27
29
|
fixedWeekNumber?: number;
|
|
30
|
+
/** If `true`, focus will be automatically set to the input field when popper opens */
|
|
31
|
+
focusInputOnPopperOpened?: boolean;
|
|
28
32
|
/** Format of the date when rendered in the input(s). Defaults to localized format based on the used `views`. */
|
|
29
33
|
format?: string;
|
|
30
34
|
/** If true, the input will take up the full width of its container */
|
|
@@ -73,4 +77,4 @@ export interface DatePickerProps extends CommonProps {
|
|
|
73
77
|
/** The selected value. Used when the component is controlled. */
|
|
74
78
|
value?: string;
|
|
75
79
|
}
|
|
76
|
-
export declare const DotDatePicker: ({ ariaLabel, autoFocus, className, closeOnSelect, "data-testid": dataTestId, defaultValue, disableOpenPicker, disablePast, disabled, displayWeekNumber, displayClearButton, error, fixedWeekNumber, format, fullWidth, helperText, inputId, inputName, label, locale, maxDate, minDate, onAccept, onBlur, onChange, onClose, onError, onOpen, open, persistentLabel, readOnly, required, showDaysOutsideCurrentMonth, value, }: DatePickerProps) => JSX.Element;
|
|
80
|
+
export declare const DotDatePicker: ({ ariaLabel, autoFocus, className, closeOnSelect, "data-testid": dataTestId, defaultValue, disableOpenPicker, disablePast, disablePortal, disabled, displayWeekNumber, displayClearButton, error, fixedWeekNumber, focusInputOnPopperOpened, format, fullWidth, helperText, inputId, inputName, label, locale, maxDate, minDate, 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, defaultValue, disableOpenPicker, disablePast, disabled, displayWeekNumber, displayClearButton, error, fixedWeekNumber, format, fullWidth, helperText, inputId, inputName, label, locale, maxDate, minDate, onAccept, onBlur, 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, defaultValue, disableOpenPicker, disablePast, disablePortal, disabled, displayWeekNumber, displayClearButton, error, fixedWeekNumber, focusInputOnPopperOpened, format, fullWidth, helperText, inputId, inputName, label, locale, maxDate, minDate, 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,8 +18,14 @@ export declare const WithFullWidth: any;
|
|
|
18
18
|
export declare const WithoutClearButton: any;
|
|
19
19
|
export declare const WithConsoleWarning: any;
|
|
20
20
|
export declare const WithDefaultValue: any;
|
|
21
|
+
export declare const WithInputFocusOnPopperOpened: any;
|
|
21
22
|
export declare const WithControlledMode: Story<DatePickerProps>;
|
|
22
23
|
export declare const WithMinMaxDates: Story<DatePickerProps>;
|
|
23
24
|
export declare const WithLocaleConfiguration: Story<DatePickerProps>;
|
|
24
25
|
export declare const WithChangeOnBlur: Story<DatePickerProps>;
|
|
25
26
|
export declare const WithOpenedPopperInControlledMode: Story<DatePickerProps>;
|
|
27
|
+
export interface TaskDateViewContentProps {
|
|
28
|
+
date: string;
|
|
29
|
+
}
|
|
30
|
+
export declare const TaskDateViewContent: ({ date }: TaskDateViewContentProps) => JSX.Element;
|
|
31
|
+
export declare const WithConditionalRendering: Story<DatePickerProps>;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const datePickerWithControlledModeClassName = "dot-date-picker-with-controlled-mode";
|
|
2
2
|
export declare const datePickerWithLocaleClassName = "dot-date-picker-with-locale";
|
|
3
3
|
export declare const datePickerWithBlurClassName = "dot-date-picker-with-blur";
|
|
4
|
+
export declare const datePickerWithConditionalRenderingClassName = "dot-date-picker-with-conditional-rendering";
|
|
4
5
|
export declare const StyledDatePickerWithControlledMode: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
6
|
export declare const StyledDatePickerWithChangeOnBlur: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
7
|
export declare const StyledDatePickerWithLocale: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
8
|
+
export declare const StyledDatePickerWithConditionalRendering: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -35,6 +35,7 @@ export type { FileItemProps, FileUploadError, FileUploadProps, ListItemFile, Map
|
|
|
35
35
|
export type { LinearProgressColor, LinearProgressProps, LinearProgressVariant, } from './linear-progress';
|
|
36
36
|
export type { DatePickerLocale, DatePickerProps, FieldChangeHandlerContext, } from './date-picker';
|
|
37
37
|
export type { TimePickerProps } from './time-picker';
|
|
38
|
+
export type { ClickAwayListenerProps } from './click-away-listener';
|
|
38
39
|
export { DotAccordion } from './accordion/Accordion';
|
|
39
40
|
export { DotActionToolbar } from './action-toolbar/ActionToolbar';
|
|
40
41
|
export { DotAlertBanner } from './alert-banner/AlertBanner';
|
|
@@ -97,4 +98,5 @@ export { DotDraggableList } from './draggable-list';
|
|
|
97
98
|
export { DotLinearProgress } from './linear-progress';
|
|
98
99
|
export { DotDatePicker } from './date-picker';
|
|
99
100
|
export { Daytime, DotTimePicker, mockScrollIntoView } from './time-picker';
|
|
101
|
+
export { DotClickAwayListener } from './click-away-listener';
|
|
100
102
|
export { CreateUUID } from './createUUID';
|
|
@@ -20,6 +20,8 @@ export interface InlineEditProps extends CommonProps {
|
|
|
20
20
|
readOnly?: boolean;
|
|
21
21
|
/** If true, when starting edit it will select all text in the input */
|
|
22
22
|
selectTextOnEdit?: boolean;
|
|
23
|
+
/** If true and readOnly is false when component loads, start as editable */
|
|
24
|
+
startEditable?: boolean;
|
|
23
25
|
/** tab order for the inline edit */
|
|
24
26
|
tabIndex?: number;
|
|
25
27
|
/** Tooltip text displayed on hover */
|
|
@@ -32,4 +34,4 @@ export interface InlineEditProps extends CommonProps {
|
|
|
32
34
|
/**
|
|
33
35
|
* @experimental This component is still in development
|
|
34
36
|
*/
|
|
35
|
-
export declare const DotInlineEdit: ({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
|
|
37
|
+
export declare const DotInlineEdit: ({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentMeta, Story } from '@storybook/react';
|
|
2
2
|
import { InlineEditProps } from './InlineEdit';
|
|
3
|
-
declare const _default: ComponentMeta<({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element>;
|
|
3
|
+
declare const _default: ComponentMeta<({ ariaLabel, bindings, charactersLimit, className, "data-testid": dataTestId, fullWidth, hideActionButtons, name, onChange, onEditStateChange, readOnly, selectTextOnEdit, startEditable, tabIndex, tooltip, typography, value, }: InlineEditProps) => JSX.Element>;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Default: Story<InlineEditProps>;
|
|
6
6
|
export declare const WithCharactersLimit: any;
|
|
@@ -10,6 +10,7 @@ export declare const WithoutActionButtons: any;
|
|
|
10
10
|
export declare const WithTooltip: any;
|
|
11
11
|
export declare const WithSaveError: Story<InlineEditProps>;
|
|
12
12
|
export declare const WithCustomTypography: Story<InlineEditProps>;
|
|
13
|
+
export declare const WithStartEditable: any;
|
|
13
14
|
export declare const WithSingleBinding: any;
|
|
14
15
|
export declare const WithMultipleBindings: Story<InlineEditProps>;
|
|
15
16
|
export declare const WithSelectOnEdit: any;
|