@datarobot/design-system 28.10.0 → 29.0.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.
Files changed (75) hide show
  1. package/cjs/alert/alert.js +1 -1
  2. package/cjs/closable-tabs/closable-tabs.js +1 -1
  3. package/cjs/datetime-range-picker/datetime-range-picker-button.js +1 -1
  4. package/cjs/datetime-range-picker/datetime-range-picker-input.js +1 -1
  5. package/cjs/export-button/export-button.d.ts +3 -1
  6. package/cjs/export-button/export-button.js +4 -3
  7. package/cjs/floating-panel/floating-panel-dock-button.js +1 -1
  8. package/cjs/floating-panel/floating-panel-drag-handle.d.ts +3 -3
  9. package/cjs/floating-panel/floating-panel-drag-handle.js +3 -4
  10. package/cjs/floating-panel/floating-panel-header.d.ts +2 -0
  11. package/cjs/floating-panel/floating-panel-header.js +5 -2
  12. package/cjs/floating-panel/floating-panel.d.ts +6 -1
  13. package/cjs/floating-panel/floating-panel.js +4 -1
  14. package/cjs/inline-edit/inline-edit.js +2 -2
  15. package/cjs/message/index.d.ts +2 -2
  16. package/cjs/message/index.js +6 -0
  17. package/cjs/message/message.d.ts +17 -1
  18. package/cjs/message/message.js +27 -16
  19. package/cjs/notification-popup/notification-popup.js +1 -1
  20. package/cjs/pagination-new/pagination-new.js +2 -2
  21. package/cjs/scheduler/button-switcher.d.ts +3 -1
  22. package/cjs/scheduler/button-switcher.js +4 -5
  23. package/cjs/scheduler/scheduler.d.ts +4 -1
  24. package/cjs/scheduler/scheduler.js +8 -2
  25. package/cjs/scheduler/with-button-switcher-scheduler-container.d.ts +4 -1
  26. package/cjs/scheduler/with-button-switcher-scheduler-container.js +6 -2
  27. package/cjs/sidebar-menu/sidebar-menu-item-edit-form.js +2 -2
  28. package/cjs/sidebar-menu/sidebar-menu-link.js +2 -2
  29. package/cjs/table-react/components/custom-cells/row-expand-cell.js +1 -1
  30. package/cjs/tabular-data-tooltip/static-tabular-data-tooltip.js +16 -1
  31. package/cjs/tour/advanced-tour/components/advanced-tour-footer.js +2 -2
  32. package/cjs/tour/components/tour-footer.js +3 -3
  33. package/cjs/zoom-controls/zoom-controls.d.ts +5 -1
  34. package/cjs/zoom-controls/zoom-controls.js +8 -5
  35. package/esm/alert/alert.js +1 -1
  36. package/esm/closable-tabs/closable-tabs.js +1 -1
  37. package/esm/datetime-range-picker/datetime-range-picker-button.js +1 -1
  38. package/esm/datetime-range-picker/datetime-range-picker-input.js +1 -1
  39. package/esm/export-button/export-button.d.ts +3 -1
  40. package/esm/export-button/export-button.js +4 -3
  41. package/esm/floating-panel/floating-panel-dock-button.js +1 -1
  42. package/esm/floating-panel/floating-panel-drag-handle.d.ts +3 -3
  43. package/esm/floating-panel/floating-panel-drag-handle.js +3 -4
  44. package/esm/floating-panel/floating-panel-header.d.ts +2 -0
  45. package/esm/floating-panel/floating-panel-header.js +5 -2
  46. package/esm/floating-panel/floating-panel.d.ts +6 -1
  47. package/esm/floating-panel/floating-panel.js +4 -1
  48. package/esm/inline-edit/inline-edit.js +2 -2
  49. package/esm/message/index.d.ts +2 -2
  50. package/esm/message/index.js +2 -2
  51. package/esm/message/message.d.ts +17 -1
  52. package/esm/message/message.js +26 -15
  53. package/esm/notification-popup/notification-popup.js +1 -1
  54. package/esm/pagination-new/pagination-new.js +2 -2
  55. package/esm/scheduler/button-switcher.d.ts +3 -1
  56. package/esm/scheduler/button-switcher.js +4 -5
  57. package/esm/scheduler/scheduler.d.ts +4 -1
  58. package/esm/scheduler/scheduler.js +8 -2
  59. package/esm/scheduler/with-button-switcher-scheduler-container.d.ts +4 -1
  60. package/esm/scheduler/with-button-switcher-scheduler-container.js +6 -2
  61. package/esm/sidebar-menu/sidebar-menu-item-edit-form.js +2 -2
  62. package/esm/sidebar-menu/sidebar-menu-link.js +2 -2
  63. package/esm/table-react/components/custom-cells/row-expand-cell.js +1 -1
  64. package/esm/tabular-data-tooltip/static-tabular-data-tooltip.js +15 -1
  65. package/esm/tour/advanced-tour/components/advanced-tour-footer.js +2 -2
  66. package/esm/tour/components/tour-footer.js +3 -3
  67. package/esm/zoom-controls/zoom-controls.d.ts +5 -1
  68. package/esm/zoom-controls/zoom-controls.js +8 -5
  69. package/js/bundle/bundle.js +269 -339
  70. package/js/bundle/bundle.min.js +1 -1
  71. package/js/bundle/index.d.ts +31 -6
  72. package/js/midnight-gray/midnight-gray.min.js +1 -1
  73. package/package.json +1 -3
  74. package/styles/index.css +2 -2
  75. package/styles/index.min.css +1 -1
