@digital-ai/dot-components 2.7.1 → 2.7.2

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.7.2](https://www.npmjs.com/package/@digital-ai/dot-components) (04/24/2023)
4
+
5
+ [Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.1...2.7.2)
6
+
7
+ **Features:**
8
+
9
+ - S-92086: `DotDatePicker` improvements [\#1461](https://github.com/digital-ai/dot-components/pull/1461) ([dmiletic85](https://github.com/dmiletic85))
10
+
11
+ **Fixed bugs:**
12
+
13
+ - 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))
14
+
3
15
  ## [2.7.1](https://www.npmjs.com/package/@digital-ai/dot-components) (04/20/2023)
4
16
 
5
17
  [Full Changelog](https://digital-ai.github.io/dot-components/?path=/story/introduction--page/digital-ai/dot-components/compare/2.7.0...2.7.1)
@@ -340,7 +352,6 @@
340
352
  **Features:**
341
353
 
342
354
  - 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
355
 
345
356
  **Fixed bugs:**
346
357
 
@@ -353,6 +364,7 @@
353
364
  **Features:**
354
365
 
355
366
  - S-87726 Align input content with helper text [\#1265](https://github.com/digital-ai/dot-components/pull/1265) ([nikolinadapic](https://github.com/nikolinadapic))
367
+ - 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
368
  - S-87616 Adjust left margin for helper text [\#1262](https://github.com/digital-ai/dot-components/pull/1262) ([nikolinadapic](https://github.com/nikolinadapic))
357
369
  - S-87599: `DotAutocomplete` Add optional `persistentLabel` prop [\#1258](https://github.com/digital-ai/dot-components/pull/1258) ([dmiletic85](https://github.com/dmiletic85))
358
370
 
@@ -525,6 +537,7 @@
525
537
 
526
538
  **Fixed bugs:**
527
539
 
540
+ - 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
541
  - D-20958: Safari animation jitter [\#1154](https://github.com/digital-ai/dot-components/pull/1154) ([CWSites](https://github.com/CWSites))
529
542
 
530
543
  **Misc:**
@@ -541,7 +554,6 @@
541
554
 
542
555
  **Fixed bugs:**
543
556
 
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
557
  - D-20970: DotTableActions component [\#1134](https://github.com/digital-ai/dot-components/pull/1134) ([selsemore](https://github.com/selsemore))
546
558
  - D-20359: only display tooltip if string [\#1127](https://github.com/digital-ai/dot-components/pull/1127) ([CWSites](https://github.com/CWSites))
547
559
 
@@ -563,6 +575,7 @@
563
575
  - D-20736: Fix text alignment for small DotAvatar [\#1116](https://github.com/digital-ai/dot-components/pull/1116) ([selsemore](https://github.com/selsemore))
564
576
  - D-20719: `DotTable`: Checkbox column takes up to much space in a multi-select table [\#1112](https://github.com/digital-ai/dot-components/pull/1112) ([dmiletic85](https://github.com/dmiletic85))
565
577
  - D-20660: `DotNavigationRail`: Should be able to update the selected rail [\#1106](https://github.com/digital-ai/dot-components/pull/1106) ([dmiletic85](https://github.com/dmiletic85))
578
+ - D-20511: remove extra period [\#1094](https://github.com/digital-ai/dot-components/pull/1094) ([CWSites](https://github.com/CWSites))
566
579
 
567
580
  ## [1.14.0](https://www.npmjs.com/package/@digital-ai/dot-components) (04/01/2022)
568
581
 
@@ -606,7 +619,6 @@
606
619
 
607
620
  **Fixed bugs:**
608
621
 
609
- - D-20511: remove extra period [\#1094](https://github.com/digital-ai/dot-components/pull/1094) ([CWSites](https://github.com/CWSites))
610
622
  - D-20463: Change the DotDrawer stories to make drawers not open initially [\#1086](https://github.com/digital-ai/dot-components/pull/1086) ([selsemore](https://github.com/selsemore))
611
623
  - D-20418: `DotTable`: Strange scrolling behavior with action menu [\#1082](https://github.com/digital-ai/dot-components/pull/1082) ([dmiletic85](https://github.com/dmiletic85))
612
624
  - D-20426: `DotConfirmation `: `title` and `message` prop are not applying correct font family [\#1081](https://github.com/digital-ai/dot-components/pull/1081) ([dmiletic85](https://github.com/dmiletic85))
@@ -1266,6 +1278,7 @@
1266
1278
  - 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
1279
  - S-76838: address Sonarcloud code issues [\#608](https://github.com/digital-ai/dot-components/pull/608) ([CWSites](https://github.com/CWSites))
1268
1280
  - S-77317: Add 'height' prop to DotDrawer component [\#603](https://github.com/digital-ai/dot-components/pull/603) ([selsemore](https://github.com/selsemore))
1281
+ - Update GitHub prerelease [\#599](https://github.com/digital-ai/dot-components/pull/599) ([CWSites](https://github.com/CWSites))
1269
1282
  - S-76917: remove progressionBoard styles from theme provider [\#597](https://github.com/digital-ai/dot-components/pull/597) ([CWSites](https://github.com/CWSites))
1270
1283
 
1271
1284
  ## [1.0.3](https://www.npmjs.com/package/@digital-ai/dot-components) (07/27/2021)
package/index.esm.js CHANGED
@@ -7324,7 +7324,7 @@ const StyledPill = styled(Chip).withConfig({
7324
7324
  componentId: "l7oxi2-0"
7325
7325
  })(["", ""], ({
7326
7326
  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, ({
7327
+ }) => 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
7328
  backgroundcolor
7329
7329
  }) => {
7330
7330
  return backgroundcolor || theme.palette.grey[200];
@@ -7336,7 +7336,7 @@ const StyledPill = styled(Chip).withConfig({
7336
7336
  bordercolor
7337
7337
  }) => {
7338
7338
  return bordercolor ? bordercolor : theme.palette.layer.n700;
7339
- }, theme.palette.error[500], theme.palette.layer.n0, theme.palette.success[500], theme.palette.layer.n0, theme.palette.warning[500], theme.palette.layer.n700, theme.palette.primary.main, theme.palette.layer.n0));
7339
+ }, 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
7340
 
7341
7341
  const DotPill = ({
7342
7342
  ariaLabel,
@@ -9485,11 +9485,13 @@ const DotDatePicker = ({
9485
9485
  defaultValue,
9486
9486
  disableOpenPicker,
9487
9487
  disablePast,
9488
+ disablePortal: _disablePortal = false,
9488
9489
  disabled,
9489
9490
  displayWeekNumber,
9490
9491
  displayClearButton: _displayClearButton = true,
9491
9492
  error,
9492
9493
  fixedWeekNumber,
9494
+ focusInputOnPopperOpened,
9493
9495
  format,
9494
9496
  fullWidth: _fullWidth = false,
9495
9497
  helperText,
@@ -9516,8 +9518,19 @@ const DotDatePicker = ({
9516
9518
  const hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
9517
9519
  const hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
9518
9520
  const isInputReadOnly = _readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
9521
+ const inputRef = useRef(null);
9519
9522
  const rootClasses = useStylesWithRootClass(rootClassName$1, className, isInputReadOnly ? 'read-only' : '');
9520
9523
  const containerClasses = useStylesWithRootClass(containerClassName$1, _fullWidth ? 'full-width' : '', className);
9524
+ const focusInput = ref => {
9525
+ setTimeout(() => {
9526
+ ref.current.focus();
9527
+ }, 0);
9528
+ };
9529
+ useEffect(() => {
9530
+ if (focusInputOnPopperOpened && open && inputRef.current) {
9531
+ focusInput(inputRef);
9532
+ }
9533
+ }, [open, focusInputOnPopperOpened]);
9521
9534
  useEffect(() => {
9522
9535
  if (hasValueWithoutChangeHandler) {
9523
9536
  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 +9555,12 @@ const DotDatePicker = ({
9542
9555
  onAccept(changedValue ? changedValue.format(dateFormat) : null);
9543
9556
  };
9544
9557
  const handleError = (validationError, currentValue) => onError === null || onError === void 0 ? void 0 : onError(validationError, dayjs(currentValue).format(dateFormat));
9558
+ const handleOpen = () => {
9559
+ if (focusInputOnPopperOpened && inputRef.current) {
9560
+ focusInput(inputRef);
9561
+ }
9562
+ onOpen === null || onOpen === void 0 ? void 0 : onOpen();
9563
+ };
9545
9564
  const createActionBar = () => {
9546
9565
  const actionBar = {
9547
9566
  actions: []
@@ -9584,7 +9603,7 @@ const DotDatePicker = ({
9584
9603
  onChange: handleChange,
9585
9604
  onClose: onClose,
9586
9605
  onError: handleError,
9587
- onOpen: onOpen,
9606
+ onOpen: handleOpen,
9588
9607
  open: open,
9589
9608
  showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,
9590
9609
  slots: {
@@ -9614,6 +9633,7 @@ const DotDatePicker = ({
9614
9633
  'data-testid': 'dot-date-picker-input',
9615
9634
  onBlur
9616
9635
  },
9636
+ inputRef,
9617
9637
  fullWidth: _fullWidth,
9618
9638
  name: inputName
9619
9639
  },
@@ -9622,6 +9642,9 @@ const DotDatePicker = ({
9622
9642
  },
9623
9643
  desktopTrapFocus: {
9624
9644
  disableEnforceFocus: true
9645
+ },
9646
+ popper: {
9647
+ disablePortal: _disablePortal
9625
9648
  }
9626
9649
  },
9627
9650
  value: value && dayjs(value, dateFormat)
@@ -10034,4 +10057,16 @@ const DotTimePicker = ({
10034
10057
  }), void 0);
10035
10058
  };
10036
10059
 
10037
- 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, 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 };
10060
+ const DotClickAwayListener = ({
10061
+ children,
10062
+ disableReactTree: _disableReactTree = false,
10063
+ onClickAway
10064
+ }) => {
10065
+ return jsx(ClickAwayListener, {
10066
+ children: children,
10067
+ disableReactTree: _disableReactTree,
10068
+ onClickAway: onClickAway
10069
+ }, void 0);
10070
+ };
10071
+
10072
+ 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
@@ -7948,7 +7948,7 @@
7948
7948
  componentId: "l7oxi2-0"
7949
7949
  })(templateObject_2$m || (templateObject_2$m = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), function (_a) {
7950
7950
  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) {
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 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
7952
  var backgroundcolor = _a.backgroundcolor;
7953
7953
  return backgroundcolor || theme.palette.grey[200];
7954
7954
  }, function (_a) {
@@ -7957,7 +7957,7 @@
7957
7957
  }, function (_a) {
7958
7958
  var bordercolor = _a.bordercolor;
7959
7959
  return bordercolor ? bordercolor : theme.palette.layer.n700;
7960
- }, theme.palette.error[500], theme.palette.layer.n0, theme.palette.success[500], theme.palette.layer.n0, theme.palette.warning[500], theme.palette.layer.n700, theme.palette.primary.main, theme.palette.layer.n0);
7960
+ }, 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
7961
  });
7962
7962
  var templateObject_1$n, templateObject_2$m;
7963
7963
 
@@ -10319,15 +10319,18 @@
10319
10319
  defaultValue = _a.defaultValue,
10320
10320
  disableOpenPicker = _a.disableOpenPicker,
10321
10321
  disablePast = _a.disablePast,
10322
+ _d = _a.disablePortal,
10323
+ disablePortal = _d === void 0 ? false : _d,
10322
10324
  disabled = _a.disabled,
10323
10325
  displayWeekNumber = _a.displayWeekNumber,
10324
- _d = _a.displayClearButton,
10325
- displayClearButton = _d === void 0 ? true : _d,
10326
+ _e = _a.displayClearButton,
10327
+ displayClearButton = _e === void 0 ? true : _e,
10326
10328
  error = _a.error,
10327
10329
  fixedWeekNumber = _a.fixedWeekNumber,
10330
+ focusInputOnPopperOpened = _a.focusInputOnPopperOpened,
10328
10331
  format = _a.format,
10329
- _e = _a.fullWidth,
10330
- fullWidth = _e === void 0 ? false : _e,
10332
+ _f = _a.fullWidth,
10333
+ fullWidth = _f === void 0 ? false : _f,
10331
10334
  helperText = _a.helperText,
10332
10335
  inputId = _a.inputId,
10333
10336
  inputName = _a.inputName,
@@ -10343,18 +10346,29 @@
10343
10346
  onOpen = _a.onOpen,
10344
10347
  open = _a.open,
10345
10348
  persistentLabel = _a.persistentLabel,
10346
- _f = _a.readOnly,
10347
- readOnly = _f === void 0 ? false : _f,
10348
- _g = _a.required,
10349
- required = _g === void 0 ? false : _g,
10349
+ _g = _a.readOnly,
10350
+ readOnly = _g === void 0 ? false : _g,
10351
+ _h = _a.required,
10352
+ required = _h === void 0 ? false : _h,
10350
10353
  showDaysOutsideCurrentMonth = _a.showDaysOutsideCurrentMonth,
10351
10354
  value = _a.value;
10352
10355
  var dateFormat = format || 'YYYY-MM-DD';
10353
10356
  var hasValueWithoutChangeHandler = value !== undefined && onChange === undefined;
10354
10357
  var hasBothValueAndDefaultValue = value !== undefined && defaultValue !== undefined;
10355
10358
  var isInputReadOnly = readOnly || hasValueWithoutChangeHandler || hasBothValueAndDefaultValue;
10359
+ var inputRef = React.useRef(null);
10356
10360
  var rootClasses = useStylesWithRootClass(rootClassName$1, className, isInputReadOnly ? 'read-only' : '');
10357
10361
  var containerClasses = useStylesWithRootClass(containerClassName$1, fullWidth ? 'full-width' : '', className);
10362
+ var focusInput = function focusInput(ref) {
10363
+ setTimeout(function () {
10364
+ ref.current.focus();
10365
+ }, 0);
10366
+ };
10367
+ React.useEffect(function () {
10368
+ if (focusInputOnPopperOpened && open && inputRef.current) {
10369
+ focusInput(inputRef);
10370
+ }
10371
+ }, [open, focusInputOnPopperOpened]);
10358
10372
  React.useEffect(function () {
10359
10373
  if (hasValueWithoutChangeHandler) {
10360
10374
  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 +10395,12 @@
10381
10395
  var handleError = function handleError(validationError, currentValue) {
10382
10396
  return onError === null || onError === void 0 ? void 0 : onError(validationError, dayjs__default["default"](currentValue).format(dateFormat));
10383
10397
  };
10398
+ var handleOpen = function handleOpen() {
10399
+ if (focusInputOnPopperOpened && inputRef.current) {
10400
+ focusInput(inputRef);
10401
+ }
10402
+ onOpen === null || onOpen === void 0 ? void 0 : onOpen();
10403
+ };
10384
10404
  var createActionBar = function createActionBar() {
10385
10405
  var actionBar = {
10386
10406
  actions: []
@@ -10423,7 +10443,7 @@
10423
10443
  onChange: handleChange,
10424
10444
  onClose: onClose,
10425
10445
  onError: handleError,
10426
- onOpen: onOpen,
10446
+ onOpen: handleOpen,
10427
10447
  open: open,
10428
10448
  showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,
10429
10449
  slots: {
@@ -10457,6 +10477,7 @@
10457
10477
  'data-testid': 'dot-date-picker-input',
10458
10478
  onBlur: onBlur
10459
10479
  },
10480
+ inputRef: inputRef,
10460
10481
  fullWidth: fullWidth,
10461
10482
  name: inputName
10462
10483
  },
@@ -10465,6 +10486,9 @@
10465
10486
  },
10466
10487
  desktopTrapFocus: {
10467
10488
  disableEnforceFocus: true
10489
+ },
10490
+ popper: {
10491
+ disablePortal: disablePortal
10468
10492
  }
10469
10493
  },
10470
10494
  value: value && dayjs__default["default"](value, dateFormat)
@@ -10921,6 +10945,18 @@
10921
10945
  }), void 0);
10922
10946
  };
10923
10947
 
10948
+ var DotClickAwayListener = function DotClickAwayListener(_a) {
10949
+ var children = _a.children,
10950
+ _b = _a.disableReactTree,
10951
+ disableReactTree = _b === void 0 ? false : _b,
10952
+ onClickAway = _a.onClickAway;
10953
+ return jsxRuntime.jsx(material.ClickAwayListener, {
10954
+ children: children,
10955
+ disableReactTree: disableReactTree,
10956
+ onClickAway: onClickAway
10957
+ }, void 0);
10958
+ };
10959
+
10924
10960
  exports.Cell = Cell;
10925
10961
  exports.CreateUUID = CreateUUID;
10926
10962
  exports.CssCell = CssCell;
@@ -10946,6 +10982,7 @@
10946
10982
  exports.DotCheckbox = DotCheckbox;
10947
10983
  exports.DotCheckboxGroup = DotCheckboxGroup;
10948
10984
  exports.DotChip = DotChip;
10985
+ exports.DotClickAwayListener = DotClickAwayListener;
10949
10986
  exports.DotConfirmationDialog = DotConfirmationDialog;
10950
10987
  exports.DotCopyButton = DotCopyButton;
10951
10988
  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>;
@@ -0,0 +1,2 @@
1
+ export type { ClickAwayListenerProps } from './ClickAwayListener';
2
+ export { DotClickAwayListener } from './ClickAwayListener';
@@ -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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digital-ai/dot-components",
3
- "version": "2.7.1",
3
+ "version": "2.7.2",
4
4
  "private": false,
5
5
  "license": "SEE LICENSE IN <LICENSE.md>",
6
6
  "contributors": [