@databricks/design-system 1.12.10 → 1.12.11

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 (203) hide show
  1. package/dist/{DropdownMenu-e0c3fc1d.js → DropdownMenu-eb8788e5.js} +431 -84
  2. package/dist/DropdownMenu-eb8788e5.js.map +1 -0
  3. package/dist/{common-31040b66.js → common-5b60d682.js} +3 -1
  4. package/dist/common-5b60d682.js.map +1 -0
  5. package/dist/design-system/ApplyGlobalStyles/ApplyGlobalStyles.d.ts +6 -0
  6. package/dist/design-system/ApplyGlobalStyles/ApplyGlobalStyles.d.ts.map +1 -0
  7. package/dist/design-system/ApplyGlobalStyles/index.d.ts +2 -0
  8. package/dist/design-system/ApplyGlobalStyles/index.d.ts.map +1 -0
  9. package/dist/design-system/Button/Button.d.ts +3 -1
  10. package/dist/design-system/Button/Button.d.ts.map +1 -1
  11. package/dist/design-system/Button/styles.d.ts +1 -1
  12. package/dist/design-system/Button/styles.d.ts.map +1 -1
  13. package/dist/design-system/Checkbox/Checkbox.d.ts.map +1 -1
  14. package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts +2 -1
  15. package/dist/design-system/DialogCombobox/DialogComboboxContent.d.ts.map +1 -1
  16. package/dist/design-system/DialogCombobox/DialogComboboxFooter.d.ts.map +1 -1
  17. package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts +2 -1
  18. package/dist/design-system/DialogCombobox/DialogComboboxOptionControlledList.d.ts.map +1 -1
  19. package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts +2 -1
  20. package/dist/design-system/DialogCombobox/DialogComboboxOptionList.d.ts.map +1 -1
  21. package/dist/design-system/DialogCombobox/DialogComboboxOptionListCheckboxItem.d.ts.map +1 -1
  22. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSearch.d.ts.map +1 -1
  23. package/dist/design-system/DialogCombobox/DialogComboboxOptionListSelectItem.d.ts.map +1 -1
  24. package/dist/design-system/DialogCombobox/DialogComboboxSectionHeader.d.ts.map +1 -1
  25. package/dist/design-system/DialogCombobox/DialogComboboxSeparator.d.ts.map +1 -1
  26. package/dist/design-system/DialogCombobox/DialogComboboxTrigger.d.ts.map +1 -1
  27. package/dist/design-system/DialogCombobox/index.d.ts +2 -1
  28. package/dist/design-system/DialogCombobox/index.d.ts.map +1 -1
  29. package/dist/design-system/DialogCombobox/shared.d.ts +5 -3
  30. package/dist/design-system/DialogCombobox/shared.d.ts.map +1 -1
  31. package/dist/design-system/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  32. package/dist/design-system/Empty/Empty.d.ts.map +1 -1
  33. package/dist/design-system/FormV2/index.d.ts +6 -0
  34. package/dist/design-system/FormV2/index.d.ts.map +1 -1
  35. package/dist/design-system/Header/Header.d.ts +2 -2
  36. package/dist/design-system/Header/Header.d.ts.map +1 -1
  37. package/dist/design-system/Icon/Icon.d.ts +1 -1
  38. package/dist/design-system/Icon/Icon.d.ts.map +1 -1
  39. package/dist/design-system/Icon/__generated/icons/ClockKeyIcon.d.ts +4 -0
  40. package/dist/design-system/Icon/__generated/icons/ClockKeyIcon.d.ts.map +1 -0
  41. package/dist/design-system/Icon/__generated/icons/IngestionIcon.d.ts +4 -0
  42. package/dist/design-system/Icon/__generated/icons/IngestionIcon.d.ts.map +1 -0
  43. package/dist/design-system/Icon/__generated/icons/QuestionMarkSpeechBubbleIcon.d.ts +4 -0
  44. package/dist/design-system/Icon/__generated/icons/QuestionMarkSpeechBubbleIcon.d.ts.map +1 -0
  45. package/dist/design-system/Icon/__generated/icons/index.d.ts +3 -0
  46. package/dist/design-system/Icon/__generated/icons/index.d.ts.map +1 -1
  47. package/dist/design-system/Input/Input.d.ts +1 -0
  48. package/dist/design-system/Input/Input.d.ts.map +1 -1
  49. package/dist/design-system/LegacyNotification/LegacyNotification.d.ts.map +1 -1
  50. package/dist/design-system/{Skeleton → LegacySkeleton}/LegacySkeleton.d.ts +2 -1
  51. package/dist/design-system/LegacySkeleton/LegacySkeleton.d.ts.map +1 -0
  52. package/dist/design-system/LegacySkeleton/index.d.ts +2 -0
  53. package/dist/design-system/LegacySkeleton/index.d.ts.map +1 -0
  54. package/dist/design-system/LoadingState/LoadingState.d.ts +45 -0
  55. package/dist/design-system/LoadingState/LoadingState.d.ts.map +1 -0
  56. package/dist/design-system/LoadingState/index.d.ts +2 -0
  57. package/dist/design-system/LoadingState/index.d.ts.map +1 -0
  58. package/dist/design-system/Modal/Modal.d.ts +3 -1
  59. package/dist/design-system/Modal/Modal.d.ts.map +1 -1
  60. package/dist/design-system/Select/Select.d.ts +4 -3
  61. package/dist/design-system/Select/Select.d.ts.map +1 -1
  62. package/dist/design-system/{SkeletonV2 → Skeleton}/GenericSkeleton.d.ts +5 -2
  63. package/dist/design-system/Skeleton/GenericSkeleton.d.ts.map +1 -0
  64. package/dist/design-system/{SkeletonV2 → Skeleton}/ParagraphSkeleton.d.ts +5 -2
  65. package/dist/design-system/Skeleton/ParagraphSkeleton.d.ts.map +1 -0
  66. package/dist/design-system/{SkeletonV2 → Skeleton}/TableSkeleton.d.ts +3 -2
  67. package/dist/design-system/Skeleton/TableSkeleton.d.ts.map +1 -0
  68. package/dist/design-system/Skeleton/TitleSkeleton.d.ts +15 -0
  69. package/dist/design-system/Skeleton/TitleSkeleton.d.ts.map +1 -0
  70. package/dist/design-system/Skeleton/index.d.ts +4 -1
  71. package/dist/design-system/Skeleton/index.d.ts.map +1 -1
  72. package/dist/design-system/Skeleton/utils.d.ts.map +1 -0
  73. package/dist/design-system/Spinner/Spinner.d.ts +4 -1
  74. package/dist/design-system/Spinner/Spinner.d.ts.map +1 -1
  75. package/dist/design-system/TableUI/TableCell.d.ts +1 -1
  76. package/dist/design-system/TableUI/TableCell.d.ts.map +1 -1
  77. package/dist/design-system/TableUI/TableFilterInput.d.ts.map +1 -1
  78. package/dist/design-system/TableUI/TableFilterLayout.d.ts +1 -1
  79. package/dist/design-system/TableUI/TableFilterLayout.d.ts.map +1 -1
  80. package/dist/design-system/TableUI/TableHeader.d.ts +1 -1
  81. package/dist/design-system/TableUI/TableHeader.d.ts.map +1 -1
  82. package/dist/design-system/TableUI/TableRow.d.ts +1 -1
  83. package/dist/design-system/TableUI/TableRow.d.ts.map +1 -1
  84. package/dist/design-system/TableUI/TableRowAction.d.ts +1 -1
  85. package/dist/design-system/TableUI/TableRowAction.d.ts.map +1 -1
  86. package/dist/design-system/TableUI/TableRowSelectCell.d.ts +1 -1
  87. package/dist/design-system/TableUI/TableRowSelectCell.d.ts.map +1 -1
  88. package/dist/design-system/TableUI/tableStyles.d.ts +2 -1
  89. package/dist/design-system/TableUI/tableStyles.d.ts.map +1 -1
  90. package/dist/design-system/Tabs/index.d.ts +1 -0
  91. package/dist/design-system/Tabs/index.d.ts.map +1 -1
  92. package/dist/design-system/Tooltip/InfoTooltip.d.ts +3 -2
  93. package/dist/design-system/Tooltip/InfoTooltip.d.ts.map +1 -1
  94. package/dist/design-system/Tooltip/Tooltip.d.ts +8 -0
  95. package/dist/design-system/Tooltip/Tooltip.d.ts.map +1 -1
  96. package/dist/design-system/TypeaheadCombobox/CountBadge.d.ts +7 -0
  97. package/dist/design-system/TypeaheadCombobox/CountBadge.d.ts.map +1 -0
  98. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts +11 -0
  99. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxCheckboxItem.d.ts.map +1 -0
  100. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts +11 -0
  101. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxControls.d.ts.map +1 -0
  102. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts +17 -0
  103. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxFooter.d.ts.map +1 -0
  104. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts +9 -0
  105. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxInput.d.ts.map +1 -0
  106. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts +17 -0
  107. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenu.d.ts.map +1 -0
  108. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts +19 -0
  109. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMenuItem.d.ts.map +1 -0
  110. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts +16 -0
  111. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxMultiSelectInput.d.ts.map +1 -0
  112. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts +13 -0
  113. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxRoot.d.ts.map +1 -0
  114. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts +2 -0
  115. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSectionHeader.d.ts.map +1 -0
  116. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts +13 -0
  117. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSelectedItem.d.ts.map +1 -0
  118. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts +2 -0
  119. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxSeparator.d.ts.map +1 -0
  120. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts +12 -0
  121. package/dist/design-system/TypeaheadCombobox/TypeaheadComboboxToggleButton.d.ts.map +1 -0
  122. package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts +24 -0
  123. package/dist/design-system/TypeaheadCombobox/hooks/downshiftHookWrappers.d.ts.map +1 -0
  124. package/dist/design-system/TypeaheadCombobox/hooks/index.d.ts +3 -0
  125. package/dist/design-system/TypeaheadCombobox/hooks/index.d.ts.map +1 -0
  126. package/dist/design-system/TypeaheadCombobox/hooks/useTypeaheadComboboxContext.d.ts +2 -0
  127. package/dist/design-system/TypeaheadCombobox/hooks/useTypeaheadComboboxContext.d.ts.map +1 -0
  128. package/dist/design-system/TypeaheadCombobox/index.d.ts +13 -0
  129. package/dist/design-system/TypeaheadCombobox/index.d.ts.map +1 -0
  130. package/dist/design-system/TypeaheadCombobox/providers/TypeaheadComboboxContext.d.ts +14 -0
  131. package/dist/design-system/TypeaheadCombobox/providers/TypeaheadComboboxContext.d.ts.map +1 -0
  132. package/dist/design-system/Typography/Link.d.ts.map +1 -1
  133. package/dist/design-system/Typography/Paragraph.d.ts.map +1 -1
  134. package/dist/design-system/Typography/Text.d.ts.map +1 -1
  135. package/dist/design-system/Typography/Title.d.ts.map +1 -1
  136. package/dist/design-system/_shared_/Combobox/ClearSelectionButton.d.ts +5 -0
  137. package/dist/design-system/_shared_/Combobox/ClearSelectionButton.d.ts.map +1 -0
  138. package/dist/design-system/_shared_/Combobox/EmptyResults.d.ts +2 -0
  139. package/dist/design-system/_shared_/Combobox/EmptyResults.d.ts.map +1 -0
  140. package/dist/design-system/_shared_/Combobox/HintRow.d.ts +8 -0
  141. package/dist/design-system/_shared_/Combobox/HintRow.d.ts.map +1 -0
  142. package/dist/design-system/_shared_/Combobox/LoadingSpinner.d.ts +2 -0
  143. package/dist/design-system/_shared_/Combobox/LoadingSpinner.d.ts.map +1 -0
  144. package/dist/design-system/_shared_/Combobox/SectionHeader.d.ts +2 -0
  145. package/dist/design-system/_shared_/Combobox/SectionHeader.d.ts.map +1 -0
  146. package/dist/design-system/_shared_/Combobox/Separator.d.ts +2 -0
  147. package/dist/design-system/_shared_/Combobox/Separator.d.ts.map +1 -0
  148. package/dist/design-system/_shared_/Combobox/index.d.ts +8 -0
  149. package/dist/design-system/_shared_/Combobox/index.d.ts.map +1 -0
  150. package/dist/design-system/_shared_/Combobox/styles.d.ts +14 -0
  151. package/dist/design-system/_shared_/Combobox/styles.d.ts.map +1 -0
  152. package/dist/design-system/_shared_/index.d.ts +2 -0
  153. package/dist/design-system/_shared_/index.d.ts.map +1 -0
  154. package/dist/design-system/index.d.ts +4 -1
  155. package/dist/design-system/index.d.ts.map +1 -1
  156. package/dist/design-system/types.d.ts +3 -2
  157. package/dist/design-system/types.d.ts.map +1 -1
  158. package/dist/design-system/utils/useStableUid.d.ts +2 -0
  159. package/dist/design-system/utils/useStableUid.d.ts.map +1 -0
  160. package/dist/design-system/utils/useUniqueId.d.ts +2 -0
  161. package/dist/design-system/utils/useUniqueId.d.ts.map +1 -0
  162. package/dist/development.js +2 -1
  163. package/dist/development.js.map +1 -1
  164. package/dist/index.js +1949 -627
  165. package/dist/index.js.map +1 -1
  166. package/dist/rollup/less.d.ts +0 -1
  167. package/dist/rollup/less.d.ts.map +1 -1
  168. package/dist/test-utils/common.d.ts +2 -0
  169. package/dist/test-utils/common.d.ts.map +1 -1
  170. package/dist/test-utils/enzyme/index.d.ts +1 -1
  171. package/dist/test-utils/enzyme/index.d.ts.map +1 -1
  172. package/dist/test-utils/enzyme/selectEvent.d.ts +13 -7
  173. package/dist/test-utils/enzyme/selectEvent.d.ts.map +1 -1
  174. package/dist/test-utils/enzyme/table.d.ts +3 -3
  175. package/dist/test-utils/enzyme/table.d.ts.map +1 -1
  176. package/dist/test-utils/enzyme/utils.d.ts +1 -1
  177. package/dist/test-utils/enzyme/utils.d.ts.map +1 -1
  178. package/dist/test-utils/enzyme.js +34 -13
  179. package/dist/test-utils/enzyme.js.map +1 -1
  180. package/dist/test-utils/rtl/selectEvent.d.ts +6 -0
  181. package/dist/test-utils/rtl/selectEvent.d.ts.map +1 -1
  182. package/dist/test-utils/rtl.js +39 -16
  183. package/dist/test-utils/rtl.js.map +1 -1
  184. package/dist/theme/colorList.d.ts +32 -0
  185. package/dist/theme/colorList.d.ts.map +1 -1
  186. package/dist/theme/colors.d.ts.map +1 -1
  187. package/package.json +5 -2
  188. package/dist/DropdownMenu-e0c3fc1d.js.map +0 -1
  189. package/dist/common-31040b66.js.map +0 -1
  190. package/dist/design-system/DialogCombobox/DialogComboboxEmpty.d.ts +0 -2
  191. package/dist/design-system/DialogCombobox/DialogComboboxEmpty.d.ts.map +0 -1
  192. package/dist/design-system/DialogCombobox/DialogComboboxLoadingSpinner.d.ts +0 -2
  193. package/dist/design-system/DialogCombobox/DialogComboboxLoadingSpinner.d.ts.map +0 -1
  194. package/dist/design-system/Skeleton/LegacySkeleton.d.ts.map +0 -1
  195. package/dist/design-system/SkeletonV2/GenericSkeleton.d.ts.map +0 -1
  196. package/dist/design-system/SkeletonV2/ParagraphSkeleton.d.ts.map +0 -1
  197. package/dist/design-system/SkeletonV2/TableSkeleton.d.ts.map +0 -1
  198. package/dist/design-system/SkeletonV2/TitleSkeleton.d.ts +0 -12
  199. package/dist/design-system/SkeletonV2/TitleSkeleton.d.ts.map +0 -1
  200. package/dist/design-system/SkeletonV2/index.d.ts +0 -5
  201. package/dist/design-system/SkeletonV2/index.d.ts.map +0 -1
  202. package/dist/design-system/SkeletonV2/utils.d.ts.map +0 -1
  203. /package/dist/design-system/{SkeletonV2 → Skeleton}/utils.d.ts +0 -0
