@datarobot/design-system 28.11.0 → 29.1.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 (77) 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/tour/advanced-tour/components/advanced-tour-footer.js +2 -2
  31. package/cjs/tour/components/tour-footer.js +3 -3
  32. package/cjs/typeahead/typeahead.d.ts +6 -1
  33. package/cjs/typeahead/typeahead.js +3 -2
  34. package/cjs/zoom-controls/zoom-controls.d.ts +5 -1
  35. package/cjs/zoom-controls/zoom-controls.js +8 -5
  36. package/esm/alert/alert.js +1 -1
  37. package/esm/closable-tabs/closable-tabs.js +1 -1
  38. package/esm/datetime-range-picker/datetime-range-picker-button.js +1 -1
  39. package/esm/datetime-range-picker/datetime-range-picker-input.js +1 -1
  40. package/esm/export-button/export-button.d.ts +3 -1
  41. package/esm/export-button/export-button.js +4 -3
  42. package/esm/floating-panel/floating-panel-dock-button.js +1 -1
  43. package/esm/floating-panel/floating-panel-drag-handle.d.ts +3 -3
  44. package/esm/floating-panel/floating-panel-drag-handle.js +3 -4
  45. package/esm/floating-panel/floating-panel-header.d.ts +2 -0
  46. package/esm/floating-panel/floating-panel-header.js +5 -2
  47. package/esm/floating-panel/floating-panel.d.ts +6 -1
  48. package/esm/floating-panel/floating-panel.js +4 -1
  49. package/esm/inline-edit/inline-edit.js +2 -2
  50. package/esm/message/index.d.ts +2 -2
  51. package/esm/message/index.js +2 -2
  52. package/esm/message/message.d.ts +17 -1
  53. package/esm/message/message.js +26 -15
  54. package/esm/notification-popup/notification-popup.js +1 -1
  55. package/esm/pagination-new/pagination-new.js +2 -2
  56. package/esm/scheduler/button-switcher.d.ts +3 -1
  57. package/esm/scheduler/button-switcher.js +4 -5
  58. package/esm/scheduler/scheduler.d.ts +4 -1
  59. package/esm/scheduler/scheduler.js +8 -2
  60. package/esm/scheduler/with-button-switcher-scheduler-container.d.ts +4 -1
  61. package/esm/scheduler/with-button-switcher-scheduler-container.js +6 -2
  62. package/esm/sidebar-menu/sidebar-menu-item-edit-form.js +2 -2
  63. package/esm/sidebar-menu/sidebar-menu-link.js +2 -2
  64. package/esm/table-react/components/custom-cells/row-expand-cell.js +1 -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/typeahead/typeahead.d.ts +6 -1
  68. package/esm/typeahead/typeahead.js +3 -2
  69. package/esm/zoom-controls/zoom-controls.d.ts +5 -1
  70. package/esm/zoom-controls/zoom-controls.js +8 -5
  71. package/js/bundle/bundle.js +255 -340
  72. package/js/bundle/bundle.min.js +1 -1
  73. package/js/bundle/index.d.ts +37 -7
  74. package/js/midnight-gray/midnight-gray.min.js +1 -1
  75. package/package.json +1 -3
  76. package/styles/index.css +2 -2
  77. package/styles/index.min.css +1 -1
@@ -5,9 +5,9 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.TourFooter = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
- var _faChevronRight = require("@fortawesome/pro-regular-svg-icons/faChevronRight");
9
- var _faChevronLeft = require("@fortawesome/pro-regular-svg-icons/faChevronLeft");
10
- var _faCheck = require("@fortawesome/pro-regular-svg-icons/faCheck");
8
+ var _faChevronRight = require("@fortawesome/free-solid-svg-icons/faChevronRight");
9
+ var _faChevronLeft = require("@fortawesome/free-solid-svg-icons/faChevronLeft");
10
+ var _faCheck = require("@fortawesome/free-solid-svg-icons/faCheck");
11
11
  var _button = require("../../button");
12
12
  var _useTranslation = require("../../hooks/use-translation");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
@@ -76,11 +76,16 @@ export type TypeaheadProps = {
76
76
  optionalLabelText?: string;
77
77
  autoFocus?: boolean;
78
78
  noItemsText?: string;
79
+ /**
80
+ * By default, on select won't be invoked if the label of selected option is the same as defaultValue
81
+ * but there are cases when we do want to call it anyway. In that cases this prop should be set to true
82
+ */
83
+ shouldCallOnSelectWithOldValue?: boolean;
79
84
  };
80
85
  /** Searchable select
81
86
  * [CAPITALIZATION] Use sentence case for options, label, and input text. Do not end with ellipses (...).
82
87
  * @midnight-gray-supported
83
88
  * @alpine-light-supported
84
89
  */