@@ -1,3 +1,4 @@
1
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
1
2
  import { SimpleSchedulerModalTexts, ContainerProps } from './constants';
2
3
  export type WithButtonSwitcherSchedulerContainerProps = ContainerProps & {
3
4
  showAdvancedScheduler: boolean;
@@ -5,5 +6,7 @@ export type WithButtonSwitcherSchedulerContainerProps = ContainerProps & {
5
6
  advancedSchedulerToggleButtonText: string;
6
7
  simpleSchedulerModalTexts: SimpleSchedulerModalTexts;
7
8
  onUseAdvancedScheduler: () => void;
9
+ advancedSchedulerSwitcherIcon: IconLookup;
10
+ simpleSchedulerSwitcherIcon: IconLookup;
8
11
  };
9
- export declare function WithButtonSwitcherSchedulerContainer({ showAdvancedScheduler, onUpdateSchedule, isDisabled, validationTexts, initialSchedule, schedulerKey, validateArrayOfRangedNumbersOrAll, simpleSchedulerToggleButtonText, advancedSchedulerToggleButtonText, simpleSchedulerModalTexts, advancedSchedulerInfoTexts, labelTexts, frequencyOptions, daysOfWeek, months, onUseSimpleScheduler, onUseAdvancedScheduler, }: WithButtonSwitcherSchedulerContainerProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare function WithButtonSwitcherSchedulerContainer({ showAdvancedScheduler, onUpdateSchedule, isDisabled, validationTexts, initialSchedule, schedulerKey, validateArrayOfRangedNumbersOrAll, simpleSchedulerToggleButtonText, advancedSchedulerToggleButtonText, simpleSchedulerModalTexts, advancedSchedulerInfoTexts, labelTexts, frequencyOptions, daysOfWeek, months, onUseSimpleScheduler, onUseAdvancedScheduler, advancedSchedulerSwitcherIcon, simpleSchedulerSwitcherIcon, }: WithButtonSwitcherSchedulerContainerProps): import("react/jsx-runtime").JSX.Element;
@@ -20,8 +20,11 @@ export function WithButtonSwitcherSchedulerContainer({
20
20
  daysOfWeek,
21
21
  months,
22
22
  onUseSimpleScheduler,
23
- onUseAdvancedScheduler
23
+ onUseAdvancedScheduler,
24
+ advancedSchedulerSwitcherIcon,
25
+ simpleSchedulerSwitcherIcon
24
26
  }) {
27
+ const switcherIcon = showAdvancedScheduler ? simpleSchedulerSwitcherIcon : advancedSchedulerSwitcherIcon;
25
28
  return /*#__PURE__*/_jsxs(_Fragment, {
26
29
  children: [showAdvancedScheduler ? /*#__PURE__*/_jsx(AdvancedScheduler, {
27
30
  onUpdateSchedule: onUpdateSchedule,
@@ -47,7 +50,8 @@ export function WithButtonSwitcherSchedulerContainer({
47
50
  simpleSchedulerModalTexts: simpleSchedulerModalTexts,
48
51
  simpleSchedulerToggleButtonText: simpleSchedulerToggleButtonText,
49
52
  onUseSimpleScheduler: onUseSimpleScheduler,
50
- isDisabled: isDisabled
53
+ isDisabled: isDisabled,
54
+ icon: switcherIcon
51
55
  })]
52
56
  });
53
57
  }
@@ -1,5 +1,5 @@
1
1
  import React, { useState, useCallback } from 'react';
2
- import { faSquareExclamation } from '@fortawesome/pro-solid-svg-icons/faSquareExclamation';
2
+ import { faCircleXmark } from '@fortawesome/free-solid-svg-icons/faCircleXmark';
3
3
  import { Input, INPUT_SIZES } from '../input';
4
4
  import { useFocusWithin } from '../hooks/use-focus-within';
5
5
  import { getValidityMessages, VALIDATION_RULE_TYPES, useDefaultValidationValues } from '../form-field';
@@ -21,7 +21,7 @@ export function SidebarMenuItemEditForm({
21
21
  type: validity?.type,
22
22
  value: hasError
23
23
  },
24
- rightIcon: hasError ? faSquareExclamation : null
24
+ rightIcon: hasError ? faCircleXmark : null
25
25
  };
26
26
  const validationValues = useDefaultValidationValues();
27
27
  const validityMessages = getValidityMessages({
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import classNames from 'classnames';
3
- import { faExclamationSquare } from '@fortawesome/pro-solid-svg-icons/faExclamationSquare';
3
+ import { faCircleXmark } from '@fortawesome/free-solid-svg-icons/faCircleXmark';
4
4
  import { FontAwesomeIcon } from '../font-awesome-icon';
5
5
  import { getTabIndex } from '../hooks/use-non-native-button-attrs';
6
6
  import { useTranslation } from '../hooks/use-translation';
@@ -31,7 +31,7 @@ export function SidebarMenuLink({
31
31
  "test-id": testId,
32
32
  tabIndex: getTabIndex(isDisabled),
33
33
  children: [children, hasErrors() ? /*#__PURE__*/_jsx(FontAwesomeIcon, {
34
- icon: faExclamationSquare,
34
+ icon: faCircleXmark,
35
35
  className: "sidebar-menu-link-error-icon",
36
36
  "aria-label": sectionErrorAriaLabel ?? t('Section has errors'),
37
37
  "aria-hidden": "false"
@@ -1,5 +1,5 @@
1
1
  import React, { useContext } from 'react';
2
- import { faChevronRight } from '@fortawesome/pro-solid-svg-icons/faChevronRight';
2
+ import { faChevronRight } from '@fortawesome/free-solid-svg-icons/faChevronRight';
3
3
  import classnames from 'classnames';
4
4
  import { ACCENT_TYPES, Button } from '../../../button';
5
5
  import { FontAwesomeIcon } from '../../../font-awesome-icon';
@@ -1,17 +1,31 @@
1
+ /* eslint-disable no-console */
1
2
  import React from 'react';
2
3
  import { renderToStaticMarkup } from 'react-dom/server';
3
4
  import TabularDataTooltip from './tabular-data-tooltip';
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
+ const errorMessage = 'Warning: useLayoutEffect does nothing on the server';
5
7
  export default function StaticTabularDataTooltip(title, rows, {
6
8
  testId,
7
9
  className,
8
10
  footer
9
11
  } = {}) {
10
- return renderToStaticMarkup(/*#__PURE__*/_jsx(TabularDataTooltip, {
12
+ const consoleError = console.error;
13
+ // This is done to suppress React warnings about useLayoutEffect. It is
14
+ // considered safe here because function is synchronous, and we restore the
15
+ // original function immediately after render.
16
+ console.error = (error, ...args) => {
17
+ if (error && error.includes(errorMessage)) {
18
+ return;
19
+ }
20
+ return consoleError(error, ...args);
21
+ };
22
+ const view = renderToStaticMarkup(/*#__PURE__*/_jsx(TabularDataTooltip, {
11
23
  title: title,
12
24
  rows: rows,
13
25
  testId: testId,
14
26
  footer: footer,
15
27
  className: className
16
28
  }));
29
+ console.error = consoleError;
30
+ return view;
17
31
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import classNames from 'classnames';
3
- import { faChevronRight } from '@fortawesome/pro-regular-svg-icons/faChevronRight';
4
- import { faChevronLeft } from '@fortawesome/pro-regular-svg-icons/faChevronLeft';
3
+ import { faChevronRight } from '@fortawesome/free-solid-svg-icons/faChevronRight';
4
+ import { faChevronLeft } from '@fortawesome/free-solid-svg-icons/faChevronLeft';
5
5
  import { Button, ACCENT_TYPES } from '../../../button';
6
6
  import { useTranslation } from '../../../hooks/use-translation';
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
- import { faChevronRight } from '@fortawesome/pro-regular-svg-icons/faChevronRight';
3
- import { faChevronLeft } from '@fortawesome/pro-regular-svg-icons/faChevronLeft';
4
- import { faCheck } from '@fortawesome/pro-regular-svg-icons/faCheck';
2
+ import { faChevronRight } from '@fortawesome/free-solid-svg-icons/faChevronRight';
3
+ import { faChevronLeft } from '@fortawesome/free-solid-svg-icons/faChevronLeft';
4
+ import { faCheck } from '@fortawesome/free-solid-svg-icons/faCheck';
5
5
  import { Button, ACCENT_TYPES } from '../../button';
6
6
  import { useTranslation } from '../../hooks/use-translation';
7
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,4 +1,5 @@
1
1
  import { MouseEvent } from 'react';
2
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
2
3
  import './zoom-controls.less';
3
4
  export type ZoomControlsProps = {
4
5
  currentZoom: number;
@@ -13,9 +14,12 @@ export type ZoomControlsProps = {
13
14
  zoomInText?: string;
14
15
  zoomOutText?: string;
15
16
  resetText?: string;
17
+ zoomInIcon?: IconLookup;
18
+ zoomOutIcon?: IconLookup;
19
+ resetIcon?: IconLookup;
16
20
  };
17
21
  /** Zoom is used on graphs if you need to increase or decrease data visualization
18
22
  * @midnight-gray-supported
19
23
  * @alpine-light-supported
20
24
  * */
21
- export default function ZoomControls({ currentZoom, onZoomIn, onZoomOut, onZoomReset, className, minZoomFactor, maxZoomFactor, testId, hidden, zoomInText, zoomOutText, resetText, }: ZoomControlsProps): import("react/jsx-runtime").JSX.Element | null;
25
+ export default function ZoomControls({ currentZoom, onZoomIn, onZoomOut, onZoomReset, className, minZoomFactor, maxZoomFactor, testId, hidden, zoomInText, zoomOutText, resetText, zoomInIcon, zoomOutIcon, resetIcon, }: ZoomControlsProps): import("react/jsx-runtime").JSX.Element | null;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { faMagnifyingGlassPlus } from '@fortawesome/free-solid-svg-icons/faMagnifyingGlassPlus';
3
3
  import { faMagnifyingGlassMinus } from '@fortawesome/free-solid-svg-icons/faMagnifyingGlassMinus';
4
- import { faMagnifyingGlassArrowsRotate } from '@fortawesome/pro-solid-svg-icons/faMagnifyingGlassArrowsRotate';
4
+ import { faArrowsRotate } from '@fortawesome/free-solid-svg-icons/faArrowsRotate';
5
5
  import { FontAwesomeIcon } from '../font-awesome-icon';
6
6
  import { Button, BUTTON_TYPES, ACCENT_TYPES } from '../button';
7
7
  import { useTranslation } from '../hooks/use-translation';
@@ -24,7 +24,10 @@ export default function ZoomControls({
24
24
  hidden = false,
25
25
  zoomInText,
26
26
  zoomOutText,
27
- resetText
27
+ resetText,
28
+ zoomInIcon = faMagnifyingGlassPlus,
29
+ zoomOutIcon = faMagnifyingGlassMinus,
30
+ resetIcon = faArrowsRotate
28
31
  }) {
29
32
  const {
30
33
  t
@@ -49,7 +52,7 @@ export default function ZoomControls({
49
52
  "aria-label": zoomInTextWithDefault,
50
53
  tooltipPlacement: TOOLTIP_PLACEMENT_TYPES.TOP,
51
54
  children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
52
- icon: faMagnifyingGlassPlus
55
+ icon: zoomInIcon
53
56
  })
54
57
  }), /*#__PURE__*/_jsx(Button, {
55
58
  className: "button command zoom-item",
@@ -62,7 +65,7 @@ export default function ZoomControls({
62
65
  "aria-label": zoomOutTextWithDefault,
63
66
  tooltipPlacement: TOOLTIP_PLACEMENT_TYPES.TOP,
64
67
  children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
65
- icon: faMagnifyingGlassMinus
68
+ icon: zoomOutIcon
66
69
  })
67
70
  }), /*#__PURE__*/_jsx(Button, {
68
71
  className: "button command zoom-item",
@@ -75,7 +78,7 @@ export default function ZoomControls({
75
78
  "aria-label": resetTextWithDefault,
76
79
  tooltipPlacement: TOOLTIP_PLACEMENT_TYPES.TOP,
77
80
  children: /*#__PURE__*/_jsx(FontAwesomeIcon, {
78
- icon: faMagnifyingGlassArrowsRotate
81
+ icon: resetIcon
79
82
  })
80
83
  })]
81
84
  });