@databricks/design-system 1.12.4 → 1.12.6

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 (47) hide show
  1. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts +0 -6
  2. package/dist/design-system/DesignSystemProvider/DesignSystemProvider.d.ts.map +1 -1
  3. package/dist/design-system/DialogCombobox/DialogComboboxCountBadge.d.ts +3 -1
  4. package/dist/design-system/DialogCombobox/DialogComboboxCountBadge.d.ts.map +1 -1
  5. package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts +1 -1
  6. package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts.map +1 -1
  7. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts +1 -1
  8. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
  9. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts +2 -0
  10. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts.map +1 -1
  11. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts +1 -1
  12. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
  13. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts +1 -2
  14. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
  15. package/dist/design-system/DialogCombobox/shared.d.ts.map +1 -1
  16. package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  17. package/dist/design-system/Hooks/useDesignSystemTheme.d.ts +1 -1
  18. package/dist/design-system/Hooks/useDesignSystemTheme.d.ts.map +1 -1
  19. package/dist/design-system/Modal/Modal.d.ts.map +1 -1
  20. package/dist/design-system/Pagination/index.d.ts +1 -0
  21. package/dist/design-system/Pagination/index.d.ts.map +1 -1
  22. package/dist/design-system/Sidebar/Sidebar.d.ts +3 -1
  23. package/dist/design-system/Sidebar/Sidebar.d.ts.map +1 -1
  24. package/dist/design-system/Sidebar/Sidebar.test.d.ts +2 -0
  25. package/dist/design-system/Sidebar/Sidebar.test.d.ts.map +1 -0
  26. package/dist/design-system/Spinner/Spinner.d.ts.map +1 -1
  27. package/dist/design-system/TableUI/index.d.ts +1 -0
  28. package/dist/design-system/TableUI/index.d.ts.map +1 -1
  29. package/dist/design-system/ToggleButton/ToggleButton.d.ts.map +1 -1
  30. package/dist/development.js +1 -1
  31. package/dist/index.js +164 -68
  32. package/dist/index.js.map +1 -1
  33. package/dist/test-utils/enzyme/table.d.ts +4 -0
  34. package/dist/test-utils/enzyme/table.d.ts.map +1 -1
  35. package/dist/test-utils/enzyme.js +4 -0
  36. package/dist/test-utils/enzyme.js.map +1 -1
  37. package/dist/test-utils/rtl/table.d.ts +6 -2
  38. package/dist/test-utils/rtl/table.d.ts.map +1 -1
  39. package/dist/test-utils/rtl.js +6 -2
  40. package/dist/test-utils/rtl.js.map +1 -1
  41. package/dist/theme/index.d.ts +0 -5
  42. package/dist/theme/index.d.ts.map +1 -1
  43. package/dist/useDesignSystemTheme-1e16bcf5.js +441 -0
  44. package/dist/useDesignSystemTheme-1e16bcf5.js.map +1 -0
  45. package/dist/useDesignSystemTheme-3d2c1acb.js +440 -0
  46. package/dist/useDesignSystemTheme-3d2c1acb.js.map +1 -0
  47. package/package.json +7 -5
package/dist/index.js CHANGED
@@ -3,8 +3,8 @@ import React__default, { createContext, useMemo, useEffect, useContext, useRef,
3
3
  import AntDIcon from '@ant-design/icons';
4
4
  import { ThemeProvider, css, keyframes, ClassNames } from '@emotion/react';
5
5
  import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
6
- import { g as getTheme, a as getClassNamePrefix, b as getPrefixedClassNameFromTheme, u as useDesignSystemTheme, l as lightColorList } from './useDesignSystemTheme-6e6f5867.js';
7
- export { W as WithDesignSystemThemeHoc, u as useDesignSystemTheme } from './useDesignSystemTheme-6e6f5867.js';
6
+ import { g as getTheme, a as getClassNamePrefix, b as getPrefixedClassNameFromTheme, u as useDesignSystemTheme, l as lightColorList } from './useDesignSystemTheme-3d2c1acb.js';
7
+ export { W as WithDesignSystemThemeHoc, u as useDesignSystemTheme } from './useDesignSystemTheme-3d2c1acb.js';
8
8
  import { notification, ConfigProvider, Collapse, Alert as Alert$1, AutoComplete as AutoComplete$1, Breadcrumb as Breadcrumb$1, Button as Button$1, Checkbox as Checkbox$1, DatePicker, Input as Input$1, Tooltip as Tooltip$1, Typography as Typography$1, Dropdown as Dropdown$1, Form as Form$1, Radio as Radio$1, Select as Select$1, Col as Col$1, Row as Row$1, Space as Space$1, Layout as Layout$1, Pagination as Pagination$1, Table as Table$1, Menu as Menu$1, Modal as Modal$1, Popover as Popover$2, Skeleton as Skeleton$1, Switch as Switch$1, Tabs as Tabs$1, Tree as Tree$1 } from 'antd';
9
9
  import classnames from 'classnames';
10
10
  import _isNil from 'lodash/isNil';
@@ -26,7 +26,6 @@ import 'chroma-js';
26
26
  const DuboisContextDefaults = {
27
27
  enableAnimation: false,
28
28
  isDarkMode: false,
29
- theme: 'default',
30
29
  // Prefer to use useDesignSystemTheme.getPrefixedClassName instead
31
30
  getPrefixCls: suffix => suffix ? `du-bois-${suffix}` : 'du-bois',
32
31
  flags: {}
@@ -58,7 +57,6 @@ const DesignSystemProvider = _ref => {
58
57
  let {
59
58
  children,
60
59
  isDarkMode = false,
61
- theme: themeName,
62
60
  enableAnimation = false,
63
61
  zIndexBase = 1000,
64
62
  getPopupContainer,
@@ -72,21 +70,19 @@ const DesignSystemProvider = _ref => {
72
70
  }),
73
71
  // TODO: revisit this
74
72
  // eslint-disable-next-line react-hooks/exhaustive-deps
75
- [themeName, isDarkMode, zIndexBase]);
73
+ [isDarkMode, zIndexBase]);
76
74
  const providerPropsContext = useMemo(() => ({
77
75
  isDarkMode,
78
- theme: themeName,
79
76
  enableAnimation,
80
77
  zIndexBase,
81
78
  getPopupContainer,
82
79
  flags
83
- }), [themeName, isDarkMode, enableAnimation, zIndexBase, getPopupContainer, flags]);
80
+ }), [isDarkMode, enableAnimation, zIndexBase, getPopupContainer, flags]);
84
81
  const classNamePrefix = getClassNamePrefix(theme);