85
- declare function Typeahead({ defaultValue, onSearch, optionComponent, OptionList, onBlur, onKeyDown, onClear, onSelect, onDelete, searchFields, placement, options, items, optionId, optionLabel, isMultiSelect, focused, isTouched, forceShowAllOnFocus, showAllOnFocus, isDisabled, disabledInfo, isRequired, isOptional, isClearable, optionalLabelText, handleFocus, placeholder, containerRef, inputRef: inputRefProp, helperTextPosition, testId, id, label, labelTestId, ariaLabel, validity, validationTestId, asyncValidation, labelIcon, labelIconTooltipText, labelIconTestId, dropdownContentClass, wrapperClass, fieldClass, helperText, autoComplete, keepInvalidText, formatSearchValue, className, autoFocus, noItemsText, }: TypeaheadProps): import("react/jsx-runtime").JSX.Element;
90
+ declare function Typeahead({ defaultValue, onSearch, optionComponent, OptionList, onBlur, onKeyDown, onClear, onSelect, onDelete, searchFields, placement, options, items, optionId, optionLabel, isMultiSelect, focused, isTouched, forceShowAllOnFocus, showAllOnFocus, isDisabled, disabledInfo, isRequired, isOptional, isClearable, optionalLabelText, handleFocus, placeholder, containerRef, inputRef: inputRefProp, helperTextPosition, testId, id, label, labelTestId, ariaLabel, validity, validationTestId, asyncValidation, labelIcon, labelIconTooltipText, labelIconTestId, dropdownContentClass, wrapperClass, fieldClass, helperText, autoComplete, keepInvalidText, formatSearchValue, className, autoFocus, noItemsText, shouldCallOnSelectWithOldValue, }: TypeaheadProps): import("react/jsx-runtime").JSX.Element;
86
91
  export default Typeahead;