@@ -1,6 +1,6 @@
1
- import React__default, { createContext, useContext, useMemo, useEffect, forwardRef, useRef, useImperativeHandle, Children } from 'react';
2
- import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
3
- import { useTheme, ThemeProvider, css } from '@emotion/react';
1
+ import React__default, { createContext, useContext, useMemo, useEffect, useLayoutEffect, forwardRef, useRef, useImperativeHandle, Children } from 'react';
2
+ import { jsx, Fragment, jsxs } from '@emotion/react/jsx-runtime';
3
+ import { useTheme, ThemeProvider, css, keyframes } from '@emotion/react';
4
4
  import { notification, ConfigProvider, Button as Button$1, Tooltip as Tooltip$1, Input as Input$1, Typography as Typography$1 } from 'antd';
5
5
  import * as DropdownMenu$1 from '@radix-ui/react-dropdown-menu';
6
6
  import chroma from 'chroma-js';
@@ -12,6 +12,25 @@ import _isString from 'lodash/isString';
12
12
  import _mapValues from 'lodash/mapValues';
13
13
  import unitless from '@emotion/unitless';
14
14
  import AntDIcon from '@ant-design/icons';
15
+ import _uniqueId from 'lodash/uniqueId';
16
+
17
+ /**
18
+ * Used to hide text visually, but still be readable by screen-readers
19
+ * and other assistive devices.
20
+ *
21
+ * https://www.tpgi.com/the-anatomy-of-visually-hidden/
22
+ */
23
+ const visuallyHidden = {
24
+ '&:not(:focus):not(:active)': {
25
+ clip: 'rect(0 0 0 0)',
26
+ clipPath: 'inset(50%)',
27
+ height: '1px',
28
+ overflow: 'hidden',
29
+ position: 'absolute',
30
+ whiteSpace: 'nowrap',
31
+ width: '1px'
32
+ }
33
+ };
15
34
 