85
82
  const value = useMemo(() => {
86
83
  return {
87
84
  enableAnimation,
88
85
  isDarkMode,
89
- theme: theme.themeName,
90
86
  getPrefixCls: suffix => getPrefixedClassNameFromTheme(theme, suffix),
91
87
  getPopupContainer,
92
88
  flags
@@ -118,7 +114,6 @@ const DesignSystemProvider = _ref => {
118
114
  const ApplyDesignSystemContextOverrides = _ref2 => {
119
115
  let {
120
116
  isDarkMode,
121
- theme,
122
117
  enableAnimation,
123
118
  zIndexBase,
124
119
  getPopupContainer,
@@ -132,7 +127,6 @@ const ApplyDesignSystemContextOverrides = _ref2 => {
132
127
  const newProps = useMemo(() => ({
133
128
  ...parentDesignSystemProviderProps,
134
129
  isDarkMode: isDarkMode !== null && isDarkMode !== void 0 ? isDarkMode : parentDesignSystemProviderProps.isDarkMode,
135
- theme: theme !== null && theme !== void 0 ? theme : parentDesignSystemProviderProps.theme,
136
130
  enableAnimation: enableAnimation !== null && enableAnimation !== void 0 ? enableAnimation : parentDesignSystemProviderProps.enableAnimation,
137
131
  zIndexBase: zIndexBase !== null && zIndexBase !== void 0 ? zIndexBase : parentDesignSystemProviderProps.zIndexBase,
138
132
  getPopupContainer: getPopupContainer !== null && getPopupContainer !== void 0 ? getPopupContainer : parentDesignSystemProviderProps.getPopupContainer,
@@ -140,7 +134,7 @@ const ApplyDesignSystemContextOverrides = _ref2 => {
140
134
  ...parentDesignSystemProviderProps.flags,
141
135
  ...flags
142
136
  }
143
- }), [parentDesignSystemProviderProps, isDarkMode, theme, enableAnimation, zIndexBase, getPopupContainer, flags]);
137
+ }), [parentDesignSystemProviderProps, isDarkMode, enableAnimation, zIndexBase, getPopupContainer, flags]);
144
138
  return jsx(DesignSystemProvider, {
145
139
  ...newProps,
146
140
  children: children
@@ -8898,7 +8892,7 @@ const getButtonEmotionStyles = _ref => {
8898
8892
  outlineStyle: 'solid',
8899
8893
  outlineWidth: '2px',
8900
8894
  outlineOffset: '1px',
8901
- outlineColor: theme.themeName === 'dark' ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
8895
+ outlineColor: theme.isDarkMode ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
8902
8896
  },
8903
8897
  ...getDefaultStyles(theme),
8904
8898
  [`&${classPrimary}`]: {
@@ -8988,7 +8982,7 @@ const getButtonEmotionStyles = _ref => {
8988
8982
  },
8989
8983
  [`&${clsIconOnly}`]: {
8990
8984
  border: 'none',
8991
- [`&:enabled:not(${classLink})`]: {
8985
+ [`&:enabled:not(${classLink}), &:enabled:not(${classLink}) > .anticon`]: {
8992
8986
  ...tertiaryColors,
8993
8987
  color: theme.colors.textSecondary
8994
8988
  },
@@ -9008,7 +9002,7 @@ const getButtonEmotionStyles = _ref => {
9008
9002
  outlineStyle: 'solid',
9009
9003
  outlineWidth: '2px',
9010
9004
  outlineOffset: '1px',
9011
- outlineColor: theme.themeName === 'dark' ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
9005
+ outlineColor: theme.isDarkMode ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
9012
9006
  }),
9013
9007
  [`${clsLoadingIcon}`]: {
9014
9008
  ...(onlyIcon && {
@@ -9724,7 +9718,10 @@ const cssSpinner = function (theme) {
9724
9718
  const styles = {
9725
9719
  animation: `${rotate} 1s steps(${frameRate}, end) infinite`,
9726
9720
  color: theme.colors.textSecondary,
9727
- animationDelay: `${delay}s`
9721
+ animationDelay: `${delay}s`,
9722
+ '@media only percy': {
9723
+ animation: 'none'
9724
+ }
9728
9725
  };
9729
9726
  return /*#__PURE__*/css(importantify(styles), process.env.NODE_ENV === "production" ? "" : ";label:cssSpinner;");
9730
9727
  };
@@ -9880,6 +9877,9 @@ const getCountBadgeStyles = theme => /*#__PURE__*/css(importantify({
9880
9877
  height: 20
9881
9878
  }), process.env.NODE_ENV === "production" ? "" : ";label:getCountBadgeStyles;");
9882
9879
  const DialogComboboxCountBadge = props => {
9880
+ const {
9881
+ countStartAt
9882
+ } = props;
9883
9883
  const {
9884
9884
  theme
9885
9885
  } = useDesignSystemTheme();
@@ -9889,7 +9889,7 @@ const DialogComboboxCountBadge = props => {
9889
9889
  return jsx("div", {
9890
9890
  ...props,
9891
9891
  css: getCountBadgeStyles(theme),
9892
- children: Array.isArray(value) ? value.length : value ? 1 : 0
9892
+ children: Array.isArray(value) ? countStartAt ? `+${value.length - countStartAt}` : value.length : value ? 1 : 0
9893
9893
  });
9894
9894
  };
9895
9895
 
@@ -9919,6 +9919,7 @@ const getDialogComboboxOptionItemWrapperStyles = theme => {
9919
9919
  padding: '6px 32px 6px 12px',
9920
9920
  lineHeight: theme.typography.lineHeightBase,
9921
9921
  height: theme.typography.lineHeightBase,
9922
+ boxSizing: 'content-box',
9922
9923
  cursor: 'pointer',
9923
9924
  userSelect: 'none',
9924
9925
  '&:hover': {
@@ -10202,7 +10203,8 @@ const __INTERNAL_DO_NOT_USE_DEDUPE__Group = Group$2;
10202
10203
  const filterChildren = (children, searchValue) => {
10203
10204
  var _React$Children$map;
10204
10205
  return (_React$Children$map = React__default.Children.map(children, child => {
10205
- if (child !== null && child !== void 0 && child.props.value.toLowerCase().includes(searchValue)) {
10206
+ var _child$props, _child$props$value;
10207
+ if (child !== null && child !== void 0 && (_child$props = child.props) !== null && _child$props !== void 0 && (_child$props$value = _child$props.value) !== null && _child$props$value !== void 0 && _child$props$value.toLowerCase().includes(searchValue)) {
10206
10208
  return child;
10207
10209
  }
10208
10210
  return null;
@@ -10212,6 +10214,8 @@ const DialogComboboxOptionListSearch = /*#__PURE__*/forwardRef((_ref, forwardedR
10212
10214
  var _filteredChildren, _filteredChildren$pro, _filteredChildren2;
10213
10215
  let {
10214
10216
  onChange,
10217
+ onSearch,
10218
+ virtualized,
10215
10219
  children,
10216
10220
  hasWrapper,
10217
10221
  ...restProps
@@ -10227,10 +10231,13 @@ const DialogComboboxOptionListSearch = /*#__PURE__*/forwardRef((_ref, forwardedR
10227
10231
  throw new Error('`DialogComboboxOptionListSearch` must be used within `DialogComboboxOptionList`');
10228
10232
  }
10229
10233
  const handleOnChange = event => {
10230
- setSearchValue(event.target.value.toLowerCase());
10234
+ if (!virtualized) {
10235
+ setSearchValue(event.target.value.toLowerCase());
10236
+ }
10237
+ onSearch === null || onSearch === void 0 ? void 0 : onSearch(event.target.value);
10231
10238
  };
10232
10239
  let filteredChildren = children;
10233
- if (searchValue) {
10240
+ if (searchValue && !virtualized) {
10234
10241
  filteredChildren = filterChildren(hasWrapper ? children.props.children : children, searchValue);
10235
10242
  if (hasWrapper) {
10236
10243
  filteredChildren = /*#__PURE__*/React__default.cloneElement(children, {}, filteredChildren);
@@ -10251,7 +10258,7 @@ const DialogComboboxOptionListSearch = /*#__PURE__*/forwardRef((_ref, forwardedR
10251
10258
  value: searchValue,
10252
10259
  ...restProps
10253
10260
  })
10254
- }), hasWrapper && (_filteredChildren = filteredChildren) !== null && _filteredChildren !== void 0 && (_filteredChildren$pro = _filteredChildren.props.children) !== null && _filteredChildren$pro !== void 0 && _filteredChildren$pro.length || !hasWrapper && (_filteredChildren2 = filteredChildren) !== null && _filteredChildren2 !== void 0 && _filteredChildren2.length ? filteredChildren : jsx("div", {
10261
+ }), virtualized ? children : hasWrapper && (_filteredChildren = filteredChildren) !== null && _filteredChildren !== void 0 && (_filteredChildren$pro = _filteredChildren.props.children) !== null && _filteredChildren$pro !== void 0 && _filteredChildren$pro.length || !hasWrapper && (_filteredChildren2 = filteredChildren) !== null && _filteredChildren2 !== void 0 && _filteredChildren2.length ? filteredChildren : jsx("div", {
10255
10262
  css: /*#__PURE__*/css({
10256
10263
  color: theme.colors.textSecondary,
10257
10264
  textAlign: 'center',
@@ -10662,6 +10669,12 @@ const getTriggerStyles = (theme, maxWidth, removable) => {
10662
10669
  '&:focus': {
10663
10670
  borderColor: theme.colors.actionDefaultBorderFocus,
10664
10671
  ...removeButtonInteractionStyles
10672
+ },
10673
+ [`&[disabled]`]: {
10674
+ background: theme.colors.actionDisabledBackground,
10675
+ color: theme.colors.actionDisabledText,
10676
+ pointerEvents: 'none',
10677
+ userSelect: 'none'
10665
10678
  }
10666
10679
  }), process.env.NODE_ENV === "production" ? "" : ";label:getTriggerStyles;");
10667
10680
  };
@@ -10671,8 +10684,7 @@ const DialogComboboxTrigger = /*#__PURE__*/forwardRef((_ref, forwardedRef) => {
10671
10684
  onRemove,
10672
10685
  children,
10673
10686
  maxWidth = 9999,
10674
- withCountBadge = true,
10675
- showBadgeAfterValueCount = 3,
10687
+ showTagAfterValueCount = 3,
10676
10688
  allowClear = true,
10677
10689
  controlled,
10678
10690
  onClear,
@@ -10712,7 +10724,7 @@ const DialogComboboxTrigger = /*#__PURE__*/forwardRef((_ref, forwardedRef) => {
10712
10724
  const [showTooltip, setShowTooltip] = React__default.useState();
10713
10725
  const triggerContentRef = React__default.useRef(null);
10714
10726
  useEffect(() => {
10715
- if ((value === null || value === void 0 ? void 0 : value.length) > showBadgeAfterValueCount) {
10727
+ if ((value === null || value === void 0 ? void 0 : value.length) > showTagAfterValueCount) {
10716
10728
  setShowTooltip(true);
10717
10729
  } else if (triggerContentRef.current) {
10718
10730
  const {
@@ -10721,11 +10733,12 @@ const DialogComboboxTrigger = /*#__PURE__*/forwardRef((_ref, forwardedRef) => {
10721
10733
  } = triggerContentRef.current;
10722
10734
  setShowTooltip(clientWidth < scrollWidth);
10723
10735
  }
10724
- }, [showBadgeAfterValueCount, value]);
10736
+ }, [showTagAfterValueCount, value]);
10725
10737
  const concatenatedValues = Array.isArray(value) ? value.join(', ') : value;
10726
10738
  const displayedValues = jsx("span", {
10727
10739
  children: concatenatedValues
10728
10740
  });
10741
+ const valuesBeforeBadge = Array.isArray(value) ? value.slice(0, showTagAfterValueCount).join(', ') : value;
10729
10742
  let ariaLabel = `${label}`;
10730
10743
  if (value !== null && value !== void 0 && value.length) {
10731
10744
  ariaLabel += multiSelect ? `, multiselectable, ${value.length} options selected: ${concatenatedValues}` : `, selected option: ${concatenatedValues}`;
@@ -10753,10 +10766,18 @@ const DialogComboboxTrigger = /*#__PURE__*/forwardRef((_ref, forwardedRef) => {
10753
10766
  fontWeight: theme.typography.typographyBoldFontWeight
10754
10767
  }, process.env.NODE_ENV === "production" ? "" : ";label:triggerContent;"),
10755
10768
  children: label
10756
- }), withCountBadge && (value === null || value === void 0 ? void 0 : value.length) > showBadgeAfterValueCount ? jsx(DialogComboboxCountBadge, {
10757
- role: "status",
10758
- "aria-label": "Dialog combobox options selected count"
10759
- }) : withCountBadge ? displayedValues : null]
10769
+ }), (value === null || value === void 0 ? void 0 : value.length) > showTagAfterValueCount ? jsxs(Fragment, {
10770
+ children: [jsx("span", {
10771
+ style: {
10772
+ marginRight: theme.spacing.xs
10773
+ },
10774
+ children: valuesBeforeBadge
10775
+ }), jsx(DialogComboboxCountBadge, {
10776
+ countStartAt: showTagAfterValueCount,
10777
+ role: "status",
10778
+ "aria-label": "Selected options count"
10779
+ })]
10780
+ }) : displayedValues]
10760
10781
  }), allowClear && value !== null && value !== void 0 && value.length ? jsx(XCircleFillIcon, {
10761
10782
  onClick: handleClear,
10762
10783
  css: /*#__PURE__*/css({
@@ -11291,7 +11312,7 @@ const Content$4 = _ref => {
11291
11312
  paddingLeft: horizontalContentPadding,
11292
11313
  overflowY: useCustomScrollBehavior ? 'hidden' : 'auto',
11293
11314
  height: expandContentToFullHeight ? '100%' : undefined,
11294
- ...(theme.themeName === 'default' && !useCustomScrollBehavior ? {
11315
+ ...(theme.isDarkMode === false && !useCustomScrollBehavior ? {
11295
11316
  // Achieves an inner shadow on the content, but only when there is more left to scroll. When the content fits
11296
11317
  // in the container without scrolling, no shadow will be shown.
11297
11318
  // Taken from: https://css-tricks.com/scroll-shadows-with-javascript/
@@ -11447,6 +11468,7 @@ const Item = /*#__PURE__*/forwardRef(function Item(_ref4, ref) {
11447
11468
  children,
11448
11469
  disabledReason,
11449
11470
  danger,
11471
+ onClick,
11450
11472
  ...props
11451
11473
  } = _ref4;
11452
11474
  const itemRef = useRef(null);
@@ -11454,6 +11476,13 @@ const Item = /*#__PURE__*/forwardRef(function Item(_ref4, ref) {
11454
11476
  return jsx(DropdownMenu$1.Item, {
11455
11477
  css: theme => [itemStyles, danger && dangerItemStyles(theme)],
11456
11478
  ref: itemRef,
11479
+ onClick: e => {
11480
+ if (props.disabled) {
11481
+ e.preventDefault();
11482
+ } else {
11483
+ onClick === null || onClick === void 0 ? void 0 : onClick(e);
11484
+ }
11485
+ },
11457
11486
  ...props,
11458
11487
  children: getNewChildren(children, props, disabledReason, itemRef)
11459
11488
  });
@@ -11684,7 +11713,8 @@ const getChild = (child, isDisabled, disabledReason, tooltip, index, siblingCoun
11684
11713
  const HintColumnType = jsx(HintColumn, {}).type;
11685
11714
  const isHintColumnType = Boolean(child && typeof child !== 'string' && typeof child !== 'number' && typeof child !== 'boolean' && 'type' in child && (child === null || child === void 0 ? void 0 : child.type) === HintColumnType);
11686
11715
  if (isDisabled && disabledReason && child && isHintColumnType) {
11687
- return jsxs(Fragment, {
11716
+ return jsxs("div", {
11717
+ onClick: e => e.preventDefault(),
11688
11718
  children: [tooltip, child]
11689
11719
  });
11690
11720
  } else if (index === siblingCount - 1 && isDisabled && disabledReason) {
@@ -13399,7 +13429,8 @@ function getPaginationEmotionStyles(clsPrefix, theme) {
13399
13429
  [`&${classRoot}.mini, ${classRoot}.mini`]: {
13400
13430
  [`${classItem}, ${classNext}, ${classPrev}, ${classJumpNext}, ${classJumpPrev}`]: {
13401
13431
  height: '32px',
13402
- width: '32px',
13432
+ minWidth: '32px',
13433
+ width: 'auto',
13403
13434
  lineHeight: '32px'
13404
13435
  },
13405
13436
  [classSizeChanger]: {
@@ -13419,6 +13450,7 @@ const Pagination = function Pagination(_ref) {
13419
13450
  pageSize = 10,
13420
13451
  numTotal,
13421
13452
  onChange,
13453
+ style,
13422
13454
  dangerouslySetAntdProps
13423
13455
  } = _ref;
13424
13456
  const {
@@ -13436,6 +13468,7 @@ const Pagination = function Pagination(_ref) {
13436
13468
  showSizeChanger: false,
13437
13469
  showQuickJumper: false,
13438
13470
  size: 'small',
13471
+ style: style,
13439
13472
  ...dangerouslySetAntdProps
13440
13473
  })
13441
13474
  });
@@ -13660,6 +13693,7 @@ const getModalEmotionStyles = args => {
13660
13693
  const bodyMaxHeight = `calc(${modalMaxHeight} - ${headerHeight}px - ${footerHeight}px - ${MODAL_PADDING}px)`;
13661
13694
  return /*#__PURE__*/css({
13662
13695
  [classNameHeader]: {
13696
+ background: 'transparent',
13663
13697
  paddingTop: theme.spacing.md,
13664
13698
  paddingLeft: theme.spacing.lg,
13665
13699
  paddingRight: theme.spacing.md,
@@ -13722,6 +13756,7 @@ const getModalEmotionStyles = args => {
13722
13756
  alignItems: 'center'
13723
13757
  },
13724
13758
  [classNameContent]: {
13759
+ backgroundColor: theme.colors.backgroundPrimary,
13725
13760
  maxHeight: modalMaxHeight,
13726
13761
  height: maxedOutHeight ? modalMaxHeight : '',
13727
13762
  overflow: 'hidden',
@@ -13737,7 +13772,7 @@ const getModalEmotionStyles = args => {
13737
13772
  paddingRight: MODAL_PADDING,
13738
13773
  paddingTop: CONTENT_BUFFER,
13739
13774
  paddingBottom: CONTENT_BUFFER,
13740
- ...(theme.themeName === 'default' ? {
13775
+ ...(theme.isDarkMode === false ? {
13741
13776
  // Achieves an inner shadow on the content, but only when there is more left to scroll. When the content fits
13742
13777
  // in the container without scrolling, no shadow will be shown.
13743
13778
  // Taken from: https://css-tricks.com/scroll-shadows-with-javascript/
@@ -13921,6 +13956,7 @@ function DangerModal(props) {
13921
13956
  type: "primary",
13922
13957
  danger: true,
13923
13958
  onClick: onOk,
13959
+ loading: props.confirmLoading,
13924
13960
  ...okButtonProps,
13925
13961
  children: okText || 'Delete'
13926
13962
  }, "discard")],
@@ -14607,10 +14643,15 @@ function NavButton(_ref2) {
14607
14643
  theme
14608
14644
  } = useDesignSystemTheme();
14609
14645
  return jsx("div", {
14610
- css: [active ? {
14611
- background: theme.colors.actionDefaultBackgroundHover,
14612
- borderRadius: theme.borders.borderRadiusMd
14613
- } : undefined, dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:NavButton;"],
14646
+ css: [active ? importantify({
14647
+ borderRadius: theme.borders.borderRadiusMd,
14648
+ background: theme.colors.actionDefaultBackgroundPress,
14649
+ button: {
14650
+ '&:enabled:not(:hover):not(:active) > .anticon': {
14651
+ color: theme.colors.actionTertiaryTextPress
14652
+ }
14653
+ }
14654
+ }) : undefined, dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:NavButton;"],
14614
14655
  children: jsx(Button, {
14615
14656
  icon: icon,
14616
14657
  onClick: onClick,
@@ -14651,10 +14692,14 @@ function Content(_ref3) {
14651
14692
  right: 0
14652
14693
  };
14653
14694
  const [dragging, setDragging] = useState(false);
14654
- const [animation, setAnimation] = useState(openPanelId == null ? {
14695
+ const isPanelClosed = openPanelId == null;
14696
+ const [animation, setAnimation] = useState(isPanelClosed ? {
14655
14697
  open: `${openAnimation} .2s cubic-bezier(0, 0, 0.2, 1)`,
14656
14698
  show: `${showAnimation} .25s linear`
14657
14699
  } : undefined);
14700
+ const hiddenPanelStyle = /*#__PURE__*/css(isPanelClosed && {
14701
+ display: 'none'
14702
+ }, process.env.NODE_ENV === "production" ? "" : ";label:hiddenPanelStyle;");
14658
14703
  const containerStyle = /*#__PURE__*/css({
14659
14704
  animation: animation === null || animation === void 0 ? void 0 : animation.open,
14660
14705
  direction: sidebarContext.position === 'right' ? 'rtl' : 'ltr',
@@ -14662,12 +14707,13 @@ function Content(_ref3) {
14662
14707
  position: 'relative',
14663
14708
  borderWidth: sidebarContext.position === 'right' ? `0 ${theme.general.borderWidth}px 0 0 ` : `0 0 0 ${theme.general.borderWidth}px`,
14664
14709
  borderStyle: 'inherit',
14665
- borderColor: 'inherit'
14710
+ borderColor: 'inherit',
14711
+ boxSizing: 'content-box'
14666
14712
  }, process.env.NODE_ENV === "production" ? "" : ";label:containerStyle;");
14667
14713
  const highlightedBorderStyle = sidebarContext.position === 'right' ? /*#__PURE__*/css({
14668
- borderLeft: `2px solid ${theme.colors.primary}`
14714
+ borderLeft: `2px solid ${theme.colors.actionDefaultBorderHover}`
14669
14715
  }, process.env.NODE_ENV === "production" ? "" : ";label:highlightedBorderStyle;") : /*#__PURE__*/css({
14670
- borderRight: `2px solid ${theme.colors.primary}`
14716
+ borderRight: `2px solid ${theme.colors.actionDefaultBorderHover}`
14671
14717
  }, process.env.NODE_ENV === "production" ? "" : ";label:highlightedBorderStyle;");
14672
14718
  useEffect(() => {
14673
14719
  onCloseRef.current = onClose;
@@ -14689,11 +14735,12 @@ function Content(_ref3) {
14689
14735
  }), [openPanelId, closable, openAnimation, showAnimation, animation, destroyInactivePanels]);
14690
14736
  return jsx(ContentContext.Provider, {
14691
14737
  value: value,
14692
- children: openPanelId !== undefined ? disableResize ? jsx("div", {
14738
+ children: disableResize ? jsx("div", {
14693
14739
  css: [/*#__PURE__*/css(containerStyle, {
14694
14740
  width: width || '100%',
14695
14741
  height: '100%'
14696
- }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"), dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
14742
+ }, process.env.NODE_ENV === "production" ? "" : ";label:Content;"), dangerouslyAppendEmotionCSS, hiddenPanelStyle, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
14743
+ "aria-hidden": isPanelClosed,
14697
14744
  children: jsx("div", {
14698
14745
  css: /*#__PURE__*/css({
14699
14746
  opacity: 1,
@@ -14729,7 +14776,8 @@ function Content(_ref3) {
14729
14776
  ...resizeHandleStyle
14730
14777
  }, dragging && highlightedBorderStyle, process.env.NODE_ENV === "production" ? "" : ";label:Content;")
14731
14778
  }),
14732
- css: containerStyle,
14779
+ css: [containerStyle, hiddenPanelStyle, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
14780
+ "aria-hidden": isPanelClosed,
14733
14781
  children: jsx("div", {
14734
14782
  css: [{
14735
14783
  opacity: 1,
@@ -14739,13 +14787,14 @@ function Content(_ref3) {
14739
14787
  }, dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Content;"],
14740
14788
  children: children
14741
14789
  })
14742
- }) : null
14790
+ })
14743
14791
  });
14744
14792
  }
14745
14793
  function Panel(_ref5) {
14746
14794
  let {
14747
14795
  panelId,
14748
14796
  children,
14797
+ forceRender = false,
14749
14798
  dangerouslyAppendEmotionCSS,
14750
14799
  ...delegated
14751
14800
  } = _ref5;
@@ -14753,8 +14802,12 @@ function Panel(_ref5) {
14753
14802
  openPanelId,
14754
14803
  destroyInactivePanels
14755
14804
  } = useContext(ContentContext);
14805
+ const hasOpenedPanelRef = useRef(false);
14756
14806
  const isPanelOpen = openPanelId === panelId;
14757
- if (destroyInactivePanels && !isPanelOpen) return null;
14807
+ if (isPanelOpen && !hasOpenedPanelRef.current) {
14808
+ hasOpenedPanelRef.current = true;
14809
+ }
14810
+ if ((destroyInactivePanels || !hasOpenedPanelRef.current) && !isPanelOpen && !forceRender) return null;
14758
14811
  return jsx("div", {
14759
14812
  css: ["display:flex;height:100%;flex-direction:column;", dangerouslyAppendEmotionCSS, !isPanelOpen && {
14760
14813
  display: 'none'
@@ -14804,6 +14857,7 @@ function PanelHeader(_ref6) {
14804
14857
  children: jsx(Button, {
14805
14858
  size: "small",
14806
14859
  icon: jsx(CloseIcon, {}),
14860
+ "aria-label": "Close",
14807
14861
  onClick: () => {
14808
14862
  contentContext.setIsClosed();
14809
14863
  }
@@ -14845,8 +14899,17 @@ function PanelBody(_ref10) {
14845
14899
  children,
14846
14900
  dangerouslyAppendEmotionCSS
14847
14901
  } = _ref10;
14902
+ const {
14903
+ theme
14904
+ } = useDesignSystemTheme();
14848
14905
  return jsx("div", {
14849
- css: ["height:100%;overflow-x:hidden;overflow-y:auto;padding:0 8px;", dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:PanelBody;"],
14906
+ css: [{
14907
+ height: '100%',
14908
+ overflowX: 'hidden',
14909
+ overflowY: 'auto',
14910
+ padding: '0 8px',
14911
+ colorScheme: theme.isDarkMode ? 'dark' : 'light'
14912
+ }, dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:PanelBody;"],
14850
14913
  children: children
14851
14914
  });
14852
14915
  }
@@ -14875,7 +14938,8 @@ const Sidebar = /* #__PURE__ */(() => {
14875
14938
  flexDirection: position === 'right' ? 'row-reverse' : 'row',
14876
14939
  borderStyle: 'solid',
14877
14940
  borderColor: theme.colors.borderDecorative,
14878
- borderWidth: theme.general.borderWidth
14941
+ borderWidth: theme.general.borderWidth,
14942
+ boxSizing: 'content-box'
14879
14943
  }, dangerouslyAppendEmotionCSS, process.env.NODE_ENV === "production" ? "" : ";label:Sidebar;"],
14880
14944
  children: children
14881
14945
  })
@@ -15363,11 +15427,11 @@ const tableStyles = {
15363
15427
  }
15364
15428
  }, process.env.NODE_ENV === "production" ? "" : ";label:table;"),
15365
15429
  row: process.env.NODE_ENV === "production" ? {
15366
- name: "1bx3uk1",
15367
- styles: "display:flex;&.table-isHeader{> *{background-color:var(--table-header-background-color);}.table-isScrollable &{position:sticky;top:0;z-index:1;}}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:var(--row-checkbox-opacity, 0);}&:hover{> *:not([role=\"columnheader\"]){background-color:var(--table-row-hover);}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:1;}}.table-row-select-cell input[type=\"checkbox\"]:focus ~ *{opacity:1;}> *{padding-top:var(--table-row-vertical-padding);padding-bottom:var(--table-row-vertical-padding);border-bottom:1px solid;border-color:var(--table-separator-color);}"
15430
+ name: "1aw6lkf",
15431
+ styles: "display:flex;&.table-isHeader{> *{background-color:var(--table-header-background-color);}.table-isScrollable &{position:sticky;top:0;z-index:1;}}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:var(--row-checkbox-opacity, 0);}&:hover{&:not(.table-isHeader){background-color:var(--table-row-hover);}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:1;}}.table-row-select-cell input[type=\"checkbox\"]:focus ~ *{opacity:1;}> *{padding-top:var(--table-row-vertical-padding);padding-bottom:var(--table-row-vertical-padding);border-bottom:1px solid;border-color:var(--table-separator-color);}"
15368
15432
  } : {
15369
- name: "16lqkbp-row",
15370
- styles: "display:flex;&.table-isHeader{> *{background-color:var(--table-header-background-color);}.table-isScrollable &{position:sticky;top:0;z-index:1;}}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:var(--row-checkbox-opacity, 0);}&:hover{> *:not([role=\"columnheader\"]){background-color:var(--table-row-hover);}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:1;}}.table-row-select-cell input[type=\"checkbox\"]:focus ~ *{opacity:1;}> *{padding-top:var(--table-row-vertical-padding);padding-bottom:var(--table-row-vertical-padding);border-bottom:1px solid;border-color:var(--table-separator-color);};label:row;",
15433
+ name: "1vx4n96-row",
15434
+ styles: "display:flex;&.table-isHeader{> *{background-color:var(--table-header-background-color);}.table-isScrollable &{position:sticky;top:0;z-index:1;}}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:var(--row-checkbox-opacity, 0);}&:hover{&:not(.table-isHeader){background-color:var(--table-row-hover);}.table-row-select-cell input[type=\"checkbox\"] ~ *{opacity:1;}}.table-row-select-cell input[type=\"checkbox\"]:focus ~ *{opacity:1;}> *{padding-top:var(--table-row-vertical-padding);padding-bottom:var(--table-row-vertical-padding);border-bottom:1px solid;border-color:var(--table-separator-color);};label:row;",
15371
15435
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
15372
15436
  },
15373
15437
  cell: process.env.NODE_ENV === "production" ? {
@@ -15379,11 +15443,11 @@ const tableStyles = {
15379
15443
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
15380
15444
  },
15381
15445
  header: process.env.NODE_ENV === "production" ? {
15382
- name: "753xvu",
15383
- styles: "font-weight:bold;align-items:flex-end;display:flex;overflow:hidden;&[aria-sort]{cursor:pointer;user-select:none;}.table-header-text{color:var(--table-header-text-color);}.table-header-icon-container{color:var(--table-header-sort-icon-color);display:none;}&:hover{.table-header-icon-container, .table-header-text{color:var(--table-header-focus-color);}}&:active{.table-header-icon-container, .table-header-text{color:var(--table-header-active-color);}}&:hover, &[aria-sort=\"ascending\"], &[aria-sort=\"descending\"]{.table-header-icon-container{display:inline;}}"
15446
+ name: "ik7qgz",
15447
+ styles: "font-weight:bold;align-items:flex-end;display:flex;overflow:hidden;&[aria-sort]{cursor:pointer;user-select:none;}.table-header-text{color:var(--table-header-text-color);}.table-header-icon-container{color:var(--table-header-sort-icon-color);display:none;}&[aria-sort]:hover{.table-header-icon-container, .table-header-text{color:var(--table-header-focus-color);}}&[aria-sort]:active{.table-header-icon-container, .table-header-text{color:var(--table-header-active-color);}}&:hover, &[aria-sort=\"ascending\"], &[aria-sort=\"descending\"]{.table-header-icon-container{display:inline;}}"
15384
15448
  } : {
15385
- name: "1shmncy-header",
15386
- styles: "font-weight:bold;align-items:flex-end;display:flex;overflow:hidden;&[aria-sort]{cursor:pointer;user-select:none;}.table-header-text{color:var(--table-header-text-color);}.table-header-icon-container{color:var(--table-header-sort-icon-color);display:none;}&:hover{.table-header-icon-container, .table-header-text{color:var(--table-header-focus-color);}}&:active{.table-header-icon-container, .table-header-text{color:var(--table-header-active-color);}}&:hover, &[aria-sort=\"ascending\"], &[aria-sort=\"descending\"]{.table-header-icon-container{display:inline;}};label:header;",
15449
+ name: "1xg6jn4-header",
15450
+ styles: "font-weight:bold;align-items:flex-end;display:flex;overflow:hidden;&[aria-sort]{cursor:pointer;user-select:none;}.table-header-text{color:var(--table-header-text-color);}.table-header-icon-container{color:var(--table-header-sort-icon-color);display:none;}&[aria-sort]:hover{.table-header-icon-container, .table-header-text{color:var(--table-header-focus-color);}}&[aria-sort]:active{.table-header-icon-container, .table-header-text{color:var(--table-header-active-color);}}&:hover, &[aria-sort=\"ascending\"], &[aria-sort=\"descending\"]{.table-header-icon-container{display:inline;}};label:header;",
15387
15451
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
15388
15452
  },
15389
15453
  headerButtonTarget: process.env.NODE_ENV === "production" ? {
@@ -15403,11 +15467,11 @@ const tableStyles = {
15403
15467
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
15404
15468
  },
15405
15469
  checkboxCell: process.env.NODE_ENV === "production" ? {
15406
- name: "mozdib",
15407
- styles: "display:flex;align-items:center;flex:0;padding-left:var(--table-spacing-sm);padding-top:0;padding-bottom:0;min-width:var(--table-spacing-md);max-width:var(--table-spacing-md)"
15470
+ name: "4cdr0s",
15471
+ styles: "display:flex;align-items:center;flex:0;padding-left:var(--table-spacing-sm);padding-top:0;padding-bottom:0;min-width:var(--table-spacing-md);max-width:var(--table-spacing-md);box-sizing:content-box"
15408
15472
  } : {
15409
- name: "101mdic-checkboxCell",
15410
- styles: "display:flex;align-items:center;flex:0;padding-left:var(--table-spacing-sm);padding-top:0;padding-bottom:0;min-width:var(--table-spacing-md);max-width:var(--table-spacing-md);label:checkboxCell;",
15473
+ name: "17au6u2-checkboxCell",
15474
+ styles: "display:flex;align-items:center;flex:0;padding-left:var(--table-spacing-sm);padding-top:0;padding-bottom:0;min-width:var(--table-spacing-md);max-width:var(--table-spacing-md);box-sizing:content-box;label:checkboxCell;",
15411
15475
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
15412
15476
  },
15413
15477
  resizeHandleContainer: /*#__PURE__*/css({
@@ -15915,9 +15979,18 @@ const TableFilterInput = /*#__PURE__*/forwardRef(function SearchInput(_ref10, re
15915
15979
  onSubmit,
15916
15980
  showSearchButton,
15917
15981
  className,
15982
+ onChange,
15983
+ onClear,
15918
15984
  ...inputProps
15919
15985
  } = _ref10;
15920
15986
  const DEFAULT_WIDTH = 350;
15987
+ const handleChange = e => {
15988
+ if (!e.target.value && onClear) {
15989
+ onClear === null || onClear === void 0 ? void 0 : onClear();
15990
+ } else {
15991
+ onChange === null || onChange === void 0 ? void 0 : onChange(e);
15992
+ }
15993
+ };
15921
15994
  let component = jsx(Input, {
15922
15995
  prefix: jsx(SearchIcon, {}),
15923
15996
  allowClear: true,
@@ -15926,7 +15999,8 @@ const TableFilterInput = /*#__PURE__*/forwardRef(function SearchInput(_ref10, re
15926
15999
  ref: ref,
15927
16000
  css: /*#__PURE__*/css({
15928
16001
  width: DEFAULT_WIDTH
15929
- }, process.env.NODE_ENV === "production" ? "" : ";label:component;")
16002
+ }, process.env.NODE_ENV === "production" ? "" : ";label:component;"),
16003
+ onChange: handleChange
15930
16004
  });
15931
16005
  if (showSearchButton) {
15932
16006
  component = jsxs(Input.Group, {
@@ -15941,7 +16015,8 @@ const TableFilterInput = /*#__PURE__*/forwardRef(function SearchInput(_ref10, re
15941
16015
  allowClear: true,
15942
16016
  ...inputProps,
15943
16017
  ref: ref,
15944
- css: _ref11
16018
+ css: _ref11,
16019
+ onChange: handleChange
15945
16020
  }), jsx(Button, {
15946
16021
  htmlType: "submit",
15947
16022
  children: jsx(SearchIcon, {})
@@ -16329,16 +16404,37 @@ const getStyles = theme => {
16329
16404
  cursor: 'pointer',
16330
16405
  color: theme.colors.actionDefaultTextHover,
16331
16406
  backgroundColor: theme.colors.actionDefaultBackgroundHover,
16332
- borderColor: theme.colors.actionDefaultBorderHover
16407
+ borderColor: theme.colors.actionDefaultBorderHover,
16408
+ '& > svg': {
16409
+ stroke: theme.colors.actionDefaultBorderHover
16410
+ }
16333
16411
  },
16334
16412
  '&:disabled': {
16335
16413
  cursor: 'default',
16336
16414
  border: 'transparent',
16337
16415
  color: theme.colors.actionDisabledText,
16338
- backgroundColor: theme.colors.actionDisabledBackground
16416
+ backgroundColor: theme.colors.actionDisabledBackground,
16417
+ '& > svg': {
16418
+ stroke: theme.colors.border
16419
+ }
16339
16420
  }
16340
16421
  }, process.env.NODE_ENV === "production" ? "" : ";label:getStyles;");
16341
16422
  };
16423
+ const RectangleSvg = props => jsx("svg", {
16424
+ width: "16",
16425
+ height: "16",
16426
+ viewBox: "0 0 16 16",
16427
+ fill: "none",
16428
+ xmlns: "http://www.w3.org/2000/svg",
16429
+ ...props,
16430
+ children: jsx("rect", {
16431
+ x: "0.5",
16432
+ y: "0.5",
16433
+ width: "15",
16434
+ height: "15",
16435
+ rx: "3.5"
16436
+ })
16437
+ });
16342
16438
  const ToggleButton = /*#__PURE__*/forwardRef((_ref, ref) => {
16343
16439
  let {
16344
16440
  children,
@@ -16367,13 +16463,13 @@ const ToggleButton = /*#__PURE__*/forwardRef((_ref, ref) => {
16367
16463
  css: /*#__PURE__*/css({
16368
16464
  marginRight: theme.spacing.xs
16369
16465
  }, process.env.NODE_ENV === "production" ? "" : ";label:ToggleButton;")
16370
- }) : jsx(Checkbox, {
16371
- disabled: props.disabled,
16372
- style: {
16466
+ }) : jsx(RectangleSvg, {
16467
+ css: /*#__PURE__*/css({
16373
16468
  height: theme.typography.lineHeightBase,
16374
16469
  width: theme.typography.lineHeightSm,
16375
- marginRight: theme.spacing.xs
16376
- }
16470
+ marginRight: theme.spacing.xs,
16471
+ stroke: theme.colors.border
16472
+ }, process.env.NODE_ENV === "production" ? "" : ";label:ToggleButton;")
16377
16473
  }), children]
16378
16474
  });
16379
16475
  });