@@ -80,7 +80,8 @@ function Typeahead({
80
80
  formatSearchValue,
81
81
  className,
82
82
  autoFocus = false,
83
- noItemsText
83
+ noItemsText,
84
+ shouldCallOnSelectWithOldValue = false
84
85
  }) {
85
86
  const {
86
87
  t
@@ -125,7 +126,7 @@ function Typeahead({
125
126
  }
126
127
  if (isMultiSelect) {
127
128
  onSelect(option);
128
- } else if (String(option?.[optionLabel]) !== defaultValue) {
129
+ } else if (String(option?.[optionLabel]) !== defaultValue || shouldCallOnSelectWithOldValue) {
129
130
  onSelect(option);
130
131
  }
131
132
  setIsTouched(true);
@@ -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;
@@ -7,7 +7,7 @@ exports.default = ZoomControls;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _faMagnifyingGlassPlus = require("@fortawesome/free-solid-svg-icons/faMagnifyingGlassPlus");
9
9
  var _faMagnifyingGlassMinus = require("@fortawesome/free-solid-svg-icons/faMagnifyingGlassMinus");
10
- var _faMagnifyingGlassArrowsRotate = require("@fortawesome/pro-solid-svg-icons/faMagnifyingGlassArrowsRotate");
10
+ var _faArrowsRotate = require("@fortawesome/free-solid-svg-icons/faArrowsRotate");
11
11
  var _fontAwesomeIcon = require("../font-awesome-icon");
12
12
  var _button = require("../button");
13
13
  var _useTranslation = require("../hooks/use-translation");
@@ -31,7 +31,10 @@ function ZoomControls({
31
31
  hidden = false,
32
32
  zoomInText,
33
33
  zoomOutText,
34
- resetText
34
+ resetText,
35
+ zoomInIcon = _faMagnifyingGlassPlus.faMagnifyingGlassPlus,
36
+ zoomOutIcon = _faMagnifyingGlassMinus.faMagnifyingGlassMinus,
37
+ resetIcon = _faArrowsRotate.faArrowsRotate
35
38
  }) {
36
39
  const {
37
40
  t
@@ -56,7 +59,7 @@ function ZoomControls({
56
59
  "aria-label": zoomInTextWithDefault,
57
60
  tooltipPlacement: _tooltip.TOOLTIP_PLACEMENT_TYPES.TOP,
58
61
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fontAwesomeIcon.FontAwesomeIcon, {
59
- icon: _faMagnifyingGlassPlus.faMagnifyingGlassPlus
62
+ icon: zoomInIcon
60
63
  })
61
64
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
62
65
  className: "button command zoom-item",
@@ -69,7 +72,7 @@ function ZoomControls({
69
72
  "aria-label": zoomOutTextWithDefault,
70
73
  tooltipPlacement: _tooltip.TOOLTIP_PLACEMENT_TYPES.TOP,
71
74
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fontAwesomeIcon.FontAwesomeIcon, {
72
- icon: _faMagnifyingGlassMinus.faMagnifyingGlassMinus
75
+ icon: zoomOutIcon
73
76
  })
74
77
  }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
75
78
  className: "button command zoom-item",
@@ -82,7 +85,7 @@ function ZoomControls({
82
85
  "aria-label": resetTextWithDefault,
83
86
  tooltipPlacement: _tooltip.TOOLTIP_PLACEMENT_TYPES.TOP,
84
87
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_fontAwesomeIcon.FontAwesomeIcon, {
85
- icon: _faMagnifyingGlassArrowsRotate.faMagnifyingGlassArrowsRotate
88
+ icon: resetIcon
86
89
  })
87
90
  })]
88
91
  });
@@ -2,7 +2,7 @@ import React, { cloneElement, useState } from 'react';
2
2
  import cls from 'classnames';
3
3
  import { faCircleCheck } from '@fortawesome/free-solid-svg-icons/faCircleCheck';
4
4
  import { faCircleInfo } from '@fortawesome/free-solid-svg-icons/faCircleInfo';
5
- import { faCircleXmark } from '@fortawesome/pro-solid-svg-icons/faCircleXmark';
5
+ import { faCircleXmark } from '@fortawesome/free-solid-svg-icons/faCircleXmark';
6
6
  import { faCircleExclamation } from '@fortawesome/free-solid-svg-icons/faCircleExclamation';
7
7
  import { faBolt } from '@fortawesome/free-solid-svg-icons/faBolt';
8
8
  import { faEye } from '@fortawesome/free-solid-svg-icons/faEye';
@@ -2,7 +2,7 @@ import React, { useState, useCallback } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { DndProvider } from 'react-dnd';
4
4
  import { HTML5Backend } from 'react-dnd-html5-backend';
5
- import { faPlus } from '@fortawesome/pro-solid-svg-icons/faPlus';
5
+ import { faPlus } from '@fortawesome/free-solid-svg-icons/faPlus';
6
6
  import { ClosableTab } from './closable-tab';
7
7
  import { useTranslation } from '../hooks/use-translation';
8
8
  import { Button, ACCENT_TYPES, BUTTON_SIZES, BUTTON_TOOLTIP_PLACEMENT_TYPES } from '../button';
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef } from 'react';
2
- import { faArrowRight } from '@fortawesome/pro-solid-svg-icons/faArrowRight';
2
+ import { faArrowRight } from '@fortawesome/free-solid-svg-icons/faArrowRight';
3
3
  import { FontAwesomeIcon } from '../font-awesome-icon';
4
4
  import DropdownMenuTrigger from '../dropdown-menu/dropdown-menu-trigger';
5
5
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import React, { forwardRef, useCallback } from 'react';
2
- import { faArrowRight } from '@fortawesome/pro-solid-svg-icons/faArrowRight';
2
+ import { faArrowRight } from '@fortawesome/free-solid-svg-icons/faArrowRight';
3
3
  import { faCalendar } from '@fortawesome/free-regular-svg-icons/faCalendar';
4
4
  import { FontAwesomeIcon } from '../font-awesome-icon';
5
5
  import { Input } from '../input';
@@ -1,8 +1,10 @@
1
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
1
2
  import { ButtonProps } from '../button';
2
3
  type ExportButtonProps = ButtonProps & {
3
4
  onExport: () => void;
4
5
  exportText?: string;
6
+ icon?: IconLookup;
5
7
  };
6
8
  /** An export action indicator. */
7
- export declare const ExportButton: ({ onExport, isDisabled, testId, tooltipText, exportText, tooltipDocsLink, tooltipPlacement, }: ExportButtonProps) => import("react/jsx-runtime").JSX.Element;
9
+ export declare const ExportButton: ({ onExport, isDisabled, testId, tooltipText, exportText, tooltipDocsLink, tooltipPlacement, icon, }: ExportButtonProps) => import("react/jsx-runtime").JSX.Element;
8
10
  export {};
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { faArrowFromBottom } from '@fortawesome/pro-solid-svg-icons/faArrowFromBottom';
2
+ import { faArrowUpFromBracket } from '@fortawesome/free-solid-svg-icons/faArrowUpFromBracket';
3
3
  import { Button, ACCENT_TYPES } from '../button';
4
4
  import { useTranslation } from '../hooks/use-translation';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -11,7 +11,8 @@ export const ExportButton = ({
11
11
  tooltipText,
12
12
  exportText,
13
13
  tooltipDocsLink = null,
14
- tooltipPlacement
14
+ tooltipPlacement,
15
+ icon = faArrowUpFromBracket
15
16
  }) => {
16
17
  const {
17
18
  t
@@ -22,7 +23,7 @@ export const ExportButton = ({
22
23
  onClick: onExport,
23
24
  isDisabled: isDisabled,
24
25
  className: "graph-export-button",
25
- leftIcon: faArrowFromBottom,
26
+ leftIcon: icon,
26
27
  testId: testId,
27
28
  "aria-label": exportText || t('Export'),
28
29
  tooltipText: tooltipText ?? t('Download information related to this visualization'),
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { faThumbtackSlash } from '@fortawesome/pro-solid-svg-icons/faThumbtackSlash';
2
+ import { faThumbtackSlash } from '@fortawesome/free-solid-svg-icons/faThumbtackSlash';
3
3
  import { faThumbtack } from '@fortawesome/free-solid-svg-icons/faThumbtack';
4
4
  import { Button, ACCENT_TYPES } from '../button';
5
5
  import { useTranslation } from '../hooks';
@@ -1,5 +1,5 @@
1
- import React from 'react';
1
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
2
2
  export type FloatingPanelDragHandleProps = {
3
- children?: React.ReactNode;
3
+ dragIcon: IconLookup;
4
4
  };
5
- export declare function FloatingPanelDragHandle({ children, }: FloatingPanelDragHandleProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function FloatingPanelDragHandle({ dragIcon, }: FloatingPanelDragHandleProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,14 @@
1
1
  import React, { useContext } from 'react';
2
- import { faGripDotsVertical } from '@fortawesome/pro-solid-svg-icons/faGripDotsVertical';
3
2
  import { FontAwesomeIcon } from '../font-awesome-icon';
4
3
  import { useTranslation } from '../hooks';
5
4
  import { FloatingPanelContext } from './constants';
6
5
  import { DraggableArea } from './draggable-area';
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
8
7
  export function FloatingPanelDragHandle({
9
- children
8
+ dragIcon
10
9
  }) {
11
- const content = children || /*#__PURE__*/_jsx(FontAwesomeIcon, {
12
- icon: faGripDotsVertical
10
+ const content = /*#__PURE__*/_jsx(FontAwesomeIcon, {
11
+ icon: dragIcon
13
12
  });
14
13
  const {
15
14
  t
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
2
3
  import type { PanelState } from './types';
3
4
  type FloatingPanelHeaderProps = {
4
5
  onClose: (State: PanelState) => void;
@@ -6,6 +7,7 @@ type FloatingPanelHeaderProps = {
6
7
  setIsDocked: (docked: boolean) => void;
7
8
  actions?: React.ReactNode;
8
9
  getPosition: () => PanelState;
10
+ dragIcon: IconLookup;
9
11
  };
10
12
  export declare const FloatingPanelHeader: React.ForwardRefExoticComponent<FloatingPanelHeaderProps & React.RefAttributes<HTMLElement>>;
11
13
  export {};
@@ -11,7 +11,8 @@ export const FloatingPanelHeader = /*#__PURE__*/forwardRef(({
11
11
  onClose,
12
12
  isDocked,
13
13
  setIsDocked,
14
- getPosition
14
+ getPosition,
15
+ dragIcon
15
16
  }, ref) => {
16
17
  const {
17
18
  t
@@ -19,7 +20,9 @@ export const FloatingPanelHeader = /*#__PURE__*/forwardRef(({
19
20
  return /*#__PURE__*/_jsxs("header", {
20
21
  ref: ref,
21
22
  className: "floating-panel-header",
22
- children: [/*#__PURE__*/_jsx(FloatingPanelDragHandle, {}), /*#__PURE__*/_jsxs("div", {
23
+ children: [/*#__PURE__*/_jsx(FloatingPanelDragHandle, {
24
+ dragIcon: dragIcon
25
+ }), /*#__PURE__*/_jsxs("div", {
23
26
  className: "actions",
24
27
  children: [actions, /*#__PURE__*/_jsx(FloatingPanelDockButton, {
25
28
  isDocked: isDocked,
@@ -1,5 +1,6 @@
1
1
  import React, { Dispatch, SetStateAction } from 'react';
2
2
  import { Modifier, Placement } from '@popperjs/core';
3
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
3
4
  import './floating-panel.less';
4
5
  import type { ElementReference, PanelState } from './types';
5
6
  export type FloatingPanelProps = {
@@ -56,6 +57,10 @@ export type FloatingPanelProps = {
56
57
  * Aria label for the floating panel
57
58
  */
58
59
  ariaLabel?: string;
60
+ /**
61
+ * Font awesome component for the drag handle
62
+ */
63
+ dragIcon?: IconLookup;
59
64
  };
60
65
  /**
61
66
  * Floating panel
@@ -63,4 +68,4 @@ export type FloatingPanelProps = {
63
68
  * @uxr-only-supported
64
69
  * @alpine-light-supported
65
70
  */
66
- export declare function FloatingPanel({ children, minHeight, minWidth, maxWidth, maxHeight, anchorEl, dockEl, pageContentEl, initialState, testId, placement, popperModifiers, onClose, actions, ...props }: FloatingPanelProps): import("react/jsx-runtime").JSX.Element;
71
+ export declare function FloatingPanel({ children, minHeight, minWidth, maxWidth, maxHeight, anchorEl, dockEl, pageContentEl, initialState, testId, placement, popperModifiers, onClose, actions, dragIcon, ...props }: FloatingPanelProps): import("react/jsx-runtime").JSX.Element;
@@ -2,6 +2,7 @@ import ReactDOM from 'react-dom';
2
2
  import React, { useLayoutEffect, useRef } from 'react';
3
3
  import classnames from 'classnames';
4
4
  import { createPopper } from '@popperjs/core';
5
+ import { faGripVertical } from '@fortawesome/free-solid-svg-icons/faGripVertical';
5
6
  import { OFFSET_MODIFIER } from '../react-popper';
6
7
  import { useTranslation } from '../hooks';
7
8
  import { FloatingPanelContext, resizeHandles, getHtmlElement } from './constants';
@@ -32,6 +33,7 @@ export function FloatingPanel({
32
33
  popperModifiers = [OFFSET_MODIFIER],
33
34
  onClose = noop,
34
35
  actions,
36
+ dragIcon = faGripVertical,
35
37
  ...props
36
38
  }) {
37
39
  const containerElement = getHtmlElement(dockEl) || document.getElementById('floating-panel-root') || document.body;
@@ -115,7 +117,8 @@ export function FloatingPanel({
115
117
  getPosition: getPosition,
116
118
  isDocked: isDocked,
117
119
  setIsDocked: setIsDocked,
118
- actions: actions
120
+ actions: actions,
121
+ dragIcon: dragIcon
119
122
  }), /*#__PURE__*/_jsx("div", {
120
123
  id: "floating-panel-content",
121
124
  className: "floating-panel-content",
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useMemo, useRef, useLayoutEffect } from 're
2
2
  import cls from 'classnames';
3
3
  import uniqueId from 'lodash-es/uniqueId';
4
4
  import { faPen } from '@fortawesome/free-solid-svg-icons/faPen';
5
- import { faSquareExclamation } from '@fortawesome/pro-solid-svg-icons/faSquareExclamation';
5
+ import { faCircleXmark } from '@fortawesome/free-solid-svg-icons/faCircleXmark';
6
6
  import { faCircleNotch } from '@fortawesome/free-solid-svg-icons/faCircleNotch';
7
7
  import { FontAwesomeIcon } from '../font-awesome-icon';
8
8
  import { Input } from '../input';
@@ -146,7 +146,7 @@ export default function InlineEdit({
146
146
  shouldDisplayControls: true,
147
147
  onSubmit: onFormSubmit,
148
148
  onCancel: handleCancel,
149
- rightIcon: hasError ? faSquareExclamation : null,
149
+ rightIcon: hasError ? faCircleXmark : null,
150
150
  iconTooltipText: isMultiline ? textareaProps.validity?.value?.toString() : inputProps.validity?.value?.toString(),
151
151
  submitAriaLabel,
152
152
  cancelAriaLabel
@@ -1,3 +1,3 @@
1
- import { Message, MESSAGE_TYPES, MESSAGE_SIZES, MESSAGE_ICON_PLACEMENT } from './message';
1
+ import { Message, MESSAGE_TYPES, MESSAGE_SIZES, MESSAGE_ICON_PLACEMENT, MESSAGE_ICONS } from './message';
2
2
  export type { MessageProps, MessageTypes, MessageSize, MessageIconPlacementTypes, } from './message';
3
- export { Message, MESSAGE_TYPES, MESSAGE_SIZES, MESSAGE_ICON_PLACEMENT };
3
+ export { Message, MESSAGE_TYPES, MESSAGE_SIZES, MESSAGE_ICON_PLACEMENT, MESSAGE_ICONS, };
@@ -1,2 +1,2 @@
1
- import { Message, MESSAGE_TYPES, MESSAGE_SIZES, MESSAGE_ICON_PLACEMENT } from './message';
2
- export { Message, MESSAGE_TYPES, MESSAGE_SIZES, MESSAGE_ICON_PLACEMENT };
1
+ import { Message, MESSAGE_TYPES, MESSAGE_SIZES, MESSAGE_ICON_PLACEMENT, MESSAGE_ICONS } from './message';
2
+ export { Message, MESSAGE_TYPES, MESSAGE_SIZES, MESSAGE_ICON_PLACEMENT, MESSAGE_ICONS };
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
2
3
  import './message.less';
3
4
  import { ValueOf } from '../types';
4
5
  export declare const MESSAGE_TYPES: {
@@ -22,6 +23,19 @@ export declare const MESSAGE_SIZES: {
22
23
  export type MessageTypes = ValueOf<typeof MESSAGE_TYPES>;
23
24
  export type MessageSize = ValueOf<typeof MESSAGE_SIZES>;
24
25
  export type MessageIconPlacementTypes = ValueOf<typeof MESSAGE_ICON_PLACEMENT>;
26
+ export declare const MESSAGE_ICONS: {
27
+ disabled: import("@fortawesome/fontawesome-common-types").IconDefinition;
28
+ info: import("@fortawesome/fontawesome-common-types").IconDefinition;
29
+ "success-info": import("@fortawesome/fontawesome-common-types").IconDefinition;
30
+ warning: import("@fortawesome/fontawesome-common-types").IconDefinition;
31
+ error: import("@fortawesome/fontawesome-common-types").IconDefinition;
32
+ success: import("@fortawesome/fontawesome-common-types").IconDefinition;
33
+ "in-progress": import("@fortawesome/fontawesome-common-types").IconDefinition;
34
+ expired: import("@fortawesome/fontawesome-common-types").IconDefinition;
35
+ };
36
+ type Icons = {
37
+ [key: string]: IconLookup;
38
+ };
25
39
  export type MessageProps = {
26
40
  children: ReactNode;
27
41
  className?: string;
@@ -33,10 +47,12 @@ export type MessageProps = {
33
47
  size?: MessageSize;
34
48
  id?: string;
35
49
  iconPlacement?: string;
50
+ icons?: Icons;
36
51
  };
37
52
  /** Simple component to show a message with an appropriate icon
38
53
  * [CAPITALIZATION] Sentence case, full sentence, end in period
39
54
  * @midnight-gray-supported
40
55
  * @alpine-light-supported
41
56
  */
42
- export declare function Message({ children, className, testId, type, isCentered, isStatus, size, id, iconPlacement, }: MessageProps): import("react/jsx-runtime").JSX.Element;
57
+ export declare function Message({ children, className, testId, type, isCentered, isStatus, size, id, iconPlacement, icons, }: MessageProps): import("react/jsx-runtime").JSX.Element;
58
+ export {};
@@ -3,10 +3,9 @@ import classNames from 'classnames';
3
3
  import { faBan } from '@fortawesome/free-solid-svg-icons/faBan';
4
4
  import { faCircleInfo } from '@fortawesome/free-solid-svg-icons/faCircleInfo';
5
5
  import { faCircleExclamation } from '@fortawesome/free-solid-svg-icons/faCircleExclamation';
6
- import { faCircleXmark } from '@fortawesome/pro-solid-svg-icons/faCircleXmark';
6
+ import { faCircleXmark } from '@fortawesome/free-solid-svg-icons/faCircleXmark';
7
7
  import { faCircleCheck } from '@fortawesome/free-solid-svg-icons/faCircleCheck';
8
8
  import { faCircleNotch } from '@fortawesome/free-solid-svg-icons/faCircleNotch';
9
- import { faCircleExclamationCheck } from '@fortawesome/pro-solid-svg-icons/faCircleExclamationCheck';
10
9
  import { FontAwesomeIcon } from '../font-awesome-icon';
11
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
11
  export const MESSAGE_TYPES = {
@@ -27,52 +26,63 @@ export const MESSAGE_SIZES = {
27
26
  SM: 'sm',
28
27
  MD: 'md'
29
28
  };
30
- function getMessageConfig(type) {
29
+ export const MESSAGE_ICONS = {
30
+ [MESSAGE_TYPES.DISABLED]: faBan,
31
+ [MESSAGE_TYPES.INFO]: faCircleInfo,
32
+ [MESSAGE_TYPES.SUCCESS_INFO]: faCircleCheck,
33
+ [MESSAGE_TYPES.WARNING]: faCircleExclamation,
34
+ [MESSAGE_TYPES.ERROR]: faCircleXmark,
35
+ [MESSAGE_TYPES.SUCCESS]: faCircleCheck,
36
+ [MESSAGE_TYPES.IN_PROGRESS]: faCircleNotch,
37
+ [MESSAGE_TYPES.EXPIRED]: faCircleExclamation
38
+ };
39
+ function getMessageConfig(icons, type) {
40
+ const icon = type ? icons[type] : icons[MESSAGE_TYPES.INFO];
31
41
  switch (type) {
32
42
  case MESSAGE_TYPES.DISABLED:
33
43
  return {
34
- icon: faBan,
44
+ icon,
35
45
  className: 'disabled'
36
46
  };
37
47
  case MESSAGE_TYPES.INFO:
38
48
  return {
39
- icon: faCircleInfo,
49
+ icon,
40
50
  className: 'info'
41
51
  };
42
52
  case MESSAGE_TYPES.SUCCESS_INFO:
43
53
  return {
44
- icon: faCircleCheck,
54
+ icon,
45
55
  className: 'info'
46
56
  };
47
57
  case MESSAGE_TYPES.WARNING:
48
58
  return {
49
- icon: faCircleExclamation,
59
+ icon,
50
60
  className: 'warning'
51
61
  };
52
62
  case MESSAGE_TYPES.ERROR:
53
63
  return {
54
- icon: faCircleXmark,
64
+ icon,
55
65
  className: 'error',
56
66
  role: 'alert'
57
67
  };
58
68
  case MESSAGE_TYPES.SUCCESS:
59
69
  return {
60
- icon: faCircleCheck,
70
+ icon,
61
71
  className: 'success'
62
72
  };
63
73
  case MESSAGE_TYPES.IN_PROGRESS:
64
74
  return {
65
- icon: faCircleNotch,
75
+ icon,
66
76
  className: 'in-progress'
67
77
  };
68
78
  case MESSAGE_TYPES.EXPIRED:
69
79
  return {
70
- icon: faCircleExclamationCheck,
80
+ icon,
71
81
  className: 'expired'
72
82
  };
73
83
  default:
74
84
  return {
75
- icon: faCircleInfo,
85
+ icon,
76
86
  className: 'info'
77
87
  };
78
88
  }
@@ -86,14 +96,15 @@ export function Message({
86
96
  children,
87
97
  className,
88
98
  testId,
89
- type,
99
+ type = MESSAGE_TYPES.INFO,
90
100
  isCentered = false,
91
101
  isStatus = false,
92
102
  size = 'md',
93
103
  id,
94
- iconPlacement = MESSAGE_ICON_PLACEMENT.LEFT
104
+ iconPlacement = MESSAGE_ICON_PLACEMENT.LEFT,
105
+ icons = MESSAGE_ICONS
95
106
  }) {
96
- const messageConfig = getMessageConfig(type);
107
+ const messageConfig = getMessageConfig(icons, type);
97
108
  const icon = /*#__PURE__*/_jsx(FontAwesomeIcon, {
98
109
  icon: messageConfig.icon,
99
110
  spin: type === MESSAGE_TYPES.IN_PROGRESS
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
2
2
  import classnames from 'classnames';
3
3
  import { faCircleInfo } from '@fortawesome/free-solid-svg-icons/faCircleInfo';
4
4
  import { faCircleCheck } from '@fortawesome/free-solid-svg-icons/faCircleCheck';
5
- import { faCircleXmark } from '@fortawesome/pro-solid-svg-icons/faCircleXmark';
5
+ import { faCircleXmark } from '@fortawesome/free-solid-svg-icons/faCircleXmark';
6
6
  import { faCircleExclamation } from '@fortawesome/free-solid-svg-icons/faCircleExclamation';
7
7
  import { faXmark } from '@fortawesome/free-solid-svg-icons/faXmark';
8
8
  import { Button, ACCENT_TYPES } from '../button';
@@ -1,7 +1,7 @@
1
1
  import React, { memo, useMemo, useState, useEffect } from 'react';
2
2
  import uniqueId from 'lodash-es/uniqueId';
3
- import { faChevronLeft } from '@fortawesome/pro-solid-svg-icons/faChevronLeft';
4
- import { faChevronRight } from '@fortawesome/pro-solid-svg-icons/faChevronRight';
3
+ import { faChevronLeft } from '@fortawesome/free-solid-svg-icons/faChevronLeft';
4
+ import { faChevronRight } from '@fortawesome/free-solid-svg-icons/faChevronRight';
5
5
  import { PagesButtons } from './pages-buttons';
6
6
  import { ACCENT_TYPES, Button } from '../button';
7
7
  import { DropdownMenu } from '../dropdown-menu';
@@ -1,3 +1,4 @@
1
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
1
2
  import { SimpleSchedulerModalTexts } from './constants';
2
3
  export type ButtonSwitcherProps = {
3
4
  showAdvancedScheduler: boolean;
@@ -9,5 +10,6 @@ export type ButtonSwitcherProps = {
9
10
  isDisabled?: boolean;
10
11
  switchToSimpleTriggerId?: string;
11
12
  switchToAdvancedTriggerId?: string;
13
+ icon: IconLookup;
12
14
  };
13
- export declare function ButtonSwitcher({ showAdvancedScheduler, advancedSchedulerToggleButtonText, onUseAdvancedScheduler, simpleSchedulerModalTexts, simpleSchedulerToggleButtonText, onUseSimpleScheduler, isDisabled, switchToSimpleTriggerId, switchToAdvancedTriggerId, }: ButtonSwitcherProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function ButtonSwitcher({ showAdvancedScheduler, advancedSchedulerToggleButtonText, onUseAdvancedScheduler, simpleSchedulerModalTexts, simpleSchedulerToggleButtonText, onUseSimpleScheduler, isDisabled, switchToSimpleTriggerId, switchToAdvancedTriggerId, icon, }: ButtonSwitcherProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,4 @@
1
1
  import React, { useState } from 'react';
2
- import { faGear } from '@fortawesome/free-solid-svg-icons/faGear';
3
- import { faSlidersHSquare } from '@fortawesome/pro-solid-svg-icons/faSlidersHSquare';
4
2
  import { Button, ACCENT_TYPES } from '../button';
5
3
  import { Modal } from '../modal';
6
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -13,7 +11,8 @@ export function ButtonSwitcher({
13
11
  onUseSimpleScheduler,
14
12
  isDisabled = false,
15
13
  switchToSimpleTriggerId = 'switch-to-simple-scheduler-container',
16
- switchToAdvancedTriggerId = 'switch-to-advanced-scheduler-container'
14
+ switchToAdvancedTriggerId = 'switch-to-advanced-scheduler-container',
15
+ icon
17
16
  }) {
18
17
  const [showUseSimpleSchedulerAlert, setShowUseSimpleSchedulerAlert] = useState(false);
19
18
  if (showAdvancedScheduler) {
@@ -23,7 +22,7 @@ export function ButtonSwitcher({
23
22
  id: switchToSimpleTriggerId,
24
23
  className: "margin-top-2",
25
24
  accentType: ACCENT_TYPES.COMMAND,
26
- leftIcon: faSlidersHSquare,
25
+ leftIcon: icon,
27
26
  onClick: () => {
28
27
  setShowUseSimpleSchedulerAlert(true);
29
28
  },
@@ -57,7 +56,7 @@ export function ButtonSwitcher({
57
56
  id: switchToAdvancedTriggerId,
58
57
  className: "margin-top-2",
59
58
  accentType: ACCENT_TYPES.COMMAND,
60
- leftIcon: faGear,
59
+ leftIcon: icon,
61
60
  onClick: onUseAdvancedScheduler,
62
61
  testId: "use-advanced-scheduler-button",
63
62
  isDisabled: isDisabled,
@@ -1,3 +1,4 @@
1
+ import { IconLookup } from '@fortawesome/fontawesome-svg-core';
1
2
  import { Schedule, DateItem, Months, LabelTexts, ScheduleValidity, SWITCHER_TYPES, SimpleSchedulerModalTexts, AdvancedSchedulerInfoTexts, TabTexts } from './constants';
2
3
  import { ValueOf } from '../types';
3
4
  import './scheduler.less';
@@ -25,10 +26,12 @@ export type SchedulerProps = {
25
26
  switcherType?: ValueOf<typeof SWITCHER_TYPES>;
26
27
  selectedTabKey?: string;
27
28
  tabTexts?: TabTexts;
29
+ advancedSchedulerSwitcherIcon?: IconLookup;
30
+ simpleSchedulerSwitcherIcon?: IconLookup;
28
31
  };
29
32
  /**
30
33
  * Scheduler is form for cron jobs configuration
31
34
  * @midnight-gray-supported
32
35
  * @alpine-light-supported
33
36
  */
34
- export declare function Scheduler({ onUpdateSchedule, initialSchedule, testId, isDisabled, frequencyOptions: frequencyOptionsParams, daysOfWeek: daysOfWeekParams, months: monthsParams, validateArrayOfRangedNumbersOrAll: validateArrayOfRangedNumbersOrAllParams, simpleSchedulerToggleButtonText: simpleSchedulerToggleButtonTextParams, advancedSchedulerToggleButtonText: advancedSchedulerToggleButtonTextParams, simpleSchedulerModalTexts: simpleSchedulerModalTextsParams, labelTexts: labelTextsParams, advancedSchedulerInfoTexts: advancedSchedulerInfoTextsParams, validationTexts: validationTextsParams, switcherType, selectedTabKey, tabTexts: tabTextsParams, }: SchedulerProps): import("react/jsx-runtime").JSX.Element;
37
+ export declare function Scheduler({ onUpdateSchedule, initialSchedule, testId, isDisabled, frequencyOptions: frequencyOptionsParams, daysOfWeek: daysOfWeekParams, months: monthsParams, validateArrayOfRangedNumbersOrAll: validateArrayOfRangedNumbersOrAllParams, simpleSchedulerToggleButtonText: simpleSchedulerToggleButtonTextParams, advancedSchedulerToggleButtonText: advancedSchedulerToggleButtonTextParams, simpleSchedulerModalTexts: simpleSchedulerModalTextsParams, labelTexts: labelTextsParams, advancedSchedulerInfoTexts: advancedSchedulerInfoTextsParams, validationTexts: validationTextsParams, switcherType, selectedTabKey, tabTexts: tabTextsParams, advancedSchedulerSwitcherIcon, simpleSchedulerSwitcherIcon, }: SchedulerProps): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,7 @@
1
1
  import React, { useState, useEffect, useRef, useCallback } from 'react';
2
2
  import isEqual from 'lodash-es/isEqual';
3
+ import { faGear } from '@fortawesome/free-solid-svg-icons/faGear';
4
+ import { faSliders } from '@fortawesome/free-solid-svg-icons/faSliders';
3
5
  import { WithButtonSwitcherSchedulerContainer } from './with-button-switcher-scheduler-container';
4
6
  import { WithTabsSwitcherSchedulerContainer } from './with-tabs-switcher-scheduler-container';
5
7
  import { DEFAULT_SCHEDULE, useDaysOfWeek, useMonths, useFrequencyOptions, SWITCHER_TYPES, useDefaultTexts } from './constants';
@@ -27,7 +29,9 @@ export function Scheduler({
27
29
  validationTexts: validationTextsParams,
28
30
  switcherType = SWITCHER_TYPES.BUTTON,
29
31
  selectedTabKey,
30
- tabTexts: tabTextsParams
32
+ tabTexts: tabTextsParams,
33
+ advancedSchedulerSwitcherIcon = faGear,
34
+ simpleSchedulerSwitcherIcon = faSliders
31
35
  }) {
32
36
  // Get translated constants from hooks
33
37
  const defaultDaysOfWeek = useDaysOfWeek();
@@ -110,7 +114,9 @@ export function Scheduler({
110
114
  onUseSimpleScheduler: onUseSimpleScheduler,
111
115
  onUseAdvancedScheduler: () => {
112
116
  setShowAdvancedScheduler(true);
113
- }
117
+ },
118
+ advancedSchedulerSwitcherIcon: advancedSchedulerSwitcherIcon,
119
+ simpleSchedulerSwitcherIcon: simpleSchedulerSwitcherIcon
114
120
  }), switcherType === SWITCHER_TYPES.TABS && /*#__PURE__*/_jsx(WithTabsSwitcherSchedulerContainer, {
115
121
  onUpdateSchedule: handleUpdateSchedule,
116
122
  isDisabled: isDisabled,
@@ -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;