16
35
  const ColorVars = {
17
36
  primary: 'textPrimary',
@@ -87,6 +106,37 @@ function getValidationStateColor(theme, validationState) {
87
106
  }
88
107
  }
89
108
 
109
+ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
110
+ var _ref2 = process.env.NODE_ENV === "production" ? {
111
+ name: "g8zzui",
112
+ styles: "cursor:progress"
113
+ } : {
114
+ name: "4y1qki-AccessibleContainer",
115
+ styles: "cursor:progress;label:AccessibleContainer;",
116
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
117
+ };
118
+ function AccessibleContainer(_ref) {
119
+ let {
120
+ children,
121
+ label
122
+ } = _ref;
123
+ if (!label) {
124
+ return jsx(Fragment, {
125
+ children: children
126
+ });
127
+ }
128
+ return jsxs("div", {
129
+ css: _ref2,
130
+ children: [jsx("span", {
131
+ css: visuallyHidden,
132
+ children: label
133
+ }), jsx("div", {
134
+ "aria-hidden": true,
135
+ children: children
136
+ })]
137
+ });
138
+ }
139
+
90
140
  // Border variables
91
141
  const borders = {
92
142
  borderRadiusMd: 4
@@ -202,7 +252,7 @@ const newGreys = {
202
252
  const colorPaletteSecondary = {
203
253
  brown: '#A6630C',
204
254
  coral: '#C83243',
205
- charcoal: '#5D7283',
255
+ charcoal: colorPalettePrimary.grey600,
206
256
  indigo: '#434A93',
207
257
  lemon: '#FACB66',
208
258
  lime: '#308613',
@@ -271,7 +321,7 @@ const lightColorList = {
271
321
  tagDefault: chroma(colorPalettePrimary.grey600).alpha(0.08).hex(),
272
322
  tagBrown: colorPaletteSecondary.brown,
273
323
  tagCoral: colorPaletteSecondary.coral,
274
- tagCharcoal: colorPalettePrimary.grey600,
324
+ tagCharcoal: colorPaletteSecondary.charcoal,
275
325
  tagIndigo: colorPaletteSecondary.indigo,
276
326
  tagLemon: colorPaletteSecondary.lemon,
277
327
  tagLime: colorPaletteSecondary.lime,
@@ -348,7 +398,7 @@ const darkColorList = {
348
398
  tagDefault: chroma(colorPalettePrimary.white).alpha(0.16).hex(),
349
399
  tagBrown: chroma(colorPaletteSecondary.brown).alpha(0.84).hex(),
350
400
  tagCoral: chroma(colorPaletteSecondary.coral).alpha(0.84).hex(),
351
- tagCharcoal: chroma(colorPalettePrimary.grey600).alpha(0.84).hex(),
401
+ tagCharcoal: chroma(colorPaletteSecondary.charcoal).alpha(0.84).hex(),
352
402
  tagIndigo: chroma(colorPaletteSecondary.indigo).alpha(0.84).hex(),
353
403
  tagLemon: chroma(colorPaletteSecondary.lemon).alpha(0.84).hex(),
354
404
  tagLime: chroma(colorPaletteSecondary.lime).alpha(0.84).hex(),
@@ -370,6 +420,38 @@ const darkColorList = {
370
420
  backgroundDanger: 'rgba(200,45,76,0.08)',
371
421
  backgroundWarning: 'rgba(222,121,33,0.08)'
372
422
  };
423
+ const secondaryColorsUsingNewGreys = {
424
+ charcoal: newGreys.grey600
425
+ };
426
+ const lightColorsUsingNewGreys = {
427
+ actionDefaultBorderDefault: newGreys.grey300,
428
+ actionDefaultTextDefault: newGreys.grey800,
429
+ actionDisabledBackground: newGreys.grey200,
430
+ actionDisabledText: newGreys.grey400,
431
+ backgroundSecondary: newGreys.grey100,
432
+ border: newGreys.grey300,
433
+ borderDecorative: newGreys.grey200,
434
+ textPrimary: newGreys.grey800,
435
+ textSecondary: newGreys.grey600,
436
+ textPlaceholder: newGreys.grey400,
437
+ textValidationInfo: newGreys.grey600,
438
+ overlayOverlay: chroma(newGreys.grey100).alpha(0.72).hex(),
439
+ tagDefault: chroma(newGreys.grey600).alpha(0.08).hex(),
440
+ tagCharcoal: newGreys.grey600,
441
+ typographyCodeBg: chroma(newGreys.grey600).alpha(0.08).hex(),
442
+ tableRowHover: chroma(newGreys.grey600).alpha(0.04).hex(),
443
+ tooltipBackgroundTooltip: newGreys.grey800
444
+ };
445
+ const darkColorsUsingNewGreys = {
446
+ actionPrimaryTextDefault: newGreys.grey800,
447
+ actionPrimaryTextHover: newGreys.grey800,
448
+ actionPrimaryTextPress: newGreys.grey800,
449
+ backgroundPrimary: newGreys.grey800,
450
+ backgroundSecondary: newGreys.grey700,
451
+ textPlaceholder: chroma(newGreys.grey400).alpha(0.84).hex(),
452
+ overlayOverlay: chroma(newGreys.grey800).alpha(0.72).hex(),
453
+ tagCharcoal: chroma(newGreys.grey600).alpha(0.84).hex()
454
+ };
373
455
 
374
456
  const darkColors = {
375
457
  ...darkColorList,
@@ -382,12 +464,18 @@ const lightColors = {
382
464
  ...colorPaletteSecondary
383
465
  };
384
466
  function getSemanticColors(isDarkMode) {
385
- const colorList = isDarkMode ? darkColors : lightColors;
386
467
  const enableNewGreys = safex('databricks.fe.designsystem.enableNewGreys', false);
387
- return enableNewGreys ? {
388
- ...colorList,
389
- ...newGreys
390
- } : colorList;
468
+ const colorList = isDarkMode ? darkColors : lightColors;
469
+ if (enableNewGreys) {
470
+ return {
471
+ ...colorList,
472
+ ...newGreys,
473
+ ...secondaryColorsUsingNewGreys,
474
+ ...(isDarkMode ? darkColorsUsingNewGreys : lightColorsUsingNewGreys)
475
+ };
476
+ } else {
477
+ return colorList;
478
+ }
391
479
  }
392
480
 
393
481
  // TODO (FEINF-1674): Remove when removing USE_NEW_RADIO_STYLES
@@ -827,6 +915,7 @@ const Icon = props => {
827
915
  } : undefined, [Component]);
828
916
  return jsx(DesignSystemAntDConfigProvider, {
829
917
  children: jsx(AntDIcon, {
918
+ "aria-hidden": "true",
830
919
  css: getIconEmotionStyles(theme),
831
920
  component: MemoizedComponent,
832
921
  style: {
@@ -1103,6 +1192,29 @@ function InfoIcon(props) {
1103
1192
  });
1104
1193
  }
1105
1194
 
1195
+ function SvgLoadingIcon(props) {
1196
+ return jsx("svg", {
1197
+ xmlns: "http://www.w3.org/2000/svg",
1198
+ width: "1em",
1199
+ height: "1em",
1200
+ fill: "none",
1201
+ viewBox: "0 0 24 24",
1202
+ ...props,
1203
+ children: jsx("path", {
1204
+ fill: "currentColor",
1205
+ fillRule: "evenodd",
1206
+ d: "M23.212 12a.788.788 0 0 1-.789-.788 9.57 9.57 0 0 0-.757-3.751 9.662 9.662 0 0 0-5.129-5.129 9.587 9.587 0 0 0-3.749-.755.788.788 0 0 1 0-1.577c1.513 0 2.983.296 4.365.882a11.128 11.128 0 0 1 3.562 2.403 11.157 11.157 0 0 1 3.283 7.927.785.785 0 0 1-.786.788Z",
1207
+ clipRule: "evenodd"
1208
+ })
1209
+ });
1210
+ }
1211
+ function LoadingIcon(props) {
1212
+ return jsx(Icon, {
1213
+ ...props,
1214
+ component: SvgLoadingIcon
1215
+ });
1216
+ }
1217
+
1106
1218
  function SvgNewWindowIcon(props) {
1107
1219
  return jsxs("svg", {
1108
1220
  xmlns: "http://www.w3.org/2000/svg",
@@ -1127,11 +1239,132 @@ function NewWindowIcon(props) {
1127
1239
  });
1128
1240
  }
1129
1241
 
1242
+ let sequentialCounter = 0;
1243
+ function useStableUid() {
1244
+ return useMemo(() => sequentialCounter++, []);
1245
+ }
1246
+
1247
+ /** Props for UI components that support a "loading" state. */
1248
+
1249
+ /**
1250
+ * A handler for integrating UI components with external latency instrumentation.
1251
+ * If provided via `LoadingStateContext`, hooks will be called whenever child
1252
+ * components in a "loading" state are mounted and unmounted.
1253
+ */
1254
+
1255
+ const LoadingStateContext = /*#__PURE__*/createContext(null);
1256
+ /**
1257
+ * Indicates that the containing component is in a "loading" state, i.e. that the UI
1258
+ * displayed to the user is semantically equivalent to them seeing a spinner or a
1259
+ * loading indicator. This means that the UI is not in its final settled state yet.
1260
+ *
1261
+ * All components that are in a "loading" state should render a `<LoadingState>`
1262
+ * component, preferrably with an appropriate description.
1263
+ *
1264
+ * By itself, `<LoadingState>` doesn't do anything, but if used within `LoadingStateContext`,
1265
+ * it will call the provided `startLoading()`/`endLoading()` hooks when the component
1266
+ * is mounted/unmounted, which can be used to integrate existing latency instrumentation.
1267
+ */
1268
+ const LoadingState = _ref => {
1269
+ let {
1270
+ description = 'Generic UI loading state'
1271
+ } = _ref;
1272
+ const uid = useStableUid();
1273
+ const loadingStateContext = useContext(LoadingStateContext);
1274
+ useLayoutEffect(() => {
1275
+ // mount
1276
+ if (loadingStateContext) {
1277
+ loadingStateContext.startLoading(uid, description);
1278
+ }
1279
+ return () => {
1280
+ // unmount
1281
+ if (loadingStateContext) {
1282
+ loadingStateContext.endLoading(uid);
1283
+ }
1284
+ };
1285
+ }, [uid, description, loadingStateContext]);
1286
+ return null;
1287
+ };
1288
+
1289
+ const rotate = keyframes({
1290
+ '0%': {
1291
+ transform: 'rotate(0deg) translate3d(0, 0, 0)'
1292
+ },
1293
+ '100%': {
1294
+ transform: 'rotate(360deg) translate3d(0, 0, 0)'
1295
+ }
1296
+ });
1297
+ const cssSpinner = function (theme) {
1298
+ let frameRate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 60;
1299
+ let delay = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
1300
+ let animationDuration = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
1301
+ let inheritColor = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
1302
+ const styles = {
1303
+ animation: `${rotate} ${animationDuration}s steps(${frameRate}, end) infinite`,
1304
+ ...(inheritColor ? {
1305
+ color: 'inherit'
1306
+ } : {
1307
+ color: theme.colors.textSecondary
1308
+ }),
1309
+ animationDelay: `${delay}s`,
1310
+ '@media only percy': {
1311
+ animation: 'none'
1312
+ }
1313
+ };
1314
+ return /*#__PURE__*/css(importantify(styles), process.env.NODE_ENV === "production" ? "" : ";label:cssSpinner;");
1315
+ };
1316
+ const Spinner = _ref => {
1317
+ let {
1318
+ frameRate,
1319
+ size = 'default',
1320
+ delay,
1321
+ className: propClass,
1322
+ label,
1323
+ animationDuration,
1324
+ inheritColor,
1325
+ loading = true,
1326
+ loadingDescription = 'Spinner',
1327
+ ...props
1328
+ } = _ref;
1329
+ const {
1330
+ classNamePrefix,
1331
+ theme
1332
+ } = useDesignSystemTheme();
1333
+
1334
+ // We use Antd classes to keep styling unchanged
1335
+ // TODO(FEINF-1407): We want to move away from Antd classes and use Emotion for styling in the future
1336
+ const sizeSuffix = size === 'small' ? '-sm' : size === 'large' ? '-lg' : '';
1337
+ const sizeClass = sizeSuffix ? `${classNamePrefix}-spin${sizeSuffix}` : '';
1338
+ const wrapperClass = `${propClass || ''} ${classNamePrefix}-spin ${sizeClass} ${classNamePrefix}-spin-spinning ${DU_BOIS_ENABLE_ANIMATION_CLASSNAME}`.trim();
1339
+ const className = `${classNamePrefix}-spin-dot ${DU_BOIS_ENABLE_ANIMATION_CLASSNAME}`.trim();
1340
+ return (
1341
+ // className has to follow {...props}, otherwise is `css` prop is passed down it will overwrite our className
1342
+ jsxs("div", {
1343
+ ...props,
1344
+ className: wrapperClass,
1345
+ children: [loading && jsx(LoadingState, {
1346
+ description: loadingDescription
1347
+ }), jsx(AccessibleContainer, {
1348
+ label: label,
1349
+ children: jsx(LoadingIcon, {
1350
+ "aria-hidden": "false",
1351
+ css: cssSpinner(theme, frameRate, delay, animationDuration, inheritColor),
1352
+ className: className
1353
+ })
1354
+ })]
1355
+ })
1356
+ );
1357
+ };
1358
+
1130
1359
  function getDefaultStyles(theme) {
1131
- return {
1360
+ let loading = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1361
+ const defaultStyles = {
1132
1362
  backgroundColor: theme.colors.actionDefaultBackgroundDefault,
1133
1363
  borderColor: theme.colors.actionDefaultBorderDefault,
1134
- color: theme.colors.actionDefaultTextDefault,
1364
+ color: theme.colors.actionDefaultTextDefault
1365
+ };
1366
+ return {
1367
+ ...defaultStyles,
1135
1368
  lineHeight: theme.typography.lineHeightBase,
1136
1369
  textDecoration: 'none',
1137
1370
  '&:hover': {
@@ -1140,17 +1373,20 @@ function getDefaultStyles(theme) {
1140
1373
  color: theme.colors.actionDefaultTextHover
1141
1374
  },
1142
1375
  '&:active': {
1143
- backgroundColor: theme.colors.actionDefaultBackgroundPress,
1376
+ backgroundColor: loading ? theme.colors.actionDefaultBackgroundDefault : theme.colors.actionDefaultBackgroundPress,
1144
1377
  borderColor: theme.colors.actionDefaultBorderPress,
1145
1378
  color: theme.colors.actionDefaultTextPress
1146
1379
  }
1147
1380
  };
1148
1381
  }
1149
1382
  function getPrimaryStyles(theme) {
1150
- return {
1383
+ const defaultStyles = {
1151
1384
  backgroundColor: theme.colors.actionPrimaryBackgroundDefault,
1152
1385
  borderColor: 'transparent',
1153
- color: theme.colors.actionPrimaryTextDefault,
1386
+ color: theme.colors.actionPrimaryTextDefault
1387
+ };
1388
+ return {
1389
+ ...defaultStyles,
1154
1390
  textShadow: 'none',
1155
1391
  '&:hover': {
1156
1392
  backgroundColor: theme.colors.actionPrimaryBackgroundHover,
@@ -1165,10 +1401,13 @@ function getPrimaryStyles(theme) {
1165
1401
  };
1166
1402
  }
1167
1403
  function getLinkStyles$1(theme) {
1168
- return {
1404
+ const defaultStyles = {
1169
1405
  backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
1170
1406
  borderColor: theme.colors.actionTertiaryBackgroundDefault,
1171
- color: theme.colors.actionTertiaryTextDefault,
1407
+ color: theme.colors.actionTertiaryTextDefault
1408
+ };
1409
+ return {
1410
+ ...defaultStyles,
1172
1411
  '&:hover': {
1173
1412
  backgroundColor: theme.colors.actionTertiaryBackgroundHover,
1174
1413
  borderColor: 'transparent',
@@ -1186,10 +1425,13 @@ function getLinkStyles$1(theme) {
1186
1425
  };
1187
1426
  }
1188
1427
  function getPrimaryDangerStyles(theme) {
1189
- return {
1428
+ const defaultStyles = {
1190
1429
  backgroundColor: theme.colors.actionDangerPrimaryBackgroundDefault,
1191
1430
  borderColor: 'transparent',
1192
- color: theme.colors.white,
1431
+ color: theme.colors.white
1432
+ };
1433
+ return {
1434
+ ...defaultStyles,
1193
1435
  '&:hover': {
1194
1436
  backgroundColor: theme.colors.actionDangerPrimaryBackgroundHover,
1195
1437
  borderColor: 'transparent',
@@ -1206,10 +1448,13 @@ function getPrimaryDangerStyles(theme) {
1206
1448
  };
1207
1449
  }
1208
1450
  function getSecondaryDangerStyles(theme) {
1209
- return {
1451
+ const defaultStyles = {
1210
1452
  backgroundColor: theme.colors.actionDangerDefaultBackgroundDefault,
1211
1453
  borderColor: theme.colors.actionDangerDefaultBorderDefault,
1212
- color: theme.colors.actionDangerDefaultTextDefault,
1454
+ color: theme.colors.actionDangerDefaultTextDefault
1455
+ };
1456
+ return {
1457
+ ...defaultStyles,
1213
1458
  '&:hover': {
1214
1459
  backgroundColor: theme.colors.actionDangerDefaultBackgroundHover,
1215
1460
  borderColor: theme.colors.actionDangerDefaultBorderHover,
@@ -1226,10 +1471,13 @@ function getSecondaryDangerStyles(theme) {
1226
1471
  };
1227
1472
  }
1228
1473
  function getDisabledStyles(theme) {
1229
- return {
1474
+ const defaultStyles = {
1230
1475
  backgroundColor: theme.colors.actionDisabledBackground,
1231
1476
  borderColor: 'transparent',
1232
- color: theme.colors.actionDisabledText,
1477
+ color: theme.colors.actionDisabledText
1478
+ };
1479
+ return {
1480
+ ...defaultStyles,
1233
1481
  '&:hover': {
1234
1482
  backgroundColor: theme.colors.actionDisabledBackground,
1235
1483
  borderColor: 'transparent',
@@ -1243,10 +1491,13 @@ function getDisabledStyles(theme) {
1243
1491
  };
1244
1492
  }
1245
1493
  function getDisabledTertiaryStyles(theme) {
1246
- return {
1494
+ const defaultStyles = {
1247
1495
  backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
1248
1496
  borderColor: 'transparent',
1249
- color: theme.colors.actionDisabledText,
1497
+ color: theme.colors.actionDisabledText
1498
+ };
1499
+ return {
1500
+ ...defaultStyles,
1250
1501
  '&:hover': {
1251
1502
  backgroundColor: theme.colors.actionTertiaryBackgroundDefault,
1252
1503
  borderColor: 'transparent',
@@ -1368,7 +1619,7 @@ const getButtonEmotionStyles = _ref => {
1368
1619
  outlineOffset: '1px',
1369
1620
  outlineColor: theme.isDarkMode ? theme.colors.actionDefaultBorderFocus : theme.colors.primary
1370
1621
  },
1371
- ...getDefaultStyles(theme),
1622
+ ...getDefaultStyles(theme, loading),
1372
1623
  [`&${classPrimary}`]: {
1373
1624
  ...getPrimaryStyles(theme)
1374
1625
  },
@@ -1402,11 +1653,15 @@ const getButtonEmotionStyles = _ref => {
1402
1653
  }
1403
1654
  })
1404
1655
  },
1656
+ [clsLoadingIcon]: {
1657
+ display: 'none'
1658
+ },
1405
1659
  // Loading styles
1406
1660
  ...(loading && {
1407
1661
  '::before': {
1408
1662
  opacity: 0
1409
1663
  },
1664
+ cursor: 'default',
1410
1665
  [`${clsLoadingIcon}`]: {
1411
1666
  ...(onlyIcon ? {
1412
1667
  // In case of only icon, the icon is already centered but vertically not aligned, this fixes that
@@ -1435,7 +1690,7 @@ const getButtonEmotionStyles = _ref => {
1435
1690
  visibility: 'hidden',
1436
1691
  // Add horizontal space for icon
1437
1692
  ...(withIcon && {
1438
- paddingLeft: theme.spacing.sm * 2 + 14
1693
+ paddingLeft: theme.general.iconFontSize + theme.spacing.xs
1439
1694
  })
1440
1695
  }
1441
1696
  }),
@@ -1469,7 +1724,12 @@ const getButtonEmotionStyles = _ref => {
1469
1724
  },
1470
1725
  '&:active > .anticon': {
1471
1726
  color: tertiaryColors['&:active'].color
1472
- }
1727
+ },
1728
+ ...(loading && {
1729
+ '&&, &:hover, &:active': {
1730
+ backgroundColor: 'transparent'
1731
+ }
1732
+ })
1473
1733
  },
1474
1734
  [`&:enabled:not(${classLink}) > .anticon`]: {
1475
1735
  color: theme.colors.textSecondary
@@ -1481,6 +1741,11 @@ const getButtonEmotionStyles = _ref => {
1481
1741
  color: theme.colors.actionDisabledText
1482
1742
  }
1483
1743
  }),
1744
+ ...(loading && {
1745
+ '&&, &:hover, &:active': {
1746
+ backgroundColor: 'transparent'
1747
+ }
1748
+ }),
1484
1749
  '&[disabled]:hover': {
1485
1750
  backgroundColor: 'transparent'
1486
1751
  }
@@ -1503,6 +1768,16 @@ const getButtonEmotionStyles = _ref => {
1503
1768
  padding: '0 6px',
1504
1769
  lineHeight: theme.typography.lineHeightSm,
1505
1770
  color: theme.colors.textSecondary,
1771
+ ...(loading && {
1772
+ '&&, &:hover, &:active': {
1773
+ backgroundColor: 'transparent',
1774
+ borderColor: theme.colors.actionDefaultBorderDefault
1775
+ },
1776
+ '&[disabled], &[disabled]:hover, &[disabled]:active': {
1777
+ backgroundColor: 'transparent',
1778
+ borderColor: 'transparent'
1779
+ }
1780
+ }),
1506
1781
  '& > span': {
1507
1782
  verticalAlign: -1,
1508
1783
  height: theme.general.heightSm / 2,
@@ -1539,9 +1814,13 @@ const Button = /* #__PURE__ */(() => {
1539
1814
  children,
1540
1815
  size,
1541
1816
  type,
1817
+ loading,
1818
+ loadingDescription = 'Button',
1542
1819
  endIcon,
1820
+ onClick,
1543
1821
  dangerouslySetForceIconStyles,
1544
1822
  dangerouslyUseFocusPseudoClass,
1823
+ dangerouslyAppendWrapperCss,
1545
1824
  ...props
1546
1825
  } = _ref2;
1547
1826
  const {
@@ -1552,15 +1831,58 @@ const Button = /* #__PURE__ */(() => {
1552
1831
  USE_FLEX_BUTTON: isFlex
1553
1832
  } = useDesignSystemFlags();
1554
1833
  const clsEndIcon = getEndIconClsName(theme);
1834
+ const loadingCls = `${classNamePrefix}-btn-loading-icon`;
1835
+ const buttonRef = useRef(null);
1836
+ useImperativeHandle(ref, () => buttonRef.current);
1837
+
1838
+ // Needed to keep backwards compatibility and support existing unit tests
1839
+ useEffect(() => {
1840
+ if (buttonRef.current) {
1841
+ if (loading) {
1842
+ buttonRef.current.setAttribute('loading', 'true');
1843
+ buttonRef.current.classList.add(`${classNamePrefix}-btn-loading`);
1844
+ } else {
1845
+ buttonRef.current.setAttribute('loading', 'false');
1846
+ buttonRef.current.classList.remove(`${classNamePrefix}-btn-loading`);
1847
+ }
1848
+ }
1849
+ }, [loading, classNamePrefix]);
1850
+ const iconOnly = Boolean((props.icon || endIcon) && !children);
1851
+ const handleClick = event => {
1852
+ if (loading) {
1853
+ return;
1854
+ }
1855
+ onClick === null || onClick === void 0 ? void 0 : onClick(event);
1856
+ };
1857
+ const loadingSpinner = jsx(Spinner, {
1858
+ className: loadingCls,
1859
+ animationDuration: 8,
1860
+ inheritColor: true,
1861
+ label: "loading",
1862
+ "aria-label": "loading",
1863
+ loadingDescription: loadingDescription,
1864
+ css: /*#__PURE__*/css({
1865
+ color: 'inherit !important',
1866
+ pointerEvents: 'none',
1867
+ ...(!iconOnly && !dangerouslySetForceIconStyles && {
1868
+ '.anticon': {
1869
+ verticalAlign: '-0.2em'
1870
+ }
1871
+ }),
1872
+ '[aria-hidden="true"]': {
1873
+ display: 'inline'
1874
+ }
1875
+ }, process.env.NODE_ENV === "production" ? "" : ";label:loadingSpinner;")
1876
+ });
1555
1877
  return jsx(DesignSystemAntDConfigProvider, {
1556
1878
  children: jsx(Button$1, {
1557
1879
  ...props,
1558
1880
  css: getButtonEmotionStyles({
1559
1881
  theme,
1560
1882
  classNamePrefix,
1561
- loading: Boolean(props.loading),
1883
+ loading: Boolean(loading),
1562
1884
  withIcon: Boolean(props.icon),
1563
- onlyIcon: Boolean((props.icon || endIcon) && !children),
1885
+ onlyIcon: iconOnly,
1564
1886
  isAnchor: Boolean(props.href && !type),
1565
1887
  danger: Boolean(props.danger),
1566
1888
  enableAnimation: theme.options.enableAnimation,
@@ -1572,15 +1894,18 @@ const Button = /* #__PURE__ */(() => {
1572
1894
  }),
1573
1895
  href: props.disabled ? undefined : props.href,
1574
1896
  ...dangerouslySetAntdProps,
1575
- ref: ref,
1897
+ onClick: handleClick,
1898
+ icon: loading ? loadingSpinner : props.icon,
1899
+ ref: buttonRef,
1576
1900
  type: type === 'tertiary' ? 'link' : type,
1577
1901
  children: children && jsxs("span", {
1578
1902
  style: {
1579
- visibility: props !== null && props !== void 0 && props.loading ? 'hidden' : 'visible',
1903
+ visibility: loading ? 'hidden' : 'visible',
1580
1904
  ...(isFlex && {
1581
1905
  display: 'inline-flex',
1582
1906
  alignItems: 'center'
1583
- })
1907
+ }),
1908
+ ...dangerouslyAppendWrapperCss
1584
1909
  },
1585
1910
  children: [children, endIcon && jsx("span", {
1586
1911
  className: clsEndIcon,
@@ -1605,6 +1930,10 @@ const Button = /* #__PURE__ */(() => {
1605
1930
  return Button;
1606
1931
  })();
1607
1932
 
1933
+ function useUniqueId(prefix) {
1934
+ return useMemo(() => _uniqueId(prefix), [prefix]);
1935
+ }
1936
+
1608
1937
  const Tooltip = _ref => {
1609
1938
  let {
1610
1939
  children,
@@ -1612,29 +1941,51 @@ const Tooltip = _ref => {
1612
1941
  placement = 'top',
1613
1942
  dataTestId,
1614
1943
  dangerouslySetAntdProps,
1944
+ silenceScreenReader = false,
1945
+ useAsLabel = false,
1615
1946
  ...props
1616
1947
  } = _ref;
1617
1948
  const {
1618
1949
  theme
1619
1950
  } = useDesignSystemTheme();
1951
+ const id = useUniqueId('dubois-tooltip-component-');
1620
1952
  if (!title) {
1621
1953
  return jsx(React__default.Fragment, {
1622
1954
  children: children
1623
1955
  });
1624
1956
  }
1957
+ const titleProps = silenceScreenReader ? {} : {
1958
+ 'aria-live': 'polite',
1959
+ 'aria-relevant': 'additions'
1960
+ };
1961
+ if (dataTestId) {
1962
+ // TODO FEINF-1337 - this should turn into data-testid
1963
+ titleProps['data-test-id'] = dataTestId;
1964
+ }
1965
+ const liveTitle = title && /*#__PURE__*/React__default.isValidElement(title) ? /*#__PURE__*/React__default.cloneElement(title, titleProps) : jsx("span", {
1966
+ ...titleProps,
1967
+ children: title
1968
+ });
1969
+ const ariaProps = {
1970
+ [useAsLabel ? 'aria-labelledby' : 'aria-describedby']: id,
1971
+ 'aria-hidden': false
1972
+ };
1973
+ const childWithProps = /*#__PURE__*/React__default.isValidElement(children) ? /*#__PURE__*/React__default.cloneElement(children, {
1974
+ ...ariaProps,
1975
+ ...children.props
1976
+ }) : _isNil(children) ? children : jsx("span", {
1977
+ ...ariaProps,
1978
+ children: children
1979
+ });
1625
1980
  const {
1626
1981
  overlayInnerStyle,
1627
1982
  overlayStyle,
1628
1983
  ...delegatedDangerouslySetAntdProps
1629
1984
  } = dangerouslySetAntdProps || {};
1630
1985
  return jsx(DesignSystemAntDConfigProvider, {
1631
- children: jsx(Tooltip$1
1632
- // eslint-disable-next-line react/forbid-dom-props -- FEINF-1337 - this should turn into data-testid
1633
- , {
1634
- title: jsx("span", {
1635
- "data-test-id": dataTestId,
1636
- children: title
1637
- }),
1986
+ children: jsx(Tooltip$1, {
1987
+ id: id,
1988
+ title: liveTitle,
1638
1989
  placement: placement
1639
1990
  // Always trigger on hover and focus
1640
1991
  ,
@@ -1655,7 +2006,7 @@ const Tooltip = _ref => {
1655
2006
  }, process.env.NODE_ENV === "production" ? "" : ";label:Tooltip;"),
1656
2007
  ...delegatedDangerouslySetAntdProps,
1657
2008
  ...props,
1658
- children: children
2009
+ children: childWithProps
1659
2010
  })
1660
2011
  });
1661
2012
  };
@@ -1940,6 +2291,7 @@ function Hint(userProps) {
1940
2291
  }
1941
2292
 
1942
2293
  const getLinkStyles = (theme, clsPrefix) => {
2294
+ const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
1943
2295
  const classTypography = `.${clsPrefix}-typography`;
1944
2296
  const styles = {
1945
2297
  [`&${classTypography}, &${classTypography}:focus`]: {
@@ -1957,7 +2309,10 @@ const getLinkStyles = (theme, clsPrefix) => {
1957
2309
  textDecoration: 'underline'
1958
2310
  },
1959
2311
  '.anticon': {
1960
- fontSize: 12
2312
+ fontSize: 12,
2313
+ ...(centerIcons ? {
2314
+ verticalAlign: 'baseline'
2315
+ } : {})
1961
2316
  }
1962
2317
  };
1963
2318
  return /*#__PURE__*/css(styles, process.env.NODE_ENV === "production" ? "" : ";label:getLinkStyles;");
@@ -2034,7 +2389,8 @@ function Link(_ref) {
2034
2389
  const {
2035
2390
  Paragraph: AntDParagraph
2036
2391
  } = Typography$1;
2037
- function getParagraphEmotionStyles(theme, props, centerIcons) {
2392
+ function getParagraphEmotionStyles(theme, props) {
2393
+ const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
2038
2394
  return /*#__PURE__*/css({
2039
2395
  '&&': {
2040
2396
  fontSize: theme.typography.fontSizeBase,
@@ -2067,12 +2423,11 @@ function Paragraph(userProps) {
2067
2423
  const {
2068
2424
  theme
2069
2425
  } = useDesignSystemTheme();
2070
- const centerIconsInText = safex('databricks.fe.designsystem.centerIconsInText', false);
2071
2426
  return jsx(DesignSystemAntDConfigProvider, {
2072
2427
  children: jsx(AntDParagraph, {
2073
2428
  ...props,
2074
2429
  className: props.className,
2075
- css: getParagraphEmotionStyles(theme, userProps, centerIconsInText),
2430
+ css: getParagraphEmotionStyles(theme, userProps),
2076
2431
  ...dangerouslySetAntdProps
2077
2432
  })
2078
2433
  });
@@ -2081,19 +2436,14 @@ function Paragraph(userProps) {
2081
2436
  const {
2082
2437
  Text: AntDText
2083
2438
  } = Typography$1;
2084
- function getTextEmotionStyles(theme, props, centerIcons) {
2439
+ function getTextEmotionStyles(theme, props) {
2440
+ const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
2085
2441
  return /*#__PURE__*/css({
2086
2442
  '&&': {
2087
2443
  fontSize: theme.typography.fontSizeBase,
2088
2444
  lineHeight: theme.typography.lineHeightBase,
2089
2445
  color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
2090
- },
2091
- ...(centerIcons && {
2092
- '& .anticon': {
2093
- lineHeight: theme.typography.lineHeightBase,
2094
- verticalAlign: 'middle'
2095
- }
2096
- })
2446
+ }
2097
2447
  }, props.disabled && {
2098
2448
  '&&': {
2099
2449
  color: theme.colors.actionDisabledText
@@ -2129,7 +2479,8 @@ function getTextEmotionStyles(theme, props, centerIcons) {
2129
2479
  lineHeight: theme.typography.lineHeightXxl,
2130
2480
  ...(centerIcons && {
2131
2481
  '& .anticon': {
2132
- lineHeight: theme.typography.lineHeightXxl
2482
+ lineHeight: theme.typography.lineHeightXxl,
2483
+ verticalAlign: 'middle'
2133
2484
  }
2134
2485
  })
2135
2486
  };
@@ -2139,7 +2490,8 @@ function getTextEmotionStyles(theme, props, centerIcons) {
2139
2490
  lineHeight: theme.typography.lineHeightXl,
2140
2491
  ...(centerIcons && {
2141
2492
  '& .anticon': {
2142
- lineHeight: theme.typography.lineHeightXl
2493
+ lineHeight: theme.typography.lineHeightXl,
2494
+ verticalAlign: 'middle'
2143
2495
  }
2144
2496
  })
2145
2497
  };
@@ -2149,7 +2501,8 @@ function getTextEmotionStyles(theme, props, centerIcons) {
2149
2501
  lineHeight: theme.typography.lineHeightLg,
2150
2502
  ...(centerIcons && {
2151
2503
  '& .anticon': {
2152
- lineHeight: theme.typography.lineHeightLg
2504
+ lineHeight: theme.typography.lineHeightLg,
2505
+ verticalAlign: 'middle'
2153
2506
  }
2154
2507
  })
2155
2508
  };
@@ -2159,21 +2512,12 @@ function getTextEmotionStyles(theme, props, centerIcons) {
2159
2512
  lineHeight: theme.typography.lineHeightSm,
2160
2513
  ...(centerIcons && {
2161
2514
  '& .anticon': {
2162
- lineHeight: theme.typography.lineHeightSm
2515
+ verticalAlign: '-0.219em'
2163
2516
  }
2164
2517
  })
2165
2518
  };
2166
2519
  default:
2167
- return {
2168
- fontSize: theme.typography.fontSizeMd,
2169
- lineHeight: theme.typography.lineHeightMd,
2170
- ...(centerIcons && {
2171
- '& .anticon': {
2172
- lineHeight: theme.typography.lineHeightMd,
2173
- verticalAlign: 'sub'
2174
- }
2175
- })
2176
- };
2520
+ return {};
2177
2521
  }
2178
2522
  })()
2179
2523
  }, props.withoutMargins && {
@@ -2196,12 +2540,11 @@ function Text(userProps) {
2196
2540
  const {
2197
2541
  theme
2198
2542
  } = useDesignSystemTheme();
2199
- const centerIconsInText = safex('databricks.fe.designsystem.centerIconsInText', false);
2200
2543
  return jsx(DesignSystemAntDConfigProvider, {
2201
2544
  children: jsx(AntDText, {
2202
2545
  ...props,
2203
2546
  className: props.className,
2204
- css: getTextEmotionStyles(theme, userProps, centerIconsInText),
2547
+ css: getTextEmotionStyles(theme, userProps),
2205
2548
  ...dangerouslySetAntdProps
2206
2549
  })
2207
2550
  });
@@ -2210,7 +2553,8 @@ function Text(userProps) {
2210
2553
  const {
2211
2554
  Title: AntDTitle
2212
2555
  } = Typography$1;
2213
- function getLevelStyles(theme, props, centerIcons) {
2556
+ function getLevelStyles(theme, props) {
2557
+ const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
2214
2558
  switch (props.level) {
2215
2559
  case 1:
2216
2560
  return /*#__PURE__*/css({
@@ -2220,7 +2564,7 @@ function getLevelStyles(theme, props, centerIcons) {
2220
2564
  fontWeight: theme.typography.typographyBoldFontWeight
2221
2565
  },
2222
2566
  ...(centerIcons && {
2223
- '& .anticon': {
2567
+ '& > .anticon': {
2224
2568
  lineHeight: theme.typography.lineHeightXxl
2225
2569
  }
2226
2570
  })
@@ -2233,7 +2577,7 @@ function getLevelStyles(theme, props, centerIcons) {
2233
2577
  fontWeight: theme.typography.typographyBoldFontWeight
2234
2578
  },
2235
2579
  ...(centerIcons && {
2236
- '& .anticon': {
2580
+ '& > .anticon': {
2237
2581
  lineHeight: theme.typography.lineHeightXl
2238
2582
  }
2239
2583
  })
@@ -2246,7 +2590,7 @@ function getLevelStyles(theme, props, centerIcons) {
2246
2590
  fontWeight: theme.typography.typographyBoldFontWeight
2247
2591
  },
2248
2592
  ...(centerIcons && {
2249
- '& .anticon': {
2593
+ '& > .anticon': {
2250
2594
  lineHeight: theme.typography.lineHeightLg
2251
2595
  }
2252
2596
  })
@@ -2260,20 +2604,21 @@ function getLevelStyles(theme, props, centerIcons) {
2260
2604
  fontWeight: theme.typography.typographyBoldFontWeight
2261
2605
  },
2262
2606
  ...(centerIcons && {
2263
- '& .anticon': {
2607
+ '& > .anticon': {
2264
2608
  lineHeight: theme.typography.lineHeightMd
2265
2609
  }
2266
2610
  })
2267
2611
  }, process.env.NODE_ENV === "production" ? "" : ";label:getLevelStyles;");
2268
2612
  }
2269
2613
  }
2270
- function getTitleEmotionStyles(theme, props, centerIcons) {
2271
- return /*#__PURE__*/css(getLevelStyles(theme, props, centerIcons), {
2614
+ function getTitleEmotionStyles(theme, props) {
2615
+ const centerIcons = safex('databricks.fe.designsystem.centerIconsInText', false);
2616
+ return /*#__PURE__*/css(getLevelStyles(theme, props), {
2272
2617
  '&&': {
2273
2618
  color: getTypographyColor(theme, props.color, theme.colors.textPrimary)
2274
2619
  },
2275
2620
  ...(centerIcons && {
2276
- '& .anticon': {
2621
+ '& > .anticon': {
2277
2622
  verticalAlign: 'middle'
2278
2623
  }
2279
2624
  })
@@ -2295,12 +2640,11 @@ function Title(userProps) {
2295
2640
  const {
2296
2641
  theme
2297
2642
  } = useDesignSystemTheme();
2298
- const centerIconsInText = safex('databricks.fe.designsystem.centerIconsInText', false);
2299
2643
  return jsx(DesignSystemAntDConfigProvider, {
2300
2644
  children: jsx(AntDTitle, {
2301
2645
  ...props,
2302
2646
  className: props.className,
2303
- css: getTitleEmotionStyles(theme, userProps, centerIconsInText),
2647
+ css: getTitleEmotionStyles(theme, userProps),
2304
2648
  ...dangerouslySetAntdProps
2305
2649
  })
2306
2650
  });
@@ -2615,7 +2959,9 @@ const getNewChildren = (children, props, disabledReason, ref) => {
2615
2959
  },
2616
2960
  children: jsx("span", {
2617
2961
  css: theme => infoIconStyles(theme),
2618
- children: jsx(InfoIcon, {})
2962
+ children: jsx(InfoIcon, {
2963
+ "aria-hidden": "false"
2964
+ })
2619
2965
  })
2620
2966
  });
2621
2967
  if (childCount === 1) {
@@ -2701,7 +3047,8 @@ const dropdownContentStyles = theme => ({
2701
3047
  a: importantify({
2702
3048
  color: theme.colors.textPrimary,
2703
3049
  '&:hover, &:focus': {
2704
- color: theme.colors.textPrimary
3050
+ color: theme.colors.textPrimary,
3051
+ textDecoration: 'none'
2705
3052
  }
2706
3053
  })
2707
3054
  });
@@ -2780,5 +3127,5 @@ var DropdownMenu = /*#__PURE__*/Object.freeze({
2780
3127
  dropdownSeparatorStyles: dropdownSeparatorStyles
2781
3128
  });
2782
3129
 
2783
- export { ApplyDesignSystemContextOverrides as A, Button as B, CloseIcon as C, DesignSystemAntDConfigProvider as D, DesignSystemProvider as E, ApplyDesignSystemFlags as F, useAntDConfigProviderContext as G, DropdownMenu as H, Icon as I, CursorIcon as J, FaceFrownIcon as K, FaceNeutralIcon as L, FaceSmileIcon as M, NewWindowIcon as N, __INTERNAL_DO_NOT_USE__Password as O, __INTERNAL_DO_NOT_USE_DEDUPE__Group as P, getTypographyColor as Q, RestoreAntDDefaultClsPrefix as R, dropdownItemStyles as S, Tooltip as T, dropdownSeparatorStyles as U, WithDesignSystemThemeHoc as W, __INTERNAL_DO_NOT_USE__TextArea as _, ChevronRightIcon as a, useDesignSystemFlags as b, DU_BOIS_ENABLE_ANIMATION_CLASSNAME as c, useDesignSystemContext as d, InfoIcon as e, Input as f, getAnimationCss as g, CheckIcon as h, importantify as i, getValidationStateColor as j, Typography as k, dropdownContentStyles as l, Title as m, ChevronLeftIcon as n, Root as o, Trigger as p, getDefaultStyles as q, getPrimaryStyles as r, safex as s, getDisabledStyles as t, useDesignSystemTheme as u, lightColorList as v, getButtonEmotionStyles as w, DesignSystemThemeContext as x, DesignSystemContext as y, DesignSystemThemeProvider as z };
2784
- //# sourceMappingURL=DropdownMenu-e0c3fc1d.js.map
3130
+ export { dropdownItemStyles as $, ApplyDesignSystemContextOverrides as A, Button as B, CloseIcon as C, DesignSystemAntDConfigProvider as D, DesignSystemThemeContext as E, DesignSystemContext as F, DesignSystemThemeProvider as G, DesignSystemProvider as H, Icon as I, ApplyDesignSystemFlags as J, useAntDConfigProviderContext as K, LoadingState as L, DropdownMenu as M, CursorIcon as N, FaceFrownIcon as O, FaceNeutralIcon as P, FaceSmileIcon as Q, RestoreAntDDefaultClsPrefix as R, Spinner as S, Tooltip as T, NewWindowIcon as U, __INTERNAL_DO_NOT_USE__Password as V, WithDesignSystemThemeHoc as W, __INTERNAL_DO_NOT_USE_DEDUPE__Group as X, LoadingStateContext as Y, getTypographyColor as Z, __INTERNAL_DO_NOT_USE__TextArea as _, ChevronRightIcon as a, dropdownSeparatorStyles as a0, useDesignSystemFlags as b, useDesignSystemContext as c, InfoIcon as d, Input as e, CheckIcon as f, getAnimationCss as g, getValidationStateColor as h, importantify as i, Typography as j, LoadingIcon as k, dropdownContentStyles as l, Title as m, AccessibleContainer as n, ChevronLeftIcon as o, DU_BOIS_ENABLE_ANIMATION_CLASSNAME as p, Root as q, Trigger as r, safex as s, getDefaultStyles as t, useDesignSystemTheme as u, visuallyHidden as v, getPrimaryStyles as w, getDisabledStyles as x, lightColorList as y, getButtonEmotionStyles as z };
3131
+ //# sourceMappingURL=DropdownMenu-eb8788e5.js.map